@shopback/cli 0.1.0 → 0.2.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.
Files changed (3) hide show
  1. package/README.md +4 -0
  2. package/dist/sb.js +1 -1
  3. package/package.json +16 -1
package/README.md CHANGED
@@ -59,6 +59,10 @@ sb offer 19160 --amount 150
59
59
  sb go 19160 # opens the store; always show the returned disclosure
60
60
  ```
61
61
 
62
+ Currently available in ShopBack Australia, New Zealand, Singapore and the
63
+ United States. Any other market stops with `unsupported` (exit 6), and the
64
+ error lists the ones that work.
65
+
62
66
  The market comes from the signed-in account. `--country` (default `US`) only
63
67
  applies when signed out; a `--country` (or `SB_COUNTRY`) that disagrees with
64
68
  the signed-in account stops shopping commands with `invalid_usage`.
package/dist/sb.js CHANGED
@@ -24,7 +24,7 @@ Expecting one of '${o.join("', '")}'`);return this._lifeCycleHooks[t]?this._life
24
24
  `),this.outputHelp({error:!0}));let o=r||{},n=o.exitCode||1,i=o.code||"commander.error";this._exit(n,i,t)}_parseOptionsEnv(){this.options.forEach(t=>{if(t.envVar&&t.envVar in E.env){let r=t.attributeName();(this.getOptionValue(r)===void 0||["default","config","env"].includes(this.getOptionValueSource(r)))&&(t.required||t.optional?this.emit(`optionEnv:${t.name()}`,E.env[t.envVar]):this.emit(`optionEnv:${t.name()}`))}})}_parseOptionsImplied(){let t=new cr(this.options),r=o=>this.getOptionValue(o)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(o));this.options.filter(o=>o.implied!==void 0&&r(o.attributeName())&&t.valueFromOption(this.getOptionValue(o.attributeName()),o)).forEach(o=>{Object.keys(o.implied).filter(n=>!r(n)).forEach(n=>{this.setOptionValueWithSource(n,o.implied[n],"implied")})})}missingArgument(t){let r=`error: missing required argument '${t}'`;this.error(r,{code:"commander.missingArgument"})}optionMissingArgument(t){let r=`error: option '${t.flags}' argument missing`;this.error(r,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(t){let r=`error: required option '${t.flags}' not specified`;this.error(r,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(t,r){let o=a=>{let s=a.attributeName(),u=this.getOptionValue(s),c=this.options.find(d=>d.negate&&s===d.attributeName()),l=this.options.find(d=>!d.negate&&s===d.attributeName());return c&&(c.presetArg===void 0&&u===!1||c.presetArg!==void 0&&u===c.presetArg)?c:l||a},n=a=>{let s=o(a),u=s.attributeName();return this.getOptionValueSource(u)==="env"?`environment variable '${s.envVar}'`:`option '${s.flags}'`},i=`error: ${n(t)} cannot be used with ${n(r)}`;this.error(i,{code:"commander.conflictingOption"})}unknownOption(t){if(this._allowUnknownOption)return;let r="";if(t.startsWith("--")&&this._showSuggestionAfterError){let n=[],i=this;do{let a=i.createHelp().visibleOptions(i).filter(s=>s.long).map(s=>s.long);n=n.concat(a),i=i.parent}while(i&&!i._enablePositionalOptions);r=No(t,n)}let o=`error: unknown option '${t}'${r}`;this.error(o,{code:"commander.unknownOption"})}_excessArguments(t){if(this._allowExcessArguments)return;let r=this.registeredArguments.length,o=r===1?"":"s",n=t.length,i=this.parent?` for '${this.name()}'`:"",a=t.join(", "),s=`error: too many arguments${i}. Expected ${r} argument${o} but got ${n}: ${a}.`;this.error(s,{code:"commander.excessArguments"})}unknownCommand(){let t=this.args[0],r="";if(this._showSuggestionAfterError){let n=[];this.createHelp().visibleCommands(this).forEach(i=>{n.push(i.name()),i.alias()&&n.push(i.alias())}),r=No(t,n)}let o=`error: unknown command '${t}'${r}`;this.error(o,{code:"commander.unknownCommand"})}version(t,r,o){if(t===void 0)return this._version;this._version=t,r=r||"-V, --version",o=o||"output the version number";let n=this.createOption(r,o);return this._versionOptionName=n.attributeName(),this._registerOption(n),this.on("option:"+n.name(),()=>{this._outputConfiguration.writeOut(`${t}
25
25
  `),this._exit(0,"commander.version",t)}),this}description(t,r){return t===void 0&&r===void 0?this._description:(this._description=t,r&&(this._argsDescription=r),this)}summary(t){return t===void 0?this._summary:(this._summary=t,this)}alias(t){if(t===void 0)return this._aliases[0];let r=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(r=this.commands[this.commands.length-1]),t===r._name)throw new Error("Command alias can't be the same as its name");let o=this.parent?._findCommand(t);if(o){let n=[o.name()].concat(o.aliases()).join("|");throw new Error(`cannot add alias '${t}' to command '${this.name()}' as already have command '${n}'`)}return r._aliases.push(t),this}aliases(t){return t===void 0?this._aliases:(t.forEach(r=>this.alias(r)),this)}usage(t){if(t===void 0){if(this._usage)return this._usage;let r=this.registeredArguments.map(o=>ur(o));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?r:[]).join(" ")}return this._usage=t,this}name(t){return t===void 0?this._name:(this._name=t,this)}helpGroup(t){return t===void 0?this._helpGroupHeading??"":(this._helpGroupHeading=t,this)}commandsGroup(t){return t===void 0?this._defaultCommandGroup??"":(this._defaultCommandGroup=t,this)}optionsGroup(t){return t===void 0?this._defaultOptionGroup??"":(this._defaultOptionGroup=t,this)}_initOptionGroup(t){this._defaultOptionGroup&&!t.helpGroupHeading&&t.helpGroup(this._defaultOptionGroup)}_initCommandGroup(t){this._defaultCommandGroup&&!t.helpGroup()&&t.helpGroup(this._defaultCommandGroup)}nameFromFilename(t){return this._name=we.basename(t,we.extname(t)),this}executableDir(t){return t===void 0?this._executableDir:(this._executableDir=t,this)}helpInformation(t){let r=this.createHelp(),o=this._getOutputContext(t);r.prepareContext({error:o.error,helpWidth:o.helpWidth,outputHasColors:o.hasColors});let n=r.formatHelp(this,r);return o.hasColors?n:this._outputConfiguration.stripColor(n)}_getOutputContext(t){t=t||{};let r=!!t.error,o,n,i;return r?(o=s=>this._outputConfiguration.writeErr(s),n=this._outputConfiguration.getErrHasColors(),i=this._outputConfiguration.getErrHelpWidth()):(o=s=>this._outputConfiguration.writeOut(s),n=this._outputConfiguration.getOutHasColors(),i=this._outputConfiguration.getOutHelpWidth()),{error:r,write:s=>(n||(s=this._outputConfiguration.stripColor(s)),o(s)),hasColors:n,helpWidth:i}}outputHelp(t){let r;typeof t=="function"&&(r=t,t=void 0);let o=this._getOutputContext(t),n={error:o.error,write:o.write,command:this};this._getCommandAndAncestors().reverse().forEach(a=>a.emit("beforeAllHelp",n)),this.emit("beforeHelp",n);let i=this.helpInformation({error:o.error});if(r&&(i=r(i),typeof i!="string"&&!Buffer.isBuffer(i)))throw new Error("outputHelp callback must return a string or a Buffer");o.write(i),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",n),this._getCommandAndAncestors().forEach(a=>a.emit("afterAllHelp",n))}helpOption(t,r){return typeof t=="boolean"?(t?(this._helpOption===null&&(this._helpOption=void 0),this._defaultOptionGroup&&this._initOptionGroup(this._getHelpOption())):this._helpOption=null,this):(this._helpOption=this.createOption(t??"-h, --help",r??"display help for command"),(t||r)&&this._initOptionGroup(this._helpOption),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(t){return this._helpOption=t,this._initOptionGroup(t),this}help(t){this.outputHelp(t);let r=Number(E.exitCode??0);r===0&&t&&typeof t!="function"&&t.error&&(r=1),this._exit(r,"commander.help","(outputHelp)")}addHelpText(t,r){let o=["beforeAll","before","after","afterAll"];if(!o.includes(t))throw new Error(`Unexpected value for position to addHelpText.
