scordi-extension 1.14.2 → 1.14.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-BAWpTgrx.js","assets/types-oHwqLVs0.js"])))=>i.map(i=>d[i]);
2
+ import{i as p,a as g}from"./internal-messages-Drf0Gb9U.js";const m="modulepreload",y=function(a){return"/"+a},w={},h=function(e,r,n){let t=Promise.resolve();if(r&&r.length>0){let E=function(s){return Promise.all(s.map(l=>Promise.resolve(l).then(u=>({status:"fulfilled",value:u}),u=>({status:"rejected",reason:u}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),o=c?.nonce||c?.getAttribute("nonce");t=E(r.map(s=>{if(s=y(s),s in w)return;w[s]=!0;const l=s.endsWith(".css"),u=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${s}"]${u}`))return;const i=document.createElement("link");if(i.rel=l?"stylesheet":m,l||(i.as="script"),i.crossOrigin="",i.href=s,o&&i.setAttribute("nonce",o),document.head.appendChild(i),l)return new Promise((f,k)=>{i.addEventListener("load",f),i.addEventListener("error",()=>k(new Error(`Unable to preload CSS for ${s}`)))})}))}function d(c){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=c,window.dispatchEvent(o),!o.defaultPrevented)throw c}return t.then(c=>{for(const o of c||[])o.status==="rejected"&&d(o.reason);return e().catch(d)})};class L{async sendToBackground(e){return new Promise((r,n)=>{chrome.runtime.sendMessage(e,t=>{chrome.runtime.lastError?n(new Error(chrome.runtime.lastError.message||"Communication error")):p(t)?n(new Error(t.message)):r(t)})})}async executeBlock(e){const{BlockHandler:r}=await h(async()=>{const{BlockHandler:t}=await import("./index-BAWpTgrx.js");return{BlockHandler:t}},__vite__mapDeps([0,1])),{synchronizedLock:n}=await h(async()=>{const{synchronizedLock:t}=await import("./index-r5QRyJ4m.js");return{synchronizedLock:t}},[]);await n.getLock();try{return await r.executeBlock(e)}finally{n.releaseLock()}}async handleRuntimeMessage(e){if(e?.isBlock&&e?.type==="EXECUTE_BLOCK")try{return await this.executeBlock(e.data)}catch(r){return{$isError:!0,message:r instanceof Error?r.message:"Unknown error",data:{}}}throw new Error("Invalid message type")}sendToWebpage(e){window.postMessage(e,"*")}createErrorResponse(e,r){return{type:"8G_COLLECT_RESPONSE",requestId:e,success:!1,result:{error:r instanceof Error?r.message:"Unknown error",timestamp:new Date().toISOString()}}}createSuccessResponse(e,r){return{type:"8G_COLLECT_RESPONSE",requestId:e,success:!0,result:r}}}class _{constructor(e){this.kernel=e}initializeMessageListener(){chrome.runtime.onMessage.addListener((e,r,n)=>g(e)?(this.kernel.handleRuntimeMessage(e).then(t=>n(t)).catch(t=>n(this.kernel.createErrorResponse("",t))),!0):!1)}}class C{constructor(e){this.kernel=e}initializeMessageListener(){window.addEventListener("message",this.handleWindowMessage.bind(this))}async handleWindowMessage(e){if(e.source!==window)return;const r=e.data;switch(r.type){case"8G_EXTENSION_CHECK":this.handleExtensionCheck();break;case"8G_COLLECT_WORKFLOW":await this.handleCollectWorkflow(r);break}}handleExtensionCheck(){const e={type:"8G_EXTENSION_RESPONSE",installed:!0,version:"1.0.0"};this.kernel.sendToWebpage(e)}async handleCollectWorkflow(e){try{this.validateCollectWorkflowMessage(e);const r={type:"COLLECT_WORKFLOW_NEW_TAB",data:{targetUrl:e.targetUrl,workflow:e.workflow,closeTabAfterCollection:e.closeTabAfterCollection!==!1,activateTab:e.activateTab===!0}};try{const n=await this.kernel.sendToBackground(r),t=this.kernel.createSuccessResponse(e.requestId,n);this.kernel.sendToWebpage(t)}catch(n){const t=this.kernel.createErrorResponse(e.requestId,n);this.kernel.sendToWebpage(t)}}catch(r){const n=this.kernel.createErrorResponse(e.requestId,r);this.kernel.sendToWebpage(n)}}validateCollectWorkflowMessage(e){if(!e.targetUrl)throw new Error("Target URL is required");if(!e.workflow)throw new Error("Workflow is required");if(!e.workflow.start||!Array.isArray(e.workflow.steps))throw new Error("Workflow must have start and steps")}}(()=>{if(window.is8gExtensionInjected)return;window.is8gExtensionInjected=!0,console.log("[8G Extension] Content script initialized on:",window.location.href);const a=new L,e=new _(a),r=new C(a);e.initializeMessageListener(),r.initializeMessageListener()})();
@@ -0,0 +1,13 @@
1
+ (function () {
2
+ 'use strict';
3
+
4
+ const injectTime = performance.now();
5
+ (async () => {
6
+ const { onExecute } = await import(
7
+ /* @vite-ignore */
8
+ chrome.runtime.getURL("assets/main.tsx-CiPjkJNz.js")
9
+ );
10
+ onExecute?.({ perf: { injectTime, loadTime: performance.now() - injectTime } });
11
+ })().catch(console.error);
12
+
13
+ })();
@@ -0,0 +1 @@
1
+ var tt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function st(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var v;(function(s){s.assertEqual=r=>{};function e(r){}s.assertIs=e;function t(r){throw new Error}s.assertNever=t,s.arrayToEnum=r=>{const n={};for(const i of r)n[i]=i;return n},s.getValidEnumValues=r=>{const n=s.objectKeys(r).filter(o=>typeof r[r[o]]!="number"),i={};for(const o of n)i[o]=r[o];return s.objectValues(i)},s.objectValues=r=>s.objectKeys(r).map(function(n){return r[n]}),s.objectKeys=typeof Object.keys=="function"?r=>Object.keys(r):r=>{const n=[];for(const i in r)Object.prototype.hasOwnProperty.call(r,i)&&n.push(i);return n},s.find=(r,n)=>{for(const i of r)if(n(i))return i},s.isInteger=typeof Number.isInteger=="function"?r=>Number.isInteger(r):r=>typeof r=="number"&&Number.isFinite(r)&&Math.floor(r)===r;function a(r,n=" | "){return r.map(i=>typeof i=="string"?`'${i}'`:i).join(n)}s.joinValues=a,s.jsonStringifyReplacer=(r,n)=>typeof n=="bigint"?n.toString():n})(v||(v={}));var ve;(function(s){s.mergeShapes=(e,t)=>({...e,...t})})(ve||(ve={}));const u=v.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),j=s=>{switch(typeof s){case"undefined":return u.undefined;case"string":return u.string;case"number":return Number.isNaN(s)?u.nan:u.number;case"boolean":return u.boolean;case"function":return u.function;case"bigint":return u.bigint;case"symbol":return u.symbol;case"object":return Array.isArray(s)?u.array:s===null?u.null:s.then&&typeof s.then=="function"&&s.catch&&typeof s.catch=="function"?u.promise:typeof Map<"u"&&s instanceof Map?u.map:typeof Set<"u"&&s instanceof Set?u.set:typeof Date<"u"&&s instanceof Date?u.date:u.object;default:return u.unknown}},c=v.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),at=s=>JSON.stringify(s,null,2).replace(/"([^"]+)":/g,"$1:");class T extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=a=>{this.issues=[...this.issues,a]},this.addIssues=(a=[])=>{this.issues=[...this.issues,...a]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(n){return n.message},a={_errors:[]},r=n=>{for(const i of n.issues)if(i.code==="invalid_union")i.unionErrors.map(r);else if(i.code==="invalid_return_type")r(i.returnTypeError);else if(i.code==="invalid_arguments")r(i.argumentsError);else if(i.path.length===0)a._errors.push(t(i));else{let o=a,f=0;for(;f<i.path.length;){const l=i.path[f];f===i.path.length-1?(o[l]=o[l]||{_errors:[]},o[l]._errors.push(t(i))):o[l]=o[l]||{_errors:[]},o=o[l],f++}}};return r(this),a}static assert(e){if(!(e instanceof T))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,v.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},a=[];for(const r of this.issues)if(r.path.length>0){const n=r.path[0];t[n]=t[n]||[],t[n].push(e(r))}else a.push(e(r));return{formErrors:a,fieldErrors:t}}get formErrors(){return this.flatten()}}T.create=s=>new T(s);const W=(s,e)=>{let t;switch(s.code){case c.invalid_type:s.received===u.undefined?t="Required":t=`Expected ${s.expected}, received ${s.received}`;break;case c.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(s.expected,v.jsonStringifyReplacer)}`;break;case c.unrecognized_keys:t=`Unrecognized key(s) in object: ${v.joinValues(s.keys,", ")}`;break;case c.invalid_union:t="Invalid input";break;case c.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${v.joinValues(s.options)}`;break;case c.invalid_enum_value:t=`Invalid enum value. Expected ${v.joinValues(s.options)}, received '${s.received}'`;break;case c.invalid_arguments:t="Invalid function arguments";break;case c.invalid_return_type:t="Invalid function return type";break;case c.invalid_date:t="Invalid date";break;case c.invalid_string:typeof s.validation=="object"?"includes"in s.validation?(t=`Invalid input: must include "${s.validation.includes}"`,typeof s.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${s.validation.position}`)):"startsWith"in s.validation?t=`Invalid input: must start with "${s.validation.startsWith}"`:"endsWith"in s.validation?t=`Invalid input: must end with "${s.validation.endsWith}"`:v.assertNever(s.validation):s.validation!=="regex"?t=`Invalid ${s.validation}`:t="Invalid";break;case c.too_small:s.type==="array"?t=`Array must contain ${s.exact?"exactly":s.inclusive?"at least":"more than"} ${s.minimum} element(s)`:s.type==="string"?t=`String must contain ${s.exact?"exactly":s.inclusive?"at least":"over"} ${s.minimum} character(s)`:s.type==="number"?t=`Number must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${s.minimum}`:s.type==="bigint"?t=`Number must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${s.minimum}`:s.type==="date"?t=`Date must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(s.minimum))}`:t="Invalid input";break;case c.too_big:s.type==="array"?t=`Array must contain ${s.exact?"exactly":s.inclusive?"at most":"less than"} ${s.maximum} element(s)`:s.type==="string"?t=`String must contain ${s.exact?"exactly":s.inclusive?"at most":"under"} ${s.maximum} character(s)`:s.type==="number"?t=`Number must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="bigint"?t=`BigInt must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="date"?t=`Date must be ${s.exact?"exactly":s.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(s.maximum))}`:t="Invalid input";break;case c.custom:t="Invalid input";break;case c.invalid_intersection_types:t="Intersection results could not be merged";break;case c.not_multiple_of:t=`Number must be a multiple of ${s.multipleOf}`;break;case c.not_finite:t="Number must be finite";break;default:t=e.defaultError,v.assertNever(s)}return{message:t}};let Te=W;function rt(s){Te=s}function ue(){return Te}const le=s=>{const{data:e,path:t,errorMaps:a,issueData:r}=s,n=[...t,...r.path||[]],i={...r,path:n};if(r.message!==void 0)return{...r,path:n,message:r.message};let o="";const f=a.filter(l=>!!l).slice().reverse();for(const l of f)o=l(i,{data:e,defaultError:o}).message;return{...r,path:n,message:o}},nt=[];function d(s,e){const t=ue(),a=le({issueData:e,data:s.data,path:s.path,errorMaps:[s.common.contextualErrorMap,s.schemaErrorMap,t,t===W?void 0:W].filter(r=>!!r)});s.common.issues.push(a)}class k{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const a=[];for(const r of t){if(r.status==="aborted")return p;r.status==="dirty"&&e.dirty(),a.push(r.value)}return{status:e.value,value:a}}static async mergeObjectAsync(e,t){const a=[];for(const r of t){const n=await r.key,i=await r.value;a.push({key:n,value:i})}return k.mergeObjectSync(e,a)}static mergeObjectSync(e,t){const a={};for(const r of t){const{key:n,value:i}=r;if(n.status==="aborted"||i.status==="aborted")return p;n.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),n.value!=="__proto__"&&(typeof i.value<"u"||r.alwaysSet)&&(a[n.value]=i.value)}return{status:e.value,value:a}}}const p=Object.freeze({status:"aborted"}),B=s=>({status:"dirty",value:s}),b=s=>({status:"valid",value:s}),xe=s=>s.status==="aborted",ke=s=>s.status==="dirty",L=s=>s.status==="valid",H=s=>typeof Promise<"u"&&s instanceof Promise;var h;(function(s){s.errToObj=e=>typeof e=="string"?{message:e}:e||{},s.toString=e=>typeof e=="string"?e:e?.message})(h||(h={}));class S{constructor(e,t,a,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=a,this._key=r}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const be=(s,e)=>{if(L(e))return{success:!0,data:e.value};if(!s.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new T(s.common.issues);return this._error=t,this._error}}};function y(s){if(!s)return{};const{errorMap:e,invalid_type_error:t,required_error:a,description:r}=s;if(e&&(t||a))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:r}:{errorMap:(i,o)=>{const{message:f}=s;return i.code==="invalid_enum_value"?{message:f??o.defaultError}:typeof o.data>"u"?{message:f??a??o.defaultError}:i.code!=="invalid_type"?{message:o.defaultError}:{message:f??t??o.defaultError}},description:r}}class _{get description(){return this._def.description}_getType(e){return j(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:j(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new k,ctx:{common:e.parent.common,data:e.data,parsedType:j(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(H(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const a=this.safeParse(e,t);if(a.success)return a.data;throw a.error}safeParse(e,t){const a={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:j(e)},r=this._parseSync({data:e,path:a.path,parent:a});return be(a,r)}"~validate"(e){const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:j(e)};if(!this["~standard"].async)try{const a=this._parseSync({data:e,path:[],parent:t});return L(a)?{value:a.value}:{issues:t.common.issues}}catch(a){a?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(a=>L(a)?{value:a.value}:{issues:t.common.issues})}async parseAsync(e,t){const a=await this.safeParseAsync(e,t);if(a.success)return a.data;throw a.error}async safeParseAsync(e,t){const a={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:j(e)},r=this._parse({data:e,path:a.path,parent:a}),n=await(H(r)?r:Promise.resolve(r));return be(a,n)}refine(e,t){const a=r=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(r):t;return this._refinement((r,n)=>{const i=e(r),o=()=>n.addIssue({code:c.custom,...a(r)});return typeof Promise<"u"&&i instanceof Promise?i.then(f=>f?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,t){return this._refinement((a,r)=>e(a)?!0:(r.addIssue(typeof t=="function"?t(a,r):t),!1))}_refinement(e){return new Z({schema:this,typeName:m.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return N.create(this,this._def)}nullable(){return V.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return O.create(this)}promise(){return J.create(this,this._def)}or(e){return X.create([this,e],this._def)}and(e){return K.create(this,e,this._def)}transform(e){return new Z({...y(this._def),schema:this,typeName:m.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new re({...y(this._def),innerType:this,defaultValue:t,typeName:m.ZodDefault})}brand(){return new Ae({typeName:m.ZodBranded,type:this,...y(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new ne({...y(this._def),innerType:this,catchValue:t,typeName:m.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return oe.create(this,e)}readonly(){return ie.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Ne=/^c[^\s-]{8,}$/i,Re=/^[0-9a-z]+$/,Ze=/^[0-9A-HJKMNP-TV-Z]{26}$/i,je=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Ee=/^[a-z0-9_-]{21}$/i,Ie=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,$e=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Me=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Ve="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let de;const Pe=/^(?:(?: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])$/,ze=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,Le=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,De=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Ue=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Be=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Ce="((\\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])))",Fe=new RegExp(`^${Ce}$`);function Oe(s){let e="[0-5]\\d";s.precision?e=`${e}\\.\\d{${s.precision}}`:s.precision==null&&(e=`${e}(\\.\\d+)?`);const t=s.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function We(s){return new RegExp(`^${Oe(s)}$`)}function qe(s){let e=`${Ce}T${Oe(s)}`;const t=[];return t.push(s.local?"Z?":"Z"),s.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function Je(s,e){return!!((e==="v4"||!e)&&Pe.test(s)||(e==="v6"||!e)&&Le.test(s))}function He(s,e){if(!Ie.test(s))return!1;try{const[t]=s.split(".");if(!t)return!1;const a=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),r=JSON.parse(atob(a));return!(typeof r!="object"||r===null||"typ"in r&&r?.typ!=="JWT"||!r.alg||e&&r.alg!==e)}catch{return!1}}function Ye(s,e){return!!((e==="v4"||!e)&&ze.test(s)||(e==="v6"||!e)&&De.test(s))}class C extends _{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==u.string){const n=this._getOrReturnCtx(e);return d(n,{code:c.invalid_type,expected:u.string,received:n.parsedType}),p}const a=new k;let r;for(const n of this._def.checks)if(n.kind==="min")e.data.length<n.value&&(r=this._getOrReturnCtx(e,r),d(r,{code:c.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),a.dirty());else if(n.kind==="max")e.data.length>n.value&&(r=this._getOrReturnCtx(e,r),d(r,{code:c.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),a.dirty());else if(n.kind==="length"){const i=e.data.length>n.value,o=e.data.length<n.value;(i||o)&&(r=this._getOrReturnCtx(e,r),i?d(r,{code:c.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}):o&&d(r,{code:c.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}),a.dirty())}else if(n.kind==="email")Me.test(e.data)||(r=this._getOrReturnCtx(e,r),d(r,{validation:"email",code:c.invalid_string,message:n.message}),a.dirty());else if(n.kind==="emoji")de||(de=new RegExp(Ve,"u")),de.test(e.data)||(r=this._getOrReturnCtx(e,r),d(r,{validation:"emoji",code:c.invalid_string,message:n.message}),a.dirty());else if(n.kind==="uuid")je.test(e.data)||(r=this._getOrReturnCtx(e,r),d(r,{validation:"uuid",code:c.invalid_string,message:n.message}),a.dirty());else if(n.kind==="nanoid")Ee.test(e.data)||(r=this._getOrReturnCtx(e,r),d(r,{validation:"nanoid",code:c.invalid_string,message:n.message}),a.dirty());else if(n.kind==="cuid")Ne.test(e.data)||(r=this._getOrReturnCtx(e,r),d(r,{validation:"cuid",code:c.invalid_string,message:n.message}),a.dirty());else if(n.kind==="cuid2")Re.test(e.data)||(r=this._getOrReturnCtx(e,r),d(r,{validation:"cuid2",code:c.invalid_string,message:n.message}),a.dirty());else if(n.kind==="ulid")Ze.test(e.data)||(r=this._getOrReturnCtx(e,r),d(r,{validation:"ulid",code:c.invalid_string,message:n.message}),a.dirty());else if(n.kind==="url")try{new URL(e.data)}catch{r=this._getOrReturnCtx(e,r),d(r,{validation:"url",code:c.invalid_string,message:n.message}),a.dirty()}else n.kind==="regex"?(n.regex.lastIndex=0,n.regex.test(e.data)||(r=this._getOrReturnCtx(e,r),d(r,{validation:"regex",code:c.invalid_string,message:n.message}),a.dirty())):n.kind==="trim"?e.data=e.data.trim():n.kind==="includes"?e.data.includes(n.value,n.position)||(r=this._getOrReturnCtx(e,r),d(r,{code:c.invalid_string,validation:{includes:n.value,position:n.position},message:n.message}),a.dirty()):n.kind==="toLowerCase"?e.data=e.data.toLowerCase():n.kind==="toUpperCase"?e.data=e.data.toUpperCase():n.kind==="startsWith"?e.data.startsWith(n.value)||(r=this._getOrReturnCtx(e,r),d(r,{code:c.invalid_string,validation:{startsWith:n.value},message:n.message}),a.dirty()):n.kind==="endsWith"?e.data.endsWith(n.value)||(r=this._getOrReturnCtx(e,r),d(r,{code:c.invalid_string,validation:{endsWith:n.value},message:n.message}),a.dirty()):n.kind==="datetime"?qe(n).test(e.data)||(r=this._getOrReturnCtx(e,r),d(r,{code:c.invalid_string,validation:"datetime",message:n.message}),a.dirty()):n.kind==="date"?Fe.test(e.data)||(r=this._getOrReturnCtx(e,r),d(r,{code:c.invalid_string,validation:"date",message:n.message}),a.dirty()):n.kind==="time"?We(n).test(e.data)||(r=this._getOrReturnCtx(e,r),d(r,{code:c.invalid_string,validation:"time",message:n.message}),a.dirty()):n.kind==="duration"?$e.test(e.data)||(r=this._getOrReturnCtx(e,r),d(r,{validation:"duration",code:c.invalid_string,message:n.message}),a.dirty()):n.kind==="ip"?Je(e.data,n.version)||(r=this._getOrReturnCtx(e,r),d(r,{validation:"ip",code:c.invalid_string,message:n.message}),a.dirty()):n.kind==="jwt"?He(e.data,n.alg)||(r=this._getOrReturnCtx(e,r),d(r,{validation:"jwt",code:c.invalid_string,message:n.message}),a.dirty()):n.kind==="cidr"?Ye(e.data,n.version)||(r=this._getOrReturnCtx(e,r),d(r,{validation:"cidr",code:c.invalid_string,message:n.message}),a.dirty()):n.kind==="base64"?Ue.test(e.data)||(r=this._getOrReturnCtx(e,r),d(r,{validation:"base64",code:c.invalid_string,message:n.message}),a.dirty()):n.kind==="base64url"?Be.test(e.data)||(r=this._getOrReturnCtx(e,r),d(r,{validation:"base64url",code:c.invalid_string,message:n.message}),a.dirty()):v.assertNever(n);return{status:a.value,value:e.data}}_regex(e,t,a){return this.refinement(r=>e.test(r),{validation:t,code:c.invalid_string,...h.errToObj(a)})}_addCheck(e){return new C({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...h.errToObj(e)})}url(e){return this._addCheck({kind:"url",...h.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...h.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...h.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...h.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...h.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...h.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...h.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...h.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...h.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...h.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...h.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...h.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...h.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...h.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...h.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...h.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...h.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...h.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...h.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...h.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...h.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...h.errToObj(t)})}nonempty(e){return this.min(1,h.errToObj(e))}trim(){return new C({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new C({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new C({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}C.create=s=>new C({checks:[],typeName:m.ZodString,coerce:s?.coerce??!1,...y(s)});function Ge(s,e){const t=(s.toString().split(".")[1]||"").length,a=(e.toString().split(".")[1]||"").length,r=t>a?t:a,n=Number.parseInt(s.toFixed(r).replace(".","")),i=Number.parseInt(e.toFixed(r).replace(".",""));return n%i/10**r}class I extends _{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==u.number){const n=this._getOrReturnCtx(e);return d(n,{code:c.invalid_type,expected:u.number,received:n.parsedType}),p}let a;const r=new k;for(const n of this._def.checks)n.kind==="int"?v.isInteger(e.data)||(a=this._getOrReturnCtx(e,a),d(a,{code:c.invalid_type,expected:"integer",received:"float",message:n.message}),r.dirty()):n.kind==="min"?(n.inclusive?e.data<n.value:e.data<=n.value)&&(a=this._getOrReturnCtx(e,a),d(a,{code:c.too_small,minimum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),r.dirty()):n.kind==="max"?(n.inclusive?e.data>n.value:e.data>=n.value)&&(a=this._getOrReturnCtx(e,a),d(a,{code:c.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),r.dirty()):n.kind==="multipleOf"?Ge(e.data,n.value)!==0&&(a=this._getOrReturnCtx(e,a),d(a,{code:c.not_multiple_of,multipleOf:n.value,message:n.message}),r.dirty()):n.kind==="finite"?Number.isFinite(e.data)||(a=this._getOrReturnCtx(e,a),d(a,{code:c.not_finite,message:n.message}),r.dirty()):v.assertNever(n);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,a,r){return new I({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:h.toString(r)}]})}_addCheck(e){return new I({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:h.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:h.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:h.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:h.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&v.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const a of this._def.checks){if(a.kind==="finite"||a.kind==="int"||a.kind==="multipleOf")return!0;a.kind==="min"?(t===null||a.value>t)&&(t=a.value):a.kind==="max"&&(e===null||a.value<e)&&(e=a.value)}return Number.isFinite(t)&&Number.isFinite(e)}}I.create=s=>new I({checks:[],typeName:m.ZodNumber,coerce:s?.coerce||!1,...y(s)});class $ extends _{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==u.bigint)return this._getInvalidInput(e);let a;const r=new k;for(const n of this._def.checks)n.kind==="min"?(n.inclusive?e.data<n.value:e.data<=n.value)&&(a=this._getOrReturnCtx(e,a),d(a,{code:c.too_small,type:"bigint",minimum:n.value,inclusive:n.inclusive,message:n.message}),r.dirty()):n.kind==="max"?(n.inclusive?e.data>n.value:e.data>=n.value)&&(a=this._getOrReturnCtx(e,a),d(a,{code:c.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),r.dirty()):n.kind==="multipleOf"?e.data%n.value!==BigInt(0)&&(a=this._getOrReturnCtx(e,a),d(a,{code:c.not_multiple_of,multipleOf:n.value,message:n.message}),r.dirty()):v.assertNever(n);return{status:r.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return d(t,{code:c.invalid_type,expected:u.bigint,received:t.parsedType}),p}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,a,r){return new $({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:h.toString(r)}]})}_addCheck(e){return new $({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}$.create=s=>new $({checks:[],typeName:m.ZodBigInt,coerce:s?.coerce??!1,...y(s)});class Y extends _{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==u.boolean){const a=this._getOrReturnCtx(e);return d(a,{code:c.invalid_type,expected:u.boolean,received:a.parsedType}),p}return b(e.data)}}Y.create=s=>new Y({typeName:m.ZodBoolean,coerce:s?.coerce||!1,...y(s)});class D extends _{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==u.date){const n=this._getOrReturnCtx(e);return d(n,{code:c.invalid_type,expected:u.date,received:n.parsedType}),p}if(Number.isNaN(e.data.getTime())){const n=this._getOrReturnCtx(e);return d(n,{code:c.invalid_date}),p}const a=new k;let r;for(const n of this._def.checks)n.kind==="min"?e.data.getTime()<n.value&&(r=this._getOrReturnCtx(e,r),d(r,{code:c.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:"date"}),a.dirty()):n.kind==="max"?e.data.getTime()>n.value&&(r=this._getOrReturnCtx(e,r),d(r,{code:c.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),a.dirty()):v.assertNever(n);return{status:a.value,value:new Date(e.data.getTime())}}_addCheck(e){return new D({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:h.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:h.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}}D.create=s=>new D({checks:[],coerce:s?.coerce||!1,typeName:m.ZodDate,...y(s)});class fe extends _{_parse(e){if(this._getType(e)!==u.symbol){const a=this._getOrReturnCtx(e);return d(a,{code:c.invalid_type,expected:u.symbol,received:a.parsedType}),p}return b(e.data)}}fe.create=s=>new fe({typeName:m.ZodSymbol,...y(s)});class G extends _{_parse(e){if(this._getType(e)!==u.undefined){const a=this._getOrReturnCtx(e);return d(a,{code:c.invalid_type,expected:u.undefined,received:a.parsedType}),p}return b(e.data)}}G.create=s=>new G({typeName:m.ZodUndefined,...y(s)});class Q extends _{_parse(e){if(this._getType(e)!==u.null){const a=this._getOrReturnCtx(e);return d(a,{code:c.invalid_type,expected:u.null,received:a.parsedType}),p}return b(e.data)}}Q.create=s=>new Q({typeName:m.ZodNull,...y(s)});class q extends _{constructor(){super(...arguments),this._any=!0}_parse(e){return b(e.data)}}q.create=s=>new q({typeName:m.ZodAny,...y(s)});class z extends _{constructor(){super(...arguments),this._unknown=!0}_parse(e){return b(e.data)}}z.create=s=>new z({typeName:m.ZodUnknown,...y(s)});class E extends _{_parse(e){const t=this._getOrReturnCtx(e);return d(t,{code:c.invalid_type,expected:u.never,received:t.parsedType}),p}}E.create=s=>new E({typeName:m.ZodNever,...y(s)});class he extends _{_parse(e){if(this._getType(e)!==u.undefined){const a=this._getOrReturnCtx(e);return d(a,{code:c.invalid_type,expected:u.void,received:a.parsedType}),p}return b(e.data)}}he.create=s=>new he({typeName:m.ZodVoid,...y(s)});class O extends _{_parse(e){const{ctx:t,status:a}=this._processInputParams(e),r=this._def;if(t.parsedType!==u.array)return d(t,{code:c.invalid_type,expected:u.array,received:t.parsedType}),p;if(r.exactLength!==null){const i=t.data.length>r.exactLength.value,o=t.data.length<r.exactLength.value;(i||o)&&(d(t,{code:i?c.too_big:c.too_small,minimum:o?r.exactLength.value:void 0,maximum:i?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),a.dirty())}if(r.minLength!==null&&t.data.length<r.minLength.value&&(d(t,{code:c.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),a.dirty()),r.maxLength!==null&&t.data.length>r.maxLength.value&&(d(t,{code:c.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),a.dirty()),t.common.async)return Promise.all([...t.data].map((i,o)=>r.type._parseAsync(new S(t,i,t.path,o)))).then(i=>k.mergeArray(a,i));const n=[...t.data].map((i,o)=>r.type._parseSync(new S(t,i,t.path,o)));return k.mergeArray(a,n)}get element(){return this._def.type}min(e,t){return new O({...this._def,minLength:{value:e,message:h.toString(t)}})}max(e,t){return new O({...this._def,maxLength:{value:e,message:h.toString(t)}})}length(e,t){return new O({...this._def,exactLength:{value:e,message:h.toString(t)}})}nonempty(e){return this.min(1,e)}}O.create=(s,e)=>new O({type:s,minLength:null,maxLength:null,exactLength:null,typeName:m.ZodArray,...y(e)});function P(s){if(s instanceof x){const e={};for(const t in s.shape){const a=s.shape[t];e[t]=N.create(P(a))}return new x({...s._def,shape:()=>e})}else return s instanceof O?new O({...s._def,type:P(s.element)}):s instanceof N?N.create(P(s.unwrap())):s instanceof V?V.create(P(s.unwrap())):s instanceof R?R.create(s.items.map(e=>P(e))):s}class x extends _{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=v.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==u.object){const l=this._getOrReturnCtx(e);return d(l,{code:c.invalid_type,expected:u.object,received:l.parsedType}),p}const{status:a,ctx:r}=this._processInputParams(e),{shape:n,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof E&&this._def.unknownKeys==="strip"))for(const l in r.data)i.includes(l)||o.push(l);const f=[];for(const l of i){const g=n[l],w=r.data[l];f.push({key:{status:"valid",value:l},value:g._parse(new S(r,w,r.path,l)),alwaysSet:l in r.data})}if(this._def.catchall instanceof E){const l=this._def.unknownKeys;if(l==="passthrough")for(const g of o)f.push({key:{status:"valid",value:g},value:{status:"valid",value:r.data[g]}});else if(l==="strict")o.length>0&&(d(r,{code:c.unrecognized_keys,keys:o}),a.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const g of o){const w=r.data[g];f.push({key:{status:"valid",value:g},value:l._parse(new S(r,w,r.path,g)),alwaysSet:g in r.data})}}return r.common.async?Promise.resolve().then(async()=>{const l=[];for(const g of f){const w=await g.key,ge=await g.value;l.push({key:w,value:ge,alwaysSet:g.alwaysSet})}return l}).then(l=>k.mergeObjectSync(a,l)):k.mergeObjectSync(a,f)}get shape(){return this._def.shape()}strict(e){return h.errToObj,new x({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,a)=>{const r=this._def.errorMap?.(t,a).message??a.defaultError;return t.code==="unrecognized_keys"?{message:h.errToObj(e).message??r}:{message:r}}}:{}})}strip(){return new x({...this._def,unknownKeys:"strip"})}passthrough(){return new x({...this._def,unknownKeys:"passthrough"})}extend(e){return new x({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new x({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:m.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new x({...this._def,catchall:e})}pick(e){const t={};for(const a of v.objectKeys(e))e[a]&&this.shape[a]&&(t[a]=this.shape[a]);return new x({...this._def,shape:()=>t})}omit(e){const t={};for(const a of v.objectKeys(this.shape))e[a]||(t[a]=this.shape[a]);return new x({...this._def,shape:()=>t})}deepPartial(){return P(this)}partial(e){const t={};for(const a of v.objectKeys(this.shape)){const r=this.shape[a];e&&!e[a]?t[a]=r:t[a]=r.optional()}return new x({...this._def,shape:()=>t})}required(e){const t={};for(const a of v.objectKeys(this.shape))if(e&&!e[a])t[a]=this.shape[a];else{let n=this.shape[a];for(;n instanceof N;)n=n._def.innerType;t[a]=n}return new x({...this._def,shape:()=>t})}keyof(){return Se(v.objectKeys(this.shape))}}x.create=(s,e)=>new x({shape:()=>s,unknownKeys:"strip",catchall:E.create(),typeName:m.ZodObject,...y(e)});x.strictCreate=(s,e)=>new x({shape:()=>s,unknownKeys:"strict",catchall:E.create(),typeName:m.ZodObject,...y(e)});x.lazycreate=(s,e)=>new x({shape:s,unknownKeys:"strip",catchall:E.create(),typeName:m.ZodObject,...y(e)});class X extends _{_parse(e){const{ctx:t}=this._processInputParams(e),a=this._def.options;function r(n){for(const o of n)if(o.result.status==="valid")return o.result;for(const o of n)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;const i=n.map(o=>new T(o.ctx.common.issues));return d(t,{code:c.invalid_union,unionErrors:i}),p}if(t.common.async)return Promise.all(a.map(async n=>{const i={...t,common:{...t.common,issues:[]},parent:null};return{result:await n._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}})).then(r);{let n;const i=[];for(const f of a){const l={...t,common:{...t.common,issues:[]},parent:null},g=f._parseSync({data:t.data,path:t.path,parent:l});if(g.status==="valid")return g;g.status==="dirty"&&!n&&(n={result:g,ctx:l}),l.common.issues.length&&i.push(l.common.issues)}if(n)return t.common.issues.push(...n.ctx.common.issues),n.result;const o=i.map(f=>new T(f));return d(t,{code:c.invalid_union,unionErrors:o}),p}}get options(){return this._def.options}}X.create=(s,e)=>new X({options:s,typeName:m.ZodUnion,...y(e)});const A=s=>s instanceof te?A(s.schema):s instanceof Z?A(s.innerType()):s instanceof se?[s.value]:s instanceof M?s.options:s instanceof ae?v.objectValues(s.enum):s instanceof re?A(s._def.innerType):s instanceof G?[void 0]:s instanceof Q?[null]:s instanceof N?[void 0,...A(s.unwrap())]:s instanceof V?[null,...A(s.unwrap())]:s instanceof Ae||s instanceof ie?A(s.unwrap()):s instanceof ne?A(s._def.innerType):[];class _e extends _{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.object)return d(t,{code:c.invalid_type,expected:u.object,received:t.parsedType}),p;const a=this.discriminator,r=t.data[a],n=this.optionsMap.get(r);return n?t.common.async?n._parseAsync({data:t.data,path:t.path,parent:t}):n._parseSync({data:t.data,path:t.path,parent:t}):(d(t,{code:c.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[a]}),p)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,a){const r=new Map;for(const n of t){const i=A(n.shape[e]);if(!i.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const o of i){if(r.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);r.set(o,n)}}return new _e({typeName:m.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:r,...y(a)})}}function pe(s,e){const t=j(s),a=j(e);if(s===e)return{valid:!0,data:s};if(t===u.object&&a===u.object){const r=v.objectKeys(e),n=v.objectKeys(s).filter(o=>r.indexOf(o)!==-1),i={...s,...e};for(const o of n){const f=pe(s[o],e[o]);if(!f.valid)return{valid:!1};i[o]=f.data}return{valid:!0,data:i}}else if(t===u.array&&a===u.array){if(s.length!==e.length)return{valid:!1};const r=[];for(let n=0;n<s.length;n++){const i=s[n],o=e[n],f=pe(i,o);if(!f.valid)return{valid:!1};r.push(f.data)}return{valid:!0,data:r}}else return t===u.date&&a===u.date&&+s==+e?{valid:!0,data:s}:{valid:!1}}class K extends _{_parse(e){const{status:t,ctx:a}=this._processInputParams(e),r=(n,i)=>{if(xe(n)||xe(i))return p;const o=pe(n.value,i.value);return o.valid?((ke(n)||ke(i))&&t.dirty(),{status:t.value,value:o.data}):(d(a,{code:c.invalid_intersection_types}),p)};return a.common.async?Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then(([n,i])=>r(n,i)):r(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}}K.create=(s,e,t)=>new K({left:s,right:e,typeName:m.ZodIntersection,...y(t)});class R extends _{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==u.array)return d(a,{code:c.invalid_type,expected:u.array,received:a.parsedType}),p;if(a.data.length<this._def.items.length)return d(a,{code:c.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),p;!this._def.rest&&a.data.length>this._def.items.length&&(d(a,{code:c.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const n=[...a.data].map((i,o)=>{const f=this._def.items[o]||this._def.rest;return f?f._parse(new S(a,i,a.path,o)):null}).filter(i=>!!i);return a.common.async?Promise.all(n).then(i=>k.mergeArray(t,i)):k.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new R({...this._def,rest:e})}}R.create=(s,e)=>{if(!Array.isArray(s))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new R({items:s,typeName:m.ZodTuple,rest:null,...y(e)})};class ee extends _{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==u.object)return d(a,{code:c.invalid_type,expected:u.object,received:a.parsedType}),p;const r=[],n=this._def.keyType,i=this._def.valueType;for(const o in a.data)r.push({key:n._parse(new S(a,o,a.path,o)),value:i._parse(new S(a,a.data[o],a.path,o)),alwaysSet:o in a.data});return a.common.async?k.mergeObjectAsync(t,r):k.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(e,t,a){return t instanceof _?new ee({keyType:e,valueType:t,typeName:m.ZodRecord,...y(a)}):new ee({keyType:C.create(),valueType:e,typeName:m.ZodRecord,...y(t)})}}class me extends _{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==u.map)return d(a,{code:c.invalid_type,expected:u.map,received:a.parsedType}),p;const r=this._def.keyType,n=this._def.valueType,i=[...a.data.entries()].map(([o,f],l)=>({key:r._parse(new S(a,o,a.path,[l,"key"])),value:n._parse(new S(a,f,a.path,[l,"value"]))}));if(a.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const f of i){const l=await f.key,g=await f.value;if(l.status==="aborted"||g.status==="aborted")return p;(l.status==="dirty"||g.status==="dirty")&&t.dirty(),o.set(l.value,g.value)}return{status:t.value,value:o}})}else{const o=new Map;for(const f of i){const l=f.key,g=f.value;if(l.status==="aborted"||g.status==="aborted")return p;(l.status==="dirty"||g.status==="dirty")&&t.dirty(),o.set(l.value,g.value)}return{status:t.value,value:o}}}}me.create=(s,e,t)=>new me({valueType:e,keyType:s,typeName:m.ZodMap,...y(t)});class U extends _{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==u.set)return d(a,{code:c.invalid_type,expected:u.set,received:a.parsedType}),p;const r=this._def;r.minSize!==null&&a.data.size<r.minSize.value&&(d(a,{code:c.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),r.maxSize!==null&&a.data.size>r.maxSize.value&&(d(a,{code:c.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());const n=this._def.valueType;function i(f){const l=new Set;for(const g of f){if(g.status==="aborted")return p;g.status==="dirty"&&t.dirty(),l.add(g.value)}return{status:t.value,value:l}}const o=[...a.data.values()].map((f,l)=>n._parse(new S(a,f,a.path,l)));return a.common.async?Promise.all(o).then(f=>i(f)):i(o)}min(e,t){return new U({...this._def,minSize:{value:e,message:h.toString(t)}})}max(e,t){return new U({...this._def,maxSize:{value:e,message:h.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}U.create=(s,e)=>new U({valueType:s,minSize:null,maxSize:null,typeName:m.ZodSet,...y(e)});class F extends _{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.function)return d(t,{code:c.invalid_type,expected:u.function,received:t.parsedType}),p;function a(o,f){return le({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,ue(),W].filter(l=>!!l),issueData:{code:c.invalid_arguments,argumentsError:f}})}function r(o,f){return le({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,ue(),W].filter(l=>!!l),issueData:{code:c.invalid_return_type,returnTypeError:f}})}const n={errorMap:t.common.contextualErrorMap},i=t.data;if(this._def.returns instanceof J){const o=this;return b(async function(...f){const l=new T([]),g=await o._def.args.parseAsync(f,n).catch(ce=>{throw l.addIssue(a(f,ce)),l}),w=await Reflect.apply(i,this,g);return await o._def.returns._def.type.parseAsync(w,n).catch(ce=>{throw l.addIssue(r(w,ce)),l})})}else{const o=this;return b(function(...f){const l=o._def.args.safeParse(f,n);if(!l.success)throw new T([a(f,l.error)]);const g=Reflect.apply(i,this,l.data),w=o._def.returns.safeParse(g,n);if(!w.success)throw new T([r(g,w.error)]);return w.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new F({...this._def,args:R.create(e).rest(z.create())})}returns(e){return new F({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,a){return new F({args:e||R.create([]).rest(z.create()),returns:t||z.create(),typeName:m.ZodFunction,...y(a)})}}class te extends _{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}te.create=(s,e)=>new te({getter:s,typeName:m.ZodLazy,...y(e)});class se extends _{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return d(t,{received:t.data,code:c.invalid_literal,expected:this._def.value}),p}return{status:"valid",value:e.data}}get value(){return this._def.value}}se.create=(s,e)=>new se({value:s,typeName:m.ZodLiteral,...y(e)});function Se(s,e){return new M({values:s,typeName:m.ZodEnum,...y(e)})}class M extends _{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),a=this._def.values;return d(t,{expected:v.joinValues(a),received:t.parsedType,code:c.invalid_type}),p}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),a=this._def.values;return d(t,{received:t.data,code:c.invalid_enum_value,options:a}),p}return b(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return M.create(e,{...this._def,...t})}exclude(e,t=this._def){return M.create(this.options.filter(a=>!e.includes(a)),{...this._def,...t})}}M.create=Se;class ae extends _{_parse(e){const t=v.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(e);if(a.parsedType!==u.string&&a.parsedType!==u.number){const r=v.objectValues(t);return d(a,{expected:v.joinValues(r),received:a.parsedType,code:c.invalid_type}),p}if(this._cache||(this._cache=new Set(v.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const r=v.objectValues(t);return d(a,{received:a.data,code:c.invalid_enum_value,options:r}),p}return b(e.data)}get enum(){return this._def.values}}ae.create=(s,e)=>new ae({values:s,typeName:m.ZodNativeEnum,...y(e)});class J extends _{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.promise&&t.common.async===!1)return d(t,{code:c.invalid_type,expected:u.promise,received:t.parsedType}),p;const a=t.parsedType===u.promise?t.data:Promise.resolve(t.data);return b(a.then(r=>this._def.type.parseAsync(r,{path:t.path,errorMap:t.common.contextualErrorMap})))}}J.create=(s,e)=>new J({type:s,typeName:m.ZodPromise,...y(e)});class Z extends _{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===m.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:a}=this._processInputParams(e),r=this._def.effect||null,n={addIssue:i=>{d(a,i),i.fatal?t.abort():t.dirty()},get path(){return a.path}};if(n.addIssue=n.addIssue.bind(n),r.type==="preprocess"){const i=r.transform(a.data,n);if(a.common.async)return Promise.resolve(i).then(async o=>{if(t.value==="aborted")return p;const f=await this._def.schema._parseAsync({data:o,path:a.path,parent:a});return f.status==="aborted"?p:f.status==="dirty"||t.value==="dirty"?B(f.value):f});{if(t.value==="aborted")return p;const o=this._def.schema._parseSync({data:i,path:a.path,parent:a});return o.status==="aborted"?p:o.status==="dirty"||t.value==="dirty"?B(o.value):o}}if(r.type==="refinement"){const i=o=>{const f=r.refinement(o,n);if(a.common.async)return Promise.resolve(f);if(f instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(a.common.async===!1){const o=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return o.status==="aborted"?p:(o.status==="dirty"&&t.dirty(),i(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(o=>o.status==="aborted"?p:(o.status==="dirty"&&t.dirty(),i(o.value).then(()=>({status:t.value,value:o.value}))))}if(r.type==="transform")if(a.common.async===!1){const i=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!L(i))return p;const o=r.transform(i.value,n);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(i=>L(i)?Promise.resolve(r.transform(i.value,n)).then(o=>({status:t.value,value:o})):p);v.assertNever(r)}}Z.create=(s,e,t)=>new Z({schema:s,typeName:m.ZodEffects,effect:e,...y(t)});Z.createWithPreprocess=(s,e,t)=>new Z({schema:e,effect:{type:"preprocess",transform:s},typeName:m.ZodEffects,...y(t)});class N extends _{_parse(e){return this._getType(e)===u.undefined?b(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}N.create=(s,e)=>new N({innerType:s,typeName:m.ZodOptional,...y(e)});class V extends _{_parse(e){return this._getType(e)===u.null?b(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}V.create=(s,e)=>new V({innerType:s,typeName:m.ZodNullable,...y(e)});class re extends _{_parse(e){const{ctx:t}=this._processInputParams(e);let a=t.data;return t.parsedType===u.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}re.create=(s,e)=>new re({innerType:s,typeName:m.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...y(e)});class ne extends _{_parse(e){const{ctx:t}=this._processInputParams(e),a={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});return H(r)?r.then(n=>({status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new T(a.common.issues)},input:a.data})})):{status:"valid",value:r.status==="valid"?r.value:this._def.catchValue({get error(){return new T(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}ne.create=(s,e)=>new ne({innerType:s,typeName:m.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...y(e)});class ye extends _{_parse(e){if(this._getType(e)!==u.nan){const a=this._getOrReturnCtx(e);return d(a,{code:c.invalid_type,expected:u.nan,received:a.parsedType}),p}return{status:"valid",value:e.data}}}ye.create=s=>new ye({typeName:m.ZodNaN,...y(s)});const it=Symbol("zod_brand");class Ae extends _{_parse(e){const{ctx:t}=this._processInputParams(e),a=t.data;return this._def.type._parse({data:a,path:t.path,parent:t})}unwrap(){return this._def.type}}class oe extends _{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.common.async)return(async()=>{const n=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return n.status==="aborted"?p:n.status==="dirty"?(t.dirty(),B(n.value)):this._def.out._parseAsync({data:n.value,path:a.path,parent:a})})();{const r=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return r.status==="aborted"?p:r.status==="dirty"?(t.dirty(),{status:"dirty",value:r.value}):this._def.out._parseSync({data:r.value,path:a.path,parent:a})}}static create(e,t){return new oe({in:e,out:t,typeName:m.ZodPipeline})}}class ie extends _{_parse(e){const t=this._def.innerType._parse(e),a=r=>(L(r)&&(r.value=Object.freeze(r.value)),r);return H(t)?t.then(r=>a(r)):a(t)}unwrap(){return this._def.innerType}}ie.create=(s,e)=>new ie({innerType:s,typeName:m.ZodReadonly,...y(e)});function we(s,e){const t=typeof s=="function"?s(e):typeof s=="string"?{message:s}:s;return typeof t=="string"?{message:t}:t}function Qe(s,e={},t){return s?q.create().superRefine((a,r)=>{const n=s(a);if(n instanceof Promise)return n.then(i=>{if(!i){const o=we(e,a),f=o.fatal??t??!0;r.addIssue({code:"custom",...o,fatal:f})}});if(!n){const i=we(e,a),o=i.fatal??t??!0;r.addIssue({code:"custom",...i,fatal:o})}}):q.create()}const ot={object:x.lazycreate};var m;(function(s){s.ZodString="ZodString",s.ZodNumber="ZodNumber",s.ZodNaN="ZodNaN",s.ZodBigInt="ZodBigInt",s.ZodBoolean="ZodBoolean",s.ZodDate="ZodDate",s.ZodSymbol="ZodSymbol",s.ZodUndefined="ZodUndefined",s.ZodNull="ZodNull",s.ZodAny="ZodAny",s.ZodUnknown="ZodUnknown",s.ZodNever="ZodNever",s.ZodVoid="ZodVoid",s.ZodArray="ZodArray",s.ZodObject="ZodObject",s.ZodUnion="ZodUnion",s.ZodDiscriminatedUnion="ZodDiscriminatedUnion",s.ZodIntersection="ZodIntersection",s.ZodTuple="ZodTuple",s.ZodRecord="ZodRecord",s.ZodMap="ZodMap",s.ZodSet="ZodSet",s.ZodFunction="ZodFunction",s.ZodLazy="ZodLazy",s.ZodLiteral="ZodLiteral",s.ZodEnum="ZodEnum",s.ZodEffects="ZodEffects",s.ZodNativeEnum="ZodNativeEnum",s.ZodOptional="ZodOptional",s.ZodNullable="ZodNullable",s.ZodDefault="ZodDefault",s.ZodCatch="ZodCatch",s.ZodPromise="ZodPromise",s.ZodBranded="ZodBranded",s.ZodPipeline="ZodPipeline",s.ZodReadonly="ZodReadonly"})(m||(m={}));const ct=(s,e={message:`Input not instance of ${s.name}`})=>Qe(t=>t instanceof s,e),Xe=C.create,Ke=I.create,dt=ye.create,ut=$.create,et=Y.create,lt=D.create,ft=fe.create,ht=G.create,pt=Q.create,mt=q.create,yt=z.create,_t=E.create,gt=he.create,vt=O.create,xt=x.create,kt=x.strictCreate,bt=X.create,wt=_e.create,Tt=K.create,Ct=R.create,Ot=ee.create,St=me.create,At=U.create,Nt=F.create,Rt=te.create,Zt=se.create,jt=M.create,Et=ae.create,It=J.create,$t=Z.create,Mt=N.create,Vt=V.create,Pt=Z.createWithPreprocess,zt=oe.create,Lt=()=>Xe().optional(),Dt=()=>Ke().optional(),Ut=()=>et().optional(),Bt={string:(s=>C.create({...s,coerce:!0})),number:(s=>I.create({...s,coerce:!0})),boolean:(s=>Y.create({...s,coerce:!0})),bigint:(s=>$.create({...s,coerce:!0})),date:(s=>D.create({...s,coerce:!0}))},Ft=p;export{R as $,te as A,it as B,se as C,B as D,nt as E,me as F,ye as G,ae as H,p as I,E as J,Q as K,V as L,I as M,Ft as N,b as O,k as P,x as Q,N as R,u as S,oe as T,J as U,ie as V,ee as W,U as X,C as Y,m as Z,fe as _,mt as a,G as a0,X as a1,z as a2,he as a3,d as a4,ut as a5,Bt as a6,Qe as a7,lt as a8,qe as a9,zt as aA,Pt as aB,It as aC,at as aD,Ot as aE,At as aF,rt as aG,kt as aH,ft as aI,Ct as aJ,ht as aK,yt as aL,v as aM,gt as aN,tt as aO,W as aa,wt as ab,$t as ac,Nt as ad,ue as ae,j as af,ct as ag,Tt as ah,xe as ai,H as aj,ke as ak,L as al,ot as am,Rt as an,le as ao,St as ap,dt as aq,Et as ar,_t as as,pt as at,Vt as au,ve as av,Ut as aw,Dt as ax,Mt as ay,Lt as az,vt as b,et as c,_ as d,jt as e,q as f,st as g,O as h,$ as i,Y as j,Ae as k,Zt as l,ne as m,Ke as n,xt as o,D as p,re as q,_e as r,Xe as s,Z as t,bt as u,M as v,T as w,F as x,K as y,c as z};
@@ -30,10 +30,10 @@ export declare const EventClickBlockSchema: z.ZodObject<{
30
30
  mode: z.ZodEnum<["exact", "contains", "startsWith", "endsWith", "regex"]>;
31
31
  }, "strip", z.ZodTypeAny, {
32
32
  text: string | string[];
33
- mode: "exact" | "regex" | "contains" | "startsWith" | "endsWith";
33
+ mode: "exact" | "contains" | "startsWith" | "endsWith" | "regex";
34
34
  }, {
35
35
  text: string | string[];
36
- mode: "exact" | "regex" | "contains" | "startsWith" | "endsWith";
36
+ mode: "exact" | "contains" | "startsWith" | "endsWith" | "regex";
37
37
  }>>;
38
38
  }, "strip", z.ZodTypeAny, {
39
39
  name: "event-click";
@@ -46,7 +46,7 @@ export declare const EventClickBlockSchema: z.ZodObject<{
46
46
  };
47
47
  textFilter?: {
48
48
  text: string | string[];
49
- mode: "exact" | "regex" | "contains" | "startsWith" | "endsWith";
49
+ mode: "exact" | "contains" | "startsWith" | "endsWith" | "regex";
50
50
  } | undefined;
51
51
  }, {
52
52
  name: "event-click";
@@ -59,7 +59,7 @@ export declare const EventClickBlockSchema: z.ZodObject<{
59
59
  };
60
60
  textFilter?: {
61
61
  text: string | string[];
62
- mode: "exact" | "regex" | "contains" | "startsWith" | "endsWith";
62
+ mode: "exact" | "contains" | "startsWith" | "endsWith" | "regex";
63
63
  } | undefined;
64
64
  }>;
65
65
  export declare function validateEventClickBlock(data: unknown): EventClickBlock;
@@ -55,13 +55,13 @@ export declare const GetElementDataBlockSchema: z.ZodObject<{
55
55
  waitSelectorTimeout?: number | undefined;
56
56
  multiple?: boolean | undefined;
57
57
  };
58
+ regex?: string | undefined;
59
+ attributes?: string[] | undefined;
60
+ includeText?: boolean | undefined;
58
61
  includeTags?: boolean | undefined;
59
62
  useTextContent?: boolean | undefined;
60
- regex?: string | undefined;
61
63
  prefixText?: string | undefined;
62
64
  suffixText?: string | undefined;
63
- attributes?: string[] | undefined;
64
- includeText?: boolean | undefined;
65
65
  includeSelector?: boolean | undefined;
66
66
  includeXPath?: boolean | undefined;
67
67
  }, {
@@ -73,13 +73,13 @@ export declare const GetElementDataBlockSchema: z.ZodObject<{
73
73
  waitSelectorTimeout?: number | undefined;
74
74
  multiple?: boolean | undefined;
75
75
  };
76
+ regex?: string | undefined;
77
+ attributes?: string[] | undefined;
78
+ includeText?: boolean | undefined;
76
79
  includeTags?: boolean | undefined;
77
80
  useTextContent?: boolean | undefined;
78
- regex?: string | undefined;
79
81
  prefixText?: string | undefined;
80
82
  suffixText?: string | undefined;
81
- attributes?: string[] | undefined;
82
- includeText?: boolean | undefined;
83
83
  includeSelector?: boolean | undefined;
84
84
  includeXPath?: boolean | undefined;
85
85
  }>;
@@ -50,9 +50,9 @@ export declare const GetTextBlockSchema: z.ZodObject<{
50
50
  waitSelectorTimeout?: number | undefined;
51
51
  multiple?: boolean | undefined;
52
52
  };
53
+ regex?: string | undefined;
53
54
  includeTags?: boolean | undefined;
54
55
  useTextContent?: boolean | undefined;
55
- regex?: string | undefined;
56
56
  prefixText?: string | undefined;
57
57
  suffixText?: string | undefined;
58
58
  filterEmpty?: boolean | undefined;
@@ -69,9 +69,9 @@ export declare const GetTextBlockSchema: z.ZodObject<{
69
69
  waitSelectorTimeout?: number | undefined;
70
70
  multiple?: boolean | undefined;
71
71
  };
72
+ regex?: string | undefined;
72
73
  includeTags?: boolean | undefined;
73
74
  useTextContent?: boolean | undefined;
74
- regex?: string | undefined;
75
75
  prefixText?: string | undefined;
76
76
  suffixText?: string | undefined;
77
77
  filterEmpty?: boolean | undefined;
@@ -85,9 +85,9 @@ export declare const AllBlockSchemas: {
85
85
  waitSelectorTimeout?: number | undefined;
86
86
  multiple?: boolean | undefined;
87
87
  };
88
+ regex?: string | undefined;
88
89
  includeTags?: boolean | undefined;
89
90
  useTextContent?: boolean | undefined;
90
- regex?: string | undefined;
91
91
  prefixText?: string | undefined;
92
92
  suffixText?: string | undefined;
93
93
  filterEmpty?: boolean | undefined;
@@ -104,9 +104,9 @@ export declare const AllBlockSchemas: {
104
104
  waitSelectorTimeout?: number | undefined;
105
105
  multiple?: boolean | undefined;
106
106
  };
107
+ regex?: string | undefined;
107
108
  includeTags?: boolean | undefined;
108
109
  useTextContent?: boolean | undefined;
109
- regex?: string | undefined;
110
110
  prefixText?: string | undefined;
111
111
  suffixText?: string | undefined;
112
112
  filterEmpty?: boolean | undefined;
@@ -338,10 +338,10 @@ export declare const AllBlockSchemas: {
338
338
  mode: import("zod").ZodEnum<["exact", "contains", "startsWith", "endsWith", "regex"]>;
339
339
  }, "strip", import("zod").ZodTypeAny, {
340
340
  text: string | string[];
341
- mode: "exact" | "regex" | "contains" | "startsWith" | "endsWith";
341
+ mode: "exact" | "contains" | "startsWith" | "endsWith" | "regex";
342
342
  }, {
343
343
  text: string | string[];
344
- mode: "exact" | "regex" | "contains" | "startsWith" | "endsWith";
344
+ mode: "exact" | "contains" | "startsWith" | "endsWith" | "regex";
345
345
  }>>;
346
346
  }, "strip", import("zod").ZodTypeAny, {
347
347
  name: "event-click";
@@ -354,7 +354,7 @@ export declare const AllBlockSchemas: {
354
354
  };
355
355
  textFilter?: {
356
356
  text: string | string[];
357
- mode: "exact" | "regex" | "contains" | "startsWith" | "endsWith";
357
+ mode: "exact" | "contains" | "startsWith" | "endsWith" | "regex";
358
358
  } | undefined;
359
359
  }, {
360
360
  name: "event-click";
@@ -367,7 +367,7 @@ export declare const AllBlockSchemas: {
367
367
  };
368
368
  textFilter?: {
369
369
  text: string | string[];
370
- mode: "exact" | "regex" | "contains" | "startsWith" | "endsWith";
370
+ mode: "exact" | "contains" | "startsWith" | "endsWith" | "regex";
371
371
  } | undefined;
372
372
  }>;
373
373
  readonly keypress: import("zod").ZodObject<{
@@ -472,13 +472,13 @@ export declare const AllBlockSchemas: {
472
472
  waitSelectorTimeout?: number | undefined;
473
473
  multiple?: boolean | undefined;
474
474
  };
475
+ regex?: string | undefined;
476
+ attributes?: string[] | undefined;
477
+ includeText?: boolean | undefined;
475
478
  includeTags?: boolean | undefined;
476
479
  useTextContent?: boolean | undefined;
477
- regex?: string | undefined;
478
480
  prefixText?: string | undefined;
479
481
  suffixText?: string | undefined;
480
- attributes?: string[] | undefined;
481
- includeText?: boolean | undefined;
482
482
  includeSelector?: boolean | undefined;
483
483
  includeXPath?: boolean | undefined;
484
484
  }, {
@@ -490,13 +490,13 @@ export declare const AllBlockSchemas: {
490
490
  waitSelectorTimeout?: number | undefined;
491
491
  multiple?: boolean | undefined;
492
492
  };
493
+ regex?: string | undefined;
494
+ attributes?: string[] | undefined;
495
+ includeText?: boolean | undefined;
493
496
  includeTags?: boolean | undefined;
494
497
  useTextContent?: boolean | undefined;
495
- regex?: string | undefined;
496
498
  prefixText?: string | undefined;
497
499
  suffixText?: string | undefined;
498
- attributes?: string[] | undefined;
499
- includeText?: boolean | undefined;
500
500
  includeSelector?: boolean | undefined;
501
501
  includeXPath?: boolean | undefined;
502
502
  }>;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "manifest_version": 3,
3
3
  "name": "scordi-extension",
4
- "version": "1.14.1",
4
+ "version": "1.14.4",
5
5
  "icons": {
6
6
  "48": "public/logo.png"
7
7
  },
@@ -26,7 +26,7 @@
26
26
  "content_scripts": [
27
27
  {
28
28
  "js": [
29
- "src/content/main.tsx-loader.js"
29
+ "assets/main.tsx-loader-CRGmwXNh.js"
30
30
  ],
31
31
  "matches": [
32
32
  "<all_urls>"
@@ -46,8 +46,11 @@
46
46
  "<all_urls>"
47
47
  ],
48
48
  "resources": [
49
- "**/*",
50
- "*"
49
+ "assets/internal-messages-Drf0Gb9U.js",
50
+ "assets/index-BAWpTgrx.js",
51
+ "assets/index-r5QRyJ4m.js",
52
+ "assets/types-oHwqLVs0.js",
53
+ "assets/main.tsx-CiPjkJNz.js"
51
54
  ],
52
55
  "use_dynamic_url": false
53
56
  }
@@ -1,4 +1,5 @@
1
1
  export { EightGClient } from './EightGClient';
2
2
  export * from './types';
3
3
  export { EightGError } from './errors';
4
+ export type { Block, BlockResult } from '../blocks/types';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sdk/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sdk/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,YAAY,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC"}