@superglue/cli 1.1.189 → 1.1.190

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -12,7 +12,7 @@ attempted value: ${s}
12
12
  return sourceData;
13
13
  }`;if(Vk(e))return e;throw e.startsWith("//")?new Error(`Found comment in code: ${e}.`):new Error(`Invalid arrow function: ${e}. Expected a valid arrow function.`)}var u8=["accesstoken","refreshtoken","apikey","apisecret","bearertoken","token","clientsecret","secretaccesskey","secretkey","password","pass","secret","privatekey","oauthkey","oauthcert"];function Jk(t){return t.toLowerCase().replace(/[_\-\s]/g,"")}N.CREDENTIAL_KEY_PATTERN=/^[A-Za-z_][A-Za-z0-9_]*$/;N.CREDENTIAL_KEY_VALIDATION_DESCRIPTION="Credential keys must start with a letter or underscore and contain only letters, numbers, and underscores.";function Wk(t){return N.CREDENTIAL_KEY_PATTERN.test(t)}function Zk(t){return t.trim()?Wk(t)?null:N.CREDENTIAL_KEY_VALIDATION_DESCRIPTION:"Credential key is required."}function l8(t){return[...t].filter(e=>!!Zk(e))}var d8=t=>{let e=Jk(t);return u8.some(r=>e===r||e.endsWith(r))};N.isSensitiveCredentialKey=d8;var A8=(t,e)=>e==null||e===""?"":N.FULLY_MASKED_CREDENTIAL_VALUE;N.maskCredentialValue=A8;N.FULLY_MASKED_CREDENTIAL_VALUE="****";function Kk(t){return t==null?!1:typeof t=="string"?t.trim().length>0:!0}function p8(t,e){return!!t?.some(r=>r.key===e&&r.hasValue)}function f8(t){return Object.entries(t||{}).sort(([e],[r])=>e.localeCompare(r)).map(([e,r])=>({key:e,hasValue:Kk(r)}))}function h8(t,e){let r=new Set(e.filter(n=>n.hasValue).map(n=>n.key));return[...new Set(t||[])].filter(n=>!r.has(n))}function Xk(t){return t===N.FULLY_MASKED_CREDENTIAL_VALUE}function g8(t){return t?Object.fromEntries(Object.entries(t).filter(([,e])=>e!=null&&e!=="").map(([e])=>[e,N.FULLY_MASKED_CREDENTIAL_VALUE])):{}}function m8({incoming:t,existing:e}){if(!t)return{};let r={};for(let[n,i]of Object.entries(t)){if(Xk(i)){let o=e?.[n];o!=null&&o!==""&&(r[n]=o);continue}r[n]=i}return r}function BC(t){if(typeof t!="string")return!1;let e=t.trim();return!!(e.startsWith("<<")&&e.endsWith(">>")||e.startsWith("{masked_")&&e.endsWith("}"))}function y8(t,e){if(!t||Object.keys(t).length===0)return e||{};if(!e||Object.keys(e).length===0)return Object.fromEntries(Object.entries(t).filter(([n,i])=>!BC(i)&&i!==!0));let r={...e};for(let[n,i]of Object.entries(t))BC(i)||i!==!0&&(r[n]=i);return r}function eN(t,e){if(!e)return t;let r=t,n=[],i=0;Object.entries(e).sort(([,o],[,s])=>String(s).length-String(o).length).forEach(([o,s])=>{let a=String(s);if(s&&a){let c=`\0MASK_${i++}\0`;n.push([c,`{masked_${o}}`]);let u=new RegExp(a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g");r=r.replace(u,c)}});for(let[o,s]of n)r=r.split(o).join(s);return r}function E8(t){let e={};for(let r of t)for(let[n,i]of Object.entries(r.credentials||{}))(0,N.isSensitiveCredentialKey)(n)&&i!==null&&i!==void 0&&i!==""&&(e[`${r.id}_${n}`]=String(i));return e}function QC(t,e){if(t==null)return t;if(typeof t=="string")return eN(t,e);if(typeof t!="object"||t instanceof Date)return t;if(Array.isArray(t))return t.map(n=>QC(n,e));let r={};for(let[n,i]of Object.entries(t))r[n]=QC(i,e);return r}N.MAX_INLINE_RESULT_PREVIEW_BYTES=5*1024*1024;N.MAX_STRING_PREVIEW_LENGTH=3e3;N.MAX_ARRAY_PREVIEW_ITEMS=10;N.MAX_TRUNCATION_DEPTH=10;N.MAX_OBJECT_PREVIEW_KEYS=100;var I8=8,C8=100,b8=100;function S8(t){let e=new WeakSet,r=(n,i)=>{if(n==null)return 0;if(typeof n=="string")return new TextEncoder().encode(n).byteLength;if(typeof n=="number"||typeof n=="boolean")return 8;if(typeof n=="bigint")return String(n).length;if(typeof n=="function"||typeof n=="symbol")return 0;if(n instanceof Date)return 24;if(n instanceof Error)return(n.message?.length||0)+(n.stack?.length||0);if(typeof n!="object"||e.has(n)||(e.add(n),i>I8))return 0;if(Array.isArray(n)){let u=n.length*2,l=Math.min(n.length,C8),d=0;for(let A=0;A<l;A++)d+=r(n[A],i+1);return l===0||l===n.length?u+d:u+Math.round(d/l*n.length)}let o=2,s=Object.keys(n),a=Math.min(s.length,b8),c=0;for(let u=0;u<a;u++){let l=s[u];c+=l.length+r(n[l],i+1)}return a===0||a===s.length?o+c:o+Math.round(c/a*s.length)};try{return r(t,0)}catch{return 0}}function Sf(t,e=0){if(e>N.MAX_TRUNCATION_DEPTH)return Array.isArray(t)?"[...]":typeof t=="object"&&t!==null?"{...}":"...";if(typeof t=="function")return"[FUNCTION]";if(typeof t=="string")return t.length>N.MAX_STRING_PREVIEW_LENGTH?t.substring(0,N.MAX_STRING_PREVIEW_LENGTH)+`... [${t.length.toLocaleString()} chars total]`:t;if(Array.isArray(t))return t.length>N.MAX_ARRAY_PREVIEW_ITEMS?[...t.slice(0,N.MAX_ARRAY_PREVIEW_ITEMS).map(r=>Sf(r,e+1)),`... ${t.length-N.MAX_ARRAY_PREVIEW_ITEMS} more items`]:t.map(r=>Sf(r,e+1));if(typeof t=="object"&&t!==null){let r={},n=Object.keys(t);for(let i of n.slice(0,N.MAX_OBJECT_PREVIEW_KEYS))r[i]=Sf(t[i],e+1);return n.length>N.MAX_OBJECT_PREVIEW_KEYS&&(r["..."]=`${(n.length-N.MAX_OBJECT_PREVIEW_KEYS).toLocaleString()} more keys`),r}return t}function Gc(t,e,r){if(t==null||typeof t!="object")return t;if(r.includes(t))return"[Circular]";if(t instanceof Date)return t.toISOString();if(t instanceof RegExp)return t.toString();if(t instanceof Error)return{name:t.name,message:t.message};r.push(t);try{if(Array.isArray(t)){let n=t.length;if(n<=e)return t.map(o=>Gc(o,e,r));let i=t.slice(0,e).map(o=>Gc(o,e,r));return i.push(`sampled from ${n} items`),i}return t instanceof Map?Object.fromEntries(Array.from(t.entries()).map(([n,i])=>[n,Gc(i,e,r)])):t instanceof Set?Gc(Array.from(t),e,r):ad(t)?Object.entries(t).reduce((n,[i,o])=>({...n,[i]:Gc(o,e,r)}),{}):String(t)}finally{r.pop()}}function tN(t,e=10){return Gc(t,e,[])}function vC(t,e=2){let r=[];try{return JSON.stringify(t,function(n,i){if(typeof i=="bigint")return i.toString();if(typeof i=="function")return"[Function]";if(typeof i!="object"||i===null)return i;for(;r.length>0&&r[r.length-1]!==this;)r.pop();return r.includes(i)?"[Circular]":(r.push(i),i)},e)}catch(n){return JSON.stringify(`[unserializable ${typeof t}: ${n instanceof Error?n.message:String(n)}]`)}}function wf(t,e=new Date){if(t instanceof Date&&!Number.isNaN(t.getTime()))return t;if(typeof t!="string"&&typeof t!="number")return e;let r=new Date(t);return Number.isNaN(r.getTime())?e:r}function rN(t){let{output:e,...r}=t;return{...r,frontendOutput:r.frontendOutput??e,startTime:r.startTime?wf(r.startTime):void 0,endTime:r.endTime?wf(r.endTime):void 0}}function _C(t){let{context:e,...r}=t;return{...r,...t.stale||e?.stale?{stale:!0}:{},timestamp:wf(t.timestamp),parts:t.parts?.map(n=>n.type==="tool"&&n.tool?{...n,tool:rN(n.tool)}:n)}}function w8(t){return t.map(_C)}function B8(t,e){let r=e.memoryMessage?_C(e.memoryMessage):null,n=new Set(e.staleMessageIds),i=new Map((e.modelContextLimits??[]).map(s=>[s.messageId,s]));if(!r||n.size===0&&i.size===0)return t;let o=t.map(s=>{let a=i.get(s.id),c=e.modelContextLimits!==void 0&&!a;if(!n.has(s.id)&&!a&&!(c&&s.modelContextLimit))return s;let{modelContextLimit:u,...l}=s;return{...l,...n.has(s.id)?{stale:!0}:{},...a&&!n.has(s.id)?{modelContextLimit:{maxChars:a.maxChars,keep:a.keep}}:{}}});return o.some(s=>s.id===r.id)?o:[...o,r]}function DC(t){return t.content.trim()?t.content.trim():t.parts?.filter(e=>e.type==="content"||e.type==="error").map(e=>e.content||"").join("").trim()||""}function TC(t){return(t.parts||[]).flatMap(e=>e.type==="tool"&&e.tool?[e.tool]:[])}function nN(t){return DC(t)?!0:TC(t).length>0}function RC(t){return t.role==="assistant"&&!t.isStreaming&&!nN(t)}function Q8(t){return t.role==="system"||t.isHidden?!1:!RC(t)}function v8(t){return t.filter(e=>!RC(e))}function _8(t){return t.filter(e=>{let r=DC(e),n=TC(e).length>0;return(r||n)&&!(e.id==="1"&&!r)})}function D8(t,e=5e3,r=10){if(t==null)return"null";if(typeof t=="string")return t.length<=e?t:t.slice(0,e)+"... [truncated]";let n=vC(t);if(n.length<=e)return n;let i=tN(t,r),o=vC(i);return o.length<=e?o:o.slice(0,e)+"... [truncated]"}function T8(t,e){if(t.length<=e)return t;let r=Math.ceil(e/2),n=Math.floor(e/2),i=t.length-r-n;return`${t.slice(0,r)}
14
14
  ... [${i} characters omitted] ...
15
- ${t.slice(t.length-n)}`}function R8(t){return t instanceof Error?t.message:typeof t=="string"?t:typeof t=="object"&&t!==null&&"message"in t?String(t.message):String(t)}function k8(t,e){if(!e||Object.keys(e).length===0)return{};let r=/file::([^,\s)}\]"']+)/g,n=typeof t=="string"?t:JSON.stringify(t||{}),i=[...new Set([...n.matchAll(r)].map(o=>{let s=o[1];return s.endsWith(".raw")?s=s.slice(0,-4):s.endsWith(".base64")?s=s.slice(0,-7):s.endsWith(".extracted")&&(s=s.slice(0,-10)),s}))];return Object.fromEntries(i.flatMap(o=>e[o]?[[o,e[o]]]:[]))}function N8(t){if(!t)return null;let e=t.indexOf(":");if(e===-1)return{source:"simpleicons",name:t};let r=t.substring(0,e),n=t.substring(e+1);return r!=="simpleicons"&&r!=="lucide"?{source:"simpleicons",name:t}:{source:r,name:n}}function O8(t){return t?typeof t=="string"?t.indexOf(":")!==-1?t:`simpleicons:${t}`:`${t.source}:${t.name}`:null}function iN(t){if(t.op==="remove"||t.value===void 0||typeof t.value!="string")return t;if(t.path==="/inputSchema"||t.path==="/outputSchema"||t.path.startsWith("/inputSchema/properties/")||t.path.startsWith("/outputSchema/properties/")||t.path.match(/^\/steps\/\d+\/config\/pagination$/)||t.path.match(/^\/steps\/\d+\/config\/headers$/)||t.path.match(/^\/steps\/\d+\/config\/queryParams$/))try{return{...t,value:JSON.parse(t.value)}}catch{return t}return t}function U8(t){return t.map(e=>iN(e))}function M8(t,e){t||(t=""),e||(e=""),/^(https?|postgres(ql)?|ftp(s)?|sftp|smb|file):\/\//i.test(t)||(t=`https://${t}`);let r=t.endsWith("/")?t.slice(0,-1):t,n=e.startsWith("/")?e.slice(1):e;return`${r}/${n}`}N.ALLOWED_PATCH_SYSTEM_FIELDS=["name","url","specificInstructions","icon","credentials","authentication","metadata","templateName","requiredCredentialKeys","documentationFiles","tunnel","tags"];var x8=new Set(["data","stepResults","toolPayload","rawData","transformedData"]),L8=8e4;function P8(t,e=L8){if(t==null)return t;let r=t;if(typeof t=="string"){if(t.length<=e)return t;try{r=JSON.parse(t)}catch{return{_truncated:!0,_message:"String result too large to parse",_size:t.length}}}if(typeof r!="object")return r;let n=0,i=0,o=(s,a=0)=>{if(a>20||s===null||typeof s!="object")return s;if(Array.isArray(s))return s.map(u=>o(u,a+1));let c={};for(let[u,l]of Object.entries(s))if(x8.has(u)&&l!==null&&typeof l=="object"){let d=JSON.stringify(l);if(d.length>e){i+=d.length;try{let{jsonString:A,truncatedProps:p}=(0,PX.default)(d,e);c[u]=JSON.parse(A),n+=p.length}catch{c[u]=l}}else c[u]=l}else c[u]=o(l,a+1);return c};try{if(JSON.stringify(r).length<=e)return r;let a=o(r);return n>0&&typeof a=="object"&&a!==null&&(a._note=`Result truncated: ${n} items omitted (original ${i} characters)`),a}catch{return{_truncated:!0,_message:"Result too large to display"}}}function F8(t){if(!t.steps)return[];let e=new Set;for(let r of t.steps)r.config&&(0,jk.isRequestConfig)(r.config)&&r.config.systemId&&e.add(r.config.systemId);return Array.from(e)}function Bf(t,e,r=new WeakSet){if(typeof t=="string"){e.push(t);return}if(!(!t||typeof t!="object")&&!r.has(t)){if(r.add(t),Array.isArray(t)){for(let n of t)Bf(n,e,r);return}for(let n of Object.values(t))Bf(n,e,r)}}function $8(t){let e=[];for(let r of t.matchAll(/<<([\s\S]*?)>>/g)){let n=r[1].trim();n&&e.push(n)}for(let r of t.matchAll(/{{\s*([^{}\s]+)\s*}}/g)){let n=r[1].trim();n&&e.push(n)}return e}function oN(t,e){let r=[];Bf(t,r);let n=`${e}_`,i=new Set;for(let o of r)for(let s of $8(o)){if(!s.startsWith(n))continue;let a=s.slice(n.length);!a||a==="url"||!N.CREDENTIAL_KEY_PATTERN.test(a)||i.add(a)}return[...i]}var j8=/^\s*(async\s+)?(\([^)]*\)|[a-zA-Z_$][a-zA-Z0-9_$]*)\s*=>/,q8=new Set(["sg_auth_email","sg_auth_jwt"]);function z8({config:t,systemId:e}){let r=[];Bf(t,r);let n=e?`${e}_`:null,i=new Set;for(let u of r)for(let l of u.matchAll(/<<([\s\S]*?)>>/g)){let d=l[1].trim();d&&(n&&d.startsWith(n)||j8.test(d)||q8.has(d)||i.add(d))}if(i.size===0)return null;let o=[...i].map(u=>`<<${u}>>`).join(", "),s=`Unresolved placeholder${i.size===1?"":"s"} ${o}`;if(!n)return`${s}. Credential placeholders need systemId and the form <<systemId_secretName>>. Nothing was sent.`;let a=[...i].filter(u=>N.CREDENTIAL_KEY_PATTERN.test(u)).map(u=>`<<${n}${u}>>`),c=a.length>0?`Credential placeholders are namespaced by system: use ${a.join(", ")}.`:`Credential placeholders are namespaced by system as <<${n}secretName>>.`;return`${s}. ${c} Nothing was sent.`}function G8(t){let e={};if(!t.steps)return e;for(let r of t.steps){if(!r.config||!(0,jk.isRequestConfig)(r.config)||!r.config.systemId)continue;let n=oN(r.config,r.config.systemId);if(n.length===0)continue;let i=new Set(e[r.config.systemId]||[]);for(let o of n)i.add(o);e[r.config.systemId]=[...i]}return e}});var uN=m(lt=>{"use strict";Object.defineProperty(lt,"__esModule",{value:!0});lt.AGENT_CONTEXT_MEMORY_MESSAGE_ID_PREFIX=void 0;lt.applyToolMutation=sN;lt.mutateToolCallInMessages=Y8;lt.buildStreamingAssistantMessage=aN;lt.parseToolOutput=J8;lt.parseAgentStreamEventLine=W8;lt.stopActiveTool=cN;lt.appendContentToMessage=NC;lt.updateMessageWithData=cd;lt.findAwaitingConfirmationToolCallIds=Z8;lt.declineAwaitingConfirmationTools=K8;lt.findAndResumeMessageWithTool=X8;lt.serializeMessageForPersistence=t7;lt.isTurnContextBlockMessage=OC;lt.normalizeAgentSessionForkMessages=r7;lt.normalizeAgentSessionImportMessages=n7;lt.createAgentTranscriptState=i7;lt.applyAgentStreamChunk=o7;var H8=pr(),vf=pn();function sN(t,e){let r=e.frontendOutput!==void 0?e.frontendOutput:t.frontendOutput;return{...t,...e.input!==void 0?{input:e.input}:{},...e.result!==void 0?{result:e.result}:{},...e.status!==void 0?{status:e.status}:{},...e.startTime!==void 0?{startTime:e.startTime}:{},...e.endTime!==void 0?{endTime:e.endTime}:{},...e.error!==void 0?{error:e.error||void 0}:{},...r!==void 0?{frontendOutput:r}:{},...e.llmOutput!==void 0?{llmOutput:e.llmOutput}:{},...e.resultMetadata!==void 0?{resultMetadata:e.resultMetadata}:{},...e.confirmationState!==void 0?{confirmationState:e.confirmationState===null?void 0:e.confirmationState}:{},...e.confirmationData!==void 0?{confirmationData:e.confirmationData===null?void 0:e.confirmationData}:{}}}function Y8(t,e,r){return t.map(n=>{let i=!1,o=n.parts?.map(s=>s.type!=="tool"||!s.tool||s.tool.id!==e?s:(i=!0,{...s,tool:sN(s.tool,r)}));return i&&o?{...n,parts:o}:n})}function aN(t){return{id:t,content:"",role:"assistant",timestamp:new Date,parts:[{type:"content",content:"",id:"content-0"}],isStreaming:!0}}function V8(){return{status:"declined",endTime:new Date,confirmationState:"declined",confirmationData:{reason:"new_user_message",message:"Rejected: the user sent a new message instead of confirming this action. The proposed changes were NOT applied."}}}function J8(t){if(!t)return null;if(typeof t=="string")try{let e=JSON.parse(t);return e&&typeof e=="object"&&!Array.isArray(e)?e:null}catch{return null}return typeof t=="object"&&!Array.isArray(t)?t:null}function W8(t){if(!t.startsWith("data: "))return null;try{let e=JSON.parse(t.slice(6));return e&&typeof e=="object"&&!Array.isArray(e)?e:null}catch{return null}}function cN(t){return t.status==="running"||t.status==="pending"||t.status==="awaiting_confirmation"?{...t,status:"stopped",endTime:new Date,confirmationState:void 0,confirmationData:void 0}:t}function NC(t,e){if(!e)return t;let r=[...t.parts||[]],n=r[r.length-1];return n?.type==="content"?r[r.length-1]={...n,content:(n.content||"")+e}:r.push({type:"content",content:e,id:`content-${r.length}`}),{...t,parts:r,content:""}}function cd(t,e,r){if(t.id!==r.id)return t;switch(e.type){case"content":return NC(t,e.content||"");case"tool_call_start":{let n=t.parts?.find(u=>u.type==="tool"&&u.tool?.id===e.toolCall.id)?.tool,i=e.toolCall.input??n?.input,o=e.executionMode==="confirm"?"awaiting_confirmation":i?"running":"pending",s={...n,id:e.toolCall.id,name:e.toolCall.name,input:i,status:o,startTime:n?.startTime||new Date,...n?.confirmationState!==void 0?{confirmationState:n.confirmationState}:{},...n?.confirmationData!==void 0?{confirmationData:n.confirmationData}:{}},a=[...t.parts||[]],c=a.findIndex(u=>u.type==="tool"&&u.tool?.id===e.toolCall.id);return c===-1?a.push({type:"tool",tool:s,id:`tool-${e.toolCall.id}`}):a[c]={...a[c],tool:s},{...t,parts:a,content:""}}case"tool_call_input":{let n=i=>i.id===e.toolCall.id&&e.toolCall.input!==void 0?{...i,input:e.toolCall.input}:i;return{...t,parts:t.parts?.map(i=>i.type==="tool"&&i.tool?{...i,tool:n(i.tool)}:i)}}case"tool_call_update":{let n=t.parts?.map(i=>i.type==="tool"&&i.tool?.id===e.toolCall.id?{...i,tool:{...i.tool,executionTraceId:e.toolCall.executionTraceId??i.tool.executionTraceId,status:i.tool.status==="pending"?"running":i.tool.status}}:i)||[];return{...t,parts:n}}case"tool_call_complete":{let n=t.parts?.find(h=>h.type==="tool"&&h.tool?.id===e.toolCall.id)?.tool,i=n?.status==="completed"||n?.status==="declined",o=e.toolCall.result!==void 0||e.toolCall.frontendOutput!==void 0||e.toolCall.status!==void 0||e.toolCall.confirmationState!==void 0||e.toolCall.confirmationData!==void 0;if(i&&!o)return t;let s=null;try{s=typeof e.toolCall.frontendOutput=="string"?JSON.parse(e.toolCall.frontendOutput):e.toolCall.frontendOutput}catch{}let a=s?.success===!1&&s?.error,c=e.toolCall.result?.outcome,u=c==="failure"?"error":c==="rejected"?"declined":c==="aborted"?"stopped":c==="success"?"completed":void 0,l=e.toolCall.status||u||"completed";a&&l==="completed"&&(l="error");let d=l==="awaiting_confirmation",A={...e.toolCall.input!==void 0?{input:e.toolCall.input}:{},...e.toolCall.result!==void 0?{result:e.toolCall.result}:{},status:l,frontendOutput:e.toolCall.frontendOutput,llmOutput:e.toolCall.llmOutput,resultMetadata:e.toolCall.resultMetadata,error:c==="failure"?e.toolCall.result.error.message:a?s.error:null,endTime:d?void 0:new Date,...e.toolCall.confirmationState!==void 0?{confirmationState:e.toolCall.confirmationState}:{},...e.toolCall.confirmationData!==void 0?{confirmationData:e.toolCall.confirmationData}:{}},p=t.parts?.map(h=>h.type==="tool"&&h.tool?.id===e.toolCall.id?{...h,tool:{...h.tool,...A}}:h)||[];return{...t,parts:p}}case"done":{if(!t.isStreaming)return t;let n=(t.parts||[]).map(i=>i.type==="tool"&&i.tool&&i.tool.status!=="awaiting_confirmation"?{...i,tool:cN(i.tool)}:i);return{...t,isStreaming:!1,parts:n,content:""}}default:return t}}function Z8(t){let e=new Set;for(let r of t)for(let n of(0,vf.getMessageToolCalls)(r))n.status==="awaiting_confirmation"&&e.add(n.id);return[...e]}function K8(t){let e=V8();return t.map(r=>({...r,parts:r.parts?.map(n=>n.type==="tool"&&n.tool?.status==="awaiting_confirmation"?{...n,tool:{...n.tool,...e}}:n)}))}function X8(t,e){let r=t.find(i=>i.parts?.some(o=>o.type==="tool"&&o.tool?.id===e));return r?{messages:t.map(i=>i.id===r.id?{...i,isStreaming:!0}:i),targetMessage:{...r,isStreaming:!0}}:{messages:t,targetMessage:null}}function e7(t){return{id:t.id,name:t.name,status:t.status,input:t.input,result:t.result,frontendOutput:t.frontendOutput,llmOutput:t.llmOutput,resultMetadata:t.resultMetadata,error:t.error,startTime:t.startTime,endTime:t.endTime,confirmationState:t.confirmationState,confirmationData:t.confirmationData}}function t7(t){let{isStreaming:e,tools:r,...n}=t;return JSON.parse((0,vf.safeStringify)({...n,...t.parts?{parts:t.parts.map(i=>i.type==="tool"&&i.tool?{...i,tool:e7(i.tool)}:i)}:{}},0))}lt.AGENT_CONTEXT_MEMORY_MESSAGE_ID_PREFIX="context-memory-";function OC(t){return H8.TURN_CONTEXT_BLOCK_TYPES.includes(t.contextType??"")}function r7(t){return t.filter(e=>e.role!=="system"&&e.contextType!=="memory_notes"&&!OC(e)&&!e.id.startsWith(lt.AGENT_CONTEXT_MEMORY_MESSAGE_ID_PREFIX)).map(e=>({...e,stale:void 0,isStreaming:void 0}))}function n7(t){return t.filter(e=>!e.stale&&!e.isStreaming&&e.contextType!=="memory_notes"&&!OC(e)&&!!e.id)}function i7(t=[],e=null){return{messages:t,assistantMessageId:e,outcome:"streaming"}}function kC(t,e){return(0,vf.getMessageToolCalls)(t).some(r=>r.id===e)}function Hc(t,e){let r=t.assistantMessageId?t.messages.find(i=>i.id===t.assistantMessageId):void 0;if(r)return{state:t,target:r};let n=aN(t.assistantMessageId??e.createAssistantMessageId());return{state:{...t,messages:[...t.messages,n],assistantMessageId:n.id},target:n}}function o7(t,e,r){switch(e.type){case"system_message":{if(!e.systemMessage)return t;let n={id:e.systemMessage.id,role:"system",content:e.systemMessage.content,timestamp:new Date};return{...t,messages:[n,...t.messages]}}case"assistant_message_start":{if(!e.assistantMessageId)return t;let n=t.assistantMessageId?t.messages.find(o=>o.id===t.assistantMessageId):void 0;return t.messages.find(o=>o.id===e.assistantMessageId)?{...t,assistantMessageId:e.assistantMessageId,messages:t.messages.filter(o=>!n||n.id===e.assistantMessageId||o.id!==n.id).map(o=>o.id===e.assistantMessageId?{...o,isStreaming:!0}:o)}:n?{...t,assistantMessageId:e.assistantMessageId,messages:t.messages.map(o=>o.id===n.id?{...o,id:e.assistantMessageId,isStreaming:!0}:o)}:{...t,assistantMessageId:e.assistantMessageId}}case"context_message":{if(!e.contextMessage)return t;let n={id:e.contextMessage.id,role:"user",isHidden:!0,content:e.contextMessage.content,timestamp:new Date};return{...t,assistantMessageId:null,messages:[...t.messages.map(i=>i.id===t.assistantMessageId?{...i,isStreaming:!1}:i),n]}}case"context_usage":case"compaction_start":return t;case"compaction_complete":{if(!e.compaction)return t;let n=(0,vf.applyAgentCompactionToMessages)(t.messages,e.compaction),i=e.compaction.memoryMessage?t.assistantMessageId:null;return!i||!n.some(o=>o.id===i)?{...t,messages:n}:{...t,assistantMessageId:null,messages:n.map(o=>o.id===i?{...o,isStreaming:!1}:o)}}case"content":{let n=Hc(t,r);return{...n.state,messages:n.state.messages.map(i=>i.id===n.target.id?NC(i,e.content||""):i)}}case"error":{let n=Hc(t,r);return{...n.state,outcome:"failed",messages:n.state.messages.map(i=>i.id!==n.target.id?i:{...i,parts:[...i.parts||[],{type:"error",content:e.content,errorDetails:e.errorDetails,id:`error-${i.parts?.length??0}`}],isStreaming:!1})}}case"tool_call_start":case"tool_call_update":{if(!e.toolCall)return t;let n=e.type==="tool_call_start"?null:t.messages.find(o=>kC(o,e.toolCall.id))??null,i=n?{state:t,target:n}:Hc(t,r);return{...i.state,messages:i.state.messages.map(o=>cd(o,e,i.target))}}case"tool_call_input":{if(!e.toolCall)return t;let n=t.messages.find(i=>kC(i,e.toolCall.id));return n?{...t,messages:t.messages.map(i=>cd(i,e,n))}:t}case"tool_call_complete":{if(!e.toolCall)return t;let n=t.messages.find(o=>kC(o,e.toolCall.id)),i=n?{state:t,target:n}:Hc(t,r);return{...i.state,messages:i.state.messages.map(o=>cd(o,e,i.target))}}case"paused":{let n=Hc(t,r);return{...n.state,outcome:"paused",messages:n.state.messages.map(i=>i.id===n.target.id?{...i,isStreaming:!1}:i)}}case"done":{let n=Hc(t,r);return{...n.state,outcome:t.outcome==="failed"?"failed":"completed",messages:n.state.messages.map(i=>cd(i,e,n.target))}}default:return t}}});var Sa=m(Ht=>{"use strict";var lN;Object.defineProperty(Ht,"__esModule",{value:!0});Ht.globalConfig=Ht.$ZodEncodeError=Ht.$ZodAsyncError=Ht.$brand=Ht.NEVER=void 0;Ht.$constructor=s7;Ht.config=a7;Ht.NEVER=Object.freeze({status:"aborted"});function s7(t,e,r){function n(a,c){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:c,constr:s,traits:new Set},enumerable:!1}),a._zod.traits.has(t))return;a._zod.traits.add(t),e(a,c);let u=s.prototype,l=Object.keys(u);for(let d=0;d<l.length;d++){let A=l[d];A in a||(a[A]=u[A].bind(a))}}let i=r?.Parent??Object;class o extends i{}Object.defineProperty(o,"name",{value:t});function s(a){var c;let u=r?.Parent?new o:this;n(u,a),(c=u._zod).deferred??(c.deferred=[]);for(let l of u._zod.deferred)l();return u}return Object.defineProperty(s,"init",{value:n}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>r?.Parent&&a instanceof r.Parent?!0:a?._zod?.traits?.has(t)}),Object.defineProperty(s,"name",{value:t}),s}Ht.$brand=Symbol("zod_brand");var UC=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}};Ht.$ZodAsyncError=UC;var MC=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}};Ht.$ZodEncodeError=MC;(lN=globalThis).__zod_globalConfig??(lN.__zod_globalConfig={});Ht.globalConfig=globalThis.__zod_globalConfig;function a7(t){return t&&Object.assign(Ht.globalConfig,t),Ht.globalConfig}});var ee=m(G=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0});G.Class=G.BIGINT_FORMAT_RANGES=G.NUMBER_FORMAT_RANGES=G.primitiveTypes=G.propertyKeyTypes=G.getParsedType=G.allowsEval=G.captureStackTrace=void 0;G.assertEqual=u7;G.assertNotEqual=l7;G.assertIs=d7;G.assertNever=A7;G.assert=p7;G.getEnumValues=f7;G.joinValues=h7;G.jsonStringifyReplacer=g7;G.cached=AN;G.nullish=m7;G.cleanRegex=y7;G.floatSafeRemainder=E7;G.defineLazy=I7;G.objectClone=C7;G.assignProp=gs;G.mergeDefs=Ro;G.cloneDef=b7;G.getElementAtPath=S7;G.promiseAllObject=w7;G.randomString=B7;G.esc=Q7;G.slugify=v7;G.isObject=xC;G.isPlainObject=_f;G.shallowClone=_7;G.numKeys=D7;G.escapeRegex=R7;G.clone=ms;G.normalizeParams=k7;G.createTransparentProxy=N7;G.stringifyPrimitive=pN;G.optionalKeys=O7;G.pick=U7;G.omit=M7;G.extend=x7;G.safeExtend=L7;G.merge=P7;G.partial=F7;G.required=$7;G.aborted=j7;G.explicitlyAborted=q7;G.prefixIssues=z7;G.unwrapMessage=ud;G.finalizeIssue=G7;G.getSizableOrigin=H7;G.getLengthableOrigin=Y7;G.parsedType=V7;G.issue=J7;G.cleanEnum=W7;G.base64ToUint8Array=fN;G.uint8ArrayToBase64=hN;G.base64urlToUint8Array=Z7;G.uint8ArrayToBase64url=K7;G.hexToUint8Array=X7;G.uint8ArrayToHex=eee;var c7=Sa();function u7(t){return t}function l7(t){return t}function d7(t){}function A7(t){throw new Error("Unexpected value in exhaustive check")}function p7(t){}function f7(t){let e=Object.values(t).filter(n=>typeof n=="number");return Object.entries(t).filter(([n,i])=>e.indexOf(+n)===-1).map(([n,i])=>i)}function h7(t,e="|"){return t.map(r=>pN(r)).join(e)}function g7(t,e){return typeof e=="bigint"?e.toString():e}function AN(t){return{get value(){{let r=t();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function m7(t){return t==null}function y7(t){let e=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;return t.slice(e,r)}function E7(t,e){let r=t/e,n=Math.round(r),i=Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-n)<i?0:r-n}var dN=Symbol("evaluating");function I7(t,e,r){let n;Object.defineProperty(t,e,{get(){if(n!==dN)return n===void 0&&(n=dN,n=r()),n},set(i){Object.defineProperty(t,e,{value:i})},configurable:!0})}function C7(t){return Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t))}function gs(t,e,r){Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Ro(...t){let e={};for(let r of t){let n=Object.getOwnPropertyDescriptors(r);Object.assign(e,n)}return Object.defineProperties({},e)}function b7(t){return Ro(t._zod.def)}function S7(t,e){return e?e.reduce((r,n)=>r?.[n],t):t}function w7(t){let e=Object.keys(t),r=e.map(n=>t[n]);return Promise.all(r).then(n=>{let i={};for(let o=0;o<e.length;o++)i[e[o]]=n[o];return i})}function B7(t=10){let e="abcdefghijklmnopqrstuvwxyz",r="";for(let n=0;n<t;n++)r+=e[Math.floor(Math.random()*e.length)];return r}function Q7(t){return JSON.stringify(t)}function v7(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}G.captureStackTrace="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function xC(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}G.allowsEval=AN(()=>{if(c7.globalConfig.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let t=Function;return new t(""),!0}catch{return!1}});function _f(t){if(xC(t)===!1)return!1;let e=t.constructor;if(e===void 0||typeof e!="function")return!0;let r=e.prototype;return!(xC(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function _7(t){return _f(t)?{...t}:Array.isArray(t)?[...t]:t instanceof Map?new Map(t):t instanceof Set?new Set(t):t}function D7(t){let e=0;for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&e++;return e}var T7=t=>{let e=typeof t;switch(e){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(t)?"array":t===null?"null":t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?"promise":typeof Map<"u"&&t instanceof Map?"map":typeof Set<"u"&&t instanceof Set?"set":typeof Date<"u"&&t instanceof Date?"date":typeof File<"u"&&t instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${e}`)}};G.getParsedType=T7;G.propertyKeyTypes=new Set(["string","number","symbol"]);G.primitiveTypes=new Set(["string","number","bigint","boolean","symbol","undefined"]);function R7(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ms(t,e,r){let n=new t._zod.constr(e??t._zod.def);return(!e||r?.parent)&&(n._zod.parent=t),n}function k7(t){let e=t;if(!e)return{};if(typeof e=="string")return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function N7(t){let e;return new Proxy({},{get(r,n,i){return e??(e=t()),Reflect.get(e,n,i)},set(r,n,i,o){return e??(e=t()),Reflect.set(e,n,i,o)},has(r,n){return e??(e=t()),Reflect.has(e,n)},deleteProperty(r,n){return e??(e=t()),Reflect.deleteProperty(e,n)},ownKeys(r){return e??(e=t()),Reflect.ownKeys(e)},getOwnPropertyDescriptor(r,n){return e??(e=t()),Reflect.getOwnPropertyDescriptor(e,n)},defineProperty(r,n,i){return e??(e=t()),Reflect.defineProperty(e,n,i)}})}function pN(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function O7(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}G.NUMBER_FORMAT_RANGES={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};G.BIGINT_FORMAT_RANGES={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function U7(t,e){let r=t._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let o=Ro(t._zod.def,{get shape(){let s={};for(let a in e){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);e[a]&&(s[a]=r.shape[a])}return gs(this,"shape",s),s},checks:[]});return ms(t,o)}function M7(t,e){let r=t._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let o=Ro(t._zod.def,{get shape(){let s={...t._zod.def.shape};for(let a in e){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);e[a]&&delete s[a]}return gs(this,"shape",s),s},checks:[]});return ms(t,o)}function x7(t,e){if(!_f(e))throw new Error("Invalid input to extend: expected a plain object");let r=t._zod.def.checks;if(r&&r.length>0){let o=t._zod.def.shape;for(let s in e)if(Object.getOwnPropertyDescriptor(o,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let i=Ro(t._zod.def,{get shape(){let o={...t._zod.def.shape,...e};return gs(this,"shape",o),o}});return ms(t,i)}function L7(t,e){if(!_f(e))throw new Error("Invalid input to safeExtend: expected a plain object");let r=Ro(t._zod.def,{get shape(){let n={...t._zod.def.shape,...e};return gs(this,"shape",n),n}});return ms(t,r)}function P7(t,e){if(t._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r=Ro(t._zod.def,{get shape(){let n={...t._zod.def.shape,...e._zod.def.shape};return gs(this,"shape",n),n},get catchall(){return e._zod.def.catchall},checks:e._zod.def.checks??[]});return ms(t,r)}function F7(t,e,r){let i=e._zod.def.checks;if(i&&i.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let s=Ro(e._zod.def,{get shape(){let a=e._zod.def.shape,c={...a};if(r)for(let u in r){if(!(u in a))throw new Error(`Unrecognized key: "${u}"`);r[u]&&(c[u]=t?new t({type:"optional",innerType:a[u]}):a[u])}else for(let u in a)c[u]=t?new t({type:"optional",innerType:a[u]}):a[u];return gs(this,"shape",c),c},checks:[]});return ms(e,s)}function $7(t,e,r){let n=Ro(e._zod.def,{get shape(){let i=e._zod.def.shape,o={...i};if(r)for(let s in r){if(!(s in o))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(o[s]=new t({type:"nonoptional",innerType:i[s]}))}else for(let s in i)o[s]=new t({type:"nonoptional",innerType:i[s]});return gs(this,"shape",o),o}});return ms(e,n)}function j7(t,e=0){if(t.aborted===!0)return!0;for(let r=e;r<t.issues.length;r++)if(t.issues[r]?.continue!==!0)return!0;return!1}function q7(t,e=0){if(t.aborted===!0)return!0;for(let r=e;r<t.issues.length;r++)if(t.issues[r]?.continue===!1)return!0;return!1}function z7(t,e){return e.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(t),r})}function ud(t){return typeof t=="string"?t:t?.message}function G7(t,e,r){let n=t.message?t.message:ud(t.inst?._zod.def?.error?.(t))??ud(e?.error?.(t))??ud(r.customError?.(t))??ud(r.localeError?.(t))??"Invalid input",{inst:i,continue:o,input:s,...a}=t;return a.path??(a.path=[]),a.message=n,e?.reportInput&&(a.input=s),a}function H7(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function Y7(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function V7(t){let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"nan":"number";case"object":{if(t===null)return"null";if(Array.isArray(t))return"array";let r=t;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return e}function J7(...t){let[e,r,n]=t;return typeof e=="string"?{message:e,code:"custom",input:r,inst:n}:{...e}}function W7(t){return Object.entries(t).filter(([e,r])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function fN(t){let e=atob(t),r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=e.charCodeAt(n);return r}function hN(t){let e="";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return btoa(e)}function Z7(t){let e=t.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-e.length%4)%4);return fN(e+r)}function K7(t){return hN(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function X7(t){let e=t.replace(/^0x/,"");if(e.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2)r[n/2]=Number.parseInt(e.slice(n,n+2),16);return r}function eee(t){return Array.from(t).map(e=>e.toString(16).padStart(2,"0")).join("")}var LC=class{constructor(...e){}};G.Class=LC});var PC=m(Ft=>{"use strict";var tee=Ft&&Ft.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),ree=Ft&&Ft.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),nee=Ft&&Ft.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&tee(e,t,r);return ree(e,t),e};Object.defineProperty(Ft,"__esModule",{value:!0});Ft.$ZodRealError=Ft.$ZodError=void 0;Ft.flattenError=oee;Ft.formatError=see;Ft.treeifyError=aee;Ft.toDotPath=yN;Ft.prettifyError=cee;var gN=Sa(),iee=nee(ee()),mN=(t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),t.message=JSON.stringify(e,iee.jsonStringifyReplacer,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})};Ft.$ZodError=(0,gN.$constructor)("$ZodError",mN);Ft.$ZodRealError=(0,gN.$constructor)("$ZodError",mN,{Parent:Error});function oee(t,e=r=>r.message){let r={},n=[];for(let i of t.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:r}}function see(t,e=r=>r.message){let r={_errors:[]},n=(i,o=[])=>{for(let s of i.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(a=>n({issues:a},[...o,...s.path]));else if(s.code==="invalid_key")n({issues:s.issues},[...o,...s.path]);else if(s.code==="invalid_element")n({issues:s.issues},[...o,...s.path]);else{let a=[...o,...s.path];if(a.length===0)r._errors.push(e(s));else{let c=r,u=0;for(;u<a.length;){let l=a[u];u===a.length-1?(c[l]=c[l]||{_errors:[]},c[l]._errors.push(e(s))):c[l]=c[l]||{_errors:[]},c=c[l],u++}}}};return n(t),r}function aee(t,e=r=>r.message){let r={errors:[]},n=(i,o=[])=>{var s,a;for(let c of i.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(u=>n({issues:u},[...o,...c.path]));else if(c.code==="invalid_key")n({issues:c.issues},[...o,...c.path]);else if(c.code==="invalid_element")n({issues:c.issues},[...o,...c.path]);else{let u=[...o,...c.path];if(u.length===0){r.errors.push(e(c));continue}let l=r,d=0;for(;d<u.length;){let A=u[d],p=d===u.length-1;typeof A=="string"?(l.properties??(l.properties={}),(s=l.properties)[A]??(s[A]={errors:[]}),l=l.properties[A]):(l.items??(l.items=[]),(a=l.items)[A]??(a[A]={errors:[]}),l=l.items[A]),p&&l.errors.push(e(c)),d++}}};return n(t),r}function yN(t){let e=[],r=t.map(n=>typeof n=="object"?n.key:n);for(let n of r)typeof n=="number"?e.push(`[${n}]`):typeof n=="symbol"?e.push(`[${JSON.stringify(String(n))}]`):/[^\w$]/.test(n)?e.push(`[${JSON.stringify(n)}]`):(e.length&&e.push("."),e.push(n));return e.join("")}function cee(t){let e=[],r=[...t.issues].sort((n,i)=>(n.path??[]).length-(i.path??[]).length);for(let n of r)e.push(`\u2716 ${n.message}`),n.path?.length&&e.push(` \u2192 at ${yN(n.path)}`);return e.join(`
15
+ ${t.slice(t.length-n)}`}function R8(t){return t instanceof Error?t.message:typeof t=="string"?t:typeof t=="object"&&t!==null&&"message"in t?String(t.message):String(t)}function k8(t,e){if(!e||Object.keys(e).length===0)return{};let r=/file::([^,\s)}\]"']+)/g,n=typeof t=="string"?t:JSON.stringify(t||{}),i=[...new Set([...n.matchAll(r)].map(o=>{let s=o[1];return s.endsWith(".raw")?s=s.slice(0,-4):s.endsWith(".base64")?s=s.slice(0,-7):s.endsWith(".extracted")&&(s=s.slice(0,-10)),s}))];return Object.fromEntries(i.flatMap(o=>e[o]?[[o,e[o]]]:[]))}function N8(t){if(!t)return null;let e=t.indexOf(":");if(e===-1)return{source:"simpleicons",name:t};let r=t.substring(0,e),n=t.substring(e+1);return r!=="simpleicons"&&r!=="lucide"?{source:"simpleicons",name:t}:{source:r,name:n}}function O8(t){return t?typeof t=="string"?t.indexOf(":")!==-1?t:`simpleicons:${t}`:`${t.source}:${t.name}`:null}function iN(t){if(t.op==="remove"||t.value===void 0||typeof t.value!="string")return t;if(t.path==="/inputSchema"||t.path==="/outputSchema"||t.path.startsWith("/inputSchema/properties/")||t.path.startsWith("/outputSchema/properties/")||t.path.match(/^\/steps\/\d+\/config\/pagination$/)||t.path.match(/^\/steps\/\d+\/config\/headers$/)||t.path.match(/^\/steps\/\d+\/config\/queryParams$/))try{return{...t,value:JSON.parse(t.value)}}catch{return t}return t}function U8(t){return t.map(e=>iN(e))}function M8(t,e){t||(t=""),e||(e=""),/^(https?|postgres(ql)?|ftp(s)?|sftp|smb|file):\/\//i.test(t)||(t=`https://${t}`);let r=t.endsWith("/")?t.slice(0,-1):t,n=e.startsWith("/")?e.slice(1):e;return`${r}/${n}`}N.ALLOWED_PATCH_SYSTEM_FIELDS=["name","url","specificInstructions","icon","credentials","authentication","metadata","templateName","requiredCredentialKeys","documentationFiles","tunnel","tags"];var x8=new Set(["data","stepResults","toolPayload","rawData","transformedData"]),L8=8e4;function P8(t,e=L8){if(t==null)return t;let r=t;if(typeof t=="string"){if(t.length<=e)return t;try{r=JSON.parse(t)}catch{return{_truncated:!0,_message:"String result too large to parse",_size:t.length}}}if(typeof r!="object")return r;let n=0,i=0,o=(s,a=0)=>{if(a>20||s===null||typeof s!="object")return s;if(Array.isArray(s))return s.map(u=>o(u,a+1));let c={};for(let[u,l]of Object.entries(s))if(x8.has(u)&&l!==null&&typeof l=="object"){let d=JSON.stringify(l);if(d.length>e){i+=d.length;try{let{jsonString:A,truncatedProps:p}=(0,PX.default)(d,e);c[u]=JSON.parse(A),n+=p.length}catch{c[u]=l}}else c[u]=l}else c[u]=o(l,a+1);return c};try{if(JSON.stringify(r).length<=e)return r;let a=o(r);return n>0&&typeof a=="object"&&a!==null&&(a._note=`Result truncated: ${n} items omitted (original ${i} characters)`),a}catch{return{_truncated:!0,_message:"Result too large to display"}}}function F8(t){if(!t.steps)return[];let e=new Set;for(let r of t.steps)r.config&&(0,jk.isRequestConfig)(r.config)&&r.config.systemId&&e.add(r.config.systemId);return Array.from(e)}function Bf(t,e,r=new WeakSet){if(typeof t=="string"){e.push(t);return}if(!(!t||typeof t!="object")&&!r.has(t)){if(r.add(t),Array.isArray(t)){for(let n of t)Bf(n,e,r);return}for(let n of Object.values(t))Bf(n,e,r)}}function $8(t){let e=[];for(let r of t.matchAll(/<<([\s\S]*?)>>/g)){let n=r[1].trim();n&&e.push(n)}for(let r of t.matchAll(/{{\s*([^{}\s]+)\s*}}/g)){let n=r[1].trim();n&&e.push(n)}return e}function oN(t,e){let r=[];Bf(t,r);let n=`${e}_`,i=new Set;for(let o of r)for(let s of $8(o)){if(!s.startsWith(n))continue;let a=s.slice(n.length);!a||a==="url"||!N.CREDENTIAL_KEY_PATTERN.test(a)||i.add(a)}return[...i]}var j8=/^\s*(async\s+)?(\([^)]*\)|[a-zA-Z_$][a-zA-Z0-9_$]*)\s*=>/,q8=new Set(["sg_auth_email","sg_auth_jwt"]);function z8({config:t,systemId:e}){let r=[];Bf(t,r);let n=e?`${e}_`:null,i=new Set;for(let u of r)for(let l of u.matchAll(/<<([\s\S]*?)>>/g)){let d=l[1].trim();d&&(n&&d.startsWith(n)||j8.test(d)||q8.has(d)||i.add(d))}if(i.size===0)return null;let o=[...i].map(u=>`<<${u}>>`).join(", "),s=`Unresolved placeholder${i.size===1?"":"s"} ${o}`;if(!n)return`${s}. Credential placeholders need systemId and the form <<systemId_secretName>>. Nothing was sent.`;let a=[...i].filter(u=>N.CREDENTIAL_KEY_PATTERN.test(u)).map(u=>`<<${n}${u}>>`),c=a.length>0?`Credential placeholders are namespaced by system: use ${a.join(", ")}.`:`Credential placeholders are namespaced by system as <<${n}secretName>>.`;return`${s}. ${c} Nothing was sent.`}function G8(t){let e={};if(!t.steps)return e;for(let r of t.steps){if(!r.config||!(0,jk.isRequestConfig)(r.config)||!r.config.systemId)continue;let n=oN(r.config,r.config.systemId);if(n.length===0)continue;let i=new Set(e[r.config.systemId]||[]);for(let o of n)i.add(o);e[r.config.systemId]=[...i]}return e}});var uN=m(lt=>{"use strict";Object.defineProperty(lt,"__esModule",{value:!0});lt.AGENT_CONTEXT_MEMORY_MESSAGE_ID_PREFIX=void 0;lt.applyToolMutation=sN;lt.mutateToolCallInMessages=Y8;lt.buildStreamingAssistantMessage=aN;lt.parseToolOutput=J8;lt.parseAgentStreamEventLine=W8;lt.stopActiveTool=cN;lt.appendContentToMessage=NC;lt.updateMessageWithData=cd;lt.findAwaitingConfirmationToolCallIds=Z8;lt.declineAwaitingConfirmationTools=K8;lt.findAndResumeMessageWithTool=X8;lt.serializeMessageForPersistence=t7;lt.isTurnContextBlockMessage=OC;lt.normalizeAgentSessionForkMessages=r7;lt.normalizeAgentSessionImportMessages=n7;lt.createAgentTranscriptState=i7;lt.applyAgentStreamChunk=o7;var H8=pr(),vf=pn();function sN(t,e){let r=e.frontendOutput!==void 0?e.frontendOutput:t.frontendOutput;return{...t,...e.input!==void 0?{input:e.input}:{},...e.result!==void 0?{result:e.result}:{},...e.status!==void 0?{status:e.status}:{},...e.startTime!==void 0?{startTime:e.startTime}:{},...e.endTime!==void 0?{endTime:e.endTime}:{},...e.error!==void 0?{error:e.error||void 0}:{},...r!==void 0?{frontendOutput:r}:{},...e.llmOutput!==void 0?{llmOutput:e.llmOutput}:{},...e.resultMetadata!==void 0?{resultMetadata:e.resultMetadata}:{},...e.confirmationState!==void 0?{confirmationState:e.confirmationState===null?void 0:e.confirmationState}:{},...e.confirmationData!==void 0?{confirmationData:e.confirmationData===null?void 0:e.confirmationData}:{}}}function Y8(t,e,r){return t.map(n=>{let i=!1,o=n.parts?.map(s=>s.type!=="tool"||!s.tool||s.tool.id!==e?s:(i=!0,{...s,tool:sN(s.tool,r)}));return i&&o?{...n,parts:o}:n})}function aN(t){return{id:t,content:"",role:"assistant",timestamp:new Date,parts:[{type:"content",content:"",id:"content-0"}],isStreaming:!0}}function V8(){return{status:"declined",endTime:new Date,confirmationState:"declined",confirmationData:{reason:"new_user_message",message:"Rejected: the user sent a new message instead of confirming this action. The proposed changes were NOT applied."}}}function J8(t){if(!t)return null;if(typeof t=="string")try{let e=JSON.parse(t);return e&&typeof e=="object"&&!Array.isArray(e)?e:null}catch{return null}return typeof t=="object"&&!Array.isArray(t)?t:null}function W8(t){if(!t.startsWith("data: "))return null;try{let e=JSON.parse(t.slice(6));return e&&typeof e=="object"&&!Array.isArray(e)?e:null}catch{return null}}function cN(t){return t.status==="running"||t.status==="pending"||t.status==="awaiting_confirmation"?{...t,status:"stopped",endTime:new Date,confirmationState:void 0,confirmationData:void 0}:t}function NC(t,e){if(!e)return t;let r=[...t.parts||[]],n=r[r.length-1];return n?.type==="content"?r[r.length-1]={...n,content:(n.content||"")+e}:r.push({type:"content",content:e,id:`content-${r.length}`}),{...t,parts:r,content:""}}function cd(t,e,r){if(t.id!==r.id)return t;switch(e.type){case"content":return NC(t,e.content||"");case"tool_call_start":{let n=t.parts?.find(u=>u.type==="tool"&&u.tool?.id===e.toolCall.id)?.tool,i=e.toolCall.input??n?.input,o=e.executionMode==="confirm"?"awaiting_confirmation":i?"running":"pending",s={...n,id:e.toolCall.id,name:e.toolCall.name,input:i,status:o,startTime:n?.startTime||new Date,...n?.confirmationState!==void 0?{confirmationState:n.confirmationState}:{},...n?.confirmationData!==void 0?{confirmationData:n.confirmationData}:{}},a=[...t.parts||[]],c=a.findIndex(u=>u.type==="tool"&&u.tool?.id===e.toolCall.id);return c===-1?a.push({type:"tool",tool:s,id:`tool-${e.toolCall.id}`}):a[c]={...a[c],tool:s},{...t,parts:a,content:""}}case"tool_call_input":{let n=i=>i.id===e.toolCall.id&&e.toolCall.input!==void 0?{...i,input:e.toolCall.input}:i;return{...t,parts:t.parts?.map(i=>i.type==="tool"&&i.tool?{...i,tool:n(i.tool)}:i)}}case"tool_call_update":{let n=t.parts?.map(i=>i.type==="tool"&&i.tool?.id===e.toolCall.id?{...i,tool:{...i.tool,executionTraceId:e.toolCall.executionTraceId??i.tool.executionTraceId,status:i.tool.status==="pending"?"running":i.tool.status}}:i)||[];return{...t,parts:n}}case"tool_call_complete":{let n=t.parts?.find(h=>h.type==="tool"&&h.tool?.id===e.toolCall.id)?.tool,i=n?.status==="completed"||n?.status==="declined",o=e.toolCall.result!==void 0||e.toolCall.frontendOutput!==void 0||e.toolCall.status!==void 0||e.toolCall.confirmationState!==void 0||e.toolCall.confirmationData!==void 0;if(i&&!o)return t;let s=null;try{s=typeof e.toolCall.frontendOutput=="string"?JSON.parse(e.toolCall.frontendOutput):e.toolCall.frontendOutput}catch{}let a=s?.success===!1&&s?.error,c=e.toolCall.result?.outcome,u=c==="failure"?"error":c==="rejected"?"declined":c==="aborted"?"stopped":c==="success"?"completed":void 0,l=e.toolCall.status||u||"completed";a&&l==="completed"&&(l="error");let d=l==="awaiting_confirmation",A={...e.toolCall.input!==void 0?{input:e.toolCall.input}:{},...e.toolCall.result!==void 0?{result:e.toolCall.result}:{},status:l,frontendOutput:e.toolCall.frontendOutput,llmOutput:e.toolCall.llmOutput,resultMetadata:e.toolCall.resultMetadata,error:c==="failure"?e.toolCall.result.error.message:a?s.error:null,endTime:d?void 0:new Date,...e.toolCall.confirmationState!==void 0?{confirmationState:e.toolCall.confirmationState}:{},...e.toolCall.confirmationData!==void 0?{confirmationData:e.toolCall.confirmationData}:{}},p=t.parts?.map(h=>h.type==="tool"&&h.tool?.id===e.toolCall.id?{...h,tool:{...h.tool,...A}}:h)||[];return{...t,parts:p}}case"done":{if(!t.isStreaming)return t;let n=(t.parts||[]).map(i=>i.type==="tool"&&i.tool&&i.tool.status!=="awaiting_confirmation"?{...i,tool:cN(i.tool)}:i);return{...t,isStreaming:!1,parts:n,content:""}}default:return t}}function Z8(t){let e=new Set;for(let r of t)for(let n of(0,vf.getMessageToolCalls)(r))n.status==="awaiting_confirmation"&&e.add(n.id);return[...e]}function K8(t){let e=V8();return t.map(r=>({...r,parts:r.parts?.map(n=>n.type==="tool"&&n.tool?.status==="awaiting_confirmation"?{...n,tool:{...n.tool,...e}}:n)}))}function X8(t,e){let r=t.find(i=>i.parts?.some(o=>o.type==="tool"&&o.tool?.id===e));return r?{messages:t.map(i=>i.id===r.id?{...i,isStreaming:!0}:i),targetMessage:{...r,isStreaming:!0}}:{messages:t,targetMessage:null}}function e7(t){return{id:t.id,name:t.name,status:t.status,input:t.input,result:t.result,frontendOutput:t.frontendOutput,llmOutput:t.llmOutput,resultMetadata:t.resultMetadata,error:t.error,startTime:t.startTime,endTime:t.endTime,confirmationState:t.confirmationState,confirmationData:t.confirmationData}}function t7(t){let{isStreaming:e,tools:r,...n}=t;return JSON.parse((0,vf.safeStringify)({...n,...t.parts?{parts:t.parts.map(i=>i.type==="tool"&&i.tool?{...i,tool:e7(i.tool)}:i)}:{}},0))}lt.AGENT_CONTEXT_MEMORY_MESSAGE_ID_PREFIX="context-memory-";function OC(t){return H8.TURN_CONTEXT_BLOCK_TYPES.includes(t.contextType??"")}function r7(t){return t.filter(e=>e.role!=="system"&&e.contextType!=="memory_notes"&&!OC(e)&&!e.id.startsWith(lt.AGENT_CONTEXT_MEMORY_MESSAGE_ID_PREFIX)).map(e=>({...e,stale:void 0,isStreaming:void 0}))}function n7(t){return t.filter(e=>!e.stale&&!e.isStreaming&&e.contextType!=="memory_notes"&&!OC(e)&&!!e.id)}function i7(t=[],e=null){return{messages:t,assistantMessageId:e,outcome:"streaming"}}function kC(t,e){return(0,vf.getMessageToolCalls)(t).some(r=>r.id===e)}function Hc(t,e){let r=t.assistantMessageId?t.messages.find(i=>i.id===t.assistantMessageId):void 0;if(r)return{state:t,target:r};let n=aN(t.assistantMessageId??e.createAssistantMessageId());return{state:{...t,messages:[...t.messages,n],assistantMessageId:n.id},target:n}}function o7(t,e,r){switch(e.type){case"system_message":{if(!e.systemMessage)return t;let n={id:e.systemMessage.id,role:"system",content:e.systemMessage.content,timestamp:new Date};return{...t,messages:[n,...t.messages]}}case"assistant_message_start":{if(!e.assistantMessageId)return t;let n=t.assistantMessageId?t.messages.find(o=>o.id===t.assistantMessageId):void 0;return t.messages.find(o=>o.id===e.assistantMessageId)?{...t,assistantMessageId:e.assistantMessageId,messages:t.messages.filter(o=>!n||n.id===e.assistantMessageId||o.id!==n.id).map(o=>o.id===e.assistantMessageId?{...o,isStreaming:!0}:o)}:n?{...t,assistantMessageId:e.assistantMessageId,messages:t.messages.map(o=>o.id===n.id?{...o,id:e.assistantMessageId,isStreaming:!0}:o)}:{...t,assistantMessageId:e.assistantMessageId}}case"context_message":{if(!e.contextMessage)return t;let n={id:e.contextMessage.id,role:"user",content:e.contextMessage.content,timestamp:new Date,...e.contextMessage.isHidden?{isHidden:!0}:{},...e.contextMessage.attachedFiles?.length?{attachedFiles:e.contextMessage.attachedFiles}:{}};return{...t,assistantMessageId:null,messages:[...t.messages.map(i=>i.id===t.assistantMessageId?{...i,isStreaming:!1}:i),n]}}case"context_usage":case"compaction_start":return t;case"compaction_complete":{if(!e.compaction)return t;let n=(0,vf.applyAgentCompactionToMessages)(t.messages,e.compaction),i=e.compaction.memoryMessage?t.assistantMessageId:null;return!i||!n.some(o=>o.id===i)?{...t,messages:n}:{...t,assistantMessageId:null,messages:n.map(o=>o.id===i?{...o,isStreaming:!1}:o)}}case"content":{let n=Hc(t,r);return{...n.state,messages:n.state.messages.map(i=>i.id===n.target.id?NC(i,e.content||""):i)}}case"error":{let n=Hc(t,r);return{...n.state,outcome:"failed",messages:n.state.messages.map(i=>i.id!==n.target.id?i:{...i,parts:[...i.parts||[],{type:"error",content:e.content,errorDetails:e.errorDetails,id:`error-${i.parts?.length??0}`}],isStreaming:!1})}}case"tool_call_start":case"tool_call_update":{if(!e.toolCall)return t;let n=e.type==="tool_call_start"?null:t.messages.find(o=>kC(o,e.toolCall.id))??null,i=n?{state:t,target:n}:Hc(t,r);return{...i.state,messages:i.state.messages.map(o=>cd(o,e,i.target))}}case"tool_call_input":{if(!e.toolCall)return t;let n=t.messages.find(i=>kC(i,e.toolCall.id));return n?{...t,messages:t.messages.map(i=>cd(i,e,n))}:t}case"tool_call_complete":{if(!e.toolCall)return t;let n=t.messages.find(o=>kC(o,e.toolCall.id)),i=n?{state:t,target:n}:Hc(t,r);return{...i.state,messages:i.state.messages.map(o=>cd(o,e,i.target))}}case"paused":{let n=Hc(t,r);return{...n.state,outcome:"paused",messages:n.state.messages.map(i=>i.id===n.target.id?{...i,isStreaming:!1}:i)}}case"done":{let n=Hc(t,r);return{...n.state,outcome:t.outcome==="failed"?"failed":"completed",messages:n.state.messages.map(i=>cd(i,e,n.target))}}default:return t}}});var Sa=m(Ht=>{"use strict";var lN;Object.defineProperty(Ht,"__esModule",{value:!0});Ht.globalConfig=Ht.$ZodEncodeError=Ht.$ZodAsyncError=Ht.$brand=Ht.NEVER=void 0;Ht.$constructor=s7;Ht.config=a7;Ht.NEVER=Object.freeze({status:"aborted"});function s7(t,e,r){function n(a,c){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:c,constr:s,traits:new Set},enumerable:!1}),a._zod.traits.has(t))return;a._zod.traits.add(t),e(a,c);let u=s.prototype,l=Object.keys(u);for(let d=0;d<l.length;d++){let A=l[d];A in a||(a[A]=u[A].bind(a))}}let i=r?.Parent??Object;class o extends i{}Object.defineProperty(o,"name",{value:t});function s(a){var c;let u=r?.Parent?new o:this;n(u,a),(c=u._zod).deferred??(c.deferred=[]);for(let l of u._zod.deferred)l();return u}return Object.defineProperty(s,"init",{value:n}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>r?.Parent&&a instanceof r.Parent?!0:a?._zod?.traits?.has(t)}),Object.defineProperty(s,"name",{value:t}),s}Ht.$brand=Symbol("zod_brand");var UC=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}};Ht.$ZodAsyncError=UC;var MC=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}};Ht.$ZodEncodeError=MC;(lN=globalThis).__zod_globalConfig??(lN.__zod_globalConfig={});Ht.globalConfig=globalThis.__zod_globalConfig;function a7(t){return t&&Object.assign(Ht.globalConfig,t),Ht.globalConfig}});var ee=m(G=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0});G.Class=G.BIGINT_FORMAT_RANGES=G.NUMBER_FORMAT_RANGES=G.primitiveTypes=G.propertyKeyTypes=G.getParsedType=G.allowsEval=G.captureStackTrace=void 0;G.assertEqual=u7;G.assertNotEqual=l7;G.assertIs=d7;G.assertNever=A7;G.assert=p7;G.getEnumValues=f7;G.joinValues=h7;G.jsonStringifyReplacer=g7;G.cached=AN;G.nullish=m7;G.cleanRegex=y7;G.floatSafeRemainder=E7;G.defineLazy=I7;G.objectClone=C7;G.assignProp=gs;G.mergeDefs=Ro;G.cloneDef=b7;G.getElementAtPath=S7;G.promiseAllObject=w7;G.randomString=B7;G.esc=Q7;G.slugify=v7;G.isObject=xC;G.isPlainObject=_f;G.shallowClone=_7;G.numKeys=D7;G.escapeRegex=R7;G.clone=ms;G.normalizeParams=k7;G.createTransparentProxy=N7;G.stringifyPrimitive=pN;G.optionalKeys=O7;G.pick=U7;G.omit=M7;G.extend=x7;G.safeExtend=L7;G.merge=P7;G.partial=F7;G.required=$7;G.aborted=j7;G.explicitlyAborted=q7;G.prefixIssues=z7;G.unwrapMessage=ud;G.finalizeIssue=G7;G.getSizableOrigin=H7;G.getLengthableOrigin=Y7;G.parsedType=V7;G.issue=J7;G.cleanEnum=W7;G.base64ToUint8Array=fN;G.uint8ArrayToBase64=hN;G.base64urlToUint8Array=Z7;G.uint8ArrayToBase64url=K7;G.hexToUint8Array=X7;G.uint8ArrayToHex=eee;var c7=Sa();function u7(t){return t}function l7(t){return t}function d7(t){}function A7(t){throw new Error("Unexpected value in exhaustive check")}function p7(t){}function f7(t){let e=Object.values(t).filter(n=>typeof n=="number");return Object.entries(t).filter(([n,i])=>e.indexOf(+n)===-1).map(([n,i])=>i)}function h7(t,e="|"){return t.map(r=>pN(r)).join(e)}function g7(t,e){return typeof e=="bigint"?e.toString():e}function AN(t){return{get value(){{let r=t();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function m7(t){return t==null}function y7(t){let e=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;return t.slice(e,r)}function E7(t,e){let r=t/e,n=Math.round(r),i=Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-n)<i?0:r-n}var dN=Symbol("evaluating");function I7(t,e,r){let n;Object.defineProperty(t,e,{get(){if(n!==dN)return n===void 0&&(n=dN,n=r()),n},set(i){Object.defineProperty(t,e,{value:i})},configurable:!0})}function C7(t){return Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t))}function gs(t,e,r){Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Ro(...t){let e={};for(let r of t){let n=Object.getOwnPropertyDescriptors(r);Object.assign(e,n)}return Object.defineProperties({},e)}function b7(t){return Ro(t._zod.def)}function S7(t,e){return e?e.reduce((r,n)=>r?.[n],t):t}function w7(t){let e=Object.keys(t),r=e.map(n=>t[n]);return Promise.all(r).then(n=>{let i={};for(let o=0;o<e.length;o++)i[e[o]]=n[o];return i})}function B7(t=10){let e="abcdefghijklmnopqrstuvwxyz",r="";for(let n=0;n<t;n++)r+=e[Math.floor(Math.random()*e.length)];return r}function Q7(t){return JSON.stringify(t)}function v7(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}G.captureStackTrace="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function xC(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}G.allowsEval=AN(()=>{if(c7.globalConfig.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let t=Function;return new t(""),!0}catch{return!1}});function _f(t){if(xC(t)===!1)return!1;let e=t.constructor;if(e===void 0||typeof e!="function")return!0;let r=e.prototype;return!(xC(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function _7(t){return _f(t)?{...t}:Array.isArray(t)?[...t]:t instanceof Map?new Map(t):t instanceof Set?new Set(t):t}function D7(t){let e=0;for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&e++;return e}var T7=t=>{let e=typeof t;switch(e){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(t)?"array":t===null?"null":t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?"promise":typeof Map<"u"&&t instanceof Map?"map":typeof Set<"u"&&t instanceof Set?"set":typeof Date<"u"&&t instanceof Date?"date":typeof File<"u"&&t instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${e}`)}};G.getParsedType=T7;G.propertyKeyTypes=new Set(["string","number","symbol"]);G.primitiveTypes=new Set(["string","number","bigint","boolean","symbol","undefined"]);function R7(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ms(t,e,r){let n=new t._zod.constr(e??t._zod.def);return(!e||r?.parent)&&(n._zod.parent=t),n}function k7(t){let e=t;if(!e)return{};if(typeof e=="string")return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function N7(t){let e;return new Proxy({},{get(r,n,i){return e??(e=t()),Reflect.get(e,n,i)},set(r,n,i,o){return e??(e=t()),Reflect.set(e,n,i,o)},has(r,n){return e??(e=t()),Reflect.has(e,n)},deleteProperty(r,n){return e??(e=t()),Reflect.deleteProperty(e,n)},ownKeys(r){return e??(e=t()),Reflect.ownKeys(e)},getOwnPropertyDescriptor(r,n){return e??(e=t()),Reflect.getOwnPropertyDescriptor(e,n)},defineProperty(r,n,i){return e??(e=t()),Reflect.defineProperty(e,n,i)}})}function pN(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function O7(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}G.NUMBER_FORMAT_RANGES={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};G.BIGINT_FORMAT_RANGES={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function U7(t,e){let r=t._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let o=Ro(t._zod.def,{get shape(){let s={};for(let a in e){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);e[a]&&(s[a]=r.shape[a])}return gs(this,"shape",s),s},checks:[]});return ms(t,o)}function M7(t,e){let r=t._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let o=Ro(t._zod.def,{get shape(){let s={...t._zod.def.shape};for(let a in e){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);e[a]&&delete s[a]}return gs(this,"shape",s),s},checks:[]});return ms(t,o)}function x7(t,e){if(!_f(e))throw new Error("Invalid input to extend: expected a plain object");let r=t._zod.def.checks;if(r&&r.length>0){let o=t._zod.def.shape;for(let s in e)if(Object.getOwnPropertyDescriptor(o,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let i=Ro(t._zod.def,{get shape(){let o={...t._zod.def.shape,...e};return gs(this,"shape",o),o}});return ms(t,i)}function L7(t,e){if(!_f(e))throw new Error("Invalid input to safeExtend: expected a plain object");let r=Ro(t._zod.def,{get shape(){let n={...t._zod.def.shape,...e};return gs(this,"shape",n),n}});return ms(t,r)}function P7(t,e){if(t._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r=Ro(t._zod.def,{get shape(){let n={...t._zod.def.shape,...e._zod.def.shape};return gs(this,"shape",n),n},get catchall(){return e._zod.def.catchall},checks:e._zod.def.checks??[]});return ms(t,r)}function F7(t,e,r){let i=e._zod.def.checks;if(i&&i.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let s=Ro(e._zod.def,{get shape(){let a=e._zod.def.shape,c={...a};if(r)for(let u in r){if(!(u in a))throw new Error(`Unrecognized key: "${u}"`);r[u]&&(c[u]=t?new t({type:"optional",innerType:a[u]}):a[u])}else for(let u in a)c[u]=t?new t({type:"optional",innerType:a[u]}):a[u];return gs(this,"shape",c),c},checks:[]});return ms(e,s)}function $7(t,e,r){let n=Ro(e._zod.def,{get shape(){let i=e._zod.def.shape,o={...i};if(r)for(let s in r){if(!(s in o))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(o[s]=new t({type:"nonoptional",innerType:i[s]}))}else for(let s in i)o[s]=new t({type:"nonoptional",innerType:i[s]});return gs(this,"shape",o),o}});return ms(e,n)}function j7(t,e=0){if(t.aborted===!0)return!0;for(let r=e;r<t.issues.length;r++)if(t.issues[r]?.continue!==!0)return!0;return!1}function q7(t,e=0){if(t.aborted===!0)return!0;for(let r=e;r<t.issues.length;r++)if(t.issues[r]?.continue===!1)return!0;return!1}function z7(t,e){return e.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(t),r})}function ud(t){return typeof t=="string"?t:t?.message}function G7(t,e,r){let n=t.message?t.message:ud(t.inst?._zod.def?.error?.(t))??ud(e?.error?.(t))??ud(r.customError?.(t))??ud(r.localeError?.(t))??"Invalid input",{inst:i,continue:o,input:s,...a}=t;return a.path??(a.path=[]),a.message=n,e?.reportInput&&(a.input=s),a}function H7(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function Y7(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function V7(t){let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"nan":"number";case"object":{if(t===null)return"null";if(Array.isArray(t))return"array";let r=t;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return e}function J7(...t){let[e,r,n]=t;return typeof e=="string"?{message:e,code:"custom",input:r,inst:n}:{...e}}function W7(t){return Object.entries(t).filter(([e,r])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function fN(t){let e=atob(t),r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=e.charCodeAt(n);return r}function hN(t){let e="";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return btoa(e)}function Z7(t){let e=t.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-e.length%4)%4);return fN(e+r)}function K7(t){return hN(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function X7(t){let e=t.replace(/^0x/,"");if(e.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2)r[n/2]=Number.parseInt(e.slice(n,n+2),16);return r}function eee(t){return Array.from(t).map(e=>e.toString(16).padStart(2,"0")).join("")}var LC=class{constructor(...e){}};G.Class=LC});var PC=m(Ft=>{"use strict";var tee=Ft&&Ft.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),ree=Ft&&Ft.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),nee=Ft&&Ft.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&tee(e,t,r);return ree(e,t),e};Object.defineProperty(Ft,"__esModule",{value:!0});Ft.$ZodRealError=Ft.$ZodError=void 0;Ft.flattenError=oee;Ft.formatError=see;Ft.treeifyError=aee;Ft.toDotPath=yN;Ft.prettifyError=cee;var gN=Sa(),iee=nee(ee()),mN=(t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),t.message=JSON.stringify(e,iee.jsonStringifyReplacer,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})};Ft.$ZodError=(0,gN.$constructor)("$ZodError",mN);Ft.$ZodRealError=(0,gN.$constructor)("$ZodError",mN,{Parent:Error});function oee(t,e=r=>r.message){let r={},n=[];for(let i of t.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:r}}function see(t,e=r=>r.message){let r={_errors:[]},n=(i,o=[])=>{for(let s of i.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(a=>n({issues:a},[...o,...s.path]));else if(s.code==="invalid_key")n({issues:s.issues},[...o,...s.path]);else if(s.code==="invalid_element")n({issues:s.issues},[...o,...s.path]);else{let a=[...o,...s.path];if(a.length===0)r._errors.push(e(s));else{let c=r,u=0;for(;u<a.length;){let l=a[u];u===a.length-1?(c[l]=c[l]||{_errors:[]},c[l]._errors.push(e(s))):c[l]=c[l]||{_errors:[]},c=c[l],u++}}}};return n(t),r}function aee(t,e=r=>r.message){let r={errors:[]},n=(i,o=[])=>{var s,a;for(let c of i.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(u=>n({issues:u},[...o,...c.path]));else if(c.code==="invalid_key")n({issues:c.issues},[...o,...c.path]);else if(c.code==="invalid_element")n({issues:c.issues},[...o,...c.path]);else{let u=[...o,...c.path];if(u.length===0){r.errors.push(e(c));continue}let l=r,d=0;for(;d<u.length;){let A=u[d],p=d===u.length-1;typeof A=="string"?(l.properties??(l.properties={}),(s=l.properties)[A]??(s[A]={errors:[]}),l=l.properties[A]):(l.items??(l.items=[]),(a=l.items)[A]??(a[A]={errors:[]}),l=l.items[A]),p&&l.errors.push(e(c)),d++}}};return n(t),r}function yN(t){let e=[],r=t.map(n=>typeof n=="object"?n.key:n);for(let n of r)typeof n=="number"?e.push(`[${n}]`):typeof n=="symbol"?e.push(`[${JSON.stringify(String(n))}]`):/[^\w$]/.test(n)?e.push(`[${JSON.stringify(n)}]`):(e.length&&e.push("."),e.push(n));return e.join("")}function cee(t){let e=[],r=[...t.issues].sort((n,i)=>(n.path??[]).length-(i.path??[]).length);for(let n of r)e.push(`\u2716 ${n.message}`),n.path?.length&&e.push(` \u2192 at ${yN(n.path)}`);return e.join(`
16
16
  `)}});var $C=m(j=>{"use strict";var uee=j&&j.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),lee=j&&j.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),FC=j&&j.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&uee(e,t,r);return lee(e,t),e};Object.defineProperty(j,"__esModule",{value:!0});j.safeDecodeAsync=j._safeDecodeAsync=j.safeEncodeAsync=j._safeEncodeAsync=j.safeDecode=j._safeDecode=j.safeEncode=j._safeEncode=j.decodeAsync=j._decodeAsync=j.encodeAsync=j._encodeAsync=j.decode=j._decode=j.encode=j._encode=j.safeParseAsync=j._safeParseAsync=j.safeParse=j._safeParse=j.parseAsync=j._parseAsync=j.parse=j._parse=void 0;var Yc=FC(Sa()),Mr=FC(PC()),Vc=FC(ee()),dee=t=>(e,r,n,i)=>{let o=n?{...n,async:!1}:{async:!1},s=e._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new Yc.$ZodAsyncError;if(s.issues.length){let a=new(i?.Err??t)(s.issues.map(c=>Vc.finalizeIssue(c,o,Yc.config())));throw Vc.captureStackTrace(a,i?.callee),a}return s.value};j._parse=dee;j.parse=(0,j._parse)(Mr.$ZodRealError);var Aee=t=>async(e,r,n,i)=>{let o=n?{...n,async:!0}:{async:!0},s=e._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let a=new(i?.Err??t)(s.issues.map(c=>Vc.finalizeIssue(c,o,Yc.config())));throw Vc.captureStackTrace(a,i?.callee),a}return s.value};j._parseAsync=Aee;j.parseAsync=(0,j._parseAsync)(Mr.$ZodRealError);var pee=t=>(e,r,n)=>{let i=n?{...n,async:!1}:{async:!1},o=e._zod.run({value:r,issues:[]},i);if(o instanceof Promise)throw new Yc.$ZodAsyncError;return o.issues.length?{success:!1,error:new(t??Mr.$ZodError)(o.issues.map(s=>Vc.finalizeIssue(s,i,Yc.config())))}:{success:!0,data:o.value}};j._safeParse=pee;j.safeParse=(0,j._safeParse)(Mr.$ZodRealError);var fee=t=>async(e,r,n)=>{let i=n?{...n,async:!0}:{async:!0},o=e._zod.run({value:r,issues:[]},i);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new t(o.issues.map(s=>Vc.finalizeIssue(s,i,Yc.config())))}:{success:!0,data:o.value}};j._safeParseAsync=fee;j.safeParseAsync=(0,j._safeParseAsync)(Mr.$ZodRealError);var hee=t=>(e,r,n)=>{let i=n?{...n,direction:"backward"}:{direction:"backward"};return(0,j._parse)(t)(e,r,i)};j._encode=hee;j.encode=(0,j._encode)(Mr.$ZodRealError);var gee=t=>(e,r,n)=>(0,j._parse)(t)(e,r,n);j._decode=gee;j.decode=(0,j._decode)(Mr.$ZodRealError);var mee=t=>async(e,r,n)=>{let i=n?{...n,direction:"backward"}:{direction:"backward"};return(0,j._parseAsync)(t)(e,r,i)};j._encodeAsync=mee;j.encodeAsync=(0,j._encodeAsync)(Mr.$ZodRealError);var yee=t=>async(e,r,n)=>(0,j._parseAsync)(t)(e,r,n);j._decodeAsync=yee;j.decodeAsync=(0,j._decodeAsync)(Mr.$ZodRealError);var Eee=t=>(e,r,n)=>{let i=n?{...n,direction:"backward"}:{direction:"backward"};return(0,j._safeParse)(t)(e,r,i)};j._safeEncode=Eee;j.safeEncode=(0,j._safeEncode)(Mr.$ZodRealError);var Iee=t=>(e,r,n)=>(0,j._safeParse)(t)(e,r,n);j._safeDecode=Iee;j.safeDecode=(0,j._safeDecode)(Mr.$ZodRealError);var Cee=t=>async(e,r,n)=>{let i=n?{...n,direction:"backward"}:{direction:"backward"};return(0,j._safeParseAsync)(t)(e,r,i)};j._safeEncodeAsync=Cee;j.safeEncodeAsync=(0,j._safeEncodeAsync)(Mr.$ZodRealError);var bee=t=>async(e,r,n)=>(0,j._safeParseAsync)(t)(e,r,n);j._safeDecodeAsync=bee;j.safeDecodeAsync=(0,j._safeDecodeAsync)(Mr.$ZodRealError)});var Df=m(T=>{"use strict";var See=T&&T.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),wee=T&&T.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Bee=T&&T.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&See(e,t,r);return wee(e,t),e};Object.defineProperty(T,"__esModule",{value:!0});T.sha256_base64url=T.sha256_base64=T.sha256_hex=T.sha1_base64url=T.sha1_base64=T.sha1_hex=T.md5_base64url=T.md5_base64=T.md5_hex=T.hex=T.uppercase=T.lowercase=T.undefined=T.null=T.boolean=T.number=T.integer=T.bigint=T.string=T.date=T.e164=T.httpProtocol=T.domain=T.hostname=T.base64url=T.base64=T.cidrv6=T.cidrv4=T.mac=T.ipv6=T.ipv4=T.browserEmail=T.idnEmail=T.unicodeEmail=T.rfc5322Email=T.html5Email=T.email=T.uuid7=T.uuid6=T.uuid4=T.uuid=T.guid=T.extendedDuration=T.duration=T.nanoid=T.ksuid=T.xid=T.ulid=T.cuid2=T.cuid=void 0;T.sha512_base64url=T.sha512_base64=T.sha512_hex=T.sha384_base64url=T.sha384_base64=T.sha384_hex=void 0;T.emoji=Dee;T.time=Ree;T.datetime=kee;var Qee=Bee(ee());T.cuid=/^[cC][0-9a-z]{6,}$/;T.cuid2=/^[0-9a-z]+$/;T.ulid=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;T.xid=/^[0-9a-vA-V]{20}$/;T.ksuid=/^[A-Za-z0-9]{27}$/;T.nanoid=/^[a-zA-Z0-9_-]{21}$/;T.duration=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;T.extendedDuration=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/;T.guid=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/;var vee=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;T.uuid=vee;T.uuid4=(0,T.uuid)(4);T.uuid6=(0,T.uuid)(6);T.uuid7=(0,T.uuid)(7);T.email=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;T.html5Email=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;T.rfc5322Email=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;T.unicodeEmail=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u;T.idnEmail=T.unicodeEmail;T.browserEmail=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;var _ee="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Dee(){return new RegExp(_ee,"u")}T.ipv4=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;T.ipv6=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/;var Tee=t=>{let e=Qee.escapeRegex(t??":");return new RegExp(`^(?:[0-9A-F]{2}${e}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${e}){5}[0-9a-f]{2}$`)};T.mac=Tee;T.cidrv4=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/;T.cidrv6=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;T.base64=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/;T.base64url=/^[A-Za-z0-9_-]*$/;T.hostname=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/;T.domain=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/;T.httpProtocol=/^https?$/;T.e164=/^\+[1-9]\d{6,14}$/;var EN="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))";T.date=new RegExp(`^${EN}$`);function IN(t){let e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${e}`:t.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${t.precision}}`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Ree(t){return new RegExp(`^${IN(t)}$`)}function kee(t){let e=IN({precision:t.precision}),r=["Z"];t.local&&r.push(""),t.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let n=`${e}(?:${r.join("|")})`;return new RegExp(`^${EN}T(?:${n})$`)}var Nee=t=>{let e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)};T.string=Nee;T.bigint=/^-?\d+n?$/;T.integer=/^-?\d+$/;T.number=/^-?\d+(?:\.\d+)?$/;T.boolean=/^(?:true|false)$/i;var Oee=/^null$/i;T.null=Oee;var Uee=/^undefined$/i;T.undefined=Uee;T.lowercase=/^[^A-Z]*$/;T.uppercase=/^[^a-z]*$/;T.hex=/^[0-9a-fA-F]*$/;function ld(t,e){return new RegExp(`^[A-Za-z0-9+/]{${t}}${e}$`)}function dd(t){return new RegExp(`^[A-Za-z0-9_-]{${t}}$`)}T.md5_hex=/^[0-9a-fA-F]{32}$/;T.md5_base64=ld(22,"==");T.md5_base64url=dd(22);T.sha1_hex=/^[0-9a-fA-F]{40}$/;T.sha1_base64=ld(27,"=");T.sha1_base64url=dd(27);T.sha256_hex=/^[0-9a-fA-F]{64}$/;T.sha256_base64=ld(43,"=");T.sha256_base64url=dd(43);T.sha384_hex=/^[0-9a-fA-F]{96}$/;T.sha384_base64=ld(64,"");T.sha384_base64url=dd(64);T.sha512_hex=/^[0-9a-fA-F]{128}$/;T.sha512_base64=ld(86,"==");T.sha512_base64url=dd(86)});var Tf=m(H=>{"use strict";var Mee=H&&H.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),xee=H&&H.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),jC=H&&H.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Mee(e,t,r);return xee(e,t),e};Object.defineProperty(H,"__esModule",{value:!0});H.$ZodCheckOverwrite=H.$ZodCheckMimeType=H.$ZodCheckProperty=H.$ZodCheckEndsWith=H.$ZodCheckStartsWith=H.$ZodCheckIncludes=H.$ZodCheckUpperCase=H.$ZodCheckLowerCase=H.$ZodCheckRegex=H.$ZodCheckStringFormat=H.$ZodCheckLengthEquals=H.$ZodCheckMinLength=H.$ZodCheckMaxLength=H.$ZodCheckSizeEquals=H.$ZodCheckMinSize=H.$ZodCheckMaxSize=H.$ZodCheckBigIntFormat=H.$ZodCheckNumberFormat=H.$ZodCheckMultipleOf=H.$ZodCheckGreaterThan=H.$ZodCheckLessThan=H.$ZodCheck=void 0;var dt=jC(Sa()),qC=jC(Df()),Tt=jC(ee());H.$ZodCheck=dt.$constructor("$ZodCheck",(t,e)=>{var r;t._zod??(t._zod={}),t._zod.def=e,(r=t._zod).onattach??(r.onattach=[])});var bN={number:"number",bigint:"bigint",object:"date"};H.$ZodCheckLessThan=dt.$constructor("$ZodCheckLessThan",(t,e)=>{H.$ZodCheck.init(t,e);let r=bN[typeof e.value];t._zod.onattach.push(n=>{let i=n._zod.bag,o=(e.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value<o&&(e.inclusive?i.maximum=e.value:i.exclusiveMaximum=e.value)}),t._zod.check=n=>{(e.inclusive?n.value<=e.value:n.value<e.value)||n.issues.push({origin:r,code:"too_big",maximum:typeof e.value=="object"?e.value.getTime():e.value,input:n.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}});H.$ZodCheckGreaterThan=dt.$constructor("$ZodCheckGreaterThan",(t,e)=>{H.$ZodCheck.init(t,e);let r=bN[typeof e.value];t._zod.onattach.push(n=>{let i=n._zod.bag,o=(e.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>o&&(e.inclusive?i.minimum=e.value:i.exclusiveMinimum=e.value)}),t._zod.check=n=>{(e.inclusive?n.value>=e.value:n.value>e.value)||n.issues.push({origin:r,code:"too_small",minimum:typeof e.value=="object"?e.value.getTime():e.value,input:n.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}});H.$ZodCheckMultipleOf=dt.$constructor("$ZodCheckMultipleOf",(t,e)=>{H.$ZodCheck.init(t,e),t._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=e.value)}),t._zod.check=r=>{if(typeof r.value!=typeof e.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%e.value===BigInt(0):Tt.floatSafeRemainder(r.value,e.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:e.value,input:r.value,inst:t,continue:!e.abort})}});H.$ZodCheckNumberFormat=dt.$constructor("$ZodCheckNumberFormat",(t,e)=>{H.$ZodCheck.init(t,e),e.format=e.format||"float64";let r=e.format?.includes("int"),n=r?"int":"number",[i,o]=Tt.NUMBER_FORMAT_RANGES[e.format];t._zod.onattach.push(s=>{let a=s._zod.bag;a.format=e.format,a.minimum=i,a.maximum=o,r&&(a.pattern=qC.integer)}),t._zod.check=s=>{let a=s.value;if(r){if(!Number.isInteger(a)){s.issues.push({expected:n,format:e.format,code:"invalid_type",continue:!1,input:a,inst:t});return}if(!Number.isSafeInteger(a)){a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:n,inclusive:!0,continue:!e.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:n,inclusive:!0,continue:!e.abort});return}}a<i&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:i,inclusive:!0,inst:t,continue:!e.abort}),a>o&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:o,inclusive:!0,inst:t,continue:!e.abort})}});H.$ZodCheckBigIntFormat=dt.$constructor("$ZodCheckBigIntFormat",(t,e)=>{H.$ZodCheck.init(t,e);let[r,n]=Tt.BIGINT_FORMAT_RANGES[e.format];t._zod.onattach.push(i=>{let o=i._zod.bag;o.format=e.format,o.minimum=r,o.maximum=n}),t._zod.check=i=>{let o=i.value;o<r&&i.issues.push({origin:"bigint",input:o,code:"too_small",minimum:r,inclusive:!0,inst:t,continue:!e.abort}),o>n&&i.issues.push({origin:"bigint",input:o,code:"too_big",maximum:n,inclusive:!0,inst:t,continue:!e.abort})}});H.$ZodCheckMaxSize=dt.$constructor("$ZodCheckMaxSize",(t,e)=>{var r;H.$ZodCheck.init(t,e),(r=t._zod.def).when??(r.when=n=>{let i=n.value;return!Tt.nullish(i)&&i.size!==void 0}),t._zod.onattach.push(n=>{let i=n._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<i&&(n._zod.bag.maximum=e.maximum)}),t._zod.check=n=>{let i=n.value;i.size<=e.maximum||n.issues.push({origin:Tt.getSizableOrigin(i),code:"too_big",maximum:e.maximum,inclusive:!0,input:i,inst:t,continue:!e.abort})}});H.$ZodCheckMinSize=dt.$constructor("$ZodCheckMinSize",(t,e)=>{var r;H.$ZodCheck.init(t,e),(r=t._zod.def).when??(r.when=n=>{let i=n.value;return!Tt.nullish(i)&&i.size!==void 0}),t._zod.onattach.push(n=>{let i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>i&&(n._zod.bag.minimum=e.minimum)}),t._zod.check=n=>{let i=n.value;i.size>=e.minimum||n.issues.push({origin:Tt.getSizableOrigin(i),code:"too_small",minimum:e.minimum,inclusive:!0,input:i,inst:t,continue:!e.abort})}});H.$ZodCheckSizeEquals=dt.$constructor("$ZodCheckSizeEquals",(t,e)=>{var r;H.$ZodCheck.init(t,e),(r=t._zod.def).when??(r.when=n=>{let i=n.value;return!Tt.nullish(i)&&i.size!==void 0}),t._zod.onattach.push(n=>{let i=n._zod.bag;i.minimum=e.size,i.maximum=e.size,i.size=e.size}),t._zod.check=n=>{let i=n.value,o=i.size;if(o===e.size)return;let s=o>e.size;n.issues.push({origin:Tt.getSizableOrigin(i),...s?{code:"too_big",maximum:e.size}:{code:"too_small",minimum:e.size},inclusive:!0,exact:!0,input:n.value,inst:t,continue:!e.abort})}});H.$ZodCheckMaxLength=dt.$constructor("$ZodCheckMaxLength",(t,e)=>{var r;H.$ZodCheck.init(t,e),(r=t._zod.def).when??(r.when=n=>{let i=n.value;return!Tt.nullish(i)&&i.length!==void 0}),t._zod.onattach.push(n=>{let i=n._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<i&&(n._zod.bag.maximum=e.maximum)}),t._zod.check=n=>{let i=n.value;if(i.length<=e.maximum)return;let s=Tt.getLengthableOrigin(i);n.issues.push({origin:s,code:"too_big",maximum:e.maximum,inclusive:!0,input:i,inst:t,continue:!e.abort})}});H.$ZodCheckMinLength=dt.$constructor("$ZodCheckMinLength",(t,e)=>{var r;H.$ZodCheck.init(t,e),(r=t._zod.def).when??(r.when=n=>{let i=n.value;return!Tt.nullish(i)&&i.length!==void 0}),t._zod.onattach.push(n=>{let i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>i&&(n._zod.bag.minimum=e.minimum)}),t._zod.check=n=>{let i=n.value;if(i.length>=e.minimum)return;let s=Tt.getLengthableOrigin(i);n.issues.push({origin:s,code:"too_small",minimum:e.minimum,inclusive:!0,input:i,inst:t,continue:!e.abort})}});H.$ZodCheckLengthEquals=dt.$constructor("$ZodCheckLengthEquals",(t,e)=>{var r;H.$ZodCheck.init(t,e),(r=t._zod.def).when??(r.when=n=>{let i=n.value;return!Tt.nullish(i)&&i.length!==void 0}),t._zod.onattach.push(n=>{let i=n._zod.bag;i.minimum=e.length,i.maximum=e.length,i.length=e.length}),t._zod.check=n=>{let i=n.value,o=i.length;if(o===e.length)return;let s=Tt.getLengthableOrigin(i),a=o>e.length;n.issues.push({origin:s,...a?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:n.value,inst:t,continue:!e.abort})}});H.$ZodCheckStringFormat=dt.$constructor("$ZodCheckStringFormat",(t,e)=>{var r,n;H.$ZodCheck.init(t,e),t._zod.onattach.push(i=>{let o=i._zod.bag;o.format=e.format,e.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(e.pattern))}),e.pattern?(r=t._zod).check??(r.check=i=>{e.pattern.lastIndex=0,!e.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:e.format,input:i.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(n=t._zod).check??(n.check=()=>{})});H.$ZodCheckRegex=dt.$constructor("$ZodCheckRegex",(t,e)=>{H.$ZodCheckStringFormat.init(t,e),t._zod.check=r=>{e.pattern.lastIndex=0,!e.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}});H.$ZodCheckLowerCase=dt.$constructor("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=qC.lowercase),H.$ZodCheckStringFormat.init(t,e)});H.$ZodCheckUpperCase=dt.$constructor("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=qC.uppercase),H.$ZodCheckStringFormat.init(t,e)});H.$ZodCheckIncludes=dt.$constructor("$ZodCheckIncludes",(t,e)=>{H.$ZodCheck.init(t,e);let r=Tt.escapeRegex(e.includes),n=new RegExp(typeof e.position=="number"?`^.{${e.position}}${r}`:r);e.pattern=n,t._zod.onattach.push(i=>{let o=i._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),t._zod.check=i=>{i.value.includes(e.includes,e.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:i.value,inst:t,continue:!e.abort})}});H.$ZodCheckStartsWith=dt.$constructor("$ZodCheckStartsWith",(t,e)=>{H.$ZodCheck.init(t,e);let r=new RegExp(`^${Tt.escapeRegex(e.prefix)}.*`);e.pattern??(e.pattern=r),t._zod.onattach.push(n=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),t._zod.check=n=>{n.value.startsWith(e.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:n.value,inst:t,continue:!e.abort})}});H.$ZodCheckEndsWith=dt.$constructor("$ZodCheckEndsWith",(t,e)=>{H.$ZodCheck.init(t,e);let r=new RegExp(`.*${Tt.escapeRegex(e.suffix)}$`);e.pattern??(e.pattern=r),t._zod.onattach.push(n=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),t._zod.check=n=>{n.value.endsWith(e.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:n.value,inst:t,continue:!e.abort})}});function CN(t,e,r){t.issues.length&&e.issues.push(...Tt.prefixIssues(r,t.issues))}H.$ZodCheckProperty=dt.$constructor("$ZodCheckProperty",(t,e)=>{H.$ZodCheck.init(t,e),t._zod.check=r=>{let n=e.schema._zod.run({value:r.value[e.property],issues:[]},{});if(n instanceof Promise)return n.then(i=>CN(i,r,e.property));CN(n,r,e.property)}});H.$ZodCheckMimeType=dt.$constructor("$ZodCheckMimeType",(t,e)=>{H.$ZodCheck.init(t,e);let r=new Set(e.mime);t._zod.onattach.push(n=>{n._zod.bag.mime=e.mime}),t._zod.check=n=>{r.has(n.value.type)||n.issues.push({code:"invalid_value",values:e.mime,input:n.value.type,inst:t,continue:!e.abort})}});H.$ZodCheckOverwrite=dt.$constructor("$ZodCheckOverwrite",(t,e)=>{H.$ZodCheck.init(t,e),t._zod.check=r=>{r.value=e.tx(r.value)}})});var GC=m(Rf=>{"use strict";Object.defineProperty(Rf,"__esModule",{value:!0});Rf.Doc=void 0;var zC=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let n=e.split(`
17
17
  `).filter(s=>s),i=Math.min(...n.map(s=>s.length-s.trimStart().length)),o=n.map(s=>s.slice(i)).map(s=>" ".repeat(this.indent*2)+s);for(let s of o)this.content.push(s)}compile(){let e=Function,r=this?.args,i=[...(this?.content??[""]).map(o=>` ${o}`)];return new e(...r,i.join(`
18
18
  `))}};Rf.Doc=zC});var HC=m(kf=>{"use strict";Object.defineProperty(kf,"__esModule",{value:!0});kf.version=void 0;kf.version={major:4,minor:4,patch:3}});var JC=m(b=>{"use strict";var Lee=b&&b.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Pee=b&&b.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),xf=b&&b.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Lee(e,t,r);return Pee(e,t),e};Object.defineProperty(b,"__esModule",{value:!0});b.$ZodTuple=b.$ZodIntersection=b.$ZodDiscriminatedUnion=b.$ZodXor=b.$ZodUnion=b.$ZodObjectJIT=b.$ZodObject=b.$ZodArray=b.$ZodDate=b.$ZodVoid=b.$ZodNever=b.$ZodUnknown=b.$ZodAny=b.$ZodNull=b.$ZodUndefined=b.$ZodSymbol=b.$ZodBigIntFormat=b.$ZodBigInt=b.$ZodBoolean=b.$ZodNumberFormat=b.$ZodNumber=b.$ZodCustomStringFormat=b.$ZodJWT=b.$ZodE164=b.$ZodBase64URL=b.$ZodBase64=b.$ZodCIDRv6=b.$ZodCIDRv4=b.$ZodMAC=b.$ZodIPv6=b.$ZodIPv4=b.$ZodISODuration=b.$ZodISOTime=b.$ZodISODate=b.$ZodISODateTime=b.$ZodKSUID=b.$ZodXID=b.$ZodULID=b.$ZodCUID2=b.$ZodCUID=b.$ZodNanoID=b.$ZodEmoji=b.$ZodURL=b.$ZodEmail=b.$ZodUUID=b.$ZodGUID=b.$ZodStringFormat=b.$ZodString=b.clone=b.$ZodType=void 0;b.$ZodCustom=b.$ZodLazy=b.$ZodPromise=b.$ZodFunction=b.$ZodTemplateLiteral=b.$ZodReadonly=b.$ZodPreprocess=b.$ZodCodec=b.$ZodPipe=b.$ZodNaN=b.$ZodCatch=b.$ZodSuccess=b.$ZodNonOptional=b.$ZodPrefault=b.$ZodDefault=b.$ZodNullable=b.$ZodExactOptional=b.$ZodOptional=b.$ZodTransform=b.$ZodFile=b.$ZodLiteral=b.$ZodEnum=b.$ZodSet=b.$ZodMap=b.$ZodRecord=void 0;b.isValidBase64=VC;b.isValidBase64URL=xN;b.isValidJWT=LN;var Lf=xf(Tf()),L=xf(Sa()),Fee=GC(),Jc=$C(),ke=xf(Df()),P=xf(ee()),$ee=HC();b.$ZodType=L.$constructor("$ZodType",(t,e)=>{var r;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=$ee.version;let n=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&n.unshift(t);for(let i of n)for(let o of i._zod.onattach)o(t);if(n.length===0)(r=t._zod).deferred??(r.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{let i=(s,a,c)=>{let u=P.aborted(s),l;for(let d of a){if(d._zod.def.when){if(P.explicitlyAborted(s)||!d._zod.def.when(s))continue}else if(u)continue;let A=s.issues.length,p=d._zod.check(s);if(p instanceof Promise&&c?.async===!1)throw new L.$ZodAsyncError;if(l||p instanceof Promise)l=(l??Promise.resolve()).then(async()=>{await p,s.issues.length!==A&&(u||(u=P.aborted(s,A)))});else{if(s.issues.length===A)continue;u||(u=P.aborted(s,A))}}return l?l.then(()=>s):s},o=(s,a,c)=>{if(P.aborted(s))return s.aborted=!0,s;let u=i(a,n,c);if(u instanceof Promise){if(c.async===!1)throw new L.$ZodAsyncError;return u.then(l=>t._zod.parse(l,c))}return t._zod.parse(u,c)};t._zod.run=(s,a)=>{if(a.skipChecks)return t._zod.parse(s,a);if(a.direction==="backward"){let u=t._zod.parse({value:s.value,issues:[]},{...a,skipChecks:!0});return u instanceof Promise?u.then(l=>o(l,s,a)):o(u,s,a)}let c=t._zod.parse(s,a);if(c instanceof Promise){if(a.async===!1)throw new L.$ZodAsyncError;return c.then(u=>i(u,n,a))}return i(c,n,a)}}P.defineLazy(t,"~standard",()=>({validate:i=>{try{let o=(0,Jc.safeParse)(t,i);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return(0,Jc.safeParseAsync)(t,i).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}))});var jee=ee();Object.defineProperty(b,"clone",{enumerable:!0,get:function(){return jee.clone}});b.$ZodString=L.$constructor("$ZodString",(t,e)=>{b.$ZodType.init(t,e),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??ke.string(t._zod.bag),t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:t}),r}});b.$ZodStringFormat=L.$constructor("$ZodStringFormat",(t,e)=>{Lf.$ZodCheckStringFormat.init(t,e),b.$ZodString.init(t,e)});b.$ZodGUID=L.$constructor("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=ke.guid),b.$ZodStringFormat.init(t,e)});b.$ZodUUID=L.$constructor("$ZodUUID",(t,e)=>{if(e.version){let n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(n===void 0)throw new Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=ke.uuid(n))}else e.pattern??(e.pattern=ke.uuid());b.$ZodStringFormat.init(t,e)});b.$ZodEmail=L.$constructor("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=ke.email),b.$ZodStringFormat.init(t,e)});b.$ZodURL=L.$constructor("$ZodURL",(t,e)=>{b.$ZodStringFormat.init(t,e),t._zod.check=r=>{try{let n=r.value.trim();if(!e.normalize&&e.protocol?.source===ke.httpProtocol.source&&!/^https?:\/\//i.test(n)){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:t,continue:!e.abort});return}let i=new URL(n);e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(i.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:e.hostname.source,input:r.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:r.value,inst:t,continue:!e.abort})),e.normalize?r.value=i.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:t,continue:!e.abort})}}});b.$ZodEmoji=L.$constructor("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=ke.emoji()),b.$ZodStringFormat.init(t,e)});b.$ZodNanoID=L.$constructor("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=ke.nanoid),b.$ZodStringFormat.init(t,e)});b.$ZodCUID=L.$constructor("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=ke.cuid),b.$ZodStringFormat.init(t,e)});b.$ZodCUID2=L.$constructor("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=ke.cuid2),b.$ZodStringFormat.init(t,e)});b.$ZodULID=L.$constructor("$ZodULID",(t,e)=>{e.pattern??(e.pattern=ke.ulid),b.$ZodStringFormat.init(t,e)});b.$ZodXID=L.$constructor("$ZodXID",(t,e)=>{e.pattern??(e.pattern=ke.xid),b.$ZodStringFormat.init(t,e)});b.$ZodKSUID=L.$constructor("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=ke.ksuid),b.$ZodStringFormat.init(t,e)});b.$ZodISODateTime=L.$constructor("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=ke.datetime(e)),b.$ZodStringFormat.init(t,e)});b.$ZodISODate=L.$constructor("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=ke.date),b.$ZodStringFormat.init(t,e)});b.$ZodISOTime=L.$constructor("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=ke.time(e)),b.$ZodStringFormat.init(t,e)});b.$ZodISODuration=L.$constructor("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=ke.duration),b.$ZodStringFormat.init(t,e)});b.$ZodIPv4=L.$constructor("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=ke.ipv4),b.$ZodStringFormat.init(t,e),t._zod.bag.format="ipv4"});b.$ZodIPv6=L.$constructor("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=ke.ipv6),b.$ZodStringFormat.init(t,e),t._zod.bag.format="ipv6",t._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:t,continue:!e.abort})}}});b.$ZodMAC=L.$constructor("$ZodMAC",(t,e)=>{e.pattern??(e.pattern=ke.mac(e.delimiter)),b.$ZodStringFormat.init(t,e),t._zod.bag.format="mac"});b.$ZodCIDRv4=L.$constructor("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=ke.cidrv4),b.$ZodStringFormat.init(t,e)});b.$ZodCIDRv6=L.$constructor("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=ke.cidrv6),b.$ZodStringFormat.init(t,e),t._zod.check=r=>{let n=r.value.split("/");try{if(n.length!==2)throw new Error;let[i,o]=n;if(!o)throw new Error;let s=Number(o);if(`${s}`!==o)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${i}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:t,continue:!e.abort})}}});function VC(t){if(t==="")return!0;if(/\s/.test(t)||t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}b.$ZodBase64=L.$constructor("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=ke.base64),b.$ZodStringFormat.init(t,e),t._zod.bag.contentEncoding="base64",t._zod.check=r=>{VC(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:t,continue:!e.abort})}});function xN(t){if(!ke.base64url.test(t))return!1;let e=t.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=e.padEnd(Math.ceil(e.length/4)*4,"=");return VC(r)}b.$ZodBase64URL=L.$constructor("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=ke.base64url),b.$ZodStringFormat.init(t,e),t._zod.bag.contentEncoding="base64url",t._zod.check=r=>{xN(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:t,continue:!e.abort})}});b.$ZodE164=L.$constructor("$ZodE164",(t,e)=>{e.pattern??(e.pattern=ke.e164),b.$ZodStringFormat.init(t,e)});function LN(t,e=null){try{let r=t.split(".");if(r.length!==3)return!1;let[n]=r;if(!n)return!1;let i=JSON.parse(atob(n));return!("typ"in i&&i?.typ!=="JWT"||!i.alg||e&&(!("alg"in i)||i.alg!==e))}catch{return!1}}b.$ZodJWT=L.$constructor("$ZodJWT",(t,e)=>{b.$ZodStringFormat.init(t,e),t._zod.check=r=>{LN(r.value,e.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:t,continue:!e.abort})}});b.$ZodCustomStringFormat=L.$constructor("$ZodCustomStringFormat",(t,e)=>{b.$ZodStringFormat.init(t,e),t._zod.check=r=>{e.fn(r.value)||r.issues.push({code:"invalid_format",format:e.format,input:r.value,inst:t,continue:!e.abort})}});b.$ZodNumber=L.$constructor("$ZodNumber",(t,e)=>{b.$ZodType.init(t,e),t._zod.pattern=t._zod.bag.pattern??ke.number,t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=Number(r.value)}catch{}let i=r.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return r;let o=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:i,inst:t,...o?{received:o}:{}}),r}});b.$ZodNumberFormat=L.$constructor("$ZodNumberFormat",(t,e)=>{Lf.$ZodCheckNumberFormat.init(t,e),b.$ZodNumber.init(t,e)});b.$ZodBoolean=L.$constructor("$ZodBoolean",(t,e)=>{b.$ZodType.init(t,e),t._zod.pattern=ke.boolean,t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=!!r.value}catch{}let i=r.value;return typeof i=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:t}),r}});b.$ZodBigInt=L.$constructor("$ZodBigInt",(t,e)=>{b.$ZodType.init(t,e),t._zod.pattern=ke.bigint,t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:t}),r}});b.$ZodBigIntFormat=L.$constructor("$ZodBigIntFormat",(t,e)=>{Lf.$ZodCheckBigIntFormat.init(t,e),b.$ZodBigInt.init(t,e)});b.$ZodSymbol=L.$constructor("$ZodSymbol",(t,e)=>{b.$ZodType.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;return typeof i=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:i,inst:t}),r}});b.$ZodUndefined=L.$constructor("$ZodUndefined",(t,e)=>{b.$ZodType.init(t,e),t._zod.pattern=ke.undefined,t._zod.values=new Set([void 0]),t._zod.parse=(r,n)=>{let i=r.value;return typeof i>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:i,inst:t}),r}});b.$ZodNull=L.$constructor("$ZodNull",(t,e)=>{b.$ZodType.init(t,e),t._zod.pattern=ke.null,t._zod.values=new Set([null]),t._zod.parse=(r,n)=>{let i=r.value;return i===null||r.issues.push({expected:"null",code:"invalid_type",input:i,inst:t}),r}});b.$ZodAny=L.$constructor("$ZodAny",(t,e)=>{b.$ZodType.init(t,e),t._zod.parse=r=>r});b.$ZodUnknown=L.$constructor("$ZodUnknown",(t,e)=>{b.$ZodType.init(t,e),t._zod.parse=r=>r});b.$ZodNever=L.$constructor("$ZodNever",(t,e)=>{b.$ZodType.init(t,e),t._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:t}),r)});b.$ZodVoid=L.$constructor("$ZodVoid",(t,e)=>{b.$ZodType.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;return typeof i>"u"||r.issues.push({expected:"void",code:"invalid_type",input:i,inst:t}),r}});b.$ZodDate=L.$constructor("$ZodDate",(t,e)=>{b.$ZodType.init(t,e),t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=new Date(r.value)}catch{}let i=r.value,o=i instanceof Date;return o&&!Number.isNaN(i.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:i,...o?{received:"Invalid Date"}:{},inst:t}),r}});function SN(t,e,r){t.issues.length&&e.issues.push(...P.prefixIssues(r,t.issues)),e.value[r]=t.value}b.$ZodArray=L.$constructor("$ZodArray",(t,e)=>{b.$ZodType.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:t}),r;r.value=Array(i.length);let o=[];for(let s=0;s<i.length;s++){let a=i[s],c=e.element._zod.run({value:a,issues:[]},n);c instanceof Promise?o.push(c.then(u=>SN(u,r,s))):SN(c,r,s)}return o.length?Promise.all(o).then(()=>r):r}});function Mf(t,e,r,n,i,o){let s=r in n;if(t.issues.length){if(i&&o&&!s)return;e.issues.push(...P.prefixIssues(r,t.issues))}if(!s&&!i){t.issues.length||e.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}t.value===void 0?s&&(e.value[r]=void 0):e.value[r]=t.value}function PN(t){let e=Object.keys(t.shape);for(let n of e)if(!t.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);let r=P.optionalKeys(t.shape);return{...t,keys:e,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(r)}}function FN(t,e,r,n,i,o){let s=[],a=i.keySet,c=i.catchall._zod,u=c.def.type,l=c.optin==="optional",d=c.optout==="optional";for(let A in e){if(A==="__proto__"||a.has(A))continue;if(u==="never"){s.push(A);continue}let p=c.run({value:e[A],issues:[]},n);p instanceof Promise?t.push(p.then(h=>Mf(h,r,A,e,l,d))):Mf(p,r,A,e,l,d)}return s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:e,inst:o}),t.length?Promise.all(t).then(()=>r):r}b.$ZodObject=L.$constructor("$ZodObject",(t,e)=>{if(b.$ZodType.init(t,e),!Object.getOwnPropertyDescriptor(e,"shape")?.get){let a=e.shape;Object.defineProperty(e,"shape",{get:()=>{let c={...a};return Object.defineProperty(e,"shape",{value:c}),c}})}let n=P.cached(()=>PN(e));P.defineLazy(t._zod,"propValues",()=>{let a=e.shape,c={};for(let u in a){let l=a[u]._zod;if(l.values){c[u]??(c[u]=new Set);for(let d of l.values)c[u].add(d)}}return c});let i=P.isObject,o=e.catchall,s;t._zod.parse=(a,c)=>{s??(s=n.value);let u=a.value;if(!i(u))return a.issues.push({expected:"object",code:"invalid_type",input:u,inst:t}),a;a.value={};let l=[],d=s.shape;for(let A of s.keys){let p=d[A],h=p._zod.optin==="optional",g=p._zod.optout==="optional",S=p._zod.run({value:u[A],issues:[]},c);S instanceof Promise?l.push(S.then(B=>Mf(B,a,A,u,h,g))):Mf(S,a,A,u,h,g)}return o?FN(l,u,a,c,n.value,t):l.length?Promise.all(l).then(()=>a):a}});b.$ZodObjectJIT=L.$constructor("$ZodObjectJIT",(t,e)=>{b.$ZodObject.init(t,e);let r=t._zod.parse,n=P.cached(()=>PN(e)),i=A=>{let p=new Fee.Doc(["shape","payload","ctx"]),h=n.value,g=Q=>{let k=P.esc(Q);return`shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`};p.write("const input = payload.value;");let S=Object.create(null),B=0;for(let Q of h.keys)S[Q]=`key_${B++}`;p.write("const newResult = {};");for(let Q of h.keys){let k=S[Q],M=P.esc(Q),V=A[Q],Te=V?._zod?.optin==="optional",X=V?._zod?.optout==="optional";p.write(`const ${k} = ${g(Q)};`),Te&&X?p.write(`
@@ -76,7 +76,7 @@ ${t.slice(t.length-n)}`}function R8(t){return t instanceof Error?t.message:typeo
76
76
 
77
77
  `)}p.write("payload.value = newResult;"),p.write("return payload;");let v=p.compile();return(Q,k)=>v(A,Q,k)},o,s=P.isObject,a=!L.globalConfig.jitless,c=P.allowsEval,u=a&&c.value,l=e.catchall,d;t._zod.parse=(A,p)=>{d??(d=n.value);let h=A.value;return s(h)?a&&u&&p?.async===!1&&p.jitless!==!0?(o||(o=i(e.shape)),A=o(A,p),l?FN([],h,A,p,d,t):A):r(A,p):(A.issues.push({expected:"object",code:"invalid_type",input:h,inst:t}),A)}});function wN(t,e,r,n){for(let o of t)if(o.issues.length===0)return e.value=o.value,e;let i=t.filter(o=>!P.aborted(o));return i.length===1?(e.value=i[0].value,i[0]):(e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:t.map(o=>o.issues.map(s=>P.finalizeIssue(s,n,L.config())))}),e)}b.$ZodUnion=L.$constructor("$ZodUnion",(t,e)=>{b.$ZodType.init(t,e),P.defineLazy(t._zod,"optin",()=>e.options.some(n=>n._zod.optin==="optional")?"optional":void 0),P.defineLazy(t._zod,"optout",()=>e.options.some(n=>n._zod.optout==="optional")?"optional":void 0),P.defineLazy(t._zod,"values",()=>{if(e.options.every(n=>n._zod.values))return new Set(e.options.flatMap(n=>Array.from(n._zod.values)))}),P.defineLazy(t._zod,"pattern",()=>{if(e.options.every(n=>n._zod.pattern)){let n=e.options.map(i=>i._zod.pattern);return new RegExp(`^(${n.map(i=>P.cleanRegex(i.source)).join("|")})$`)}});let r=e.options.length===1?e.options[0]._zod.run:null;t._zod.parse=(n,i)=>{if(r)return r(n,i);let o=!1,s=[];for(let a of e.options){let c=a._zod.run({value:n.value,issues:[]},i);if(c instanceof Promise)s.push(c),o=!0;else{if(c.issues.length===0)return c;s.push(c)}}return o?Promise.all(s).then(a=>wN(a,n,t,i)):wN(s,n,t,i)}});function BN(t,e,r,n){let i=t.filter(o=>o.issues.length===0);return i.length===1?(e.value=i[0].value,e):(i.length===0?e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:t.map(o=>o.issues.map(s=>P.finalizeIssue(s,n,L.config())))}):e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:[],inclusive:!1}),e)}b.$ZodXor=L.$constructor("$ZodXor",(t,e)=>{b.$ZodUnion.init(t,e),e.inclusive=!1;let r=e.options.length===1?e.options[0]._zod.run:null;t._zod.parse=(n,i)=>{if(r)return r(n,i);let o=!1,s=[];for(let a of e.options){let c=a._zod.run({value:n.value,issues:[]},i);c instanceof Promise?(s.push(c),o=!0):s.push(c)}return o?Promise.all(s).then(a=>BN(a,n,t,i)):BN(s,n,t,i)}});b.$ZodDiscriminatedUnion=L.$constructor("$ZodDiscriminatedUnion",(t,e)=>{e.inclusive=!1,b.$ZodUnion.init(t,e);let r=t._zod.parse;P.defineLazy(t._zod,"propValues",()=>{let i={};for(let o of e.options){let s=o._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(o)}"`);for(let[a,c]of Object.entries(s)){i[a]||(i[a]=new Set);for(let u of c)i[a].add(u)}}return i});let n=P.cached(()=>{let i=e.options,o=new Map;for(let s of i){let a=s._zod.propValues?.[e.discriminator];if(!a||a.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(s)}"`);for(let c of a){if(o.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);o.set(c,s)}}return o});t._zod.parse=(i,o)=>{let s=i.value;if(!P.isObject(s))return i.issues.push({code:"invalid_type",expected:"object",input:s,inst:t}),i;let a=n.value.get(s?.[e.discriminator]);return a?a._zod.run(i,o):e.unionFallback||o.direction==="backward"?r(i,o):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:e.discriminator,options:Array.from(n.value.keys()),input:s,path:[e.discriminator],inst:t}),i)}});b.$ZodIntersection=L.$constructor("$ZodIntersection",(t,e)=>{b.$ZodType.init(t,e),t._zod.parse=(r,n)=>{let i=r.value,o=e.left._zod.run({value:i,issues:[]},n),s=e.right._zod.run({value:i,issues:[]},n);return o instanceof Promise||s instanceof Promise?Promise.all([o,s]).then(([c,u])=>QN(r,c,u)):QN(r,o,s)}});function YC(t,e){if(t===e)return{valid:!0,data:t};if(t instanceof Date&&e instanceof Date&&+t==+e)return{valid:!0,data:t};if(P.isPlainObject(t)&&P.isPlainObject(e)){let r=Object.keys(e),n=Object.keys(t).filter(o=>r.indexOf(o)!==-1),i={...t,...e};for(let o of n){let s=YC(t[o],e[o]);if(!s.valid)return{valid:!1,mergeErrorPath:[o,...s.mergeErrorPath]};i[o]=s.data}return{valid:!0,data:i}}if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let n=0;n<t.length;n++){let i=t[n],o=e[n],s=YC(i,o);if(!s.valid)return{valid:!1,mergeErrorPath:[n,...s.mergeErrorPath]};r.push(s.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function QN(t,e,r){let n=new Map,i;for(let a of e.issues)if(a.code==="unrecognized_keys"){i??(i=a);for(let c of a.keys)n.has(c)||n.set(c,{}),n.get(c).l=!0}else t.issues.push(a);for(let a of r.issues)if(a.code==="unrecognized_keys")for(let c of a.keys)n.has(c)||n.set(c,{}),n.get(c).r=!0;else t.issues.push(a);let o=[...n].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(o.length&&i&&t.issues.push({...i,keys:o}),P.aborted(t))return t;let s=YC(e.value,r.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return t.value=s.data,t}b.$ZodTuple=L.$constructor("$ZodTuple",(t,e)=>{b.$ZodType.init(t,e);let r=e.items;t._zod.parse=(n,i)=>{let o=n.value;if(!Array.isArray(o))return n.issues.push({input:o,inst:t,expected:"tuple",code:"invalid_type"}),n;n.value=[];let s=[],a=vN(r,"optin"),c=vN(r,"optout");if(!e.rest){if(o.length<a)return n.issues.push({code:"too_small",minimum:a,inclusive:!0,input:o,inst:t,origin:"array"}),n;o.length>r.length&&n.issues.push({code:"too_big",maximum:r.length,inclusive:!0,input:o,inst:t,origin:"array"})}let u=new Array(r.length);for(let l=0;l<r.length;l++){let d=r[l]._zod.run({value:o[l],issues:[]},i);d instanceof Promise?s.push(d.then(A=>{u[l]=A})):u[l]=d}if(e.rest){let l=r.length-1,d=o.slice(r.length);for(let A of d){l++;let p=e.rest._zod.run({value:A,issues:[]},i);p instanceof Promise?s.push(p.then(h=>_N(h,n,l))):_N(p,n,l)}}return s.length?Promise.all(s).then(()=>DN(u,n,r,o,c)):DN(u,n,r,o,c)}});function vN(t,e){for(let r=t.length-1;r>=0;r--)if(t[r]._zod[e]!=="optional")return r+1;return 0}function _N(t,e,r){t.issues.length&&e.issues.push(...P.prefixIssues(r,t.issues)),e.value[r]=t.value}function DN(t,e,r,n,i){for(let o=0;o<r.length;o++){let s=t[o],a=o<n.length;if(s.issues.length){if(!a&&o>=i){e.value.length=o;break}e.issues.push(...P.prefixIssues(o,s.issues))}e.value[o]=s.value}for(let o=e.value.length-1;o>=n.length&&(r[o]._zod.optout==="optional"&&e.value[o]===void 0);o--)e.value.length=o;return e}b.$ZodRecord=L.$constructor("$ZodRecord",(t,e)=>{b.$ZodType.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;if(!P.isPlainObject(i))return r.issues.push({expected:"record",code:"invalid_type",input:i,inst:t}),r;let o=[],s=e.keyType._zod.values;if(s){r.value={};let a=new Set;for(let u of s)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){a.add(typeof u=="number"?u.toString():u);let l=e.keyType._zod.run({value:u,issues:[]},n);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(l.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(p=>P.finalizeIssue(p,n,L.config())),input:u,path:[u],inst:t});continue}let d=l.value,A=e.valueType._zod.run({value:i[u],issues:[]},n);A instanceof Promise?o.push(A.then(p=>{p.issues.length&&r.issues.push(...P.prefixIssues(u,p.issues)),r.value[d]=p.value})):(A.issues.length&&r.issues.push(...P.prefixIssues(u,A.issues)),r.value[d]=A.value)}let c;for(let u in i)a.has(u)||(c=c??[],c.push(u));c&&c.length>0&&r.issues.push({code:"unrecognized_keys",input:i,inst:t,keys:c})}else{r.value={};for(let a of Reflect.ownKeys(i)){if(a==="__proto__"||!Object.prototype.propertyIsEnumerable.call(i,a))continue;let c=e.keyType._zod.run({value:a,issues:[]},n);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof a=="string"&&ke.number.test(a)&&c.issues.length){let d=e.keyType._zod.run({value:Number(a),issues:[]},n);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");d.issues.length===0&&(c=d)}if(c.issues.length){e.mode==="loose"?r.value[a]=i[a]:r.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(d=>P.finalizeIssue(d,n,L.config())),input:a,path:[a],inst:t});continue}let l=e.valueType._zod.run({value:i[a],issues:[]},n);l instanceof Promise?o.push(l.then(d=>{d.issues.length&&r.issues.push(...P.prefixIssues(a,d.issues)),r.value[c.value]=d.value})):(l.issues.length&&r.issues.push(...P.prefixIssues(a,l.issues)),r.value[c.value]=l.value)}}return o.length?Promise.all(o).then(()=>r):r}});b.$ZodMap=L.$constructor("$ZodMap",(t,e)=>{b.$ZodType.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;if(!(i instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:i,inst:t}),r;let o=[];r.value=new Map;for(let[s,a]of i){let c=e.keyType._zod.run({value:s,issues:[]},n),u=e.valueType._zod.run({value:a,issues:[]},n);c instanceof Promise||u instanceof Promise?o.push(Promise.all([c,u]).then(([l,d])=>{TN(l,d,r,s,i,t,n)})):TN(c,u,r,s,i,t,n)}return o.length?Promise.all(o).then(()=>r):r}});function TN(t,e,r,n,i,o,s){t.issues.length&&(P.propertyKeyTypes.has(typeof n)?r.issues.push(...P.prefixIssues(n,t.issues)):r.issues.push({code:"invalid_key",origin:"map",input:i,inst:o,issues:t.issues.map(a=>P.finalizeIssue(a,s,L.config()))})),e.issues.length&&(P.propertyKeyTypes.has(typeof n)?r.issues.push(...P.prefixIssues(n,e.issues)):r.issues.push({origin:"map",code:"invalid_element",input:i,inst:o,key:n,issues:e.issues.map(a=>P.finalizeIssue(a,s,L.config()))})),r.value.set(t.value,e.value)}b.$ZodSet=L.$constructor("$ZodSet",(t,e)=>{b.$ZodType.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;if(!(i instanceof Set))return r.issues.push({input:i,inst:t,expected:"set",code:"invalid_type"}),r;let o=[];r.value=new Set;for(let s of i){let a=e.valueType._zod.run({value:s,issues:[]},n);a instanceof Promise?o.push(a.then(c=>RN(c,r))):RN(a,r)}return o.length?Promise.all(o).then(()=>r):r}});function RN(t,e){t.issues.length&&e.issues.push(...t.issues),e.value.add(t.value)}b.$ZodEnum=L.$constructor("$ZodEnum",(t,e)=>{b.$ZodType.init(t,e);let r=P.getEnumValues(e.entries),n=new Set(r);t._zod.values=n,t._zod.pattern=new RegExp(`^(${r.filter(i=>P.propertyKeyTypes.has(typeof i)).map(i=>typeof i=="string"?P.escapeRegex(i):i.toString()).join("|")})$`),t._zod.parse=(i,o)=>{let s=i.value;return n.has(s)||i.issues.push({code:"invalid_value",values:r,input:s,inst:t}),i}});b.$ZodLiteral=L.$constructor("$ZodLiteral",(t,e)=>{if(b.$ZodType.init(t,e),e.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(e.values);t._zod.values=r,t._zod.pattern=new RegExp(`^(${e.values.map(n=>typeof n=="string"?P.escapeRegex(n):n?P.escapeRegex(n.toString()):String(n)).join("|")})$`),t._zod.parse=(n,i)=>{let o=n.value;return r.has(o)||n.issues.push({code:"invalid_value",values:e.values,input:o,inst:t}),n}});b.$ZodFile=L.$constructor("$ZodFile",(t,e)=>{b.$ZodType.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;return i instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:i,inst:t}),r}});b.$ZodTransform=L.$constructor("$ZodTransform",(t,e)=>{b.$ZodType.init(t,e),t._zod.optin="optional",t._zod.parse=(r,n)=>{if(n.direction==="backward")throw new L.$ZodEncodeError(t.constructor.name);let i=e.transform(r.value,r);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(s=>(r.value=s,r.fallback=!0,r));if(i instanceof Promise)throw new L.$ZodAsyncError;return r.value=i,r.fallback=!0,r}});function kN(t,e){return e===void 0&&(t.issues.length||t.fallback)?{issues:[],value:void 0}:t}b.$ZodOptional=L.$constructor("$ZodOptional",(t,e)=>{b.$ZodType.init(t,e),t._zod.optin="optional",t._zod.optout="optional",P.defineLazy(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),P.defineLazy(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${P.cleanRegex(r.source)})?$`):void 0}),t._zod.parse=(r,n)=>{if(e.innerType._zod.optin==="optional"){let i=r.value,o=e.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>kN(s,i)):kN(o,i)}return r.value===void 0?r:e.innerType._zod.run(r,n)}});b.$ZodExactOptional=L.$constructor("$ZodExactOptional",(t,e)=>{b.$ZodOptional.init(t,e),P.defineLazy(t._zod,"values",()=>e.innerType._zod.values),P.defineLazy(t._zod,"pattern",()=>e.innerType._zod.pattern),t._zod.parse=(r,n)=>e.innerType._zod.run(r,n)});b.$ZodNullable=L.$constructor("$ZodNullable",(t,e)=>{b.$ZodType.init(t,e),P.defineLazy(t._zod,"optin",()=>e.innerType._zod.optin),P.defineLazy(t._zod,"optout",()=>e.innerType._zod.optout),P.defineLazy(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${P.cleanRegex(r.source)}|null)$`):void 0}),P.defineLazy(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),t._zod.parse=(r,n)=>r.value===null?r:e.innerType._zod.run(r,n)});b.$ZodDefault=L.$constructor("$ZodDefault",(t,e)=>{b.$ZodType.init(t,e),t._zod.optin="optional",P.defineLazy(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>{if(n.direction==="backward")return e.innerType._zod.run(r,n);if(r.value===void 0)return r.value=e.defaultValue,r;let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(o=>NN(o,e)):NN(i,e)}});function NN(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}b.$ZodPrefault=L.$constructor("$ZodPrefault",(t,e)=>{b.$ZodType.init(t,e),t._zod.optin="optional",P.defineLazy(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=e.defaultValue),e.innerType._zod.run(r,n))});b.$ZodNonOptional=L.$constructor("$ZodNonOptional",(t,e)=>{b.$ZodType.init(t,e),P.defineLazy(t._zod,"values",()=>{let r=e.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),t._zod.parse=(r,n)=>{let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(o=>ON(o,t)):ON(i,t)}});function ON(t,e){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:e}),t}b.$ZodSuccess=L.$constructor("$ZodSuccess",(t,e)=>{b.$ZodType.init(t,e),t._zod.parse=(r,n)=>{if(n.direction==="backward")throw new L.$ZodEncodeError("ZodSuccess");let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(o=>(r.value=o.issues.length===0,r)):(r.value=i.issues.length===0,r)}});b.$ZodCatch=L.$constructor("$ZodCatch",(t,e)=>{b.$ZodType.init(t,e),t._zod.optin="optional",P.defineLazy(t._zod,"optout",()=>e.innerType._zod.optout),P.defineLazy(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>{if(n.direction==="backward")return e.innerType._zod.run(r,n);let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(o=>(r.value=o.value,o.issues.length&&(r.value=e.catchValue({...r,error:{issues:o.issues.map(s=>P.finalizeIssue(s,n,L.config()))},input:r.value}),r.issues=[],r.fallback=!0),r)):(r.value=i.value,i.issues.length&&(r.value=e.catchValue({...r,error:{issues:i.issues.map(o=>P.finalizeIssue(o,n,L.config()))},input:r.value}),r.issues=[],r.fallback=!0),r)}});b.$ZodNaN=L.$constructor("$ZodNaN",(t,e)=>{b.$ZodType.init(t,e),t._zod.parse=(r,n)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:t,expected:"nan",code:"invalid_type"}),r)});b.$ZodPipe=L.$constructor("$ZodPipe",(t,e)=>{b.$ZodType.init(t,e),P.defineLazy(t._zod,"values",()=>e.in._zod.values),P.defineLazy(t._zod,"optin",()=>e.in._zod.optin),P.defineLazy(t._zod,"optout",()=>e.out._zod.optout),P.defineLazy(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(r,n)=>{if(n.direction==="backward"){let o=e.out._zod.run(r,n);return o instanceof Promise?o.then(s=>Nf(s,e.in,n)):Nf(o,e.in,n)}let i=e.in._zod.run(r,n);return i instanceof Promise?i.then(o=>Nf(o,e.out,n)):Nf(i,e.out,n)}});function Nf(t,e,r){return t.issues.length?(t.aborted=!0,t):e._zod.run({value:t.value,issues:t.issues,fallback:t.fallback},r)}b.$ZodCodec=L.$constructor("$ZodCodec",(t,e)=>{b.$ZodType.init(t,e),P.defineLazy(t._zod,"values",()=>e.in._zod.values),P.defineLazy(t._zod,"optin",()=>e.in._zod.optin),P.defineLazy(t._zod,"optout",()=>e.out._zod.optout),P.defineLazy(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(r,n)=>{if((n.direction||"forward")==="forward"){let o=e.in._zod.run(r,n);return o instanceof Promise?o.then(s=>Of(s,e,n)):Of(o,e,n)}else{let o=e.out._zod.run(r,n);return o instanceof Promise?o.then(s=>Of(s,e,n)):Of(o,e,n)}}});function Of(t,e,r){if(t.issues.length)return t.aborted=!0,t;if((r.direction||"forward")==="forward"){let i=e.transform(t.value,t);return i instanceof Promise?i.then(o=>Uf(t,o,e.out,r)):Uf(t,i,e.out,r)}else{let i=e.reverseTransform(t.value,t);return i instanceof Promise?i.then(o=>Uf(t,o,e.in,r)):Uf(t,i,e.in,r)}}function Uf(t,e,r,n){return t.issues.length?(t.aborted=!0,t):r._zod.run({value:e,issues:t.issues},n)}b.$ZodPreprocess=L.$constructor("$ZodPreprocess",(t,e)=>{b.$ZodPipe.init(t,e)});b.$ZodReadonly=L.$constructor("$ZodReadonly",(t,e)=>{b.$ZodType.init(t,e),P.defineLazy(t._zod,"propValues",()=>e.innerType._zod.propValues),P.defineLazy(t._zod,"values",()=>e.innerType._zod.values),P.defineLazy(t._zod,"optin",()=>e.innerType?._zod?.optin),P.defineLazy(t._zod,"optout",()=>e.innerType?._zod?.optout),t._zod.parse=(r,n)=>{if(n.direction==="backward")return e.innerType._zod.run(r,n);let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(UN):UN(i)}});function UN(t){return t.value=Object.freeze(t.value),t}b.$ZodTemplateLiteral=L.$constructor("$ZodTemplateLiteral",(t,e)=>{b.$ZodType.init(t,e);let r=[];for(let n of e.parts)if(typeof n=="object"&&n!==null){if(!n._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...n._zod.traits].shift()}`);let i=n._zod.pattern instanceof RegExp?n._zod.pattern.source:n._zod.pattern;if(!i)throw new Error(`Invalid template literal part: ${n._zod.traits}`);let o=i.startsWith("^")?1:0,s=i.endsWith("$")?i.length-1:i.length;r.push(i.slice(o,s))}else if(n===null||P.primitiveTypes.has(typeof n))r.push(P.escapeRegex(`${n}`));else throw new Error(`Invalid template literal part: ${n}`);t._zod.pattern=new RegExp(`^${r.join("")}$`),t._zod.parse=(n,i)=>typeof n.value!="string"?(n.issues.push({input:n.value,inst:t,expected:"string",code:"invalid_type"}),n):(t._zod.pattern.lastIndex=0,t._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:t,code:"invalid_format",format:e.format??"template_literal",pattern:t._zod.pattern.source}),n)});b.$ZodFunction=L.$constructor("$ZodFunction",(t,e)=>(b.$ZodType.init(t,e),t._def=e,t._zod.def=e,t.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...n){let i=t._def.input?(0,Jc.parse)(t._def.input,n):n,o=Reflect.apply(r,this,i);return t._def.output?(0,Jc.parse)(t._def.output,o):o}},t.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...n){let i=t._def.input?await(0,Jc.parseAsync)(t._def.input,n):n,o=await Reflect.apply(r,this,i);return t._def.output?await(0,Jc.parseAsync)(t._def.output,o):o}},t._zod.parse=(r,n)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:t}),r):(t._def.output&&t._def.output._zod.def.type==="promise"?r.value=t.implementAsync(r.value):r.value=t.implement(r.value),r),t.input=(...r)=>{let n=t.constructor;return Array.isArray(r[0])?new n({type:"function",input:new b.$ZodTuple({type:"tuple",items:r[0],rest:r[1]}),output:t._def.output}):new n({type:"function",input:r[0],output:t._def.output})},t.output=r=>{let n=t.constructor;return new n({type:"function",input:t._def.input,output:r})},t));b.$ZodPromise=L.$constructor("$ZodPromise",(t,e)=>{b.$ZodType.init(t,e),t._zod.parse=(r,n)=>Promise.resolve(r.value).then(i=>e.innerType._zod.run({value:i,issues:[]},n))});b.$ZodLazy=L.$constructor("$ZodLazy",(t,e)=>{b.$ZodType.init(t,e),P.defineLazy(t._zod,"innerType",()=>{let r=e;return r._cachedInner||(r._cachedInner=e.getter()),r._cachedInner}),P.defineLazy(t._zod,"pattern",()=>t._zod.innerType?._zod?.pattern),P.defineLazy(t._zod,"propValues",()=>t._zod.innerType?._zod?.propValues),P.defineLazy(t._zod,"optin",()=>t._zod.innerType?._zod?.optin??void 0),P.defineLazy(t._zod,"optout",()=>t._zod.innerType?._zod?.optout??void 0),t._zod.parse=(r,n)=>t._zod.innerType._zod.run(r,n)});b.$ZodCustom=L.$constructor("$ZodCustom",(t,e)=>{Lf.$ZodCheck.init(t,e),b.$ZodType.init(t,e),t._zod.parse=(r,n)=>r,t._zod.check=r=>{let n=r.value,i=e.fn(n);if(i instanceof Promise)return i.then(o=>MN(o,r,n,t));MN(i,r,n,t)}});function MN(t,e,r,n){if(!t){let i={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(i.params=n._zod.def.params),e.issues.push(P.issue(i))}}});var jN=m((si,$N)=>{"use strict";var qee=si&&si.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),zee=si&&si.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Gee=si&&si.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&qee(e,t,r);return zee(e,t),e};Object.defineProperty(si,"__esModule",{value:!0});si.default=Yee;var Pf=Gee(ee()),Hee=()=>{let t={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function e(i){return t[i]??null}let r={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Pf.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${i.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${a}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${o}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${a}`}case"invalid_value":return i.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${Pf.stringifyPrimitive(i.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${Pf.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${i.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${i.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${i.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${i.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${i.minimum.toString()} ${s.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${i.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${i.prefix}"`:o.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${o.suffix}"`:o.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${o.includes}"`:o.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${o.pattern}`:`${r[o.format]??i.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${i.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${i.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${i.keys.length>1?"\u0629":""}: ${Pf.joinValues(i.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${i.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${i.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function Yee(){return{localeError:Hee()}}$N.exports=si.default});var zN=m((ai,qN)=>{"use strict";var Vee=ai&&ai.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Jee=ai&&ai.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Wee=ai&&ai.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Vee(e,t,r);return Jee(e,t),e};Object.defineProperty(ai,"__esModule",{value:!0});ai.default=Kee;var Ff=Wee(ee()),Zee=()=>{let t={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function e(i){return t[i]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Ff.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${i.expected}, daxil olan ${a}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${o}, daxil olan ${a}`}case"invalid_value":return i.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${Ff.stringifyPrimitive(i.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${Ff.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${i.origin??"d\u0259y\u0259r"} ${o}${i.maximum.toString()} ${s.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${i.origin??"d\u0259y\u0259r"} ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${i.origin} ${o}${i.minimum.toString()} ${s.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${o.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:o.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${o.suffix}" il\u0259 bitm\u0259lidir`:o.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${o.includes}" daxil olmal\u0131d\u0131r`:o.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${o.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${r[o.format]??i.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${i.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${i.keys.length>1?"lar":""}: ${Ff.joinValues(i.keys,", ")}`;case"invalid_key":return`${i.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${i.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function Kee(){return{localeError:Zee()}}qN.exports=ai.default});var YN=m((ci,HN)=>{"use strict";var Xee=ci&&ci.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),ete=ci&&ci.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),tte=ci&&ci.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Xee(e,t,r);return ete(e,t),e};Object.defineProperty(ci,"__esModule",{value:!0});ci.default=nte;var $f=tte(ee());function GN(t,e,r,n){let i=Math.abs(t),o=i%10,s=i%100;return s>=11&&s<=19?n:o===1?e:o>=2&&o<=4?r:n}var rte=()=>{let t={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function e(i){return t[i]??null}let r={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},n={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=$f.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${i.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${a}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${o}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${a}`}case"invalid_value":return i.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${$f.stringifyPrimitive(i.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${$f.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);if(s){let a=Number(i.maximum),c=GN(a,s.unit.one,s.unit.few,s.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${i.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${o}${i.maximum.toString()} ${c}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${i.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);if(s){let a=Number(i.minimum),c=GN(a,s.unit.one,s.unit.few,s.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${i.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${o}${i.minimum.toString()} ${c}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${i.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${r[o.format]??i.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${i.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${i.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${$f.joinValues(i.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${i.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${i.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function nte(){return{localeError:rte()}}HN.exports=ci.default});var JN=m((ui,VN)=>{"use strict";var ite=ui&&ui.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),ote=ui&&ui.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),ste=ui&&ui.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&ite(e,t,r);return ote(e,t),e};Object.defineProperty(ui,"__esModule",{value:!0});ui.default=cte;var jf=ste(ee()),ate=()=>{let t={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function e(i){return t[i]??null}let r={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},n={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=jf.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${i.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${a}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${a}`}case"invalid_value":return i.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${jf.stringifyPrimitive(i.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${jf.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${i.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${i.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${i.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${i.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${i.minimum.toString()} ${s.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${i.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;if(o.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${o.prefix}"`;if(o.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${o.suffix}"`;if(o.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${o.includes}"`;if(o.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${o.pattern}`;let s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return o.format==="emoji"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="datetime"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="date"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),o.format==="time"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="duration"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${s} ${r[o.format]??i.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${i.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${i.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${i.keys.length>1?"\u043E\u0432\u0435":""}: ${jf.joinValues(i.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${i.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${i.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function cte(){return{localeError:ate()}}VN.exports=ui.default});var ZN=m((li,WN)=>{"use strict";var ute=li&&li.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),lte=li&&li.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),dte=li&&li.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&ute(e,t,r);return lte(e,t),e};Object.defineProperty(li,"__esModule",{value:!0});li.default=pte;var qf=dte(ee()),Ate=()=>{let t={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function e(i){return t[i]??null}let r={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=qf.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${i.expected}, s'ha rebut ${a}`:`Tipus inv\xE0lid: s'esperava ${o}, s'ha rebut ${a}`}case"invalid_value":return i.values.length===1?`Valor inv\xE0lid: s'esperava ${qf.stringifyPrimitive(i.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${qf.joinValues(i.values," o ")}`;case"too_big":{let o=i.inclusive?"com a m\xE0xim":"menys de",s=e(i.origin);return s?`Massa gran: s'esperava que ${i.origin??"el valor"} contingu\xE9s ${o} ${i.maximum.toString()} ${s.unit??"elements"}`:`Massa gran: s'esperava que ${i.origin??"el valor"} fos ${o} ${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?"com a m\xEDnim":"m\xE9s de",s=e(i.origin);return s?`Massa petit: s'esperava que ${i.origin} contingu\xE9s ${o} ${i.minimum.toString()} ${s.unit}`:`Massa petit: s'esperava que ${i.origin} fos ${o} ${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${o.prefix}"`:o.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${o.suffix}"`:o.format==="includes"?`Format inv\xE0lid: ha d'incloure "${o.includes}"`:o.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${o.pattern}`:`Format inv\xE0lid per a ${r[o.format]??i.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${i.divisor}`;case"unrecognized_keys":return`Clau${i.keys.length>1?"s":""} no reconeguda${i.keys.length>1?"s":""}: ${qf.joinValues(i.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${i.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${i.origin}`;default:return"Entrada inv\xE0lida"}}};function pte(){return{localeError:Ate()}}WN.exports=li.default});var XN=m((di,KN)=>{"use strict";var fte=di&&di.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),hte=di&&di.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),gte=di&&di.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&fte(e,t,r);return hte(e,t),e};Object.defineProperty(di,"__esModule",{value:!0});di.default=yte;var zf=gte(ee()),mte=()=>{let t={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function e(i){return t[i]??null}let r={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},n={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=zf.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${i.expected}, obdr\u017Eeno ${a}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${o}, obdr\u017Eeno ${a}`}case"invalid_value":return i.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${zf.stringifyPrimitive(i.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${zf.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${i.origin??"hodnota"} mus\xED m\xEDt ${o}${i.maximum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${i.origin??"hodnota"} mus\xED b\xFDt ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${i.origin??"hodnota"} mus\xED m\xEDt ${o}${i.minimum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${i.origin??"hodnota"} mus\xED b\xFDt ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${o.prefix}"`:o.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${o.suffix}"`:o.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${o.includes}"`:o.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${o.pattern}`:`Neplatn\xFD form\xE1t ${r[o.format]??i.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${i.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${zf.joinValues(i.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${i.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${i.origin}`;default:return"Neplatn\xFD vstup"}}};function yte(){return{localeError:mte()}}KN.exports=di.default});var tO=m((Ai,eO)=>{"use strict";var Ete=Ai&&Ai.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Ite=Ai&&Ai.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Cte=Ai&&Ai.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Ete(e,t,r);return Ite(e,t),e};Object.defineProperty(Ai,"__esModule",{value:!0});Ai.default=Ste;var Gf=Cte(ee()),bte=()=>{let t={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function e(i){return t[i]??null}let r={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},n={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Gf.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Ugyldigt input: forventede instanceof ${i.expected}, fik ${a}`:`Ugyldigt input: forventede ${o}, fik ${a}`}case"invalid_value":return i.values.length===1?`Ugyldig v\xE6rdi: forventede ${Gf.stringifyPrimitive(i.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${Gf.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin),a=n[i.origin]??i.origin;return s?`For stor: forventede ${a??"value"} ${s.verb} ${o} ${i.maximum.toString()} ${s.unit??"elementer"}`:`For stor: forventede ${a??"value"} havde ${o} ${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin),a=n[i.origin]??i.origin;return s?`For lille: forventede ${a} ${s.verb} ${o} ${i.minimum.toString()} ${s.unit}`:`For lille: forventede ${a} havde ${o} ${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Ugyldig streng: skal starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: skal ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: skal indeholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${r[o.format]??i.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${Gf.joinValues(i.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${i.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${i.origin}`;default:return"Ugyldigt input"}}};function Ste(){return{localeError:bte()}}eO.exports=Ai.default});var nO=m((pi,rO)=>{"use strict";var wte=pi&&pi.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Bte=pi&&pi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Qte=pi&&pi.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&wte(e,t,r);return Bte(e,t),e};Object.defineProperty(pi,"__esModule",{value:!0});pi.default=_te;var Hf=Qte(ee()),vte=()=>{let t={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function e(i){return t[i]??null}let r={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},n={nan:"NaN",number:"Zahl",array:"Array"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Hf.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${i.expected}, erhalten ${a}`:`Ung\xFCltige Eingabe: erwartet ${o}, erhalten ${a}`}case"invalid_value":return i.values.length===1?`Ung\xFCltige Eingabe: erwartet ${Hf.stringifyPrimitive(i.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${Hf.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`Zu gro\xDF: erwartet, dass ${i.origin??"Wert"} ${o}${i.maximum.toString()} ${s.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${i.origin??"Wert"} ${o}${i.maximum.toString()} ist`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`Zu klein: erwartet, dass ${i.origin} ${o}${i.minimum.toString()} ${s.unit} hat`:`Zu klein: erwartet, dass ${i.origin} ${o}${i.minimum.toString()} ist`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Ung\xFCltiger String: muss mit "${o.prefix}" beginnen`:o.format==="ends_with"?`Ung\xFCltiger String: muss mit "${o.suffix}" enden`:o.format==="includes"?`Ung\xFCltiger String: muss "${o.includes}" enthalten`:o.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${o.pattern} entsprechen`:`Ung\xFCltig: ${r[o.format]??i.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${i.divisor} sein`;case"unrecognized_keys":return`${i.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${Hf.joinValues(i.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${i.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${i.origin}`;default:return"Ung\xFCltige Eingabe"}}};function _te(){return{localeError:vte()}}rO.exports=pi.default});var oO=m((fi,iO)=>{"use strict";var Dte=fi&&fi.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Tte=fi&&fi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Rte=fi&&fi.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Dte(e,t,r);return Tte(e,t),e};Object.defineProperty(fi,"__esModule",{value:!0});fi.default=Nte;var Yf=Rte(ee()),kte=()=>{let t={string:{unit:"\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},file:{unit:"bytes",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},array:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},set:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},map:{unit:"\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"}};function e(i){return t[i]??null}let r={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Yf.parsedType(i.input),a=n[s]??s;return typeof i.expected=="string"&&/^[A-Z]/.test(i.expected)?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${i.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${a}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${o}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${a}`}case"invalid_value":return i.values.length===1?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${Yf.stringifyPrimitive(i.values[0])}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${Yf.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${i.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${o}${i.maximum.toString()} ${s.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${i.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${i.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${o}${i.minimum.toString()} ${s.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${i.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${o.prefix}"`:o.format==="ends_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${o.suffix}"`:o.format==="includes"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${o.includes}"`:o.format==="regex"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${o.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${r[o.format]??i.format}`}case"not_multiple_of":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${i.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${i.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${i.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${Yf.joinValues(i.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${i.origin}`;case"invalid_union":return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case"invalid_element":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${i.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}};function Nte(){return{localeError:kte()}}iO.exports=fi.default});var WC=m((hi,sO)=>{"use strict";var Ote=hi&&hi.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Ute=hi&&hi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Mte=hi&&hi.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Ote(e,t,r);return Ute(e,t),e};Object.defineProperty(hi,"__esModule",{value:!0});hi.default=Lte;var Vf=Mte(ee()),xte=()=>{let t={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function e(i){return t[i]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Vf.parsedType(i.input),a=n[s]??s;return`Invalid input: expected ${o}, received ${a}`}case"invalid_value":return i.values.length===1?`Invalid input: expected ${Vf.stringifyPrimitive(i.values[0])}`:`Invalid option: expected one of ${Vf.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`Too big: expected ${i.origin??"value"} to have ${o}${i.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${i.origin??"value"} to be ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`Too small: expected ${i.origin} to have ${o}${i.minimum.toString()} ${s.unit}`:`Too small: expected ${i.origin} to be ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Invalid string: must start with "${o.prefix}"`:o.format==="ends_with"?`Invalid string: must end with "${o.suffix}"`:o.format==="includes"?`Invalid string: must include "${o.includes}"`:o.format==="regex"?`Invalid string: must match pattern ${o.pattern}`:`Invalid ${r[o.format]??i.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${i.divisor}`;case"unrecognized_keys":return`Unrecognized key${i.keys.length>1?"s":""}: ${Vf.joinValues(i.keys,", ")}`;case"invalid_key":return`Invalid key in ${i.origin}`;case"invalid_union":return i.options&&Array.isArray(i.options)&&i.options.length>0?`Invalid discriminator value. Expected ${i.options.map(s=>`'${s}'`).join(" | ")}`:"Invalid input";case"invalid_element":return`Invalid value in ${i.origin}`;default:return"Invalid input"}}};function Lte(){return{localeError:xte()}}sO.exports=hi.default});var cO=m((gi,aO)=>{"use strict";var Pte=gi&&gi.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Fte=gi&&gi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),$te=gi&&gi.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Pte(e,t,r);return Fte(e,t),e};Object.defineProperty(gi,"__esModule",{value:!0});gi.default=qte;var Jf=$te(ee()),jte=()=>{let t={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function e(i){return t[i]??null}let r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},n={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Jf.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${i.expected}, ricevi\u011Dis ${a}`:`Nevalida enigo: atendi\u011Dis ${o}, ricevi\u011Dis ${a}`}case"invalid_value":return i.values.length===1?`Nevalida enigo: atendi\u011Dis ${Jf.stringifyPrimitive(i.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${Jf.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`Tro granda: atendi\u011Dis ke ${i.origin??"valoro"} havu ${o}${i.maximum.toString()} ${s.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${i.origin??"valoro"} havu ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`Tro malgranda: atendi\u011Dis ke ${i.origin} havu ${o}${i.minimum.toString()} ${s.unit}`:`Tro malgranda: atendi\u011Dis ke ${i.origin} estu ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${o.prefix}"`:o.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${o.suffix}"`:o.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${o.includes}"`:o.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${o.pattern}`:`Nevalida ${r[o.format]??i.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${i.divisor}`;case"unrecognized_keys":return`Nekonata${i.keys.length>1?"j":""} \u015Dlosilo${i.keys.length>1?"j":""}: ${Jf.joinValues(i.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${i.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${i.origin}`;default:return"Nevalida enigo"}}};function qte(){return{localeError:jte()}}aO.exports=gi.default});var lO=m((mi,uO)=>{"use strict";var zte=mi&&mi.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Gte=mi&&mi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Hte=mi&&mi.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&zte(e,t,r);return Gte(e,t),e};Object.defineProperty(mi,"__esModule",{value:!0});mi.default=Vte;var Wf=Hte(ee()),Yte=()=>{let t={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function e(i){return t[i]??null}let r={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},n={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Wf.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${i.expected}, recibido ${a}`:`Entrada inv\xE1lida: se esperaba ${o}, recibido ${a}`}case"invalid_value":return i.values.length===1?`Entrada inv\xE1lida: se esperaba ${Wf.stringifyPrimitive(i.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${Wf.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin),a=n[i.origin]??i.origin;return s?`Demasiado grande: se esperaba que ${a??"valor"} tuviera ${o}${i.maximum.toString()} ${s.unit??"elementos"}`:`Demasiado grande: se esperaba que ${a??"valor"} fuera ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin),a=n[i.origin]??i.origin;return s?`Demasiado peque\xF1o: se esperaba que ${a} tuviera ${o}${i.minimum.toString()} ${s.unit}`:`Demasiado peque\xF1o: se esperaba que ${a} fuera ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${o.prefix}"`:o.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${o.suffix}"`:o.format==="includes"?`Cadena inv\xE1lida: debe incluir "${o.includes}"`:o.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${o.pattern}`:`Inv\xE1lido ${r[o.format]??i.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${i.divisor}`;case"unrecognized_keys":return`Llave${i.keys.length>1?"s":""} desconocida${i.keys.length>1?"s":""}: ${Wf.joinValues(i.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${n[i.origin]??i.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${n[i.origin]??i.origin}`;default:return"Entrada inv\xE1lida"}}};function Vte(){return{localeError:Yte()}}uO.exports=mi.default});var AO=m((yi,dO)=>{"use strict";var Jte=yi&&yi.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Wte=yi&&yi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Zte=yi&&yi.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Jte(e,t,r);return Wte(e,t),e};Object.defineProperty(yi,"__esModule",{value:!0});yi.default=Xte;var Zf=Zte(ee()),Kte=()=>{let t={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function e(i){return t[i]??null}let r={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},n={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Zf.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${i.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${a} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${o} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${a} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return i.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${Zf.stringifyPrimitive(i.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${Zf.joinValues(i.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${i.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${i.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${i.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${i.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${i.origin} \u0628\u0627\u06CC\u062F ${o}${i.minimum.toString()} ${s.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${i.origin} \u0628\u0627\u06CC\u062F ${o}${i.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:o.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:o.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${o.includes}" \u0628\u0627\u0634\u062F`:o.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${o.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${r[o.format]??i.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${i.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${i.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${Zf.joinValues(i.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${i.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${i.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function Xte(){return{localeError:Kte()}}dO.exports=yi.default});var fO=m((Ei,pO)=>{"use strict";var ere=Ei&&Ei.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),tre=Ei&&Ei.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),rre=Ei&&Ei.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&ere(e,t,r);return tre(e,t),e};Object.defineProperty(Ei,"__esModule",{value:!0});Ei.default=ire;var Kf=rre(ee()),nre=()=>{let t={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function e(i){return t[i]??null}let r={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Kf.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Virheellinen tyyppi: odotettiin instanceof ${i.expected}, oli ${a}`:`Virheellinen tyyppi: odotettiin ${o}, oli ${a}`}case"invalid_value":return i.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${Kf.stringifyPrimitive(i.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${Kf.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`Liian suuri: ${s.subject} t\xE4ytyy olla ${o}${i.maximum.toString()} ${s.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`Liian pieni: ${s.subject} t\xE4ytyy olla ${o}${i.minimum.toString()} ${s.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${o.prefix}"`:o.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${o.suffix}"`:o.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${o.includes}"`:o.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${o.pattern}`:`Virheellinen ${r[o.format]??i.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${i.divisor} monikerta`;case"unrecognized_keys":return`${i.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${Kf.joinValues(i.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}};function ire(){return{localeError:nre()}}pO.exports=Ei.default});var gO=m((Ii,hO)=>{"use strict";var ore=Ii&&Ii.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),sre=Ii&&Ii.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),are=Ii&&Ii.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&ore(e,t,r);return sre(e,t),e};Object.defineProperty(Ii,"__esModule",{value:!0});Ii.default=ure;var Xf=are(ee()),cre=()=>{let t={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function e(i){return t[i]??null}let r={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},n={string:"cha\xEEne",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Xf.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Entr\xE9e invalide : instanceof ${i.expected} attendu, ${a} re\xE7u`:`Entr\xE9e invalide : ${o} attendu, ${a} re\xE7u`}case"invalid_value":return i.values.length===1?`Entr\xE9e invalide : ${Xf.stringifyPrimitive(i.values[0])} attendu`:`Option invalide : une valeur parmi ${Xf.joinValues(i.values,"|")} attendue`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`Trop grand : ${n[i.origin]??"valeur"} doit ${s.verb} ${o}${i.maximum.toString()} ${s.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${n[i.origin]??"valeur"} doit \xEAtre ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`Trop petit : ${n[i.origin]??"valeur"} doit ${s.verb} ${o}${i.minimum.toString()} ${s.unit}`:`Trop petit : ${n[i.origin]??"valeur"} doit \xEAtre ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${o.pattern}`:`${r[o.format]??i.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${i.divisor}`;case"unrecognized_keys":return`Cl\xE9${i.keys.length>1?"s":""} non reconnue${i.keys.length>1?"s":""} : ${Xf.joinValues(i.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${i.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${i.origin}`;default:return"Entr\xE9e invalide"}}};function ure(){return{localeError:cre()}}hO.exports=Ii.default});var yO=m((Ci,mO)=>{"use strict";var lre=Ci&&Ci.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),dre=Ci&&Ci.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Are=Ci&&Ci.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&lre(e,t,r);return dre(e,t),e};Object.defineProperty(Ci,"__esModule",{value:!0});Ci.default=fre;var eh=Are(ee()),pre=()=>{let t={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function e(i){return t[i]??null}let r={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=eh.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Entr\xE9e invalide : attendu instanceof ${i.expected}, re\xE7u ${a}`:`Entr\xE9e invalide : attendu ${o}, re\xE7u ${a}`}case"invalid_value":return i.values.length===1?`Entr\xE9e invalide : attendu ${eh.stringifyPrimitive(i.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${eh.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"\u2264":"<",s=e(i.origin);return s?`Trop grand : attendu que ${i.origin??"la valeur"} ait ${o}${i.maximum.toString()} ${s.unit}`:`Trop grand : attendu que ${i.origin??"la valeur"} soit ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?"\u2265":">",s=e(i.origin);return s?`Trop petit : attendu que ${i.origin} ait ${o}${i.minimum.toString()} ${s.unit}`:`Trop petit : attendu que ${i.origin} soit ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${o.pattern}`:`${r[o.format]??i.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${i.divisor}`;case"unrecognized_keys":return`Cl\xE9${i.keys.length>1?"s":""} non reconnue${i.keys.length>1?"s":""} : ${eh.joinValues(i.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${i.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${i.origin}`;default:return"Entr\xE9e invalide"}}};function fre(){return{localeError:pre()}}mO.exports=Ci.default});var IO=m((bi,EO)=>{"use strict";var hre=bi&&bi.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),gre=bi&&bi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),mre=bi&&bi.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&hre(e,t,r);return gre(e,t),e};Object.defineProperty(bi,"__esModule",{value:!0});bi.default=Ere;var th=mre(ee()),yre=()=>{let t={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},e={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},r=u=>u?t[u]:void 0,n=u=>{let l=r(u);return l?l.label:u??t.unknown.label},i=u=>`\u05D4${n(u)}`,o=u=>(r(u)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",s=u=>u?e[u]??null:null,a={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},c={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let l=u.expected,d=c[l??""]??n(l),A=th.parsedType(u.input),p=c[A]??t[A]?.label??A;return/^[A-Z]/.test(u.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${u.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${p}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${d}, \u05D4\u05EA\u05E7\u05D1\u05DC ${p}`}case"invalid_value":{if(u.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${th.stringifyPrimitive(u.values[0])}`;let l=u.values.map(p=>th.stringifyPrimitive(p));if(u.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${l[0]} \u05D0\u05D5 ${l[1]}`;let d=l[l.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${l.slice(0,-1).join(", ")} \u05D0\u05D5 ${d}`}case"too_big":{let l=s(u.origin),d=i(u.origin??"value");if(u.origin==="string")return`${l?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${u.maximum.toString()} ${l?.unit??""} ${u.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(u.origin==="number"){let h=u.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${u.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${u.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${h}`}if(u.origin==="array"||u.origin==="set"){let h=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",g=u.inclusive?`${u.maximum} ${l?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${u.maximum} ${l?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${d} ${h} \u05DC\u05D4\u05DB\u05D9\u05DC ${g}`.trim()}let A=u.inclusive?"<=":"<",p=o(u.origin??"value");return l?.unit?`${l.longLabel} \u05DE\u05D3\u05D9: ${d} ${p} ${A}${u.maximum.toString()} ${l.unit}`:`${l?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${d} ${p} ${A}${u.maximum.toString()}`}case"too_small":{let l=s(u.origin),d=i(u.origin??"value");if(u.origin==="string")return`${l?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${u.minimum.toString()} ${l?.unit??""} ${u.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(u.origin==="number"){let h=u.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${u.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${u.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${h}`}if(u.origin==="array"||u.origin==="set"){let h=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(u.minimum===1&&u.inclusive){let S=(u.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${h} \u05DC\u05D4\u05DB\u05D9\u05DC ${S}`}let g=u.inclusive?`${u.minimum} ${l?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${u.minimum} ${l?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${h} \u05DC\u05D4\u05DB\u05D9\u05DC ${g}`.trim()}let A=u.inclusive?">=":">",p=o(u.origin??"value");return l?.unit?`${l.shortLabel} \u05DE\u05D3\u05D9: ${d} ${p} ${A}${u.minimum.toString()} ${l.unit}`:`${l?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${d} ${p} ${A}${u.minimum.toString()}`}case"invalid_format":{let l=u;if(l.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${l.prefix}"`;if(l.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${l.suffix}"`;if(l.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${l.includes}"`;if(l.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${l.pattern}`;let d=a[l.format],A=d?.label??l.format,h=(d?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${A} \u05DC\u05D0 ${h}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${u.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${u.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${u.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${th.joinValues(u.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${i(u.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function Ere(){return{localeError:yre()}}EO.exports=bi.default});var bO=m((Si,CO)=>{"use strict";var Ire=Si&&Si.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Cre=Si&&Si.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),bre=Si&&Si.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Ire(e,t,r);return Cre(e,t),e};Object.defineProperty(Si,"__esModule",{value:!0});Si.default=wre;var rh=bre(ee()),Sre=()=>{let t={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function e(i){return t[i]??null}let r={regex:"unos",email:"email adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",jwt:"JWT",template_literal:"unos"},n={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=rh.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${i.expected}, a primljeno je ${a}`:`Neispravan unos: o\u010Dekuje se ${o}, a primljeno je ${a}`}case"invalid_value":return i.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${rh.stringifyPrimitive(i.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${rh.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin),a=n[i.origin]??i.origin;return s?`Preveliko: o\u010Dekivano da ${a??"vrijednost"} ima ${o}${i.maximum.toString()} ${s.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${a??"vrijednost"} bude ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin),a=n[i.origin]??i.origin;return s?`Premalo: o\u010Dekivano da ${a} ima ${o}${i.minimum.toString()} ${s.unit}`:`Premalo: o\u010Dekivano da ${a} bude ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${o.prefix}"`:o.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${o.suffix}"`:o.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${o.includes}"`:o.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${o.pattern}`:`Neispravna ${r[o.format]??i.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${i.divisor}`;case"unrecognized_keys":return`Neprepoznat${i.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${rh.joinValues(i.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${n[i.origin]??i.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${n[i.origin]??i.origin}`;default:return"Neispravan unos"}}};function wre(){return{localeError:Sre()}}CO.exports=Si.default});var wO=m((wi,SO)=>{"use strict";var Bre=wi&&wi.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Qre=wi&&wi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),vre=wi&&wi.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Bre(e,t,r);return Qre(e,t),e};Object.defineProperty(wi,"__esModule",{value:!0});wi.default=Dre;var nh=vre(ee()),_re=()=>{let t={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function e(i){return t[i]??null}let r={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},n={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=nh.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${i.expected}, a kapott \xE9rt\xE9k ${a}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${o}, a kapott \xE9rt\xE9k ${a}`}case"invalid_value":return i.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${nh.stringifyPrimitive(i.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${nh.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`T\xFAl nagy: ${i.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${o}${i.maximum.toString()} ${s.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${i.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${i.origin} m\xE9rete t\xFAl kicsi ${o}${i.minimum.toString()} ${s.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${i.origin} t\xFAl kicsi ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\xC9rv\xE9nytelen string: "${o.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:o.format==="ends_with"?`\xC9rv\xE9nytelen string: "${o.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:o.format==="includes"?`\xC9rv\xE9nytelen string: "${o.includes}" \xE9rt\xE9ket kell tartalmaznia`:o.format==="regex"?`\xC9rv\xE9nytelen string: ${o.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${r[o.format]??i.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${i.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${i.keys.length>1?"s":""}: ${nh.joinValues(i.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${i.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${i.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function Dre(){return{localeError:_re()}}SO.exports=wi.default});var vO=m((Bi,QO)=>{"use strict";var Tre=Bi&&Bi.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Rre=Bi&&Bi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),kre=Bi&&Bi.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Tre(e,t,r);return Rre(e,t),e};Object.defineProperty(Bi,"__esModule",{value:!0});Bi.default=Ore;var ih=kre(ee());function BO(t,e,r){return Math.abs(t)===1?e:r}function Wc(t){if(!t)return"";let e=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],r=t[t.length-1];return t+(e.includes(r)?"\u0576":"\u0568")}var Nre=()=>{let t={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function e(i){return t[i]??null}let r={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},n={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=ih.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${i.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${a}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${o}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${a}`}case"invalid_value":return i.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${ih.stringifyPrimitive(i.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${ih.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);if(s){let a=Number(i.maximum),c=BO(a,s.unit.one,s.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Wc(i.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${i.maximum.toString()} ${c}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Wc(i.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);if(s){let a=Number(i.minimum),c=BO(a,s.unit.one,s.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Wc(i.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${i.minimum.toString()} ${c}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Wc(i.origin)} \u056C\u056B\u0576\u056B ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${o.prefix}"-\u0578\u057E`:o.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${o.suffix}"-\u0578\u057E`:o.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${o.includes}"`:o.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${o.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${r[o.format]??i.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${i.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${i.keys.length>1?"\u0576\u0565\u0580":""}. ${ih.joinValues(i.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${Wc(i.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${Wc(i.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function Ore(){return{localeError:Nre()}}QO.exports=Bi.default});var DO=m((Qi,_O)=>{"use strict";var Ure=Qi&&Qi.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Mre=Qi&&Qi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),xre=Qi&&Qi.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Ure(e,t,r);return Mre(e,t),e};Object.defineProperty(Qi,"__esModule",{value:!0});Qi.default=Pre;var oh=xre(ee()),Lre=()=>{let t={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function e(i){return t[i]??null}let r={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=oh.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Input tidak valid: diharapkan instanceof ${i.expected}, diterima ${a}`:`Input tidak valid: diharapkan ${o}, diterima ${a}`}case"invalid_value":return i.values.length===1?`Input tidak valid: diharapkan ${oh.stringifyPrimitive(i.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${oh.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`Terlalu besar: diharapkan ${i.origin??"value"} memiliki ${o}${i.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: diharapkan ${i.origin??"value"} menjadi ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`Terlalu kecil: diharapkan ${i.origin} memiliki ${o}${i.minimum.toString()} ${s.unit}`:`Terlalu kecil: diharapkan ${i.origin} menjadi ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`String tidak valid: harus dimulai dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak valid: harus berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak valid: harus menyertakan "${o.includes}"`:o.format==="regex"?`String tidak valid: harus sesuai pola ${o.pattern}`:`${r[o.format]??i.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${i.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${i.keys.length>1?"s":""}: ${oh.joinValues(i.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${i.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${i.origin}`;default:return"Input tidak valid"}}};function Pre(){return{localeError:Lre()}}_O.exports=Qi.default});var RO=m((vi,TO)=>{"use strict";var Fre=vi&&vi.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),$re=vi&&vi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),jre=vi&&vi.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Fre(e,t,r);return $re(e,t),e};Object.defineProperty(vi,"__esModule",{value:!0});vi.default=zre;var sh=jre(ee()),qre=()=>{let t={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function e(i){return t[i]??null}let r={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},n={nan:"NaN",number:"n\xFAmer",array:"fylki"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=sh.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${a} \xFEar sem \xE1 a\xF0 vera instanceof ${i.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${a} \xFEar sem \xE1 a\xF0 vera ${o}`}case"invalid_value":return i.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${sh.stringifyPrimitive(i.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${sh.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${i.origin??"gildi"} hafi ${o}${i.maximum.toString()} ${s.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${i.origin??"gildi"} s\xE9 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${i.origin} hafi ${o}${i.minimum.toString()} ${s.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${i.origin} s\xE9 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${o.prefix}"`:o.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${o.suffix}"`:o.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${o.includes}"`:o.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${o.pattern}`:`Rangt ${r[o.format]??i.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${i.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${i.keys.length>1?"ir lyklar":"ur lykill"}: ${sh.joinValues(i.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${i.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${i.origin}`;default:return"Rangt gildi"}}};function zre(){return{localeError:qre()}}TO.exports=vi.default});var NO=m((_i,kO)=>{"use strict";var Gre=_i&&_i.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Hre=_i&&_i.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Yre=_i&&_i.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Gre(e,t,r);return Hre(e,t),e};Object.defineProperty(_i,"__esModule",{value:!0});_i.default=Jre;var ah=Yre(ee()),Vre=()=>{let t={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function e(i){return t[i]??null}let r={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"numero",array:"vettore"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=ah.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Input non valido: atteso instanceof ${i.expected}, ricevuto ${a}`:`Input non valido: atteso ${o}, ricevuto ${a}`}case"invalid_value":return i.values.length===1?`Input non valido: atteso ${ah.stringifyPrimitive(i.values[0])}`:`Opzione non valida: atteso uno tra ${ah.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`Troppo grande: ${i.origin??"valore"} deve avere ${o}${i.maximum.toString()} ${s.unit??"elementi"}`:`Troppo grande: ${i.origin??"valore"} deve essere ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`Troppo piccolo: ${i.origin} deve avere ${o}${i.minimum.toString()} ${s.unit}`:`Troppo piccolo: ${i.origin} deve essere ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Stringa non valida: deve iniziare con "${o.prefix}"`:o.format==="ends_with"?`Stringa non valida: deve terminare con "${o.suffix}"`:o.format==="includes"?`Stringa non valida: deve includere "${o.includes}"`:o.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${o.pattern}`:`Input non valido: ${r[o.format]??i.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${i.divisor}`;case"unrecognized_keys":return`Chiav${i.keys.length>1?"i":"e"} non riconosciut${i.keys.length>1?"e":"a"}: ${ah.joinValues(i.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${i.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${i.origin}`;default:return"Input non valido"}}};function Jre(){return{localeError:Vre()}}kO.exports=_i.default});var UO=m((Di,OO)=>{"use strict";var Wre=Di&&Di.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Zre=Di&&Di.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Kre=Di&&Di.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Wre(e,t,r);return Zre(e,t),e};Object.defineProperty(Di,"__esModule",{value:!0});Di.default=ene;var ch=Kre(ee()),Xre=()=>{let t={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function e(i){return t[i]??null}let r={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},n={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=ch.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${i.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${a}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${o}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${a}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return i.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${ch.stringifyPrimitive(i.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${ch.joinValues(i.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let o=i.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",s=e(i.origin);return s?`\u5927\u304D\u3059\u304E\u308B\u5024: ${i.origin??"\u5024"}\u306F${i.maximum.toString()}${s.unit??"\u8981\u7D20"}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${i.origin??"\u5024"}\u306F${i.maximum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let o=i.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",s=e(i.origin);return s?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${i.origin}\u306F${i.minimum.toString()}${s.unit}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${i.origin}\u306F${i.minimum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${o.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${r[o.format]??i.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${i.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${i.keys.length>1?"\u7FA4":""}: ${ch.joinValues(i.keys,"\u3001")}`;case"invalid_key":return`${i.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${i.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function ene(){return{localeError:Xre()}}OO.exports=Di.default});var xO=m((Ti,MO)=>{"use strict";var tne=Ti&&Ti.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),rne=Ti&&Ti.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),nne=Ti&&Ti.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&tne(e,t,r);return rne(e,t),e};Object.defineProperty(Ti,"__esModule",{value:!0});Ti.default=one;var uh=nne(ee()),ine=()=>{let t={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function e(i){return t[i]??null}let r={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},n={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=uh.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${i.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${a}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${a}`}case"invalid_value":return i.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${uh.stringifyPrimitive(i.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${uh.joinValues(i.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${s.verb} ${o}${i.maximum.toString()} ${s.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i.origin} ${s.verb} ${o}${i.minimum.toString()} ${s.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i.origin} \u10D8\u10E7\u10DD\u10E1 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${o.prefix}"-\u10D8\u10D7`:o.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${o.suffix}"-\u10D8\u10D7`:o.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${o.includes}"-\u10E1`:o.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${o.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${r[o.format]??i.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${i.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${i.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${uh.joinValues(i.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${i.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${i.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function one(){return{localeError:ine()}}MO.exports=Ti.default});var ZC=m((Ri,LO)=>{"use strict";var sne=Ri&&Ri.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),ane=Ri&&Ri.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),cne=Ri&&Ri.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&sne(e,t,r);return ane(e,t),e};Object.defineProperty(Ri,"__esModule",{value:!0});Ri.default=lne;var lh=cne(ee()),une=()=>{let t={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function e(i){return t[i]??null}let r={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},n={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=lh.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${i.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${a}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${a}`}case"invalid_value":return i.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${lh.stringifyPrimitive(i.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${lh.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${i.maximum.toString()} ${s.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i.origin} ${o} ${i.minimum.toString()} ${s.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i.origin} ${o} ${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${o.prefix}"`:o.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${o.suffix}"`:o.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${o.includes}"`:o.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${o.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${r[o.format]??i.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${i.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${lh.joinValues(i.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${i.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${i.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function lne(){return{localeError:une()}}LO.exports=Ri.default});var FO=m((Zc,PO)=>{"use strict";var dne=Zc&&Zc.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Zc,"__esModule",{value:!0});Zc.default=pne;var Ane=dne(ZC());function pne(){return(0,Ane.default)()}PO.exports=Zc.default});var jO=m((ki,$O)=>{"use strict";var fne=ki&&ki.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),hne=ki&&ki.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),gne=ki&&ki.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&fne(e,t,r);return hne(e,t),e};Object.defineProperty(ki,"__esModule",{value:!0});ki.default=yne;var dh=gne(ee()),mne=()=>{let t={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function e(i){return t[i]??null}let r={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=dh.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${i.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${a}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${o}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${a}\uC785\uB2C8\uB2E4`}case"invalid_value":return i.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${dh.stringifyPrimitive(i.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${dh.joinValues(i.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let o=i.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",s=o==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=e(i.origin),c=a?.unit??"\uC694\uC18C";return a?`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${i.maximum.toString()}${c} ${o}${s}`:`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${i.maximum.toString()} ${o}${s}`}case"too_small":{let o=i.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",s=o==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=e(i.origin),c=a?.unit??"\uC694\uC18C";return a?`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${i.minimum.toString()}${c} ${o}${s}`:`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${i.minimum.toString()} ${o}${s}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:o.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${o.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${r[o.format]??i.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${i.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${dh.joinValues(i.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${i.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${i.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function yne(){return{localeError:mne()}}$O.exports=ki.default});var GO=m((Ni,zO)=>{"use strict";var Ene=Ni&&Ni.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Ine=Ni&&Ni.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Cne=Ni&&Ni.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Ene(e,t,r);return Ine(e,t),e};Object.defineProperty(Ni,"__esModule",{value:!0});Ni.default=Sne;var Ah=Cne(ee()),Ad=t=>t.charAt(0).toUpperCase()+t.slice(1);function qO(t){let e=Math.abs(t),r=e%10,n=e%100;return n>=11&&n<=19||r===0?"many":r===1?"one":"few"}var bne=()=>{let t={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function e(i,o,s,a){let c=t[i]??null;return c===null?c:{unit:c.unit[o],verb:c.verb[a][s?"inclusive":"notInclusive"]}}let r={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},n={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Ah.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Gautas tipas ${a}, o tik\u0117tasi - instanceof ${i.expected}`:`Gautas tipas ${a}, o tik\u0117tasi - ${o}`}case"invalid_value":return i.values.length===1?`Privalo b\u016Bti ${Ah.stringifyPrimitive(i.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${Ah.joinValues(i.values,"|")} pasirinkim\u0173`;case"too_big":{let o=n[i.origin]??i.origin,s=e(i.origin,qO(Number(i.maximum)),i.inclusive??!1,"smaller");if(s?.verb)return`${Ad(o??i.origin??"reik\u0161m\u0117")} ${s.verb} ${i.maximum.toString()} ${s.unit??"element\u0173"}`;let a=i.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${Ad(o??i.origin??"reik\u0161m\u0117")} turi b\u016Bti ${a} ${i.maximum.toString()} ${s?.unit}`}case"too_small":{let o=n[i.origin]??i.origin,s=e(i.origin,qO(Number(i.minimum)),i.inclusive??!1,"bigger");if(s?.verb)return`${Ad(o??i.origin??"reik\u0161m\u0117")} ${s.verb} ${i.minimum.toString()} ${s.unit??"element\u0173"}`;let a=i.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${Ad(o??i.origin??"reik\u0161m\u0117")} turi b\u016Bti ${a} ${i.minimum.toString()} ${s?.unit}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${o.prefix}"`:o.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${o.suffix}"`:o.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${o.includes}"`:o.format==="regex"?`Eilut\u0117 privalo atitikti ${o.pattern}`:`Neteisingas ${r[o.format]??i.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${i.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${i.keys.length>1?"i":"as"} rakt${i.keys.length>1?"ai":"as"}: ${Ah.joinValues(i.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let o=n[i.origin]??i.origin;return`${Ad(o??i.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function Sne(){return{localeError:bne()}}zO.exports=Ni.default});var YO=m((Oi,HO)=>{"use strict";var wne=Oi&&Oi.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Bne=Oi&&Oi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Qne=Oi&&Oi.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&wne(e,t,r);return Bne(e,t),e};Object.defineProperty(Oi,"__esModule",{value:!0});Oi.default=_ne;var ph=Qne(ee()),vne=()=>{let t={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function e(i){return t[i]??null}let r={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},n={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=ph.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${i.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${a}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${a}`}case"invalid_value":return i.values.length===1?`Invalid input: expected ${ph.stringifyPrimitive(i.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${ph.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${o}${i.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i.origin} \u0434\u0430 \u0438\u043C\u0430 ${o}${i.minimum.toString()} ${s.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${o.pattern}`:`Invalid ${r[o.format]??i.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${ph.joinValues(i.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${i.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${i.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function _ne(){return{localeError:vne()}}HO.exports=Oi.default});var JO=m((Ui,VO)=>{"use strict";var Dne=Ui&&Ui.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Tne=Ui&&Ui.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Rne=Ui&&Ui.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Dne(e,t,r);return Tne(e,t),e};Object.defineProperty(Ui,"__esModule",{value:!0});Ui.default=Nne;var fh=Rne(ee()),kne=()=>{let t={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function e(i){return t[i]??null}let r={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"nombor"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=fh.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Input tidak sah: dijangka instanceof ${i.expected}, diterima ${a}`:`Input tidak sah: dijangka ${o}, diterima ${a}`}case"invalid_value":return i.values.length===1?`Input tidak sah: dijangka ${fh.stringifyPrimitive(i.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${fh.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`Terlalu besar: dijangka ${i.origin??"nilai"} ${s.verb} ${o}${i.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: dijangka ${i.origin??"nilai"} adalah ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`Terlalu kecil: dijangka ${i.origin} ${s.verb} ${o}${i.minimum.toString()} ${s.unit}`:`Terlalu kecil: dijangka ${i.origin} adalah ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`String tidak sah: mesti bermula dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak sah: mesti mengandungi "${o.includes}"`:o.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${o.pattern}`:`${r[o.format]??i.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${i.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${fh.joinValues(i.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${i.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${i.origin}`;default:return"Input tidak sah"}}};function Nne(){return{localeError:kne()}}VO.exports=Ui.default});var ZO=m((Mi,WO)=>{"use strict";var One=Mi&&Mi.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Une=Mi&&Mi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Mne=Mi&&Mi.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&One(e,t,r);return Une(e,t),e};Object.defineProperty(Mi,"__esModule",{value:!0});Mi.default=Lne;var hh=Mne(ee()),xne=()=>{let t={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function e(i){return t[i]??null}let r={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},n={nan:"NaN",number:"getal"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=hh.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Ongeldige invoer: verwacht instanceof ${i.expected}, ontving ${a}`:`Ongeldige invoer: verwacht ${o}, ontving ${a}`}case"invalid_value":return i.values.length===1?`Ongeldige invoer: verwacht ${hh.stringifyPrimitive(i.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${hh.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin),a=i.origin==="date"?"laat":i.origin==="string"?"lang":"groot";return s?`Te ${a}: verwacht dat ${i.origin??"waarde"} ${o}${i.maximum.toString()} ${s.unit??"elementen"} ${s.verb}`:`Te ${a}: verwacht dat ${i.origin??"waarde"} ${o}${i.maximum.toString()} is`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin),a=i.origin==="date"?"vroeg":i.origin==="string"?"kort":"klein";return s?`Te ${a}: verwacht dat ${i.origin} ${o}${i.minimum.toString()} ${s.unit} ${s.verb}`:`Te ${a}: verwacht dat ${i.origin} ${o}${i.minimum.toString()} is`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Ongeldige tekst: moet met "${o.prefix}" beginnen`:o.format==="ends_with"?`Ongeldige tekst: moet op "${o.suffix}" eindigen`:o.format==="includes"?`Ongeldige tekst: moet "${o.includes}" bevatten`:o.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${o.pattern}`:`Ongeldig: ${r[o.format]??i.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${i.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${i.keys.length>1?"s":""}: ${hh.joinValues(i.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${i.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${i.origin}`;default:return"Ongeldige invoer"}}};function Lne(){return{localeError:xne()}}WO.exports=Mi.default});var XO=m((xi,KO)=>{"use strict";var Pne=xi&&xi.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Fne=xi&&xi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),$ne=xi&&xi.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Pne(e,t,r);return Fne(e,t),e};Object.defineProperty(xi,"__esModule",{value:!0});xi.default=qne;var gh=$ne(ee()),jne=()=>{let t={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function e(i){return t[i]??null}let r={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"tall",array:"liste"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=gh.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Ugyldig input: forventet instanceof ${i.expected}, fikk ${a}`:`Ugyldig input: forventet ${o}, fikk ${a}`}case"invalid_value":return i.values.length===1?`Ugyldig verdi: forventet ${gh.stringifyPrimitive(i.values[0])}`:`Ugyldig valg: forventet en av ${gh.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`For stor(t): forventet ${i.origin??"value"} til \xE5 ha ${o}${i.maximum.toString()} ${s.unit??"elementer"}`:`For stor(t): forventet ${i.origin??"value"} til \xE5 ha ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`For lite(n): forventet ${i.origin} til \xE5 ha ${o}${i.minimum.toString()} ${s.unit}`:`For lite(n): forventet ${i.origin} til \xE5 ha ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${r[o.format]??i.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${gh.joinValues(i.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${i.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${i.origin}`;default:return"Ugyldig input"}}};function qne(){return{localeError:jne()}}KO.exports=xi.default});var tU=m((Li,eU)=>{"use strict";var zne=Li&&Li.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Gne=Li&&Li.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Hne=Li&&Li.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&zne(e,t,r);return Gne(e,t),e};Object.defineProperty(Li,"__esModule",{value:!0});Li.default=Vne;var mh=Hne(ee()),Yne=()=>{let t={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function e(i){return t[i]??null}let r={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},n={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=mh.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`F\xE2sit giren: umulan instanceof ${i.expected}, al\u0131nan ${a}`:`F\xE2sit giren: umulan ${o}, al\u0131nan ${a}`}case"invalid_value":return i.values.length===1?`F\xE2sit giren: umulan ${mh.stringifyPrimitive(i.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${mh.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`Fazla b\xFCy\xFCk: ${i.origin??"value"}, ${o}${i.maximum.toString()} ${s.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${i.origin??"value"}, ${o}${i.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`Fazla k\xFC\xE7\xFCk: ${i.origin}, ${o}${i.minimum.toString()} ${s.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${i.origin}, ${o}${i.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let o=i;return o.format==="starts_with"?`F\xE2sit metin: "${o.prefix}" ile ba\u015Flamal\u0131.`:o.format==="ends_with"?`F\xE2sit metin: "${o.suffix}" ile bitmeli.`:o.format==="includes"?`F\xE2sit metin: "${o.includes}" ihtiv\xE2 etmeli.`:o.format==="regex"?`F\xE2sit metin: ${o.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${r[o.format]??i.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${i.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${i.keys.length>1?"s":""}: ${mh.joinValues(i.keys,", ")}`;case"invalid_key":return`${i.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${i.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function Vne(){return{localeError:Yne()}}eU.exports=Li.default});var nU=m((Pi,rU)=>{"use strict";var Jne=Pi&&Pi.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Wne=Pi&&Pi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Zne=Pi&&Pi.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Jne(e,t,r);return Wne(e,t),e};Object.defineProperty(Pi,"__esModule",{value:!0});Pi.default=Xne;var yh=Zne(ee()),Kne=()=>{let t={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function e(i){return t[i]??null}let r={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},n={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=yh.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${i.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${a} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${o} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${a} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return i.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${yh.stringifyPrimitive(i.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${yh.joinValues(i.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${i.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${i.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${i.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${i.maximum.toString()} \u0648\u064A`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${i.origin} \u0628\u0627\u06CC\u062F ${o}${i.minimum.toString()} ${s.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${i.origin} \u0628\u0627\u06CC\u062F ${o}${i.minimum.toString()} \u0648\u064A`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:o.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:o.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${o.includes}" \u0648\u0644\u0631\u064A`:o.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${o.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${r[o.format]??i.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${i.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${i.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${yh.joinValues(i.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${i.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${i.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function Xne(){return{localeError:Kne()}}rU.exports=Pi.default});var oU=m((Fi,iU)=>{"use strict";var eie=Fi&&Fi.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),tie=Fi&&Fi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),rie=Fi&&Fi.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&eie(e,t,r);return tie(e,t),e};Object.defineProperty(Fi,"__esModule",{value:!0});Fi.default=iie;var Eh=rie(ee()),nie=()=>{let t={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function e(i){return t[i]??null}let r={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},n={nan:"NaN",number:"liczba",array:"tablica"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Eh.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${i.expected}, otrzymano ${a}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${o}, otrzymano ${a}`}case"invalid_value":return i.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${Eh.stringifyPrimitive(i.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${Eh.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${i.maximum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${i.minimum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${o.prefix}"`:o.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${o.suffix}"`:o.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${o.includes}"`:o.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${o.pattern}`:`Nieprawid\u0142ow(y/a/e) ${r[o.format]??i.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${i.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${i.keys.length>1?"s":""}: ${Eh.joinValues(i.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${i.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${i.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function iie(){return{localeError:nie()}}iU.exports=Fi.default});var aU=m(($i,sU)=>{"use strict";var oie=$i&&$i.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),sie=$i&&$i.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),aie=$i&&$i.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&oie(e,t,r);return sie(e,t),e};Object.defineProperty($i,"__esModule",{value:!0});$i.default=uie;var Ih=aie(ee()),cie=()=>{let t={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function e(i){return t[i]??null}let r={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},n={nan:"NaN",number:"n\xFAmero",null:"nulo"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Ih.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Tipo inv\xE1lido: esperado instanceof ${i.expected}, recebido ${a}`:`Tipo inv\xE1lido: esperado ${o}, recebido ${a}`}case"invalid_value":return i.values.length===1?`Entrada inv\xE1lida: esperado ${Ih.stringifyPrimitive(i.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${Ih.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`Muito grande: esperado que ${i.origin??"valor"} tivesse ${o}${i.maximum.toString()} ${s.unit??"elementos"}`:`Muito grande: esperado que ${i.origin??"valor"} fosse ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`Muito pequeno: esperado que ${i.origin} tivesse ${o}${i.minimum.toString()} ${s.unit}`:`Muito pequeno: esperado que ${i.origin} fosse ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${o.prefix}"`:o.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${o.suffix}"`:o.format==="includes"?`Texto inv\xE1lido: deve incluir "${o.includes}"`:o.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${o.pattern}`:`${r[o.format]??i.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${i.divisor}`;case"unrecognized_keys":return`Chave${i.keys.length>1?"s":""} desconhecida${i.keys.length>1?"s":""}: ${Ih.joinValues(i.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${i.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${i.origin}`;default:return"Campo inv\xE1lido"}}};function uie(){return{localeError:cie()}}sU.exports=$i.default});var uU=m((ji,cU)=>{"use strict";var lie=ji&&ji.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),die=ji&&ji.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Aie=ji&&ji.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&lie(e,t,r);return die(e,t),e};Object.defineProperty(ji,"__esModule",{value:!0});ji.default=fie;var Ch=Aie(ee()),pie=()=>{let t={string:{unit:"caractere",verb:"s\u0103 aib\u0103"},file:{unit:"octe\u021Bi",verb:"s\u0103 aib\u0103"},array:{unit:"elemente",verb:"s\u0103 aib\u0103"},set:{unit:"elemente",verb:"s\u0103 aib\u0103"},map:{unit:"intr\u0103ri",verb:"s\u0103 aib\u0103"}};function e(i){return t[i]??null}let r={regex:"intrare",email:"adres\u0103 de email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",jwt:"JWT",template_literal:"intrare"},n={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Ch.parsedType(i.input),a=n[s]??s;return`Intrare invalid\u0103: a\u0219teptat ${o}, primit ${a}`}case"invalid_value":return i.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${Ch.stringifyPrimitive(i.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${Ch.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`Prea mare: a\u0219teptat ca ${i.origin??"valoarea"} ${s.verb} ${o}${i.maximum.toString()} ${s.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${i.origin??"valoarea"} s\u0103 fie ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`Prea mic: a\u0219teptat ca ${i.origin} ${s.verb} ${o}${i.minimum.toString()} ${s.unit}`:`Prea mic: a\u0219teptat ca ${i.origin} s\u0103 fie ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${o.prefix}"`:o.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${o.suffix}"`:o.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${o.includes}"`:o.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${o.pattern}`:`Format invalid: ${r[o.format]??i.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${i.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${Ch.joinValues(i.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${i.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${i.origin}`;default:return"Intrare invalid\u0103"}}};function fie(){return{localeError:pie()}}cU.exports=ji.default});var AU=m((qi,dU)=>{"use strict";var hie=qi&&qi.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),gie=qi&&qi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),mie=qi&&qi.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&hie(e,t,r);return gie(e,t),e};Object.defineProperty(qi,"__esModule",{value:!0});qi.default=Eie;var bh=mie(ee());function lU(t,e,r,n){let i=Math.abs(t),o=i%10,s=i%100;return s>=11&&s<=19?n:o===1?e:o>=2&&o<=4?r:n}var yie=()=>{let t={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function e(i){return t[i]??null}let r={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},n={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=bh.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${i.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${a}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${a}`}case"invalid_value":return i.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${bh.stringifyPrimitive(i.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${bh.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);if(s){let a=Number(i.maximum),c=lU(a,s.unit.one,s.unit.few,s.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${i.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${i.maximum.toString()} ${c}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${i.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);if(s){let a=Number(i.minimum),c=lU(a,s.unit.one,s.unit.few,s.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${i.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${i.minimum.toString()} ${c}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${i.origin} \u0431\u0443\u0434\u0435\u0442 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${r[o.format]??i.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${i.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${i.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${i.keys.length>1?"\u0438":""}: ${bh.joinValues(i.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${i.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${i.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function Eie(){return{localeError:yie()}}dU.exports=qi.default});var fU=m((zi,pU)=>{"use strict";var Iie=zi&&zi.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Cie=zi&&zi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),bie=zi&&zi.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Iie(e,t,r);return Cie(e,t),e};Object.defineProperty(zi,"__esModule",{value:!0});zi.default=wie;var Sh=bie(ee()),Sie=()=>{let t={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function e(i){return t[i]??null}let r={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},n={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Sh.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${i.expected}, prejeto ${a}`:`Neveljaven vnos: pri\u010Dakovano ${o}, prejeto ${a}`}case"invalid_value":return i.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${Sh.stringifyPrimitive(i.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${Sh.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`Preveliko: pri\u010Dakovano, da bo ${i.origin??"vrednost"} imelo ${o}${i.maximum.toString()} ${s.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${i.origin??"vrednost"} ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`Premajhno: pri\u010Dakovano, da bo ${i.origin} imelo ${o}${i.minimum.toString()} ${s.unit}`:`Premajhno: pri\u010Dakovano, da bo ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${o.prefix}"`:o.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${o.suffix}"`:o.format==="includes"?`Neveljaven niz: mora vsebovati "${o.includes}"`:o.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${o.pattern}`:`Neveljaven ${r[o.format]??i.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${i.divisor}`;case"unrecognized_keys":return`Neprepoznan${i.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${Sh.joinValues(i.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${i.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${i.origin}`;default:return"Neveljaven vnos"}}};function wie(){return{localeError:Sie()}}pU.exports=zi.default});var gU=m((Gi,hU)=>{"use strict";var Bie=Gi&&Gi.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Qie=Gi&&Gi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),vie=Gi&&Gi.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Bie(e,t,r);return Qie(e,t),e};Object.defineProperty(Gi,"__esModule",{value:!0});Gi.default=Die;var wh=vie(ee()),_ie=()=>{let t={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function e(i){return t[i]??null}let r={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},n={nan:"NaN",number:"antal",array:"lista"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=wh.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${i.expected}, fick ${a}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${o}, fick ${a}`}case"invalid_value":return i.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${wh.stringifyPrimitive(i.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${wh.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`F\xF6r stor(t): f\xF6rv\xE4ntade ${i.origin??"v\xE4rdet"} att ha ${o}${i.maximum.toString()} ${s.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${i.origin??"v\xE4rdet"} att ha ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`F\xF6r lite(t): f\xF6rv\xE4ntade ${i.origin??"v\xE4rdet"} att ha ${o}${i.minimum.toString()} ${s.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${i.origin??"v\xE4rdet"} att ha ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${o.prefix}"`:o.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${o.suffix}"`:o.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${o.includes}"`:o.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${o.pattern}"`:`Ogiltig(t) ${r[o.format]??i.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${wh.joinValues(i.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${i.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${i.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};function Die(){return{localeError:_ie()}}hU.exports=Gi.default});var yU=m((Hi,mU)=>{"use strict";var Tie=Hi&&Hi.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Rie=Hi&&Hi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),kie=Hi&&Hi.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Tie(e,t,r);return Rie(e,t),e};Object.defineProperty(Hi,"__esModule",{value:!0});Hi.default=Oie;var Bh=kie(ee()),Nie=()=>{let t={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function e(i){return t[i]??null}let r={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Bh.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${i.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${a}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${a}`}case"invalid_value":return i.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${Bh.stringifyPrimitive(i.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${Bh.joinValues(i.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${i.maximum.toString()} ${s.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${i.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i.origin} ${o}${i.minimum.toString()} ${s.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i.origin} ${o}${i.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${o.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${r[o.format]??i.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${i.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${i.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${Bh.joinValues(i.keys,", ")}`;case"invalid_key":return`${i.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${i.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function Oie(){return{localeError:Nie()}}mU.exports=Hi.default});var IU=m((Yi,EU)=>{"use strict";var Uie=Yi&&Yi.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Mie=Yi&&Yi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),xie=Yi&&Yi.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Uie(e,t,r);return Mie(e,t),e};Object.defineProperty(Yi,"__esModule",{value:!0});Yi.default=Pie;var Qh=xie(ee()),Lie=()=>{let t={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function e(i){return t[i]??null}let r={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},n={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Qh.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${i.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${a}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${o} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${a}`}case"invalid_value":return i.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${Qh.stringifyPrimitive(i.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${Qh.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",s=e(i.origin);return s?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${i.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${i.maximum.toString()} ${s.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${i.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",s=e(i.origin);return s?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${i.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${i.minimum.toString()} ${s.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${i.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${o.prefix}"`:o.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${o.suffix}"`:o.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${o.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:o.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${o.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${r[o.format]??i.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${i.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${Qh.joinValues(i.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${i.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${i.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function Pie(){return{localeError:Lie()}}EU.exports=Yi.default});var bU=m((Vi,CU)=>{"use strict";var Fie=Vi&&Vi.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),$ie=Vi&&Vi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),jie=Vi&&Vi.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Fie(e,t,r);return $ie(e,t),e};Object.defineProperty(Vi,"__esModule",{value:!0});Vi.default=zie;var vh=jie(ee()),qie=()=>{let t={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function e(i){return t[i]??null}let r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=vh.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${i.expected}, al\u0131nan ${a}`:`Ge\xE7ersiz de\u011Fer: beklenen ${o}, al\u0131nan ${a}`}case"invalid_value":return i.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${vh.stringifyPrimitive(i.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${vh.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`\xC7ok b\xFCy\xFCk: beklenen ${i.origin??"de\u011Fer"} ${o}${i.maximum.toString()} ${s.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${i.origin??"de\u011Fer"} ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`\xC7ok k\xFC\xE7\xFCk: beklenen ${i.origin} ${o}${i.minimum.toString()} ${s.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Ge\xE7ersiz metin: "${o.prefix}" ile ba\u015Flamal\u0131`:o.format==="ends_with"?`Ge\xE7ersiz metin: "${o.suffix}" ile bitmeli`:o.format==="includes"?`Ge\xE7ersiz metin: "${o.includes}" i\xE7ermeli`:o.format==="regex"?`Ge\xE7ersiz metin: ${o.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${r[o.format]??i.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${i.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${i.keys.length>1?"lar":""}: ${vh.joinValues(i.keys,", ")}`;case"invalid_key":return`${i.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${i.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function zie(){return{localeError:qie()}}CU.exports=Vi.default});var KC=m((Ji,SU)=>{"use strict";var Gie=Ji&&Ji.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Hie=Ji&&Ji.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Yie=Ji&&Ji.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Gie(e,t,r);return Hie(e,t),e};Object.defineProperty(Ji,"__esModule",{value:!0});Ji.default=Jie;var _h=Yie(ee()),Vie=()=>{let t={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function e(i){return t[i]??null}let r={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},n={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=_h.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${i.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${a}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${o}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${a}`}case"invalid_value":return i.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${_h.stringifyPrimitive(i.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${_h.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${i.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${s.verb} ${o}${i.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${i.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${i.origin} ${s.verb} ${o}${i.minimum.toString()} ${s.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${i.origin} \u0431\u0443\u0434\u0435 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${r[o.format]??i.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${i.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${i.keys.length>1?"\u0456":""}: ${_h.joinValues(i.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${i.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${i.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function Jie(){return{localeError:Vie()}}SU.exports=Ji.default});var BU=m((Kc,wU)=>{"use strict";var Wie=Kc&&Kc.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Kc,"__esModule",{value:!0});Kc.default=Kie;var Zie=Wie(KC());function Kie(){return(0,Zie.default)()}wU.exports=Kc.default});var vU=m((Wi,QU)=>{"use strict";var Xie=Wi&&Wi.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),eoe=Wi&&Wi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),toe=Wi&&Wi.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Xie(e,t,r);return eoe(e,t),e};Object.defineProperty(Wi,"__esModule",{value:!0});Wi.default=noe;var Dh=toe(ee()),roe=()=>{let t={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function e(i){return t[i]??null}let r={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},n={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Dh.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${i.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${a} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${o} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${a} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return i.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${Dh.stringifyPrimitive(i.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${Dh.joinValues(i.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${i.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${o}${i.maximum.toString()} ${s.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${i.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${o}${i.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${i.origin} \u06A9\u06D2 ${o}${i.minimum.toString()} ${s.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${i.origin} \u06A9\u0627 ${o}${i.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${o.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${r[o.format]??i.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${i.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${i.keys.length>1?"\u0632":""}: ${Dh.joinValues(i.keys,"\u060C ")}`;case"invalid_key":return`${i.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${i.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function noe(){return{localeError:roe()}}QU.exports=Wi.default});var DU=m((Zi,_U)=>{"use strict";var ioe=Zi&&Zi.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),ooe=Zi&&Zi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),soe=Zi&&Zi.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&ioe(e,t,r);return ooe(e,t),e};Object.defineProperty(Zi,"__esModule",{value:!0});Zi.default=coe;var Th=soe(ee()),aoe=()=>{let t={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"},map:{unit:"yozuv",verb:"bo\u2018lishi kerak"}};function e(i){return t[i]??null}let r={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},n={nan:"NaN",number:"raqam",array:"massiv"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Th.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${i.expected}, qabul qilingan ${a}`:`Noto\u2018g\u2018ri kirish: kutilgan ${o}, qabul qilingan ${a}`}case"invalid_value":return i.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${Th.stringifyPrimitive(i.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${Th.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`Juda katta: kutilgan ${i.origin??"qiymat"} ${o}${i.maximum.toString()} ${s.unit} ${s.verb}`:`Juda katta: kutilgan ${i.origin??"qiymat"} ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`Juda kichik: kutilgan ${i.origin} ${o}${i.minimum.toString()} ${s.unit} ${s.verb}`:`Juda kichik: kutilgan ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${o.prefix}" bilan boshlanishi kerak`:o.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${o.suffix}" bilan tugashi kerak`:o.format==="includes"?`Noto\u2018g\u2018ri satr: "${o.includes}" ni o\u2018z ichiga olishi kerak`:o.format==="regex"?`Noto\u2018g\u2018ri satr: ${o.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${r[o.format]??i.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${i.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${i.keys.length>1?"lar":""}: ${Th.joinValues(i.keys,", ")}`;case"invalid_key":return`${i.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${i.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}};function coe(){return{localeError:aoe()}}_U.exports=Zi.default});var RU=m((Ki,TU)=>{"use strict";var uoe=Ki&&Ki.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),loe=Ki&&Ki.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),doe=Ki&&Ki.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&uoe(e,t,r);return loe(e,t),e};Object.defineProperty(Ki,"__esModule",{value:!0});Ki.default=poe;var Rh=doe(ee()),Aoe=()=>{let t={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function e(i){return t[i]??null}let r={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},n={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Rh.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${i.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${a}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${o}, nh\u1EADn \u0111\u01B0\u1EE3c ${a}`}case"invalid_value":return i.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${Rh.stringifyPrimitive(i.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${Rh.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${i.origin??"gi\xE1 tr\u1ECB"} ${s.verb} ${o}${i.maximum.toString()} ${s.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${i.origin??"gi\xE1 tr\u1ECB"} ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${i.origin} ${s.verb} ${o}${i.minimum.toString()} ${s.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${o.prefix}"`:o.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${o.suffix}"`:o.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${o.includes}"`:o.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${o.pattern}`:`${r[o.format]??i.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${i.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${Rh.joinValues(i.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${i.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${i.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function poe(){return{localeError:Aoe()}}TU.exports=Ki.default});var NU=m((Xi,kU)=>{"use strict";var foe=Xi&&Xi.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),hoe=Xi&&Xi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),goe=Xi&&Xi.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&foe(e,t,r);return hoe(e,t),e};Object.defineProperty(Xi,"__esModule",{value:!0});Xi.default=yoe;var kh=goe(ee()),moe=()=>{let t={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function e(i){return t[i]??null}let r={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},n={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=kh.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${i.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${a}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${o}\uFF0C\u5B9E\u9645\u63A5\u6536 ${a}`}case"invalid_value":return i.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${kh.stringifyPrimitive(i.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${kh.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${i.origin??"\u503C"} ${o}${i.maximum.toString()} ${s.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${i.origin??"\u503C"} ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${i.origin} ${o}${i.minimum.toString()} ${s.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.prefix}" \u5F00\u5934`:o.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.suffix}" \u7ED3\u5C3E`:o.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${o.pattern}`:`\u65E0\u6548${r[o.format]??i.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${i.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${kh.joinValues(i.keys,", ")}`;case"invalid_key":return`${i.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${i.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function yoe(){return{localeError:moe()}}kU.exports=Xi.default});var UU=m((eo,OU)=>{"use strict";var Eoe=eo&&eo.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Ioe=eo&&eo.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Coe=eo&&eo.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Eoe(e,t,r);return Ioe(e,t),e};Object.defineProperty(eo,"__esModule",{value:!0});eo.default=Soe;var Nh=Coe(ee()),boe=()=>{let t={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function e(i){return t[i]??null}let r={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Nh.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${i.expected}\uFF0C\u4F46\u6536\u5230 ${a}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${o}\uFF0C\u4F46\u6536\u5230 ${a}`}case"invalid_value":return i.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${Nh.stringifyPrimitive(i.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${Nh.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${i.origin??"\u503C"} \u61C9\u70BA ${o}${i.maximum.toString()} ${s.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${i.origin??"\u503C"} \u61C9\u70BA ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${i.origin} \u61C9\u70BA ${o}${i.minimum.toString()} ${s.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${i.origin} \u61C9\u70BA ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.prefix}" \u958B\u982D`:o.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.suffix}" \u7D50\u5C3E`:o.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${o.pattern}`:`\u7121\u6548\u7684 ${r[o.format]??i.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${i.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${i.keys.length>1?"\u5011":""}\uFF1A${Nh.joinValues(i.keys,"\u3001")}`;case"invalid_key":return`${i.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${i.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function Soe(){return{localeError:boe()}}OU.exports=eo.default});var xU=m((to,MU)=>{"use strict";var woe=to&&to.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Boe=to&&to.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Qoe=to&&to.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&woe(e,t,r);return Boe(e,t),e};Object.defineProperty(to,"__esModule",{value:!0});to.default=_oe;var Oh=Qoe(ee()),voe=()=>{let t={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function e(i){return t[i]??null}let r={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},n={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Oh.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${i.expected}, \xE0m\u1ECD\u0300 a r\xED ${a}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${o}, \xE0m\u1ECD\u0300 a r\xED ${a}`}case"invalid_value":return i.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${Oh.stringifyPrimitive(i.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${Oh.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${i.origin??"iye"} ${s.verb} ${o}${i.maximum} ${s.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${i.maximum}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${i.origin} ${s.verb} ${o}${i.minimum} ${s.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${i.minimum}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${o.prefix}"`:o.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${o.suffix}"`:o.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${o.includes}"`:o.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${o.pattern}`:`A\u1E63\xEC\u1E63e: ${r[o.format]??i.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${i.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${Oh.joinValues(i.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${i.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${i.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function _oe(){return{localeError:voe()}}MU.exports=to.default});var XC=m(U=>{"use strict";var ue=U&&U.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(U,"__esModule",{value:!0});U.zhCN=U.vi=U.uz=U.ur=U.uk=U.ua=U.tr=U.th=U.ta=U.sv=U.sl=U.ru=U.ro=U.pt=U.pl=U.ps=U.ota=U.no=U.nl=U.ms=U.mk=U.lt=U.ko=U.km=U.kh=U.ka=U.ja=U.it=U.is=U.id=U.hy=U.hu=U.hr=U.he=U.frCA=U.fr=U.fi=U.fa=U.es=U.eo=U.en=U.el=U.de=U.da=U.cs=U.ca=U.bg=U.be=U.az=U.ar=void 0;U.yo=U.zhTW=void 0;var Doe=jN();Object.defineProperty(U,"ar",{enumerable:!0,get:function(){return ue(Doe).default}});var Toe=zN();Object.defineProperty(U,"az",{enumerable:!0,get:function(){return ue(Toe).default}});var Roe=YN();Object.defineProperty(U,"be",{enumerable:!0,get:function(){return ue(Roe).default}});var koe=JN();Object.defineProperty(U,"bg",{enumerable:!0,get:function(){return ue(koe).default}});var Noe=ZN();Object.defineProperty(U,"ca",{enumerable:!0,get:function(){return ue(Noe).default}});var Ooe=XN();Object.defineProperty(U,"cs",{enumerable:!0,get:function(){return ue(Ooe).default}});var Uoe=tO();Object.defineProperty(U,"da",{enumerable:!0,get:function(){return ue(Uoe).default}});var Moe=nO();Object.defineProperty(U,"de",{enumerable:!0,get:function(){return ue(Moe).default}});var xoe=oO();Object.defineProperty(U,"el",{enumerable:!0,get:function(){return ue(xoe).default}});var Loe=WC();Object.defineProperty(U,"en",{enumerable:!0,get:function(){return ue(Loe).default}});var Poe=cO();Object.defineProperty(U,"eo",{enumerable:!0,get:function(){return ue(Poe).default}});var Foe=lO();Object.defineProperty(U,"es",{enumerable:!0,get:function(){return ue(Foe).default}});var $oe=AO();Object.defineProperty(U,"fa",{enumerable:!0,get:function(){return ue($oe).default}});var joe=fO();Object.defineProperty(U,"fi",{enumerable:!0,get:function(){return ue(joe).default}});var qoe=gO();Object.defineProperty(U,"fr",{enumerable:!0,get:function(){return ue(qoe).default}});var zoe=yO();Object.defineProperty(U,"frCA",{enumerable:!0,get:function(){return ue(zoe).default}});var Goe=IO();Object.defineProperty(U,"he",{enumerable:!0,get:function(){return ue(Goe).default}});var Hoe=bO();Object.defineProperty(U,"hr",{enumerable:!0,get:function(){return ue(Hoe).default}});var Yoe=wO();Object.defineProperty(U,"hu",{enumerable:!0,get:function(){return ue(Yoe).default}});var Voe=vO();Object.defineProperty(U,"hy",{enumerable:!0,get:function(){return ue(Voe).default}});var Joe=DO();Object.defineProperty(U,"id",{enumerable:!0,get:function(){return ue(Joe).default}});var Woe=RO();Object.defineProperty(U,"is",{enumerable:!0,get:function(){return ue(Woe).default}});var Zoe=NO();Object.defineProperty(U,"it",{enumerable:!0,get:function(){return ue(Zoe).default}});var Koe=UO();Object.defineProperty(U,"ja",{enumerable:!0,get:function(){return ue(Koe).default}});var Xoe=xO();Object.defineProperty(U,"ka",{enumerable:!0,get:function(){return ue(Xoe).default}});var ese=FO();Object.defineProperty(U,"kh",{enumerable:!0,get:function(){return ue(ese).default}});var tse=ZC();Object.defineProperty(U,"km",{enumerable:!0,get:function(){return ue(tse).default}});var rse=jO();Object.defineProperty(U,"ko",{enumerable:!0,get:function(){return ue(rse).default}});var nse=GO();Object.defineProperty(U,"lt",{enumerable:!0,get:function(){return ue(nse).default}});var ise=YO();Object.defineProperty(U,"mk",{enumerable:!0,get:function(){return ue(ise).default}});var ose=JO();Object.defineProperty(U,"ms",{enumerable:!0,get:function(){return ue(ose).default}});var sse=ZO();Object.defineProperty(U,"nl",{enumerable:!0,get:function(){return ue(sse).default}});var ase=XO();Object.defineProperty(U,"no",{enumerable:!0,get:function(){return ue(ase).default}});var cse=tU();Object.defineProperty(U,"ota",{enumerable:!0,get:function(){return ue(cse).default}});var use=nU();Object.defineProperty(U,"ps",{enumerable:!0,get:function(){return ue(use).default}});var lse=oU();Object.defineProperty(U,"pl",{enumerable:!0,get:function(){return ue(lse).default}});var dse=aU();Object.defineProperty(U,"pt",{enumerable:!0,get:function(){return ue(dse).default}});var Ase=uU();Object.defineProperty(U,"ro",{enumerable:!0,get:function(){return ue(Ase).default}});var pse=AU();Object.defineProperty(U,"ru",{enumerable:!0,get:function(){return ue(pse).default}});var fse=fU();Object.defineProperty(U,"sl",{enumerable:!0,get:function(){return ue(fse).default}});var hse=gU();Object.defineProperty(U,"sv",{enumerable:!0,get:function(){return ue(hse).default}});var gse=yU();Object.defineProperty(U,"ta",{enumerable:!0,get:function(){return ue(gse).default}});var mse=IU();Object.defineProperty(U,"th",{enumerable:!0,get:function(){return ue(mse).default}});var yse=bU();Object.defineProperty(U,"tr",{enumerable:!0,get:function(){return ue(yse).default}});var Ese=BU();Object.defineProperty(U,"ua",{enumerable:!0,get:function(){return ue(Ese).default}});var Ise=KC();Object.defineProperty(U,"uk",{enumerable:!0,get:function(){return ue(Ise).default}});var Cse=vU();Object.defineProperty(U,"ur",{enumerable:!0,get:function(){return ue(Cse).default}});var bse=DU();Object.defineProperty(U,"uz",{enumerable:!0,get:function(){return ue(bse).default}});var Sse=RU();Object.defineProperty(U,"vi",{enumerable:!0,get:function(){return ue(Sse).default}});var wse=NU();Object.defineProperty(U,"zhCN",{enumerable:!0,get:function(){return ue(wse).default}});var Bse=UU();Object.defineProperty(U,"zhTW",{enumerable:!0,get:function(){return ue(Bse).default}});var Qse=xU();Object.defineProperty(U,"yo",{enumerable:!0,get:function(){return ue(Qse).default}})});var pd=m(qn=>{"use strict";var LU;Object.defineProperty(qn,"__esModule",{value:!0});qn.globalRegistry=qn.$ZodRegistry=qn.$input=qn.$output=void 0;qn.registry=PU;qn.$output=Symbol("ZodOutput");qn.$input=Symbol("ZodInput");var Uh=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...r){let n=r[0];return this._map.set(e,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let r=this._map.get(e);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(e),this}get(e){let r=e._zod.parent;if(r){let n={...this.get(r)??{}};delete n.id;let i={...n,...this._map.get(e)};return Object.keys(i).length?i:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};qn.$ZodRegistry=Uh;function PU(){return new Uh}(LU=globalThis).__zod_globalRegistry??(LU.__zod_globalRegistry=PU());qn.globalRegistry=globalThis.__zod_globalRegistry});var qU=m(D=>{"use strict";var vse=D&&D.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),_se=D&&D.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Lh=D&&D.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&vse(e,t,r);return _se(e,t),e};Object.defineProperty(D,"__esModule",{value:!0});D.TimePrecision=void 0;D._string=Dse;D._coercedString=Tse;D._email=Rse;D._guid=kse;D._uuid=Nse;D._uuidv4=Ose;D._uuidv6=Use;D._uuidv7=Mse;D._url=xse;D._emoji=Lse;D._nanoid=Pse;D._cuid=Fse;D._cuid2=$se;D._ulid=jse;D._xid=qse;D._ksuid=zse;D._ipv4=Gse;D._ipv6=Hse;D._mac=Yse;D._cidrv4=Vse;D._cidrv6=Jse;D._base64=Wse;D._base64url=Zse;D._e164=Kse;D._jwt=Xse;D._isoDateTime=eae;D._isoDate=tae;D._isoTime=rae;D._isoDuration=nae;D._number=iae;D._coercedNumber=oae;D._int=sae;D._float32=aae;D._float64=cae;D._int32=uae;D._uint32=lae;D._boolean=dae;D._coercedBoolean=Aae;D._bigint=pae;D._coercedBigint=fae;D._int64=hae;D._uint64=gae;D._symbol=mae;D._undefined=yae;D._null=Eae;D._any=Iae;D._unknown=Cae;D._never=bae;D._void=Sae;D._date=wae;D._coercedDate=Bae;D._nan=Qae;D._lt=FU;D._lte=fd;D._max=fd;D._lte=fd;D._max=fd;D._gt=$U;D._gte=hd;D._min=hd;D._gte=hd;D._min=hd;D._positive=vae;D._negative=_ae;D._nonpositive=Dae;D._nonnegative=Tae;D._multipleOf=Rae;D._maxSize=kae;D._minSize=Nae;D._size=Oae;D._maxLength=Uae;D._minLength=Mae;D._length=xae;D._regex=Lae;D._lowercase=Pae;D._uppercase=Fae;D._includes=$ae;D._startsWith=jae;D._endsWith=qae;D._property=zae;D._mime=Gae;D._overwrite=Xc;D._normalize=Hae;D._trim=Yae;D._toLowerCase=Vae;D._toUpperCase=Jae;D._slugify=Wae;D._array=Zae;D._union=Kae;D._xor=Xae;D._discriminatedUnion=ece;D._intersection=tce;D._tuple=rce;D._record=nce;D._map=ice;D._set=oce;D._enum=sce;D._nativeEnum=ace;D._literal=cce;D._file=uce;D._transform=lce;D._optional=dce;D._nullable=Ace;D._default=pce;D._nonoptional=fce;D._success=hce;D._catch=gce;D._pipe=mce;D._readonly=yce;D._templateLiteral=Ece;D._lazy=Ice;D._promise=Cce;D._custom=bce;D._refine=Sce;D._superRefine=wce;D._check=jU;D.describe=Bce;D.meta=Qce;D._stringbool=vce;D._stringFormat=_ce;var st=Lh(Tf()),xh=Lh(pd()),Mh=Lh(JC()),x=Lh(ee());function Dse(t,e){return new t({type:"string",...x.normalizeParams(e)})}function Tse(t,e){return new t({type:"string",coerce:!0,...x.normalizeParams(e)})}function Rse(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...x.normalizeParams(e)})}function kse(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...x.normalizeParams(e)})}function Nse(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...x.normalizeParams(e)})}function Ose(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...x.normalizeParams(e)})}function Use(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...x.normalizeParams(e)})}function Mse(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...x.normalizeParams(e)})}function xse(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...x.normalizeParams(e)})}function Lse(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...x.normalizeParams(e)})}function Pse(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...x.normalizeParams(e)})}function Fse(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...x.normalizeParams(e)})}function $se(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...x.normalizeParams(e)})}function jse(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...x.normalizeParams(e)})}function qse(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...x.normalizeParams(e)})}function zse(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...x.normalizeParams(e)})}function Gse(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...x.normalizeParams(e)})}function Hse(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...x.normalizeParams(e)})}function Yse(t,e){return new t({type:"string",format:"mac",check:"string_format",abort:!1,...x.normalizeParams(e)})}function Vse(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...x.normalizeParams(e)})}function Jse(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...x.normalizeParams(e)})}function Wse(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...x.normalizeParams(e)})}function Zse(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...x.normalizeParams(e)})}function Kse(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...x.normalizeParams(e)})}function Xse(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...x.normalizeParams(e)})}D.TimePrecision={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function eae(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...x.normalizeParams(e)})}function tae(t,e){return new t({type:"string",format:"date",check:"string_format",...x.normalizeParams(e)})}function rae(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...x.normalizeParams(e)})}function nae(t,e){return new t({type:"string",format:"duration",check:"string_format",...x.normalizeParams(e)})}function iae(t,e){return new t({type:"number",checks:[],...x.normalizeParams(e)})}function oae(t,e){return new t({type:"number",coerce:!0,checks:[],...x.normalizeParams(e)})}function sae(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...x.normalizeParams(e)})}function aae(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float32",...x.normalizeParams(e)})}function cae(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float64",...x.normalizeParams(e)})}function uae(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"int32",...x.normalizeParams(e)})}function lae(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"uint32",...x.normalizeParams(e)})}function dae(t,e){return new t({type:"boolean",...x.normalizeParams(e)})}function Aae(t,e){return new t({type:"boolean",coerce:!0,...x.normalizeParams(e)})}function pae(t,e){return new t({type:"bigint",...x.normalizeParams(e)})}function fae(t,e){return new t({type:"bigint",coerce:!0,...x.normalizeParams(e)})}function hae(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...x.normalizeParams(e)})}function gae(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...x.normalizeParams(e)})}function mae(t,e){return new t({type:"symbol",...x.normalizeParams(e)})}function yae(t,e){return new t({type:"undefined",...x.normalizeParams(e)})}function Eae(t,e){return new t({type:"null",...x.normalizeParams(e)})}function Iae(t){return new t({type:"any"})}function Cae(t){return new t({type:"unknown"})}function bae(t,e){return new t({type:"never",...x.normalizeParams(e)})}function Sae(t,e){return new t({type:"void",...x.normalizeParams(e)})}function wae(t,e){return new t({type:"date",...x.normalizeParams(e)})}function Bae(t,e){return new t({type:"date",coerce:!0,...x.normalizeParams(e)})}function Qae(t,e){return new t({type:"nan",...x.normalizeParams(e)})}function FU(t,e){return new st.$ZodCheckLessThan({check:"less_than",...x.normalizeParams(e),value:t,inclusive:!1})}function fd(t,e){return new st.$ZodCheckLessThan({check:"less_than",...x.normalizeParams(e),value:t,inclusive:!0})}function $U(t,e){return new st.$ZodCheckGreaterThan({check:"greater_than",...x.normalizeParams(e),value:t,inclusive:!1})}function hd(t,e){return new st.$ZodCheckGreaterThan({check:"greater_than",...x.normalizeParams(e),value:t,inclusive:!0})}function vae(t){return $U(0,t)}function _ae(t){return FU(0,t)}function Dae(t){return fd(0,t)}function Tae(t){return hd(0,t)}function Rae(t,e){return new st.$ZodCheckMultipleOf({check:"multiple_of",...x.normalizeParams(e),value:t})}function kae(t,e){return new st.$ZodCheckMaxSize({check:"max_size",...x.normalizeParams(e),maximum:t})}function Nae(t,e){return new st.$ZodCheckMinSize({check:"min_size",...x.normalizeParams(e),minimum:t})}function Oae(t,e){return new st.$ZodCheckSizeEquals({check:"size_equals",...x.normalizeParams(e),size:t})}function Uae(t,e){return new st.$ZodCheckMaxLength({check:"max_length",...x.normalizeParams(e),maximum:t})}function Mae(t,e){return new st.$ZodCheckMinLength({check:"min_length",...x.normalizeParams(e),minimum:t})}function xae(t,e){return new st.$ZodCheckLengthEquals({check:"length_equals",...x.normalizeParams(e),length:t})}function Lae(t,e){return new st.$ZodCheckRegex({check:"string_format",format:"regex",...x.normalizeParams(e),pattern:t})}function Pae(t){return new st.$ZodCheckLowerCase({check:"string_format",format:"lowercase",...x.normalizeParams(t)})}function Fae(t){return new st.$ZodCheckUpperCase({check:"string_format",format:"uppercase",...x.normalizeParams(t)})}function $ae(t,e){return new st.$ZodCheckIncludes({check:"string_format",format:"includes",...x.normalizeParams(e),includes:t})}function jae(t,e){return new st.$ZodCheckStartsWith({check:"string_format",format:"starts_with",...x.normalizeParams(e),prefix:t})}function qae(t,e){return new st.$ZodCheckEndsWith({check:"string_format",format:"ends_with",...x.normalizeParams(e),suffix:t})}function zae(t,e,r){return new st.$ZodCheckProperty({check:"property",property:t,schema:e,...x.normalizeParams(r)})}function Gae(t,e){return new st.$ZodCheckMimeType({check:"mime_type",mime:t,...x.normalizeParams(e)})}function Xc(t){return new st.$ZodCheckOverwrite({check:"overwrite",tx:t})}function Hae(t){return Xc(e=>e.normalize(t))}function Yae(){return Xc(t=>t.trim())}function Vae(){return Xc(t=>t.toLowerCase())}function Jae(){return Xc(t=>t.toUpperCase())}function Wae(){return Xc(t=>x.slugify(t))}function Zae(t,e,r){return new t({type:"array",element:e,...x.normalizeParams(r)})}function Kae(t,e,r){return new t({type:"union",options:e,...x.normalizeParams(r)})}function Xae(t,e,r){return new t({type:"union",options:e,inclusive:!1,...x.normalizeParams(r)})}function ece(t,e,r,n){return new t({type:"union",options:r,discriminator:e,...x.normalizeParams(n)})}function tce(t,e,r){return new t({type:"intersection",left:e,right:r})}function rce(t,e,r,n){let i=r instanceof Mh.$ZodType,o=i?n:r,s=i?r:null;return new t({type:"tuple",items:e,rest:s,...x.normalizeParams(o)})}function nce(t,e,r,n){return new t({type:"record",keyType:e,valueType:r,...x.normalizeParams(n)})}function ice(t,e,r,n){return new t({type:"map",keyType:e,valueType:r,...x.normalizeParams(n)})}function oce(t,e,r){return new t({type:"set",valueType:e,...x.normalizeParams(r)})}function sce(t,e,r){let n=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new t({type:"enum",entries:n,...x.normalizeParams(r)})}function ace(t,e,r){return new t({type:"enum",entries:e,...x.normalizeParams(r)})}function cce(t,e,r){return new t({type:"literal",values:Array.isArray(e)?e:[e],...x.normalizeParams(r)})}function uce(t,e){return new t({type:"file",...x.normalizeParams(e)})}function lce(t,e){return new t({type:"transform",transform:e})}function dce(t,e){return new t({type:"optional",innerType:e})}function Ace(t,e){return new t({type:"nullable",innerType:e})}function pce(t,e,r){return new t({type:"default",innerType:e,get defaultValue(){return typeof r=="function"?r():x.shallowClone(r)}})}function fce(t,e,r){return new t({type:"nonoptional",innerType:e,...x.normalizeParams(r)})}function hce(t,e){return new t({type:"success",innerType:e})}function gce(t,e,r){return new t({type:"catch",innerType:e,catchValue:typeof r=="function"?r:()=>r})}function mce(t,e,r){return new t({type:"pipe",in:e,out:r})}function yce(t,e){return new t({type:"readonly",innerType:e})}function Ece(t,e,r){return new t({type:"template_literal",parts:e,...x.normalizeParams(r)})}function Ice(t,e){return new t({type:"lazy",getter:e})}function Cce(t,e){return new t({type:"promise",innerType:e})}function bce(t,e,r){let n=x.normalizeParams(r);return n.abort??(n.abort=!0),new t({type:"custom",check:"custom",fn:e,...n})}function Sce(t,e,r){return new t({type:"custom",check:"custom",fn:e,...x.normalizeParams(r)})}function wce(t,e){let r=jU(n=>(n.addIssue=i=>{if(typeof i=="string")n.issues.push(x.issue(i,n.value,r._zod.def));else{let o=i;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=r),o.continue??(o.continue=!r._zod.def.abort),n.issues.push(x.issue(o))}},t(n.value,n)),e);return r}function jU(t,e){let r=new st.$ZodCheck({check:"custom",...x.normalizeParams(e)});return r._zod.check=t,r}function Bce(t){let e=new st.$ZodCheck({check:"describe"});return e._zod.onattach=[r=>{let n=xh.globalRegistry.get(r)??{};xh.globalRegistry.add(r,{...n,description:t})}],e._zod.check=()=>{},e}function Qce(t){let e=new st.$ZodCheck({check:"meta"});return e._zod.onattach=[r=>{let n=xh.globalRegistry.get(r)??{};xh.globalRegistry.add(r,{...n,...t})}],e._zod.check=()=>{},e}function vce(t,e){let r=x.normalizeParams(e),n=r.truthy??["true","1","yes","on","y","enabled"],i=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(n=n.map(p=>typeof p=="string"?p.toLowerCase():p),i=i.map(p=>typeof p=="string"?p.toLowerCase():p));let o=new Set(n),s=new Set(i),a=t.Codec??Mh.$ZodCodec,c=t.Boolean??Mh.$ZodBoolean,u=t.String??Mh.$ZodString,l=new u({type:"string",error:r.error}),d=new c({type:"boolean",error:r.error}),A=new a({type:"pipe",in:l,out:d,transform:((p,h)=>{let g=p;return r.case!=="sensitive"&&(g=g.toLowerCase()),o.has(g)?!0:s.has(g)?!1:(h.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...s],input:h.value,inst:A,continue:!1}),{})}),reverseTransform:((p,h)=>p===!0?n[0]||"true":i[0]||"false"),error:r.error});return A}function _ce(t,e,r,n={}){let i=x.normalizeParams(n),o={...x.normalizeParams(n),check:"string_format",type:"string",format:e,fn:typeof r=="function"?r:a=>r.test(a),...i};return r instanceof RegExp&&(o.pattern=r),new t(o)}});var gd=m(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.createStandardJSONSchemaMethod=fn.createToJSONSchemaMethod=void 0;fn.initializeContext=eb;fn.process=Ph;fn.extractDefs=tb;fn.finalize=rb;var Dce=pd();function eb(t){let e=t?.target??"draft-2020-12";return e==="draft-4"&&(e="draft-04"),e==="draft-7"&&(e="draft-07"),{processors:t.processors??{},metadataRegistry:t?.metadata??Dce.globalRegistry,target:e,unrepresentable:t?.unrepresentable??"throw",override:t?.override??(()=>{}),io:t?.io??"output",counter:0,seen:new Map,cycles:t?.cycles??"ref",reused:t?.reused??"inline",external:t?.external??void 0}}function Ph(t,e,r={path:[],schemaPath:[]}){var n;let i=t._zod.def,o=e.seen.get(t);if(o)return o.count++,r.schemaPath.includes(t)&&(o.cycle=r.path),o.schema;let s={schema:{},count:1,cycle:void 0,path:r.path};e.seen.set(t,s);let a=t._zod.toJSONSchema?.();if(a)s.schema=a;else{let l={...r,schemaPath:[...r.schemaPath,t],path:r.path};if(t._zod.processJSONSchema)t._zod.processJSONSchema(e,s.schema,l);else{let A=s.schema,p=e.processors[i.type];if(!p)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);p(t,e,A,l)}let d=t._zod.parent;d&&(s.ref||(s.ref=d),Ph(d,e,l),e.seen.get(d).isParent=!0)}let c=e.metadataRegistry.get(t);return c&&Object.assign(s.schema,c),e.io==="input"&&ir(t)&&(delete s.schema.examples,delete s.schema.default),e.io==="input"&&"_prefault"in s.schema&&((n=s.schema).default??(n.default=s.schema._prefault)),delete s.schema._prefault,e.seen.get(t).schema}function tb(t,e){let r=t.seen.get(e);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let n=new Map;for(let s of t.seen.entries()){let a=t.metadataRegistry.get(s[0])?.id;if(a){let c=n.get(a);if(c&&c!==s[0])throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(a,s[0])}}let i=s=>{let a=t.target==="draft-2020-12"?"$defs":"definitions";if(t.external){let d=t.external.registry.get(s[0])?.id,A=t.external.uri??(h=>h);if(d)return{ref:A(d)};let p=s[1].defId??s[1].schema.id??`schema${t.counter++}`;return s[1].defId=p,{defId:p,ref:`${A("__shared")}#/${a}/${p}`}}if(s[1]===r)return{ref:"#"};let u=`#/${a}/`,l=s[1].schema.id??`__schema${t.counter++}`;return{defId:l,ref:u+l}},o=s=>{if(s[1].schema.$ref)return;let a=s[1],{ref:c,defId:u}=i(s);a.def={...a.schema},u&&(a.defId=u);let l=a.schema;for(let d in l)delete l[d];l.$ref=c};if(t.cycles==="throw")for(let s of t.seen.entries()){let a=s[1];if(a.cycle)throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
78
78
 
79
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let s of t.seen.entries()){let a=s[1];if(e===s[0]){o(s);continue}if(t.external){let u=t.external.registry.get(s[0])?.id;if(e!==s[0]&&u){o(s);continue}}if(t.metadataRegistry.get(s[0])?.id){o(s);continue}if(a.cycle){o(s);continue}if(a.count>1&&t.reused==="ref"){o(s);continue}}}function rb(t,e){let r=t.seen.get(e);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let n=a=>{let c=t.seen.get(a);if(c.ref===null)return;let u=c.def??c.schema,l={...u},d=c.ref;if(c.ref=null,d){n(d);let p=t.seen.get(d),h=p.schema;if(h.$ref&&(t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0")?(u.allOf=u.allOf??[],u.allOf.push(h)):Object.assign(u,h),Object.assign(u,l),a._zod.parent===d)for(let S in u)S==="$ref"||S==="allOf"||S in l||delete u[S];if(h.$ref&&p.def)for(let S in u)S==="$ref"||S==="allOf"||S in p.def&&JSON.stringify(u[S])===JSON.stringify(p.def[S])&&delete u[S]}let A=a._zod.parent;if(A&&A!==d){n(A);let p=t.seen.get(A);if(p?.schema.$ref&&(u.$ref=p.schema.$ref,p.def))for(let h in u)h==="$ref"||h==="allOf"||h in p.def&&JSON.stringify(u[h])===JSON.stringify(p.def[h])&&delete u[h]}t.override({zodSchema:a,jsonSchema:u,path:c.path??[]})};for(let a of[...t.seen.entries()].reverse())n(a[0]);let i={};if(t.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":t.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":t.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":t.target,t.external?.uri){let a=t.external.registry.get(e)?.id;if(!a)throw new Error("Schema is missing an `id` property");i.$id=t.external.uri(a)}Object.assign(i,r.def??r.schema);let o=t.metadataRegistry.get(e)?.id;o!==void 0&&i.id===o&&delete i.id;let s=t.external?.defs??{};for(let a of t.seen.entries()){let c=a[1];c.def&&c.defId&&(c.def.id===c.defId&&delete c.def.id,s[c.defId]=c.def)}t.external||Object.keys(s).length>0&&(t.target==="draft-2020-12"?i.$defs=s:i.definitions=s);try{let a=JSON.parse(JSON.stringify(i));return Object.defineProperty(a,"~standard",{value:{...e["~standard"],jsonSchema:{input:(0,fn.createStandardJSONSchemaMethod)(e,"input",t.processors),output:(0,fn.createStandardJSONSchemaMethod)(e,"output",t.processors)}},enumerable:!1,writable:!1}),a}catch{throw new Error("Error converting schema to JSON.")}}function ir(t,e){let r=e??{seen:new Set};if(r.seen.has(t))return!1;r.seen.add(t);let n=t._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return ir(n.element,r);if(n.type==="set")return ir(n.valueType,r);if(n.type==="lazy")return ir(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault")return ir(n.innerType,r);if(n.type==="intersection")return ir(n.left,r)||ir(n.right,r);if(n.type==="record"||n.type==="map")return ir(n.keyType,r)||ir(n.valueType,r);if(n.type==="pipe")return t._zod.traits.has("$ZodCodec")?!0:ir(n.in,r)||ir(n.out,r);if(n.type==="object"){for(let i in n.shape)if(ir(n.shape[i],r))return!0;return!1}if(n.type==="union"){for(let i of n.options)if(ir(i,r))return!0;return!1}if(n.type==="tuple"){for(let i of n.items)if(ir(i,r))return!0;return!!(n.rest&&ir(n.rest,r))}return!1}var Tce=(t,e={})=>r=>{let n=eb({...r,processors:e});return Ph(t,n),tb(n,t),rb(n,t)};fn.createToJSONSchemaMethod=Tce;var Rce=(t,e,r={})=>n=>{let{libraryOptions:i,target:o}=n??{},s=eb({...i??{},target:o,io:e,processors:r});return Ph(t,s),tb(s,t),rb(s,t)};fn.createStandardJSONSchemaMethod=Rce});var md=m(R=>{"use strict";Object.defineProperty(R,"__esModule",{value:!0});R.allProcessors=R.lazyProcessor=R.optionalProcessor=R.promiseProcessor=R.readonlyProcessor=R.pipeProcessor=R.catchProcessor=R.prefaultProcessor=R.defaultProcessor=R.nonoptionalProcessor=R.nullableProcessor=R.recordProcessor=R.tupleProcessor=R.intersectionProcessor=R.unionProcessor=R.objectProcessor=R.arrayProcessor=R.setProcessor=R.mapProcessor=R.transformProcessor=R.functionProcessor=R.customProcessor=R.successProcessor=R.fileProcessor=R.templateLiteralProcessor=R.nanProcessor=R.literalProcessor=R.enumProcessor=R.dateProcessor=R.unknownProcessor=R.anyProcessor=R.neverProcessor=R.voidProcessor=R.undefinedProcessor=R.nullProcessor=R.symbolProcessor=R.bigintProcessor=R.booleanProcessor=R.numberProcessor=R.stringProcessor=void 0;R.toJSONSchema=Eue;var Pe=gd(),kce=ee(),Nce={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Oce=(t,e,r,n)=>{let i=r;i.type="string";let{minimum:o,maximum:s,format:a,patterns:c,contentEncoding:u}=t._zod.bag;if(typeof o=="number"&&(i.minLength=o),typeof s=="number"&&(i.maxLength=s),a&&(i.format=Nce[a]??a,i.format===""&&delete i.format,a==="time"&&delete i.format),u&&(i.contentEncoding=u),c&&c.size>0){let l=[...c];l.length===1?i.pattern=l[0].source:l.length>1&&(i.allOf=[...l.map(d=>({...e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}};R.stringProcessor=Oce;var Uce=(t,e,r,n)=>{let i=r,{minimum:o,maximum:s,format:a,multipleOf:c,exclusiveMaximum:u,exclusiveMinimum:l}=t._zod.bag;typeof a=="string"&&a.includes("int")?i.type="integer":i.type="number";let d=typeof l=="number"&&l>=(o??Number.NEGATIVE_INFINITY),A=typeof u=="number"&&u<=(s??Number.POSITIVE_INFINITY),p=e.target==="draft-04"||e.target==="openapi-3.0";d?p?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l:typeof o=="number"&&(i.minimum=o),A?p?(i.maximum=u,i.exclusiveMaximum=!0):i.exclusiveMaximum=u:typeof s=="number"&&(i.maximum=s),typeof c=="number"&&(i.multipleOf=c)};R.numberProcessor=Uce;var Mce=(t,e,r,n)=>{r.type="boolean"};R.booleanProcessor=Mce;var xce=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")};R.bigintProcessor=xce;var Lce=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")};R.symbolProcessor=Lce;var Pce=(t,e,r,n)=>{e.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"};R.nullProcessor=Pce;var Fce=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")};R.undefinedProcessor=Fce;var $ce=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")};R.voidProcessor=$ce;var jce=(t,e,r,n)=>{r.not={}};R.neverProcessor=jce;var qce=(t,e,r,n)=>{};R.anyProcessor=qce;var zce=(t,e,r,n)=>{};R.unknownProcessor=zce;var Gce=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")};R.dateProcessor=Gce;var Hce=(t,e,r,n)=>{let i=t._zod.def,o=(0,kce.getEnumValues)(i.entries);o.every(s=>typeof s=="number")&&(r.type="number"),o.every(s=>typeof s=="string")&&(r.type="string"),r.enum=o};R.enumProcessor=Hce;var Yce=(t,e,r,n)=>{let i=t._zod.def,o=[];for(let s of i.values)if(s===void 0){if(e.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(e.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(s))}else o.push(s);if(o.length!==0)if(o.length===1){let s=o[0];r.type=s===null?"null":typeof s,e.target==="draft-04"||e.target==="openapi-3.0"?r.enum=[s]:r.const=s}else o.every(s=>typeof s=="number")&&(r.type="number"),o.every(s=>typeof s=="string")&&(r.type="string"),o.every(s=>typeof s=="boolean")&&(r.type="boolean"),o.every(s=>s===null)&&(r.type="null"),r.enum=o};R.literalProcessor=Yce;var Vce=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")};R.nanProcessor=Vce;var Jce=(t,e,r,n)=>{let i=r,o=t._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");i.type="string",i.pattern=o.source};R.templateLiteralProcessor=Jce;var Wce=(t,e,r,n)=>{let i=r,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:a,mime:c}=t._zod.bag;s!==void 0&&(o.minLength=s),a!==void 0&&(o.maxLength=a),c?c.length===1?(o.contentMediaType=c[0],Object.assign(i,o)):(Object.assign(i,o),i.anyOf=c.map(u=>({contentMediaType:u}))):Object.assign(i,o)};R.fileProcessor=Wce;var Zce=(t,e,r,n)=>{r.type="boolean"};R.successProcessor=Zce;var Kce=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")};R.customProcessor=Kce;var Xce=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")};R.functionProcessor=Xce;var eue=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")};R.transformProcessor=eue;var tue=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")};R.mapProcessor=tue;var rue=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")};R.setProcessor=rue;var nue=(t,e,r,n)=>{let i=r,o=t._zod.def,{minimum:s,maximum:a}=t._zod.bag;typeof s=="number"&&(i.minItems=s),typeof a=="number"&&(i.maxItems=a),i.type="array",i.items=(0,Pe.process)(o.element,e,{...n,path:[...n.path,"items"]})};R.arrayProcessor=nue;var iue=(t,e,r,n)=>{let i=r,o=t._zod.def;i.type="object",i.properties={};let s=o.shape;for(let u in s)i.properties[u]=(0,Pe.process)(s[u],e,{...n,path:[...n.path,"properties",u]});let a=new Set(Object.keys(s)),c=new Set([...a].filter(u=>{let l=o.shape[u]._zod;return e.io==="input"?l.optin===void 0:l.optout===void 0}));c.size>0&&(i.required=Array.from(c)),o.catchall?._zod.def.type==="never"?i.additionalProperties=!1:o.catchall?o.catchall&&(i.additionalProperties=(0,Pe.process)(o.catchall,e,{...n,path:[...n.path,"additionalProperties"]})):e.io==="output"&&(i.additionalProperties=!1)};R.objectProcessor=iue;var oue=(t,e,r,n)=>{let i=t._zod.def,o=i.inclusive===!1,s=i.options.map((a,c)=>(0,Pe.process)(a,e,{...n,path:[...n.path,o?"oneOf":"anyOf",c]}));o?r.oneOf=s:r.anyOf=s};R.unionProcessor=oue;var sue=(t,e,r,n)=>{let i=t._zod.def,o=(0,Pe.process)(i.left,e,{...n,path:[...n.path,"allOf",0]}),s=(0,Pe.process)(i.right,e,{...n,path:[...n.path,"allOf",1]}),a=u=>"allOf"in u&&Object.keys(u).length===1,c=[...a(o)?o.allOf:[o],...a(s)?s.allOf:[s]];r.allOf=c};R.intersectionProcessor=sue;var aue=(t,e,r,n)=>{let i=r,o=t._zod.def;i.type="array";let s=e.target==="draft-2020-12"?"prefixItems":"items",a=e.target==="draft-2020-12"||e.target==="openapi-3.0"?"items":"additionalItems",c=o.items.map((A,p)=>(0,Pe.process)(A,e,{...n,path:[...n.path,s,p]})),u=o.rest?(0,Pe.process)(o.rest,e,{...n,path:[...n.path,a,...e.target==="openapi-3.0"?[o.items.length]:[]]}):null;e.target==="draft-2020-12"?(i.prefixItems=c,u&&(i.items=u)):e.target==="openapi-3.0"?(i.items={anyOf:c},u&&i.items.anyOf.push(u),i.minItems=c.length,u||(i.maxItems=c.length)):(i.items=c,u&&(i.additionalItems=u));let{minimum:l,maximum:d}=t._zod.bag;typeof l=="number"&&(i.minItems=l),typeof d=="number"&&(i.maxItems=d)};R.tupleProcessor=aue;var cue=(t,e,r,n)=>{let i=r,o=t._zod.def;i.type="object";let s=o.keyType,c=s._zod.bag?.patterns;if(o.mode==="loose"&&c&&c.size>0){let l=(0,Pe.process)(o.valueType,e,{...n,path:[...n.path,"patternProperties","*"]});i.patternProperties={};for(let d of c)i.patternProperties[d.source]=l}else(e.target==="draft-07"||e.target==="draft-2020-12")&&(i.propertyNames=(0,Pe.process)(o.keyType,e,{...n,path:[...n.path,"propertyNames"]})),i.additionalProperties=(0,Pe.process)(o.valueType,e,{...n,path:[...n.path,"additionalProperties"]});let u=s._zod.values;if(u){let l=[...u].filter(d=>typeof d=="string"||typeof d=="number");l.length>0&&(i.required=l)}};R.recordProcessor=cue;var uue=(t,e,r,n)=>{let i=t._zod.def,o=(0,Pe.process)(i.innerType,e,n),s=e.seen.get(t);e.target==="openapi-3.0"?(s.ref=i.innerType,r.nullable=!0):r.anyOf=[o,{type:"null"}]};R.nullableProcessor=uue;var lue=(t,e,r,n)=>{let i=t._zod.def;(0,Pe.process)(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType};R.nonoptionalProcessor=lue;var due=(t,e,r,n)=>{let i=t._zod.def;(0,Pe.process)(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType,r.default=JSON.parse(JSON.stringify(i.defaultValue))};R.defaultProcessor=due;var Aue=(t,e,r,n)=>{let i=t._zod.def;(0,Pe.process)(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType,e.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(i.defaultValue)))};R.prefaultProcessor=Aue;var pue=(t,e,r,n)=>{let i=t._zod.def;(0,Pe.process)(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType;let s;try{s=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=s};R.catchProcessor=pue;var fue=(t,e,r,n)=>{let i=t._zod.def,o=i.in._zod.traits.has("$ZodTransform"),s=e.io==="input"?o?i.out:i.in:i.out;(0,Pe.process)(s,e,n);let a=e.seen.get(t);a.ref=s};R.pipeProcessor=fue;var hue=(t,e,r,n)=>{let i=t._zod.def;(0,Pe.process)(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType,r.readOnly=!0};R.readonlyProcessor=hue;var gue=(t,e,r,n)=>{let i=t._zod.def;(0,Pe.process)(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType};R.promiseProcessor=gue;var mue=(t,e,r,n)=>{let i=t._zod.def;(0,Pe.process)(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType};R.optionalProcessor=mue;var yue=(t,e,r,n)=>{let i=t._zod.innerType;(0,Pe.process)(i,e,n);let o=e.seen.get(t);o.ref=i};R.lazyProcessor=yue;R.allProcessors={string:R.stringProcessor,number:R.numberProcessor,boolean:R.booleanProcessor,bigint:R.bigintProcessor,symbol:R.symbolProcessor,null:R.nullProcessor,undefined:R.undefinedProcessor,void:R.voidProcessor,never:R.neverProcessor,any:R.anyProcessor,unknown:R.unknownProcessor,date:R.dateProcessor,enum:R.enumProcessor,literal:R.literalProcessor,nan:R.nanProcessor,template_literal:R.templateLiteralProcessor,file:R.fileProcessor,success:R.successProcessor,custom:R.customProcessor,function:R.functionProcessor,transform:R.transformProcessor,map:R.mapProcessor,set:R.setProcessor,array:R.arrayProcessor,object:R.objectProcessor,union:R.unionProcessor,intersection:R.intersectionProcessor,tuple:R.tupleProcessor,record:R.recordProcessor,nullable:R.nullableProcessor,nonoptional:R.nonoptionalProcessor,default:R.defaultProcessor,prefault:R.prefaultProcessor,catch:R.catchProcessor,pipe:R.pipeProcessor,readonly:R.readonlyProcessor,promise:R.promiseProcessor,optional:R.optionalProcessor,lazy:R.lazyProcessor};function Eue(t,e){if("_idmap"in t){let n=t,i=(0,Pe.initializeContext)({...e,processors:R.allProcessors}),o={};for(let c of n._idmap.entries()){let[u,l]=c;(0,Pe.process)(l,i)}let s={},a={registry:n,uri:e?.uri,defs:o};i.external=a;for(let c of n._idmap.entries()){let[u,l]=c;(0,Pe.extractDefs)(i,l),s[u]=(0,Pe.finalize)(i,l)}if(Object.keys(o).length>0){let c=i.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[c]:o}}return{schemas:s}}let r=(0,Pe.initializeContext)({...e,processors:R.allProcessors});return(0,Pe.process)(t,r),(0,Pe.extractDefs)(r,t),(0,Pe.finalize)(r,t)}});var zU=m($h=>{"use strict";Object.defineProperty($h,"__esModule",{value:!0});$h.JSONSchemaGenerator=void 0;var Iue=md(),Fh=gd(),nb=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 r=e?.target??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=(0,Fh.initializeContext)({processors:Iue.allProcessors,target:r,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,r={path:[],schemaPath:[]}){return(0,Fh.process)(e,this.ctx,r)}emit(e,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),(0,Fh.extractDefs)(this.ctx,e);let n=(0,Fh.finalize)(this.ctx,e),{"~standard":i,...o}=n;return o}};$h.JSONSchemaGenerator=nb});var HU=m(GU=>{"use strict";Object.defineProperty(GU,"__esModule",{value:!0})});var mr=m(Ne=>{"use strict";var YU=Ne&&Ne.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Cue=Ne&&Ne.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),ro=Ne&&Ne.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&YU(e,t,r)},jh=Ne&&Ne.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&YU(e,t,r);return Cue(e,t),e};Object.defineProperty(Ne,"__esModule",{value:!0});Ne.JSONSchema=Ne.JSONSchemaGenerator=Ne.toJSONSchema=Ne.locales=Ne.regexes=Ne.util=void 0;ro(Sa(),Ne);ro($C(),Ne);ro(PC(),Ne);ro(JC(),Ne);ro(Tf(),Ne);ro(HC(),Ne);Ne.util=jh(ee());Ne.regexes=jh(Df());Ne.locales=jh(XC());ro(pd(),Ne);ro(GC(),Ne);ro(qU(),Ne);ro(gd(),Ne);var bue=md();Object.defineProperty(Ne,"toJSONSchema",{enumerable:!0,get:function(){return bue.toJSONSchema}});var Sue=zU();Object.defineProperty(Ne,"JSONSchemaGenerator",{enumerable:!0,get:function(){return Sue.JSONSchemaGenerator}});Ne.JSONSchema=jh(HU())});var qh=m(te=>{"use strict";Object.defineProperty(te,"__esModule",{value:!0});te.slugify=te.toUpperCase=te.toLowerCase=te.trim=te.normalize=te.overwrite=te.mime=te.property=te.endsWith=te.startsWith=te.includes=te.uppercase=te.lowercase=te.regex=te.length=te.minLength=te.maxLength=te.size=te.minSize=te.maxSize=te.multipleOf=te.nonnegative=te.nonpositive=te.negative=te.positive=te.gte=te.gt=te.lte=te.lt=void 0;var Fe=mr();Object.defineProperty(te,"lt",{enumerable:!0,get:function(){return Fe._lt}});Object.defineProperty(te,"lte",{enumerable:!0,get:function(){return Fe._lte}});Object.defineProperty(te,"gt",{enumerable:!0,get:function(){return Fe._gt}});Object.defineProperty(te,"gte",{enumerable:!0,get:function(){return Fe._gte}});Object.defineProperty(te,"positive",{enumerable:!0,get:function(){return Fe._positive}});Object.defineProperty(te,"negative",{enumerable:!0,get:function(){return Fe._negative}});Object.defineProperty(te,"nonpositive",{enumerable:!0,get:function(){return Fe._nonpositive}});Object.defineProperty(te,"nonnegative",{enumerable:!0,get:function(){return Fe._nonnegative}});Object.defineProperty(te,"multipleOf",{enumerable:!0,get:function(){return Fe._multipleOf}});Object.defineProperty(te,"maxSize",{enumerable:!0,get:function(){return Fe._maxSize}});Object.defineProperty(te,"minSize",{enumerable:!0,get:function(){return Fe._minSize}});Object.defineProperty(te,"size",{enumerable:!0,get:function(){return Fe._size}});Object.defineProperty(te,"maxLength",{enumerable:!0,get:function(){return Fe._maxLength}});Object.defineProperty(te,"minLength",{enumerable:!0,get:function(){return Fe._minLength}});Object.defineProperty(te,"length",{enumerable:!0,get:function(){return Fe._length}});Object.defineProperty(te,"regex",{enumerable:!0,get:function(){return Fe._regex}});Object.defineProperty(te,"lowercase",{enumerable:!0,get:function(){return Fe._lowercase}});Object.defineProperty(te,"uppercase",{enumerable:!0,get:function(){return Fe._uppercase}});Object.defineProperty(te,"includes",{enumerable:!0,get:function(){return Fe._includes}});Object.defineProperty(te,"startsWith",{enumerable:!0,get:function(){return Fe._startsWith}});Object.defineProperty(te,"endsWith",{enumerable:!0,get:function(){return Fe._endsWith}});Object.defineProperty(te,"property",{enumerable:!0,get:function(){return Fe._property}});Object.defineProperty(te,"mime",{enumerable:!0,get:function(){return Fe._mime}});Object.defineProperty(te,"overwrite",{enumerable:!0,get:function(){return Fe._overwrite}});Object.defineProperty(te,"normalize",{enumerable:!0,get:function(){return Fe._normalize}});Object.defineProperty(te,"trim",{enumerable:!0,get:function(){return Fe._trim}});Object.defineProperty(te,"toLowerCase",{enumerable:!0,get:function(){return Fe._toLowerCase}});Object.defineProperty(te,"toUpperCase",{enumerable:!0,get:function(){return Fe._toUpperCase}});Object.defineProperty(te,"slugify",{enumerable:!0,get:function(){return Fe._slugify}})});var yd=m(nt=>{"use strict";var wue=nt&&nt.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Bue=nt&&nt.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),VU=nt&&nt.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&wue(e,t,r);return Bue(e,t),e};Object.defineProperty(nt,"__esModule",{value:!0});nt.ZodISODuration=nt.ZodISOTime=nt.ZodISODate=nt.ZodISODateTime=void 0;nt.datetime=Que;nt.date=vue;nt.time=_ue;nt.duration=Due;var hn=VU(mr()),zh=VU(Ed());nt.ZodISODateTime=hn.$constructor("ZodISODateTime",(t,e)=>{hn.$ZodISODateTime.init(t,e),zh.ZodStringFormat.init(t,e)});function Que(t){return hn._isoDateTime(nt.ZodISODateTime,t)}nt.ZodISODate=hn.$constructor("ZodISODate",(t,e)=>{hn.$ZodISODate.init(t,e),zh.ZodStringFormat.init(t,e)});function vue(t){return hn._isoDate(nt.ZodISODate,t)}nt.ZodISOTime=hn.$constructor("ZodISOTime",(t,e)=>{hn.$ZodISOTime.init(t,e),zh.ZodStringFormat.init(t,e)});function _ue(t){return hn._isoTime(nt.ZodISOTime,t)}nt.ZodISODuration=hn.$constructor("ZodISODuration",(t,e)=>{hn.$ZodISODuration.init(t,e),zh.ZodStringFormat.init(t,e)});function Due(t){return hn._isoDuration(nt.ZodISODuration,t)}});var ib=m(gn=>{"use strict";var Tue=gn&&gn.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Rue=gn&&gn.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),WU=gn&&gn.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Tue(e,t,r);return Rue(e,t),e};Object.defineProperty(gn,"__esModule",{value:!0});gn.ZodRealError=gn.ZodError=void 0;var Gh=WU(mr()),kue=mr(),JU=WU(ee()),ZU=(t,e)=>{kue.$ZodError.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:r=>Gh.formatError(t,r)},flatten:{value:r=>Gh.flattenError(t,r)},addIssue:{value:r=>{t.issues.push(r),t.message=JSON.stringify(t.issues,JU.jsonStringifyReplacer,2)}},addIssues:{value:r=>{t.issues.push(...r),t.message=JSON.stringify(t.issues,JU.jsonStringifyReplacer,2)}},isEmpty:{get(){return t.issues.length===0}}})};gn.ZodError=Gh.$constructor("ZodError",ZU);gn.ZodRealError=Gh.$constructor("ZodError",ZU,{Parent:Error})});var ob=m(Oe=>{"use strict";var Nue=Oe&&Oe.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Oue=Oe&&Oe.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Uue=Oe&&Oe.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Nue(e,t,r);return Oue(e,t),e};Object.defineProperty(Oe,"__esModule",{value:!0});Oe.safeDecodeAsync=Oe.safeEncodeAsync=Oe.safeDecode=Oe.safeEncode=Oe.decodeAsync=Oe.encodeAsync=Oe.decode=Oe.encode=Oe.safeParseAsync=Oe.safeParse=Oe.parseAsync=Oe.parse=void 0;var mn=Uue(mr()),yn=ib();Oe.parse=mn._parse(yn.ZodRealError);Oe.parseAsync=mn._parseAsync(yn.ZodRealError);Oe.safeParse=mn._safeParse(yn.ZodRealError);Oe.safeParseAsync=mn._safeParseAsync(yn.ZodRealError);Oe.encode=mn._encode(yn.ZodRealError);Oe.decode=mn._decode(yn.ZodRealError);Oe.encodeAsync=mn._encodeAsync(yn.ZodRealError);Oe.decodeAsync=mn._decodeAsync(yn.ZodRealError);Oe.safeEncode=mn._safeEncode(yn.ZodRealError);Oe.safeDecode=mn._safeDecode(yn.ZodRealError);Oe.safeEncodeAsync=mn._safeEncodeAsync(yn.ZodRealError);Oe.safeDecodeAsync=mn._safeDecodeAsync(yn.ZodRealError)});var Ed=m(f=>{"use strict";var Mue=f&&f.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),xue=f&&f.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Id=f&&f.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Mue(e,t,r);return xue(e,t),e};Object.defineProperty(f,"__esModule",{value:!0});f.ZodLiteral=f.ZodEnum=f.ZodSet=f.ZodMap=f.ZodRecord=f.ZodTuple=f.ZodIntersection=f.ZodDiscriminatedUnion=f.ZodXor=f.ZodUnion=f.ZodObject=f.ZodArray=f.ZodDate=f.ZodVoid=f.ZodNever=f.ZodUnknown=f.ZodAny=f.ZodNull=f.ZodUndefined=f.ZodSymbol=f.ZodBigIntFormat=f.ZodBigInt=f.ZodBoolean=f.ZodNumberFormat=f.ZodNumber=f.ZodCustomStringFormat=f.ZodJWT=f.ZodE164=f.ZodBase64URL=f.ZodBase64=f.ZodCIDRv6=f.ZodCIDRv4=f.ZodIPv6=f.ZodMAC=f.ZodIPv4=f.ZodKSUID=f.ZodXID=f.ZodULID=f.ZodCUID2=f.ZodCUID=f.ZodNanoID=f.ZodEmoji=f.ZodURL=f.ZodUUID=f.ZodGUID=f.ZodEmail=f.ZodStringFormat=f.ZodString=f._ZodString=f.ZodType=void 0;f.stringbool=f.meta=f.describe=f.ZodCustom=f.ZodFunction=f.ZodPromise=f.ZodLazy=f.ZodTemplateLiteral=f.ZodReadonly=f.ZodPreprocess=f.ZodCodec=f.ZodPipe=f.ZodNaN=f.ZodCatch=f.ZodSuccess=f.ZodNonOptional=f.ZodPrefault=f.ZodDefault=f.ZodNullable=f.ZodExactOptional=f.ZodOptional=f.ZodTransform=f.ZodFile=void 0;f.string=Yh;f.email=Lue;f.guid=Pue;f.uuid=Fue;f.uuidv4=$ue;f.uuidv6=jue;f.uuidv7=que;f.url=zue;f.httpUrl=Gue;f.emoji=Hue;f.nanoid=Yue;f.cuid=Vue;f.cuid2=Jue;f.ulid=Wue;f.xid=Zue;f.ksuid=Kue;f.ipv4=Xue;f.mac=ele;f.ipv6=tle;f.cidrv4=rle;f.cidrv6=nle;f.base64=ile;f.base64url=ole;f.e164=sle;f.jwt=ale;f.stringFormat=cle;f.hostname=ule;f.hex=lle;f.hash=dle;f.number=XU;f.int=ab;f.float32=Ale;f.float64=ple;f.int32=fle;f.uint32=hle;f.boolean=eM;f.bigint=gle;f.int64=mle;f.uint64=yle;f.symbol=Ele;f.undefined=Ile;f.null=tM;f.any=Cle;f.unknown=eu;f.never=ub;f.void=ble;f.date=Sle;f.array=Wh;f.keyof=wle;f.object=Ble;f.strictObject=Qle;f.looseObject=vle;f.union=lb;f.xor=_le;f.discriminatedUnion=Dle;f.intersection=rM;f.tuple=nM;f.record=iM;f.partialRecord=Tle;f.looseRecord=Rle;f.map=kle;f.set=Nle;f.enum=db;f.nativeEnum=Ole;f.literal=Ule;f.file=Mle;f.transform=Ab;f.optional=Vh;f.exactOptional=oM;f.nullable=Jh;f.nullish=xle;f._default=sM;f.prefault=aM;f.nonoptional=cM;f.success=Lle;f.catch=uM;f.nan=Ple;f.pipe=cb;f.codec=Fle;f.invertCodec=$le;f.readonly=lM;f.templateLiteral=jle;f.lazy=dM;f.promise=qle;f._function=Zh;f.function=Zh;f._function=Zh;f.function=Zh;f.check=zle;f.custom=Gle;f.refine=AM;f.superRefine=pM;f.instanceof=Hle;f.json=Vle;f.preprocess=Jle;var C=Id(mr()),ve=mr(),Se=Id(md()),sb=gd(),me=Id(qh()),Hh=Id(yd()),En=Id(ob()),KU=new WeakMap;function Cd(t,e,r){let n=Object.getPrototypeOf(t),i=KU.get(n);if(i||(i=new Set,KU.set(n,i)),!i.has(e)){i.add(e);for(let o in r){let s=r[o];Object.defineProperty(n,o,{configurable:!0,enumerable:!1,get(){let a=s.bind(this);return Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:a}),a},set(a){Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:a})}})}}}f.ZodType=C.$constructor("ZodType",(t,e)=>(C.$ZodType.init(t,e),Object.assign(t["~standard"],{jsonSchema:{input:(0,sb.createStandardJSONSchemaMethod)(t,"input"),output:(0,sb.createStandardJSONSchemaMethod)(t,"output")}}),t.toJSONSchema=(0,sb.createToJSONSchemaMethod)(t,{}),t.def=e,t.type=e.type,Object.defineProperty(t,"_def",{value:e}),t.parse=(r,n)=>En.parse(t,r,n,{callee:t.parse}),t.safeParse=(r,n)=>En.safeParse(t,r,n),t.parseAsync=async(r,n)=>En.parseAsync(t,r,n,{callee:t.parseAsync}),t.safeParseAsync=async(r,n)=>En.safeParseAsync(t,r,n),t.spa=t.safeParseAsync,t.encode=(r,n)=>En.encode(t,r,n),t.decode=(r,n)=>En.decode(t,r,n),t.encodeAsync=async(r,n)=>En.encodeAsync(t,r,n),t.decodeAsync=async(r,n)=>En.decodeAsync(t,r,n),t.safeEncode=(r,n)=>En.safeEncode(t,r,n),t.safeDecode=(r,n)=>En.safeDecode(t,r,n),t.safeEncodeAsync=async(r,n)=>En.safeEncodeAsync(t,r,n),t.safeDecodeAsync=async(r,n)=>En.safeDecodeAsync(t,r,n),Cd(t,"ZodType",{check(...r){let n=this.def;return this.clone(ve.util.mergeDefs(n,{checks:[...n.checks??[],...r.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0})},with(...r){return this.check(...r)},clone(r,n){return C.clone(this,r,n)},brand(){return this},register(r,n){return r.add(this,n),this},refine(r,n){return this.check(AM(r,n))},superRefine(r,n){return this.check(pM(r,n))},overwrite(r){return this.check(me.overwrite(r))},optional(){return Vh(this)},exactOptional(){return oM(this)},nullable(){return Jh(this)},nullish(){return Vh(Jh(this))},nonoptional(r){return cM(this,r)},array(){return Wh(this)},or(r){return lb([this,r])},and(r){return rM(this,r)},transform(r){return cb(this,Ab(r))},default(r){return sM(this,r)},prefault(r){return aM(this,r)},catch(r){return uM(this,r)},pipe(r){return cb(this,r)},readonly(){return lM(this)},describe(r){let n=this.clone();return C.globalRegistry.add(n,{description:r}),n},meta(...r){if(r.length===0)return C.globalRegistry.get(this);let n=this.clone();return C.globalRegistry.add(n,r[0]),n},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(r){return r(this)}}),Object.defineProperty(t,"description",{get(){return C.globalRegistry.get(t)?.description},configurable:!0}),t));f._ZodString=C.$constructor("_ZodString",(t,e)=>{C.$ZodString.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(n,i,o)=>Se.stringProcessor(t,n,i,o);let r=t._zod.bag;t.format=r.format??null,t.minLength=r.minimum??null,t.maxLength=r.maximum??null,Cd(t,"_ZodString",{regex(...n){return this.check(me.regex(...n))},includes(...n){return this.check(me.includes(...n))},startsWith(...n){return this.check(me.startsWith(...n))},endsWith(...n){return this.check(me.endsWith(...n))},min(...n){return this.check(me.minLength(...n))},max(...n){return this.check(me.maxLength(...n))},length(...n){return this.check(me.length(...n))},nonempty(...n){return this.check(me.minLength(1,...n))},lowercase(n){return this.check(me.lowercase(n))},uppercase(n){return this.check(me.uppercase(n))},trim(){return this.check(me.trim())},normalize(...n){return this.check(me.normalize(...n))},toLowerCase(){return this.check(me.toLowerCase())},toUpperCase(){return this.check(me.toUpperCase())},slugify(){return this.check(me.slugify())}})});f.ZodString=C.$constructor("ZodString",(t,e)=>{C.$ZodString.init(t,e),f._ZodString.init(t,e),t.email=r=>t.check(C._email(f.ZodEmail,r)),t.url=r=>t.check(C._url(f.ZodURL,r)),t.jwt=r=>t.check(C._jwt(f.ZodJWT,r)),t.emoji=r=>t.check(C._emoji(f.ZodEmoji,r)),t.guid=r=>t.check(C._guid(f.ZodGUID,r)),t.uuid=r=>t.check(C._uuid(f.ZodUUID,r)),t.uuidv4=r=>t.check(C._uuidv4(f.ZodUUID,r)),t.uuidv6=r=>t.check(C._uuidv6(f.ZodUUID,r)),t.uuidv7=r=>t.check(C._uuidv7(f.ZodUUID,r)),t.nanoid=r=>t.check(C._nanoid(f.ZodNanoID,r)),t.guid=r=>t.check(C._guid(f.ZodGUID,r)),t.cuid=r=>t.check(C._cuid(f.ZodCUID,r)),t.cuid2=r=>t.check(C._cuid2(f.ZodCUID2,r)),t.ulid=r=>t.check(C._ulid(f.ZodULID,r)),t.base64=r=>t.check(C._base64(f.ZodBase64,r)),t.base64url=r=>t.check(C._base64url(f.ZodBase64URL,r)),t.xid=r=>t.check(C._xid(f.ZodXID,r)),t.ksuid=r=>t.check(C._ksuid(f.ZodKSUID,r)),t.ipv4=r=>t.check(C._ipv4(f.ZodIPv4,r)),t.ipv6=r=>t.check(C._ipv6(f.ZodIPv6,r)),t.cidrv4=r=>t.check(C._cidrv4(f.ZodCIDRv4,r)),t.cidrv6=r=>t.check(C._cidrv6(f.ZodCIDRv6,r)),t.e164=r=>t.check(C._e164(f.ZodE164,r)),t.datetime=r=>t.check(Hh.datetime(r)),t.date=r=>t.check(Hh.date(r)),t.time=r=>t.check(Hh.time(r)),t.duration=r=>t.check(Hh.duration(r))});function Yh(t){return C._string(f.ZodString,t)}f.ZodStringFormat=C.$constructor("ZodStringFormat",(t,e)=>{C.$ZodStringFormat.init(t,e),f._ZodString.init(t,e)});f.ZodEmail=C.$constructor("ZodEmail",(t,e)=>{C.$ZodEmail.init(t,e),f.ZodStringFormat.init(t,e)});function Lue(t){return C._email(f.ZodEmail,t)}f.ZodGUID=C.$constructor("ZodGUID",(t,e)=>{C.$ZodGUID.init(t,e),f.ZodStringFormat.init(t,e)});function Pue(t){return C._guid(f.ZodGUID,t)}f.ZodUUID=C.$constructor("ZodUUID",(t,e)=>{C.$ZodUUID.init(t,e),f.ZodStringFormat.init(t,e)});function Fue(t){return C._uuid(f.ZodUUID,t)}function $ue(t){return C._uuidv4(f.ZodUUID,t)}function jue(t){return C._uuidv6(f.ZodUUID,t)}function que(t){return C._uuidv7(f.ZodUUID,t)}f.ZodURL=C.$constructor("ZodURL",(t,e)=>{C.$ZodURL.init(t,e),f.ZodStringFormat.init(t,e)});function zue(t){return C._url(f.ZodURL,t)}function Gue(t){return C._url(f.ZodURL,{protocol:C.regexes.httpProtocol,hostname:C.regexes.domain,...ve.util.normalizeParams(t)})}f.ZodEmoji=C.$constructor("ZodEmoji",(t,e)=>{C.$ZodEmoji.init(t,e),f.ZodStringFormat.init(t,e)});function Hue(t){return C._emoji(f.ZodEmoji,t)}f.ZodNanoID=C.$constructor("ZodNanoID",(t,e)=>{C.$ZodNanoID.init(t,e),f.ZodStringFormat.init(t,e)});function Yue(t){return C._nanoid(f.ZodNanoID,t)}f.ZodCUID=C.$constructor("ZodCUID",(t,e)=>{C.$ZodCUID.init(t,e),f.ZodStringFormat.init(t,e)});function Vue(t){return C._cuid(f.ZodCUID,t)}f.ZodCUID2=C.$constructor("ZodCUID2",(t,e)=>{C.$ZodCUID2.init(t,e),f.ZodStringFormat.init(t,e)});function Jue(t){return C._cuid2(f.ZodCUID2,t)}f.ZodULID=C.$constructor("ZodULID",(t,e)=>{C.$ZodULID.init(t,e),f.ZodStringFormat.init(t,e)});function Wue(t){return C._ulid(f.ZodULID,t)}f.ZodXID=C.$constructor("ZodXID",(t,e)=>{C.$ZodXID.init(t,e),f.ZodStringFormat.init(t,e)});function Zue(t){return C._xid(f.ZodXID,t)}f.ZodKSUID=C.$constructor("ZodKSUID",(t,e)=>{C.$ZodKSUID.init(t,e),f.ZodStringFormat.init(t,e)});function Kue(t){return C._ksuid(f.ZodKSUID,t)}f.ZodIPv4=C.$constructor("ZodIPv4",(t,e)=>{C.$ZodIPv4.init(t,e),f.ZodStringFormat.init(t,e)});function Xue(t){return C._ipv4(f.ZodIPv4,t)}f.ZodMAC=C.$constructor("ZodMAC",(t,e)=>{C.$ZodMAC.init(t,e),f.ZodStringFormat.init(t,e)});function ele(t){return C._mac(f.ZodMAC,t)}f.ZodIPv6=C.$constructor("ZodIPv6",(t,e)=>{C.$ZodIPv6.init(t,e),f.ZodStringFormat.init(t,e)});function tle(t){return C._ipv6(f.ZodIPv6,t)}f.ZodCIDRv4=C.$constructor("ZodCIDRv4",(t,e)=>{C.$ZodCIDRv4.init(t,e),f.ZodStringFormat.init(t,e)});function rle(t){return C._cidrv4(f.ZodCIDRv4,t)}f.ZodCIDRv6=C.$constructor("ZodCIDRv6",(t,e)=>{C.$ZodCIDRv6.init(t,e),f.ZodStringFormat.init(t,e)});function nle(t){return C._cidrv6(f.ZodCIDRv6,t)}f.ZodBase64=C.$constructor("ZodBase64",(t,e)=>{C.$ZodBase64.init(t,e),f.ZodStringFormat.init(t,e)});function ile(t){return C._base64(f.ZodBase64,t)}f.ZodBase64URL=C.$constructor("ZodBase64URL",(t,e)=>{C.$ZodBase64URL.init(t,e),f.ZodStringFormat.init(t,e)});function ole(t){return C._base64url(f.ZodBase64URL,t)}f.ZodE164=C.$constructor("ZodE164",(t,e)=>{C.$ZodE164.init(t,e),f.ZodStringFormat.init(t,e)});function sle(t){return C._e164(f.ZodE164,t)}f.ZodJWT=C.$constructor("ZodJWT",(t,e)=>{C.$ZodJWT.init(t,e),f.ZodStringFormat.init(t,e)});function ale(t){return C._jwt(f.ZodJWT,t)}f.ZodCustomStringFormat=C.$constructor("ZodCustomStringFormat",(t,e)=>{C.$ZodCustomStringFormat.init(t,e),f.ZodStringFormat.init(t,e)});function cle(t,e,r={}){return C._stringFormat(f.ZodCustomStringFormat,t,e,r)}function ule(t){return C._stringFormat(f.ZodCustomStringFormat,"hostname",C.regexes.hostname,t)}function lle(t){return C._stringFormat(f.ZodCustomStringFormat,"hex",C.regexes.hex,t)}function dle(t,e){let r=e?.enc??"hex",n=`${t}_${r}`,i=C.regexes[n];if(!i)throw new Error(`Unrecognized hash format: ${n}`);return C._stringFormat(f.ZodCustomStringFormat,n,i,e)}f.ZodNumber=C.$constructor("ZodNumber",(t,e)=>{C.$ZodNumber.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(n,i,o)=>Se.numberProcessor(t,n,i,o),Cd(t,"ZodNumber",{gt(n,i){return this.check(me.gt(n,i))},gte(n,i){return this.check(me.gte(n,i))},min(n,i){return this.check(me.gte(n,i))},lt(n,i){return this.check(me.lt(n,i))},lte(n,i){return this.check(me.lte(n,i))},max(n,i){return this.check(me.lte(n,i))},int(n){return this.check(ab(n))},safe(n){return this.check(ab(n))},positive(n){return this.check(me.gt(0,n))},nonnegative(n){return this.check(me.gte(0,n))},negative(n){return this.check(me.lt(0,n))},nonpositive(n){return this.check(me.lte(0,n))},multipleOf(n,i){return this.check(me.multipleOf(n,i))},step(n,i){return this.check(me.multipleOf(n,i))},finite(){return this}});let r=t._zod.bag;t.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,t.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,t.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),t.isFinite=!0,t.format=r.format??null});function XU(t){return C._number(f.ZodNumber,t)}f.ZodNumberFormat=C.$constructor("ZodNumberFormat",(t,e)=>{C.$ZodNumberFormat.init(t,e),f.ZodNumber.init(t,e)});function ab(t){return C._int(f.ZodNumberFormat,t)}function Ale(t){return C._float32(f.ZodNumberFormat,t)}function ple(t){return C._float64(f.ZodNumberFormat,t)}function fle(t){return C._int32(f.ZodNumberFormat,t)}function hle(t){return C._uint32(f.ZodNumberFormat,t)}f.ZodBoolean=C.$constructor("ZodBoolean",(t,e)=>{C.$ZodBoolean.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.booleanProcessor(t,r,n,i)});function eM(t){return C._boolean(f.ZodBoolean,t)}f.ZodBigInt=C.$constructor("ZodBigInt",(t,e)=>{C.$ZodBigInt.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(n,i,o)=>Se.bigintProcessor(t,n,i,o),t.gte=(n,i)=>t.check(me.gte(n,i)),t.min=(n,i)=>t.check(me.gte(n,i)),t.gt=(n,i)=>t.check(me.gt(n,i)),t.gte=(n,i)=>t.check(me.gte(n,i)),t.min=(n,i)=>t.check(me.gte(n,i)),t.lt=(n,i)=>t.check(me.lt(n,i)),t.lte=(n,i)=>t.check(me.lte(n,i)),t.max=(n,i)=>t.check(me.lte(n,i)),t.positive=n=>t.check(me.gt(BigInt(0),n)),t.negative=n=>t.check(me.lt(BigInt(0),n)),t.nonpositive=n=>t.check(me.lte(BigInt(0),n)),t.nonnegative=n=>t.check(me.gte(BigInt(0),n)),t.multipleOf=(n,i)=>t.check(me.multipleOf(n,i));let r=t._zod.bag;t.minValue=r.minimum??null,t.maxValue=r.maximum??null,t.format=r.format??null});function gle(t){return C._bigint(f.ZodBigInt,t)}f.ZodBigIntFormat=C.$constructor("ZodBigIntFormat",(t,e)=>{C.$ZodBigIntFormat.init(t,e),f.ZodBigInt.init(t,e)});function mle(t){return C._int64(f.ZodBigIntFormat,t)}function yle(t){return C._uint64(f.ZodBigIntFormat,t)}f.ZodSymbol=C.$constructor("ZodSymbol",(t,e)=>{C.$ZodSymbol.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.symbolProcessor(t,r,n,i)});function Ele(t){return C._symbol(f.ZodSymbol,t)}f.ZodUndefined=C.$constructor("ZodUndefined",(t,e)=>{C.$ZodUndefined.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.undefinedProcessor(t,r,n,i)});function Ile(t){return C._undefined(f.ZodUndefined,t)}f.ZodNull=C.$constructor("ZodNull",(t,e)=>{C.$ZodNull.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.nullProcessor(t,r,n,i)});function tM(t){return C._null(f.ZodNull,t)}f.ZodAny=C.$constructor("ZodAny",(t,e)=>{C.$ZodAny.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.anyProcessor(t,r,n,i)});function Cle(){return C._any(f.ZodAny)}f.ZodUnknown=C.$constructor("ZodUnknown",(t,e)=>{C.$ZodUnknown.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.unknownProcessor(t,r,n,i)});function eu(){return C._unknown(f.ZodUnknown)}f.ZodNever=C.$constructor("ZodNever",(t,e)=>{C.$ZodNever.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.neverProcessor(t,r,n,i)});function ub(t){return C._never(f.ZodNever,t)}f.ZodVoid=C.$constructor("ZodVoid",(t,e)=>{C.$ZodVoid.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.voidProcessor(t,r,n,i)});function ble(t){return C._void(f.ZodVoid,t)}f.ZodDate=C.$constructor("ZodDate",(t,e)=>{C.$ZodDate.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(n,i,o)=>Se.dateProcessor(t,n,i,o),t.min=(n,i)=>t.check(me.gte(n,i)),t.max=(n,i)=>t.check(me.lte(n,i));let r=t._zod.bag;t.minDate=r.minimum?new Date(r.minimum):null,t.maxDate=r.maximum?new Date(r.maximum):null});function Sle(t){return C._date(f.ZodDate,t)}f.ZodArray=C.$constructor("ZodArray",(t,e)=>{C.$ZodArray.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.arrayProcessor(t,r,n,i),t.element=e.element,Cd(t,"ZodArray",{min(r,n){return this.check(me.minLength(r,n))},nonempty(r){return this.check(me.minLength(1,r))},max(r,n){return this.check(me.maxLength(r,n))},length(r,n){return this.check(me.length(r,n))},unwrap(){return this.element}})});function Wh(t,e){return C._array(f.ZodArray,t,e)}function wle(t){let e=t._zod.def.shape;return db(Object.keys(e))}f.ZodObject=C.$constructor("ZodObject",(t,e)=>{C.$ZodObjectJIT.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.objectProcessor(t,r,n,i),ve.util.defineLazy(t,"shape",()=>e.shape),Cd(t,"ZodObject",{keyof(){return db(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:eu()})},loose(){return this.clone({...this._zod.def,catchall:eu()})},strict(){return this.clone({...this._zod.def,catchall:ub()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return ve.util.extend(this,r)},safeExtend(r){return ve.util.safeExtend(this,r)},merge(r){return ve.util.merge(this,r)},pick(r){return ve.util.pick(this,r)},omit(r){return ve.util.omit(this,r)},partial(...r){return ve.util.partial(f.ZodOptional,this,r[0])},required(...r){return ve.util.required(f.ZodNonOptional,this,r[0])}})});function Ble(t,e){let r={type:"object",shape:t??{},...ve.util.normalizeParams(e)};return new f.ZodObject(r)}function Qle(t,e){return new f.ZodObject({type:"object",shape:t,catchall:ub(),...ve.util.normalizeParams(e)})}function vle(t,e){return new f.ZodObject({type:"object",shape:t,catchall:eu(),...ve.util.normalizeParams(e)})}f.ZodUnion=C.$constructor("ZodUnion",(t,e)=>{C.$ZodUnion.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.unionProcessor(t,r,n,i),t.options=e.options});function lb(t,e){return new f.ZodUnion({type:"union",options:t,...ve.util.normalizeParams(e)})}f.ZodXor=C.$constructor("ZodXor",(t,e)=>{f.ZodUnion.init(t,e),C.$ZodXor.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.unionProcessor(t,r,n,i),t.options=e.options});function _le(t,e){return new f.ZodXor({type:"union",options:t,inclusive:!1,...ve.util.normalizeParams(e)})}f.ZodDiscriminatedUnion=C.$constructor("ZodDiscriminatedUnion",(t,e)=>{f.ZodUnion.init(t,e),C.$ZodDiscriminatedUnion.init(t,e)});function Dle(t,e,r){return new f.ZodDiscriminatedUnion({type:"union",options:e,discriminator:t,...ve.util.normalizeParams(r)})}f.ZodIntersection=C.$constructor("ZodIntersection",(t,e)=>{C.$ZodIntersection.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.intersectionProcessor(t,r,n,i)});function rM(t,e){return new f.ZodIntersection({type:"intersection",left:t,right:e})}f.ZodTuple=C.$constructor("ZodTuple",(t,e)=>{C.$ZodTuple.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.tupleProcessor(t,r,n,i),t.rest=r=>t.clone({...t._zod.def,rest:r})});function nM(t,e,r){let n=e instanceof C.$ZodType,i=n?r:e,o=n?e:null;return new f.ZodTuple({type:"tuple",items:t,rest:o,...ve.util.normalizeParams(i)})}f.ZodRecord=C.$constructor("ZodRecord",(t,e)=>{C.$ZodRecord.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.recordProcessor(t,r,n,i),t.keyType=e.keyType,t.valueType=e.valueType});function iM(t,e,r){return!e||!e._zod?new f.ZodRecord({type:"record",keyType:Yh(),valueType:t,...ve.util.normalizeParams(e)}):new f.ZodRecord({type:"record",keyType:t,valueType:e,...ve.util.normalizeParams(r)})}function Tle(t,e,r){let n=C.clone(t);return n._zod.values=void 0,new f.ZodRecord({type:"record",keyType:n,valueType:e,...ve.util.normalizeParams(r)})}function Rle(t,e,r){return new f.ZodRecord({type:"record",keyType:t,valueType:e,mode:"loose",...ve.util.normalizeParams(r)})}f.ZodMap=C.$constructor("ZodMap",(t,e)=>{C.$ZodMap.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.mapProcessor(t,r,n,i),t.keyType=e.keyType,t.valueType=e.valueType,t.min=(...r)=>t.check(C._minSize(...r)),t.nonempty=r=>t.check(C._minSize(1,r)),t.max=(...r)=>t.check(C._maxSize(...r)),t.size=(...r)=>t.check(C._size(...r))});function kle(t,e,r){return new f.ZodMap({type:"map",keyType:t,valueType:e,...ve.util.normalizeParams(r)})}f.ZodSet=C.$constructor("ZodSet",(t,e)=>{C.$ZodSet.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.setProcessor(t,r,n,i),t.min=(...r)=>t.check(C._minSize(...r)),t.nonempty=r=>t.check(C._minSize(1,r)),t.max=(...r)=>t.check(C._maxSize(...r)),t.size=(...r)=>t.check(C._size(...r))});function Nle(t,e){return new f.ZodSet({type:"set",valueType:t,...ve.util.normalizeParams(e)})}f.ZodEnum=C.$constructor("ZodEnum",(t,e)=>{C.$ZodEnum.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(n,i,o)=>Se.enumProcessor(t,n,i,o),t.enum=e.entries,t.options=Object.values(e.entries);let r=new Set(Object.keys(e.entries));t.extract=(n,i)=>{let o={};for(let s of n)if(r.has(s))o[s]=e.entries[s];else throw new Error(`Key ${s} not found in enum`);return new f.ZodEnum({...e,checks:[],...ve.util.normalizeParams(i),entries:o})},t.exclude=(n,i)=>{let o={...e.entries};for(let s of n)if(r.has(s))delete o[s];else throw new Error(`Key ${s} not found in enum`);return new f.ZodEnum({...e,checks:[],...ve.util.normalizeParams(i),entries:o})}});function db(t,e){let r=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new f.ZodEnum({type:"enum",entries:r,...ve.util.normalizeParams(e)})}function Ole(t,e){return new f.ZodEnum({type:"enum",entries:t,...ve.util.normalizeParams(e)})}f.ZodLiteral=C.$constructor("ZodLiteral",(t,e)=>{C.$ZodLiteral.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.literalProcessor(t,r,n,i),t.values=new Set(e.values),Object.defineProperty(t,"value",{get(){if(e.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return e.values[0]}})});function Ule(t,e){return new f.ZodLiteral({type:"literal",values:Array.isArray(t)?t:[t],...ve.util.normalizeParams(e)})}f.ZodFile=C.$constructor("ZodFile",(t,e)=>{C.$ZodFile.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.fileProcessor(t,r,n,i),t.min=(r,n)=>t.check(C._minSize(r,n)),t.max=(r,n)=>t.check(C._maxSize(r,n)),t.mime=(r,n)=>t.check(C._mime(Array.isArray(r)?r:[r],n))});function Mle(t){return C._file(f.ZodFile,t)}f.ZodTransform=C.$constructor("ZodTransform",(t,e)=>{C.$ZodTransform.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.transformProcessor(t,r,n,i),t._zod.parse=(r,n)=>{if(n.direction==="backward")throw new C.$ZodEncodeError(t.constructor.name);r.addIssue=o=>{if(typeof o=="string")r.issues.push(ve.util.issue(o,r.value,e));else{let s=o;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=t),r.issues.push(ve.util.issue(s))}};let i=e.transform(r.value,r);return i instanceof Promise?i.then(o=>(r.value=o,r.fallback=!0,r)):(r.value=i,r.fallback=!0,r)}});function Ab(t){return new f.ZodTransform({type:"transform",transform:t})}f.ZodOptional=C.$constructor("ZodOptional",(t,e)=>{C.$ZodOptional.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.optionalProcessor(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function Vh(t){return new f.ZodOptional({type:"optional",innerType:t})}f.ZodExactOptional=C.$constructor("ZodExactOptional",(t,e)=>{C.$ZodExactOptional.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.optionalProcessor(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function oM(t){return new f.ZodExactOptional({type:"optional",innerType:t})}f.ZodNullable=C.$constructor("ZodNullable",(t,e)=>{C.$ZodNullable.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.nullableProcessor(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function Jh(t){return new f.ZodNullable({type:"nullable",innerType:t})}function xle(t){return Vh(Jh(t))}f.ZodDefault=C.$constructor("ZodDefault",(t,e)=>{C.$ZodDefault.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.defaultProcessor(t,r,n,i),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function sM(t,e){return new f.ZodDefault({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():ve.util.shallowClone(e)}})}f.ZodPrefault=C.$constructor("ZodPrefault",(t,e)=>{C.$ZodPrefault.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.prefaultProcessor(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function aM(t,e){return new f.ZodPrefault({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():ve.util.shallowClone(e)}})}f.ZodNonOptional=C.$constructor("ZodNonOptional",(t,e)=>{C.$ZodNonOptional.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.nonoptionalProcessor(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function cM(t,e){return new f.ZodNonOptional({type:"nonoptional",innerType:t,...ve.util.normalizeParams(e)})}f.ZodSuccess=C.$constructor("ZodSuccess",(t,e)=>{C.$ZodSuccess.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.successProcessor(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function Lle(t){return new f.ZodSuccess({type:"success",innerType:t})}f.ZodCatch=C.$constructor("ZodCatch",(t,e)=>{C.$ZodCatch.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.catchProcessor(t,r,n,i),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function uM(t,e){return new f.ZodCatch({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}f.ZodNaN=C.$constructor("ZodNaN",(t,e)=>{C.$ZodNaN.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.nanProcessor(t,r,n,i)});function Ple(t){return C._nan(f.ZodNaN,t)}f.ZodPipe=C.$constructor("ZodPipe",(t,e)=>{C.$ZodPipe.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.pipeProcessor(t,r,n,i),t.in=e.in,t.out=e.out});function cb(t,e){return new f.ZodPipe({type:"pipe",in:t,out:e})}f.ZodCodec=C.$constructor("ZodCodec",(t,e)=>{f.ZodPipe.init(t,e),C.$ZodCodec.init(t,e)});function Fle(t,e,r){return new f.ZodCodec({type:"pipe",in:t,out:e,transform:r.decode,reverseTransform:r.encode})}function $le(t){let e=t._zod.def;return new f.ZodCodec({type:"pipe",in:e.out,out:e.in,transform:e.reverseTransform,reverseTransform:e.transform})}f.ZodPreprocess=C.$constructor("ZodPreprocess",(t,e)=>{f.ZodPipe.init(t,e),C.$ZodPreprocess.init(t,e)});f.ZodReadonly=C.$constructor("ZodReadonly",(t,e)=>{C.$ZodReadonly.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.readonlyProcessor(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function lM(t){return new f.ZodReadonly({type:"readonly",innerType:t})}f.ZodTemplateLiteral=C.$constructor("ZodTemplateLiteral",(t,e)=>{C.$ZodTemplateLiteral.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.templateLiteralProcessor(t,r,n,i)});function jle(t,e){return new f.ZodTemplateLiteral({type:"template_literal",parts:t,...ve.util.normalizeParams(e)})}f.ZodLazy=C.$constructor("ZodLazy",(t,e)=>{C.$ZodLazy.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.lazyProcessor(t,r,n,i),t.unwrap=()=>t._zod.def.getter()});function dM(t){return new f.ZodLazy({type:"lazy",getter:t})}f.ZodPromise=C.$constructor("ZodPromise",(t,e)=>{C.$ZodPromise.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.promiseProcessor(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function qle(t){return new f.ZodPromise({type:"promise",innerType:t})}f.ZodFunction=C.$constructor("ZodFunction",(t,e)=>{C.$ZodFunction.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.functionProcessor(t,r,n,i)});function Zh(t){return new f.ZodFunction({type:"function",input:Array.isArray(t?.input)?nM(t?.input):t?.input??Wh(eu()),output:t?.output??eu()})}f.ZodCustom=C.$constructor("ZodCustom",(t,e)=>{C.$ZodCustom.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.customProcessor(t,r,n,i)});function zle(t){let e=new C.$ZodCheck({check:"custom"});return e._zod.check=t,e}function Gle(t,e){return C._custom(f.ZodCustom,t??(()=>!0),e)}function AM(t,e={}){return C._refine(f.ZodCustom,t,e)}function pM(t,e){return C._superRefine(t,e)}f.describe=C.describe;f.meta=C.meta;function Hle(t,e={}){let r=new f.ZodCustom({type:"custom",check:"custom",fn:n=>n instanceof t,abort:!0,...ve.util.normalizeParams(e)});return r._zod.bag.Class=t,r._zod.check=n=>{n.value instanceof t||n.issues.push({code:"invalid_type",expected:t.name,input:n.value,inst:r,path:[...r._zod.def.path??[]]})},r}var Yle=(...t)=>C._stringbool({Codec:f.ZodCodec,Boolean:f.ZodBoolean,String:f.ZodString},...t);f.stringbool=Yle;function Vle(t){let e=dM(()=>lb([Yh(t),XU(),eM(),tM(),Wh(e),iM(Yh(),e)]));return e}function Jle(t,e){return new f.ZodPreprocess({type:"pipe",in:Ab(t),out:e})}});var mM=m(Ut=>{"use strict";var Wle=Ut&&Ut.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Zle=Ut&&Ut.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Kle=Ut&&Ut.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Wle(e,t,r);return Zle(e,t),e};Object.defineProperty(Ut,"__esModule",{value:!0});Ut.ZodFirstPartyTypeKind=Ut.config=Ut.$brand=Ut.ZodIssueCode=void 0;Ut.setErrorMap=Xle;Ut.getErrorMap=ede;var hM=Kle(mr());Ut.ZodIssueCode={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"};var gM=mr();Object.defineProperty(Ut,"$brand",{enumerable:!0,get:function(){return gM.$brand}});Object.defineProperty(Ut,"config",{enumerable:!0,get:function(){return gM.config}});function Xle(t){hM.config({customError:t})}function ede(){return hM.config().customError}var fM;fM||(Ut.ZodFirstPartyTypeKind=fM={})});var EM=m(ko=>{"use strict";var tde=ko&&ko.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),rde=ko&&ko.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),pb=ko&&ko.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&tde(e,t,r);return rde(e,t),e};Object.defineProperty(ko,"__esModule",{value:!0});ko.fromJSONSchema=lde;var nde=pd(),ide=pb(qh()),ode=pb(yd()),sde=pb(Ed()),z={...sde,...ide,iso:ode},ade=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function cde(t,e){let r=t.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":e??"draft-2020-12"}function ude(t,e){if(!t.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let r=t.slice(1).split("/").filter(Boolean);if(r.length===0)return e.rootSchema;let n=e.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===n){let i=r[1];if(!i||!e.defs[i])throw new Error(`Reference not found: ${t}`);return e.defs[i]}throw new Error(`Reference not found: ${t}`)}function yM(t,e){if(t.not!==void 0){if(typeof t.not=="object"&&Object.keys(t.not).length===0)return z.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(t.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(t.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(t.if!==void 0||t.then!==void 0||t.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(t.dependentSchemas!==void 0||t.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(t.$ref){let i=t.$ref;if(e.refs.has(i))return e.refs.get(i);if(e.processing.has(i))return z.lazy(()=>{if(!e.refs.has(i))throw new Error(`Circular reference not resolved: ${i}`);return e.refs.get(i)});e.processing.add(i);let o=ude(i,e),s=Yt(o,e);return e.refs.set(i,s),e.processing.delete(i),s}if(t.enum!==void 0){let i=t.enum;if(e.version==="openapi-3.0"&&t.nullable===!0&&i.length===1&&i[0]===null)return z.null();if(i.length===0)return z.never();if(i.length===1)return z.literal(i[0]);if(i.every(s=>typeof s=="string"))return z.enum(i);let o=i.map(s=>z.literal(s));return o.length<2?o[0]:z.union([o[0],o[1],...o.slice(2)])}if(t.const!==void 0)return z.literal(t.const);let r=t.type;if(Array.isArray(r)){let i=r.map(o=>{let s={...t,type:o};return yM(s,e)});return i.length===0?z.never():i.length===1?i[0]:z.union(i)}if(!r)return z.any();let n;switch(r){case"string":{let i=z.string();if(t.format){let o=t.format;o==="email"?i=i.check(z.email()):o==="uri"||o==="uri-reference"?i=i.check(z.url()):o==="uuid"||o==="guid"?i=i.check(z.uuid()):o==="date-time"?i=i.check(z.iso.datetime()):o==="date"?i=i.check(z.iso.date()):o==="time"?i=i.check(z.iso.time()):o==="duration"?i=i.check(z.iso.duration()):o==="ipv4"?i=i.check(z.ipv4()):o==="ipv6"?i=i.check(z.ipv6()):o==="mac"?i=i.check(z.mac()):o==="cidr"?i=i.check(z.cidrv4()):o==="cidr-v6"?i=i.check(z.cidrv6()):o==="base64"?i=i.check(z.base64()):o==="base64url"?i=i.check(z.base64url()):o==="e164"?i=i.check(z.e164()):o==="jwt"?i=i.check(z.jwt()):o==="emoji"?i=i.check(z.emoji()):o==="nanoid"?i=i.check(z.nanoid()):o==="cuid"?i=i.check(z.cuid()):o==="cuid2"?i=i.check(z.cuid2()):o==="ulid"?i=i.check(z.ulid()):o==="xid"?i=i.check(z.xid()):o==="ksuid"&&(i=i.check(z.ksuid()))}typeof t.minLength=="number"&&(i=i.min(t.minLength)),typeof t.maxLength=="number"&&(i=i.max(t.maxLength)),t.pattern&&(i=i.regex(new RegExp(t.pattern))),n=i;break}case"number":case"integer":{let i=r==="integer"?z.number().int():z.number();typeof t.minimum=="number"&&(i=i.min(t.minimum)),typeof t.maximum=="number"&&(i=i.max(t.maximum)),typeof t.exclusiveMinimum=="number"?i=i.gt(t.exclusiveMinimum):t.exclusiveMinimum===!0&&typeof t.minimum=="number"&&(i=i.gt(t.minimum)),typeof t.exclusiveMaximum=="number"?i=i.lt(t.exclusiveMaximum):t.exclusiveMaximum===!0&&typeof t.maximum=="number"&&(i=i.lt(t.maximum)),typeof t.multipleOf=="number"&&(i=i.multipleOf(t.multipleOf)),n=i;break}case"boolean":{n=z.boolean();break}case"null":{n=z.null();break}case"object":{let i={},o=t.properties||{},s=new Set(t.required||[]);for(let[c,u]of Object.entries(o)){let l=Yt(u,e);i[c]=s.has(c)?l:l.optional()}if(t.propertyNames){let c=Yt(t.propertyNames,e),u=t.additionalProperties&&typeof t.additionalProperties=="object"?Yt(t.additionalProperties,e):z.any();if(Object.keys(i).length===0){n=z.record(c,u);break}let l=z.object(i).passthrough(),d=z.looseRecord(c,u);n=z.intersection(l,d);break}if(t.patternProperties){let c=t.patternProperties,u=Object.keys(c),l=[];for(let A of u){let p=Yt(c[A],e),h=z.string().regex(new RegExp(A));l.push(z.looseRecord(h,p))}let d=[];if(Object.keys(i).length>0&&d.push(z.object(i).passthrough()),d.push(...l),d.length===0)n=z.object({}).passthrough();else if(d.length===1)n=d[0];else{let A=z.intersection(d[0],d[1]);for(let p=2;p<d.length;p++)A=z.intersection(A,d[p]);n=A}break}let a=z.object(i);t.additionalProperties===!1?n=a.strict():typeof t.additionalProperties=="object"?n=a.catchall(Yt(t.additionalProperties,e)):n=a.passthrough();break}case"array":{let i=t.prefixItems,o=t.items;if(i&&Array.isArray(i)){let s=i.map(c=>Yt(c,e)),a=o&&typeof o=="object"&&!Array.isArray(o)?Yt(o,e):void 0;a?n=z.tuple(s).rest(a):n=z.tuple(s),typeof t.minItems=="number"&&(n=n.check(z.minLength(t.minItems))),typeof t.maxItems=="number"&&(n=n.check(z.maxLength(t.maxItems)))}else if(Array.isArray(o)){let s=o.map(c=>Yt(c,e)),a=t.additionalItems&&typeof t.additionalItems=="object"?Yt(t.additionalItems,e):void 0;a?n=z.tuple(s).rest(a):n=z.tuple(s),typeof t.minItems=="number"&&(n=n.check(z.minLength(t.minItems))),typeof t.maxItems=="number"&&(n=n.check(z.maxLength(t.maxItems)))}else if(o!==void 0){let s=Yt(o,e),a=z.array(s);typeof t.minItems=="number"&&(a=a.min(t.minItems)),typeof t.maxItems=="number"&&(a=a.max(t.maxItems)),n=a}else n=z.array(z.any());break}default:throw new Error(`Unsupported type: ${r}`)}return n}function Yt(t,e){if(typeof t=="boolean")return t?z.any():z.never();let r=yM(t,e),n=t.type||t.enum!==void 0||t.const!==void 0;if(t.anyOf&&Array.isArray(t.anyOf)){let a=t.anyOf.map(u=>Yt(u,e)),c=z.union(a);r=n?z.intersection(r,c):c}if(t.oneOf&&Array.isArray(t.oneOf)){let a=t.oneOf.map(u=>Yt(u,e)),c=z.xor(a);r=n?z.intersection(r,c):c}if(t.allOf&&Array.isArray(t.allOf))if(t.allOf.length===0)r=n?r:z.any();else{let a=n?r:Yt(t.allOf[0],e),c=n?0:1;for(let u=c;u<t.allOf.length;u++)a=z.intersection(a,Yt(t.allOf[u],e));r=a}t.nullable===!0&&e.version==="openapi-3.0"&&(r=z.nullable(r)),t.readOnly===!0&&(r=z.readonly(r)),t.default!==void 0&&(r=r.default(t.default));let i={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let a of o)a in t&&(i[a]=t[a]);let s=["contentEncoding","contentMediaType","contentSchema"];for(let a of s)a in t&&(i[a]=t[a]);for(let a of Object.keys(t))ade.has(a)||(i[a]=t[a]);return Object.keys(i).length>0&&e.registry.add(r,i),t.description&&(r=r.describe(t.description)),r}function lde(t,e){if(typeof t=="boolean")return t?z.any():z.never();let r;try{r=JSON.parse(JSON.stringify(t))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let n=cde(r,e?.defaultTarget),i=r.$defs||r.definitions||{},o={version:n,defs:i,refs:new Map,processing:new Set,rootSchema:r,registry:e?.registry??nde.globalRegistry};return Yt(r,o)}});var CM=m(xr=>{"use strict";var dde=xr&&xr.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Ade=xr&&xr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),IM=xr&&xr.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&dde(e,t,r);return Ade(e,t),e};Object.defineProperty(xr,"__esModule",{value:!0});xr.string=pde;xr.number=fde;xr.boolean=hde;xr.bigint=gde;xr.date=mde;var bd=IM(mr()),Sd=IM(Ed());function pde(t){return bd._coercedString(Sd.ZodString,t)}function fde(t){return bd._coercedNumber(Sd.ZodNumber,t)}function hde(t){return bd._coercedBoolean(Sd.ZodBoolean,t)}function gde(t){return bd._coercedBigint(Sd.ZodBigInt,t)}function mde(t){return bd._coercedDate(Sd.ZodDate,t)}});var fb=m(W=>{"use strict";var bM=W&&W.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),yde=W&&W.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Kh=W&&W.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&bM(e,t,r);return yde(e,t),e},wd=W&&W.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&bM(e,t,r)},Ede=W&&W.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(W,"__esModule",{value:!0});W.coerce=W.iso=W.ZodISODuration=W.ZodISOTime=W.ZodISODate=W.ZodISODateTime=W.locales=W.fromJSONSchema=W.toJSONSchema=W.NEVER=W.util=W.TimePrecision=W.flattenError=W.formatError=W.prettifyError=W.treeifyError=W.regexes=W.clone=W.$brand=W.$input=W.$output=W.config=W.registry=W.globalRegistry=W.core=void 0;W.core=Kh(mr());wd(Ed(),W);wd(qh(),W);wd(ib(),W);wd(ob(),W);wd(mM(),W);var Ide=mr(),Cde=Ede(WC());(0,Ide.config)((0,Cde.default)());var or=mr();Object.defineProperty(W,"globalRegistry",{enumerable:!0,get:function(){return or.globalRegistry}});Object.defineProperty(W,"registry",{enumerable:!0,get:function(){return or.registry}});Object.defineProperty(W,"config",{enumerable:!0,get:function(){return or.config}});Object.defineProperty(W,"$output",{enumerable:!0,get:function(){return or.$output}});Object.defineProperty(W,"$input",{enumerable:!0,get:function(){return or.$input}});Object.defineProperty(W,"$brand",{enumerable:!0,get:function(){return or.$brand}});Object.defineProperty(W,"clone",{enumerable:!0,get:function(){return or.clone}});Object.defineProperty(W,"regexes",{enumerable:!0,get:function(){return or.regexes}});Object.defineProperty(W,"treeifyError",{enumerable:!0,get:function(){return or.treeifyError}});Object.defineProperty(W,"prettifyError",{enumerable:!0,get:function(){return or.prettifyError}});Object.defineProperty(W,"formatError",{enumerable:!0,get:function(){return or.formatError}});Object.defineProperty(W,"flattenError",{enumerable:!0,get:function(){return or.flattenError}});Object.defineProperty(W,"TimePrecision",{enumerable:!0,get:function(){return or.TimePrecision}});Object.defineProperty(W,"util",{enumerable:!0,get:function(){return or.util}});Object.defineProperty(W,"NEVER",{enumerable:!0,get:function(){return or.NEVER}});var bde=md();Object.defineProperty(W,"toJSONSchema",{enumerable:!0,get:function(){return bde.toJSONSchema}});var Sde=EM();Object.defineProperty(W,"fromJSONSchema",{enumerable:!0,get:function(){return Sde.fromJSONSchema}});W.locales=Kh(XC());var Xh=yd();Object.defineProperty(W,"ZodISODateTime",{enumerable:!0,get:function(){return Xh.ZodISODateTime}});Object.defineProperty(W,"ZodISODate",{enumerable:!0,get:function(){return Xh.ZodISODate}});Object.defineProperty(W,"ZodISOTime",{enumerable:!0,get:function(){return Xh.ZodISOTime}});Object.defineProperty(W,"ZodISODuration",{enumerable:!0,get:function(){return Xh.ZodISODuration}});W.iso=Kh(yd());W.coerce=Kh(CM())});var Bd=m(yr=>{"use strict";var SM=yr&&yr.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),wde=yr&&yr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Bde=yr&&yr.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&SM(e,t,r);return wde(e,t),e},Qde=yr&&yr.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&SM(e,t,r)};Object.defineProperty(yr,"__esModule",{value:!0});yr.z=void 0;var wM=Bde(fb());yr.z=wM;Qde(fb(),yr);yr.default=wM});var hb=m(No=>{"use strict";Object.defineProperty(No,"__esModule",{value:!0});No.PROJECT_LIMITS=No.PROJECT_TASK_STATUSES=No.PROJECT_RESOURCE_TYPES=void 0;No.projectResourceKey=vde;No.PROJECT_RESOURCE_TYPES=["system","playbook","artifact","file","tool"];No.PROJECT_TASK_STATUSES=["not_started","in_progress","waiting","done"];No.PROJECT_LIMITS={name:80,description:500,taskName:120,taskDescription:1e4,taskResources:100};function vde(t){return`${t.type}:${t.id}`}});var eg=m(Lr=>{"use strict";Object.defineProperty(Lr,"__esModule",{value:!0});Lr.RESOURCE_KINDS=Lr.RESOURCE_DEFINITIONS=void 0;Lr.isResourceKind=_de;Lr.getResourceDefinition=Dde;Lr.getResourceAppPath=Tde;Lr.RESOURCE_DEFINITIONS={tool:{label:"Tool",pluralLabel:"Tools",collectionKey:"tools",appPath:"/tools",hasDetailPage:!0,memberDefaultPermission:"editor",pickerDefaultPermission:"editor"},system:{label:"System",pluralLabel:"Systems",collectionKey:"systems",appPath:"/systems",hasDetailPage:!0,memberDefaultPermission:"editor",pickerDefaultPermission:"editor"},credential:{label:"Credential",pluralLabel:"Credentials",collectionKey:"credentials",appPath:"/credentials",hasDetailPage:!1,pickerDefaultPermission:"viewer"},playbook:{label:"Playbook",pluralLabel:"Playbooks",collectionKey:"playbooks",appPath:"/playbooks",hasDetailPage:!0,pickerDefaultPermission:"editor"},artifact:{label:"Artifact",pluralLabel:"Artifacts",collectionKey:"artifacts",appPath:"/artifacts",hasDetailPage:!0,pickerDefaultPermission:"editor"},file:{label:"File",pluralLabel:"Files",collectionKey:"files",appPath:"/files",hasDetailPage:!1,pickerDefaultPermission:"viewer"},project:{label:"Project",pluralLabel:"Projects",collectionKey:"projects",appPath:"/projects",hasDetailPage:!0,pickerDefaultPermission:"viewer"}};Lr.RESOURCE_KINDS=Object.keys(Lr.RESOURCE_DEFINITIONS);function _de(t){return typeof t=="string"&&Object.prototype.hasOwnProperty.call(Lr.RESOURCE_DEFINITIONS,t)}function Dde(t){return Lr.RESOURCE_DEFINITIONS[t]}function Tde(t,e){let r=Lr.RESOURCE_DEFINITIONS[t];return r.hasDetailPage?`${r.appPath}/${encodeURIComponent(e)}`:r.appPath}});var _M=m(wa=>{"use strict";Object.defineProperty(wa,"__esModule",{value:!0});wa.SDK_ERROR_DETAILS_SCHEMA=wa.SDK_OUTPUT_CONTRACTS=void 0;wa.toSdkJsonSchema=Ode;var E=Bd(),Rde=hb(),kde=eg(),Nde=pr();function Ode({schema:t}){return E.z.toJSONSchema(t,{target:"draft-7",io:"output",unrepresentable:"any"})}var BM=E.z.looseObject({statusCode:E.z.number(),headers:E.z.record(E.z.string(),E.z.union([E.z.string(),E.z.array(E.z.string())])),omittedHeaderCount:E.z.number().optional()}),QM=E.z.looseObject({vfsPath:E.z.string(),storedBytes:E.z.number(),originalOutputBytes:E.z.number(),storageTruncated:E.z.boolean()}),vM=E.z.object({action:E.z.enum(["approve","reject","oauth_success","oauth_failure"]),source:E.z.enum(["user","automatic"])});function zn(t){return E.z.looseObject({toolCallId:E.z.string(),toolName:E.z.string(),outcome:E.z.literal("success"),confirmation:vM.optional(),data:t})}var gb={http:BM.optional(),credential:E.z.looseObject({id:E.z.string(),name:E.z.string(),isOwner:E.z.boolean()}).optional().describe("The credential the call ran with."),auth:E.z.looseObject({applied:E.z.enum(["bearer","basic","explicit","none","unavailable"]),header:E.z.string().optional(),placeholders:E.z.array(E.z.string()),reason:E.z.string().optional()}).optional().describe("How authentication was sent: a default Bearer or Basic header, the request's own explicit placeholders, none, or unavailable with the reason. placeholders lists the credential's <<systemId_secretName>> strings."),credentialPlaceholders:E.z.looseObject({keys:E.z.array(E.z.string()),resolved:E.z.boolean()}).optional()},Ude=E.z.discriminatedUnion("protocol",[E.z.looseObject({protocol:E.z.enum(["postgres","odbc"]),data:E.z.array(E.z.record(E.z.string(),E.z.unknown())).describe("Returned database rows."),...gb}),E.z.looseObject({protocol:E.z.literal("mssql"),data:E.z.union([E.z.array(E.z.record(E.z.string(),E.z.unknown())),E.z.array(E.z.array(E.z.record(E.z.string(),E.z.unknown()))),E.z.looseObject({rowsAffected:E.z.array(E.z.number())})]).describe("One recordset, multiple recordsets, or affected row counts."),...gb}),E.z.looseObject({protocol:E.z.enum(Nde.CONNECTION_PROTOCOLS.filter(t=>t!=="postgres"&&t!=="mssql"&&t!=="odbc")),data:E.z.unknown().describe("Complete protocol response payload. Preserve sibling fields, including files and metadata; do not unwrap a nested data field."),...gb})]),Mde=E.z.union([E.z.looseObject({tools:E.z.array(E.z.unknown()).describe("All tools from every tools/list page, each with name and inputSchema.")}),E.z.looseObject({result:E.z.looseObject({content:E.z.array(E.z.unknown()).optional(),structuredContent:E.z.unknown().optional(),isError:E.z.boolean().optional()}).describe("The tools/call result with content blocks and optional structuredContent.")})]),xde=E.z.looseObject({url:E.z.string().describe("The requested URL."),status:E.z.number(),statusText:E.z.string(),headers:E.z.record(E.z.string(),E.z.string()),body:E.z.string().describe("Response body bytes, base64-encoded."),systemId:E.z.string().optional().describe("The system whose credential authenticated the request."),credential:E.z.looseObject({id:E.z.string(),name:E.z.string(),isOwner:E.z.boolean()}).optional().describe("The credential the request ran with.")}),Lde=E.z.looseObject({stepId:E.z.string(),success:E.z.boolean(),data:E.z.unknown().optional(),error:E.z.string().nullable().optional(),http:BM.optional(),stepFileKeys:E.z.array(E.z.string()).optional()}),Pde=E.z.looseObject({toolId:E.z.string(),success:E.z.boolean(),run:E.z.looseObject({id:E.z.string()}).optional(),data:E.z.unknown().optional().describe("Tool output, determined by its output transform."),error:E.z.string().optional(),stepResults:E.z.array(Lde),fileArtifacts:E.z.array(E.z.looseObject({fileKey:E.z.string(),filename:E.z.string(),contentType:E.z.string(),size:E.z.number(),downloadUrl:E.z.string().optional()})).optional(),warnings:E.z.array(E.z.string()).optional(),inputSchema:E.z.unknown().optional(),resultMetadata:QM.optional()}),Fde=zn(E.z.looseObject({resource:E.z.looseObject({id:E.z.string(),name:E.z.string().optional(),version:E.z.union([E.z.number(),E.z.string()]).optional()}),created:E.z.boolean(),projectId:E.z.string().optional(),addedFiles:E.z.array(E.z.looseObject({id:E.z.string(),fileName:E.z.string()})).optional(),projectAttribution:E.z.looseObject({attached:E.z.boolean(),projectId:E.z.string(),projectName:E.z.string().optional(),resource:E.z.looseObject({type:E.z.enum(Rde.PROJECT_RESOURCE_TYPES),id:E.z.string()}),error:E.z.string().optional()}).optional()}));wa.SDK_OUTPUT_CONTRACTS={assignSessionToProject:{name:"SuperglueSessionProjectResult",schema:zn(E.z.object({sessionId:E.z.string(),projectId:E.z.string().nullable()})),description:"Returns the saved session ID and project ID, or null when unassigned. Throws SuperglueError on failure."},callSystem:{name:"SuperglueCallSystemResult",schema:Ude,description:"Returns the complete protocol payload in data, available HTTP metadata, the credential used, and how authentication was sent. Throws SuperglueError on failure; details contains the canonical result and unprojected execution output."},callMcp:{name:"SuperglueCallMcpResult",schema:Mde,description:"Returns { tools } when tool is omitted, or { result } from tools/call. Throws SuperglueError on HTTP, JSON-RPC, or result.isError failures; details.result.data contains statusCode, rpcError, or the failed result."},systemFetch:{name:"SuperglueSystemFetchResult",schema:xde,description:"Returns the raw HTTP response: status, headers, and the base64 body. HTTP error statuses are returned, not thrown. Throws SuperglueError when the request cannot be authenticated or sent."},runTool:{name:"SuperglueRunToolResult",schema:Pde,description:"Returns successful tool output, step results, files, and available result reference. Throws SuperglueError on failure; details.result.data preserves this result shape with success: false, the error, and available run and step results. details.resultMetadata references the saved failed result when available."},writeResource:{name:"SuperglueWriteResult",schema:Fde,description:"Returns saved resource identity, creation status, and available project attribution or added files. Throws SuperglueError on failure."},installBundle:{name:"SuperglueBundleInstallResult",schema:zn(E.z.looseObject({bundleId:E.z.string(),system:E.z.looseObject({id:E.z.string(),name:E.z.string(),requiredCredentialKeys:E.z.array(E.z.string()),hasUserCredentials:E.z.boolean()}),tools:E.z.array(E.z.looseObject({id:E.z.string(),name:E.z.string().optional()})),mcpServer:E.z.looseObject({id:E.z.string(),name:E.z.string()}).optional(),playbook:E.z.looseObject({id:E.z.string(),name:E.z.string()}).optional()})),description:"Returns the installed system, tool, MCP server, and playbook identities, the secret names the user must supply, and whether the user has a complete credential. Throws SuperglueError on failure."},stopBackgroundJob:{name:"SuperglueStopBackgroundJobResult",schema:zn(E.z.looseObject({job:E.z.looseObject({id:E.z.string(),status:E.z.string(),elapsedMs:E.z.number(),exitCode:E.z.number().optional()})})),description:"Returns the job's status, run time, and exit code after it ended, or status running when the stop is still in progress. Throws SuperglueError when the session has no such running job."},setToolState:{name:"SuperglueToolStateResult",schema:zn(E.z.looseObject({resource:E.z.looseObject({id:E.z.string()}),action:E.z.enum(["set","reset"])})),description:"Returns the saved tool identity and state action. Throws SuperglueError on failure."},shareResource:{name:"SuperglueShareResult",schema:zn(E.z.looseObject({resource:E.z.looseObject({kind:E.z.enum(kde.RESOURCE_KINDS),id:E.z.string()})})),description:"Returns the shared resource identity. Throws SuperglueError on failure."},notifyUser:{name:"SuperglueNotifyResult",schema:zn(E.z.looseObject({actionCount:E.z.number()})),description:"Returns the notification action count. Throws SuperglueError on failure."},writeOrgSettings:{name:"SuperglueOrgSettingsResult",schema:zn(E.z.looseObject({updated:E.z.array(E.z.enum(["name","preferences","notifications"])),notificationTest:E.z.looseObject({channel:E.z.enum(["slack","email"]),sent:E.z.boolean(),error:E.z.string().optional()}).optional()})),description:"Returns updated settings and any notification test result. Throws SuperglueError on failure."},writeDesignSystem:{name:"SuperglueDesignSystemResult",schema:zn(E.z.looseObject({updated:E.z.array(E.z.enum(["tokens","guidelines","logo"])),added:E.z.array(E.z.looseObject({id:E.z.string(),kind:E.z.enum(["logo","font","template","reference"]),name:E.z.string()})),changed:E.z.array(E.z.string()),removed:E.z.array(E.z.string())})),description:"Returns the changed design-system parts and file ids. Throws SuperglueError on failure."},importDesignSystemFromUrl:{name:"SuperglueDesignSystemImportResult",schema:zn(E.z.looseObject({url:E.z.string(),title:E.z.string().nullable(),tokens:E.z.looseObject({}),palette:E.z.array(E.z.looseObject({color:E.z.string(),weight:E.z.number()})),fonts:E.z.array(E.z.looseObject({family:E.z.string(),usage:E.z.array(E.z.string()),source:E.z.string()})),fontFiles:E.z.array(E.z.looseObject({file:E.z.string(),family:E.z.string().describe("CSS family name the website uses"),roles:E.z.array(E.z.string()),weight:E.z.string(),style:E.z.enum(["normal","italic"])})),logos:E.z.array(E.z.looseObject({file:E.z.string(),source:E.z.string(),width:E.z.number(),height:E.z.number(),light:E.z.boolean().describe("Light artwork meant for dark backgrounds")})),screenshot:E.z.string().nullable()})),description:"Returns a proposed design system from the website; font files, logos, and the screenshot are file:: session uploads. Throws SuperglueError on failure."},readQbm:{name:"SuperglueReadQbmResult",schema:zn(E.z.looseObject({folder:E.z.string(),objects:E.z.array(E.z.looseObject({type:E.z.string(),files:E.z.array(E.z.string()),records:E.z.number()})),rawTables:E.z.array(E.z.looseObject({table:E.z.string(),files:E.z.array(E.z.string()),rows:E.z.number()})),encryptedValues:E.z.array(E.z.looseObject({table:E.z.string(),column:E.z.string(),values:E.z.number()})),unmappedCodes:E.z.array(E.z.looseObject({field:E.z.string(),code:E.z.string(),records:E.z.number()})).optional(),attachments:E.z.looseObject({documents:E.z.number(),note:E.z.string()}).optional(),rejectedRows:E.z.array(E.z.looseObject({table:E.z.string(),rows:E.z.number()})).optional()})),description:"Returns the folder that holds the extracted files, record counts per object type and raw table, encrypted columns, codes the reader cannot decode, and expected attachments. The folder also holds coverage.json.raw with the same summary plus the mapped source tables. Throws SuperglueError on failure."},previewArtifact:{name:"SuperglueArtifactPreviewResult",schema:E.z.looseObject({draftId:E.z.string(),bytes:E.z.number()}),description:"Returns the artifact draft identity and byte count. Throws SuperglueError on failure."}};var $de=E.z.looseObject({code:E.z.string(),path:E.z.array(E.z.union([E.z.string(),E.z.number(),E.z.symbol()])),message:E.z.string()});wa.SDK_ERROR_DETAILS_SCHEMA=E.z.discriminatedUnion("kind",[E.z.looseObject({kind:E.z.literal("tool_result"),resultMetadata:QM.optional(),result:E.z.looseObject({toolCallId:E.z.string(),toolName:E.z.string(),outcome:E.z.enum(["success","failure","rejected","aborted"]),confirmation:vM.optional(),error:E.z.looseObject({message:E.z.string()}).optional(),data:E.z.unknown().optional()}),output:E.z.unknown().describe("Unprojected execution output, including the original error and any available response data or metadata.")}),E.z.looseObject({kind:E.z.enum(["input_validation","output_validation"]),toolName:E.z.string(),issues:E.z.array($de),output:E.z.unknown().optional()})])});var FM=m(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.SERVER_OWNED_SESSION_RESOURCE_KINDS=Ie.AgentRequestValidationError=Ie.AGENT_TOOL_CONTINUATION_ACTION_BY_CONFIRMATION_STATE=Ie.AGENT_TOOL_CONTINUATION_ACTIONS=Ie.AGENT_IDENTIFIER_PATTERN=Ie.AGENT_REQUEST_LIMITS=void 0;Ie.validateAgentRequestPayload=UM;Ie.validateResourceBinding=MM;Ie.validateClientResourceBinding=xM;Ie.validateAgentSessionIdentity=LM;Ie.validateAgentSessionTarget=PM;Ie.validateAgentRequestSubmission=Yde;Ie.isAgentMessagePayload=Vde;Ie.isAgentToolContinuationPayload=Jde;var Oo=pr();Ie.AGENT_REQUEST_LIMITS={messageContentChars:5e4,identifierChars:256,attachedFiles:20,toolContinuations:20,continuationInputChars:1e5,frontendDraftsChars:2e6,accessRulesContextChars:2e6};Ie.AGENT_IDENTIFIER_PATTERN=/^[A-Za-z0-9._-]+$/;Ie.AGENT_TOOL_CONTINUATION_ACTIONS=["approve","reject","oauth_success","oauth_failure"];Ie.AGENT_TOOL_CONTINUATION_ACTION_BY_CONFIRMATION_STATE={[Oo.ConfirmationAction.CONFIRMED]:"approve",[Oo.ConfirmationAction.DECLINED]:"reject",[Oo.ConfirmationAction.OAUTH_SUCCESS]:"oauth_success",[Oo.ConfirmationAction.OAUTH_FAILURE]:"oauth_failure"};var tg=class extends Error{constructor(e){super(e),this.name="AgentRequestValidationError"}};Ie.AgentRequestValidationError=tg;function Ye(t){throw new tg(t)}function no(t,e){return(!t||typeof t!="object"||Array.isArray(t))&&Ye(`${e} must be an object`),t}function Ba(t,e){(typeof t!="string"||!t.trim())&&Ye(`${e} must be a non-empty string`);let r=t.trim();return r.length>Ie.AGENT_REQUEST_LIMITS.identifierChars&&Ye(`${e} exceeds ${Ie.AGENT_REQUEST_LIMITS.identifierChars} characters`),Ie.AGENT_IDENTIFIER_PATTERN.test(r)||Ye(`${e} may only contain letters, numbers, dots, underscores, and hyphens`),r}function jde(t,e){return typeof t!="boolean"&&Ye(`${e} must be a boolean`),t}function mb(t,e){try{return JSON.stringify(t).length}catch{return Ye(`${e} must be JSON-serializable`)}}function qde(t,e){if(t!==void 0)return Array.isArray(t)||Ye(`${e} must be an array`),t.length>Ie.AGENT_REQUEST_LIMITS.attachedFiles&&Ye(`${e} exceeds ${Ie.AGENT_REQUEST_LIMITS.attachedFiles} entries`),t.map((r,n)=>{let i=no(r,`${e}[${n}]`);return{...i,key:Ba(i.key,`${e}[${n}].key`)}})}function DM({value:t,label:e,requireHidden:r}){let n=no(t,e),i=Ba(n.id,`${e}.id`);typeof n.content!="string"&&Ye(`${e}.content must be a string`);let o=n.content;o.length>Ie.AGENT_REQUEST_LIMITS.messageContentChars&&Ye(`${e}.content exceeds ${Ie.AGENT_REQUEST_LIMITS.messageContentChars} characters`);let s=jde(n.isHidden,`${e}.isHidden`);r&&!s&&Ye(`${e}.isHidden must be true`);let a=qde(n.attachedFiles,`${e}.attachedFiles`);return!o.trim()&&!a?.length&&Ye(`${e}.content may only be empty when an attachment is present`),{id:i,content:o,isHidden:s,...a?{attachedFiles:a}:{}}}function RM(t){if(t===void 0)return;let e=no(t,"frontendDrafts");return mb(e,"frontendDrafts")>Ie.AGENT_REQUEST_LIMITS.frontendDraftsChars&&Ye(`frontendDrafts exceeds ${Ie.AGENT_REQUEST_LIMITS.frontendDraftsChars} characters`),e}function kM(t){if(t===void 0)return;let e=no(t,"accessRulesContext");return mb(e,"accessRulesContext")>Ie.AGENT_REQUEST_LIMITS.accessRulesContextChars&&Ye(`accessRulesContext exceeds ${Ie.AGENT_REQUEST_LIMITS.accessRulesContextChars} characters`),e}function NM(t){if(t!==void 0)return(typeof t!="string"||!Oo.AGENT_APPROVAL_MODES.includes(t))&&Ye(`request.approvalMode must be one of: ${Oo.AGENT_APPROVAL_MODES.join(", ")}`),t}function OM(t,e){let r=no(t,e),n=Ba(r.toolCallId,`${e}.toolCallId`);return(typeof r.action!="string"||!Ie.AGENT_TOOL_CONTINUATION_ACTIONS.includes(r.action))&&Ye(`${e}.action must be one of: ${Ie.AGENT_TOOL_CONTINUATION_ACTIONS.join(", ")}`),r.input!==void 0&&mb(r.input,`${e}.input`)>Ie.AGENT_REQUEST_LIMITS.continuationInputChars&&Ye(`${e}.input exceeds ${Ie.AGENT_REQUEST_LIMITS.continuationInputChars} characters`),{toolCallId:n,action:r.action,...r.input!==void 0?{input:r.input}:{}}}function zde(t){if(t===void 0)return;(!Array.isArray(t)||t.length===0)&&Ye("request.toolContinuations must be a non-empty array"),t.length>Ie.AGENT_REQUEST_LIMITS.toolContinuations&&Ye(`request.toolContinuations exceeds ${Ie.AGENT_REQUEST_LIMITS.toolContinuations} entries`);let e=t.map((r,n)=>OM(r,`request.toolContinuations[${n}]`));return new Set(e.map(({toolCallId:r})=>r)).size!==e.length&&Ye("request.toolContinuations must not contain duplicate toolCallId values"),e}function TM(t,e){if(t===void 0)return;(typeof t!="string"||!t.trim())&&Ye(`${e} must be a non-empty string`);let r=t.trim();return r.length>Ie.AGENT_REQUEST_LIMITS.messageContentChars&&Ye(`${e} exceeds ${Ie.AGENT_REQUEST_LIMITS.messageContentChars} characters`),r}function Gde(t){let e=DM({value:t.message,label:"request.message"}),r=TM(t.title,"request.title"),n=TM(t.titleInput,"request.titleInput"),i=t.hiddenSteeringMessage===void 0?void 0:DM({value:t.hiddenSteeringMessage,label:"request.hiddenSteeringMessage",requireHidden:!0});i&&i.id===e.id&&Ye("request.hiddenSteeringMessage.id must differ from request.message.id");let o=zde(t.toolContinuations),s=NM(t.approvalMode),a=RM(t.frontendDrafts),c=kM(t.accessRulesContext);return{kind:"message",message:e,...i?{hiddenSteeringMessage:i}:{},...r?{title:r}:{},...n?{titleInput:n}:{},...o?{toolContinuations:o}:{},...s?{approvalMode:s}:{},...a?{frontendDrafts:a}:{},...c?{accessRulesContext:c}:{}}}function Hde(t){let e=OM(t,"request"),r=NM(t.approvalMode),n=RM(t.frontendDrafts),i=kM(t.accessRulesContext);return{kind:"tool_continuation",...e,...r?{approvalMode:r}:{},...n?{frontendDrafts:n}:{},...i?{accessRulesContext:i}:{}}}function UM(t){let e=no(t,"request");return e.kind==="message"?Gde(e):e.kind==="tool_continuation"?Hde(e):Ye('request.kind must be "message" or "tool_continuation"')}function MM(t,e){let r=no(t,e);return(typeof r.kind!="string"||!Oo.AGENT_SESSION_RESOURCE_KINDS.includes(r.kind))&&Ye(`${e}.kind must be one of: ${Oo.AGENT_SESSION_RESOURCE_KINDS.join(", ")}`),{kind:r.kind,id:Ba(r.id,`${e}.id`)}}Ie.SERVER_OWNED_SESSION_RESOURCE_KINDS=["briefing"];function xM(t,e){let r=MM(t,e);return Ie.SERVER_OWNED_SESSION_RESOURCE_KINDS.includes(r.kind)&&Ye(`${e}.kind "${r.kind}" is assigned by the server`),r}function LM(t,e="session.createIfMissing"){let r=no(t,e),n=r.projectId===void 0?void 0:Ba(r.projectId,`${e}.projectId`),i=r.taskId===void 0?void 0:Ba(r.taskId,`${e}.taskId`);i&&!n&&Ye(`${e}.taskId requires ${e}.projectId`);let o=Object.values(Oo.AgentType);(typeof r.agentId!="string"||!o.includes(r.agentId))&&Ye(`${e}.agentId must be one of: ${o.join(", ")}`);let s=r.resourceBinding===void 0?void 0:xM(r.resourceBinding,`${e}.resourceBinding`);return{agentId:r.agentId,...n?{projectId:n}:{},...i?{taskId:i}:{},...s?{resourceBinding:s}:{}}}function PM(t){let e=no(t,"session"),r=e.createIfMissing===void 0?void 0:LM(e.createIfMissing);return{id:Ba(e.id,"session.id"),...r?{createIfMissing:r}:{}}}function Yde(t){let e=no(t,"body");return{session:PM(e.session),request:UM(e.request)}}function Vde(t){return t.kind==="message"}function Jde(t){return t.kind==="tool_continuation"}});var jM=m($e=>{"use strict";Object.defineProperty($e,"__esModule",{value:!0});$e.ARTIFACT_EXPORT_FORMATS=$e.ARTIFACT_RESPONSE_RESERVED_FIELD_NAMES=$e.ARTIFACT_RESPONSE_PATCH_DEBOUNCE_MS=$e.MAX_SPREADSHEET_ARTIFACT_BYTES=$e.MAX_HTML_ARTIFACT_IMAGE_BYTES=$e.MAX_HTML_ARTIFACT_BYTES=$e.MAX_SPREADSHEET_CELL_TEXT_LENGTH=$e.MAX_SPREADSHEET_SHEET_NAME_LENGTH=$e.MAX_SPREADSHEET_GRID_CELLS=$e.MAX_SPREADSHEET_SHEETS=$e.SPREADSHEET_CELL_TYPES=void 0;$e.isValidSpreadsheetCell=Kde;$e.isArtifactExportFormat=Xde;$e.isArtifactExportFormatForKind=eAe;var $M=Bd();$e.SPREADSHEET_CELL_TYPES=["text","integer","number","percent","currency","boolean","date","datetime"];$e.MAX_SPREADSHEET_SHEETS=20;$e.MAX_SPREADSHEET_GRID_CELLS=1e6;$e.MAX_SPREADSHEET_SHEET_NAME_LENGTH=31;$e.MAX_SPREADSHEET_CELL_TEXT_LENGTH=32767;var Wde=$M.z.iso.date(),Zde=$M.z.iso.datetime({offset:!0});function Kde(t,e){return t===null?!0:e==="text"?typeof t=="string"&&t.length<=$e.MAX_SPREADSHEET_CELL_TEXT_LENGTH:e==="boolean"?typeof t=="boolean":["integer","number","percent","currency"].includes(e)?typeof t=="number"&&Number.isFinite(t)&&(e!=="integer"||Number.isInteger(t)):typeof t!="string"?!1:(e==="datetime"?Zde:Wde).safeParse(t).success}$e.MAX_HTML_ARTIFACT_BYTES=1024*1024;$e.MAX_HTML_ARTIFACT_IMAGE_BYTES=12*1024*1024;$e.MAX_SPREADSHEET_ARTIFACT_BYTES=10*1024*1024;$e.ARTIFACT_RESPONSE_PATCH_DEBOUNCE_MS=300;$e.ARTIFACT_RESPONSE_RESERVED_FIELD_NAMES=new Set(["__proto__","constructor","prototype"]);$e.ARTIFACT_EXPORT_FORMATS=["html","pdf","docx","xlsx","pptx"];function Xde(t){return $e.ARTIFACT_EXPORT_FORMATS.some(e=>e===t)}function eAe(t,e,r=!1){return t==="spreadsheet"?e==="xlsx":r?e==="html"||e==="pdf"||e==="pptx":e!=="pptx"}});var YM=m(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.API_KEY_ACTION_LABELS=xe.API_KEY_SURFACE_LABELS=xe.API_KEY_SCOPES=xe.API_KEY_SURFACE_ACTIONS=xe.API_KEY_ACTIONS=xe.API_KEY_SURFACES=void 0;xe.getApiKeySurface=zM;xe.getApiKeyAction=GM;xe.getApiKeySurfaceActions=yb;xe.parseApiKeyScopes=HM;xe.validateApiKeyScopesInput=iAe;xe.isApiKeyScopeAllowed=oAe;xe.formatApiKeyScopes=sAe;xe.API_KEY_SURFACES=["api","mcp"];xe.API_KEY_ACTIONS=["read","write","execute"];xe.API_KEY_SURFACE_ACTIONS={api:xe.API_KEY_ACTIONS,mcp:["execute"]};xe.API_KEY_SCOPES=xe.API_KEY_SURFACES.flatMap(t=>xe.API_KEY_SURFACE_ACTIONS[t].map(e=>`${t}:${e}`));xe.API_KEY_SURFACE_LABELS={api:"API & CLI",mcp:"MCP"};xe.API_KEY_ACTION_LABELS={read:"Read",write:"Write",execute:"Execute"};var qM=new Set(xe.API_KEY_SCOPES),tAe={"/v1/tools":["read"],"/v1/tools/:toolId/run":["execute"],"/v1/authenticate":["write"],"/v1/memory-notes":["read","write"]},rAe=new Set(["/v1/api-keys","/v1/api-keys/:id","/v1/api-keys/:id/reveal"]),nAe=new Set(["/v1/me"]);function zM(t){let e=t.split("?")[0];return e==="/mcp"||e.startsWith("/mcp/")?"mcp":"api"}function GM(t){return t==="read"?"read":t==="execute"?"execute":"write"}function yb(t,e){return xe.API_KEY_SURFACE_ACTIONS[e].filter(r=>(t||[]).includes(`${e}:${r}`))}function HM(t){if(!Array.isArray(t))return null;let e=[...new Set(t.filter(r=>qM.has(r)))];return e.length>0?e:null}function iAe(t){if(t==null)return{scopes:null};let e=`Valid scopes: ${xe.API_KEY_SCOPES.join(", ")}. Use null for full access.`;if(!Array.isArray(t)||t.length===0)return{error:`scopes must be a non-empty array of API key scopes. ${e}`};let r=t.filter(n=>!qM.has(n));return r.length>0?{error:`Unknown API key scope(s): ${r.map(String).join(", ")}. ${e}`}:{scopes:HM(t)}}function oAe({scopes:t,path:e,type:r}){if(!t||t.length===0)return!0;let n=e.split("?")[0];if(rAe.has(n))return!1;if(nAe.has(n))return!0;let i=GM(r),o=zM(n);return o==="api"&&tAe[n]?.some(s=>s===r)&&yb(t,"mcp").length>0?!0:t.includes(`${o}:${i}`)}function sAe(t){return!t||t.length===0?"Full access":xe.API_KEY_SURFACES.map(e=>({surface:e,actions:yb(t,e)})).filter(e=>e.actions.length>0).map(e=>xe.API_KEY_SURFACE_ACTIONS[e.surface].length===1?xe.API_KEY_SURFACE_LABELS[e.surface]:`${xe.API_KEY_SURFACE_LABELS[e.surface]} ${e.actions.join("/")}`).join(", ")}});var VM=m(Eb=>{"use strict";Object.defineProperty(Eb,"__esModule",{value:!0});Eb.isValidEmail=aAe;function aAe(t){return/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?)*\.[a-zA-Z]{1,}$/.test(t)}});var WM=m(At=>{"use strict";Object.defineProperty(At,"__esModule",{value:!0});At.GATEWAY_UNINSTALL_COMMANDS=At.GATEWAY_API_KEY_NAME_PREFIX=At.GATEWAY_TARGET_NAME_PATTERN=At.GATEWAY_SETUP_GUIDE_URL=At.GATEWAY_DOWNLOAD_BASE_URL=At.GATEWAY_INSTALL_TOKEN_PREFIX=void 0;At.getGatewayServerUrl=JM;At.buildGatewayInstallToken=uAe;At.buildGatewayInstallCommand=lAe;At.getGatewayApiKeyName=dAe;At.GATEWAY_INSTALL_TOKEN_PREFIX="sgi1.";At.GATEWAY_DOWNLOAD_BASE_URL="https://downloads.superglue.cloud";At.GATEWAY_SETUP_GUIDE_URL="https://superglue.ai/docs/guides/secure-gateway/";At.GATEWAY_TARGET_NAME_PATTERN=/^[a-z0-9]([a-z0-9_-]{0,61}[a-z0-9])?$/;function JM(t){let e=new URL(t);return e.protocol=e.protocol==="http:"?"ws:":"wss:",e.pathname=`${e.pathname.replace(/\/+$/,"")}/ws/tunnels`,e.search="",e.hash="",e.toString()}function cAe(t){let e=new TextEncoder().encode(t),r="";for(let n of e)r+=String.fromCharCode(n);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function uAe(t){let e={v:1,serverUrl:JM(t.apiEndpoint),tunnelId:t.tunnelId,apiKey:t.apiKey,targets:t.targets,enableScriptRunner:t.enableScriptRunner};return At.GATEWAY_INSTALL_TOKEN_PREFIX+cAe(JSON.stringify(e))}function lAe(t,e){return t==="windows"?['$ErrorActionPreference = "Stop"',"[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor 3072",'$ProgressPreference = "SilentlyContinue"','$gateway = "$env:TEMP\\superglue-gateway.exe"',"Remove-Item $gateway -Force -ErrorAction SilentlyContinue",`Invoke-WebRequest -UseBasicParsing "${At.GATEWAY_DOWNLOAD_BASE_URL}/superglue-gateway-windows.exe" -OutFile $gateway`,`"${e}" | & $gateway install -`].join("; "):["d=$(mktemp -d)",`u="${At.GATEWAY_DOWNLOAD_BASE_URL}/superglue-gateway-linux-$(uname -m | sed 's/aarch64/arm64/')"`,'s=$([ "$(id -u)" -eq 0 ] || echo sudo)','{ if command -v curl >/dev/null; then curl -fsSL -o "$d/superglue-gateway" "$u"; else wget -qO "$d/superglue-gateway" "$u"; fi; }','$s install -m 0755 "$d/superglue-gateway" /usr/local/bin/superglue-gateway',`echo '${e}' | $s /usr/local/bin/superglue-gateway install -`].join(" && ")}At.GATEWAY_API_KEY_NAME_PREFIX="Gateway: ";function dAe(t){return At.GATEWAY_API_KEY_NAME_PREFIX+t}At.GATEWAY_UNINSTALL_COMMANDS={windows:'& "C:\\Program Files\\superglue Gateway\\superglue-gateway.exe" uninstall',linux:"sudo /usr/local/bin/superglue-gateway uninstall"}});var Td=m(Ae=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:!0});Ae.OAUTH_CONFIG_CREDENTIAL_KEYS=void 0;Ae.hasMeaningfulValue=pt;Ae.stringValue=$t;Ae.validateOAuthConnection=bAe;Ae.formatOAuthConnectionDisabledReason=wAe;Ae.objectValue=Mo;Ae.parseScopes=_d;Ae.normalizeGrantType=Dd;Ae.normalizeOAuthClientMode=bb;Ae.normalizeSystemAuthentication=Vt;Ae.resolveOAuthClientMode=QAe;Ae.flattenSystemAuthentication=tx;Ae.maskedFlatSystemAuthentication=vAe;Ae.isMaskedSecretValue=rx;Ae.pickAgentAuthInputFields=_Ae;Ae.maskSystemAuthenticationForResponse=DAe;Ae.restoreMaskedClientSecret=TAe;Ae.mapAgentAuthInput=nx;Ae.mergeAgentAuthInput=$Ae;Ae.getAuthenticationConfigCredentialKeys=ix;Ae.buildAuthenticationEditorModel=jAe;Ae.getCredentialRequirements=qAe;Ae.isCredentialRequirementSatisfied=ox;Ae.hasUnsatisfiedCredentialRequirements=zAe;Ae.updateAuthenticationEditorField=GAe;Ae.validateOAuthAuthenticationConfigPlacement=sx;Ae.authenticationToLegacyCredentials=ax;Ae.isRuntimeCredentialMetadataKey=HAe;Ae.resolveCredentialAuthentication=YAe;Ae.getCredentialAuthenticationStorageError=VAe;Ae.buildRuntimeCredentialsFromAuthentication=JAe;Ae.resolveOAuthConfigFromAuthentication=WAe;Ae.toCredentialInputValue=Sb;Ae.getCredentialEntries=ZAe;Ae.getCredentialInputValues=KAe;Ae.getCredentialDisplayHiddenKeys=XAe;Ae.hasOAuthTokenCredentials=epe;Ae.getOAuthExpiryText=tpe;Ae.hasRuntimeCredentialValues=rpe;Ae.validateCredentialObjectKeys=cx;Ae.validateCredentialKeyList=ux;Ae.normalizeAskForUserInputs=lx;Ae.validateSystemInputCollection=npe;Ae.mapOAuthMissingFieldsForAgent=ipe;Ae.validateOAuthAuthenticationAndCredentialInputs=ope;var St=pn(),AAe=qc();Ae.OAUTH_CONFIG_CREDENTIAL_KEYS=["auth_url","authUrl","token_url","tokenUrl","token_uri","scopes","scope","grant_type","grantType","oauthClientMode","client_id","clientId","client_secret","clientSecret","tokenAuthMethod","tokenContentType","usePKCE","extraHeaders","extraBodyParams"];var rg=["host","port","database","path","homeDirectory"],ex=["type","oauthClientMode","grantType","authUrl","tokenUrl","scopes","clientId","clientSecret","tokenAuthMethod","tokenContentType","usePKCE","extraHeaders","extraBodyParams","protocol",...rg],pAe=new Set(ex),fAe="type, oauthClientMode, grantType, authUrl, tokenUrl, scopes, clientId, clientSecret, tokenAuthMethod, tokenContentType, usePKCE, extraHeaders, extraBodyParams, protocol, host, port, database, path, homeDirectory",hAe=["grantType","authUrl","tokenUrl","scopes","clientId","clientSecret"],gAe={grantType:["grantType","grant_type"],authUrl:["authUrl","auth_url"],tokenUrl:["tokenUrl","token_url","token_uri"],scopes:["scopes","scope"],clientId:["clientId","client_id"],clientSecret:["clientSecret","client_secret"]},vd=["tokenAuthMethod","tokenContentType","usePKCE","extraHeaders","extraBodyParams"],mAe=new Set(hAe),yAe=new Set(["access_token","accessToken","refresh_token","refreshToken","expires_at","expiresAt","expires_in","expiresIn","expiry","token_type","tokenType"]),EAe=["access_token","refresh_token","api_key","bearer_token","token","client_id","client_secret","auth_url","token_url","scopes","grant_type","token_type","expires_at","expiry","expires_in","host","hostname","port","database","dbname","db","username","password"],ZM=new Map(EAe.map((t,e)=>[(0,St.normalizeCredentialKey)(t),e]));function Qa(t){return Object.fromEntries(Object.entries(t).filter(([,e])=>e!==void 0))}function Ib({config:t,key:e,value:r}){let n={...t||{}};return pt(r)?n[e]=r:delete n[e],Object.keys(n).length>0?n:void 0}function pt(t){return(0,St.hasCredentialValue)(t)}function $t(t){if(pt(t))return typeof t=="string"?t:String(t)}var IAe={"grant_type authorization_code or client_credentials":"authorization_code or client_credentials",client_id:"client ID",token_url:"token URL",auth_url:"authorization URL","client_secret or usePKCE":"client secret or PKCE","client_secret or oauth_cert + oauth_key":"client secret or OAuth certificate and key"};function Uo(...t){return t.find(e=>pt(e))}function CAe(t){return t===!0||t==="true"}function bAe(t){let e=t||{},r=$t(Uo(e.grant_type,e.grantType)),n=r==="client_credentials"?"client_credentials":"authorization_code",i=r&&r!=="authorization_code"&&r!=="client_credentials",o=Uo(e.client_id,e.clientId),s=Uo(e.client_secret,e.clientSecret),a=Uo(e.auth_url,e.authUrl),c=Uo(e.token_url,e.tokenUrl,e.token_uri),u=Uo(e.oauth_cert,e.oauthCert),l=Uo(e.oauth_key,e.oauthKey),d=pt(u)&&pt(l)||e.hasServerSideCertificateCredentials===!0,A=e.hasServerSideClientSecret===!0,p=pt(s)||A,h=CAe(Uo(e.usePKCE,e.usePkce)),g=[];return i&&g.push("grant_type authorization_code or client_credentials"),pt(o)||g.push("client_id"),pt(c)||g.push("token_url"),n==="client_credentials"?!p&&!d&&g.push("client_secret or oauth_cert + oauth_key"):(pt(a)||g.push("auth_url"),!p&&!h&&g.push("client_secret or usePKCE")),{grantType:n,hasAccessToken:pt(Uo(e.access_token,e.accessToken)),hasCertificateCredentials:d,isReadyToConnect:g.length===0,missingFields:g,usePKCE:h}}function SAe(t){return t.length<=1?t[0]||"":t.length===2?`${t[0]} and ${t[1]}`:`${t.slice(0,-1).join(", ")}, and ${t[t.length-1]}`}function wAe(t){if(!t||t.isReadyToConnect)return null;let e=t.missingFields.map(r=>IAe[r]||r);return`OAuth connection is disabled because ${SAe(e)} ${e.length===1?"is":"are"} missing.`}function Mo(t){if(!(!t||typeof t!="object"||Array.isArray(t)))return t}function io(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function _d(t){if(pt(t)){if(Array.isArray(t))return t.map(String).filter(Boolean);if(typeof t=="string"){let e=t.trim().split(/[,\s]+/).map(r=>r.trim()).filter(Boolean);return e.length>0?e:void 0}return[String(t)]}}function Dd(t){let e=$t(t);if(e==="authorization_code"||e==="client_credentials"||e==="password"||e==="service_account"||e==="custom")return e;if(e)return"custom"}function bb(t){return t==="managed"||t==="dynamic"||t==="custom"?t:void 0}function BAe(t){let e=Object.entries(t).filter(([r])=>!mAe.has(r));return e.length>0?Object.fromEntries(e):void 0}function tu(t,e,r){for(let i of gAe[r])if(pt(t[i]))return t[i];let n=Mo(t.client);return r==="clientId"&&pt(n?.id)?n.id:r==="clientSecret"&&pt(n?.secret)?n.secret:e[r]}function Vt(t){if(!t)return;let e=t;if(e.type==="oauth2"){let r=Mo(e.config)||{},n=BAe(r)||{};return Qa({type:"oauth2",oauthClientMode:bb(e.oauthClientMode),grantType:Dd(tu(e,r,"grantType")),authUrl:$t(tu(e,r,"authUrl")),tokenUrl:$t(tu(e,r,"tokenUrl")),scopes:_d(tu(e,r,"scopes")),clientId:$t(tu(e,r,"clientId")),clientSecret:$t(tu(e,r,"clientSecret")),config:Object.keys(n).length>0?n:void 0})}return e.type==="connection_string"?Qa({type:"connection_string",protocol:e.protocol,config:Mo(e.config??e.components)}):e.type==="api_key"||e.type==="basic_auth"||e.type==="none"?Qa({type:e.type,config:Mo(e.config)}):{type:"none"}}function QAe({authentication:t,templateManaged:e,templateRegistrationUrl:r}){let n=Vt(t);if(n?.type!=="oauth2")return"custom";let i=n.oauthClientMode;return i?i==="managed"&&!e?"custom":i:r?"dynamic":e&&!n.clientSecret?"managed":"custom"}function tx(t){let e=Vt(t);if(!e)return;let{config:r,scopes:n,...i}=e,o={};return r&&typeof r=="object"&&Object.assign(o,r),Object.assign(o,i),Array.isArray(n)?o.scopes=n.join(" "):n!==void 0&&(o.scopes=n),o}function Cb(t,e=""){return t==null?t:Array.isArray(t)?t.map(r=>Cb(r)):typeof t=="object"?Object.fromEntries(Object.entries(t).map(([r,n])=>[r,Cb(n,r)])):e&&(0,St.isSensitiveCredentialKey)(e)?(0,St.maskCredentialValue)(e,t):t}function vAe(t){let e=tx(t);if(e)return Cb(e)}function rx(t){return(0,St.isMaskedValue)(t)||(0,St.isFullyMaskedCredentialValue)(t)}function _Ae(t){let e=Mo(t);if(!e)return;let r={};for(let n of ex){if(!io(e,n))continue;let i=e[n];i!==void 0&&(r[n]=i)}return r}function DAe(t){return!t||t.type!=="oauth2"||!pt(t.clientSecret)?t:{...t,clientSecret:St.FULLY_MASKED_CREDENTIAL_VALUE}}function TAe({incoming:t,existing:e}){if(!t||t.type!=="oauth2"||!rx(t.clientSecret))return t;let r=e?.type==="oauth2"?e.clientSecret:void 0;return{...t,clientSecret:r}}function RAe(t){if(t==="none"||t==="api_key"||t==="basic_auth"||t==="oauth2"||t==="connection_string")return t}function kAe(t){return Object.entries(t||{})}function NAe(t){let e=rg.flatMap(r=>{if(!io(t,r))return[];let n=t[r];return pt(n)?[[r,n]]:[]});return e.length>0?Object.fromEntries(e):void 0}function OAe(t){return rg.filter(e=>io(t,e))}function UAe(t){let e=rg.flatMap(r=>io(t,r)?[[r,t[r]]]:[]);return e.length>0?Object.fromEntries(e):void 0}function MAe(t){let e=new Set(["oauthClientMode","grantType","authUrl","tokenUrl","scopes","clientId","clientSecret",...vd]);return Object.keys(t).filter(r=>e.has(r))}function nx(t){if(t==null)return{};let e=Mo(t);if(!e)return{error:"auth must be an object."};let r=RAe(e.type);if(!r)return{error:"auth.type is required."};let n=Object.keys(e).filter(a=>!pAe.has(a));if(n.length>0)return{error:`Unknown auth field(s): ${n.join(", ")}. Accepted: ${fAe}.`};let i=OAe(e);if(r!=="connection_string"&&i.length>0)return{error:`Connection auth field(s) require auth.type 'connection_string': ${i.join(", ")}.`};let o=MAe(e);if(r!=="oauth2"&&o.length>0)return{error:`OAuth auth field(s) require auth.type 'oauth2': ${o.join(", ")}.`};if(r!=="oauth2"){let a=NAe(e);return{authentication:Qa({type:r,protocol:r==="connection_string"?e.protocol:void 0,config:a})}}let s={...Object.fromEntries(vd.flatMap(a=>{if(!io(e,a))return[];let c=e[a];return pt(c)?[[a,c]]:[]}))};return{authentication:Qa({type:"oauth2",oauthClientMode:bb(e.oauthClientMode),grantType:Dd(e.grantType),authUrl:$t(e.authUrl),tokenUrl:$t(e.tokenUrl),scopes:_d(e.scopes),clientId:$t(e.clientId),clientSecret:$t(e.clientSecret),config:Object.keys(s).length>0?s:void 0})}}function va(t){return t===""||t===null||t===void 0}function Qd(t,e,r,n){if(io(e,r)){if(va(e[r])){delete t[n];return}t[n]=$t(e[r])}}function xAe(t,e){if(io(e,"scopes")){if(va(e.scopes)){delete t.scopes;return}t.scopes=_d(e.scopes)}}function LAe(t,e){if(io(e,"grantType")){if(va(e.grantType)){delete t.grantType;return}t.grantType=Dd(e.grantType)}}function PAe(t,e,r){if(io(e,r)){if(va(e[r])){delete t[r];return}t[r]=e[r]}}function FAe(t,e){if(va(e))return;let r=Mo(e);if(!r)return t;let n={...t||{}};for(let[i,o]of Object.entries(r))va(o)?delete n[i]:n[i]=o;return Object.keys(n).length>0?n:void 0}function $Ae(t,e){let r=nx(e);if(r.error)return Vt(t)||{type:"none"};let n=r.authentication||{type:"none"},i=Mo(e)||{},o=Vt(t),s=o?.type===n.type;if(n.type!=="oauth2"){let d=UAe(i),A=s&&o?{...o}:{type:n.type};return n.type==="connection_string"&&io(i,"protocol")&&(va(i.protocol)?delete A.protocol:A.protocol=i.protocol),d&&(A.config=FAe(o?.config,d)),Vt(A)||{type:n.type}}let c={...s&&o?.type==="oauth2"?{...o,config:{...o.config||{}}}:{type:"oauth2",config:{}}};Qd(c,i,"oauthClientMode","oauthClientMode"),LAe(c,i),Qd(c,i,"authUrl","authUrl"),Qd(c,i,"tokenUrl","tokenUrl"),xAe(c,i),Qd(c,i,"clientId","clientId"),Qd(c,i,"clientSecret","clientSecret");let l={...c.config||{}};for(let d of vd)PAe(l,i,d);return c.config=Object.keys(l).length>0?l:void 0,Vt(c)||{type:"oauth2"}}function ix(t){let e=Vt(t);if(!e)return[];let r=new Set;for(let n of Object.keys(e.config||{}))r.add(n);return e.type==="oauth2"&&(e.grantType&&(r.add("grant_type"),r.add("grantType")),e.authUrl&&(r.add("auth_url"),r.add("authUrl")),e.tokenUrl&&(r.add("token_url"),r.add("tokenUrl"),r.add("token_uri")),e.scopes&&(r.add("scopes"),r.add("scope")),e.clientId&&(r.add("client_id"),r.add("clientId")),e.clientSecret&&(r.add("client_secret"),r.add("clientSecret"))),[...r]}function KM(t,e,r){if(r)for(let[n,i]of Object.entries(r))t.push({path:`${e}.${n}`,label:n,value:i})}function jAe({authentication:t}){let e=Vt(t)||{type:"none"},r=[];if(e.type==="oauth2"){r.push({path:"oauth2.clientId",label:"clientId",value:e.clientId},{path:"oauth2.clientSecret",label:"clientSecret",value:e.clientSecret},{path:"oauth2.grantType",label:"grantType",value:e.grantType||"authorization_code"},{path:"oauth2.authUrl",label:"authUrl",value:e.authUrl},{path:"oauth2.tokenUrl",label:"tokenUrl",value:e.tokenUrl},{path:"oauth2.scopes",label:"scopes",value:e.scopes?.join(" ")});for(let n of vd)r.push({path:`oauth2.config.${n}`,label:n,value:e.config?.[n]});for(let[n,i]of Object.entries(e.config||{}))vd.includes(n)||r.push({path:`oauth2.config.${n}`,label:n,value:i})}else e.type==="connection_string"?(e.protocol&&r.push({path:"connection.protocol",label:"protocol",value:e.protocol}),KM(r,"connection.config",e.config)):KM(r,`${e.type}.config`,e.config);return{type:e.type,authentication:e,configFields:r,hiddenCredentialKeys:ix(e)}}function qAe(t){let e=Vt(t);if(!e||e.type!=="connection_string")return[];let r={type:"field",field:{key:"username",aliases:["user"]}},n={type:"field",field:{key:"password"}};switch(e.protocol){case"sftp":return[r,{type:"oneOf",fields:[{key:"password"},{key:"privateKey"}]},{type:"field",field:{key:"passphrase"},optional:!0}];case"smb":return[r,n,{type:"field",field:{key:"domain"},optional:!0}];case"sqlserver":return[{type:"field",field:{key:"user",aliases:["username"]}},n];default:return[r,n]}}function XM(t,e){return(0,St.hasCredentialValue)(e[t.key])?!0:(t.aliases??[]).some(r=>(0,St.hasCredentialValue)(e[r]))}function ox(t,e){return t.optional?!0:t.type==="field"?XM(t.field,e):t.fields.some(r=>XM(r,e))}function zAe(t,e){let r=e||{};return t.some(n=>!ox(n,r))}function GAe({authentication:t,path:e,value:r}){let n=Vt(t)||{type:"none"};if(n.type==="oauth2"){if(e==="oauth2.grantType")return{...n,grantType:Dd(r)};if(e==="oauth2.authUrl")return{...n,authUrl:$t(r)};if(e==="oauth2.tokenUrl")return{...n,tokenUrl:$t(r)};if(e==="oauth2.scopes")return{...n,scopes:_d(r)};if(e==="oauth2.clientId")return{...n,clientId:$t(r)};if(e==="oauth2.clientSecret")return{...n,clientSecret:$t(r)};if(e.startsWith("oauth2.config.")){let o=e.slice(14);return{...n,config:Ib({config:n.config,key:o,value:r})}}}if(n.type==="connection_string"){if(e==="connection.protocol")return{...n,protocol:$t(r)};if(e.startsWith("connection.config.")){let o=e.slice(18);return{...n,config:Ib({config:n.config,key:o,value:r})}}}let i=`${n.type}.config.`;if(e.startsWith(i)){let o=e.slice(i.length);return{...n,config:Ib({config:n.config,key:o,value:r})}}return n}function sx({authentication:t,credentials:e}){if(Vt(t)?.type!=="oauth2"||!e||typeof e!="object"||Array.isArray(e))return null;let n=Object.keys(e).filter(i=>Ae.OAUTH_CONFIG_CREDENTIAL_KEYS.includes(i));return n.length===0?null:`OAuth configuration keys belong in auth, not credentials: ${n.join(", ")}. Move OAuth client ID to auth.clientId, client secret to auth.clientSecret, auth URL to auth.authUrl, token URL to auth.tokenUrl, scopes to auth.scopes, grant type to auth.grantType, and token request settings to auth fields such as tokenAuthMethod/usePKCE/extraHeaders. Runtime OAuth access and refresh tokens are created by authenticate_oauth.`}function ax(t){let e=Vt(t);return e?e.type==="oauth2"?Qa({...e.config||{},grant_type:e.grantType,auth_url:e.authUrl,token_url:e.tokenUrl,scopes:e.scopes?.join(" "),client_id:e.clientId,client_secret:e.clientSecret}):e.type==="connection_string"?e.config||{}:e.config||{}:{}}function HAe(t){return yAe.has(t.trim())}function YAe({credential:t,system:e}){return t?.authentication??e?.authentication??void 0}function VAe(t){let e=Vt(t);return e?.type==="oauth2"&&e.oauthClientMode==="managed"&&e.clientSecret?"Managed OAuth client secrets cannot be stored on credentials":null}function JAe({authentication:t,credentials:e}){let r=ax(t);return Vt(t)?.type==="oauth2"?{...e||{},...r}:{...r,...e||{}}}function WAe({input:t,authentication:e,templateOAuth:r}){let n=Vt(e),i=n?.type==="oauth2"?n:void 0,o=i?.config||{},s=t||{},a=(...c)=>c.find(u=>u!=null);return Qa({grant_type:a(s.grantType,s.grant_type,i?.grantType,r?.grant_type)||"authorization_code",scopes:a(s.scopes,i?.scopes?.join(" "),r?.scopes),client_id:a(s.clientId,s.client_id,i?.clientId),client_secret:a(s.clientSecret,s.client_secret,i?.clientSecret),auth_url:a(s.authUrl,s.auth_url,i?.authUrl,r?.authUrl),token_url:a(s.tokenUrl,s.token_url,i?.tokenUrl,r?.tokenUrl),resource:a(s.resource,o.resource,r?.resource),tokenAuthMethod:a(s.tokenAuthMethod,o.tokenAuthMethod,r?.tokenAuthMethod),tokenContentType:a(s.tokenContentType,o.tokenContentType,r?.tokenContentType),usePKCE:a(s.usePKCE,o.usePKCE,r?.usePKCE),extraHeaders:a(s.extraHeaders,o.extraHeaders,r?.extraHeaders),extraBodyParams:a(s.extraBodyParams,o.extraBodyParams,r?.extraBodyParams)})}function Sb(t){if(t==null)return"";if(typeof t=="string")return t;let e=JSON.stringify(t);return e===void 0?String(t):e}function ZAe(t,e={}){let r=new Set((e.hiddenKeys||[]).map(St.normalizeCredentialKey));return Object.entries(t).filter(([n])=>!r.has((0,St.normalizeCredentialKey)(n))).sort(([n],[i])=>{let o=ZM.get((0,St.normalizeCredentialKey)(n))??Number.MAX_SAFE_INTEGER,s=ZM.get((0,St.normalizeCredentialKey)(i))??Number.MAX_SAFE_INTEGER;if(o!==s)return o-s;let a=(0,St.isSensitiveCredentialKey)(n),c=(0,St.isSensitiveCredentialKey)(i);return a!==c?a?-1:1:n.localeCompare(i)}).map(([n,i])=>({key:n,value:Sb(i),isReservedMasked:e.maskAll||(0,St.isSensitiveCredentialKey)(n)}))}function KAe(t){return Object.fromEntries(Object.entries(t).map(([e,r])=>[e,Sb(r)]))}function XAe({hideOAuthFiles:t=!1,configKeys:e=[]}){return[...e,...t?["oauth_cert","oauth_key"]:[]]}function epe(t){return pt(t.access_token)||pt(t.refresh_token)}function tpe(t){let e=t.expires_at??t.expiry;if(e){let n=(0,AAe.parseUTCDate)(e);if(n)return`Expires ${n.toLocaleString()}`}let r=t.expires_in;return pt(r)?`Expires in ${r} seconds`:null}function rpe(t){return!!(t&&typeof t=="object"&&!Array.isArray(t)&&Object.values(t).some(e=>pt(e)))}function cx(t){if(!t||typeof t!="object"||Array.isArray(t))return null;let e=(0,St.getInvalidCredentialKeyNames)(Object.keys(t));return e.length===0?null:`${St.CREDENTIAL_KEY_VALIDATION_DESCRIPTION} Invalid keys: ${e.join(", ")}`}function ux(t){let e=(0,St.getInvalidCredentialKeyNames)(t);return e.length===0?null:`${St.CREDENTIAL_KEY_VALIDATION_DESCRIPTION} Invalid keys: ${e.join(", ")}`}function lx(t){return Array.isArray(t)?[...new Set(t.map(e=>String(e||"").trim()).filter(Boolean))]:[]}function npe({credentials:t,askForUserInputs:e}){let r=cx(t);if(r)return r;let n=lx(e),i=ux(n);if(i)return i;if(t&&typeof t=="object"&&!Array.isArray(t))for(let[o,s]of kAe(t)){if(s===""||s===null)return"Blank secret values are not allowed; list secret names to collect from the user in askForUserInputs.";if(n.includes(o))return`Secret name '${o}' cannot be in both credentials and askForUserInputs.`}return null}function ipe(t){let e={"grant_type authorization_code or client_credentials":"grantType authorization_code or client_credentials",client_id:"clientId",token_url:"tokenUrl",auth_url:"authUrl","client_secret or usePKCE":"clientSecret or usePKCE","client_secret or oauth_cert + oauth_key":"clientSecret or oauth_cert + oauth_key"};return t.map(r=>e[r]||r)}function ope({authentication:t,credentials:e}){return sx({authentication:t,credentials:e})}});var Tx=m(Gn=>{"use strict";Object.defineProperty(Gn,"__esModule",{value:!0});Gn.bundles=void 0;Gn.buildBundleAgentLaunch=ype;Gn.getBundle=Epe;Gn.listBundles=Ipe;Gn.rewriteBundleToolSystemId=Cpe;var spe=pr(),ape="https://sandbox.api.sap.com/s4hanacloud/sap/opu/odata/sap",cpe="<<(p) => { const value = p['sage_intacct_entity_id']; if (!value) return ''; const escaped = String(value).replaceAll('&', '&amp;').replaceAll('<', '&lt;').replaceAll('>', '&gt;').replaceAll('\"', '&quot;').replaceAll(\"'\", '&apos;'); return `<locationid>${escaped}</locationid>`; }>>",dx="<<() => crypto.randomUUID()>>";function ft(t){return`<?xml version="1.0" encoding="UTF-8"?><request><control><senderid><<sage_intacct_sender_id>></senderid><password><<sage_intacct_sender_password>></password><controlid>${dx}</controlid><uniqueid>false</uniqueid><dtdversion>3.0</dtdversion></control><operation><authentication><login><userid><<sage_intacct_user_id>></userid><companyid><<sage_intacct_company_id>></companyid><password><<sage_intacct_user_password>></password>${cpe}</login></authentication><content><function controlid="${dx}">${t}</function></content></operation></request>`}function ys({stepId:t,objectNameExpression:e,collectionName:r,mapExpression:n,includeTotalCount:i=!1}){let o=i?"Number(data && data.TOTALCOUNT ? data.TOTALCOUNT : rows.length)":"rows.length",s=n?`rows.map(${n})`:"rows";return`(sourceData) => { const response = sourceData.${t} && sourceData.${t}.data ? sourceData.${t}.data.RESPONSE : undefined; const control = response ? response.CONTROL : undefined; const operation = response ? response.OPERATION : undefined; const authentication = operation ? operation.AUTHENTICATION : undefined; const result = operation ? operation.RESULT : undefined; const statuses = [control && control.STATUS, authentication && authentication.STATUS, result && result.STATUS].filter(Boolean).map((value) => String(value).toLowerCase()); if (statuses.includes('failure')) { const message = (result && result.ERRORMESSAGE) || (authentication && authentication.ERR ? authentication.ERR.ERRORMESSAGE : undefined) || (control && control.ERR ? control.ERR.ERRORMESSAGE : undefined); const rawErrors = message ? message.ERROR : undefined; const errors = Array.isArray(rawErrors) ? rawErrors : (rawErrors ? [rawErrors] : []); const details = errors.map((error) => [error.ERRORNO, error.DESCRIPTION2 || error.DESCRIPTION, error.CORRECTION].filter(Boolean).join(' - ')).filter(Boolean); const supportIds = errors.map((error) => error.SUPPORTID).filter(Boolean); const suffix = supportIds.length ? \` Sage support ID: \${supportIds.join(', ')}.\` : ''; throw new Error(\`Sage Intacct request failed\${details.length ? \`: \${details.join('; ')}\` : '.'}\${suffix}\`); } const data = result ? result.DATA : undefined; const objectName = ${e}; const raw = data ? data[objectName] : undefined; const rows = (Array.isArray(raw) ? raw : (raw ? [raw] : [])).slice(0, (sourceData && sourceData.maxResults) ?? ${i?"1000":"200"}); return { total: ${o}, ${r}: ${s} }; }`}var Es=`const esc = (value) => String(value).replaceAll('&', '&amp;').replaceAll('<', '&lt;').replaceAll('>', '&gt;').replaceAll('"', '&quot;').replaceAll("'", '&apos;');`,Ax="const toIntacctDate = (value) => { const match = String(value).match(/^(\\d{4})-(\\d{2})-(\\d{2})/); if (!match) throw new Error('Dates must be in YYYY-MM-DD format.'); return match[2] + '/' + match[3] + '/' + match[1]; };",px="const assertBalanced = (lines) => { const balance = lines.reduce((sum, line) => sum + (line.type === 'credit' ? -1 : 1) * Math.abs(Number(line.amount)), 0); if (Math.abs(balance) > 0.005) throw new Error('Journal lines must balance: debits minus credits is ' + balance.toFixed(2) + '.'); };",fx=`const lineXml = (line) => { const amount = Number(line.amount); if (!Number.isFinite(amount) || amount <= 0) throw new Error('Every journal line needs a positive amount.'); const type = line.type === 'credit' ? -1 : line.type === 'debit' ? 1 : null; if (type === null) throw new Error("Every journal line needs type 'debit' or 'credit'."); if (!line.accountNo) throw new Error('Every journal line needs accountNo.'); let xml = '<GLENTRY><ACCOUNTNO>' + esc(line.accountNo) + '</ACCOUNTNO><TR_TYPE>' + type + '</TR_TYPE><TRX_AMOUNT>' + amount + '</TRX_AMOUNT>'; if (line.department) xml += '<DEPARTMENT>' + esc(line.department) + '</DEPARTMENT>'; if (line.location) xml += '<LOCATION>' + esc(line.location) + '</LOCATION>'; if (line.memo) xml += '<DESCRIPTION>' + esc(line.memo) + '</DESCRIPTION>'; return xml + '</GLENTRY>'; };`;function ru({stepId:t,objectName:e}){return`(sourceData) => { const response = sourceData.${t} && sourceData.${t}.data ? sourceData.${t}.data.RESPONSE : undefined; const control = response ? response.CONTROL : undefined; const operation = response ? response.OPERATION : undefined; const authentication = operation ? operation.AUTHENTICATION : undefined; const result = operation ? operation.RESULT : undefined; const statuses = [control && control.STATUS, authentication && authentication.STATUS, result && result.STATUS].filter(Boolean).map((value) => String(value).toLowerCase()); if (statuses.includes('failure')) { const message = (result && result.ERRORMESSAGE) || (authentication && authentication.ERR ? authentication.ERR.ERRORMESSAGE : undefined) || (control && control.ERR ? control.ERR.ERRORMESSAGE : undefined); const rawErrors = message ? message.ERROR : undefined; const errors = Array.isArray(rawErrors) ? rawErrors : (rawErrors ? [rawErrors] : []); const details = errors.map((error) => [error.ERRORNO, error.DESCRIPTION2 || error.DESCRIPTION, error.CORRECTION].filter(Boolean).join(' - ')).filter(Boolean); const supportIds = errors.map((error) => error.SUPPORTID).filter(Boolean); const suffix = supportIds.length ? \` Sage support ID: \${supportIds.join(', ')}.\` : ''; throw new Error(\`Sage Intacct request failed\${details.length ? \`: \${details.join('; ')}\` : '.'}\${suffix}\`); } const data = result ? result.DATA : undefined; const raw = data ? (data.${e} || data.${e.toLowerCase()}) : undefined; const record = Array.isArray(raw) ? raw[0] : raw; return { recordNo: record && record.RECORDNO ? Number(record.RECORDNO) : undefined, record }; }`}var Od="netsuite",Qb=100,Nd=1e4,ug=String.raw`<<(p) => { const url = String(p['netsuite_url'] || ''); if (!url || url.includes('{accountId}')) throw new Error('NetSuite is not connected yet: set the account ID so the system URL is https://<account>.suitetalk.api.netsuite.com/services/rest'); return url.replace(/\/+$/, ''); }>>`,lg={Authorization:"Bearer <<netsuite_access_token>>",Accept:"application/json"},vb=String.raw`const has = (value) => value !== undefined && value !== null && value !== ''; const nsId = (value, name) => { const text = String(value ?? '').trim(); if (!/^-?\d+$/.test(text)) throw new Error(name + ' must be a NetSuite internal ID.'); return text; }; const nsDate = (value, name) => { const text = String(value ?? '').trim(); if (!/^\d{4}-\d{2}-\d{2}$/.test(text)) throw new Error(name + ' must be a date in YYYY-MM-DD format.'); return text; }; const ref = (value, name) => ({ id: nsId(value, name) });`,upe=String.raw`const str = (value) => (value === undefined || value === null || value === '' ? null : String(value)); const num = (value) => (value === undefined || value === null || value === '' ? null : Number(value)); const bool = (value) => value === 'T' || value === true; const ids = (value) => (value === undefined || value === null || value === '' ? [] : String(value).split(',').map((part) => part.trim()).filter(Boolean)); const status = (value) => (value ? String(value).replace(/^[^:]*:\s*/, '') : null);`,hx=String.raw`const stripLinks = (value) => { if (Array.isArray(value)) return value.map(stripLinks); if (value && typeof value === 'object') { const result = {}; for (const [key, entry] of Object.entries(value)) { if (key !== 'links') result[key] = stripLinks(entry); } return result; } return value; };`,lpe={type:"integer",minimum:1,maximum:Nd,description:`Maximum number of records to return (max ${Nd}). Defaults to ${Qb}. The result always reports the full match count in total, so use maxResults 1 to count. Prefer filters over large values: big results can exceed an AI client's tool output limit.`},dpe={type:"boolean",description:"Only return active records. Defaults to false (inactive records are included)."},Ape={type:"string",description:"Optional subsidiary internal ID to filter by."},ppe={type:"string",description:"Optional earliest transaction date as YYYY-MM-DD."},fpe={type:"string",description:"Optional latest transaction date as YYYY-MM-DD."},hpe={type:"object",description:"Optional extra NetSuite REST field values merged into the record body as-is, e.g. custom fields like { custentity_region: 'EMEA' } or references like { terms: { id: '2' } }. Fields that this tool's own inputs set are rejected; use those inputs instead.",properties:{},additionalProperties:!0},Rd=t=>({input:"activeOnly",kind:"flag",clause:`${t}.isinactive = 'F'`,schema:dpe}),kd=t=>({input:"subsidiaryId",kind:"id",clause:`${t}.subsidiary = $`,schema:Ape}),wb=[{input:"fromDate",kind:"date",clause:"t.trandate >= TO_DATE('$', 'YYYY-MM-DD')",schema:ppe},{input:"toDate",kind:"date",clause:"t.trandate <= TO_DATE('$', 'YYYY-MM-DD')",schema:fpe}];function gpe(t){let e=`p[${JSON.stringify(t.input)}]`;if(t.kind==="flag")return`if (${e} === true || ${e} === 'true') where.push(${JSON.stringify(t.clause)});`;let[r,n]=t.clause.split("$");if(t.kind==="enum")return`if (has(${e})) { const allowed = ${JSON.stringify(t.values)}; if (!allowed.includes(String(${e}))) throw new Error(${JSON.stringify(`${t.input} must be one of: ${t.values.join(", ")}.`)}); where.push(${JSON.stringify(r)} + String(${e}) + ${JSON.stringify(n)}); }`;if(t.kind==="prefix")return`if (has(${e})) { const text = String(${e}).trim(); if (!/^[A-Za-z0-9._-]{1,40}$/.test(text)) throw new Error(${JSON.stringify(`${t.input} may only contain letters, digits, dots, underscores and hyphens.`)}); where.push(${JSON.stringify(r)} + text + ${JSON.stringify(n)}); }`;let i=t.kind==="id"?"nsId":"nsDate";return`if (has(${e})) where.push(${JSON.stringify(r)} + ${i}(${e}, ${JSON.stringify(t.input)}) + ${JSON.stringify(n)});`}function Is({id:t,name:e,shortName:r,instruction:n,stepId:i,collection:o,select:s,baseWhere:a=[],orderBy:c,filters:u=[],properties:l={},required:d=[],mapRow:A}){let p=typeof s=="string"?JSON.stringify(s):s.js,h=`<<(p) => { ${vb} const where = ${JSON.stringify(a)}; ${u.map(gpe).join(" ")} return JSON.stringify({ q: ${p} + (where.length ? ' WHERE ' + where.join(' AND ') : '') + ${JSON.stringify(` ORDER BY ${c}`)} }); }>>`;return{id:t,name:e,shortName:r,instruction:`${n} Rows are ordered by internal ID. If more than ${Nd} rows match, narrow with the filters or page with the SuiteQL query tool (ORDER BY id, WHERE id > last id).`,inputSchema:{type:"object",properties:{...l,maxResults:lpe,...Object.fromEntries(u.map(g=>[g.input,g.schema]))},...d.length>0?{required:d}:{},additionalProperties:!1},steps:[{id:i,instruction:"Run the SuiteQL query page by page.",config:{type:"request",systemId:Od,url:`${ug}/query/v1/suiteql`,method:"POST",headers:{...lg,"Content-Type":"application/json",Prefer:"transient"},queryParams:{limit:"1000",offset:"<<offset>>"},body:h,pagination:{type:"offsetBased",pageSize:"1000",stopCondition:`(response, pageInfo, sourceData) => { if (sourceData && ["offset", "limit", "page"].some((key) => sourceData[key] !== undefined)) throw new Error("offset, limit and page are not inputs of this tool: use maxResults and the filters."); const page = response && response.data ? response.data : {}; const merged = pageInfo && pageInfo.mergedResult && Array.isArray(pageInfo.mergedResult.items) ? pageInfo.mergedResult.items.length : 0; const max = Math.min(Math.max(Math.floor(Number(sourceData && sourceData.maxResults)) || ${Qb}, 1), ${Nd}); return page.hasMore !== true || merged >= max; }`}}}],outputTransform:`(sourceData) => { ${upe} const raw = sourceData.${i} ? sourceData.${i}.data : undefined; const pages = Array.isArray(raw) ? raw : (raw ? [raw] : []); const items = pages.flatMap((page) => (page && Array.isArray(page.items) ? page.items : [])); const last = pages.length ? pages[pages.length - 1] : {}; const max = Math.min(Math.max(Math.floor(Number(sourceData.maxResults)) || ${Qb}, 1), ${Nd}); const rows = items.slice(0, max).map(${A}).map((row) => Object.fromEntries(Object.entries(row).filter((entry) => entry[1] !== null))); const total = last && last.totalResults !== undefined ? Number(last.totalResults) : items.length; return { total, returned: rows.length, hasMore: total > rows.length, ${o}: rows }; }`}}function Er({id:t,name:e,shortName:r,instruction:n,stepId:i,recordType:o,mode:s,properties:a,required:c,body:u,replaceSublist:l}){let d=[...new Set(Array.from(u.matchAll(/record\.([A-Za-z0-9_]+)\s*=/g)).map(p=>p[1]))],A=s==="create"?`/record/v1/${o}`:`/record/v1/${o}/<<(p) => { ${vb} return nsId(p.internalId, 'internalId'); }>>`;return{id:t,name:e,shortName:r,instruction:n,inputSchema:{type:"object",properties:{...s==="update"?{internalId:{type:"string",description:`Internal ID of the ${o} to update.`}}:{},...a,fields:hpe},required:s==="update"?["internalId",...c]:c,additionalProperties:!1},steps:[{id:i,instruction:`${s==="create"?"Create":"Update"} the ${o} record.`,modify:!0,config:{type:"request",systemId:Od,url:`${ug}${A}`,method:s==="create"?"POST":"PATCH",headers:{...lg,"Content-Type":"application/json","X-NetSuite-idempotency-key":"<<() => crypto.randomUUID()>>"},...l?{queryParams:{replace:`<<(p) => (Array.isArray(p[${JSON.stringify(l.input)}]) && p[${JSON.stringify(l.input)}].length > 0 ? ${JSON.stringify(l.sublist)} : undefined)>>`}}:{},body:`<<(p) => { ${vb} const record = {}; ${u} if (p.fields && typeof p.fields === 'object' && !Array.isArray(p.fields)) { const managed = ${JSON.stringify(d)}; const reserved = Object.keys(p.fields).filter((key) => managed.includes(key)); if (reserved.length > 0) throw new Error('fields may not set ' + reserved.join(', ') + ': use this tool\\'s own inputs for them.'); Object.assign(record, p.fields); } if (Object.keys(record).length === 0) throw new Error('Provide at least one field to ${s}.'); return JSON.stringify(record); }>>`,captureHttpResponse:!0}}],outputTransform:s==="create"?`(sourceData) => { const step = sourceData.${i} || {}; const location = step.http && step.http.headers ? String(step.http.headers.location || '') : ''; const match = location.match(/\\/record\\/v1\\/[^/]+\\/([^/?#]+)/); if (!match) throw new Error('NetSuite did not return the location of the new ${o}.'); return { id: decodeURIComponent(match[1]), recordType: '${o}' }; }`:`(sourceData) => ({ id: String(sourceData.internalId).trim(), recordType: '${o}', updated: true })`}}var gx=String.raw`const lines = Array.isArray(p.lines) ? p.lines : []; let balance = 0; const items = lines.map((line, index) => { const amount = Number(line && line.amount); if (!Number.isFinite(amount) || amount <= 0) throw new Error('lines[' + index + '].amount must be a positive number.'); if (line.type !== 'debit' && line.type !== 'credit') throw new Error("lines[" + index + "].type must be 'debit' or 'credit'."); balance += line.type === 'debit' ? amount : -amount; const item = { account: ref(line.accountId, 'lines[' + index + '].accountId') }; item[line.type] = amount; if (has(line.memo)) item.memo = String(line.memo); if (has(line.departmentId)) item.department = ref(line.departmentId, 'lines[' + index + '].departmentId'); if (has(line.classId)) item.class = ref(line.classId, 'lines[' + index + '].classId'); if (has(line.locationId)) item.location = ref(line.locationId, 'lines[' + index + '].locationId'); if (has(line.entityId)) item.entity = ref(line.entityId, 'lines[' + index + '].entityId'); return item; }); if (lines.length > 0 && Math.abs(balance) > 0.005) throw new Error('Journal lines must balance: debits minus credits is ' + balance.toFixed(2) + '.'); if (items.length > 0) record.line = { items };`,mx=String.raw`if (has(p.subsidiaryId)) record.subsidiary = ref(p.subsidiaryId, 'subsidiaryId'); if (has(p.date)) record.tranDate = nsDate(p.date, 'date'); if (has(p.memo)) record.memo = String(p.memo); if (has(p.currencyId)) record.currency = ref(p.currencyId, 'currencyId'); if (has(p.externalId)) record.externalId = String(p.externalId);`,yx={type:"object",properties:{accountId:{type:"string",description:"GL account internal ID."},type:{type:"string",enum:["debit","credit"]},amount:{type:"number",description:"Positive amount."},memo:{type:"string",description:"Optional line memo."},departmentId:{type:"string",description:"Optional department internal ID."},classId:{type:"string",description:"Optional class internal ID."},locationId:{type:"string",description:"Optional location internal ID."},entityId:{type:"string",description:"Optional customer, vendor or employee internal ID for the line."}},required:["accountId","type","amount"],additionalProperties:!1},Ex=t=>({subsidiaryId:{type:"string",description:t==="create"?"Subsidiary internal ID. Required in OneWorld accounts.":"Optional new subsidiary internal ID."},date:{type:"string",description:t==="create"?"Transaction date as YYYY-MM-DD.":"Optional new transaction date as YYYY-MM-DD."},memo:{type:"string",description:"Journal entry memo."},currencyId:{type:"string",description:"Optional currency internal ID."},externalId:{type:"string",description:"Optional external ID."}}),ng=String.raw`if (p.isPerson === true || p.isPerson === 'true') record.isPerson = true; if (p.isPerson === false || p.isPerson === 'false') record.isPerson = false; if (has(p.entityId)) record.entityId = String(p.entityId); if (has(p.companyName)) record.companyName = String(p.companyName); if (has(p.firstName)) record.firstName = String(p.firstName); if (has(p.lastName)) record.lastName = String(p.lastName); if (has(p.subsidiaryId)) record.subsidiary = ref(p.subsidiaryId, 'subsidiaryId'); if (has(p.email)) record.email = String(p.email); if (has(p.phone)) record.phone = String(p.phone); if (has(p.currencyId)) record.currency = ref(p.currencyId, 'currencyId'); if (has(p.externalId)) record.externalId = String(p.externalId); if (p.isInactive === true || p.isInactive === 'true') record.isInactive = true; if (p.isInactive === false || p.isInactive === 'false') record.isInactive = false;`;function ig(t){return{companyName:{type:"string",description:`Company name of the ${t}.`},isPerson:{type:"boolean",description:`True when the ${t} is an individual; then set firstName and lastName.`},firstName:{type:"string",description:"First name for an individual."},lastName:{type:"string",description:"Last name for an individual."},entityId:{type:"string",description:`${t==="customer"?"Customer":"Vendor"} ID. Omit when auto-numbering assigns it.`},subsidiaryId:{type:"string",description:"Primary subsidiary internal ID. Required on create in OneWorld accounts."},email:{type:"string",description:"Email address."},phone:{type:"string",description:"Phone number."},currencyId:{type:"string",description:"Primary currency internal ID."},externalId:{type:"string",description:"Optional external ID."}}}var og={isInactive:{type:"boolean",description:"Set true to inactivate, false to reactivate."}},sg=String.raw`if (Array.isArray(p.subsidiaryIds) && p.subsidiaryIds.length > 0) record.subsidiary = { items: p.subsidiaryIds.map((value, index) => ref(value, 'subsidiaryIds[' + index + ']')) }; if (p.includeChildren === true || p.includeChildren === 'true') record.includeChildren = true; if (p.includeChildren === false || p.includeChildren === 'false') record.includeChildren = false;`,_x={subsidiaryIds:{type:"array",items:{type:"string"},description:"Subsidiary internal IDs the record is available in. On update the list replaces the current subsidiaries."},includeChildren:{type:"boolean",description:"Also make the record available to child subsidiaries."}},_b=["AcctPay","AcctRec","Bank","COGS","CredCard","DeferExpense","DeferRevenue","Equity","Expense","FixedAsset","Income","LongTermLiab","NonPosting","OthAsset","OthCurrAsset","OthCurrLiab","OthExpense","OthIncome","Stat","UnbilledRec"],Ix=String.raw`if (has(p.acctNumber)) record.acctNumber = String(p.acctNumber); if (has(p.acctName)) record.acctName = String(p.acctName); if (has(p.acctType)) record.acctType = { id: String(p.acctType) }; if (has(p.parentId)) record.parent = ref(p.parentId, 'parentId'); if (has(p.description)) record.description = String(p.description); if (has(p.currencyId)) record.currency = ref(p.currencyId, 'currencyId'); if (has(p.externalId)) record.externalId = String(p.externalId); if (p.isInactive === true || p.isInactive === 'true') record.isInactive = true; if (p.isInactive === false || p.isInactive === 'false') record.isInactive = false;`,Cx={acctNumber:{type:"string",description:"Account number."},acctName:{type:"string",description:"Account name."},acctType:{type:"string",enum:_b,description:"NetSuite account type."},parentId:{type:"string",description:"Optional parent account internal ID."},description:{type:"string",description:"Optional description."},currencyId:{type:"string",description:"Optional currency internal ID (bank and credit card accounts)."},externalId:{type:"string",description:"Optional external ID."},..._x},bx=String.raw`if (has(p.name)) record.name = String(p.name); if (has(p.parentId)) record.parent = ref(p.parentId, 'parentId'); if (has(p.externalId)) record.externalId = String(p.externalId); if (p.isInactive === true || p.isInactive === 'true') record.isInactive = true; if (p.isInactive === false || p.isInactive === 'false') record.isInactive = false;`,Sx={name:{type:"string",description:"Department name."},parentId:{type:"string",description:"Optional parent department internal ID."},externalId:{type:"string",description:"Optional external ID."},..._x},ag=t=>String.raw`if (has(p.${t})) record.entity = ref(p.${t}, '${t}'); if (has(p.subsidiaryId)) record.subsidiary = ref(p.subsidiaryId, 'subsidiaryId'); if (has(p.date)) record.tranDate = nsDate(p.date, 'date'); if (has(p.dueDate)) record.dueDate = nsDate(p.dueDate, 'dueDate'); if (has(p.memo)) record.memo = String(p.memo); if (has(p.currencyId)) record.currency = ref(p.currencyId, 'currencyId'); if (has(p.termsId)) record.terms = ref(p.termsId, 'termsId'); if (has(p.departmentId)) record.department = ref(p.departmentId, 'departmentId'); if (has(p.classId)) record.class = ref(p.classId, 'classId'); if (has(p.locationId)) record.location = ref(p.locationId, 'locationId'); if (has(p.externalId)) record.externalId = String(p.externalId);`,cg=t=>({subsidiaryId:{type:"string",description:t==="create"?"Optional subsidiary internal ID; defaults to the entity's subsidiary.":"Optional new subsidiary internal ID."},date:{type:"string",description:t==="create"?"Transaction date as YYYY-MM-DD.":"Optional new transaction date as YYYY-MM-DD."},dueDate:{type:"string",description:"Optional due date as YYYY-MM-DD."},memo:{type:"string",description:"Optional memo."},currencyId:{type:"string",description:"Optional currency internal ID."},termsId:{type:"string",description:"Optional payment terms internal ID."},departmentId:{type:"string",description:"Optional header department internal ID."},classId:{type:"string",description:"Optional header class internal ID."},locationId:{type:"string",description:"Optional header location internal ID."},externalId:{type:"string",description:"Optional external ID."}}),Dx=String.raw`if (has(line.departmentId)) item.department = ref(line.departmentId, 'lines[' + index + '].departmentId'); if (has(line.classId)) item.class = ref(line.classId, 'lines[' + index + '].classId'); if (has(line.locationId)) item.location = ref(line.locationId, 'lines[' + index + '].locationId');`,wx=String.raw`if (Array.isArray(p.lines) && p.lines.length > 0) record.item = { items: p.lines.map((line, index) => { const item = { item: ref(line && line.itemId, 'lines[' + index + '].itemId') }; if (has(line.quantity)) { const quantity = Number(line.quantity); if (!Number.isFinite(quantity)) throw new Error('lines[' + index + '].quantity must be a number.'); item.quantity = quantity; } if (has(line.rate)) { const rate = Number(line.rate); if (!Number.isFinite(rate)) throw new Error('lines[' + index + '].rate must be a number.'); item.rate = rate; } if (has(line.amount)) { const amount = Number(line.amount); if (!Number.isFinite(amount)) throw new Error('lines[' + index + '].amount must be a number.'); item.amount = amount; } if (has(line.description)) item.description = String(line.description); if (has(line.taxCodeId)) item.taxCode = ref(line.taxCodeId, 'lines[' + index + '].taxCodeId'); ${Dx} return item; }) };`,Bx={type:"object",properties:{itemId:{type:"string",description:"Item internal ID."},quantity:{type:"number",description:"Optional quantity. Defaults to 1."},rate:{type:"number",description:"Optional unit price; defaults to the item price."},amount:{type:"number",description:"Optional line amount."},description:{type:"string",description:"Optional line description."},taxCodeId:{type:"string",description:"Optional tax code internal ID."},departmentId:{type:"string",description:"Optional department internal ID."},classId:{type:"string",description:"Optional class internal ID. Some accounts ignore line classes on invoices; check the saved record."},locationId:{type:"string",description:"Optional location internal ID."}},required:["itemId"],additionalProperties:!1},Qx=String.raw`if (Array.isArray(p.lines) && p.lines.length > 0) record.expense = { items: p.lines.map((line, index) => { const amount = Number(line && line.amount); if (!Number.isFinite(amount) || amount <= 0) throw new Error('lines[' + index + '].amount must be a positive number.'); const item = { account: ref(line.accountId, 'lines[' + index + '].accountId'), amount }; if (has(line.memo)) item.memo = String(line.memo); ${Dx} return item; }) };`,vx={type:"object",properties:{accountId:{type:"string",description:"Expense account internal ID."},amount:{type:"number",description:"Positive amount."},memo:{type:"string",description:"Optional line memo."},departmentId:{type:"string",description:"Optional department internal ID."},classId:{type:"string",description:"Optional class internal ID."},locationId:{type:"string",description:"Optional location internal ID."}},required:["accountId","amount"],additionalProperties:!1},_a="Re-running this tool creates another record; it is not idempotent.",mpe=[Is({id:"netsuite-list-accounts",name:"List NetSuite chart of accounts",shortName:"Chart of accounts",instruction:"Lists general ledger accounts (the chart of accounts) from NetSuite with number, name, type, parent and subsidiaries. Useful for validating an imported chart of accounts.",stepId:"queryAccounts",collection:"accounts",select:"SELECT a.id, a.acctnumber, a.accountsearchdisplaynamecopy AS name, a.fullname, a.accttype, a.parent, a.subsidiary, cur.symbol AS currency, a.description, a.issummary, a.isinactive FROM account a LEFT JOIN currency cur ON cur.id = a.currency",orderBy:"a.id",filters:[Rd("a"),{input:"accountType",kind:"enum",values:_b,clause:"a.accttype = '$'",schema:{type:"string",enum:_b,description:"Only accounts of this NetSuite account type, e.g. Bank or Expense."}},{input:"numberPrefix",kind:"prefix",clause:"a.acctnumber LIKE '$%'",schema:{type:"string",description:"Only accounts whose number starts with this value, e.g. 1000 or 60."}}],mapRow:"(row) => ({ id: row.id, number: str(row.acctnumber), name: str(row.name), fullName: str(row.fullname), type: str(row.accttype), parentId: str(row.parent), subsidiaryIds: ids(row.subsidiary), currency: str(row.currency), description: str(row.description), isSummary: bool(row.issummary), isInactive: bool(row.isinactive) })"}),Is({id:"netsuite-list-customers",name:"List NetSuite customers",shortName:"Customers",instruction:"Lists customer records from NetSuite with subsidiary, currency and open balance. Useful for verifying migrated AR master data.",stepId:"queryCustomers",collection:"customers",select:"SELECT c.id, c.entityid, c.companyname, c.isperson, c.firstname, c.lastname, c.email, c.phone, c.subsidiary, BUILTIN.DF(c.subsidiary) AS subsidiaryname, cur.symbol AS currency, c.balancesearch, c.overduebalancesearch, c.isinactive, TO_CHAR(c.datecreated, 'YYYY-MM-DD') AS datecreated, TO_CHAR(c.lastmodifieddate, 'YYYY-MM-DD') AS lastmodified FROM customer c LEFT JOIN currency cur ON cur.id = c.currency",orderBy:"c.id",filters:[Rd("c"),kd("c")],mapRow:"(row) => ({ id: row.id, entityId: str(row.entityid), companyName: str(row.companyname), isPerson: bool(row.isperson), firstName: str(row.firstname), lastName: str(row.lastname), email: str(row.email), phone: str(row.phone), subsidiaryId: str(row.subsidiary), subsidiary: str(row.subsidiaryname), currency: str(row.currency), balance: num(row.balancesearch), overdueBalance: num(row.overduebalancesearch), isInactive: bool(row.isinactive), createdOn: str(row.datecreated), modifiedOn: str(row.lastmodified) })"}),Is({id:"netsuite-list-vendors",name:"List NetSuite vendors",shortName:"Vendors",instruction:"Lists vendor records from NetSuite with subsidiary, currency and balance. Useful for verifying migrated AP master data.",stepId:"queryVendors",collection:"vendors",select:"SELECT v.id, v.entityid, v.companyname, v.isperson, v.firstname, v.lastname, v.email, v.phone, v.subsidiary, BUILTIN.DF(v.subsidiary) AS subsidiaryname, cur.symbol AS currency, v.balance, v.isinactive, TO_CHAR(v.datecreated, 'YYYY-MM-DD') AS datecreated, TO_CHAR(v.lastmodifieddate, 'YYYY-MM-DD') AS lastmodified FROM vendor v LEFT JOIN currency cur ON cur.id = v.currency",orderBy:"v.id",filters:[Rd("v"),kd("v")],mapRow:"(row) => ({ id: row.id, entityId: str(row.entityid), companyName: str(row.companyname), isPerson: bool(row.isperson), firstName: str(row.firstname), lastName: str(row.lastname), email: str(row.email), phone: str(row.phone), subsidiaryId: str(row.subsidiary), subsidiary: str(row.subsidiaryname), currency: str(row.currency), balance: num(row.balance), isInactive: bool(row.isinactive), createdOn: str(row.datecreated), modifiedOn: str(row.lastmodified) })"}),Is({id:"netsuite-list-journal-entries",name:"List NetSuite journal entries",shortName:"Journal entries",instruction:"Lists journal entry lines from NetSuite, one row per GL line and accounting book with journal, date, period, account, debit, credit and dimensions. Useful for verifying opening balances and postings at cutover.",stepId:"queryJournalLines",collection:"journalLines",select:"SELECT t.id AS journalid, t.tranid, TO_CHAR(t.trandate, 'YYYY-MM-DD') AS trandate, BUILTIN.DF(t.postingperiod) AS period, t.subsidiary, BUILTIN.DF(t.status) AS status, t.posting, t.memo AS journalmemo, cur.symbol AS currency, tl.id AS lineid, tal.accountingbook, tal.account, a.acctnumber, a.accountsearchdisplaynamecopy AS accountname, tal.debit, tal.credit, tl.memo, tl.department, tl.class, tl.location, tl.entity FROM transaction t JOIN transactionline tl ON tl.transaction = t.id JOIN transactionaccountingline tal ON tal.transaction = tl.transaction AND tal.transactionline = tl.id JOIN account a ON a.id = tal.account LEFT JOIN currency cur ON cur.id = t.currency",baseWhere:["t.type = 'Journal'"],orderBy:"t.id, tl.id, tal.accountingbook",filters:[...wb,kd("t")],mapRow:"(row) => ({ journalId: row.journalid, tranId: str(row.tranid), date: str(row.trandate), period: str(row.period), subsidiaryId: str(row.subsidiary), status: status(row.status), posting: bool(row.posting), journalMemo: str(row.journalmemo), currency: str(row.currency), line: num(row.lineid), accountingBookId: str(row.accountingbook), accountId: str(row.account), accountNumber: str(row.acctnumber), accountName: str(row.accountname), debit: num(row.debit), credit: num(row.credit), memo: str(row.memo), departmentId: str(row.department), classId: str(row.class), locationId: str(row.location), entityId: str(row.entity) })"}),Is({id:"netsuite-list-invoices",name:"List NetSuite invoices",shortName:"Invoices",instruction:"Lists customer invoices from NetSuite with customer, dates, status, total and amount due. Useful for verifying migrated open AR at go-live.",stepId:"queryInvoices",collection:"invoices",select:"SELECT t.id, t.tranid, t.entity, BUILTIN.DF(t.entity) AS customername, TO_CHAR(t.trandate, 'YYYY-MM-DD') AS trandate, TO_CHAR(t.duedate, 'YYYY-MM-DD') AS duedate, BUILTIN.DF(t.status) AS status, cur.symbol AS currency, t.foreigntotal, t.foreignamountunpaid, t.subsidiary, t.memo FROM transaction t LEFT JOIN currency cur ON cur.id = t.currency",baseWhere:["t.type = 'CustInvc'"],orderBy:"t.id",filters:[...wb,kd("t"),{input:"openOnly",kind:"flag",clause:"t.status = 'A'",schema:{type:"boolean",description:"Only return open (unpaid) invoices."}}],mapRow:"(row) => ({ id: row.id, tranId: str(row.tranid), customerId: str(row.entity), customer: str(row.customername), date: str(row.trandate), dueDate: str(row.duedate), status: status(row.status), currency: str(row.currency), total: num(row.foreigntotal), amountDue: num(row.foreignamountunpaid), subsidiaryId: str(row.subsidiary), memo: str(row.memo) })"}),Is({id:"netsuite-list-vendor-bills",name:"List NetSuite vendor bills",shortName:"Vendor bills",instruction:"Lists vendor bills from NetSuite with vendor, dates, status, approval status, total and amount due. Useful for verifying migrated open AP at go-live.",stepId:"queryBills",collection:"bills",select:"SELECT t.id, t.tranid, t.entity, BUILTIN.DF(t.entity) AS vendorname, TO_CHAR(t.trandate, 'YYYY-MM-DD') AS trandate, TO_CHAR(t.duedate, 'YYYY-MM-DD') AS duedate, BUILTIN.DF(t.status) AS status, BUILTIN.DF(t.approvalstatus) AS approvalstatus, cur.symbol AS currency, t.foreigntotal, t.foreignamountunpaid, t.subsidiary, t.memo FROM transaction t LEFT JOIN currency cur ON cur.id = t.currency",baseWhere:["t.type = 'VendBill'"],orderBy:"t.id",filters:[...wb,kd("t"),{input:"openOnly",kind:"flag",clause:"t.status = 'A'",schema:{type:"boolean",description:"Only return open bills (approved and not fully paid)."}}],mapRow:"(row) => ({ id: row.id, referenceNo: str(row.tranid), vendorId: str(row.entity), vendor: str(row.vendorname), date: str(row.trandate), dueDate: str(row.duedate), status: status(row.status), approvalStatus: str(row.approvalstatus), currency: str(row.currency), total: row.foreigntotal === undefined ? null : Math.abs(Number(row.foreigntotal)), amountDue: num(row.foreignamountunpaid), subsidiaryId: str(row.subsidiary), memo: str(row.memo) })"}),Is({id:"netsuite-list-dimensions",name:"List NetSuite departments, classes or locations",shortName:"Departments, classes, locations",instruction:"Lists department, class or location records from NetSuite with hierarchy and subsidiaries. Useful for validating the dimension setup after an implementation and for finding the internal IDs the write tools need.",stepId:"queryDimensions",collection:"records",properties:{dimension:{type:"string",enum:["department","class","location"],description:"Which dimension to list."}},required:["dimension"],select:{js:String.raw`'SELECT d.id, d.name, d.fullname, d.parent, d.subsidiary, d.includechildren, d.isinactive FROM ' + (() => { const table = { department: 'department', class: 'classification', location: 'location' }[String(p.dimension || '')]; if (!table) throw new Error("dimension must be 'department', 'class' or 'location'."); return table; })() + ' d'`},orderBy:"d.id",filters:[Rd("d")],mapRow:"(row) => ({ id: row.id, name: str(row.name), fullName: str(row.fullname), parentId: str(row.parent), subsidiaryIds: ids(row.subsidiary), includeChildren: bool(row.includechildren), isInactive: bool(row.isinactive) })"}),Is({id:"netsuite-list-subsidiaries",name:"List NetSuite subsidiaries",shortName:"Subsidiaries",instruction:"Lists subsidiaries from NetSuite with hierarchy, country, base currency and elimination flag. Most create tools need a subsidiary ID from this list in OneWorld accounts.",stepId:"querySubsidiaries",collection:"subsidiaries",select:"SELECT s.id, s.name, s.fullname, s.parent, s.country, cur.symbol AS currency, s.iselimination, s.isinactive FROM subsidiary s LEFT JOIN currency cur ON cur.id = s.currency",orderBy:"s.id",filters:[Rd("s")],mapRow:"(row) => ({ id: row.id, name: str(row.name), fullName: str(row.fullname), parentId: str(row.parent), country: str(row.country), currency: str(row.currency), isElimination: bool(row.iselimination), isInactive: bool(row.isinactive) })"}),{id:"netsuite-suiteql-query",name:"Run a NetSuite SuiteQL query",shortName:"SuiteQL query",instruction:"Runs a read-only SuiteQL SELECT query against NetSuite, for any record type, join or aggregate outside the prebuilt lists (for example items, employees, transaction lines or custom records). The workhorse tool for migration validation. Returns up to 1000 rows in one call with the total row count and hasMore; values are strings as NetSuite returns them.",inputSchema:{type:"object",properties:{query:{type:"string",description:`SuiteQL SELECT statement, e.g. "SELECT id, itemid, displayname FROM item WHERE isinactive = 'F' ORDER BY id". Dates come back in the user's date format; use TO_CHAR(field, 'YYYY-MM-DD') for ISO dates and BUILTIN.DF(field) for display names. For more than 1000 rows, page by key: ORDER BY id and add WHERE id > <last id>. Common columns: account (id, acctnumber, accountsearchdisplaynamecopy as the name, fullname, accttype, isinactive; there is no acctname column), customer (id, entityid, companyname, email, subsidiary, balancesearch, isinactive), vendor (id, entityid, companyname, email, subsidiary, balance, isinactive), transaction (id, tranid, type, trandate, entity, status, foreigntotal, foreignamountunpaid, subsidiary). Alias tables and qualify columns: FROM transaction t ... t.subsidiary works, an unqualified subsidiary fails.`},maxResults:{type:"integer",minimum:1,maximum:1e3,description:"Maximum number of rows to return (max 1000). Defaults to 100."}},required:["query"],additionalProperties:!1},steps:[{id:"runSuiteQl",instruction:"Run the SuiteQL query.",config:{type:"request",systemId:Od,url:`${ug}/query/v1/suiteql`,method:"POST",headers:{...lg,"Content-Type":"application/json",Prefer:"transient"},queryParams:{limit:"<<(p) => Math.min(Math.max(Math.floor(Number(p.maxResults)) || 100, 2), 1000)>>",offset:"0"},body:String.raw`<<(p) => { const query = String(p.query || '').trim(); if (!/^(select|with)\b/i.test(query)) throw new Error('query must be a SuiteQL SELECT statement.'); return JSON.stringify({ q: query }); }>>`}}],outputTransform:`(sourceData) => { ${hx} const data = sourceData.runSuiteQl && sourceData.runSuiteQl.data ? sourceData.runSuiteQl.data : {}; const items = Array.isArray(data.items) ? data.items : []; const max = Math.min(Math.max(Math.floor(Number(sourceData.maxResults)) || 100, 1), 1000); const records = stripLinks(items.slice(0, max)); const total = data.totalResults !== undefined ? Number(data.totalResults) : items.length; return { total, returned: records.length, hasMore: total > records.length, records }; }`},{id:"netsuite-get-record",name:"Get a NetSuite record",shortName:"Get record",instruction:"Fetches one NetSuite record of any type by internal ID or external ID through the REST record API, including its sublists such as transaction lines. Useful for inspecting a record in full before or after a write.",inputSchema:{type:"object",properties:{recordType:{type:"string",description:'REST record type, e.g. "customer", "vendor", "invoice", "vendorbill", "journalentry", "account", "department" or a custom record like "customrecord_x".'},internalId:{type:"string",description:"Internal ID of the record."},externalId:{type:"string",description:"External ID of the record, used when internalId is not set."},expandSubResources:{type:"boolean",description:"Include sublists and subrecords inline. Defaults to true."}},required:["recordType"],additionalProperties:!1},steps:[{id:"getRecord",instruction:"Fetch the record from the REST record API.",config:{type:"request",systemId:Od,url:`${ug}/record/v1/<<(p) => { const type = String(p.recordType || '').trim().toLowerCase(); if (!/^[a-z][a-z0-9_]*$/.test(type)) throw new Error('recordType must contain only letters, numbers and underscores.'); return type; }>>/<<(p) => { if (p.internalId !== undefined && p.internalId !== null && p.internalId !== '') { const id = String(p.internalId).trim(); if (!/^-?\\d+$/.test(id)) throw new Error('internalId must be a NetSuite internal ID.'); return id; } if (p.externalId !== undefined && p.externalId !== null && p.externalId !== '') return 'eid:' + encodeURIComponent(String(p.externalId)); throw new Error('Provide internalId or externalId.'); }>>`,method:"GET",headers:lg,queryParams:{expandSubResources:"<<(p) => (p.expandSubResources === false || p.expandSubResources === 'false' ? 'false' : 'true')>>"}}}],outputTransform:`(sourceData) => { ${hx} const record = sourceData.getRecord ? sourceData.getRecord.data : undefined; if (!record || typeof record !== 'object') throw new Error('NetSuite returned no record.'); return { record: stripLinks(record) }; }`},Er({id:"netsuite-create-journal-entry",name:"Create NetSuite journal entry",shortName:"Create journal entry",instruction:`Creates a journal entry in NetSuite through the REST record API. Debit and credit lines must balance. Returns the new internal ID. ${_a}`,stepId:"createJournalEntry",recordType:"journalentry",mode:"create",properties:{...Ex("create"),lines:{type:"array",description:"Journal lines. Debit and credit totals must balance.",items:yx}},required:["date","lines"],body:`${mx} if (!Array.isArray(p.lines) || p.lines.length < 2) throw new Error('lines must contain at least two journal lines.'); ${gx}`}),Er({id:"netsuite-update-journal-entry",name:"Update NetSuite journal entry",shortName:"Update journal entry",instruction:"Updates an existing NetSuite journal entry by internal ID. Only the provided fields change. When lines are provided they replace all existing lines and must balance. Entries in closed periods refuse updates.",stepId:"updateJournalEntry",recordType:"journalentry",mode:"update",properties:{...Ex("update"),lines:{type:"array",description:"Optional replacement lines. When set, they replace every existing line and must balance.",items:yx}},required:[],body:`${mx} if (Array.isArray(p.lines) && p.lines.length < 2) throw new Error('lines must contain at least two journal lines; omit lines to keep the current ones.'); ${gx}`,replaceSublist:{input:"lines",sublist:"line"}}),Er({id:"netsuite-create-vendor",name:"Create NetSuite vendor",shortName:"Create vendor",instruction:`Creates a vendor record in NetSuite. OneWorld accounts need a subsidiaryId. Omit entityId when auto-numbering assigns it. ${_a}`,stepId:"createVendor",recordType:"vendor",mode:"create",properties:ig("vendor"),required:[],body:`if (!has(p.companyName) && !((p.isPerson === true || p.isPerson === 'true') && has(p.lastName))) throw new Error('Provide companyName, or isPerson with lastName.'); ${ng}`}),Er({id:"netsuite-update-vendor",name:"Update NetSuite vendor",shortName:"Update vendor",instruction:"Updates an existing NetSuite vendor by internal ID. Only the provided fields change; set isInactive to inactivate or reactivate it.",stepId:"updateVendor",recordType:"vendor",mode:"update",properties:{...ig("vendor"),...og},required:[],body:ng}),Er({id:"netsuite-create-customer",name:"Create NetSuite customer",shortName:"Create customer",instruction:`Creates a customer record in NetSuite. OneWorld accounts need a subsidiaryId. Omit entityId when auto-numbering assigns it. ${_a}`,stepId:"createCustomer",recordType:"customer",mode:"create",properties:ig("customer"),required:[],body:`if (!has(p.companyName) && !((p.isPerson === true || p.isPerson === 'true') && has(p.lastName))) throw new Error('Provide companyName, or isPerson with lastName.'); ${ng}`}),Er({id:"netsuite-update-customer",name:"Update NetSuite customer",shortName:"Update customer",instruction:"Updates an existing NetSuite customer by internal ID. Only the provided fields change; set isInactive to inactivate or reactivate it.",stepId:"updateCustomer",recordType:"customer",mode:"update",properties:{...ig("customer"),...og},required:[],body:ng}),Er({id:"netsuite-create-account",name:"Create NetSuite GL account",shortName:"Create GL account",instruction:`Creates a general ledger account in NetSuite's chart of accounts. ${_a}`,stepId:"createAccount",recordType:"account",mode:"create",properties:Cx,required:["acctName","acctType"],body:`if (!has(p.acctName) || !has(p.acctType)) throw new Error('acctName and acctType are required.'); ${Ix} ${sg}`}),Er({id:"netsuite-update-account",name:"Update NetSuite GL account",shortName:"Update GL account",instruction:"Updates an existing NetSuite GL account by internal ID. Only the provided fields change; set isInactive to inactivate or reactivate it. Accounts with transactions may refuse a type change.",stepId:"updateAccount",recordType:"account",mode:"update",properties:{...Cx,...og},required:[],body:`${Ix} ${sg}`}),Er({id:"netsuite-create-invoice",name:"Create NetSuite invoice",shortName:"Create invoice",instruction:`Creates a customer invoice in NetSuite with item lines. Item, tax and posting rules of the account apply. ${_a}`,stepId:"createInvoice",recordType:"invoice",mode:"create",properties:{customerId:{type:"string",description:"Customer internal ID."},...cg("create"),lines:{type:"array",description:"Item lines.",items:Bx}},required:["customerId","lines"],body:`if (!Array.isArray(p.lines) || p.lines.length === 0) throw new Error('lines must contain at least one item line.'); ${ag("customerId")} ${wx}`}),Er({id:"netsuite-update-invoice",name:"Update NetSuite invoice",shortName:"Update invoice",instruction:"Updates an existing NetSuite invoice by internal ID. Only the provided fields change. When lines are provided they replace all existing item lines. Paid invoices and closed periods may refuse updates.",stepId:"updateInvoice",recordType:"invoice",mode:"update",properties:{customerId:{type:"string",description:"Optional new customer internal ID."},...cg("update"),lines:{type:"array",description:"Optional replacement item lines; they replace every existing item line.",items:Bx}},required:[],body:`if (Array.isArray(p.lines) && p.lines.length === 0) throw new Error('lines must contain at least one item line; omit lines to keep the current ones.'); ${ag("customerId")} ${wx}`,replaceSublist:{input:"lines",sublist:"item"}}),Er({id:"netsuite-create-vendor-bill",name:"Create NetSuite vendor bill",shortName:"Create vendor bill",instruction:`Creates a vendor bill in NetSuite with expense lines. Approval routing of the account applies. ${_a}`,stepId:"createVendorBill",recordType:"vendorbill",mode:"create",properties:{vendorId:{type:"string",description:"Vendor internal ID."},referenceNo:{type:"string",description:"Optional vendor invoice reference number."},...cg("create"),lines:{type:"array",description:"Expense lines.",items:vx}},required:["vendorId","lines"],body:`if (!Array.isArray(p.lines) || p.lines.length === 0) throw new Error('lines must contain at least one expense line.'); ${ag("vendorId")} if (has(p.referenceNo)) record.tranId = String(p.referenceNo); ${Qx}`}),Er({id:"netsuite-update-vendor-bill",name:"Update NetSuite vendor bill",shortName:"Update vendor bill",instruction:"Updates an existing NetSuite vendor bill by internal ID. Only the provided fields change. When lines are provided they replace all existing expense lines. Paid bills and closed periods may refuse updates.",stepId:"updateVendorBill",recordType:"vendorbill",mode:"update",properties:{vendorId:{type:"string",description:"Optional new vendor internal ID."},referenceNo:{type:"string",description:"Optional vendor invoice reference number."},...cg("update"),lines:{type:"array",description:"Optional replacement expense lines; they replace every existing expense line.",items:vx}},required:[],body:`if (Array.isArray(p.lines) && p.lines.length === 0) throw new Error('lines must contain at least one expense line; omit lines to keep the current ones.'); ${ag("vendorId")} if (has(p.referenceNo)) record.tranId = String(p.referenceNo); ${Qx}`,replaceSublist:{input:"lines",sublist:"expense"}}),Er({id:"netsuite-create-department",name:"Create NetSuite department",shortName:"Create department",instruction:`Creates a department in NetSuite. Without subsidiaryIds NetSuite assigns the parent subsidiary. ${_a}`,stepId:"createDepartment",recordType:"department",mode:"create",properties:Sx,required:["name"],body:`if (!has(p.name)) throw new Error('name is required.'); ${bx} ${sg}`}),Er({id:"netsuite-update-department",name:"Update NetSuite department",shortName:"Update department",instruction:"Updates an existing NetSuite department by internal ID. Only the provided fields change; set isInactive to inactivate or reactivate it.",stepId:"updateDepartment",recordType:"department",mode:"update",properties:{...Sx,...og},required:[],body:`${bx} ${sg}`})],Bb={sap_s4hana:{bundleId:"sap_s4hana",templateId:"sap_s4hana",systemId:"sap_s4hana",displayName:"SAP S/4HANA",description:"Read business partners, sales orders, products and purchase orders from SAP.",systemUrl:ape,credentialHint:"Works instantly with SAP's demo data. Add your own key later for your live system.",requiredCredentialKeys:["api_key"],demoCredentials:{api_key:"K8reTgiKCCaqvAPWC4cOjqqiLdLE8dqz"},mcpServer:{name:"sap",displayName:"SAP S/4HANA",description:"Business partners, sales orders, products and purchase orders from SAP."},installMcpServer:!0,agentLaunch:{userPrompt:"I just installed the SAP S/4HANA bundle. What can I do with it?",nextSteps:"Your first reply must be short: SAP is connected to free demo data and works right now, so offer to run one tool immediately as proof. No credential collection is needed to start. If they want their own data: their own free key comes from https://api.sap.com (SAP Business Accelerator Hub), collected with set_credentials, never as chat text and never via the Credentials page; the system URL can then be switched to their own SAP host. Do not list the installed tools, do not add tips or explain SAP concepts unless asked."},tools:[{id:"sap-list-business-partners",name:"List SAP business partners",shortName:"Business partners",instruction:"Lists business partners (customers, suppliers, contacts) from SAP S/4HANA. Supports an optional OData $filter.",inputSchema:{type:"object",properties:{filter:{type:"string",description:`Optional OData $filter expression, e.g. "BusinessPartnerCategory eq '2'" for organizations.`},maxResults:{type:"integer",description:"Maximum number of business partners to return. Defaults to 200."}},additionalProperties:!0},steps:[{id:"fetchBusinessPartners",instruction:"Fetch business partners, paging through results with $skip.",config:{type:"request",systemId:"sap_s4hana",url:"<<sap_s4hana_url>>/API_BUSINESS_PARTNER/A_BusinessPartner",method:"GET",headers:{APIKey:"<<sap_s4hana_api_key>>",Accept:"application/json"},queryParams:{$format:"json",$top:"<<pageSize>>",$skip:"<<offset>>",$filter:"<<filter>>",$select:"BusinessPartner,BusinessPartnerFullName,BusinessPartnerCategory,BusinessPartnerGrouping,CreationDate"},pagination:{type:"offsetBased",pageSize:"100",stopCondition:"(response, pageInfo, sourceData) => { const rows = response?.data?.d?.results ?? []; const fetched = pageInfo?.mergedResult?.d?.results?.length ?? 0; const max = sourceData?.maxResults ?? 200; return rows.length === 0 || fetched >= max; }"}}}],outputTransform:"(sourceData) => { const d = (v) => { if (typeof v !== 'string' || !v.startsWith('/Date(')) return v; const n = parseInt(v.slice(6), 10); return Number.isFinite(n) ? new Date(n).toISOString().slice(0, 10) : v; }; const rows = (sourceData.fetchBusinessPartners?.data?.d?.results ?? []).slice(0, sourceData.maxResults ?? 200); return { total: rows.length, businessPartners: rows.map((r) => ({ id: r.BusinessPartner, name: r.BusinessPartnerFullName, category: r.BusinessPartnerCategory, grouping: r.BusinessPartnerGrouping, createdOn: d(r.CreationDate) })) }; }"},{id:"sap-list-sales-orders",name:"List SAP sales orders",shortName:"Sales orders",instruction:"Lists sales orders from SAP S/4HANA with their net amount, currency and sold-to party. Supports an optional OData $filter.",inputSchema:{type:"object",properties:{filter:{type:"string",description:`Optional OData $filter expression, e.g. "SalesOrderType eq 'OR'" or "TotalNetAmount gt 1000".`},maxResults:{type:"integer",description:"Maximum number of sales orders to return. Defaults to 200."}},additionalProperties:!0},steps:[{id:"fetchSalesOrders",instruction:"Fetch sales orders, paging through results with $skip.",config:{type:"request",systemId:"sap_s4hana",url:"<<sap_s4hana_url>>/API_SALES_ORDER_SRV/A_SalesOrder",method:"GET",headers:{APIKey:"<<sap_s4hana_api_key>>",Accept:"application/json"},queryParams:{$format:"json",$top:"<<pageSize>>",$skip:"<<offset>>",$filter:"<<filter>>",$select:"SalesOrder,SalesOrderType,SoldToParty,TotalNetAmount,TransactionCurrency,SalesOrderDate,OverallSDProcessStatus"},pagination:{type:"offsetBased",pageSize:"100",stopCondition:"(response, pageInfo, sourceData) => { const rows = response?.data?.d?.results ?? []; const fetched = pageInfo?.mergedResult?.d?.results?.length ?? 0; const max = sourceData?.maxResults ?? 200; return rows.length === 0 || fetched >= max; }"}}}],outputTransform:"(sourceData) => { const d = (v) => { if (typeof v !== 'string' || !v.startsWith('/Date(')) return v; const n = parseInt(v.slice(6), 10); return Number.isFinite(n) ? new Date(n).toISOString().slice(0, 10) : v; }; const rows = (sourceData.fetchSalesOrders?.data?.d?.results ?? []).slice(0, sourceData.maxResults ?? 200); return { total: rows.length, salesOrders: rows.map((r) => ({ id: r.SalesOrder, type: r.SalesOrderType, soldToParty: r.SoldToParty, netAmount: Number(r.TotalNetAmount), currency: r.TransactionCurrency, orderDate: d(r.SalesOrderDate), status: r.OverallSDProcessStatus })) }; }"},{id:"sap-list-products",name:"List SAP products",shortName:"Products",instruction:"Lists products (materials) from SAP S/4HANA with their type, group and base unit. Supports an optional OData $filter.",inputSchema:{type:"object",properties:{filter:{type:"string",description:`Optional OData $filter expression, e.g. "ProductType eq 'FERT'" for finished goods.`},maxResults:{type:"integer",description:"Maximum number of products to return. Defaults to 200."}},additionalProperties:!0},steps:[{id:"fetchProducts",instruction:"Fetch products, paging through results with $skip.",config:{type:"request",systemId:"sap_s4hana",url:"<<sap_s4hana_url>>/API_PRODUCT_SRV/A_Product",method:"GET",headers:{APIKey:"<<sap_s4hana_api_key>>",Accept:"application/json"},queryParams:{$format:"json",$top:"<<pageSize>>",$skip:"<<offset>>",$filter:"<<filter>>",$expand:"to_Description",$select:"Product,ProductType,ProductGroup,BaseUnit,GrossWeight,WeightUnit,CreationDate,to_Description/Language,to_Description/ProductDescription"},pagination:{type:"offsetBased",pageSize:"100",stopCondition:"(response, pageInfo, sourceData) => { const rows = response?.data?.d?.results ?? []; const fetched = pageInfo?.mergedResult?.d?.results?.length ?? 0; const max = sourceData?.maxResults ?? 200; return rows.length === 0 || fetched >= max; }"}}}],outputTransform:"(sourceData) => { const d = (v) => { if (typeof v !== 'string' || !v.startsWith('/Date(')) return v; const n = parseInt(v.slice(6), 10); return Number.isFinite(n) ? new Date(n).toISOString().slice(0, 10) : v; }; const nameOf = (r) => { const list = r.to_Description?.results ?? []; const hit = list.find((x) => x.Language === 'EN') ?? list[0]; return hit?.ProductDescription; }; const rows = (sourceData.fetchProducts?.data?.d?.results ?? []).slice(0, sourceData.maxResults ?? 200); return { total: rows.length, products: rows.map((r) => ({ id: r.Product, name: nameOf(r), type: r.ProductType, group: r.ProductGroup, baseUnit: r.BaseUnit, grossWeight: Number(r.GrossWeight), weightUnit: r.WeightUnit, createdOn: d(r.CreationDate) })) }; }"},{id:"sap-list-purchase-orders",name:"List SAP purchase orders",shortName:"Purchase orders",instruction:"Lists purchase orders from SAP S/4HANA with their supplier, currency and creation date. Supports an optional OData $filter.",inputSchema:{type:"object",properties:{filter:{type:"string",description:`Optional OData $filter expression, e.g. "PurchaseOrderType eq 'NB'" for standard orders.`},maxResults:{type:"integer",description:"Maximum number of purchase orders to return. Defaults to 200."}},additionalProperties:!0},steps:[{id:"fetchPurchaseOrders",instruction:"Fetch purchase orders, paging through results with $skip.",config:{type:"request",systemId:"sap_s4hana",url:"<<sap_s4hana_url>>/API_PURCHASEORDER_PROCESS_SRV/A_PurchaseOrder",method:"GET",headers:{APIKey:"<<sap_s4hana_api_key>>",Accept:"application/json"},queryParams:{$format:"json",$top:"<<pageSize>>",$skip:"<<offset>>",$filter:"<<filter>>",$select:"PurchaseOrder,PurchaseOrderType,Supplier,PurchaseOrderDate,DocumentCurrency,CreatedByUser"},pagination:{type:"offsetBased",pageSize:"100",stopCondition:"(response, pageInfo, sourceData) => { const rows = response?.data?.d?.results ?? []; const fetched = pageInfo?.mergedResult?.d?.results?.length ?? 0; const max = sourceData?.maxResults ?? 200; return rows.length === 0 || fetched >= max; }"}}}],outputTransform:"(sourceData) => { const d = (v) => { if (typeof v !== 'string' || !v.startsWith('/Date(')) return v; const n = parseInt(v.slice(6), 10); return Number.isFinite(n) ? new Date(n).toISOString().slice(0, 10) : v; }; const rows = (sourceData.fetchPurchaseOrders?.data?.d?.results ?? []).slice(0, sourceData.maxResults ?? 200); return { total: rows.length, purchaseOrders: rows.map((r) => ({ id: r.PurchaseOrder, type: r.PurchaseOrderType, supplier: r.Supplier, orderDate: d(r.PurchaseOrderDate), currency: r.DocumentCurrency, createdBy: r.CreatedByUser })) }; }"},{id:"sap-list-gl-accounts",name:"List SAP chart of accounts",shortName:"Chart of accounts",instruction:"Lists general ledger accounts (the chart of accounts) from SAP S/4HANA. Supports an optional OData $filter, e.g. by ChartOfAccounts.",inputSchema:{type:"object",properties:{filter:{type:"string",description:`Optional OData $filter expression, e.g. "ChartOfAccounts eq 'YCOA'" or "GLAccountType eq 'X'".`},maxResults:{type:"integer",description:"Maximum number of accounts to return. Defaults to 200."}},additionalProperties:!0},steps:[{id:"fetchGLAccounts",instruction:"Fetch GL accounts, paging through results with $skip.",config:{type:"request",systemId:"sap_s4hana",url:"<<sap_s4hana_url>>/API_GLACCOUNTINCHARTOFACCOUNTS_SRV/A_GLAccountInChartOfAccounts",method:"GET",headers:{APIKey:"<<sap_s4hana_api_key>>",Accept:"application/json"},queryParams:{$format:"json",$top:"<<pageSize>>",$skip:"<<offset>>",$filter:`<<(p) => p.filter ? "ChartOfAccounts ne '' and (" + p.filter + ")" : "ChartOfAccounts ne ''">>`,$expand:"to_Text",$select:"GLAccount,ChartOfAccounts,GLAccountType,GLAccountGroup,IsBalanceSheetAccount,AccountIsBlockedForPosting,to_Text/Language,to_Text/GLAccountName"},pagination:{type:"offsetBased",pageSize:"100",stopCondition:"(response, pageInfo, sourceData) => { const rows = response?.data?.d?.results ?? []; const fetched = pageInfo?.mergedResult?.d?.results?.length ?? 0; const max = sourceData?.maxResults ?? 200; return rows.length === 0 || fetched >= max; }"}}}],outputTransform:"(sourceData) => { const nameOf = (r) => { const list = r.to_Text?.results ?? []; const hit = list.find((x) => x.Language === 'EN') ?? list[0]; return hit?.GLAccountName; }; const rows = (sourceData.fetchGLAccounts?.data?.d?.results ?? []).slice(0, sourceData.maxResults ?? 200); return { total: rows.length, accounts: rows.map((r) => ({ account: r.GLAccount, name: nameOf(r), chartOfAccounts: r.ChartOfAccounts, type: r.GLAccountType, group: r.GLAccountGroup, isBalanceSheet: r.IsBalanceSheetAccount, blockedForPosting: r.AccountIsBlockedForPosting })) }; }"},{id:"sap-list-billing-documents",name:"List SAP billing documents",shortName:"Billing documents",instruction:"Lists billing documents (invoices, credit memos) from SAP S/4HANA with amount, currency and sold-to party. Supports an optional OData $filter.",inputSchema:{type:"object",properties:{filter:{type:"string",description:`Optional OData $filter expression, e.g. "BillingDocumentType eq 'F2'" or "TotalNetAmount gt 1000".`},maxResults:{type:"integer",description:"Maximum number of billing documents to return. Defaults to 200."}},additionalProperties:!0},steps:[{id:"fetchBillingDocuments",instruction:"Fetch billing documents, paging through results with $skip.",config:{type:"request",systemId:"sap_s4hana",url:"<<sap_s4hana_url>>/API_BILLING_DOCUMENT_SRV/A_BillingDocument",method:"GET",headers:{APIKey:"<<sap_s4hana_api_key>>",Accept:"application/json"},queryParams:{$format:"json",$top:"<<pageSize>>",$skip:"<<offset>>",$filter:"<<filter>>",$select:"BillingDocument,BillingDocumentType,SoldToParty,TotalNetAmount,TransactionCurrency,BillingDocumentDate"},pagination:{type:"offsetBased",pageSize:"100",stopCondition:"(response, pageInfo, sourceData) => { const rows = response?.data?.d?.results ?? []; const fetched = pageInfo?.mergedResult?.d?.results?.length ?? 0; const max = sourceData?.maxResults ?? 200; return rows.length === 0 || fetched >= max; }"}}}],outputTransform:"(sourceData) => { const d = (v) => { if (typeof v !== 'string' || !v.startsWith('/Date(')) return v; const n = parseInt(v.slice(6), 10); return Number.isFinite(n) ? new Date(n).toISOString().slice(0, 10) : v; }; const rows = (sourceData.fetchBillingDocuments?.data?.d?.results ?? []).slice(0, sourceData.maxResults ?? 200); return { total: rows.length, billingDocuments: rows.map((r) => ({ id: r.BillingDocument, type: r.BillingDocumentType, soldToParty: r.SoldToParty, netAmount: Number(r.TotalNetAmount), currency: r.TransactionCurrency, date: d(r.BillingDocumentDate) })) }; }"},{id:"sap-list-journal-entry-items",name:"List SAP journal entry line items",shortName:"Journal entries",instruction:"Lists journal entry line items (accounting document items) from SAP S/4HANA with company code, GL account, amount and posting date. Filter by CompanyCode, FiscalYear or PostingDate to keep results focused. Useful for verifying opening balances at cutover.",inputSchema:{type:"object",properties:{filter:{type:"string",description:`Optional OData $filter expression, e.g. "CompanyCode eq '1010' and FiscalYear eq '2026'".`},maxResults:{type:"integer",description:"Maximum number of line items to return. Defaults to 200."}},additionalProperties:!0},steps:[{id:"fetchJournalItems",instruction:"Fetch accounting document line items, paging through results with $skip.",config:{type:"request",systemId:"sap_s4hana",url:"<<sap_s4hana_url>>/API_OPLACCTGDOCITEMCUBE_SRV/A_OperationalAcctgDocItemCube",method:"GET",headers:{APIKey:"<<sap_s4hana_api_key>>",Accept:"application/json"},queryParams:{$format:"json",$top:"<<pageSize>>",$skip:"<<offset>>",$filter:"<<filter>>",$select:"AccountingDocument,CompanyCode,FiscalYear,GLAccount,AmountInCompanyCodeCurrency,PostingDate"},pagination:{type:"offsetBased",pageSize:"100",stopCondition:"(response, pageInfo, sourceData) => { const rows = response?.data?.d?.results ?? []; const fetched = pageInfo?.mergedResult?.d?.results?.length ?? 0; const max = sourceData?.maxResults ?? 200; return rows.length === 0 || fetched >= max; }"}}}],outputTransform:"(sourceData) => { const d = (v) => { if (typeof v !== 'string' || !v.startsWith('/Date(')) return v; const n = parseInt(v.slice(6), 10); return Number.isFinite(n) ? new Date(n).toISOString().slice(0, 10) : v; }; const rows = (sourceData.fetchJournalItems?.data?.d?.results ?? []).slice(0, sourceData.maxResults ?? 200); return { total: rows.length, journalItems: rows.map((r) => ({ document: r.AccountingDocument, companyCode: r.CompanyCode, fiscalYear: r.FiscalYear, account: r.GLAccount, amount: Number(r.AmountInCompanyCodeCurrency), postingDate: d(r.PostingDate) })) }; }"},{id:"sap-query-odata",name:"Query any SAP OData service",shortName:"Query any service",instruction:"Queries any SAP S/4HANA OData service and entity set (for example API_PRODUCT_SRV/A_ProductDescription or API_SALES_ORDER_SRV/A_SalesOrderItem) with optional $select and $filter. The workhorse tool for data checks beyond the prebuilt lists.",inputSchema:{type:"object",properties:{servicePath:{type:"string",description:'Service and entity set in SERVICE/EntitySet form, e.g. "API_SALES_ORDER_SRV/A_SalesOrderItem".'},select:{type:"string",description:"Comma-separated OData $select field list. Omit for all fields."},filter:{type:"string",description:"Optional OData $filter expression."},maxResults:{type:"integer",description:"Maximum number of records to return. Defaults to 100."}},required:["servicePath"],additionalProperties:!0},steps:[{id:"queryService",instruction:"Query the requested OData service and entity set.",config:{type:"request",systemId:"sap_s4hana",url:"<<sap_s4hana_url>>/<<servicePath>>",method:"GET",headers:{APIKey:"<<sap_s4hana_api_key>>",Accept:"application/json"},queryParams:{$format:"json",$select:"<<select>>",$filter:"<<filter>>",$top:"<<pageSize>>",$skip:"<<offset>>"},pagination:{type:"offsetBased",pageSize:"100",stopCondition:"(response, pageInfo, sourceData) => { const rows = response?.data?.d?.results ?? []; const fetched = pageInfo?.mergedResult?.d?.results?.length ?? 0; const max = sourceData?.maxResults ?? 100; return rows.length === 0 || fetched >= max; }"}}}],outputTransform:"(sourceData) => { const rows = (sourceData.queryService?.data?.d?.results ?? []).slice(0, sourceData.maxResults ?? 100); return { total: rows.length, records: rows.map((r) => { const { __metadata, ...rest } = r; return rest; }) }; }"}]},sage100:{bundleId:"sage100",templateId:"sage100",systemId:"sage100",displayName:"Sage 100",description:"Connect on-premises Sage 100 through the superglue Secure Gateway, with a guided setup playbook and a connection test against the Business Object Interface.",systemUrl:"script://runner/vbs32",credentialHint:"Your assistant first helps you connect a Secure Gateway on your Sage 100 server, then collects your Sage company and user details.",requiredCredentialKeys:["sage_home","sage_company","sage_user","sage_password"],mcpServer:{name:"sage-100",displayName:"Sage 100",description:"Sage 100 Business Object Interface access through the Secure Gateway."},installMcpServer:!1,playbook:{id:"sage100-native-integration",name:"Sage 100 Native Integration (BOI)",whenToRun:"Use when connecting a Sage 100 installation to superglue, testing that connection, or building tools that read or write Sage 100 data through the Business Object Interface.",inputs:"A Sage 100 installation on a Windows machine the user can access; a superglue API key for the gateway; the Sage company code, a Sage user with module access, and the path to the MAS90\\Home directory; the business outcome once connected.",instructions:"First check /org/tunnels for a connected gateway with a runner target. If none is connected, call setup_gateway with os windows and enableScriptRunner true (no targets are needed); the user runs the install command in PowerShell opened with 'Run as administrator' on the machine where Sage 100 and Workstation Setup are installed (the gateway must run there, ProvideX.Script is a local 32-bit COM class). The command installs the gateway as a Windows service and the call completes when it connects; never ask for the command or its key in chat. The same setup is in Systems \u2192 Connect system \u2192 Private System \u2192 Set up a gateway. The script runner option is required: it opts the gateway into running Sage scripts (it is code execution on their machine, so it is off by default), and it is what registers the built-in runner target. Only if the user cannot use that page, fall back to the manual setup: download https://downloads.superglue.cloud/superglue-gateway-windows.exe, create a config.yaml next to it with a tunnel_id, the server_url ending in /ws/tunnels (wss://api.superglue.cloud/ws/tunnels for hosted superglue), an API key from the API Keys page, and the line enable_script_runner: true, then run the executable. If a tunnel is connected but has no runner target, the gateway was set up without the script runner or is an outdated build; have the user set up the gateway again with the option selected, or add the flag and restart. The service runs as the Windows system account: if Sage data is on a mapped drive or a network share that account cannot reach, the connection test fails with a path or access error. When the tunnel with the runner target appears, attach it to this Sage 100 system with tools.writeSystem from superglue/approved (tunnel with that tunnelId) and keep the URL script://runner/vbs32. Collect sage_home (full path to the MAS90\\Home directory, for example C:\\Sage\\Sage100\\MAS90\\Home, not the MAS90 directory itself), sage_company, sage_user and sage_password through the secure credential form, never as chat text. Then run the Test Sage 100 connection tool once and interpret the result: retVal 0 failures carry the Sage reason in sLastErrorMsg (wrong credentials, missing role access, wrong company code); COM error 0x80040154 means the gateway is not running on a machine with Sage 100 Workstation Setup; a no-license message means all Sage user seats are in use. For new capabilities, build tools whose steps use the script protocol with VBScript in the body: log on with SY_Session, set module context before touching data (nSetDate with YYYYMMDD dates, nSetModule, nLookupTask, nSetProgram), use _svc service objects for reads and _bus business objects for writes, and always release the session with nCleanup and DropObject so the license seat frees up. For reads, set each key segment with nSetKeyValue then nFind for a single record, or browse with nMoveFirst and nMoveNext, and read each field with nGetValue passing a variable that receives the value. To write a document that has lines, such as a sales order, get the header _bus object, set the header fields, get its oLines object, call nAddLine, set the line fields, then call nWrite on the header to commit the header and its lines together. A write fails with a lock error if the record is open in the Sage desktop or held by another session, so report the lock message instead of retrying. Each running script briefly consumes a Sage user seat. Ask for explicit approval before any script that writes to Sage, and warn that records open in the Sage desktop UI cause lock errors.",completionCriteria:"The gateway is connected, the installed Sage 100 system has the tunnel attached and credentials saved, and the connection test returned company data from Sage 100. Any additional requested capability works end to end, with writes explicitly approved before they ran."},agentLaunch:{userPrompt:"I just installed the Sage 100 integration. Help me connect my Sage 100 server.",nextSteps:'Your first reply must be short: one line confirming the Sage 100 integration and setup playbook are installed, then start the connection flow. Check /org/tunnels for a connected gateway with a runner target first. If none exists, call setup_gateway with os windows and enableScriptRunner true (no targets are needed), and tell the user to run the install command in PowerShell opened with "Run as administrator" on the Windows machine where Sage 100 is installed and Workstation Setup has run. The call completes when the gateway connects; never ask for the command or its key in chat. The script runner option is required: it opts the gateway into running scripts on their machine (off by default because it is code execution) and is what registers the runner target. If a tunnel is connected but has no runner target, the gateway was set up without the script runner or is an outdated build: have the user set up the gateway again with the option selected. When setup_gateway completes, check that the returned targets include runner, then attach that tunnel to this Sage 100 system with tools.writeSystem from superglue/approved, keeping the URL script://runner/vbs32. Use set_credentials to collect sage_home (full path to the MAS90\\Home directory, for example C:\\Sage\\Sage100\\MAS90\\Home, not MAS90 itself), sage_company (for example ABC for the demo company), sage_user and sage_password. Never send the user to the Credentials page and never accept secrets as chat text. Then run the Test Sage 100 connection tool once. If it fails, explain the specific cause in plain language before retrying. Mention that each test briefly uses one Sage user license seat. Do not list tools or add tips unless asked.'},tools:[{id:"sage100-test-connection",name:"Test Sage 100 connection",shortName:"Connection test",instruction:"Logs on to Sage 100 through the Secure Gateway, opens the configured company, and reads the first customer record to verify the Business Object Interface end to end. Briefly consumes one Sage user license seat.",steps:[{id:"testConnection",instruction:"Run a VBScript through the gateway script runner that logs on via SY_Session, sets A/R module context, and reads the first customer.",config:{type:"request",systemId:"sage100",url:"<<sage100_url>>",method:"POST",body:["Option Explicit","On Error Resume Next","Dim oScript, oSS, oCust, retVal, custNo, custName, today",'Set oScript = CreateObject("ProvideX.Script")','FailOnErr "CREATE", " (Sage 100 Workstation Setup has not registered ProvideX.Script on this machine; the gateway must run on a prepared Sage 100 machine)"','oScript.Init "<<sage100_sage_home>>"','FailOnErr "INIT", " (sage_home must be the full path to the MAS90\\Home directory, not MAS90 itself)"','Set oSS = oScript.NewObject("SY_Session")','FailOnErr "SESSION", ""','retVal = oSS.nSetUser("<<sage100_sage_user>>", "<<sage100_sage_password>>")','FailOnErr "LOGON", ""',"If retVal = 0 Then",' WScript.Echo "LOGON FAILED: " & oSS.sLastErrorMsg'," WScript.Quit 1","End If",'retVal = oSS.nSetCompany("<<sage100_sage_company>>")','FailOnErr "COMPANY", ""',"If retVal = 0 Then",' WScript.Echo "COMPANY FAILED: " & oSS.sLastErrorMsg'," oSS.nCleanup"," oSS.DropObject"," WScript.Quit 1","End If",'today = Year(Date) & Right("0" & Month(Date), 2) & Right("0" & Day(Date), 2)','retVal = oSS.nSetDate("A/R", today)','FailOnErr "DATE", ""','retVal = oSS.nSetModule("A/R")','FailOnErr "MODULE", ""','retVal = oSS.nSetProgram(oSS.nLookupTask("AR_Customer_ui"))','FailOnErr "TASK", ""',"If retVal = 0 Then",' WScript.Echo "TASK FAILED: " & oSS.sLastErrorMsg'," oSS.nCleanup"," oSS.DropObject"," WScript.Quit 1","End If",'Set oCust = oScript.NewObject("AR_Customer_svc", oSS)','FailOnErr "CUSTOMER OBJECT", ""',"retVal = oCust.nMoveFirst()",'FailOnErr "READ", ""',"If retVal = 0 Then",' WScript.Echo "READ FAILED: " & oCust.sLastErrorMsg',"Else",' custNo = "" : custName = ""',' retVal = oCust.nGetValue("CustomerNo$", custNo)',' retVal = oCust.nGetValue("CustomerName$", custName)',' FailOnErr "READ VALUE", " (ByRef value marshalling failed)"',' WScript.Echo "CONNECTED - company <<sage100_sage_company>>, first customer: " & custNo & " / " & custName',"End If","oCust.DropObject","oSS.nCleanup","oSS.DropObject","If retVal = 0 Then WScript.Quit 1","","Sub FailOnErr(stage, hint)"," If Err.Number <> 0 Then",' WScript.Echo stage & " FAILED: [0x" & Hex(Err.Number) & "] " & Err.Description & hint'," WScript.Quit 1"," End If","End Sub"].join(`
79
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let s of t.seen.entries()){let a=s[1];if(e===s[0]){o(s);continue}if(t.external){let u=t.external.registry.get(s[0])?.id;if(e!==s[0]&&u){o(s);continue}}if(t.metadataRegistry.get(s[0])?.id){o(s);continue}if(a.cycle){o(s);continue}if(a.count>1&&t.reused==="ref"){o(s);continue}}}function rb(t,e){let r=t.seen.get(e);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let n=a=>{let c=t.seen.get(a);if(c.ref===null)return;let u=c.def??c.schema,l={...u},d=c.ref;if(c.ref=null,d){n(d);let p=t.seen.get(d),h=p.schema;if(h.$ref&&(t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0")?(u.allOf=u.allOf??[],u.allOf.push(h)):Object.assign(u,h),Object.assign(u,l),a._zod.parent===d)for(let S in u)S==="$ref"||S==="allOf"||S in l||delete u[S];if(h.$ref&&p.def)for(let S in u)S==="$ref"||S==="allOf"||S in p.def&&JSON.stringify(u[S])===JSON.stringify(p.def[S])&&delete u[S]}let A=a._zod.parent;if(A&&A!==d){n(A);let p=t.seen.get(A);if(p?.schema.$ref&&(u.$ref=p.schema.$ref,p.def))for(let h in u)h==="$ref"||h==="allOf"||h in p.def&&JSON.stringify(u[h])===JSON.stringify(p.def[h])&&delete u[h]}t.override({zodSchema:a,jsonSchema:u,path:c.path??[]})};for(let a of[...t.seen.entries()].reverse())n(a[0]);let i={};if(t.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":t.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":t.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":t.target,t.external?.uri){let a=t.external.registry.get(e)?.id;if(!a)throw new Error("Schema is missing an `id` property");i.$id=t.external.uri(a)}Object.assign(i,r.def??r.schema);let o=t.metadataRegistry.get(e)?.id;o!==void 0&&i.id===o&&delete i.id;let s=t.external?.defs??{};for(let a of t.seen.entries()){let c=a[1];c.def&&c.defId&&(c.def.id===c.defId&&delete c.def.id,s[c.defId]=c.def)}t.external||Object.keys(s).length>0&&(t.target==="draft-2020-12"?i.$defs=s:i.definitions=s);try{let a=JSON.parse(JSON.stringify(i));return Object.defineProperty(a,"~standard",{value:{...e["~standard"],jsonSchema:{input:(0,fn.createStandardJSONSchemaMethod)(e,"input",t.processors),output:(0,fn.createStandardJSONSchemaMethod)(e,"output",t.processors)}},enumerable:!1,writable:!1}),a}catch{throw new Error("Error converting schema to JSON.")}}function ir(t,e){let r=e??{seen:new Set};if(r.seen.has(t))return!1;r.seen.add(t);let n=t._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return ir(n.element,r);if(n.type==="set")return ir(n.valueType,r);if(n.type==="lazy")return ir(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault")return ir(n.innerType,r);if(n.type==="intersection")return ir(n.left,r)||ir(n.right,r);if(n.type==="record"||n.type==="map")return ir(n.keyType,r)||ir(n.valueType,r);if(n.type==="pipe")return t._zod.traits.has("$ZodCodec")?!0:ir(n.in,r)||ir(n.out,r);if(n.type==="object"){for(let i in n.shape)if(ir(n.shape[i],r))return!0;return!1}if(n.type==="union"){for(let i of n.options)if(ir(i,r))return!0;return!1}if(n.type==="tuple"){for(let i of n.items)if(ir(i,r))return!0;return!!(n.rest&&ir(n.rest,r))}return!1}var Tce=(t,e={})=>r=>{let n=eb({...r,processors:e});return Ph(t,n),tb(n,t),rb(n,t)};fn.createToJSONSchemaMethod=Tce;var Rce=(t,e,r={})=>n=>{let{libraryOptions:i,target:o}=n??{},s=eb({...i??{},target:o,io:e,processors:r});return Ph(t,s),tb(s,t),rb(s,t)};fn.createStandardJSONSchemaMethod=Rce});var md=m(R=>{"use strict";Object.defineProperty(R,"__esModule",{value:!0});R.allProcessors=R.lazyProcessor=R.optionalProcessor=R.promiseProcessor=R.readonlyProcessor=R.pipeProcessor=R.catchProcessor=R.prefaultProcessor=R.defaultProcessor=R.nonoptionalProcessor=R.nullableProcessor=R.recordProcessor=R.tupleProcessor=R.intersectionProcessor=R.unionProcessor=R.objectProcessor=R.arrayProcessor=R.setProcessor=R.mapProcessor=R.transformProcessor=R.functionProcessor=R.customProcessor=R.successProcessor=R.fileProcessor=R.templateLiteralProcessor=R.nanProcessor=R.literalProcessor=R.enumProcessor=R.dateProcessor=R.unknownProcessor=R.anyProcessor=R.neverProcessor=R.voidProcessor=R.undefinedProcessor=R.nullProcessor=R.symbolProcessor=R.bigintProcessor=R.booleanProcessor=R.numberProcessor=R.stringProcessor=void 0;R.toJSONSchema=Eue;var Pe=gd(),kce=ee(),Nce={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Oce=(t,e,r,n)=>{let i=r;i.type="string";let{minimum:o,maximum:s,format:a,patterns:c,contentEncoding:u}=t._zod.bag;if(typeof o=="number"&&(i.minLength=o),typeof s=="number"&&(i.maxLength=s),a&&(i.format=Nce[a]??a,i.format===""&&delete i.format,a==="time"&&delete i.format),u&&(i.contentEncoding=u),c&&c.size>0){let l=[...c];l.length===1?i.pattern=l[0].source:l.length>1&&(i.allOf=[...l.map(d=>({...e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}};R.stringProcessor=Oce;var Uce=(t,e,r,n)=>{let i=r,{minimum:o,maximum:s,format:a,multipleOf:c,exclusiveMaximum:u,exclusiveMinimum:l}=t._zod.bag;typeof a=="string"&&a.includes("int")?i.type="integer":i.type="number";let d=typeof l=="number"&&l>=(o??Number.NEGATIVE_INFINITY),A=typeof u=="number"&&u<=(s??Number.POSITIVE_INFINITY),p=e.target==="draft-04"||e.target==="openapi-3.0";d?p?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l:typeof o=="number"&&(i.minimum=o),A?p?(i.maximum=u,i.exclusiveMaximum=!0):i.exclusiveMaximum=u:typeof s=="number"&&(i.maximum=s),typeof c=="number"&&(i.multipleOf=c)};R.numberProcessor=Uce;var Mce=(t,e,r,n)=>{r.type="boolean"};R.booleanProcessor=Mce;var xce=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")};R.bigintProcessor=xce;var Lce=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")};R.symbolProcessor=Lce;var Pce=(t,e,r,n)=>{e.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"};R.nullProcessor=Pce;var Fce=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")};R.undefinedProcessor=Fce;var $ce=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")};R.voidProcessor=$ce;var jce=(t,e,r,n)=>{r.not={}};R.neverProcessor=jce;var qce=(t,e,r,n)=>{};R.anyProcessor=qce;var zce=(t,e,r,n)=>{};R.unknownProcessor=zce;var Gce=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")};R.dateProcessor=Gce;var Hce=(t,e,r,n)=>{let i=t._zod.def,o=(0,kce.getEnumValues)(i.entries);o.every(s=>typeof s=="number")&&(r.type="number"),o.every(s=>typeof s=="string")&&(r.type="string"),r.enum=o};R.enumProcessor=Hce;var Yce=(t,e,r,n)=>{let i=t._zod.def,o=[];for(let s of i.values)if(s===void 0){if(e.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(e.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(s))}else o.push(s);if(o.length!==0)if(o.length===1){let s=o[0];r.type=s===null?"null":typeof s,e.target==="draft-04"||e.target==="openapi-3.0"?r.enum=[s]:r.const=s}else o.every(s=>typeof s=="number")&&(r.type="number"),o.every(s=>typeof s=="string")&&(r.type="string"),o.every(s=>typeof s=="boolean")&&(r.type="boolean"),o.every(s=>s===null)&&(r.type="null"),r.enum=o};R.literalProcessor=Yce;var Vce=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")};R.nanProcessor=Vce;var Jce=(t,e,r,n)=>{let i=r,o=t._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");i.type="string",i.pattern=o.source};R.templateLiteralProcessor=Jce;var Wce=(t,e,r,n)=>{let i=r,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:a,mime:c}=t._zod.bag;s!==void 0&&(o.minLength=s),a!==void 0&&(o.maxLength=a),c?c.length===1?(o.contentMediaType=c[0],Object.assign(i,o)):(Object.assign(i,o),i.anyOf=c.map(u=>({contentMediaType:u}))):Object.assign(i,o)};R.fileProcessor=Wce;var Zce=(t,e,r,n)=>{r.type="boolean"};R.successProcessor=Zce;var Kce=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")};R.customProcessor=Kce;var Xce=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")};R.functionProcessor=Xce;var eue=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")};R.transformProcessor=eue;var tue=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")};R.mapProcessor=tue;var rue=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")};R.setProcessor=rue;var nue=(t,e,r,n)=>{let i=r,o=t._zod.def,{minimum:s,maximum:a}=t._zod.bag;typeof s=="number"&&(i.minItems=s),typeof a=="number"&&(i.maxItems=a),i.type="array",i.items=(0,Pe.process)(o.element,e,{...n,path:[...n.path,"items"]})};R.arrayProcessor=nue;var iue=(t,e,r,n)=>{let i=r,o=t._zod.def;i.type="object",i.properties={};let s=o.shape;for(let u in s)i.properties[u]=(0,Pe.process)(s[u],e,{...n,path:[...n.path,"properties",u]});let a=new Set(Object.keys(s)),c=new Set([...a].filter(u=>{let l=o.shape[u]._zod;return e.io==="input"?l.optin===void 0:l.optout===void 0}));c.size>0&&(i.required=Array.from(c)),o.catchall?._zod.def.type==="never"?i.additionalProperties=!1:o.catchall?o.catchall&&(i.additionalProperties=(0,Pe.process)(o.catchall,e,{...n,path:[...n.path,"additionalProperties"]})):e.io==="output"&&(i.additionalProperties=!1)};R.objectProcessor=iue;var oue=(t,e,r,n)=>{let i=t._zod.def,o=i.inclusive===!1,s=i.options.map((a,c)=>(0,Pe.process)(a,e,{...n,path:[...n.path,o?"oneOf":"anyOf",c]}));o?r.oneOf=s:r.anyOf=s};R.unionProcessor=oue;var sue=(t,e,r,n)=>{let i=t._zod.def,o=(0,Pe.process)(i.left,e,{...n,path:[...n.path,"allOf",0]}),s=(0,Pe.process)(i.right,e,{...n,path:[...n.path,"allOf",1]}),a=u=>"allOf"in u&&Object.keys(u).length===1,c=[...a(o)?o.allOf:[o],...a(s)?s.allOf:[s]];r.allOf=c};R.intersectionProcessor=sue;var aue=(t,e,r,n)=>{let i=r,o=t._zod.def;i.type="array";let s=e.target==="draft-2020-12"?"prefixItems":"items",a=e.target==="draft-2020-12"||e.target==="openapi-3.0"?"items":"additionalItems",c=o.items.map((A,p)=>(0,Pe.process)(A,e,{...n,path:[...n.path,s,p]})),u=o.rest?(0,Pe.process)(o.rest,e,{...n,path:[...n.path,a,...e.target==="openapi-3.0"?[o.items.length]:[]]}):null;e.target==="draft-2020-12"?(i.prefixItems=c,u&&(i.items=u)):e.target==="openapi-3.0"?(i.items={anyOf:c},u&&i.items.anyOf.push(u),i.minItems=c.length,u||(i.maxItems=c.length)):(i.items=c,u&&(i.additionalItems=u));let{minimum:l,maximum:d}=t._zod.bag;typeof l=="number"&&(i.minItems=l),typeof d=="number"&&(i.maxItems=d)};R.tupleProcessor=aue;var cue=(t,e,r,n)=>{let i=r,o=t._zod.def;i.type="object";let s=o.keyType,c=s._zod.bag?.patterns;if(o.mode==="loose"&&c&&c.size>0){let l=(0,Pe.process)(o.valueType,e,{...n,path:[...n.path,"patternProperties","*"]});i.patternProperties={};for(let d of c)i.patternProperties[d.source]=l}else(e.target==="draft-07"||e.target==="draft-2020-12")&&(i.propertyNames=(0,Pe.process)(o.keyType,e,{...n,path:[...n.path,"propertyNames"]})),i.additionalProperties=(0,Pe.process)(o.valueType,e,{...n,path:[...n.path,"additionalProperties"]});let u=s._zod.values;if(u){let l=[...u].filter(d=>typeof d=="string"||typeof d=="number");l.length>0&&(i.required=l)}};R.recordProcessor=cue;var uue=(t,e,r,n)=>{let i=t._zod.def,o=(0,Pe.process)(i.innerType,e,n),s=e.seen.get(t);e.target==="openapi-3.0"?(s.ref=i.innerType,r.nullable=!0):r.anyOf=[o,{type:"null"}]};R.nullableProcessor=uue;var lue=(t,e,r,n)=>{let i=t._zod.def;(0,Pe.process)(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType};R.nonoptionalProcessor=lue;var due=(t,e,r,n)=>{let i=t._zod.def;(0,Pe.process)(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType,r.default=JSON.parse(JSON.stringify(i.defaultValue))};R.defaultProcessor=due;var Aue=(t,e,r,n)=>{let i=t._zod.def;(0,Pe.process)(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType,e.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(i.defaultValue)))};R.prefaultProcessor=Aue;var pue=(t,e,r,n)=>{let i=t._zod.def;(0,Pe.process)(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType;let s;try{s=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=s};R.catchProcessor=pue;var fue=(t,e,r,n)=>{let i=t._zod.def,o=i.in._zod.traits.has("$ZodTransform"),s=e.io==="input"?o?i.out:i.in:i.out;(0,Pe.process)(s,e,n);let a=e.seen.get(t);a.ref=s};R.pipeProcessor=fue;var hue=(t,e,r,n)=>{let i=t._zod.def;(0,Pe.process)(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType,r.readOnly=!0};R.readonlyProcessor=hue;var gue=(t,e,r,n)=>{let i=t._zod.def;(0,Pe.process)(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType};R.promiseProcessor=gue;var mue=(t,e,r,n)=>{let i=t._zod.def;(0,Pe.process)(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType};R.optionalProcessor=mue;var yue=(t,e,r,n)=>{let i=t._zod.innerType;(0,Pe.process)(i,e,n);let o=e.seen.get(t);o.ref=i};R.lazyProcessor=yue;R.allProcessors={string:R.stringProcessor,number:R.numberProcessor,boolean:R.booleanProcessor,bigint:R.bigintProcessor,symbol:R.symbolProcessor,null:R.nullProcessor,undefined:R.undefinedProcessor,void:R.voidProcessor,never:R.neverProcessor,any:R.anyProcessor,unknown:R.unknownProcessor,date:R.dateProcessor,enum:R.enumProcessor,literal:R.literalProcessor,nan:R.nanProcessor,template_literal:R.templateLiteralProcessor,file:R.fileProcessor,success:R.successProcessor,custom:R.customProcessor,function:R.functionProcessor,transform:R.transformProcessor,map:R.mapProcessor,set:R.setProcessor,array:R.arrayProcessor,object:R.objectProcessor,union:R.unionProcessor,intersection:R.intersectionProcessor,tuple:R.tupleProcessor,record:R.recordProcessor,nullable:R.nullableProcessor,nonoptional:R.nonoptionalProcessor,default:R.defaultProcessor,prefault:R.prefaultProcessor,catch:R.catchProcessor,pipe:R.pipeProcessor,readonly:R.readonlyProcessor,promise:R.promiseProcessor,optional:R.optionalProcessor,lazy:R.lazyProcessor};function Eue(t,e){if("_idmap"in t){let n=t,i=(0,Pe.initializeContext)({...e,processors:R.allProcessors}),o={};for(let c of n._idmap.entries()){let[u,l]=c;(0,Pe.process)(l,i)}let s={},a={registry:n,uri:e?.uri,defs:o};i.external=a;for(let c of n._idmap.entries()){let[u,l]=c;(0,Pe.extractDefs)(i,l),s[u]=(0,Pe.finalize)(i,l)}if(Object.keys(o).length>0){let c=i.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[c]:o}}return{schemas:s}}let r=(0,Pe.initializeContext)({...e,processors:R.allProcessors});return(0,Pe.process)(t,r),(0,Pe.extractDefs)(r,t),(0,Pe.finalize)(r,t)}});var zU=m($h=>{"use strict";Object.defineProperty($h,"__esModule",{value:!0});$h.JSONSchemaGenerator=void 0;var Iue=md(),Fh=gd(),nb=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 r=e?.target??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=(0,Fh.initializeContext)({processors:Iue.allProcessors,target:r,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,r={path:[],schemaPath:[]}){return(0,Fh.process)(e,this.ctx,r)}emit(e,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),(0,Fh.extractDefs)(this.ctx,e);let n=(0,Fh.finalize)(this.ctx,e),{"~standard":i,...o}=n;return o}};$h.JSONSchemaGenerator=nb});var HU=m(GU=>{"use strict";Object.defineProperty(GU,"__esModule",{value:!0})});var mr=m(Ne=>{"use strict";var YU=Ne&&Ne.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Cue=Ne&&Ne.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),ro=Ne&&Ne.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&YU(e,t,r)},jh=Ne&&Ne.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&YU(e,t,r);return Cue(e,t),e};Object.defineProperty(Ne,"__esModule",{value:!0});Ne.JSONSchema=Ne.JSONSchemaGenerator=Ne.toJSONSchema=Ne.locales=Ne.regexes=Ne.util=void 0;ro(Sa(),Ne);ro($C(),Ne);ro(PC(),Ne);ro(JC(),Ne);ro(Tf(),Ne);ro(HC(),Ne);Ne.util=jh(ee());Ne.regexes=jh(Df());Ne.locales=jh(XC());ro(pd(),Ne);ro(GC(),Ne);ro(qU(),Ne);ro(gd(),Ne);var bue=md();Object.defineProperty(Ne,"toJSONSchema",{enumerable:!0,get:function(){return bue.toJSONSchema}});var Sue=zU();Object.defineProperty(Ne,"JSONSchemaGenerator",{enumerable:!0,get:function(){return Sue.JSONSchemaGenerator}});Ne.JSONSchema=jh(HU())});var qh=m(te=>{"use strict";Object.defineProperty(te,"__esModule",{value:!0});te.slugify=te.toUpperCase=te.toLowerCase=te.trim=te.normalize=te.overwrite=te.mime=te.property=te.endsWith=te.startsWith=te.includes=te.uppercase=te.lowercase=te.regex=te.length=te.minLength=te.maxLength=te.size=te.minSize=te.maxSize=te.multipleOf=te.nonnegative=te.nonpositive=te.negative=te.positive=te.gte=te.gt=te.lte=te.lt=void 0;var Fe=mr();Object.defineProperty(te,"lt",{enumerable:!0,get:function(){return Fe._lt}});Object.defineProperty(te,"lte",{enumerable:!0,get:function(){return Fe._lte}});Object.defineProperty(te,"gt",{enumerable:!0,get:function(){return Fe._gt}});Object.defineProperty(te,"gte",{enumerable:!0,get:function(){return Fe._gte}});Object.defineProperty(te,"positive",{enumerable:!0,get:function(){return Fe._positive}});Object.defineProperty(te,"negative",{enumerable:!0,get:function(){return Fe._negative}});Object.defineProperty(te,"nonpositive",{enumerable:!0,get:function(){return Fe._nonpositive}});Object.defineProperty(te,"nonnegative",{enumerable:!0,get:function(){return Fe._nonnegative}});Object.defineProperty(te,"multipleOf",{enumerable:!0,get:function(){return Fe._multipleOf}});Object.defineProperty(te,"maxSize",{enumerable:!0,get:function(){return Fe._maxSize}});Object.defineProperty(te,"minSize",{enumerable:!0,get:function(){return Fe._minSize}});Object.defineProperty(te,"size",{enumerable:!0,get:function(){return Fe._size}});Object.defineProperty(te,"maxLength",{enumerable:!0,get:function(){return Fe._maxLength}});Object.defineProperty(te,"minLength",{enumerable:!0,get:function(){return Fe._minLength}});Object.defineProperty(te,"length",{enumerable:!0,get:function(){return Fe._length}});Object.defineProperty(te,"regex",{enumerable:!0,get:function(){return Fe._regex}});Object.defineProperty(te,"lowercase",{enumerable:!0,get:function(){return Fe._lowercase}});Object.defineProperty(te,"uppercase",{enumerable:!0,get:function(){return Fe._uppercase}});Object.defineProperty(te,"includes",{enumerable:!0,get:function(){return Fe._includes}});Object.defineProperty(te,"startsWith",{enumerable:!0,get:function(){return Fe._startsWith}});Object.defineProperty(te,"endsWith",{enumerable:!0,get:function(){return Fe._endsWith}});Object.defineProperty(te,"property",{enumerable:!0,get:function(){return Fe._property}});Object.defineProperty(te,"mime",{enumerable:!0,get:function(){return Fe._mime}});Object.defineProperty(te,"overwrite",{enumerable:!0,get:function(){return Fe._overwrite}});Object.defineProperty(te,"normalize",{enumerable:!0,get:function(){return Fe._normalize}});Object.defineProperty(te,"trim",{enumerable:!0,get:function(){return Fe._trim}});Object.defineProperty(te,"toLowerCase",{enumerable:!0,get:function(){return Fe._toLowerCase}});Object.defineProperty(te,"toUpperCase",{enumerable:!0,get:function(){return Fe._toUpperCase}});Object.defineProperty(te,"slugify",{enumerable:!0,get:function(){return Fe._slugify}})});var yd=m(nt=>{"use strict";var wue=nt&&nt.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Bue=nt&&nt.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),VU=nt&&nt.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&wue(e,t,r);return Bue(e,t),e};Object.defineProperty(nt,"__esModule",{value:!0});nt.ZodISODuration=nt.ZodISOTime=nt.ZodISODate=nt.ZodISODateTime=void 0;nt.datetime=Que;nt.date=vue;nt.time=_ue;nt.duration=Due;var hn=VU(mr()),zh=VU(Ed());nt.ZodISODateTime=hn.$constructor("ZodISODateTime",(t,e)=>{hn.$ZodISODateTime.init(t,e),zh.ZodStringFormat.init(t,e)});function Que(t){return hn._isoDateTime(nt.ZodISODateTime,t)}nt.ZodISODate=hn.$constructor("ZodISODate",(t,e)=>{hn.$ZodISODate.init(t,e),zh.ZodStringFormat.init(t,e)});function vue(t){return hn._isoDate(nt.ZodISODate,t)}nt.ZodISOTime=hn.$constructor("ZodISOTime",(t,e)=>{hn.$ZodISOTime.init(t,e),zh.ZodStringFormat.init(t,e)});function _ue(t){return hn._isoTime(nt.ZodISOTime,t)}nt.ZodISODuration=hn.$constructor("ZodISODuration",(t,e)=>{hn.$ZodISODuration.init(t,e),zh.ZodStringFormat.init(t,e)});function Due(t){return hn._isoDuration(nt.ZodISODuration,t)}});var ib=m(gn=>{"use strict";var Tue=gn&&gn.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Rue=gn&&gn.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),WU=gn&&gn.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Tue(e,t,r);return Rue(e,t),e};Object.defineProperty(gn,"__esModule",{value:!0});gn.ZodRealError=gn.ZodError=void 0;var Gh=WU(mr()),kue=mr(),JU=WU(ee()),ZU=(t,e)=>{kue.$ZodError.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:r=>Gh.formatError(t,r)},flatten:{value:r=>Gh.flattenError(t,r)},addIssue:{value:r=>{t.issues.push(r),t.message=JSON.stringify(t.issues,JU.jsonStringifyReplacer,2)}},addIssues:{value:r=>{t.issues.push(...r),t.message=JSON.stringify(t.issues,JU.jsonStringifyReplacer,2)}},isEmpty:{get(){return t.issues.length===0}}})};gn.ZodError=Gh.$constructor("ZodError",ZU);gn.ZodRealError=Gh.$constructor("ZodError",ZU,{Parent:Error})});var ob=m(Oe=>{"use strict";var Nue=Oe&&Oe.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Oue=Oe&&Oe.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Uue=Oe&&Oe.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Nue(e,t,r);return Oue(e,t),e};Object.defineProperty(Oe,"__esModule",{value:!0});Oe.safeDecodeAsync=Oe.safeEncodeAsync=Oe.safeDecode=Oe.safeEncode=Oe.decodeAsync=Oe.encodeAsync=Oe.decode=Oe.encode=Oe.safeParseAsync=Oe.safeParse=Oe.parseAsync=Oe.parse=void 0;var mn=Uue(mr()),yn=ib();Oe.parse=mn._parse(yn.ZodRealError);Oe.parseAsync=mn._parseAsync(yn.ZodRealError);Oe.safeParse=mn._safeParse(yn.ZodRealError);Oe.safeParseAsync=mn._safeParseAsync(yn.ZodRealError);Oe.encode=mn._encode(yn.ZodRealError);Oe.decode=mn._decode(yn.ZodRealError);Oe.encodeAsync=mn._encodeAsync(yn.ZodRealError);Oe.decodeAsync=mn._decodeAsync(yn.ZodRealError);Oe.safeEncode=mn._safeEncode(yn.ZodRealError);Oe.safeDecode=mn._safeDecode(yn.ZodRealError);Oe.safeEncodeAsync=mn._safeEncodeAsync(yn.ZodRealError);Oe.safeDecodeAsync=mn._safeDecodeAsync(yn.ZodRealError)});var Ed=m(f=>{"use strict";var Mue=f&&f.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),xue=f&&f.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Id=f&&f.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Mue(e,t,r);return xue(e,t),e};Object.defineProperty(f,"__esModule",{value:!0});f.ZodLiteral=f.ZodEnum=f.ZodSet=f.ZodMap=f.ZodRecord=f.ZodTuple=f.ZodIntersection=f.ZodDiscriminatedUnion=f.ZodXor=f.ZodUnion=f.ZodObject=f.ZodArray=f.ZodDate=f.ZodVoid=f.ZodNever=f.ZodUnknown=f.ZodAny=f.ZodNull=f.ZodUndefined=f.ZodSymbol=f.ZodBigIntFormat=f.ZodBigInt=f.ZodBoolean=f.ZodNumberFormat=f.ZodNumber=f.ZodCustomStringFormat=f.ZodJWT=f.ZodE164=f.ZodBase64URL=f.ZodBase64=f.ZodCIDRv6=f.ZodCIDRv4=f.ZodIPv6=f.ZodMAC=f.ZodIPv4=f.ZodKSUID=f.ZodXID=f.ZodULID=f.ZodCUID2=f.ZodCUID=f.ZodNanoID=f.ZodEmoji=f.ZodURL=f.ZodUUID=f.ZodGUID=f.ZodEmail=f.ZodStringFormat=f.ZodString=f._ZodString=f.ZodType=void 0;f.stringbool=f.meta=f.describe=f.ZodCustom=f.ZodFunction=f.ZodPromise=f.ZodLazy=f.ZodTemplateLiteral=f.ZodReadonly=f.ZodPreprocess=f.ZodCodec=f.ZodPipe=f.ZodNaN=f.ZodCatch=f.ZodSuccess=f.ZodNonOptional=f.ZodPrefault=f.ZodDefault=f.ZodNullable=f.ZodExactOptional=f.ZodOptional=f.ZodTransform=f.ZodFile=void 0;f.string=Yh;f.email=Lue;f.guid=Pue;f.uuid=Fue;f.uuidv4=$ue;f.uuidv6=jue;f.uuidv7=que;f.url=zue;f.httpUrl=Gue;f.emoji=Hue;f.nanoid=Yue;f.cuid=Vue;f.cuid2=Jue;f.ulid=Wue;f.xid=Zue;f.ksuid=Kue;f.ipv4=Xue;f.mac=ele;f.ipv6=tle;f.cidrv4=rle;f.cidrv6=nle;f.base64=ile;f.base64url=ole;f.e164=sle;f.jwt=ale;f.stringFormat=cle;f.hostname=ule;f.hex=lle;f.hash=dle;f.number=XU;f.int=ab;f.float32=Ale;f.float64=ple;f.int32=fle;f.uint32=hle;f.boolean=eM;f.bigint=gle;f.int64=mle;f.uint64=yle;f.symbol=Ele;f.undefined=Ile;f.null=tM;f.any=Cle;f.unknown=eu;f.never=ub;f.void=ble;f.date=Sle;f.array=Wh;f.keyof=wle;f.object=Ble;f.strictObject=Qle;f.looseObject=vle;f.union=lb;f.xor=_le;f.discriminatedUnion=Dle;f.intersection=rM;f.tuple=nM;f.record=iM;f.partialRecord=Tle;f.looseRecord=Rle;f.map=kle;f.set=Nle;f.enum=db;f.nativeEnum=Ole;f.literal=Ule;f.file=Mle;f.transform=Ab;f.optional=Vh;f.exactOptional=oM;f.nullable=Jh;f.nullish=xle;f._default=sM;f.prefault=aM;f.nonoptional=cM;f.success=Lle;f.catch=uM;f.nan=Ple;f.pipe=cb;f.codec=Fle;f.invertCodec=$le;f.readonly=lM;f.templateLiteral=jle;f.lazy=dM;f.promise=qle;f._function=Zh;f.function=Zh;f._function=Zh;f.function=Zh;f.check=zle;f.custom=Gle;f.refine=AM;f.superRefine=pM;f.instanceof=Hle;f.json=Vle;f.preprocess=Jle;var C=Id(mr()),ve=mr(),Se=Id(md()),sb=gd(),me=Id(qh()),Hh=Id(yd()),En=Id(ob()),KU=new WeakMap;function Cd(t,e,r){let n=Object.getPrototypeOf(t),i=KU.get(n);if(i||(i=new Set,KU.set(n,i)),!i.has(e)){i.add(e);for(let o in r){let s=r[o];Object.defineProperty(n,o,{configurable:!0,enumerable:!1,get(){let a=s.bind(this);return Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:a}),a},set(a){Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:a})}})}}}f.ZodType=C.$constructor("ZodType",(t,e)=>(C.$ZodType.init(t,e),Object.assign(t["~standard"],{jsonSchema:{input:(0,sb.createStandardJSONSchemaMethod)(t,"input"),output:(0,sb.createStandardJSONSchemaMethod)(t,"output")}}),t.toJSONSchema=(0,sb.createToJSONSchemaMethod)(t,{}),t.def=e,t.type=e.type,Object.defineProperty(t,"_def",{value:e}),t.parse=(r,n)=>En.parse(t,r,n,{callee:t.parse}),t.safeParse=(r,n)=>En.safeParse(t,r,n),t.parseAsync=async(r,n)=>En.parseAsync(t,r,n,{callee:t.parseAsync}),t.safeParseAsync=async(r,n)=>En.safeParseAsync(t,r,n),t.spa=t.safeParseAsync,t.encode=(r,n)=>En.encode(t,r,n),t.decode=(r,n)=>En.decode(t,r,n),t.encodeAsync=async(r,n)=>En.encodeAsync(t,r,n),t.decodeAsync=async(r,n)=>En.decodeAsync(t,r,n),t.safeEncode=(r,n)=>En.safeEncode(t,r,n),t.safeDecode=(r,n)=>En.safeDecode(t,r,n),t.safeEncodeAsync=async(r,n)=>En.safeEncodeAsync(t,r,n),t.safeDecodeAsync=async(r,n)=>En.safeDecodeAsync(t,r,n),Cd(t,"ZodType",{check(...r){let n=this.def;return this.clone(ve.util.mergeDefs(n,{checks:[...n.checks??[],...r.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0})},with(...r){return this.check(...r)},clone(r,n){return C.clone(this,r,n)},brand(){return this},register(r,n){return r.add(this,n),this},refine(r,n){return this.check(AM(r,n))},superRefine(r,n){return this.check(pM(r,n))},overwrite(r){return this.check(me.overwrite(r))},optional(){return Vh(this)},exactOptional(){return oM(this)},nullable(){return Jh(this)},nullish(){return Vh(Jh(this))},nonoptional(r){return cM(this,r)},array(){return Wh(this)},or(r){return lb([this,r])},and(r){return rM(this,r)},transform(r){return cb(this,Ab(r))},default(r){return sM(this,r)},prefault(r){return aM(this,r)},catch(r){return uM(this,r)},pipe(r){return cb(this,r)},readonly(){return lM(this)},describe(r){let n=this.clone();return C.globalRegistry.add(n,{description:r}),n},meta(...r){if(r.length===0)return C.globalRegistry.get(this);let n=this.clone();return C.globalRegistry.add(n,r[0]),n},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(r){return r(this)}}),Object.defineProperty(t,"description",{get(){return C.globalRegistry.get(t)?.description},configurable:!0}),t));f._ZodString=C.$constructor("_ZodString",(t,e)=>{C.$ZodString.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(n,i,o)=>Se.stringProcessor(t,n,i,o);let r=t._zod.bag;t.format=r.format??null,t.minLength=r.minimum??null,t.maxLength=r.maximum??null,Cd(t,"_ZodString",{regex(...n){return this.check(me.regex(...n))},includes(...n){return this.check(me.includes(...n))},startsWith(...n){return this.check(me.startsWith(...n))},endsWith(...n){return this.check(me.endsWith(...n))},min(...n){return this.check(me.minLength(...n))},max(...n){return this.check(me.maxLength(...n))},length(...n){return this.check(me.length(...n))},nonempty(...n){return this.check(me.minLength(1,...n))},lowercase(n){return this.check(me.lowercase(n))},uppercase(n){return this.check(me.uppercase(n))},trim(){return this.check(me.trim())},normalize(...n){return this.check(me.normalize(...n))},toLowerCase(){return this.check(me.toLowerCase())},toUpperCase(){return this.check(me.toUpperCase())},slugify(){return this.check(me.slugify())}})});f.ZodString=C.$constructor("ZodString",(t,e)=>{C.$ZodString.init(t,e),f._ZodString.init(t,e),t.email=r=>t.check(C._email(f.ZodEmail,r)),t.url=r=>t.check(C._url(f.ZodURL,r)),t.jwt=r=>t.check(C._jwt(f.ZodJWT,r)),t.emoji=r=>t.check(C._emoji(f.ZodEmoji,r)),t.guid=r=>t.check(C._guid(f.ZodGUID,r)),t.uuid=r=>t.check(C._uuid(f.ZodUUID,r)),t.uuidv4=r=>t.check(C._uuidv4(f.ZodUUID,r)),t.uuidv6=r=>t.check(C._uuidv6(f.ZodUUID,r)),t.uuidv7=r=>t.check(C._uuidv7(f.ZodUUID,r)),t.nanoid=r=>t.check(C._nanoid(f.ZodNanoID,r)),t.guid=r=>t.check(C._guid(f.ZodGUID,r)),t.cuid=r=>t.check(C._cuid(f.ZodCUID,r)),t.cuid2=r=>t.check(C._cuid2(f.ZodCUID2,r)),t.ulid=r=>t.check(C._ulid(f.ZodULID,r)),t.base64=r=>t.check(C._base64(f.ZodBase64,r)),t.base64url=r=>t.check(C._base64url(f.ZodBase64URL,r)),t.xid=r=>t.check(C._xid(f.ZodXID,r)),t.ksuid=r=>t.check(C._ksuid(f.ZodKSUID,r)),t.ipv4=r=>t.check(C._ipv4(f.ZodIPv4,r)),t.ipv6=r=>t.check(C._ipv6(f.ZodIPv6,r)),t.cidrv4=r=>t.check(C._cidrv4(f.ZodCIDRv4,r)),t.cidrv6=r=>t.check(C._cidrv6(f.ZodCIDRv6,r)),t.e164=r=>t.check(C._e164(f.ZodE164,r)),t.datetime=r=>t.check(Hh.datetime(r)),t.date=r=>t.check(Hh.date(r)),t.time=r=>t.check(Hh.time(r)),t.duration=r=>t.check(Hh.duration(r))});function Yh(t){return C._string(f.ZodString,t)}f.ZodStringFormat=C.$constructor("ZodStringFormat",(t,e)=>{C.$ZodStringFormat.init(t,e),f._ZodString.init(t,e)});f.ZodEmail=C.$constructor("ZodEmail",(t,e)=>{C.$ZodEmail.init(t,e),f.ZodStringFormat.init(t,e)});function Lue(t){return C._email(f.ZodEmail,t)}f.ZodGUID=C.$constructor("ZodGUID",(t,e)=>{C.$ZodGUID.init(t,e),f.ZodStringFormat.init(t,e)});function Pue(t){return C._guid(f.ZodGUID,t)}f.ZodUUID=C.$constructor("ZodUUID",(t,e)=>{C.$ZodUUID.init(t,e),f.ZodStringFormat.init(t,e)});function Fue(t){return C._uuid(f.ZodUUID,t)}function $ue(t){return C._uuidv4(f.ZodUUID,t)}function jue(t){return C._uuidv6(f.ZodUUID,t)}function que(t){return C._uuidv7(f.ZodUUID,t)}f.ZodURL=C.$constructor("ZodURL",(t,e)=>{C.$ZodURL.init(t,e),f.ZodStringFormat.init(t,e)});function zue(t){return C._url(f.ZodURL,t)}function Gue(t){return C._url(f.ZodURL,{protocol:C.regexes.httpProtocol,hostname:C.regexes.domain,...ve.util.normalizeParams(t)})}f.ZodEmoji=C.$constructor("ZodEmoji",(t,e)=>{C.$ZodEmoji.init(t,e),f.ZodStringFormat.init(t,e)});function Hue(t){return C._emoji(f.ZodEmoji,t)}f.ZodNanoID=C.$constructor("ZodNanoID",(t,e)=>{C.$ZodNanoID.init(t,e),f.ZodStringFormat.init(t,e)});function Yue(t){return C._nanoid(f.ZodNanoID,t)}f.ZodCUID=C.$constructor("ZodCUID",(t,e)=>{C.$ZodCUID.init(t,e),f.ZodStringFormat.init(t,e)});function Vue(t){return C._cuid(f.ZodCUID,t)}f.ZodCUID2=C.$constructor("ZodCUID2",(t,e)=>{C.$ZodCUID2.init(t,e),f.ZodStringFormat.init(t,e)});function Jue(t){return C._cuid2(f.ZodCUID2,t)}f.ZodULID=C.$constructor("ZodULID",(t,e)=>{C.$ZodULID.init(t,e),f.ZodStringFormat.init(t,e)});function Wue(t){return C._ulid(f.ZodULID,t)}f.ZodXID=C.$constructor("ZodXID",(t,e)=>{C.$ZodXID.init(t,e),f.ZodStringFormat.init(t,e)});function Zue(t){return C._xid(f.ZodXID,t)}f.ZodKSUID=C.$constructor("ZodKSUID",(t,e)=>{C.$ZodKSUID.init(t,e),f.ZodStringFormat.init(t,e)});function Kue(t){return C._ksuid(f.ZodKSUID,t)}f.ZodIPv4=C.$constructor("ZodIPv4",(t,e)=>{C.$ZodIPv4.init(t,e),f.ZodStringFormat.init(t,e)});function Xue(t){return C._ipv4(f.ZodIPv4,t)}f.ZodMAC=C.$constructor("ZodMAC",(t,e)=>{C.$ZodMAC.init(t,e),f.ZodStringFormat.init(t,e)});function ele(t){return C._mac(f.ZodMAC,t)}f.ZodIPv6=C.$constructor("ZodIPv6",(t,e)=>{C.$ZodIPv6.init(t,e),f.ZodStringFormat.init(t,e)});function tle(t){return C._ipv6(f.ZodIPv6,t)}f.ZodCIDRv4=C.$constructor("ZodCIDRv4",(t,e)=>{C.$ZodCIDRv4.init(t,e),f.ZodStringFormat.init(t,e)});function rle(t){return C._cidrv4(f.ZodCIDRv4,t)}f.ZodCIDRv6=C.$constructor("ZodCIDRv6",(t,e)=>{C.$ZodCIDRv6.init(t,e),f.ZodStringFormat.init(t,e)});function nle(t){return C._cidrv6(f.ZodCIDRv6,t)}f.ZodBase64=C.$constructor("ZodBase64",(t,e)=>{C.$ZodBase64.init(t,e),f.ZodStringFormat.init(t,e)});function ile(t){return C._base64(f.ZodBase64,t)}f.ZodBase64URL=C.$constructor("ZodBase64URL",(t,e)=>{C.$ZodBase64URL.init(t,e),f.ZodStringFormat.init(t,e)});function ole(t){return C._base64url(f.ZodBase64URL,t)}f.ZodE164=C.$constructor("ZodE164",(t,e)=>{C.$ZodE164.init(t,e),f.ZodStringFormat.init(t,e)});function sle(t){return C._e164(f.ZodE164,t)}f.ZodJWT=C.$constructor("ZodJWT",(t,e)=>{C.$ZodJWT.init(t,e),f.ZodStringFormat.init(t,e)});function ale(t){return C._jwt(f.ZodJWT,t)}f.ZodCustomStringFormat=C.$constructor("ZodCustomStringFormat",(t,e)=>{C.$ZodCustomStringFormat.init(t,e),f.ZodStringFormat.init(t,e)});function cle(t,e,r={}){return C._stringFormat(f.ZodCustomStringFormat,t,e,r)}function ule(t){return C._stringFormat(f.ZodCustomStringFormat,"hostname",C.regexes.hostname,t)}function lle(t){return C._stringFormat(f.ZodCustomStringFormat,"hex",C.regexes.hex,t)}function dle(t,e){let r=e?.enc??"hex",n=`${t}_${r}`,i=C.regexes[n];if(!i)throw new Error(`Unrecognized hash format: ${n}`);return C._stringFormat(f.ZodCustomStringFormat,n,i,e)}f.ZodNumber=C.$constructor("ZodNumber",(t,e)=>{C.$ZodNumber.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(n,i,o)=>Se.numberProcessor(t,n,i,o),Cd(t,"ZodNumber",{gt(n,i){return this.check(me.gt(n,i))},gte(n,i){return this.check(me.gte(n,i))},min(n,i){return this.check(me.gte(n,i))},lt(n,i){return this.check(me.lt(n,i))},lte(n,i){return this.check(me.lte(n,i))},max(n,i){return this.check(me.lte(n,i))},int(n){return this.check(ab(n))},safe(n){return this.check(ab(n))},positive(n){return this.check(me.gt(0,n))},nonnegative(n){return this.check(me.gte(0,n))},negative(n){return this.check(me.lt(0,n))},nonpositive(n){return this.check(me.lte(0,n))},multipleOf(n,i){return this.check(me.multipleOf(n,i))},step(n,i){return this.check(me.multipleOf(n,i))},finite(){return this}});let r=t._zod.bag;t.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,t.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,t.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),t.isFinite=!0,t.format=r.format??null});function XU(t){return C._number(f.ZodNumber,t)}f.ZodNumberFormat=C.$constructor("ZodNumberFormat",(t,e)=>{C.$ZodNumberFormat.init(t,e),f.ZodNumber.init(t,e)});function ab(t){return C._int(f.ZodNumberFormat,t)}function Ale(t){return C._float32(f.ZodNumberFormat,t)}function ple(t){return C._float64(f.ZodNumberFormat,t)}function fle(t){return C._int32(f.ZodNumberFormat,t)}function hle(t){return C._uint32(f.ZodNumberFormat,t)}f.ZodBoolean=C.$constructor("ZodBoolean",(t,e)=>{C.$ZodBoolean.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.booleanProcessor(t,r,n,i)});function eM(t){return C._boolean(f.ZodBoolean,t)}f.ZodBigInt=C.$constructor("ZodBigInt",(t,e)=>{C.$ZodBigInt.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(n,i,o)=>Se.bigintProcessor(t,n,i,o),t.gte=(n,i)=>t.check(me.gte(n,i)),t.min=(n,i)=>t.check(me.gte(n,i)),t.gt=(n,i)=>t.check(me.gt(n,i)),t.gte=(n,i)=>t.check(me.gte(n,i)),t.min=(n,i)=>t.check(me.gte(n,i)),t.lt=(n,i)=>t.check(me.lt(n,i)),t.lte=(n,i)=>t.check(me.lte(n,i)),t.max=(n,i)=>t.check(me.lte(n,i)),t.positive=n=>t.check(me.gt(BigInt(0),n)),t.negative=n=>t.check(me.lt(BigInt(0),n)),t.nonpositive=n=>t.check(me.lte(BigInt(0),n)),t.nonnegative=n=>t.check(me.gte(BigInt(0),n)),t.multipleOf=(n,i)=>t.check(me.multipleOf(n,i));let r=t._zod.bag;t.minValue=r.minimum??null,t.maxValue=r.maximum??null,t.format=r.format??null});function gle(t){return C._bigint(f.ZodBigInt,t)}f.ZodBigIntFormat=C.$constructor("ZodBigIntFormat",(t,e)=>{C.$ZodBigIntFormat.init(t,e),f.ZodBigInt.init(t,e)});function mle(t){return C._int64(f.ZodBigIntFormat,t)}function yle(t){return C._uint64(f.ZodBigIntFormat,t)}f.ZodSymbol=C.$constructor("ZodSymbol",(t,e)=>{C.$ZodSymbol.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.symbolProcessor(t,r,n,i)});function Ele(t){return C._symbol(f.ZodSymbol,t)}f.ZodUndefined=C.$constructor("ZodUndefined",(t,e)=>{C.$ZodUndefined.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.undefinedProcessor(t,r,n,i)});function Ile(t){return C._undefined(f.ZodUndefined,t)}f.ZodNull=C.$constructor("ZodNull",(t,e)=>{C.$ZodNull.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.nullProcessor(t,r,n,i)});function tM(t){return C._null(f.ZodNull,t)}f.ZodAny=C.$constructor("ZodAny",(t,e)=>{C.$ZodAny.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.anyProcessor(t,r,n,i)});function Cle(){return C._any(f.ZodAny)}f.ZodUnknown=C.$constructor("ZodUnknown",(t,e)=>{C.$ZodUnknown.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.unknownProcessor(t,r,n,i)});function eu(){return C._unknown(f.ZodUnknown)}f.ZodNever=C.$constructor("ZodNever",(t,e)=>{C.$ZodNever.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.neverProcessor(t,r,n,i)});function ub(t){return C._never(f.ZodNever,t)}f.ZodVoid=C.$constructor("ZodVoid",(t,e)=>{C.$ZodVoid.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.voidProcessor(t,r,n,i)});function ble(t){return C._void(f.ZodVoid,t)}f.ZodDate=C.$constructor("ZodDate",(t,e)=>{C.$ZodDate.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(n,i,o)=>Se.dateProcessor(t,n,i,o),t.min=(n,i)=>t.check(me.gte(n,i)),t.max=(n,i)=>t.check(me.lte(n,i));let r=t._zod.bag;t.minDate=r.minimum?new Date(r.minimum):null,t.maxDate=r.maximum?new Date(r.maximum):null});function Sle(t){return C._date(f.ZodDate,t)}f.ZodArray=C.$constructor("ZodArray",(t,e)=>{C.$ZodArray.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.arrayProcessor(t,r,n,i),t.element=e.element,Cd(t,"ZodArray",{min(r,n){return this.check(me.minLength(r,n))},nonempty(r){return this.check(me.minLength(1,r))},max(r,n){return this.check(me.maxLength(r,n))},length(r,n){return this.check(me.length(r,n))},unwrap(){return this.element}})});function Wh(t,e){return C._array(f.ZodArray,t,e)}function wle(t){let e=t._zod.def.shape;return db(Object.keys(e))}f.ZodObject=C.$constructor("ZodObject",(t,e)=>{C.$ZodObjectJIT.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.objectProcessor(t,r,n,i),ve.util.defineLazy(t,"shape",()=>e.shape),Cd(t,"ZodObject",{keyof(){return db(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:eu()})},loose(){return this.clone({...this._zod.def,catchall:eu()})},strict(){return this.clone({...this._zod.def,catchall:ub()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return ve.util.extend(this,r)},safeExtend(r){return ve.util.safeExtend(this,r)},merge(r){return ve.util.merge(this,r)},pick(r){return ve.util.pick(this,r)},omit(r){return ve.util.omit(this,r)},partial(...r){return ve.util.partial(f.ZodOptional,this,r[0])},required(...r){return ve.util.required(f.ZodNonOptional,this,r[0])}})});function Ble(t,e){let r={type:"object",shape:t??{},...ve.util.normalizeParams(e)};return new f.ZodObject(r)}function Qle(t,e){return new f.ZodObject({type:"object",shape:t,catchall:ub(),...ve.util.normalizeParams(e)})}function vle(t,e){return new f.ZodObject({type:"object",shape:t,catchall:eu(),...ve.util.normalizeParams(e)})}f.ZodUnion=C.$constructor("ZodUnion",(t,e)=>{C.$ZodUnion.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.unionProcessor(t,r,n,i),t.options=e.options});function lb(t,e){return new f.ZodUnion({type:"union",options:t,...ve.util.normalizeParams(e)})}f.ZodXor=C.$constructor("ZodXor",(t,e)=>{f.ZodUnion.init(t,e),C.$ZodXor.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.unionProcessor(t,r,n,i),t.options=e.options});function _le(t,e){return new f.ZodXor({type:"union",options:t,inclusive:!1,...ve.util.normalizeParams(e)})}f.ZodDiscriminatedUnion=C.$constructor("ZodDiscriminatedUnion",(t,e)=>{f.ZodUnion.init(t,e),C.$ZodDiscriminatedUnion.init(t,e)});function Dle(t,e,r){return new f.ZodDiscriminatedUnion({type:"union",options:e,discriminator:t,...ve.util.normalizeParams(r)})}f.ZodIntersection=C.$constructor("ZodIntersection",(t,e)=>{C.$ZodIntersection.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.intersectionProcessor(t,r,n,i)});function rM(t,e){return new f.ZodIntersection({type:"intersection",left:t,right:e})}f.ZodTuple=C.$constructor("ZodTuple",(t,e)=>{C.$ZodTuple.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.tupleProcessor(t,r,n,i),t.rest=r=>t.clone({...t._zod.def,rest:r})});function nM(t,e,r){let n=e instanceof C.$ZodType,i=n?r:e,o=n?e:null;return new f.ZodTuple({type:"tuple",items:t,rest:o,...ve.util.normalizeParams(i)})}f.ZodRecord=C.$constructor("ZodRecord",(t,e)=>{C.$ZodRecord.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.recordProcessor(t,r,n,i),t.keyType=e.keyType,t.valueType=e.valueType});function iM(t,e,r){return!e||!e._zod?new f.ZodRecord({type:"record",keyType:Yh(),valueType:t,...ve.util.normalizeParams(e)}):new f.ZodRecord({type:"record",keyType:t,valueType:e,...ve.util.normalizeParams(r)})}function Tle(t,e,r){let n=C.clone(t);return n._zod.values=void 0,new f.ZodRecord({type:"record",keyType:n,valueType:e,...ve.util.normalizeParams(r)})}function Rle(t,e,r){return new f.ZodRecord({type:"record",keyType:t,valueType:e,mode:"loose",...ve.util.normalizeParams(r)})}f.ZodMap=C.$constructor("ZodMap",(t,e)=>{C.$ZodMap.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.mapProcessor(t,r,n,i),t.keyType=e.keyType,t.valueType=e.valueType,t.min=(...r)=>t.check(C._minSize(...r)),t.nonempty=r=>t.check(C._minSize(1,r)),t.max=(...r)=>t.check(C._maxSize(...r)),t.size=(...r)=>t.check(C._size(...r))});function kle(t,e,r){return new f.ZodMap({type:"map",keyType:t,valueType:e,...ve.util.normalizeParams(r)})}f.ZodSet=C.$constructor("ZodSet",(t,e)=>{C.$ZodSet.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.setProcessor(t,r,n,i),t.min=(...r)=>t.check(C._minSize(...r)),t.nonempty=r=>t.check(C._minSize(1,r)),t.max=(...r)=>t.check(C._maxSize(...r)),t.size=(...r)=>t.check(C._size(...r))});function Nle(t,e){return new f.ZodSet({type:"set",valueType:t,...ve.util.normalizeParams(e)})}f.ZodEnum=C.$constructor("ZodEnum",(t,e)=>{C.$ZodEnum.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(n,i,o)=>Se.enumProcessor(t,n,i,o),t.enum=e.entries,t.options=Object.values(e.entries);let r=new Set(Object.keys(e.entries));t.extract=(n,i)=>{let o={};for(let s of n)if(r.has(s))o[s]=e.entries[s];else throw new Error(`Key ${s} not found in enum`);return new f.ZodEnum({...e,checks:[],...ve.util.normalizeParams(i),entries:o})},t.exclude=(n,i)=>{let o={...e.entries};for(let s of n)if(r.has(s))delete o[s];else throw new Error(`Key ${s} not found in enum`);return new f.ZodEnum({...e,checks:[],...ve.util.normalizeParams(i),entries:o})}});function db(t,e){let r=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new f.ZodEnum({type:"enum",entries:r,...ve.util.normalizeParams(e)})}function Ole(t,e){return new f.ZodEnum({type:"enum",entries:t,...ve.util.normalizeParams(e)})}f.ZodLiteral=C.$constructor("ZodLiteral",(t,e)=>{C.$ZodLiteral.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.literalProcessor(t,r,n,i),t.values=new Set(e.values),Object.defineProperty(t,"value",{get(){if(e.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return e.values[0]}})});function Ule(t,e){return new f.ZodLiteral({type:"literal",values:Array.isArray(t)?t:[t],...ve.util.normalizeParams(e)})}f.ZodFile=C.$constructor("ZodFile",(t,e)=>{C.$ZodFile.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.fileProcessor(t,r,n,i),t.min=(r,n)=>t.check(C._minSize(r,n)),t.max=(r,n)=>t.check(C._maxSize(r,n)),t.mime=(r,n)=>t.check(C._mime(Array.isArray(r)?r:[r],n))});function Mle(t){return C._file(f.ZodFile,t)}f.ZodTransform=C.$constructor("ZodTransform",(t,e)=>{C.$ZodTransform.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.transformProcessor(t,r,n,i),t._zod.parse=(r,n)=>{if(n.direction==="backward")throw new C.$ZodEncodeError(t.constructor.name);r.addIssue=o=>{if(typeof o=="string")r.issues.push(ve.util.issue(o,r.value,e));else{let s=o;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=t),r.issues.push(ve.util.issue(s))}};let i=e.transform(r.value,r);return i instanceof Promise?i.then(o=>(r.value=o,r.fallback=!0,r)):(r.value=i,r.fallback=!0,r)}});function Ab(t){return new f.ZodTransform({type:"transform",transform:t})}f.ZodOptional=C.$constructor("ZodOptional",(t,e)=>{C.$ZodOptional.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.optionalProcessor(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function Vh(t){return new f.ZodOptional({type:"optional",innerType:t})}f.ZodExactOptional=C.$constructor("ZodExactOptional",(t,e)=>{C.$ZodExactOptional.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.optionalProcessor(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function oM(t){return new f.ZodExactOptional({type:"optional",innerType:t})}f.ZodNullable=C.$constructor("ZodNullable",(t,e)=>{C.$ZodNullable.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.nullableProcessor(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function Jh(t){return new f.ZodNullable({type:"nullable",innerType:t})}function xle(t){return Vh(Jh(t))}f.ZodDefault=C.$constructor("ZodDefault",(t,e)=>{C.$ZodDefault.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.defaultProcessor(t,r,n,i),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function sM(t,e){return new f.ZodDefault({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():ve.util.shallowClone(e)}})}f.ZodPrefault=C.$constructor("ZodPrefault",(t,e)=>{C.$ZodPrefault.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.prefaultProcessor(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function aM(t,e){return new f.ZodPrefault({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():ve.util.shallowClone(e)}})}f.ZodNonOptional=C.$constructor("ZodNonOptional",(t,e)=>{C.$ZodNonOptional.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.nonoptionalProcessor(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function cM(t,e){return new f.ZodNonOptional({type:"nonoptional",innerType:t,...ve.util.normalizeParams(e)})}f.ZodSuccess=C.$constructor("ZodSuccess",(t,e)=>{C.$ZodSuccess.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.successProcessor(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function Lle(t){return new f.ZodSuccess({type:"success",innerType:t})}f.ZodCatch=C.$constructor("ZodCatch",(t,e)=>{C.$ZodCatch.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.catchProcessor(t,r,n,i),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function uM(t,e){return new f.ZodCatch({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}f.ZodNaN=C.$constructor("ZodNaN",(t,e)=>{C.$ZodNaN.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.nanProcessor(t,r,n,i)});function Ple(t){return C._nan(f.ZodNaN,t)}f.ZodPipe=C.$constructor("ZodPipe",(t,e)=>{C.$ZodPipe.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.pipeProcessor(t,r,n,i),t.in=e.in,t.out=e.out});function cb(t,e){return new f.ZodPipe({type:"pipe",in:t,out:e})}f.ZodCodec=C.$constructor("ZodCodec",(t,e)=>{f.ZodPipe.init(t,e),C.$ZodCodec.init(t,e)});function Fle(t,e,r){return new f.ZodCodec({type:"pipe",in:t,out:e,transform:r.decode,reverseTransform:r.encode})}function $le(t){let e=t._zod.def;return new f.ZodCodec({type:"pipe",in:e.out,out:e.in,transform:e.reverseTransform,reverseTransform:e.transform})}f.ZodPreprocess=C.$constructor("ZodPreprocess",(t,e)=>{f.ZodPipe.init(t,e),C.$ZodPreprocess.init(t,e)});f.ZodReadonly=C.$constructor("ZodReadonly",(t,e)=>{C.$ZodReadonly.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.readonlyProcessor(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function lM(t){return new f.ZodReadonly({type:"readonly",innerType:t})}f.ZodTemplateLiteral=C.$constructor("ZodTemplateLiteral",(t,e)=>{C.$ZodTemplateLiteral.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.templateLiteralProcessor(t,r,n,i)});function jle(t,e){return new f.ZodTemplateLiteral({type:"template_literal",parts:t,...ve.util.normalizeParams(e)})}f.ZodLazy=C.$constructor("ZodLazy",(t,e)=>{C.$ZodLazy.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.lazyProcessor(t,r,n,i),t.unwrap=()=>t._zod.def.getter()});function dM(t){return new f.ZodLazy({type:"lazy",getter:t})}f.ZodPromise=C.$constructor("ZodPromise",(t,e)=>{C.$ZodPromise.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.promiseProcessor(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function qle(t){return new f.ZodPromise({type:"promise",innerType:t})}f.ZodFunction=C.$constructor("ZodFunction",(t,e)=>{C.$ZodFunction.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.functionProcessor(t,r,n,i)});function Zh(t){return new f.ZodFunction({type:"function",input:Array.isArray(t?.input)?nM(t?.input):t?.input??Wh(eu()),output:t?.output??eu()})}f.ZodCustom=C.$constructor("ZodCustom",(t,e)=>{C.$ZodCustom.init(t,e),f.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Se.customProcessor(t,r,n,i)});function zle(t){let e=new C.$ZodCheck({check:"custom"});return e._zod.check=t,e}function Gle(t,e){return C._custom(f.ZodCustom,t??(()=>!0),e)}function AM(t,e={}){return C._refine(f.ZodCustom,t,e)}function pM(t,e){return C._superRefine(t,e)}f.describe=C.describe;f.meta=C.meta;function Hle(t,e={}){let r=new f.ZodCustom({type:"custom",check:"custom",fn:n=>n instanceof t,abort:!0,...ve.util.normalizeParams(e)});return r._zod.bag.Class=t,r._zod.check=n=>{n.value instanceof t||n.issues.push({code:"invalid_type",expected:t.name,input:n.value,inst:r,path:[...r._zod.def.path??[]]})},r}var Yle=(...t)=>C._stringbool({Codec:f.ZodCodec,Boolean:f.ZodBoolean,String:f.ZodString},...t);f.stringbool=Yle;function Vle(t){let e=dM(()=>lb([Yh(t),XU(),eM(),tM(),Wh(e),iM(Yh(),e)]));return e}function Jle(t,e){return new f.ZodPreprocess({type:"pipe",in:Ab(t),out:e})}});var mM=m(Ut=>{"use strict";var Wle=Ut&&Ut.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Zle=Ut&&Ut.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Kle=Ut&&Ut.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Wle(e,t,r);return Zle(e,t),e};Object.defineProperty(Ut,"__esModule",{value:!0});Ut.ZodFirstPartyTypeKind=Ut.config=Ut.$brand=Ut.ZodIssueCode=void 0;Ut.setErrorMap=Xle;Ut.getErrorMap=ede;var hM=Kle(mr());Ut.ZodIssueCode={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"};var gM=mr();Object.defineProperty(Ut,"$brand",{enumerable:!0,get:function(){return gM.$brand}});Object.defineProperty(Ut,"config",{enumerable:!0,get:function(){return gM.config}});function Xle(t){hM.config({customError:t})}function ede(){return hM.config().customError}var fM;fM||(Ut.ZodFirstPartyTypeKind=fM={})});var EM=m(ko=>{"use strict";var tde=ko&&ko.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),rde=ko&&ko.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),pb=ko&&ko.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&tde(e,t,r);return rde(e,t),e};Object.defineProperty(ko,"__esModule",{value:!0});ko.fromJSONSchema=lde;var nde=pd(),ide=pb(qh()),ode=pb(yd()),sde=pb(Ed()),z={...sde,...ide,iso:ode},ade=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function cde(t,e){let r=t.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":e??"draft-2020-12"}function ude(t,e){if(!t.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let r=t.slice(1).split("/").filter(Boolean);if(r.length===0)return e.rootSchema;let n=e.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===n){let i=r[1];if(!i||!e.defs[i])throw new Error(`Reference not found: ${t}`);return e.defs[i]}throw new Error(`Reference not found: ${t}`)}function yM(t,e){if(t.not!==void 0){if(typeof t.not=="object"&&Object.keys(t.not).length===0)return z.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(t.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(t.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(t.if!==void 0||t.then!==void 0||t.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(t.dependentSchemas!==void 0||t.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(t.$ref){let i=t.$ref;if(e.refs.has(i))return e.refs.get(i);if(e.processing.has(i))return z.lazy(()=>{if(!e.refs.has(i))throw new Error(`Circular reference not resolved: ${i}`);return e.refs.get(i)});e.processing.add(i);let o=ude(i,e),s=Yt(o,e);return e.refs.set(i,s),e.processing.delete(i),s}if(t.enum!==void 0){let i=t.enum;if(e.version==="openapi-3.0"&&t.nullable===!0&&i.length===1&&i[0]===null)return z.null();if(i.length===0)return z.never();if(i.length===1)return z.literal(i[0]);if(i.every(s=>typeof s=="string"))return z.enum(i);let o=i.map(s=>z.literal(s));return o.length<2?o[0]:z.union([o[0],o[1],...o.slice(2)])}if(t.const!==void 0)return z.literal(t.const);let r=t.type;if(Array.isArray(r)){let i=r.map(o=>{let s={...t,type:o};return yM(s,e)});return i.length===0?z.never():i.length===1?i[0]:z.union(i)}if(!r)return z.any();let n;switch(r){case"string":{let i=z.string();if(t.format){let o=t.format;o==="email"?i=i.check(z.email()):o==="uri"||o==="uri-reference"?i=i.check(z.url()):o==="uuid"||o==="guid"?i=i.check(z.uuid()):o==="date-time"?i=i.check(z.iso.datetime()):o==="date"?i=i.check(z.iso.date()):o==="time"?i=i.check(z.iso.time()):o==="duration"?i=i.check(z.iso.duration()):o==="ipv4"?i=i.check(z.ipv4()):o==="ipv6"?i=i.check(z.ipv6()):o==="mac"?i=i.check(z.mac()):o==="cidr"?i=i.check(z.cidrv4()):o==="cidr-v6"?i=i.check(z.cidrv6()):o==="base64"?i=i.check(z.base64()):o==="base64url"?i=i.check(z.base64url()):o==="e164"?i=i.check(z.e164()):o==="jwt"?i=i.check(z.jwt()):o==="emoji"?i=i.check(z.emoji()):o==="nanoid"?i=i.check(z.nanoid()):o==="cuid"?i=i.check(z.cuid()):o==="cuid2"?i=i.check(z.cuid2()):o==="ulid"?i=i.check(z.ulid()):o==="xid"?i=i.check(z.xid()):o==="ksuid"&&(i=i.check(z.ksuid()))}typeof t.minLength=="number"&&(i=i.min(t.minLength)),typeof t.maxLength=="number"&&(i=i.max(t.maxLength)),t.pattern&&(i=i.regex(new RegExp(t.pattern))),n=i;break}case"number":case"integer":{let i=r==="integer"?z.number().int():z.number();typeof t.minimum=="number"&&(i=i.min(t.minimum)),typeof t.maximum=="number"&&(i=i.max(t.maximum)),typeof t.exclusiveMinimum=="number"?i=i.gt(t.exclusiveMinimum):t.exclusiveMinimum===!0&&typeof t.minimum=="number"&&(i=i.gt(t.minimum)),typeof t.exclusiveMaximum=="number"?i=i.lt(t.exclusiveMaximum):t.exclusiveMaximum===!0&&typeof t.maximum=="number"&&(i=i.lt(t.maximum)),typeof t.multipleOf=="number"&&(i=i.multipleOf(t.multipleOf)),n=i;break}case"boolean":{n=z.boolean();break}case"null":{n=z.null();break}case"object":{let i={},o=t.properties||{},s=new Set(t.required||[]);for(let[c,u]of Object.entries(o)){let l=Yt(u,e);i[c]=s.has(c)?l:l.optional()}if(t.propertyNames){let c=Yt(t.propertyNames,e),u=t.additionalProperties&&typeof t.additionalProperties=="object"?Yt(t.additionalProperties,e):z.any();if(Object.keys(i).length===0){n=z.record(c,u);break}let l=z.object(i).passthrough(),d=z.looseRecord(c,u);n=z.intersection(l,d);break}if(t.patternProperties){let c=t.patternProperties,u=Object.keys(c),l=[];for(let A of u){let p=Yt(c[A],e),h=z.string().regex(new RegExp(A));l.push(z.looseRecord(h,p))}let d=[];if(Object.keys(i).length>0&&d.push(z.object(i).passthrough()),d.push(...l),d.length===0)n=z.object({}).passthrough();else if(d.length===1)n=d[0];else{let A=z.intersection(d[0],d[1]);for(let p=2;p<d.length;p++)A=z.intersection(A,d[p]);n=A}break}let a=z.object(i);t.additionalProperties===!1?n=a.strict():typeof t.additionalProperties=="object"?n=a.catchall(Yt(t.additionalProperties,e)):n=a.passthrough();break}case"array":{let i=t.prefixItems,o=t.items;if(i&&Array.isArray(i)){let s=i.map(c=>Yt(c,e)),a=o&&typeof o=="object"&&!Array.isArray(o)?Yt(o,e):void 0;a?n=z.tuple(s).rest(a):n=z.tuple(s),typeof t.minItems=="number"&&(n=n.check(z.minLength(t.minItems))),typeof t.maxItems=="number"&&(n=n.check(z.maxLength(t.maxItems)))}else if(Array.isArray(o)){let s=o.map(c=>Yt(c,e)),a=t.additionalItems&&typeof t.additionalItems=="object"?Yt(t.additionalItems,e):void 0;a?n=z.tuple(s).rest(a):n=z.tuple(s),typeof t.minItems=="number"&&(n=n.check(z.minLength(t.minItems))),typeof t.maxItems=="number"&&(n=n.check(z.maxLength(t.maxItems)))}else if(o!==void 0){let s=Yt(o,e),a=z.array(s);typeof t.minItems=="number"&&(a=a.min(t.minItems)),typeof t.maxItems=="number"&&(a=a.max(t.maxItems)),n=a}else n=z.array(z.any());break}default:throw new Error(`Unsupported type: ${r}`)}return n}function Yt(t,e){if(typeof t=="boolean")return t?z.any():z.never();let r=yM(t,e),n=t.type||t.enum!==void 0||t.const!==void 0;if(t.anyOf&&Array.isArray(t.anyOf)){let a=t.anyOf.map(u=>Yt(u,e)),c=z.union(a);r=n?z.intersection(r,c):c}if(t.oneOf&&Array.isArray(t.oneOf)){let a=t.oneOf.map(u=>Yt(u,e)),c=z.xor(a);r=n?z.intersection(r,c):c}if(t.allOf&&Array.isArray(t.allOf))if(t.allOf.length===0)r=n?r:z.any();else{let a=n?r:Yt(t.allOf[0],e),c=n?0:1;for(let u=c;u<t.allOf.length;u++)a=z.intersection(a,Yt(t.allOf[u],e));r=a}t.nullable===!0&&e.version==="openapi-3.0"&&(r=z.nullable(r)),t.readOnly===!0&&(r=z.readonly(r)),t.default!==void 0&&(r=r.default(t.default));let i={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let a of o)a in t&&(i[a]=t[a]);let s=["contentEncoding","contentMediaType","contentSchema"];for(let a of s)a in t&&(i[a]=t[a]);for(let a of Object.keys(t))ade.has(a)||(i[a]=t[a]);return Object.keys(i).length>0&&e.registry.add(r,i),t.description&&(r=r.describe(t.description)),r}function lde(t,e){if(typeof t=="boolean")return t?z.any():z.never();let r;try{r=JSON.parse(JSON.stringify(t))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let n=cde(r,e?.defaultTarget),i=r.$defs||r.definitions||{},o={version:n,defs:i,refs:new Map,processing:new Set,rootSchema:r,registry:e?.registry??nde.globalRegistry};return Yt(r,o)}});var CM=m(xr=>{"use strict";var dde=xr&&xr.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Ade=xr&&xr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),IM=xr&&xr.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&dde(e,t,r);return Ade(e,t),e};Object.defineProperty(xr,"__esModule",{value:!0});xr.string=pde;xr.number=fde;xr.boolean=hde;xr.bigint=gde;xr.date=mde;var bd=IM(mr()),Sd=IM(Ed());function pde(t){return bd._coercedString(Sd.ZodString,t)}function fde(t){return bd._coercedNumber(Sd.ZodNumber,t)}function hde(t){return bd._coercedBoolean(Sd.ZodBoolean,t)}function gde(t){return bd._coercedBigint(Sd.ZodBigInt,t)}function mde(t){return bd._coercedDate(Sd.ZodDate,t)}});var fb=m(W=>{"use strict";var bM=W&&W.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),yde=W&&W.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Kh=W&&W.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&bM(e,t,r);return yde(e,t),e},wd=W&&W.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&bM(e,t,r)},Ede=W&&W.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(W,"__esModule",{value:!0});W.coerce=W.iso=W.ZodISODuration=W.ZodISOTime=W.ZodISODate=W.ZodISODateTime=W.locales=W.fromJSONSchema=W.toJSONSchema=W.NEVER=W.util=W.TimePrecision=W.flattenError=W.formatError=W.prettifyError=W.treeifyError=W.regexes=W.clone=W.$brand=W.$input=W.$output=W.config=W.registry=W.globalRegistry=W.core=void 0;W.core=Kh(mr());wd(Ed(),W);wd(qh(),W);wd(ib(),W);wd(ob(),W);wd(mM(),W);var Ide=mr(),Cde=Ede(WC());(0,Ide.config)((0,Cde.default)());var or=mr();Object.defineProperty(W,"globalRegistry",{enumerable:!0,get:function(){return or.globalRegistry}});Object.defineProperty(W,"registry",{enumerable:!0,get:function(){return or.registry}});Object.defineProperty(W,"config",{enumerable:!0,get:function(){return or.config}});Object.defineProperty(W,"$output",{enumerable:!0,get:function(){return or.$output}});Object.defineProperty(W,"$input",{enumerable:!0,get:function(){return or.$input}});Object.defineProperty(W,"$brand",{enumerable:!0,get:function(){return or.$brand}});Object.defineProperty(W,"clone",{enumerable:!0,get:function(){return or.clone}});Object.defineProperty(W,"regexes",{enumerable:!0,get:function(){return or.regexes}});Object.defineProperty(W,"treeifyError",{enumerable:!0,get:function(){return or.treeifyError}});Object.defineProperty(W,"prettifyError",{enumerable:!0,get:function(){return or.prettifyError}});Object.defineProperty(W,"formatError",{enumerable:!0,get:function(){return or.formatError}});Object.defineProperty(W,"flattenError",{enumerable:!0,get:function(){return or.flattenError}});Object.defineProperty(W,"TimePrecision",{enumerable:!0,get:function(){return or.TimePrecision}});Object.defineProperty(W,"util",{enumerable:!0,get:function(){return or.util}});Object.defineProperty(W,"NEVER",{enumerable:!0,get:function(){return or.NEVER}});var bde=md();Object.defineProperty(W,"toJSONSchema",{enumerable:!0,get:function(){return bde.toJSONSchema}});var Sde=EM();Object.defineProperty(W,"fromJSONSchema",{enumerable:!0,get:function(){return Sde.fromJSONSchema}});W.locales=Kh(XC());var Xh=yd();Object.defineProperty(W,"ZodISODateTime",{enumerable:!0,get:function(){return Xh.ZodISODateTime}});Object.defineProperty(W,"ZodISODate",{enumerable:!0,get:function(){return Xh.ZodISODate}});Object.defineProperty(W,"ZodISOTime",{enumerable:!0,get:function(){return Xh.ZodISOTime}});Object.defineProperty(W,"ZodISODuration",{enumerable:!0,get:function(){return Xh.ZodISODuration}});W.iso=Kh(yd());W.coerce=Kh(CM())});var Bd=m(yr=>{"use strict";var SM=yr&&yr.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),wde=yr&&yr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Bde=yr&&yr.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&SM(e,t,r);return wde(e,t),e},Qde=yr&&yr.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&SM(e,t,r)};Object.defineProperty(yr,"__esModule",{value:!0});yr.z=void 0;var wM=Bde(fb());yr.z=wM;Qde(fb(),yr);yr.default=wM});var hb=m(No=>{"use strict";Object.defineProperty(No,"__esModule",{value:!0});No.PROJECT_LIMITS=No.PROJECT_TASK_STATUSES=No.PROJECT_RESOURCE_TYPES=void 0;No.projectResourceKey=vde;No.PROJECT_RESOURCE_TYPES=["system","playbook","artifact","file","tool"];No.PROJECT_TASK_STATUSES=["not_started","in_progress","waiting","done"];No.PROJECT_LIMITS={name:80,description:500,taskName:120,taskDescription:1e4,taskResources:100};function vde(t){return`${t.type}:${t.id}`}});var eg=m(Lr=>{"use strict";Object.defineProperty(Lr,"__esModule",{value:!0});Lr.RESOURCE_KINDS=Lr.RESOURCE_DEFINITIONS=void 0;Lr.isResourceKind=_de;Lr.getResourceDefinition=Dde;Lr.getResourceAppPath=Tde;Lr.RESOURCE_DEFINITIONS={tool:{label:"Tool",pluralLabel:"Tools",collectionKey:"tools",appPath:"/tools",hasDetailPage:!0,memberDefaultPermission:"editor",pickerDefaultPermission:"editor"},system:{label:"System",pluralLabel:"Systems",collectionKey:"systems",appPath:"/systems",hasDetailPage:!0,memberDefaultPermission:"editor",pickerDefaultPermission:"editor"},credential:{label:"Credential",pluralLabel:"Credentials",collectionKey:"credentials",appPath:"/credentials",hasDetailPage:!1,pickerDefaultPermission:"viewer"},playbook:{label:"Playbook",pluralLabel:"Playbooks",collectionKey:"playbooks",appPath:"/playbooks",hasDetailPage:!0,pickerDefaultPermission:"editor"},artifact:{label:"Artifact",pluralLabel:"Artifacts",collectionKey:"artifacts",appPath:"/artifacts",hasDetailPage:!0,pickerDefaultPermission:"editor"},file:{label:"File",pluralLabel:"Files",collectionKey:"files",appPath:"/files",hasDetailPage:!1,pickerDefaultPermission:"viewer"},project:{label:"Project",pluralLabel:"Projects",collectionKey:"projects",appPath:"/projects",hasDetailPage:!0,pickerDefaultPermission:"viewer"}};Lr.RESOURCE_KINDS=Object.keys(Lr.RESOURCE_DEFINITIONS);function _de(t){return typeof t=="string"&&Object.prototype.hasOwnProperty.call(Lr.RESOURCE_DEFINITIONS,t)}function Dde(t){return Lr.RESOURCE_DEFINITIONS[t]}function Tde(t,e){let r=Lr.RESOURCE_DEFINITIONS[t];return r.hasDetailPage?`${r.appPath}/${encodeURIComponent(e)}`:r.appPath}});var _M=m(wa=>{"use strict";Object.defineProperty(wa,"__esModule",{value:!0});wa.SDK_ERROR_DETAILS_SCHEMA=wa.SDK_OUTPUT_CONTRACTS=void 0;wa.toSdkJsonSchema=Ode;var E=Bd(),Rde=hb(),kde=eg(),Nde=pr();function Ode({schema:t}){return E.z.toJSONSchema(t,{target:"draft-7",io:"output",unrepresentable:"any"})}var BM=E.z.looseObject({statusCode:E.z.number(),headers:E.z.record(E.z.string(),E.z.union([E.z.string(),E.z.array(E.z.string())])),omittedHeaderCount:E.z.number().optional()}),QM=E.z.looseObject({vfsPath:E.z.string(),storedBytes:E.z.number(),originalOutputBytes:E.z.number(),storageTruncated:E.z.boolean()}),vM=E.z.object({action:E.z.enum(["approve","reject","oauth_success","oauth_failure"]),source:E.z.enum(["user","automatic"])});function zn(t){return E.z.looseObject({toolCallId:E.z.string(),toolName:E.z.string(),outcome:E.z.literal("success"),confirmation:vM.optional(),data:t})}var gb={http:BM.optional(),credential:E.z.looseObject({id:E.z.string(),name:E.z.string(),isOwner:E.z.boolean()}).optional().describe("The credential the call ran with."),auth:E.z.looseObject({applied:E.z.enum(["bearer","basic","explicit","none","unavailable"]),header:E.z.string().optional(),placeholders:E.z.array(E.z.string()),reason:E.z.string().optional()}).optional().describe("How authentication was sent: a default Bearer or Basic header, the request's own explicit placeholders, none, or unavailable with the reason. placeholders lists the credential's <<systemId_secretName>> strings."),credentialPlaceholders:E.z.looseObject({keys:E.z.array(E.z.string()),resolved:E.z.boolean()}).optional()},Ude=E.z.discriminatedUnion("protocol",[E.z.looseObject({protocol:E.z.enum(["postgres","odbc"]),data:E.z.array(E.z.record(E.z.string(),E.z.unknown())).describe("Returned database rows."),...gb}),E.z.looseObject({protocol:E.z.literal("mssql"),data:E.z.union([E.z.array(E.z.record(E.z.string(),E.z.unknown())),E.z.array(E.z.array(E.z.record(E.z.string(),E.z.unknown()))),E.z.looseObject({rowsAffected:E.z.array(E.z.number())})]).describe("One recordset, multiple recordsets, or affected row counts."),...gb}),E.z.looseObject({protocol:E.z.enum(Nde.CONNECTION_PROTOCOLS.filter(t=>t!=="postgres"&&t!=="mssql"&&t!=="odbc")),data:E.z.unknown().describe("Complete protocol response payload. Preserve sibling fields, including files and metadata; do not unwrap a nested data field."),...gb})]),Mde=E.z.union([E.z.looseObject({tools:E.z.array(E.z.unknown()).describe("All tools from every tools/list page, each with name and inputSchema.")}),E.z.looseObject({result:E.z.looseObject({content:E.z.array(E.z.unknown()).optional(),structuredContent:E.z.unknown().optional(),isError:E.z.boolean().optional()}).describe("The tools/call result with content blocks and optional structuredContent.")})]),xde=E.z.looseObject({url:E.z.string().describe("The requested URL."),status:E.z.number(),statusText:E.z.string(),headers:E.z.record(E.z.string(),E.z.string()),body:E.z.string().describe("Response body bytes, base64-encoded."),systemId:E.z.string().optional().describe("The system whose credential authenticated the request."),credential:E.z.looseObject({id:E.z.string(),name:E.z.string(),isOwner:E.z.boolean()}).optional().describe("The credential the request ran with.")}),Lde=E.z.looseObject({stepId:E.z.string(),success:E.z.boolean(),data:E.z.unknown().optional(),error:E.z.string().nullable().optional(),http:BM.optional(),stepFileKeys:E.z.array(E.z.string()).optional()}),Pde=E.z.looseObject({toolId:E.z.string(),success:E.z.boolean(),run:E.z.looseObject({id:E.z.string()}).optional(),data:E.z.unknown().optional().describe("Tool output, determined by its output transform."),error:E.z.string().optional(),stepResults:E.z.array(Lde),fileArtifacts:E.z.array(E.z.looseObject({fileKey:E.z.string(),filename:E.z.string(),contentType:E.z.string(),size:E.z.number(),downloadUrl:E.z.string().optional()})).optional(),warnings:E.z.array(E.z.string()).optional(),inputSchema:E.z.unknown().optional(),resultMetadata:QM.optional()}),Fde=zn(E.z.looseObject({resource:E.z.looseObject({id:E.z.string(),name:E.z.string().optional(),version:E.z.union([E.z.number(),E.z.string()]).optional()}),created:E.z.boolean(),projectId:E.z.string().optional(),addedFiles:E.z.array(E.z.looseObject({id:E.z.string(),fileName:E.z.string()})).optional(),projectAttribution:E.z.looseObject({attached:E.z.boolean(),projectId:E.z.string(),projectName:E.z.string().optional(),resource:E.z.looseObject({type:E.z.enum(Rde.PROJECT_RESOURCE_TYPES),id:E.z.string()}),error:E.z.string().optional()}).optional()}));wa.SDK_OUTPUT_CONTRACTS={assignSessionToProject:{name:"SuperglueSessionProjectResult",schema:zn(E.z.object({sessionId:E.z.string(),projectId:E.z.string().nullable()})),description:"Returns the saved session ID and project ID, or null when unassigned. Throws SuperglueError on failure."},callSystem:{name:"SuperglueCallSystemResult",schema:Ude,description:"Returns the complete protocol payload in data, available HTTP metadata, the credential used, and how authentication was sent. Throws SuperglueError on failure; details contains the canonical result and unprojected execution output."},callMcp:{name:"SuperglueCallMcpResult",schema:Mde,description:"Returns { tools } when tool is omitted, or { result } from tools/call. Throws SuperglueError on HTTP, JSON-RPC, or result.isError failures; details.result.data contains statusCode, rpcError, or the failed result."},systemFetch:{name:"SuperglueSystemFetchResult",schema:xde,description:"Returns the raw HTTP response: status, headers, and the base64 body. HTTP error statuses are returned, not thrown. Throws SuperglueError when the request cannot be authenticated or sent."},runTool:{name:"SuperglueRunToolResult",schema:Pde,description:"Returns successful tool output, step results, files, and available result reference. Throws SuperglueError on failure; details.result.data preserves this result shape with success: false, the error, and available run and step results. details.resultMetadata references the saved failed result when available."},writeResource:{name:"SuperglueWriteResult",schema:Fde,description:"Returns saved resource identity, creation status, and available project attribution or added files. Throws SuperglueError on failure."},installBundle:{name:"SuperglueBundleInstallResult",schema:zn(E.z.looseObject({bundleId:E.z.string(),system:E.z.looseObject({id:E.z.string(),name:E.z.string(),requiredCredentialKeys:E.z.array(E.z.string()),hasUserCredentials:E.z.boolean()}),tools:E.z.array(E.z.looseObject({id:E.z.string(),name:E.z.string().optional()})),mcpServer:E.z.looseObject({id:E.z.string(),name:E.z.string()}).optional(),playbook:E.z.looseObject({id:E.z.string(),name:E.z.string()}).optional()})),description:"Returns the installed system, tool, MCP server, and playbook identities, the secret names the user must supply, and whether the user has a complete credential. Throws SuperglueError on failure."},stopBackgroundJob:{name:"SuperglueStopBackgroundJobResult",schema:zn(E.z.looseObject({job:E.z.looseObject({id:E.z.string(),status:E.z.string(),elapsedMs:E.z.number(),exitCode:E.z.number().optional()})})),description:"Returns the job's status, run time, and exit code after it ended, or status running when the stop is still in progress. Throws SuperglueError when the session has no such running job."},setToolState:{name:"SuperglueToolStateResult",schema:zn(E.z.looseObject({resource:E.z.looseObject({id:E.z.string()}),action:E.z.enum(["set","reset"])})),description:"Returns the saved tool identity and state action. Throws SuperglueError on failure."},shareResource:{name:"SuperglueShareResult",schema:zn(E.z.looseObject({resource:E.z.looseObject({kind:E.z.enum(kde.RESOURCE_KINDS),id:E.z.string()})})),description:"Returns the shared resource identity. Throws SuperglueError on failure."},notifyUser:{name:"SuperglueNotifyResult",schema:zn(E.z.looseObject({actionCount:E.z.number()})),description:"Returns the notification action count. Throws SuperglueError on failure."},writeOrgSettings:{name:"SuperglueOrgSettingsResult",schema:zn(E.z.looseObject({updated:E.z.array(E.z.enum(["name","preferences","notifications"])),notificationTest:E.z.looseObject({channel:E.z.enum(["slack","email"]),sent:E.z.boolean(),error:E.z.string().optional()}).optional()})),description:"Returns updated settings and any notification test result. Throws SuperglueError on failure."},writeDesignSystem:{name:"SuperglueDesignSystemResult",schema:zn(E.z.looseObject({updated:E.z.array(E.z.enum(["tokens","guidelines","logo"])),added:E.z.array(E.z.looseObject({id:E.z.string(),kind:E.z.enum(["logo","font","template","reference"]),name:E.z.string()})),changed:E.z.array(E.z.string()),removed:E.z.array(E.z.string())})),description:"Returns the changed design-system parts and file ids. Throws SuperglueError on failure."},importDesignSystemFromUrl:{name:"SuperglueDesignSystemImportResult",schema:zn(E.z.looseObject({url:E.z.string(),title:E.z.string().nullable(),tokens:E.z.looseObject({}),palette:E.z.array(E.z.looseObject({color:E.z.string(),weight:E.z.number()})),fonts:E.z.array(E.z.looseObject({family:E.z.string(),usage:E.z.array(E.z.string()),source:E.z.string()})),fontFiles:E.z.array(E.z.looseObject({file:E.z.string(),family:E.z.string().describe("CSS family name the website uses"),roles:E.z.array(E.z.string()),weight:E.z.string(),style:E.z.enum(["normal","italic"])})),logos:E.z.array(E.z.looseObject({file:E.z.string(),source:E.z.string(),width:E.z.number(),height:E.z.number(),light:E.z.boolean().describe("Light artwork meant for dark backgrounds")})),screenshot:E.z.string().nullable()})),description:"Returns a proposed design system from the website; font files, logos, and the screenshot are file:: session uploads. Throws SuperglueError on failure."},readQbm:{name:"SuperglueReadQbmResult",schema:zn(E.z.looseObject({folder:E.z.string(),objects:E.z.array(E.z.looseObject({type:E.z.string(),files:E.z.array(E.z.string()),records:E.z.number()})),rawTables:E.z.array(E.z.looseObject({table:E.z.string(),files:E.z.array(E.z.string()),rows:E.z.number()})),encryptedValues:E.z.array(E.z.looseObject({table:E.z.string(),column:E.z.string(),values:E.z.number()})),unmappedCodes:E.z.array(E.z.looseObject({field:E.z.string(),code:E.z.string(),records:E.z.number()})).optional(),attachments:E.z.looseObject({documents:E.z.number(),note:E.z.string()}).optional(),rejectedRows:E.z.array(E.z.looseObject({table:E.z.string(),rows:E.z.number()})).optional()})),description:"Returns the folder that holds the extracted files, record counts per object type and raw table, encrypted columns, codes the reader cannot decode, and expected attachments. The folder also holds coverage.json.raw with the same summary plus the mapped source tables. Throws SuperglueError on failure."},previewArtifact:{name:"SuperglueArtifactPreviewResult",schema:E.z.looseObject({draftId:E.z.string(),bytes:E.z.number()}),description:"Returns the artifact draft identity and byte count. Throws SuperglueError on failure."}};var $de=E.z.looseObject({code:E.z.string(),path:E.z.array(E.z.union([E.z.string(),E.z.number(),E.z.symbol()])),message:E.z.string()});wa.SDK_ERROR_DETAILS_SCHEMA=E.z.discriminatedUnion("kind",[E.z.looseObject({kind:E.z.literal("tool_result"),resultMetadata:QM.optional(),result:E.z.looseObject({toolCallId:E.z.string(),toolName:E.z.string(),outcome:E.z.enum(["success","failure","rejected","aborted"]),confirmation:vM.optional(),error:E.z.looseObject({message:E.z.string()}).optional(),data:E.z.unknown().optional()}),output:E.z.unknown().describe("Unprojected execution output, including the original error and any available response data or metadata.")}),E.z.looseObject({kind:E.z.enum(["input_validation","output_validation"]),toolName:E.z.string(),issues:E.z.array($de),output:E.z.unknown().optional()})])});var FM=m(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.SERVER_OWNED_SESSION_RESOURCE_KINDS=Ie.AgentRequestValidationError=Ie.AGENT_TOOL_CONTINUATION_ACTION_BY_CONFIRMATION_STATE=Ie.AGENT_TOOL_CONTINUATION_ACTIONS=Ie.AGENT_IDENTIFIER_PATTERN=Ie.AGENT_REQUEST_LIMITS=void 0;Ie.validateAgentRequestPayload=UM;Ie.validateResourceBinding=MM;Ie.validateClientResourceBinding=xM;Ie.validateAgentSessionIdentity=LM;Ie.validateAgentSessionTarget=PM;Ie.validateAgentRequestSubmission=Yde;Ie.isAgentMessagePayload=Vde;Ie.isAgentToolContinuationPayload=Jde;var Oo=pr();Ie.AGENT_REQUEST_LIMITS={messageContentChars:5e4,identifierChars:256,attachedFiles:20,toolContinuations:20,continuationInputChars:1e5,frontendDraftsChars:2e6,accessRulesContextChars:2e6,pendingMessagesPerSession:10};Ie.AGENT_IDENTIFIER_PATTERN=/^[A-Za-z0-9._-]+$/;Ie.AGENT_TOOL_CONTINUATION_ACTIONS=["approve","reject","oauth_success","oauth_failure"];Ie.AGENT_TOOL_CONTINUATION_ACTION_BY_CONFIRMATION_STATE={[Oo.ConfirmationAction.CONFIRMED]:"approve",[Oo.ConfirmationAction.DECLINED]:"reject",[Oo.ConfirmationAction.OAUTH_SUCCESS]:"oauth_success",[Oo.ConfirmationAction.OAUTH_FAILURE]:"oauth_failure"};var tg=class extends Error{constructor(e){super(e),this.name="AgentRequestValidationError"}};Ie.AgentRequestValidationError=tg;function Ye(t){throw new tg(t)}function no(t,e){return(!t||typeof t!="object"||Array.isArray(t))&&Ye(`${e} must be an object`),t}function Ba(t,e){(typeof t!="string"||!t.trim())&&Ye(`${e} must be a non-empty string`);let r=t.trim();return r.length>Ie.AGENT_REQUEST_LIMITS.identifierChars&&Ye(`${e} exceeds ${Ie.AGENT_REQUEST_LIMITS.identifierChars} characters`),Ie.AGENT_IDENTIFIER_PATTERN.test(r)||Ye(`${e} may only contain letters, numbers, dots, underscores, and hyphens`),r}function jde(t,e){return typeof t!="boolean"&&Ye(`${e} must be a boolean`),t}function mb(t,e){try{return JSON.stringify(t).length}catch{return Ye(`${e} must be JSON-serializable`)}}function qde(t,e){if(t!==void 0)return Array.isArray(t)||Ye(`${e} must be an array`),t.length>Ie.AGENT_REQUEST_LIMITS.attachedFiles&&Ye(`${e} exceeds ${Ie.AGENT_REQUEST_LIMITS.attachedFiles} entries`),t.map((r,n)=>{let i=no(r,`${e}[${n}]`);return{...i,key:Ba(i.key,`${e}[${n}].key`)}})}function DM({value:t,label:e,requireHidden:r}){let n=no(t,e),i=Ba(n.id,`${e}.id`);typeof n.content!="string"&&Ye(`${e}.content must be a string`);let o=n.content;o.length>Ie.AGENT_REQUEST_LIMITS.messageContentChars&&Ye(`${e}.content exceeds ${Ie.AGENT_REQUEST_LIMITS.messageContentChars} characters`);let s=jde(n.isHidden,`${e}.isHidden`);r&&!s&&Ye(`${e}.isHidden must be true`);let a=qde(n.attachedFiles,`${e}.attachedFiles`);return!o.trim()&&!a?.length&&Ye(`${e}.content may only be empty when an attachment is present`),{id:i,content:o,isHidden:s,...a?{attachedFiles:a}:{}}}function RM(t){if(t===void 0)return;let e=no(t,"frontendDrafts");return mb(e,"frontendDrafts")>Ie.AGENT_REQUEST_LIMITS.frontendDraftsChars&&Ye(`frontendDrafts exceeds ${Ie.AGENT_REQUEST_LIMITS.frontendDraftsChars} characters`),e}function kM(t){if(t===void 0)return;let e=no(t,"accessRulesContext");return mb(e,"accessRulesContext")>Ie.AGENT_REQUEST_LIMITS.accessRulesContextChars&&Ye(`accessRulesContext exceeds ${Ie.AGENT_REQUEST_LIMITS.accessRulesContextChars} characters`),e}function NM(t){if(t!==void 0)return(typeof t!="string"||!Oo.AGENT_APPROVAL_MODES.includes(t))&&Ye(`request.approvalMode must be one of: ${Oo.AGENT_APPROVAL_MODES.join(", ")}`),t}function OM(t,e){let r=no(t,e),n=Ba(r.toolCallId,`${e}.toolCallId`);return(typeof r.action!="string"||!Ie.AGENT_TOOL_CONTINUATION_ACTIONS.includes(r.action))&&Ye(`${e}.action must be one of: ${Ie.AGENT_TOOL_CONTINUATION_ACTIONS.join(", ")}`),r.input!==void 0&&mb(r.input,`${e}.input`)>Ie.AGENT_REQUEST_LIMITS.continuationInputChars&&Ye(`${e}.input exceeds ${Ie.AGENT_REQUEST_LIMITS.continuationInputChars} characters`),{toolCallId:n,action:r.action,...r.input!==void 0?{input:r.input}:{}}}function zde(t){if(t===void 0)return;(!Array.isArray(t)||t.length===0)&&Ye("request.toolContinuations must be a non-empty array"),t.length>Ie.AGENT_REQUEST_LIMITS.toolContinuations&&Ye(`request.toolContinuations exceeds ${Ie.AGENT_REQUEST_LIMITS.toolContinuations} entries`);let e=t.map((r,n)=>OM(r,`request.toolContinuations[${n}]`));return new Set(e.map(({toolCallId:r})=>r)).size!==e.length&&Ye("request.toolContinuations must not contain duplicate toolCallId values"),e}function TM(t,e){if(t===void 0)return;(typeof t!="string"||!t.trim())&&Ye(`${e} must be a non-empty string`);let r=t.trim();return r.length>Ie.AGENT_REQUEST_LIMITS.messageContentChars&&Ye(`${e} exceeds ${Ie.AGENT_REQUEST_LIMITS.messageContentChars} characters`),r}function Gde(t){let e=DM({value:t.message,label:"request.message"}),r=TM(t.title,"request.title"),n=TM(t.titleInput,"request.titleInput"),i=t.hiddenSteeringMessage===void 0?void 0:DM({value:t.hiddenSteeringMessage,label:"request.hiddenSteeringMessage",requireHidden:!0});i&&i.id===e.id&&Ye("request.hiddenSteeringMessage.id must differ from request.message.id");let o=zde(t.toolContinuations),s=NM(t.approvalMode),a=RM(t.frontendDrafts),c=kM(t.accessRulesContext);return{kind:"message",message:e,...i?{hiddenSteeringMessage:i}:{},...r?{title:r}:{},...n?{titleInput:n}:{},...o?{toolContinuations:o}:{},...s?{approvalMode:s}:{},...a?{frontendDrafts:a}:{},...c?{accessRulesContext:c}:{}}}function Hde(t){let e=OM(t,"request"),r=NM(t.approvalMode),n=RM(t.frontendDrafts),i=kM(t.accessRulesContext);return{kind:"tool_continuation",...e,...r?{approvalMode:r}:{},...n?{frontendDrafts:n}:{},...i?{accessRulesContext:i}:{}}}function UM(t){let e=no(t,"request");return e.kind==="message"?Gde(e):e.kind==="tool_continuation"?Hde(e):Ye('request.kind must be "message" or "tool_continuation"')}function MM(t,e){let r=no(t,e);return(typeof r.kind!="string"||!Oo.AGENT_SESSION_RESOURCE_KINDS.includes(r.kind))&&Ye(`${e}.kind must be one of: ${Oo.AGENT_SESSION_RESOURCE_KINDS.join(", ")}`),{kind:r.kind,id:Ba(r.id,`${e}.id`)}}Ie.SERVER_OWNED_SESSION_RESOURCE_KINDS=["briefing"];function xM(t,e){let r=MM(t,e);return Ie.SERVER_OWNED_SESSION_RESOURCE_KINDS.includes(r.kind)&&Ye(`${e}.kind "${r.kind}" is assigned by the server`),r}function LM(t,e="session.createIfMissing"){let r=no(t,e),n=r.projectId===void 0?void 0:Ba(r.projectId,`${e}.projectId`),i=r.taskId===void 0?void 0:Ba(r.taskId,`${e}.taskId`);i&&!n&&Ye(`${e}.taskId requires ${e}.projectId`);let o=Object.values(Oo.AgentType);(typeof r.agentId!="string"||!o.includes(r.agentId))&&Ye(`${e}.agentId must be one of: ${o.join(", ")}`);let s=r.resourceBinding===void 0?void 0:xM(r.resourceBinding,`${e}.resourceBinding`);return{agentId:r.agentId,...n?{projectId:n}:{},...i?{taskId:i}:{},...s?{resourceBinding:s}:{}}}function PM(t){let e=no(t,"session"),r=e.createIfMissing===void 0?void 0:LM(e.createIfMissing);return{id:Ba(e.id,"session.id"),...r?{createIfMissing:r}:{}}}function Yde(t){let e=no(t,"body");return{session:PM(e.session),request:UM(e.request)}}function Vde(t){return t.kind==="message"}function Jde(t){return t.kind==="tool_continuation"}});var jM=m($e=>{"use strict";Object.defineProperty($e,"__esModule",{value:!0});$e.ARTIFACT_EXPORT_FORMATS=$e.ARTIFACT_RESPONSE_RESERVED_FIELD_NAMES=$e.ARTIFACT_RESPONSE_PATCH_DEBOUNCE_MS=$e.MAX_SPREADSHEET_ARTIFACT_BYTES=$e.MAX_HTML_ARTIFACT_IMAGE_BYTES=$e.MAX_HTML_ARTIFACT_BYTES=$e.MAX_SPREADSHEET_CELL_TEXT_LENGTH=$e.MAX_SPREADSHEET_SHEET_NAME_LENGTH=$e.MAX_SPREADSHEET_GRID_CELLS=$e.MAX_SPREADSHEET_SHEETS=$e.SPREADSHEET_CELL_TYPES=void 0;$e.isValidSpreadsheetCell=Kde;$e.isArtifactExportFormat=Xde;$e.isArtifactExportFormatForKind=eAe;var $M=Bd();$e.SPREADSHEET_CELL_TYPES=["text","integer","number","percent","currency","boolean","date","datetime"];$e.MAX_SPREADSHEET_SHEETS=20;$e.MAX_SPREADSHEET_GRID_CELLS=1e6;$e.MAX_SPREADSHEET_SHEET_NAME_LENGTH=31;$e.MAX_SPREADSHEET_CELL_TEXT_LENGTH=32767;var Wde=$M.z.iso.date(),Zde=$M.z.iso.datetime({offset:!0});function Kde(t,e){return t===null?!0:e==="text"?typeof t=="string"&&t.length<=$e.MAX_SPREADSHEET_CELL_TEXT_LENGTH:e==="boolean"?typeof t=="boolean":["integer","number","percent","currency"].includes(e)?typeof t=="number"&&Number.isFinite(t)&&(e!=="integer"||Number.isInteger(t)):typeof t!="string"?!1:(e==="datetime"?Zde:Wde).safeParse(t).success}$e.MAX_HTML_ARTIFACT_BYTES=1024*1024;$e.MAX_HTML_ARTIFACT_IMAGE_BYTES=12*1024*1024;$e.MAX_SPREADSHEET_ARTIFACT_BYTES=10*1024*1024;$e.ARTIFACT_RESPONSE_PATCH_DEBOUNCE_MS=300;$e.ARTIFACT_RESPONSE_RESERVED_FIELD_NAMES=new Set(["__proto__","constructor","prototype"]);$e.ARTIFACT_EXPORT_FORMATS=["html","pdf","docx","xlsx","pptx"];function Xde(t){return $e.ARTIFACT_EXPORT_FORMATS.some(e=>e===t)}function eAe(t,e,r=!1){return t==="spreadsheet"?e==="xlsx":r?e==="html"||e==="pdf"||e==="pptx":e!=="pptx"}});var YM=m(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.API_KEY_ACTION_LABELS=xe.API_KEY_SURFACE_LABELS=xe.API_KEY_SCOPES=xe.API_KEY_SURFACE_ACTIONS=xe.API_KEY_ACTIONS=xe.API_KEY_SURFACES=void 0;xe.getApiKeySurface=zM;xe.getApiKeyAction=GM;xe.getApiKeySurfaceActions=yb;xe.parseApiKeyScopes=HM;xe.validateApiKeyScopesInput=iAe;xe.isApiKeyScopeAllowed=oAe;xe.formatApiKeyScopes=sAe;xe.API_KEY_SURFACES=["api","mcp"];xe.API_KEY_ACTIONS=["read","write","execute"];xe.API_KEY_SURFACE_ACTIONS={api:xe.API_KEY_ACTIONS,mcp:["execute"]};xe.API_KEY_SCOPES=xe.API_KEY_SURFACES.flatMap(t=>xe.API_KEY_SURFACE_ACTIONS[t].map(e=>`${t}:${e}`));xe.API_KEY_SURFACE_LABELS={api:"API & CLI",mcp:"MCP"};xe.API_KEY_ACTION_LABELS={read:"Read",write:"Write",execute:"Execute"};var qM=new Set(xe.API_KEY_SCOPES),tAe={"/v1/tools":["read"],"/v1/tools/:toolId/run":["execute"],"/v1/authenticate":["write"],"/v1/memory-notes":["read","write"]},rAe=new Set(["/v1/api-keys","/v1/api-keys/:id","/v1/api-keys/:id/reveal"]),nAe=new Set(["/v1/me"]);function zM(t){let e=t.split("?")[0];return e==="/mcp"||e.startsWith("/mcp/")?"mcp":"api"}function GM(t){return t==="read"?"read":t==="execute"?"execute":"write"}function yb(t,e){return xe.API_KEY_SURFACE_ACTIONS[e].filter(r=>(t||[]).includes(`${e}:${r}`))}function HM(t){if(!Array.isArray(t))return null;let e=[...new Set(t.filter(r=>qM.has(r)))];return e.length>0?e:null}function iAe(t){if(t==null)return{scopes:null};let e=`Valid scopes: ${xe.API_KEY_SCOPES.join(", ")}. Use null for full access.`;if(!Array.isArray(t)||t.length===0)return{error:`scopes must be a non-empty array of API key scopes. ${e}`};let r=t.filter(n=>!qM.has(n));return r.length>0?{error:`Unknown API key scope(s): ${r.map(String).join(", ")}. ${e}`}:{scopes:HM(t)}}function oAe({scopes:t,path:e,type:r}){if(!t||t.length===0)return!0;let n=e.split("?")[0];if(rAe.has(n))return!1;if(nAe.has(n))return!0;let i=GM(r),o=zM(n);return o==="api"&&tAe[n]?.some(s=>s===r)&&yb(t,"mcp").length>0?!0:t.includes(`${o}:${i}`)}function sAe(t){return!t||t.length===0?"Full access":xe.API_KEY_SURFACES.map(e=>({surface:e,actions:yb(t,e)})).filter(e=>e.actions.length>0).map(e=>xe.API_KEY_SURFACE_ACTIONS[e.surface].length===1?xe.API_KEY_SURFACE_LABELS[e.surface]:`${xe.API_KEY_SURFACE_LABELS[e.surface]} ${e.actions.join("/")}`).join(", ")}});var VM=m(Eb=>{"use strict";Object.defineProperty(Eb,"__esModule",{value:!0});Eb.isValidEmail=aAe;function aAe(t){return/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?)*\.[a-zA-Z]{1,}$/.test(t)}});var WM=m(At=>{"use strict";Object.defineProperty(At,"__esModule",{value:!0});At.GATEWAY_UNINSTALL_COMMANDS=At.GATEWAY_API_KEY_NAME_PREFIX=At.GATEWAY_TARGET_NAME_PATTERN=At.GATEWAY_SETUP_GUIDE_URL=At.GATEWAY_DOWNLOAD_BASE_URL=At.GATEWAY_INSTALL_TOKEN_PREFIX=void 0;At.getGatewayServerUrl=JM;At.buildGatewayInstallToken=uAe;At.buildGatewayInstallCommand=lAe;At.getGatewayApiKeyName=dAe;At.GATEWAY_INSTALL_TOKEN_PREFIX="sgi1.";At.GATEWAY_DOWNLOAD_BASE_URL="https://downloads.superglue.cloud";At.GATEWAY_SETUP_GUIDE_URL="https://superglue.ai/docs/guides/secure-gateway/";At.GATEWAY_TARGET_NAME_PATTERN=/^[a-z0-9]([a-z0-9_-]{0,61}[a-z0-9])?$/;function JM(t){let e=new URL(t);return e.protocol=e.protocol==="http:"?"ws:":"wss:",e.pathname=`${e.pathname.replace(/\/+$/,"")}/ws/tunnels`,e.search="",e.hash="",e.toString()}function cAe(t){let e=new TextEncoder().encode(t),r="";for(let n of e)r+=String.fromCharCode(n);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function uAe(t){let e={v:1,serverUrl:JM(t.apiEndpoint),tunnelId:t.tunnelId,apiKey:t.apiKey,targets:t.targets,enableScriptRunner:t.enableScriptRunner};return At.GATEWAY_INSTALL_TOKEN_PREFIX+cAe(JSON.stringify(e))}function lAe(t,e){return t==="windows"?['$ErrorActionPreference = "Stop"',"[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor 3072",'$ProgressPreference = "SilentlyContinue"','$gateway = "$env:TEMP\\superglue-gateway.exe"',"Remove-Item $gateway -Force -ErrorAction SilentlyContinue",`Invoke-WebRequest -UseBasicParsing "${At.GATEWAY_DOWNLOAD_BASE_URL}/superglue-gateway-windows.exe" -OutFile $gateway`,`"${e}" | & $gateway install -`].join("; "):["d=$(mktemp -d)",`u="${At.GATEWAY_DOWNLOAD_BASE_URL}/superglue-gateway-linux-$(uname -m | sed 's/aarch64/arm64/')"`,'s=$([ "$(id -u)" -eq 0 ] || echo sudo)','{ if command -v curl >/dev/null; then curl -fsSL -o "$d/superglue-gateway" "$u"; else wget -qO "$d/superglue-gateway" "$u"; fi; }','$s install -m 0755 "$d/superglue-gateway" /usr/local/bin/superglue-gateway',`echo '${e}' | $s /usr/local/bin/superglue-gateway install -`].join(" && ")}At.GATEWAY_API_KEY_NAME_PREFIX="Gateway: ";function dAe(t){return At.GATEWAY_API_KEY_NAME_PREFIX+t}At.GATEWAY_UNINSTALL_COMMANDS={windows:'& "C:\\Program Files\\superglue Gateway\\superglue-gateway.exe" uninstall',linux:"sudo /usr/local/bin/superglue-gateway uninstall"}});var Td=m(Ae=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:!0});Ae.OAUTH_CONFIG_CREDENTIAL_KEYS=void 0;Ae.hasMeaningfulValue=pt;Ae.stringValue=$t;Ae.validateOAuthConnection=bAe;Ae.formatOAuthConnectionDisabledReason=wAe;Ae.objectValue=Mo;Ae.parseScopes=_d;Ae.normalizeGrantType=Dd;Ae.normalizeOAuthClientMode=bb;Ae.normalizeSystemAuthentication=Vt;Ae.resolveOAuthClientMode=QAe;Ae.flattenSystemAuthentication=tx;Ae.maskedFlatSystemAuthentication=vAe;Ae.isMaskedSecretValue=rx;Ae.pickAgentAuthInputFields=_Ae;Ae.maskSystemAuthenticationForResponse=DAe;Ae.restoreMaskedClientSecret=TAe;Ae.mapAgentAuthInput=nx;Ae.mergeAgentAuthInput=$Ae;Ae.getAuthenticationConfigCredentialKeys=ix;Ae.buildAuthenticationEditorModel=jAe;Ae.getCredentialRequirements=qAe;Ae.isCredentialRequirementSatisfied=ox;Ae.hasUnsatisfiedCredentialRequirements=zAe;Ae.updateAuthenticationEditorField=GAe;Ae.validateOAuthAuthenticationConfigPlacement=sx;Ae.authenticationToLegacyCredentials=ax;Ae.isRuntimeCredentialMetadataKey=HAe;Ae.resolveCredentialAuthentication=YAe;Ae.getCredentialAuthenticationStorageError=VAe;Ae.buildRuntimeCredentialsFromAuthentication=JAe;Ae.resolveOAuthConfigFromAuthentication=WAe;Ae.toCredentialInputValue=Sb;Ae.getCredentialEntries=ZAe;Ae.getCredentialInputValues=KAe;Ae.getCredentialDisplayHiddenKeys=XAe;Ae.hasOAuthTokenCredentials=epe;Ae.getOAuthExpiryText=tpe;Ae.hasRuntimeCredentialValues=rpe;Ae.validateCredentialObjectKeys=cx;Ae.validateCredentialKeyList=ux;Ae.normalizeAskForUserInputs=lx;Ae.validateSystemInputCollection=npe;Ae.mapOAuthMissingFieldsForAgent=ipe;Ae.validateOAuthAuthenticationAndCredentialInputs=ope;var St=pn(),AAe=qc();Ae.OAUTH_CONFIG_CREDENTIAL_KEYS=["auth_url","authUrl","token_url","tokenUrl","token_uri","scopes","scope","grant_type","grantType","oauthClientMode","client_id","clientId","client_secret","clientSecret","tokenAuthMethod","tokenContentType","usePKCE","extraHeaders","extraBodyParams"];var rg=["host","port","database","path","homeDirectory"],ex=["type","oauthClientMode","grantType","authUrl","tokenUrl","scopes","clientId","clientSecret","tokenAuthMethod","tokenContentType","usePKCE","extraHeaders","extraBodyParams","protocol",...rg],pAe=new Set(ex),fAe="type, oauthClientMode, grantType, authUrl, tokenUrl, scopes, clientId, clientSecret, tokenAuthMethod, tokenContentType, usePKCE, extraHeaders, extraBodyParams, protocol, host, port, database, path, homeDirectory",hAe=["grantType","authUrl","tokenUrl","scopes","clientId","clientSecret"],gAe={grantType:["grantType","grant_type"],authUrl:["authUrl","auth_url"],tokenUrl:["tokenUrl","token_url","token_uri"],scopes:["scopes","scope"],clientId:["clientId","client_id"],clientSecret:["clientSecret","client_secret"]},vd=["tokenAuthMethod","tokenContentType","usePKCE","extraHeaders","extraBodyParams"],mAe=new Set(hAe),yAe=new Set(["access_token","accessToken","refresh_token","refreshToken","expires_at","expiresAt","expires_in","expiresIn","expiry","token_type","tokenType"]),EAe=["access_token","refresh_token","api_key","bearer_token","token","client_id","client_secret","auth_url","token_url","scopes","grant_type","token_type","expires_at","expiry","expires_in","host","hostname","port","database","dbname","db","username","password"],ZM=new Map(EAe.map((t,e)=>[(0,St.normalizeCredentialKey)(t),e]));function Qa(t){return Object.fromEntries(Object.entries(t).filter(([,e])=>e!==void 0))}function Ib({config:t,key:e,value:r}){let n={...t||{}};return pt(r)?n[e]=r:delete n[e],Object.keys(n).length>0?n:void 0}function pt(t){return(0,St.hasCredentialValue)(t)}function $t(t){if(pt(t))return typeof t=="string"?t:String(t)}var IAe={"grant_type authorization_code or client_credentials":"authorization_code or client_credentials",client_id:"client ID",token_url:"token URL",auth_url:"authorization URL","client_secret or usePKCE":"client secret or PKCE","client_secret or oauth_cert + oauth_key":"client secret or OAuth certificate and key"};function Uo(...t){return t.find(e=>pt(e))}function CAe(t){return t===!0||t==="true"}function bAe(t){let e=t||{},r=$t(Uo(e.grant_type,e.grantType)),n=r==="client_credentials"?"client_credentials":"authorization_code",i=r&&r!=="authorization_code"&&r!=="client_credentials",o=Uo(e.client_id,e.clientId),s=Uo(e.client_secret,e.clientSecret),a=Uo(e.auth_url,e.authUrl),c=Uo(e.token_url,e.tokenUrl,e.token_uri),u=Uo(e.oauth_cert,e.oauthCert),l=Uo(e.oauth_key,e.oauthKey),d=pt(u)&&pt(l)||e.hasServerSideCertificateCredentials===!0,A=e.hasServerSideClientSecret===!0,p=pt(s)||A,h=CAe(Uo(e.usePKCE,e.usePkce)),g=[];return i&&g.push("grant_type authorization_code or client_credentials"),pt(o)||g.push("client_id"),pt(c)||g.push("token_url"),n==="client_credentials"?!p&&!d&&g.push("client_secret or oauth_cert + oauth_key"):(pt(a)||g.push("auth_url"),!p&&!h&&g.push("client_secret or usePKCE")),{grantType:n,hasAccessToken:pt(Uo(e.access_token,e.accessToken)),hasCertificateCredentials:d,isReadyToConnect:g.length===0,missingFields:g,usePKCE:h}}function SAe(t){return t.length<=1?t[0]||"":t.length===2?`${t[0]} and ${t[1]}`:`${t.slice(0,-1).join(", ")}, and ${t[t.length-1]}`}function wAe(t){if(!t||t.isReadyToConnect)return null;let e=t.missingFields.map(r=>IAe[r]||r);return`OAuth connection is disabled because ${SAe(e)} ${e.length===1?"is":"are"} missing.`}function Mo(t){if(!(!t||typeof t!="object"||Array.isArray(t)))return t}function io(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function _d(t){if(pt(t)){if(Array.isArray(t))return t.map(String).filter(Boolean);if(typeof t=="string"){let e=t.trim().split(/[,\s]+/).map(r=>r.trim()).filter(Boolean);return e.length>0?e:void 0}return[String(t)]}}function Dd(t){let e=$t(t);if(e==="authorization_code"||e==="client_credentials"||e==="password"||e==="service_account"||e==="custom")return e;if(e)return"custom"}function bb(t){return t==="managed"||t==="dynamic"||t==="custom"?t:void 0}function BAe(t){let e=Object.entries(t).filter(([r])=>!mAe.has(r));return e.length>0?Object.fromEntries(e):void 0}function tu(t,e,r){for(let i of gAe[r])if(pt(t[i]))return t[i];let n=Mo(t.client);return r==="clientId"&&pt(n?.id)?n.id:r==="clientSecret"&&pt(n?.secret)?n.secret:e[r]}function Vt(t){if(!t)return;let e=t;if(e.type==="oauth2"){let r=Mo(e.config)||{},n=BAe(r)||{};return Qa({type:"oauth2",oauthClientMode:bb(e.oauthClientMode),grantType:Dd(tu(e,r,"grantType")),authUrl:$t(tu(e,r,"authUrl")),tokenUrl:$t(tu(e,r,"tokenUrl")),scopes:_d(tu(e,r,"scopes")),clientId:$t(tu(e,r,"clientId")),clientSecret:$t(tu(e,r,"clientSecret")),config:Object.keys(n).length>0?n:void 0})}return e.type==="connection_string"?Qa({type:"connection_string",protocol:e.protocol,config:Mo(e.config??e.components)}):e.type==="api_key"||e.type==="basic_auth"||e.type==="none"?Qa({type:e.type,config:Mo(e.config)}):{type:"none"}}function QAe({authentication:t,templateManaged:e,templateRegistrationUrl:r}){let n=Vt(t);if(n?.type!=="oauth2")return"custom";let i=n.oauthClientMode;return i?i==="managed"&&!e?"custom":i:r?"dynamic":e&&!n.clientSecret?"managed":"custom"}function tx(t){let e=Vt(t);if(!e)return;let{config:r,scopes:n,...i}=e,o={};return r&&typeof r=="object"&&Object.assign(o,r),Object.assign(o,i),Array.isArray(n)?o.scopes=n.join(" "):n!==void 0&&(o.scopes=n),o}function Cb(t,e=""){return t==null?t:Array.isArray(t)?t.map(r=>Cb(r)):typeof t=="object"?Object.fromEntries(Object.entries(t).map(([r,n])=>[r,Cb(n,r)])):e&&(0,St.isSensitiveCredentialKey)(e)?(0,St.maskCredentialValue)(e,t):t}function vAe(t){let e=tx(t);if(e)return Cb(e)}function rx(t){return(0,St.isMaskedValue)(t)||(0,St.isFullyMaskedCredentialValue)(t)}function _Ae(t){let e=Mo(t);if(!e)return;let r={};for(let n of ex){if(!io(e,n))continue;let i=e[n];i!==void 0&&(r[n]=i)}return r}function DAe(t){return!t||t.type!=="oauth2"||!pt(t.clientSecret)?t:{...t,clientSecret:St.FULLY_MASKED_CREDENTIAL_VALUE}}function TAe({incoming:t,existing:e}){if(!t||t.type!=="oauth2"||!rx(t.clientSecret))return t;let r=e?.type==="oauth2"?e.clientSecret:void 0;return{...t,clientSecret:r}}function RAe(t){if(t==="none"||t==="api_key"||t==="basic_auth"||t==="oauth2"||t==="connection_string")return t}function kAe(t){return Object.entries(t||{})}function NAe(t){let e=rg.flatMap(r=>{if(!io(t,r))return[];let n=t[r];return pt(n)?[[r,n]]:[]});return e.length>0?Object.fromEntries(e):void 0}function OAe(t){return rg.filter(e=>io(t,e))}function UAe(t){let e=rg.flatMap(r=>io(t,r)?[[r,t[r]]]:[]);return e.length>0?Object.fromEntries(e):void 0}function MAe(t){let e=new Set(["oauthClientMode","grantType","authUrl","tokenUrl","scopes","clientId","clientSecret",...vd]);return Object.keys(t).filter(r=>e.has(r))}function nx(t){if(t==null)return{};let e=Mo(t);if(!e)return{error:"auth must be an object."};let r=RAe(e.type);if(!r)return{error:"auth.type is required."};let n=Object.keys(e).filter(a=>!pAe.has(a));if(n.length>0)return{error:`Unknown auth field(s): ${n.join(", ")}. Accepted: ${fAe}.`};let i=OAe(e);if(r!=="connection_string"&&i.length>0)return{error:`Connection auth field(s) require auth.type 'connection_string': ${i.join(", ")}.`};let o=MAe(e);if(r!=="oauth2"&&o.length>0)return{error:`OAuth auth field(s) require auth.type 'oauth2': ${o.join(", ")}.`};if(r!=="oauth2"){let a=NAe(e);return{authentication:Qa({type:r,protocol:r==="connection_string"?e.protocol:void 0,config:a})}}let s={...Object.fromEntries(vd.flatMap(a=>{if(!io(e,a))return[];let c=e[a];return pt(c)?[[a,c]]:[]}))};return{authentication:Qa({type:"oauth2",oauthClientMode:bb(e.oauthClientMode),grantType:Dd(e.grantType),authUrl:$t(e.authUrl),tokenUrl:$t(e.tokenUrl),scopes:_d(e.scopes),clientId:$t(e.clientId),clientSecret:$t(e.clientSecret),config:Object.keys(s).length>0?s:void 0})}}function va(t){return t===""||t===null||t===void 0}function Qd(t,e,r,n){if(io(e,r)){if(va(e[r])){delete t[n];return}t[n]=$t(e[r])}}function xAe(t,e){if(io(e,"scopes")){if(va(e.scopes)){delete t.scopes;return}t.scopes=_d(e.scopes)}}function LAe(t,e){if(io(e,"grantType")){if(va(e.grantType)){delete t.grantType;return}t.grantType=Dd(e.grantType)}}function PAe(t,e,r){if(io(e,r)){if(va(e[r])){delete t[r];return}t[r]=e[r]}}function FAe(t,e){if(va(e))return;let r=Mo(e);if(!r)return t;let n={...t||{}};for(let[i,o]of Object.entries(r))va(o)?delete n[i]:n[i]=o;return Object.keys(n).length>0?n:void 0}function $Ae(t,e){let r=nx(e);if(r.error)return Vt(t)||{type:"none"};let n=r.authentication||{type:"none"},i=Mo(e)||{},o=Vt(t),s=o?.type===n.type;if(n.type!=="oauth2"){let d=UAe(i),A=s&&o?{...o}:{type:n.type};return n.type==="connection_string"&&io(i,"protocol")&&(va(i.protocol)?delete A.protocol:A.protocol=i.protocol),d&&(A.config=FAe(o?.config,d)),Vt(A)||{type:n.type}}let c={...s&&o?.type==="oauth2"?{...o,config:{...o.config||{}}}:{type:"oauth2",config:{}}};Qd(c,i,"oauthClientMode","oauthClientMode"),LAe(c,i),Qd(c,i,"authUrl","authUrl"),Qd(c,i,"tokenUrl","tokenUrl"),xAe(c,i),Qd(c,i,"clientId","clientId"),Qd(c,i,"clientSecret","clientSecret");let l={...c.config||{}};for(let d of vd)PAe(l,i,d);return c.config=Object.keys(l).length>0?l:void 0,Vt(c)||{type:"oauth2"}}function ix(t){let e=Vt(t);if(!e)return[];let r=new Set;for(let n of Object.keys(e.config||{}))r.add(n);return e.type==="oauth2"&&(e.grantType&&(r.add("grant_type"),r.add("grantType")),e.authUrl&&(r.add("auth_url"),r.add("authUrl")),e.tokenUrl&&(r.add("token_url"),r.add("tokenUrl"),r.add("token_uri")),e.scopes&&(r.add("scopes"),r.add("scope")),e.clientId&&(r.add("client_id"),r.add("clientId")),e.clientSecret&&(r.add("client_secret"),r.add("clientSecret"))),[...r]}function KM(t,e,r){if(r)for(let[n,i]of Object.entries(r))t.push({path:`${e}.${n}`,label:n,value:i})}function jAe({authentication:t}){let e=Vt(t)||{type:"none"},r=[];if(e.type==="oauth2"){r.push({path:"oauth2.clientId",label:"clientId",value:e.clientId},{path:"oauth2.clientSecret",label:"clientSecret",value:e.clientSecret},{path:"oauth2.grantType",label:"grantType",value:e.grantType||"authorization_code"},{path:"oauth2.authUrl",label:"authUrl",value:e.authUrl},{path:"oauth2.tokenUrl",label:"tokenUrl",value:e.tokenUrl},{path:"oauth2.scopes",label:"scopes",value:e.scopes?.join(" ")});for(let n of vd)r.push({path:`oauth2.config.${n}`,label:n,value:e.config?.[n]});for(let[n,i]of Object.entries(e.config||{}))vd.includes(n)||r.push({path:`oauth2.config.${n}`,label:n,value:i})}else e.type==="connection_string"?(e.protocol&&r.push({path:"connection.protocol",label:"protocol",value:e.protocol}),KM(r,"connection.config",e.config)):KM(r,`${e.type}.config`,e.config);return{type:e.type,authentication:e,configFields:r,hiddenCredentialKeys:ix(e)}}function qAe(t){let e=Vt(t);if(!e||e.type!=="connection_string")return[];let r={type:"field",field:{key:"username",aliases:["user"]}},n={type:"field",field:{key:"password"}};switch(e.protocol){case"sftp":return[r,{type:"oneOf",fields:[{key:"password"},{key:"privateKey"}]},{type:"field",field:{key:"passphrase"},optional:!0}];case"smb":return[r,n,{type:"field",field:{key:"domain"},optional:!0}];case"sqlserver":return[{type:"field",field:{key:"user",aliases:["username"]}},n];default:return[r,n]}}function XM(t,e){return(0,St.hasCredentialValue)(e[t.key])?!0:(t.aliases??[]).some(r=>(0,St.hasCredentialValue)(e[r]))}function ox(t,e){return t.optional?!0:t.type==="field"?XM(t.field,e):t.fields.some(r=>XM(r,e))}function zAe(t,e){let r=e||{};return t.some(n=>!ox(n,r))}function GAe({authentication:t,path:e,value:r}){let n=Vt(t)||{type:"none"};if(n.type==="oauth2"){if(e==="oauth2.grantType")return{...n,grantType:Dd(r)};if(e==="oauth2.authUrl")return{...n,authUrl:$t(r)};if(e==="oauth2.tokenUrl")return{...n,tokenUrl:$t(r)};if(e==="oauth2.scopes")return{...n,scopes:_d(r)};if(e==="oauth2.clientId")return{...n,clientId:$t(r)};if(e==="oauth2.clientSecret")return{...n,clientSecret:$t(r)};if(e.startsWith("oauth2.config.")){let o=e.slice(14);return{...n,config:Ib({config:n.config,key:o,value:r})}}}if(n.type==="connection_string"){if(e==="connection.protocol")return{...n,protocol:$t(r)};if(e.startsWith("connection.config.")){let o=e.slice(18);return{...n,config:Ib({config:n.config,key:o,value:r})}}}let i=`${n.type}.config.`;if(e.startsWith(i)){let o=e.slice(i.length);return{...n,config:Ib({config:n.config,key:o,value:r})}}return n}function sx({authentication:t,credentials:e}){if(Vt(t)?.type!=="oauth2"||!e||typeof e!="object"||Array.isArray(e))return null;let n=Object.keys(e).filter(i=>Ae.OAUTH_CONFIG_CREDENTIAL_KEYS.includes(i));return n.length===0?null:`OAuth configuration keys belong in auth, not credentials: ${n.join(", ")}. Move OAuth client ID to auth.clientId, client secret to auth.clientSecret, auth URL to auth.authUrl, token URL to auth.tokenUrl, scopes to auth.scopes, grant type to auth.grantType, and token request settings to auth fields such as tokenAuthMethod/usePKCE/extraHeaders. Runtime OAuth access and refresh tokens are created by authenticate_oauth.`}function ax(t){let e=Vt(t);return e?e.type==="oauth2"?Qa({...e.config||{},grant_type:e.grantType,auth_url:e.authUrl,token_url:e.tokenUrl,scopes:e.scopes?.join(" "),client_id:e.clientId,client_secret:e.clientSecret}):e.type==="connection_string"?e.config||{}:e.config||{}:{}}function HAe(t){return yAe.has(t.trim())}function YAe({credential:t,system:e}){return t?.authentication??e?.authentication??void 0}function VAe(t){let e=Vt(t);return e?.type==="oauth2"&&e.oauthClientMode==="managed"&&e.clientSecret?"Managed OAuth client secrets cannot be stored on credentials":null}function JAe({authentication:t,credentials:e}){let r=ax(t);return Vt(t)?.type==="oauth2"?{...e||{},...r}:{...r,...e||{}}}function WAe({input:t,authentication:e,templateOAuth:r}){let n=Vt(e),i=n?.type==="oauth2"?n:void 0,o=i?.config||{},s=t||{},a=(...c)=>c.find(u=>u!=null);return Qa({grant_type:a(s.grantType,s.grant_type,i?.grantType,r?.grant_type)||"authorization_code",scopes:a(s.scopes,i?.scopes?.join(" "),r?.scopes),client_id:a(s.clientId,s.client_id,i?.clientId),client_secret:a(s.clientSecret,s.client_secret,i?.clientSecret),auth_url:a(s.authUrl,s.auth_url,i?.authUrl,r?.authUrl),token_url:a(s.tokenUrl,s.token_url,i?.tokenUrl,r?.tokenUrl),resource:a(s.resource,o.resource,r?.resource),tokenAuthMethod:a(s.tokenAuthMethod,o.tokenAuthMethod,r?.tokenAuthMethod),tokenContentType:a(s.tokenContentType,o.tokenContentType,r?.tokenContentType),usePKCE:a(s.usePKCE,o.usePKCE,r?.usePKCE),extraHeaders:a(s.extraHeaders,o.extraHeaders,r?.extraHeaders),extraBodyParams:a(s.extraBodyParams,o.extraBodyParams,r?.extraBodyParams)})}function Sb(t){if(t==null)return"";if(typeof t=="string")return t;let e=JSON.stringify(t);return e===void 0?String(t):e}function ZAe(t,e={}){let r=new Set((e.hiddenKeys||[]).map(St.normalizeCredentialKey));return Object.entries(t).filter(([n])=>!r.has((0,St.normalizeCredentialKey)(n))).sort(([n],[i])=>{let o=ZM.get((0,St.normalizeCredentialKey)(n))??Number.MAX_SAFE_INTEGER,s=ZM.get((0,St.normalizeCredentialKey)(i))??Number.MAX_SAFE_INTEGER;if(o!==s)return o-s;let a=(0,St.isSensitiveCredentialKey)(n),c=(0,St.isSensitiveCredentialKey)(i);return a!==c?a?-1:1:n.localeCompare(i)}).map(([n,i])=>({key:n,value:Sb(i),isReservedMasked:e.maskAll||(0,St.isSensitiveCredentialKey)(n)}))}function KAe(t){return Object.fromEntries(Object.entries(t).map(([e,r])=>[e,Sb(r)]))}function XAe({hideOAuthFiles:t=!1,configKeys:e=[]}){return[...e,...t?["oauth_cert","oauth_key"]:[]]}function epe(t){return pt(t.access_token)||pt(t.refresh_token)}function tpe(t){let e=t.expires_at??t.expiry;if(e){let n=(0,AAe.parseUTCDate)(e);if(n)return`Expires ${n.toLocaleString()}`}let r=t.expires_in;return pt(r)?`Expires in ${r} seconds`:null}function rpe(t){return!!(t&&typeof t=="object"&&!Array.isArray(t)&&Object.values(t).some(e=>pt(e)))}function cx(t){if(!t||typeof t!="object"||Array.isArray(t))return null;let e=(0,St.getInvalidCredentialKeyNames)(Object.keys(t));return e.length===0?null:`${St.CREDENTIAL_KEY_VALIDATION_DESCRIPTION} Invalid keys: ${e.join(", ")}`}function ux(t){let e=(0,St.getInvalidCredentialKeyNames)(t);return e.length===0?null:`${St.CREDENTIAL_KEY_VALIDATION_DESCRIPTION} Invalid keys: ${e.join(", ")}`}function lx(t){return Array.isArray(t)?[...new Set(t.map(e=>String(e||"").trim()).filter(Boolean))]:[]}function npe({credentials:t,askForUserInputs:e}){let r=cx(t);if(r)return r;let n=lx(e),i=ux(n);if(i)return i;if(t&&typeof t=="object"&&!Array.isArray(t))for(let[o,s]of kAe(t)){if(s===""||s===null)return"Blank secret values are not allowed; list secret names to collect from the user in askForUserInputs.";if(n.includes(o))return`Secret name '${o}' cannot be in both credentials and askForUserInputs.`}return null}function ipe(t){let e={"grant_type authorization_code or client_credentials":"grantType authorization_code or client_credentials",client_id:"clientId",token_url:"tokenUrl",auth_url:"authUrl","client_secret or usePKCE":"clientSecret or usePKCE","client_secret or oauth_cert + oauth_key":"clientSecret or oauth_cert + oauth_key"};return t.map(r=>e[r]||r)}function ope({authentication:t,credentials:e}){return sx({authentication:t,credentials:e})}});var Tx=m(Gn=>{"use strict";Object.defineProperty(Gn,"__esModule",{value:!0});Gn.bundles=void 0;Gn.buildBundleAgentLaunch=ype;Gn.getBundle=Epe;Gn.listBundles=Ipe;Gn.rewriteBundleToolSystemId=Cpe;var spe=pr(),ape="https://sandbox.api.sap.com/s4hanacloud/sap/opu/odata/sap",cpe="<<(p) => { const value = p['sage_intacct_entity_id']; if (!value) return ''; const escaped = String(value).replaceAll('&', '&amp;').replaceAll('<', '&lt;').replaceAll('>', '&gt;').replaceAll('\"', '&quot;').replaceAll(\"'\", '&apos;'); return `<locationid>${escaped}</locationid>`; }>>",dx="<<() => crypto.randomUUID()>>";function ft(t){return`<?xml version="1.0" encoding="UTF-8"?><request><control><senderid><<sage_intacct_sender_id>></senderid><password><<sage_intacct_sender_password>></password><controlid>${dx}</controlid><uniqueid>false</uniqueid><dtdversion>3.0</dtdversion></control><operation><authentication><login><userid><<sage_intacct_user_id>></userid><companyid><<sage_intacct_company_id>></companyid><password><<sage_intacct_user_password>></password>${cpe}</login></authentication><content><function controlid="${dx}">${t}</function></content></operation></request>`}function ys({stepId:t,objectNameExpression:e,collectionName:r,mapExpression:n,includeTotalCount:i=!1}){let o=i?"Number(data && data.TOTALCOUNT ? data.TOTALCOUNT : rows.length)":"rows.length",s=n?`rows.map(${n})`:"rows";return`(sourceData) => { const response = sourceData.${t} && sourceData.${t}.data ? sourceData.${t}.data.RESPONSE : undefined; const control = response ? response.CONTROL : undefined; const operation = response ? response.OPERATION : undefined; const authentication = operation ? operation.AUTHENTICATION : undefined; const result = operation ? operation.RESULT : undefined; const statuses = [control && control.STATUS, authentication && authentication.STATUS, result && result.STATUS].filter(Boolean).map((value) => String(value).toLowerCase()); if (statuses.includes('failure')) { const message = (result && result.ERRORMESSAGE) || (authentication && authentication.ERR ? authentication.ERR.ERRORMESSAGE : undefined) || (control && control.ERR ? control.ERR.ERRORMESSAGE : undefined); const rawErrors = message ? message.ERROR : undefined; const errors = Array.isArray(rawErrors) ? rawErrors : (rawErrors ? [rawErrors] : []); const details = errors.map((error) => [error.ERRORNO, error.DESCRIPTION2 || error.DESCRIPTION, error.CORRECTION].filter(Boolean).join(' - ')).filter(Boolean); const supportIds = errors.map((error) => error.SUPPORTID).filter(Boolean); const suffix = supportIds.length ? \` Sage support ID: \${supportIds.join(', ')}.\` : ''; throw new Error(\`Sage Intacct request failed\${details.length ? \`: \${details.join('; ')}\` : '.'}\${suffix}\`); } const data = result ? result.DATA : undefined; const objectName = ${e}; const raw = data ? data[objectName] : undefined; const rows = (Array.isArray(raw) ? raw : (raw ? [raw] : [])).slice(0, (sourceData && sourceData.maxResults) ?? ${i?"1000":"200"}); return { total: ${o}, ${r}: ${s} }; }`}var Es=`const esc = (value) => String(value).replaceAll('&', '&amp;').replaceAll('<', '&lt;').replaceAll('>', '&gt;').replaceAll('"', '&quot;').replaceAll("'", '&apos;');`,Ax="const toIntacctDate = (value) => { const match = String(value).match(/^(\\d{4})-(\\d{2})-(\\d{2})/); if (!match) throw new Error('Dates must be in YYYY-MM-DD format.'); return match[2] + '/' + match[3] + '/' + match[1]; };",px="const assertBalanced = (lines) => { const balance = lines.reduce((sum, line) => sum + (line.type === 'credit' ? -1 : 1) * Math.abs(Number(line.amount)), 0); if (Math.abs(balance) > 0.005) throw new Error('Journal lines must balance: debits minus credits is ' + balance.toFixed(2) + '.'); };",fx=`const lineXml = (line) => { const amount = Number(line.amount); if (!Number.isFinite(amount) || amount <= 0) throw new Error('Every journal line needs a positive amount.'); const type = line.type === 'credit' ? -1 : line.type === 'debit' ? 1 : null; if (type === null) throw new Error("Every journal line needs type 'debit' or 'credit'."); if (!line.accountNo) throw new Error('Every journal line needs accountNo.'); let xml = '<GLENTRY><ACCOUNTNO>' + esc(line.accountNo) + '</ACCOUNTNO><TR_TYPE>' + type + '</TR_TYPE><TRX_AMOUNT>' + amount + '</TRX_AMOUNT>'; if (line.department) xml += '<DEPARTMENT>' + esc(line.department) + '</DEPARTMENT>'; if (line.location) xml += '<LOCATION>' + esc(line.location) + '</LOCATION>'; if (line.memo) xml += '<DESCRIPTION>' + esc(line.memo) + '</DESCRIPTION>'; return xml + '</GLENTRY>'; };`;function ru({stepId:t,objectName:e}){return`(sourceData) => { const response = sourceData.${t} && sourceData.${t}.data ? sourceData.${t}.data.RESPONSE : undefined; const control = response ? response.CONTROL : undefined; const operation = response ? response.OPERATION : undefined; const authentication = operation ? operation.AUTHENTICATION : undefined; const result = operation ? operation.RESULT : undefined; const statuses = [control && control.STATUS, authentication && authentication.STATUS, result && result.STATUS].filter(Boolean).map((value) => String(value).toLowerCase()); if (statuses.includes('failure')) { const message = (result && result.ERRORMESSAGE) || (authentication && authentication.ERR ? authentication.ERR.ERRORMESSAGE : undefined) || (control && control.ERR ? control.ERR.ERRORMESSAGE : undefined); const rawErrors = message ? message.ERROR : undefined; const errors = Array.isArray(rawErrors) ? rawErrors : (rawErrors ? [rawErrors] : []); const details = errors.map((error) => [error.ERRORNO, error.DESCRIPTION2 || error.DESCRIPTION, error.CORRECTION].filter(Boolean).join(' - ')).filter(Boolean); const supportIds = errors.map((error) => error.SUPPORTID).filter(Boolean); const suffix = supportIds.length ? \` Sage support ID: \${supportIds.join(', ')}.\` : ''; throw new Error(\`Sage Intacct request failed\${details.length ? \`: \${details.join('; ')}\` : '.'}\${suffix}\`); } const data = result ? result.DATA : undefined; const raw = data ? (data.${e} || data.${e.toLowerCase()}) : undefined; const record = Array.isArray(raw) ? raw[0] : raw; return { recordNo: record && record.RECORDNO ? Number(record.RECORDNO) : undefined, record }; }`}var Od="netsuite",Qb=100,Nd=1e4,ug=String.raw`<<(p) => { const url = String(p['netsuite_url'] || ''); if (!url || url.includes('{accountId}')) throw new Error('NetSuite is not connected yet: set the account ID so the system URL is https://<account>.suitetalk.api.netsuite.com/services/rest'); return url.replace(/\/+$/, ''); }>>`,lg={Authorization:"Bearer <<netsuite_access_token>>",Accept:"application/json"},vb=String.raw`const has = (value) => value !== undefined && value !== null && value !== ''; const nsId = (value, name) => { const text = String(value ?? '').trim(); if (!/^-?\d+$/.test(text)) throw new Error(name + ' must be a NetSuite internal ID.'); return text; }; const nsDate = (value, name) => { const text = String(value ?? '').trim(); if (!/^\d{4}-\d{2}-\d{2}$/.test(text)) throw new Error(name + ' must be a date in YYYY-MM-DD format.'); return text; }; const ref = (value, name) => ({ id: nsId(value, name) });`,upe=String.raw`const str = (value) => (value === undefined || value === null || value === '' ? null : String(value)); const num = (value) => (value === undefined || value === null || value === '' ? null : Number(value)); const bool = (value) => value === 'T' || value === true; const ids = (value) => (value === undefined || value === null || value === '' ? [] : String(value).split(',').map((part) => part.trim()).filter(Boolean)); const status = (value) => (value ? String(value).replace(/^[^:]*:\s*/, '') : null);`,hx=String.raw`const stripLinks = (value) => { if (Array.isArray(value)) return value.map(stripLinks); if (value && typeof value === 'object') { const result = {}; for (const [key, entry] of Object.entries(value)) { if (key !== 'links') result[key] = stripLinks(entry); } return result; } return value; };`,lpe={type:"integer",minimum:1,maximum:Nd,description:`Maximum number of records to return (max ${Nd}). Defaults to ${Qb}. The result always reports the full match count in total, so use maxResults 1 to count. Prefer filters over large values: big results can exceed an AI client's tool output limit.`},dpe={type:"boolean",description:"Only return active records. Defaults to false (inactive records are included)."},Ape={type:"string",description:"Optional subsidiary internal ID to filter by."},ppe={type:"string",description:"Optional earliest transaction date as YYYY-MM-DD."},fpe={type:"string",description:"Optional latest transaction date as YYYY-MM-DD."},hpe={type:"object",description:"Optional extra NetSuite REST field values merged into the record body as-is, e.g. custom fields like { custentity_region: 'EMEA' } or references like { terms: { id: '2' } }. Fields that this tool's own inputs set are rejected; use those inputs instead.",properties:{},additionalProperties:!0},Rd=t=>({input:"activeOnly",kind:"flag",clause:`${t}.isinactive = 'F'`,schema:dpe}),kd=t=>({input:"subsidiaryId",kind:"id",clause:`${t}.subsidiary = $`,schema:Ape}),wb=[{input:"fromDate",kind:"date",clause:"t.trandate >= TO_DATE('$', 'YYYY-MM-DD')",schema:ppe},{input:"toDate",kind:"date",clause:"t.trandate <= TO_DATE('$', 'YYYY-MM-DD')",schema:fpe}];function gpe(t){let e=`p[${JSON.stringify(t.input)}]`;if(t.kind==="flag")return`if (${e} === true || ${e} === 'true') where.push(${JSON.stringify(t.clause)});`;let[r,n]=t.clause.split("$");if(t.kind==="enum")return`if (has(${e})) { const allowed = ${JSON.stringify(t.values)}; if (!allowed.includes(String(${e}))) throw new Error(${JSON.stringify(`${t.input} must be one of: ${t.values.join(", ")}.`)}); where.push(${JSON.stringify(r)} + String(${e}) + ${JSON.stringify(n)}); }`;if(t.kind==="prefix")return`if (has(${e})) { const text = String(${e}).trim(); if (!/^[A-Za-z0-9._-]{1,40}$/.test(text)) throw new Error(${JSON.stringify(`${t.input} may only contain letters, digits, dots, underscores and hyphens.`)}); where.push(${JSON.stringify(r)} + text + ${JSON.stringify(n)}); }`;let i=t.kind==="id"?"nsId":"nsDate";return`if (has(${e})) where.push(${JSON.stringify(r)} + ${i}(${e}, ${JSON.stringify(t.input)}) + ${JSON.stringify(n)});`}function Is({id:t,name:e,shortName:r,instruction:n,stepId:i,collection:o,select:s,baseWhere:a=[],orderBy:c,filters:u=[],properties:l={},required:d=[],mapRow:A}){let p=typeof s=="string"?JSON.stringify(s):s.js,h=`<<(p) => { ${vb} const where = ${JSON.stringify(a)}; ${u.map(gpe).join(" ")} return JSON.stringify({ q: ${p} + (where.length ? ' WHERE ' + where.join(' AND ') : '') + ${JSON.stringify(` ORDER BY ${c}`)} }); }>>`;return{id:t,name:e,shortName:r,instruction:`${n} Rows are ordered by internal ID. If more than ${Nd} rows match, narrow with the filters or page with the SuiteQL query tool (ORDER BY id, WHERE id > last id).`,inputSchema:{type:"object",properties:{...l,maxResults:lpe,...Object.fromEntries(u.map(g=>[g.input,g.schema]))},...d.length>0?{required:d}:{},additionalProperties:!1},steps:[{id:i,instruction:"Run the SuiteQL query page by page.",config:{type:"request",systemId:Od,url:`${ug}/query/v1/suiteql`,method:"POST",headers:{...lg,"Content-Type":"application/json",Prefer:"transient"},queryParams:{limit:"1000",offset:"<<offset>>"},body:h,pagination:{type:"offsetBased",pageSize:"1000",stopCondition:`(response, pageInfo, sourceData) => { if (sourceData && ["offset", "limit", "page"].some((key) => sourceData[key] !== undefined)) throw new Error("offset, limit and page are not inputs of this tool: use maxResults and the filters."); const page = response && response.data ? response.data : {}; const merged = pageInfo && pageInfo.mergedResult && Array.isArray(pageInfo.mergedResult.items) ? pageInfo.mergedResult.items.length : 0; const max = Math.min(Math.max(Math.floor(Number(sourceData && sourceData.maxResults)) || ${Qb}, 1), ${Nd}); return page.hasMore !== true || merged >= max; }`}}}],outputTransform:`(sourceData) => { ${upe} const raw = sourceData.${i} ? sourceData.${i}.data : undefined; const pages = Array.isArray(raw) ? raw : (raw ? [raw] : []); const items = pages.flatMap((page) => (page && Array.isArray(page.items) ? page.items : [])); const last = pages.length ? pages[pages.length - 1] : {}; const max = Math.min(Math.max(Math.floor(Number(sourceData.maxResults)) || ${Qb}, 1), ${Nd}); const rows = items.slice(0, max).map(${A}).map((row) => Object.fromEntries(Object.entries(row).filter((entry) => entry[1] !== null))); const total = last && last.totalResults !== undefined ? Number(last.totalResults) : items.length; return { total, returned: rows.length, hasMore: total > rows.length, ${o}: rows }; }`}}function Er({id:t,name:e,shortName:r,instruction:n,stepId:i,recordType:o,mode:s,properties:a,required:c,body:u,replaceSublist:l}){let d=[...new Set(Array.from(u.matchAll(/record\.([A-Za-z0-9_]+)\s*=/g)).map(p=>p[1]))],A=s==="create"?`/record/v1/${o}`:`/record/v1/${o}/<<(p) => { ${vb} return nsId(p.internalId, 'internalId'); }>>`;return{id:t,name:e,shortName:r,instruction:n,inputSchema:{type:"object",properties:{...s==="update"?{internalId:{type:"string",description:`Internal ID of the ${o} to update.`}}:{},...a,fields:hpe},required:s==="update"?["internalId",...c]:c,additionalProperties:!1},steps:[{id:i,instruction:`${s==="create"?"Create":"Update"} the ${o} record.`,modify:!0,config:{type:"request",systemId:Od,url:`${ug}${A}`,method:s==="create"?"POST":"PATCH",headers:{...lg,"Content-Type":"application/json","X-NetSuite-idempotency-key":"<<() => crypto.randomUUID()>>"},...l?{queryParams:{replace:`<<(p) => (Array.isArray(p[${JSON.stringify(l.input)}]) && p[${JSON.stringify(l.input)}].length > 0 ? ${JSON.stringify(l.sublist)} : undefined)>>`}}:{},body:`<<(p) => { ${vb} const record = {}; ${u} if (p.fields && typeof p.fields === 'object' && !Array.isArray(p.fields)) { const managed = ${JSON.stringify(d)}; const reserved = Object.keys(p.fields).filter((key) => managed.includes(key)); if (reserved.length > 0) throw new Error('fields may not set ' + reserved.join(', ') + ': use this tool\\'s own inputs for them.'); Object.assign(record, p.fields); } if (Object.keys(record).length === 0) throw new Error('Provide at least one field to ${s}.'); return JSON.stringify(record); }>>`,captureHttpResponse:!0}}],outputTransform:s==="create"?`(sourceData) => { const step = sourceData.${i} || {}; const location = step.http && step.http.headers ? String(step.http.headers.location || '') : ''; const match = location.match(/\\/record\\/v1\\/[^/]+\\/([^/?#]+)/); if (!match) throw new Error('NetSuite did not return the location of the new ${o}.'); return { id: decodeURIComponent(match[1]), recordType: '${o}' }; }`:`(sourceData) => ({ id: String(sourceData.internalId).trim(), recordType: '${o}', updated: true })`}}var gx=String.raw`const lines = Array.isArray(p.lines) ? p.lines : []; let balance = 0; const items = lines.map((line, index) => { const amount = Number(line && line.amount); if (!Number.isFinite(amount) || amount <= 0) throw new Error('lines[' + index + '].amount must be a positive number.'); if (line.type !== 'debit' && line.type !== 'credit') throw new Error("lines[" + index + "].type must be 'debit' or 'credit'."); balance += line.type === 'debit' ? amount : -amount; const item = { account: ref(line.accountId, 'lines[' + index + '].accountId') }; item[line.type] = amount; if (has(line.memo)) item.memo = String(line.memo); if (has(line.departmentId)) item.department = ref(line.departmentId, 'lines[' + index + '].departmentId'); if (has(line.classId)) item.class = ref(line.classId, 'lines[' + index + '].classId'); if (has(line.locationId)) item.location = ref(line.locationId, 'lines[' + index + '].locationId'); if (has(line.entityId)) item.entity = ref(line.entityId, 'lines[' + index + '].entityId'); return item; }); if (lines.length > 0 && Math.abs(balance) > 0.005) throw new Error('Journal lines must balance: debits minus credits is ' + balance.toFixed(2) + '.'); if (items.length > 0) record.line = { items };`,mx=String.raw`if (has(p.subsidiaryId)) record.subsidiary = ref(p.subsidiaryId, 'subsidiaryId'); if (has(p.date)) record.tranDate = nsDate(p.date, 'date'); if (has(p.memo)) record.memo = String(p.memo); if (has(p.currencyId)) record.currency = ref(p.currencyId, 'currencyId'); if (has(p.externalId)) record.externalId = String(p.externalId);`,yx={type:"object",properties:{accountId:{type:"string",description:"GL account internal ID."},type:{type:"string",enum:["debit","credit"]},amount:{type:"number",description:"Positive amount."},memo:{type:"string",description:"Optional line memo."},departmentId:{type:"string",description:"Optional department internal ID."},classId:{type:"string",description:"Optional class internal ID."},locationId:{type:"string",description:"Optional location internal ID."},entityId:{type:"string",description:"Optional customer, vendor or employee internal ID for the line."}},required:["accountId","type","amount"],additionalProperties:!1},Ex=t=>({subsidiaryId:{type:"string",description:t==="create"?"Subsidiary internal ID. Required in OneWorld accounts.":"Optional new subsidiary internal ID."},date:{type:"string",description:t==="create"?"Transaction date as YYYY-MM-DD.":"Optional new transaction date as YYYY-MM-DD."},memo:{type:"string",description:"Journal entry memo."},currencyId:{type:"string",description:"Optional currency internal ID."},externalId:{type:"string",description:"Optional external ID."}}),ng=String.raw`if (p.isPerson === true || p.isPerson === 'true') record.isPerson = true; if (p.isPerson === false || p.isPerson === 'false') record.isPerson = false; if (has(p.entityId)) record.entityId = String(p.entityId); if (has(p.companyName)) record.companyName = String(p.companyName); if (has(p.firstName)) record.firstName = String(p.firstName); if (has(p.lastName)) record.lastName = String(p.lastName); if (has(p.subsidiaryId)) record.subsidiary = ref(p.subsidiaryId, 'subsidiaryId'); if (has(p.email)) record.email = String(p.email); if (has(p.phone)) record.phone = String(p.phone); if (has(p.currencyId)) record.currency = ref(p.currencyId, 'currencyId'); if (has(p.externalId)) record.externalId = String(p.externalId); if (p.isInactive === true || p.isInactive === 'true') record.isInactive = true; if (p.isInactive === false || p.isInactive === 'false') record.isInactive = false;`;function ig(t){return{companyName:{type:"string",description:`Company name of the ${t}.`},isPerson:{type:"boolean",description:`True when the ${t} is an individual; then set firstName and lastName.`},firstName:{type:"string",description:"First name for an individual."},lastName:{type:"string",description:"Last name for an individual."},entityId:{type:"string",description:`${t==="customer"?"Customer":"Vendor"} ID. Omit when auto-numbering assigns it.`},subsidiaryId:{type:"string",description:"Primary subsidiary internal ID. Required on create in OneWorld accounts."},email:{type:"string",description:"Email address."},phone:{type:"string",description:"Phone number."},currencyId:{type:"string",description:"Primary currency internal ID."},externalId:{type:"string",description:"Optional external ID."}}}var og={isInactive:{type:"boolean",description:"Set true to inactivate, false to reactivate."}},sg=String.raw`if (Array.isArray(p.subsidiaryIds) && p.subsidiaryIds.length > 0) record.subsidiary = { items: p.subsidiaryIds.map((value, index) => ref(value, 'subsidiaryIds[' + index + ']')) }; if (p.includeChildren === true || p.includeChildren === 'true') record.includeChildren = true; if (p.includeChildren === false || p.includeChildren === 'false') record.includeChildren = false;`,_x={subsidiaryIds:{type:"array",items:{type:"string"},description:"Subsidiary internal IDs the record is available in. On update the list replaces the current subsidiaries."},includeChildren:{type:"boolean",description:"Also make the record available to child subsidiaries."}},_b=["AcctPay","AcctRec","Bank","COGS","CredCard","DeferExpense","DeferRevenue","Equity","Expense","FixedAsset","Income","LongTermLiab","NonPosting","OthAsset","OthCurrAsset","OthCurrLiab","OthExpense","OthIncome","Stat","UnbilledRec"],Ix=String.raw`if (has(p.acctNumber)) record.acctNumber = String(p.acctNumber); if (has(p.acctName)) record.acctName = String(p.acctName); if (has(p.acctType)) record.acctType = { id: String(p.acctType) }; if (has(p.parentId)) record.parent = ref(p.parentId, 'parentId'); if (has(p.description)) record.description = String(p.description); if (has(p.currencyId)) record.currency = ref(p.currencyId, 'currencyId'); if (has(p.externalId)) record.externalId = String(p.externalId); if (p.isInactive === true || p.isInactive === 'true') record.isInactive = true; if (p.isInactive === false || p.isInactive === 'false') record.isInactive = false;`,Cx={acctNumber:{type:"string",description:"Account number."},acctName:{type:"string",description:"Account name."},acctType:{type:"string",enum:_b,description:"NetSuite account type."},parentId:{type:"string",description:"Optional parent account internal ID."},description:{type:"string",description:"Optional description."},currencyId:{type:"string",description:"Optional currency internal ID (bank and credit card accounts)."},externalId:{type:"string",description:"Optional external ID."},..._x},bx=String.raw`if (has(p.name)) record.name = String(p.name); if (has(p.parentId)) record.parent = ref(p.parentId, 'parentId'); if (has(p.externalId)) record.externalId = String(p.externalId); if (p.isInactive === true || p.isInactive === 'true') record.isInactive = true; if (p.isInactive === false || p.isInactive === 'false') record.isInactive = false;`,Sx={name:{type:"string",description:"Department name."},parentId:{type:"string",description:"Optional parent department internal ID."},externalId:{type:"string",description:"Optional external ID."},..._x},ag=t=>String.raw`if (has(p.${t})) record.entity = ref(p.${t}, '${t}'); if (has(p.subsidiaryId)) record.subsidiary = ref(p.subsidiaryId, 'subsidiaryId'); if (has(p.date)) record.tranDate = nsDate(p.date, 'date'); if (has(p.dueDate)) record.dueDate = nsDate(p.dueDate, 'dueDate'); if (has(p.memo)) record.memo = String(p.memo); if (has(p.currencyId)) record.currency = ref(p.currencyId, 'currencyId'); if (has(p.termsId)) record.terms = ref(p.termsId, 'termsId'); if (has(p.departmentId)) record.department = ref(p.departmentId, 'departmentId'); if (has(p.classId)) record.class = ref(p.classId, 'classId'); if (has(p.locationId)) record.location = ref(p.locationId, 'locationId'); if (has(p.externalId)) record.externalId = String(p.externalId);`,cg=t=>({subsidiaryId:{type:"string",description:t==="create"?"Optional subsidiary internal ID; defaults to the entity's subsidiary.":"Optional new subsidiary internal ID."},date:{type:"string",description:t==="create"?"Transaction date as YYYY-MM-DD.":"Optional new transaction date as YYYY-MM-DD."},dueDate:{type:"string",description:"Optional due date as YYYY-MM-DD."},memo:{type:"string",description:"Optional memo."},currencyId:{type:"string",description:"Optional currency internal ID."},termsId:{type:"string",description:"Optional payment terms internal ID."},departmentId:{type:"string",description:"Optional header department internal ID."},classId:{type:"string",description:"Optional header class internal ID."},locationId:{type:"string",description:"Optional header location internal ID."},externalId:{type:"string",description:"Optional external ID."}}),Dx=String.raw`if (has(line.departmentId)) item.department = ref(line.departmentId, 'lines[' + index + '].departmentId'); if (has(line.classId)) item.class = ref(line.classId, 'lines[' + index + '].classId'); if (has(line.locationId)) item.location = ref(line.locationId, 'lines[' + index + '].locationId');`,wx=String.raw`if (Array.isArray(p.lines) && p.lines.length > 0) record.item = { items: p.lines.map((line, index) => { const item = { item: ref(line && line.itemId, 'lines[' + index + '].itemId') }; if (has(line.quantity)) { const quantity = Number(line.quantity); if (!Number.isFinite(quantity)) throw new Error('lines[' + index + '].quantity must be a number.'); item.quantity = quantity; } if (has(line.rate)) { const rate = Number(line.rate); if (!Number.isFinite(rate)) throw new Error('lines[' + index + '].rate must be a number.'); item.rate = rate; } if (has(line.amount)) { const amount = Number(line.amount); if (!Number.isFinite(amount)) throw new Error('lines[' + index + '].amount must be a number.'); item.amount = amount; } if (has(line.description)) item.description = String(line.description); if (has(line.taxCodeId)) item.taxCode = ref(line.taxCodeId, 'lines[' + index + '].taxCodeId'); ${Dx} return item; }) };`,Bx={type:"object",properties:{itemId:{type:"string",description:"Item internal ID."},quantity:{type:"number",description:"Optional quantity. Defaults to 1."},rate:{type:"number",description:"Optional unit price; defaults to the item price."},amount:{type:"number",description:"Optional line amount."},description:{type:"string",description:"Optional line description."},taxCodeId:{type:"string",description:"Optional tax code internal ID."},departmentId:{type:"string",description:"Optional department internal ID."},classId:{type:"string",description:"Optional class internal ID. Some accounts ignore line classes on invoices; check the saved record."},locationId:{type:"string",description:"Optional location internal ID."}},required:["itemId"],additionalProperties:!1},Qx=String.raw`if (Array.isArray(p.lines) && p.lines.length > 0) record.expense = { items: p.lines.map((line, index) => { const amount = Number(line && line.amount); if (!Number.isFinite(amount) || amount <= 0) throw new Error('lines[' + index + '].amount must be a positive number.'); const item = { account: ref(line.accountId, 'lines[' + index + '].accountId'), amount }; if (has(line.memo)) item.memo = String(line.memo); ${Dx} return item; }) };`,vx={type:"object",properties:{accountId:{type:"string",description:"Expense account internal ID."},amount:{type:"number",description:"Positive amount."},memo:{type:"string",description:"Optional line memo."},departmentId:{type:"string",description:"Optional department internal ID."},classId:{type:"string",description:"Optional class internal ID."},locationId:{type:"string",description:"Optional location internal ID."}},required:["accountId","amount"],additionalProperties:!1},_a="Re-running this tool creates another record; it is not idempotent.",mpe=[Is({id:"netsuite-list-accounts",name:"List NetSuite chart of accounts",shortName:"Chart of accounts",instruction:"Lists general ledger accounts (the chart of accounts) from NetSuite with number, name, type, parent and subsidiaries. Useful for validating an imported chart of accounts.",stepId:"queryAccounts",collection:"accounts",select:"SELECT a.id, a.acctnumber, a.accountsearchdisplaynamecopy AS name, a.fullname, a.accttype, a.parent, a.subsidiary, cur.symbol AS currency, a.description, a.issummary, a.isinactive FROM account a LEFT JOIN currency cur ON cur.id = a.currency",orderBy:"a.id",filters:[Rd("a"),{input:"accountType",kind:"enum",values:_b,clause:"a.accttype = '$'",schema:{type:"string",enum:_b,description:"Only accounts of this NetSuite account type, e.g. Bank or Expense."}},{input:"numberPrefix",kind:"prefix",clause:"a.acctnumber LIKE '$%'",schema:{type:"string",description:"Only accounts whose number starts with this value, e.g. 1000 or 60."}}],mapRow:"(row) => ({ id: row.id, number: str(row.acctnumber), name: str(row.name), fullName: str(row.fullname), type: str(row.accttype), parentId: str(row.parent), subsidiaryIds: ids(row.subsidiary), currency: str(row.currency), description: str(row.description), isSummary: bool(row.issummary), isInactive: bool(row.isinactive) })"}),Is({id:"netsuite-list-customers",name:"List NetSuite customers",shortName:"Customers",instruction:"Lists customer records from NetSuite with subsidiary, currency and open balance. Useful for verifying migrated AR master data.",stepId:"queryCustomers",collection:"customers",select:"SELECT c.id, c.entityid, c.companyname, c.isperson, c.firstname, c.lastname, c.email, c.phone, c.subsidiary, BUILTIN.DF(c.subsidiary) AS subsidiaryname, cur.symbol AS currency, c.balancesearch, c.overduebalancesearch, c.isinactive, TO_CHAR(c.datecreated, 'YYYY-MM-DD') AS datecreated, TO_CHAR(c.lastmodifieddate, 'YYYY-MM-DD') AS lastmodified FROM customer c LEFT JOIN currency cur ON cur.id = c.currency",orderBy:"c.id",filters:[Rd("c"),kd("c")],mapRow:"(row) => ({ id: row.id, entityId: str(row.entityid), companyName: str(row.companyname), isPerson: bool(row.isperson), firstName: str(row.firstname), lastName: str(row.lastname), email: str(row.email), phone: str(row.phone), subsidiaryId: str(row.subsidiary), subsidiary: str(row.subsidiaryname), currency: str(row.currency), balance: num(row.balancesearch), overdueBalance: num(row.overduebalancesearch), isInactive: bool(row.isinactive), createdOn: str(row.datecreated), modifiedOn: str(row.lastmodified) })"}),Is({id:"netsuite-list-vendors",name:"List NetSuite vendors",shortName:"Vendors",instruction:"Lists vendor records from NetSuite with subsidiary, currency and balance. Useful for verifying migrated AP master data.",stepId:"queryVendors",collection:"vendors",select:"SELECT v.id, v.entityid, v.companyname, v.isperson, v.firstname, v.lastname, v.email, v.phone, v.subsidiary, BUILTIN.DF(v.subsidiary) AS subsidiaryname, cur.symbol AS currency, v.balance, v.isinactive, TO_CHAR(v.datecreated, 'YYYY-MM-DD') AS datecreated, TO_CHAR(v.lastmodifieddate, 'YYYY-MM-DD') AS lastmodified FROM vendor v LEFT JOIN currency cur ON cur.id = v.currency",orderBy:"v.id",filters:[Rd("v"),kd("v")],mapRow:"(row) => ({ id: row.id, entityId: str(row.entityid), companyName: str(row.companyname), isPerson: bool(row.isperson), firstName: str(row.firstname), lastName: str(row.lastname), email: str(row.email), phone: str(row.phone), subsidiaryId: str(row.subsidiary), subsidiary: str(row.subsidiaryname), currency: str(row.currency), balance: num(row.balance), isInactive: bool(row.isinactive), createdOn: str(row.datecreated), modifiedOn: str(row.lastmodified) })"}),Is({id:"netsuite-list-journal-entries",name:"List NetSuite journal entries",shortName:"Journal entries",instruction:"Lists journal entry lines from NetSuite, one row per GL line and accounting book with journal, date, period, account, debit, credit and dimensions. Useful for verifying opening balances and postings at cutover.",stepId:"queryJournalLines",collection:"journalLines",select:"SELECT t.id AS journalid, t.tranid, TO_CHAR(t.trandate, 'YYYY-MM-DD') AS trandate, BUILTIN.DF(t.postingperiod) AS period, t.subsidiary, BUILTIN.DF(t.status) AS status, t.posting, t.memo AS journalmemo, cur.symbol AS currency, tl.id AS lineid, tal.accountingbook, tal.account, a.acctnumber, a.accountsearchdisplaynamecopy AS accountname, tal.debit, tal.credit, tl.memo, tl.department, tl.class, tl.location, tl.entity FROM transaction t JOIN transactionline tl ON tl.transaction = t.id JOIN transactionaccountingline tal ON tal.transaction = tl.transaction AND tal.transactionline = tl.id JOIN account a ON a.id = tal.account LEFT JOIN currency cur ON cur.id = t.currency",baseWhere:["t.type = 'Journal'"],orderBy:"t.id, tl.id, tal.accountingbook",filters:[...wb,kd("t")],mapRow:"(row) => ({ journalId: row.journalid, tranId: str(row.tranid), date: str(row.trandate), period: str(row.period), subsidiaryId: str(row.subsidiary), status: status(row.status), posting: bool(row.posting), journalMemo: str(row.journalmemo), currency: str(row.currency), line: num(row.lineid), accountingBookId: str(row.accountingbook), accountId: str(row.account), accountNumber: str(row.acctnumber), accountName: str(row.accountname), debit: num(row.debit), credit: num(row.credit), memo: str(row.memo), departmentId: str(row.department), classId: str(row.class), locationId: str(row.location), entityId: str(row.entity) })"}),Is({id:"netsuite-list-invoices",name:"List NetSuite invoices",shortName:"Invoices",instruction:"Lists customer invoices from NetSuite with customer, dates, status, total and amount due. Useful for verifying migrated open AR at go-live.",stepId:"queryInvoices",collection:"invoices",select:"SELECT t.id, t.tranid, t.entity, BUILTIN.DF(t.entity) AS customername, TO_CHAR(t.trandate, 'YYYY-MM-DD') AS trandate, TO_CHAR(t.duedate, 'YYYY-MM-DD') AS duedate, BUILTIN.DF(t.status) AS status, cur.symbol AS currency, t.foreigntotal, t.foreignamountunpaid, t.subsidiary, t.memo FROM transaction t LEFT JOIN currency cur ON cur.id = t.currency",baseWhere:["t.type = 'CustInvc'"],orderBy:"t.id",filters:[...wb,kd("t"),{input:"openOnly",kind:"flag",clause:"t.status = 'A'",schema:{type:"boolean",description:"Only return open (unpaid) invoices."}}],mapRow:"(row) => ({ id: row.id, tranId: str(row.tranid), customerId: str(row.entity), customer: str(row.customername), date: str(row.trandate), dueDate: str(row.duedate), status: status(row.status), currency: str(row.currency), total: num(row.foreigntotal), amountDue: num(row.foreignamountunpaid), subsidiaryId: str(row.subsidiary), memo: str(row.memo) })"}),Is({id:"netsuite-list-vendor-bills",name:"List NetSuite vendor bills",shortName:"Vendor bills",instruction:"Lists vendor bills from NetSuite with vendor, dates, status, approval status, total and amount due. Useful for verifying migrated open AP at go-live.",stepId:"queryBills",collection:"bills",select:"SELECT t.id, t.tranid, t.entity, BUILTIN.DF(t.entity) AS vendorname, TO_CHAR(t.trandate, 'YYYY-MM-DD') AS trandate, TO_CHAR(t.duedate, 'YYYY-MM-DD') AS duedate, BUILTIN.DF(t.status) AS status, BUILTIN.DF(t.approvalstatus) AS approvalstatus, cur.symbol AS currency, t.foreigntotal, t.foreignamountunpaid, t.subsidiary, t.memo FROM transaction t LEFT JOIN currency cur ON cur.id = t.currency",baseWhere:["t.type = 'VendBill'"],orderBy:"t.id",filters:[...wb,kd("t"),{input:"openOnly",kind:"flag",clause:"t.status = 'A'",schema:{type:"boolean",description:"Only return open bills (approved and not fully paid)."}}],mapRow:"(row) => ({ id: row.id, referenceNo: str(row.tranid), vendorId: str(row.entity), vendor: str(row.vendorname), date: str(row.trandate), dueDate: str(row.duedate), status: status(row.status), approvalStatus: str(row.approvalstatus), currency: str(row.currency), total: row.foreigntotal === undefined ? null : Math.abs(Number(row.foreigntotal)), amountDue: num(row.foreignamountunpaid), subsidiaryId: str(row.subsidiary), memo: str(row.memo) })"}),Is({id:"netsuite-list-dimensions",name:"List NetSuite departments, classes or locations",shortName:"Departments, classes, locations",instruction:"Lists department, class or location records from NetSuite with hierarchy and subsidiaries. Useful for validating the dimension setup after an implementation and for finding the internal IDs the write tools need.",stepId:"queryDimensions",collection:"records",properties:{dimension:{type:"string",enum:["department","class","location"],description:"Which dimension to list."}},required:["dimension"],select:{js:String.raw`'SELECT d.id, d.name, d.fullname, d.parent, d.subsidiary, d.includechildren, d.isinactive FROM ' + (() => { const table = { department: 'department', class: 'classification', location: 'location' }[String(p.dimension || '')]; if (!table) throw new Error("dimension must be 'department', 'class' or 'location'."); return table; })() + ' d'`},orderBy:"d.id",filters:[Rd("d")],mapRow:"(row) => ({ id: row.id, name: str(row.name), fullName: str(row.fullname), parentId: str(row.parent), subsidiaryIds: ids(row.subsidiary), includeChildren: bool(row.includechildren), isInactive: bool(row.isinactive) })"}),Is({id:"netsuite-list-subsidiaries",name:"List NetSuite subsidiaries",shortName:"Subsidiaries",instruction:"Lists subsidiaries from NetSuite with hierarchy, country, base currency and elimination flag. Most create tools need a subsidiary ID from this list in OneWorld accounts.",stepId:"querySubsidiaries",collection:"subsidiaries",select:"SELECT s.id, s.name, s.fullname, s.parent, s.country, cur.symbol AS currency, s.iselimination, s.isinactive FROM subsidiary s LEFT JOIN currency cur ON cur.id = s.currency",orderBy:"s.id",filters:[Rd("s")],mapRow:"(row) => ({ id: row.id, name: str(row.name), fullName: str(row.fullname), parentId: str(row.parent), country: str(row.country), currency: str(row.currency), isElimination: bool(row.iselimination), isInactive: bool(row.isinactive) })"}),{id:"netsuite-suiteql-query",name:"Run a NetSuite SuiteQL query",shortName:"SuiteQL query",instruction:"Runs a read-only SuiteQL SELECT query against NetSuite, for any record type, join or aggregate outside the prebuilt lists (for example items, employees, transaction lines or custom records). The workhorse tool for migration validation. Returns up to 1000 rows in one call with the total row count and hasMore; values are strings as NetSuite returns them.",inputSchema:{type:"object",properties:{query:{type:"string",description:`SuiteQL SELECT statement, e.g. "SELECT id, itemid, displayname FROM item WHERE isinactive = 'F' ORDER BY id". Dates come back in the user's date format; use TO_CHAR(field, 'YYYY-MM-DD') for ISO dates and BUILTIN.DF(field) for display names. For more than 1000 rows, page by key: ORDER BY id and add WHERE id > <last id>. Common columns: account (id, acctnumber, accountsearchdisplaynamecopy as the name, fullname, accttype, isinactive; there is no acctname column), customer (id, entityid, companyname, email, subsidiary, balancesearch, isinactive), vendor (id, entityid, companyname, email, subsidiary, balance, isinactive), transaction (id, tranid, type, trandate, entity, status, foreigntotal, foreignamountunpaid, subsidiary). Alias tables and qualify columns: FROM transaction t ... t.subsidiary works, an unqualified subsidiary fails.`},maxResults:{type:"integer",minimum:1,maximum:1e3,description:"Maximum number of rows to return (max 1000). Defaults to 100."}},required:["query"],additionalProperties:!1},steps:[{id:"runSuiteQl",instruction:"Run the SuiteQL query.",config:{type:"request",systemId:Od,url:`${ug}/query/v1/suiteql`,method:"POST",headers:{...lg,"Content-Type":"application/json",Prefer:"transient"},queryParams:{limit:"<<(p) => Math.min(Math.max(Math.floor(Number(p.maxResults)) || 100, 2), 1000)>>",offset:"0"},body:String.raw`<<(p) => { const query = String(p.query || '').trim(); if (!/^(select|with)\b/i.test(query)) throw new Error('query must be a SuiteQL SELECT statement.'); return JSON.stringify({ q: query }); }>>`}}],outputTransform:`(sourceData) => { ${hx} const data = sourceData.runSuiteQl && sourceData.runSuiteQl.data ? sourceData.runSuiteQl.data : {}; const items = Array.isArray(data.items) ? data.items : []; const max = Math.min(Math.max(Math.floor(Number(sourceData.maxResults)) || 100, 1), 1000); const records = stripLinks(items.slice(0, max)); const total = data.totalResults !== undefined ? Number(data.totalResults) : items.length; return { total, returned: records.length, hasMore: total > records.length, records }; }`},{id:"netsuite-get-record",name:"Get a NetSuite record",shortName:"Get record",instruction:"Fetches one NetSuite record of any type by internal ID or external ID through the REST record API, including its sublists such as transaction lines. Useful for inspecting a record in full before or after a write.",inputSchema:{type:"object",properties:{recordType:{type:"string",description:'REST record type, e.g. "customer", "vendor", "invoice", "vendorbill", "journalentry", "account", "department" or a custom record like "customrecord_x".'},internalId:{type:"string",description:"Internal ID of the record."},externalId:{type:"string",description:"External ID of the record, used when internalId is not set."},expandSubResources:{type:"boolean",description:"Include sublists and subrecords inline. Defaults to true."}},required:["recordType"],additionalProperties:!1},steps:[{id:"getRecord",instruction:"Fetch the record from the REST record API.",config:{type:"request",systemId:Od,url:`${ug}/record/v1/<<(p) => { const type = String(p.recordType || '').trim().toLowerCase(); if (!/^[a-z][a-z0-9_]*$/.test(type)) throw new Error('recordType must contain only letters, numbers and underscores.'); return type; }>>/<<(p) => { if (p.internalId !== undefined && p.internalId !== null && p.internalId !== '') { const id = String(p.internalId).trim(); if (!/^-?\\d+$/.test(id)) throw new Error('internalId must be a NetSuite internal ID.'); return id; } if (p.externalId !== undefined && p.externalId !== null && p.externalId !== '') return 'eid:' + encodeURIComponent(String(p.externalId)); throw new Error('Provide internalId or externalId.'); }>>`,method:"GET",headers:lg,queryParams:{expandSubResources:"<<(p) => (p.expandSubResources === false || p.expandSubResources === 'false' ? 'false' : 'true')>>"}}}],outputTransform:`(sourceData) => { ${hx} const record = sourceData.getRecord ? sourceData.getRecord.data : undefined; if (!record || typeof record !== 'object') throw new Error('NetSuite returned no record.'); return { record: stripLinks(record) }; }`},Er({id:"netsuite-create-journal-entry",name:"Create NetSuite journal entry",shortName:"Create journal entry",instruction:`Creates a journal entry in NetSuite through the REST record API. Debit and credit lines must balance. Returns the new internal ID. ${_a}`,stepId:"createJournalEntry",recordType:"journalentry",mode:"create",properties:{...Ex("create"),lines:{type:"array",description:"Journal lines. Debit and credit totals must balance.",items:yx}},required:["date","lines"],body:`${mx} if (!Array.isArray(p.lines) || p.lines.length < 2) throw new Error('lines must contain at least two journal lines.'); ${gx}`}),Er({id:"netsuite-update-journal-entry",name:"Update NetSuite journal entry",shortName:"Update journal entry",instruction:"Updates an existing NetSuite journal entry by internal ID. Only the provided fields change. When lines are provided they replace all existing lines and must balance. Entries in closed periods refuse updates.",stepId:"updateJournalEntry",recordType:"journalentry",mode:"update",properties:{...Ex("update"),lines:{type:"array",description:"Optional replacement lines. When set, they replace every existing line and must balance.",items:yx}},required:[],body:`${mx} if (Array.isArray(p.lines) && p.lines.length < 2) throw new Error('lines must contain at least two journal lines; omit lines to keep the current ones.'); ${gx}`,replaceSublist:{input:"lines",sublist:"line"}}),Er({id:"netsuite-create-vendor",name:"Create NetSuite vendor",shortName:"Create vendor",instruction:`Creates a vendor record in NetSuite. OneWorld accounts need a subsidiaryId. Omit entityId when auto-numbering assigns it. ${_a}`,stepId:"createVendor",recordType:"vendor",mode:"create",properties:ig("vendor"),required:[],body:`if (!has(p.companyName) && !((p.isPerson === true || p.isPerson === 'true') && has(p.lastName))) throw new Error('Provide companyName, or isPerson with lastName.'); ${ng}`}),Er({id:"netsuite-update-vendor",name:"Update NetSuite vendor",shortName:"Update vendor",instruction:"Updates an existing NetSuite vendor by internal ID. Only the provided fields change; set isInactive to inactivate or reactivate it.",stepId:"updateVendor",recordType:"vendor",mode:"update",properties:{...ig("vendor"),...og},required:[],body:ng}),Er({id:"netsuite-create-customer",name:"Create NetSuite customer",shortName:"Create customer",instruction:`Creates a customer record in NetSuite. OneWorld accounts need a subsidiaryId. Omit entityId when auto-numbering assigns it. ${_a}`,stepId:"createCustomer",recordType:"customer",mode:"create",properties:ig("customer"),required:[],body:`if (!has(p.companyName) && !((p.isPerson === true || p.isPerson === 'true') && has(p.lastName))) throw new Error('Provide companyName, or isPerson with lastName.'); ${ng}`}),Er({id:"netsuite-update-customer",name:"Update NetSuite customer",shortName:"Update customer",instruction:"Updates an existing NetSuite customer by internal ID. Only the provided fields change; set isInactive to inactivate or reactivate it.",stepId:"updateCustomer",recordType:"customer",mode:"update",properties:{...ig("customer"),...og},required:[],body:ng}),Er({id:"netsuite-create-account",name:"Create NetSuite GL account",shortName:"Create GL account",instruction:`Creates a general ledger account in NetSuite's chart of accounts. ${_a}`,stepId:"createAccount",recordType:"account",mode:"create",properties:Cx,required:["acctName","acctType"],body:`if (!has(p.acctName) || !has(p.acctType)) throw new Error('acctName and acctType are required.'); ${Ix} ${sg}`}),Er({id:"netsuite-update-account",name:"Update NetSuite GL account",shortName:"Update GL account",instruction:"Updates an existing NetSuite GL account by internal ID. Only the provided fields change; set isInactive to inactivate or reactivate it. Accounts with transactions may refuse a type change.",stepId:"updateAccount",recordType:"account",mode:"update",properties:{...Cx,...og},required:[],body:`${Ix} ${sg}`}),Er({id:"netsuite-create-invoice",name:"Create NetSuite invoice",shortName:"Create invoice",instruction:`Creates a customer invoice in NetSuite with item lines. Item, tax and posting rules of the account apply. ${_a}`,stepId:"createInvoice",recordType:"invoice",mode:"create",properties:{customerId:{type:"string",description:"Customer internal ID."},...cg("create"),lines:{type:"array",description:"Item lines.",items:Bx}},required:["customerId","lines"],body:`if (!Array.isArray(p.lines) || p.lines.length === 0) throw new Error('lines must contain at least one item line.'); ${ag("customerId")} ${wx}`}),Er({id:"netsuite-update-invoice",name:"Update NetSuite invoice",shortName:"Update invoice",instruction:"Updates an existing NetSuite invoice by internal ID. Only the provided fields change. When lines are provided they replace all existing item lines. Paid invoices and closed periods may refuse updates.",stepId:"updateInvoice",recordType:"invoice",mode:"update",properties:{customerId:{type:"string",description:"Optional new customer internal ID."},...cg("update"),lines:{type:"array",description:"Optional replacement item lines; they replace every existing item line.",items:Bx}},required:[],body:`if (Array.isArray(p.lines) && p.lines.length === 0) throw new Error('lines must contain at least one item line; omit lines to keep the current ones.'); ${ag("customerId")} ${wx}`,replaceSublist:{input:"lines",sublist:"item"}}),Er({id:"netsuite-create-vendor-bill",name:"Create NetSuite vendor bill",shortName:"Create vendor bill",instruction:`Creates a vendor bill in NetSuite with expense lines. Approval routing of the account applies. ${_a}`,stepId:"createVendorBill",recordType:"vendorbill",mode:"create",properties:{vendorId:{type:"string",description:"Vendor internal ID."},referenceNo:{type:"string",description:"Optional vendor invoice reference number."},...cg("create"),lines:{type:"array",description:"Expense lines.",items:vx}},required:["vendorId","lines"],body:`if (!Array.isArray(p.lines) || p.lines.length === 0) throw new Error('lines must contain at least one expense line.'); ${ag("vendorId")} if (has(p.referenceNo)) record.tranId = String(p.referenceNo); ${Qx}`}),Er({id:"netsuite-update-vendor-bill",name:"Update NetSuite vendor bill",shortName:"Update vendor bill",instruction:"Updates an existing NetSuite vendor bill by internal ID. Only the provided fields change. When lines are provided they replace all existing expense lines. Paid bills and closed periods may refuse updates.",stepId:"updateVendorBill",recordType:"vendorbill",mode:"update",properties:{vendorId:{type:"string",description:"Optional new vendor internal ID."},referenceNo:{type:"string",description:"Optional vendor invoice reference number."},...cg("update"),lines:{type:"array",description:"Optional replacement expense lines; they replace every existing expense line.",items:vx}},required:[],body:`if (Array.isArray(p.lines) && p.lines.length === 0) throw new Error('lines must contain at least one expense line; omit lines to keep the current ones.'); ${ag("vendorId")} if (has(p.referenceNo)) record.tranId = String(p.referenceNo); ${Qx}`,replaceSublist:{input:"lines",sublist:"expense"}}),Er({id:"netsuite-create-department",name:"Create NetSuite department",shortName:"Create department",instruction:`Creates a department in NetSuite. Without subsidiaryIds NetSuite assigns the parent subsidiary. ${_a}`,stepId:"createDepartment",recordType:"department",mode:"create",properties:Sx,required:["name"],body:`if (!has(p.name)) throw new Error('name is required.'); ${bx} ${sg}`}),Er({id:"netsuite-update-department",name:"Update NetSuite department",shortName:"Update department",instruction:"Updates an existing NetSuite department by internal ID. Only the provided fields change; set isInactive to inactivate or reactivate it.",stepId:"updateDepartment",recordType:"department",mode:"update",properties:{...Sx,...og},required:[],body:`${bx} ${sg}`})],Bb={sap_s4hana:{bundleId:"sap_s4hana",templateId:"sap_s4hana",systemId:"sap_s4hana",displayName:"SAP S/4HANA",description:"Read business partners, sales orders, products and purchase orders from SAP.",systemUrl:ape,credentialHint:"Works instantly with SAP's demo data. Add your own key later for your live system.",requiredCredentialKeys:["api_key"],demoCredentials:{api_key:"K8reTgiKCCaqvAPWC4cOjqqiLdLE8dqz"},mcpServer:{name:"sap",displayName:"SAP S/4HANA",description:"Business partners, sales orders, products and purchase orders from SAP."},installMcpServer:!0,agentLaunch:{userPrompt:"I just installed the SAP S/4HANA bundle. What can I do with it?",nextSteps:"Your first reply must be short: SAP is connected to free demo data and works right now, so offer to run one tool immediately as proof. No credential collection is needed to start. If they want their own data: their own free key comes from https://api.sap.com (SAP Business Accelerator Hub), collected with set_credentials, never as chat text and never via the Credentials page; the system URL can then be switched to their own SAP host. Do not list the installed tools, do not add tips or explain SAP concepts unless asked."},tools:[{id:"sap-list-business-partners",name:"List SAP business partners",shortName:"Business partners",instruction:"Lists business partners (customers, suppliers, contacts) from SAP S/4HANA. Supports an optional OData $filter.",inputSchema:{type:"object",properties:{filter:{type:"string",description:`Optional OData $filter expression, e.g. "BusinessPartnerCategory eq '2'" for organizations.`},maxResults:{type:"integer",description:"Maximum number of business partners to return. Defaults to 200."}},additionalProperties:!0},steps:[{id:"fetchBusinessPartners",instruction:"Fetch business partners, paging through results with $skip.",config:{type:"request",systemId:"sap_s4hana",url:"<<sap_s4hana_url>>/API_BUSINESS_PARTNER/A_BusinessPartner",method:"GET",headers:{APIKey:"<<sap_s4hana_api_key>>",Accept:"application/json"},queryParams:{$format:"json",$top:"<<pageSize>>",$skip:"<<offset>>",$filter:"<<filter>>",$select:"BusinessPartner,BusinessPartnerFullName,BusinessPartnerCategory,BusinessPartnerGrouping,CreationDate"},pagination:{type:"offsetBased",pageSize:"100",stopCondition:"(response, pageInfo, sourceData) => { const rows = response?.data?.d?.results ?? []; const fetched = pageInfo?.mergedResult?.d?.results?.length ?? 0; const max = sourceData?.maxResults ?? 200; return rows.length === 0 || fetched >= max; }"}}}],outputTransform:"(sourceData) => { const d = (v) => { if (typeof v !== 'string' || !v.startsWith('/Date(')) return v; const n = parseInt(v.slice(6), 10); return Number.isFinite(n) ? new Date(n).toISOString().slice(0, 10) : v; }; const rows = (sourceData.fetchBusinessPartners?.data?.d?.results ?? []).slice(0, sourceData.maxResults ?? 200); return { total: rows.length, businessPartners: rows.map((r) => ({ id: r.BusinessPartner, name: r.BusinessPartnerFullName, category: r.BusinessPartnerCategory, grouping: r.BusinessPartnerGrouping, createdOn: d(r.CreationDate) })) }; }"},{id:"sap-list-sales-orders",name:"List SAP sales orders",shortName:"Sales orders",instruction:"Lists sales orders from SAP S/4HANA with their net amount, currency and sold-to party. Supports an optional OData $filter.",inputSchema:{type:"object",properties:{filter:{type:"string",description:`Optional OData $filter expression, e.g. "SalesOrderType eq 'OR'" or "TotalNetAmount gt 1000".`},maxResults:{type:"integer",description:"Maximum number of sales orders to return. Defaults to 200."}},additionalProperties:!0},steps:[{id:"fetchSalesOrders",instruction:"Fetch sales orders, paging through results with $skip.",config:{type:"request",systemId:"sap_s4hana",url:"<<sap_s4hana_url>>/API_SALES_ORDER_SRV/A_SalesOrder",method:"GET",headers:{APIKey:"<<sap_s4hana_api_key>>",Accept:"application/json"},queryParams:{$format:"json",$top:"<<pageSize>>",$skip:"<<offset>>",$filter:"<<filter>>",$select:"SalesOrder,SalesOrderType,SoldToParty,TotalNetAmount,TransactionCurrency,SalesOrderDate,OverallSDProcessStatus"},pagination:{type:"offsetBased",pageSize:"100",stopCondition:"(response, pageInfo, sourceData) => { const rows = response?.data?.d?.results ?? []; const fetched = pageInfo?.mergedResult?.d?.results?.length ?? 0; const max = sourceData?.maxResults ?? 200; return rows.length === 0 || fetched >= max; }"}}}],outputTransform:"(sourceData) => { const d = (v) => { if (typeof v !== 'string' || !v.startsWith('/Date(')) return v; const n = parseInt(v.slice(6), 10); return Number.isFinite(n) ? new Date(n).toISOString().slice(0, 10) : v; }; const rows = (sourceData.fetchSalesOrders?.data?.d?.results ?? []).slice(0, sourceData.maxResults ?? 200); return { total: rows.length, salesOrders: rows.map((r) => ({ id: r.SalesOrder, type: r.SalesOrderType, soldToParty: r.SoldToParty, netAmount: Number(r.TotalNetAmount), currency: r.TransactionCurrency, orderDate: d(r.SalesOrderDate), status: r.OverallSDProcessStatus })) }; }"},{id:"sap-list-products",name:"List SAP products",shortName:"Products",instruction:"Lists products (materials) from SAP S/4HANA with their type, group and base unit. Supports an optional OData $filter.",inputSchema:{type:"object",properties:{filter:{type:"string",description:`Optional OData $filter expression, e.g. "ProductType eq 'FERT'" for finished goods.`},maxResults:{type:"integer",description:"Maximum number of products to return. Defaults to 200."}},additionalProperties:!0},steps:[{id:"fetchProducts",instruction:"Fetch products, paging through results with $skip.",config:{type:"request",systemId:"sap_s4hana",url:"<<sap_s4hana_url>>/API_PRODUCT_SRV/A_Product",method:"GET",headers:{APIKey:"<<sap_s4hana_api_key>>",Accept:"application/json"},queryParams:{$format:"json",$top:"<<pageSize>>",$skip:"<<offset>>",$filter:"<<filter>>",$expand:"to_Description",$select:"Product,ProductType,ProductGroup,BaseUnit,GrossWeight,WeightUnit,CreationDate,to_Description/Language,to_Description/ProductDescription"},pagination:{type:"offsetBased",pageSize:"100",stopCondition:"(response, pageInfo, sourceData) => { const rows = response?.data?.d?.results ?? []; const fetched = pageInfo?.mergedResult?.d?.results?.length ?? 0; const max = sourceData?.maxResults ?? 200; return rows.length === 0 || fetched >= max; }"}}}],outputTransform:"(sourceData) => { const d = (v) => { if (typeof v !== 'string' || !v.startsWith('/Date(')) return v; const n = parseInt(v.slice(6), 10); return Number.isFinite(n) ? new Date(n).toISOString().slice(0, 10) : v; }; const nameOf = (r) => { const list = r.to_Description?.results ?? []; const hit = list.find((x) => x.Language === 'EN') ?? list[0]; return hit?.ProductDescription; }; const rows = (sourceData.fetchProducts?.data?.d?.results ?? []).slice(0, sourceData.maxResults ?? 200); return { total: rows.length, products: rows.map((r) => ({ id: r.Product, name: nameOf(r), type: r.ProductType, group: r.ProductGroup, baseUnit: r.BaseUnit, grossWeight: Number(r.GrossWeight), weightUnit: r.WeightUnit, createdOn: d(r.CreationDate) })) }; }"},{id:"sap-list-purchase-orders",name:"List SAP purchase orders",shortName:"Purchase orders",instruction:"Lists purchase orders from SAP S/4HANA with their supplier, currency and creation date. Supports an optional OData $filter.",inputSchema:{type:"object",properties:{filter:{type:"string",description:`Optional OData $filter expression, e.g. "PurchaseOrderType eq 'NB'" for standard orders.`},maxResults:{type:"integer",description:"Maximum number of purchase orders to return. Defaults to 200."}},additionalProperties:!0},steps:[{id:"fetchPurchaseOrders",instruction:"Fetch purchase orders, paging through results with $skip.",config:{type:"request",systemId:"sap_s4hana",url:"<<sap_s4hana_url>>/API_PURCHASEORDER_PROCESS_SRV/A_PurchaseOrder",method:"GET",headers:{APIKey:"<<sap_s4hana_api_key>>",Accept:"application/json"},queryParams:{$format:"json",$top:"<<pageSize>>",$skip:"<<offset>>",$filter:"<<filter>>",$select:"PurchaseOrder,PurchaseOrderType,Supplier,PurchaseOrderDate,DocumentCurrency,CreatedByUser"},pagination:{type:"offsetBased",pageSize:"100",stopCondition:"(response, pageInfo, sourceData) => { const rows = response?.data?.d?.results ?? []; const fetched = pageInfo?.mergedResult?.d?.results?.length ?? 0; const max = sourceData?.maxResults ?? 200; return rows.length === 0 || fetched >= max; }"}}}],outputTransform:"(sourceData) => { const d = (v) => { if (typeof v !== 'string' || !v.startsWith('/Date(')) return v; const n = parseInt(v.slice(6), 10); return Number.isFinite(n) ? new Date(n).toISOString().slice(0, 10) : v; }; const rows = (sourceData.fetchPurchaseOrders?.data?.d?.results ?? []).slice(0, sourceData.maxResults ?? 200); return { total: rows.length, purchaseOrders: rows.map((r) => ({ id: r.PurchaseOrder, type: r.PurchaseOrderType, supplier: r.Supplier, orderDate: d(r.PurchaseOrderDate), currency: r.DocumentCurrency, createdBy: r.CreatedByUser })) }; }"},{id:"sap-list-gl-accounts",name:"List SAP chart of accounts",shortName:"Chart of accounts",instruction:"Lists general ledger accounts (the chart of accounts) from SAP S/4HANA. Supports an optional OData $filter, e.g. by ChartOfAccounts.",inputSchema:{type:"object",properties:{filter:{type:"string",description:`Optional OData $filter expression, e.g. "ChartOfAccounts eq 'YCOA'" or "GLAccountType eq 'X'".`},maxResults:{type:"integer",description:"Maximum number of accounts to return. Defaults to 200."}},additionalProperties:!0},steps:[{id:"fetchGLAccounts",instruction:"Fetch GL accounts, paging through results with $skip.",config:{type:"request",systemId:"sap_s4hana",url:"<<sap_s4hana_url>>/API_GLACCOUNTINCHARTOFACCOUNTS_SRV/A_GLAccountInChartOfAccounts",method:"GET",headers:{APIKey:"<<sap_s4hana_api_key>>",Accept:"application/json"},queryParams:{$format:"json",$top:"<<pageSize>>",$skip:"<<offset>>",$filter:`<<(p) => p.filter ? "ChartOfAccounts ne '' and (" + p.filter + ")" : "ChartOfAccounts ne ''">>`,$expand:"to_Text",$select:"GLAccount,ChartOfAccounts,GLAccountType,GLAccountGroup,IsBalanceSheetAccount,AccountIsBlockedForPosting,to_Text/Language,to_Text/GLAccountName"},pagination:{type:"offsetBased",pageSize:"100",stopCondition:"(response, pageInfo, sourceData) => { const rows = response?.data?.d?.results ?? []; const fetched = pageInfo?.mergedResult?.d?.results?.length ?? 0; const max = sourceData?.maxResults ?? 200; return rows.length === 0 || fetched >= max; }"}}}],outputTransform:"(sourceData) => { const nameOf = (r) => { const list = r.to_Text?.results ?? []; const hit = list.find((x) => x.Language === 'EN') ?? list[0]; return hit?.GLAccountName; }; const rows = (sourceData.fetchGLAccounts?.data?.d?.results ?? []).slice(0, sourceData.maxResults ?? 200); return { total: rows.length, accounts: rows.map((r) => ({ account: r.GLAccount, name: nameOf(r), chartOfAccounts: r.ChartOfAccounts, type: r.GLAccountType, group: r.GLAccountGroup, isBalanceSheet: r.IsBalanceSheetAccount, blockedForPosting: r.AccountIsBlockedForPosting })) }; }"},{id:"sap-list-billing-documents",name:"List SAP billing documents",shortName:"Billing documents",instruction:"Lists billing documents (invoices, credit memos) from SAP S/4HANA with amount, currency and sold-to party. Supports an optional OData $filter.",inputSchema:{type:"object",properties:{filter:{type:"string",description:`Optional OData $filter expression, e.g. "BillingDocumentType eq 'F2'" or "TotalNetAmount gt 1000".`},maxResults:{type:"integer",description:"Maximum number of billing documents to return. Defaults to 200."}},additionalProperties:!0},steps:[{id:"fetchBillingDocuments",instruction:"Fetch billing documents, paging through results with $skip.",config:{type:"request",systemId:"sap_s4hana",url:"<<sap_s4hana_url>>/API_BILLING_DOCUMENT_SRV/A_BillingDocument",method:"GET",headers:{APIKey:"<<sap_s4hana_api_key>>",Accept:"application/json"},queryParams:{$format:"json",$top:"<<pageSize>>",$skip:"<<offset>>",$filter:"<<filter>>",$select:"BillingDocument,BillingDocumentType,SoldToParty,TotalNetAmount,TransactionCurrency,BillingDocumentDate"},pagination:{type:"offsetBased",pageSize:"100",stopCondition:"(response, pageInfo, sourceData) => { const rows = response?.data?.d?.results ?? []; const fetched = pageInfo?.mergedResult?.d?.results?.length ?? 0; const max = sourceData?.maxResults ?? 200; return rows.length === 0 || fetched >= max; }"}}}],outputTransform:"(sourceData) => { const d = (v) => { if (typeof v !== 'string' || !v.startsWith('/Date(')) return v; const n = parseInt(v.slice(6), 10); return Number.isFinite(n) ? new Date(n).toISOString().slice(0, 10) : v; }; const rows = (sourceData.fetchBillingDocuments?.data?.d?.results ?? []).slice(0, sourceData.maxResults ?? 200); return { total: rows.length, billingDocuments: rows.map((r) => ({ id: r.BillingDocument, type: r.BillingDocumentType, soldToParty: r.SoldToParty, netAmount: Number(r.TotalNetAmount), currency: r.TransactionCurrency, date: d(r.BillingDocumentDate) })) }; }"},{id:"sap-list-journal-entry-items",name:"List SAP journal entry line items",shortName:"Journal entries",instruction:"Lists journal entry line items (accounting document items) from SAP S/4HANA with company code, GL account, amount and posting date. Filter by CompanyCode, FiscalYear or PostingDate to keep results focused. Useful for verifying opening balances at cutover.",inputSchema:{type:"object",properties:{filter:{type:"string",description:`Optional OData $filter expression, e.g. "CompanyCode eq '1010' and FiscalYear eq '2026'".`},maxResults:{type:"integer",description:"Maximum number of line items to return. Defaults to 200."}},additionalProperties:!0},steps:[{id:"fetchJournalItems",instruction:"Fetch accounting document line items, paging through results with $skip.",config:{type:"request",systemId:"sap_s4hana",url:"<<sap_s4hana_url>>/API_OPLACCTGDOCITEMCUBE_SRV/A_OperationalAcctgDocItemCube",method:"GET",headers:{APIKey:"<<sap_s4hana_api_key>>",Accept:"application/json"},queryParams:{$format:"json",$top:"<<pageSize>>",$skip:"<<offset>>",$filter:"<<filter>>",$select:"AccountingDocument,CompanyCode,FiscalYear,GLAccount,AmountInCompanyCodeCurrency,PostingDate"},pagination:{type:"offsetBased",pageSize:"100",stopCondition:"(response, pageInfo, sourceData) => { const rows = response?.data?.d?.results ?? []; const fetched = pageInfo?.mergedResult?.d?.results?.length ?? 0; const max = sourceData?.maxResults ?? 200; return rows.length === 0 || fetched >= max; }"}}}],outputTransform:"(sourceData) => { const d = (v) => { if (typeof v !== 'string' || !v.startsWith('/Date(')) return v; const n = parseInt(v.slice(6), 10); return Number.isFinite(n) ? new Date(n).toISOString().slice(0, 10) : v; }; const rows = (sourceData.fetchJournalItems?.data?.d?.results ?? []).slice(0, sourceData.maxResults ?? 200); return { total: rows.length, journalItems: rows.map((r) => ({ document: r.AccountingDocument, companyCode: r.CompanyCode, fiscalYear: r.FiscalYear, account: r.GLAccount, amount: Number(r.AmountInCompanyCodeCurrency), postingDate: d(r.PostingDate) })) }; }"},{id:"sap-query-odata",name:"Query any SAP OData service",shortName:"Query any service",instruction:"Queries any SAP S/4HANA OData service and entity set (for example API_PRODUCT_SRV/A_ProductDescription or API_SALES_ORDER_SRV/A_SalesOrderItem) with optional $select and $filter. The workhorse tool for data checks beyond the prebuilt lists.",inputSchema:{type:"object",properties:{servicePath:{type:"string",description:'Service and entity set in SERVICE/EntitySet form, e.g. "API_SALES_ORDER_SRV/A_SalesOrderItem".'},select:{type:"string",description:"Comma-separated OData $select field list. Omit for all fields."},filter:{type:"string",description:"Optional OData $filter expression."},maxResults:{type:"integer",description:"Maximum number of records to return. Defaults to 100."}},required:["servicePath"],additionalProperties:!0},steps:[{id:"queryService",instruction:"Query the requested OData service and entity set.",config:{type:"request",systemId:"sap_s4hana",url:"<<sap_s4hana_url>>/<<servicePath>>",method:"GET",headers:{APIKey:"<<sap_s4hana_api_key>>",Accept:"application/json"},queryParams:{$format:"json",$select:"<<select>>",$filter:"<<filter>>",$top:"<<pageSize>>",$skip:"<<offset>>"},pagination:{type:"offsetBased",pageSize:"100",stopCondition:"(response, pageInfo, sourceData) => { const rows = response?.data?.d?.results ?? []; const fetched = pageInfo?.mergedResult?.d?.results?.length ?? 0; const max = sourceData?.maxResults ?? 100; return rows.length === 0 || fetched >= max; }"}}}],outputTransform:"(sourceData) => { const rows = (sourceData.queryService?.data?.d?.results ?? []).slice(0, sourceData.maxResults ?? 100); return { total: rows.length, records: rows.map((r) => { const { __metadata, ...rest } = r; return rest; }) }; }"}]},sage100:{bundleId:"sage100",templateId:"sage100",systemId:"sage100",displayName:"Sage 100",description:"Connect on-premises Sage 100 through the superglue Secure Gateway, with a guided setup playbook and a connection test against the Business Object Interface.",systemUrl:"script://runner/vbs32",credentialHint:"Your assistant first helps you connect a Secure Gateway on your Sage 100 server, then collects your Sage company and user details.",requiredCredentialKeys:["sage_home","sage_company","sage_user","sage_password"],mcpServer:{name:"sage-100",displayName:"Sage 100",description:"Sage 100 Business Object Interface access through the Secure Gateway."},installMcpServer:!1,playbook:{id:"sage100-native-integration",name:"Sage 100 Native Integration (BOI)",whenToRun:"Use when connecting a Sage 100 installation to superglue, testing that connection, or building tools that read or write Sage 100 data through the Business Object Interface.",inputs:"A Sage 100 installation on a Windows machine the user can access; a superglue API key for the gateway; the Sage company code, a Sage user with module access, and the path to the MAS90\\Home directory; the business outcome once connected.",instructions:"First check /org/tunnels for a connected gateway with a runner target. If none is connected, call setup_gateway with os windows and enableScriptRunner true (no targets are needed); the user runs the install command in PowerShell opened with 'Run as administrator' on the machine where Sage 100 and Workstation Setup are installed (the gateway must run there, ProvideX.Script is a local 32-bit COM class). The command installs the gateway as a Windows service and the call completes when it connects; never ask for the command or its key in chat. The same setup is in Systems \u2192 Connect system \u2192 Private System \u2192 Set up a gateway. The script runner option is required: it opts the gateway into running Sage scripts (it is code execution on their machine, so it is off by default), and it is what registers the built-in runner target. Only if the user cannot use that page, fall back to the manual setup: download https://downloads.superglue.cloud/superglue-gateway-windows.exe, create a config.yaml next to it with a tunnel_id, the server_url ending in /ws/tunnels (wss://api.superglue.cloud/ws/tunnels for hosted superglue), an API key from the API Keys page, and the line enable_script_runner: true, then run the executable. If a tunnel is connected but has no runner target, the gateway was set up without the script runner or is an outdated build; have the user set up the gateway again with the option selected, or add the flag and restart. The service runs as the Windows system account: if Sage data is on a mapped drive or a network share that account cannot reach, the connection test fails with a path or access error. When the tunnel with the runner target appears, attach it to this Sage 100 system with tools.writeSystem from superglue/approved (tunnel with that tunnelId) and keep the URL script://runner/vbs32. Collect sage_home (full path to the MAS90\\Home directory, for example C:\\Sage\\Sage100\\MAS90\\Home, not the MAS90 directory itself), sage_company, sage_user and sage_password through the secure credential form, never as chat text. Then run the Test Sage 100 connection tool once and interpret the result: retVal 0 failures carry the Sage reason in sLastErrorMsg (wrong credentials, missing role access, wrong company code); COM error 0x80040154 means the gateway is not running on a machine with Sage 100 Workstation Setup; a no-license message means all Sage user seats are in use. For new capabilities, build tools whose steps use the script protocol with VBScript in the body: log on with SY_Session, set module context before touching data (nSetDate with YYYYMMDD dates, nSetModule, nLookupTask, nSetProgram), use _svc service objects for reads and _bus business objects for writes, and always release the session with nCleanup and DropObject so the license seat frees up. For reads, set each key segment with nSetKeyValue then nFind for a single record, or browse with nMoveFirst and nMoveNext, and read each field with nGetValue passing a variable that receives the value. To write a document that has lines, such as a sales order, get the header _bus object, set the header fields, get its oLines object, call nAddLine, set the line fields, then call nWrite on the header to commit the header and its lines together. A write fails with a lock error if the record is open in the Sage desktop or held by another session, so report the lock message instead of retrying. Each running script briefly consumes a Sage user seat. Ask for explicit approval before any script that writes to Sage, and warn that records open in the Sage desktop UI cause lock errors.",completionCriteria:"The gateway is connected, the installed Sage 100 system has the tunnel attached and credentials saved, and the connection test returned company data from Sage 100. Any additional requested capability works end to end, with writes explicitly approved before they ran."},agentLaunch:{userPrompt:"I just installed the Sage 100 integration. Help me connect my Sage 100 server.",nextSteps:'Your first reply must be short: one line confirming the Sage 100 integration and setup playbook are installed, then start the connection flow. Check /org/tunnels for a connected gateway with a runner target first. If none exists, call setup_gateway with os windows and enableScriptRunner true (no targets are needed), and tell the user to run the install command in PowerShell opened with "Run as administrator" on the Windows machine where Sage 100 is installed and Workstation Setup has run. The call completes when the gateway connects; never ask for the command or its key in chat. The script runner option is required: it opts the gateway into running scripts on their machine (off by default because it is code execution) and is what registers the runner target. If a tunnel is connected but has no runner target, the gateway was set up without the script runner or is an outdated build: have the user set up the gateway again with the option selected. When setup_gateway completes, check that the returned targets include runner, then attach that tunnel to this Sage 100 system with tools.writeSystem from superglue/approved, keeping the URL script://runner/vbs32. Use set_credentials to collect sage_home (full path to the MAS90\\Home directory, for example C:\\Sage\\Sage100\\MAS90\\Home, not MAS90 itself), sage_company (for example ABC for the demo company), sage_user and sage_password. Never send the user to the Credentials page and never accept secrets as chat text. Then run the Test Sage 100 connection tool once. If it fails, explain the specific cause in plain language before retrying. Mention that each test briefly uses one Sage user license seat. Do not list tools or add tips unless asked.'},tools:[{id:"sage100-test-connection",name:"Test Sage 100 connection",shortName:"Connection test",instruction:"Logs on to Sage 100 through the Secure Gateway, opens the configured company, and reads the first customer record to verify the Business Object Interface end to end. Briefly consumes one Sage user license seat.",steps:[{id:"testConnection",instruction:"Run a VBScript through the gateway script runner that logs on via SY_Session, sets A/R module context, and reads the first customer.",config:{type:"request",systemId:"sage100",url:"<<sage100_url>>",method:"POST",body:["Option Explicit","On Error Resume Next","Dim oScript, oSS, oCust, retVal, custNo, custName, today",'Set oScript = CreateObject("ProvideX.Script")','FailOnErr "CREATE", " (Sage 100 Workstation Setup has not registered ProvideX.Script on this machine; the gateway must run on a prepared Sage 100 machine)"','oScript.Init "<<sage100_sage_home>>"','FailOnErr "INIT", " (sage_home must be the full path to the MAS90\\Home directory, not MAS90 itself)"','Set oSS = oScript.NewObject("SY_Session")','FailOnErr "SESSION", ""','retVal = oSS.nSetUser("<<sage100_sage_user>>", "<<sage100_sage_password>>")','FailOnErr "LOGON", ""',"If retVal = 0 Then",' WScript.Echo "LOGON FAILED: " & oSS.sLastErrorMsg'," WScript.Quit 1","End If",'retVal = oSS.nSetCompany("<<sage100_sage_company>>")','FailOnErr "COMPANY", ""',"If retVal = 0 Then",' WScript.Echo "COMPANY FAILED: " & oSS.sLastErrorMsg'," oSS.nCleanup"," oSS.DropObject"," WScript.Quit 1","End If",'today = Year(Date) & Right("0" & Month(Date), 2) & Right("0" & Day(Date), 2)','retVal = oSS.nSetDate("A/R", today)','FailOnErr "DATE", ""','retVal = oSS.nSetModule("A/R")','FailOnErr "MODULE", ""','retVal = oSS.nSetProgram(oSS.nLookupTask("AR_Customer_ui"))','FailOnErr "TASK", ""',"If retVal = 0 Then",' WScript.Echo "TASK FAILED: " & oSS.sLastErrorMsg'," oSS.nCleanup"," oSS.DropObject"," WScript.Quit 1","End If",'Set oCust = oScript.NewObject("AR_Customer_svc", oSS)','FailOnErr "CUSTOMER OBJECT", ""',"retVal = oCust.nMoveFirst()",'FailOnErr "READ", ""',"If retVal = 0 Then",' WScript.Echo "READ FAILED: " & oCust.sLastErrorMsg',"Else",' custNo = "" : custName = ""',' retVal = oCust.nGetValue("CustomerNo$", custNo)',' retVal = oCust.nGetValue("CustomerName$", custName)',' FailOnErr "READ VALUE", " (ByRef value marshalling failed)"',' WScript.Echo "CONNECTED - company <<sage100_sage_company>>, first customer: " & custNo & " / " & custName',"End If","oCust.DropObject","oSS.nCleanup","oSS.DropObject","If retVal = 0 Then WScript.Quit 1","","Sub FailOnErr(stage, hint)"," If Err.Number <> 0 Then",' WScript.Echo stage & " FAILED: [0x" & Hex(Err.Number) & "] " & Err.Description & hint'," WScript.Quit 1"," End If","End Sub"].join(`
80
80
  `)}}]}]},sage_intacct:{bundleId:"sage_intacct",templateId:"sage_intacct",systemId:"sage_intacct",displayName:"Sage Intacct",description:"Install a Sage Intacct system, eight read/query tools, fourteen write tools and a native integration playbook.",systemUrl:"https://api.intacct.com/ia/xml/xmlgw.phtml",credentialHint:"Works instantly with a Sage Intacct demo company. Enter your company ID and API user credentials to use your own company. Web Services sender credentials are preconfigured.",requiredCredentialKeys:["sender_id","sender_password","user_id","user_password","company_id"],demoCredentials:{company_id:"IndexCommerceMPP-DEV",user_id:"superglue",user_password:"Linux123___"},mcpServer:{name:"sage-intacct",displayName:"Sage Intacct",description:"Chart of accounts, customers, vendors, journal entries and ad-hoc object queries from Sage Intacct, plus create and update tools for GL accounts, journal entries, invoices, bills, departments, vendors and customers."},installMcpServer:!1,playbook:{id:"sage-intacct-native-integration",name:"Sage Intacct Native Integration",whenToRun:"Use when connecting, validating, querying or extending a Sage Intacct integration through XML Web Services.",inputs:"A configured Sage Intacct system; the object or business process to work with; optional Location/Entity ID for multi-entity companies; validation criteria and desired output.",instructions:"Use the installed read-only tools for chart of accounts, customers, vendors, journal entries, invoices, bills and departments. Use Query any Sage Intacct object for supported objects outside the named library. Use the installed create and update tools for GL accounts, journal entries, invoices, bills, departments, vendors and customers only after the user explicitly confirms the exact records to write; the create tools are not idempotent and re-running them duplicates records. Apply the configured Location/Entity ID when present. Verify every XML Web Services response at control, authentication and function-result level, and preserve Sage support IDs in failures. For other objects or operations, inspect Sage object documentation, create separate least-privilege tools, validate them in a development company and require explicit user confirmation before modifying Sage data.",completionCriteria:"The requested Sage data, write result or validation result is returned; entity scope is correct; Sage XML failures are surfaced as failures with support IDs; no Sage data is modified unless the user explicitly requested and confirmed the write."},agentLaunch:{userPrompt:"I just installed the Sage Intacct integration. What can I do with it?",nextSteps:"Your first reply must be short: one line confirming the Sage Intacct integration and native integration playbook are installed, then offer one read-only test run. If the user entered no company credentials during install, the system uses a shared Sage Intacct demo company and works right now. Other users share the demo company, so run create or update tools against it only when the user explicitly asks and confirms the exact records. For their own company, use set_credentials for this system to collect user_id, user_password and company_id, plus optional entity_id when the user wants to target one entity in a multi-entity company. The Web Services sender credentials are already configured. Never send the user to the Credentials page and never accept secrets as chat text. The user id and password are an API user login in the company; company id is the Intacct company id. Do not list the installed tools or add tips unless asked. The query tool accepts other supported Intacct object names, and additional read or write tools can be built beyond the default library. The installed create and update tools modify Sage data; run them only after the user confirms the exact records to write."},tools:[{id:"sage-intacct-list-accounts",name:"List Sage Intacct chart of accounts",shortName:"Chart of accounts",instruction:"Lists general ledger accounts (the chart of accounts) from Sage Intacct via the XML Web Services API. Useful for validating an imported chart of accounts after a migration.",inputSchema:{type:"object",properties:{maxResults:{type:"integer",description:"Maximum number of records to return. Defaults to 200."}},additionalProperties:!0},steps:[{id:"queryAccounts",instruction:"Query GLACCOUNT records via readByQuery-style paging.",config:{type:"request",systemId:"sage_intacct",url:"<<sage_intacct_url>>",method:"POST",headers:{"Content-Type":"application/xml",Accept:"application/xml"},body:ft("<query><object>GLACCOUNT</object><select><field>RECORDNO</field><field>ACCOUNTNO</field><field>TITLE</field><field>ACCOUNTTYPE</field><field>NORMALBALANCE</field><field>STATUS</field></select><pagesize><<pageSize>></pagesize><offset><<offset>></offset></query>"),pagination:{type:"offsetBased",pageSize:"100",stopCondition:"(response, pageInfo, sourceData) => { const dig = (o) => o && o.RESPONSE && o.RESPONSE.OPERATION && o.RESPONSE.OPERATION.RESULT ? o.RESPONSE.OPERATION.RESULT.DATA : undefined; const cur = dig(response && response.data); const cr = cur ? cur.GLACCOUNT : undefined; const rows = Array.isArray(cr) ? cr : (cr ? [cr] : []); const mr = dig(pageInfo && pageInfo.mergedResult); const mraw = mr ? mr.GLACCOUNT : undefined; const fetched = Array.isArray(mraw) ? mraw.length : (mraw ? 1 : 0); const max = (sourceData && sourceData.maxResults) ?? 200; return rows.length === 0 || fetched >= max; }"}}}],outputTransform:ys({stepId:"queryAccounts",objectNameExpression:"'GLACCOUNT'",collectionName:"accounts",mapExpression:"(record) => ({ recordNo: record.RECORDNO, account: record.ACCOUNTNO, name: record.TITLE, type: record.ACCOUNTTYPE, normalBalance: record.NORMALBALANCE, status: record.STATUS })"})},{id:"sage-intacct-list-customers",name:"List Sage Intacct customers",shortName:"Customers",instruction:"Lists customer master records from Sage Intacct accounts receivable. Useful for verifying migrated AR master data.",inputSchema:{type:"object",properties:{maxResults:{type:"integer",description:"Maximum number of records to return. Defaults to 200."}},additionalProperties:!0},steps:[{id:"queryCustomers",instruction:"Query CUSTOMER records.",config:{type:"request",systemId:"sage_intacct",url:"<<sage_intacct_url>>",method:"POST",headers:{"Content-Type":"application/xml",Accept:"application/xml"},body:ft("<query><object>CUSTOMER</object><select><field>RECORDNO</field><field>CUSTOMERID</field><field>NAME</field><field>STATUS</field><field>WHENCREATED</field></select><pagesize><<pageSize>></pagesize><offset><<offset>></offset></query>"),pagination:{type:"offsetBased",pageSize:"100",stopCondition:"(response, pageInfo, sourceData) => { const dig = (o) => o && o.RESPONSE && o.RESPONSE.OPERATION && o.RESPONSE.OPERATION.RESULT ? o.RESPONSE.OPERATION.RESULT.DATA : undefined; const cur = dig(response && response.data); const cr = cur ? cur.CUSTOMER : undefined; const rows = Array.isArray(cr) ? cr : (cr ? [cr] : []); const mr = dig(pageInfo && pageInfo.mergedResult); const mraw = mr ? mr.CUSTOMER : undefined; const fetched = Array.isArray(mraw) ? mraw.length : (mraw ? 1 : 0); const max = (sourceData && sourceData.maxResults) ?? 200; return rows.length === 0 || fetched >= max; }"}}}],outputTransform:ys({stepId:"queryCustomers",objectNameExpression:"'CUSTOMER'",collectionName:"customers",mapExpression:"(record) => ({ recordNo: record.RECORDNO, customerId: record.CUSTOMERID, name: record.NAME, status: record.STATUS, createdOn: record.WHENCREATED })"})},{id:"sage-intacct-list-vendors",name:"List Sage Intacct vendors",shortName:"Vendors",instruction:"Lists vendor master records from Sage Intacct accounts payable. Useful for verifying migrated AP master data.",inputSchema:{type:"object",properties:{maxResults:{type:"integer",description:"Maximum number of records to return. Defaults to 200."}},additionalProperties:!0},steps:[{id:"queryVendors",instruction:"Query VENDOR records.",config:{type:"request",systemId:"sage_intacct",url:"<<sage_intacct_url>>",method:"POST",headers:{"Content-Type":"application/xml",Accept:"application/xml"},body:ft("<query><object>VENDOR</object><select><field>RECORDNO</field><field>VENDORID</field><field>NAME</field><field>STATUS</field><field>WHENCREATED</field></select><pagesize><<pageSize>></pagesize><offset><<offset>></offset></query>"),pagination:{type:"offsetBased",pageSize:"100",stopCondition:"(response, pageInfo, sourceData) => { const dig = (o) => o && o.RESPONSE && o.RESPONSE.OPERATION && o.RESPONSE.OPERATION.RESULT ? o.RESPONSE.OPERATION.RESULT.DATA : undefined; const cur = dig(response && response.data); const cr = cur ? cur.VENDOR : undefined; const rows = Array.isArray(cr) ? cr : (cr ? [cr] : []); const mr = dig(pageInfo && pageInfo.mergedResult); const mraw = mr ? mr.VENDOR : undefined; const fetched = Array.isArray(mraw) ? mraw.length : (mraw ? 1 : 0); const max = (sourceData && sourceData.maxResults) ?? 200; return rows.length === 0 || fetched >= max; }"}}}],outputTransform:ys({stepId:"queryVendors",objectNameExpression:"'VENDOR'",collectionName:"vendors",mapExpression:"(record) => ({ recordNo: record.RECORDNO, vendorId: record.VENDORID, name: record.NAME, status: record.STATUS, createdOn: record.WHENCREATED })"})},{id:"sage-intacct-list-journal-entries",name:"List Sage Intacct journal entries",shortName:"Journal entries",instruction:"Lists general ledger entries from Sage Intacct with account, type and amount. Useful for verifying opening balances and postings at cutover.",inputSchema:{type:"object",properties:{maxResults:{type:"integer",description:"Maximum number of records to return. Defaults to 200."}},additionalProperties:!0},steps:[{id:"queryJournalEntries",instruction:"Query GLENTRY records.",config:{type:"request",systemId:"sage_intacct",url:"<<sage_intacct_url>>",method:"POST",headers:{"Content-Type":"application/xml",Accept:"application/xml"},body:ft("<query><object>GLENTRY</object><select><field>RECORDNO</field><field>BATCHNO</field><field>ACCOUNTNO</field><field>TR_TYPE</field><field>AMOUNT</field><field>ENTRY_DATE</field></select><pagesize><<pageSize>></pagesize><offset><<offset>></offset></query>"),pagination:{type:"offsetBased",pageSize:"100",stopCondition:"(response, pageInfo, sourceData) => { const dig = (o) => o && o.RESPONSE && o.RESPONSE.OPERATION && o.RESPONSE.OPERATION.RESULT ? o.RESPONSE.OPERATION.RESULT.DATA : undefined; const cur = dig(response && response.data); const cr = cur ? cur.GLENTRY : undefined; const rows = Array.isArray(cr) ? cr : (cr ? [cr] : []); const mr = dig(pageInfo && pageInfo.mergedResult); const mraw = mr ? mr.GLENTRY : undefined; const fetched = Array.isArray(mraw) ? mraw.length : (mraw ? 1 : 0); const max = (sourceData && sourceData.maxResults) ?? 200; return rows.length === 0 || fetched >= max; }"}}}],outputTransform:ys({stepId:"queryJournalEntries",objectNameExpression:"'GLENTRY'",collectionName:"journalEntries",mapExpression:"(record) => ({ recordNo: record.RECORDNO, batch: record.BATCHNO, account: record.ACCOUNTNO, type: record.TR_TYPE, amount: Number(record.AMOUNT), date: record.ENTRY_DATE })"})},{id:"sage-intacct-list-invoices",name:"List Sage Intacct invoices",shortName:"Invoices",instruction:"Lists accounts receivable invoices from Sage Intacct. Useful for verifying migrated open AR at go-live.",inputSchema:{type:"object",properties:{maxResults:{type:"integer",description:"Maximum number of records to return. Defaults to 200."}},additionalProperties:!0},steps:[{id:"queryInvoices",instruction:"Query ARINVOICE records.",config:{type:"request",systemId:"sage_intacct",url:"<<sage_intacct_url>>",method:"POST",headers:{"Content-Type":"application/xml",Accept:"application/xml"},body:ft("<query><object>ARINVOICE</object><select><field>RECORDNO</field><field>RECORDID</field><field>CUSTOMERID</field><field>TOTALDUE</field><field>WHENCREATED</field><field>STATE</field></select><pagesize><<pageSize>></pagesize><offset><<offset>></offset></query>"),pagination:{type:"offsetBased",pageSize:"100",stopCondition:"(response, pageInfo, sourceData) => { const dig = (o) => o && o.RESPONSE && o.RESPONSE.OPERATION && o.RESPONSE.OPERATION.RESULT ? o.RESPONSE.OPERATION.RESULT.DATA : undefined; const cur = dig(response && response.data); const cr = cur ? cur.ARINVOICE : undefined; const rows = Array.isArray(cr) ? cr : (cr ? [cr] : []); const mr = dig(pageInfo && pageInfo.mergedResult); const mraw = mr ? mr.ARINVOICE : undefined; const fetched = Array.isArray(mraw) ? mraw.length : (mraw ? 1 : 0); const max = (sourceData && sourceData.maxResults) ?? 200; return rows.length === 0 || fetched >= max; }"}}}],outputTransform:ys({stepId:"queryInvoices",objectNameExpression:"'ARINVOICE'",collectionName:"invoices",mapExpression:"(record) => ({ recordNo: record.RECORDNO, invoiceId: record.RECORDID, customerId: record.CUSTOMERID, totalDue: Number(record.TOTALDUE), createdOn: record.WHENCREATED, state: record.STATE })"})},{id:"sage-intacct-list-bills",name:"List Sage Intacct bills",shortName:"Bills",instruction:"Lists accounts payable bills from Sage Intacct. Useful for verifying migrated open AP at go-live.",inputSchema:{type:"object",properties:{maxResults:{type:"integer",description:"Maximum number of records to return. Defaults to 200."}},additionalProperties:!0},steps:[{id:"queryBills",instruction:"Query APBILL records.",config:{type:"request",systemId:"sage_intacct",url:"<<sage_intacct_url>>",method:"POST",headers:{"Content-Type":"application/xml",Accept:"application/xml"},body:ft("<query><object>APBILL</object><select><field>RECORDNO</field><field>RECORDID</field><field>VENDORID</field><field>TOTALDUE</field><field>WHENCREATED</field><field>STATE</field></select><pagesize><<pageSize>></pagesize><offset><<offset>></offset></query>"),pagination:{type:"offsetBased",pageSize:"100",stopCondition:"(response, pageInfo, sourceData) => { const dig = (o) => o && o.RESPONSE && o.RESPONSE.OPERATION && o.RESPONSE.OPERATION.RESULT ? o.RESPONSE.OPERATION.RESULT.DATA : undefined; const cur = dig(response && response.data); const cr = cur ? cur.APBILL : undefined; const rows = Array.isArray(cr) ? cr : (cr ? [cr] : []); const mr = dig(pageInfo && pageInfo.mergedResult); const mraw = mr ? mr.APBILL : undefined; const fetched = Array.isArray(mraw) ? mraw.length : (mraw ? 1 : 0); const max = (sourceData && sourceData.maxResults) ?? 200; return rows.length === 0 || fetched >= max; }"}}}],outputTransform:ys({stepId:"queryBills",objectNameExpression:"'APBILL'",collectionName:"bills",mapExpression:"(record) => ({ recordNo: record.RECORDNO, billId: record.RECORDID, vendorId: record.VENDORID, totalDue: Number(record.TOTALDUE), createdOn: record.WHENCREATED, state: record.STATE })"})},{id:"sage-intacct-list-departments",name:"List Sage Intacct departments",shortName:"Departments",instruction:"Lists department dimensions from Sage Intacct. Useful for validating the dimension setup after an implementation.",inputSchema:{type:"object",properties:{maxResults:{type:"integer",description:"Maximum number of records to return. Defaults to 200."}},additionalProperties:!0},steps:[{id:"queryDepartments",instruction:"Query DEPARTMENT records.",config:{type:"request",systemId:"sage_intacct",url:"<<sage_intacct_url>>",method:"POST",headers:{"Content-Type":"application/xml",Accept:"application/xml"},body:ft("<query><object>DEPARTMENT</object><select><field>RECORDNO</field><field>DEPARTMENTID</field><field>TITLE</field><field>STATUS</field></select><pagesize><<pageSize>></pagesize><offset><<offset>></offset></query>"),pagination:{type:"offsetBased",pageSize:"100",stopCondition:"(response, pageInfo, sourceData) => { const dig = (o) => o && o.RESPONSE && o.RESPONSE.OPERATION && o.RESPONSE.OPERATION.RESULT ? o.RESPONSE.OPERATION.RESULT.DATA : undefined; const cur = dig(response && response.data); const cr = cur ? cur.DEPARTMENT : undefined; const rows = Array.isArray(cr) ? cr : (cr ? [cr] : []); const mr = dig(pageInfo && pageInfo.mergedResult); const mraw = mr ? mr.DEPARTMENT : undefined; const fetched = Array.isArray(mraw) ? mraw.length : (mraw ? 1 : 0); const max = (sourceData && sourceData.maxResults) ?? 200; return rows.length === 0 || fetched >= max; }"}}}],outputTransform:ys({stepId:"queryDepartments",objectNameExpression:"'DEPARTMENT'",collectionName:"departments",mapExpression:"(record) => ({ recordNo: record.RECORDNO, departmentId: record.DEPARTMENTID, name: record.TITLE, status: record.STATUS })"})},{id:"sage-intacct-query-object",name:"Query any Sage Intacct object",shortName:"Query any object",instruction:"Queries any Sage Intacct object by name (for example GLACCOUNT, PROJECT, GLENTRY, ARINVOICE) using the XML Web Services readByQuery, with an optional Intacct query filter. The workhorse tool for migration validation beyond the prebuilt lists. Returns up to 1000 records in one call.",inputSchema:{type:"object",properties:{object:{type:"string",description:'Intacct object name, e.g. "GLACCOUNT", "PROJECT", "GLENTRY", "ARINVOICE".'},query:{type:"string",description:`Optional Intacct query filter, e.g. "STATUS = 'active'". Leave empty to return all records.`},maxResults:{type:"integer",description:"Maximum number of records to return (max 1000). Defaults to 100."}},required:["object"],additionalProperties:!0},steps:[{id:"queryObject",instruction:"Run readByQuery for the requested object.",config:{type:"request",systemId:"sage_intacct",url:"<<sage_intacct_url>>",method:"POST",headers:{"Content-Type":"application/xml",Accept:"application/xml"},body:ft("<readByQuery><object><<(p) => { const value = String(p.object || '').toUpperCase(); if (!/^[A-Z][A-Z0-9_]*$/.test(value)) throw new Error('Sage Intacct object must contain only letters, numbers, and underscores.'); return value; }>></object><fields>*</fields><query><<(p) => String(p.query || '').replaceAll('&', '&amp;').replaceAll('<', '&lt;').replaceAll('>', '&gt;')>></query><pagesize><<(p) => Math.min(Math.max(Number(p.maxResults) || 100, 1), 1000)>></pagesize></readByQuery>")}}],outputTransform:ys({stepId:"queryObject",objectNameExpression:"(sourceData && sourceData.object ? String(sourceData.object) : '').toUpperCase()",collectionName:"records",includeTotalCount:!0})},{id:"sage-intacct-create-journal-entry",name:"Create Sage Intacct journal entry",shortName:"Create journal entry",instruction:"Creates a journal entry (GLBATCH with GLENTRY lines) in Sage Intacct via the XML Web Services API. Debits and credits must balance. Re-running this tool creates another journal entry; it is not idempotent.",inputSchema:{type:"object",properties:{journal:{type:"string",description:'Journal symbol, e.g. "GJ". Defaults to GJ.'},date:{type:"string",description:"Posting date as YYYY-MM-DD."},title:{type:"string",description:"Journal entry description."},lines:{type:"array",description:"Journal lines. Debit and credit totals must balance.",items:{type:"object",properties:{accountNo:{type:"string",description:"GL account number."},type:{type:"string",enum:["debit","credit"]},amount:{type:"number",description:"Positive amount."},department:{type:"string",description:"Optional department ID."},location:{type:"string",description:"Optional location ID."},memo:{type:"string",description:"Optional line description."}},required:["accountNo","type","amount"],additionalProperties:!0}}},required:["date","title","lines"],additionalProperties:!0},steps:[{id:"createJournalEntry",instruction:"Create the GLBATCH record.",modify:!0,config:{type:"request",systemId:"sage_intacct",url:"<<sage_intacct_url>>",method:"POST",headers:{"Content-Type":"application/xml",Accept:"application/xml"},body:ft(`<create><GLBATCH><JOURNAL><<(sourceData) => { ${Es} return esc(sourceData.journal || 'GJ'); }>></JOURNAL><BATCH_DATE><<(sourceData) => { ${Ax} return toIntacctDate(sourceData.date); }>></BATCH_DATE><BATCH_TITLE><<(sourceData) => { ${Es} return esc(sourceData.title); }>></BATCH_TITLE><ENTRIES><<(sourceData) => { ${Es} ${fx} ${px} const lines = Array.isArray(sourceData.lines) ? sourceData.lines : []; if (lines.length === 0) throw new Error('lines must contain at least one journal line.'); assertBalanced(lines); return lines.map(lineXml).join(''); }>></ENTRIES></GLBATCH></create>`)}}],outputTransform:ru({stepId:"createJournalEntry",objectName:"GLBATCH"})},{id:"sage-intacct-update-journal-entry",name:"Update Sage Intacct journal entry",shortName:"Update journal entry",instruction:"Updates an existing journal entry (GLBATCH) in Sage Intacct by record number. Posted or locked entries may refuse updates. When lines are provided they replace all existing lines of the entry.",inputSchema:{type:"object",properties:{recordNo:{type:"integer",description:"RECORDNO of the journal entry to update."},journal:{type:"string",description:"Optional new journal symbol."},date:{type:"string",description:"Optional new posting date as YYYY-MM-DD."},title:{type:"string",description:"Optional new description."},lines:{type:"array",description:"Optional replacement lines. When set, they replace every existing line and must balance.",items:{type:"object",properties:{accountNo:{type:"string",description:"GL account number."},type:{type:"string",enum:["debit","credit"]},amount:{type:"number",description:"Positive amount."},department:{type:"string",description:"Optional department ID."},location:{type:"string",description:"Optional location ID."},memo:{type:"string",description:"Optional line description."}},required:["accountNo","type","amount"],additionalProperties:!0}}},required:["recordNo"],additionalProperties:!0},steps:[{id:"updateJournalEntry",instruction:"Update the GLBATCH record.",modify:!0,config:{type:"request",systemId:"sage_intacct",url:"<<sage_intacct_url>>",method:"POST",headers:{"Content-Type":"application/xml",Accept:"application/xml"},body:ft(`<update><GLBATCH><RECORDNO><<(sourceData) => { const recordNo = Number(sourceData.recordNo); if (!Number.isInteger(recordNo) || recordNo <= 0) throw new Error('recordNo must be a positive integer.'); return recordNo; }>></RECORDNO><<(sourceData) => { ${Es} ${Ax} ${fx} ${px} let xml = ''; if (sourceData.journal) xml += '<JOURNAL>' + esc(sourceData.journal) + '</JOURNAL>'; if (sourceData.date) xml += '<BATCH_DATE>' + toIntacctDate(sourceData.date) + '</BATCH_DATE>'; if (sourceData.title) xml += '<BATCH_TITLE>' + esc(sourceData.title) + '</BATCH_TITLE>'; if (Array.isArray(sourceData.lines) && sourceData.lines.length > 0) { assertBalanced(sourceData.lines); xml += '<ENTRIES>' + sourceData.lines.map(lineXml).join('') + '</ENTRIES>'; } if (!xml) throw new Error('Provide at least one field to update.'); return xml; }>></GLBATCH></update>`)}}],outputTransform:ru({stepId:"updateJournalEntry",objectName:"GLBATCH"})},{id:"sage-intacct-create-vendor",name:"Create Sage Intacct vendor",shortName:"Create vendor",instruction:"Creates a vendor master record in Sage Intacct via the XML Web Services API. Omit vendorId when the company uses vendor auto-numbering. Re-running this tool creates another vendor; it is not idempotent.",inputSchema:{type:"object",properties:{vendorId:{type:"string",description:"Vendor ID. Omit when auto-numbering assigns it."},name:{type:"string",description:"Vendor name."},taxId:{type:"string",description:"Optional tax ID."}},required:["name"],additionalProperties:!0},steps:[{id:"createVendor",instruction:"Create the VENDOR record.",modify:!0,config:{type:"request",systemId:"sage_intacct",url:"<<sage_intacct_url>>",method:"POST",headers:{"Content-Type":"application/xml",Accept:"application/xml"},body:ft(`<create><VENDOR><<(sourceData) => { ${Es} if (!sourceData.name) throw new Error('name is required.'); let xml = ''; if (sourceData.vendorId) xml += '<VENDORID>' + esc(sourceData.vendorId) + '</VENDORID>'; xml += '<NAME>' + esc(sourceData.name) + '</NAME>'; if (sourceData.taxId) xml += '<TAXID>' + esc(sourceData.taxId) + '</TAXID>'; return xml; }>></VENDOR></create>`)}}],outputTransform:ru({stepId:"createVendor",objectName:"VENDOR"})},{id:"sage-intacct-update-vendor",name:"Update Sage Intacct vendor",shortName:"Update vendor",instruction:"Updates an existing vendor master record in Sage Intacct by record number. Only the provided fields change.",inputSchema:{type:"object",properties:{recordNo:{type:"integer",description:"RECORDNO of the vendor to update."},name:{type:"string",description:"Optional new vendor name."},status:{type:"string",enum:["active","inactive"]},taxId:{type:"string",description:"Optional new tax ID."}},required:["recordNo"],additionalProperties:!0},steps:[{id:"updateVendor",instruction:"Update the VENDOR record.",modify:!0,config:{type:"request",systemId:"sage_intacct",url:"<<sage_intacct_url>>",method:"POST",headers:{"Content-Type":"application/xml",Accept:"application/xml"},body:ft(`<update><VENDOR><RECORDNO><<(sourceData) => { const recordNo = Number(sourceData.recordNo); if (!Number.isInteger(recordNo) || recordNo <= 0) throw new Error('recordNo must be a positive integer.'); return recordNo; }>></RECORDNO><<(sourceData) => { ${Es} let xml = ''; if (sourceData.name) xml += '<NAME>' + esc(sourceData.name) + '</NAME>'; if (sourceData.status) xml += '<STATUS>' + esc(sourceData.status) + '</STATUS>'; if (sourceData.taxId) xml += '<TAXID>' + esc(sourceData.taxId) + '</TAXID>'; if (!xml) throw new Error('Provide at least one field to update.'); return xml; }>></VENDOR></update>`)}}],outputTransform:ru({stepId:"updateVendor",objectName:"VENDOR"})},{id:"sage-intacct-create-customer",name:"Create Sage Intacct customer",shortName:"Create customer",instruction:"Creates a customer master record in Sage Intacct via the XML Web Services API. Omit customerId when the company uses customer auto-numbering. Re-running this tool creates another customer; it is not idempotent.",inputSchema:{type:"object",properties:{customerId:{type:"string",description:"Customer ID. Omit when auto-numbering assigns it."},name:{type:"string",description:"Customer name."},taxId:{type:"string",description:"Optional tax ID."}},required:["name"],additionalProperties:!0},steps:[{id:"createCustomer",instruction:"Create the CUSTOMER record.",modify:!0,config:{type:"request",systemId:"sage_intacct",url:"<<sage_intacct_url>>",method:"POST",headers:{"Content-Type":"application/xml",Accept:"application/xml"},body:ft(`<create><CUSTOMER><<(sourceData) => { ${Es} if (!sourceData.name) throw new Error('name is required.'); let xml = ''; if (sourceData.customerId) xml += '<CUSTOMERID>' + esc(sourceData.customerId) + '</CUSTOMERID>'; xml += '<NAME>' + esc(sourceData.name) + '</NAME>'; if (sourceData.taxId) xml += '<TAXID>' + esc(sourceData.taxId) + '</TAXID>'; return xml; }>></CUSTOMER></create>`)}}],outputTransform:ru({stepId:"createCustomer",objectName:"CUSTOMER"})},{id:"sage-intacct-update-customer",name:"Update Sage Intacct customer",shortName:"Update customer",instruction:"Updates an existing customer master record in Sage Intacct by record number. Only the provided fields change.",inputSchema:{type:"object",properties:{recordNo:{type:"integer",description:"RECORDNO of the customer to update."},name:{type:"string",description:"Optional new customer name."},status:{type:"string",enum:["active","inactive"]},taxId:{type:"string",description:"Optional new tax ID."}},required:["recordNo"],additionalProperties:!0},steps:[{id:"updateCustomer",instruction:"Update the CUSTOMER record.",modify:!0,config:{type:"request",systemId:"sage_intacct",url:"<<sage_intacct_url>>",method:"POST",headers:{"Content-Type":"application/xml",Accept:"application/xml"},body:ft(`<update><CUSTOMER><RECORDNO><<(sourceData) => { const recordNo = Number(sourceData.recordNo); if (!Number.isInteger(recordNo) || recordNo <= 0) throw new Error('recordNo must be a positive integer.'); return recordNo; }>></RECORDNO><<(sourceData) => { ${Es} let xml = ''; if (sourceData.name) xml += '<NAME>' + esc(sourceData.name) + '</NAME>'; if (sourceData.status) xml += '<STATUS>' + esc(sourceData.status) + '</STATUS>'; if (sourceData.taxId) xml += '<TAXID>' + esc(sourceData.taxId) + '</TAXID>'; if (!xml) throw new Error('Provide at least one field to update.'); return xml; }>></CUSTOMER></update>`)}}],outputTransform:ru({stepId:"updateCustomer",objectName:"CUSTOMER"})},{id:"sage-intacct-create-account",name:"Create Sage Intacct GL account",shortName:"Create GL account",instruction:"Creates a general ledger account in Sage Intacct via the XML Web Services API. Re-running this tool creates another account; it is not idempotent.",inputSchema:{type:"object",required:["accountNo","title","normalBalance","accountType"],properties:{title:{type:"string"},accountNo:{type:"string"},accountType:{type:"string",enum:["balancesheet","incomestatement"]},normalBalance:{type:"string",enum:["debit","credit"]},closingType:{type:"string",enum:["non-closing account","closing account"],description:"Period-end closing type. Defaults to non-closing account."},closingAccountNo:{type:"string",description:"Account to close into. Sage requires it when closingType is closing account."}}},steps:[{id:"createAccount",instruction:"Create the GLACCOUNT record via the Sage Intacct XML API.",modify:!0,config:{type:"request",systemId:"sage_intacct",url:"<<sage_intacct_url>>",method:"POST",headers:{"Content-Type":"application/xml",Accept:"application/xml"},body:ft(`<create><GLACCOUNT><<(sourceData) => { const esc = (value) => String(value).replaceAll('&', '&amp;').replaceAll('<', '&lt;').replaceAll('>', '&gt;').replaceAll('"', '&quot;').replaceAll("'", '&apos;'); if (!sourceData.accountNo) throw new Error('accountNo is required.'); if (!sourceData.title) throw new Error('title is required.'); let xml = '<ACCOUNTNO>' + esc(sourceData.accountNo) + '</ACCOUNTNO>'; xml += '<TITLE>' + esc(sourceData.title) + '</TITLE>'; xml += '<NORMALBALANCE>' + esc(sourceData.normalBalance || 'debit') + '</NORMALBALANCE>'; xml += '<ACCOUNTTYPE>' + esc(sourceData.accountType || 'balancesheet') + '</ACCOUNTTYPE>'; xml += '<CLOSINGTYPE>' + esc(sourceData.closingType || 'non-closing account') + '</CLOSINGTYPE>'; if (sourceData.closingAccountNo) xml += '<CLOSINGACCOUNTNO>' + esc(sourceData.closingAccountNo) + '</CLOSINGACCOUNTNO>'; return xml; }>></GLACCOUNT></create>`)}}],outputTransform:"(sourceData) => { const response = sourceData.createAccount && sourceData.createAccount.data ? sourceData.createAccount.data.RESPONSE : undefined; const control = response ? response.CONTROL : undefined; const operation = response ? response.OPERATION : undefined; const authentication = operation ? operation.AUTHENTICATION : undefined; const result = operation ? operation.RESULT : undefined; const statuses = [control && control.STATUS, authentication && authentication.STATUS, result && result.STATUS].filter(Boolean).map((value) => String(value).toLowerCase()); if (statuses.includes('failure')) { const message = (result && result.ERRORMESSAGE) || (authentication && authentication.ERR ? authentication.ERR.ERRORMESSAGE : undefined) || (control && control.ERR ? control.ERR.ERRORMESSAGE : undefined); const rawErrors = message ? message.ERROR : undefined; const errors = Array.isArray(rawErrors) ? rawErrors : (rawErrors ? [rawErrors] : []); const details = errors.map((error) => [error.ERRORNO, error.DESCRIPTION2 || error.DESCRIPTION, error.CORRECTION].filter(Boolean).join(' - ')).filter(Boolean); const supportIds = errors.map((error) => error.SUPPORTID).filter(Boolean); const suffix = supportIds.length ? ` Sage support ID: ${supportIds.join(', ')}.` : ''; throw new Error(`Sage Intacct request failed${details.length ? `: ${details.join('; ')}` : '.'}${suffix}`); } const data = result ? result.DATA : undefined; const raw = data ? (data.GLACCOUNT || data.glaccount) : undefined; const record = Array.isArray(raw) ? raw[0] : raw; return { recordNo: record && record.RECORDNO ? Number(record.RECORDNO) : undefined, record }; }"},{id:"sage-intacct-update-account",name:"Update Sage Intacct GL account",shortName:"Update GL account",instruction:"Updates an existing general ledger account in Sage Intacct by account number. Only the provided fields change.",inputSchema:{type:"object",required:["accountNo"],properties:{title:{type:"string"},accountNo:{type:"string"},accountType:{type:"string",enum:["balancesheet","incomestatement"]},normalBalance:{type:"string",enum:["debit","credit"]},status:{type:"string",enum:["active","inactive"]}}},steps:[{id:"updateAccount",instruction:"Update the GLACCOUNT record by account number.",modify:!0,config:{type:"request",systemId:"sage_intacct",url:"<<sage_intacct_url>>",method:"POST",headers:{"Content-Type":"application/xml",Accept:"application/xml"},body:ft(`<update><GLACCOUNT><ACCOUNTNO><<(sourceData) => { const esc = (value) => String(value).replaceAll('&', '&amp;').replaceAll('<', '&lt;').replaceAll('>', '&gt;').replaceAll('"', '&quot;').replaceAll("'", '&apos;'); if (!sourceData.accountNo) throw new Error('accountNo is required.'); return esc(sourceData.accountNo); }>></ACCOUNTNO><<(sourceData) => { const esc = (value) => String(value).replaceAll('&', '&amp;').replaceAll('<', '&lt;').replaceAll('>', '&gt;').replaceAll('"', '&quot;').replaceAll("'", '&apos;'); let xml = ''; if (sourceData.title) xml += '<TITLE>' + esc(sourceData.title) + '</TITLE>'; if (sourceData.normalBalance) xml += '<NORMALBALANCE>' + esc(sourceData.normalBalance) + '</NORMALBALANCE>'; if (sourceData.accountType) xml += '<ACCOUNTTYPE>' + esc(sourceData.accountType) + '</ACCOUNTTYPE>'; if (sourceData.status) xml += '<STATUS>' + esc(sourceData.status) + '</STATUS>'; if (!xml) throw new Error('Provide at least one field to update.'); return xml; }>></GLACCOUNT></update>`)}}],outputTransform:"(sourceData) => { const response = sourceData.updateAccount && sourceData.updateAccount.data ? sourceData.updateAccount.data.RESPONSE : undefined; const control = response ? response.CONTROL : undefined; const operation = response ? response.OPERATION : undefined; const authentication = operation ? operation.AUTHENTICATION : undefined; const result = operation ? operation.RESULT : undefined; const statuses = [control && control.STATUS, authentication && authentication.STATUS, result && result.STATUS].filter(Boolean).map((value) => String(value).toLowerCase()); if (statuses.includes('failure')) { const message = (result && result.ERRORMESSAGE) || (authentication && authentication.ERR ? authentication.ERR.ERRORMESSAGE : undefined) || (control && control.ERR ? control.ERR.ERRORMESSAGE : undefined); const rawErrors = message ? message.ERROR : undefined; const errors = Array.isArray(rawErrors) ? rawErrors : (rawErrors ? [rawErrors] : []); const details = errors.map((error) => [error.ERRORNO, error.DESCRIPTION2 || error.DESCRIPTION, error.CORRECTION].filter(Boolean).join(' - ')).filter(Boolean); const supportIds = errors.map((error) => error.SUPPORTID).filter(Boolean); const suffix = supportIds.length ? ` Sage support ID: ${supportIds.join(', ')}.` : ''; throw new Error(`Sage Intacct request failed${details.length ? `: ${details.join('; ')}` : '.'}${suffix}`); } const data = result ? result.DATA : undefined; const raw = data ? (data.GLACCOUNT || data.glaccount) : undefined; const record = Array.isArray(raw) ? raw[0] : raw; return { accountNo: sourceData.accountNo, record }; }"},{id:"sage-intacct-create-invoice",name:"Create Sage Intacct AR invoice",shortName:"Create invoice",instruction:"Creates an AR invoice in Sage Intacct via the XML Web Services API. Requires a customer ID, transaction date, and at least one line item with a GL account and amount. Re-running creates another invoice; it is not idempotent.",inputSchema:{type:"object",required:["customerId","dateCreated","dateDue","lines"],properties:{lines:{type:"array",items:{type:"object",required:["glAccountNo","amount"],properties:{memo:{type:"string"},amount:{type:"number"},glAccountNo:{type:"string"},departmentId:{type:"string"},locationId:{type:"string"},vendorId:{type:"string"},customerId:{type:"string"},projectId:{type:"string"}}}},dateDue:{type:"string"},customerId:{type:"string"},dateCreated:{type:"string"},datePosted:{type:"string"},termName:{type:"string"},description:{type:"string"}}},steps:[{id:"createInvoice",instruction:"Create the ARINVOICE record with line items.",modify:!0,config:{type:"request",systemId:"sage_intacct",url:"<<sage_intacct_url>>",method:"POST",headers:{"Content-Type":"application/xml",Accept:"application/xml"},body:ft("<create><ARINVOICE><<(sourceData) => { const esc = (value) => String(value).replaceAll('&', '&amp;').replaceAll('<', '&lt;').replaceAll('>', '&gt;').replaceAll('\"', '&quot;').replaceAll(\"'\", '&apos;'); if (!sourceData.customerId) throw new Error('customerId is required.'); if (!sourceData.dateCreated) throw new Error('dateCreated is required (YYYY-MM-DD).'); const lines = Array.isArray(sourceData.lines) ? sourceData.lines : []; if (lines.length === 0) throw new Error('lines must contain at least one invoice line.'); const match = String(sourceData.dateCreated).match(/^(\\d{4})-(\\d{2})-(\\d{2})/); const dateXml = match ? `<WHENCREATED><YEAR>${match[1]}</YEAR><MONTH>${match[2]}</MONTH><DAY>${match[3]}</DAY></WHENCREATED>` : `<WHENCREATED>${esc(sourceData.dateCreated)}</WHENCREATED>`; let xml = '<CUSTOMERID>' + esc(sourceData.customerId) + '</CUSTOMERID>'; xml += dateXml; if (sourceData.datePosted) { const mp = String(sourceData.datePosted).match(/^(\\d{4})-(\\d{2})-(\\d{2})/); if (mp) xml += `<WHENPOSTED><YEAR>${mp[1]}</YEAR><MONTH>${mp[2]}</MONTH><DAY>${mp[3]}</DAY></WHENPOSTED>`; } if (sourceData.dateDue) { const md = String(sourceData.dateDue).match(/^(\\d{4})-(\\d{2})-(\\d{2})/); if (md) xml += `<WHENDUE><YEAR>${md[1]}</YEAR><MONTH>${md[2]}</MONTH><DAY>${md[3]}</DAY></WHENDUE>`; } else if (sourceData.termName) { xml += '<TERMNAME>' + esc(sourceData.termName) + '</TERMNAME>'; } if (sourceData.description) xml += '<DESCRIPTION>' + esc(sourceData.description) + '</DESCRIPTION>'; xml += '<ARINVOICEITEMS>'; lines.forEach((line) => { if (!line.glAccountNo) throw new Error('Each line requires glAccountNo.'); if (line.amount == null) throw new Error('Each line requires amount.'); xml += '<ARINVOICEITEM>'; xml += '<ACCOUNTNO>' + esc(line.glAccountNo) + '</ACCOUNTNO>'; xml += '<AMOUNT>' + Number(line.amount) + '</AMOUNT>'; if (line.memo) xml += '<MEMO>' + esc(line.memo) + '</MEMO>'; if (line.departmentId) xml += '<DEPARTMENTID>' + esc(line.departmentId) + '</DEPARTMENTID>'; if (line.locationId) xml += '<LOCATIONID>' + esc(line.locationId) + '</LOCATIONID>'; if (line.vendorId) xml += '<VENDORID>' + esc(line.vendorId) + '</VENDORID>'; if (line.customerId) xml += '<CUSTOMERID>' + esc(line.customerId) + '</CUSTOMERID>'; if (line.projectId) xml += '<PROJECTID>' + esc(line.projectId) + '</PROJECTID>'; xml += '</ARINVOICEITEM>'; }); xml += '</ARINVOICEITEMS>'; return xml; }>></ARINVOICE></create>")}}],outputTransform:"(sourceData) => { const response = sourceData.createInvoice && sourceData.createInvoice.data ? sourceData.createInvoice.data.RESPONSE : undefined; const control = response ? response.CONTROL : undefined; const operation = response ? response.OPERATION : undefined; const authentication = operation ? operation.AUTHENTICATION : undefined; const result = operation ? operation.RESULT : undefined; const statuses = [control && control.STATUS, authentication && authentication.STATUS, result && result.STATUS].filter(Boolean).map((value) => String(value).toLowerCase()); if (statuses.includes('failure')) { const message = (result && result.ERRORMESSAGE) || (authentication && authentication.ERR ? authentication.ERR.ERRORMESSAGE : undefined) || (control && control.ERR ? control.ERR.ERRORMESSAGE : undefined); const rawErrors = message ? message.ERROR : undefined; const errors = Array.isArray(rawErrors) ? rawErrors : (rawErrors ? [rawErrors] : []); const details = errors.map((error) => [error.ERRORNO, error.DESCRIPTION2 || error.DESCRIPTION, error.CORRECTION].filter(Boolean).join(' - ')).filter(Boolean); const supportIds = errors.map((error) => error.SUPPORTID).filter(Boolean); const suffix = supportIds.length ? ` Sage support ID: ${supportIds.join(', ')}.` : ''; throw new Error(`Sage Intacct request failed${details.length ? `: ${details.join('; ')}` : '.'}${suffix}`); } const data = result ? result.DATA : undefined; const raw = data ? (data.ARINVOICE || data.arinvoice) : undefined; const record = Array.isArray(raw) ? raw[0] : raw; return { recordNo: record && record.RECORDNO ? Number(record.RECORDNO) : undefined, record }; }"},{id:"sage-intacct-update-invoice",name:"Update Sage Intacct AR invoice",shortName:"Update invoice",instruction:"Updates an existing AR invoice in Sage Intacct by record number. Only the provided fields change. Line items can be added or updated by line number.",inputSchema:{type:"object",required:["recordNo"],properties:{recordNo:{type:"integer"},description:{type:"string"},customerId:{type:"string"},dateCreated:{type:"string"},dateDue:{type:"string"},termName:{type:"string"},lines:{type:"array",items:{type:"object",properties:{lineNo:{type:"integer"},memo:{type:"string"},amount:{type:"number"},glAccountNo:{type:"string"},departmentId:{type:"string"},locationId:{type:"string"},vendorId:{type:"string"},customerId:{type:"string"},projectId:{type:"string"}}}}}},steps:[{id:"updateInvoice",instruction:"Update the ARINVOICE record by RECORDNO.",modify:!0,config:{type:"request",systemId:"sage_intacct",url:"<<sage_intacct_url>>",method:"POST",headers:{"Content-Type":"application/xml",Accept:"application/xml"},body:ft("<update><ARINVOICE><RECORDNO><<(sourceData) => { const recordNo = Number(sourceData.recordNo); if (!Number.isInteger(recordNo) || recordNo <= 0) throw new Error('recordNo must be a positive integer.'); return recordNo; }>></RECORDNO><<(sourceData) => { const esc = (value) => String(value).replaceAll('&', '&amp;').replaceAll('<', '&lt;').replaceAll('>', '&gt;').replaceAll('\"', '&quot;').replaceAll(\"'\", '&apos;'); let xml = ''; if (sourceData.customerId) xml += '<CUSTOMERID>' + esc(sourceData.customerId) + '</CUSTOMERID>'; if (sourceData.dateCreated) { const match = String(sourceData.dateCreated).match(/^(\\d{4})-(\\d{2})-(\\d{2})/); if (match) xml += `<WHENCREATED><YEAR>${match[1]}</YEAR><MONTH>${match[2]}</MONTH><DAY>${match[3]}</DAY></WHENCREATED>`; } if (sourceData.dateDue) { const md = String(sourceData.dateDue).match(/^(\\d{4})-(\\d{2})-(\\d{2})/); if (md) xml += `<WHENDUE><YEAR>${md[1]}</YEAR><MONTH>${md[2]}</MONTH><DAY>${md[3]}</DAY></WHENDUE>`; } if (sourceData.termName) xml += '<TERMNAME>' + esc(sourceData.termName) + '</TERMNAME>'; if (sourceData.description) xml += '<DESCRIPTION>' + esc(sourceData.description) + '</DESCRIPTION>'; const lines = Array.isArray(sourceData.lines) ? sourceData.lines : []; if (lines.length > 0) { xml += '<ARINVOICEITEMS>'; lines.forEach((line) => { xml += '<ARINVOICEITEM>'; if (line.lineNo) xml += '<LINE_NO>' + Number(line.lineNo) + '</LINE_NO>'; if (line.glAccountNo) xml += '<ACCOUNTNO>' + esc(line.glAccountNo) + '</ACCOUNTNO>'; if (line.amount != null) xml += '<AMOUNT>' + Number(line.amount) + '</AMOUNT>'; if (line.memo) xml += '<MEMO>' + esc(line.memo) + '</MEMO>'; if (line.departmentId) xml += '<DEPARTMENTID>' + esc(line.departmentId) + '</DEPARTMENTID>'; if (line.locationId) xml += '<LOCATIONID>' + esc(line.locationId) + '</LOCATIONID>'; if (line.vendorId) xml += '<VENDORID>' + esc(line.vendorId) + '</VENDORID>'; if (line.customerId) xml += '<CUSTOMERID>' + esc(line.customerId) + '</CUSTOMERID>'; if (line.projectId) xml += '<PROJECTID>' + esc(line.projectId) + '</PROJECTID>'; xml += '</ARINVOICEITEM>'; }); xml += '</ARINVOICEITEMS>'; } if (!xml && lines.length === 0) throw new Error('Provide at least one field to update.'); return xml; }>></ARINVOICE></update>")}}],outputTransform:"(sourceData) => { const response = sourceData.updateInvoice && sourceData.updateInvoice.data ? sourceData.updateInvoice.data.RESPONSE : undefined; const control = response ? response.CONTROL : undefined; const operation = response ? response.OPERATION : undefined; const authentication = operation ? operation.AUTHENTICATION : undefined; const result = operation ? operation.RESULT : undefined; const statuses = [control && control.STATUS, authentication && authentication.STATUS, result && result.STATUS].filter(Boolean).map((value) => String(value).toLowerCase()); if (statuses.includes('failure')) { const message = (result && result.ERRORMESSAGE) || (authentication && authentication.ERR ? authentication.ERR.ERRORMESSAGE : undefined) || (control && control.ERR ? control.ERR.ERRORMESSAGE : undefined); const rawErrors = message ? message.ERROR : undefined; const errors = Array.isArray(rawErrors) ? rawErrors : (rawErrors ? [rawErrors] : []); const details = errors.map((error) => [error.ERRORNO, error.DESCRIPTION2 || error.DESCRIPTION, error.CORRECTION].filter(Boolean).join(' - ')).filter(Boolean); const supportIds = errors.map((error) => error.SUPPORTID).filter(Boolean); const suffix = supportIds.length ? ` Sage support ID: ${supportIds.join(', ')}.` : ''; throw new Error(`Sage Intacct request failed${details.length ? `: ${details.join('; ')}` : '.'}${suffix}`); } const data = result ? result.DATA : undefined; const raw = data ? (data.ARINVOICE || data.arinvoice) : undefined; const record = Array.isArray(raw) ? raw[0] : raw; return { recordNo: sourceData.recordNo, record }; }"},{id:"sage-intacct-create-bill",name:"Create Sage Intacct AP bill",shortName:"Create bill",instruction:"Creates an AP bill in Sage Intacct via the XML Web Services API. Requires a vendor ID, transaction date, and at least one line item with a GL account and amount. Re-running creates another bill; it is not idempotent.",inputSchema:{type:"object",required:["lines","dateDue","vendorId","dateCreated"],properties:{lines:{type:"array",items:{type:"object",required:["glAccountNo","amount"],properties:{memo:{type:"string"},amount:{type:"number"},glAccountNo:{type:"string"},departmentId:{type:"string"},locationId:{type:"string"},vendorId:{type:"string"},customerId:{type:"string"},projectId:{type:"string"}}}},dateDue:{type:"string"},vendorId:{type:"string"},dateCreated:{type:"string"},datePosted:{type:"string"},termName:{type:"string"},description:{type:"string"}}},steps:[{id:"createBill",instruction:"Create the APBILL record with line items.",modify:!0,config:{type:"request",systemId:"sage_intacct",url:"<<sage_intacct_url>>",method:"POST",headers:{"Content-Type":"application/xml",Accept:"application/xml"},body:ft(`<create><APBILL><<(sourceData) => { const esc = (value) => String(value).replaceAll('&', '&amp;').replaceAll('<', '&lt;').replaceAll('>', '&gt;').replaceAll('"', '&quot;').replaceAll("'", '&apos;'); if (!sourceData.vendorId) throw new Error('vendorId is required.'); if (!sourceData.dateCreated) throw new Error('dateCreated is required (YYYY-MM-DD).'); const lines = Array.isArray(sourceData.lines) ? sourceData.lines : []; if (lines.length === 0) throw new Error('lines must contain at least one bill line.'); const match = String(sourceData.dateCreated).match(/^(\\d{4})-(\\d{2})-(\\d{2})/); const dateStr = match ? match[2] + '/' + match[3] + '/' + match[1] : sourceData.dateCreated; let xml = '<VENDORID>' + esc(sourceData.vendorId) + '</VENDORID>'; xml += '<WHENCREATED>' + esc(dateStr) + '</WHENCREATED>'; if (sourceData.datePosted) { const mp = String(sourceData.datePosted).match(/^(\\d{4})-(\\d{2})-(\\d{2})/); xml += '<WHENPOSTED>' + esc(mp ? mp[2] + '/' + mp[3] + '/' + mp[1] : sourceData.datePosted) + '</WHENPOSTED>'; } if (sourceData.dateDue) { const md = String(sourceData.dateDue).match(/^(\\d{4})-(\\d{2})-(\\d{2})/); xml += '<WHENDUE>' + esc(md ? md[2] + '/' + md[3] + '/' + md[1] : sourceData.dateDue) + '</WHENDUE>'; } else if (sourceData.termName) { xml += '<TERMNAME>' + esc(sourceData.termName) + '</TERMNAME>'; } if (sourceData.description) xml += '<DESCRIPTION>' + esc(sourceData.description) + '</DESCRIPTION>'; xml += '<APBILLITEMS>'; lines.forEach((line) => { if (!line.glAccountNo) throw new Error('Each line requires glAccountNo.'); if (line.amount == null) throw new Error('Each line requires amount.'); xml += '<APBILLITEM>'; xml += '<ACCOUNTNO>' + esc(line.glAccountNo) + '</ACCOUNTNO>'; xml += '<AMOUNT>' + Number(line.amount) + '</AMOUNT>'; if (line.memo) xml += '<MEMO>' + esc(line.memo) + '</MEMO>'; if (line.departmentId) xml += '<DEPARTMENTID>' + esc(line.departmentId) + '</DEPARTMENTID>'; if (line.locationId) xml += '<LOCATIONID>' + esc(line.locationId) + '</LOCATIONID>'; if (line.vendorId) xml += '<VENDORID>' + esc(line.vendorId) + '</VENDORID>'; if (line.customerId) xml += '<CUSTOMERID>' + esc(line.customerId) + '</CUSTOMERID>'; if (line.projectId) xml += '<PROJECTID>' + esc(line.projectId) + '</PROJECTID>'; xml += '</APBILLITEM>'; }); xml += '</APBILLITEMS>'; return xml; }>></APBILL></create>`)}}],outputTransform:"(sourceData) => { const response = sourceData.createBill && sourceData.createBill.data ? sourceData.createBill.data.RESPONSE : undefined; const control = response ? response.CONTROL : undefined; const operation = response ? response.OPERATION : undefined; const authentication = operation ? operation.AUTHENTICATION : undefined; const result = operation ? operation.RESULT : undefined; const statuses = [control && control.STATUS, authentication && authentication.STATUS, result && result.STATUS].filter(Boolean).map((value) => String(value).toLowerCase()); if (statuses.includes('failure')) { const message = (result && result.ERRORMESSAGE) || (authentication && authentication.ERR ? authentication.ERR.ERRORMESSAGE : undefined) || (control && control.ERR ? control.ERR.ERRORMESSAGE : undefined); const rawErrors = message ? message.ERROR : undefined; const errors = Array.isArray(rawErrors) ? rawErrors : (rawErrors ? [rawErrors] : []); const details = errors.map((error) => [error.ERRORNO, error.DESCRIPTION2 || error.DESCRIPTION, error.CORRECTION].filter(Boolean).join(' - ')).filter(Boolean); const supportIds = errors.map((error) => error.SUPPORTID).filter(Boolean); const suffix = supportIds.length ? ` Sage support ID: ${supportIds.join(', ')}.` : ''; throw new Error(`Sage Intacct request failed${details.length ? `: ${details.join('; ')}` : '.'}${suffix}`); } const data = result ? result.DATA : undefined; const raw = data ? (data.APBILL || data.apbill) : undefined; const record = Array.isArray(raw) ? raw[0] : raw; return { recordNo: record && record.RECORDNO ? Number(record.RECORDNO) : undefined, record }; }"},{id:"sage-intacct-update-bill",name:"Update Sage Intacct AP bill",shortName:"Update bill",instruction:"Updates an existing AP bill in Sage Intacct by record number. Only the provided fields change. Line items can be added or updated by line number.",inputSchema:{type:"object",required:["recordNo"],properties:{recordNo:{type:"integer"},description:{type:"string"},vendorId:{type:"string"},dateCreated:{type:"string"},dateDue:{type:"string"},termName:{type:"string"},lines:{type:"array",items:{type:"object",properties:{lineNo:{type:"integer"},memo:{type:"string"},amount:{type:"number"},glAccountNo:{type:"string"},departmentId:{type:"string"},locationId:{type:"string"},vendorId:{type:"string"},customerId:{type:"string"},projectId:{type:"string"}}}}}},steps:[{id:"updateBill",instruction:"Update the APBILL record by RECORDNO.",modify:!0,config:{type:"request",systemId:"sage_intacct",url:"<<sage_intacct_url>>",method:"POST",headers:{"Content-Type":"application/xml",Accept:"application/xml"},body:ft(`<update><APBILL><RECORDNO><<(sourceData) => { const recordNo = Number(sourceData.recordNo); if (!Number.isInteger(recordNo) || recordNo <= 0) throw new Error('recordNo must be a positive integer.'); return recordNo; }>></RECORDNO><<(sourceData) => { const esc = (value) => String(value).replaceAll('&', '&amp;').replaceAll('<', '&lt;').replaceAll('>', '&gt;').replaceAll('"', '&quot;').replaceAll("'", '&apos;'); let xml = ''; if (sourceData.vendorId) xml += '<VENDORID>' + esc(sourceData.vendorId) + '</VENDORID>'; if (sourceData.dateCreated) { const match = String(sourceData.dateCreated).match(/^(\\d{4})-(\\d{2})-(\\d{2})/); xml += '<WHENCREATED>' + esc(match ? match[2] + '/' + match[3] + '/' + match[1] : sourceData.dateCreated) + '</WHENCREATED>'; } if (sourceData.dateDue) { const md = String(sourceData.dateDue).match(/^(\\d{4})-(\\d{2})-(\\d{2})/); xml += '<WHENDUE>' + esc(md ? md[2] + '/' + md[3] + '/' + md[1] : sourceData.dateDue) + '</WHENDUE>'; } if (sourceData.termName) xml += '<TERMNAME>' + esc(sourceData.termName) + '</TERMNAME>'; if (sourceData.description) xml += '<DESCRIPTION>' + esc(sourceData.description) + '</DESCRIPTION>'; const lines = Array.isArray(sourceData.lines) ? sourceData.lines : []; if (lines.length > 0) { xml += '<APBILLITEMS>'; lines.forEach((line) => { xml += '<APBILLITEM>'; if (line.lineNo) xml += '<LINE_NO>' + Number(line.lineNo) + '</LINE_NO>'; if (line.glAccountNo) xml += '<ACCOUNTNO>' + esc(line.glAccountNo) + '</ACCOUNTNO>'; if (line.amount != null) xml += '<AMOUNT>' + Number(line.amount) + '</AMOUNT>'; if (line.memo) xml += '<MEMO>' + esc(line.memo) + '</MEMO>'; if (line.departmentId) xml += '<DEPARTMENTID>' + esc(line.departmentId) + '</DEPARTMENTID>'; if (line.locationId) xml += '<LOCATIONID>' + esc(line.locationId) + '</LOCATIONID>'; if (line.vendorId) xml += '<VENDORID>' + esc(line.vendorId) + '</VENDORID>'; if (line.customerId) xml += '<CUSTOMERID>' + esc(line.customerId) + '</CUSTOMERID>'; if (line.projectId) xml += '<PROJECTID>' + esc(line.projectId) + '</PROJECTID>'; xml += '</APBILLITEM>'; }); xml += '</APBILLITEMS>'; } if (!xml && lines.length === 0) throw new Error('Provide at least one field to update.'); return xml; }>></APBILL></update>`)}}],outputTransform:"(sourceData) => { const response = sourceData.updateBill && sourceData.updateBill.data ? sourceData.updateBill.data.RESPONSE : undefined; const control = response ? response.CONTROL : undefined; const operation = response ? response.OPERATION : undefined; const authentication = operation ? operation.AUTHENTICATION : undefined; const result = operation ? operation.RESULT : undefined; const statuses = [control && control.STATUS, authentication && authentication.STATUS, result && result.STATUS].filter(Boolean).map((value) => String(value).toLowerCase()); if (statuses.includes('failure')) { const message = (result && result.ERRORMESSAGE) || (authentication && authentication.ERR ? authentication.ERR.ERRORMESSAGE : undefined) || (control && control.ERR ? control.ERR.ERRORMESSAGE : undefined); const rawErrors = message ? message.ERROR : undefined; const errors = Array.isArray(rawErrors) ? rawErrors : (rawErrors ? [rawErrors] : []); const details = errors.map((error) => [error.ERRORNO, error.DESCRIPTION2 || error.DESCRIPTION, error.CORRECTION].filter(Boolean).join(' - ')).filter(Boolean); const supportIds = errors.map((error) => error.SUPPORTID).filter(Boolean); const suffix = supportIds.length ? ` Sage support ID: ${supportIds.join(', ')}.` : ''; throw new Error(`Sage Intacct request failed${details.length ? `: ${details.join('; ')}` : '.'}${suffix}`); } const data = result ? result.DATA : undefined; const raw = data ? (data.APBILL || data.apbill) : undefined; const record = Array.isArray(raw) ? raw[0] : raw; return { recordNo: sourceData.recordNo, record }; }"},{id:"sage-intacct-create-department",name:"Create Sage Intacct department",shortName:"Create department",instruction:"Creates a department in Sage Intacct via the XML Web Services API. Requires a department ID and title. Re-running creates another department; it is not idempotent.",inputSchema:{type:"object",required:["departmentId","title"],properties:{title:{type:"string"},departmentId:{type:"string"}}},steps:[{id:"createDepartment",instruction:"Create the DEPARTMENT record.",modify:!0,config:{type:"request",systemId:"sage_intacct",url:"<<sage_intacct_url>>",method:"POST",headers:{"Content-Type":"application/xml",Accept:"application/xml"},body:ft(`<create><DEPARTMENT><<(sourceData) => { const esc = (value) => String(value).replaceAll('&', '&amp;').replaceAll('<', '&lt;').replaceAll('>', '&gt;').replaceAll('"', '&quot;').replaceAll("'", '&apos;'); if (!sourceData.departmentId) throw new Error('departmentId is required.'); if (!sourceData.title) throw new Error('title is required.'); let xml = '<DEPARTMENTID>' + esc(sourceData.departmentId) + '</DEPARTMENTID>'; xml += '<TITLE>' + esc(sourceData.title) + '</TITLE>'; if (sourceData.parentId) xml += '<PARENTID>' + esc(sourceData.parentId) + '</PARENTID>'; if (sourceData.status) xml += '<STATUS>' + esc(sourceData.status) + '</STATUS>'; return xml; }>></DEPARTMENT></create>`)}}],outputTransform:"(sourceData) => { const response = sourceData.createDepartment && sourceData.createDepartment.data ? sourceData.createDepartment.data.RESPONSE : undefined; const control = response ? response.CONTROL : undefined; const operation = response ? response.OPERATION : undefined; const authentication = operation ? operation.AUTHENTICATION : undefined; const result = operation ? operation.RESULT : undefined; const statuses = [control && control.STATUS, authentication && authentication.STATUS, result && result.STATUS].filter(Boolean).map((value) => String(value).toLowerCase()); if (statuses.includes('failure')) { const message = (result && result.ERRORMESSAGE) || (authentication && authentication.ERR ? authentication.ERR.ERRORMESSAGE : undefined) || (control && control.ERR ? control.ERR.ERRORMESSAGE : undefined); const rawErrors = message ? message.ERROR : undefined; const errors = Array.isArray(rawErrors) ? rawErrors : (rawErrors ? [rawErrors] : []); const details = errors.map((error) => [error.ERRORNO, error.DESCRIPTION2 || error.DESCRIPTION, error.CORRECTION].filter(Boolean).join(' - ')).filter(Boolean); const supportIds = errors.map((error) => error.SUPPORTID).filter(Boolean); const suffix = supportIds.length ? ` Sage support ID: ${supportIds.join(', ')}.` : ''; throw new Error(`Sage Intacct request failed${details.length ? `: ${details.join('; ')}` : '.'}${suffix}`); } const data = result ? result.DATA : undefined; const raw = data ? (data.DEPARTMENT || data.department) : undefined; const record = Array.isArray(raw) ? raw[0] : raw; return { recordNo: record && record.RECORDNO ? Number(record.RECORDNO) : undefined, record }; }"},{id:"sage-intacct-update-department",name:"Update Sage Intacct department",shortName:"Update department",instruction:"Updates an existing department in Sage Intacct by record number. Only the provided fields change.",inputSchema:{type:"object",required:["recordNo"],properties:{title:{type:"string"},recordNo:{type:"integer"},parentId:{type:"string"},status:{type:"string",enum:["active","inactive"]}}},steps:[{id:"updateDepartment",instruction:"Update the DEPARTMENT record by RECORDNO.",modify:!0,config:{type:"request",systemId:"sage_intacct",url:"<<sage_intacct_url>>",method:"POST",headers:{"Content-Type":"application/xml",Accept:"application/xml"},body:ft(`<update><DEPARTMENT><RECORDNO><<(sourceData) => { const recordNo = Number(sourceData.recordNo); if (!Number.isInteger(recordNo) || recordNo <= 0) throw new Error('recordNo must be a positive integer.'); return recordNo; }>></RECORDNO><<(sourceData) => { const esc = (value) => String(value).replaceAll('&', '&amp;').replaceAll('<', '&lt;').replaceAll('>', '&gt;').replaceAll('"', '&quot;').replaceAll("'", '&apos;'); let xml = ''; if (sourceData.title) xml += '<TITLE>' + esc(sourceData.title) + '</TITLE>'; if (sourceData.parentId) xml += '<PARENTID>' + esc(sourceData.parentId) + '</PARENTID>'; if (sourceData.status) xml += '<STATUS>' + esc(sourceData.status) + '</STATUS>'; if (!xml) throw new Error('Provide at least one field to update.'); return xml; }>></DEPARTMENT></update>`)}}],outputTransform:"(sourceData) => { const response = sourceData.updateDepartment && sourceData.updateDepartment.data ? sourceData.updateDepartment.data.RESPONSE : undefined; const control = response ? response.CONTROL : undefined; const operation = response ? response.OPERATION : undefined; const authentication = operation ? operation.AUTHENTICATION : undefined; const result = operation ? operation.RESULT : undefined; const statuses = [control && control.STATUS, authentication && authentication.STATUS, result && result.STATUS].filter(Boolean).map((value) => String(value).toLowerCase()); if (statuses.includes('failure')) { const message = (result && result.ERRORMESSAGE) || (authentication && authentication.ERR ? authentication.ERR.ERRORMESSAGE : undefined) || (control && control.ERR ? control.ERR.ERRORMESSAGE : undefined); const rawErrors = message ? message.ERROR : undefined; const errors = Array.isArray(rawErrors) ? rawErrors : (rawErrors ? [rawErrors] : []); const details = errors.map((error) => [error.ERRORNO, error.DESCRIPTION2 || error.DESCRIPTION, error.CORRECTION].filter(Boolean).join(' - ')).filter(Boolean); const supportIds = errors.map((error) => error.SUPPORTID).filter(Boolean); const suffix = supportIds.length ? ` Sage support ID: ${supportIds.join(', ')}.` : ''; throw new Error(`Sage Intacct request failed${details.length ? `: ${details.join('; ')}` : '.'}${suffix}`); } const data = result ? result.DATA : undefined; const raw = data ? (data.DEPARTMENT || data.department) : undefined; const record = Array.isArray(raw) ? raw[0] : raw; return { recordNo: sourceData.recordNo, record }; }"}]},dynamics365_sales:{bundleId:"dynamics365_sales",templateId:"dynamics365_sales",systemId:"dynamics365_sales",displayName:"Dynamics 365 Sales",description:"Read accounts, contacts and the sales pipeline from Dynamics 365 Sales.",systemUrl:"https://<<api_host>>/api/data/v9.2",credentialHint:"Set api_host to your environment host, then connect with Microsoft OAuth. Your assistant walks you through it.",requiredCredentialKeys:["api_host","access_token"],mcpServer:{name:"dynamics-sales",displayName:"Dynamics 365 Sales",description:"Accounts, contacts, opportunity pipeline and ad-hoc Dataverse queries from Dynamics 365 Sales."},installMcpServer:!0,agentLaunch:{userPrompt:"I just installed the Dynamics 365 Sales bundle. What can I do with it?",nextSteps:'Your first reply must be short: one line confirming the Dynamics MCP server is installed, then ask for their environment host in chat (like contoso.crm.dynamics.com \u2014 it is not a secret, so never collect it through a secure form; form values are redacted and you cannot read them back). When they reply, save it with set_credentials passing credentials: { api_host: "<their host>" } directly, without askForUserInputs. Then start Microsoft OAuth with authenticate_oauth and substitute the same host into the scopes yourself \u2014 send "https://<host>/user_impersonation offline_access", never the <<api_host>> placeholder, which Microsoft rejects. OAuth fills access_token automatically; never send the user to the Credentials page, never ask for a token as chat text, and never suggest the az CLI. Once connected, the MCP server is ready; offer one test run. Do not list the installed tools, do not add tips unless asked. If asked later: OAuth refresh is automatic, the query tool accepts any Dataverse entity set, and record totals above 5000 are reported as capped by Dataverse rather than exact.'},tools:[{id:"dynamics-list-accounts",name:"List Dynamics 365 accounts",shortName:"Accounts",instruction:"Lists account records from Dynamics 365 with name, account number and creation date. Supports an optional OData $filter. Useful for validating migrated accounts.",inputSchema:{type:"object",properties:{filter:{type:"string",description:`Optional OData $filter expression, e.g. "createdon gt 2026-01-01T00:00:00Z" or "contains(name,'GmbH')".`},maxResults:{type:"integer",description:"Maximum number of accounts to return in one call. Defaults to 100."}},additionalProperties:!0},steps:[{id:"fetchAccounts",instruction:"Fetch accounts from the Dataverse Web API.",config:{type:"request",systemId:"dynamics365_sales",url:"https://<<dynamics365_sales_api_host>>/api/data/v9.2/accounts",method:"GET",headers:{Authorization:"Bearer <<dynamics365_sales_access_token>>",Accept:"application/json","OData-MaxVersion":"4.0","OData-Version":"4.0","If-None-Match":"null"},queryParams:{$select:"name,accountnumber,telephone1,websiteurl,createdon,modifiedon",$filter:"<<filter>>",$top:"<<(p) => p.maxResults ?? 100>>",$count:"true"}}}],outputTransform:'(sourceData) => { const data = sourceData.fetchAccounts?.data ?? {}; const rows = data.value ?? []; const capped = data["@Microsoft.Dynamics.CRM.totalrecordcountlimitexceeded"] === true; return { total: capped ? null : (data["@odata.count"] ?? rows.length), totalCapped: capped, returned: rows.length, accounts: rows.map((r) => ({ id: r.accountid, name: r.name, accountNumber: r.accountnumber, phone: r.telephone1, website: r.websiteurl, createdOn: r.createdon, modifiedOn: r.modifiedon })) }; }'},{id:"dynamics-list-contacts",name:"List Dynamics 365 contacts",shortName:"Contacts",instruction:"Lists contact records from Dynamics 365 with name, email and creation date. Supports an optional OData $filter. Useful for validating migrated contacts.",inputSchema:{type:"object",properties:{filter:{type:"string",description:'Optional OData $filter expression, e.g. "emailaddress1 eq null" to find contacts missing an email.'},maxResults:{type:"integer",description:"Maximum number of contacts to return in one call. Defaults to 100."}},additionalProperties:!0},steps:[{id:"fetchContacts",instruction:"Fetch contacts from the Dataverse Web API.",config:{type:"request",systemId:"dynamics365_sales",url:"https://<<dynamics365_sales_api_host>>/api/data/v9.2/contacts",method:"GET",headers:{Authorization:"Bearer <<dynamics365_sales_access_token>>",Accept:"application/json","OData-MaxVersion":"4.0","OData-Version":"4.0","If-None-Match":"null"},queryParams:{$select:"fullname,emailaddress1,telephone1,jobtitle,createdon,modifiedon",$filter:"<<filter>>",$top:"<<(p) => p.maxResults ?? 100>>",$count:"true"}}}],outputTransform:'(sourceData) => { const data = sourceData.fetchContacts?.data ?? {}; const rows = data.value ?? []; const capped = data["@Microsoft.Dynamics.CRM.totalrecordcountlimitexceeded"] === true; return { total: capped ? null : (data["@odata.count"] ?? rows.length), totalCapped: capped, returned: rows.length, contacts: rows.map((r) => ({ id: r.contactid, name: r.fullname, email: r.emailaddress1, phone: r.telephone1, jobTitle: r.jobtitle, createdOn: r.createdon, modifiedOn: r.modifiedon })) }; }'},{id:"dynamics-open-opportunities",name:"List Dynamics 365 open opportunities",shortName:"Open opportunities",instruction:"Lists open opportunities from Dynamics 365 with estimated value and close date. Supports an optional additional OData $filter. Useful for pipeline verification during UAT.",inputSchema:{type:"object",properties:{filter:{type:"string",description:'Optional additional OData $filter combined with the open-state filter, e.g. "estimatedvalue gt 10000".'},maxResults:{type:"integer",description:"Maximum number of opportunities to return in one call. Defaults to 100."}},additionalProperties:!0},steps:[{id:"fetchOpportunities",instruction:"Fetch open opportunities from the Dataverse Web API.",config:{type:"request",systemId:"dynamics365_sales",url:"https://<<dynamics365_sales_api_host>>/api/data/v9.2/opportunities",method:"GET",headers:{Authorization:"Bearer <<dynamics365_sales_access_token>>",Accept:"application/json","OData-MaxVersion":"4.0","OData-Version":"4.0","If-None-Match":"null"},queryParams:{$select:"name,estimatedvalue,estimatedclosedate,createdon,statecode,_parentaccountid_value",$filter:'<<(p) => p.filter ? "statecode eq 0 and (" + p.filter + ")" : "statecode eq 0">>',$top:"<<(p) => p.maxResults ?? 100>>",$count:"true"}}}],outputTransform:'(sourceData) => { const data = sourceData.fetchOpportunities?.data ?? {}; const rows = data.value ?? []; const capped = data["@Microsoft.Dynamics.CRM.totalrecordcountlimitexceeded"] === true; return { total: capped ? null : (data["@odata.count"] ?? rows.length), totalCapped: capped, returned: rows.length, opportunities: rows.map((r) => ({ id: r.opportunityid, name: r.name, estimatedValue: r.estimatedvalue, estimatedCloseDate: r.estimatedclosedate, accountId: r._parentaccountid_value, createdOn: r.createdon })) }; }'},{id:"dynamics-list-leads",name:"List Dynamics 365 leads",shortName:"Leads",instruction:"Lists lead records from Dynamics 365 with subject, name and company. Supports an optional OData $filter. Useful for validating migrated leads.",inputSchema:{type:"object",properties:{filter:{type:"string",description:'Optional OData $filter expression, e.g. "statecode eq 0" for open leads.'},maxResults:{type:"integer",description:"Maximum number of records to return in one call. Defaults to 100."}},additionalProperties:!0},steps:[{id:"fetchLeads",instruction:"Fetch leads from the Dataverse Web API.",config:{type:"request",systemId:"dynamics365_sales",url:"https://<<dynamics365_sales_api_host>>/api/data/v9.2/leads",method:"GET",headers:{Authorization:"Bearer <<dynamics365_sales_access_token>>",Accept:"application/json","OData-MaxVersion":"4.0","OData-Version":"4.0","If-None-Match":"null"},queryParams:{$select:"subject,fullname,companyname,statecode,createdon,modifiedon",$filter:"<<filter>>",$top:"<<(p) => p.maxResults ?? 100>>",$count:"true"}}}],outputTransform:'(sourceData) => { const data = sourceData.fetchLeads?.data ?? {}; const rows = data.value ?? []; const capped = data["@Microsoft.Dynamics.CRM.totalrecordcountlimitexceeded"] === true; return { total: capped ? null : (data["@odata.count"] ?? rows.length), totalCapped: capped, returned: rows.length, records: rows.map((r) => ({ id: r.leadid, subject: r.subject, name: r.fullname, company: r.companyname, state: r.statecode, createdOn: r.createdon, modifiedOn: r.modifiedon })) }; }'},{id:"dynamics-list-cases",name:"List Dynamics 365 cases",shortName:"Cases",instruction:"Lists case (incident) records from Dynamics 365 with title, ticket number and status. Supports an optional OData $filter.",inputSchema:{type:"object",properties:{filter:{type:"string",description:'Optional OData $filter expression, e.g. "statecode eq 0" for active cases.'},maxResults:{type:"integer",description:"Maximum number of records to return in one call. Defaults to 100."}},additionalProperties:!0},steps:[{id:"fetchCases",instruction:"Fetch incidents from the Dataverse Web API.",config:{type:"request",systemId:"dynamics365_sales",url:"https://<<dynamics365_sales_api_host>>/api/data/v9.2/incidents",method:"GET",headers:{Authorization:"Bearer <<dynamics365_sales_access_token>>",Accept:"application/json","OData-MaxVersion":"4.0","OData-Version":"4.0","If-None-Match":"null"},queryParams:{$select:"title,ticketnumber,statecode,createdon,_customerid_value",$filter:"<<filter>>",$top:"<<(p) => p.maxResults ?? 100>>",$count:"true"}}}],outputTransform:'(sourceData) => { const data = sourceData.fetchCases?.data ?? {}; const rows = data.value ?? []; const capped = data["@Microsoft.Dynamics.CRM.totalrecordcountlimitexceeded"] === true; return { total: capped ? null : (data["@odata.count"] ?? rows.length), totalCapped: capped, returned: rows.length, records: rows.map((r) => ({ id: r.incidentid, title: r.title, ticketNumber: r.ticketnumber, state: r.statecode, customerId: r._customerid_value, createdOn: r.createdon })) }; }'},{id:"dynamics-list-users",name:"List Dynamics 365 users",shortName:"Users",instruction:"Lists system users from Dynamics 365 with name, email and disabled state. Useful for owner-mapping checks during migrations.",inputSchema:{type:"object",properties:{filter:{type:"string",description:'Optional OData $filter expression, e.g. "isdisabled eq false" for active users.'},maxResults:{type:"integer",description:"Maximum number of records to return in one call. Defaults to 100."}},additionalProperties:!0},steps:[{id:"fetchUsers",instruction:"Fetch systemusers from the Dataverse Web API.",config:{type:"request",systemId:"dynamics365_sales",url:"https://<<dynamics365_sales_api_host>>/api/data/v9.2/systemusers",method:"GET",headers:{Authorization:"Bearer <<dynamics365_sales_access_token>>",Accept:"application/json","OData-MaxVersion":"4.0","OData-Version":"4.0","If-None-Match":"null"},queryParams:{$select:"fullname,internalemailaddress,isdisabled,createdon",$filter:"<<filter>>",$top:"<<(p) => p.maxResults ?? 100>>",$count:"true"}}}],outputTransform:'(sourceData) => { const data = sourceData.fetchUsers?.data ?? {}; const rows = data.value ?? []; const capped = data["@Microsoft.Dynamics.CRM.totalrecordcountlimitexceeded"] === true; return { total: capped ? null : (data["@odata.count"] ?? rows.length), totalCapped: capped, returned: rows.length, records: rows.map((r) => ({ id: r.systemuserid, name: r.fullname, email: r.internalemailaddress, disabled: r.isdisabled, createdOn: r.createdon })) }; }'},{id:"dynamics-list-products",name:"List Dynamics 365 products",shortName:"Products",instruction:"Lists product catalog records from Dynamics 365 with name, number and state. Supports an optional OData $filter.",inputSchema:{type:"object",properties:{filter:{type:"string",description:'Optional OData $filter expression, e.g. "statecode eq 0" for active products.'},maxResults:{type:"integer",description:"Maximum number of records to return in one call. Defaults to 100."}},additionalProperties:!0},steps:[{id:"fetchProducts",instruction:"Fetch products from the Dataverse Web API.",config:{type:"request",systemId:"dynamics365_sales",url:"https://<<dynamics365_sales_api_host>>/api/data/v9.2/products",method:"GET",headers:{Authorization:"Bearer <<dynamics365_sales_access_token>>",Accept:"application/json","OData-MaxVersion":"4.0","OData-Version":"4.0","If-None-Match":"null"},queryParams:{$select:"name,productnumber,statecode,createdon",$filter:"<<filter>>",$top:"<<(p) => p.maxResults ?? 100>>",$count:"true"}}}],outputTransform:'(sourceData) => { const data = sourceData.fetchProducts?.data ?? {}; const rows = data.value ?? []; const capped = data["@Microsoft.Dynamics.CRM.totalrecordcountlimitexceeded"] === true; return { total: capped ? null : (data["@odata.count"] ?? rows.length), totalCapped: capped, returned: rows.length, records: rows.map((r) => ({ id: r.productid, name: r.name, number: r.productnumber, state: r.statecode, createdOn: r.createdon })) }; }'},{id:"dynamics-query-dataverse",name:"Query any Dynamics 365 entity",shortName:"Query any entity",instruction:'Queries any Dataverse entity set. Required input: entitySet \u2014 the plural entity set name, e.g. "leads", "systemusers", "incidents". Optional inputs: select (OData $select field list), filter (OData $filter expression), maxResults (record cap, default 100). The workhorse tool for CRM migration validation and data quality checks beyond the prebuilt lists.',inputSchema:{type:"object",properties:{entitySet:{type:"string",description:'Dataverse entity set name (plural), e.g. "leads", "systemusers", "incidents".'},select:{type:"string",description:'Comma-separated OData $select field list, e.g. "subject,createdon". Omit for all fields.'},filter:{type:"string",description:"Optional OData $filter expression."},maxResults:{type:"integer",description:"Maximum number of records to return in one call. Defaults to 100."}},required:["entitySet"],additionalProperties:!0},steps:[{id:"queryEntity",instruction:"Query the requested Dataverse entity set.",config:{type:"request",systemId:"dynamics365_sales",url:"https://<<dynamics365_sales_api_host>>/api/data/v9.2/<<entitySet>>",method:"GET",headers:{Authorization:"Bearer <<dynamics365_sales_access_token>>",Accept:"application/json","OData-MaxVersion":"4.0","OData-Version":"4.0","If-None-Match":"null"},queryParams:{$select:"<<select>>",$filter:"<<filter>>",$top:"<<(p) => p.maxResults ?? 100>>",$count:"true"}}}],outputTransform:'(sourceData) => { const data = sourceData.queryEntity?.data ?? {}; const rows = data.value ?? []; const capped = data["@Microsoft.Dynamics.CRM.totalrecordcountlimitexceeded"] === true; return { total: capped ? null : (data["@odata.count"] ?? rows.length), totalCapped: capped, returned: rows.length, records: rows }; }'}]},dynamics365_business_central:{bundleId:"dynamics365_business_central",templateId:"dynamics365_business_central",systemId:"dynamics365_business_central",displayName:"Dynamics 365 Business Central",description:"Read companies, customers, vendors and the chart of accounts from Business Central.",systemUrl:"https://api.businesscentral.dynamics.com/v2.0/<<environment>>/api/v2.0",credentialHint:"Connect your Business Central environment. Your assistant walks you through it.",requiredCredentialKeys:["environment","access_token"],mcpServer:{name:"business-central",displayName:"Dynamics 365 Business Central",description:"Companies, customers, vendors, chart of accounts and ad-hoc entity queries from Business Central."},installMcpServer:!0,agentLaunch:{userPrompt:"I just installed the Dynamics 365 Business Central bundle. What can I do with it?",nextSteps:"Your first reply must be short: one line confirming the Business Central MCP server is installed, then collect the credentials. Use set_credentials for this system to collect environment (their BC environment name, usually production or sandbox) and access_token; never send the user to the Credentials page and never accept secrets as chat text. Fastest token: az account get-access-token --resource https://api.businesscentral.dynamics.com. Once saved, the MCP server is ready; run the companies tool as the test, because its result contains the company id every other tool needs. Do not list the installed tools, do not add tips unless asked. If asked later: tokens expire after about an hour, so a 401 means refresh access_token; the query tool accepts any Business Central entity set like items or salesInvoices."},tools:[{id:"business-central-list-companies",name:"List Business Central companies",shortName:"Companies",instruction:"Lists the companies in the Business Central environment. Run this first: every other Business Central tool needs a companyId from this list.",inputSchema:{type:"object",properties:{},additionalProperties:!0},steps:[{id:"fetchCompanies",instruction:"Fetch the companies in this environment.",config:{type:"request",systemId:"dynamics365_business_central",url:"https://api.businesscentral.dynamics.com/v2.0/<<dynamics365_business_central_environment>>/api/v2.0/companies",method:"GET",headers:{Authorization:"Bearer <<dynamics365_business_central_access_token>>",Accept:"application/json","Data-Access-Intent":"ReadOnly"}}}],outputTransform:"(sourceData) => { const rows = sourceData.fetchCompanies?.data?.value ?? []; return { total: rows.length, companies: rows.map((r) => ({ companyId: r.id, name: r.name, displayName: r.displayName })) }; }"},{id:"business-central-list-customers",name:"List Business Central customers",shortName:"Customers",instruction:"Lists customer master records from a Business Central company. Requires a companyId from the companies tool. Supports an optional OData $filter.",inputSchema:{type:"object",properties:{companyId:{type:"string",description:"Company id (GUID) from the companies tool."},filter:{type:"string",description:`Optional OData $filter expression, e.g. "blocked ne ''" or "contains(displayName,'GmbH')".`},maxResults:{type:"integer",description:"Maximum number of customers to return in one call. Defaults to 100."}},required:["companyId"],additionalProperties:!0},steps:[{id:"fetchCustomers",instruction:"Fetch customers for the given company.",config:{type:"request",systemId:"dynamics365_business_central",url:"https://api.businesscentral.dynamics.com/v2.0/<<dynamics365_business_central_environment>>/api/v2.0/companies(<<companyId>>)/customers",method:"GET",headers:{Authorization:"Bearer <<dynamics365_business_central_access_token>>",Accept:"application/json","Data-Access-Intent":"ReadOnly"},queryParams:{$select:"id,number,displayName,email,phoneNumber,blocked,lastModifiedDateTime",$filter:"<<filter>>",$top:"<<(p) => p.maxResults ?? 100>>",$count:"true"}}}],outputTransform:'(sourceData) => { const data = sourceData.fetchCustomers?.data ?? {}; const rows = data.value ?? []; return { total: data["@odata.count"] ?? rows.length, customers: rows.map((r) => ({ id: r.id, number: r.number, name: r.displayName, email: r.email, phone: r.phoneNumber, blocked: r.blocked, lastModified: r.lastModifiedDateTime })) }; }'},{id:"business-central-list-vendors",name:"List Business Central vendors",shortName:"Vendors",instruction:"Lists vendor master records from a Business Central company. Requires a companyId from the companies tool. Supports an optional OData $filter.",inputSchema:{type:"object",properties:{companyId:{type:"string",description:"Company id (GUID) from the companies tool."},filter:{type:"string",description:"Optional OData $filter expression."},maxResults:{type:"integer",description:"Maximum number of vendors to return in one call. Defaults to 100."}},required:["companyId"],additionalProperties:!0},steps:[{id:"fetchVendors",instruction:"Fetch vendors for the given company.",config:{type:"request",systemId:"dynamics365_business_central",url:"https://api.businesscentral.dynamics.com/v2.0/<<dynamics365_business_central_environment>>/api/v2.0/companies(<<companyId>>)/vendors",method:"GET",headers:{Authorization:"Bearer <<dynamics365_business_central_access_token>>",Accept:"application/json","Data-Access-Intent":"ReadOnly"},queryParams:{$select:"id,number,displayName,email,phoneNumber,blocked,lastModifiedDateTime",$filter:"<<filter>>",$top:"<<(p) => p.maxResults ?? 100>>",$count:"true"}}}],outputTransform:'(sourceData) => { const data = sourceData.fetchVendors?.data ?? {}; const rows = data.value ?? []; return { total: data["@odata.count"] ?? rows.length, vendors: rows.map((r) => ({ id: r.id, number: r.number, name: r.displayName, email: r.email, phone: r.phoneNumber, blocked: r.blocked, lastModified: r.lastModifiedDateTime })) }; }'},{id:"business-central-list-accounts",name:"List Business Central chart of accounts",shortName:"Chart of accounts",instruction:"Lists general ledger accounts (the chart of accounts) from a Business Central company. Requires a companyId from the companies tool. Supports an optional OData $filter.",inputSchema:{type:"object",properties:{companyId:{type:"string",description:"Company id (GUID) from the companies tool."},filter:{type:"string",description:`Optional OData $filter expression, e.g. "category eq 'Assets'".`},maxResults:{type:"integer",description:"Maximum number of accounts to return in one call. Defaults to 200."}},required:["companyId"],additionalProperties:!0},steps:[{id:"fetchAccounts",instruction:"Fetch general ledger accounts for the given company.",config:{type:"request",systemId:"dynamics365_business_central",url:"https://api.businesscentral.dynamics.com/v2.0/<<dynamics365_business_central_environment>>/api/v2.0/companies(<<companyId>>)/accounts",method:"GET",headers:{Authorization:"Bearer <<dynamics365_business_central_access_token>>",Accept:"application/json","Data-Access-Intent":"ReadOnly"},queryParams:{$select:"id,number,displayName,category,subCategory,blocked,accountType",$filter:"<<filter>>",$top:"<<(p) => p.maxResults ?? 200>>",$count:"true"}}}],outputTransform:'(sourceData) => { const data = sourceData.fetchAccounts?.data ?? {}; const rows = data.value ?? []; return { total: data["@odata.count"] ?? rows.length, accounts: rows.map((r) => ({ id: r.id, number: r.number, name: r.displayName, category: r.category, subCategory: r.subCategory, type: r.accountType, blocked: r.blocked })) }; }'},{id:"business-central-list-items",name:"List Business Central items",shortName:"Items",instruction:"Lists item (product) master records from a Business Central company. Requires a companyId from the companies tool. Supports an optional OData $filter.",inputSchema:{type:"object",properties:{companyId:{type:"string",description:"Company id (GUID) from the companies tool."},filter:{type:"string",description:`Optional OData $filter expression, e.g. "type eq 'Inventory'".`},maxResults:{type:"integer",description:"Maximum number of items to return in one call. Defaults to 100."}},required:["companyId"],additionalProperties:!0},steps:[{id:"fetchItems",instruction:"Fetch items for the given company.",config:{type:"request",systemId:"dynamics365_business_central",url:"https://api.businesscentral.dynamics.com/v2.0/<<dynamics365_business_central_environment>>/api/v2.0/companies(<<companyId>>)/items",method:"GET",headers:{Authorization:"Bearer <<dynamics365_business_central_access_token>>",Accept:"application/json","Data-Access-Intent":"ReadOnly"},queryParams:{$select:"id,number,displayName,type,unitPrice,inventory,blocked,lastModifiedDateTime",$filter:"<<filter>>",$top:"<<(p) => p.maxResults ?? 100>>",$count:"true"}}}],outputTransform:'(sourceData) => { const data = sourceData.fetchItems?.data ?? {}; const rows = data.value ?? []; return { total: data["@odata.count"] ?? rows.length, items: rows.map((r) => ({ id: r.id, number: r.number, name: r.displayName, type: r.type, unitPrice: r.unitPrice, inventory: r.inventory, blocked: r.blocked })) }; }'},{id:"business-central-list-sales-invoices",name:"List Business Central sales invoices",shortName:"Sales invoices",instruction:"Lists sales invoices from a Business Central company with customer, total and status. Requires a companyId from the companies tool. Supports an optional OData $filter.",inputSchema:{type:"object",properties:{companyId:{type:"string",description:"Company id (GUID) from the companies tool."},filter:{type:"string",description:`Optional OData $filter expression, e.g. "status eq 'Open'".`},maxResults:{type:"integer",description:"Maximum number of invoices to return in one call. Defaults to 100."}},required:["companyId"],additionalProperties:!0},steps:[{id:"fetchSalesInvoices",instruction:"Fetch sales invoices for the given company.",config:{type:"request",systemId:"dynamics365_business_central",url:"https://api.businesscentral.dynamics.com/v2.0/<<dynamics365_business_central_environment>>/api/v2.0/companies(<<companyId>>)/salesInvoices",method:"GET",headers:{Authorization:"Bearer <<dynamics365_business_central_access_token>>",Accept:"application/json","Data-Access-Intent":"ReadOnly"},queryParams:{$select:"id,number,customerName,invoiceDate,totalAmountIncludingTax,currencyCode,status",$filter:"<<filter>>",$top:"<<(p) => p.maxResults ?? 100>>",$count:"true"}}}],outputTransform:'(sourceData) => { const data = sourceData.fetchSalesInvoices?.data ?? {}; const rows = data.value ?? []; return { total: data["@odata.count"] ?? rows.length, invoices: rows.map((r) => ({ id: r.id, number: r.number, customer: r.customerName, date: r.invoiceDate, total: r.totalAmountIncludingTax, currency: r.currencyCode, status: r.status })) }; }'},{id:"business-central-list-gl-entries",name:"List Business Central general ledger entries",shortName:"GL entries",instruction:"Lists general ledger entries from a Business Central company with account, amounts and posting date. Requires a companyId from the companies tool. Filter by postingDate to verify opening balances at cutover.",inputSchema:{type:"object",properties:{companyId:{type:"string",description:"Company id (GUID) from the companies tool."},filter:{type:"string",description:'Optional OData $filter expression, e.g. "postingDate ge 2026-01-01".'},maxResults:{type:"integer",description:"Maximum number of entries to return in one call. Defaults to 200."}},required:["companyId"],additionalProperties:!0},steps:[{id:"fetchGLEntries",instruction:"Fetch general ledger entries for the given company.",config:{type:"request",systemId:"dynamics365_business_central",url:"https://api.businesscentral.dynamics.com/v2.0/<<dynamics365_business_central_environment>>/api/v2.0/companies(<<companyId>>)/generalLedgerEntries",method:"GET",headers:{Authorization:"Bearer <<dynamics365_business_central_access_token>>",Accept:"application/json","Data-Access-Intent":"ReadOnly"},queryParams:{$select:"id,entryNumber,postingDate,documentNumber,accountNumber,description,debitAmount,creditAmount",$filter:"<<filter>>",$top:"<<(p) => p.maxResults ?? 200>>",$count:"true"}}}],outputTransform:'(sourceData) => { const data = sourceData.fetchGLEntries?.data ?? {}; const rows = data.value ?? []; return { total: data["@odata.count"] ?? rows.length, entries: rows.map((r) => ({ entryNumber: r.entryNumber, postingDate: r.postingDate, document: r.documentNumber, account: r.accountNumber, description: r.description, debit: r.debitAmount, credit: r.creditAmount })) }; }'},{id:"business-central-query-entity",name:"Query any Business Central entity",shortName:"Query any entity",instruction:"Queries any Business Central entity set by name (for example items, salesInvoices, generalLedgerEntries) within a company, with optional OData $select and $filter. The workhorse tool for migration validation beyond the prebuilt lists.",inputSchema:{type:"object",properties:{companyId:{type:"string",description:"Company id (GUID) from the companies tool."},entitySet:{type:"string",description:'Business Central entity set name, e.g. "items", "salesInvoices", "generalLedgerEntries".'},select:{type:"string",description:"Comma-separated OData $select field list. Omit for all fields."},filter:{type:"string",description:"Optional OData $filter expression."},maxResults:{type:"integer",description:"Maximum number of records to return in one call. Defaults to 100."}},required:["companyId","entitySet"],additionalProperties:!0},steps:[{id:"queryEntity",instruction:"Query the requested entity set for the given company.",config:{type:"request",systemId:"dynamics365_business_central",url:"https://api.businesscentral.dynamics.com/v2.0/<<dynamics365_business_central_environment>>/api/v2.0/companies(<<companyId>>)/<<entitySet>>",method:"GET",headers:{Authorization:"Bearer <<dynamics365_business_central_access_token>>",Accept:"application/json","Data-Access-Intent":"ReadOnly"},queryParams:{$select:"<<select>>",$filter:"<<filter>>",$top:"<<(p) => p.maxResults ?? 100>>",$count:"true"}}}],outputTransform:'(sourceData) => { const data = sourceData.queryEntity?.data ?? {}; const rows = data.value ?? []; return { total: data["@odata.count"] ?? rows.length, records: rows }; }'}]},netsuite:{bundleId:"netsuite",templateId:"netsuite",systemId:Od,displayName:"NetSuite",description:"Install a NetSuite system, ten read/query tools, fourteen write tools and a native integration playbook.",systemUrl:"https://{accountId}.suitetalk.api.netsuite.com/services/rest",credentialHint:"Connects through your own NetSuite integration record with OAuth 2.0. Your assistant asks for the account ID and the integration record's client ID and secret, then opens the NetSuite sign-in.",requiredCredentialKeys:["access_token"],oauthSignIn:!0,mcpServer:{name:"netsuite",displayName:"NetSuite",description:"Chart of accounts, customers, vendors, journal entries, invoices, vendor bills, subsidiaries and dimensions from NetSuite, SuiteQL queries and record lookups, plus create and update tools for journal entries, vendors, customers, GL accounts, invoices, vendor bills and departments."},installMcpServer:!1,playbook:{id:"netsuite-native-integration",name:"NetSuite Native Integration",whenToRun:"Use when connecting, validating, querying or extending a NetSuite integration through REST Web Services and SuiteQL.",inputs:"A configured NetSuite system with an OAuth sign-in; the record type or business process to work with; subsidiary scope for OneWorld accounts; validation criteria and desired output.",instructions:"Use the installed read-only tools for the chart of accounts, customers, vendors, journal entry lines, invoices, vendor bills, departments, subsidiaries, classes and locations. Use the SuiteQL query tool for any other record type, join or aggregate, and the get-record tool to inspect one record in full. Use the installed create and update tools for journal entries, vendors, customers, GL accounts, invoices, vendor bills and departments only after the user explicitly confirms the exact records to write; the create tools are not idempotent and re-running them duplicates records. Reference other records by internal ID from the list tools, and pass a subsidiary on OneWorld accounts. Surface NetSuite error details (o:errorDetails) as failures. For other record types or operations, inspect the account's metadata catalog, create separate least-privilege tools, validate them in a sandbox account and require explicit user confirmation before modifying NetSuite data.",completionCriteria:"The requested NetSuite data, write result or validation result is returned; subsidiary scope is correct; NetSuite errors are surfaced as failures with their details; no NetSuite data is modified unless the user explicitly requested and confirmed the write."},agentLaunch:{userPrompt:"I just installed the NetSuite integration. What can I do with it?",nextSteps:'Your first reply must be short: one line confirming the NetSuite integration and native integration playbook are installed. If the system already has a NetSuite sign-in for this user, offer one read-only test run and stop. Otherwise connect it in this order. 1) Ask in chat for the NetSuite account ID (Setup > Company > Company Information, like 1234567 or 1234567_SB1 for a sandbox; it is not a secret). 2) Build the host from it in lowercase with "_" replaced by "-" (1234567_SB1 becomes 1234567-sb1) and edit the system: url https://<host>.suitetalk.api.netsuite.com/services/rest, authentication type oauth2 with oauthClientMode custom, authUrl https://<host>.app.netsuite.com/app/login/oauth2/authorize.nl and tokenUrl https://<host>.suitetalk.api.netsuite.com/services/rest/auth/oauth2/v1/token. Read the system back and confirm no {accountId} remains; never start OAuth while it does. 3) Ask for the client ID and client secret of their NetSuite integration record in chat and store them in the system authentication. If they have no integration record yet, explain: Setup > Integration > Manage Integrations > New, enable Authorization Code Grant with the REST Web Services and RESTlets scopes, set the redirect URI to the superglue OAuth callback URL exactly, and copy the client ID and secret shown once after saving; the NetSuite role needs REST Web Services and Log in using OAuth 2.0 Access Tokens permissions. 4) Run authenticate_oauth for this system. OAuth fills access_token; never ask for a token as chat text and never send the user to the Credentials page. Once connected, the integration is ready; offer one read-only test run. Do not list the installed tools or add tips unless asked. If asked later: how long the sign-in lasts depends on the integration record, and a 401 means signing in again; the SuiteQL tool reads any record type; the installed create and update tools modify NetSuite data, so run them only after the user confirms the exact records to write.'},tools:mpe}};Gn.bundles={...Bb,sage_intacct_mcp:{...Bb.sage_intacct,bundleId:"sage_intacct_mcp",description:"Install the Sage Intacct integration and an OAuth-protected MCP server for its read/query and write tools.",installMcpServer:!0},netsuite_mcp:{...Bb.netsuite,bundleId:"netsuite_mcp",description:"Install the NetSuite integration and an OAuth-protected MCP server for its read/query and write tools.",installMcpServer:!0}};function ype({bundle:t,install:e}){let r=e.tools.map(s=>` - ${s.id}${s.name?` (${s.name})`:""}`).join(`
81
81
  `),n=e.system.requiredCredentialKeys.join(", "),i=e.mcpServer?[` - MCP server: ${e.mcpServer.name} (id: ${e.mcpServer.id})`,"","Silently load the systems and tool-deployment skills before replying. Do not narrate the skill loads.","","The MCP server card is already visible in this conversation with the server URL, its tools, and the client export options for Claude, Cursor, Langdock and curl. Do not describe or reproduce client setup in prose; point at the card."]:["","Silently load the systems skill before replying. Do not narrate the skill load."],o=[`The user just installed the "${t.displayName}" ${e.mcpServer?"MCP server and integration":"integration"} from the superglue website. Everything below already exists. Do not create, rebuild or duplicate any of it.`,"","Installed:",` - System: ${e.system.id} (${e.system.name}) at ${t.systemUrl}`," - Tools:",r,e.playbook?` - Playbook: ${e.playbook.name} (id: ${e.playbook.id})`:void 0,...i,"",e.system.hasUserCredentials?t.demoCredentials?"The system is preloaded with a shared demo credential, so every tool works right now without any setup.":"The system already has credentials for this user.":`The system does not have a complete credential set yet, so no tool will run until the user adds the missing values. Required credential keys: ${n}. ${t.credentialHint}`,t.agentLaunch.nextSteps,"","The user already saw this inventory on the install screen. Do not repeat it back to them."];return{userPrompt:t.agentLaunch.userPrompt,hiddenStarterMessage:o.filter(s=>s!==void 0).join(`
82
82
  `)}}function Epe(t){return typeof t!="string"||!Object.prototype.hasOwnProperty.call(Gn.bundles,t)?null:Gn.bundles[t]}function Ipe(){return Object.values(Gn.bundles)}function Cpe({tool:t,fromSystemId:e,toSystemId:r}){if(e===r)return t;let n=i=>typeof i=="string"?i.split(`${e}_`).join(`${r}_`):Array.isArray(i)?i.map(n):i&&typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,s])=>[o,n(s)])):i;return{...t,steps:t.steps.map(i=>{let o=n(i.config);return(0,spe.isRequestConfig)(o)&&o.systemId===e&&(o.systemId=r),{...i,config:o}}),outputTransform:n(t.outputTransform)}}});var Rx=m(xo=>{"use strict";var bpe=xo&&xo.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Spe=xo&&xo.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),wpe=xo&&xo.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&bpe(r,e,n[i]);return Spe(r,e),r}})();Object.defineProperty(xo,"__esModule",{value:!0});xo.applyDiffsToConfig=_pe;var Bpe=wpe(require("fast-json-patch")),Qpe=yp(),vpe=pn();function _pe(t,e){if(!e?.length)return t;let r=JSON.parse(JSON.stringify(t)),n=(0,Qpe.normalizeToolSchemas)(r),i=(0,vpe.normalizeToolDiffs)(e);return Bpe.applyPatch(n,i,!0,!0).newDocument||n}});var kx=m(oo=>{"use strict";Object.defineProperty(oo,"__esModule",{value:!0});oo.MCP_TOOL_GRANT_PARAM=oo.MCP_TOOL_GRANT_SCOPE=oo.MCP_OAUTH_REFRESH_TOKEN_EXPIRES_IN_SECONDS=oo.MCP_OAUTH_ACCESS_TOKEN_EXPIRES_IN_SECONDS=void 0;oo.MCP_OAUTH_ACCESS_TOKEN_EXPIRES_IN_SECONDS=3600;oo.MCP_OAUTH_REFRESH_TOKEN_EXPIRES_IN_SECONDS=3600*24*365;oo.MCP_TOOL_GRANT_SCOPE="superglue:mcp:new";oo.MCP_TOOL_GRANT_PARAM="mcp_tool_grant"});var Nx=m(it=>{"use strict";Object.defineProperty(it,"__esModule",{value:!0});it.MAX_LOGO_SIZE_BYTES=it.MAX_API_REQUEST_BODY_BYTES=it.MAX_SESSION_ARTIFACT_BYTES=it.MAX_TOOL_RESULT_BYTES=it.MAX_UPLOAD_FILES_PER_BATCH=it.MAX_QBM_UPLOAD_FILE_BYTES=it.MAX_UPLOAD_FILE_BYTES=it.MAX_INLINE_FILE_BASE64_BYTES=it.V8_MAX_STRING_CHARS=void 0;it.maxUploadFileBytes=Dpe;it.V8_MAX_STRING_CHARS=536870888;it.MAX_INLINE_FILE_BASE64_BYTES=375*1024*1024;it.MAX_UPLOAD_FILE_BYTES=50*1024*1024;it.MAX_QBM_UPLOAD_FILE_BYTES=200*1024*1024;function Dpe(t){return/\.qbm$/i.test(t)?it.MAX_QBM_UPLOAD_FILE_BYTES:it.MAX_UPLOAD_FILE_BYTES}it.MAX_UPLOAD_FILES_PER_BATCH=10;it.MAX_TOOL_RESULT_BYTES=500*1024*1024;it.MAX_SESSION_ARTIFACT_BYTES=it.MAX_TOOL_RESULT_BYTES;it.MAX_API_REQUEST_BODY_BYTES=500*1024*1024;it.MAX_LOGO_SIZE_BYTES=10*1024*1024});var Tb=m(ht=>{"use strict";Object.defineProperty(ht,"__esModule",{value:!0});ht.RUN_LIST_EXECUTION_KINDS=ht.RUN_LIST_STATUSES=ht.FILE_RESOURCE_SOURCES=ht.LIST_MAX_SEARCH_LENGTH=ht.LIST_MAX_LIMIT=ht.LIST_DEFAULT_LIMIT=ht.LIST_DEFAULT_PAGE=void 0;ht.createListQueryParams=Ox;ht.createSearchListQueryParams=Tpe;ht.listAllPages=Rpe;ht.fileResourceSource=kpe;ht.createListResponse=Npe;var Db=pr();ht.LIST_DEFAULT_PAGE=1;ht.LIST_DEFAULT_LIMIT=1e3;ht.LIST_MAX_LIMIT=1e3;ht.LIST_MAX_SEARCH_LENGTH=200;function Ox(t){let e=new URLSearchParams;return t.page!==void 0&&e.set("page",String(t.page)),t.limit!==void 0&&e.set("limit",String(t.limit)),e}function Tpe(t){let e=Ox(t);return t.search!==void 0&&e.set("search",t.search),e}async function Rpe(t){let e=[];for(let r=1;;r+=1){let n=await t(r,ht.LIST_MAX_LIMIT);if(e.push(...n.data),!n.hasMore||n.data.length===0)return e}}ht.FILE_RESOURCE_SOURCES=["upload","task","system","playbook"];function kpe(t){return t.origin?t.origin.type:t.tasks.length>0?"task":"upload"}ht.RUN_LIST_STATUSES=["running","success","failed","aborted"];ht.RUN_LIST_EXECUTION_KINDS=[Db.RunExecutionKind.FULL,Db.RunExecutionKind.DRAFT,Db.RunExecutionKind.SINGLE_STEP];function Npe({data:t,page:e,limit:r,total:n}){return{data:t,page:e,limit:r,total:n,hasMore:(e-1)*r+t.length<n}}});var Ux=m(In=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});In.AGENT_SESSION_EMAIL_LOGO_CID=void 0;In.emailTemplate=Da;In.buildPasswordResetEmail=Upe;In.buildOrgInvitationEmail=Mpe;In.buildOrgLoginEmail=xpe;In.buildAgentSessionEmail=Ppe;In.buildArtifactSubmissionEmail=Fpe;In.buildResourceShareEmail=$pe;var Ope="https://superglue.cloud/logos/sg_logo.png";function Ke(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function Da({body:t}){return`<!doctype html>
@@ -1793,7 +1793,7 @@ ${s}`;return}if(Oy(e,i,fke)){hke(e,o)&&(r.retry=e.toString("utf8",o));return}if(
1793
1793
  `);t.stack=r?`${r}
1794
1794
  ${o}`:i.stack}J.exports.fetch=function(e,r=void 0){return Vke(e,r).catch(n=>{throw KH?rY(n,KH):n&&typeof n=="object"&&Error.captureStackTrace(n,J.exports.fetch),n})};J.exports.Headers=lc().Headers;J.exports.Response=$A().Response;J.exports.Request=ju().Request;J.exports.FormData=nm().FormData;var{setGlobalOrigin:Jke,getGlobalOrigin:Wke}=Ew();J.exports.setGlobalOrigin=Jke;J.exports.getGlobalOrigin=Wke;var{CacheStorage:Zke}=FG(),{kConstruct:Kke}=je();J.exports.caches=new Zke(Kke);var{deleteCookie:Xke,getCookies:eNe,getSetCookies:tNe,setCookie:rNe,parseCookie:nNe}=KG();J.exports.deleteCookie=Xke;J.exports.getCookies=eNe;J.exports.getSetCookies=tNe;J.exports.setCookie=rNe;J.exports.parseCookie=nNe;var{parseMIMEType:iNe,serializeAMimeType:oNe}=wn();J.exports.parseMIMEType=iNe;J.exports.serializeAMimeType=oNe;var{CloseEvent:sNe,ErrorEvent:aNe,MessageEvent:cNe}=by(),{WebSocket:uNe,ping:lNe}=RH();J.exports.WebSocket=uNe;J.exports.CloseEvent=sNe;J.exports.ErrorEvent=aNe;J.exports.MessageEvent=cNe;J.exports.ping=lNe;J.exports.WebSocketStream=PH().WebSocketStream;J.exports.WebSocketError=Xv().WebSocketError;J.exports.request=XA(el.request);J.exports.stream=XA(el.stream);J.exports.pipeline=XA(el.pipeline);J.exports.connect=XA(el.connect);J.exports.upgrade=XA(el.upgrade);J.exports.MockClient=Mke;J.exports.MockCallHistory=xke;J.exports.MockCallHistoryLog=Lke;J.exports.MockPool=Fke;J.exports.MockAgent=Pke;J.exports.SnapshotAgent=$ke;J.exports.mockErrors=jke;var{EventSource:dNe}=ZH();J.exports.EventSource=dNe;function ANe(){globalThis.fetch=J.exports.fetch,globalThis.Headers=J.exports.Headers,globalThis.Response=J.exports.Response,globalThis.Request=J.exports.Request,globalThis.FormData=J.exports.FormData,globalThis.WebSocket=J.exports.WebSocket,globalThis.CloseEvent=J.exports.CloseEvent,globalThis.ErrorEvent=J.exports.ErrorEvent,globalThis.MessageEvent=J.exports.MessageEvent,globalThis.EventSource=J.exports.EventSource}J.exports.install=ANe});var oY=m(rl=>{"use strict";Object.defineProperty(rl,"__esModule",{value:!0});rl.SuperglueClient=rl.SuperglueHttpError=void 0;var tl=pr(),Nn=Tb(),pNe=hS(),fNe=gP(),hNe=pn(),Xo=qc(),gNe=sd(),tp=14400*1e3,ep;if(typeof globalThis.process<"u"&&globalThis.process.versions?.node)try{let{Agent:t}=nY();ep=new t({headersTimeout:tp,bodyTimeout:tp})}catch{}function iY(t){if(t?.aborted)throw t.reason??new DOMException("Aborted","AbortError")}var xy=class extends Error{constructor(e,r,n,i){super(e),this.status=r,this.code=n,this.details=i,this.name="SuperglueHttpError"}};rl.SuperglueHttpError=xy;var o_=class{constructor({apiKey:e,apiEndpoint:r,onInfrastructureError:n,refreshToken:i,sseTokenProvider:o,tokenProvider:s}){if(!e&&!s)throw new Error("SuperglueClient requires either apiKey or tokenProvider");this.tokenProvider=s??(async()=>e),this.apiEndpoint=r??"https://api.superglue.cloud",this.sseManager=new pNe.SSELogSubscriptionManager(this.apiEndpoint,o??this.tokenProvider,i),this.onInfrastructureError=n,this.refreshToken=i}async getApiKey(){return this.tokenProvider()}async fetchWithAuthRetry(e,r){let n=await this.getApiKey(),i=await e(n);if(i.status!==401||!this.refreshToken)return i;iY(r);let o=await this.refreshToken();return iY(r),!o||o===n?i:(i.body?.cancel(),e(o))}isInfrastructureError(e){return(0,hNe.isAbortError)(e)?!1:!!(e instanceof TypeError&&e.message.toLowerCase().includes("fetch")||e instanceof Error&&e.name==="TimeoutError")}async restRequest(e,r,n,i,o){let a=await(await this.restResponse({method:e,path:r,body:n,extraHeaders:i,requestInit:o})).text();if(a)return JSON.parse(a)}async restResponse({method:e,path:r,body:n,extraHeaders:i,requestInit:o}){let s=`${this.apiEndpoint.replace(/\/$/,"")}${r}`,a=n!=null,c=typeof FormData<"u"&&n instanceof FormData,u=d=>{let A={Authorization:`Bearer ${d}`,...i};return a&&!c&&e!=="GET"&&(A["Content-Type"]="application/json"),fetch(s,{...o,method:e,headers:A,body:a?c?n:JSON.stringify(n):void 0,signal:o?.signal??AbortSignal.timeout(tp),...ep?{dispatcher:ep}:{}})},l;try{l=await this.fetchWithAuthRetry(u,o?.signal)}catch(d){throw this.isInfrastructureError(d)&&this.onInfrastructureError?.(),d}if(!l.ok)throw await this.buildHttpError(l);return l}async uploadFiles(e,r){if(typeof r?.process!="boolean")throw new Error("process must be a boolean");if(e.length===0)return[];let n=e.map(l=>({...l,contentLength:l.contentLength??this.getUploadContentLength(l.content)})),o=(await this.restRequest("POST","/v1/files/uploads",{process:r.process,...r.allowUnprocessed?{allowUnprocessed:!0}:{},files:n.map(({fileName:l,contentType:d,contentLength:A})=>({fileName:l,contentLength:A,...d?{contentType:d}:{}}))})).data.files;if(o.length!==n.length)throw await Promise.all(o.map(l=>this.deleteFileUpload(l.id).catch(()=>{}))),new Error("Upload response did not match the selected files");let s=await Promise.allSettled(o.map(async(l,d)=>{let A=n[d],p=await fetch(l.uploadUrl,{method:"PUT",body:A.content,headers:A.contentType?{"Content-Type":A.contentType}:void 0,signal:AbortSignal.timeout(Math.min(tp,l.expiresIn*1e3))});if(!p.ok)throw new Error(`Upload failed for ${A.fileName}: ${p.status} ${p.statusText}`);return l.id})),a=s.flatMap(l=>l.status==="fulfilled"?[l.value]:[]),c=new Map;if(a.length>0)try{let l=await this.restRequest("POST","/v1/files/uploads/complete",{fileIds:a});c=new Map(l.data.files.map(d=>[d.id,d]))}catch(l){c=new Map(a.map(d=>[d,{id:d,fileName:n[o.findIndex(A=>A.id===d)]?.fileName||d,contentLength:n[o.findIndex(A=>A.id===d)]?.contentLength||0,status:"failed",error:l instanceof Error?l.message:String(l)}]))}let u=o.map((l,d)=>{let A=s[d],p=n[d];return A.status==="rejected"?{id:l.id,fileName:p.fileName,contentLength:p.contentLength,status:"failed",error:A.reason instanceof Error?A.reason.message:String(A.reason)}:c.get(l.id)||{id:l.id,fileName:p.fileName,contentLength:p.contentLength,status:"failed",error:"Upload completion returned no result"}});return await Promise.all(u.filter(l=>l.status==="failed").map(l=>this.deleteFileUpload(l.id).catch(()=>{}))),u}async deleteFileUpload(e){await this.restRequest("DELETE",`/v1/files/uploads/${encodeURIComponent(e)}`)}getUploadContentLength(e){return typeof e=="string"?new TextEncoder().encode(e).byteLength:e instanceof Uint8Array?e.byteLength:e.size}async buildHttpError(e){e.status>=500&&this.onInfrastructureError?.();let r=await e.text(),n=`HTTP ${e.status}: ${r}`,i,o;try{let s=JSON.parse(r);s&&typeof s=="object"&&!Array.isArray(s)&&(o=s),typeof s?.code=="string"&&(i=s.code);let a=s.error;typeof a=="string"?n=a:a&&typeof a=="object"&&(n=a.message||JSON.stringify(a))}catch{}return new xy(n,e.status,i,o)}async streamRequest(e,r,n){let i=e.includes("?")?"&":"?",o=`${this.apiEndpoint.replace(/\/$/,"")}${e}${i}stream=true`,s=u=>fetch(o,{method:"POST",headers:{Authorization:`Bearer ${u}`,Accept:"text/event-stream","Content-Type":"application/json"},body:JSON.stringify(r),signal:n??AbortSignal.timeout(tp),...ep?{dispatcher:ep}:{}}),a;try{a=await this.fetchWithAuthRetry(s,n)}catch(u){throw this.isInfrastructureError(u)&&this.onInfrastructureError?.(),u}if(!a.ok)throw await this.buildHttpError(a);if(!(a.headers.get("content-type")||"").includes("text/event-stream")){let u=await a.text();return u?JSON.parse(u):void 0}try{return await(0,fNe.consumeEventStreamResult)(a)}catch(u){throw this.isInfrastructureError(u)&&this.onInfrastructureError?.(),u}}async subscribeToLogsSSE(e={}){return this.sseManager.subscribeToLogs(e)}async disconnect(){await this.sseManager.disconnect()}async listMemoryNotes(e={}){let r=new URLSearchParams;e.scope&&r.set("scope",e.scope),e.query&&r.set("query",e.query);let n=r.toString();return(await this.restRequest("GET",`/v1/memory-notes${n?`?${n}`:""}`)).data}async createMemoryNote(e){return(await this.restRequest("POST","/v1/memory-notes",e)).data}async updateMemoryNote(e,r){return(await this.restRequest("PATCH",`/v1/memory-notes/${encodeURIComponent(e)}`,r)).data}async deleteMemoryNote(e){await this.restRequest("DELETE",`/v1/memory-notes/${encodeURIComponent(e)}`)}async clearMemoryNotes(e){return(await this.restRequest("DELETE",`/v1/memory-notes?scope=${e}`)).data.deleted}async getMe(){return this.restRequest("GET","/v1/me")}async completeOnboarding(){return this.restRequest("POST","/v1/me/onboarding/complete")}async runTool(e){let r=await this.restRequest("POST",`/v1/tools/${encodeURIComponent(e.toolId)}/run`,{inputs:e.payload,files:e.files,credentials:e.credentials,includeStepResultData:e.includeStepResultData,options:e.options,runId:e.runId,stateFixture:e.stateFixture},void 0,e.signal?{signal:e.signal}:void 0);return{success:r.status==="success",data:r.data,error:r.error,tool:r.tool,stepResults:r.stepResults?.map(n=>({...n}))||[],...r.fileArtifacts&&r.fileArtifacts.length>0?{fileArtifacts:r.fileArtifacts}:{},...r.metadata?.warnings?.length?{warnings:r.metadata.warnings}:{}}}async runToolConfig(e){let r=e.createRun?"/v1/tools/run?createRun=true":"/v1/tools/run",n=await this.restRequest("POST",r,{tool:e.tool,payload:e.payload,files:e.files,credentials:e.credentials,includeStepResultData:e.includeStepResultData,options:e.options,runId:e.runId,stateFixture:e.stateFixture,executionKind:e.executionKind,parentToolId:e.parentToolId,draftId:e.draftId},e.traceId?{"X-Trace-Id":e.traceId}:void 0,e.signal?{signal:e.signal}:void 0);return{success:n.status?n.status==="success":n.success??!1,data:n.data,error:n.error,tool:n.tool||e.tool,stepResults:n.stepResults?.map(o=>({...o}))||[],...n.fileArtifacts&&n.fileArtifacts.length>0?{fileArtifacts:n.fileArtifacts}:{},...n.metadata?.warnings?.length?{warnings:n.metadata.warnings}:{}}}async abortToolExecution(e){return{success:!0,runId:(await this.restRequest("POST",`/v1/runs/${encodeURIComponent(e)}/cancel`)).runId}}async executeStep({step:e,payload:r,files:n,previousResults:i,credentials:o,options:s,runId:a,systemIds:c,credentialId:u,systemAuth:l,createRun:d,parentToolId:A,stepIndex:p,stepId:h,signal:g,stream:S}){let B={step:e,payload:r,files:n,previousResults:i,credentials:o,options:s,runId:a,systemIds:c,credentialId:u,systemAuth:l,createRun:d,parentToolId:A,stepIndex:p,stepId:h};return S?this.streamRequest("/v1/tools/step/run",B,g):this.restRequest("POST","/v1/tools/step/run",B,void 0,g?{signal:g}:void 0)}async abortStep(e){return this.restRequest("POST","/v1/tools/step/abort",{runId:e})}async executeTransformOnly({outputTransform:e,outputSchema:r,inputSchema:n,payload:i,files:o,stepResults:s,options:a,runId:c,createRun:u,parentToolId:l,stepId:d,signal:A,stream:p}){let h={outputTransform:e,outputSchema:r,inputSchema:n,payload:i,files:o,stepResults:s,options:a,runId:c,createRun:u,parentToolId:l,stepId:d};return p?this.streamRequest("/v1/tools/transform/run",h,A):this.restRequest("POST","/v1/tools/transform/run",h,void 0,A?{signal:A}:void 0)}async createRun({toolId:e,toolConfig:r,toolResult:n,stepResults:i,toolPayload:o,status:s,error:a,startedAt:c,completedAt:u,executionKind:l,parentToolId:d,draftId:A}){return this.restRequest("POST","/v1/runs",{toolId:e,toolConfig:r,toolResult:n,stepResults:i,toolPayload:o,status:s,error:a,startedAt:(0,Xo.toUTCISOString)(c,"run.startedAt"),completedAt:(0,Xo.toUTCISOString)(u,"run.completedAt"),executionKind:l,parentToolId:d,draftId:A})}async checkRunLimit(){return(await this.restRequest("POST","/v1/runs/check-limit")).data}async extract({file:e,envelope:r}){if(!e)throw new Error("File must be provided for extract.");let n=new FormData;n.append("file",e);let i=r?"/v1/extract?envelope=true":"/v1/extract";return this.restRequest("POST",i,n)}mapOpenAPIRunToRun(e){let r={running:tl.RunStatus.RUNNING,success:tl.RunStatus.SUCCESS,failed:tl.RunStatus.FAILED,aborted:tl.RunStatus.ABORTED};return{runId:e.runId??e.id,toolId:e.toolId,tool:e.tool,systemIds:e.systemIds,status:r[e.status]??tl.RunStatus.FAILED,toolPayload:e.toolPayload,data:e.data,toolResult:e.data,error:e.error,stepResults:e.stepResults,options:e.options,requestSource:e.requestSource,traceId:e.traceId,resultStorageUri:e.resultStorageUri,userId:e.userId,userEmail:e.userEmail,userName:e.userName,metadata:{...e.metadata,executionKind:e.metadata?.executionKind??tl.RunExecutionKind.FULL},fileArtifacts:e.fileArtifacts}}mapOpenAPIScheduleToToolSchedule(e){return{...e,lastRunAt:e.lastRunAt?(0,Xo.requireUTCDate)(e.lastRunAt,"schedule.lastRunAt"):void 0,nextRunAt:(0,Xo.requireUTCDate)(e.nextRunAt,"schedule.nextRunAt"),createdAt:(0,Xo.requireUTCDate)(e.createdAt,"schedule.createdAt"),updatedAt:(0,Xo.requireUTCDate)(e.updatedAt,"schedule.updatedAt")}}async listRuns(e={}){let r=(0,Nn.createSearchListQueryParams)(e);e.toolId!==void 0&&r.set("toolId",e.toolId),e.searchUserIds?.length&&r.set("searchUserIds",e.searchUserIds.join(",")),e.includeTotal!==void 0&&r.set("includeTotal",String(e.includeTotal)),e.startedAfter!==void 0&&r.set("startedAfter",e.startedAfter instanceof Date?(0,Xo.toUTCISOString)(e.startedAfter,"run.startedAfter"):e.startedAfter),e.statuses!==void 0?r.set("status",e.statuses.join(",")):e.status!==void 0&&r.set("status",e.status),e.requestSources!==void 0&&r.set("requestSources",e.requestSources.join(",")),e.executionKinds!==void 0&&r.set("executionKinds",e.executionKinds.join(",")),e.userId!==void 0&&r.set("userId",e.userId),e.systemId!==void 0&&r.set("systemId",e.systemId),e.systemIds!==void 0&&r.set("systemIds",e.systemIds.join(","));let n=r.size>0?`?${r.toString()}`:"",i=await this.restRequest("GET",`/v1/runs${n}`,void 0,void 0,{signal:e.signal});return{data:i.data.map(o=>this.mapOpenAPIRunToRun(o)),total:i.total,page:i.page,limit:i.limit,hasMore:i.hasMore}}async getActivityCounts(e){let r=new URLSearchParams;e?.from&&r.set("from",e.from instanceof Date?(0,Xo.toUTCISOString)(e.from,"activity.from"):e.from),e?.to&&r.set("to",e.to instanceof Date?(0,Xo.toUTCISOString)(e.to,"activity.to"):e.to);let n=r.toString();return(await this.restRequest("GET",`/v1/activity/counts${n?`?${n}`:""}`,void 0,void 0,{signal:e?.signal})).counts}async getRun(e){try{let r=await this.restRequest("GET",`/v1/runs/${encodeURIComponent(e)}`);return this.mapOpenAPIRunToRun(r)}catch(r){if(r.message?.includes("404")||r.message?.includes("not found"))return null;throw r}}async getTool(e){try{return await this.restRequest("GET",`/v1/tools/${encodeURIComponent(e)}`)}catch(r){if(r.message?.includes("404")||r.message?.includes("not found")||r.message?.includes("403")||r.message?.includes("not allowed"))return null;throw r}}async getToolState(e){return(await this.restRequest("GET",`/v1/tools/${encodeURIComponent(e)}/state`)).state}async setToolState(e,r){await this.restRequest("PUT",`/v1/tools/${encodeURIComponent(e)}/state`,{state:r})}async deleteToolState(e){return(await this.restRequest("DELETE",`/v1/tools/${encodeURIComponent(e)}/state`)).deletedKeys}async archiveTool(e,r=!0){return this.updateTool(e,{archived:r})}async bulkArchiveTools(e,r=!0){return this.restRequest("POST","/v1/tools/bulk/archive",{ids:e,archived:r})}async bulkDeleteTools(e){return this.restRequest("POST","/v1/tools/bulk/delete",{ids:e})}async listTools(e={}){let r=(0,Nn.createListQueryParams)(e);e.includeArchived!==void 0&&r.set("includeArchived",String(e.includeArchived));let n=r.size>0?`?${r.toString()}`:"";return this.restRequest("GET",`/v1/tools${n}`)}async listAllTools(e={}){return(0,Nn.listAllPages)((r,n)=>this.listTools({...e,page:r,limit:n}))}async createTool(e,r){return this.restRequest("POST","/v1/tools",{...r,id:e})}async updateTool(e,r){return this.restRequest("PUT",`/v1/tools/${encodeURIComponent(e)}`,r)}async deleteTool(e){try{return await this.restRequest("DELETE",`/v1/tools/${encodeURIComponent(e)}`),!0}catch(r){if(r.message?.includes("404"))return!1;throw r}}async renameTool(e,r){return this.restRequest("POST",`/v1/tools/${encodeURIComponent(e)}/rename`,{newId:r})}async getWorkflow(e){return this.getTool(e)}async archiveWorkflow(e,r=!0){return this.upsertWorkflow(e,{archived:r})}async createWorkflow(e,r){return this.createTool(e,r)}async updateWorkflow(e,r){return this.updateTool(e,r)}async upsertWorkflow(e,r){return await this.getTool(e)?this.updateTool(e,r):this.createTool(e,r)}async deleteWorkflow(e){return this.deleteTool(e)}async renameWorkflow(e,r){return this.renameTool(e,r)}async listProjectSummaries(e={}){let r=(0,Nn.createSearchListQueryParams)(e);return r.set("includeResources","false"),e.includeArchived!==void 0&&r.set("includeArchived",String(e.includeArchived)),this.restRequest("GET",`/v1/projects?${r.toString()}`)}async listAllProjectSummaries({includeArchived:e}={}){return(0,Nn.listAllPages)((r,n)=>this.listProjectSummaries({page:r,limit:n,...e!==void 0?{includeArchived:e}:{}}))}async listAllProjectTasks(e){return(0,Nn.listAllPages)((r,n)=>this.restRequest("GET",`/v1/projects/${encodeURIComponent(e)}/tasks?page=${r}&limit=${n}`))}async saveProjectTask({projectId:e,taskId:r,input:n}){let i=`/v1/projects/${encodeURIComponent(e)}/tasks${r?`/${encodeURIComponent(r)}`:""}`;return(await this.restRequest(r?"PATCH":"POST",i,n)).data}async listSchedules(e={}){let r=(0,Nn.createListQueryParams)(e),n=r.size>0?`?${r.toString()}`:"",i=e.toolId?`/v1/tools/${encodeURIComponent(e.toolId)}/schedules${n}`:`/v1/schedules${n}`,o=await this.restRequest("GET",i);return{...o,data:o.data.map(s=>this.mapOpenAPIScheduleToToolSchedule(s))}}async listAllSchedules(e={}){return(0,Nn.listAllPages)((r,n)=>this.listSchedules({...e,page:r,limit:n}))}async getToolSchedule(e,r){try{let n=await this.restRequest("GET",`/v1/tools/${encodeURIComponent(e)}/schedules/${encodeURIComponent(r)}`);return this.mapOpenAPIScheduleToToolSchedule(n)}catch(n){if(n.message?.includes("404")||n.message?.includes("not found"))return null;throw n}}async createToolSchedule(e,r){let n=await this.restRequest("POST",`/v1/tools/${encodeURIComponent(e)}/schedules`,{...r,timezone:r.timezone||(0,gNe.getRuntimeTimezone)()});return this.mapOpenAPIScheduleToToolSchedule(n)}async updateToolSchedule(e,r,n){let i=await this.restRequest("PUT",`/v1/tools/${encodeURIComponent(e)}/schedules/${encodeURIComponent(r)}`,n);return this.mapOpenAPIScheduleToToolSchedule(i)}async deleteToolSchedule(e,r){return await this.restRequest("DELETE",`/v1/tools/${encodeURIComponent(e)}/schedules/${encodeURIComponent(r)}`),!0}async bulkSetSchedulesEnabled(e,r){return this.restRequest("POST","/v1/schedules/bulk/enable",{ids:e,enabled:r})}async bulkDeleteSchedules(e){return this.restRequest("POST","/v1/schedules/bulk/delete",{ids:e})}async listCredentials(e={}){let r=(0,Nn.createListQueryParams)(e);e.systemId!==void 0&&r.set("systemId",e.systemId);let n=r.size>0?`?${r.toString()}`:"";return this.restRequest("GET",`/v1/credentials${n}`)}async listAllCredentials(e={}){return(0,Nn.listAllPages)((r,n)=>this.listCredentials({...e,page:r,limit:n}))}async createCredentials(e){return(await this.restRequest("POST","/v1/credentials",e)).data}async replaceCredentials(e,r){return(await this.restRequest("PUT",`/v1/credentials/${encodeURIComponent(e)}`,{credentials:r})).data}async updateCredentials(e,r){return(await this.restRequest("PATCH",`/v1/credentials/${encodeURIComponent(e)}`,r)).data}async deleteCredentials(e){await this.restRequest("DELETE",`/v1/credentials/${encodeURIComponent(e)}`)}async setDefaultCredentials(e){await this.restRequest("POST",`/v1/credentials/${encodeURIComponent(e)}/default`)}async listSystems(e={}){let r=(0,Nn.createListQueryParams)(e),n=r.size>0?`?${r.toString()}`:"";return this.restRequest("GET",`/v1/systems${n}`)}async listAllSystems(e={}){return(0,Nn.listAllPages)((r,n)=>this.listSystems({...e,page:r,limit:n}))}async getSystem(e){return(await this.restRequest("GET",`/v1/systems/${encodeURIComponent(e)}`)).data}async createSystem(e){return(await this.restRequest("POST","/v1/systems",e)).data}async updateSystem(e,r){return(await this.restRequest("PATCH",`/v1/systems/${encodeURIComponent(e)}`,r)).data}async deleteSystem(e){return await this.restRequest("DELETE",`/v1/systems/${encodeURIComponent(e)}`),!0}async bulkDeleteSystems(e){return this.restRequest("POST","/v1/systems/bulk/delete",{ids:e})}async listManagedOAuthTemplateIds(){return(await this.restRequest("GET","/v1/oauth2/managed-apps")).data.templateIds}async createOAuthExchange(e){return(await this.restRequest("POST","/v1/oauth/exchanges",e)).data}async completeOAuthExchange(e,r){return(await this.restRequest("POST",`/v1/oauth/exchanges/${encodeURIComponent(e)}/complete`,r)).data}async searchSystemDocumentation(e,r){return(await this.restRequest("POST",`/v1/systems/${encodeURIComponent(e)}/documentation/search`,{keywords:r})).data}async triggerSystemDocumentationScrapeJob(e,r){return(await this.restRequest("POST",`/v1/systems/${encodeURIComponent(e)}/documentation/scrape`,r)).data}async fetchOpenApiSpec(e,r,n){return(await this.restRequest("POST",`/v1/systems/${encodeURIComponent(e)}/documentation/openapi`,{url:r,link:n?.link})).data}async uploadSystemDocumentationFiles(e,r,n){let i=await this.uploadFiles(r,{process:!0}),o=i.flatMap(s=>s.status==="uploaded"?[s.id]:[]);if(o.length>0)try{await this.restRequest("POST",`/v1/systems/${encodeURIComponent(e)}/documentation/files`,{fileIds:o,link:n?.link!==!1})}catch(s){throw await Promise.all(o.map(a=>this.deleteFileUpload(a).catch(()=>{}))),s}if(!n?.settle){let s=i.filter(a=>a.status==="failed");if(s.length>0)throw new Error(s.map(a=>a.error).join("; "))}return i}async listSystemDocumentationFiles(e,r){let n=new URLSearchParams;r?.length&&n.set("fileIds",r.join(","));let i=n.size>0?`?${n.toString()}`:"";return(await this.restRequest("GET",`/v1/systems/${encodeURIComponent(e)}/documentation/files${i}`)).data}async getSystemDocumentationFileContent(e,r,n){return(await this.restRequest("GET",`/v1/systems/${encodeURIComponent(e)}/documentation/files/${encodeURIComponent(r)}/content?processed=${n.processed}`)).data}async deleteSystemDocumentationFile(e,r){await this.restRequest("DELETE",`/v1/systems/${encodeURIComponent(e)}/documentation/files/${encodeURIComponent(r)}`)}async generateCredentialsLink(e){try{return{success:!0,credentialsUrl:(await this.restRequest("POST","/v1/authenticate",e||{})).data.credentialsUrl}}catch(r){return{success:!1,error:r.message}}}};rl.SuperglueClient=o_});var aY=m(ct=>{"use strict";Object.defineProperty(ct,"__esModule",{value:!0});ct.UnquotedKeyStrategy=ct.TripleQuoteStrategy=ct.TrailingCommaStrategy=ct.SingleQuoteStrategy=ct.PythonLiteralStrategy=ct.CommentStrategy=ct.ResilientJsonParser=ct.RepairStrategy=void 0;ct.parseJsonResilient=mNe;ct.parseJSON=yNe;ct.isValidJson=ENe;ct.prettyPrintJson=INe;ct.minifyJson=CNe;var Xn=class{validate(e){try{return JSON.parse(e),!0}catch{return!1}}};ct.RepairStrategy=Xn;var Ly=class extends Xn{constructor(){super(...arguments),this.name="TripleQuoteRepair",this.description="Converts triple-quoted strings to proper JSON, parsing nested JSON content"}canApply(e){return/"""/.test(e)}apply(e){return e.replace(/"""([\s\S]*?)"""/g,(r,n)=>{let i=n.trim();if(i.startsWith("{")&&i.endsWith("}")||i.startsWith("[")&&i.endsWith("]"))try{let s=JSON.parse(i);return JSON.stringify(s)}catch{return`"${n.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")}"`}return`"${n.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")}"`})}};ct.TripleQuoteStrategy=Ly;var Py=class extends Xn{constructor(){super(...arguments),this.name="PythonLiteralRepair",this.description="Converts Python literals to JavaScript equivalents"}canApply(e){return/\b(None|True|False)\b/.test(e)}apply(e){return e.replace(/\bNone\b/g,"null").replace(/\bTrue\b/g,"true").replace(/\bFalse\b/g,"false")}};ct.PythonLiteralStrategy=Py;var Fy=class extends Xn{constructor(){super(...arguments),this.name="TrailingCommaRepair",this.description="Removes trailing commas from objects and arrays"}canApply(e){return/,\s*[}\]]/.test(e)}apply(e){return e.replace(/,(\s*[}\]])/g,"$1")}};ct.TrailingCommaStrategy=Fy;var $y=class extends Xn{constructor(){super(...arguments),this.name="SingleQuoteRepair",this.description="Converts single quotes to double quotes"}canApply(e){return/[{,]\s*'[^']*'\s*:/.test(e)||/:\s*'[^']*'/.test(e)}apply(e){let r=e.replace(/([{,]\s*)'([^']+)'(\s*:)/g,'$1"$2"$3');return r=r.replace(/(:\s*)'([^']+)'(\s*[,}])/g,'$1"$2"$3'),r}};ct.SingleQuoteStrategy=$y;var jy=class extends Xn{constructor(){super(...arguments),this.name="UnquotedKeyRepair",this.description="Adds quotes to unquoted object keys"}canApply(e){return/[{,]\s*[a-zA-Z_$][a-zA-Z0-9_$]*\s*:/.test(e)}apply(e){return e.replace(/([{,]\s*)([a-zA-Z_$][a-zA-Z0-9_$]*)(\s*:)/g,'$1"$2"$3')}};ct.UnquotedKeyStrategy=jy;var qy=class extends Xn{constructor(){super(...arguments),this.name="CommentRemoval",this.description="Removes JavaScript-style comments"}canApply(e){return/\/\/.*$|\/\*[\s\S]*?\*\//m.test(e)}apply(e){let r=e.replace(/\/\/.*$/gm,"");return r=r.replace(/\/\*[\s\S]*?\*\//g,""),r}};ct.CommentStrategy=qy;var s_=class extends Xn{constructor(){super(...arguments),this.name="UnescapedControlCharactersRepair",this.description="Escapes unescaped control characters (newlines, tabs, etc.) in JSON strings"}canApply(e){try{return JSON.parse(e),!1}catch(r){let n=r.message||"";return n.includes("control character")||n.includes("Bad control")||n.includes("Unexpected token")&&/[\n\r\t]/.test(e)}}apply(e){let r="",n=!1,i=!1;for(let o=0;o<e.length;o++){let s=e[o],a=o>0?e[o-1]:"";if(i){r+=s,i=!1;continue}if(s==="\\"&&n){r+=s,i=!0;continue}if(s==='"'&&a!=="\\"){n=!n,r+=s;continue}if(n)switch(s){case`
1795
1795
  `:r+="\\n";break;case"\r":r+="\\r";break;case" ":r+="\\t";break;case"\b":r+="\\b";break;case"\f":r+="\\f";break;default:let c=s.charCodeAt(0);c<32?r+="\\u"+("0000"+c.toString(16)).slice(-4):r+=s}else r+=s}return r}},a_=class extends Xn{constructor(){super(...arguments),this.name="TrailingCharactersRepair",this.description="Removes trailing characters after valid JSON structure"}canApply(e){let r=e.trim();if(!r.startsWith("{")&&!r.startsWith("["))return!1;let n=0,i=0,o=!1,s=!1;for(let a=0;a<r.length;a++){let c=r[a];if(o)s?s=!1:c==="\\"?s=!0:c==='"'&&(o=!1);else if(c==='"')o=!0;else if(c==="{")n++;else if(c==="}"){if(n--,n===0&&i===0&&a>0&&a<r.length-1)return!0}else if(c==="[")i++;else if(c==="]"&&(i--,i===0&&n===0&&a>0&&a<r.length-1))return!0}return!1}apply(e){let r=e.trim(),n=0,i=0,o=!1,s=!1,a=-1;for(let c=0;c<r.length;c++){let u=r[c];if(o)s?s=!1:u==="\\"?s=!0:u==='"'&&(o=!1);else if(u==='"')o=!0;else if(u==="{")n++;else if(u==="}"){if(n--,n===0&&i===0&&c>0){a=c;break}}else if(u==="[")i++;else if(u==="]"&&(i--,i===0&&n===0&&c>0)){a=c;break}}return a>0&&a<r.length-1?r.substring(0,a+1):e}},nl=class{constructor(e={}){this.strategies=[],this.repairLog=[],this.options={attemptRepair:!0,maxDepth:10,preserveStringsOnFailure:!1,logRepairs:!1,...e},this.initializeDefaultStrategies(),e.customStrategies&&this.strategies.push(...e.customStrategies)}initializeDefaultStrategies(){this.strategies=[new Ly,new $y,new s_,new a_,new Py,new Fy,new jy,new qy]}parse(e){let r=Date.now();this.repairLog=[];let n=e instanceof Buffer?e.toString("utf8"):String(e);try{return{success:!0,data:JSON.parse(n),metadata:{parseTime:Date.now()-r,strategiesApplied:[]}}}catch(s){if(!this.options.attemptRepair)return{success:!1,error:`JSON parse error: ${s}`,metadata:{parseTime:Date.now()-r}}}let i=n,o=[];for(let s of this.strategies)if(s.canApply(i)){let a=i;if(i=s.apply(i),a!==i){o.push(s.name),this.repairLog.push(s.description),this.options.logRepairs&&console.log(`Applied ${s.name}: ${s.description}`);try{return{success:!0,data:JSON.parse(i),repairs:this.repairLog,metadata:{parseTime:Date.now()-r,strategiesApplied:o}}}catch{}}}try{return{success:!0,data:JSON.parse(i),repairs:this.repairLog,metadata:{parseTime:Date.now()-r,strategiesApplied:o}}}catch(s){let a=this.aggressiveFallback(i);return a.success?{...a,repairs:[...this.repairLog,"Applied aggressive fallback"],metadata:{parseTime:Date.now()-r,strategiesApplied:[...o,"AggressiveFallback"]}}:{success:!1,error:`Failed to parse JSON after applying ${o.length} strategies: ${s}`,repairs:this.repairLog,metadata:{parseTime:Date.now()-r,strategiesApplied:o}}}}aggressiveFallback(e){try{let r=e.indexOf("{"),n=e.indexOf("[");if(r===-1&&n===-1)return{success:!1,error:"No JSON-like structure found"};let i=r===-1?n:n===-1?r:Math.min(r,n),o=e.substring(i);for(let a of this.strategies)a.canApply(o)&&(o=a.apply(o));return{success:!0,data:JSON.parse(o)}}catch(r){return{success:!1,error:`Aggressive fallback failed: ${r}`}}}addStrategy(e){this.strategies.push(e)}removeStrategy(e){this.strategies=this.strategies.filter(r=>r.name!==e)}getStrategies(){return this.strategies.map(e=>e.name)}};ct.ResilientJsonParser=nl;var sY=new nl;function mNe(t,e){return(e?new nl(e):sY).parse(t)}function yNe(t){let e=sY.parse(t);if(e.success)return e.repairs&&e.repairs.length>0&&console.log("JSON parsed with repairs:",e.repairs),e.data;throw new Error(`Failed to parse JSON: ${e.error}`)}function ENe(t){try{return JSON.parse(t),!0}catch{return!1}}function INe(t,e=2){return JSON.stringify(t,null,e)}function CNe(t){let r=new nl().parse(t);if(r.success)return JSON.stringify(r.data);throw new Error("Cannot minify invalid JSON")}});var dr=m(Z=>{"use strict";var bNe=Z&&Z.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),ce=Z&&Z.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&bNe(e,t,r)};Object.defineProperty(Z,"__esModule",{value:!0});Z.SSELogSubscriptionManager=Z.SuperglueHttpError=Z.SuperglueClient=void 0;ce(uN(),Z);ce(_M(),Z);ce(FM(),Z);ce(jM(),Z);ce(YM(),Z);ce(VM(),Z);ce(WM(),Z);ce(Td(),Z);ce(Tx(),Z);ce(Rx(),Z);ce(kx(),Z);ce(Nx(),Z);ce(Tb(),Z);ce(Ux(),Z);ce(Lx(),Z);ce(Px(),Z);ce(Fx(),Z);ce(Nb(),Z);ce(xb(),Z);ce(jx(),Z);ce(qx(),Z);ce(Gx(),Z);ce(yp(),Z);ce(Yx(),Z);ce(Vx(),Z);ce(Wx(),Z);ce(Zx(),Z);ce(eL(),Z);ce(hL(),Z);ce(Yb(),Z);ce(Ud(),Z);ce(Hb(),Z);ce(IL(),Z);ce(bL(),Z);ce(wL(),Z);ce(hb(),Z);ce(OL(),Z);ce(ML(),Z);ce(eg(),Z);ce(JL(),Z);ce(tP(),Z);ce(rP(),Z);ce(dS(),Z);ce(sP(),Z);ce(aP(),Z);ce(dP(),Z);ce(pP(),Z);ce(pr(),Z);ce(pn(),Z);ce(fP(),Z);ce(hP(),Z);ce(gg(),Z);ce(qc(),Z);ce(sd(),Z);var cY=oY();Object.defineProperty(Z,"SuperglueClient",{enumerable:!0,get:function(){return cY.SuperglueClient}});Object.defineProperty(Z,"SuperglueHttpError",{enumerable:!0,get:function(){return cY.SuperglueHttpError}});var SNe=hS();Object.defineProperty(Z,"SSELogSubscriptionManager",{enumerable:!0,get:function(){return SNe.SSELogSubscriptionManager}});ce(aY(),Z)});var vE=require("commander");var vr=fe(require("fs")),dY=fe(require("os")),es=fe(require("path")),rp=fe(dr()),uY=new Set(["runner","builder","admin"]),lY={output:{mode:"stdout",directory:".superglue/output"},preset:"admin"};function ts(t){let e=es.join(process.cwd(),".superglue"),r=dY.homedir();if(!r)return e;let n=es.join(r,".superglue");return t===!0?e:t===!1?n:vr.existsSync(es.join(e,"config.json"))?e:n}function c_(t){return es.join(ts(t),"config.json")}function zy(t){let e=c_(t);if(!vr.existsSync(e))return{};try{return JSON.parse(vr.readFileSync(e,"utf-8"))}catch{return{}}}function il(t){let e=zy(),r=t.apiKey||(0,rp.readProcessEnvironmentValue)("SUPERGLUE_API_KEY")||e.apiKey||"",n=t.endpoint||(0,rp.readProcessEnvironmentValue)("SUPERGLUE_API_ENDPOINT")||e.endpoint||"https://api.superglue.cloud",i=(0,rp.readProcessEnvironmentValue)("SUPERGLUE_WEB_ENDPOINT")||e.webEndpoint||n.replace(/:3002\b/,":3001").replace(/api\.superglue/,"app.superglue"),o=(0,rp.readProcessEnvironmentValue)("SUPERGLUE_CLI_PRESET"),s=o&&uY.has(o)?o:e.preset&&uY.has(e.preset)?e.preset:"admin";return{...lY,...e,apiKey:r,endpoint:n,webEndpoint:i,preset:s,output:{...lY.output,...e.output}}}function Gy(t,e){let r=ts(e);vr.existsSync(r)||vr.mkdirSync(r,{recursive:!0}),vr.writeFileSync(es.join(r,"config.json"),JSON.stringify(t,null,2)+`
1796
- `,{mode:384})}function Hy(t,e){let r=es.join(ts(e),"drafts");if(vr.existsSync(r)||vr.mkdirSync(r,{recursive:!0}),t.output.mode==="stdout+file"){let n=es.resolve(t.output.directory);vr.existsSync(n)||vr.mkdirSync(n,{recursive:!0})}}var h_=fe(dr());var u_=fe(require("readline"));var fY=require("child_process"),hY=require("util");var AY={name:"@superglue/cli",version:"1.1.189",bin:{sg:"./dist/cli.js"},files:[".claude-plugin/","dist/","skills/","LICENSE"],dependencies:{commander:"15.0.0-0","fast-json-patch":"3.1.1"},devDependencies:{"@superglue/shared":"file:../shared","@types/node":"25.5.0",tsup:"8.5.1",typescript:"5.8.3"},scripts:{build:"tsup && (cp -r skills dist/ 2>/dev/null || true)",dev:"tsup --watch","type-check":"tsc --noEmit",prepublishOnly:"npm run build"},publishConfig:{access:"public"}};var BNe=(0,hY.promisify)(fY.exec),Ar=AY.version;function pY(t){let e=t.match(/^(\d+)(?:-(.+))?$/);return e?{numeric:parseInt(e[1],10),prerelease:e[2]||null}:{numeric:0,prerelease:t}}function Vy(t,e){let r=t.split("."),n=e.split("."),i=Math.max(r.length,n.length);for(let o=0;o<i;o++){let s=pY(r[o]||"0"),a=pY(n[o]||"0");if(s.numeric<a.numeric)return-1;if(s.numeric>a.numeric||s.prerelease===null&&a.prerelease!==null)return 1;if(s.prerelease!==null&&a.prerelease===null)return-1;if(s.prerelease!==null&&a.prerelease!==null){if(s.prerelease<a.prerelease)return-1;if(s.prerelease>a.prerelease)return 1}}return 0}async function Jy(){try{let t=await fetch("https://registry.npmjs.org/@superglue/cli/latest",{signal:AbortSignal.timeout(5e3)});return t.ok&&(await t.json()).version||null}catch{return null}}var Yy=null;function gY(){ie()&&(Yy=Jy())}async function mY(){if(!(!ie()||!Yy)){try{let t=new Promise(r=>{setTimeout(()=>r(null),2e3).unref()}),e=await Promise.race([Yy,t]);e&&Vy(Ar,e)<0&&(console.error(""),console.error(`${y.cyan}${y.bold} Update available: ${Ar} \u2192 ${e}${y.reset}`),console.error(`${y.cyan} Run ${y.bold}sg update${y.reset}${y.cyan} to upgrade${y.reset}`),console.error(""))}catch{}Yy=null}}async function yY(){let t=await Jy();if(!t)return{success:!1,message:"Could not fetch latest version from npm"};if(Vy(Ar,t)>=0)return{success:!0,message:`Already on latest version (${Ar})`};try{return await BNe("npm install -g @superglue/cli@latest"),{success:!0,message:`Updated from ${Ar} to ${t}`}}catch(e){return{success:!1,message:`Update failed: ${e.message}. Try manually: npm install -g @superglue/cli@latest`}}}var ie=()=>process.argv.includes("--table")&&process.stdout.isTTY,_r=()=>process.argv.includes("--full"),y={reset:"\x1B[0m",bold:"\x1B[1m",dim:"\x1B[2m",italic:"\x1B[3m",underline:"\x1B[4m",red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m",cyan:"\x1B[36m",white:"\x1B[37m",gray:"\x1B[90m",bgRed:"\x1B[41m",bgGreen:"\x1B[42m",bgYellow:"\x1B[43m",bgBlue:"\x1B[44m",bgMagenta:"\x1B[45m",bgCyan:"\x1B[46m"};function EY(t,e){let r=e||t;return`\x1B]8;;${t}\x07${y.underline}${y.cyan}${r}${y.reset}\x1B]8;;\x07`}function IY(){if(!ie())return;let t=y.reset,e=y.dim,r="\x1B[47;30m",n=[" #@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@- "," =@@@- @@@@ "," @@@ @@% "," -@@ @@@@= @@@ @@@ @@@@@#@ @@@@@@@ @@@@@@@ @@@@@@ @@@ @@@ @@@ @@@@@@* %@@ "," @@ @@@ *@ @@@ @@@ @@@ :@@ @@@ @@@ -@@ @@@ @% @@@ @@@ @@@ @@* @@# "," #@@ @@@# @@@ @@@ @@@ :@@ @@@ @@@ -@@ @@@ @@@ @@@ @@@ @@* @@ "," @@- @@@@= @@@ @@@ @@@@@@@ @@@@@@ @@@@@@@ @@@ @@% @@@ @@@ @@@ @@@@@. @@."," #@% .@@@@ @@@ @@@ @@@ @@@ @@@ -@@ @@@ @@% @@@ @@@ @@@ @@* @@ "," @@ @ @@@ @@@ @@@ @@@ @@@ @@@ -@@ @@@ @@% @@@ @@@ @@@ @@* *@@ "," -@@ @@@@= @@@@@@ @@@ @@@@@@@ @@@ -@@ @@@@@@ @@@@@@% @@@@@@. @@@@@@* #@@ "," :@@* @@@ "," %@@@ =@@@. "," :@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@% "];console.log(""),n.forEach(i=>{let o=i.search(/\S/),s=i.length-[...i].reverse().join("").search(/\S/)-1;if(o===-1)return console.log(" "+i);let a=i.slice(0,o),c=i.slice(o,s+1).split("").map(l=>l===" "?" ":"\u2588").join(""),u=i.slice(s+1);console.log(` ${a}${r}${c}${t}${u}`)}),console.log(` ${e} CLI v${Ar}${t}`),console.log("")}function ot(t){if(!ie())return{stop:()=>{},update:()=>{},log:()=>{}};let e=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"],r=0,n=t,i=()=>process.stdout.write("\r\x1B[2K"),o=()=>{process.stdout.write(`\r ${y.cyan}${e[r++%e.length]}${y.reset} ${n}`)},s=setInterval(o,80);return{update:a=>{n=a},log:a=>{i(),console.log(` ${y.dim}\u2502${y.reset} ${a}`),o()},stop:a=>{clearInterval(s),i(),a&&console.log(` ${a}`)}}}function K(t){ie()?Wy(t):console.log(JSON.stringify(t,null,2))}function Be(t,e){ie()?(console.log(` ${y.green}\u2713${y.reset} ${t}`),e&&Wy(e,4)):console.log(JSON.stringify({success:!0,message:t,...e&&typeof e=="object"?e:{data:e}}))}function _(t,e){ie()?(console.error(` ${y.red}\u2717${y.reset} ${t}`),e&&Wy(e,4)):console.error(JSON.stringify({success:!1,error:t,details:e}))}function CY(t){ie()&&console.log(` ${y.yellow}\u26A0${y.reset} ${t}`)}function tr(t){ie()&&console.log(` ${y.dim}${t}${y.reset}`)}function rs(t){ie()&&(console.log(`
1796
+ `,{mode:384})}function Hy(t,e){let r=es.join(ts(e),"drafts");if(vr.existsSync(r)||vr.mkdirSync(r,{recursive:!0}),t.output.mode==="stdout+file"){let n=es.resolve(t.output.directory);vr.existsSync(n)||vr.mkdirSync(n,{recursive:!0})}}var h_=fe(dr());var u_=fe(require("readline"));var fY=require("child_process"),hY=require("util");var AY={name:"@superglue/cli",version:"1.1.190",bin:{sg:"./dist/cli.js"},files:[".claude-plugin/","dist/","skills/","LICENSE"],dependencies:{commander:"15.0.0-0","fast-json-patch":"3.1.1"},devDependencies:{"@superglue/shared":"file:../shared","@types/node":"25.5.0",tsup:"8.5.1",typescript:"5.8.3"},scripts:{build:"tsup && (cp -r skills dist/ 2>/dev/null || true)",dev:"tsup --watch","type-check":"tsc --noEmit",prepublishOnly:"npm run build"},publishConfig:{access:"public"}};var BNe=(0,hY.promisify)(fY.exec),Ar=AY.version;function pY(t){let e=t.match(/^(\d+)(?:-(.+))?$/);return e?{numeric:parseInt(e[1],10),prerelease:e[2]||null}:{numeric:0,prerelease:t}}function Vy(t,e){let r=t.split("."),n=e.split("."),i=Math.max(r.length,n.length);for(let o=0;o<i;o++){let s=pY(r[o]||"0"),a=pY(n[o]||"0");if(s.numeric<a.numeric)return-1;if(s.numeric>a.numeric||s.prerelease===null&&a.prerelease!==null)return 1;if(s.prerelease!==null&&a.prerelease===null)return-1;if(s.prerelease!==null&&a.prerelease!==null){if(s.prerelease<a.prerelease)return-1;if(s.prerelease>a.prerelease)return 1}}return 0}async function Jy(){try{let t=await fetch("https://registry.npmjs.org/@superglue/cli/latest",{signal:AbortSignal.timeout(5e3)});return t.ok&&(await t.json()).version||null}catch{return null}}var Yy=null;function gY(){ie()&&(Yy=Jy())}async function mY(){if(!(!ie()||!Yy)){try{let t=new Promise(r=>{setTimeout(()=>r(null),2e3).unref()}),e=await Promise.race([Yy,t]);e&&Vy(Ar,e)<0&&(console.error(""),console.error(`${y.cyan}${y.bold} Update available: ${Ar} \u2192 ${e}${y.reset}`),console.error(`${y.cyan} Run ${y.bold}sg update${y.reset}${y.cyan} to upgrade${y.reset}`),console.error(""))}catch{}Yy=null}}async function yY(){let t=await Jy();if(!t)return{success:!1,message:"Could not fetch latest version from npm"};if(Vy(Ar,t)>=0)return{success:!0,message:`Already on latest version (${Ar})`};try{return await BNe("npm install -g @superglue/cli@latest"),{success:!0,message:`Updated from ${Ar} to ${t}`}}catch(e){return{success:!1,message:`Update failed: ${e.message}. Try manually: npm install -g @superglue/cli@latest`}}}var ie=()=>process.argv.includes("--table")&&process.stdout.isTTY,_r=()=>process.argv.includes("--full"),y={reset:"\x1B[0m",bold:"\x1B[1m",dim:"\x1B[2m",italic:"\x1B[3m",underline:"\x1B[4m",red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m",cyan:"\x1B[36m",white:"\x1B[37m",gray:"\x1B[90m",bgRed:"\x1B[41m",bgGreen:"\x1B[42m",bgYellow:"\x1B[43m",bgBlue:"\x1B[44m",bgMagenta:"\x1B[45m",bgCyan:"\x1B[46m"};function EY(t,e){let r=e||t;return`\x1B]8;;${t}\x07${y.underline}${y.cyan}${r}${y.reset}\x1B]8;;\x07`}function IY(){if(!ie())return;let t=y.reset,e=y.dim,r="\x1B[47;30m",n=[" #@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@- "," =@@@- @@@@ "," @@@ @@% "," -@@ @@@@= @@@ @@@ @@@@@#@ @@@@@@@ @@@@@@@ @@@@@@ @@@ @@@ @@@ @@@@@@* %@@ "," @@ @@@ *@ @@@ @@@ @@@ :@@ @@@ @@@ -@@ @@@ @% @@@ @@@ @@@ @@* @@# "," #@@ @@@# @@@ @@@ @@@ :@@ @@@ @@@ -@@ @@@ @@@ @@@ @@@ @@* @@ "," @@- @@@@= @@@ @@@ @@@@@@@ @@@@@@ @@@@@@@ @@@ @@% @@@ @@@ @@@ @@@@@. @@."," #@% .@@@@ @@@ @@@ @@@ @@@ @@@ -@@ @@@ @@% @@@ @@@ @@@ @@* @@ "," @@ @ @@@ @@@ @@@ @@@ @@@ @@@ -@@ @@@ @@% @@@ @@@ @@@ @@* *@@ "," -@@ @@@@= @@@@@@ @@@ @@@@@@@ @@@ -@@ @@@@@@ @@@@@@% @@@@@@. @@@@@@* #@@ "," :@@* @@@ "," %@@@ =@@@. "," :@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@% "];console.log(""),n.forEach(i=>{let o=i.search(/\S/),s=i.length-[...i].reverse().join("").search(/\S/)-1;if(o===-1)return console.log(" "+i);let a=i.slice(0,o),c=i.slice(o,s+1).split("").map(l=>l===" "?" ":"\u2588").join(""),u=i.slice(s+1);console.log(` ${a}${r}${c}${t}${u}`)}),console.log(` ${e} CLI v${Ar}${t}`),console.log("")}function ot(t){if(!ie())return{stop:()=>{},update:()=>{},log:()=>{}};let e=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"],r=0,n=t,i=()=>process.stdout.write("\r\x1B[2K"),o=()=>{process.stdout.write(`\r ${y.cyan}${e[r++%e.length]}${y.reset} ${n}`)},s=setInterval(o,80);return{update:a=>{n=a},log:a=>{i(),console.log(` ${y.dim}\u2502${y.reset} ${a}`),o()},stop:a=>{clearInterval(s),i(),a&&console.log(` ${a}`)}}}function K(t){ie()?Wy(t):console.log(JSON.stringify(t,null,2))}function Be(t,e){ie()?(console.log(` ${y.green}\u2713${y.reset} ${t}`),e&&Wy(e,4)):console.log(JSON.stringify({success:!0,message:t,...e&&typeof e=="object"?e:{data:e}}))}function _(t,e){ie()?(console.error(` ${y.red}\u2717${y.reset} ${t}`),e&&Wy(e,4)):console.error(JSON.stringify({success:!1,error:t,details:e}))}function CY(t){ie()&&console.log(` ${y.yellow}\u26A0${y.reset} ${t}`)}function tr(t){ie()&&console.log(` ${y.dim}${t}${y.reset}`)}function rs(t){ie()&&(console.log(`
1797
1797
  ${y.bold}${y.cyan}${t}${y.reset}`),console.log(` ${y.dim}${"\u2500".repeat(t.length)}${y.reset}`))}function Dr(t,e,r){if(!ie()){console.log(JSON.stringify({success:!0,total:r?.total??t.length,items:t}));return}if(t.length===0){console.log(`
1798
1798
  ${y.dim}0 results${y.reset}
1799
1799
  `);return}let n=e||Object.keys(t[0]),i=_r()?1/0:60,o=n.map(l=>Math.min(i,Math.max(l.length,...t.map(d=>String(d[l]??"").replace(/[\n\r]+/g," ").trim().length))));console.log("");let s=n.map((l,d)=>`${y.bold}${y.cyan}${l.toUpperCase().padEnd(o[d])}${y.reset}`).join(" ");console.log(` ${s}`);let a=o.map(l=>`${y.dim}${"\u2500".repeat(l)}${y.reset}`).join(`${y.dim}\u2500\u2500${y.reset}`);console.log(` ${a}`);for(let l of t){let d=n.map((A,p)=>{let h=String(l[A]??"").replace(/[\n\r]+/g," ").trim();if(h.length>i){let S=`\u2026 (${h.length})`;h=h.slice(0,Math.max(0,i-S.length))+`${y.dim}${S}${y.reset}`}return A==="status"?`${{success:y.green,running:y.yellow,failed:y.red,aborted:y.red,error:y.red,pending:y.dim}[h.toLowerCase()]||""}${h.padEnd(o[p])}${y.reset}`:h.padEnd(o[p])}).join(" ");console.log(` ${d}`)}let c=r?.total??t.length,u=c===t.length?`${t.length} result${t.length===1?"":"s"}`:`${t.length} of ${c} result${c===1?"":"s"}`;console.log(`