26
26
  Expecting one of '${o.join("', '")}'`);let n=`${t}Help`;return this.on(n,i=>{let a;typeof r=="function"?a=r({error:i.error,command:i.command}):a=r,a&&i.write(`${a}
27
- `)}),this}_outputHelpIfRequested(t){let r=this._getHelpOption();r&&t.find(n=>r.is(n))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function Od(e){return e.map(t=>{if(!t.startsWith("--inspect"))return t;let r,o="127.0.0.1",n="9229",i;return(i=t.match(/^(--inspect(-brk)?)$/))!==null?r=i[1]:(i=t.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(r=i[1],/^\d+$/.test(i[3])?n=i[3]:o=i[3]):(i=t.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(r=i[1],o=i[3],n=i[4]),r&&n!=="0"?`${r}=${o}:${parseInt(n)+1}`:t})}function Ad(){if(E.env.NO_COLOR||E.env.FORCE_COLOR==="0"||E.env.FORCE_COLOR==="false")return!1;if(E.env.FORCE_COLOR||E.env.CLICOLOR_FORCE!==void 0)return!0}var hx=new lt;var tn={US:{code:"US",domain:"www.shopback.com",currency:"USD",timezone:"America/Los_Angeles",locale:"en-US"},SG:{code:"SG",domain:"www.shopback.sg",currency:"SGD",timezone:"Asia/Singapore",locale:"en-SG"}},Nh="US";function jh(e){return Object.hasOwn(tn,e)}function Co(e){let t=(e??Nh).toUpperCase();if(!jh(t))throw new O("unsupported",`Country "${t}" is not supported.`,{supported:Object.keys(tn)});return tn[t]}function Dd(e,t,r){return{schemaVersion:"1",command:e,ok:!0,data:t.data,warnings:t.warnings??[],next:t.next??[],meta:r}}function dt(e,t,r=[]){return{schemaVersion:"1",command:e,ok:!1,warnings:r,error:{code:t.code,message:t.message,retryable:t.retryable,...t.details?{details:t.details}:{}},next:t.next}}function Fe(e,t){t.stdout(`${JSON.stringify(e,null,2)}
27
+ `)}),this}_outputHelpIfRequested(t){let r=this._getHelpOption();r&&t.find(n=>r.is(n))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function Od(e){return e.map(t=>{if(!t.startsWith("--inspect"))return t;let r,o="127.0.0.1",n="9229",i;return(i=t.match(/^(--inspect(-brk)?)$/))!==null?r=i[1]:(i=t.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(r=i[1],/^\d+$/.test(i[3])?n=i[3]:o=i[3]):(i=t.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(r=i[1],o=i[3],n=i[4]),r&&n!=="0"?`${r}=${o}:${parseInt(n)+1}`:t})}function Ad(){if(E.env.NO_COLOR||E.env.FORCE_COLOR==="0"||E.env.FORCE_COLOR==="false")return!1;if(E.env.FORCE_COLOR||E.env.CLICOLOR_FORCE!==void 0)return!0}var hx=new lt;var tn={AU:{code:"AU",domain:"www.shopback.com.au",currency:"AUD",timezone:"Australia/Sydney",locale:"en-AU"},NZ:{code:"NZ",domain:"www.shopback.co.nz",currency:"NZD",timezone:"Pacific/Auckland",locale:"en-NZ"},SG:{code:"SG",domain:"www.shopback.sg",currency:"SGD",timezone:"Asia/Singapore",locale:"en-SG"},US:{code:"US",domain:"www.shopback.com",currency:"USD",timezone:"America/Los_Angeles",locale:"en-US"}},Nh="US";function jh(e){return Object.hasOwn(tn,e)}function Co(e){let t=(e??Nh).toUpperCase();if(!jh(t))throw new O("unsupported",`Country "${t}" is not supported.`,{supported:Object.keys(tn)});return tn[t]}function Dd(e,t,r){return{schemaVersion:"1",command:e,ok:!0,data:t.data,warnings:t.warnings??[],next:t.next??[],meta:r}}function dt(e,t,r=[]){return{schemaVersion:"1",command:e,ok:!1,warnings:r,error:{code:t.code,message:t.message,retryable:t.retryable,...t.details?{details:t.details}:{}},next:t.next}}function Fe(e,t){t.stdout(`${JSON.stringify(e,null,2)}
28
28
  `)}import{readFileSync as Ch}from"node:fs";var Th=JSON.parse(Ch(new URL("../package.json",import.meta.url),"utf8")),dr=Th.version;import{dirname as Pb,join as Cg}from"node:path";var v={};xe(v,{$brand:()=>Ko,$input:()=>yu,$output:()=>$u,INVALID:()=>te,NEVER:()=>Wo,TimePrecision:()=>Du,ZodAny:()=>vl,ZodArray:()=>bl,ZodBase64:()=>uo,ZodBase64URL:()=>co,ZodBigInt:()=>Kt,ZodBigIntFormat:()=>fo,ZodBoolean:()=>Wt,ZodCIDRv4:()=>ao,ZodCIDRv6:()=>so,ZodCUID:()=>Qi,ZodCUID2:()=>eo,ZodCatch:()=>Fl,ZodCodec:()=>qn,ZodCompileAsyncError:()=>he,ZodCompileUnsupportedError:()=>C,ZodCreditCard:()=>cl,ZodCustom:()=>Xn,ZodCustomStringFormat:()=>at,ZodDate:()=>Bn,ZodDefault:()=>Ul,ZodDiscriminatedUnion:()=>xl,ZodE164:()=>lo,ZodEmail:()=>Hi,ZodEmoji:()=>Xi,ZodEnum:()=>Bt,ZodError:()=>X_,ZodExactOptional:()=>vo,ZodFile:()=>Nl,ZodFirstPartyTypeKind:()=>nd,ZodFunction:()=>Yl,ZodGUID:()=>qi,ZodIBAN:()=>ll,ZodIPv4:()=>io,ZodIPv6:()=>oo,ZodISODate:()=>Le,ZodISODateTime:()=>Ze,ZodISODuration:()=>Ve,ZodISOTime:()=>Re,ZodInstanceOf:()=>td,ZodIntersection:()=>wl,ZodIssueCode:()=>eb,ZodJWT:()=>mo,ZodKSUID:()=>ro,ZodLazy:()=>Hl,ZodLiteral:()=>Pl,ZodMAC:()=>ul,ZodMap:()=>Al,ZodNaN:()=>Bl,ZodNanoID:()=>Yi,ZodNever:()=>yl,ZodNonOptional:()=>$o,ZodNull:()=>gl,ZodNullable:()=>Tl,ZodNumber:()=>Gt,ZodNumberFormat:()=>st,ZodObject:()=>Gn,ZodOptional:()=>Kn,ZodPipe:()=>Hn,ZodPrefault:()=>Zl,ZodPreprocess:()=>Jl,ZodPromise:()=>Xl,ZodReadonly:()=>Gl,ZodRealError:()=>ue,ZodRecord:()=>Mt,ZodSet:()=>Dl,ZodString:()=>Jt,ZodStringFormat:()=>V,ZodSuccess:()=>Vl,ZodSymbol:()=>fl,ZodTemplateLiteral:()=>Kl,ZodTransform:()=>jl,ZodTuple:()=>Sl,ZodType:()=>N,ZodULID:()=>to,ZodURL:()=>Mn,ZodUUID:()=>ke,ZodUndefined:()=>pl,ZodUnion:()=>Wn,ZodUnknown:()=>$l,ZodVoid:()=>_l,ZodXID:()=>no,ZodXor:()=>kl,_ZodString:()=>Ki,_default:()=>El,_function:()=>dg,any:()=>Fp,array:()=>Jn,base64:()=>kp,base64url:()=>xp,bigint:()=>Ep,boolean:()=>ml,catch:()=>Ml,check:()=>mg,cidrv4:()=>_p,cidrv6:()=>bp,clone:()=>Z,codec:()=>sg,coerce:()=>id,compile:()=>xu,config:()=>J,core:()=>Ae,creditCard:()=>Ip,cuid:()=>mp,cuid2:()=>fp,currencyCode:()=>Pp,custom:()=>fg,date:()=>Bp,decode:()=>tl,decodeAsync:()=>rl,deepPartial:()=>Sg,describe:()=>pg,discriminatedUnion:()=>qp,e164:()=>wp,email:()=>np,emoji:()=>lp,encode:()=>el,encodeAsync:()=>nl,endsWith:()=>Nt,enum:()=>go,exactOptional:()=>Cl,file:()=>rg,flattenError:()=>mn,float32:()=>jp,float64:()=>Cp,formatError:()=>fn,fromJSONSchema:()=>wg,function:()=>dg,getDiscriminatedOption:()=>Gs,getErrorMap:()=>nb,globalRegistry:()=>q,gt:()=>_e,gte:()=>de,guid:()=>rp,hash:()=>Np,hex:()=>Dp,hostname:()=>Ap,httpUrl:()=>cp,iban:()=>Sp,includes:()=>Dt,input:()=>Og,instanceof:()=>hg,int:()=>Gi,int32:()=>Tp,int64:()=>Zp,intersection:()=>Il,invertCodec:()=>ug,ipv4:()=>vp,ipv6:()=>yp,iso:()=>Yn,json:()=>$g,jwt:()=>zp,keyof:()=>Jp,ksuid:()=>hp,lazy:()=>ql,length:()=>tt,literal:()=>ng,locales:()=>jn,looseObject:()=>Kp,looseRecord:()=>Yp,lowercase:()=>Ot,lt:()=>ye,lte:()=>le,mac:()=>$p,map:()=>Qp,maxLength:()=>et,maxSize:()=>Ce,memoizer:()=>Pn,meta:()=>gg,mime:()=>Ct,minLength:()=>Oe,minSize:()=>be,multipleOf:()=>je,nan:()=>ag,nanoid:()=>dp,nativeEnum:()=>tg,negative:()=>Ti,never:()=>po,nonnegative:()=>Ei,nonoptional:()=>Rl,nonpositive:()=>Ui,normalize:()=>Tt,null:()=>hl,nullable:()=>Fn,nullish:()=>ig,number:()=>dl,object:()=>Gp,optional:()=>it,output:()=>Ag,overwrite:()=>ve,parse:()=>qc,parseAsync:()=>Xc,partialRecord:()=>Xp,pipe:()=>Wi,positive:()=>Ci,prefault:()=>Ll,preprocess:()=>yg,prettifyError:()=>Qo,promise:()=>lg,properties:()=>jt,property:()=>Zi,readonly:()=>Wl,record:()=>Ol,refine:()=>Ql,regex:()=>zt,regexes:()=>pe,registry:()=>ci,safeDecode:()=>ol,safeDecodeAsync:()=>sl,safeEncode:()=>il,safeEncodeAsync:()=>al,safeParse:()=>Yc,safeParseAsync:()=>Qc,set:()=>eg,setErrorMap:()=>tb,size:()=>Qe,slugify:()=>Lt,startsWith:()=>Pt,strictObject:()=>Wp,string:()=>Vn,stringFormat:()=>Op,stringbool:()=>vg,success:()=>og,superRefine:()=>ed,symbol:()=>Rp,templateLiteral:()=>cg,toJSONSchema:()=>Fi,toLowerCase:()=>Et,toUpperCase:()=>Zt,toZod:()=>nn,transform:()=>ho,treeifyError:()=>Yo,trim:()=>Ut,tuple:()=>zl,uint32:()=>Up,uint64:()=>Lp,ulid:()=>pp,undefined:()=>Vp,union:()=>Ht,unknown:()=>rt,uppercase:()=>At,url:()=>up,util:()=>$,uuid:()=>ip,uuidv4:()=>op,uuidv6:()=>ap,uuidv7:()=>sp,validate:()=>pn,validateAsync:()=>gn,void:()=>Mp,withParser:()=>li,xid:()=>gp,xor:()=>Hp});var Ae={};xe(Ae,{$ZodAny:()=>Zs,$ZodArray:()=>Ms,$ZodAsyncError:()=>ae,$ZodBase64:()=>Ss,$ZodBase64URL:()=>zs,$ZodBigInt:()=>Hr,$ZodBigIntFormat:()=>Cs,$ZodBoolean:()=>In,$ZodCIDRv4:()=>ws,$ZodCIDRv6:()=>Is,$ZodCUID:()=>ms,$ZodCUID2:()=>fs,$ZodCatch:()=>uu,$ZodCheck:()=>F,$ZodCheckBigIntFormat:()=>La,$ZodCheckEndsWith:()=>Xa,$ZodCheckGreaterThan:()=>jr,$ZodCheckIncludes:()=>Ha,$ZodCheckLengthEquals:()=>Ja,$ZodCheckLessThan:()=>Nr,$ZodCheckLowerCase:()=>Wa,$ZodCheckMaxLength:()=>Ma,$ZodCheckMaxSize:()=>Ra,$ZodCheckMimeType:()=>es,$ZodCheckMinLength:()=>Ba,$ZodCheckMinSize:()=>Va,$ZodCheckMultipleOf:()=>Ea,$ZodCheckNumberFormat:()=>Za,$ZodCheckOverwrite:()=>ts,$ZodCheckProperties:()=>Qa,$ZodCheckProperty:()=>Ya,$ZodCheckRegex:()=>Ga,$ZodCheckSizeEquals:()=>Fa,$ZodCheckStartsWith:()=>qa,$ZodCheckStringFormat:()=>kt,$ZodCheckUpperCase:()=>Ka,$ZodCodec:()=>zn,$ZodCreditCard:()=>As,$ZodCustom:()=>gu,$ZodCustomStringFormat:()=>Ns,$ZodCyclicError:()=>ni,$ZodDate:()=>Fs,$ZodDefault:()=>iu,$ZodDiscriminatedUnion:()=>Ws,$ZodE164:()=>Os,$ZodEmail:()=>as,$ZodEmoji:()=>ls,$ZodEncodeError:()=>Ne,$ZodEnum:()=>Ys,$ZodError:()=>Xo,$ZodExactOptional:()=>nu,$ZodFile:()=>eu,$ZodFunction:()=>fu,$ZodGUID:()=>is,$ZodIBAN:()=>Ds,$ZodIPv4:()=>bs,$ZodIPv6:()=>ks,$ZodISODate:()=>$s,$ZodISODateTime:()=>vs,$ZodISODuration:()=>_s,$ZodISOTime:()=>ys,$ZodIntersection:()=>Ks,$ZodJWT:()=>Ps,$ZodKSUID:()=>hs,$ZodLazy:()=>On,$ZodLiteral:()=>Qs,$ZodMAC:()=>xs,$ZodMap:()=>qs,$ZodNaN:()=>cu,$ZodNanoID:()=>ds,$ZodNever:()=>Rs,$ZodNonOptional:()=>au,$ZodNull:()=>Es,$ZodNullable:()=>ru,$ZodNumber:()=>Kr,$ZodNumberFormat:()=>js,$ZodObject:()=>dm,$ZodObjectJIT:()=>Bs,$ZodOptional:()=>Xr,$ZodPipe:()=>Yr,$ZodPrefault:()=>ou,$ZodPreprocess:()=>lu,$ZodPromise:()=>pu,$ZodReadonly:()=>du,$ZodRealError:()=>se,$ZodRecord:()=>Hs,$ZodRegistry:()=>ui,$ZodSet:()=>Xs,$ZodString:()=>Ke,$ZodStringFormat:()=>L,$ZodSuccess:()=>su,$ZodSymbol:()=>Ts,$ZodTemplateLiteral:()=>mu,$ZodTransform:()=>tu,$ZodTuple:()=>qr,$ZodType:()=>D,$ZodULID:()=>ps,$ZodURL:()=>cs,$ZodUUID:()=>os,$ZodUndefined:()=>Us,$ZodUnion:()=>Sn,$ZodUnknown:()=>Ls,$ZodVoid:()=>Vs,$ZodXID:()=>gs,$ZodXor:()=>Js,$brand:()=>Ko,$constructor:()=>p,$input:()=>yu,$output:()=>$u,Doc:()=>We,INVALID:()=>te,JSONSchema:()=>Qf,JSONSchemaGenerator:()=>Mi,NEVER:()=>Wo,TimePrecision:()=>Du,URL_BAD_FORMAT:()=>ss,URL_UNPARSEABLE:()=>_n,ZodCompileAsyncError:()=>he,ZodCompileUnsupportedError:()=>C,_any:()=>Wu,_array:()=>ec,_base64:()=>Di,_base64url:()=>Pi,_bigint:()=>Ru,_boolean:()=>Zu,_catch:()=>L_,_check:()=>Ef,_cidrv4:()=>Oi,_cidrv6:()=>Ai,_coercedBigint:()=>Vu,_coercedBoolean:()=>Lu,_coercedDate:()=>Yu,_coercedNumber:()=>Nu,_coercedString:()=>Su,_creditCard:()=>Ou,_cuid:()=>bi,_cuid2:()=>ki,_custom:()=>nc,_date:()=>Xu,_decode:()=>br,_decodeAsync:()=>xr,_default:()=>U_,_discriminatedUnion:()=>w_,_e164:()=>Ni,_email:()=>fi,_emoji:()=>yi,_encode:()=>_r,_encodeAsync:()=>kr,_endsWith:()=>Nt,_enum:()=>D_,_file:()=>tc,_float32:()=>Cu,_float64:()=>Tu,_gt:()=>_e,_gte:()=>de,_guid:()=>pi,_iban:()=>Au,_includes:()=>Dt,_int:()=>ju,_int32:()=>Uu,_int64:()=>Fu,_intersection:()=>I_,_ipv4:()=>Si,_ipv6:()=>zi,_isoDate:()=>Un,_isoDateTime:()=>Tn,_isoDuration:()=>Zn,_isoTime:()=>En,_jwt:()=>ji,_ksuid:()=>Ii,_lazy:()=>M_,_length:()=>tt,_literal:()=>N_,_lowercase:()=>Ot,_lt:()=>ye,_lte:()=>le,_mac:()=>zu,_map:()=>O_,_max:()=>le,_maxLength:()=>et,_maxSize:()=>Ce,_mime:()=>Ct,_min:()=>de,_minLength:()=>Oe,_minSize:()=>be,_multipleOf:()=>je,_nan:()=>Qu,_nanoid:()=>_i,_nativeEnum:()=>P_,_negative:()=>Ti,_never:()=>Hu,_nonnegative:()=>Ei,_nonoptional:()=>E_,_nonpositive:()=>Ui,_normalize:()=>Tt,_null:()=>Gu,_nullable:()=>T_,_number:()=>Pu,_optional:()=>C_,_overwrite:()=>ve,_parse:()=>$t,_parseAsync:()=>yt,_pipe:()=>R_,_positive:()=>Ci,_promise:()=>B_,_properties:()=>jt,_property:()=>Zi,_readonly:()=>V_,_record:()=>z_,_refine:()=>rc,_regex:()=>zt,_safeDecode:()=>Ir,_safeDecodeAsync:()=>zr,_safeEncode:()=>wr,_safeEncodeAsync:()=>Sr,_safeParse:()=>_t,_safeParseAsync:()=>bt,_set:()=>A_,_size:()=>Qe,_slugify:()=>Lt,_startsWith:()=>Pt,_string:()=>Iu,_stringFormat:()=>nt,_stringbool:()=>sc,_success:()=>Z_,_superRefine:()=>ic,_symbol:()=>Bu,_templateLiteral:()=>F_,_toLowerCase:()=>Et,_toUpperCase:()=>Zt,_transform:()=>j_,_trim:()=>Ut,_tuple:()=>S_,_uint32:()=>Eu,_uint64:()=>Mu,_ulid:()=>xi,_undefined:()=>Ju,_union:()=>k_,_unknown:()=>Ku,_uppercase:()=>At,_url:()=>Cn,_uuid:()=>gi,_uuidv4:()=>hi,_uuidv6:()=>vi,_uuidv7:()=>$i,_void:()=>qu,_xid:()=>wi,_xor:()=>x_,base64Charset:()=>Mr,base64urlCharset:()=>wn,canParseURL:()=>us,clone:()=>Z,compile:()=>xu,compileFn:()=>di,config:()=>J,createStandardJSONSchemaMethod:()=>Rt,createToJSONSchemaMethod:()=>cc,decode:()=>Sv,decodeAsync:()=>Ov,describe:()=>oc,encode:()=>Iv,encodeAsync:()=>zv,extractDefs:()=>Ue,finalize:()=>Ee,flattenError:()=>mn,formatError:()=>fn,getDiscriminatedOption:()=>Gs,globalConfig:()=>K,globalRegistry:()=>q,handleUnrepresentable:()=>G,initializeContext:()=>Te,isBackEdge:()=>ii,isRecursiveSchema:()=>ri,isValidBase64:()=>xn,isValidBase64URL:()=>Br,isValidCIDRv6:()=>Fr,isValidCreditCard:()=>Jr,isValidIBAN:()=>Gr,isValidIPv6:()=>kn,isValidJWT:()=>Wr,locales:()=>jn,memoizer:()=>Pn,mergeValues:()=>xt,meta:()=>ac,parse:()=>$r,parseAsync:()=>yr,parseURLObject:()=>um,prettifyError:()=>Qo,process:()=>R,processSchema:()=>R,regexes:()=>pe,registry:()=>ci,safeDecode:()=>Dv,safeDecodeAsync:()=>Nv,safeEncode:()=>Av,safeEncodeAsync:()=>Pv,safeParse:()=>_v,safeParseAsync:()=>bv,standardProps:()=>Zr,stripTabAndNewline:()=>bn,toDotPath:()=>Vd,toJSONSchema:()=>Fi,toZod:()=>nn,treeifyError:()=>Yo,urlHostnameOk:()=>Rr,urlProtocolOk:()=>Vr,util:()=>$,validate:()=>pn,validateAsync:()=>gn,validateURL:()=>Lr,version:()=>ns,withParser:()=>li});var $={};xe($,{BIGINT_FORMAT_RANGES:()=>un,CONSTANT_CATCH:()=>hr,Class:()=>Eo,NUMBER_FORMAT_RANGES:()=>sn,aborted:()=>ee,allowsEval:()=>Ro,assert:()=>Rh,assertEqual:()=>Uh,assertIs:()=>Zh,assertNever:()=>Lh,assertNotEqual:()=>Eh,assignProp:()=>H,attachSchema:()=>gr,base64ToUint8Array:()=>Td,base64urlToUint8Array:()=>ov,cached:()=>gt,captureStackTrace:()=>fr,cleanEnum:()=>iv,cleanRegex:()=>Se,clone:()=>Z,cloneDef:()=>Mh,codePointLength:()=>Je,constantCatch:()=>Jo,createTransparentProxy:()=>Hh,defineLazy:()=>Zo,defineLazyInternal:()=>j,derived:()=>cv,esc:()=>Q,escapeRegex:()=>fe,explicitlyAborted:()=>Mo,extend:()=>Yh,finalizeIssue:()=>oe,floatSafeRemainder:()=>rn,getElementAtPath:()=>Bh,getEnumValues:()=>ft,getLengthableOrigin:()=>ln,getParsedType:()=>Kh,getSizableOrigin:()=>cn,hexToUint8Array:()=>sv,hide:()=>dn,installLazyProp:()=>fv,isObject:()=>Be,isPlainObject:()=>me,issue:()=>vt,joinValues:()=>g,jsonStringifyReplacer:()=>pt,members:()=>Bo,merge:()=>ev,mergeDefs:()=>ge,normalizeParams:()=>k,nullish:()=>mr,numKeys:()=>Wh,objectClone:()=>Vh,omit:()=>Xh,optionalKeys:()=>Fo,own:()=>Pe,parsedType:()=>_,partial:()=>tv,pick:()=>qh,prefixIssues:()=>ie,primitiveTypes:()=>Vo,promiseAllObject:()=>Jh,propertyKeyTypes:()=>an,randomString:()=>Gh,rawShape:()=>ht,required:()=>nv,safeExtend:()=>Qh,shallowClone:()=>on,slugify:()=>Lo,stringifyPrimitive:()=>y,toZod:()=>nn,uint8ArrayToBase64:()=>Ud,uint8ArrayToBase64url:()=>av,uint8ArrayToHex:()=>uv,unwrapMessage:()=>mt});function Uh(e){return e}function Eh(e){return e}function nn(){return e=>e}function Zh(e){}function Lh(e){throw new Error("Unexpected value in exhaustive check")}function Rh(e){}function ft(e){let t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,n])=>t.indexOf(+o)===-1).map(([o,n])=>n)}function g(e,t="|"){return e.map(r=>y(r)).join(t)}function pt(e,t){return typeof t=="bigint"?t.toString():t}var Uo=class{constructor(t){this._getter=t,this._value=void 0}get value(){let t=this._getter;return t!==void 0&&(this._value=t(),this._getter=void 0),this._value}};function gt(e){return new Uo(e)}function mr(e){return e==null}function Se(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function rn(e,t){let r=e/t,o=Math.round(r),n=4*Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-o)<n?0:r-o}var Pd=Symbol("evaluating");function Zo(e,t,r){let o;Object.defineProperty(e,t,{get(){if(o!==Pd)return o===void 0&&(o=Pd,o=r()),o},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Vh(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function H(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function ht(e){let t=Object.getOwnPropertyDescriptor(e,"shape");return t?.get?t.get.raw:t?.value}function Ie(e){return ht(e._zod.def)??e._zod.def.shape}function Nd(e,t,r){Object.defineProperty(e,t,{get(){let o=r();return H(this,t,o),o},enumerable:!0,configurable:!0})}function jd(e,t,r){t in e?H(e,t,r):e[t]=r}function Me(e,t,r,o){let n=Ie(t);for(let i of r){let a=Object.getOwnPropertyDescriptor(n,i);a.enumerable&&(a.get?Nd(e,i,()=>{let s=t._zod.def.shape[i];return o?o(s,i):s}):jd(e,i,o?o(a.value,i):a.value))}}function Fh(e,t){for(let r of Reflect.ownKeys(t)){let o=Object.getOwnPropertyDescriptor(t,r);o.enumerable&&(o.get?Nd(e,r,()=>t[r]):jd(e,r,o.value))}}function ge(...e){let t={};for(let r of e){let o=Object.getOwnPropertyDescriptors(r);Object.assign(t,o)}return Object.defineProperties({},t)}function Mh(e){return ge(e._zod.def)}function Bh(e,t){return t?t.reduce((r,o)=>r?.[o],e):e}function Jh(e){let t=Object.keys(e),r=t.map(o=>e[o]);return Promise.all(r).then(o=>{let n={};for(let i=0;i<t.length;i++)n[t[i]]=o[i];return n})}function Gh(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let o=0;o<e;o++)r+=t[Math.floor(Math.random()*t.length)];return r}function Q(e){return JSON.stringify(e)}function Lo(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var fr="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Be(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var Ro=gt(()=>{if(K.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function me(e){if(Be(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(Be(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function on(e){return me(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function Wh(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}var Kh=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},an=new Set(["string","number","symbol"]),Vo=new Set(["string","number","bigint","boolean","symbol","undefined"]);function fe(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Z(e,t,r){let o=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(o._zod.parent=e),o}function k(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function Hh(e){let t;return new Proxy({},{get(r,o,n){return t??(t=e()),Reflect.get(t,o,n)},set(r,o,n,i){return t??(t=e()),Reflect.set(t,o,n,i)},has(r,o){return t??(t=e()),Reflect.has(t,o)},deleteProperty(r,o){return t??(t=e()),Reflect.deleteProperty(t,o)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,o){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,o)},defineProperty(r,o,n){return t??(t=e()),Reflect.defineProperty(t,o,n)}})}function y(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Fo(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout==="optional")}var sn={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},un={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function qh(e,t){let r=e._zod.def,o=r.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let i={};return Me(i,e,pr(e,t)),Z(e,ge(r,{shape:i,checks:[]}))}function pr(e,t){let r=Ie(e),o=[];for(let n of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(r,n)?.enumerable)throw new Error(`Unrecognized key: "${String(n)}"`);t[n]&&o.push(n)}return o}function Xh(e,t){let r=e._zod.def,o=r.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let i=new Set(pr(e,t)),a={};return Me(a,e,Reflect.ownKeys(Ie(e)).filter(s=>!i.has(s))),Z(e,ge(r,{shape:a,checks:[]}))}function Yh(e,t){if(!me(t))throw new Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let n=Ie(e);for(let i of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,i)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return Z(e,ge(e._zod.def,{shape:Cd(e,t)}))}function Cd(e,t){let r={};return Me(r,e,Reflect.ownKeys(Ie(e))),Fh(r,t),r}function Qh(e,t){if(!me(t))throw new Error("Invalid input to safeExtend: expected a plain object");return Z(e,ge(e._zod.def,{shape:Cd(e,t)}))}function ev(e,t){if(!t?._zod?.def)throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r={};Me(r,e,Reflect.ownKeys(Ie(e))),Me(r,t,Reflect.ownKeys(Ie(t)));let o=ge(e._zod.def,{shape:r,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return Z(e,o)}function tv(e,t,r,o="partial"){let i=t._zod.def.checks;if(i&&i.length>0)throw new Error(`.${o}() cannot be used on object schemas containing refinements`);let s=r?new Set(pr(t,r)):void 0,u={};return Me(u,t,Reflect.ownKeys(Ie(t)),e&&((c,l)=>s&&!s.has(l)?c:new e({type:"optional",innerType:c}))),Z(t,ge(t._zod.def,{shape:u,checks:[]}))}function nv(e,t,r){let o=r?new Set(pr(t,r)):void 0,n={};return Me(n,t,Reflect.ownKeys(Ie(t)),(i,a)=>o&&!o.has(a)?i:new e({type:"nonoptional",innerType:i})),Z(t,ge(t._zod.def,{shape:n}))}function ee(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function Mo(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}function ie(e,t){return t.map(r=>{var o;return(o=r).path??(o.path=[]),r.path.unshift(e),r})}function mt(e){return typeof e=="string"?e:e?.message}function gr(e,t,r){var o;for(let n=t;n<e.length;n++)(o=e[n]).schema??(o.schema=r)}function oe(e,t,r){var o;let n=e.inst?._zod?.traits;n?.has("$ZodType")&&(n.has("$ZodCheck")?(o=e).schema??(o.schema=e.inst):e.schema=e.inst);let i=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,a=e.message?e.message:mt(e.inst?._zod.def?.error?.(e))??mt(i?.(e))??mt(t?.error?.(e))??mt(r.customError?.(e))??mt(r.localeError?.(e))??"Invalid input",s={};for(let u of Object.keys(e))u==="inst"||u==="schema"||u==="continue"||u==="input"||u==="__proto__"||(s[u]=e[u]);return s.path??(s.path=[]),s.message=a,t?.reportInput&&(s.input=e.input),s}function cn(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}var rv=/[\uD800-\uDBFF]/;function Je(e){let t=e.length;if(!rv.test(e))return t;let r=t;for(let o=0;o<t-1;o++)(e.charCodeAt(o)&64512)===55296&&(e.charCodeAt(o+1)&64512)===56320&&(r--,o++);return r}function ln(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function _(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}function vt(...e){let[t,r,o]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:o}:{...t}}function iv(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function Td(e){let t=atob(e),r=new Uint8Array(t.length);for(let o=0;o<t.length;o++)r[o]=t.charCodeAt(o);return r}function Ud(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function ov(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return Td(t+r)}function av(e){return Ud(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function sv(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(t.length/2);for(let o=0;o<t.length;o+=2)r[o/2]=Number.parseInt(t.slice(o,o+2),16);return r}function uv(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var Eo=class{constructor(...t){}};function Bo(e,t){for(let r in t){let o=Object.getOwnPropertyDescriptor(t,r);o.get?Object.defineProperty(e,r,{...o,enumerable:!1}):lv(e,r,o.value)}}function Pe(e,t,r,o=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:o,value:r}),r}function dn(e,t,r){return Pe(e,t,r,!1)}function cv(e,t){for(let r in e){let o=e[r];Object.defineProperty(t,r,{configurable:!0,enumerable:!0,get(){return Pe(this,r,o(this))},set(n){Pe(this,r,n)}})}return t}function lv(e,t,r){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?r:Pe(this,t,r.bind(this))},set(o){Pe(this,t,o)}})}function dv(e,t){let r=Object.getPrototypeOf(e);return t in r?void 0:r}var To,De=!1,mv={configurable:!0,get(){De=!0}};function j(e,t,r){let o=Object.getPrototypeOf(e._zod);if(t in o&&To!==e._zod){To=void 0;return}To=e._zod,Object.defineProperty(o,t,{configurable:!0,get(){Object.defineProperty(this,t,mv);let n=De;De=!1;try{let i=r(this);return De?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:i}),De=De||n,i}catch(i){throw delete this[t],De=De||n,i}},set(n){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:n})}})}function fv(e,t,r,o){let n=dv(e,t);n&&Object.defineProperty(n,t,{configurable:!0,get(){let i={configurable:!0,writable:!0,enumerable:o,value:void 0};return Object.defineProperty(this,t,i),i.value=r(this),Object.defineProperty(this,t,i),i.value},set(i){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:o,value:i})}})}var hr="~constantCatch";function Jo(e){let t=()=>e;return t[hr]=!0,t}var Ed,Wo=Object.freeze({status:"aborted"}),Go={value:void 0,enumerable:!1},Zd="captureStackTrace"in Error?Error:null;function pv(e){let t=Zd;if(t){let r=t.stackTraceLimit;if(typeof r=="number"){try{t.stackTraceLimit=0}catch{return Zd=null,new e}try{return new e}finally{t.stackTraceLimit=r}}}return new e}function p(e,t,r,o){let n={};function i(m){this.def=m,this.constr=d,this.traits=new Set}i.prototype=n;let a=r,s=a&&new WeakSet;function u(m,f){if(m._zod){if(m._zod.traits.has(e))return}else{Go.value=new i(f);try{Object.defineProperty(m,"_zod",Go)}finally{Go.value=void 0}}if(m._zod.traits.add(e),t(m,f),s){let b=Object.getPrototypeOf(m),x=m._zod.constr.prototype,z=b;for(;z&&z!==x;)z=Object.getPrototypeOf(z);let I=z??b;s.has(I)||(s.add(I),Bo(I,a))}let h=d.prototype;for(let b in h)Object.prototype.hasOwnProperty.call(h,b)&&(b in m||(m[b]=h[b].bind(m)))}let c=o?.Parent??Object;class l extends c{}Object.defineProperty(l,"name",{value:e});function d(m){let f=o?.Parent?pv(l):this;u(f,m);let h=f._zod.deferred;if(h){for(let x of h)x();f._zod.deferred=void 0}let b=globalThis.__zod_globalConfig?.postProcessor;return b&&b(f),f}return Object.defineProperty(d,"init",{value:u}),Object.defineProperty(d,Symbol.hasInstance,{value:m=>o?.Parent&&m instanceof o.Parent?!0:m?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var Ko=Symbol("zod_brand"),ae=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Ne=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(Ed=globalThis).__zod_globalConfig??(Ed.__zod_globalConfig={});var K=globalThis.__zod_globalConfig;function J(e){return e&&Object.assign(K,e),K}function gv(){let e=this._zod;return e.message??(e.message=JSON.stringify(e.def,pt,2)),e.message}function hv(e){this._zod.message=e}var vv={get:gv,set:hv,enumerable:!0,configurable:!0},qo={value:void 0,enumerable:!1},Ld=new WeakSet([Object.prototype,Error.prototype]),Rd=(e,t)=>{e.name="$ZodError",qo.value=t,Object.defineProperty(e,"issues",qo),qo.value=void 0,Object.defineProperty(e,"message",vv);let r=Object.getPrototypeOf(e);Ld.has(r)||(Ld.add(r),Object.defineProperty(r,"toString",{configurable:!0,enumerable:!1,get(){let o=()=>this.message;return Object.defineProperty(this,"toString",{value:o,configurable:!0,writable:!0}),o},set(o){Object.defineProperty(this,"toString",{value:o,configurable:!0,writable:!0})}}))},Xo=p("$ZodError",Rd),se=p("$ZodError",Rd,void 0,{Parent:Error});function $v(e,t,r){return Object.prototype.hasOwnProperty.call(e,t)||(t==="__proto__"?Object.defineProperty(e,t,{value:r(),writable:!0,enumerable:!0,configurable:!0}):e[t]=r()),e[t]}function mn(e,t=r=>r.message){let r={},o=[];for(let n of e.issues)n.path.length>0?$v(r,n.path[0],()=>[]).push(t(n)):o.push(t(n));return{formErrors:o,fieldErrors:r}}function fn(e,t=r=>r.message){let r={_errors:[]},o=(n,i=[])=>{for(let a of n.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(s=>o({issues:s},[...i,...a.path]));else if(a.code==="invalid_key")o({issues:a.issues},[...i,...a.path]);else if(a.code==="invalid_element")o({issues:a.issues},[...i,...a.path]);else{let s=[...i,...a.path];if(s.length===0)r._errors.push(t(a));else{let u=r,c=0;for(;c<s.length;){let l=s[c],d=c===s.length-1;if(l==="_errors"){d&&u._errors.push(t(a)),c++;continue}Object.prototype.hasOwnProperty.call(u,l)||Object.defineProperty(u,l,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let m=u[l];d&&m._errors.push(t(a)),u=m,c++}}}};return o(e),r}function Yo(e,t=r=>r.message){let r={errors:[]},o=(n,i=[])=>{var a;for(let s of n.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(u=>o({issues:u},[...i,...s.path]));else if(s.code==="invalid_key")o({issues:s.issues},[...i,...s.path]);else if(s.code==="invalid_element")o({issues:s.issues},[...i,...s.path]);else{let u=[...i,...s.path];if(u.length===0){r.errors.push(t(s));continue}let c=r,l=0;for(;l<u.length;){let d=u[l],m=l===u.length-1;typeof d=="string"?(c.properties??(c.properties={}),Object.prototype.hasOwnProperty.call(c.properties,d)||Object.defineProperty(c.properties,d,{value:{errors:[]},enumerable:!0,writable:!0,configurable:!0}),c=c.properties[d]):(c.items??(c.items=[]),(a=c.items)[d]??(a[d]={errors:[]}),c=c.items[d]),m&&c.errors.push(t(s)),l++}}};return o(e),r}function Vd(e){let t=[],r=e.map(o=>typeof o=="object"?o.key:o);for(let o of r)typeof o=="number"?t.push(`[${o}]`):typeof o=="symbol"?t.push(`[${JSON.stringify(String(o))}]`):/[^\w$]/.test(o)?t.push(`[${JSON.stringify(o)}]`):(t.length&&t.push("."),t.push(o));return t.join("")}function Qo(e){let t=[],r=[...e.issues].sort((o,n)=>(o.path??[]).length-(n.path??[]).length);for(let o of r)t.push(`\u2716 ${o.message}`),o.path?.length&&t.push(` \u2192 at ${Vd(o.path)}`);return t.join(`
