@interf/compiler 0.9.3 → 0.9.4

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.
Files changed (28) hide show
  1. package/dist/compiler-ui/404.html +1 -1
  2. package/dist/compiler-ui/__next.__PAGE__.txt +2 -2
  3. package/dist/compiler-ui/__next._full.txt +3 -3
  4. package/dist/compiler-ui/__next._head.txt +1 -1
  5. package/dist/compiler-ui/__next._index.txt +2 -2
  6. package/dist/compiler-ui/__next._tree.txt +2 -2
  7. package/dist/compiler-ui/_next/static/chunks/{15mks7ry_cupt.js → 0d~8t0zm6545p.js} +9 -9
  8. package/dist/compiler-ui/_next/static/chunks/0xnel.ax9a.2c.css +3 -0
  9. package/dist/compiler-ui/_not-found/__next._full.txt +2 -2
  10. package/dist/compiler-ui/_not-found/__next._head.txt +1 -1
  11. package/dist/compiler-ui/_not-found/__next._index.txt +2 -2
  12. package/dist/compiler-ui/_not-found/__next._not-found.__PAGE__.txt +1 -1
  13. package/dist/compiler-ui/_not-found/__next._not-found.txt +1 -1
  14. package/dist/compiler-ui/_not-found/__next._tree.txt +2 -2
  15. package/dist/compiler-ui/_not-found.html +1 -1
  16. package/dist/compiler-ui/_not-found.txt +2 -2
  17. package/dist/compiler-ui/index.html +1 -1
  18. package/dist/compiler-ui/index.txt +3 -3
  19. package/dist/packages/local-service/action-values.d.ts +1 -0
  20. package/dist/packages/local-service/action-values.js +1 -0
  21. package/dist/packages/local-service/lib/schema.d.ts +4 -0
  22. package/dist/packages/local-service/lib/schema.js +1 -0
  23. package/dist/packages/local-service/runtime.js +56 -42
  24. package/package.json +1 -1
  25. package/dist/compiler-ui/_next/static/chunks/0c9mu7yldxyyg.css +0 -3
  26. /package/dist/compiler-ui/_next/static/{pIZnDsV3Je6hdC3cOsGdK → j7pdoqWrl4YJrJUVnksbl}/_buildManifest.js +0 -0
  27. /package/dist/compiler-ui/_next/static/{pIZnDsV3Je6hdC3cOsGdK → j7pdoqWrl4YJrJUVnksbl}/_clientMiddlewareManifest.js +0 -0
  28. /package/dist/compiler-ui/_next/static/{pIZnDsV3Je6hdC3cOsGdK → j7pdoqWrl4YJrJUVnksbl}/_ssgManifest.js +0 -0
@@ -75,34 +75,34 @@ ${f} ${m}`:`${u} ${l}`,className:(0,p1.clsx)(hC.default.spanNodeEvent,v,a&&hC.de
75
75
 
76
76
  `)}t.write("payload.value = newResult;"),t.write("return payload;");let s=t.compile();return(t,n)=>s(e,t,n)})(t.shape)),u=n(u,d),l)?bt([],c,u,d,r,e):u:i(u,d):(u.issues.push({expected:"object",code:"invalid_type",input:c,inst:e}),u)}});function bi(e,t,n,r){for(let n of e)if(0===n.issues.length)return t.value=n.value,t;let i=e.filter(e=>!vN(e));return 1===i.length?(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=>vO(e,r,ve())))}),t)}let ba=g5("$ZodUnion",(e,t)=>{yv.init(e,t),vu(e._zod,"optin",()=>t.options.some(e=>"optional"===e._zod.optin)?"optional":void 0),vu(e._zod,"optout",()=>t.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),vu(e._zod,"values",()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),vu(e._zod,"pattern",()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>vo(e.source)).join("|")})$`)}});let n=1===t.options.length,r=t.options[0]._zod.run;e._zod.parse=(i,a)=>{if(n)return r(i,a);let o=!1,s=[];for(let e of t.options){let t=e._zod.run({value:i.value,issues:[]},a);if(t instanceof Promise)s.push(t),o=!0;else{if(0===t.issues.length)return t;s.push(t)}}return o?Promise.all(s).then(t=>bi(t,i,e,a)):bi(s,i,e,a)}});function bo(e,t,n,r){let i=e.filter(e=>0===e.issues.length);return 1===i.length?t.value=i[0].value:0===i.length?t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>vO(e,r,ve())))}):t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:[],inclusive:!1}),t}let bs=g5("$ZodXor",(e,t)=>{ba.init(e,t),t.inclusive=!1;let n=1===t.options.length,r=t.options[0]._zod.run;e._zod.parse=(i,a)=>{if(n)return r(i,a);let o=!1,s=[];for(let e of t.options){let t=e._zod.run({value:i.value,issues:[]},a);t instanceof Promise?(s.push(t),o=!0):s.push(t)}return o?Promise.all(s).then(t=>bo(t,i,e,a)):bo(s,i,e,a)}}),bl=g5("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,ba.init(e,t);let n=e._zod.parse;vu(e._zod,"propValues",()=>{let e={};for(let n of t.options){let r=n._zod.propValues;if(!r||0===Object.keys(r).length)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[t,n]of Object.entries(r))for(let r of(e[t]||(e[t]=new Set),n))e[t].add(r)}return e});let r=vi(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||0===e.size)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!vh(o))return i.issues.push({code:"invalid_type",expected:"object",input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback?n(i,a):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:o,path:[t.discriminator],inst:e}),i)}}),bu=g5("$ZodIntersection",(e,t)=>{yv.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])=>bd(e,t,n)):bd(e,i,a)}});function bd(e,t,n){let r,i=new Map;for(let n of t.issues)if("unrecognized_keys"===n.code)for(let e of(r??(r=n),n.keys))i.has(e)||i.set(e,{}),i.get(e).l=!0;else e.issues.push(n);for(let t of n.issues)if("unrecognized_keys"===t.code)for(let e of t.keys)i.has(e)||i.set(e,{}),i.get(e).r=!0;else e.issues.push(t);let a=[...i].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&r&&e.issues.push({...r,keys:a}),vN(e))return e;let o=function e(t,n){if(t===n||t instanceof Date&&n instanceof Date&&+t==+n)return{valid:!0,data:t};if(vv(t)&&vv(n)){let r=Object.keys(n),i=Object.keys(t).filter(e=>-1!==r.indexOf(e)),a={...t,...n};for(let r of i){let i=e(t[r],n[r]);if(!i.valid)return{valid:!1,mergeErrorPath:[r,...i.mergeErrorPath]};a[r]=i.data}return{valid:!0,data:a}}if(Array.isArray(t)&&Array.isArray(n)){if(t.length!==n.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let i=0;i<t.length;i++){let a=e(t[i],n[i]);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};r.push(a.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}let bc=g5("$ZodTuple",(e,t)=>{yv.init(e,t);let n=t.items;e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({input:a,inst:e,expected:"tuple",code:"invalid_type"}),r;r.value=[];let o=[],s=[...n].reverse().findIndex(e=>"optional"!==e._zod.optin),l=-1===s?0:n.length-s;if(!t.rest){let t=a.length>n.length,i=a.length<l-1;if(t||i)return r.issues.push({...t?{code:"too_big",maximum:n.length,inclusive:!0}:{code:"too_small",minimum:n.length},input:a,inst:e,origin:"array"}),r}let u=-1;for(let e of n){if(++u>=a.length&&u>=l)continue;let t=e._zod.run({value:a[u],issues:[]},i);t instanceof Promise?o.push(t.then(e=>bm(e,r,u))):bm(t,r,u)}if(t.rest)for(let e of a.slice(n.length)){u++;let n=t.rest._zod.run({value:e,issues:[]},i);n instanceof Promise?o.push(n.then(e=>bm(e,r,u))):bm(n,r,u)}return o.length?Promise.all(o).then(()=>r):r}});function bm(e,t,n){e.issues.length&&t.issues.push(...vz(n,e.issues)),t.value[n]=e.value}let bf=g5("$ZodRecord",(e,t)=>{yv.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!vv(i))return n.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),n;let a=[],o=t.keyType._zod.values;if(o){let s;n.value={};let l=new Set;for(let e of o)if("string"==typeof e||"number"==typeof e||"symbol"==typeof e){l.add("number"==typeof e?e.toString():e);let o=t.valueType._zod.run({value:i[e],issues:[]},r);o instanceof Promise?a.push(o.then(t=>{t.issues.length&&n.issues.push(...vz(e,t.issues)),n.value[e]=t.value})):(o.issues.length&&n.issues.push(...vz(e,o.issues)),n.value[e]=o.value)}for(let e in i)l.has(e)||(s=s??[]).push(e);s&&s.length>0&&n.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:s})}else for(let o of(n.value={},Reflect.ownKeys(i))){if("__proto__"===o)continue;let s=t.keyType._zod.run({value:o,issues:[]},r);if(s instanceof Promise)throw Error("Async schemas not supported in object keys currently");if("string"==typeof o&&xZ.test(o)&&s.issues.length){let e=t.keyType._zod.run({value:Number(o),issues:[]},r);if(e instanceof Promise)throw Error("Async schemas not supported in object keys currently");0===e.issues.length&&(s=e)}if(s.issues.length){"loose"===t.mode?n.value[o]=i[o]:n.issues.push({code:"invalid_key",origin:"record",issues:s.issues.map(e=>vO(e,r,ve())),input:o,path:[o],inst:e});continue}let l=t.valueType._zod.run({value:i[o],issues:[]},r);l instanceof Promise?a.push(l.then(e=>{e.issues.length&&n.issues.push(...vz(o,e.issues)),n.value[s.value]=e.value})):(l.issues.length&&n.issues.push(...vz(o,l.issues)),n.value[s.value]=l.value)}return a.length?Promise.all(a).then(()=>n):n}}),bp=g5("$ZodMap",(e,t)=>{yv.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!(i instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:i,inst:e}),n;let a=[];for(let[o,s]of(n.value=new Map,i)){let l=t.keyType._zod.run({value:o,issues:[]},r),u=t.valueType._zod.run({value:s,issues:[]},r);l instanceof Promise||u instanceof Promise?a.push(Promise.all([l,u]).then(([t,a])=>{bh(t,a,n,o,i,e,r)})):bh(l,u,n,o,i,e,r)}return a.length?Promise.all(a).then(()=>n):n}});function bh(e,t,n,r,i,a,o){e.issues.length&&(vy.has(typeof r)?n.issues.push(...vz(r,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:i,inst:a,issues:e.issues.map(e=>vO(e,o,ve()))})),t.issues.length&&(vy.has(typeof r)?n.issues.push(...vz(r,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:i,inst:a,key:r,issues:t.issues.map(e=>vO(e,o,ve()))})),n.value.set(e.value,t.value)}let bg=g5("$ZodSet",(e,t)=>{yv.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!(i instanceof Set))return n.issues.push({input:i,inst:e,expected:"set",code:"invalid_type"}),n;let a=[];for(let e of(n.value=new Set,i)){let i=t.valueType._zod.run({value:e,issues:[]},r);i instanceof Promise?a.push(i.then(e=>bv(e,n))):bv(i,n)}return a.length?Promise.all(a).then(()=>n):n}});function bv(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}let bx=g5("$ZodEnum",(e,t)=>{yv.init(e,t);let n=vt(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>vy.has(typeof e)).map(e=>"string"==typeof e?v_(e):e.toString()).join("|")})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:"invalid_value",values:n,input:a,inst:e}),t}}),by=g5("$ZodLiteral",(e,t)=>{if(yv.init(e,t),0===t.values.length)throw Error("Cannot create literal schema with no valid values");let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(`^(${t.values.map(e=>"string"==typeof e?v_(e):e?v_(e.toString()):String(e)).join("|")})$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:"invalid_value",values:t.values,input:a,inst:e}),r}}),bb=g5("$ZodFile",(e,t)=>{yv.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return r instanceof File||t.issues.push({expected:"file",code:"invalid_type",input:r,inst:e}),t}}),b_=g5("$ZodTransform",(e,t)=>{yv.init(e,t),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new g8(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 g9;return n.value=i,n}});function b$(e,t){return e.issues.length&&void 0===t?{issues:[],value:void 0}:e}let bw=g5("$ZodOptional",(e,t)=>{yv.init(e,t),e._zod.optin="optional",e._zod.optout="optional",vu(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),vu(e._zod,"pattern",()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${vo(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if("optional"===t.innerType._zod.optin){let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>b$(t,e.value)):b$(r,e.value)}return void 0===e.value?e:t.innerType._zod.run(e,n)}}),bk=g5("$ZodExactOptional",(e,t)=>{bw.init(e,t),vu(e._zod,"values",()=>t.innerType._zod.values),vu(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),bS=g5("$ZodNullable",(e,t)=>{yv.init(e,t),vu(e._zod,"optin",()=>t.innerType._zod.optin),vu(e._zod,"optout",()=>t.innerType._zod.optout),vu(e._zod,"pattern",()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${vo(e.source)}|null)$`):void 0}),vu(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>null===e.value?e:t.innerType._zod.run(e,n)}),bI=g5("$ZodDefault",(e,t)=>{yv.init(e,t),e._zod.optin="optional",vu(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);if(void 0===e.value)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>bj(e,t)):bj(r,t)}});function bj(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}let bN=g5("$ZodPrefault",(e,t)=>{yv.init(e,t),e._zod.optin="optional",vu(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>("backward"===n.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),bz=g5("$ZodNonOptional",(e,t)=>{yv.init(e,t),vu(e._zod,"values",()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>void 0!==e)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>bE(t,e)):bE(i,e)}});function bE(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}let bO=g5("$ZodSuccess",(e,t)=>{yv.init(e,t),e._zod.parse=(e,n)=>{if("backward"===n.direction)throw new g8("ZodSuccess");let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>(e.value=0===t.issues.length,e)):(e.value=0===r.issues.length,e)}}),bT=g5("$ZodCatch",(e,t)=>{yv.init(e,t),vu(e._zod,"optin",()=>t.innerType._zod.optin),vu(e._zod,"optout",()=>t.innerType._zod.optout),vu(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>vO(e,n,ve()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>vO(e,n,ve()))},input:e.value}),e.issues=[]),e)}}),bC=g5("$ZodNaN",(e,t)=>{yv.init(e,t),e._zod.parse=(t,n)=>("number"==typeof t.value&&Number.isNaN(t.value)||t.issues.push({input:t.value,inst:e,expected:"nan",code:"invalid_type"}),t)}),bD=g5("$ZodPipe",(e,t)=>{yv.init(e,t),vu(e._zod,"values",()=>t.in._zod.values),vu(e._zod,"optin",()=>t.in._zod.optin),vu(e._zod,"optout",()=>t.out._zod.optout),vu(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if("backward"===n.direction){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>bU(e,t.in,n)):bU(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>bU(e,t.out,n)):bU(r,t.out,n)}});function bU(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}let bP=g5("$ZodCodec",(e,t)=>{yv.init(e,t),vu(e._zod,"values",()=>t.in._zod.values),vu(e._zod,"optin",()=>t.in._zod.optin),vu(e._zod,"optout",()=>t.out._zod.optout),vu(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if("forward"===(n.direction||"forward")){let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>bZ(e,t,n)):bZ(r,t,n)}{let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>bZ(e,t,n)):bZ(r,t,n)}}});function bZ(e,t,n){if(e.issues.length)return e.aborted=!0,e;if("forward"===(n.direction||"forward")){let r=t.transform(e.value,e);return r instanceof Promise?r.then(r=>bA(e,r,t.out,n)):bA(e,r,t.out,n)}{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(r=>bA(e,r,t.in,n)):bA(e,r,t.in,n)}}function bA(e,t,n,r){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},r)}let bR=g5("$ZodReadonly",(e,t)=>{yv.init(e,t),vu(e._zod,"propValues",()=>t.innerType._zod.propValues),vu(e._zod,"values",()=>t.innerType._zod.values),vu(e._zod,"optin",()=>t.innerType?._zod?.optin),vu(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(bL):bL(r)}});function bL(e){return e.value=Object.freeze(e.value),e}let bM=g5("$ZodTemplateLiteral",(e,t)=>{yv.init(e,t);let n=[];for(let e of t.parts)if("object"==typeof e&&null!==e){if(!e._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...e._zod.traits].shift()}`);let t=e._zod.pattern instanceof RegExp?e._zod.pattern.source:e._zod.pattern;if(!t)throw Error(`Invalid template literal part: ${e._zod.traits}`);let r=+!!t.startsWith("^"),i=t.endsWith("$")?t.length-1:t.length;n.push(t.slice(r,i))}else if(null===e||vb.has(typeof e))n.push(v_(`${e}`));else throw Error(`Invalid template literal part: ${e}`);e._zod.pattern=RegExp(`^${n.join("")}$`),e._zod.parse=(n,r)=>("string"!=typeof n.value?n.issues.push({input:n.value,inst:e,expected:"string",code:"invalid_type"}):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source})),n)}),bF=g5("$ZodFunction",(e,t)=>(yv.init(e,t),e._def=t,e._zod.def=t,e.implement=t=>{if("function"!=typeof t)throw Error("implement() must be called with a function");return function(...n){let r=Reflect.apply(t,this,e._def.input?vJ(e._def.input,n):n);return e._def.output?vJ(e._def.output,r):r}},e.implementAsync=t=>{if("function"!=typeof t)throw Error("implementAsync() must be called with a function");return async function(...n){let r=e._def.input?await vK(e._def.input,n):n,i=await Reflect.apply(t,this,r);return e._def.output?await vK(e._def.output,i):i}},e._zod.parse=(t,n)=>("function"!=typeof t.value?t.issues.push({code:"invalid_type",expected:"function",input:t.value,inst:e}):e._def.output&&"promise"===e._def.output._zod.def.type?t.value=e.implementAsync(t.value):t.value=e.implement(t.value),t),e.input=(...t)=>{let n=e.constructor;return new n(Array.isArray(t[0])?{type:"function",input:new bc({type:"tuple",items:t[0],rest:t[1]}),output:e._def.output}:{type:"function",input:t[0],output:e._def.output})},e.output=t=>new e.constructor({type:"function",input:e._def.input,output:t}),e)),bB=g5("$ZodPromise",(e,t)=>{yv.init(e,t),e._zod.parse=(e,n)=>Promise.resolve(e.value).then(e=>t.innerType._zod.run({value:e,issues:[]},n))}),bW=g5("$ZodLazy",(e,t)=>{yv.init(e,t),vu(e._zod,"innerType",()=>t.getter()),vu(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),vu(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),vu(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),vu(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),bH=g5("$ZodCustom",(e,t)=>{x1.init(e,t),yv.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=>bV(t,n,r,e));bV(i,n,r,e)}});function bV(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(vU(e))}}function bJ(e,t,n,r){let i=Math.abs(e),a=i%10,o=i%100;return o>=11&&o<=19?r:1===a?t:a>=2&&a<=4?n:r}function bG(){let e,t,n;return{localeError:(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"}},t={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},n={nan:"NaN"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;return`Invalid input: expected ${e}, received ${i}`}case"invalid_value":if(1===r.values.length)return`Invalid input: expected ${vk(r.values[0])}`;return`Invalid option: expected one of ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Too big: expected ${r.origin??"value"} to have ${t}${r.maximum.toString()} ${n.unit??"elements"}`;return`Too big: expected ${r.origin??"value"} to be ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Too small: expected ${r.origin} to have ${t}${r.minimum.toString()} ${n.unit}`;return`Too small: expected ${r.origin} to be ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Invalid string: must start with "${r.prefix}"`;if("ends_with"===r.format)return`Invalid string: must end with "${r.suffix}"`;if("includes"===r.format)return`Invalid string: must include "${r.includes}"`;if("regex"===r.format)return`Invalid string: must match pattern ${r.pattern}`;return`Invalid ${t[r.format]??r.format}`;case"not_multiple_of":return`Invalid number: must be a multiple of ${r.divisor}`;case"unrecognized_keys":return`Unrecognized key${r.keys.length>1?"s":""}: ${vn(r.keys,", ")}`;case"invalid_key":return`Invalid key in ${r.origin}`;case"invalid_union":default:return"Invalid input";case"invalid_element":return`Invalid value in ${r.origin}`}})}}function bK(e,t,n){return 1===Math.abs(e)?t:n}function bq(e){if(!e)return"";let t=e[e.length-1];return e+(["ա","ե","ը","ի","ո","ու","օ"].includes(t)?"ն":"ը")}function bY(){let e,t,n;return{localeError:(e={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}},t={regex:"ទិន្នន័យបញ្ចូល",email:"អាសយដ្ឋានអ៊ីមែល",url:"URL",emoji:"សញ្ញាអារម្មណ៍",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"កាលបរិច្ឆេទ និងម៉ោង ISO",date:"កាលបរិច្ឆេទ ISO",time:"ម៉ោង ISO",duration:"រយៈពេល ISO",ipv4:"អាសយដ្ឋាន IPv4",ipv6:"អាសយដ្ឋាន IPv6",cidrv4:"ដែនអាសយដ្ឋាន IPv4",cidrv6:"ដែនអាសយដ្ឋាន IPv6",base64:"ខ្សែអក្សរអ៊ិកូដ base64",base64url:"ខ្សែអក្សរអ៊ិកូដ base64url",json_string:"ខ្សែអក្សរ JSON",e164:"លេខ E.164",jwt:"JWT",template_literal:"ទិន្នន័យបញ្ចូល"},n={nan:"NaN",number:"លេខ",array:"អារេ (Array)",null:"គ្មានតម្លៃ (null)"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${r.expected} ប៉ុន្តែទទួលបាន ${i}`;return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${e} ប៉ុន្តែទទួលបាន ${i}`}case"invalid_value":if(1===r.values.length)return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${vk(r.values[0])}`;return`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`ធំពេក៖ ត្រូវការ ${r.origin??"តម្លៃ"} ${t} ${r.maximum.toString()} ${n.unit??"ធាតុ"}`;return`ធំពេក៖ ត្រូវការ ${r.origin??"តម្លៃ"} ${t} ${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`តូចពេក៖ ត្រូវការ ${r.origin} ${t} ${r.minimum.toString()} ${n.unit}`;return`តូចពេក៖ ត្រូវការ ${r.origin} ${t} ${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${r.prefix}"`;if("ends_with"===r.format)return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${r.suffix}"`;if("includes"===r.format)return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${r.includes}"`;if("regex"===r.format)return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${r.pattern}`;return`មិនត្រឹមត្រូវ៖ ${t[r.format]??r.format}`;case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${r.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${vn(r.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${r.origin}`;case"invalid_union":default:return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${r.origin}`}})}}e.s(["$ZodAny",0,y4,"$ZodArray",0,y8,"$ZodBase64",0,yM,"$ZodBase64URL",0,yB,"$ZodBigInt",0,yY,"$ZodBigIntFormat",0,yX,"$ZodBoolean",0,yq,"$ZodCIDRv4",0,yA,"$ZodCIDRv6",0,yR,"$ZodCUID",0,yI,"$ZodCUID2",0,yj,"$ZodCatch",0,bT,"$ZodCodec",0,bP,"$ZodCustom",0,bH,"$ZodCustomStringFormat",0,yJ,"$ZodDate",0,y3,"$ZodDefault",0,bI,"$ZodDiscriminatedUnion",0,bl,"$ZodE164",0,yW,"$ZodEmail",0,y$,"$ZodEmoji",0,yk,"$ZodEnum",0,bx,"$ZodExactOptional",0,bk,"$ZodFile",0,bb,"$ZodFunction",0,bF,"$ZodGUID",0,yb,"$ZodIPv4",0,yU,"$ZodIPv6",0,yP,"$ZodISODate",0,yT,"$ZodISODateTime",0,yO,"$ZodISODuration",0,yD,"$ZodISOTime",0,yC,"$ZodIntersection",0,bu,"$ZodJWT",0,yV,"$ZodKSUID",0,yE,"$ZodLazy",0,bW,"$ZodLiteral",0,by,"$ZodMAC",0,yZ,"$ZodMap",0,bp,"$ZodNaN",0,bC,"$ZodNanoID",0,yS,"$ZodNever",0,y2,"$ZodNonOptional",0,bz,"$ZodNull",0,y1,"$ZodNullable",0,bS,"$ZodNumber",0,yG,"$ZodNumberFormat",0,yK,"$ZodObject",0,bn,"$ZodObjectJIT",0,br,"$ZodOptional",0,bw,"$ZodPipe",0,bD,"$ZodPrefault",0,bN,"$ZodPromise",0,bB,"$ZodReadonly",0,bR,"$ZodRecord",0,bf,"$ZodSet",0,bg,"$ZodString",0,yx,"$ZodStringFormat",0,yy,"$ZodSuccess",0,bO,"$ZodSymbol",0,yQ,"$ZodTemplateLiteral",0,bM,"$ZodTransform",0,b_,"$ZodTuple",0,bc,"$ZodType",0,yv,"$ZodULID",0,yN,"$ZodURL",0,yw,"$ZodUUID",0,y_,"$ZodUndefined",0,y0,"$ZodUnion",0,ba,"$ZodUnknown",0,y6,"$ZodVoid",0,y5,"$ZodXID",0,yz,"$ZodXor",0,bs,"isValidBase64",0,yL,"isValidBase64URL",0,yF,"isValidJWT",0,yH],76094);let bX=e=>e.charAt(0).toUpperCase()+e.slice(1);function bQ(e){let t=Math.abs(e),n=t%10,r=t%100;return r>=11&&r<=19||0===n?"many":1===n?"one":"few"}function b0(e,t,n,r){let i=Math.abs(e),a=i%10,o=i%100;return o>=11&&o<=19?r:1===a?t:a>=2&&a<=4?n:r}function b1(){let e,t,n;return{localeError:(e={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}},t={regex:"вхідні дані",email:"адреса електронної пошти",url:"URL",emoji:"емодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"дата та час ISO",date:"дата ISO",time:"час ISO",duration:"тривалість ISO",ipv4:"адреса IPv4",ipv6:"адреса IPv6",cidrv4:"діапазон IPv4",cidrv6:"діапазон IPv6",base64:"рядок у кодуванні base64",base64url:"рядок у кодуванні base64url",json_string:"рядок JSON",e164:"номер E.164",jwt:"JWT",template_literal:"вхідні дані"},n={nan:"NaN",number:"число",array:"масив"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Неправильні вхідні дані: очікується instanceof ${r.expected}, отримано ${i}`;return`Неправильні вхідні дані: очікується ${e}, отримано ${i}`}case"invalid_value":if(1===r.values.length)return`Неправильні вхідні дані: очікується ${vk(r.values[0])}`;return`Неправильна опція: очікується одне з ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Занадто велике: очікується, що ${r.origin??"значення"} ${n.verb} ${t}${r.maximum.toString()} ${n.unit??"елементів"}`;return`Занадто велике: очікується, що ${r.origin??"значення"} буде ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Занадто мале: очікується, що ${r.origin} ${n.verb} ${t}${r.minimum.toString()} ${n.unit}`;return`Занадто мале: очікується, що ${r.origin} буде ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Неправильний рядок: повинен починатися з "${r.prefix}"`;if("ends_with"===r.format)return`Неправильний рядок: повинен закінчуватися на "${r.suffix}"`;if("includes"===r.format)return`Неправильний рядок: повинен містити "${r.includes}"`;if("regex"===r.format)return`Неправильний рядок: повинен відповідати шаблону ${r.pattern}`;return`Неправильний ${t[r.format]??r.format}`;case"not_multiple_of":return`Неправильне число: повинно бути кратним ${r.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${r.keys.length>1?"і":""}: ${vn(r.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${r.origin}`;case"invalid_union":default:return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${r.origin}`}})}}e.s([],43365);let b4=Symbol("ZodOutput"),b6=Symbol("ZodInput");class b2{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&"object"==typeof n&&"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&&"object"==typeof t&&"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 b5(){return new b2}(jK=globalThis).__zod_globalRegistry??(jK.__zod_globalRegistry=b5());let b3=globalThis.__zod_globalRegistry;function b9(e,t){return new e({type:"string",...vw(t)})}function b8(e,t){return new e({type:"string",coerce:!0,...vw(t)})}function b7(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...vw(t)})}function _e(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...vw(t)})}function _t(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...vw(t)})}function _n(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...vw(t)})}function _r(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...vw(t)})}function _i(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...vw(t)})}function _a(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...vw(t)})}function _o(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...vw(t)})}function _s(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...vw(t)})}function _l(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...vw(t)})}function _u(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...vw(t)})}function _d(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...vw(t)})}function _c(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...vw(t)})}function _m(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...vw(t)})}function _f(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...vw(t)})}function _p(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...vw(t)})}function _h(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...vw(t)})}function _g(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...vw(t)})}function _v(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...vw(t)})}function _x(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...vw(t)})}function _y(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...vw(t)})}function _b(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...vw(t)})}function __(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...vw(t)})}e.s(["$ZodRegistry",0,b2,"$input",0,b6,"$output",0,b4,"globalRegistry",0,b3,"registry",0,b5],25527);let _$={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function _w(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...vw(t)})}function _k(e,t){return new e({type:"string",format:"date",check:"string_format",...vw(t)})}function _S(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...vw(t)})}function _I(e,t){return new e({type:"string",format:"duration",check:"string_format",...vw(t)})}function _j(e,t){return new e({type:"number",checks:[],...vw(t)})}function _N(e,t){return new e({type:"number",coerce:!0,checks:[],...vw(t)})}function _z(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...vw(t)})}function _E(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...vw(t)})}function _O(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...vw(t)})}function _T(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...vw(t)})}function _C(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...vw(t)})}function _D(e,t){return new e({type:"boolean",...vw(t)})}function _U(e,t){return new e({type:"boolean",coerce:!0,...vw(t)})}function _P(e,t){return new e({type:"bigint",...vw(t)})}function _Z(e,t){return new e({type:"bigint",coerce:!0,...vw(t)})}function _A(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...vw(t)})}function _R(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...vw(t)})}function _L(e,t){return new e({type:"symbol",...vw(t)})}function _M(e,t){return new e({type:"undefined",...vw(t)})}function _F(e,t){return new e({type:"null",...vw(t)})}function _B(e){return new e({type:"any"})}function _W(e){return new e({type:"unknown"})}function _H(e,t){return new e({type:"never",...vw(t)})}function _V(e,t){return new e({type:"void",...vw(t)})}function _J(e,t){return new e({type:"date",...vw(t)})}function _G(e,t){return new e({type:"date",coerce:!0,...vw(t)})}function _K(e,t){return new e({type:"nan",...vw(t)})}function _q(e,t){return new x6({check:"less_than",...vw(t),value:e,inclusive:!1})}function _Y(e,t){return new x6({check:"less_than",...vw(t),value:e,inclusive:!0})}function _X(e,t){return new x2({check:"greater_than",...vw(t),value:e,inclusive:!1})}function _Q(e,t){return new x2({check:"greater_than",...vw(t),value:e,inclusive:!0})}function _0(e){return _X(0,e)}function _1(e){return _q(0,e)}function _4(e){return _Y(0,e)}function _6(e){return _Q(0,e)}function _2(e,t){return new x5({check:"multiple_of",...vw(t),value:e})}function _5(e,t){return new x8({check:"max_size",...vw(t),maximum:e})}function _3(e,t){return new x7({check:"min_size",...vw(t),minimum:e})}function _9(e,t){return new ye({check:"size_equals",...vw(t),size:e})}function _8(e,t){return new yt({check:"max_length",...vw(t),maximum:e})}function _7(e,t){return new yn({check:"min_length",...vw(t),minimum:e})}function $e(e,t){return new yr({check:"length_equals",...vw(t),length:e})}function $t(e,t){return new ya({check:"string_format",format:"regex",...vw(t),pattern:e})}function $n(e){return new yo({check:"string_format",format:"lowercase",...vw(e)})}function $r(e){return new ys({check:"string_format",format:"uppercase",...vw(e)})}function $i(e,t){return new yl({check:"string_format",format:"includes",...vw(t),includes:e})}function $a(e,t){return new yu({check:"string_format",format:"starts_with",...vw(t),prefix:e})}function $o(e,t){return new yd({check:"string_format",format:"ends_with",...vw(t),suffix:e})}function $s(e,t,n){return new ym({check:"property",property:e,schema:t,...vw(n)})}function $l(e,t){return new yf({check:"mime_type",mime:e,...vw(t)})}function $u(e){return new yp({check:"overwrite",tx:e})}function $d(e){return $u(t=>t.normalize(e))}function $c(){return $u(e=>e.trim())}function $m(){return $u(e=>e.toLowerCase())}function $f(){return $u(e=>e.toUpperCase())}function $p(){return $u(e=>vf(e))}function $h(e,t,n){return new e({type:"array",element:t,...vw(n)})}function $g(e,t,n){return new e({type:"union",options:t,...vw(n)})}function $v(e,t,n){return new e({type:"union",options:t,inclusive:!1,...vw(n)})}function $x(e,t,n,r){return new e({type:"union",options:n,discriminator:t,...vw(r)})}function $y(e,t,n){return new e({type:"intersection",left:t,right:n})}function $b(e,t,n,r){let i=n instanceof yv,a=i?r:n;return new e({type:"tuple",items:t,rest:i?n:null,...vw(a)})}function $_(e,t,n,r){return new e({type:"record",keyType:t,valueType:n,...vw(r)})}function $$(e,t,n,r){return new e({type:"map",keyType:t,valueType:n,...vw(r)})}function $w(e,t,n){return new e({type:"set",valueType:t,...vw(n)})}function $k(e,t,n){return new e({type:"enum",entries:Array.isArray(t)?Object.fromEntries(t.map(e=>[e,e])):t,...vw(n)})}function $S(e,t,n){return new e({type:"enum",entries:t,...vw(n)})}function $I(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...vw(n)})}function $j(e,t){return new e({type:"file",...vw(t)})}function $N(e,t){return new e({type:"transform",transform:t})}function $z(e,t){return new e({type:"optional",innerType:t})}function $E(e,t){return new e({type:"nullable",innerType:t})}function $O(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return"function"==typeof n?n():vx(n)}})}function $T(e,t,n){return new e({type:"nonoptional",innerType:t,...vw(n)})}function $C(e,t){return new e({type:"success",innerType:t})}function $D(e,t,n){return new e({type:"catch",innerType:t,catchValue:"function"==typeof n?n:()=>n})}function $U(e,t,n){return new e({type:"pipe",in:t,out:n})}function $P(e,t){return new e({type:"readonly",innerType:t})}function $Z(e,t,n){return new e({type:"template_literal",parts:t,...vw(n)})}function $A(e,t){return new e({type:"lazy",getter:t})}function $R(e,t){return new e({type:"promise",innerType:t})}function $L(e,t,n){let r=vw(n);return r.abort??(r.abort=!0),new e({type:"custom",check:"custom",fn:t,...r})}function $M(e,t,n){return new e({type:"custom",check:"custom",fn:t,...vw(n)})}function $F(e){let t=$B(n=>(n.addIssue=e=>{"string"==typeof e?n.issues.push(vU(e,n.value,t._zod.def)):(e.fatal&&(e.continue=!1),e.code??(e.code="custom"),e.input??(e.input=n.value),e.inst??(e.inst=t),e.continue??(e.continue=!t._zod.def.abort),n.issues.push(vU(e)))},e(n.value,n)));return t}function $B(e,t){let n=new x1({check:"custom",...vw(t)});return n._zod.check=e,n}function $W(e){let t=new x1({check:"describe"});return t._zod.onattach=[t=>{let n=b3.get(t)??{};b3.add(t,{...n,description:e})}],t._zod.check=()=>{},t}function $H(e){let t=new x1({check:"meta"});return t._zod.onattach=[t=>{let n=b3.get(t)??{};b3.add(t,{...n,...e})}],t._zod.check=()=>{},t}function $V(e,t){let n=vw(t),r=n.truthy??["true","1","yes","on","y","enabled"],i=n.falsy??["false","0","no","off","n","disabled"];"sensitive"!==n.case&&(r=r.map(e=>"string"==typeof e?e.toLowerCase():e),i=i.map(e=>"string"==typeof e?e.toLowerCase():e));let a=new Set(r),o=new Set(i),s=e.Codec??bP,l=e.Boolean??yq,u=new s({type:"pipe",in:new(e.String??yx)({type:"string",error:n.error}),out:new l({type:"boolean",error:n.error}),transform:(e,t)=>{let r=e;return"sensitive"!==n.case&&(r=r.toLowerCase()),!!a.has(r)||!o.has(r)&&(t.issues.push({code:"invalid_value",expected:"stringbool",values:[...a,...o],input:t.value,inst:u,continue:!1}),{})},reverseTransform:(e,t)=>!0===e?r[0]||"true":i[0]||"false",error:n.error});return u}function $J(e,t,n,r={}){let i=vw(r),a={...vw(r),check:"string_format",type:"string",format:t,fn:"function"==typeof n?n:e=>n.test(e),...i};return n instanceof RegExp&&(a.pattern=n),new e(a)}function $G(e){let t=e?.target??"draft-2020-12";return"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??b3,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function $K(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||(o.ref=a),$K(a,t,r),t.seen.get(a).isParent=!0)}let l=t.metadataRegistry.get(e);return l&&Object.assign(o.schema,l),"input"===t.io&&function e(t,n){let r=n??{seen:new Set};if(r.seen.has(t))return!1;r.seen.add(t);let i=t._zod.def;if("transform"===i.type)return!0;if("array"===i.type)return e(i.element,r);if("set"===i.type)return e(i.valueType,r);if("lazy"===i.type)return e(i.getter(),r);if("promise"===i.type||"optional"===i.type||"nonoptional"===i.type||"nullable"===i.type||"readonly"===i.type||"default"===i.type||"prefault"===i.type)return e(i.innerType,r);if("intersection"===i.type)return e(i.left,r)||e(i.right,r);if("record"===i.type||"map"===i.type)return e(i.keyType,r)||e(i.valueType,r);if("pipe"===i.type)return e(i.in,r)||e(i.out,r);if("object"===i.type){for(let t in i.shape)if(e(i.shape[t],r))return!0;return!1}if("union"===i.type){for(let t of i.options)if(e(t,r))return!0;return!1}if("tuple"===i.type){for(let t of i.items)if(e(t,r))return!0;if(i.rest&&e(i.rest,r))return!0}return!1}(e)&&(delete o.schema.examples,delete o.schema.default),"input"===t.io&&o.schema._prefault&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function $q(e,t){let n=e.seen.get(t);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{if(t[1].schema.$ref)return;let r=t[1],{ref:i,defId:a}=(t=>{let r="draft-2020-12"===e.target?"$defs":"definitions";if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i("__shared")}#/${r}/${a}`}}if(t[1]===n)return{ref:"#"};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}})(t);r.def={...r.schema},a&&(r.defId=a);let o=r.schema;for(let e in o)delete o[e];o.$ref=i};if("throw"===e.cycles)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join("/")}/<root>
77
77
 
78
- 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]){i(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){i(n);continue}}if(e.metadataRegistry.get(n[0])?.id||r.cycle||r.count>1&&"ref"===e.reused){i(n);continue}}}function $Y(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(null===n.ref)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&&("draft-07"===e.target||"draft-04"===e.target||"openapi-3.0"===e.target)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)"$ref"!==e&&"allOf"!==e&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)"$ref"!==e&&"allOf"!==e&&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)"$ref"!==e&&"allOf"!==e&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if("draft-2020-12"===e.target?i.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===e.target?i.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===e.target?i.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(a[e.defId]=e.def)}e.external||Object.keys(a).length>0&&("draft-2020-12"===e.target?i.$defs=a:i.definitions=a);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t["~standard"],jsonSchema:{input:$Q(t,"input",e.processors),output:$Q(t,"output",e.processors)}},enumerable:!1,writable:!1}),n}catch(e){throw Error("Error converting schema to JSON.")}}e.s(["TimePrecision",0,_$,"_any",0,_B,"_array",0,$h,"_base64",0,_x,"_base64url",0,_y,"_bigint",0,_P,"_boolean",0,_D,"_catch",0,$D,"_check",0,$B,"_cidrv4",0,_g,"_cidrv6",0,_v,"_coercedBigint",0,_Z,"_coercedBoolean",0,_U,"_coercedDate",0,_G,"_coercedNumber",0,_N,"_coercedString",0,b8,"_cuid",0,_l,"_cuid2",0,_u,"_custom",0,$L,"_date",0,_J,"_default",0,$O,"_discriminatedUnion",0,$x,"_e164",0,_b,"_email",0,b7,"_emoji",0,_o,"_endsWith",0,$o,"_enum",0,$k,"_file",0,$j,"_float32",0,_E,"_float64",0,_O,"_gt",0,_X,"_gte",0,_Q,"_guid",0,_e,"_includes",0,$i,"_int",0,_z,"_int32",0,_T,"_int64",0,_A,"_intersection",0,$y,"_ipv4",0,_f,"_ipv6",0,_p,"_isoDate",0,_k,"_isoDateTime",0,_w,"_isoDuration",0,_I,"_isoTime",0,_S,"_jwt",0,__,"_ksuid",0,_m,"_lazy",0,$A,"_length",0,$e,"_literal",0,$I,"_lowercase",0,$n,"_lt",0,_q,"_lte",0,_Y,"_mac",0,_h,"_map",0,$$,"_max",0,_Y,"_maxLength",0,_8,"_maxSize",0,_5,"_mime",0,$l,"_min",0,_Q,"_minLength",0,_7,"_minSize",0,_3,"_multipleOf",0,_2,"_nan",0,_K,"_nanoid",0,_s,"_nativeEnum",0,$S,"_negative",0,_1,"_never",0,_H,"_nonnegative",0,_6,"_nonoptional",0,$T,"_nonpositive",0,_4,"_normalize",0,$d,"_null",0,_F,"_nullable",0,$E,"_number",0,_j,"_optional",0,$z,"_overwrite",0,$u,"_pipe",0,$U,"_positive",0,_0,"_promise",0,$R,"_property",0,$s,"_readonly",0,$P,"_record",0,$_,"_refine",0,$M,"_regex",0,$t,"_set",0,$w,"_size",0,_9,"_slugify",0,$p,"_startsWith",0,$a,"_string",0,b9,"_stringFormat",0,$J,"_stringbool",0,$V,"_success",0,$C,"_superRefine",0,$F,"_symbol",0,_L,"_templateLiteral",0,$Z,"_toLowerCase",0,$m,"_toUpperCase",0,$f,"_transform",0,$N,"_trim",0,$c,"_tuple",0,$b,"_uint32",0,_C,"_uint64",0,_R,"_ulid",0,_d,"_undefined",0,_M,"_union",0,$g,"_unknown",0,_W,"_uppercase",0,$r,"_url",0,_a,"_uuid",0,_t,"_uuidv4",0,_n,"_uuidv6",0,_r,"_uuidv7",0,_i,"_void",0,_V,"_xid",0,_c,"_xor",0,$v,"describe",0,$W,"meta",0,$H],50215);let $X=(e,t={})=>n=>{let r=$G({...n,processors:t});return $K(e,r),$q(r,e),$Y(r,e)},$Q=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=$G({...i??{},target:a,io:t,processors:n});return $K(e,o),$q(o,e),$Y(o,e)};e.s(["createStandardJSONSchemaMethod",0,$Q,"createToJSONSchemaMethod",0,$X,"extractDefs",0,$q,"finalize",0,$Y,"initializeContext",0,$G,"process",0,$K],34966);let $0={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},$1=(e,t,n,r)=>{n.type="string";let{minimum:i,maximum:a,format:o,patterns:s,contentEncoding:l}=e._zod.bag;if("number"==typeof i&&(n.minLength=i),"number"==typeof a&&(n.maxLength=a),o&&(n.format=$0[o]??o,""===n.format&&delete n.format,"time"===o&&delete n.format),l&&(n.contentEncoding=l),s&&s.size>0){let e=[...s];1===e.length?n.pattern=e[0].source:e.length>1&&(n.allOf=[...e.map(e=>({..."draft-07"===t.target||"draft-04"===t.target||"openapi-3.0"===t.target?{type:"string"}:{},pattern:e.source}))])}},$4=(e,t,n,r)=>{let{minimum:i,maximum:a,format:o,multipleOf:s,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;"string"==typeof o&&o.includes("int")?n.type="integer":n.type="number","number"==typeof u&&("draft-04"===t.target||"openapi-3.0"===t.target?(n.minimum=u,n.exclusiveMinimum=!0):n.exclusiveMinimum=u),"number"==typeof i&&(n.minimum=i,"number"==typeof u&&"draft-04"!==t.target&&(u>=i?delete n.minimum:delete n.exclusiveMinimum)),"number"==typeof l&&("draft-04"===t.target||"openapi-3.0"===t.target?(n.maximum=l,n.exclusiveMaximum=!0):n.exclusiveMaximum=l),"number"==typeof a&&(n.maximum=a,"number"==typeof l&&"draft-04"!==t.target&&(l<=a?delete n.maximum:delete n.exclusiveMaximum)),"number"==typeof s&&(n.multipleOf=s)},$6=(e,t,n,r)=>{n.type="boolean"},$2=(e,t,n,r)=>{if("throw"===t.unrepresentable)throw Error("BigInt cannot be represented in JSON Schema")},$5=(e,t,n,r)=>{if("throw"===t.unrepresentable)throw Error("Symbols cannot be represented in JSON Schema")},$3=(e,t,n,r)=>{"openapi-3.0"===t.target?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},$9=(e,t,n,r)=>{if("throw"===t.unrepresentable)throw Error("Undefined cannot be represented in JSON Schema")},$8=(e,t,n,r)=>{if("throw"===t.unrepresentable)throw Error("Void cannot be represented in JSON Schema")},$7=(e,t,n,r)=>{n.not={}},we=(e,t,n,r)=>{},wt=(e,t,n,r)=>{},wn=(e,t,n,r)=>{if("throw"===t.unrepresentable)throw Error("Date cannot be represented in JSON Schema")},wr=(e,t,n,r)=>{let i=vt(e._zod.def.entries);i.every(e=>"number"==typeof e)&&(n.type="number"),i.every(e=>"string"==typeof e)&&(n.type="string"),n.enum=i},wi=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(void 0===e){if("throw"===t.unrepresentable)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if("bigint"==typeof e)if("throw"===t.unrepresentable)throw Error("BigInt literals cannot be represented in JSON Schema");else a.push(Number(e));else a.push(e);if(0===a.length);else if(1===a.length){let e=a[0];n.type=null===e?"null":typeof e,"draft-04"===t.target||"openapi-3.0"===t.target?n.enum=[e]:n.const=e}else a.every(e=>"number"==typeof e)&&(n.type="number"),a.every(e=>"string"==typeof e)&&(n.type="string"),a.every(e=>"boolean"==typeof e)&&(n.type="boolean"),a.every(e=>null===e)&&(n.type="null"),n.enum=a},wa=(e,t,n,r)=>{if("throw"===t.unrepresentable)throw Error("NaN cannot be represented in JSON Schema")},wo=(e,t,n,r)=>{let i=e._zod.pattern;if(!i)throw Error("Pattern not found in template literal");n.type="string",n.pattern=i.source},ws=(e,t,n,r)=>{let i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:o,mime:s}=e._zod.bag;void 0!==a&&(i.minLength=a),void 0!==o&&(i.maxLength=o),s?1===s.length?(i.contentMediaType=s[0],Object.assign(n,i)):(Object.assign(n,i),n.anyOf=s.map(e=>({contentMediaType:e}))):Object.assign(n,i)},wl=(e,t,n,r)=>{n.type="boolean"},wu=(e,t,n,r)=>{if("throw"===t.unrepresentable)throw Error("Custom types cannot be represented in JSON Schema")},wd=(e,t,n,r)=>{if("throw"===t.unrepresentable)throw Error("Function types cannot be represented in JSON Schema")},wc=(e,t,n,r)=>{if("throw"===t.unrepresentable)throw Error("Transforms cannot be represented in JSON Schema")},wm=(e,t,n,r)=>{if("throw"===t.unrepresentable)throw Error("Map cannot be represented in JSON Schema")},wf=(e,t,n,r)=>{if("throw"===t.unrepresentable)throw Error("Set cannot be represented in JSON Schema")},wp=(e,t,n,r)=>{let i=e._zod.def,{minimum:a,maximum:o}=e._zod.bag;"number"==typeof a&&(n.minItems=a),"number"==typeof o&&(n.maxItems=o),n.type="array",n.items=$K(i.element,t,{...r,path:[...r.path,"items"]})},wh=(e,t,n,r)=>{let i=e._zod.def;n.type="object",n.properties={};let a=i.shape;for(let e in a)n.properties[e]=$K(a[e],t,{...r,path:[...r.path,"properties",e]});let o=new Set([...new Set(Object.keys(a))].filter(e=>{let n=i.shape[e]._zod;return"input"===t.io?void 0===n.optin:void 0===n.optout}));o.size>0&&(n.required=Array.from(o)),i.catchall?._zod.def.type==="never"?n.additionalProperties=!1:i.catchall?i.catchall&&(n.additionalProperties=$K(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):"output"===t.io&&(n.additionalProperties=!1)},wg=(e,t,n,r)=>{let i=e._zod.def,a=!1===i.inclusive,o=i.options.map((e,n)=>$K(e,t,{...r,path:[...r.path,a?"oneOf":"anyOf",n]}));a?n.oneOf=o:n.anyOf=o},wv=(e,t,n,r)=>{let i=e._zod.def,a=$K(i.left,t,{...r,path:[...r.path,"allOf",0]}),o=$K(i.right,t,{...r,path:[...r.path,"allOf",1]}),s=e=>"allOf"in e&&1===Object.keys(e).length;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},wx=(e,t,n,r)=>{let i=e._zod.def;n.type="array";let a="draft-2020-12"===t.target?"prefixItems":"items",o="draft-2020-12"===t.target||"openapi-3.0"===t.target?"items":"additionalItems",s=i.items.map((e,n)=>$K(e,t,{...r,path:[...r.path,a,n]})),l=i.rest?$K(i.rest,t,{...r,path:[...r.path,o,..."openapi-3.0"===t.target?[i.items.length]:[]]}):null;"draft-2020-12"===t.target?(n.prefixItems=s,l&&(n.items=l)):"openapi-3.0"===t.target?(n.items={anyOf:s},l&&n.items.anyOf.push(l),n.minItems=s.length,l||(n.maxItems=s.length)):(n.items=s,l&&(n.additionalItems=l));let{minimum:u,maximum:d}=e._zod.bag;"number"==typeof u&&(n.minItems=u),"number"==typeof d&&(n.maxItems=d)},wy=(e,t,n,r)=>{let i=e._zod.def;n.type="object";let a=i.keyType,o=a._zod.bag,s=o?.patterns;if("loose"===i.mode&&s&&s.size>0){let e=$K(i.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});for(let t of(n.patternProperties={},s))n.patternProperties[t.source]=e}else("draft-07"===t.target||"draft-2020-12"===t.target)&&(n.propertyNames=$K(i.keyType,t,{...r,path:[...r.path,"propertyNames"]})),n.additionalProperties=$K(i.valueType,t,{...r,path:[...r.path,"additionalProperties"]});let l=a._zod.values;if(l){let e=[...l].filter(e=>"string"==typeof e||"number"==typeof e);e.length>0&&(n.required=e)}},wb=(e,t,n,r)=>{let i=e._zod.def,a=$K(i.innerType,t,r),o=t.seen.get(e);"openapi-3.0"===t.target?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:"null"}]},w_=(e,t,n,r)=>{let i=e._zod.def;$K(i.innerType,t,r),t.seen.get(e).ref=i.innerType},w$=(e,t,n,r)=>{let i=e._zod.def;$K(i.innerType,t,r),t.seen.get(e).ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},ww=(e,t,n,r)=>{let i=e._zod.def;$K(i.innerType,t,r),t.seen.get(e).ref=i.innerType,"input"===t.io&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},wk=(e,t,n,r)=>{let i,a=e._zod.def;$K(a.innerType,t,r),t.seen.get(e).ref=a.innerType;try{i=a.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}n.default=i},wS=(e,t,n,r)=>{let i=e._zod.def,a="input"===t.io?"transform"===i.in._zod.def.type?i.out:i.in:i.out;$K(a,t,r),t.seen.get(e).ref=a},wI=(e,t,n,r)=>{let i=e._zod.def;$K(i.innerType,t,r),t.seen.get(e).ref=i.innerType,n.readOnly=!0},wj=(e,t,n,r)=>{let i=e._zod.def;$K(i.innerType,t,r),t.seen.get(e).ref=i.innerType},wN=(e,t,n,r)=>{let i=e._zod.def;$K(i.innerType,t,r),t.seen.get(e).ref=i.innerType},wz=(e,t,n,r)=>{let i=e._zod.innerType;$K(i,t,r),t.seen.get(e).ref=i},wE={string:$1,number:$4,boolean:$6,bigint:$2,symbol:$5,null:$3,undefined:$9,void:$8,never:$7,any:we,unknown:wt,date:wn,enum:wr,literal:wi,nan:wa,template_literal:wo,file:ws,success:wl,custom:wu,function:wd,transform:wc,map:wm,set:wf,array:wp,object:wh,union:wg,intersection:wv,tuple:wx,record:wy,nullable:wb,nonoptional:w_,default:w$,prefault:ww,catch:wk,pipe:wS,readonly:wI,promise:wj,optional:wN,lazy:wz};function wO(e,t){if("_idmap"in e){let n=$G({...t,processors:wE}),r={};for(let t of e._idmap.entries()){let[e,r]=t;$K(r,n)}let i={};for(let a of(n.external={registry:e,uri:t?.uri,defs:r},e._idmap.entries())){let[e,t]=a;$q(n,t),i[e]=$Y(n,t)}return Object.keys(r).length>0&&(i.__shared={["draft-2020-12"===n.target?"$defs":"definitions"]:r}),{schemas:i}}let n=$G({...t,processors:wE});return $K(e,n),$q(n,e),$Y(n,e)}e.s([],92135),e.s(["ZodAny",()=>Si,"ZodArray",()=>Sp,"ZodBase64",()=>kD,"ZodBase64URL",()=>kP,"ZodBigInt",()=>k6,"ZodBigIntFormat",()=>k5,"ZodBoolean",()=>k1,"ZodCIDRv4",()=>kE,"ZodCIDRv6",()=>kT,"ZodCUID",()=>kp,"ZodCUID2",()=>kg,"ZodCatch",()=>S7,"ZodCodec",()=>Ia,"ZodCustom",()=>Iv,"ZodCustomStringFormat",()=>kF,"ZodDate",()=>Sm,"ZodDefault",()=>S1,"ZodDiscriminatedUnion",()=>SS,"ZodE164",()=>kA,"ZodEmail",()=>w8,"ZodEmoji",()=>kd,"ZodEnum",()=>SR,"ZodExactOptional",()=>Sq,"ZodFile",()=>SW,"ZodFunction",()=>Ih,"ZodGUID",()=>ke,"ZodIPv4",()=>kk,"ZodIPv6",()=>kN,"ZodIntersection",()=>Sj,"ZodJWT",()=>kL,"ZodKSUID",()=>k$,"ZodLazy",()=>Ic,"ZodLiteral",()=>SF,"ZodMAC",()=>kI,"ZodMap",()=>SU,"ZodNaN",()=>It,"ZodNanoID",()=>km,"ZodNever",()=>Sl,"ZodNonOptional",()=>S5,"ZodNull",()=>Sn,"ZodNullable",()=>SX,"ZodNumber",()=>kJ,"ZodNumberFormat",()=>kK,"ZodObject",()=>Sv,"ZodOptional",()=>SG,"ZodPipe",()=>Ir,"ZodPrefault",()=>S6,"ZodPromise",()=>If,"ZodReadonly",()=>Is,"ZodRecord",()=>SO,"ZodSet",()=>SZ,"ZodString",()=>w5,"ZodStringFormat",()=>w9,"ZodSuccess",()=>S9,"ZodSymbol",()=>k8,"ZodTemplateLiteral",()=>Iu,"ZodTransform",()=>SV,"ZodTuple",()=>Sz,"ZodType",()=>w6,"ZodULID",()=>kx,"ZodURL",()=>ks,"ZodUUID",()=>kn,"ZodUndefined",()=>Se,"ZodUnion",()=>S_,"ZodUnknown",()=>So,"ZodVoid",()=>Sd,"ZodXID",()=>kb,"ZodXor",()=>Sw,"_ZodString",()=>w2,"_default",()=>S4,"_function",()=>Ig,"any",()=>Sa,"array",()=>Sh,"base64",()=>kU,"base64url",()=>kZ,"bigint",()=>k2,"boolean",()=>k4,"catch",()=>Ie,"check",()=>Ix,"cidrv4",()=>kO,"cidrv6",()=>kC,"codec",()=>Io,"cuid",()=>kh,"cuid2",()=>kv,"custom",()=>Iy,"date",()=>Sf,"describe",()=>I$,"discriminatedUnion",()=>SI,"e164",()=>kR,"email",()=>w7,"emoji",()=>kc,"enum",()=>SL,"exactOptional",()=>SY,"file",()=>SH,"float32",()=>kY,"float64",()=>kX,"function",()=>Ig,"guid",()=>kt,"hash",()=>kV,"hex",()=>kH,"hostname",()=>kW,"httpUrl",()=>ku,"instanceof",()=>Ik,"int",()=>kq,"int32",()=>kQ,"int64",()=>k3,"intersection",()=>SN,"ipv4",()=>kS,"ipv6",()=>kz,"json",()=>II,"jwt",()=>kM,"keyof",()=>Sg,"ksuid",()=>kw,"lazy",()=>Im,"literal",()=>SB,"looseObject",()=>Sb,"looseRecord",()=>SD,"mac",()=>kj,"map",()=>SP,"meta",()=>Iw,"nan",()=>In,"nanoid",()=>kf,"nativeEnum",()=>SM,"never",()=>Su,"nonoptional",()=>S3,"null",()=>Sr,"nullable",()=>SQ,"nullish",()=>S0,"number",()=>kG,"object",()=>Sx,"optional",()=>SK,"partialRecord",()=>SC,"pipe",()=>Ii,"prefault",()=>S2,"preprocess",()=>Ij,"promise",()=>Ip,"readonly",()=>Il,"record",()=>ST,"refine",()=>Ib,"set",()=>SA,"strictObject",()=>Sy,"string",()=>w3,"stringFormat",()=>kB,"stringbool",()=>IS,"success",()=>S8,"superRefine",()=>I_,"symbol",()=>k7,"templateLiteral",()=>Id,"transform",()=>SJ,"tuple",()=>SE,"uint32",()=>k0,"uint64",()=>k9,"ulid",()=>ky,"undefined",()=>St,"union",()=>S$,"unknown",()=>Ss,"url",()=>kl,"uuid",()=>kr,"uuidv4",()=>ki,"uuidv6",()=>ka,"uuidv7",()=>ko,"void",()=>Sc,"xid",()=>k_,"xor",()=>Sk],62201);var wT=e.i(82358),wT=wT,wC=e.i(22143),wC=wC;e.s([],42332),e.s(["ZodISODate",()=>wP,"ZodISODateTime",()=>wD,"ZodISODuration",()=>wL,"ZodISOTime",()=>wA,"date",()=>wZ,"datetime",()=>wU,"duration",()=>wM,"time",()=>wR],49732);let wD=g5("ZodISODateTime",(e,t)=>{yO.init(e,t),w9.init(e,t)});function wU(e){return _w(wD,e)}let wP=g5("ZodISODate",(e,t)=>{yT.init(e,t),w9.init(e,t)});function wZ(e){return _k(wP,e)}let wA=g5("ZodISOTime",(e,t)=>{yC.init(e,t),w9.init(e,t)});function wR(e){return _S(wA,e)}let wL=g5("ZodISODuration",(e,t)=>{yD.init(e,t),w9.init(e,t)});function wM(e){return _I(wL,e)}let wF=(e,t)=>{vR.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>vF(e,t)},flatten:{value:t=>vM(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,vr,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,vr,2)}},isEmpty:{get:()=>0===e.issues.length}})},wB=g5("ZodError",wF),wW=g5("ZodError",wF,{Parent:Error});e.s(["ZodError",0,wB,"ZodRealError",0,wW],89282);let wH=vV(wW),wV=vG(wW),wJ=vq(wW),wG=vX(wW),wK=v0(wW),wq=v4(wW),wY=v2(wW),wX=v3(wW),wQ=v8(wW),w0=xe(wW),w1=xn(wW),w4=xi(wW);e.s(["decode",0,wq,"decodeAsync",0,wX,"encode",0,wK,"encodeAsync",0,wY,"parse",0,wH,"parseAsync",0,wV,"safeDecode",0,w0,"safeDecodeAsync",0,w4,"safeEncode",0,wQ,"safeEncodeAsync",0,w1,"safeParse",0,wJ,"safeParseAsync",0,wG],364);let w6=g5("ZodType",(e,t)=>(yv.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:$Q(e,"input"),output:$Q(e,"output")}}),e.toJSONSchema=$X(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(wC.mergeDefs(t,{checks:[...t.checks??[],...n.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]}),{parent:!0}),e.with=e.check,e.clone=(t,n)=>v$(e,t,n),e.brand=()=>e,e.register=(t,n)=>(t.add(e,n),e),e.parse=(t,n)=>wH(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>wJ(e,t,n),e.parseAsync=async(t,n)=>wV(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>wG(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>wK(e,t,n),e.decode=(t,n)=>wq(e,t,n),e.encodeAsync=async(t,n)=>wY(e,t,n),e.decodeAsync=async(t,n)=>wX(e,t,n),e.safeEncode=(t,n)=>wQ(e,t,n),e.safeDecode=(t,n)=>w0(e,t,n),e.safeEncodeAsync=async(t,n)=>w1(e,t,n),e.safeDecodeAsync=async(t,n)=>w4(e,t,n),e.refine=(t,n)=>e.check(Ib(t,n)),e.superRefine=t=>e.check(I_(t)),e.overwrite=t=>e.check($u(t)),e.optional=()=>SK(e),e.exactOptional=()=>SY(e),e.nullable=()=>SQ(e),e.nullish=()=>SK(SQ(e)),e.nonoptional=t=>S3(e,t),e.array=()=>Sh(e),e.or=t=>S$([e,t]),e.and=t=>SN(e,t),e.transform=t=>Ii(e,SJ(t)),e.default=t=>S4(e,t),e.prefault=t=>S2(e,t),e.catch=t=>Ie(e,t),e.pipe=t=>Ii(e,t),e.readonly=()=>Il(e),e.describe=t=>{let n=e.clone();return b3.add(n,{description:t}),n},Object.defineProperty(e,"description",{get:()=>b3.get(e)?.description,configurable:!0}),e.meta=(...t)=>{if(0===t.length)return b3.get(e);let n=e.clone();return b3.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),w2=g5("_ZodString",(e,t)=>{yx.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$1(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check($t(...t)),e.includes=(...t)=>e.check($i(...t)),e.startsWith=(...t)=>e.check($a(...t)),e.endsWith=(...t)=>e.check($o(...t)),e.min=(...t)=>e.check(_7(...t)),e.max=(...t)=>e.check(_8(...t)),e.length=(...t)=>e.check($e(...t)),e.nonempty=(...t)=>e.check(_7(1,...t)),e.lowercase=t=>e.check($n(t)),e.uppercase=t=>e.check($r(t)),e.trim=()=>e.check($c()),e.normalize=(...t)=>e.check($d(...t)),e.toLowerCase=()=>e.check($m()),e.toUpperCase=()=>e.check($f()),e.slugify=()=>e.check($p())}),w5=g5("ZodString",(e,t)=>{yx.init(e,t),w2.init(e,t),e.email=t=>e.check(b7(w8,t)),e.url=t=>e.check(_a(ks,t)),e.jwt=t=>e.check(__(kL,t)),e.emoji=t=>e.check(_o(kd,t)),e.guid=t=>e.check(_e(ke,t)),e.uuid=t=>e.check(_t(kn,t)),e.uuidv4=t=>e.check(_n(kn,t)),e.uuidv6=t=>e.check(_r(kn,t)),e.uuidv7=t=>e.check(_i(kn,t)),e.nanoid=t=>e.check(_s(km,t)),e.guid=t=>e.check(_e(ke,t)),e.cuid=t=>e.check(_l(kp,t)),e.cuid2=t=>e.check(_u(kg,t)),e.ulid=t=>e.check(_d(kx,t)),e.base64=t=>e.check(_x(kD,t)),e.base64url=t=>e.check(_y(kP,t)),e.xid=t=>e.check(_c(kb,t)),e.ksuid=t=>e.check(_m(k$,t)),e.ipv4=t=>e.check(_f(kk,t)),e.ipv6=t=>e.check(_p(kN,t)),e.cidrv4=t=>e.check(_g(kE,t)),e.cidrv6=t=>e.check(_v(kT,t)),e.e164=t=>e.check(_b(kA,t)),e.datetime=t=>e.check(wU(t)),e.date=t=>e.check(wZ(t)),e.time=t=>e.check(wR(t)),e.duration=t=>e.check(wM(t))});function w3(e){return b9(w5,e)}let w9=g5("ZodStringFormat",(e,t)=>{yy.init(e,t),w2.init(e,t)}),w8=g5("ZodEmail",(e,t)=>{y$.init(e,t),w9.init(e,t)});function w7(e){return b7(w8,e)}let ke=g5("ZodGUID",(e,t)=>{yb.init(e,t),w9.init(e,t)});function kt(e){return _e(ke,e)}let kn=g5("ZodUUID",(e,t)=>{y_.init(e,t),w9.init(e,t)});function kr(e){return _t(kn,e)}function ki(e){return _n(kn,e)}function ka(e){return _r(kn,e)}function ko(e){return _i(kn,e)}let ks=g5("ZodURL",(e,t)=>{yw.init(e,t),w9.init(e,t)});function kl(e){return _a(ks,e)}function ku(e){return _a(ks,{protocol:/^https?$/,hostname:wT.domain,...wC.normalizeParams(e)})}let kd=g5("ZodEmoji",(e,t)=>{yk.init(e,t),w9.init(e,t)});function kc(e){return _o(kd,e)}let km=g5("ZodNanoID",(e,t)=>{yS.init(e,t),w9.init(e,t)});function kf(e){return _s(km,e)}let kp=g5("ZodCUID",(e,t)=>{yI.init(e,t),w9.init(e,t)});function kh(e){return _l(kp,e)}let kg=g5("ZodCUID2",(e,t)=>{yj.init(e,t),w9.init(e,t)});function kv(e){return _u(kg,e)}let kx=g5("ZodULID",(e,t)=>{yN.init(e,t),w9.init(e,t)});function ky(e){return _d(kx,e)}let kb=g5("ZodXID",(e,t)=>{yz.init(e,t),w9.init(e,t)});function k_(e){return _c(kb,e)}let k$=g5("ZodKSUID",(e,t)=>{yE.init(e,t),w9.init(e,t)});function kw(e){return _m(k$,e)}let kk=g5("ZodIPv4",(e,t)=>{yU.init(e,t),w9.init(e,t)});function kS(e){return _f(kk,e)}let kI=g5("ZodMAC",(e,t)=>{yZ.init(e,t),w9.init(e,t)});function kj(e){return _h(kI,e)}let kN=g5("ZodIPv6",(e,t)=>{yP.init(e,t),w9.init(e,t)});function kz(e){return _p(kN,e)}let kE=g5("ZodCIDRv4",(e,t)=>{yA.init(e,t),w9.init(e,t)});function kO(e){return _g(kE,e)}let kT=g5("ZodCIDRv6",(e,t)=>{yR.init(e,t),w9.init(e,t)});function kC(e){return _v(kT,e)}let kD=g5("ZodBase64",(e,t)=>{yM.init(e,t),w9.init(e,t)});function kU(e){return _x(kD,e)}let kP=g5("ZodBase64URL",(e,t)=>{yB.init(e,t),w9.init(e,t)});function kZ(e){return _y(kP,e)}let kA=g5("ZodE164",(e,t)=>{yW.init(e,t),w9.init(e,t)});function kR(e){return _b(kA,e)}let kL=g5("ZodJWT",(e,t)=>{yV.init(e,t),w9.init(e,t)});function kM(e){return __(kL,e)}let kF=g5("ZodCustomStringFormat",(e,t)=>{yJ.init(e,t),w9.init(e,t)});function kB(e,t,n={}){return $J(kF,e,t,n)}function kW(e){return $J(kF,"hostname",wT.hostname,e)}function kH(e){return $J(kF,"hex",wT.hex,e)}function kV(e,t){let n=t?.enc??"hex",r=`${e}_${n}`,i=wT[r];if(!i)throw Error(`Unrecognized hash format: ${r}`);return $J(kF,r,i,t)}let kJ=g5("ZodNumber",(e,t)=>{yG.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$4(e,t,n,r),e.gt=(t,n)=>e.check(_X(t,n)),e.gte=(t,n)=>e.check(_Q(t,n)),e.min=(t,n)=>e.check(_Q(t,n)),e.lt=(t,n)=>e.check(_q(t,n)),e.lte=(t,n)=>e.check(_Y(t,n)),e.max=(t,n)=>e.check(_Y(t,n)),e.int=t=>e.check(kq(t)),e.safe=t=>e.check(kq(t)),e.positive=t=>e.check(_X(0,t)),e.nonnegative=t=>e.check(_Q(0,t)),e.negative=t=>e.check(_q(0,t)),e.nonpositive=t=>e.check(_Y(0,t)),e.multipleOf=(t,n)=>e.check(_2(t,n)),e.step=(t,n)=>e.check(_2(t,n)),e.finite=()=>e;let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function kG(e){return _j(kJ,e)}let kK=g5("ZodNumberFormat",(e,t)=>{yK.init(e,t),kJ.init(e,t)});function kq(e){return _z(kK,e)}function kY(e){return _E(kK,e)}function kX(e){return _O(kK,e)}function kQ(e){return _T(kK,e)}function k0(e){return _C(kK,e)}let k1=g5("ZodBoolean",(e,t)=>{yq.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$6(e,t,n,r)});function k4(e){return _D(k1,e)}let k6=g5("ZodBigInt",(e,t)=>{yY.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$2(e,t,n,r),e.gte=(t,n)=>e.check(_Q(t,n)),e.min=(t,n)=>e.check(_Q(t,n)),e.gt=(t,n)=>e.check(_X(t,n)),e.gte=(t,n)=>e.check(_Q(t,n)),e.min=(t,n)=>e.check(_Q(t,n)),e.lt=(t,n)=>e.check(_q(t,n)),e.lte=(t,n)=>e.check(_Y(t,n)),e.max=(t,n)=>e.check(_Y(t,n)),e.positive=t=>e.check(_X(BigInt(0),t)),e.negative=t=>e.check(_q(BigInt(0),t)),e.nonpositive=t=>e.check(_Y(BigInt(0),t)),e.nonnegative=t=>e.check(_Q(BigInt(0),t)),e.multipleOf=(t,n)=>e.check(_2(t,n));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function k2(e){return _P(k6,e)}let k5=g5("ZodBigIntFormat",(e,t)=>{yX.init(e,t),k6.init(e,t)});function k3(e){return _A(k5,e)}function k9(e){return _R(k5,e)}let k8=g5("ZodSymbol",(e,t)=>{yQ.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$5(e,t,n,r)});function k7(e){return _L(k8,e)}let Se=g5("ZodUndefined",(e,t)=>{y0.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$9(e,t,n,r)});function St(e){return _M(Se,e)}let Sn=g5("ZodNull",(e,t)=>{y1.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$3(e,t,n,r)});function Sr(e){return _F(Sn,e)}let Si=g5("ZodAny",(e,t)=>{y4.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>we(e,t,n,r)});function Sa(){return _B(Si)}let So=g5("ZodUnknown",(e,t)=>{y6.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wt(e,t,n,r)});function Ss(){return _W(So)}let Sl=g5("ZodNever",(e,t)=>{y2.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$7(e,t,n,r)});function Su(e){return _H(Sl,e)}let Sd=g5("ZodVoid",(e,t)=>{y5.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$8(e,t,n,r)});function Sc(e){return _V(Sd,e)}let Sm=g5("ZodDate",(e,t)=>{y3.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wn(e,t,n,r),e.min=(t,n)=>e.check(_Q(t,n)),e.max=(t,n)=>e.check(_Y(t,n));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function Sf(e){return _J(Sm,e)}let Sp=g5("ZodArray",(e,t)=>{y8.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wp(e,t,n,r),e.element=t.element,e.min=(t,n)=>e.check(_7(t,n)),e.nonempty=t=>e.check(_7(1,t)),e.max=(t,n)=>e.check(_8(t,n)),e.length=(t,n)=>e.check($e(t,n)),e.unwrap=()=>e.element});function Sh(e,t){return $h(Sp,e,t)}function Sg(e){return SL(Object.keys(e._zod.def.shape))}let Sv=g5("ZodObject",(e,t)=>{br.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wh(e,t,n,r),wC.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>SL(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Ss()}),e.loose=()=>e.clone({...e._zod.def,catchall:Ss()}),e.strict=()=>e.clone({...e._zod.def,catchall:Su()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>wC.extend(e,t),e.safeExtend=t=>wC.safeExtend(e,t),e.merge=t=>wC.merge(e,t),e.pick=t=>wC.pick(e,t),e.omit=t=>wC.omit(e,t),e.partial=(...t)=>wC.partial(SG,e,t[0]),e.required=(...t)=>wC.required(S5,e,t[0])});function Sx(e,t){return new Sv({type:"object",shape:e??{},...wC.normalizeParams(t)})}function Sy(e,t){return new Sv({type:"object",shape:e,catchall:Su(),...wC.normalizeParams(t)})}function Sb(e,t){return new Sv({type:"object",shape:e,catchall:Ss(),...wC.normalizeParams(t)})}let S_=g5("ZodUnion",(e,t)=>{ba.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wg(e,t,n,r),e.options=t.options});function S$(e,t){return new S_({type:"union",options:e,...wC.normalizeParams(t)})}let Sw=g5("ZodXor",(e,t)=>{S_.init(e,t),bs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wg(e,t,n,r),e.options=t.options});function Sk(e,t){return new Sw({type:"union",options:e,inclusive:!1,...wC.normalizeParams(t)})}let SS=g5("ZodDiscriminatedUnion",(e,t)=>{S_.init(e,t),bl.init(e,t)});function SI(e,t,n){return new SS({type:"union",options:t,discriminator:e,...wC.normalizeParams(n)})}let Sj=g5("ZodIntersection",(e,t)=>{bu.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wv(e,t,n,r)});function SN(e,t){return new Sj({type:"intersection",left:e,right:t})}let Sz=g5("ZodTuple",(e,t)=>{bc.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wx(e,t,n,r),e.rest=t=>e.clone({...e._zod.def,rest:t})});function SE(e,t,n){let r=t instanceof yv,i=r?n:t;return new Sz({type:"tuple",items:e,rest:r?t:null,...wC.normalizeParams(i)})}let SO=g5("ZodRecord",(e,t)=>{bf.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wy(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function ST(e,t,n){return new SO({type:"record",keyType:e,valueType:t,...wC.normalizeParams(n)})}function SC(e,t,n){let r=v$(e);return r._zod.values=void 0,new SO({type:"record",keyType:r,valueType:t,...wC.normalizeParams(n)})}function SD(e,t,n){return new SO({type:"record",keyType:e,valueType:t,mode:"loose",...wC.normalizeParams(n)})}let SU=g5("ZodMap",(e,t)=>{bp.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wm(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...t)=>e.check(_3(...t)),e.nonempty=t=>e.check(_3(1,t)),e.max=(...t)=>e.check(_5(...t)),e.size=(...t)=>e.check(_9(...t))});function SP(e,t,n){return new SU({type:"map",keyType:e,valueType:t,...wC.normalizeParams(n)})}let SZ=g5("ZodSet",(e,t)=>{bg.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wf(e,t,n,r),e.min=(...t)=>e.check(_3(...t)),e.nonempty=t=>e.check(_3(1,t)),e.max=(...t)=>e.check(_5(...t)),e.size=(...t)=>e.check(_9(...t))});function SA(e,t){return new SZ({type:"set",valueType:e,...wC.normalizeParams(t)})}let SR=g5("ZodEnum",(e,t)=>{bx.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wr(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new SR({...t,checks:[],...wC.normalizeParams(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 SR({...t,checks:[],...wC.normalizeParams(r),entries:i})}});function SL(e,t){return new SR({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...wC.normalizeParams(t)})}function SM(e,t){return new SR({type:"enum",entries:e,...wC.normalizeParams(t)})}let SF=g5("ZodLiteral",(e,t)=>{by.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wi(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 SB(e,t){return new SF({type:"literal",values:Array.isArray(e)?e:[e],...wC.normalizeParams(t)})}let SW=g5("ZodFile",(e,t)=>{bb.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ws(e,t,n,r),e.min=(t,n)=>e.check(_3(t,n)),e.max=(t,n)=>e.check(_5(t,n)),e.mime=(t,n)=>e.check($l(Array.isArray(t)?t:[t],n))});function SH(e){return $j(SW,e)}let SV=g5("ZodTransform",(e,t)=>{b_.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wc(e,t,n,r),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new g8(e.constructor.name);n.addIssue=r=>{"string"==typeof r?n.issues.push(wC.issue(r,n.value,t)):(r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=n.value),r.inst??(r.inst=e),n.issues.push(wC.issue(r)))};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function SJ(e){return new SV({type:"transform",transform:e})}let SG=g5("ZodOptional",(e,t)=>{bw.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wN(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function SK(e){return new SG({type:"optional",innerType:e})}let Sq=g5("ZodExactOptional",(e,t)=>{bk.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wN(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function SY(e){return new Sq({type:"optional",innerType:e})}let SX=g5("ZodNullable",(e,t)=>{bS.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wb(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function SQ(e){return new SX({type:"nullable",innerType:e})}function S0(e){return SK(SQ(e))}let S1=g5("ZodDefault",(e,t)=>{bI.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>w$(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function S4(e,t){return new S1({type:"default",innerType:e,get defaultValue(){return"function"==typeof t?t():wC.shallowClone(t)}})}let S6=g5("ZodPrefault",(e,t)=>{bN.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ww(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function S2(e,t){return new S6({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof t?t():wC.shallowClone(t)}})}let S5=g5("ZodNonOptional",(e,t)=>{bz.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>w_(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function S3(e,t){return new S5({type:"nonoptional",innerType:e,...wC.normalizeParams(t)})}let S9=g5("ZodSuccess",(e,t)=>{bO.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wl(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function S8(e){return new S9({type:"success",innerType:e})}let S7=g5("ZodCatch",(e,t)=>{bT.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wk(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Ie(e,t){return new S7({type:"catch",innerType:e,catchValue:"function"==typeof t?t:()=>t})}let It=g5("ZodNaN",(e,t)=>{bC.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wa(e,t,n,r)});function In(e){return _K(It,e)}let Ir=g5("ZodPipe",(e,t)=>{bD.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wS(e,t,n,r),e.in=t.in,e.out=t.out});function Ii(e,t){return new Ir({type:"pipe",in:e,out:t})}let Ia=g5("ZodCodec",(e,t)=>{Ir.init(e,t),bP.init(e,t)});function Io(e,t,n){return new Ia({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}let Is=g5("ZodReadonly",(e,t)=>{bR.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wI(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Il(e){return new Is({type:"readonly",innerType:e})}let Iu=g5("ZodTemplateLiteral",(e,t)=>{bM.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wo(e,t,n,r)});function Id(e,t){return new Iu({type:"template_literal",parts:e,...wC.normalizeParams(t)})}let Ic=g5("ZodLazy",(e,t)=>{bW.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wz(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function Im(e){return new Ic({type:"lazy",getter:e})}let If=g5("ZodPromise",(e,t)=>{bB.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wj(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ip(e){return new If({type:"promise",innerType:e})}let Ih=g5("ZodFunction",(e,t)=>{bF.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wd(e,t,n,r)});function Ig(e){return new Ih({type:"function",input:Array.isArray(e?.input)?SE(e?.input):e?.input??Sh(Ss()),output:e?.output??Ss()})}let Iv=g5("ZodCustom",(e,t)=>{bH.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wu(e,t,n,r)});function Ix(e){let t=new x1({check:"custom"});return t._zod.check=e,t}function Iy(e,t){return $L(Iv,e??(()=>!0),t)}function Ib(e,t={}){return $M(Iv,e,t)}function I_(e){return $F(e)}let I$=$W,Iw=$H;function Ik(e,t={}){let n=new Iv({type:"custom",check:"custom",fn:t=>t instanceof e,abort:!0,...wC.normalizeParams(t)});return n._zod.bag.Class=e,n._zod.check=t=>{t.value instanceof e||t.issues.push({code:"invalid_type",expected:e.name,input:t.value,inst:n,path:[...n._zod.def.path??[]]})},n}let IS=(...e)=>$V({Codec:Ia,Boolean:k1,String:w5},...e);function II(e){let t=Im(()=>S$([w3(e),kG(),k4(),Sr(),Sh(t),ST(w3(),t)]));return t}function Ij(e,t){return Ii(SJ(e),t)}let IN={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function Iz(e){ve({customError:e})}function IE(){return ve().customError}jq||(jq={}),e.s(["ZodFirstPartyTypeKind",0,jq,"ZodIssueCode",0,IN,"getErrorMap",0,IE,"setErrorMap",0,Iz],6034),e.i(42332),e.s(["endsWith",0,$o,"gt",0,_X,"gte",0,_Q,"includes",0,$i,"length",0,$e,"lowercase",0,$n,"lt",0,_q,"lte",0,_Y,"maxLength",0,_8,"maxSize",0,_5,"mime",0,$l,"minLength",0,_7,"minSize",0,_3,"multipleOf",0,_2,"negative",0,_1,"nonnegative",0,_6,"nonpositive",0,_4,"normalize",0,$d,"overwrite",0,$u,"positive",0,_0,"property",0,$s,"regex",0,$t,"size",0,_9,"slugify",0,$p,"startsWith",0,$a,"toLowerCase",0,$m,"toUpperCase",0,$f,"trim",0,$c,"uppercase",0,$r],30421);var IO=e.i(30421),IT=e.i(49732);let IC={...e.i(62201),...IO,iso:IT},ID=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);e.s(["bigint",0,function(e){return _Z(k6,e)},"boolean",0,function(e){return _U(k1,e)},"date",0,function(e){return _G(Sm,e)},"number",0,function(e){return _N(kJ,e)},"string",0,function(e){return b8(w5,e)}],13657),ve(bG()),e.s([],98821),e.i(98821),e.i(92135),e.i(97753),e.i(3108),e.i(74969),e.i(76094),e.s(["$ZodAny",0,y4,"$ZodArray",0,y8,"$ZodBase64",0,yM,"$ZodBase64URL",0,yB,"$ZodBigInt",0,yY,"$ZodBigIntFormat",0,yX,"$ZodBoolean",0,yq,"$ZodCIDRv4",0,yA,"$ZodCIDRv6",0,yR,"$ZodCUID",0,yI,"$ZodCUID2",0,yj,"$ZodCatch",0,bT,"$ZodCodec",0,bP,"$ZodCustom",0,bH,"$ZodCustomStringFormat",0,yJ,"$ZodDate",0,y3,"$ZodDefault",0,bI,"$ZodDiscriminatedUnion",0,bl,"$ZodE164",0,yW,"$ZodEmail",0,y$,"$ZodEmoji",0,yk,"$ZodEnum",0,bx,"$ZodExactOptional",0,bk,"$ZodFile",0,bb,"$ZodFunction",0,bF,"$ZodGUID",0,yb,"$ZodIPv4",0,yU,"$ZodIPv6",0,yP,"$ZodISODate",0,yT,"$ZodISODateTime",0,yO,"$ZodISODuration",0,yD,"$ZodISOTime",0,yC,"$ZodIntersection",0,bu,"$ZodJWT",0,yV,"$ZodKSUID",0,yE,"$ZodLazy",0,bW,"$ZodLiteral",0,by,"$ZodMAC",0,yZ,"$ZodMap",0,bp,"$ZodNaN",0,bC,"$ZodNanoID",0,yS,"$ZodNever",0,y2,"$ZodNonOptional",0,bz,"$ZodNull",0,y1,"$ZodNullable",0,bS,"$ZodNumber",0,yG,"$ZodNumberFormat",0,yK,"$ZodObject",0,bn,"$ZodObjectJIT",0,br,"$ZodOptional",0,bw,"$ZodPipe",0,bD,"$ZodPrefault",0,bN,"$ZodPromise",0,bB,"$ZodReadonly",0,bR,"$ZodRecord",0,bf,"$ZodSet",0,bg,"$ZodString",0,yx,"$ZodStringFormat",0,yy,"$ZodSuccess",0,bO,"$ZodSymbol",0,yQ,"$ZodTemplateLiteral",0,bM,"$ZodTransform",0,b_,"$ZodTuple",0,bc,"$ZodType",0,yv,"$ZodULID",0,yN,"$ZodURL",0,yw,"$ZodUUID",0,y_,"$ZodUndefined",0,y0,"$ZodUnion",0,ba,"$ZodUnknown",0,y6,"$ZodVoid",0,y5,"$ZodXID",0,yz,"$ZodXor",0,bs,"clone",0,v$,"isValidBase64",0,yL,"isValidBase64URL",0,yF,"isValidJWT",0,yH],32952),e.i(32952),e.i(55605),e.i(98477);var IU=wC,IP=wT;e.i(43365),e.s(["ar",0,function(){let e,t,n;return{localeError:(e={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}},t={regex:"مدخل",email:"بريد إلكتروني",url:"رابط",emoji:"إيموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاريخ ووقت بمعيار ISO",date:"تاريخ بمعيار ISO",time:"وقت بمعيار ISO",duration:"مدة بمعيار ISO",ipv4:"عنوان IPv4",ipv6:"عنوان IPv6",cidrv4:"مدى عناوين بصيغة IPv4",cidrv6:"مدى عناوين بصيغة IPv6",base64:"نَص بترميز base64-encoded",base64url:"نَص بترميز base64url-encoded",json_string:"نَص على هيئة JSON",e164:"رقم هاتف بمعيار E.164",jwt:"JWT",template_literal:"مدخل"},n={nan:"NaN"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`مدخلات غير مقبولة: يفترض إدخال instanceof ${r.expected}، ولكن تم إدخال ${i}`;return`مدخلات غير مقبولة: يفترض إدخال ${e}، ولكن تم إدخال ${i}`}case"invalid_value":if(1===r.values.length)return`مدخلات غير مقبولة: يفترض إدخال ${vk(r.values[0])}`;return`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return` أكبر من اللازم: يفترض أن تكون ${r.origin??"القيمة"} ${t} ${r.maximum.toString()} ${n.unit??"عنصر"}`;return`أكبر من اللازم: يفترض أن تكون ${r.origin??"القيمة"} ${t} ${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`أصغر من اللازم: يفترض لـ ${r.origin} أن يكون ${t} ${r.minimum.toString()} ${n.unit}`;return`أصغر من اللازم: يفترض لـ ${r.origin} أن يكون ${t} ${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`نَص غير مقبول: يجب أن يبدأ بـ "${r.prefix}"`;if("ends_with"===r.format)return`نَص غير مقبول: يجب أن ينتهي بـ "${r.suffix}"`;if("includes"===r.format)return`نَص غير مقبول: يجب أن يتضمَّن "${r.includes}"`;if("regex"===r.format)return`نَص غير مقبول: يجب أن يطابق النمط ${r.pattern}`;return`${t[r.format]??r.format} غير مقبول`;case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${r.divisor}`;case"unrecognized_keys":return`معرف${r.keys.length>1?"ات":""} غريب${r.keys.length>1?"ة":""}: ${vn(r.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${r.origin}`;case"invalid_union":default:return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${r.origin}`}})}},"az",0,function(){let e,t,n;return{localeError:(e={string:{unit:"simvol",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"element",verb:"olmalıdır"},set:{unit:"element",verb:"olmalıdır"}},t={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},n={nan:"NaN"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Yanlış dəyər: g\xf6zlənilən instanceof ${r.expected}, daxil olan ${i}`;return`Yanlış dəyər: g\xf6zlənilən ${e}, daxil olan ${i}`}case"invalid_value":if(1===r.values.length)return`Yanlış dəyər: g\xf6zlənilən ${vk(r.values[0])}`;return`Yanlış se\xe7im: aşağıdakılardan biri olmalıdır: ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`\xc7ox b\xf6y\xfck: g\xf6zlənilən ${r.origin??"dəyər"} ${t}${r.maximum.toString()} ${n.unit??"element"}`;return`\xc7ox b\xf6y\xfck: g\xf6zlənilən ${r.origin??"dəyər"} ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`\xc7ox ki\xe7ik: g\xf6zlənilən ${r.origin} ${t}${r.minimum.toString()} ${n.unit}`;return`\xc7ox ki\xe7ik: g\xf6zlənilən ${r.origin} ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Yanlış mətn: "${r.prefix}" ilə başlamalıdır`;if("ends_with"===r.format)return`Yanlış mətn: "${r.suffix}" ilə bitməlidir`;if("includes"===r.format)return`Yanlış mətn: "${r.includes}" daxil olmalıdır`;if("regex"===r.format)return`Yanlış mətn: ${r.pattern} şablonuna uyğun olmalıdır`;return`Yanlış ${t[r.format]??r.format}`;case"not_multiple_of":return`Yanlış ədəd: ${r.divisor} ilə b\xf6l\xfcnə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan a\xe7ar${r.keys.length>1?"lar":""}: ${vn(r.keys,", ")}`;case"invalid_key":return`${r.origin} daxilində yanlış a\xe7ar`;case"invalid_union":default:return"Yanlış dəyər";case"invalid_element":return`${r.origin} daxilində yanlış dəyər`}})}},"be",0,function(){let e,t,n;return{localeError:(e={string:{unit:{one:"сімвал",few:"сімвалы",many:"сімвалаў"},verb:"мець"},array:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},set:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},file:{unit:{one:"байт",few:"байты",many:"байтаў"},verb:"мець"}},t={regex:"увод",email:"email адрас",url:"URL",emoji:"эмодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата і час",date:"ISO дата",time:"ISO час",duration:"ISO працягласць",ipv4:"IPv4 адрас",ipv6:"IPv6 адрас",cidrv4:"IPv4 дыяпазон",cidrv6:"IPv6 дыяпазон",base64:"радок у фармаце base64",base64url:"радок у фармаце base64url",json_string:"JSON радок",e164:"нумар E.164",jwt:"JWT",template_literal:"увод"},n={nan:"NaN",number:"лік",array:"масіў"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Няправільны ўвод: чакаўся instanceof ${r.expected}, атрымана ${i}`;return`Няправільны ўвод: чакаўся ${e}, атрымана ${i}`}case"invalid_value":if(1===r.values.length)return`Няправільны ўвод: чакалася ${vk(r.values[0])}`;return`Няправільны варыянт: чакаўся адзін з ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n){let e=bJ(Number(r.maximum),n.unit.one,n.unit.few,n.unit.many);return`Занадта вялікі: чакалася, што ${r.origin??"значэнне"} павінна ${n.verb} ${t}${r.maximum.toString()} ${e}`}return`Занадта вялікі: чакалася, што ${r.origin??"значэнне"} павінна быць ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n){let e=bJ(Number(r.minimum),n.unit.one,n.unit.few,n.unit.many);return`Занадта малы: чакалася, што ${r.origin} павінна ${n.verb} ${t}${r.minimum.toString()} ${e}`}return`Занадта малы: чакалася, што ${r.origin} павінна быць ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Няправільны радок: павінен пачынацца з "${r.prefix}"`;if("ends_with"===r.format)return`Няправільны радок: павінен заканчвацца на "${r.suffix}"`;if("includes"===r.format)return`Няправільны радок: павінен змяшчаць "${r.includes}"`;if("regex"===r.format)return`Няправільны радок: павінен адпавядаць шаблону ${r.pattern}`;return`Няправільны ${t[r.format]??r.format}`;case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${r.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${r.keys.length>1?"ключы":"ключ"}: ${vn(r.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${r.origin}`;case"invalid_union":default:return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${r.origin}`}})}},"bg",0,function(){let e,t,n;return{localeError:(e={string:{unit:"символа",verb:"да съдържа"},file:{unit:"байта",verb:"да съдържа"},array:{unit:"елемента",verb:"да съдържа"},set:{unit:"елемента",verb:"да съдържа"}},t={regex:"вход",email:"имейл адрес",url:"URL",emoji:"емоджи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO време",date:"ISO дата",time:"ISO време",duration:"ISO продължителност",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"base64-кодиран низ",base64url:"base64url-кодиран низ",json_string:"JSON низ",e164:"E.164 номер",jwt:"JWT",template_literal:"вход"},n={nan:"NaN",number:"число",array:"масив"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Невалиден вход: очакван instanceof ${r.expected}, получен ${i}`;return`Невалиден вход: очакван ${e}, получен ${i}`}case"invalid_value":if(1===r.values.length)return`Невалиден вход: очакван ${vk(r.values[0])}`;return`Невалидна опция: очаквано едно от ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Твърде голямо: очаква се ${r.origin??"стойност"} да съдържа ${t}${r.maximum.toString()} ${n.unit??"елемента"}`;return`Твърде голямо: очаква се ${r.origin??"стойност"} да бъде ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Твърде малко: очаква се ${r.origin} да съдържа ${t}${r.minimum.toString()} ${n.unit}`;return`Твърде малко: очаква се ${r.origin} да бъде ${t}${r.minimum.toString()}`}case"invalid_format":{if("starts_with"===r.format)return`Невалиден низ: трябва да започва с "${r.prefix}"`;if("ends_with"===r.format)return`Невалиден низ: трябва да завършва с "${r.suffix}"`;if("includes"===r.format)return`Невалиден низ: трябва да включва "${r.includes}"`;if("regex"===r.format)return`Невалиден низ: трябва да съвпада с ${r.pattern}`;let e="Невалиден";return"emoji"===r.format&&(e="Невалидно"),"datetime"===r.format&&(e="Невалидно"),"date"===r.format&&(e="Невалидна"),"time"===r.format&&(e="Невалидно"),"duration"===r.format&&(e="Невалидна"),`${e} ${t[r.format]??r.format}`}case"not_multiple_of":return`Невалидно число: трябва да бъде кратно на ${r.divisor}`;case"unrecognized_keys":return`Неразпознат${r.keys.length>1?"и":""} ключ${r.keys.length>1?"ове":""}: ${vn(r.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${r.origin}`;case"invalid_union":default:return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${r.origin}`}})}},"ca",0,function(){let e,t,n;return{localeError:(e={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}},t={regex:"entrada",email:"adreça electrònica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adreça IPv4",ipv6:"adreça IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},n={nan:"NaN"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Tipus inv\xe0lid: s'esperava instanceof ${r.expected}, s'ha rebut ${i}`;return`Tipus inv\xe0lid: s'esperava ${e}, s'ha rebut ${i}`}case"invalid_value":if(1===r.values.length)return`Valor inv\xe0lid: s'esperava ${vk(r.values[0])}`;return`Opci\xf3 inv\xe0lida: s'esperava una de ${vn(r.values," o ")}`;case"too_big":{let t=r.inclusive?"com a màxim":"menys de",n=e[r.origin]??null;if(n)return`Massa gran: s'esperava que ${r.origin??"el valor"} contingu\xe9s ${t} ${r.maximum.toString()} ${n.unit??"elements"}`;return`Massa gran: s'esperava que ${r.origin??"el valor"} fos ${t} ${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?"com a mínim":"més de",n=e[r.origin]??null;if(n)return`Massa petit: s'esperava que ${r.origin} contingu\xe9s ${t} ${r.minimum.toString()} ${n.unit}`;return`Massa petit: s'esperava que ${r.origin} fos ${t} ${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Format inv\xe0lid: ha de comen\xe7ar amb "${r.prefix}"`;if("ends_with"===r.format)return`Format inv\xe0lid: ha d'acabar amb "${r.suffix}"`;if("includes"===r.format)return`Format inv\xe0lid: ha d'incloure "${r.includes}"`;if("regex"===r.format)return`Format inv\xe0lid: ha de coincidir amb el patr\xf3 ${r.pattern}`;return`Format inv\xe0lid per a ${t[r.format]??r.format}`;case"not_multiple_of":return`N\xfamero inv\xe0lid: ha de ser m\xfaltiple de ${r.divisor}`;case"unrecognized_keys":return`Clau${r.keys.length>1?"s":""} no reconeguda${r.keys.length>1?"s":""}: ${vn(r.keys,", ")}`;case"invalid_key":return`Clau inv\xe0lida a ${r.origin}`;case"invalid_union":default:return"Entrada invàlida";case"invalid_element":return`Element inv\xe0lid a ${r.origin}`}})}},"cs",0,function(){let e,t,n;return{localeError:(e={string:{unit:"znaků",verb:"mít"},file:{unit:"bajtů",verb:"mít"},array:{unit:"prvků",verb:"mít"},set:{unit:"prvků",verb:"mít"}},t={regex:"regulární výraz",email:"e-mailová adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a čas ve formátu ISO",date:"datum ve formátu ISO",time:"čas ve formátu ISO",duration:"doba trvání ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"řetězec zakódovaný ve formátu base64",base64url:"řetězec zakódovaný ve formátu base64url",json_string:"řetězec ve formátu JSON",e164:"číslo E.164",jwt:"JWT",template_literal:"vstup"},n={nan:"NaN",number:"číslo",string:"řetězec",function:"funkce",array:"pole"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Neplatn\xfd vstup: oček\xe1v\xe1no instanceof ${r.expected}, obdrženo ${i}`;return`Neplatn\xfd vstup: oček\xe1v\xe1no ${e}, obdrženo ${i}`}case"invalid_value":if(1===r.values.length)return`Neplatn\xfd vstup: oček\xe1v\xe1no ${vk(r.values[0])}`;return`Neplatn\xe1 možnost: oček\xe1v\xe1na jedna z hodnot ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Hodnota je př\xedliš velk\xe1: ${r.origin??"hodnota"} mus\xed m\xedt ${t}${r.maximum.toString()} ${n.unit??"prvků"}`;return`Hodnota je př\xedliš velk\xe1: ${r.origin??"hodnota"} mus\xed b\xfdt ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Hodnota je př\xedliš mal\xe1: ${r.origin??"hodnota"} mus\xed m\xedt ${t}${r.minimum.toString()} ${n.unit??"prvků"}`;return`Hodnota je př\xedliš mal\xe1: ${r.origin??"hodnota"} mus\xed b\xfdt ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Neplatn\xfd řetězec: mus\xed zač\xednat na "${r.prefix}"`;if("ends_with"===r.format)return`Neplatn\xfd řetězec: mus\xed končit na "${r.suffix}"`;if("includes"===r.format)return`Neplatn\xfd řetězec: mus\xed obsahovat "${r.includes}"`;if("regex"===r.format)return`Neplatn\xfd řetězec: mus\xed odpov\xeddat vzoru ${r.pattern}`;return`Neplatn\xfd form\xe1t ${t[r.format]??r.format}`;case"not_multiple_of":return`Neplatn\xe9 č\xedslo: mus\xed b\xfdt n\xe1sobkem ${r.divisor}`;case"unrecognized_keys":return`Nezn\xe1m\xe9 kl\xedče: ${vn(r.keys,", ")}`;case"invalid_key":return`Neplatn\xfd kl\xedč v ${r.origin}`;case"invalid_union":default:return"Neplatný vstup";case"invalid_element":return`Neplatn\xe1 hodnota v ${r.origin}`}})}},"da",0,function(){let e,t,n;return{localeError:(e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}},t={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslæt",date:"ISO-dato",time:"ISO-klokkeslæt",duration:"ISO-varighed",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},n={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Ugyldigt input: forventede instanceof ${r.expected}, fik ${i}`;return`Ugyldigt input: forventede ${e}, fik ${i}`}case"invalid_value":if(1===r.values.length)return`Ugyldig v\xe6rdi: forventede ${vk(r.values[0])}`;return`Ugyldigt valg: forventede en af f\xf8lgende ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",i=e[r.origin]??null,a=n[r.origin]??r.origin;if(i)return`For stor: forventede ${a??"value"} ${i.verb} ${t} ${r.maximum.toString()} ${i.unit??"elementer"}`;return`For stor: forventede ${a??"value"} havde ${t} ${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",i=e[r.origin]??null,a=n[r.origin]??r.origin;if(i)return`For lille: forventede ${a} ${i.verb} ${t} ${r.minimum.toString()} ${i.unit}`;return`For lille: forventede ${a} havde ${t} ${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Ugyldig streng: skal starte med "${r.prefix}"`;if("ends_with"===r.format)return`Ugyldig streng: skal ende med "${r.suffix}"`;if("includes"===r.format)return`Ugyldig streng: skal indeholde "${r.includes}"`;if("regex"===r.format)return`Ugyldig streng: skal matche m\xf8nsteret ${r.pattern}`;return`Ugyldig ${t[r.format]??r.format}`;case"not_multiple_of":return`Ugyldigt tal: skal v\xe6re deleligt med ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${vn(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xf8gle i ${r.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xe6rdi i ${r.origin}`;default:return"Ugyldigt input"}})}},"de",0,function(){let e,t,n;return{localeError:(e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}},t={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},n={nan:"NaN",number:"Zahl",array:"Array"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Ung\xfcltige Eingabe: erwartet instanceof ${r.expected}, erhalten ${i}`;return`Ung\xfcltige Eingabe: erwartet ${e}, erhalten ${i}`}case"invalid_value":if(1===r.values.length)return`Ung\xfcltige Eingabe: erwartet ${vk(r.values[0])}`;return`Ung\xfcltige Option: erwartet eine von ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Zu gro\xdf: erwartet, dass ${r.origin??"Wert"} ${t}${r.maximum.toString()} ${n.unit??"Elemente"} hat`;return`Zu gro\xdf: erwartet, dass ${r.origin??"Wert"} ${t}${r.maximum.toString()} ist`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Zu klein: erwartet, dass ${r.origin} ${t}${r.minimum.toString()} ${n.unit} hat`;return`Zu klein: erwartet, dass ${r.origin} ${t}${r.minimum.toString()} ist`}case"invalid_format":if("starts_with"===r.format)return`Ung\xfcltiger String: muss mit "${r.prefix}" beginnen`;if("ends_with"===r.format)return`Ung\xfcltiger String: muss mit "${r.suffix}" enden`;if("includes"===r.format)return`Ung\xfcltiger String: muss "${r.includes}" enthalten`;if("regex"===r.format)return`Ung\xfcltiger String: muss dem Muster ${r.pattern} entsprechen`;return`Ung\xfcltig: ${t[r.format]??r.format}`;case"not_multiple_of":return`Ung\xfcltige Zahl: muss ein Vielfaches von ${r.divisor} sein`;case"unrecognized_keys":return`${r.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${vn(r.keys,", ")}`;case"invalid_key":return`Ung\xfcltiger Schl\xfcssel in ${r.origin}`;case"invalid_union":default:return"Ungültige Eingabe";case"invalid_element":return`Ung\xfcltiger Wert in ${r.origin}`}})}},"en",0,bG,"eo",0,function(){let e,t,n;return{localeError:(e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}},t={regex:"enigo",email:"retadreso",url:"URL",emoji:"emoĝio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-daŭro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},n={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Nevalida enigo: atendiĝis instanceof ${r.expected}, riceviĝis ${i}`;return`Nevalida enigo: atendiĝis ${e}, riceviĝis ${i}`}case"invalid_value":if(1===r.values.length)return`Nevalida enigo: atendiĝis ${vk(r.values[0])}`;return`Nevalida opcio: atendiĝis unu el ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Tro granda: atendiĝis ke ${r.origin??"valoro"} havu ${t}${r.maximum.toString()} ${n.unit??"elementojn"}`;return`Tro granda: atendiĝis ke ${r.origin??"valoro"} havu ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Tro malgranda: atendiĝis ke ${r.origin} havu ${t}${r.minimum.toString()} ${n.unit}`;return`Tro malgranda: atendiĝis ke ${r.origin} estu ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Nevalida karaktraro: devas komenciĝi per "${r.prefix}"`;if("ends_with"===r.format)return`Nevalida karaktraro: devas finiĝi per "${r.suffix}"`;if("includes"===r.format)return`Nevalida karaktraro: devas inkluzivi "${r.includes}"`;if("regex"===r.format)return`Nevalida karaktraro: devas kongrui kun la modelo ${r.pattern}`;return`Nevalida ${t[r.format]??r.format}`;case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${r.divisor}`;case"unrecognized_keys":return`Nekonata${r.keys.length>1?"j":""} ŝlosilo${r.keys.length>1?"j":""}: ${vn(r.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${r.origin}`;case"invalid_union":default:return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${r.origin}`}})}},"es",0,function(){let e,t,n;return{localeError:(e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}},t={regex:"entrada",email:"dirección de correo electrónico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duración ISO",ipv4:"dirección IPv4",ipv6:"dirección IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},n={nan:"NaN",string:"texto",number:"número",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"número grande",symbol:"símbolo",undefined:"indefinido",null:"nulo",function:"función",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeración",union:"unión",literal:"literal",promise:"promesa",void:"vacío",never:"nunca",unknown:"desconocido",any:"cualquiera"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Entrada inv\xe1lida: se esperaba instanceof ${r.expected}, recibido ${i}`;return`Entrada inv\xe1lida: se esperaba ${e}, recibido ${i}`}case"invalid_value":if(1===r.values.length)return`Entrada inv\xe1lida: se esperaba ${vk(r.values[0])}`;return`Opci\xf3n inv\xe1lida: se esperaba una de ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",i=e[r.origin]??null,a=n[r.origin]??r.origin;if(i)return`Demasiado grande: se esperaba que ${a??"valor"} tuviera ${t}${r.maximum.toString()} ${i.unit??"elementos"}`;return`Demasiado grande: se esperaba que ${a??"valor"} fuera ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",i=e[r.origin]??null,a=n[r.origin]??r.origin;if(i)return`Demasiado peque\xf1o: se esperaba que ${a} tuviera ${t}${r.minimum.toString()} ${i.unit}`;return`Demasiado peque\xf1o: se esperaba que ${a} fuera ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Cadena inv\xe1lida: debe comenzar con "${r.prefix}"`;if("ends_with"===r.format)return`Cadena inv\xe1lida: debe terminar en "${r.suffix}"`;if("includes"===r.format)return`Cadena inv\xe1lida: debe incluir "${r.includes}"`;if("regex"===r.format)return`Cadena inv\xe1lida: debe coincidir con el patr\xf3n ${r.pattern}`;return`Inv\xe1lido ${t[r.format]??r.format}`;case"not_multiple_of":return`N\xfamero inv\xe1lido: debe ser m\xfaltiplo de ${r.divisor}`;case"unrecognized_keys":return`Llave${r.keys.length>1?"s":""} desconocida${r.keys.length>1?"s":""}: ${vn(r.keys,", ")}`;case"invalid_key":return`Llave inv\xe1lida en ${n[r.origin]??r.origin}`;case"invalid_union":default:return"Entrada inválida";case"invalid_element":return`Valor inv\xe1lido en ${n[r.origin]??r.origin}`}})}},"fa",0,function(){let e,t,n;return{localeError:(e={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}},t={regex:"ورودی",email:"آدرس ایمیل",url:"URL",emoji:"ایموجی",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاریخ و زمان ایزو",date:"تاریخ ایزو",time:"زمان ایزو",duration:"مدت زمان ایزو",ipv4:"IPv4 آدرس",ipv6:"IPv6 آدرس",cidrv4:"IPv4 دامنه",cidrv6:"IPv6 دامنه",base64:"base64-encoded رشته",base64url:"base64url-encoded رشته",json_string:"JSON رشته",e164:"E.164 عدد",jwt:"JWT",template_literal:"ورودی"},n={nan:"NaN",number:"عدد",array:"آرایه"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`ورودی نامعتبر: می‌بایست instanceof ${r.expected} می‌بود، ${i} دریافت شد`;return`ورودی نامعتبر: می‌بایست ${e} می‌بود، ${i} دریافت شد`}case"invalid_value":if(1===r.values.length)return`ورودی نامعتبر: می‌بایست ${vk(r.values[0])} می‌بود`;return`گزینه نامعتبر: می‌بایست یکی از ${vn(r.values,"|")} می‌بود`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`خیلی بزرگ: ${r.origin??"مقدار"} باید ${t}${r.maximum.toString()} ${n.unit??"عنصر"} باشد`;return`خیلی بزرگ: ${r.origin??"مقدار"} باید ${t}${r.maximum.toString()} باشد`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`خیلی کوچک: ${r.origin} باید ${t}${r.minimum.toString()} ${n.unit} باشد`;return`خیلی کوچک: ${r.origin} باید ${t}${r.minimum.toString()} باشد`}case"invalid_format":if("starts_with"===r.format)return`رشته نامعتبر: باید با "${r.prefix}" شروع شود`;if("ends_with"===r.format)return`رشته نامعتبر: باید با "${r.suffix}" تمام شود`;if("includes"===r.format)return`رشته نامعتبر: باید شامل "${r.includes}" باشد`;if("regex"===r.format)return`رشته نامعتبر: باید با الگوی ${r.pattern} مطابقت داشته باشد`;return`${t[r.format]??r.format} نامعتبر`;case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${r.divisor} باشد`;case"unrecognized_keys":return`کلید${r.keys.length>1?"های":""} ناشناس: ${vn(r.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${r.origin}`;case"invalid_union":default:return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${r.origin}`}})}},"fi",0,function(){let e,t,n;return{localeError:(e={string:{unit:"merkkiä",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"päivämäärän"}},t={regex:"säännöllinen lauseke",email:"sähköpostiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-päivämäärä",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},n={nan:"NaN"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Virheellinen tyyppi: odotettiin instanceof ${r.expected}, oli ${i}`;return`Virheellinen tyyppi: odotettiin ${e}, oli ${i}`}case"invalid_value":if(1===r.values.length)return`Virheellinen sy\xf6te: t\xe4ytyy olla ${vk(r.values[0])}`;return`Virheellinen valinta: t\xe4ytyy olla yksi seuraavista: ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Liian suuri: ${n.subject} t\xe4ytyy olla ${t}${r.maximum.toString()} ${n.unit}`.trim();return`Liian suuri: arvon t\xe4ytyy olla ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Liian pieni: ${n.subject} t\xe4ytyy olla ${t}${r.minimum.toString()} ${n.unit}`.trim();return`Liian pieni: arvon t\xe4ytyy olla ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Virheellinen sy\xf6te: t\xe4ytyy alkaa "${r.prefix}"`;if("ends_with"===r.format)return`Virheellinen sy\xf6te: t\xe4ytyy loppua "${r.suffix}"`;if("includes"===r.format)return`Virheellinen sy\xf6te: t\xe4ytyy sis\xe4lt\xe4\xe4 "${r.includes}"`;if("regex"===r.format)return`Virheellinen sy\xf6te: t\xe4ytyy vastata s\xe4\xe4nn\xf6llist\xe4 lauseketta ${r.pattern}`;return`Virheellinen ${t[r.format]??r.format}`;case"not_multiple_of":return`Virheellinen luku: t\xe4ytyy olla luvun ${r.divisor} monikerta`;case"unrecognized_keys":return`${r.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${vn(r.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen syöte"}})}},"fr",0,function(){let e,t,n;return{localeError:(e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}},t={regex:"entrée",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},n={nan:"NaN",number:"nombre",array:"tableau"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Entr\xe9e invalide : instanceof ${r.expected} attendu, ${i} re\xe7u`;return`Entr\xe9e invalide : ${e} attendu, ${i} re\xe7u`}case"invalid_value":if(1===r.values.length)return`Entr\xe9e invalide : ${vk(r.values[0])} attendu`;return`Option invalide : une valeur parmi ${vn(r.values,"|")} attendue`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Trop grand : ${r.origin??"valeur"} doit ${n.verb} ${t}${r.maximum.toString()} ${n.unit??"élément(s)"}`;return`Trop grand : ${r.origin??"valeur"} doit \xeatre ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Trop petit : ${r.origin} doit ${n.verb} ${t}${r.minimum.toString()} ${n.unit}`;return`Trop petit : ${r.origin} doit \xeatre ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Cha\xeene invalide : doit commencer par "${r.prefix}"`;if("ends_with"===r.format)return`Cha\xeene invalide : doit se terminer par "${r.suffix}"`;if("includes"===r.format)return`Cha\xeene invalide : doit inclure "${r.includes}"`;if("regex"===r.format)return`Cha\xeene invalide : doit correspondre au mod\xe8le ${r.pattern}`;return`${t[r.format]??r.format} invalide`;case"not_multiple_of":return`Nombre invalide : doit \xeatre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xe9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${vn(r.keys,", ")}`;case"invalid_key":return`Cl\xe9 invalide dans ${r.origin}`;case"invalid_union":default:return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`}})}},"frCA",0,function(){let e,t,n;return{localeError:(e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}},t={regex:"entrée",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},n={nan:"NaN"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Entr\xe9e invalide : attendu instanceof ${r.expected}, re\xe7u ${i}`;return`Entr\xe9e invalide : attendu ${e}, re\xe7u ${i}`}case"invalid_value":if(1===r.values.length)return`Entr\xe9e invalide : attendu ${vk(r.values[0])}`;return`Option invalide : attendu l'une des valeurs suivantes ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"≤":"<",n=e[r.origin]??null;if(n)return`Trop grand : attendu que ${r.origin??"la valeur"} ait ${t}${r.maximum.toString()} ${n.unit}`;return`Trop grand : attendu que ${r.origin??"la valeur"} soit ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?"≥":">",n=e[r.origin]??null;if(n)return`Trop petit : attendu que ${r.origin} ait ${t}${r.minimum.toString()} ${n.unit}`;return`Trop petit : attendu que ${r.origin} soit ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Cha\xeene invalide : doit commencer par "${r.prefix}"`;if("ends_with"===r.format)return`Cha\xeene invalide : doit se terminer par "${r.suffix}"`;if("includes"===r.format)return`Cha\xeene invalide : doit inclure "${r.includes}"`;if("regex"===r.format)return`Cha\xeene invalide : doit correspondre au motif ${r.pattern}`;return`${t[r.format]??r.format} invalide`;case"not_multiple_of":return`Nombre invalide : doit \xeatre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xe9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${vn(r.keys,", ")}`;case"invalid_key":return`Cl\xe9 invalide dans ${r.origin}`;case"invalid_union":default:return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`}})}},"he",0,function(){let e,t,n,r,i,a,o,s,l;return{localeError:(e={string:{label:"מחרוזת",gender:"f"},number:{label:"מספר",gender:"m"},boolean:{label:"ערך בוליאני",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"תאריך",gender:"m"},array:{label:"מערך",gender:"m"},object:{label:"אובייקט",gender:"m"},null:{label:"ערך ריק (null)",gender:"m"},undefined:{label:"ערך לא מוגדר (undefined)",gender:"m"},symbol:{label:"סימבול (Symbol)",gender:"m"},function:{label:"פונקציה",gender:"f"},map:{label:"מפה (Map)",gender:"f"},set:{label:"קבוצה (Set)",gender:"f"},file:{label:"קובץ",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"ערך לא ידוע",gender:"m"},value:{label:"ערך",gender:"m"}},t={string:{unit:"תווים",shortLabel:"קצר",longLabel:"ארוך"},file:{unit:"בייטים",shortLabel:"קטן",longLabel:"גדול"},array:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},set:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},number:{unit:"",shortLabel:"קטן",longLabel:"גדול"}},n=t=>t?e[t]:void 0,r=t=>{let r=n(t);return r?r.label:t??e.unknown.label},i=e=>`ה${r(e)}`,a=e=>{let t=n(e);return"f"===(t?.gender??"m")?"צריכה להיות":"צריך להיות"},o=e=>e?t[e]??null:null,s={regex:{label:"קלט",gender:"m"},email:{label:"כתובת אימייל",gender:"f"},url:{label:"כתובת רשת",gender:"f"},emoji:{label:"אימוג'י",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"תאריך וזמן ISO",gender:"m"},date:{label:"תאריך ISO",gender:"m"},time:{label:"זמן ISO",gender:"m"},duration:{label:"משך זמן ISO",gender:"m"},ipv4:{label:"כתובת IPv4",gender:"f"},ipv6:{label:"כתובת IPv6",gender:"f"},cidrv4:{label:"טווח IPv4",gender:"m"},cidrv6:{label:"טווח IPv6",gender:"m"},base64:{label:"מחרוזת בבסיס 64",gender:"f"},base64url:{label:"מחרוזת בבסיס 64 לכתובות רשת",gender:"f"},json_string:{label:"מחרוזת JSON",gender:"f"},e164:{label:"מספר E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"קלט",gender:"m"},includes:{label:"קלט",gender:"m"},lowercase:{label:"קלט",gender:"m"},starts_with:{label:"קלט",gender:"m"},uppercase:{label:"קלט",gender:"m"}},l={nan:"NaN"},t=>{switch(t.code){case"invalid_type":{let n=t.expected,i=l[n??""]??r(n),a=vD(t.input),o=l[a]??e[a]?.label??a;if(/^[A-Z]/.test(t.expected))return`קלט לא תקין: צריך להיות instanceof ${t.expected}, התקבל ${o}`;return`קלט לא תקין: צריך להיות ${i}, התקבל ${o}`}case"invalid_value":{if(1===t.values.length)return`ערך לא תקין: הערך חייב להיות ${vk(t.values[0])}`;let e=t.values.map(e=>vk(e));if(2===t.values.length)return`ערך לא תקין: האפשרויות המתאימות הן ${e[0]} או ${e[1]}`;let n=e[e.length-1],r=e.slice(0,-1).join(", ");return`ערך לא תקין: האפשרויות המתאימות הן ${r} או ${n}`}case"too_big":{let e=o(t.origin),n=i(t.origin??"value");if("string"===t.origin)return`${e?.longLabel??"ארוך"} מדי: ${n} צריכה להכיל ${t.maximum.toString()} ${e?.unit??""} ${t.inclusive?"או פחות":"לכל היותר"}`.trim();if("number"===t.origin){let e=t.inclusive?`קטן או שווה ל-${t.maximum}`:`קטן מ-${t.maximum}`;return`גדול מדי: ${n} צריך להיות ${e}`}if("array"===t.origin||"set"===t.origin){let r="set"===t.origin?"צריכה":"צריך",i=t.inclusive?`${t.maximum} ${e?.unit??""} או פחות`:`פחות מ-${t.maximum} ${e?.unit??""}`;return`גדול מדי: ${n} ${r} להכיל ${i}`.trim()}let r=t.inclusive?"<=":"<",s=a(t.origin??"value");if(e?.unit)return`${e.longLabel} מדי: ${n} ${s} ${r}${t.maximum.toString()} ${e.unit}`;return`${e?.longLabel??"גדול"} מדי: ${n} ${s} ${r}${t.maximum.toString()}`}case"too_small":{let e=o(t.origin),n=i(t.origin??"value");if("string"===t.origin)return`${e?.shortLabel??"קצר"} מדי: ${n} צריכה להכיל ${t.minimum.toString()} ${e?.unit??""} ${t.inclusive?"או יותר":"לפחות"}`.trim();if("number"===t.origin){let e=t.inclusive?`גדול או שווה ל-${t.minimum}`:`גדול מ-${t.minimum}`;return`קטן מדי: ${n} צריך להיות ${e}`}if("array"===t.origin||"set"===t.origin){let r="set"===t.origin?"צריכה":"צריך";if(1===t.minimum&&t.inclusive){let e=(t.origin,"לפחות פריט אחד");return`קטן מדי: ${n} ${r} להכיל ${e}`}let i=t.inclusive?`${t.minimum} ${e?.unit??""} או יותר`:`יותר מ-${t.minimum} ${e?.unit??""}`;return`קטן מדי: ${n} ${r} להכיל ${i}`.trim()}let r=t.inclusive?">=":">",s=a(t.origin??"value");if(e?.unit)return`${e.shortLabel} מדי: ${n} ${s} ${r}${t.minimum.toString()} ${e.unit}`;return`${e?.shortLabel??"קטן"} מדי: ${n} ${s} ${r}${t.minimum.toString()}`}case"invalid_format":{if("starts_with"===t.format)return`המחרוזת חייבת להתחיל ב "${t.prefix}"`;if("ends_with"===t.format)return`המחרוזת חייבת להסתיים ב "${t.suffix}"`;if("includes"===t.format)return`המחרוזת חייבת לכלול "${t.includes}"`;if("regex"===t.format)return`המחרוזת חייבת להתאים לתבנית ${t.pattern}`;let e=s[t.format],n=e?.label??t.format,r=e?.gender??"m";return`${n} לא ${"f"===r?"תקינה":"תקין"}`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${t.divisor}`;case"unrecognized_keys":return`מפתח${t.keys.length>1?"ות":""} לא מזוה${t.keys.length>1?"ים":"ה"}: ${vn(t.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":default:return"קלט לא תקין";case"invalid_element":{let e=i(t.origin??"array");return`ערך לא תקין ב${e}`}}})}},"hu",0,function(){let e,t,n;return{localeError:(e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}},t={regex:"bemenet",email:"email cím",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO időbélyeg",date:"ISO dátum",time:"ISO idő",duration:"ISO időintervallum",ipv4:"IPv4 cím",ipv6:"IPv6 cím",cidrv4:"IPv4 tartomány",cidrv6:"IPv6 tartomány",base64:"base64-kódolt string",base64url:"base64url-kódolt string",json_string:"JSON string",e164:"E.164 szám",jwt:"JWT",template_literal:"bemenet"},n={nan:"NaN",number:"szám",array:"tömb"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`\xc9rv\xe9nytelen bemenet: a v\xe1rt \xe9rt\xe9k instanceof ${r.expected}, a kapott \xe9rt\xe9k ${i}`;return`\xc9rv\xe9nytelen bemenet: a v\xe1rt \xe9rt\xe9k ${e}, a kapott \xe9rt\xe9k ${i}`}case"invalid_value":if(1===r.values.length)return`\xc9rv\xe9nytelen bemenet: a v\xe1rt \xe9rt\xe9k ${vk(r.values[0])}`;return`\xc9rv\xe9nytelen opci\xf3: valamelyik \xe9rt\xe9k v\xe1rt ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`T\xfal nagy: ${r.origin??"érték"} m\xe9rete t\xfal nagy ${t}${r.maximum.toString()} ${n.unit??"elem"}`;return`T\xfal nagy: a bemeneti \xe9rt\xe9k ${r.origin??"érték"} t\xfal nagy: ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`T\xfal kicsi: a bemeneti \xe9rt\xe9k ${r.origin} m\xe9rete t\xfal kicsi ${t}${r.minimum.toString()} ${n.unit}`;return`T\xfal kicsi: a bemeneti \xe9rt\xe9k ${r.origin} t\xfal kicsi ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`\xc9rv\xe9nytelen string: "${r.prefix}" \xe9rt\xe9kkel kell kezdődnie`;if("ends_with"===r.format)return`\xc9rv\xe9nytelen string: "${r.suffix}" \xe9rt\xe9kkel kell v\xe9gződnie`;if("includes"===r.format)return`\xc9rv\xe9nytelen string: "${r.includes}" \xe9rt\xe9ket kell tartalmaznia`;if("regex"===r.format)return`\xc9rv\xe9nytelen string: ${r.pattern} mint\xe1nak kell megfelelnie`;return`\xc9rv\xe9nytelen ${t[r.format]??r.format}`;case"not_multiple_of":return`\xc9rv\xe9nytelen sz\xe1m: ${r.divisor} t\xf6bbsz\xf6r\xf6s\xe9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${r.keys.length>1?"s":""}: ${vn(r.keys,", ")}`;case"invalid_key":return`\xc9rv\xe9nytelen kulcs ${r.origin}`;case"invalid_union":default:return"Érvénytelen bemenet";case"invalid_element":return`\xc9rv\xe9nytelen \xe9rt\xe9k: ${r.origin}`}})}},"hy",0,function(){let e,t,n;return{localeError:(e={string:{unit:{one:"նշան",many:"նշաններ"},verb:"ունենալ"},file:{unit:{one:"բայթ",many:"բայթեր"},verb:"ունենալ"},array:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"},set:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"}},t={regex:"մուտք",email:"էլ. հասցե",url:"URL",emoji:"էմոջի",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO ամսաթիվ և ժամ",date:"ISO ամսաթիվ",time:"ISO ժամ",duration:"ISO տևողություն",ipv4:"IPv4 հասցե",ipv6:"IPv6 հասցե",cidrv4:"IPv4 միջակայք",cidrv6:"IPv6 միջակայք",base64:"base64 ձևաչափով տող",base64url:"base64url ձևաչափով տող",json_string:"JSON տող",e164:"E.164 համար",jwt:"JWT",template_literal:"մուտք"},n={nan:"NaN",number:"թիվ",array:"զանգված"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Սխալ մուտքագրում․ սպասվում էր instanceof ${r.expected}, ստացվել է ${i}`;return`Սխալ մուտքագրում․ սպասվում էր ${e}, ստացվել է ${i}`}case"invalid_value":if(1===r.values.length)return`Սխալ մուտքագրում․ սպասվում էր ${vk(r.values[1])}`;return`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n){let e=bK(Number(r.maximum),n.unit.one,n.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${bq(r.origin??"արժեք")} կունենա ${t}${r.maximum.toString()} ${e}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${bq(r.origin??"արժեք")} լինի ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n){let e=bK(Number(r.minimum),n.unit.one,n.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${bq(r.origin)} կունենա ${t}${r.minimum.toString()} ${e}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${bq(r.origin)} լինի ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Սխալ տող․ պետք է սկսվի "${r.prefix}"-ով`;if("ends_with"===r.format)return`Սխալ տող․ պետք է ավարտվի "${r.suffix}"-ով`;if("includes"===r.format)return`Սխալ տող․ պետք է պարունակի "${r.includes}"`;if("regex"===r.format)return`Սխալ տող․ պետք է համապատասխանի ${r.pattern} ձևաչափին`;return`Սխալ ${t[r.format]??r.format}`;case"not_multiple_of":return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${r.divisor}-ի`;case"unrecognized_keys":return`Չճանաչված բանալի${r.keys.length>1?"ներ":""}. ${vn(r.keys,", ")}`;case"invalid_key":return`Սխալ բանալի ${bq(r.origin)}-ում`;case"invalid_union":default:return"Սխալ մուտքագրում";case"invalid_element":return`Սխալ արժեք ${bq(r.origin)}-ում`}})}},"id",0,function(){let e,t,n;return{localeError:(e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}},t={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},n={nan:"NaN"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Input tidak valid: diharapkan instanceof ${r.expected}, diterima ${i}`;return`Input tidak valid: diharapkan ${e}, diterima ${i}`}case"invalid_value":if(1===r.values.length)return`Input tidak valid: diharapkan ${vk(r.values[0])}`;return`Pilihan tidak valid: diharapkan salah satu dari ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Terlalu besar: diharapkan ${r.origin??"value"} memiliki ${t}${r.maximum.toString()} ${n.unit??"elemen"}`;return`Terlalu besar: diharapkan ${r.origin??"value"} menjadi ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Terlalu kecil: diharapkan ${r.origin} memiliki ${t}${r.minimum.toString()} ${n.unit}`;return`Terlalu kecil: diharapkan ${r.origin} menjadi ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`String tidak valid: harus dimulai dengan "${r.prefix}"`;if("ends_with"===r.format)return`String tidak valid: harus berakhir dengan "${r.suffix}"`;if("includes"===r.format)return`String tidak valid: harus menyertakan "${r.includes}"`;if("regex"===r.format)return`String tidak valid: harus sesuai pola ${r.pattern}`;return`${t[r.format]??r.format} tidak valid`;case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${r.keys.length>1?"s":""}: ${vn(r.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${r.origin}`;case"invalid_union":default:return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${r.origin}`}})}},"is",0,function(){let e,t,n;return{localeError:(e={string:{unit:"stafi",verb:"að hafa"},file:{unit:"bæti",verb:"að hafa"},array:{unit:"hluti",verb:"að hafa"},set:{unit:"hluti",verb:"að hafa"}},t={regex:"gildi",email:"netfang",url:"vefslóð",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og tími",date:"ISO dagsetning",time:"ISO tími",duration:"ISO tímalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 tölugildi",jwt:"JWT",template_literal:"gildi"},n={nan:"NaN",number:"númer",array:"fylki"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Rangt gildi: \xde\xfa sl\xf3st inn ${i} \xfear sem \xe1 a\xf0 vera instanceof ${r.expected}`;return`Rangt gildi: \xde\xfa sl\xf3st inn ${i} \xfear sem \xe1 a\xf0 vera ${e}`}case"invalid_value":if(1===r.values.length)return`Rangt gildi: gert r\xe1\xf0 fyrir ${vk(r.values[0])}`;return`\xd3gilt val: m\xe1 vera eitt af eftirfarandi ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Of st\xf3rt: gert er r\xe1\xf0 fyrir a\xf0 ${r.origin??"gildi"} hafi ${t}${r.maximum.toString()} ${n.unit??"hluti"}`;return`Of st\xf3rt: gert er r\xe1\xf0 fyrir a\xf0 ${r.origin??"gildi"} s\xe9 ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Of l\xedti\xf0: gert er r\xe1\xf0 fyrir a\xf0 ${r.origin} hafi ${t}${r.minimum.toString()} ${n.unit}`;return`Of l\xedti\xf0: gert er r\xe1\xf0 fyrir a\xf0 ${r.origin} s\xe9 ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`\xd3gildur strengur: ver\xf0ur a\xf0 byrja \xe1 "${r.prefix}"`;if("ends_with"===r.format)return`\xd3gildur strengur: ver\xf0ur a\xf0 enda \xe1 "${r.suffix}"`;if("includes"===r.format)return`\xd3gildur strengur: ver\xf0ur a\xf0 innihalda "${r.includes}"`;if("regex"===r.format)return`\xd3gildur strengur: ver\xf0ur a\xf0 fylgja mynstri ${r.pattern}`;return`Rangt ${t[r.format]??r.format}`;case"not_multiple_of":return`R\xf6ng tala: ver\xf0ur a\xf0 vera margfeldi af ${r.divisor}`;case"unrecognized_keys":return`\xd3\xfeekkt ${r.keys.length>1?"ir lyklar":"ur lykill"}: ${vn(r.keys,", ")}`;case"invalid_key":return`Rangur lykill \xed ${r.origin}`;case"invalid_union":default:return"Rangt gildi";case"invalid_element":return`Rangt gildi \xed ${r.origin}`}})}},"it",0,function(){let e,t,n;return{localeError:(e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}},t={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"numero",array:"vettore"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Input non valido: atteso instanceof ${r.expected}, ricevuto ${i}`;return`Input non valido: atteso ${e}, ricevuto ${i}`}case"invalid_value":if(1===r.values.length)return`Input non valido: atteso ${vk(r.values[0])}`;return`Opzione non valida: atteso uno tra ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Troppo grande: ${r.origin??"valore"} deve avere ${t}${r.maximum.toString()} ${n.unit??"elementi"}`;return`Troppo grande: ${r.origin??"valore"} deve essere ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Troppo piccolo: ${r.origin} deve avere ${t}${r.minimum.toString()} ${n.unit}`;return`Troppo piccolo: ${r.origin} deve essere ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Stringa non valida: deve iniziare con "${r.prefix}"`;if("ends_with"===r.format)return`Stringa non valida: deve terminare con "${r.suffix}"`;if("includes"===r.format)return`Stringa non valida: deve includere "${r.includes}"`;if("regex"===r.format)return`Stringa non valida: deve corrispondere al pattern ${r.pattern}`;return`Invalid ${t[r.format]??r.format}`;case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${r.divisor}`;case"unrecognized_keys":return`Chiav${r.keys.length>1?"i":"e"} non riconosciut${r.keys.length>1?"e":"a"}: ${vn(r.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${r.origin}`;case"invalid_union":default:return"Input non valido";case"invalid_element":return`Valore non valido in ${r.origin}`}})}},"ja",0,function(){let e,t,n;return{localeError:(e={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}},t={regex:"入力値",email:"メールアドレス",url:"URL",emoji:"絵文字",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日時",date:"ISO日付",time:"ISO時刻",duration:"ISO期間",ipv4:"IPv4アドレス",ipv6:"IPv6アドレス",cidrv4:"IPv4範囲",cidrv6:"IPv6範囲",base64:"base64エンコード文字列",base64url:"base64urlエンコード文字列",json_string:"JSON文字列",e164:"E.164番号",jwt:"JWT",template_literal:"入力値"},n={nan:"NaN",number:"数値",array:"配列"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`無効な入力: instanceof ${r.expected}が期待されましたが、${i}が入力されました`;return`無効な入力: ${e}が期待されましたが、${i}が入力されました`}case"invalid_value":if(1===r.values.length)return`無効な入力: ${vk(r.values[0])}が期待されました`;return`無効な選択: ${vn(r.values,"、")}のいずれかである必要があります`;case"too_big":{let t=r.inclusive?"以下である":"より小さい",n=e[r.origin]??null;if(n)return`大きすぎる値: ${r.origin??"値"}は${r.maximum.toString()}${n.unit??"要素"}${t}必要があります`;return`大きすぎる値: ${r.origin??"値"}は${r.maximum.toString()}${t}必要があります`}case"too_small":{let t=r.inclusive?"以上である":"より大きい",n=e[r.origin]??null;if(n)return`小さすぎる値: ${r.origin}は${r.minimum.toString()}${n.unit}${t}必要があります`;return`小さすぎる値: ${r.origin}は${r.minimum.toString()}${t}必要があります`}case"invalid_format":if("starts_with"===r.format)return`無効な文字列: "${r.prefix}"で始まる必要があります`;if("ends_with"===r.format)return`無効な文字列: "${r.suffix}"で終わる必要があります`;if("includes"===r.format)return`無効な文字列: "${r.includes}"を含む必要があります`;if("regex"===r.format)return`無効な文字列: パターン${r.pattern}に一致する必要があります`;return`無効な${t[r.format]??r.format}`;case"not_multiple_of":return`無効な数値: ${r.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${r.keys.length>1?"群":""}: ${vn(r.keys,"、")}`;case"invalid_key":return`${r.origin}内の無効なキー`;case"invalid_union":default:return"無効な入力";case"invalid_element":return`${r.origin}内の無効な値`}})}},"ka",0,function(){let e,t,n;return{localeError:(e={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}},t={regex:"შეყვანა",email:"ელ-ფოსტის მისამართი",url:"URL",emoji:"ემოჯი",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"თარიღი-დრო",date:"თარიღი",time:"დრო",duration:"ხანგრძლივობა",ipv4:"IPv4 მისამართი",ipv6:"IPv6 მისამართი",cidrv4:"IPv4 დიაპაზონი",cidrv6:"IPv6 დიაპაზონი",base64:"base64-კოდირებული სტრინგი",base64url:"base64url-კოდირებული სტრინგი",json_string:"JSON სტრინგი",e164:"E.164 ნომერი",jwt:"JWT",template_literal:"შეყვანა"},n={nan:"NaN",number:"რიცხვი",string:"სტრინგი",boolean:"ბულეანი",function:"ფუნქცია",array:"მასივი"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`არასწორი შეყვანა: მოსალოდნელი instanceof ${r.expected}, მიღებული ${i}`;return`არასწორი შეყვანა: მოსალოდნელი ${e}, მიღებული ${i}`}case"invalid_value":if(1===r.values.length)return`არასწორი შეყვანა: მოსალოდნელი ${vk(r.values[0])}`;return`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${vn(r.values,"|")}-დან`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`ზედმეტად დიდი: მოსალოდნელი ${r.origin??"მნიშვნელობა"} ${n.verb} ${t}${r.maximum.toString()} ${n.unit}`;return`ზედმეტად დიდი: მოსალოდნელი ${r.origin??"მნიშვნელობა"} იყოს ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`ზედმეტად პატარა: მოსალოდნელი ${r.origin} ${n.verb} ${t}${r.minimum.toString()} ${n.unit}`;return`ზედმეტად პატარა: მოსალოდნელი ${r.origin} იყოს ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`არასწორი სტრინგი: უნდა იწყებოდეს "${r.prefix}"-ით`;if("ends_with"===r.format)return`არასწორი სტრინგი: უნდა მთავრდებოდეს "${r.suffix}"-ით`;if("includes"===r.format)return`არასწორი სტრინგი: უნდა შეიცავდეს "${r.includes}"-ს`;if("regex"===r.format)return`არასწორი სტრინგი: უნდა შეესაბამებოდეს შაბლონს ${r.pattern}`;return`არასწორი ${t[r.format]??r.format}`;case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${r.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${r.keys.length>1?"ები":"ი"}: ${vn(r.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${r.origin}-ში`;case"invalid_union":default:return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${r.origin}-ში`}})}},"kh",0,function(){return bY()},"km",0,bY,"ko",0,function(){let e,t,n;return{localeError:(e={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}},t={regex:"입력",email:"이메일 주소",url:"URL",emoji:"이모지",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 날짜시간",date:"ISO 날짜",time:"ISO 시간",duration:"ISO 기간",ipv4:"IPv4 주소",ipv6:"IPv6 주소",cidrv4:"IPv4 범위",cidrv6:"IPv6 범위",base64:"base64 인코딩 문자열",base64url:"base64url 인코딩 문자열",json_string:"JSON 문자열",e164:"E.164 번호",jwt:"JWT",template_literal:"입력"},n={nan:"NaN"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`잘못된 입력: 예상 타입은 instanceof ${r.expected}, 받은 타입은 ${i}입니다`;return`잘못된 입력: 예상 타입은 ${e}, 받은 타입은 ${i}입니다`}case"invalid_value":if(1===r.values.length)return`잘못된 입력: 값은 ${vk(r.values[0])} 이어야 합니다`;return`잘못된 옵션: ${vn(r.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{let t=r.inclusive?"이하":"미만",n="미만"===t?"이어야 합니다":"여야 합니다",i=e[r.origin]??null,a=i?.unit??"요소";if(i)return`${r.origin??"값"}이 너무 큽니다: ${r.maximum.toString()}${a} ${t}${n}`;return`${r.origin??"값"}이 너무 큽니다: ${r.maximum.toString()} ${t}${n}`}case"too_small":{let t=r.inclusive?"이상":"초과",n="이상"===t?"이어야 합니다":"여야 합니다",i=e[r.origin]??null,a=i?.unit??"요소";if(i)return`${r.origin??"값"}이 너무 작습니다: ${r.minimum.toString()}${a} ${t}${n}`;return`${r.origin??"값"}이 너무 작습니다: ${r.minimum.toString()} ${t}${n}`}case"invalid_format":if("starts_with"===r.format)return`잘못된 문자열: "${r.prefix}"(으)로 시작해야 합니다`;if("ends_with"===r.format)return`잘못된 문자열: "${r.suffix}"(으)로 끝나야 합니다`;if("includes"===r.format)return`잘못된 문자열: "${r.includes}"을(를) 포함해야 합니다`;if("regex"===r.format)return`잘못된 문자열: 정규식 ${r.pattern} 패턴과 일치해야 합니다`;return`잘못된 ${t[r.format]??r.format}`;case"not_multiple_of":return`잘못된 숫자: ${r.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${vn(r.keys,", ")}`;case"invalid_key":return`잘못된 키: ${r.origin}`;case"invalid_union":default:return"잘못된 입력";case"invalid_element":return`잘못된 값: ${r.origin}`}})}},"lt",0,function(){return{localeError:(()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simbolių"},verb:{smaller:{inclusive:"turi būti ne ilgesnė kaip",notInclusive:"turi būti trumpesnė kaip"},bigger:{inclusive:"turi būti ne trumpesnė kaip",notInclusive:"turi būti ilgesnė kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"baitų"},verb:{smaller:{inclusive:"turi būti ne didesnis kaip",notInclusive:"turi būti mažesnis kaip"},bigger:{inclusive:"turi būti ne mažesnis kaip",notInclusive:"turi būti didesnis kaip"}}},array:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}},set:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}}};function t(t,n,r,i){let a=e[t]??null;return null===a?a:{unit:a.unit[n],verb:a.verb[i][r?"inclusive":"notInclusive"]}}let n={regex:"įvestis",email:"el. pašto adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukmė",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 užkoduota eilutė",base64url:"base64url užkoduota eilutė",json_string:"JSON eilutė",e164:"E.164 numeris",jwt:"JWT",template_literal:"įvestis"},r={nan:"NaN",number:"skaičius",bigint:"sveikasis skaičius",string:"eilutė",boolean:"loginė reikšmė",undefined:"neapibrėžta reikšmė",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulinė reikšmė"};return e=>{switch(e.code){case"invalid_type":{let t=r[e.expected]??e.expected,n=vD(e.input),i=r[n]??n;if(/^[A-Z]/.test(e.expected))return`Gautas tipas ${i}, o tikėtasi - instanceof ${e.expected}`;return`Gautas tipas ${i}, o tikėtasi - ${t}`}case"invalid_value":if(1===e.values.length)return`Privalo būti ${vk(e.values[0])}`;return`Privalo būti vienas iš ${vn(e.values,"|")} pasirinkimų`;case"too_big":{let n=r[e.origin]??e.origin,i=t(e.origin,bQ(Number(e.maximum)),e.inclusive??!1,"smaller");if(i?.verb)return`${bX(n??e.origin??"reikšmė")} ${i.verb} ${e.maximum.toString()} ${i.unit??"elementų"}`;let a=e.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${bX(n??e.origin??"reikšmė")} turi būti ${a} ${e.maximum.toString()} ${i?.unit}`}case"too_small":{let n=r[e.origin]??e.origin,i=t(e.origin,bQ(Number(e.minimum)),e.inclusive??!1,"bigger");if(i?.verb)return`${bX(n??e.origin??"reikšmė")} ${i.verb} ${e.minimum.toString()} ${i.unit??"elementų"}`;let a=e.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${bX(n??e.origin??"reikšmė")} turi būti ${a} ${e.minimum.toString()} ${i?.unit}`}case"invalid_format":if("starts_with"===e.format)return`Eilutė privalo prasidėti "${e.prefix}"`;if("ends_with"===e.format)return`Eilutė privalo pasibaigti "${e.suffix}"`;if("includes"===e.format)return`Eilutė privalo įtraukti "${e.includes}"`;if("regex"===e.format)return`Eilutė privalo atitikti ${e.pattern}`;return`Neteisingas ${n[e.format]??e.format}`;case"not_multiple_of":return`Skaičius privalo būti ${e.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${e.keys.length>1?"i":"as"} rakt${e.keys.length>1?"ai":"as"}: ${vn(e.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":default:return"Klaidinga įvestis";case"invalid_element":{let t=r[e.origin]??e.origin;return`${bX(t??e.origin??"reikšmė")} turi klaidingą įvestį`}}}})()}},"mk",0,function(){let e,t,n;return{localeError:(e={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}},t={regex:"внес",email:"адреса на е-пошта",url:"URL",emoji:"емоџи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO датум и време",date:"ISO датум",time:"ISO време",duration:"ISO времетраење",ipv4:"IPv4 адреса",ipv6:"IPv6 адреса",cidrv4:"IPv4 опсег",cidrv6:"IPv6 опсег",base64:"base64-енкодирана низа",base64url:"base64url-енкодирана низа",json_string:"JSON низа",e164:"E.164 број",jwt:"JWT",template_literal:"внес"},n={nan:"NaN",number:"број",array:"низа"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Грешен внес: се очекува instanceof ${r.expected}, примено ${i}`;return`Грешен внес: се очекува ${e}, примено ${i}`}case"invalid_value":if(1===r.values.length)return`Invalid input: expected ${vk(r.values[0])}`;return`Грешана опција: се очекува една ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Премногу голем: се очекува ${r.origin??"вредноста"} да има ${t}${r.maximum.toString()} ${n.unit??"елементи"}`;return`Премногу голем: се очекува ${r.origin??"вредноста"} да биде ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Премногу мал: се очекува ${r.origin} да има ${t}${r.minimum.toString()} ${n.unit}`;return`Премногу мал: се очекува ${r.origin} да биде ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Неважечка низа: мора да започнува со "${r.prefix}"`;if("ends_with"===r.format)return`Неважечка низа: мора да завршува со "${r.suffix}"`;if("includes"===r.format)return`Неважечка низа: мора да вклучува "${r.includes}"`;if("regex"===r.format)return`Неважечка низа: мора да одгоара на патернот ${r.pattern}`;return`Invalid ${t[r.format]??r.format}`;case"not_multiple_of":return`Грешен број: мора да биде делив со ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${vn(r.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${r.origin}`;case"invalid_union":default:return"Грешен внес";case"invalid_element":return`Грешна вредност во ${r.origin}`}})}},"ms",0,function(){let e,t,n;return{localeError:(e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}},t={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"nombor"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Input tidak sah: dijangka instanceof ${r.expected}, diterima ${i}`;return`Input tidak sah: dijangka ${e}, diterima ${i}`}case"invalid_value":if(1===r.values.length)return`Input tidak sah: dijangka ${vk(r.values[0])}`;return`Pilihan tidak sah: dijangka salah satu daripada ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Terlalu besar: dijangka ${r.origin??"nilai"} ${n.verb} ${t}${r.maximum.toString()} ${n.unit??"elemen"}`;return`Terlalu besar: dijangka ${r.origin??"nilai"} adalah ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Terlalu kecil: dijangka ${r.origin} ${n.verb} ${t}${r.minimum.toString()} ${n.unit}`;return`Terlalu kecil: dijangka ${r.origin} adalah ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`String tidak sah: mesti bermula dengan "${r.prefix}"`;if("ends_with"===r.format)return`String tidak sah: mesti berakhir dengan "${r.suffix}"`;if("includes"===r.format)return`String tidak sah: mesti mengandungi "${r.includes}"`;if("regex"===r.format)return`String tidak sah: mesti sepadan dengan corak ${r.pattern}`;return`${t[r.format]??r.format} tidak sah`;case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${vn(r.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${r.origin}`;case"invalid_union":default:return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${r.origin}`}})}},"nl",0,function(){let e,t,n;return{localeError:(e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}},t={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},n={nan:"NaN",number:"getal"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Ongeldige invoer: verwacht instanceof ${r.expected}, ontving ${i}`;return`Ongeldige invoer: verwacht ${e}, ontving ${i}`}case"invalid_value":if(1===r.values.length)return`Ongeldige invoer: verwacht ${vk(r.values[0])}`;return`Ongeldige optie: verwacht \xe9\xe9n van ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null,i="date"===r.origin?"laat":"string"===r.origin?"lang":"groot";if(n)return`Te ${i}: verwacht dat ${r.origin??"waarde"} ${t}${r.maximum.toString()} ${n.unit??"elementen"} ${n.verb}`;return`Te ${i}: verwacht dat ${r.origin??"waarde"} ${t}${r.maximum.toString()} is`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null,i="date"===r.origin?"vroeg":"string"===r.origin?"kort":"klein";if(n)return`Te ${i}: verwacht dat ${r.origin} ${t}${r.minimum.toString()} ${n.unit} ${n.verb}`;return`Te ${i}: verwacht dat ${r.origin} ${t}${r.minimum.toString()} is`}case"invalid_format":if("starts_with"===r.format)return`Ongeldige tekst: moet met "${r.prefix}" beginnen`;if("ends_with"===r.format)return`Ongeldige tekst: moet op "${r.suffix}" eindigen`;if("includes"===r.format)return`Ongeldige tekst: moet "${r.includes}" bevatten`;if("regex"===r.format)return`Ongeldige tekst: moet overeenkomen met patroon ${r.pattern}`;return`Ongeldig: ${t[r.format]??r.format}`;case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${r.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${r.keys.length>1?"s":""}: ${vn(r.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${r.origin}`;case"invalid_union":default:return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${r.origin}`}})}},"no",0,function(){let e,t,n;return{localeError:(e={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}},t={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"tall",array:"liste"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Ugyldig input: forventet instanceof ${r.expected}, fikk ${i}`;return`Ugyldig input: forventet ${e}, fikk ${i}`}case"invalid_value":if(1===r.values.length)return`Ugyldig verdi: forventet ${vk(r.values[0])}`;return`Ugyldig valg: forventet en av ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`For stor(t): forventet ${r.origin??"value"} til \xe5 ha ${t}${r.maximum.toString()} ${n.unit??"elementer"}`;return`For stor(t): forventet ${r.origin??"value"} til \xe5 ha ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`For lite(n): forventet ${r.origin} til \xe5 ha ${t}${r.minimum.toString()} ${n.unit}`;return`For lite(n): forventet ${r.origin} til \xe5 ha ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Ugyldig streng: m\xe5 starte med "${r.prefix}"`;if("ends_with"===r.format)return`Ugyldig streng: m\xe5 ende med "${r.suffix}"`;if("includes"===r.format)return`Ugyldig streng: m\xe5 inneholde "${r.includes}"`;if("regex"===r.format)return`Ugyldig streng: m\xe5 matche m\xf8nsteret ${r.pattern}`;return`Ugyldig ${t[r.format]??r.format}`;case"not_multiple_of":return`Ugyldig tall: m\xe5 v\xe6re et multiplum av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${vn(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xf8kkel i ${r.origin}`;case"invalid_union":default:return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${r.origin}`}})}},"ota",0,function(){let e,t,n;return{localeError:(e={string:{unit:"harf",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"unsur",verb:"olmalıdır"},set:{unit:"unsur",verb:"olmalıdır"}},t={regex:"giren",email:"epostagâh",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO hengâmı",date:"ISO tarihi",time:"ISO zamanı",duration:"ISO müddeti",ipv4:"IPv4 nişânı",ipv6:"IPv6 nişânı",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-şifreli metin",base64url:"base64url-şifreli metin",json_string:"JSON metin",e164:"E.164 sayısı",jwt:"JWT",template_literal:"giren"},n={nan:"NaN",number:"numara",array:"saf",null:"gayb"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`F\xe2sit giren: umulan instanceof ${r.expected}, alınan ${i}`;return`F\xe2sit giren: umulan ${e}, alınan ${i}`}case"invalid_value":if(1===r.values.length)return`F\xe2sit giren: umulan ${vk(r.values[0])}`;return`F\xe2sit tercih: m\xfbteberler ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Fazla b\xfcy\xfck: ${r.origin??"value"}, ${t}${r.maximum.toString()} ${n.unit??"elements"} sahip olmalıydı.`;return`Fazla b\xfcy\xfck: ${r.origin??"value"}, ${t}${r.maximum.toString()} olmalıydı.`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Fazla k\xfc\xe7\xfck: ${r.origin}, ${t}${r.minimum.toString()} ${n.unit} sahip olmalıydı.`;return`Fazla k\xfc\xe7\xfck: ${r.origin}, ${t}${r.minimum.toString()} olmalıydı.`}case"invalid_format":if("starts_with"===r.format)return`F\xe2sit metin: "${r.prefix}" ile başlamalı.`;if("ends_with"===r.format)return`F\xe2sit metin: "${r.suffix}" ile bitmeli.`;if("includes"===r.format)return`F\xe2sit metin: "${r.includes}" ihtiv\xe2 etmeli.`;if("regex"===r.format)return`F\xe2sit metin: ${r.pattern} nakşına uymalı.`;return`F\xe2sit ${t[r.format]??r.format}`;case"not_multiple_of":return`F\xe2sit sayı: ${r.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${r.keys.length>1?"s":""}: ${vn(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xe7in tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${r.origin} i\xe7in tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}})}},"pl",0,function(){let e,t,n;return{localeError:(e={string:{unit:"znaków",verb:"mieć"},file:{unit:"bajtów",verb:"mieć"},array:{unit:"elementów",verb:"mieć"},set:{unit:"elementów",verb:"mieć"}},t={regex:"wyrażenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ciąg znaków zakodowany w formacie base64",base64url:"ciąg znaków zakodowany w formacie base64url",json_string:"ciąg znaków w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wejście"},n={nan:"NaN",number:"liczba",array:"tablica"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${r.expected}, otrzymano ${i}`;return`Nieprawidłowe dane wejściowe: oczekiwano ${e}, otrzymano ${i}`}case"invalid_value":if(1===r.values.length)return`Nieprawidłowe dane wejściowe: oczekiwano ${vk(r.values[0])}`;return`Nieprawidłowa opcja: oczekiwano jednej z wartości ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Za duża wartość: oczekiwano, że ${r.origin??"wartość"} będzie mieć ${t}${r.maximum.toString()} ${n.unit??"elementów"}`;return`Zbyt duż(y/a/e): oczekiwano, że ${r.origin??"wartość"} będzie wynosić ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Za mała wartość: oczekiwano, że ${r.origin??"wartość"} będzie mieć ${t}${r.minimum.toString()} ${n.unit??"elementów"}`;return`Zbyt mał(y/a/e): oczekiwano, że ${r.origin??"wartość"} będzie wynosić ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Nieprawidłowy ciąg znak\xf3w: musi zaczynać się od "${r.prefix}"`;if("ends_with"===r.format)return`Nieprawidłowy ciąg znak\xf3w: musi kończyć się na "${r.suffix}"`;if("includes"===r.format)return`Nieprawidłowy ciąg znak\xf3w: musi zawierać "${r.includes}"`;if("regex"===r.format)return`Nieprawidłowy ciąg znak\xf3w: musi odpowiadać wzorcowi ${r.pattern}`;return`Nieprawidłow(y/a/e) ${t[r.format]??r.format}`;case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${r.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${r.keys.length>1?"s":""}: ${vn(r.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${r.origin}`;case"invalid_union":default:return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${r.origin}`}})}},"ps",0,function(){let e,t,n;return{localeError:(e={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}},t={regex:"ورودي",email:"بریښنالیک",url:"یو آر ال",emoji:"ایموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"نیټه او وخت",date:"نېټه",time:"وخت",duration:"موده",ipv4:"د IPv4 پته",ipv6:"د IPv6 پته",cidrv4:"د IPv4 ساحه",cidrv6:"د IPv6 ساحه",base64:"base64-encoded متن",base64url:"base64url-encoded متن",json_string:"JSON متن",e164:"د E.164 شمېره",jwt:"JWT",template_literal:"ورودي"},n={nan:"NaN",number:"عدد",array:"ارې"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`ناسم ورودي: باید instanceof ${r.expected} وای, مګر ${i} ترلاسه شو`;return`ناسم ورودي: باید ${e} وای, مګر ${i} ترلاسه شو`}case"invalid_value":if(1===r.values.length)return`ناسم ورودي: باید ${vk(r.values[0])} وای`;return`ناسم انتخاب: باید یو له ${vn(r.values,"|")} څخه وای`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`ډیر لوی: ${r.origin??"ارزښت"} باید ${t}${r.maximum.toString()} ${n.unit??"عنصرونه"} ولري`;return`ډیر لوی: ${r.origin??"ارزښت"} باید ${t}${r.maximum.toString()} وي`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`ډیر کوچنی: ${r.origin} باید ${t}${r.minimum.toString()} ${n.unit} ولري`;return`ډیر کوچنی: ${r.origin} باید ${t}${r.minimum.toString()} وي`}case"invalid_format":if("starts_with"===r.format)return`ناسم متن: باید د "${r.prefix}" سره پیل شي`;if("ends_with"===r.format)return`ناسم متن: باید د "${r.suffix}" سره پای ته ورسيږي`;if("includes"===r.format)return`ناسم متن: باید "${r.includes}" ولري`;if("regex"===r.format)return`ناسم متن: باید د ${r.pattern} سره مطابقت ولري`;return`${t[r.format]??r.format} ناسم دی`;case"not_multiple_of":return`ناسم عدد: باید د ${r.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${r.keys.length>1?"کلیډونه":"کلیډ"}: ${vn(r.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${r.origin} کې`;case"invalid_union":default:return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${r.origin} کې`}})}},"pt",0,function(){let e,t,n;return{localeError:(e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}},t={regex:"padrão",email:"endereço de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"duração ISO",ipv4:"endereço IPv4",ipv6:"endereço IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},n={nan:"NaN",number:"número",null:"nulo"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Tipo inv\xe1lido: esperado instanceof ${r.expected}, recebido ${i}`;return`Tipo inv\xe1lido: esperado ${e}, recebido ${i}`}case"invalid_value":if(1===r.values.length)return`Entrada inv\xe1lida: esperado ${vk(r.values[0])}`;return`Op\xe7\xe3o inv\xe1lida: esperada uma das ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Muito grande: esperado que ${r.origin??"valor"} tivesse ${t}${r.maximum.toString()} ${n.unit??"elementos"}`;return`Muito grande: esperado que ${r.origin??"valor"} fosse ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Muito pequeno: esperado que ${r.origin} tivesse ${t}${r.minimum.toString()} ${n.unit}`;return`Muito pequeno: esperado que ${r.origin} fosse ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Texto inv\xe1lido: deve come\xe7ar com "${r.prefix}"`;if("ends_with"===r.format)return`Texto inv\xe1lido: deve terminar com "${r.suffix}"`;if("includes"===r.format)return`Texto inv\xe1lido: deve incluir "${r.includes}"`;if("regex"===r.format)return`Texto inv\xe1lido: deve corresponder ao padr\xe3o ${r.pattern}`;return`${t[r.format]??r.format} inv\xe1lido`;case"not_multiple_of":return`N\xfamero inv\xe1lido: deve ser m\xfaltiplo de ${r.divisor}`;case"unrecognized_keys":return`Chave${r.keys.length>1?"s":""} desconhecida${r.keys.length>1?"s":""}: ${vn(r.keys,", ")}`;case"invalid_key":return`Chave inv\xe1lida em ${r.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inv\xe1lido em ${r.origin}`;default:return"Campo inválido"}})}},"ru",0,function(){let e,t,n;return{localeError:(e={string:{unit:{one:"символ",few:"символа",many:"символов"},verb:"иметь"},file:{unit:{one:"байт",few:"байта",many:"байт"},verb:"иметь"},array:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"},set:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"}},t={regex:"ввод",email:"email адрес",url:"URL",emoji:"эмодзи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата и время",date:"ISO дата",time:"ISO время",duration:"ISO длительность",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"строка в формате base64",base64url:"строка в формате base64url",json_string:"JSON строка",e164:"номер E.164",jwt:"JWT",template_literal:"ввод"},n={nan:"NaN",number:"число",array:"массив"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Неверный ввод: ожидалось instanceof ${r.expected}, получено ${i}`;return`Неверный ввод: ожидалось ${e}, получено ${i}`}case"invalid_value":if(1===r.values.length)return`Неверный ввод: ожидалось ${vk(r.values[0])}`;return`Неверный вариант: ожидалось одно из ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n){let e=b0(Number(r.maximum),n.unit.one,n.unit.few,n.unit.many);return`Слишком большое значение: ожидалось, что ${r.origin??"значение"} будет иметь ${t}${r.maximum.toString()} ${e}`}return`Слишком большое значение: ожидалось, что ${r.origin??"значение"} будет ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n){let e=b0(Number(r.minimum),n.unit.one,n.unit.few,n.unit.many);return`Слишком маленькое значение: ожидалось, что ${r.origin} будет иметь ${t}${r.minimum.toString()} ${e}`}return`Слишком маленькое значение: ожидалось, что ${r.origin} будет ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Неверная строка: должна начинаться с "${r.prefix}"`;if("ends_with"===r.format)return`Неверная строка: должна заканчиваться на "${r.suffix}"`;if("includes"===r.format)return`Неверная строка: должна содержать "${r.includes}"`;if("regex"===r.format)return`Неверная строка: должна соответствовать шаблону ${r.pattern}`;return`Неверный ${t[r.format]??r.format}`;case"not_multiple_of":return`Неверное число: должно быть кратным ${r.divisor}`;case"unrecognized_keys":return`Нераспознанн${r.keys.length>1?"ые":"ый"} ключ${r.keys.length>1?"и":""}: ${vn(r.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${r.origin}`;case"invalid_union":default:return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${r.origin}`}})}},"sl",0,function(){let e,t,n;return{localeError:(e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}},t={regex:"vnos",email:"e-poštni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in čas",date:"ISO datum",time:"ISO čas",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 številka",jwt:"JWT",template_literal:"vnos"},n={nan:"NaN",number:"število",array:"tabela"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Neveljaven vnos: pričakovano instanceof ${r.expected}, prejeto ${i}`;return`Neveljaven vnos: pričakovano ${e}, prejeto ${i}`}case"invalid_value":if(1===r.values.length)return`Neveljaven vnos: pričakovano ${vk(r.values[0])}`;return`Neveljavna možnost: pričakovano eno izmed ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Preveliko: pričakovano, da bo ${r.origin??"vrednost"} imelo ${t}${r.maximum.toString()} ${n.unit??"elementov"}`;return`Preveliko: pričakovano, da bo ${r.origin??"vrednost"} ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Premajhno: pričakovano, da bo ${r.origin} imelo ${t}${r.minimum.toString()} ${n.unit}`;return`Premajhno: pričakovano, da bo ${r.origin} ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Neveljaven niz: mora se začeti z "${r.prefix}"`;if("ends_with"===r.format)return`Neveljaven niz: mora se končati z "${r.suffix}"`;if("includes"===r.format)return`Neveljaven niz: mora vsebovati "${r.includes}"`;if("regex"===r.format)return`Neveljaven niz: mora ustrezati vzorcu ${r.pattern}`;return`Neveljaven ${t[r.format]??r.format}`;case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${r.divisor}`;case"unrecognized_keys":return`Neprepoznan${r.keys.length>1?"i ključi":" ključ"}: ${vn(r.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${r.origin}`;case"invalid_union":default:return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${r.origin}`}})}},"sv",0,function(){let e,t,n;return{localeError:(e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att innehålla"},set:{unit:"objekt",verb:"att innehålla"}},t={regex:"reguljärt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad sträng",base64url:"base64url-kodad sträng",json_string:"JSON-sträng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},n={nan:"NaN",number:"antal",array:"lista"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Ogiltig inmatning: f\xf6rv\xe4ntat instanceof ${r.expected}, fick ${i}`;return`Ogiltig inmatning: f\xf6rv\xe4ntat ${e}, fick ${i}`}case"invalid_value":if(1===r.values.length)return`Ogiltig inmatning: f\xf6rv\xe4ntat ${vk(r.values[0])}`;return`Ogiltigt val: f\xf6rv\xe4ntade en av ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`F\xf6r stor(t): f\xf6rv\xe4ntade ${r.origin??"värdet"} att ha ${t}${r.maximum.toString()} ${n.unit??"element"}`;return`F\xf6r stor(t): f\xf6rv\xe4ntat ${r.origin??"värdet"} att ha ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`F\xf6r lite(t): f\xf6rv\xe4ntade ${r.origin??"värdet"} att ha ${t}${r.minimum.toString()} ${n.unit}`;return`F\xf6r lite(t): f\xf6rv\xe4ntade ${r.origin??"värdet"} att ha ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Ogiltig str\xe4ng: m\xe5ste b\xf6rja med "${r.prefix}"`;if("ends_with"===r.format)return`Ogiltig str\xe4ng: m\xe5ste sluta med "${r.suffix}"`;if("includes"===r.format)return`Ogiltig str\xe4ng: m\xe5ste inneh\xe5lla "${r.includes}"`;if("regex"===r.format)return`Ogiltig str\xe4ng: m\xe5ste matcha m\xf6nstret "${r.pattern}"`;return`Ogiltig(t) ${t[r.format]??r.format}`;case"not_multiple_of":return`Ogiltigt tal: m\xe5ste vara en multipel av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${vn(r.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${r.origin??"värdet"}`;case"invalid_union":default:return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xe4rde i ${r.origin??"värdet"}`}})}},"ta",0,function(){let e,t,n;return{localeError:(e={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}},t={regex:"உள்ளீடு",email:"மின்னஞ்சல் முகவரி",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO தேதி நேரம்",date:"ISO தேதி",time:"ISO நேரம்",duration:"ISO கால அளவு",ipv4:"IPv4 முகவரி",ipv6:"IPv6 முகவரி",cidrv4:"IPv4 வரம்பு",cidrv6:"IPv6 வரம்பு",base64:"base64-encoded சரம்",base64url:"base64url-encoded சரம்",json_string:"JSON சரம்",e164:"E.164 எண்",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"எண்",array:"அணி",null:"வெறுமை"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${r.expected}, பெறப்பட்டது ${i}`;return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${e}, பெறப்பட்டது ${i}`}case"invalid_value":if(1===r.values.length)return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${vk(r.values[0])}`;return`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${vn(r.values,"|")} இல் ஒன்று`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${r.origin??"மதிப்பு"} ${t}${r.maximum.toString()} ${n.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`;return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${r.origin??"மதிப்பு"} ${t}${r.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${r.origin} ${t}${r.minimum.toString()} ${n.unit} ஆக இருக்க வேண்டும்`;return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${r.origin} ${t}${r.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":if("starts_with"===r.format)return`தவறான சரம்: "${r.prefix}" இல் தொடங்க வேண்டும்`;if("ends_with"===r.format)return`தவறான சரம்: "${r.suffix}" இல் முடிவடைய வேண்டும்`;if("includes"===r.format)return`தவறான சரம்: "${r.includes}" ஐ உள்ளடக்க வேண்டும்`;if("regex"===r.format)return`தவறான சரம்: ${r.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`;return`தவறான ${t[r.format]??r.format}`;case"not_multiple_of":return`தவறான எண்: ${r.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${r.keys.length>1?"கள்":""}: ${vn(r.keys,", ")}`;case"invalid_key":return`${r.origin} இல் தவறான விசை`;case"invalid_union":default:return"தவறான உள்ளீடு";case"invalid_element":return`${r.origin} இல் தவறான மதிப்பு`}})}},"th",0,function(){let e,t,n;return{localeError:(e={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}},t={regex:"ข้อมูลที่ป้อน",email:"ที่อยู่อีเมล",url:"URL",emoji:"อิโมจิ",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"วันที่เวลาแบบ ISO",date:"วันที่แบบ ISO",time:"เวลาแบบ ISO",duration:"ช่วงเวลาแบบ ISO",ipv4:"ที่อยู่ IPv4",ipv6:"ที่อยู่ IPv6",cidrv4:"ช่วง IP แบบ IPv4",cidrv6:"ช่วง IP แบบ IPv6",base64:"ข้อความแบบ Base64",base64url:"ข้อความแบบ Base64 สำหรับ URL",json_string:"ข้อความแบบ JSON",e164:"เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",jwt:"โทเคน JWT",template_literal:"ข้อมูลที่ป้อน"},n={nan:"NaN",number:"ตัวเลข",array:"อาร์เรย์ (Array)",null:"ไม่มีค่า (null)"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${r.expected} แต่ได้รับ ${i}`;return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${e} แต่ได้รับ ${i}`}case"invalid_value":if(1===r.values.length)return`ค่าไม่ถูกต้อง: ควรเป็น ${vk(r.values[0])}`;return`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"ไม่เกิน":"น้อยกว่า",n=e[r.origin]??null;if(n)return`เกินกำหนด: ${r.origin??"ค่า"} ควรมี${t} ${r.maximum.toString()} ${n.unit??"รายการ"}`;return`เกินกำหนด: ${r.origin??"ค่า"} ควรมี${t} ${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?"อย่างน้อย":"มากกว่า",n=e[r.origin]??null;if(n)return`น้อยกว่ากำหนด: ${r.origin} ควรมี${t} ${r.minimum.toString()} ${n.unit}`;return`น้อยกว่ากำหนด: ${r.origin} ควรมี${t} ${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${r.prefix}"`;if("ends_with"===r.format)return`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${r.suffix}"`;if("includes"===r.format)return`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${r.includes}" อยู่ในข้อความ`;if("regex"===r.format)return`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${r.pattern}`;return`รูปแบบไม่ถูกต้อง: ${t[r.format]??r.format}`;case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${r.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${vn(r.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${r.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${r.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}})}},"tr",0,function(){let e,t,n;return{localeError:(e={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}},t={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO süre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aralığı",cidrv6:"IPv6 aralığı",base64:"base64 ile şifrelenmiş metin",base64url:"base64url ile şifrelenmiş metin",json_string:"JSON dizesi",e164:"E.164 sayısı",jwt:"JWT",template_literal:"Şablon dizesi"},n={nan:"NaN"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Ge\xe7ersiz değer: beklenen instanceof ${r.expected}, alınan ${i}`;return`Ge\xe7ersiz değer: beklenen ${e}, alınan ${i}`}case"invalid_value":if(1===r.values.length)return`Ge\xe7ersiz değer: beklenen ${vk(r.values[0])}`;return`Ge\xe7ersiz se\xe7enek: aşağıdakilerden biri olmalı: ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`\xc7ok b\xfcy\xfck: beklenen ${r.origin??"değer"} ${t}${r.maximum.toString()} ${n.unit??"öğe"}`;return`\xc7ok b\xfcy\xfck: beklenen ${r.origin??"değer"} ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`\xc7ok k\xfc\xe7\xfck: beklenen ${r.origin} ${t}${r.minimum.toString()} ${n.unit}`;return`\xc7ok k\xfc\xe7\xfck: beklenen ${r.origin} ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Ge\xe7ersiz metin: "${r.prefix}" ile başlamalı`;if("ends_with"===r.format)return`Ge\xe7ersiz metin: "${r.suffix}" ile bitmeli`;if("includes"===r.format)return`Ge\xe7ersiz metin: "${r.includes}" i\xe7ermeli`;if("regex"===r.format)return`Ge\xe7ersiz metin: ${r.pattern} desenine uymalı`;return`Ge\xe7ersiz ${t[r.format]??r.format}`;case"not_multiple_of":return`Ge\xe7ersiz sayı: ${r.divisor} ile tam b\xf6l\xfcnebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${r.keys.length>1?"lar":""}: ${vn(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xe7inde ge\xe7ersiz anahtar`;case"invalid_union":default:return"Geçersiz değer";case"invalid_element":return`${r.origin} i\xe7inde ge\xe7ersiz değer`}})}},"ua",0,function(){return b1()},"uk",0,b1,"ur",0,function(){let e,t,n;return{localeError:(e={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}},t={regex:"ان پٹ",email:"ای میل ایڈریس",url:"یو آر ایل",emoji:"ایموجی",uuid:"یو یو آئی ڈی",uuidv4:"یو یو آئی ڈی وی 4",uuidv6:"یو یو آئی ڈی وی 6",nanoid:"نینو آئی ڈی",guid:"جی یو آئی ڈی",cuid:"سی یو آئی ڈی",cuid2:"سی یو آئی ڈی 2",ulid:"یو ایل آئی ڈی",xid:"ایکس آئی ڈی",ksuid:"کے ایس یو آئی ڈی",datetime:"آئی ایس او ڈیٹ ٹائم",date:"آئی ایس او تاریخ",time:"آئی ایس او وقت",duration:"آئی ایس او مدت",ipv4:"آئی پی وی 4 ایڈریس",ipv6:"آئی پی وی 6 ایڈریس",cidrv4:"آئی پی وی 4 رینج",cidrv6:"آئی پی وی 6 رینج",base64:"بیس 64 ان کوڈڈ سٹرنگ",base64url:"بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",json_string:"جے ایس او این سٹرنگ",e164:"ای 164 نمبر",jwt:"جے ڈبلیو ٹی",template_literal:"ان پٹ"},n={nan:"NaN",number:"نمبر",array:"آرے",null:"نل"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`غلط ان پٹ: instanceof ${r.expected} متوقع تھا، ${i} موصول ہوا`;return`غلط ان پٹ: ${e} متوقع تھا، ${i} موصول ہوا`}case"invalid_value":if(1===r.values.length)return`غلط ان پٹ: ${vk(r.values[0])} متوقع تھا`;return`غلط آپشن: ${vn(r.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`بہت بڑا: ${r.origin??"ویلیو"} کے ${t}${r.maximum.toString()} ${n.unit??"عناصر"} ہونے متوقع تھے`;return`بہت بڑا: ${r.origin??"ویلیو"} کا ${t}${r.maximum.toString()} ہونا متوقع تھا`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`بہت چھوٹا: ${r.origin} کے ${t}${r.minimum.toString()} ${n.unit} ہونے متوقع تھے`;return`بہت چھوٹا: ${r.origin} کا ${t}${r.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":if("starts_with"===r.format)return`غلط سٹرنگ: "${r.prefix}" سے شروع ہونا چاہیے`;if("ends_with"===r.format)return`غلط سٹرنگ: "${r.suffix}" پر ختم ہونا چاہیے`;if("includes"===r.format)return`غلط سٹرنگ: "${r.includes}" شامل ہونا چاہیے`;if("regex"===r.format)return`غلط سٹرنگ: پیٹرن ${r.pattern} سے میچ ہونا چاہیے`;return`غلط ${t[r.format]??r.format}`;case"not_multiple_of":return`غلط نمبر: ${r.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${r.keys.length>1?"ز":""}: ${vn(r.keys,"، ")}`;case"invalid_key":return`${r.origin} میں غلط کی`;case"invalid_union":default:return"غلط ان پٹ";case"invalid_element":return`${r.origin} میں غلط ویلیو`}})}},"uz",0,function(){let e,t,n;return{localeError:(e={string:{unit:"belgi",verb:"bo‘lishi kerak"},file:{unit:"bayt",verb:"bo‘lishi kerak"},array:{unit:"element",verb:"bo‘lishi kerak"},set:{unit:"element",verb:"bo‘lishi kerak"}},t={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},n={nan:"NaN",number:"raqam",array:"massiv"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Noto‘g‘ri kirish: kutilgan instanceof ${r.expected}, qabul qilingan ${i}`;return`Noto‘g‘ri kirish: kutilgan ${e}, qabul qilingan ${i}`}case"invalid_value":if(1===r.values.length)return`Noto‘g‘ri kirish: kutilgan ${vk(r.values[0])}`;return`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Juda katta: kutilgan ${r.origin??"qiymat"} ${t}${r.maximum.toString()} ${n.unit} ${n.verb}`;return`Juda katta: kutilgan ${r.origin??"qiymat"} ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Juda kichik: kutilgan ${r.origin} ${t}${r.minimum.toString()} ${n.unit} ${n.verb}`;return`Juda kichik: kutilgan ${r.origin} ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Noto‘g‘ri satr: "${r.prefix}" bilan boshlanishi kerak`;if("ends_with"===r.format)return`Noto‘g‘ri satr: "${r.suffix}" bilan tugashi kerak`;if("includes"===r.format)return`Noto‘g‘ri satr: "${r.includes}" ni o‘z ichiga olishi kerak`;if("regex"===r.format)return`Noto‘g‘ri satr: ${r.pattern} shabloniga mos kelishi kerak`;return`Noto‘g‘ri ${t[r.format]??r.format}`;case"not_multiple_of":return`Noto‘g‘ri raqam: ${r.divisor} ning karralisi bo‘lishi kerak`;case"unrecognized_keys":return`Noma’lum kalit${r.keys.length>1?"lar":""}: ${vn(r.keys,", ")}`;case"invalid_key":return`${r.origin} dagi kalit noto‘g‘ri`;case"invalid_union":default:return"Noto‘g‘ri kirish";case"invalid_element":return`${r.origin} da noto‘g‘ri qiymat`}})}},"vi",0,function(){let e,t,n;return{localeError:(e={string:{unit:"ký tự",verb:"có"},file:{unit:"byte",verb:"có"},array:{unit:"phần tử",verb:"có"},set:{unit:"phần tử",verb:"có"}},t={regex:"đầu vào",email:"địa chỉ email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ngày giờ ISO",date:"ngày ISO",time:"giờ ISO",duration:"khoảng thời gian ISO",ipv4:"địa chỉ IPv4",ipv6:"địa chỉ IPv6",cidrv4:"dải IPv4",cidrv6:"dải IPv6",base64:"chuỗi mã hóa base64",base64url:"chuỗi mã hóa base64url",json_string:"chuỗi JSON",e164:"số E.164",jwt:"JWT",template_literal:"đầu vào"},n={nan:"NaN",number:"số",array:"mảng"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Đầu v\xe0o kh\xf4ng hợp lệ: mong đợi instanceof ${r.expected}, nhận được ${i}`;return`Đầu v\xe0o kh\xf4ng hợp lệ: mong đợi ${e}, nhận được ${i}`}case"invalid_value":if(1===r.values.length)return`Đầu v\xe0o kh\xf4ng hợp lệ: mong đợi ${vk(r.values[0])}`;return`T\xf9y chọn kh\xf4ng hợp lệ: mong đợi một trong c\xe1c gi\xe1 trị ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Qu\xe1 lớn: mong đợi ${r.origin??"giá trị"} ${n.verb} ${t}${r.maximum.toString()} ${n.unit??"phần tử"}`;return`Qu\xe1 lớn: mong đợi ${r.origin??"giá trị"} ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Qu\xe1 nhỏ: mong đợi ${r.origin} ${n.verb} ${t}${r.minimum.toString()} ${n.unit}`;return`Qu\xe1 nhỏ: mong đợi ${r.origin} ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Chuỗi kh\xf4ng hợp lệ: phải bắt đầu bằng "${r.prefix}"`;if("ends_with"===r.format)return`Chuỗi kh\xf4ng hợp lệ: phải kết th\xfac bằng "${r.suffix}"`;if("includes"===r.format)return`Chuỗi kh\xf4ng hợp lệ: phải bao gồm "${r.includes}"`;if("regex"===r.format)return`Chuỗi kh\xf4ng hợp lệ: phải khớp với mẫu ${r.pattern}`;return`${t[r.format]??r.format} kh\xf4ng hợp lệ`;case"not_multiple_of":return`Số kh\xf4ng hợp lệ: phải l\xe0 bội số của ${r.divisor}`;case"unrecognized_keys":return`Kh\xf3a kh\xf4ng được nhận dạng: ${vn(r.keys,", ")}`;case"invalid_key":return`Kh\xf3a kh\xf4ng hợp lệ trong ${r.origin}`;case"invalid_union":default:return"Đầu vào không hợp lệ";case"invalid_element":return`Gi\xe1 trị kh\xf4ng hợp lệ trong ${r.origin}`}})}},"yo",0,function(){let e,t,n;return{localeError:(e={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"}},t={regex:"ẹ̀rọ ìbáwọlé",email:"àdírẹ́sì ìmẹ́lì",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:"àkókò ISO",date:"ọjọ́ ISO",time:"àkókò ISO",duration:"àkókò tó pé ISO",ipv4:"àdírẹ́sì IPv4",ipv6:"àdírẹ́sì IPv6",cidrv4:"àgbègbè IPv4",cidrv6:"àgbègbè IPv6",base64:"ọ̀rọ̀ tí a kọ́ ní base64",base64url:"ọ̀rọ̀ base64url",json_string:"ọ̀rọ̀ JSON",e164:"nọ́mbà E.164",jwt:"JWT",template_literal:"ẹ̀rọ ìbáwọlé"},n={nan:"NaN",number:"nọ́mbà",array:"akopọ"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`\xccb\xe1wọl\xe9 aṣ\xecṣe: a n\xed l\xe1ti fi instanceof ${r.expected}, \xe0mọ̀ a r\xed ${i}`;return`\xccb\xe1wọl\xe9 aṣ\xecṣe: a n\xed l\xe1ti fi ${e}, \xe0mọ̀ a r\xed ${i}`}case"invalid_value":if(1===r.values.length)return`\xccb\xe1wọl\xe9 aṣ\xecṣe: a n\xed l\xe1ti fi ${vk(r.values[0])}`;return`\xc0ṣ\xe0y\xe0n aṣ\xecṣe: yan ọ̀kan l\xe1ra ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`T\xf3 pọ̀ j\xf9: a n\xed l\xe1ti jẹ́ p\xe9 ${r.origin??"iye"} ${n.verb} ${t}${r.maximum} ${n.unit}`;return`T\xf3 pọ̀ j\xf9: a n\xed l\xe1ti jẹ́ ${t}${r.maximum}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`K\xe9r\xe9 ju: a n\xed l\xe1ti jẹ́ p\xe9 ${r.origin} ${n.verb} ${t}${r.minimum} ${n.unit}`;return`K\xe9r\xe9 ju: a n\xed l\xe1ti jẹ́ ${t}${r.minimum}`}case"invalid_format":if("starts_with"===r.format)return`Ọ̀rọ̀ aṣ\xecṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀l\xfa "${r.prefix}"`;if("ends_with"===r.format)return`Ọ̀rọ̀ aṣ\xecṣe: gbọ́dọ̀ par\xed pẹ̀l\xfa "${r.suffix}"`;if("includes"===r.format)return`Ọ̀rọ̀ aṣ\xecṣe: gbọ́dọ̀ n\xed "${r.includes}"`;if("regex"===r.format)return`Ọ̀rọ̀ aṣ\xecṣe: gbọ́dọ̀ b\xe1 \xe0pẹẹrẹ mu ${r.pattern}`;return`Aṣ\xecṣe: ${t[r.format]??r.format}`;case"not_multiple_of":return`Nọ́mb\xe0 aṣ\xecṣe: gbọ́dọ̀ jẹ́ \xe8y\xe0 p\xedp\xedn ti ${r.divisor}`;case"unrecognized_keys":return`Bọt\xecn\xec \xe0\xecmọ̀: ${vn(r.keys,", ")}`;case"invalid_key":return`Bọt\xecn\xec aṣ\xecṣe n\xedn\xfa ${r.origin}`;case"invalid_union":default:return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣ\xecṣe n\xedn\xfa ${r.origin}`}})}},"zhCN",0,function(){let e,t,n;return{localeError:(e={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}},t={regex:"输入",email:"电子邮件",url:"URL",emoji:"表情符号",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日期时间",date:"ISO日期",time:"ISO时间",duration:"ISO时长",ipv4:"IPv4地址",ipv6:"IPv6地址",cidrv4:"IPv4网段",cidrv6:"IPv6网段",base64:"base64编码字符串",base64url:"base64url编码字符串",json_string:"JSON字符串",e164:"E.164号码",jwt:"JWT",template_literal:"输入"},n={nan:"NaN",number:"数字",array:"数组",null:"空值(null)"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`无效输入:期望 instanceof ${r.expected},实际接收 ${i}`;return`无效输入:期望 ${e},实际接收 ${i}`}case"invalid_value":if(1===r.values.length)return`无效输入:期望 ${vk(r.values[0])}`;return`无效选项:期望以下之一 ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`数值过大:期望 ${r.origin??"值"} ${t}${r.maximum.toString()} ${n.unit??"个元素"}`;return`数值过大:期望 ${r.origin??"值"} ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`数值过小:期望 ${r.origin} ${t}${r.minimum.toString()} ${n.unit}`;return`数值过小:期望 ${r.origin} ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`无效字符串:必须以 "${r.prefix}" 开头`;if("ends_with"===r.format)return`无效字符串:必须以 "${r.suffix}" 结尾`;if("includes"===r.format)return`无效字符串:必须包含 "${r.includes}"`;if("regex"===r.format)return`无效字符串:必须满足正则表达式 ${r.pattern}`;return`无效${t[r.format]??r.format}`;case"not_multiple_of":return`无效数字:必须是 ${r.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${vn(r.keys,", ")}`;case"invalid_key":return`${r.origin} 中的键(key)无效`;case"invalid_union":default:return"无效输入";case"invalid_element":return`${r.origin} 中包含无效值(value)`}})}},"zhTW",0,function(){let e,t,n;return{localeError:(e={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}},t={regex:"輸入",email:"郵件地址",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 日期時間",date:"ISO 日期",time:"ISO 時間",duration:"ISO 期間",ipv4:"IPv4 位址",ipv6:"IPv6 位址",cidrv4:"IPv4 範圍",cidrv6:"IPv6 範圍",base64:"base64 編碼字串",base64url:"base64url 編碼字串",json_string:"JSON 字串",e164:"E.164 數值",jwt:"JWT",template_literal:"輸入"},n={nan:"NaN"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`無效的輸入值:預期為 instanceof ${r.expected},但收到 ${i}`;return`無效的輸入值:預期為 ${e},但收到 ${i}`}case"invalid_value":if(1===r.values.length)return`無效的輸入值:預期為 ${vk(r.values[0])}`;return`無效的選項:預期為以下其中之一 ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`數值過大:預期 ${r.origin??"值"} 應為 ${t}${r.maximum.toString()} ${n.unit??"個元素"}`;return`數值過大:預期 ${r.origin??"值"} 應為 ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`數值過小:預期 ${r.origin} 應為 ${t}${r.minimum.toString()} ${n.unit}`;return`數值過小:預期 ${r.origin} 應為 ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`無效的字串:必須以 "${r.prefix}" 開頭`;if("ends_with"===r.format)return`無效的字串:必須以 "${r.suffix}" 結尾`;if("includes"===r.format)return`無效的字串:必須包含 "${r.includes}"`;if("regex"===r.format)return`無效的字串:必須符合格式 ${r.pattern}`;return`無效的 ${t[r.format]??r.format}`;case"not_multiple_of":return`無效的數字:必須為 ${r.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${r.keys.length>1?"們":""}:${vn(r.keys,"、")}`;case"invalid_key":return`${r.origin} 中有無效的鍵值`;case"invalid_union":default:return"無效的輸入值";case"invalid_element":return`${r.origin} 中有無效的值`}})}}],54580);var IZ=e.i(54580);e.i(25527),e.i(98530),e.i(50215),e.i(34966),e.s([],18249);var IA=e.i(18249);e.s(["$ZodAny",0,y4,"$ZodArray",0,y8,"$ZodAsyncError",0,g9,"$ZodBase64",0,yM,"$ZodBase64URL",0,yB,"$ZodBigInt",0,yY,"$ZodBigIntFormat",0,yX,"$ZodBoolean",0,yq,"$ZodCIDRv4",0,yA,"$ZodCIDRv6",0,yR,"$ZodCUID",0,yI,"$ZodCUID2",0,yj,"$ZodCatch",0,bT,"$ZodCheck",0,x1,"$ZodCheckBigIntFormat",0,x9,"$ZodCheckEndsWith",0,yd,"$ZodCheckGreaterThan",0,x2,"$ZodCheckIncludes",0,yl,"$ZodCheckLengthEquals",0,yr,"$ZodCheckLessThan",0,x6,"$ZodCheckLowerCase",0,yo,"$ZodCheckMaxLength",0,yt,"$ZodCheckMaxSize",0,x8,"$ZodCheckMimeType",0,yf,"$ZodCheckMinLength",0,yn,"$ZodCheckMinSize",0,x7,"$ZodCheckMultipleOf",0,x5,"$ZodCheckNumberFormat",0,x3,"$ZodCheckOverwrite",0,yp,"$ZodCheckProperty",0,ym,"$ZodCheckRegex",0,ya,"$ZodCheckSizeEquals",0,ye,"$ZodCheckStartsWith",0,yu,"$ZodCheckStringFormat",0,yi,"$ZodCheckUpperCase",0,ys,"$ZodCodec",0,bP,"$ZodCustom",0,bH,"$ZodCustomStringFormat",0,yJ,"$ZodDate",0,y3,"$ZodDefault",0,bI,"$ZodDiscriminatedUnion",0,bl,"$ZodE164",0,yW,"$ZodEmail",0,y$,"$ZodEmoji",0,yk,"$ZodEncodeError",0,g8,"$ZodEnum",0,bx,"$ZodError",0,vR,"$ZodExactOptional",0,bk,"$ZodFile",0,bb,"$ZodFunction",0,bF,"$ZodGUID",0,yb,"$ZodIPv4",0,yU,"$ZodIPv6",0,yP,"$ZodISODate",0,yT,"$ZodISODateTime",0,yO,"$ZodISODuration",0,yD,"$ZodISOTime",0,yC,"$ZodIntersection",0,bu,"$ZodJWT",0,yV,"$ZodKSUID",0,yE,"$ZodLazy",0,bW,"$ZodLiteral",0,by,"$ZodMAC",0,yZ,"$ZodMap",0,bp,"$ZodNaN",0,bC,"$ZodNanoID",0,yS,"$ZodNever",0,y2,"$ZodNonOptional",0,bz,"$ZodNull",0,y1,"$ZodNullable",0,bS,"$ZodNumber",0,yG,"$ZodNumberFormat",0,yK,"$ZodObject",0,bn,"$ZodObjectJIT",0,br,"$ZodOptional",0,bw,"$ZodPipe",0,bD,"$ZodPrefault",0,bN,"$ZodPromise",0,bB,"$ZodReadonly",0,bR,"$ZodRealError",0,vL,"$ZodRecord",0,bf,"$ZodRegistry",0,b2,"$ZodSet",0,bg,"$ZodString",0,yx,"$ZodStringFormat",0,yy,"$ZodSuccess",0,bO,"$ZodSymbol",0,yQ,"$ZodTemplateLiteral",0,bM,"$ZodTransform",0,b_,"$ZodTuple",0,bc,"$ZodType",0,yv,"$ZodULID",0,yN,"$ZodURL",0,yw,"$ZodUUID",0,y_,"$ZodUndefined",0,y0,"$ZodUnion",0,ba,"$ZodUnknown",0,y6,"$ZodVoid",0,y5,"$ZodXID",0,yz,"$ZodXor",0,bs,"$brand",0,g3,"$constructor",0,g5,"$input",0,b6,"$output",0,b4,"Doc",0,yh,"JSONSchema",0,IA,"JSONSchemaGenerator",0,class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let t=e?.target??"draft-2020-12";"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),this.ctx=$G({processors:wE,target:t,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,t={path:[],schemaPath:[]}){return $K(e,this.ctx,t)}emit(e,t){t&&(t.cycles&&(this.ctx.cycles=t.cycles),t.reused&&(this.ctx.reused=t.reused),t.external&&(this.ctx.external=t.external)),$q(this.ctx,e);let{"~standard":n,...r}=$Y(this.ctx,e);return r}},"NEVER",0,g2,"TimePrecision",0,_$,"_any",0,_B,"_array",0,$h,"_base64",0,_x,"_base64url",0,_y,"_bigint",0,_P,"_boolean",0,_D,"_catch",0,$D,"_check",0,$B,"_cidrv4",0,_g,"_cidrv6",0,_v,"_coercedBigint",0,_Z,"_coercedBoolean",0,_U,"_coercedDate",0,_G,"_coercedNumber",0,_N,"_coercedString",0,b8,"_cuid",0,_l,"_cuid2",0,_u,"_custom",0,$L,"_date",0,_J,"_decode",0,v4,"_decodeAsync",0,v3,"_default",0,$O,"_discriminatedUnion",0,$x,"_e164",0,_b,"_email",0,b7,"_emoji",0,_o,"_encode",0,v0,"_encodeAsync",0,v2,"_endsWith",0,$o,"_enum",0,$k,"_file",0,$j,"_float32",0,_E,"_float64",0,_O,"_gt",0,_X,"_gte",0,_Q,"_guid",0,_e,"_includes",0,$i,"_int",0,_z,"_int32",0,_T,"_int64",0,_A,"_intersection",0,$y,"_ipv4",0,_f,"_ipv6",0,_p,"_isoDate",0,_k,"_isoDateTime",0,_w,"_isoDuration",0,_I,"_isoTime",0,_S,"_jwt",0,__,"_ksuid",0,_m,"_lazy",0,$A,"_length",0,$e,"_literal",0,$I,"_lowercase",0,$n,"_lt",0,_q,"_lte",0,_Y,"_mac",0,_h,"_map",0,$$,"_max",0,_Y,"_maxLength",0,_8,"_maxSize",0,_5,"_mime",0,$l,"_min",0,_Q,"_minLength",0,_7,"_minSize",0,_3,"_multipleOf",0,_2,"_nan",0,_K,"_nanoid",0,_s,"_nativeEnum",0,$S,"_negative",0,_1,"_never",0,_H,"_nonnegative",0,_6,"_nonoptional",0,$T,"_nonpositive",0,_4,"_normalize",0,$d,"_null",0,_F,"_nullable",0,$E,"_number",0,_j,"_optional",0,$z,"_overwrite",0,$u,"_parse",0,vV,"_parseAsync",0,vG,"_pipe",0,$U,"_positive",0,_0,"_promise",0,$R,"_property",0,$s,"_readonly",0,$P,"_record",0,$_,"_refine",0,$M,"_regex",0,$t,"_safeDecode",0,xe,"_safeDecodeAsync",0,xi,"_safeEncode",0,v8,"_safeEncodeAsync",0,xn,"_safeParse",0,vq,"_safeParseAsync",0,vX,"_set",0,$w,"_size",0,_9,"_slugify",0,$p,"_startsWith",0,$a,"_string",0,b9,"_stringFormat",0,$J,"_stringbool",0,$V,"_success",0,$C,"_superRefine",0,$F,"_symbol",0,_L,"_templateLiteral",0,$Z,"_toLowerCase",0,$m,"_toUpperCase",0,$f,"_transform",0,$N,"_trim",0,$c,"_tuple",0,$b,"_uint32",0,_C,"_uint64",0,_R,"_ulid",0,_d,"_undefined",0,_M,"_union",0,$g,"_unknown",0,_W,"_uppercase",0,$r,"_url",0,_a,"_uuid",0,_t,"_uuidv4",0,_n,"_uuidv6",0,_r,"_uuidv7",0,_i,"_void",0,_V,"_xid",0,_c,"_xor",0,$v,"clone",0,v$,"config",0,ve,"createStandardJSONSchemaMethod",0,$Q,"createToJSONSchemaMethod",0,$X,"decode",0,v6,"decodeAsync",0,v9,"describe",0,$W,"encode",0,v1,"encodeAsync",0,v5,"extractDefs",0,$q,"finalize",0,$Y,"flattenError",0,vM,"formatError",0,vF,"globalConfig",0,g7,"globalRegistry",0,b3,"initializeContext",0,$G,"isValidBase64",0,yL,"isValidBase64URL",0,yF,"isValidJWT",0,yH,"locales",0,IZ,"meta",0,$H,"parse",0,vJ,"parseAsync",0,vK,"prettifyError",0,vH,"process",0,$K,"regexes",0,IP,"registry",0,b5,"safeDecode",0,xt,"safeDecodeAsync",0,xa,"safeEncode",0,v7,"safeEncodeAsync",0,xr,"safeParse",0,vY,"safeParseAsync",0,vQ,"toDotPath",0,vW,"toJSONSchema",0,wO,"treeifyError",0,vB,"util",0,IU,"version",0,yg],12717);var IR=e.i(12717);e.i(89282),e.i(364),e.i(6034),e.s(["$brand",0,g3,"ZodFirstPartyTypeKind",0,jq,"ZodIssueCode",0,IN,"config",0,ve,"getErrorMap",0,IE,"setErrorMap",0,Iz],58829),e.i(58829);var wT=wT,wC=wC,IL=e.i(13657);e.s(["$brand",0,g3,"$input",0,b6,"$output",0,b4,"NEVER",0,g2,"TimePrecision",0,_$,"ZodAny",0,Si,"ZodArray",0,Sp,"ZodBase64",0,kD,"ZodBase64URL",0,kP,"ZodBigInt",0,k6,"ZodBigIntFormat",0,k5,"ZodBoolean",0,k1,"ZodCIDRv4",0,kE,"ZodCIDRv6",0,kT,"ZodCUID",0,kp,"ZodCUID2",0,kg,"ZodCatch",0,S7,"ZodCodec",0,Ia,"ZodCustom",0,Iv,"ZodCustomStringFormat",0,kF,"ZodDate",0,Sm,"ZodDefault",0,S1,"ZodDiscriminatedUnion",0,SS,"ZodE164",0,kA,"ZodEmail",0,w8,"ZodEmoji",0,kd,"ZodEnum",0,SR,"ZodError",0,wB,"ZodExactOptional",0,Sq,"ZodFile",0,SW,"ZodFirstPartyTypeKind",0,jq,"ZodFunction",0,Ih,"ZodGUID",0,ke,"ZodIPv4",0,kk,"ZodIPv6",0,kN,"ZodISODate",0,wP,"ZodISODateTime",0,wD,"ZodISODuration",0,wL,"ZodISOTime",0,wA,"ZodIntersection",0,Sj,"ZodIssueCode",0,IN,"ZodJWT",0,kL,"ZodKSUID",0,k$,"ZodLazy",0,Ic,"ZodLiteral",0,SF,"ZodMAC",0,kI,"ZodMap",0,SU,"ZodNaN",0,It,"ZodNanoID",0,km,"ZodNever",0,Sl,"ZodNonOptional",0,S5,"ZodNull",0,Sn,"ZodNullable",0,SX,"ZodNumber",0,kJ,"ZodNumberFormat",0,kK,"ZodObject",0,Sv,"ZodOptional",0,SG,"ZodPipe",0,Ir,"ZodPrefault",0,S6,"ZodPromise",0,If,"ZodReadonly",0,Is,"ZodRealError",0,wW,"ZodRecord",0,SO,"ZodSet",0,SZ,"ZodString",0,w5,"ZodStringFormat",0,w9,"ZodSuccess",0,S9,"ZodSymbol",0,k8,"ZodTemplateLiteral",0,Iu,"ZodTransform",0,SV,"ZodTuple",0,Sz,"ZodType",0,w6,"ZodULID",0,kx,"ZodURL",0,ks,"ZodUUID",0,kn,"ZodUndefined",0,Se,"ZodUnion",0,S_,"ZodUnknown",0,So,"ZodVoid",0,Sd,"ZodXID",0,kb,"ZodXor",0,Sw,"_ZodString",0,w2,"_default",0,S4,"_function",0,Ig,"any",0,Sa,"array",0,Sh,"base64",0,kU,"base64url",0,kZ,"bigint",0,k2,"boolean",0,k4,"catch",0,Ie,"check",0,Ix,"cidrv4",0,kO,"cidrv6",0,kC,"clone",0,v$,"codec",0,Io,"coerce",0,IL,"config",0,ve,"core",0,IR,"cuid",0,kh,"cuid2",0,kv,"custom",0,Iy,"date",0,Sf,"decode",0,wq,"decodeAsync",0,wX,"describe",0,I$,"discriminatedUnion",0,SI,"e164",0,kR,"email",0,w7,"emoji",0,kc,"encode",0,wK,"encodeAsync",0,wY,"endsWith",0,$o,"enum",0,SL,"exactOptional",0,SY,"file",0,SH,"flattenError",0,vM,"float32",0,kY,"float64",0,kX,"formatError",0,vF,"fromJSONSchema",0,function(e,t){var n;let r;if("boolean"==typeof e)return e?IC.any():IC.never();let i={version:(n=t?.defaultTarget,"https://json-schema.org/draft/2020-12/schema"===(r=e.$schema)?"draft-2020-12":"http://json-schema.org/draft-07/schema#"===r?"draft-7":"http://json-schema.org/draft-04/schema#"===r?"draft-4":n??"draft-2020-12"),defs:e.$defs||e.definitions||{},refs:new Map,processing:new Set,rootSchema:e,registry:t?.registry??b3};return function e(t,n){if("boolean"==typeof t)return t?IC.any():IC.never();let r=function t(n,r){let i;if(void 0!==n.not){if("object"==typeof n.not&&0===Object.keys(n.not).length)return IC.never();throw Error("not is not supported in Zod (except { not: {} } for never)")}if(void 0!==n.unevaluatedItems)throw Error("unevaluatedItems is not supported");if(void 0!==n.unevaluatedProperties)throw Error("unevaluatedProperties is not supported");if(void 0!==n.if||void 0!==n.then||void 0!==n.else)throw Error("Conditional schemas (if/then/else) are not supported");if(void 0!==n.dependentSchemas||void 0!==n.dependentRequired)throw Error("dependentSchemas and dependentRequired are not supported");if(n.$ref){let t=n.$ref;if(r.refs.has(t))return r.refs.get(t);if(r.processing.has(t))return IC.lazy(()=>{if(!r.refs.has(t))throw Error(`Circular reference not resolved: ${t}`);return r.refs.get(t)});r.processing.add(t);let i=e(function(e,t){if(!e.startsWith("#"))throw Error("External $ref is not supported, only local refs (#/...) are allowed");let n=e.slice(1).split("/").filter(Boolean);if(0===n.length)return t.rootSchema;let r="draft-2020-12"===t.version?"$defs":"definitions";if(n[0]===r){let r=n[1];if(!r||!t.defs[r])throw Error(`Reference not found: ${e}`);return t.defs[r]}throw Error(`Reference not found: ${e}`)}(t,r),r);return r.refs.set(t,i),r.processing.delete(t),i}if(void 0!==n.enum){let e=n.enum;if("openapi-3.0"===r.version&&!0===n.nullable&&1===e.length&&null===e[0])return IC.null();if(0===e.length)return IC.never();if(1===e.length)return IC.literal(e[0]);if(e.every(e=>"string"==typeof e))return IC.enum(e);let t=e.map(e=>IC.literal(e));return t.length<2?t[0]:IC.union([t[0],t[1],...t.slice(2)])}if(void 0!==n.const)return IC.literal(n.const);let a=n.type;if(Array.isArray(a)){let e=a.map(e=>t({...n,type:e},r));return 0===e.length?IC.never():1===e.length?e[0]:IC.union(e)}if(!a)return IC.any();switch(a){case"string":{let e=IC.string();if(n.format){let t=n.format;"email"===t?e=e.check(IC.email()):"uri"===t||"uri-reference"===t?e=e.check(IC.url()):"uuid"===t||"guid"===t?e=e.check(IC.uuid()):"date-time"===t?e=e.check(IC.iso.datetime()):"date"===t?e=e.check(IC.iso.date()):"time"===t?e=e.check(IC.iso.time()):"duration"===t?e=e.check(IC.iso.duration()):"ipv4"===t?e=e.check(IC.ipv4()):"ipv6"===t?e=e.check(IC.ipv6()):"mac"===t?e=e.check(IC.mac()):"cidr"===t?e=e.check(IC.cidrv4()):"cidr-v6"===t?e=e.check(IC.cidrv6()):"base64"===t?e=e.check(IC.base64()):"base64url"===t?e=e.check(IC.base64url()):"e164"===t?e=e.check(IC.e164()):"jwt"===t?e=e.check(IC.jwt()):"emoji"===t?e=e.check(IC.emoji()):"nanoid"===t?e=e.check(IC.nanoid()):"cuid"===t?e=e.check(IC.cuid()):"cuid2"===t?e=e.check(IC.cuid2()):"ulid"===t?e=e.check(IC.ulid()):"xid"===t?e=e.check(IC.xid()):"ksuid"===t&&(e=e.check(IC.ksuid()))}"number"==typeof n.minLength&&(e=e.min(n.minLength)),"number"==typeof n.maxLength&&(e=e.max(n.maxLength)),n.pattern&&(e=e.regex(new RegExp(n.pattern))),i=e;break}case"number":case"integer":{let e="integer"===a?IC.number().int():IC.number();"number"==typeof n.minimum&&(e=e.min(n.minimum)),"number"==typeof n.maximum&&(e=e.max(n.maximum)),"number"==typeof n.exclusiveMinimum?e=e.gt(n.exclusiveMinimum):!0===n.exclusiveMinimum&&"number"==typeof n.minimum&&(e=e.gt(n.minimum)),"number"==typeof n.exclusiveMaximum?e=e.lt(n.exclusiveMaximum):!0===n.exclusiveMaximum&&"number"==typeof n.maximum&&(e=e.lt(n.maximum)),"number"==typeof n.multipleOf&&(e=e.multipleOf(n.multipleOf)),i=e;break}case"boolean":i=IC.boolean();break;case"null":i=IC.null();break;case"object":{let t={},a=n.properties||{},o=new Set(n.required||[]);for(let[n,i]of Object.entries(a)){let a=e(i,r);t[n]=o.has(n)?a:a.optional()}if(n.propertyNames){let a=e(n.propertyNames,r),o=n.additionalProperties&&"object"==typeof n.additionalProperties?e(n.additionalProperties,r):IC.any();if(0===Object.keys(t).length){i=IC.record(a,o);break}let s=IC.object(t).passthrough(),l=IC.looseRecord(a,o);i=IC.intersection(s,l);break}if(n.patternProperties){let a=n.patternProperties,o=Object.keys(a),s=[];for(let t of o){let n=e(a[t],r),i=IC.string().regex(new RegExp(t));s.push(IC.looseRecord(i,n))}let l=[];if(Object.keys(t).length>0&&l.push(IC.object(t).passthrough()),l.push(...s),0===l.length)i=IC.object({}).passthrough();else if(1===l.length)i=l[0];else{let e=IC.intersection(l[0],l[1]);for(let t=2;t<l.length;t++)e=IC.intersection(e,l[t]);i=e}break}let s=IC.object(t);i=!1===n.additionalProperties?s.strict():"object"==typeof n.additionalProperties?s.catchall(e(n.additionalProperties,r)):s.passthrough();break}case"array":{let t=n.prefixItems,a=n.items;if(t&&Array.isArray(t)){let o=t.map(t=>e(t,r)),s=a&&"object"==typeof a&&!Array.isArray(a)?e(a,r):void 0;i=s?IC.tuple(o).rest(s):IC.tuple(o),"number"==typeof n.minItems&&(i=i.check(IC.minLength(n.minItems))),"number"==typeof n.maxItems&&(i=i.check(IC.maxLength(n.maxItems)))}else if(Array.isArray(a)){let t=a.map(t=>e(t,r)),o=n.additionalItems&&"object"==typeof n.additionalItems?e(n.additionalItems,r):void 0;i=o?IC.tuple(t).rest(o):IC.tuple(t),"number"==typeof n.minItems&&(i=i.check(IC.minLength(n.minItems))),"number"==typeof n.maxItems&&(i=i.check(IC.maxLength(n.maxItems)))}else if(void 0!==a){let t=e(a,r),o=IC.array(t);"number"==typeof n.minItems&&(o=o.min(n.minItems)),"number"==typeof n.maxItems&&(o=o.max(n.maxItems)),i=o}else i=IC.array(IC.any());break}default:throw Error(`Unsupported type: ${a}`)}return n.description&&(i=i.describe(n.description)),void 0!==n.default&&(i=i.default(n.default)),i}(t,n),i=t.type||void 0!==t.enum||void 0!==t.const;if(t.anyOf&&Array.isArray(t.anyOf)){let a=t.anyOf.map(t=>e(t,n)),o=IC.union(a);r=i?IC.intersection(r,o):o}if(t.oneOf&&Array.isArray(t.oneOf)){let a=t.oneOf.map(t=>e(t,n)),o=IC.xor(a);r=i?IC.intersection(r,o):o}if(t.allOf&&Array.isArray(t.allOf))if(0===t.allOf.length)r=i?r:IC.any();else{let a=i?r:e(t.allOf[0],n),o=+!i;for(let r=o;r<t.allOf.length;r++)a=IC.intersection(a,e(t.allOf[r],n));r=a}!0===t.nullable&&"openapi-3.0"===n.version&&(r=IC.nullable(r)),!0===t.readOnly&&(r=IC.readonly(r));let a={};for(let e of["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"])e in t&&(a[e]=t[e]);for(let e of["contentEncoding","contentMediaType","contentSchema"])e in t&&(a[e]=t[e]);for(let e of Object.keys(t))ID.has(e)||(a[e]=t[e]);return Object.keys(a).length>0&&n.registry.add(r,a),r}(e,i)},"function",0,Ig,"getErrorMap",0,IE,"globalRegistry",0,b3,"gt",0,_X,"gte",0,_Q,"guid",0,kt,"hash",0,kV,"hex",0,kH,"hostname",0,kW,"httpUrl",0,ku,"includes",0,$i,"instanceof",0,Ik,"int",0,kq,"int32",0,kQ,"int64",0,k3,"intersection",0,SN,"ipv4",0,kS,"ipv6",0,kz,"iso",0,IT,"json",0,II,"jwt",0,kM,"keyof",0,Sg,"ksuid",0,kw,"lazy",0,Im,"length",0,$e,"literal",0,SB,"locales",0,IZ,"looseObject",0,Sb,"looseRecord",0,SD,"lowercase",0,$n,"lt",0,_q,"lte",0,_Y,"mac",0,kj,"map",0,SP,"maxLength",0,_8,"maxSize",0,_5,"meta",0,Iw,"mime",0,$l,"minLength",0,_7,"minSize",0,_3,"multipleOf",0,_2,"nan",0,In,"nanoid",0,kf,"nativeEnum",0,SM,"negative",0,_1,"never",0,Su,"nonnegative",0,_6,"nonoptional",0,S3,"nonpositive",0,_4,"normalize",0,$d,"null",0,Sr,"nullable",0,SQ,"nullish",0,S0,"number",0,kG,"object",0,Sx,"optional",0,SK,"overwrite",0,$u,"parse",0,wH,"parseAsync",0,wV,"partialRecord",0,SC,"pipe",0,Ii,"positive",0,_0,"prefault",0,S2,"preprocess",0,Ij,"prettifyError",0,vH,"promise",0,Ip,"property",0,$s,"readonly",0,Il,"record",0,ST,"refine",0,Ib,"regex",0,$t,"regexes",()=>wT,"registry",0,b5,"safeDecode",0,w0,"safeDecodeAsync",0,w4,"safeEncode",0,wQ,"safeEncodeAsync",0,w1,"safeParse",0,wJ,"safeParseAsync",0,wG,"set",0,SA,"setErrorMap",0,Iz,"size",0,_9,"slugify",0,$p,"startsWith",0,$a,"strictObject",0,Sy,"string",0,w3,"stringFormat",0,kB,"stringbool",0,IS,"success",0,S8,"superRefine",0,I_,"symbol",0,k7,"templateLiteral",0,Id,"toJSONSchema",0,wO,"toLowerCase",0,$m,"toUpperCase",0,$f,"transform",0,SJ,"treeifyError",0,vB,"trim",0,$c,"tuple",0,SE,"uint32",0,k0,"uint64",0,k9,"ulid",0,ky,"undefined",0,St,"union",0,S$,"unknown",0,Ss,"uppercase",0,$r,"url",0,kl,"util",()=>wC,"uuid",0,kr,"uuidv4",0,ki,"uuidv6",0,ka,"uuidv7",0,ko,"void",0,Sc,"xid",0,k_,"xor",0,Sk],22219);var IM=e.i(22219),IM=IM;let IF=/^[a-z0-9][a-z0-9-]{0,79}$/,IB=IM.string().trim().regex(IF,"Use lowercase letters, numbers, and dashes."),IW=IM.string().trim().refine(e=>""===e||IF.test(e),"Use lowercase letters, numbers, and dashes."),IH=IM.object({name:IB,path:IM.string().trim().min(1,"Source Folder is required."),about:IM.string().trim().min(1,"Agent work is required."),method:IW.optional(),readiness_notes:IM.string().trim().optional()}).strict(),IV=IM.object({method_id:IB,label:IM.string().trim().min(1,"Label is required."),hint:IM.string().trim().min(1,"Summary is required."),task_prompt:IM.string().trim().min(1,"Agent work is required."),portable_output:IM.string().trim().optional(),readiness_notes:IM.string().trim().optional()}).strict();function IJ(e,t){let n=t?.trim();return n?`${e}: ${n}`:null}function IG(e){if("string"==typeof e||"number"==typeof e)return""+e;let t="";if(Array.isArray(e))for(let n=0,r;n<e.length;n++)""!==(r=IG(e[n]))&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var IK={value:()=>{}};function Iq(){for(var e,t=0,n=arguments.length,r={};t<n;++t){if(!(e=arguments[t]+"")||e in r||/[\s.]/.test(e))throw Error("illegal type: "+e);r[e]=[]}return new IY(r)}function IY(e){this._=e}function IX(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=IK,e=e.slice(0,r).concat(e.slice(r+1));break}return null!=n&&e.push({name:t,value:n}),e}function IQ(){}function I0(e){return null==e?IQ:function(){return this.querySelector(e)}}function I1(){return[]}function I4(e){return null==e?I1:function(){return this.querySelectorAll(e)}}function I6(e){return function(){return this.matches(e)}}function I2(e){return function(t){return t.matches(e)}}IY.prototype=Iq.prototype={constructor:IY,on:function(e,t){var n,r=this._,i=(e+"").trim().split(/^|\s+/).map(function(e){var t="",n=e.indexOf(".");if(n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),e&&!r.hasOwnProperty(e))throw Error("unknown type: "+e);return{type:e,name:t}}),a=-1,o=i.length;if(arguments.length<2){for(;++a<o;)if((n=(e=i[a]).type)&&(n=function(e,t){for(var n,r=0,i=e.length;r<i;++r)if((n=e[r]).name===t)return n.value}(r[n],e.name)))return n;return}if(null!=t&&"function"!=typeof t)throw Error("invalid callback: "+t);for(;++a<o;)if(n=(e=i[a]).type)r[n]=IX(r[n],e.name,t);else if(null==t)for(n in r)r[n]=IX(r[n],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new IY(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,r,i=Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(e))throw Error("unknown type: "+e);for(r=this._[e],a=0,n=r.length;a<n;++a)r[a].value.apply(t,i)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw Error("unknown type: "+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};var I5=Array.prototype.find;function I3(){return this.firstElementChild}var I9=Array.prototype.filter;function I8(){return Array.from(this.children)}function I7(e){return Array(e.length)}function je(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function jt(e,t,n,r,i,a){for(var o,s=0,l=t.length,u=a.length;s<u;++s)(o=t[s])?(o.__data__=a[s],r[s]=o):n[s]=new je(e,a[s]);for(;s<l;++s)(o=t[s])&&(i[s]=o)}function jn(e,t,n,r,i,a,o){var s,l,u,d=new Map,c=t.length,m=a.length,f=Array(c);for(s=0;s<c;++s)(l=t[s])&&(f[s]=u=o.call(l,l.__data__,s,t)+"",d.has(u)?i[s]=l:d.set(u,l));for(s=0;s<m;++s)u=o.call(e,a[s],s,a)+"",(l=d.get(u))?(r[s]=l,l.__data__=a[s],d.delete(u)):n[s]=new je(e,a[s]);for(s=0;s<c;++s)(l=t[s])&&d.get(f[s])===l&&(i[s]=l)}function jr(e){return e.__data__}function ji(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}je.prototype={constructor:je,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};var ja="http://www.w3.org/1999/xhtml";let jo={svg:"http://www.w3.org/2000/svg",xhtml:ja,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function js(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),jo.hasOwnProperty(t)?{space:jo[t],local:e}:e}function jl(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function ju(e,t){return e.style.getPropertyValue(t)||jl(e).getComputedStyle(e,null).getPropertyValue(t)}function jd(e){return e.trim().split(/^|\s+/)}function jc(e){return e.classList||new jm(e)}function jm(e){this._node=e,this._names=jd(e.getAttribute("class")||"")}function jf(e,t){for(var n=jc(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function jp(e,t){for(var n=jc(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function jh(){this.textContent=""}function jg(){this.innerHTML=""}function jv(){this.nextSibling&&this.parentNode.appendChild(this)}function jx(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function jy(e){var t=js(e);return(t.local?function(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}:function(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===ja&&t.documentElement.namespaceURI===ja?t.createElement(e):t.createElementNS(n,e)}})(t)}function jb(){return null}function j_(){var e=this.parentNode;e&&e.removeChild(this)}function j$(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function jw(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function jk(e){return function(){var t=this.__on;if(t){for(var n,r=0,i=-1,a=t.length;r<a;++r)(n=t[r],e.type&&n.type!==e.type||n.name!==e.name)?t[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?t.length=i:delete this.__on}}}function jS(e,t,n){return function(){var r,i=this.__on,a=function(e){t.call(this,e,this.__data__)};if(i){for(var o=0,s=i.length;o<s;++o)if((r=i[o]).type===e.type&&r.name===e.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=a,r.options=n),r.value=t;return}}this.addEventListener(e.type,a,n),r={type:e.type,name:e.name,value:t,listener:a,options:n},i?i.push(r):this.__on=[r]}}function jI(e,t,n){var r=jl(e),i=r.CustomEvent;"function"==typeof i?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}jm.prototype={add:function(e){0>this._names.indexOf(e)&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};var jj=[null];function jN(e,t){this._groups=e,this._parents=t}function jz(){return new jN([[document.documentElement]],jj)}function jE(e){return"string"==typeof e?new jN([[document.querySelector(e)]],[document.documentElement]):new jN([[e]],jj)}function jO(e,t){if(e=function(e){let t;for(;t=e.sourceEvent;)e=t;return e}(e),void 0===t&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}jN.prototype=jz.prototype={constructor:jN,select:function(e){"function"!=typeof e&&(e=I0(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a,o,s=t[i],l=s.length,u=r[i]=Array(l),d=0;d<l;++d)(a=s[d])&&(o=e.call(a,a.__data__,d,s))&&("__data__"in a&&(o.__data__=a.__data__),u[d]=o);return new jN(r,this._parents)},selectAll:function(e){if("function"==typeof e){var t;t=e,e=function(){var e;return e=t.apply(this,arguments),null==e?[]:Array.isArray(e)?e:Array.from(e)}}else e=I4(e);for(var n=this._groups,r=n.length,i=[],a=[],o=0;o<r;++o)for(var s,l=n[o],u=l.length,d=0;d<u;++d)(s=l[d])&&(i.push(e.call(s,s.__data__,d,l)),a.push(s));return new jN(i,a)},selectChild:function(e){var t;return this.select(null==e?I3:(t="function"==typeof e?e:I2(e),function(){return I5.call(this.children,t)}))},selectChildren:function(e){var t;return this.selectAll(null==e?I8:(t="function"==typeof e?e:I2(e),function(){return I9.call(this.children,t)}))},filter:function(e){"function"!=typeof e&&(e=I6(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a,o=t[i],s=o.length,l=r[i]=[],u=0;u<s;++u)(a=o[u])&&e.call(a,a.__data__,u,o)&&l.push(a);return new jN(r,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,jr);var n=t?jn:jt,r=this._parents,i=this._groups;"function"!=typeof e&&(x=e,e=function(){return x});for(var a=i.length,o=Array(a),s=Array(a),l=Array(a),u=0;u<a;++u){var d=r[u],c=i[u],m=c.length,f="object"==typeof(v=e.call(d,d&&d.__data__,u,r))&&"length"in v?v:Array.from(v),p=f.length,h=s[u]=Array(p),g=o[u]=Array(p);n(d,c,h,g,l[u]=Array(m),f,t);for(var v,x,y,b,_=0,$=0;_<p;++_)if(y=h[_]){for(_>=$&&($=_+1);!(b=g[$])&&++$<p;);y._next=b||null}}return(o=new jN(o,r))._enter=s,o._exit=l,o},enter:function(){return new jN(this._enter||this._groups.map(I7),this._parents)},exit:function(){return new jN(this._exit||this._groups.map(I7),this._parents)},join:function(e,t,n){var r=this.enter(),i=this,a=this.exit();return"function"==typeof e?(r=e(r))&&(r=r.selection()):r=r.append(e+""),null!=t&&(i=t(i))&&(i=i.selection()),null==n?a.remove():n(a),r&&i?r.merge(i).order():i},merge:function(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,a=r.length,o=Math.min(i,a),s=Array(i),l=0;l<o;++l)for(var u,d=n[l],c=r[l],m=d.length,f=s[l]=Array(m),p=0;p<m;++p)(u=d[p]||c[p])&&(f[p]=u);for(;l<i;++l)s[l]=n[l];return new jN(s,this._parents)},selection:function(){return this},order:function(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r,i=e[t],a=i.length-1,o=i[a];--a>=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=ji);for(var n=this._groups,r=n.length,i=Array(r),a=0;a<r;++a){for(var o,s=n[a],l=s.length,u=i[a]=Array(l),d=0;d<l;++d)(o=s[d])&&(u[d]=o);u.sort(t)}return new jN(i,this._parents).order()},call:function(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null},size:function(){let e=0;for(let t of this)++e;return e},empty:function(){return!this.node()},each:function(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i,a=t[n],o=0,s=a.length;o<s;++o)(i=a[o])&&e.call(i,i.__data__,o,a);return this},attr:function(e,t){var n=js(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==t?n.local?function(e){return function(){this.removeAttributeNS(e.space,e.local)}}:function(e){return function(){this.removeAttribute(e)}}:"function"==typeof t?n.local?function(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}:function(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}:n.local?function(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}:function(e,t){return function(){this.setAttribute(e,t)}})(n,t))},style:function(e,t,n){return arguments.length>1?this.each((null==t?function(e){return function(){this.style.removeProperty(e)}}:"function"==typeof t?function(e,t,n){return function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}:function(e,t,n){return function(){this.style.setProperty(e,t,n)}})(e,t,null==n?"":n)):ju(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?function(e){return function(){delete this[e]}}:"function"==typeof t?function(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}:function(e,t){return function(){this[e]=t}})(e,t)):this.node()[e]},classed:function(e,t){var n=jd(e+"");if(arguments.length<2){for(var r=jc(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof t?function(e,t){return function(){(t.apply(this,arguments)?jf:jp)(this,e)}}:t?function(e){return function(){jf(this,e)}}:function(e){return function(){jp(this,e)}})(n,t))},text:function(e){return arguments.length?this.each(null==e?jh:("function"==typeof e?function(e){return function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}}:function(e){return function(){this.textContent=e}})(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?jg:("function"==typeof e?function(e){return function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}}:function(e){return function(){this.innerHTML=e}})(e)):this.node().innerHTML},raise:function(){return this.each(jv)},lower:function(){return this.each(jx)},append:function(e){var t="function"==typeof e?e:jy(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})},insert:function(e,t){var n="function"==typeof e?e:jy(e),r=null==t?jb:"function"==typeof t?t:I0(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})},remove:function(){return this.each(j_)},clone:function(e){return this.select(e?jw:j$)},datum:function(e){return arguments.length?this.property("__data__",e):this.node().__data__},on:function(e,t,n){var r,i,a=(e+"").trim().split(/^|\s+/).map(function(e){var t="",n=e.indexOf(".");return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}}),o=a.length;if(arguments.length<2){var s=this.node().__on;if(s){for(var l,u=0,d=s.length;u<d;++u)for(r=0,l=s[u];r<o;++r)if((i=a[r]).type===l.type&&i.name===l.name)return l.value}return}for(r=0,s=t?jS:jk;r<o;++r)this.each(s(a[r],t,n));return this},dispatch:function(e,t){return this.each(("function"==typeof t?function(e,t){return function(){return jI(this,e,t.apply(this,arguments))}}:function(e,t){return function(){return jI(this,e,t)}})(e,t))},[Symbol.iterator]:function*(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r,i=e[t],a=0,o=i.length;a<o;++a)(r=i[a])&&(yield r)}};let jT={passive:!1},jC={capture:!0,passive:!1};function jD(e){e.stopImmediatePropagation()}function jU(e){e.preventDefault(),e.stopImmediatePropagation()}function jP(e){var t=e.document.documentElement,n=jE(e).on("dragstart.drag",jU,jC);"onselectstart"in t?n.on("selectstart.drag",jU,jC):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function jZ(e,t){var n=e.document.documentElement,r=jE(e).on("dragstart.drag",null);t&&(r.on("click.drag",jU,jC),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}let jA=e=>()=>e;function jR(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:a,x:o,y:s,dx:l,dy:u,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:d}})}function jL(e){return!e.ctrlKey&&!e.button}function jM(){return this.parentNode}function jF(e,t){return null==t?{x:e.x,y:e.y}:t}function jB(){return navigator.maxTouchPoints||"ontouchstart"in this}function jW(){var e,t,n,r,i=jL,a=jM,o=jF,s=jB,l={},u=Iq("start","drag","end"),d=0,c=0;function m(e){e.on("mousedown.drag",f).filter(s).on("touchstart.drag",g).on("touchmove.drag",v,jT).on("touchend.drag touchcancel.drag",x).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function f(o,s){if(!r&&i.call(this,o,s)){var l=y(this,a.call(this,o,s),o,s,"mouse");l&&(jE(o.view).on("mousemove.drag",p,jC).on("mouseup.drag",h,jC),jP(o.view),jD(o),n=!1,e=o.clientX,t=o.clientY,l("start",o))}}function p(r){if(jU(r),!n){var i=r.clientX-e,a=r.clientY-t;n=i*i+a*a>c}l.mouse("drag",r)}function h(e){jE(e.view).on("mousemove.drag mouseup.drag",null),jZ(e.view,n),jU(e),l.mouse("end",e)}function g(e,t){if(i.call(this,e,t)){var n,r,o=e.changedTouches,s=a.call(this,e,t),l=o.length;for(n=0;n<l;++n)(r=y(this,s,e,t,o[n].identifier,o[n]))&&(jD(e),r("start",e,o[n]))}}function v(e){var t,n,r=e.changedTouches,i=r.length;for(t=0;t<i;++t)(n=l[r[t].identifier])&&(jU(e),n("drag",e,r[t]))}function x(e){var t,n,i=e.changedTouches,a=i.length;for(r&&clearTimeout(r),r=setTimeout(function(){r=null},500),t=0;t<a;++t)(n=l[i[t].identifier])&&(jD(e),n("end",e,i[t]))}function y(e,t,n,r,i,a){var s,c,f,p=u.copy(),h=jO(a||n,t);if(null!=(f=o.call(e,new jR("beforestart",{sourceEvent:n,target:m,identifier:i,active:d,x:h[0],y:h[1],dx:0,dy:0,dispatch:p}),r)))return s=f.x-h[0]||0,c=f.y-h[1]||0,function n(a,o,u){var g,v=h;switch(a){case"start":l[i]=n,g=d++;break;case"end":delete l[i],--d;case"drag":h=jO(u||o,t),g=d}p.call(a,e,new jR(a,{sourceEvent:o,subject:f,target:m,identifier:i,active:g,x:h[0]+s,y:h[1]+c,dx:h[0]-v[0],dy:h[1]-v[1],dispatch:p}),r)}}return m.filter=function(e){return arguments.length?(i="function"==typeof e?e:jA(!!e),m):i},m.container=function(e){return arguments.length?(a="function"==typeof e?e:jA(e),m):a},m.subject=function(e){return arguments.length?(o="function"==typeof e?e:jA(e),m):o},m.touchable=function(e){return arguments.length?(s="function"==typeof e?e:jA(!!e),m):s},m.on=function(){var e=u.on.apply(u,arguments);return e===u?m:e},m.clickDistance=function(e){return arguments.length?(c=(e*=1)*e,m):Math.sqrt(c)},m}function jH(e){return((e=Math.exp(e))+1/e)/2}jR.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};let jV=function e(t,n,r){function i(e,i){var a,o,s=e[0],l=e[1],u=e[2],d=i[0],c=i[1],m=i[2],f=d-s,p=c-l,h=f*f+p*p;if(h<1e-12)o=Math.log(m/u)/t,a=function(e){return[s+e*f,l+e*p,u*Math.exp(t*e*o)]};else{var g=Math.sqrt(h),v=(m*m-u*u+r*h)/(2*u*n*g),x=(m*m-u*u-r*h)/(2*m*n*g),y=Math.log(Math.sqrt(v*v+1)-v);o=(Math.log(Math.sqrt(x*x+1)-x)-y)/t,a=function(e){var r,i,a=e*o,d=jH(y),c=u/(n*g)*(d*(((r=Math.exp(2*(r=t*a+y)))-1)/(r+1))-((i=Math.exp(i=y))-1/i)/2);return[s+c*f,l+c*p,u*d/jH(t*a+y)]}}return a.duration=1e3*o*t/Math.SQRT2,a}return i.rho=function(t){var n=Math.max(.001,+t),r=n*n;return e(n,r,r*r)},i}(Math.SQRT2,2,4);var jJ,jG,jK,jq,jY,jX,jQ=0,j0=0,j1=0,j4=0,j6=0,j2=0,j5="object"==typeof performance&&performance.now?performance:Date,j3="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function j9(){return j6||(j3(j8),j6=j5.now()+j2)}function j8(){j6=0}function j7(){this._call=this._time=this._next=null}function Ne(e,t,n){var r=new j7;return r.restart(e,t,n),r}function Nt(){j6=(j4=j5.now())+j2,jQ=j0=0;try{j9(),++jQ;for(var e,t=jY;t;)(e=j6-t._time)>=0&&t._call.call(void 0,e),t=t._next;--jQ}finally{jQ=0,function(){for(var e,t,n=jY,r=1/0;n;)n._call?(r>n._time&&(r=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:jY=t);jX=e,Nr(r)}(),j6=0}}function Nn(){var e=j5.now(),t=e-j4;t>1e3&&(j2-=t,j4=e)}function Nr(e){!jQ&&(j0&&(j0=clearTimeout(j0)),e-j6>24?(e<1/0&&(j0=setTimeout(Nt,e-j5.now()-j2)),j1&&(j1=clearInterval(j1))):(j1||(j4=j5.now(),j1=setInterval(Nn,1e3)),jQ=1,j3(Nt)))}function Ni(e,t,n){var r=new j7;return t=null==t?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r}j7.prototype=Ne.prototype={constructor:j7,restart:function(e,t,n){if("function"!=typeof e)throw TypeError("callback is not a function");n=(null==n?j9():+n)+(null==t?0:+t),this._next||jX===this||(jX?jX._next=this:jY=this,jX=this),this._call=e,this._time=n,Nr()},stop:function(){this._call&&(this._call=null,this._time=1/0,Nr())}};var Na=Iq("start","end","cancel","interrupt"),No=[];function Ns(e,t,n,r,i,a){var o=e.__transition;if(o){if(n in o)return}else e.__transition={};!function(e,t,n){var r,i=e.__transition;function a(l){var u,d,c,m;if(1!==n.state)return s();for(u in i)if((m=i[u]).name===n.name){if(3===m.state)return Ni(a);4===m.state?(m.state=6,m.timer.stop(),m.on.call("interrupt",e,e.__data__,m.index,m.group),delete i[u]):+u<t&&(m.state=6,m.timer.stop(),m.on.call("cancel",e,e.__data__,m.index,m.group),delete i[u])}if(Ni(function(){3===n.state&&(n.state=4,n.timer.restart(o,n.delay,n.time),o(l))}),n.state=2,n.on.call("start",e,e.__data__,n.index,n.group),2===n.state){for(u=0,n.state=3,r=Array(c=n.tween.length),d=-1;u<c;++u)(m=n.tween[u].value.call(e,e.__data__,n.index,n.group))&&(r[++d]=m);r.length=d+1}}function o(t){for(var i=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(s),n.state=5,1),a=-1,o=r.length;++a<o;)r[a].call(e,i);5===n.state&&(n.on.call("end",e,e.__data__,n.index,n.group),s())}function s(){for(var r in n.state=6,n.timer.stop(),delete i[t],i)return;delete e.__transition}i[t]=n,n.timer=Ne(function(e){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=e&&a(e-n.delay)},0,n.time)}(e,n,{name:t,index:r,group:i,on:Na,tween:No,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function Nl(e,t){var n=Nd(e,t);if(n.state>0)throw Error("too late; already scheduled");return n}function Nu(e,t){var n=Nd(e,t);if(n.state>3)throw Error("too late; already running");return n}function Nd(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw Error("transition not found");return n}function Nc(e,t){var n,r,i,a=e.__transition,o=!0;if(a){for(i in t=null==t?null:t+"",a){if((n=a[i]).name!==t){o=!1;continue}r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete a[i]}o&&delete e.__transition}}function Nm(e,t){return e*=1,t*=1,function(n){return e*(1-n)+t*n}}var Nf=180/Math.PI,Np={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Nh(e,t,n,r,i,a){var o,s,l;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),e*r<t*n&&(e=-e,t=-t,l=-l,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*Nf,skewX:Math.atan(l)*Nf,scaleX:o,scaleY:s}}function Ng(e,t,n,r){function i(e){return e.length?e.pop()+" ":""}return function(a,o){var s,l,u,d,c=[],m=[];return a=e(a),o=e(o),!function(e,r,i,a,o,s){if(e!==i||r!==a){var l=o.push("translate(",null,t,null,n);s.push({i:l-4,x:Nm(e,i)},{i:l-2,x:Nm(r,a)})}else(i||a)&&o.push("translate("+i+t+a+n)}(a.translateX,a.translateY,o.translateX,o.translateY,c,m),s=a.rotate,l=o.rotate,s!==l?(s-l>180?l+=360:l-s>180&&(s+=360),m.push({i:c.push(i(c)+"rotate(",null,r)-2,x:Nm(s,l)})):l&&c.push(i(c)+"rotate("+l+r),u=a.skewX,d=o.skewX,u!==d?m.push({i:c.push(i(c)+"skewX(",null,r)-2,x:Nm(u,d)}):d&&c.push(i(c)+"skewX("+d+r),!function(e,t,n,r,a,o){if(e!==n||t!==r){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:Nm(e,n)},{i:s-2,x:Nm(t,r)})}else(1!==n||1!==r)&&a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,c,m),a=o=null,function(e){for(var t,n=-1,r=m.length;++n<r;)c[(t=m[n]).i]=t.x(e);return c.join("")}}}var Nv=Ng(function(e){let t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Np:Nh(t.a,t.b,t.c,t.d,t.e,t.f)},"px, ","px)","deg)"),Nx=Ng(function(e){return null==e?Np:(c||(c=document.createElementNS("http://www.w3.org/2000/svg","g")),c.setAttribute("transform",e),e=c.transform.baseVal.consolidate())?Nh((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):Np},", ",")",")");function Ny(e,t,n){var r=e._id;return e.each(function(){var e=Nu(this,r);(e.value||(e.value={}))[t]=n.apply(this,arguments)}),function(e){return Nd(e,r).value[t]}}function Nb(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function N_(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function N$(){}var Nw="\\s*([+-]?\\d+)\\s*",Nk="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",NS="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",NI=/^#([0-9a-f]{3,8})$/,Nj=RegExp(`^rgb\\(${Nw},${Nw},${Nw}\\)$`),NN=RegExp(`^rgb\\(${NS},${NS},${NS}\\)$`),Nz=RegExp(`^rgba\\(${Nw},${Nw},${Nw},${Nk}\\)$`),NE=RegExp(`^rgba\\(${NS},${NS},${NS},${Nk}\\)$`),NO=RegExp(`^hsl\\(${Nk},${NS},${NS}\\)$`),NT=RegExp(`^hsla\\(${Nk},${NS},${NS},${Nk}\\)$`),NC={aliceblue:0xf0f8ff,antiquewhite:0xfaebd7,aqua:65535,aquamarine:8388564,azure:0xf0ffff,beige:0xf5f5dc,bisque:0xffe4c4,black:0,blanchedalmond:0xffebcd,blue:255,blueviolet:9055202,brown:0xa52a2a,burlywood:0xdeb887,cadetblue:6266528,chartreuse:8388352,chocolate:0xd2691e,coral:0xff7f50,cornflowerblue:6591981,cornsilk:0xfff8dc,crimson:0xdc143c,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:0xb8860b,darkgray:0xa9a9a9,darkgreen:25600,darkgrey:0xa9a9a9,darkkhaki:0xbdb76b,darkmagenta:9109643,darkolivegreen:5597999,darkorange:0xff8c00,darkorchid:0x9932cc,darkred:9109504,darksalmon:0xe9967a,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:0xff1493,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:0xb22222,floralwhite:0xfffaf0,forestgreen:2263842,fuchsia:0xff00ff,gainsboro:0xdcdcdc,ghostwhite:0xf8f8ff,gold:0xffd700,goldenrod:0xdaa520,gray:8421504,green:32768,greenyellow:0xadff2f,grey:8421504,honeydew:0xf0fff0,hotpink:0xff69b4,indianred:0xcd5c5c,indigo:4915330,ivory:0xfffff0,khaki:0xf0e68c,lavender:0xe6e6fa,lavenderblush:0xfff0f5,lawngreen:8190976,lemonchiffon:0xfffacd,lightblue:0xadd8e6,lightcoral:0xf08080,lightcyan:0xe0ffff,lightgoldenrodyellow:0xfafad2,lightgray:0xd3d3d3,lightgreen:9498256,lightgrey:0xd3d3d3,lightpink:0xffb6c1,lightsalmon:0xffa07a,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:0xb0c4de,lightyellow:0xffffe0,lime:65280,limegreen:3329330,linen:0xfaf0e6,magenta:0xff00ff,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:0xba55d3,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:0xc71585,midnightblue:1644912,mintcream:0xf5fffa,mistyrose:0xffe4e1,moccasin:0xffe4b5,navajowhite:0xffdead,navy:128,oldlace:0xfdf5e6,olive:8421376,olivedrab:7048739,orange:0xffa500,orangered:0xff4500,orchid:0xda70d6,palegoldenrod:0xeee8aa,palegreen:0x98fb98,paleturquoise:0xafeeee,palevioletred:0xdb7093,papayawhip:0xffefd5,peachpuff:0xffdab9,peru:0xcd853f,pink:0xffc0cb,plum:0xdda0dd,powderblue:0xb0e0e6,purple:8388736,rebeccapurple:6697881,red:0xff0000,rosybrown:0xbc8f8f,royalblue:4286945,saddlebrown:9127187,salmon:0xfa8072,sandybrown:0xf4a460,seagreen:3050327,seashell:0xfff5ee,sienna:0xa0522d,silver:0xc0c0c0,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:0xfffafa,springgreen:65407,steelblue:4620980,tan:0xd2b48c,teal:32896,thistle:0xd8bfd8,tomato:0xff6347,turquoise:4251856,violet:0xee82ee,wheat:0xf5deb3,white:0xffffff,whitesmoke:0xf5f5f5,yellow:0xffff00,yellowgreen:0x9acd32};function ND(){return this.rgb().formatHex()}function NU(){return this.rgb().formatRgb()}function NP(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=NI.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?NZ(t):3===n?new NL(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?NA(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?NA(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Nj.exec(e))?new NL(t[1],t[2],t[3],1):(t=NN.exec(e))?new NL(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Nz.exec(e))?NA(t[1],t[2],t[3],t[4]):(t=NE.exec(e))?NA(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=NO.exec(e))?NV(t[1],t[2]/100,t[3]/100,1):(t=NT.exec(e))?NV(t[1],t[2]/100,t[3]/100,t[4]):NC.hasOwnProperty(e)?NZ(NC[e]):"transparent"===e?new NL(NaN,NaN,NaN,0):null}function NZ(e){return new NL(e>>16&255,e>>8&255,255&e,1)}function NA(e,t,n,r){return r<=0&&(e=t=n=NaN),new NL(e,t,n,r)}function NR(e,t,n,r){var i;return 1==arguments.length?((i=e)instanceof N$||(i=NP(i)),i)?new NL((i=i.rgb()).r,i.g,i.b,i.opacity):new NL:new NL(e,t,n,null==r?1:r)}function NL(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function NM(){return`#${NH(this.r)}${NH(this.g)}${NH(this.b)}`}function NF(){let e=NB(this.opacity);return`${1===e?"rgb(":"rgba("}${NW(this.r)}, ${NW(this.g)}, ${NW(this.b)}${1===e?")":`, ${e})`}`}function NB(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function NW(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function NH(e){return((e=NW(e))<16?"0":"")+e.toString(16)}function NV(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new NG(e,t,n,r)}function NJ(e){if(e instanceof NG)return new NG(e.h,e.s,e.l,e.opacity);if(e instanceof N$||(e=NP(e)),!e)return new NG;if(e instanceof NG)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,l=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=l>0&&l<1?0:o,new NG(o,s,l,e.opacity)}function NG(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function NK(e){return(e=(e||0)%360)<0?e+360:e}function Nq(e){return Math.max(0,Math.min(1,e||0))}function NY(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}function NX(e,t,n,r,i){var a=e*e,o=a*e;return((1-3*e+3*a-o)*t+(4-6*a+3*o)*n+(1+3*e+3*a-3*o)*r+o*i)/6}Nb(N$,NP,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:ND,formatHex:ND,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return NJ(this).formatHsl()},formatRgb:NU,toString:NU}),Nb(NL,NR,N_(N$,{brighter(e){return e=null==e?1.4285714285714286:Math.pow(1.4285714285714286,e),new NL(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new NL(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new NL(NW(this.r),NW(this.g),NW(this.b),NB(this.opacity))},displayable(){return -.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:NM,formatHex:NM,formatHex8:function(){return`#${NH(this.r)}${NH(this.g)}${NH(this.b)}${NH((isNaN(this.opacity)?1:this.opacity)*255)}`},formatRgb:NF,toString:NF})),Nb(NG,function(e,t,n,r){return 1==arguments.length?NJ(e):new NG(e,t,n,null==r?1:r)},N_(N$,{brighter(e){return e=null==e?1.4285714285714286:Math.pow(1.4285714285714286,e),new NG(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new NG(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new NL(NY(e>=240?e-240:e+120,i,r),NY(e,i,r),NY(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new NG(NK(this.h),Nq(this.s),Nq(this.l),NB(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=NB(this.opacity);return`${1===e?"hsl(":"hsla("}${NK(this.h)}, ${100*Nq(this.s)}%, ${100*Nq(this.l)}%${1===e?")":`, ${e})`}`}}));let NQ=e=>()=>e;function N0(e,t){var n=t-e;return n?function(t){return e+t*n}:NQ(isNaN(e)?t:e)}let N1=function e(t){var n,r=1==(n=+t)?N0:function(e,t){var r,i,a;return t-e?(r=e,i=t,r=Math.pow(r,a=n),i=Math.pow(i,a)-r,a=1/a,function(e){return Math.pow(r+e*i,a)}):NQ(isNaN(e)?t:e)};function i(e,t){var n=r((e=NR(e)).r,(t=NR(t)).r),i=r(e.g,t.g),a=r(e.b,t.b),o=N0(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+""}}return i.gamma=e,i}(1);function N4(e){return function(t){var n,r,i=t.length,a=Array(i),o=Array(i),s=Array(i);for(n=0;n<i;++n)r=NR(t[n]),a[n]=r.r||0,o[n]=r.g||0,s[n]=r.b||0;return a=e(a),o=e(o),s=e(s),r.opacity=1,function(e){return r.r=a(e),r.g=o(e),r.b=s(e),r+""}}}N4(function(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[r],a=e[r+1],o=r>0?e[r-1]:2*i-a,s=r<t-1?e[r+2]:2*a-i;return NX((n-r/t)*t,o,i,a,s)}}),N4(function(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),i=e[(r+t-1)%t],a=e[r%t],o=e[(r+1)%t],s=e[(r+2)%t];return NX((n-r/t)*t,i,a,o,s)}});var N6=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,N2=RegExp(N6.source,"g");function N5(e,t){var n,r,i,a,o,s=N6.lastIndex=N2.lastIndex=0,l=-1,u=[],d=[];for(e+="",t+="";(i=N6.exec(e))&&(a=N2.exec(t));)(o=a.index)>s&&(o=t.slice(s,o),u[l]?u[l]+=o:u[++l]=o),(i=i[0])===(a=a[0])?u[l]?u[l]+=a:u[++l]=a:(u[++l]=null,d.push({i:l,x:Nm(i,a)})),s=N2.lastIndex;return s<t.length&&(o=t.slice(s),u[l]?u[l]+=o:u[++l]=o),u.length<2?d[0]?(n=d[0].x,function(e){return n(e)+""}):(r=t,function(){return r}):(t=d.length,function(e){for(var n,r=0;r<t;++r)u[(n=d[r]).i]=n.x(e);return u.join("")})}function N3(e,t){var n;return("number"==typeof t?Nm:t instanceof NP?N1:(n=NP(t))?(t=n,N1):N5)(e,t)}var N9=jz.prototype.constructor;function N8(e){return function(){this.style.removeProperty(e)}}var N7=0;function ze(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}var zt=jz.prototype;ze.prototype=(function(e){return jz().transition(e)}).prototype={constructor:ze,select:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=I0(e));for(var r=this._groups,i=r.length,a=Array(i),o=0;o<i;++o)for(var s,l,u=r[o],d=u.length,c=a[o]=Array(d),m=0;m<d;++m)(s=u[m])&&(l=e.call(s,s.__data__,m,u))&&("__data__"in s&&(l.__data__=s.__data__),c[m]=l,Ns(c[m],t,n,m,c,Nd(s,n)));return new ze(a,this._parents,t,n)},selectAll:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=I4(e));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var l,u=r[s],d=u.length,c=0;c<d;++c)if(l=u[c]){for(var m,f=e.call(l,l.__data__,c,u),p=Nd(l,n),h=0,g=f.length;h<g;++h)(m=f[h])&&Ns(m,t,n,h,f,p);a.push(f),o.push(l)}return new ze(a,o,t,n)},selectChild:zt.selectChild,selectChildren:zt.selectChildren,filter:function(e){"function"!=typeof e&&(e=I6(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a,o=t[i],s=o.length,l=r[i]=[],u=0;u<s;++u)(a=o[u])&&e.call(a,a.__data__,u,o)&&l.push(a);return new ze(r,this._parents,this._name,this._id)},merge:function(e){if(e._id!==this._id)throw Error();for(var t=this._groups,n=e._groups,r=t.length,i=n.length,a=Math.min(r,i),o=Array(r),s=0;s<a;++s)for(var l,u=t[s],d=n[s],c=u.length,m=o[s]=Array(c),f=0;f<c;++f)(l=u[f]||d[f])&&(m[f]=l);for(;s<r;++s)o[s]=t[s];return new ze(o,this._parents,this._name,this._id)},selection:function(){return new N9(this._groups,this._parents)},transition:function(){for(var e=this._name,t=this._id,n=++N7,r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],l=s.length,u=0;u<l;++u)if(o=s[u]){var d=Nd(o,t);Ns(o,e,n,u,s,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new ze(r,this._parents,e,n)},call:zt.call,nodes:zt.nodes,node:zt.node,size:zt.size,empty:zt.empty,each:zt.each,on:function(e,t){var n,r,i,a,o,s,l=this._id;return arguments.length<2?Nd(this.node(),l).on.on(e):this.each((n=l,r=e,i=t,s=(r+"").trim().split(/^|\s+/).every(function(e){var t=e.indexOf(".");return t>=0&&(e=e.slice(0,t)),!e||"start"===e})?Nl:Nu,function(){var e=s(this,n),t=e.on;t!==a&&(o=(a=t).copy()).on(r,i),e.on=o}))},attr:function(e,t){var n=js(e),r="transform"===n?Nx:N3;return this.attrTween(e,"function"==typeof t?(n.local?function(e,t,n){var r,i,a;return function(){var o,s,l=n(this);return null==l?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local))===(s=l+"")?null:o===r&&s===i?a:(i=s,a=t(r=o,l))}}:function(e,t,n){var r,i,a;return function(){var o,s,l=n(this);return null==l?void this.removeAttribute(e):(o=this.getAttribute(e))===(s=l+"")?null:o===r&&s===i?a:(i=s,a=t(r=o,l))}})(n,r,Ny(this,"attr."+e,t)):null==t?(n.local?function(e){return function(){this.removeAttributeNS(e.space,e.local)}}:function(e){return function(){this.removeAttribute(e)}})(n):(n.local?function(e,t,n){var r,i,a=n+"";return function(){var o=this.getAttributeNS(e.space,e.local);return o===a?null:o===r?i:i=t(r=o,n)}}:function(e,t,n){var r,i,a=n+"";return function(){var o=this.getAttribute(e);return o===a?null:o===r?i:i=t(r=o,n)}})(n,r,t))},attrTween:function(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw Error();var r=js(e);return this.tween(n,(r.local?function(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&function(t){this.setAttributeNS(e.space,e.local,i.call(this,t))}),n}return i._value=t,i}:function(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&function(t){this.setAttribute(e,i.call(this,t))}),n}return i._value=t,i})(r,t))},style:function(e,t,n){var r,i,a,o,s,l,u,d,c,m,f,p,h,g,v,x,y,b,_,$,w,k="transform"==(e+="")?Nv:N3;return null==t?this.styleTween(e,(r=e,function(){var e=ju(this,r),t=(this.style.removeProperty(r),ju(this,r));return e===t?null:e===i&&t===a?o:o=k(i=e,a=t)})).on("end.style."+e,N8(e)):"function"==typeof t?this.styleTween(e,(s=e,l=Ny(this,"style."+e,t),function(){var e=ju(this,s),t=l(this),n=t+"";return null==t&&(this.style.removeProperty(s),n=t=ju(this,s)),e===n?null:e===u&&n===d?c:(d=n,c=k(u=e,t))})).each((m=this._id,y="end."+(x="style."+(f=e)),function(){var e=Nu(this,m),t=e.on,n=null==e.value[x]?v||(v=N8(f)):void 0;(t!==p||g!==n)&&(h=(p=t).copy()).on(y,g=n),e.on=h})):this.styleTween(e,(b=e,w=t+"",function(){var e=ju(this,b);return e===w?null:e===_?$:$=k(_=e,t)}),n).on("end.style."+e,null)},styleTween:function(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==t)return this.tween(r,null);if("function"!=typeof t)throw Error();return this.tween(r,function(e,t,n){var r,i;function a(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&function(t){this.style.setProperty(e,a.call(this,t),n)}),r}return a._value=t,a}(e,t,null==n?"":n))},text:function(e){var t,n;return this.tween("text","function"==typeof e?(t=Ny(this,"text",e),function(){var e=t(this);this.textContent=null==e?"":e}):(n=null==e?"":e+"",function(){this.textContent=n}))},textTween:function(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(null==e)return this.tween(t,null);if("function"!=typeof e)throw Error();return this.tween(t,function(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&function(e){this.textContent=r.call(this,e)}),t}return r._value=e,r}(e))},remove:function(){var e;return this.on("end.remove",(e=this._id,function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}))},tween:function(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r,i=Nd(this.node(),n).tween,a=0,o=i.length;a<o;++a)if((r=i[a]).name===e)return r.value;return null}return this.each((null==t?function(e,t){var n,r;return function(){var i=Nu(this,e),a=i.tween;if(a!==n){r=n=a;for(var o=0,s=r.length;o<s;++o)if(r[o].name===t){(r=r.slice()).splice(o,1);break}}i.tween=r}}:function(e,t,n){var r,i;if("function"!=typeof n)throw Error();return function(){var a=Nu(this,e),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:t,value:n},l=0,u=i.length;l<u;++l)if(i[l].name===t){i[l]=s;break}l===u&&i.push(s)}a.tween=i}})(n,e,t))},delay:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?function(e,t){return function(){Nl(this,e).delay=+t.apply(this,arguments)}}:function(e,t){return t*=1,function(){Nl(this,e).delay=t}})(t,e)):Nd(this.node(),t).delay},duration:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?function(e,t){return function(){Nu(this,e).duration=+t.apply(this,arguments)}}:function(e,t){return t*=1,function(){Nu(this,e).duration=t}})(t,e)):Nd(this.node(),t).duration},ease:function(e){var t=this._id;return arguments.length?this.each(function(e,t){if("function"!=typeof t)throw Error();return function(){Nu(this,e).ease=t}}(t,e)):Nd(this.node(),t).ease},easeVarying:function(e){var t;if("function"!=typeof e)throw Error();return this.each((t=this._id,function(){var n=e.apply(this,arguments);if("function"!=typeof n)throw Error();Nu(this,t).ease=n}))},end:function(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(a,o){var s={value:o},l={value:function(){0==--i&&a()}};n.each(function(){var n=Nu(this,r),i=n.on;i!==e&&((t=(e=i).copy())._.cancel.push(s),t._.interrupt.push(s),t._.end.push(l)),n.on=t}),0===i&&a()})},[Symbol.iterator]:zt[Symbol.iterator]};var zn={time:null,delay:0,duration:250,ease:function(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}};jz.prototype.interrupt=function(e){return this.each(function(){Nc(this,e)})},jz.prototype.transition=function(e){var t,n;e instanceof ze?(t=e._id,e=e._name):(t=++N7,(n=zn).time=j9(),e=null==e?null:e+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],l=s.length,u=0;u<l;++u)(o=s[u])&&Ns(o,e,t,u,s,n||function(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw Error(`transition ${t} not found`);return n}(o,t));return new ze(r,this._parents,e,t)};let zr=e=>()=>e;function zi(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function za(e,t,n){this.k=e,this.x=t,this.y=n}za.prototype={constructor:za,scale:function(e){return 1===e?this:new za(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new za(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var zo=new za(1,0,0);function zs(e){for(;!e.__zoom;)if(!(e=e.parentNode))return zo;return e.__zoom}function zl(e){e.stopImmediatePropagation()}function zu(e){e.preventDefault(),e.stopImmediatePropagation()}function zd(e){return(!e.ctrlKey||"wheel"===e.type)&&!e.button}function zc(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e).hasAttribute("viewBox")?[[(e=e.viewBox.baseVal).x,e.y],[e.x+e.width,e.y+e.height]]:[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]:[[0,0],[e.clientWidth,e.clientHeight]]}function zm(){return this.__zoom||zo}function zf(e){return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function zp(){return navigator.maxTouchPoints||"ontouchstart"in this}function zh(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],a=e.invertY(t[0][1])-n[0][1],o=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}function zg(){var e,t,n,r=zd,i=zc,a=zh,o=zf,s=zp,l=[0,1/0],u=[[-1/0,-1/0],[1/0,1/0]],d=250,c=jV,m=Iq("start","zoom","end"),f=0,p=10;function h(e){e.property("__zoom",zm).on("wheel.zoom",$,{passive:!1}).on("mousedown.zoom",w).on("dblclick.zoom",k).filter(s).on("touchstart.zoom",S).on("touchmove.zoom",I).on("touchend.zoom touchcancel.zoom",j).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(e,t){return(t=Math.max(l[0],Math.min(l[1],t)))===e.k?e:new za(t,e.x,e.y)}function v(e,t,n){var r=t[0]-n[0]*e.k,i=t[1]-n[1]*e.k;return r===e.x&&i===e.y?e:new za(e.k,r,i)}function x(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function y(e,t,n,r){e.on("start.zoom",function(){b(this,arguments).event(r).start()}).on("interrupt.zoom end.zoom",function(){b(this,arguments).event(r).end()}).tween("zoom",function(){var e=arguments,a=b(this,e).event(r),o=i.apply(this,e),s=null==n?x(o):"function"==typeof n?n.apply(this,e):n,l=Math.max(o[1][0]-o[0][0],o[1][1]-o[0][1]),u=this.__zoom,d="function"==typeof t?t.apply(this,e):t,m=c(u.invert(s).concat(l/u.k),d.invert(s).concat(l/d.k));return function(e){if(1===e)e=d;else{var t=m(e),n=l/t[2];e=new za(n,s[0]-t[0]*n,s[1]-t[1]*n)}a.zoom(null,e)}})}function b(e,t,n){return!n&&e.__zooming||new _(e,t)}function _(e,t){this.that=e,this.args=t,this.active=0,this.sourceEvent=null,this.extent=i.apply(e,t),this.taps=0}function $(e,...t){if(r.apply(this,arguments)){var n=b(this,t).event(e),i=this.__zoom,s=Math.max(l[0],Math.min(l[1],i.k*Math.pow(2,o.apply(this,arguments)))),d=jO(e);if(n.wheel)(n.mouse[0][0]!==d[0]||n.mouse[0][1]!==d[1])&&(n.mouse[1]=i.invert(n.mouse[0]=d)),clearTimeout(n.wheel);else{if(i.k===s)return;n.mouse=[d,i.invert(d)],Nc(this),n.start()}zu(e),n.wheel=setTimeout(function(){n.wheel=null,n.end()},150),n.zoom("mouse",a(v(g(i,s),n.mouse[0],n.mouse[1]),n.extent,u))}}function w(e,...t){if(!n&&r.apply(this,arguments)){var i=e.currentTarget,o=b(this,t,!0).event(e),s=jE(e.view).on("mousemove.zoom",function(e){if(zu(e),!o.moved){var t=e.clientX-d,n=e.clientY-c;o.moved=t*t+n*n>f}o.event(e).zoom("mouse",a(v(o.that.__zoom,o.mouse[0]=jO(e,i),o.mouse[1]),o.extent,u))},!0).on("mouseup.zoom",function(e){s.on("mousemove.zoom mouseup.zoom",null),jZ(e.view,o.moved),zu(e),o.event(e).end()},!0),l=jO(e,i),d=e.clientX,c=e.clientY;jP(e.view),zl(e),o.mouse=[l,this.__zoom.invert(l)],Nc(this),o.start()}}function k(e,...t){if(r.apply(this,arguments)){var n=this.__zoom,o=jO(e.changedTouches?e.changedTouches[0]:e,this),s=n.invert(o),l=n.k*(e.shiftKey?.5:2),c=a(v(g(n,l),o,s),i.apply(this,t),u);zu(e),d>0?jE(this).transition().duration(d).call(y,c,o,e):jE(this).call(h.transform,c,o,e)}}function S(n,...i){if(r.apply(this,arguments)){var a,o,s,l,u=n.touches,d=u.length,c=b(this,i,n.changedTouches.length===d).event(n);for(zl(n),o=0;o<d;++o)l=[l=jO(s=u[o],this),this.__zoom.invert(l),s.identifier],c.touch0?c.touch1||c.touch0[2]===l[2]||(c.touch1=l,c.taps=0):(c.touch0=l,a=!0,c.taps=1+!!e);e&&(e=clearTimeout(e)),a&&(c.taps<2&&(t=l[0],e=setTimeout(function(){e=null},500)),Nc(this),c.start())}}function I(e,...t){if(this.__zooming){var n,r,i,o,s=b(this,t).event(e),l=e.changedTouches,d=l.length;for(zu(e),n=0;n<d;++n)i=jO(r=l[n],this),s.touch0&&s.touch0[2]===r.identifier?s.touch0[0]=i:s.touch1&&s.touch1[2]===r.identifier&&(s.touch1[0]=i);if(r=s.that.__zoom,s.touch1){var c=s.touch0[0],m=s.touch0[1],f=s.touch1[0],p=s.touch1[1],h=(h=f[0]-c[0])*h+(h=f[1]-c[1])*h,x=(x=p[0]-m[0])*x+(x=p[1]-m[1])*x;r=g(r,Math.sqrt(h/x)),i=[(c[0]+f[0])/2,(c[1]+f[1])/2],o=[(m[0]+p[0])/2,(m[1]+p[1])/2]}else{if(!s.touch0)return;i=s.touch0[0],o=s.touch0[1]}s.zoom("touch",a(v(r,i,o),s.extent,u))}}function j(e,...r){if(this.__zooming){var i,a,o=b(this,r).event(e),s=e.changedTouches,l=s.length;for(zl(e),n&&clearTimeout(n),n=setTimeout(function(){n=null},500),i=0;i<l;++i)a=s[i],o.touch0&&o.touch0[2]===a.identifier?delete o.touch0:o.touch1&&o.touch1[2]===a.identifier&&delete o.touch1;if(o.touch1&&!o.touch0&&(o.touch0=o.touch1,delete o.touch1),o.touch0)o.touch0[1]=this.__zoom.invert(o.touch0[0]);else if(o.end(),2===o.taps&&(a=jO(a,this),Math.hypot(t[0]-a[0],t[1]-a[1])<p)){var u=jE(this).on("dblclick.zoom");u&&u.apply(this,arguments)}}}return h.transform=function(e,t,n,r){var i=e.selection?e.selection():e;i.property("__zoom",zm),e!==i?y(e,t,n,r):i.interrupt().each(function(){b(this,arguments).event(r).start().zoom(null,"function"==typeof t?t.apply(this,arguments):t).end()})},h.scaleBy=function(e,t,n,r){h.scaleTo(e,function(){var e=this.__zoom.k,n="function"==typeof t?t.apply(this,arguments):t;return e*n},n,r)},h.scaleTo=function(e,t,n,r){h.transform(e,function(){var e=i.apply(this,arguments),r=this.__zoom,o=null==n?x(e):"function"==typeof n?n.apply(this,arguments):n,s=r.invert(o),l="function"==typeof t?t.apply(this,arguments):t;return a(v(g(r,l),o,s),e,u)},n,r)},h.translateBy=function(e,t,n,r){h.transform(e,function(){return a(this.__zoom.translate("function"==typeof t?t.apply(this,arguments):t,"function"==typeof n?n.apply(this,arguments):n),i.apply(this,arguments),u)},null,r)},h.translateTo=function(e,t,n,r,o){h.transform(e,function(){var e=i.apply(this,arguments),o=this.__zoom,s=null==r?x(e):"function"==typeof r?r.apply(this,arguments):r;return a(zo.translate(s[0],s[1]).scale(o.k).translate("function"==typeof t?-t.apply(this,arguments):-t,"function"==typeof n?-n.apply(this,arguments):-n),e,u)},r,o)},_.prototype={event:function(e){return e&&(this.sourceEvent=e),this},start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(e,t){return this.mouse&&"mouse"!==e&&(this.mouse[1]=t.invert(this.mouse[0])),this.touch0&&"touch"!==e&&(this.touch0[1]=t.invert(this.touch0[0])),this.touch1&&"touch"!==e&&(this.touch1[1]=t.invert(this.touch1[0])),this.that.__zoom=t,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(e){var t=jE(this.that).datum();m.call(e,this.that,new zi(e,{sourceEvent:this.sourceEvent,target:h,type:e,transform:this.that.__zoom,dispatch:m}),t)}},h.wheelDelta=function(e){return arguments.length?(o="function"==typeof e?e:zr(+e),h):o},h.filter=function(e){return arguments.length?(r="function"==typeof e?e:zr(!!e),h):r},h.touchable=function(e){return arguments.length?(s="function"==typeof e?e:zr(!!e),h):s},h.extent=function(e){return arguments.length?(i="function"==typeof e?e:zr([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),h):i},h.scaleExtent=function(e){return arguments.length?(l[0]=+e[0],l[1]=+e[1],h):[l[0],l[1]]},h.translateExtent=function(e){return arguments.length?(u[0][0]=+e[0][0],u[1][0]=+e[1][0],u[0][1]=+e[0][1],u[1][1]=+e[1][1],h):[[u[0][0],u[0][1]],[u[1][0],u[1][1]]]},h.constrain=function(e){return arguments.length?(a=e,h):a},h.duration=function(e){return arguments.length?(d=+e,h):d},h.interpolate=function(e){return arguments.length?(c=e,h):c},h.on=function(){var e=m.on.apply(m,arguments);return e===m?h:e},h.clickDistance=function(e){return arguments.length?(f=(e*=1)*e,h):Math.sqrt(f)},h.tapDistance=function(e){return arguments.length?(p=+e,h):p},h}function zv(e,t){var n,r,i=typeof t;return null==t||"boolean"===i?NQ(t):("number"===i?Nm:"string"===i?(r=NP(t))?(t=r,N1):N5:t instanceof NP?N1:t instanceof Date?function(e,t){var n=new Date;return e*=1,t*=1,function(r){return n.setTime(e*(1-r)+t*r),n}}:!ArrayBuffer.isView(n=t)||n instanceof DataView?Array.isArray(t)?function(e,t){var n,r=t?t.length:0,i=e?Math.min(r,e.length):0,a=Array(i),o=Array(r);for(n=0;n<i;++n)a[n]=zv(e[n],t[n]);for(;n<r;++n)o[n]=t[n];return function(e){for(n=0;n<i;++n)o[n]=a[n](e);return o}}:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?function(e,t){var n,r={},i={};for(n in(null===e||"object"!=typeof e)&&(e={}),(null===t||"object"!=typeof t)&&(t={}),t)n in e?r[n]=zv(e[n],t[n]):i[n]=t[n];return function(e){for(n in r)i[n]=r[n](e);return i}}:Nm:function(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,i=t.slice();return function(a){for(n=0;n<r;++n)i[n]=e[n]*(1-a)+t[n]*a;return i}})(e,t)}zs.prototype=za.prototype;let zx=[[-1/0,-1/0],[1/0,1/0]],zy=["Enter"," ","Escape"],zb={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};(r=m||(m={})).Strict="strict",r.Loose="loose",(i=f||(f={})).Free="free",i.Vertical="vertical",i.Horizontal="horizontal",(a=p||(p={})).Partial="partial",a.Full="full";let z_={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};(o=h||(h={})).Bezier="default",o.Straight="straight",o.Step="step",o.SmoothStep="smoothstep",o.SimpleBezier="simplebezier",(s=g||(g={})).Arrow="arrow",s.ArrowClosed="arrowclosed",(l=v||(v={})).Left="left",l.Top="top",l.Right="right",l.Bottom="bottom";let z$={[v.Left]:v.Right,[v.Right]:v.Left,[v.Top]:v.Bottom,[v.Bottom]:v.Top};function zw(e){return null===e?null:e?"valid":"invalid"}let zk=e=>"id"in e&&"source"in e&&"target"in e,zS=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),zI=(e,t=[0,0])=>{let{width:n,height:r}=z0(e),i=e.origin??t,a=n*i[0],o=r*i[1];return{x:e.position.x-a,y:e.position.y-o}},zj=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return e.forEach(e=>{(void 0===t.filter||t.filter(e))&&(n=zZ(n,zM(e)),r=!0)}),r?zR(n):{x:0,y:0,width:0,height:0}},zN=(e,t,[n,r,i]=[0,0,1],a=!1,o=!1)=>{let s={...zG(t,[n,r,i]),width:t.width/i,height:t.height/i},l=[];for(let t of e.values()){let{measured:e,selectable:n=!0,hidden:r=!1}=t;if(o&&!n||r)continue;let i=e.width??t.width??t.initialWidth??null,u=e.height??t.height??t.initialHeight??null,d=zB(s,zL(t)),c=(i??0)*(u??0),m=a&&d>0;(!t.internals.handleBounds||m||d>=c||t.dragging)&&l.push(t)}return l};async function zz({nodes:e,width:t,height:n,panZoom:r,minZoom:i,maxZoom:a},o){let s,l;if(0===e.size)return Promise.resolve(!0);let u=zY(zj((s=new Map,l=o?.nodes?new Set(o.nodes.map(e=>e.id)):null,e.forEach(e=>{e.measured.width&&e.measured.height&&(o?.includeHiddenNodes||!e.hidden)&&(!l||l.has(e.id))&&s.set(e.id,e)}),s)),t,n,o?.minZoom??i,o?.maxZoom??a,o?.padding??.1);return await r.setViewport(u,{duration:o?.duration,ease:o?.ease,interpolate:o?.interpolate}),Promise.resolve(!0)}function zE({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:i,onError:a}){let o=n.get(e),s=o.parentId?n.get(o.parentId):void 0,{x:l,y:u}=s?s.internals.positionAbsolute:{x:0,y:0},d=o.origin??r,c=o.extent||i;if("parent"!==o.extent||o.expandParent)s&&zQ(o.extent)&&(c=[[o.extent[0][0]+l,o.extent[0][1]+u],[o.extent[1][0]+l,o.extent[1][1]+u]]);else if(s){let e=s.measured.width,t=s.measured.height;e&&t&&(c=[[l,u],[l+e,u+t]])}else a?.("005","Only child nodes can use a parent extent.");let m=zQ(c)?zC(t,c,o.measured):t;return(void 0===o.measured.width||void 0===o.measured.height)&&a?.("015","It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."),{position:{x:m.x-l+(o.measured.width??0)*d[0],y:m.y-u+(o.measured.height??0)*d[1]},positionAbsolute:m}}async function zO({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:i}){let a,o=new Set(e.map(e=>e.id)),s=[];for(let e of n){if(!1===e.deletable)continue;let t=o.has(e.id),n=!t&&e.parentId&&s.find(t=>t.id===e.parentId);(t||n)&&s.push(e)}let l=new Set(t.map(e=>e.id)),u=r.filter(e=>!1!==e.deletable),d=(a=new Set,s.forEach(e=>{a.add(e.id)}),u.filter(e=>a.has(e.source)||a.has(e.target)));for(let e of u)l.has(e.id)&&!d.find(t=>t.id===e.id)&&d.push(e);if(!i)return{edges:d,nodes:s};let c=await i({nodes:s,edges:d});return"boolean"==typeof c?c?{edges:d,nodes:s}:{edges:[],nodes:[]}:c}let zT=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),zC=(e={x:0,y:0},t,n)=>({x:zT(e.x,t[0][0],t[1][0]-(n?.width??0)),y:zT(e.y,t[0][1],t[1][1]-(n?.height??0))});function zD(e,t,n){let{width:r,height:i}=z0(n),{x:a,y:o}=n.internals.positionAbsolute;return zC(e,[[a,o],[a+r,o+i]],t)}let zU=(e,t,n)=>e<t?zT(Math.abs(e-t),1,t)/t:e>n?-zT(Math.abs(e-n),1,t)/t:0,zP=(e,t,n=15,r=40)=>[zU(e.x,r,t.width-r)*n,zU(e.y,r,t.height-r)*n],zZ=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),zA=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),zR=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),zL=(e,t=[0,0])=>{let{x:n,y:r}=zS(e)?e.internals.positionAbsolute:zI(e,t);return{x:n,y:r,width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}},zM=(e,t=[0,0])=>{let{x:n,y:r}=zS(e)?e.internals.positionAbsolute:zI(e,t);return{x:n,y:r,x2:n+(e.measured?.width??e.width??e.initialWidth??0),y2:r+(e.measured?.height??e.height??e.initialHeight??0)}},zF=(e,t)=>zR(zZ(zA(e),zA(t))),zB=(e,t)=>Math.ceil(Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x))*Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y))),zW=e=>zH(e.width)&&zH(e.height)&&zH(e.x)&&zH(e.y),zH=e=>!isNaN(e)&&isFinite(e),zV=(e,t)=>{},zJ=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),zG=({x:e,y:t},[n,r,i],a=!1,o=[1,1])=>{let s={x:(e-n)/i,y:(t-r)/i};return a?zJ(s,o):s},zK=({x:e,y:t},[n,r,i])=>({x:e*i+n,y:t*i+r});function zq(e,t){if("number"==typeof e)return Math.floor((t-t/(1+e))*.5);if("string"==typeof e&&e.endsWith("px")){let t=parseFloat(e);if(!Number.isNaN(t))return Math.floor(t)}if("string"==typeof e&&e.endsWith("%")){let n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}let zY=(e,t,n,r,i,a)=>{let o=function(e,t,n){if("string"==typeof e||"number"==typeof e){let r=zq(e,n),i=zq(e,t);return{top:r,right:i,bottom:r,left:i,x:2*i,y:2*r}}if("object"==typeof e){let r=zq(e.top??e.y??0,n),i=zq(e.bottom??e.y??0,n),a=zq(e.left??e.x??0,t),o=zq(e.right??e.x??0,t);return{top:r,right:o,bottom:i,left:a,x:a+o,y:r+i}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}(a,t,n),s=zT(Math.min((t-o.x)/e.width,(n-o.y)/e.height),r,i),l=e.x+e.width/2,u=e.y+e.height/2,d=t/2-l*s,c=n/2-u*s,m=function(e,t,n,r,i,a){let{x:o,y:s}=zK(e,[t,n,r]),{x:l,y:u}=zK({x:e.x+e.width,y:e.y+e.height},[t,n,r]);return{left:Math.floor(o),top:Math.floor(s),right:Math.floor(i-l),bottom:Math.floor(a-u)}}(e,d,c,s,t,n),f={left:Math.min(m.left-o.left,0),top:Math.min(m.top-o.top,0),right:Math.min(m.right-o.right,0),bottom:Math.min(m.bottom-o.bottom,0)};return{x:d-f.left+f.right,y:c-f.top+f.bottom,zoom:s}},zX=()=>"u">typeof navigator&&navigator?.userAgent?.indexOf("Mac")>=0;function zQ(e){return null!=e&&"parent"!==e}function z0(e){return{width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}}function z1(e){return(e.measured?.width??e.width??e.initialWidth)!==void 0&&(e.measured?.height??e.height??e.initialHeight)!==void 0}function z4(e,t={width:0,height:0},n,r,i){let a={...e},o=r.get(n);if(o){let e=o.origin||i;a.x+=o.internals.positionAbsolute.x-(t.width??0)*e[0],a.y+=o.internals.positionAbsolute.y-(t.height??0)*e[1]}return a}function z6(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function z2(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:i}){let{x:a,y:o}=z7(e),s=zG({x:a-(i?.left??0),y:o-(i?.top??0)},r),{x:l,y:u}=n?zJ(s,t):s;return{xSnapped:l,ySnapped:u,...s}}let z5=e=>({width:e.offsetWidth,height:e.offsetHeight}),z3=e=>e?.getRootNode?.()||window?.document,z9=["INPUT","SELECT","TEXTAREA"];function z8(e){let t=e.composedPath?.()?.[0]||e.target;return t?.nodeType===1&&(z9.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey"))}let z7=(e,t)=>{let n="clientX"in e,r=n?e.clientX:e.touches?.[0].clientX,i=n?e.clientY:e.touches?.[0].clientY;return{x:r-(t?.left??0),y:i-(t?.top??0)}},Ee=(e,t,n,r,i)=>{let a=t.querySelectorAll(`.${e}`);return a&&a.length?Array.from(a).map(t=>{let a=t.getBoundingClientRect();return{id:t.getAttribute("data-handleid"),type:e,nodeId:i,position:t.getAttribute("data-handlepos"),x:(a.left-n.left)/r,y:(a.top-n.top)/r,...z5(t)}}):null};function Et({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:i,sourceControlY:a,targetControlX:o,targetControlY:s}){let l=.125*e+.375*i+.375*o+.125*n,u=.125*t+.375*a+.375*s+.125*r,d=Math.abs(l-e),c=Math.abs(u-t);return[l,u,d,c]}function En(e,t){return e>=0?.5*e:25*t*Math.sqrt(-e)}function Er({pos:e,x1:t,y1:n,x2:r,y2:i,c:a}){switch(e){case v.Left:return[t-En(t-r,a),n];case v.Right:return[t+En(r-t,a),n];case v.Top:return[t,n-En(n-i,a)];case v.Bottom:return[t,n+En(i-n,a)]}}function Ei({sourceX:e,sourceY:t,sourcePosition:n=v.Bottom,targetX:r,targetY:i,targetPosition:a=v.Top,curvature:o=.25}){let[s,l]=Er({pos:n,x1:e,y1:t,x2:r,y2:i,c:o}),[u,d]=Er({pos:a,x1:r,y1:i,x2:e,y2:t,c:o}),[c,m,f,p]=Et({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:s,sourceControlY:l,targetControlX:u,targetControlY:d});return[`M${e},${t} C${s},${l} ${u},${d} ${r},${i}`,c,m,f,p]}function Ea({sourceX:e,sourceY:t,targetX:n,targetY:r}){let i=Math.abs(n-e)/2,a=Math.abs(r-t)/2;return[n<e?n+i:n-i,r<t?r+a:r-a,i,a]}let Eo=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||""}-${n}${r||""}`;function Es({sourceX:e,sourceY:t,targetX:n,targetY:r}){let[i,a,o,s]=Ea({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,i,a,o,s]}let El={[v.Left]:{x:-1,y:0},[v.Right]:{x:1,y:0},[v.Top]:{x:0,y:-1},[v.Bottom]:{x:0,y:1}},Eu=({source:e,sourcePosition:t=v.Bottom,target:n})=>t===v.Left||t===v.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},Ed=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function Ec({sourceX:e,sourceY:t,sourcePosition:n=v.Bottom,targetX:r,targetY:i,targetPosition:a=v.Top,borderRadius:o=5,centerX:s,centerY:l,offset:u=20,stepPosition:d=.5}){let[c,m,f,p,h]=function({source:e,sourcePosition:t=v.Bottom,target:n,targetPosition:r=v.Top,center:i,offset:a,stepPosition:o}){let s,l,u=El[t],d=El[r],c={x:e.x+u.x*a,y:e.y+u.y*a},m={x:n.x+d.x*a,y:n.y+d.y*a},f=Eu({source:c,sourcePosition:t,target:m}),p=0!==f.x?"x":"y",h=f[p],g=[],x={x:0,y:0},y={x:0,y:0},[,,b,_]=Ea({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(u[p]*d[p]==-1){"x"===p?(s=i.x??c.x+(m.x-c.x)*o,l=i.y??(c.y+m.y)/2):(s=i.x??(c.x+m.x)/2,l=i.y??c.y+(m.y-c.y)*o);let e=[{x:s,y:c.y},{x:s,y:m.y}],t=[{x:c.x,y:l},{x:m.x,y:l}];g=u[p]===h?"x"===p?e:t:"x"===p?t:e}else{let i=[{x:c.x,y:m.y}],o=[{x:m.x,y:c.y}];if(g="x"===p?u.x===h?o:i:u.y===h?i:o,t===r){let t=Math.abs(e[p]-n[p]);if(t<=a){let r=Math.min(a-1,a-t);u[p]===h?x[p]=(c[p]>e[p]?-1:1)*r:y[p]=(m[p]>n[p]?-1:1)*r}}if(t!==r){let e="x"===p?"y":"x",t=u[p]===d[e],n=c[e]>m[e],r=c[e]<m[e];(1===u[p]&&(!t&&n||t&&r)||1!==u[p]&&(!t&&r||t&&n))&&(g="x"===p?i:o)}let f={x:c.x+x.x,y:c.y+x.y},v={x:m.x+y.x,y:m.y+y.y};Math.max(Math.abs(f.x-g[0].x),Math.abs(v.x-g[0].x))>=Math.max(Math.abs(f.y-g[0].y),Math.abs(v.y-g[0].y))?(s=(f.x+v.x)/2,l=g[0].y):(s=g[0].x,l=(f.y+v.y)/2)}return[[e,{x:c.x+x.x,y:c.y+x.y},...g,{x:m.x+y.x,y:m.y+y.y},n],s,l,b,_]}({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:i},targetPosition:a,center:{x:s,y:l},offset:u,stepPosition:d});return[c.reduce((e,t,n)=>e+(n>0&&n<c.length-1?function(e,t,n,r){let i=Math.min(Ed(e,t)/2,Ed(t,n)/2,r),{x:a,y:o}=t;if(e.x===a&&a===n.x||e.y===o&&o===n.y)return`L${a} ${o}`;if(e.y===o){let t=e.x<n.x?-1:1,r=e.y<n.y?1:-1;return`L ${a+i*t},${o}Q ${a},${o} ${a},${o+i*r}`}let s=e.x<n.x?1:-1,l=e.y<n.y?-1:1;return`L ${a},${o+i*l}Q ${a},${o} ${a+i*s},${o}`}(c[n-1],t,c[n+1],o):`${0===n?"M":"L"}${t.x} ${t.y}`),""),m,f,p,h]}function Em(e){return e&&!!(e.internals.handleBounds||e.handles?.length)&&!!(e.measured.width||e.width||e.initialWidth)}function Ef(e){if(!e)return null;let t=[],n=[];for(let r of e)r.width=r.width??1,r.height=r.height??1,"source"===r.type?t.push(r):"target"===r.type&&n.push(r);return{source:t,target:n}}function Ep(e,t,n=v.Left,r=!1){let i=(t?.x??0)+e.internals.positionAbsolute.x,a=(t?.y??0)+e.internals.positionAbsolute.y,{width:o,height:s}=t??z0(e);if(r)return{x:i+o/2,y:a+s/2};switch(t?.position??n){case v.Top:return{x:i+o/2,y:a};case v.Right:return{x:i+o,y:a+s/2};case v.Bottom:return{x:i+o/2,y:a+s};case v.Left:return{x:i,y:a+s/2}}}function Eh(e,t){return e&&(t?e.find(e=>e.id===t):e[0])||null}function Eg(e,t){if(!e)return"";if("string"==typeof e)return e;let n=t?`${t}__`:"";return`${n}${Object.keys(e).sort().map(t=>`${t}=${e[t]}`).join("&")}`}let Ev={nodeOrigin:[0,0],nodeExtent:zx,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},Ex={...Ev,checkEquality:!0};function Ey(e,t){let n={...e};for(let e in t)void 0!==t[e]&&(n[e]=t[e]);return n}function Eb(e){return"manual"===e}function E_(e,t,n,r={}){let i=Ey(Ex,r),a={i:0},o=new Map(t),s=i?.elevateNodesOnSelect&&!Eb(i.zIndexMode)?1e3:0,l=e.length>0;for(let u of(t.clear(),n.clear(),e)){let e=o.get(u.id);if(i.checkEquality&&u===e?.internals.userNode)t.set(u.id,e);else{let n=zC(zI(u,i.nodeOrigin),zQ(u.extent)?u.extent:i.nodeExtent,z0(u));e={...i.defaults,...u,measured:{width:u.measured?.width,height:u.measured?.height},internals:{positionAbsolute:n,handleBounds:function(e,t){if(!e.handles)return e.measured?t?.internals.handleBounds:void 0;let n=[],r=[];for(let t of e.handles){let i={id:t.id,width:t.width??1,height:t.height??1,nodeId:e.id,x:t.x,y:t.y,position:t.position,type:t.type};"source"===t.type?n.push(i):"target"===t.type&&r.push(i)}return{source:n,target:r}}(u,e),z:Ew(u,s,i.zIndexMode),userNode:u}},t.set(u.id,e)}void 0!==e.measured&&void 0!==e.measured.width&&void 0!==e.measured.height||e.hidden||(l=!1),u.parentId&&E$(e,t,n,r,a)}return l}function E$(e,t,n,r,i){let{elevateNodesOnSelect:a,nodeOrigin:o,nodeExtent:s,zIndexMode:l}=Ey(Ev,r),u=e.parentId,d=t.get(u);if(!d)return void console.warn(`Parent node ${u} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);!function(e,t){if(!e.parentId)return;let n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}(e,n),i&&!d.parentId&&void 0===d.internals.rootParentIndex&&"auto"===l&&(d.internals.rootParentIndex=++i.i,d.internals.z=d.internals.z+10*i.i),i&&void 0!==d.internals.rootParentIndex&&(i.i=d.internals.rootParentIndex);let{x:c,y:m,z:f}=function(e,t,n,r,i,a){let{x:o,y:s}=t.internals.positionAbsolute,l=z0(e),u=zI(e,n),d=zQ(e.extent)?zC(u,e.extent,l):u,c=zC({x:o+d.x,y:s+d.y},r,l);"parent"===e.extent&&(c=zD(c,l,t));let m=Ew(e,i,a),f=t.internals.z??0;return{x:c.x,y:c.y,z:f>=m?f+1:m}}(e,d,o,s,a&&!Eb(l)?1e3:0,l),{positionAbsolute:p}=e.internals,h=c!==p.x||m!==p.y;(h||f!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:h?{x:c,y:m}:p,z:f}})}function Ew(e,t,n){let r=zH(e.zIndex)?e.zIndex:0;return Eb(n)?r:r+(e.selected?t:0)}function Ek(e,t,n,r=[0,0]){let i=[],a=new Map;for(let n of e){let e=t.get(n.parentId);if(!e)continue;let r=zF(a.get(n.parentId)?.expandedRect??zL(e),n.rect);a.set(n.parentId,{expandedRect:r,parent:e})}return a.size>0&&a.forEach(({expandedRect:t,parent:a},o)=>{let s=a.internals.positionAbsolute,l=z0(a),u=a.origin??r,d=t.x<s.x?Math.round(Math.abs(s.x-t.x)):0,c=t.y<s.y?Math.round(Math.abs(s.y-t.y)):0,m=Math.max(l.width,Math.round(t.width)),f=Math.max(l.height,Math.round(t.height)),p=(m-l.width)*u[0],h=(f-l.height)*u[1];(d>0||c>0||p||h)&&(i.push({id:o,type:"position",position:{x:a.position.x-d+p,y:a.position.y-c+h}}),n.get(o)?.forEach(t=>{e.some(e=>e.id===t.id)||i.push({id:t.id,type:"position",position:{x:t.position.x+d,y:t.position.y+c}})})),(l.width<t.width||l.height<t.height||d||c)&&i.push({id:o,type:"dimensions",setAttributes:!0,dimensions:{width:m+(d?u[0]*d-p:0),height:f+(c?u[1]*c-h:0)}})}),i}async function ES({delta:e,panZoom:t,transform:n,translateExtent:r,width:i,height:a}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);let o=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[i,a]],r);return Promise.resolve(!!o&&(o.x!==n[0]||o.y!==n[1]||o.k!==n[2]))}function EI(e,t,n,r,i,a){let o=i,s=r.get(o)||new Map;r.set(o,s.set(n,t)),o=`${i}-${e}`;let l=r.get(o)||new Map;if(r.set(o,l.set(n,t)),a){o=`${i}-${e}-${a}`;let s=r.get(o)||new Map;r.set(o,s.set(n,t))}}function Ej(e,t,n){for(let r of(e.clear(),t.clear(),n)){let{source:n,target:i,sourceHandle:a=null,targetHandle:o=null}=r,s={edgeId:r.id,source:n,target:i,sourceHandle:a,targetHandle:o},l=`${n}-${a}--${i}-${o}`;EI("source",s,`${i}-${o}--${n}-${a}`,e,n,a),EI("target",s,l,e,i,o),t.set(r.id,r)}}function EN(e,t,n){let r=e;do{if(r?.matches?.(t))return!0;if(r===n)break;r=r?.parentElement}while(r)return!1}function Ez({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){let i=[];for(let[e,a]of t){let t=n.get(e)?.internals.userNode;t&&i.push({...t,position:a.position,dragging:r})}if(!e)return[i[0],i];let a=n.get(e)?.internals.userNode;return[a?{...a,position:t.get(e)?.position||a.position,dragging:r}:i[0],i]}function EE(e,t,n,r,i,a=!1){let o=r.get(e);if(!o)return null;let s="strict"===i?o.internals.handleBounds?.[t]:[...o.internals.handleBounds?.source??[],...o.internals.handleBounds?.target??[]],l=(n?s?.find(e=>e.id===n):s?.[0])??null;return l&&a?{...l,...Ep(o,l,l.position,!0)}:l}function EO(e,t){return e?e:t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null}let ET=()=>!0;function EC(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:a,doc:o,lib:s,flowId:l,isValidConnection:u=ET,nodeLookup:d}){let c="target"===a,f=t?o.querySelector(`.${s}-flow__handle[data-id="${l}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x:p,y:h}=z7(e),g=o.elementFromPoint(p,h),v=g?.classList.contains(`${s}-flow__handle`)?g:f,x={handleDomNode:v,isValid:!1,connection:null,toHandle:null};if(v){let e=EO(void 0,v),t=v.getAttribute("data-nodeid"),a=v.getAttribute("data-handleid"),o=v.classList.contains("connectable"),s=v.classList.contains("connectableend");if(!t||!e)return x;let l={source:c?t:r,sourceHandle:c?a:i,target:c?r:t,targetHandle:c?i:a};x.connection=l,x.isValid=o&&s&&(n===m.Strict?c&&"source"===e||!c&&"target"===e:t!==r||a!==i)&&u(l),x.toHandle=EE(t,e,a,d,n,!0)}return x}let ED=function(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:i,edgeUpdaterType:a,isTarget:o,domNode:s,nodeLookup:l,lib:u,autoPanOnConnect:d,flowId:c,panBy:m,cancelConnection:f,onConnectStart:p,onConnect:h,onConnectEnd:g,isValidConnection:x=ET,onReconnectEnd:y,updateConnection:b,getTransform:_,getFromHandle:$,autoPanSpeed:w,dragThreshold:k=1,handleDomNode:S}){let I,j=z3(e.target),N=0,{x:z,y:E}=z7(e),O=EO(a,S),T=s?.getBoundingClientRect(),C=!1;if(!T||!O)return;let D=EE(i,O,r,l,t);if(!D)return;let U=z7(e,T),P=!1,Z=null,A=!1,R=null,L={...D,nodeId:i,type:O,position:D.position},M=l.get(i),F={inProgress:!0,isValid:null,from:Ep(M,L,v.Left,!0),fromHandle:L,fromPosition:L.position,fromNode:M,to:U,toHandle:null,toPosition:z$[L.position],toNode:null,pointer:U};function B(){C=!0,b(F),p?.(e,{nodeId:i,handleId:r,handleType:O})}function W(e){var a,s;let f;if(!C){let{x:t,y:n}=z7(e),r=t-z,i=n-E;if(!(r*r+i*i>k*k))return;B()}if(!$()||!L)return void H(e);let p=_();I=function(e,t,n,r){let i=[],a=1/0;for(let o of function(e,t,n){let r=[],i={x:e.x-n,y:e.y-n,width:2*n,height:2*n};for(let e of t.values())zB(i,zL(e))>0&&r.push(e);return r}(e,n,t+250))for(let n of[...o.internals.handleBounds?.source??[],...o.internals.handleBounds?.target??[]]){if(r.nodeId===n.nodeId&&r.type===n.type&&r.id===n.id)continue;let{x:s,y:l}=Ep(o,n,n.position,!0),u=Math.sqrt(Math.pow(s-e.x,2)+Math.pow(l-e.y,2));u>t||(u<a?(i=[{...n,x:s,y:l}],a=u):u===a&&i.push({...n,x:s,y:l}))}if(!i.length)return null;if(i.length>1){let e="source"===r.type?"target":"source";return i.find(t=>t.type===e)??i[0]}return i[0]}(zG(U=z7(e,T),p,!1,[1,1]),n,l,L),P||(!function e(){if(!d||!T)return;let[t,n]=zP(U,T,w);m({x:t,y:n}),N=requestAnimationFrame(e)}(),P=!0);let h=EC(e,{handle:I,connectionMode:t,fromNodeId:i,fromHandleId:r,fromType:o?"target":"source",isValidConnection:x,doc:j,lib:u,flowId:c,nodeLookup:l});R=h.handleDomNode,Z=h.connection,a=!!I,s=h.isValid,f=null,s?f=!0:a&&!s&&(f=!1),A=f;let g=l.get(i),y=g?Ep(g,L,v.Left,!0):F.from,S={...F,from:y,isValid:A,to:h.toHandle&&A?zK({x:h.toHandle.x,y:h.toHandle.y},p):U,toHandle:h.toHandle,toPosition:A&&h.toHandle?h.toHandle.position:z$[L.position],toNode:h.toHandle?l.get(h.toHandle.nodeId):null,pointer:U};b(S),F=S}function H(e){if(!("touches"in e)||!(e.touches.length>0)){if(C){(I||R)&&Z&&A&&h?.(Z);let{inProgress:t,...n}=F,r={...n,toPosition:F.toHandle?F.toPosition:null};g?.(e,r),a&&y?.(e,r)}f(),cancelAnimationFrame(N),P=!1,A=!1,Z=null,R=null,j.removeEventListener("mousemove",W),j.removeEventListener("mouseup",H),j.removeEventListener("touchmove",W),j.removeEventListener("touchend",H)}}0===k&&B(),j.addEventListener("mousemove",W),j.addEventListener("mouseup",H),j.addEventListener("touchmove",W),j.addEventListener("touchend",H)},EU=e=>({x:e.x,y:e.y,zoom:e.k}),EP=({x:e,y:t,zoom:n})=>zo.translate(e,t).scale(n),EZ=(e,t)=>e.target.closest(`.${t}`),EA=(e,t)=>2===t&&Array.isArray(e)&&e.includes(2),ER=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,EL=(e,t=0,n=ER,r=()=>{})=>{let i="number"==typeof t&&t>0;return i||r(),i?e.transition().duration(t).ease(n).on("end",r):e},EM=e=>{let t=e.ctrlKey&&zX()?10:1;return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*t};function EF(e){let t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:e.includes("left"),affectsY:e.includes("top")}}function EB(e,t){return Math.max(0,t-e)}function EW(e,t){return Math.max(0,e-t)}function EH(e,t,n){return Math.max(0,t-e,e-n)}(u=x||(x={})).Line="line",u.Handle="handle";let EV={width:0,height:0,x:0,y:0},EJ={...EV,pointerX:0,pointerY:0,aspectRatio:1};var EG=e.i(74934);let EK={get url(){return`file://${e.P("apps/compiler-ui/node_modules/zustand/esm/vanilla.mjs")}`}},Eq=e=>{let t,n=new Set,r=(e,r)=>{let i="function"==typeof e?e(t):e;if(!Object.is(i,t)){let e=t;t=(null!=r?r:"object"!=typeof i||null===i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{(EK.env?EK.env.MODE:void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},o=t=e(r,i,a);return a},{useDebugValue:EY}=_.default,{useSyncExternalStoreWithSelector:EX}=EG.default,EQ=e=>e;function E0(e,t=EQ,n){let r=EX(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return EY(r),r}let E1=(e,t)=>{let n=e?Eq(e):Eq,r=(e,r=t)=>E0(n,e,r);return Object.assign(r,n),r};function E4(e,t){if(Object.is(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[n,r]of e)if(!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}let n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}let E6=(0,_.createContext)(null),E2=E6.Provider,E5="[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001";function E3(e,t){let n=(0,_.useContext)(E6);if(null===n)throw Error(E5);return E0(n,e,t)}function E9(){let e=(0,_.useContext)(E6);if(null===e)throw Error(E5);return(0,_.useMemo)(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}let E8={display:"none"},E7={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Oe="react-flow__node-desc",Ot="react-flow__edge-desc",On=e=>e.ariaLiveMessage,Or=e=>e.ariaLabelConfig;function Oi({rfId:e}){let t=E3(On);return(0,b.jsx)("div",{id:`react-flow__aria-live-${e}`,"aria-live":"assertive","aria-atomic":"true",style:E7,children:t})}function Oa({rfId:e,disableKeyboardA11y:t}){let n=E3(Or);return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{id:`${Oe}-${e}`,style:E8,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),(0,b.jsx)("div",{id:`${Ot}-${e}`,style:E8,children:n["edge.a11yDescription.default"]}),!t&&(0,b.jsx)(Oi,{rfId:e})]})}let Oo=(0,_.forwardRef)(({position:e="top-left",children:t,className:n,style:r,...i},a)=>{let o=`${e}`.split("-");return(0,b.jsx)("div",{className:IG(["react-flow__panel",n,...o]),style:r,ref:a,...i,children:t})});function Os({proOptions:e,position:t="bottom-right"}){return e?.hideAttribution?null:(0,b.jsx)(Oo,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:(0,b.jsx)("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}Oo.displayName="Panel";let Ol=e=>{let t=[],n=[];for(let[,n]of e.nodeLookup)n.selected&&t.push(n.internals.userNode);for(let[,t]of e.edgeLookup)t.selected&&n.push(t);return{selectedNodes:t,selectedEdges:n}},Ou=e=>e.id;function Od(e,t){return E4(e.selectedNodes.map(Ou),t.selectedNodes.map(Ou))&&E4(e.selectedEdges.map(Ou),t.selectedEdges.map(Ou))}function Oc({onSelectionChange:e}){let t=E9(),{selectedNodes:n,selectedEdges:r}=E3(Ol,Od);return(0,_.useEffect)(()=>{let i={nodes:n,edges:r};e?.(i),t.getState().onSelectionChangeHandlers.forEach(e=>e(i))},[n,r,e]),null}let Om=e=>!!e.onSelectionChangeHandlers;function Of({onSelectionChange:e}){let t=E3(Om);return e||t?(0,b.jsx)(Oc,{onSelectionChange:e}):null}let Op=[0,0],Oh={x:0,y:0,zoom:1},Og=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode","rfId"],Ov=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),Ox={translateExtent:zx,nodeOrigin:Op,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function Oy(e){let{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:i,setTranslateExtent:a,setNodeExtent:o,reset:s,setDefaultNodesAndEdges:l}=E3(Ov,E4),u=E9();(0,_.useEffect)(()=>(l(e.defaultNodes,e.defaultEdges),()=>{d.current=Ox,s()}),[]);let d=(0,_.useRef)(Ox);return(0,_.useEffect)(()=>{for(let s of Og){let l=e[s];if(l!==d.current[s]&&void 0!==e[s])if("nodes"===s)t(l);else if("edges"===s)n(l);else if("minZoom"===s)r(l);else if("maxZoom"===s)i(l);else if("translateExtent"===s)a(l);else if("nodeExtent"===s)o(l);else if("ariaLabelConfig"===s)u.setState({ariaLabelConfig:{...zb,...l||{}}});else"fitView"===s?u.setState({fitViewQueued:l}):"fitViewOptions"===s?u.setState({fitViewOptions:l}):u.setState({[s]:l})}d.current=e},Og.map(t=>e[t])),null}function Ob(){return"u"<typeof window||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}let O_="u">typeof document?document:null;function O$(e=null,t={target:O_,actInsideInputWithModifier:!0}){let[n,r]=(0,_.useState)(!1),i=(0,_.useRef)(!1),a=(0,_.useRef)(new Set([])),[o,s]=(0,_.useMemo)(()=>{if(null!==e){let t=(Array.isArray(e)?e:[e]).filter(e=>"string"==typeof e).map(e=>e.replace("+","\n").replace("\n\n","\n+").split("\n")),n=t.reduce((e,t)=>e.concat(...t),[]);return[t,n]}return[[],[]]},[e]);return(0,_.useEffect)(()=>{let n=t?.target??O_,l=t?.actInsideInputWithModifier??!0;if(null!==e){let e=e=>{if(i.current=e.ctrlKey||e.metaKey||e.shiftKey||e.altKey,(!i.current||i.current&&!l)&&z8(e))return!1;let n=Ok(e.code,s);if(a.current.add(e[n]),Ow(o,a.current,!1)){let n=e.composedPath?.()?.[0]||e.target,a=n?.nodeName==="BUTTON"||n?.nodeName==="A";!1!==t.preventDefault&&(i.current||!a)&&e.preventDefault(),r(!0)}},u=e=>{let t=Ok(e.code,s);Ow(o,a.current,!0)?(r(!1),a.current.clear()):a.current.delete(e[t]),"Meta"===e.key&&a.current.clear(),i.current=!1},d=()=>{a.current.clear(),r(!1)};return n?.addEventListener("keydown",e),n?.addEventListener("keyup",u),window.addEventListener("blur",d),window.addEventListener("contextmenu",d),()=>{n?.removeEventListener("keydown",e),n?.removeEventListener("keyup",u),window.removeEventListener("blur",d),window.removeEventListener("contextmenu",d)}}},[e,r]),n}function Ow(e,t,n){return e.filter(e=>n||e.length===t.size).some(e=>e.every(e=>t.has(e)))}function Ok(e,t){return t.includes(e)?"code":"key"}function OS(e,t){let n=[],r=new Map,i=[];for(let t of e)if("add"===t.type){i.push(t);continue}else if("remove"===t.type||"replace"===t.type)r.set(t.id,[t]);else{let e=r.get(t.id);e?e.push(t):r.set(t.id,[t])}for(let e of t){let t=r.get(e.id);if(!t){n.push(e);continue}if("remove"===t[0].type)continue;if("replace"===t[0].type){n.push({...t[0].item});continue}let i={...e};for(let e of t){var a=e,o=i;switch(a.type){case"select":o.selected=a.selected;break;case"position":void 0!==a.position&&(o.position=a.position),void 0!==a.dragging&&(o.dragging=a.dragging);break;case"dimensions":void 0!==a.dimensions&&(o.measured={...a.dimensions},a.setAttributes&&((!0===a.setAttributes||"width"===a.setAttributes)&&(o.width=a.dimensions.width),(!0===a.setAttributes||"height"===a.setAttributes)&&(o.height=a.dimensions.height))),"boolean"==typeof a.resizing&&(o.resizing=a.resizing)}}n.push(i)}return i.length&&i.forEach(e=>{void 0!==e.index?n.splice(e.index,0,{...e.item}):n.push({...e.item})}),n}function OI(e,t){return{id:e,type:"select",selected:t}}function Oj(e,t=new Set,n=!1){let r=[];for(let[i,a]of e){let e=t.has(i);(void 0!==a.selected||e)&&a.selected!==e&&(n&&(a.selected=e),r.push(OI(a.id,e)))}return r}function ON({items:e=[],lookup:t}){let n=[],r=new Map(e.map(e=>[e.id,e]));for(let[r,i]of e.entries()){let e=t.get(i.id),a=e?.internals?.userNode??e;void 0!==a&&a!==i&&n.push({id:i.id,item:i,type:"replace"}),void 0===a&&n.push({item:i,type:"add",index:r})}for(let[e]of t)void 0===r.get(e)&&n.push({id:e,type:"remove"});return n}function Oz(e){return{id:e.id,type:"remove"}}let OE=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e);function OO(e){return(0,_.forwardRef)(e)}let OT="u">typeof window?_.useLayoutEffect:_.useEffect;function OC(e){let[t,n]=(0,_.useState)(BigInt(0)),[r]=(0,_.useState)(()=>{var e;let t;return e=()=>n(e=>e+BigInt(1)),t=[],{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}});return OT(()=>{let t=r.get();t.length&&(e(t),r.reset())},[t]),r}let OD=(0,_.createContext)(null);function OU({children:e}){let t=E9(),n=OC((0,_.useCallback)(e=>{let{nodes:n=[],setNodes:r,hasDefaultNodes:i,onNodesChange:a,nodeLookup:o,fitViewQueued:s,onNodesChangeMiddlewareMap:l}=t.getState(),u=n;for(let t of e)u="function"==typeof t?t(u):t;let d=ON({items:u,lookup:o});for(let e of l.values())d=e(d);i&&r(u),d.length>0?a?.(d):s&&window.requestAnimationFrame(()=>{let{fitViewQueued:e,nodes:n,setNodes:r}=t.getState();e&&r(n)})},[])),r=OC((0,_.useCallback)(e=>{let{edges:n=[],setEdges:r,hasDefaultEdges:i,onEdgesChange:a,edgeLookup:o}=t.getState(),s=n;for(let t of e)s="function"==typeof t?t(s):t;i?r(s):a&&a(ON({items:s,lookup:o}))},[])),i=(0,_.useMemo)(()=>({nodeQueue:n,edgeQueue:r}),[]);return(0,b.jsx)(OD.Provider,{value:i,children:e})}let OP=e=>!!e.panZoom;function OZ(){let e,t=(e=E9(),(0,_.useMemo)(()=>({zoomIn:t=>{let{panZoom:n}=e.getState();return n?n.scaleBy(1.2,{duration:t?.duration}):Promise.resolve(!1)},zoomOut:t=>{let{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,{duration:t?.duration}):Promise.resolve(!1)},zoomTo:(t,n)=>{let{panZoom:r}=e.getState();return r?r.scaleTo(t,{duration:n?.duration}):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{let{transform:[r,i,a],panZoom:o}=e.getState();return o?(await o.setViewport({x:t.x??r,y:t.y??i,zoom:t.zoom??a},n),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{let[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},setCenter:async(t,n,r)=>e.getState().setCenter(t,n,r),fitBounds:async(t,n)=>{let{width:r,height:i,minZoom:a,maxZoom:o,panZoom:s}=e.getState(),l=zY(t,r,i,a,o,n?.padding??.1);return s?(await s.setViewport(l,{duration:n?.duration,ease:n?.ease,interpolate:n?.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={})=>{let{transform:r,snapGrid:i,snapToGrid:a,domNode:o}=e.getState();if(!o)return t;let{x:s,y:l}=o.getBoundingClientRect(),u={x:t.x-s,y:t.y-l},d=n.snapGrid??i;return zG(u,r,n.snapToGrid??a,d)},flowToScreenPosition:t=>{let{transform:n,domNode:r}=e.getState();if(!r)return t;let{x:i,y:a}=r.getBoundingClientRect(),o=zK(t,n);return{x:o.x+i,y:o.y+a}}}),[])),n=E9(),r=function(){let e=(0,_.useContext)(OD);if(!e)throw Error("useBatchContext must be used within a BatchProvider");return e}(),i=E3(OP),a=(0,_.useMemo)(()=>{let e=e=>n.getState().nodeLookup.get(e),t=e=>{r.nodeQueue.push(e)},i=e=>{r.edgeQueue.push(e)},a=e=>{let{nodeLookup:t,nodeOrigin:r}=n.getState(),i=OE(e)?e:t.get(e.id),a=i.parentId?z4(i.position,i.measured,i.parentId,t,r):i.position;return zL({...i,position:a,width:i.measured?.width??i.width,height:i.measured?.height??i.height})},o=(e,n,r={replace:!1})=>{t(t=>t.map(t=>{if(t.id===e){let e="function"==typeof n?n(t):n;return r.replace&&OE(e)?e:{...t,...e}}return t}))},s=(e,t,n={replace:!1})=>{i(r=>r.map(r=>{if(r.id===e){let e="function"==typeof t?t(r):t;return n.replace&&zk(e)?e:{...r,...e}}return r}))};return{getNodes:()=>n.getState().nodes.map(e=>({...e})),getNode:t=>e(t)?.internals.userNode,getInternalNode:e,getEdges:()=>{let{edges:e=[]}=n.getState();return e.map(e=>({...e}))},getEdge:e=>n.getState().edgeLookup.get(e),setNodes:t,setEdges:i,addNodes:e=>{let t=Array.isArray(e)?e:[e];r.nodeQueue.push(e=>[...e,...t])},addEdges:e=>{let t=Array.isArray(e)?e:[e];r.edgeQueue.push(e=>[...e,...t])},toObject:()=>{let{nodes:e=[],edges:t=[],transform:r}=n.getState(),[i,a,o]=r;return{nodes:e.map(e=>({...e})),edges:t.map(e=>({...e})),viewport:{x:i,y:a,zoom:o}}},deleteElements:async({nodes:e=[],edges:t=[]})=>{let{nodes:r,edges:i,onNodesDelete:a,onEdgesDelete:o,triggerNodeChanges:s,triggerEdgeChanges:l,onDelete:u,onBeforeDelete:d}=n.getState(),{nodes:c,edges:m}=await zO({nodesToRemove:e,edgesToRemove:t,nodes:r,edges:i,onBeforeDelete:d}),f=m.length>0,p=c.length>0;if(f){let e=m.map(Oz);o?.(m),l(e)}if(p){let e=c.map(Oz);a?.(c),s(e)}return(p||f)&&u?.({nodes:c,edges:m}),{deletedNodes:c,deletedEdges:m}},getIntersectingNodes:(e,t=!0,r)=>{let i=zW(e),o=i?e:a(e),s=void 0!==r;return o?(r||n.getState().nodes).filter(r=>{let a=n.getState().nodeLookup.get(r.id);if(a&&!i&&(r.id===e.id||!a.internals.positionAbsolute))return!1;let l=zL(s?r:a),u=zB(l,o);return t&&u>0||u>=l.width*l.height||u>=o.width*o.height}):[]},isNodeIntersecting:(e,t,n=!0)=>{let r=zW(e)?e:a(e);if(!r)return!1;let i=zB(r,t);return n&&i>0||i>=t.width*t.height||i>=r.width*r.height},updateNode:o,updateNodeData:(e,t,n={replace:!1})=>{o(e,e=>{let r="function"==typeof t?t(e):t;return n.replace?{...e,data:r}:{...e,data:{...e.data,...r}}},n)},updateEdge:s,updateEdgeData:(e,t,n={replace:!1})=>{s(e,e=>{let r="function"==typeof t?t(e):t;return n.replace?{...e,data:r}:{...e,data:{...e.data,...r}}},n)},getNodesBounds:e=>{let{nodeLookup:t,nodeOrigin:r}=n.getState();return((e,t={nodeOrigin:[0,0]})=>0===e.length?{x:0,y:0,width:0,height:0}:zR(e.reduce((e,n)=>{let r="string"==typeof n,i=t.nodeLookup||r?void 0:n;return t.nodeLookup&&(i=r?t.nodeLookup.get(n):zS(n)?n:t.nodeLookup.get(n.id)),zZ(e,i?zM(i,t.nodeOrigin):{x:0,y:0,x2:0,y2:0})},{x:1/0,y:1/0,x2:-1/0,y2:-1/0})))(e,{nodeLookup:t,nodeOrigin:r})},getHandleConnections:({type:e,id:t,nodeId:r})=>Array.from(n.getState().connectionLookup.get(`${r}-${e}${t?`-${t}`:""}`)?.values()??[]),getNodeConnections:({type:e,handleId:t,nodeId:r})=>Array.from(n.getState().connectionLookup.get(`${r}${e?t?`-${e}-${t}`:`-${e}`:""}`)?.values()??[]),fitView:async e=>{let t,i,a=n.getState().fitViewResolver??{promise:new Promise((e,n)=>{t=e,i=n}),resolve:t,reject:i};return n.setState({fitViewQueued:!0,fitViewOptions:e,fitViewResolver:a}),r.nodeQueue.push(e=>[...e]),a.promise}}},[]);return(0,_.useMemo)(()=>({...a,...t,viewportInitialized:i}),[i])}let OA=e=>e.selected,OR="u">typeof window?window:void 0,OL={position:"absolute",width:"100%",height:"100%",top:0,left:0},OM=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function OF({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panOnScrollSpeed:i=.5,panOnScrollMode:a=f.Free,zoomOnDoubleClick:o=!0,panOnDrag:s=!0,defaultViewport:l,translateExtent:u,minZoom:d,maxZoom:c,zoomActivationKeyCode:m,preventScrolling:p=!0,children:h,noWheelClassName:g,noPanClassName:v,onViewportChange:x,isControlledViewport:y,paneClickDistance:$,selectionOnDrag:w}){let k,S=E9(),I=(0,_.useRef)(null),{userSelectionActive:j,lib:N,connectionInProgress:z}=E3(OM,E4),E=O$(m),O=(0,_.useRef)();k=E9(),(0,_.useEffect)(()=>{let e=()=>{if(!I.current||!(I.current.checkVisibility?.()??!0))return!1;let e=z5(I.current);(0===e.height||0===e.width)&&k.getState().onError?.("004","The React Flow parent container needs a width and a height to render the graph."),k.setState({width:e.width||500,height:e.height||500})};if(I.current){e(),window.addEventListener("resize",e);let t=new ResizeObserver(()=>e());return t.observe(I.current),()=>{window.removeEventListener("resize",e),t&&I.current&&t.unobserve(I.current)}}},[]);let T=(0,_.useCallback)(e=>{x?.({x:e[0],y:e[1],zoom:e[2]}),y||S.setState({transform:e})},[x,y]);return(0,_.useEffect)(()=>{if(I.current){O.current=function({domNode:e,minZoom:t,maxZoom:n,translateExtent:r,viewport:i,onPanZoom:a,onPanZoomStart:o,onPanZoomEnd:s,onDraggingChange:l}){let u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{x:0,y:0,zoom:0},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},d=e.getBoundingClientRect(),c=zg().scaleExtent([t,n]).translateExtent(r),m=jE(e).call(c);x({x:i.x,y:i.y,zoom:zT(i.zoom,t,n)},[[0,0],[d.width,d.height]],r);let p=m.on("wheel.zoom"),h=m.on("dblclick.zoom");function g(e,t){return m?new Promise(n=>{c?.interpolate(t?.interpolate==="linear"?zv:jV).transform(EL(m,t?.duration,t?.ease,()=>n(!0)),e)}):Promise.resolve(!1)}function v(){c.on("zoom",null)}async function x(e,t,n){let r=EP(e),i=c?.constrain()(r,t,n);return i&&await g(i),new Promise(e=>e(i))}return c.wheelDelta(EM),{update:function({noWheelClassName:e,noPanClassName:t,onPaneContextMenu:n,userSelectionActive:r,panOnScroll:i,panOnDrag:d,panOnScrollMode:g,panOnScrollSpeed:x,preventScrolling:y,zoomOnPinch:b,zoomOnScroll:_,zoomOnDoubleClick:$,zoomActivationKeyPressed:w,lib:k,onTransformChange:S,connectionInProgress:I,paneClickDistance:j,selectionOnDrag:N}){r&&!u.isZoomingOrPanning&&v();let z=i&&!w&&!r;c.clickDistance(N?1/0:!zH(j)||j<0?0:j);let E=z?function({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:i,panOnScrollSpeed:a,zoomOnPinch:o,onPanZoomStart:s,onPanZoom:l,onPanZoomEnd:u}){return d=>{if(EZ(d,t))return d.ctrlKey&&d.preventDefault(),!1;d.preventDefault(),d.stopImmediatePropagation();let c=n.property("__zoom").k||1;if(d.ctrlKey&&o){let e=jO(d),t=c*Math.pow(2,EM(d));r.scaleTo(n,t,e,d);return}let m=1===d.deltaMode?20:1,p=i===f.Vertical?0:d.deltaX*m,h=i===f.Horizontal?0:d.deltaY*m;!zX()&&d.shiftKey&&i!==f.Vertical&&(p=d.deltaY*m,h=0),r.translateBy(n,-(p/c)*a,-(h/c)*a,{internal:!0});let g=EU(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(l?.(d,g),e.panScrollTimeout=setTimeout(()=>{u?.(d,g),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,s?.(d,g))}}({zoomPanValues:u,noWheelClassName:e,d3Selection:m,d3Zoom:c,panOnScrollMode:g,panOnScrollSpeed:x,zoomOnPinch:b,onPanZoomStart:o,onPanZoom:a,onPanZoomEnd:s}):function({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,i){let a="wheel"===r.type,o=!t&&a&&!r.ctrlKey,s=EZ(r,e);if(r.ctrlKey&&a&&s&&r.preventDefault(),o||s)return null;r.preventDefault(),n.call(this,r,i)}}({noWheelClassName:e,preventScrolling:y,d3ZoomHandler:p});if(m.on("wheel.zoom",E,{passive:!1}),!r){let e=function({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{if(r.sourceEvent?.internal)return;let i=EU(r.transform);e.mouseButton=r.sourceEvent?.button||0,e.isZoomingOrPanning=!0,e.prevViewport=i,r.sourceEvent?.type==="mousedown"&&t(!0),n&&n?.(r.sourceEvent,i)}}({zoomPanValues:u,onDraggingChange:l,onPanZoomStart:o});c.on("start",e);let t=function({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:i}){return a=>{e.usedRightMouseButton=!!(n&&EA(t,e.mouseButton??0)),a.sourceEvent?.sync||r([a.transform.x,a.transform.y,a.transform.k]),i&&!a.sourceEvent?.internal&&i?.(a.sourceEvent,EU(a.transform))}}({zoomPanValues:u,panOnDrag:d,onPaneContextMenu:!!n,onPanZoom:a,onTransformChange:S});c.on("zoom",t);let r=function({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:i,onPaneContextMenu:a}){return o=>{if(!o.sourceEvent?.internal&&(e.isZoomingOrPanning=!1,a&&EA(t,e.mouseButton??0)&&!e.usedRightMouseButton&&o.sourceEvent&&a(o.sourceEvent),e.usedRightMouseButton=!1,r(!1),i)){let t=EU(o.transform);e.prevViewport=t,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{i?.(o.sourceEvent,t)},150*!!n)}}}({zoomPanValues:u,panOnDrag:d,panOnScroll:i,onPaneContextMenu:n,onPanZoomEnd:s,onDraggingChange:l});c.on("end",r)}let O=function({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:r,panOnScroll:i,zoomOnDoubleClick:a,userSelectionActive:o,noWheelClassName:s,noPanClassName:l,lib:u,connectionInProgress:d}){return c=>{let m=e||t,f=n&&c.ctrlKey,p="wheel"===c.type;if(1===c.button&&"mousedown"===c.type&&(EZ(c,`${u}-flow__node`)||EZ(c,`${u}-flow__edge`)))return!0;if(!r&&!m&&!i&&!a&&!n||o||d&&!p||EZ(c,s)&&p||EZ(c,l)&&(!p||i&&p&&!e)||!n&&c.ctrlKey&&p)return!1;if(!n&&"touchstart"===c.type&&c.touches?.length>1)return c.preventDefault(),!1;if(!m&&!i&&!f&&p||!r&&("mousedown"===c.type||"touchstart"===c.type)||Array.isArray(r)&&!r.includes(c.button)&&"mousedown"===c.type)return!1;let h=Array.isArray(r)&&r.includes(c.button)||!c.button||c.button<=1;return(!c.ctrlKey||p)&&h}}({zoomActivationKeyPressed:w,panOnDrag:d,zoomOnScroll:_,panOnScroll:i,zoomOnDoubleClick:$,zoomOnPinch:b,userSelectionActive:r,noPanClassName:t,noWheelClassName:e,lib:k,connectionInProgress:I});c.filter(O),$?m.on("dblclick.zoom",h):m.on("dblclick.zoom",null)},destroy:v,setViewport:async function e(e,t){let n=EP(e);return await g(n,t),new Promise(e=>e(n))},setViewportConstrained:x,getViewport:function(){let e=m?zs(m.node()):{x:0,y:0,k:1};return{x:e.x,y:e.y,zoom:e.k}},scaleTo:function(e,t){return m?new Promise(n=>{c?.interpolate(t?.interpolate==="linear"?zv:jV).scaleTo(EL(m,t?.duration,t?.ease,()=>n(!0)),e)}):Promise.resolve(!1)},scaleBy:function(e,t){return m?new Promise(n=>{c?.interpolate(t?.interpolate==="linear"?zv:jV).scaleBy(EL(m,t?.duration,t?.ease,()=>n(!0)),e)}):Promise.resolve(!1)},setScaleExtent:function(e){c?.scaleExtent(e)},setTranslateExtent:function(e){c?.translateExtent(e)},syncViewport:function(e){if(m){let t=EP(e),n=m.property("__zoom");(n.k!==e.zoom||n.x!==e.x||n.y!==e.y)&&c?.transform(m,t,null,{sync:!0})}},setClickDistance:function(e){let t=!zH(e)||e<0?0:e;c?.clickDistance(t)}}}({domNode:I.current,minZoom:d,maxZoom:c,translateExtent:u,viewport:l,onDraggingChange:e=>S.setState(t=>t.paneDragging===e?t:{paneDragging:e}),onPanZoomStart:(e,t)=>{let{onViewportChangeStart:n,onMoveStart:r}=S.getState();r?.(e,t),n?.(t)},onPanZoom:(e,t)=>{let{onViewportChange:n,onMove:r}=S.getState();r?.(e,t),n?.(t)},onPanZoomEnd:(e,t)=>{let{onViewportChangeEnd:n,onMoveEnd:r}=S.getState();r?.(e,t),n?.(t)}});let{x:e,y:t,zoom:n}=O.current.getViewport();return S.setState({panZoom:O.current,transform:[e,t,n],domNode:I.current.closest(".react-flow")}),()=>{O.current?.destroy()}}},[]),(0,_.useEffect)(()=>{O.current?.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panOnScrollSpeed:i,panOnScrollMode:a,zoomOnDoubleClick:o,panOnDrag:s,zoomActivationKeyPressed:E,preventScrolling:p,noPanClassName:v,userSelectionActive:j,noWheelClassName:g,lib:N,onTransformChange:T,connectionInProgress:z,selectionOnDrag:w,paneClickDistance:$})},[e,t,n,r,i,a,o,s,E,p,v,j,g,N,T,z,w,$]),(0,b.jsx)("div",{className:"react-flow__renderer",ref:I,style:OL,children:h})}let OB=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function OW(){let{userSelectionActive:e,userSelectionRect:t}=E3(OB,E4);return e&&t?(0,b.jsx)("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}let OH=(e,t)=>n=>{n.target===t.current&&e?.(n)},OV=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function OJ({isSelecting:e,selectionKeyPressed:t,selectionMode:n=p.Full,panOnDrag:r,paneClickDistance:i,selectionOnDrag:a,onSelectionStart:o,onSelectionEnd:s,onPaneClick:l,onPaneContextMenu:u,onPaneScroll:d,onPaneMouseEnter:c,onPaneMouseMove:m,onPaneMouseLeave:f,children:h}){let g=E9(),{userSelectionActive:v,elementsSelectable:x,dragging:y,connectionInProgress:$}=E3(OV,E4),w=x&&(e||v),k=(0,_.useRef)(null),S=(0,_.useRef)(),I=(0,_.useRef)(new Set),j=(0,_.useRef)(new Set),N=(0,_.useRef)(!1),z=e=>{if(N.current||$){N.current=!1;return}l?.(e),g.getState().resetSelectedElements(),g.setState({nodesSelectionActive:!1})},E=!0===r||Array.isArray(r)&&r.includes(0);return(0,b.jsxs)("div",{className:IG(["react-flow__pane",{draggable:E,dragging:y,selection:e}]),onClick:w?void 0:OH(z,k),onContextMenu:OH(e=>{Array.isArray(r)&&r?.includes(2)?e.preventDefault():u?.(e)},k),onWheel:OH(d?e=>d(e):void 0,k),onPointerEnter:w?void 0:c,onPointerMove:w?e=>{let{userSelectionRect:r,transform:a,nodeLookup:s,edgeLookup:l,connectionLookup:u,triggerNodeChanges:d,triggerEdgeChanges:c,defaultEdgeOptions:m,resetSelectedElements:f}=g.getState();if(!S.current||!r)return;let{x:h,y:v}=z7(e.nativeEvent,S.current),{startX:x,startY:y}=r;if(!N.current){if(Math.hypot(h-x,v-y)<=(t?0:i))return;f(),o?.(e)}N.current=!0;let b={startX:x,startY:y,x:h<x?h:x,y:v<y?v:y,width:Math.abs(h-x),height:Math.abs(v-y)},_=I.current,$=j.current;I.current=new Set(zN(s,b,a,n===p.Partial,!0).map(e=>e.id)),j.current=new Set;let w=m?.selectable??!0;for(let e of I.current){let t=u.get(e);if(t)for(let{edgeId:e}of t.values()){let t=l.get(e);t&&(t.selectable??w)&&j.current.add(e)}}z6(_,I.current)||d(Oj(s,I.current,!0)),z6($,j.current)||c(Oj(l,j.current)),g.setState({userSelectionRect:b,userSelectionActive:!0,nodesSelectionActive:!1})}:m,onPointerUp:w?e=>{0===e.button&&(e.target?.releasePointerCapture?.(e.pointerId),!v&&e.target===k.current&&g.getState().userSelectionRect&&z?.(e),g.setState({userSelectionActive:!1,userSelectionRect:null}),N.current&&(s?.(e),g.setState({nodesSelectionActive:I.current.size>0})))}:void 0,onPointerDownCapture:w?n=>{let{domNode:r}=g.getState();if(S.current=r?.getBoundingClientRect(),!S.current)return;let i=n.target===k.current;if(!i&&n.target.closest(".nokey")||!e||!(a&&i||t)||0!==n.button||!n.isPrimary)return;n.target?.setPointerCapture?.(n.pointerId),N.current=!1;let{x:o,y:s}=z7(n.nativeEvent,S.current);g.setState({userSelectionRect:{width:0,height:0,startX:o,startY:s,x:o,y:s}}),i||(n.stopPropagation(),n.preventDefault())}:void 0,onClickCapture:w?e=>{N.current&&(e.stopPropagation(),N.current=!1)}:void 0,onPointerLeave:f,ref:k,style:OL,children:[h,(0,b.jsx)(OW,{})]})}function OG({id:e,store:t,unselect:n=!1,nodeRef:r}){let i,{addSelectedNodes:a,unselectNodesAndEdges:o,multiSelectionActive:s,nodeLookup:l,onError:u}=t.getState(),d=l.get(e);d?(t.setState({nodesSelectionActive:!1}),d.selected?(n||d.selected&&s)&&(o({nodes:[d],edges:[]}),requestAnimationFrame(()=>r?.current?.blur())):a([e])):u?.("012",(i=e,`Node with id "${i}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`))}function OK({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:i,isSelectable:a,nodeClickDistance:o}){let s=E9(),[l,u]=(0,_.useState)(!1),d=(0,_.useRef)();return(0,_.useEffect)(()=>{d.current=function({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:i}){let a={x:null,y:null},o=0,s=new Map,l=!1,u={x:0,y:0},d=null,c=!1,m=null,f=!1,p=!1,h=null;return{update:function({noDragClassName:g,handleSelector:v,domNode:x,isSelectable:y,nodeId:b,nodeClickDistance:_=0}){function $({x:e,y:n}){let{nodeLookup:i,nodeExtent:o,snapGrid:l,snapToGrid:u,nodeOrigin:d,onNodeDrag:c,onSelectionDrag:m,onError:f,updateNodePositions:g}=t();a={x:e,y:n};let v=!1,x=s.size>1,y=x&&o?zA(zj(s)):null,_=x&&u?function({dragItems:e,snapGrid:t,x:n,y:r}){let i=e.values().next().value;if(!i)return null;let a={x:n-i.distance.x,y:r-i.distance.y},o=zJ(a,t);return{x:o.x-a.x,y:o.y-a.y}}({dragItems:s,snapGrid:l,x:e,y:n}):null;for(let[t,r]of s){if(!i.has(t))continue;let a={x:e-r.distance.x,y:n-r.distance.y};u&&(a=_?{x:Math.round(a.x+_.x),y:Math.round(a.y+_.y)}:zJ(a,l));let s=null;if(x&&o&&!r.extent&&y){let{positionAbsolute:e}=r.internals,t=e.x-y.x+o[0][0],n=e.x+r.measured.width-y.x2+o[1][0];s=[[t,e.y-y.y+o[0][1]],[n,e.y+r.measured.height-y.y2+o[1][1]]]}let{position:c,positionAbsolute:m}=zE({nodeId:t,nextPosition:a,nodeLookup:i,nodeExtent:s||o,nodeOrigin:d,onError:f});v=v||r.position.x!==c.x||r.position.y!==c.y,r.position=c,r.internals.positionAbsolute=m}if(p=p||v,v&&(g(s,!0),h&&(r||c||!b&&m))){let[e,t]=Ez({nodeId:b,dragItems:s,nodeLookup:i});r?.(h,s,e,t),c?.(h,e,t),b||m?.(h,t)}}async function w(){if(!d)return;let{transform:e,panBy:n,autoPanSpeed:r,autoPanOnNodeDrag:i}=t();if(!i){l=!1,cancelAnimationFrame(o);return}let[s,c]=zP(u,d,r);(0!==s||0!==c)&&(a.x=(a.x??0)-s/e[2],a.y=(a.y??0)-c/e[2],await n({x:s,y:c})&&$(a)),o=requestAnimationFrame(w)}function k(r){let{nodeLookup:i,multiSelectionActive:o,nodesDraggable:l,transform:u,snapGrid:m,snapToGrid:f,selectNodesOnDrag:p,onNodeDragStart:h,onSelectionDragStart:g,unselectNodesAndEdges:v}=t();c=!0,p&&y||o||!b||i.get(b)?.selected||v(),y&&p&&b&&e?.(b);let x=z2(r.sourceEvent,{transform:u,snapGrid:m,snapToGrid:f,containerBounds:d});if(a=x,(s=function(e,t,n,r){let i=new Map;for(let[a,o]of e)if((o.selected||o.id===r)&&(!o.parentId||!function e(t,n){if(!t.parentId)return!1;let r=n.get(t.parentId);return!!r&&(!!r.selected||e(r,n))}(o,e))&&(o.draggable||t&&void 0===o.draggable)){let t=e.get(a);t&&i.set(a,{id:a,position:t.position||{x:0,y:0},distance:{x:n.x-t.internals.positionAbsolute.x,y:n.y-t.internals.positionAbsolute.y},extent:t.extent,parentId:t.parentId,origin:t.origin,expandParent:t.expandParent,internals:{positionAbsolute:t.internals.positionAbsolute||{x:0,y:0}},measured:{width:t.measured.width??0,height:t.measured.height??0}})}return i}(i,l,x,b)).size>0&&(n||h||!b&&g)){let[e,t]=Ez({nodeId:b,dragItems:s,nodeLookup:i});n?.(r.sourceEvent,s,e,t),h?.(r.sourceEvent,e,t),b||g?.(r.sourceEvent,t)}}m=jE(x);let S=jW().clickDistance(_).on("start",e=>{let{domNode:n,nodeDragThreshold:r,transform:i,snapGrid:o,snapToGrid:s}=t();d=n?.getBoundingClientRect()||null,f=!1,p=!1,h=e.sourceEvent,0===r&&k(e),a=z2(e.sourceEvent,{transform:i,snapGrid:o,snapToGrid:s,containerBounds:d}),u=z7(e.sourceEvent,d)}).on("drag",e=>{let{autoPanOnNodeDrag:n,transform:r,snapGrid:i,snapToGrid:o,nodeDragThreshold:m,nodeLookup:p}=t(),g=z2(e.sourceEvent,{transform:r,snapGrid:i,snapToGrid:o,containerBounds:d});if(h=e.sourceEvent,("touchmove"===e.sourceEvent.type&&e.sourceEvent.touches.length>1||b&&!p.has(b))&&(f=!0),!f){if(!l&&n&&c&&(l=!0,w()),!c){let t=z7(e.sourceEvent,d),n=t.x-u.x,r=t.y-u.y;Math.sqrt(n*n+r*r)>m&&k(e)}(a.x!==g.xSnapped||a.y!==g.ySnapped)&&s&&c&&(u=z7(e.sourceEvent,d),$(g))}}).on("end",e=>{if(c&&!f&&(l=!1,c=!1,cancelAnimationFrame(o),s.size>0)){let{nodeLookup:n,updateNodePositions:r,onNodeDragStop:a,onSelectionDragStop:o}=t();if(p&&(r(s,!1),p=!1),i||a||!b&&o){let[t,r]=Ez({nodeId:b,dragItems:s,nodeLookup:n,dragging:!1});i?.(e.sourceEvent,s,t,r),a?.(e.sourceEvent,t,r),b||o?.(e.sourceEvent,r)}}}).filter(e=>{let t=e.target;return!e.button&&(!g||!EN(t,`.${g}`,x))&&(!v||EN(t,v,x))});m.call(S)},destroy:function(){m?.on(".drag",null)}}}({getStoreItems:()=>s.getState(),onNodeMouseDown:t=>{OG({id:t,store:s,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})},[]),(0,_.useEffect)(()=>{if(!t&&e.current&&d.current)return d.current.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:a,nodeId:i,nodeClickDistance:o}),()=>{d.current?.destroy()}},[n,r,t,a,e,i,o]),l}function Oq(){let e=E9();return(0,_.useCallback)(t=>{let{nodeExtent:n,snapToGrid:r,snapGrid:i,nodesDraggable:a,onError:o,updateNodePositions:s,nodeLookup:l,nodeOrigin:u}=e.getState(),d=new Map,c=e=>e.selected&&(e.draggable||a&&void 0===e.draggable),m=r?i[0]:5,f=r?i[1]:5,p=t.direction.x*m*t.factor,h=t.direction.y*f*t.factor;for(let[,e]of l){if(!c(e))continue;let t={x:e.internals.positionAbsolute.x+p,y:e.internals.positionAbsolute.y+h};r&&(t=zJ(t,i));let{position:a,positionAbsolute:s}=zE({nodeId:e.id,nextPosition:t,nodeLookup:l,nodeExtent:n,nodeOrigin:u,onError:o});e.position=a,e.internals.positionAbsolute=s,d.set(e.id,e)}s(d)},[])}let OY=(0,_.createContext)(null),OX=OY.Provider;OY.Consumer;let OQ=()=>(0,_.useContext)(OY),O0=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),O1=(0,_.memo)(OO(function({type:e="source",position:t=v.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:i=!0,isConnectableEnd:a=!0,id:o,onConnect:s,children:l,className:u,onMouseDown:d,onTouchStart:c,...f},p){let h=o||null,g="target"===e,x=E9(),y=OQ(),{connectOnClick:_,noPanClassName:$,rfId:w}=E3(O0,E4),{connectingFrom:k,connectingTo:S,clickConnecting:I,isPossibleEndHandle:j,connectionInProcess:N,clickConnectionInProcess:z,valid:E}=E3(t=>{let{connectionClickStartHandle:n,connectionMode:r,connection:i}=t,{fromHandle:a,toHandle:o,isValid:s}=i,l=o?.nodeId===y&&o?.id===h&&o?.type===e;return{connectingFrom:a?.nodeId===y&&a?.id===h&&a?.type===e,connectingTo:l,clickConnecting:n?.nodeId===y&&n?.id===h&&n?.type===e,isPossibleEndHandle:r===m.Strict?a?.type!==e:y!==a?.nodeId||h!==a?.id,connectionInProcess:!!a,clickConnectionInProcess:!!n,valid:l&&s}},E4);y||x.getState().onError?.("010","Handle: No node id found. Make sure to only use a Handle inside a custom Node.");let O=e=>{let{defaultEdgeOptions:t,onConnect:n,hasDefaultEdges:r}=x.getState(),i={...t,...e};if(r){let{edges:e,setEdges:t}=x.getState();t(((e,t,n={})=>{let r,i;if(!e.source||!e.target)return zV("006","Can't create edge. An edge needs a source and a target."),t;let a=n.getEdgeId||Eo;return(i=r=zk(e)?{...e}:{...e,id:a(e)},t.some(e=>e.source===i.source&&e.target===i.target&&(e.sourceHandle===i.sourceHandle||!e.sourceHandle&&!i.sourceHandle)&&(e.targetHandle===i.targetHandle||!e.targetHandle&&!i.targetHandle)))?t:(null===r.sourceHandle&&delete r.sourceHandle,null===r.targetHandle&&delete r.targetHandle,t.concat(r))})(i,e))}n?.(i),s?.(i)},T=e=>{if(!y)return;let t="clientX"in e.nativeEvent;if(i&&(t&&0===e.button||!t)){let t=x.getState();ED(e.nativeEvent,{handleDomNode:e.currentTarget,autoPanOnConnect:t.autoPanOnConnect,connectionMode:t.connectionMode,connectionRadius:t.connectionRadius,domNode:t.domNode,nodeLookup:t.nodeLookup,lib:t.lib,isTarget:g,handleId:h,nodeId:y,flowId:t.rfId,panBy:t.panBy,cancelConnection:t.cancelConnection,onConnectStart:t.onConnectStart,onConnectEnd:(...e)=>x.getState().onConnectEnd?.(...e),updateConnection:t.updateConnection,onConnect:O,isValidConnection:n||((...e)=>x.getState().isValidConnection?.(...e)??!0),getTransform:()=>x.getState().transform,getFromHandle:()=>x.getState().connection.fromHandle,autoPanSpeed:t.autoPanSpeed,dragThreshold:t.connectionDragThreshold})}t?d?.(e):c?.(e)};return(0,b.jsx)("div",{"data-handleid":h,"data-nodeid":y,"data-handlepos":t,"data-id":`${w}-${y}-${h}-${e}`,className:IG(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",$,u,{source:!g,target:g,connectable:r,connectablestart:i,connectableend:a,clickconnecting:I,connectingfrom:k,connectingto:S,valid:E,connectionindicator:r&&(!N||j)&&(N||z?a:i)}]),onMouseDown:T,onTouchStart:T,onClick:_?t=>{let{onClickConnectStart:r,onClickConnectEnd:a,connectionClickStartHandle:o,connectionMode:s,isValidConnection:l,lib:u,rfId:d,nodeLookup:c,connection:m}=x.getState();if(!y||!o&&!i)return;if(!o){r?.(t.nativeEvent,{nodeId:y,handleId:h,handleType:e}),x.setState({connectionClickStartHandle:{nodeId:y,type:e,id:h}});return}let f=z3(t.target),p=n||l,{connection:g,isValid:v}=EC(t.nativeEvent,{handle:{nodeId:y,id:h,type:e},connectionMode:s,fromNodeId:o.nodeId,fromHandleId:o.id||null,fromType:o.type,isValidConnection:p,flowId:d,doc:f,lib:u,nodeLookup:c});v&&g&&O(g);let b=structuredClone(m);delete b.inProgress,b.toPosition=b.toHandle?b.toHandle.position:null,a?.(t,b),x.setState({connectionClickStartHandle:null})}:void 0,ref:p,...f,children:l})})),O4={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},O6={input:function({data:e,isConnectable:t,sourcePosition:n=v.Bottom}){return(0,b.jsxs)(b.Fragment,{children:[e?.label,(0,b.jsx)(O1,{type:"source",position:n,isConnectable:t})]})},default:function({data:e,isConnectable:t,targetPosition:n=v.Top,sourcePosition:r=v.Bottom}){return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(O1,{type:"target",position:n,isConnectable:t}),e?.label,(0,b.jsx)(O1,{type:"source",position:r,isConnectable:t})]})},output:function({data:e,isConnectable:t,targetPosition:n=v.Top}){return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(O1,{type:"target",position:n,isConnectable:t}),e?.label]})},group:function(){return null}},O2=e=>{let{width:t,height:n,x:r,y:i}=zj(e.nodeLookup,{filter:e=>!!e.selected});return{width:zH(t)?t:null,height:zH(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${i}px)`}};function O5({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){let r=E9(),{width:i,height:a,transformString:o,userSelectionActive:s}=E3(O2,E4),l=Oq(),u=(0,_.useRef)(null);(0,_.useEffect)(()=>{n||u.current?.focus({preventScroll:!0})},[n]);let d=!s&&null!==i&&null!==a;if(OK({nodeRef:u,disabled:!d}),!d)return null;let c=e?t=>{e(t,r.getState().nodes.filter(e=>e.selected))}:void 0;return(0,b.jsx)("div",{className:IG(["react-flow__nodesselection","react-flow__container",t]),style:{transform:o},children:(0,b.jsx)("div",{ref:u,className:"react-flow__nodesselection-rect",onContextMenu:c,tabIndex:n?void 0:-1,onKeyDown:n?void 0:e=>{Object.prototype.hasOwnProperty.call(O4,e.key)&&(e.preventDefault(),l({direction:O4[e.key],factor:e.shiftKey?4:1}))},style:{width:i,height:a}})})}let O3="u">typeof window?window:void 0,O9=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function O8({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:o,paneClickDistance:s,deleteKeyCode:l,selectionKeyCode:u,selectionOnDrag:d,selectionMode:c,onSelectionStart:m,onSelectionEnd:f,multiSelectionKeyCode:p,panActivationKeyCode:h,zoomActivationKeyCode:g,elementsSelectable:v,zoomOnScroll:x,zoomOnPinch:y,panOnScroll:$,panOnScrollSpeed:w,panOnScrollMode:k,zoomOnDoubleClick:S,panOnDrag:I,defaultViewport:j,translateExtent:N,minZoom:z,maxZoom:E,preventScrolling:O,onSelectionContextMenu:T,noWheelClassName:C,noPanClassName:D,disableKeyboardA11y:U,onViewportChange:P,isControlledViewport:Z}){let{nodesSelectionActive:A,userSelectionActive:R}=E3(O9,E4),L=O$(u,{target:O3}),M=O$(h,{target:O3}),F=M||I,B=M||$,W=d&&!0!==F,H=L||R||W;return!function({deleteKeyCode:e,multiSelectionKeyCode:t}){let n=E9(),{deleteElements:r}=OZ(),i=O$(e,{actInsideInputWithModifier:!1}),a=O$(t,{target:OR});(0,_.useEffect)(()=>{if(i){let{edges:e,nodes:t}=n.getState();r({nodes:t.filter(OA),edges:e.filter(OA)}),n.setState({nodesSelectionActive:!1})}},[i]),(0,_.useEffect)(()=>{n.setState({multiSelectionActive:a})},[a])}({deleteKeyCode:l,multiSelectionKeyCode:p}),(0,b.jsx)(OF,{onPaneContextMenu:a,elementsSelectable:v,zoomOnScroll:x,zoomOnPinch:y,panOnScroll:B,panOnScrollSpeed:w,panOnScrollMode:k,zoomOnDoubleClick:S,panOnDrag:!L&&F,defaultViewport:j,translateExtent:N,minZoom:z,maxZoom:E,zoomActivationKeyCode:g,preventScrolling:O,noWheelClassName:C,noPanClassName:D,onViewportChange:P,isControlledViewport:Z,paneClickDistance:s,selectionOnDrag:W,children:(0,b.jsxs)(OJ,{onSelectionStart:m,onSelectionEnd:f,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:o,panOnDrag:F,isSelecting:!!H,selectionMode:c,selectionKeyPressed:L,paneClickDistance:s,selectionOnDrag:W,children:[e,A&&(0,b.jsx)(O5,{onSelectionContextMenu:T,noPanClassName:D,disableKeyboardA11y:U})]})})}O8.displayName="FlowRenderer";let O7=(0,_.memo)(O8),Te=e=>e.updateNodeInternals;var Tt=(0,_.memo)(function({id:e,onClick:t,onMouseEnter:n,onMouseMove:r,onMouseLeave:i,onContextMenu:a,onDoubleClick:o,nodesDraggable:s,elementsSelectable:l,nodesConnectable:u,nodesFocusable:d,resizeObserver:c,noDragClassName:m,noPanClassName:f,disableKeyboardA11y:p,rfId:h,nodeTypes:g,nodeClickDistance:v,onError:x}){let y,{node:$,internals:w,isParent:k}=E3(t=>{let n=t.nodeLookup.get(e),r=t.parentLookup.has(e);return{node:n,internals:n.internals,isParent:r}},E4),S=$.type||"default",I=g?.[S]||O6[S];void 0===I&&(x?.("003",(y=S,`Node type "${y}" not found. Using fallback type "default".`)),S="default",I=g?.default||O6.default);let j=!!($.draggable||s&&void 0===$.draggable),N=!!($.selectable||l&&void 0===$.selectable),z=!!($.connectable||u&&void 0===$.connectable),E=!!($.focusable||d&&void 0===$.focusable),O=E9(),T=z1($),C=function({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){let i=E9(),a=(0,_.useRef)(null),o=(0,_.useRef)(null),s=(0,_.useRef)(e.sourcePosition),l=(0,_.useRef)(e.targetPosition),u=(0,_.useRef)(t),d=n&&!!e.internals.handleBounds;return(0,_.useEffect)(()=>{!a.current||e.hidden||d&&o.current===a.current||(o.current&&r?.unobserve(o.current),r?.observe(a.current),o.current=a.current)},[d,e.hidden]),(0,_.useEffect)(()=>()=>{o.current&&(r?.unobserve(o.current),o.current=null)},[]),(0,_.useEffect)(()=>{if(a.current){let n=u.current!==t,r=s.current!==e.sourcePosition,o=l.current!==e.targetPosition;(n||r||o)&&(u.current=t,s.current=e.sourcePosition,l.current=e.targetPosition,i.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:a.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),a}({node:$,nodeType:S,hasDimensions:T,resizeObserver:c}),D=OK({nodeRef:C,disabled:$.hidden||!j,noDragClassName:m,handleSelector:$.dragHandle,nodeId:e,isSelectable:N,nodeClickDistance:v}),U=Oq();if($.hidden)return null;let P=z0($),Z=void 0===$.internals.handleBounds?{width:$.width??$.initialWidth??$.style?.width,height:$.height??$.initialHeight??$.style?.height}:{width:$.width??$.style?.width,height:$.height??$.style?.height},A=N||j||t||n||r||i,R=n?e=>n(e,{...w.userNode}):void 0,L=r?e=>r(e,{...w.userNode}):void 0,M=i?e=>i(e,{...w.userNode}):void 0,F=a?e=>a(e,{...w.userNode}):void 0,B=o?e=>o(e,{...w.userNode}):void 0;return(0,b.jsx)("div",{className:IG(["react-flow__node",`react-flow__node-${S}`,{[f]:j},$.className,{selected:$.selected,selectable:N,parent:k,draggable:j,dragging:D}]),ref:C,style:{zIndex:w.z,transform:`translate(${w.positionAbsolute.x}px,${w.positionAbsolute.y}px)`,pointerEvents:A?"all":"none",visibility:T?"visible":"hidden",...$.style,...Z},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:R,onMouseMove:L,onMouseLeave:M,onContextMenu:F,onClick:n=>{let{selectNodesOnDrag:r,nodeDragThreshold:i}=O.getState();N&&(!r||!j||i>0)&&OG({id:e,store:O,nodeRef:C}),t&&t(n,{...w.userNode})},onDoubleClick:B,onKeyDown:E?t=>{if(!z8(t.nativeEvent)&&!p){if(zy.includes(t.key)&&N)OG({id:e,store:O,unselect:"Escape"===t.key,nodeRef:C});else if(j&&$.selected&&Object.prototype.hasOwnProperty.call(O4,t.key)){t.preventDefault();let{ariaLabelConfig:e}=O.getState();O.setState({ariaLiveMessage:e["node.a11yDescription.ariaLiveMessage"]({direction:t.key.replace("Arrow","").toLowerCase(),x:~~w.positionAbsolute.x,y:~~w.positionAbsolute.y})}),U({direction:O4[t.key],factor:t.shiftKey?4:1})}}}:void 0,tabIndex:E?0:void 0,onFocus:E?()=>{if(p||!C.current?.matches(":focus-visible"))return;let{transform:t,width:n,height:r,autoPanOnNodeFocus:i,setCenter:a}=O.getState();!i||zN(new Map([[e,$]]),{x:0,y:0,width:n,height:r},t,!0).length>0||a($.position.x+P.width/2,$.position.y+P.height/2,{zoom:t[2]})}:void 0,role:$.ariaRole??(E?"group":void 0),"aria-roledescription":"node","aria-describedby":p?void 0:`${Oe}-${h}`,"aria-label":$.ariaLabel,...$.domAttributes,children:(0,b.jsx)(OX,{value:e,children:(0,b.jsx)(I,{id:e,data:$.data,type:S,positionAbsoluteX:w.positionAbsolute.x,positionAbsoluteY:w.positionAbsolute.y,selected:$.selected??!1,selectable:N,draggable:j,deletable:$.deletable??!0,isConnectable:z,sourcePosition:$.sourcePosition,targetPosition:$.targetPosition,dragging:D,dragHandle:$.dragHandle,zIndex:w.z,parentId:$.parentId,...P})})})});let Tn=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function Tr(e){var t;let{nodesDraggable:n,nodesConnectable:r,nodesFocusable:i,elementsSelectable:a,onError:o}=E3(Tn,E4),s=(t=e.onlyRenderVisibleElements,E3((0,_.useCallback)(e=>t?zN(e.nodeLookup,{x:0,y:0,width:e.width,height:e.height},e.transform,!0).map(e=>e.id):Array.from(e.nodeLookup.keys()),[t]),E4)),l=function(){let e=E3(Te),[t]=(0,_.useState)(()=>"u"<typeof ResizeObserver?null:new ResizeObserver(t=>{let n=new Map;t.forEach(e=>{let t=e.target.getAttribute("data-id");n.set(t,{id:t,nodeElement:e.target,force:!0})}),e(n)}));return(0,_.useEffect)(()=>()=>{t?.disconnect()},[t]),t}();return(0,b.jsx)("div",{className:"react-flow__nodes",style:OL,children:s.map(t=>(0,b.jsx)(Tt,{id:t,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:l,nodesDraggable:n,nodesConnectable:r,nodesFocusable:i,elementsSelectable:a,nodeClickDistance:e.nodeClickDistance,onError:o},t))})}Tr.displayName="NodeRenderer";let Ti=(0,_.memo)(Tr),Ta={[g.Arrow]:({color:e="none",strokeWidth:t=1})=>{let n={strokeWidth:t,...e&&{stroke:e}};return(0,b.jsx)("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},[g.ArrowClosed]:({color:e="none",strokeWidth:t=1})=>{let n={strokeWidth:t,...e&&{stroke:e,fill:e}};return(0,b.jsx)("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})}},To=({id:e,type:t,color:n,width:r=12.5,height:i=12.5,markerUnits:a="strokeWidth",strokeWidth:o,orient:s="auto-start-reverse"})=>{let l,u=(l=E9(),(0,_.useMemo)(()=>{let e;return Object.prototype.hasOwnProperty.call(Ta,t)?Ta[t]:(l.getState().onError?.("009",(e=t,`Marker type "${e}" doesn't exist.`)),null)},[t]));return u?(0,b.jsx)("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${i}`,viewBox:"-10 -10 20 20",markerUnits:a,orient:s,refX:"0",refY:"0",children:(0,b.jsx)(u,{color:n,strokeWidth:o})}):null},Ts=({defaultColor:e,rfId:t})=>{let n=E3(e=>e.edges),r=E3(e=>e.defaultEdgeOptions),i=(0,_.useMemo)(()=>(function(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:i}){let a=new Set;return e.reduce((e,o)=>([o.markerStart||r,o.markerEnd||i].forEach(r=>{if(r&&"object"==typeof r){let i=Eg(r,t);a.has(i)||(e.push({id:i,color:r.color||n,...r}),a.add(i))}}),e),[]).sort((e,t)=>e.id.localeCompare(t.id))})(n,{id:t,defaultColor:e,defaultMarkerStart:r?.markerStart,defaultMarkerEnd:r?.markerEnd}),[n,r,t,e]);return i.length?(0,b.jsx)("svg",{className:"react-flow__marker","aria-hidden":"true",children:(0,b.jsx)("defs",{children:i.map(e=>(0,b.jsx)(To,{id:e.id,type:e.type,color:e.color,width:e.width,height:e.height,markerUnits:e.markerUnits,strokeWidth:e.strokeWidth,orient:e.orient},e.id))})}):null};Ts.displayName="MarkerDefinitions";var Tl=(0,_.memo)(Ts);function Tu({x:e,y:t,label:n,labelStyle:r,labelShowBg:i=!0,labelBgStyle:a,labelBgPadding:o=[2,4],labelBgBorderRadius:s=2,children:l,className:u,...d}){let[c,m]=(0,_.useState)({x:1,y:0,width:0,height:0}),f=IG(["react-flow__edge-textwrapper",u]),p=(0,_.useRef)(null);return((0,_.useEffect)(()=>{if(p.current){let e=p.current.getBBox();m({x:e.x,y:e.y,width:e.width,height:e.height})}},[n]),n)?(0,b.jsxs)("g",{transform:`translate(${e-c.width/2} ${t-c.height/2})`,className:f,visibility:c.width?"visible":"hidden",...d,children:[i&&(0,b.jsx)("rect",{width:c.width+2*o[0],x:-o[0],y:-o[1],height:c.height+2*o[1],className:"react-flow__edge-textbg",style:a,rx:s,ry:s}),(0,b.jsx)("text",{className:"react-flow__edge-text",y:c.height/2,dy:"0.3em",ref:p,style:r,children:n}),l]}):null}Tu.displayName="EdgeText";let Td=(0,_.memo)(Tu);function Tc({path:e,labelX:t,labelY:n,label:r,labelStyle:i,labelShowBg:a,labelBgStyle:o,labelBgPadding:s,labelBgBorderRadius:l,interactionWidth:u=20,...d}){return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("path",{...d,d:e,fill:"none",className:IG(["react-flow__edge-path",d.className])}),u?(0,b.jsx)("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:u,className:"react-flow__edge-interaction"}):null,r&&zH(t)&&zH(n)?(0,b.jsx)(Td,{x:t,y:n,label:r,labelStyle:i,labelShowBg:a,labelBgStyle:o,labelBgPadding:s,labelBgBorderRadius:l}):null]})}function Tm({pos:e,x1:t,y1:n,x2:r,y2:i}){return e===v.Left||e===v.Right?[.5*(t+r),n]:[t,.5*(n+i)]}function Tf({sourceX:e,sourceY:t,sourcePosition:n=v.Bottom,targetX:r,targetY:i,targetPosition:a=v.Top}){let[o,s]=Tm({pos:n,x1:e,y1:t,x2:r,y2:i}),[l,u]=Tm({pos:a,x1:r,y1:i,x2:e,y2:t}),[d,c,m,f]=Et({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:o,sourceControlY:s,targetControlX:l,targetControlY:u});return[`M${e},${t} C${o},${s} ${l},${u} ${r},${i}`,d,c,m,f]}function Tp(e){return(0,_.memo)(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,sourcePosition:o,targetPosition:s,label:l,labelStyle:u,labelShowBg:d,labelBgStyle:c,labelBgPadding:m,labelBgBorderRadius:f,style:p,markerEnd:h,markerStart:g,interactionWidth:v})=>{let[x,y,_]=Tf({sourceX:n,sourceY:r,sourcePosition:o,targetX:i,targetY:a,targetPosition:s}),$=e.isInternal?void 0:t;return(0,b.jsx)(Tc,{id:$,path:x,labelX:y,labelY:_,label:l,labelStyle:u,labelShowBg:d,labelBgStyle:c,labelBgPadding:m,labelBgBorderRadius:f,style:p,markerEnd:h,markerStart:g,interactionWidth:v})})}let Th=Tp({isInternal:!1}),Tg=Tp({isInternal:!0});function Tv(e){return(0,_.memo)(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,label:o,labelStyle:s,labelShowBg:l,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:c,style:m,sourcePosition:f=v.Bottom,targetPosition:p=v.Top,markerEnd:h,markerStart:g,pathOptions:x,interactionWidth:y})=>{let[_,$,w]=Ec({sourceX:n,sourceY:r,sourcePosition:f,targetX:i,targetY:a,targetPosition:p,borderRadius:x?.borderRadius,offset:x?.offset,stepPosition:x?.stepPosition}),k=e.isInternal?void 0:t;return(0,b.jsx)(Tc,{id:k,path:_,labelX:$,labelY:w,label:o,labelStyle:s,labelShowBg:l,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:c,style:m,markerEnd:h,markerStart:g,interactionWidth:y})})}Th.displayName="SimpleBezierEdge",Tg.displayName="SimpleBezierEdgeInternal";let Tx=Tv({isInternal:!1}),Ty=Tv({isInternal:!0});function Tb(e){return(0,_.memo)(({id:t,...n})=>{let r=e.isInternal?void 0:t;return(0,b.jsx)(Tx,{...n,id:r,pathOptions:(0,_.useMemo)(()=>({borderRadius:0,offset:n.pathOptions?.offset}),[n.pathOptions?.offset])})})}Tx.displayName="SmoothStepEdge",Ty.displayName="SmoothStepEdgeInternal";let T_=Tb({isInternal:!1}),T$=Tb({isInternal:!0});function Tw(e){return(0,_.memo)(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,label:o,labelStyle:s,labelShowBg:l,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:c,style:m,markerEnd:f,markerStart:p,interactionWidth:h})=>{let[g,v,x]=Es({sourceX:n,sourceY:r,targetX:i,targetY:a}),y=e.isInternal?void 0:t;return(0,b.jsx)(Tc,{id:y,path:g,labelX:v,labelY:x,label:o,labelStyle:s,labelShowBg:l,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:c,style:m,markerEnd:f,markerStart:p,interactionWidth:h})})}T_.displayName="StepEdge",T$.displayName="StepEdgeInternal";let Tk=Tw({isInternal:!1}),TS=Tw({isInternal:!0});function TI(e){return(0,_.memo)(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,sourcePosition:o=v.Bottom,targetPosition:s=v.Top,label:l,labelStyle:u,labelShowBg:d,labelBgStyle:c,labelBgPadding:m,labelBgBorderRadius:f,style:p,markerEnd:h,markerStart:g,pathOptions:x,interactionWidth:y})=>{let[_,$,w]=Ei({sourceX:n,sourceY:r,sourcePosition:o,targetX:i,targetY:a,targetPosition:s,curvature:x?.curvature}),k=e.isInternal?void 0:t;return(0,b.jsx)(Tc,{id:k,path:_,labelX:$,labelY:w,label:l,labelStyle:u,labelShowBg:d,labelBgStyle:c,labelBgPadding:m,labelBgBorderRadius:f,style:p,markerEnd:h,markerStart:g,interactionWidth:y})})}Tk.displayName="StraightEdge",TS.displayName="StraightEdgeInternal";let Tj=TI({isInternal:!1}),TN=TI({isInternal:!0});Tj.displayName="BezierEdge",TN.displayName="BezierEdgeInternal";let Tz={default:TN,straight:TS,step:T$,smoothstep:Ty,simplebezier:Tg},TE={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},TO="react-flow__edgeupdater";function TT({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:i,onMouseEnter:a,onMouseOut:o,type:s}){return(0,b.jsx)("circle",{onMouseDown:i,onMouseEnter:a,onMouseOut:o,className:IG([TO,`${TO}-${s}`]),cx:e===v.Left?t-r:e===v.Right?t+r:t,cy:e===v.Top?n-r:e===v.Bottom?n+r:n,r:r,stroke:"transparent",fill:"transparent"})}function TC({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:r,sourceY:i,targetX:a,targetY:o,sourcePosition:s,targetPosition:l,onReconnect:u,onReconnectStart:d,onReconnectEnd:c,setReconnecting:m,setUpdateHover:f}){let p=E9(),h=(e,t)=>{if(0!==e.button)return;let{autoPanOnConnect:r,domNode:i,connectionMode:a,connectionRadius:o,lib:s,onConnectStart:l,cancelConnection:f,nodeLookup:h,rfId:g,panBy:v,updateConnection:x}=p.getState(),y="target"===t.type;ED(e.nativeEvent,{autoPanOnConnect:r,connectionMode:a,connectionRadius:o,domNode:i,handleId:t.id,nodeId:t.nodeId,nodeLookup:h,isTarget:y,edgeUpdaterType:t.type,lib:s,flowId:g,cancelConnection:f,panBy:v,isValidConnection:(...e)=>p.getState().isValidConnection?.(...e)??!0,onConnect:e=>u?.(n,e),onConnectStart:(r,i)=>{m(!0),d?.(e,n,t.type),l?.(r,i)},onConnectEnd:(...e)=>p.getState().onConnectEnd?.(...e),onReconnectEnd:(e,r)=>{m(!1),c?.(e,n,t.type,r)},updateConnection:x,getTransform:()=>p.getState().transform,getFromHandle:()=>p.getState().connection.fromHandle,dragThreshold:p.getState().connectionDragThreshold,handleDomNode:e.currentTarget})},g=()=>f(!0),v=()=>f(!1);return(0,b.jsxs)(b.Fragment,{children:[(!0===e||"source"===e)&&(0,b.jsx)(TT,{position:s,centerX:r,centerY:i,radius:t,onMouseDown:e=>h(e,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),onMouseEnter:g,onMouseOut:v,type:"source"}),(!0===e||"target"===e)&&(0,b.jsx)(TT,{position:l,centerX:a,centerY:o,radius:t,onMouseDown:e=>h(e,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),onMouseEnter:g,onMouseOut:v,type:"target"})]})}var TD=(0,_.memo)(function({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:r,onClick:i,onDoubleClick:a,onContextMenu:o,onMouseEnter:s,onMouseMove:l,onMouseLeave:u,reconnectRadius:d,onReconnect:c,onReconnectStart:f,onReconnectEnd:p,rfId:h,edgeTypes:g,noPanClassName:x,onError:y,disableKeyboardA11y:$}){let w,k=E3(t=>t.edgeLookup.get(e)),S=E3(e=>e.defaultEdgeOptions),I=(k=S?{...S,...k}:k).type||"default",j=g?.[I]||Tz[I];void 0===j&&(y?.("011",(w=I,`Edge type "${w}" not found. Using fallback type "default".`)),I="default",j=g?.default||Tz.default);let N=!!(k.focusable||t&&void 0===k.focusable),z=void 0!==c&&(k.reconnectable||n&&void 0===k.reconnectable),E=!!(k.selectable||r&&void 0===k.selectable),O=(0,_.useRef)(null),[T,C]=(0,_.useState)(!1),[D,U]=(0,_.useState)(!1),P=E9(),{zIndex:Z,sourceX:A,sourceY:R,targetX:L,targetY:M,sourcePosition:F,targetPosition:B}=E3((0,_.useCallback)(t=>{let n=t.nodeLookup.get(k.source),r=t.nodeLookup.get(k.target);if(!n||!r)return{zIndex:k.zIndex,...TE};let i=function(e){let{sourceNode:t,targetNode:n}=e;if(!Em(t)||!Em(n))return null;let r=t.internals.handleBounds||Ef(t.handles),i=n.internals.handleBounds||Ef(n.handles),a=Eh(r?.source??[],e.sourceHandle),o=Eh(e.connectionMode===m.Strict?i?.target??[]:(i?.target??[]).concat(i?.source??[]),e.targetHandle);if(!a||!o)return e.onError?.("008",((e,{id:t,sourceHandle:n,targetHandle:r})=>`Couldn't create edge for ${e} handle id: "${"source"===e?n:r}", edge id: ${t}.`)(!a?"source":"target",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;let s=a?.position||v.Bottom,l=o?.position||v.Top,u=Ep(t,a,s),d=Ep(n,o,l);return{sourceX:u.x,sourceY:u.y,targetX:d.x,targetY:d.y,sourcePosition:s,targetPosition:l}}({id:e,sourceNode:n,targetNode:r,sourceHandle:k.sourceHandle||null,targetHandle:k.targetHandle||null,connectionMode:t.connectionMode,onError:y});return{zIndex:function({sourceNode:e,targetNode:t,selected:n=!1,zIndex:r=0,elevateOnSelect:i=!1,zIndexMode:a="basic"}){if("manual"===a)return r;let o=Math.max(e.parentId||i&&e.selected?e.internals.z:0,t.parentId||i&&t.selected?t.internals.z:0);return(i&&n?r+1e3:r)+o}({selected:k.selected,zIndex:k.zIndex,sourceNode:n,targetNode:r,elevateOnSelect:t.elevateEdgesOnSelect,zIndexMode:t.zIndexMode}),...i||TE}},[k.source,k.target,k.sourceHandle,k.targetHandle,k.selected,k.zIndex]),E4),W=(0,_.useMemo)(()=>k.markerStart?`url('#${Eg(k.markerStart,h)}')`:void 0,[k.markerStart,h]),H=(0,_.useMemo)(()=>k.markerEnd?`url('#${Eg(k.markerEnd,h)}')`:void 0,[k.markerEnd,h]);if(k.hidden||null===A||null===R||null===L||null===M)return null;let V=a?e=>{a(e,{...k})}:void 0,J=o?e=>{o(e,{...k})}:void 0,G=s?e=>{s(e,{...k})}:void 0,K=l?e=>{l(e,{...k})}:void 0,q=u?e=>{u(e,{...k})}:void 0;return(0,b.jsx)("svg",{style:{zIndex:Z},children:(0,b.jsxs)("g",{className:IG(["react-flow__edge",`react-flow__edge-${I}`,k.className,x,{selected:k.selected,animated:k.animated,inactive:!E&&!i,updating:T,selectable:E}]),onClick:t=>{let{addSelectedEdges:n,unselectNodesAndEdges:r,multiSelectionActive:a}=P.getState();E&&(P.setState({nodesSelectionActive:!1}),k.selected&&a?(r({nodes:[],edges:[k]}),O.current?.blur()):n([e])),i&&i(t,k)},onDoubleClick:V,onContextMenu:J,onMouseEnter:G,onMouseMove:K,onMouseLeave:q,onKeyDown:N?t=>{if(!$&&zy.includes(t.key)&&E){let{unselectNodesAndEdges:n,addSelectedEdges:r}=P.getState();"Escape"===t.key?(O.current?.blur(),n({edges:[k]})):r([e])}}:void 0,tabIndex:N?0:void 0,role:k.ariaRole??(N?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":null===k.ariaLabel?void 0:k.ariaLabel||`Edge from ${k.source} to ${k.target}`,"aria-describedby":N?`${Ot}-${h}`:void 0,ref:O,...k.domAttributes,children:[!D&&(0,b.jsx)(j,{id:e,source:k.source,target:k.target,type:k.type,selected:k.selected,animated:k.animated,selectable:E,deletable:k.deletable??!0,label:k.label,labelStyle:k.labelStyle,labelShowBg:k.labelShowBg,labelBgStyle:k.labelBgStyle,labelBgPadding:k.labelBgPadding,labelBgBorderRadius:k.labelBgBorderRadius,sourceX:A,sourceY:R,targetX:L,targetY:M,sourcePosition:F,targetPosition:B,data:k.data,style:k.style,sourceHandleId:k.sourceHandle,targetHandleId:k.targetHandle,markerStart:W,markerEnd:H,pathOptions:"pathOptions"in k?k.pathOptions:void 0,interactionWidth:k.interactionWidth}),z&&(0,b.jsx)(TC,{edge:k,isReconnectable:z,reconnectRadius:d,onReconnect:c,onReconnectStart:f,onReconnectEnd:p,sourceX:A,sourceY:R,targetX:L,targetY:M,sourcePosition:F,targetPosition:B,setUpdateHover:C,setReconnecting:U})]})})});let TU=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function TP({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:r,noPanClassName:i,onReconnect:a,onEdgeContextMenu:o,onEdgeMouseEnter:s,onEdgeMouseMove:l,onEdgeMouseLeave:u,onEdgeClick:d,reconnectRadius:c,onEdgeDoubleClick:m,onReconnectStart:f,onReconnectEnd:p,disableKeyboardA11y:h}){let{edgesFocusable:g,edgesReconnectable:v,elementsSelectable:x,onError:y}=E3(TU,E4),$=E3((0,_.useCallback)(e=>{if(!t)return e.edges.map(e=>e.id);let n=[];if(e.width&&e.height)for(let t of e.edges){let r=e.nodeLookup.get(t.source),i=e.nodeLookup.get(t.target);r&&i&&function({sourceNode:e,targetNode:t,width:n,height:r,transform:i}){let a=zZ(zM(e),zM(t));return a.x===a.x2&&(a.x2+=1),a.y===a.y2&&(a.y2+=1),zB({x:-i[0]/i[2],y:-i[1]/i[2],width:n/i[2],height:r/i[2]},zR(a))>0}({sourceNode:r,targetNode:i,width:e.width,height:e.height,transform:e.transform})&&n.push(t.id)}return n},[t]),E4);return(0,b.jsxs)("div",{className:"react-flow__edges",children:[(0,b.jsx)(Tl,{defaultColor:e,rfId:n}),$.map(e=>(0,b.jsx)(TD,{id:e,edgesFocusable:g,edgesReconnectable:v,elementsSelectable:x,noPanClassName:i,onReconnect:a,onContextMenu:o,onMouseEnter:s,onMouseMove:l,onMouseLeave:u,onClick:d,reconnectRadius:c,onDoubleClick:m,onReconnectStart:f,onReconnectEnd:p,rfId:n,onError:y,edgeTypes:r,disableKeyboardA11y:h},e))]})}TP.displayName="EdgeRenderer";let TZ=(0,_.memo)(TP),TA=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function TR({children:e}){let t=E3(TA);return(0,b.jsx)("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}let TL=e=>e.panZoom?.syncViewport;function TM(e){return e.connection.inProgress?{...e.connection,to:zG(e.connection.to,e.transform)}:{...e.connection}}let TF=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function TB({containerStyle:e,style:t,type:n,component:r}){let{nodesConnectable:i,width:a,height:o,isValid:s,inProgress:l}=E3(TF,E4);return a&&i&&l?(0,b.jsx)("svg",{style:e,width:a,height:o,className:"react-flow__connectionline react-flow__container",children:(0,b.jsx)("g",{className:IG(["react-flow__connection",zw(s)]),children:(0,b.jsx)(TW,{style:t,type:n,CustomComponent:r,isValid:s})})}):null}let TW=({style:e,type:t=h.Bezier,CustomComponent:n,isValid:r})=>{let{inProgress:i,from:a,fromNode:o,fromHandle:s,fromPosition:l,to:u,toNode:d,toHandle:c,toPosition:m,pointer:f}=E3(TM,E4);if(!i)return;if(n)return(0,b.jsx)(n,{connectionLineType:t,connectionLineStyle:e,fromNode:o,fromHandle:s,fromX:a.x,fromY:a.y,toX:u.x,toY:u.y,fromPosition:l,toPosition:m,connectionStatus:zw(r),toNode:d,toHandle:c,pointer:f});let p="",g={sourceX:a.x,sourceY:a.y,sourcePosition:l,targetX:u.x,targetY:u.y,targetPosition:m};switch(t){case h.Bezier:[p]=Ei(g);break;case h.SimpleBezier:[p]=Tf(g);break;case h.Step:[p]=Ec({...g,borderRadius:0});break;case h.SmoothStep:[p]=Ec(g);break;default:[p]=Es(g)}return(0,b.jsx)("path",{d:p,fill:"none",className:"react-flow__connection-path",style:e})};TW.displayName="ConnectionLine";let TH={};function TV(e=TH){(0,_.useRef)(e),E9(),(0,_.useEffect)(()=>{},[e])}function TJ({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:r,onEdgeClick:i,onNodeDoubleClick:a,onEdgeDoubleClick:o,onNodeMouseEnter:s,onNodeMouseMove:l,onNodeMouseLeave:u,onNodeContextMenu:d,onSelectionContextMenu:c,onSelectionStart:m,onSelectionEnd:f,connectionLineType:p,connectionLineStyle:h,connectionLineComponent:g,connectionLineContainerStyle:v,selectionKeyCode:x,selectionOnDrag:y,selectionMode:$,multiSelectionKeyCode:w,panActivationKeyCode:k,zoomActivationKeyCode:S,deleteKeyCode:I,onlyRenderVisibleElements:j,elementsSelectable:N,defaultViewport:z,translateExtent:E,minZoom:O,maxZoom:T,preventScrolling:C,defaultMarkerColor:D,zoomOnScroll:U,zoomOnPinch:P,panOnScroll:Z,panOnScrollSpeed:A,panOnScrollMode:R,zoomOnDoubleClick:L,panOnDrag:M,onPaneClick:F,onPaneMouseEnter:B,onPaneMouseMove:W,onPaneMouseLeave:H,onPaneScroll:V,onPaneContextMenu:J,paneClickDistance:G,nodeClickDistance:K,onEdgeContextMenu:q,onEdgeMouseEnter:Y,onEdgeMouseMove:X,onEdgeMouseLeave:Q,reconnectRadius:ee,onReconnect:et,onReconnectStart:en,onReconnectEnd:er,noDragClassName:ei,noWheelClassName:ea,noPanClassName:eo,disableKeyboardA11y:es,nodeExtent:el,rfId:eu,viewport:ed,onViewportChange:ec}){let em,ef,ep,eh;return TV(e),TV(t),E9(),(0,_.useRef)(!1),(0,_.useEffect)(()=>{},[]),em=OZ(),ef=(0,_.useRef)(!1),(0,_.useEffect)(()=>{!ef.current&&em.viewportInitialized&&n&&(setTimeout(()=>n(em),1),ef.current=!0)},[n,em.viewportInitialized]),ep=E3(TL),eh=E9(),(0,_.useEffect)(()=>{ed&&(ep?.(ed),eh.setState({transform:[ed.x,ed.y,ed.zoom]}))},[ed,ep]),(0,b.jsx)(O7,{onPaneClick:F,onPaneMouseEnter:B,onPaneMouseMove:W,onPaneMouseLeave:H,onPaneContextMenu:J,onPaneScroll:V,paneClickDistance:G,deleteKeyCode:I,selectionKeyCode:x,selectionOnDrag:y,selectionMode:$,onSelectionStart:m,onSelectionEnd:f,multiSelectionKeyCode:w,panActivationKeyCode:k,zoomActivationKeyCode:S,elementsSelectable:N,zoomOnScroll:U,zoomOnPinch:P,zoomOnDoubleClick:L,panOnScroll:Z,panOnScrollSpeed:A,panOnScrollMode:R,panOnDrag:M,defaultViewport:z,translateExtent:E,minZoom:O,maxZoom:T,onSelectionContextMenu:c,preventScrolling:C,noDragClassName:ei,noWheelClassName:ea,noPanClassName:eo,disableKeyboardA11y:es,onViewportChange:ec,isControlledViewport:!!ed,children:(0,b.jsxs)(TR,{children:[(0,b.jsx)(TZ,{edgeTypes:t,onEdgeClick:i,onEdgeDoubleClick:o,onReconnect:et,onReconnectStart:en,onReconnectEnd:er,onlyRenderVisibleElements:j,onEdgeContextMenu:q,onEdgeMouseEnter:Y,onEdgeMouseMove:X,onEdgeMouseLeave:Q,reconnectRadius:ee,defaultMarkerColor:D,noPanClassName:eo,disableKeyboardA11y:es,rfId:eu}),(0,b.jsx)(TB,{style:h,type:p,component:g,containerStyle:v}),(0,b.jsx)("div",{className:"react-flow__edgelabel-renderer"}),(0,b.jsx)(Ti,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:a,onNodeMouseEnter:s,onNodeMouseMove:l,onNodeMouseLeave:u,onNodeContextMenu:d,nodeClickDistance:K,onlyRenderVisibleElements:j,noPanClassName:eo,noDragClassName:ei,disableKeyboardA11y:es,nodeExtent:el,rfId:eu}),(0,b.jsx)("div",{className:"react-flow__viewport-portal"})]})})}TJ.displayName="GraphView";let TG=(0,_.memo)(TJ),TK=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:o,fitViewOptions:s,minZoom:l=.5,maxZoom:u=2,nodeOrigin:d,nodeExtent:c,zIndexMode:f="basic"}={})=>{let p=new Map,h=new Map,g=new Map,v=new Map,x=r??t??[],y=n??e??[],b=d??[0,0],_=c??zx;Ej(g,v,x);let $=E_(y,p,h,{nodeOrigin:b,nodeExtent:_,zIndexMode:f}),w=[0,0,1];if(o&&i&&a){let{x:e,y:t,zoom:n}=zY(zj(p,{filter:e=>!!((e.width||e.initialWidth)&&(e.height||e.initialHeight))}),i,a,l,u,s?.padding??.1);w=[e,t,n]}return{rfId:"1",width:i??0,height:a??0,transform:w,nodes:y,nodesInitialized:$,nodeLookup:p,parentLookup:h,edges:x,edgeLookup:v,connectionLookup:g,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:void 0!==n,hasDefaultEdges:void 0!==r,panZoom:null,minZoom:l,maxZoom:u,translateExtent:zx,nodeExtent:_,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:m.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:b,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:o??!1,fitViewOptions:s,fitViewResolver:null,connection:{...z_},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:zV,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:zb,zIndexMode:f,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}};function Tq({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:r,initialWidth:i,initialHeight:a,initialMinZoom:o,initialMaxZoom:s,initialFitViewOptions:l,fitView:u,nodeOrigin:d,nodeExtent:c,zIndexMode:m,children:f}){let[p]=(0,_.useState)(()=>(({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:o,fitViewOptions:s,minZoom:l,maxZoom:u,nodeOrigin:d,nodeExtent:c,zIndexMode:m})=>{let f,p;return f=(f,p)=>{async function h(){let{nodeLookup:e,panZoom:t,fitViewOptions:n,fitViewResolver:r,width:i,height:a,minZoom:o,maxZoom:s}=p();t&&(await zz({nodes:e,width:i,height:a,panZoom:t,minZoom:o,maxZoom:s},n),r?.resolve(!0),f({fitViewResolver:null}))}return{...TK({nodes:e,edges:t,width:i,height:a,fitView:o,fitViewOptions:s,minZoom:l,maxZoom:u,nodeOrigin:d,nodeExtent:c,defaultNodes:n,defaultEdges:r,zIndexMode:m}),setNodes:e=>{let{nodeLookup:t,parentLookup:n,nodeOrigin:r,elevateNodesOnSelect:i,fitViewQueued:a,zIndexMode:o}=p(),s=E_(e,t,n,{nodeOrigin:r,nodeExtent:c,elevateNodesOnSelect:i,checkEquality:!0,zIndexMode:o});a&&s?(h(),f({nodes:e,nodesInitialized:s,fitViewQueued:!1,fitViewOptions:void 0})):f({nodes:e,nodesInitialized:s})},setEdges:e=>{let{connectionLookup:t,edgeLookup:n}=p();Ej(t,n,e),f({edges:e})},setDefaultNodesAndEdges:(e,t)=>{if(e){let{setNodes:t}=p();t(e),f({hasDefaultNodes:!0})}if(t){let{setEdges:e}=p();e(t),f({hasDefaultEdges:!0})}},updateNodeInternals:e=>{let{triggerNodeChanges:t,nodeLookup:n,parentLookup:r,domNode:i,nodeOrigin:a,nodeExtent:o,debug:s,fitViewQueued:l,zIndexMode:u}=p(),{changes:d,updatedInternals:c}=function(e,t,n,r,i,a,o){let s=r?.querySelector(".xyflow__viewport"),l=!1;if(!s)return{changes:[],updatedInternals:l};let u=[],d=window.getComputedStyle(s),{m22:c}=new window.DOMMatrixReadOnly(d.transform),m=[];for(let r of e.values()){let e=t.get(r.id);if(!e)continue;if(e.hidden){t.set(e.id,{...e,internals:{...e.internals,handleBounds:void 0}}),l=!0;continue}let s=z5(r.nodeElement),d=e.measured.width!==s.width||e.measured.height!==s.height;if(s.width&&s.height&&(d||!e.internals.handleBounds||r.force)){let f=r.nodeElement.getBoundingClientRect(),p=zQ(e.extent)?e.extent:a,{positionAbsolute:h}=e.internals;e.parentId&&"parent"===e.extent?h=zD(h,s,t.get(e.parentId)):p&&(h=zC(h,p,s));let g={...e,measured:s,internals:{...e.internals,positionAbsolute:h,handleBounds:{source:Ee("source",r.nodeElement,f,c,e.id),target:Ee("target",r.nodeElement,f,c,e.id)}}};t.set(e.id,g),e.parentId&&E$(g,t,n,{nodeOrigin:i,zIndexMode:o}),l=!0,d&&(u.push({id:e.id,type:"dimensions",dimensions:s}),e.expandParent&&e.parentId&&m.push({id:e.id,parentId:e.parentId,rect:zL(g,i)}))}}if(m.length>0){let e=Ek(m,t,n,i);u.push(...e)}return{changes:u,updatedInternals:l}}(e,n,r,i,a,o,u);c&&(!function(e,t,n){let r=Ey(Ev,n);for(let n of e.values())if(n.parentId)E$(n,e,t,r);else{let e=zC(zI(n,r.nodeOrigin),zQ(n.extent)?n.extent:r.nodeExtent,z0(n));n.internals.positionAbsolute=e}}(n,r,{nodeOrigin:a,nodeExtent:o,zIndexMode:u}),l?(h(),f({fitViewQueued:!1,fitViewOptions:void 0})):f({}),d?.length>0&&(s&&console.log("React Flow: trigger node changes",d),t?.(d)))},updateNodePositions:(e,t=!1)=>{let n=[],r=[],{nodeLookup:i,triggerNodeChanges:a,connection:o,updateConnection:s,onNodesChangeMiddlewareMap:l}=p();for(let[a,l]of e){let e=i.get(a),u=!!(e?.expandParent&&e?.parentId&&l?.position),d={id:a,type:"position",position:u?{x:Math.max(0,l.position.x),y:Math.max(0,l.position.y)}:l.position,dragging:t};if(e&&o.inProgress&&o.fromNode.id===e.id){let t=Ep(e,o.fromHandle,v.Left,!0);s({...o,from:t})}u&&e.parentId&&n.push({id:a,parentId:e.parentId,rect:{...l.internals.positionAbsolute,width:l.measured.width??0,height:l.measured.height??0}}),r.push(d)}if(n.length>0){let{parentLookup:e,nodeOrigin:t}=p(),a=Ek(n,i,e,t);r.push(...a)}for(let e of l.values())r=e(r);a(r)},triggerNodeChanges:e=>{let{onNodesChange:t,setNodes:n,nodes:r,hasDefaultNodes:i,debug:a}=p();e?.length&&(i&&n(OS(e,r)),a&&console.log("React Flow: trigger node changes",e),t?.(e))},triggerEdgeChanges:e=>{let{onEdgesChange:t,setEdges:n,edges:r,hasDefaultEdges:i,debug:a}=p();e?.length&&(i&&n(OS(e,r)),a&&console.log("React Flow: trigger edge changes",e),t?.(e))},addSelectedNodes:e=>{let{multiSelectionActive:t,edgeLookup:n,nodeLookup:r,triggerNodeChanges:i,triggerEdgeChanges:a}=p();t?i(e.map(e=>OI(e,!0))):(i(Oj(r,new Set([...e]),!0)),a(Oj(n)))},addSelectedEdges:e=>{let{multiSelectionActive:t,edgeLookup:n,nodeLookup:r,triggerNodeChanges:i,triggerEdgeChanges:a}=p();t?a(e.map(e=>OI(e,!0))):(a(Oj(n,new Set([...e]))),i(Oj(r,new Set,!0)))},unselectNodesAndEdges:({nodes:e,edges:t}={})=>{let{edges:n,nodes:r,nodeLookup:i,triggerNodeChanges:a,triggerEdgeChanges:o}=p(),s=[];for(let t of e||r){if(!t.selected)continue;let e=i.get(t.id);e&&(e.selected=!1),s.push(OI(t.id,!1))}let l=[];for(let e of t||n)e.selected&&l.push(OI(e.id,!1));a(s),o(l)},setMinZoom:e=>{let{panZoom:t,maxZoom:n}=p();t?.setScaleExtent([e,n]),f({minZoom:e})},setMaxZoom:e=>{let{panZoom:t,minZoom:n}=p();t?.setScaleExtent([n,e]),f({maxZoom:e})},setTranslateExtent:e=>{p().panZoom?.setTranslateExtent(e),f({translateExtent:e})},resetSelectedElements:()=>{let{edges:e,nodes:t,triggerNodeChanges:n,triggerEdgeChanges:r,elementsSelectable:i}=p();if(!i)return;let a=t.reduce((e,t)=>t.selected?[...e,OI(t.id,!1)]:e,[]),o=e.reduce((e,t)=>t.selected?[...e,OI(t.id,!1)]:e,[]);n(a),r(o)},setNodeExtent:e=>{let{nodes:t,nodeLookup:n,parentLookup:r,nodeOrigin:i,elevateNodesOnSelect:a,nodeExtent:o,zIndexMode:s}=p();(e[0][0]!==o[0][0]||e[0][1]!==o[0][1]||e[1][0]!==o[1][0]||e[1][1]!==o[1][1])&&(E_(t,n,r,{nodeOrigin:i,nodeExtent:e,elevateNodesOnSelect:a,checkEquality:!1,zIndexMode:s}),f({nodeExtent:e}))},panBy:e=>{let{transform:t,width:n,height:r,panZoom:i,translateExtent:a}=p();return ES({delta:e,panZoom:i,transform:t,translateExtent:a,width:n,height:r})},setCenter:async(e,t,n)=>{let{width:r,height:i,maxZoom:a,panZoom:o}=p();if(!o)return Promise.resolve(!1);let s=void 0!==n?.zoom?n.zoom:a;return await o.setViewport({x:r/2-e*s,y:i/2-t*s,zoom:s},{duration:n?.duration,ease:n?.ease,interpolate:n?.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{f({connection:{...z_}})},updateConnection:e=>{f({connection:e})},reset:()=>f({...TK()})}},p=Object.is,f?E1(f,p):E1})({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:u,minZoom:o,maxZoom:s,fitViewOptions:l,nodeOrigin:d,nodeExtent:c,zIndexMode:m}));return(0,b.jsx)(E2,{value:p,children:(0,b.jsx)(OU,{children:f})})}function TY({children:e,nodes:t,edges:n,defaultNodes:r,defaultEdges:i,width:a,height:o,fitView:s,fitViewOptions:l,minZoom:u,maxZoom:d,nodeOrigin:c,nodeExtent:m,zIndexMode:f}){return(0,_.useContext)(E6)?(0,b.jsx)(b.Fragment,{children:e}):(0,b.jsx)(Tq,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:i,initialWidth:a,initialHeight:o,fitView:s,initialFitViewOptions:l,initialMinZoom:u,initialMaxZoom:d,nodeOrigin:c,nodeExtent:m,zIndexMode:f,children:e})}let TX={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};var TQ=OO(function({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:i,nodeTypes:a,edgeTypes:o,onNodeClick:s,onEdgeClick:l,onInit:u,onMove:d,onMoveStart:c,onMoveEnd:m,onConnect:g,onConnectStart:v,onConnectEnd:x,onClickConnectStart:y,onClickConnectEnd:$,onNodeMouseEnter:w,onNodeMouseMove:k,onNodeMouseLeave:S,onNodeContextMenu:I,onNodeDoubleClick:j,onNodeDragStart:N,onNodeDrag:z,onNodeDragStop:E,onNodesDelete:O,onEdgesDelete:T,onDelete:C,onSelectionChange:D,onSelectionDragStart:U,onSelectionDrag:P,onSelectionDragStop:Z,onSelectionContextMenu:A,onSelectionStart:R,onSelectionEnd:L,onBeforeDelete:M,connectionMode:F,connectionLineType:B=h.Bezier,connectionLineStyle:W,connectionLineComponent:H,connectionLineContainerStyle:V,deleteKeyCode:J="Backspace",selectionKeyCode:G="Shift",selectionOnDrag:K=!1,selectionMode:q=p.Full,panActivationKeyCode:Y="Space",multiSelectionKeyCode:X=zX()?"Meta":"Control",zoomActivationKeyCode:Q=zX()?"Meta":"Control",snapToGrid:ee,snapGrid:et,onlyRenderVisibleElements:en=!1,selectNodesOnDrag:er,nodesDraggable:ei,autoPanOnNodeFocus:ea,nodesConnectable:eo,nodesFocusable:es,nodeOrigin:el=Op,edgesFocusable:eu,edgesReconnectable:ed,elementsSelectable:ec=!0,defaultViewport:em=Oh,minZoom:ef=.5,maxZoom:ep=2,translateExtent:eh=zx,preventScrolling:eg=!0,nodeExtent:ev,defaultMarkerColor:ex="#b1b1b7",zoomOnScroll:ey=!0,zoomOnPinch:eb=!0,panOnScroll:e_=!1,panOnScrollSpeed:e$=.5,panOnScrollMode:ew=f.Free,zoomOnDoubleClick:ek=!0,panOnDrag:eS=!0,onPaneClick:eI,onPaneMouseEnter:ej,onPaneMouseMove:eN,onPaneMouseLeave:ez,onPaneScroll:eE,onPaneContextMenu:eO,paneClickDistance:eT=1,nodeClickDistance:eC=0,children:eD,onReconnect:eU,onReconnectStart:eP,onReconnectEnd:eZ,onEdgeContextMenu:eA,onEdgeDoubleClick:eR,onEdgeMouseEnter:eL,onEdgeMouseMove:eM,onEdgeMouseLeave:eF,reconnectRadius:eB=10,onNodesChange:eW,onEdgesChange:eH,noDragClassName:eV="nodrag",noWheelClassName:eJ="nowheel",noPanClassName:eG="nopan",fitView:eK,fitViewOptions:eq,connectOnClick:eY,attributionPosition:eX,proOptions:eQ,defaultEdgeOptions:e0,elevateNodesOnSelect:e1=!0,elevateEdgesOnSelect:e4=!1,disableKeyboardA11y:e6=!1,autoPanOnConnect:e2,autoPanOnNodeDrag:e5,autoPanSpeed:e3,connectionRadius:e9,isValidConnection:e8,onError:e7,style:te,id:tt,nodeDragThreshold:tn,connectionDragThreshold:tr,viewport:ti,onViewportChange:ta,width:to,height:ts,colorMode:tl="light",debug:tu,onScroll:td,ariaLabelConfig:tc,zIndexMode:tm="basic",...tf},tp){let th=tt||"1",tg=function(e){let[t,n]=(0,_.useState)("system"===e?null:e);return(0,_.useEffect)(()=>{if("system"!==e)return void n(e);let t=Ob(),r=()=>n(t?.matches?"dark":"light");return r(),t?.addEventListener("change",r),()=>{t?.removeEventListener("change",r)}},[e]),null!==t?t:Ob()?.matches?"dark":"light"}(tl),tv=(0,_.useCallback)(e=>{e.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),td?.(e)},[td]);return(0,b.jsx)("div",{"data-testid":"rf__wrapper",...tf,onScroll:tv,style:{...te,...TX},ref:tp,className:IG(["react-flow",i,tg]),id:tt,role:"application",children:(0,b.jsxs)(TY,{nodes:e,edges:t,width:to,height:ts,fitView:eK,fitViewOptions:eq,minZoom:ef,maxZoom:ep,nodeOrigin:el,nodeExtent:ev,zIndexMode:tm,children:[(0,b.jsx)(TG,{onInit:u,onNodeClick:s,onEdgeClick:l,onNodeMouseEnter:w,onNodeMouseMove:k,onNodeMouseLeave:S,onNodeContextMenu:I,onNodeDoubleClick:j,nodeTypes:a,edgeTypes:o,connectionLineType:B,connectionLineStyle:W,connectionLineComponent:H,connectionLineContainerStyle:V,selectionKeyCode:G,selectionOnDrag:K,selectionMode:q,deleteKeyCode:J,multiSelectionKeyCode:X,panActivationKeyCode:Y,zoomActivationKeyCode:Q,onlyRenderVisibleElements:en,defaultViewport:em,translateExtent:eh,minZoom:ef,maxZoom:ep,preventScrolling:eg,zoomOnScroll:ey,zoomOnPinch:eb,zoomOnDoubleClick:ek,panOnScroll:e_,panOnScrollSpeed:e$,panOnScrollMode:ew,panOnDrag:eS,onPaneClick:eI,onPaneMouseEnter:ej,onPaneMouseMove:eN,onPaneMouseLeave:ez,onPaneScroll:eE,onPaneContextMenu:eO,paneClickDistance:eT,nodeClickDistance:eC,onSelectionContextMenu:A,onSelectionStart:R,onSelectionEnd:L,onReconnect:eU,onReconnectStart:eP,onReconnectEnd:eZ,onEdgeContextMenu:eA,onEdgeDoubleClick:eR,onEdgeMouseEnter:eL,onEdgeMouseMove:eM,onEdgeMouseLeave:eF,reconnectRadius:eB,defaultMarkerColor:ex,noDragClassName:eV,noWheelClassName:eJ,noPanClassName:eG,rfId:th,disableKeyboardA11y:e6,nodeExtent:ev,viewport:ti,onViewportChange:ta}),(0,b.jsx)(Oy,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:g,onConnectStart:v,onConnectEnd:x,onClickConnectStart:y,onClickConnectEnd:$,nodesDraggable:ei,autoPanOnNodeFocus:ea,nodesConnectable:eo,nodesFocusable:es,edgesFocusable:eu,edgesReconnectable:ed,elementsSelectable:ec,elevateNodesOnSelect:e1,elevateEdgesOnSelect:e4,minZoom:ef,maxZoom:ep,nodeExtent:ev,onNodesChange:eW,onEdgesChange:eH,snapToGrid:ee,snapGrid:et,connectionMode:F,translateExtent:eh,connectOnClick:eY,defaultEdgeOptions:e0,fitView:eK,fitViewOptions:eq,onNodesDelete:O,onEdgesDelete:T,onDelete:C,onNodeDragStart:N,onNodeDrag:z,onNodeDragStop:E,onSelectionDrag:P,onSelectionDragStart:U,onSelectionDragStop:Z,onMove:d,onMoveStart:c,onMoveEnd:m,noPanClassName:eG,nodeOrigin:el,rfId:th,autoPanOnConnect:e2,autoPanOnNodeDrag:e5,autoPanSpeed:e3,onError:e7,connectionRadius:e9,isValidConnection:e8,selectNodesOnDrag:er,nodeDragThreshold:tn,connectionDragThreshold:tr,onBeforeDelete:M,debug:tu,ariaLabelConfig:tc,zIndexMode:tm}),(0,b.jsx)(Of,{onSelectionChange:D}),eD,(0,b.jsx)(Os,{proOptions:eQ,position:eX}),(0,b.jsx)(Oa,{rfId:th,disableKeyboardA11y:e6})]})})});function T0({dimensions:e,lineWidth:t,variant:n,className:r}){return(0,b.jsx)("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:IG(["react-flow__background-pattern",n,r])})}function T1({radius:e,className:t}){return(0,b.jsx)("circle",{cx:e,cy:e,r:e,className:IG(["react-flow__background-pattern","dots",t])})}(d=y||(y={})).Lines="lines",d.Dots="dots",d.Cross="cross";let T4={[y.Dots]:1,[y.Lines]:1,[y.Cross]:6},T6=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function T2({id:e,variant:t=y.Dots,gap:n=20,size:r,lineWidth:i=1,offset:a=0,color:o,bgColor:s,style:l,className:u,patternClassName:d}){let c=(0,_.useRef)(null),{transform:m,patternId:f}=E3(T6,E4),p=r||T4[t],h=t===y.Dots,g=t===y.Cross,v=Array.isArray(n)?n:[n,n],x=[v[0]*m[2]||1,v[1]*m[2]||1],$=p*m[2],w=Array.isArray(a)?a:[a,a],k=g?[$,$]:x,S=[w[0]*m[2]||1+k[0]/2,w[1]*m[2]||1+k[1]/2],I=`${f}${e||""}`;return(0,b.jsxs)("svg",{className:IG(["react-flow__background",u]),style:{...l,...OL,"--xy-background-color-props":s,"--xy-background-pattern-color-props":o},ref:c,"data-testid":"rf__background",children:[(0,b.jsx)("pattern",{id:I,x:m[0]%x[0],y:m[1]%x[1],width:x[0],height:x[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${S[0]},-${S[1]})`,children:h?(0,b.jsx)(T1,{radius:$/2,className:d}):(0,b.jsx)(T0,{dimensions:k,lineWidth:i,variant:t,className:d})}),(0,b.jsx)("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${I})`})]})}T2.displayName="Background";let T5=(0,_.memo)(T2);function T3(){return(0,b.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:(0,b.jsx)("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function T9(){return(0,b.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:(0,b.jsx)("path",{d:"M0 0h32v4.2H0z"})})}function T8(){return(0,b.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:(0,b.jsx)("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function T7(){return(0,b.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:(0,b.jsx)("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function Ce(){return(0,b.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:(0,b.jsx)("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function Ct({children:e,className:t,...n}){return(0,b.jsx)("button",{type:"button",className:IG(["react-flow__controls-button",t]),...n,children:e})}let Cn=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function Cr({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:i,onZoomIn:a,onZoomOut:o,onFitView:s,onInteractiveChange:l,className:u,children:d,position:c="bottom-left",orientation:m="vertical","aria-label":f}){let p=E9(),{isInteractive:h,minZoomReached:g,maxZoomReached:v,ariaLabelConfig:x}=E3(Cn,E4),{zoomIn:y,zoomOut:_,fitView:$}=OZ();return(0,b.jsxs)(Oo,{className:IG(["react-flow__controls","horizontal"===m?"horizontal":"vertical",u]),position:c,style:e,"data-testid":"rf__controls","aria-label":f??x["controls.ariaLabel"],children:[t&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(Ct,{onClick:()=>{y(),a?.()},className:"react-flow__controls-zoomin",title:x["controls.zoomIn.ariaLabel"],"aria-label":x["controls.zoomIn.ariaLabel"],disabled:v,children:(0,b.jsx)(T3,{})}),(0,b.jsx)(Ct,{onClick:()=>{_(),o?.()},className:"react-flow__controls-zoomout",title:x["controls.zoomOut.ariaLabel"],"aria-label":x["controls.zoomOut.ariaLabel"],disabled:g,children:(0,b.jsx)(T9,{})})]}),n&&(0,b.jsx)(Ct,{className:"react-flow__controls-fitview",onClick:()=>{$(i),s?.()},title:x["controls.fitView.ariaLabel"],"aria-label":x["controls.fitView.ariaLabel"],children:(0,b.jsx)(T8,{})}),r&&(0,b.jsx)(Ct,{className:"react-flow__controls-interactive",onClick:()=>{p.setState({nodesDraggable:!h,nodesConnectable:!h,elementsSelectable:!h}),l?.(!h)},title:x["controls.interactive.ariaLabel"],"aria-label":x["controls.interactive.ariaLabel"],children:h?(0,b.jsx)(Ce,{}):(0,b.jsx)(T7,{})}),d]})}Cr.displayName="Controls";let Ci=(0,_.memo)(Cr),Ca=(0,_.memo)(function({id:e,x:t,y:n,width:r,height:i,style:a,color:o,strokeColor:s,strokeWidth:l,className:u,borderRadius:d,shapeRendering:c,selected:m,onClick:f}){let{background:p,backgroundColor:h}=a||{};return(0,b.jsx)("rect",{className:IG(["react-flow__minimap-node",{selected:m},u]),x:t,y:n,rx:d,ry:d,width:r,height:i,style:{fill:o||p||h,stroke:s,strokeWidth:l},shapeRendering:c,onClick:f?t=>f(t,e):void 0})}),Co=e=>e.nodes.map(e=>e.id),Cs=e=>e instanceof Function?e:()=>e,Cl=(0,_.memo)(function({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:r,nodeBorderRadius:i,nodeStrokeWidth:a,shapeRendering:o,NodeComponent:s,onClick:l}){let{node:u,x:d,y:c,width:m,height:f}=E3(t=>{let n=t.nodeLookup.get(e);if(!n)return{node:void 0,x:0,y:0,width:0,height:0};let r=n.internals.userNode,{x:i,y:a}=n.internals.positionAbsolute,{width:o,height:s}=z0(r);return{node:r,x:i,y:a,width:o,height:s}},E4);return u&&!u.hidden&&z1(u)?(0,b.jsx)(s,{x:d,y:c,width:m,height:f,style:u.style,selected:!!u.selected,className:r(u),color:t(u),borderRadius:i,strokeColor:n(u),strokeWidth:a,shapeRendering:o,onClick:l,id:u.id}):null});var Cu=(0,_.memo)(function({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:i,nodeComponent:a=Ca,onClick:o}){let s=E3(Co,E4),l=Cs(t),u=Cs(e),d=Cs(n),c="u"<typeof window||window.chrome?"crispEdges":"geometricPrecision";return(0,b.jsx)(b.Fragment,{children:s.map(e=>(0,b.jsx)(Cl,{id:e,nodeColorFunc:l,nodeStrokeColorFunc:u,nodeClassNameFunc:d,nodeBorderRadius:r,nodeStrokeWidth:i,NodeComponent:a,onClick:o,shapeRendering:c},e))})});let Cd=e=>!e.hidden,Cc=e=>{let t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?zF(zj(e.nodeLookup,{filter:Cd}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}};function Cm({style:e,className:t,nodeStrokeColor:n,nodeColor:r,nodeClassName:i="",nodeBorderRadius:a=5,nodeStrokeWidth:o,nodeComponent:s,bgColor:l,maskColor:u,maskStrokeColor:d,maskStrokeWidth:c,position:m="bottom-right",onClick:f,onNodeClick:p,pannable:h=!1,zoomable:g=!1,ariaLabel:v,inversePan:x,zoomStep:y=1,offsetScale:$=5}){let w=E9(),k=(0,_.useRef)(null),{boundingRect:S,viewBB:I,rfId:j,panZoom:N,translateExtent:z,flowWidth:E,flowHeight:O,ariaLabelConfig:T}=E3(Cc,E4),C=e?.width??200,D=e?.height??150,U=Math.max(S.width/C,S.height/D),P=U*C,Z=U*D,A=$*U,R=S.x-(P-S.width)/2-A,L=S.y-(Z-S.height)/2-A,M=P+2*A,F=Z+2*A,B=`react-flow__minimap-desc-${j}`,W=(0,_.useRef)(0),H=(0,_.useRef)();W.current=U,(0,_.useEffect)(()=>{if(k.current&&N)return H.current=function({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){let i=jE(e);return{update:function({translateExtent:e,width:a,height:o,zoomStep:s=1,pannable:l=!0,zoomable:u=!0,inversePan:d=!1}){let c=[0,0],m=zg().on("start",e=>{("mousedown"===e.sourceEvent.type||"touchstart"===e.sourceEvent.type)&&(c=[e.sourceEvent.clientX??e.sourceEvent.touches[0].clientX,e.sourceEvent.clientY??e.sourceEvent.touches[0].clientY])}).on("zoom",l?i=>{let s=n();if("mousemove"!==i.sourceEvent.type&&"touchmove"!==i.sourceEvent.type||!t)return;let l=[i.sourceEvent.clientX??i.sourceEvent.touches[0].clientX,i.sourceEvent.clientY??i.sourceEvent.touches[0].clientY],u=[l[0]-c[0],l[1]-c[1]];c=l;let m=r()*Math.max(s[2],Math.log(s[2]))*(d?-1:1),f={x:s[0]-u[0]*m,y:s[1]-u[1]*m};t.setViewportConstrained({x:f.x,y:f.y,zoom:s[2]},[[0,0],[a,o]],e)}:null).on("zoom.wheel",u?e=>{if("wheel"!==e.sourceEvent.type||!t)return;let r=n(),i=e.sourceEvent.ctrlKey&&zX()?10:1,a=-e.sourceEvent.deltaY*(1===e.sourceEvent.deltaMode?.05:e.sourceEvent.deltaMode?1:.002)*s,o=r[2]*Math.pow(2,a*i);t.scaleTo(o)}:null);i.call(m,{})},destroy:function(){i.on("zoom",null)},pointer:jO}}({domNode:k.current,panZoom:N,getTransform:()=>w.getState().transform,getViewScale:()=>W.current}),()=>{H.current?.destroy()}},[N]),(0,_.useEffect)(()=>{H.current?.update({translateExtent:z,width:E,height:O,inversePan:x,pannable:h,zoomStep:y,zoomable:g})},[h,g,x,y,z,E,O]);let V=f?e=>{let[t,n]=H.current?.pointer(e)||[0,0];f(e,{x:t,y:n})}:void 0,J=p?(0,_.useCallback)((e,t)=>{p(e,w.getState().nodeLookup.get(t).internals.userNode)},[]):void 0,G=v??T["minimap.ariaLabel"];return(0,b.jsx)(Oo,{position:m,style:{...e,"--xy-minimap-background-color-props":"string"==typeof l?l:void 0,"--xy-minimap-mask-background-color-props":"string"==typeof u?u:void 0,"--xy-minimap-mask-stroke-color-props":"string"==typeof d?d:void 0,"--xy-minimap-mask-stroke-width-props":"number"==typeof c?c*U:void 0,"--xy-minimap-node-background-color-props":"string"==typeof r?r:void 0,"--xy-minimap-node-stroke-color-props":"string"==typeof n?n:void 0,"--xy-minimap-node-stroke-width-props":"number"==typeof o?o:void 0},className:IG(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:(0,b.jsxs)("svg",{width:C,height:D,viewBox:`${R} ${L} ${M} ${F}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":B,ref:k,onClick:V,children:[G&&(0,b.jsx)("title",{id:B,children:G}),(0,b.jsx)(Cu,{onClick:J,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:a,nodeClassName:i,nodeStrokeWidth:o,nodeComponent:s}),(0,b.jsx)("path",{className:"react-flow__minimap-mask",d:`M${R-A},${L-A}h${M+2*A}v${F+2*A}h${-M-2*A}z
78
+ 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]){i(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){i(n);continue}}if(e.metadataRegistry.get(n[0])?.id||r.cycle||r.count>1&&"ref"===e.reused){i(n);continue}}}function $Y(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(null===n.ref)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&&("draft-07"===e.target||"draft-04"===e.target||"openapi-3.0"===e.target)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)"$ref"!==e&&"allOf"!==e&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)"$ref"!==e&&"allOf"!==e&&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)"$ref"!==e&&"allOf"!==e&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if("draft-2020-12"===e.target?i.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===e.target?i.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===e.target?i.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(a[e.defId]=e.def)}e.external||Object.keys(a).length>0&&("draft-2020-12"===e.target?i.$defs=a:i.definitions=a);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t["~standard"],jsonSchema:{input:$Q(t,"input",e.processors),output:$Q(t,"output",e.processors)}},enumerable:!1,writable:!1}),n}catch(e){throw Error("Error converting schema to JSON.")}}e.s(["TimePrecision",0,_$,"_any",0,_B,"_array",0,$h,"_base64",0,_x,"_base64url",0,_y,"_bigint",0,_P,"_boolean",0,_D,"_catch",0,$D,"_check",0,$B,"_cidrv4",0,_g,"_cidrv6",0,_v,"_coercedBigint",0,_Z,"_coercedBoolean",0,_U,"_coercedDate",0,_G,"_coercedNumber",0,_N,"_coercedString",0,b8,"_cuid",0,_l,"_cuid2",0,_u,"_custom",0,$L,"_date",0,_J,"_default",0,$O,"_discriminatedUnion",0,$x,"_e164",0,_b,"_email",0,b7,"_emoji",0,_o,"_endsWith",0,$o,"_enum",0,$k,"_file",0,$j,"_float32",0,_E,"_float64",0,_O,"_gt",0,_X,"_gte",0,_Q,"_guid",0,_e,"_includes",0,$i,"_int",0,_z,"_int32",0,_T,"_int64",0,_A,"_intersection",0,$y,"_ipv4",0,_f,"_ipv6",0,_p,"_isoDate",0,_k,"_isoDateTime",0,_w,"_isoDuration",0,_I,"_isoTime",0,_S,"_jwt",0,__,"_ksuid",0,_m,"_lazy",0,$A,"_length",0,$e,"_literal",0,$I,"_lowercase",0,$n,"_lt",0,_q,"_lte",0,_Y,"_mac",0,_h,"_map",0,$$,"_max",0,_Y,"_maxLength",0,_8,"_maxSize",0,_5,"_mime",0,$l,"_min",0,_Q,"_minLength",0,_7,"_minSize",0,_3,"_multipleOf",0,_2,"_nan",0,_K,"_nanoid",0,_s,"_nativeEnum",0,$S,"_negative",0,_1,"_never",0,_H,"_nonnegative",0,_6,"_nonoptional",0,$T,"_nonpositive",0,_4,"_normalize",0,$d,"_null",0,_F,"_nullable",0,$E,"_number",0,_j,"_optional",0,$z,"_overwrite",0,$u,"_pipe",0,$U,"_positive",0,_0,"_promise",0,$R,"_property",0,$s,"_readonly",0,$P,"_record",0,$_,"_refine",0,$M,"_regex",0,$t,"_set",0,$w,"_size",0,_9,"_slugify",0,$p,"_startsWith",0,$a,"_string",0,b9,"_stringFormat",0,$J,"_stringbool",0,$V,"_success",0,$C,"_superRefine",0,$F,"_symbol",0,_L,"_templateLiteral",0,$Z,"_toLowerCase",0,$m,"_toUpperCase",0,$f,"_transform",0,$N,"_trim",0,$c,"_tuple",0,$b,"_uint32",0,_C,"_uint64",0,_R,"_ulid",0,_d,"_undefined",0,_M,"_union",0,$g,"_unknown",0,_W,"_uppercase",0,$r,"_url",0,_a,"_uuid",0,_t,"_uuidv4",0,_n,"_uuidv6",0,_r,"_uuidv7",0,_i,"_void",0,_V,"_xid",0,_c,"_xor",0,$v,"describe",0,$W,"meta",0,$H],50215);let $X=(e,t={})=>n=>{let r=$G({...n,processors:t});return $K(e,r),$q(r,e),$Y(r,e)},$Q=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=$G({...i??{},target:a,io:t,processors:n});return $K(e,o),$q(o,e),$Y(o,e)};e.s(["createStandardJSONSchemaMethod",0,$Q,"createToJSONSchemaMethod",0,$X,"extractDefs",0,$q,"finalize",0,$Y,"initializeContext",0,$G,"process",0,$K],34966);let $0={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},$1=(e,t,n,r)=>{n.type="string";let{minimum:i,maximum:a,format:o,patterns:s,contentEncoding:l}=e._zod.bag;if("number"==typeof i&&(n.minLength=i),"number"==typeof a&&(n.maxLength=a),o&&(n.format=$0[o]??o,""===n.format&&delete n.format,"time"===o&&delete n.format),l&&(n.contentEncoding=l),s&&s.size>0){let e=[...s];1===e.length?n.pattern=e[0].source:e.length>1&&(n.allOf=[...e.map(e=>({..."draft-07"===t.target||"draft-04"===t.target||"openapi-3.0"===t.target?{type:"string"}:{},pattern:e.source}))])}},$4=(e,t,n,r)=>{let{minimum:i,maximum:a,format:o,multipleOf:s,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;"string"==typeof o&&o.includes("int")?n.type="integer":n.type="number","number"==typeof u&&("draft-04"===t.target||"openapi-3.0"===t.target?(n.minimum=u,n.exclusiveMinimum=!0):n.exclusiveMinimum=u),"number"==typeof i&&(n.minimum=i,"number"==typeof u&&"draft-04"!==t.target&&(u>=i?delete n.minimum:delete n.exclusiveMinimum)),"number"==typeof l&&("draft-04"===t.target||"openapi-3.0"===t.target?(n.maximum=l,n.exclusiveMaximum=!0):n.exclusiveMaximum=l),"number"==typeof a&&(n.maximum=a,"number"==typeof l&&"draft-04"!==t.target&&(l<=a?delete n.maximum:delete n.exclusiveMaximum)),"number"==typeof s&&(n.multipleOf=s)},$6=(e,t,n,r)=>{n.type="boolean"},$2=(e,t,n,r)=>{if("throw"===t.unrepresentable)throw Error("BigInt cannot be represented in JSON Schema")},$5=(e,t,n,r)=>{if("throw"===t.unrepresentable)throw Error("Symbols cannot be represented in JSON Schema")},$3=(e,t,n,r)=>{"openapi-3.0"===t.target?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},$9=(e,t,n,r)=>{if("throw"===t.unrepresentable)throw Error("Undefined cannot be represented in JSON Schema")},$8=(e,t,n,r)=>{if("throw"===t.unrepresentable)throw Error("Void cannot be represented in JSON Schema")},$7=(e,t,n,r)=>{n.not={}},we=(e,t,n,r)=>{},wt=(e,t,n,r)=>{},wn=(e,t,n,r)=>{if("throw"===t.unrepresentable)throw Error("Date cannot be represented in JSON Schema")},wr=(e,t,n,r)=>{let i=vt(e._zod.def.entries);i.every(e=>"number"==typeof e)&&(n.type="number"),i.every(e=>"string"==typeof e)&&(n.type="string"),n.enum=i},wi=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(void 0===e){if("throw"===t.unrepresentable)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if("bigint"==typeof e)if("throw"===t.unrepresentable)throw Error("BigInt literals cannot be represented in JSON Schema");else a.push(Number(e));else a.push(e);if(0===a.length);else if(1===a.length){let e=a[0];n.type=null===e?"null":typeof e,"draft-04"===t.target||"openapi-3.0"===t.target?n.enum=[e]:n.const=e}else a.every(e=>"number"==typeof e)&&(n.type="number"),a.every(e=>"string"==typeof e)&&(n.type="string"),a.every(e=>"boolean"==typeof e)&&(n.type="boolean"),a.every(e=>null===e)&&(n.type="null"),n.enum=a},wa=(e,t,n,r)=>{if("throw"===t.unrepresentable)throw Error("NaN cannot be represented in JSON Schema")},wo=(e,t,n,r)=>{let i=e._zod.pattern;if(!i)throw Error("Pattern not found in template literal");n.type="string",n.pattern=i.source},ws=(e,t,n,r)=>{let i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:o,mime:s}=e._zod.bag;void 0!==a&&(i.minLength=a),void 0!==o&&(i.maxLength=o),s?1===s.length?(i.contentMediaType=s[0],Object.assign(n,i)):(Object.assign(n,i),n.anyOf=s.map(e=>({contentMediaType:e}))):Object.assign(n,i)},wl=(e,t,n,r)=>{n.type="boolean"},wu=(e,t,n,r)=>{if("throw"===t.unrepresentable)throw Error("Custom types cannot be represented in JSON Schema")},wd=(e,t,n,r)=>{if("throw"===t.unrepresentable)throw Error("Function types cannot be represented in JSON Schema")},wc=(e,t,n,r)=>{if("throw"===t.unrepresentable)throw Error("Transforms cannot be represented in JSON Schema")},wm=(e,t,n,r)=>{if("throw"===t.unrepresentable)throw Error("Map cannot be represented in JSON Schema")},wf=(e,t,n,r)=>{if("throw"===t.unrepresentable)throw Error("Set cannot be represented in JSON Schema")},wp=(e,t,n,r)=>{let i=e._zod.def,{minimum:a,maximum:o}=e._zod.bag;"number"==typeof a&&(n.minItems=a),"number"==typeof o&&(n.maxItems=o),n.type="array",n.items=$K(i.element,t,{...r,path:[...r.path,"items"]})},wh=(e,t,n,r)=>{let i=e._zod.def;n.type="object",n.properties={};let a=i.shape;for(let e in a)n.properties[e]=$K(a[e],t,{...r,path:[...r.path,"properties",e]});let o=new Set([...new Set(Object.keys(a))].filter(e=>{let n=i.shape[e]._zod;return"input"===t.io?void 0===n.optin:void 0===n.optout}));o.size>0&&(n.required=Array.from(o)),i.catchall?._zod.def.type==="never"?n.additionalProperties=!1:i.catchall?i.catchall&&(n.additionalProperties=$K(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):"output"===t.io&&(n.additionalProperties=!1)},wg=(e,t,n,r)=>{let i=e._zod.def,a=!1===i.inclusive,o=i.options.map((e,n)=>$K(e,t,{...r,path:[...r.path,a?"oneOf":"anyOf",n]}));a?n.oneOf=o:n.anyOf=o},wv=(e,t,n,r)=>{let i=e._zod.def,a=$K(i.left,t,{...r,path:[...r.path,"allOf",0]}),o=$K(i.right,t,{...r,path:[...r.path,"allOf",1]}),s=e=>"allOf"in e&&1===Object.keys(e).length;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},wx=(e,t,n,r)=>{let i=e._zod.def;n.type="array";let a="draft-2020-12"===t.target?"prefixItems":"items",o="draft-2020-12"===t.target||"openapi-3.0"===t.target?"items":"additionalItems",s=i.items.map((e,n)=>$K(e,t,{...r,path:[...r.path,a,n]})),l=i.rest?$K(i.rest,t,{...r,path:[...r.path,o,..."openapi-3.0"===t.target?[i.items.length]:[]]}):null;"draft-2020-12"===t.target?(n.prefixItems=s,l&&(n.items=l)):"openapi-3.0"===t.target?(n.items={anyOf:s},l&&n.items.anyOf.push(l),n.minItems=s.length,l||(n.maxItems=s.length)):(n.items=s,l&&(n.additionalItems=l));let{minimum:u,maximum:d}=e._zod.bag;"number"==typeof u&&(n.minItems=u),"number"==typeof d&&(n.maxItems=d)},wy=(e,t,n,r)=>{let i=e._zod.def;n.type="object";let a=i.keyType,o=a._zod.bag,s=o?.patterns;if("loose"===i.mode&&s&&s.size>0){let e=$K(i.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});for(let t of(n.patternProperties={},s))n.patternProperties[t.source]=e}else("draft-07"===t.target||"draft-2020-12"===t.target)&&(n.propertyNames=$K(i.keyType,t,{...r,path:[...r.path,"propertyNames"]})),n.additionalProperties=$K(i.valueType,t,{...r,path:[...r.path,"additionalProperties"]});let l=a._zod.values;if(l){let e=[...l].filter(e=>"string"==typeof e||"number"==typeof e);e.length>0&&(n.required=e)}},wb=(e,t,n,r)=>{let i=e._zod.def,a=$K(i.innerType,t,r),o=t.seen.get(e);"openapi-3.0"===t.target?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:"null"}]},w_=(e,t,n,r)=>{let i=e._zod.def;$K(i.innerType,t,r),t.seen.get(e).ref=i.innerType},w$=(e,t,n,r)=>{let i=e._zod.def;$K(i.innerType,t,r),t.seen.get(e).ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},ww=(e,t,n,r)=>{let i=e._zod.def;$K(i.innerType,t,r),t.seen.get(e).ref=i.innerType,"input"===t.io&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},wk=(e,t,n,r)=>{let i,a=e._zod.def;$K(a.innerType,t,r),t.seen.get(e).ref=a.innerType;try{i=a.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}n.default=i},wS=(e,t,n,r)=>{let i=e._zod.def,a="input"===t.io?"transform"===i.in._zod.def.type?i.out:i.in:i.out;$K(a,t,r),t.seen.get(e).ref=a},wI=(e,t,n,r)=>{let i=e._zod.def;$K(i.innerType,t,r),t.seen.get(e).ref=i.innerType,n.readOnly=!0},wj=(e,t,n,r)=>{let i=e._zod.def;$K(i.innerType,t,r),t.seen.get(e).ref=i.innerType},wN=(e,t,n,r)=>{let i=e._zod.def;$K(i.innerType,t,r),t.seen.get(e).ref=i.innerType},wz=(e,t,n,r)=>{let i=e._zod.innerType;$K(i,t,r),t.seen.get(e).ref=i},wE={string:$1,number:$4,boolean:$6,bigint:$2,symbol:$5,null:$3,undefined:$9,void:$8,never:$7,any:we,unknown:wt,date:wn,enum:wr,literal:wi,nan:wa,template_literal:wo,file:ws,success:wl,custom:wu,function:wd,transform:wc,map:wm,set:wf,array:wp,object:wh,union:wg,intersection:wv,tuple:wx,record:wy,nullable:wb,nonoptional:w_,default:w$,prefault:ww,catch:wk,pipe:wS,readonly:wI,promise:wj,optional:wN,lazy:wz};function wO(e,t){if("_idmap"in e){let n=$G({...t,processors:wE}),r={};for(let t of e._idmap.entries()){let[e,r]=t;$K(r,n)}let i={};for(let a of(n.external={registry:e,uri:t?.uri,defs:r},e._idmap.entries())){let[e,t]=a;$q(n,t),i[e]=$Y(n,t)}return Object.keys(r).length>0&&(i.__shared={["draft-2020-12"===n.target?"$defs":"definitions"]:r}),{schemas:i}}let n=$G({...t,processors:wE});return $K(e,n),$q(n,e),$Y(n,e)}e.s([],92135),e.s(["ZodAny",()=>Si,"ZodArray",()=>Sp,"ZodBase64",()=>kD,"ZodBase64URL",()=>kP,"ZodBigInt",()=>k6,"ZodBigIntFormat",()=>k5,"ZodBoolean",()=>k1,"ZodCIDRv4",()=>kE,"ZodCIDRv6",()=>kT,"ZodCUID",()=>kp,"ZodCUID2",()=>kg,"ZodCatch",()=>S7,"ZodCodec",()=>Ia,"ZodCustom",()=>Iv,"ZodCustomStringFormat",()=>kF,"ZodDate",()=>Sm,"ZodDefault",()=>S1,"ZodDiscriminatedUnion",()=>SS,"ZodE164",()=>kA,"ZodEmail",()=>w8,"ZodEmoji",()=>kd,"ZodEnum",()=>SR,"ZodExactOptional",()=>Sq,"ZodFile",()=>SW,"ZodFunction",()=>Ih,"ZodGUID",()=>ke,"ZodIPv4",()=>kk,"ZodIPv6",()=>kN,"ZodIntersection",()=>Sj,"ZodJWT",()=>kL,"ZodKSUID",()=>k$,"ZodLazy",()=>Ic,"ZodLiteral",()=>SF,"ZodMAC",()=>kI,"ZodMap",()=>SU,"ZodNaN",()=>It,"ZodNanoID",()=>km,"ZodNever",()=>Sl,"ZodNonOptional",()=>S5,"ZodNull",()=>Sn,"ZodNullable",()=>SX,"ZodNumber",()=>kJ,"ZodNumberFormat",()=>kK,"ZodObject",()=>Sv,"ZodOptional",()=>SG,"ZodPipe",()=>Ir,"ZodPrefault",()=>S6,"ZodPromise",()=>If,"ZodReadonly",()=>Is,"ZodRecord",()=>SO,"ZodSet",()=>SZ,"ZodString",()=>w5,"ZodStringFormat",()=>w9,"ZodSuccess",()=>S9,"ZodSymbol",()=>k8,"ZodTemplateLiteral",()=>Iu,"ZodTransform",()=>SV,"ZodTuple",()=>Sz,"ZodType",()=>w6,"ZodULID",()=>kx,"ZodURL",()=>ks,"ZodUUID",()=>kn,"ZodUndefined",()=>Se,"ZodUnion",()=>S_,"ZodUnknown",()=>So,"ZodVoid",()=>Sd,"ZodXID",()=>kb,"ZodXor",()=>Sw,"_ZodString",()=>w2,"_default",()=>S4,"_function",()=>Ig,"any",()=>Sa,"array",()=>Sh,"base64",()=>kU,"base64url",()=>kZ,"bigint",()=>k2,"boolean",()=>k4,"catch",()=>Ie,"check",()=>Ix,"cidrv4",()=>kO,"cidrv6",()=>kC,"codec",()=>Io,"cuid",()=>kh,"cuid2",()=>kv,"custom",()=>Iy,"date",()=>Sf,"describe",()=>I$,"discriminatedUnion",()=>SI,"e164",()=>kR,"email",()=>w7,"emoji",()=>kc,"enum",()=>SL,"exactOptional",()=>SY,"file",()=>SH,"float32",()=>kY,"float64",()=>kX,"function",()=>Ig,"guid",()=>kt,"hash",()=>kV,"hex",()=>kH,"hostname",()=>kW,"httpUrl",()=>ku,"instanceof",()=>Ik,"int",()=>kq,"int32",()=>kQ,"int64",()=>k3,"intersection",()=>SN,"ipv4",()=>kS,"ipv6",()=>kz,"json",()=>II,"jwt",()=>kM,"keyof",()=>Sg,"ksuid",()=>kw,"lazy",()=>Im,"literal",()=>SB,"looseObject",()=>Sb,"looseRecord",()=>SD,"mac",()=>kj,"map",()=>SP,"meta",()=>Iw,"nan",()=>In,"nanoid",()=>kf,"nativeEnum",()=>SM,"never",()=>Su,"nonoptional",()=>S3,"null",()=>Sr,"nullable",()=>SQ,"nullish",()=>S0,"number",()=>kG,"object",()=>Sx,"optional",()=>SK,"partialRecord",()=>SC,"pipe",()=>Ii,"prefault",()=>S2,"preprocess",()=>Ij,"promise",()=>Ip,"readonly",()=>Il,"record",()=>ST,"refine",()=>Ib,"set",()=>SA,"strictObject",()=>Sy,"string",()=>w3,"stringFormat",()=>kB,"stringbool",()=>IS,"success",()=>S8,"superRefine",()=>I_,"symbol",()=>k7,"templateLiteral",()=>Id,"transform",()=>SJ,"tuple",()=>SE,"uint32",()=>k0,"uint64",()=>k9,"ulid",()=>ky,"undefined",()=>St,"union",()=>S$,"unknown",()=>Ss,"url",()=>kl,"uuid",()=>kr,"uuidv4",()=>ki,"uuidv6",()=>ka,"uuidv7",()=>ko,"void",()=>Sc,"xid",()=>k_,"xor",()=>Sk],62201);var wT=e.i(82358),wT=wT,wC=e.i(22143),wC=wC;e.s([],42332),e.s(["ZodISODate",()=>wP,"ZodISODateTime",()=>wD,"ZodISODuration",()=>wL,"ZodISOTime",()=>wA,"date",()=>wZ,"datetime",()=>wU,"duration",()=>wM,"time",()=>wR],49732);let wD=g5("ZodISODateTime",(e,t)=>{yO.init(e,t),w9.init(e,t)});function wU(e){return _w(wD,e)}let wP=g5("ZodISODate",(e,t)=>{yT.init(e,t),w9.init(e,t)});function wZ(e){return _k(wP,e)}let wA=g5("ZodISOTime",(e,t)=>{yC.init(e,t),w9.init(e,t)});function wR(e){return _S(wA,e)}let wL=g5("ZodISODuration",(e,t)=>{yD.init(e,t),w9.init(e,t)});function wM(e){return _I(wL,e)}let wF=(e,t)=>{vR.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>vF(e,t)},flatten:{value:t=>vM(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,vr,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,vr,2)}},isEmpty:{get:()=>0===e.issues.length}})},wB=g5("ZodError",wF),wW=g5("ZodError",wF,{Parent:Error});e.s(["ZodError",0,wB,"ZodRealError",0,wW],89282);let wH=vV(wW),wV=vG(wW),wJ=vq(wW),wG=vX(wW),wK=v0(wW),wq=v4(wW),wY=v2(wW),wX=v3(wW),wQ=v8(wW),w0=xe(wW),w1=xn(wW),w4=xi(wW);e.s(["decode",0,wq,"decodeAsync",0,wX,"encode",0,wK,"encodeAsync",0,wY,"parse",0,wH,"parseAsync",0,wV,"safeDecode",0,w0,"safeDecodeAsync",0,w4,"safeEncode",0,wQ,"safeEncodeAsync",0,w1,"safeParse",0,wJ,"safeParseAsync",0,wG],364);let w6=g5("ZodType",(e,t)=>(yv.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:$Q(e,"input"),output:$Q(e,"output")}}),e.toJSONSchema=$X(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(wC.mergeDefs(t,{checks:[...t.checks??[],...n.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]}),{parent:!0}),e.with=e.check,e.clone=(t,n)=>v$(e,t,n),e.brand=()=>e,e.register=(t,n)=>(t.add(e,n),e),e.parse=(t,n)=>wH(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>wJ(e,t,n),e.parseAsync=async(t,n)=>wV(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>wG(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>wK(e,t,n),e.decode=(t,n)=>wq(e,t,n),e.encodeAsync=async(t,n)=>wY(e,t,n),e.decodeAsync=async(t,n)=>wX(e,t,n),e.safeEncode=(t,n)=>wQ(e,t,n),e.safeDecode=(t,n)=>w0(e,t,n),e.safeEncodeAsync=async(t,n)=>w1(e,t,n),e.safeDecodeAsync=async(t,n)=>w4(e,t,n),e.refine=(t,n)=>e.check(Ib(t,n)),e.superRefine=t=>e.check(I_(t)),e.overwrite=t=>e.check($u(t)),e.optional=()=>SK(e),e.exactOptional=()=>SY(e),e.nullable=()=>SQ(e),e.nullish=()=>SK(SQ(e)),e.nonoptional=t=>S3(e,t),e.array=()=>Sh(e),e.or=t=>S$([e,t]),e.and=t=>SN(e,t),e.transform=t=>Ii(e,SJ(t)),e.default=t=>S4(e,t),e.prefault=t=>S2(e,t),e.catch=t=>Ie(e,t),e.pipe=t=>Ii(e,t),e.readonly=()=>Il(e),e.describe=t=>{let n=e.clone();return b3.add(n,{description:t}),n},Object.defineProperty(e,"description",{get:()=>b3.get(e)?.description,configurable:!0}),e.meta=(...t)=>{if(0===t.length)return b3.get(e);let n=e.clone();return b3.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),w2=g5("_ZodString",(e,t)=>{yx.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$1(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check($t(...t)),e.includes=(...t)=>e.check($i(...t)),e.startsWith=(...t)=>e.check($a(...t)),e.endsWith=(...t)=>e.check($o(...t)),e.min=(...t)=>e.check(_7(...t)),e.max=(...t)=>e.check(_8(...t)),e.length=(...t)=>e.check($e(...t)),e.nonempty=(...t)=>e.check(_7(1,...t)),e.lowercase=t=>e.check($n(t)),e.uppercase=t=>e.check($r(t)),e.trim=()=>e.check($c()),e.normalize=(...t)=>e.check($d(...t)),e.toLowerCase=()=>e.check($m()),e.toUpperCase=()=>e.check($f()),e.slugify=()=>e.check($p())}),w5=g5("ZodString",(e,t)=>{yx.init(e,t),w2.init(e,t),e.email=t=>e.check(b7(w8,t)),e.url=t=>e.check(_a(ks,t)),e.jwt=t=>e.check(__(kL,t)),e.emoji=t=>e.check(_o(kd,t)),e.guid=t=>e.check(_e(ke,t)),e.uuid=t=>e.check(_t(kn,t)),e.uuidv4=t=>e.check(_n(kn,t)),e.uuidv6=t=>e.check(_r(kn,t)),e.uuidv7=t=>e.check(_i(kn,t)),e.nanoid=t=>e.check(_s(km,t)),e.guid=t=>e.check(_e(ke,t)),e.cuid=t=>e.check(_l(kp,t)),e.cuid2=t=>e.check(_u(kg,t)),e.ulid=t=>e.check(_d(kx,t)),e.base64=t=>e.check(_x(kD,t)),e.base64url=t=>e.check(_y(kP,t)),e.xid=t=>e.check(_c(kb,t)),e.ksuid=t=>e.check(_m(k$,t)),e.ipv4=t=>e.check(_f(kk,t)),e.ipv6=t=>e.check(_p(kN,t)),e.cidrv4=t=>e.check(_g(kE,t)),e.cidrv6=t=>e.check(_v(kT,t)),e.e164=t=>e.check(_b(kA,t)),e.datetime=t=>e.check(wU(t)),e.date=t=>e.check(wZ(t)),e.time=t=>e.check(wR(t)),e.duration=t=>e.check(wM(t))});function w3(e){return b9(w5,e)}let w9=g5("ZodStringFormat",(e,t)=>{yy.init(e,t),w2.init(e,t)}),w8=g5("ZodEmail",(e,t)=>{y$.init(e,t),w9.init(e,t)});function w7(e){return b7(w8,e)}let ke=g5("ZodGUID",(e,t)=>{yb.init(e,t),w9.init(e,t)});function kt(e){return _e(ke,e)}let kn=g5("ZodUUID",(e,t)=>{y_.init(e,t),w9.init(e,t)});function kr(e){return _t(kn,e)}function ki(e){return _n(kn,e)}function ka(e){return _r(kn,e)}function ko(e){return _i(kn,e)}let ks=g5("ZodURL",(e,t)=>{yw.init(e,t),w9.init(e,t)});function kl(e){return _a(ks,e)}function ku(e){return _a(ks,{protocol:/^https?$/,hostname:wT.domain,...wC.normalizeParams(e)})}let kd=g5("ZodEmoji",(e,t)=>{yk.init(e,t),w9.init(e,t)});function kc(e){return _o(kd,e)}let km=g5("ZodNanoID",(e,t)=>{yS.init(e,t),w9.init(e,t)});function kf(e){return _s(km,e)}let kp=g5("ZodCUID",(e,t)=>{yI.init(e,t),w9.init(e,t)});function kh(e){return _l(kp,e)}let kg=g5("ZodCUID2",(e,t)=>{yj.init(e,t),w9.init(e,t)});function kv(e){return _u(kg,e)}let kx=g5("ZodULID",(e,t)=>{yN.init(e,t),w9.init(e,t)});function ky(e){return _d(kx,e)}let kb=g5("ZodXID",(e,t)=>{yz.init(e,t),w9.init(e,t)});function k_(e){return _c(kb,e)}let k$=g5("ZodKSUID",(e,t)=>{yE.init(e,t),w9.init(e,t)});function kw(e){return _m(k$,e)}let kk=g5("ZodIPv4",(e,t)=>{yU.init(e,t),w9.init(e,t)});function kS(e){return _f(kk,e)}let kI=g5("ZodMAC",(e,t)=>{yZ.init(e,t),w9.init(e,t)});function kj(e){return _h(kI,e)}let kN=g5("ZodIPv6",(e,t)=>{yP.init(e,t),w9.init(e,t)});function kz(e){return _p(kN,e)}let kE=g5("ZodCIDRv4",(e,t)=>{yA.init(e,t),w9.init(e,t)});function kO(e){return _g(kE,e)}let kT=g5("ZodCIDRv6",(e,t)=>{yR.init(e,t),w9.init(e,t)});function kC(e){return _v(kT,e)}let kD=g5("ZodBase64",(e,t)=>{yM.init(e,t),w9.init(e,t)});function kU(e){return _x(kD,e)}let kP=g5("ZodBase64URL",(e,t)=>{yB.init(e,t),w9.init(e,t)});function kZ(e){return _y(kP,e)}let kA=g5("ZodE164",(e,t)=>{yW.init(e,t),w9.init(e,t)});function kR(e){return _b(kA,e)}let kL=g5("ZodJWT",(e,t)=>{yV.init(e,t),w9.init(e,t)});function kM(e){return __(kL,e)}let kF=g5("ZodCustomStringFormat",(e,t)=>{yJ.init(e,t),w9.init(e,t)});function kB(e,t,n={}){return $J(kF,e,t,n)}function kW(e){return $J(kF,"hostname",wT.hostname,e)}function kH(e){return $J(kF,"hex",wT.hex,e)}function kV(e,t){let n=t?.enc??"hex",r=`${e}_${n}`,i=wT[r];if(!i)throw Error(`Unrecognized hash format: ${r}`);return $J(kF,r,i,t)}let kJ=g5("ZodNumber",(e,t)=>{yG.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$4(e,t,n,r),e.gt=(t,n)=>e.check(_X(t,n)),e.gte=(t,n)=>e.check(_Q(t,n)),e.min=(t,n)=>e.check(_Q(t,n)),e.lt=(t,n)=>e.check(_q(t,n)),e.lte=(t,n)=>e.check(_Y(t,n)),e.max=(t,n)=>e.check(_Y(t,n)),e.int=t=>e.check(kq(t)),e.safe=t=>e.check(kq(t)),e.positive=t=>e.check(_X(0,t)),e.nonnegative=t=>e.check(_Q(0,t)),e.negative=t=>e.check(_q(0,t)),e.nonpositive=t=>e.check(_Y(0,t)),e.multipleOf=(t,n)=>e.check(_2(t,n)),e.step=(t,n)=>e.check(_2(t,n)),e.finite=()=>e;let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function kG(e){return _j(kJ,e)}let kK=g5("ZodNumberFormat",(e,t)=>{yK.init(e,t),kJ.init(e,t)});function kq(e){return _z(kK,e)}function kY(e){return _E(kK,e)}function kX(e){return _O(kK,e)}function kQ(e){return _T(kK,e)}function k0(e){return _C(kK,e)}let k1=g5("ZodBoolean",(e,t)=>{yq.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$6(e,t,n,r)});function k4(e){return _D(k1,e)}let k6=g5("ZodBigInt",(e,t)=>{yY.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$2(e,t,n,r),e.gte=(t,n)=>e.check(_Q(t,n)),e.min=(t,n)=>e.check(_Q(t,n)),e.gt=(t,n)=>e.check(_X(t,n)),e.gte=(t,n)=>e.check(_Q(t,n)),e.min=(t,n)=>e.check(_Q(t,n)),e.lt=(t,n)=>e.check(_q(t,n)),e.lte=(t,n)=>e.check(_Y(t,n)),e.max=(t,n)=>e.check(_Y(t,n)),e.positive=t=>e.check(_X(BigInt(0),t)),e.negative=t=>e.check(_q(BigInt(0),t)),e.nonpositive=t=>e.check(_Y(BigInt(0),t)),e.nonnegative=t=>e.check(_Q(BigInt(0),t)),e.multipleOf=(t,n)=>e.check(_2(t,n));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function k2(e){return _P(k6,e)}let k5=g5("ZodBigIntFormat",(e,t)=>{yX.init(e,t),k6.init(e,t)});function k3(e){return _A(k5,e)}function k9(e){return _R(k5,e)}let k8=g5("ZodSymbol",(e,t)=>{yQ.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$5(e,t,n,r)});function k7(e){return _L(k8,e)}let Se=g5("ZodUndefined",(e,t)=>{y0.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$9(e,t,n,r)});function St(e){return _M(Se,e)}let Sn=g5("ZodNull",(e,t)=>{y1.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$3(e,t,n,r)});function Sr(e){return _F(Sn,e)}let Si=g5("ZodAny",(e,t)=>{y4.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>we(e,t,n,r)});function Sa(){return _B(Si)}let So=g5("ZodUnknown",(e,t)=>{y6.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wt(e,t,n,r)});function Ss(){return _W(So)}let Sl=g5("ZodNever",(e,t)=>{y2.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$7(e,t,n,r)});function Su(e){return _H(Sl,e)}let Sd=g5("ZodVoid",(e,t)=>{y5.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$8(e,t,n,r)});function Sc(e){return _V(Sd,e)}let Sm=g5("ZodDate",(e,t)=>{y3.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wn(e,t,n,r),e.min=(t,n)=>e.check(_Q(t,n)),e.max=(t,n)=>e.check(_Y(t,n));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function Sf(e){return _J(Sm,e)}let Sp=g5("ZodArray",(e,t)=>{y8.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wp(e,t,n,r),e.element=t.element,e.min=(t,n)=>e.check(_7(t,n)),e.nonempty=t=>e.check(_7(1,t)),e.max=(t,n)=>e.check(_8(t,n)),e.length=(t,n)=>e.check($e(t,n)),e.unwrap=()=>e.element});function Sh(e,t){return $h(Sp,e,t)}function Sg(e){return SL(Object.keys(e._zod.def.shape))}let Sv=g5("ZodObject",(e,t)=>{br.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wh(e,t,n,r),wC.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>SL(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Ss()}),e.loose=()=>e.clone({...e._zod.def,catchall:Ss()}),e.strict=()=>e.clone({...e._zod.def,catchall:Su()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>wC.extend(e,t),e.safeExtend=t=>wC.safeExtend(e,t),e.merge=t=>wC.merge(e,t),e.pick=t=>wC.pick(e,t),e.omit=t=>wC.omit(e,t),e.partial=(...t)=>wC.partial(SG,e,t[0]),e.required=(...t)=>wC.required(S5,e,t[0])});function Sx(e,t){return new Sv({type:"object",shape:e??{},...wC.normalizeParams(t)})}function Sy(e,t){return new Sv({type:"object",shape:e,catchall:Su(),...wC.normalizeParams(t)})}function Sb(e,t){return new Sv({type:"object",shape:e,catchall:Ss(),...wC.normalizeParams(t)})}let S_=g5("ZodUnion",(e,t)=>{ba.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wg(e,t,n,r),e.options=t.options});function S$(e,t){return new S_({type:"union",options:e,...wC.normalizeParams(t)})}let Sw=g5("ZodXor",(e,t)=>{S_.init(e,t),bs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wg(e,t,n,r),e.options=t.options});function Sk(e,t){return new Sw({type:"union",options:e,inclusive:!1,...wC.normalizeParams(t)})}let SS=g5("ZodDiscriminatedUnion",(e,t)=>{S_.init(e,t),bl.init(e,t)});function SI(e,t,n){return new SS({type:"union",options:t,discriminator:e,...wC.normalizeParams(n)})}let Sj=g5("ZodIntersection",(e,t)=>{bu.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wv(e,t,n,r)});function SN(e,t){return new Sj({type:"intersection",left:e,right:t})}let Sz=g5("ZodTuple",(e,t)=>{bc.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wx(e,t,n,r),e.rest=t=>e.clone({...e._zod.def,rest:t})});function SE(e,t,n){let r=t instanceof yv,i=r?n:t;return new Sz({type:"tuple",items:e,rest:r?t:null,...wC.normalizeParams(i)})}let SO=g5("ZodRecord",(e,t)=>{bf.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wy(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function ST(e,t,n){return new SO({type:"record",keyType:e,valueType:t,...wC.normalizeParams(n)})}function SC(e,t,n){let r=v$(e);return r._zod.values=void 0,new SO({type:"record",keyType:r,valueType:t,...wC.normalizeParams(n)})}function SD(e,t,n){return new SO({type:"record",keyType:e,valueType:t,mode:"loose",...wC.normalizeParams(n)})}let SU=g5("ZodMap",(e,t)=>{bp.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wm(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...t)=>e.check(_3(...t)),e.nonempty=t=>e.check(_3(1,t)),e.max=(...t)=>e.check(_5(...t)),e.size=(...t)=>e.check(_9(...t))});function SP(e,t,n){return new SU({type:"map",keyType:e,valueType:t,...wC.normalizeParams(n)})}let SZ=g5("ZodSet",(e,t)=>{bg.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wf(e,t,n,r),e.min=(...t)=>e.check(_3(...t)),e.nonempty=t=>e.check(_3(1,t)),e.max=(...t)=>e.check(_5(...t)),e.size=(...t)=>e.check(_9(...t))});function SA(e,t){return new SZ({type:"set",valueType:e,...wC.normalizeParams(t)})}let SR=g5("ZodEnum",(e,t)=>{bx.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wr(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new SR({...t,checks:[],...wC.normalizeParams(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 SR({...t,checks:[],...wC.normalizeParams(r),entries:i})}});function SL(e,t){return new SR({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...wC.normalizeParams(t)})}function SM(e,t){return new SR({type:"enum",entries:e,...wC.normalizeParams(t)})}let SF=g5("ZodLiteral",(e,t)=>{by.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wi(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 SB(e,t){return new SF({type:"literal",values:Array.isArray(e)?e:[e],...wC.normalizeParams(t)})}let SW=g5("ZodFile",(e,t)=>{bb.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ws(e,t,n,r),e.min=(t,n)=>e.check(_3(t,n)),e.max=(t,n)=>e.check(_5(t,n)),e.mime=(t,n)=>e.check($l(Array.isArray(t)?t:[t],n))});function SH(e){return $j(SW,e)}let SV=g5("ZodTransform",(e,t)=>{b_.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wc(e,t,n,r),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new g8(e.constructor.name);n.addIssue=r=>{"string"==typeof r?n.issues.push(wC.issue(r,n.value,t)):(r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=n.value),r.inst??(r.inst=e),n.issues.push(wC.issue(r)))};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function SJ(e){return new SV({type:"transform",transform:e})}let SG=g5("ZodOptional",(e,t)=>{bw.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wN(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function SK(e){return new SG({type:"optional",innerType:e})}let Sq=g5("ZodExactOptional",(e,t)=>{bk.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wN(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function SY(e){return new Sq({type:"optional",innerType:e})}let SX=g5("ZodNullable",(e,t)=>{bS.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wb(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function SQ(e){return new SX({type:"nullable",innerType:e})}function S0(e){return SK(SQ(e))}let S1=g5("ZodDefault",(e,t)=>{bI.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>w$(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function S4(e,t){return new S1({type:"default",innerType:e,get defaultValue(){return"function"==typeof t?t():wC.shallowClone(t)}})}let S6=g5("ZodPrefault",(e,t)=>{bN.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ww(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function S2(e,t){return new S6({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof t?t():wC.shallowClone(t)}})}let S5=g5("ZodNonOptional",(e,t)=>{bz.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>w_(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function S3(e,t){return new S5({type:"nonoptional",innerType:e,...wC.normalizeParams(t)})}let S9=g5("ZodSuccess",(e,t)=>{bO.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wl(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function S8(e){return new S9({type:"success",innerType:e})}let S7=g5("ZodCatch",(e,t)=>{bT.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wk(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Ie(e,t){return new S7({type:"catch",innerType:e,catchValue:"function"==typeof t?t:()=>t})}let It=g5("ZodNaN",(e,t)=>{bC.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wa(e,t,n,r)});function In(e){return _K(It,e)}let Ir=g5("ZodPipe",(e,t)=>{bD.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wS(e,t,n,r),e.in=t.in,e.out=t.out});function Ii(e,t){return new Ir({type:"pipe",in:e,out:t})}let Ia=g5("ZodCodec",(e,t)=>{Ir.init(e,t),bP.init(e,t)});function Io(e,t,n){return new Ia({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}let Is=g5("ZodReadonly",(e,t)=>{bR.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wI(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Il(e){return new Is({type:"readonly",innerType:e})}let Iu=g5("ZodTemplateLiteral",(e,t)=>{bM.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wo(e,t,n,r)});function Id(e,t){return new Iu({type:"template_literal",parts:e,...wC.normalizeParams(t)})}let Ic=g5("ZodLazy",(e,t)=>{bW.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wz(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function Im(e){return new Ic({type:"lazy",getter:e})}let If=g5("ZodPromise",(e,t)=>{bB.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wj(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ip(e){return new If({type:"promise",innerType:e})}let Ih=g5("ZodFunction",(e,t)=>{bF.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wd(e,t,n,r)});function Ig(e){return new Ih({type:"function",input:Array.isArray(e?.input)?SE(e?.input):e?.input??Sh(Ss()),output:e?.output??Ss()})}let Iv=g5("ZodCustom",(e,t)=>{bH.init(e,t),w6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wu(e,t,n,r)});function Ix(e){let t=new x1({check:"custom"});return t._zod.check=e,t}function Iy(e,t){return $L(Iv,e??(()=>!0),t)}function Ib(e,t={}){return $M(Iv,e,t)}function I_(e){return $F(e)}let I$=$W,Iw=$H;function Ik(e,t={}){let n=new Iv({type:"custom",check:"custom",fn:t=>t instanceof e,abort:!0,...wC.normalizeParams(t)});return n._zod.bag.Class=e,n._zod.check=t=>{t.value instanceof e||t.issues.push({code:"invalid_type",expected:e.name,input:t.value,inst:n,path:[...n._zod.def.path??[]]})},n}let IS=(...e)=>$V({Codec:Ia,Boolean:k1,String:w5},...e);function II(e){let t=Im(()=>S$([w3(e),kG(),k4(),Sr(),Sh(t),ST(w3(),t)]));return t}function Ij(e,t){return Ii(SJ(e),t)}let IN={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function Iz(e){ve({customError:e})}function IE(){return ve().customError}jq||(jq={}),e.s(["ZodFirstPartyTypeKind",0,jq,"ZodIssueCode",0,IN,"getErrorMap",0,IE,"setErrorMap",0,Iz],6034),e.i(42332),e.s(["endsWith",0,$o,"gt",0,_X,"gte",0,_Q,"includes",0,$i,"length",0,$e,"lowercase",0,$n,"lt",0,_q,"lte",0,_Y,"maxLength",0,_8,"maxSize",0,_5,"mime",0,$l,"minLength",0,_7,"minSize",0,_3,"multipleOf",0,_2,"negative",0,_1,"nonnegative",0,_6,"nonpositive",0,_4,"normalize",0,$d,"overwrite",0,$u,"positive",0,_0,"property",0,$s,"regex",0,$t,"size",0,_9,"slugify",0,$p,"startsWith",0,$a,"toLowerCase",0,$m,"toUpperCase",0,$f,"trim",0,$c,"uppercase",0,$r],30421);var IO=e.i(30421),IT=e.i(49732);let IC={...e.i(62201),...IO,iso:IT},ID=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);e.s(["bigint",0,function(e){return _Z(k6,e)},"boolean",0,function(e){return _U(k1,e)},"date",0,function(e){return _G(Sm,e)},"number",0,function(e){return _N(kJ,e)},"string",0,function(e){return b8(w5,e)}],13657),ve(bG()),e.s([],98821),e.i(98821),e.i(92135),e.i(97753),e.i(3108),e.i(74969),e.i(76094),e.s(["$ZodAny",0,y4,"$ZodArray",0,y8,"$ZodBase64",0,yM,"$ZodBase64URL",0,yB,"$ZodBigInt",0,yY,"$ZodBigIntFormat",0,yX,"$ZodBoolean",0,yq,"$ZodCIDRv4",0,yA,"$ZodCIDRv6",0,yR,"$ZodCUID",0,yI,"$ZodCUID2",0,yj,"$ZodCatch",0,bT,"$ZodCodec",0,bP,"$ZodCustom",0,bH,"$ZodCustomStringFormat",0,yJ,"$ZodDate",0,y3,"$ZodDefault",0,bI,"$ZodDiscriminatedUnion",0,bl,"$ZodE164",0,yW,"$ZodEmail",0,y$,"$ZodEmoji",0,yk,"$ZodEnum",0,bx,"$ZodExactOptional",0,bk,"$ZodFile",0,bb,"$ZodFunction",0,bF,"$ZodGUID",0,yb,"$ZodIPv4",0,yU,"$ZodIPv6",0,yP,"$ZodISODate",0,yT,"$ZodISODateTime",0,yO,"$ZodISODuration",0,yD,"$ZodISOTime",0,yC,"$ZodIntersection",0,bu,"$ZodJWT",0,yV,"$ZodKSUID",0,yE,"$ZodLazy",0,bW,"$ZodLiteral",0,by,"$ZodMAC",0,yZ,"$ZodMap",0,bp,"$ZodNaN",0,bC,"$ZodNanoID",0,yS,"$ZodNever",0,y2,"$ZodNonOptional",0,bz,"$ZodNull",0,y1,"$ZodNullable",0,bS,"$ZodNumber",0,yG,"$ZodNumberFormat",0,yK,"$ZodObject",0,bn,"$ZodObjectJIT",0,br,"$ZodOptional",0,bw,"$ZodPipe",0,bD,"$ZodPrefault",0,bN,"$ZodPromise",0,bB,"$ZodReadonly",0,bR,"$ZodRecord",0,bf,"$ZodSet",0,bg,"$ZodString",0,yx,"$ZodStringFormat",0,yy,"$ZodSuccess",0,bO,"$ZodSymbol",0,yQ,"$ZodTemplateLiteral",0,bM,"$ZodTransform",0,b_,"$ZodTuple",0,bc,"$ZodType",0,yv,"$ZodULID",0,yN,"$ZodURL",0,yw,"$ZodUUID",0,y_,"$ZodUndefined",0,y0,"$ZodUnion",0,ba,"$ZodUnknown",0,y6,"$ZodVoid",0,y5,"$ZodXID",0,yz,"$ZodXor",0,bs,"clone",0,v$,"isValidBase64",0,yL,"isValidBase64URL",0,yF,"isValidJWT",0,yH],32952),e.i(32952),e.i(55605),e.i(98477);var IU=wC,IP=wT;e.i(43365),e.s(["ar",0,function(){let e,t,n;return{localeError:(e={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}},t={regex:"مدخل",email:"بريد إلكتروني",url:"رابط",emoji:"إيموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاريخ ووقت بمعيار ISO",date:"تاريخ بمعيار ISO",time:"وقت بمعيار ISO",duration:"مدة بمعيار ISO",ipv4:"عنوان IPv4",ipv6:"عنوان IPv6",cidrv4:"مدى عناوين بصيغة IPv4",cidrv6:"مدى عناوين بصيغة IPv6",base64:"نَص بترميز base64-encoded",base64url:"نَص بترميز base64url-encoded",json_string:"نَص على هيئة JSON",e164:"رقم هاتف بمعيار E.164",jwt:"JWT",template_literal:"مدخل"},n={nan:"NaN"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`مدخلات غير مقبولة: يفترض إدخال instanceof ${r.expected}، ولكن تم إدخال ${i}`;return`مدخلات غير مقبولة: يفترض إدخال ${e}، ولكن تم إدخال ${i}`}case"invalid_value":if(1===r.values.length)return`مدخلات غير مقبولة: يفترض إدخال ${vk(r.values[0])}`;return`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return` أكبر من اللازم: يفترض أن تكون ${r.origin??"القيمة"} ${t} ${r.maximum.toString()} ${n.unit??"عنصر"}`;return`أكبر من اللازم: يفترض أن تكون ${r.origin??"القيمة"} ${t} ${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`أصغر من اللازم: يفترض لـ ${r.origin} أن يكون ${t} ${r.minimum.toString()} ${n.unit}`;return`أصغر من اللازم: يفترض لـ ${r.origin} أن يكون ${t} ${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`نَص غير مقبول: يجب أن يبدأ بـ "${r.prefix}"`;if("ends_with"===r.format)return`نَص غير مقبول: يجب أن ينتهي بـ "${r.suffix}"`;if("includes"===r.format)return`نَص غير مقبول: يجب أن يتضمَّن "${r.includes}"`;if("regex"===r.format)return`نَص غير مقبول: يجب أن يطابق النمط ${r.pattern}`;return`${t[r.format]??r.format} غير مقبول`;case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${r.divisor}`;case"unrecognized_keys":return`معرف${r.keys.length>1?"ات":""} غريب${r.keys.length>1?"ة":""}: ${vn(r.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${r.origin}`;case"invalid_union":default:return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${r.origin}`}})}},"az",0,function(){let e,t,n;return{localeError:(e={string:{unit:"simvol",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"element",verb:"olmalıdır"},set:{unit:"element",verb:"olmalıdır"}},t={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},n={nan:"NaN"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Yanlış dəyər: g\xf6zlənilən instanceof ${r.expected}, daxil olan ${i}`;return`Yanlış dəyər: g\xf6zlənilən ${e}, daxil olan ${i}`}case"invalid_value":if(1===r.values.length)return`Yanlış dəyər: g\xf6zlənilən ${vk(r.values[0])}`;return`Yanlış se\xe7im: aşağıdakılardan biri olmalıdır: ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`\xc7ox b\xf6y\xfck: g\xf6zlənilən ${r.origin??"dəyər"} ${t}${r.maximum.toString()} ${n.unit??"element"}`;return`\xc7ox b\xf6y\xfck: g\xf6zlənilən ${r.origin??"dəyər"} ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`\xc7ox ki\xe7ik: g\xf6zlənilən ${r.origin} ${t}${r.minimum.toString()} ${n.unit}`;return`\xc7ox ki\xe7ik: g\xf6zlənilən ${r.origin} ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Yanlış mətn: "${r.prefix}" ilə başlamalıdır`;if("ends_with"===r.format)return`Yanlış mətn: "${r.suffix}" ilə bitməlidir`;if("includes"===r.format)return`Yanlış mətn: "${r.includes}" daxil olmalıdır`;if("regex"===r.format)return`Yanlış mətn: ${r.pattern} şablonuna uyğun olmalıdır`;return`Yanlış ${t[r.format]??r.format}`;case"not_multiple_of":return`Yanlış ədəd: ${r.divisor} ilə b\xf6l\xfcnə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan a\xe7ar${r.keys.length>1?"lar":""}: ${vn(r.keys,", ")}`;case"invalid_key":return`${r.origin} daxilində yanlış a\xe7ar`;case"invalid_union":default:return"Yanlış dəyər";case"invalid_element":return`${r.origin} daxilində yanlış dəyər`}})}},"be",0,function(){let e,t,n;return{localeError:(e={string:{unit:{one:"сімвал",few:"сімвалы",many:"сімвалаў"},verb:"мець"},array:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},set:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},file:{unit:{one:"байт",few:"байты",many:"байтаў"},verb:"мець"}},t={regex:"увод",email:"email адрас",url:"URL",emoji:"эмодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата і час",date:"ISO дата",time:"ISO час",duration:"ISO працягласць",ipv4:"IPv4 адрас",ipv6:"IPv6 адрас",cidrv4:"IPv4 дыяпазон",cidrv6:"IPv6 дыяпазон",base64:"радок у фармаце base64",base64url:"радок у фармаце base64url",json_string:"JSON радок",e164:"нумар E.164",jwt:"JWT",template_literal:"увод"},n={nan:"NaN",number:"лік",array:"масіў"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Няправільны ўвод: чакаўся instanceof ${r.expected}, атрымана ${i}`;return`Няправільны ўвод: чакаўся ${e}, атрымана ${i}`}case"invalid_value":if(1===r.values.length)return`Няправільны ўвод: чакалася ${vk(r.values[0])}`;return`Няправільны варыянт: чакаўся адзін з ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n){let e=bJ(Number(r.maximum),n.unit.one,n.unit.few,n.unit.many);return`Занадта вялікі: чакалася, што ${r.origin??"значэнне"} павінна ${n.verb} ${t}${r.maximum.toString()} ${e}`}return`Занадта вялікі: чакалася, што ${r.origin??"значэнне"} павінна быць ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n){let e=bJ(Number(r.minimum),n.unit.one,n.unit.few,n.unit.many);return`Занадта малы: чакалася, што ${r.origin} павінна ${n.verb} ${t}${r.minimum.toString()} ${e}`}return`Занадта малы: чакалася, што ${r.origin} павінна быць ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Няправільны радок: павінен пачынацца з "${r.prefix}"`;if("ends_with"===r.format)return`Няправільны радок: павінен заканчвацца на "${r.suffix}"`;if("includes"===r.format)return`Няправільны радок: павінен змяшчаць "${r.includes}"`;if("regex"===r.format)return`Няправільны радок: павінен адпавядаць шаблону ${r.pattern}`;return`Няправільны ${t[r.format]??r.format}`;case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${r.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${r.keys.length>1?"ключы":"ключ"}: ${vn(r.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${r.origin}`;case"invalid_union":default:return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${r.origin}`}})}},"bg",0,function(){let e,t,n;return{localeError:(e={string:{unit:"символа",verb:"да съдържа"},file:{unit:"байта",verb:"да съдържа"},array:{unit:"елемента",verb:"да съдържа"},set:{unit:"елемента",verb:"да съдържа"}},t={regex:"вход",email:"имейл адрес",url:"URL",emoji:"емоджи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO време",date:"ISO дата",time:"ISO време",duration:"ISO продължителност",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"base64-кодиран низ",base64url:"base64url-кодиран низ",json_string:"JSON низ",e164:"E.164 номер",jwt:"JWT",template_literal:"вход"},n={nan:"NaN",number:"число",array:"масив"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Невалиден вход: очакван instanceof ${r.expected}, получен ${i}`;return`Невалиден вход: очакван ${e}, получен ${i}`}case"invalid_value":if(1===r.values.length)return`Невалиден вход: очакван ${vk(r.values[0])}`;return`Невалидна опция: очаквано едно от ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Твърде голямо: очаква се ${r.origin??"стойност"} да съдържа ${t}${r.maximum.toString()} ${n.unit??"елемента"}`;return`Твърде голямо: очаква се ${r.origin??"стойност"} да бъде ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Твърде малко: очаква се ${r.origin} да съдържа ${t}${r.minimum.toString()} ${n.unit}`;return`Твърде малко: очаква се ${r.origin} да бъде ${t}${r.minimum.toString()}`}case"invalid_format":{if("starts_with"===r.format)return`Невалиден низ: трябва да започва с "${r.prefix}"`;if("ends_with"===r.format)return`Невалиден низ: трябва да завършва с "${r.suffix}"`;if("includes"===r.format)return`Невалиден низ: трябва да включва "${r.includes}"`;if("regex"===r.format)return`Невалиден низ: трябва да съвпада с ${r.pattern}`;let e="Невалиден";return"emoji"===r.format&&(e="Невалидно"),"datetime"===r.format&&(e="Невалидно"),"date"===r.format&&(e="Невалидна"),"time"===r.format&&(e="Невалидно"),"duration"===r.format&&(e="Невалидна"),`${e} ${t[r.format]??r.format}`}case"not_multiple_of":return`Невалидно число: трябва да бъде кратно на ${r.divisor}`;case"unrecognized_keys":return`Неразпознат${r.keys.length>1?"и":""} ключ${r.keys.length>1?"ове":""}: ${vn(r.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${r.origin}`;case"invalid_union":default:return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${r.origin}`}})}},"ca",0,function(){let e,t,n;return{localeError:(e={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}},t={regex:"entrada",email:"adreça electrònica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adreça IPv4",ipv6:"adreça IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},n={nan:"NaN"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Tipus inv\xe0lid: s'esperava instanceof ${r.expected}, s'ha rebut ${i}`;return`Tipus inv\xe0lid: s'esperava ${e}, s'ha rebut ${i}`}case"invalid_value":if(1===r.values.length)return`Valor inv\xe0lid: s'esperava ${vk(r.values[0])}`;return`Opci\xf3 inv\xe0lida: s'esperava una de ${vn(r.values," o ")}`;case"too_big":{let t=r.inclusive?"com a màxim":"menys de",n=e[r.origin]??null;if(n)return`Massa gran: s'esperava que ${r.origin??"el valor"} contingu\xe9s ${t} ${r.maximum.toString()} ${n.unit??"elements"}`;return`Massa gran: s'esperava que ${r.origin??"el valor"} fos ${t} ${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?"com a mínim":"més de",n=e[r.origin]??null;if(n)return`Massa petit: s'esperava que ${r.origin} contingu\xe9s ${t} ${r.minimum.toString()} ${n.unit}`;return`Massa petit: s'esperava que ${r.origin} fos ${t} ${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Format inv\xe0lid: ha de comen\xe7ar amb "${r.prefix}"`;if("ends_with"===r.format)return`Format inv\xe0lid: ha d'acabar amb "${r.suffix}"`;if("includes"===r.format)return`Format inv\xe0lid: ha d'incloure "${r.includes}"`;if("regex"===r.format)return`Format inv\xe0lid: ha de coincidir amb el patr\xf3 ${r.pattern}`;return`Format inv\xe0lid per a ${t[r.format]??r.format}`;case"not_multiple_of":return`N\xfamero inv\xe0lid: ha de ser m\xfaltiple de ${r.divisor}`;case"unrecognized_keys":return`Clau${r.keys.length>1?"s":""} no reconeguda${r.keys.length>1?"s":""}: ${vn(r.keys,", ")}`;case"invalid_key":return`Clau inv\xe0lida a ${r.origin}`;case"invalid_union":default:return"Entrada invàlida";case"invalid_element":return`Element inv\xe0lid a ${r.origin}`}})}},"cs",0,function(){let e,t,n;return{localeError:(e={string:{unit:"znaků",verb:"mít"},file:{unit:"bajtů",verb:"mít"},array:{unit:"prvků",verb:"mít"},set:{unit:"prvků",verb:"mít"}},t={regex:"regulární výraz",email:"e-mailová adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a čas ve formátu ISO",date:"datum ve formátu ISO",time:"čas ve formátu ISO",duration:"doba trvání ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"řetězec zakódovaný ve formátu base64",base64url:"řetězec zakódovaný ve formátu base64url",json_string:"řetězec ve formátu JSON",e164:"číslo E.164",jwt:"JWT",template_literal:"vstup"},n={nan:"NaN",number:"číslo",string:"řetězec",function:"funkce",array:"pole"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Neplatn\xfd vstup: oček\xe1v\xe1no instanceof ${r.expected}, obdrženo ${i}`;return`Neplatn\xfd vstup: oček\xe1v\xe1no ${e}, obdrženo ${i}`}case"invalid_value":if(1===r.values.length)return`Neplatn\xfd vstup: oček\xe1v\xe1no ${vk(r.values[0])}`;return`Neplatn\xe1 možnost: oček\xe1v\xe1na jedna z hodnot ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Hodnota je př\xedliš velk\xe1: ${r.origin??"hodnota"} mus\xed m\xedt ${t}${r.maximum.toString()} ${n.unit??"prvků"}`;return`Hodnota je př\xedliš velk\xe1: ${r.origin??"hodnota"} mus\xed b\xfdt ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Hodnota je př\xedliš mal\xe1: ${r.origin??"hodnota"} mus\xed m\xedt ${t}${r.minimum.toString()} ${n.unit??"prvků"}`;return`Hodnota je př\xedliš mal\xe1: ${r.origin??"hodnota"} mus\xed b\xfdt ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Neplatn\xfd řetězec: mus\xed zač\xednat na "${r.prefix}"`;if("ends_with"===r.format)return`Neplatn\xfd řetězec: mus\xed končit na "${r.suffix}"`;if("includes"===r.format)return`Neplatn\xfd řetězec: mus\xed obsahovat "${r.includes}"`;if("regex"===r.format)return`Neplatn\xfd řetězec: mus\xed odpov\xeddat vzoru ${r.pattern}`;return`Neplatn\xfd form\xe1t ${t[r.format]??r.format}`;case"not_multiple_of":return`Neplatn\xe9 č\xedslo: mus\xed b\xfdt n\xe1sobkem ${r.divisor}`;case"unrecognized_keys":return`Nezn\xe1m\xe9 kl\xedče: ${vn(r.keys,", ")}`;case"invalid_key":return`Neplatn\xfd kl\xedč v ${r.origin}`;case"invalid_union":default:return"Neplatný vstup";case"invalid_element":return`Neplatn\xe1 hodnota v ${r.origin}`}})}},"da",0,function(){let e,t,n;return{localeError:(e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}},t={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslæt",date:"ISO-dato",time:"ISO-klokkeslæt",duration:"ISO-varighed",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},n={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Ugyldigt input: forventede instanceof ${r.expected}, fik ${i}`;return`Ugyldigt input: forventede ${e}, fik ${i}`}case"invalid_value":if(1===r.values.length)return`Ugyldig v\xe6rdi: forventede ${vk(r.values[0])}`;return`Ugyldigt valg: forventede en af f\xf8lgende ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",i=e[r.origin]??null,a=n[r.origin]??r.origin;if(i)return`For stor: forventede ${a??"value"} ${i.verb} ${t} ${r.maximum.toString()} ${i.unit??"elementer"}`;return`For stor: forventede ${a??"value"} havde ${t} ${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",i=e[r.origin]??null,a=n[r.origin]??r.origin;if(i)return`For lille: forventede ${a} ${i.verb} ${t} ${r.minimum.toString()} ${i.unit}`;return`For lille: forventede ${a} havde ${t} ${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Ugyldig streng: skal starte med "${r.prefix}"`;if("ends_with"===r.format)return`Ugyldig streng: skal ende med "${r.suffix}"`;if("includes"===r.format)return`Ugyldig streng: skal indeholde "${r.includes}"`;if("regex"===r.format)return`Ugyldig streng: skal matche m\xf8nsteret ${r.pattern}`;return`Ugyldig ${t[r.format]??r.format}`;case"not_multiple_of":return`Ugyldigt tal: skal v\xe6re deleligt med ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${vn(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xf8gle i ${r.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xe6rdi i ${r.origin}`;default:return"Ugyldigt input"}})}},"de",0,function(){let e,t,n;return{localeError:(e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}},t={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},n={nan:"NaN",number:"Zahl",array:"Array"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Ung\xfcltige Eingabe: erwartet instanceof ${r.expected}, erhalten ${i}`;return`Ung\xfcltige Eingabe: erwartet ${e}, erhalten ${i}`}case"invalid_value":if(1===r.values.length)return`Ung\xfcltige Eingabe: erwartet ${vk(r.values[0])}`;return`Ung\xfcltige Option: erwartet eine von ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Zu gro\xdf: erwartet, dass ${r.origin??"Wert"} ${t}${r.maximum.toString()} ${n.unit??"Elemente"} hat`;return`Zu gro\xdf: erwartet, dass ${r.origin??"Wert"} ${t}${r.maximum.toString()} ist`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Zu klein: erwartet, dass ${r.origin} ${t}${r.minimum.toString()} ${n.unit} hat`;return`Zu klein: erwartet, dass ${r.origin} ${t}${r.minimum.toString()} ist`}case"invalid_format":if("starts_with"===r.format)return`Ung\xfcltiger String: muss mit "${r.prefix}" beginnen`;if("ends_with"===r.format)return`Ung\xfcltiger String: muss mit "${r.suffix}" enden`;if("includes"===r.format)return`Ung\xfcltiger String: muss "${r.includes}" enthalten`;if("regex"===r.format)return`Ung\xfcltiger String: muss dem Muster ${r.pattern} entsprechen`;return`Ung\xfcltig: ${t[r.format]??r.format}`;case"not_multiple_of":return`Ung\xfcltige Zahl: muss ein Vielfaches von ${r.divisor} sein`;case"unrecognized_keys":return`${r.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${vn(r.keys,", ")}`;case"invalid_key":return`Ung\xfcltiger Schl\xfcssel in ${r.origin}`;case"invalid_union":default:return"Ungültige Eingabe";case"invalid_element":return`Ung\xfcltiger Wert in ${r.origin}`}})}},"en",0,bG,"eo",0,function(){let e,t,n;return{localeError:(e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}},t={regex:"enigo",email:"retadreso",url:"URL",emoji:"emoĝio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-daŭro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},n={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Nevalida enigo: atendiĝis instanceof ${r.expected}, riceviĝis ${i}`;return`Nevalida enigo: atendiĝis ${e}, riceviĝis ${i}`}case"invalid_value":if(1===r.values.length)return`Nevalida enigo: atendiĝis ${vk(r.values[0])}`;return`Nevalida opcio: atendiĝis unu el ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Tro granda: atendiĝis ke ${r.origin??"valoro"} havu ${t}${r.maximum.toString()} ${n.unit??"elementojn"}`;return`Tro granda: atendiĝis ke ${r.origin??"valoro"} havu ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Tro malgranda: atendiĝis ke ${r.origin} havu ${t}${r.minimum.toString()} ${n.unit}`;return`Tro malgranda: atendiĝis ke ${r.origin} estu ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Nevalida karaktraro: devas komenciĝi per "${r.prefix}"`;if("ends_with"===r.format)return`Nevalida karaktraro: devas finiĝi per "${r.suffix}"`;if("includes"===r.format)return`Nevalida karaktraro: devas inkluzivi "${r.includes}"`;if("regex"===r.format)return`Nevalida karaktraro: devas kongrui kun la modelo ${r.pattern}`;return`Nevalida ${t[r.format]??r.format}`;case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${r.divisor}`;case"unrecognized_keys":return`Nekonata${r.keys.length>1?"j":""} ŝlosilo${r.keys.length>1?"j":""}: ${vn(r.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${r.origin}`;case"invalid_union":default:return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${r.origin}`}})}},"es",0,function(){let e,t,n;return{localeError:(e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}},t={regex:"entrada",email:"dirección de correo electrónico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duración ISO",ipv4:"dirección IPv4",ipv6:"dirección IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},n={nan:"NaN",string:"texto",number:"número",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"número grande",symbol:"símbolo",undefined:"indefinido",null:"nulo",function:"función",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeración",union:"unión",literal:"literal",promise:"promesa",void:"vacío",never:"nunca",unknown:"desconocido",any:"cualquiera"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Entrada inv\xe1lida: se esperaba instanceof ${r.expected}, recibido ${i}`;return`Entrada inv\xe1lida: se esperaba ${e}, recibido ${i}`}case"invalid_value":if(1===r.values.length)return`Entrada inv\xe1lida: se esperaba ${vk(r.values[0])}`;return`Opci\xf3n inv\xe1lida: se esperaba una de ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",i=e[r.origin]??null,a=n[r.origin]??r.origin;if(i)return`Demasiado grande: se esperaba que ${a??"valor"} tuviera ${t}${r.maximum.toString()} ${i.unit??"elementos"}`;return`Demasiado grande: se esperaba que ${a??"valor"} fuera ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",i=e[r.origin]??null,a=n[r.origin]??r.origin;if(i)return`Demasiado peque\xf1o: se esperaba que ${a} tuviera ${t}${r.minimum.toString()} ${i.unit}`;return`Demasiado peque\xf1o: se esperaba que ${a} fuera ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Cadena inv\xe1lida: debe comenzar con "${r.prefix}"`;if("ends_with"===r.format)return`Cadena inv\xe1lida: debe terminar en "${r.suffix}"`;if("includes"===r.format)return`Cadena inv\xe1lida: debe incluir "${r.includes}"`;if("regex"===r.format)return`Cadena inv\xe1lida: debe coincidir con el patr\xf3n ${r.pattern}`;return`Inv\xe1lido ${t[r.format]??r.format}`;case"not_multiple_of":return`N\xfamero inv\xe1lido: debe ser m\xfaltiplo de ${r.divisor}`;case"unrecognized_keys":return`Llave${r.keys.length>1?"s":""} desconocida${r.keys.length>1?"s":""}: ${vn(r.keys,", ")}`;case"invalid_key":return`Llave inv\xe1lida en ${n[r.origin]??r.origin}`;case"invalid_union":default:return"Entrada inválida";case"invalid_element":return`Valor inv\xe1lido en ${n[r.origin]??r.origin}`}})}},"fa",0,function(){let e,t,n;return{localeError:(e={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}},t={regex:"ورودی",email:"آدرس ایمیل",url:"URL",emoji:"ایموجی",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاریخ و زمان ایزو",date:"تاریخ ایزو",time:"زمان ایزو",duration:"مدت زمان ایزو",ipv4:"IPv4 آدرس",ipv6:"IPv6 آدرس",cidrv4:"IPv4 دامنه",cidrv6:"IPv6 دامنه",base64:"base64-encoded رشته",base64url:"base64url-encoded رشته",json_string:"JSON رشته",e164:"E.164 عدد",jwt:"JWT",template_literal:"ورودی"},n={nan:"NaN",number:"عدد",array:"آرایه"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`ورودی نامعتبر: می‌بایست instanceof ${r.expected} می‌بود، ${i} دریافت شد`;return`ورودی نامعتبر: می‌بایست ${e} می‌بود، ${i} دریافت شد`}case"invalid_value":if(1===r.values.length)return`ورودی نامعتبر: می‌بایست ${vk(r.values[0])} می‌بود`;return`گزینه نامعتبر: می‌بایست یکی از ${vn(r.values,"|")} می‌بود`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`خیلی بزرگ: ${r.origin??"مقدار"} باید ${t}${r.maximum.toString()} ${n.unit??"عنصر"} باشد`;return`خیلی بزرگ: ${r.origin??"مقدار"} باید ${t}${r.maximum.toString()} باشد`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`خیلی کوچک: ${r.origin} باید ${t}${r.minimum.toString()} ${n.unit} باشد`;return`خیلی کوچک: ${r.origin} باید ${t}${r.minimum.toString()} باشد`}case"invalid_format":if("starts_with"===r.format)return`رشته نامعتبر: باید با "${r.prefix}" شروع شود`;if("ends_with"===r.format)return`رشته نامعتبر: باید با "${r.suffix}" تمام شود`;if("includes"===r.format)return`رشته نامعتبر: باید شامل "${r.includes}" باشد`;if("regex"===r.format)return`رشته نامعتبر: باید با الگوی ${r.pattern} مطابقت داشته باشد`;return`${t[r.format]??r.format} نامعتبر`;case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${r.divisor} باشد`;case"unrecognized_keys":return`کلید${r.keys.length>1?"های":""} ناشناس: ${vn(r.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${r.origin}`;case"invalid_union":default:return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${r.origin}`}})}},"fi",0,function(){let e,t,n;return{localeError:(e={string:{unit:"merkkiä",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"päivämäärän"}},t={regex:"säännöllinen lauseke",email:"sähköpostiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-päivämäärä",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},n={nan:"NaN"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Virheellinen tyyppi: odotettiin instanceof ${r.expected}, oli ${i}`;return`Virheellinen tyyppi: odotettiin ${e}, oli ${i}`}case"invalid_value":if(1===r.values.length)return`Virheellinen sy\xf6te: t\xe4ytyy olla ${vk(r.values[0])}`;return`Virheellinen valinta: t\xe4ytyy olla yksi seuraavista: ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Liian suuri: ${n.subject} t\xe4ytyy olla ${t}${r.maximum.toString()} ${n.unit}`.trim();return`Liian suuri: arvon t\xe4ytyy olla ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Liian pieni: ${n.subject} t\xe4ytyy olla ${t}${r.minimum.toString()} ${n.unit}`.trim();return`Liian pieni: arvon t\xe4ytyy olla ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Virheellinen sy\xf6te: t\xe4ytyy alkaa "${r.prefix}"`;if("ends_with"===r.format)return`Virheellinen sy\xf6te: t\xe4ytyy loppua "${r.suffix}"`;if("includes"===r.format)return`Virheellinen sy\xf6te: t\xe4ytyy sis\xe4lt\xe4\xe4 "${r.includes}"`;if("regex"===r.format)return`Virheellinen sy\xf6te: t\xe4ytyy vastata s\xe4\xe4nn\xf6llist\xe4 lauseketta ${r.pattern}`;return`Virheellinen ${t[r.format]??r.format}`;case"not_multiple_of":return`Virheellinen luku: t\xe4ytyy olla luvun ${r.divisor} monikerta`;case"unrecognized_keys":return`${r.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${vn(r.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen syöte"}})}},"fr",0,function(){let e,t,n;return{localeError:(e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}},t={regex:"entrée",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},n={nan:"NaN",number:"nombre",array:"tableau"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Entr\xe9e invalide : instanceof ${r.expected} attendu, ${i} re\xe7u`;return`Entr\xe9e invalide : ${e} attendu, ${i} re\xe7u`}case"invalid_value":if(1===r.values.length)return`Entr\xe9e invalide : ${vk(r.values[0])} attendu`;return`Option invalide : une valeur parmi ${vn(r.values,"|")} attendue`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Trop grand : ${r.origin??"valeur"} doit ${n.verb} ${t}${r.maximum.toString()} ${n.unit??"élément(s)"}`;return`Trop grand : ${r.origin??"valeur"} doit \xeatre ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Trop petit : ${r.origin} doit ${n.verb} ${t}${r.minimum.toString()} ${n.unit}`;return`Trop petit : ${r.origin} doit \xeatre ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Cha\xeene invalide : doit commencer par "${r.prefix}"`;if("ends_with"===r.format)return`Cha\xeene invalide : doit se terminer par "${r.suffix}"`;if("includes"===r.format)return`Cha\xeene invalide : doit inclure "${r.includes}"`;if("regex"===r.format)return`Cha\xeene invalide : doit correspondre au mod\xe8le ${r.pattern}`;return`${t[r.format]??r.format} invalide`;case"not_multiple_of":return`Nombre invalide : doit \xeatre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xe9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${vn(r.keys,", ")}`;case"invalid_key":return`Cl\xe9 invalide dans ${r.origin}`;case"invalid_union":default:return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`}})}},"frCA",0,function(){let e,t,n;return{localeError:(e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}},t={regex:"entrée",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},n={nan:"NaN"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Entr\xe9e invalide : attendu instanceof ${r.expected}, re\xe7u ${i}`;return`Entr\xe9e invalide : attendu ${e}, re\xe7u ${i}`}case"invalid_value":if(1===r.values.length)return`Entr\xe9e invalide : attendu ${vk(r.values[0])}`;return`Option invalide : attendu l'une des valeurs suivantes ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"≤":"<",n=e[r.origin]??null;if(n)return`Trop grand : attendu que ${r.origin??"la valeur"} ait ${t}${r.maximum.toString()} ${n.unit}`;return`Trop grand : attendu que ${r.origin??"la valeur"} soit ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?"≥":">",n=e[r.origin]??null;if(n)return`Trop petit : attendu que ${r.origin} ait ${t}${r.minimum.toString()} ${n.unit}`;return`Trop petit : attendu que ${r.origin} soit ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Cha\xeene invalide : doit commencer par "${r.prefix}"`;if("ends_with"===r.format)return`Cha\xeene invalide : doit se terminer par "${r.suffix}"`;if("includes"===r.format)return`Cha\xeene invalide : doit inclure "${r.includes}"`;if("regex"===r.format)return`Cha\xeene invalide : doit correspondre au motif ${r.pattern}`;return`${t[r.format]??r.format} invalide`;case"not_multiple_of":return`Nombre invalide : doit \xeatre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xe9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${vn(r.keys,", ")}`;case"invalid_key":return`Cl\xe9 invalide dans ${r.origin}`;case"invalid_union":default:return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`}})}},"he",0,function(){let e,t,n,r,i,a,o,s,l;return{localeError:(e={string:{label:"מחרוזת",gender:"f"},number:{label:"מספר",gender:"m"},boolean:{label:"ערך בוליאני",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"תאריך",gender:"m"},array:{label:"מערך",gender:"m"},object:{label:"אובייקט",gender:"m"},null:{label:"ערך ריק (null)",gender:"m"},undefined:{label:"ערך לא מוגדר (undefined)",gender:"m"},symbol:{label:"סימבול (Symbol)",gender:"m"},function:{label:"פונקציה",gender:"f"},map:{label:"מפה (Map)",gender:"f"},set:{label:"קבוצה (Set)",gender:"f"},file:{label:"קובץ",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"ערך לא ידוע",gender:"m"},value:{label:"ערך",gender:"m"}},t={string:{unit:"תווים",shortLabel:"קצר",longLabel:"ארוך"},file:{unit:"בייטים",shortLabel:"קטן",longLabel:"גדול"},array:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},set:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},number:{unit:"",shortLabel:"קטן",longLabel:"גדול"}},n=t=>t?e[t]:void 0,r=t=>{let r=n(t);return r?r.label:t??e.unknown.label},i=e=>`ה${r(e)}`,a=e=>{let t=n(e);return"f"===(t?.gender??"m")?"צריכה להיות":"צריך להיות"},o=e=>e?t[e]??null:null,s={regex:{label:"קלט",gender:"m"},email:{label:"כתובת אימייל",gender:"f"},url:{label:"כתובת רשת",gender:"f"},emoji:{label:"אימוג'י",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"תאריך וזמן ISO",gender:"m"},date:{label:"תאריך ISO",gender:"m"},time:{label:"זמן ISO",gender:"m"},duration:{label:"משך זמן ISO",gender:"m"},ipv4:{label:"כתובת IPv4",gender:"f"},ipv6:{label:"כתובת IPv6",gender:"f"},cidrv4:{label:"טווח IPv4",gender:"m"},cidrv6:{label:"טווח IPv6",gender:"m"},base64:{label:"מחרוזת בבסיס 64",gender:"f"},base64url:{label:"מחרוזת בבסיס 64 לכתובות רשת",gender:"f"},json_string:{label:"מחרוזת JSON",gender:"f"},e164:{label:"מספר E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"קלט",gender:"m"},includes:{label:"קלט",gender:"m"},lowercase:{label:"קלט",gender:"m"},starts_with:{label:"קלט",gender:"m"},uppercase:{label:"קלט",gender:"m"}},l={nan:"NaN"},t=>{switch(t.code){case"invalid_type":{let n=t.expected,i=l[n??""]??r(n),a=vD(t.input),o=l[a]??e[a]?.label??a;if(/^[A-Z]/.test(t.expected))return`קלט לא תקין: צריך להיות instanceof ${t.expected}, התקבל ${o}`;return`קלט לא תקין: צריך להיות ${i}, התקבל ${o}`}case"invalid_value":{if(1===t.values.length)return`ערך לא תקין: הערך חייב להיות ${vk(t.values[0])}`;let e=t.values.map(e=>vk(e));if(2===t.values.length)return`ערך לא תקין: האפשרויות המתאימות הן ${e[0]} או ${e[1]}`;let n=e[e.length-1],r=e.slice(0,-1).join(", ");return`ערך לא תקין: האפשרויות המתאימות הן ${r} או ${n}`}case"too_big":{let e=o(t.origin),n=i(t.origin??"value");if("string"===t.origin)return`${e?.longLabel??"ארוך"} מדי: ${n} צריכה להכיל ${t.maximum.toString()} ${e?.unit??""} ${t.inclusive?"או פחות":"לכל היותר"}`.trim();if("number"===t.origin){let e=t.inclusive?`קטן או שווה ל-${t.maximum}`:`קטן מ-${t.maximum}`;return`גדול מדי: ${n} צריך להיות ${e}`}if("array"===t.origin||"set"===t.origin){let r="set"===t.origin?"צריכה":"צריך",i=t.inclusive?`${t.maximum} ${e?.unit??""} או פחות`:`פחות מ-${t.maximum} ${e?.unit??""}`;return`גדול מדי: ${n} ${r} להכיל ${i}`.trim()}let r=t.inclusive?"<=":"<",s=a(t.origin??"value");if(e?.unit)return`${e.longLabel} מדי: ${n} ${s} ${r}${t.maximum.toString()} ${e.unit}`;return`${e?.longLabel??"גדול"} מדי: ${n} ${s} ${r}${t.maximum.toString()}`}case"too_small":{let e=o(t.origin),n=i(t.origin??"value");if("string"===t.origin)return`${e?.shortLabel??"קצר"} מדי: ${n} צריכה להכיל ${t.minimum.toString()} ${e?.unit??""} ${t.inclusive?"או יותר":"לפחות"}`.trim();if("number"===t.origin){let e=t.inclusive?`גדול או שווה ל-${t.minimum}`:`גדול מ-${t.minimum}`;return`קטן מדי: ${n} צריך להיות ${e}`}if("array"===t.origin||"set"===t.origin){let r="set"===t.origin?"צריכה":"צריך";if(1===t.minimum&&t.inclusive){let e=(t.origin,"לפחות פריט אחד");return`קטן מדי: ${n} ${r} להכיל ${e}`}let i=t.inclusive?`${t.minimum} ${e?.unit??""} או יותר`:`יותר מ-${t.minimum} ${e?.unit??""}`;return`קטן מדי: ${n} ${r} להכיל ${i}`.trim()}let r=t.inclusive?">=":">",s=a(t.origin??"value");if(e?.unit)return`${e.shortLabel} מדי: ${n} ${s} ${r}${t.minimum.toString()} ${e.unit}`;return`${e?.shortLabel??"קטן"} מדי: ${n} ${s} ${r}${t.minimum.toString()}`}case"invalid_format":{if("starts_with"===t.format)return`המחרוזת חייבת להתחיל ב "${t.prefix}"`;if("ends_with"===t.format)return`המחרוזת חייבת להסתיים ב "${t.suffix}"`;if("includes"===t.format)return`המחרוזת חייבת לכלול "${t.includes}"`;if("regex"===t.format)return`המחרוזת חייבת להתאים לתבנית ${t.pattern}`;let e=s[t.format],n=e?.label??t.format,r=e?.gender??"m";return`${n} לא ${"f"===r?"תקינה":"תקין"}`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${t.divisor}`;case"unrecognized_keys":return`מפתח${t.keys.length>1?"ות":""} לא מזוה${t.keys.length>1?"ים":"ה"}: ${vn(t.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":default:return"קלט לא תקין";case"invalid_element":{let e=i(t.origin??"array");return`ערך לא תקין ב${e}`}}})}},"hu",0,function(){let e,t,n;return{localeError:(e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}},t={regex:"bemenet",email:"email cím",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO időbélyeg",date:"ISO dátum",time:"ISO idő",duration:"ISO időintervallum",ipv4:"IPv4 cím",ipv6:"IPv6 cím",cidrv4:"IPv4 tartomány",cidrv6:"IPv6 tartomány",base64:"base64-kódolt string",base64url:"base64url-kódolt string",json_string:"JSON string",e164:"E.164 szám",jwt:"JWT",template_literal:"bemenet"},n={nan:"NaN",number:"szám",array:"tömb"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`\xc9rv\xe9nytelen bemenet: a v\xe1rt \xe9rt\xe9k instanceof ${r.expected}, a kapott \xe9rt\xe9k ${i}`;return`\xc9rv\xe9nytelen bemenet: a v\xe1rt \xe9rt\xe9k ${e}, a kapott \xe9rt\xe9k ${i}`}case"invalid_value":if(1===r.values.length)return`\xc9rv\xe9nytelen bemenet: a v\xe1rt \xe9rt\xe9k ${vk(r.values[0])}`;return`\xc9rv\xe9nytelen opci\xf3: valamelyik \xe9rt\xe9k v\xe1rt ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`T\xfal nagy: ${r.origin??"érték"} m\xe9rete t\xfal nagy ${t}${r.maximum.toString()} ${n.unit??"elem"}`;return`T\xfal nagy: a bemeneti \xe9rt\xe9k ${r.origin??"érték"} t\xfal nagy: ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`T\xfal kicsi: a bemeneti \xe9rt\xe9k ${r.origin} m\xe9rete t\xfal kicsi ${t}${r.minimum.toString()} ${n.unit}`;return`T\xfal kicsi: a bemeneti \xe9rt\xe9k ${r.origin} t\xfal kicsi ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`\xc9rv\xe9nytelen string: "${r.prefix}" \xe9rt\xe9kkel kell kezdődnie`;if("ends_with"===r.format)return`\xc9rv\xe9nytelen string: "${r.suffix}" \xe9rt\xe9kkel kell v\xe9gződnie`;if("includes"===r.format)return`\xc9rv\xe9nytelen string: "${r.includes}" \xe9rt\xe9ket kell tartalmaznia`;if("regex"===r.format)return`\xc9rv\xe9nytelen string: ${r.pattern} mint\xe1nak kell megfelelnie`;return`\xc9rv\xe9nytelen ${t[r.format]??r.format}`;case"not_multiple_of":return`\xc9rv\xe9nytelen sz\xe1m: ${r.divisor} t\xf6bbsz\xf6r\xf6s\xe9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${r.keys.length>1?"s":""}: ${vn(r.keys,", ")}`;case"invalid_key":return`\xc9rv\xe9nytelen kulcs ${r.origin}`;case"invalid_union":default:return"Érvénytelen bemenet";case"invalid_element":return`\xc9rv\xe9nytelen \xe9rt\xe9k: ${r.origin}`}})}},"hy",0,function(){let e,t,n;return{localeError:(e={string:{unit:{one:"նշան",many:"նշաններ"},verb:"ունենալ"},file:{unit:{one:"բայթ",many:"բայթեր"},verb:"ունենալ"},array:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"},set:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"}},t={regex:"մուտք",email:"էլ. հասցե",url:"URL",emoji:"էմոջի",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO ամսաթիվ և ժամ",date:"ISO ամսաթիվ",time:"ISO ժամ",duration:"ISO տևողություն",ipv4:"IPv4 հասցե",ipv6:"IPv6 հասցե",cidrv4:"IPv4 միջակայք",cidrv6:"IPv6 միջակայք",base64:"base64 ձևաչափով տող",base64url:"base64url ձևաչափով տող",json_string:"JSON տող",e164:"E.164 համար",jwt:"JWT",template_literal:"մուտք"},n={nan:"NaN",number:"թիվ",array:"զանգված"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Սխալ մուտքագրում․ սպասվում էր instanceof ${r.expected}, ստացվել է ${i}`;return`Սխալ մուտքագրում․ սպասվում էր ${e}, ստացվել է ${i}`}case"invalid_value":if(1===r.values.length)return`Սխալ մուտքագրում․ սպասվում էր ${vk(r.values[1])}`;return`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n){let e=bK(Number(r.maximum),n.unit.one,n.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${bq(r.origin??"արժեք")} կունենա ${t}${r.maximum.toString()} ${e}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${bq(r.origin??"արժեք")} լինի ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n){let e=bK(Number(r.minimum),n.unit.one,n.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${bq(r.origin)} կունենա ${t}${r.minimum.toString()} ${e}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${bq(r.origin)} լինի ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Սխալ տող․ պետք է սկսվի "${r.prefix}"-ով`;if("ends_with"===r.format)return`Սխալ տող․ պետք է ավարտվի "${r.suffix}"-ով`;if("includes"===r.format)return`Սխալ տող․ պետք է պարունակի "${r.includes}"`;if("regex"===r.format)return`Սխալ տող․ պետք է համապատասխանի ${r.pattern} ձևաչափին`;return`Սխալ ${t[r.format]??r.format}`;case"not_multiple_of":return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${r.divisor}-ի`;case"unrecognized_keys":return`Չճանաչված բանալի${r.keys.length>1?"ներ":""}. ${vn(r.keys,", ")}`;case"invalid_key":return`Սխալ բանալի ${bq(r.origin)}-ում`;case"invalid_union":default:return"Սխալ մուտքագրում";case"invalid_element":return`Սխալ արժեք ${bq(r.origin)}-ում`}})}},"id",0,function(){let e,t,n;return{localeError:(e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}},t={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},n={nan:"NaN"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Input tidak valid: diharapkan instanceof ${r.expected}, diterima ${i}`;return`Input tidak valid: diharapkan ${e}, diterima ${i}`}case"invalid_value":if(1===r.values.length)return`Input tidak valid: diharapkan ${vk(r.values[0])}`;return`Pilihan tidak valid: diharapkan salah satu dari ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Terlalu besar: diharapkan ${r.origin??"value"} memiliki ${t}${r.maximum.toString()} ${n.unit??"elemen"}`;return`Terlalu besar: diharapkan ${r.origin??"value"} menjadi ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Terlalu kecil: diharapkan ${r.origin} memiliki ${t}${r.minimum.toString()} ${n.unit}`;return`Terlalu kecil: diharapkan ${r.origin} menjadi ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`String tidak valid: harus dimulai dengan "${r.prefix}"`;if("ends_with"===r.format)return`String tidak valid: harus berakhir dengan "${r.suffix}"`;if("includes"===r.format)return`String tidak valid: harus menyertakan "${r.includes}"`;if("regex"===r.format)return`String tidak valid: harus sesuai pola ${r.pattern}`;return`${t[r.format]??r.format} tidak valid`;case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${r.keys.length>1?"s":""}: ${vn(r.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${r.origin}`;case"invalid_union":default:return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${r.origin}`}})}},"is",0,function(){let e,t,n;return{localeError:(e={string:{unit:"stafi",verb:"að hafa"},file:{unit:"bæti",verb:"að hafa"},array:{unit:"hluti",verb:"að hafa"},set:{unit:"hluti",verb:"að hafa"}},t={regex:"gildi",email:"netfang",url:"vefslóð",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og tími",date:"ISO dagsetning",time:"ISO tími",duration:"ISO tímalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 tölugildi",jwt:"JWT",template_literal:"gildi"},n={nan:"NaN",number:"númer",array:"fylki"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Rangt gildi: \xde\xfa sl\xf3st inn ${i} \xfear sem \xe1 a\xf0 vera instanceof ${r.expected}`;return`Rangt gildi: \xde\xfa sl\xf3st inn ${i} \xfear sem \xe1 a\xf0 vera ${e}`}case"invalid_value":if(1===r.values.length)return`Rangt gildi: gert r\xe1\xf0 fyrir ${vk(r.values[0])}`;return`\xd3gilt val: m\xe1 vera eitt af eftirfarandi ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Of st\xf3rt: gert er r\xe1\xf0 fyrir a\xf0 ${r.origin??"gildi"} hafi ${t}${r.maximum.toString()} ${n.unit??"hluti"}`;return`Of st\xf3rt: gert er r\xe1\xf0 fyrir a\xf0 ${r.origin??"gildi"} s\xe9 ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Of l\xedti\xf0: gert er r\xe1\xf0 fyrir a\xf0 ${r.origin} hafi ${t}${r.minimum.toString()} ${n.unit}`;return`Of l\xedti\xf0: gert er r\xe1\xf0 fyrir a\xf0 ${r.origin} s\xe9 ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`\xd3gildur strengur: ver\xf0ur a\xf0 byrja \xe1 "${r.prefix}"`;if("ends_with"===r.format)return`\xd3gildur strengur: ver\xf0ur a\xf0 enda \xe1 "${r.suffix}"`;if("includes"===r.format)return`\xd3gildur strengur: ver\xf0ur a\xf0 innihalda "${r.includes}"`;if("regex"===r.format)return`\xd3gildur strengur: ver\xf0ur a\xf0 fylgja mynstri ${r.pattern}`;return`Rangt ${t[r.format]??r.format}`;case"not_multiple_of":return`R\xf6ng tala: ver\xf0ur a\xf0 vera margfeldi af ${r.divisor}`;case"unrecognized_keys":return`\xd3\xfeekkt ${r.keys.length>1?"ir lyklar":"ur lykill"}: ${vn(r.keys,", ")}`;case"invalid_key":return`Rangur lykill \xed ${r.origin}`;case"invalid_union":default:return"Rangt gildi";case"invalid_element":return`Rangt gildi \xed ${r.origin}`}})}},"it",0,function(){let e,t,n;return{localeError:(e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}},t={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"numero",array:"vettore"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Input non valido: atteso instanceof ${r.expected}, ricevuto ${i}`;return`Input non valido: atteso ${e}, ricevuto ${i}`}case"invalid_value":if(1===r.values.length)return`Input non valido: atteso ${vk(r.values[0])}`;return`Opzione non valida: atteso uno tra ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Troppo grande: ${r.origin??"valore"} deve avere ${t}${r.maximum.toString()} ${n.unit??"elementi"}`;return`Troppo grande: ${r.origin??"valore"} deve essere ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Troppo piccolo: ${r.origin} deve avere ${t}${r.minimum.toString()} ${n.unit}`;return`Troppo piccolo: ${r.origin} deve essere ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Stringa non valida: deve iniziare con "${r.prefix}"`;if("ends_with"===r.format)return`Stringa non valida: deve terminare con "${r.suffix}"`;if("includes"===r.format)return`Stringa non valida: deve includere "${r.includes}"`;if("regex"===r.format)return`Stringa non valida: deve corrispondere al pattern ${r.pattern}`;return`Invalid ${t[r.format]??r.format}`;case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${r.divisor}`;case"unrecognized_keys":return`Chiav${r.keys.length>1?"i":"e"} non riconosciut${r.keys.length>1?"e":"a"}: ${vn(r.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${r.origin}`;case"invalid_union":default:return"Input non valido";case"invalid_element":return`Valore non valido in ${r.origin}`}})}},"ja",0,function(){let e,t,n;return{localeError:(e={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}},t={regex:"入力値",email:"メールアドレス",url:"URL",emoji:"絵文字",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日時",date:"ISO日付",time:"ISO時刻",duration:"ISO期間",ipv4:"IPv4アドレス",ipv6:"IPv6アドレス",cidrv4:"IPv4範囲",cidrv6:"IPv6範囲",base64:"base64エンコード文字列",base64url:"base64urlエンコード文字列",json_string:"JSON文字列",e164:"E.164番号",jwt:"JWT",template_literal:"入力値"},n={nan:"NaN",number:"数値",array:"配列"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`無効な入力: instanceof ${r.expected}が期待されましたが、${i}が入力されました`;return`無効な入力: ${e}が期待されましたが、${i}が入力されました`}case"invalid_value":if(1===r.values.length)return`無効な入力: ${vk(r.values[0])}が期待されました`;return`無効な選択: ${vn(r.values,"、")}のいずれかである必要があります`;case"too_big":{let t=r.inclusive?"以下である":"より小さい",n=e[r.origin]??null;if(n)return`大きすぎる値: ${r.origin??"値"}は${r.maximum.toString()}${n.unit??"要素"}${t}必要があります`;return`大きすぎる値: ${r.origin??"値"}は${r.maximum.toString()}${t}必要があります`}case"too_small":{let t=r.inclusive?"以上である":"より大きい",n=e[r.origin]??null;if(n)return`小さすぎる値: ${r.origin}は${r.minimum.toString()}${n.unit}${t}必要があります`;return`小さすぎる値: ${r.origin}は${r.minimum.toString()}${t}必要があります`}case"invalid_format":if("starts_with"===r.format)return`無効な文字列: "${r.prefix}"で始まる必要があります`;if("ends_with"===r.format)return`無効な文字列: "${r.suffix}"で終わる必要があります`;if("includes"===r.format)return`無効な文字列: "${r.includes}"を含む必要があります`;if("regex"===r.format)return`無効な文字列: パターン${r.pattern}に一致する必要があります`;return`無効な${t[r.format]??r.format}`;case"not_multiple_of":return`無効な数値: ${r.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${r.keys.length>1?"群":""}: ${vn(r.keys,"、")}`;case"invalid_key":return`${r.origin}内の無効なキー`;case"invalid_union":default:return"無効な入力";case"invalid_element":return`${r.origin}内の無効な値`}})}},"ka",0,function(){let e,t,n;return{localeError:(e={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}},t={regex:"შეყვანა",email:"ელ-ფოსტის მისამართი",url:"URL",emoji:"ემოჯი",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"თარიღი-დრო",date:"თარიღი",time:"დრო",duration:"ხანგრძლივობა",ipv4:"IPv4 მისამართი",ipv6:"IPv6 მისამართი",cidrv4:"IPv4 დიაპაზონი",cidrv6:"IPv6 დიაპაზონი",base64:"base64-კოდირებული სტრინგი",base64url:"base64url-კოდირებული სტრინგი",json_string:"JSON სტრინგი",e164:"E.164 ნომერი",jwt:"JWT",template_literal:"შეყვანა"},n={nan:"NaN",number:"რიცხვი",string:"სტრინგი",boolean:"ბულეანი",function:"ფუნქცია",array:"მასივი"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`არასწორი შეყვანა: მოსალოდნელი instanceof ${r.expected}, მიღებული ${i}`;return`არასწორი შეყვანა: მოსალოდნელი ${e}, მიღებული ${i}`}case"invalid_value":if(1===r.values.length)return`არასწორი შეყვანა: მოსალოდნელი ${vk(r.values[0])}`;return`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${vn(r.values,"|")}-დან`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`ზედმეტად დიდი: მოსალოდნელი ${r.origin??"მნიშვნელობა"} ${n.verb} ${t}${r.maximum.toString()} ${n.unit}`;return`ზედმეტად დიდი: მოსალოდნელი ${r.origin??"მნიშვნელობა"} იყოს ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`ზედმეტად პატარა: მოსალოდნელი ${r.origin} ${n.verb} ${t}${r.minimum.toString()} ${n.unit}`;return`ზედმეტად პატარა: მოსალოდნელი ${r.origin} იყოს ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`არასწორი სტრინგი: უნდა იწყებოდეს "${r.prefix}"-ით`;if("ends_with"===r.format)return`არასწორი სტრინგი: უნდა მთავრდებოდეს "${r.suffix}"-ით`;if("includes"===r.format)return`არასწორი სტრინგი: უნდა შეიცავდეს "${r.includes}"-ს`;if("regex"===r.format)return`არასწორი სტრინგი: უნდა შეესაბამებოდეს შაბლონს ${r.pattern}`;return`არასწორი ${t[r.format]??r.format}`;case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${r.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${r.keys.length>1?"ები":"ი"}: ${vn(r.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${r.origin}-ში`;case"invalid_union":default:return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${r.origin}-ში`}})}},"kh",0,function(){return bY()},"km",0,bY,"ko",0,function(){let e,t,n;return{localeError:(e={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}},t={regex:"입력",email:"이메일 주소",url:"URL",emoji:"이모지",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 날짜시간",date:"ISO 날짜",time:"ISO 시간",duration:"ISO 기간",ipv4:"IPv4 주소",ipv6:"IPv6 주소",cidrv4:"IPv4 범위",cidrv6:"IPv6 범위",base64:"base64 인코딩 문자열",base64url:"base64url 인코딩 문자열",json_string:"JSON 문자열",e164:"E.164 번호",jwt:"JWT",template_literal:"입력"},n={nan:"NaN"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`잘못된 입력: 예상 타입은 instanceof ${r.expected}, 받은 타입은 ${i}입니다`;return`잘못된 입력: 예상 타입은 ${e}, 받은 타입은 ${i}입니다`}case"invalid_value":if(1===r.values.length)return`잘못된 입력: 값은 ${vk(r.values[0])} 이어야 합니다`;return`잘못된 옵션: ${vn(r.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{let t=r.inclusive?"이하":"미만",n="미만"===t?"이어야 합니다":"여야 합니다",i=e[r.origin]??null,a=i?.unit??"요소";if(i)return`${r.origin??"값"}이 너무 큽니다: ${r.maximum.toString()}${a} ${t}${n}`;return`${r.origin??"값"}이 너무 큽니다: ${r.maximum.toString()} ${t}${n}`}case"too_small":{let t=r.inclusive?"이상":"초과",n="이상"===t?"이어야 합니다":"여야 합니다",i=e[r.origin]??null,a=i?.unit??"요소";if(i)return`${r.origin??"값"}이 너무 작습니다: ${r.minimum.toString()}${a} ${t}${n}`;return`${r.origin??"값"}이 너무 작습니다: ${r.minimum.toString()} ${t}${n}`}case"invalid_format":if("starts_with"===r.format)return`잘못된 문자열: "${r.prefix}"(으)로 시작해야 합니다`;if("ends_with"===r.format)return`잘못된 문자열: "${r.suffix}"(으)로 끝나야 합니다`;if("includes"===r.format)return`잘못된 문자열: "${r.includes}"을(를) 포함해야 합니다`;if("regex"===r.format)return`잘못된 문자열: 정규식 ${r.pattern} 패턴과 일치해야 합니다`;return`잘못된 ${t[r.format]??r.format}`;case"not_multiple_of":return`잘못된 숫자: ${r.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${vn(r.keys,", ")}`;case"invalid_key":return`잘못된 키: ${r.origin}`;case"invalid_union":default:return"잘못된 입력";case"invalid_element":return`잘못된 값: ${r.origin}`}})}},"lt",0,function(){return{localeError:(()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simbolių"},verb:{smaller:{inclusive:"turi būti ne ilgesnė kaip",notInclusive:"turi būti trumpesnė kaip"},bigger:{inclusive:"turi būti ne trumpesnė kaip",notInclusive:"turi būti ilgesnė kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"baitų"},verb:{smaller:{inclusive:"turi būti ne didesnis kaip",notInclusive:"turi būti mažesnis kaip"},bigger:{inclusive:"turi būti ne mažesnis kaip",notInclusive:"turi būti didesnis kaip"}}},array:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}},set:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}}};function t(t,n,r,i){let a=e[t]??null;return null===a?a:{unit:a.unit[n],verb:a.verb[i][r?"inclusive":"notInclusive"]}}let n={regex:"įvestis",email:"el. pašto adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukmė",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 užkoduota eilutė",base64url:"base64url užkoduota eilutė",json_string:"JSON eilutė",e164:"E.164 numeris",jwt:"JWT",template_literal:"įvestis"},r={nan:"NaN",number:"skaičius",bigint:"sveikasis skaičius",string:"eilutė",boolean:"loginė reikšmė",undefined:"neapibrėžta reikšmė",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulinė reikšmė"};return e=>{switch(e.code){case"invalid_type":{let t=r[e.expected]??e.expected,n=vD(e.input),i=r[n]??n;if(/^[A-Z]/.test(e.expected))return`Gautas tipas ${i}, o tikėtasi - instanceof ${e.expected}`;return`Gautas tipas ${i}, o tikėtasi - ${t}`}case"invalid_value":if(1===e.values.length)return`Privalo būti ${vk(e.values[0])}`;return`Privalo būti vienas iš ${vn(e.values,"|")} pasirinkimų`;case"too_big":{let n=r[e.origin]??e.origin,i=t(e.origin,bQ(Number(e.maximum)),e.inclusive??!1,"smaller");if(i?.verb)return`${bX(n??e.origin??"reikšmė")} ${i.verb} ${e.maximum.toString()} ${i.unit??"elementų"}`;let a=e.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${bX(n??e.origin??"reikšmė")} turi būti ${a} ${e.maximum.toString()} ${i?.unit}`}case"too_small":{let n=r[e.origin]??e.origin,i=t(e.origin,bQ(Number(e.minimum)),e.inclusive??!1,"bigger");if(i?.verb)return`${bX(n??e.origin??"reikšmė")} ${i.verb} ${e.minimum.toString()} ${i.unit??"elementų"}`;let a=e.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${bX(n??e.origin??"reikšmė")} turi būti ${a} ${e.minimum.toString()} ${i?.unit}`}case"invalid_format":if("starts_with"===e.format)return`Eilutė privalo prasidėti "${e.prefix}"`;if("ends_with"===e.format)return`Eilutė privalo pasibaigti "${e.suffix}"`;if("includes"===e.format)return`Eilutė privalo įtraukti "${e.includes}"`;if("regex"===e.format)return`Eilutė privalo atitikti ${e.pattern}`;return`Neteisingas ${n[e.format]??e.format}`;case"not_multiple_of":return`Skaičius privalo būti ${e.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${e.keys.length>1?"i":"as"} rakt${e.keys.length>1?"ai":"as"}: ${vn(e.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":default:return"Klaidinga įvestis";case"invalid_element":{let t=r[e.origin]??e.origin;return`${bX(t??e.origin??"reikšmė")} turi klaidingą įvestį`}}}})()}},"mk",0,function(){let e,t,n;return{localeError:(e={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}},t={regex:"внес",email:"адреса на е-пошта",url:"URL",emoji:"емоџи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO датум и време",date:"ISO датум",time:"ISO време",duration:"ISO времетраење",ipv4:"IPv4 адреса",ipv6:"IPv6 адреса",cidrv4:"IPv4 опсег",cidrv6:"IPv6 опсег",base64:"base64-енкодирана низа",base64url:"base64url-енкодирана низа",json_string:"JSON низа",e164:"E.164 број",jwt:"JWT",template_literal:"внес"},n={nan:"NaN",number:"број",array:"низа"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Грешен внес: се очекува instanceof ${r.expected}, примено ${i}`;return`Грешен внес: се очекува ${e}, примено ${i}`}case"invalid_value":if(1===r.values.length)return`Invalid input: expected ${vk(r.values[0])}`;return`Грешана опција: се очекува една ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Премногу голем: се очекува ${r.origin??"вредноста"} да има ${t}${r.maximum.toString()} ${n.unit??"елементи"}`;return`Премногу голем: се очекува ${r.origin??"вредноста"} да биде ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Премногу мал: се очекува ${r.origin} да има ${t}${r.minimum.toString()} ${n.unit}`;return`Премногу мал: се очекува ${r.origin} да биде ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Неважечка низа: мора да започнува со "${r.prefix}"`;if("ends_with"===r.format)return`Неважечка низа: мора да завршува со "${r.suffix}"`;if("includes"===r.format)return`Неважечка низа: мора да вклучува "${r.includes}"`;if("regex"===r.format)return`Неважечка низа: мора да одгоара на патернот ${r.pattern}`;return`Invalid ${t[r.format]??r.format}`;case"not_multiple_of":return`Грешен број: мора да биде делив со ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${vn(r.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${r.origin}`;case"invalid_union":default:return"Грешен внес";case"invalid_element":return`Грешна вредност во ${r.origin}`}})}},"ms",0,function(){let e,t,n;return{localeError:(e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}},t={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"nombor"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Input tidak sah: dijangka instanceof ${r.expected}, diterima ${i}`;return`Input tidak sah: dijangka ${e}, diterima ${i}`}case"invalid_value":if(1===r.values.length)return`Input tidak sah: dijangka ${vk(r.values[0])}`;return`Pilihan tidak sah: dijangka salah satu daripada ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Terlalu besar: dijangka ${r.origin??"nilai"} ${n.verb} ${t}${r.maximum.toString()} ${n.unit??"elemen"}`;return`Terlalu besar: dijangka ${r.origin??"nilai"} adalah ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Terlalu kecil: dijangka ${r.origin} ${n.verb} ${t}${r.minimum.toString()} ${n.unit}`;return`Terlalu kecil: dijangka ${r.origin} adalah ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`String tidak sah: mesti bermula dengan "${r.prefix}"`;if("ends_with"===r.format)return`String tidak sah: mesti berakhir dengan "${r.suffix}"`;if("includes"===r.format)return`String tidak sah: mesti mengandungi "${r.includes}"`;if("regex"===r.format)return`String tidak sah: mesti sepadan dengan corak ${r.pattern}`;return`${t[r.format]??r.format} tidak sah`;case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${vn(r.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${r.origin}`;case"invalid_union":default:return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${r.origin}`}})}},"nl",0,function(){let e,t,n;return{localeError:(e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}},t={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},n={nan:"NaN",number:"getal"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Ongeldige invoer: verwacht instanceof ${r.expected}, ontving ${i}`;return`Ongeldige invoer: verwacht ${e}, ontving ${i}`}case"invalid_value":if(1===r.values.length)return`Ongeldige invoer: verwacht ${vk(r.values[0])}`;return`Ongeldige optie: verwacht \xe9\xe9n van ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null,i="date"===r.origin?"laat":"string"===r.origin?"lang":"groot";if(n)return`Te ${i}: verwacht dat ${r.origin??"waarde"} ${t}${r.maximum.toString()} ${n.unit??"elementen"} ${n.verb}`;return`Te ${i}: verwacht dat ${r.origin??"waarde"} ${t}${r.maximum.toString()} is`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null,i="date"===r.origin?"vroeg":"string"===r.origin?"kort":"klein";if(n)return`Te ${i}: verwacht dat ${r.origin} ${t}${r.minimum.toString()} ${n.unit} ${n.verb}`;return`Te ${i}: verwacht dat ${r.origin} ${t}${r.minimum.toString()} is`}case"invalid_format":if("starts_with"===r.format)return`Ongeldige tekst: moet met "${r.prefix}" beginnen`;if("ends_with"===r.format)return`Ongeldige tekst: moet op "${r.suffix}" eindigen`;if("includes"===r.format)return`Ongeldige tekst: moet "${r.includes}" bevatten`;if("regex"===r.format)return`Ongeldige tekst: moet overeenkomen met patroon ${r.pattern}`;return`Ongeldig: ${t[r.format]??r.format}`;case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${r.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${r.keys.length>1?"s":""}: ${vn(r.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${r.origin}`;case"invalid_union":default:return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${r.origin}`}})}},"no",0,function(){let e,t,n;return{localeError:(e={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}},t={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"tall",array:"liste"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Ugyldig input: forventet instanceof ${r.expected}, fikk ${i}`;return`Ugyldig input: forventet ${e}, fikk ${i}`}case"invalid_value":if(1===r.values.length)return`Ugyldig verdi: forventet ${vk(r.values[0])}`;return`Ugyldig valg: forventet en av ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`For stor(t): forventet ${r.origin??"value"} til \xe5 ha ${t}${r.maximum.toString()} ${n.unit??"elementer"}`;return`For stor(t): forventet ${r.origin??"value"} til \xe5 ha ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`For lite(n): forventet ${r.origin} til \xe5 ha ${t}${r.minimum.toString()} ${n.unit}`;return`For lite(n): forventet ${r.origin} til \xe5 ha ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Ugyldig streng: m\xe5 starte med "${r.prefix}"`;if("ends_with"===r.format)return`Ugyldig streng: m\xe5 ende med "${r.suffix}"`;if("includes"===r.format)return`Ugyldig streng: m\xe5 inneholde "${r.includes}"`;if("regex"===r.format)return`Ugyldig streng: m\xe5 matche m\xf8nsteret ${r.pattern}`;return`Ugyldig ${t[r.format]??r.format}`;case"not_multiple_of":return`Ugyldig tall: m\xe5 v\xe6re et multiplum av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${vn(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xf8kkel i ${r.origin}`;case"invalid_union":default:return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${r.origin}`}})}},"ota",0,function(){let e,t,n;return{localeError:(e={string:{unit:"harf",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"unsur",verb:"olmalıdır"},set:{unit:"unsur",verb:"olmalıdır"}},t={regex:"giren",email:"epostagâh",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO hengâmı",date:"ISO tarihi",time:"ISO zamanı",duration:"ISO müddeti",ipv4:"IPv4 nişânı",ipv6:"IPv6 nişânı",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-şifreli metin",base64url:"base64url-şifreli metin",json_string:"JSON metin",e164:"E.164 sayısı",jwt:"JWT",template_literal:"giren"},n={nan:"NaN",number:"numara",array:"saf",null:"gayb"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`F\xe2sit giren: umulan instanceof ${r.expected}, alınan ${i}`;return`F\xe2sit giren: umulan ${e}, alınan ${i}`}case"invalid_value":if(1===r.values.length)return`F\xe2sit giren: umulan ${vk(r.values[0])}`;return`F\xe2sit tercih: m\xfbteberler ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Fazla b\xfcy\xfck: ${r.origin??"value"}, ${t}${r.maximum.toString()} ${n.unit??"elements"} sahip olmalıydı.`;return`Fazla b\xfcy\xfck: ${r.origin??"value"}, ${t}${r.maximum.toString()} olmalıydı.`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Fazla k\xfc\xe7\xfck: ${r.origin}, ${t}${r.minimum.toString()} ${n.unit} sahip olmalıydı.`;return`Fazla k\xfc\xe7\xfck: ${r.origin}, ${t}${r.minimum.toString()} olmalıydı.`}case"invalid_format":if("starts_with"===r.format)return`F\xe2sit metin: "${r.prefix}" ile başlamalı.`;if("ends_with"===r.format)return`F\xe2sit metin: "${r.suffix}" ile bitmeli.`;if("includes"===r.format)return`F\xe2sit metin: "${r.includes}" ihtiv\xe2 etmeli.`;if("regex"===r.format)return`F\xe2sit metin: ${r.pattern} nakşına uymalı.`;return`F\xe2sit ${t[r.format]??r.format}`;case"not_multiple_of":return`F\xe2sit sayı: ${r.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${r.keys.length>1?"s":""}: ${vn(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xe7in tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${r.origin} i\xe7in tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}})}},"pl",0,function(){let e,t,n;return{localeError:(e={string:{unit:"znaków",verb:"mieć"},file:{unit:"bajtów",verb:"mieć"},array:{unit:"elementów",verb:"mieć"},set:{unit:"elementów",verb:"mieć"}},t={regex:"wyrażenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ciąg znaków zakodowany w formacie base64",base64url:"ciąg znaków zakodowany w formacie base64url",json_string:"ciąg znaków w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wejście"},n={nan:"NaN",number:"liczba",array:"tablica"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${r.expected}, otrzymano ${i}`;return`Nieprawidłowe dane wejściowe: oczekiwano ${e}, otrzymano ${i}`}case"invalid_value":if(1===r.values.length)return`Nieprawidłowe dane wejściowe: oczekiwano ${vk(r.values[0])}`;return`Nieprawidłowa opcja: oczekiwano jednej z wartości ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Za duża wartość: oczekiwano, że ${r.origin??"wartość"} będzie mieć ${t}${r.maximum.toString()} ${n.unit??"elementów"}`;return`Zbyt duż(y/a/e): oczekiwano, że ${r.origin??"wartość"} będzie wynosić ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Za mała wartość: oczekiwano, że ${r.origin??"wartość"} będzie mieć ${t}${r.minimum.toString()} ${n.unit??"elementów"}`;return`Zbyt mał(y/a/e): oczekiwano, że ${r.origin??"wartość"} będzie wynosić ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Nieprawidłowy ciąg znak\xf3w: musi zaczynać się od "${r.prefix}"`;if("ends_with"===r.format)return`Nieprawidłowy ciąg znak\xf3w: musi kończyć się na "${r.suffix}"`;if("includes"===r.format)return`Nieprawidłowy ciąg znak\xf3w: musi zawierać "${r.includes}"`;if("regex"===r.format)return`Nieprawidłowy ciąg znak\xf3w: musi odpowiadać wzorcowi ${r.pattern}`;return`Nieprawidłow(y/a/e) ${t[r.format]??r.format}`;case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${r.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${r.keys.length>1?"s":""}: ${vn(r.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${r.origin}`;case"invalid_union":default:return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${r.origin}`}})}},"ps",0,function(){let e,t,n;return{localeError:(e={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}},t={regex:"ورودي",email:"بریښنالیک",url:"یو آر ال",emoji:"ایموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"نیټه او وخت",date:"نېټه",time:"وخت",duration:"موده",ipv4:"د IPv4 پته",ipv6:"د IPv6 پته",cidrv4:"د IPv4 ساحه",cidrv6:"د IPv6 ساحه",base64:"base64-encoded متن",base64url:"base64url-encoded متن",json_string:"JSON متن",e164:"د E.164 شمېره",jwt:"JWT",template_literal:"ورودي"},n={nan:"NaN",number:"عدد",array:"ارې"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`ناسم ورودي: باید instanceof ${r.expected} وای, مګر ${i} ترلاسه شو`;return`ناسم ورودي: باید ${e} وای, مګر ${i} ترلاسه شو`}case"invalid_value":if(1===r.values.length)return`ناسم ورودي: باید ${vk(r.values[0])} وای`;return`ناسم انتخاب: باید یو له ${vn(r.values,"|")} څخه وای`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`ډیر لوی: ${r.origin??"ارزښت"} باید ${t}${r.maximum.toString()} ${n.unit??"عنصرونه"} ولري`;return`ډیر لوی: ${r.origin??"ارزښت"} باید ${t}${r.maximum.toString()} وي`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`ډیر کوچنی: ${r.origin} باید ${t}${r.minimum.toString()} ${n.unit} ولري`;return`ډیر کوچنی: ${r.origin} باید ${t}${r.minimum.toString()} وي`}case"invalid_format":if("starts_with"===r.format)return`ناسم متن: باید د "${r.prefix}" سره پیل شي`;if("ends_with"===r.format)return`ناسم متن: باید د "${r.suffix}" سره پای ته ورسيږي`;if("includes"===r.format)return`ناسم متن: باید "${r.includes}" ولري`;if("regex"===r.format)return`ناسم متن: باید د ${r.pattern} سره مطابقت ولري`;return`${t[r.format]??r.format} ناسم دی`;case"not_multiple_of":return`ناسم عدد: باید د ${r.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${r.keys.length>1?"کلیډونه":"کلیډ"}: ${vn(r.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${r.origin} کې`;case"invalid_union":default:return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${r.origin} کې`}})}},"pt",0,function(){let e,t,n;return{localeError:(e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}},t={regex:"padrão",email:"endereço de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"duração ISO",ipv4:"endereço IPv4",ipv6:"endereço IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},n={nan:"NaN",number:"número",null:"nulo"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Tipo inv\xe1lido: esperado instanceof ${r.expected}, recebido ${i}`;return`Tipo inv\xe1lido: esperado ${e}, recebido ${i}`}case"invalid_value":if(1===r.values.length)return`Entrada inv\xe1lida: esperado ${vk(r.values[0])}`;return`Op\xe7\xe3o inv\xe1lida: esperada uma das ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Muito grande: esperado que ${r.origin??"valor"} tivesse ${t}${r.maximum.toString()} ${n.unit??"elementos"}`;return`Muito grande: esperado que ${r.origin??"valor"} fosse ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Muito pequeno: esperado que ${r.origin} tivesse ${t}${r.minimum.toString()} ${n.unit}`;return`Muito pequeno: esperado que ${r.origin} fosse ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Texto inv\xe1lido: deve come\xe7ar com "${r.prefix}"`;if("ends_with"===r.format)return`Texto inv\xe1lido: deve terminar com "${r.suffix}"`;if("includes"===r.format)return`Texto inv\xe1lido: deve incluir "${r.includes}"`;if("regex"===r.format)return`Texto inv\xe1lido: deve corresponder ao padr\xe3o ${r.pattern}`;return`${t[r.format]??r.format} inv\xe1lido`;case"not_multiple_of":return`N\xfamero inv\xe1lido: deve ser m\xfaltiplo de ${r.divisor}`;case"unrecognized_keys":return`Chave${r.keys.length>1?"s":""} desconhecida${r.keys.length>1?"s":""}: ${vn(r.keys,", ")}`;case"invalid_key":return`Chave inv\xe1lida em ${r.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inv\xe1lido em ${r.origin}`;default:return"Campo inválido"}})}},"ru",0,function(){let e,t,n;return{localeError:(e={string:{unit:{one:"символ",few:"символа",many:"символов"},verb:"иметь"},file:{unit:{one:"байт",few:"байта",many:"байт"},verb:"иметь"},array:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"},set:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"}},t={regex:"ввод",email:"email адрес",url:"URL",emoji:"эмодзи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата и время",date:"ISO дата",time:"ISO время",duration:"ISO длительность",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"строка в формате base64",base64url:"строка в формате base64url",json_string:"JSON строка",e164:"номер E.164",jwt:"JWT",template_literal:"ввод"},n={nan:"NaN",number:"число",array:"массив"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Неверный ввод: ожидалось instanceof ${r.expected}, получено ${i}`;return`Неверный ввод: ожидалось ${e}, получено ${i}`}case"invalid_value":if(1===r.values.length)return`Неверный ввод: ожидалось ${vk(r.values[0])}`;return`Неверный вариант: ожидалось одно из ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n){let e=b0(Number(r.maximum),n.unit.one,n.unit.few,n.unit.many);return`Слишком большое значение: ожидалось, что ${r.origin??"значение"} будет иметь ${t}${r.maximum.toString()} ${e}`}return`Слишком большое значение: ожидалось, что ${r.origin??"значение"} будет ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n){let e=b0(Number(r.minimum),n.unit.one,n.unit.few,n.unit.many);return`Слишком маленькое значение: ожидалось, что ${r.origin} будет иметь ${t}${r.minimum.toString()} ${e}`}return`Слишком маленькое значение: ожидалось, что ${r.origin} будет ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Неверная строка: должна начинаться с "${r.prefix}"`;if("ends_with"===r.format)return`Неверная строка: должна заканчиваться на "${r.suffix}"`;if("includes"===r.format)return`Неверная строка: должна содержать "${r.includes}"`;if("regex"===r.format)return`Неверная строка: должна соответствовать шаблону ${r.pattern}`;return`Неверный ${t[r.format]??r.format}`;case"not_multiple_of":return`Неверное число: должно быть кратным ${r.divisor}`;case"unrecognized_keys":return`Нераспознанн${r.keys.length>1?"ые":"ый"} ключ${r.keys.length>1?"и":""}: ${vn(r.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${r.origin}`;case"invalid_union":default:return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${r.origin}`}})}},"sl",0,function(){let e,t,n;return{localeError:(e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}},t={regex:"vnos",email:"e-poštni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in čas",date:"ISO datum",time:"ISO čas",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 številka",jwt:"JWT",template_literal:"vnos"},n={nan:"NaN",number:"število",array:"tabela"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Neveljaven vnos: pričakovano instanceof ${r.expected}, prejeto ${i}`;return`Neveljaven vnos: pričakovano ${e}, prejeto ${i}`}case"invalid_value":if(1===r.values.length)return`Neveljaven vnos: pričakovano ${vk(r.values[0])}`;return`Neveljavna možnost: pričakovano eno izmed ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Preveliko: pričakovano, da bo ${r.origin??"vrednost"} imelo ${t}${r.maximum.toString()} ${n.unit??"elementov"}`;return`Preveliko: pričakovano, da bo ${r.origin??"vrednost"} ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Premajhno: pričakovano, da bo ${r.origin} imelo ${t}${r.minimum.toString()} ${n.unit}`;return`Premajhno: pričakovano, da bo ${r.origin} ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Neveljaven niz: mora se začeti z "${r.prefix}"`;if("ends_with"===r.format)return`Neveljaven niz: mora se končati z "${r.suffix}"`;if("includes"===r.format)return`Neveljaven niz: mora vsebovati "${r.includes}"`;if("regex"===r.format)return`Neveljaven niz: mora ustrezati vzorcu ${r.pattern}`;return`Neveljaven ${t[r.format]??r.format}`;case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${r.divisor}`;case"unrecognized_keys":return`Neprepoznan${r.keys.length>1?"i ključi":" ključ"}: ${vn(r.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${r.origin}`;case"invalid_union":default:return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${r.origin}`}})}},"sv",0,function(){let e,t,n;return{localeError:(e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att innehålla"},set:{unit:"objekt",verb:"att innehålla"}},t={regex:"reguljärt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad sträng",base64url:"base64url-kodad sträng",json_string:"JSON-sträng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},n={nan:"NaN",number:"antal",array:"lista"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Ogiltig inmatning: f\xf6rv\xe4ntat instanceof ${r.expected}, fick ${i}`;return`Ogiltig inmatning: f\xf6rv\xe4ntat ${e}, fick ${i}`}case"invalid_value":if(1===r.values.length)return`Ogiltig inmatning: f\xf6rv\xe4ntat ${vk(r.values[0])}`;return`Ogiltigt val: f\xf6rv\xe4ntade en av ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`F\xf6r stor(t): f\xf6rv\xe4ntade ${r.origin??"värdet"} att ha ${t}${r.maximum.toString()} ${n.unit??"element"}`;return`F\xf6r stor(t): f\xf6rv\xe4ntat ${r.origin??"värdet"} att ha ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`F\xf6r lite(t): f\xf6rv\xe4ntade ${r.origin??"värdet"} att ha ${t}${r.minimum.toString()} ${n.unit}`;return`F\xf6r lite(t): f\xf6rv\xe4ntade ${r.origin??"värdet"} att ha ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Ogiltig str\xe4ng: m\xe5ste b\xf6rja med "${r.prefix}"`;if("ends_with"===r.format)return`Ogiltig str\xe4ng: m\xe5ste sluta med "${r.suffix}"`;if("includes"===r.format)return`Ogiltig str\xe4ng: m\xe5ste inneh\xe5lla "${r.includes}"`;if("regex"===r.format)return`Ogiltig str\xe4ng: m\xe5ste matcha m\xf6nstret "${r.pattern}"`;return`Ogiltig(t) ${t[r.format]??r.format}`;case"not_multiple_of":return`Ogiltigt tal: m\xe5ste vara en multipel av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${vn(r.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${r.origin??"värdet"}`;case"invalid_union":default:return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xe4rde i ${r.origin??"värdet"}`}})}},"ta",0,function(){let e,t,n;return{localeError:(e={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}},t={regex:"உள்ளீடு",email:"மின்னஞ்சல் முகவரி",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO தேதி நேரம்",date:"ISO தேதி",time:"ISO நேரம்",duration:"ISO கால அளவு",ipv4:"IPv4 முகவரி",ipv6:"IPv6 முகவரி",cidrv4:"IPv4 வரம்பு",cidrv6:"IPv6 வரம்பு",base64:"base64-encoded சரம்",base64url:"base64url-encoded சரம்",json_string:"JSON சரம்",e164:"E.164 எண்",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"எண்",array:"அணி",null:"வெறுமை"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${r.expected}, பெறப்பட்டது ${i}`;return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${e}, பெறப்பட்டது ${i}`}case"invalid_value":if(1===r.values.length)return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${vk(r.values[0])}`;return`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${vn(r.values,"|")} இல் ஒன்று`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${r.origin??"மதிப்பு"} ${t}${r.maximum.toString()} ${n.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`;return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${r.origin??"மதிப்பு"} ${t}${r.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${r.origin} ${t}${r.minimum.toString()} ${n.unit} ஆக இருக்க வேண்டும்`;return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${r.origin} ${t}${r.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":if("starts_with"===r.format)return`தவறான சரம்: "${r.prefix}" இல் தொடங்க வேண்டும்`;if("ends_with"===r.format)return`தவறான சரம்: "${r.suffix}" இல் முடிவடைய வேண்டும்`;if("includes"===r.format)return`தவறான சரம்: "${r.includes}" ஐ உள்ளடக்க வேண்டும்`;if("regex"===r.format)return`தவறான சரம்: ${r.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`;return`தவறான ${t[r.format]??r.format}`;case"not_multiple_of":return`தவறான எண்: ${r.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${r.keys.length>1?"கள்":""}: ${vn(r.keys,", ")}`;case"invalid_key":return`${r.origin} இல் தவறான விசை`;case"invalid_union":default:return"தவறான உள்ளீடு";case"invalid_element":return`${r.origin} இல் தவறான மதிப்பு`}})}},"th",0,function(){let e,t,n;return{localeError:(e={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}},t={regex:"ข้อมูลที่ป้อน",email:"ที่อยู่อีเมล",url:"URL",emoji:"อิโมจิ",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"วันที่เวลาแบบ ISO",date:"วันที่แบบ ISO",time:"เวลาแบบ ISO",duration:"ช่วงเวลาแบบ ISO",ipv4:"ที่อยู่ IPv4",ipv6:"ที่อยู่ IPv6",cidrv4:"ช่วง IP แบบ IPv4",cidrv6:"ช่วง IP แบบ IPv6",base64:"ข้อความแบบ Base64",base64url:"ข้อความแบบ Base64 สำหรับ URL",json_string:"ข้อความแบบ JSON",e164:"เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",jwt:"โทเคน JWT",template_literal:"ข้อมูลที่ป้อน"},n={nan:"NaN",number:"ตัวเลข",array:"อาร์เรย์ (Array)",null:"ไม่มีค่า (null)"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${r.expected} แต่ได้รับ ${i}`;return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${e} แต่ได้รับ ${i}`}case"invalid_value":if(1===r.values.length)return`ค่าไม่ถูกต้อง: ควรเป็น ${vk(r.values[0])}`;return`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"ไม่เกิน":"น้อยกว่า",n=e[r.origin]??null;if(n)return`เกินกำหนด: ${r.origin??"ค่า"} ควรมี${t} ${r.maximum.toString()} ${n.unit??"รายการ"}`;return`เกินกำหนด: ${r.origin??"ค่า"} ควรมี${t} ${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?"อย่างน้อย":"มากกว่า",n=e[r.origin]??null;if(n)return`น้อยกว่ากำหนด: ${r.origin} ควรมี${t} ${r.minimum.toString()} ${n.unit}`;return`น้อยกว่ากำหนด: ${r.origin} ควรมี${t} ${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${r.prefix}"`;if("ends_with"===r.format)return`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${r.suffix}"`;if("includes"===r.format)return`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${r.includes}" อยู่ในข้อความ`;if("regex"===r.format)return`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${r.pattern}`;return`รูปแบบไม่ถูกต้อง: ${t[r.format]??r.format}`;case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${r.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${vn(r.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${r.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${r.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}})}},"tr",0,function(){let e,t,n;return{localeError:(e={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}},t={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO süre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aralığı",cidrv6:"IPv6 aralığı",base64:"base64 ile şifrelenmiş metin",base64url:"base64url ile şifrelenmiş metin",json_string:"JSON dizesi",e164:"E.164 sayısı",jwt:"JWT",template_literal:"Şablon dizesi"},n={nan:"NaN"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Ge\xe7ersiz değer: beklenen instanceof ${r.expected}, alınan ${i}`;return`Ge\xe7ersiz değer: beklenen ${e}, alınan ${i}`}case"invalid_value":if(1===r.values.length)return`Ge\xe7ersiz değer: beklenen ${vk(r.values[0])}`;return`Ge\xe7ersiz se\xe7enek: aşağıdakilerden biri olmalı: ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`\xc7ok b\xfcy\xfck: beklenen ${r.origin??"değer"} ${t}${r.maximum.toString()} ${n.unit??"öğe"}`;return`\xc7ok b\xfcy\xfck: beklenen ${r.origin??"değer"} ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`\xc7ok k\xfc\xe7\xfck: beklenen ${r.origin} ${t}${r.minimum.toString()} ${n.unit}`;return`\xc7ok k\xfc\xe7\xfck: beklenen ${r.origin} ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Ge\xe7ersiz metin: "${r.prefix}" ile başlamalı`;if("ends_with"===r.format)return`Ge\xe7ersiz metin: "${r.suffix}" ile bitmeli`;if("includes"===r.format)return`Ge\xe7ersiz metin: "${r.includes}" i\xe7ermeli`;if("regex"===r.format)return`Ge\xe7ersiz metin: ${r.pattern} desenine uymalı`;return`Ge\xe7ersiz ${t[r.format]??r.format}`;case"not_multiple_of":return`Ge\xe7ersiz sayı: ${r.divisor} ile tam b\xf6l\xfcnebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${r.keys.length>1?"lar":""}: ${vn(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xe7inde ge\xe7ersiz anahtar`;case"invalid_union":default:return"Geçersiz değer";case"invalid_element":return`${r.origin} i\xe7inde ge\xe7ersiz değer`}})}},"ua",0,function(){return b1()},"uk",0,b1,"ur",0,function(){let e,t,n;return{localeError:(e={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}},t={regex:"ان پٹ",email:"ای میل ایڈریس",url:"یو آر ایل",emoji:"ایموجی",uuid:"یو یو آئی ڈی",uuidv4:"یو یو آئی ڈی وی 4",uuidv6:"یو یو آئی ڈی وی 6",nanoid:"نینو آئی ڈی",guid:"جی یو آئی ڈی",cuid:"سی یو آئی ڈی",cuid2:"سی یو آئی ڈی 2",ulid:"یو ایل آئی ڈی",xid:"ایکس آئی ڈی",ksuid:"کے ایس یو آئی ڈی",datetime:"آئی ایس او ڈیٹ ٹائم",date:"آئی ایس او تاریخ",time:"آئی ایس او وقت",duration:"آئی ایس او مدت",ipv4:"آئی پی وی 4 ایڈریس",ipv6:"آئی پی وی 6 ایڈریس",cidrv4:"آئی پی وی 4 رینج",cidrv6:"آئی پی وی 6 رینج",base64:"بیس 64 ان کوڈڈ سٹرنگ",base64url:"بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",json_string:"جے ایس او این سٹرنگ",e164:"ای 164 نمبر",jwt:"جے ڈبلیو ٹی",template_literal:"ان پٹ"},n={nan:"NaN",number:"نمبر",array:"آرے",null:"نل"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`غلط ان پٹ: instanceof ${r.expected} متوقع تھا، ${i} موصول ہوا`;return`غلط ان پٹ: ${e} متوقع تھا، ${i} موصول ہوا`}case"invalid_value":if(1===r.values.length)return`غلط ان پٹ: ${vk(r.values[0])} متوقع تھا`;return`غلط آپشن: ${vn(r.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`بہت بڑا: ${r.origin??"ویلیو"} کے ${t}${r.maximum.toString()} ${n.unit??"عناصر"} ہونے متوقع تھے`;return`بہت بڑا: ${r.origin??"ویلیو"} کا ${t}${r.maximum.toString()} ہونا متوقع تھا`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`بہت چھوٹا: ${r.origin} کے ${t}${r.minimum.toString()} ${n.unit} ہونے متوقع تھے`;return`بہت چھوٹا: ${r.origin} کا ${t}${r.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":if("starts_with"===r.format)return`غلط سٹرنگ: "${r.prefix}" سے شروع ہونا چاہیے`;if("ends_with"===r.format)return`غلط سٹرنگ: "${r.suffix}" پر ختم ہونا چاہیے`;if("includes"===r.format)return`غلط سٹرنگ: "${r.includes}" شامل ہونا چاہیے`;if("regex"===r.format)return`غلط سٹرنگ: پیٹرن ${r.pattern} سے میچ ہونا چاہیے`;return`غلط ${t[r.format]??r.format}`;case"not_multiple_of":return`غلط نمبر: ${r.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${r.keys.length>1?"ز":""}: ${vn(r.keys,"، ")}`;case"invalid_key":return`${r.origin} میں غلط کی`;case"invalid_union":default:return"غلط ان پٹ";case"invalid_element":return`${r.origin} میں غلط ویلیو`}})}},"uz",0,function(){let e,t,n;return{localeError:(e={string:{unit:"belgi",verb:"bo‘lishi kerak"},file:{unit:"bayt",verb:"bo‘lishi kerak"},array:{unit:"element",verb:"bo‘lishi kerak"},set:{unit:"element",verb:"bo‘lishi kerak"}},t={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},n={nan:"NaN",number:"raqam",array:"massiv"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Noto‘g‘ri kirish: kutilgan instanceof ${r.expected}, qabul qilingan ${i}`;return`Noto‘g‘ri kirish: kutilgan ${e}, qabul qilingan ${i}`}case"invalid_value":if(1===r.values.length)return`Noto‘g‘ri kirish: kutilgan ${vk(r.values[0])}`;return`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Juda katta: kutilgan ${r.origin??"qiymat"} ${t}${r.maximum.toString()} ${n.unit} ${n.verb}`;return`Juda katta: kutilgan ${r.origin??"qiymat"} ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Juda kichik: kutilgan ${r.origin} ${t}${r.minimum.toString()} ${n.unit} ${n.verb}`;return`Juda kichik: kutilgan ${r.origin} ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Noto‘g‘ri satr: "${r.prefix}" bilan boshlanishi kerak`;if("ends_with"===r.format)return`Noto‘g‘ri satr: "${r.suffix}" bilan tugashi kerak`;if("includes"===r.format)return`Noto‘g‘ri satr: "${r.includes}" ni o‘z ichiga olishi kerak`;if("regex"===r.format)return`Noto‘g‘ri satr: ${r.pattern} shabloniga mos kelishi kerak`;return`Noto‘g‘ri ${t[r.format]??r.format}`;case"not_multiple_of":return`Noto‘g‘ri raqam: ${r.divisor} ning karralisi bo‘lishi kerak`;case"unrecognized_keys":return`Noma’lum kalit${r.keys.length>1?"lar":""}: ${vn(r.keys,", ")}`;case"invalid_key":return`${r.origin} dagi kalit noto‘g‘ri`;case"invalid_union":default:return"Noto‘g‘ri kirish";case"invalid_element":return`${r.origin} da noto‘g‘ri qiymat`}})}},"vi",0,function(){let e,t,n;return{localeError:(e={string:{unit:"ký tự",verb:"có"},file:{unit:"byte",verb:"có"},array:{unit:"phần tử",verb:"có"},set:{unit:"phần tử",verb:"có"}},t={regex:"đầu vào",email:"địa chỉ email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ngày giờ ISO",date:"ngày ISO",time:"giờ ISO",duration:"khoảng thời gian ISO",ipv4:"địa chỉ IPv4",ipv6:"địa chỉ IPv6",cidrv4:"dải IPv4",cidrv6:"dải IPv6",base64:"chuỗi mã hóa base64",base64url:"chuỗi mã hóa base64url",json_string:"chuỗi JSON",e164:"số E.164",jwt:"JWT",template_literal:"đầu vào"},n={nan:"NaN",number:"số",array:"mảng"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`Đầu v\xe0o kh\xf4ng hợp lệ: mong đợi instanceof ${r.expected}, nhận được ${i}`;return`Đầu v\xe0o kh\xf4ng hợp lệ: mong đợi ${e}, nhận được ${i}`}case"invalid_value":if(1===r.values.length)return`Đầu v\xe0o kh\xf4ng hợp lệ: mong đợi ${vk(r.values[0])}`;return`T\xf9y chọn kh\xf4ng hợp lệ: mong đợi một trong c\xe1c gi\xe1 trị ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Qu\xe1 lớn: mong đợi ${r.origin??"giá trị"} ${n.verb} ${t}${r.maximum.toString()} ${n.unit??"phần tử"}`;return`Qu\xe1 lớn: mong đợi ${r.origin??"giá trị"} ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Qu\xe1 nhỏ: mong đợi ${r.origin} ${n.verb} ${t}${r.minimum.toString()} ${n.unit}`;return`Qu\xe1 nhỏ: mong đợi ${r.origin} ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Chuỗi kh\xf4ng hợp lệ: phải bắt đầu bằng "${r.prefix}"`;if("ends_with"===r.format)return`Chuỗi kh\xf4ng hợp lệ: phải kết th\xfac bằng "${r.suffix}"`;if("includes"===r.format)return`Chuỗi kh\xf4ng hợp lệ: phải bao gồm "${r.includes}"`;if("regex"===r.format)return`Chuỗi kh\xf4ng hợp lệ: phải khớp với mẫu ${r.pattern}`;return`${t[r.format]??r.format} kh\xf4ng hợp lệ`;case"not_multiple_of":return`Số kh\xf4ng hợp lệ: phải l\xe0 bội số của ${r.divisor}`;case"unrecognized_keys":return`Kh\xf3a kh\xf4ng được nhận dạng: ${vn(r.keys,", ")}`;case"invalid_key":return`Kh\xf3a kh\xf4ng hợp lệ trong ${r.origin}`;case"invalid_union":default:return"Đầu vào không hợp lệ";case"invalid_element":return`Gi\xe1 trị kh\xf4ng hợp lệ trong ${r.origin}`}})}},"yo",0,function(){let e,t,n;return{localeError:(e={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"}},t={regex:"ẹ̀rọ ìbáwọlé",email:"àdírẹ́sì ìmẹ́lì",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:"àkókò ISO",date:"ọjọ́ ISO",time:"àkókò ISO",duration:"àkókò tó pé ISO",ipv4:"àdírẹ́sì IPv4",ipv6:"àdírẹ́sì IPv6",cidrv4:"àgbègbè IPv4",cidrv6:"àgbègbè IPv6",base64:"ọ̀rọ̀ tí a kọ́ ní base64",base64url:"ọ̀rọ̀ base64url",json_string:"ọ̀rọ̀ JSON",e164:"nọ́mbà E.164",jwt:"JWT",template_literal:"ẹ̀rọ ìbáwọlé"},n={nan:"NaN",number:"nọ́mbà",array:"akopọ"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`\xccb\xe1wọl\xe9 aṣ\xecṣe: a n\xed l\xe1ti fi instanceof ${r.expected}, \xe0mọ̀ a r\xed ${i}`;return`\xccb\xe1wọl\xe9 aṣ\xecṣe: a n\xed l\xe1ti fi ${e}, \xe0mọ̀ a r\xed ${i}`}case"invalid_value":if(1===r.values.length)return`\xccb\xe1wọl\xe9 aṣ\xecṣe: a n\xed l\xe1ti fi ${vk(r.values[0])}`;return`\xc0ṣ\xe0y\xe0n aṣ\xecṣe: yan ọ̀kan l\xe1ra ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`T\xf3 pọ̀ j\xf9: a n\xed l\xe1ti jẹ́ p\xe9 ${r.origin??"iye"} ${n.verb} ${t}${r.maximum} ${n.unit}`;return`T\xf3 pọ̀ j\xf9: a n\xed l\xe1ti jẹ́ ${t}${r.maximum}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`K\xe9r\xe9 ju: a n\xed l\xe1ti jẹ́ p\xe9 ${r.origin} ${n.verb} ${t}${r.minimum} ${n.unit}`;return`K\xe9r\xe9 ju: a n\xed l\xe1ti jẹ́ ${t}${r.minimum}`}case"invalid_format":if("starts_with"===r.format)return`Ọ̀rọ̀ aṣ\xecṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀l\xfa "${r.prefix}"`;if("ends_with"===r.format)return`Ọ̀rọ̀ aṣ\xecṣe: gbọ́dọ̀ par\xed pẹ̀l\xfa "${r.suffix}"`;if("includes"===r.format)return`Ọ̀rọ̀ aṣ\xecṣe: gbọ́dọ̀ n\xed "${r.includes}"`;if("regex"===r.format)return`Ọ̀rọ̀ aṣ\xecṣe: gbọ́dọ̀ b\xe1 \xe0pẹẹrẹ mu ${r.pattern}`;return`Aṣ\xecṣe: ${t[r.format]??r.format}`;case"not_multiple_of":return`Nọ́mb\xe0 aṣ\xecṣe: gbọ́dọ̀ jẹ́ \xe8y\xe0 p\xedp\xedn ti ${r.divisor}`;case"unrecognized_keys":return`Bọt\xecn\xec \xe0\xecmọ̀: ${vn(r.keys,", ")}`;case"invalid_key":return`Bọt\xecn\xec aṣ\xecṣe n\xedn\xfa ${r.origin}`;case"invalid_union":default:return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣ\xecṣe n\xedn\xfa ${r.origin}`}})}},"zhCN",0,function(){let e,t,n;return{localeError:(e={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}},t={regex:"输入",email:"电子邮件",url:"URL",emoji:"表情符号",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日期时间",date:"ISO日期",time:"ISO时间",duration:"ISO时长",ipv4:"IPv4地址",ipv6:"IPv6地址",cidrv4:"IPv4网段",cidrv6:"IPv6网段",base64:"base64编码字符串",base64url:"base64url编码字符串",json_string:"JSON字符串",e164:"E.164号码",jwt:"JWT",template_literal:"输入"},n={nan:"NaN",number:"数字",array:"数组",null:"空值(null)"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`无效输入:期望 instanceof ${r.expected},实际接收 ${i}`;return`无效输入:期望 ${e},实际接收 ${i}`}case"invalid_value":if(1===r.values.length)return`无效输入:期望 ${vk(r.values[0])}`;return`无效选项:期望以下之一 ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`数值过大:期望 ${r.origin??"值"} ${t}${r.maximum.toString()} ${n.unit??"个元素"}`;return`数值过大:期望 ${r.origin??"值"} ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`数值过小:期望 ${r.origin} ${t}${r.minimum.toString()} ${n.unit}`;return`数值过小:期望 ${r.origin} ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`无效字符串:必须以 "${r.prefix}" 开头`;if("ends_with"===r.format)return`无效字符串:必须以 "${r.suffix}" 结尾`;if("includes"===r.format)return`无效字符串:必须包含 "${r.includes}"`;if("regex"===r.format)return`无效字符串:必须满足正则表达式 ${r.pattern}`;return`无效${t[r.format]??r.format}`;case"not_multiple_of":return`无效数字:必须是 ${r.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${vn(r.keys,", ")}`;case"invalid_key":return`${r.origin} 中的键(key)无效`;case"invalid_union":default:return"无效输入";case"invalid_element":return`${r.origin} 中包含无效值(value)`}})}},"zhTW",0,function(){let e,t,n;return{localeError:(e={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}},t={regex:"輸入",email:"郵件地址",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 日期時間",date:"ISO 日期",time:"ISO 時間",duration:"ISO 期間",ipv4:"IPv4 位址",ipv6:"IPv6 位址",cidrv4:"IPv4 範圍",cidrv6:"IPv6 範圍",base64:"base64 編碼字串",base64url:"base64url 編碼字串",json_string:"JSON 字串",e164:"E.164 數值",jwt:"JWT",template_literal:"輸入"},n={nan:"NaN"},r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=vD(r.input),i=n[t]??t;if(/^[A-Z]/.test(r.expected))return`無效的輸入值:預期為 instanceof ${r.expected},但收到 ${i}`;return`無效的輸入值:預期為 ${e},但收到 ${i}`}case"invalid_value":if(1===r.values.length)return`無效的輸入值:預期為 ${vk(r.values[0])}`;return`無效的選項:預期為以下其中之一 ${vn(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`數值過大:預期 ${r.origin??"值"} 應為 ${t}${r.maximum.toString()} ${n.unit??"個元素"}`;return`數值過大:預期 ${r.origin??"值"} 應為 ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`數值過小:預期 ${r.origin} 應為 ${t}${r.minimum.toString()} ${n.unit}`;return`數值過小:預期 ${r.origin} 應為 ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`無效的字串:必須以 "${r.prefix}" 開頭`;if("ends_with"===r.format)return`無效的字串:必須以 "${r.suffix}" 結尾`;if("includes"===r.format)return`無效的字串:必須包含 "${r.includes}"`;if("regex"===r.format)return`無效的字串:必須符合格式 ${r.pattern}`;return`無效的 ${t[r.format]??r.format}`;case"not_multiple_of":return`無效的數字:必須為 ${r.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${r.keys.length>1?"們":""}:${vn(r.keys,"、")}`;case"invalid_key":return`${r.origin} 中有無效的鍵值`;case"invalid_union":default:return"無效的輸入值";case"invalid_element":return`${r.origin} 中有無效的值`}})}}],54580);var IZ=e.i(54580);e.i(25527),e.i(98530),e.i(50215),e.i(34966),e.s([],18249);var IA=e.i(18249);e.s(["$ZodAny",0,y4,"$ZodArray",0,y8,"$ZodAsyncError",0,g9,"$ZodBase64",0,yM,"$ZodBase64URL",0,yB,"$ZodBigInt",0,yY,"$ZodBigIntFormat",0,yX,"$ZodBoolean",0,yq,"$ZodCIDRv4",0,yA,"$ZodCIDRv6",0,yR,"$ZodCUID",0,yI,"$ZodCUID2",0,yj,"$ZodCatch",0,bT,"$ZodCheck",0,x1,"$ZodCheckBigIntFormat",0,x9,"$ZodCheckEndsWith",0,yd,"$ZodCheckGreaterThan",0,x2,"$ZodCheckIncludes",0,yl,"$ZodCheckLengthEquals",0,yr,"$ZodCheckLessThan",0,x6,"$ZodCheckLowerCase",0,yo,"$ZodCheckMaxLength",0,yt,"$ZodCheckMaxSize",0,x8,"$ZodCheckMimeType",0,yf,"$ZodCheckMinLength",0,yn,"$ZodCheckMinSize",0,x7,"$ZodCheckMultipleOf",0,x5,"$ZodCheckNumberFormat",0,x3,"$ZodCheckOverwrite",0,yp,"$ZodCheckProperty",0,ym,"$ZodCheckRegex",0,ya,"$ZodCheckSizeEquals",0,ye,"$ZodCheckStartsWith",0,yu,"$ZodCheckStringFormat",0,yi,"$ZodCheckUpperCase",0,ys,"$ZodCodec",0,bP,"$ZodCustom",0,bH,"$ZodCustomStringFormat",0,yJ,"$ZodDate",0,y3,"$ZodDefault",0,bI,"$ZodDiscriminatedUnion",0,bl,"$ZodE164",0,yW,"$ZodEmail",0,y$,"$ZodEmoji",0,yk,"$ZodEncodeError",0,g8,"$ZodEnum",0,bx,"$ZodError",0,vR,"$ZodExactOptional",0,bk,"$ZodFile",0,bb,"$ZodFunction",0,bF,"$ZodGUID",0,yb,"$ZodIPv4",0,yU,"$ZodIPv6",0,yP,"$ZodISODate",0,yT,"$ZodISODateTime",0,yO,"$ZodISODuration",0,yD,"$ZodISOTime",0,yC,"$ZodIntersection",0,bu,"$ZodJWT",0,yV,"$ZodKSUID",0,yE,"$ZodLazy",0,bW,"$ZodLiteral",0,by,"$ZodMAC",0,yZ,"$ZodMap",0,bp,"$ZodNaN",0,bC,"$ZodNanoID",0,yS,"$ZodNever",0,y2,"$ZodNonOptional",0,bz,"$ZodNull",0,y1,"$ZodNullable",0,bS,"$ZodNumber",0,yG,"$ZodNumberFormat",0,yK,"$ZodObject",0,bn,"$ZodObjectJIT",0,br,"$ZodOptional",0,bw,"$ZodPipe",0,bD,"$ZodPrefault",0,bN,"$ZodPromise",0,bB,"$ZodReadonly",0,bR,"$ZodRealError",0,vL,"$ZodRecord",0,bf,"$ZodRegistry",0,b2,"$ZodSet",0,bg,"$ZodString",0,yx,"$ZodStringFormat",0,yy,"$ZodSuccess",0,bO,"$ZodSymbol",0,yQ,"$ZodTemplateLiteral",0,bM,"$ZodTransform",0,b_,"$ZodTuple",0,bc,"$ZodType",0,yv,"$ZodULID",0,yN,"$ZodURL",0,yw,"$ZodUUID",0,y_,"$ZodUndefined",0,y0,"$ZodUnion",0,ba,"$ZodUnknown",0,y6,"$ZodVoid",0,y5,"$ZodXID",0,yz,"$ZodXor",0,bs,"$brand",0,g3,"$constructor",0,g5,"$input",0,b6,"$output",0,b4,"Doc",0,yh,"JSONSchema",0,IA,"JSONSchemaGenerator",0,class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let t=e?.target??"draft-2020-12";"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),this.ctx=$G({processors:wE,target:t,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,t={path:[],schemaPath:[]}){return $K(e,this.ctx,t)}emit(e,t){t&&(t.cycles&&(this.ctx.cycles=t.cycles),t.reused&&(this.ctx.reused=t.reused),t.external&&(this.ctx.external=t.external)),$q(this.ctx,e);let{"~standard":n,...r}=$Y(this.ctx,e);return r}},"NEVER",0,g2,"TimePrecision",0,_$,"_any",0,_B,"_array",0,$h,"_base64",0,_x,"_base64url",0,_y,"_bigint",0,_P,"_boolean",0,_D,"_catch",0,$D,"_check",0,$B,"_cidrv4",0,_g,"_cidrv6",0,_v,"_coercedBigint",0,_Z,"_coercedBoolean",0,_U,"_coercedDate",0,_G,"_coercedNumber",0,_N,"_coercedString",0,b8,"_cuid",0,_l,"_cuid2",0,_u,"_custom",0,$L,"_date",0,_J,"_decode",0,v4,"_decodeAsync",0,v3,"_default",0,$O,"_discriminatedUnion",0,$x,"_e164",0,_b,"_email",0,b7,"_emoji",0,_o,"_encode",0,v0,"_encodeAsync",0,v2,"_endsWith",0,$o,"_enum",0,$k,"_file",0,$j,"_float32",0,_E,"_float64",0,_O,"_gt",0,_X,"_gte",0,_Q,"_guid",0,_e,"_includes",0,$i,"_int",0,_z,"_int32",0,_T,"_int64",0,_A,"_intersection",0,$y,"_ipv4",0,_f,"_ipv6",0,_p,"_isoDate",0,_k,"_isoDateTime",0,_w,"_isoDuration",0,_I,"_isoTime",0,_S,"_jwt",0,__,"_ksuid",0,_m,"_lazy",0,$A,"_length",0,$e,"_literal",0,$I,"_lowercase",0,$n,"_lt",0,_q,"_lte",0,_Y,"_mac",0,_h,"_map",0,$$,"_max",0,_Y,"_maxLength",0,_8,"_maxSize",0,_5,"_mime",0,$l,"_min",0,_Q,"_minLength",0,_7,"_minSize",0,_3,"_multipleOf",0,_2,"_nan",0,_K,"_nanoid",0,_s,"_nativeEnum",0,$S,"_negative",0,_1,"_never",0,_H,"_nonnegative",0,_6,"_nonoptional",0,$T,"_nonpositive",0,_4,"_normalize",0,$d,"_null",0,_F,"_nullable",0,$E,"_number",0,_j,"_optional",0,$z,"_overwrite",0,$u,"_parse",0,vV,"_parseAsync",0,vG,"_pipe",0,$U,"_positive",0,_0,"_promise",0,$R,"_property",0,$s,"_readonly",0,$P,"_record",0,$_,"_refine",0,$M,"_regex",0,$t,"_safeDecode",0,xe,"_safeDecodeAsync",0,xi,"_safeEncode",0,v8,"_safeEncodeAsync",0,xn,"_safeParse",0,vq,"_safeParseAsync",0,vX,"_set",0,$w,"_size",0,_9,"_slugify",0,$p,"_startsWith",0,$a,"_string",0,b9,"_stringFormat",0,$J,"_stringbool",0,$V,"_success",0,$C,"_superRefine",0,$F,"_symbol",0,_L,"_templateLiteral",0,$Z,"_toLowerCase",0,$m,"_toUpperCase",0,$f,"_transform",0,$N,"_trim",0,$c,"_tuple",0,$b,"_uint32",0,_C,"_uint64",0,_R,"_ulid",0,_d,"_undefined",0,_M,"_union",0,$g,"_unknown",0,_W,"_uppercase",0,$r,"_url",0,_a,"_uuid",0,_t,"_uuidv4",0,_n,"_uuidv6",0,_r,"_uuidv7",0,_i,"_void",0,_V,"_xid",0,_c,"_xor",0,$v,"clone",0,v$,"config",0,ve,"createStandardJSONSchemaMethod",0,$Q,"createToJSONSchemaMethod",0,$X,"decode",0,v6,"decodeAsync",0,v9,"describe",0,$W,"encode",0,v1,"encodeAsync",0,v5,"extractDefs",0,$q,"finalize",0,$Y,"flattenError",0,vM,"formatError",0,vF,"globalConfig",0,g7,"globalRegistry",0,b3,"initializeContext",0,$G,"isValidBase64",0,yL,"isValidBase64URL",0,yF,"isValidJWT",0,yH,"locales",0,IZ,"meta",0,$H,"parse",0,vJ,"parseAsync",0,vK,"prettifyError",0,vH,"process",0,$K,"regexes",0,IP,"registry",0,b5,"safeDecode",0,xt,"safeDecodeAsync",0,xa,"safeEncode",0,v7,"safeEncodeAsync",0,xr,"safeParse",0,vY,"safeParseAsync",0,vQ,"toDotPath",0,vW,"toJSONSchema",0,wO,"treeifyError",0,vB,"util",0,IU,"version",0,yg],12717);var IR=e.i(12717);e.i(89282),e.i(364),e.i(6034),e.s(["$brand",0,g3,"ZodFirstPartyTypeKind",0,jq,"ZodIssueCode",0,IN,"config",0,ve,"getErrorMap",0,IE,"setErrorMap",0,Iz],58829),e.i(58829);var wT=wT,wC=wC,IL=e.i(13657);e.s(["$brand",0,g3,"$input",0,b6,"$output",0,b4,"NEVER",0,g2,"TimePrecision",0,_$,"ZodAny",0,Si,"ZodArray",0,Sp,"ZodBase64",0,kD,"ZodBase64URL",0,kP,"ZodBigInt",0,k6,"ZodBigIntFormat",0,k5,"ZodBoolean",0,k1,"ZodCIDRv4",0,kE,"ZodCIDRv6",0,kT,"ZodCUID",0,kp,"ZodCUID2",0,kg,"ZodCatch",0,S7,"ZodCodec",0,Ia,"ZodCustom",0,Iv,"ZodCustomStringFormat",0,kF,"ZodDate",0,Sm,"ZodDefault",0,S1,"ZodDiscriminatedUnion",0,SS,"ZodE164",0,kA,"ZodEmail",0,w8,"ZodEmoji",0,kd,"ZodEnum",0,SR,"ZodError",0,wB,"ZodExactOptional",0,Sq,"ZodFile",0,SW,"ZodFirstPartyTypeKind",0,jq,"ZodFunction",0,Ih,"ZodGUID",0,ke,"ZodIPv4",0,kk,"ZodIPv6",0,kN,"ZodISODate",0,wP,"ZodISODateTime",0,wD,"ZodISODuration",0,wL,"ZodISOTime",0,wA,"ZodIntersection",0,Sj,"ZodIssueCode",0,IN,"ZodJWT",0,kL,"ZodKSUID",0,k$,"ZodLazy",0,Ic,"ZodLiteral",0,SF,"ZodMAC",0,kI,"ZodMap",0,SU,"ZodNaN",0,It,"ZodNanoID",0,km,"ZodNever",0,Sl,"ZodNonOptional",0,S5,"ZodNull",0,Sn,"ZodNullable",0,SX,"ZodNumber",0,kJ,"ZodNumberFormat",0,kK,"ZodObject",0,Sv,"ZodOptional",0,SG,"ZodPipe",0,Ir,"ZodPrefault",0,S6,"ZodPromise",0,If,"ZodReadonly",0,Is,"ZodRealError",0,wW,"ZodRecord",0,SO,"ZodSet",0,SZ,"ZodString",0,w5,"ZodStringFormat",0,w9,"ZodSuccess",0,S9,"ZodSymbol",0,k8,"ZodTemplateLiteral",0,Iu,"ZodTransform",0,SV,"ZodTuple",0,Sz,"ZodType",0,w6,"ZodULID",0,kx,"ZodURL",0,ks,"ZodUUID",0,kn,"ZodUndefined",0,Se,"ZodUnion",0,S_,"ZodUnknown",0,So,"ZodVoid",0,Sd,"ZodXID",0,kb,"ZodXor",0,Sw,"_ZodString",0,w2,"_default",0,S4,"_function",0,Ig,"any",0,Sa,"array",0,Sh,"base64",0,kU,"base64url",0,kZ,"bigint",0,k2,"boolean",0,k4,"catch",0,Ie,"check",0,Ix,"cidrv4",0,kO,"cidrv6",0,kC,"clone",0,v$,"codec",0,Io,"coerce",0,IL,"config",0,ve,"core",0,IR,"cuid",0,kh,"cuid2",0,kv,"custom",0,Iy,"date",0,Sf,"decode",0,wq,"decodeAsync",0,wX,"describe",0,I$,"discriminatedUnion",0,SI,"e164",0,kR,"email",0,w7,"emoji",0,kc,"encode",0,wK,"encodeAsync",0,wY,"endsWith",0,$o,"enum",0,SL,"exactOptional",0,SY,"file",0,SH,"flattenError",0,vM,"float32",0,kY,"float64",0,kX,"formatError",0,vF,"fromJSONSchema",0,function(e,t){var n;let r;if("boolean"==typeof e)return e?IC.any():IC.never();let i={version:(n=t?.defaultTarget,"https://json-schema.org/draft/2020-12/schema"===(r=e.$schema)?"draft-2020-12":"http://json-schema.org/draft-07/schema#"===r?"draft-7":"http://json-schema.org/draft-04/schema#"===r?"draft-4":n??"draft-2020-12"),defs:e.$defs||e.definitions||{},refs:new Map,processing:new Set,rootSchema:e,registry:t?.registry??b3};return function e(t,n){if("boolean"==typeof t)return t?IC.any():IC.never();let r=function t(n,r){let i;if(void 0!==n.not){if("object"==typeof n.not&&0===Object.keys(n.not).length)return IC.never();throw Error("not is not supported in Zod (except { not: {} } for never)")}if(void 0!==n.unevaluatedItems)throw Error("unevaluatedItems is not supported");if(void 0!==n.unevaluatedProperties)throw Error("unevaluatedProperties is not supported");if(void 0!==n.if||void 0!==n.then||void 0!==n.else)throw Error("Conditional schemas (if/then/else) are not supported");if(void 0!==n.dependentSchemas||void 0!==n.dependentRequired)throw Error("dependentSchemas and dependentRequired are not supported");if(n.$ref){let t=n.$ref;if(r.refs.has(t))return r.refs.get(t);if(r.processing.has(t))return IC.lazy(()=>{if(!r.refs.has(t))throw Error(`Circular reference not resolved: ${t}`);return r.refs.get(t)});r.processing.add(t);let i=e(function(e,t){if(!e.startsWith("#"))throw Error("External $ref is not supported, only local refs (#/...) are allowed");let n=e.slice(1).split("/").filter(Boolean);if(0===n.length)return t.rootSchema;let r="draft-2020-12"===t.version?"$defs":"definitions";if(n[0]===r){let r=n[1];if(!r||!t.defs[r])throw Error(`Reference not found: ${e}`);return t.defs[r]}throw Error(`Reference not found: ${e}`)}(t,r),r);return r.refs.set(t,i),r.processing.delete(t),i}if(void 0!==n.enum){let e=n.enum;if("openapi-3.0"===r.version&&!0===n.nullable&&1===e.length&&null===e[0])return IC.null();if(0===e.length)return IC.never();if(1===e.length)return IC.literal(e[0]);if(e.every(e=>"string"==typeof e))return IC.enum(e);let t=e.map(e=>IC.literal(e));return t.length<2?t[0]:IC.union([t[0],t[1],...t.slice(2)])}if(void 0!==n.const)return IC.literal(n.const);let a=n.type;if(Array.isArray(a)){let e=a.map(e=>t({...n,type:e},r));return 0===e.length?IC.never():1===e.length?e[0]:IC.union(e)}if(!a)return IC.any();switch(a){case"string":{let e=IC.string();if(n.format){let t=n.format;"email"===t?e=e.check(IC.email()):"uri"===t||"uri-reference"===t?e=e.check(IC.url()):"uuid"===t||"guid"===t?e=e.check(IC.uuid()):"date-time"===t?e=e.check(IC.iso.datetime()):"date"===t?e=e.check(IC.iso.date()):"time"===t?e=e.check(IC.iso.time()):"duration"===t?e=e.check(IC.iso.duration()):"ipv4"===t?e=e.check(IC.ipv4()):"ipv6"===t?e=e.check(IC.ipv6()):"mac"===t?e=e.check(IC.mac()):"cidr"===t?e=e.check(IC.cidrv4()):"cidr-v6"===t?e=e.check(IC.cidrv6()):"base64"===t?e=e.check(IC.base64()):"base64url"===t?e=e.check(IC.base64url()):"e164"===t?e=e.check(IC.e164()):"jwt"===t?e=e.check(IC.jwt()):"emoji"===t?e=e.check(IC.emoji()):"nanoid"===t?e=e.check(IC.nanoid()):"cuid"===t?e=e.check(IC.cuid()):"cuid2"===t?e=e.check(IC.cuid2()):"ulid"===t?e=e.check(IC.ulid()):"xid"===t?e=e.check(IC.xid()):"ksuid"===t&&(e=e.check(IC.ksuid()))}"number"==typeof n.minLength&&(e=e.min(n.minLength)),"number"==typeof n.maxLength&&(e=e.max(n.maxLength)),n.pattern&&(e=e.regex(new RegExp(n.pattern))),i=e;break}case"number":case"integer":{let e="integer"===a?IC.number().int():IC.number();"number"==typeof n.minimum&&(e=e.min(n.minimum)),"number"==typeof n.maximum&&(e=e.max(n.maximum)),"number"==typeof n.exclusiveMinimum?e=e.gt(n.exclusiveMinimum):!0===n.exclusiveMinimum&&"number"==typeof n.minimum&&(e=e.gt(n.minimum)),"number"==typeof n.exclusiveMaximum?e=e.lt(n.exclusiveMaximum):!0===n.exclusiveMaximum&&"number"==typeof n.maximum&&(e=e.lt(n.maximum)),"number"==typeof n.multipleOf&&(e=e.multipleOf(n.multipleOf)),i=e;break}case"boolean":i=IC.boolean();break;case"null":i=IC.null();break;case"object":{let t={},a=n.properties||{},o=new Set(n.required||[]);for(let[n,i]of Object.entries(a)){let a=e(i,r);t[n]=o.has(n)?a:a.optional()}if(n.propertyNames){let a=e(n.propertyNames,r),o=n.additionalProperties&&"object"==typeof n.additionalProperties?e(n.additionalProperties,r):IC.any();if(0===Object.keys(t).length){i=IC.record(a,o);break}let s=IC.object(t).passthrough(),l=IC.looseRecord(a,o);i=IC.intersection(s,l);break}if(n.patternProperties){let a=n.patternProperties,o=Object.keys(a),s=[];for(let t of o){let n=e(a[t],r),i=IC.string().regex(new RegExp(t));s.push(IC.looseRecord(i,n))}let l=[];if(Object.keys(t).length>0&&l.push(IC.object(t).passthrough()),l.push(...s),0===l.length)i=IC.object({}).passthrough();else if(1===l.length)i=l[0];else{let e=IC.intersection(l[0],l[1]);for(let t=2;t<l.length;t++)e=IC.intersection(e,l[t]);i=e}break}let s=IC.object(t);i=!1===n.additionalProperties?s.strict():"object"==typeof n.additionalProperties?s.catchall(e(n.additionalProperties,r)):s.passthrough();break}case"array":{let t=n.prefixItems,a=n.items;if(t&&Array.isArray(t)){let o=t.map(t=>e(t,r)),s=a&&"object"==typeof a&&!Array.isArray(a)?e(a,r):void 0;i=s?IC.tuple(o).rest(s):IC.tuple(o),"number"==typeof n.minItems&&(i=i.check(IC.minLength(n.minItems))),"number"==typeof n.maxItems&&(i=i.check(IC.maxLength(n.maxItems)))}else if(Array.isArray(a)){let t=a.map(t=>e(t,r)),o=n.additionalItems&&"object"==typeof n.additionalItems?e(n.additionalItems,r):void 0;i=o?IC.tuple(t).rest(o):IC.tuple(t),"number"==typeof n.minItems&&(i=i.check(IC.minLength(n.minItems))),"number"==typeof n.maxItems&&(i=i.check(IC.maxLength(n.maxItems)))}else if(void 0!==a){let t=e(a,r),o=IC.array(t);"number"==typeof n.minItems&&(o=o.min(n.minItems)),"number"==typeof n.maxItems&&(o=o.max(n.maxItems)),i=o}else i=IC.array(IC.any());break}default:throw Error(`Unsupported type: ${a}`)}return n.description&&(i=i.describe(n.description)),void 0!==n.default&&(i=i.default(n.default)),i}(t,n),i=t.type||void 0!==t.enum||void 0!==t.const;if(t.anyOf&&Array.isArray(t.anyOf)){let a=t.anyOf.map(t=>e(t,n)),o=IC.union(a);r=i?IC.intersection(r,o):o}if(t.oneOf&&Array.isArray(t.oneOf)){let a=t.oneOf.map(t=>e(t,n)),o=IC.xor(a);r=i?IC.intersection(r,o):o}if(t.allOf&&Array.isArray(t.allOf))if(0===t.allOf.length)r=i?r:IC.any();else{let a=i?r:e(t.allOf[0],n),o=+!i;for(let r=o;r<t.allOf.length;r++)a=IC.intersection(a,e(t.allOf[r],n));r=a}!0===t.nullable&&"openapi-3.0"===n.version&&(r=IC.nullable(r)),!0===t.readOnly&&(r=IC.readonly(r));let a={};for(let e of["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"])e in t&&(a[e]=t[e]);for(let e of["contentEncoding","contentMediaType","contentSchema"])e in t&&(a[e]=t[e]);for(let e of Object.keys(t))ID.has(e)||(a[e]=t[e]);return Object.keys(a).length>0&&n.registry.add(r,a),r}(e,i)},"function",0,Ig,"getErrorMap",0,IE,"globalRegistry",0,b3,"gt",0,_X,"gte",0,_Q,"guid",0,kt,"hash",0,kV,"hex",0,kH,"hostname",0,kW,"httpUrl",0,ku,"includes",0,$i,"instanceof",0,Ik,"int",0,kq,"int32",0,kQ,"int64",0,k3,"intersection",0,SN,"ipv4",0,kS,"ipv6",0,kz,"iso",0,IT,"json",0,II,"jwt",0,kM,"keyof",0,Sg,"ksuid",0,kw,"lazy",0,Im,"length",0,$e,"literal",0,SB,"locales",0,IZ,"looseObject",0,Sb,"looseRecord",0,SD,"lowercase",0,$n,"lt",0,_q,"lte",0,_Y,"mac",0,kj,"map",0,SP,"maxLength",0,_8,"maxSize",0,_5,"meta",0,Iw,"mime",0,$l,"minLength",0,_7,"minSize",0,_3,"multipleOf",0,_2,"nan",0,In,"nanoid",0,kf,"nativeEnum",0,SM,"negative",0,_1,"never",0,Su,"nonnegative",0,_6,"nonoptional",0,S3,"nonpositive",0,_4,"normalize",0,$d,"null",0,Sr,"nullable",0,SQ,"nullish",0,S0,"number",0,kG,"object",0,Sx,"optional",0,SK,"overwrite",0,$u,"parse",0,wH,"parseAsync",0,wV,"partialRecord",0,SC,"pipe",0,Ii,"positive",0,_0,"prefault",0,S2,"preprocess",0,Ij,"prettifyError",0,vH,"promise",0,Ip,"property",0,$s,"readonly",0,Il,"record",0,ST,"refine",0,Ib,"regex",0,$t,"regexes",()=>wT,"registry",0,b5,"safeDecode",0,w0,"safeDecodeAsync",0,w4,"safeEncode",0,wQ,"safeEncodeAsync",0,w1,"safeParse",0,wJ,"safeParseAsync",0,wG,"set",0,SA,"setErrorMap",0,Iz,"size",0,_9,"slugify",0,$p,"startsWith",0,$a,"strictObject",0,Sy,"string",0,w3,"stringFormat",0,kB,"stringbool",0,IS,"success",0,S8,"superRefine",0,I_,"symbol",0,k7,"templateLiteral",0,Id,"toJSONSchema",0,wO,"toLowerCase",0,$m,"toUpperCase",0,$f,"transform",0,SJ,"treeifyError",0,vB,"trim",0,$c,"tuple",0,SE,"uint32",0,k0,"uint64",0,k9,"ulid",0,ky,"undefined",0,St,"union",0,S$,"unknown",0,Ss,"uppercase",0,$r,"url",0,kl,"util",()=>wC,"uuid",0,kr,"uuidv4",0,ki,"uuidv6",0,ka,"uuidv7",0,ko,"void",0,Sc,"xid",0,k_,"xor",0,Sk],22219);var IM=e.i(22219),IM=IM;let IF=/^[a-z0-9][a-z0-9-]{0,79}$/,IB=IM.string().trim().regex(IF,"Use lowercase letters, numbers, and dashes."),IW=IM.string().trim().refine(e=>""===e||IF.test(e),"Use lowercase letters, numbers, and dashes."),IH=IM.object({name:IB,path:IM.string().trim().min(1,"Source Folder is required."),about:IM.string().trim().min(1,"Agent work is required."),method:IW.optional(),readiness_notes:IM.string().trim().optional(),prepare_after_setup:IM.boolean().optional()}).strict(),IV=IM.object({method_id:IB,label:IM.string().trim().min(1,"Label is required."),hint:IM.string().trim().min(1,"Summary is required."),task_prompt:IM.string().trim().min(1,"Agent work is required."),portable_output:IM.string().trim().optional(),readiness_notes:IM.string().trim().optional()}).strict();function IJ(e,t){let n=t?.trim();return n?`${e}: ${n}`:null}function IG(e){if("string"==typeof e||"number"==typeof e)return""+e;let t="";if(Array.isArray(e))for(let n=0,r;n<e.length;n++)""!==(r=IG(e[n]))&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var IK={value:()=>{}};function Iq(){for(var e,t=0,n=arguments.length,r={};t<n;++t){if(!(e=arguments[t]+"")||e in r||/[\s.]/.test(e))throw Error("illegal type: "+e);r[e]=[]}return new IY(r)}function IY(e){this._=e}function IX(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=IK,e=e.slice(0,r).concat(e.slice(r+1));break}return null!=n&&e.push({name:t,value:n}),e}function IQ(){}function I0(e){return null==e?IQ:function(){return this.querySelector(e)}}function I1(){return[]}function I4(e){return null==e?I1:function(){return this.querySelectorAll(e)}}function I6(e){return function(){return this.matches(e)}}function I2(e){return function(t){return t.matches(e)}}IY.prototype=Iq.prototype={constructor:IY,on:function(e,t){var n,r=this._,i=(e+"").trim().split(/^|\s+/).map(function(e){var t="",n=e.indexOf(".");if(n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),e&&!r.hasOwnProperty(e))throw Error("unknown type: "+e);return{type:e,name:t}}),a=-1,o=i.length;if(arguments.length<2){for(;++a<o;)if((n=(e=i[a]).type)&&(n=function(e,t){for(var n,r=0,i=e.length;r<i;++r)if((n=e[r]).name===t)return n.value}(r[n],e.name)))return n;return}if(null!=t&&"function"!=typeof t)throw Error("invalid callback: "+t);for(;++a<o;)if(n=(e=i[a]).type)r[n]=IX(r[n],e.name,t);else if(null==t)for(n in r)r[n]=IX(r[n],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new IY(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,r,i=Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(e))throw Error("unknown type: "+e);for(r=this._[e],a=0,n=r.length;a<n;++a)r[a].value.apply(t,i)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw Error("unknown type: "+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};var I5=Array.prototype.find;function I3(){return this.firstElementChild}var I9=Array.prototype.filter;function I8(){return Array.from(this.children)}function I7(e){return Array(e.length)}function je(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function jt(e,t,n,r,i,a){for(var o,s=0,l=t.length,u=a.length;s<u;++s)(o=t[s])?(o.__data__=a[s],r[s]=o):n[s]=new je(e,a[s]);for(;s<l;++s)(o=t[s])&&(i[s]=o)}function jn(e,t,n,r,i,a,o){var s,l,u,d=new Map,c=t.length,m=a.length,f=Array(c);for(s=0;s<c;++s)(l=t[s])&&(f[s]=u=o.call(l,l.__data__,s,t)+"",d.has(u)?i[s]=l:d.set(u,l));for(s=0;s<m;++s)u=o.call(e,a[s],s,a)+"",(l=d.get(u))?(r[s]=l,l.__data__=a[s],d.delete(u)):n[s]=new je(e,a[s]);for(s=0;s<c;++s)(l=t[s])&&d.get(f[s])===l&&(i[s]=l)}function jr(e){return e.__data__}function ji(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}je.prototype={constructor:je,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};var ja="http://www.w3.org/1999/xhtml";let jo={svg:"http://www.w3.org/2000/svg",xhtml:ja,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function js(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),jo.hasOwnProperty(t)?{space:jo[t],local:e}:e}function jl(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function ju(e,t){return e.style.getPropertyValue(t)||jl(e).getComputedStyle(e,null).getPropertyValue(t)}function jd(e){return e.trim().split(/^|\s+/)}function jc(e){return e.classList||new jm(e)}function jm(e){this._node=e,this._names=jd(e.getAttribute("class")||"")}function jf(e,t){for(var n=jc(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function jp(e,t){for(var n=jc(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function jh(){this.textContent=""}function jg(){this.innerHTML=""}function jv(){this.nextSibling&&this.parentNode.appendChild(this)}function jx(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function jy(e){var t=js(e);return(t.local?function(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}:function(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===ja&&t.documentElement.namespaceURI===ja?t.createElement(e):t.createElementNS(n,e)}})(t)}function jb(){return null}function j_(){var e=this.parentNode;e&&e.removeChild(this)}function j$(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function jw(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function jk(e){return function(){var t=this.__on;if(t){for(var n,r=0,i=-1,a=t.length;r<a;++r)(n=t[r],e.type&&n.type!==e.type||n.name!==e.name)?t[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?t.length=i:delete this.__on}}}function jS(e,t,n){return function(){var r,i=this.__on,a=function(e){t.call(this,e,this.__data__)};if(i){for(var o=0,s=i.length;o<s;++o)if((r=i[o]).type===e.type&&r.name===e.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=a,r.options=n),r.value=t;return}}this.addEventListener(e.type,a,n),r={type:e.type,name:e.name,value:t,listener:a,options:n},i?i.push(r):this.__on=[r]}}function jI(e,t,n){var r=jl(e),i=r.CustomEvent;"function"==typeof i?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}jm.prototype={add:function(e){0>this._names.indexOf(e)&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};var jj=[null];function jN(e,t){this._groups=e,this._parents=t}function jz(){return new jN([[document.documentElement]],jj)}function jE(e){return"string"==typeof e?new jN([[document.querySelector(e)]],[document.documentElement]):new jN([[e]],jj)}function jO(e,t){if(e=function(e){let t;for(;t=e.sourceEvent;)e=t;return e}(e),void 0===t&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}jN.prototype=jz.prototype={constructor:jN,select:function(e){"function"!=typeof e&&(e=I0(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a,o,s=t[i],l=s.length,u=r[i]=Array(l),d=0;d<l;++d)(a=s[d])&&(o=e.call(a,a.__data__,d,s))&&("__data__"in a&&(o.__data__=a.__data__),u[d]=o);return new jN(r,this._parents)},selectAll:function(e){if("function"==typeof e){var t;t=e,e=function(){var e;return e=t.apply(this,arguments),null==e?[]:Array.isArray(e)?e:Array.from(e)}}else e=I4(e);for(var n=this._groups,r=n.length,i=[],a=[],o=0;o<r;++o)for(var s,l=n[o],u=l.length,d=0;d<u;++d)(s=l[d])&&(i.push(e.call(s,s.__data__,d,l)),a.push(s));return new jN(i,a)},selectChild:function(e){var t;return this.select(null==e?I3:(t="function"==typeof e?e:I2(e),function(){return I5.call(this.children,t)}))},selectChildren:function(e){var t;return this.selectAll(null==e?I8:(t="function"==typeof e?e:I2(e),function(){return I9.call(this.children,t)}))},filter:function(e){"function"!=typeof e&&(e=I6(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a,o=t[i],s=o.length,l=r[i]=[],u=0;u<s;++u)(a=o[u])&&e.call(a,a.__data__,u,o)&&l.push(a);return new jN(r,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,jr);var n=t?jn:jt,r=this._parents,i=this._groups;"function"!=typeof e&&(x=e,e=function(){return x});for(var a=i.length,o=Array(a),s=Array(a),l=Array(a),u=0;u<a;++u){var d=r[u],c=i[u],m=c.length,f="object"==typeof(v=e.call(d,d&&d.__data__,u,r))&&"length"in v?v:Array.from(v),p=f.length,h=s[u]=Array(p),g=o[u]=Array(p);n(d,c,h,g,l[u]=Array(m),f,t);for(var v,x,y,b,_=0,$=0;_<p;++_)if(y=h[_]){for(_>=$&&($=_+1);!(b=g[$])&&++$<p;);y._next=b||null}}return(o=new jN(o,r))._enter=s,o._exit=l,o},enter:function(){return new jN(this._enter||this._groups.map(I7),this._parents)},exit:function(){return new jN(this._exit||this._groups.map(I7),this._parents)},join:function(e,t,n){var r=this.enter(),i=this,a=this.exit();return"function"==typeof e?(r=e(r))&&(r=r.selection()):r=r.append(e+""),null!=t&&(i=t(i))&&(i=i.selection()),null==n?a.remove():n(a),r&&i?r.merge(i).order():i},merge:function(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,a=r.length,o=Math.min(i,a),s=Array(i),l=0;l<o;++l)for(var u,d=n[l],c=r[l],m=d.length,f=s[l]=Array(m),p=0;p<m;++p)(u=d[p]||c[p])&&(f[p]=u);for(;l<i;++l)s[l]=n[l];return new jN(s,this._parents)},selection:function(){return this},order:function(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r,i=e[t],a=i.length-1,o=i[a];--a>=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=ji);for(var n=this._groups,r=n.length,i=Array(r),a=0;a<r;++a){for(var o,s=n[a],l=s.length,u=i[a]=Array(l),d=0;d<l;++d)(o=s[d])&&(u[d]=o);u.sort(t)}return new jN(i,this._parents).order()},call:function(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null},size:function(){let e=0;for(let t of this)++e;return e},empty:function(){return!this.node()},each:function(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i,a=t[n],o=0,s=a.length;o<s;++o)(i=a[o])&&e.call(i,i.__data__,o,a);return this},attr:function(e,t){var n=js(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==t?n.local?function(e){return function(){this.removeAttributeNS(e.space,e.local)}}:function(e){return function(){this.removeAttribute(e)}}:"function"==typeof t?n.local?function(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}:function(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}:n.local?function(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}:function(e,t){return function(){this.setAttribute(e,t)}})(n,t))},style:function(e,t,n){return arguments.length>1?this.each((null==t?function(e){return function(){this.style.removeProperty(e)}}:"function"==typeof t?function(e,t,n){return function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}:function(e,t,n){return function(){this.style.setProperty(e,t,n)}})(e,t,null==n?"":n)):ju(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?function(e){return function(){delete this[e]}}:"function"==typeof t?function(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}:function(e,t){return function(){this[e]=t}})(e,t)):this.node()[e]},classed:function(e,t){var n=jd(e+"");if(arguments.length<2){for(var r=jc(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof t?function(e,t){return function(){(t.apply(this,arguments)?jf:jp)(this,e)}}:t?function(e){return function(){jf(this,e)}}:function(e){return function(){jp(this,e)}})(n,t))},text:function(e){return arguments.length?this.each(null==e?jh:("function"==typeof e?function(e){return function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}}:function(e){return function(){this.textContent=e}})(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?jg:("function"==typeof e?function(e){return function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}}:function(e){return function(){this.innerHTML=e}})(e)):this.node().innerHTML},raise:function(){return this.each(jv)},lower:function(){return this.each(jx)},append:function(e){var t="function"==typeof e?e:jy(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})},insert:function(e,t){var n="function"==typeof e?e:jy(e),r=null==t?jb:"function"==typeof t?t:I0(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})},remove:function(){return this.each(j_)},clone:function(e){return this.select(e?jw:j$)},datum:function(e){return arguments.length?this.property("__data__",e):this.node().__data__},on:function(e,t,n){var r,i,a=(e+"").trim().split(/^|\s+/).map(function(e){var t="",n=e.indexOf(".");return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}}),o=a.length;if(arguments.length<2){var s=this.node().__on;if(s){for(var l,u=0,d=s.length;u<d;++u)for(r=0,l=s[u];r<o;++r)if((i=a[r]).type===l.type&&i.name===l.name)return l.value}return}for(r=0,s=t?jS:jk;r<o;++r)this.each(s(a[r],t,n));return this},dispatch:function(e,t){return this.each(("function"==typeof t?function(e,t){return function(){return jI(this,e,t.apply(this,arguments))}}:function(e,t){return function(){return jI(this,e,t)}})(e,t))},[Symbol.iterator]:function*(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r,i=e[t],a=0,o=i.length;a<o;++a)(r=i[a])&&(yield r)}};let jT={passive:!1},jC={capture:!0,passive:!1};function jD(e){e.stopImmediatePropagation()}function jU(e){e.preventDefault(),e.stopImmediatePropagation()}function jP(e){var t=e.document.documentElement,n=jE(e).on("dragstart.drag",jU,jC);"onselectstart"in t?n.on("selectstart.drag",jU,jC):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function jZ(e,t){var n=e.document.documentElement,r=jE(e).on("dragstart.drag",null);t&&(r.on("click.drag",jU,jC),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}let jA=e=>()=>e;function jR(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:a,x:o,y:s,dx:l,dy:u,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:d}})}function jL(e){return!e.ctrlKey&&!e.button}function jM(){return this.parentNode}function jF(e,t){return null==t?{x:e.x,y:e.y}:t}function jB(){return navigator.maxTouchPoints||"ontouchstart"in this}function jW(){var e,t,n,r,i=jL,a=jM,o=jF,s=jB,l={},u=Iq("start","drag","end"),d=0,c=0;function m(e){e.on("mousedown.drag",f).filter(s).on("touchstart.drag",g).on("touchmove.drag",v,jT).on("touchend.drag touchcancel.drag",x).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function f(o,s){if(!r&&i.call(this,o,s)){var l=y(this,a.call(this,o,s),o,s,"mouse");l&&(jE(o.view).on("mousemove.drag",p,jC).on("mouseup.drag",h,jC),jP(o.view),jD(o),n=!1,e=o.clientX,t=o.clientY,l("start",o))}}function p(r){if(jU(r),!n){var i=r.clientX-e,a=r.clientY-t;n=i*i+a*a>c}l.mouse("drag",r)}function h(e){jE(e.view).on("mousemove.drag mouseup.drag",null),jZ(e.view,n),jU(e),l.mouse("end",e)}function g(e,t){if(i.call(this,e,t)){var n,r,o=e.changedTouches,s=a.call(this,e,t),l=o.length;for(n=0;n<l;++n)(r=y(this,s,e,t,o[n].identifier,o[n]))&&(jD(e),r("start",e,o[n]))}}function v(e){var t,n,r=e.changedTouches,i=r.length;for(t=0;t<i;++t)(n=l[r[t].identifier])&&(jU(e),n("drag",e,r[t]))}function x(e){var t,n,i=e.changedTouches,a=i.length;for(r&&clearTimeout(r),r=setTimeout(function(){r=null},500),t=0;t<a;++t)(n=l[i[t].identifier])&&(jD(e),n("end",e,i[t]))}function y(e,t,n,r,i,a){var s,c,f,p=u.copy(),h=jO(a||n,t);if(null!=(f=o.call(e,new jR("beforestart",{sourceEvent:n,target:m,identifier:i,active:d,x:h[0],y:h[1],dx:0,dy:0,dispatch:p}),r)))return s=f.x-h[0]||0,c=f.y-h[1]||0,function n(a,o,u){var g,v=h;switch(a){case"start":l[i]=n,g=d++;break;case"end":delete l[i],--d;case"drag":h=jO(u||o,t),g=d}p.call(a,e,new jR(a,{sourceEvent:o,subject:f,target:m,identifier:i,active:g,x:h[0]+s,y:h[1]+c,dx:h[0]-v[0],dy:h[1]-v[1],dispatch:p}),r)}}return m.filter=function(e){return arguments.length?(i="function"==typeof e?e:jA(!!e),m):i},m.container=function(e){return arguments.length?(a="function"==typeof e?e:jA(e),m):a},m.subject=function(e){return arguments.length?(o="function"==typeof e?e:jA(e),m):o},m.touchable=function(e){return arguments.length?(s="function"==typeof e?e:jA(!!e),m):s},m.on=function(){var e=u.on.apply(u,arguments);return e===u?m:e},m.clickDistance=function(e){return arguments.length?(c=(e*=1)*e,m):Math.sqrt(c)},m}function jH(e){return((e=Math.exp(e))+1/e)/2}jR.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};let jV=function e(t,n,r){function i(e,i){var a,o,s=e[0],l=e[1],u=e[2],d=i[0],c=i[1],m=i[2],f=d-s,p=c-l,h=f*f+p*p;if(h<1e-12)o=Math.log(m/u)/t,a=function(e){return[s+e*f,l+e*p,u*Math.exp(t*e*o)]};else{var g=Math.sqrt(h),v=(m*m-u*u+r*h)/(2*u*n*g),x=(m*m-u*u-r*h)/(2*m*n*g),y=Math.log(Math.sqrt(v*v+1)-v);o=(Math.log(Math.sqrt(x*x+1)-x)-y)/t,a=function(e){var r,i,a=e*o,d=jH(y),c=u/(n*g)*(d*(((r=Math.exp(2*(r=t*a+y)))-1)/(r+1))-((i=Math.exp(i=y))-1/i)/2);return[s+c*f,l+c*p,u*d/jH(t*a+y)]}}return a.duration=1e3*o*t/Math.SQRT2,a}return i.rho=function(t){var n=Math.max(.001,+t),r=n*n;return e(n,r,r*r)},i}(Math.SQRT2,2,4);var jJ,jG,jK,jq,jY,jX,jQ=0,j0=0,j1=0,j4=0,j6=0,j2=0,j5="object"==typeof performance&&performance.now?performance:Date,j3="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function j9(){return j6||(j3(j8),j6=j5.now()+j2)}function j8(){j6=0}function j7(){this._call=this._time=this._next=null}function Ne(e,t,n){var r=new j7;return r.restart(e,t,n),r}function Nt(){j6=(j4=j5.now())+j2,jQ=j0=0;try{j9(),++jQ;for(var e,t=jY;t;)(e=j6-t._time)>=0&&t._call.call(void 0,e),t=t._next;--jQ}finally{jQ=0,function(){for(var e,t,n=jY,r=1/0;n;)n._call?(r>n._time&&(r=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:jY=t);jX=e,Nr(r)}(),j6=0}}function Nn(){var e=j5.now(),t=e-j4;t>1e3&&(j2-=t,j4=e)}function Nr(e){!jQ&&(j0&&(j0=clearTimeout(j0)),e-j6>24?(e<1/0&&(j0=setTimeout(Nt,e-j5.now()-j2)),j1&&(j1=clearInterval(j1))):(j1||(j4=j5.now(),j1=setInterval(Nn,1e3)),jQ=1,j3(Nt)))}function Ni(e,t,n){var r=new j7;return t=null==t?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r}j7.prototype=Ne.prototype={constructor:j7,restart:function(e,t,n){if("function"!=typeof e)throw TypeError("callback is not a function");n=(null==n?j9():+n)+(null==t?0:+t),this._next||jX===this||(jX?jX._next=this:jY=this,jX=this),this._call=e,this._time=n,Nr()},stop:function(){this._call&&(this._call=null,this._time=1/0,Nr())}};var Na=Iq("start","end","cancel","interrupt"),No=[];function Ns(e,t,n,r,i,a){var o=e.__transition;if(o){if(n in o)return}else e.__transition={};!function(e,t,n){var r,i=e.__transition;function a(l){var u,d,c,m;if(1!==n.state)return s();for(u in i)if((m=i[u]).name===n.name){if(3===m.state)return Ni(a);4===m.state?(m.state=6,m.timer.stop(),m.on.call("interrupt",e,e.__data__,m.index,m.group),delete i[u]):+u<t&&(m.state=6,m.timer.stop(),m.on.call("cancel",e,e.__data__,m.index,m.group),delete i[u])}if(Ni(function(){3===n.state&&(n.state=4,n.timer.restart(o,n.delay,n.time),o(l))}),n.state=2,n.on.call("start",e,e.__data__,n.index,n.group),2===n.state){for(u=0,n.state=3,r=Array(c=n.tween.length),d=-1;u<c;++u)(m=n.tween[u].value.call(e,e.__data__,n.index,n.group))&&(r[++d]=m);r.length=d+1}}function o(t){for(var i=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(s),n.state=5,1),a=-1,o=r.length;++a<o;)r[a].call(e,i);5===n.state&&(n.on.call("end",e,e.__data__,n.index,n.group),s())}function s(){for(var r in n.state=6,n.timer.stop(),delete i[t],i)return;delete e.__transition}i[t]=n,n.timer=Ne(function(e){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=e&&a(e-n.delay)},0,n.time)}(e,n,{name:t,index:r,group:i,on:Na,tween:No,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function Nl(e,t){var n=Nd(e,t);if(n.state>0)throw Error("too late; already scheduled");return n}function Nu(e,t){var n=Nd(e,t);if(n.state>3)throw Error("too late; already running");return n}function Nd(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw Error("transition not found");return n}function Nc(e,t){var n,r,i,a=e.__transition,o=!0;if(a){for(i in t=null==t?null:t+"",a){if((n=a[i]).name!==t){o=!1;continue}r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete a[i]}o&&delete e.__transition}}function Nm(e,t){return e*=1,t*=1,function(n){return e*(1-n)+t*n}}var Nf=180/Math.PI,Np={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Nh(e,t,n,r,i,a){var o,s,l;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),e*r<t*n&&(e=-e,t=-t,l=-l,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*Nf,skewX:Math.atan(l)*Nf,scaleX:o,scaleY:s}}function Ng(e,t,n,r){function i(e){return e.length?e.pop()+" ":""}return function(a,o){var s,l,u,d,c=[],m=[];return a=e(a),o=e(o),!function(e,r,i,a,o,s){if(e!==i||r!==a){var l=o.push("translate(",null,t,null,n);s.push({i:l-4,x:Nm(e,i)},{i:l-2,x:Nm(r,a)})}else(i||a)&&o.push("translate("+i+t+a+n)}(a.translateX,a.translateY,o.translateX,o.translateY,c,m),s=a.rotate,l=o.rotate,s!==l?(s-l>180?l+=360:l-s>180&&(s+=360),m.push({i:c.push(i(c)+"rotate(",null,r)-2,x:Nm(s,l)})):l&&c.push(i(c)+"rotate("+l+r),u=a.skewX,d=o.skewX,u!==d?m.push({i:c.push(i(c)+"skewX(",null,r)-2,x:Nm(u,d)}):d&&c.push(i(c)+"skewX("+d+r),!function(e,t,n,r,a,o){if(e!==n||t!==r){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:Nm(e,n)},{i:s-2,x:Nm(t,r)})}else(1!==n||1!==r)&&a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,c,m),a=o=null,function(e){for(var t,n=-1,r=m.length;++n<r;)c[(t=m[n]).i]=t.x(e);return c.join("")}}}var Nv=Ng(function(e){let t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Np:Nh(t.a,t.b,t.c,t.d,t.e,t.f)},"px, ","px)","deg)"),Nx=Ng(function(e){return null==e?Np:(c||(c=document.createElementNS("http://www.w3.org/2000/svg","g")),c.setAttribute("transform",e),e=c.transform.baseVal.consolidate())?Nh((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):Np},", ",")",")");function Ny(e,t,n){var r=e._id;return e.each(function(){var e=Nu(this,r);(e.value||(e.value={}))[t]=n.apply(this,arguments)}),function(e){return Nd(e,r).value[t]}}function Nb(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function N_(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function N$(){}var Nw="\\s*([+-]?\\d+)\\s*",Nk="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",NS="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",NI=/^#([0-9a-f]{3,8})$/,Nj=RegExp(`^rgb\\(${Nw},${Nw},${Nw}\\)$`),NN=RegExp(`^rgb\\(${NS},${NS},${NS}\\)$`),Nz=RegExp(`^rgba\\(${Nw},${Nw},${Nw},${Nk}\\)$`),NE=RegExp(`^rgba\\(${NS},${NS},${NS},${Nk}\\)$`),NO=RegExp(`^hsl\\(${Nk},${NS},${NS}\\)$`),NT=RegExp(`^hsla\\(${Nk},${NS},${NS},${Nk}\\)$`),NC={aliceblue:0xf0f8ff,antiquewhite:0xfaebd7,aqua:65535,aquamarine:8388564,azure:0xf0ffff,beige:0xf5f5dc,bisque:0xffe4c4,black:0,blanchedalmond:0xffebcd,blue:255,blueviolet:9055202,brown:0xa52a2a,burlywood:0xdeb887,cadetblue:6266528,chartreuse:8388352,chocolate:0xd2691e,coral:0xff7f50,cornflowerblue:6591981,cornsilk:0xfff8dc,crimson:0xdc143c,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:0xb8860b,darkgray:0xa9a9a9,darkgreen:25600,darkgrey:0xa9a9a9,darkkhaki:0xbdb76b,darkmagenta:9109643,darkolivegreen:5597999,darkorange:0xff8c00,darkorchid:0x9932cc,darkred:9109504,darksalmon:0xe9967a,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:0xff1493,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:0xb22222,floralwhite:0xfffaf0,forestgreen:2263842,fuchsia:0xff00ff,gainsboro:0xdcdcdc,ghostwhite:0xf8f8ff,gold:0xffd700,goldenrod:0xdaa520,gray:8421504,green:32768,greenyellow:0xadff2f,grey:8421504,honeydew:0xf0fff0,hotpink:0xff69b4,indianred:0xcd5c5c,indigo:4915330,ivory:0xfffff0,khaki:0xf0e68c,lavender:0xe6e6fa,lavenderblush:0xfff0f5,lawngreen:8190976,lemonchiffon:0xfffacd,lightblue:0xadd8e6,lightcoral:0xf08080,lightcyan:0xe0ffff,lightgoldenrodyellow:0xfafad2,lightgray:0xd3d3d3,lightgreen:9498256,lightgrey:0xd3d3d3,lightpink:0xffb6c1,lightsalmon:0xffa07a,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:0xb0c4de,lightyellow:0xffffe0,lime:65280,limegreen:3329330,linen:0xfaf0e6,magenta:0xff00ff,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:0xba55d3,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:0xc71585,midnightblue:1644912,mintcream:0xf5fffa,mistyrose:0xffe4e1,moccasin:0xffe4b5,navajowhite:0xffdead,navy:128,oldlace:0xfdf5e6,olive:8421376,olivedrab:7048739,orange:0xffa500,orangered:0xff4500,orchid:0xda70d6,palegoldenrod:0xeee8aa,palegreen:0x98fb98,paleturquoise:0xafeeee,palevioletred:0xdb7093,papayawhip:0xffefd5,peachpuff:0xffdab9,peru:0xcd853f,pink:0xffc0cb,plum:0xdda0dd,powderblue:0xb0e0e6,purple:8388736,rebeccapurple:6697881,red:0xff0000,rosybrown:0xbc8f8f,royalblue:4286945,saddlebrown:9127187,salmon:0xfa8072,sandybrown:0xf4a460,seagreen:3050327,seashell:0xfff5ee,sienna:0xa0522d,silver:0xc0c0c0,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:0xfffafa,springgreen:65407,steelblue:4620980,tan:0xd2b48c,teal:32896,thistle:0xd8bfd8,tomato:0xff6347,turquoise:4251856,violet:0xee82ee,wheat:0xf5deb3,white:0xffffff,whitesmoke:0xf5f5f5,yellow:0xffff00,yellowgreen:0x9acd32};function ND(){return this.rgb().formatHex()}function NU(){return this.rgb().formatRgb()}function NP(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=NI.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?NZ(t):3===n?new NL(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?NA(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?NA(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Nj.exec(e))?new NL(t[1],t[2],t[3],1):(t=NN.exec(e))?new NL(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Nz.exec(e))?NA(t[1],t[2],t[3],t[4]):(t=NE.exec(e))?NA(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=NO.exec(e))?NV(t[1],t[2]/100,t[3]/100,1):(t=NT.exec(e))?NV(t[1],t[2]/100,t[3]/100,t[4]):NC.hasOwnProperty(e)?NZ(NC[e]):"transparent"===e?new NL(NaN,NaN,NaN,0):null}function NZ(e){return new NL(e>>16&255,e>>8&255,255&e,1)}function NA(e,t,n,r){return r<=0&&(e=t=n=NaN),new NL(e,t,n,r)}function NR(e,t,n,r){var i;return 1==arguments.length?((i=e)instanceof N$||(i=NP(i)),i)?new NL((i=i.rgb()).r,i.g,i.b,i.opacity):new NL:new NL(e,t,n,null==r?1:r)}function NL(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function NM(){return`#${NH(this.r)}${NH(this.g)}${NH(this.b)}`}function NF(){let e=NB(this.opacity);return`${1===e?"rgb(":"rgba("}${NW(this.r)}, ${NW(this.g)}, ${NW(this.b)}${1===e?")":`, ${e})`}`}function NB(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function NW(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function NH(e){return((e=NW(e))<16?"0":"")+e.toString(16)}function NV(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new NG(e,t,n,r)}function NJ(e){if(e instanceof NG)return new NG(e.h,e.s,e.l,e.opacity);if(e instanceof N$||(e=NP(e)),!e)return new NG;if(e instanceof NG)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,l=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=l>0&&l<1?0:o,new NG(o,s,l,e.opacity)}function NG(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function NK(e){return(e=(e||0)%360)<0?e+360:e}function Nq(e){return Math.max(0,Math.min(1,e||0))}function NY(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}function NX(e,t,n,r,i){var a=e*e,o=a*e;return((1-3*e+3*a-o)*t+(4-6*a+3*o)*n+(1+3*e+3*a-3*o)*r+o*i)/6}Nb(N$,NP,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:ND,formatHex:ND,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return NJ(this).formatHsl()},formatRgb:NU,toString:NU}),Nb(NL,NR,N_(N$,{brighter(e){return e=null==e?1.4285714285714286:Math.pow(1.4285714285714286,e),new NL(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new NL(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new NL(NW(this.r),NW(this.g),NW(this.b),NB(this.opacity))},displayable(){return -.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:NM,formatHex:NM,formatHex8:function(){return`#${NH(this.r)}${NH(this.g)}${NH(this.b)}${NH((isNaN(this.opacity)?1:this.opacity)*255)}`},formatRgb:NF,toString:NF})),Nb(NG,function(e,t,n,r){return 1==arguments.length?NJ(e):new NG(e,t,n,null==r?1:r)},N_(N$,{brighter(e){return e=null==e?1.4285714285714286:Math.pow(1.4285714285714286,e),new NG(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new NG(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new NL(NY(e>=240?e-240:e+120,i,r),NY(e,i,r),NY(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new NG(NK(this.h),Nq(this.s),Nq(this.l),NB(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=NB(this.opacity);return`${1===e?"hsl(":"hsla("}${NK(this.h)}, ${100*Nq(this.s)}%, ${100*Nq(this.l)}%${1===e?")":`, ${e})`}`}}));let NQ=e=>()=>e;function N0(e,t){var n=t-e;return n?function(t){return e+t*n}:NQ(isNaN(e)?t:e)}let N1=function e(t){var n,r=1==(n=+t)?N0:function(e,t){var r,i,a;return t-e?(r=e,i=t,r=Math.pow(r,a=n),i=Math.pow(i,a)-r,a=1/a,function(e){return Math.pow(r+e*i,a)}):NQ(isNaN(e)?t:e)};function i(e,t){var n=r((e=NR(e)).r,(t=NR(t)).r),i=r(e.g,t.g),a=r(e.b,t.b),o=N0(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+""}}return i.gamma=e,i}(1);function N4(e){return function(t){var n,r,i=t.length,a=Array(i),o=Array(i),s=Array(i);for(n=0;n<i;++n)r=NR(t[n]),a[n]=r.r||0,o[n]=r.g||0,s[n]=r.b||0;return a=e(a),o=e(o),s=e(s),r.opacity=1,function(e){return r.r=a(e),r.g=o(e),r.b=s(e),r+""}}}N4(function(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[r],a=e[r+1],o=r>0?e[r-1]:2*i-a,s=r<t-1?e[r+2]:2*a-i;return NX((n-r/t)*t,o,i,a,s)}}),N4(function(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),i=e[(r+t-1)%t],a=e[r%t],o=e[(r+1)%t],s=e[(r+2)%t];return NX((n-r/t)*t,i,a,o,s)}});var N6=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,N2=RegExp(N6.source,"g");function N5(e,t){var n,r,i,a,o,s=N6.lastIndex=N2.lastIndex=0,l=-1,u=[],d=[];for(e+="",t+="";(i=N6.exec(e))&&(a=N2.exec(t));)(o=a.index)>s&&(o=t.slice(s,o),u[l]?u[l]+=o:u[++l]=o),(i=i[0])===(a=a[0])?u[l]?u[l]+=a:u[++l]=a:(u[++l]=null,d.push({i:l,x:Nm(i,a)})),s=N2.lastIndex;return s<t.length&&(o=t.slice(s),u[l]?u[l]+=o:u[++l]=o),u.length<2?d[0]?(n=d[0].x,function(e){return n(e)+""}):(r=t,function(){return r}):(t=d.length,function(e){for(var n,r=0;r<t;++r)u[(n=d[r]).i]=n.x(e);return u.join("")})}function N3(e,t){var n;return("number"==typeof t?Nm:t instanceof NP?N1:(n=NP(t))?(t=n,N1):N5)(e,t)}var N9=jz.prototype.constructor;function N8(e){return function(){this.style.removeProperty(e)}}var N7=0;function ze(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}var zt=jz.prototype;ze.prototype=(function(e){return jz().transition(e)}).prototype={constructor:ze,select:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=I0(e));for(var r=this._groups,i=r.length,a=Array(i),o=0;o<i;++o)for(var s,l,u=r[o],d=u.length,c=a[o]=Array(d),m=0;m<d;++m)(s=u[m])&&(l=e.call(s,s.__data__,m,u))&&("__data__"in s&&(l.__data__=s.__data__),c[m]=l,Ns(c[m],t,n,m,c,Nd(s,n)));return new ze(a,this._parents,t,n)},selectAll:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=I4(e));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var l,u=r[s],d=u.length,c=0;c<d;++c)if(l=u[c]){for(var m,f=e.call(l,l.__data__,c,u),p=Nd(l,n),h=0,g=f.length;h<g;++h)(m=f[h])&&Ns(m,t,n,h,f,p);a.push(f),o.push(l)}return new ze(a,o,t,n)},selectChild:zt.selectChild,selectChildren:zt.selectChildren,filter:function(e){"function"!=typeof e&&(e=I6(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a,o=t[i],s=o.length,l=r[i]=[],u=0;u<s;++u)(a=o[u])&&e.call(a,a.__data__,u,o)&&l.push(a);return new ze(r,this._parents,this._name,this._id)},merge:function(e){if(e._id!==this._id)throw Error();for(var t=this._groups,n=e._groups,r=t.length,i=n.length,a=Math.min(r,i),o=Array(r),s=0;s<a;++s)for(var l,u=t[s],d=n[s],c=u.length,m=o[s]=Array(c),f=0;f<c;++f)(l=u[f]||d[f])&&(m[f]=l);for(;s<r;++s)o[s]=t[s];return new ze(o,this._parents,this._name,this._id)},selection:function(){return new N9(this._groups,this._parents)},transition:function(){for(var e=this._name,t=this._id,n=++N7,r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],l=s.length,u=0;u<l;++u)if(o=s[u]){var d=Nd(o,t);Ns(o,e,n,u,s,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new ze(r,this._parents,e,n)},call:zt.call,nodes:zt.nodes,node:zt.node,size:zt.size,empty:zt.empty,each:zt.each,on:function(e,t){var n,r,i,a,o,s,l=this._id;return arguments.length<2?Nd(this.node(),l).on.on(e):this.each((n=l,r=e,i=t,s=(r+"").trim().split(/^|\s+/).every(function(e){var t=e.indexOf(".");return t>=0&&(e=e.slice(0,t)),!e||"start"===e})?Nl:Nu,function(){var e=s(this,n),t=e.on;t!==a&&(o=(a=t).copy()).on(r,i),e.on=o}))},attr:function(e,t){var n=js(e),r="transform"===n?Nx:N3;return this.attrTween(e,"function"==typeof t?(n.local?function(e,t,n){var r,i,a;return function(){var o,s,l=n(this);return null==l?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local))===(s=l+"")?null:o===r&&s===i?a:(i=s,a=t(r=o,l))}}:function(e,t,n){var r,i,a;return function(){var o,s,l=n(this);return null==l?void this.removeAttribute(e):(o=this.getAttribute(e))===(s=l+"")?null:o===r&&s===i?a:(i=s,a=t(r=o,l))}})(n,r,Ny(this,"attr."+e,t)):null==t?(n.local?function(e){return function(){this.removeAttributeNS(e.space,e.local)}}:function(e){return function(){this.removeAttribute(e)}})(n):(n.local?function(e,t,n){var r,i,a=n+"";return function(){var o=this.getAttributeNS(e.space,e.local);return o===a?null:o===r?i:i=t(r=o,n)}}:function(e,t,n){var r,i,a=n+"";return function(){var o=this.getAttribute(e);return o===a?null:o===r?i:i=t(r=o,n)}})(n,r,t))},attrTween:function(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw Error();var r=js(e);return this.tween(n,(r.local?function(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&function(t){this.setAttributeNS(e.space,e.local,i.call(this,t))}),n}return i._value=t,i}:function(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&function(t){this.setAttribute(e,i.call(this,t))}),n}return i._value=t,i})(r,t))},style:function(e,t,n){var r,i,a,o,s,l,u,d,c,m,f,p,h,g,v,x,y,b,_,$,w,k="transform"==(e+="")?Nv:N3;return null==t?this.styleTween(e,(r=e,function(){var e=ju(this,r),t=(this.style.removeProperty(r),ju(this,r));return e===t?null:e===i&&t===a?o:o=k(i=e,a=t)})).on("end.style."+e,N8(e)):"function"==typeof t?this.styleTween(e,(s=e,l=Ny(this,"style."+e,t),function(){var e=ju(this,s),t=l(this),n=t+"";return null==t&&(this.style.removeProperty(s),n=t=ju(this,s)),e===n?null:e===u&&n===d?c:(d=n,c=k(u=e,t))})).each((m=this._id,y="end."+(x="style."+(f=e)),function(){var e=Nu(this,m),t=e.on,n=null==e.value[x]?v||(v=N8(f)):void 0;(t!==p||g!==n)&&(h=(p=t).copy()).on(y,g=n),e.on=h})):this.styleTween(e,(b=e,w=t+"",function(){var e=ju(this,b);return e===w?null:e===_?$:$=k(_=e,t)}),n).on("end.style."+e,null)},styleTween:function(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==t)return this.tween(r,null);if("function"!=typeof t)throw Error();return this.tween(r,function(e,t,n){var r,i;function a(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&function(t){this.style.setProperty(e,a.call(this,t),n)}),r}return a._value=t,a}(e,t,null==n?"":n))},text:function(e){var t,n;return this.tween("text","function"==typeof e?(t=Ny(this,"text",e),function(){var e=t(this);this.textContent=null==e?"":e}):(n=null==e?"":e+"",function(){this.textContent=n}))},textTween:function(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(null==e)return this.tween(t,null);if("function"!=typeof e)throw Error();return this.tween(t,function(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&function(e){this.textContent=r.call(this,e)}),t}return r._value=e,r}(e))},remove:function(){var e;return this.on("end.remove",(e=this._id,function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}))},tween:function(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r,i=Nd(this.node(),n).tween,a=0,o=i.length;a<o;++a)if((r=i[a]).name===e)return r.value;return null}return this.each((null==t?function(e,t){var n,r;return function(){var i=Nu(this,e),a=i.tween;if(a!==n){r=n=a;for(var o=0,s=r.length;o<s;++o)if(r[o].name===t){(r=r.slice()).splice(o,1);break}}i.tween=r}}:function(e,t,n){var r,i;if("function"!=typeof n)throw Error();return function(){var a=Nu(this,e),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:t,value:n},l=0,u=i.length;l<u;++l)if(i[l].name===t){i[l]=s;break}l===u&&i.push(s)}a.tween=i}})(n,e,t))},delay:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?function(e,t){return function(){Nl(this,e).delay=+t.apply(this,arguments)}}:function(e,t){return t*=1,function(){Nl(this,e).delay=t}})(t,e)):Nd(this.node(),t).delay},duration:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?function(e,t){return function(){Nu(this,e).duration=+t.apply(this,arguments)}}:function(e,t){return t*=1,function(){Nu(this,e).duration=t}})(t,e)):Nd(this.node(),t).duration},ease:function(e){var t=this._id;return arguments.length?this.each(function(e,t){if("function"!=typeof t)throw Error();return function(){Nu(this,e).ease=t}}(t,e)):Nd(this.node(),t).ease},easeVarying:function(e){var t;if("function"!=typeof e)throw Error();return this.each((t=this._id,function(){var n=e.apply(this,arguments);if("function"!=typeof n)throw Error();Nu(this,t).ease=n}))},end:function(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(a,o){var s={value:o},l={value:function(){0==--i&&a()}};n.each(function(){var n=Nu(this,r),i=n.on;i!==e&&((t=(e=i).copy())._.cancel.push(s),t._.interrupt.push(s),t._.end.push(l)),n.on=t}),0===i&&a()})},[Symbol.iterator]:zt[Symbol.iterator]};var zn={time:null,delay:0,duration:250,ease:function(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}};jz.prototype.interrupt=function(e){return this.each(function(){Nc(this,e)})},jz.prototype.transition=function(e){var t,n;e instanceof ze?(t=e._id,e=e._name):(t=++N7,(n=zn).time=j9(),e=null==e?null:e+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],l=s.length,u=0;u<l;++u)(o=s[u])&&Ns(o,e,t,u,s,n||function(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw Error(`transition ${t} not found`);return n}(o,t));return new ze(r,this._parents,e,t)};let zr=e=>()=>e;function zi(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function za(e,t,n){this.k=e,this.x=t,this.y=n}za.prototype={constructor:za,scale:function(e){return 1===e?this:new za(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new za(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var zo=new za(1,0,0);function zs(e){for(;!e.__zoom;)if(!(e=e.parentNode))return zo;return e.__zoom}function zl(e){e.stopImmediatePropagation()}function zu(e){e.preventDefault(),e.stopImmediatePropagation()}function zd(e){return(!e.ctrlKey||"wheel"===e.type)&&!e.button}function zc(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e).hasAttribute("viewBox")?[[(e=e.viewBox.baseVal).x,e.y],[e.x+e.width,e.y+e.height]]:[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]:[[0,0],[e.clientWidth,e.clientHeight]]}function zm(){return this.__zoom||zo}function zf(e){return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function zp(){return navigator.maxTouchPoints||"ontouchstart"in this}function zh(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],a=e.invertY(t[0][1])-n[0][1],o=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}function zg(){var e,t,n,r=zd,i=zc,a=zh,o=zf,s=zp,l=[0,1/0],u=[[-1/0,-1/0],[1/0,1/0]],d=250,c=jV,m=Iq("start","zoom","end"),f=0,p=10;function h(e){e.property("__zoom",zm).on("wheel.zoom",$,{passive:!1}).on("mousedown.zoom",w).on("dblclick.zoom",k).filter(s).on("touchstart.zoom",S).on("touchmove.zoom",I).on("touchend.zoom touchcancel.zoom",j).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(e,t){return(t=Math.max(l[0],Math.min(l[1],t)))===e.k?e:new za(t,e.x,e.y)}function v(e,t,n){var r=t[0]-n[0]*e.k,i=t[1]-n[1]*e.k;return r===e.x&&i===e.y?e:new za(e.k,r,i)}function x(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function y(e,t,n,r){e.on("start.zoom",function(){b(this,arguments).event(r).start()}).on("interrupt.zoom end.zoom",function(){b(this,arguments).event(r).end()}).tween("zoom",function(){var e=arguments,a=b(this,e).event(r),o=i.apply(this,e),s=null==n?x(o):"function"==typeof n?n.apply(this,e):n,l=Math.max(o[1][0]-o[0][0],o[1][1]-o[0][1]),u=this.__zoom,d="function"==typeof t?t.apply(this,e):t,m=c(u.invert(s).concat(l/u.k),d.invert(s).concat(l/d.k));return function(e){if(1===e)e=d;else{var t=m(e),n=l/t[2];e=new za(n,s[0]-t[0]*n,s[1]-t[1]*n)}a.zoom(null,e)}})}function b(e,t,n){return!n&&e.__zooming||new _(e,t)}function _(e,t){this.that=e,this.args=t,this.active=0,this.sourceEvent=null,this.extent=i.apply(e,t),this.taps=0}function $(e,...t){if(r.apply(this,arguments)){var n=b(this,t).event(e),i=this.__zoom,s=Math.max(l[0],Math.min(l[1],i.k*Math.pow(2,o.apply(this,arguments)))),d=jO(e);if(n.wheel)(n.mouse[0][0]!==d[0]||n.mouse[0][1]!==d[1])&&(n.mouse[1]=i.invert(n.mouse[0]=d)),clearTimeout(n.wheel);else{if(i.k===s)return;n.mouse=[d,i.invert(d)],Nc(this),n.start()}zu(e),n.wheel=setTimeout(function(){n.wheel=null,n.end()},150),n.zoom("mouse",a(v(g(i,s),n.mouse[0],n.mouse[1]),n.extent,u))}}function w(e,...t){if(!n&&r.apply(this,arguments)){var i=e.currentTarget,o=b(this,t,!0).event(e),s=jE(e.view).on("mousemove.zoom",function(e){if(zu(e),!o.moved){var t=e.clientX-d,n=e.clientY-c;o.moved=t*t+n*n>f}o.event(e).zoom("mouse",a(v(o.that.__zoom,o.mouse[0]=jO(e,i),o.mouse[1]),o.extent,u))},!0).on("mouseup.zoom",function(e){s.on("mousemove.zoom mouseup.zoom",null),jZ(e.view,o.moved),zu(e),o.event(e).end()},!0),l=jO(e,i),d=e.clientX,c=e.clientY;jP(e.view),zl(e),o.mouse=[l,this.__zoom.invert(l)],Nc(this),o.start()}}function k(e,...t){if(r.apply(this,arguments)){var n=this.__zoom,o=jO(e.changedTouches?e.changedTouches[0]:e,this),s=n.invert(o),l=n.k*(e.shiftKey?.5:2),c=a(v(g(n,l),o,s),i.apply(this,t),u);zu(e),d>0?jE(this).transition().duration(d).call(y,c,o,e):jE(this).call(h.transform,c,o,e)}}function S(n,...i){if(r.apply(this,arguments)){var a,o,s,l,u=n.touches,d=u.length,c=b(this,i,n.changedTouches.length===d).event(n);for(zl(n),o=0;o<d;++o)l=[l=jO(s=u[o],this),this.__zoom.invert(l),s.identifier],c.touch0?c.touch1||c.touch0[2]===l[2]||(c.touch1=l,c.taps=0):(c.touch0=l,a=!0,c.taps=1+!!e);e&&(e=clearTimeout(e)),a&&(c.taps<2&&(t=l[0],e=setTimeout(function(){e=null},500)),Nc(this),c.start())}}function I(e,...t){if(this.__zooming){var n,r,i,o,s=b(this,t).event(e),l=e.changedTouches,d=l.length;for(zu(e),n=0;n<d;++n)i=jO(r=l[n],this),s.touch0&&s.touch0[2]===r.identifier?s.touch0[0]=i:s.touch1&&s.touch1[2]===r.identifier&&(s.touch1[0]=i);if(r=s.that.__zoom,s.touch1){var c=s.touch0[0],m=s.touch0[1],f=s.touch1[0],p=s.touch1[1],h=(h=f[0]-c[0])*h+(h=f[1]-c[1])*h,x=(x=p[0]-m[0])*x+(x=p[1]-m[1])*x;r=g(r,Math.sqrt(h/x)),i=[(c[0]+f[0])/2,(c[1]+f[1])/2],o=[(m[0]+p[0])/2,(m[1]+p[1])/2]}else{if(!s.touch0)return;i=s.touch0[0],o=s.touch0[1]}s.zoom("touch",a(v(r,i,o),s.extent,u))}}function j(e,...r){if(this.__zooming){var i,a,o=b(this,r).event(e),s=e.changedTouches,l=s.length;for(zl(e),n&&clearTimeout(n),n=setTimeout(function(){n=null},500),i=0;i<l;++i)a=s[i],o.touch0&&o.touch0[2]===a.identifier?delete o.touch0:o.touch1&&o.touch1[2]===a.identifier&&delete o.touch1;if(o.touch1&&!o.touch0&&(o.touch0=o.touch1,delete o.touch1),o.touch0)o.touch0[1]=this.__zoom.invert(o.touch0[0]);else if(o.end(),2===o.taps&&(a=jO(a,this),Math.hypot(t[0]-a[0],t[1]-a[1])<p)){var u=jE(this).on("dblclick.zoom");u&&u.apply(this,arguments)}}}return h.transform=function(e,t,n,r){var i=e.selection?e.selection():e;i.property("__zoom",zm),e!==i?y(e,t,n,r):i.interrupt().each(function(){b(this,arguments).event(r).start().zoom(null,"function"==typeof t?t.apply(this,arguments):t).end()})},h.scaleBy=function(e,t,n,r){h.scaleTo(e,function(){var e=this.__zoom.k,n="function"==typeof t?t.apply(this,arguments):t;return e*n},n,r)},h.scaleTo=function(e,t,n,r){h.transform(e,function(){var e=i.apply(this,arguments),r=this.__zoom,o=null==n?x(e):"function"==typeof n?n.apply(this,arguments):n,s=r.invert(o),l="function"==typeof t?t.apply(this,arguments):t;return a(v(g(r,l),o,s),e,u)},n,r)},h.translateBy=function(e,t,n,r){h.transform(e,function(){return a(this.__zoom.translate("function"==typeof t?t.apply(this,arguments):t,"function"==typeof n?n.apply(this,arguments):n),i.apply(this,arguments),u)},null,r)},h.translateTo=function(e,t,n,r,o){h.transform(e,function(){var e=i.apply(this,arguments),o=this.__zoom,s=null==r?x(e):"function"==typeof r?r.apply(this,arguments):r;return a(zo.translate(s[0],s[1]).scale(o.k).translate("function"==typeof t?-t.apply(this,arguments):-t,"function"==typeof n?-n.apply(this,arguments):-n),e,u)},r,o)},_.prototype={event:function(e){return e&&(this.sourceEvent=e),this},start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(e,t){return this.mouse&&"mouse"!==e&&(this.mouse[1]=t.invert(this.mouse[0])),this.touch0&&"touch"!==e&&(this.touch0[1]=t.invert(this.touch0[0])),this.touch1&&"touch"!==e&&(this.touch1[1]=t.invert(this.touch1[0])),this.that.__zoom=t,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(e){var t=jE(this.that).datum();m.call(e,this.that,new zi(e,{sourceEvent:this.sourceEvent,target:h,type:e,transform:this.that.__zoom,dispatch:m}),t)}},h.wheelDelta=function(e){return arguments.length?(o="function"==typeof e?e:zr(+e),h):o},h.filter=function(e){return arguments.length?(r="function"==typeof e?e:zr(!!e),h):r},h.touchable=function(e){return arguments.length?(s="function"==typeof e?e:zr(!!e),h):s},h.extent=function(e){return arguments.length?(i="function"==typeof e?e:zr([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),h):i},h.scaleExtent=function(e){return arguments.length?(l[0]=+e[0],l[1]=+e[1],h):[l[0],l[1]]},h.translateExtent=function(e){return arguments.length?(u[0][0]=+e[0][0],u[1][0]=+e[1][0],u[0][1]=+e[0][1],u[1][1]=+e[1][1],h):[[u[0][0],u[0][1]],[u[1][0],u[1][1]]]},h.constrain=function(e){return arguments.length?(a=e,h):a},h.duration=function(e){return arguments.length?(d=+e,h):d},h.interpolate=function(e){return arguments.length?(c=e,h):c},h.on=function(){var e=m.on.apply(m,arguments);return e===m?h:e},h.clickDistance=function(e){return arguments.length?(f=(e*=1)*e,h):Math.sqrt(f)},h.tapDistance=function(e){return arguments.length?(p=+e,h):p},h}function zv(e,t){var n,r,i=typeof t;return null==t||"boolean"===i?NQ(t):("number"===i?Nm:"string"===i?(r=NP(t))?(t=r,N1):N5:t instanceof NP?N1:t instanceof Date?function(e,t){var n=new Date;return e*=1,t*=1,function(r){return n.setTime(e*(1-r)+t*r),n}}:!ArrayBuffer.isView(n=t)||n instanceof DataView?Array.isArray(t)?function(e,t){var n,r=t?t.length:0,i=e?Math.min(r,e.length):0,a=Array(i),o=Array(r);for(n=0;n<i;++n)a[n]=zv(e[n],t[n]);for(;n<r;++n)o[n]=t[n];return function(e){for(n=0;n<i;++n)o[n]=a[n](e);return o}}:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?function(e,t){var n,r={},i={};for(n in(null===e||"object"!=typeof e)&&(e={}),(null===t||"object"!=typeof t)&&(t={}),t)n in e?r[n]=zv(e[n],t[n]):i[n]=t[n];return function(e){for(n in r)i[n]=r[n](e);return i}}:Nm:function(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,i=t.slice();return function(a){for(n=0;n<r;++n)i[n]=e[n]*(1-a)+t[n]*a;return i}})(e,t)}zs.prototype=za.prototype;let zx=[[-1/0,-1/0],[1/0,1/0]],zy=["Enter"," ","Escape"],zb={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};(r=m||(m={})).Strict="strict",r.Loose="loose",(i=f||(f={})).Free="free",i.Vertical="vertical",i.Horizontal="horizontal",(a=p||(p={})).Partial="partial",a.Full="full";let z_={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};(o=h||(h={})).Bezier="default",o.Straight="straight",o.Step="step",o.SmoothStep="smoothstep",o.SimpleBezier="simplebezier",(s=g||(g={})).Arrow="arrow",s.ArrowClosed="arrowclosed",(l=v||(v={})).Left="left",l.Top="top",l.Right="right",l.Bottom="bottom";let z$={[v.Left]:v.Right,[v.Right]:v.Left,[v.Top]:v.Bottom,[v.Bottom]:v.Top};function zw(e){return null===e?null:e?"valid":"invalid"}let zk=e=>"id"in e&&"source"in e&&"target"in e,zS=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),zI=(e,t=[0,0])=>{let{width:n,height:r}=z0(e),i=e.origin??t,a=n*i[0],o=r*i[1];return{x:e.position.x-a,y:e.position.y-o}},zj=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return e.forEach(e=>{(void 0===t.filter||t.filter(e))&&(n=zZ(n,zM(e)),r=!0)}),r?zR(n):{x:0,y:0,width:0,height:0}},zN=(e,t,[n,r,i]=[0,0,1],a=!1,o=!1)=>{let s={...zG(t,[n,r,i]),width:t.width/i,height:t.height/i},l=[];for(let t of e.values()){let{measured:e,selectable:n=!0,hidden:r=!1}=t;if(o&&!n||r)continue;let i=e.width??t.width??t.initialWidth??null,u=e.height??t.height??t.initialHeight??null,d=zB(s,zL(t)),c=(i??0)*(u??0),m=a&&d>0;(!t.internals.handleBounds||m||d>=c||t.dragging)&&l.push(t)}return l};async function zz({nodes:e,width:t,height:n,panZoom:r,minZoom:i,maxZoom:a},o){let s,l;if(0===e.size)return Promise.resolve(!0);let u=zY(zj((s=new Map,l=o?.nodes?new Set(o.nodes.map(e=>e.id)):null,e.forEach(e=>{e.measured.width&&e.measured.height&&(o?.includeHiddenNodes||!e.hidden)&&(!l||l.has(e.id))&&s.set(e.id,e)}),s)),t,n,o?.minZoom??i,o?.maxZoom??a,o?.padding??.1);return await r.setViewport(u,{duration:o?.duration,ease:o?.ease,interpolate:o?.interpolate}),Promise.resolve(!0)}function zE({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:i,onError:a}){let o=n.get(e),s=o.parentId?n.get(o.parentId):void 0,{x:l,y:u}=s?s.internals.positionAbsolute:{x:0,y:0},d=o.origin??r,c=o.extent||i;if("parent"!==o.extent||o.expandParent)s&&zQ(o.extent)&&(c=[[o.extent[0][0]+l,o.extent[0][1]+u],[o.extent[1][0]+l,o.extent[1][1]+u]]);else if(s){let e=s.measured.width,t=s.measured.height;e&&t&&(c=[[l,u],[l+e,u+t]])}else a?.("005","Only child nodes can use a parent extent.");let m=zQ(c)?zC(t,c,o.measured):t;return(void 0===o.measured.width||void 0===o.measured.height)&&a?.("015","It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."),{position:{x:m.x-l+(o.measured.width??0)*d[0],y:m.y-u+(o.measured.height??0)*d[1]},positionAbsolute:m}}async function zO({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:i}){let a,o=new Set(e.map(e=>e.id)),s=[];for(let e of n){if(!1===e.deletable)continue;let t=o.has(e.id),n=!t&&e.parentId&&s.find(t=>t.id===e.parentId);(t||n)&&s.push(e)}let l=new Set(t.map(e=>e.id)),u=r.filter(e=>!1!==e.deletable),d=(a=new Set,s.forEach(e=>{a.add(e.id)}),u.filter(e=>a.has(e.source)||a.has(e.target)));for(let e of u)l.has(e.id)&&!d.find(t=>t.id===e.id)&&d.push(e);if(!i)return{edges:d,nodes:s};let c=await i({nodes:s,edges:d});return"boolean"==typeof c?c?{edges:d,nodes:s}:{edges:[],nodes:[]}:c}let zT=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),zC=(e={x:0,y:0},t,n)=>({x:zT(e.x,t[0][0],t[1][0]-(n?.width??0)),y:zT(e.y,t[0][1],t[1][1]-(n?.height??0))});function zD(e,t,n){let{width:r,height:i}=z0(n),{x:a,y:o}=n.internals.positionAbsolute;return zC(e,[[a,o],[a+r,o+i]],t)}let zU=(e,t,n)=>e<t?zT(Math.abs(e-t),1,t)/t:e>n?-zT(Math.abs(e-n),1,t)/t:0,zP=(e,t,n=15,r=40)=>[zU(e.x,r,t.width-r)*n,zU(e.y,r,t.height-r)*n],zZ=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),zA=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),zR=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),zL=(e,t=[0,0])=>{let{x:n,y:r}=zS(e)?e.internals.positionAbsolute:zI(e,t);return{x:n,y:r,width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}},zM=(e,t=[0,0])=>{let{x:n,y:r}=zS(e)?e.internals.positionAbsolute:zI(e,t);return{x:n,y:r,x2:n+(e.measured?.width??e.width??e.initialWidth??0),y2:r+(e.measured?.height??e.height??e.initialHeight??0)}},zF=(e,t)=>zR(zZ(zA(e),zA(t))),zB=(e,t)=>Math.ceil(Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x))*Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y))),zW=e=>zH(e.width)&&zH(e.height)&&zH(e.x)&&zH(e.y),zH=e=>!isNaN(e)&&isFinite(e),zV=(e,t)=>{},zJ=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),zG=({x:e,y:t},[n,r,i],a=!1,o=[1,1])=>{let s={x:(e-n)/i,y:(t-r)/i};return a?zJ(s,o):s},zK=({x:e,y:t},[n,r,i])=>({x:e*i+n,y:t*i+r});function zq(e,t){if("number"==typeof e)return Math.floor((t-t/(1+e))*.5);if("string"==typeof e&&e.endsWith("px")){let t=parseFloat(e);if(!Number.isNaN(t))return Math.floor(t)}if("string"==typeof e&&e.endsWith("%")){let n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}let zY=(e,t,n,r,i,a)=>{let o=function(e,t,n){if("string"==typeof e||"number"==typeof e){let r=zq(e,n),i=zq(e,t);return{top:r,right:i,bottom:r,left:i,x:2*i,y:2*r}}if("object"==typeof e){let r=zq(e.top??e.y??0,n),i=zq(e.bottom??e.y??0,n),a=zq(e.left??e.x??0,t),o=zq(e.right??e.x??0,t);return{top:r,right:o,bottom:i,left:a,x:a+o,y:r+i}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}(a,t,n),s=zT(Math.min((t-o.x)/e.width,(n-o.y)/e.height),r,i),l=e.x+e.width/2,u=e.y+e.height/2,d=t/2-l*s,c=n/2-u*s,m=function(e,t,n,r,i,a){let{x:o,y:s}=zK(e,[t,n,r]),{x:l,y:u}=zK({x:e.x+e.width,y:e.y+e.height},[t,n,r]);return{left:Math.floor(o),top:Math.floor(s),right:Math.floor(i-l),bottom:Math.floor(a-u)}}(e,d,c,s,t,n),f={left:Math.min(m.left-o.left,0),top:Math.min(m.top-o.top,0),right:Math.min(m.right-o.right,0),bottom:Math.min(m.bottom-o.bottom,0)};return{x:d-f.left+f.right,y:c-f.top+f.bottom,zoom:s}},zX=()=>"u">typeof navigator&&navigator?.userAgent?.indexOf("Mac")>=0;function zQ(e){return null!=e&&"parent"!==e}function z0(e){return{width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}}function z1(e){return(e.measured?.width??e.width??e.initialWidth)!==void 0&&(e.measured?.height??e.height??e.initialHeight)!==void 0}function z4(e,t={width:0,height:0},n,r,i){let a={...e},o=r.get(n);if(o){let e=o.origin||i;a.x+=o.internals.positionAbsolute.x-(t.width??0)*e[0],a.y+=o.internals.positionAbsolute.y-(t.height??0)*e[1]}return a}function z6(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function z2(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:i}){let{x:a,y:o}=z7(e),s=zG({x:a-(i?.left??0),y:o-(i?.top??0)},r),{x:l,y:u}=n?zJ(s,t):s;return{xSnapped:l,ySnapped:u,...s}}let z5=e=>({width:e.offsetWidth,height:e.offsetHeight}),z3=e=>e?.getRootNode?.()||window?.document,z9=["INPUT","SELECT","TEXTAREA"];function z8(e){let t=e.composedPath?.()?.[0]||e.target;return t?.nodeType===1&&(z9.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey"))}let z7=(e,t)=>{let n="clientX"in e,r=n?e.clientX:e.touches?.[0].clientX,i=n?e.clientY:e.touches?.[0].clientY;return{x:r-(t?.left??0),y:i-(t?.top??0)}},Ee=(e,t,n,r,i)=>{let a=t.querySelectorAll(`.${e}`);return a&&a.length?Array.from(a).map(t=>{let a=t.getBoundingClientRect();return{id:t.getAttribute("data-handleid"),type:e,nodeId:i,position:t.getAttribute("data-handlepos"),x:(a.left-n.left)/r,y:(a.top-n.top)/r,...z5(t)}}):null};function Et({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:i,sourceControlY:a,targetControlX:o,targetControlY:s}){let l=.125*e+.375*i+.375*o+.125*n,u=.125*t+.375*a+.375*s+.125*r,d=Math.abs(l-e),c=Math.abs(u-t);return[l,u,d,c]}function En(e,t){return e>=0?.5*e:25*t*Math.sqrt(-e)}function Er({pos:e,x1:t,y1:n,x2:r,y2:i,c:a}){switch(e){case v.Left:return[t-En(t-r,a),n];case v.Right:return[t+En(r-t,a),n];case v.Top:return[t,n-En(n-i,a)];case v.Bottom:return[t,n+En(i-n,a)]}}function Ei({sourceX:e,sourceY:t,sourcePosition:n=v.Bottom,targetX:r,targetY:i,targetPosition:a=v.Top,curvature:o=.25}){let[s,l]=Er({pos:n,x1:e,y1:t,x2:r,y2:i,c:o}),[u,d]=Er({pos:a,x1:r,y1:i,x2:e,y2:t,c:o}),[c,m,f,p]=Et({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:s,sourceControlY:l,targetControlX:u,targetControlY:d});return[`M${e},${t} C${s},${l} ${u},${d} ${r},${i}`,c,m,f,p]}function Ea({sourceX:e,sourceY:t,targetX:n,targetY:r}){let i=Math.abs(n-e)/2,a=Math.abs(r-t)/2;return[n<e?n+i:n-i,r<t?r+a:r-a,i,a]}let Eo=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||""}-${n}${r||""}`;function Es({sourceX:e,sourceY:t,targetX:n,targetY:r}){let[i,a,o,s]=Ea({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,i,a,o,s]}let El={[v.Left]:{x:-1,y:0},[v.Right]:{x:1,y:0},[v.Top]:{x:0,y:-1},[v.Bottom]:{x:0,y:1}},Eu=({source:e,sourcePosition:t=v.Bottom,target:n})=>t===v.Left||t===v.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},Ed=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function Ec({sourceX:e,sourceY:t,sourcePosition:n=v.Bottom,targetX:r,targetY:i,targetPosition:a=v.Top,borderRadius:o=5,centerX:s,centerY:l,offset:u=20,stepPosition:d=.5}){let[c,m,f,p,h]=function({source:e,sourcePosition:t=v.Bottom,target:n,targetPosition:r=v.Top,center:i,offset:a,stepPosition:o}){let s,l,u=El[t],d=El[r],c={x:e.x+u.x*a,y:e.y+u.y*a},m={x:n.x+d.x*a,y:n.y+d.y*a},f=Eu({source:c,sourcePosition:t,target:m}),p=0!==f.x?"x":"y",h=f[p],g=[],x={x:0,y:0},y={x:0,y:0},[,,b,_]=Ea({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(u[p]*d[p]==-1){"x"===p?(s=i.x??c.x+(m.x-c.x)*o,l=i.y??(c.y+m.y)/2):(s=i.x??(c.x+m.x)/2,l=i.y??c.y+(m.y-c.y)*o);let e=[{x:s,y:c.y},{x:s,y:m.y}],t=[{x:c.x,y:l},{x:m.x,y:l}];g=u[p]===h?"x"===p?e:t:"x"===p?t:e}else{let i=[{x:c.x,y:m.y}],o=[{x:m.x,y:c.y}];if(g="x"===p?u.x===h?o:i:u.y===h?i:o,t===r){let t=Math.abs(e[p]-n[p]);if(t<=a){let r=Math.min(a-1,a-t);u[p]===h?x[p]=(c[p]>e[p]?-1:1)*r:y[p]=(m[p]>n[p]?-1:1)*r}}if(t!==r){let e="x"===p?"y":"x",t=u[p]===d[e],n=c[e]>m[e],r=c[e]<m[e];(1===u[p]&&(!t&&n||t&&r)||1!==u[p]&&(!t&&r||t&&n))&&(g="x"===p?i:o)}let f={x:c.x+x.x,y:c.y+x.y},v={x:m.x+y.x,y:m.y+y.y};Math.max(Math.abs(f.x-g[0].x),Math.abs(v.x-g[0].x))>=Math.max(Math.abs(f.y-g[0].y),Math.abs(v.y-g[0].y))?(s=(f.x+v.x)/2,l=g[0].y):(s=g[0].x,l=(f.y+v.y)/2)}return[[e,{x:c.x+x.x,y:c.y+x.y},...g,{x:m.x+y.x,y:m.y+y.y},n],s,l,b,_]}({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:i},targetPosition:a,center:{x:s,y:l},offset:u,stepPosition:d});return[c.reduce((e,t,n)=>e+(n>0&&n<c.length-1?function(e,t,n,r){let i=Math.min(Ed(e,t)/2,Ed(t,n)/2,r),{x:a,y:o}=t;if(e.x===a&&a===n.x||e.y===o&&o===n.y)return`L${a} ${o}`;if(e.y===o){let t=e.x<n.x?-1:1,r=e.y<n.y?1:-1;return`L ${a+i*t},${o}Q ${a},${o} ${a},${o+i*r}`}let s=e.x<n.x?1:-1,l=e.y<n.y?-1:1;return`L ${a},${o+i*l}Q ${a},${o} ${a+i*s},${o}`}(c[n-1],t,c[n+1],o):`${0===n?"M":"L"}${t.x} ${t.y}`),""),m,f,p,h]}function Em(e){return e&&!!(e.internals.handleBounds||e.handles?.length)&&!!(e.measured.width||e.width||e.initialWidth)}function Ef(e){if(!e)return null;let t=[],n=[];for(let r of e)r.width=r.width??1,r.height=r.height??1,"source"===r.type?t.push(r):"target"===r.type&&n.push(r);return{source:t,target:n}}function Ep(e,t,n=v.Left,r=!1){let i=(t?.x??0)+e.internals.positionAbsolute.x,a=(t?.y??0)+e.internals.positionAbsolute.y,{width:o,height:s}=t??z0(e);if(r)return{x:i+o/2,y:a+s/2};switch(t?.position??n){case v.Top:return{x:i+o/2,y:a};case v.Right:return{x:i+o,y:a+s/2};case v.Bottom:return{x:i+o/2,y:a+s};case v.Left:return{x:i,y:a+s/2}}}function Eh(e,t){return e&&(t?e.find(e=>e.id===t):e[0])||null}function Eg(e,t){if(!e)return"";if("string"==typeof e)return e;let n=t?`${t}__`:"";return`${n}${Object.keys(e).sort().map(t=>`${t}=${e[t]}`).join("&")}`}let Ev={nodeOrigin:[0,0],nodeExtent:zx,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},Ex={...Ev,checkEquality:!0};function Ey(e,t){let n={...e};for(let e in t)void 0!==t[e]&&(n[e]=t[e]);return n}function Eb(e){return"manual"===e}function E_(e,t,n,r={}){let i=Ey(Ex,r),a={i:0},o=new Map(t),s=i?.elevateNodesOnSelect&&!Eb(i.zIndexMode)?1e3:0,l=e.length>0;for(let u of(t.clear(),n.clear(),e)){let e=o.get(u.id);if(i.checkEquality&&u===e?.internals.userNode)t.set(u.id,e);else{let n=zC(zI(u,i.nodeOrigin),zQ(u.extent)?u.extent:i.nodeExtent,z0(u));e={...i.defaults,...u,measured:{width:u.measured?.width,height:u.measured?.height},internals:{positionAbsolute:n,handleBounds:function(e,t){if(!e.handles)return e.measured?t?.internals.handleBounds:void 0;let n=[],r=[];for(let t of e.handles){let i={id:t.id,width:t.width??1,height:t.height??1,nodeId:e.id,x:t.x,y:t.y,position:t.position,type:t.type};"source"===t.type?n.push(i):"target"===t.type&&r.push(i)}return{source:n,target:r}}(u,e),z:Ew(u,s,i.zIndexMode),userNode:u}},t.set(u.id,e)}void 0!==e.measured&&void 0!==e.measured.width&&void 0!==e.measured.height||e.hidden||(l=!1),u.parentId&&E$(e,t,n,r,a)}return l}function E$(e,t,n,r,i){let{elevateNodesOnSelect:a,nodeOrigin:o,nodeExtent:s,zIndexMode:l}=Ey(Ev,r),u=e.parentId,d=t.get(u);if(!d)return void console.warn(`Parent node ${u} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);!function(e,t){if(!e.parentId)return;let n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}(e,n),i&&!d.parentId&&void 0===d.internals.rootParentIndex&&"auto"===l&&(d.internals.rootParentIndex=++i.i,d.internals.z=d.internals.z+10*i.i),i&&void 0!==d.internals.rootParentIndex&&(i.i=d.internals.rootParentIndex);let{x:c,y:m,z:f}=function(e,t,n,r,i,a){let{x:o,y:s}=t.internals.positionAbsolute,l=z0(e),u=zI(e,n),d=zQ(e.extent)?zC(u,e.extent,l):u,c=zC({x:o+d.x,y:s+d.y},r,l);"parent"===e.extent&&(c=zD(c,l,t));let m=Ew(e,i,a),f=t.internals.z??0;return{x:c.x,y:c.y,z:f>=m?f+1:m}}(e,d,o,s,a&&!Eb(l)?1e3:0,l),{positionAbsolute:p}=e.internals,h=c!==p.x||m!==p.y;(h||f!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:h?{x:c,y:m}:p,z:f}})}function Ew(e,t,n){let r=zH(e.zIndex)?e.zIndex:0;return Eb(n)?r:r+(e.selected?t:0)}function Ek(e,t,n,r=[0,0]){let i=[],a=new Map;for(let n of e){let e=t.get(n.parentId);if(!e)continue;let r=zF(a.get(n.parentId)?.expandedRect??zL(e),n.rect);a.set(n.parentId,{expandedRect:r,parent:e})}return a.size>0&&a.forEach(({expandedRect:t,parent:a},o)=>{let s=a.internals.positionAbsolute,l=z0(a),u=a.origin??r,d=t.x<s.x?Math.round(Math.abs(s.x-t.x)):0,c=t.y<s.y?Math.round(Math.abs(s.y-t.y)):0,m=Math.max(l.width,Math.round(t.width)),f=Math.max(l.height,Math.round(t.height)),p=(m-l.width)*u[0],h=(f-l.height)*u[1];(d>0||c>0||p||h)&&(i.push({id:o,type:"position",position:{x:a.position.x-d+p,y:a.position.y-c+h}}),n.get(o)?.forEach(t=>{e.some(e=>e.id===t.id)||i.push({id:t.id,type:"position",position:{x:t.position.x+d,y:t.position.y+c}})})),(l.width<t.width||l.height<t.height||d||c)&&i.push({id:o,type:"dimensions",setAttributes:!0,dimensions:{width:m+(d?u[0]*d-p:0),height:f+(c?u[1]*c-h:0)}})}),i}async function ES({delta:e,panZoom:t,transform:n,translateExtent:r,width:i,height:a}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);let o=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[i,a]],r);return Promise.resolve(!!o&&(o.x!==n[0]||o.y!==n[1]||o.k!==n[2]))}function EI(e,t,n,r,i,a){let o=i,s=r.get(o)||new Map;r.set(o,s.set(n,t)),o=`${i}-${e}`;let l=r.get(o)||new Map;if(r.set(o,l.set(n,t)),a){o=`${i}-${e}-${a}`;let s=r.get(o)||new Map;r.set(o,s.set(n,t))}}function Ej(e,t,n){for(let r of(e.clear(),t.clear(),n)){let{source:n,target:i,sourceHandle:a=null,targetHandle:o=null}=r,s={edgeId:r.id,source:n,target:i,sourceHandle:a,targetHandle:o},l=`${n}-${a}--${i}-${o}`;EI("source",s,`${i}-${o}--${n}-${a}`,e,n,a),EI("target",s,l,e,i,o),t.set(r.id,r)}}function EN(e,t,n){let r=e;do{if(r?.matches?.(t))return!0;if(r===n)break;r=r?.parentElement}while(r)return!1}function Ez({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){let i=[];for(let[e,a]of t){let t=n.get(e)?.internals.userNode;t&&i.push({...t,position:a.position,dragging:r})}if(!e)return[i[0],i];let a=n.get(e)?.internals.userNode;return[a?{...a,position:t.get(e)?.position||a.position,dragging:r}:i[0],i]}function EE(e,t,n,r,i,a=!1){let o=r.get(e);if(!o)return null;let s="strict"===i?o.internals.handleBounds?.[t]:[...o.internals.handleBounds?.source??[],...o.internals.handleBounds?.target??[]],l=(n?s?.find(e=>e.id===n):s?.[0])??null;return l&&a?{...l,...Ep(o,l,l.position,!0)}:l}function EO(e,t){return e?e:t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null}let ET=()=>!0;function EC(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:a,doc:o,lib:s,flowId:l,isValidConnection:u=ET,nodeLookup:d}){let c="target"===a,f=t?o.querySelector(`.${s}-flow__handle[data-id="${l}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x:p,y:h}=z7(e),g=o.elementFromPoint(p,h),v=g?.classList.contains(`${s}-flow__handle`)?g:f,x={handleDomNode:v,isValid:!1,connection:null,toHandle:null};if(v){let e=EO(void 0,v),t=v.getAttribute("data-nodeid"),a=v.getAttribute("data-handleid"),o=v.classList.contains("connectable"),s=v.classList.contains("connectableend");if(!t||!e)return x;let l={source:c?t:r,sourceHandle:c?a:i,target:c?r:t,targetHandle:c?i:a};x.connection=l,x.isValid=o&&s&&(n===m.Strict?c&&"source"===e||!c&&"target"===e:t!==r||a!==i)&&u(l),x.toHandle=EE(t,e,a,d,n,!0)}return x}let ED=function(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:i,edgeUpdaterType:a,isTarget:o,domNode:s,nodeLookup:l,lib:u,autoPanOnConnect:d,flowId:c,panBy:m,cancelConnection:f,onConnectStart:p,onConnect:h,onConnectEnd:g,isValidConnection:x=ET,onReconnectEnd:y,updateConnection:b,getTransform:_,getFromHandle:$,autoPanSpeed:w,dragThreshold:k=1,handleDomNode:S}){let I,j=z3(e.target),N=0,{x:z,y:E}=z7(e),O=EO(a,S),T=s?.getBoundingClientRect(),C=!1;if(!T||!O)return;let D=EE(i,O,r,l,t);if(!D)return;let U=z7(e,T),P=!1,Z=null,A=!1,R=null,L={...D,nodeId:i,type:O,position:D.position},M=l.get(i),F={inProgress:!0,isValid:null,from:Ep(M,L,v.Left,!0),fromHandle:L,fromPosition:L.position,fromNode:M,to:U,toHandle:null,toPosition:z$[L.position],toNode:null,pointer:U};function B(){C=!0,b(F),p?.(e,{nodeId:i,handleId:r,handleType:O})}function W(e){var a,s;let f;if(!C){let{x:t,y:n}=z7(e),r=t-z,i=n-E;if(!(r*r+i*i>k*k))return;B()}if(!$()||!L)return void H(e);let p=_();I=function(e,t,n,r){let i=[],a=1/0;for(let o of function(e,t,n){let r=[],i={x:e.x-n,y:e.y-n,width:2*n,height:2*n};for(let e of t.values())zB(i,zL(e))>0&&r.push(e);return r}(e,n,t+250))for(let n of[...o.internals.handleBounds?.source??[],...o.internals.handleBounds?.target??[]]){if(r.nodeId===n.nodeId&&r.type===n.type&&r.id===n.id)continue;let{x:s,y:l}=Ep(o,n,n.position,!0),u=Math.sqrt(Math.pow(s-e.x,2)+Math.pow(l-e.y,2));u>t||(u<a?(i=[{...n,x:s,y:l}],a=u):u===a&&i.push({...n,x:s,y:l}))}if(!i.length)return null;if(i.length>1){let e="source"===r.type?"target":"source";return i.find(t=>t.type===e)??i[0]}return i[0]}(zG(U=z7(e,T),p,!1,[1,1]),n,l,L),P||(!function e(){if(!d||!T)return;let[t,n]=zP(U,T,w);m({x:t,y:n}),N=requestAnimationFrame(e)}(),P=!0);let h=EC(e,{handle:I,connectionMode:t,fromNodeId:i,fromHandleId:r,fromType:o?"target":"source",isValidConnection:x,doc:j,lib:u,flowId:c,nodeLookup:l});R=h.handleDomNode,Z=h.connection,a=!!I,s=h.isValid,f=null,s?f=!0:a&&!s&&(f=!1),A=f;let g=l.get(i),y=g?Ep(g,L,v.Left,!0):F.from,S={...F,from:y,isValid:A,to:h.toHandle&&A?zK({x:h.toHandle.x,y:h.toHandle.y},p):U,toHandle:h.toHandle,toPosition:A&&h.toHandle?h.toHandle.position:z$[L.position],toNode:h.toHandle?l.get(h.toHandle.nodeId):null,pointer:U};b(S),F=S}function H(e){if(!("touches"in e)||!(e.touches.length>0)){if(C){(I||R)&&Z&&A&&h?.(Z);let{inProgress:t,...n}=F,r={...n,toPosition:F.toHandle?F.toPosition:null};g?.(e,r),a&&y?.(e,r)}f(),cancelAnimationFrame(N),P=!1,A=!1,Z=null,R=null,j.removeEventListener("mousemove",W),j.removeEventListener("mouseup",H),j.removeEventListener("touchmove",W),j.removeEventListener("touchend",H)}}0===k&&B(),j.addEventListener("mousemove",W),j.addEventListener("mouseup",H),j.addEventListener("touchmove",W),j.addEventListener("touchend",H)},EU=e=>({x:e.x,y:e.y,zoom:e.k}),EP=({x:e,y:t,zoom:n})=>zo.translate(e,t).scale(n),EZ=(e,t)=>e.target.closest(`.${t}`),EA=(e,t)=>2===t&&Array.isArray(e)&&e.includes(2),ER=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,EL=(e,t=0,n=ER,r=()=>{})=>{let i="number"==typeof t&&t>0;return i||r(),i?e.transition().duration(t).ease(n).on("end",r):e},EM=e=>{let t=e.ctrlKey&&zX()?10:1;return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*t};function EF(e){let t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:e.includes("left"),affectsY:e.includes("top")}}function EB(e,t){return Math.max(0,t-e)}function EW(e,t){return Math.max(0,e-t)}function EH(e,t,n){return Math.max(0,t-e,e-n)}(u=x||(x={})).Line="line",u.Handle="handle";let EV={width:0,height:0,x:0,y:0},EJ={...EV,pointerX:0,pointerY:0,aspectRatio:1};var EG=e.i(74934);let EK={get url(){return`file://${e.P("apps/compiler-ui/node_modules/zustand/esm/vanilla.mjs")}`}},Eq=e=>{let t,n=new Set,r=(e,r)=>{let i="function"==typeof e?e(t):e;if(!Object.is(i,t)){let e=t;t=(null!=r?r:"object"!=typeof i||null===i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{(EK.env?EK.env.MODE:void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},o=t=e(r,i,a);return a},{useDebugValue:EY}=_.default,{useSyncExternalStoreWithSelector:EX}=EG.default,EQ=e=>e;function E0(e,t=EQ,n){let r=EX(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return EY(r),r}let E1=(e,t)=>{let n=e?Eq(e):Eq,r=(e,r=t)=>E0(n,e,r);return Object.assign(r,n),r};function E4(e,t){if(Object.is(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[n,r]of e)if(!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}let n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}let E6=(0,_.createContext)(null),E2=E6.Provider,E5="[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001";function E3(e,t){let n=(0,_.useContext)(E6);if(null===n)throw Error(E5);return E0(n,e,t)}function E9(){let e=(0,_.useContext)(E6);if(null===e)throw Error(E5);return(0,_.useMemo)(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}let E8={display:"none"},E7={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Oe="react-flow__node-desc",Ot="react-flow__edge-desc",On=e=>e.ariaLiveMessage,Or=e=>e.ariaLabelConfig;function Oi({rfId:e}){let t=E3(On);return(0,b.jsx)("div",{id:`react-flow__aria-live-${e}`,"aria-live":"assertive","aria-atomic":"true",style:E7,children:t})}function Oa({rfId:e,disableKeyboardA11y:t}){let n=E3(Or);return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{id:`${Oe}-${e}`,style:E8,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),(0,b.jsx)("div",{id:`${Ot}-${e}`,style:E8,children:n["edge.a11yDescription.default"]}),!t&&(0,b.jsx)(Oi,{rfId:e})]})}let Oo=(0,_.forwardRef)(({position:e="top-left",children:t,className:n,style:r,...i},a)=>{let o=`${e}`.split("-");return(0,b.jsx)("div",{className:IG(["react-flow__panel",n,...o]),style:r,ref:a,...i,children:t})});function Os({proOptions:e,position:t="bottom-right"}){return e?.hideAttribution?null:(0,b.jsx)(Oo,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:(0,b.jsx)("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}Oo.displayName="Panel";let Ol=e=>{let t=[],n=[];for(let[,n]of e.nodeLookup)n.selected&&t.push(n.internals.userNode);for(let[,t]of e.edgeLookup)t.selected&&n.push(t);return{selectedNodes:t,selectedEdges:n}},Ou=e=>e.id;function Od(e,t){return E4(e.selectedNodes.map(Ou),t.selectedNodes.map(Ou))&&E4(e.selectedEdges.map(Ou),t.selectedEdges.map(Ou))}function Oc({onSelectionChange:e}){let t=E9(),{selectedNodes:n,selectedEdges:r}=E3(Ol,Od);return(0,_.useEffect)(()=>{let i={nodes:n,edges:r};e?.(i),t.getState().onSelectionChangeHandlers.forEach(e=>e(i))},[n,r,e]),null}let Om=e=>!!e.onSelectionChangeHandlers;function Of({onSelectionChange:e}){let t=E3(Om);return e||t?(0,b.jsx)(Oc,{onSelectionChange:e}):null}let Op=[0,0],Oh={x:0,y:0,zoom:1},Og=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode","rfId"],Ov=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),Ox={translateExtent:zx,nodeOrigin:Op,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function Oy(e){let{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:i,setTranslateExtent:a,setNodeExtent:o,reset:s,setDefaultNodesAndEdges:l}=E3(Ov,E4),u=E9();(0,_.useEffect)(()=>(l(e.defaultNodes,e.defaultEdges),()=>{d.current=Ox,s()}),[]);let d=(0,_.useRef)(Ox);return(0,_.useEffect)(()=>{for(let s of Og){let l=e[s];if(l!==d.current[s]&&void 0!==e[s])if("nodes"===s)t(l);else if("edges"===s)n(l);else if("minZoom"===s)r(l);else if("maxZoom"===s)i(l);else if("translateExtent"===s)a(l);else if("nodeExtent"===s)o(l);else if("ariaLabelConfig"===s)u.setState({ariaLabelConfig:{...zb,...l||{}}});else"fitView"===s?u.setState({fitViewQueued:l}):"fitViewOptions"===s?u.setState({fitViewOptions:l}):u.setState({[s]:l})}d.current=e},Og.map(t=>e[t])),null}function Ob(){return"u"<typeof window||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}let O_="u">typeof document?document:null;function O$(e=null,t={target:O_,actInsideInputWithModifier:!0}){let[n,r]=(0,_.useState)(!1),i=(0,_.useRef)(!1),a=(0,_.useRef)(new Set([])),[o,s]=(0,_.useMemo)(()=>{if(null!==e){let t=(Array.isArray(e)?e:[e]).filter(e=>"string"==typeof e).map(e=>e.replace("+","\n").replace("\n\n","\n+").split("\n")),n=t.reduce((e,t)=>e.concat(...t),[]);return[t,n]}return[[],[]]},[e]);return(0,_.useEffect)(()=>{let n=t?.target??O_,l=t?.actInsideInputWithModifier??!0;if(null!==e){let e=e=>{if(i.current=e.ctrlKey||e.metaKey||e.shiftKey||e.altKey,(!i.current||i.current&&!l)&&z8(e))return!1;let n=Ok(e.code,s);if(a.current.add(e[n]),Ow(o,a.current,!1)){let n=e.composedPath?.()?.[0]||e.target,a=n?.nodeName==="BUTTON"||n?.nodeName==="A";!1!==t.preventDefault&&(i.current||!a)&&e.preventDefault(),r(!0)}},u=e=>{let t=Ok(e.code,s);Ow(o,a.current,!0)?(r(!1),a.current.clear()):a.current.delete(e[t]),"Meta"===e.key&&a.current.clear(),i.current=!1},d=()=>{a.current.clear(),r(!1)};return n?.addEventListener("keydown",e),n?.addEventListener("keyup",u),window.addEventListener("blur",d),window.addEventListener("contextmenu",d),()=>{n?.removeEventListener("keydown",e),n?.removeEventListener("keyup",u),window.removeEventListener("blur",d),window.removeEventListener("contextmenu",d)}}},[e,r]),n}function Ow(e,t,n){return e.filter(e=>n||e.length===t.size).some(e=>e.every(e=>t.has(e)))}function Ok(e,t){return t.includes(e)?"code":"key"}function OS(e,t){let n=[],r=new Map,i=[];for(let t of e)if("add"===t.type){i.push(t);continue}else if("remove"===t.type||"replace"===t.type)r.set(t.id,[t]);else{let e=r.get(t.id);e?e.push(t):r.set(t.id,[t])}for(let e of t){let t=r.get(e.id);if(!t){n.push(e);continue}if("remove"===t[0].type)continue;if("replace"===t[0].type){n.push({...t[0].item});continue}let i={...e};for(let e of t){var a=e,o=i;switch(a.type){case"select":o.selected=a.selected;break;case"position":void 0!==a.position&&(o.position=a.position),void 0!==a.dragging&&(o.dragging=a.dragging);break;case"dimensions":void 0!==a.dimensions&&(o.measured={...a.dimensions},a.setAttributes&&((!0===a.setAttributes||"width"===a.setAttributes)&&(o.width=a.dimensions.width),(!0===a.setAttributes||"height"===a.setAttributes)&&(o.height=a.dimensions.height))),"boolean"==typeof a.resizing&&(o.resizing=a.resizing)}}n.push(i)}return i.length&&i.forEach(e=>{void 0!==e.index?n.splice(e.index,0,{...e.item}):n.push({...e.item})}),n}function OI(e,t){return{id:e,type:"select",selected:t}}function Oj(e,t=new Set,n=!1){let r=[];for(let[i,a]of e){let e=t.has(i);(void 0!==a.selected||e)&&a.selected!==e&&(n&&(a.selected=e),r.push(OI(a.id,e)))}return r}function ON({items:e=[],lookup:t}){let n=[],r=new Map(e.map(e=>[e.id,e]));for(let[r,i]of e.entries()){let e=t.get(i.id),a=e?.internals?.userNode??e;void 0!==a&&a!==i&&n.push({id:i.id,item:i,type:"replace"}),void 0===a&&n.push({item:i,type:"add",index:r})}for(let[e]of t)void 0===r.get(e)&&n.push({id:e,type:"remove"});return n}function Oz(e){return{id:e.id,type:"remove"}}let OE=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e);function OO(e){return(0,_.forwardRef)(e)}let OT="u">typeof window?_.useLayoutEffect:_.useEffect;function OC(e){let[t,n]=(0,_.useState)(BigInt(0)),[r]=(0,_.useState)(()=>{var e;let t;return e=()=>n(e=>e+BigInt(1)),t=[],{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}});return OT(()=>{let t=r.get();t.length&&(e(t),r.reset())},[t]),r}let OD=(0,_.createContext)(null);function OU({children:e}){let t=E9(),n=OC((0,_.useCallback)(e=>{let{nodes:n=[],setNodes:r,hasDefaultNodes:i,onNodesChange:a,nodeLookup:o,fitViewQueued:s,onNodesChangeMiddlewareMap:l}=t.getState(),u=n;for(let t of e)u="function"==typeof t?t(u):t;let d=ON({items:u,lookup:o});for(let e of l.values())d=e(d);i&&r(u),d.length>0?a?.(d):s&&window.requestAnimationFrame(()=>{let{fitViewQueued:e,nodes:n,setNodes:r}=t.getState();e&&r(n)})},[])),r=OC((0,_.useCallback)(e=>{let{edges:n=[],setEdges:r,hasDefaultEdges:i,onEdgesChange:a,edgeLookup:o}=t.getState(),s=n;for(let t of e)s="function"==typeof t?t(s):t;i?r(s):a&&a(ON({items:s,lookup:o}))},[])),i=(0,_.useMemo)(()=>({nodeQueue:n,edgeQueue:r}),[]);return(0,b.jsx)(OD.Provider,{value:i,children:e})}let OP=e=>!!e.panZoom;function OZ(){let e,t=(e=E9(),(0,_.useMemo)(()=>({zoomIn:t=>{let{panZoom:n}=e.getState();return n?n.scaleBy(1.2,{duration:t?.duration}):Promise.resolve(!1)},zoomOut:t=>{let{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,{duration:t?.duration}):Promise.resolve(!1)},zoomTo:(t,n)=>{let{panZoom:r}=e.getState();return r?r.scaleTo(t,{duration:n?.duration}):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{let{transform:[r,i,a],panZoom:o}=e.getState();return o?(await o.setViewport({x:t.x??r,y:t.y??i,zoom:t.zoom??a},n),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{let[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},setCenter:async(t,n,r)=>e.getState().setCenter(t,n,r),fitBounds:async(t,n)=>{let{width:r,height:i,minZoom:a,maxZoom:o,panZoom:s}=e.getState(),l=zY(t,r,i,a,o,n?.padding??.1);return s?(await s.setViewport(l,{duration:n?.duration,ease:n?.ease,interpolate:n?.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={})=>{let{transform:r,snapGrid:i,snapToGrid:a,domNode:o}=e.getState();if(!o)return t;let{x:s,y:l}=o.getBoundingClientRect(),u={x:t.x-s,y:t.y-l},d=n.snapGrid??i;return zG(u,r,n.snapToGrid??a,d)},flowToScreenPosition:t=>{let{transform:n,domNode:r}=e.getState();if(!r)return t;let{x:i,y:a}=r.getBoundingClientRect(),o=zK(t,n);return{x:o.x+i,y:o.y+a}}}),[])),n=E9(),r=function(){let e=(0,_.useContext)(OD);if(!e)throw Error("useBatchContext must be used within a BatchProvider");return e}(),i=E3(OP),a=(0,_.useMemo)(()=>{let e=e=>n.getState().nodeLookup.get(e),t=e=>{r.nodeQueue.push(e)},i=e=>{r.edgeQueue.push(e)},a=e=>{let{nodeLookup:t,nodeOrigin:r}=n.getState(),i=OE(e)?e:t.get(e.id),a=i.parentId?z4(i.position,i.measured,i.parentId,t,r):i.position;return zL({...i,position:a,width:i.measured?.width??i.width,height:i.measured?.height??i.height})},o=(e,n,r={replace:!1})=>{t(t=>t.map(t=>{if(t.id===e){let e="function"==typeof n?n(t):n;return r.replace&&OE(e)?e:{...t,...e}}return t}))},s=(e,t,n={replace:!1})=>{i(r=>r.map(r=>{if(r.id===e){let e="function"==typeof t?t(r):t;return n.replace&&zk(e)?e:{...r,...e}}return r}))};return{getNodes:()=>n.getState().nodes.map(e=>({...e})),getNode:t=>e(t)?.internals.userNode,getInternalNode:e,getEdges:()=>{let{edges:e=[]}=n.getState();return e.map(e=>({...e}))},getEdge:e=>n.getState().edgeLookup.get(e),setNodes:t,setEdges:i,addNodes:e=>{let t=Array.isArray(e)?e:[e];r.nodeQueue.push(e=>[...e,...t])},addEdges:e=>{let t=Array.isArray(e)?e:[e];r.edgeQueue.push(e=>[...e,...t])},toObject:()=>{let{nodes:e=[],edges:t=[],transform:r}=n.getState(),[i,a,o]=r;return{nodes:e.map(e=>({...e})),edges:t.map(e=>({...e})),viewport:{x:i,y:a,zoom:o}}},deleteElements:async({nodes:e=[],edges:t=[]})=>{let{nodes:r,edges:i,onNodesDelete:a,onEdgesDelete:o,triggerNodeChanges:s,triggerEdgeChanges:l,onDelete:u,onBeforeDelete:d}=n.getState(),{nodes:c,edges:m}=await zO({nodesToRemove:e,edgesToRemove:t,nodes:r,edges:i,onBeforeDelete:d}),f=m.length>0,p=c.length>0;if(f){let e=m.map(Oz);o?.(m),l(e)}if(p){let e=c.map(Oz);a?.(c),s(e)}return(p||f)&&u?.({nodes:c,edges:m}),{deletedNodes:c,deletedEdges:m}},getIntersectingNodes:(e,t=!0,r)=>{let i=zW(e),o=i?e:a(e),s=void 0!==r;return o?(r||n.getState().nodes).filter(r=>{let a=n.getState().nodeLookup.get(r.id);if(a&&!i&&(r.id===e.id||!a.internals.positionAbsolute))return!1;let l=zL(s?r:a),u=zB(l,o);return t&&u>0||u>=l.width*l.height||u>=o.width*o.height}):[]},isNodeIntersecting:(e,t,n=!0)=>{let r=zW(e)?e:a(e);if(!r)return!1;let i=zB(r,t);return n&&i>0||i>=t.width*t.height||i>=r.width*r.height},updateNode:o,updateNodeData:(e,t,n={replace:!1})=>{o(e,e=>{let r="function"==typeof t?t(e):t;return n.replace?{...e,data:r}:{...e,data:{...e.data,...r}}},n)},updateEdge:s,updateEdgeData:(e,t,n={replace:!1})=>{s(e,e=>{let r="function"==typeof t?t(e):t;return n.replace?{...e,data:r}:{...e,data:{...e.data,...r}}},n)},getNodesBounds:e=>{let{nodeLookup:t,nodeOrigin:r}=n.getState();return((e,t={nodeOrigin:[0,0]})=>0===e.length?{x:0,y:0,width:0,height:0}:zR(e.reduce((e,n)=>{let r="string"==typeof n,i=t.nodeLookup||r?void 0:n;return t.nodeLookup&&(i=r?t.nodeLookup.get(n):zS(n)?n:t.nodeLookup.get(n.id)),zZ(e,i?zM(i,t.nodeOrigin):{x:0,y:0,x2:0,y2:0})},{x:1/0,y:1/0,x2:-1/0,y2:-1/0})))(e,{nodeLookup:t,nodeOrigin:r})},getHandleConnections:({type:e,id:t,nodeId:r})=>Array.from(n.getState().connectionLookup.get(`${r}-${e}${t?`-${t}`:""}`)?.values()??[]),getNodeConnections:({type:e,handleId:t,nodeId:r})=>Array.from(n.getState().connectionLookup.get(`${r}${e?t?`-${e}-${t}`:`-${e}`:""}`)?.values()??[]),fitView:async e=>{let t,i,a=n.getState().fitViewResolver??{promise:new Promise((e,n)=>{t=e,i=n}),resolve:t,reject:i};return n.setState({fitViewQueued:!0,fitViewOptions:e,fitViewResolver:a}),r.nodeQueue.push(e=>[...e]),a.promise}}},[]);return(0,_.useMemo)(()=>({...a,...t,viewportInitialized:i}),[i])}let OA=e=>e.selected,OR="u">typeof window?window:void 0,OL={position:"absolute",width:"100%",height:"100%",top:0,left:0},OM=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function OF({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panOnScrollSpeed:i=.5,panOnScrollMode:a=f.Free,zoomOnDoubleClick:o=!0,panOnDrag:s=!0,defaultViewport:l,translateExtent:u,minZoom:d,maxZoom:c,zoomActivationKeyCode:m,preventScrolling:p=!0,children:h,noWheelClassName:g,noPanClassName:v,onViewportChange:x,isControlledViewport:y,paneClickDistance:$,selectionOnDrag:w}){let k,S=E9(),I=(0,_.useRef)(null),{userSelectionActive:j,lib:N,connectionInProgress:z}=E3(OM,E4),E=O$(m),O=(0,_.useRef)();k=E9(),(0,_.useEffect)(()=>{let e=()=>{if(!I.current||!(I.current.checkVisibility?.()??!0))return!1;let e=z5(I.current);(0===e.height||0===e.width)&&k.getState().onError?.("004","The React Flow parent container needs a width and a height to render the graph."),k.setState({width:e.width||500,height:e.height||500})};if(I.current){e(),window.addEventListener("resize",e);let t=new ResizeObserver(()=>e());return t.observe(I.current),()=>{window.removeEventListener("resize",e),t&&I.current&&t.unobserve(I.current)}}},[]);let T=(0,_.useCallback)(e=>{x?.({x:e[0],y:e[1],zoom:e[2]}),y||S.setState({transform:e})},[x,y]);return(0,_.useEffect)(()=>{if(I.current){O.current=function({domNode:e,minZoom:t,maxZoom:n,translateExtent:r,viewport:i,onPanZoom:a,onPanZoomStart:o,onPanZoomEnd:s,onDraggingChange:l}){let u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{x:0,y:0,zoom:0},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},d=e.getBoundingClientRect(),c=zg().scaleExtent([t,n]).translateExtent(r),m=jE(e).call(c);x({x:i.x,y:i.y,zoom:zT(i.zoom,t,n)},[[0,0],[d.width,d.height]],r);let p=m.on("wheel.zoom"),h=m.on("dblclick.zoom");function g(e,t){return m?new Promise(n=>{c?.interpolate(t?.interpolate==="linear"?zv:jV).transform(EL(m,t?.duration,t?.ease,()=>n(!0)),e)}):Promise.resolve(!1)}function v(){c.on("zoom",null)}async function x(e,t,n){let r=EP(e),i=c?.constrain()(r,t,n);return i&&await g(i),new Promise(e=>e(i))}return c.wheelDelta(EM),{update:function({noWheelClassName:e,noPanClassName:t,onPaneContextMenu:n,userSelectionActive:r,panOnScroll:i,panOnDrag:d,panOnScrollMode:g,panOnScrollSpeed:x,preventScrolling:y,zoomOnPinch:b,zoomOnScroll:_,zoomOnDoubleClick:$,zoomActivationKeyPressed:w,lib:k,onTransformChange:S,connectionInProgress:I,paneClickDistance:j,selectionOnDrag:N}){r&&!u.isZoomingOrPanning&&v();let z=i&&!w&&!r;c.clickDistance(N?1/0:!zH(j)||j<0?0:j);let E=z?function({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:i,panOnScrollSpeed:a,zoomOnPinch:o,onPanZoomStart:s,onPanZoom:l,onPanZoomEnd:u}){return d=>{if(EZ(d,t))return d.ctrlKey&&d.preventDefault(),!1;d.preventDefault(),d.stopImmediatePropagation();let c=n.property("__zoom").k||1;if(d.ctrlKey&&o){let e=jO(d),t=c*Math.pow(2,EM(d));r.scaleTo(n,t,e,d);return}let m=1===d.deltaMode?20:1,p=i===f.Vertical?0:d.deltaX*m,h=i===f.Horizontal?0:d.deltaY*m;!zX()&&d.shiftKey&&i!==f.Vertical&&(p=d.deltaY*m,h=0),r.translateBy(n,-(p/c)*a,-(h/c)*a,{internal:!0});let g=EU(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(l?.(d,g),e.panScrollTimeout=setTimeout(()=>{u?.(d,g),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,s?.(d,g))}}({zoomPanValues:u,noWheelClassName:e,d3Selection:m,d3Zoom:c,panOnScrollMode:g,panOnScrollSpeed:x,zoomOnPinch:b,onPanZoomStart:o,onPanZoom:a,onPanZoomEnd:s}):function({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,i){let a="wheel"===r.type,o=!t&&a&&!r.ctrlKey,s=EZ(r,e);if(r.ctrlKey&&a&&s&&r.preventDefault(),o||s)return null;r.preventDefault(),n.call(this,r,i)}}({noWheelClassName:e,preventScrolling:y,d3ZoomHandler:p});if(m.on("wheel.zoom",E,{passive:!1}),!r){let e=function({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{if(r.sourceEvent?.internal)return;let i=EU(r.transform);e.mouseButton=r.sourceEvent?.button||0,e.isZoomingOrPanning=!0,e.prevViewport=i,r.sourceEvent?.type==="mousedown"&&t(!0),n&&n?.(r.sourceEvent,i)}}({zoomPanValues:u,onDraggingChange:l,onPanZoomStart:o});c.on("start",e);let t=function({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:i}){return a=>{e.usedRightMouseButton=!!(n&&EA(t,e.mouseButton??0)),a.sourceEvent?.sync||r([a.transform.x,a.transform.y,a.transform.k]),i&&!a.sourceEvent?.internal&&i?.(a.sourceEvent,EU(a.transform))}}({zoomPanValues:u,panOnDrag:d,onPaneContextMenu:!!n,onPanZoom:a,onTransformChange:S});c.on("zoom",t);let r=function({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:i,onPaneContextMenu:a}){return o=>{if(!o.sourceEvent?.internal&&(e.isZoomingOrPanning=!1,a&&EA(t,e.mouseButton??0)&&!e.usedRightMouseButton&&o.sourceEvent&&a(o.sourceEvent),e.usedRightMouseButton=!1,r(!1),i)){let t=EU(o.transform);e.prevViewport=t,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{i?.(o.sourceEvent,t)},150*!!n)}}}({zoomPanValues:u,panOnDrag:d,panOnScroll:i,onPaneContextMenu:n,onPanZoomEnd:s,onDraggingChange:l});c.on("end",r)}let O=function({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:r,panOnScroll:i,zoomOnDoubleClick:a,userSelectionActive:o,noWheelClassName:s,noPanClassName:l,lib:u,connectionInProgress:d}){return c=>{let m=e||t,f=n&&c.ctrlKey,p="wheel"===c.type;if(1===c.button&&"mousedown"===c.type&&(EZ(c,`${u}-flow__node`)||EZ(c,`${u}-flow__edge`)))return!0;if(!r&&!m&&!i&&!a&&!n||o||d&&!p||EZ(c,s)&&p||EZ(c,l)&&(!p||i&&p&&!e)||!n&&c.ctrlKey&&p)return!1;if(!n&&"touchstart"===c.type&&c.touches?.length>1)return c.preventDefault(),!1;if(!m&&!i&&!f&&p||!r&&("mousedown"===c.type||"touchstart"===c.type)||Array.isArray(r)&&!r.includes(c.button)&&"mousedown"===c.type)return!1;let h=Array.isArray(r)&&r.includes(c.button)||!c.button||c.button<=1;return(!c.ctrlKey||p)&&h}}({zoomActivationKeyPressed:w,panOnDrag:d,zoomOnScroll:_,panOnScroll:i,zoomOnDoubleClick:$,zoomOnPinch:b,userSelectionActive:r,noPanClassName:t,noWheelClassName:e,lib:k,connectionInProgress:I});c.filter(O),$?m.on("dblclick.zoom",h):m.on("dblclick.zoom",null)},destroy:v,setViewport:async function e(e,t){let n=EP(e);return await g(n,t),new Promise(e=>e(n))},setViewportConstrained:x,getViewport:function(){let e=m?zs(m.node()):{x:0,y:0,k:1};return{x:e.x,y:e.y,zoom:e.k}},scaleTo:function(e,t){return m?new Promise(n=>{c?.interpolate(t?.interpolate==="linear"?zv:jV).scaleTo(EL(m,t?.duration,t?.ease,()=>n(!0)),e)}):Promise.resolve(!1)},scaleBy:function(e,t){return m?new Promise(n=>{c?.interpolate(t?.interpolate==="linear"?zv:jV).scaleBy(EL(m,t?.duration,t?.ease,()=>n(!0)),e)}):Promise.resolve(!1)},setScaleExtent:function(e){c?.scaleExtent(e)},setTranslateExtent:function(e){c?.translateExtent(e)},syncViewport:function(e){if(m){let t=EP(e),n=m.property("__zoom");(n.k!==e.zoom||n.x!==e.x||n.y!==e.y)&&c?.transform(m,t,null,{sync:!0})}},setClickDistance:function(e){let t=!zH(e)||e<0?0:e;c?.clickDistance(t)}}}({domNode:I.current,minZoom:d,maxZoom:c,translateExtent:u,viewport:l,onDraggingChange:e=>S.setState(t=>t.paneDragging===e?t:{paneDragging:e}),onPanZoomStart:(e,t)=>{let{onViewportChangeStart:n,onMoveStart:r}=S.getState();r?.(e,t),n?.(t)},onPanZoom:(e,t)=>{let{onViewportChange:n,onMove:r}=S.getState();r?.(e,t),n?.(t)},onPanZoomEnd:(e,t)=>{let{onViewportChangeEnd:n,onMoveEnd:r}=S.getState();r?.(e,t),n?.(t)}});let{x:e,y:t,zoom:n}=O.current.getViewport();return S.setState({panZoom:O.current,transform:[e,t,n],domNode:I.current.closest(".react-flow")}),()=>{O.current?.destroy()}}},[]),(0,_.useEffect)(()=>{O.current?.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panOnScrollSpeed:i,panOnScrollMode:a,zoomOnDoubleClick:o,panOnDrag:s,zoomActivationKeyPressed:E,preventScrolling:p,noPanClassName:v,userSelectionActive:j,noWheelClassName:g,lib:N,onTransformChange:T,connectionInProgress:z,selectionOnDrag:w,paneClickDistance:$})},[e,t,n,r,i,a,o,s,E,p,v,j,g,N,T,z,w,$]),(0,b.jsx)("div",{className:"react-flow__renderer",ref:I,style:OL,children:h})}let OB=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function OW(){let{userSelectionActive:e,userSelectionRect:t}=E3(OB,E4);return e&&t?(0,b.jsx)("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}let OH=(e,t)=>n=>{n.target===t.current&&e?.(n)},OV=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function OJ({isSelecting:e,selectionKeyPressed:t,selectionMode:n=p.Full,panOnDrag:r,paneClickDistance:i,selectionOnDrag:a,onSelectionStart:o,onSelectionEnd:s,onPaneClick:l,onPaneContextMenu:u,onPaneScroll:d,onPaneMouseEnter:c,onPaneMouseMove:m,onPaneMouseLeave:f,children:h}){let g=E9(),{userSelectionActive:v,elementsSelectable:x,dragging:y,connectionInProgress:$}=E3(OV,E4),w=x&&(e||v),k=(0,_.useRef)(null),S=(0,_.useRef)(),I=(0,_.useRef)(new Set),j=(0,_.useRef)(new Set),N=(0,_.useRef)(!1),z=e=>{if(N.current||$){N.current=!1;return}l?.(e),g.getState().resetSelectedElements(),g.setState({nodesSelectionActive:!1})},E=!0===r||Array.isArray(r)&&r.includes(0);return(0,b.jsxs)("div",{className:IG(["react-flow__pane",{draggable:E,dragging:y,selection:e}]),onClick:w?void 0:OH(z,k),onContextMenu:OH(e=>{Array.isArray(r)&&r?.includes(2)?e.preventDefault():u?.(e)},k),onWheel:OH(d?e=>d(e):void 0,k),onPointerEnter:w?void 0:c,onPointerMove:w?e=>{let{userSelectionRect:r,transform:a,nodeLookup:s,edgeLookup:l,connectionLookup:u,triggerNodeChanges:d,triggerEdgeChanges:c,defaultEdgeOptions:m,resetSelectedElements:f}=g.getState();if(!S.current||!r)return;let{x:h,y:v}=z7(e.nativeEvent,S.current),{startX:x,startY:y}=r;if(!N.current){if(Math.hypot(h-x,v-y)<=(t?0:i))return;f(),o?.(e)}N.current=!0;let b={startX:x,startY:y,x:h<x?h:x,y:v<y?v:y,width:Math.abs(h-x),height:Math.abs(v-y)},_=I.current,$=j.current;I.current=new Set(zN(s,b,a,n===p.Partial,!0).map(e=>e.id)),j.current=new Set;let w=m?.selectable??!0;for(let e of I.current){let t=u.get(e);if(t)for(let{edgeId:e}of t.values()){let t=l.get(e);t&&(t.selectable??w)&&j.current.add(e)}}z6(_,I.current)||d(Oj(s,I.current,!0)),z6($,j.current)||c(Oj(l,j.current)),g.setState({userSelectionRect:b,userSelectionActive:!0,nodesSelectionActive:!1})}:m,onPointerUp:w?e=>{0===e.button&&(e.target?.releasePointerCapture?.(e.pointerId),!v&&e.target===k.current&&g.getState().userSelectionRect&&z?.(e),g.setState({userSelectionActive:!1,userSelectionRect:null}),N.current&&(s?.(e),g.setState({nodesSelectionActive:I.current.size>0})))}:void 0,onPointerDownCapture:w?n=>{let{domNode:r}=g.getState();if(S.current=r?.getBoundingClientRect(),!S.current)return;let i=n.target===k.current;if(!i&&n.target.closest(".nokey")||!e||!(a&&i||t)||0!==n.button||!n.isPrimary)return;n.target?.setPointerCapture?.(n.pointerId),N.current=!1;let{x:o,y:s}=z7(n.nativeEvent,S.current);g.setState({userSelectionRect:{width:0,height:0,startX:o,startY:s,x:o,y:s}}),i||(n.stopPropagation(),n.preventDefault())}:void 0,onClickCapture:w?e=>{N.current&&(e.stopPropagation(),N.current=!1)}:void 0,onPointerLeave:f,ref:k,style:OL,children:[h,(0,b.jsx)(OW,{})]})}function OG({id:e,store:t,unselect:n=!1,nodeRef:r}){let i,{addSelectedNodes:a,unselectNodesAndEdges:o,multiSelectionActive:s,nodeLookup:l,onError:u}=t.getState(),d=l.get(e);d?(t.setState({nodesSelectionActive:!1}),d.selected?(n||d.selected&&s)&&(o({nodes:[d],edges:[]}),requestAnimationFrame(()=>r?.current?.blur())):a([e])):u?.("012",(i=e,`Node with id "${i}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`))}function OK({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:i,isSelectable:a,nodeClickDistance:o}){let s=E9(),[l,u]=(0,_.useState)(!1),d=(0,_.useRef)();return(0,_.useEffect)(()=>{d.current=function({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:i}){let a={x:null,y:null},o=0,s=new Map,l=!1,u={x:0,y:0},d=null,c=!1,m=null,f=!1,p=!1,h=null;return{update:function({noDragClassName:g,handleSelector:v,domNode:x,isSelectable:y,nodeId:b,nodeClickDistance:_=0}){function $({x:e,y:n}){let{nodeLookup:i,nodeExtent:o,snapGrid:l,snapToGrid:u,nodeOrigin:d,onNodeDrag:c,onSelectionDrag:m,onError:f,updateNodePositions:g}=t();a={x:e,y:n};let v=!1,x=s.size>1,y=x&&o?zA(zj(s)):null,_=x&&u?function({dragItems:e,snapGrid:t,x:n,y:r}){let i=e.values().next().value;if(!i)return null;let a={x:n-i.distance.x,y:r-i.distance.y},o=zJ(a,t);return{x:o.x-a.x,y:o.y-a.y}}({dragItems:s,snapGrid:l,x:e,y:n}):null;for(let[t,r]of s){if(!i.has(t))continue;let a={x:e-r.distance.x,y:n-r.distance.y};u&&(a=_?{x:Math.round(a.x+_.x),y:Math.round(a.y+_.y)}:zJ(a,l));let s=null;if(x&&o&&!r.extent&&y){let{positionAbsolute:e}=r.internals,t=e.x-y.x+o[0][0],n=e.x+r.measured.width-y.x2+o[1][0];s=[[t,e.y-y.y+o[0][1]],[n,e.y+r.measured.height-y.y2+o[1][1]]]}let{position:c,positionAbsolute:m}=zE({nodeId:t,nextPosition:a,nodeLookup:i,nodeExtent:s||o,nodeOrigin:d,onError:f});v=v||r.position.x!==c.x||r.position.y!==c.y,r.position=c,r.internals.positionAbsolute=m}if(p=p||v,v&&(g(s,!0),h&&(r||c||!b&&m))){let[e,t]=Ez({nodeId:b,dragItems:s,nodeLookup:i});r?.(h,s,e,t),c?.(h,e,t),b||m?.(h,t)}}async function w(){if(!d)return;let{transform:e,panBy:n,autoPanSpeed:r,autoPanOnNodeDrag:i}=t();if(!i){l=!1,cancelAnimationFrame(o);return}let[s,c]=zP(u,d,r);(0!==s||0!==c)&&(a.x=(a.x??0)-s/e[2],a.y=(a.y??0)-c/e[2],await n({x:s,y:c})&&$(a)),o=requestAnimationFrame(w)}function k(r){let{nodeLookup:i,multiSelectionActive:o,nodesDraggable:l,transform:u,snapGrid:m,snapToGrid:f,selectNodesOnDrag:p,onNodeDragStart:h,onSelectionDragStart:g,unselectNodesAndEdges:v}=t();c=!0,p&&y||o||!b||i.get(b)?.selected||v(),y&&p&&b&&e?.(b);let x=z2(r.sourceEvent,{transform:u,snapGrid:m,snapToGrid:f,containerBounds:d});if(a=x,(s=function(e,t,n,r){let i=new Map;for(let[a,o]of e)if((o.selected||o.id===r)&&(!o.parentId||!function e(t,n){if(!t.parentId)return!1;let r=n.get(t.parentId);return!!r&&(!!r.selected||e(r,n))}(o,e))&&(o.draggable||t&&void 0===o.draggable)){let t=e.get(a);t&&i.set(a,{id:a,position:t.position||{x:0,y:0},distance:{x:n.x-t.internals.positionAbsolute.x,y:n.y-t.internals.positionAbsolute.y},extent:t.extent,parentId:t.parentId,origin:t.origin,expandParent:t.expandParent,internals:{positionAbsolute:t.internals.positionAbsolute||{x:0,y:0}},measured:{width:t.measured.width??0,height:t.measured.height??0}})}return i}(i,l,x,b)).size>0&&(n||h||!b&&g)){let[e,t]=Ez({nodeId:b,dragItems:s,nodeLookup:i});n?.(r.sourceEvent,s,e,t),h?.(r.sourceEvent,e,t),b||g?.(r.sourceEvent,t)}}m=jE(x);let S=jW().clickDistance(_).on("start",e=>{let{domNode:n,nodeDragThreshold:r,transform:i,snapGrid:o,snapToGrid:s}=t();d=n?.getBoundingClientRect()||null,f=!1,p=!1,h=e.sourceEvent,0===r&&k(e),a=z2(e.sourceEvent,{transform:i,snapGrid:o,snapToGrid:s,containerBounds:d}),u=z7(e.sourceEvent,d)}).on("drag",e=>{let{autoPanOnNodeDrag:n,transform:r,snapGrid:i,snapToGrid:o,nodeDragThreshold:m,nodeLookup:p}=t(),g=z2(e.sourceEvent,{transform:r,snapGrid:i,snapToGrid:o,containerBounds:d});if(h=e.sourceEvent,("touchmove"===e.sourceEvent.type&&e.sourceEvent.touches.length>1||b&&!p.has(b))&&(f=!0),!f){if(!l&&n&&c&&(l=!0,w()),!c){let t=z7(e.sourceEvent,d),n=t.x-u.x,r=t.y-u.y;Math.sqrt(n*n+r*r)>m&&k(e)}(a.x!==g.xSnapped||a.y!==g.ySnapped)&&s&&c&&(u=z7(e.sourceEvent,d),$(g))}}).on("end",e=>{if(c&&!f&&(l=!1,c=!1,cancelAnimationFrame(o),s.size>0)){let{nodeLookup:n,updateNodePositions:r,onNodeDragStop:a,onSelectionDragStop:o}=t();if(p&&(r(s,!1),p=!1),i||a||!b&&o){let[t,r]=Ez({nodeId:b,dragItems:s,nodeLookup:n,dragging:!1});i?.(e.sourceEvent,s,t,r),a?.(e.sourceEvent,t,r),b||o?.(e.sourceEvent,r)}}}).filter(e=>{let t=e.target;return!e.button&&(!g||!EN(t,`.${g}`,x))&&(!v||EN(t,v,x))});m.call(S)},destroy:function(){m?.on(".drag",null)}}}({getStoreItems:()=>s.getState(),onNodeMouseDown:t=>{OG({id:t,store:s,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})},[]),(0,_.useEffect)(()=>{if(!t&&e.current&&d.current)return d.current.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:a,nodeId:i,nodeClickDistance:o}),()=>{d.current?.destroy()}},[n,r,t,a,e,i,o]),l}function Oq(){let e=E9();return(0,_.useCallback)(t=>{let{nodeExtent:n,snapToGrid:r,snapGrid:i,nodesDraggable:a,onError:o,updateNodePositions:s,nodeLookup:l,nodeOrigin:u}=e.getState(),d=new Map,c=e=>e.selected&&(e.draggable||a&&void 0===e.draggable),m=r?i[0]:5,f=r?i[1]:5,p=t.direction.x*m*t.factor,h=t.direction.y*f*t.factor;for(let[,e]of l){if(!c(e))continue;let t={x:e.internals.positionAbsolute.x+p,y:e.internals.positionAbsolute.y+h};r&&(t=zJ(t,i));let{position:a,positionAbsolute:s}=zE({nodeId:e.id,nextPosition:t,nodeLookup:l,nodeExtent:n,nodeOrigin:u,onError:o});e.position=a,e.internals.positionAbsolute=s,d.set(e.id,e)}s(d)},[])}let OY=(0,_.createContext)(null),OX=OY.Provider;OY.Consumer;let OQ=()=>(0,_.useContext)(OY),O0=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),O1=(0,_.memo)(OO(function({type:e="source",position:t=v.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:i=!0,isConnectableEnd:a=!0,id:o,onConnect:s,children:l,className:u,onMouseDown:d,onTouchStart:c,...f},p){let h=o||null,g="target"===e,x=E9(),y=OQ(),{connectOnClick:_,noPanClassName:$,rfId:w}=E3(O0,E4),{connectingFrom:k,connectingTo:S,clickConnecting:I,isPossibleEndHandle:j,connectionInProcess:N,clickConnectionInProcess:z,valid:E}=E3(t=>{let{connectionClickStartHandle:n,connectionMode:r,connection:i}=t,{fromHandle:a,toHandle:o,isValid:s}=i,l=o?.nodeId===y&&o?.id===h&&o?.type===e;return{connectingFrom:a?.nodeId===y&&a?.id===h&&a?.type===e,connectingTo:l,clickConnecting:n?.nodeId===y&&n?.id===h&&n?.type===e,isPossibleEndHandle:r===m.Strict?a?.type!==e:y!==a?.nodeId||h!==a?.id,connectionInProcess:!!a,clickConnectionInProcess:!!n,valid:l&&s}},E4);y||x.getState().onError?.("010","Handle: No node id found. Make sure to only use a Handle inside a custom Node.");let O=e=>{let{defaultEdgeOptions:t,onConnect:n,hasDefaultEdges:r}=x.getState(),i={...t,...e};if(r){let{edges:e,setEdges:t}=x.getState();t(((e,t,n={})=>{let r,i;if(!e.source||!e.target)return zV("006","Can't create edge. An edge needs a source and a target."),t;let a=n.getEdgeId||Eo;return(i=r=zk(e)?{...e}:{...e,id:a(e)},t.some(e=>e.source===i.source&&e.target===i.target&&(e.sourceHandle===i.sourceHandle||!e.sourceHandle&&!i.sourceHandle)&&(e.targetHandle===i.targetHandle||!e.targetHandle&&!i.targetHandle)))?t:(null===r.sourceHandle&&delete r.sourceHandle,null===r.targetHandle&&delete r.targetHandle,t.concat(r))})(i,e))}n?.(i),s?.(i)},T=e=>{if(!y)return;let t="clientX"in e.nativeEvent;if(i&&(t&&0===e.button||!t)){let t=x.getState();ED(e.nativeEvent,{handleDomNode:e.currentTarget,autoPanOnConnect:t.autoPanOnConnect,connectionMode:t.connectionMode,connectionRadius:t.connectionRadius,domNode:t.domNode,nodeLookup:t.nodeLookup,lib:t.lib,isTarget:g,handleId:h,nodeId:y,flowId:t.rfId,panBy:t.panBy,cancelConnection:t.cancelConnection,onConnectStart:t.onConnectStart,onConnectEnd:(...e)=>x.getState().onConnectEnd?.(...e),updateConnection:t.updateConnection,onConnect:O,isValidConnection:n||((...e)=>x.getState().isValidConnection?.(...e)??!0),getTransform:()=>x.getState().transform,getFromHandle:()=>x.getState().connection.fromHandle,autoPanSpeed:t.autoPanSpeed,dragThreshold:t.connectionDragThreshold})}t?d?.(e):c?.(e)};return(0,b.jsx)("div",{"data-handleid":h,"data-nodeid":y,"data-handlepos":t,"data-id":`${w}-${y}-${h}-${e}`,className:IG(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",$,u,{source:!g,target:g,connectable:r,connectablestart:i,connectableend:a,clickconnecting:I,connectingfrom:k,connectingto:S,valid:E,connectionindicator:r&&(!N||j)&&(N||z?a:i)}]),onMouseDown:T,onTouchStart:T,onClick:_?t=>{let{onClickConnectStart:r,onClickConnectEnd:a,connectionClickStartHandle:o,connectionMode:s,isValidConnection:l,lib:u,rfId:d,nodeLookup:c,connection:m}=x.getState();if(!y||!o&&!i)return;if(!o){r?.(t.nativeEvent,{nodeId:y,handleId:h,handleType:e}),x.setState({connectionClickStartHandle:{nodeId:y,type:e,id:h}});return}let f=z3(t.target),p=n||l,{connection:g,isValid:v}=EC(t.nativeEvent,{handle:{nodeId:y,id:h,type:e},connectionMode:s,fromNodeId:o.nodeId,fromHandleId:o.id||null,fromType:o.type,isValidConnection:p,flowId:d,doc:f,lib:u,nodeLookup:c});v&&g&&O(g);let b=structuredClone(m);delete b.inProgress,b.toPosition=b.toHandle?b.toHandle.position:null,a?.(t,b),x.setState({connectionClickStartHandle:null})}:void 0,ref:p,...f,children:l})})),O4={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},O6={input:function({data:e,isConnectable:t,sourcePosition:n=v.Bottom}){return(0,b.jsxs)(b.Fragment,{children:[e?.label,(0,b.jsx)(O1,{type:"source",position:n,isConnectable:t})]})},default:function({data:e,isConnectable:t,targetPosition:n=v.Top,sourcePosition:r=v.Bottom}){return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(O1,{type:"target",position:n,isConnectable:t}),e?.label,(0,b.jsx)(O1,{type:"source",position:r,isConnectable:t})]})},output:function({data:e,isConnectable:t,targetPosition:n=v.Top}){return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(O1,{type:"target",position:n,isConnectable:t}),e?.label]})},group:function(){return null}},O2=e=>{let{width:t,height:n,x:r,y:i}=zj(e.nodeLookup,{filter:e=>!!e.selected});return{width:zH(t)?t:null,height:zH(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${i}px)`}};function O5({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){let r=E9(),{width:i,height:a,transformString:o,userSelectionActive:s}=E3(O2,E4),l=Oq(),u=(0,_.useRef)(null);(0,_.useEffect)(()=>{n||u.current?.focus({preventScroll:!0})},[n]);let d=!s&&null!==i&&null!==a;if(OK({nodeRef:u,disabled:!d}),!d)return null;let c=e?t=>{e(t,r.getState().nodes.filter(e=>e.selected))}:void 0;return(0,b.jsx)("div",{className:IG(["react-flow__nodesselection","react-flow__container",t]),style:{transform:o},children:(0,b.jsx)("div",{ref:u,className:"react-flow__nodesselection-rect",onContextMenu:c,tabIndex:n?void 0:-1,onKeyDown:n?void 0:e=>{Object.prototype.hasOwnProperty.call(O4,e.key)&&(e.preventDefault(),l({direction:O4[e.key],factor:e.shiftKey?4:1}))},style:{width:i,height:a}})})}let O3="u">typeof window?window:void 0,O9=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function O8({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:o,paneClickDistance:s,deleteKeyCode:l,selectionKeyCode:u,selectionOnDrag:d,selectionMode:c,onSelectionStart:m,onSelectionEnd:f,multiSelectionKeyCode:p,panActivationKeyCode:h,zoomActivationKeyCode:g,elementsSelectable:v,zoomOnScroll:x,zoomOnPinch:y,panOnScroll:$,panOnScrollSpeed:w,panOnScrollMode:k,zoomOnDoubleClick:S,panOnDrag:I,defaultViewport:j,translateExtent:N,minZoom:z,maxZoom:E,preventScrolling:O,onSelectionContextMenu:T,noWheelClassName:C,noPanClassName:D,disableKeyboardA11y:U,onViewportChange:P,isControlledViewport:Z}){let{nodesSelectionActive:A,userSelectionActive:R}=E3(O9,E4),L=O$(u,{target:O3}),M=O$(h,{target:O3}),F=M||I,B=M||$,W=d&&!0!==F,H=L||R||W;return!function({deleteKeyCode:e,multiSelectionKeyCode:t}){let n=E9(),{deleteElements:r}=OZ(),i=O$(e,{actInsideInputWithModifier:!1}),a=O$(t,{target:OR});(0,_.useEffect)(()=>{if(i){let{edges:e,nodes:t}=n.getState();r({nodes:t.filter(OA),edges:e.filter(OA)}),n.setState({nodesSelectionActive:!1})}},[i]),(0,_.useEffect)(()=>{n.setState({multiSelectionActive:a})},[a])}({deleteKeyCode:l,multiSelectionKeyCode:p}),(0,b.jsx)(OF,{onPaneContextMenu:a,elementsSelectable:v,zoomOnScroll:x,zoomOnPinch:y,panOnScroll:B,panOnScrollSpeed:w,panOnScrollMode:k,zoomOnDoubleClick:S,panOnDrag:!L&&F,defaultViewport:j,translateExtent:N,minZoom:z,maxZoom:E,zoomActivationKeyCode:g,preventScrolling:O,noWheelClassName:C,noPanClassName:D,onViewportChange:P,isControlledViewport:Z,paneClickDistance:s,selectionOnDrag:W,children:(0,b.jsxs)(OJ,{onSelectionStart:m,onSelectionEnd:f,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:o,panOnDrag:F,isSelecting:!!H,selectionMode:c,selectionKeyPressed:L,paneClickDistance:s,selectionOnDrag:W,children:[e,A&&(0,b.jsx)(O5,{onSelectionContextMenu:T,noPanClassName:D,disableKeyboardA11y:U})]})})}O8.displayName="FlowRenderer";let O7=(0,_.memo)(O8),Te=e=>e.updateNodeInternals;var Tt=(0,_.memo)(function({id:e,onClick:t,onMouseEnter:n,onMouseMove:r,onMouseLeave:i,onContextMenu:a,onDoubleClick:o,nodesDraggable:s,elementsSelectable:l,nodesConnectable:u,nodesFocusable:d,resizeObserver:c,noDragClassName:m,noPanClassName:f,disableKeyboardA11y:p,rfId:h,nodeTypes:g,nodeClickDistance:v,onError:x}){let y,{node:$,internals:w,isParent:k}=E3(t=>{let n=t.nodeLookup.get(e),r=t.parentLookup.has(e);return{node:n,internals:n.internals,isParent:r}},E4),S=$.type||"default",I=g?.[S]||O6[S];void 0===I&&(x?.("003",(y=S,`Node type "${y}" not found. Using fallback type "default".`)),S="default",I=g?.default||O6.default);let j=!!($.draggable||s&&void 0===$.draggable),N=!!($.selectable||l&&void 0===$.selectable),z=!!($.connectable||u&&void 0===$.connectable),E=!!($.focusable||d&&void 0===$.focusable),O=E9(),T=z1($),C=function({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){let i=E9(),a=(0,_.useRef)(null),o=(0,_.useRef)(null),s=(0,_.useRef)(e.sourcePosition),l=(0,_.useRef)(e.targetPosition),u=(0,_.useRef)(t),d=n&&!!e.internals.handleBounds;return(0,_.useEffect)(()=>{!a.current||e.hidden||d&&o.current===a.current||(o.current&&r?.unobserve(o.current),r?.observe(a.current),o.current=a.current)},[d,e.hidden]),(0,_.useEffect)(()=>()=>{o.current&&(r?.unobserve(o.current),o.current=null)},[]),(0,_.useEffect)(()=>{if(a.current){let n=u.current!==t,r=s.current!==e.sourcePosition,o=l.current!==e.targetPosition;(n||r||o)&&(u.current=t,s.current=e.sourcePosition,l.current=e.targetPosition,i.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:a.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),a}({node:$,nodeType:S,hasDimensions:T,resizeObserver:c}),D=OK({nodeRef:C,disabled:$.hidden||!j,noDragClassName:m,handleSelector:$.dragHandle,nodeId:e,isSelectable:N,nodeClickDistance:v}),U=Oq();if($.hidden)return null;let P=z0($),Z=void 0===$.internals.handleBounds?{width:$.width??$.initialWidth??$.style?.width,height:$.height??$.initialHeight??$.style?.height}:{width:$.width??$.style?.width,height:$.height??$.style?.height},A=N||j||t||n||r||i,R=n?e=>n(e,{...w.userNode}):void 0,L=r?e=>r(e,{...w.userNode}):void 0,M=i?e=>i(e,{...w.userNode}):void 0,F=a?e=>a(e,{...w.userNode}):void 0,B=o?e=>o(e,{...w.userNode}):void 0;return(0,b.jsx)("div",{className:IG(["react-flow__node",`react-flow__node-${S}`,{[f]:j},$.className,{selected:$.selected,selectable:N,parent:k,draggable:j,dragging:D}]),ref:C,style:{zIndex:w.z,transform:`translate(${w.positionAbsolute.x}px,${w.positionAbsolute.y}px)`,pointerEvents:A?"all":"none",visibility:T?"visible":"hidden",...$.style,...Z},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:R,onMouseMove:L,onMouseLeave:M,onContextMenu:F,onClick:n=>{let{selectNodesOnDrag:r,nodeDragThreshold:i}=O.getState();N&&(!r||!j||i>0)&&OG({id:e,store:O,nodeRef:C}),t&&t(n,{...w.userNode})},onDoubleClick:B,onKeyDown:E?t=>{if(!z8(t.nativeEvent)&&!p){if(zy.includes(t.key)&&N)OG({id:e,store:O,unselect:"Escape"===t.key,nodeRef:C});else if(j&&$.selected&&Object.prototype.hasOwnProperty.call(O4,t.key)){t.preventDefault();let{ariaLabelConfig:e}=O.getState();O.setState({ariaLiveMessage:e["node.a11yDescription.ariaLiveMessage"]({direction:t.key.replace("Arrow","").toLowerCase(),x:~~w.positionAbsolute.x,y:~~w.positionAbsolute.y})}),U({direction:O4[t.key],factor:t.shiftKey?4:1})}}}:void 0,tabIndex:E?0:void 0,onFocus:E?()=>{if(p||!C.current?.matches(":focus-visible"))return;let{transform:t,width:n,height:r,autoPanOnNodeFocus:i,setCenter:a}=O.getState();!i||zN(new Map([[e,$]]),{x:0,y:0,width:n,height:r},t,!0).length>0||a($.position.x+P.width/2,$.position.y+P.height/2,{zoom:t[2]})}:void 0,role:$.ariaRole??(E?"group":void 0),"aria-roledescription":"node","aria-describedby":p?void 0:`${Oe}-${h}`,"aria-label":$.ariaLabel,...$.domAttributes,children:(0,b.jsx)(OX,{value:e,children:(0,b.jsx)(I,{id:e,data:$.data,type:S,positionAbsoluteX:w.positionAbsolute.x,positionAbsoluteY:w.positionAbsolute.y,selected:$.selected??!1,selectable:N,draggable:j,deletable:$.deletable??!0,isConnectable:z,sourcePosition:$.sourcePosition,targetPosition:$.targetPosition,dragging:D,dragHandle:$.dragHandle,zIndex:w.z,parentId:$.parentId,...P})})})});let Tn=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function Tr(e){var t;let{nodesDraggable:n,nodesConnectable:r,nodesFocusable:i,elementsSelectable:a,onError:o}=E3(Tn,E4),s=(t=e.onlyRenderVisibleElements,E3((0,_.useCallback)(e=>t?zN(e.nodeLookup,{x:0,y:0,width:e.width,height:e.height},e.transform,!0).map(e=>e.id):Array.from(e.nodeLookup.keys()),[t]),E4)),l=function(){let e=E3(Te),[t]=(0,_.useState)(()=>"u"<typeof ResizeObserver?null:new ResizeObserver(t=>{let n=new Map;t.forEach(e=>{let t=e.target.getAttribute("data-id");n.set(t,{id:t,nodeElement:e.target,force:!0})}),e(n)}));return(0,_.useEffect)(()=>()=>{t?.disconnect()},[t]),t}();return(0,b.jsx)("div",{className:"react-flow__nodes",style:OL,children:s.map(t=>(0,b.jsx)(Tt,{id:t,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:l,nodesDraggable:n,nodesConnectable:r,nodesFocusable:i,elementsSelectable:a,nodeClickDistance:e.nodeClickDistance,onError:o},t))})}Tr.displayName="NodeRenderer";let Ti=(0,_.memo)(Tr),Ta={[g.Arrow]:({color:e="none",strokeWidth:t=1})=>{let n={strokeWidth:t,...e&&{stroke:e}};return(0,b.jsx)("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},[g.ArrowClosed]:({color:e="none",strokeWidth:t=1})=>{let n={strokeWidth:t,...e&&{stroke:e,fill:e}};return(0,b.jsx)("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})}},To=({id:e,type:t,color:n,width:r=12.5,height:i=12.5,markerUnits:a="strokeWidth",strokeWidth:o,orient:s="auto-start-reverse"})=>{let l,u=(l=E9(),(0,_.useMemo)(()=>{let e;return Object.prototype.hasOwnProperty.call(Ta,t)?Ta[t]:(l.getState().onError?.("009",(e=t,`Marker type "${e}" doesn't exist.`)),null)},[t]));return u?(0,b.jsx)("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${i}`,viewBox:"-10 -10 20 20",markerUnits:a,orient:s,refX:"0",refY:"0",children:(0,b.jsx)(u,{color:n,strokeWidth:o})}):null},Ts=({defaultColor:e,rfId:t})=>{let n=E3(e=>e.edges),r=E3(e=>e.defaultEdgeOptions),i=(0,_.useMemo)(()=>(function(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:i}){let a=new Set;return e.reduce((e,o)=>([o.markerStart||r,o.markerEnd||i].forEach(r=>{if(r&&"object"==typeof r){let i=Eg(r,t);a.has(i)||(e.push({id:i,color:r.color||n,...r}),a.add(i))}}),e),[]).sort((e,t)=>e.id.localeCompare(t.id))})(n,{id:t,defaultColor:e,defaultMarkerStart:r?.markerStart,defaultMarkerEnd:r?.markerEnd}),[n,r,t,e]);return i.length?(0,b.jsx)("svg",{className:"react-flow__marker","aria-hidden":"true",children:(0,b.jsx)("defs",{children:i.map(e=>(0,b.jsx)(To,{id:e.id,type:e.type,color:e.color,width:e.width,height:e.height,markerUnits:e.markerUnits,strokeWidth:e.strokeWidth,orient:e.orient},e.id))})}):null};Ts.displayName="MarkerDefinitions";var Tl=(0,_.memo)(Ts);function Tu({x:e,y:t,label:n,labelStyle:r,labelShowBg:i=!0,labelBgStyle:a,labelBgPadding:o=[2,4],labelBgBorderRadius:s=2,children:l,className:u,...d}){let[c,m]=(0,_.useState)({x:1,y:0,width:0,height:0}),f=IG(["react-flow__edge-textwrapper",u]),p=(0,_.useRef)(null);return((0,_.useEffect)(()=>{if(p.current){let e=p.current.getBBox();m({x:e.x,y:e.y,width:e.width,height:e.height})}},[n]),n)?(0,b.jsxs)("g",{transform:`translate(${e-c.width/2} ${t-c.height/2})`,className:f,visibility:c.width?"visible":"hidden",...d,children:[i&&(0,b.jsx)("rect",{width:c.width+2*o[0],x:-o[0],y:-o[1],height:c.height+2*o[1],className:"react-flow__edge-textbg",style:a,rx:s,ry:s}),(0,b.jsx)("text",{className:"react-flow__edge-text",y:c.height/2,dy:"0.3em",ref:p,style:r,children:n}),l]}):null}Tu.displayName="EdgeText";let Td=(0,_.memo)(Tu);function Tc({path:e,labelX:t,labelY:n,label:r,labelStyle:i,labelShowBg:a,labelBgStyle:o,labelBgPadding:s,labelBgBorderRadius:l,interactionWidth:u=20,...d}){return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("path",{...d,d:e,fill:"none",className:IG(["react-flow__edge-path",d.className])}),u?(0,b.jsx)("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:u,className:"react-flow__edge-interaction"}):null,r&&zH(t)&&zH(n)?(0,b.jsx)(Td,{x:t,y:n,label:r,labelStyle:i,labelShowBg:a,labelBgStyle:o,labelBgPadding:s,labelBgBorderRadius:l}):null]})}function Tm({pos:e,x1:t,y1:n,x2:r,y2:i}){return e===v.Left||e===v.Right?[.5*(t+r),n]:[t,.5*(n+i)]}function Tf({sourceX:e,sourceY:t,sourcePosition:n=v.Bottom,targetX:r,targetY:i,targetPosition:a=v.Top}){let[o,s]=Tm({pos:n,x1:e,y1:t,x2:r,y2:i}),[l,u]=Tm({pos:a,x1:r,y1:i,x2:e,y2:t}),[d,c,m,f]=Et({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:o,sourceControlY:s,targetControlX:l,targetControlY:u});return[`M${e},${t} C${o},${s} ${l},${u} ${r},${i}`,d,c,m,f]}function Tp(e){return(0,_.memo)(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,sourcePosition:o,targetPosition:s,label:l,labelStyle:u,labelShowBg:d,labelBgStyle:c,labelBgPadding:m,labelBgBorderRadius:f,style:p,markerEnd:h,markerStart:g,interactionWidth:v})=>{let[x,y,_]=Tf({sourceX:n,sourceY:r,sourcePosition:o,targetX:i,targetY:a,targetPosition:s}),$=e.isInternal?void 0:t;return(0,b.jsx)(Tc,{id:$,path:x,labelX:y,labelY:_,label:l,labelStyle:u,labelShowBg:d,labelBgStyle:c,labelBgPadding:m,labelBgBorderRadius:f,style:p,markerEnd:h,markerStart:g,interactionWidth:v})})}let Th=Tp({isInternal:!1}),Tg=Tp({isInternal:!0});function Tv(e){return(0,_.memo)(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,label:o,labelStyle:s,labelShowBg:l,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:c,style:m,sourcePosition:f=v.Bottom,targetPosition:p=v.Top,markerEnd:h,markerStart:g,pathOptions:x,interactionWidth:y})=>{let[_,$,w]=Ec({sourceX:n,sourceY:r,sourcePosition:f,targetX:i,targetY:a,targetPosition:p,borderRadius:x?.borderRadius,offset:x?.offset,stepPosition:x?.stepPosition}),k=e.isInternal?void 0:t;return(0,b.jsx)(Tc,{id:k,path:_,labelX:$,labelY:w,label:o,labelStyle:s,labelShowBg:l,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:c,style:m,markerEnd:h,markerStart:g,interactionWidth:y})})}Th.displayName="SimpleBezierEdge",Tg.displayName="SimpleBezierEdgeInternal";let Tx=Tv({isInternal:!1}),Ty=Tv({isInternal:!0});function Tb(e){return(0,_.memo)(({id:t,...n})=>{let r=e.isInternal?void 0:t;return(0,b.jsx)(Tx,{...n,id:r,pathOptions:(0,_.useMemo)(()=>({borderRadius:0,offset:n.pathOptions?.offset}),[n.pathOptions?.offset])})})}Tx.displayName="SmoothStepEdge",Ty.displayName="SmoothStepEdgeInternal";let T_=Tb({isInternal:!1}),T$=Tb({isInternal:!0});function Tw(e){return(0,_.memo)(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,label:o,labelStyle:s,labelShowBg:l,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:c,style:m,markerEnd:f,markerStart:p,interactionWidth:h})=>{let[g,v,x]=Es({sourceX:n,sourceY:r,targetX:i,targetY:a}),y=e.isInternal?void 0:t;return(0,b.jsx)(Tc,{id:y,path:g,labelX:v,labelY:x,label:o,labelStyle:s,labelShowBg:l,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:c,style:m,markerEnd:f,markerStart:p,interactionWidth:h})})}T_.displayName="StepEdge",T$.displayName="StepEdgeInternal";let Tk=Tw({isInternal:!1}),TS=Tw({isInternal:!0});function TI(e){return(0,_.memo)(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,sourcePosition:o=v.Bottom,targetPosition:s=v.Top,label:l,labelStyle:u,labelShowBg:d,labelBgStyle:c,labelBgPadding:m,labelBgBorderRadius:f,style:p,markerEnd:h,markerStart:g,pathOptions:x,interactionWidth:y})=>{let[_,$,w]=Ei({sourceX:n,sourceY:r,sourcePosition:o,targetX:i,targetY:a,targetPosition:s,curvature:x?.curvature}),k=e.isInternal?void 0:t;return(0,b.jsx)(Tc,{id:k,path:_,labelX:$,labelY:w,label:l,labelStyle:u,labelShowBg:d,labelBgStyle:c,labelBgPadding:m,labelBgBorderRadius:f,style:p,markerEnd:h,markerStart:g,interactionWidth:y})})}Tk.displayName="StraightEdge",TS.displayName="StraightEdgeInternal";let Tj=TI({isInternal:!1}),TN=TI({isInternal:!0});Tj.displayName="BezierEdge",TN.displayName="BezierEdgeInternal";let Tz={default:TN,straight:TS,step:T$,smoothstep:Ty,simplebezier:Tg},TE={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},TO="react-flow__edgeupdater";function TT({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:i,onMouseEnter:a,onMouseOut:o,type:s}){return(0,b.jsx)("circle",{onMouseDown:i,onMouseEnter:a,onMouseOut:o,className:IG([TO,`${TO}-${s}`]),cx:e===v.Left?t-r:e===v.Right?t+r:t,cy:e===v.Top?n-r:e===v.Bottom?n+r:n,r:r,stroke:"transparent",fill:"transparent"})}function TC({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:r,sourceY:i,targetX:a,targetY:o,sourcePosition:s,targetPosition:l,onReconnect:u,onReconnectStart:d,onReconnectEnd:c,setReconnecting:m,setUpdateHover:f}){let p=E9(),h=(e,t)=>{if(0!==e.button)return;let{autoPanOnConnect:r,domNode:i,connectionMode:a,connectionRadius:o,lib:s,onConnectStart:l,cancelConnection:f,nodeLookup:h,rfId:g,panBy:v,updateConnection:x}=p.getState(),y="target"===t.type;ED(e.nativeEvent,{autoPanOnConnect:r,connectionMode:a,connectionRadius:o,domNode:i,handleId:t.id,nodeId:t.nodeId,nodeLookup:h,isTarget:y,edgeUpdaterType:t.type,lib:s,flowId:g,cancelConnection:f,panBy:v,isValidConnection:(...e)=>p.getState().isValidConnection?.(...e)??!0,onConnect:e=>u?.(n,e),onConnectStart:(r,i)=>{m(!0),d?.(e,n,t.type),l?.(r,i)},onConnectEnd:(...e)=>p.getState().onConnectEnd?.(...e),onReconnectEnd:(e,r)=>{m(!1),c?.(e,n,t.type,r)},updateConnection:x,getTransform:()=>p.getState().transform,getFromHandle:()=>p.getState().connection.fromHandle,dragThreshold:p.getState().connectionDragThreshold,handleDomNode:e.currentTarget})},g=()=>f(!0),v=()=>f(!1);return(0,b.jsxs)(b.Fragment,{children:[(!0===e||"source"===e)&&(0,b.jsx)(TT,{position:s,centerX:r,centerY:i,radius:t,onMouseDown:e=>h(e,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),onMouseEnter:g,onMouseOut:v,type:"source"}),(!0===e||"target"===e)&&(0,b.jsx)(TT,{position:l,centerX:a,centerY:o,radius:t,onMouseDown:e=>h(e,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),onMouseEnter:g,onMouseOut:v,type:"target"})]})}var TD=(0,_.memo)(function({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:r,onClick:i,onDoubleClick:a,onContextMenu:o,onMouseEnter:s,onMouseMove:l,onMouseLeave:u,reconnectRadius:d,onReconnect:c,onReconnectStart:f,onReconnectEnd:p,rfId:h,edgeTypes:g,noPanClassName:x,onError:y,disableKeyboardA11y:$}){let w,k=E3(t=>t.edgeLookup.get(e)),S=E3(e=>e.defaultEdgeOptions),I=(k=S?{...S,...k}:k).type||"default",j=g?.[I]||Tz[I];void 0===j&&(y?.("011",(w=I,`Edge type "${w}" not found. Using fallback type "default".`)),I="default",j=g?.default||Tz.default);let N=!!(k.focusable||t&&void 0===k.focusable),z=void 0!==c&&(k.reconnectable||n&&void 0===k.reconnectable),E=!!(k.selectable||r&&void 0===k.selectable),O=(0,_.useRef)(null),[T,C]=(0,_.useState)(!1),[D,U]=(0,_.useState)(!1),P=E9(),{zIndex:Z,sourceX:A,sourceY:R,targetX:L,targetY:M,sourcePosition:F,targetPosition:B}=E3((0,_.useCallback)(t=>{let n=t.nodeLookup.get(k.source),r=t.nodeLookup.get(k.target);if(!n||!r)return{zIndex:k.zIndex,...TE};let i=function(e){let{sourceNode:t,targetNode:n}=e;if(!Em(t)||!Em(n))return null;let r=t.internals.handleBounds||Ef(t.handles),i=n.internals.handleBounds||Ef(n.handles),a=Eh(r?.source??[],e.sourceHandle),o=Eh(e.connectionMode===m.Strict?i?.target??[]:(i?.target??[]).concat(i?.source??[]),e.targetHandle);if(!a||!o)return e.onError?.("008",((e,{id:t,sourceHandle:n,targetHandle:r})=>`Couldn't create edge for ${e} handle id: "${"source"===e?n:r}", edge id: ${t}.`)(!a?"source":"target",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;let s=a?.position||v.Bottom,l=o?.position||v.Top,u=Ep(t,a,s),d=Ep(n,o,l);return{sourceX:u.x,sourceY:u.y,targetX:d.x,targetY:d.y,sourcePosition:s,targetPosition:l}}({id:e,sourceNode:n,targetNode:r,sourceHandle:k.sourceHandle||null,targetHandle:k.targetHandle||null,connectionMode:t.connectionMode,onError:y});return{zIndex:function({sourceNode:e,targetNode:t,selected:n=!1,zIndex:r=0,elevateOnSelect:i=!1,zIndexMode:a="basic"}){if("manual"===a)return r;let o=Math.max(e.parentId||i&&e.selected?e.internals.z:0,t.parentId||i&&t.selected?t.internals.z:0);return(i&&n?r+1e3:r)+o}({selected:k.selected,zIndex:k.zIndex,sourceNode:n,targetNode:r,elevateOnSelect:t.elevateEdgesOnSelect,zIndexMode:t.zIndexMode}),...i||TE}},[k.source,k.target,k.sourceHandle,k.targetHandle,k.selected,k.zIndex]),E4),W=(0,_.useMemo)(()=>k.markerStart?`url('#${Eg(k.markerStart,h)}')`:void 0,[k.markerStart,h]),H=(0,_.useMemo)(()=>k.markerEnd?`url('#${Eg(k.markerEnd,h)}')`:void 0,[k.markerEnd,h]);if(k.hidden||null===A||null===R||null===L||null===M)return null;let V=a?e=>{a(e,{...k})}:void 0,J=o?e=>{o(e,{...k})}:void 0,G=s?e=>{s(e,{...k})}:void 0,K=l?e=>{l(e,{...k})}:void 0,q=u?e=>{u(e,{...k})}:void 0;return(0,b.jsx)("svg",{style:{zIndex:Z},children:(0,b.jsxs)("g",{className:IG(["react-flow__edge",`react-flow__edge-${I}`,k.className,x,{selected:k.selected,animated:k.animated,inactive:!E&&!i,updating:T,selectable:E}]),onClick:t=>{let{addSelectedEdges:n,unselectNodesAndEdges:r,multiSelectionActive:a}=P.getState();E&&(P.setState({nodesSelectionActive:!1}),k.selected&&a?(r({nodes:[],edges:[k]}),O.current?.blur()):n([e])),i&&i(t,k)},onDoubleClick:V,onContextMenu:J,onMouseEnter:G,onMouseMove:K,onMouseLeave:q,onKeyDown:N?t=>{if(!$&&zy.includes(t.key)&&E){let{unselectNodesAndEdges:n,addSelectedEdges:r}=P.getState();"Escape"===t.key?(O.current?.blur(),n({edges:[k]})):r([e])}}:void 0,tabIndex:N?0:void 0,role:k.ariaRole??(N?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":null===k.ariaLabel?void 0:k.ariaLabel||`Edge from ${k.source} to ${k.target}`,"aria-describedby":N?`${Ot}-${h}`:void 0,ref:O,...k.domAttributes,children:[!D&&(0,b.jsx)(j,{id:e,source:k.source,target:k.target,type:k.type,selected:k.selected,animated:k.animated,selectable:E,deletable:k.deletable??!0,label:k.label,labelStyle:k.labelStyle,labelShowBg:k.labelShowBg,labelBgStyle:k.labelBgStyle,labelBgPadding:k.labelBgPadding,labelBgBorderRadius:k.labelBgBorderRadius,sourceX:A,sourceY:R,targetX:L,targetY:M,sourcePosition:F,targetPosition:B,data:k.data,style:k.style,sourceHandleId:k.sourceHandle,targetHandleId:k.targetHandle,markerStart:W,markerEnd:H,pathOptions:"pathOptions"in k?k.pathOptions:void 0,interactionWidth:k.interactionWidth}),z&&(0,b.jsx)(TC,{edge:k,isReconnectable:z,reconnectRadius:d,onReconnect:c,onReconnectStart:f,onReconnectEnd:p,sourceX:A,sourceY:R,targetX:L,targetY:M,sourcePosition:F,targetPosition:B,setUpdateHover:C,setReconnecting:U})]})})});let TU=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function TP({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:r,noPanClassName:i,onReconnect:a,onEdgeContextMenu:o,onEdgeMouseEnter:s,onEdgeMouseMove:l,onEdgeMouseLeave:u,onEdgeClick:d,reconnectRadius:c,onEdgeDoubleClick:m,onReconnectStart:f,onReconnectEnd:p,disableKeyboardA11y:h}){let{edgesFocusable:g,edgesReconnectable:v,elementsSelectable:x,onError:y}=E3(TU,E4),$=E3((0,_.useCallback)(e=>{if(!t)return e.edges.map(e=>e.id);let n=[];if(e.width&&e.height)for(let t of e.edges){let r=e.nodeLookup.get(t.source),i=e.nodeLookup.get(t.target);r&&i&&function({sourceNode:e,targetNode:t,width:n,height:r,transform:i}){let a=zZ(zM(e),zM(t));return a.x===a.x2&&(a.x2+=1),a.y===a.y2&&(a.y2+=1),zB({x:-i[0]/i[2],y:-i[1]/i[2],width:n/i[2],height:r/i[2]},zR(a))>0}({sourceNode:r,targetNode:i,width:e.width,height:e.height,transform:e.transform})&&n.push(t.id)}return n},[t]),E4);return(0,b.jsxs)("div",{className:"react-flow__edges",children:[(0,b.jsx)(Tl,{defaultColor:e,rfId:n}),$.map(e=>(0,b.jsx)(TD,{id:e,edgesFocusable:g,edgesReconnectable:v,elementsSelectable:x,noPanClassName:i,onReconnect:a,onContextMenu:o,onMouseEnter:s,onMouseMove:l,onMouseLeave:u,onClick:d,reconnectRadius:c,onDoubleClick:m,onReconnectStart:f,onReconnectEnd:p,rfId:n,onError:y,edgeTypes:r,disableKeyboardA11y:h},e))]})}TP.displayName="EdgeRenderer";let TZ=(0,_.memo)(TP),TA=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function TR({children:e}){let t=E3(TA);return(0,b.jsx)("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}let TL=e=>e.panZoom?.syncViewport;function TM(e){return e.connection.inProgress?{...e.connection,to:zG(e.connection.to,e.transform)}:{...e.connection}}let TF=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function TB({containerStyle:e,style:t,type:n,component:r}){let{nodesConnectable:i,width:a,height:o,isValid:s,inProgress:l}=E3(TF,E4);return a&&i&&l?(0,b.jsx)("svg",{style:e,width:a,height:o,className:"react-flow__connectionline react-flow__container",children:(0,b.jsx)("g",{className:IG(["react-flow__connection",zw(s)]),children:(0,b.jsx)(TW,{style:t,type:n,CustomComponent:r,isValid:s})})}):null}let TW=({style:e,type:t=h.Bezier,CustomComponent:n,isValid:r})=>{let{inProgress:i,from:a,fromNode:o,fromHandle:s,fromPosition:l,to:u,toNode:d,toHandle:c,toPosition:m,pointer:f}=E3(TM,E4);if(!i)return;if(n)return(0,b.jsx)(n,{connectionLineType:t,connectionLineStyle:e,fromNode:o,fromHandle:s,fromX:a.x,fromY:a.y,toX:u.x,toY:u.y,fromPosition:l,toPosition:m,connectionStatus:zw(r),toNode:d,toHandle:c,pointer:f});let p="",g={sourceX:a.x,sourceY:a.y,sourcePosition:l,targetX:u.x,targetY:u.y,targetPosition:m};switch(t){case h.Bezier:[p]=Ei(g);break;case h.SimpleBezier:[p]=Tf(g);break;case h.Step:[p]=Ec({...g,borderRadius:0});break;case h.SmoothStep:[p]=Ec(g);break;default:[p]=Es(g)}return(0,b.jsx)("path",{d:p,fill:"none",className:"react-flow__connection-path",style:e})};TW.displayName="ConnectionLine";let TH={};function TV(e=TH){(0,_.useRef)(e),E9(),(0,_.useEffect)(()=>{},[e])}function TJ({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:r,onEdgeClick:i,onNodeDoubleClick:a,onEdgeDoubleClick:o,onNodeMouseEnter:s,onNodeMouseMove:l,onNodeMouseLeave:u,onNodeContextMenu:d,onSelectionContextMenu:c,onSelectionStart:m,onSelectionEnd:f,connectionLineType:p,connectionLineStyle:h,connectionLineComponent:g,connectionLineContainerStyle:v,selectionKeyCode:x,selectionOnDrag:y,selectionMode:$,multiSelectionKeyCode:w,panActivationKeyCode:k,zoomActivationKeyCode:S,deleteKeyCode:I,onlyRenderVisibleElements:j,elementsSelectable:N,defaultViewport:z,translateExtent:E,minZoom:O,maxZoom:T,preventScrolling:C,defaultMarkerColor:D,zoomOnScroll:U,zoomOnPinch:P,panOnScroll:Z,panOnScrollSpeed:A,panOnScrollMode:R,zoomOnDoubleClick:L,panOnDrag:M,onPaneClick:F,onPaneMouseEnter:B,onPaneMouseMove:W,onPaneMouseLeave:H,onPaneScroll:V,onPaneContextMenu:J,paneClickDistance:G,nodeClickDistance:K,onEdgeContextMenu:q,onEdgeMouseEnter:Y,onEdgeMouseMove:X,onEdgeMouseLeave:Q,reconnectRadius:ee,onReconnect:et,onReconnectStart:en,onReconnectEnd:er,noDragClassName:ei,noWheelClassName:ea,noPanClassName:eo,disableKeyboardA11y:es,nodeExtent:el,rfId:eu,viewport:ed,onViewportChange:ec}){let em,ef,ep,eh;return TV(e),TV(t),E9(),(0,_.useRef)(!1),(0,_.useEffect)(()=>{},[]),em=OZ(),ef=(0,_.useRef)(!1),(0,_.useEffect)(()=>{!ef.current&&em.viewportInitialized&&n&&(setTimeout(()=>n(em),1),ef.current=!0)},[n,em.viewportInitialized]),ep=E3(TL),eh=E9(),(0,_.useEffect)(()=>{ed&&(ep?.(ed),eh.setState({transform:[ed.x,ed.y,ed.zoom]}))},[ed,ep]),(0,b.jsx)(O7,{onPaneClick:F,onPaneMouseEnter:B,onPaneMouseMove:W,onPaneMouseLeave:H,onPaneContextMenu:J,onPaneScroll:V,paneClickDistance:G,deleteKeyCode:I,selectionKeyCode:x,selectionOnDrag:y,selectionMode:$,onSelectionStart:m,onSelectionEnd:f,multiSelectionKeyCode:w,panActivationKeyCode:k,zoomActivationKeyCode:S,elementsSelectable:N,zoomOnScroll:U,zoomOnPinch:P,zoomOnDoubleClick:L,panOnScroll:Z,panOnScrollSpeed:A,panOnScrollMode:R,panOnDrag:M,defaultViewport:z,translateExtent:E,minZoom:O,maxZoom:T,onSelectionContextMenu:c,preventScrolling:C,noDragClassName:ei,noWheelClassName:ea,noPanClassName:eo,disableKeyboardA11y:es,onViewportChange:ec,isControlledViewport:!!ed,children:(0,b.jsxs)(TR,{children:[(0,b.jsx)(TZ,{edgeTypes:t,onEdgeClick:i,onEdgeDoubleClick:o,onReconnect:et,onReconnectStart:en,onReconnectEnd:er,onlyRenderVisibleElements:j,onEdgeContextMenu:q,onEdgeMouseEnter:Y,onEdgeMouseMove:X,onEdgeMouseLeave:Q,reconnectRadius:ee,defaultMarkerColor:D,noPanClassName:eo,disableKeyboardA11y:es,rfId:eu}),(0,b.jsx)(TB,{style:h,type:p,component:g,containerStyle:v}),(0,b.jsx)("div",{className:"react-flow__edgelabel-renderer"}),(0,b.jsx)(Ti,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:a,onNodeMouseEnter:s,onNodeMouseMove:l,onNodeMouseLeave:u,onNodeContextMenu:d,nodeClickDistance:K,onlyRenderVisibleElements:j,noPanClassName:eo,noDragClassName:ei,disableKeyboardA11y:es,nodeExtent:el,rfId:eu}),(0,b.jsx)("div",{className:"react-flow__viewport-portal"})]})})}TJ.displayName="GraphView";let TG=(0,_.memo)(TJ),TK=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:o,fitViewOptions:s,minZoom:l=.5,maxZoom:u=2,nodeOrigin:d,nodeExtent:c,zIndexMode:f="basic"}={})=>{let p=new Map,h=new Map,g=new Map,v=new Map,x=r??t??[],y=n??e??[],b=d??[0,0],_=c??zx;Ej(g,v,x);let $=E_(y,p,h,{nodeOrigin:b,nodeExtent:_,zIndexMode:f}),w=[0,0,1];if(o&&i&&a){let{x:e,y:t,zoom:n}=zY(zj(p,{filter:e=>!!((e.width||e.initialWidth)&&(e.height||e.initialHeight))}),i,a,l,u,s?.padding??.1);w=[e,t,n]}return{rfId:"1",width:i??0,height:a??0,transform:w,nodes:y,nodesInitialized:$,nodeLookup:p,parentLookup:h,edges:x,edgeLookup:v,connectionLookup:g,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:void 0!==n,hasDefaultEdges:void 0!==r,panZoom:null,minZoom:l,maxZoom:u,translateExtent:zx,nodeExtent:_,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:m.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:b,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:o??!1,fitViewOptions:s,fitViewResolver:null,connection:{...z_},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:zV,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:zb,zIndexMode:f,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}};function Tq({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:r,initialWidth:i,initialHeight:a,initialMinZoom:o,initialMaxZoom:s,initialFitViewOptions:l,fitView:u,nodeOrigin:d,nodeExtent:c,zIndexMode:m,children:f}){let[p]=(0,_.useState)(()=>(({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:o,fitViewOptions:s,minZoom:l,maxZoom:u,nodeOrigin:d,nodeExtent:c,zIndexMode:m})=>{let f,p;return f=(f,p)=>{async function h(){let{nodeLookup:e,panZoom:t,fitViewOptions:n,fitViewResolver:r,width:i,height:a,minZoom:o,maxZoom:s}=p();t&&(await zz({nodes:e,width:i,height:a,panZoom:t,minZoom:o,maxZoom:s},n),r?.resolve(!0),f({fitViewResolver:null}))}return{...TK({nodes:e,edges:t,width:i,height:a,fitView:o,fitViewOptions:s,minZoom:l,maxZoom:u,nodeOrigin:d,nodeExtent:c,defaultNodes:n,defaultEdges:r,zIndexMode:m}),setNodes:e=>{let{nodeLookup:t,parentLookup:n,nodeOrigin:r,elevateNodesOnSelect:i,fitViewQueued:a,zIndexMode:o}=p(),s=E_(e,t,n,{nodeOrigin:r,nodeExtent:c,elevateNodesOnSelect:i,checkEquality:!0,zIndexMode:o});a&&s?(h(),f({nodes:e,nodesInitialized:s,fitViewQueued:!1,fitViewOptions:void 0})):f({nodes:e,nodesInitialized:s})},setEdges:e=>{let{connectionLookup:t,edgeLookup:n}=p();Ej(t,n,e),f({edges:e})},setDefaultNodesAndEdges:(e,t)=>{if(e){let{setNodes:t}=p();t(e),f({hasDefaultNodes:!0})}if(t){let{setEdges:e}=p();e(t),f({hasDefaultEdges:!0})}},updateNodeInternals:e=>{let{triggerNodeChanges:t,nodeLookup:n,parentLookup:r,domNode:i,nodeOrigin:a,nodeExtent:o,debug:s,fitViewQueued:l,zIndexMode:u}=p(),{changes:d,updatedInternals:c}=function(e,t,n,r,i,a,o){let s=r?.querySelector(".xyflow__viewport"),l=!1;if(!s)return{changes:[],updatedInternals:l};let u=[],d=window.getComputedStyle(s),{m22:c}=new window.DOMMatrixReadOnly(d.transform),m=[];for(let r of e.values()){let e=t.get(r.id);if(!e)continue;if(e.hidden){t.set(e.id,{...e,internals:{...e.internals,handleBounds:void 0}}),l=!0;continue}let s=z5(r.nodeElement),d=e.measured.width!==s.width||e.measured.height!==s.height;if(s.width&&s.height&&(d||!e.internals.handleBounds||r.force)){let f=r.nodeElement.getBoundingClientRect(),p=zQ(e.extent)?e.extent:a,{positionAbsolute:h}=e.internals;e.parentId&&"parent"===e.extent?h=zD(h,s,t.get(e.parentId)):p&&(h=zC(h,p,s));let g={...e,measured:s,internals:{...e.internals,positionAbsolute:h,handleBounds:{source:Ee("source",r.nodeElement,f,c,e.id),target:Ee("target",r.nodeElement,f,c,e.id)}}};t.set(e.id,g),e.parentId&&E$(g,t,n,{nodeOrigin:i,zIndexMode:o}),l=!0,d&&(u.push({id:e.id,type:"dimensions",dimensions:s}),e.expandParent&&e.parentId&&m.push({id:e.id,parentId:e.parentId,rect:zL(g,i)}))}}if(m.length>0){let e=Ek(m,t,n,i);u.push(...e)}return{changes:u,updatedInternals:l}}(e,n,r,i,a,o,u);c&&(!function(e,t,n){let r=Ey(Ev,n);for(let n of e.values())if(n.parentId)E$(n,e,t,r);else{let e=zC(zI(n,r.nodeOrigin),zQ(n.extent)?n.extent:r.nodeExtent,z0(n));n.internals.positionAbsolute=e}}(n,r,{nodeOrigin:a,nodeExtent:o,zIndexMode:u}),l?(h(),f({fitViewQueued:!1,fitViewOptions:void 0})):f({}),d?.length>0&&(s&&console.log("React Flow: trigger node changes",d),t?.(d)))},updateNodePositions:(e,t=!1)=>{let n=[],r=[],{nodeLookup:i,triggerNodeChanges:a,connection:o,updateConnection:s,onNodesChangeMiddlewareMap:l}=p();for(let[a,l]of e){let e=i.get(a),u=!!(e?.expandParent&&e?.parentId&&l?.position),d={id:a,type:"position",position:u?{x:Math.max(0,l.position.x),y:Math.max(0,l.position.y)}:l.position,dragging:t};if(e&&o.inProgress&&o.fromNode.id===e.id){let t=Ep(e,o.fromHandle,v.Left,!0);s({...o,from:t})}u&&e.parentId&&n.push({id:a,parentId:e.parentId,rect:{...l.internals.positionAbsolute,width:l.measured.width??0,height:l.measured.height??0}}),r.push(d)}if(n.length>0){let{parentLookup:e,nodeOrigin:t}=p(),a=Ek(n,i,e,t);r.push(...a)}for(let e of l.values())r=e(r);a(r)},triggerNodeChanges:e=>{let{onNodesChange:t,setNodes:n,nodes:r,hasDefaultNodes:i,debug:a}=p();e?.length&&(i&&n(OS(e,r)),a&&console.log("React Flow: trigger node changes",e),t?.(e))},triggerEdgeChanges:e=>{let{onEdgesChange:t,setEdges:n,edges:r,hasDefaultEdges:i,debug:a}=p();e?.length&&(i&&n(OS(e,r)),a&&console.log("React Flow: trigger edge changes",e),t?.(e))},addSelectedNodes:e=>{let{multiSelectionActive:t,edgeLookup:n,nodeLookup:r,triggerNodeChanges:i,triggerEdgeChanges:a}=p();t?i(e.map(e=>OI(e,!0))):(i(Oj(r,new Set([...e]),!0)),a(Oj(n)))},addSelectedEdges:e=>{let{multiSelectionActive:t,edgeLookup:n,nodeLookup:r,triggerNodeChanges:i,triggerEdgeChanges:a}=p();t?a(e.map(e=>OI(e,!0))):(a(Oj(n,new Set([...e]))),i(Oj(r,new Set,!0)))},unselectNodesAndEdges:({nodes:e,edges:t}={})=>{let{edges:n,nodes:r,nodeLookup:i,triggerNodeChanges:a,triggerEdgeChanges:o}=p(),s=[];for(let t of e||r){if(!t.selected)continue;let e=i.get(t.id);e&&(e.selected=!1),s.push(OI(t.id,!1))}let l=[];for(let e of t||n)e.selected&&l.push(OI(e.id,!1));a(s),o(l)},setMinZoom:e=>{let{panZoom:t,maxZoom:n}=p();t?.setScaleExtent([e,n]),f({minZoom:e})},setMaxZoom:e=>{let{panZoom:t,minZoom:n}=p();t?.setScaleExtent([n,e]),f({maxZoom:e})},setTranslateExtent:e=>{p().panZoom?.setTranslateExtent(e),f({translateExtent:e})},resetSelectedElements:()=>{let{edges:e,nodes:t,triggerNodeChanges:n,triggerEdgeChanges:r,elementsSelectable:i}=p();if(!i)return;let a=t.reduce((e,t)=>t.selected?[...e,OI(t.id,!1)]:e,[]),o=e.reduce((e,t)=>t.selected?[...e,OI(t.id,!1)]:e,[]);n(a),r(o)},setNodeExtent:e=>{let{nodes:t,nodeLookup:n,parentLookup:r,nodeOrigin:i,elevateNodesOnSelect:a,nodeExtent:o,zIndexMode:s}=p();(e[0][0]!==o[0][0]||e[0][1]!==o[0][1]||e[1][0]!==o[1][0]||e[1][1]!==o[1][1])&&(E_(t,n,r,{nodeOrigin:i,nodeExtent:e,elevateNodesOnSelect:a,checkEquality:!1,zIndexMode:s}),f({nodeExtent:e}))},panBy:e=>{let{transform:t,width:n,height:r,panZoom:i,translateExtent:a}=p();return ES({delta:e,panZoom:i,transform:t,translateExtent:a,width:n,height:r})},setCenter:async(e,t,n)=>{let{width:r,height:i,maxZoom:a,panZoom:o}=p();if(!o)return Promise.resolve(!1);let s=void 0!==n?.zoom?n.zoom:a;return await o.setViewport({x:r/2-e*s,y:i/2-t*s,zoom:s},{duration:n?.duration,ease:n?.ease,interpolate:n?.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{f({connection:{...z_}})},updateConnection:e=>{f({connection:e})},reset:()=>f({...TK()})}},p=Object.is,f?E1(f,p):E1})({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:u,minZoom:o,maxZoom:s,fitViewOptions:l,nodeOrigin:d,nodeExtent:c,zIndexMode:m}));return(0,b.jsx)(E2,{value:p,children:(0,b.jsx)(OU,{children:f})})}function TY({children:e,nodes:t,edges:n,defaultNodes:r,defaultEdges:i,width:a,height:o,fitView:s,fitViewOptions:l,minZoom:u,maxZoom:d,nodeOrigin:c,nodeExtent:m,zIndexMode:f}){return(0,_.useContext)(E6)?(0,b.jsx)(b.Fragment,{children:e}):(0,b.jsx)(Tq,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:i,initialWidth:a,initialHeight:o,fitView:s,initialFitViewOptions:l,initialMinZoom:u,initialMaxZoom:d,nodeOrigin:c,nodeExtent:m,zIndexMode:f,children:e})}let TX={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};var TQ=OO(function({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:i,nodeTypes:a,edgeTypes:o,onNodeClick:s,onEdgeClick:l,onInit:u,onMove:d,onMoveStart:c,onMoveEnd:m,onConnect:g,onConnectStart:v,onConnectEnd:x,onClickConnectStart:y,onClickConnectEnd:$,onNodeMouseEnter:w,onNodeMouseMove:k,onNodeMouseLeave:S,onNodeContextMenu:I,onNodeDoubleClick:j,onNodeDragStart:N,onNodeDrag:z,onNodeDragStop:E,onNodesDelete:O,onEdgesDelete:T,onDelete:C,onSelectionChange:D,onSelectionDragStart:U,onSelectionDrag:P,onSelectionDragStop:Z,onSelectionContextMenu:A,onSelectionStart:R,onSelectionEnd:L,onBeforeDelete:M,connectionMode:F,connectionLineType:B=h.Bezier,connectionLineStyle:W,connectionLineComponent:H,connectionLineContainerStyle:V,deleteKeyCode:J="Backspace",selectionKeyCode:G="Shift",selectionOnDrag:K=!1,selectionMode:q=p.Full,panActivationKeyCode:Y="Space",multiSelectionKeyCode:X=zX()?"Meta":"Control",zoomActivationKeyCode:Q=zX()?"Meta":"Control",snapToGrid:ee,snapGrid:et,onlyRenderVisibleElements:en=!1,selectNodesOnDrag:er,nodesDraggable:ei,autoPanOnNodeFocus:ea,nodesConnectable:eo,nodesFocusable:es,nodeOrigin:el=Op,edgesFocusable:eu,edgesReconnectable:ed,elementsSelectable:ec=!0,defaultViewport:em=Oh,minZoom:ef=.5,maxZoom:ep=2,translateExtent:eh=zx,preventScrolling:eg=!0,nodeExtent:ev,defaultMarkerColor:ex="#b1b1b7",zoomOnScroll:ey=!0,zoomOnPinch:eb=!0,panOnScroll:e_=!1,panOnScrollSpeed:e$=.5,panOnScrollMode:ew=f.Free,zoomOnDoubleClick:ek=!0,panOnDrag:eS=!0,onPaneClick:eI,onPaneMouseEnter:ej,onPaneMouseMove:eN,onPaneMouseLeave:ez,onPaneScroll:eE,onPaneContextMenu:eO,paneClickDistance:eT=1,nodeClickDistance:eC=0,children:eD,onReconnect:eU,onReconnectStart:eP,onReconnectEnd:eZ,onEdgeContextMenu:eA,onEdgeDoubleClick:eR,onEdgeMouseEnter:eL,onEdgeMouseMove:eM,onEdgeMouseLeave:eF,reconnectRadius:eB=10,onNodesChange:eW,onEdgesChange:eH,noDragClassName:eV="nodrag",noWheelClassName:eJ="nowheel",noPanClassName:eG="nopan",fitView:eK,fitViewOptions:eq,connectOnClick:eY,attributionPosition:eX,proOptions:eQ,defaultEdgeOptions:e0,elevateNodesOnSelect:e1=!0,elevateEdgesOnSelect:e4=!1,disableKeyboardA11y:e6=!1,autoPanOnConnect:e2,autoPanOnNodeDrag:e5,autoPanSpeed:e3,connectionRadius:e9,isValidConnection:e8,onError:e7,style:te,id:tt,nodeDragThreshold:tn,connectionDragThreshold:tr,viewport:ti,onViewportChange:ta,width:to,height:ts,colorMode:tl="light",debug:tu,onScroll:td,ariaLabelConfig:tc,zIndexMode:tm="basic",...tf},tp){let th=tt||"1",tg=function(e){let[t,n]=(0,_.useState)("system"===e?null:e);return(0,_.useEffect)(()=>{if("system"!==e)return void n(e);let t=Ob(),r=()=>n(t?.matches?"dark":"light");return r(),t?.addEventListener("change",r),()=>{t?.removeEventListener("change",r)}},[e]),null!==t?t:Ob()?.matches?"dark":"light"}(tl),tv=(0,_.useCallback)(e=>{e.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),td?.(e)},[td]);return(0,b.jsx)("div",{"data-testid":"rf__wrapper",...tf,onScroll:tv,style:{...te,...TX},ref:tp,className:IG(["react-flow",i,tg]),id:tt,role:"application",children:(0,b.jsxs)(TY,{nodes:e,edges:t,width:to,height:ts,fitView:eK,fitViewOptions:eq,minZoom:ef,maxZoom:ep,nodeOrigin:el,nodeExtent:ev,zIndexMode:tm,children:[(0,b.jsx)(TG,{onInit:u,onNodeClick:s,onEdgeClick:l,onNodeMouseEnter:w,onNodeMouseMove:k,onNodeMouseLeave:S,onNodeContextMenu:I,onNodeDoubleClick:j,nodeTypes:a,edgeTypes:o,connectionLineType:B,connectionLineStyle:W,connectionLineComponent:H,connectionLineContainerStyle:V,selectionKeyCode:G,selectionOnDrag:K,selectionMode:q,deleteKeyCode:J,multiSelectionKeyCode:X,panActivationKeyCode:Y,zoomActivationKeyCode:Q,onlyRenderVisibleElements:en,defaultViewport:em,translateExtent:eh,minZoom:ef,maxZoom:ep,preventScrolling:eg,zoomOnScroll:ey,zoomOnPinch:eb,zoomOnDoubleClick:ek,panOnScroll:e_,panOnScrollSpeed:e$,panOnScrollMode:ew,panOnDrag:eS,onPaneClick:eI,onPaneMouseEnter:ej,onPaneMouseMove:eN,onPaneMouseLeave:ez,onPaneScroll:eE,onPaneContextMenu:eO,paneClickDistance:eT,nodeClickDistance:eC,onSelectionContextMenu:A,onSelectionStart:R,onSelectionEnd:L,onReconnect:eU,onReconnectStart:eP,onReconnectEnd:eZ,onEdgeContextMenu:eA,onEdgeDoubleClick:eR,onEdgeMouseEnter:eL,onEdgeMouseMove:eM,onEdgeMouseLeave:eF,reconnectRadius:eB,defaultMarkerColor:ex,noDragClassName:eV,noWheelClassName:eJ,noPanClassName:eG,rfId:th,disableKeyboardA11y:e6,nodeExtent:ev,viewport:ti,onViewportChange:ta}),(0,b.jsx)(Oy,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:g,onConnectStart:v,onConnectEnd:x,onClickConnectStart:y,onClickConnectEnd:$,nodesDraggable:ei,autoPanOnNodeFocus:ea,nodesConnectable:eo,nodesFocusable:es,edgesFocusable:eu,edgesReconnectable:ed,elementsSelectable:ec,elevateNodesOnSelect:e1,elevateEdgesOnSelect:e4,minZoom:ef,maxZoom:ep,nodeExtent:ev,onNodesChange:eW,onEdgesChange:eH,snapToGrid:ee,snapGrid:et,connectionMode:F,translateExtent:eh,connectOnClick:eY,defaultEdgeOptions:e0,fitView:eK,fitViewOptions:eq,onNodesDelete:O,onEdgesDelete:T,onDelete:C,onNodeDragStart:N,onNodeDrag:z,onNodeDragStop:E,onSelectionDrag:P,onSelectionDragStart:U,onSelectionDragStop:Z,onMove:d,onMoveStart:c,onMoveEnd:m,noPanClassName:eG,nodeOrigin:el,rfId:th,autoPanOnConnect:e2,autoPanOnNodeDrag:e5,autoPanSpeed:e3,onError:e7,connectionRadius:e9,isValidConnection:e8,selectNodesOnDrag:er,nodeDragThreshold:tn,connectionDragThreshold:tr,onBeforeDelete:M,debug:tu,ariaLabelConfig:tc,zIndexMode:tm}),(0,b.jsx)(Of,{onSelectionChange:D}),eD,(0,b.jsx)(Os,{proOptions:eQ,position:eX}),(0,b.jsx)(Oa,{rfId:th,disableKeyboardA11y:e6})]})})});function T0({dimensions:e,lineWidth:t,variant:n,className:r}){return(0,b.jsx)("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:IG(["react-flow__background-pattern",n,r])})}function T1({radius:e,className:t}){return(0,b.jsx)("circle",{cx:e,cy:e,r:e,className:IG(["react-flow__background-pattern","dots",t])})}(d=y||(y={})).Lines="lines",d.Dots="dots",d.Cross="cross";let T4={[y.Dots]:1,[y.Lines]:1,[y.Cross]:6},T6=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function T2({id:e,variant:t=y.Dots,gap:n=20,size:r,lineWidth:i=1,offset:a=0,color:o,bgColor:s,style:l,className:u,patternClassName:d}){let c=(0,_.useRef)(null),{transform:m,patternId:f}=E3(T6,E4),p=r||T4[t],h=t===y.Dots,g=t===y.Cross,v=Array.isArray(n)?n:[n,n],x=[v[0]*m[2]||1,v[1]*m[2]||1],$=p*m[2],w=Array.isArray(a)?a:[a,a],k=g?[$,$]:x,S=[w[0]*m[2]||1+k[0]/2,w[1]*m[2]||1+k[1]/2],I=`${f}${e||""}`;return(0,b.jsxs)("svg",{className:IG(["react-flow__background",u]),style:{...l,...OL,"--xy-background-color-props":s,"--xy-background-pattern-color-props":o},ref:c,"data-testid":"rf__background",children:[(0,b.jsx)("pattern",{id:I,x:m[0]%x[0],y:m[1]%x[1],width:x[0],height:x[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${S[0]},-${S[1]})`,children:h?(0,b.jsx)(T1,{radius:$/2,className:d}):(0,b.jsx)(T0,{dimensions:k,lineWidth:i,variant:t,className:d})}),(0,b.jsx)("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${I})`})]})}T2.displayName="Background";let T5=(0,_.memo)(T2);function T3(){return(0,b.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:(0,b.jsx)("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function T9(){return(0,b.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:(0,b.jsx)("path",{d:"M0 0h32v4.2H0z"})})}function T8(){return(0,b.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:(0,b.jsx)("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function T7(){return(0,b.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:(0,b.jsx)("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function Ce(){return(0,b.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:(0,b.jsx)("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function Ct({children:e,className:t,...n}){return(0,b.jsx)("button",{type:"button",className:IG(["react-flow__controls-button",t]),...n,children:e})}let Cn=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function Cr({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:i,onZoomIn:a,onZoomOut:o,onFitView:s,onInteractiveChange:l,className:u,children:d,position:c="bottom-left",orientation:m="vertical","aria-label":f}){let p=E9(),{isInteractive:h,minZoomReached:g,maxZoomReached:v,ariaLabelConfig:x}=E3(Cn,E4),{zoomIn:y,zoomOut:_,fitView:$}=OZ();return(0,b.jsxs)(Oo,{className:IG(["react-flow__controls","horizontal"===m?"horizontal":"vertical",u]),position:c,style:e,"data-testid":"rf__controls","aria-label":f??x["controls.ariaLabel"],children:[t&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(Ct,{onClick:()=>{y(),a?.()},className:"react-flow__controls-zoomin",title:x["controls.zoomIn.ariaLabel"],"aria-label":x["controls.zoomIn.ariaLabel"],disabled:v,children:(0,b.jsx)(T3,{})}),(0,b.jsx)(Ct,{onClick:()=>{_(),o?.()},className:"react-flow__controls-zoomout",title:x["controls.zoomOut.ariaLabel"],"aria-label":x["controls.zoomOut.ariaLabel"],disabled:g,children:(0,b.jsx)(T9,{})})]}),n&&(0,b.jsx)(Ct,{className:"react-flow__controls-fitview",onClick:()=>{$(i),s?.()},title:x["controls.fitView.ariaLabel"],"aria-label":x["controls.fitView.ariaLabel"],children:(0,b.jsx)(T8,{})}),r&&(0,b.jsx)(Ct,{className:"react-flow__controls-interactive",onClick:()=>{p.setState({nodesDraggable:!h,nodesConnectable:!h,elementsSelectable:!h}),l?.(!h)},title:x["controls.interactive.ariaLabel"],"aria-label":x["controls.interactive.ariaLabel"],children:h?(0,b.jsx)(Ce,{}):(0,b.jsx)(T7,{})}),d]})}Cr.displayName="Controls";let Ci=(0,_.memo)(Cr),Ca=(0,_.memo)(function({id:e,x:t,y:n,width:r,height:i,style:a,color:o,strokeColor:s,strokeWidth:l,className:u,borderRadius:d,shapeRendering:c,selected:m,onClick:f}){let{background:p,backgroundColor:h}=a||{};return(0,b.jsx)("rect",{className:IG(["react-flow__minimap-node",{selected:m},u]),x:t,y:n,rx:d,ry:d,width:r,height:i,style:{fill:o||p||h,stroke:s,strokeWidth:l},shapeRendering:c,onClick:f?t=>f(t,e):void 0})}),Co=e=>e.nodes.map(e=>e.id),Cs=e=>e instanceof Function?e:()=>e,Cl=(0,_.memo)(function({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:r,nodeBorderRadius:i,nodeStrokeWidth:a,shapeRendering:o,NodeComponent:s,onClick:l}){let{node:u,x:d,y:c,width:m,height:f}=E3(t=>{let n=t.nodeLookup.get(e);if(!n)return{node:void 0,x:0,y:0,width:0,height:0};let r=n.internals.userNode,{x:i,y:a}=n.internals.positionAbsolute,{width:o,height:s}=z0(r);return{node:r,x:i,y:a,width:o,height:s}},E4);return u&&!u.hidden&&z1(u)?(0,b.jsx)(s,{x:d,y:c,width:m,height:f,style:u.style,selected:!!u.selected,className:r(u),color:t(u),borderRadius:i,strokeColor:n(u),strokeWidth:a,shapeRendering:o,onClick:l,id:u.id}):null});var Cu=(0,_.memo)(function({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:i,nodeComponent:a=Ca,onClick:o}){let s=E3(Co,E4),l=Cs(t),u=Cs(e),d=Cs(n),c="u"<typeof window||window.chrome?"crispEdges":"geometricPrecision";return(0,b.jsx)(b.Fragment,{children:s.map(e=>(0,b.jsx)(Cl,{id:e,nodeColorFunc:l,nodeStrokeColorFunc:u,nodeClassNameFunc:d,nodeBorderRadius:r,nodeStrokeWidth:i,NodeComponent:a,onClick:o,shapeRendering:c},e))})});let Cd=e=>!e.hidden,Cc=e=>{let t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?zF(zj(e.nodeLookup,{filter:Cd}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}};function Cm({style:e,className:t,nodeStrokeColor:n,nodeColor:r,nodeClassName:i="",nodeBorderRadius:a=5,nodeStrokeWidth:o,nodeComponent:s,bgColor:l,maskColor:u,maskStrokeColor:d,maskStrokeWidth:c,position:m="bottom-right",onClick:f,onNodeClick:p,pannable:h=!1,zoomable:g=!1,ariaLabel:v,inversePan:x,zoomStep:y=1,offsetScale:$=5}){let w=E9(),k=(0,_.useRef)(null),{boundingRect:S,viewBB:I,rfId:j,panZoom:N,translateExtent:z,flowWidth:E,flowHeight:O,ariaLabelConfig:T}=E3(Cc,E4),C=e?.width??200,D=e?.height??150,U=Math.max(S.width/C,S.height/D),P=U*C,Z=U*D,A=$*U,R=S.x-(P-S.width)/2-A,L=S.y-(Z-S.height)/2-A,M=P+2*A,F=Z+2*A,B=`react-flow__minimap-desc-${j}`,W=(0,_.useRef)(0),H=(0,_.useRef)();W.current=U,(0,_.useEffect)(()=>{if(k.current&&N)return H.current=function({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){let i=jE(e);return{update:function({translateExtent:e,width:a,height:o,zoomStep:s=1,pannable:l=!0,zoomable:u=!0,inversePan:d=!1}){let c=[0,0],m=zg().on("start",e=>{("mousedown"===e.sourceEvent.type||"touchstart"===e.sourceEvent.type)&&(c=[e.sourceEvent.clientX??e.sourceEvent.touches[0].clientX,e.sourceEvent.clientY??e.sourceEvent.touches[0].clientY])}).on("zoom",l?i=>{let s=n();if("mousemove"!==i.sourceEvent.type&&"touchmove"!==i.sourceEvent.type||!t)return;let l=[i.sourceEvent.clientX??i.sourceEvent.touches[0].clientX,i.sourceEvent.clientY??i.sourceEvent.touches[0].clientY],u=[l[0]-c[0],l[1]-c[1]];c=l;let m=r()*Math.max(s[2],Math.log(s[2]))*(d?-1:1),f={x:s[0]-u[0]*m,y:s[1]-u[1]*m};t.setViewportConstrained({x:f.x,y:f.y,zoom:s[2]},[[0,0],[a,o]],e)}:null).on("zoom.wheel",u?e=>{if("wheel"!==e.sourceEvent.type||!t)return;let r=n(),i=e.sourceEvent.ctrlKey&&zX()?10:1,a=-e.sourceEvent.deltaY*(1===e.sourceEvent.deltaMode?.05:e.sourceEvent.deltaMode?1:.002)*s,o=r[2]*Math.pow(2,a*i);t.scaleTo(o)}:null);i.call(m,{})},destroy:function(){i.on("zoom",null)},pointer:jO}}({domNode:k.current,panZoom:N,getTransform:()=>w.getState().transform,getViewScale:()=>W.current}),()=>{H.current?.destroy()}},[N]),(0,_.useEffect)(()=>{H.current?.update({translateExtent:z,width:E,height:O,inversePan:x,pannable:h,zoomStep:y,zoomable:g})},[h,g,x,y,z,E,O]);let V=f?e=>{let[t,n]=H.current?.pointer(e)||[0,0];f(e,{x:t,y:n})}:void 0,J=p?(0,_.useCallback)((e,t)=>{p(e,w.getState().nodeLookup.get(t).internals.userNode)},[]):void 0,G=v??T["minimap.ariaLabel"];return(0,b.jsx)(Oo,{position:m,style:{...e,"--xy-minimap-background-color-props":"string"==typeof l?l:void 0,"--xy-minimap-mask-background-color-props":"string"==typeof u?u:void 0,"--xy-minimap-mask-stroke-color-props":"string"==typeof d?d:void 0,"--xy-minimap-mask-stroke-width-props":"number"==typeof c?c*U:void 0,"--xy-minimap-node-background-color-props":"string"==typeof r?r:void 0,"--xy-minimap-node-stroke-color-props":"string"==typeof n?n:void 0,"--xy-minimap-node-stroke-width-props":"number"==typeof o?o:void 0},className:IG(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:(0,b.jsxs)("svg",{width:C,height:D,viewBox:`${R} ${L} ${M} ${F}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":B,ref:k,onClick:V,children:[G&&(0,b.jsx)("title",{id:B,children:G}),(0,b.jsx)(Cu,{onClick:J,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:a,nodeClassName:i,nodeStrokeWidth:o,nodeComponent:s}),(0,b.jsx)("path",{className:"react-flow__minimap-mask",d:`M${R-A},${L-A}h${M+2*A}v${F+2*A}h${-M-2*A}z
79
79
  M${I.x},${I.y}h${I.width}v${I.height}h${-I.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}Cm.displayName="MiniMap";let Cf=(0,_.memo)(Cm),Cp={[x.Line]:"right",[x.Handle]:"bottom-right"};(0,_.memo)(function({nodeId:e,position:t,variant:n=x.Handle,className:r,style:i,children:a,color:o,minWidth:s=10,minHeight:l=10,maxWidth:u=Number.MAX_VALUE,maxHeight:d=Number.MAX_VALUE,keepAspectRatio:c=!1,resizeDirection:m,autoScale:f=!0,shouldResize:p,onResizeStart:h,onResize:g,onResizeEnd:v}){let y,$=OQ(),w="string"==typeof e?e:$,k=E9(),S=(0,_.useRef)(null),I=n===x.Handle,j=E3((0,_.useCallback)((y=I&&f,e=>y?`${Math.max(1/e.transform[2],1)}`:void 0),[I,f]),E4),N=(0,_.useRef)(null),z=t??Cp[n];(0,_.useEffect)(()=>{if(S.current&&w)return N.current||(N.current=function({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:i}){let a=jE(e),o={controlDirection:EF("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};return{update:function({controlPosition:e,boundaries:s,keepAspectRatio:l,resizeDirection:u,onResizeStart:d,onResize:c,onResizeEnd:m,shouldResize:f}){let p,h,g,v,x={...EV},y={...EJ};o={boundaries:s,resizeDirection:u,keepAspectRatio:l,controlDirection:EF(e)};let b=null,_=[],$=!1,w=jW().on("start",e=>{let{nodeLookup:r,transform:i,snapGrid:a,snapToGrid:o,nodeOrigin:s,paneDomNode:l}=n();if(!(p=r.get(t)))return;b=l?.getBoundingClientRect()??null;let{xSnapped:u,ySnapped:c}=z2(e.sourceEvent,{transform:i,snapGrid:a,snapToGrid:o,containerBounds:b});if(y={...x={width:p.measured.width??0,height:p.measured.height??0,x:p.position.x??0,y:p.position.y??0},pointerX:u,pointerY:c,aspectRatio:x.width/x.height},h=void 0,p.parentId&&("parent"===p.extent||p.expandParent)){var m;g=(h=r.get(p.parentId))&&"parent"===p.extent?[[0,0],[(m=h).measured.width,m.measured.height]]:void 0}for(let[e,n]of(_=[],v=void 0,r))if(n.parentId===t&&(_.push({id:e,position:{...n.position},extent:n.extent}),"parent"===n.extent||n.expandParent)){let e=function(e,t,n){let r=t.position.x+e.position.x,i=t.position.y+e.position.y,a=e.measured.width??0,o=e.measured.height??0,s=n[0]*a,l=n[1]*o;return[[r-s,i-l],[r+a-s,i+o-l]]}(n,p,n.origin??s);v=v?[[Math.min(e[0][0],v[0][0]),Math.min(e[0][1],v[0][1])],[Math.max(e[1][0],v[1][0]),Math.max(e[1][1],v[1][1])]]:e}d?.(e,{...x})}).on("drag",e=>{let{transform:t,snapGrid:i,snapToGrid:a,nodeOrigin:s}=n(),l=z2(e.sourceEvent,{transform:t,snapGrid:i,snapToGrid:a,containerBounds:b}),u=[];if(!p)return;let{x:d,y:m,width:w,height:k}=x,S={},I=p.origin??s,{width:j,height:N,x:z,y:E}=function(e,t,n,r,i,a,o,s){var l,u,d,c;let{affectsX:m,affectsY:f}=t,{isHorizontal:p,isVertical:h}=t,g=p&&h,{xSnapped:v,ySnapped:x}=n,{minWidth:y,maxWidth:b,minHeight:_,maxHeight:$}=r,{x:w,y:k,width:S,height:I,aspectRatio:j}=e,N=Math.floor(p?v-e.pointerX:0),z=Math.floor(h?x-e.pointerY:0),E=S+(m?-N:N),O=I+(f?-z:z),T=-a[0]*S,C=-a[1]*I,D=EH(E,y,b),U=EH(O,_,$);if(o){let e=0,t=0;m&&N<0?e=EB(w+N+T,o[0][0]):!m&&N>0&&(e=EW(w+E+T,o[1][0])),f&&z<0?t=EB(k+z+C,o[0][1]):!f&&z>0&&(t=EW(k+O+C,o[1][1])),D=Math.max(D,e),U=Math.max(U,t)}if(s){let e=0,t=0;m&&N>0?e=EW(w+N,s[0][0]):!m&&N<0&&(e=EB(w+E,s[1][0])),f&&z>0?t=EW(k+z,s[0][1]):!f&&z<0&&(t=EB(k+O,s[1][1])),D=Math.max(D,e),U=Math.max(U,t)}if(i){if(p){(D=Math.max(D,EH(E/j,_,$)*j),o)&&(D=Math.max(D,(m||f)&&(!m||f||!g)?EB(k+C+(m?N:-N)/j,o[0][1])*j:EW(k+C+E/j,o[1][1])*j));s&&(D=Math.max(D,(m||f)&&(!m||f||!g)?EW(k+(m?N:-N)/j,s[0][1])*j:EB(k+E/j,s[1][1])*j))}if(h){(U=Math.max(U,EH(O*j,y,b)/j),o)&&(U=Math.max(U,(m||f)&&(!f||m||!g)?EB(w+(f?z:-z)*j+T,o[0][0])/j:EW(w+O*j+T,o[1][0])/j));s&&(U=Math.max(U,(m||f)&&(!f||m||!g)?EW(w+(f?z:-z)*j,s[0][0])/j:EB(w+O*j,s[1][0])/j))}}z+=z<0?U:-U,N+=N<0?D:-D,i&&(g?E>O*j?z=((l=m,u=f,l?!u:u)?-N:N)/j:N=((d=m,c=f,d?!c:c)?-z:z)*j:p?(z=N/j,f=m):(N=z*j,m=f));let P=m?w+N:w,Z=f?k+z:k;return{width:S+(m?-N:N),height:I+(f?-z:z),x:a[0]*N*(m?-1:1)+P,y:a[1]*z*(f?-1:1)+Z}}(y,o.controlDirection,l,o.boundaries,o.keepAspectRatio,I,g,v),O=j!==w,T=N!==k,C=z!==d&&O,D=E!==m&&T;if(!C&&!D&&!O&&!T)return;if((C||D||1===I[0]||1===I[1])&&(S.x=C?z:x.x,S.y=D?E:x.y,x.x=S.x,x.y=S.y,_.length>0)){let e=z-d,t=E-m;for(let n of _)n.position={x:n.position.x-e+I[0]*(j-w),y:n.position.y-t+I[1]*(N-k)},u.push(n)}if((O||T)&&(S.width=O&&(!o.resizeDirection||"horizontal"===o.resizeDirection)?j:x.width,S.height=T&&(!o.resizeDirection||"vertical"===o.resizeDirection)?N:x.height,x.width=S.width,x.height=S.height),h&&p.expandParent){let e=I[0]*(S.width??0);S.x&&S.x<e&&(x.x=e,y.x=y.x-(S.x-e));let t=I[1]*(S.height??0);S.y&&S.y<t&&(x.y=t,y.y=y.y-(S.y-t))}let U=function({width:e,prevWidth:t,height:n,prevHeight:r,affectsX:i,affectsY:a}){let o=e-t,s=n-r,l=[o>0?1:o<0?-1:0,s>0?1:s<0?-1:0];return o&&i&&(l[0]=-1*l[0]),s&&a&&(l[1]=-1*l[1]),l}({width:x.width,prevWidth:w,height:x.height,prevHeight:k,affectsX:o.controlDirection.affectsX,affectsY:o.controlDirection.affectsY}),P={...x,direction:U};!1!==f?.(e,P)&&($=!0,c?.(e,P),r(S,u))}).on("end",e=>{$&&(m?.(e,{...x}),i?.({...x}),$=!1)});a.call(w)},destroy:function(){a.on(".drag",null)}}}({domNode:S.current,nodeId:w,getStoreItems:()=>{let{nodeLookup:e,transform:t,snapGrid:n,snapToGrid:r,nodeOrigin:i,domNode:a}=k.getState();return{nodeLookup:e,transform:t,snapGrid:n,snapToGrid:r,nodeOrigin:i,paneDomNode:a}},onChange:(e,t)=>{let{triggerNodeChanges:n,nodeLookup:r,parentLookup:i,nodeOrigin:a}=k.getState(),o=[],s={x:e.x,y:e.y},l=r.get(w);if(l&&l.expandParent&&l.parentId){let t=l.origin??a,n=e.width??l.measured.width??0,u=e.height??l.measured.height??0,d=Ek([{id:l.id,parentId:l.parentId,rect:{width:n,height:u,...z4({x:e.x??l.position.x,y:e.y??l.position.y},{width:n,height:u},l.parentId,r,t)}}],r,i,a);o.push(...d),s.x=e.x?Math.max(t[0]*n,e.x):void 0,s.y=e.y?Math.max(t[1]*u,e.y):void 0}if(void 0!==s.x&&void 0!==s.y){let e={id:w,type:"position",position:{...s}};o.push(e)}if(void 0!==e.width&&void 0!==e.height){let t={id:w,type:"dimensions",resizing:!0,setAttributes:!m||("horizontal"===m?"width":"height"),dimensions:{width:e.width,height:e.height}};o.push(t)}for(let e of t){let t={...e,type:"position"};o.push(t)}n(o)},onEnd:({width:e,height:t})=>{k.getState().triggerNodeChanges([{id:w,type:"dimensions",resizing:!1,dimensions:{width:e,height:t}}])}})),N.current.update({controlPosition:z,boundaries:{minWidth:s,minHeight:l,maxWidth:u,maxHeight:d},keepAspectRatio:c,resizeDirection:m,onResizeStart:h,onResize:g,onResizeEnd:v,shouldResize:p}),()=>{N.current?.destroy()}},[z,s,l,u,d,c,h,g,v,p]);let E=z.split("-");return(0,b.jsx)("div",{className:IG(["react-flow__resize-control","nodrag",...E,n,r]),ref:S,style:{...i,scale:j,...o&&{[I?"backgroundColor":"borderColor"]:o}},children:a})});let Ch=uk("arrow-up-right",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]),Cg=uk("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]),Cv=uk("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]),Cx=uk("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]),Cy=uk("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),Cb=uk("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]),C_=uk("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]),C$=uk("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]),Cw=uk("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]),Ck={NEXT_PUBLIC_INTERF_SERVICE_URL:ux.default.env.NEXT_PUBLIC_INTERF_SERVICE_URL?.trim()||null},CS=new Intl.NumberFormat,CI="I am connected to this Interf Workspace. I can answer Interf questions here; for work that changes files I will prepare an approval proposal first.",Cj={height:"clamp(520px, calc(100dvh - 360px), 760px)",minHeight:0};function CN(){return Ck.NEXT_PUBLIC_INTERF_SERVICE_URL?Ck.NEXT_PUBLIC_INTERF_SERVICE_URL:"3000"===window.location.port&&("127.0.0.1"===window.location.hostname||"localhost"===window.location.hostname)?"http://127.0.0.1:4873":window.location.origin}async function Cz(e,t){let n=await fetch(`${e}${t}`,{cache:"no-store"});if(!n.ok)throw Error(`${t} returned ${n.status}`);return n.json()}async function CE(e,t,n){let r=await fetch(`${e}${t}`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!r.ok)throw Error(`${t} returned ${r.status}`);return r.json()}async function CO(e,t){await CE(e,"/v1/open-path",{path:t})}function CT(e){return{preparation:e.preparation,portable_context_path:e.portable_context_path,readiness:{...e.readiness,preparation:e.preparation.name},...void 0!==e.latest_compile_run_id?{latest_compile_run_id:e.latest_compile_run_id}:{},...void 0!==e.latest_test_run_id?{latest_test_run_id:e.latest_test_run_id}:{}}}function CC(e){return{id:e.id,path:e.path,...e.label?{label:e.label}:{},...e.hint?{hint:e.hint}:{},source_kind:e.source_kind,built_in:e.built_in,active_for_preparations:e.active_for_preparations,stages:e.stages}}async function CD(e){let[t,n,r,i,a,o,s,l,u,d,c]=await Promise.all([Cz(e,"/health"),Cz(e,"/v1/preparations"),Cz(e,"/v1/methods"),Cz(e,"/v1/runs"),Cz(e,"/v1/executor"),Cz(e,"/v1/action-proposals"),Cz(e,"/v1/compile-runs"),Cz(e,"/v1/test-runs"),Cz(e,"/v1/portable-contexts"),Cz(e,"/v1/source-files"),Cz(e,"/v1/workspace-files").catch(()=>({workspace_files:[]}))]);return{health:t,data:{preparation_resources:n.preparations.map(CT),preparations:n.preparations,method_packages:r.methods.map(CC),methods:r.methods,runs:i.runs,executor:a,action_proposals:o.action_proposals,compile_runs:s.compile_runs,test_runs:l.test_runs,portable_contexts:u.portable_contexts,source_files:d.source_files,workspace_files:c.workspace_files}}}function CU(e){if(!e)return null;let t=Date.parse(e);return Number.isFinite(t)?t:null}function CP(e){let t=CU(e);if(!t)return"-";let n=Math.max(0,Math.round((Date.now()-t)/1e3));if(n<10)return"just now";if(n<60)return`${n}s ago`;let r=Math.round(n/60);if(r<60)return`${r}m ago`;let i=Math.round(r/60);return i<24?`${i}h ago`:new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}).format(new Date(t))}function CZ(e,t){let n=CU(e);if(!n)return"-";let r=CU(t)??Date.now();if(!Number.isFinite(r)||r<n)return"-";let i=Math.max(1,Math.round((r-n)/1e3));if(i<60)return`${CS.format(i)}s`;let a=Math.floor(i/60),o=i%60;if(a<60)return o>0?`${a}m ${o}s`:`${a}m`;let s=Math.floor(a/60),l=a%60;return l>0?`${s}h ${l}m`:`${s}h`}function CA(e){if(e<1024)return`${CS.format(e)} B`;let t=e/1024;for(let e of["KB","MB","GB"]){if(t<1024||"GB"===e)return`${t.toFixed(t>=10?0:1)} ${e}`;t/=1024}return`${CS.format(e)} B`}function CR(e){return"succeeded"===e||"completed"===e||"ready"===e?"status-ok":"failed"===e||"cancelled"===e||"not-ready"===e?"status-fail":"running"===e||"building"===e||"checking"===e?"status-run":"queued"===e||"pending"===e||"stale"===e?"status-wait":"status-idle"}function CL(e){return"succeeded"===e||"completed"===e?"Completed":"ready"===e?"Ready":"not-ready"===e?"Not ready":"not-built"===e?"Not built":"not-configured"===e?"Needs checks":"building"===e?"Building":"checking"===e?"Checking":"built"===e?"Built":"stale"===e?"Stale":"failed"===e?"Failed":"running"===e?"Running":"queued"===e?"Queued":"succeeded"===e?"Succeeded":"completed"===e?"Completed":"cancelled"===e?"Cancelled":e}function CM(e){return"preparation-setup"===e?"Preparation setup":"readiness-check-draft"===e?"Improve checks":"method-authoring"===e?"Method draft":"method-improvement"===e?"Method improvement":"compile"===e?"Prepare":"test"===e?"Readiness check":"Local run"}function CF(e){return`Propose \`interf compile --preparation ${e}\` now.
80
80
  Use the saved Preparation and selected Method as the source of truth.
81
81
  Create the approval proposal without asking follow-up questions.`}function CB(e){let t=e.split("/").filter(Boolean);return t.length<=4?e:`.../${t.slice(-4).join("/")}`}function CW(e,t){return`${e.replace(/\/+$/,"")}/${t.replace(/^\/+/,"")}`}function CH(e,t){if(!e)return t??"local executor";let n=[e.model,e.effort,e.profile].filter(e=>!!e);return n.length>0?`${e.display_name} / ${n.join(" / ")}`:e.display_name}function CV(e){return CU(e.started_at)??CU(e.created_at)??CU(e.finished_at)??0}function CJ(e){return"compile"===e?1:"test"===e?2:"method-authoring"===e?3:"method-improvement"===e?4:"readiness-check-draft"===e?5:6}function CG(e){return 0===e.length?"0/0":`${e.filter(e=>e.ok).length}/${e.length}`}function CK(e){return e.readiness?e.readiness.ready?"ready":"not ready":"not checked"}function Cq(e){return e?`${e.passed}/${e.total}`:"-"}function CY(e){return e.trace.run.error?.message??null}function CX(e){return{...e,workflowName:e.methodName,createdAt:new Date(e.createdAt),updatedAt:new Date(e.updatedAt),...e.expiredAt?{expiredAt:new Date(e.expiredAt)}:{},...e.startedAt?{startedAt:new Date(e.startedAt)}:{},...e.completedAt?{completedAt:new Date(e.completedAt)}:{}}}function CQ(e){return e.map(e=>({...e,createdAt:new Date(e.createdAt)}))}function C0(){return new URLSearchParams(window.location.search).get("run")}function C1({state:e,onRefresh:t}){let n=(0,_.useMemo)(()=>[...e.data.runs].sort((e,t)=>{let n=CV(t)-CV(e);return 0!==n?n:CJ(e.run_type)-CJ(t.run_type)}),[e.data]),r=C0(),[i,a]=(0,_.useState)("source"),[o,s]=(0,_.useState)("trace"),[l,u]=(0,_.useState)(()=>r),[d,c]=(0,_.useState)(r?{kind:"source"}:null),[m,f]=(0,_.useState)(null),[p,h]=(0,_.useState)(null),[g,v]=(0,_.useState)(null),[x,y]=(0,_.useState)(()=>r?"runs":"portable"),[$,w]=(0,_.useState)("graph"),[k,S]=(0,_.useState)(null),[I,j]=(0,_.useState)(!1);(0,_.useEffect)(()=>{let e=()=>u(C0());return window.addEventListener("popstate",e),()=>window.removeEventListener("popstate",e)},[]),(0,_.useEffect)(()=>{p&&!e.data.method_packages.some(e=>e.id===p)&&h(null)},[p,e.data.method_packages]),(0,_.useEffect)(()=>{m&&n.some(e=>e.run_id===m)&&f(null)},[m,n]);let N=l?n.find(e=>e.run_id===l)??null:null,z=p?e.data.method_packages.find(e=>e.id===p)??null:null,E=z?e.data.compile_runs.find(e=>e.run.method===z.id)?.run??null:null,O="workspaces"===i&&!!g&&!N,T="methods"===i&&!!p&&!N,C=!!N||O||T,D=()=>"runs"===i?{kind:"runs"}:"workspaces"===i&&g?{kind:"preparation",preparation:g,tab:x}:"methods"===i&&p?{kind:"method",methodId:p,tab:$}:{kind:"source"},U=(e,t=D(),n={})=>{c(t),u(e),f(n.pending?e:null);{let t=new URL(window.location.href);t.searchParams.set("run",e),window.history.pushState(null,"",`${t.pathname}${t.search}${t.hash}`)}},P=(e=!0)=>{u(null),c(null),f(null),e&&(d?.kind==="preparation"?(a("workspaces"),v(d.preparation),y(d.tab),h(null)):d?.kind==="method"?(a("methods"),h(d.methodId),w(d.tab),v(null)):(d?.kind==="runs"?a("runs"):a("source"),v(null),h(null)));{let e=new URL(window.location.href);e.searchParams.delete("run"),window.history.pushState(null,"",`${e.pathname}${e.search}${e.hash}`)}},Z=T&&"graph"===$,A=O&&"method"===x,R=!l&&"source"===i,L=!!(l&&!N&&m===l),M=N||L||Z||A,F=d?.kind==="preparation"?"Preparation":d?.kind==="method"?"Method":d?.kind==="runs"?"Runs":"Source Folder",B=N||L?"content-shell run-canvas-shell":Z||A?"content-shell method-canvas-shell":R?"content-shell source-canvas-shell":C?"content-shell detail-wide-shell":"content-shell";return(0,b.jsxs)("main",{className:M?"compiler-shell run-canvas-mode":R?"compiler-shell source-canvas-mode":"compiler-shell",children:[(0,b.jsx)(C4,{state:e}),(0,b.jsxs)("div",{className:B,children:[(0,b.jsxs)("div",{className:"compiler-main-stack",children:[l||O||T?null:(0,b.jsx)(C6,{activeTab:i,onChange:e=>{a(e),P(!1),"source"===e&&v(null),"workspaces"===e&&(v(null),y("portable")),"methods"===e&&h(null),"runs"===e&&(v(null),h(null))}}),l||"methods"!==i?null:(0,b.jsx)(Dh,{compileRun:E,data:e.data,detailTab:$,onCloseMethod:()=>h(null),onDetailTabChange:w,onOpenRunPage:(e,t)=>U(t,{kind:"method",methodId:e,tab:"runs"}),onPromptAction:e=>{S({id:`${Date.now()}`,...e}),j(!0)},onSelectMethod:e=>{h(e),w("graph")},selectedMethod:z,serviceUrl:e.serviceUrl}),N?(0,b.jsx)(C9,{backLabel:F,detailTab:o,onBack:P,onDetailTabChange:s,run:N}):null,!N&&l&&L?(0,b.jsx)(C7,{runId:l}):null,N||!l||L?null:(0,b.jsx)(C8,{backLabel:F,onBack:P,runId:l}),l||"source"!==i?null:(0,b.jsx)(D$,{controlPath:e.health.control_path??null,data:e.data,onPromptAction:e=>{S({id:`${Date.now()}`,...e}),j(!0)},serviceUrl:e.serviceUrl,sourceFolderPath:e.health.source_folder_path??null}),l||"runs"!==i?null:(0,b.jsx)(Dt,{onOpenRunPage:e=>U(e,{kind:"runs"}),onRefresh:t,runs:n}),l||"workspaces"!==i?null:(0,b.jsx)(Dw,{activeTab:x,controlPath:e.health.control_path??null,data:e.data,onOpenRunPage:(e,t)=>U(t,{kind:"preparation",preparation:e,tab:"runs"}),onPromptAction:e=>{S({id:`${Date.now()}`,...e}),j(!0)},onSelectedPreparationChange:v,onTabChange:y,runs:n,selectedPreparationName:g,serviceUrl:e.serviceUrl,sourceFolderPath:e.health.source_folder_path??null})]}),(0,b.jsx)(C3,{controlPath:e.health.control_path??null,draft:k,data:e.data,onDraftConsumed:()=>S(null),onRefresh:t,onOpenChange:j,onRunSubmitted:e=>{((e,n=D())=>{t(),U(e,n,{pending:!0})})(e,D())},open:I,serviceUrl:e.serviceUrl,sourceFolderPath:e.health.source_folder_path??null})]})]})}function C4({state:e}){let[t,n]=(0,_.useState)(()=>{let e=window.localStorage.getItem("interf-compiler-theme");return"system"===e||"light"===e||"dark"===e?e:"dark"}),r="online"===e.status?e.health.control_path??`${e.health.host}:${e.health.port}`:"local project",i="online"===e.status?e.health.control_path??null:null,a="online"===e.status?e.health.source_folder_path??null:null,o="online"===e.status?e.health.service_url:e.serviceUrl,s="online"===e.status?"Service ready":"loading"===e.status?"Connecting":"Service offline",l=a?`Source Folder: ${a}
82
- Interf Workspace: ${r}`:`Interf Workspace: ${r}`;return(0,_.useEffect)(()=>{let e=document.documentElement,n=window.matchMedia("(prefers-color-scheme: dark)"),r=()=>{let r="dark"===t||"system"===t&&n.matches;e.classList.toggle("dark",r),e.classList.toggle("light",!r)};return window.localStorage.setItem("interf-compiler-theme",t),r(),n.addEventListener("change",r),()=>n.removeEventListener("change",r)},[t]),(0,b.jsxs)("header",{className:"top-nav",children:[(0,b.jsxs)("div",{className:"brand-row",children:[(0,b.jsx)("a",{className:"brand-link",href:"/","aria-label":"Open Interf Compiler",children:(0,b.jsx)("span",{children:"Interf Compiler"})}),(0,b.jsx)("span",{className:"nav-divider"}),(0,b.jsx)(D2,{className:"local-path",disabled:!i,displayPath:r,label:"Workspace",path:i,serviceUrl:o,title:l})]}),(0,b.jsxs)("div",{className:"nav-actions",children:[(0,b.jsxs)("a",{className:`health-link ${"online"===e.status?"status-ok":"loading"===e.status?"status-wait":"status-fail"}`,href:`${o}/health`,target:"_blank",rel:"noreferrer",title:"Open local service health response",children:[(0,b.jsx)("span",{className:"status-dot"}),(0,b.jsx)("span",{children:s})]}),(0,b.jsxs)("div",{className:"theme-switcher","aria-label":"Theme",children:[(0,b.jsx)("button",{"aria-pressed":"system"===t,className:"system"===t?"active":"",onClick:()=>n("system"),title:"Use system theme",type:"button",children:(0,b.jsx)(Cb,{size:16})}),(0,b.jsx)("button",{"aria-pressed":"light"===t,className:"light"===t?"active":"",onClick:()=>n("light"),title:"Use light theme",type:"button",children:(0,b.jsx)(Cw,{size:16})}),(0,b.jsx)("button",{"aria-pressed":"dark"===t,className:"dark"===t?"active":"",onClick:()=>n("dark"),title:"Use dark theme",type:"button",children:(0,b.jsx)(C_,{size:16})})]}),(0,b.jsxs)("a",{className:"docs-link",href:"https://www.npmjs.com/package/@interf/compiler",target:"_blank",rel:"noreferrer",children:["Docs",(0,b.jsx)(Ch,{size:15})]})]})]})}function C6({activeTab:e,onChange:t}){return(0,b.jsx)("nav",{className:"segmented-tabs","aria-label":"Interf sections",children:[{value:"source",label:"Source Folder"},{value:"workspaces",label:"Preparations"},{value:"methods",label:"Methods"},{value:"runs",label:"Runs"}].map(n=>(0,b.jsx)("button",{"aria-pressed":e===n.value,className:e===n.value?"active":"",onClick:()=>t(n.value),type:"button",children:n.label},n.value))})}function C2(e,t,n,r={}){var i;let a="string"==typeof(i=n)?i.trim()||null:"number"==typeof i||"boolean"==typeof i?String(i):null;a&&e.push({label:t,value:a,...r.mono?{mono:!0}:{}})}function C5(e){let t=[];if("clarification"===e.action_type){let n=e.request.values;return n&&"object"==typeof n&&!Array.isArray(n)&&C2(t,"Attached fields",Object.keys(n).join(", ")),t}return"preparation-setup"===e.action_type?(C2(t,"Preparation",e.request.preparation.name),C2(t,"Source Folder",e.request.preparation.path,{mono:!0}),C2(t,"Method",e.request.preparation.method,{mono:!0}),C2(t,"Agent work",e.request.preparation.about)):"compile"===e.action_type?(C2(t,"Preparation",e.request.preparation),C2(t,"Method",e.request.method,{mono:!0})):"test"===e.action_type?(C2(t,"Preparation",e.request.preparation),C2(t,"Target",e.request.mode)):"readiness-check-draft"===e.action_type?(C2(t,"Preparation",e.request.preparation),C2(t,"Source Folder",e.request.source_folder_path,{mono:!0}),C2(t,"Checks",e.request.target_count),C2(t,"About",e.request.about)):(C2(t,"Preparation",e.request.preparation),C2(t,"Method",e.request.method_id,{mono:!0}),C2(t,"Label",e.request.label),C2(t,"Summary",e.request.hint),C2(t,"Agent work",e.request.task_prompt),e.request.checks?.length&&C2(t,"Readiness checks",e.request.checks.length)),t}function C3({controlPath:e,data:t,draft:n,onDraftConsumed:r,onRefresh:i,onOpenChange:a,onRunSubmitted:o,open:s,serviceUrl:l,sourceFolderPath:u}){var d;let[c,m]=(0,_.useState)(""),[f,p]=(0,_.useState)(null),[h,g]=(0,_.useState)(()=>t.preparation_resources[0]?.preparation.name??""),[v,x]=(0,_.useState)(!1),[y,$]=(0,_.useState)(null),[w,k]=(0,_.useState)(null),[S,I]=(0,_.useState)(null),j=(0,_.useRef)(null),N=(0,_.useRef)(null),z=(0,_.useMemo)(()=>DI(t),[t]),E=(0,_.useMemo)(()=>[...t.action_proposals.slice(0,8)].reverse(),[t.action_proposals]),O=h||t.preparation_resources[0]?.preparation.name||"",T=t.action_proposals.filter(e=>"awaiting_approval"===e.status).length,C=t.executor.executor?.name??t.executor.available_executors.find(e=>e.current)?.name??"",D=C||t.executor.available_executors[0]?.name||"",U=t.executor.available_executors.find(e=>e.name===D)?.display_name??t.executor.executor?.display_name??"No local agent",P=v?"submitted":y?"error":"ready",Z=u??e,A=z.find(e=>e.name===O)??z[0]??null,R=!!A&&DN(A),L=!!A&&Dz(A),M=!!A&&DN(d=A)&&Dz(d),F=M&&!!A?.testRun;(0,_.useEffect)(()=>{O&&!t.preparation_resources.some(e=>e.preparation.name===O)&&g(t.preparation_resources[0]?.preparation.name??"")},[t.preparation_resources,O]),(0,_.useEffect)(()=>{n&&(g(n.preparation),m(n.message),p(n.values??null),a(!0),r(),window.requestAnimationFrame(()=>N.current?.focus()))},[n,r,a]),(0,_.useEffect)(()=>{j.current?.scrollTo({top:j.current.scrollHeight,behavior:"smooth"})},[E.length,w?.id,s]);let B=async(e=c,t=f)=>{let n=e.trim();if(n){k({id:`pending-${Date.now()}`,createdAt:new Date().toISOString(),preparation:O||"No Preparation",message:n,...t?{values:t}:{}}),m(""),x(!0),$(null);try{await CE(l,"/v1/action-proposals",{message:n,...O?{preparation:O}:{},...t?{values:t}:{}}),p(null),k(null),i()}catch(e){k(null),m(n),$(e instanceof Error?e.message:String(e))}finally{x(!1)}}},W=async(e,t)=>{x(!0),$(null);try{let n=await CE(l,`/v1/action-proposals/${encodeURIComponent(e)}/decision`,{approved:t});t&&n.submitted_run_id?o(n.submitted_run_id):i()}catch(e){$(e instanceof Error?e.message:String(e))}finally{x(!1)}},H=async e=>{if(e&&e!==C){x(!0),$(null);try{await CE(l,"/v1/executor",{agent:e}),i()}catch(e){$(e instanceof Error?e.message:String(e))}finally{x(!1)}}},V=(e,t=O)=>{g(t),m(e),p(null),window.requestAnimationFrame(()=>N.current?.focus())},J=()=>{I(DY({defaultPreparation:O,methods:t.method_packages}))};return(0,b.jsxs)(b.Fragment,{children:[s?(0,b.jsxs)("aside",{className:"agent-chat-panel","aria-label":"Local agent chat",children:[(0,b.jsxs)("div",{className:"agent-panel-head",children:[(0,b.jsxs)("div",{className:"agent-title",children:[(0,b.jsx)(Cg,{size:18}),(0,b.jsxs)("div",{className:"agent-title-copy",children:[(0,b.jsx)("h2",{children:"Local Agent"}),(0,b.jsxs)("span",{className:"agent-status-label",children:[(0,b.jsx)("span",{className:`agent-status-dot ${"connected"===t.executor.status?"status-ok":"status-fail"}`,"aria-hidden":"true"}),"connected"===t.executor.status?"Connected":"Unavailable",(0,b.jsx)("span",{"aria-hidden":"true",children:"·"}),(0,b.jsx)("span",{children:U})]})]})]}),(0,b.jsxs)("div",{className:"agent-head-actions",children:[T>0?(0,b.jsxs)("span",{className:"agent-review-pill",children:["Review ",T]}):null,(0,b.jsx)("button",{"aria-label":"Close local agent chat",className:"agent-collapse-button",onClick:()=>a(!1),type:"button",children:(0,b.jsx)(pG,{size:16})})]})]}),(0,b.jsxs)("div",{className:"chat-transcript","aria-busy":"submitted"===P,"aria-live":"polite",ref:j,children:[(0,b.jsx)("div",{className:"chat-message assistant",children:(0,b.jsx)("p",{children:O?M?"What should Interf do next? I can prepare, check readiness, improve, or draft a Method for approval.":R?"Portable context exists. Add readiness checks before asking Interf to check whether it is ready.":"Prepare this Source Folder first. After portable context exists, Interf can check readiness or improve it.":"Choose a Source Folder and describe the agent work. I will prepare an approval proposal before anything runs."})}),E.map(e=>{var t,n,r,i,a;let s,l;return(0,b.jsxs)("div",{className:`chat-turn ${"awaiting_approval"===e.status?"active":"historical"}`,children:[(0,b.jsx)("div",{className:"chat-message user",children:(0,b.jsx)("p",{children:e.message})}),(0,b.jsxs)("div",{className:"chat-message assistant",children:[(0,b.jsx)("p",{children:(t=e.assistant_message,(l=(s=t?.trim())?s.includes('"command_preview"')||s.includes('"expected"')||s.includes("invalid_type")||s.includes("Invalid input: expected string")||s.includes("Too small: expected string")||s.includes("expected string to have")?CI:s:null)&&"awaiting_approval"===e.status?l:"needs_clarification"===e.status?l??CI:"submitted"===e.status?e.submitted_run_id?`${e.summary} Submitted as visible run ${e.submitted_run_id}.`:`${e.summary} Submitted as a visible run.`:"denied"===e.status?`${e.summary} Denied.`:"failed"===e.status?`${e.summary} Failed before submission.`:`${e.summary} Approve to submit this through the local Interf service.`)}),"clarification"!==e.action_type?(0,b.jsxs)("article",{className:`proposal-card compact ${"awaiting_approval"===e.status?"actionable":"historical"}`,children:[(0,b.jsxs)("div",{className:"proposal-title-row",children:[(0,b.jsx)("strong",{children:e.title}),(0,b.jsx)(D3,{label:"needs_clarification"===(n=e.status)?"Needs details":"awaiting_approval"===n?"Needs approval":"submitted"===n?"Submitted":"approved"===n?"Approved":"denied"===n?"Denied":"Failed",tone:"submitted"===(r=e.status)||"approved"===r?"status-ok":"failed"===r||"denied"===r?"status-fail":"needs_clarification"===r?"status-idle":"status-wait"})]}),(0,b.jsxs)("div",{className:"proposal-meta",children:[(0,b.jsx)("span",{children:"clarification"===(i=e.action_type)?"Clarify":"preparation-setup"===i?"Set up Preparation":"compile"===i?"Prepare":"test"===i?"Check readiness":"readiness-check-draft"===i?"Improve":"Draft Method"}),(0,b.jsx)("span",{children:e.preparation??"no Preparation"}),(0,b.jsx)("span",{children:CP(e.created_at)})]}),C5(e).length>0?(0,b.jsx)("dl",{className:"proposal-detail-grid",children:C5(e).map(t=>(0,b.jsxs)("div",{children:[(0,b.jsx)("dt",{children:t.label}),(0,b.jsx)("dd",{className:t.mono?"mono":"",children:t.value})]},`${e.proposal_id}-${t.label}`))}):null,(0,b.jsxs)("div",{className:"command-preview",children:[(0,b.jsx)("span",{children:"CLI preview"}),(0,b.jsx)("code",{children:e.command_preview?e.command_preview:"No CLI preview returned."})]}),e.submitted_run_id?(0,b.jsxs)("button",{className:"proposal-run-link",onClick:()=>o(e.submitted_run_id),type:"button",children:[(0,b.jsx)(Ch,{size:14}),"Open ","compile-run"===(a=e.submitted_run_type)?"prepare run":"test-run"===a?"check run":"job-run"===a?"agent run":"run"]}):null,"awaiting_approval"===e.status?(0,b.jsxs)("div",{className:"proposal-actions",children:[(0,b.jsxs)("button",{disabled:v,type:"button",onClick:()=>void W(e.proposal_id,!1),children:[(0,b.jsx)(pG,{size:14}),"Deny"]}),(0,b.jsxs)("button",{disabled:v,type:"button",onClick:()=>void W(e.proposal_id,!0),children:[(0,b.jsx)(uC,{size:14}),"Approve"]})]}):null,e.error?(0,b.jsx)("p",{className:"agent-error",children:e.error}):null,"failed"===e.status?(0,b.jsxs)("details",{className:"payload-details",children:[(0,b.jsx)("summary",{children:"Request payload"}),(0,b.jsx)(pp,{data:e.request,expandLevel:0})]}):null]}):null]})]},e.proposal_id)}),w?(0,b.jsxs)("div",{className:"chat-turn active pending",children:[(0,b.jsx)("div",{className:"chat-message user",children:(0,b.jsx)("p",{children:w.message})}),(0,b.jsx)("div",{className:"chat-message assistant",children:(0,b.jsxs)("p",{className:"planning-copy",children:[(0,b.jsx)(Cy,{className:"spin",size:14}),U," is preparing an approval proposal."]})})]},w.id):null]}),(0,b.jsxs)("div",{className:"agent-suggestions","aria-label":"Suggested Interf actions",children:[0===t.preparation_resources.length?(0,b.jsx)("button",{type:"button",onClick:()=>{I(Dq({controlPath:Z,preparationViews:z,methods:t.method_packages}))},children:"Create Preparation"}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("button",{type:"button",onClick:()=>V(CF(O)),children:"Prepare"}),M?(0,b.jsx)("button",{type:"button",onClick:()=>V(`Check readiness for ${O}.`),children:"Check readiness"}):null,F?(0,b.jsx)("button",{type:"button",onClick:()=>V(`Improve ${O} using the latest readiness evidence.`),children:"Improve"}):null,R&&!L?(0,b.jsx)("button",{type:"button",onClick:()=>V(`Draft readiness checks for ${O}.`),children:"Draft checks"}):null,(0,b.jsx)("button",{type:"button",onClick:()=>{A?I(DX(A,t.method_packages)):J()},children:"Draft Method"})]}),(0,b.jsx)("button",{type:"button",onClick:J,children:"Create Method"})]}),(0,b.jsxs)("form",{className:"agent-compose",onSubmit:e=>{e.preventDefault(),B()},children:[f?(0,b.jsxs)("div",{className:"agent-attached-values",children:[(0,b.jsx)("span",{children:"Form values attached"}),(0,b.jsx)("button",{disabled:v,onClick:()=>p(null),type:"button",children:"Clear"})]}):null,(0,b.jsxs)("div",{className:"agent-input-shell",children:[(0,b.jsx)("textarea",{"aria-label":"Tell the local agent what Interf should do",disabled:v,onChange:e=>m(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||e.nativeEvent.isComposing||(e.preventDefault(),B())},placeholder:O?"Ask Interf to prepare, check, improve, or draft a Method...":"Ask Interf to set up a Source Folder for agent work...",ref:N,value:c}),(0,b.jsxs)("div",{className:"agent-compose-footer",children:[(0,b.jsxs)("label",{className:"agent-executor-switcher",children:[(0,b.jsx)(Cg,{size:14}),(0,b.jsxs)("select",{"aria-label":"Local agent executor",disabled:v||0===t.executor.available_executors.length,value:D,onChange:e=>void H(e.target.value),children:[0===t.executor.available_executors.length?(0,b.jsx)("option",{value:"",children:"No agent"}):null,t.executor.available_executors.map(e=>(0,b.jsx)("option",{value:e.name,children:e.display_name},e.name))]}),(0,b.jsx)(uD,{size:14,"aria-hidden":"true"})]}),(0,b.jsxs)("button",{className:"send-button",disabled:v||!c.trim(),type:"submit",children:[v?(0,b.jsx)(Cy,{className:"spin",size:15}):(0,b.jsx)(pJ,{size:15}),(0,b.jsx)("span",{children:v?"Planning":"Send"})]})]})]})]}),y?(0,b.jsx)("p",{className:"agent-error",children:y}):null]}):null,(0,b.jsxs)("button",{"aria-expanded":s,"aria-label":s?"Close local agent chat":"Open local agent chat",className:`agent-launcher ${s?"open":""}`,onClick:()=>a(!s),type:"button",children:[(0,b.jsx)(Cg,{size:21}),(0,b.jsx)("span",{className:`rail-status-dot ${"connected"===t.executor.status?"status-ok":"status-fail"}`})]}),S?(0,b.jsx)(DQ,{form:S,onClose:()=>I(null),onSubmit:e=>{I(null),g(e.preparation),m(e.message),p(e.values??null),a(!0),window.requestAnimationFrame(()=>N.current?.focus())}}):null]})}function C9({backLabel:e,detailTab:t,onBack:n,onDetailTabChange:r,run:i}){return(0,b.jsxs)("section",{className:"run-detail-page",children:[(0,b.jsxs)("div",{className:"breadcrumb-row",children:[(0,b.jsx)("button",{type:"button",onClick:n,children:e}),(0,b.jsx)("span",{children:"/"}),(0,b.jsx)("code",{children:i.run_id})]}),(0,b.jsx)(Dr,{detailTab:t,onDetailTabChange:r,run:i})]})}function C8({backLabel:e,onBack:t,runId:n}){return(0,b.jsxs)("section",{className:"run-detail empty-detail",children:[(0,b.jsx)("strong",{children:"Run not found"}),(0,b.jsx)("span",{children:"The local service does not have a visible run with this id."}),(0,b.jsx)("code",{children:n}),(0,b.jsxs)("button",{className:"toolbar-button",onClick:t,type:"button",children:["Back to ",e]})]})}function C7({runId:e}){return(0,b.jsxs)("section",{className:"run-detail empty-detail",children:[(0,b.jsx)(Cy,{className:"spin",size:22}),(0,b.jsx)("strong",{children:"Opening run"}),(0,b.jsx)("code",{children:e})]})}let De=[{value:"succeeded",label:"Completed"},{value:"failed",label:"Failed"},{value:"running",label:"Running"},{value:"queued",label:"Queued"},{value:"cancelled",label:"Cancelled"}];function Dt({onOpenRunPage:e,onRefresh:t,runs:n}){let[r,i]=(0,_.useState)("all"),[a,o]=(0,_.useState)("all"),[s,l]=(0,_.useState)(""),u=(0,_.useMemo)(()=>{let e=new Set;for(let t of n)e.add(t.run_type);return[...e].sort((e,t)=>CJ(e)-CJ(t))},[n]),d=(0,_.useMemo)(()=>{let e=s.trim().toLowerCase();return n.filter(t=>("all"===r||t.run_type===r)&&(!e||[t.title,t.run_id,t.preparation,t.method,t.run_type,t.status,t.agent_label].filter(Boolean).join(" ").toLowerCase().includes(e)))},[r,n,s]),c=(0,_.useMemo)(()=>"all"===a?d:d.filter(e=>e.status===a),[d,a]),m=(0,_.useMemo)(()=>{let e=new Map;for(let t of d)e.set(t.status,(e.get(t.status)??0)+1);return e},[d]);return(0,b.jsxs)("section",{className:"runs-view",children:[(0,b.jsxs)("div",{className:"page-head",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h1",{children:"Runs"}),(0,b.jsx)("p",{children:"Visible local executions for prepare runs, readiness checks, Method drafts, and local-agent actions."})]}),(0,b.jsxs)("div",{className:"runs-head-controls","aria-label":"Run filters",children:[(0,b.jsxs)("label",{className:"runs-search-field",children:[(0,b.jsx)("span",{children:"Search"}),(0,b.jsx)("input",{"aria-label":"Search runs",onChange:e=>l(e.target.value),placeholder:"Search runs...",type:"search",value:s})]}),(0,b.jsxs)("label",{children:[(0,b.jsx)("span",{children:"Type"}),(0,b.jsxs)("select",{value:r,onChange:e=>i(e.target.value),children:[(0,b.jsx)("option",{value:"all",children:"All run types"}),u.map(e=>(0,b.jsx)("option",{value:e,children:CM(e)},e))]})]}),(0,b.jsx)("button",{className:"toolbar-button",onClick:t,type:"button",children:"Refresh"})]})]}),(0,b.jsxs)("div",{className:"run-status-filter-row","aria-label":"Run status filters",children:[(0,b.jsxs)("button",{"aria-pressed":"all"===a,className:`run-status-filter ${"all"===a?"active":""}`,onClick:()=>o("all"),type:"button",children:[(0,b.jsx)("span",{className:"status-dot status-idle"}),(0,b.jsx)("strong",{children:"All"}),(0,b.jsx)("em",{children:CS.format(d.length)})]}),De.map(e=>(0,b.jsxs)("button",{"aria-pressed":a===e.value,className:`run-status-filter ${a===e.value?"active":""}`,onClick:()=>o(e.value),type:"button",children:[(0,b.jsx)("span",{className:`status-dot ${CR(e.value)}`}),(0,b.jsx)("strong",{children:e.label}),(0,b.jsx)("em",{children:CS.format(m.get(e.value)??0)})]},e.value))]}),(0,b.jsx)(Dn,{runs:c,onSelectRun:e})]})}function Dn({runs:e,onSelectRun:t}){return(0,b.jsx)("div",{className:"table-frame",children:(0,b.jsxs)("table",{className:"runs-table",children:[(0,b.jsx)("thead",{children:(0,b.jsxs)("tr",{children:[(0,b.jsx)("th",{children:"Run"}),(0,b.jsx)("th",{children:"Run ID"}),(0,b.jsx)("th",{children:"Status"}),(0,b.jsx)("th",{children:"Duration"}),(0,b.jsx)("th",{children:"Preparation"}),(0,b.jsx)("th",{children:"Method"}),(0,b.jsx)("th",{children:"Executor"}),(0,b.jsx)("th",{children:"Started"}),(0,b.jsx)("th",{children:"Completed"})]})}),(0,b.jsx)("tbody",{children:0===e.length?(0,b.jsx)("tr",{children:(0,b.jsx)("td",{colSpan:9,children:(0,b.jsxs)("div",{className:"empty-table",children:[(0,b.jsx)("strong",{children:"No runs found"}),(0,b.jsx)("span",{children:"Run `interf`, `interf compile`, or `interf test` while the local Interf service is open."})]})})}):e.map(e=>{let n=!!t;return(0,b.jsxs)("tr",{onClick:n?()=>t?.(e.run_id):void 0,onKeyDown:n?n=>{("Enter"===n.key||" "===n.key)&&t?.(e.run_id)}:void 0,role:n?"button":void 0,tabIndex:n?0:void 0,children:[(0,b.jsx)("td",{children:(0,b.jsxs)("div",{className:"run-name-cell",children:[(0,b.jsx)("strong",{children:e.title}),(0,b.jsxs)("span",{children:[CM(e.run_type),e.preparation?` / ${e.preparation}`:""]})]})}),(0,b.jsx)("td",{children:(0,b.jsx)("code",{children:e.run_id})}),(0,b.jsx)("td",{children:(0,b.jsx)(D5,{status:e.status})}),(0,b.jsx)("td",{children:(0,b.jsx)("span",{children:CZ(e.started_at,e.finished_at)})}),(0,b.jsx)("td",{children:(0,b.jsx)("span",{children:e.preparation??"-"})}),(0,b.jsx)("td",{children:(0,b.jsx)("span",{children:e.method??"-"})}),(0,b.jsx)("td",{children:CH(e.executor,e.agent_label)}),(0,b.jsx)("td",{children:(0,b.jsx)("time",{children:CP(e.started_at??e.created_at)})}),(0,b.jsx)("td",{children:(0,b.jsx)("time",{children:CP(e.finished_at)})})]},`${e.run_type}-${e.run_id}`)})})]})})}function Dr({detailTab:e,onDetailTabChange:t,run:n}){return n?(0,b.jsxs)("section",{className:"run-detail",children:[(0,b.jsxs)("section",{className:"run-header-card",children:[(0,b.jsxs)("div",{className:"run-overview",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h1",{children:n.title}),(0,b.jsxs)("p",{children:[CM(n.run_type),n.preparation?` / ${n.preparation}`:""]})]}),(0,b.jsx)("div",{className:"run-action-row",children:(0,b.jsx)(D5,{status:n.status,duration:CZ(n.started_at,n.finished_at)})})]}),(0,b.jsxs)("div",{className:"run-metadata",children:[(0,b.jsx)(D9,{label:"Status",value:CL(n.status)}),(0,b.jsx)(D9,{label:"Duration",value:CZ(n.started_at,n.finished_at)}),(0,b.jsx)(D9,{label:"Executor",value:CH(n.executor,n.agent_label)}),(0,b.jsx)(D9,{label:"Run ID",value:n.run_id,monospace:!0}),(0,b.jsx)(D9,{label:"Queued",value:CP(n.created_at)}),(0,b.jsx)(D9,{label:"Started",value:CP(n.started_at)}),(0,b.jsx)(D9,{label:"Completed",value:CP(n.finished_at)})]}),(0,b.jsx)(Di,{run:n})]}),(0,b.jsx)(Da,{activeTab:e,onChange:t}),"trace"===e?(0,b.jsx)(Dc,{run:n}):null,"events"===e?(0,b.jsx)(Dm,{run:n}):null,"readiness"===e?(0,b.jsx)(Df,{run:n}):null]}):(0,b.jsxs)("section",{className:"run-detail empty-detail",children:[(0,b.jsx)("strong",{children:"No run selected"}),(0,b.jsx)("span",{children:"The local service has no visible run resources yet."})]})}function Di({run:e}){let t=[e.preparation?{label:"Preparation",value:e.preparation}:null,e.method?{label:"Method",value:e.method}:null,{detail:e.readiness?.summary,label:"Readiness",value:CK(e)},{label:"Proof checks",value:CG(e.proof)},{label:"Artifacts",value:CS.format(e.artifacts.length)}].filter(e=>null!==e);return(0,b.jsxs)("div",{className:"run-context-panel",children:[(0,b.jsxs)("div",{className:"run-context-copy",children:[(0,b.jsx)("span",{children:"Interf context"}),(0,b.jsx)("p",{children:"compile"===e.run_type?"Runs the selected Method against the source folder and writes the current portable context.":"test"===e.run_type?"Runs readiness checks so the Preparation can show whether the portable context is ready for agent work.":"method-authoring"===e.run_type?"Drafts or updates a Method: the stages, outputs, and proof Interf should use for this Preparation.":"method-improvement"===e.run_type?"Improves a Method using previous run evidence, artifacts, and readiness gaps.":"readiness-check-draft"===e.run_type?"Drafts readiness checks that define what evidence should show the data is ready.":"preparation-setup"===e.run_type?"Creates the Preparation scaffold for a source folder and agent-work intent.":"Tracks local-agent execution through the same visible run surface."}),CY(e)?(0,b.jsx)("p",{className:"failure-text",children:CY(e)}):null]}),(0,b.jsx)("div",{className:"metric-grid run-context-metrics",children:t.map(e=>(0,_.createElement)(D8,{...e.detail?{detail:e.detail}:{},key:`${e.label}-${e.value}`,label:e.label,value:e.value}))})]})}function Da({activeTab:e,onChange:t}){return(0,b.jsx)("nav",{className:"detail-tabs","aria-label":"Run detail views",children:[{value:"trace",label:"Trace"},{value:"events",label:"Events"},{value:"readiness",label:"Readiness"}].map(n=>(0,b.jsx)("button",{"aria-pressed":e===n.value,className:e===n.value?"active":"",onClick:()=>t(n.value),type:"button",children:n.label},n.value))})}function Do(e,t){return"failed"===e||"cancelled"===e?"#ef4444":"running"===e?"#60a5fa":"succeeded"===e||"completed"===e?"#43d08a":"start"===t||"end"===t?"#60a5fa":"#737373"}function Ds({detail:e,label:t,metric:n}){return(0,b.jsxs)("div",{className:"flow-node-label",children:[(0,b.jsx)("strong",{children:t}),e?(0,b.jsx)("span",{children:e}):null,n?(0,b.jsx)("em",{children:n}):null]})}function Dl({compileRun:e,packagePath:t,serviceUrl:n,method:r}){let[i,a]=(0,_.useState)(null),{nodes:o,edges:s}=(0,_.useMemo)(()=>{let t,n,a,o,s,l;return t=new Map((e?.stages??[]).map(e=>[e.stage_id,e.status])),n=[],a=[],o=(e,t)=>{let n=Do(e,t);return{width:420,minHeight:84,border:`1px solid ${n}`,borderRadius:10,background:"stage"===t?"#111111":"#13233a",color:"#f2f2f2",boxShadow:`0 0 0 1px color-mix(in srgb, ${n} 26%, transparent), 0 18px 36px rgb(0 0 0 / 30%)`}},s={boxShadow:"0 0 0 2px rgb(255 255 255 / 76%), 0 24px 46px rgb(0 0 0 / 42%)"},n.push({id:"start",position:{x:420,y:40},data:{label:(0,b.jsx)(Ds,{detail:r.label??r.id,label:"Start"})},style:{...o(e?"succeeded":"idle","start"),..."start"===i?s:{}}}),l="start",r.stages.forEach((e,u)=>{let d=t.get(e.id)??"idle",c=`stage:${e.id}`;n.push({id:c,position:{x:420,y:40+(u+1)*190},data:{label:(0,b.jsx)(Ds,{detail:`${e.contract_type} / ${u+1} of ${r.stages.length}`,label:e.label,metric:`reads ${e.reads.length} / writes ${e.writes.length}`})},style:{...o(d,"stage"),...i===c?s:{}}}),a.push({id:`${l}->${c}`,source:l,target:c,animated:"running"===d,type:"smoothstep",style:{stroke:Do(d,"stage"),strokeWidth:2}}),l=c}),n.push({id:"end",position:{x:420,y:40+(r.stages.length+1)*190},data:{label:(0,b.jsx)(Ds,{detail:e?.portable_context_path??"portable context output",label:"Portable Context"})},style:{...o(e?.status??"idle","end"),..."end"===i?s:{}}}),a.push({id:`${l}->end`,source:l,target:"end",animated:e?.status==="running",type:"smoothstep",style:{stroke:Do(e?.status??"idle","end"),strokeWidth:2}}),{nodes:n,edges:a}},[e,i,r]),l=i?.startsWith("stage:")?i.slice(6):null,u=l?r.stages.find(e=>e.id===l)??null:null,d=l?e?.stages.find(e=>e.stage_id===l)??null:null;return(0,b.jsxs)("div",{className:"method-graph-layout has-inspector",children:[(0,b.jsx)("div",{className:"method-flow-canvas",children:(0,b.jsxs)(TQ,{colorMode:"dark",edges:s,fitView:!0,fitViewOptions:{padding:.28},maxZoom:1.6,minZoom:.25,nodes:o,nodesDraggable:!1,onNodeClick:(e,t)=>a(t.id),onPaneClick:()=>a(null),proOptions:{hideAttribution:!0},children:[(0,b.jsx)(T5,{color:"#5a5a5a",gap:28,size:1}),(0,b.jsx)(Ci,{}),(0,b.jsx)(Cf,{nodeColor:e=>String(e.style?.border??"#737373").includes("#43d08a")?"#43d08a":String(e.style?.border??"#737373").includes("#60a5fa")?"#60a5fa":"#737373",pannable:!0,zoomable:!0}),(0,b.jsxs)(Oo,{className:"method-flow-legend",position:"top-left",children:[(0,b.jsxs)("span",{children:[(0,b.jsx)("i",{className:"legend-dot start"}),"Start / End"]}),(0,b.jsxs)("span",{children:[(0,b.jsx)("i",{className:"legend-dot stage"}),"Stage contract"]}),(0,b.jsxs)("span",{children:[(0,b.jsx)("i",{className:"legend-line"}),"Sequential"]})]})]})}),u?(0,b.jsxs)("aside",{className:"method-stage-inspector","aria-label":`${u.label} stage detail`,children:[(0,b.jsx)("button",{className:"close-button",onClick:()=>a(null),type:"button",children:"Show package"}),(0,b.jsx)("span",{className:"eyebrow",children:"Stage detail"}),(0,b.jsx)("h2",{children:u.label}),(0,b.jsx)("p",{children:u.description??"Method stage."}),(0,b.jsxs)("div",{className:"stage-drawer-meta",children:[(0,b.jsx)(D9,{label:"Status",value:d?CL(d.status):"not run"}),(0,b.jsx)(D9,{label:"Contract",value:u.contract_type}),(0,b.jsx)(D9,{label:"Reads",value:u.reads.length?u.reads.join(", "):"-"}),(0,b.jsx)(D9,{label:"Writes",value:u.writes.length?u.writes.join(", "):"-"})]}),(0,b.jsxs)("div",{className:"stage-drawer-section",children:[(0,b.jsx)("h3",{children:"Stage skill"}),(0,b.jsx)(Dd,{detail:`compile/stages/${u.skill_dir}/SKILL.md`,icon:"file",label:"SKILL.md",path:CW(t,`compile/stages/${u.skill_dir}/SKILL.md`),serviceUrl:n})]}),(0,b.jsxs)("div",{className:"stage-drawer-section",children:[(0,b.jsx)("h3",{children:"Acceptance criteria"}),(0,b.jsx)("p",{children:D_(u.acceptance)})]}),d?.summary?(0,b.jsxs)("div",{className:"stage-drawer-section",children:[(0,b.jsx)("h3",{children:"Latest run summary"}),(0,b.jsx)("p",{children:d.summary})]}):null,d?.failure?(0,b.jsxs)("div",{className:"stage-drawer-section failure-text",children:[(0,b.jsx)("h3",{children:"Failure"}),(0,b.jsx)("p",{children:d.failure})]}):null]}):(0,b.jsx)(Du,{compileRun:e,onSelectStage:e=>a(`stage:${e}`),packagePath:t,serviceUrl:n,method:r})]})}function Du({compileRun:e,onSelectStage:t,packagePath:n,serviceUrl:r,method:i}){return(0,b.jsxs)("aside",{className:"method-stage-inspector method-package-inspector","aria-label":`${i.id} Method package`,children:[(0,b.jsx)("span",{className:"eyebrow",children:"Method package"}),(0,b.jsx)("h2",{children:i.label??i.id}),(0,b.jsx)("p",{children:i.hint??"Local Method package for preparing portable context."}),(0,b.jsxs)("div",{className:"stage-drawer-meta",children:[(0,b.jsx)(D9,{label:"Status",value:CL(e?.status??"idle")}),(0,b.jsx)(D9,{label:"Stages",value:CS.format(i.stages.length)}),(0,b.jsx)(D9,{label:"Package",value:i.source_kind}),(0,b.jsx)(D9,{label:"Run",value:e?.run_id?CB(e.run_id):"not built"})]}),(0,b.jsxs)("div",{className:"stage-drawer-section",children:[(0,b.jsx)("h3",{children:"Stage skills"}),(0,b.jsx)("div",{className:"method-file-tree",children:i.stages.map(e=>(0,b.jsx)(Dd,{detail:`compile/stages/${e.skill_dir}/SKILL.md`,icon:"folder",label:e.label,onSelect:()=>t(e.id),path:CW(n,`compile/stages/${e.skill_dir}/SKILL.md`),serviceUrl:r},e.id))})]}),(0,b.jsxs)("div",{className:"stage-drawer-section",children:[(0,b.jsx)("h3",{children:"Package contract"}),(0,b.jsxs)("div",{className:"method-file-tree",children:[(0,b.jsx)(Dd,{detail:"method.json",icon:"file",label:"method.json",path:CW(n,"method.json"),serviceUrl:r}),(0,b.jsx)(Dd,{detail:"method.schema.json",icon:"file",label:"method.schema.json",path:CW(n,"method.schema.json"),serviceUrl:r}),(0,b.jsx)(Dd,{detail:"improve/SKILL.md",icon:"file",label:"improve/SKILL.md",path:CW(n,"improve/SKILL.md"),serviceUrl:r}),(0,b.jsx)(Dd,{detail:"use/query/SKILL.md",icon:"file",label:"use/query/SKILL.md",path:CW(n,"use/query/SKILL.md"),serviceUrl:r})]})]})]})}function Dd({detail:e,icon:t,label:n,onSelect:r,path:i,serviceUrl:a}){let o=(0,b.jsxs)(b.Fragment,{children:["folder"===t?(0,b.jsx)(Cx,{size:15}):(0,b.jsx)(Cv,{size:15}),(0,b.jsxs)("div",{children:[(0,b.jsx)("strong",{children:n}),(0,b.jsx)("span",{children:e})]})]});return(0,b.jsxs)("div",{className:"method-file-row",children:[r?(0,b.jsx)("button",{className:"method-file-main",onClick:r,type:"button",children:o}):(0,b.jsx)("div",{className:"method-file-main",children:o}),(0,b.jsx)(D6,{path:i,serviceUrl:a,label:"Open",variant:"compact"})]})}function Dc({run:e}){let t=(0,_.useMemo)(()=>CX(e.trace.run),[e.trace.run]),n=(0,_.useMemo)(()=>{var t;return CQ((t=e.trace.events).filter(e=>{if("step_started"!==e.eventType||!e.correlationId)return!0;let n=Date.parse(e.createdAt);return t.some(t=>t.correlationId===e.correlationId&&("step_completed"===t.eventType||"step_failed"===t.eventType)&&Date.parse(t.createdAt)>=n)}))},[e.trace.events]);return(0,b.jsx)("div",{className:"method-trace-frame",children:(0,b.jsx)(g6,{events:n,run:t})})}function Dm({run:e}){let t=(0,_.useMemo)(()=>CX(e.trace.run),[e.trace.run]),n=(0,_.useMemo)(()=>CQ(e.trace.events),[e.trace.events]);return(0,b.jsx)("div",{className:"method-events-frame",children:(0,b.jsx)(pV,{events:n,onLoadEventData:async e=>"eventData"in e?e.eventData??null:null,run:t})})}function Df({run:e}){let t=e.readiness??null,n=t?.checks??[];return(0,b.jsxs)("div",{className:"detail-panel run-readiness-frame",children:[(0,b.jsx)(D7,{title:"Readiness",detail:t?.summary??"No readiness evidence was recorded for this run."}),(0,b.jsxs)("div",{className:"metric-grid run-readiness-metrics",children:[(0,b.jsx)(D8,{label:"Status",value:CK(e)}),(0,b.jsx)(D8,{label:"Configured checks",value:t?CS.format(t.check_results.configured):"-"}),(0,b.jsx)(D8,{label:"Source files",value:Cq(t?.check_results.source_files)}),(0,b.jsx)(D8,{label:"Portable Context",value:Cq(t?.check_results.portable_context)}),(0,b.jsx)(D8,{label:"Proof checks",value:CG(e.proof)})]}),n.length>0?(0,b.jsxs)("section",{className:"readiness-check-section",children:[(0,b.jsx)(D7,{title:"Readiness checks",detail:`${n.filter(e=>e.ok).length}/${n.length} passing`}),(0,b.jsx)("div",{className:"check-stack",children:n.map(e=>(0,b.jsxs)("article",{children:[(0,b.jsx)("span",{className:e.ok?"status-ok":"status-fail",children:e.ok?"Pass":"Review"}),(0,b.jsxs)("p",{children:[e.summary,e.detail?` - ${e.detail}`:""]})]},`${e.gate}-${e.summary}`))})]}):(0,b.jsx)(Dp,{title:"No readiness checks recorded",detail:"Run a readiness check to see data-level gates for this run."}),e.proof.length>0?(0,b.jsxs)("details",{className:"proof-disclosure",open:!t?.ready,children:[(0,b.jsxs)("summary",{children:[(0,b.jsx)("span",{children:"Run proof"}),(0,b.jsxs)("strong",{children:[CG(e.proof)," checks"]})]}),(0,b.jsx)(Ue,{checks:e.proof})]}):null]})}function Dp({detail:e,title:t}){return(0,b.jsxs)("div",{className:"empty-state",children:[(0,b.jsx)("strong",{children:t}),(0,b.jsx)("span",{children:e})]})}function Dh({compileRun:e,data:t,detailTab:n,onCloseMethod:r,onDetailTabChange:i,onOpenRunPage:a,onPromptAction:o,onSelectMethod:s,selectedMethod:l,serviceUrl:u}){let d=t.preparation_resources[0]?.preparation.name??"",c=e=>e.active_for_preparations[0]??d;return l?(0,b.jsx)(Dg,{activeTab:n,compileRun:e,data:t,onBack:r,onOpenRunPage:e=>a(l.id,e),onPromptAction:e=>o({preparation:c(l),message:e}),onTabChange:i,serviceUrl:u,method:l}):(0,b.jsxs)("section",{className:"method-list-layout",children:[(0,b.jsxs)("div",{className:"page-head",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h1",{children:"Methods"}),(0,b.jsx)("p",{children:"Reusable file-processing Methods for preparing source folders."})]}),(0,b.jsx)(D0,{preparation:d,label:"Create Method",form:DY({defaultPreparation:d,methods:t.method_packages}),message:`Create a new Interf Method${d?` for ${d}`:""}.
82
+ Interf Workspace: ${r}`:`Interf Workspace: ${r}`;return(0,_.useEffect)(()=>{let e=document.documentElement,n=window.matchMedia("(prefers-color-scheme: dark)"),r=()=>{let r="dark"===t||"system"===t&&n.matches;e.classList.toggle("dark",r),e.classList.toggle("light",!r)};return window.localStorage.setItem("interf-compiler-theme",t),r(),n.addEventListener("change",r),()=>n.removeEventListener("change",r)},[t]),(0,b.jsxs)("header",{className:"top-nav",children:[(0,b.jsxs)("div",{className:"brand-row",children:[(0,b.jsx)("a",{className:"brand-link",href:"/","aria-label":"Open Interf Compiler",children:(0,b.jsx)("span",{children:"Interf Compiler"})}),(0,b.jsx)("span",{className:"nav-divider"}),(0,b.jsx)(D5,{className:"local-path",disabled:!i,displayPath:r,label:"Workspace",path:i,serviceUrl:o,title:l})]}),(0,b.jsxs)("div",{className:"nav-actions",children:[(0,b.jsxs)("a",{className:`health-link ${"online"===e.status?"status-ok":"loading"===e.status?"status-wait":"status-fail"}`,href:`${o}/health`,target:"_blank",rel:"noreferrer",title:"Open local service health response",children:[(0,b.jsx)("span",{className:"status-dot"}),(0,b.jsx)("span",{children:s})]}),(0,b.jsxs)("div",{className:"theme-switcher","aria-label":"Theme",children:[(0,b.jsx)("button",{"aria-pressed":"system"===t,className:"system"===t?"active":"",onClick:()=>n("system"),title:"Use system theme",type:"button",children:(0,b.jsx)(Cb,{size:16})}),(0,b.jsx)("button",{"aria-pressed":"light"===t,className:"light"===t?"active":"",onClick:()=>n("light"),title:"Use light theme",type:"button",children:(0,b.jsx)(Cw,{size:16})}),(0,b.jsx)("button",{"aria-pressed":"dark"===t,className:"dark"===t?"active":"",onClick:()=>n("dark"),title:"Use dark theme",type:"button",children:(0,b.jsx)(C_,{size:16})})]}),(0,b.jsxs)("a",{className:"docs-link",href:"https://www.npmjs.com/package/@interf/compiler",target:"_blank",rel:"noreferrer",children:["Docs",(0,b.jsx)(Ch,{size:15})]})]})]})}function C6({activeTab:e,onChange:t}){return(0,b.jsx)("nav",{className:"segmented-tabs","aria-label":"Interf sections",children:[{value:"source",label:"Source Folder"},{value:"workspaces",label:"Preparations"},{value:"methods",label:"Methods"},{value:"runs",label:"Runs"}].map(n=>(0,b.jsx)("button",{"aria-pressed":e===n.value,className:e===n.value?"active":"",onClick:()=>t(n.value),type:"button",children:n.label},n.value))})}function C2(e,t,n,r={}){var i;let a="string"==typeof(i=n)?i.trim()||null:"number"==typeof i||"boolean"==typeof i?String(i):null;a&&e.push({label:t,value:a,...r.mono?{mono:!0}:{}})}function C5(e){let t=[];if("clarification"===e.action_type){let n=e.request.values;return n&&"object"==typeof n&&!Array.isArray(n)&&C2(t,"Attached fields",Object.keys(n).join(", ")),t}return"preparation-setup"===e.action_type?(C2(t,"Preparation",e.request.preparation.name),C2(t,"Source Folder",e.request.preparation.path,{mono:!0}),C2(t,"Method",e.request.preparation.method,{mono:!0}),C2(t,"Agent work",e.request.preparation.about)):"compile"===e.action_type?(C2(t,"Preparation",e.request.preparation),C2(t,"Method",e.request.method,{mono:!0})):"test"===e.action_type?(C2(t,"Preparation",e.request.preparation),C2(t,"Target",e.request.mode)):"readiness-check-draft"===e.action_type?(C2(t,"Preparation",e.request.preparation),C2(t,"Source Folder",e.request.source_folder_path,{mono:!0}),C2(t,"Checks",e.request.target_count),C2(t,"About",e.request.about)):(C2(t,"Preparation",e.request.preparation),C2(t,"Method",e.request.method_id,{mono:!0}),C2(t,"Label",e.request.label),C2(t,"Summary",e.request.hint),C2(t,"Agent work",e.request.task_prompt),e.request.checks?.length&&C2(t,"Readiness checks",e.request.checks.length)),t}function C3({controlPath:e,data:t,draft:n,onDraftConsumed:r,onRefresh:i,onOpenChange:a,onRunSubmitted:o,open:s,serviceUrl:l,sourceFolderPath:u}){var d;let[c,m]=(0,_.useState)(""),[f,p]=(0,_.useState)(null),[h,g]=(0,_.useState)(()=>t.preparation_resources[0]?.preparation.name??""),[v,x]=(0,_.useState)(!1),[y,$]=(0,_.useState)(null),[w,k]=(0,_.useState)(null),[S,I]=(0,_.useState)(null),j=(0,_.useRef)(null),N=(0,_.useRef)(null),z=(0,_.useMemo)(()=>DI(t),[t]),E=(0,_.useMemo)(()=>[...t.action_proposals.slice(0,8)].reverse(),[t.action_proposals]),O=h||t.preparation_resources[0]?.preparation.name||"",T=t.action_proposals.filter(e=>"awaiting_approval"===e.status).length,C=t.executor.executor?.name??t.executor.available_executors.find(e=>e.current)?.name??"",D=C||t.executor.available_executors[0]?.name||"",U=t.executor.available_executors.find(e=>e.name===D)?.display_name??t.executor.executor?.display_name??"No local agent",P=v?"submitted":y?"error":"ready",Z=u??e,A=z.find(e=>e.name===O)??z[0]??null,R=!!A&&DN(A),L=!!A&&Dz(A),M=!!A&&DN(d=A)&&Dz(d),F=M&&!!A?.testRun;(0,_.useEffect)(()=>{O&&!t.preparation_resources.some(e=>e.preparation.name===O)&&g(t.preparation_resources[0]?.preparation.name??"")},[t.preparation_resources,O]),(0,_.useEffect)(()=>{n&&(g(n.preparation),m(n.message),p(n.values??null),a(!0),r(),window.requestAnimationFrame(()=>N.current?.focus()))},[n,r,a]),(0,_.useEffect)(()=>{j.current?.scrollTo({top:j.current.scrollHeight,behavior:"smooth"})},[E.length,w?.id,s]);let B=async(e=c,t=f)=>{let n=e.trim();if(n){k({id:`pending-${Date.now()}`,createdAt:new Date().toISOString(),preparation:O||"No Preparation",message:n,...t?{values:t}:{}}),m(""),x(!0),$(null);try{await CE(l,"/v1/action-proposals",{message:n,...O?{preparation:O}:{},...t?{values:t}:{}}),p(null),k(null),i()}catch(e){k(null),m(n),$(e instanceof Error?e.message:String(e))}finally{x(!1)}}},W=async(e,t)=>{x(!0),$(null);try{let n=await CE(l,`/v1/action-proposals/${encodeURIComponent(e)}/decision`,{approved:t});t&&n.submitted_run_id?o(n.submitted_run_id):i()}catch(e){$(e instanceof Error?e.message:String(e))}finally{x(!1)}},H=async e=>{if(e&&e!==C){x(!0),$(null);try{await CE(l,"/v1/executor",{agent:e}),i()}catch(e){$(e instanceof Error?e.message:String(e))}finally{x(!1)}}},V=(e,t=O)=>{g(t),m(e),p(null),window.requestAnimationFrame(()=>N.current?.focus())},J=()=>{I(DY({defaultPreparation:O,methods:t.method_packages}))};return(0,b.jsxs)(b.Fragment,{children:[s?(0,b.jsxs)("aside",{className:"agent-chat-panel","aria-label":"Local agent chat",children:[(0,b.jsxs)("div",{className:"agent-panel-head",children:[(0,b.jsxs)("div",{className:"agent-title",children:[(0,b.jsx)(Cg,{size:18}),(0,b.jsxs)("div",{className:"agent-title-copy",children:[(0,b.jsx)("h2",{children:"Local Agent"}),(0,b.jsxs)("span",{className:"agent-status-label",children:[(0,b.jsx)("span",{className:`agent-status-dot ${"connected"===t.executor.status?"status-ok":"status-fail"}`,"aria-hidden":"true"}),"connected"===t.executor.status?"Connected":"Unavailable",(0,b.jsx)("span",{"aria-hidden":"true",children:"·"}),(0,b.jsx)("span",{children:U})]})]})]}),(0,b.jsxs)("div",{className:"agent-head-actions",children:[T>0?(0,b.jsxs)("span",{className:"agent-review-pill",children:["Review ",T]}):null,(0,b.jsx)("button",{"aria-label":"Close local agent chat",className:"agent-collapse-button",onClick:()=>a(!1),type:"button",children:(0,b.jsx)(pG,{size:16})})]})]}),(0,b.jsxs)("div",{className:"chat-transcript","aria-busy":"submitted"===P,"aria-live":"polite",ref:j,children:[(0,b.jsx)("div",{className:"chat-message assistant",children:(0,b.jsx)("p",{children:O?M?"What should Interf do next? I can prepare, check readiness, improve, or draft a Method for approval.":R?"Portable context exists. Add readiness checks before asking Interf to check whether it is ready.":"Prepare this Source Folder first. After portable context exists, Interf can check readiness or improve it.":"Choose a Source Folder and describe the agent work. I will prepare an approval proposal before anything runs."})}),E.map(e=>{var t,n,r,i,a,s;let l,u;return(0,b.jsxs)("div",{className:`chat-turn ${"awaiting_approval"===e.status?"active":"historical"}`,children:[(0,b.jsx)("div",{className:"chat-message user",children:(0,b.jsx)("p",{children:e.message})}),(0,b.jsxs)("div",{className:"chat-message assistant",children:[(0,b.jsx)("p",{children:(t=e.assistant_message,(u=(l=t?.trim())?l.includes('"command_preview"')||l.includes('"expected"')||l.includes("invalid_type")||l.includes("Invalid input: expected string")||l.includes("Too small: expected string")||l.includes("expected string to have")?CI:l:null)&&"awaiting_approval"===e.status?u:"needs_clarification"===e.status?u??CI:"submitted"===e.status?e.submitted_run_id?`${e.summary} Submitted as visible run ${e.submitted_run_id}.`:`${e.summary} Submitted as a visible run.`:"denied"===e.status?`${e.summary} Denied.`:"failed"===e.status?`${e.summary} Failed before submission.`:`${e.summary} Approve to submit this through the local Interf service.`)}),"clarification"!==e.action_type?(0,b.jsxs)("article",{className:`proposal-card compact ${"awaiting_approval"===e.status?"actionable":"historical"}`,children:[(0,b.jsxs)("div",{className:"proposal-title-row",children:[(0,b.jsx)("strong",{children:e.title}),(0,b.jsx)(D9,{label:"needs_clarification"===(n=e.status)?"Needs details":"awaiting_approval"===n?"Needs approval":"submitted"===n?"Submitted":"approved"===n?"Approved":"denied"===n?"Denied":"Failed",tone:"submitted"===(r=e.status)||"approved"===r?"status-ok":"failed"===r||"denied"===r?"status-fail":"needs_clarification"===r?"status-idle":"status-wait"})]}),(0,b.jsxs)("div",{className:"proposal-meta",children:[(0,b.jsx)("span",{children:"preparation-setup"===(a=e).action_type&&a.request.prepare_after_setup?"Prepare":"clarification"===(s=a.action_type)?"Clarify":"preparation-setup"===s?"Set up Preparation":"compile"===s?"Prepare":"test"===s?"Check readiness":"readiness-check-draft"===s?"Improve":"Draft Method"}),(0,b.jsx)("span",{children:e.preparation??"no Preparation"}),(0,b.jsx)("span",{children:CP(e.created_at)})]}),C5(e).length>0?(0,b.jsx)("dl",{className:"proposal-detail-grid",children:C5(e).map(t=>(0,b.jsxs)("div",{children:[(0,b.jsx)("dt",{children:t.label}),(0,b.jsx)("dd",{className:t.mono?"mono":"",children:t.value})]},`${e.proposal_id}-${t.label}`))}):null,(0,b.jsxs)("div",{className:"command-preview",children:[(0,b.jsx)("span",{children:"CLI preview"}),(0,b.jsx)("code",{children:e.command_preview?e.command_preview:"No CLI preview returned."})]}),e.submitted_run_id?(0,b.jsxs)("button",{className:"proposal-run-link",onClick:()=>o(e.submitted_run_id),type:"button",children:[(0,b.jsx)(Ch,{size:14}),"Open ","compile-run"===(i=e.submitted_run_type)?"prepare run":"test-run"===i?"check run":"job-run"===i?"agent run":"run"]}):null,"awaiting_approval"===e.status?(0,b.jsxs)("div",{className:"proposal-actions",children:[(0,b.jsxs)("button",{disabled:v,type:"button",onClick:()=>void W(e.proposal_id,!1),children:[(0,b.jsx)(pG,{size:14}),"Deny"]}),(0,b.jsxs)("button",{disabled:v,type:"button",onClick:()=>void W(e.proposal_id,!0),children:[(0,b.jsx)(uC,{size:14}),"Approve"]})]}):null,e.error?(0,b.jsx)("p",{className:"agent-error",children:e.error}):null,"failed"===e.status?(0,b.jsxs)("details",{className:"payload-details",children:[(0,b.jsx)("summary",{children:"Request payload"}),(0,b.jsx)(pp,{data:e.request,expandLevel:0})]}):null]}):null]})]},e.proposal_id)}),w?(0,b.jsxs)("div",{className:"chat-turn active pending",children:[(0,b.jsx)("div",{className:"chat-message user",children:(0,b.jsx)("p",{children:w.message})}),(0,b.jsx)("div",{className:"chat-message assistant",children:(0,b.jsxs)("p",{className:"planning-copy",children:[(0,b.jsx)(Cy,{className:"spin",size:14}),U," is preparing an approval proposal."]})})]},w.id):null]}),(0,b.jsxs)("div",{className:"agent-suggestions","aria-label":"Suggested Interf actions",children:[0===t.preparation_resources.length?(0,b.jsx)("button",{type:"button",onClick:()=>{I(Dq({controlPath:Z,preparationViews:z,methods:t.method_packages}))},children:"Prepare Source Folder"}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("button",{type:"button",onClick:()=>V(CF(O)),children:"Prepare"}),M?(0,b.jsx)("button",{type:"button",onClick:()=>V(`Check readiness for ${O}.`),children:"Check readiness"}):null,F?(0,b.jsx)("button",{type:"button",onClick:()=>V(`Improve ${O} using the latest readiness evidence.`),children:"Improve"}):null,R&&!L?(0,b.jsx)("button",{type:"button",onClick:()=>V(`Draft readiness checks for ${O}.`),children:"Draft checks"}):null,(0,b.jsx)("button",{type:"button",onClick:()=>{A?I(DX(A,t.method_packages)):J()},children:"Draft Method"})]}),(0,b.jsx)("button",{type:"button",onClick:J,children:"Create Method"})]}),(0,b.jsxs)("form",{className:"agent-compose",onSubmit:e=>{e.preventDefault(),B()},children:[f?(0,b.jsxs)("div",{className:"agent-attached-values",children:[(0,b.jsx)("span",{children:"Form values attached"}),(0,b.jsx)("button",{disabled:v,onClick:()=>p(null),type:"button",children:"Clear"})]}):null,(0,b.jsxs)("div",{className:"agent-input-shell",children:[(0,b.jsx)("textarea",{"aria-label":"Tell the local agent what Interf should do",disabled:v,onChange:e=>m(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||e.nativeEvent.isComposing||(e.preventDefault(),B())},placeholder:O?"Ask Interf to prepare, check, improve, or draft a Method...":"Ask Interf to set up a Source Folder for agent work...",ref:N,value:c}),(0,b.jsxs)("div",{className:"agent-compose-footer",children:[(0,b.jsxs)("label",{className:"agent-executor-switcher",children:[(0,b.jsx)(Cg,{size:14}),(0,b.jsxs)("select",{"aria-label":"Local agent executor",disabled:v||0===t.executor.available_executors.length,value:D,onChange:e=>void H(e.target.value),children:[0===t.executor.available_executors.length?(0,b.jsx)("option",{value:"",children:"No agent"}):null,t.executor.available_executors.map(e=>(0,b.jsx)("option",{value:e.name,children:e.display_name},e.name))]}),(0,b.jsx)(uD,{size:14,"aria-hidden":"true"})]}),(0,b.jsxs)("button",{className:"send-button",disabled:v||!c.trim(),type:"submit",children:[v?(0,b.jsx)(Cy,{className:"spin",size:15}):(0,b.jsx)(pJ,{size:15}),(0,b.jsx)("span",{children:v?"Planning":"Send"})]})]})]})]}),y?(0,b.jsx)("p",{className:"agent-error",children:y}):null]}):null,(0,b.jsxs)("button",{"aria-expanded":s,"aria-label":s?"Close local agent chat":"Open local agent chat",className:`agent-launcher ${s?"open":""}`,onClick:()=>a(!s),type:"button",children:[(0,b.jsx)(Cg,{size:21}),(0,b.jsx)("span",{className:`rail-status-dot ${"connected"===t.executor.status?"status-ok":"status-fail"}`})]}),S?(0,b.jsx)(DQ,{form:S,onClose:()=>I(null),onSubmit:e=>{I(null),g(e.preparation),m(e.message),p(e.values??null),a(!0),window.requestAnimationFrame(()=>N.current?.focus())}}):null]})}function C9({backLabel:e,detailTab:t,onBack:n,onDetailTabChange:r,run:i}){return(0,b.jsxs)("section",{className:"run-detail-page",children:[(0,b.jsxs)("div",{className:"breadcrumb-row",children:[(0,b.jsx)("button",{type:"button",onClick:n,children:e}),(0,b.jsx)("span",{children:"/"}),(0,b.jsx)("code",{children:i.run_id})]}),(0,b.jsx)(Dr,{detailTab:t,onDetailTabChange:r,run:i})]})}function C8({backLabel:e,onBack:t,runId:n}){return(0,b.jsxs)("section",{className:"run-detail empty-detail",children:[(0,b.jsx)("strong",{children:"Run not found"}),(0,b.jsx)("span",{children:"The local service does not have a visible run with this id."}),(0,b.jsx)("code",{children:n}),(0,b.jsxs)("button",{className:"toolbar-button",onClick:t,type:"button",children:["Back to ",e]})]})}function C7({runId:e}){return(0,b.jsxs)("section",{className:"run-detail empty-detail",children:[(0,b.jsx)(Cy,{className:"spin",size:22}),(0,b.jsx)("strong",{children:"Opening run"}),(0,b.jsx)("code",{children:e})]})}let De=[{value:"succeeded",label:"Completed"},{value:"failed",label:"Failed"},{value:"running",label:"Running"},{value:"queued",label:"Queued"},{value:"cancelled",label:"Cancelled"}];function Dt({onOpenRunPage:e,onRefresh:t,runs:n}){let[r,i]=(0,_.useState)("all"),[a,o]=(0,_.useState)("all"),[s,l]=(0,_.useState)(""),u=(0,_.useMemo)(()=>{let e=new Set;for(let t of n)e.add(t.run_type);return[...e].sort((e,t)=>CJ(e)-CJ(t))},[n]),d=(0,_.useMemo)(()=>{let e=s.trim().toLowerCase();return n.filter(t=>("all"===r||t.run_type===r)&&(!e||[t.title,t.run_id,t.preparation,t.method,t.run_type,t.status,t.agent_label].filter(Boolean).join(" ").toLowerCase().includes(e)))},[r,n,s]),c=(0,_.useMemo)(()=>"all"===a?d:d.filter(e=>e.status===a),[d,a]),m=(0,_.useMemo)(()=>{let e=new Map;for(let t of d)e.set(t.status,(e.get(t.status)??0)+1);return e},[d]);return(0,b.jsxs)("section",{className:"runs-view",children:[(0,b.jsxs)("div",{className:"page-head",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h1",{children:"Runs"}),(0,b.jsx)("p",{children:"Visible local executions for prepare runs, readiness checks, Method drafts, and local-agent actions."})]}),(0,b.jsxs)("div",{className:"runs-head-controls","aria-label":"Run filters",children:[(0,b.jsxs)("label",{className:"runs-search-field",children:[(0,b.jsx)("span",{children:"Search"}),(0,b.jsx)("input",{"aria-label":"Search runs",onChange:e=>l(e.target.value),placeholder:"Search runs...",type:"search",value:s})]}),(0,b.jsxs)("label",{children:[(0,b.jsx)("span",{children:"Type"}),(0,b.jsxs)("select",{value:r,onChange:e=>i(e.target.value),children:[(0,b.jsx)("option",{value:"all",children:"All run types"}),u.map(e=>(0,b.jsx)("option",{value:e,children:CM(e)},e))]})]}),(0,b.jsx)("button",{className:"toolbar-button",onClick:t,type:"button",children:"Refresh"})]})]}),(0,b.jsxs)("div",{className:"run-status-filter-row","aria-label":"Run status filters",children:[(0,b.jsxs)("button",{"aria-pressed":"all"===a,className:`run-status-filter ${"all"===a?"active":""}`,onClick:()=>o("all"),type:"button",children:[(0,b.jsx)("span",{className:"status-dot status-idle"}),(0,b.jsx)("strong",{children:"All"}),(0,b.jsx)("em",{children:CS.format(d.length)})]}),De.map(e=>(0,b.jsxs)("button",{"aria-pressed":a===e.value,className:`run-status-filter ${a===e.value?"active":""}`,onClick:()=>o(e.value),type:"button",children:[(0,b.jsx)("span",{className:`status-dot ${CR(e.value)}`}),(0,b.jsx)("strong",{children:e.label}),(0,b.jsx)("em",{children:CS.format(m.get(e.value)??0)})]},e.value))]}),(0,b.jsx)(Dn,{runs:c,onSelectRun:e})]})}function Dn({runs:e,onSelectRun:t}){return(0,b.jsx)("div",{className:"table-frame",children:(0,b.jsxs)("table",{className:"runs-table",children:[(0,b.jsx)("thead",{children:(0,b.jsxs)("tr",{children:[(0,b.jsx)("th",{children:"Run"}),(0,b.jsx)("th",{children:"Run ID"}),(0,b.jsx)("th",{children:"Status"}),(0,b.jsx)("th",{children:"Duration"}),(0,b.jsx)("th",{children:"Preparation"}),(0,b.jsx)("th",{children:"Method"}),(0,b.jsx)("th",{children:"Executor"}),(0,b.jsx)("th",{children:"Started"}),(0,b.jsx)("th",{children:"Completed"})]})}),(0,b.jsx)("tbody",{children:0===e.length?(0,b.jsx)("tr",{children:(0,b.jsx)("td",{colSpan:9,children:(0,b.jsxs)("div",{className:"empty-table",children:[(0,b.jsx)("strong",{children:"No runs found"}),(0,b.jsx)("span",{children:"Run `interf`, `interf compile`, or `interf test` while the local Interf service is open."})]})})}):e.map(e=>{let n=!!t;return(0,b.jsxs)("tr",{onClick:n?()=>t?.(e.run_id):void 0,onKeyDown:n?n=>{("Enter"===n.key||" "===n.key)&&t?.(e.run_id)}:void 0,role:n?"button":void 0,tabIndex:n?0:void 0,children:[(0,b.jsx)("td",{children:(0,b.jsxs)("div",{className:"run-name-cell",children:[(0,b.jsx)("strong",{children:e.title}),(0,b.jsxs)("span",{children:[CM(e.run_type),e.preparation?` / ${e.preparation}`:""]})]})}),(0,b.jsx)("td",{children:(0,b.jsx)("code",{children:e.run_id})}),(0,b.jsx)("td",{children:(0,b.jsx)(D3,{status:e.status})}),(0,b.jsx)("td",{children:(0,b.jsx)("span",{children:CZ(e.started_at,e.finished_at)})}),(0,b.jsx)("td",{children:(0,b.jsx)("span",{children:e.preparation??"-"})}),(0,b.jsx)("td",{children:(0,b.jsx)("span",{children:e.method??"-"})}),(0,b.jsx)("td",{children:CH(e.executor,e.agent_label)}),(0,b.jsx)("td",{children:(0,b.jsx)("time",{children:CP(e.started_at??e.created_at)})}),(0,b.jsx)("td",{children:(0,b.jsx)("time",{children:CP(e.finished_at)})})]},`${e.run_type}-${e.run_id}`)})})]})})}function Dr({detailTab:e,onDetailTabChange:t,run:n}){return n?(0,b.jsxs)("section",{className:"run-detail",children:[(0,b.jsxs)("section",{className:"run-header-card",children:[(0,b.jsxs)("div",{className:"run-overview",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h1",{children:n.title}),(0,b.jsxs)("p",{children:[CM(n.run_type),n.preparation?` / ${n.preparation}`:""]})]}),(0,b.jsx)("div",{className:"run-action-row",children:(0,b.jsx)(D3,{status:n.status,duration:CZ(n.started_at,n.finished_at)})})]}),(0,b.jsxs)("div",{className:"run-metadata",children:[(0,b.jsx)(D8,{label:"Status",value:CL(n.status)}),(0,b.jsx)(D8,{label:"Duration",value:CZ(n.started_at,n.finished_at)}),(0,b.jsx)(D8,{label:"Executor",value:CH(n.executor,n.agent_label)}),(0,b.jsx)(D8,{label:"Run ID",value:n.run_id,monospace:!0}),(0,b.jsx)(D8,{label:"Queued",value:CP(n.created_at)}),(0,b.jsx)(D8,{label:"Started",value:CP(n.started_at)}),(0,b.jsx)(D8,{label:"Completed",value:CP(n.finished_at)})]}),(0,b.jsx)(Di,{run:n})]}),(0,b.jsx)(Da,{activeTab:e,onChange:t}),"trace"===e?(0,b.jsx)(Dc,{run:n}):null,"events"===e?(0,b.jsx)(Dm,{run:n}):null,"readiness"===e?(0,b.jsx)(Df,{run:n}):null]}):(0,b.jsxs)("section",{className:"run-detail empty-detail",children:[(0,b.jsx)("strong",{children:"No run selected"}),(0,b.jsx)("span",{children:"The local service has no visible run resources yet."})]})}function Di({run:e}){let t=[e.preparation?{label:"Preparation",value:e.preparation}:null,e.method?{label:"Method",value:e.method}:null,{detail:e.readiness?.summary,label:"Readiness",value:CK(e)},{label:"Proof checks",value:CG(e.proof)},{label:"Artifacts",value:CS.format(e.artifacts.length)}].filter(e=>null!==e);return(0,b.jsxs)("div",{className:"run-context-panel",children:[(0,b.jsxs)("div",{className:"run-context-copy",children:[(0,b.jsx)("span",{children:"Interf context"}),(0,b.jsx)("p",{children:"compile"===e.run_type?"Runs the selected Method against the source folder and writes the current portable context.":"test"===e.run_type?"Runs readiness checks so the Preparation can show whether the portable context is ready for agent work.":"method-authoring"===e.run_type?"Drafts or updates a Method: the stages, outputs, and proof Interf should use for this Preparation.":"method-improvement"===e.run_type?"Improves a Method using previous run evidence, artifacts, and readiness gaps.":"readiness-check-draft"===e.run_type?"Drafts readiness checks that define what evidence should show the data is ready.":"preparation-setup"===e.run_type?"Creates the Preparation scaffold for a source folder and agent-work intent.":"Tracks local-agent execution through the same visible run surface."}),CY(e)?(0,b.jsx)("p",{className:"failure-text",children:CY(e)}):null]}),(0,b.jsx)("div",{className:"metric-grid run-context-metrics",children:t.map(e=>(0,_.createElement)(D7,{...e.detail?{detail:e.detail}:{},key:`${e.label}-${e.value}`,label:e.label,value:e.value}))})]})}function Da({activeTab:e,onChange:t}){return(0,b.jsx)("nav",{className:"detail-tabs","aria-label":"Run detail views",children:[{value:"trace",label:"Trace"},{value:"events",label:"Events"},{value:"readiness",label:"Readiness"}].map(n=>(0,b.jsx)("button",{"aria-pressed":e===n.value,className:e===n.value?"active":"",onClick:()=>t(n.value),type:"button",children:n.label},n.value))})}function Do(e,t){return"failed"===e||"cancelled"===e?"#ef4444":"running"===e?"#60a5fa":"succeeded"===e||"completed"===e?"#43d08a":"start"===t||"end"===t?"#60a5fa":"#737373"}function Ds({detail:e,label:t,metric:n}){return(0,b.jsxs)("div",{className:"flow-node-label",children:[(0,b.jsx)("strong",{children:t}),e?(0,b.jsx)("span",{children:e}):null,n?(0,b.jsx)("em",{children:n}):null]})}function Dl({compileRun:e,packagePath:t,serviceUrl:n,method:r}){let[i,a]=(0,_.useState)(null),{nodes:o,edges:s}=(0,_.useMemo)(()=>{let t,n,a,o,s,l;return t=new Map((e?.stages??[]).map(e=>[e.stage_id,e.status])),n=[],a=[],o=(e,t)=>{let n=Do(e,t);return{width:420,minHeight:84,border:`1px solid ${n}`,borderRadius:10,background:"stage"===t?"#111111":"#13233a",color:"#f2f2f2",boxShadow:`0 0 0 1px color-mix(in srgb, ${n} 26%, transparent), 0 18px 36px rgb(0 0 0 / 30%)`}},s={boxShadow:"0 0 0 2px rgb(255 255 255 / 76%), 0 24px 46px rgb(0 0 0 / 42%)"},n.push({id:"start",position:{x:420,y:40},data:{label:(0,b.jsx)(Ds,{detail:r.label??r.id,label:"Start"})},style:{...o(e?"succeeded":"idle","start"),..."start"===i?s:{}}}),l="start",r.stages.forEach((e,u)=>{let d=t.get(e.id)??"idle",c=`stage:${e.id}`;n.push({id:c,position:{x:420,y:40+(u+1)*190},data:{label:(0,b.jsx)(Ds,{detail:`${e.contract_type} / ${u+1} of ${r.stages.length}`,label:e.label,metric:`reads ${e.reads.length} / writes ${e.writes.length}`})},style:{...o(d,"stage"),...i===c?s:{}}}),a.push({id:`${l}->${c}`,source:l,target:c,animated:"running"===d,type:"smoothstep",style:{stroke:Do(d,"stage"),strokeWidth:2}}),l=c}),n.push({id:"end",position:{x:420,y:40+(r.stages.length+1)*190},data:{label:(0,b.jsx)(Ds,{detail:e?.portable_context_path??"portable context output",label:"Portable Context"})},style:{...o(e?.status??"idle","end"),..."end"===i?s:{}}}),a.push({id:`${l}->end`,source:l,target:"end",animated:e?.status==="running",type:"smoothstep",style:{stroke:Do(e?.status??"idle","end"),strokeWidth:2}}),{nodes:n,edges:a}},[e,i,r]),l=i?.startsWith("stage:")?i.slice(6):null,u=l?r.stages.find(e=>e.id===l)??null:null,d=l?e?.stages.find(e=>e.stage_id===l)??null:null;return(0,b.jsxs)("div",{className:"method-graph-layout has-inspector",children:[(0,b.jsx)("div",{className:"method-flow-canvas",children:(0,b.jsxs)(TQ,{colorMode:"dark",edges:s,fitView:!0,fitViewOptions:{padding:.28},maxZoom:1.6,minZoom:.25,nodes:o,nodesDraggable:!1,onNodeClick:(e,t)=>a(t.id),onPaneClick:()=>a(null),proOptions:{hideAttribution:!0},children:[(0,b.jsx)(T5,{color:"#5a5a5a",gap:28,size:1}),(0,b.jsx)(Ci,{}),(0,b.jsx)(Cf,{nodeColor:e=>String(e.style?.border??"#737373").includes("#43d08a")?"#43d08a":String(e.style?.border??"#737373").includes("#60a5fa")?"#60a5fa":"#737373",pannable:!0,zoomable:!0}),(0,b.jsxs)(Oo,{className:"method-flow-legend",position:"top-left",children:[(0,b.jsxs)("span",{children:[(0,b.jsx)("i",{className:"legend-dot start"}),"Start / End"]}),(0,b.jsxs)("span",{children:[(0,b.jsx)("i",{className:"legend-dot stage"}),"Stage contract"]}),(0,b.jsxs)("span",{children:[(0,b.jsx)("i",{className:"legend-line"}),"Sequential"]})]})]})}),u?(0,b.jsxs)("aside",{className:"method-stage-inspector","aria-label":`${u.label} stage detail`,children:[(0,b.jsx)("button",{className:"close-button",onClick:()=>a(null),type:"button",children:"Show package"}),(0,b.jsx)("span",{className:"eyebrow",children:"Stage detail"}),(0,b.jsx)("h2",{children:u.label}),(0,b.jsx)("p",{children:u.description??"Method stage."}),(0,b.jsxs)("div",{className:"stage-drawer-meta",children:[(0,b.jsx)(D8,{label:"Status",value:d?CL(d.status):"not run"}),(0,b.jsx)(D8,{label:"Contract",value:u.contract_type}),(0,b.jsx)(D8,{label:"Reads",value:u.reads.length?u.reads.join(", "):"-"}),(0,b.jsx)(D8,{label:"Writes",value:u.writes.length?u.writes.join(", "):"-"})]}),(0,b.jsxs)("div",{className:"stage-drawer-section",children:[(0,b.jsx)("h3",{children:"Stage skill"}),(0,b.jsx)(Dd,{detail:`compile/stages/${u.skill_dir}/SKILL.md`,icon:"file",label:"SKILL.md",path:CW(t,`compile/stages/${u.skill_dir}/SKILL.md`),serviceUrl:n})]}),(0,b.jsxs)("div",{className:"stage-drawer-section",children:[(0,b.jsx)("h3",{children:"Acceptance criteria"}),(0,b.jsx)("p",{children:D_(u.acceptance)})]}),d?.summary?(0,b.jsxs)("div",{className:"stage-drawer-section",children:[(0,b.jsx)("h3",{children:"Latest run summary"}),(0,b.jsx)("p",{children:d.summary})]}):null,d?.failure?(0,b.jsxs)("div",{className:"stage-drawer-section failure-text",children:[(0,b.jsx)("h3",{children:"Failure"}),(0,b.jsx)("p",{children:d.failure})]}):null]}):(0,b.jsx)(Du,{compileRun:e,onSelectStage:e=>a(`stage:${e}`),packagePath:t,serviceUrl:n,method:r})]})}function Du({compileRun:e,onSelectStage:t,packagePath:n,serviceUrl:r,method:i}){return(0,b.jsxs)("aside",{className:"method-stage-inspector method-package-inspector","aria-label":`${i.id} Method package`,children:[(0,b.jsx)("span",{className:"eyebrow",children:"Method package"}),(0,b.jsx)("h2",{children:i.label??i.id}),(0,b.jsx)("p",{children:i.hint??"Local Method package for preparing portable context."}),(0,b.jsxs)("div",{className:"stage-drawer-meta",children:[(0,b.jsx)(D8,{label:"Status",value:CL(e?.status??"idle")}),(0,b.jsx)(D8,{label:"Stages",value:CS.format(i.stages.length)}),(0,b.jsx)(D8,{label:"Package",value:i.source_kind}),(0,b.jsx)(D8,{label:"Run",value:e?.run_id?CB(e.run_id):"not built"})]}),(0,b.jsxs)("div",{className:"stage-drawer-section",children:[(0,b.jsx)("h3",{children:"Stage skills"}),(0,b.jsx)("div",{className:"method-file-tree",children:i.stages.map(e=>(0,b.jsx)(Dd,{detail:`compile/stages/${e.skill_dir}/SKILL.md`,icon:"folder",label:e.label,onSelect:()=>t(e.id),path:CW(n,`compile/stages/${e.skill_dir}/SKILL.md`),serviceUrl:r},e.id))})]}),(0,b.jsxs)("div",{className:"stage-drawer-section",children:[(0,b.jsx)("h3",{children:"Package contract"}),(0,b.jsxs)("div",{className:"method-file-tree",children:[(0,b.jsx)(Dd,{detail:"method.json",icon:"file",label:"method.json",path:CW(n,"method.json"),serviceUrl:r}),(0,b.jsx)(Dd,{detail:"method.schema.json",icon:"file",label:"method.schema.json",path:CW(n,"method.schema.json"),serviceUrl:r}),(0,b.jsx)(Dd,{detail:"improve/SKILL.md",icon:"file",label:"improve/SKILL.md",path:CW(n,"improve/SKILL.md"),serviceUrl:r}),(0,b.jsx)(Dd,{detail:"use/query/SKILL.md",icon:"file",label:"use/query/SKILL.md",path:CW(n,"use/query/SKILL.md"),serviceUrl:r})]})]})]})}function Dd({detail:e,icon:t,label:n,onSelect:r,path:i,serviceUrl:a}){let o=(0,b.jsxs)(b.Fragment,{children:["folder"===t?(0,b.jsx)(Cx,{size:15}):(0,b.jsx)(Cv,{size:15}),(0,b.jsxs)("div",{children:[(0,b.jsx)("strong",{children:n}),(0,b.jsx)("span",{children:e})]})]});return(0,b.jsxs)("div",{className:"method-file-row",children:[r?(0,b.jsx)("button",{className:"method-file-main",onClick:r,type:"button",children:o}):(0,b.jsx)("div",{className:"method-file-main",children:o}),(0,b.jsx)(D2,{path:i,serviceUrl:a,label:"Open",variant:"compact"})]})}function Dc({run:e}){let t=(0,_.useMemo)(()=>CX(e.trace.run),[e.trace.run]),n=(0,_.useMemo)(()=>{var t;return CQ((t=e.trace.events).filter(e=>{if("step_started"!==e.eventType||!e.correlationId)return!0;let n=Date.parse(e.createdAt);return t.some(t=>t.correlationId===e.correlationId&&("step_completed"===t.eventType||"step_failed"===t.eventType)&&Date.parse(t.createdAt)>=n)}))},[e.trace.events]);return(0,b.jsx)("div",{className:"method-trace-frame",children:(0,b.jsx)(g6,{events:n,run:t})})}function Dm({run:e}){let t=(0,_.useMemo)(()=>CX(e.trace.run),[e.trace.run]),n=(0,_.useMemo)(()=>CQ(e.trace.events),[e.trace.events]);return(0,b.jsx)("div",{className:"method-events-frame",children:(0,b.jsx)(pV,{events:n,onLoadEventData:async e=>"eventData"in e?e.eventData??null:null,run:t})})}function Df({run:e}){let t=e.readiness??null,n=t?.checks??[];return(0,b.jsxs)("div",{className:"detail-panel run-readiness-frame",children:[(0,b.jsx)(Ue,{title:"Readiness",detail:t?.summary??"No readiness evidence was recorded for this run."}),(0,b.jsxs)("div",{className:"metric-grid run-readiness-metrics",children:[(0,b.jsx)(D7,{label:"Status",value:CK(e)}),(0,b.jsx)(D7,{label:"Configured checks",value:t?CS.format(t.check_results.configured):"-"}),(0,b.jsx)(D7,{label:"Source files",value:Cq(t?.check_results.source_files)}),(0,b.jsx)(D7,{label:"Portable Context",value:Cq(t?.check_results.portable_context)}),(0,b.jsx)(D7,{label:"Proof checks",value:CG(e.proof)})]}),n.length>0?(0,b.jsxs)("section",{className:"readiness-check-section",children:[(0,b.jsx)(Ue,{title:"Readiness checks",detail:`${n.filter(e=>e.ok).length}/${n.length} passing`}),(0,b.jsx)("div",{className:"check-stack",children:n.map(e=>(0,b.jsxs)("article",{children:[(0,b.jsx)("span",{className:e.ok?"status-ok":"status-fail",children:e.ok?"Pass":"Review"}),(0,b.jsxs)("p",{children:[e.summary,e.detail?` - ${e.detail}`:""]})]},`${e.gate}-${e.summary}`))})]}):(0,b.jsx)(Dp,{title:"No readiness checks recorded",detail:"Run a readiness check to see data-level gates for this run."}),e.proof.length>0?(0,b.jsxs)("details",{className:"proof-disclosure",open:!t?.ready,children:[(0,b.jsxs)("summary",{children:[(0,b.jsx)("span",{children:"Run proof"}),(0,b.jsxs)("strong",{children:[CG(e.proof)," checks"]})]}),(0,b.jsx)(Ut,{checks:e.proof})]}):null]})}function Dp({detail:e,title:t}){return(0,b.jsxs)("div",{className:"empty-state",children:[(0,b.jsx)("strong",{children:t}),(0,b.jsx)("span",{children:e})]})}function Dh({compileRun:e,data:t,detailTab:n,onCloseMethod:r,onDetailTabChange:i,onOpenRunPage:a,onPromptAction:o,onSelectMethod:s,selectedMethod:l,serviceUrl:u}){let d=t.preparation_resources[0]?.preparation.name??"",c=e=>e.active_for_preparations[0]??d;return l?(0,b.jsx)(Dg,{activeTab:n,compileRun:e,data:t,onBack:r,onOpenRunPage:e=>a(l.id,e),onPromptAction:e=>o({preparation:c(l),message:e}),onTabChange:i,serviceUrl:u,method:l}):(0,b.jsxs)("section",{className:"method-list-layout",children:[(0,b.jsxs)("div",{className:"page-head",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h1",{children:"Methods"}),(0,b.jsx)("p",{children:"Reusable file-processing Methods for preparing source folders."})]}),(0,b.jsx)(D0,{preparation:d,label:"Create Method",form:DY({defaultPreparation:d,methods:t.method_packages}),message:`Create a new Interf Method${d?` for ${d}`:""}.
83
83
 
84
84
  Agent work: [describe what the portable context should help agents do].
85
85
  Portable-context output: [describe the folder shape agents should get].
86
- Readiness checks: [describe what must be true before this data is ready].`,onPromptAction:o})]}),(0,b.jsx)("div",{className:"table-frame method-table-frame method-table-wide",children:(0,b.jsxs)("table",{className:"runs-table",children:[(0,b.jsx)("thead",{children:(0,b.jsxs)("tr",{children:[(0,b.jsx)("th",{children:"Method"}),(0,b.jsx)("th",{children:"Stages"}),(0,b.jsx)("th",{children:"Preparations"}),(0,b.jsx)("th",{children:"Source"}),(0,b.jsx)("th",{children:"Actions"})]})}),(0,b.jsx)("tbody",{children:t.method_packages.map(e=>(0,b.jsxs)("tr",{onClick:()=>s(e.id),role:"button",tabIndex:0,children:[(0,b.jsx)("td",{children:(0,b.jsxs)("div",{className:"run-name-cell",children:[(0,b.jsx)("strong",{children:e.label??e.id}),(0,b.jsx)("span",{children:e.hint??CB(e.path)})]})}),(0,b.jsx)("td",{children:(0,b.jsx)(D5,{status:"idle",duration:`${e.stages.length} stages`})}),(0,b.jsx)("td",{children:e.active_for_preparations.length}),(0,b.jsx)("td",{children:(0,b.jsx)("code",{children:"builtin"===e.source_kind?"built-in":CB(e.path)})}),(0,b.jsx)("td",{children:(0,b.jsx)(D1,{actions:[{label:"Modify",onSelect:()=>o({preparation:c(e),message:`Modify Method ${e.id}.
86
+ Readiness checks: [describe what must be true before this data is ready].`,onPromptAction:o})]}),(0,b.jsx)("div",{className:"table-frame method-table-frame method-table-wide",children:(0,b.jsxs)("table",{className:"runs-table",children:[(0,b.jsx)("thead",{children:(0,b.jsxs)("tr",{children:[(0,b.jsx)("th",{children:"Method"}),(0,b.jsx)("th",{children:"Stages"}),(0,b.jsx)("th",{children:"Preparations"}),(0,b.jsx)("th",{children:"Source"}),(0,b.jsx)("th",{children:"Actions"})]})}),(0,b.jsx)("tbody",{children:t.method_packages.map(e=>(0,b.jsxs)("tr",{onClick:()=>s(e.id),role:"button",tabIndex:0,children:[(0,b.jsx)("td",{children:(0,b.jsxs)("div",{className:"run-name-cell",children:[(0,b.jsx)("strong",{children:e.label??e.id}),(0,b.jsx)("span",{children:e.hint??CB(e.path)})]})}),(0,b.jsx)("td",{children:(0,b.jsx)(D3,{status:"idle",duration:`${e.stages.length} stages`})}),(0,b.jsx)("td",{children:e.active_for_preparations.length}),(0,b.jsx)("td",{children:(0,b.jsx)("code",{children:"builtin"===e.source_kind?"built-in":CB(e.path)})}),(0,b.jsx)("td",{children:(0,b.jsx)(D1,{actions:[{label:"Modify",onSelect:()=>o({preparation:c(e),message:`Modify Method ${e.id}.
87
87
 
88
88
  Change requested: [describe the change].
89
89
  Keep the Method package valid and show the proposed CLI action before running it.`})},{label:"Duplicate",onSelect:()=>o({preparation:c(e),message:`Duplicate Method ${e.id} as [new Method id].
90
90
 
91
91
  Then ask what should change before proposing the CLI action.`})},{destructive:!0,label:"Remove",onSelect:()=>o({preparation:c(e),message:`Remove Method ${e.id} if it is safe.
92
92
 
93
- First check whether any saved Preparation still uses it, then propose the CLI action for approval.`})}]})})]},e.id))})]})})]})}function Dg({activeTab:e,compileRun:t,data:n,onBack:r,onOpenRunPage:i,onPromptAction:a,onTabChange:o,serviceUrl:s,method:l}){let u=n.runs.filter(e=>e.method===l.id),d=n.preparation_resources.filter(e=>l.active_for_preparations.includes(e.preparation.name));return(0,b.jsxs)("section",{className:"graph"===e?"method-detail method-detail-canvas-mode":"method-detail",children:[(0,b.jsxs)("div",{className:"breadcrumb-row",children:[(0,b.jsx)("button",{type:"button",onClick:r,children:"Methods"}),(0,b.jsx)("span",{children:"/"}),(0,b.jsx)("strong",{children:l.id})]}),(0,b.jsxs)("div",{className:"method-detail-head",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)(D5,{status:t?.status??"idle",duration:`${l.stages.length} stages`}),(0,b.jsx)("h1",{children:l.label??l.id}),(0,b.jsx)("p",{children:l.hint??"Reusable Method for preparing source folders."}),(0,b.jsx)("code",{children:CB(l.path)})]}),(0,b.jsxs)("div",{className:"preparation-action-group source-action-group",children:[(0,b.jsx)("button",{className:"preparation-action-button",onClick:()=>a(`Modify Method ${l.id}.
93
+ First check whether any saved Preparation still uses it, then propose the CLI action for approval.`})}]})})]},e.id))})]})})]})}function Dg({activeTab:e,compileRun:t,data:n,onBack:r,onOpenRunPage:i,onPromptAction:a,onTabChange:o,serviceUrl:s,method:l}){let u=n.runs.filter(e=>e.method===l.id),d=n.preparation_resources.filter(e=>l.active_for_preparations.includes(e.preparation.name));return(0,b.jsxs)("section",{className:"graph"===e?"method-detail method-detail-canvas-mode":"method-detail",children:[(0,b.jsxs)("div",{className:"breadcrumb-row",children:[(0,b.jsx)("button",{type:"button",onClick:r,children:"Methods"}),(0,b.jsx)("span",{children:"/"}),(0,b.jsx)("strong",{children:l.id})]}),(0,b.jsxs)("div",{className:"method-detail-head",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)(D3,{status:t?.status??"idle",duration:`${l.stages.length} stages`}),(0,b.jsx)("h1",{children:l.label??l.id}),(0,b.jsx)("p",{children:l.hint??"Reusable Method for preparing source folders."}),(0,b.jsx)("code",{children:CB(l.path)})]}),(0,b.jsxs)("div",{className:"preparation-action-group source-action-group",children:[(0,b.jsx)("button",{className:"preparation-action-button",onClick:()=>a(`Modify Method ${l.id}.
94
94
 
95
95
  Change requested: [describe the change].
96
96
  Keep the Method package valid and show the proposed CLI action before running it.`),type:"button",children:"Modify"}),(0,b.jsx)("button",{className:"preparation-action-button",onClick:()=>a(`Duplicate Method ${l.id} as [new Method id].
97
97
 
98
98
  Then ask what should change before proposing the CLI action.`),type:"button",children:"Duplicate"}),(0,b.jsx)("button",{className:"preparation-action-button",onClick:()=>a(`Remove Method ${l.id} if it is safe.
99
99
 
100
- First check whether any saved Preparation still uses it, then propose the CLI action for approval.`),type:"button",children:"Remove"})]})]}),(0,b.jsx)("nav",{className:"detail-tabs source-detail-tabs","aria-label":`${l.id} Method details`,children:[{value:"graph",label:"Graph"},{value:"stages",label:"Stages"},{value:"readiness",label:"Readiness"},{value:"runs",label:"Runs"}].map(t=>(0,b.jsx)("button",{"aria-pressed":e===t.value,className:e===t.value?"active":"",onClick:()=>o(t.value),type:"button",children:t.label},t.value))}),"graph"===e?(0,b.jsx)(Db,{compileRun:t,packagePath:l.path,serviceUrl:s,method:l}):null,"stages"===e?(0,b.jsx)(Dv,{method:l}):null,"readiness"===e?(0,b.jsx)(Dx,{preparations:d,method:l}):null,"runs"===e?(0,b.jsx)(Dy,{onOpenRun:i,runs:u}):null]})}function Dv({method:e}){return(0,b.jsx)("section",{className:"source-tab-panel",children:(0,b.jsx)("div",{className:"table-frame",children:(0,b.jsxs)("table",{className:"runs-table method-stage-table",children:[(0,b.jsx)("thead",{children:(0,b.jsxs)("tr",{children:[(0,b.jsx)("th",{children:"Stage"}),(0,b.jsx)("th",{children:"Reads"}),(0,b.jsx)("th",{children:"Writes"}),(0,b.jsx)("th",{children:"Acceptance criteria"})]})}),(0,b.jsx)("tbody",{children:e.stages.map(e=>(0,b.jsxs)("tr",{children:[(0,b.jsx)("td",{children:(0,b.jsxs)("div",{className:"run-name-cell",children:[(0,b.jsx)("strong",{children:e.label}),(0,b.jsx)("span",{children:e.description??e.contract_type})]})}),(0,b.jsx)("td",{children:(0,b.jsx)("span",{children:e.reads.length?e.reads.join(", "):"-"})}),(0,b.jsx)("td",{children:(0,b.jsx)("span",{children:e.writes.length?e.writes.join(", "):"-"})}),(0,b.jsx)("td",{children:(0,b.jsx)("span",{children:D_(e.acceptance)})})]},e.id))})]})})})}function Dx({preparations:e,method:t}){return(0,b.jsxs)("section",{className:"source-tab-panel",children:[(0,b.jsxs)("div",{className:"source-section-head",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h2",{children:"Readiness checks"}),(0,b.jsx)("p",{children:"Preparations using this Method define the checks that decide whether the portable context gives agents enough of the work-relevant picture."})]}),(0,b.jsx)(D5,{status:"idle",duration:`${t.active_for_preparations.length} active`})]}),(0,b.jsx)("div",{className:"table-frame",children:(0,b.jsxs)("table",{className:"runs-table",children:[(0,b.jsx)("thead",{children:(0,b.jsxs)("tr",{children:[(0,b.jsx)("th",{children:"Preparation"}),(0,b.jsx)("th",{children:"Readiness"}),(0,b.jsx)("th",{children:"Checks"}),(0,b.jsx)("th",{children:"Source folder"})]})}),(0,b.jsx)("tbody",{children:0===e.length?(0,b.jsx)("tr",{children:(0,b.jsx)("td",{colSpan:4,children:(0,b.jsxs)("div",{className:"empty-table",children:[(0,b.jsx)("strong",{children:"No Preparations use this Method yet"}),(0,b.jsx)("span",{children:"Create a Preparation or assign this Method during setup."})]})})}):e.map(e=>(0,b.jsxs)("tr",{children:[(0,b.jsx)("td",{children:(0,b.jsx)("strong",{children:e.preparation.name})}),(0,b.jsx)("td",{children:(0,b.jsx)(D5,{status:e.readiness.status,duration:e.readiness.summary})}),(0,b.jsx)("td",{children:e.preparation.checks.length}),(0,b.jsx)("td",{children:(0,b.jsx)("code",{children:e.preparation.path})})]},e.preparation.name))})]})})]})}function Dy({onOpenRun:e,runs:t}){return(0,b.jsx)(Dn,{runs:t,onSelectRun:e})}function Db({compileRun:e,packagePath:t,serviceUrl:n,method:r}){return(0,b.jsx)("section",{className:"method-detail-graph",style:Cj,children:(0,b.jsx)(Dl,{compileRun:e,packagePath:t,serviceUrl:n,method:r})})}function D_(e){return e&&0!==Object.keys(e).length?Object.keys(e).join(", "):"No acceptance criteria declared"}function D$({controlPath:e,data:t,onPromptAction:n,serviceUrl:r,sourceFolderPath:i}){var a,o;let s=(0,_.useMemo)(()=>DI(t),[t]),l=i??t.preparations[0]?.source_path??s.find(e=>e.sourceFolder)?.sourceFolder??t.preparation_resources[0]?.preparation.path??null??e,u=l?DE(l):"Source folder",d=function(e){let t=new Set,n=[];for(let r of e){let e=`${r.source_folder_path}:${r.path}`;t.has(e)||(t.add(e),n.push(r))}return n.sort((e,t)=>e.path.localeCompare(t.path))}(t.source_files),c=d.length>0?d:t.workspace_files.length>0?t.workspace_files:(a=s,o=l,a.flatMap(e=>e.sourceFiles.map(e=>{let t=function(e,t){if(!e)return CB(t);let n=e.replace(/\/+$/,"");return t===n?DE(t):t.startsWith(`${n}/`)?t.slice(n.length+1):CB(t)}(o,e.source_folder_path);return{...e,path:`${t}/${e.path}`.replace(/^\/+/,"")}}))),m=DU(c,l,180),f=c.reduce((e,t)=>e+t.size_bytes,0),p=c.reduce((e,t)=>!e||t.modified_at&&t.modified_at>e?t.modified_at:e,null);return(0,b.jsxs)("section",{className:"workspace-home source-folder-view",children:[(0,b.jsxs)("div",{className:"page-head",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h1",{children:u}),(0,b.jsx)("p",{children:l?"Files Interf can prepare into portable context for agent work.":"Choose a Source Folder to prepare for agent work."})]}),l?(0,b.jsx)(D0,{preparation:s[0]?.name??"",label:"Prepare this folder",form:Dq({controlPath:l,preparationViews:s,methods:t.method_packages}),message:`Create a Preparation for source folder ${l}.
100
+ First check whether any saved Preparation still uses it, then propose the CLI action for approval.`),type:"button",children:"Remove"})]})]}),(0,b.jsx)("nav",{className:"detail-tabs source-detail-tabs","aria-label":`${l.id} Method details`,children:[{value:"graph",label:"Graph"},{value:"stages",label:"Stages"},{value:"readiness",label:"Readiness"},{value:"runs",label:"Runs"}].map(t=>(0,b.jsx)("button",{"aria-pressed":e===t.value,className:e===t.value?"active":"",onClick:()=>o(t.value),type:"button",children:t.label},t.value))}),"graph"===e?(0,b.jsx)(Db,{compileRun:t,packagePath:l.path,serviceUrl:s,method:l}):null,"stages"===e?(0,b.jsx)(Dv,{method:l}):null,"readiness"===e?(0,b.jsx)(Dx,{preparations:d,method:l}):null,"runs"===e?(0,b.jsx)(Dy,{onOpenRun:i,runs:u}):null]})}function Dv({method:e}){return(0,b.jsx)("section",{className:"source-tab-panel",children:(0,b.jsx)("div",{className:"table-frame",children:(0,b.jsxs)("table",{className:"runs-table method-stage-table",children:[(0,b.jsx)("thead",{children:(0,b.jsxs)("tr",{children:[(0,b.jsx)("th",{children:"Stage"}),(0,b.jsx)("th",{children:"Reads"}),(0,b.jsx)("th",{children:"Writes"}),(0,b.jsx)("th",{children:"Acceptance criteria"})]})}),(0,b.jsx)("tbody",{children:e.stages.map(e=>(0,b.jsxs)("tr",{children:[(0,b.jsx)("td",{children:(0,b.jsxs)("div",{className:"run-name-cell",children:[(0,b.jsx)("strong",{children:e.label}),(0,b.jsx)("span",{children:e.description??e.contract_type})]})}),(0,b.jsx)("td",{children:(0,b.jsx)("span",{children:e.reads.length?e.reads.join(", "):"-"})}),(0,b.jsx)("td",{children:(0,b.jsx)("span",{children:e.writes.length?e.writes.join(", "):"-"})}),(0,b.jsx)("td",{children:(0,b.jsx)("span",{children:D_(e.acceptance)})})]},e.id))})]})})})}function Dx({preparations:e,method:t}){return(0,b.jsxs)("section",{className:"source-tab-panel",children:[(0,b.jsxs)("div",{className:"source-section-head",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h2",{children:"Readiness checks"}),(0,b.jsx)("p",{children:"Preparations using this Method define the checks that decide whether the portable context gives agents enough of the work-relevant picture."})]}),(0,b.jsx)(D3,{status:"idle",duration:`${t.active_for_preparations.length} active`})]}),(0,b.jsx)("div",{className:"table-frame",children:(0,b.jsxs)("table",{className:"runs-table",children:[(0,b.jsx)("thead",{children:(0,b.jsxs)("tr",{children:[(0,b.jsx)("th",{children:"Preparation"}),(0,b.jsx)("th",{children:"Readiness"}),(0,b.jsx)("th",{children:"Checks"}),(0,b.jsx)("th",{children:"Source folder"})]})}),(0,b.jsx)("tbody",{children:0===e.length?(0,b.jsx)("tr",{children:(0,b.jsx)("td",{colSpan:4,children:(0,b.jsxs)("div",{className:"empty-table",children:[(0,b.jsx)("strong",{children:"No Preparations use this Method yet"}),(0,b.jsx)("span",{children:"Create a Preparation or assign this Method during setup."})]})})}):e.map(e=>(0,b.jsxs)("tr",{children:[(0,b.jsx)("td",{children:(0,b.jsx)("strong",{children:e.preparation.name})}),(0,b.jsx)("td",{children:(0,b.jsx)(D3,{status:e.readiness.status,duration:e.readiness.summary})}),(0,b.jsx)("td",{children:e.preparation.checks.length}),(0,b.jsx)("td",{children:(0,b.jsx)("code",{children:e.preparation.path})})]},e.preparation.name))})]})})]})}function Dy({onOpenRun:e,runs:t}){return(0,b.jsx)(Dn,{runs:t,onSelectRun:e})}function Db({compileRun:e,packagePath:t,serviceUrl:n,method:r}){return(0,b.jsx)("section",{className:"method-detail-graph",style:Cj,children:(0,b.jsx)(Dl,{compileRun:e,packagePath:t,serviceUrl:n,method:r})})}function D_(e){return e&&0!==Object.keys(e).length?Object.keys(e).join(", "):"No acceptance criteria declared"}function D$({controlPath:e,data:t,onPromptAction:n,serviceUrl:r,sourceFolderPath:i}){var a,o;let s=(0,_.useMemo)(()=>DI(t),[t]),l=i??t.preparations[0]?.source_path??s.find(e=>e.sourceFolder)?.sourceFolder??t.preparation_resources[0]?.preparation.path??null??e,u=l?DE(l):"Source folder",d=function(e){let t=new Set,n=[];for(let r of e){let e=`${r.source_folder_path}:${r.path}`;t.has(e)||(t.add(e),n.push(r))}return n.sort((e,t)=>e.path.localeCompare(t.path))}(t.source_files),c=d.length>0?d:t.workspace_files.length>0?t.workspace_files:(a=s,o=l,a.flatMap(e=>e.sourceFiles.map(e=>{let t=function(e,t){if(!e)return CB(t);let n=e.replace(/\/+$/,"");return t===n?DE(t):t.startsWith(`${n}/`)?t.slice(n.length+1):CB(t)}(o,e.source_folder_path);return{...e,path:`${t}/${e.path}`.replace(/^\/+/,"")}}))),m=DU(c,l,180),f=c.reduce((e,t)=>e+t.size_bytes,0),p=c.reduce((e,t)=>!e||t.modified_at&&t.modified_at>e?t.modified_at:e,null);return(0,b.jsxs)("section",{className:"workspace-home source-folder-view",children:[(0,b.jsxs)("div",{className:"page-head",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h1",{children:u}),(0,b.jsx)("p",{children:l?"Files Interf can prepare into portable context for agent work.":"Choose a Source Folder to prepare for agent work."})]}),l?(0,b.jsx)(D0,{preparation:s[0]?.name??"",label:"Prepare this folder",form:Dq({controlPath:l,preparationViews:s,methods:t.method_packages}),message:`Prepare source folder ${l}.
101
101
 
102
- Use the form values as the source of truth for the approval proposal.`,onPromptAction:n}):null]}),(0,b.jsx)("div",{className:"workspace-home-grid source-only",children:(0,b.jsxs)("section",{className:`workspace-panel workspace-source-root${0===m.nodes.length?" empty-source-root":""}`,children:[(0,b.jsx)("div",{className:"source-section-head",children:(0,b.jsxs)("div",{children:[(0,b.jsx)("h2",{children:"Source files"}),(0,b.jsx)("p",{children:"Files from the configured source folder Interf can prepare for agent work."})]})}),(0,b.jsxs)("div",{className:"metric-grid source-metrics",children:[(0,b.jsx)(D8,{label:"Files",value:CS.format(c.length)}),(0,b.jsx)(D8,{label:"Size",value:CA(f)}),(0,b.jsx)(D8,{label:"Last change",value:p?CP(p):"-"}),(0,b.jsx)(D8,{label:"Preparations",value:CS.format(s.length)})]}),0===m.nodes.length?(0,b.jsxs)("div",{className:"empty-table portable-empty",children:[(0,b.jsx)("strong",{children:"No source files indexed yet"}),(0,b.jsx)("span",{children:"Add files to the source folder or ask the local agent to set up Interf for a specific folder."})]}):(0,b.jsx)(DP,{detail:`${CS.format(c.length)} files`,nodes:m.nodes,omitted:m.omitted,rootDetail:l??"Source folder",rootLabel:u,rootOpenPath:l??void 0,serviceUrl:r,title:"Source files"})]})})]})}function Dw({activeTab:e,controlPath:t,data:n,onOpenRunPage:r,onPromptAction:i,onSelectedPreparationChange:a,onTabChange:o,runs:s,selectedPreparationName:l,serviceUrl:u,sourceFolderPath:d}){let c=(0,_.useMemo)(()=>DI(n),[n]);(0,_.useEffect)(()=>{l&&!c.some(e=>e.name===l)&&a(null)},[c,a,l]);let m=l?c.find(e=>e.name===l)??null:null;return(0,b.jsx)("section",{className:"source-layout",children:m?(0,b.jsx)(DO,{activeTab:e,onBack:()=>{a(null),o("portable")},onOpenRunPage:e=>r(m.name,e),onPromptAction:i,onTabChange:o,runs:s.filter(e=>e.preparation===m.name),serviceUrl:u,methods:n.method_packages,view:m}):(0,b.jsx)(Dk,{controlPath:t,preparationViews:c,methods:n.method_packages,onOpenPreparation:e=>{a(e),o("portable")},onPromptAction:i,sourceFolderPath:d})})}function Dk({controlPath:e,preparationViews:t,methods:n,onOpenPreparation:r,onPromptAction:i,sourceFolderPath:a}){let o=a?DE(a):e?DE(e):"Local folder",s=t[0]?.name??"",l=a??e;return(0,b.jsxs)("section",{className:"workspace-home",children:[(0,b.jsxs)("div",{className:"page-head",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h1",{children:"Preparations"}),(0,b.jsxs)("p",{children:["Agent-job preparations created from ",o,"."]})]}),(0,b.jsx)(D0,{preparation:s,label:"Create Preparation",form:Dq({controlPath:l,preparationViews:t,methods:n}),message:`Create a Preparation for an agent job.
102
+ Use the form values as the source of truth. Save the Preparation and then run prepare with the selected Method.`,onPromptAction:n}):null]}),(0,b.jsx)("div",{className:"workspace-home-grid source-only",children:(0,b.jsxs)("section",{className:`workspace-panel workspace-source-root${0===m.nodes.length?" empty-source-root":""}`,children:[(0,b.jsx)("div",{className:"source-section-head",children:(0,b.jsxs)("div",{children:[(0,b.jsx)("h2",{children:"Source files"}),(0,b.jsx)("p",{children:"Files from the configured source folder Interf can prepare for agent work."})]})}),(0,b.jsxs)("div",{className:"metric-grid source-metrics",children:[(0,b.jsx)(D7,{label:"Files",value:CS.format(c.length)}),(0,b.jsx)(D7,{label:"Size",value:CA(f)}),(0,b.jsx)(D7,{label:"Last change",value:p?CP(p):"-"}),(0,b.jsx)(D7,{label:"Preparations",value:CS.format(s.length)})]}),0===m.nodes.length?(0,b.jsxs)("div",{className:"empty-table portable-empty",children:[(0,b.jsx)("strong",{children:"No source files indexed yet"}),(0,b.jsx)("span",{children:"Add files to the source folder or ask the local agent to set up Interf for a specific folder."})]}):(0,b.jsx)(DP,{detail:`${CS.format(c.length)} files`,nodes:m.nodes,omitted:m.omitted,rootDetail:l??"Source folder",rootLabel:u,rootOpenPath:l??void 0,serviceUrl:r,title:"Source files"})]})})]})}function Dw({activeTab:e,controlPath:t,data:n,onOpenRunPage:r,onPromptAction:i,onSelectedPreparationChange:a,onTabChange:o,runs:s,selectedPreparationName:l,serviceUrl:u,sourceFolderPath:d}){let c=(0,_.useMemo)(()=>DI(n),[n]);(0,_.useEffect)(()=>{l&&!c.some(e=>e.name===l)&&a(null)},[c,a,l]);let m=l?c.find(e=>e.name===l)??null:null;return(0,b.jsx)("section",{className:"source-layout",children:m?(0,b.jsx)(DO,{activeTab:e,onBack:()=>{a(null),o("portable")},onOpenRunPage:e=>r(m.name,e),onPromptAction:i,onTabChange:o,runs:s.filter(e=>e.preparation===m.name),serviceUrl:u,methods:n.method_packages,view:m}):(0,b.jsx)(Dk,{controlPath:t,preparationViews:c,methods:n.method_packages,onOpenPreparation:e=>{a(e),o("portable")},onPromptAction:i,sourceFolderPath:d})})}function Dk({controlPath:e,preparationViews:t,methods:n,onOpenPreparation:r,onPromptAction:i,sourceFolderPath:a}){let o=a?DE(a):e?DE(e):"Local folder",s=t[0]?.name??"",l=a??e;return(0,b.jsxs)("section",{className:"workspace-home",children:[(0,b.jsxs)("div",{className:"page-head",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h1",{children:"Preparations"}),(0,b.jsxs)("p",{children:["Agent-job preparations created from ",o,"."]})]}),(0,b.jsx)(D0,{preparation:s,label:"Prepare Source Folder",form:Dq({controlPath:l,preparationViews:t,methods:n}),message:`Prepare a Source Folder for an agent job.
103
103
 
104
104
  Source folder: ${l??"[current folder]"}
105
- Use the form values as the source of truth for the approval proposal.`,onPromptAction:i})]}),0===t.length?(0,b.jsx)("div",{className:"table-frame",children:(0,b.jsxs)("div",{className:"empty-table portable-empty",children:[(0,b.jsx)("strong",{children:"No Preparations yet"}),(0,b.jsx)("span",{children:"Create one by describing the agent job and the picture it needs from this data."})]})}):(0,b.jsx)(DS,{onOpenPreparation:r,onPromptAction:i,views:t})]})}function DS({onOpenPreparation:e,onPromptAction:t,views:n}){let r=(e,n)=>{t({preparation:e,message:n})};return(0,b.jsx)("div",{className:"table-frame workspace-table-frame",children:(0,b.jsxs)("table",{className:"runs-table workspace-table",children:[(0,b.jsx)("thead",{children:(0,b.jsxs)("tr",{children:[(0,b.jsx)("th",{children:"Preparation"}),(0,b.jsx)("th",{children:"Status"}),(0,b.jsx)("th",{children:"Method"}),(0,b.jsx)("th",{children:"Latest prepare"}),(0,b.jsx)("th",{children:"Checks"}),(0,b.jsx)("th",{children:"Actions"})]})}),(0,b.jsx)("tbody",{children:n.map(t=>{let n=Dj(t);return(0,b.jsxs)("tr",{onClick:()=>e(t.name),onKeyDown:n=>{("Enter"===n.key||" "===n.key)&&e(t.name)},role:"button",tabIndex:0,children:[(0,b.jsx)("td",{children:(0,b.jsxs)("div",{className:"run-name-cell",children:[(0,b.jsx)("strong",{children:t.name}),(0,b.jsx)("span",{children:t.preparation.preparation.about??"Preparation for agent work"})]})}),(0,b.jsx)("td",{children:(0,b.jsx)(D5,{status:n.status,duration:n.summary})}),(0,b.jsx)("td",{children:(0,b.jsx)("span",{children:t.method?.label??t.methodId})}),(0,b.jsx)("td",{children:(0,b.jsx)("span",{children:t.compileRun?CZ(t.compileRun.started_at,t.compileRun.finished_at):"not built"})}),(0,b.jsx)("td",{children:(0,b.jsx)("span",{children:CS.format(t.preparation.preparation.checks.length)})}),(0,b.jsx)("td",{children:(0,b.jsx)(D1,{actions:[{label:"Modify",onSelect:()=>r(t.name,`Modify Preparation ${t.name}.
105
+ Use the form values as the source of truth. Save the Preparation and then run prepare with the selected Method.`,onPromptAction:i})]}),0===t.length?(0,b.jsx)("div",{className:"table-frame",children:(0,b.jsxs)("div",{className:"empty-table portable-empty",children:[(0,b.jsx)("strong",{children:"No Preparations yet"}),(0,b.jsx)("span",{children:"Create one by describing the agent job and the picture it needs from this data."})]})}):(0,b.jsx)(DS,{onOpenPreparation:r,onPromptAction:i,views:t})]})}function DS({onOpenPreparation:e,onPromptAction:t,views:n}){let r=(e,n)=>{t({preparation:e,message:n})};return(0,b.jsx)("div",{className:"table-frame workspace-table-frame",children:(0,b.jsxs)("table",{className:"runs-table workspace-table",children:[(0,b.jsx)("thead",{children:(0,b.jsxs)("tr",{children:[(0,b.jsx)("th",{children:"Preparation"}),(0,b.jsx)("th",{children:"Status"}),(0,b.jsx)("th",{children:"Method"}),(0,b.jsx)("th",{children:"Latest prepare"}),(0,b.jsx)("th",{children:"Checks"}),(0,b.jsx)("th",{children:"Actions"})]})}),(0,b.jsx)("tbody",{children:n.map(t=>{let n=Dj(t);return(0,b.jsxs)("tr",{onClick:()=>e(t.name),onKeyDown:n=>{("Enter"===n.key||" "===n.key)&&e(t.name)},role:"button",tabIndex:0,children:[(0,b.jsx)("td",{children:(0,b.jsxs)("div",{className:"run-name-cell",children:[(0,b.jsx)("strong",{children:t.name}),(0,b.jsx)("span",{children:t.preparation.preparation.about??"Preparation for agent work"})]})}),(0,b.jsx)("td",{children:(0,b.jsx)(D3,{status:n.status,duration:n.summary})}),(0,b.jsx)("td",{children:(0,b.jsx)("span",{children:t.method?.label??t.methodId})}),(0,b.jsx)("td",{children:(0,b.jsx)("span",{children:t.compileRun?CZ(t.compileRun.started_at,t.compileRun.finished_at):"not built"})}),(0,b.jsx)("td",{children:(0,b.jsx)("span",{children:CS.format(t.preparation.preparation.checks.length)})}),(0,b.jsx)("td",{children:(0,b.jsx)(D1,{actions:[{label:"Modify",onSelect:()=>r(t.name,`Modify Preparation ${t.name}.
106
106
 
107
107
  Change requested: [describe the change].
108
108
  Show the CLI proposal before running it.`)},{label:"Duplicate",onSelect:()=>r(t.name,`Duplicate Preparation ${t.name} for a new agent job.
@@ -111,8 +111,8 @@ New Preparation name: [name].
111
111
  Agent work: [describe the job].
112
112
  Show the CLI proposal before running it.`)},{destructive:!0,label:"Remove",onSelect:()=>r(t.name,`Remove Preparation ${t.name}.
113
113
 
114
- Confirm what local files will be removed before proposing the CLI action.`)}]})})]},t.name)})})]})})}function DI(e){let t=new Map(e.method_packages.map(e=>[e.id,e]));return e.preparation_resources.map(n=>{let r=e.source_files.filter(e=>e.preparation===n.preparation.name).sort((e,t)=>e.path.localeCompare(t.path)),i=e.portable_contexts.find(e=>e.preparation===n.preparation.name)??null,a=i?.method??n.preparation.method??"interf-default",o=i?.latest_compile_run_id?e.compile_runs.find(e=>e.run.run_id===i.latest_compile_run_id)?.run??null:e.compile_runs.find(e=>e.run.preparation===n.preparation.name)?.run??null,s=i?.latest_test_run_id?e.test_runs.find(e=>e.run_id===i.latest_test_run_id)??null:e.test_runs.find(e=>e.preparation===n.preparation.name)??null;return{compileRun:o,context:i,preparation:n,latestObservableCompile:o?e.runs.find(e=>e.run_id===o.run_id)??null:null,name:n.preparation.name,sourceFiles:r,sourceFolder:r[0]?.source_folder_path??null,sourceModifiedAt:r.reduce((e,t)=>!e||t.modified_at&&t.modified_at>e?t.modified_at:e,null),sourceSizeBytes:r.reduce((e,t)=>e+t.size_bytes,0),testRun:s,method:t.get(a),methodId:a}})}function Dj(e){return e.context?.readiness??e.preparation.readiness}function DN(e){return e.compileRun?.status==="succeeded"}function Dz(e){return e.preparation.preparation.checks.length>0}function DE(e){let t=e.replace(/\/+$/,"");return t.split("/").filter(Boolean).at(-1)??t}function DO({activeTab:e,methods:t,onBack:n,onOpenRunPage:r,onPromptAction:i,onTabChange:a,serviceUrl:o,runs:s,view:l}){return(0,b.jsxs)("section",{className:"method"===e?"method-detail context-workspace-detail context-workspace-canvas-mode":"method-detail context-workspace-detail",children:[(0,b.jsxs)("div",{className:"breadcrumb-row",children:[(0,b.jsx)("button",{type:"button",onClick:n,children:"Preparations"}),(0,b.jsx)("span",{children:"/"}),(0,b.jsx)("strong",{children:l.name})]}),(0,b.jsxs)("div",{className:"method-detail-head context-workspace-head",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h1",{children:l.name}),(0,b.jsx)("p",{children:l.preparation.preparation.about??"Preparation for agent work."}),l.context?(0,b.jsx)("code",{children:CB(l.context.path)}):(0,b.jsx)("code",{children:"not prepared yet"})]}),(0,b.jsxs)("div",{className:"context-workspace-head-actions",children:[l.context?(0,b.jsx)(D6,{label:"Open Portable Context",path:l.context.path,serviceUrl:o}):null,(0,b.jsx)(DC,{methods:t,onPromptAction:i,view:l})]})]}),(0,b.jsx)("div",{className:"workspace-detail-controls",children:(0,b.jsx)("nav",{className:"detail-tabs source-detail-tabs","aria-label":`${l.name} details`,children:[{value:"portable",label:"Portable Context"},{value:"readiness",label:"Readiness"},{value:"method",label:"Method"},{value:"source",label:"Source"},{value:"runs",label:"Runs"}].map(t=>(0,b.jsx)("button",{"aria-pressed":e===t.value,className:e===t.value?"active":"",onClick:()=>a(t.value),type:"button",children:t.label},t.value))})}),"portable"===e?(0,b.jsx)(DT,{serviceUrl:o,view:l}):null,"source"===e?(0,b.jsx)(DD,{serviceUrl:o,view:l}):null,"readiness"===e?(0,b.jsx)(DM,{view:l}):null,"runs"===e?(0,b.jsx)(DL,{onOpenRunPage:r,runs:s}):null,"method"===e?(0,b.jsx)(DA,{serviceUrl:o,view:l}):null]})}function DT({serviceUrl:e,view:t}){let n=Dj(t),r=t.context?function(e,t){let n=new Set;for(let e of t?.stages??[])for(let t of e.writes){let e=t.split("/").filter(Boolean)[0]??t;e&&".interf"!==e&&n.add(e)}let r=[...n].sort(),i=[{name:"AGENTS.md",path:"AGENTS.md",type:"file",detail:"agent entrypoint"},{name:"CLAUDE.md",path:"CLAUDE.md",type:"file",detail:"agent mirror"},{name:"raw/",path:"raw",type:"folder",detail:"source snapshot"}];for(let e of r.slice(0,5))i.push({name:`${e}/`,path:e,type:"folder",detail:"Method output"});return r.length>5&&i.push({name:`${r.length-5} more Method outputs`,type:"folder"}),e.artifacts.length>0&&i.push({name:"artifacts/",path:"artifacts",type:"folder",detail:`${CS.format(e.artifacts.length)} recorded`}),i}(t.context,t.method):[];return(0,b.jsx)("div",{className:"source-tab-panel preparation-method-tab",children:(0,b.jsx)("div",{className:"source-home-layout portable-context-layout",children:(0,b.jsx)("div",{className:"source-home-side",children:(0,b.jsxs)("section",{className:"source-home-panel portable-workspace-panel",children:[(0,b.jsx)("div",{className:"source-section-head",children:(0,b.jsxs)("div",{children:[(0,b.jsx)("h2",{children:"Portable Context"}),(0,b.jsx)("p",{children:t.context?CB(t.context.path):"Not prepared yet"})]})}),(0,b.jsxs)("div",{className:"metric-grid source-metrics",children:[(0,b.jsx)(D8,{label:"Method",value:t.method?.label??t.methodId}),(0,b.jsx)(D8,{label:"Readiness checks",value:CS.format(t.preparation.preparation.checks.length)}),(0,b.jsx)(D8,{label:"Latest prepare",value:t.compileRun?CZ(t.compileRun.started_at,t.compileRun.finished_at):"not built"}),(0,b.jsx)(D8,{label:"Latest check",value:t.testRun?CL(t.testRun.status):"not checked"})]}),t.context?(0,b.jsx)(D4,{detail:`${r.length} contract entries`,items:r,rootDetail:n.summary,rootLabel:t.context.preparation,rootOpenPath:t.context.path,serviceUrl:e,title:"Folder structure"}):(0,b.jsxs)("div",{className:"empty-table portable-empty",children:[(0,b.jsx)("strong",{children:"No Portable Context yet"}),(0,b.jsx)("span",{children:"Prepare this data to create the folder agents will use."})]})]})})})})}function DC({methods:e,onPromptAction:t,view:n}){let r=DN(n),i=Dz(n),a=DN(n)&&Dz(n),o=a&&!!n.testRun;return(0,b.jsxs)("div",{className:"preparation-action-group source-action-group","aria-label":`${n.name} actions`,children:[(0,b.jsx)(D0,{preparation:n.name,label:"Prepare",message:CF(n.name),onPromptAction:t}),a?(0,b.jsx)(D0,{preparation:n.name,label:"Check",message:`Check readiness for ${n.name}. Use source files and portable context unless I say otherwise.`,onPromptAction:t}):null,o?(0,b.jsx)(D0,{preparation:n.name,label:"Improve",message:`Improve ${n.name}. Use the latest readiness checks, stage evidence, source files, and portable context to propose the next safe change before running it.`,onPromptAction:t}):null,r&&!i?(0,b.jsx)(D0,{preparation:n.name,label:"Draft checks",message:`Draft readiness checks for ${n.name} from the Source Folder and current portable context.`,onPromptAction:t}):null,(0,b.jsx)(D0,{preparation:n.name,label:"Draft Method",form:DX(n,e),message:`Draft a file-processing Method for ${n.name}.
114
+ Confirm what local files will be removed before proposing the CLI action.`)}]})})]},t.name)})})]})})}function DI(e){let t=new Map(e.method_packages.map(e=>[e.id,e]));return e.preparation_resources.map(n=>{let r=e.source_files.filter(e=>e.preparation===n.preparation.name).sort((e,t)=>e.path.localeCompare(t.path)),i=e.portable_contexts.find(e=>e.preparation===n.preparation.name)??null,a=i?.method??n.preparation.method??"interf-default",o=i?.latest_compile_run_id?e.compile_runs.find(e=>e.run.run_id===i.latest_compile_run_id)?.run??null:e.compile_runs.find(e=>e.run.preparation===n.preparation.name)?.run??null,s=i?.latest_test_run_id?e.test_runs.find(e=>e.run_id===i.latest_test_run_id)??null:e.test_runs.find(e=>e.preparation===n.preparation.name)??null;return{compileRun:o,context:i,preparation:n,latestObservableCompile:o?e.runs.find(e=>e.run_id===o.run_id)??null:null,name:n.preparation.name,sourceFiles:r,sourceFolder:r[0]?.source_folder_path??null,sourceModifiedAt:r.reduce((e,t)=>!e||t.modified_at&&t.modified_at>e?t.modified_at:e,null),sourceSizeBytes:r.reduce((e,t)=>e+t.size_bytes,0),testRun:s,method:t.get(a),methodId:a}})}function Dj(e){return e.context?.readiness??e.preparation.readiness}function DN(e){return e.compileRun?.status==="succeeded"}function Dz(e){return e.preparation.preparation.checks.length>0}function DE(e){let t=e.replace(/\/+$/,"");return t.split("/").filter(Boolean).at(-1)??t}function DO({activeTab:e,methods:t,onBack:n,onOpenRunPage:r,onPromptAction:i,onTabChange:a,serviceUrl:o,runs:s,view:l}){return(0,b.jsxs)("section",{className:"method"===e?"method-detail context-workspace-detail context-workspace-canvas-mode":"method-detail context-workspace-detail",children:[(0,b.jsxs)("div",{className:"breadcrumb-row",children:[(0,b.jsx)("button",{type:"button",onClick:n,children:"Preparations"}),(0,b.jsx)("span",{children:"/"}),(0,b.jsx)("strong",{children:l.name})]}),(0,b.jsxs)("div",{className:"method-detail-head context-workspace-head",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h1",{children:l.name}),(0,b.jsx)("p",{children:l.preparation.preparation.about??"Preparation for agent work."}),l.context?(0,b.jsx)("code",{children:CB(l.context.path)}):(0,b.jsx)("code",{children:"not prepared yet"})]}),(0,b.jsxs)("div",{className:"context-workspace-head-actions",children:[l.context?(0,b.jsx)(D2,{label:"Open Portable Context",path:l.context.path,serviceUrl:o}):null,(0,b.jsx)(DC,{methods:t,onPromptAction:i,view:l})]})]}),(0,b.jsx)("div",{className:"workspace-detail-controls",children:(0,b.jsx)("nav",{className:"detail-tabs source-detail-tabs","aria-label":`${l.name} details`,children:[{value:"portable",label:"Portable Context"},{value:"readiness",label:"Readiness"},{value:"method",label:"Method"},{value:"source",label:"Source"},{value:"runs",label:"Runs"}].map(t=>(0,b.jsx)("button",{"aria-pressed":e===t.value,className:e===t.value?"active":"",onClick:()=>a(t.value),type:"button",children:t.label},t.value))})}),"portable"===e?(0,b.jsx)(DT,{serviceUrl:o,view:l}):null,"source"===e?(0,b.jsx)(DD,{serviceUrl:o,view:l}):null,"readiness"===e?(0,b.jsx)(DM,{view:l}):null,"runs"===e?(0,b.jsx)(DL,{onOpenRunPage:r,runs:s}):null,"method"===e?(0,b.jsx)(DA,{serviceUrl:o,view:l}):null]})}function DT({serviceUrl:e,view:t}){let n=Dj(t),r=DN(t),i=t.context&&r?function(e){let t=[{name:"AGENTS.md",path:"AGENTS.md",type:"file",detail:"real file"},{name:"CLAUDE.md",path:"CLAUDE.md",type:"file",detail:"real file"},{name:"raw/",path:"raw",type:"folder",detail:"source snapshot"}],n=[...new Set(e.artifacts.map(e=>e.path).filter(Boolean))].sort();for(let e of n.slice(0,8)){let n=e.endsWith("/");t.push({name:e,path:e,type:n?"folder":"file",detail:"recorded output"})}return n.length>8&&t.push({name:`${n.length-8} more recorded outputs`,type:"folder",detail:"open folder for full contents"}),t}(t.context):[],a=function(e){let t=new Set;for(let n of e?.stages??[])for(let e of n.writes){let n=e.split("/").filter(Boolean)[0]??e;n&&".interf"!==n&&t.add(n)}return[...t].sort().map(e=>({name:`${e}/`,path:e,type:"folder",detail:"planned by Method"}))}(t.method),o=r?"ready":t.compileRun?.status==="running"?"building":t.compileRun?.status==="failed"?"failed":"not-ready",s="building"===o&&t.compileRun?CZ(t.compileRun.started_at,t.compileRun.finished_at):"failed"===o?"last prepare failed":void 0;return(0,b.jsx)("div",{className:"source-tab-panel preparation-method-tab",children:(0,b.jsx)("div",{className:"source-home-layout portable-context-layout",children:(0,b.jsx)("div",{className:"source-home-side",children:(0,b.jsxs)("section",{className:"source-home-panel portable-workspace-panel",children:[(0,b.jsx)("div",{className:"source-section-head",children:(0,b.jsxs)("div",{children:[(0,b.jsx)("h2",{children:"Portable Context"}),(0,b.jsx)("p",{children:t.context?CB(t.context.path):"Not prepared yet"})]})}),(0,b.jsxs)("div",{className:"metric-grid source-metrics",children:[(0,b.jsx)(D7,{detail:s,label:"Portable Context",status:o,value:CL(o)}),(0,b.jsx)(D7,{label:"Method",value:t.method?.label??t.methodId}),(0,b.jsx)(D7,{label:"Readiness checks",value:CS.format(t.preparation.preparation.checks.length)}),(0,b.jsx)(D7,{label:"Latest prepare",value:t.compileRun?CZ(t.compileRun.started_at,t.compileRun.finished_at):"not built"})]}),r&&t.context?(0,b.jsx)(D6,{detail:`${i.length} real entries`,items:i,rootDetail:"Ready portable context folder.",rootLabel:t.context.preparation,rootOpenPath:t.context.path,serviceUrl:e,title:"Real portable-context files"}):(0,b.jsxs)("div",{className:"empty-table portable-empty",children:[(0,b.jsx)("strong",{children:"Portable Context is not ready"}),(0,b.jsx)("span",{children:n.summary})]}),r?null:(0,b.jsx)(D4,{items:a,methodId:t.methodId})]})})})})}function DC({methods:e,onPromptAction:t,view:n}){let r=DN(n),i=Dz(n),a=DN(n)&&Dz(n),o=a&&!!n.testRun;return(0,b.jsxs)("div",{className:"preparation-action-group source-action-group","aria-label":`${n.name} actions`,children:[(0,b.jsx)(D0,{preparation:n.name,label:"Prepare",message:CF(n.name),onPromptAction:t}),a?(0,b.jsx)(D0,{preparation:n.name,label:"Check",message:`Check readiness for ${n.name}. Use source files and portable context unless I say otherwise.`,onPromptAction:t}):null,o?(0,b.jsx)(D0,{preparation:n.name,label:"Improve",message:`Improve ${n.name}. Use the latest readiness checks, stage evidence, source files, and portable context to propose the next safe change before running it.`,onPromptAction:t}):null,r&&!i?(0,b.jsx)(D0,{preparation:n.name,label:"Draft checks",message:`Draft readiness checks for ${n.name} from the Source Folder and current portable context.`,onPromptAction:t}):null,(0,b.jsx)(D0,{preparation:n.name,label:"Draft Method",form:DX(n,e),message:`Draft a file-processing Method for ${n.name}.
115
115
 
116
116
  Agent work: ${n.preparation.preparation.about??"[describe the agent work]"}.
117
117
  Portable-context output: [describe what agents should get].
118
- Readiness checks: [describe what proves this data is ready].`,onPromptAction:t})]})}function DD({serviceUrl:e,view:t}){let n=t.sourceFolder??t.preparation.preparation.path,r=DU(t.sourceFiles,n,180);return(0,b.jsxs)("div",{className:"source-tab-panel",children:[(0,b.jsxs)("div",{className:"source-section-head",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h2",{children:"Source folder structure"}),(0,b.jsx)(D2,{className:"section-path-control",label:"Source Folder",path:n,serviceUrl:e})]}),(0,b.jsx)(D5,{status:"idle",duration:`${CS.format(t.sourceFiles.length)} files`})]}),0===r.nodes.length?(0,b.jsxs)("div",{className:"empty-table portable-empty",children:[(0,b.jsx)("strong",{children:"No indexed source files"}),(0,b.jsx)("span",{children:"This folder has no source files visible to Interf yet."})]}):(0,b.jsx)(DP,{detail:`${CS.format(t.sourceFiles.length)} files`,nodes:r.nodes,omitted:r.omitted,rootDetail:n,rootLabel:DE(n),rootOpenPath:n,serviceUrl:e,title:"Source files"})]})}function DU(e,t,n){let r={children:new Map,name:"",path:"",type:"folder"};for(let n of e){let e=n.path.split("/").filter(Boolean),i=r;e.forEach((r,a)=>{let o=a===e.length-1,s=i.children.get(r)??{children:new Map,name:r,path:e.slice(0,a+1).join("/"),type:o?"file":"folder"};o&&(s.type="file",s.detail=`${CA(n.size_bytes)} / ${CP(n.modified_at)}`),s.openPath=t?CW(t,e.slice(0,a+1).join("/")):void 0,i.children.set(r,s),i=s})}let i=e=>[...e.values()].sort((e,t)=>e.type!==t.type?"folder"===e.type?-1:1:e.name.localeCompare(t.name)).map(e=>({children:i(e.children),detail:e.detail,name:e.name,openPath:e.openPath,path:e.path,type:e.type})),a=i(r.children),o=function e(t){return t.reduce((t,n)=>t+1+e(n.children??[]),0)}(a);return{nodes:function e(t,n){let r=[],i=0;for(let a of t){if(i>=n)break;let t=n-(i+=1),o=t>0?e(a.children??[],t):{nodes:[],used:0};i+=o.used,r.push({...a,children:o.nodes})}return{nodes:r,used:i}}(a,n).nodes,omitted:Math.max(0,o-n)}}function DP({detail:e,nodes:t,omitted:n=0,rootDetail:r,rootLabel:i,rootOpenPath:a,serviceUrl:o,title:s}){let[l,u]=(0,_.useState)(()=>{let e,n;return e=new Set,(n=t=>{for(let r of t)"folder"===r.type&&r.children?.length&&(e.add(r.path),n(r.children))})(t),e}),d=e=>{u(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})};return(0,b.jsxs)("div",{className:"file-explorer",role:"tree",children:[(0,b.jsxs)("div",{className:"file-explorer-head",children:[(0,b.jsx)("span",{children:s}),(0,b.jsx)("em",{children:e})]}),(0,b.jsxs)("div",{className:"file-explorer-root",title:r,children:[(0,b.jsx)(Cx,{size:16}),(0,b.jsxs)("div",{children:[(0,b.jsx)("strong",{children:i}),(0,b.jsx)("span",{children:r})]}),a?(0,b.jsx)("div",{className:"file-explorer-actions",children:(0,b.jsx)(D6,{path:a,serviceUrl:o,label:"Open",variant:"compact"})}):null]}),(0,b.jsxs)("div",{className:"file-explorer-items",children:[t.map(e=>(0,b.jsx)(DZ,{expandedPaths:l,node:e,serviceUrl:o,togglePath:d},e.path)),n>0?(0,b.jsxs)("div",{className:"file-explorer-row muted",role:"treeitem",children:[(0,b.jsx)("span",{className:"file-explorer-spacer"}),(0,b.jsx)(Cx,{size:14}),(0,b.jsxs)("div",{children:[(0,b.jsxs)("strong",{children:[CS.format(n)," more entries"]}),(0,b.jsx)("span",{children:"Open the folder to inspect the full tree."})]})]}):null]})]})}function DZ({depth:e=0,expandedPaths:t,node:n,serviceUrl:r,togglePath:i}){let a="folder"===n.type,o=a&&t.has(n.path),s=!!n.children?.length,l=a?`${n.name}/`:n.name,u=n.detail?`${n.path} - ${n.detail}`:n.path;return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:`file-explorer-row ${a?"folder":"file"}`,role:"treeitem",style:{paddingLeft:`${8+16*e}px`},title:u,children:[a&&s?(0,b.jsx)("button",{"aria-label":o?`Collapse ${n.name}`:`Expand ${n.name}`,className:`file-explorer-disclosure ${o?"expanded":""}`,onClick:()=>i(n.path),type:"button",children:(0,b.jsx)(uD,{size:14})}):(0,b.jsx)("span",{className:"file-explorer-spacer"}),a?(0,b.jsx)(Cx,{size:14}):(0,b.jsx)(Cv,{size:14}),a?(0,b.jsxs)("button",{className:"file-explorer-label",onClick:()=>{s&&i(n.path)},type:"button",children:[(0,b.jsx)("strong",{children:l}),n.detail?(0,b.jsx)("span",{children:n.detail}):null]}):(0,b.jsxs)("div",{className:"file-explorer-label",children:[(0,b.jsx)("strong",{children:l}),n.detail?(0,b.jsx)("span",{children:n.detail}):null]}),n.openPath?(0,b.jsx)("div",{className:"file-explorer-actions",children:(0,b.jsx)(D6,{path:n.openPath,serviceUrl:r,label:"Open",variant:"compact"})}):null]}),o?n.children?.map(n=>(0,b.jsx)(DZ,{depth:e+1,expandedPaths:t,node:n,serviceUrl:r,togglePath:i},n.path)):null]})}function DA({serviceUrl:e,view:t}){if(!t.method)return(0,b.jsxs)("div",{className:"empty-table portable-empty",children:[(0,b.jsx)("strong",{children:"Method package not found"}),(0,b.jsx)("span",{children:t.methodId})]});let n=t.context?CW(t.context.path,".interf/method"):t.method.path;return(0,b.jsx)(Db,{compileRun:t.compileRun,packagePath:n,serviceUrl:e,method:t.method})}function DR({view:e}){let t=e.compileRun,n=e.latestObservableCompile,r=n?CY(n):null;return t||n?(0,b.jsxs)("section",{className:"readiness-evidence-panel","aria-label":`${e.name} readiness evidence`,children:[(0,b.jsx)(D7,{title:"Readiness evidence",detail:t?CZ(t.started_at,t.finished_at):"not built"}),(0,b.jsxs)("div",{className:"metric-grid compact-metrics",children:[(0,b.jsx)(D8,{label:"Run",value:t?.run_id?CB(t.run_id):"none"}),(0,b.jsx)(D8,{label:"Stages",value:t?`${t.stages.filter(e=>"succeeded"===e.status).length}/${t.stages.length}`:`0/${e.method?.stages.length??0}`}),(0,b.jsx)(D8,{label:"Artifacts",value:CS.format(e.context?.artifacts.length??0)}),(0,b.jsx)(D8,{label:"Proof checks",value:n?CG(n.proof):"0/0"})]}),(0,b.jsxs)("details",{className:"proof-disclosure",open:!!r,children:[(0,b.jsxs)("summary",{children:[(0,b.jsx)("span",{children:"Stage evidence"}),(0,b.jsx)("strong",{children:t?`${t.stages.filter(e=>"succeeded"===e.status).length}/${t.stages.length} stages`:"none"})]}),t?(0,b.jsx)("div",{className:"method-stage-evidence-list",children:t.stages.map(e=>(0,b.jsxs)("article",{children:[(0,b.jsx)(D5,{status:e.status,duration:CZ(e.started_at,e.finished_at)}),(0,b.jsxs)("div",{children:[(0,b.jsx)("strong",{children:e.stage_label??e.stage_id}),(0,b.jsx)("p",{children:e.summary??e.latest_proof?.summary??"No stage summary recorded yet."}),(0,b.jsxs)("span",{children:[e.artifacts.length," artifacts / ",e.latest_proof?.checks.length??0," proof checks"]})]})]},e.stage_id))}):(0,b.jsx)("p",{className:"muted",children:"Prepare this data to see stage status, artifacts, proof, and failures."})]}),n?.proof.length?(0,b.jsxs)("details",{className:"proof-disclosure",children:[(0,b.jsxs)("summary",{children:[(0,b.jsx)("span",{children:"Proof checks"}),(0,b.jsxs)("strong",{children:[CG(n.proof)," checks"]})]}),(0,b.jsx)(Ue,{checks:n.proof})]}):null,r?(0,b.jsx)("p",{className:"failure-text",children:r}):null]}):null}function DL({onOpenRunPage:e,runs:t}){return(0,b.jsx)(Dn,{runs:t,onSelectRun:e})}function DM({view:e}){let t=e.testRun?.comparison??null,n=Dj(e);return(0,b.jsxs)("div",{className:"source-tab-panel",children:[(0,b.jsxs)("div",{className:"source-section-head",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h2",{children:"Readiness checks"}),(0,b.jsx)("p",{children:n.summary})]}),(0,b.jsx)(D5,{status:n.status,duration:e.testRun?CZ(e.testRun.started_at,e.testRun.finished_at):"not checked"})]}),(0,b.jsxs)("div",{className:"metric-grid",children:[(0,b.jsx)(D8,{label:"Configured checks",value:CS.format(n.check_results.configured)}),(0,b.jsx)(D8,{label:"Source files",value:t?.raw?`${t.raw.passed_cases}/${t.raw.total_cases}`:"-"}),(0,b.jsx)(D8,{label:"Portable Context",value:t?.compiled?`${t.compiled.passed_cases}/${t.compiled.total_cases}`:"-"}),(0,b.jsx)(D8,{label:"Readiness delta",value:function(e){if(null==e)return"-";let t=e<=1?100*e:e,n=+!Number.isInteger(t);return`${t.toFixed(n)}%`}(t?.summary.pass_rate_delta)}),(0,b.jsx)(D8,{label:"Check mode",value:e.testRun?.mode??"not checked"})]}),(0,b.jsx)(DR,{view:e}),n.checks.length>0?(0,b.jsx)("div",{className:"check-stack",children:n.checks.map(e=>(0,b.jsxs)("article",{children:[(0,b.jsx)("span",{className:e.ok?"status-ok":"status-fail",children:e.ok?"Pass":"Review"}),(0,b.jsxs)("p",{children:[e.summary,e.detail?` - ${e.detail}`:""]})]},`${e.gate}-${e.summary}`))}):null,e.testRun?.error?(0,b.jsxs)("div",{className:"error-box",children:[(0,b.jsx)("strong",{children:"Latest check failed"}),(0,b.jsx)("code",{children:e.testRun.error})]}):null]})}let DF=/^[a-z0-9][a-z0-9-]{0,79}$/,DB=e=>uv.string().trim().min(1,`${e} is required.`),DW=uv.string().trim(),DH=e=>DB(e).regex(DF,`${e} must use lowercase letters, numbers, and dashes.`);function DV(e,t){if(e.success)return{};let n={};for(let r of e.error.issues){let e=t[r.path.join(".")]??t[r.path.at(-1)?.toString()??""]??"";e&&!n[e]&&(n[e]=r.message)}return n}function DJ(e,t){let n=e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,72).replace(/-+$/g,"")||"preparation";if(!t.has(n))return n;for(let e=2;e<100;e+=1){let r=`${n}-${e}`;if(!t.has(r))return r}return`${n}-${Date.now().toString(36)}`}function DG(e){let t=e.trim();return t.length>0?t:void 0}function DK(e){let t=IV.safeParse(e);if(t.success){var n;return n=t.data,[`Agent work: ${n.task_prompt}`,IJ("Portable-context output",n.portable_output),IJ("Readiness checks",n.readiness_notes)].filter(e=>!!e).join("\n")}return[`Agent work: ${e.task_prompt}`,DG(e.portable_output)?`Portable-context output: ${e.portable_output}`:null,DG(e.readiness_notes)?`Readiness checks: ${e.readiness_notes}`:null].filter(e=>!!e).join("\n")}function Dq({controlPath:e,preparationViews:t,methods:n}){let r=new Set(t.map(e=>e.name)),i=e??"";return{id:"create-preparation",title:"Create Preparation",description:"Tell Interf what this Source Folder should support. It will propose a run before anything changes.",submitLabel:"Review Proposal",initialValues:{name:DJ(i?DE(i):"preparation",r),path:i,about:"",method:"interf-default",readiness_notes:""},schema:uv.object({name:DH("Preparation name"),path:DB("Source Folder"),about:DB("Agent work"),method:DW.refine(e=>""===e||DF.test(e),"Method must use lowercase letters, numbers, and dashes."),readiness_notes:DW}).strict().superRefine((e,t)=>{r.has(e.name)&&t.addIssue({code:uv.ZodIssueCode.custom,path:["name"],message:"A Preparation with this name already exists."})}),validateRequest:e=>DV(IH.safeParse(e),{name:"name",path:"path",about:"about",method:"method"}),valuesPreview:e=>({name:e.name,path:e.path,about:e.about,...DG(e.method)?{method:e.method}:{},...DG(e.readiness_notes)?{readiness_notes:e.readiness_notes}:{}}),buildDraft:e=>{let t={name:e.name,path:e.path,about:e.about,...DG(e.method)?{method:e.method}:{},...DG(e.readiness_notes)?{readiness_notes:e.readiness_notes}:{}};return{preparation:e.name,values:t,message:[`Create Preparation ${e.name}.`,`Source folder: ${e.path}`,`Agent work: ${e.about}`,DG(e.method)?`Method: ${e.method}`:null,DG(e.readiness_notes)?`Readiness checks: ${e.readiness_notes}`:null,"Use the attached values as the CLI parameters and internal preparation fields before proposing the action."].filter(e=>!!e).join("\n")}},fields:[{name:"name",label:"Preparation name",type:"text",help:"A short id for this agent job and its portable-context folder.",context:"Used in the CLI, saved on the Preparation, and used for the portable-context folder name.",placeholder:"launch-notes"},{name:"path",label:"Source Folder",type:"text",readOnly:!0,help:"Current folder. Interf reads it and writes portable context in the Workspace.",context:"Source files stay unchanged. Interf writes portable context in the Workspace.",placeholder:"./source-folder"},{name:"about",label:"Agent work",type:"textarea",rows:4,help:"What agents should be able to do after this folder is prepared.",context:"Sent to the local agent as the Preparation intent and saved with the Preparation.",placeholder:"What should agents be able to do with this prepared data?"},{name:"method",label:"Method",type:"select",help:"How Interf should process this Source Folder.",context:"Saved as the Method selected for this Preparation.",options:function(e){let t=new Set,n=[];for(let r of[{id:"interf-default",label:"interf-default"},...e])t.has(r.id)||(t.add(r.id),n.push({label:r.label??r.id,value:r.id}));return n}(n)},{name:"readiness_notes",label:"Readiness guidance",type:"textarea",rows:3,help:"What would prove the portable context is good enough for this job.",context:"Used as guidance when Interf proposes Preparation-level readiness checks.",placeholder:"What must be true before this Preparation is ready?"}]}}function DY({defaultPreparation:e,methods:t}){let n=new Set(t.map(e=>e.id)),r=DJ(e?`${e}-method`:"custom-method",n),i=r.split("-").filter(Boolean).map(e=>`${e.charAt(0).toUpperCase()}${e.slice(1)}`).join(" ");return{id:"create-method",title:"Create Method",description:"Describe a reusable way to prepare files for agent work.",submitLabel:"Review Proposal",initialValues:{method_id:r,label:i,hint:"",task_prompt:"",portable_output:"",readiness_notes:""},schema:uv.object({method_id:DH("Method id"),label:DB("Label"),hint:DB("Summary"),task_prompt:DB("Agent work"),portable_output:DW,readiness_notes:DW}).strict().superRefine((e,t)=>{n.has(e.method_id)&&t.addIssue({code:uv.ZodIssueCode.custom,path:["method_id"],message:"A Method with this id already exists."})}),validateRequest:e=>DV(IV.safeParse(e),{method_id:"method_id",label:"label",hint:"hint",task_prompt:"task_prompt",portable_output:"portable_output",readiness_notes:"readiness_notes"}),valuesPreview:e=>({method_id:e.method_id,label:e.label,hint:e.hint,task_prompt:DK(e)}),buildDraft:t=>({preparation:e,values:{method_id:t.method_id,label:t.label,hint:t.hint,task_prompt:DK(t)},message:[`Create Method ${t.method_id}${e?` for Preparation ${e}`:""}.`,`Label: ${t.label}`,`Summary: ${t.hint}`,DK(t),"Use the attached values as the Method authoring request before proposing the action."].join("\n")}),fields:[{name:"method_id",label:"Method id",type:"text",help:"A stable id for this reusable Method.",context:"Saved under the Workspace methods folder and referenced by Preparations.",placeholder:"chart-analysis"},{name:"label",label:"Label",type:"text",help:"A readable name people can choose later.",context:"Shown in the UI and sent to the local agent while drafting the Method.",placeholder:"Chart analysis"},{name:"hint",label:"Summary",type:"textarea",rows:2,help:"A short description of what this Method prepares.",context:"Gives the local agent quick context before it drafts stages and outputs.",placeholder:"Prepare charts, tables, and cited findings for analyst agents."},{name:"task_prompt",label:"Agent work",type:"textarea",rows:4,help:"The job this Method should make possible for agents.",context:"Used as the main Method-authoring instruction.",placeholder:"Describe the job this Method should make possible."},{name:"portable_output",label:"Portable-context output",type:"textarea",rows:3,help:"Files, sections, or evidence agents should receive in portable context.",context:"Guides the Method output shape and stage artifact plan.",placeholder:"Describe the files or sections agents should receive."},{name:"readiness_notes",label:"Readiness guidance",type:"textarea",rows:3,help:"What a Preparation using this Method should be able to prove.",context:"Guides Preparation-level readiness checks. Method acceptance criteria stay separate.",placeholder:"Describe the evidence that should make a Preparation ready."}]}}function DX(e,t){return DY({defaultPreparation:e.name,methods:t})}function DQ({form:e,onClose:t,onSubmit:n}){let[r,i]=(0,_.useState)(e.initialValues),[a,o]=(0,_.useState)({});(0,_.useEffect)(()=>{let e=e=>{"Escape"===e.key&&t()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[t]);let s=(e,t)=>{i(n=>({...n,[e]:t})),o(t=>{if(!t[e])return t;let n={...t};return delete n[e],n})};return(0,b.jsx)("div",{className:"action-dialog-backdrop",onMouseDown:e=>{e.target===e.currentTarget&&t()},role:"presentation",children:(0,b.jsxs)("section",{"aria-modal":"true","aria-labelledby":`${e.id}-title`,className:"action-dialog",role:"dialog",children:[(0,b.jsxs)("div",{className:"action-dialog-head",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h2",{id:`${e.id}-title`,children:e.title}),(0,b.jsx)("p",{children:e.description})]}),(0,b.jsx)("button",{"aria-label":"Close action form",className:"icon-button",onClick:t,type:"button",children:(0,b.jsx)(pG,{size:16})})]}),(0,b.jsxs)("form",{className:"action-form",onSubmit:t=>{t.preventDefault(),(()=>{let t=e.schema.safeParse(r);if(!t.success)return o(function(e){let t={};for(let n of e.issues){let e=String(n.path[0]??"");e&&!t[e]&&(t[e]=n.message)}return t}(t.error));let i=e.validateRequest?.(t.data)??{};Object.keys(i).length>0?o(i):n(e.buildDraft(t.data))})()},children:[e.fields.map((e,t)=>(0,b.jsxs)("label",{className:"action-form-field",children:[(0,b.jsx)("span",{children:e.label}),(0,b.jsx)("p",{children:e.help}),e.readOnly?(0,b.jsx)("div",{className:"action-form-readonly",children:(0,b.jsx)("code",{children:r[e.name]||e.placeholder})}):"textarea"===e.type?(0,b.jsx)("textarea",{"aria-invalid":!!a[e.name],autoFocus:0===t,onChange:t=>s(e.name,t.target.value),placeholder:e.placeholder,rows:e.rows??3,value:r[e.name]??""}):"select"===e.type?(0,b.jsx)("select",{"aria-invalid":!!a[e.name],autoFocus:0===t,onChange:t=>s(e.name,t.target.value),value:r[e.name]??"",children:e.options?.map(e=>(0,b.jsx)("option",{value:e.value,children:e.label},e.value))}):(0,b.jsx)("input",{"aria-invalid":!!a[e.name],autoFocus:0===t,onChange:t=>s(e.name,t.target.value),placeholder:e.placeholder,type:"text",value:r[e.name]??""}),a[e.name]?(0,b.jsx)("strong",{children:a[e.name]}):null]},e.name)),(0,b.jsxs)("details",{className:"action-values-preview",children:[(0,b.jsx)("summary",{children:"Details sent with proposal"}),(0,b.jsx)(pp,{data:e.valuesPreview(r),expandLevel:0})]}),(0,b.jsxs)("div",{className:"action-dialog-actions",children:[(0,b.jsx)("button",{className:"toolbar-button",onClick:t,type:"button",children:"Cancel"}),(0,b.jsx)("button",{className:"preparation-action-button",type:"submit",children:e.submitLabel})]})]})]})})}function D0({className:e="preparation-action-button",form:t,preparation:n,label:r,message:i,onPromptAction:a}){let[o,s]=(0,_.useState)(!1);return t?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("button",{className:e,onClick:()=>s(!0),type:"button",children:r}),o?(0,b.jsx)(DQ,{form:t,onClose:()=>s(!1),onSubmit:e=>{s(!1),a(e)}}):null]}):(0,b.jsx)("button",{className:e,onClick:()=>a({preparation:n,message:i}),type:"button",children:r})}function D1({actions:e}){let[t,n]=(0,_.useState)(!1),[r,i]=(0,_.useState)(null),a=(0,_.useRef)(null),o=(0,_.useRef)(null);return(0,_.useEffect)(()=>{if(!t)return;let e=e=>{let t=e.target;t instanceof Node&&(a.current?.contains(t)||o.current?.contains(t))||n(!1)},r=e=>{"Escape"===e.key&&n(!1)};return document.addEventListener("pointerdown",e),document.addEventListener("keydown",r),()=>{document.removeEventListener("pointerdown",e),document.removeEventListener("keydown",r)}},[t]),(0,b.jsxs)("span",{className:"row-action-menu",onClick:e=>e.stopPropagation(),children:[(0,b.jsx)("button",{"aria-expanded":t,"aria-label":"Open row actions",className:`row-action-trigger${t?" active":""}`,onClick:e=>{e.stopPropagation();let t=e.currentTarget.getBoundingClientRect();i({right:Math.max(12,window.innerWidth-t.right),top:Math.min(t.bottom+6,window.innerHeight-12)}),n(e=>!e)},ref:a,type:"button",children:(0,b.jsx)(C$,{size:18})}),t&&r?(0,b.jsx)("div",{className:"row-action-menu-content",ref:o,style:{right:r.right,top:r.top},children:e.map(e=>(0,b.jsx)("button",{className:e.destructive?"destructive":"",onClick:t=>{t.stopPropagation(),n(!1),e.onSelect()},type:"button",children:e.label},e.label))}):null]})}function D4({detail:e,items:t,rootDetail:n,rootLabel:r,rootOpenPath:i,serviceUrl:a,title:o}){let s=t.map(e=>{let t=e.path??e.name.replace(/\/$/,"");return{detail:e.detail,name:e.name,openPath:CW(i,t),path:t,type:e.type}});return(0,b.jsx)(DP,{detail:e,nodes:s,rootDetail:n,rootLabel:r,rootOpenPath:i,serviceUrl:a,title:o})}function D6({label:e,path:t,serviceUrl:n,variant:r="default"}){let[i,a]=(0,_.useState)("idle");return(0,b.jsx)("button",{className:`local-open-button ${"primary"===r?"primary":""} ${"compact"===r?"compact":""} ${"failed"===i?"failed":""}`,disabled:"opening"===i,onClick:()=>{a("opening"),CO(n,t).then(()=>a("idle")).catch(()=>a("failed"))},type:"button",children:"opening"===i?"Opening":"failed"===i?"Open Failed":e})}function D2({className:e="",disabled:t=!1,displayPath:n,emptyText:r,label:i,path:a,serviceUrl:o,title:s}){let l=n??a??r??"",u=a&&!t?a:null;return(0,b.jsxs)("div",{className:`path-open-control ${e}${u?"":" disabled"}`,title:s??a??r,children:[(0,b.jsxs)("div",{className:"path-open-copy",children:[(0,b.jsx)("span",{children:i}),(0,b.jsx)("code",{children:l})]}),u?(0,b.jsx)("div",{className:"path-open-action",children:(0,b.jsx)(D6,{path:u,serviceUrl:o,label:"Open",variant:"compact"})}):null]})}function D5({status:e,duration:t}){return(0,b.jsxs)("span",{className:`status-badge ${CR(e)}`,children:[(0,b.jsx)("span",{className:"status-dot"}),CL(e),t?(0,b.jsx)("em",{children:t}):null]})}function D3({label:e,tone:t}){return(0,b.jsxs)("span",{className:`status-badge ${t}`,children:[(0,b.jsx)("span",{className:"status-dot"}),e]})}function D9({label:e,monospace:t=!1,value:n}){return(0,b.jsxs)("div",{className:"meta-item",children:[(0,b.jsx)("span",{children:e}),t?(0,b.jsx)("code",{children:n}):(0,b.jsx)("strong",{children:n})]})}function D8({detail:e,label:t,value:n}){return(0,b.jsxs)("div",{className:"metric-box",children:[(0,b.jsx)("span",{children:t}),(0,b.jsx)("strong",{children:n}),e?(0,b.jsx)("p",{children:e}):null]})}function D7({detail:e,title:t}){return(0,b.jsxs)("div",{className:"panel-title",children:[(0,b.jsx)("h2",{children:t}),(0,b.jsx)("span",{children:e})]})}function Ue({checks:e}){return 0===e.length?(0,b.jsx)("p",{className:"muted",children:"No proof record yet."}):(0,b.jsx)("div",{className:"check-stack",children:e.map(e=>(0,b.jsxs)("article",{children:[(0,b.jsx)("span",{className:e.ok?"status-ok":"status-fail",children:e.ok?"Pass":"Fail"}),(0,b.jsxs)("p",{children:[e.label,e.detail?` - ${e.detail}`:""]})]},`${e.id}-${e.label}`))})}e.s(["default",0,function(){let[e,t]=(0,_.useState)(0),[n,r]=(0,_.useState)(()=>({status:"loading",serviceUrl:CN()}));return((0,_.useEffect)(()=>{let e=!1,t=CN();async function n(){try{let n=await CD(t);e||r({status:"online",serviceUrl:t,...n})}catch(n){e||r({status:"offline",serviceUrl:t,message:n instanceof Error?n.message:String(n)})}}n();let i=setInterval(n,2e3);return()=>{e=!0,clearInterval(i)}},[e]),"online"!==n.status)?(0,b.jsxs)("main",{className:"compiler-shell",children:[(0,b.jsx)(C4,{state:n}),(0,b.jsx)("div",{className:"content-shell",children:(0,b.jsxs)("section",{className:"offline-panel",children:[(0,b.jsx)("p",{children:"loading"===n.status?"Loading local Interf service.":"The local Interf service is offline."}),"offline"===n.status?(0,b.jsx)("code",{children:n.message}):null]})})]}):(0,b.jsx)(C1,{state:n,onRefresh:()=>t(e=>e+1)})}],12562)}]);
118
+ Readiness checks: [describe what proves this data is ready].`,onPromptAction:t})]})}function DD({serviceUrl:e,view:t}){let n=t.sourceFolder??t.preparation.preparation.path,r=DU(t.sourceFiles,n,180);return(0,b.jsxs)("div",{className:"source-tab-panel",children:[(0,b.jsxs)("div",{className:"source-section-head",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h2",{children:"Source folder structure"}),(0,b.jsx)(D5,{className:"section-path-control",label:"Source Folder",path:n,serviceUrl:e})]}),(0,b.jsx)(D3,{status:"idle",duration:`${CS.format(t.sourceFiles.length)} files`})]}),0===r.nodes.length?(0,b.jsxs)("div",{className:"empty-table portable-empty",children:[(0,b.jsx)("strong",{children:"No indexed source files"}),(0,b.jsx)("span",{children:"This folder has no source files visible to Interf yet."})]}):(0,b.jsx)(DP,{detail:`${CS.format(t.sourceFiles.length)} files`,nodes:r.nodes,omitted:r.omitted,rootDetail:n,rootLabel:DE(n),rootOpenPath:n,serviceUrl:e,title:"Source files"})]})}function DU(e,t,n){let r={children:new Map,name:"",path:"",type:"folder"};for(let n of e){let e=n.path.split("/").filter(Boolean),i=r;e.forEach((r,a)=>{let o=a===e.length-1,s=i.children.get(r)??{children:new Map,name:r,path:e.slice(0,a+1).join("/"),type:o?"file":"folder"};o&&(s.type="file",s.detail=`${CA(n.size_bytes)} / ${CP(n.modified_at)}`),s.openPath=t?CW(t,e.slice(0,a+1).join("/")):void 0,i.children.set(r,s),i=s})}let i=e=>[...e.values()].sort((e,t)=>e.type!==t.type?"folder"===e.type?-1:1:e.name.localeCompare(t.name)).map(e=>({children:i(e.children),detail:e.detail,name:e.name,openPath:e.openPath,path:e.path,type:e.type})),a=i(r.children),o=function e(t){return t.reduce((t,n)=>t+1+e(n.children??[]),0)}(a);return{nodes:function e(t,n){let r=[],i=0;for(let a of t){if(i>=n)break;let t=n-(i+=1),o=t>0?e(a.children??[],t):{nodes:[],used:0};i+=o.used,r.push({...a,children:o.nodes})}return{nodes:r,used:i}}(a,n).nodes,omitted:Math.max(0,o-n)}}function DP({detail:e,nodes:t,omitted:n=0,rootDetail:r,rootLabel:i,rootOpenPath:a,serviceUrl:o,title:s}){let[l,u]=(0,_.useState)(()=>{let e,n;return e=new Set,(n=t=>{for(let r of t)"folder"===r.type&&r.children?.length&&(e.add(r.path),n(r.children))})(t),e}),d=e=>{u(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})};return(0,b.jsxs)("div",{className:"file-explorer",role:"tree",children:[(0,b.jsxs)("div",{className:"file-explorer-head",children:[(0,b.jsx)("span",{children:s}),(0,b.jsx)("em",{children:e})]}),(0,b.jsxs)("div",{className:"file-explorer-root",title:r,children:[(0,b.jsx)(Cx,{size:16}),(0,b.jsxs)("div",{children:[(0,b.jsx)("strong",{children:i}),(0,b.jsx)("span",{children:r})]}),a?(0,b.jsx)("div",{className:"file-explorer-actions",children:(0,b.jsx)(D2,{path:a,serviceUrl:o,label:"Open",variant:"compact"})}):null]}),(0,b.jsxs)("div",{className:"file-explorer-items",children:[t.map(e=>(0,b.jsx)(DZ,{expandedPaths:l,node:e,serviceUrl:o,togglePath:d},e.path)),n>0?(0,b.jsxs)("div",{className:"file-explorer-row muted",role:"treeitem",children:[(0,b.jsx)("span",{className:"file-explorer-spacer"}),(0,b.jsx)(Cx,{size:14}),(0,b.jsxs)("div",{children:[(0,b.jsxs)("strong",{children:[CS.format(n)," more entries"]}),(0,b.jsx)("span",{children:"Open the folder to inspect the full tree."})]})]}):null]})]})}function DZ({depth:e=0,expandedPaths:t,node:n,serviceUrl:r,togglePath:i}){let a="folder"===n.type,o=a&&t.has(n.path),s=!!n.children?.length,l=a?`${n.name}/`:n.name,u=n.detail?`${n.path} - ${n.detail}`:n.path;return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:`file-explorer-row ${a?"folder":"file"}`,role:"treeitem",style:{paddingLeft:`${8+16*e}px`},title:u,children:[a&&s?(0,b.jsx)("button",{"aria-label":o?`Collapse ${n.name}`:`Expand ${n.name}`,className:`file-explorer-disclosure ${o?"expanded":""}`,onClick:()=>i(n.path),type:"button",children:(0,b.jsx)(uD,{size:14})}):(0,b.jsx)("span",{className:"file-explorer-spacer"}),a?(0,b.jsx)(Cx,{size:14}):(0,b.jsx)(Cv,{size:14}),a?(0,b.jsxs)("button",{className:"file-explorer-label",onClick:()=>{s&&i(n.path)},type:"button",children:[(0,b.jsx)("strong",{children:l}),n.detail?(0,b.jsx)("span",{children:n.detail}):null]}):(0,b.jsxs)("div",{className:"file-explorer-label",children:[(0,b.jsx)("strong",{children:l}),n.detail?(0,b.jsx)("span",{children:n.detail}):null]}),n.openPath?(0,b.jsx)("div",{className:"file-explorer-actions",children:(0,b.jsx)(D2,{path:n.openPath,serviceUrl:r,label:"Open",variant:"compact"})}):null]}),o?n.children?.map(n=>(0,b.jsx)(DZ,{depth:e+1,expandedPaths:t,node:n,serviceUrl:r,togglePath:i},n.path)):null]})}function DA({serviceUrl:e,view:t}){if(!t.method)return(0,b.jsxs)("div",{className:"empty-table portable-empty",children:[(0,b.jsx)("strong",{children:"Method package not found"}),(0,b.jsx)("span",{children:t.methodId})]});let n=t.context?CW(t.context.path,".interf/method"):t.method.path;return(0,b.jsx)(Db,{compileRun:t.compileRun,packagePath:n,serviceUrl:e,method:t.method})}function DR({view:e}){let t=e.compileRun,n=e.latestObservableCompile,r=n?CY(n):null;return t||n?(0,b.jsxs)("section",{className:"readiness-evidence-panel","aria-label":`${e.name} readiness evidence`,children:[(0,b.jsx)(Ue,{title:"Readiness evidence",detail:t?CZ(t.started_at,t.finished_at):"not built"}),(0,b.jsxs)("div",{className:"metric-grid compact-metrics",children:[(0,b.jsx)(D7,{label:"Run",value:t?.run_id?CB(t.run_id):"none"}),(0,b.jsx)(D7,{label:"Stages",value:t?`${t.stages.filter(e=>"succeeded"===e.status).length}/${t.stages.length}`:`0/${e.method?.stages.length??0}`}),(0,b.jsx)(D7,{label:"Artifacts",value:CS.format(e.context?.artifacts.length??0)}),(0,b.jsx)(D7,{label:"Proof checks",value:n?CG(n.proof):"0/0"})]}),(0,b.jsxs)("details",{className:"proof-disclosure",open:!!r,children:[(0,b.jsxs)("summary",{children:[(0,b.jsx)("span",{children:"Stage evidence"}),(0,b.jsx)("strong",{children:t?`${t.stages.filter(e=>"succeeded"===e.status).length}/${t.stages.length} stages`:"none"})]}),t?(0,b.jsx)("div",{className:"method-stage-evidence-list",children:t.stages.map(e=>(0,b.jsxs)("article",{children:[(0,b.jsx)(D3,{status:e.status,duration:CZ(e.started_at,e.finished_at)}),(0,b.jsxs)("div",{children:[(0,b.jsx)("strong",{children:e.stage_label??e.stage_id}),(0,b.jsx)("p",{children:e.summary??e.latest_proof?.summary??"No stage summary recorded yet."}),(0,b.jsxs)("span",{children:[e.artifacts.length," artifacts / ",e.latest_proof?.checks.length??0," proof checks"]})]})]},e.stage_id))}):(0,b.jsx)("p",{className:"muted",children:"Prepare this data to see stage status, artifacts, proof, and failures."})]}),n?.proof.length?(0,b.jsxs)("details",{className:"proof-disclosure",children:[(0,b.jsxs)("summary",{children:[(0,b.jsx)("span",{children:"Proof checks"}),(0,b.jsxs)("strong",{children:[CG(n.proof)," checks"]})]}),(0,b.jsx)(Ut,{checks:n.proof})]}):null,r?(0,b.jsx)("p",{className:"failure-text",children:r}):null]}):null}function DL({onOpenRunPage:e,runs:t}){return(0,b.jsx)(Dn,{runs:t,onSelectRun:e})}function DM({view:e}){let t=e.testRun?.comparison??null,n=Dj(e);return(0,b.jsxs)("div",{className:"source-tab-panel",children:[(0,b.jsxs)("div",{className:"source-section-head",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h2",{children:"Readiness checks"}),(0,b.jsx)("p",{children:n.summary})]}),(0,b.jsx)(D3,{status:n.status,duration:e.testRun?CZ(e.testRun.started_at,e.testRun.finished_at):"not checked"})]}),(0,b.jsxs)("div",{className:"metric-grid",children:[(0,b.jsx)(D7,{label:"Configured checks",value:CS.format(n.check_results.configured)}),(0,b.jsx)(D7,{label:"Source files",value:t?.raw?`${t.raw.passed_cases}/${t.raw.total_cases}`:"-"}),(0,b.jsx)(D7,{label:"Portable Context",value:t?.compiled?`${t.compiled.passed_cases}/${t.compiled.total_cases}`:"-"}),(0,b.jsx)(D7,{label:"Readiness delta",value:function(e){if(null==e)return"-";let t=e<=1?100*e:e,n=+!Number.isInteger(t);return`${t.toFixed(n)}%`}(t?.summary.pass_rate_delta)}),(0,b.jsx)(D7,{label:"Check mode",value:e.testRun?.mode??"not checked"})]}),(0,b.jsx)(DR,{view:e}),n.checks.length>0?(0,b.jsx)("div",{className:"check-stack",children:n.checks.map(e=>(0,b.jsxs)("article",{children:[(0,b.jsx)("span",{className:e.ok?"status-ok":"status-fail",children:e.ok?"Pass":"Review"}),(0,b.jsxs)("p",{children:[e.summary,e.detail?` - ${e.detail}`:""]})]},`${e.gate}-${e.summary}`))}):null,e.testRun?.error?(0,b.jsxs)("div",{className:"error-box",children:[(0,b.jsx)("strong",{children:"Latest check failed"}),(0,b.jsx)("code",{children:e.testRun.error})]}):null]})}let DF=/^[a-z0-9][a-z0-9-]{0,79}$/,DB=e=>uv.string().trim().min(1,`${e} is required.`),DW=uv.string().trim(),DH=e=>DB(e).regex(DF,`${e} must use lowercase letters, numbers, and dashes.`);function DV(e,t){if(e.success)return{};let n={};for(let r of e.error.issues){let e=t[r.path.join(".")]??t[r.path.at(-1)?.toString()??""]??"";e&&!n[e]&&(n[e]=r.message)}return n}function DJ(e,t){let n=e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,72).replace(/-+$/g,"")||"preparation";if(!t.has(n))return n;for(let e=2;e<100;e+=1){let r=`${n}-${e}`;if(!t.has(r))return r}return`${n}-${Date.now().toString(36)}`}function DG(e){let t=e.trim();return t.length>0?t:void 0}function DK(e){let t=IV.safeParse(e);if(t.success){var n;return n=t.data,[`Agent work: ${n.task_prompt}`,IJ("Portable-context output",n.portable_output),IJ("Readiness checks",n.readiness_notes)].filter(e=>!!e).join("\n")}return[`Agent work: ${e.task_prompt}`,DG(e.portable_output)?`Portable-context output: ${e.portable_output}`:null,DG(e.readiness_notes)?`Readiness checks: ${e.readiness_notes}`:null].filter(e=>!!e).join("\n")}function Dq({controlPath:e,preparationViews:t,methods:n}){let r=new Set(t.map(e=>e.name)),i=e??"";return{id:"create-preparation",title:"Prepare Source Folder",description:"Choose the Preparation name and Method. Approval saves the Preparation and starts a prepare run.",submitLabel:"Review Proposal",initialValues:{name:DJ(i?DE(i):"preparation",r),path:i,about:"",method:"interf-default",readiness_notes:""},schema:uv.object({name:DH("Preparation name"),path:DB("Source Folder"),about:DB("Agent work"),method:DW.refine(e=>""===e||DF.test(e),"Method must use lowercase letters, numbers, and dashes."),readiness_notes:DW}).strict().superRefine((e,t)=>{r.has(e.name)&&t.addIssue({code:uv.ZodIssueCode.custom,path:["name"],message:"A Preparation with this name already exists."})}),validateRequest:e=>DV(IH.safeParse(e),{name:"name",path:"path",about:"about",method:"method"}),valuesPreview:e=>({name:e.name,path:e.path,about:e.about,prepare_after_setup:!0,...DG(e.method)?{method:e.method}:{},...DG(e.readiness_notes)?{readiness_notes:e.readiness_notes}:{}}),buildDraft:e=>{let t={name:e.name,path:e.path,about:e.about,prepare_after_setup:!0,...DG(e.method)?{method:e.method}:{},...DG(e.readiness_notes)?{readiness_notes:e.readiness_notes}:{}};return{preparation:e.name,values:t,message:[`Prepare Source Folder as Preparation ${e.name}.`,`Source folder: ${e.path}`,`Agent work: ${e.about}`,DG(e.method)?`Method: ${e.method}`:null,DG(e.readiness_notes)?`Readiness checks: ${e.readiness_notes}`:null,"Use the attached values as the source of truth. Save the Preparation and then run prepare with the selected Method."].filter(e=>!!e).join("\n")}},fields:[{name:"name",label:"Preparation name",type:"text",help:"A short id for this agent job and its portable-context folder.",context:"Used in the CLI, saved on the Preparation, and used for the portable-context folder name.",placeholder:"launch-notes"},{name:"path",label:"Source Folder",type:"text",readOnly:!0,help:"Current folder. Interf reads it and writes portable context in the Workspace.",context:"Source files stay unchanged. Interf writes portable context in the Workspace.",placeholder:"./source-folder"},{name:"about",label:"Agent work",type:"textarea",rows:4,help:"What agents should be able to do after this folder is prepared.",context:"Sent to the local agent as the Preparation intent and saved with the Preparation.",placeholder:"What should agents be able to do with this prepared data?"},{name:"method",label:"Method",type:"select",help:"How Interf should process this Source Folder.",context:"Saved as the Method selected for this Preparation.",options:function(e){let t=new Set,n=[];for(let r of[{id:"interf-default",label:"interf-default"},...e])t.has(r.id)||(t.add(r.id),n.push({label:r.label??r.id,value:r.id}));return n}(n)},{name:"readiness_notes",label:"Readiness guidance",type:"textarea",rows:3,help:"What would prove the portable context is good enough for this job.",context:"Used as guidance when Interf proposes Preparation-level readiness checks.",placeholder:"What must be true before this Preparation is ready?"}]}}function DY({defaultPreparation:e,methods:t}){let n=new Set(t.map(e=>e.id)),r=DJ(e?`${e}-method`:"custom-method",n),i=r.split("-").filter(Boolean).map(e=>`${e.charAt(0).toUpperCase()}${e.slice(1)}`).join(" ");return{id:"create-method",title:"Create Method",description:"Describe a reusable way to prepare files for agent work.",submitLabel:"Review Proposal",initialValues:{method_id:r,label:i,hint:"",task_prompt:"",portable_output:"",readiness_notes:""},schema:uv.object({method_id:DH("Method id"),label:DB("Label"),hint:DB("Summary"),task_prompt:DB("Agent work"),portable_output:DW,readiness_notes:DW}).strict().superRefine((e,t)=>{n.has(e.method_id)&&t.addIssue({code:uv.ZodIssueCode.custom,path:["method_id"],message:"A Method with this id already exists."})}),validateRequest:e=>DV(IV.safeParse(e),{method_id:"method_id",label:"label",hint:"hint",task_prompt:"task_prompt",portable_output:"portable_output",readiness_notes:"readiness_notes"}),valuesPreview:e=>({method_id:e.method_id,label:e.label,hint:e.hint,task_prompt:DK(e)}),buildDraft:t=>({preparation:e,values:{method_id:t.method_id,label:t.label,hint:t.hint,task_prompt:DK(t)},message:[`Create Method ${t.method_id}${e?` for Preparation ${e}`:""}.`,`Label: ${t.label}`,`Summary: ${t.hint}`,DK(t),"Use the attached values as the Method authoring request before proposing the action."].join("\n")}),fields:[{name:"method_id",label:"Method id",type:"text",help:"A stable id for this reusable Method.",context:"Saved under the Workspace methods folder and referenced by Preparations.",placeholder:"chart-analysis"},{name:"label",label:"Label",type:"text",help:"A readable name people can choose later.",context:"Shown in the UI and sent to the local agent while drafting the Method.",placeholder:"Chart analysis"},{name:"hint",label:"Summary",type:"textarea",rows:2,help:"A short description of what this Method prepares.",context:"Gives the local agent quick context before it drafts stages and outputs.",placeholder:"Prepare charts, tables, and cited findings for analyst agents."},{name:"task_prompt",label:"Agent work",type:"textarea",rows:4,help:"The job this Method should make possible for agents.",context:"Used as the main Method-authoring instruction.",placeholder:"Describe the job this Method should make possible."},{name:"portable_output",label:"Portable-context output",type:"textarea",rows:3,help:"Files, sections, or evidence agents should receive in portable context.",context:"Guides the Method output shape and stage artifact plan.",placeholder:"Describe the files or sections agents should receive."},{name:"readiness_notes",label:"Readiness guidance",type:"textarea",rows:3,help:"What a Preparation using this Method should be able to prove.",context:"Guides Preparation-level readiness checks. Method acceptance criteria stay separate.",placeholder:"Describe the evidence that should make a Preparation ready."}]}}function DX(e,t){return DY({defaultPreparation:e.name,methods:t})}function DQ({form:e,onClose:t,onSubmit:n}){let[r,i]=(0,_.useState)(e.initialValues),[a,o]=(0,_.useState)({});(0,_.useEffect)(()=>{let e=e=>{"Escape"===e.key&&t()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[t]);let s=(e,t)=>{i(n=>({...n,[e]:t})),o(t=>{if(!t[e])return t;let n={...t};return delete n[e],n})};return(0,b.jsx)("div",{className:"action-dialog-backdrop",onMouseDown:e=>{e.target===e.currentTarget&&t()},role:"presentation",children:(0,b.jsxs)("section",{"aria-modal":"true","aria-labelledby":`${e.id}-title`,className:"action-dialog",role:"dialog",children:[(0,b.jsxs)("div",{className:"action-dialog-head",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h2",{id:`${e.id}-title`,children:e.title}),(0,b.jsx)("p",{children:e.description})]}),(0,b.jsx)("button",{"aria-label":"Close action form",className:"icon-button",onClick:t,type:"button",children:(0,b.jsx)(pG,{size:16})})]}),(0,b.jsxs)("form",{className:"action-form",onSubmit:t=>{t.preventDefault(),(()=>{let t=e.schema.safeParse(r);if(!t.success)return o(function(e){let t={};for(let n of e.issues){let e=String(n.path[0]??"");e&&!t[e]&&(t[e]=n.message)}return t}(t.error));let i=e.validateRequest?.(t.data)??{};Object.keys(i).length>0?o(i):n(e.buildDraft(t.data))})()},children:[e.fields.map((e,t)=>(0,b.jsxs)("label",{className:"action-form-field",children:[(0,b.jsx)("span",{children:e.label}),(0,b.jsx)("p",{children:e.help}),e.readOnly?(0,b.jsx)("div",{className:"action-form-readonly",children:(0,b.jsx)("code",{children:r[e.name]||e.placeholder})}):"textarea"===e.type?(0,b.jsx)("textarea",{"aria-invalid":!!a[e.name],autoFocus:0===t,onChange:t=>s(e.name,t.target.value),placeholder:e.placeholder,rows:e.rows??3,value:r[e.name]??""}):"select"===e.type?(0,b.jsx)("select",{"aria-invalid":!!a[e.name],autoFocus:0===t,onChange:t=>s(e.name,t.target.value),value:r[e.name]??"",children:e.options?.map(e=>(0,b.jsx)("option",{value:e.value,children:e.label},e.value))}):(0,b.jsx)("input",{"aria-invalid":!!a[e.name],autoFocus:0===t,onChange:t=>s(e.name,t.target.value),placeholder:e.placeholder,type:"text",value:r[e.name]??""}),a[e.name]?(0,b.jsx)("strong",{children:a[e.name]}):null]},e.name)),(0,b.jsxs)("details",{className:"action-values-preview",children:[(0,b.jsx)("summary",{children:"Details sent with proposal"}),(0,b.jsx)(pp,{data:e.valuesPreview(r),expandLevel:0})]}),(0,b.jsxs)("div",{className:"action-dialog-actions",children:[(0,b.jsx)("button",{className:"toolbar-button",onClick:t,type:"button",children:"Cancel"}),(0,b.jsx)("button",{className:"preparation-action-button",type:"submit",children:e.submitLabel})]})]})]})})}function D0({className:e="preparation-action-button",form:t,preparation:n,label:r,message:i,onPromptAction:a}){let[o,s]=(0,_.useState)(!1);return t?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("button",{className:e,onClick:()=>s(!0),type:"button",children:r}),o?(0,b.jsx)(DQ,{form:t,onClose:()=>s(!1),onSubmit:e=>{s(!1),a(e)}}):null]}):(0,b.jsx)("button",{className:e,onClick:()=>a({preparation:n,message:i}),type:"button",children:r})}function D1({actions:e}){let[t,n]=(0,_.useState)(!1),[r,i]=(0,_.useState)(null),a=(0,_.useRef)(null),o=(0,_.useRef)(null);return(0,_.useEffect)(()=>{if(!t)return;let e=e=>{let t=e.target;t instanceof Node&&(a.current?.contains(t)||o.current?.contains(t))||n(!1)},r=e=>{"Escape"===e.key&&n(!1)};return document.addEventListener("pointerdown",e),document.addEventListener("keydown",r),()=>{document.removeEventListener("pointerdown",e),document.removeEventListener("keydown",r)}},[t]),(0,b.jsxs)("span",{className:"row-action-menu",onClick:e=>e.stopPropagation(),children:[(0,b.jsx)("button",{"aria-expanded":t,"aria-label":"Open row actions",className:`row-action-trigger${t?" active":""}`,onClick:e=>{e.stopPropagation();let t=e.currentTarget.getBoundingClientRect();i({right:Math.max(12,window.innerWidth-t.right),top:Math.min(t.bottom+6,window.innerHeight-12)}),n(e=>!e)},ref:a,type:"button",children:(0,b.jsx)(C$,{size:18})}),t&&r?(0,b.jsx)("div",{className:"row-action-menu-content",ref:o,style:{right:r.right,top:r.top},children:e.map(e=>(0,b.jsx)("button",{className:e.destructive?"destructive":"",onClick:t=>{t.stopPropagation(),n(!1),e.onSelect()},type:"button",children:e.label},e.label))}):null]})}function D4({items:e,methodId:t}){return(0,b.jsxs)("div",{className:"file-explorer expected-output-list",children:[(0,b.jsxs)("div",{className:"file-explorer-head",children:[(0,b.jsx)("span",{children:"Expected output shape"}),(0,b.jsxs)("em",{children:["from ",t]})]}),e.length>0?(0,b.jsx)("div",{className:"file-explorer-items",children:e.map(e=>(0,b.jsxs)("div",{className:"file-explorer-row folder expected-output-row",children:[(0,b.jsx)("span",{className:"file-explorer-spacer","aria-hidden":"true"}),(0,b.jsx)(Cx,{size:14}),(0,b.jsxs)("div",{className:"file-explorer-label",children:[(0,b.jsx)("strong",{children:e.name}),(0,b.jsx)("span",{children:"Planned output folder from the selected Method"})]}),(0,b.jsx)("span",{className:"expected-output-tag",children:"planned"})]},e.path??e.name))}):(0,b.jsxs)("div",{className:"empty-table portable-empty",children:[(0,b.jsx)("strong",{children:"No Method outputs declared"}),(0,b.jsx)("span",{children:"Choose or edit a Method before preparing this Source Folder."})]})]})}function D6({detail:e,items:t,rootDetail:n,rootLabel:r,rootOpenPath:i,serviceUrl:a,title:o}){let s=t.map(e=>{let t=e.path??e.name.replace(/\/$/,"");return{detail:e.detail,name:e.name,openPath:CW(i,t),path:t,type:e.type}});return(0,b.jsx)(DP,{detail:e,nodes:s,rootDetail:n,rootLabel:r,rootOpenPath:i,serviceUrl:a,title:o})}function D2({label:e,path:t,serviceUrl:n,variant:r="default"}){let[i,a]=(0,_.useState)("idle");return(0,b.jsx)("button",{className:`local-open-button ${"primary"===r?"primary":""} ${"compact"===r?"compact":""} ${"failed"===i?"failed":""}`,disabled:"opening"===i,onClick:()=>{a("opening"),CO(n,t).then(()=>a("idle")).catch(()=>a("failed"))},type:"button",children:"opening"===i?"Opening":"failed"===i?"Open Failed":e})}function D5({className:e="",disabled:t=!1,displayPath:n,emptyText:r,label:i,path:a,serviceUrl:o,title:s}){let l=n??a??r??"",u=a&&!t?a:null;return(0,b.jsxs)("div",{className:`path-open-control ${e}${u?"":" disabled"}`,title:s??a??r,children:[(0,b.jsxs)("div",{className:"path-open-copy",children:[(0,b.jsx)("span",{children:i}),(0,b.jsx)("code",{children:l})]}),u?(0,b.jsx)("div",{className:"path-open-action",children:(0,b.jsx)(D2,{path:u,serviceUrl:o,label:"Open",variant:"compact"})}):null]})}function D3({status:e,duration:t}){return(0,b.jsxs)("span",{className:`status-badge ${CR(e)}`,children:[(0,b.jsx)("span",{className:"status-dot"}),CL(e),t?(0,b.jsx)("em",{children:t}):null]})}function D9({label:e,tone:t}){return(0,b.jsxs)("span",{className:`status-badge ${t}`,children:[(0,b.jsx)("span",{className:"status-dot"}),e]})}function D8({label:e,monospace:t=!1,value:n}){return(0,b.jsxs)("div",{className:"meta-item",children:[(0,b.jsx)("span",{children:e}),t?(0,b.jsx)("code",{children:n}):(0,b.jsx)("strong",{children:n})]})}function D7({detail:e,label:t,status:n,value:r}){return(0,b.jsxs)("div",{className:"metric-box",children:[(0,b.jsx)("span",{className:"metric-label",children:t}),n?(0,b.jsx)(D3,{status:n,duration:e}):(0,b.jsx)("strong",{children:r}),e&&!n?(0,b.jsx)("p",{children:e}):null]})}function Ue({detail:e,title:t}){return(0,b.jsxs)("div",{className:"panel-title",children:[(0,b.jsx)("h2",{children:t}),(0,b.jsx)("span",{children:e})]})}function Ut({checks:e}){return 0===e.length?(0,b.jsx)("p",{className:"muted",children:"No proof record yet."}):(0,b.jsx)("div",{className:"check-stack",children:e.map(e=>(0,b.jsxs)("article",{children:[(0,b.jsx)("span",{className:e.ok?"status-ok":"status-fail",children:e.ok?"Pass":"Fail"}),(0,b.jsxs)("p",{children:[e.label,e.detail?` - ${e.detail}`:""]})]},`${e.id}-${e.label}`))})}e.s(["default",0,function(){let[e,t]=(0,_.useState)(0),[n,r]=(0,_.useState)(()=>({status:"loading",serviceUrl:CN()}));return((0,_.useEffect)(()=>{let e=!1,t=CN();async function n(){try{let n=await CD(t);e||r({status:"online",serviceUrl:t,...n})}catch(n){e||r({status:"offline",serviceUrl:t,message:n instanceof Error?n.message:String(n)})}}n();let i=setInterval(n,2e3);return()=>{e=!0,clearInterval(i)}},[e]),"online"!==n.status)?(0,b.jsxs)("main",{className:"compiler-shell",children:[(0,b.jsx)(C4,{state:n}),(0,b.jsx)("div",{className:"content-shell",children:(0,b.jsxs)("section",{className:"offline-panel",children:[(0,b.jsx)("p",{children:"loading"===n.status?"Loading local Interf service.":"The local Interf service is offline."}),"offline"===n.status?(0,b.jsx)("code",{children:n.message}):null]})})]}):(0,b.jsx)(C1,{state:n,onRefresh:()=>t(e=>e+1)})}],12562)}]);