@contractspec/example.pocket-family-office 1.44.0 → 1.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/blueprint.d.ts +1 -2
- package/dist/blueprint.d.ts.map +1 -1
- package/dist/index.js +20 -20
- package/dist/workflows/generate-openbanking-overview.d.ts.map +1 -1
- package/dist/workflows/refresh-openbanking-balances.d.ts.map +1 -1
- package/dist/workflows/sync-openbanking-accounts.d.ts.map +1 -1
- package/dist/workflows/upcoming-payments-reminder.d.ts.map +1 -1
- package/package.json +14 -6
package/dist/blueprint.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { AppBlueprintSpec } from '@contractspec/lib.contracts/app-config/spec';
|
|
2
|
-
import type { AppBlueprintRegistry } from '@contractspec/lib.contracts/app-config/spec';
|
|
1
|
+
import type { AppBlueprintRegistry, AppBlueprintSpec } from '@contractspec/lib.contracts/app-config/spec';
|
|
3
2
|
export declare const pocketFamilyOfficeBlueprint: AppBlueprintSpec;
|
|
4
3
|
export declare function registerPocketFamilyOfficeBlueprint(registry: AppBlueprintRegistry): AppBlueprintRegistry;
|
|
5
4
|
//# sourceMappingURL=blueprint.d.ts.map
|
package/dist/blueprint.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blueprint.d.ts","sourceRoot":"","sources":["../src/blueprint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"blueprint.d.ts","sourceRoot":"","sources":["../src/blueprint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,gBAAgB,EACjB,MAAM,6CAA6C,CAAC;AAUrD,eAAO,MAAM,2BAA2B,EAAE,gBAgMzC,CAAC;AAEF,wBAAgB,mCAAmC,CACjD,QAAQ,EAAE,oBAAoB,GAC7B,oBAAoB,CAEtB"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var k9=Object.defineProperty;var _4=(J,X)=>{for(var H in X)k9(J,H,{get:X[H],enumerable:!0,configurable:!0,set:(W)=>X[H]=()=>W})};var A={Idea:"idea",InCreation:"in_creation",Experimental:"experimental",Beta:"beta",Stable:"stable",Deprecated:"deprecated"},V={PlatformCore:"platform.core",PlatformSigil:"platform.sigil",PlatformMarketplace:"platform.marketplace",PlatformMessaging:"platform.messaging",PlatformContent:"platform.content",PlatformFeatureFlags:"platform.featureflags",PlatformFinance:"platform.finance"};var R={Spots:"spots",Collectivity:"collectivity",Marketplace:"marketplace",Sellers:"sellers",Auth:"auth",Login:"login",Signup:"signup",Guide:"guide",Docs:"docs",I18n:"i18n",Incident:"incident",Automation:"automation",Hygiene:"hygiene"};var Z=(J,X)=>({key:J,version:X}),j9={meta:{key:"pocket-family-office.app",version:1,appId:"pocket-family-office",title:"Pocket Family Office",description:"Household finance automation: ingest documents, track bills, remind payments, and summarise cashflow.",domain:"finance",owners:[V.PlatformFinance],tags:[R.Guide,"finance","automation"],stability:A.Experimental},capabilities:{enabled:[Z("ai.chat",1),Z("ai.embeddings",1),Z("vector-db.search",1),Z("vector-db.storage",1),Z("storage.objects",1),Z("email.inbound",1),Z("email.transactional",1),Z("calendar.events",1),Z("sms.outbound",1),Z("ai.voice.synthesis",1),Z("payments.psp",1),Z("openbanking.accounts.read",1),Z("openbanking.transactions.read",1),Z("openbanking.balances.read",1)]},integrationSlots:[{slotId:"primaryLLM",requiredCategory:"ai-llm",allowedModes:["managed","byok"],requiredCapabilities:[Z("ai.chat",1)],required:!0,description:"Chat completion provider powering summarisation, explanations, and insights."},{slotId:"primaryVectorDb",requiredCategory:"vector-db",allowedModes:["managed","byok"],requiredCapabilities:[Z("vector-db.search",1)],required:!0,description:"Vector database storing embeddings for financial documents and email threads."},{slotId:"primaryStorage",requiredCategory:"storage",allowedModes:["managed","byok"],requiredCapabilities:[Z("storage.objects",1)],required:!0,description:"Object storage used for raw uploads and normalised documents."},{slotId:"primaryOpenBanking",requiredCategory:"open-banking",allowedModes:["byok"],requiredCapabilities:[Z("openbanking.accounts.read",1),Z("openbanking.transactions.read",1),Z("openbanking.balances.read",1)],required:!0,description:"Powens BYOK connection powering bank account, transaction, and balance synchronisation."},{slotId:"emailInbound",requiredCategory:"email",allowedModes:["managed","byok"],requiredCapabilities:[Z("email.inbound",1)],required:!0,description:"Inbound email/thread sync (Gmail) feeding the knowledge corpus."},{slotId:"emailOutbound",requiredCategory:"email",allowedModes:["managed","byok"],requiredCapabilities:[Z("email.transactional",1)],required:!0,description:"Transactional email delivery for reminders and summaries."},{slotId:"calendarScheduling",requiredCategory:"calendar",allowedModes:["managed","byok"],requiredCapabilities:[Z("calendar.events",1)],required:!0,description:"Creates calendar holds for bill reviews and handoff meetings."},{slotId:"voicePlayback",requiredCategory:"ai-voice",allowedModes:["managed","byok"],requiredCapabilities:[Z("ai.voice.synthesis",1)],required:!1,description:"Optional voice synthesis for spoken summaries (ElevenLabs)."},{slotId:"smsNotifications",requiredCategory:"sms",allowedModes:["managed","byok"],requiredCapabilities:[Z("sms.outbound",1)],required:!1,description:"SMS provider used for urgent reminders."},{slotId:"paymentsProcessing",requiredCategory:"payments",allowedModes:["managed","byok"],requiredCapabilities:[Z("payments.psp",1)],required:!1,description:"Optional payments processor enabling bill pay automations."}],workflows:{processUploadedDocument:{key:"pfo.workflow.process-uploaded-document",version:1},upcomingPaymentsReminder:{key:"pfo.workflow.upcoming-payments-reminder",version:1},generateFinancialSummary:{key:"pfo.workflow.generate-financial-summary",version:1},ingestEmailThreads:{key:"pfo.workflow.ingest-email-threads",version:1},syncOpenBankingAccounts:{key:"pfo.workflow.sync-openbanking-accounts",version:1},syncOpenBankingTransactions:{key:"pfo.workflow.sync-openbanking-transactions",version:1},refreshOpenBankingBalances:{key:"pfo.workflow.refresh-openbanking-balances",version:1},generateOpenBankingOverview:{key:"pfo.workflow.generate-openbanking-overview",version:1}},policies:[{key:"pfo.policy.tenancy",version:1},{key:"knowledge.access.financial-docs",version:1}],telemetry:{spec:{key:"pfo.telemetry",version:1}},featureFlags:[{key:"voice-summaries",enabled:!1,description:"Enable ElevenLabs spoken summaries in addition to email distribution."}],routes:[{path:"/dashboard",label:"Overview",workflow:"pfo.workflow.generate-financial-summary"},{path:"/documents/upload",label:"Upload Document",workflow:"pfo.workflow.process-uploaded-document"},{path:"/communications",label:"Inbox",workflow:"pfo.workflow.ingest-email-threads"}],notes:"Pocket Family Office blueprint pulling together finance automations for the hackathon reference implementation."};function kW(J){return J.register(j9)}var TW={meta:{id:"tenant-pfo-sample",tenantId:"tenant.family-office",appId:"pocket-family-office",blueprintName:"pocket-family-office.app",blueprintVersion:1,environment:"production",version:1,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),status:"published"},featureFlags:[{key:"voice-summaries",enabled:!0,description:"Enable spoken ElevenLabs summaries for daily briefings."}],integrations:[{slotId:"primaryLLM",connectionId:"conn-mistral-primary"},{slotId:"primaryVectorDb",connectionId:"conn-qdrant-finance"},{slotId:"primaryStorage",connectionId:"conn-gcs-documents"},{slotId:"primaryOpenBanking",connectionId:"conn-powens-primary"},{slotId:"emailInbound",connectionId:"conn-gmail-threads"},{slotId:"emailOutbound",connectionId:"conn-postmark-outbound"},{slotId:"calendarScheduling",connectionId:"conn-google-calendar"},{slotId:"voicePlayback",connectionId:"conn-elevenlabs-voice"},{slotId:"smsNotifications",connectionId:"conn-twilio-sms"},{slotId:"paymentsProcessing",connectionId:"conn-stripe-recurring"}],knowledge:[{spaceKey:"knowledge.financial-docs",scope:{workflows:["pfo.workflow.process-uploaded-document","pfo.workflow.generate-financial-summary"]}},{spaceKey:"knowledge.email-threads",scope:{workflows:["pfo.workflow.ingest-email-threads"]}},{spaceKey:"knowledge.financial-overview",scope:{workflows:["pfo.workflow.sync-openbanking-transactions","pfo.workflow.refresh-openbanking-balances","pfo.workflow.generate-financial-summary","pfo.workflow.generate-openbanking-overview"]},required:!1}],locales:{defaultLocale:"en",enabledLocales:["en"]},notes:"Sample tenant configuration for hackathon demos. Replace connection IDs with tenant-specific bindings when provisioning."};var l=new Date,s={tenantId:"tenant.family-office",createdAt:l,updatedAt:l},T9=[{meta:{...s,id:"conn-mistral-primary",integrationKey:"ai-llm.mistral",integrationVersion:1,label:"Mistral Primary"},ownershipMode:"managed",config:{model:"mistral-large-latest",embeddingModel:"mistral-embed"},secretProvider:"gcp-secret-manager",secretRef:"gcp://projects/pfo-hackathon/secrets/mistral-api-key/versions/latest",status:"connected",health:{status:"connected",checkedAt:l,latencyMs:180}},{meta:{...s,id:"conn-qdrant-finance",integrationKey:"vectordb.qdrant",integrationVersion:1,label:"Qdrant Finance Cluster"},ownershipMode:"managed",config:{apiUrl:"https://qdrant.pfo.internal",collectionPrefix:"tenant-family-office"},secretProvider:"gcp-secret-manager",secretRef:"gcp://projects/pfo-hackathon/secrets/qdrant-api-key/versions/latest",status:"connected",health:{status:"connected",checkedAt:l,latencyMs:95}},{meta:{...s,id:"conn-gcs-documents",integrationKey:"storage.gcs",integrationVersion:1,label:"GCS Documents Bucket"},ownershipMode:"managed",config:{bucket:"pfo-uploads",prefix:"financial-docs/"},secretProvider:"gcp-secret-manager",secretRef:"gcp://projects/pfo-hackathon/secrets/gcs-service-account/versions/latest",status:"connected",health:{status:"connected",checkedAt:l,latencyMs:60}},{meta:{...s,id:"conn-gmail-threads",integrationKey:"email.gmail",integrationVersion:1,label:"Gmail Household Threads"},ownershipMode:"byok",config:{labelIds:["FINANCE","INBOX"],includeSpamTrash:!1},secretProvider:"gcp-secret-manager",secretRef:"gcp://projects/pfo-hackathon/secrets/gmail-refresh-token/versions/latest",status:"connected",health:{status:"connected",checkedAt:l,latencyMs:320}},{meta:{...s,id:"conn-postmark-outbound",integrationKey:"email.postmark",integrationVersion:1,label:"Postmark Transactional"},ownershipMode:"managed",config:{messageStream:"outbound",fromEmail:"family.office@pfo.dev"},secretProvider:"gcp-secret-manager",secretRef:"gcp://projects/pfo-hackathon/secrets/postmark-server-token/versions/latest",status:"connected",health:{status:"connected",checkedAt:l,latencyMs:210}},{meta:{...s,id:"conn-google-calendar",integrationKey:"calendar.google",integrationVersion:1,label:"Household Calendar"},ownershipMode:"managed",config:{calendarId:"primary"},secretProvider:"gcp-secret-manager",secretRef:"gcp://projects/pfo-hackathon/secrets/google-calendar-service-account/versions/latest",status:"connected",health:{status:"connected",checkedAt:l,latencyMs:140}},{meta:{...s,id:"conn-elevenlabs-voice",integrationKey:"ai-voice.elevenlabs",integrationVersion:1,label:"ElevenLabs Voice"},ownershipMode:"byok",config:{defaultVoiceId:"pNInz6obpgDQGcFmaJgB"},secretProvider:"gcp-secret-manager",secretRef:"gcp://projects/pfo-hackathon/secrets/elevenlabs-api-key/versions/latest",status:"connected",health:{status:"connected",checkedAt:l,latencyMs:250}},{meta:{...s,id:"conn-twilio-sms",integrationKey:"sms.twilio",integrationVersion:1,label:"Twilio SMS"},ownershipMode:"managed",config:{fromNumber:"+15552340000"},secretProvider:"gcp-secret-manager",secretRef:"gcp://projects/pfo-hackathon/secrets/twilio-auth-token/versions/latest",status:"connected",health:{status:"connected",checkedAt:l,latencyMs:180}},{meta:{...s,id:"conn-stripe-recurring",integrationKey:"payments.stripe",integrationVersion:1,label:"Stripe Recurring Billing"},ownershipMode:"managed",config:{accountId:"acct_1PFOHACKATHON",region:"eu-west-1"},secretProvider:"gcp-secret-manager",secretRef:"gcp://projects/pfo-hackathon/secrets/stripe-secret-key/versions/latest",status:"connected",health:{status:"connected",checkedAt:l,latencyMs:220}},{meta:{...s,id:"conn-powens-primary",integrationKey:"openbanking.powens",integrationVersion:1,label:"Powens Open Banking"},ownershipMode:"byok",config:{environment:"sandbox",baseUrl:"https://api-sandbox.powens.com/v2"},secretProvider:"gcp-secret-manager",secretRef:"gcp://projects/pfo-hackathon/secrets/powens-credentials/versions/latest",status:"connected",health:{status:"connected",checkedAt:l,latencyMs:410}}];function vW(J){return T9.find((X)=>X.meta.id===J)}var q1=new Date,gW=[{meta:{id:"source-financial-uploads",tenantId:"tenant.family-office",spaceKey:"knowledge.financial-docs",spaceVersion:1,label:"Uploaded Financial Documents",sourceType:"file_upload",createdAt:q1,updatedAt:q1},config:{bucket:"pfo-uploads",prefix:"financial-docs/"},syncSchedule:{enabled:!0,intervalMs:900000},lastSync:{timestamp:q1,success:!0}},{meta:{id:"source-gmail-threads",tenantId:"tenant.family-office",spaceKey:"knowledge.email-threads",spaceVersion:1,label:"Household Gmail Threads",sourceType:"email",createdAt:q1,updatedAt:q1},config:{labelIds:["INBOX","FINANCE"]},syncSchedule:{enabled:!0,intervalMs:300000},lastSync:{timestamp:q1,success:!0}},{meta:{id:"source-financial-overview",tenantId:"tenant.family-office",spaceKey:"knowledge.financial-overview",spaceVersion:1,label:"Financial Overview",sourceType:"api",createdAt:q1,updatedAt:q1},config:{},syncSchedule:{enabled:!1}}];var uW=Object.freeze({status:"aborted"});function U(J,X,H){function W(Q,G){if(!Q._zod)Object.defineProperty(Q,"_zod",{value:{def:G,constr:z,traits:new Set},enumerable:!1});if(Q._zod.traits.has(J))return;Q._zod.traits.add(J),X(Q,G);let D=z.prototype,P=Object.keys(D);for(let B=0;B<P.length;B++){let $=P[B];if(!($ in Q))Q[$]=D[$].bind(Q)}}let q=H?.Parent??Object;class Y extends q{}Object.defineProperty(Y,"name",{value:J});function z(Q){var G;let D=H?.Parent?new Y:this;W(D,Q),(G=D._zod).deferred??(G.deferred=[]);for(let P of D._zod.deferred)P();return D}return Object.defineProperty(z,"init",{value:W}),Object.defineProperty(z,Symbol.hasInstance,{value:(Q)=>{if(H?.Parent&&Q instanceof H.Parent)return!0;return Q?._zod?.traits?.has(J)}}),Object.defineProperty(z,"name",{value:J}),z}var yW=Symbol("zod_brand");class J1 extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class b1 extends Error{constructor(J){super(`Encountered unidirectional transform during encode: ${J}`);this.name="ZodEncodeError"}}var o1={};function r(J){if(J)Object.assign(o1,J);return o1}var K={};_4(K,{unwrapMessage:()=>_1,uint8ArrayToHex:()=>qX,uint8ArrayToBase64url:()=>HX,uint8ArrayToBase64:()=>h4,stringifyPrimitive:()=>d1,slugify:()=>V0,shallowClone:()=>C4,safeExtend:()=>t9,required:()=>e9,randomString:()=>o9,propertyKeyTypes:()=>N0,promiseAllObject:()=>f9,primitiveTypes:()=>S4,prefixIssues:()=>X1,pick:()=>d9,partial:()=>s9,optionalKeys:()=>Z0,omit:()=>n9,objectClone:()=>u9,numKeys:()=>l9,nullish:()=>S1,normalizeParams:()=>I,mergeDefs:()=>z1,merge:()=>a9,jsonStringifyReplacer:()=>$1,joinValues:()=>l1,issue:()=>A1,isPlainObject:()=>Q1,isObject:()=>I1,hexToUint8Array:()=>WX,getSizableOrigin:()=>j4,getParsedType:()=>r9,getLengthableOrigin:()=>j1,getEnumValues:()=>E1,getElementAtPath:()=>m9,floatSafeRemainder:()=>K0,finalizeIssue:()=>n,extend:()=>i9,escapeRegex:()=>U1,esc:()=>r1,defineLazy:()=>N,createTransparentProxy:()=>p9,cloneDef:()=>y9,clone:()=>d,cleanRegex:()=>k1,cleanEnum:()=>JX,captureStackTrace:()=>p1,cached:()=>C1,base64urlToUint8Array:()=>XX,base64ToUint8Array:()=>T4,assignProp:()=>Y1,assertNotEqual:()=>v9,assertNever:()=>g9,assertIs:()=>x9,assertEqual:()=>h9,assert:()=>c9,allowsEval:()=>R0,aborted:()=>w1,NUMBER_FORMAT_RANGES:()=>L0,Class:()=>v4,BIGINT_FORMAT_RANGES:()=>k4});function h9(J){return J}function v9(J){return J}function x9(J){}function g9(J){throw Error("Unexpected value in exhaustive check")}function c9(J){}function E1(J){let X=Object.values(J).filter((W)=>typeof W==="number");return Object.entries(J).filter(([W,q])=>X.indexOf(+W)===-1).map(([W,q])=>q)}function l1(J,X="|"){return J.map((H)=>d1(H)).join(X)}function $1(J,X){if(typeof X==="bigint")return X.toString();return X}function C1(J){return{get value(){{let H=J();return Object.defineProperty(this,"value",{value:H}),H}throw Error("cached value already set")}}}function S1(J){return J===null||J===void 0}function k1(J){let X=J.startsWith("^")?1:0,H=J.endsWith("$")?J.length-1:J.length;return J.slice(X,H)}function K0(J,X){let H=(J.toString().split(".")[1]||"").length,W=X.toString(),q=(W.split(".")[1]||"").length;if(q===0&&/\d?e-\d?/.test(W)){let G=W.match(/\d?e-(\d?)/);if(G?.[1])q=Number.parseInt(G[1])}let Y=H>q?H:q,z=Number.parseInt(J.toFixed(Y).replace(".","")),Q=Number.parseInt(X.toFixed(Y).replace(".",""));return z%Q/10**Y}var E4=Symbol("evaluating");function N(J,X,H){let W=void 0;Object.defineProperty(J,X,{get(){if(W===E4)return;if(W===void 0)W=E4,W=H();return W},set(q){Object.defineProperty(J,X,{value:q})},configurable:!0})}function u9(J){return Object.create(Object.getPrototypeOf(J),Object.getOwnPropertyDescriptors(J))}function Y1(J,X,H){Object.defineProperty(J,X,{value:H,writable:!0,enumerable:!0,configurable:!0})}function z1(...J){let X={};for(let H of J){let W=Object.getOwnPropertyDescriptors(H);Object.assign(X,W)}return Object.defineProperties({},X)}function y9(J){return z1(J._zod.def)}function m9(J,X){if(!X)return J;return X.reduce((H,W)=>H?.[W],J)}function f9(J){let X=Object.keys(J),H=X.map((W)=>J[W]);return Promise.all(H).then((W)=>{let q={};for(let Y=0;Y<X.length;Y++)q[X[Y]]=W[Y];return q})}function o9(J=10){let H="";for(let W=0;W<J;W++)H+="abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)];return H}function r1(J){return JSON.stringify(J)}function V0(J){return J.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var p1="captureStackTrace"in Error?Error.captureStackTrace:(...J)=>{};function I1(J){return typeof J==="object"&&J!==null&&!Array.isArray(J)}var R0=C1(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(J){return!1}});function Q1(J){if(I1(J)===!1)return!1;let X=J.constructor;if(X===void 0)return!0;if(typeof X!=="function")return!0;let H=X.prototype;if(I1(H)===!1)return!1;if(Object.prototype.hasOwnProperty.call(H,"isPrototypeOf")===!1)return!1;return!0}function C4(J){if(Q1(J))return{...J};if(Array.isArray(J))return[...J];return J}function l9(J){let X=0;for(let H in J)if(Object.prototype.hasOwnProperty.call(J,H))X++;return X}var r9=(J)=>{let X=typeof J;switch(X){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(J)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":if(Array.isArray(J))return"array";if(J===null)return"null";if(J.then&&typeof J.then==="function"&&J.catch&&typeof J.catch==="function")return"promise";if(typeof Map<"u"&&J instanceof Map)return"map";if(typeof Set<"u"&&J instanceof Set)return"set";if(typeof Date<"u"&&J instanceof Date)return"date";if(typeof File<"u"&&J instanceof File)return"file";return"object";default:throw Error(`Unknown data type: ${X}`)}},N0=new Set(["string","number","symbol"]),S4=new Set(["string","number","bigint","boolean","symbol","undefined"]);function U1(J){return J.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function d(J,X,H){let W=new J._zod.constr(X??J._zod.def);if(!X||H?.parent)W._zod.parent=J;return W}function I(J){let X=J;if(!X)return{};if(typeof X==="string")return{error:()=>X};if(X?.message!==void 0){if(X?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");X.error=X.message}if(delete X.message,typeof X.error==="string")return{...X,error:()=>X.error};return X}function p9(J){let X;return new Proxy({},{get(H,W,q){return X??(X=J()),Reflect.get(X,W,q)},set(H,W,q,Y){return X??(X=J()),Reflect.set(X,W,q,Y)},has(H,W){return X??(X=J()),Reflect.has(X,W)},deleteProperty(H,W){return X??(X=J()),Reflect.deleteProperty(X,W)},ownKeys(H){return X??(X=J()),Reflect.ownKeys(X)},getOwnPropertyDescriptor(H,W){return X??(X=J()),Reflect.getOwnPropertyDescriptor(X,W)},defineProperty(H,W,q){return X??(X=J()),Reflect.defineProperty(X,W,q)}})}function d1(J){if(typeof J==="bigint")return J.toString()+"n";if(typeof J==="string")return`"${J}"`;return`${J}`}function Z0(J){return Object.keys(J).filter((X)=>{return J[X]._zod.optin==="optional"&&J[X]._zod.optout==="optional"})}var L0={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-340282346638528860000000000000000000000,340282346638528860000000000000000000000],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},k4={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function d9(J,X){let H=J._zod.def,W=z1(J._zod.def,{get shape(){let q={};for(let Y in X){if(!(Y in H.shape))throw Error(`Unrecognized key: "${Y}"`);if(!X[Y])continue;q[Y]=H.shape[Y]}return Y1(this,"shape",q),q},checks:[]});return d(J,W)}function n9(J,X){let H=J._zod.def,W=z1(J._zod.def,{get shape(){let q={...J._zod.def.shape};for(let Y in X){if(!(Y in H.shape))throw Error(`Unrecognized key: "${Y}"`);if(!X[Y])continue;delete q[Y]}return Y1(this,"shape",q),q},checks:[]});return d(J,W)}function i9(J,X){if(!Q1(X))throw Error("Invalid input to extend: expected a plain object");let H=J._zod.def.checks;if(H&&H.length>0)throw Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");let q=z1(J._zod.def,{get shape(){let Y={...J._zod.def.shape,...X};return Y1(this,"shape",Y),Y},checks:[]});return d(J,q)}function t9(J,X){if(!Q1(X))throw Error("Invalid input to safeExtend: expected a plain object");let H={...J._zod.def,get shape(){let W={...J._zod.def.shape,...X};return Y1(this,"shape",W),W},checks:J._zod.def.checks};return d(J,H)}function a9(J,X){let H=z1(J._zod.def,{get shape(){let W={...J._zod.def.shape,...X._zod.def.shape};return Y1(this,"shape",W),W},get catchall(){return X._zod.def.catchall},checks:[]});return d(J,H)}function s9(J,X,H){let W=z1(X._zod.def,{get shape(){let q=X._zod.def.shape,Y={...q};if(H)for(let z in H){if(!(z in q))throw Error(`Unrecognized key: "${z}"`);if(!H[z])continue;Y[z]=J?new J({type:"optional",innerType:q[z]}):q[z]}else for(let z in q)Y[z]=J?new J({type:"optional",innerType:q[z]}):q[z];return Y1(this,"shape",Y),Y},checks:[]});return d(X,W)}function e9(J,X,H){let W=z1(X._zod.def,{get shape(){let q=X._zod.def.shape,Y={...q};if(H)for(let z in H){if(!(z in Y))throw Error(`Unrecognized key: "${z}"`);if(!H[z])continue;Y[z]=new J({type:"nonoptional",innerType:q[z]})}else for(let z in q)Y[z]=new J({type:"nonoptional",innerType:q[z]});return Y1(this,"shape",Y),Y},checks:[]});return d(X,W)}function w1(J,X=0){if(J.aborted===!0)return!0;for(let H=X;H<J.issues.length;H++)if(J.issues[H]?.continue!==!0)return!0;return!1}function X1(J,X){return X.map((H)=>{var W;return(W=H).path??(W.path=[]),H.path.unshift(J),H})}function _1(J){return typeof J==="string"?J:J?.message}function n(J,X,H){let W={...J,path:J.path??[]};if(!J.message){let q=_1(J.inst?._zod.def?.error?.(J))??_1(X?.error?.(J))??_1(H.customError?.(J))??_1(H.localeError?.(J))??"Invalid input";W.message=q}if(delete W.inst,delete W.continue,!X?.reportInput)delete W.input;return W}function j4(J){if(J instanceof Set)return"set";if(J instanceof Map)return"map";if(J instanceof File)return"file";return"unknown"}function j1(J){if(Array.isArray(J))return"array";if(typeof J==="string")return"string";return"unknown"}function A1(...J){let[X,H,W]=J;if(typeof X==="string")return{message:X,code:"custom",input:H,inst:W};return{...X}}function JX(J){return Object.entries(J).filter(([X,H])=>{return Number.isNaN(Number.parseInt(X,10))}).map((X)=>X[1])}function T4(J){let X=atob(J),H=new Uint8Array(X.length);for(let W=0;W<X.length;W++)H[W]=X.charCodeAt(W);return H}function h4(J){let X="";for(let H=0;H<J.length;H++)X+=String.fromCharCode(J[H]);return btoa(X)}function XX(J){let X=J.replace(/-/g,"+").replace(/_/g,"/"),H="=".repeat((4-X.length%4)%4);return T4(X+H)}function HX(J){return h4(J).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function WX(J){let X=J.replace(/^0x/,"");if(X.length%2!==0)throw Error("Invalid hex string length");let H=new Uint8Array(X.length/2);for(let W=0;W<X.length;W+=2)H[W/2]=Number.parseInt(X.slice(W,W+2),16);return H}function qX(J){return Array.from(J).map((X)=>X.toString(16).padStart(2,"0")).join("")}class v4{constructor(...J){}}var x4=(J,X)=>{J.name="$ZodError",Object.defineProperty(J,"_zod",{value:J._zod,enumerable:!1}),Object.defineProperty(J,"issues",{value:X,enumerable:!1}),J.message=JSON.stringify(X,$1,2),Object.defineProperty(J,"toString",{value:()=>J.message,enumerable:!1})},n1=U("$ZodError",x4),b0=U("$ZodError",x4,{Parent:Error});function g4(J,X=(H)=>H.message){let H={},W=[];for(let q of J.issues)if(q.path.length>0)H[q.path[0]]=H[q.path[0]]||[],H[q.path[0]].push(X(q));else W.push(X(q));return{formErrors:W,fieldErrors:H}}function c4(J,X=(H)=>H.message){let H={_errors:[]},W=(q)=>{for(let Y of q.issues)if(Y.code==="invalid_union"&&Y.errors.length)Y.errors.map((z)=>W({issues:z}));else if(Y.code==="invalid_key")W({issues:Y.issues});else if(Y.code==="invalid_element")W({issues:Y.issues});else if(Y.path.length===0)H._errors.push(X(Y));else{let z=H,Q=0;while(Q<Y.path.length){let G=Y.path[Q];if(Q!==Y.path.length-1)z[G]=z[G]||{_errors:[]};else z[G]=z[G]||{_errors:[]},z[G]._errors.push(X(Y));z=z[G],Q++}}};return W(J),H}var i1=(J)=>(X,H,W,q)=>{let Y=W?Object.assign(W,{async:!1}):{async:!1},z=X._zod.run({value:H,issues:[]},Y);if(z instanceof Promise)throw new J1;if(z.issues.length){let Q=new(q?.Err??J)(z.issues.map((G)=>n(G,Y,r())));throw p1(Q,q?.callee),Q}return z.value};var t1=(J)=>async(X,H,W,q)=>{let Y=W?Object.assign(W,{async:!0}):{async:!0},z=X._zod.run({value:H,issues:[]},Y);if(z instanceof Promise)z=await z;if(z.issues.length){let Q=new(q?.Err??J)(z.issues.map((G)=>n(G,Y,r())));throw p1(Q,q?.callee),Q}return z.value};var T1=(J)=>(X,H,W)=>{let q=W?{...W,async:!1}:{async:!1},Y=X._zod.run({value:H,issues:[]},q);if(Y instanceof Promise)throw new J1;return Y.issues.length?{success:!1,error:new(J??n1)(Y.issues.map((z)=>n(z,q,r())))}:{success:!0,data:Y.value}},u4=T1(b0),h1=(J)=>async(X,H,W)=>{let q=W?Object.assign(W,{async:!0}):{async:!0},Y=X._zod.run({value:H,issues:[]},q);if(Y instanceof Promise)Y=await Y;return Y.issues.length?{success:!1,error:new J(Y.issues.map((z)=>n(z,q,r())))}:{success:!0,data:Y.value}},y4=h1(b0),m4=(J)=>(X,H,W)=>{let q=W?Object.assign(W,{direction:"backward"}):{direction:"backward"};return i1(J)(X,H,q)};var f4=(J)=>(X,H,W)=>{return i1(J)(X,H,W)};var o4=(J)=>async(X,H,W)=>{let q=W?Object.assign(W,{direction:"backward"}):{direction:"backward"};return t1(J)(X,H,q)};var l4=(J)=>async(X,H,W)=>{return t1(J)(X,H,W)};var r4=(J)=>(X,H,W)=>{let q=W?Object.assign(W,{direction:"backward"}):{direction:"backward"};return T1(J)(X,H,q)};var p4=(J)=>(X,H,W)=>{return T1(J)(X,H,W)};var d4=(J)=>async(X,H,W)=>{let q=W?Object.assign(W,{direction:"backward"}):{direction:"backward"};return h1(J)(X,H,q)};var n4=(J)=>async(X,H,W)=>{return h1(J)(X,H,W)};var i4=/^[cC][^\s-]{8,}$/,t4=/^[0-9a-z]+$/,a4=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,s4=/^[0-9a-vA-V]{20}$/,e4=/^[A-Za-z0-9]{27}$/,J6=/^[a-zA-Z0-9_-]{21}$/,X6=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;var H6=/^([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})$/,_0=(J)=>{if(!J)return/^([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)$/;return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${J}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`)};var W6=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;var zX="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function q6(){return new RegExp(zX,"u")}var Y6=/^(?:(?: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])$/,z6=/^(([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 Q6=/^((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])$/,w6=/^(([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])$/,D6=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,E0=/^[A-Za-z0-9_-]*$/;var G6=/^\+(?:[0-9]){6,14}[0-9]$/,U6="(?:(?:\\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])))",P6=new RegExp(`^${U6}$`);function B6(J){return typeof J.precision==="number"?J.precision===-1?"(?:[01]\\d|2[0-3]):[0-5]\\d":J.precision===0?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d":`(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{${J.precision}}`:"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function M6(J){return new RegExp(`^${B6(J)}$`)}function F6(J){let X=B6({precision:J.precision}),H=["Z"];if(J.local)H.push("");if(J.offset)H.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let W=`${X}(?:${H.join("|")})`;return new RegExp(`^${U6}T(?:${W})$`)}var I6=(J)=>{let X=J?`[\\s\\S]{${J?.minimum??0},${J?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${X}$`)},$6=/^-?\d+n?$/,A6=/^-?\d+$/,O6=/^-?\d+(?:\.\d+)?/,K6=/^(?:true|false)$/i;var V6=/^[^A-Z]*$/,R6=/^[^a-z]*$/;var c=U("$ZodCheck",(J,X)=>{var H;J._zod??(J._zod={}),J._zod.def=X,(H=J._zod).onattach??(H.onattach=[])}),N6={number:"number",bigint:"bigint",object:"date"},C0=U("$ZodCheckLessThan",(J,X)=>{c.init(J,X);let H=N6[typeof X.value];J._zod.onattach.push((W)=>{let q=W._zod.bag,Y=(X.inclusive?q.maximum:q.exclusiveMaximum)??Number.POSITIVE_INFINITY;if(X.value<Y)if(X.inclusive)q.maximum=X.value;else q.exclusiveMaximum=X.value}),J._zod.check=(W)=>{if(X.inclusive?W.value<=X.value:W.value<X.value)return;W.issues.push({origin:H,code:"too_big",maximum:X.value,input:W.value,inclusive:X.inclusive,inst:J,continue:!X.abort})}}),S0=U("$ZodCheckGreaterThan",(J,X)=>{c.init(J,X);let H=N6[typeof X.value];J._zod.onattach.push((W)=>{let q=W._zod.bag,Y=(X.inclusive?q.minimum:q.exclusiveMinimum)??Number.NEGATIVE_INFINITY;if(X.value>Y)if(X.inclusive)q.minimum=X.value;else q.exclusiveMinimum=X.value}),J._zod.check=(W)=>{if(X.inclusive?W.value>=X.value:W.value>X.value)return;W.issues.push({origin:H,code:"too_small",minimum:X.value,input:W.value,inclusive:X.inclusive,inst:J,continue:!X.abort})}}),Z6=U("$ZodCheckMultipleOf",(J,X)=>{c.init(J,X),J._zod.onattach.push((H)=>{var W;(W=H._zod.bag).multipleOf??(W.multipleOf=X.value)}),J._zod.check=(H)=>{if(typeof H.value!==typeof X.value)throw Error("Cannot mix number and bigint in multiple_of check.");if(typeof H.value==="bigint"?H.value%X.value===BigInt(0):K0(H.value,X.value)===0)return;H.issues.push({origin:typeof H.value,code:"not_multiple_of",divisor:X.value,input:H.value,inst:J,continue:!X.abort})}}),L6=U("$ZodCheckNumberFormat",(J,X)=>{c.init(J,X),X.format=X.format||"float64";let H=X.format?.includes("int"),W=H?"int":"number",[q,Y]=L0[X.format];J._zod.onattach.push((z)=>{let Q=z._zod.bag;if(Q.format=X.format,Q.minimum=q,Q.maximum=Y,H)Q.pattern=A6}),J._zod.check=(z)=>{let Q=z.value;if(H){if(!Number.isInteger(Q)){z.issues.push({expected:W,format:X.format,code:"invalid_type",continue:!1,input:Q,inst:J});return}if(!Number.isSafeInteger(Q)){if(Q>0)z.issues.push({input:Q,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:J,origin:W,continue:!X.abort});else z.issues.push({input:Q,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:J,origin:W,continue:!X.abort});return}}if(Q<q)z.issues.push({origin:"number",input:Q,code:"too_small",minimum:q,inclusive:!0,inst:J,continue:!X.abort});if(Q>Y)z.issues.push({origin:"number",input:Q,code:"too_big",maximum:Y,inst:J})}});var b6=U("$ZodCheckMaxLength",(J,X)=>{var H;c.init(J,X),(H=J._zod.def).when??(H.when=(W)=>{let q=W.value;return!S1(q)&&q.length!==void 0}),J._zod.onattach.push((W)=>{let q=W._zod.bag.maximum??Number.POSITIVE_INFINITY;if(X.maximum<q)W._zod.bag.maximum=X.maximum}),J._zod.check=(W)=>{let q=W.value;if(q.length<=X.maximum)return;let z=j1(q);W.issues.push({origin:z,code:"too_big",maximum:X.maximum,inclusive:!0,input:q,inst:J,continue:!X.abort})}}),_6=U("$ZodCheckMinLength",(J,X)=>{var H;c.init(J,X),(H=J._zod.def).when??(H.when=(W)=>{let q=W.value;return!S1(q)&&q.length!==void 0}),J._zod.onattach.push((W)=>{let q=W._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(X.minimum>q)W._zod.bag.minimum=X.minimum}),J._zod.check=(W)=>{let q=W.value;if(q.length>=X.minimum)return;let z=j1(q);W.issues.push({origin:z,code:"too_small",minimum:X.minimum,inclusive:!0,input:q,inst:J,continue:!X.abort})}}),E6=U("$ZodCheckLengthEquals",(J,X)=>{var H;c.init(J,X),(H=J._zod.def).when??(H.when=(W)=>{let q=W.value;return!S1(q)&&q.length!==void 0}),J._zod.onattach.push((W)=>{let q=W._zod.bag;q.minimum=X.length,q.maximum=X.length,q.length=X.length}),J._zod.check=(W)=>{let q=W.value,Y=q.length;if(Y===X.length)return;let z=j1(q),Q=Y>X.length;W.issues.push({origin:z,...Q?{code:"too_big",maximum:X.length}:{code:"too_small",minimum:X.length},inclusive:!0,exact:!0,input:W.value,inst:J,continue:!X.abort})}}),v1=U("$ZodCheckStringFormat",(J,X)=>{var H,W;if(c.init(J,X),J._zod.onattach.push((q)=>{let Y=q._zod.bag;if(Y.format=X.format,X.pattern)Y.patterns??(Y.patterns=new Set),Y.patterns.add(X.pattern)}),X.pattern)(H=J._zod).check??(H.check=(q)=>{if(X.pattern.lastIndex=0,X.pattern.test(q.value))return;q.issues.push({origin:"string",code:"invalid_format",format:X.format,input:q.value,...X.pattern?{pattern:X.pattern.toString()}:{},inst:J,continue:!X.abort})});else(W=J._zod).check??(W.check=()=>{})}),C6=U("$ZodCheckRegex",(J,X)=>{v1.init(J,X),J._zod.check=(H)=>{if(X.pattern.lastIndex=0,X.pattern.test(H.value))return;H.issues.push({origin:"string",code:"invalid_format",format:"regex",input:H.value,pattern:X.pattern.toString(),inst:J,continue:!X.abort})}}),S6=U("$ZodCheckLowerCase",(J,X)=>{X.pattern??(X.pattern=V6),v1.init(J,X)}),k6=U("$ZodCheckUpperCase",(J,X)=>{X.pattern??(X.pattern=R6),v1.init(J,X)}),j6=U("$ZodCheckIncludes",(J,X)=>{c.init(J,X);let H=U1(X.includes),W=new RegExp(typeof X.position==="number"?`^.{${X.position}}${H}`:H);X.pattern=W,J._zod.onattach.push((q)=>{let Y=q._zod.bag;Y.patterns??(Y.patterns=new Set),Y.patterns.add(W)}),J._zod.check=(q)=>{if(q.value.includes(X.includes,X.position))return;q.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:X.includes,input:q.value,inst:J,continue:!X.abort})}}),T6=U("$ZodCheckStartsWith",(J,X)=>{c.init(J,X);let H=new RegExp(`^${U1(X.prefix)}.*`);X.pattern??(X.pattern=H),J._zod.onattach.push((W)=>{let q=W._zod.bag;q.patterns??(q.patterns=new Set),q.patterns.add(H)}),J._zod.check=(W)=>{if(W.value.startsWith(X.prefix))return;W.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:X.prefix,input:W.value,inst:J,continue:!X.abort})}}),h6=U("$ZodCheckEndsWith",(J,X)=>{c.init(J,X);let H=new RegExp(`.*${U1(X.suffix)}$`);X.pattern??(X.pattern=H),J._zod.onattach.push((W)=>{let q=W._zod.bag;q.patterns??(q.patterns=new Set),q.patterns.add(H)}),J._zod.check=(W)=>{if(W.value.endsWith(X.suffix))return;W.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:X.suffix,input:W.value,inst:J,continue:!X.abort})}});var v6=U("$ZodCheckOverwrite",(J,X)=>{c.init(J,X),J._zod.check=(H)=>{H.value=X.tx(H.value)}});class k0{constructor(J=[]){if(this.content=[],this.indent=0,this)this.args=J}indented(J){this.indent+=1,J(this),this.indent-=1}write(J){if(typeof J==="function"){J(this,{execution:"sync"}),J(this,{execution:"async"});return}let H=J.split(`
|
|
1
|
+
var S9=Object.defineProperty;var _4=(J,X)=>{for(var H in X)S9(J,H,{get:X[H],enumerable:!0,configurable:!0,set:(W)=>X[H]=()=>W})};var A={Idea:"idea",InCreation:"in_creation",Experimental:"experimental",Beta:"beta",Stable:"stable",Deprecated:"deprecated"},K={PlatformCore:"platform.core",PlatformSigil:"platform.sigil",PlatformMarketplace:"platform.marketplace",PlatformMessaging:"platform.messaging",PlatformContent:"platform.content",PlatformFeatureFlags:"platform.featureflags",PlatformFinance:"platform.finance"};var R={Spots:"spots",Collectivity:"collectivity",Marketplace:"marketplace",Sellers:"sellers",Auth:"auth",Login:"login",Signup:"signup",Guide:"guide",Docs:"docs",I18n:"i18n",Incident:"incident",Automation:"automation",Hygiene:"hygiene"};var Z=(J,X)=>({key:J,version:X}),j9={meta:{key:"pocket-family-office.app",version:"1.0.0",appId:"pocket-family-office",title:"Pocket Family Office",description:"Household finance automation: ingest documents, track bills, remind payments, and summarise cashflow.",domain:"finance",owners:[K.PlatformFinance],tags:[R.Guide,"finance","automation"],stability:A.Experimental},capabilities:{enabled:[Z("ai.chat","1.0.0"),Z("ai.embeddings","1.0.0"),Z("vector-db.search","1.0.0"),Z("vector-db.storage","1.0.0"),Z("storage.objects","1.0.0"),Z("email.inbound","1.0.0"),Z("email.transactional","1.0.0"),Z("calendar.events","1.0.0"),Z("sms.outbound","1.0.0"),Z("ai.voice.synthesis","1.0.0"),Z("payments.psp","1.0.0"),Z("openbanking.accounts.read","1.0.0"),Z("openbanking.transactions.read","1.0.0"),Z("openbanking.balances.read","1.0.0")]},integrationSlots:[{slotId:"primaryLLM",requiredCategory:"ai-llm",allowedModes:["managed","byok"],requiredCapabilities:[Z("ai.chat","1.0.0")],required:!0,description:"Chat completion provider powering summarisation, explanations, and insights."},{slotId:"primaryVectorDb",requiredCategory:"vector-db",allowedModes:["managed","byok"],requiredCapabilities:[Z("vector-db.search","1.0.0")],required:!0,description:"Vector database storing embeddings for financial documents and email threads."},{slotId:"primaryStorage",requiredCategory:"storage",allowedModes:["managed","byok"],requiredCapabilities:[Z("storage.objects","1.0.0")],required:!0,description:"Object storage used for raw uploads and normalised documents."},{slotId:"primaryOpenBanking",requiredCategory:"open-banking",allowedModes:["byok"],requiredCapabilities:[Z("openbanking.accounts.read","1.0.0"),Z("openbanking.transactions.read","1.0.0"),Z("openbanking.balances.read","1.0.0")],required:!0,description:"Powens BYOK connection powering bank account, transaction, and balance synchronisation."},{slotId:"emailInbound",requiredCategory:"email",allowedModes:["managed","byok"],requiredCapabilities:[Z("email.inbound","1.0.0")],required:!0,description:"Inbound email/thread sync (Gmail) feeding the knowledge corpus."},{slotId:"emailOutbound",requiredCategory:"email",allowedModes:["managed","byok"],requiredCapabilities:[Z("email.transactional","1.0.0")],required:!0,description:"Transactional email delivery for reminders and summaries."},{slotId:"calendarScheduling",requiredCategory:"calendar",allowedModes:["managed","byok"],requiredCapabilities:[Z("calendar.events","1.0.0")],required:!0,description:"Creates calendar holds for bill reviews and handoff meetings."},{slotId:"voicePlayback",requiredCategory:"ai-voice",allowedModes:["managed","byok"],requiredCapabilities:[Z("ai.voice.synthesis","1.0.0")],required:!1,description:"Optional voice synthesis for spoken summaries (ElevenLabs)."},{slotId:"smsNotifications",requiredCategory:"sms",allowedModes:["managed","byok"],requiredCapabilities:[Z("sms.outbound","1.0.0")],required:!1,description:"SMS provider used for urgent reminders."},{slotId:"paymentsProcessing",requiredCategory:"payments",allowedModes:["managed","byok"],requiredCapabilities:[Z("payments.psp","1.0.0")],required:!1,description:"Optional payments processor enabling bill pay automations."}],workflows:{processUploadedDocument:{key:"pfo.workflow.process-uploaded-document",version:"1.0.0"},upcomingPaymentsReminder:{key:"pfo.workflow.upcoming-payments-reminder",version:"1.0.0"},generateFinancialSummary:{key:"pfo.workflow.generate-financial-summary",version:"1.0.0"},ingestEmailThreads:{key:"pfo.workflow.ingest-email-threads",version:"1.0.0"},syncOpenBankingAccounts:{key:"pfo.workflow.sync-openbanking-accounts",version:"1.0.0"},syncOpenBankingTransactions:{key:"pfo.workflow.sync-openbanking-transactions",version:"1.0.0"},refreshOpenBankingBalances:{key:"pfo.workflow.refresh-openbanking-balances",version:"1.0.0"},generateOpenBankingOverview:{key:"pfo.workflow.generate-openbanking-overview",version:"1.0.0"}},policies:[{key:"pfo.policy.tenancy",version:"1.0.0"},{key:"knowledge.access.financial-docs",version:"1.0.0"}],telemetry:{spec:{key:"pfo.telemetry",version:"1.0.0"}},featureFlags:[{key:"voice-summaries",enabled:!1,description:"Enable ElevenLabs spoken summaries in addition to email distribution."}],routes:[{path:"/dashboard",label:"Overview",workflow:"pfo.workflow.generate-financial-summary"},{path:"/documents/upload",label:"Upload Document",workflow:"pfo.workflow.process-uploaded-document"},{path:"/communications",label:"Inbox",workflow:"pfo.workflow.ingest-email-threads"}],notes:"Pocket Family Office blueprint pulling together finance automations for the hackathon reference implementation."};function kW(J){return J.register(j9)}var SW={meta:{id:"tenant-pfo-sample",tenantId:"tenant.family-office",appId:"pocket-family-office",blueprintName:"pocket-family-office.app",blueprintVersion:"1.0.0",environment:"production",version:"1.0.0",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),status:"published"},featureFlags:[{key:"voice-summaries",enabled:!0,description:"Enable spoken ElevenLabs summaries for daily briefings."}],integrations:[{slotId:"primaryLLM",connectionId:"conn-mistral-primary"},{slotId:"primaryVectorDb",connectionId:"conn-qdrant-finance"},{slotId:"primaryStorage",connectionId:"conn-gcs-documents"},{slotId:"primaryOpenBanking",connectionId:"conn-powens-primary"},{slotId:"emailInbound",connectionId:"conn-gmail-threads"},{slotId:"emailOutbound",connectionId:"conn-postmark-outbound"},{slotId:"calendarScheduling",connectionId:"conn-google-calendar"},{slotId:"voicePlayback",connectionId:"conn-elevenlabs-voice"},{slotId:"smsNotifications",connectionId:"conn-twilio-sms"},{slotId:"paymentsProcessing",connectionId:"conn-stripe-recurring"}],knowledge:[{spaceKey:"knowledge.financial-docs",scope:{workflows:["pfo.workflow.process-uploaded-document","pfo.workflow.generate-financial-summary"]}},{spaceKey:"knowledge.email-threads",scope:{workflows:["pfo.workflow.ingest-email-threads"]}},{spaceKey:"knowledge.financial-overview",scope:{workflows:["pfo.workflow.sync-openbanking-transactions","pfo.workflow.refresh-openbanking-balances","pfo.workflow.generate-financial-summary","pfo.workflow.generate-openbanking-overview"]},required:!1}],locales:{defaultLocale:"en",enabledLocales:["en"]},notes:"Sample tenant configuration for hackathon demos. Replace connection IDs with tenant-specific bindings when provisioning."};var l=new Date,s={tenantId:"tenant.family-office",createdAt:l,updatedAt:l},T9=[{meta:{...s,id:"conn-mistral-primary",integrationKey:"ai-llm.mistral",integrationVersion:"1.0.0",label:"Mistral Primary"},ownershipMode:"managed",config:{model:"mistral-large-latest",embeddingModel:"mistral-embed"},secretProvider:"gcp-secret-manager",secretRef:"gcp://projects/pfo-hackathon/secrets/mistral-api-key/versions/latest",status:"connected",health:{status:"connected",checkedAt:l,latencyMs:180}},{meta:{...s,id:"conn-qdrant-finance",integrationKey:"vectordb.qdrant",integrationVersion:"1.0.0",label:"Qdrant Finance Cluster"},ownershipMode:"managed",config:{apiUrl:"https://qdrant.pfo.internal",collectionPrefix:"tenant-family-office"},secretProvider:"gcp-secret-manager",secretRef:"gcp://projects/pfo-hackathon/secrets/qdrant-api-key/versions/latest",status:"connected",health:{status:"connected",checkedAt:l,latencyMs:95}},{meta:{...s,id:"conn-gcs-documents",integrationKey:"storage.gcs",integrationVersion:"1.0.0",label:"GCS Documents Bucket"},ownershipMode:"managed",config:{bucket:"pfo-uploads",prefix:"financial-docs/"},secretProvider:"gcp-secret-manager",secretRef:"gcp://projects/pfo-hackathon/secrets/gcs-service-account/versions/latest",status:"connected",health:{status:"connected",checkedAt:l,latencyMs:60}},{meta:{...s,id:"conn-gmail-threads",integrationKey:"email.gmail",integrationVersion:"1.0.0",label:"Gmail Household Threads"},ownershipMode:"byok",config:{labelIds:["FINANCE","INBOX"],includeSpamTrash:!1},secretProvider:"gcp-secret-manager",secretRef:"gcp://projects/pfo-hackathon/secrets/gmail-refresh-token/versions/latest",status:"connected",health:{status:"connected",checkedAt:l,latencyMs:320}},{meta:{...s,id:"conn-postmark-outbound",integrationKey:"email.postmark",integrationVersion:"1.0.0",label:"Postmark Transactional"},ownershipMode:"managed",config:{messageStream:"outbound",fromEmail:"family.office@pfo.dev"},secretProvider:"gcp-secret-manager",secretRef:"gcp://projects/pfo-hackathon/secrets/postmark-server-token/versions/latest",status:"connected",health:{status:"connected",checkedAt:l,latencyMs:210}},{meta:{...s,id:"conn-google-calendar",integrationKey:"calendar.google",integrationVersion:"1.0.0",label:"Household Calendar"},ownershipMode:"managed",config:{calendarId:"primary"},secretProvider:"gcp-secret-manager",secretRef:"gcp://projects/pfo-hackathon/secrets/google-calendar-service-account/versions/latest",status:"connected",health:{status:"connected",checkedAt:l,latencyMs:140}},{meta:{...s,id:"conn-elevenlabs-voice",integrationKey:"ai-voice.elevenlabs",integrationVersion:"1.0.0",label:"ElevenLabs Voice"},ownershipMode:"byok",config:{defaultVoiceId:"pNInz6obpgDQGcFmaJgB"},secretProvider:"gcp-secret-manager",secretRef:"gcp://projects/pfo-hackathon/secrets/elevenlabs-api-key/versions/latest",status:"connected",health:{status:"connected",checkedAt:l,latencyMs:250}},{meta:{...s,id:"conn-twilio-sms",integrationKey:"sms.twilio",integrationVersion:"1.0.0",label:"Twilio SMS"},ownershipMode:"managed",config:{fromNumber:"+15552340000"},secretProvider:"gcp-secret-manager",secretRef:"gcp://projects/pfo-hackathon/secrets/twilio-auth-token/versions/latest",status:"connected",health:{status:"connected",checkedAt:l,latencyMs:180}},{meta:{...s,id:"conn-stripe-recurring",integrationKey:"payments.stripe",integrationVersion:"1.0.0",label:"Stripe Recurring Billing"},ownershipMode:"managed",config:{accountId:"acct_1PFOHACKATHON",region:"eu-west-1"},secretProvider:"gcp-secret-manager",secretRef:"gcp://projects/pfo-hackathon/secrets/stripe-secret-key/versions/latest",status:"connected",health:{status:"connected",checkedAt:l,latencyMs:220}},{meta:{...s,id:"conn-powens-primary",integrationKey:"openbanking.powens",integrationVersion:"1.0.0",label:"Powens Open Banking"},ownershipMode:"byok",config:{environment:"sandbox",baseUrl:"https://api-sandbox.powens.com/v2"},secretProvider:"gcp-secret-manager",secretRef:"gcp://projects/pfo-hackathon/secrets/powens-credentials/versions/latest",status:"connected",health:{status:"connected",checkedAt:l,latencyMs:410}}];function TW(J){return T9.find((X)=>X.meta.id===J)}var q0=new Date,vW=[{meta:{id:"source-financial-uploads",tenantId:"tenant.family-office",spaceKey:"knowledge.financial-docs",spaceVersion:"1.0.0",label:"Uploaded Financial Documents",sourceType:"file_upload",createdAt:q0,updatedAt:q0},config:{bucket:"pfo-uploads",prefix:"financial-docs/"},syncSchedule:{enabled:!0,intervalMs:900000},lastSync:{timestamp:q0,success:!0}},{meta:{id:"source-gmail-threads",tenantId:"tenant.family-office",spaceKey:"knowledge.email-threads",spaceVersion:"1.0.0",label:"Household Gmail Threads",sourceType:"email",createdAt:q0,updatedAt:q0},config:{labelIds:["INBOX","FINANCE"]},syncSchedule:{enabled:!0,intervalMs:300000},lastSync:{timestamp:q0,success:!0}},{meta:{id:"source-financial-overview",tenantId:"tenant.family-office",spaceKey:"knowledge.financial-overview",spaceVersion:"1.0.0",label:"Financial Overview",sourceType:"api",createdAt:q0,updatedAt:q0},config:{},syncSchedule:{enabled:!1}}];var gW=Object.freeze({status:"aborted"});function D(J,X,H){function W(Q,U){if(!Q._zod)Object.defineProperty(Q,"_zod",{value:{def:U,constr:z,traits:new Set},enumerable:!1});if(Q._zod.traits.has(J))return;Q._zod.traits.add(J),X(Q,U);let G=z.prototype,P=Object.keys(G);for(let B=0;B<P.length;B++){let $=P[B];if(!($ in Q))Q[$]=G[$].bind(Q)}}let q=H?.Parent??Object;class Y extends q{}Object.defineProperty(Y,"name",{value:J});function z(Q){var U;let G=H?.Parent?new Y:this;W(G,Q),(U=G._zod).deferred??(U.deferred=[]);for(let P of G._zod.deferred)P();return G}return Object.defineProperty(z,"init",{value:W}),Object.defineProperty(z,Symbol.hasInstance,{value:(Q)=>{if(H?.Parent&&Q instanceof H.Parent)return!0;return Q?._zod?.traits?.has(J)}}),Object.defineProperty(z,"name",{value:J}),z}var cW=Symbol("zod_brand");class J0 extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class b0 extends Error{constructor(J){super(`Encountered unidirectional transform during encode: ${J}`);this.name="ZodEncodeError"}}var f0={};function r(J){if(J)Object.assign(f0,J);return f0}var V={};_4(V,{unwrapMessage:()=>_0,uint8ArrayToHex:()=>qX,uint8ArrayToBase64url:()=>HX,uint8ArrayToBase64:()=>h4,stringifyPrimitive:()=>p0,slugify:()=>V1,shallowClone:()=>k4,safeExtend:()=>t9,required:()=>e9,randomString:()=>o9,propertyKeyTypes:()=>R1,promiseAllObject:()=>f9,primitiveTypes:()=>C4,prefixIssues:()=>X0,pick:()=>d9,partial:()=>s9,optionalKeys:()=>N1,omit:()=>n9,objectClone:()=>u9,numKeys:()=>l9,nullish:()=>C0,normalizeParams:()=>I,mergeDefs:()=>z0,merge:()=>a9,jsonStringifyReplacer:()=>$0,joinValues:()=>o0,issue:()=>A0,isPlainObject:()=>Q0,isObject:()=>I0,hexToUint8Array:()=>WX,getSizableOrigin:()=>j4,getParsedType:()=>r9,getLengthableOrigin:()=>j0,getEnumValues:()=>E0,getElementAtPath:()=>m9,floatSafeRemainder:()=>O1,finalizeIssue:()=>n,extend:()=>i9,escapeRegex:()=>D0,esc:()=>l0,defineLazy:()=>N,createTransparentProxy:()=>p9,cloneDef:()=>y9,clone:()=>d,cleanRegex:()=>S0,cleanEnum:()=>JX,captureStackTrace:()=>r0,cached:()=>k0,base64urlToUint8Array:()=>XX,base64ToUint8Array:()=>T4,assignProp:()=>Y0,assertNotEqual:()=>v9,assertNever:()=>g9,assertIs:()=>x9,assertEqual:()=>h9,assert:()=>c9,allowsEval:()=>K1,aborted:()=>w0,NUMBER_FORMAT_RANGES:()=>Z1,Class:()=>v4,BIGINT_FORMAT_RANGES:()=>S4});function h9(J){return J}function v9(J){return J}function x9(J){}function g9(J){throw Error("Unexpected value in exhaustive check")}function c9(J){}function E0(J){let X=Object.values(J).filter((W)=>typeof W==="number");return Object.entries(J).filter(([W,q])=>X.indexOf(+W)===-1).map(([W,q])=>q)}function o0(J,X="|"){return J.map((H)=>p0(H)).join(X)}function $0(J,X){if(typeof X==="bigint")return X.toString();return X}function k0(J){return{get value(){{let H=J();return Object.defineProperty(this,"value",{value:H}),H}throw Error("cached value already set")}}}function C0(J){return J===null||J===void 0}function S0(J){let X=J.startsWith("^")?1:0,H=J.endsWith("$")?J.length-1:J.length;return J.slice(X,H)}function O1(J,X){let H=(J.toString().split(".")[1]||"").length,W=X.toString(),q=(W.split(".")[1]||"").length;if(q===0&&/\d?e-\d?/.test(W)){let U=W.match(/\d?e-(\d?)/);if(U?.[1])q=Number.parseInt(U[1])}let Y=H>q?H:q,z=Number.parseInt(J.toFixed(Y).replace(".","")),Q=Number.parseInt(X.toFixed(Y).replace(".",""));return z%Q/10**Y}var E4=Symbol("evaluating");function N(J,X,H){let W=void 0;Object.defineProperty(J,X,{get(){if(W===E4)return;if(W===void 0)W=E4,W=H();return W},set(q){Object.defineProperty(J,X,{value:q})},configurable:!0})}function u9(J){return Object.create(Object.getPrototypeOf(J),Object.getOwnPropertyDescriptors(J))}function Y0(J,X,H){Object.defineProperty(J,X,{value:H,writable:!0,enumerable:!0,configurable:!0})}function z0(...J){let X={};for(let H of J){let W=Object.getOwnPropertyDescriptors(H);Object.assign(X,W)}return Object.defineProperties({},X)}function y9(J){return z0(J._zod.def)}function m9(J,X){if(!X)return J;return X.reduce((H,W)=>H?.[W],J)}function f9(J){let X=Object.keys(J),H=X.map((W)=>J[W]);return Promise.all(H).then((W)=>{let q={};for(let Y=0;Y<X.length;Y++)q[X[Y]]=W[Y];return q})}function o9(J=10){let H="";for(let W=0;W<J;W++)H+="abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)];return H}function l0(J){return JSON.stringify(J)}function V1(J){return J.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var r0="captureStackTrace"in Error?Error.captureStackTrace:(...J)=>{};function I0(J){return typeof J==="object"&&J!==null&&!Array.isArray(J)}var K1=k0(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(J){return!1}});function Q0(J){if(I0(J)===!1)return!1;let X=J.constructor;if(X===void 0)return!0;if(typeof X!=="function")return!0;let H=X.prototype;if(I0(H)===!1)return!1;if(Object.prototype.hasOwnProperty.call(H,"isPrototypeOf")===!1)return!1;return!0}function k4(J){if(Q0(J))return{...J};if(Array.isArray(J))return[...J];return J}function l9(J){let X=0;for(let H in J)if(Object.prototype.hasOwnProperty.call(J,H))X++;return X}var r9=(J)=>{let X=typeof J;switch(X){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(J)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":if(Array.isArray(J))return"array";if(J===null)return"null";if(J.then&&typeof J.then==="function"&&J.catch&&typeof J.catch==="function")return"promise";if(typeof Map<"u"&&J instanceof Map)return"map";if(typeof Set<"u"&&J instanceof Set)return"set";if(typeof Date<"u"&&J instanceof Date)return"date";if(typeof File<"u"&&J instanceof File)return"file";return"object";default:throw Error(`Unknown data type: ${X}`)}},R1=new Set(["string","number","symbol"]),C4=new Set(["string","number","bigint","boolean","symbol","undefined"]);function D0(J){return J.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function d(J,X,H){let W=new J._zod.constr(X??J._zod.def);if(!X||H?.parent)W._zod.parent=J;return W}function I(J){let X=J;if(!X)return{};if(typeof X==="string")return{error:()=>X};if(X?.message!==void 0){if(X?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");X.error=X.message}if(delete X.message,typeof X.error==="string")return{...X,error:()=>X.error};return X}function p9(J){let X;return new Proxy({},{get(H,W,q){return X??(X=J()),Reflect.get(X,W,q)},set(H,W,q,Y){return X??(X=J()),Reflect.set(X,W,q,Y)},has(H,W){return X??(X=J()),Reflect.has(X,W)},deleteProperty(H,W){return X??(X=J()),Reflect.deleteProperty(X,W)},ownKeys(H){return X??(X=J()),Reflect.ownKeys(X)},getOwnPropertyDescriptor(H,W){return X??(X=J()),Reflect.getOwnPropertyDescriptor(X,W)},defineProperty(H,W,q){return X??(X=J()),Reflect.defineProperty(X,W,q)}})}function p0(J){if(typeof J==="bigint")return J.toString()+"n";if(typeof J==="string")return`"${J}"`;return`${J}`}function N1(J){return Object.keys(J).filter((X)=>{return J[X]._zod.optin==="optional"&&J[X]._zod.optout==="optional"})}var Z1={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-340282346638528860000000000000000000000,340282346638528860000000000000000000000],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},S4={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function d9(J,X){let H=J._zod.def,W=z0(J._zod.def,{get shape(){let q={};for(let Y in X){if(!(Y in H.shape))throw Error(`Unrecognized key: "${Y}"`);if(!X[Y])continue;q[Y]=H.shape[Y]}return Y0(this,"shape",q),q},checks:[]});return d(J,W)}function n9(J,X){let H=J._zod.def,W=z0(J._zod.def,{get shape(){let q={...J._zod.def.shape};for(let Y in X){if(!(Y in H.shape))throw Error(`Unrecognized key: "${Y}"`);if(!X[Y])continue;delete q[Y]}return Y0(this,"shape",q),q},checks:[]});return d(J,W)}function i9(J,X){if(!Q0(X))throw Error("Invalid input to extend: expected a plain object");let H=J._zod.def.checks;if(H&&H.length>0)throw Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");let q=z0(J._zod.def,{get shape(){let Y={...J._zod.def.shape,...X};return Y0(this,"shape",Y),Y},checks:[]});return d(J,q)}function t9(J,X){if(!Q0(X))throw Error("Invalid input to safeExtend: expected a plain object");let H={...J._zod.def,get shape(){let W={...J._zod.def.shape,...X};return Y0(this,"shape",W),W},checks:J._zod.def.checks};return d(J,H)}function a9(J,X){let H=z0(J._zod.def,{get shape(){let W={...J._zod.def.shape,...X._zod.def.shape};return Y0(this,"shape",W),W},get catchall(){return X._zod.def.catchall},checks:[]});return d(J,H)}function s9(J,X,H){let W=z0(X._zod.def,{get shape(){let q=X._zod.def.shape,Y={...q};if(H)for(let z in H){if(!(z in q))throw Error(`Unrecognized key: "${z}"`);if(!H[z])continue;Y[z]=J?new J({type:"optional",innerType:q[z]}):q[z]}else for(let z in q)Y[z]=J?new J({type:"optional",innerType:q[z]}):q[z];return Y0(this,"shape",Y),Y},checks:[]});return d(X,W)}function e9(J,X,H){let W=z0(X._zod.def,{get shape(){let q=X._zod.def.shape,Y={...q};if(H)for(let z in H){if(!(z in Y))throw Error(`Unrecognized key: "${z}"`);if(!H[z])continue;Y[z]=new J({type:"nonoptional",innerType:q[z]})}else for(let z in q)Y[z]=new J({type:"nonoptional",innerType:q[z]});return Y0(this,"shape",Y),Y},checks:[]});return d(X,W)}function w0(J,X=0){if(J.aborted===!0)return!0;for(let H=X;H<J.issues.length;H++)if(J.issues[H]?.continue!==!0)return!0;return!1}function X0(J,X){return X.map((H)=>{var W;return(W=H).path??(W.path=[]),H.path.unshift(J),H})}function _0(J){return typeof J==="string"?J:J?.message}function n(J,X,H){let W={...J,path:J.path??[]};if(!J.message){let q=_0(J.inst?._zod.def?.error?.(J))??_0(X?.error?.(J))??_0(H.customError?.(J))??_0(H.localeError?.(J))??"Invalid input";W.message=q}if(delete W.inst,delete W.continue,!X?.reportInput)delete W.input;return W}function j4(J){if(J instanceof Set)return"set";if(J instanceof Map)return"map";if(J instanceof File)return"file";return"unknown"}function j0(J){if(Array.isArray(J))return"array";if(typeof J==="string")return"string";return"unknown"}function A0(...J){let[X,H,W]=J;if(typeof X==="string")return{message:X,code:"custom",input:H,inst:W};return{...X}}function JX(J){return Object.entries(J).filter(([X,H])=>{return Number.isNaN(Number.parseInt(X,10))}).map((X)=>X[1])}function T4(J){let X=atob(J),H=new Uint8Array(X.length);for(let W=0;W<X.length;W++)H[W]=X.charCodeAt(W);return H}function h4(J){let X="";for(let H=0;H<J.length;H++)X+=String.fromCharCode(J[H]);return btoa(X)}function XX(J){let X=J.replace(/-/g,"+").replace(/_/g,"/"),H="=".repeat((4-X.length%4)%4);return T4(X+H)}function HX(J){return h4(J).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function WX(J){let X=J.replace(/^0x/,"");if(X.length%2!==0)throw Error("Invalid hex string length");let H=new Uint8Array(X.length/2);for(let W=0;W<X.length;W+=2)H[W/2]=Number.parseInt(X.slice(W,W+2),16);return H}function qX(J){return Array.from(J).map((X)=>X.toString(16).padStart(2,"0")).join("")}class v4{constructor(...J){}}var x4=(J,X)=>{J.name="$ZodError",Object.defineProperty(J,"_zod",{value:J._zod,enumerable:!1}),Object.defineProperty(J,"issues",{value:X,enumerable:!1}),J.message=JSON.stringify(X,$0,2),Object.defineProperty(J,"toString",{value:()=>J.message,enumerable:!1})},d0=D("$ZodError",x4),L1=D("$ZodError",x4,{Parent:Error});function g4(J,X=(H)=>H.message){let H={},W=[];for(let q of J.issues)if(q.path.length>0)H[q.path[0]]=H[q.path[0]]||[],H[q.path[0]].push(X(q));else W.push(X(q));return{formErrors:W,fieldErrors:H}}function c4(J,X=(H)=>H.message){let H={_errors:[]},W=(q)=>{for(let Y of q.issues)if(Y.code==="invalid_union"&&Y.errors.length)Y.errors.map((z)=>W({issues:z}));else if(Y.code==="invalid_key")W({issues:Y.issues});else if(Y.code==="invalid_element")W({issues:Y.issues});else if(Y.path.length===0)H._errors.push(X(Y));else{let z=H,Q=0;while(Q<Y.path.length){let U=Y.path[Q];if(Q!==Y.path.length-1)z[U]=z[U]||{_errors:[]};else z[U]=z[U]||{_errors:[]},z[U]._errors.push(X(Y));z=z[U],Q++}}};return W(J),H}var n0=(J)=>(X,H,W,q)=>{let Y=W?Object.assign(W,{async:!1}):{async:!1},z=X._zod.run({value:H,issues:[]},Y);if(z instanceof Promise)throw new J0;if(z.issues.length){let Q=new(q?.Err??J)(z.issues.map((U)=>n(U,Y,r())));throw r0(Q,q?.callee),Q}return z.value};var i0=(J)=>async(X,H,W,q)=>{let Y=W?Object.assign(W,{async:!0}):{async:!0},z=X._zod.run({value:H,issues:[]},Y);if(z instanceof Promise)z=await z;if(z.issues.length){let Q=new(q?.Err??J)(z.issues.map((U)=>n(U,Y,r())));throw r0(Q,q?.callee),Q}return z.value};var T0=(J)=>(X,H,W)=>{let q=W?{...W,async:!1}:{async:!1},Y=X._zod.run({value:H,issues:[]},q);if(Y instanceof Promise)throw new J0;return Y.issues.length?{success:!1,error:new(J??d0)(Y.issues.map((z)=>n(z,q,r())))}:{success:!0,data:Y.value}},u4=T0(L1),h0=(J)=>async(X,H,W)=>{let q=W?Object.assign(W,{async:!0}):{async:!0},Y=X._zod.run({value:H,issues:[]},q);if(Y instanceof Promise)Y=await Y;return Y.issues.length?{success:!1,error:new J(Y.issues.map((z)=>n(z,q,r())))}:{success:!0,data:Y.value}},y4=h0(L1),m4=(J)=>(X,H,W)=>{let q=W?Object.assign(W,{direction:"backward"}):{direction:"backward"};return n0(J)(X,H,q)};var f4=(J)=>(X,H,W)=>{return n0(J)(X,H,W)};var o4=(J)=>async(X,H,W)=>{let q=W?Object.assign(W,{direction:"backward"}):{direction:"backward"};return i0(J)(X,H,q)};var l4=(J)=>async(X,H,W)=>{return i0(J)(X,H,W)};var r4=(J)=>(X,H,W)=>{let q=W?Object.assign(W,{direction:"backward"}):{direction:"backward"};return T0(J)(X,H,q)};var p4=(J)=>(X,H,W)=>{return T0(J)(X,H,W)};var d4=(J)=>async(X,H,W)=>{let q=W?Object.assign(W,{direction:"backward"}):{direction:"backward"};return h0(J)(X,H,q)};var n4=(J)=>async(X,H,W)=>{return h0(J)(X,H,W)};var i4=/^[cC][^\s-]{8,}$/,t4=/^[0-9a-z]+$/,a4=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,s4=/^[0-9a-vA-V]{20}$/,e4=/^[A-Za-z0-9]{27}$/,J6=/^[a-zA-Z0-9_-]{21}$/,X6=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;var H6=/^([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})$/,b1=(J)=>{if(!J)return/^([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)$/;return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${J}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`)};var W6=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;var zX="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function q6(){return new RegExp(zX,"u")}var Y6=/^(?:(?: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])$/,z6=/^(([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 Q6=/^((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])$/,w6=/^(([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])$/,G6=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,_1=/^[A-Za-z0-9_-]*$/;var U6=/^\+(?:[0-9]){6,14}[0-9]$/,D6="(?:(?:\\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])))",P6=new RegExp(`^${D6}$`);function B6(J){return typeof J.precision==="number"?J.precision===-1?"(?:[01]\\d|2[0-3]):[0-5]\\d":J.precision===0?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d":`(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{${J.precision}}`:"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function M6(J){return new RegExp(`^${B6(J)}$`)}function F6(J){let X=B6({precision:J.precision}),H=["Z"];if(J.local)H.push("");if(J.offset)H.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let W=`${X}(?:${H.join("|")})`;return new RegExp(`^${D6}T(?:${W})$`)}var I6=(J)=>{let X=J?`[\\s\\S]{${J?.minimum??0},${J?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${X}$`)},$6=/^-?\d+n?$/,A6=/^-?\d+$/,O6=/^-?\d+(?:\.\d+)?/,V6=/^(?:true|false)$/i;var K6=/^[^A-Z]*$/,R6=/^[^a-z]*$/;var c=D("$ZodCheck",(J,X)=>{var H;J._zod??(J._zod={}),J._zod.def=X,(H=J._zod).onattach??(H.onattach=[])}),N6={number:"number",bigint:"bigint",object:"date"},E1=D("$ZodCheckLessThan",(J,X)=>{c.init(J,X);let H=N6[typeof X.value];J._zod.onattach.push((W)=>{let q=W._zod.bag,Y=(X.inclusive?q.maximum:q.exclusiveMaximum)??Number.POSITIVE_INFINITY;if(X.value<Y)if(X.inclusive)q.maximum=X.value;else q.exclusiveMaximum=X.value}),J._zod.check=(W)=>{if(X.inclusive?W.value<=X.value:W.value<X.value)return;W.issues.push({origin:H,code:"too_big",maximum:X.value,input:W.value,inclusive:X.inclusive,inst:J,continue:!X.abort})}}),k1=D("$ZodCheckGreaterThan",(J,X)=>{c.init(J,X);let H=N6[typeof X.value];J._zod.onattach.push((W)=>{let q=W._zod.bag,Y=(X.inclusive?q.minimum:q.exclusiveMinimum)??Number.NEGATIVE_INFINITY;if(X.value>Y)if(X.inclusive)q.minimum=X.value;else q.exclusiveMinimum=X.value}),J._zod.check=(W)=>{if(X.inclusive?W.value>=X.value:W.value>X.value)return;W.issues.push({origin:H,code:"too_small",minimum:X.value,input:W.value,inclusive:X.inclusive,inst:J,continue:!X.abort})}}),Z6=D("$ZodCheckMultipleOf",(J,X)=>{c.init(J,X),J._zod.onattach.push((H)=>{var W;(W=H._zod.bag).multipleOf??(W.multipleOf=X.value)}),J._zod.check=(H)=>{if(typeof H.value!==typeof X.value)throw Error("Cannot mix number and bigint in multiple_of check.");if(typeof H.value==="bigint"?H.value%X.value===BigInt(0):O1(H.value,X.value)===0)return;H.issues.push({origin:typeof H.value,code:"not_multiple_of",divisor:X.value,input:H.value,inst:J,continue:!X.abort})}}),L6=D("$ZodCheckNumberFormat",(J,X)=>{c.init(J,X),X.format=X.format||"float64";let H=X.format?.includes("int"),W=H?"int":"number",[q,Y]=Z1[X.format];J._zod.onattach.push((z)=>{let Q=z._zod.bag;if(Q.format=X.format,Q.minimum=q,Q.maximum=Y,H)Q.pattern=A6}),J._zod.check=(z)=>{let Q=z.value;if(H){if(!Number.isInteger(Q)){z.issues.push({expected:W,format:X.format,code:"invalid_type",continue:!1,input:Q,inst:J});return}if(!Number.isSafeInteger(Q)){if(Q>0)z.issues.push({input:Q,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:J,origin:W,continue:!X.abort});else z.issues.push({input:Q,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:J,origin:W,continue:!X.abort});return}}if(Q<q)z.issues.push({origin:"number",input:Q,code:"too_small",minimum:q,inclusive:!0,inst:J,continue:!X.abort});if(Q>Y)z.issues.push({origin:"number",input:Q,code:"too_big",maximum:Y,inst:J})}});var b6=D("$ZodCheckMaxLength",(J,X)=>{var H;c.init(J,X),(H=J._zod.def).when??(H.when=(W)=>{let q=W.value;return!C0(q)&&q.length!==void 0}),J._zod.onattach.push((W)=>{let q=W._zod.bag.maximum??Number.POSITIVE_INFINITY;if(X.maximum<q)W._zod.bag.maximum=X.maximum}),J._zod.check=(W)=>{let q=W.value;if(q.length<=X.maximum)return;let z=j0(q);W.issues.push({origin:z,code:"too_big",maximum:X.maximum,inclusive:!0,input:q,inst:J,continue:!X.abort})}}),_6=D("$ZodCheckMinLength",(J,X)=>{var H;c.init(J,X),(H=J._zod.def).when??(H.when=(W)=>{let q=W.value;return!C0(q)&&q.length!==void 0}),J._zod.onattach.push((W)=>{let q=W._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(X.minimum>q)W._zod.bag.minimum=X.minimum}),J._zod.check=(W)=>{let q=W.value;if(q.length>=X.minimum)return;let z=j0(q);W.issues.push({origin:z,code:"too_small",minimum:X.minimum,inclusive:!0,input:q,inst:J,continue:!X.abort})}}),E6=D("$ZodCheckLengthEquals",(J,X)=>{var H;c.init(J,X),(H=J._zod.def).when??(H.when=(W)=>{let q=W.value;return!C0(q)&&q.length!==void 0}),J._zod.onattach.push((W)=>{let q=W._zod.bag;q.minimum=X.length,q.maximum=X.length,q.length=X.length}),J._zod.check=(W)=>{let q=W.value,Y=q.length;if(Y===X.length)return;let z=j0(q),Q=Y>X.length;W.issues.push({origin:z,...Q?{code:"too_big",maximum:X.length}:{code:"too_small",minimum:X.length},inclusive:!0,exact:!0,input:W.value,inst:J,continue:!X.abort})}}),v0=D("$ZodCheckStringFormat",(J,X)=>{var H,W;if(c.init(J,X),J._zod.onattach.push((q)=>{let Y=q._zod.bag;if(Y.format=X.format,X.pattern)Y.patterns??(Y.patterns=new Set),Y.patterns.add(X.pattern)}),X.pattern)(H=J._zod).check??(H.check=(q)=>{if(X.pattern.lastIndex=0,X.pattern.test(q.value))return;q.issues.push({origin:"string",code:"invalid_format",format:X.format,input:q.value,...X.pattern?{pattern:X.pattern.toString()}:{},inst:J,continue:!X.abort})});else(W=J._zod).check??(W.check=()=>{})}),k6=D("$ZodCheckRegex",(J,X)=>{v0.init(J,X),J._zod.check=(H)=>{if(X.pattern.lastIndex=0,X.pattern.test(H.value))return;H.issues.push({origin:"string",code:"invalid_format",format:"regex",input:H.value,pattern:X.pattern.toString(),inst:J,continue:!X.abort})}}),C6=D("$ZodCheckLowerCase",(J,X)=>{X.pattern??(X.pattern=K6),v0.init(J,X)}),S6=D("$ZodCheckUpperCase",(J,X)=>{X.pattern??(X.pattern=R6),v0.init(J,X)}),j6=D("$ZodCheckIncludes",(J,X)=>{c.init(J,X);let H=D0(X.includes),W=new RegExp(typeof X.position==="number"?`^.{${X.position}}${H}`:H);X.pattern=W,J._zod.onattach.push((q)=>{let Y=q._zod.bag;Y.patterns??(Y.patterns=new Set),Y.patterns.add(W)}),J._zod.check=(q)=>{if(q.value.includes(X.includes,X.position))return;q.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:X.includes,input:q.value,inst:J,continue:!X.abort})}}),T6=D("$ZodCheckStartsWith",(J,X)=>{c.init(J,X);let H=new RegExp(`^${D0(X.prefix)}.*`);X.pattern??(X.pattern=H),J._zod.onattach.push((W)=>{let q=W._zod.bag;q.patterns??(q.patterns=new Set),q.patterns.add(H)}),J._zod.check=(W)=>{if(W.value.startsWith(X.prefix))return;W.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:X.prefix,input:W.value,inst:J,continue:!X.abort})}}),h6=D("$ZodCheckEndsWith",(J,X)=>{c.init(J,X);let H=new RegExp(`.*${D0(X.suffix)}$`);X.pattern??(X.pattern=H),J._zod.onattach.push((W)=>{let q=W._zod.bag;q.patterns??(q.patterns=new Set),q.patterns.add(H)}),J._zod.check=(W)=>{if(W.value.endsWith(X.suffix))return;W.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:X.suffix,input:W.value,inst:J,continue:!X.abort})}});var v6=D("$ZodCheckOverwrite",(J,X)=>{c.init(J,X),J._zod.check=(H)=>{H.value=X.tx(H.value)}});class C1{constructor(J=[]){if(this.content=[],this.indent=0,this)this.args=J}indented(J){this.indent+=1,J(this),this.indent-=1}write(J){if(typeof J==="function"){J(this,{execution:"sync"}),J(this,{execution:"async"});return}let H=J.split(`
|
|
2
2
|
`).filter((Y)=>Y),W=Math.min(...H.map((Y)=>Y.length-Y.trimStart().length)),q=H.map((Y)=>Y.slice(W)).map((Y)=>" ".repeat(this.indent*2)+Y);for(let Y of q)this.content.push(Y)}compile(){let J=Function,X=this?.args,W=[...(this?.content??[""]).map((q)=>` ${q}`)];return new J(...X,W.join(`
|
|
3
|
-
`))}}var g6={major:4,minor:2,patch:1};var L=
|
|
3
|
+
`))}}var g6={major:4,minor:2,patch:1};var L=D("$ZodType",(J,X)=>{var H;J??(J={}),J._zod.def=X,J._zod.bag=J._zod.bag||{},J._zod.version=g6;let W=[...J._zod.def.checks??[]];if(J._zod.traits.has("$ZodCheck"))W.unshift(J);for(let q of W)for(let Y of q._zod.onattach)Y(J);if(W.length===0)(H=J._zod).deferred??(H.deferred=[]),J._zod.deferred?.push(()=>{J._zod.run=J._zod.parse});else{let q=(z,Q,U)=>{let G=w0(z),P;for(let B of Q){if(B._zod.def.when){if(!B._zod.def.when(z))continue}else if(G)continue;let $=z.issues.length,F=B._zod.check(z);if(F instanceof Promise&&U?.async===!1)throw new J0;if(P||F instanceof Promise)P=(P??Promise.resolve()).then(async()=>{if(await F,z.issues.length===$)return;if(!G)G=w0(z,$)});else{if(z.issues.length===$)continue;if(!G)G=w0(z,$)}}if(P)return P.then(()=>{return z});return z},Y=(z,Q,U)=>{if(w0(z))return z.aborted=!0,z;let G=q(Q,W,U);if(G instanceof Promise){if(U.async===!1)throw new J0;return G.then((P)=>J._zod.parse(P,U))}return J._zod.parse(G,U)};J._zod.run=(z,Q)=>{if(Q.skipChecks)return J._zod.parse(z,Q);if(Q.direction==="backward"){let G=J._zod.parse({value:z.value,issues:[]},{...Q,skipChecks:!0});if(G instanceof Promise)return G.then((P)=>{return Y(P,z,Q)});return Y(G,z,Q)}let U=J._zod.parse(z,Q);if(U instanceof Promise){if(Q.async===!1)throw new J0;return U.then((G)=>q(G,W,Q))}return q(U,W,Q)}}J["~standard"]={validate:(q)=>{try{let Y=u4(J,q);return Y.success?{value:Y.data}:{issues:Y.error?.issues}}catch(Y){return y4(J,q).then((z)=>z.success?{value:z.data}:{issues:z.error?.issues})}},vendor:"zod",version:1}}),e0=D("$ZodString",(J,X)=>{L.init(J,X),J._zod.pattern=[...J?._zod.bag?.patterns??[]].pop()??I6(J._zod.bag),J._zod.parse=(H,W)=>{if(X.coerce)try{H.value=String(H.value)}catch(q){}if(typeof H.value==="string")return H;return H.issues.push({expected:"string",code:"invalid_type",input:H.value,inst:J}),H}}),b=D("$ZodStringFormat",(J,X)=>{v0.init(J,X),e0.init(J,X)}),p6=D("$ZodGUID",(J,X)=>{X.pattern??(X.pattern=H6),b.init(J,X)}),d6=D("$ZodUUID",(J,X)=>{if(X.version){let W={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[X.version];if(W===void 0)throw Error(`Invalid UUID version: "${X.version}"`);X.pattern??(X.pattern=b1(W))}else X.pattern??(X.pattern=b1());b.init(J,X)}),n6=D("$ZodEmail",(J,X)=>{X.pattern??(X.pattern=W6),b.init(J,X)}),i6=D("$ZodURL",(J,X)=>{b.init(J,X),J._zod.check=(H)=>{try{let W=H.value.trim(),q=new URL(W);if(X.hostname){if(X.hostname.lastIndex=0,!X.hostname.test(q.hostname))H.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:X.hostname.source,input:H.value,inst:J,continue:!X.abort})}if(X.protocol){if(X.protocol.lastIndex=0,!X.protocol.test(q.protocol.endsWith(":")?q.protocol.slice(0,-1):q.protocol))H.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:X.protocol.source,input:H.value,inst:J,continue:!X.abort})}if(X.normalize)H.value=q.href;else H.value=W;return}catch(W){H.issues.push({code:"invalid_format",format:"url",input:H.value,inst:J,continue:!X.abort})}}}),t6=D("$ZodEmoji",(J,X)=>{X.pattern??(X.pattern=q6()),b.init(J,X)}),a6=D("$ZodNanoID",(J,X)=>{X.pattern??(X.pattern=J6),b.init(J,X)}),s6=D("$ZodCUID",(J,X)=>{X.pattern??(X.pattern=i4),b.init(J,X)}),e6=D("$ZodCUID2",(J,X)=>{X.pattern??(X.pattern=t4),b.init(J,X)}),J8=D("$ZodULID",(J,X)=>{X.pattern??(X.pattern=a4),b.init(J,X)}),X8=D("$ZodXID",(J,X)=>{X.pattern??(X.pattern=s4),b.init(J,X)}),H8=D("$ZodKSUID",(J,X)=>{X.pattern??(X.pattern=e4),b.init(J,X)}),W8=D("$ZodISODateTime",(J,X)=>{X.pattern??(X.pattern=F6(X)),b.init(J,X)}),q8=D("$ZodISODate",(J,X)=>{X.pattern??(X.pattern=P6),b.init(J,X)}),Y8=D("$ZodISOTime",(J,X)=>{X.pattern??(X.pattern=M6(X)),b.init(J,X)}),z8=D("$ZodISODuration",(J,X)=>{X.pattern??(X.pattern=X6),b.init(J,X)}),Q8=D("$ZodIPv4",(J,X)=>{X.pattern??(X.pattern=Y6),b.init(J,X),J._zod.bag.format="ipv4"}),w8=D("$ZodIPv6",(J,X)=>{X.pattern??(X.pattern=z6),b.init(J,X),J._zod.bag.format="ipv6",J._zod.check=(H)=>{try{new URL(`http://[${H.value}]`)}catch{H.issues.push({code:"invalid_format",format:"ipv6",input:H.value,inst:J,continue:!X.abort})}}});var G8=D("$ZodCIDRv4",(J,X)=>{X.pattern??(X.pattern=Q6),b.init(J,X)}),U8=D("$ZodCIDRv6",(J,X)=>{X.pattern??(X.pattern=w6),b.init(J,X),J._zod.check=(H)=>{let W=H.value.split("/");try{if(W.length!==2)throw Error();let[q,Y]=W;if(!Y)throw Error();let z=Number(Y);if(`${z}`!==Y)throw Error();if(z<0||z>128)throw Error();new URL(`http://[${q}]`)}catch{H.issues.push({code:"invalid_format",format:"cidrv6",input:H.value,inst:J,continue:!X.abort})}}});function D8(J){if(J==="")return!0;if(J.length%4!==0)return!1;try{return atob(J),!0}catch{return!1}}var P8=D("$ZodBase64",(J,X)=>{X.pattern??(X.pattern=G6),b.init(J,X),J._zod.bag.contentEncoding="base64",J._zod.check=(H)=>{if(D8(H.value))return;H.issues.push({code:"invalid_format",format:"base64",input:H.value,inst:J,continue:!X.abort})}});function QX(J){if(!_1.test(J))return!1;let X=J.replace(/[-_]/g,(W)=>W==="-"?"+":"/"),H=X.padEnd(Math.ceil(X.length/4)*4,"=");return D8(H)}var B8=D("$ZodBase64URL",(J,X)=>{X.pattern??(X.pattern=_1),b.init(J,X),J._zod.bag.contentEncoding="base64url",J._zod.check=(H)=>{if(QX(H.value))return;H.issues.push({code:"invalid_format",format:"base64url",input:H.value,inst:J,continue:!X.abort})}}),M8=D("$ZodE164",(J,X)=>{X.pattern??(X.pattern=U6),b.init(J,X)});function wX(J,X=null){try{let H=J.split(".");if(H.length!==3)return!1;let[W]=H;if(!W)return!1;let q=JSON.parse(atob(W));if("typ"in q&&q?.typ!=="JWT")return!1;if(!q.alg)return!1;if(X&&(!("alg"in q)||q.alg!==X))return!1;return!0}catch{return!1}}var F8=D("$ZodJWT",(J,X)=>{b.init(J,X),J._zod.check=(H)=>{if(wX(H.value,X.alg))return;H.issues.push({code:"invalid_format",format:"jwt",input:H.value,inst:J,continue:!X.abort})}});var j1=D("$ZodNumber",(J,X)=>{L.init(J,X),J._zod.pattern=J._zod.bag.pattern??O6,J._zod.parse=(H,W)=>{if(X.coerce)try{H.value=Number(H.value)}catch(z){}let q=H.value;if(typeof q==="number"&&!Number.isNaN(q)&&Number.isFinite(q))return H;let Y=typeof q==="number"?Number.isNaN(q)?"NaN":!Number.isFinite(q)?"Infinity":void 0:void 0;return H.issues.push({expected:"number",code:"invalid_type",input:q,inst:J,...Y?{received:Y}:{}}),H}}),I8=D("$ZodNumberFormat",(J,X)=>{L6.init(J,X),j1.init(J,X)}),$8=D("$ZodBoolean",(J,X)=>{L.init(J,X),J._zod.pattern=V6,J._zod.parse=(H,W)=>{if(X.coerce)try{H.value=Boolean(H.value)}catch(Y){}let q=H.value;if(typeof q==="boolean")return H;return H.issues.push({expected:"boolean",code:"invalid_type",input:q,inst:J}),H}}),A8=D("$ZodBigInt",(J,X)=>{L.init(J,X),J._zod.pattern=$6,J._zod.parse=(H,W)=>{if(X.coerce)try{H.value=BigInt(H.value)}catch(q){}if(typeof H.value==="bigint")return H;return H.issues.push({expected:"bigint",code:"invalid_type",input:H.value,inst:J}),H}});var O8=D("$ZodAny",(J,X)=>{L.init(J,X),J._zod.parse=(H)=>H}),V8=D("$ZodUnknown",(J,X)=>{L.init(J,X),J._zod.parse=(H)=>H}),K8=D("$ZodNever",(J,X)=>{L.init(J,X),J._zod.parse=(H,W)=>{return H.issues.push({expected:"never",code:"invalid_type",input:H.value,inst:J}),H}});var R8=D("$ZodDate",(J,X)=>{L.init(J,X),J._zod.parse=(H,W)=>{if(X.coerce)try{H.value=new Date(H.value)}catch(Q){}let q=H.value,Y=q instanceof Date;if(Y&&!Number.isNaN(q.getTime()))return H;return H.issues.push({expected:"date",code:"invalid_type",input:q,...Y?{received:"Invalid Date"}:{},inst:J}),H}});function c6(J,X,H){if(J.issues.length)X.issues.push(...X0(H,J.issues));X.value[H]=J.value}var N8=D("$ZodArray",(J,X)=>{L.init(J,X),J._zod.parse=(H,W)=>{let q=H.value;if(!Array.isArray(q))return H.issues.push({expected:"array",code:"invalid_type",input:q,inst:J}),H;H.value=Array(q.length);let Y=[];for(let z=0;z<q.length;z++){let Q=q[z],U=X.element._zod.run({value:Q,issues:[]},W);if(U instanceof Promise)Y.push(U.then((G)=>c6(G,H,z)));else c6(U,H,z)}if(Y.length)return Promise.all(Y).then(()=>H);return H}});function s0(J,X,H,W){if(J.issues.length)X.issues.push(...X0(H,J.issues));if(J.value===void 0){if(H in W)X.value[H]=void 0}else X.value[H]=J.value}function Z8(J){let X=Object.keys(J.shape);for(let W of X)if(!J.shape?.[W]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${W}": expected a Zod schema`);let H=N1(J.shape);return{...J,keys:X,keySet:new Set(X),numKeys:X.length,optionalKeys:new Set(H)}}function L8(J,X,H,W,q,Y){let z=[],Q=q.keySet,U=q.catchall._zod,G=U.def.type;for(let P in X){if(Q.has(P))continue;if(G==="never"){z.push(P);continue}let B=U.run({value:X[P],issues:[]},W);if(B instanceof Promise)J.push(B.then(($)=>s0($,H,P,X)));else s0(B,H,P,X)}if(z.length)H.issues.push({code:"unrecognized_keys",keys:z,input:X,inst:Y});if(!J.length)return H;return Promise.all(J).then(()=>{return H})}var GX=D("$ZodObject",(J,X)=>{if(L.init(J,X),!Object.getOwnPropertyDescriptor(X,"shape")?.get){let Q=X.shape;Object.defineProperty(X,"shape",{get:()=>{let U={...Q};return Object.defineProperty(X,"shape",{value:U}),U}})}let W=k0(()=>Z8(X));N(J._zod,"propValues",()=>{let Q=X.shape,U={};for(let G in Q){let P=Q[G]._zod;if(P.values){U[G]??(U[G]=new Set);for(let B of P.values)U[G].add(B)}}return U});let q=I0,Y=X.catchall,z;J._zod.parse=(Q,U)=>{z??(z=W.value);let G=Q.value;if(!q(G))return Q.issues.push({expected:"object",code:"invalid_type",input:G,inst:J}),Q;Q.value={};let P=[],B=z.shape;for(let $ of z.keys){let k=B[$]._zod.run({value:G[$],issues:[]},U);if(k instanceof Promise)P.push(k.then((h)=>s0(h,Q,$,G)));else s0(k,Q,$,G)}if(!Y)return P.length?Promise.all(P).then(()=>Q):Q;return L8(P,G,Q,U,W.value,J)}}),b8=D("$ZodObjectJIT",(J,X)=>{GX.init(J,X);let H=J._zod.parse,W=k0(()=>Z8(X)),q=($)=>{let F=new C1(["shape","payload","ctx"]),k=W.value,h=(g)=>{let x=l0(g);return`shape[${x}]._zod.run({ value: input[${x}], issues: [] }, ctx)`};F.write("const input = payload.value;");let W0=Object.create(null),p=0;for(let g of k.keys)W0[g]=`key_${p++}`;F.write("const newResult = {};");for(let g of k.keys){let x=W0[g],e=l0(g);F.write(`const ${x} = ${h(g)};`),F.write(`
|
|
4
4
|
if (${x}.issues.length) {
|
|
5
5
|
payload.issues = payload.issues.concat(${x}.issues.map(iss => ({
|
|
6
6
|
...iss,
|
|
@@ -17,33 +17,33 @@ var k9=Object.defineProperty;var _4=(J,X)=>{for(var H in X)k9(J,H,{get:X[H],enum
|
|
|
17
17
|
newResult[${e}] = ${x}.value;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
`)}F.write("payload.value = newResult;"),F.write("return payload;");let f1=F.compile();return(g,x)=>f1($,g,x)},Y,z=I1,Q=!o1.jitless,D=Q&&R0.value,P=X.catchall,B;J._zod.parse=($,F)=>{B??(B=W.value);let C=$.value;if(!z(C))return $.issues.push({expected:"object",code:"invalid_type",input:C,inst:J}),$;if(Q&&D&&F?.async===!1&&F.jitless!==!0){if(!Y)Y=q(X.shape);if($=Y($,F),!P)return $;return L8([],C,$,F,B,J)}return H($,F)}});function u6(J,X,H,W){for(let Y of J)if(Y.issues.length===0)return X.value=Y.value,X;let q=J.filter((Y)=>!w1(Y));if(q.length===1)return X.value=q[0].value,q[0];return X.issues.push({code:"invalid_union",input:X.value,inst:H,errors:J.map((Y)=>Y.issues.map((z)=>n(z,W,r())))}),X}var _8=U("$ZodUnion",(J,X)=>{L.init(J,X),N(J._zod,"optin",()=>X.options.some((q)=>q._zod.optin==="optional")?"optional":void 0),N(J._zod,"optout",()=>X.options.some((q)=>q._zod.optout==="optional")?"optional":void 0),N(J._zod,"values",()=>{if(X.options.every((q)=>q._zod.values))return new Set(X.options.flatMap((q)=>Array.from(q._zod.values)));return}),N(J._zod,"pattern",()=>{if(X.options.every((q)=>q._zod.pattern)){let q=X.options.map((Y)=>Y._zod.pattern);return new RegExp(`^(${q.map((Y)=>k1(Y.source)).join("|")})$`)}return});let H=X.options.length===1,W=X.options[0]._zod.run;J._zod.parse=(q,Y)=>{if(H)return W(q,Y);let z=!1,Q=[];for(let G of X.options){let D=G._zod.run({value:q.value,issues:[]},Y);if(D instanceof Promise)Q.push(D),z=!0;else{if(D.issues.length===0)return D;Q.push(D)}}if(!z)return u6(Q,q,J,Y);return Promise.all(Q).then((G)=>{return u6(G,q,J,Y)})}});var E8=U("$ZodIntersection",(J,X)=>{L.init(J,X),J._zod.parse=(H,W)=>{let q=H.value,Y=X.left._zod.run({value:q,issues:[]},W),z=X.right._zod.run({value:q,issues:[]},W);if(Y instanceof Promise||z instanceof Promise)return Promise.all([Y,z]).then(([G,D])=>{return y6(H,G,D)});return y6(H,Y,z)}});function j0(J,X){if(J===X)return{valid:!0,data:J};if(J instanceof Date&&X instanceof Date&&+J===+X)return{valid:!0,data:J};if(Q1(J)&&Q1(X)){let H=Object.keys(X),W=Object.keys(J).filter((Y)=>H.indexOf(Y)!==-1),q={...J,...X};for(let Y of W){let z=j0(J[Y],X[Y]);if(!z.valid)return{valid:!1,mergeErrorPath:[Y,...z.mergeErrorPath]};q[Y]=z.data}return{valid:!0,data:q}}if(Array.isArray(J)&&Array.isArray(X)){if(J.length!==X.length)return{valid:!1,mergeErrorPath:[]};let H=[];for(let W=0;W<J.length;W++){let q=J[W],Y=X[W],z=j0(q,Y);if(!z.valid)return{valid:!1,mergeErrorPath:[W,...z.mergeErrorPath]};H.push(z.data)}return{valid:!0,data:H}}return{valid:!1,mergeErrorPath:[]}}function y6(J,X,H){if(X.issues.length)J.issues.push(...X.issues);if(H.issues.length)J.issues.push(...H.issues);if(w1(J))return J;let W=j0(X.value,H.value);if(!W.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(W.mergeErrorPath)}`);return J.value=W.data,J}var C8=U("$ZodRecord",(J,X)=>{L.init(J,X),J._zod.parse=(H,W)=>{let q=H.value;if(!Q1(q))return H.issues.push({expected:"record",code:"invalid_type",input:q,inst:J}),H;let Y=[],z=X.keyType._zod.values;if(z){H.value={};let Q=new Set;for(let D of z)if(typeof D==="string"||typeof D==="number"||typeof D==="symbol"){Q.add(typeof D==="number"?D.toString():D);let P=X.valueType._zod.run({value:q[D],issues:[]},W);if(P instanceof Promise)Y.push(P.then((B)=>{if(B.issues.length)H.issues.push(...X1(D,B.issues));H.value[D]=B.value}));else{if(P.issues.length)H.issues.push(...X1(D,P.issues));H.value[D]=P.value}}let G;for(let D in q)if(!Q.has(D))G=G??[],G.push(D);if(G&&G.length>0)H.issues.push({code:"unrecognized_keys",input:q,inst:J,keys:G})}else{H.value={};for(let Q of Reflect.ownKeys(q)){if(Q==="__proto__")continue;let G=X.keyType._zod.run({value:Q,issues:[]},W);if(G instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(G.issues.length){if(X.mode==="loose")H.value[Q]=q[Q];else H.issues.push({code:"invalid_key",origin:"record",issues:G.issues.map((P)=>n(P,W,r())),input:Q,path:[Q],inst:J});continue}let D=X.valueType._zod.run({value:q[Q],issues:[]},W);if(D instanceof Promise)Y.push(D.then((P)=>{if(P.issues.length)H.issues.push(...X1(Q,P.issues));H.value[G.value]=P.value}));else{if(D.issues.length)H.issues.push(...X1(Q,D.issues));H.value[G.value]=D.value}}}if(Y.length)return Promise.all(Y).then(()=>H);return H}});var S8=U("$ZodEnum",(J,X)=>{L.init(J,X);let H=E1(X.entries),W=new Set(H);J._zod.values=W,J._zod.pattern=new RegExp(`^(${H.filter((q)=>N0.has(typeof q)).map((q)=>typeof q==="string"?U1(q):q.toString()).join("|")})$`),J._zod.parse=(q,Y)=>{let z=q.value;if(W.has(z))return q;return q.issues.push({code:"invalid_value",values:H,input:z,inst:J}),q}});var k8=U("$ZodTransform",(J,X)=>{L.init(J,X),J._zod.parse=(H,W)=>{if(W.direction==="backward")throw new b1(J.constructor.name);let q=X.transform(H.value,H);if(W.async)return(q instanceof Promise?q:Promise.resolve(q)).then((z)=>{return H.value=z,H});if(q instanceof Promise)throw new J1;return H.value=q,H}});function m6(J,X){if(J.issues.length&&X===void 0)return{issues:[],value:void 0};return J}var j8=U("$ZodOptional",(J,X)=>{L.init(J,X),J._zod.optin="optional",J._zod.optout="optional",N(J._zod,"values",()=>{return X.innerType._zod.values?new Set([...X.innerType._zod.values,void 0]):void 0}),N(J._zod,"pattern",()=>{let H=X.innerType._zod.pattern;return H?new RegExp(`^(${k1(H.source)})?$`):void 0}),J._zod.parse=(H,W)=>{if(X.innerType._zod.optin==="optional"){let q=X.innerType._zod.run(H,W);if(q instanceof Promise)return q.then((Y)=>m6(Y,H.value));return m6(q,H.value)}if(H.value===void 0)return H;return X.innerType._zod.run(H,W)}}),T8=U("$ZodNullable",(J,X)=>{L.init(J,X),N(J._zod,"optin",()=>X.innerType._zod.optin),N(J._zod,"optout",()=>X.innerType._zod.optout),N(J._zod,"pattern",()=>{let H=X.innerType._zod.pattern;return H?new RegExp(`^(${k1(H.source)}|null)$`):void 0}),N(J._zod,"values",()=>{return X.innerType._zod.values?new Set([...X.innerType._zod.values,null]):void 0}),J._zod.parse=(H,W)=>{if(H.value===null)return H;return X.innerType._zod.run(H,W)}}),h8=U("$ZodDefault",(J,X)=>{L.init(J,X),J._zod.optin="optional",N(J._zod,"values",()=>X.innerType._zod.values),J._zod.parse=(H,W)=>{if(W.direction==="backward")return X.innerType._zod.run(H,W);if(H.value===void 0)return H.value=X.defaultValue,H;let q=X.innerType._zod.run(H,W);if(q instanceof Promise)return q.then((Y)=>f6(Y,X));return f6(q,X)}});function f6(J,X){if(J.value===void 0)J.value=X.defaultValue;return J}var v8=U("$ZodPrefault",(J,X)=>{L.init(J,X),J._zod.optin="optional",N(J._zod,"values",()=>X.innerType._zod.values),J._zod.parse=(H,W)=>{if(W.direction==="backward")return X.innerType._zod.run(H,W);if(H.value===void 0)H.value=X.defaultValue;return X.innerType._zod.run(H,W)}}),x8=U("$ZodNonOptional",(J,X)=>{L.init(J,X),N(J._zod,"values",()=>{let H=X.innerType._zod.values;return H?new Set([...H].filter((W)=>W!==void 0)):void 0}),J._zod.parse=(H,W)=>{let q=X.innerType._zod.run(H,W);if(q instanceof Promise)return q.then((Y)=>o6(Y,J));return o6(q,J)}});function o6(J,X){if(!J.issues.length&&J.value===void 0)J.issues.push({code:"invalid_type",expected:"nonoptional",input:J.value,inst:X});return J}var g8=U("$ZodCatch",(J,X)=>{L.init(J,X),N(J._zod,"optin",()=>X.innerType._zod.optin),N(J._zod,"optout",()=>X.innerType._zod.optout),N(J._zod,"values",()=>X.innerType._zod.values),J._zod.parse=(H,W)=>{if(W.direction==="backward")return X.innerType._zod.run(H,W);let q=X.innerType._zod.run(H,W);if(q instanceof Promise)return q.then((Y)=>{if(H.value=Y.value,Y.issues.length)H.value=X.catchValue({...H,error:{issues:Y.issues.map((z)=>n(z,W,r()))},input:H.value}),H.issues=[];return H});if(H.value=q.value,q.issues.length)H.value=X.catchValue({...H,error:{issues:q.issues.map((Y)=>n(Y,W,r()))},input:H.value}),H.issues=[];return H}});var c8=U("$ZodPipe",(J,X)=>{L.init(J,X),N(J._zod,"values",()=>X.in._zod.values),N(J._zod,"optin",()=>X.in._zod.optin),N(J._zod,"optout",()=>X.out._zod.optout),N(J._zod,"propValues",()=>X.in._zod.propValues),J._zod.parse=(H,W)=>{if(W.direction==="backward"){let Y=X.out._zod.run(H,W);if(Y instanceof Promise)return Y.then((z)=>s1(z,X.in,W));return s1(Y,X.in,W)}let q=X.in._zod.run(H,W);if(q instanceof Promise)return q.then((Y)=>s1(Y,X.out,W));return s1(q,X.out,W)}});function s1(J,X,H){if(J.issues.length)return J.aborted=!0,J;return X._zod.run({value:J.value,issues:J.issues},H)}var u8=U("$ZodReadonly",(J,X)=>{L.init(J,X),N(J._zod,"propValues",()=>X.innerType._zod.propValues),N(J._zod,"values",()=>X.innerType._zod.values),N(J._zod,"optin",()=>X.innerType?._zod?.optin),N(J._zod,"optout",()=>X.innerType?._zod?.optout),J._zod.parse=(H,W)=>{if(W.direction==="backward")return X.innerType._zod.run(H,W);let q=X.innerType._zod.run(H,W);if(q instanceof Promise)return q.then(l6);return l6(q)}});function l6(J){return J.value=Object.freeze(J.value),J}var y8=U("$ZodCustom",(J,X)=>{c.init(J,X),L.init(J,X),J._zod.parse=(H,W)=>{return H},J._zod.check=(H)=>{let W=H.value,q=X.fn(W);if(q instanceof Promise)return q.then((Y)=>r6(Y,H,W,J));r6(q,H,W,J);return}});function r6(J,X,H,W){if(!J){let q={code:"custom",input:H,inst:W,path:[...W._zod.def.path??[]],continue:!W._zod.def.abort};if(W._zod.def.params)q.params=W._zod.def.params;X.issues.push(A1(q))}}var GX=(J)=>{let X=typeof J;switch(X){case"number":return Number.isNaN(J)?"NaN":"number";case"object":{if(Array.isArray(J))return"array";if(J===null)return"null";if(Object.getPrototypeOf(J)!==Object.prototype&&J.constructor)return J.constructor.name}}return X},UX=()=>{let J={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function X(W){return J[W]??null}let H={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"};return(W)=>{switch(W.code){case"invalid_type":return`Invalid input: expected ${W.expected}, received ${GX(W.input)}`;case"invalid_value":if(W.values.length===1)return`Invalid input: expected ${d1(W.values[0])}`;return`Invalid option: expected one of ${l1(W.values,"|")}`;case"too_big":{let q=W.inclusive?"<=":"<",Y=X(W.origin);if(Y)return`Too big: expected ${W.origin??"value"} to have ${q}${W.maximum.toString()} ${Y.unit??"elements"}`;return`Too big: expected ${W.origin??"value"} to be ${q}${W.maximum.toString()}`}case"too_small":{let q=W.inclusive?">=":">",Y=X(W.origin);if(Y)return`Too small: expected ${W.origin} to have ${q}${W.minimum.toString()} ${Y.unit}`;return`Too small: expected ${W.origin} to be ${q}${W.minimum.toString()}`}case"invalid_format":{let q=W;if(q.format==="starts_with")return`Invalid string: must start with "${q.prefix}"`;if(q.format==="ends_with")return`Invalid string: must end with "${q.suffix}"`;if(q.format==="includes")return`Invalid string: must include "${q.includes}"`;if(q.format==="regex")return`Invalid string: must match pattern ${q.pattern}`;return`Invalid ${H[q.format]??W.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${W.divisor}`;case"unrecognized_keys":return`Unrecognized key${W.keys.length>1?"s":""}: ${l1(W.keys,", ")}`;case"invalid_key":return`Invalid key in ${W.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${W.origin}`;default:return"Invalid input"}}};function h0(){return{localeError:UX()}}var m8,W5=Symbol("ZodOutput"),q5=Symbol("ZodInput");class f8{constructor(){this._map=new WeakMap,this._idmap=new Map}add(J,...X){let H=X[0];if(this._map.set(J,H),H&&typeof H==="object"&&"id"in H){if(this._idmap.has(H.id))throw Error(`ID ${H.id} already exists in the registry`);this._idmap.set(H.id,J)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(J){let X=this._map.get(J);if(X&&typeof X==="object"&&"id"in X)this._idmap.delete(X.id);return this._map.delete(J),this}get(J){let X=J._zod.parent;if(X){let H={...this.get(X)??{}};delete H.id;let W={...H,...this._map.get(J)};return Object.keys(W).length?W:void 0}return this._map.get(J)}has(J){return this._map.has(J)}}function PX(){return new f8}(m8=globalThis).__zod_globalRegistry??(m8.__zod_globalRegistry=PX());var P1=globalThis.__zod_globalRegistry;function o8(J,X){return new J({type:"string",...I(X)})}function l8(J,X){return new J({type:"string",coerce:!0,...I(X)})}function r8(J,X){return new J({type:"string",format:"email",check:"string_format",abort:!1,...I(X)})}function v0(J,X){return new J({type:"string",format:"guid",check:"string_format",abort:!1,...I(X)})}function p8(J,X){return new J({type:"string",format:"uuid",check:"string_format",abort:!1,...I(X)})}function d8(J,X){return new J({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...I(X)})}function n8(J,X){return new J({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...I(X)})}function i8(J,X){return new J({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...I(X)})}function t8(J,X){return new J({type:"string",format:"url",check:"string_format",abort:!1,...I(X)})}function a8(J,X){return new J({type:"string",format:"emoji",check:"string_format",abort:!1,...I(X)})}function s8(J,X){return new J({type:"string",format:"nanoid",check:"string_format",abort:!1,...I(X)})}function e8(J,X){return new J({type:"string",format:"cuid",check:"string_format",abort:!1,...I(X)})}function J2(J,X){return new J({type:"string",format:"cuid2",check:"string_format",abort:!1,...I(X)})}function X2(J,X){return new J({type:"string",format:"ulid",check:"string_format",abort:!1,...I(X)})}function H2(J,X){return new J({type:"string",format:"xid",check:"string_format",abort:!1,...I(X)})}function W2(J,X){return new J({type:"string",format:"ksuid",check:"string_format",abort:!1,...I(X)})}function q2(J,X){return new J({type:"string",format:"ipv4",check:"string_format",abort:!1,...I(X)})}function Y2(J,X){return new J({type:"string",format:"ipv6",check:"string_format",abort:!1,...I(X)})}function z2(J,X){return new J({type:"string",format:"cidrv4",check:"string_format",abort:!1,...I(X)})}function Q2(J,X){return new J({type:"string",format:"cidrv6",check:"string_format",abort:!1,...I(X)})}function w2(J,X){return new J({type:"string",format:"base64",check:"string_format",abort:!1,...I(X)})}function D2(J,X){return new J({type:"string",format:"base64url",check:"string_format",abort:!1,...I(X)})}function G2(J,X){return new J({type:"string",format:"e164",check:"string_format",abort:!1,...I(X)})}function U2(J,X){return new J({type:"string",format:"jwt",check:"string_format",abort:!1,...I(X)})}function P2(J,X){return new J({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...I(X)})}function B2(J,X){return new J({type:"string",format:"date",check:"string_format",...I(X)})}function M2(J,X){return new J({type:"string",format:"time",check:"string_format",precision:null,...I(X)})}function F2(J,X){return new J({type:"string",format:"duration",check:"string_format",...I(X)})}function I2(J,X){return new J({type:"number",checks:[],...I(X)})}function $2(J,X){return new J({type:"number",coerce:!0,checks:[],...I(X)})}function A2(J,X){return new J({type:"number",check:"number_format",abort:!1,format:"safeint",...I(X)})}function O2(J,X){return new J({type:"boolean",...I(X)})}function K2(J,X){return new J({type:"boolean",coerce:!0,...I(X)})}function V2(J,X){return new J({type:"bigint",coerce:!0,...I(X)})}function R2(J){return new J({type:"any"})}function N2(J){return new J({type:"unknown"})}function Z2(J,X){return new J({type:"never",...I(X)})}function L2(J,X){return new J({type:"date",...I(X)})}function b2(J,X){return new J({type:"date",coerce:!0,...I(X)})}function O1(J,X){return new C0({check:"less_than",...I(X),value:J,inclusive:!1})}function H1(J,X){return new C0({check:"less_than",...I(X),value:J,inclusive:!0})}function K1(J,X){return new S0({check:"greater_than",...I(X),value:J,inclusive:!1})}function i(J,X){return new S0({check:"greater_than",...I(X),value:J,inclusive:!0})}function x1(J,X){return new Z6({check:"multiple_of",...I(X),value:J})}function X0(J,X){return new b6({check:"max_length",...I(X),maximum:J})}function V1(J,X){return new _6({check:"min_length",...I(X),minimum:J})}function H0(J,X){return new E6({check:"length_equals",...I(X),length:J})}function x0(J,X){return new C6({check:"string_format",format:"regex",...I(X),pattern:J})}function g0(J){return new S6({check:"string_format",format:"lowercase",...I(J)})}function c0(J){return new k6({check:"string_format",format:"uppercase",...I(J)})}function u0(J,X){return new j6({check:"string_format",format:"includes",...I(X),includes:J})}function y0(J,X){return new T6({check:"string_format",format:"starts_with",...I(X),prefix:J})}function m0(J,X){return new h6({check:"string_format",format:"ends_with",...I(X),suffix:J})}function D1(J){return new v6({check:"overwrite",tx:J})}function f0(J){return D1((X)=>X.normalize(J))}function o0(){return D1((J)=>J.trim())}function l0(){return D1((J)=>J.toLowerCase())}function r0(){return D1((J)=>J.toUpperCase())}function p0(){return D1((J)=>V0(J))}function _2(J,X,H){return new J({type:"array",element:X,...I(H)})}function E2(J,X,H){return new J({type:"custom",check:"custom",fn:X,...I(H)})}function C2(J){let X=BX((H)=>{return H.addIssue=(W)=>{if(typeof W==="string")H.issues.push(A1(W,H.value,X._zod.def));else{let q=W;if(q.fatal)q.continue=!1;q.code??(q.code="custom"),q.input??(q.input=H.value),q.inst??(q.inst=X),q.continue??(q.continue=!X._zod.def.abort),H.issues.push(A1(q))}},J(H.value,H)});return X}function BX(J,X){let H=new c({check:"custom",...I(X)});return H._zod.check=J,H}function d0(J){let X=J?.target??"draft-2020-12";if(X==="draft-4")X="draft-04";if(X==="draft-7")X="draft-07";return{processors:J.processors??{},metadataRegistry:J?.metadata??P1,target:X,unrepresentable:J?.unrepresentable??"throw",override:J?.override??(()=>{}),io:J?.io??"output",counter:0,seen:new Map,cycles:J?.cycles??"ref",reused:J?.reused??"inline",external:J?.external??void 0}}function v(J,X,H={path:[],schemaPath:[]}){var W;let q=J._zod.def,Y=X.seen.get(J);if(Y){if(Y.count++,H.schemaPath.includes(J))Y.cycle=H.path;return Y.schema}let z={schema:{},count:1,cycle:void 0,path:H.path};X.seen.set(J,z);let Q=J._zod.toJSONSchema?.();if(Q)z.schema=Q;else{let P={...H,schemaPath:[...H.schemaPath,J],path:H.path},B=J._zod.parent;if(B)z.ref=B,v(B,X,P),X.seen.get(B).isParent=!0;else if(J._zod.processJSONSchema)J._zod.processJSONSchema(X,z.schema,P);else{let $=z.schema,F=X.processors[q.type];if(!F)throw Error(`[toJSONSchema]: Non-representable type encountered: ${q.type}`);F(J,X,$,P)}}let G=X.metadataRegistry.get(J);if(G)Object.assign(z.schema,G);if(X.io==="input"&&y(J))delete z.schema.examples,delete z.schema.default;if(X.io==="input"&&z.schema._prefault)(W=z.schema).default??(W.default=z.schema._prefault);return delete z.schema._prefault,X.seen.get(J).schema}function n0(J,X){let H=J.seen.get(X);if(!H)throw Error("Unprocessed schema. This is a bug in Zod.");let W=(Y)=>{let z=J.target==="draft-2020-12"?"$defs":"definitions";if(J.external){let P=J.external.registry.get(Y[0])?.id,B=J.external.uri??((F)=>F);if(P)return{ref:B(P)};let $=Y[1].defId??Y[1].schema.id??`schema${J.counter++}`;return Y[1].defId=$,{defId:$,ref:`${B("__shared")}#/${z}/${$}`}}if(Y[1]===H)return{ref:"#"};let G=`${"#"}/${z}/`,D=Y[1].schema.id??`__schema${J.counter++}`;return{defId:D,ref:G+D}},q=(Y)=>{if(Y[1].schema.$ref)return;let z=Y[1],{ref:Q,defId:G}=W(Y);if(z.def={...z.schema},G)z.defId=G;let D=z.schema;for(let P in D)delete D[P];D.$ref=Q};if(J.cycles==="throw")for(let Y of J.seen.entries()){let z=Y[1];if(z.cycle)throw Error(`Cycle detected: #/${z.cycle?.join("/")}/<root>
|
|
20
|
+
`)}F.write("payload.value = newResult;"),F.write("return payload;");let m0=F.compile();return(g,x)=>m0($,g,x)},Y,z=I0,Q=!f0.jitless,G=Q&&K1.value,P=X.catchall,B;J._zod.parse=($,F)=>{B??(B=W.value);let k=$.value;if(!z(k))return $.issues.push({expected:"object",code:"invalid_type",input:k,inst:J}),$;if(Q&&G&&F?.async===!1&&F.jitless!==!0){if(!Y)Y=q(X.shape);if($=Y($,F),!P)return $;return L8([],k,$,F,B,J)}return H($,F)}});function u6(J,X,H,W){for(let Y of J)if(Y.issues.length===0)return X.value=Y.value,X;let q=J.filter((Y)=>!w0(Y));if(q.length===1)return X.value=q[0].value,q[0];return X.issues.push({code:"invalid_union",input:X.value,inst:H,errors:J.map((Y)=>Y.issues.map((z)=>n(z,W,r())))}),X}var _8=D("$ZodUnion",(J,X)=>{L.init(J,X),N(J._zod,"optin",()=>X.options.some((q)=>q._zod.optin==="optional")?"optional":void 0),N(J._zod,"optout",()=>X.options.some((q)=>q._zod.optout==="optional")?"optional":void 0),N(J._zod,"values",()=>{if(X.options.every((q)=>q._zod.values))return new Set(X.options.flatMap((q)=>Array.from(q._zod.values)));return}),N(J._zod,"pattern",()=>{if(X.options.every((q)=>q._zod.pattern)){let q=X.options.map((Y)=>Y._zod.pattern);return new RegExp(`^(${q.map((Y)=>S0(Y.source)).join("|")})$`)}return});let H=X.options.length===1,W=X.options[0]._zod.run;J._zod.parse=(q,Y)=>{if(H)return W(q,Y);let z=!1,Q=[];for(let U of X.options){let G=U._zod.run({value:q.value,issues:[]},Y);if(G instanceof Promise)Q.push(G),z=!0;else{if(G.issues.length===0)return G;Q.push(G)}}if(!z)return u6(Q,q,J,Y);return Promise.all(Q).then((U)=>{return u6(U,q,J,Y)})}});var E8=D("$ZodIntersection",(J,X)=>{L.init(J,X),J._zod.parse=(H,W)=>{let q=H.value,Y=X.left._zod.run({value:q,issues:[]},W),z=X.right._zod.run({value:q,issues:[]},W);if(Y instanceof Promise||z instanceof Promise)return Promise.all([Y,z]).then(([U,G])=>{return y6(H,U,G)});return y6(H,Y,z)}});function S1(J,X){if(J===X)return{valid:!0,data:J};if(J instanceof Date&&X instanceof Date&&+J===+X)return{valid:!0,data:J};if(Q0(J)&&Q0(X)){let H=Object.keys(X),W=Object.keys(J).filter((Y)=>H.indexOf(Y)!==-1),q={...J,...X};for(let Y of W){let z=S1(J[Y],X[Y]);if(!z.valid)return{valid:!1,mergeErrorPath:[Y,...z.mergeErrorPath]};q[Y]=z.data}return{valid:!0,data:q}}if(Array.isArray(J)&&Array.isArray(X)){if(J.length!==X.length)return{valid:!1,mergeErrorPath:[]};let H=[];for(let W=0;W<J.length;W++){let q=J[W],Y=X[W],z=S1(q,Y);if(!z.valid)return{valid:!1,mergeErrorPath:[W,...z.mergeErrorPath]};H.push(z.data)}return{valid:!0,data:H}}return{valid:!1,mergeErrorPath:[]}}function y6(J,X,H){if(X.issues.length)J.issues.push(...X.issues);if(H.issues.length)J.issues.push(...H.issues);if(w0(J))return J;let W=S1(X.value,H.value);if(!W.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(W.mergeErrorPath)}`);return J.value=W.data,J}var k8=D("$ZodRecord",(J,X)=>{L.init(J,X),J._zod.parse=(H,W)=>{let q=H.value;if(!Q0(q))return H.issues.push({expected:"record",code:"invalid_type",input:q,inst:J}),H;let Y=[],z=X.keyType._zod.values;if(z){H.value={};let Q=new Set;for(let G of z)if(typeof G==="string"||typeof G==="number"||typeof G==="symbol"){Q.add(typeof G==="number"?G.toString():G);let P=X.valueType._zod.run({value:q[G],issues:[]},W);if(P instanceof Promise)Y.push(P.then((B)=>{if(B.issues.length)H.issues.push(...X0(G,B.issues));H.value[G]=B.value}));else{if(P.issues.length)H.issues.push(...X0(G,P.issues));H.value[G]=P.value}}let U;for(let G in q)if(!Q.has(G))U=U??[],U.push(G);if(U&&U.length>0)H.issues.push({code:"unrecognized_keys",input:q,inst:J,keys:U})}else{H.value={};for(let Q of Reflect.ownKeys(q)){if(Q==="__proto__")continue;let U=X.keyType._zod.run({value:Q,issues:[]},W);if(U instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(U.issues.length){if(X.mode==="loose")H.value[Q]=q[Q];else H.issues.push({code:"invalid_key",origin:"record",issues:U.issues.map((P)=>n(P,W,r())),input:Q,path:[Q],inst:J});continue}let G=X.valueType._zod.run({value:q[Q],issues:[]},W);if(G instanceof Promise)Y.push(G.then((P)=>{if(P.issues.length)H.issues.push(...X0(Q,P.issues));H.value[U.value]=P.value}));else{if(G.issues.length)H.issues.push(...X0(Q,G.issues));H.value[U.value]=G.value}}}if(Y.length)return Promise.all(Y).then(()=>H);return H}});var C8=D("$ZodEnum",(J,X)=>{L.init(J,X);let H=E0(X.entries),W=new Set(H);J._zod.values=W,J._zod.pattern=new RegExp(`^(${H.filter((q)=>R1.has(typeof q)).map((q)=>typeof q==="string"?D0(q):q.toString()).join("|")})$`),J._zod.parse=(q,Y)=>{let z=q.value;if(W.has(z))return q;return q.issues.push({code:"invalid_value",values:H,input:z,inst:J}),q}});var S8=D("$ZodTransform",(J,X)=>{L.init(J,X),J._zod.parse=(H,W)=>{if(W.direction==="backward")throw new b0(J.constructor.name);let q=X.transform(H.value,H);if(W.async)return(q instanceof Promise?q:Promise.resolve(q)).then((z)=>{return H.value=z,H});if(q instanceof Promise)throw new J0;return H.value=q,H}});function m6(J,X){if(J.issues.length&&X===void 0)return{issues:[],value:void 0};return J}var j8=D("$ZodOptional",(J,X)=>{L.init(J,X),J._zod.optin="optional",J._zod.optout="optional",N(J._zod,"values",()=>{return X.innerType._zod.values?new Set([...X.innerType._zod.values,void 0]):void 0}),N(J._zod,"pattern",()=>{let H=X.innerType._zod.pattern;return H?new RegExp(`^(${S0(H.source)})?$`):void 0}),J._zod.parse=(H,W)=>{if(X.innerType._zod.optin==="optional"){let q=X.innerType._zod.run(H,W);if(q instanceof Promise)return q.then((Y)=>m6(Y,H.value));return m6(q,H.value)}if(H.value===void 0)return H;return X.innerType._zod.run(H,W)}}),T8=D("$ZodNullable",(J,X)=>{L.init(J,X),N(J._zod,"optin",()=>X.innerType._zod.optin),N(J._zod,"optout",()=>X.innerType._zod.optout),N(J._zod,"pattern",()=>{let H=X.innerType._zod.pattern;return H?new RegExp(`^(${S0(H.source)}|null)$`):void 0}),N(J._zod,"values",()=>{return X.innerType._zod.values?new Set([...X.innerType._zod.values,null]):void 0}),J._zod.parse=(H,W)=>{if(H.value===null)return H;return X.innerType._zod.run(H,W)}}),h8=D("$ZodDefault",(J,X)=>{L.init(J,X),J._zod.optin="optional",N(J._zod,"values",()=>X.innerType._zod.values),J._zod.parse=(H,W)=>{if(W.direction==="backward")return X.innerType._zod.run(H,W);if(H.value===void 0)return H.value=X.defaultValue,H;let q=X.innerType._zod.run(H,W);if(q instanceof Promise)return q.then((Y)=>f6(Y,X));return f6(q,X)}});function f6(J,X){if(J.value===void 0)J.value=X.defaultValue;return J}var v8=D("$ZodPrefault",(J,X)=>{L.init(J,X),J._zod.optin="optional",N(J._zod,"values",()=>X.innerType._zod.values),J._zod.parse=(H,W)=>{if(W.direction==="backward")return X.innerType._zod.run(H,W);if(H.value===void 0)H.value=X.defaultValue;return X.innerType._zod.run(H,W)}}),x8=D("$ZodNonOptional",(J,X)=>{L.init(J,X),N(J._zod,"values",()=>{let H=X.innerType._zod.values;return H?new Set([...H].filter((W)=>W!==void 0)):void 0}),J._zod.parse=(H,W)=>{let q=X.innerType._zod.run(H,W);if(q instanceof Promise)return q.then((Y)=>o6(Y,J));return o6(q,J)}});function o6(J,X){if(!J.issues.length&&J.value===void 0)J.issues.push({code:"invalid_type",expected:"nonoptional",input:J.value,inst:X});return J}var g8=D("$ZodCatch",(J,X)=>{L.init(J,X),N(J._zod,"optin",()=>X.innerType._zod.optin),N(J._zod,"optout",()=>X.innerType._zod.optout),N(J._zod,"values",()=>X.innerType._zod.values),J._zod.parse=(H,W)=>{if(W.direction==="backward")return X.innerType._zod.run(H,W);let q=X.innerType._zod.run(H,W);if(q instanceof Promise)return q.then((Y)=>{if(H.value=Y.value,Y.issues.length)H.value=X.catchValue({...H,error:{issues:Y.issues.map((z)=>n(z,W,r()))},input:H.value}),H.issues=[];return H});if(H.value=q.value,q.issues.length)H.value=X.catchValue({...H,error:{issues:q.issues.map((Y)=>n(Y,W,r()))},input:H.value}),H.issues=[];return H}});var c8=D("$ZodPipe",(J,X)=>{L.init(J,X),N(J._zod,"values",()=>X.in._zod.values),N(J._zod,"optin",()=>X.in._zod.optin),N(J._zod,"optout",()=>X.out._zod.optout),N(J._zod,"propValues",()=>X.in._zod.propValues),J._zod.parse=(H,W)=>{if(W.direction==="backward"){let Y=X.out._zod.run(H,W);if(Y instanceof Promise)return Y.then((z)=>a0(z,X.in,W));return a0(Y,X.in,W)}let q=X.in._zod.run(H,W);if(q instanceof Promise)return q.then((Y)=>a0(Y,X.out,W));return a0(q,X.out,W)}});function a0(J,X,H){if(J.issues.length)return J.aborted=!0,J;return X._zod.run({value:J.value,issues:J.issues},H)}var u8=D("$ZodReadonly",(J,X)=>{L.init(J,X),N(J._zod,"propValues",()=>X.innerType._zod.propValues),N(J._zod,"values",()=>X.innerType._zod.values),N(J._zod,"optin",()=>X.innerType?._zod?.optin),N(J._zod,"optout",()=>X.innerType?._zod?.optout),J._zod.parse=(H,W)=>{if(W.direction==="backward")return X.innerType._zod.run(H,W);let q=X.innerType._zod.run(H,W);if(q instanceof Promise)return q.then(l6);return l6(q)}});function l6(J){return J.value=Object.freeze(J.value),J}var y8=D("$ZodCustom",(J,X)=>{c.init(J,X),L.init(J,X),J._zod.parse=(H,W)=>{return H},J._zod.check=(H)=>{let W=H.value,q=X.fn(W);if(q instanceof Promise)return q.then((Y)=>r6(Y,H,W,J));r6(q,H,W,J);return}});function r6(J,X,H,W){if(!J){let q={code:"custom",input:H,inst:W,path:[...W._zod.def.path??[]],continue:!W._zod.def.abort};if(W._zod.def.params)q.params=W._zod.def.params;X.issues.push(A0(q))}}var UX=(J)=>{let X=typeof J;switch(X){case"number":return Number.isNaN(J)?"NaN":"number";case"object":{if(Array.isArray(J))return"array";if(J===null)return"null";if(Object.getPrototypeOf(J)!==Object.prototype&&J.constructor)return J.constructor.name}}return X},DX=()=>{let J={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function X(W){return J[W]??null}let H={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"};return(W)=>{switch(W.code){case"invalid_type":return`Invalid input: expected ${W.expected}, received ${UX(W.input)}`;case"invalid_value":if(W.values.length===1)return`Invalid input: expected ${p0(W.values[0])}`;return`Invalid option: expected one of ${o0(W.values,"|")}`;case"too_big":{let q=W.inclusive?"<=":"<",Y=X(W.origin);if(Y)return`Too big: expected ${W.origin??"value"} to have ${q}${W.maximum.toString()} ${Y.unit??"elements"}`;return`Too big: expected ${W.origin??"value"} to be ${q}${W.maximum.toString()}`}case"too_small":{let q=W.inclusive?">=":">",Y=X(W.origin);if(Y)return`Too small: expected ${W.origin} to have ${q}${W.minimum.toString()} ${Y.unit}`;return`Too small: expected ${W.origin} to be ${q}${W.minimum.toString()}`}case"invalid_format":{let q=W;if(q.format==="starts_with")return`Invalid string: must start with "${q.prefix}"`;if(q.format==="ends_with")return`Invalid string: must end with "${q.suffix}"`;if(q.format==="includes")return`Invalid string: must include "${q.includes}"`;if(q.format==="regex")return`Invalid string: must match pattern ${q.pattern}`;return`Invalid ${H[q.format]??W.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${W.divisor}`;case"unrecognized_keys":return`Unrecognized key${W.keys.length>1?"s":""}: ${o0(W.keys,", ")}`;case"invalid_key":return`Invalid key in ${W.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${W.origin}`;default:return"Invalid input"}}};function T1(){return{localeError:DX()}}var m8,X5=Symbol("ZodOutput"),H5=Symbol("ZodInput");class f8{constructor(){this._map=new WeakMap,this._idmap=new Map}add(J,...X){let H=X[0];if(this._map.set(J,H),H&&typeof H==="object"&&"id"in H){if(this._idmap.has(H.id))throw Error(`ID ${H.id} already exists in the registry`);this._idmap.set(H.id,J)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(J){let X=this._map.get(J);if(X&&typeof X==="object"&&"id"in X)this._idmap.delete(X.id);return this._map.delete(J),this}get(J){let X=J._zod.parent;if(X){let H={...this.get(X)??{}};delete H.id;let W={...H,...this._map.get(J)};return Object.keys(W).length?W:void 0}return this._map.get(J)}has(J){return this._map.has(J)}}function PX(){return new f8}(m8=globalThis).__zod_globalRegistry??(m8.__zod_globalRegistry=PX());var P0=globalThis.__zod_globalRegistry;function o8(J,X){return new J({type:"string",...I(X)})}function l8(J,X){return new J({type:"string",coerce:!0,...I(X)})}function r8(J,X){return new J({type:"string",format:"email",check:"string_format",abort:!1,...I(X)})}function h1(J,X){return new J({type:"string",format:"guid",check:"string_format",abort:!1,...I(X)})}function p8(J,X){return new J({type:"string",format:"uuid",check:"string_format",abort:!1,...I(X)})}function d8(J,X){return new J({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...I(X)})}function n8(J,X){return new J({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...I(X)})}function i8(J,X){return new J({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...I(X)})}function t8(J,X){return new J({type:"string",format:"url",check:"string_format",abort:!1,...I(X)})}function a8(J,X){return new J({type:"string",format:"emoji",check:"string_format",abort:!1,...I(X)})}function s8(J,X){return new J({type:"string",format:"nanoid",check:"string_format",abort:!1,...I(X)})}function e8(J,X){return new J({type:"string",format:"cuid",check:"string_format",abort:!1,...I(X)})}function J2(J,X){return new J({type:"string",format:"cuid2",check:"string_format",abort:!1,...I(X)})}function X2(J,X){return new J({type:"string",format:"ulid",check:"string_format",abort:!1,...I(X)})}function H2(J,X){return new J({type:"string",format:"xid",check:"string_format",abort:!1,...I(X)})}function W2(J,X){return new J({type:"string",format:"ksuid",check:"string_format",abort:!1,...I(X)})}function q2(J,X){return new J({type:"string",format:"ipv4",check:"string_format",abort:!1,...I(X)})}function Y2(J,X){return new J({type:"string",format:"ipv6",check:"string_format",abort:!1,...I(X)})}function z2(J,X){return new J({type:"string",format:"cidrv4",check:"string_format",abort:!1,...I(X)})}function Q2(J,X){return new J({type:"string",format:"cidrv6",check:"string_format",abort:!1,...I(X)})}function w2(J,X){return new J({type:"string",format:"base64",check:"string_format",abort:!1,...I(X)})}function G2(J,X){return new J({type:"string",format:"base64url",check:"string_format",abort:!1,...I(X)})}function U2(J,X){return new J({type:"string",format:"e164",check:"string_format",abort:!1,...I(X)})}function D2(J,X){return new J({type:"string",format:"jwt",check:"string_format",abort:!1,...I(X)})}function P2(J,X){return new J({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...I(X)})}function B2(J,X){return new J({type:"string",format:"date",check:"string_format",...I(X)})}function M2(J,X){return new J({type:"string",format:"time",check:"string_format",precision:null,...I(X)})}function F2(J,X){return new J({type:"string",format:"duration",check:"string_format",...I(X)})}function I2(J,X){return new J({type:"number",checks:[],...I(X)})}function $2(J,X){return new J({type:"number",coerce:!0,checks:[],...I(X)})}function A2(J,X){return new J({type:"number",check:"number_format",abort:!1,format:"safeint",...I(X)})}function O2(J,X){return new J({type:"boolean",...I(X)})}function V2(J,X){return new J({type:"boolean",coerce:!0,...I(X)})}function K2(J,X){return new J({type:"bigint",coerce:!0,...I(X)})}function R2(J){return new J({type:"any"})}function N2(J){return new J({type:"unknown"})}function Z2(J,X){return new J({type:"never",...I(X)})}function L2(J,X){return new J({type:"date",...I(X)})}function b2(J,X){return new J({type:"date",coerce:!0,...I(X)})}function O0(J,X){return new E1({check:"less_than",...I(X),value:J,inclusive:!1})}function H0(J,X){return new E1({check:"less_than",...I(X),value:J,inclusive:!0})}function V0(J,X){return new k1({check:"greater_than",...I(X),value:J,inclusive:!1})}function i(J,X){return new k1({check:"greater_than",...I(X),value:J,inclusive:!0})}function x0(J,X){return new Z6({check:"multiple_of",...I(X),value:J})}function J1(J,X){return new b6({check:"max_length",...I(X),maximum:J})}function K0(J,X){return new _6({check:"min_length",...I(X),minimum:J})}function X1(J,X){return new E6({check:"length_equals",...I(X),length:J})}function v1(J,X){return new k6({check:"string_format",format:"regex",...I(X),pattern:J})}function x1(J){return new C6({check:"string_format",format:"lowercase",...I(J)})}function g1(J){return new S6({check:"string_format",format:"uppercase",...I(J)})}function c1(J,X){return new j6({check:"string_format",format:"includes",...I(X),includes:J})}function u1(J,X){return new T6({check:"string_format",format:"starts_with",...I(X),prefix:J})}function y1(J,X){return new h6({check:"string_format",format:"ends_with",...I(X),suffix:J})}function G0(J){return new v6({check:"overwrite",tx:J})}function m1(J){return G0((X)=>X.normalize(J))}function f1(){return G0((J)=>J.trim())}function o1(){return G0((J)=>J.toLowerCase())}function l1(){return G0((J)=>J.toUpperCase())}function r1(){return G0((J)=>V1(J))}function _2(J,X,H){return new J({type:"array",element:X,...I(H)})}function E2(J,X,H){return new J({type:"custom",check:"custom",fn:X,...I(H)})}function k2(J){let X=BX((H)=>{return H.addIssue=(W)=>{if(typeof W==="string")H.issues.push(A0(W,H.value,X._zod.def));else{let q=W;if(q.fatal)q.continue=!1;q.code??(q.code="custom"),q.input??(q.input=H.value),q.inst??(q.inst=X),q.continue??(q.continue=!X._zod.def.abort),H.issues.push(A0(q))}},J(H.value,H)});return X}function BX(J,X){let H=new c({check:"custom",...I(X)});return H._zod.check=J,H}function p1(J){let X=J?.target??"draft-2020-12";if(X==="draft-4")X="draft-04";if(X==="draft-7")X="draft-07";return{processors:J.processors??{},metadataRegistry:J?.metadata??P0,target:X,unrepresentable:J?.unrepresentable??"throw",override:J?.override??(()=>{}),io:J?.io??"output",counter:0,seen:new Map,cycles:J?.cycles??"ref",reused:J?.reused??"inline",external:J?.external??void 0}}function v(J,X,H={path:[],schemaPath:[]}){var W;let q=J._zod.def,Y=X.seen.get(J);if(Y){if(Y.count++,H.schemaPath.includes(J))Y.cycle=H.path;return Y.schema}let z={schema:{},count:1,cycle:void 0,path:H.path};X.seen.set(J,z);let Q=J._zod.toJSONSchema?.();if(Q)z.schema=Q;else{let P={...H,schemaPath:[...H.schemaPath,J],path:H.path},B=J._zod.parent;if(B)z.ref=B,v(B,X,P),X.seen.get(B).isParent=!0;else if(J._zod.processJSONSchema)J._zod.processJSONSchema(X,z.schema,P);else{let $=z.schema,F=X.processors[q.type];if(!F)throw Error(`[toJSONSchema]: Non-representable type encountered: ${q.type}`);F(J,X,$,P)}}let U=X.metadataRegistry.get(J);if(U)Object.assign(z.schema,U);if(X.io==="input"&&y(J))delete z.schema.examples,delete z.schema.default;if(X.io==="input"&&z.schema._prefault)(W=z.schema).default??(W.default=z.schema._prefault);return delete z.schema._prefault,X.seen.get(J).schema}function d1(J,X){let H=J.seen.get(X);if(!H)throw Error("Unprocessed schema. This is a bug in Zod.");let W=(Y)=>{let z=J.target==="draft-2020-12"?"$defs":"definitions";if(J.external){let P=J.external.registry.get(Y[0])?.id,B=J.external.uri??((F)=>F);if(P)return{ref:B(P)};let $=Y[1].defId??Y[1].schema.id??`schema${J.counter++}`;return Y[1].defId=$,{defId:$,ref:`${B("__shared")}#/${z}/${$}`}}if(Y[1]===H)return{ref:"#"};let U=`${"#"}/${z}/`,G=Y[1].schema.id??`__schema${J.counter++}`;return{defId:G,ref:U+G}},q=(Y)=>{if(Y[1].schema.$ref)return;let z=Y[1],{ref:Q,defId:U}=W(Y);if(z.def={...z.schema},U)z.defId=U;let G=z.schema;for(let P in G)delete G[P];G.$ref=Q};if(J.cycles==="throw")for(let Y of J.seen.entries()){let z=Y[1];if(z.cycle)throw Error(`Cycle detected: #/${z.cycle?.join("/")}/<root>
|
|
21
21
|
|
|
22
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let Y of J.seen.entries()){let z=Y[1];if(X===Y[0]){q(Y);continue}if(J.external){let G=J.external.registry.get(Y[0])?.id;if(X!==Y[0]&&G){q(Y);continue}}if(J.metadataRegistry.get(Y[0])?.id){q(Y);continue}if(z.cycle){q(Y);continue}if(z.count>1){if(J.reused==="ref"){q(Y);continue}}}}function i0(J,X){let H=J.seen.get(X);if(!H)throw Error("Unprocessed schema. This is a bug in Zod.");let W=(z)=>{let Q=J.seen.get(z),G=Q.def??Q.schema,D={...G};if(Q.ref===null)return;let P=Q.ref;if(Q.ref=null,P){W(P);let B=J.seen.get(P).schema;if(B.$ref&&(J.target==="draft-07"||J.target==="draft-04"||J.target==="openapi-3.0"))G.allOf=G.allOf??[],G.allOf.push(B);else Object.assign(G,B),Object.assign(G,D)}if(!Q.isParent)J.override({zodSchema:z,jsonSchema:G,path:Q.path??[]})};for(let z of[...J.seen.entries()].reverse())W(z[0]);let q={};if(J.target==="draft-2020-12")q.$schema="https://json-schema.org/draft/2020-12/schema";else if(J.target==="draft-07")q.$schema="http://json-schema.org/draft-07/schema#";else if(J.target==="draft-04")q.$schema="http://json-schema.org/draft-04/schema#";else if(J.target==="openapi-3.0");if(J.external?.uri){let z=J.external.registry.get(X)?.id;if(!z)throw Error("Schema is missing an `id` property");q.$id=J.external.uri(z)}Object.assign(q,H.def??H.schema);let Y=J.external?.defs??{};for(let z of J.seen.entries()){let Q=z[1];if(Q.def&&Q.defId)Y[Q.defId]=Q.def}if(J.external);else if(Object.keys(Y).length>0)if(J.target==="draft-2020-12")q.$defs=Y;else q.definitions=Y;try{let z=JSON.parse(JSON.stringify(q));return Object.defineProperty(z,"~standard",{value:{...X["~standard"],jsonSchema:{input:g1(X,"input"),output:g1(X,"output")}},enumerable:!1,writable:!1}),z}catch(z){throw Error("Error converting schema to JSON.")}}function y(J,X){let H=X??{seen:new Set};if(H.seen.has(J))return!1;H.seen.add(J);let W=J._zod.def;if(W.type==="transform")return!0;if(W.type==="array")return y(W.element,H);if(W.type==="set")return y(W.valueType,H);if(W.type==="lazy")return y(W.getter(),H);if(W.type==="promise"||W.type==="optional"||W.type==="nonoptional"||W.type==="nullable"||W.type==="readonly"||W.type==="default"||W.type==="prefault")return y(W.innerType,H);if(W.type==="intersection")return y(W.left,H)||y(W.right,H);if(W.type==="record"||W.type==="map")return y(W.keyType,H)||y(W.valueType,H);if(W.type==="pipe")return y(W.in,H)||y(W.out,H);if(W.type==="object"){for(let q in W.shape)if(y(W.shape[q],H))return!0;return!1}if(W.type==="union"){for(let q of W.options)if(y(q,H))return!0;return!1}if(W.type==="tuple"){for(let q of W.items)if(y(q,H))return!0;if(W.rest&&y(W.rest,H))return!0;return!1}return!1}var S2=(J,X={})=>(H)=>{let W=d0({...H,processors:X});return v(J,W),n0(W,J),i0(W,J)},g1=(J,X)=>(H)=>{let{libraryOptions:W,target:q}=H??{},Y=d0({...W??{},target:q,io:X,processors:{}});return v(J,Y),n0(Y,J),i0(Y,J)};var MX={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},k2=(J,X,H,W)=>{let q=H;q.type="string";let{minimum:Y,maximum:z,format:Q,patterns:G,contentEncoding:D}=J._zod.bag;if(typeof Y==="number")q.minLength=Y;if(typeof z==="number")q.maxLength=z;if(Q){if(q.format=MX[Q]??Q,q.format==="")delete q.format}if(D)q.contentEncoding=D;if(G&&G.size>0){let P=[...G];if(P.length===1)q.pattern=P[0].source;else if(P.length>1)q.allOf=[...P.map((B)=>({...X.target==="draft-07"||X.target==="draft-04"||X.target==="openapi-3.0"?{type:"string"}:{},pattern:B.source}))]}},j2=(J,X,H,W)=>{let q=H,{minimum:Y,maximum:z,format:Q,multipleOf:G,exclusiveMaximum:D,exclusiveMinimum:P}=J._zod.bag;if(typeof Q==="string"&&Q.includes("int"))q.type="integer";else q.type="number";if(typeof P==="number")if(X.target==="draft-04"||X.target==="openapi-3.0")q.minimum=P,q.exclusiveMinimum=!0;else q.exclusiveMinimum=P;if(typeof Y==="number"){if(q.minimum=Y,typeof P==="number"&&X.target!=="draft-04")if(P>=Y)delete q.minimum;else delete q.exclusiveMinimum}if(typeof D==="number")if(X.target==="draft-04"||X.target==="openapi-3.0")q.maximum=D,q.exclusiveMaximum=!0;else q.exclusiveMaximum=D;if(typeof z==="number"){if(q.maximum=z,typeof D==="number"&&X.target!=="draft-04")if(D<=z)delete q.maximum;else delete q.exclusiveMaximum}if(typeof G==="number")q.multipleOf=G},T2=(J,X,H,W)=>{H.type="boolean"},h2=(J,X,H,W)=>{if(X.unrepresentable==="throw")throw Error("BigInt cannot be represented in JSON Schema")};var v2=(J,X,H,W)=>{H.not={}},x2=(J,X,H,W)=>{},g2=(J,X,H,W)=>{},c2=(J,X,H,W)=>{if(X.unrepresentable==="throw")throw Error("Date cannot be represented in JSON Schema")},u2=(J,X,H,W)=>{let q=J._zod.def,Y=E1(q.entries);if(Y.every((z)=>typeof z==="number"))H.type="number";if(Y.every((z)=>typeof z==="string"))H.type="string";H.enum=Y};var y2=(J,X,H,W)=>{if(X.unrepresentable==="throw")throw Error("Custom types cannot be represented in JSON Schema")};var m2=(J,X,H,W)=>{if(X.unrepresentable==="throw")throw Error("Transforms cannot be represented in JSON Schema")};var f2=(J,X,H,W)=>{let q=H,Y=J._zod.def,{minimum:z,maximum:Q}=J._zod.bag;if(typeof z==="number")q.minItems=z;if(typeof Q==="number")q.maxItems=Q;q.type="array",q.items=v(Y.element,X,{...W,path:[...W.path,"items"]})},o2=(J,X,H,W)=>{let q=H,Y=J._zod.def;q.type="object",q.properties={};let z=Y.shape;for(let D in z)q.properties[D]=v(z[D],X,{...W,path:[...W.path,"properties",D]});let Q=new Set(Object.keys(z)),G=new Set([...Q].filter((D)=>{let P=Y.shape[D]._zod;if(X.io==="input")return P.optin===void 0;else return P.optout===void 0}));if(G.size>0)q.required=Array.from(G);if(Y.catchall?._zod.def.type==="never")q.additionalProperties=!1;else if(!Y.catchall){if(X.io==="output")q.additionalProperties=!1}else if(Y.catchall)q.additionalProperties=v(Y.catchall,X,{...W,path:[...W.path,"additionalProperties"]})},l2=(J,X,H,W)=>{let q=J._zod.def,Y=q.inclusive===!1,z=q.options.map((Q,G)=>v(Q,X,{...W,path:[...W.path,Y?"oneOf":"anyOf",G]}));if(Y)H.oneOf=z;else H.anyOf=z},r2=(J,X,H,W)=>{let q=J._zod.def,Y=v(q.left,X,{...W,path:[...W.path,"allOf",0]}),z=v(q.right,X,{...W,path:[...W.path,"allOf",1]}),Q=(D)=>("allOf"in D)&&Object.keys(D).length===1,G=[...Q(Y)?Y.allOf:[Y],...Q(z)?z.allOf:[z]];H.allOf=G};var p2=(J,X,H,W)=>{let q=H,Y=J._zod.def;if(q.type="object",X.target==="draft-07"||X.target==="draft-2020-12")q.propertyNames=v(Y.keyType,X,{...W,path:[...W.path,"propertyNames"]});q.additionalProperties=v(Y.valueType,X,{...W,path:[...W.path,"additionalProperties"]})},d2=(J,X,H,W)=>{let q=J._zod.def,Y=v(q.innerType,X,W),z=X.seen.get(J);if(X.target==="openapi-3.0")z.ref=q.innerType,H.nullable=!0;else H.anyOf=[Y,{type:"null"}]},n2=(J,X,H,W)=>{let q=J._zod.def;v(q.innerType,X,W);let Y=X.seen.get(J);Y.ref=q.innerType},i2=(J,X,H,W)=>{let q=J._zod.def;v(q.innerType,X,W);let Y=X.seen.get(J);Y.ref=q.innerType,H.default=JSON.parse(JSON.stringify(q.defaultValue))},t2=(J,X,H,W)=>{let q=J._zod.def;v(q.innerType,X,W);let Y=X.seen.get(J);if(Y.ref=q.innerType,X.io==="input")H._prefault=JSON.parse(JSON.stringify(q.defaultValue))},a2=(J,X,H,W)=>{let q=J._zod.def;v(q.innerType,X,W);let Y=X.seen.get(J);Y.ref=q.innerType;let z;try{z=q.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}H.default=z},s2=(J,X,H,W)=>{let q=J._zod.def,Y=X.io==="input"?q.in._zod.def.type==="transform"?q.out:q.in:q.out;v(Y,X,W);let z=X.seen.get(J);z.ref=Y},e2=(J,X,H,W)=>{let q=J._zod.def;v(q.innerType,X,W);let Y=X.seen.get(J);Y.ref=q.innerType,H.readOnly=!0};var JJ=(J,X,H,W)=>{let q=J._zod.def;v(q.innerType,X,W);let Y=X.seen.get(J);Y.ref=q.innerType};var RX=U("ZodISODateTime",(J,X)=>{W8.init(J,X),S.init(J,X)});function XJ(J){return P2(RX,J)}var NX=U("ZodISODate",(J,X)=>{q8.init(J,X),S.init(J,X)});function HJ(J){return B2(NX,J)}var ZX=U("ZodISOTime",(J,X)=>{Y8.init(J,X),S.init(J,X)});function WJ(J){return M2(ZX,J)}var LX=U("ZodISODuration",(J,X)=>{z8.init(J,X),S.init(J,X)});function qJ(J){return F2(LX,J)}var QJ=(J,X)=>{n1.init(J,X),J.name="ZodError",Object.defineProperties(J,{format:{value:(H)=>c4(J,H)},flatten:{value:(H)=>g4(J,H)},addIssue:{value:(H)=>{J.issues.push(H),J.message=JSON.stringify(J.issues,$1,2)}},addIssues:{value:(H)=>{J.issues.push(...H),J.message=JSON.stringify(J.issues,$1,2)}},isEmpty:{get(){return J.issues.length===0}}})},h5=U("ZodError",QJ),f=U("ZodError",QJ,{Parent:Error});var wJ=i1(f),DJ=t1(f),GJ=T1(f),UJ=h1(f),PJ=m4(f),BJ=f4(f),MJ=o4(f),FJ=l4(f),IJ=r4(f),$J=p4(f),AJ=d4(f),OJ=n4(f);var k=U("ZodType",(J,X)=>{return L.init(J,X),Object.assign(J["~standard"],{jsonSchema:{input:g1(J,"input"),output:g1(J,"output")}}),J.toJSONSchema=S2(J,{}),J.def=X,J.type=X.type,Object.defineProperty(J,"_def",{value:X}),J.check=(...H)=>{return J.clone(K.mergeDefs(X,{checks:[...X.checks??[],...H.map((W)=>typeof W==="function"?{_zod:{check:W,def:{check:"custom"},onattach:[]}}:W)]}))},J.clone=(H,W)=>d(J,H,W),J.brand=()=>J,J.register=(H,W)=>{return H.add(J,W),J},J.parse=(H,W)=>wJ(J,H,W,{callee:J.parse}),J.safeParse=(H,W)=>GJ(J,H,W),J.parseAsync=async(H,W)=>DJ(J,H,W,{callee:J.parseAsync}),J.safeParseAsync=async(H,W)=>UJ(J,H,W),J.spa=J.safeParseAsync,J.encode=(H,W)=>PJ(J,H,W),J.decode=(H,W)=>BJ(J,H,W),J.encodeAsync=async(H,W)=>MJ(J,H,W),J.decodeAsync=async(H,W)=>FJ(J,H,W),J.safeEncode=(H,W)=>IJ(J,H,W),J.safeDecode=(H,W)=>$J(J,H,W),J.safeEncodeAsync=async(H,W)=>AJ(J,H,W),J.safeDecodeAsync=async(H,W)=>OJ(J,H,W),J.refine=(H,W)=>J.check(IH(H,W)),J.superRefine=(H)=>J.check($H(H)),J.overwrite=(H)=>J.check(D1(H)),J.optional=()=>NJ(J),J.nullable=()=>ZJ(J),J.nullish=()=>NJ(ZJ(J)),J.nonoptional=(H)=>DH(J,H),J.array=()=>X4(J),J.or=(H)=>sX([J,H]),J.and=(H)=>JH(J,H),J.transform=(H)=>LJ(J,WH(H)),J.default=(H)=>zH(J,H),J.prefault=(H)=>wH(J,H),J.catch=(H)=>UH(J,H),J.pipe=(H)=>LJ(J,H),J.readonly=()=>MH(J),J.describe=(H)=>{let W=J.clone();return P1.add(W,{description:H}),W},Object.defineProperty(J,"description",{get(){return P1.get(J)?.description},configurable:!0}),J.meta=(...H)=>{if(H.length===0)return P1.get(J);let W=J.clone();return P1.add(W,H[0]),W},J.isOptional=()=>J.safeParse(void 0).success,J.isNullable=()=>J.safeParse(null).success,J}),bJ=U("_ZodString",(J,X)=>{J0.init(J,X),k.init(J,X),J._zod.processJSONSchema=(W,q,Y)=>k2(J,W,q,Y);let H=J._zod.bag;J.format=H.format??null,J.minLength=H.minimum??null,J.maxLength=H.maximum??null,J.regex=(...W)=>J.check(x0(...W)),J.includes=(...W)=>J.check(u0(...W)),J.startsWith=(...W)=>J.check(y0(...W)),J.endsWith=(...W)=>J.check(m0(...W)),J.min=(...W)=>J.check(V1(...W)),J.max=(...W)=>J.check(X0(...W)),J.length=(...W)=>J.check(H0(...W)),J.nonempty=(...W)=>J.check(V1(1,...W)),J.lowercase=(W)=>J.check(g0(W)),J.uppercase=(W)=>J.check(c0(W)),J.trim=()=>J.check(o0()),J.normalize=(...W)=>J.check(f0(...W)),J.toLowerCase=()=>J.check(l0()),J.toUpperCase=()=>J.check(r0()),J.slugify=()=>J.check(p0())}),a0=U("ZodString",(J,X)=>{J0.init(J,X),bJ.init(J,X),J.email=(H)=>J.check(r8(_X,H)),J.url=(H)=>J.check(t8(EX,H)),J.jwt=(H)=>J.check(U2(oX,H)),J.emoji=(H)=>J.check(a8(CX,H)),J.guid=(H)=>J.check(v0(KJ,H)),J.uuid=(H)=>J.check(p8(W0,H)),J.uuidv4=(H)=>J.check(d8(W0,H)),J.uuidv6=(H)=>J.check(n8(W0,H)),J.uuidv7=(H)=>J.check(i8(W0,H)),J.nanoid=(H)=>J.check(s8(SX,H)),J.guid=(H)=>J.check(v0(KJ,H)),J.cuid=(H)=>J.check(e8(kX,H)),J.cuid2=(H)=>J.check(J2(jX,H)),J.ulid=(H)=>J.check(X2(TX,H)),J.base64=(H)=>J.check(w2(yX,H)),J.base64url=(H)=>J.check(D2(mX,H)),J.xid=(H)=>J.check(H2(hX,H)),J.ksuid=(H)=>J.check(W2(vX,H)),J.ipv4=(H)=>J.check(q2(xX,H)),J.ipv6=(H)=>J.check(Y2(gX,H)),J.cidrv4=(H)=>J.check(z2(cX,H)),J.cidrv6=(H)=>J.check(Q2(uX,H)),J.e164=(H)=>J.check(G2(fX,H)),J.datetime=(H)=>J.check(XJ(H)),J.date=(H)=>J.check(HJ(H)),J.time=(H)=>J.check(WJ(H)),J.duration=(H)=>J.check(qJ(H))});function _(J){return o8(a0,J)}var S=U("ZodStringFormat",(J,X)=>{b.init(J,X),bJ.init(J,X)}),_X=U("ZodEmail",(J,X)=>{n6.init(J,X),S.init(J,X)});var KJ=U("ZodGUID",(J,X)=>{p6.init(J,X),S.init(J,X)});var W0=U("ZodUUID",(J,X)=>{d6.init(J,X),S.init(J,X)});var EX=U("ZodURL",(J,X)=>{i6.init(J,X),S.init(J,X)});var CX=U("ZodEmoji",(J,X)=>{t6.init(J,X),S.init(J,X)});var SX=U("ZodNanoID",(J,X)=>{a6.init(J,X),S.init(J,X)});var kX=U("ZodCUID",(J,X)=>{s6.init(J,X),S.init(J,X)});var jX=U("ZodCUID2",(J,X)=>{e6.init(J,X),S.init(J,X)});var TX=U("ZodULID",(J,X)=>{J8.init(J,X),S.init(J,X)});var hX=U("ZodXID",(J,X)=>{X8.init(J,X),S.init(J,X)});var vX=U("ZodKSUID",(J,X)=>{H8.init(J,X),S.init(J,X)});var xX=U("ZodIPv4",(J,X)=>{Q8.init(J,X),S.init(J,X)});var gX=U("ZodIPv6",(J,X)=>{w8.init(J,X),S.init(J,X)});var cX=U("ZodCIDRv4",(J,X)=>{D8.init(J,X),S.init(J,X)});var uX=U("ZodCIDRv6",(J,X)=>{G8.init(J,X),S.init(J,X)});var yX=U("ZodBase64",(J,X)=>{P8.init(J,X),S.init(J,X)});var mX=U("ZodBase64URL",(J,X)=>{B8.init(J,X),S.init(J,X)});var fX=U("ZodE164",(J,X)=>{M8.init(J,X),S.init(J,X)});var oX=U("ZodJWT",(J,X)=>{F8.init(J,X),S.init(J,X)});var q0=U("ZodNumber",(J,X)=>{T0.init(J,X),k.init(J,X),J._zod.processJSONSchema=(W,q,Y)=>j2(J,W,q,Y),J.gt=(W,q)=>J.check(K1(W,q)),J.gte=(W,q)=>J.check(i(W,q)),J.min=(W,q)=>J.check(i(W,q)),J.lt=(W,q)=>J.check(O1(W,q)),J.lte=(W,q)=>J.check(H1(W,q)),J.max=(W,q)=>J.check(H1(W,q)),J.int=(W)=>J.check(VJ(W)),J.safe=(W)=>J.check(VJ(W)),J.positive=(W)=>J.check(K1(0,W)),J.nonnegative=(W)=>J.check(i(0,W)),J.negative=(W)=>J.check(O1(0,W)),J.nonpositive=(W)=>J.check(H1(0,W)),J.multipleOf=(W,q)=>J.check(x1(W,q)),J.step=(W,q)=>J.check(x1(W,q)),J.finite=()=>J;let H=J._zod.bag;J.minValue=Math.max(H.minimum??Number.NEGATIVE_INFINITY,H.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,J.maxValue=Math.min(H.maximum??Number.POSITIVE_INFINITY,H.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,J.isInt=(H.format??"").includes("int")||Number.isSafeInteger(H.multipleOf??0.5),J.isFinite=!0,J.format=H.format??null});function B1(J){return I2(q0,J)}var lX=U("ZodNumberFormat",(J,X)=>{I8.init(J,X),q0.init(J,X)});function VJ(J){return A2(lX,J)}var s0=U("ZodBoolean",(J,X)=>{$8.init(J,X),k.init(J,X),J._zod.processJSONSchema=(H,W,q)=>T2(J,H,W,q)});function _J(J){return O2(s0,J)}var EJ=U("ZodBigInt",(J,X)=>{A8.init(J,X),k.init(J,X),J._zod.processJSONSchema=(W,q,Y)=>h2(J,W,q,Y),J.gte=(W,q)=>J.check(i(W,q)),J.min=(W,q)=>J.check(i(W,q)),J.gt=(W,q)=>J.check(K1(W,q)),J.gte=(W,q)=>J.check(i(W,q)),J.min=(W,q)=>J.check(i(W,q)),J.lt=(W,q)=>J.check(O1(W,q)),J.lte=(W,q)=>J.check(H1(W,q)),J.max=(W,q)=>J.check(H1(W,q)),J.positive=(W)=>J.check(K1(BigInt(0),W)),J.negative=(W)=>J.check(O1(BigInt(0),W)),J.nonpositive=(W)=>J.check(H1(BigInt(0),W)),J.nonnegative=(W)=>J.check(i(BigInt(0),W)),J.multipleOf=(W,q)=>J.check(x1(W,q));let H=J._zod.bag;J.minValue=H.minimum??null,J.maxValue=H.maximum??null,J.format=H.format??null});var rX=U("ZodAny",(J,X)=>{O8.init(J,X),k.init(J,X),J._zod.processJSONSchema=(H,W,q)=>x2(J,H,W,q)});function Y0(){return R2(rX)}var pX=U("ZodUnknown",(J,X)=>{K8.init(J,X),k.init(J,X),J._zod.processJSONSchema=(H,W,q)=>g2(J,H,W,q)});function RJ(){return N2(pX)}var dX=U("ZodNever",(J,X)=>{V8.init(J,X),k.init(J,X),J._zod.processJSONSchema=(H,W,q)=>v2(J,H,W,q)});function nX(J){return Z2(dX,J)}var e0=U("ZodDate",(J,X)=>{R8.init(J,X),k.init(J,X),J._zod.processJSONSchema=(W,q,Y)=>c2(J,W,q,Y),J.min=(W,q)=>J.check(i(W,q)),J.max=(W,q)=>J.check(H1(W,q));let H=J._zod.bag;J.minDate=H.minimum?new Date(H.minimum):null,J.maxDate=H.maximum?new Date(H.maximum):null});function J4(J){return L2(e0,J)}var iX=U("ZodArray",(J,X)=>{N8.init(J,X),k.init(J,X),J._zod.processJSONSchema=(H,W,q)=>f2(J,H,W,q),J.element=X.element,J.min=(H,W)=>J.check(V1(H,W)),J.nonempty=(H)=>J.check(V1(1,H)),J.max=(H,W)=>J.check(X0(H,W)),J.length=(H,W)=>J.check(H0(H,W)),J.unwrap=()=>J.element});function X4(J,X){return _2(iX,J,X)}var tX=U("ZodObject",(J,X)=>{b8.init(J,X),k.init(J,X),J._zod.processJSONSchema=(H,W,q)=>o2(J,H,W,q),K.defineLazy(J,"shape",()=>{return X.shape}),J.keyof=()=>W4(Object.keys(J._zod.def.shape)),J.catchall=(H)=>J.clone({...J._zod.def,catchall:H}),J.passthrough=()=>J.clone({...J._zod.def,catchall:RJ()}),J.loose=()=>J.clone({...J._zod.def,catchall:RJ()}),J.strict=()=>J.clone({...J._zod.def,catchall:nX()}),J.strip=()=>J.clone({...J._zod.def,catchall:void 0}),J.extend=(H)=>{return K.extend(J,H)},J.safeExtend=(H)=>{return K.safeExtend(J,H)},J.merge=(H)=>K.merge(J,H),J.pick=(H)=>K.pick(J,H),J.omit=(H)=>K.omit(J,H),J.partial=(...H)=>K.partial(SJ,J,H[0]),J.required=(...H)=>K.required(kJ,J,H[0])});function CJ(J,X){let H={type:"object",shape:J??{},...K.normalizeParams(X)};return new tX(H)}var aX=U("ZodUnion",(J,X)=>{_8.init(J,X),k.init(J,X),J._zod.processJSONSchema=(H,W,q)=>l2(J,H,W,q),J.options=X.options});function sX(J,X){return new aX({type:"union",options:J,...K.normalizeParams(X)})}var eX=U("ZodIntersection",(J,X)=>{E8.init(J,X),k.init(J,X),J._zod.processJSONSchema=(H,W,q)=>r2(J,H,W,q)});function JH(J,X){return new eX({type:"intersection",left:J,right:X})}var XH=U("ZodRecord",(J,X)=>{C8.init(J,X),k.init(J,X),J._zod.processJSONSchema=(H,W,q)=>p2(J,H,W,q),J.keyType=X.keyType,J.valueType=X.valueType});function H4(J,X,H){return new XH({type:"record",keyType:J,valueType:X,...K.normalizeParams(H)})}var t0=U("ZodEnum",(J,X)=>{S8.init(J,X),k.init(J,X),J._zod.processJSONSchema=(W,q,Y)=>u2(J,W,q,Y),J.enum=X.entries,J.options=Object.values(X.entries);let H=new Set(Object.keys(X.entries));J.extract=(W,q)=>{let Y={};for(let z of W)if(H.has(z))Y[z]=X.entries[z];else throw Error(`Key ${z} not found in enum`);return new t0({...X,checks:[],...K.normalizeParams(q),entries:Y})},J.exclude=(W,q)=>{let Y={...X.entries};for(let z of W)if(H.has(z))delete Y[z];else throw Error(`Key ${z} not found in enum`);return new t0({...X,checks:[],...K.normalizeParams(q),entries:Y})}});function W4(J,X){let H=Array.isArray(J)?Object.fromEntries(J.map((W)=>[W,W])):J;return new t0({type:"enum",entries:H,...K.normalizeParams(X)})}var HH=U("ZodTransform",(J,X)=>{k8.init(J,X),k.init(J,X),J._zod.processJSONSchema=(H,W,q)=>m2(J,H,W,q),J._zod.parse=(H,W)=>{if(W.direction==="backward")throw new b1(J.constructor.name);H.addIssue=(Y)=>{if(typeof Y==="string")H.issues.push(K.issue(Y,H.value,X));else{let z=Y;if(z.fatal)z.continue=!1;z.code??(z.code="custom"),z.input??(z.input=H.value),z.inst??(z.inst=J),H.issues.push(K.issue(z))}};let q=X.transform(H.value,H);if(q instanceof Promise)return q.then((Y)=>{return H.value=Y,H});return H.value=q,H}});function WH(J){return new HH({type:"transform",transform:J})}var SJ=U("ZodOptional",(J,X)=>{j8.init(J,X),k.init(J,X),J._zod.processJSONSchema=(H,W,q)=>JJ(J,H,W,q),J.unwrap=()=>J._zod.def.innerType});function NJ(J){return new SJ({type:"optional",innerType:J})}var qH=U("ZodNullable",(J,X)=>{T8.init(J,X),k.init(J,X),J._zod.processJSONSchema=(H,W,q)=>d2(J,H,W,q),J.unwrap=()=>J._zod.def.innerType});function ZJ(J){return new qH({type:"nullable",innerType:J})}var YH=U("ZodDefault",(J,X)=>{h8.init(J,X),k.init(J,X),J._zod.processJSONSchema=(H,W,q)=>i2(J,H,W,q),J.unwrap=()=>J._zod.def.innerType,J.removeDefault=J.unwrap});function zH(J,X){return new YH({type:"default",innerType:J,get defaultValue(){return typeof X==="function"?X():K.shallowClone(X)}})}var QH=U("ZodPrefault",(J,X)=>{v8.init(J,X),k.init(J,X),J._zod.processJSONSchema=(H,W,q)=>t2(J,H,W,q),J.unwrap=()=>J._zod.def.innerType});function wH(J,X){return new QH({type:"prefault",innerType:J,get defaultValue(){return typeof X==="function"?X():K.shallowClone(X)}})}var kJ=U("ZodNonOptional",(J,X)=>{x8.init(J,X),k.init(J,X),J._zod.processJSONSchema=(H,W,q)=>n2(J,H,W,q),J.unwrap=()=>J._zod.def.innerType});function DH(J,X){return new kJ({type:"nonoptional",innerType:J,...K.normalizeParams(X)})}var GH=U("ZodCatch",(J,X)=>{g8.init(J,X),k.init(J,X),J._zod.processJSONSchema=(H,W,q)=>a2(J,H,W,q),J.unwrap=()=>J._zod.def.innerType,J.removeCatch=J.unwrap});function UH(J,X){return new GH({type:"catch",innerType:J,catchValue:typeof X==="function"?X:()=>X})}var PH=U("ZodPipe",(J,X)=>{c8.init(J,X),k.init(J,X),J._zod.processJSONSchema=(H,W,q)=>s2(J,H,W,q),J.in=X.in,J.out=X.out});function LJ(J,X){return new PH({type:"pipe",in:J,out:X})}var BH=U("ZodReadonly",(J,X)=>{u8.init(J,X),k.init(J,X),J._zod.processJSONSchema=(H,W,q)=>e2(J,H,W,q),J.unwrap=()=>J._zod.def.innerType});function MH(J){return new BH({type:"readonly",innerType:J})}var FH=U("ZodCustom",(J,X)=>{y8.init(J,X),k.init(J,X),J._zod.processJSONSchema=(H,W,q)=>y2(J,H,W,q)});function IH(J,X={}){return E2(FH,J,X)}function $H(J){return C2(J)}var N1={};_4(N1,{string:()=>AH,number:()=>OH,date:()=>RH,boolean:()=>KH,bigint:()=>VH});function AH(J){return l8(a0,J)}function OH(J){return $2(q0,J)}function KH(J){return K2(s0,J)}function VH(J){return V2(EJ,J)}function RH(J){return b2(e0,J)}r(h0());function t(J,X){if(!Boolean(J))throw Error(X)}function z0(J){return typeof J=="object"&&J!==null}function jJ(J,X){if(!Boolean(J))throw Error(X!=null?X:"Unexpected invariant triggered.")}var NH=/\r\n|[\n\r]/g;function Z1(J,X){let H=0,W=1;for(let q of J.body.matchAll(NH)){if(typeof q.index==="number"||jJ(!1),q.index>=X)break;H=q.index+q[0].length,W+=1}return{line:W,column:X+1-H}}function q4(J){return Q0(J.source,Z1(J.source,J.start))}function Q0(J,X){let H=J.locationOffset.column-1,W="".padStart(H)+J.body,q=X.line-1,Y=J.locationOffset.line-1,z=X.line+Y,Q=X.line===1?H:0,G=X.column+Q,D=`${J.name}:${z}:${G}
|
|
23
|
-
`,P=W.split(/\r\n|[\n\r]/g),B=P[q];if(B.length>120){let $=Math.floor(
|
|
24
|
-
`)}function ZH(J){let X=J[0];if(X==null||"kind"in X||"length"in X)return{nodes:X,source:J[1],positions:J[2],path:J[3],originalError:J[4],extensions:J[5]};return X}class o extends Error{constructor(J,...X){var H,W,q;let{nodes:Y,source:z,positions:Q,path:
|
|
22
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let Y of J.seen.entries()){let z=Y[1];if(X===Y[0]){q(Y);continue}if(J.external){let U=J.external.registry.get(Y[0])?.id;if(X!==Y[0]&&U){q(Y);continue}}if(J.metadataRegistry.get(Y[0])?.id){q(Y);continue}if(z.cycle){q(Y);continue}if(z.count>1){if(J.reused==="ref"){q(Y);continue}}}}function n1(J,X){let H=J.seen.get(X);if(!H)throw Error("Unprocessed schema. This is a bug in Zod.");let W=(z)=>{let Q=J.seen.get(z),U=Q.def??Q.schema,G={...U};if(Q.ref===null)return;let P=Q.ref;if(Q.ref=null,P){W(P);let B=J.seen.get(P).schema;if(B.$ref&&(J.target==="draft-07"||J.target==="draft-04"||J.target==="openapi-3.0"))U.allOf=U.allOf??[],U.allOf.push(B);else Object.assign(U,B),Object.assign(U,G)}if(!Q.isParent)J.override({zodSchema:z,jsonSchema:U,path:Q.path??[]})};for(let z of[...J.seen.entries()].reverse())W(z[0]);let q={};if(J.target==="draft-2020-12")q.$schema="https://json-schema.org/draft/2020-12/schema";else if(J.target==="draft-07")q.$schema="http://json-schema.org/draft-07/schema#";else if(J.target==="draft-04")q.$schema="http://json-schema.org/draft-04/schema#";else if(J.target==="openapi-3.0");if(J.external?.uri){let z=J.external.registry.get(X)?.id;if(!z)throw Error("Schema is missing an `id` property");q.$id=J.external.uri(z)}Object.assign(q,H.def??H.schema);let Y=J.external?.defs??{};for(let z of J.seen.entries()){let Q=z[1];if(Q.def&&Q.defId)Y[Q.defId]=Q.def}if(J.external);else if(Object.keys(Y).length>0)if(J.target==="draft-2020-12")q.$defs=Y;else q.definitions=Y;try{let z=JSON.parse(JSON.stringify(q));return Object.defineProperty(z,"~standard",{value:{...X["~standard"],jsonSchema:{input:g0(X,"input"),output:g0(X,"output")}},enumerable:!1,writable:!1}),z}catch(z){throw Error("Error converting schema to JSON.")}}function y(J,X){let H=X??{seen:new Set};if(H.seen.has(J))return!1;H.seen.add(J);let W=J._zod.def;if(W.type==="transform")return!0;if(W.type==="array")return y(W.element,H);if(W.type==="set")return y(W.valueType,H);if(W.type==="lazy")return y(W.getter(),H);if(W.type==="promise"||W.type==="optional"||W.type==="nonoptional"||W.type==="nullable"||W.type==="readonly"||W.type==="default"||W.type==="prefault")return y(W.innerType,H);if(W.type==="intersection")return y(W.left,H)||y(W.right,H);if(W.type==="record"||W.type==="map")return y(W.keyType,H)||y(W.valueType,H);if(W.type==="pipe")return y(W.in,H)||y(W.out,H);if(W.type==="object"){for(let q in W.shape)if(y(W.shape[q],H))return!0;return!1}if(W.type==="union"){for(let q of W.options)if(y(q,H))return!0;return!1}if(W.type==="tuple"){for(let q of W.items)if(y(q,H))return!0;if(W.rest&&y(W.rest,H))return!0;return!1}return!1}var C2=(J,X={})=>(H)=>{let W=p1({...H,processors:X});return v(J,W),d1(W,J),n1(W,J)},g0=(J,X)=>(H)=>{let{libraryOptions:W,target:q}=H??{},Y=p1({...W??{},target:q,io:X,processors:{}});return v(J,Y),d1(Y,J),n1(Y,J)};var MX={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},S2=(J,X,H,W)=>{let q=H;q.type="string";let{minimum:Y,maximum:z,format:Q,patterns:U,contentEncoding:G}=J._zod.bag;if(typeof Y==="number")q.minLength=Y;if(typeof z==="number")q.maxLength=z;if(Q){if(q.format=MX[Q]??Q,q.format==="")delete q.format}if(G)q.contentEncoding=G;if(U&&U.size>0){let P=[...U];if(P.length===1)q.pattern=P[0].source;else if(P.length>1)q.allOf=[...P.map((B)=>({...X.target==="draft-07"||X.target==="draft-04"||X.target==="openapi-3.0"?{type:"string"}:{},pattern:B.source}))]}},j2=(J,X,H,W)=>{let q=H,{minimum:Y,maximum:z,format:Q,multipleOf:U,exclusiveMaximum:G,exclusiveMinimum:P}=J._zod.bag;if(typeof Q==="string"&&Q.includes("int"))q.type="integer";else q.type="number";if(typeof P==="number")if(X.target==="draft-04"||X.target==="openapi-3.0")q.minimum=P,q.exclusiveMinimum=!0;else q.exclusiveMinimum=P;if(typeof Y==="number"){if(q.minimum=Y,typeof P==="number"&&X.target!=="draft-04")if(P>=Y)delete q.minimum;else delete q.exclusiveMinimum}if(typeof G==="number")if(X.target==="draft-04"||X.target==="openapi-3.0")q.maximum=G,q.exclusiveMaximum=!0;else q.exclusiveMaximum=G;if(typeof z==="number"){if(q.maximum=z,typeof G==="number"&&X.target!=="draft-04")if(G<=z)delete q.maximum;else delete q.exclusiveMaximum}if(typeof U==="number")q.multipleOf=U},T2=(J,X,H,W)=>{H.type="boolean"},h2=(J,X,H,W)=>{if(X.unrepresentable==="throw")throw Error("BigInt cannot be represented in JSON Schema")};var v2=(J,X,H,W)=>{H.not={}},x2=(J,X,H,W)=>{},g2=(J,X,H,W)=>{},c2=(J,X,H,W)=>{if(X.unrepresentable==="throw")throw Error("Date cannot be represented in JSON Schema")},u2=(J,X,H,W)=>{let q=J._zod.def,Y=E0(q.entries);if(Y.every((z)=>typeof z==="number"))H.type="number";if(Y.every((z)=>typeof z==="string"))H.type="string";H.enum=Y};var y2=(J,X,H,W)=>{if(X.unrepresentable==="throw")throw Error("Custom types cannot be represented in JSON Schema")};var m2=(J,X,H,W)=>{if(X.unrepresentable==="throw")throw Error("Transforms cannot be represented in JSON Schema")};var f2=(J,X,H,W)=>{let q=H,Y=J._zod.def,{minimum:z,maximum:Q}=J._zod.bag;if(typeof z==="number")q.minItems=z;if(typeof Q==="number")q.maxItems=Q;q.type="array",q.items=v(Y.element,X,{...W,path:[...W.path,"items"]})},o2=(J,X,H,W)=>{let q=H,Y=J._zod.def;q.type="object",q.properties={};let z=Y.shape;for(let G in z)q.properties[G]=v(z[G],X,{...W,path:[...W.path,"properties",G]});let Q=new Set(Object.keys(z)),U=new Set([...Q].filter((G)=>{let P=Y.shape[G]._zod;if(X.io==="input")return P.optin===void 0;else return P.optout===void 0}));if(U.size>0)q.required=Array.from(U);if(Y.catchall?._zod.def.type==="never")q.additionalProperties=!1;else if(!Y.catchall){if(X.io==="output")q.additionalProperties=!1}else if(Y.catchall)q.additionalProperties=v(Y.catchall,X,{...W,path:[...W.path,"additionalProperties"]})},l2=(J,X,H,W)=>{let q=J._zod.def,Y=q.inclusive===!1,z=q.options.map((Q,U)=>v(Q,X,{...W,path:[...W.path,Y?"oneOf":"anyOf",U]}));if(Y)H.oneOf=z;else H.anyOf=z},r2=(J,X,H,W)=>{let q=J._zod.def,Y=v(q.left,X,{...W,path:[...W.path,"allOf",0]}),z=v(q.right,X,{...W,path:[...W.path,"allOf",1]}),Q=(G)=>("allOf"in G)&&Object.keys(G).length===1,U=[...Q(Y)?Y.allOf:[Y],...Q(z)?z.allOf:[z]];H.allOf=U};var p2=(J,X,H,W)=>{let q=H,Y=J._zod.def;if(q.type="object",X.target==="draft-07"||X.target==="draft-2020-12")q.propertyNames=v(Y.keyType,X,{...W,path:[...W.path,"propertyNames"]});q.additionalProperties=v(Y.valueType,X,{...W,path:[...W.path,"additionalProperties"]})},d2=(J,X,H,W)=>{let q=J._zod.def,Y=v(q.innerType,X,W),z=X.seen.get(J);if(X.target==="openapi-3.0")z.ref=q.innerType,H.nullable=!0;else H.anyOf=[Y,{type:"null"}]},n2=(J,X,H,W)=>{let q=J._zod.def;v(q.innerType,X,W);let Y=X.seen.get(J);Y.ref=q.innerType},i2=(J,X,H,W)=>{let q=J._zod.def;v(q.innerType,X,W);let Y=X.seen.get(J);Y.ref=q.innerType,H.default=JSON.parse(JSON.stringify(q.defaultValue))},t2=(J,X,H,W)=>{let q=J._zod.def;v(q.innerType,X,W);let Y=X.seen.get(J);if(Y.ref=q.innerType,X.io==="input")H._prefault=JSON.parse(JSON.stringify(q.defaultValue))},a2=(J,X,H,W)=>{let q=J._zod.def;v(q.innerType,X,W);let Y=X.seen.get(J);Y.ref=q.innerType;let z;try{z=q.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}H.default=z},s2=(J,X,H,W)=>{let q=J._zod.def,Y=X.io==="input"?q.in._zod.def.type==="transform"?q.out:q.in:q.out;v(Y,X,W);let z=X.seen.get(J);z.ref=Y},e2=(J,X,H,W)=>{let q=J._zod.def;v(q.innerType,X,W);let Y=X.seen.get(J);Y.ref=q.innerType,H.readOnly=!0};var JJ=(J,X,H,W)=>{let q=J._zod.def;v(q.innerType,X,W);let Y=X.seen.get(J);Y.ref=q.innerType};var RX=D("ZodISODateTime",(J,X)=>{W8.init(J,X),C.init(J,X)});function XJ(J){return P2(RX,J)}var NX=D("ZodISODate",(J,X)=>{q8.init(J,X),C.init(J,X)});function HJ(J){return B2(NX,J)}var ZX=D("ZodISOTime",(J,X)=>{Y8.init(J,X),C.init(J,X)});function WJ(J){return M2(ZX,J)}var LX=D("ZodISODuration",(J,X)=>{z8.init(J,X),C.init(J,X)});function qJ(J){return F2(LX,J)}var QJ=(J,X)=>{d0.init(J,X),J.name="ZodError",Object.defineProperties(J,{format:{value:(H)=>c4(J,H)},flatten:{value:(H)=>g4(J,H)},addIssue:{value:(H)=>{J.issues.push(H),J.message=JSON.stringify(J.issues,$0,2)}},addIssues:{value:(H)=>{J.issues.push(...H),J.message=JSON.stringify(J.issues,$0,2)}},isEmpty:{get(){return J.issues.length===0}}})},j5=D("ZodError",QJ),f=D("ZodError",QJ,{Parent:Error});var wJ=n0(f),GJ=i0(f),UJ=T0(f),DJ=h0(f),PJ=m4(f),BJ=f4(f),MJ=o4(f),FJ=l4(f),IJ=r4(f),$J=p4(f),AJ=d4(f),OJ=n4(f);var S=D("ZodType",(J,X)=>{return L.init(J,X),Object.assign(J["~standard"],{jsonSchema:{input:g0(J,"input"),output:g0(J,"output")}}),J.toJSONSchema=C2(J,{}),J.def=X,J.type=X.type,Object.defineProperty(J,"_def",{value:X}),J.check=(...H)=>{return J.clone(V.mergeDefs(X,{checks:[...X.checks??[],...H.map((W)=>typeof W==="function"?{_zod:{check:W,def:{check:"custom"},onattach:[]}}:W)]}))},J.clone=(H,W)=>d(J,H,W),J.brand=()=>J,J.register=(H,W)=>{return H.add(J,W),J},J.parse=(H,W)=>wJ(J,H,W,{callee:J.parse}),J.safeParse=(H,W)=>UJ(J,H,W),J.parseAsync=async(H,W)=>GJ(J,H,W,{callee:J.parseAsync}),J.safeParseAsync=async(H,W)=>DJ(J,H,W),J.spa=J.safeParseAsync,J.encode=(H,W)=>PJ(J,H,W),J.decode=(H,W)=>BJ(J,H,W),J.encodeAsync=async(H,W)=>MJ(J,H,W),J.decodeAsync=async(H,W)=>FJ(J,H,W),J.safeEncode=(H,W)=>IJ(J,H,W),J.safeDecode=(H,W)=>$J(J,H,W),J.safeEncodeAsync=async(H,W)=>AJ(J,H,W),J.safeDecodeAsync=async(H,W)=>OJ(J,H,W),J.refine=(H,W)=>J.check(IH(H,W)),J.superRefine=(H)=>J.check($H(H)),J.overwrite=(H)=>J.check(G0(H)),J.optional=()=>NJ(J),J.nullable=()=>ZJ(J),J.nullish=()=>NJ(ZJ(J)),J.nonoptional=(H)=>GH(J,H),J.array=()=>J4(J),J.or=(H)=>sX([J,H]),J.and=(H)=>JH(J,H),J.transform=(H)=>LJ(J,WH(H)),J.default=(H)=>zH(J,H),J.prefault=(H)=>wH(J,H),J.catch=(H)=>DH(J,H),J.pipe=(H)=>LJ(J,H),J.readonly=()=>MH(J),J.describe=(H)=>{let W=J.clone();return P0.add(W,{description:H}),W},Object.defineProperty(J,"description",{get(){return P0.get(J)?.description},configurable:!0}),J.meta=(...H)=>{if(H.length===0)return P0.get(J);let W=J.clone();return P0.add(W,H[0]),W},J.isOptional=()=>J.safeParse(void 0).success,J.isNullable=()=>J.safeParse(null).success,J}),bJ=D("_ZodString",(J,X)=>{e0.init(J,X),S.init(J,X),J._zod.processJSONSchema=(W,q,Y)=>S2(J,W,q,Y);let H=J._zod.bag;J.format=H.format??null,J.minLength=H.minimum??null,J.maxLength=H.maximum??null,J.regex=(...W)=>J.check(v1(...W)),J.includes=(...W)=>J.check(c1(...W)),J.startsWith=(...W)=>J.check(u1(...W)),J.endsWith=(...W)=>J.check(y1(...W)),J.min=(...W)=>J.check(K0(...W)),J.max=(...W)=>J.check(J1(...W)),J.length=(...W)=>J.check(X1(...W)),J.nonempty=(...W)=>J.check(K0(1,...W)),J.lowercase=(W)=>J.check(x1(W)),J.uppercase=(W)=>J.check(g1(W)),J.trim=()=>J.check(f1()),J.normalize=(...W)=>J.check(m1(...W)),J.toLowerCase=()=>J.check(o1()),J.toUpperCase=()=>J.check(l1()),J.slugify=()=>J.check(r1())}),t1=D("ZodString",(J,X)=>{e0.init(J,X),bJ.init(J,X),J.email=(H)=>J.check(r8(_X,H)),J.url=(H)=>J.check(t8(EX,H)),J.jwt=(H)=>J.check(D2(oX,H)),J.emoji=(H)=>J.check(a8(kX,H)),J.guid=(H)=>J.check(h1(VJ,H)),J.uuid=(H)=>J.check(p8(H1,H)),J.uuidv4=(H)=>J.check(d8(H1,H)),J.uuidv6=(H)=>J.check(n8(H1,H)),J.uuidv7=(H)=>J.check(i8(H1,H)),J.nanoid=(H)=>J.check(s8(CX,H)),J.guid=(H)=>J.check(h1(VJ,H)),J.cuid=(H)=>J.check(e8(SX,H)),J.cuid2=(H)=>J.check(J2(jX,H)),J.ulid=(H)=>J.check(X2(TX,H)),J.base64=(H)=>J.check(w2(yX,H)),J.base64url=(H)=>J.check(G2(mX,H)),J.xid=(H)=>J.check(H2(hX,H)),J.ksuid=(H)=>J.check(W2(vX,H)),J.ipv4=(H)=>J.check(q2(xX,H)),J.ipv6=(H)=>J.check(Y2(gX,H)),J.cidrv4=(H)=>J.check(z2(cX,H)),J.cidrv6=(H)=>J.check(Q2(uX,H)),J.e164=(H)=>J.check(U2(fX,H)),J.datetime=(H)=>J.check(XJ(H)),J.date=(H)=>J.check(HJ(H)),J.time=(H)=>J.check(WJ(H)),J.duration=(H)=>J.check(qJ(H))});function _(J){return o8(t1,J)}var C=D("ZodStringFormat",(J,X)=>{b.init(J,X),bJ.init(J,X)}),_X=D("ZodEmail",(J,X)=>{n6.init(J,X),C.init(J,X)});var VJ=D("ZodGUID",(J,X)=>{p6.init(J,X),C.init(J,X)});var H1=D("ZodUUID",(J,X)=>{d6.init(J,X),C.init(J,X)});var EX=D("ZodURL",(J,X)=>{i6.init(J,X),C.init(J,X)});var kX=D("ZodEmoji",(J,X)=>{t6.init(J,X),C.init(J,X)});var CX=D("ZodNanoID",(J,X)=>{a6.init(J,X),C.init(J,X)});var SX=D("ZodCUID",(J,X)=>{s6.init(J,X),C.init(J,X)});var jX=D("ZodCUID2",(J,X)=>{e6.init(J,X),C.init(J,X)});var TX=D("ZodULID",(J,X)=>{J8.init(J,X),C.init(J,X)});var hX=D("ZodXID",(J,X)=>{X8.init(J,X),C.init(J,X)});var vX=D("ZodKSUID",(J,X)=>{H8.init(J,X),C.init(J,X)});var xX=D("ZodIPv4",(J,X)=>{Q8.init(J,X),C.init(J,X)});var gX=D("ZodIPv6",(J,X)=>{w8.init(J,X),C.init(J,X)});var cX=D("ZodCIDRv4",(J,X)=>{G8.init(J,X),C.init(J,X)});var uX=D("ZodCIDRv6",(J,X)=>{U8.init(J,X),C.init(J,X)});var yX=D("ZodBase64",(J,X)=>{P8.init(J,X),C.init(J,X)});var mX=D("ZodBase64URL",(J,X)=>{B8.init(J,X),C.init(J,X)});var fX=D("ZodE164",(J,X)=>{M8.init(J,X),C.init(J,X)});var oX=D("ZodJWT",(J,X)=>{F8.init(J,X),C.init(J,X)});var W1=D("ZodNumber",(J,X)=>{j1.init(J,X),S.init(J,X),J._zod.processJSONSchema=(W,q,Y)=>j2(J,W,q,Y),J.gt=(W,q)=>J.check(V0(W,q)),J.gte=(W,q)=>J.check(i(W,q)),J.min=(W,q)=>J.check(i(W,q)),J.lt=(W,q)=>J.check(O0(W,q)),J.lte=(W,q)=>J.check(H0(W,q)),J.max=(W,q)=>J.check(H0(W,q)),J.int=(W)=>J.check(KJ(W)),J.safe=(W)=>J.check(KJ(W)),J.positive=(W)=>J.check(V0(0,W)),J.nonnegative=(W)=>J.check(i(0,W)),J.negative=(W)=>J.check(O0(0,W)),J.nonpositive=(W)=>J.check(H0(0,W)),J.multipleOf=(W,q)=>J.check(x0(W,q)),J.step=(W,q)=>J.check(x0(W,q)),J.finite=()=>J;let H=J._zod.bag;J.minValue=Math.max(H.minimum??Number.NEGATIVE_INFINITY,H.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,J.maxValue=Math.min(H.maximum??Number.POSITIVE_INFINITY,H.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,J.isInt=(H.format??"").includes("int")||Number.isSafeInteger(H.multipleOf??0.5),J.isFinite=!0,J.format=H.format??null});function B0(J){return I2(W1,J)}var lX=D("ZodNumberFormat",(J,X)=>{I8.init(J,X),W1.init(J,X)});function KJ(J){return A2(lX,J)}var a1=D("ZodBoolean",(J,X)=>{$8.init(J,X),S.init(J,X),J._zod.processJSONSchema=(H,W,q)=>T2(J,H,W,q)});function _J(J){return O2(a1,J)}var EJ=D("ZodBigInt",(J,X)=>{A8.init(J,X),S.init(J,X),J._zod.processJSONSchema=(W,q,Y)=>h2(J,W,q,Y),J.gte=(W,q)=>J.check(i(W,q)),J.min=(W,q)=>J.check(i(W,q)),J.gt=(W,q)=>J.check(V0(W,q)),J.gte=(W,q)=>J.check(i(W,q)),J.min=(W,q)=>J.check(i(W,q)),J.lt=(W,q)=>J.check(O0(W,q)),J.lte=(W,q)=>J.check(H0(W,q)),J.max=(W,q)=>J.check(H0(W,q)),J.positive=(W)=>J.check(V0(BigInt(0),W)),J.negative=(W)=>J.check(O0(BigInt(0),W)),J.nonpositive=(W)=>J.check(H0(BigInt(0),W)),J.nonnegative=(W)=>J.check(i(BigInt(0),W)),J.multipleOf=(W,q)=>J.check(x0(W,q));let H=J._zod.bag;J.minValue=H.minimum??null,J.maxValue=H.maximum??null,J.format=H.format??null});var rX=D("ZodAny",(J,X)=>{O8.init(J,X),S.init(J,X),J._zod.processJSONSchema=(H,W,q)=>x2(J,H,W,q)});function q1(){return R2(rX)}var pX=D("ZodUnknown",(J,X)=>{V8.init(J,X),S.init(J,X),J._zod.processJSONSchema=(H,W,q)=>g2(J,H,W,q)});function RJ(){return N2(pX)}var dX=D("ZodNever",(J,X)=>{K8.init(J,X),S.init(J,X),J._zod.processJSONSchema=(H,W,q)=>v2(J,H,W,q)});function nX(J){return Z2(dX,J)}var s1=D("ZodDate",(J,X)=>{R8.init(J,X),S.init(J,X),J._zod.processJSONSchema=(W,q,Y)=>c2(J,W,q,Y),J.min=(W,q)=>J.check(i(W,q)),J.max=(W,q)=>J.check(H0(W,q));let H=J._zod.bag;J.minDate=H.minimum?new Date(H.minimum):null,J.maxDate=H.maximum?new Date(H.maximum):null});function e1(J){return L2(s1,J)}var iX=D("ZodArray",(J,X)=>{N8.init(J,X),S.init(J,X),J._zod.processJSONSchema=(H,W,q)=>f2(J,H,W,q),J.element=X.element,J.min=(H,W)=>J.check(K0(H,W)),J.nonempty=(H)=>J.check(K0(1,H)),J.max=(H,W)=>J.check(J1(H,W)),J.length=(H,W)=>J.check(X1(H,W)),J.unwrap=()=>J.element});function J4(J,X){return _2(iX,J,X)}var tX=D("ZodObject",(J,X)=>{b8.init(J,X),S.init(J,X),J._zod.processJSONSchema=(H,W,q)=>o2(J,H,W,q),V.defineLazy(J,"shape",()=>{return X.shape}),J.keyof=()=>H4(Object.keys(J._zod.def.shape)),J.catchall=(H)=>J.clone({...J._zod.def,catchall:H}),J.passthrough=()=>J.clone({...J._zod.def,catchall:RJ()}),J.loose=()=>J.clone({...J._zod.def,catchall:RJ()}),J.strict=()=>J.clone({...J._zod.def,catchall:nX()}),J.strip=()=>J.clone({...J._zod.def,catchall:void 0}),J.extend=(H)=>{return V.extend(J,H)},J.safeExtend=(H)=>{return V.safeExtend(J,H)},J.merge=(H)=>V.merge(J,H),J.pick=(H)=>V.pick(J,H),J.omit=(H)=>V.omit(J,H),J.partial=(...H)=>V.partial(CJ,J,H[0]),J.required=(...H)=>V.required(SJ,J,H[0])});function kJ(J,X){let H={type:"object",shape:J??{},...V.normalizeParams(X)};return new tX(H)}var aX=D("ZodUnion",(J,X)=>{_8.init(J,X),S.init(J,X),J._zod.processJSONSchema=(H,W,q)=>l2(J,H,W,q),J.options=X.options});function sX(J,X){return new aX({type:"union",options:J,...V.normalizeParams(X)})}var eX=D("ZodIntersection",(J,X)=>{E8.init(J,X),S.init(J,X),J._zod.processJSONSchema=(H,W,q)=>r2(J,H,W,q)});function JH(J,X){return new eX({type:"intersection",left:J,right:X})}var XH=D("ZodRecord",(J,X)=>{k8.init(J,X),S.init(J,X),J._zod.processJSONSchema=(H,W,q)=>p2(J,H,W,q),J.keyType=X.keyType,J.valueType=X.valueType});function X4(J,X,H){return new XH({type:"record",keyType:J,valueType:X,...V.normalizeParams(H)})}var i1=D("ZodEnum",(J,X)=>{C8.init(J,X),S.init(J,X),J._zod.processJSONSchema=(W,q,Y)=>u2(J,W,q,Y),J.enum=X.entries,J.options=Object.values(X.entries);let H=new Set(Object.keys(X.entries));J.extract=(W,q)=>{let Y={};for(let z of W)if(H.has(z))Y[z]=X.entries[z];else throw Error(`Key ${z} not found in enum`);return new i1({...X,checks:[],...V.normalizeParams(q),entries:Y})},J.exclude=(W,q)=>{let Y={...X.entries};for(let z of W)if(H.has(z))delete Y[z];else throw Error(`Key ${z} not found in enum`);return new i1({...X,checks:[],...V.normalizeParams(q),entries:Y})}});function H4(J,X){let H=Array.isArray(J)?Object.fromEntries(J.map((W)=>[W,W])):J;return new i1({type:"enum",entries:H,...V.normalizeParams(X)})}var HH=D("ZodTransform",(J,X)=>{S8.init(J,X),S.init(J,X),J._zod.processJSONSchema=(H,W,q)=>m2(J,H,W,q),J._zod.parse=(H,W)=>{if(W.direction==="backward")throw new b0(J.constructor.name);H.addIssue=(Y)=>{if(typeof Y==="string")H.issues.push(V.issue(Y,H.value,X));else{let z=Y;if(z.fatal)z.continue=!1;z.code??(z.code="custom"),z.input??(z.input=H.value),z.inst??(z.inst=J),H.issues.push(V.issue(z))}};let q=X.transform(H.value,H);if(q instanceof Promise)return q.then((Y)=>{return H.value=Y,H});return H.value=q,H}});function WH(J){return new HH({type:"transform",transform:J})}var CJ=D("ZodOptional",(J,X)=>{j8.init(J,X),S.init(J,X),J._zod.processJSONSchema=(H,W,q)=>JJ(J,H,W,q),J.unwrap=()=>J._zod.def.innerType});function NJ(J){return new CJ({type:"optional",innerType:J})}var qH=D("ZodNullable",(J,X)=>{T8.init(J,X),S.init(J,X),J._zod.processJSONSchema=(H,W,q)=>d2(J,H,W,q),J.unwrap=()=>J._zod.def.innerType});function ZJ(J){return new qH({type:"nullable",innerType:J})}var YH=D("ZodDefault",(J,X)=>{h8.init(J,X),S.init(J,X),J._zod.processJSONSchema=(H,W,q)=>i2(J,H,W,q),J.unwrap=()=>J._zod.def.innerType,J.removeDefault=J.unwrap});function zH(J,X){return new YH({type:"default",innerType:J,get defaultValue(){return typeof X==="function"?X():V.shallowClone(X)}})}var QH=D("ZodPrefault",(J,X)=>{v8.init(J,X),S.init(J,X),J._zod.processJSONSchema=(H,W,q)=>t2(J,H,W,q),J.unwrap=()=>J._zod.def.innerType});function wH(J,X){return new QH({type:"prefault",innerType:J,get defaultValue(){return typeof X==="function"?X():V.shallowClone(X)}})}var SJ=D("ZodNonOptional",(J,X)=>{x8.init(J,X),S.init(J,X),J._zod.processJSONSchema=(H,W,q)=>n2(J,H,W,q),J.unwrap=()=>J._zod.def.innerType});function GH(J,X){return new SJ({type:"nonoptional",innerType:J,...V.normalizeParams(X)})}var UH=D("ZodCatch",(J,X)=>{g8.init(J,X),S.init(J,X),J._zod.processJSONSchema=(H,W,q)=>a2(J,H,W,q),J.unwrap=()=>J._zod.def.innerType,J.removeCatch=J.unwrap});function DH(J,X){return new UH({type:"catch",innerType:J,catchValue:typeof X==="function"?X:()=>X})}var PH=D("ZodPipe",(J,X)=>{c8.init(J,X),S.init(J,X),J._zod.processJSONSchema=(H,W,q)=>s2(J,H,W,q),J.in=X.in,J.out=X.out});function LJ(J,X){return new PH({type:"pipe",in:J,out:X})}var BH=D("ZodReadonly",(J,X)=>{u8.init(J,X),S.init(J,X),J._zod.processJSONSchema=(H,W,q)=>e2(J,H,W,q),J.unwrap=()=>J._zod.def.innerType});function MH(J){return new BH({type:"readonly",innerType:J})}var FH=D("ZodCustom",(J,X)=>{y8.init(J,X),S.init(J,X),J._zod.processJSONSchema=(H,W,q)=>y2(J,H,W,q)});function IH(J,X={}){return E2(FH,J,X)}function $H(J){return k2(J)}var N0={};_4(N0,{string:()=>AH,number:()=>OH,date:()=>RH,boolean:()=>VH,bigint:()=>KH});function AH(J){return l8(t1,J)}function OH(J){return $2(W1,J)}function VH(J){return V2(a1,J)}function KH(J){return K2(EJ,J)}function RH(J){return b2(s1,J)}r(T1());function t(J,X){if(!Boolean(J))throw Error(X)}function Y1(J){return typeof J=="object"&&J!==null}function jJ(J,X){if(!Boolean(J))throw Error(X!=null?X:"Unexpected invariant triggered.")}var NH=/\r\n|[\n\r]/g;function Z0(J,X){let H=0,W=1;for(let q of J.body.matchAll(NH)){if(typeof q.index==="number"||jJ(!1),q.index>=X)break;H=q.index+q[0].length,W+=1}return{line:W,column:X+1-H}}function W4(J){return z1(J.source,Z0(J.source,J.start))}function z1(J,X){let H=J.locationOffset.column-1,W="".padStart(H)+J.body,q=X.line-1,Y=J.locationOffset.line-1,z=X.line+Y,Q=X.line===1?H:0,U=X.column+Q,G=`${J.name}:${z}:${U}
|
|
23
|
+
`,P=W.split(/\r\n|[\n\r]/g),B=P[q];if(B.length>120){let $=Math.floor(U/80),F=U%80,k=[];for(let h=0;h<B.length;h+=80)k.push(B.slice(h,h+80));return G+TJ([[`${z} |`,k[0]],...k.slice(1,$+1).map((h)=>["|",h]),["|","^".padStart(F)],["|",k[$+1]]])}return G+TJ([[`${z-1} |`,P[q-1]],[`${z} |`,B],["|","^".padStart(U)],[`${z+1} |`,P[q+1]]])}function TJ(J){let X=J.filter(([W,q])=>q!==void 0),H=Math.max(...X.map(([W])=>W.length));return X.map(([W,q])=>W.padStart(H)+(q?" "+q:"")).join(`
|
|
24
|
+
`)}function ZH(J){let X=J[0];if(X==null||"kind"in X||"length"in X)return{nodes:X,source:J[1],positions:J[2],path:J[3],originalError:J[4],extensions:J[5]};return X}class o extends Error{constructor(J,...X){var H,W,q;let{nodes:Y,source:z,positions:Q,path:U,originalError:G,extensions:P}=ZH(X);super(J);this.name="GraphQLError",this.path=U!==null&&U!==void 0?U:void 0,this.originalError=G!==null&&G!==void 0?G:void 0,this.nodes=hJ(Array.isArray(Y)?Y:Y?[Y]:void 0);let B=hJ((H=this.nodes)===null||H===void 0?void 0:H.map((F)=>F.loc).filter((F)=>F!=null));this.source=z!==null&&z!==void 0?z:B===null||B===void 0?void 0:(W=B[0])===null||W===void 0?void 0:W.source,this.positions=Q!==null&&Q!==void 0?Q:B===null||B===void 0?void 0:B.map((F)=>F.start),this.locations=Q&&z?Q.map((F)=>Z0(z,F)):B===null||B===void 0?void 0:B.map((F)=>Z0(F.source,F.start));let $=Y1(G===null||G===void 0?void 0:G.extensions)?G===null||G===void 0?void 0:G.extensions:void 0;if(this.extensions=(q=P!==null&&P!==void 0?P:$)!==null&&q!==void 0?q:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),G!==null&&G!==void 0&&G.stack)Object.defineProperty(this,"stack",{value:G.stack,writable:!0,configurable:!0});else if(Error.captureStackTrace)Error.captureStackTrace(this,o);else Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let J=this.message;if(this.nodes){for(let X of this.nodes)if(X.loc)J+=`
|
|
25
25
|
|
|
26
|
-
`+
|
|
26
|
+
`+W4(X.loc)}else if(this.source&&this.locations)for(let X of this.locations)J+=`
|
|
27
27
|
|
|
28
|
-
`+
|
|
29
|
-
`;if(B+=H,P||
|
|
30
|
-
`;return'"""'+B+'"""'}function
|
|
28
|
+
`+z1(this.source,X);return J}toJSON(){let J={message:this.message};if(this.locations!=null)J.locations=this.locations;if(this.path!=null)J.path=this.path;if(this.extensions!=null&&Object.keys(this.extensions).length>0)J.extensions=this.extensions;return J}}function hJ(J){return J===void 0||J.length===0?void 0:J}var Y4={Name:[],Document:["definitions"],OperationDefinition:["description","name","variableDefinitions","directives","selectionSet"],VariableDefinition:["description","variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["description","name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"],TypeCoordinate:["name"],MemberCoordinate:["name","memberName"],ArgumentCoordinate:["name","fieldName","argumentName"],DirectiveCoordinate:["name"],DirectiveArgumentCoordinate:["name","argumentName"]},LH=new Set(Object.keys(Y4));function z4(J){let X=J===null||J===void 0?void 0:J.kind;return typeof X==="string"&&LH.has(X)}var q4;(function(J){J.QUERY="query",J.MUTATION="mutation",J.SUBSCRIPTION="subscription"})(q4||(q4={}));var E;(function(J){J.NAME="Name",J.DOCUMENT="Document",J.OPERATION_DEFINITION="OperationDefinition",J.VARIABLE_DEFINITION="VariableDefinition",J.SELECTION_SET="SelectionSet",J.FIELD="Field",J.ARGUMENT="Argument",J.FRAGMENT_SPREAD="FragmentSpread",J.INLINE_FRAGMENT="InlineFragment",J.FRAGMENT_DEFINITION="FragmentDefinition",J.VARIABLE="Variable",J.INT="IntValue",J.FLOAT="FloatValue",J.STRING="StringValue",J.BOOLEAN="BooleanValue",J.NULL="NullValue",J.ENUM="EnumValue",J.LIST="ListValue",J.OBJECT="ObjectValue",J.OBJECT_FIELD="ObjectField",J.DIRECTIVE="Directive",J.NAMED_TYPE="NamedType",J.LIST_TYPE="ListType",J.NON_NULL_TYPE="NonNullType",J.SCHEMA_DEFINITION="SchemaDefinition",J.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",J.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",J.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",J.FIELD_DEFINITION="FieldDefinition",J.INPUT_VALUE_DEFINITION="InputValueDefinition",J.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",J.UNION_TYPE_DEFINITION="UnionTypeDefinition",J.ENUM_TYPE_DEFINITION="EnumTypeDefinition",J.ENUM_VALUE_DEFINITION="EnumValueDefinition",J.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",J.DIRECTIVE_DEFINITION="DirectiveDefinition",J.SCHEMA_EXTENSION="SchemaExtension",J.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",J.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",J.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",J.UNION_TYPE_EXTENSION="UnionTypeExtension",J.ENUM_TYPE_EXTENSION="EnumTypeExtension",J.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension",J.TYPE_COORDINATE="TypeCoordinate",J.MEMBER_COORDINATE="MemberCoordinate",J.ARGUMENT_COORDINATE="ArgumentCoordinate",J.DIRECTIVE_COORDINATE="DirectiveCoordinate",J.DIRECTIVE_ARGUMENT_COORDINATE="DirectiveArgumentCoordinate"})(E||(E={}));function Q4(J){return J===9||J===32}function bH(J){return J>=48&&J<=57}function vJ(J){return J>=97&&J<=122||J>=65&&J<=90}function xJ(J){return vJ(J)||J===95}function gJ(J){return vJ(J)||bH(J)||J===95}function cJ(J,X){let H=J.replace(/"""/g,'\\"""'),W=H.split(/\r\n|[\n\r]/g),q=W.length===1,Y=W.length>1&&W.slice(1).every((F)=>F.length===0||Q4(F.charCodeAt(0))),z=H.endsWith('\\"""'),Q=J.endsWith('"')&&!z,U=J.endsWith("\\"),G=Q||U,P=!(X!==null&&X!==void 0&&X.minimize)&&(!q||J.length>70||G||Y||z),B="",$=q&&Q4(J.charCodeAt(0));if(P&&!$||Y)B+=`
|
|
29
|
+
`;if(B+=H,P||G)B+=`
|
|
30
|
+
`;return'"""'+B+'"""'}function M0(J){return Q1(J,[])}function Q1(J,X){switch(typeof J){case"string":return JSON.stringify(J);case"function":return J.name?`[function ${J.name}]`:"[function]";case"object":return _H(J,X);default:return String(J)}}function _H(J,X){if(J===null)return"null";if(X.includes(J))return"[Circular]";let H=[...X,J];if(EH(J)){let W=J.toJSON();if(W!==J)return typeof W==="string"?W:Q1(W,H)}else if(Array.isArray(J))return CH(J,H);return kH(J,H)}function EH(J){return typeof J.toJSON==="function"}function kH(J,X){let H=Object.entries(J);if(H.length===0)return"{}";if(X.length>2)return"["+SH(J)+"]";return"{ "+H.map(([q,Y])=>q+": "+Q1(Y,X)).join(", ")+" }"}function CH(J,X){if(J.length===0)return"[]";if(X.length>2)return"[Array]";let H=Math.min(10,J.length),W=J.length-H,q=[];for(let Y=0;Y<H;++Y)q.push(Q1(J[Y],X));if(W===1)q.push("... 1 more item");else if(W>1)q.push(`... ${W} more items`);return"["+q.join(", ")+"]"}function SH(J){let X=Object.prototype.toString.call(J).replace(/^\[object /,"").replace(/]$/,"");if(X==="Object"&&typeof J.constructor==="function"){let H=J.constructor.name;if(typeof H==="string"&&H!=="")return H}return X}function uJ(J,X){let[H,W]=X?[J,X]:[void 0,J],q=" Did you mean ";if(H)q+=H+" ";let Y=W.map((U)=>`"${U}"`);switch(Y.length){case 0:return"";case 1:return q+Y[0]+"?";case 2:return q+Y[0]+" or "+Y[1]+"?"}let z=Y.slice(0,5),Q=z.pop();return q+z.join(", ")+", or "+Q+"?"}function w4(J){return J}function yJ(J,X){let H=Object.create(null);for(let W of J)H[X(W)]=W;return H}function w1(J,X,H){let W=Object.create(null);for(let q of J)W[X(q)]=H(q);return W}function mJ(J,X){let H=0,W=0;while(H<J.length&&W<X.length){let q=J.charCodeAt(H),Y=X.charCodeAt(W);if(G1(q)&&G1(Y)){let z=0;do++H,z=z*10+q-G4,q=J.charCodeAt(H);while(G1(q)&&z>0);let Q=0;do++W,Q=Q*10+Y-G4,Y=X.charCodeAt(W);while(G1(Y)&&Q>0);if(z<Q)return-1;if(z>Q)return 1}else{if(q<Y)return-1;if(q>Y)return 1;++H,++W}}return J.length-X.length}var G4=48,jH=57;function G1(J){return!isNaN(J)&&G4<=J&&J<=jH}function oJ(J,X){let H=Object.create(null),W=new lJ(J),q=Math.floor(J.length*0.4)+1;for(let Y of X){let z=W.measure(Y,q);if(z!==void 0)H[Y]=z}return Object.keys(H).sort((Y,z)=>{let Q=H[Y]-H[z];return Q!==0?Q:mJ(Y,z)})}class lJ{constructor(J){this._input=J,this._inputLowerCase=J.toLowerCase(),this._inputArray=fJ(this._inputLowerCase),this._rows=[Array(J.length+1).fill(0),Array(J.length+1).fill(0),Array(J.length+1).fill(0)]}measure(J,X){if(this._input===J)return 0;let H=J.toLowerCase();if(this._inputLowerCase===H)return 1;let W=fJ(H),q=this._inputArray;if(W.length<q.length){let G=W;W=q,q=G}let Y=W.length,z=q.length;if(Y-z>X)return;let Q=this._rows;for(let G=0;G<=z;G++)Q[0][G]=G;for(let G=1;G<=Y;G++){let P=Q[(G-1)%3],B=Q[G%3],$=B[0]=G;for(let F=1;F<=z;F++){let k=W[G-1]===q[F-1]?0:1,h=Math.min(P[F]+1,B[F-1]+1,P[F-1]+k);if(G>1&&F>1&&W[G-1]===q[F-2]&&W[G-2]===q[F-1]){let W0=Q[(G-2)%3][F-2];h=Math.min(h,W0+1)}if(h<$)$=h;B[F]=h}if($>X)return}let U=Q[Y%3][z];return U<=X?U:void 0}}function fJ(J){let X=J.length,H=Array(X);for(let W=0;W<X;++W)H[W]=J.charCodeAt(W);return H}function U1(J){if(J==null)return Object.create(null);if(Object.getPrototypeOf(J)===null)return J;let X=Object.create(null);for(let[H,W]of Object.entries(J))X[H]=W;return X}function rJ(J){return`"${J.replace(TH,hH)}"`}var TH=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function hH(J){return vH[J.charCodeAt(0)]}var vH=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","","\\\"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"];var pJ=Object.freeze({});function U4(J,X,H=Y4){let W=new Map;for(let p of Object.values(E))W.set(p,dJ(X,p));let q=void 0,Y=Array.isArray(J),z=[J],Q=-1,U=[],G=J,P=void 0,B=void 0,$=[],F=[];do{Q++;let p=Q===z.length,m0=p&&U.length!==0;if(p){if(P=F.length===0?void 0:$[$.length-1],G=B,B=F.pop(),m0)if(Y){G=G.slice();let x=0;for(let[e,L4]of U){let b4=e-x;if(L4===null)G.splice(b4,1),x++;else G[b4]=L4}}else{G={...G};for(let[x,e]of U)G[x]=e}Q=q.index,z=q.keys,U=q.edits,Y=q.inArray,q=q.prev}else if(B){if(P=Y?Q:z[Q],G=B[P],G===null||G===void 0)continue;$.push(P)}let g;if(!Array.isArray(G)){var k,h;z4(G)||t(!1,`Invalid AST Node: ${M0(G)}.`);let x=p?(k=W.get(G.kind))===null||k===void 0?void 0:k.leave:(h=W.get(G.kind))===null||h===void 0?void 0:h.enter;if(g=x===null||x===void 0?void 0:x.call(X,G,P,B,$,F),g===pJ)break;if(g===!1){if(!p){$.pop();continue}}else if(g!==void 0){if(U.push([P,g]),!p)if(z4(g))G=g;else{$.pop();continue}}}if(g===void 0&&m0)U.push([P,G]);if(p)$.pop();else{var W0;if(q={inArray:Y,index:Q,keys:z,edits:U,prev:q},Y=Array.isArray(G),z=Y?G:(W0=H[G.kind])!==null&&W0!==void 0?W0:[],Q=-1,U=[],B)F.push(B);B=G}}while(q!==void 0);if(U.length!==0)return U[U.length-1][1];return J}function dJ(J,X){let H=J[X];if(typeof H==="object")return H;else if(typeof H==="function")return{enter:H,leave:void 0};return{enter:J.enter,leave:J.leave}}function P1(J){return U4(J,gH)}var xH=80,gH={Name:{leave:(J)=>J.value},Variable:{leave:(J)=>"$"+J.name},Document:{leave:(J)=>M(J.definitions,`
|
|
31
31
|
|
|
32
|
-
`)},OperationDefinition:{leave(J){let X=
|
|
32
|
+
`)},OperationDefinition:{leave(J){let X=D4(J.variableDefinitions)?O(`(
|
|
33
33
|
`,M(J.variableDefinitions,`
|
|
34
34
|
`),`
|
|
35
35
|
)`):O("(",M(J.variableDefinitions,", "),")"),H=O("",J.description,`
|
|
36
36
|
`)+M([J.operation,M([J.name,X]),M(J.directives," ")]," ");return(H==="query"?"":H+" ")+J.selectionSet}},VariableDefinition:{leave:({variable:J,type:X,defaultValue:H,directives:W,description:q})=>O("",q,`
|
|
37
37
|
`)+J+": "+X+O(" = ",H)+O(" ",M(W," "))},SelectionSet:{leave:({selections:J})=>a(J)},Field:{leave({alias:J,name:X,arguments:H,directives:W,selectionSet:q}){let Y=O("",J,": ")+X,z=Y+O("(",M(H,", "),")");if(z.length>xH)z=Y+O(`(
|
|
38
|
-
`,
|
|
38
|
+
`,D1(M(H,`
|
|
39
39
|
`)),`
|
|
40
40
|
)`);return M([z,M(W," "),q]," ")}},Argument:{leave:({name:J,value:X})=>J+": "+X},FragmentSpread:{leave:({name:J,directives:X})=>"..."+J+O(" ",M(X," "))},InlineFragment:{leave:({typeCondition:J,directives:X,selectionSet:H})=>M(["...",O("on ",J),M(X," "),H]," ")},FragmentDefinition:{leave:({name:J,typeCondition:X,variableDefinitions:H,directives:W,selectionSet:q,description:Y})=>O("",Y,`
|
|
41
41
|
`)+`fragment ${J}${O("(",M(H,", "),")")} on ${X} ${O("",M(W," ")," ")}`+q},IntValue:{leave:({value:J})=>J},FloatValue:{leave:({value:J})=>J},StringValue:{leave:({value:J,block:X})=>X?cJ(J):rJ(J)},BooleanValue:{leave:({value:J})=>J?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:J})=>J},ListValue:{leave:({values:J})=>"["+M(J,", ")+"]"},ObjectValue:{leave:({fields:J})=>"{"+M(J,", ")+"}"},ObjectField:{leave:({name:J,value:X})=>J+": "+X},Directive:{leave:({name:J,arguments:X})=>"@"+J+O("(",M(X,", "),")")},NamedType:{leave:({name:J})=>J},ListType:{leave:({type:J})=>"["+J+"]"},NonNullType:{leave:({type:J})=>J+"!"},SchemaDefinition:{leave:({description:J,directives:X,operationTypes:H})=>O("",J,`
|
|
42
42
|
`)+M(["schema",M(X," "),a(H)]," ")},OperationTypeDefinition:{leave:({operation:J,type:X})=>J+": "+X},ScalarTypeDefinition:{leave:({description:J,name:X,directives:H})=>O("",J,`
|
|
43
43
|
`)+M(["scalar",X,M(H," ")]," ")},ObjectTypeDefinition:{leave:({description:J,name:X,interfaces:H,directives:W,fields:q})=>O("",J,`
|
|
44
44
|
`)+M(["type",X,O("implements ",M(H," & ")),M(W," "),a(q)]," ")},FieldDefinition:{leave:({description:J,name:X,arguments:H,type:W,directives:q})=>O("",J,`
|
|
45
|
-
`)+X+(
|
|
46
|
-
`,
|
|
45
|
+
`)+X+(D4(H)?O(`(
|
|
46
|
+
`,D1(M(H,`
|
|
47
47
|
`)),`
|
|
48
48
|
)`):O("(",M(H,", "),")"))+": "+W+O(" ",M(q," "))},InputValueDefinition:{leave:({description:J,name:X,type:H,defaultValue:W,directives:q})=>O("",J,`
|
|
49
49
|
`)+M([X+": "+H,O("= ",W),M(q," ")]," ")},InterfaceTypeDefinition:{leave:({description:J,name:X,interfaces:H,directives:W,fields:q})=>O("",J,`
|
|
@@ -52,12 +52,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
52
52
|
`)+M(["enum",X,M(H," "),a(W)]," ")},EnumValueDefinition:{leave:({description:J,name:X,directives:H})=>O("",J,`
|
|
53
53
|
`)+M([X,M(H," ")]," ")},InputObjectTypeDefinition:{leave:({description:J,name:X,directives:H,fields:W})=>O("",J,`
|
|
54
54
|
`)+M(["input",X,M(H," "),a(W)]," ")},DirectiveDefinition:{leave:({description:J,name:X,arguments:H,repeatable:W,locations:q})=>O("",J,`
|
|
55
|
-
`)+"directive @"+X+(
|
|
56
|
-
`,
|
|
55
|
+
`)+"directive @"+X+(D4(H)?O(`(
|
|
56
|
+
`,D1(M(H,`
|
|
57
57
|
`)),`
|
|
58
58
|
)`):O("(",M(H,", "),")"))+(W?" repeatable":"")+" on "+M(q," | ")},SchemaExtension:{leave:({directives:J,operationTypes:X})=>M(["extend schema",M(J," "),a(X)]," ")},ScalarTypeExtension:{leave:({name:J,directives:X})=>M(["extend scalar",J,M(X," ")]," ")},ObjectTypeExtension:{leave:({name:J,interfaces:X,directives:H,fields:W})=>M(["extend type",J,O("implements ",M(X," & ")),M(H," "),a(W)]," ")},InterfaceTypeExtension:{leave:({name:J,interfaces:X,directives:H,fields:W})=>M(["extend interface",J,O("implements ",M(X," & ")),M(H," "),a(W)]," ")},UnionTypeExtension:{leave:({name:J,directives:X,types:H})=>M(["extend union",J,M(X," "),O("= ",M(H," | "))]," ")},EnumTypeExtension:{leave:({name:J,directives:X,values:H})=>M(["extend enum",J,M(X," "),a(H)]," ")},InputObjectTypeExtension:{leave:({name:J,directives:X,fields:H})=>M(["extend input",J,M(X," "),a(H)]," ")},TypeCoordinate:{leave:({name:J})=>J},MemberCoordinate:{leave:({name:J,memberName:X})=>M([J,O(".",X)])},ArgumentCoordinate:{leave:({name:J,fieldName:X,argumentName:H})=>M([J,O(".",X),O("(",H,":)")])},DirectiveCoordinate:{leave:({name:J})=>M(["@",J])},DirectiveArgumentCoordinate:{leave:({name:J,argumentName:X})=>M(["@",J,O("(",X,":)")])}};function M(J,X=""){var H;return(H=J===null||J===void 0?void 0:J.filter((W)=>W).join(X))!==null&&H!==void 0?H:""}function a(J){return O(`{
|
|
59
|
-
`,
|
|
59
|
+
`,D1(M(J,`
|
|
60
60
|
`)),`
|
|
61
|
-
}`)}function O(J,X,H=""){return X!=null&&X!==""?J+X+H:""}function
|
|
62
|
-
`))}function
|
|
63
|
-
`)))!==null&&X!==void 0?X:!1}function M0(J,X){switch(J.kind){case E.NULL:return null;case E.INT:return parseInt(J.value,10);case E.FLOAT:return parseFloat(J.value);case E.STRING:case E.ENUM:case E.BOOLEAN:return J.value;case E.LIST:return J.values.map((H)=>M0(H,X));case E.OBJECT:return D0(J.fields,(H)=>H.name.value,(H)=>M0(H.value,X));case E.VARIABLE:return X===null||X===void 0?void 0:X[J.name.value]}}function c1(J){if(J!=null||t(!1,"Must provide name."),typeof J==="string"||t(!1,"Expected name to be a string."),J.length===0)throw new o("Expected name to be a non-empty string.");for(let X=1;X<J.length;++X)if(!gJ(J.charCodeAt(X)))throw new o(`Names must only contain [_a-zA-Z0-9] but "${J}" does not.`);if(!xJ(J.charCodeAt(0)))throw new o(`Names must start with [_a-zA-Z] but "${J}" does not.`);return J}function B4(J){if(J==="true"||J==="false"||J==="null")throw new o(`Enum values cannot be named: ${J}`);return c1(J)}class u1{constructor(J){var X,H,W,q;let Y=(X=J.parseValue)!==null&&X!==void 0?X:D4;if(this.name=c1(J.name),this.description=J.description,this.specifiedByURL=J.specifiedByURL,this.serialize=(H=J.serialize)!==null&&H!==void 0?H:D4,this.parseValue=Y,this.parseLiteral=(W=J.parseLiteral)!==null&&W!==void 0?W:(z,Q)=>Y(M0(z,Q)),this.extensions=U0(J.extensions),this.astNode=J.astNode,this.extensionASTNodes=(q=J.extensionASTNodes)!==null&&q!==void 0?q:[],J.specifiedByURL==null||typeof J.specifiedByURL==="string"||t(!1,`${this.name} must provide "specifiedByURL" as a string, but got: ${M1(J.specifiedByURL)}.`),J.serialize==null||typeof J.serialize==="function"||t(!1,`${this.name} must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.`),J.parseLiteral)typeof J.parseValue==="function"&&typeof J.parseLiteral==="function"||t(!1,`${this.name} must provide both "parseValue" and "parseLiteral" functions.`)}get[Symbol.toStringTag](){return"GraphQLScalarType"}toConfig(){return{name:this.name,description:this.description,specifiedByURL:this.specifiedByURL,serialize:this.serialize,parseValue:this.parseValue,parseLiteral:this.parseLiteral,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function nJ(J){return z0(J)&&!Array.isArray(J)}class y1{constructor(J){var X;this.name=c1(J.name),this.description=J.description,this.extensions=U0(J.extensions),this.astNode=J.astNode,this.extensionASTNodes=(X=J.extensionASTNodes)!==null&&X!==void 0?X:[],this._values=typeof J.values==="function"?J.values:iJ(this.name,J.values),this._valueLookup=null,this._nameLookup=null}get[Symbol.toStringTag](){return"GraphQLEnumType"}getValues(){if(typeof this._values==="function")this._values=iJ(this.name,this._values());return this._values}getValue(J){if(this._nameLookup===null)this._nameLookup=yJ(this.getValues(),(X)=>X.name);return this._nameLookup[J]}serialize(J){if(this._valueLookup===null)this._valueLookup=new Map(this.getValues().map((H)=>[H.value,H]));let X=this._valueLookup.get(J);if(X===void 0)throw new o(`Enum "${this.name}" cannot represent value: ${M1(J)}`);return X.name}parseValue(J){if(typeof J!=="string"){let H=M1(J);throw new o(`Enum "${this.name}" cannot represent non-string value: ${H}.`+F0(this,H))}let X=this.getValue(J);if(X==null)throw new o(`Value "${J}" does not exist in "${this.name}" enum.`+F0(this,J));return X.value}parseLiteral(J,X){if(J.kind!==E.ENUM){let W=B0(J);throw new o(`Enum "${this.name}" cannot represent non-enum value: ${W}.`+F0(this,W),{nodes:J})}let H=this.getValue(J.value);if(H==null){let W=B0(J);throw new o(`Value "${W}" does not exist in "${this.name}" enum.`+F0(this,W),{nodes:J})}return H.value}toConfig(){let J=D0(this.getValues(),(X)=>X.name,(X)=>({description:X.description,value:X.value,deprecationReason:X.deprecationReason,extensions:X.extensions,astNode:X.astNode}));return{name:this.name,description:this.description,values:J,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function F0(J,X){let H=J.getValues().map((q)=>q.name),W=oJ(X,H);return uJ("the enum value",W)}function iJ(J,X){return nJ(X)||t(!1,`${J} values must be an object with value names as keys.`),Object.entries(X).map(([H,W])=>{return nJ(W)||t(!1,`${J}.${H} must refer to an object with a "value" key representing an internal value but got: ${M1(W)}.`),{name:B4(H),description:W.description,value:W.value!==void 0?W.value:H,deprecationReason:W.deprecationReason,extensions:U0(W.extensions),astNode:W.astNode}})}var aJ=class{name;values;gqlEnum;constructor(J,X){this.name=J,this.values=X,this.gqlEnum=new y1({name:this.name,values:Object.fromEntries(X.map((H)=>[H,{value:H}]))})}getName(){return this.name}getEnumValues(){return this.values}getPothos(){return this.gqlEnum}getZod(){return W4(this.values)}getJson(){return{type:"string",enum:this.values}}getJsonSchema(){return this.getJson()}},L1=(J,X)=>new aJ(J,X);var j=class extends u1{zodSchema;jsonSchemaDef;constructor(J){super(J);this.zodSchema=J.zod,this.jsonSchemaDef=J.jsonSchema}getZod(){return this.zodSchema}getPothos(){return this}getJson(){return typeof this.jsonSchemaDef==="function"?this.jsonSchemaDef():this.jsonSchemaDef}getJsonSchemaDef(){return this.jsonSchemaDef}getJsonSchema(){let J=(X)=>{let H=typeof X==="function"?X():X;if(Array.isArray(H))return H.map((W)=>J(W));if(H&&typeof H==="object"){let W={};for(let[q,Y]of Object.entries(H))W[q]=J(Y);return W}return H};return J(this.getJson())}};var M4=/^[A-Za-z]{2}(?:-[A-Za-z0-9]{2,8})*$/,F4=/^(?:UTC|[A-Za-z_]+\/[A-Za-z_]+)$/,I4=/^[+]?\d[\d\s().-]{3,}$/,$4=/^[A-Z]{3}$/,A4=/^[A-Z]{2}$/,O4=-90,K4=90,V4=-180,R4=180,w={String_unsecure:()=>new j({name:"String_unsecure",description:"Unvalidated string scalar",zod:_(),parseValue:(J)=>_().parse(J),serialize:(J)=>String(J),parseLiteral:(J)=>{if(J.kind!==E.STRING)throw TypeError("Invalid literal");return J.value},jsonSchema:{type:"string"}}),Int_unsecure:()=>new j({name:"Int_unsecure",description:"Unvalidated integer scalar",zod:B1().int(),parseValue:(J)=>{let X=typeof J==="number"?J:Number(J);return B1().int().parse(X)},serialize:(J)=>Math.trunc(typeof J==="number"?J:Number(J)),parseLiteral:(J)=>{if(J.kind!==E.INT)throw TypeError("Invalid literal");return Number(J.value)},jsonSchema:{type:"integer"}}),Float_unsecure:()=>new j({name:"Float_unsecure",description:"Unvalidated float scalar",zod:B1(),parseValue:(J)=>{let X=typeof J==="number"?J:Number(J);return B1().parse(X)},serialize:(J)=>Number(J),parseLiteral:(J)=>{if(J.kind!==E.FLOAT&&J.kind!==E.INT)throw TypeError("Invalid literal");return Number(J.value)},jsonSchema:{type:"number"}}),Boolean:()=>new j({name:"Boolean",description:"Unvalidated boolean scalar",zod:_J(),parseValue:(J)=>N1.boolean().parse(J),serialize:(J)=>Boolean(J),parseLiteral:(J)=>{if(J.kind!==E.BOOLEAN)throw TypeError("Invalid literal");return J.value},jsonSchema:{type:"boolean"}}),ID:()=>new j({name:"ID",description:"Unvalidated id scalar",zod:_(),parseValue:(J)=>_().parse(J),serialize:(J)=>String(J),parseLiteral:(J)=>{if(J.kind!==E.STRING)throw TypeError("Invalid literal");return J.value},jsonSchema:{type:"string"}}),JSON:()=>new j({name:"JSON",zod:Y0(),parseValue:(J)=>J,serialize:(J)=>J,jsonSchema:{}}),JSONObject:()=>new j({name:"JSONObject",zod:H4(_(),Y0()),parseValue:(J)=>H4(_(),Y0()).parse(J),serialize:(J)=>J??{},jsonSchema:{type:"object"}}),Date:()=>new j({name:"Date",zod:J4(),parseValue:(J)=>J instanceof Date?J:new Date(String(J)),serialize:(J)=>J instanceof Date?J.toISOString().split("T")[0]:String(J),jsonSchema:{type:"string",format:"date"}}),DateTime:()=>new j({name:"DateTime",zod:J4(),parseValue:(J)=>J instanceof Date?J:new Date(String(J)),serialize:(J)=>{return J instanceof Date?J.toISOString():String(J)},jsonSchema:{type:"string",format:"date-time"}}),Time:()=>new j({name:"Time",zod:_().regex(/^\d{2}:\d{2}(:\d{2})?$/),parseValue:(J)=>_().regex(/^\d{2}:\d{2}(:\d{2})?$/).parse(J),serialize:(J)=>String(J),jsonSchema:{type:"string",pattern:"^\\d{2}:\\d{2}(:\\d{2})?$"}}),EmailAddress:()=>new j({name:"EmailAddress",zod:_().email(),parseValue:(J)=>_().email().parse(J),serialize:(J)=>String(J),jsonSchema:{type:"string",format:"email"}}),URL:()=>new j({name:"URL",zod:_().url(),parseValue:(J)=>_().url().parse(J),serialize:(J)=>String(J),jsonSchema:{type:"string",format:"uri"}}),PhoneNumber:()=>new j({name:"PhoneNumber",zod:_().regex(I4),parseValue:(J)=>_().regex(I4).parse(J),serialize:(J)=>String(J),jsonSchema:{type:"string",pattern:I4.source}}),NonEmptyString:()=>new j({name:"NonEmptyString",zod:_().min(1),parseValue:(J)=>_().min(1).parse(J),serialize:(J)=>String(J),jsonSchema:{type:"string",minLength:1}}),Locale:()=>new j({name:"Locale",zod:_().regex(M4),parseValue:(J)=>_().regex(M4).parse(J),serialize:(J)=>String(J),jsonSchema:{type:"string",pattern:M4.source}}),TimeZone:()=>new j({name:"TimeZone",zod:_().regex(F4),parseValue:(J)=>_().regex(F4).parse(J),serialize:(J)=>String(J),jsonSchema:{type:"string",pattern:F4.source}}),Latitude:()=>new j({name:"Latitude",zod:B1().min(O4).max(K4),parseValue:(J)=>N1.number().min(O4).max(K4).parse(J),serialize:(J)=>Number(J),jsonSchema:{type:"number",minimum:O4,maximum:K4}}),Longitude:()=>new j({name:"Longitude",zod:B1().min(V4).max(R4),parseValue:(J)=>N1.number().min(V4).max(R4).parse(J),serialize:(J)=>Number(J),jsonSchema:{type:"number",minimum:V4,maximum:R4}}),Currency:()=>new j({name:"Currency",zod:_().regex($4),parseValue:(J)=>_().regex($4).parse(J),serialize:(J)=>String(J),jsonSchema:{type:"string",pattern:$4.source}}),CountryCode:()=>new j({name:"CountryCode",zod:_().regex(A4),parseValue:(J)=>_().regex(A4).parse(J),serialize:(J)=>String(J),jsonSchema:{type:"string",pattern:A4.source}})};var T=class{constructor(J){this.config=J}getZod(){let J=Object.entries(this.config.fields).reduce((X,[H,W])=>{let q=W.type.getZod(),Y=W.isArray?X4(q):q;return X[H]=W.isOptional?Y.optional():Y,X},{});return CJ(J)}getPothosInput(){return this.config.name}};var m=(J)=>new T(J);var sJ={meta:{key:"payments.stripe",version:1,category:"payments",title:"Stripe Payments",description:"Stripe integration for payment processing, charges, and payouts.",domain:"payments",owners:["platform.payments"],tags:["payments","psp"],stability:A.Stable},supportedModes:["managed","byok"],capabilities:{provides:[{key:"payments.psp",version:1}],requires:[{key:"platform.webhooks",optional:!0,reason:"Recommended for reliable event ingestion"}]},configSchema:{schema:{type:"object",properties:{accountId:{type:"string",description:"Connected account ID when using Stripe Connect (BYOK)."},region:{type:"string",description:"Optional Stripe region or data residency hint."}}},example:{accountId:"acct_123",region:"us-east-1"}},secretSchema:{schema:{type:"object",required:["apiKey","webhookSecret"],properties:{apiKey:{type:"string",description:"Stripe secret API key (sk_live_... or sk_test_...)."},webhookSecret:{type:"string",description:"Signing secret for webhook verification."}}},example:{apiKey:"sk_live_***",webhookSecret:"whsec_***"}},healthCheck:{method:"ping",timeoutMs:5000},docsUrl:"https://stripe.com/docs/api",constraints:{rateLimit:{rpm:1000,rph:20000}},byokSetup:{setupInstructions:"Create a restricted Stripe API key with write access to Charges and provide a webhook signing secret.",requiredScopes:["charges:write","customers:read"]}};var eJ={meta:{key:"email.postmark",version:1,category:"email",title:"Postmark Transactional Email",description:"Postmark integration for transactional email delivery.",domain:"communications",owners:["platform.messaging"],tags:["email","transactional"],stability:A.Stable},supportedModes:["managed","byok"],capabilities:{provides:[{key:"email.transactional",version:1}],requires:[{key:"platform.webhooks",optional:!0,reason:"Optional for inbound bounce handling"}]},configSchema:{schema:{type:"object",properties:{messageStream:{type:"string",description:"Optional message stream identifier (e.g., transactional)."},fromEmail:{type:"string",description:"Default From address used for outbound messages."}}},example:{messageStream:"outbound",fromEmail:"notifications@example.com"}},secretSchema:{schema:{type:"object",required:["serverToken"],properties:{serverToken:{type:"string",description:"Server token for the Postmark account."}}},example:{serverToken:"server-***"}},healthCheck:{method:"ping",timeoutMs:3000},docsUrl:"https://postmarkapp.com/developer",constraints:{rateLimit:{rpm:500}},byokSetup:{setupInstructions:"Create a Postmark server token with outbound send permissions and configure allowed from addresses."}};var J9={meta:{key:"vectordb.qdrant",version:1,category:"vector-db",title:"Qdrant Vector Database",description:"Qdrant integration for vector search and embeddings storage.",domain:"ai",owners:["platform.ai"],tags:["vector-db","search"],stability:A.Experimental},supportedModes:["managed","byok"],capabilities:{provides:[{key:"vector-db.search",version:1},{key:"vector-db.storage",version:1}],requires:[{key:"ai.embeddings",optional:!0,reason:"Required if vectors are generated via hosted embedding services"}]},configSchema:{schema:{type:"object",properties:{apiUrl:{type:"string",description:"Base URL for the Qdrant instance (e.g., https://qdrant.example.com)."},collectionPrefix:{type:"string",description:"Prefix applied to all collection names for this tenant."}}},example:{apiUrl:"https://qdrant.example.com",collectionPrefix:"tenant_"}},secretSchema:{schema:{type:"object",properties:{apiKey:{type:"string",description:"API key or token when authentication is enabled."}}},example:{apiKey:"qdrant-api-key"}},healthCheck:{method:"ping",timeoutMs:4000},docsUrl:"https://qdrant.tech/documentation/quick-start/",constraints:{quotas:{collections:100,pointsPerCollection:1e6}},byokSetup:{setupInstructions:"Provide the HTTPS endpoint of your Qdrant cluster and generate an API key with read/write access to the collections that will be managed."}};var X9={meta:{key:"ai-llm.mistral",version:1,category:"ai-llm",title:"Mistral Large Language Model",description:"Mistral integration providing chat completions and embedding generation.",domain:"ai",owners:["platform.ai"],tags:["ai","llm","embeddings"],stability:A.Experimental},supportedModes:["managed","byok"],capabilities:{provides:[{key:"ai.chat",version:1},{key:"ai.embeddings",version:1}]},configSchema:{schema:{type:"object",properties:{model:{type:"string",description:"Default chat completion model (e.g., mistral-large-latest)."},embeddingModel:{type:"string",description:"Embedding model identifier."}}},example:{model:"mistral-large-latest",embeddingModel:"mistral-embed"}},secretSchema:{schema:{type:"object",required:["apiKey"],properties:{apiKey:{type:"string",description:"Mistral API key with access to chat and embeddings endpoints."}}},example:{apiKey:"mistral-***"}},healthCheck:{method:"custom",timeoutMs:5000},docsUrl:"https://docs.mistral.ai/platform/endpoints",constraints:{rateLimit:{rpm:600}},byokSetup:{setupInstructions:"Generate an API key within the Mistral console and ensure the selected models are enabled for the account."}};var H9={meta:{key:"ai-voice.elevenlabs",version:1,category:"ai-voice",title:"ElevenLabs Text-to-Speech",description:"ElevenLabs integration for neural voice synthesis and voice catalog access.",domain:"ai",owners:["platform.ai"],tags:["voice","tts"],stability:A.Beta},supportedModes:["managed","byok"],capabilities:{provides:[{key:"ai.voice.synthesis",version:1}]},configSchema:{schema:{type:"object",properties:{defaultVoiceId:{type:"string",description:"Optional default voice identifier for synthesis requests."}}},example:{defaultVoiceId:"pNInz6obpgDQGcFmaJgB"}},secretSchema:{schema:{type:"object",required:["apiKey"],properties:{apiKey:{type:"string",description:"ElevenLabs API key with text-to-speech permissions."}}},example:{apiKey:"eleven-***"}},healthCheck:{method:"custom",timeoutMs:4000},docsUrl:"https://elevenlabs.io/docs/api-reference/text-to-speech",constraints:{rateLimit:{rpm:120}},byokSetup:{setupInstructions:"Create an ElevenLabs API key and ensure the desired voices are accessible to the key scope."}};var W9={meta:{key:"email.gmail",version:1,category:"email",title:"Google Gmail API",description:"Gmail integration supporting inbound thread ingestion and outbound transactional email.",domain:"communications",owners:["platform.messaging"],tags:["email","gmail"],stability:A.Beta},supportedModes:["managed","byok"],capabilities:{provides:[{key:"email.inbound",version:1},{key:"email.outbound",version:1}]},configSchema:{schema:{type:"object",properties:{labelIds:{type:"array",items:{type:"string"},description:"Optional list of label IDs to scope inbound sync."},includeSpamTrash:{type:"boolean",description:"Whether to include spam or trash messages during sync."}}},example:{labelIds:["INBOX"],includeSpamTrash:!1}},secretSchema:{schema:{type:"object",required:["clientId","clientSecret","refreshToken"],properties:{clientId:{type:"string",description:"OAuth client ID for the Google Cloud project."},clientSecret:{type:"string",description:"OAuth client secret for the Google Cloud project."},refreshToken:{type:"string",description:"OAuth refresh token for delegated Gmail access."},redirectUri:{type:"string",description:"Optional redirect URI used when issuing the refresh token."}}},example:{clientId:"xxx.apps.googleusercontent.com",clientSecret:"secret",refreshToken:"refresh-token"}},healthCheck:{method:"custom",timeoutMs:4000},docsUrl:"https://developers.google.com/gmail/api",constraints:{rateLimit:{rpm:600}},byokSetup:{setupInstructions:"Create an OAuth consent screen and credentials within Google Cloud Console, then authorize the Gmail scopes and store the resulting refresh token."}};var q9={meta:{key:"calendar.google",version:1,category:"calendar",title:"Google Calendar API",description:"Google Calendar integration for event creation, updates, and scheduling automations.",domain:"productivity",owners:["platform.messaging"],tags:["calendar","google"],stability:A.Beta},supportedModes:["managed","byok"],capabilities:{provides:[{key:"calendar.events",version:1}]},configSchema:{schema:{type:"object",properties:{calendarId:{type:"string",description:"Default calendar identifier (defaults to primary)."}}},example:{calendarId:"primary"}},secretSchema:{schema:{type:"object",required:["clientEmail","privateKey"],properties:{clientEmail:{type:"string",description:"Service account client email."},privateKey:{type:"string",description:"Service account private key."},projectId:{type:"string",description:"Google Cloud project ID."}}},example:{clientEmail:"svc-calendar@example.iam.gserviceaccount.com",privateKey:"-----BEGIN PRIVATE KEY-----...",projectId:"calendar-project"}},healthCheck:{method:"custom",timeoutMs:4000},docsUrl:"https://developers.google.com/calendar/api",constraints:{},byokSetup:{setupInstructions:"Create a Google service account with Calendar access and share the target calendars with the service account email."}};var Y9={meta:{key:"sms.twilio",version:1,category:"sms",title:"Twilio Messaging",description:"Twilio SMS integration for transactional and notification messaging.",domain:"communications",owners:["platform.messaging"],tags:["sms","messaging"],stability:A.Stable},supportedModes:["managed","byok"],capabilities:{provides:[{key:"sms.outbound",version:1}]},configSchema:{schema:{type:"object",properties:{fromNumber:{type:"string",description:"Default Twilio phone number used as sender."}}},example:{fromNumber:"+15551234567"}},secretSchema:{schema:{type:"object",required:["accountSid","authToken"],properties:{accountSid:{type:"string",description:"Twilio Account SID."},authToken:{type:"string",description:"Twilio Auth Token."}}},example:{accountSid:"ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",authToken:"auth-token"}},healthCheck:{method:"custom",timeoutMs:3000},docsUrl:"https://www.twilio.com/docs/sms/api",constraints:{rateLimit:{rpm:200}},byokSetup:{setupInstructions:"Provide a Twilio account SID, auth token, and verify the outbound sending numbers used by the integration."}};var z9={meta:{key:"storage.gcs",version:1,category:"storage",title:"Google Cloud Storage Buckets",description:"Google Cloud Storage integration for object storage and retrieval.",domain:"infrastructure",owners:["platform.infrastructure"],tags:["storage","gcs","google-cloud"],stability:A.Beta},supportedModes:["managed","byok"],capabilities:{provides:[{key:"storage.objects",version:1}]},configSchema:{schema:{type:"object",required:["bucket"],properties:{bucket:{type:"string",description:"Primary bucket name used for storing objects."},prefix:{type:"string",description:"Optional prefix applied to object keys."}}},example:{bucket:"pfo-tenant-assets",prefix:"documents/"}},secretSchema:{schema:{type:"object",properties:{type:{type:"string",description:"Service account type field from Google credentials JSON (if provided)."},client_email:{type:"string"},private_key:{type:"string"},project_id:{type:"string"}}},example:{type:"service_account",client_email:"svc-account@example.iam.gserviceaccount.com",private_key:"-----BEGIN PRIVATE KEY-----...",project_id:"example-project"}},healthCheck:{method:"ping",timeoutMs:4000},docsUrl:"https://cloud.google.com/storage/docs/apis",constraints:{quotas:{storageGb:5120}},byokSetup:{setupInstructions:"Create a Google Cloud service account with Storage Object Admin role and upload the JSON credentials to the secret store."}};var Q9={meta:{key:"openbanking.powens",version:1,category:"open-banking",title:"Powens Open Banking (Read)",description:"Read-only Open Banking integration powered by Powens, exposing accounts, transactions, and balances.",domain:"finance",owners:["platform.finance"],tags:["open-banking","powens","finance"],stability:A.Experimental},supportedModes:["byok"],capabilities:{provides:[{key:"openbanking.accounts.read",version:1},{key:"openbanking.transactions.read",version:1},{key:"openbanking.balances.read",version:1}]},configSchema:{schema:{type:"object",required:["environment"],properties:{environment:{type:"string",enum:["sandbox","production"],description:"Powens environment to target. Sandbox uses Powens test API base URL, production uses live endpoints."},baseUrl:{type:"string",description:"Optional override for the Powens API base URL. Defaults to Powens environment defaults."},region:{type:"string",description:"Optional Powens region identifier when targeting a specific data residency cluster."},pollingIntervalMs:{type:"number",description:"Optional custom polling interval in milliseconds for background sync jobs (defaults to platform standard)."}}},example:{environment:"sandbox",baseUrl:"https://api-sandbox.powens.com/v2",region:"eu-west-1",pollingIntervalMs:300000}},secretSchema:{schema:{type:"object",required:["clientId","clientSecret"],properties:{clientId:{type:"string",description:"Powens OAuth client identifier obtained from the Powens Console (BYOK project)."},clientSecret:{type:"string",description:"Powens OAuth client secret used to exchange for access tokens."},apiKey:{type:"string",description:"Optional Powens API key (if the tenant project exposes a dedicated API token)."},webhookSecret:{type:"string",description:"Optional webhook signing secret used to verify Powens webhook payloads."}}},example:{clientId:"powens-client-id",clientSecret:"powens-client-secret",apiKey:"powens-api-key",webhookSecret:"powens-webhook-secret"}},healthCheck:{method:"ping",timeoutMs:8000},docsUrl:"https://docs.powens.com/",constraints:{rateLimit:{rph:1e4,rpm:600}},byokSetup:{setupInstructions:"Create a Powens BYOK project, generate OAuth credentials, and optionally configure webhook delivery for account/transaction updates.",requiredScopes:["accounts:read","transactions:read","balances:read"]}};var I0=new T({name:"BankAccountRecord",description:"Canonical representation of a bank account synced from an open banking provider.",fields:{id:{type:w.ID(),isOptional:!1},tenantId:{type:w.ID(),isOptional:!1},userId:{type:w.ID(),isOptional:!1},connectionId:{type:w.ID(),isOptional:!1},externalId:{type:w.NonEmptyString(),isOptional:!1},institutionId:{type:w.NonEmptyString(),isOptional:!1},institutionName:{type:w.NonEmptyString(),isOptional:!1},institutionLogoUrl:{type:w.URL(),isOptional:!0},iban:{type:w.String_unsecure(),isOptional:!0},bic:{type:w.String_unsecure(),isOptional:!0},accountType:{type:w.NonEmptyString(),isOptional:!1},currency:{type:w.Currency(),isOptional:!1},displayName:{type:w.NonEmptyString(),isOptional:!1},accountNumberMasked:{type:w.String_unsecure(),isOptional:!0},productCode:{type:w.String_unsecure(),isOptional:!0},balance:{type:w.Float_unsecure(),isOptional:!0},availableBalance:{type:w.Float_unsecure(),isOptional:!0},lastSyncedAt:{type:w.DateTime(),isOptional:!1},createdAt:{type:w.DateTime(),isOptional:!1},updatedAt:{type:w.DateTime(),isOptional:!1},metadata:{type:w.JSONObject(),isOptional:!0}}}),N4=new T({name:"BankTransactionRecord",description:"Canonical transaction entry mapped from Powens into the open banking ledger.",fields:{id:{type:w.ID(),isOptional:!1},accountId:{type:w.ID(),isOptional:!1},tenantId:{type:w.ID(),isOptional:!1},connectionId:{type:w.ID(),isOptional:!1},externalId:{type:w.NonEmptyString(),isOptional:!1},amount:{type:w.Float_unsecure(),isOptional:!1},currency:{type:w.Currency(),isOptional:!1},date:{type:w.DateTime(),isOptional:!1},bookingDate:{type:w.DateTime(),isOptional:!0},valueDate:{type:w.DateTime(),isOptional:!0},description:{type:w.String_unsecure(),isOptional:!0},counterpartyName:{type:w.String_unsecure(),isOptional:!0},counterpartyAccount:{type:w.String_unsecure(),isOptional:!0},merchantCategoryCode:{type:w.String_unsecure(),isOptional:!0},rawCategory:{type:w.String_unsecure(),isOptional:!0},standardizedCategory:{type:w.String_unsecure(),isOptional:!0},transactionType:{type:w.NonEmptyString(),isOptional:!1},status:{type:w.NonEmptyString(),isOptional:!1},runningBalance:{type:w.Float_unsecure(),isOptional:!0},metadata:{type:w.JSONObject(),isOptional:!0},createdAt:{type:w.DateTime(),isOptional:!1},updatedAt:{type:w.DateTime(),isOptional:!1}}}),$0=new T({name:"AccountBalanceRecord",description:"Canonical balance snapshot computed from Powens balance payloads.",fields:{id:{type:w.ID(),isOptional:!1},accountId:{type:w.ID(),isOptional:!1},tenantId:{type:w.ID(),isOptional:!1},connectionId:{type:w.ID(),isOptional:!1},balanceType:{type:w.NonEmptyString(),isOptional:!1},currentBalance:{type:w.Float_unsecure(),isOptional:!1},availableBalance:{type:w.Float_unsecure(),isOptional:!0},currency:{type:w.Currency(),isOptional:!1},lastUpdatedAt:{type:w.DateTime(),isOptional:!1},createdAt:{type:w.DateTime(),isOptional:!1},metadata:{type:w.JSONObject(),isOptional:!0}}});var Z4=["iban","bic","accountNumberMasked","accountNumber","counterpartyName","counterpartyAccount","description","merchantName","merchantCategoryCode","reference"],u={accountsSynced:"openbanking.accounts.synced",accountsSyncFailed:"openbanking.accounts.sync_failed",transactionsSynced:"openbanking.transactions.synced",transactionsSyncFailed:"openbanking.transactions.sync_failed",balancesRefreshed:"openbanking.balances.refreshed",balancesRefreshFailed:"openbanking.balances.refresh_failed",overviewGenerated:"openbanking.overview.generated"};var F1=(J)=>({...J,meta:{...J.meta,kind:"command"},policy:{...J.policy,idempotent:J.policy?.policy?.idempotent??!1}}),G1=(J)=>({...J,meta:{...J.meta,kind:"query"},policy:{...J.policy,idempotent:!0}});var A9=(J,X)=>()=>(J&&(X=J(J=0)),X);var O9,m1=A9(()=>{O9={byTag:(J)=>J.meta.tags?.[0]??"untagged",byAllTags:(J)=>J.meta.tags?.length?J.meta.tags:["untagged"],byOwner:(J)=>J.meta.owners?.[0]??"unowned",byDomain:(J)=>{return(J.meta.key??J.meta.key??"").split(".")[0]??"default"},byStability:(J)=>J.meta.stability??"stable",byUrlPath:(J)=>(X)=>{if(!X.path)return"root";return X.path.split("/").filter(Boolean).slice(0,J).join("/")||"root"}}});m1();m1();m1();var l3=new T({name:"OpenBankingListAccountsInput",description:"Parameters for listing bank accounts through the open banking provider.",fields:{tenantId:{type:w.ID(),isOptional:!1},userId:{type:w.ID(),isOptional:!1},connectionId:{type:w.ID(),isOptional:!0},includeBalances:{type:w.Boolean(),isOptional:!0},institutionId:{type:w.String_unsecure(),isOptional:!0},cursor:{type:w.String_unsecure(),isOptional:!0},pageSize:{type:w.Int_unsecure(),isOptional:!0}}}),r3=new T({name:"OpenBankingListAccountsOutput",description:"Paginated list of bank accounts available to the tenant and user.",fields:{accounts:{type:I0,isOptional:!1,isArray:!0},nextCursor:{type:w.String_unsecure(),isOptional:!0},hasMore:{type:w.Boolean(),isOptional:!0}}}),p3=new T({name:"OpenBankingGetAccountInput",description:"Parameters for retrieving a specific bank account.",fields:{tenantId:{type:w.ID(),isOptional:!1},accountId:{type:w.ID(),isOptional:!1},includeBalances:{type:w.Boolean(),isOptional:!0},includeLatestTransactions:{type:w.Boolean(),isOptional:!0}}}),d3=new T({name:"OpenBankingSyncAccountsInput",description:"Command payload to trigger an account synchronisation against the open banking provider.",fields:{tenantId:{type:w.ID(),isOptional:!1},userId:{type:w.ID(),isOptional:!0},connectionId:{type:w.ID(),isOptional:!1},accountIds:{type:w.ID(),isArray:!0,isOptional:!0},forceFullRefresh:{type:w.Boolean(),isOptional:!0},triggerWorkflows:{type:w.Boolean(),isOptional:!0}}}),n3=new T({name:"OpenBankingSyncAccountsOutput",description:"Result of a bank account synchronisation run.",fields:{synced:{type:w.Int_unsecure(),isOptional:!1},failed:{type:w.Int_unsecure(),isOptional:!1},errors:{type:w.String_unsecure(),isArray:!0,isOptional:!0},nextSyncSuggestedAt:{type:w.DateTime(),isOptional:!0}}}),K9=G1({meta:{key:"openbanking.accounts.list",version:1,description:"List bank accounts available to a tenant/user via Powens Open Banking.",goal:"Provide downstream workflows with the set of accounts accessible via the configured open banking connection.",context:"Used by Pocket Family Office dashboards and sync workflows to enumerate bank accounts prior to syncing balances or transactions.",owners:["@platform.finance"],tags:["open-banking","powens","accounts"],stability:"experimental"},io:{input:l3,output:r3},policy:{auth:"user"}}),V9=G1({meta:{key:"openbanking.accounts.get",version:1,description:"Retrieve the canonical bank account record for the given account identifier.",goal:"Allow user-facing experiences and automations to display up-to-date account metadata.",context:"Invoked by UI surfaces and workflow automation steps that require detailed metadata for a specific bank account.",owners:["@platform.finance"],tags:["open-banking","powens","accounts"],stability:"experimental"},io:{input:p3,output:I0},policy:{auth:"user"}}),R9=F1({meta:{key:"openbanking.accounts.sync",version:1,description:"Initiate a synchronisation run to refresh bank account metadata from Powens.",goal:"Keep canonical bank account records aligned with the external open banking provider.",context:"Triggered by scheduled workflows or manual operator actions to reconcile account metadata prior to transaction/balance syncs.",owners:["@platform.finance"],tags:["open-banking","powens","accounts"],stability:"experimental"},io:{input:d3,output:n3},policy:{auth:"admin"},telemetry:{success:{event:{key:u.accountsSynced},properties:({input:J,output:X})=>{let H=J,W=X;return{tenantId:H?.tenantId,connectionId:H?.connectionId,synced:W?.synced,failed:W?.failed}}},failure:{event:{key:u.accountsSyncFailed},properties:({input:J,error:X})=>{let H=J;return{tenantId:H?.tenantId,connectionId:H?.connectionId,error:X instanceof Error?X.message:String(X??"unknown")}}}}});var i3=new T({name:"OpenBankingListTransactionsInput",description:"Parameters for listing bank transactions from the canonical ledger.",fields:{tenantId:{type:w.ID(),isOptional:!1},accountId:{type:w.ID(),isOptional:!1},from:{type:w.DateTime(),isOptional:!0},to:{type:w.DateTime(),isOptional:!0},cursor:{type:w.String_unsecure(),isOptional:!0},pageSize:{type:w.Int_unsecure(),isOptional:!0},direction:{type:w.String_unsecure(),isOptional:!0},minimumAmount:{type:w.Float_unsecure(),isOptional:!0},maximumAmount:{type:w.Float_unsecure(),isOptional:!0},category:{type:w.String_unsecure(),isOptional:!0}}}),t3=new T({name:"OpenBankingListTransactionsOutput",description:"Paginated list of transactions for a bank account.",fields:{transactions:{type:N4,isOptional:!1,isArray:!0},nextCursor:{type:w.String_unsecure(),isOptional:!0},hasMore:{type:w.Boolean(),isOptional:!0}}}),a3=new T({name:"OpenBankingSyncTransactionsInput",description:"Command payload to synchronise transactions from the open banking provider into the canonical ledger.",fields:{tenantId:{type:w.ID(),isOptional:!1},accountId:{type:w.ID(),isOptional:!1},from:{type:w.DateTime(),isOptional:!0},to:{type:w.DateTime(),isOptional:!0},connectionId:{type:w.ID(),isOptional:!0},includePending:{type:w.Boolean(),isOptional:!0},backfillDays:{type:w.Int_unsecure(),isOptional:!0}}}),s3=new T({name:"OpenBankingSyncTransactionsOutput",description:"Result of a transaction synchronisation run.",fields:{synced:{type:w.Int_unsecure(),isOptional:!1},failed:{type:w.Int_unsecure(),isOptional:!1},earliestSyncedAt:{type:w.DateTime(),isOptional:!0},latestSyncedAt:{type:w.DateTime(),isOptional:!0},nextSinceToken:{type:w.String_unsecure(),isOptional:!0},errors:{type:w.String_unsecure(),isArray:!0,isOptional:!0}}}),N9=G1({meta:{key:"openbanking.transactions.list",version:1,description:"List bank transactions that have been normalised into the canonical ledger.",goal:"Allow downstream analytics and UI surfaces to page through canonical bank transactions.",context:"Used by Pocket Family Office dashboards, reconciliation workflows, and analytics data views.",owners:["@platform.finance"],tags:["open-banking","powens","transactions"],stability:"experimental"},io:{input:i3,output:t3},policy:{auth:"user"}}),Z9=F1({meta:{key:"openbanking.transactions.sync",version:1,description:"Synchronise transactions for a bank account by calling the configured open banking provider.",goal:"Ensure the canonical transaction ledger stays aligned with the external provider.",context:"Triggered by scheduled workflows or on-demand actions when activity is expected on an account.",owners:["@platform.finance"],tags:["open-banking","powens","transactions"],stability:"experimental"},io:{input:a3,output:s3},policy:{auth:"admin"},telemetry:{success:{event:{key:u.transactionsSynced},properties:({input:J,output:X})=>{let H=J,W=X;return{tenantId:H?.tenantId,accountId:H?.accountId,synced:W?.synced,failed:W?.failed,earliestSyncedAt:W?.earliestSyncedAt,latestSyncedAt:W?.latestSyncedAt}}},failure:{event:{key:u.transactionsSyncFailed},properties:({input:J,error:X})=>{let H=J;return{tenantId:H?.tenantId,accountId:H?.accountId,error:X instanceof Error?X.message:String(X??"unknown")}}}}});var e3=new T({name:"OpenBankingGetBalancesInput",description:"Parameters for retrieving bank account balances from the canonical ledger.",fields:{tenantId:{type:w.ID(),isOptional:!1},accountId:{type:w.ID(),isOptional:!1},balanceTypes:{type:w.String_unsecure(),isArray:!0,isOptional:!0}}}),JW=new T({name:"OpenBankingGetBalancesOutput",description:"Canonical balances for a bank account.",fields:{balances:{type:$0,isOptional:!1,isArray:!0},asOf:{type:w.DateTime(),isOptional:!0}}}),XW=new T({name:"OpenBankingRefreshBalancesInput",description:"Command payload to refresh balances for a bank account via the open banking provider.",fields:{tenantId:{type:w.ID(),isOptional:!1},accountId:{type:w.ID(),isOptional:!1},connectionId:{type:w.ID(),isOptional:!0},balanceTypes:{type:w.String_unsecure(),isArray:!0,isOptional:!0},forceRefresh:{type:w.Boolean(),isOptional:!0}}}),HW=new T({name:"OpenBankingRefreshBalancesOutput",description:"Result of a balance refresh against the open banking provider.",fields:{balances:{type:$0,isOptional:!1,isArray:!0},refreshedAt:{type:w.DateTime(),isOptional:!1},errors:{type:w.String_unsecure(),isArray:!0,isOptional:!0}}}),L9=G1({meta:{key:"openbanking.balances.get",version:1,description:"Retrieve the latest cached balances for a bank account.",goal:"Expose current and available balances required by dashboards and analytics.",context:"Used by Pocket Family Office UI surfaces and automation steps that require balance totals prior to generating summaries.",owners:["@platform.finance"],tags:["open-banking","powens","balances"],stability:"experimental"},io:{input:e3,output:JW},policy:{auth:"user"}}),b9=F1({meta:{key:"openbanking.balances.refresh",version:1,description:"Refresh balances for a bank account via the configured open banking provider.",goal:"Ensure canonical balance records reflect the latest values from Powens.",context:"Triggered by scheduled workflows before generating summaries or forecasting cashflow.",owners:["@platform.finance"],tags:["open-banking","powens","balances"],stability:"experimental"},io:{input:XW,output:HW},policy:{auth:"admin"},telemetry:{success:{event:{key:u.balancesRefreshed},properties:({input:J,output:X})=>{let H=J,W=X;return{tenantId:H?.tenantId,accountId:H?.accountId,refreshedAt:W?.refreshedAt,balanceCount:Array.isArray(W?.balances)?W?.balances.length:void 0}}},failure:{event:{key:u.balancesRefreshFailed},properties:({input:J,error:X})=>{let H=J;return{tenantId:H?.tenantId,accountId:H?.accountId,error:X instanceof Error?X.message:String(X??"unknown")}}}}});var qW=L1("Source",["upload","email","sync"]),YW=L1("Channel",["email","sms","both"]),zW=L1("Period",["P7d","P30d","P90d"]),QW=L1("ObPeriod",["Pweek","Pmonth","Pquarter"]),wW=m({name:"UploadDocumentInput",fields:{bucket:{type:w.NonEmptyString(),isOptional:!1},objectKey:{type:w.NonEmptyString(),isOptional:!1},mimeType:{type:w.NonEmptyString(),isOptional:!1},bytes:{type:w.Int_unsecure(),isOptional:!1},tags:{type:w.String_unsecure(),isOptional:!1,isArray:!0},uploadedAt:{type:w.Date(),isOptional:!1},source:{type:qW,isOptional:!1}}}),DW=m({name:"UploadDocumentOutput",fields:{documentId:{type:w.String_unsecure(),isOptional:!1},ingestionJobId:{type:w.String_unsecure(),isOptional:!1}}}),GW={meta:{key:"pfo.documents.upload",version:1,kind:"command",description:"Stores an object in tenant storage and schedules ingestion into the knowledge base.",goal:"Allow users to ingest financial documents for processing.",context:"Part of the finance domain. Documents are uploaded to object storage and then processed by the ingestion pipeline.",owners:[V.PlatformFinance],tags:["documents","ingestion",R.Guide],stability:A.Experimental},io:{input:wW,output:DW},policy:{auth:"user",rateLimit:{rpm:30,key:"user"}}},UW=m({name:"PaymentReminderInput",fields:{billId:{type:w.String_unsecure(),isOptional:!1},recipientEmail:{type:w.EmailAddress(),isOptional:!1},recipientPhone:{type:w.String_unsecure(),isOptional:!0},dueDate:{type:w.Date(),isOptional:!1},amountCents:{type:w.Int_unsecure(),isOptional:!1},currency:{type:w.Currency(),isOptional:!1},channel:{type:YW,isOptional:!1},memo:{type:w.String_unsecure(),isOptional:!0}}}),PW=m({name:"PaymentReminderOutput",fields:{reminderId:{type:w.String_unsecure(),isOptional:!1},scheduledAt:{type:w.Date(),isOptional:!1}}}),BW={meta:{key:"pfo.reminders.schedule-payment",version:1,kind:"command",description:"Queues outbound email/SMS reminders for upcoming bills and adds an optional calendar hold.",goal:"Ensure bills are paid on time by notifying users.",context:"Finance automation. Reminders are sent via configured channels (email, SMS).",owners:[V.PlatformFinance],tags:["payments","reminders",R.Automation],stability:A.Beta},io:{input:UW,output:PW},policy:{auth:"user"}},MW=m({name:"FinancialSummaryInput",fields:{period:{type:zW,isOptional:!1},includeVoiceSummary:{type:w.Boolean(),isOptional:!1}}}),FW=m({name:"SummaryHighlight",fields:{label:{type:w.String_unsecure(),isOptional:!1},value:{type:w.String_unsecure(),isOptional:!1}}}),IW=m({name:"FinancialSummaryOutput",fields:{summaryId:{type:w.String_unsecure(),isOptional:!1},generatedAt:{type:w.Date(),isOptional:!1},markdown:{type:w.String_unsecure(),isOptional:!1},highlights:{type:FW,isOptional:!1,isArray:!0},cashflowDelta:{type:w.Float_unsecure(),isOptional:!1}}}),$W={meta:{key:"pfo.summary.generate",version:1,kind:"query",description:"Runs RAG over financial documents and email threads to provide a natural-language summary with key metrics.",goal:"Provide a quick overview of financial status and recent activity.",context:"Uses RAG over ingested knowledge. Summaries can be dispatched or viewed in app.",owners:[V.PlatformFinance],tags:["summary","ai",R.Automation],stability:A.Beta},io:{input:MW,output:IW},policy:{auth:"user"}},AW=m({name:"SyncEmailThreadsInput",fields:{labelIds:{type:w.String_unsecure(),isOptional:!1,isArray:!0},maxThreads:{type:w.Int_unsecure(),isOptional:!1},syncSinceMinutes:{type:w.Int_unsecure(),isOptional:!1}}}),OW=m({name:"SyncEmailThreadsOutput",fields:{syncedThreads:{type:w.Int_unsecure(),isOptional:!1},lastMessageAt:{type:w.Date(),isOptional:!0}}}),KW={meta:{key:"pfo.email.sync-threads",version:1,kind:"command",description:"Triggers ingestion of Gmail threads into the operational knowledge space.",goal:"Keep knowledge base up to date with email communications.",context:"Syncs from Gmail integration. Only includes threads matching configured labels.",owners:[V.PlatformMessaging],tags:["gmail","knowledge",R.Automation],stability:A.Beta},io:{input:AW,output:OW},policy:{auth:"user"}},VW=m({name:"SummaryDispatchInput",fields:{summaryId:{type:w.String_unsecure(),isOptional:!1},recipientEmail:{type:w.EmailAddress(),isOptional:!1},recipientName:{type:w.String_unsecure(),isOptional:!0},includeVoice:{type:w.Boolean(),isOptional:!1},voiceRecipient:{type:w.String_unsecure(),isOptional:!0}}}),RW=m({name:"SummaryDispatchOutput",fields:{dispatchId:{type:w.String_unsecure(),isOptional:!1},emailSent:{type:w.Boolean(),isOptional:!1},voiceUrl:{type:w.String_unsecure(),isOptional:!0}}}),NW={meta:{key:"pfo.summary.dispatch",version:1,kind:"command",description:"Delivers the generated summary via email and optionally synthesises a voice note.",goal:"Deliver financial insights to users proactively.",context:"Dispatches summaries generated by pfo.summary.generate via email or voice.",owners:[V.PlatformMessaging],tags:["summary","communications",R.Automation],stability:A.Experimental},io:{input:VW,output:RW},policy:{auth:"user"}},ZW=m({name:"OpenBankingOverviewInput",fields:{tenantId:{type:w.String_unsecure(),isOptional:!1},accountIds:{type:w.String_unsecure(),isOptional:!0,isArray:!0},period:{type:QW,isOptional:!1},asOf:{type:w.Date(),isOptional:!0},includeCategories:{type:w.Boolean(),isOptional:!1},includeCashflowTrend:{type:w.Boolean(),isOptional:!1}}}),LW=m({name:"OpenBankingOverviewOutput",fields:{knowledgeEntryId:{type:w.String_unsecure(),isOptional:!1},periodStart:{type:w.Date(),isOptional:!1},periodEnd:{type:w.Date(),isOptional:!1},generatedAt:{type:w.Date(),isOptional:!1},summaryPath:{type:w.String_unsecure(),isOptional:!0}}}),bW={meta:{key:"pfo.openbanking.generate-overview",version:1,kind:"command",description:"Aggregates balances and transactions into a derived financial overview stored in the knowledge layer.",goal:"Create a periodic financial snapshot.",context:"Aggregates data from open banking integration into a document.",owners:[V.PlatformFinance],tags:["open-banking","summary",R.Automation],stability:A.Experimental},io:{input:ZW,output:LW},policy:{auth:"user"},telemetry:{success:{event:{key:u.overviewGenerated,version:1}}}},VD={"pfo.documents.upload":GW,"pfo.reminders.schedule-payment":BW,"pfo.summary.generate":$W,"pfo.summary.dispatch":NW,"pfo.email.sync-threads":KW,"pfo.openbanking.generate-overview":bW};var ZD={meta:{key:"pfo.workflow.process-uploaded-document",version:1,title:"Process Uploaded Document",description:"Stores an uploaded invoice/contract, queues ingestion, and records any follow-up reminders.",domain:"finance",owners:[V.PlatformFinance],tags:["documents","ingestion",R.Automation],stability:A.Experimental},definition:{entryStepId:"store",steps:[{id:"store",type:"automation",label:"Store and Queue Ingestion",description:"Persist the document to storage and enqueue the knowledge ingestion pipeline.",action:{operation:{key:"pfo.documents.upload",version:1}},requiredIntegrations:["primaryStorage","primaryVectorDb"],retry:{maxAttempts:3,backoff:"exponential",delayMs:500}},{id:"review",type:"human",label:"Optional Human Classification",description:"Finance lead can categorise the document while ingestion completes."}],transitions:[{from:"store",to:"review"}]}};var _D={meta:{key:"pfo.workflow.upcoming-payments-reminder",version:1,title:"Schedule Upcoming Payment Reminder",description:"Collects payment metadata and schedules multi-channel reminders for bills that are due soon.",domain:"finance",owners:[V.PlatformFinance],tags:["payments","reminders",R.Automation],stability:A.Beta},definition:{entryStepId:"collect",steps:[{id:"collect",type:"human",label:"Review Upcoming Bill",description:"Confirm amount, due date, and preferred delivery channels before scheduling reminder."},{id:"schedule",type:"automation",label:"Schedule Reminder",action:{operation:{key:"pfo.reminders.schedule-payment",version:1}},requiredIntegrations:["emailOutbound","smsNotifications","calendarScheduling"],retry:{maxAttempts:2,backoff:"linear",delayMs:1000}}],transitions:[{from:"collect",to:"schedule",condition:"output?.confirmed === true",label:"Reminder confirmed"}]}};var SD={meta:{key:"pfo.workflow.generate-financial-summary",version:1,title:"Generate Financial Summary",description:"Retrieves the latest financial signals, generates an AI summary, and optionally distributes it by voice or email.",domain:"finance",owners:[V.PlatformFinance],tags:["summary","ai",R.Automation],stability:A.Beta},definition:{entryStepId:"summarise",steps:[{id:"summarise",type:"automation",label:"Generate Summary",description:"Run retrieval augmented generation over the knowledge base to produce a household summary.",action:{operation:{key:"pfo.summary.generate",version:1}},requiredIntegrations:["primaryLLM","primaryVectorDb"],retry:{maxAttempts:3,backoff:"exponential",delayMs:750}},{id:"distribute",type:"automation",label:"Distribute Summary",description:"Send the generated summary via email and optionally synthesise a voice note.",action:{operation:{key:"pfo.summary.dispatch",version:1}},requiredIntegrations:["emailOutbound"],retry:{maxAttempts:2,backoff:"linear",delayMs:500}}],transitions:[{from:"summarise",to:"distribute"}]}};var TD={meta:{key:"pfo.workflow.ingest-email-threads",version:1,title:"Ingest Email Threads",description:"Synchronises Gmail threads tagged with finance labels and indexes them into operational knowledge spaces.",domain:"communications",owners:[V.PlatformMessaging],tags:["gmail","knowledge",R.Automation],stability:A.Experimental},definition:{entryStepId:"sync",steps:[{id:"sync",type:"automation",label:"Sync Gmail Threads",description:"Fetches Gmail threads and transforms them into knowledge fragments before vector indexing.",action:{operation:{key:"pfo.email.sync-threads",version:1}},requiredIntegrations:["emailInbound","primaryVectorDb"],retry:{maxAttempts:3,backoff:"exponential",delayMs:1000}},{id:"triage",type:"human",label:"Triage Exceptions",description:"Operators can resolve sync failures or tag important threads for follow-up."}],transitions:[{from:"sync",to:"triage",condition:"output?.syncedThreads === 0",label:"No new threads"}]}};var _9={key:"openbanking.accounts.read",version:1},xD={meta:{key:"pfo.workflow.sync-openbanking-accounts",version:1,title:"Synchronise Open Banking Accounts",description:"Validates Powens connectivity and synchronises bank account metadata into the canonical ledger.",domain:"finance",owners:[V.PlatformFinance],tags:["open-banking","powens",R.Automation],stability:A.Experimental},definition:{entryStepId:"sync-accounts",steps:[{id:"sync-accounts",type:"automation",label:"Sync Accounts",description:"Refresh linked bank accounts via Powens and upsert canonical BankAccount records.",action:{operation:{key:"openbanking.accounts.sync",version:1}},requiredIntegrations:["primaryOpenBanking"],requiredCapabilities:[_9],retry:{maxAttempts:3,backoff:"exponential",delayMs:1000}},{id:"fetch-accounts",type:"automation",label:"Fetch Accounts",description:"Retrieve the latest canonical account snapshot for downstream consumers.",action:{operation:{key:"openbanking.accounts.list",version:1}},requiredIntegrations:["primaryOpenBanking"],requiredCapabilities:[_9],retry:{maxAttempts:2,backoff:"linear",delayMs:750}}],transitions:[{from:"sync-accounts",to:"fetch-accounts"}]}};var E9={key:"openbanking.transactions.read",version:1},uD={meta:{key:"pfo.workflow.sync-openbanking-transactions",version:1,title:"Synchronise Open Banking Transactions",description:"Fetches recent transactions from Powens for each linked account and stores them in the canonical ledger.",domain:"finance",owners:[V.PlatformFinance],tags:["open-banking","powens",R.Automation],stability:A.Experimental},definition:{entryStepId:"sync-transactions",steps:[{id:"sync-transactions",type:"automation",label:"Sync Transactions",description:"Call the Powens provider to pull incremental transactions for active accounts.",action:{operation:{key:"openbanking.transactions.sync",version:1}},requiredIntegrations:["primaryOpenBanking"],requiredCapabilities:[E9],retry:{maxAttempts:4,backoff:"exponential",delayMs:1500}},{id:"list-transactions",type:"automation",label:"List Transactions",description:"Retrieve the canonical transaction list for reporting and downstream analytics.",action:{operation:{key:"openbanking.transactions.list",version:1}},requiredIntegrations:["primaryOpenBanking"],requiredCapabilities:[E9],retry:{maxAttempts:2,backoff:"linear",delayMs:1000}}],transitions:[{from:"sync-transactions",to:"list-transactions"}]}};var C9={key:"openbanking.balances.read",version:1},fD={meta:{key:"pfo.workflow.refresh-openbanking-balances",version:1,title:"Refresh Open Banking Balances",description:"Refreshes balances for synced accounts to surface the latest cash positions in dashboards.",domain:"finance",owners:[V.PlatformFinance],tags:["open-banking","powens",R.Automation],stability:A.Experimental},definition:{entryStepId:"refresh-balances",steps:[{id:"refresh-balances",type:"automation",label:"Refresh Balances",description:"Trigger the Powens provider to obtain current and available balances.",action:{operation:{key:"openbanking.balances.refresh",version:1}},requiredIntegrations:["primaryOpenBanking"],requiredCapabilities:[C9],retry:{maxAttempts:3,backoff:"exponential",delayMs:1000}},{id:"fetch-balances",type:"automation",label:"Fetch Balances",description:"Load the canonical balance snapshots for downstream workflows and dashboards.",action:{operation:{key:"openbanking.balances.get",version:1}},requiredIntegrations:["primaryOpenBanking"],requiredCapabilities:[C9],retry:{maxAttempts:2,backoff:"linear",delayMs:750}}],transitions:[{from:"refresh-balances",to:"fetch-balances"}]}};var _W=[{key:"openbanking.accounts.read",version:1},{key:"openbanking.transactions.read",version:1},{key:"openbanking.balances.read",version:1}],rD={meta:{key:"pfo.workflow.generate-openbanking-overview",version:1,title:"Generate Open Banking Overview",description:"Produces a derived financial overview and stores it in the operational knowledge space.",domain:"finance",owners:[V.PlatformFinance],tags:["open-banking","summary",R.Automation],stability:A.Experimental},definition:{entryStepId:"generate-overview",steps:[{id:"generate-overview",type:"automation",label:"Generate Overview",description:"Aggregate balances, cashflow, and category breakdowns into a knowledge entry.",action:{operation:{key:"pfo.openbanking.generate-overview",version:1}},requiredIntegrations:["primaryOpenBanking"],requiredCapabilities:_W,retry:{maxAttempts:3,backoff:"exponential",delayMs:1500}}],transitions:[]}};var A0={tenantId:{type:"string",required:!0,description:"Tenant identifier for multi-tenant isolation."},appId:{type:"string",required:!0,description:"Application identifier associated with the event."},blueprint:{type:"string",required:!0,description:"Blueprint name@version emitting the telemetry."},configVersion:{type:"number",required:!0,description:"Resolved app config version when the event was generated."},slotId:{type:"string",required:!0,description:"Integration slot identifier (e.g., primaryOpenBanking)."},connectionId:{type:"string",required:!0,description:"Integration connection ID used for the sync."}};function S9(J){return{type:"string",description:J,pii:!1}}var qG={meta:{key:"pfo.telemetry",version:1,title:"Pocket Family Office Telemetry",description:"Operational telemetry for Pocket Family Office workflows, including Powens open banking syncs.",domain:"finance",owners:[V.PlatformFinance],tags:["open-banking",R.Automation],stability:A.Experimental},config:{defaultRetentionDays:180,defaultSamplingRate:1},events:[{key:u.accountsSynced,version:1,semantics:{what:"Open banking account synchronisation completed.",why:"Refresh canonical account metadata for reporting and workflows."},privacy:"internal",properties:{...A0,syncedCount:{type:"number",description:"Number of accounts synced successfully."},failedCount:{type:"number",description:"Number of accounts that failed to sync."},durationMs:{type:"number",description:"Duration of the sync job in milliseconds."}}},{key:u.transactionsSynced,version:1,semantics:{what:"Open banking transaction synchronisation completed.",why:"Keep canonical transaction ledger in sync for analytics."},privacy:"internal",properties:{...A0,accountId:{type:"string",description:"Bank account identifier used during the sync.",pii:!1},syncedCount:{type:"number",description:"Number of transactions synced successfully."},failedCount:{type:"number",description:"Number of transactions that failed to sync."},from:{type:"timestamp",description:"Start timestamp for the sync window."},to:{type:"timestamp",description:"End timestamp for the sync window."}}},{key:u.balancesRefreshed,version:1,semantics:{what:"Open banking balances refreshed.",why:"Provide accurate cash position for dashboards and alerts."},privacy:"internal",properties:{...A0,accountId:S9("Bank account identifier."),balanceTypes:{type:"json",description:"Balance types included in the refresh."},refreshedAt:{type:"timestamp",description:"Timestamp when balances were refreshed."}}},{key:u.overviewGenerated,version:1,semantics:{what:"Derived financial overview generated.",why:"Persist cashflow and category summaries into knowledge space."},privacy:"internal",properties:{...A0,knowledgeEntryId:S9("Identifier of the knowledge document containing the overview."),period:{type:"string",description:"Aggregation period used (week, month, quarter)."},periodStart:{type:"timestamp",description:"Start timestamp for the aggregation window."},periodEnd:{type:"timestamp",description:"End timestamp for the aggregation window."}},tags:["knowledge","analytics"]}]},YG=Z4;var QG={meta:{key:"pocket-family-office",version:1,title:"Pocket Family Office",description:"Personal finance automation with document ingestion, open banking, and AI summaries",domain:"finance",owners:["@platform.finance"],tags:["finance","open-banking","documents","automation","family-office"],stability:"experimental"},operations:[{key:"pfo.documents.upload",version:1}],events:[],presentations:[],opToPresentation:[],presentationsTargets:[],capabilities:{provides:[{key:"pocket-family-office",version:1}],requires:[{key:"identity",version:1},{key:"openbanking",version:1}]}};export{GW as uploadDocumentContract,_D as upcomingPaymentsReminderWorkflow,uD as syncOpenBankingTransactionsWorkflow,xD as syncOpenBankingAccountsWorkflow,KW as syncEmailThreadsContract,BW as schedulePaymentReminderContract,kW as registerPocketFamilyOfficeBlueprint,fD as refreshOpenBankingBalancesWorkflow,ZD as processUploadedDocumentWorkflow,TW as pocketFamilyOfficeTenantSample,qG as pocketFamilyOfficeTelemetry,gW as pocketFamilyOfficeKnowledgeSources,VD as pocketFamilyOfficeContracts,T9 as pocketFamilyOfficeConnections,j9 as pocketFamilyOfficeBlueprint,TD as ingestEmailThreadsWorkflow,vW as getPocketFamilyOfficeConnection,rD as generateOpenBankingOverviewWorkflow,bW as generateOpenBankingOverviewContract,SD as generateFinancialSummaryWorkflow,$W as generateFinancialSummaryContract,NW as dispatchFinancialSummaryContract,QG as PocketFamilyOfficeFeature,YG as OPENBANKING_SENSITIVE_FIELDS};
|
|
61
|
+
}`)}function O(J,X,H=""){return X!=null&&X!==""?J+X+H:""}function D1(J){return O(" ",J.replace(/\n/g,`
|
|
62
|
+
`))}function D4(J){var X;return(X=J===null||J===void 0?void 0:J.some((H)=>H.includes(`
|
|
63
|
+
`)))!==null&&X!==void 0?X:!1}function B1(J,X){switch(J.kind){case E.NULL:return null;case E.INT:return parseInt(J.value,10);case E.FLOAT:return parseFloat(J.value);case E.STRING:case E.ENUM:case E.BOOLEAN:return J.value;case E.LIST:return J.values.map((H)=>B1(H,X));case E.OBJECT:return w1(J.fields,(H)=>H.name.value,(H)=>B1(H.value,X));case E.VARIABLE:return X===null||X===void 0?void 0:X[J.name.value]}}function c0(J){if(J!=null||t(!1,"Must provide name."),typeof J==="string"||t(!1,"Expected name to be a string."),J.length===0)throw new o("Expected name to be a non-empty string.");for(let X=1;X<J.length;++X)if(!gJ(J.charCodeAt(X)))throw new o(`Names must only contain [_a-zA-Z0-9] but "${J}" does not.`);if(!xJ(J.charCodeAt(0)))throw new o(`Names must start with [_a-zA-Z] but "${J}" does not.`);return J}function P4(J){if(J==="true"||J==="false"||J==="null")throw new o(`Enum values cannot be named: ${J}`);return c0(J)}class u0{constructor(J){var X,H,W,q;let Y=(X=J.parseValue)!==null&&X!==void 0?X:w4;if(this.name=c0(J.name),this.description=J.description,this.specifiedByURL=J.specifiedByURL,this.serialize=(H=J.serialize)!==null&&H!==void 0?H:w4,this.parseValue=Y,this.parseLiteral=(W=J.parseLiteral)!==null&&W!==void 0?W:(z,Q)=>Y(B1(z,Q)),this.extensions=U1(J.extensions),this.astNode=J.astNode,this.extensionASTNodes=(q=J.extensionASTNodes)!==null&&q!==void 0?q:[],J.specifiedByURL==null||typeof J.specifiedByURL==="string"||t(!1,`${this.name} must provide "specifiedByURL" as a string, but got: ${M0(J.specifiedByURL)}.`),J.serialize==null||typeof J.serialize==="function"||t(!1,`${this.name} must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.`),J.parseLiteral)typeof J.parseValue==="function"&&typeof J.parseLiteral==="function"||t(!1,`${this.name} must provide both "parseValue" and "parseLiteral" functions.`)}get[Symbol.toStringTag](){return"GraphQLScalarType"}toConfig(){return{name:this.name,description:this.description,specifiedByURL:this.specifiedByURL,serialize:this.serialize,parseValue:this.parseValue,parseLiteral:this.parseLiteral,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function nJ(J){return Y1(J)&&!Array.isArray(J)}class y0{constructor(J){var X;this.name=c0(J.name),this.description=J.description,this.extensions=U1(J.extensions),this.astNode=J.astNode,this.extensionASTNodes=(X=J.extensionASTNodes)!==null&&X!==void 0?X:[],this._values=typeof J.values==="function"?J.values:iJ(this.name,J.values),this._valueLookup=null,this._nameLookup=null}get[Symbol.toStringTag](){return"GraphQLEnumType"}getValues(){if(typeof this._values==="function")this._values=iJ(this.name,this._values());return this._values}getValue(J){if(this._nameLookup===null)this._nameLookup=yJ(this.getValues(),(X)=>X.name);return this._nameLookup[J]}serialize(J){if(this._valueLookup===null)this._valueLookup=new Map(this.getValues().map((H)=>[H.value,H]));let X=this._valueLookup.get(J);if(X===void 0)throw new o(`Enum "${this.name}" cannot represent value: ${M0(J)}`);return X.name}parseValue(J){if(typeof J!=="string"){let H=M0(J);throw new o(`Enum "${this.name}" cannot represent non-string value: ${H}.`+M1(this,H))}let X=this.getValue(J);if(X==null)throw new o(`Value "${J}" does not exist in "${this.name}" enum.`+M1(this,J));return X.value}parseLiteral(J,X){if(J.kind!==E.ENUM){let W=P1(J);throw new o(`Enum "${this.name}" cannot represent non-enum value: ${W}.`+M1(this,W),{nodes:J})}let H=this.getValue(J.value);if(H==null){let W=P1(J);throw new o(`Value "${W}" does not exist in "${this.name}" enum.`+M1(this,W),{nodes:J})}return H.value}toConfig(){let J=w1(this.getValues(),(X)=>X.name,(X)=>({description:X.description,value:X.value,deprecationReason:X.deprecationReason,extensions:X.extensions,astNode:X.astNode}));return{name:this.name,description:this.description,values:J,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function M1(J,X){let H=J.getValues().map((q)=>q.name),W=oJ(X,H);return uJ("the enum value",W)}function iJ(J,X){return nJ(X)||t(!1,`${J} values must be an object with value names as keys.`),Object.entries(X).map(([H,W])=>{return nJ(W)||t(!1,`${J}.${H} must refer to an object with a "value" key representing an internal value but got: ${M0(W)}.`),{name:P4(H),description:W.description,value:W.value!==void 0?W.value:H,deprecationReason:W.deprecationReason,extensions:U1(W.extensions),astNode:W.astNode}})}var aJ=class{name;values;gqlEnum;constructor(J,X){this.name=J,this.values=X,this.gqlEnum=new y0({name:this.name,values:Object.fromEntries(X.map((H)=>[H,{value:H}]))})}getName(){return this.name}getEnumValues(){return this.values}getPothos(){return this.gqlEnum}getZod(){return H4(this.values)}getJson(){return{type:"string",enum:this.values}}getJsonSchema(){return this.getJson()}},L0=(J,X)=>new aJ(J,X);var j=class extends u0{zodSchema;jsonSchemaDef;constructor(J){super(J);this.zodSchema=J.zod,this.jsonSchemaDef=J.jsonSchema}getZod(){return this.zodSchema}getPothos(){return this}getJson(){return typeof this.jsonSchemaDef==="function"?this.jsonSchemaDef():this.jsonSchemaDef}getJsonSchemaDef(){return this.jsonSchemaDef}getJsonSchema(){let J=(X)=>{let H=typeof X==="function"?X():X;if(Array.isArray(H))return H.map((W)=>J(W));if(H&&typeof H==="object"){let W={};for(let[q,Y]of Object.entries(H))W[q]=J(Y);return W}return H};return J(this.getJson())}};var B4=/^[A-Za-z]{2}(?:-[A-Za-z0-9]{2,8})*$/,M4=/^(?:UTC|[A-Za-z_]+\/[A-Za-z_]+)$/,F4=/^[+]?\d[\d\s().-]{3,}$/,I4=/^[A-Z]{3}$/,$4=/^[A-Z]{2}$/,A4=-90,O4=90,V4=-180,K4=180,w={String_unsecure:()=>new j({name:"String_unsecure",description:"Unvalidated string scalar",zod:_(),parseValue:(J)=>_().parse(J),serialize:(J)=>String(J),parseLiteral:(J)=>{if(J.kind!==E.STRING)throw TypeError("Invalid literal");return J.value},jsonSchema:{type:"string"}}),Int_unsecure:()=>new j({name:"Int_unsecure",description:"Unvalidated integer scalar",zod:B0().int(),parseValue:(J)=>{let X=typeof J==="number"?J:Number(J);return B0().int().parse(X)},serialize:(J)=>Math.trunc(typeof J==="number"?J:Number(J)),parseLiteral:(J)=>{if(J.kind!==E.INT)throw TypeError("Invalid literal");return Number(J.value)},jsonSchema:{type:"integer"}}),Float_unsecure:()=>new j({name:"Float_unsecure",description:"Unvalidated float scalar",zod:B0(),parseValue:(J)=>{let X=typeof J==="number"?J:Number(J);return B0().parse(X)},serialize:(J)=>Number(J),parseLiteral:(J)=>{if(J.kind!==E.FLOAT&&J.kind!==E.INT)throw TypeError("Invalid literal");return Number(J.value)},jsonSchema:{type:"number"}}),Boolean:()=>new j({name:"Boolean",description:"Unvalidated boolean scalar",zod:_J(),parseValue:(J)=>N0.boolean().parse(J),serialize:(J)=>Boolean(J),parseLiteral:(J)=>{if(J.kind!==E.BOOLEAN)throw TypeError("Invalid literal");return J.value},jsonSchema:{type:"boolean"}}),ID:()=>new j({name:"ID",description:"Unvalidated id scalar",zod:_(),parseValue:(J)=>_().parse(J),serialize:(J)=>String(J),parseLiteral:(J)=>{if(J.kind!==E.STRING)throw TypeError("Invalid literal");return J.value},jsonSchema:{type:"string"}}),JSON:()=>new j({name:"JSON",zod:q1(),parseValue:(J)=>J,serialize:(J)=>J,jsonSchema:{}}),JSONObject:()=>new j({name:"JSONObject",zod:X4(_(),q1()),parseValue:(J)=>X4(_(),q1()).parse(J),serialize:(J)=>J??{},jsonSchema:{type:"object"}}),Date:()=>new j({name:"Date",zod:e1(),parseValue:(J)=>J instanceof Date?J:new Date(String(J)),serialize:(J)=>J instanceof Date?J.toISOString().split("T")[0]:String(J),jsonSchema:{type:"string",format:"date"}}),DateTime:()=>new j({name:"DateTime",zod:e1(),parseValue:(J)=>J instanceof Date?J:new Date(String(J)),serialize:(J)=>{return J instanceof Date?J.toISOString():String(J)},jsonSchema:{type:"string",format:"date-time"}}),Time:()=>new j({name:"Time",zod:_().regex(/^\d{2}:\d{2}(:\d{2})?$/),parseValue:(J)=>_().regex(/^\d{2}:\d{2}(:\d{2})?$/).parse(J),serialize:(J)=>String(J),jsonSchema:{type:"string",pattern:"^\\d{2}:\\d{2}(:\\d{2})?$"}}),EmailAddress:()=>new j({name:"EmailAddress",zod:_().email(),parseValue:(J)=>_().email().parse(J),serialize:(J)=>String(J),jsonSchema:{type:"string",format:"email"}}),URL:()=>new j({name:"URL",zod:_().url(),parseValue:(J)=>_().url().parse(J),serialize:(J)=>String(J),jsonSchema:{type:"string",format:"uri"}}),PhoneNumber:()=>new j({name:"PhoneNumber",zod:_().regex(F4),parseValue:(J)=>_().regex(F4).parse(J),serialize:(J)=>String(J),jsonSchema:{type:"string",pattern:F4.source}}),NonEmptyString:()=>new j({name:"NonEmptyString",zod:_().min(1),parseValue:(J)=>_().min(1).parse(J),serialize:(J)=>String(J),jsonSchema:{type:"string",minLength:1}}),Locale:()=>new j({name:"Locale",zod:_().regex(B4),parseValue:(J)=>_().regex(B4).parse(J),serialize:(J)=>String(J),jsonSchema:{type:"string",pattern:B4.source}}),TimeZone:()=>new j({name:"TimeZone",zod:_().regex(M4),parseValue:(J)=>_().regex(M4).parse(J),serialize:(J)=>String(J),jsonSchema:{type:"string",pattern:M4.source}}),Latitude:()=>new j({name:"Latitude",zod:B0().min(A4).max(O4),parseValue:(J)=>N0.number().min(A4).max(O4).parse(J),serialize:(J)=>Number(J),jsonSchema:{type:"number",minimum:A4,maximum:O4}}),Longitude:()=>new j({name:"Longitude",zod:B0().min(V4).max(K4),parseValue:(J)=>N0.number().min(V4).max(K4).parse(J),serialize:(J)=>Number(J),jsonSchema:{type:"number",minimum:V4,maximum:K4}}),Currency:()=>new j({name:"Currency",zod:_().regex(I4),parseValue:(J)=>_().regex(I4).parse(J),serialize:(J)=>String(J),jsonSchema:{type:"string",pattern:I4.source}}),CountryCode:()=>new j({name:"CountryCode",zod:_().regex($4),parseValue:(J)=>_().regex($4).parse(J),serialize:(J)=>String(J),jsonSchema:{type:"string",pattern:$4.source}})};var T=class{constructor(J){this.config=J}getZod(){let J=Object.entries(this.config.fields).reduce((X,[H,W])=>{let q=W.type.getZod(),Y=W.isArray?J4(q):q;return X[H]=W.isOptional?Y.optional():Y,X},{});return kJ(J)}getPothosInput(){return this.config.name}};var m=(J)=>new T(J);var sJ=(J,X)=>()=>(J&&(X=J(J=0)),X);var c3,R4=sJ(()=>{c3={byTag:(J)=>J.meta.tags?.[0]??"untagged",byAllTags:(J)=>J.meta.tags?.length?J.meta.tags:["untagged"],byOwner:(J)=>J.meta.owners?.[0]??"unowned",byDomain:(J)=>{return(J.meta.key??J.meta.key??"").split(".")[0]??"default"},byStability:(J)=>J.meta.stability??"stable",byUrlPath:(J)=>(X)=>{if(!X.path)return"root";return X.path.split("/").filter(Boolean).slice(0,J).join("/")||"root"}}});R4();R4();var J9={meta:{key:"payments.stripe",version:"1.0.0",category:"payments",title:"Stripe Payments",description:"Stripe integration for payment processing, charges, and payouts.",domain:"payments",owners:["platform.payments"],tags:["payments","psp"],stability:A.Stable},supportedModes:["managed","byok"],capabilities:{provides:[{key:"payments.psp",version:"1.0.0"}],requires:[{key:"platform.webhooks",optional:!0,reason:"Recommended for reliable event ingestion"}]},configSchema:{schema:{type:"object",properties:{accountId:{type:"string",description:"Connected account ID when using Stripe Connect (BYOK)."},region:{type:"string",description:"Optional Stripe region or data residency hint."}}},example:{accountId:"acct_123",region:"us-east-1"}},secretSchema:{schema:{type:"object",required:["apiKey","webhookSecret"],properties:{apiKey:{type:"string",description:"Stripe secret API key (sk_live_... or sk_test_...)."},webhookSecret:{type:"string",description:"Signing secret for webhook verification."}}},example:{apiKey:"sk_live_***",webhookSecret:"whsec_***"}},healthCheck:{method:"ping",timeoutMs:5000},docsUrl:"https://stripe.com/docs/api",constraints:{rateLimit:{rpm:1000,rph:20000}},byokSetup:{setupInstructions:"Create a restricted Stripe API key with write access to Charges and provide a webhook signing secret.",requiredScopes:["charges:write","customers:read"]}};var X9={meta:{key:"email.postmark",version:"1.0.0",category:"email",title:"Postmark Transactional Email",description:"Postmark integration for transactional email delivery.",domain:"communications",owners:["platform.messaging"],tags:["email","transactional"],stability:A.Stable},supportedModes:["managed","byok"],capabilities:{provides:[{key:"email.transactional",version:"1.0.0"}],requires:[{key:"platform.webhooks",optional:!0,reason:"Optional for inbound bounce handling"}]},configSchema:{schema:{type:"object",properties:{messageStream:{type:"string",description:"Optional message stream identifier (e.g., transactional)."},fromEmail:{type:"string",description:"Default From address used for outbound messages."}}},example:{messageStream:"outbound",fromEmail:"notifications@example.com"}},secretSchema:{schema:{type:"object",required:["serverToken"],properties:{serverToken:{type:"string",description:"Server token for the Postmark account."}}},example:{serverToken:"server-***"}},healthCheck:{method:"ping",timeoutMs:3000},docsUrl:"https://postmarkapp.com/developer",constraints:{rateLimit:{rpm:500}},byokSetup:{setupInstructions:"Create a Postmark server token with outbound send permissions and configure allowed from addresses."}};var H9={meta:{key:"vectordb.qdrant",version:"1.0.0",category:"vector-db",title:"Qdrant Vector Database",description:"Qdrant integration for vector search and embeddings storage.",domain:"ai",owners:["platform.ai"],tags:["vector-db","search"],stability:A.Experimental},supportedModes:["managed","byok"],capabilities:{provides:[{key:"vector-db.search",version:"1.0.0"},{key:"vector-db.storage",version:"1.0.0"}],requires:[{key:"ai.embeddings",optional:!0,reason:"Required if vectors are generated via hosted embedding services"}]},configSchema:{schema:{type:"object",properties:{apiUrl:{type:"string",description:"Base URL for the Qdrant instance (e.g., https://qdrant.example.com)."},collectionPrefix:{type:"string",description:"Prefix applied to all collection names for this tenant."}}},example:{apiUrl:"https://qdrant.example.com",collectionPrefix:"tenant_"}},secretSchema:{schema:{type:"object",properties:{apiKey:{type:"string",description:"API key or token when authentication is enabled."}}},example:{apiKey:"qdrant-api-key"}},healthCheck:{method:"ping",timeoutMs:4000},docsUrl:"https://qdrant.tech/documentation/quick-start/",constraints:{quotas:{collections:100,pointsPerCollection:1e6}},byokSetup:{setupInstructions:"Provide the HTTPS endpoint of your Qdrant cluster and generate an API key with read/write access to the collections that will be managed."}};var W9={meta:{key:"ai-llm.mistral",version:"1.0.0",category:"ai-llm",title:"Mistral Large Language Model",description:"Mistral integration providing chat completions and embedding generation.",domain:"ai",owners:["platform.ai"],tags:["ai","llm","embeddings"],stability:A.Experimental},supportedModes:["managed","byok"],capabilities:{provides:[{key:"ai.chat",version:"1.0.0"},{key:"ai.embeddings",version:"1.0.0"}]},configSchema:{schema:{type:"object",properties:{model:{type:"string",description:"Default chat completion model (e.g., mistral-large-latest)."},embeddingModel:{type:"string",description:"Embedding model identifier."}}},example:{model:"mistral-large-latest",embeddingModel:"mistral-embed"}},secretSchema:{schema:{type:"object",required:["apiKey"],properties:{apiKey:{type:"string",description:"Mistral API key with access to chat and embeddings endpoints."}}},example:{apiKey:"mistral-***"}},healthCheck:{method:"custom",timeoutMs:5000},docsUrl:"https://docs.mistral.ai/platform/endpoints",constraints:{rateLimit:{rpm:600}},byokSetup:{setupInstructions:"Generate an API key within the Mistral console and ensure the selected models are enabled for the account."}};var q9={meta:{key:"ai-voice.elevenlabs",version:"1.0.0",category:"ai-voice",title:"ElevenLabs Text-to-Speech",description:"ElevenLabs integration for neural voice synthesis and voice catalog access.",domain:"ai",owners:["platform.ai"],tags:["voice","tts"],stability:A.Beta},supportedModes:["managed","byok"],capabilities:{provides:[{key:"ai.voice.synthesis",version:"1.0.0"}]},configSchema:{schema:{type:"object",properties:{defaultVoiceId:{type:"string",description:"Optional default voice identifier for synthesis requests."}}},example:{defaultVoiceId:"pNInz6obpgDQGcFmaJgB"}},secretSchema:{schema:{type:"object",required:["apiKey"],properties:{apiKey:{type:"string",description:"ElevenLabs API key with text-to-speech permissions."}}},example:{apiKey:"eleven-***"}},healthCheck:{method:"custom",timeoutMs:4000},docsUrl:"https://elevenlabs.io/docs/api-reference/text-to-speech",constraints:{rateLimit:{rpm:120}},byokSetup:{setupInstructions:"Create an ElevenLabs API key and ensure the desired voices are accessible to the key scope."}};var Y9={meta:{key:"email.gmail",version:"1.0.0",category:"email",title:"Google Gmail API",description:"Gmail integration supporting inbound thread ingestion and outbound transactional email.",domain:"communications",owners:["platform.messaging"],tags:["email","gmail"],stability:A.Beta},supportedModes:["managed","byok"],capabilities:{provides:[{key:"email.inbound",version:"1.0.0"},{key:"email.outbound",version:"1.0.0"}]},configSchema:{schema:{type:"object",properties:{labelIds:{type:"array",items:{type:"string"},description:"Optional list of label IDs to scope inbound sync."},includeSpamTrash:{type:"boolean",description:"Whether to include spam or trash messages during sync."}}},example:{labelIds:["INBOX"],includeSpamTrash:!1}},secretSchema:{schema:{type:"object",required:["clientId","clientSecret","refreshToken"],properties:{clientId:{type:"string",description:"OAuth client ID for the Google Cloud project."},clientSecret:{type:"string",description:"OAuth client secret for the Google Cloud project."},refreshToken:{type:"string",description:"OAuth refresh token for delegated Gmail access."},redirectUri:{type:"string",description:"Optional redirect URI used when issuing the refresh token."}}},example:{clientId:"xxx.apps.googleusercontent.com",clientSecret:"secret",refreshToken:"refresh-token"}},healthCheck:{method:"custom",timeoutMs:4000},docsUrl:"https://developers.google.com/gmail/api",constraints:{rateLimit:{rpm:600}},byokSetup:{setupInstructions:"Create an OAuth consent screen and credentials within Google Cloud Console, then authorize the Gmail scopes and store the resulting refresh token."}};var z9={meta:{key:"calendar.google",version:"1.0.0",category:"calendar",title:"Google Calendar API",description:"Google Calendar integration for event creation, updates, and scheduling automations.",domain:"productivity",owners:["platform.messaging"],tags:["calendar","google"],stability:A.Beta},supportedModes:["managed","byok"],capabilities:{provides:[{key:"calendar.events",version:"1.0.0"}]},configSchema:{schema:{type:"object",properties:{calendarId:{type:"string",description:"Default calendar identifier (defaults to primary)."}}},example:{calendarId:"primary"}},secretSchema:{schema:{type:"object",required:["clientEmail","privateKey"],properties:{clientEmail:{type:"string",description:"Service account client email."},privateKey:{type:"string",description:"Service account private key."},projectId:{type:"string",description:"Google Cloud project ID."}}},example:{clientEmail:"svc-calendar@example.iam.gserviceaccount.com",privateKey:"-----BEGIN PRIVATE KEY-----...",projectId:"calendar-project"}},healthCheck:{method:"custom",timeoutMs:4000},docsUrl:"https://developers.google.com/calendar/api",constraints:{},byokSetup:{setupInstructions:"Create a Google service account with Calendar access and share the target calendars with the service account email."}};var Q9={meta:{key:"sms.twilio",version:"1.0.0",category:"sms",title:"Twilio Messaging",description:"Twilio SMS integration for transactional and notification messaging.",domain:"communications",owners:["platform.messaging"],tags:["sms","messaging"],stability:A.Stable},supportedModes:["managed","byok"],capabilities:{provides:[{key:"sms.outbound",version:"1.0.0"}]},configSchema:{schema:{type:"object",properties:{fromNumber:{type:"string",description:"Default Twilio phone number used as sender."}}},example:{fromNumber:"+15551234567"}},secretSchema:{schema:{type:"object",required:["accountSid","authToken"],properties:{accountSid:{type:"string",description:"Twilio Account SID."},authToken:{type:"string",description:"Twilio Auth Token."}}},example:{accountSid:"ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",authToken:"auth-token"}},healthCheck:{method:"custom",timeoutMs:3000},docsUrl:"https://www.twilio.com/docs/sms/api",constraints:{rateLimit:{rpm:200}},byokSetup:{setupInstructions:"Provide a Twilio account SID, auth token, and verify the outbound sending numbers used by the integration."}};var w9={meta:{key:"storage.gcs",version:"1.0.0",category:"storage",title:"Google Cloud Storage Buckets",description:"Google Cloud Storage integration for object storage and retrieval.",domain:"infrastructure",owners:["platform.infrastructure"],tags:["storage","gcs","google-cloud"],stability:A.Beta},supportedModes:["managed","byok"],capabilities:{provides:[{key:"storage.objects",version:"1.0.0"}]},configSchema:{schema:{type:"object",required:["bucket"],properties:{bucket:{type:"string",description:"Primary bucket name used for storing objects."},prefix:{type:"string",description:"Optional prefix applied to object keys."}}},example:{bucket:"pfo-tenant-assets",prefix:"documents/"}},secretSchema:{schema:{type:"object",properties:{type:{type:"string",description:"Service account type field from Google credentials JSON (if provided)."},client_email:{type:"string"},private_key:{type:"string"},project_id:{type:"string"}}},example:{type:"service_account",client_email:"svc-account@example.iam.gserviceaccount.com",private_key:"-----BEGIN PRIVATE KEY-----...",project_id:"example-project"}},healthCheck:{method:"ping",timeoutMs:4000},docsUrl:"https://cloud.google.com/storage/docs/apis",constraints:{quotas:{storageGb:5120}},byokSetup:{setupInstructions:"Create a Google Cloud service account with Storage Object Admin role and upload the JSON credentials to the secret store."}};var G9={meta:{key:"openbanking.powens",version:"1.0.0",category:"open-banking",title:"Powens Open Banking (Read)",description:"Read-only Open Banking integration powered by Powens, exposing accounts, transactions, and balances.",domain:"finance",owners:["platform.finance"],tags:["open-banking","powens","finance"],stability:A.Experimental},supportedModes:["byok"],capabilities:{provides:[{key:"openbanking.accounts.read",version:"1.0.0"},{key:"openbanking.transactions.read",version:"1.0.0"},{key:"openbanking.balances.read",version:"1.0.0"}]},configSchema:{schema:{type:"object",required:["environment"],properties:{environment:{type:"string",enum:["sandbox","production"],description:"Powens environment to target. Sandbox uses Powens test API base URL, production uses live endpoints."},baseUrl:{type:"string",description:"Optional override for the Powens API base URL. Defaults to Powens environment defaults."},region:{type:"string",description:"Optional Powens region identifier when targeting a specific data residency cluster."},pollingIntervalMs:{type:"number",description:"Optional custom polling interval in milliseconds for background sync jobs (defaults to platform standard)."}}},example:{environment:"sandbox",baseUrl:"https://api-sandbox.powens.com/v2",region:"eu-west-1",pollingIntervalMs:300000}},secretSchema:{schema:{type:"object",required:["clientId","clientSecret"],properties:{clientId:{type:"string",description:"Powens OAuth client identifier obtained from the Powens Console (BYOK project)."},clientSecret:{type:"string",description:"Powens OAuth client secret used to exchange for access tokens."},apiKey:{type:"string",description:"Optional Powens API key (if the tenant project exposes a dedicated API token)."},webhookSecret:{type:"string",description:"Optional webhook signing secret used to verify Powens webhook payloads."}}},example:{clientId:"powens-client-id",clientSecret:"powens-client-secret",apiKey:"powens-api-key",webhookSecret:"powens-webhook-secret"}},healthCheck:{method:"ping",timeoutMs:8000},docsUrl:"https://docs.powens.com/",constraints:{rateLimit:{rph:1e4,rpm:600}},byokSetup:{setupInstructions:"Create a Powens BYOK project, generate OAuth credentials, and optionally configure webhook delivery for account/transaction updates.",requiredScopes:["accounts:read","transactions:read","balances:read"]}};var F1=new T({name:"BankAccountRecord",description:"Canonical representation of a bank account synced from an open banking provider.",fields:{id:{type:w.ID(),isOptional:!1},tenantId:{type:w.ID(),isOptional:!1},userId:{type:w.ID(),isOptional:!1},connectionId:{type:w.ID(),isOptional:!1},externalId:{type:w.NonEmptyString(),isOptional:!1},institutionId:{type:w.NonEmptyString(),isOptional:!1},institutionName:{type:w.NonEmptyString(),isOptional:!1},institutionLogoUrl:{type:w.URL(),isOptional:!0},iban:{type:w.String_unsecure(),isOptional:!0},bic:{type:w.String_unsecure(),isOptional:!0},accountType:{type:w.NonEmptyString(),isOptional:!1},currency:{type:w.Currency(),isOptional:!1},displayName:{type:w.NonEmptyString(),isOptional:!1},accountNumberMasked:{type:w.String_unsecure(),isOptional:!0},productCode:{type:w.String_unsecure(),isOptional:!0},balance:{type:w.Float_unsecure(),isOptional:!0},availableBalance:{type:w.Float_unsecure(),isOptional:!0},lastSyncedAt:{type:w.DateTime(),isOptional:!1},createdAt:{type:w.DateTime(),isOptional:!1},updatedAt:{type:w.DateTime(),isOptional:!1},metadata:{type:w.JSONObject(),isOptional:!0}}}),N4=new T({name:"BankTransactionRecord",description:"Canonical transaction entry mapped from Powens into the open banking ledger.",fields:{id:{type:w.ID(),isOptional:!1},accountId:{type:w.ID(),isOptional:!1},tenantId:{type:w.ID(),isOptional:!1},connectionId:{type:w.ID(),isOptional:!1},externalId:{type:w.NonEmptyString(),isOptional:!1},amount:{type:w.Float_unsecure(),isOptional:!1},currency:{type:w.Currency(),isOptional:!1},date:{type:w.DateTime(),isOptional:!1},bookingDate:{type:w.DateTime(),isOptional:!0},valueDate:{type:w.DateTime(),isOptional:!0},description:{type:w.String_unsecure(),isOptional:!0},counterpartyName:{type:w.String_unsecure(),isOptional:!0},counterpartyAccount:{type:w.String_unsecure(),isOptional:!0},merchantCategoryCode:{type:w.String_unsecure(),isOptional:!0},rawCategory:{type:w.String_unsecure(),isOptional:!0},standardizedCategory:{type:w.String_unsecure(),isOptional:!0},transactionType:{type:w.NonEmptyString(),isOptional:!1},status:{type:w.NonEmptyString(),isOptional:!1},runningBalance:{type:w.Float_unsecure(),isOptional:!0},metadata:{type:w.JSONObject(),isOptional:!0},createdAt:{type:w.DateTime(),isOptional:!1},updatedAt:{type:w.DateTime(),isOptional:!1}}}),I1=new T({name:"AccountBalanceRecord",description:"Canonical balance snapshot computed from Powens balance payloads.",fields:{id:{type:w.ID(),isOptional:!1},accountId:{type:w.ID(),isOptional:!1},tenantId:{type:w.ID(),isOptional:!1},connectionId:{type:w.ID(),isOptional:!1},balanceType:{type:w.NonEmptyString(),isOptional:!1},currentBalance:{type:w.Float_unsecure(),isOptional:!1},availableBalance:{type:w.Float_unsecure(),isOptional:!0},currency:{type:w.Currency(),isOptional:!1},lastUpdatedAt:{type:w.DateTime(),isOptional:!1},createdAt:{type:w.DateTime(),isOptional:!1},metadata:{type:w.JSONObject(),isOptional:!0}}});var Z4=["iban","bic","accountNumberMasked","accountNumber","counterpartyName","counterpartyAccount","description","merchantName","merchantCategoryCode","reference"],u={accountsSynced:"openbanking.accounts.synced",accountsSyncFailed:"openbanking.accounts.sync_failed",transactionsSynced:"openbanking.transactions.synced",transactionsSyncFailed:"openbanking.transactions.sync_failed",balancesRefreshed:"openbanking.balances.refreshed",balancesRefreshFailed:"openbanking.balances.refresh_failed",overviewGenerated:"openbanking.overview.generated"};var F0=(J)=>({...J,meta:{...J.meta,kind:"command"},policy:{...J.policy,idempotent:J.policy?.policy?.idempotent??!1}}),U0=(J)=>({...J,meta:{...J.meta,kind:"query"},policy:{...J.policy,idempotent:!0}});var f3=new T({name:"OpenBankingListAccountsInput",description:"Parameters for listing bank accounts through the open banking provider.",fields:{tenantId:{type:w.ID(),isOptional:!1},userId:{type:w.ID(),isOptional:!1},connectionId:{type:w.ID(),isOptional:!0},includeBalances:{type:w.Boolean(),isOptional:!0},institutionId:{type:w.String_unsecure(),isOptional:!0},cursor:{type:w.String_unsecure(),isOptional:!0},pageSize:{type:w.Int_unsecure(),isOptional:!0}}}),o3=new T({name:"OpenBankingListAccountsOutput",description:"Paginated list of bank accounts available to the tenant and user.",fields:{accounts:{type:F1,isOptional:!1,isArray:!0},nextCursor:{type:w.String_unsecure(),isOptional:!0},hasMore:{type:w.Boolean(),isOptional:!0}}}),l3=new T({name:"OpenBankingGetAccountInput",description:"Parameters for retrieving a specific bank account.",fields:{tenantId:{type:w.ID(),isOptional:!1},accountId:{type:w.ID(),isOptional:!1},includeBalances:{type:w.Boolean(),isOptional:!0},includeLatestTransactions:{type:w.Boolean(),isOptional:!0}}}),r3=new T({name:"OpenBankingSyncAccountsInput",description:"Command payload to trigger an account synchronisation against the open banking provider.",fields:{tenantId:{type:w.ID(),isOptional:!1},userId:{type:w.ID(),isOptional:!0},connectionId:{type:w.ID(),isOptional:!1},accountIds:{type:w.ID(),isArray:!0,isOptional:!0},forceFullRefresh:{type:w.Boolean(),isOptional:!0},triggerWorkflows:{type:w.Boolean(),isOptional:!0}}}),p3=new T({name:"OpenBankingSyncAccountsOutput",description:"Result of a bank account synchronisation run.",fields:{synced:{type:w.Int_unsecure(),isOptional:!1},failed:{type:w.Int_unsecure(),isOptional:!1},errors:{type:w.String_unsecure(),isArray:!0,isOptional:!0},nextSyncSuggestedAt:{type:w.DateTime(),isOptional:!0}}}),V9=U0({meta:{key:"openbanking.accounts.list",version:"1.0.0",description:"List bank accounts available to a tenant/user via Powens Open Banking.",goal:"Provide downstream workflows with the set of accounts accessible via the configured open banking connection.",context:"Used by Pocket Family Office dashboards and sync workflows to enumerate bank accounts prior to syncing balances or transactions.",owners:["@platform.finance"],tags:["open-banking","powens","accounts"],stability:"experimental"},io:{input:f3,output:o3},policy:{auth:"user"}}),K9=U0({meta:{key:"openbanking.accounts.get",version:"1.0.0",description:"Retrieve the canonical bank account record for the given account identifier.",goal:"Allow user-facing experiences and automations to display up-to-date account metadata.",context:"Invoked by UI surfaces and workflow automation steps that require detailed metadata for a specific bank account.",owners:["@platform.finance"],tags:["open-banking","powens","accounts"],stability:"experimental"},io:{input:l3,output:F1},policy:{auth:"user"}}),R9=F0({meta:{key:"openbanking.accounts.sync",version:"1.0.0",description:"Initiate a synchronisation run to refresh bank account metadata from Powens.",goal:"Keep canonical bank account records aligned with the external open banking provider.",context:"Triggered by scheduled workflows or manual operator actions to reconcile account metadata prior to transaction/balance syncs.",owners:["@platform.finance"],tags:["open-banking","powens","accounts"],stability:"experimental"},io:{input:r3,output:p3},policy:{auth:"admin"},telemetry:{success:{event:{key:u.accountsSynced},properties:({input:J,output:X})=>{let H=J,W=X;return{tenantId:H?.tenantId,connectionId:H?.connectionId,synced:W?.synced,failed:W?.failed}}},failure:{event:{key:u.accountsSyncFailed},properties:({input:J,error:X})=>{let H=J;return{tenantId:H?.tenantId,connectionId:H?.connectionId,error:X instanceof Error?X.message:String(X??"unknown")}}}}});var d3=new T({name:"OpenBankingListTransactionsInput",description:"Parameters for listing bank transactions from the canonical ledger.",fields:{tenantId:{type:w.ID(),isOptional:!1},accountId:{type:w.ID(),isOptional:!1},from:{type:w.DateTime(),isOptional:!0},to:{type:w.DateTime(),isOptional:!0},cursor:{type:w.String_unsecure(),isOptional:!0},pageSize:{type:w.Int_unsecure(),isOptional:!0},direction:{type:w.String_unsecure(),isOptional:!0},minimumAmount:{type:w.Float_unsecure(),isOptional:!0},maximumAmount:{type:w.Float_unsecure(),isOptional:!0},category:{type:w.String_unsecure(),isOptional:!0}}}),n3=new T({name:"OpenBankingListTransactionsOutput",description:"Paginated list of transactions for a bank account.",fields:{transactions:{type:N4,isOptional:!1,isArray:!0},nextCursor:{type:w.String_unsecure(),isOptional:!0},hasMore:{type:w.Boolean(),isOptional:!0}}}),i3=new T({name:"OpenBankingSyncTransactionsInput",description:"Command payload to synchronise transactions from the open banking provider into the canonical ledger.",fields:{tenantId:{type:w.ID(),isOptional:!1},accountId:{type:w.ID(),isOptional:!1},from:{type:w.DateTime(),isOptional:!0},to:{type:w.DateTime(),isOptional:!0},connectionId:{type:w.ID(),isOptional:!0},includePending:{type:w.Boolean(),isOptional:!0},backfillDays:{type:w.Int_unsecure(),isOptional:!0}}}),t3=new T({name:"OpenBankingSyncTransactionsOutput",description:"Result of a transaction synchronisation run.",fields:{synced:{type:w.Int_unsecure(),isOptional:!1},failed:{type:w.Int_unsecure(),isOptional:!1},earliestSyncedAt:{type:w.DateTime(),isOptional:!0},latestSyncedAt:{type:w.DateTime(),isOptional:!0},nextSinceToken:{type:w.String_unsecure(),isOptional:!0},errors:{type:w.String_unsecure(),isArray:!0,isOptional:!0}}}),N9=U0({meta:{key:"openbanking.transactions.list",version:"1.0.0",description:"List bank transactions that have been normalised into the canonical ledger.",goal:"Allow downstream analytics and UI surfaces to page through canonical bank transactions.",context:"Used by Pocket Family Office dashboards, reconciliation workflows, and analytics data views.",owners:["@platform.finance"],tags:["open-banking","powens","transactions"],stability:"experimental"},io:{input:d3,output:n3},policy:{auth:"user"}}),Z9=F0({meta:{key:"openbanking.transactions.sync",version:"1.0.0",description:"Synchronise transactions for a bank account by calling the configured open banking provider.",goal:"Ensure the canonical transaction ledger stays aligned with the external provider.",context:"Triggered by scheduled workflows or on-demand actions when activity is expected on an account.",owners:["@platform.finance"],tags:["open-banking","powens","transactions"],stability:"experimental"},io:{input:i3,output:t3},policy:{auth:"admin"},telemetry:{success:{event:{key:u.transactionsSynced},properties:({input:J,output:X})=>{let H=J,W=X;return{tenantId:H?.tenantId,accountId:H?.accountId,synced:W?.synced,failed:W?.failed,earliestSyncedAt:W?.earliestSyncedAt,latestSyncedAt:W?.latestSyncedAt}}},failure:{event:{key:u.transactionsSyncFailed},properties:({input:J,error:X})=>{let H=J;return{tenantId:H?.tenantId,accountId:H?.accountId,error:X instanceof Error?X.message:String(X??"unknown")}}}}});var a3=new T({name:"OpenBankingGetBalancesInput",description:"Parameters for retrieving bank account balances from the canonical ledger.",fields:{tenantId:{type:w.ID(),isOptional:!1},accountId:{type:w.ID(),isOptional:!1},balanceTypes:{type:w.String_unsecure(),isArray:!0,isOptional:!0}}}),s3=new T({name:"OpenBankingGetBalancesOutput",description:"Canonical balances for a bank account.",fields:{balances:{type:I1,isOptional:!1,isArray:!0},asOf:{type:w.DateTime(),isOptional:!0}}}),e3=new T({name:"OpenBankingRefreshBalancesInput",description:"Command payload to refresh balances for a bank account via the open banking provider.",fields:{tenantId:{type:w.ID(),isOptional:!1},accountId:{type:w.ID(),isOptional:!1},connectionId:{type:w.ID(),isOptional:!0},balanceTypes:{type:w.String_unsecure(),isArray:!0,isOptional:!0},forceRefresh:{type:w.Boolean(),isOptional:!0}}}),JW=new T({name:"OpenBankingRefreshBalancesOutput",description:"Result of a balance refresh against the open banking provider.",fields:{balances:{type:I1,isOptional:!1,isArray:!0},refreshedAt:{type:w.DateTime(),isOptional:!1},errors:{type:w.String_unsecure(),isArray:!0,isOptional:!0}}}),L9=U0({meta:{key:"openbanking.balances.get",version:"1.0.0",description:"Retrieve the latest cached balances for a bank account.",goal:"Expose current and available balances required by dashboards and analytics.",context:"Used by Pocket Family Office UI surfaces and automation steps that require balance totals prior to generating summaries.",owners:["@platform.finance"],tags:["open-banking","powens","balances"],stability:"experimental"},io:{input:a3,output:s3},policy:{auth:"user"}}),b9=F0({meta:{key:"openbanking.balances.refresh",version:"1.0.0",description:"Refresh balances for a bank account via the configured open banking provider.",goal:"Ensure canonical balance records reflect the latest values from Powens.",context:"Triggered by scheduled workflows before generating summaries or forecasting cashflow.",owners:["@platform.finance"],tags:["open-banking","powens","balances"],stability:"experimental"},io:{input:e3,output:JW},policy:{auth:"admin"},telemetry:{success:{event:{key:u.balancesRefreshed},properties:({input:J,output:X})=>{let H=J,W=X;return{tenantId:H?.tenantId,accountId:H?.accountId,refreshedAt:W?.refreshedAt,balanceCount:Array.isArray(W?.balances)?W?.balances.length:void 0}}},failure:{event:{key:u.balancesRefreshFailed},properties:({input:J,error:X})=>{let H=J;return{tenantId:H?.tenantId,accountId:H?.accountId,error:X instanceof Error?X.message:String(X??"unknown")}}}}});var HW=L0("Source",["upload","email","sync"]),WW=L0("Channel",["email","sms","both"]),qW=L0("Period",["P7d","P30d","P90d"]),YW=L0("ObPeriod",["Pweek","Pmonth","Pquarter"]),zW=m({name:"UploadDocumentInput",fields:{bucket:{type:w.NonEmptyString(),isOptional:!1},objectKey:{type:w.NonEmptyString(),isOptional:!1},mimeType:{type:w.NonEmptyString(),isOptional:!1},bytes:{type:w.Int_unsecure(),isOptional:!1},tags:{type:w.String_unsecure(),isOptional:!1,isArray:!0},uploadedAt:{type:w.Date(),isOptional:!1},source:{type:HW,isOptional:!1}}}),QW=m({name:"UploadDocumentOutput",fields:{documentId:{type:w.String_unsecure(),isOptional:!1},ingestionJobId:{type:w.String_unsecure(),isOptional:!1}}}),wW={meta:{key:"pfo.documents.upload",version:"1.0.0",kind:"command",description:"Stores an object in tenant storage and schedules ingestion into the knowledge base.",goal:"Allow users to ingest financial documents for processing.",context:"Part of the finance domain. Documents are uploaded to object storage and then processed by the ingestion pipeline.",owners:[K.PlatformFinance],tags:["documents","ingestion",R.Guide],stability:A.Experimental},io:{input:zW,output:QW},policy:{auth:"user",rateLimit:{rpm:30,key:"user"}}},GW=m({name:"PaymentReminderInput",fields:{billId:{type:w.String_unsecure(),isOptional:!1},recipientEmail:{type:w.EmailAddress(),isOptional:!1},recipientPhone:{type:w.String_unsecure(),isOptional:!0},dueDate:{type:w.Date(),isOptional:!1},amountCents:{type:w.Int_unsecure(),isOptional:!1},currency:{type:w.Currency(),isOptional:!1},channel:{type:WW,isOptional:!1},memo:{type:w.String_unsecure(),isOptional:!0}}}),UW=m({name:"PaymentReminderOutput",fields:{reminderId:{type:w.String_unsecure(),isOptional:!1},scheduledAt:{type:w.Date(),isOptional:!1}}}),DW={meta:{key:"pfo.reminders.schedule-payment",version:"1.0.0",kind:"command",description:"Queues outbound email/SMS reminders for upcoming bills and adds an optional calendar hold.",goal:"Ensure bills are paid on time by notifying users.",context:"Finance automation. Reminders are sent via configured channels (email, SMS).",owners:[K.PlatformFinance],tags:["payments","reminders",R.Automation],stability:A.Beta},io:{input:GW,output:UW},policy:{auth:"user"}},PW=m({name:"FinancialSummaryInput",fields:{period:{type:qW,isOptional:!1},includeVoiceSummary:{type:w.Boolean(),isOptional:!1}}}),BW=m({name:"SummaryHighlight",fields:{label:{type:w.String_unsecure(),isOptional:!1},value:{type:w.String_unsecure(),isOptional:!1}}}),MW=m({name:"FinancialSummaryOutput",fields:{summaryId:{type:w.String_unsecure(),isOptional:!1},generatedAt:{type:w.Date(),isOptional:!1},markdown:{type:w.String_unsecure(),isOptional:!1},highlights:{type:BW,isOptional:!1,isArray:!0},cashflowDelta:{type:w.Float_unsecure(),isOptional:!1}}}),FW={meta:{key:"pfo.summary.generate",version:"1.0.0",kind:"query",description:"Runs RAG over financial documents and email threads to provide a natural-language summary with key metrics.",goal:"Provide a quick overview of financial status and recent activity.",context:"Uses RAG over ingested knowledge. Summaries can be dispatched or viewed in app.",owners:[K.PlatformFinance],tags:["summary","ai",R.Automation],stability:A.Beta},io:{input:PW,output:MW},policy:{auth:"user"}},IW=m({name:"SyncEmailThreadsInput",fields:{labelIds:{type:w.String_unsecure(),isOptional:!1,isArray:!0},maxThreads:{type:w.Int_unsecure(),isOptional:!1},syncSinceMinutes:{type:w.Int_unsecure(),isOptional:!1}}}),$W=m({name:"SyncEmailThreadsOutput",fields:{syncedThreads:{type:w.Int_unsecure(),isOptional:!1},lastMessageAt:{type:w.Date(),isOptional:!0}}}),AW={meta:{key:"pfo.email.sync-threads",version:"1.0.0",kind:"command",description:"Triggers ingestion of Gmail threads into the operational knowledge space.",goal:"Keep knowledge base up to date with email communications.",context:"Syncs from Gmail integration. Only includes threads matching configured labels.",owners:[K.PlatformMessaging],tags:["gmail","knowledge",R.Automation],stability:A.Beta},io:{input:IW,output:$W},policy:{auth:"user"}},OW=m({name:"SummaryDispatchInput",fields:{summaryId:{type:w.String_unsecure(),isOptional:!1},recipientEmail:{type:w.EmailAddress(),isOptional:!1},recipientName:{type:w.String_unsecure(),isOptional:!0},includeVoice:{type:w.Boolean(),isOptional:!1},voiceRecipient:{type:w.String_unsecure(),isOptional:!0}}}),VW=m({name:"SummaryDispatchOutput",fields:{dispatchId:{type:w.String_unsecure(),isOptional:!1},emailSent:{type:w.Boolean(),isOptional:!1},voiceUrl:{type:w.String_unsecure(),isOptional:!0}}}),KW={meta:{key:"pfo.summary.dispatch",version:"1.0.0",kind:"command",description:"Delivers the generated summary via email and optionally synthesises a voice note.",goal:"Deliver financial insights to users proactively.",context:"Dispatches summaries generated by pfo.summary.generate via email or voice.",owners:[K.PlatformMessaging],tags:["summary","communications",R.Automation],stability:A.Experimental},io:{input:OW,output:VW},policy:{auth:"user"}},RW=m({name:"OpenBankingOverviewInput",fields:{tenantId:{type:w.String_unsecure(),isOptional:!1},accountIds:{type:w.String_unsecure(),isOptional:!0,isArray:!0},period:{type:YW,isOptional:!1},asOf:{type:w.Date(),isOptional:!0},includeCategories:{type:w.Boolean(),isOptional:!1},includeCashflowTrend:{type:w.Boolean(),isOptional:!1}}}),NW=m({name:"OpenBankingOverviewOutput",fields:{knowledgeEntryId:{type:w.String_unsecure(),isOptional:!1},periodStart:{type:w.Date(),isOptional:!1},periodEnd:{type:w.Date(),isOptional:!1},generatedAt:{type:w.Date(),isOptional:!1},summaryPath:{type:w.String_unsecure(),isOptional:!0}}}),ZW={meta:{key:"pfo.openbanking.generate-overview",version:"1.0.0",kind:"command",description:"Aggregates balances and transactions into a derived financial overview stored in the knowledge layer.",goal:"Create a periodic financial snapshot.",context:"Aggregates data from open banking integration into a document.",owners:[K.PlatformFinance],tags:["open-banking","summary",R.Automation],stability:A.Experimental},io:{input:RW,output:NW},policy:{auth:"user"},telemetry:{success:{event:{key:u.overviewGenerated,version:"1.0.0"}}}},KG={"pfo.documents.upload":wW,"pfo.reminders.schedule-payment":DW,"pfo.summary.generate":FW,"pfo.summary.dispatch":KW,"pfo.email.sync-threads":AW,"pfo.openbanking.generate-overview":ZW};var ZG={meta:{key:"pfo.workflow.process-uploaded-document",version:"1.0.0",title:"Process Uploaded Document",description:"Stores an uploaded invoice/contract, queues ingestion, and records any follow-up reminders.",domain:"finance",owners:[K.PlatformFinance],tags:["documents","ingestion",R.Automation],stability:A.Experimental},definition:{entryStepId:"store",steps:[{id:"store",type:"automation",label:"Store and Queue Ingestion",description:"Persist the document to storage and enqueue the knowledge ingestion pipeline.",action:{operation:{key:"pfo.documents.upload",version:"1.0.0"}},requiredIntegrations:["primaryStorage","primaryVectorDb"],retry:{maxAttempts:3,backoff:"exponential",delayMs:500}},{id:"review",type:"human",label:"Optional Human Classification",description:"Finance lead can categorise the document while ingestion completes."}],transitions:[{from:"store",to:"review"}]}};var _G={meta:{key:"pfo.workflow.upcoming-payments-reminder",version:"1.0.0",title:"Schedule Upcoming Payment Reminder",description:"Collects payment metadata and schedules multi-channel reminders for bills that are due soon.",domain:"finance",owners:[K.PlatformFinance],tags:["payments","reminders",R.Automation],stability:A.Beta},definition:{entryStepId:"collect",steps:[{id:"collect",type:"human",label:"Review Upcoming Bill",description:"Confirm amount, due date, and preferred delivery channels before scheduling reminder."},{id:"schedule",type:"automation",label:"Schedule Reminder",action:{operation:{key:"pfo.reminders.schedule-payment",version:"1.0.0"}},requiredIntegrations:["emailOutbound","smsNotifications","calendarScheduling"],retry:{maxAttempts:2,backoff:"linear",delayMs:1000}}],transitions:[{from:"collect",to:"schedule",condition:"output?.confirmed === true",label:"Reminder confirmed"}]}};var CG={meta:{key:"pfo.workflow.generate-financial-summary",version:"1.0.0",title:"Generate Financial Summary",description:"Retrieves the latest financial signals, generates an AI summary, and optionally distributes it by voice or email.",domain:"finance",owners:[K.PlatformFinance],tags:["summary","ai",R.Automation],stability:A.Beta},definition:{entryStepId:"summarise",steps:[{id:"summarise",type:"automation",label:"Generate Summary",description:"Run retrieval augmented generation over the knowledge base to produce a household summary.",action:{operation:{key:"pfo.summary.generate",version:"1.0.0"}},requiredIntegrations:["primaryLLM","primaryVectorDb"],retry:{maxAttempts:3,backoff:"exponential",delayMs:750}},{id:"distribute",type:"automation",label:"Distribute Summary",description:"Send the generated summary via email and optionally synthesise a voice note.",action:{operation:{key:"pfo.summary.dispatch",version:"1.0.0"}},requiredIntegrations:["emailOutbound"],retry:{maxAttempts:2,backoff:"linear",delayMs:500}}],transitions:[{from:"summarise",to:"distribute"}]}};var TG={meta:{key:"pfo.workflow.ingest-email-threads",version:"1.0.0",title:"Ingest Email Threads",description:"Synchronises Gmail threads tagged with finance labels and indexes them into operational knowledge spaces.",domain:"communications",owners:[K.PlatformMessaging],tags:["gmail","knowledge",R.Automation],stability:A.Experimental},definition:{entryStepId:"sync",steps:[{id:"sync",type:"automation",label:"Sync Gmail Threads",description:"Fetches Gmail threads and transforms them into knowledge fragments before vector indexing.",action:{operation:{key:"pfo.email.sync-threads",version:"1.0.0"}},requiredIntegrations:["emailInbound","primaryVectorDb"],retry:{maxAttempts:3,backoff:"exponential",delayMs:1000}},{id:"triage",type:"human",label:"Triage Exceptions",description:"Operators can resolve sync failures or tag important threads for follow-up."}],transitions:[{from:"sync",to:"triage",condition:"output?.syncedThreads === 0",label:"No new threads"}]}};var _9={key:"openbanking.accounts.read",version:"1.0.0"},xG={meta:{key:"pfo.workflow.sync-openbanking-accounts",version:"1.0.0",title:"Synchronise Open Banking Accounts",description:"Validates Powens connectivity and synchronises bank account metadata into the canonical ledger.",domain:"finance",owners:[K.PlatformFinance],tags:["open-banking","powens",R.Automation],stability:A.Experimental},definition:{entryStepId:"sync-accounts",steps:[{id:"sync-accounts",type:"automation",label:"Sync Accounts",description:"Refresh linked bank accounts via Powens and upsert canonical BankAccount records.",action:{operation:{key:"openbanking.accounts.sync",version:"1.0.0"}},requiredIntegrations:["primaryOpenBanking"],requiredCapabilities:[_9],retry:{maxAttempts:3,backoff:"exponential",delayMs:1000}},{id:"fetch-accounts",type:"automation",label:"Fetch Accounts",description:"Retrieve the latest canonical account snapshot for downstream consumers.",action:{operation:{key:"openbanking.accounts.list",version:"1.0.0"}},requiredIntegrations:["primaryOpenBanking"],requiredCapabilities:[_9],retry:{maxAttempts:2,backoff:"linear",delayMs:750}}],transitions:[{from:"sync-accounts",to:"fetch-accounts"}]}};var E9={key:"openbanking.transactions.read",version:"1.0.0"},uG={meta:{key:"pfo.workflow.sync-openbanking-transactions",version:"1.0.0",title:"Synchronise Open Banking Transactions",description:"Fetches recent transactions from Powens for each linked account and stores them in the canonical ledger.",domain:"finance",owners:[K.PlatformFinance],tags:["open-banking","powens",R.Automation],stability:A.Experimental},definition:{entryStepId:"sync-transactions",steps:[{id:"sync-transactions",type:"automation",label:"Sync Transactions",description:"Call the Powens provider to pull incremental transactions for active accounts.",action:{operation:{key:"openbanking.transactions.sync",version:"1.0.0"}},requiredIntegrations:["primaryOpenBanking"],requiredCapabilities:[E9],retry:{maxAttempts:4,backoff:"exponential",delayMs:1500}},{id:"list-transactions",type:"automation",label:"List Transactions",description:"Retrieve the canonical transaction list for reporting and downstream analytics.",action:{operation:{key:"openbanking.transactions.list",version:"1.0.0"}},requiredIntegrations:["primaryOpenBanking"],requiredCapabilities:[E9],retry:{maxAttempts:2,backoff:"linear",delayMs:1000}}],transitions:[{from:"sync-transactions",to:"list-transactions"}]}};var k9={key:"openbanking.balances.read",version:"1.0.0"},fG={meta:{key:"pfo.workflow.refresh-openbanking-balances",version:"1.0.0",title:"Refresh Open Banking Balances",description:"Refreshes balances for synced accounts to surface the latest cash positions in dashboards.",domain:"finance",owners:[K.PlatformFinance],tags:["open-banking","powens",R.Automation],stability:A.Experimental},definition:{entryStepId:"refresh-balances",steps:[{id:"refresh-balances",type:"automation",label:"Refresh Balances",description:"Trigger the Powens provider to obtain current and available balances.",action:{operation:{key:"openbanking.balances.refresh",version:"1.0.0"}},requiredIntegrations:["primaryOpenBanking"],requiredCapabilities:[k9],retry:{maxAttempts:3,backoff:"exponential",delayMs:1000}},{id:"fetch-balances",type:"automation",label:"Fetch Balances",description:"Load the canonical balance snapshots for downstream workflows and dashboards.",action:{operation:{key:"openbanking.balances.get",version:"1.0.0"}},requiredIntegrations:["primaryOpenBanking"],requiredCapabilities:[k9],retry:{maxAttempts:2,backoff:"linear",delayMs:750}}],transitions:[{from:"refresh-balances",to:"fetch-balances"}]}};var LW=[{key:"openbanking.accounts.read",version:"1.0.0"},{key:"openbanking.transactions.read",version:"1.0.0"},{key:"openbanking.balances.read",version:"1.0.0"}],rG={meta:{key:"pfo.workflow.generate-openbanking-overview",version:"1.0.0",title:"Generate Open Banking Overview",description:"Produces a derived financial overview and stores it in the operational knowledge space.",domain:"finance",owners:[K.PlatformFinance],tags:["open-banking","summary",R.Automation],stability:A.Experimental},definition:{entryStepId:"generate-overview",steps:[{id:"generate-overview",type:"automation",label:"Generate Overview",description:"Aggregate balances, cashflow, and category breakdowns into a knowledge entry.",action:{operation:{key:"pfo.openbanking.generate-overview",version:"1.0.0"}},requiredIntegrations:["primaryOpenBanking"],requiredCapabilities:LW,retry:{maxAttempts:3,backoff:"exponential",delayMs:1500}}],transitions:[]}};var $1={tenantId:{type:"string",required:!0,description:"Tenant identifier for multi-tenant isolation."},appId:{type:"string",required:!0,description:"Application identifier associated with the event."},blueprint:{type:"string",required:!0,description:"Blueprint name@version emitting the telemetry."},configVersion:{type:"number",required:!0,description:"Resolved app config version when the event was generated."},slotId:{type:"string",required:!0,description:"Integration slot identifier (e.g., primaryOpenBanking)."},connectionId:{type:"string",required:!0,description:"Integration connection ID used for the sync."}};function C9(J){return{type:"string",description:J,pii:!1}}var qU={meta:{key:"pfo.telemetry",version:"1.0.0",title:"Pocket Family Office Telemetry",description:"Operational telemetry for Pocket Family Office workflows, including Powens open banking syncs.",domain:"finance",owners:[K.PlatformFinance],tags:["open-banking",R.Automation],stability:A.Experimental},config:{defaultRetentionDays:180,defaultSamplingRate:1},events:[{key:u.accountsSynced,version:"1.0.0",semantics:{what:"Open banking account synchronisation completed.",why:"Refresh canonical account metadata for reporting and workflows."},privacy:"internal",properties:{...$1,syncedCount:{type:"number",description:"Number of accounts synced successfully."},failedCount:{type:"number",description:"Number of accounts that failed to sync."},durationMs:{type:"number",description:"Duration of the sync job in milliseconds."}}},{key:u.transactionsSynced,version:"1.0.0",semantics:{what:"Open banking transaction synchronisation completed.",why:"Keep canonical transaction ledger in sync for analytics."},privacy:"internal",properties:{...$1,accountId:{type:"string",description:"Bank account identifier used during the sync.",pii:!1},syncedCount:{type:"number",description:"Number of transactions synced successfully."},failedCount:{type:"number",description:"Number of transactions that failed to sync."},from:{type:"timestamp",description:"Start timestamp for the sync window."},to:{type:"timestamp",description:"End timestamp for the sync window."}}},{key:u.balancesRefreshed,version:"1.0.0",semantics:{what:"Open banking balances refreshed.",why:"Provide accurate cash position for dashboards and alerts."},privacy:"internal",properties:{...$1,accountId:C9("Bank account identifier."),balanceTypes:{type:"json",description:"Balance types included in the refresh."},refreshedAt:{type:"timestamp",description:"Timestamp when balances were refreshed."}}},{key:u.overviewGenerated,version:"1.0.0",semantics:{what:"Derived financial overview generated.",why:"Persist cashflow and category summaries into knowledge space."},privacy:"internal",properties:{...$1,knowledgeEntryId:C9("Identifier of the knowledge document containing the overview."),period:{type:"string",description:"Aggregation period used (week, month, quarter)."},periodStart:{type:"timestamp",description:"Start timestamp for the aggregation window."},periodEnd:{type:"timestamp",description:"End timestamp for the aggregation window."}},tags:["knowledge","analytics"]}]},YU=Z4;var QU={meta:{key:"pocket-family-office",version:"1.0.0",title:"Pocket Family Office",description:"Personal finance automation with document ingestion, open banking, and AI summaries",domain:"finance",owners:["@platform.finance"],tags:["finance","open-banking","documents","automation","family-office"],stability:"experimental"},operations:[{key:"pfo.documents.upload",version:"1.0.0"}],events:[],presentations:[],opToPresentation:[],presentationsTargets:[],capabilities:{provides:[{key:"pocket-family-office",version:"1.0.0"}],requires:[{key:"identity",version:"1.0.0"},{key:"openbanking",version:"1.0.0"}]}};export{wW as uploadDocumentContract,_G as upcomingPaymentsReminderWorkflow,uG as syncOpenBankingTransactionsWorkflow,xG as syncOpenBankingAccountsWorkflow,AW as syncEmailThreadsContract,DW as schedulePaymentReminderContract,kW as registerPocketFamilyOfficeBlueprint,fG as refreshOpenBankingBalancesWorkflow,ZG as processUploadedDocumentWorkflow,SW as pocketFamilyOfficeTenantSample,qU as pocketFamilyOfficeTelemetry,vW as pocketFamilyOfficeKnowledgeSources,KG as pocketFamilyOfficeContracts,T9 as pocketFamilyOfficeConnections,j9 as pocketFamilyOfficeBlueprint,TG as ingestEmailThreadsWorkflow,TW as getPocketFamilyOfficeConnection,rG as generateOpenBankingOverviewWorkflow,ZW as generateOpenBankingOverviewContract,CG as generateFinancialSummaryWorkflow,FW as generateFinancialSummaryContract,KW as dispatchFinancialSummaryContract,QU as PocketFamilyOfficeFeature,YU as OPENBANKING_SENSITIVE_FIELDS};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-openbanking-overview.d.ts","sourceRoot":"","sources":["../../src/workflows/generate-openbanking-overview.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AAa9E,eAAO,MAAM,mCAAmC,EAAE,
|
|
1
|
+
{"version":3,"file":"generate-openbanking-overview.d.ts","sourceRoot":"","sources":["../../src/workflows/generate-openbanking-overview.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AAa9E,eAAO,MAAM,mCAAmC,EAAE,YAsCjD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refresh-openbanking-balances.d.ts","sourceRoot":"","sources":["../../src/workflows/refresh-openbanking-balances.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"refresh-openbanking-balances.d.ts","sourceRoot":"","sources":["../../src/workflows/refresh-openbanking-balances.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AAY9E,eAAO,MAAM,kCAAkC,EAAE,YAoDhD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync-openbanking-accounts.d.ts","sourceRoot":"","sources":["../../src/workflows/sync-openbanking-accounts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"sync-openbanking-accounts.d.ts","sourceRoot":"","sources":["../../src/workflows/sync-openbanking-accounts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AAY9E,eAAO,MAAM,+BAA+B,EAAE,YAoD7C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upcoming-payments-reminder.d.ts","sourceRoot":"","sources":["../../src/workflows/upcoming-payments-reminder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AAO9E,eAAO,MAAM,gCAAgC,EAAE,
|
|
1
|
+
{"version":3,"file":"upcoming-payments-reminder.d.ts","sourceRoot":"","sources":["../../src/workflows/upcoming-payments-reminder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AAO9E,eAAO,MAAM,gCAAgC,EAAE,YAqD9C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contractspec/example.pocket-family-office",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.45.0",
|
|
4
4
|
"description": "Pocket Family Office example - personal finance automation with open banking",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"contractspec",
|
|
7
|
+
"example",
|
|
8
|
+
"fintech",
|
|
9
|
+
"openbanking",
|
|
10
|
+
"family-office",
|
|
11
|
+
"typescript"
|
|
12
|
+
],
|
|
5
13
|
"main": "./dist/index.js",
|
|
6
14
|
"types": "./dist/index.d.ts",
|
|
7
15
|
"type": "module",
|
|
@@ -18,14 +26,14 @@
|
|
|
18
26
|
"lint:check": "eslint src"
|
|
19
27
|
},
|
|
20
28
|
"dependencies": {
|
|
21
|
-
"@contractspec/lib.knowledge": "1.
|
|
22
|
-
"@contractspec/lib.schema": "1.
|
|
23
|
-
"@contractspec/lib.contracts": "1.
|
|
29
|
+
"@contractspec/lib.knowledge": "1.45.0",
|
|
30
|
+
"@contractspec/lib.schema": "1.45.0",
|
|
31
|
+
"@contractspec/lib.contracts": "1.45.0",
|
|
24
32
|
"zod": "^4.1.13"
|
|
25
33
|
},
|
|
26
34
|
"devDependencies": {
|
|
27
|
-
"@contractspec/tool.typescript": "1.
|
|
28
|
-
"@contractspec/tool.tsdown": "1.
|
|
35
|
+
"@contractspec/tool.typescript": "1.45.0",
|
|
36
|
+
"@contractspec/tool.tsdown": "1.45.0",
|
|
29
37
|
"typescript": "^5.9.3"
|
|
30
38
|
},
|
|
31
39
|
"exports": {
|