29
29
  `)}function vr(e,t){return{callee:t?.callee??e,Err:t?.Err}}var $t=e=>{let t=(r,o,n,i)=>{let a=n?{...n,async:!1}:{async:!1},s=r._zod.run({value:o,issues:[]},a);if(s instanceof Promise)throw new ae;if(s.issues.length){let u=new(i?.Err??e)(s.issues.map(c=>oe(c,a,J())));throw fr(u,i?.callee??t),u}return s.value};return t},$r=$t(se),yt=e=>{let t=async(r,o,n,i)=>{let a=n?{...n,async:!0}:{async:!0},s=r._zod.run({value:o,issues:[]},a);if(s instanceof Promise&&(s=await s),s.issues.length){let u=new(i?.Err??e)(s.issues.map(c=>oe(c,a,J())));throw fr(u,i?.callee??t),u}return s.value};return t},yr=yt(se),_t=e=>(t,r,o)=>{let n=o?{...o,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},n);if(i instanceof Promise)throw new ae;return i.issues.length?Fd(e,i.issues,n):{success:!0,data:i.value}},_v=_t(se);function Fd(e,t,r){let o;return{success:!1,get error(){return o||(o=new e(t.map(n=>oe(n,r,J()))),t=void 0,r=void 0),o},set error(n){o=n,t=void 0,r=void 0}}}var bt=e=>async(t,r,o)=>{let n=o?{...o,async:!0}:{async:!0},i=t._zod.run({value:r,issues:[]},n);return i instanceof Promise&&(i=await i),i.issues.length?Fd(e,i.issues,n):{success:!0,data:i.value}},bv=bt(se),kv=Symbol.for("zod.compile.invalid"),xv=Symbol.for("zod.compile.fallback"),pn=((e,t,r)=>{let o=e._zod.bag.validator;if(o!==void 0){if(o(t)!==kv)return!0;if(o.definite===!0&&r===void 0)return!1}return wv(e,t,r)});function wv(e,t,r){let o=r?{...r,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},n=e._zod.bag.fallbackRun,i;if(n?(o[xv]=!0,i=n({value:t,issues:[]},o)):i=e._zod.run({value:t,issues:[]},o),i instanceof Promise)throw new ae;return i.issues.length===0}var gn=async(e,t,r)=>{let o=r?{...r,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},n=e._zod.run({value:t,issues:[]},o);return n instanceof Promise&&(n=await n),n.issues.length===0},_r=e=>{let t=$t(e),r=(o,n,i,a)=>{let s=i?{...i,direction:"backward"}:{direction:"backward"};return t(o,n,s,vr(r,a))};return r},Iv=_r(se),br=e=>{let t=$t(e),r=(o,n,i,a)=>t(o,n,i,vr(r,a));return r},Sv=br(se),kr=e=>{let t=yt(e),r=async(o,n,i,a)=>{let s=i?{...i,direction:"backward"}:{direction:"backward"};return await t(o,n,s,vr(r,a))};return r},zv=kr(se),xr=e=>{let t=yt(e),r=async(o,n,i,a)=>await t(o,n,i,vr(r,a));return r},Ov=xr(se),wr=e=>(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return _t(e)(t,r,n)},Av=wr(se),Ir=e=>(t,r,o)=>_t(e)(t,r,o),Dv=Ir(se),Sr=e=>async(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return bt(e)(t,r,n)},Pv=Sr(se),zr=e=>async(t,r,o)=>bt(e)(t,r,o),Nv=zr(se);var pe={};xe(pe,{anyString:()=>Sa,base64:()=>va,base64url:()=>$a,bigint:()=>Oa,boolean:()=>Aa,browserEmail:()=>Rv,cidrv4:()=>ga,cidrv6:()=>ha,creditCard:()=>Or,cuid:()=>ta,cuid2:()=>na,currencyCode:()=>ka,date:()=>xa,datetime:()=>Ia,domain:()=>_a,duration:()=>ua,e164:()=>ba,email:()=>la,emoji:()=>da,extendedDuration:()=>jv,guid:()=>ca,hex:()=>Ca,hostname:()=>ya,html5Email:()=>Ev,httpProtocol:()=>hn,iban:()=>Ar,idnEmail:()=>Lv,integer:()=>vn,ipv4:()=>ma,ipv6:()=>fa,ksuid:()=>oa,lowercase:()=>Na,mac:()=>pa,md5_base64:()=>Bv,md5_base64url:()=>Jv,md5_hex:()=>Mv,nanoid:()=>aa,nanoidOfLength:()=>sa,null:()=>Da,number:()=>ze,rfc5322Email:()=>Zv,sha1_base64:()=>Wv,sha1_base64url:()=>Kv,sha1_hex:()=>Gv,sha256_base64:()=>qv,sha256_base64url:()=>Xv,sha256_hex:()=>Hv,sha384_base64:()=>Qv,sha384_base64url:()=>e$,sha384_hex:()=>Yv,sha512_base64:()=>n$,sha512_base64url:()=>r$,sha512_hex:()=>t$,string:()=>za,time:()=>wa,ulid:()=>ra,undefined:()=>Pa,unicodeEmail:()=>Md,uppercase:()=>ja,uuid:()=>Ge,uuid4:()=>Cv,uuid6:()=>Tv,uuid7:()=>Uv,xid:()=>ia});var ta=/^[cC][0-9a-z]{6,}$/,na=/^[0-9a-z]+$/,ra=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,ia=/^[0-9a-vA-V]{20}$/,oa=/^[A-Za-z0-9]{27}$/,aa=/^[a-zA-Z0-9_-]{21}$/;function sa(e){return new RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var ua=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,jv=/^[-+]?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)?)??$/,ca=/^([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})$/,Ge=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Cv=Ge(4),Tv=Ge(6),Uv=Ge(7),la=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Ev=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Zv=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,Md=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Lv=Md,Rv=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Vv="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function da(){return new RegExp(Vv,"u")}var ma=/^(?:(?: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])$/,fa=/^(([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}|:))$/,pa=e=>{let t=fe(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},ga=/^((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])$/,ha=/^(([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}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,va=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,$a=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,ya=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,_a=/^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$/,hn=/^https?$/,ba=/^\+[1-9]\d{6,14}$/,Or=/^\d(?:[ -]?\d){11,18}$/,ka=/^(?:AED|AFN|ALL|AMD|AOA|ARS|AUD|AWG|AZN|BAM|BBD|BDT|BHD|BIF|BMD|BND|BOB|BOV|BRL|BSD|BTN|BWP|BYN|BZD|CAD|CDF|CHE|CHF|CHW|CLF|CLP|CNY|COP|COU|CRC|CUP|CVE|CZK|DJF|DKK|DOP|DZD|EGP|ERN|ETB|EUR|FJD|FKP|GBP|GEL|GHS|GIP|GMD|GNF|GTQ|GYD|HKD|HNL|HTG|HUF|IDR|ILS|INR|IQD|IRR|ISK|JMD|JOD|JPY|KES|KGS|KHR|KMF|KPW|KRW|KWD|KYD|KZT|LAK|LBP|LKR|LRD|LSL|LYD|MAD|MDL|MGA|MKD|MMK|MNT|MOP|MRU|MUR|MVR|MWK|MXN|MXV|MYR|MZN|NAD|NGN|NIO|NOK|NPR|NZD|OMR|PAB|PEN|PGK|PHP|PKR|PLN|PYG|QAR|RON|RSD|RUB|RWF|SAR|SBD|SCR|SDG|SEK|SGD|SHP|SLE|SOS|SRD|SSP|STN|SVC|SYP|SZL|THB|TJS|TMT|TND|TOP|TRY|TTD|TWD|TZS|UAH|UGX|USD|USN|UYI|UYU|UYW|UZS|VED|VES|VND|VUV|WST|XAD|XAF|XAG|XAU|XBA|XBB|XBC|XBD|XCD|XCG|XDR|XOF|XPD|XPF|XPT|XSU|XTS|XUA|XXX|YER|ZAR|ZMW|ZWG)$/,Ar=/^[A-Z]{2}(?!00|01|99)\d{2}[A-Z0-9]{11,30}$/,Bd="(?:(?:\\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])))";function Fv(e){return new RegExp(`^${e}$`)}var xa=Fv(Bd);function ea(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function wa(e){return new RegExp(`^${ea(e)}$`)}function Ia(e){let t=["Z"];e.offset&&t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let r=`${ea({precision:e.precision,seconds:!0})}(?:${t.join("|")})`,o=e.local?`${r}|${ea({precision:e.precision})}`:r;return new RegExp(`^${Bd}T(?:${o})$`)}var Sa=/^[\s\S]{0,}$/,za=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Oa=/^-?\d+n?$/,vn=/^-?\d+$/,ze=/^-?\d+(?:\.\d+)?$/,Aa=/^(?:true|false)$/i,Da=/^null$/i;var Pa=/^undefined$/i;var Na=/^[^A-Z]*$/,ja=/^[^a-z]*$/,Ca=/^[0-9a-fA-F]*$/;function $n(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function yn(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var Mv=/^[0-9a-fA-F]{32}$/,Bv=$n(22,"=="),Jv=yn(22),Gv=/^[0-9a-fA-F]{40}$/,Wv=$n(27,"="),Kv=yn(27),Hv=/^[0-9a-fA-F]{64}$/,qv=$n(43,"="),Xv=yn(43),Yv=/^[0-9a-fA-F]{96}$/,Qv=$n(64,""),e$=yn(64),t$=/^[0-9a-fA-F]{128}$/,n$=$n(86,"=="),r$=yn(86);var F=p("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Ta=e=>{let t=e.value;return!mr(t)&&t.size!==void 0},Ua=e=>{let t=e.value;return!mr(t)&&t.length!==void 0},Dr={number:"number",bigint:"bigint",object:"date"},Nr=p("$ZodCheckLessThan",(e,t)=>{F.init(e,t);let r=Dr[typeof t.value];e._zod.check=o=>{(t.inclusive?o.value<=t.value:o.value<t.value)||o.issues.push({origin:Dr[typeof o.value]??r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),jr=p("$ZodCheckGreaterThan",(e,t)=>{F.init(e,t);let r=Dr[typeof t.value];e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:Dr[typeof o.value]??r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Ea=p("$ZodCheckMultipleOf",(e,t)=>{F.init(e,t),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?t.value!==BigInt(0)&&r.value%t.value===BigInt(0):rn(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),Za=p("$ZodCheckNumberFormat",(e,t)=>{F.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),o=r?"int":"number",[n,i]=sn[t.format];e._zod.check=a=>{let s=a.value;if(r){if(!Number.isInteger(s)){a.issues.push({expected:o,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort});return}}s<n&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),s>i&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),La=p("$ZodCheckBigIntFormat",(e,t)=>{F.init(e,t);let[r,o]=un[t.format];e._zod.check=n=>{let i=n.value;i<r&&n.issues.push({origin:"bigint",input:i,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),i>o&&n.issues.push({origin:"bigint",input:i,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),Ra=p("$ZodCheckMaxSize",(e,t)=>{var r;F.init(e,t),(r=e._zod.def).when??(r.when=Ta),e._zod.check=o=>{let n=o.value;n.size<=t.maximum||o.issues.push({origin:cn(n),code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Va=p("$ZodCheckMinSize",(e,t)=>{var r;F.init(e,t),(r=e._zod.def).when??(r.when=Ta),e._zod.check=o=>{let n=o.value;n.size>=t.minimum||o.issues.push({origin:cn(n),code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Fa=p("$ZodCheckSizeEquals",(e,t)=>{var r;F.init(e,t),(r=e._zod.def).when??(r.when=Ta),e._zod.check=o=>{let n=o.value,i=n.size;if(i===t.size)return;let a=i>t.size;o.issues.push({origin:cn(n),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),Ma=p("$ZodCheckMaxLength",(e,t)=>{var r;F.init(e,t),(r=e._zod.def).when??(r.when=Ua),e._zod.check=o=>{let n=o.value,i=n.length;if((typeof n=="string"&&i>t.maximum?Je(n):i)<=t.maximum)return;let s=ln(n);o.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Ba=p("$ZodCheckMinLength",(e,t)=>{var r;F.init(e,t),(r=e._zod.def).when??(r.when=Ua),e._zod.check=o=>{let n=o.value,i=n.length;if((typeof n=="string"&&i>=t.minimum&&i<t.minimum*2?Je(n):i)>=t.minimum)return;let s=ln(n);o.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Ja=p("$ZodCheckLengthEquals",(e,t)=>{var r;F.init(e,t),(r=e._zod.def).when??(r.when=Ua),e._zod.check=o=>{let n=o.value,i=n.length,a=typeof n=="string"&&i>=t.length&&i<=t.length*2?Je(n):i;if(a===t.length)return;let s=ln(n),u=a>t.length;o.issues.push({origin:s,...u?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),kt=p("$ZodCheckStringFormat",(e,t)=>{var r,o;F.init(e,t),t.pattern?(r=e._zod).check??(r.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(o=e._zod).check??(o.check=()=>{})}),Ga=p("$ZodCheckRegex",(e,t)=>{kt.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Wa=p("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Na),kt.init(e,t)}),Ka=p("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=ja),kt.init(e,t)}),Ha=p("$ZodCheckIncludes",(e,t)=>{F.init(e,t);let r=fe(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position},}${r}`:r);t.pattern=o,e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),qa=p("$ZodCheckStartsWith",(e,t)=>{F.init(e,t);let r=new RegExp(`^${fe(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.check=o=>{o.value.startsWith(t.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),Xa=p("$ZodCheckEndsWith",(e,t)=>{F.init(e,t);let r=new RegExp(`.*${fe(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.check=o=>{o.value.endsWith(t.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}});function Pr(e,t,r){e.issues.length&&t.issues.push(...ie(r,e.issues))}var Ya=p("$ZodCheckProperty",(e,t)=>{F.init(e,t),e._zod.check=r=>{let o=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(o instanceof Promise)return o.then(n=>Pr(n,r,t.property));Pr(o,r,t.property)}}),Qa=p("$ZodCheckProperties",(e,t)=>{F.init(e,t),dn(e,Symbol.iterator,function*(){yield e});let r;e._zod.check=o=>{if(o.value==null){o.issues.push({expected:"object",code:"invalid_type",input:o.value,inst:e});return}r??(r=Reflect.ownKeys(t.shape).map(a=>[a,t.shape[a]]));let n=o.value,i;for(let[a,s]of r){let u=s._zod.run({value:n[a],issues:[]},{});u instanceof Promise?(i??(i=[]),i.push(u.then(c=>Pr(c,o,a)))):Pr(u,o,a)}if(i)return Promise.all(i).then(()=>{})}}),es=p("$ZodCheckMimeType",(e,t)=>{F.init(e,t);let r=new Set(t.mime);e._zod.check=o=>{r.has(o.value.type)||o.issues.push({code:"invalid_value",values:t.mime,input:o.value.type,inst:e,continue:!t.abort})}}),ts=p("$ZodCheckOverwrite",(e,t)=>{F.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});var We=class{constructor(t=[],r={}){this.content=[],this.indent=0,this.args=t,this.closed=r}indented(t){this.indent+=1;try{t(this)}finally{this.indent-=1}}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let o=t.split(`
30
30
  `).filter(a=>a),n=Math.min(...o.map(a=>a.length-a.trimStart().length)),i=o.map(a=>a.slice(n)).map(a=>" ".repeat(this.indent*2)+a);for(let a of i)this.content.push(a)}compile(){let t=Function,r=this?.content??[""];return new t(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
package/package.json CHANGED
@@ -1,7 +1,22 @@
1
1
  {
2
2
  "name": "@shopback/cli",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Agent-friendly ShopBack CLI: find the best cashback offer, act on it, and open the merchant through a tracked link.",
5
+ "keywords": [
6
+ "shopback",
7
+ "cashback",
8
+ "cli",
9
+ "ai-agent",
10
+ "agent",
11
+ "mcp",
12
+ "claude-code",
13
+ "codex",
14
+ "shopping",
15
+ "australia",
16
+ "new-zealand",
17
+ "singapore",
18
+ "united-states"
19
+ ],
5
20
  "license": "SEE LICENSE IN LICENSE",
6
21
  "publishConfig": {
7
22
  "access": "public"