cueframe 0.4.9 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -661
- package/NOTICE +10 -0
- package/README.md +29 -35
- package/dist/analyze-Q6MIQWOJ.js +2 -0
- package/dist/chunk-3QSA3EBY.js +2 -0
- package/dist/chunk-U3YHQOER.js +12 -0
- package/dist/cueframe.js +107 -64
- package/dist/skills/add-music-bed/SKILL.md +12 -7
- package/dist/skills/brand-reel/SKILL.md +19 -15
- package/dist/skills/clip-a-talking-head/SKILL.md +15 -7
- package/dist/skills/composing-video/SKILL.md +58 -313
- package/dist/skills/cueframe-brand-demo/SKILL.md +9 -2
- package/dist/skills/cueframe-cli/SKILL.md +54 -49
- package/dist/skills/cueframe-component-authoring/SKILL.md +14 -6
- package/dist/skills/cueframe-compose-loop/SKILL.md +20 -6
- package/dist/skills/cueframe-compose-loop/references/builtin-insertion.md +49 -0
- package/dist/skills/cueframe-compose-loop/references/builtin-requests.json +111 -0
- package/dist/skills/cueframe-connect/SKILL.md +17 -9
- package/dist/skills/cueframe-product-video/SKILL.md +15 -7
- package/dist/skills/cueframe-scene-shot/SKILL.md +8 -0
- package/dist/skills/cueframe-storyboard/SKILL.md +27 -55
- package/dist/skills/every-format-from-one-edit/SKILL.md +14 -8
- package/dist/skills/extracting-brand-kits/SKILL.md +8 -0
- package/dist/skills/launch-video/SKILL.md +17 -11
- package/dist/skills/make-a-social-reel/SKILL.md +19 -15
- package/dist/skills/rebrand-a-video/SKILL.md +18 -16
- package/dist/skills/video-craft-standards/SKILL.md +40 -47
- package/dist/supportedAgents.js +1 -1
- package/package.json +12 -12
- package/dist/analyze-Y2CE6BNM.js +0 -2
- package/dist/chunk-HFZRI4NX.js +0 -68
- package/dist/chunk-MCQRX24V.js +0 -2
package/dist/cueframe.js
CHANGED
|
@@ -1,84 +1,127 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{A as
|
|
3
|
-
- Did you mean \`export { '${o}' as '${e}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:o})=>`'${o==="ForInStatement"?"for-in":"for-of"}' loop variable declaration may not have an initializer.`,ForInUsing:"For-in loop may not start with 'using' declaration.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:({type:o})=>`Unsyntactic ${o==="BreakStatement"?"break":"continue"}.`,IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportAttributesUseAssert:"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedImportAssert` parser plugin to suppress this error.",ImportBindingIsString:({importName:o})=>`A string literal cannot be used as an imported binding.
|
|
4
|
-
- Did you mean \`import { "${o}" as foo }\`?`,ImportCallArity:"`import()` requires exactly one or two arguments.",ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverDiscardElement:"'void' must be followed by an expression when not used in a binding position.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:({radix:o})=>`Expected number in radix ${o}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:o})=>`Escape sequence in keyword ${o}.`,InvalidIdentifier:({identifierName:o})=>`Invalid identifier ${o}.`,InvalidLhs:({ancestor:o})=>`Invalid left-hand side in ${Hs(o)}.`,InvalidLhsBinding:({ancestor:o})=>`Binding invalid left-hand side in ${Hs(o)}.`,InvalidLhsOptionalChaining:({ancestor:o})=>`Invalid optional chaining in the left-hand side of ${Hs(o)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:o})=>`Unexpected character '${o}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:o})=>`Private name #${o} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRecordProperty:"Only properties and spread elements are allowed in record definitions.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:o})=>`Label '${o}' is already declared.`,LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:o})=>`This experimental syntax requires enabling the parser plugin: ${o.map(e=>JSON.stringify(e)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:o})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${o.map(e=>JSON.stringify(e)).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:o})=>`Duplicate key "${o}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:o})=>`An export name cannot include a lone surrogate, found '\\u${o.toString(16)}'.`,ModuleExportUndefined:({localName:o})=>`Export '${o}' is not defined.`,MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName:o})=>`Private names are only allowed in property accesses (\`obj.#${o}\`) or in \`in\` expressions (\`#${o} in obj\`).`,PrivateNameRedeclaration:({identifierName:o})=>`Duplicate private name #${o}.`,RecordExpressionBarIncorrectEndSyntaxType:"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionBarIncorrectStartSyntaxType:"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionHashIncorrectStartSyntaxType:"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",RecordNoProto:"'__proto__' is not allowed in Record expressions.",RestTrailingComma:"Unexpected trailing comma after rest element.",SloppyFunction:"In non-strict mode code, functions can only be declared at top level or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",SourcePhaseImportRequiresDefault:'Only `import source x from "./module"` is valid.',StaticPrototype:"Classes may not have static property named prototype.",SuperCallNotNewExpression:"Cannot use new with super(...).",SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:"Private fields can't be accessed on super.",TrailingDecorator:"Decorators must be attached to a class element.",TupleExpressionBarIncorrectEndSyntaxType:"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionBarIncorrectStartSyntaxType:"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionHashIncorrectStartSyntaxType:"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",UnexpectedArgumentPlaceholder:"Unexpected argument placeholder.",UnexpectedAwaitAfterPipelineBody:'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.',UnexpectedDigitAfterHash:"Unexpected digit after hash token.",UnexpectedImportExport:"'import' and 'export' may only appear at the top level.",UnexpectedKeyword:({keyword:o})=>`Unexpected keyword '${o}'.`,UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration.",UnexpectedLexicalDeclaration:"Lexical declaration cannot appear in a single-statement context.",UnexpectedNewTarget:"`new.target` can only be used in functions or class properties.",UnexpectedNumericSeparator:"A numeric separator is only allowed between two digits.",UnexpectedPrivateField:"Unexpected private name.",UnexpectedReservedWord:({reservedWord:o})=>`Unexpected reserved word '${o}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:o,unexpected:e})=>`Unexpected token${e?` '${e}'.`:""}${o?`, expected "${o}"`:""}`,UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement.",UnexpectedVoidPattern:"Unexpected void binding.",UnsupportedDecoratorExport:"A decorated export must export a class declaration.",UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"`import` can only be used in `import()` or `import.meta`.",UnsupportedMetaProperty:({target:o,onlyValidPropertyName:e})=>`The only valid meta property for ${o} is ${o}.${e}.`,UnsupportedParameterDecorator:"Decorators cannot be used to decorate parameters.",UnsupportedPropertyDecorator:"Decorators cannot be used to decorate object literal properties.",UnsupportedSuper:"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",UnterminatedComment:"Unterminated comment.",UnterminatedRegExp:"Unterminated regular expression.",UnterminatedString:"Unterminated string constant.",UnterminatedTemplate:"Unterminated template.",UsingDeclarationExport:"Using declaration cannot be exported.",UsingDeclarationHasBindingPattern:"Using declaration cannot have destructuring patterns.",VarRedeclaration:({identifierName:o})=>`Identifier '${o}' has already been declared.`,VoidPatternCatchClauseParam:"A void binding can not be the catch clause parameter. Use `try { ... } catch { ... }` if you want to discard the caught error.",VoidPatternInitializer:"A void binding may not have an initializer.",YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator.",YieldInParameter:"Yield expression is not allowed in formal parameters.",YieldNotInGeneratorFunction:"'yield' is only allowed within generator functions.",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0."},Wce={StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:o})=>`Assigning to '${o}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:o})=>`Binding '${o}' in strict mode.`,StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block.",StrictNumericEscape:"The only valid numeric escape in strict mode is '\\0'.",StrictOctalLiteral:"Legacy octal literals are not allowed in strict mode.",StrictWith:"'with' in strict mode."},$ce={ParseExpressionEmptyInput:"Unexpected parseExpression() input: The input is empty or contains only comments.",ParseExpressionExpectsEOF:({unexpected:o})=>`Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`${String.fromCodePoint(o)}\`.`},Gce=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]),Kce=Object.assign({PipeBodyIsTighter:"Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",PipeTopicRequiresHackPipes:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.',PipeTopicUnbound:"Topic reference is unbound; it must be inside a pipe body.",PipeTopicUnconfiguredToken:({token:o})=>`Invalid topic token ${o}. In order to use ${o} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${o}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:o})=>`Hack-style pipe body cannot be an unparenthesized ${Hs({type:o})}; please wrap it in parentheses.`},{PipelineBodyNoArrow:'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.',PipelineBodySequenceExpression:"Pipeline body may not be a comma-separated sequence expression.",PipelineHeadSequenceExpression:"Pipeline head should not be a comma-separated sequence expression.",PipelineTopicUnused:"Pipeline is in topic style but does not use topic reference.",PrimaryTopicNotAllowed:"Topic reference was used in a lexical context without topic binding.",PrimaryTopicRequiresSmartPipeline:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.'}),qce={UnsupportedBind:"Binding should be performed on object property.",UnsupportedBindRHS:"The right-hand side of binding can not be super or import."},Yce=["message"];function wh(o,e,t){Object.defineProperty(o,e,{enumerable:!1,configurable:!0,value:t})}function Qce({toMessage:o,code:e,reasonCode:t,syntaxPlugin:r}){let s=t==="MissingPlugin"||t==="MissingOneOfPlugins",a={AccessorCannotDeclareThisParameter:"AccesorCannotDeclareThisParameter",AccessorCannotHaveTypeParameters:"AccesorCannotHaveTypeParameters",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference",SetAccessorCannotHaveOptionalParameter:"SetAccesorCannotHaveOptionalParameter",SetAccessorCannotHaveRestParameter:"SetAccesorCannotHaveRestParameter",SetAccessorCannotHaveReturnType:"SetAccesorCannotHaveReturnType"};return a[t]&&(t=a[t]),function p(u,f){let m=new SyntaxError;return m.code=e,m.reasonCode=t,m.loc=u,m.pos=u.index,m.syntaxPlugin=r,s&&(m.missingPlugin=f.missingPlugin),wh(m,"clone",function(g={}){var z;let{line:w,column:k,index:F}=(z=g.loc)!=null?z:u;return p(new At(w,k,F),Object.assign({},f,g.details))}),wh(m,"details",f),Object.defineProperty(m,"message",{configurable:!0,get(){let x=`${o(f)} (${u.line}:${u.column})`;return this.message=x,x},set(x){Object.defineProperty(this,"message",{value:x,writable:!0})}}),m}}function ct(o,e){if(Array.isArray(o))return r=>ct(r,o[0]);let t={};for(let r of Object.keys(o)){let s=o[r],a=typeof s=="string"?{message:()=>s}:typeof s=="function"?{message:s}:s,{message:p}=a,u=Vce(a,Yce),f=typeof p=="string"?()=>p:p;t[r]=Qce(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:r,toMessage:f},e?{syntaxPlugin:e}:{},u))}return t}var R=Object.assign({},ct(Uce),ct(Hce),ct(Wce),ct($ce),ct`pipelineOperator`(Kce),ct`functionBind`(qce));function Jce(){return{sourceType:"script",sourceFilename:void 0,startIndex:0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,allowYieldOutsideFunction:!1,plugins:[],strictMode:void 0,ranges:!1,tokens:!1,createImportExpressions:!1,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0}}function Zce(o){let e=Jce();if(o==null)return e;if(o.annexB!=null&&o.annexB!==!1)throw new Error("The `annexB` option can only be set to `false`.");for(let t of Object.keys(e))o[t]!=null&&(e[t]=o[t]);if(e.startLine===1)o.startIndex==null&&e.startColumn>0?e.startIndex=e.startColumn:o.startColumn==null&&e.startIndex>0&&(e.startColumn=e.startIndex);else if((o.startColumn==null||o.startIndex==null)&&o.startIndex!=null)throw new Error("With a `startLine > 1` you must also specify `startIndex` and `startColumn`.");if(e.sourceType==="commonjs"){if(o.allowAwaitOutsideFunction!=null)throw new Error("The `allowAwaitOutsideFunction` option cannot be used with `sourceType: 'commonjs'`.");if(o.allowReturnOutsideFunction!=null)throw new Error("`sourceType: 'commonjs'` implies `allowReturnOutsideFunction: true`, please remove the `allowReturnOutsideFunction` option or use `sourceType: 'script'`.");if(o.allowNewTargetOutsideFunction!=null)throw new Error("`sourceType: 'commonjs'` implies `allowNewTargetOutsideFunction: true`, please remove the `allowNewTargetOutsideFunction` option or use `sourceType: 'script'`.")}return e}var{defineProperty:Xce}=Object,Oh=(o,e)=>{o&&Xce(o,e,{enumerable:!1,value:o[e]})};function ir(o){return Oh(o.loc.start,"index"),Oh(o.loc.end,"index"),o}var epe=o=>class extends o{parse(){let t=ir(super.parse());return this.optionFlags&256&&(t.tokens=t.tokens.map(ir)),t}parseRegExpLiteral({pattern:t,flags:r}){let s=null;try{s=new RegExp(t,r)}catch{}let a=this.estreeParseLiteral(s);return a.regex={pattern:t,flags:r},a}parseBigIntLiteral(t){let r;try{r=BigInt(t)}catch{r=null}let s=this.estreeParseLiteral(r);return s.bigint=String(s.value||t),s}parseDecimalLiteral(t){let s=this.estreeParseLiteral(null);return s.decimal=String(s.value||t),s}estreeParseLiteral(t){return this.parseLiteral(t,"Literal")}parseStringLiteral(t){return this.estreeParseLiteral(t)}parseNumericLiteral(t){return this.estreeParseLiteral(t)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(t){return this.estreeParseLiteral(t)}estreeParseChainExpression(t,r){let s=this.startNodeAtNode(t);return s.expression=t,this.finishNodeAt(s,"ChainExpression",r)}directiveToStmt(t){let r=t.value;delete t.value,this.castNodeTo(r,"Literal"),r.raw=r.extra.raw,r.value=r.extra.expressionValue;let s=this.castNodeTo(t,"ExpressionStatement");return s.expression=r,s.directive=r.extra.rawValue,delete r.extra,s}fillOptionalPropertiesForTSESLint(t){}cloneEstreeStringLiteral(t){let{start:r,end:s,loc:a,range:p,raw:u,value:f}=t,m=Object.create(t.constructor.prototype);return m.type="Literal",m.start=r,m.end=s,m.loc=a,m.range=p,m.raw=u,m.value=f,m}initFunction(t,r){super.initFunction(t,r),t.expression=!1}checkDeclaration(t){t!=null&&this.isObjectProperty(t)?this.checkDeclaration(t.value):super.checkDeclaration(t)}getObjectOrClassMethodParams(t){return t.value.params}isValidDirective(t){var r;return t.type==="ExpressionStatement"&&t.expression.type==="Literal"&&typeof t.expression.value=="string"&&!((r=t.expression.extra)!=null&&r.parenthesized)}parseBlockBody(t,r,s,a,p){super.parseBlockBody(t,r,s,a,p);let u=t.directives.map(f=>this.directiveToStmt(f));t.body=u.concat(t.body),delete t.directives}parsePrivateName(){let t=super.parsePrivateName();return this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(t):t}convertPrivateNameToPrivateIdentifier(t){let r=super.getPrivateNameSV(t);return delete t.id,t.name=r,this.castNodeTo(t,"PrivateIdentifier")}isPrivateName(t){return this.getPluginOption("estree","classFeatures")?t.type==="PrivateIdentifier":super.isPrivateName(t)}getPrivateNameSV(t){return this.getPluginOption("estree","classFeatures")?t.name:super.getPrivateNameSV(t)}parseLiteral(t,r){let s=super.parseLiteral(t,r);return s.raw=s.extra.raw,delete s.extra,s}parseFunctionBody(t,r,s=!1){super.parseFunctionBody(t,r,s),t.expression=t.body.type!=="BlockStatement"}parseMethod(t,r,s,a,p,u,f=!1){let m=this.startNode();m.kind=t.kind,m=super.parseMethod(m,r,s,a,p,u,f),delete m.kind;let{typeParameters:x}=t;x&&(delete t.typeParameters,m.typeParameters=x,this.resetStartLocationFromNode(m,x));let g=this.castNodeTo(m,"FunctionExpression");return t.value=g,u==="ClassPrivateMethod"&&(t.computed=!1),u==="ObjectMethod"?(t.kind==="method"&&(t.kind="init"),t.shorthand=!1,this.finishNode(t,"Property")):this.finishNode(t,"MethodDefinition")}nameIsConstructor(t){return t.type==="Literal"?t.value==="constructor":super.nameIsConstructor(t)}parseClassProperty(...t){let r=super.parseClassProperty(...t);return this.getPluginOption("estree","classFeatures")&&this.castNodeTo(r,"PropertyDefinition"),r}parseClassPrivateProperty(...t){let r=super.parseClassPrivateProperty(...t);return this.getPluginOption("estree","classFeatures")&&(this.castNodeTo(r,"PropertyDefinition"),r.computed=!1),r}parseClassAccessorProperty(t){let r=super.parseClassAccessorProperty(t);return this.getPluginOption("estree","classFeatures")&&(r.abstract&&this.hasPlugin("typescript")?(delete r.abstract,this.castNodeTo(r,"TSAbstractAccessorProperty")):this.castNodeTo(r,"AccessorProperty")),r}parseObjectProperty(t,r,s,a){let p=super.parseObjectProperty(t,r,s,a);return p&&(p.kind="init",this.castNodeTo(p,"Property")),p}finishObjectProperty(t){return t.kind="init",this.finishNode(t,"Property")}isValidLVal(t,r,s,a){return t==="Property"?"value":super.isValidLVal(t,r,s,a)}isAssignable(t,r){return t!=null&&this.isObjectProperty(t)?this.isAssignable(t.value,r):super.isAssignable(t,r)}toAssignable(t,r=!1){if(t!=null&&this.isObjectProperty(t)){let{key:s,value:a}=t;this.isPrivateName(s)&&this.classScope.usePrivateName(this.getPrivateNameSV(s),s.loc.start),this.toAssignable(a,r)}else super.toAssignable(t,r)}toAssignableObjectExpressionProp(t,r,s){t.type==="Property"&&(t.kind==="get"||t.kind==="set")?this.raise(R.PatternHasAccessor,t.key):t.type==="Property"&&t.method?this.raise(R.PatternHasMethod,t.key):super.toAssignableObjectExpressionProp(t,r,s)}finishCallExpression(t,r){let s=super.finishCallExpression(t,r);if(s.callee.type==="Import"){var a,p;this.castNodeTo(s,"ImportExpression"),s.source=s.arguments[0],s.options=(a=s.arguments[1])!=null?a:null,s.attributes=(p=s.arguments[1])!=null?p:null,delete s.arguments,delete s.callee}else s.type==="OptionalCallExpression"?this.castNodeTo(s,"CallExpression"):s.optional=!1;return s}toReferencedArguments(t){t.type!=="ImportExpression"&&super.toReferencedArguments(t)}parseExport(t,r){let s=this.state.lastTokStartLoc,a=super.parseExport(t,r);switch(a.type){case"ExportAllDeclaration":a.exported=null;break;case"ExportNamedDeclaration":a.specifiers.length===1&&a.specifiers[0].type==="ExportNamespaceSpecifier"&&(this.castNodeTo(a,"ExportAllDeclaration"),a.exported=a.specifiers[0].exported,delete a.specifiers);case"ExportDefaultDeclaration":{var p;let{declaration:u}=a;u?.type==="ClassDeclaration"&&((p=u.decorators)==null?void 0:p.length)>0&&u.start===a.start&&this.resetStartLocation(a,s)}break}return a}stopParseSubscript(t,r){let s=super.stopParseSubscript(t,r);return r.optionalChainMember?this.estreeParseChainExpression(s,t.loc.end):s}parseMember(t,r,s,a,p){let u=super.parseMember(t,r,s,a,p);return u.type==="OptionalMemberExpression"?this.castNodeTo(u,"MemberExpression"):u.optional=!1,u}isOptionalMemberExpression(t){return t.type==="ChainExpression"?t.expression.type==="MemberExpression":super.isOptionalMemberExpression(t)}hasPropertyAsPrivateName(t){return t.type==="ChainExpression"&&(t=t.expression),super.hasPropertyAsPrivateName(t)}isObjectProperty(t){return t.type==="Property"&&t.kind==="init"&&!t.method}isObjectMethod(t){return t.type==="Property"&&(t.method||t.kind==="get"||t.kind==="set")}castNodeTo(t,r){let s=super.castNodeTo(t,r);return this.fillOptionalPropertiesForTSESLint(s),s}cloneIdentifier(t){let r=super.cloneIdentifier(t);return this.fillOptionalPropertiesForTSESLint(r),r}cloneStringLiteral(t){return t.type==="Literal"?this.cloneEstreeStringLiteral(t):super.cloneStringLiteral(t)}finishNodeAt(t,r,s){return ir(super.finishNodeAt(t,r,s))}finishNode(t,r){let s=super.finishNode(t,r);return this.fillOptionalPropertiesForTSESLint(s),s}resetStartLocation(t,r){super.resetStartLocation(t,r),ir(t)}resetEndLocation(t,r=this.state.lastTokEndLoc){super.resetEndLocation(t,r),ir(t)}},Gt=class{constructor(e,t){this.token=void 0,this.preserveSpace=void 0,this.token=e,this.preserveSpace=!!t}},ce={brace:new Gt("{"),j_oTag:new Gt("<tag"),j_cTag:new Gt("</tag"),j_expr:new Gt("<tag>...</tag>",!0)};ce.template=new Gt("`",!0);var te=!0,U=!0,mc=!0,ar=!0,Dt=!0,tpe=!0,Gs=class{constructor(e,t={}){this.label=void 0,this.keyword=void 0,this.beforeExpr=void 0,this.startsExpr=void 0,this.rightAssociative=void 0,this.isLoop=void 0,this.isAssign=void 0,this.prefix=void 0,this.postfix=void 0,this.binop=void 0,this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.rightAssociative=!!t.rightAssociative,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop!=null?t.binop:null,this.updateContext=null}},jc=new Map;function ae(o,e={}){e.keyword=o;let t=Q(o,e);return jc.set(o,t),t}function Be(o,e){return Q(o,{beforeExpr:te,binop:e})}var lr=-1,It=[],Vc=[],Uc=[],Hc=[],Wc=[],$c=[];function Q(o,e={}){var t,r,s,a;return++lr,Vc.push(o),Uc.push((t=e.binop)!=null?t:-1),Hc.push((r=e.beforeExpr)!=null?r:!1),Wc.push((s=e.startsExpr)!=null?s:!1),$c.push((a=e.prefix)!=null?a:!1),It.push(new Gs(o,e)),lr}function oe(o,e={}){var t,r,s,a;return++lr,jc.set(o,lr),Vc.push(o),Uc.push((t=e.binop)!=null?t:-1),Hc.push((r=e.beforeExpr)!=null?r:!1),Wc.push((s=e.startsExpr)!=null?s:!1),$c.push((a=e.prefix)!=null?a:!1),It.push(new Gs("name",e)),lr}var ope={bracketL:Q("[",{beforeExpr:te,startsExpr:U}),bracketHashL:Q("#[",{beforeExpr:te,startsExpr:U}),bracketBarL:Q("[|",{beforeExpr:te,startsExpr:U}),bracketR:Q("]"),bracketBarR:Q("|]"),braceL:Q("{",{beforeExpr:te,startsExpr:U}),braceBarL:Q("{|",{beforeExpr:te,startsExpr:U}),braceHashL:Q("#{",{beforeExpr:te,startsExpr:U}),braceR:Q("}"),braceBarR:Q("|}"),parenL:Q("(",{beforeExpr:te,startsExpr:U}),parenR:Q(")"),comma:Q(",",{beforeExpr:te}),semi:Q(";",{beforeExpr:te}),colon:Q(":",{beforeExpr:te}),doubleColon:Q("::",{beforeExpr:te}),dot:Q("."),question:Q("?",{beforeExpr:te}),questionDot:Q("?."),arrow:Q("=>",{beforeExpr:te}),template:Q("template"),ellipsis:Q("...",{beforeExpr:te}),backQuote:Q("`",{startsExpr:U}),dollarBraceL:Q("${",{beforeExpr:te,startsExpr:U}),templateTail:Q("...`",{startsExpr:U}),templateNonTail:Q("...${",{beforeExpr:te,startsExpr:U}),at:Q("@"),hash:Q("#",{startsExpr:U}),interpreterDirective:Q("#!..."),eq:Q("=",{beforeExpr:te,isAssign:ar}),assign:Q("_=",{beforeExpr:te,isAssign:ar}),slashAssign:Q("_=",{beforeExpr:te,isAssign:ar}),xorAssign:Q("_=",{beforeExpr:te,isAssign:ar}),moduloAssign:Q("_=",{beforeExpr:te,isAssign:ar}),incDec:Q("++/--",{prefix:Dt,postfix:tpe,startsExpr:U}),bang:Q("!",{beforeExpr:te,prefix:Dt,startsExpr:U}),tilde:Q("~",{beforeExpr:te,prefix:Dt,startsExpr:U}),doubleCaret:Q("^^",{startsExpr:U}),doubleAt:Q("@@",{startsExpr:U}),pipeline:Be("|>",0),nullishCoalescing:Be("??",1),logicalOR:Be("||",1),logicalAND:Be("&&",2),bitwiseOR:Be("|",3),bitwiseXOR:Be("^",4),bitwiseAND:Be("&",5),equality:Be("==/!=/===/!==",6),lt:Be("</>/<=/>=",7),gt:Be("</>/<=/>=",7),relational:Be("</>/<=/>=",7),bitShift:Be("<</>>/>>>",8),bitShiftL:Be("<</>>/>>>",8),bitShiftR:Be("<</>>/>>>",8),plusMin:Q("+/-",{beforeExpr:te,binop:9,prefix:Dt,startsExpr:U}),modulo:Q("%",{binop:10,startsExpr:U}),star:Q("*",{binop:10}),slash:Be("/",10),exponent:Q("**",{beforeExpr:te,binop:11,rightAssociative:!0}),_in:ae("in",{beforeExpr:te,binop:7}),_instanceof:ae("instanceof",{beforeExpr:te,binop:7}),_break:ae("break"),_case:ae("case",{beforeExpr:te}),_catch:ae("catch"),_continue:ae("continue"),_debugger:ae("debugger"),_default:ae("default",{beforeExpr:te}),_else:ae("else",{beforeExpr:te}),_finally:ae("finally"),_function:ae("function",{startsExpr:U}),_if:ae("if"),_return:ae("return",{beforeExpr:te}),_switch:ae("switch"),_throw:ae("throw",{beforeExpr:te,prefix:Dt,startsExpr:U}),_try:ae("try"),_var:ae("var"),_const:ae("const"),_with:ae("with"),_new:ae("new",{beforeExpr:te,startsExpr:U}),_this:ae("this",{startsExpr:U}),_super:ae("super",{startsExpr:U}),_class:ae("class",{startsExpr:U}),_extends:ae("extends",{beforeExpr:te}),_export:ae("export"),_import:ae("import",{startsExpr:U}),_null:ae("null",{startsExpr:U}),_true:ae("true",{startsExpr:U}),_false:ae("false",{startsExpr:U}),_typeof:ae("typeof",{beforeExpr:te,prefix:Dt,startsExpr:U}),_void:ae("void",{beforeExpr:te,prefix:Dt,startsExpr:U}),_delete:ae("delete",{beforeExpr:te,prefix:Dt,startsExpr:U}),_do:ae("do",{isLoop:mc,beforeExpr:te}),_for:ae("for",{isLoop:mc}),_while:ae("while",{isLoop:mc}),_as:oe("as",{startsExpr:U}),_assert:oe("assert",{startsExpr:U}),_async:oe("async",{startsExpr:U}),_await:oe("await",{startsExpr:U}),_defer:oe("defer",{startsExpr:U}),_from:oe("from",{startsExpr:U}),_get:oe("get",{startsExpr:U}),_let:oe("let",{startsExpr:U}),_meta:oe("meta",{startsExpr:U}),_of:oe("of",{startsExpr:U}),_sent:oe("sent",{startsExpr:U}),_set:oe("set",{startsExpr:U}),_source:oe("source",{startsExpr:U}),_static:oe("static",{startsExpr:U}),_using:oe("using",{startsExpr:U}),_yield:oe("yield",{startsExpr:U}),_asserts:oe("asserts",{startsExpr:U}),_checks:oe("checks",{startsExpr:U}),_exports:oe("exports",{startsExpr:U}),_global:oe("global",{startsExpr:U}),_implements:oe("implements",{startsExpr:U}),_intrinsic:oe("intrinsic",{startsExpr:U}),_infer:oe("infer",{startsExpr:U}),_is:oe("is",{startsExpr:U}),_mixins:oe("mixins",{startsExpr:U}),_proto:oe("proto",{startsExpr:U}),_require:oe("require",{startsExpr:U}),_satisfies:oe("satisfies",{startsExpr:U}),_keyof:oe("keyof",{startsExpr:U}),_readonly:oe("readonly",{startsExpr:U}),_unique:oe("unique",{startsExpr:U}),_abstract:oe("abstract",{startsExpr:U}),_declare:oe("declare",{startsExpr:U}),_enum:oe("enum",{startsExpr:U}),_module:oe("module",{startsExpr:U}),_namespace:oe("namespace",{startsExpr:U}),_interface:oe("interface",{startsExpr:U}),_type:oe("type",{startsExpr:U}),_opaque:oe("opaque",{startsExpr:U}),name:Q("name",{startsExpr:U}),placeholder:Q("%%",{startsExpr:U}),string:Q("string",{startsExpr:U}),num:Q("num",{startsExpr:U}),bigint:Q("bigint",{startsExpr:U}),decimal:Q("decimal",{startsExpr:U}),regexp:Q("regexp",{startsExpr:U}),privateName:Q("#name",{startsExpr:U}),eof:Q("eof"),jsxName:Q("jsxName"),jsxText:Q("jsxText",{beforeExpr:te}),jsxTagStart:Q("jsxTagStart",{startsExpr:U}),jsxTagEnd:Q("jsxTagEnd")};function pe(o){return o>=93&&o<=133}function rpe(o){return o<=92}function pt(o){return o>=58&&o<=133}function Vh(o){return o>=58&&o<=137}function spe(o){return Hc[o]}function pr(o){return Wc[o]}function npe(o){return o>=29&&o<=33}function Mh(o){return o>=129&&o<=131}function ipe(o){return o>=90&&o<=92}function Gc(o){return o>=58&&o<=92}function ape(o){return o>=39&&o<=59}function cpe(o){return o===34}function ppe(o){return $c[o]}function dpe(o){return o>=121&&o<=123}function lpe(o){return o>=124&&o<=130}function Ft(o){return Vc[o]}function Ws(o){return Uc[o]}function upe(o){return o===57}function Ks(o){return o>=24&&o<=25}function Ct(o){return It[o]}It[8].updateContext=o=>{o.pop()};It[5].updateContext=It[7].updateContext=It[23].updateContext=o=>{o.push(ce.brace)};It[22].updateContext=o=>{o[o.length-1]===ce.template?o.pop():o.push(ce.template)};It[143].updateContext=o=>{o.push(ce.j_expr,ce.j_oTag)};var Kc="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",Uh="\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",mpe=new RegExp("["+Kc+"]"),hpe=new RegExp("["+Kc+Uh+"]");Kc=Uh=null;var Hh=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],fpe=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239];function yc(o,e){let t=65536;for(let r=0,s=e.length;r<s;r+=2){if(t+=e[r],t>o)return!1;if(t+=e[r+1],t>=o)return!0}return!1}function yt(o){return o<65?o===36:o<=90?!0:o<97?o===95:o<=122?!0:o<=65535?o>=170&&mpe.test(String.fromCharCode(o)):yc(o,Hh)}function Kt(o){return o<48?o===36:o<58?!0:o<65?!1:o<=90?!0:o<97?o===95:o<=122?!0:o<=65535?o>=170&&hpe.test(String.fromCharCode(o)):yc(o,Hh)||yc(o,fpe)}var qc={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},xpe=new Set(qc.keyword),gpe=new Set(qc.strict),bpe=new Set(qc.strictBind);function Wh(o,e){return e&&o==="await"||o==="enum"}function $h(o,e){return Wh(o,e)||gpe.has(o)}function Gh(o){return bpe.has(o)}function Kh(o,e){return $h(o,e)||Gh(o)}function ype(o){return xpe.has(o)}function Ape(o,e,t){return o===64&&e===64&&yt(t)}var Spe=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete","implements","interface","let","package","private","protected","public","static","yield","eval","arguments","enum","await"]);function zpe(o){return Spe.has(o)}var ur=class{constructor(e){this.flags=0,this.names=new Map,this.firstLexicalName="",this.flags=e}},mr=class{constructor(e,t){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=e,this.inModule=t}get inTopLevel(){return(this.currentScope().flags&1)>0}get inFunction(){return(this.currentVarScopeFlags()&2)>0}get allowSuper(){return(this.currentThisScopeFlags()&16)>0}get allowDirectSuper(){return(this.currentThisScopeFlags()&32)>0}get allowNewTarget(){return(this.currentThisScopeFlags()&512)>0}get inClass(){return(this.currentThisScopeFlags()&64)>0}get inClassAndNotInNonArrowFunction(){let e=this.currentThisScopeFlags();return(e&64)>0&&(e&2)===0}get inStaticBlock(){for(let e=this.scopeStack.length-1;;e--){let{flags:t}=this.scopeStack[e];if(t&128)return!0;if(t&1731)return!1}}get inNonArrowFunction(){return(this.currentThisScopeFlags()&2)>0}get inBareCaseStatement(){return(this.currentScope().flags&256)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(e){return new ur(e)}enter(e){this.scopeStack.push(this.createScope(e))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(e){return!!(e.flags&130||!this.parser.inModule&&e.flags&1)}declareName(e,t,r){let s=this.currentScope();if(t&8||t&16){this.checkRedeclarationInScope(s,e,t,r);let a=s.names.get(e)||0;t&16?a=a|4:(s.firstLexicalName||(s.firstLexicalName=e),a=a|2),s.names.set(e,a),t&8&&this.maybeExportDefined(s,e)}else if(t&4)for(let a=this.scopeStack.length-1;a>=0&&(s=this.scopeStack[a],this.checkRedeclarationInScope(s,e,t,r),s.names.set(e,(s.names.get(e)||0)|1),this.maybeExportDefined(s,e),!(s.flags&1667));--a);this.parser.inModule&&s.flags&1&&this.undefinedExports.delete(e)}maybeExportDefined(e,t){this.parser.inModule&&e.flags&1&&this.undefinedExports.delete(t)}checkRedeclarationInScope(e,t,r,s){this.isRedeclaredInScope(e,t,r)&&this.parser.raise(R.VarRedeclaration,s,{identifierName:t})}isRedeclaredInScope(e,t,r){if(!(r&1))return!1;if(r&8)return e.names.has(t);let s=e.names.get(t)||0;return r&16?(s&2)>0||!this.treatFunctionsAsVarInScope(e)&&(s&1)>0:(s&2)>0&&!(e.flags&8&&e.firstLexicalName===t)||!this.treatFunctionsAsVarInScope(e)&&(s&4)>0}checkLocalExport(e){let{name:t}=e;this.scopeStack[0].names.has(t)||this.undefinedExports.set(t,e.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let e=this.scopeStack.length-1;;e--){let{flags:t}=this.scopeStack[e];if(t&1667)return t}}currentThisScopeFlags(){for(let e=this.scopeStack.length-1;;e--){let{flags:t}=this.scopeStack[e];if(t&1731&&!(t&4))return t}}},Ac=class extends ur{constructor(...e){super(...e),this.declareFunctions=new Set}},Sc=class extends mr{createScope(e){return new Ac(e)}declareName(e,t,r){let s=this.currentScope();if(t&2048){this.checkRedeclarationInScope(s,e,t,r),this.maybeExportDefined(s,e),s.declareFunctions.add(e);return}super.declareName(e,t,r)}isRedeclaredInScope(e,t,r){if(super.isRedeclaredInScope(e,t,r))return!0;if(r&2048&&!e.declareFunctions.has(t)){let s=e.names.get(t);return(s&4)>0||(s&2)>0}return!1}checkLocalExport(e){this.scopeStack[0].declareFunctions.has(e.name)||super.checkLocalExport(e)}},Tpe=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),J=ct`flow`({AmbiguousConditionalArrow:"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",AmbiguousDeclareModuleKind:"Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",AssignReservedType:({reservedType:o})=>`Cannot overwrite reserved type ${o}.`,DeclareClassElement:"The `declare` modifier can only appear on class fields.",DeclareClassFieldInitializer:"Initializers are not allowed in fields with the `declare` modifier.",DuplicateDeclareModuleExports:"Duplicate `declare module.exports` statement.",EnumBooleanMemberNotInitialized:({memberName:o,enumName:e})=>`Boolean enum members need to be initialized. Use either \`${o} = true,\` or \`${o} = false,\` in enum \`${e}\`.`,EnumDuplicateMemberName:({memberName:o,enumName:e})=>`Enum member names need to be unique, but the name \`${o}\` has already been used before in enum \`${e}\`.`,EnumInconsistentMemberValues:({enumName:o})=>`Enum \`${o}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:o,enumName:e})=>`Enum type \`${o}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${e}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:o})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${o}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:o,memberName:e,explicitType:t})=>`Enum \`${o}\` has type \`${t}\`, so the initializer of \`${e}\` needs to be a ${t} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:o,memberName:e})=>`Symbol enum members cannot be initialized. Use \`${e},\` in enum \`${o}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:o,memberName:e})=>`The enum member initializer for \`${e}\` needs to be a literal (either a boolean, number, or string) in enum \`${o}\`.`,EnumInvalidMemberName:({enumName:o,memberName:e,suggestion:t})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${e}\`, consider using \`${t}\`, in enum \`${o}\`.`,EnumNumberMemberNotInitialized:({enumName:o,memberName:e})=>`Number enum members need to be initialized, e.g. \`${e} = 1\` in enum \`${o}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName:o})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${o}\`.`,GetterMayNotHaveThisParam:"A getter cannot have a `this` parameter.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` or `typeof` keyword.",ImportTypeShorthandOnlyInPureImport:"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",InexactInsideExact:"Explicit inexact syntax cannot appear inside an explicit exact object type.",InexactInsideNonObject:"Explicit inexact syntax cannot appear in class or interface definitions.",InexactVariance:"Explicit inexact syntax cannot have variance.",InvalidNonTypeImportInDeclareModule:"Imports within a `declare module` body must always be `import type` or `import typeof`.",MissingTypeParamDefault:"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",NestedDeclareModule:"`declare module` cannot be used inside another `declare module`.",NestedFlowComment:"Cannot have a flow comment inside another flow comment.",PatternIsOptional:Object.assign({message:"A binding pattern parameter cannot be optional in an implementation signature."},{reasonCode:"OptionalBindingPattern"}),SetterMayNotHaveThisParam:"A setter cannot have a `this` parameter.",SpreadVariance:"Spread properties cannot have variance.",ThisParamAnnotationRequired:"A type annotation is required for the `this` parameter.",ThisParamBannedInConstructor:"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",ThisParamMayNotBeOptional:"The `this` parameter cannot be optional.",ThisParamMustBeFirst:"The `this` parameter must be the first function parameter.",ThisParamNoDefault:"The `this` parameter may not have a default value.",TypeBeforeInitializer:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeCastInPattern:"The type cast expression is expected to be wrapped with parenthesis.",UnexpectedExplicitInexactInObject:"Explicit inexact syntax must appear at the end of an inexact object.",UnexpectedReservedType:({reservedType:o})=>`Unexpected reserved type ${o}.`,UnexpectedReservedUnderscore:"`_` is only allowed as a type argument to call or new.",UnexpectedSpaceBetweenModuloChecks:"Spaces between `%` and `checks` are not allowed here.",UnexpectedSpreadType:"Spread operator cannot appear in class or interface definitions.",UnexpectedSubtractionOperand:'Unexpected token, expected "number" or "bigint".',UnexpectedTokenAfterTypeParameter:"Expected an arrow function after this type parameter declaration.",UnexpectedTypeParameterBeforeAsyncArrowFunction:"Type parameters must come after the async keyword, e.g. instead of `<T> async () => {}`, use `async <T>() => {}`.",UnsupportedDeclareExportKind:({unsupportedExportKind:o,suggestion:e})=>`\`declare export ${o}\` is not supported. Use \`${e}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function Epe(o){return o.type==="DeclareExportAllDeclaration"||o.type==="DeclareExportDeclaration"&&(!o.declaration||o.declaration.type!=="TypeAlias"&&o.declaration.type!=="InterfaceDeclaration")}function kh(o){return o.importKind==="type"||o.importKind==="typeof"}var Cpe={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};function Ipe(o,e){let t=[],r=[];for(let s=0;s<o.length;s++)(e(o[s],s,o)?t:r).push(o[s]);return[t,r]}var Rpe=/\*?\s*@((?:no)?flow)\b/,wpe=o=>class extends o{constructor(...t){super(...t),this.flowPragma=void 0}getScopeHandler(){return Sc}shouldParseTypes(){return this.getPluginOption("flow","all")||this.flowPragma==="flow"}finishToken(t,r){t!==134&&t!==13&&t!==28&&this.flowPragma===void 0&&(this.flowPragma=null),super.finishToken(t,r)}addComment(t){if(this.flowPragma===void 0){let r=Rpe.exec(t.value);if(r)if(r[1]==="flow")this.flowPragma="flow";else if(r[1]==="noflow")this.flowPragma="noflow";else throw new Error("Unexpected flow pragma")}super.addComment(t)}flowParseTypeInitialiser(t){let r=this.state.inType;this.state.inType=!0,this.expect(t||14);let s=this.flowParseType();return this.state.inType=r,s}flowParsePredicate(){let t=this.startNode(),r=this.state.startLoc;return this.next(),this.expectContextual(110),this.state.lastTokStartLoc.index>r.index+1&&this.raise(J.UnexpectedSpaceBetweenModuloChecks,r),this.eat(10)?(t.value=super.parseExpression(),this.expect(11),this.finishNode(t,"DeclaredPredicate")):this.finishNode(t,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){let t=this.state.inType;this.state.inType=!0,this.expect(14);let r=null,s=null;return this.match(54)?(this.state.inType=t,s=this.flowParsePredicate()):(r=this.flowParseType(),this.state.inType=t,this.match(54)&&(s=this.flowParsePredicate())),[r,s]}flowParseDeclareClass(t){return this.next(),this.flowParseInterfaceish(t,!0),this.finishNode(t,"DeclareClass")}flowParseDeclareFunction(t){this.next();let r=t.id=this.parseIdentifier(),s=this.startNode(),a=this.startNode();this.match(47)?s.typeParameters=this.flowParseTypeParameterDeclaration():s.typeParameters=null,this.expect(10);let p=this.flowParseFunctionTypeParams();return s.params=p.params,s.rest=p.rest,s.this=p._this,this.expect(11),[s.returnType,t.predicate]=this.flowParseTypeAndPredicateInitialiser(),a.typeAnnotation=this.finishNode(s,"FunctionTypeAnnotation"),r.typeAnnotation=this.finishNode(a,"TypeAnnotation"),this.resetEndLocation(r),this.semicolon(),this.scope.declareName(t.id.name,2048,t.id.loc.start),this.finishNode(t,"DeclareFunction")}flowParseDeclare(t,r){if(this.match(80))return this.flowParseDeclareClass(t);if(this.match(68))return this.flowParseDeclareFunction(t);if(this.match(74))return this.flowParseDeclareVariable(t);if(this.eatContextual(127))return this.match(16)?this.flowParseDeclareModuleExports(t):(r&&this.raise(J.NestedDeclareModule,this.state.lastTokStartLoc),this.flowParseDeclareModule(t));if(this.isContextual(130))return this.flowParseDeclareTypeAlias(t);if(this.isContextual(131))return this.flowParseDeclareOpaqueType(t);if(this.isContextual(129))return this.flowParseDeclareInterface(t);if(this.match(82))return this.flowParseDeclareExportDeclaration(t,r);throw this.unexpected()}flowParseDeclareVariable(t){return this.next(),t.id=this.flowParseTypeAnnotatableIdentifier(),this.scope.declareName(t.id.name,5,t.id.loc.start),this.semicolon(),this.finishNode(t,"DeclareVariable")}flowParseDeclareModule(t){this.scope.enter(0),this.match(134)?t.id=super.parseExprAtom():t.id=this.parseIdentifier();let r=t.body=this.startNode(),s=r.body=[];for(this.expect(5);!this.match(8);){let u=this.startNode();this.match(83)?(this.next(),!this.isContextual(130)&&!this.match(87)&&this.raise(J.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),s.push(super.parseImport(u))):(this.expectContextual(125,J.UnsupportedStatementInDeclareModule),s.push(this.flowParseDeclare(u,!0)))}this.scope.exit(),this.expect(8),this.finishNode(r,"BlockStatement");let a=null,p=!1;return s.forEach(u=>{Epe(u)?(a==="CommonJS"&&this.raise(J.AmbiguousDeclareModuleKind,u),a="ES"):u.type==="DeclareModuleExports"&&(p&&this.raise(J.DuplicateDeclareModuleExports,u),a==="ES"&&this.raise(J.AmbiguousDeclareModuleKind,u),a="CommonJS",p=!0)}),t.kind=a||"CommonJS",this.finishNode(t,"DeclareModule")}flowParseDeclareExportDeclaration(t,r){if(this.expect(82),this.eat(65))return this.match(68)||this.match(80)?t.declaration=this.flowParseDeclare(this.startNode()):(t.declaration=this.flowParseType(),this.semicolon()),t.default=!0,this.finishNode(t,"DeclareExportDeclaration");if(this.match(75)||this.isLet()||(this.isContextual(130)||this.isContextual(129))&&!r){let s=this.state.value;throw this.raise(J.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:s,suggestion:Cpe[s]})}if(this.match(74)||this.match(68)||this.match(80)||this.isContextual(131))return t.declaration=this.flowParseDeclare(this.startNode()),t.default=!1,this.finishNode(t,"DeclareExportDeclaration");if(this.match(55)||this.match(5)||this.isContextual(129)||this.isContextual(130)||this.isContextual(131))return t=this.parseExport(t,null),t.type==="ExportNamedDeclaration"?(t.default=!1,delete t.exportKind,this.castNodeTo(t,"DeclareExportDeclaration")):this.castNodeTo(t,"DeclareExportAllDeclaration");throw this.unexpected()}flowParseDeclareModuleExports(t){return this.next(),this.expectContextual(111),t.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(t,"DeclareModuleExports")}flowParseDeclareTypeAlias(t){this.next();let r=this.flowParseTypeAlias(t);return this.castNodeTo(r,"DeclareTypeAlias"),r}flowParseDeclareOpaqueType(t){this.next();let r=this.flowParseOpaqueType(t,!0);return this.castNodeTo(r,"DeclareOpaqueType"),r}flowParseDeclareInterface(t){return this.next(),this.flowParseInterfaceish(t,!1),this.finishNode(t,"DeclareInterface")}flowParseInterfaceish(t,r){if(t.id=this.flowParseRestrictedIdentifier(!r,!0),this.scope.declareName(t.id.name,r?17:8201,t.id.loc.start),this.match(47)?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.extends=[],this.eat(81))do t.extends.push(this.flowParseInterfaceExtends());while(!r&&this.eat(12));if(r){if(t.implements=[],t.mixins=[],this.eatContextual(117))do t.mixins.push(this.flowParseInterfaceExtends());while(this.eat(12));if(this.eatContextual(113))do t.implements.push(this.flowParseInterfaceExtends());while(this.eat(12))}t.body=this.flowParseObjectType({allowStatic:r,allowExact:!1,allowSpread:!1,allowProto:r,allowInexact:!1})}flowParseInterfaceExtends(){let t=this.startNode();return t.id=this.flowParseQualifiedTypeIdentifier(),this.match(47)?t.typeParameters=this.flowParseTypeParameterInstantiation():t.typeParameters=null,this.finishNode(t,"InterfaceExtends")}flowParseInterface(t){return this.flowParseInterfaceish(t,!1),this.finishNode(t,"InterfaceDeclaration")}checkNotUnderscore(t){t==="_"&&this.raise(J.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(t,r,s){Tpe.has(t)&&this.raise(s?J.AssignReservedType:J.UnexpectedReservedType,r,{reservedType:t})}flowParseRestrictedIdentifierName(t,r){return this.checkReservedType(this.state.value,this.state.startLoc,r),this.parseIdentifierName(t)}flowParseRestrictedIdentifier(t,r){let s=this.startNode(),a=this.flowParseRestrictedIdentifierName(t,r);return this.createIdentifier(s,a)}flowParseTypeAlias(t){return t.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(t.id.name,8201,t.id.loc.start),this.match(47)?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(t,"TypeAlias")}flowParseOpaqueType(t,r){return this.expectContextual(130),t.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(t.id.name,8201,t.id.loc.start),this.match(47)?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.supertype=null,this.match(14)&&(t.supertype=this.flowParseTypeInitialiser(14)),t.impltype=null,r||(t.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(t,"OpaqueType")}flowParseTypeParameterBound(){if(this.match(14)||this.isContextual(81)){let t=this.startNode();return this.next(),t.typeAnnotation=this.flowParseType(),this.finishNode(t,"TypeAnnotation")}}flowParseTypeParameter(t=!1){let r=this.state.startLoc,s=this.startNode(),a=this.flowParseVariance();return s.name=this.flowParseRestrictedIdentifierName(),s.variance=a,s.bound=this.flowParseTypeParameterBound(),this.match(29)?(this.eat(29),s.default=this.flowParseType()):t&&this.raise(J.MissingTypeParamDefault,r),this.finishNode(s,"TypeParameter")}flowParseTypeParameterDeclaration(){let t=this.state.inType,r=this.startNode();r.params=[],this.state.inType=!0,this.match(47)||this.match(143)?this.next():this.unexpected();let s=!1;do{let a=this.flowParseTypeParameter(s);r.params.push(a),a.default&&(s=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=t,this.finishNode(r,"TypeParameterDeclaration")}flowInTopLevelContext(t){if(this.curContext()!==ce.brace){let r=this.state.context;this.state.context=[r[0]];try{return t()}finally{this.state.context=r}}else return t()}flowParseTypeParameterInstantiationInExpression(){if(this.reScan_lt()===47)return this.flowParseTypeParameterInstantiation()}flowParseTypeParameterInstantiation(){let t=this.startNode(),r=this.state.inType;return this.state.inType=!0,t.params=[],this.flowInTopLevelContext(()=>{this.expect(47);let s=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)t.params.push(this.flowParseType()),this.match(48)||this.expect(12);this.state.noAnonFunctionType=s}),this.state.inType=r,!this.state.inType&&this.curContext()===ce.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(t,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){if(this.reScan_lt()!==47)return null;let t=this.startNode(),r=this.state.inType;for(t.params=[],this.state.inType=!0,this.expect(47);!this.match(48);)t.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(48)||this.expect(12);return this.expect(48),this.state.inType=r,this.finishNode(t,"TypeParameterInstantiation")}flowParseInterfaceType(){let t=this.startNode();if(this.expectContextual(129),t.extends=[],this.eat(81))do t.extends.push(this.flowParseInterfaceExtends());while(this.eat(12));return t.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(t,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(135)||this.match(134)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(t,r,s){return t.static=r,this.lookahead().type===14?(t.id=this.flowParseObjectPropertyKey(),t.key=this.flowParseTypeInitialiser()):(t.id=null,t.key=this.flowParseType()),this.expect(3),t.value=this.flowParseTypeInitialiser(),t.variance=s,this.finishNode(t,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(t,r){return t.static=r,t.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10)?(t.method=!0,t.optional=!1,t.value=this.flowParseObjectTypeMethodish(this.startNodeAt(t.loc.start))):(t.method=!1,this.eat(17)&&(t.optional=!0),t.value=this.flowParseTypeInitialiser()),this.finishNode(t,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(t){for(t.params=[],t.rest=null,t.typeParameters=null,t.this=null,this.match(47)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(10),this.match(78)&&(t.this=this.flowParseFunctionTypeParam(!0),t.this.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)t.params.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(t.rest=this.flowParseFunctionTypeParam(!1)),this.expect(11),t.returnType=this.flowParseTypeInitialiser(),this.finishNode(t,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(t,r){let s=this.startNode();return t.static=r,t.value=this.flowParseObjectTypeMethodish(s),this.finishNode(t,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:t,allowExact:r,allowSpread:s,allowProto:a,allowInexact:p}){let u=this.state.inType;this.state.inType=!0;let f=this.startNode();f.callProperties=[],f.properties=[],f.indexers=[],f.internalSlots=[];let m,x,g=!1;for(r&&this.match(6)?(this.expect(6),m=9,x=!0):(this.expect(5),m=8,x=!1),f.exact=x;!this.match(m);){let w=!1,k=null,F=null,Y=this.startNode();if(a&&this.isContextual(118)){let ee=this.lookahead();ee.type!==14&&ee.type!==17&&(this.next(),k=this.state.startLoc,t=!1)}if(t&&this.isContextual(106)){let ee=this.lookahead();ee.type!==14&&ee.type!==17&&(this.next(),w=!0)}let W=this.flowParseVariance();if(this.eat(0))k!=null&&this.unexpected(k),this.eat(0)?(W&&this.unexpected(W.loc.start),f.internalSlots.push(this.flowParseObjectTypeInternalSlot(Y,w))):f.indexers.push(this.flowParseObjectTypeIndexer(Y,w,W));else if(this.match(10)||this.match(47))k!=null&&this.unexpected(k),W&&this.unexpected(W.loc.start),f.callProperties.push(this.flowParseObjectTypeCallProperty(Y,w));else{let ee="init";if(this.isContextual(99)||this.isContextual(104)){let Te=this.lookahead();Vh(Te.type)&&(ee=this.state.value,this.next())}let de=this.flowParseObjectTypeProperty(Y,w,k,W,ee,s,p??!x);de===null?(g=!0,F=this.state.lastTokStartLoc):f.properties.push(de)}this.flowObjectTypeSemicolon(),F&&!this.match(8)&&!this.match(9)&&this.raise(J.UnexpectedExplicitInexactInObject,F)}this.expect(m),s&&(f.inexact=g);let z=this.finishNode(f,"ObjectTypeAnnotation");return this.state.inType=u,z}flowParseObjectTypeProperty(t,r,s,a,p,u,f){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(u?f||this.raise(J.InexactInsideExact,this.state.lastTokStartLoc):this.raise(J.InexactInsideNonObject,this.state.lastTokStartLoc),a&&this.raise(J.InexactVariance,a),null):(u||this.raise(J.UnexpectedSpreadType,this.state.lastTokStartLoc),s!=null&&this.unexpected(s),a&&this.raise(J.SpreadVariance,a),t.argument=this.flowParseType(),this.finishNode(t,"ObjectTypeSpreadProperty"));{t.key=this.flowParseObjectPropertyKey(),t.static=r,t.proto=s!=null,t.kind=p;let m=!1;return this.match(47)||this.match(10)?(t.method=!0,s!=null&&this.unexpected(s),a&&this.unexpected(a.loc.start),t.value=this.flowParseObjectTypeMethodish(this.startNodeAt(t.loc.start)),(p==="get"||p==="set")&&this.flowCheckGetterSetterParams(t),!u&&t.key.name==="constructor"&&t.value.this&&this.raise(J.ThisParamBannedInConstructor,t.value.this)):(p!=="init"&&this.unexpected(),t.method=!1,this.eat(17)&&(m=!0),t.value=this.flowParseTypeInitialiser(),t.variance=a),t.optional=m,this.finishNode(t,"ObjectTypeProperty")}}flowCheckGetterSetterParams(t){let r=t.kind==="get"?0:1,s=t.value.params.length+(t.value.rest?1:0);t.value.this&&this.raise(t.kind==="get"?J.GetterMayNotHaveThisParam:J.SetterMayNotHaveThisParam,t.value.this),s!==r&&this.raise(t.kind==="get"?R.BadGetterArity:R.BadSetterArity,t),t.kind==="set"&&t.value.rest&&this.raise(R.BadSetterRestParameter,t)}flowObjectTypeSemicolon(){!this.eat(13)&&!this.eat(12)&&!this.match(8)&&!this.match(9)&&this.unexpected()}flowParseQualifiedTypeIdentifier(t,r){t??(t=this.state.startLoc);let s=r||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){let a=this.startNodeAt(t);a.qualification=s,a.id=this.flowParseRestrictedIdentifier(!0),s=this.finishNode(a,"QualifiedTypeIdentifier")}return s}flowParseGenericType(t,r){let s=this.startNodeAt(t);return s.typeParameters=null,s.id=this.flowParseQualifiedTypeIdentifier(t,r),this.match(47)&&(s.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(s,"GenericTypeAnnotation")}flowParseTypeofType(){let t=this.startNode();return this.expect(87),t.argument=this.flowParsePrimaryType(),this.finishNode(t,"TypeofTypeAnnotation")}flowParseTupleType(){let t=this.startNode();for(t.types=[],this.expect(0);this.state.pos<this.length&&!this.match(3)&&(t.types.push(this.flowParseType()),!this.match(3));)this.expect(12);return this.expect(3),this.finishNode(t,"TupleTypeAnnotation")}flowParseFunctionTypeParam(t){let r=null,s=!1,a=null,p=this.startNode(),u=this.lookahead(),f=this.state.type===78;return u.type===14||u.type===17?(f&&!t&&this.raise(J.ThisParamMustBeFirst,p),r=this.parseIdentifier(f),this.eat(17)&&(s=!0,f&&this.raise(J.ThisParamMayNotBeOptional,p)),a=this.flowParseTypeInitialiser()):a=this.flowParseType(),p.name=r,p.optional=s,p.typeAnnotation=a,this.finishNode(p,"FunctionTypeParam")}reinterpretTypeAsFunctionTypeParam(t){let r=this.startNodeAt(t.loc.start);return r.name=null,r.optional=!1,r.typeAnnotation=t,this.finishNode(r,"FunctionTypeParam")}flowParseFunctionTypeParams(t=[]){let r=null,s=null;for(this.match(78)&&(s=this.flowParseFunctionTypeParam(!0),s.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)t.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(r=this.flowParseFunctionTypeParam(!1)),{params:t,rest:r,_this:s}}flowIdentToTypeAnnotation(t,r,s){switch(s.name){case"any":return this.finishNode(r,"AnyTypeAnnotation");case"bool":case"boolean":return this.finishNode(r,"BooleanTypeAnnotation");case"mixed":return this.finishNode(r,"MixedTypeAnnotation");case"empty":return this.finishNode(r,"EmptyTypeAnnotation");case"number":return this.finishNode(r,"NumberTypeAnnotation");case"string":return this.finishNode(r,"StringTypeAnnotation");case"symbol":return this.finishNode(r,"SymbolTypeAnnotation");default:return this.checkNotUnderscore(s.name),this.flowParseGenericType(t,s)}}flowParsePrimaryType(){let t=this.state.startLoc,r=this.startNode(),s,a,p=!1,u=this.state.noAnonFunctionType;switch(this.state.type){case 5:return this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!0,allowProto:!1,allowInexact:!0});case 6:return this.flowParseObjectType({allowStatic:!1,allowExact:!0,allowSpread:!0,allowProto:!1,allowInexact:!1});case 0:return this.state.noAnonFunctionType=!1,a=this.flowParseTupleType(),this.state.noAnonFunctionType=u,a;case 47:{let f=this.startNode();return f.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(10),s=this.flowParseFunctionTypeParams(),f.params=s.params,f.rest=s.rest,f.this=s._this,this.expect(11),this.expect(19),f.returnType=this.flowParseType(),this.finishNode(f,"FunctionTypeAnnotation")}case 10:{let f=this.startNode();if(this.next(),!this.match(11)&&!this.match(21))if(pe(this.state.type)||this.match(78)){let m=this.lookahead().type;p=m!==17&&m!==14}else p=!0;if(p){if(this.state.noAnonFunctionType=!1,a=this.flowParseType(),this.state.noAnonFunctionType=u,this.state.noAnonFunctionType||!(this.match(12)||this.match(11)&&this.lookahead().type===19))return this.expect(11),a;this.eat(12)}return a?s=this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(a)]):s=this.flowParseFunctionTypeParams(),f.params=s.params,f.rest=s.rest,f.this=s._this,this.expect(11),this.expect(19),f.returnType=this.flowParseType(),f.typeParameters=null,this.finishNode(f,"FunctionTypeAnnotation")}case 134:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case 85:case 86:return r.value=this.match(85),this.next(),this.finishNode(r,"BooleanLiteralTypeAnnotation");case 53:if(this.state.value==="-"){if(this.next(),this.match(135))return this.parseLiteralAtNode(-this.state.value,"NumberLiteralTypeAnnotation",r);if(this.match(136))return this.parseLiteralAtNode(-this.state.value,"BigIntLiteralTypeAnnotation",r);throw this.raise(J.UnexpectedSubtractionOperand,this.state.startLoc)}throw this.unexpected();case 135:return this.parseLiteral(this.state.value,"NumberLiteralTypeAnnotation");case 136:return this.parseLiteral(this.state.value,"BigIntLiteralTypeAnnotation");case 88:return this.next(),this.finishNode(r,"VoidTypeAnnotation");case 84:return this.next(),this.finishNode(r,"NullLiteralTypeAnnotation");case 78:return this.next(),this.finishNode(r,"ThisTypeAnnotation");case 55:return this.next(),this.finishNode(r,"ExistsTypeAnnotation");case 87:return this.flowParseTypeofType();default:if(Gc(this.state.type)){let f=Ft(this.state.type);return this.next(),super.createIdentifier(r,f)}else if(pe(this.state.type))return this.isContextual(129)?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(t,r,this.parseIdentifier())}throw this.unexpected()}flowParsePostfixType(){let t=this.state.startLoc,r=this.flowParsePrimaryType(),s=!1;for(;(this.match(0)||this.match(18))&&!this.canInsertSemicolon();){let a=this.startNodeAt(t),p=this.eat(18);s=s||p,this.expect(0),!p&&this.match(3)?(a.elementType=r,this.next(),r=this.finishNode(a,"ArrayTypeAnnotation")):(a.objectType=r,a.indexType=this.flowParseType(),this.expect(3),s?(a.optional=p,r=this.finishNode(a,"OptionalIndexedAccessType")):r=this.finishNode(a,"IndexedAccessType"))}return r}flowParsePrefixType(){let t=this.startNode();return this.eat(17)?(t.typeAnnotation=this.flowParsePrefixType(),this.finishNode(t,"NullableTypeAnnotation")):this.flowParsePostfixType()}flowParseAnonFunctionWithoutParens(){let t=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(19)){let r=this.startNodeAt(t.loc.start);return r.params=[this.reinterpretTypeAsFunctionTypeParam(t)],r.rest=null,r.this=null,r.returnType=this.flowParseType(),r.typeParameters=null,this.finishNode(r,"FunctionTypeAnnotation")}return t}flowParseIntersectionType(){let t=this.startNode();this.eat(45);let r=this.flowParseAnonFunctionWithoutParens();for(t.types=[r];this.eat(45);)t.types.push(this.flowParseAnonFunctionWithoutParens());return t.types.length===1?r:this.finishNode(t,"IntersectionTypeAnnotation")}flowParseUnionType(){let t=this.startNode();this.eat(43);let r=this.flowParseIntersectionType();for(t.types=[r];this.eat(43);)t.types.push(this.flowParseIntersectionType());return t.types.length===1?r:this.finishNode(t,"UnionTypeAnnotation")}flowParseType(){let t=this.state.inType;this.state.inType=!0;let r=this.flowParseUnionType();return this.state.inType=t,r}flowParseTypeOrImplicitInstantiation(){if(this.state.type===132&&this.state.value==="_"){let t=this.state.startLoc,r=this.parseIdentifier();return this.flowParseGenericType(t,r)}else return this.flowParseType()}flowParseTypeAnnotation(){let t=this.startNode();return t.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(t,"TypeAnnotation")}flowParseTypeAnnotatableIdentifier(){let t=this.startNode(),r=this.parseIdentifierName();return this.match(14)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),this.createIdentifier(t,r)}typeCastToParameter(t){return t.expression.typeAnnotation=t.typeAnnotation,this.resetEndLocation(t.expression,t.typeAnnotation.loc.end),t.expression}flowParseVariance(){let t=null;return this.match(53)?(t=this.startNode(),this.state.value==="+"?t.kind="plus":t.kind="minus",this.next(),this.finishNode(t,"Variance")):t}parseFunctionBody(t,r,s=!1){if(r){this.forwardNoArrowParamsConversionAt(t,()=>super.parseFunctionBody(t,!0,s));return}super.parseFunctionBody(t,!1,s)}parseFunctionBodyAndFinish(t,r,s=!1){if(this.match(14)){let a=this.startNode();[a.typeAnnotation,t.predicate]=this.flowParseTypeAndPredicateInitialiser(),t.returnType=a.typeAnnotation?this.finishNode(a,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(t,r,s)}parseStatementLike(t){if(this.state.strict&&this.isContextual(129)){let s=this.lookahead();if(pt(s.type)){let a=this.startNode();return this.next(),this.flowParseInterface(a)}}else if(this.isContextual(126)){let s=this.startNode();return this.next(),this.flowParseEnumDeclaration(s)}let r=super.parseStatementLike(t);return this.flowPragma===void 0&&!this.isValidDirective(r)&&(this.flowPragma=null),r}parseExpressionStatement(t,r,s){if(r.type==="Identifier"){if(r.name==="declare"){if(this.match(80)||pe(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(t)}else if(pe(this.state.type)){if(r.name==="interface")return this.flowParseInterface(t);if(r.name==="type")return this.flowParseTypeAlias(t);if(r.name==="opaque")return this.flowParseOpaqueType(t,!1)}}return super.parseExpressionStatement(t,r,s)}shouldParseExportDeclaration(){let{type:t}=this.state;return t===126||Mh(t)?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){let{type:t}=this.state;return t===126||Mh(t)?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.isContextual(126)){let t=this.startNode();return this.next(),this.flowParseEnumDeclaration(t)}return super.parseExportDefaultExpression()}parseConditional(t,r,s){if(!this.match(17))return t;if(this.state.maybeInArrowParameters){let z=this.lookaheadCharCode();if(z===44||z===61||z===58||z===41)return this.setOptionalParametersError(s),t}this.expect(17);let a=this.state.clone(),p=this.state.noArrowAt,u=this.startNodeAt(r),{consequent:f,failed:m}=this.tryParseConditionalConsequent(),[x,g]=this.getArrowLikeExpressions(f);if(m||g.length>0){let z=[...p];if(g.length>0){this.state=a,this.state.noArrowAt=z;for(let w=0;w<g.length;w++)z.push(g[w].start);({consequent:f,failed:m}=this.tryParseConditionalConsequent()),[x,g]=this.getArrowLikeExpressions(f)}m&&x.length>1&&this.raise(J.AmbiguousConditionalArrow,a.startLoc),m&&x.length===1&&(this.state=a,z.push(x[0].start),this.state.noArrowAt=z,{consequent:f,failed:m}=this.tryParseConditionalConsequent())}return this.getArrowLikeExpressions(f,!0),this.state.noArrowAt=p,this.expect(14),u.test=t,u.consequent=f,u.alternate=this.forwardNoArrowParamsConversionAt(u,()=>this.parseMaybeAssign(void 0,void 0)),this.finishNode(u,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);let t=this.parseMaybeAssignAllowIn(),r=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:t,failed:r}}getArrowLikeExpressions(t,r){let s=[t],a=[];for(;s.length!==0;){let p=s.pop();p.type==="ArrowFunctionExpression"&&p.body.type!=="BlockStatement"?(p.typeParameters||!p.returnType?this.finishArrowValidation(p):a.push(p),s.push(p.body)):p.type==="ConditionalExpression"&&(s.push(p.consequent),s.push(p.alternate))}return r?(a.forEach(p=>this.finishArrowValidation(p)),[a,[]]):Ipe(a,p=>p.params.every(u=>this.isAssignable(u,!0)))}finishArrowValidation(t){var r;this.toAssignableList(t.params,(r=t.extra)==null?void 0:r.trailingCommaLoc,!1),this.scope.enter(518),super.checkParams(t,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(t,r){let s;return this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(t.start))?(this.state.noArrowParamsConversionAt.push(this.state.start),s=r(),this.state.noArrowParamsConversionAt.pop()):s=r(),s}parseParenItem(t,r){let s=super.parseParenItem(t,r);if(this.eat(17)&&(s.optional=!0,this.resetEndLocation(t)),this.match(14)){let a=this.startNodeAt(r);return a.expression=s,a.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(a,"TypeCastExpression")}return s}assertModuleNodeAllowed(t){t.type==="ImportDeclaration"&&(t.importKind==="type"||t.importKind==="typeof")||t.type==="ExportNamedDeclaration"&&t.exportKind==="type"||t.type==="ExportAllDeclaration"&&t.exportKind==="type"||super.assertModuleNodeAllowed(t)}parseExportDeclaration(t){if(this.isContextual(130)){t.exportKind="type";let r=this.startNode();return this.next(),this.match(5)?(t.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(t),null):this.flowParseTypeAlias(r)}else if(this.isContextual(131)){t.exportKind="type";let r=this.startNode();return this.next(),this.flowParseOpaqueType(r,!1)}else if(this.isContextual(129)){t.exportKind="type";let r=this.startNode();return this.next(),this.flowParseInterface(r)}else if(this.isContextual(126)){t.exportKind="value";let r=this.startNode();return this.next(),this.flowParseEnumDeclaration(r)}else return super.parseExportDeclaration(t)}eatExportStar(t){return super.eatExportStar(t)?!0:this.isContextual(130)&&this.lookahead().type===55?(t.exportKind="type",this.next(),this.next(),!0):!1}maybeParseExportNamespaceSpecifier(t){let{startLoc:r}=this.state,s=super.maybeParseExportNamespaceSpecifier(t);return s&&t.exportKind==="type"&&this.unexpected(r),s}parseClassId(t,r,s){super.parseClassId(t,r,s),this.match(47)&&(t.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(t,r,s){let{startLoc:a}=this.state;if(this.isContextual(125)){if(super.parseClassMemberFromModifier(t,r))return;r.declare=!0}super.parseClassMember(t,r,s),r.declare&&(r.type!=="ClassProperty"&&r.type!=="ClassPrivateProperty"&&r.type!=="PropertyDefinition"?this.raise(J.DeclareClassElement,a):r.value&&this.raise(J.DeclareClassFieldInitializer,r.value))}isIterator(t){return t==="iterator"||t==="asyncIterator"}readIterator(){let t=super.readWord1(),r="@@"+t;(!this.isIterator(t)||!this.state.inType)&&this.raise(R.InvalidIdentifier,this.state.curPosition(),{identifierName:r}),this.finishToken(132,r)}getTokenFromCode(t){let r=this.input.charCodeAt(this.state.pos+1);t===123&&r===124?this.finishOp(6,2):this.state.inType&&(t===62||t===60)?this.finishOp(t===62?48:47,1):this.state.inType&&t===63?r===46?this.finishOp(18,2):this.finishOp(17,1):Ape(t,r,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(t)}isAssignable(t,r){return t.type==="TypeCastExpression"?this.isAssignable(t.expression,r):super.isAssignable(t,r)}toAssignable(t,r=!1){!r&&t.type==="AssignmentExpression"&&t.left.type==="TypeCastExpression"&&(t.left=this.typeCastToParameter(t.left)),super.toAssignable(t,r)}toAssignableList(t,r,s){for(let a=0;a<t.length;a++){let p=t[a];p?.type==="TypeCastExpression"&&(t[a]=this.typeCastToParameter(p))}super.toAssignableList(t,r,s)}toReferencedList(t,r){for(let a=0;a<t.length;a++){var s;let p=t[a];p&&p.type==="TypeCastExpression"&&!((s=p.extra)!=null&&s.parenthesized)&&(t.length>1||!r)&&this.raise(J.TypeCastInPattern,p.typeAnnotation)}return t}parseArrayLike(t,r,s){let a=super.parseArrayLike(t,r,s);return s!=null&&!this.state.maybeInArrowParameters&&this.toReferencedList(a.elements),a}isValidLVal(t,r,s,a){return t==="TypeCastExpression"||super.isValidLVal(t,r,s,a)}parseClassProperty(t){return this.match(14)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(t)}parseClassPrivateProperty(t){return this.match(14)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(t)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(t){return!this.match(14)&&super.isNonstaticConstructor(t)}pushClassMethod(t,r,s,a,p,u){if(r.variance&&this.unexpected(r.variance.loc.start),delete r.variance,this.match(47)&&(r.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(t,r,s,a,p,u),r.params&&p){let f=r.params;f.length>0&&this.isThisParam(f[0])&&this.raise(J.ThisParamBannedInConstructor,r)}else if(r.type==="MethodDefinition"&&p&&r.value.params){let f=r.value.params;f.length>0&&this.isThisParam(f[0])&&this.raise(J.ThisParamBannedInConstructor,r)}}pushClassPrivateMethod(t,r,s,a){r.variance&&this.unexpected(r.variance.loc.start),delete r.variance,this.match(47)&&(r.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(t,r,s,a)}parseClassSuper(t){if(super.parseClassSuper(t),t.superClass&&(this.match(47)||this.match(51))&&(t.superTypeParameters=this.flowParseTypeParameterInstantiationInExpression()),this.isContextual(113)){this.next();let r=t.implements=[];do{let s=this.startNode();s.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?s.typeParameters=this.flowParseTypeParameterInstantiation():s.typeParameters=null,r.push(this.finishNode(s,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(t){super.checkGetterSetterParams(t);let r=this.getObjectOrClassMethodParams(t);if(r.length>0){let s=r[0];this.isThisParam(s)&&t.kind==="get"?this.raise(J.GetterMayNotHaveThisParam,s):this.isThisParam(s)&&this.raise(J.SetterMayNotHaveThisParam,s)}}parsePropertyNamePrefixOperator(t){t.variance=this.flowParseVariance()}parseObjPropValue(t,r,s,a,p,u,f){t.variance&&this.unexpected(t.variance.loc.start),delete t.variance;let m;this.match(47)&&!u&&(m=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());let x=super.parseObjPropValue(t,r,s,a,p,u,f);return m&&((x.value||x).typeParameters=m),x}parseFunctionParamType(t){return this.eat(17)&&(t.type!=="Identifier"&&this.raise(J.PatternIsOptional,t),this.isThisParam(t)&&this.raise(J.ThisParamMayNotBeOptional,t),t.optional=!0),this.match(14)?t.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(t)&&this.raise(J.ThisParamAnnotationRequired,t),this.match(29)&&this.isThisParam(t)&&this.raise(J.ThisParamNoDefault,t),this.resetEndLocation(t),t}parseMaybeDefault(t,r){let s=super.parseMaybeDefault(t,r);return s.type==="AssignmentPattern"&&s.typeAnnotation&&s.right.start<s.typeAnnotation.start&&this.raise(J.TypeBeforeInitializer,s.typeAnnotation),s}checkImportReflection(t){super.checkImportReflection(t),t.module&&t.importKind!=="value"&&this.raise(J.ImportReflectionHasImportType,t.specifiers[0].loc.start)}parseImportSpecifierLocal(t,r,s){r.local=kh(t)?this.flowParseRestrictedIdentifier(!0,!0):this.parseIdentifier(),t.specifiers.push(this.finishImportSpecifier(r,s))}isPotentialImportPhase(t){if(super.isPotentialImportPhase(t))return!0;if(this.isContextual(130)){if(!t)return!0;let r=this.lookaheadCharCode();return r===123||r===42}return!t&&this.isContextual(87)}applyImportPhase(t,r,s,a){if(super.applyImportPhase(t,r,s,a),r){if(!s&&this.match(65))return;t.exportKind=s==="type"?s:"value"}else s==="type"&&this.match(55)&&this.unexpected(),t.importKind=s==="type"||s==="typeof"?s:"value"}parseImportSpecifier(t,r,s,a,p){let u=t.imported,f=null;u.type==="Identifier"&&(u.name==="type"?f="type":u.name==="typeof"&&(f="typeof"));let m=!1;if(this.isContextual(93)&&!this.isLookaheadContextual("as")){let g=this.parseIdentifier(!0);f!==null&&!pt(this.state.type)?(t.imported=g,t.importKind=f,t.local=this.cloneIdentifier(g)):(t.imported=u,t.importKind=null,t.local=this.parseIdentifier())}else{if(f!==null&&pt(this.state.type))t.imported=this.parseIdentifier(!0),t.importKind=f;else{if(r)throw this.raise(R.ImportBindingIsString,t,{importName:u.value});t.imported=u,t.importKind=null}this.eatContextual(93)?t.local=this.parseIdentifier():(m=!0,t.local=this.cloneIdentifier(t.imported))}let x=kh(t);return s&&x&&this.raise(J.ImportTypeShorthandOnlyInPureImport,t),(s||x)&&this.checkReservedType(t.local.name,t.local.loc.start,!0),m&&!s&&!x&&this.checkReservedWord(t.local.name,t.loc.start,!0,!0),this.finishImportSpecifier(t,"ImportSpecifier")}parseBindingAtom(){return this.state.type===78?this.parseIdentifier(!0):super.parseBindingAtom()}parseFunctionParams(t,r){let s=t.kind;s!=="get"&&s!=="set"&&this.match(47)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.parseFunctionParams(t,r)}parseVarId(t,r){super.parseVarId(t,r),this.match(14)&&(t.id.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(t.id))}parseAsyncArrowFromCallExpression(t,r){if(this.match(14)){let s=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,t.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=s}return super.parseAsyncArrowFromCallExpression(t,r)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}parseMaybeAssign(t,r){var s;let a=null,p;if(this.hasPlugin("jsx")&&(this.match(143)||this.match(47))){if(a=this.state.clone(),p=this.tryParse(()=>super.parseMaybeAssign(t,r),a),!p.error)return p.node;let{context:m}=this.state,x=m[m.length-1];(x===ce.j_oTag||x===ce.j_expr)&&m.pop()}if((s=p)!=null&&s.error||this.match(47)){var u,f;a=a||this.state.clone();let m,x=this.tryParse(z=>{var w;m=this.flowParseTypeParameterDeclaration();let k=this.forwardNoArrowParamsConversionAt(m,()=>{let Y=super.parseMaybeAssign(t,r);return this.resetStartLocationFromNode(Y,m),Y});(w=k.extra)!=null&&w.parenthesized&&z();let F=this.maybeUnwrapTypeCastExpression(k);return F.type!=="ArrowFunctionExpression"&&z(),F.typeParameters=m,this.resetStartLocationFromNode(F,m),k},a),g=null;if(x.node&&this.maybeUnwrapTypeCastExpression(x.node).type==="ArrowFunctionExpression"){if(!x.error&&!x.aborted)return x.node.async&&this.raise(J.UnexpectedTypeParameterBeforeAsyncArrowFunction,m),x.node;g=x.node}if((u=p)!=null&&u.node)return this.state=p.failState,p.node;if(g)return this.state=x.failState,g;throw(f=p)!=null&&f.thrown?p.error:x.thrown?x.error:this.raise(J.UnexpectedTokenAfterTypeParameter,m)}return super.parseMaybeAssign(t,r)}parseArrow(t){if(this.match(14)){let r=this.tryParse(()=>{let s=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;let a=this.startNode();return[a.typeAnnotation,t.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=s,this.canInsertSemicolon()&&this.unexpected(),this.match(19)||this.unexpected(),a});if(r.thrown)return null;r.error&&(this.state=r.failState),t.returnType=r.node.typeAnnotation?this.finishNode(r.node,"TypeAnnotation"):null}return super.parseArrow(t)}shouldParseArrow(t){return this.match(14)||super.shouldParseArrow(t)}setArrowFunctionParameters(t,r){this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(t.start))?t.params=r:super.setArrowFunctionParameters(t,r)}checkParams(t,r,s,a=!0){if(!(s&&this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(t.start)))){for(let p=0;p<t.params.length;p++)this.isThisParam(t.params[p])&&p>0&&this.raise(J.ThisParamMustBeFirst,t.params[p]);super.checkParams(t,r,s,a)}}parseParenAndDistinguishExpression(t){return super.parseParenAndDistinguishExpression(t&&!this.state.noArrowAt.includes(this.sourceToOffsetPos(this.state.start)))}parseSubscripts(t,r,s){if(t.type==="Identifier"&&t.name==="async"&&this.state.noArrowAt.includes(r.index)){this.next();let a=this.startNodeAt(r);a.callee=t,a.arguments=super.parseCallExpressionArguments(),t=this.finishNode(a,"CallExpression")}else if(t.type==="Identifier"&&t.name==="async"&&this.match(47)){let a=this.state.clone(),p=this.tryParse(f=>this.parseAsyncArrowWithTypeParameters(r)||f(),a);if(!p.error&&!p.aborted)return p.node;let u=this.tryParse(()=>super.parseSubscripts(t,r,s),a);if(u.node&&!u.error)return u.node;if(p.node)return this.state=p.failState,p.node;if(u.node)return this.state=u.failState,u.node;throw p.error||u.error}return super.parseSubscripts(t,r,s)}parseSubscript(t,r,s,a){if(this.match(18)&&this.isLookaheadToken_lt()){if(a.optionalChainMember=!0,s)return a.stop=!0,t;this.next();let p=this.startNodeAt(r);return p.callee=t,p.typeArguments=this.flowParseTypeParameterInstantiationInExpression(),this.expect(10),p.arguments=this.parseCallExpressionArguments(),p.optional=!0,this.finishCallExpression(p,!0)}else if(!s&&this.shouldParseTypes()&&(this.match(47)||this.match(51))){let p=this.startNodeAt(r);p.callee=t;let u=this.tryParse(()=>(p.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),p.arguments=super.parseCallExpressionArguments(),a.optionalChainMember&&(p.optional=!1),this.finishCallExpression(p,a.optionalChainMember)));if(u.node)return u.error&&(this.state=u.failState),u.node}return super.parseSubscript(t,r,s,a)}parseNewCallee(t){super.parseNewCallee(t);let r=null;this.shouldParseTypes()&&this.match(47)&&(r=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node),t.typeArguments=r}parseAsyncArrowWithTypeParameters(t){let r=this.startNodeAt(t);if(this.parseFunctionParams(r,!1),!!this.parseArrow(r))return super.parseArrowExpression(r,void 0,!0)}readToken_mult_modulo(t){let r=this.input.charCodeAt(this.state.pos+1);if(t===42&&r===47&&this.state.hasFlowComment){this.state.hasFlowComment=!1,this.state.pos+=2,this.nextToken();return}super.readToken_mult_modulo(t)}readToken_pipe_amp(t){let r=this.input.charCodeAt(this.state.pos+1);if(t===124&&r===125){this.finishOp(9,2);return}super.readToken_pipe_amp(t)}parseTopLevel(t,r){let s=super.parseTopLevel(t,r);return this.state.hasFlowComment&&this.raise(J.UnterminatedFlowComment,this.state.curPosition()),s}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(J.NestedFlowComment,this.state.startLoc);this.hasFlowCommentCompletion();let t=this.skipFlowComment();t&&(this.state.pos+=t,this.state.hasFlowComment=!0);return}return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/")}skipFlowComment(){let{pos:t}=this.state,r=2;for(;[32,9].includes(this.input.charCodeAt(t+r));)r++;let s=this.input.charCodeAt(r+t),a=this.input.charCodeAt(r+t+1);return s===58&&a===58?r+2:this.input.slice(r+t,r+t+12)==="flow-include"?r+12:s===58&&a!==58?r:!1}hasFlowCommentCompletion(){if(this.input.indexOf("*/",this.state.pos)===-1)throw this.raise(R.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(t,{enumName:r,memberName:s}){this.raise(J.EnumBooleanMemberNotInitialized,t,{memberName:s,enumName:r})}flowEnumErrorInvalidMemberInitializer(t,r){return this.raise(r.explicitType?r.explicitType==="symbol"?J.EnumInvalidMemberInitializerSymbolType:J.EnumInvalidMemberInitializerPrimaryType:J.EnumInvalidMemberInitializerUnknownType,t,r)}flowEnumErrorNumberMemberNotInitialized(t,r){this.raise(J.EnumNumberMemberNotInitialized,t,r)}flowEnumErrorStringMemberInconsistentlyInitialized(t,r){this.raise(J.EnumStringMemberInconsistentlyInitialized,t,r)}flowEnumMemberInit(){let t=this.state.startLoc,r=()=>this.match(12)||this.match(8);switch(this.state.type){case 135:{let s=this.parseNumericLiteral(this.state.value);return r()?{type:"number",loc:s.loc.start,value:s}:{type:"invalid",loc:t}}case 134:{let s=this.parseStringLiteral(this.state.value);return r()?{type:"string",loc:s.loc.start,value:s}:{type:"invalid",loc:t}}case 85:case 86:{let s=this.parseBooleanLiteral(this.match(85));return r()?{type:"boolean",loc:s.loc.start,value:s}:{type:"invalid",loc:t}}default:return{type:"invalid",loc:t}}}flowEnumMemberRaw(){let t=this.state.startLoc,r=this.parseIdentifier(!0),s=this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:t};return{id:r,init:s}}flowEnumCheckExplicitTypeMismatch(t,r,s){let{explicitType:a}=r;a!==null&&a!==s&&this.flowEnumErrorInvalidMemberInitializer(t,r)}flowEnumMembers({enumName:t,explicitType:r}){let s=new Set,a={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]},p=!1;for(;!this.match(8);){if(this.eat(21)){p=!0;break}let u=this.startNode(),{id:f,init:m}=this.flowEnumMemberRaw(),x=f.name;if(x==="")continue;/^[a-z]/.test(x)&&this.raise(J.EnumInvalidMemberName,f,{memberName:x,suggestion:x[0].toUpperCase()+x.slice(1),enumName:t}),s.has(x)&&this.raise(J.EnumDuplicateMemberName,f,{memberName:x,enumName:t}),s.add(x);let g={enumName:t,explicitType:r,memberName:x};switch(u.id=f,m.type){case"boolean":{this.flowEnumCheckExplicitTypeMismatch(m.loc,g,"boolean"),u.init=m.value,a.booleanMembers.push(this.finishNode(u,"EnumBooleanMember"));break}case"number":{this.flowEnumCheckExplicitTypeMismatch(m.loc,g,"number"),u.init=m.value,a.numberMembers.push(this.finishNode(u,"EnumNumberMember"));break}case"string":{this.flowEnumCheckExplicitTypeMismatch(m.loc,g,"string"),u.init=m.value,a.stringMembers.push(this.finishNode(u,"EnumStringMember"));break}case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(m.loc,g);case"none":switch(r){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(m.loc,g);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(m.loc,g);break;default:a.defaultedMembers.push(this.finishNode(u,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}return{members:a,hasUnknownMembers:p}}flowEnumStringMembers(t,r,{enumName:s}){if(t.length===0)return r;if(r.length===0)return t;if(r.length>t.length){for(let a of t)this.flowEnumErrorStringMemberInconsistentlyInitialized(a,{enumName:s});return r}else{for(let a of r)this.flowEnumErrorStringMemberInconsistentlyInitialized(a,{enumName:s});return t}}flowEnumParseExplicitType({enumName:t}){if(!this.eatContextual(102))return null;if(!pe(this.state.type))throw this.raise(J.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:t});let{value:r}=this.state;return this.next(),r!=="boolean"&&r!=="number"&&r!=="string"&&r!=="symbol"&&this.raise(J.EnumInvalidExplicitType,this.state.startLoc,{enumName:t,invalidEnumType:r}),r}flowEnumBody(t,r){let s=r.name,a=r.loc.start,p=this.flowEnumParseExplicitType({enumName:s});this.expect(5);let{members:u,hasUnknownMembers:f}=this.flowEnumMembers({enumName:s,explicitType:p});switch(t.hasUnknownMembers=f,p){case"boolean":return t.explicitType=!0,t.members=u.booleanMembers,this.expect(8),this.finishNode(t,"EnumBooleanBody");case"number":return t.explicitType=!0,t.members=u.numberMembers,this.expect(8),this.finishNode(t,"EnumNumberBody");case"string":return t.explicitType=!0,t.members=this.flowEnumStringMembers(u.stringMembers,u.defaultedMembers,{enumName:s}),this.expect(8),this.finishNode(t,"EnumStringBody");case"symbol":return t.members=u.defaultedMembers,this.expect(8),this.finishNode(t,"EnumSymbolBody");default:{let m=()=>(t.members=[],this.expect(8),this.finishNode(t,"EnumStringBody"));t.explicitType=!1;let x=u.booleanMembers.length,g=u.numberMembers.length,z=u.stringMembers.length,w=u.defaultedMembers.length;if(!x&&!g&&!z&&!w)return m();if(!x&&!g)return t.members=this.flowEnumStringMembers(u.stringMembers,u.defaultedMembers,{enumName:s}),this.expect(8),this.finishNode(t,"EnumStringBody");if(!g&&!z&&x>=w){for(let k of u.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(k.loc.start,{enumName:s,memberName:k.id.name});return t.members=u.booleanMembers,this.expect(8),this.finishNode(t,"EnumBooleanBody")}else if(!x&&!z&&g>=w){for(let k of u.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(k.loc.start,{enumName:s,memberName:k.id.name});return t.members=u.numberMembers,this.expect(8),this.finishNode(t,"EnumNumberBody")}else return this.raise(J.EnumInconsistentMemberValues,a,{enumName:s}),m()}}}flowParseEnumDeclaration(t){let r=this.parseIdentifier();return t.id=r,t.body=this.flowEnumBody(this.startNode(),r),this.finishNode(t,"EnumDeclaration")}jsxParseOpeningElementAfterName(t){return this.shouldParseTypes()&&(this.match(47)||this.match(51))&&(t.typeArguments=this.flowParseTypeParameterInstantiationInExpression()),super.jsxParseOpeningElementAfterName(t)}isLookaheadToken_lt(){let t=this.nextTokenStart();if(this.input.charCodeAt(t)===60){let r=this.input.charCodeAt(t+1);return r!==60&&r!==61}return!1}reScan_lt_gt(){let{type:t}=this.state;t===47?(this.state.pos-=1,this.readToken_lt()):t===48&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){let{type:t}=this.state;return t===51?(this.state.pos-=2,this.finishOp(47,1),47):t}maybeUnwrapTypeCastExpression(t){return t.type==="TypeCastExpression"?t.expression:t}},Ope={__proto__:null,quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203A",oline:"\u203E",frasl:"\u2044",euro:"\u20AC",image:"\u2111",weierp:"\u2118",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",lang:"\u2329",rang:"\u232A",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666"},Mpe=/\r\n|[\r\n\u2028\u2029]/,Vs=new RegExp(Mpe.source,"g");function Ao(o){switch(o){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}function Ph(o,e,t){for(let r=e;r<t;r++)if(Ao(o.charCodeAt(r)))return!0;return!1}var hc=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,fc=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;function kpe(o){switch(o){case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8239:case 8287:case 12288:case 65279:return!0;default:return!1}}var $t=ct`jsx`({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:({openingTagName:o})=>`Expected corresponding JSX closing tag for <${o}>.`,MissingClosingTagFragment:"Expected corresponding JSX closing tag for <>.",UnexpectedSequenceExpression:"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",UnexpectedToken:({unexpected:o,HTMLEntity:e})=>`Unexpected token \`${o}\`. Did you mean \`${e}\` or \`{'${o}'}\`?`,UnsupportedJsxValue:"JSX value should be either an expression or a quoted JSX text.",UnterminatedJsxContent:"Unterminated JSX contents.",UnwrappedAdjacentJSXElements:"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?"});function vt(o){return o?o.type==="JSXOpeningFragment"||o.type==="JSXClosingFragment":!1}function yo(o){if(o.type==="JSXIdentifier")return o.name;if(o.type==="JSXNamespacedName")return o.namespace.name+":"+o.name.name;if(o.type==="JSXMemberExpression")return yo(o.object)+"."+yo(o.property);throw new Error("Node had unexpected type: "+o.type)}var Ppe=o=>class extends o{jsxReadToken(){let t="",r=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise($t.UnterminatedJsxContent,this.state.startLoc);let s=this.input.charCodeAt(this.state.pos);switch(s){case 60:case 123:if(this.state.pos===this.state.start){s===60&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(143)):super.getTokenFromCode(s);return}t+=this.input.slice(r,this.state.pos),this.finishToken(142,t);return;case 38:t+=this.input.slice(r,this.state.pos),t+=this.jsxReadEntity(),r=this.state.pos;break;default:Ao(s)?(t+=this.input.slice(r,this.state.pos),t+=this.jsxReadNewLine(!0),r=this.state.pos):++this.state.pos}}}jsxReadNewLine(t){let r=this.input.charCodeAt(this.state.pos),s;return++this.state.pos,r===13&&this.input.charCodeAt(this.state.pos)===10?(++this.state.pos,s=t?`
|
|
5
|
-
`:`\r
|
|
6
|
-
`):s=String.fromCharCode(r),++this.state.curLine,this.state.lineStart=this.state.pos,s}jsxReadString(t){let r="",s=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(R.UnterminatedString,this.state.startLoc);let a=this.input.charCodeAt(this.state.pos);if(a===t)break;a===38?(r+=this.input.slice(s,this.state.pos),r+=this.jsxReadEntity(),s=this.state.pos):Ao(a)?(r+=this.input.slice(s,this.state.pos),r+=this.jsxReadNewLine(!1),s=this.state.pos):++this.state.pos}r+=this.input.slice(s,this.state.pos++),this.finishToken(134,r)}jsxReadEntity(){let t=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let r=10;this.codePointAtPos(this.state.pos)===120&&(r=16,++this.state.pos);let s=this.readInt(r,void 0,!1,"bail");if(s!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(s)}else{let r=0,s=!1;for(;r++<10&&this.state.pos<this.length&&!(s=this.codePointAtPos(this.state.pos)===59);)++this.state.pos;if(s){let a=this.input.slice(t,this.state.pos),p=Ope[a];if(++this.state.pos,p)return p}}return this.state.pos=t,"&"}jsxReadWord(){let t,r=this.state.pos;do t=this.input.charCodeAt(++this.state.pos);while(Kt(t)||t===45);this.finishToken(141,this.input.slice(r,this.state.pos))}jsxParseIdentifier(){let t=this.startNode();return this.match(141)?t.name=this.state.value:Gc(this.state.type)?t.name=Ft(this.state.type):this.unexpected(),this.next(),this.finishNode(t,"JSXIdentifier")}jsxParseNamespacedName(){let t=this.state.startLoc,r=this.jsxParseIdentifier();if(!this.eat(14))return r;let s=this.startNodeAt(t);return s.namespace=r,s.name=this.jsxParseIdentifier(),this.finishNode(s,"JSXNamespacedName")}jsxParseElementName(){let t=this.state.startLoc,r=this.jsxParseNamespacedName();if(r.type==="JSXNamespacedName")return r;for(;this.eat(16);){let s=this.startNodeAt(t);s.object=r,s.property=this.jsxParseIdentifier(),r=this.finishNode(s,"JSXMemberExpression")}return r}jsxParseAttributeValue(){let t;switch(this.state.type){case 5:return t=this.startNode(),this.setContext(ce.brace),this.next(),t=this.jsxParseExpressionContainer(t,ce.j_oTag),t.expression.type==="JSXEmptyExpression"&&this.raise($t.AttributeIsEmpty,t),t;case 143:case 134:return this.parseExprAtom();default:throw this.raise($t.UnsupportedJsxValue,this.state.startLoc)}}jsxParseEmptyExpression(){let t=this.startNodeAt(this.state.lastTokEndLoc);return this.finishNodeAt(t,"JSXEmptyExpression",this.state.startLoc)}jsxParseSpreadChild(t){return this.next(),t.expression=this.parseExpression(),this.setContext(ce.j_expr),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(t,"JSXSpreadChild")}jsxParseExpressionContainer(t,r){if(this.match(8))t.expression=this.jsxParseEmptyExpression();else{let s=this.parseExpression();t.expression=s}return this.setContext(r),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(t,"JSXExpressionContainer")}jsxParseAttribute(){let t=this.startNode();return this.match(5)?(this.setContext(ce.brace),this.next(),this.expect(21),t.argument=this.parseMaybeAssignAllowIn(),this.setContext(ce.j_oTag),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(t,"JSXSpreadAttribute")):(t.name=this.jsxParseNamespacedName(),t.value=this.eat(29)?this.jsxParseAttributeValue():null,this.finishNode(t,"JSXAttribute"))}jsxParseOpeningElementAt(t){let r=this.startNodeAt(t);return this.eat(144)?this.finishNode(r,"JSXOpeningFragment"):(r.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(r))}jsxParseOpeningElementAfterName(t){let r=[];for(;!this.match(56)&&!this.match(144);)r.push(this.jsxParseAttribute());return t.attributes=r,t.selfClosing=this.eat(56),this.expect(144),this.finishNode(t,"JSXOpeningElement")}jsxParseClosingElementAt(t){let r=this.startNodeAt(t);return this.eat(144)?this.finishNode(r,"JSXClosingFragment"):(r.name=this.jsxParseElementName(),this.expect(144),this.finishNode(r,"JSXClosingElement"))}jsxParseElementAt(t){let r=this.startNodeAt(t),s=[],a=this.jsxParseOpeningElementAt(t),p=null;if(!a.selfClosing){e:for(;;)switch(this.state.type){case 143:if(t=this.state.startLoc,this.next(),this.eat(56)){p=this.jsxParseClosingElementAt(t);break e}s.push(this.jsxParseElementAt(t));break;case 142:s.push(this.parseLiteral(this.state.value,"JSXText"));break;case 5:{let u=this.startNode();this.setContext(ce.brace),this.next(),this.match(21)?s.push(this.jsxParseSpreadChild(u)):s.push(this.jsxParseExpressionContainer(u,ce.j_expr));break}default:this.unexpected()}vt(a)&&!vt(p)&&p!==null?this.raise($t.MissingClosingTagFragment,p):!vt(a)&&vt(p)?this.raise($t.MissingClosingTagElement,p,{openingTagName:yo(a.name)}):!vt(a)&&!vt(p)&&yo(p.name)!==yo(a.name)&&this.raise($t.MissingClosingTagElement,p,{openingTagName:yo(a.name)})}if(vt(a)?(r.openingFragment=a,r.closingFragment=p):(r.openingElement=a,r.closingElement=p),r.children=s,this.match(47))throw this.raise($t.UnwrappedAdjacentJSXElements,this.state.startLoc);return vt(a)?this.finishNode(r,"JSXFragment"):this.finishNode(r,"JSXElement")}jsxParseElement(){let t=this.state.startLoc;return this.next(),this.jsxParseElementAt(t)}setContext(t){let{context:r}=this.state;r[r.length-1]=t}parseExprAtom(t){return this.match(143)?this.jsxParseElement():this.match(47)&&this.input.charCodeAt(this.state.pos)!==33?(this.replaceToken(143),this.jsxParseElement()):super.parseExprAtom(t)}skipSpace(){this.curContext().preserveSpace||super.skipSpace()}getTokenFromCode(t){let r=this.curContext();if(r===ce.j_expr){this.jsxReadToken();return}if(r===ce.j_oTag||r===ce.j_cTag){if(yt(t)){this.jsxReadWord();return}if(t===62){++this.state.pos,this.finishToken(144);return}if((t===34||t===39)&&r===ce.j_oTag){this.jsxReadString(t);return}}if(t===60&&this.state.canStartJSXElement&&this.input.charCodeAt(this.state.pos+1)!==33){++this.state.pos,this.finishToken(143);return}super.getTokenFromCode(t)}updateContext(t){let{context:r,type:s}=this.state;if(s===56&&t===143)r.splice(-2,2,ce.j_cTag),this.state.canStartJSXElement=!1;else if(s===143)r.push(ce.j_oTag);else if(s===144){let a=r[r.length-1];a===ce.j_oTag&&t===56||a===ce.j_cTag?(r.pop(),this.state.canStartJSXElement=r[r.length-1]===ce.j_expr):(this.setContext(ce.j_expr),this.state.canStartJSXElement=!0)}else this.state.canStartJSXElement=spe(s)}},zc=class extends ur{constructor(...e){super(...e),this.tsNames=new Map}},Tc=class extends mr{constructor(...e){super(...e),this.importsStack=[]}createScope(e){return this.importsStack.push(new Set),new zc(e)}enter(e){e===1024&&this.importsStack.push(new Set),super.enter(e)}exit(){let e=super.exit();return e===1024&&this.importsStack.pop(),e}hasImport(e,t){let r=this.importsStack.length;if(this.importsStack[r-1].has(e))return!0;if(!t&&r>1){for(let s=0;s<r-1;s++)if(this.importsStack[s].has(e))return!0}return!1}declareName(e,t,r){if(t&4096){this.hasImport(e,!0)&&this.parser.raise(R.VarRedeclaration,r,{identifierName:e}),this.importsStack[this.importsStack.length-1].add(e);return}let s=this.currentScope(),a=s.tsNames.get(e)||0;if(t&1024){this.maybeExportDefined(s,e),s.tsNames.set(e,a|16);return}super.declareName(e,t,r),t&2&&(t&1||(this.checkRedeclarationInScope(s,e,t,r),this.maybeExportDefined(s,e)),a=a|1),t&256&&(a=a|2),t&512&&(a=a|4),t&128&&(a=a|8),a&&s.tsNames.set(e,a)}isRedeclaredInScope(e,t,r){let s=e.tsNames.get(t);if((s&2)>0){if(r&256){let a=!!(r&512),p=(s&4)>0;return a!==p}return!0}return r&128&&(s&8)>0?e.names.get(t)&2?!!(r&1):!1:r&2&&(s&1)>0?!0:super.isRedeclaredInScope(e,t,r)}checkLocalExport(e){let{name:t}=e;if(this.hasImport(t))return;let r=this.scopeStack.length;for(let s=r-1;s>=0;s--){let p=this.scopeStack[s].tsNames.get(t);if((p&1)>0||(p&16)>0)return}super.checkLocalExport(e)}},Ec=class{constructor(){this.stacks=[]}enter(e){this.stacks.push(e)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(this.currentFlags()&2)>0}get hasYield(){return(this.currentFlags()&1)>0}get hasReturn(){return(this.currentFlags()&4)>0}get hasIn(){return(this.currentFlags()&8)>0}};function $s(o,e){return(o?2:0)|(e?1:0)}var Cc=class{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}sourceToOffsetPos(e){return e+this.startIndex}offsetToSourcePos(e){return e-this.startIndex}hasPlugin(e){if(typeof e=="string")return this.plugins.has(e);{let[t,r]=e;if(!this.hasPlugin(t))return!1;let s=this.plugins.get(t);for(let a of Object.keys(r))if(s?.[a]!==r[a])return!1;return!0}}getPluginOption(e,t){var r;return(r=this.plugins.get(e))==null?void 0:r[t]}};function qh(o,e){o.trailingComments===void 0?o.trailingComments=e:o.trailingComments.unshift(...e)}function Lpe(o,e){o.leadingComments===void 0?o.leadingComments=e:o.leadingComments.unshift(...e)}function hr(o,e){o.innerComments===void 0?o.innerComments=e:o.innerComments.unshift(...e)}function at(o,e,t){let r=null,s=e.length;for(;r===null&&s>0;)r=e[--s];r===null||r.start>t.start?hr(o,t.comments):qh(r,t.comments)}var Ic=class extends Cc{addComment(e){this.filename&&(e.loc.filename=this.filename);let{commentsLen:t}=this.state;this.comments.length!==t&&(this.comments.length=t),this.comments.push(e),this.state.commentsLen++}processComment(e){let{commentStack:t}=this.state,r=t.length;if(r===0)return;let s=r-1,a=t[s];a.start===e.end&&(a.leadingNode=e,s--);let{start:p}=e;for(;s>=0;s--){let u=t[s],f=u.end;if(f>p)u.containingNode=e,this.finalizeComment(u),t.splice(s,1);else{f===p&&(u.trailingNode=e);break}}}finalizeComment(e){var t;let{comments:r}=e;if(e.leadingNode!==null||e.trailingNode!==null)e.leadingNode!==null&&qh(e.leadingNode,r),e.trailingNode!==null&&Lpe(e.trailingNode,r);else{let s=e.containingNode,a=e.start;if(this.input.charCodeAt(this.offsetToSourcePos(a)-1)===44)switch(s.type){case"ObjectExpression":case"ObjectPattern":at(s,s.properties,e);break;case"CallExpression":case"NewExpression":case"OptionalCallExpression":at(s,s.arguments,e);break;case"ImportExpression":at(s,[s.source,(t=s.options)!=null?t:null],e);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":case"TSTypeParameterDeclaration":at(s,s.params,e);break;case"ArrayExpression":case"ArrayPattern":at(s,s.elements,e);break;case"ExportNamedDeclaration":case"ImportDeclaration":at(s,s.specifiers,e);break;case"TSEnumDeclaration":at(s,s.members,e);break;case"TSEnumBody":at(s,s.members,e);break;case"TSInterfaceBody":at(s,s.body,e);break;default:{if(s.type==="RecordExpression"){at(s,s.properties,e);break}if(s.type==="TupleExpression"){at(s,s.elements,e);break}hr(s,r)}}else hr(s,r)}}finalizeRemainingComments(){let{commentStack:e}=this.state;for(let t=e.length-1;t>=0;t--)this.finalizeComment(e[t]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(e){let{commentStack:t}=this.state,{length:r}=t;if(r===0)return;let s=t[r-1];s.leadingNode===e&&(s.leadingNode=null)}takeSurroundingComments(e,t,r){let{commentStack:s}=this.state,a=s.length;if(a===0)return;let p=a-1;for(;p>=0;p--){let u=s[p],f=u.end;if(u.start===r)u.leadingNode=e;else if(f===t)u.trailingNode=e;else if(f<t)break}}},Rc=class o{constructor(){this.flags=1024,this.startIndex=void 0,this.curLine=void 0,this.lineStart=void 0,this.startLoc=void 0,this.endLoc=void 0,this.errors=[],this.potentialArrowAt=-1,this.noArrowAt=[],this.noArrowParamsConversionAt=[],this.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null},this.labels=[],this.commentsLen=0,this.commentStack=[],this.pos=0,this.type=140,this.value=null,this.start=0,this.end=0,this.lastTokEndLoc=null,this.lastTokStartLoc=null,this.context=[ce.brace],this.firstInvalidTemplateEscapePos=null,this.strictErrors=new Map,this.tokensLength=0}get strict(){return(this.flags&1)>0}set strict(e){e?this.flags|=1:this.flags&=-2}init({strictMode:e,sourceType:t,startIndex:r,startLine:s,startColumn:a}){this.strict=e===!1?!1:e===!0?!0:t==="module",this.startIndex=r,this.curLine=s,this.lineStart=-a,this.startLoc=this.endLoc=new At(s,a,r)}get maybeInArrowParameters(){return(this.flags&2)>0}set maybeInArrowParameters(e){e?this.flags|=2:this.flags&=-3}get inType(){return(this.flags&4)>0}set inType(e){e?this.flags|=4:this.flags&=-5}get noAnonFunctionType(){return(this.flags&8)>0}set noAnonFunctionType(e){e?this.flags|=8:this.flags&=-9}get hasFlowComment(){return(this.flags&16)>0}set hasFlowComment(e){e?this.flags|=16:this.flags&=-17}get isAmbientContext(){return(this.flags&32)>0}set isAmbientContext(e){e?this.flags|=32:this.flags&=-33}get inAbstractClass(){return(this.flags&64)>0}set inAbstractClass(e){e?this.flags|=64:this.flags&=-65}get inDisallowConditionalTypesContext(){return(this.flags&128)>0}set inDisallowConditionalTypesContext(e){e?this.flags|=128:this.flags&=-129}get soloAwait(){return(this.flags&256)>0}set soloAwait(e){e?this.flags|=256:this.flags&=-257}get inFSharpPipelineDirectBody(){return(this.flags&512)>0}set inFSharpPipelineDirectBody(e){e?this.flags|=512:this.flags&=-513}get canStartJSXElement(){return(this.flags&1024)>0}set canStartJSXElement(e){e?this.flags|=1024:this.flags&=-1025}get containsEsc(){return(this.flags&2048)>0}set containsEsc(e){e?this.flags|=2048:this.flags&=-2049}get hasTopLevelAwait(){return(this.flags&4096)>0}set hasTopLevelAwait(e){e?this.flags|=4096:this.flags&=-4097}curPosition(){return new At(this.curLine,this.pos-this.lineStart,this.pos+this.startIndex)}clone(){let e=new o;return e.flags=this.flags,e.startIndex=this.startIndex,e.curLine=this.curLine,e.lineStart=this.lineStart,e.startLoc=this.startLoc,e.endLoc=this.endLoc,e.errors=this.errors.slice(),e.potentialArrowAt=this.potentialArrowAt,e.noArrowAt=this.noArrowAt.slice(),e.noArrowParamsConversionAt=this.noArrowParamsConversionAt.slice(),e.topicContext=this.topicContext,e.labels=this.labels.slice(),e.commentsLen=this.commentsLen,e.commentStack=this.commentStack.slice(),e.pos=this.pos,e.type=this.type,e.value=this.value,e.start=this.start,e.end=this.end,e.lastTokEndLoc=this.lastTokEndLoc,e.lastTokStartLoc=this.lastTokStartLoc,e.context=this.context.slice(),e.firstInvalidTemplateEscapePos=this.firstInvalidTemplateEscapePos,e.strictErrors=this.strictErrors,e.tokensLength=this.tokensLength,e}},Dpe=function(e){return e>=48&&e<=57},Lh={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},Us={bin:o=>o===48||o===49,oct:o=>o>=48&&o<=55,dec:o=>o>=48&&o<=57,hex:o=>o>=48&&o<=57||o>=65&&o<=70||o>=97&&o<=102};function Dh(o,e,t,r,s,a){let p=t,u=r,f=s,m="",x=null,g=t,{length:z}=e;for(;;){if(t>=z){a.unterminated(p,u,f),m+=e.slice(g,t);break}let w=e.charCodeAt(t);if(vpe(o,w,e,t)){m+=e.slice(g,t);break}if(w===92){m+=e.slice(g,t);let k=Fpe(e,t,r,s,o==="template",a);k.ch===null&&!x?x={pos:t,lineStart:r,curLine:s}:m+=k.ch,{pos:t,lineStart:r,curLine:s}=k,g=t}else w===8232||w===8233?(++t,++s,r=t):w===10||w===13?o==="template"?(m+=e.slice(g,t)+`
|
|
7
|
-
`,++t,w===13&&e.charCodeAt(t)===10&&++t,++s,g=r=t):a.unterminated(p,u,f):++t}return{pos:t,str:m,firstInvalidLoc:x,lineStart:r,curLine:s,containsInvalid:!!x}}function vpe(o,e,t,r){return o==="template"?e===96||e===36&&t.charCodeAt(r+1)===123:e===(o==="double"?34:39)}function Fpe(o,e,t,r,s,a){let p=!s;e++;let u=m=>({pos:e,ch:m,lineStart:t,curLine:r}),f=o.charCodeAt(e++);switch(f){case 110:return u(`
|
|
8
|
-
`);case 114:return u("\r");case 120:{let m;return{code:m,pos:e}=wc(o,e,t,r,2,!1,p,a),u(m===null?null:String.fromCharCode(m))}case 117:{let m;return{code:m,pos:e}=Qh(o,e,t,r,p,a),u(m===null?null:String.fromCodePoint(m))}case 116:return u(" ");case 98:return u("\b");case 118:return u("\v");case 102:return u("\f");case 13:o.charCodeAt(e)===10&&++e;case 10:t=e,++r;case 8232:case 8233:return u("");case 56:case 57:if(s)return u(null);a.strictNumericEscape(e-1,t,r);default:if(f>=48&&f<=55){let m=e-1,g=/^[0-7]+/.exec(o.slice(m,e+2))[0],z=parseInt(g,8);z>255&&(g=g.slice(0,-1),z=parseInt(g,8)),e+=g.length-1;let w=o.charCodeAt(e);if(g!=="0"||w===56||w===57){if(s)return u(null);a.strictNumericEscape(m,t,r)}return u(String.fromCharCode(z))}return u(String.fromCharCode(f))}}function wc(o,e,t,r,s,a,p,u){let f=e,m;return{n:m,pos:e}=Yh(o,e,t,r,16,s,a,!1,u,!p),m===null&&(p?u.invalidEscapeSequence(f,t,r):e=f-1),{code:m,pos:e}}function Yh(o,e,t,r,s,a,p,u,f,m){let x=e,g=s===16?Lh.hex:Lh.decBinOct,z=s===16?Us.hex:s===10?Us.dec:s===8?Us.oct:Us.bin,w=!1,k=0;for(let F=0,Y=a??1/0;F<Y;++F){let W=o.charCodeAt(e),ee;if(W===95&&u!=="bail"){let de=o.charCodeAt(e-1),Te=o.charCodeAt(e+1);if(u){if(Number.isNaN(Te)||!z(Te)||g.has(de)||g.has(Te)){if(m)return{n:null,pos:e};f.unexpectedNumericSeparator(e,t,r)}}else{if(m)return{n:null,pos:e};f.numericSeparatorInEscapeSequence(e,t,r)}++e;continue}if(W>=97?ee=W-97+10:W>=65?ee=W-65+10:Dpe(W)?ee=W-48:ee=1/0,ee>=s){if(ee<=9&&m)return{n:null,pos:e};if(ee<=9&&f.invalidDigit(e,t,r,s))ee=0;else if(p)ee=0,w=!0;else break}++e,k=k*s+ee}return e===x||a!=null&&e-x!==a||w?{n:null,pos:e}:{n:k,pos:e}}function Qh(o,e,t,r,s,a){let p=o.charCodeAt(e),u;if(p===123){if(++e,{code:u,pos:e}=wc(o,e,t,r,o.indexOf("}",e)-e,!0,s,a),++e,u!==null&&u>1114111)if(s)a.invalidCodePoint(e,t,r);else return{code:null,pos:e}}else({code:u,pos:e}=wc(o,e,t,r,4,!1,s,a));return{code:u,pos:e}}function cr(o,e,t){return new At(t,o-e,o)}var Npe=new Set([103,109,115,105,121,117,100,118]),bt=class{constructor(e){let t=e.startIndex||0;this.type=e.type,this.value=e.value,this.start=t+e.start,this.end=t+e.end,this.loc=new zo(e.startLoc,e.endLoc)}},Oc=class extends Ic{constructor(e,t){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(r,s,a,p)=>this.optionFlags&2048?(this.raise(R.InvalidDigit,cr(r,s,a),{radix:p}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder(R.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(R.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(R.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(R.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(r,s,a)=>{this.recordStrictModeErrors(R.StrictNumericEscape,cr(r,s,a))},unterminated:(r,s,a)=>{throw this.raise(R.UnterminatedString,cr(r-1,s,a))}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(R.StrictNumericEscape),unterminated:(r,s,a)=>{throw this.raise(R.UnterminatedTemplate,cr(r,s,a))}}),this.state=new Rc,this.state.init(e),this.input=t,this.length=t.length,this.comments=[],this.isLookahead=!1}pushToken(e){this.tokens.length=this.state.tokensLength,this.tokens.push(e),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.optionFlags&256&&this.pushToken(new bt(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(e){return this.match(e)?(this.next(),!0):!1}match(e){return this.state.type===e}createLookaheadState(e){return{pos:e.pos,value:null,type:e.type,start:e.start,end:e.end,context:[this.curContext()],inType:e.inType,startLoc:e.startLoc,lastTokEndLoc:e.lastTokEndLoc,curLine:e.curLine,lineStart:e.lineStart,curPosition:e.curPosition}}lookahead(){let e=this.state;this.state=this.createLookaheadState(e),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;let t=this.state;return this.state=e,t}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(e){return hc.lastIndex=e,hc.test(this.input)?hc.lastIndex:e}lookaheadCharCode(){return this.lookaheadCharCodeSince(this.state.pos)}lookaheadCharCodeSince(e){return this.input.charCodeAt(this.nextTokenStartSince(e))}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(e){return fc.lastIndex=e,fc.test(this.input)?fc.lastIndex:e}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(e){let t=this.input.charCodeAt(e);if((t&64512)===55296&&++e<this.input.length){let r=this.input.charCodeAt(e);(r&64512)===56320&&(t=65536+((t&1023)<<10)+(r&1023))}return t}setStrict(e){this.state.strict=e,e&&(this.state.strictErrors.forEach(([t,r])=>this.raise(t,r)),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){if(this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length){this.finishToken(140);return}this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(e){let t;this.isLookahead||(t=this.state.curPosition());let r=this.state.pos,s=this.input.indexOf(e,r+2);if(s===-1)throw this.raise(R.UnterminatedComment,this.state.curPosition());for(this.state.pos=s+e.length,Vs.lastIndex=r+2;Vs.test(this.input)&&Vs.lastIndex<=s;)++this.state.curLine,this.state.lineStart=Vs.lastIndex;if(this.isLookahead)return;let a={type:"CommentBlock",value:this.input.slice(r+2,s),start:this.sourceToOffsetPos(r),end:this.sourceToOffsetPos(s+e.length),loc:new zo(t,this.state.curPosition())};return this.optionFlags&256&&this.pushToken(a),a}skipLineComment(e){let t=this.state.pos,r;this.isLookahead||(r=this.state.curPosition());let s=this.input.charCodeAt(this.state.pos+=e);if(this.state.pos<this.length)for(;!Ao(s)&&++this.state.pos<this.length;)s=this.input.charCodeAt(this.state.pos);if(this.isLookahead)return;let a=this.state.pos,u={type:"CommentLine",value:this.input.slice(t+e,a),start:this.sourceToOffsetPos(t),end:this.sourceToOffsetPos(a),loc:new zo(r,this.state.curPosition())};return this.optionFlags&256&&this.pushToken(u),u}skipSpace(){let e=this.state.pos,t=this.optionFlags&4096?[]:null;e:for(;this.state.pos<this.length;){let r=this.input.charCodeAt(this.state.pos);switch(r){case 32:case 160:case 9:++this.state.pos;break;case 13:this.input.charCodeAt(this.state.pos+1)===10&&++this.state.pos;case 10:case 8232:case 8233:++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;break;case 47:switch(this.input.charCodeAt(this.state.pos+1)){case 42:{let s=this.skipBlockComment("*/");s!==void 0&&(this.addComment(s),t?.push(s));break}case 47:{let s=this.skipLineComment(2);s!==void 0&&(this.addComment(s),t?.push(s));break}default:break e}break;default:if(kpe(r))++this.state.pos;else if(r===45&&!this.inModule&&this.optionFlags&8192){let s=this.state.pos;if(this.input.charCodeAt(s+1)===45&&this.input.charCodeAt(s+2)===62&&(e===0||this.state.lineStart>e)){let a=this.skipLineComment(3);a!==void 0&&(this.addComment(a),t?.push(a))}else break e}else if(r===60&&!this.inModule&&this.optionFlags&8192){let s=this.state.pos;if(this.input.charCodeAt(s+1)===33&&this.input.charCodeAt(s+2)===45&&this.input.charCodeAt(s+3)===45){let a=this.skipLineComment(4);a!==void 0&&(this.addComment(a),t?.push(a))}else break e}else break e}}if(t?.length>0){let r=this.state.pos,s={start:this.sourceToOffsetPos(e),end:this.sourceToOffsetPos(r),comments:t,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(s)}}finishToken(e,t){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();let r=this.state.type;this.state.type=e,this.state.value=t,this.isLookahead||this.updateContext(r)}replaceToken(e){this.state.type=e,this.updateContext()}readToken_numberSign(){if(this.state.pos===0&&this.readToken_interpreter())return;let e=this.state.pos+1,t=this.codePointAtPos(e);if(t>=48&&t<=57)throw this.raise(R.UnexpectedDigitAfterHash,this.state.curPosition());if(t===123||t===91&&this.hasPlugin("recordAndTuple")){if(this.expectPlugin("recordAndTuple"),this.getPluginOption("recordAndTuple","syntaxType")==="bar")throw this.raise(t===123?R.RecordExpressionHashIncorrectStartSyntaxType:R.TupleExpressionHashIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,t===123?this.finishToken(7):this.finishToken(1)}else yt(t)?(++this.state.pos,this.finishToken(139,this.readWord1(t))):t===92?(++this.state.pos,this.finishToken(139,this.readWord1())):this.finishOp(27,1)}readToken_dot(){let e=this.input.charCodeAt(this.state.pos+1);if(e>=48&&e<=57){this.readNumber(!0);return}e===46&&this.input.charCodeAt(this.state.pos+2)===46?(this.state.pos+=3,this.finishToken(21)):(++this.state.pos,this.finishToken(16))}readToken_slash(){this.input.charCodeAt(this.state.pos+1)===61?this.finishOp(31,2):this.finishOp(56,1)}readToken_interpreter(){if(this.state.pos!==0||this.length<2)return!1;let e=this.input.charCodeAt(this.state.pos+1);if(e!==33)return!1;let t=this.state.pos;for(this.state.pos+=1;!Ao(e)&&++this.state.pos<this.length;)e=this.input.charCodeAt(this.state.pos);let r=this.input.slice(t+2,this.state.pos);return this.finishToken(28,r),!0}readToken_mult_modulo(e){let t=e===42?55:54,r=1,s=this.input.charCodeAt(this.state.pos+1);e===42&&s===42&&(r++,s=this.input.charCodeAt(this.state.pos+2),t=57),s===61&&!this.state.inType&&(r++,t=e===37?33:30),this.finishOp(t,r)}readToken_pipe_amp(e){let t=this.input.charCodeAt(this.state.pos+1);if(t===e){this.input.charCodeAt(this.state.pos+2)===61?this.finishOp(30,3):this.finishOp(e===124?41:42,2);return}if(e===124){if(t===62){this.finishOp(39,2);return}if(this.hasPlugin("recordAndTuple")&&t===125){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(R.RecordExpressionBarIncorrectEndSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(9);return}if(this.hasPlugin("recordAndTuple")&&t===93){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(R.TupleExpressionBarIncorrectEndSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(4);return}}if(t===61){this.finishOp(30,2);return}this.finishOp(e===124?43:45,1)}readToken_caret(){let e=this.input.charCodeAt(this.state.pos+1);e===61&&!this.state.inType?this.finishOp(32,2):e===94&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"^^"}])?(this.finishOp(37,2),this.input.codePointAt(this.state.pos)===94&&this.unexpected()):this.finishOp(44,1)}readToken_atSign(){this.input.charCodeAt(this.state.pos+1)===64&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"@@"}])?this.finishOp(38,2):this.finishOp(26,1)}readToken_plus_min(e){let t=this.input.charCodeAt(this.state.pos+1);if(t===e){this.finishOp(34,2);return}t===61?this.finishOp(30,2):this.finishOp(53,1)}readToken_lt(){let{pos:e}=this.state,t=this.input.charCodeAt(e+1);if(t===60){if(this.input.charCodeAt(e+2)===61){this.finishOp(30,3);return}this.finishOp(51,2);return}if(t===61){this.finishOp(49,2);return}this.finishOp(47,1)}readToken_gt(){let{pos:e}=this.state,t=this.input.charCodeAt(e+1);if(t===62){let r=this.input.charCodeAt(e+2)===62?3:2;if(this.input.charCodeAt(e+r)===61){this.finishOp(30,r+1);return}this.finishOp(52,r);return}if(t===61){this.finishOp(49,2);return}this.finishOp(48,1)}readToken_eq_excl(e){let t=this.input.charCodeAt(this.state.pos+1);if(t===61){this.finishOp(46,this.input.charCodeAt(this.state.pos+2)===61?3:2);return}if(e===61&&t===62){this.state.pos+=2,this.finishToken(19);return}this.finishOp(e===61?29:35,1)}readToken_question(){let e=this.input.charCodeAt(this.state.pos+1),t=this.input.charCodeAt(this.state.pos+2);e===63?t===61?this.finishOp(30,3):this.finishOp(40,2):e===46&&!(t>=48&&t<=57)?(this.state.pos+=2,this.finishToken(18)):(++this.state.pos,this.finishToken(17))}getTokenFromCode(e){switch(e){case 46:this.readToken_dot();return;case 40:++this.state.pos,this.finishToken(10);return;case 41:++this.state.pos,this.finishToken(11);return;case 59:++this.state.pos,this.finishToken(13);return;case 44:++this.state.pos,this.finishToken(12);return;case 91:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(R.TupleExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(2)}else++this.state.pos,this.finishToken(0);return;case 93:++this.state.pos,this.finishToken(3);return;case 123:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(R.RecordExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(6)}else++this.state.pos,this.finishToken(5);return;case 125:++this.state.pos,this.finishToken(8);return;case 58:this.hasPlugin("functionBind")&&this.input.charCodeAt(this.state.pos+1)===58?this.finishOp(15,2):(++this.state.pos,this.finishToken(14));return;case 63:this.readToken_question();return;case 96:this.readTemplateToken();return;case 48:{let t=this.input.charCodeAt(this.state.pos+1);if(t===120||t===88){this.readRadixNumber(16);return}if(t===111||t===79){this.readRadixNumber(8);return}if(t===98||t===66){this.readRadixNumber(2);return}}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:this.readNumber(!1);return;case 34:case 39:this.readString(e);return;case 47:this.readToken_slash();return;case 37:case 42:this.readToken_mult_modulo(e);return;case 124:case 38:this.readToken_pipe_amp(e);return;case 94:this.readToken_caret();return;case 43:case 45:this.readToken_plus_min(e);return;case 60:this.readToken_lt();return;case 62:this.readToken_gt();return;case 61:case 33:this.readToken_eq_excl(e);return;case 126:this.finishOp(36,1);return;case 64:this.readToken_atSign();return;case 35:this.readToken_numberSign();return;case 92:this.readWord();return;default:if(yt(e)){this.readWord(e);return}}throw this.raise(R.InvalidOrUnexpectedToken,this.state.curPosition(),{unexpected:String.fromCodePoint(e)})}finishOp(e,t){let r=this.input.slice(this.state.pos,this.state.pos+t);this.state.pos+=t,this.finishToken(e,r)}readRegexp(){let e=this.state.startLoc,t=this.state.start+1,r,s,{pos:a}=this.state;for(;;++a){if(a>=this.length)throw this.raise(R.UnterminatedRegExp,je(e,1));let m=this.input.charCodeAt(a);if(Ao(m))throw this.raise(R.UnterminatedRegExp,je(e,1));if(r)r=!1;else{if(m===91)s=!0;else if(m===93&&s)s=!1;else if(m===47&&!s)break;r=m===92}}let p=this.input.slice(t,a);++a;let u="",f=()=>je(e,a+2-t);for(;a<this.length;){let m=this.codePointAtPos(a),x=String.fromCharCode(m);if(Npe.has(m))m===118?u.includes("u")&&this.raise(R.IncompatibleRegExpUVFlags,f()):m===117&&u.includes("v")&&this.raise(R.IncompatibleRegExpUVFlags,f()),u.includes(x)&&this.raise(R.DuplicateRegExpFlags,f());else if(Kt(m)||m===92)this.raise(R.MalformedRegExpFlags,f());else break;++a,u+=x}this.state.pos=a,this.finishToken(138,{pattern:p,flags:u})}readInt(e,t,r=!1,s=!0){let{n:a,pos:p}=Yh(this.input,this.state.pos,this.state.lineStart,this.state.curLine,e,t,r,s,this.errorHandlers_readInt,!1);return this.state.pos=p,a}readRadixNumber(e){let t=this.state.pos,r=this.state.curPosition(),s=!1;this.state.pos+=2;let a=this.readInt(e);a==null&&this.raise(R.InvalidDigit,je(r,2),{radix:e});let p=this.input.charCodeAt(this.state.pos);if(p===110)++this.state.pos,s=!0;else if(p===109)throw this.raise(R.InvalidDecimal,r);if(yt(this.codePointAtPos(this.state.pos)))throw this.raise(R.NumberIdentifier,this.state.curPosition());if(s){let u=this.input.slice(t,this.state.pos).replace(/[_n]/g,"");this.finishToken(136,u);return}this.finishToken(135,a)}readNumber(e){let t=this.state.pos,r=this.state.curPosition(),s=!1,a=!1,p=!1,u=!1;!e&&this.readInt(10)===null&&this.raise(R.InvalidNumber,this.state.curPosition());let f=this.state.pos-t>=2&&this.input.charCodeAt(t)===48;if(f){let w=this.input.slice(t,this.state.pos);if(this.recordStrictModeErrors(R.StrictOctalLiteral,r),!this.state.strict){let k=w.indexOf("_");k>0&&this.raise(R.ZeroDigitNumericSeparator,je(r,k))}u=f&&!/[89]/.test(w)}let m=this.input.charCodeAt(this.state.pos);if(m===46&&!u&&(++this.state.pos,this.readInt(10),s=!0,m=this.input.charCodeAt(this.state.pos)),(m===69||m===101)&&!u&&(m=this.input.charCodeAt(++this.state.pos),(m===43||m===45)&&++this.state.pos,this.readInt(10)===null&&this.raise(R.InvalidOrMissingExponent,r),s=!0,p=!0,m=this.input.charCodeAt(this.state.pos)),m===110&&((s||f)&&this.raise(R.InvalidBigIntLiteral,r),++this.state.pos,a=!0),m===109){this.expectPlugin("decimal",this.state.curPosition()),(p||f)&&this.raise(R.InvalidDecimal,r),++this.state.pos;var x=!0}if(yt(this.codePointAtPos(this.state.pos)))throw this.raise(R.NumberIdentifier,this.state.curPosition());let g=this.input.slice(t,this.state.pos).replace(/[_mn]/g,"");if(a){this.finishToken(136,g);return}if(x){this.finishToken(137,g);return}let z=u?parseInt(g,8):parseFloat(g);this.finishToken(135,z)}readCodePoint(e){let{code:t,pos:r}=Qh(this.input,this.state.pos,this.state.lineStart,this.state.curLine,e,this.errorHandlers_readCodePoint);return this.state.pos=r,t}readString(e){let{str:t,pos:r,curLine:s,lineStart:a}=Dh(e===34?"double":"single",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=r+1,this.state.lineStart=a,this.state.curLine=s,this.finishToken(134,t)}readTemplateContinuation(){this.match(8)||this.unexpected(null,8),this.state.pos--,this.readTemplateToken()}readTemplateToken(){let e=this.input[this.state.pos],{str:t,firstInvalidLoc:r,pos:s,curLine:a,lineStart:p}=Dh("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=s+1,this.state.lineStart=p,this.state.curLine=a,r&&(this.state.firstInvalidTemplateEscapePos=new At(r.curLine,r.pos-r.lineStart,this.sourceToOffsetPos(r.pos))),this.input.codePointAt(s)===96?this.finishToken(24,r?null:e+t+"`"):(this.state.pos++,this.finishToken(25,r?null:e+t+"${"))}recordStrictModeErrors(e,t){let r=t.index;this.state.strict&&!this.state.strictErrors.has(r)?this.raise(e,t):this.state.strictErrors.set(r,[e,t])}readWord1(e){this.state.containsEsc=!1;let t="",r=this.state.pos,s=this.state.pos;for(e!==void 0&&(this.state.pos+=e<=65535?1:2);this.state.pos<this.length;){let a=this.codePointAtPos(this.state.pos);if(Kt(a))this.state.pos+=a<=65535?1:2;else if(a===92){this.state.containsEsc=!0,t+=this.input.slice(s,this.state.pos);let p=this.state.curPosition(),u=this.state.pos===r?yt:Kt;if(this.input.charCodeAt(++this.state.pos)!==117){this.raise(R.MissingUnicodeEscape,this.state.curPosition()),s=this.state.pos-1;continue}++this.state.pos;let f=this.readCodePoint(!0);f!==null&&(u(f)||this.raise(R.EscapedCharNotAnIdentifier,p),t+=String.fromCodePoint(f)),s=this.state.pos}else break}return t+this.input.slice(s,this.state.pos)}readWord(e){let t=this.readWord1(e),r=jc.get(t);r!==void 0?this.finishToken(r,Ft(r)):this.finishToken(132,t)}checkKeywordEscapes(){let{type:e}=this.state;Gc(e)&&this.state.containsEsc&&this.raise(R.InvalidEscapedReservedWord,this.state.startLoc,{reservedWord:Ft(e)})}raise(e,t,r={}){let s=t instanceof At?t:t.loc.start,a=e(s,r);if(!(this.optionFlags&2048))throw a;return this.isLookahead||this.state.errors.push(a),a}raiseOverwrite(e,t,r={}){let s=t instanceof At?t:t.loc.start,a=s.index,p=this.state.errors;for(let u=p.length-1;u>=0;u--){let f=p[u];if(f.loc.index===a)return p[u]=e(s,r);if(f.loc.index<a)break}return this.raise(e,t,r)}updateContext(e){}unexpected(e,t){throw this.raise(R.UnexpectedToken,e??this.state.startLoc,{expected:t?Ft(t):null})}expectPlugin(e,t){if(this.hasPlugin(e))return!0;throw this.raise(R.MissingPlugin,t??this.state.startLoc,{missingPlugin:[e]})}expectOnePlugin(e){if(!e.some(t=>this.hasPlugin(t)))throw this.raise(R.MissingOneOfPlugins,this.state.startLoc,{missingPlugin:e})}errorBuilder(e){return(t,r,s)=>{this.raise(e,cr(t,r,s))}}},Mc=class{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}},kc=class{constructor(e){this.parser=void 0,this.stack=[],this.undefinedPrivateNames=new Map,this.parser=e}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new Mc)}exit(){let e=this.stack.pop(),t=this.current();for(let[r,s]of Array.from(e.undefinedPrivateNames))t?t.undefinedPrivateNames.has(r)||t.undefinedPrivateNames.set(r,s):this.parser.raise(R.InvalidPrivateFieldResolution,s,{identifierName:r})}declarePrivateName(e,t,r){let{privateNames:s,loneAccessors:a,undefinedPrivateNames:p}=this.current(),u=s.has(e);if(t&3){let f=u&&a.get(e);if(f){let m=f&4,x=t&4,g=f&3,z=t&3;u=g===z||m!==x,u||a.delete(e)}else u||a.set(e,t)}u&&this.parser.raise(R.PrivateNameRedeclaration,r,{identifierName:e}),s.add(e),p.delete(e)}usePrivateName(e,t){let r;for(r of this.stack)if(r.privateNames.has(e))return;r?r.undefinedPrivateNames.set(e,t):this.parser.raise(R.InvalidPrivateFieldResolution,t,{identifierName:e})}},To=class{constructor(e=0){this.type=e}canBeArrowParameterDeclaration(){return this.type===2||this.type===1}isCertainlyParameterDeclaration(){return this.type===3}},qs=class extends To{constructor(e){super(e),this.declarationErrors=new Map}recordDeclarationError(e,t){let r=t.index;this.declarationErrors.set(r,[e,t])}clearDeclarationError(e){this.declarationErrors.delete(e)}iterateErrors(e){this.declarationErrors.forEach(e)}},Pc=class{constructor(e){this.parser=void 0,this.stack=[new To],this.parser=e}enter(e){this.stack.push(e)}exit(){this.stack.pop()}recordParameterInitializerError(e,t){let r=t.loc.start,{stack:s}=this,a=s.length-1,p=s[a];for(;!p.isCertainlyParameterDeclaration();){if(p.canBeArrowParameterDeclaration())p.recordDeclarationError(e,r);else return;p=s[--a]}this.parser.raise(e,r)}recordArrowParameterBindingError(e,t){let{stack:r}=this,s=r[r.length-1],a=t.loc.start;if(s.isCertainlyParameterDeclaration())this.parser.raise(e,a);else if(s.canBeArrowParameterDeclaration())s.recordDeclarationError(e,a);else return}recordAsyncArrowParametersError(e){let{stack:t}=this,r=t.length-1,s=t[r];for(;s.canBeArrowParameterDeclaration();)s.type===2&&s.recordDeclarationError(R.AwaitBindingIdentifier,e),s=t[--r]}validateAsPattern(){let{stack:e}=this,t=e[e.length-1];t.canBeArrowParameterDeclaration()&&t.iterateErrors(([r,s])=>{this.parser.raise(r,s);let a=e.length-2,p=e[a];for(;p.canBeArrowParameterDeclaration();)p.clearDeclarationError(s.index),p=e[--a]})}};function _pe(){return new To(3)}function Bpe(){return new qs(1)}function jpe(){return new qs(2)}function Jh(){return new To}var Lc=class extends Oc{addExtra(e,t,r,s=!0){if(!e)return;let{extra:a}=e;a==null&&(a={},e.extra=a),s?a[t]=r:Object.defineProperty(a,t,{enumerable:s,value:r})}isContextual(e){return this.state.type===e&&!this.state.containsEsc}isUnparsedContextual(e,t){if(this.input.startsWith(t,e)){let r=this.input.charCodeAt(e+t.length);return!(Kt(r)||(r&64512)===55296)}return!1}isLookaheadContextual(e){let t=this.nextTokenStart();return this.isUnparsedContextual(t,e)}eatContextual(e){return this.isContextual(e)?(this.next(),!0):!1}expectContextual(e,t){if(!this.eatContextual(e)){if(t!=null)throw this.raise(t,this.state.startLoc);this.unexpected(null,e)}}canInsertSemicolon(){return this.match(140)||this.match(8)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return Ph(this.input,this.offsetToSourcePos(this.state.lastTokEndLoc.index),this.state.start)}hasFollowingLineBreak(){return Ph(this.input,this.state.end,this.nextTokenStart())}isLineTerminator(){return this.eat(13)||this.canInsertSemicolon()}semicolon(e=!0){(e?this.isLineTerminator():this.eat(13))||this.raise(R.MissingSemicolon,this.state.lastTokEndLoc)}expect(e,t){this.eat(e)||this.unexpected(t,e)}tryParse(e,t=this.state.clone()){let r={node:null};try{let s=e((a=null)=>{throw r.node=a,r});if(this.state.errors.length>t.errors.length){let a=this.state;return this.state=t,this.state.tokensLength=a.tokensLength,{node:s,error:a.errors[t.errors.length],thrown:!1,aborted:!1,failState:a}}return{node:s,error:null,thrown:!1,aborted:!1,failState:null}}catch(s){let a=this.state;if(this.state=t,s instanceof SyntaxError)return{node:null,error:s,thrown:!0,aborted:!1,failState:a};if(s===r)return{node:r.node,error:null,thrown:!1,aborted:!0,failState:a};throw s}}checkExpressionErrors(e,t){if(!e)return!1;let{shorthandAssignLoc:r,doubleProtoLoc:s,privateKeyLoc:a,optionalParametersLoc:p,voidPatternLoc:u}=e,f=!!r||!!s||!!p||!!a||!!u;if(!t)return f;r!=null&&this.raise(R.InvalidCoverInitializedName,r),s!=null&&this.raise(R.DuplicateProto,s),a!=null&&this.raise(R.UnexpectedPrivateField,a),p!=null&&this.unexpected(p),u!=null&&this.raise(R.InvalidCoverDiscardElement,u)}isLiteralPropertyName(){return Vh(this.state.type)}isPrivateName(e){return e.type==="PrivateName"}getPrivateNameSV(e){return e.id.name}hasPropertyAsPrivateName(e){return(e.type==="MemberExpression"||e.type==="OptionalMemberExpression")&&this.isPrivateName(e.property)}isObjectProperty(e){return e.type==="ObjectProperty"}isObjectMethod(e){return e.type==="ObjectMethod"}initializeScopes(e=this.options.sourceType==="module"){let t=this.state.labels;this.state.labels=[];let r=this.exportedIdentifiers;this.exportedIdentifiers=new Set;let s=this.inModule;this.inModule=e;let a=this.scope,p=this.getScopeHandler();this.scope=new p(this,e);let u=this.prodParam;this.prodParam=new Ec;let f=this.classScope;this.classScope=new kc(this);let m=this.expressionScope;return this.expressionScope=new Pc(this),()=>{this.state.labels=t,this.exportedIdentifiers=r,this.inModule=s,this.scope=a,this.prodParam=u,this.classScope=f,this.expressionScope=m}}enterInitialScopes(){let e=0;(this.inModule||this.optionFlags&1)&&(e|=2),this.optionFlags&32&&(e|=1);let t=!this.inModule&&this.options.sourceType==="commonjs";(t||this.optionFlags&2)&&(e|=4),this.prodParam.enter(e);let r=t?514:1;this.optionFlags&4&&(r|=512),this.scope.enter(r)}checkDestructuringPrivate(e){let{privateKeyLoc:t}=e;t!==null&&this.expectPlugin("destructuringPrivate",t)}},So=class{constructor(){this.shorthandAssignLoc=null,this.doubleProtoLoc=null,this.privateKeyLoc=null,this.optionalParametersLoc=null,this.voidPatternLoc=null}},Eo=class{constructor(e,t,r){this.type="",this.start=t,this.end=0,this.loc=new zo(r),e?.optionFlags&128&&(this.range=[t,0]),e!=null&&e.filename&&(this.loc.filename=e.filename)}},Dc=Eo.prototype;Dc.__clone=function(){let o=new Eo(void 0,this.start,this.loc.start),e=Object.keys(this);for(let t=0,r=e.length;t<r;t++){let s=e[t];s!=="leadingComments"&&s!=="trailingComments"&&s!=="innerComments"&&(o[s]=this[s])}return o};var vc=class extends Lc{startNode(){let e=this.state.startLoc;return new Eo(this,e.index,e)}startNodeAt(e){return new Eo(this,e.index,e)}startNodeAtNode(e){return this.startNodeAt(e.loc.start)}finishNode(e,t){return this.finishNodeAt(e,t,this.state.lastTokEndLoc)}finishNodeAt(e,t,r){return e.type=t,e.end=r.index,e.loc.end=r,this.optionFlags&128&&(e.range[1]=r.index),this.optionFlags&4096&&this.processComment(e),e}resetStartLocation(e,t){e.start=t.index,e.loc.start=t,this.optionFlags&128&&(e.range[0]=t.index)}resetEndLocation(e,t=this.state.lastTokEndLoc){e.end=t.index,e.loc.end=t,this.optionFlags&128&&(e.range[1]=t.index)}resetStartLocationFromNode(e,t){this.resetStartLocation(e,t.loc.start)}castNodeTo(e,t){return e.type=t,e}cloneIdentifier(e){let{type:t,start:r,end:s,loc:a,range:p,name:u}=e,f=Object.create(Dc);return f.type=t,f.start=r,f.end=s,f.loc=a,f.range=p,f.name=u,e.extra&&(f.extra=e.extra),f}cloneStringLiteral(e){let{type:t,start:r,end:s,loc:a,range:p,extra:u}=e,f=Object.create(Dc);return f.type=t,f.start=r,f.end=s,f.loc=a,f.range=p,f.extra=u,f.value=e.value,f}},Fc=o=>o.type==="ParenthesizedExpression"?Fc(o.expression):o,Nc=class extends vc{toAssignable(e,t=!1){var r,s;let a;switch((e.type==="ParenthesizedExpression"||(r=e.extra)!=null&&r.parenthesized)&&(a=Fc(e),t?a.type==="Identifier"?this.expressionScope.recordArrowParameterBindingError(R.InvalidParenthesizedAssignment,e):a.type!=="CallExpression"&&a.type!=="MemberExpression"&&!this.isOptionalMemberExpression(a)&&this.raise(R.InvalidParenthesizedAssignment,e):this.raise(R.InvalidParenthesizedAssignment,e)),e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":case"VoidPattern":break;case"ObjectExpression":this.castNodeTo(e,"ObjectPattern");for(let u=0,f=e.properties.length,m=f-1;u<f;u++){var p;let x=e.properties[u],g=u===m;this.toAssignableObjectExpressionProp(x,g,t),g&&x.type==="RestElement"&&(p=e.extra)!=null&&p.trailingCommaLoc&&this.raise(R.RestTrailingComma,e.extra.trailingCommaLoc)}break;case"ObjectProperty":{let{key:u,value:f}=e;this.isPrivateName(u)&&this.classScope.usePrivateName(this.getPrivateNameSV(u),u.loc.start),this.toAssignable(f,t);break}case"SpreadElement":throw new Error("Internal @babel/parser error (this is a bug, please report it). SpreadElement should be converted by .toAssignable's caller.");case"ArrayExpression":this.castNodeTo(e,"ArrayPattern"),this.toAssignableList(e.elements,(s=e.extra)==null?void 0:s.trailingCommaLoc,t);break;case"AssignmentExpression":e.operator!=="="&&this.raise(R.MissingEqInAssignment,e.left.loc.end),this.castNodeTo(e,"AssignmentPattern"),delete e.operator,e.left.type==="VoidPattern"&&this.raise(R.VoidPatternInitializer,e.left),this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(a,t);break}}toAssignableObjectExpressionProp(e,t,r){if(e.type==="ObjectMethod")this.raise(e.kind==="get"||e.kind==="set"?R.PatternHasAccessor:R.PatternHasMethod,e.key);else if(e.type==="SpreadElement"){this.castNodeTo(e,"RestElement");let s=e.argument;this.checkToRestConversion(s,!1),this.toAssignable(s,r),t||this.raise(R.RestTrailingComma,e)}else this.toAssignable(e,r)}toAssignableList(e,t,r){let s=e.length-1;for(let a=0;a<=s;a++){let p=e[a];p&&(this.toAssignableListItem(e,a,r),p.type==="RestElement"&&(a<s?this.raise(R.RestTrailingComma,p):t&&this.raise(R.RestTrailingComma,t)))}}toAssignableListItem(e,t,r){let s=e[t];if(s.type==="SpreadElement"){this.castNodeTo(s,"RestElement");let a=s.argument;this.checkToRestConversion(a,!0),this.toAssignable(a,r)}else this.toAssignable(s,r)}isAssignable(e,t){switch(e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":case"VoidPattern":return!0;case"ObjectExpression":{let r=e.properties.length-1;return e.properties.every((s,a)=>s.type!=="ObjectMethod"&&(a===r||s.type!=="SpreadElement")&&this.isAssignable(s))}case"ObjectProperty":return this.isAssignable(e.value);case"SpreadElement":return this.isAssignable(e.argument);case"ArrayExpression":return e.elements.every(r=>r===null||this.isAssignable(r));case"AssignmentExpression":return e.operator==="=";case"ParenthesizedExpression":return this.isAssignable(e.expression);case"MemberExpression":case"OptionalMemberExpression":return!t;default:return!1}}toReferencedList(e,t){return e}toReferencedListDeep(e,t){this.toReferencedList(e,t);for(let r of e)r?.type==="ArrayExpression"&&this.toReferencedListDeep(r.elements)}parseSpread(e){let t=this.startNode();return this.next(),t.argument=this.parseMaybeAssignAllowIn(e,void 0),this.finishNode(t,"SpreadElement")}parseRestBinding(){let e=this.startNode();this.next();let t=this.parseBindingAtom();return t.type==="VoidPattern"&&this.raise(R.UnexpectedVoidPattern,t),e.argument=t,this.finishNode(e,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{let e=this.startNode();return this.next(),e.elements=this.parseBindingList(3,93,1),this.finishNode(e,"ArrayPattern")}case 5:return this.parseObjectLike(8,!0);case 88:return this.parseVoidPattern(null)}return this.parseIdentifier()}parseBindingList(e,t,r){let s=r&1,a=[],p=!0;for(;!this.eat(e);)if(p?p=!1:this.expect(12),s&&this.match(12))a.push(null);else{if(this.eat(e))break;if(this.match(21)){let u=this.parseRestBinding();if((this.hasPlugin("flow")||r&2)&&(u=this.parseFunctionParamType(u)),a.push(u),!this.checkCommaAfterRest(t)){this.expect(e);break}}else{let u=[];if(r&2)for(this.match(26)&&this.hasPlugin("decorators")&&this.raise(R.UnsupportedParameterDecorator,this.state.startLoc);this.match(26);)u.push(this.parseDecorator());a.push(this.parseBindingElement(r,u))}}return a}parseBindingRestProperty(e){return this.next(),this.hasPlugin("discardBinding")&&this.match(88)?(e.argument=this.parseVoidPattern(null),this.raise(R.UnexpectedVoidPattern,e.argument)):e.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(e,"RestElement")}parseBindingProperty(){let{type:e,startLoc:t}=this.state;if(e===21)return this.parseBindingRestProperty(this.startNode());let r=this.startNode();return e===139?(this.expectPlugin("destructuringPrivate",t),this.classScope.usePrivateName(this.state.value,t),r.key=this.parsePrivateName()):this.parsePropertyName(r),r.method=!1,this.parseObjPropValue(r,t,!1,!1,!0,!1)}parseBindingElement(e,t){let r=this.parseMaybeDefault();return(this.hasPlugin("flow")||e&2)&&this.parseFunctionParamType(r),t.length&&(r.decorators=t,this.resetStartLocationFromNode(r,t[0])),this.parseMaybeDefault(r.loc.start,r)}parseFunctionParamType(e){return e}parseMaybeDefault(e,t){if(e??(e=this.state.startLoc),t=t??this.parseBindingAtom(),!this.eat(29))return t;let r=this.startNodeAt(e);return t.type==="VoidPattern"&&this.raise(R.VoidPatternInitializer,t),r.left=t,r.right=this.parseMaybeAssignAllowIn(),this.finishNode(r,"AssignmentPattern")}isValidLVal(e,t,r,s){switch(e){case"AssignmentPattern":return"left";case"RestElement":return"argument";case"ObjectProperty":return"value";case"ParenthesizedExpression":return"expression";case"ArrayPattern":return"elements";case"ObjectPattern":return"properties";case"VoidPattern":return!0;case"CallExpression":if(!t&&!this.state.strict&&this.optionFlags&8192)return!0}return!1}isOptionalMemberExpression(e){return e.type==="OptionalMemberExpression"}checkLVal(e,t,r=64,s=!1,a=!1,p=!1,u=!1){var f;let m=e.type;if(this.isObjectMethod(e))return;let x=this.isOptionalMemberExpression(e);if(x||m==="MemberExpression"){x&&(this.expectPlugin("optionalChainingAssign",e.loc.start),t.type!=="AssignmentExpression"&&this.raise(R.InvalidLhsOptionalChaining,e,{ancestor:t})),r!==64&&this.raise(R.InvalidPropertyBindingPattern,e);return}if(m==="Identifier"){this.checkIdentifier(e,r,a);let{name:W}=e;s&&(s.has(W)?this.raise(R.ParamDupe,e):s.add(W));return}else m==="VoidPattern"&&t.type==="CatchClause"&&this.raise(R.VoidPatternCatchClauseParam,e);let g=Fc(e);u||(u=g.type==="CallExpression"&&(g.callee.type==="Import"||g.callee.type==="Super"));let z=this.isValidLVal(m,u,!(p||(f=e.extra)!=null&&f.parenthesized)&&t.type==="AssignmentExpression",r);if(z===!0)return;if(z===!1){let W=r===64?R.InvalidLhs:R.InvalidLhsBinding;this.raise(W,e,{ancestor:t});return}let w,k;typeof z=="string"?(w=z,k=m==="ParenthesizedExpression"):[w,k]=z;let F=m==="ArrayPattern"||m==="ObjectPattern"?{type:m}:t,Y=e[w];if(Array.isArray(Y))for(let W of Y)W&&this.checkLVal(W,F,r,s,a,k,!0);else Y&&this.checkLVal(Y,F,r,s,a,k,u)}checkIdentifier(e,t,r=!1){this.state.strict&&(r?Kh(e.name,this.inModule):Gh(e.name))&&(t===64?this.raise(R.StrictEvalArguments,e,{referenceName:e.name}):this.raise(R.StrictEvalArgumentsBinding,e,{bindingName:e.name})),t&8192&&e.name==="let"&&this.raise(R.LetInLexicalBinding,e),t&64||this.declareNameFromIdentifier(e,t)}declareNameFromIdentifier(e,t){this.scope.declareName(e.name,t,e.loc.start)}checkToRestConversion(e,t){switch(e.type){case"ParenthesizedExpression":this.checkToRestConversion(e.expression,t);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(t)break;default:this.raise(R.InvalidRestAssignmentPattern,e)}}checkCommaAfterRest(e){return this.match(12)?(this.raise(this.lookaheadCharCode()===e?R.RestTrailingComma:R.ElementAfterRest,this.state.startLoc),!0):!1}},xc=/in(?:stanceof)?|as|satisfies/y;function Vpe(o){if(o==null)throw new Error(`Unexpected ${o} value.`);return o}function vh(o){if(!o)throw new Error("Assert fail")}var $=ct`typescript`({AbstractMethodHasImplementation:({methodName:o})=>`Method '${o}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:o})=>`Property '${o}' cannot have an initializer because it is marked abstract.`,AccessorCannotBeOptional:"An 'accessor' property cannot be declared optional.",AccessorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccessorCannotHaveTypeParameters:"An accessor cannot have type parameters.",ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:({kind:o})=>`'declare' is not allowed in ${o}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:({modifier:o})=>`Accessibility modifier already seen: '${o}'.`,DuplicateModifier:({modifier:o})=>`Duplicate modifier: '${o}'.`,EmptyHeritageClauseType:({token:o})=>`'${o}' list cannot be empty.`,EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ImportAliasHasImportType:"An import alias can not use 'import type'.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` modifier",IncompatibleModifiers:({modifiers:o})=>`'${o[0]}' modifier cannot be used with '${o[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:o})=>`Index signatures cannot have an accessibility modifier ('${o}').`,IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InitializerNotAllowedInAmbientContext:"Initializers are not allowed in ambient contexts.",InvalidHeritageClauseType:({token:o})=>`'${o}' list can only include identifiers or qualified-names with optional type arguments.`,InvalidModifierOnAwaitUsingDeclaration:o=>`'${o}' modifier cannot appear on an await using declaration.`,InvalidModifierOnTypeMember:({modifier:o})=>`'${o}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:o})=>`'${o}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:o})=>`'${o}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifierOnUsingDeclaration:o=>`'${o}' modifier cannot appear on a using declaration.`,InvalidModifiersOrder:({orderedModifiers:o})=>`'${o[0]}' modifier must precede '${o[1]}' modifier.`,InvalidPropertyAccessAfterInstantiationExpression:"Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifier:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:({modifier:o})=>`Private elements cannot have an accessibility modifier ('${o}').`,ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `<T,>() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",SetAccessorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccessorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccessorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:({typeParameterName:o})=>`Single type parameter ${o} should have a trailing comma. Example usage: <${o},>.`,StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TupleOptionalAfterType:"A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",TypeModifierIsUsedInTypeExports:"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",TypeModifierIsUsedInTypeImports:"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnsupportedImportTypeArgument:"Argument in a type import must be a string literal.",UnsupportedParameterPropertyKind:"A parameter property may not be declared using a binding pattern.",UnsupportedSignatureParameterKind:({type:o})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${o}.`,UsingDeclarationInAmbientContext:o=>`'${o}' declarations are not allowed in ambient contexts.`});function Upe(o){switch(o){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}function Fh(o){return o==="private"||o==="public"||o==="protected"}function Hpe(o){return o==="in"||o==="out"}var Wpe=o=>class extends o{constructor(...t){super(...t),this.tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:$.InvalidModifierOnTypeParameter}),this.tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:$.InvalidModifierOnTypeParameterPositions}),this.tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:$.InvalidModifierOnTypeParameter})}getScopeHandler(){return Tc}tsIsIdentifier(){return pe(this.state.type)}tsTokenCanFollowModifier(){return this.match(0)||this.match(5)||this.match(55)||this.match(21)||this.match(139)||this.isLiteralPropertyName()}tsNextTokenOnSameLineAndCanFollowModifier(){return this.next(),this.hasPrecedingLineBreak()?!1:this.tsTokenCanFollowModifier()}tsNextTokenCanFollowModifier(){return this.match(106)?(this.next(),this.tsTokenCanFollowModifier()):this.tsNextTokenOnSameLineAndCanFollowModifier()}tsParseModifier(t,r,s){if(!pe(this.state.type)&&this.state.type!==58&&this.state.type!==75)return;let a=this.state.value;if(t.includes(a)){if(s&&this.match(106)||r&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return a}}tsParseModifiers({allowedModifiers:t,disallowedModifiers:r,stopOnStartOfClassStaticBlock:s,errorTemplate:a=$.InvalidModifierOnTypeMember},p){let u=(m,x,g,z)=>{x===g&&p[z]&&this.raise($.InvalidModifiersOrder,m,{orderedModifiers:[g,z]})},f=(m,x,g,z)=>{(p[g]&&x===z||p[z]&&x===g)&&this.raise($.IncompatibleModifiers,m,{modifiers:[g,z]})};for(;;){let{startLoc:m}=this.state,x=this.tsParseModifier(t.concat(r??[]),s,p.static);if(!x)break;Fh(x)?p.accessibility?this.raise($.DuplicateAccessibilityModifier,m,{modifier:x}):(u(m,x,x,"override"),u(m,x,x,"static"),u(m,x,x,"readonly"),p.accessibility=x):Hpe(x)?(p[x]&&this.raise($.DuplicateModifier,m,{modifier:x}),p[x]=!0,u(m,x,"in","out")):(hasOwnProperty.call(p,x)?this.raise($.DuplicateModifier,m,{modifier:x}):(u(m,x,"static","readonly"),u(m,x,"static","override"),u(m,x,"override","readonly"),u(m,x,"abstract","override"),f(m,x,"declare","override"),f(m,x,"static","abstract")),p[x]=!0),r!=null&&r.includes(x)&&this.raise(a,m,{modifier:x})}}tsIsListTerminator(t){switch(t){case"EnumMembers":case"TypeMembers":return this.match(8);case"HeritageClauseElement":return this.match(5);case"TupleElementTypes":return this.match(3);case"TypeParametersOrArguments":return this.match(48)}}tsParseList(t,r){let s=[];for(;!this.tsIsListTerminator(t);)s.push(r());return s}tsParseDelimitedList(t,r,s){return Vpe(this.tsParseDelimitedListWorker(t,r,!0,s))}tsParseDelimitedListWorker(t,r,s,a){let p=[],u=-1;for(;!this.tsIsListTerminator(t);){u=-1;let f=r();if(f==null)return;if(p.push(f),this.eat(12)){u=this.state.lastTokStartLoc.index;continue}if(this.tsIsListTerminator(t))break;s&&this.expect(12);return}return a&&(a.value=u),p}tsParseBracketedList(t,r,s,a,p){a||(s?this.expect(0):this.expect(47));let u=this.tsParseDelimitedList(t,r,p);return s?this.expect(3):this.expect(48),u}tsParseImportType(){let t=this.startNode();return this.expect(83),this.expect(10),this.match(134)?t.argument=this.parseStringLiteral(this.state.value):(this.raise($.UnsupportedImportTypeArgument,this.state.startLoc),t.argument=super.parseExprAtom()),this.eat(12)?t.options=this.tsParseImportTypeOptions():t.options=null,this.expect(11),this.eat(16)&&(t.qualifier=this.tsParseEntityName(3)),this.match(47)&&(t.typeParameters=this.tsParseTypeArguments()),this.finishNode(t,"TSImportType")}tsParseImportTypeOptions(){let t=this.startNode();this.expect(5);let r=this.startNode();return this.isContextual(76)?(r.method=!1,r.key=this.parseIdentifier(!0),r.computed=!1,r.shorthand=!1):this.unexpected(null,76),this.expect(14),r.value=this.tsParseImportTypeWithPropertyValue(),t.properties=[this.finishObjectProperty(r)],this.eat(12),this.expect(8),this.finishNode(t,"ObjectExpression")}tsParseImportTypeWithPropertyValue(){let t=this.startNode(),r=[];for(this.expect(5);!this.match(8);){let s=this.state.type;pe(s)||s===134?r.push(super.parsePropertyDefinition(null)):this.unexpected(),this.eat(12)}return t.properties=r,this.next(),this.finishNode(t,"ObjectExpression")}tsParseEntityName(t){let r;if(t&1&&this.match(78))if(t&2)r=this.parseIdentifier(!0);else{let s=this.startNode();this.next(),r=this.finishNode(s,"ThisExpression")}else r=this.parseIdentifier(!!(t&1));for(;this.eat(16);){let s=this.startNodeAtNode(r);s.left=r,s.right=this.parseIdentifier(!!(t&1)),r=this.finishNode(s,"TSQualifiedName")}return r}tsParseTypeReference(){let t=this.startNode();return t.typeName=this.tsParseEntityName(1),!this.hasPrecedingLineBreak()&&this.match(47)&&(t.typeParameters=this.tsParseTypeArguments()),this.finishNode(t,"TSTypeReference")}tsParseThisTypePredicate(t){this.next();let r=this.startNodeAtNode(t);return r.parameterName=t,r.typeAnnotation=this.tsParseTypeAnnotation(!1),r.asserts=!1,this.finishNode(r,"TSTypePredicate")}tsParseThisTypeNode(){let t=this.startNode();return this.next(),this.finishNode(t,"TSThisType")}tsParseTypeQuery(){let t=this.startNode();return this.expect(87),this.match(83)?t.exprName=this.tsParseImportType():t.exprName=this.tsParseEntityName(3),!this.hasPrecedingLineBreak()&&this.match(47)&&(t.typeParameters=this.tsParseTypeArguments()),this.finishNode(t,"TSTypeQuery")}tsParseTypeParameter(t){let r=this.startNode();return t(r),r.name=this.tsParseTypeParameterName(),r.constraint=this.tsEatThenParseType(81),r.default=this.tsEatThenParseType(29),this.finishNode(r,"TSTypeParameter")}tsTryParseTypeParameters(t){if(this.match(47))return this.tsParseTypeParameters(t)}tsParseTypeParameters(t){let r=this.startNode();this.match(47)||this.match(143)?this.next():this.unexpected();let s={value:-1};return r.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,t),!1,!0,s),r.params.length===0&&this.raise($.EmptyTypeParameters,r),s.value!==-1&&this.addExtra(r,"trailingComma",s.value),this.finishNode(r,"TSTypeParameterDeclaration")}tsFillSignature(t,r){let s=t===19,a="parameters",p="typeAnnotation";r.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),r[a]=this.tsParseBindingListForSignature(),s?r[p]=this.tsParseTypeOrTypePredicateAnnotation(t):this.match(t)&&(r[p]=this.tsParseTypeOrTypePredicateAnnotation(t))}tsParseBindingListForSignature(){let t=super.parseBindingList(11,41,2);for(let r of t){let{type:s}=r;(s==="AssignmentPattern"||s==="TSParameterProperty")&&this.raise($.UnsupportedSignatureParameterKind,r,{type:s})}return t}tsParseTypeMemberSemicolon(){!this.eat(12)&&!this.isLineTerminator()&&this.expect(13)}tsParseSignatureMember(t,r){return this.tsFillSignature(14,r),this.tsParseTypeMemberSemicolon(),this.finishNode(r,t)}tsIsUnambiguouslyIndexSignature(){return this.next(),pe(this.state.type)?(this.next(),this.match(14)):!1}tsTryParseIndexSignature(t){if(!(this.match(0)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))))return;this.expect(0);let r=this.parseIdentifier();r.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(r),this.expect(3),t.parameters=[r];let s=this.tsTryParseTypeAnnotation();return s&&(t.typeAnnotation=s),this.tsParseTypeMemberSemicolon(),this.finishNode(t,"TSIndexSignature")}tsParsePropertyOrMethodSignature(t,r){if(this.eat(17)&&(t.optional=!0),this.match(10)||this.match(47)){r&&this.raise($.ReadonlyForMethodSignature,t);let s=t;s.kind&&this.match(47)&&this.raise($.AccessorCannotHaveTypeParameters,this.state.curPosition()),this.tsFillSignature(14,s),this.tsParseTypeMemberSemicolon();let a="parameters",p="typeAnnotation";if(s.kind==="get")s[a].length>0&&(this.raise(R.BadGetterArity,this.state.curPosition()),this.isThisParam(s[a][0])&&this.raise($.AccessorCannotDeclareThisParameter,this.state.curPosition()));else if(s.kind==="set"){if(s[a].length!==1)this.raise(R.BadSetterArity,this.state.curPosition());else{let u=s[a][0];this.isThisParam(u)&&this.raise($.AccessorCannotDeclareThisParameter,this.state.curPosition()),u.type==="Identifier"&&u.optional&&this.raise($.SetAccessorCannotHaveOptionalParameter,this.state.curPosition()),u.type==="RestElement"&&this.raise($.SetAccessorCannotHaveRestParameter,this.state.curPosition())}s[p]&&this.raise($.SetAccessorCannotHaveReturnType,s[p])}else s.kind="method";return this.finishNode(s,"TSMethodSignature")}else{let s=t;r&&(s.readonly=!0);let a=this.tsTryParseTypeAnnotation();return a&&(s.typeAnnotation=a),this.tsParseTypeMemberSemicolon(),this.finishNode(s,"TSPropertySignature")}}tsParseTypeMember(){let t=this.startNode();if(this.match(10)||this.match(47))return this.tsParseSignatureMember("TSCallSignatureDeclaration",t);if(this.match(77)){let s=this.startNode();return this.next(),this.match(10)||this.match(47)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",t):(t.key=this.createIdentifier(s,"new"),this.tsParsePropertyOrMethodSignature(t,!1))}this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},t);let r=this.tsTryParseIndexSignature(t);return r||(super.parsePropertyName(t),!t.computed&&t.key.type==="Identifier"&&(t.key.name==="get"||t.key.name==="set")&&this.tsTokenCanFollowModifier()&&(t.kind=t.key.name,super.parsePropertyName(t),!this.match(10)&&!this.match(47)&&this.unexpected(null,10)),this.tsParsePropertyOrMethodSignature(t,!!t.readonly))}tsParseTypeLiteral(){let t=this.startNode();return t.members=this.tsParseObjectTypeMembers(),this.finishNode(t,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(5);let t=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(8),t}tsIsStartOfMappedType(){return this.next(),this.eat(53)?this.isContextual(122):(this.isContextual(122)&&this.next(),!this.match(0)||(this.next(),!this.tsIsIdentifier())?!1:(this.next(),this.match(58)))}tsParseMappedType(){let t=this.startNode();this.expect(5),this.match(53)?(t.readonly=this.state.value,this.next(),this.expectContextual(122)):this.eatContextual(122)&&(t.readonly=!0),this.expect(0);let r=this.startNode();return r.name=this.tsParseTypeParameterName(),r.constraint=this.tsExpectThenParseType(58),t.typeParameter=this.finishNode(r,"TSTypeParameter"),t.nameType=this.eatContextual(93)?this.tsParseType():null,this.expect(3),this.match(53)?(t.optional=this.state.value,this.next(),this.expect(17)):this.eat(17)&&(t.optional=!0),t.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(8),this.finishNode(t,"TSMappedType")}tsParseTupleType(){let t=this.startNode();t.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let r=!1;return t.elementTypes.forEach(s=>{let{type:a}=s;r&&a!=="TSRestType"&&a!=="TSOptionalType"&&!(a==="TSNamedTupleMember"&&s.optional)&&this.raise($.OptionalTypeBeforeRequired,s),r||(r=a==="TSNamedTupleMember"&&s.optional||a==="TSOptionalType")}),this.finishNode(t,"TSTupleType")}tsParseTupleElementType(){let t=this.state.startLoc,r=this.eat(21),{startLoc:s}=this.state,a,p,u,f,x=pt(this.state.type)?this.lookaheadCharCode():null;if(x===58)a=!0,u=!1,p=this.parseIdentifier(!0),this.expect(14),f=this.tsParseType();else if(x===63){u=!0;let g=this.state.value,z=this.tsParseNonArrayType();this.lookaheadCharCode()===58?(a=!0,p=this.createIdentifier(this.startNodeAt(s),g),this.expect(17),this.expect(14),f=this.tsParseType()):(a=!1,f=z,this.expect(17))}else f=this.tsParseType(),u=this.eat(17),a=this.eat(14);if(a){let g;p?(g=this.startNodeAt(s),g.optional=u,g.label=p,g.elementType=f,this.eat(17)&&(g.optional=!0,this.raise($.TupleOptionalAfterType,this.state.lastTokStartLoc))):(g=this.startNodeAt(s),g.optional=u,this.raise($.InvalidTupleMemberLabel,f),g.label=f,g.elementType=this.tsParseType()),f=this.finishNode(g,"TSNamedTupleMember")}else if(u){let g=this.startNodeAt(s);g.typeAnnotation=f,f=this.finishNode(g,"TSOptionalType")}if(r){let g=this.startNodeAt(t);g.typeAnnotation=f,f=this.finishNode(g,"TSRestType")}return f}tsParseParenthesizedType(){let t=this.startNode();return this.expect(10),t.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(t,"TSParenthesizedType")}tsParseFunctionOrConstructorType(t,r){let s=this.startNode();return t==="TSConstructorType"&&(s.abstract=!!r,r&&this.next(),this.next()),this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(19,s)),this.finishNode(s,t)}tsParseLiteralTypeNode(){let t=this.startNode();switch(this.state.type){case 135:case 136:case 134:case 85:case 86:t.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(t,"TSLiteralType")}tsParseTemplateLiteralType(){let t=this.startNode();return t.literal=super.parseTemplate(!1),this.finishNode(t,"TSLiteralType")}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){let t=this.tsParseThisTypeNode();return this.isContextual(116)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(t):t}tsParseNonArrayType(){switch(this.state.type){case 134:case 135:case 136:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if(this.state.value==="-"){let t=this.startNode(),r=this.lookahead();return r.type!==135&&r.type!==136&&this.unexpected(),t.literal=this.parseMaybeUnary(),this.finishNode(t,"TSLiteralType")}break;case 78:return this.tsParseThisTypeOrThisTypePredicate();case 87:return this.tsParseTypeQuery();case 83:return this.tsParseImportType();case 5:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case 0:return this.tsParseTupleType();case 10:return this.tsParseParenthesizedType();case 25:case 24:return this.tsParseTemplateLiteralType();default:{let{type:t}=this.state;if(pe(t)||t===88||t===84){let r=t===88?"TSVoidKeyword":t===84?"TSNullKeyword":Upe(this.state.value);if(r!==void 0&&this.lookaheadCharCode()!==46){let s=this.startNode();return this.next(),this.finishNode(s,r)}return this.tsParseTypeReference()}}}throw this.unexpected()}tsParseArrayTypeOrHigher(){let{startLoc:t}=this.state,r=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(3)){let s=this.startNodeAt(t);s.elementType=r,this.expect(3),r=this.finishNode(s,"TSArrayType")}else{let s=this.startNodeAt(t);s.objectType=r,s.indexType=this.tsParseType(),this.expect(3),r=this.finishNode(s,"TSIndexedAccessType")}return r}tsParseTypeOperator(){let t=this.startNode(),r=this.state.value;return this.next(),t.operator=r,t.typeAnnotation=this.tsParseTypeOperatorOrHigher(),r==="readonly"&&this.tsCheckTypeAnnotationForReadOnly(t),this.finishNode(t,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(t){switch(t.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise($.UnexpectedReadonly,t)}}tsParseInferType(){let t=this.startNode();this.expectContextual(115);let r=this.startNode();return r.name=this.tsParseTypeParameterName(),r.constraint=this.tsTryParse(()=>this.tsParseConstraintForInferType()),t.typeParameter=this.finishNode(r,"TSTypeParameter"),this.finishNode(t,"TSInferType")}tsParseConstraintForInferType(){if(this.eat(81)){let t=this.tsInDisallowConditionalTypesContext(()=>this.tsParseType());if(this.state.inDisallowConditionalTypesContext||!this.match(17))return t}}tsParseTypeOperatorOrHigher(){return dpe(this.state.type)&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(115)?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseUnionOrIntersectionType(t,r,s){let a=this.startNode(),p=this.eat(s),u=[];do u.push(r());while(this.eat(s));return u.length===1&&!p?u[0]:(a.types=u,this.finishNode(a,t))}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),45)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),43)}tsIsStartOfFunctionType(){return this.match(47)?!0:this.match(10)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(pe(this.state.type)||this.match(78))return this.next(),!0;if(this.match(5)){let{errors:t}=this.state,r=t.length;try{return this.parseObjectLike(8,!0),t.length===r}catch{return!1}}if(this.match(0)){this.next();let{errors:t}=this.state,r=t.length;try{return super.parseBindingList(3,93,1),t.length===r}catch{return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){return this.next(),!!(this.match(11)||this.match(21)||this.tsSkipParameterStart()&&(this.match(14)||this.match(12)||this.match(17)||this.match(29)||this.match(11)&&(this.next(),this.match(19))))}tsParseTypeOrTypePredicateAnnotation(t){return this.tsInType(()=>{let r=this.startNode();this.expect(t);let s=this.startNode(),a=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(a&&this.match(78)){let f=this.tsParseThisTypeOrThisTypePredicate();return f.type==="TSThisType"?(s.parameterName=f,s.asserts=!0,s.typeAnnotation=null,f=this.finishNode(s,"TSTypePredicate")):(this.resetStartLocationFromNode(f,s),f.asserts=!0),r.typeAnnotation=f,this.finishNode(r,"TSTypeAnnotation")}let p=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!p)return a?(s.parameterName=this.parseIdentifier(),s.asserts=a,s.typeAnnotation=null,r.typeAnnotation=this.finishNode(s,"TSTypePredicate"),this.finishNode(r,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,r);let u=this.tsParseTypeAnnotation(!1);return s.parameterName=p,s.typeAnnotation=u,s.asserts=a,r.typeAnnotation=this.finishNode(s,"TSTypePredicate"),this.finishNode(r,"TSTypeAnnotation")})}tsTryParseTypeOrTypePredicateAnnotation(){if(this.match(14))return this.tsParseTypeOrTypePredicateAnnotation(14)}tsTryParseTypeAnnotation(){if(this.match(14))return this.tsParseTypeAnnotation()}tsTryParseType(){return this.tsEatThenParseType(14)}tsParseTypePredicatePrefix(){let t=this.parseIdentifier();if(this.isContextual(116)&&!this.hasPrecedingLineBreak())return this.next(),t}tsParseTypePredicateAsserts(){if(this.state.type!==109)return!1;let t=this.state.containsEsc;return this.next(),!pe(this.state.type)&&!this.match(78)?!1:(t&&this.raise(R.InvalidEscapedReservedWord,this.state.lastTokStartLoc,{reservedWord:"asserts"}),!0)}tsParseTypeAnnotation(t=!0,r=this.startNode()){return this.tsInType(()=>{t&&this.expect(14),r.typeAnnotation=this.tsParseType()}),this.finishNode(r,"TSTypeAnnotation")}tsParseType(){vh(this.state.inType);let t=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return t;let r=this.startNodeAtNode(t);return r.checkType=t,r.extendsType=this.tsInDisallowConditionalTypesContext(()=>this.tsParseNonConditionalType()),this.expect(17),r.trueType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.expect(14),r.falseType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.finishNode(r,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual(124)&&this.isLookaheadContextual("new")}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(77)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.isAbstractConstructorSignature()?this.tsParseFunctionOrConstructorType("TSConstructorType",!0):this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise($.ReservedTypeAssertion,this.state.startLoc);let t=this.startNode();return t.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?this.tsParseTypeReference():this.tsParseType())),this.expect(48),t.expression=this.parseMaybeUnary(),this.finishNode(t,"TSTypeAssertion")}tsParseHeritageClause(t){let r=this.state.startLoc,s=this.tsParseDelimitedList("HeritageClauseElement",()=>{let a=this.startNode();return a.expression=this.tsParseEntityName(3),this.match(47)&&(a.typeParameters=this.tsParseTypeArguments()),this.finishNode(a,"TSExpressionWithTypeArguments")});return s.length||this.raise($.EmptyHeritageClauseType,r,{token:t}),s}tsParseInterfaceDeclaration(t,r={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(129),r.declare&&(t.declare=!0),pe(this.state.type)?(t.id=this.parseIdentifier(),this.checkIdentifier(t.id,130)):(t.id=null,this.raise($.MissingInterfaceName,this.state.startLoc)),t.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81)&&(t.extends=this.tsParseHeritageClause("extends"));let s=this.startNode();return s.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),t.body=this.finishNode(s,"TSInterfaceBody"),this.finishNode(t,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(t){return t.id=this.parseIdentifier(),this.checkIdentifier(t.id,2),t.typeAnnotation=this.tsInType(()=>{if(t.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers),this.expect(29),this.isContextual(114)&&this.lookaheadCharCode()!==46){let r=this.startNode();return this.next(),this.finishNode(r,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(t,"TSTypeAliasDeclaration")}tsInTopLevelContext(t){if(this.curContext()!==ce.brace){let r=this.state.context;this.state.context=[r[0]];try{return t()}finally{this.state.context=r}}else return t()}tsInType(t){let r=this.state.inType;this.state.inType=!0;try{return t()}finally{this.state.inType=r}}tsInDisallowConditionalTypesContext(t){let r=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return t()}finally{this.state.inDisallowConditionalTypesContext=r}}tsInAllowConditionalTypesContext(t){let r=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return t()}finally{this.state.inDisallowConditionalTypesContext=r}}tsEatThenParseType(t){if(this.match(t))return this.tsNextThenParseType()}tsExpectThenParseType(t){return this.tsInType(()=>(this.expect(t),this.tsParseType()))}tsNextThenParseType(){return this.tsInType(()=>(this.next(),this.tsParseType()))}tsParseEnumMember(){let t=this.startNode();return t.id=this.match(134)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(29)&&(t.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(t,"TSEnumMember")}tsParseEnumDeclaration(t,r={}){return r.const&&(t.const=!0),r.declare&&(t.declare=!0),this.expectContextual(126),t.id=this.parseIdentifier(),this.checkIdentifier(t.id,t.const?8971:8459),this.expect(5),t.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(t,"TSEnumDeclaration")}tsParseEnumBody(){let t=this.startNode();return this.expect(5),t.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(t,"TSEnumBody")}tsParseModuleBlock(){let t=this.startNode();return this.scope.enter(0),this.expect(5),super.parseBlockOrModuleBlockBody(t.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(t,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(t,r=!1){if(t.id=this.parseIdentifier(),r||this.checkIdentifier(t.id,1024),this.eat(16)){let s=this.startNode();this.tsParseModuleOrNamespaceDeclaration(s,!0),t.body=s}else this.scope.enter(1024),this.prodParam.enter(0),t.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(t,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(t){return this.isContextual(112)?(t.kind="global",t.global=!0,t.id=this.parseIdentifier()):this.match(134)?(t.kind="module",t.id=super.parseStringLiteral(this.state.value)):this.unexpected(),this.match(5)?(this.scope.enter(1024),this.prodParam.enter(0),t.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(t,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(t,r,s){t.isExport=s||!1,t.id=r||this.parseIdentifier(),this.checkIdentifier(t.id,4096),this.expect(29);let a=this.tsParseModuleReference();return t.importKind==="type"&&a.type!=="TSExternalModuleReference"&&this.raise($.ImportAliasHasImportType,a),t.moduleReference=a,this.semicolon(),this.finishNode(t,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(119)&&this.lookaheadCharCode()===40}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(0)}tsParseExternalModuleReference(){let t=this.startNode();return this.expectContextual(119),this.expect(10),this.match(134)||this.unexpected(),t.expression=super.parseExprAtom(),this.expect(11),this.sawUnambiguousESM=!0,this.finishNode(t,"TSExternalModuleReference")}tsLookAhead(t){let r=this.state.clone(),s=t();return this.state=r,s}tsTryParseAndCatch(t){let r=this.tryParse(s=>t()||s());if(!(r.aborted||!r.node))return r.error&&(this.state=r.failState),r.node}tsTryParse(t){let r=this.state.clone(),s=t();if(s!==void 0&&s!==!1)return s;this.state=r}tsTryParseDeclare(t){if(this.isLineTerminator())return;let r=this.state.type;return this.tsInAmbientContext(()=>{switch(r){case 68:return t.declare=!0,super.parseFunctionStatement(t,!1,!1);case 80:return t.declare=!0,this.parseClass(t,!0,!1);case 126:return this.tsParseEnumDeclaration(t,{declare:!0});case 112:return this.tsParseAmbientExternalModuleDeclaration(t);case 100:if(this.state.containsEsc)return;case 75:case 74:return!this.match(75)||!this.isLookaheadContextual("enum")?(t.declare=!0,this.parseVarStatement(t,this.state.value,!0)):(this.expect(75),this.tsParseEnumDeclaration(t,{const:!0,declare:!0}));case 107:if(this.isUsing())return this.raise($.InvalidModifierOnUsingDeclaration,this.state.startLoc,"declare"),t.declare=!0,this.parseVarStatement(t,"using",!0);break;case 96:if(this.isAwaitUsing())return this.raise($.InvalidModifierOnAwaitUsingDeclaration,this.state.startLoc,"declare"),t.declare=!0,this.next(),this.parseVarStatement(t,"await using",!0);break;case 129:{let s=this.tsParseInterfaceDeclaration(t,{declare:!0});if(s)return s}default:if(pe(r))return this.tsParseDeclaration(t,this.state.type,!0,null)}})}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.type,!0,null)}tsParseDeclaration(t,r,s,a){switch(r){case 124:if(this.tsCheckLineTerminator(s)&&(this.match(80)||pe(this.state.type)))return this.tsParseAbstractDeclaration(t,a);break;case 127:if(this.tsCheckLineTerminator(s)){if(this.match(134))return this.tsParseAmbientExternalModuleDeclaration(t);if(pe(this.state.type))return t.kind="module",this.tsParseModuleOrNamespaceDeclaration(t)}break;case 128:if(this.tsCheckLineTerminator(s)&&pe(this.state.type))return t.kind="namespace",this.tsParseModuleOrNamespaceDeclaration(t);break;case 130:if(this.tsCheckLineTerminator(s)&&pe(this.state.type))return this.tsParseTypeAliasDeclaration(t);break}}tsCheckLineTerminator(t){return t?this.hasFollowingLineBreak()?!1:(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(t){if(!this.match(47))return;let r=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;let s=this.tsTryParseAndCatch(()=>{let a=this.startNodeAt(t);return a.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(a),a.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(19),a});if(this.state.maybeInArrowParameters=r,!!s)return super.parseArrowExpression(s,null,!0)}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()===47)return this.tsParseTypeArguments()}tsParseTypeArguments(){let t=this.startNode();return t.params=this.tsInType(()=>this.tsInTopLevelContext(()=>(this.expect(47),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),t.params.length===0?this.raise($.EmptyTypeArguments,t):!this.state.inType&&this.curContext()===ce.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(t,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return lpe(this.state.type)}isExportDefaultSpecifier(){return this.tsIsDeclarationStart()?!1:super.isExportDefaultSpecifier()}parseBindingElement(t,r){let s=r.length?r[0].loc.start:this.state.startLoc,a={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},a);let p=a.accessibility,u=a.override,f=a.readonly;!(t&4)&&(p||f||u)&&this.raise($.UnexpectedParameterModifier,s);let m=this.parseMaybeDefault();t&2&&this.parseFunctionParamType(m);let x=this.parseMaybeDefault(m.loc.start,m);if(p||f||u){let g=this.startNodeAt(s);return r.length&&(g.decorators=r),p&&(g.accessibility=p),f&&(g.readonly=f),u&&(g.override=u),x.type!=="Identifier"&&x.type!=="AssignmentPattern"&&this.raise($.UnsupportedParameterPropertyKind,g),g.parameter=x,this.finishNode(g,"TSParameterProperty")}return r.length&&(m.decorators=r),x}isSimpleParameter(t){return t.type==="TSParameterProperty"&&super.isSimpleParameter(t.parameter)||super.isSimpleParameter(t)}tsDisallowOptionalPattern(t){for(let r of t.params)r.type!=="Identifier"&&r.optional&&!this.state.isAmbientContext&&this.raise($.PatternIsOptional,r)}setArrowFunctionParameters(t,r,s){super.setArrowFunctionParameters(t,r,s),this.tsDisallowOptionalPattern(t)}parseFunctionBodyAndFinish(t,r,s=!1){this.match(14)&&(t.returnType=this.tsParseTypeOrTypePredicateAnnotation(14));let a=r==="FunctionDeclaration"?"TSDeclareFunction":r==="ClassMethod"||r==="ClassPrivateMethod"?"TSDeclareMethod":void 0;return a&&!this.match(5)&&this.isLineTerminator()?this.finishNode(t,a):a==="TSDeclareFunction"&&this.state.isAmbientContext&&(this.raise($.DeclareFunctionHasImplementation,t),t.declare)?super.parseFunctionBodyAndFinish(t,a,s):(this.tsDisallowOptionalPattern(t),super.parseFunctionBodyAndFinish(t,r,s))}registerFunctionStatementId(t){!t.body&&t.id?this.checkIdentifier(t.id,1024):super.registerFunctionStatementId(t)}tsCheckForInvalidTypeCasts(t){t.forEach(r=>{r?.type==="TSTypeCastExpression"&&this.raise($.UnexpectedTypeAnnotation,r.typeAnnotation)})}toReferencedList(t,r){return this.tsCheckForInvalidTypeCasts(t),t}parseArrayLike(t,r,s){let a=super.parseArrayLike(t,r,s);return a.type==="ArrayExpression"&&this.tsCheckForInvalidTypeCasts(a.elements),a}parseSubscript(t,r,s,a){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();let u=this.startNodeAt(r);return u.expression=t,this.finishNode(u,"TSNonNullExpression")}let p=!1;if(this.match(18)&&this.lookaheadCharCode()===60){if(s)return a.stop=!0,t;a.optionalChainMember=p=!0,this.next()}if(this.match(47)||this.match(51)){let u,f=this.tsTryParseAndCatch(()=>{if(!s&&this.atPossibleAsyncArrow(t)){let z=this.tsTryParseGenericAsyncArrowFunction(r);if(z)return a.stop=!0,z}let m=this.tsParseTypeArgumentsInExpression();if(!m)return;if(p&&!this.match(10)){u=this.state.curPosition();return}if(Ks(this.state.type)){let z=super.parseTaggedTemplateExpression(t,r,a);return z.typeParameters=m,z}if(!s&&this.eat(10)){let z=this.startNodeAt(r);return z.callee=t,z.arguments=this.parseCallExpressionArguments(),this.tsCheckForInvalidTypeCasts(z.arguments),z.typeParameters=m,a.optionalChainMember&&(z.optional=p),this.finishCallExpression(z,a.optionalChainMember)}let x=this.state.type;if(x===48||x===52||x!==10&&x!==93&&x!==120&&pr(x)&&!this.hasPrecedingLineBreak())return;let g=this.startNodeAt(r);return g.expression=t,g.typeParameters=m,this.finishNode(g,"TSInstantiationExpression")});if(u&&this.unexpected(u,10),f)return f.type==="TSInstantiationExpression"&&((this.match(16)||this.match(18)&&this.lookaheadCharCode()!==40)&&this.raise($.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc),!this.match(16)&&!this.match(18)&&(f.expression=super.stopParseSubscript(t,a))),f}return super.parseSubscript(t,r,s,a)}parseNewCallee(t){var r;super.parseNewCallee(t);let{callee:s}=t;s.type==="TSInstantiationExpression"&&!((r=s.extra)!=null&&r.parenthesized)&&(t.typeParameters=s.typeParameters,t.callee=s.expression)}parseExprOp(t,r,s){let a;if(Ws(58)>s&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(a=this.isContextual(120)))){let p=this.startNodeAt(r);return p.expression=t,p.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?(a&&this.raise(R.UnexpectedKeyword,this.state.startLoc,{keyword:"const"}),this.tsParseTypeReference()):this.tsParseType())),this.finishNode(p,a?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(p,r,s)}return super.parseExprOp(t,r,s)}checkReservedWord(t,r,s,a){this.state.isAmbientContext||super.checkReservedWord(t,r,s,a)}checkImportReflection(t){super.checkImportReflection(t),t.module&&t.importKind!=="value"&&this.raise($.ImportReflectionHasImportType,t.specifiers[0].loc.start)}checkDuplicateExports(){}isPotentialImportPhase(t){if(super.isPotentialImportPhase(t))return!0;if(this.isContextual(130)){let r=this.lookaheadCharCode();return t?r===123||r===42:r!==61}return!t&&this.isContextual(87)}applyImportPhase(t,r,s,a){super.applyImportPhase(t,r,s,a),r?t.exportKind=s==="type"?"type":"value":t.importKind=s==="type"||s==="typeof"?s:"value"}parseImport(t){if(this.match(134))return t.importKind="value",super.parseImport(t);let r;if(pe(this.state.type)&&this.lookaheadCharCode()===61)return t.importKind="value",this.tsParseImportEqualsDeclaration(t);if(this.isContextual(130)){let s=this.parseMaybeImportPhase(t,!1);if(this.lookaheadCharCode()===61)return this.tsParseImportEqualsDeclaration(t,s);r=super.parseImportSpecifiersAndAfter(t,s)}else r=super.parseImport(t);return r.importKind==="type"&&r.specifiers.length>1&&r.specifiers[0].type==="ImportDefaultSpecifier"&&this.raise($.TypeImportCannotSpecifyDefaultAndNamed,r),r}parseExport(t,r){if(this.match(83)){let s=t;this.next();let a=null;return this.isContextual(130)&&this.isPotentialImportPhase(!1)?a=this.parseMaybeImportPhase(s,!1):s.importKind="value",this.tsParseImportEqualsDeclaration(s,a,!0)}else if(this.eat(29)){let s=t;return s.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(s,"TSExportAssignment")}else if(this.eatContextual(93)){let s=t;return this.expectContextual(128),s.id=this.parseIdentifier(),this.semicolon(),this.finishNode(s,"TSNamespaceExportDeclaration")}else return super.parseExport(t,r)}isAbstractClass(){return this.isContextual(124)&&this.isLookaheadContextual("class")}parseExportDefaultExpression(){if(this.isAbstractClass()){let t=this.startNode();return this.next(),t.abstract=!0,this.parseClass(t,!0,!0)}if(this.match(129)){let t=this.tsParseInterfaceDeclaration(this.startNode());if(t)return t}return super.parseExportDefaultExpression()}parseVarStatement(t,r,s=!1){let{isAmbientContext:a}=this.state,p=super.parseVarStatement(t,r,s||a);if(!a)return p;if(!t.declare&&(r==="using"||r==="await using"))return this.raiseOverwrite($.UsingDeclarationInAmbientContext,t,r),p;for(let{id:u,init:f}of p.declarations)f&&(r==="var"||r==="let"||u.typeAnnotation?this.raise($.InitializerNotAllowedInAmbientContext,f):Gpe(f,this.hasPlugin("estree"))||this.raise($.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference,f));return p}parseStatementContent(t,r){if(!this.state.containsEsc)switch(this.state.type){case 75:{if(this.isLookaheadContextual("enum")){let s=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(s,{const:!0})}break}case 124:case 125:{if(this.nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine()){let s=this.state.type,a=this.startNode();this.next();let p=s===125?this.tsTryParseDeclare(a):this.tsParseAbstractDeclaration(a,r);return p?(s===125&&(p.declare=!0),p):(a.expression=this.createIdentifier(this.startNodeAt(a.loc.start),s===125?"declare":"abstract"),this.semicolon(!1),this.finishNode(a,"ExpressionStatement"))}break}case 126:return this.tsParseEnumDeclaration(this.startNode());case 112:{if(this.lookaheadCharCode()===123){let a=this.startNode();return this.tsParseAmbientExternalModuleDeclaration(a)}break}case 129:{let s=this.tsParseInterfaceDeclaration(this.startNode());if(s)return s;break}case 127:{if(this.nextTokenIsIdentifierOrStringLiteralOnSameLine()){let s=this.startNode();return this.next(),this.tsParseDeclaration(s,127,!1,r)}break}case 128:{if(this.nextTokenIsIdentifierOnSameLine()){let s=this.startNode();return this.next(),this.tsParseDeclaration(s,128,!1,r)}break}case 130:{if(this.nextTokenIsIdentifierOnSameLine()){let s=this.startNode();return this.next(),this.tsParseTypeAliasDeclaration(s)}break}}return super.parseStatementContent(t,r)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(t,r){return r.some(s=>Fh(s)?t.accessibility===s:!!t[s])}tsIsStartOfStaticBlocks(){return this.isContextual(106)&&this.lookaheadCharCode()===123}parseClassMember(t,r,s){let a=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:a,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:$.InvalidModifierOnTypeParameterPositions},r);let p=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(r,a)&&this.raise($.StaticBlockCannotHaveModifier,this.state.curPosition()),super.parseClassStaticBlock(t,r)):this.parseClassMemberWithIsStatic(t,r,s,!!r.static)};r.declare?this.tsInAmbientContext(p):p()}parseClassMemberWithIsStatic(t,r,s,a){let p=this.tsTryParseIndexSignature(r);if(p){t.body.push(p),r.abstract&&this.raise($.IndexSignatureHasAbstract,r),r.accessibility&&this.raise($.IndexSignatureHasAccessibility,r,{modifier:r.accessibility}),r.declare&&this.raise($.IndexSignatureHasDeclare,r),r.override&&this.raise($.IndexSignatureHasOverride,r);return}!this.state.inAbstractClass&&r.abstract&&this.raise($.NonAbstractClassHasAbstractMethod,r),r.override&&(s.hadSuperClass||this.raise($.OverrideNotInSubClass,r)),super.parseClassMemberWithIsStatic(t,r,s,a)}parsePostMemberNameModifiers(t){this.eat(17)&&(t.optional=!0),t.readonly&&this.match(10)&&this.raise($.ClassMethodHasReadonly,t),t.declare&&this.match(10)&&this.raise($.ClassMethodHasDeclare,t)}shouldParseExportDeclaration(){return this.tsIsDeclarationStart()?!0:super.shouldParseExportDeclaration()}parseConditional(t,r,s){if(!this.match(17))return t;if(this.state.maybeInArrowParameters){let a=this.lookaheadCharCode();if(a===44||a===61||a===58||a===41)return this.setOptionalParametersError(s),t}return super.parseConditional(t,r,s)}parseParenItem(t,r){let s=super.parseParenItem(t,r);if(this.eat(17)&&(s.optional=!0,this.resetEndLocation(t)),this.match(14)){let a=this.startNodeAt(r);return a.expression=t,a.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(a,"TSTypeCastExpression")}return t}parseExportDeclaration(t){if(!this.state.isAmbientContext&&this.isContextual(125))return this.tsInAmbientContext(()=>this.parseExportDeclaration(t));let r=this.state.startLoc,s=this.eatContextual(125);if(s&&(this.isContextual(125)||!this.shouldParseExportDeclaration()))throw this.raise($.ExpectedAmbientAfterExportDeclare,this.state.startLoc);let p=pe(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(t);return p?((p.type==="TSInterfaceDeclaration"||p.type==="TSTypeAliasDeclaration"||s)&&(t.exportKind="type"),s&&p.type!=="TSImportEqualsDeclaration"&&(this.resetStartLocation(p,r),p.declare=!0),p):null}parseClassId(t,r,s,a){if((!r||s)&&this.isContextual(113))return;super.parseClassId(t,r,s,t.declare?1024:8331);let p=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);p&&(t.typeParameters=p)}parseClassPropertyAnnotation(t){t.optional||(this.eat(35)?t.definite=!0:this.eat(17)&&(t.optional=!0));let r=this.tsTryParseTypeAnnotation();r&&(t.typeAnnotation=r)}parseClassProperty(t){if(this.parseClassPropertyAnnotation(t),this.state.isAmbientContext&&!(t.readonly&&!t.typeAnnotation)&&this.match(29)&&this.raise($.DeclareClassFieldHasInitializer,this.state.startLoc),t.abstract&&this.match(29)){let{key:r}=t;this.raise($.AbstractPropertyHasInitializer,this.state.startLoc,{propertyName:r.type==="Identifier"&&!t.computed?r.name:`[${this.input.slice(this.offsetToSourcePos(r.start),this.offsetToSourcePos(r.end))}]`})}return super.parseClassProperty(t)}parseClassPrivateProperty(t){return t.abstract&&this.raise($.PrivateElementHasAbstract,t),t.accessibility&&this.raise($.PrivateElementHasAccessibility,t,{modifier:t.accessibility}),this.parseClassPropertyAnnotation(t),super.parseClassPrivateProperty(t)}parseClassAccessorProperty(t){return this.parseClassPropertyAnnotation(t),t.optional&&this.raise($.AccessorCannotBeOptional,t),super.parseClassAccessorProperty(t)}pushClassMethod(t,r,s,a,p,u){let f=this.tsTryParseTypeParameters(this.tsParseConstModifier);f&&p&&this.raise($.ConstructorHasTypeParameters,f);let{declare:m=!1,kind:x}=r;m&&(x==="get"||x==="set")&&this.raise($.DeclareAccessor,r,{kind:x}),f&&(r.typeParameters=f),super.pushClassMethod(t,r,s,a,p,u)}pushClassPrivateMethod(t,r,s,a){let p=this.tsTryParseTypeParameters(this.tsParseConstModifier);p&&(r.typeParameters=p),super.pushClassPrivateMethod(t,r,s,a)}declareClassPrivateMethodInScope(t,r){t.type!=="TSDeclareMethod"&&(t.type==="MethodDefinition"&&t.value.body==null||super.declareClassPrivateMethodInScope(t,r))}parseClassSuper(t){if(super.parseClassSuper(t),t.superClass)if(t.superClass.type==="TSInstantiationExpression"){let r=t.superClass,s=r.expression;this.takeSurroundingComments(s,s.start,s.end);let a=r.typeParameters;this.takeSurroundingComments(a,a.start,a.end),t.superClass=s,t.superTypeParameters=a}else(this.match(47)||this.match(51))&&(t.superTypeParameters=this.tsParseTypeArgumentsInExpression());this.eatContextual(113)&&(t.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(t,r,s,a,p,u,f){let m=this.tsTryParseTypeParameters(this.tsParseConstModifier);return m&&(t.typeParameters=m),super.parseObjPropValue(t,r,s,a,p,u,f)}parseFunctionParams(t,r){let s=this.tsTryParseTypeParameters(this.tsParseConstModifier);s&&(t.typeParameters=s),super.parseFunctionParams(t,r)}parseVarId(t,r){super.parseVarId(t,r),t.id.type==="Identifier"&&!this.hasPrecedingLineBreak()&&this.eat(35)&&(t.definite=!0);let s=this.tsTryParseTypeAnnotation();s&&(t.id.typeAnnotation=s,this.resetEndLocation(t.id))}parseAsyncArrowFromCallExpression(t,r){return this.match(14)&&(t.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(t,r)}parseMaybeAssign(t,r){var s,a,p,u,f;let m,x,g;if(this.hasPlugin("jsx")&&(this.match(143)||this.match(47))){if(m=this.state.clone(),x=this.tryParse(()=>super.parseMaybeAssign(t,r),m),!x.error)return x.node;let{context:k}=this.state,F=k[k.length-1];(F===ce.j_oTag||F===ce.j_expr)&&k.pop()}if(!((s=x)!=null&&s.error)&&!this.match(47))return super.parseMaybeAssign(t,r);(!m||m===this.state)&&(m=this.state.clone());let z,w=this.tryParse(k=>{var F,Y;z=this.tsParseTypeParameters(this.tsParseConstModifier);let W=super.parseMaybeAssign(t,r);return(W.type!=="ArrowFunctionExpression"||(F=W.extra)!=null&&F.parenthesized)&&k(),((Y=z)==null?void 0:Y.params.length)!==0&&this.resetStartLocationFromNode(W,z),W.typeParameters=z,W},m);if(!w.error&&!w.aborted)return z&&this.reportReservedArrowTypeParam(z),w.node;if(!x&&(vh(!this.hasPlugin("jsx")),g=this.tryParse(()=>super.parseMaybeAssign(t,r),m),!g.error))return g.node;if((a=x)!=null&&a.node)return this.state=x.failState,x.node;if(w.node)return this.state=w.failState,z&&this.reportReservedArrowTypeParam(z),w.node;if((p=g)!=null&&p.node)return this.state=g.failState,g.node;throw((u=x)==null?void 0:u.error)||w.error||((f=g)==null?void 0:f.error)}reportReservedArrowTypeParam(t){var r;t.params.length===1&&!t.params[0].constraint&&!((r=t.extra)!=null&&r.trailingComma)&&this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise($.ReservedArrowTypeParam,t)}parseMaybeUnary(t,r){return!this.hasPlugin("jsx")&&this.match(47)?this.tsParseTypeAssertion():super.parseMaybeUnary(t,r)}parseArrow(t){if(this.match(14)){let r=this.tryParse(s=>{let a=this.tsParseTypeOrTypePredicateAnnotation(14);return(this.canInsertSemicolon()||!this.match(19))&&s(),a});if(r.aborted)return;r.thrown||(r.error&&(this.state=r.failState),t.returnType=r.node)}return super.parseArrow(t)}parseFunctionParamType(t){this.eat(17)&&(t.optional=!0);let r=this.tsTryParseTypeAnnotation();return r&&(t.typeAnnotation=r),this.resetEndLocation(t),t}isAssignable(t,r){switch(t.type){case"TSTypeCastExpression":return this.isAssignable(t.expression,r);case"TSParameterProperty":return!0;default:return super.isAssignable(t,r)}}toAssignable(t,r=!1){switch(t.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(t,r);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":r?this.expressionScope.recordArrowParameterBindingError($.UnexpectedTypeCastInParameter,t):this.raise($.UnexpectedTypeCastInParameter,t),this.toAssignable(t.expression,r);break;case"AssignmentExpression":!r&&t.left.type==="TSTypeCastExpression"&&(t.left=this.typeCastToParameter(t.left));default:super.toAssignable(t,r)}}toAssignableParenthesizedExpression(t,r){switch(t.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(t.expression,r);break;default:super.toAssignable(t,r)}}checkToRestConversion(t,r){switch(t.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(t.expression,!1);break;default:super.checkToRestConversion(t,r)}}isValidLVal(t,r,s,a){switch(t){case"TSTypeCastExpression":return!0;case"TSParameterProperty":return"parameter";case"TSNonNullExpression":return"expression";case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":return(a!==64||!s)&&["expression",!0];default:return super.isValidLVal(t,r,s,a)}}parseBindingAtom(){return this.state.type===78?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(t,r){if(this.match(47)||this.match(51)){let s=this.tsParseTypeArgumentsInExpression();if(this.match(10)){let a=super.parseMaybeDecoratorArguments(t,r);return a.typeParameters=s,a}this.unexpected(null,10)}return super.parseMaybeDecoratorArguments(t,r)}checkCommaAfterRest(t){return this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===t?(this.next(),!1):super.checkCommaAfterRest(t)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(35)||this.match(14)||super.isClassProperty()}parseMaybeDefault(t,r){let s=super.parseMaybeDefault(t,r);return s.type==="AssignmentPattern"&&s.typeAnnotation&&s.right.start<s.typeAnnotation.start&&this.raise($.TypeAnnotationAfterAssign,s.typeAnnotation),s}getTokenFromCode(t){if(this.state.inType){if(t===62){this.finishOp(48,1);return}if(t===60){this.finishOp(47,1);return}}super.getTokenFromCode(t)}reScan_lt_gt(){let{type:t}=this.state;t===47?(this.state.pos-=1,this.readToken_lt()):t===48&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){let{type:t}=this.state;return t===51?(this.state.pos-=2,this.finishOp(47,1),47):t}toAssignableListItem(t,r,s){let a=t[r];a.type==="TSTypeCastExpression"&&(t[r]=this.typeCastToParameter(a)),super.toAssignableListItem(t,r,s)}typeCastToParameter(t){return t.expression.typeAnnotation=t.typeAnnotation,this.resetEndLocation(t.expression,t.typeAnnotation.loc.end),t.expression}shouldParseArrow(t){return this.match(14)?t.every(r=>this.isAssignable(r,!0)):super.shouldParseArrow(t)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(t){if(this.match(47)||this.match(51)){let r=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());r&&(t.typeParameters=r)}return super.jsxParseOpeningElementAfterName(t)}getGetterSetterExpectedParamCount(t){let r=super.getGetterSetterExpectedParamCount(t),a=this.getObjectOrClassMethodParams(t)[0];return a&&this.isThisParam(a)?r+1:r}parseCatchClauseParam(){let t=super.parseCatchClauseParam(),r=this.tsTryParseTypeAnnotation();return r&&(t.typeAnnotation=r,this.resetEndLocation(t)),t}tsInAmbientContext(t){let{isAmbientContext:r,strict:s}=this.state;this.state.isAmbientContext=!0,this.state.strict=!1;try{return t()}finally{this.state.isAmbientContext=r,this.state.strict=s}}parseClass(t,r,s){let a=this.state.inAbstractClass;this.state.inAbstractClass=!!t.abstract;try{return super.parseClass(t,r,s)}finally{this.state.inAbstractClass=a}}tsParseAbstractDeclaration(t,r){if(this.match(80))return t.abstract=!0,this.maybeTakeDecorators(r,this.parseClass(t,!0,!1));if(this.isContextual(129))return this.hasFollowingLineBreak()?null:(t.abstract=!0,this.raise($.NonClassMethodPropertyHasAbstractModifier,t),this.tsParseInterfaceDeclaration(t));throw this.unexpected(null,80)}parseMethod(t,r,s,a,p,u,f){let m=super.parseMethod(t,r,s,a,p,u,f);if((m.abstract||m.type==="TSAbstractMethodDefinition")&&(this.hasPlugin("estree")?m.value:m).body){let{key:z}=m;this.raise($.AbstractMethodHasImplementation,m,{methodName:z.type==="Identifier"&&!m.computed?z.name:`[${this.input.slice(this.offsetToSourcePos(z.start),this.offsetToSourcePos(z.end))}]`})}return m}tsParseTypeParameterName(){return this.parseIdentifier().name}shouldParseAsAmbientContext(){return!!this.getPluginOption("typescript","dts")}parse(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.parse()}getExpression(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.getExpression()}parseExportSpecifier(t,r,s,a){return!r&&a?(this.parseTypeOnlyImportExportSpecifier(t,!1,s),this.finishNode(t,"ExportSpecifier")):(t.exportKind="value",super.parseExportSpecifier(t,r,s,a))}parseImportSpecifier(t,r,s,a,p){return!r&&a?(this.parseTypeOnlyImportExportSpecifier(t,!0,s),this.finishNode(t,"ImportSpecifier")):(t.importKind="value",super.parseImportSpecifier(t,r,s,a,s?4098:4096))}parseTypeOnlyImportExportSpecifier(t,r,s){let a=r?"imported":"local",p=r?"local":"exported",u=t[a],f,m=!1,x=!0,g=u.loc.start;if(this.isContextual(93)){let w=this.parseIdentifier();if(this.isContextual(93)){let k=this.parseIdentifier();pt(this.state.type)?(m=!0,u=w,f=r?this.parseIdentifier():this.parseModuleExportName(),x=!1):(f=k,x=!1)}else pt(this.state.type)?(x=!1,f=r?this.parseIdentifier():this.parseModuleExportName()):(m=!0,u=w)}else pt(this.state.type)&&(m=!0,r?(u=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(u.name,u.loc.start,!0,!0)):u=this.parseModuleExportName());m&&s&&this.raise(r?$.TypeModifierIsUsedInTypeImports:$.TypeModifierIsUsedInTypeExports,g),t[a]=u,t[p]=f;let z=r?"importKind":"exportKind";t[z]=m?"type":"value",x&&this.eatContextual(93)&&(t[p]=r?this.parseIdentifier():this.parseModuleExportName()),t[p]||(t[p]=this.cloneIdentifier(t[a])),r&&this.checkIdentifier(t[p],m?4098:4096)}fillOptionalPropertiesForTSESLint(t){var r,s,a,p,u,f,m,x,g,z,w,k,F,Y,W,ee,de,Te,xr,ep,tp,op,rp,sp,np,ip,ap,cp,pp,dp,lp,up,mp,hp,fp,xp,gp,bp,yp,Ap,Sp,zp,Tp,Ep,Cp,Ip,Rp,wp;switch(t.type){case"ExpressionStatement":(r=t.directive)!=null||(t.directive=void 0);return;case"RestElement":t.value=void 0;case"Identifier":case"ArrayPattern":case"AssignmentPattern":case"ObjectPattern":(s=t.decorators)!=null||(t.decorators=[]),(a=t.optional)!=null||(t.optional=!1),(p=t.typeAnnotation)!=null||(t.typeAnnotation=void 0);return;case"TSParameterProperty":(u=t.accessibility)!=null||(t.accessibility=void 0),(f=t.decorators)!=null||(t.decorators=[]),(m=t.override)!=null||(t.override=!1),(x=t.readonly)!=null||(t.readonly=!1),(g=t.static)!=null||(t.static=!1);return;case"TSEmptyBodyFunctionExpression":t.body=null;case"TSDeclareFunction":case"FunctionDeclaration":case"FunctionExpression":case"ClassMethod":case"ClassPrivateMethod":(z=t.declare)!=null||(t.declare=!1),(w=t.returnType)!=null||(t.returnType=void 0),(k=t.typeParameters)!=null||(t.typeParameters=void 0);return;case"Property":(F=t.optional)!=null||(t.optional=!1);return;case"TSMethodSignature":case"TSPropertySignature":(Y=t.optional)!=null||(t.optional=!1);case"TSIndexSignature":(W=t.accessibility)!=null||(t.accessibility=void 0),(ee=t.readonly)!=null||(t.readonly=!1),(de=t.static)!=null||(t.static=!1);return;case"TSAbstractPropertyDefinition":case"PropertyDefinition":case"TSAbstractAccessorProperty":case"AccessorProperty":(Te=t.declare)!=null||(t.declare=!1),(xr=t.definite)!=null||(t.definite=!1),(ep=t.readonly)!=null||(t.readonly=!1),(tp=t.typeAnnotation)!=null||(t.typeAnnotation=void 0);case"TSAbstractMethodDefinition":case"MethodDefinition":(op=t.accessibility)!=null||(t.accessibility=void 0),(rp=t.decorators)!=null||(t.decorators=[]),(sp=t.override)!=null||(t.override=!1),(np=t.optional)!=null||(t.optional=!1);return;case"ClassExpression":(ip=t.id)!=null||(t.id=null);case"ClassDeclaration":(ap=t.abstract)!=null||(t.abstract=!1),(cp=t.declare)!=null||(t.declare=!1),(pp=t.decorators)!=null||(t.decorators=[]),(dp=t.implements)!=null||(t.implements=[]),(lp=t.superTypeArguments)!=null||(t.superTypeArguments=void 0),(up=t.typeParameters)!=null||(t.typeParameters=void 0);return;case"TSTypeAliasDeclaration":case"VariableDeclaration":(mp=t.declare)!=null||(t.declare=!1);return;case"VariableDeclarator":(hp=t.definite)!=null||(t.definite=!1);return;case"TSEnumDeclaration":(fp=t.const)!=null||(t.const=!1),(xp=t.declare)!=null||(t.declare=!1);return;case"TSEnumMember":(gp=t.computed)!=null||(t.computed=!1);return;case"TSImportType":(bp=t.qualifier)!=null||(t.qualifier=null),(yp=t.options)!=null||(t.options=null);return;case"TSInterfaceDeclaration":(Ap=t.declare)!=null||(t.declare=!1),(Sp=t.extends)!=null||(t.extends=[]);return;case"TSMappedType":(zp=t.optional)!=null||(t.optional=!1),(Tp=t.readonly)!=null||(t.readonly=void 0);return;case"TSModuleDeclaration":(Ep=t.declare)!=null||(t.declare=!1),(Cp=t.global)!=null||(t.global=t.kind==="global");return;case"TSTypeParameter":(Ip=t.const)!=null||(t.const=!1),(Rp=t.in)!=null||(t.in=!1),(wp=t.out)!=null||(t.out=!1);return}}chStartsBindingIdentifierAndNotRelationalOperator(t,r){if(yt(t)){if(xc.lastIndex=r,xc.test(this.input)){let s=this.codePointAtPos(xc.lastIndex);if(!Kt(s)&&s!==92)return!1}return!0}else return t===92}nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine(){let t=this.nextTokenInLineStart(),r=this.codePointAtPos(t);return this.chStartsBindingIdentifierAndNotRelationalOperator(r,t)}nextTokenIsIdentifierOrStringLiteralOnSameLine(){let t=this.nextTokenInLineStart(),r=this.codePointAtPos(t);return this.chStartsBindingIdentifier(r,t)||r===34||r===39}};function $pe(o){if(o.type!=="MemberExpression")return!1;let{computed:e,property:t}=o;return e&&t.type!=="StringLiteral"&&(t.type!=="TemplateLiteral"||t.expressions.length>0)?!1:Xh(o.object)}function Gpe(o,e){var t;let{type:r}=o;if((t=o.extra)!=null&&t.parenthesized)return!1;if(e){if(r==="Literal"){let{value:s}=o;if(typeof s=="string"||typeof s=="boolean")return!0}}else if(r==="StringLiteral"||r==="BooleanLiteral")return!0;return!!(Zh(o,e)||Kpe(o,e)||r==="TemplateLiteral"&&o.expressions.length===0||$pe(o))}function Zh(o,e){return e?o.type==="Literal"&&(typeof o.value=="number"||"bigint"in o):o.type==="NumericLiteral"||o.type==="BigIntLiteral"}function Kpe(o,e){if(o.type==="UnaryExpression"){let{operator:t,argument:r}=o;if(t==="-"&&Zh(r,e))return!0}return!1}function Xh(o){return o.type==="Identifier"?!0:o.type!=="MemberExpression"||o.computed?!1:Xh(o.object)}var Nh=ct`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."}),qpe=o=>class extends o{parsePlaceholder(t){if(this.match(133)){let r=this.startNode();return this.next(),this.assertNoSpace(),r.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(133),this.finishPlaceholder(r,t)}}finishPlaceholder(t,r){let s=t;return(!s.expectedNode||!s.type)&&(s=this.finishNode(s,"Placeholder")),s.expectedNode=r,s}getTokenFromCode(t){t===37&&this.input.charCodeAt(this.state.pos+1)===37?this.finishOp(133,2):super.getTokenFromCode(t)}parseExprAtom(t){return this.parsePlaceholder("Expression")||super.parseExprAtom(t)}parseIdentifier(t){return this.parsePlaceholder("Identifier")||super.parseIdentifier(t)}checkReservedWord(t,r,s,a){t!==void 0&&super.checkReservedWord(t,r,s,a)}cloneIdentifier(t){let r=super.cloneIdentifier(t);return r.type==="Placeholder"&&(r.expectedNode=t.expectedNode),r}cloneStringLiteral(t){return t.type==="Placeholder"?this.cloneIdentifier(t):super.cloneStringLiteral(t)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(t,r,s,a){return t==="Placeholder"||super.isValidLVal(t,r,s,a)}toAssignable(t,r){t&&t.type==="Placeholder"&&t.expectedNode==="Expression"?t.expectedNode="Pattern":super.toAssignable(t,r)}chStartsBindingIdentifier(t,r){if(super.chStartsBindingIdentifier(t,r))return!0;let s=this.nextTokenStart();return this.input.charCodeAt(s)===37&&this.input.charCodeAt(s+1)===37}verifyBreakContinue(t,r){var s;((s=t.label)==null?void 0:s.type)!=="Placeholder"&&super.verifyBreakContinue(t,r)}parseExpressionStatement(t,r){var s;if(r.type!=="Placeholder"||(s=r.extra)!=null&&s.parenthesized)return super.parseExpressionStatement(t,r);if(this.match(14)){let p=t;return p.label=this.finishPlaceholder(r,"Identifier"),this.next(),p.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(p,"LabeledStatement")}this.semicolon();let a=t;return a.name=r.name,this.finishPlaceholder(a,"Statement")}parseBlock(t,r,s){return this.parsePlaceholder("BlockStatement")||super.parseBlock(t,r,s)}parseFunctionId(t){return this.parsePlaceholder("Identifier")||super.parseFunctionId(t)}parseClass(t,r,s){let a=r?"ClassDeclaration":"ClassExpression";this.next();let p=this.state.strict,u=this.parsePlaceholder("Identifier");if(u)if(this.match(81)||this.match(133)||this.match(5))t.id=u;else{if(s||!r)return t.id=null,t.body=this.finishPlaceholder(u,"ClassBody"),this.finishNode(t,a);throw this.raise(Nh.ClassNameIsRequired,this.state.startLoc)}else this.parseClassId(t,r,s);return super.parseClassSuper(t),t.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!t.superClass,p),this.finishNode(t,a)}parseExport(t,r){let s=this.parsePlaceholder("Identifier");if(!s)return super.parseExport(t,r);let a=t;if(!this.isContextual(98)&&!this.match(12))return a.specifiers=[],a.source=null,a.declaration=this.finishPlaceholder(s,"Declaration"),this.finishNode(a,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");let p=this.startNode();return p.exported=s,a.specifiers=[this.finishNode(p,"ExportDefaultSpecifier")],super.parseExport(a,r)}isExportDefaultSpecifier(){if(this.match(65)){let t=this.nextTokenStart();if(this.isUnparsedContextual(t,"from")&&this.input.startsWith(Ft(133),this.nextTokenStartSince(t+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(t,r){var s;return(s=t.specifiers)!=null&&s.length?!0:super.maybeParseExportDefaultSpecifier(t,r)}checkExport(t){let{specifiers:r}=t;r!=null&&r.length&&(t.specifiers=r.filter(s=>s.exported.type==="Placeholder")),super.checkExport(t),t.specifiers=r}parseImport(t){let r=this.parsePlaceholder("Identifier");if(!r)return super.parseImport(t);if(t.specifiers=[],!this.isContextual(98)&&!this.match(12))return t.source=this.finishPlaceholder(r,"StringLiteral"),this.semicolon(),this.finishNode(t,"ImportDeclaration");let s=this.startNodeAtNode(r);return s.local=r,t.specifiers.push(this.finishNode(s,"ImportDefaultSpecifier")),this.eat(12)&&(this.maybeParseStarImportSpecifier(t)||this.parseNamedImportSpecifiers(t)),this.expectContextual(98),t.source=this.parseImportSource(),this.semicolon(),this.finishNode(t,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource()}assertNoSpace(){this.state.start>this.offsetToSourcePos(this.state.lastTokEndLoc.index)&&this.raise(Nh.UnexpectedSpace,this.state.lastTokEndLoc)}},Ype=o=>class extends o{parseV8Intrinsic(){if(this.match(54)){let t=this.state.startLoc,r=this.startNode();if(this.next(),pe(this.state.type)){let s=this.parseIdentifierName(),a=this.createIdentifier(r,s);if(this.castNodeTo(a,"V8IntrinsicIdentifier"),this.match(10))return a}this.unexpected(t)}}parseExprAtom(t){return this.parseV8Intrinsic()||super.parseExprAtom(t)}},_h=["minimal","fsharp","hack","smart"],Bh=["^^","@@","^","%","#"];function Qpe(o){if(o.has("decorators")){if(o.has("decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");let r=o.get("decorators").decoratorsBeforeExport;if(r!=null&&typeof r!="boolean")throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");let s=o.get("decorators").allowCallParenthesized;if(s!=null&&typeof s!="boolean")throw new Error("'allowCallParenthesized' must be a boolean.")}if(o.has("flow")&&o.has("typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(o.has("placeholders")&&o.has("v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(o.has("pipelineOperator")){var e;let r=o.get("pipelineOperator").proposal;if(!_h.includes(r)){let s=_h.map(a=>`"${a}"`).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${s}.`)}if(r==="hack"){var t;if(o.has("placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(o.has("v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");let s=o.get("pipelineOperator").topicToken;if(!Bh.includes(s)){let a=Bh.map(p=>`"${p}"`).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${a}.`)}if(s==="#"&&((t=o.get("recordAndTuple"))==null?void 0:t.syntaxType)==="hash")throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "hack", topicToken: "#" }]\` and \`${JSON.stringify(["recordAndTuple",o.get("recordAndTuple")])}\`.`)}else if(r==="smart"&&((e=o.get("recordAndTuple"))==null?void 0:e.syntaxType)==="hash")throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "smart" }]\` and \`${JSON.stringify(["recordAndTuple",o.get("recordAndTuple")])}\`.`)}if(o.has("moduleAttributes")){if(o.has("deprecatedImportAssert")||o.has("importAssertions"))throw new Error("Cannot combine importAssertions, deprecatedImportAssert and moduleAttributes plugins.");if(o.get("moduleAttributes").version!=="may-2020")throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.")}if(o.has("importAssertions")&&o.has("deprecatedImportAssert"))throw new Error("Cannot combine importAssertions and deprecatedImportAssert plugins.");if(o.has("deprecatedImportAssert")||o.has("importAttributes")&&o.get("importAttributes").deprecatedAssertSyntax&&o.set("deprecatedImportAssert",{}),o.has("recordAndTuple")){let r=o.get("recordAndTuple").syntaxType;if(r!=null){let s=["hash","bar"];if(!s.includes(r))throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: "+s.map(a=>`'${a}'`).join(", "))}}if(o.has("asyncDoExpressions")&&!o.has("doExpressions")){let r=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw r.missingPlugins="doExpressions",r}if(o.has("optionalChainingAssign")&&o.get("optionalChainingAssign").version!=="2023-07")throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is '2023-07'.");if(o.has("discardBinding")&&o.get("discardBinding").syntaxType!=="void")throw new Error("The 'discardBinding' plugin requires a 'syntaxType' option. Currently the only supported value is 'void'.")}var ef={estree:epe,jsx:Ppe,flow:wpe,typescript:Wpe,v8intrinsic:Ype,placeholders:qpe},Jpe=Object.keys(ef),_c=class extends Nc{checkProto(e,t,r,s){if(e.type==="SpreadElement"||this.isObjectMethod(e)||e.computed||e.shorthand)return r;let a=e.key;return(a.type==="Identifier"?a.name:a.value)==="__proto__"?t?(this.raise(R.RecordNoProto,a),!0):(r&&(s?s.doubleProtoLoc===null&&(s.doubleProtoLoc=a.loc.start):this.raise(R.DuplicateProto,a)),!0):r}shouldExitDescending(e,t){return e.type==="ArrowFunctionExpression"&&this.offsetToSourcePos(e.start)===t}getExpression(){if(this.enterInitialScopes(),this.nextToken(),this.match(140))throw this.raise(R.ParseExpressionEmptyInput,this.state.startLoc);let e=this.parseExpression();if(!this.match(140))throw this.raise(R.ParseExpressionExpectsEOF,this.state.startLoc,{unexpected:this.input.codePointAt(this.state.start)});return this.finalizeRemainingComments(),e.comments=this.comments,e.errors=this.state.errors,this.optionFlags&256&&(e.tokens=this.tokens),e}parseExpression(e,t){return e?this.disallowInAnd(()=>this.parseExpressionBase(t)):this.allowInAnd(()=>this.parseExpressionBase(t))}parseExpressionBase(e){let t=this.state.startLoc,r=this.parseMaybeAssign(e);if(this.match(12)){let s=this.startNodeAt(t);for(s.expressions=[r];this.eat(12);)s.expressions.push(this.parseMaybeAssign(e));return this.toReferencedList(s.expressions),this.finishNode(s,"SequenceExpression")}return r}parseMaybeAssignDisallowIn(e,t){return this.disallowInAnd(()=>this.parseMaybeAssign(e,t))}parseMaybeAssignAllowIn(e,t){return this.allowInAnd(()=>this.parseMaybeAssign(e,t))}setOptionalParametersError(e){e.optionalParametersLoc=this.state.startLoc}parseMaybeAssign(e,t){let r=this.state.startLoc,s=this.isContextual(108);if(s&&this.prodParam.hasYield){this.next();let f=this.parseYield(r);return t&&(f=t.call(this,f,r)),f}let a;e?a=!1:(e=new So,a=!0);let{type:p}=this.state;(p===10||pe(p))&&(this.state.potentialArrowAt=this.state.start);let u=this.parseMaybeConditional(e);if(t&&(u=t.call(this,u,r)),npe(this.state.type)){let f=this.startNodeAt(r),m=this.state.value;if(f.operator=m,this.match(29)){this.toAssignable(u,!0),f.left=u;let x=r.index;e.doubleProtoLoc!=null&&e.doubleProtoLoc.index>=x&&(e.doubleProtoLoc=null),e.shorthandAssignLoc!=null&&e.shorthandAssignLoc.index>=x&&(e.shorthandAssignLoc=null),e.privateKeyLoc!=null&&e.privateKeyLoc.index>=x&&(this.checkDestructuringPrivate(e),e.privateKeyLoc=null),e.voidPatternLoc!=null&&e.voidPatternLoc.index>=x&&(e.voidPatternLoc=null)}else f.left=u;return this.next(),f.right=this.parseMaybeAssign(),this.checkLVal(u,this.finishNode(f,"AssignmentExpression"),void 0,void 0,void 0,void 0,m==="||="||m==="&&="||m==="??="),f}else a&&this.checkExpressionErrors(e,!0);if(s){let{type:f}=this.state;if((this.hasPlugin("v8intrinsic")?pr(f):pr(f)&&!this.match(54))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite(R.YieldNotInGeneratorFunction,r),this.parseYield(r)}return u}parseMaybeConditional(e){let t=this.state.startLoc,r=this.state.potentialArrowAt,s=this.parseExprOps(e);return this.shouldExitDescending(s,r)?s:this.parseConditional(s,t,e)}parseConditional(e,t,r){if(this.eat(17)){let s=this.startNodeAt(t);return s.test=e,s.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),s.alternate=this.parseMaybeAssign(),this.finishNode(s,"ConditionalExpression")}return e}parseMaybeUnaryOrPrivate(e){return this.match(139)?this.parsePrivateName():this.parseMaybeUnary(e)}parseExprOps(e){let t=this.state.startLoc,r=this.state.potentialArrowAt,s=this.parseMaybeUnaryOrPrivate(e);return this.shouldExitDescending(s,r)?s:this.parseExprOp(s,t,-1)}parseExprOp(e,t,r){if(this.isPrivateName(e)){let a=this.getPrivateNameSV(e);(r>=Ws(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(R.PrivateInExpectedIn,e,{identifierName:a}),this.classScope.usePrivateName(a,e.loc.start)}let s=this.state.type;if(ape(s)&&(this.prodParam.hasIn||!this.match(58))){let a=Ws(s);if(a>r){if(s===39){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return e;this.checkPipelineAtInfixOperator(e,t)}let p=this.startNodeAt(t);p.left=e,p.operator=this.state.value;let u=s===41||s===42,f=s===40;if(f&&(a=Ws(42)),this.next(),s===39&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])&&this.state.type===96&&this.prodParam.hasAwait)throw this.raise(R.UnexpectedAwaitAfterPipelineBody,this.state.startLoc);p.right=this.parseExprOpRightExpr(s,a);let m=this.finishNode(p,u||f?"LogicalExpression":"BinaryExpression"),x=this.state.type;if(f&&(x===41||x===42)||u&&x===40)throw this.raise(R.MixingCoalesceWithLogical,this.state.startLoc);return this.parseExprOp(m,t,r)}}return e}parseExprOpRightExpr(e,t){let r=this.state.startLoc;switch(e){case 39:switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext(()=>this.parseHackPipeBody());case"fsharp":return this.withSoloAwaitPermittingContext(()=>this.parseFSharpPipelineBody(t))}if(this.getPluginOption("pipelineOperator","proposal")==="smart")return this.withTopicBindingContext(()=>{if(this.prodParam.hasYield&&this.isContextual(108))throw this.raise(R.PipeBodyIsTighter,this.state.startLoc);return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(e,t),r)});default:return this.parseExprOpBaseRightExpr(e,t)}}parseExprOpBaseRightExpr(e,t){let r=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),r,upe(e)?t-1:t)}parseHackPipeBody(){var e;let{startLoc:t}=this.state,r=this.parseMaybeAssign();return Gce.has(r.type)&&!((e=r.extra)!=null&&e.parenthesized)&&this.raise(R.PipeUnparenthesizedBody,t,{type:r.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(R.PipeTopicUnused,t),r}checkExponentialAfterUnary(e){this.match(57)&&this.raise(R.UnexpectedTokenUnaryExponentiation,e.argument)}parseMaybeUnary(e,t){let r=this.state.startLoc,s=this.isContextual(96);if(s&&this.recordAwaitIfAllowed()){this.next();let f=this.parseAwait(r);return t||this.checkExponentialAfterUnary(f),f}let a=this.match(34),p=this.startNode();if(ppe(this.state.type)){p.operator=this.state.value,p.prefix=!0,this.match(72)&&this.expectPlugin("throwExpressions");let f=this.match(89);if(this.next(),p.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(e,!0),this.state.strict&&f){let m=p.argument;m.type==="Identifier"?this.raise(R.StrictDelete,p):this.hasPropertyAsPrivateName(m)&&this.raise(R.DeletePrivateField,p)}if(!a)return t||this.checkExponentialAfterUnary(p),this.finishNode(p,"UnaryExpression")}let u=this.parseUpdate(p,a,e);if(s){let{type:f}=this.state;if((this.hasPlugin("v8intrinsic")?pr(f):pr(f)&&!this.match(54))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite(R.AwaitNotInAsyncContext,r),this.parseAwait(r)}return u}parseUpdate(e,t,r){if(t){let p=e;return this.checkLVal(p.argument,this.finishNode(p,"UpdateExpression")),e}let s=this.state.startLoc,a=this.parseExprSubscripts(r);if(this.checkExpressionErrors(r,!1))return a;for(;cpe(this.state.type)&&!this.canInsertSemicolon();){let p=this.startNodeAt(s);p.operator=this.state.value,p.prefix=!1,p.argument=a,this.next(),this.checkLVal(a,a=this.finishNode(p,"UpdateExpression"))}return a}parseExprSubscripts(e){let t=this.state.startLoc,r=this.state.potentialArrowAt,s=this.parseExprAtom(e);return this.shouldExitDescending(s,r)?s:this.parseSubscripts(s,t)}parseSubscripts(e,t,r){let s={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(e),stop:!1};do e=this.parseSubscript(e,t,r,s),s.maybeAsyncArrow=!1;while(!s.stop);return e}parseSubscript(e,t,r,s){let{type:a}=this.state;if(!r&&a===15)return this.parseBind(e,t,s);if(Ks(a))return this.parseTaggedTemplateExpression(e,t,s);let p=!1;if(a===18){if(r&&(this.raise(R.OptionalChainingNoNew,this.state.startLoc),this.lookaheadCharCode()===40))return this.stopParseSubscript(e,s);s.optionalChainMember=p=!0,this.next()}if(!r&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(e,t,s,p);{let u=this.eat(0);return u||p||this.eat(16)?this.parseMember(e,t,s,u,p):this.stopParseSubscript(e,s)}}stopParseSubscript(e,t){return t.stop=!0,e}parseMember(e,t,r,s,a){let p=this.startNodeAt(t);return p.object=e,p.computed=s,s?(p.property=this.parseExpression(),this.expect(3)):this.match(139)?(e.type==="Super"&&this.raise(R.SuperPrivateField,t),this.classScope.usePrivateName(this.state.value,this.state.startLoc),p.property=this.parsePrivateName()):p.property=this.parseIdentifier(!0),r.optionalChainMember?(p.optional=a,this.finishNode(p,"OptionalMemberExpression")):this.finishNode(p,"MemberExpression")}parseBind(e,t,r){let s=this.startNodeAt(t);s.object=e,this.next();let a=this.match(83),p=this.parseNoCallExpr();if(p.type==="Super"||a&&p.type==="ImportExpression"||p.type==="Import")throw this.raise(R.UnsupportedBindRHS,p);return s.callee=p,r.stop=!0,this.parseSubscripts(this.finishNode(s,"BindExpression"),t,!1)}parseCoverCallAndAsyncArrowHead(e,t,r,s){let a=this.state.maybeInArrowParameters,p=null;this.state.maybeInArrowParameters=!0,this.next();let u=this.startNodeAt(t);u.callee=e;let{maybeAsyncArrow:f,optionalChainMember:m}=r;f&&(this.expressionScope.enter(jpe()),p=new So),m&&(u.optional=s),s?u.arguments=this.parseCallExpressionArguments():u.arguments=this.parseCallExpressionArguments(e.type!=="Super",u,p);let x=this.finishCallExpression(u,m);return f&&this.shouldParseAsyncArrow()&&!s?(r.stop=!0,this.checkDestructuringPrivate(p),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),x=this.parseAsyncArrowFromCallExpression(this.startNodeAt(t),x)):(f&&(this.checkExpressionErrors(p,!0),this.expressionScope.exit()),this.toReferencedArguments(x)),this.state.maybeInArrowParameters=a,x}toReferencedArguments(e,t){this.toReferencedListDeep(e.arguments,t)}parseTaggedTemplateExpression(e,t,r){let s=this.startNodeAt(t);return s.tag=e,s.quasi=this.parseTemplate(!0),r.optionalChainMember&&this.raise(R.OptionalChainingNoTemplate,t),this.finishNode(s,"TaggedTemplateExpression")}atPossibleAsyncArrow(e){return e.type==="Identifier"&&e.name==="async"&&this.state.lastTokEndLoc.index===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.offsetToSourcePos(e.start)===this.state.potentialArrowAt}finishCallExpression(e,t){if(e.callee.type==="Import")if(e.arguments.length===0||e.arguments.length>2)this.raise(R.ImportCallArity,e);else for(let r of e.arguments)r.type==="SpreadElement"&&this.raise(R.ImportCallSpreadArgument,r);return this.finishNode(e,t?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(e,t,r){let s=[],a=!0,p=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(11);){if(a)a=!1;else if(this.expect(12),this.match(11)){t&&this.addTrailingCommaExtraToNode(t),this.next();break}s.push(this.parseExprListItem(11,!1,r,e))}return this.state.inFSharpPipelineDirectBody=p,s}shouldParseAsyncArrow(){return this.match(19)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(e,t){var r;return this.resetPreviousNodeTrailingComments(t),this.expect(19),this.parseArrowExpression(e,t.arguments,!0,(r=t.extra)==null?void 0:r.trailingCommaLoc),t.innerComments&&hr(e,t.innerComments),t.callee.trailingComments&&hr(e,t.callee.trailingComments),e}parseNoCallExpr(){let e=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),e,!0)}parseExprAtom(e){let t,r=null,{type:s}=this.state;switch(s){case 79:return this.parseSuper();case 83:return t=this.startNode(),this.next(),this.match(16)?this.parseImportMetaPropertyOrPhaseCall(t):this.match(10)?this.optionFlags&512?this.parseImportCall(t):this.finishNode(t,"Import"):(this.raise(R.UnsupportedImport,this.state.lastTokStartLoc),this.finishNode(t,"Import"));case 78:return t=this.startNode(),this.next(),this.finishNode(t,"ThisExpression");case 90:return this.parseDo(this.startNode(),!1);case 56:case 31:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 135:return this.parseNumericLiteral(this.state.value);case 136:return this.parseBigIntLiteral(this.state.value);case 134:return this.parseStringLiteral(this.state.value);case 84:return this.parseNullLiteral();case 85:return this.parseBooleanLiteral(!0);case 86:return this.parseBooleanLiteral(!1);case 10:{let a=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(a)}case 0:return this.parseArrayLike(3,!1,e);case 5:return this.parseObjectLike(8,!1,!1,e);case 68:return this.parseFunctionOrFunctionSent();case 26:r=this.parseDecorators();case 80:return this.parseClass(this.maybeTakeDecorators(r,this.startNode()),!1);case 77:return this.parseNewOrNewTarget();case 25:case 24:return this.parseTemplate(!1);case 15:{t=this.startNode(),this.next(),t.object=null;let a=t.callee=this.parseNoCallExpr();if(a.type==="MemberExpression")return this.finishNode(t,"BindExpression");throw this.raise(R.UnsupportedBind,a)}case 139:return this.raise(R.PrivateInExpectedIn,this.state.startLoc,{identifierName:this.state.value}),this.parsePrivateName();case 33:return this.parseTopicReferenceThenEqualsSign(54,"%");case 32:return this.parseTopicReferenceThenEqualsSign(44,"^");case 37:case 38:return this.parseTopicReference("hack");case 44:case 54:case 27:{let a=this.getPluginOption("pipelineOperator","proposal");if(a)return this.parseTopicReference(a);throw this.unexpected()}case 47:{let a=this.input.codePointAt(this.nextTokenStart());throw yt(a)||a===62?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected()}default:if(s===137)return this.parseDecimalLiteral(this.state.value);if(s===2||s===1)return this.parseArrayLike(this.state.type===2?4:3,!0);if(s===6||s===7)return this.parseObjectLike(this.state.type===6?9:8,!1,!0);if(pe(s)){if(this.isContextual(127)&&this.lookaheadInLineCharCode()===123)return this.parseModuleExpression();let a=this.state.potentialArrowAt===this.state.start,p=this.state.containsEsc,u=this.parseIdentifier();if(!p&&u.name==="async"&&!this.canInsertSemicolon()){let{type:f}=this.state;if(f===68)return this.resetPreviousNodeTrailingComments(u),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(u));if(pe(f))return a&&this.lookaheadCharCode()===61?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(u)):u;if(f===90)return this.resetPreviousNodeTrailingComments(u),this.parseDo(this.startNodeAtNode(u),!0)}return a&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(u),[u],!1)):u}else throw this.unexpected()}}parseTopicReferenceThenEqualsSign(e,t){let r=this.getPluginOption("pipelineOperator","proposal");if(r)return this.state.type=e,this.state.value=t,this.state.pos--,this.state.end--,this.state.endLoc=je(this.state.endLoc,-1),this.parseTopicReference(r);throw this.unexpected()}parseTopicReference(e){let t=this.startNode(),r=this.state.startLoc,s=this.state.type;return this.next(),this.finishTopicReference(t,r,e,s)}finishTopicReference(e,t,r,s){if(this.testTopicReferenceConfiguration(r,t,s))return r==="hack"?(this.topicReferenceIsAllowedInCurrentContext()||this.raise(R.PipeTopicUnbound,t),this.registerTopicReference(),this.finishNode(e,"TopicReference")):(this.topicReferenceIsAllowedInCurrentContext()||this.raise(R.PrimaryTopicNotAllowed,t),this.registerTopicReference(),this.finishNode(e,"PipelinePrimaryTopicReference"));throw this.raise(R.PipeTopicUnconfiguredToken,t,{token:Ft(s)})}testTopicReferenceConfiguration(e,t,r){switch(e){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:Ft(r)}]);case"smart":return r===27;default:throw this.raise(R.PipeTopicRequiresHackPipes,t)}}parseAsyncArrowUnaryFunction(e){this.prodParam.enter($s(!0,this.prodParam.hasYield));let t=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(R.LineTerminatorBeforeArrow,this.state.curPosition()),this.expect(19),this.parseArrowExpression(e,t,!0)}parseDo(e,t){this.expectPlugin("doExpressions"),t&&this.expectPlugin("asyncDoExpressions"),e.async=t,this.next();let r=this.state.labels;return this.state.labels=[],t?(this.prodParam.enter(2),e.body=this.parseBlock(),this.prodParam.exit()):e.body=this.parseBlock(),this.state.labels=r,this.finishNode(e,"DoExpression")}parseSuper(){let e=this.startNode();return this.next(),this.match(10)&&!this.scope.allowDirectSuper?this.optionFlags&16||this.raise(R.SuperNotAllowed,e):this.scope.allowSuper||this.optionFlags&16||this.raise(R.UnexpectedSuper,e),!this.match(10)&&!this.match(0)&&!this.match(16)&&this.raise(R.UnsupportedSuper,e),this.finishNode(e,"Super")}parsePrivateName(){let e=this.startNode(),t=this.startNodeAt(je(this.state.startLoc,1)),r=this.state.value;return this.next(),e.id=this.createIdentifier(t,r),this.finishNode(e,"PrivateName")}parseFunctionOrFunctionSent(){let e=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){let t=this.createIdentifier(this.startNodeAtNode(e),"function");return this.next(),this.match(103)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(e,t,"sent")}return this.parseFunction(e)}parseMetaProperty(e,t,r){e.meta=t;let s=this.state.containsEsc;return e.property=this.parseIdentifier(!0),(e.property.name!==r||s)&&this.raise(R.UnsupportedMetaProperty,e.property,{target:t.name,onlyValidPropertyName:r}),this.finishNode(e,"MetaProperty")}parseImportMetaPropertyOrPhaseCall(e){if(this.next(),this.isContextual(105)||this.isContextual(97)){let t=this.isContextual(105);return this.expectPlugin(t?"sourcePhaseImports":"deferredImportEvaluation"),this.next(),e.phase=t?"source":"defer",this.parseImportCall(e)}else{let t=this.createIdentifierAt(this.startNodeAtNode(e),"import",this.state.lastTokStartLoc);return this.isContextual(101)&&(this.inModule||this.raise(R.ImportMetaOutsideModule,t),this.sawUnambiguousESM=!0),this.parseMetaProperty(e,t,"meta")}}parseLiteralAtNode(e,t,r){return this.addExtra(r,"rawValue",e),this.addExtra(r,"raw",this.input.slice(this.offsetToSourcePos(r.start),this.state.end)),r.value=e,this.next(),this.finishNode(r,t)}parseLiteral(e,t){let r=this.startNode();return this.parseLiteralAtNode(e,t,r)}parseStringLiteral(e){return this.parseLiteral(e,"StringLiteral")}parseNumericLiteral(e){return this.parseLiteral(e,"NumericLiteral")}parseBigIntLiteral(e){return this.parseLiteral(e,"BigIntLiteral")}parseDecimalLiteral(e){return this.parseLiteral(e,"DecimalLiteral")}parseRegExpLiteral(e){let t=this.startNode();return this.addExtra(t,"raw",this.input.slice(this.offsetToSourcePos(t.start),this.state.end)),t.pattern=e.pattern,t.flags=e.flags,this.next(),this.finishNode(t,"RegExpLiteral")}parseBooleanLiteral(e){let t=this.startNode();return t.value=e,this.next(),this.finishNode(t,"BooleanLiteral")}parseNullLiteral(){let e=this.startNode();return this.next(),this.finishNode(e,"NullLiteral")}parseParenAndDistinguishExpression(e){let t=this.state.startLoc,r;this.next(),this.expressionScope.enter(Bpe());let s=this.state.maybeInArrowParameters,a=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;let p=this.state.startLoc,u=[],f=new So,m=!0,x,g;for(;!this.match(11);){if(m)m=!1;else if(this.expect(12,f.optionalParametersLoc===null?null:f.optionalParametersLoc),this.match(11)){g=this.state.startLoc;break}if(this.match(21)){let k=this.state.startLoc;if(x=this.state.startLoc,u.push(this.parseParenItem(this.parseRestBinding(),k)),!this.checkCommaAfterRest(41))break}else u.push(this.parseMaybeAssignAllowInOrVoidPattern(11,f,this.parseParenItem))}let z=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=s,this.state.inFSharpPipelineDirectBody=a;let w=this.startNodeAt(t);return e&&this.shouldParseArrow(u)&&(w=this.parseArrow(w))?(this.checkDestructuringPrivate(f),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(w,u,!1),w):(this.expressionScope.exit(),u.length||this.unexpected(this.state.lastTokStartLoc),g&&this.unexpected(g),x&&this.unexpected(x),this.checkExpressionErrors(f,!0),this.toReferencedListDeep(u,!0),u.length>1?(r=this.startNodeAt(p),r.expressions=u,this.finishNode(r,"SequenceExpression"),this.resetEndLocation(r,z)):r=u[0],this.wrapParenthesis(t,r))}wrapParenthesis(e,t){if(!(this.optionFlags&1024))return this.addExtra(t,"parenthesized",!0),this.addExtra(t,"parenStart",e.index),this.takeSurroundingComments(t,e.index,this.state.lastTokEndLoc.index),t;let r=this.startNodeAt(e);return r.expression=t,this.finishNode(r,"ParenthesizedExpression")}shouldParseArrow(e){return!this.canInsertSemicolon()}parseArrow(e){if(this.eat(19))return e}parseParenItem(e,t){return e}parseNewOrNewTarget(){let e=this.startNode();if(this.next(),this.match(16)){let t=this.createIdentifier(this.startNodeAtNode(e),"new");this.next();let r=this.parseMetaProperty(e,t,"target");return this.scope.allowNewTarget||this.raise(R.UnexpectedNewTarget,r),r}return this.parseNew(e)}parseNew(e){if(this.parseNewCallee(e),this.eat(10)){let t=this.parseExprList(11);this.toReferencedList(t),e.arguments=t}else e.arguments=[];return this.finishNode(e,"NewExpression")}parseNewCallee(e){let t=this.match(83),r=this.parseNoCallExpr();e.callee=r,(t&&r.type==="ImportExpression"||r.type==="Import")&&this.raise(R.ImportCallNotNewExpression,r),r.type==="Super"&&this.raise(R.SuperCallNotNewExpression,r)}parseTemplateElement(e){let{start:t,startLoc:r,end:s,value:a}=this.state,p=t+1,u=this.startNodeAt(je(r,1));a===null&&(e||this.raise(R.InvalidEscapeSequenceTemplate,je(this.state.firstInvalidTemplateEscapePos,1)));let f=this.match(24),m=f?-1:-2,x=s+m;u.value={raw:this.input.slice(p,x).replace(/\r\n?/g,`
|
|
9
|
-
`),cooked:a===null?null:a.slice(1,m)},u.tail=f,this.next();let g=this.finishNode(u,"TemplateElement");return this.resetEndLocation(g,je(this.state.lastTokEndLoc,m)),g}parseTemplate(e){let t=this.startNode(),r=this.parseTemplateElement(e),s=[r],a=[];for(;!r.tail;)a.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),s.push(r=this.parseTemplateElement(e));return t.expressions=a,t.quasis=s,this.finishNode(t,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(e,t,r,s){r&&this.expectPlugin("recordAndTuple");let a=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let p=!1,u=!0,f=this.startNode();for(f.properties=[],this.next();!this.match(e);){if(u)u=!1;else if(this.expect(12),this.match(e)){this.addTrailingCommaExtraToNode(f);break}let x;t?x=this.parseBindingProperty():(x=this.parsePropertyDefinition(s),p=this.checkProto(x,r,p,s)),r&&!this.isObjectProperty(x)&&x.type!=="SpreadElement"&&this.raise(R.InvalidRecordProperty,x),x.shorthand&&this.addExtra(x,"shorthand",!0),f.properties.push(x)}this.next(),this.state.inFSharpPipelineDirectBody=a;let m="ObjectExpression";return t?m="ObjectPattern":r&&(m="RecordExpression"),this.finishNode(f,m)}addTrailingCommaExtraToNode(e){this.addExtra(e,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(e,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(e){return!e.computed&&e.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(e){let t=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(R.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)t.push(this.parseDecorator());let r=this.startNode(),s=!1,a=!1,p;if(this.match(21))return t.length&&this.unexpected(),this.parseSpread();t.length&&(r.decorators=t,t=[]),r.method=!1,e&&(p=this.state.startLoc);let u=this.eat(55);this.parsePropertyNamePrefixOperator(r);let f=this.state.containsEsc;if(this.parsePropertyName(r,e),!u&&!f&&this.maybeAsyncOrAccessorProp(r)){let{key:m}=r,x=m.name;x==="async"&&!this.hasPrecedingLineBreak()&&(s=!0,this.resetPreviousNodeTrailingComments(m),u=this.eat(55),this.parsePropertyName(r)),(x==="get"||x==="set")&&(a=!0,this.resetPreviousNodeTrailingComments(m),r.kind=x,this.match(55)&&(u=!0,this.raise(R.AccessorIsGenerator,this.state.curPosition(),{kind:x}),this.next()),this.parsePropertyName(r))}return this.parseObjPropValue(r,p,u,s,!1,a,e)}getGetterSetterExpectedParamCount(e){return e.kind==="get"?0:1}getObjectOrClassMethodParams(e){return e.params}checkGetterSetterParams(e){var t;let r=this.getGetterSetterExpectedParamCount(e),s=this.getObjectOrClassMethodParams(e);s.length!==r&&this.raise(e.kind==="get"?R.BadGetterArity:R.BadSetterArity,e),e.kind==="set"&&((t=s[s.length-1])==null?void 0:t.type)==="RestElement"&&this.raise(R.BadSetterRestParameter,e)}parseObjectMethod(e,t,r,s,a){if(a){let p=this.parseMethod(e,t,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(p),p}if(r||t||this.match(10))return s&&this.unexpected(),e.kind="method",e.method=!0,this.parseMethod(e,t,r,!1,!1,"ObjectMethod")}parseObjectProperty(e,t,r,s){if(e.shorthand=!1,this.eat(14))return e.value=r?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowInOrVoidPattern(8,s),this.finishObjectProperty(e);if(!e.computed&&e.key.type==="Identifier"){if(this.checkReservedWord(e.key.name,e.key.loc.start,!0,!1),r)e.value=this.parseMaybeDefault(t,this.cloneIdentifier(e.key));else if(this.match(29)){let a=this.state.startLoc;s!=null?s.shorthandAssignLoc===null&&(s.shorthandAssignLoc=a):this.raise(R.InvalidCoverInitializedName,a),e.value=this.parseMaybeDefault(t,this.cloneIdentifier(e.key))}else e.value=this.cloneIdentifier(e.key);return e.shorthand=!0,this.finishObjectProperty(e)}}finishObjectProperty(e){return this.finishNode(e,"ObjectProperty")}parseObjPropValue(e,t,r,s,a,p,u){let f=this.parseObjectMethod(e,r,s,a,p)||this.parseObjectProperty(e,t,a,u);return f||this.unexpected(),f}parsePropertyName(e,t){if(this.eat(0))e.computed=!0,e.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{let{type:r,value:s}=this.state,a;if(pt(r))a=this.parseIdentifier(!0);else switch(r){case 135:a=this.parseNumericLiteral(s);break;case 134:a=this.parseStringLiteral(s);break;case 136:a=this.parseBigIntLiteral(s);break;case 139:{let p=this.state.startLoc;t!=null?t.privateKeyLoc===null&&(t.privateKeyLoc=p):this.raise(R.UnexpectedPrivateField,p),a=this.parsePrivateName();break}default:if(r===137){a=this.parseDecimalLiteral(s);break}this.unexpected()}e.key=a,r!==139&&(e.computed=!1)}}initFunction(e,t){e.id=null,e.generator=!1,e.async=t}parseMethod(e,t,r,s,a,p,u=!1){this.initFunction(e,r),e.generator=t,this.scope.enter(530|(u?576:0)|(a?32:0)),this.prodParam.enter($s(r,e.generator)),this.parseFunctionParams(e,s);let f=this.parseFunctionBodyAndFinish(e,p,!0);return this.prodParam.exit(),this.scope.exit(),f}parseArrayLike(e,t,r){t&&this.expectPlugin("recordAndTuple");let s=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let a=this.startNode();return this.next(),a.elements=this.parseExprList(e,!t,r,a),this.state.inFSharpPipelineDirectBody=s,this.finishNode(a,t?"TupleExpression":"ArrayExpression")}parseArrowExpression(e,t,r,s){this.scope.enter(518);let a=$s(r,!1);!this.match(5)&&this.prodParam.hasIn&&(a|=8),this.prodParam.enter(a),this.initFunction(e,r);let p=this.state.maybeInArrowParameters;return t&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(e,t,s)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(e,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=p,this.finishNode(e,"ArrowFunctionExpression")}setArrowFunctionParameters(e,t,r){this.toAssignableList(t,r,!1),e.params=t}parseFunctionBodyAndFinish(e,t,r=!1){return this.parseFunctionBody(e,!1,r),this.finishNode(e,t)}parseFunctionBody(e,t,r=!1){let s=t&&!this.match(5);if(this.expressionScope.enter(Jh()),s)e.body=this.parseMaybeAssign(),this.checkParams(e,!1,t,!1);else{let a=this.state.strict,p=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|4),e.body=this.parseBlock(!0,!1,u=>{let f=!this.isSimpleParamList(e.params);u&&f&&this.raise(R.IllegalLanguageModeDirective,(e.kind==="method"||e.kind==="constructor")&&e.key?e.key.loc.end:e);let m=!a&&this.state.strict;this.checkParams(e,!this.state.strict&&!t&&!r&&!f,t,m),this.state.strict&&e.id&&this.checkIdentifier(e.id,65,m)}),this.prodParam.exit(),this.state.labels=p}this.expressionScope.exit()}isSimpleParameter(e){return e.type==="Identifier"}isSimpleParamList(e){for(let t=0,r=e.length;t<r;t++)if(!this.isSimpleParameter(e[t]))return!1;return!0}checkParams(e,t,r,s=!0){let a=!t&&new Set,p={type:"FormalParameters"};for(let u of e.params)this.checkLVal(u,p,5,a,s)}parseExprList(e,t,r,s){let a=[],p=!0;for(;!this.eat(e);){if(p)p=!1;else if(this.expect(12),this.match(e)){s&&this.addTrailingCommaExtraToNode(s),this.next();break}a.push(this.parseExprListItem(e,t,r))}return a}parseExprListItem(e,t,r,s){let a;if(this.match(12))t||this.raise(R.UnexpectedToken,this.state.curPosition(),{unexpected:","}),a=null;else if(this.match(21)){let p=this.state.startLoc;a=this.parseParenItem(this.parseSpread(r),p)}else if(this.match(17)){this.expectPlugin("partialApplication"),s||this.raise(R.UnexpectedArgumentPlaceholder,this.state.startLoc);let p=this.startNode();this.next(),a=this.finishNode(p,"ArgumentPlaceholder")}else a=this.parseMaybeAssignAllowInOrVoidPattern(e,r,this.parseParenItem);return a}parseIdentifier(e){let t=this.startNode(),r=this.parseIdentifierName(e);return this.createIdentifier(t,r)}createIdentifier(e,t){return e.name=t,e.loc.identifierName=t,this.finishNode(e,"Identifier")}createIdentifierAt(e,t,r){return e.name=t,e.loc.identifierName=t,this.finishNodeAt(e,"Identifier",r)}parseIdentifierName(e){let t,{startLoc:r,type:s}=this.state;pt(s)?t=this.state.value:this.unexpected();let a=rpe(s);return e?a&&this.replaceToken(132):this.checkReservedWord(t,r,a,!1),this.next(),t}checkReservedWord(e,t,r,s){if(e.length>10||!zpe(e))return;if(r&&ype(e)){this.raise(R.UnexpectedKeyword,t,{keyword:e});return}if((this.state.strict?s?Kh:$h:Wh)(e,this.inModule)){this.raise(R.UnexpectedReservedWord,t,{reservedWord:e});return}else if(e==="yield"){if(this.prodParam.hasYield){this.raise(R.YieldBindingIdentifier,t);return}}else if(e==="await"){if(this.prodParam.hasAwait){this.raise(R.AwaitBindingIdentifier,t);return}if(this.scope.inStaticBlock){this.raise(R.AwaitBindingIdentifierInStaticBlock,t);return}this.expressionScope.recordAsyncArrowParametersError(t)}else if(e==="arguments"&&this.scope.inClassAndNotInNonArrowFunction){this.raise(R.ArgumentsInClass,t);return}}recordAwaitIfAllowed(){let e=this.prodParam.hasAwait;return e&&!this.scope.inFunction&&(this.state.hasTopLevelAwait=!0),e}parseAwait(e){let t=this.startNodeAt(e);return this.expressionScope.recordParameterInitializerError(R.AwaitExpressionFormalParameter,t),this.eat(55)&&this.raise(R.ObsoleteAwaitStar,t),!this.scope.inFunction&&!(this.optionFlags&1)&&(this.isAmbiguousPrefixOrIdentifier()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(t.argument=this.parseMaybeUnary(null,!0)),this.finishNode(t,"AwaitExpression")}isAmbiguousPrefixOrIdentifier(){if(this.hasPrecedingLineBreak())return!0;let{type:e}=this.state;return e===53||e===10||e===0||Ks(e)||e===102&&!this.state.containsEsc||e===138||e===56||this.hasPlugin("v8intrinsic")&&e===54}parseYield(e){let t=this.startNodeAt(e);this.expressionScope.recordParameterInitializerError(R.YieldInParameter,t);let r=!1,s=null;if(!this.hasPrecedingLineBreak())switch(r=this.eat(55),this.state.type){case 13:case 140:case 8:case 11:case 3:case 9:case 14:case 12:if(!r)break;default:s=this.parseMaybeAssign()}return t.delegate=r,t.argument=s,this.finishNode(t,"YieldExpression")}parseImportCall(e){if(this.next(),e.source=this.parseMaybeAssignAllowIn(),e.options=null,this.eat(12)){if(this.match(11))this.addTrailingCommaExtraToNode(e.source);else if(e.options=this.parseMaybeAssignAllowIn(),this.eat(12)&&(this.addTrailingCommaExtraToNode(e.options),!this.match(11))){do this.parseMaybeAssignAllowIn();while(this.eat(12)&&!this.match(11));this.raise(R.ImportCallArity,e)}}return this.expect(11),this.finishNode(e,"ImportExpression")}checkPipelineAtInfixOperator(e,t){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&e.type==="SequenceExpression"&&this.raise(R.PipelineHeadSequenceExpression,t)}parseSmartPipelineBodyInStyle(e,t){if(this.isSimpleReference(e)){let r=this.startNodeAt(t);return r.callee=e,this.finishNode(r,"PipelineBareFunction")}else{let r=this.startNodeAt(t);return this.checkSmartPipeTopicBodyEarlyErrors(t),r.expression=e,this.finishNode(r,"PipelineTopicExpression")}}isSimpleReference(e){switch(e.type){case"MemberExpression":return!e.computed&&this.isSimpleReference(e.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(e){if(this.match(19))throw this.raise(R.PipelineBodyNoArrow,this.state.startLoc);this.topicReferenceWasUsedInCurrentContext()||this.raise(R.PipelineTopicUnused,e)}withTopicBindingContext(e){let t=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return e()}finally{this.state.topicContext=t}}withSmartMixTopicForbiddingContext(e){if(this.hasPlugin(["pipelineOperator",{proposal:"smart"}])){let t=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return e()}finally{this.state.topicContext=t}}else return e()}withSoloAwaitPermittingContext(e){let t=this.state.soloAwait;this.state.soloAwait=!0;try{return e()}finally{this.state.soloAwait=t}}allowInAnd(e){let t=this.prodParam.currentFlags();if(8&~t){this.prodParam.enter(t|8);try{return e()}finally{this.prodParam.exit()}}return e()}disallowInAnd(e){let t=this.prodParam.currentFlags();if(8&t){this.prodParam.enter(t&-9);try{return e()}finally{this.prodParam.exit()}}return e()}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}topicReferenceIsAllowedInCurrentContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentContext(){return this.state.topicContext.maxTopicIndex!=null&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(e){let t=this.state.startLoc;this.state.potentialArrowAt=this.state.start;let r=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;let s=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),t,e);return this.state.inFSharpPipelineDirectBody=r,s}parseModuleExpression(){this.expectPlugin("moduleBlocks");let e=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);let t=this.startNodeAt(this.state.endLoc);this.next();let r=this.initializeScopes(!0);this.enterInitialScopes();try{e.body=this.parseProgram(t,8,"module")}finally{r()}return this.finishNode(e,"ModuleExpression")}parseVoidPattern(e){this.expectPlugin("discardBinding");let t=this.startNode();return e!=null&&(e.voidPatternLoc=this.state.startLoc),this.next(),this.finishNode(t,"VoidPattern")}parseMaybeAssignAllowInOrVoidPattern(e,t,r){if(t!=null&&this.match(88)){let s=this.lookaheadCharCode();if(s===44||s===(e===3?93:e===8?125:41)||s===61)return this.parseMaybeDefault(this.state.startLoc,this.parseVoidPattern(t))}return this.parseMaybeAssignAllowIn(t,r)}parsePropertyNamePrefixOperator(e){}},gc={kind:1},Zpe={kind:2},Xpe=/[\uD800-\uDFFF]/u,bc=/in(?:stanceof)?/y;function ede(o,e,t){for(let r=0;r<o.length;r++){let s=o[r],{type:a}=s;if(typeof a=="number"){if(a===139){let{loc:p,start:u,value:f,end:m}=s,x=u+1,g=je(p.start,1);o.splice(r,1,new bt({type:Ct(27),value:"#",start:u,end:x,startLoc:p.start,endLoc:g}),new bt({type:Ct(132),value:f,start:x,end:m,startLoc:g,endLoc:p.end})),r++;continue}if(Ks(a)){let{loc:p,start:u,value:f,end:m}=s,x=u+1,g=je(p.start,1),z;e.charCodeAt(u-t)===96?z=new bt({type:Ct(22),value:"`",start:u,end:x,startLoc:p.start,endLoc:g}):z=new bt({type:Ct(8),value:"}",start:u,end:x,startLoc:p.start,endLoc:g});let w,k,F,Y;a===24?(k=m-1,F=je(p.end,-1),w=f===null?null:f.slice(1,-1),Y=new bt({type:Ct(22),value:"`",start:k,end:m,startLoc:F,endLoc:p.end})):(k=m-2,F=je(p.end,-2),w=f===null?null:f.slice(1,-2),Y=new bt({type:Ct(23),value:"${",start:k,end:m,startLoc:F,endLoc:p.end})),o.splice(r,1,z,new bt({type:Ct(20),value:w,start:x,end:k,startLoc:g,endLoc:F}),Y),r+=2;continue}s.type=Ct(a)}}return o}var Bc=class extends _c{parseTopLevel(e,t){return e.program=this.parseProgram(t,140,this.options.sourceType==="module"?"module":"script"),e.comments=this.comments,this.optionFlags&256&&(e.tokens=ede(this.tokens,this.input,this.startIndex)),this.finishNode(e,"File")}parseProgram(e,t,r){if(e.sourceType=r,e.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(e,!0,!0,t),this.inModule){if(!(this.optionFlags&64)&&this.scope.undefinedExports.size>0)for(let[a,p]of Array.from(this.scope.undefinedExports))this.raise(R.ModuleExportUndefined,p,{localName:a});this.addExtra(e,"topLevelAwait",this.state.hasTopLevelAwait)}let s;return t===140?s=this.finishNode(e,"Program"):s=this.finishNodeAt(e,"Program",je(this.state.startLoc,-1)),s}stmtToDirective(e){let t=this.castNodeTo(e,"Directive"),r=this.castNodeTo(e.expression,"DirectiveLiteral"),s=r.value,a=this.input.slice(this.offsetToSourcePos(r.start),this.offsetToSourcePos(r.end)),p=r.value=a.slice(1,-1);return this.addExtra(r,"raw",a),this.addExtra(r,"rawValue",p),this.addExtra(r,"expressionValue",s),t.value=r,delete e.expression,t}parseInterpreterDirective(){if(!this.match(28))return null;let e=this.startNode();return e.value=this.state.value,this.next(),this.finishNode(e,"InterpreterDirective")}isLet(){return this.isContextual(100)?this.hasFollowingBindingAtom():!1}isUsing(){return this.isContextual(107)?this.nextTokenIsIdentifierOnSameLine():!1}isForUsing(){if(!this.isContextual(107))return!1;let e=this.nextTokenInLineStart(),t=this.codePointAtPos(e);if(this.isUnparsedContextual(e,"of")){let r=this.lookaheadCharCodeSince(e+2);if(r!==61&&r!==58&&r!==59)return!1}return!!(this.chStartsBindingIdentifier(t,e)||this.isUnparsedContextual(e,"void"))}nextTokenIsIdentifierOnSameLine(){let e=this.nextTokenInLineStart(),t=this.codePointAtPos(e);return this.chStartsBindingIdentifier(t,e)}isAwaitUsing(){if(!this.isContextual(96))return!1;let e=this.nextTokenInLineStart();if(this.isUnparsedContextual(e,"using")){e=this.nextTokenInLineStartSince(e+5);let t=this.codePointAtPos(e);if(this.chStartsBindingIdentifier(t,e))return!0}return!1}chStartsBindingIdentifier(e,t){if(yt(e)){if(bc.lastIndex=t,bc.test(this.input)){let r=this.codePointAtPos(bc.lastIndex);if(!Kt(r)&&r!==92)return!1}return!0}else return e===92}chStartsBindingPattern(e){return e===91||e===123}hasFollowingBindingAtom(){let e=this.nextTokenStart(),t=this.codePointAtPos(e);return this.chStartsBindingPattern(t)||this.chStartsBindingIdentifier(t,e)}hasInLineFollowingBindingIdentifierOrBrace(){let e=this.nextTokenInLineStart(),t=this.codePointAtPos(e);return t===123||this.chStartsBindingIdentifier(t,e)}allowsUsing(){return(this.scope.inModule||!this.scope.inTopLevel)&&!this.scope.inBareCaseStatement}parseModuleItem(){return this.parseStatementLike(15)}parseStatementListItem(){return this.parseStatementLike(6|(!this.options.annexB||this.state.strict?0:8))}parseStatementOrSloppyAnnexBFunctionDeclaration(e=!1){let t=0;return this.options.annexB&&!this.state.strict&&(t|=4,e&&(t|=8)),this.parseStatementLike(t)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(e){let t=null;return this.match(26)&&(t=this.parseDecorators(!0)),this.parseStatementContent(e,t)}parseStatementContent(e,t){let r=this.state.type,s=this.startNode(),a=!!(e&2),p=!!(e&4),u=e&1;switch(r){case 60:return this.parseBreakContinueStatement(s,!0);case 63:return this.parseBreakContinueStatement(s,!1);case 64:return this.parseDebuggerStatement(s);case 90:return this.parseDoWhileStatement(s);case 91:return this.parseForStatement(s);case 68:if(this.lookaheadCharCode()===46)break;return p||this.raise(this.state.strict?R.StrictFunction:this.options.annexB?R.SloppyFunctionAnnexB:R.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(s,!1,!a&&p);case 80:return a||this.unexpected(),this.parseClass(this.maybeTakeDecorators(t,s),!0);case 69:return this.parseIfStatement(s);case 70:return this.parseReturnStatement(s);case 71:return this.parseSwitchStatement(s);case 72:return this.parseThrowStatement(s);case 73:return this.parseTryStatement(s);case 96:if(this.isAwaitUsing())return this.allowsUsing()?a?this.recordAwaitIfAllowed()||this.raise(R.AwaitUsingNotInAsyncContext,s):this.raise(R.UnexpectedLexicalDeclaration,s):this.raise(R.UnexpectedUsingDeclaration,s),this.next(),this.parseVarStatement(s,"await using");break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifierOrBrace())break;return this.allowsUsing()?a||this.raise(R.UnexpectedLexicalDeclaration,this.state.startLoc):this.raise(R.UnexpectedUsingDeclaration,this.state.startLoc),this.parseVarStatement(s,"using");case 100:{if(this.state.containsEsc)break;let x=this.nextTokenStart(),g=this.codePointAtPos(x);if(g!==91&&(!a&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(g,x)&&g!==123))break}case 75:a||this.raise(R.UnexpectedLexicalDeclaration,this.state.startLoc);case 74:{let x=this.state.value;return this.parseVarStatement(s,x)}case 92:return this.parseWhileStatement(s);case 76:return this.parseWithStatement(s);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(s);case 83:{let x=this.lookaheadCharCode();if(x===40||x===46)break}case 82:{!(this.optionFlags&8)&&!u&&this.raise(R.UnexpectedImportExport,this.state.startLoc),this.next();let x;return r===83?x=this.parseImport(s):x=this.parseExport(s,t),this.assertModuleNodeAllowed(x),x}default:if(this.isAsyncFunction())return a||this.raise(R.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(s,!0,!a&&p)}let f=this.state.value,m=this.parseExpression();return pe(r)&&m.type==="Identifier"&&this.eat(14)?this.parseLabeledStatement(s,f,m,e):this.parseExpressionStatement(s,m,t)}assertModuleNodeAllowed(e){!(this.optionFlags&8)&&!this.inModule&&this.raise(R.ImportOutsideModule,e)}decoratorsEnabledBeforeExport(){return this.hasPlugin("decorators-legacy")?!0:this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")!==!1}maybeTakeDecorators(e,t,r){if(e){var s;(s=t.decorators)!=null&&s.length?(typeof this.getPluginOption("decorators","decoratorsBeforeExport")!="boolean"&&this.raise(R.DecoratorsBeforeAfterExport,t.decorators[0]),t.decorators.unshift(...e)):t.decorators=e,this.resetStartLocationFromNode(t,e[0]),r&&this.resetStartLocationFromNode(r,t)}return t}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(e){let t=[];do t.push(this.parseDecorator());while(this.match(26));if(this.match(82))e||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(R.DecoratorExportClass,this.state.startLoc);else if(!this.canHaveLeadingDecorator())throw this.raise(R.UnexpectedLeadingDecorator,this.state.startLoc);return t}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);let e=this.startNode();if(this.next(),this.hasPlugin("decorators")){let t=this.state.startLoc,r;if(this.match(10)){let s=this.state.startLoc;this.next(),r=this.parseExpression(),this.expect(11),r=this.wrapParenthesis(s,r);let a=this.state.startLoc;e.expression=this.parseMaybeDecoratorArguments(r,s),this.getPluginOption("decorators","allowCallParenthesized")===!1&&e.expression!==r&&this.raise(R.DecoratorArgumentsOutsideParentheses,a)}else{for(r=this.parseIdentifier(!1);this.eat(16);){let s=this.startNodeAt(t);s.object=r,this.match(139)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),s.property=this.parsePrivateName()):s.property=this.parseIdentifier(!0),s.computed=!1,r=this.finishNode(s,"MemberExpression")}e.expression=this.parseMaybeDecoratorArguments(r,t)}}else e.expression=this.parseExprSubscripts();return this.finishNode(e,"Decorator")}parseMaybeDecoratorArguments(e,t){if(this.eat(10)){let r=this.startNodeAt(t);return r.callee=e,r.arguments=this.parseCallExpressionArguments(),this.toReferencedList(r.arguments),this.finishNode(r,"CallExpression")}return e}parseBreakContinueStatement(e,t){return this.next(),this.isLineTerminator()?e.label=null:(e.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(e,t),this.finishNode(e,t?"BreakStatement":"ContinueStatement")}verifyBreakContinue(e,t){let r;for(r=0;r<this.state.labels.length;++r){let s=this.state.labels[r];if((e.label==null||s.name===e.label.name)&&(s.kind!=null&&(t||s.kind===1)||e.label&&t))break}if(r===this.state.labels.length){let s=t?"BreakStatement":"ContinueStatement";this.raise(R.IllegalBreakContinue,e,{type:s})}}parseDebuggerStatement(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")}parseHeaderExpression(){this.expect(10);let e=this.parseExpression();return this.expect(11),e}parseDoWhileStatement(e){return this.next(),this.state.labels.push(gc),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.expect(92),e.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(e,"DoWhileStatement")}parseForStatement(e){this.next(),this.state.labels.push(gc);let t=null;if(this.isContextual(96)&&this.recordAwaitIfAllowed()&&(t=this.state.startLoc,this.next()),this.scope.enter(0),this.expect(10),this.match(13))return t!==null&&this.unexpected(t),this.parseFor(e,null);let r=this.isContextual(100);{let f=this.isAwaitUsing(),m=f||this.isForUsing(),x=r&&this.hasFollowingBindingAtom()||m;if(this.match(74)||this.match(75)||x){let g=this.startNode(),z;f?(z="await using",this.recordAwaitIfAllowed()||this.raise(R.AwaitUsingNotInAsyncContext,this.state.startLoc),this.next()):z=this.state.value,this.next(),this.parseVar(g,!0,z);let w=this.finishNode(g,"VariableDeclaration"),k=this.match(58);return k&&m&&this.raise(R.ForInUsing,w),(k||this.isContextual(102))&&w.declarations.length===1?this.parseForIn(e,w,t):(t!==null&&this.unexpected(t),this.parseFor(e,w))}}let s=this.isContextual(95),a=new So,p=this.parseExpression(!0,a),u=this.isContextual(102);if(u&&(r&&this.raise(R.ForOfLet,p),t===null&&s&&p.type==="Identifier"&&this.raise(R.ForOfAsync,p)),u||this.match(58)){this.checkDestructuringPrivate(a),this.toAssignable(p,!0);let f=u?"ForOfStatement":"ForInStatement";return this.checkLVal(p,{type:f}),this.parseForIn(e,p,t)}else this.checkExpressionErrors(a,!0);return t!==null&&this.unexpected(t),this.parseFor(e,p)}parseFunctionStatement(e,t,r){return this.next(),this.parseFunction(e,1|(r?2:0)|(t?8:0))}parseIfStatement(e){return this.next(),e.test=this.parseHeaderExpression(),e.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),e.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(e,"IfStatement")}parseReturnStatement(e){return this.prodParam.hasReturn||this.raise(R.IllegalReturn,this.state.startLoc),this.next(),this.isLineTerminator()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")}parseSwitchStatement(e){this.next(),e.discriminant=this.parseHeaderExpression();let t=e.cases=[];this.expect(5),this.state.labels.push(Zpe),this.scope.enter(256);let r;for(let s;!this.match(8);)if(this.match(61)||this.match(65)){let a=this.match(61);r&&this.finishNode(r,"SwitchCase"),t.push(r=this.startNode()),r.consequent=[],this.next(),a?r.test=this.parseExpression():(s&&this.raise(R.MultipleDefaultsInSwitch,this.state.lastTokStartLoc),s=!0,r.test=null),this.expect(14)}else r?r.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),r&&this.finishNode(r,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(e,"SwitchStatement")}parseThrowStatement(e){return this.next(),this.hasPrecedingLineBreak()&&this.raise(R.NewlineAfterThrow,this.state.lastTokEndLoc),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")}parseCatchClauseParam(){let e=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&e.type==="Identifier"?8:0),this.checkLVal(e,{type:"CatchClause"},9),e}parseTryStatement(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.match(62)){let t=this.startNode();this.next(),this.match(10)?(this.expect(10),t.param=this.parseCatchClauseParam(),this.expect(11)):(t.param=null,this.scope.enter(0)),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseBlock(!1,!1)),this.scope.exit(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(67)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(R.NoCatchOrFinally,e),this.finishNode(e,"TryStatement")}parseVarStatement(e,t,r=!1){return this.next(),this.parseVar(e,!1,t,r),this.semicolon(),this.finishNode(e,"VariableDeclaration")}parseWhileStatement(e){return this.next(),e.test=this.parseHeaderExpression(),this.state.labels.push(gc),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.finishNode(e,"WhileStatement")}parseWithStatement(e){return this.state.strict&&this.raise(R.StrictWith,this.state.startLoc),this.next(),e.object=this.parseHeaderExpression(),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.finishNode(e,"WithStatement")}parseEmptyStatement(e){return this.next(),this.finishNode(e,"EmptyStatement")}parseLabeledStatement(e,t,r,s){for(let p of this.state.labels)p.name===t&&this.raise(R.LabelRedeclaration,r,{labelName:t});let a=ipe(this.state.type)?1:this.match(71)?2:null;for(let p=this.state.labels.length-1;p>=0;p--){let u=this.state.labels[p];if(u.statementStart===e.start)u.statementStart=this.sourceToOffsetPos(this.state.start),u.kind=a;else break}return this.state.labels.push({name:t,kind:a,statementStart:this.sourceToOffsetPos(this.state.start)}),e.body=s&8?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),e.label=r,this.finishNode(e,"LabeledStatement")}parseExpressionStatement(e,t,r){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")}parseBlock(e=!1,t=!0,r){let s=this.startNode();return e&&this.state.strictErrors.clear(),this.expect(5),t&&this.scope.enter(0),this.parseBlockBody(s,e,!1,8,r),t&&this.scope.exit(),this.finishNode(s,"BlockStatement")}isValidDirective(e){return e.type==="ExpressionStatement"&&e.expression.type==="StringLiteral"&&!e.expression.extra.parenthesized}parseBlockBody(e,t,r,s,a){let p=e.body=[],u=e.directives=[];this.parseBlockOrModuleBlockBody(p,t?u:void 0,r,s,a)}parseBlockOrModuleBlockBody(e,t,r,s,a){let p=this.state.strict,u=!1,f=!1;for(;!this.match(s);){let m=r?this.parseModuleItem():this.parseStatementListItem();if(t&&!f){if(this.isValidDirective(m)){let x=this.stmtToDirective(m);t.push(x),!u&&x.value.value==="use strict"&&(u=!0,this.setStrict(!0));continue}f=!0,this.state.strictErrors.clear()}e.push(m)}a?.call(this,u),p||this.setStrict(!1),this.next()}parseFor(e,t){return e.init=t,this.semicolon(!1),e.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),e.update=this.match(11)?null:this.parseExpression(),this.expect(11),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,"ForStatement")}parseForIn(e,t,r){let s=this.match(58);return this.next(),s?r!==null&&this.unexpected(r):e.await=r!==null,t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!s||!this.options.annexB||this.state.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier")&&this.raise(R.ForInOfLoopInitializer,t,{type:s?"ForInStatement":"ForOfStatement"}),t.type==="AssignmentPattern"&&this.raise(R.InvalidLhs,t,{ancestor:{type:"ForStatement"}}),e.left=t,e.right=s?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,s?"ForInStatement":"ForOfStatement")}parseVar(e,t,r,s=!1){let a=e.declarations=[];for(e.kind=r;;){let p=this.startNode();if(this.parseVarId(p,r),p.init=this.eat(29)?t?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,p.init===null&&!s&&(p.id.type!=="Identifier"&&!(t&&(this.match(58)||this.isContextual(102)))?this.raise(R.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"}):(r==="const"||r==="using"||r==="await using")&&!(this.match(58)||this.isContextual(102))&&this.raise(R.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:r})),a.push(this.finishNode(p,"VariableDeclarator")),!this.eat(12))break}return e}parseVarId(e,t){let r=this.parseBindingAtom();t==="using"||t==="await using"?(r.type==="ArrayPattern"||r.type==="ObjectPattern")&&this.raise(R.UsingDeclarationHasBindingPattern,r.loc.start):r.type==="VoidPattern"&&this.raise(R.UnexpectedVoidPattern,r.loc.start),this.checkLVal(r,{type:"VariableDeclarator"},t==="var"?5:8201),e.id=r}parseAsyncFunctionExpression(e){return this.parseFunction(e,8)}parseFunction(e,t=0){let r=t&2,s=!!(t&1),a=s&&!(t&4),p=!!(t&8);this.initFunction(e,p),this.match(55)&&(r&&this.raise(R.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),e.generator=!0),s&&(e.id=this.parseFunctionId(a));let u=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(514),this.prodParam.enter($s(p,e.generator)),s||(e.id=this.parseFunctionId()),this.parseFunctionParams(e,!1),this.withSmartMixTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(e,s?"FunctionDeclaration":"FunctionExpression")}),this.prodParam.exit(),this.scope.exit(),s&&!r&&this.registerFunctionStatementId(e),this.state.maybeInArrowParameters=u,e}parseFunctionId(e){return e||pe(this.state.type)?this.parseIdentifier():null}parseFunctionParams(e,t){this.expect(10),this.expressionScope.enter(_pe()),e.params=this.parseBindingList(11,41,2|(t?4:0)),this.expressionScope.exit()}registerFunctionStatementId(e){e.id&&this.scope.declareName(e.id.name,!this.options.annexB||this.state.strict||e.generator||e.async?this.scope.treatFunctionsAsVar?5:8201:17,e.id.loc.start)}parseClass(e,t,r){this.next();let s=this.state.strict;return this.state.strict=!0,this.parseClassId(e,t,r),this.parseClassSuper(e),e.body=this.parseClassBody(!!e.superClass,s),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}nameIsConstructor(e){return e.type==="Identifier"&&e.name==="constructor"||e.type==="StringLiteral"&&e.value==="constructor"}isNonstaticConstructor(e){return!e.computed&&!e.static&&this.nameIsConstructor(e.key)}parseClassBody(e,t){this.classScope.enter();let r={hadConstructor:!1,hadSuperClass:e},s=[],a=this.startNode();if(a.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext(()=>{for(;!this.match(8);){if(this.eat(13)){if(s.length>0)throw this.raise(R.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(26)){s.push(this.parseDecorator());continue}let p=this.startNode();s.length&&(p.decorators=s,this.resetStartLocationFromNode(p,s[0]),s=[]),this.parseClassMember(a,p,r),p.kind==="constructor"&&p.decorators&&p.decorators.length>0&&this.raise(R.DecoratorConstructor,p)}}),this.state.strict=t,this.next(),s.length)throw this.raise(R.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(a,"ClassBody")}parseClassMemberFromModifier(e,t){let r=this.parseIdentifier(!0);if(this.isClassMethod()){let s=t;return s.kind="method",s.computed=!1,s.key=r,s.static=!1,this.pushClassMethod(e,s,!1,!1,!1,!1),!0}else if(this.isClassProperty()){let s=t;return s.computed=!1,s.key=r,s.static=!1,e.body.push(this.parseClassProperty(s)),!0}return this.resetPreviousNodeTrailingComments(r),!1}parseClassMember(e,t,r){let s=this.isContextual(106);if(s){if(this.parseClassMemberFromModifier(e,t))return;if(this.eat(5)){this.parseClassStaticBlock(e,t);return}}this.parseClassMemberWithIsStatic(e,t,r,s)}parseClassMemberWithIsStatic(e,t,r,s){let a=t,p=t,u=t,f=t,m=t,x=a,g=a;if(t.static=s,this.parsePropertyNamePrefixOperator(t),this.eat(55)){x.kind="method";let W=this.match(139);if(this.parseClassElementName(x),this.parsePostMemberNameModifiers(x),W){this.pushClassPrivateMethod(e,p,!0,!1);return}this.isNonstaticConstructor(a)&&this.raise(R.ConstructorIsGenerator,a.key),this.pushClassMethod(e,a,!0,!1,!1,!1);return}let z=!this.state.containsEsc&&pe(this.state.type),w=this.parseClassElementName(t),k=z?w.name:null,F=this.isPrivateName(w),Y=this.state.startLoc;if(this.parsePostMemberNameModifiers(g),this.isClassMethod()){if(x.kind="method",F){this.pushClassPrivateMethod(e,p,!1,!1);return}let W=this.isNonstaticConstructor(a),ee=!1;W&&(a.kind="constructor",r.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(R.DuplicateConstructor,w),W&&this.hasPlugin("typescript")&&t.override&&this.raise(R.OverrideOnConstructor,w),r.hadConstructor=!0,ee=r.hadSuperClass),this.pushClassMethod(e,a,!1,!1,W,ee)}else if(this.isClassProperty())F?this.pushClassPrivateProperty(e,f):this.pushClassProperty(e,u);else if(k==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(w);let W=this.eat(55);g.optional&&this.unexpected(Y),x.kind="method";let ee=this.match(139);this.parseClassElementName(x),this.parsePostMemberNameModifiers(g),ee?this.pushClassPrivateMethod(e,p,W,!0):(this.isNonstaticConstructor(a)&&this.raise(R.ConstructorIsAsync,a.key),this.pushClassMethod(e,a,W,!0,!1,!1))}else if((k==="get"||k==="set")&&!(this.match(55)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(w),x.kind=k;let W=this.match(139);this.parseClassElementName(a),W?this.pushClassPrivateMethod(e,p,!1,!1):(this.isNonstaticConstructor(a)&&this.raise(R.ConstructorIsAccessor,a.key),this.pushClassMethod(e,a,!1,!1,!1,!1)),this.checkGetterSetterParams(a)}else if(k==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(w);let W=this.match(139);this.parseClassElementName(u),this.pushClassAccessorProperty(e,m,W)}else this.isLineTerminator()?F?this.pushClassPrivateProperty(e,f):this.pushClassProperty(e,u):this.unexpected()}parseClassElementName(e){let{type:t,value:r}=this.state;if((t===132||t===134)&&e.static&&r==="prototype"&&this.raise(R.StaticPrototype,this.state.startLoc),t===139){r==="constructor"&&this.raise(R.ConstructorClassPrivateField,this.state.startLoc);let s=this.parsePrivateName();return e.key=s,s}return this.parsePropertyName(e),e.key}parseClassStaticBlock(e,t){var r;this.scope.enter(720);let s=this.state.labels;this.state.labels=[],this.prodParam.enter(0);let a=t.body=[];this.parseBlockOrModuleBlockBody(a,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=s,e.body.push(this.finishNode(t,"StaticBlock")),(r=t.decorators)!=null&&r.length&&this.raise(R.DecoratorStaticBlock,t)}pushClassProperty(e,t){!t.computed&&this.nameIsConstructor(t.key)&&this.raise(R.ConstructorClassField,t.key),e.body.push(this.parseClassProperty(t))}pushClassPrivateProperty(e,t){let r=this.parseClassPrivateProperty(t);e.body.push(r),this.classScope.declarePrivateName(this.getPrivateNameSV(r.key),0,r.key.loc.start)}pushClassAccessorProperty(e,t,r){!r&&!t.computed&&this.nameIsConstructor(t.key)&&this.raise(R.ConstructorClassField,t.key);let s=this.parseClassAccessorProperty(t);e.body.push(s),r&&this.classScope.declarePrivateName(this.getPrivateNameSV(s.key),0,s.key.loc.start)}pushClassMethod(e,t,r,s,a,p){e.body.push(this.parseMethod(t,r,s,a,p,"ClassMethod",!0))}pushClassPrivateMethod(e,t,r,s){let a=this.parseMethod(t,r,s,!1,!1,"ClassPrivateMethod",!0);e.body.push(a);let p=a.kind==="get"?a.static?6:2:a.kind==="set"?a.static?5:1:0;this.declareClassPrivateMethodInScope(a,p)}declareClassPrivateMethodInScope(e,t){this.classScope.declarePrivateName(this.getPrivateNameSV(e.key),t,e.key.loc.start)}parsePostMemberNameModifiers(e){}parseClassPrivateProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassPrivateProperty")}parseClassProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassProperty")}parseClassAccessorProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassAccessorProperty")}parseInitializer(e){this.scope.enter(592),this.expressionScope.enter(Jh()),this.prodParam.enter(0),e.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(e,t,r,s=8331){if(pe(this.state.type))e.id=this.parseIdentifier(),t&&this.declareNameFromIdentifier(e.id,s);else if(r||!t)e.id=null;else throw this.raise(R.MissingClassName,this.state.startLoc)}parseClassSuper(e){e.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(e,t){let r=this.parseMaybeImportPhase(e,!0),s=this.maybeParseExportDefaultSpecifier(e,r),a=!s||this.eat(12),p=a&&this.eatExportStar(e),u=p&&this.maybeParseExportNamespaceSpecifier(e),f=a&&(!u||this.eat(12)),m=s||p;if(p&&!u){if(s&&this.unexpected(),t)throw this.raise(R.UnsupportedDecoratorExport,e);return this.parseExportFrom(e,!0),this.sawUnambiguousESM=!0,this.finishNode(e,"ExportAllDeclaration")}let x=this.maybeParseExportNamedSpecifiers(e);s&&a&&!p&&!x&&this.unexpected(null,5),u&&f&&this.unexpected(null,98);let g;if(m||x){if(g=!1,t)throw this.raise(R.UnsupportedDecoratorExport,e);this.parseExportFrom(e,m)}else g=this.maybeParseExportDeclaration(e);if(m||x||g){var z;let w=e;if(this.checkExport(w,!0,!1,!!w.source),((z=w.declaration)==null?void 0:z.type)==="ClassDeclaration")this.maybeTakeDecorators(t,w.declaration,w);else if(t)throw this.raise(R.UnsupportedDecoratorExport,e);return this.sawUnambiguousESM=!0,this.finishNode(w,"ExportNamedDeclaration")}if(this.eat(65)){let w=e,k=this.parseExportDefaultExpression();if(w.declaration=k,k.type==="ClassDeclaration")this.maybeTakeDecorators(t,k,w);else if(t)throw this.raise(R.UnsupportedDecoratorExport,e);return this.checkExport(w,!0,!0),this.sawUnambiguousESM=!0,this.finishNode(w,"ExportDefaultDeclaration")}throw this.unexpected(null,5)}eatExportStar(e){return this.eat(55)}maybeParseExportDefaultSpecifier(e,t){if(t||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",t?.loc.start);let r=t||this.parseIdentifier(!0),s=this.startNodeAtNode(r);return s.exported=r,e.specifiers=[this.finishNode(s,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(e){if(this.isContextual(93)){var t,r;(r=(t=e).specifiers)!=null||(t.specifiers=[]);let s=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),s.exported=this.parseModuleExportName(),e.specifiers.push(this.finishNode(s,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(e){if(this.match(5)){let t=e;t.specifiers||(t.specifiers=[]);let r=t.exportKind==="type";return t.specifiers.push(...this.parseExportSpecifiers(r)),t.source=null,this.hasPlugin("importAssertions")?t.assertions=[]:t.attributes=[],t.declaration=null,!0}return!1}maybeParseExportDeclaration(e){return this.shouldParseExportDeclaration()?(e.specifiers=[],e.source=null,this.hasPlugin("importAssertions")?e.assertions=[]:e.attributes=[],e.declaration=this.parseExportDeclaration(e),!0):!1}isAsyncFunction(){if(!this.isContextual(95))return!1;let e=this.nextTokenInLineStart();return this.isUnparsedContextual(e,"function")}parseExportDefaultExpression(){let e=this.startNode();if(this.match(68))return this.next(),this.parseFunction(e,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(e,13);if(this.match(80))return this.parseClass(e,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(R.DecoratorBeforeExport,this.state.startLoc),this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(75)||this.match(74)||this.isLet()||this.isUsing()||this.isAwaitUsing())throw this.raise(R.UnsupportedDefaultExport,this.state.startLoc);let t=this.parseMaybeAssignAllowIn();return this.semicolon(),t}parseExportDeclaration(e){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){let{type:e}=this.state;if(pe(e)){if(e===95&&!this.state.containsEsc||e===100)return!1;if((e===130||e===129)&&!this.state.containsEsc){let s=this.nextTokenStart(),a=this.input.charCodeAt(s);if(a===123||this.chStartsBindingIdentifier(a,s)&&!this.input.startsWith("from",s))return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;let t=this.nextTokenStart(),r=this.isUnparsedContextual(t,"from");if(this.input.charCodeAt(t)===44||pe(this.state.type)&&r)return!0;if(this.match(65)&&r){let s=this.input.charCodeAt(this.nextTokenStartSince(t+4));return s===34||s===39}return!1}parseExportFrom(e,t){this.eatContextual(98)?(e.source=this.parseImportSource(),this.checkExport(e),this.maybeParseImportAttributes(e),this.checkJSONModuleImport(e)):t&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){let{type:e}=this.state;return e===26&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?(this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(R.DecoratorBeforeExport,this.state.startLoc),!0):this.isUsing()?(this.raise(R.UsingDeclarationExport,this.state.startLoc),!0):this.isAwaitUsing()?(this.raise(R.UsingDeclarationExport,this.state.startLoc),!0):e===74||e===75||e===68||e===80||this.isLet()||this.isAsyncFunction()}checkExport(e,t,r,s){if(t){var a;if(r){if(this.checkDuplicateExports(e,"default"),this.hasPlugin("exportDefaultFrom")){var p;let u=e.declaration;u.type==="Identifier"&&u.name==="from"&&u.end-u.start===4&&!((p=u.extra)!=null&&p.parenthesized)&&this.raise(R.ExportDefaultFromAsIdentifier,u)}}else if((a=e.specifiers)!=null&&a.length)for(let u of e.specifiers){let{exported:f}=u,m=f.type==="Identifier"?f.name:f.value;if(this.checkDuplicateExports(u,m),!s&&u.local){let{local:x}=u;x.type!=="Identifier"?this.raise(R.ExportBindingIsString,u,{localName:x.value,exportName:m}):(this.checkReservedWord(x.name,x.loc.start,!0,!1),this.scope.checkLocalExport(x))}}else if(e.declaration){let u=e.declaration;if(u.type==="FunctionDeclaration"||u.type==="ClassDeclaration"){let{id:f}=u;if(!f)throw new Error("Assertion failure");this.checkDuplicateExports(e,f.name)}else if(u.type==="VariableDeclaration")for(let f of u.declarations)this.checkDeclaration(f.id)}}}checkDeclaration(e){if(e.type==="Identifier")this.checkDuplicateExports(e,e.name);else if(e.type==="ObjectPattern")for(let t of e.properties)this.checkDeclaration(t);else if(e.type==="ArrayPattern")for(let t of e.elements)t&&this.checkDeclaration(t);else e.type==="ObjectProperty"?this.checkDeclaration(e.value):e.type==="RestElement"?this.checkDeclaration(e.argument):e.type==="AssignmentPattern"&&this.checkDeclaration(e.left)}checkDuplicateExports(e,t){this.exportedIdentifiers.has(t)&&(t==="default"?this.raise(R.DuplicateDefaultExport,e):this.raise(R.DuplicateExport,e,{exportName:t})),this.exportedIdentifiers.add(t)}parseExportSpecifiers(e){let t=[],r=!0;for(this.expect(5);!this.eat(8);){if(r)r=!1;else if(this.expect(12),this.eat(8))break;let s=this.isContextual(130),a=this.match(134),p=this.startNode();p.local=this.parseModuleExportName(),t.push(this.parseExportSpecifier(p,a,e,s))}return t}parseExportSpecifier(e,t,r,s){return this.eatContextual(93)?e.exported=this.parseModuleExportName():t?e.exported=this.cloneStringLiteral(e.local):e.exported||(e.exported=this.cloneIdentifier(e.local)),this.finishNode(e,"ExportSpecifier")}parseModuleExportName(){if(this.match(134)){let e=this.parseStringLiteral(this.state.value),t=Xpe.exec(e.value);return t&&this.raise(R.ModuleExportNameHasLoneSurrogate,e,{surrogateCharCode:t[0].charCodeAt(0)}),e}return this.parseIdentifier(!0)}isJSONModuleImport(e){return e.assertions!=null?e.assertions.some(({key:t,value:r})=>r.value==="json"&&(t.type==="Identifier"?t.name==="type":t.value==="type")):!1}checkImportReflection(e){let{specifiers:t}=e,r=t.length===1?t[0].type:null;if(e.phase==="source")r!=="ImportDefaultSpecifier"&&this.raise(R.SourcePhaseImportRequiresDefault,t[0].loc.start);else if(e.phase==="defer")r!=="ImportNamespaceSpecifier"&&this.raise(R.DeferImportRequiresNamespace,t[0].loc.start);else if(e.module){var s;r!=="ImportDefaultSpecifier"&&this.raise(R.ImportReflectionNotBinding,t[0].loc.start),((s=e.assertions)==null?void 0:s.length)>0&&this.raise(R.ImportReflectionHasAssertion,t[0].loc.start)}}checkJSONModuleImport(e){if(this.isJSONModuleImport(e)&&e.type!=="ExportAllDeclaration"){let{specifiers:t}=e;if(t!=null){let r=t.find(s=>{let a;if(s.type==="ExportSpecifier"?a=s.local:s.type==="ImportSpecifier"&&(a=s.imported),a!==void 0)return a.type==="Identifier"?a.name!=="default":a.value!=="default"});r!==void 0&&this.raise(R.ImportJSONBindingNotDefault,r.loc.start)}}}isPotentialImportPhase(e){return e?!1:this.isContextual(105)||this.isContextual(97)||this.isContextual(127)}applyImportPhase(e,t,r,s){t||(r==="module"?(this.expectPlugin("importReflection",s),e.module=!0):this.hasPlugin("importReflection")&&(e.module=!1),r==="source"?(this.expectPlugin("sourcePhaseImports",s),e.phase="source"):r==="defer"?(this.expectPlugin("deferredImportEvaluation",s),e.phase="defer"):this.hasPlugin("sourcePhaseImports")&&(e.phase=null))}parseMaybeImportPhase(e,t){if(!this.isPotentialImportPhase(t))return this.applyImportPhase(e,t,null),null;let r=this.startNode(),s=this.parseIdentifierName(!0),{type:a}=this.state;return(pt(a)?a!==98||this.lookaheadCharCode()===102:a!==12)?(this.applyImportPhase(e,t,s,r.loc.start),null):(this.applyImportPhase(e,t,null),this.createIdentifier(r,s))}isPrecedingIdImportPhase(e){let{type:t}=this.state;return pe(t)?t!==98||this.lookaheadCharCode()===102:t!==12}parseImport(e){return this.match(134)?this.parseImportSourceAndAttributes(e):this.parseImportSpecifiersAndAfter(e,this.parseMaybeImportPhase(e,!1))}parseImportSpecifiersAndAfter(e,t){e.specifiers=[];let s=!this.maybeParseDefaultImportSpecifier(e,t)||this.eat(12),a=s&&this.maybeParseStarImportSpecifier(e);return s&&!a&&this.parseNamedImportSpecifiers(e),this.expectContextual(98),this.parseImportSourceAndAttributes(e)}parseImportSourceAndAttributes(e){var t;return(t=e.specifiers)!=null||(e.specifiers=[]),e.source=this.parseImportSource(),this.maybeParseImportAttributes(e),this.checkImportReflection(e),this.checkJSONModuleImport(e),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(e,"ImportDeclaration")}parseImportSource(){return this.match(134)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(e,t,r){t.local=this.parseIdentifier(),e.specifiers.push(this.finishImportSpecifier(t,r))}finishImportSpecifier(e,t,r=8201){return this.checkLVal(e.local,{type:t},r),this.finishNode(e,t)}parseImportAttributes(){this.expect(5);let e=[],t=new Set;do{if(this.match(8))break;let r=this.startNode(),s=this.state.value;if(t.has(s)&&this.raise(R.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:s}),t.add(s),this.match(134)?r.key=this.parseStringLiteral(s):r.key=this.parseIdentifier(!0),this.expect(14),!this.match(134))throw this.raise(R.ModuleAttributeInvalidValue,this.state.startLoc);r.value=this.parseStringLiteral(this.state.value),e.push(this.finishNode(r,"ImportAttribute"))}while(this.eat(12));return this.expect(8),e}parseModuleAttributes(){let e=[],t=new Set;do{let r=this.startNode();if(r.key=this.parseIdentifier(!0),r.key.name!=="type"&&this.raise(R.ModuleAttributeDifferentFromType,r.key),t.has(r.key.name)&&this.raise(R.ModuleAttributesWithDuplicateKeys,r.key,{key:r.key.name}),t.add(r.key.name),this.expect(14),!this.match(134))throw this.raise(R.ModuleAttributeInvalidValue,this.state.startLoc);r.value=this.parseStringLiteral(this.state.value),e.push(this.finishNode(r,"ImportAttribute"))}while(this.eat(12));return e}maybeParseImportAttributes(e){let t;var r=!1;if(this.match(76)){if(this.hasPrecedingLineBreak()&&this.lookaheadCharCode()===40)return;this.next(),this.hasPlugin("moduleAttributes")?(t=this.parseModuleAttributes(),this.addExtra(e,"deprecatedWithLegacySyntax",!0)):t=this.parseImportAttributes(),r=!0}else this.isContextual(94)&&!this.hasPrecedingLineBreak()?(!this.hasPlugin("deprecatedImportAssert")&&!this.hasPlugin("importAssertions")&&this.raise(R.ImportAttributesUseAssert,this.state.startLoc),this.hasPlugin("importAssertions")||this.addExtra(e,"deprecatedAssertSyntax",!0),this.next(),t=this.parseImportAttributes()):t=[];!r&&this.hasPlugin("importAssertions")?e.assertions=t:e.attributes=t}maybeParseDefaultImportSpecifier(e,t){if(t){let r=this.startNodeAtNode(t);return r.local=t,e.specifiers.push(this.finishImportSpecifier(r,"ImportDefaultSpecifier")),!0}else if(pt(this.state.type))return this.parseImportSpecifierLocal(e,this.startNode(),"ImportDefaultSpecifier"),!0;return!1}maybeParseStarImportSpecifier(e){if(this.match(55)){let t=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(e,t,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(e){let t=!0;for(this.expect(5);!this.eat(8);){if(t)t=!1;else{if(this.eat(14))throw this.raise(R.DestructureNamedImport,this.state.startLoc);if(this.expect(12),this.eat(8))break}let r=this.startNode(),s=this.match(134),a=this.isContextual(130);r.imported=this.parseModuleExportName();let p=this.parseImportSpecifier(r,s,e.importKind==="type"||e.importKind==="typeof",a,void 0);e.specifiers.push(p)}}parseImportSpecifier(e,t,r,s,a){if(this.eatContextual(93))e.local=this.parseIdentifier();else{let{imported:p}=e;if(t)throw this.raise(R.ImportBindingIsString,e,{importName:p.value});this.checkReservedWord(p.name,e.loc.start,!0,!0),e.local||(e.local=this.cloneIdentifier(p))}return this.finishImportSpecifier(e,"ImportSpecifier",a)}isThisParam(e){return e.type==="Identifier"&&e.name==="this"}},Ys=class extends Bc{constructor(e,t,r){let s=Zce(e);super(s,t),this.options=s,this.initializeScopes(),this.plugins=r,this.filename=s.sourceFilename,this.startIndex=s.startIndex;let a=0;s.allowAwaitOutsideFunction&&(a|=1),s.allowReturnOutsideFunction&&(a|=2),s.allowImportExportEverywhere&&(a|=8),s.allowSuperOutsideMethod&&(a|=16),s.allowUndeclaredExports&&(a|=64),s.allowNewTargetOutsideFunction&&(a|=4),s.allowYieldOutsideFunction&&(a|=32),s.ranges&&(a|=128),s.tokens&&(a|=256),s.createImportExpressions&&(a|=512),s.createParenthesizedExpressions&&(a|=1024),s.errorRecovery&&(a|=2048),s.attachComment&&(a|=4096),s.annexB&&(a|=8192),this.optionFlags=a}getScopeHandler(){return mr}parse(){this.enterInitialScopes();let e=this.startNode(),t=this.startNode();this.nextToken(),e.errors=null;let r=this.parseTopLevel(e,t);return r.errors=this.state.errors,r.comments.length=this.state.commentsLen,r}};function tde(o,e){var t;if(((t=e)==null?void 0:t.sourceType)==="unambiguous"){e=Object.assign({},e);try{e.sourceType="module";let r=dr(e,o),s=r.parse();if(r.sawUnambiguousESM)return s;if(r.ambiguousScriptDifferentAst)try{return e.sourceType="script",dr(e,o).parse()}catch{}else s.program.sourceType="script";return s}catch(r){try{return e.sourceType="script",dr(e,o).parse()}catch{}throw r}}else return dr(e,o).parse()}function ode(o,e){let t=dr(e,o);return t.options.strictMode&&(t.state.strict=!0),t.getExpression()}function rde(o){let e={};for(let t of Object.keys(o))e[t]=Ct(o[t]);return e}var sde=rde(ope);function dr(o,e){let t=Ys,r=new Map;if(o!=null&&o.plugins){for(let s of o.plugins){let a,p;typeof s=="string"?a=s:[a,p]=s,r.has(a)||r.set(a,p||{})}Qpe(r),t=nde(r)}return new t(o,e,r)}var jh=new Map;function nde(o){let e=[];for(let s of Jpe)o.has(s)&&e.push(s);let t=e.join("|"),r=jh.get(t);if(!r){r=Ys;for(let s of e)r=ef[s](r);jh.set(t,r)}return r}fr.parse=tde;fr.parseExpression=ode;fr.tokTypes=sde});import{Command as Ide}from"commander";import{existsSync as Hf}from"fs";import{homedir as $p}from"os";import{dirname as Wf,join as on}from"path";import{fileURLToPath as $f}from"url";import{agents as Gf,detectGlobalAgents as Gp,upsertServer as Kf}from"add-mcp";import{createHash as Nf,randomUUID as _p}from"crypto";import{chmodSync as _f,existsSync as Bf,lstatSync as en,mkdirSync as Js,readFileSync as Vp,readdirSync as Up,renameSync as Zs,writeFileSync as Bp}from"fs";import{dirname as Ar,join as dt}from"path";var tn=".cueframe-install.json";function Hp(o){return Nf("sha256").update(o).digest("hex")}function jp(o){let e=new Map;function t(r){let s=dt(o,r),a=en(s);if(a.isSymbolicLink())throw new Error(`Skill package contains a symbolic link: ${s}`);if(a.isDirectory())for(let p of Up(s).sort())!r&&p===tn||t(r?`${r}/${p}`:p);else if(a.isFile())e.set(r,{bytes:Vp(s),mode:a.mode&511});else throw new Error(`Unsupported skill package entry: ${s}`)}return t(""),e}function Xs(o){return Object.fromEntries([...o].map(([e,t])=>[e,`${t.mode}:${Hp(t.bytes)}`]))}function jf(o,e){let t=Object.keys(o).sort();return JSON.stringify(t)===JSON.stringify(Object.keys(e).sort())&&t.every(r=>o[r]===e[r])}function Vf(o,e){try{let t=dt(o,tn);if(!en(t).isFile())return;let r=JSON.parse(Vp(t,"utf8"));return r.version!==1||typeof r.sourceHash!="string"||!r.files||!jf(r.files,Xs(e))?void 0:r}catch{return}}function Uf(o,e){let t=`> Installed ${e} by \`npx -y cueframe install\`. Run it again to refresh
|
|
2
|
+
import{A as P,B as Y,C as ze,D as G,E as Dd,a as xe,b as zd,c as ge,d as Me,e as jd,f as Pd,g as Od,h as pn,i as gn,j as Ve,k as bt,l as Ed,m as lr,n as x,o as O,p as Q,q as k,r as kt,s as Ud,t as vn,u as hn,v as T,w as X,x as ee,y as S,z as Z}from"./chunk-U3YHQOER.js";import{a as Te}from"./chunk-3QSA3EBY.js";import{Command as Ix}from"commander";import{existsSync as lh}from"fs";import{homedir as Fd}from"os";import{dirname as dh,join as Jo}from"path";import{fileURLToPath as mh}from"url";import{agents as fh,detectGlobalAgents as Md,upsertServer as ph}from"add-mcp";import{createHash as ih,randomUUID as Ad}from"crypto";import{chmodSync as oh,existsSync as ah,lstatSync as Mo,mkdirSync as Zo,readFileSync as Cd,readdirSync as Rd,renameSync as Lo,writeFileSync as Nd}from"fs";import{dirname as $n,join as Ee}from"path";var Vo=".cueframe-install.json";function Zd(e){return ih("sha256").update(e).digest("hex")}function Td(e){let t=new Map;function i(o){let r=Ee(e,o),n=Mo(r);if(n.isSymbolicLink())throw new Error(`Skill package contains a symbolic link: ${r}`);if(n.isDirectory())for(let a of Rd(r).sort())!o&&a===Vo||i(o?`${o}/${a}`:a);else if(n.isFile())t.set(o,{bytes:Cd(r),mode:n.mode&511});else throw new Error(`Unsupported skill package entry: ${r}`)}return i(""),t}function Fo(e){return Object.fromEntries([...e].map(([t,i])=>[t,`${i.mode}:${Zd(i.bytes)}`]))}function sh(e,t){let i=Object.keys(e).sort();return JSON.stringify(i)===JSON.stringify(Object.keys(t).sort())&&i.every(o=>e[o]===t[o])}function ch(e,t){try{let i=Ee(e,Vo);if(!Mo(i).isFile())return;let o=JSON.parse(Cd(i,"utf8"));return o.version!==1||typeof o.sourceHash!="string"||!o.files||!sh(o.files,Fo(t))?void 0:o}catch{return}}function uh(e,t){let i=`> Installed ${t} by \`npx -y cueframe install\`. Run it again to refresh
|
|
10
3
|
> unchanged managed skills. Locally edited or untracked packages are preserved;
|
|
11
4
|
> inspect reported conflicts before using \`--force\` (which makes a backup).
|
|
12
|
-
`,
|
|
13
|
-
${
|
|
14
|
-
${
|
|
15
|
-
`),
|
|
16
|
-
`).map(
|
|
17
|
-
`)||
|
|
18
|
-
`;
|
|
5
|
+
`,o=e.match(/^---\r?\n[\s\S]*?\r?\n---\r?\n/);return o?`${o[0]}
|
|
6
|
+
${i}${e.slice(o[0].length)}`:`${i}
|
|
7
|
+
${e}`}function Ld(e,t,i={}){let o={installed:[],unchanged:[],skipped:[],backups:[]},r=i.today??new Date().toISOString().slice(0,10),n=Rd(e).sort().flatMap(a=>{let s=Ee(e,a);if(!ah(Ee(s,"SKILL.md")))return[];let u=Td(s),c=Zd(JSON.stringify(Fo(u))),l=u.get("SKILL.md");return u.set("SKILL.md",{...l,bytes:Buffer.from(uh(l.bytes.toString("utf8"),r))}),[{name:a,files:u,sourceHash:c}]});for(let a of new Set(t))for(let{name:s,files:u,sourceHash:c}of n){let l=Ee(a,s),d=Ee(l,"SKILL.md"),m=!1;try{Mo(l),m=!0}catch(b){if(b.code!=="ENOENT")throw b}if(m&&!i.force){let b;try{b=ch(l,Td(l))}catch{}if(!b){o.skipped.push(d);continue}if(b.sourceHash===c){o.unchanged.push(d);continue}}let f=Ee($n(a),"cueframe-skill-staging",`${s}-${Ad()}`);for(let[b,E]of u){let z=Ee(f,b);Zo($n(z),{recursive:!0}),Nd(z,E.bytes),oh(z,E.mode)}let v={version:1,sourceHash:c,files:Fo(u)};Nd(Ee(f,Vo),JSON.stringify(v,null,2)+`
|
|
8
|
+
`),Zo(a,{recursive:!0});let h;m&&(h=Ee($n(a),"cueframe-skill-backups",`${s}-${Ad()}`),Zo($n(h),{recursive:!0}),Lo(l,h));try{Lo(f,l)}catch(b){throw h&&Lo(h,l),b}h&&o.backups.push({skill:d,path:h}),o.installed.push(d)}return o}var yn="cueframe",gh=Jo(dh(mh(import.meta.url)),"skills");function vh(e){return(fh[e]?.supportedTransports??[]).includes("http")}async function hh(e){return(await Md()).map(i=>{if(!vh(i))return{agent:i,wired:!1,error:"speaks stdio only \u2014 CueFrame\u2019s MCP server is remote HTTP"};try{let o=ph(i,yn,{type:"http",url:e});return{agent:i,wired:o.success,path:o.path,error:o.error}}catch(o){return{agent:i,wired:!1,error:o instanceof Error?o.message:String(o)}}})}async function Vd(e,t=gh){let i=`${kt(e.target)}/v1/mcp`,o=[Jo(Fd(),".agents","skills"),Jo(Fd(),".claude","skills")];if(e.dryRun){let c=await Md();Z(e,{ok:!0,dryRun:!0,mcpUrl:i,wouldWire:c,serverName:yn,skillDirectories:o},()=>{console.log(`Would wire MCP server "${yn}" \u2192 ${i} into:`),c.length===0&&console.log(" (no agents detected on this machine)");for(let l of c)console.log(` \u2192 ${l}`);console.log("Would install/refresh CueFrame skills in ~/.agents/skills and ~/.claude/skills"),console.log("Dry run \u2014 nothing was written.")});return}lh(t)||(P(e,"install",new Error("Bundled skills/ directory not found"),x.UserError),k(x.UserError));let r=await hh(i),{installed:n,unchanged:a,skipped:s,backups:u}=Ld(t,o,e);n.length===0&&a.length===0&&s.length===0&&r.length===0&&(P(e,"install",new Error("No agents detected and no skills found \u2014 nothing to install"),x.UserError),k(x.UserError)),Z(e,{ok:!0,mcpUrl:i,agents:r,skills:n,unchanged:a,skipped:s,backups:u,skillDirectories:o},()=>{if(console.log(`\u2713 CueFrame MCP server (${i})`),r.length===0)console.log(" No agents detected on this machine. Add it manually:"),console.log(` claude mcp add --transport http ${yn} ${i}`),console.log(` \u2026or add the MCP server ${i} as a custom connector.`);else for(let c of r)console.log(c.wired?` \u2192 wired ${c.agent}`:` \u2717 ${c.agent}: ${c.error??"failed"}`);if(console.log(`\u2713 Installed/refreshed ${n.length} CueFrame skill copies in ~/.agents/skills and ~/.claude/skills`),a.length>0&&console.log(` ${a.length} already current`),s.length>0){console.log(` ${s.length} preserved (locally changed or untracked; review before --force)`);for(let c of s)console.log(` ${c}`)}for(let c of u)console.log(` Backup: ${c.path}`);console.log(""),console.log("Next: ask your agent to make a video \u2014 it opens a browser to authorize on"),console.log("first call. No API key needed."),console.log("Restart your agent session to load the MCP server and skills."),console.log(""),console.log("This installed no `cueframe` binary \u2014 npx leaves nothing on your PATH."),console.log("Prefer the terminal? Every command runs as `npx -y cueframe \u2026`:"),console.log(" npx -y cueframe login")})}import{existsSync as Bo,mkdirSync as $h,readFileSync as Bd,writeFileSync as Ko}from"fs";import{join as Wo}from"path";var Jd="cueframe.json",yh="cueframe/components",_n=".cueframe/";function _h(e,t){let i=Wo(e,".gitignore");if(Bo(i)){let o=Bd(i,"utf8"),r=o.split(`
|
|
9
|
+
`).map(n=>n.trim());if(r.includes(_n)||r.includes(".cueframe"))return!1;if(!t){let n=o.endsWith(`
|
|
10
|
+
`)||o.length===0?"":`
|
|
11
|
+
`;Ko(i,`${o}${n}
|
|
19
12
|
# CueFrame derived render cache (regenerated; never authored)
|
|
20
|
-
${
|
|
21
|
-
`)}return!0}return
|
|
22
|
-
${
|
|
23
|
-
`),!0}function
|
|
24
|
-
`);let p=nn(e,a),u=rn(p);!u&&!t&&Jf(p,{recursive:!0});let f=Xf(e,t);se(o,{ok:!0,dryRun:t,root:e,manifest:{path:r,created:!s},componentsDir:a,componentsDirCreated:!u,gitignoreUpdated:f},()=>{console.log(`\u2713 ${t?"Would initialize":"Initialized"} CueFrame workspace at ${e}`),console.log(` ${s?"kept":"created"} ${qp} (componentsDir: ${a})`),console.log(` ${u?"exists":"created"} ${a}/`),f&&console.log(` gitignored ${zr}`),console.log("Next: cueframe new component <name>")})}import{existsSync as Sx,mkdirSync as zx,readFileSync as Tx,readdirSync as Ex,writeFileSync as ad}from"fs";import{join as cd}from"path";import{existsSync as Tr,readFileSync as ex,readdirSync as tx,statSync as ox}from"fs";import{dirname as rx,join as Zt,parse as sx}from"path";var nx="cueframe/components";var ix="cueframe.json",ax=d.object({componentsDir:d.string().min(1).default(nx)}).passthrough();function Io(o){let e=o,t=sx(e).root;for(;;){let r=Zt(e,ix);if(Tr(r)){let s=ex(r,"utf8"),a=ax.parse(JSON.parse(s));return{root:e,manifest:a}}if(e===t)return null;e=rx(e)}}function Jp(o){return Zt(o.root,o.manifest.componentsDir)}function Er(o,e){return Zt(Jp(o),e)}function Zp(o){let e=Jp(o);return Tr(e)?tx(e).filter(t=>{let r=Zt(e,t);return ox(r).isDirectory()?Tr(Zt(r,"index.tsx"))&&Tr(Zt(r,"config.ts")):!1}).sort():[]}import{existsSync as bx,readFileSync as yx}from"fs";import{join as Ax}from"path";var an=2,cx=2,Cr=2,cn=d.enum(["image","video","audio","data"]),px=d.union([d.literal(256),d.literal(512),d.literal(1024),d.literal(2048)]),dx=d.discriminatedUnion("mode",[d.object({mode:d.literal("original")}).strict(),d.object({mode:d.literal("tier"),tier:px}).strict(),d.object({mode:d.literal("auto"),maxProjectedWidthRatio:d.number().positive().max(64),maxProjectedHeightRatio:d.number().positive().max(64),minVisibleSourceWidthRatio:d.number().positive().max(1).default(1),minVisibleSourceHeightRatio:d.number().positive().max(1).default(1)}).strict()]),lx=d.object({kind:cn,required:d.boolean(),mimeTypes:d.array(d.string().min(1)).min(1).optional(),mediaDemand:dx.optional()}).strict(),Xp=d.enum(["canvas2d","webgl","webgl2","webgpu"]),pn=d.object({api:Xp,required:d.literal(!0),accelerationPreference:d.enum(["hardware-preferred","software-allowed"])}).strict(),ed=d.object({version:d.literal(2)}).strict(),td=d.enum(["angle","angle-egl","swangle","vulkan"]),od=d.object({glBackend:td,colorPipeline:d.literal("srgb"),sceneShot:ed.nullable()}).strict(),ux=d.object({webgl:d.string().min(1),renderer:d.string(),maxTextureSize:d.number().int().positive(),halfFloatColorTarget:d.string().min(1),glBackend:td}).strict(),mx=d.object({loadedRuntimeIdentity:d.string().min(1),loadedDependencyIdentity:d.string().min(1),observedRasterAffectingFlags:d.object({browserArguments:d.array(d.string().min(1))}).strict(),browserProduct:d.string().min(1),browserVersion:d.string().min(1),browserExecutableSha256:d.string().regex(/^[a-f0-9]{64}$/),headless:d.boolean(),os:d.string().min(1),arch:d.string().min(1),deviceScaleFactor:d.number().positive(),colorProfile:d.string().min(1),actualGlBackend:d.string().min(1),actualRenderer:d.string().min(1),gpuIdentity:d.string().min(1).nullable()}).strict(),Qde=mx.omit({deviceScaleFactor:!0}).strict(),Jde=d.object({handle:d.string().min(1),mimeType:d.literal("image/png"),byteLength:d.number().int().positive(),width:d.number().int().positive(),height:d.number().int().positive(),encodedSha256:d.string().regex(/^[a-f0-9]{64}$/)}).strict(),Zde=d.object({sessionId:d.string().uuid(),requestId:d.number().int().nonnegative(),frame:d.number().int().nonnegative(),deviceScaleFactor:d.number().positive()}).strict(),Ir=d.object({version:d.literal(an),assets:d.record(d.string().min(1),lx),graphics:pn,alphaPolicy:d.enum(["requires-transparency","allows-opaque"]),sceneShot:ed.optional()}).strict(),rd=Object.freeze({version:an,assets:Object.freeze({}),graphics:Object.freeze({api:"canvas2d",required:!0,accelerationPreference:"software-allowed"}),alphaPolicy:"requires-transparency"}),Rr=d.object({version:d.literal(an),componentId:d.string().min(1).max(128).regex(/^[a-z0-9][a-z0-9._-]*$/),tsxSource:d.string().min(1),manifest:Ir}).strict(),sd=d.object({handle:d.string().min(1).max(256),kind:cn,mimeType:d.string().min(1),contentSha256:d.string().regex(/^[a-f0-9]{64}$/),width:d.number().int().positive().optional(),height:d.number().int().positive().optional(),durationSec:d.number().positive().optional(),frameRate:d.number().positive().optional()}).strict(),hx=d.object({handle:d.string().min(1).max(256),kind:cn,mimeType:d.string().min(1),width:d.number().int().positive().optional(),height:d.number().int().positive().optional(),durationSec:d.number().positive().optional(),frameRate:d.number().positive().optional()}).strict(),fx=d.object({path:d.string().min(1)}).strict(),Xde=d.object({version:d.literal(cx),bundleId:d.string().regex(/^[a-f0-9]{64}$/),sourceVersionId:d.string().regex(/^[a-f0-9]{64}$/),runtimeDigest:d.string().min(1),dependencyLockDigest:d.string().regex(/^[a-f0-9]{64}$/),entrypoint:d.string().min(1),manifest:Ir}).strict(),ele=d.object({version:d.literal(Cr),bundleId:d.string().regex(/^[a-f0-9]{64}$/),params:d.record(d.string(),d.unknown()),assets:d.record(d.string().min(1),sd),width:d.number().int().positive(),height:d.number().int().positive(),fps:d.number().positive(),durationInFrames:d.number().int().positive(),alpha:d.boolean(),graphics:pn,seed:d.string().min(1),renderer:od}).strict(),tle=d.object({version:d.literal(Cr),source:Rr,params:d.record(d.string(),d.unknown()),assets:d.record(d.string().min(1),sd),width:d.number().int().positive(),height:d.number().int().positive(),fps:d.number().positive(),durationInFrames:d.number().int().positive(),codec:d.enum(["vp9","prores"]),runtimeDigest:d.string().min(1),dependencyLockDigest:d.string().regex(/^[a-f0-9]{64}$/),seed:d.string().min(1)}).strict(),ole=d.object({version:d.literal(Cr),source:Rr,params:d.record(d.string(),d.unknown()),assets:d.record(d.string().min(1),hx),assetFiles:d.record(d.string().min(1),fx),width:d.number().int().positive(),height:d.number().int().positive(),fps:d.number().positive(),durationInFrames:d.number().int().positive(),codec:d.enum(["vp9","prores"]),runtimeDigest:d.string().min(1),dependencyLockDigest:d.string().regex(/^[a-f0-9]{64}$/),seed:d.string().min(1)}).strict();var xx=d.object({api:Xp,acceleration:d.enum(["hardware","software"]),adapterName:d.string().min(1).optional(),deviceLost:d.literal(!1)}).strict(),rle=d.object({version:d.literal(Cr),artifactId:d.string().regex(/^[a-f0-9]{64}$/),renderKey:d.string().regex(/^[a-f0-9]{64}$/),bundleId:d.string().regex(/^[a-f0-9]{64}$/),sourceVersionId:d.string().regex(/^[a-f0-9]{64}$/),runtimeDigest:d.string().min(1),outputSha256:d.string().regex(/^[a-f0-9]{64}$/),outputBytes:d.number().int().positive(),codec:d.enum(["png","vp9","prores"]),width:d.number().int().positive(),height:d.number().int().positive(),fps:d.number().positive(),durationInFrames:d.number().int().positive(),alpha:d.boolean(),requestedGraphics:pn,actualGraphics:xx,renderer:od,host:ux.nullable()}).strict(),gx=["invalid_component_source","unsupported_runtime_version","component_does_not_compile","component_runtime_error","component_deadline_exceeded","component_resource_exhausted","component_asset_undeclared","component_asset_unavailable","component_asset_integrity_failed","component_network_denied","component_import_denied","component_api_mismatch","component_graphics_unavailable","component_graphics_mismatch","component_device_lost","component_output_invalid","component_output_unverifiable","component_conflict","component_scene_invalid"],sle=d.enum(gx),Ot=class extends Error{code;retryable;locator;constructor(e,t,r){super(t,r?.cause===void 0?void 0:{cause:r.cause}),this.name="ComponentRuntimeError",this.code=e,this.retryable=r?.retryable??!1,r?.locator&&(this.locator=r.locator)}};var nd=rd;function dn(o,e,t){let r=Ir.safeParse(o);if(!r.success)throw Object.assign(new Error(`Component "${e}" has no valid contract-v2 manifest at ${t}.`),{code:"no_component_manifest"});return r.data}function id(o,e){let t=Ax(o.root,"cueframe.json");if(!bx(t))throw Object.assign(new Error("No cueframe.json workspace manifest was found."),{code:"no_component_manifest"});let r=JSON.parse(yx(t,"utf8"));return dn(r.components?.[e]?.manifest,e,`cueframe.json components.${e}.manifest`)}var Cx="cueframe.json";function Ix(o){return o.split(/[^a-zA-Z0-9]+/).filter(Boolean).map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join("")}function Rx(o){return o.split(/[^a-zA-Z0-9]+/).filter(Boolean).map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}function ln(o,e){K(o,"new_component",new Error(e),B.UserError),N(B.UserError)}function wx(o,e){return`import React from 'react';
|
|
13
|
+
${_n}
|
|
14
|
+
`)}return!0}return t||Ko(i,`# CueFrame derived render cache (regenerated; never authored)
|
|
15
|
+
${_n}
|
|
16
|
+
`),!0}function Kd(e){let t=process.cwd(),i=e.dryRun??!1;S(e,"init_prepare",{cwd:t,dryRun:i});let o=Wo(t,Jd),r=Bo(o),n=yh;if(r)try{let c=JSON.parse(Bd(o,"utf8"));typeof c.componentsDir=="string"&&c.componentsDir.length>0&&(n=c.componentsDir)}catch{}else i||Ko(o,`${JSON.stringify({componentsDir:n},null,2)}
|
|
17
|
+
`);let a=Wo(t,n),s=Bo(a);!s&&!i&&$h(a,{recursive:!0});let u=_h(t,i);Z(e,{ok:!0,dryRun:i,root:t,manifest:{path:o,created:!r},componentsDir:n,componentsDirCreated:!s,gitignoreUpdated:u},()=>{console.log(`\u2713 ${i?"Would initialize":"Initialized"} CueFrame workspace at ${t}`),console.log(` ${r?"kept":"created"} ${Jd} (componentsDir: ${n})`),console.log(` ${s?"exists":"created"} ${n}/`),u&&console.log(` gitignored ${_n}`),console.log("Next: cueframe new component <name>")})}import{existsSync as yk,mkdirSync as _k,readFileSync as bk,readdirSync as kk,writeFileSync as Hg}from"fs";import{join as Yg}from"path";import{existsSync as jo,readFileSync as ck,readdirSync as uk,statSync as lk}from"fs";import{dirname as dk,join as cr,parse as mk}from"path";var ln={};Te(ln,{$brand:()=>sa,$input:()=>Uc,$output:()=>Ec,INVALID:()=>me,NEVER:()=>aa,TimePrecision:()=>Vc,ZodAny:()=>Ol,ZodArray:()=>Al,ZodBase64:()=>$o,ZodBase64URL:()=>yo,ZodBigInt:()=>or,ZodBigIntFormat:()=>ko,ZodBoolean:()=>ir,ZodCIDRv4:()=>vo,ZodCIDRv6:()=>ho,ZodCUID:()=>co,ZodCUID2:()=>uo,ZodCatch:()=>td,ZodCodec:()=>on,ZodCompileAsyncError:()=>Pe,ZodCompileUnsupportedError:()=>L,ZodCreditCard:()=>kl,ZodCustom:()=>an,ZodCustomStringFormat:()=>yt,ZodDate:()=>Yr,ZodDefault:()=>ql,ZodDiscriminatedUnion:()=>Tl,ZodE164:()=>_o,ZodEmail:()=>io,ZodEmoji:()=>ao,ZodEnum:()=>tr,ZodError:()=>Tb,ZodExactOptional:()=>So,ZodFile:()=>Bl,ZodFirstPartyTypeKind:()=>gd,ZodFunction:()=>dd,ZodGUID:()=>oo,ZodIBAN:()=>xl,ZodIPv4:()=>po,ZodIPv6:()=>go,ZodISODate:()=>Qe,ZodISODateTime:()=>Ye,ZodISODuration:()=>tt,ZodISOTime:()=>et,ZodInstanceOf:()=>pd,ZodIntersection:()=>Cl,ZodIssueCode:()=>Zb,ZodJWT:()=>bo,ZodKSUID:()=>fo,ZodLazy:()=>cd,ZodLiteral:()=>Jl,ZodMAC:()=>bl,ZodMap:()=>Ml,ZodNaN:()=>nd,ZodNanoID:()=>so,ZodNever:()=>Ul,ZodNonOptional:()=>zo,ZodNull:()=>jl,ZodNullable:()=>Gl,ZodNumber:()=>nr,ZodNumberFormat:()=>_t,ZodObject:()=>en,ZodOptional:()=>rn,ZodPipe:()=>nn,ZodPrefault:()=>Hl,ZodPreprocess:()=>id,ZodPromise:()=>ld,ZodReadonly:()=>od,ZodRealError:()=>_e,ZodRecord:()=>er,ZodSet:()=>Vl,ZodString:()=>rr,ZodStringFormat:()=>K,ZodSuccess:()=>ed,ZodSymbol:()=>Sl,ZodTemplateLiteral:()=>sd,ZodTransform:()=>Kl,ZodTuple:()=>Zl,ZodType:()=>C,ZodULID:()=>lo,ZodURL:()=>Hr,ZodUUID:()=>Ne,ZodUndefined:()=>zl,ZodUnion:()=>tn,ZodUnknown:()=>El,ZodVoid:()=>Dl,ZodXID:()=>mo,ZodXor:()=>Nl,_ZodString:()=>no,_default:()=>Xl,_function:()=>zg,any:()=>ig,array:()=>Qr,base64:()=>Rp,base64url:()=>Zp,bigint:()=>Qp,boolean:()=>Il,catch:()=>rd,check:()=>jg,cidrv4:()=>Tp,cidrv6:()=>Cp,clone:()=>M,codec:()=>xg,coerce:()=>hd,compile:()=>Tc,config:()=>H,core:()=>Fe,creditCard:()=>Fp,cuid:()=>jp,cuid2:()=>Pp,currencyCode:()=>Wp,custom:()=>Pg,date:()=>ag,decode:()=>pl,decodeAsync:()=>vl,deepPartial:()=>Mg,describe:()=>Og,discriminatedUnion:()=>mg,e164:()=>Lp,email:()=>$p,emoji:()=>Sp,encode:()=>fl,encodeAsync:()=>gl,endsWith:()=>Vt,enum:()=>wo,exactOptional:()=>Wl,file:()=>yg,flattenError:()=>_r,float32:()=>qp,float64:()=>Xp,formatError:()=>br,fromJSONSchema:()=>Lg,function:()=>zg,getDiscriminatedOption:()=>oc,getErrorMap:()=>Fb,globalRegistry:()=>se,gt:()=>De,gte:()=>ke,guid:()=>yp,hash:()=>Gp,hex:()=>Kp,hostname:()=>Bp,httpUrl:()=>Ip,iban:()=>Mp,includes:()=>Ft,input:()=>Jg,instanceof:()=>Ug,int:()=>to,int32:()=>Hp,int64:()=>eg,intersection:()=>Rl,invertCodec:()=>wg,ipv4:()=>Dp,ipv6:()=>Np,iso:()=>sn,json:()=>Ag,jwt:()=>Vp,keyof:()=>sg,ksuid:()=>Up,lazy:()=>ud,length:()=>pt,literal:()=>$g,locales:()=>Fr,looseObject:()=>lg,looseRecord:()=>pg,lowercase:()=>Zt,lt:()=>Ue,lte:()=>be,mac:()=>Ap,map:()=>gg,maxLength:()=>ft,maxSize:()=>Ge,memoizer:()=>Zr,meta:()=>Eg,mime:()=>Bt,minLength:()=>Le,minSize:()=>Ae,multipleOf:()=>We,nan:()=>kg,nanoid:()=>zp,nativeEnum:()=>hg,negative:()=>Ji,never:()=>xo,nonnegative:()=>Ki,nonoptional:()=>Ql,nonpositive:()=>Bi,normalize:()=>Kt,null:()=>Pl,nullable:()=>Xr,nullish:()=>_g,number:()=>wl,object:()=>cg,optional:()=>ht,output:()=>Bg,overwrite:()=>Oe,parse:()=>ul,parseAsync:()=>ll,partialRecord:()=>fg,pipe:()=>ro,positive:()=>Vi,prefault:()=>Yl,preprocess:()=>Ng,prettifyError:()=>ma,promise:()=>Sg,properties:()=>Jt,property:()=>Wi,readonly:()=>ad,record:()=>Fl,refine:()=>md,regex:()=>Rt,regexes:()=>Se,registry:()=>$i,safeDecode:()=>$l,safeDecodeAsync:()=>_l,safeEncode:()=>hl,safeEncodeAsync:()=>yl,safeParse:()=>dl,safeParseAsync:()=>ml,set:()=>vg,setErrorMap:()=>Lb,size:()=>mt,slugify:()=>Xt,startsWith:()=>Mt,strictObject:()=>ug,string:()=>qr,stringFormat:()=>Jp,stringbool:()=>Dg,success:()=>bg,superRefine:()=>fd,symbol:()=>rg,templateLiteral:()=>Ig,toJSONSchema:()=>Hi,toLowerCase:()=>Gt,toUpperCase:()=>qt,toZod:()=>dr,transform:()=>Io,treeifyError:()=>da,trim:()=>Wt,tuple:()=>Ll,uint32:()=>Yp,uint64:()=>tg,ulid:()=>Op,undefined:()=>ng,union:()=>ar,unknown:()=>vt,uppercase:()=>Lt,url:()=>wp,util:()=>$,uuid:()=>_p,uuidv4:()=>bp,uuidv6:()=>kp,uuidv7:()=>xp,validate:()=>kr,validateAsync:()=>xr,void:()=>og,withParser:()=>yi,xid:()=>Ep,xor:()=>dg});var Fe={};Te(Fe,{$ZodAny:()=>Hs,$ZodArray:()=>rc,$ZodAsyncError:()=>$e,$ZodBase64:()=>Zs,$ZodBase64URL:()=>Ls,$ZodBigInt:()=>ii,$ZodBigIntFormat:()=>Ws,$ZodBoolean:()=>Dr,$ZodCIDRv4:()=>Cs,$ZodCIDRv6:()=>Rs,$ZodCUID:()=>Is,$ZodCUID2:()=>Ss,$ZodCatch:()=>bc,$ZodCheck:()=>W,$ZodCheckBigIntFormat:()=>Ya,$ZodCheckEndsWith:()=>ls,$ZodCheckGreaterThan:()=>Mn,$ZodCheckIncludes:()=>cs,$ZodCheckLengthEquals:()=>is,$ZodCheckLessThan:()=>Fn,$ZodCheckLowerCase:()=>as,$ZodCheckMaxLength:()=>rs,$ZodCheckMaxSize:()=>Qa,$ZodCheckMimeType:()=>fs,$ZodCheckMinLength:()=>ns,$ZodCheckMinSize:()=>es,$ZodCheckMultipleOf:()=>Xa,$ZodCheckNumberFormat:()=>Ha,$ZodCheckOverwrite:()=>ps,$ZodCheckProperties:()=>ms,$ZodCheckProperty:()=>ds,$ZodCheckRegex:()=>os,$ZodCheckSizeEquals:()=>ts,$ZodCheckStartsWith:()=>us,$ZodCheckStringFormat:()=>Dt,$ZodCheckUpperCase:()=>ss,$ZodCodec:()=>Nr,$ZodCreditCard:()=>Ms,$ZodCustom:()=>jc,$ZodCustomStringFormat:()=>Bs,$ZodCyclicError:()=>di,$ZodDate:()=>tc,$ZodDefault:()=>hc,$ZodDiscriminatedUnion:()=>ac,$ZodE164:()=>Fs,$ZodEmail:()=>ys,$ZodEmoji:()=>xs,$ZodEncodeError:()=>Ke,$ZodEnum:()=>dc,$ZodError:()=>la,$ZodExactOptional:()=>gc,$ZodFile:()=>fc,$ZodFunction:()=>Sc,$ZodGUID:()=>hs,$ZodIBAN:()=>Vs,$ZodIPv4:()=>As,$ZodIPv6:()=>Ns,$ZodISODate:()=>Es,$ZodISODateTime:()=>Os,$ZodISODuration:()=>Ds,$ZodISOTime:()=>Us,$ZodIntersection:()=>sc,$ZodJWT:()=>Js,$ZodKSUID:()=>Ps,$ZodLazy:()=>Tr,$ZodLiteral:()=>mc,$ZodMAC:()=>Ts,$ZodMap:()=>uc,$ZodNaN:()=>kc,$ZodNanoID:()=>ws,$ZodNever:()=>Qs,$ZodNonOptional:()=>yc,$ZodNull:()=>Xs,$ZodNullable:()=>vc,$ZodNumber:()=>ni,$ZodNumberFormat:()=>Ks,$ZodObject:()=>zm,$ZodObjectJIT:()=>nc,$ZodOptional:()=>ai,$ZodPipe:()=>si,$ZodPrefault:()=>$c,$ZodPreprocess:()=>xc,$ZodPromise:()=>zc,$ZodReadonly:()=>wc,$ZodRealError:()=>ye,$ZodRecord:()=>cc,$ZodRegistry:()=>hi,$ZodSet:()=>lc,$ZodString:()=>st,$ZodStringFormat:()=>V,$ZodSuccess:()=>_c,$ZodSymbol:()=>Gs,$ZodTemplateLiteral:()=>Ic,$ZodTransform:()=>pc,$ZodTuple:()=>oi,$ZodType:()=>N,$ZodULID:()=>zs,$ZodURL:()=>ks,$ZodUUID:()=>$s,$ZodUndefined:()=>qs,$ZodUnion:()=>Ar,$ZodUnknown:()=>Ys,$ZodVoid:()=>ec,$ZodXID:()=>js,$ZodXor:()=>ic,$brand:()=>sa,$constructor:()=>p,$input:()=>Uc,$output:()=>Ec,Doc:()=>at,INVALID:()=>me,JSONSchema:()=>gp,JSONSchemaGenerator:()=>Yi,NEVER:()=>aa,TimePrecision:()=>Vc,URL_BAD_FORMAT:()=>_s,URL_UNPARSEABLE:()=>jr,ZodCompileAsyncError:()=>Pe,ZodCompileUnsupportedError:()=>L,_any:()=>au,_array:()=>fu,_base64:()=>Zi,_base64url:()=>Li,_bigint:()=>Qc,_boolean:()=>Hc,_catch:()=>wb,_check:()=>Qf,_cidrv4:()=>Ci,_cidrv6:()=>Ri,_coercedBigint:()=>eu,_coercedBoolean:()=>Yc,_coercedDate:()=>du,_coercedNumber:()=>Bc,_coercedString:()=>Zc,_creditCard:()=>Fc,_cuid:()=>Oi,_cuid2:()=>Ei,_custom:()=>gu,_date:()=>lu,_decode:()=>On,_decodeAsync:()=>Un,_default:()=>bb,_discriminatedUnion:()=>ub,_e164:()=>Fi,_email:()=>ki,_emoji:()=>ji,_encode:()=>Pn,_encodeAsync:()=>En,_endsWith:()=>Vt,_enum:()=>gb,_file:()=>pu,_float32:()=>Wc,_float64:()=>Gc,_gt:()=>De,_gte:()=>ke,_guid:()=>xi,_iban:()=>Mc,_includes:()=>Ft,_int:()=>Kc,_int32:()=>qc,_int64:()=>tu,_intersection:()=>lb,_ipv4:()=>Ni,_ipv6:()=>Ti,_isoDate:()=>Jr,_isoDateTime:()=>Vr,_isoDuration:()=>Kr,_isoTime:()=>Br,_jwt:()=>Mi,_ksuid:()=>Ai,_lazy:()=>jb,_length:()=>pt,_literal:()=>hb,_lowercase:()=>Zt,_lt:()=>Ue,_lte:()=>be,_mac:()=>Lc,_map:()=>fb,_max:()=>be,_maxLength:()=>ft,_maxSize:()=>Ge,_mime:()=>Bt,_min:()=>ke,_minLength:()=>Le,_minSize:()=>Ae,_multipleOf:()=>We,_nan:()=>mu,_nanoid:()=>Pi,_nativeEnum:()=>vb,_negative:()=>Ji,_never:()=>cu,_nonnegative:()=>Ki,_nonoptional:()=>kb,_nonpositive:()=>Bi,_normalize:()=>Kt,_null:()=>ou,_nullable:()=>_b,_number:()=>Jc,_optional:()=>yb,_overwrite:()=>Oe,_parse:()=>Pt,_parseAsync:()=>Ot,_pipe:()=>Ib,_positive:()=>Vi,_promise:()=>Pb,_properties:()=>Jt,_property:()=>Wi,_readonly:()=>Sb,_record:()=>mb,_refine:()=>vu,_regex:()=>Rt,_safeDecode:()=>An,_safeDecodeAsync:()=>Tn,_safeEncode:()=>Dn,_safeEncodeAsync:()=>Nn,_safeParse:()=>Et,_safeParseAsync:()=>Ut,_set:()=>pb,_size:()=>mt,_slugify:()=>Xt,_startsWith:()=>Mt,_string:()=>Rc,_stringFormat:()=>gt,_stringbool:()=>_u,_success:()=>xb,_superRefine:()=>hu,_symbol:()=>nu,_templateLiteral:()=>zb,_toLowerCase:()=>Gt,_toUpperCase:()=>qt,_transform:()=>$b,_trim:()=>Wt,_tuple:()=>db,_uint32:()=>Xc,_uint64:()=>ru,_ulid:()=>Ui,_undefined:()=>iu,_union:()=>sb,_unknown:()=>su,_uppercase:()=>Lt,_url:()=>Mr,_uuid:()=>wi,_uuidv4:()=>Ii,_uuidv6:()=>Si,_uuidv7:()=>zi,_void:()=>uu,_xid:()=>Di,_xor:()=>cb,base64Charset:()=>Yn,base64urlCharset:()=>Ur,canParseURL:()=>bs,clone:()=>M,compile:()=>Tc,compileFn:()=>_i,config:()=>H,createStandardJSONSchemaMethod:()=>Ht,createToJSONSchemaMethod:()=>ku,decode:()=>d$,decodeAsync:()=>f$,describe:()=>$u,encode:()=>l$,encodeAsync:()=>m$,extractDefs:()=>Xe,finalize:()=>He,flattenError:()=>_r,formatError:()=>br,getDiscriminatedOption:()=>oc,globalConfig:()=>ie,globalRegistry:()=>se,handleUnrepresentable:()=>te,initializeContext:()=>qe,isBackEdge:()=>fi,isRecursiveSchema:()=>mi,isValidBase64:()=>Er,isValidBase64URL:()=>Qn,isValidCIDRv6:()=>Hn,isValidCreditCard:()=>ei,isValidIBAN:()=>ti,isValidIPv6:()=>Or,isValidJWT:()=>ri,locales:()=>Fr,memoizer:()=>Zr,mergeValues:()=>At,meta:()=>yu,parse:()=>zn,parseAsync:()=>jn,parseURLObject:()=>wm,prettifyError:()=>ma,process:()=>J,processSchema:()=>J,regexes:()=>Se,registry:()=>$i,safeDecode:()=>g$,safeDecodeAsync:()=>h$,safeEncode:()=>p$,safeEncodeAsync:()=>v$,safeParse:()=>o$,safeParseAsync:()=>a$,standardProps:()=>Wn,stripTabAndNewline:()=>Pr,toDotPath:()=>nm,toJSONSchema:()=>Hi,toZod:()=>dr,treeifyError:()=>da,urlHostnameOk:()=>qn,urlProtocolOk:()=>Xn,util:()=>$,validate:()=>kr,validateAsync:()=>xr,validateURL:()=>Gn,version:()=>gs,withParser:()=>yi});var $={};Te($,{BIGINT_FORMAT_RANGES:()=>vr,CONSTANT_CATCH:()=>In,Class:()=>Xo,NUMBER_FORMAT_RANGES:()=>gr,aborted:()=>de,allowsEval:()=>Qo,assert:()=>Ih,assertEqual:()=>bh,assertIs:()=>xh,assertNever:()=>wh,assertNotEqual:()=>kh,assignProp:()=>ae,attachSchema:()=>wn,base64ToUint8Array:()=>Hd,base64urlToUint8Array:()=>Jh,cached:()=>St,captureStackTrace:()=>kn,cleanEnum:()=>Vh,cleanRegex:()=>Re,clone:()=>M,cloneDef:()=>jh,codePointLength:()=>it,constantCatch:()=>ia,createTransparentProxy:()=>Ah,defineLazy:()=>Ho,defineLazyInternal:()=>R,derived:()=>Gh,esc:()=>le,escapeRegex:()=>Ie,explicitlyAborted:()=>ra,extend:()=>Ch,finalizeIssue:()=>he,floatSafeRemainder:()=>mr,getElementAtPath:()=>Ph,getEnumValues:()=>wt,getLengthableOrigin:()=>$r,getParsedType:()=>Dh,getSizableOrigin:()=>hr,hexToUint8Array:()=>Kh,hide:()=>yr,installLazyProp:()=>Yh,isObject:()=>nt,isPlainObject:()=>we,issue:()=>jt,joinValues:()=>g,jsonStringifyReplacer:()=>It,members:()=>na,merge:()=>Zh,mergeDefs:()=>je,normalizeParams:()=>w,nullish:()=>bn,numKeys:()=>Uh,objectClone:()=>Sh,omit:()=>Th,optionalKeys:()=>ta,own:()=>Be,parsedType:()=>_,partial:()=>Lh,pick:()=>Nh,prefixIssues:()=>ve,primitiveTypes:()=>ea,promiseAllObject:()=>Oh,propertyKeyTypes:()=>pr,randomString:()=>Eh,rawShape:()=>zt,required:()=>Fh,safeExtend:()=>Rh,shallowClone:()=>fr,slugify:()=>Yo,stringifyPrimitive:()=>y,toZod:()=>dr,uint8ArrayToBase64:()=>Yd,uint8ArrayToBase64url:()=>Bh,uint8ArrayToHex:()=>Wh,unwrapMessage:()=>xt});function bh(e){return e}function kh(e){return e}function dr(){return e=>e}function xh(e){}function wh(e){throw new Error("Unexpected value in exhaustive check")}function Ih(e){}function wt(e){let t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,r])=>t.indexOf(+o)===-1).map(([o,r])=>r)}function g(e,t="|"){return e.map(i=>y(i)).join(t)}function It(e,t){return typeof t=="bigint"?t.toString():t}var qo=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 St(e){return new qo(e)}function bn(e){return e==null}function Re(e){let t=e.startsWith("^")?1:0,i=e.endsWith("$")?e.length-1:e.length;return e.slice(t,i)}function mr(e,t){let i=e/t,o=Math.round(i),r=4*Number.EPSILON*Math.max(Math.abs(i),1);return Math.abs(i-o)<r?0:i-o}var Wd=Symbol("evaluating");function Ho(e,t,i){let o;Object.defineProperty(e,t,{get(){if(o!==Wd)return o===void 0&&(o=Wd,o=i()),o},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function Sh(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function ae(e,t,i){Object.defineProperty(e,t,{value:i,writable:!0,enumerable:!0,configurable:!0})}function zt(e){let t=Object.getOwnPropertyDescriptor(e,"shape");return t?.get?t.get.raw:t?.value}function Ce(e){return zt(e._zod.def)??e._zod.def.shape}function Gd(e,t,i){Object.defineProperty(e,t,{get(){let o=i();return ae(this,t,o),o},enumerable:!0,configurable:!0})}function qd(e,t,i){t in e?ae(e,t,i):e[t]=i}function rt(e,t,i,o){let r=Ce(t);for(let n of i){let a=Object.getOwnPropertyDescriptor(r,n);a.enumerable&&(a.get?Gd(e,n,()=>{let s=t._zod.def.shape[n];return o?o(s,n):s}):qd(e,n,o?o(a.value,n):a.value))}}function zh(e,t){for(let i of Reflect.ownKeys(t)){let o=Object.getOwnPropertyDescriptor(t,i);o.enumerable&&(o.get?Gd(e,i,()=>t[i]):qd(e,i,o.value))}}function je(...e){let t={};for(let i of e){let o=Object.getOwnPropertyDescriptors(i);Object.assign(t,o)}return Object.defineProperties({},t)}function jh(e){return je(e._zod.def)}function Ph(e,t){return t?t.reduce((i,o)=>i?.[o],e):e}function Oh(e){let t=Object.keys(e),i=t.map(o=>e[o]);return Promise.all(i).then(o=>{let r={};for(let n=0;n<t.length;n++)r[t[n]]=o[n];return r})}function Eh(e=10){let t="abcdefghijklmnopqrstuvwxyz",i="";for(let o=0;o<e;o++)i+=t[Math.floor(Math.random()*t.length)];return i}function le(e){return JSON.stringify(e)}function Yo(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var kn="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function nt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var Qo=St(()=>{if(ie.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function we(e){if(nt(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let i=t.prototype;return!(nt(i)===!1||Object.prototype.hasOwnProperty.call(i,"isPrototypeOf")===!1)}function fr(e){return we(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function Uh(e){let t=0;for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&t++;return t}var Dh=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}`)}},pr=new Set(["string","number","symbol"]),ea=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Ie(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function M(e,t,i){let o=new e._zod.constr(t??e._zod.def);return(!t||i?.parent)&&(o._zod.parent=e),o}function w(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 Ah(e){let t;return new Proxy({},{get(i,o,r){return t??(t=e()),Reflect.get(t,o,r)},set(i,o,r,n){return t??(t=e()),Reflect.set(t,o,r,n)},has(i,o){return t??(t=e()),Reflect.has(t,o)},deleteProperty(i,o){return t??(t=e()),Reflect.deleteProperty(t,o)},ownKeys(i){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(i,o){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,o)},defineProperty(i,o,r){return t??(t=e()),Reflect.defineProperty(t,o,r)}})}function y(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function ta(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout==="optional")}var gr={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]},vr={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Nh(e,t){let i=e._zod.def,o=i.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let n={};return rt(n,e,xn(e,t)),M(e,je(i,{shape:n,checks:[]}))}function xn(e,t){let i=Ce(e),o=[];for(let r of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(i,r)?.enumerable)throw new Error(`Unrecognized key: "${String(r)}"`);t[r]&&o.push(r)}return o}function Th(e,t){let i=e._zod.def,o=i.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let n=new Set(xn(e,t)),a={};return rt(a,e,Reflect.ownKeys(Ce(e)).filter(s=>!n.has(s))),M(e,je(i,{shape:a,checks:[]}))}function Ch(e,t){if(!we(t))throw new Error("Invalid input to extend: expected a plain object");let i=e._zod.def.checks;if(i&&i.length>0){let r=Ce(e);for(let n of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(r,n)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return M(e,je(e._zod.def,{shape:Xd(e,t)}))}function Xd(e,t){let i={};return rt(i,e,Reflect.ownKeys(Ce(e))),zh(i,t),i}function Rh(e,t){if(!we(t))throw new Error("Invalid input to safeExtend: expected a plain object");return M(e,je(e._zod.def,{shape:Xd(e,t)}))}function Zh(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 i={};rt(i,e,Reflect.ownKeys(Ce(e))),rt(i,t,Reflect.ownKeys(Ce(t)));let o=je(e._zod.def,{shape:i,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return M(e,o)}function Lh(e,t,i,o="partial"){let n=t._zod.def.checks;if(n&&n.length>0)throw new Error(`.${o}() cannot be used on object schemas containing refinements`);let s=i?new Set(xn(t,i)):void 0,u={};return rt(u,t,Reflect.ownKeys(Ce(t)),e&&((c,l)=>s&&!s.has(l)?c:new e({type:"optional",innerType:c}))),M(t,je(t._zod.def,{shape:u,checks:[]}))}function Fh(e,t,i){let o=i?new Set(xn(t,i)):void 0,r={};return rt(r,t,Reflect.ownKeys(Ce(t)),(n,a)=>o&&!o.has(a)?n:new e({type:"nonoptional",innerType:n})),M(t,je(t._zod.def,{shape:r}))}function de(e,t=0){if(e.aborted===!0)return!0;for(let i=t;i<e.issues.length;i++)if(e.issues[i]?.continue!==!0)return!0;return!1}function ra(e,t=0){if(e.aborted===!0)return!0;for(let i=t;i<e.issues.length;i++)if(e.issues[i]?.continue===!1)return!0;return!1}function ve(e,t){return t.map(i=>{var o;return(o=i).path??(o.path=[]),i.path.unshift(e),i})}function xt(e){return typeof e=="string"?e:e?.message}function wn(e,t,i){var o;for(let r=t;r<e.length;r++)(o=e[r]).schema??(o.schema=i)}function he(e,t,i){var o;let r=e.inst?._zod?.traits;r?.has("$ZodType")&&(r.has("$ZodCheck")?(o=e).schema??(o.schema=e.inst):e.schema=e.inst);let n=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,a=e.message?e.message:xt(e.inst?._zod.def?.error?.(e))??xt(n?.(e))??xt(t?.error?.(e))??xt(i.customError?.(e))??xt(i.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 hr(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}var Mh=/[\uD800-\uDBFF]/;function it(e){let t=e.length;if(!Mh.test(e))return t;let i=t;for(let o=0;o<t-1;o++)(e.charCodeAt(o)&64512)===55296&&(e.charCodeAt(o+1)&64512)===56320&&(i--,o++);return i}function $r(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 i=e;if(i&&Object.getPrototypeOf(i)!==Object.prototype&&"constructor"in i&&i.constructor)return i.constructor.name}}return t}function jt(...e){let[t,i,o]=e;return typeof t=="string"?{message:t,code:"custom",input:i,inst:o}:{...t}}function Vh(e){return Object.entries(e).filter(([t,i])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function Hd(e){let t=atob(e),i=new Uint8Array(t.length);for(let o=0;o<t.length;o++)i[o]=t.charCodeAt(o);return i}function Yd(e){let t="";for(let i=0;i<e.length;i++)t+=String.fromCharCode(e[i]);return btoa(t)}function Jh(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),i="=".repeat((4-t.length%4)%4);return Hd(t+i)}function Bh(e){return Yd(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Kh(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let i=new Uint8Array(t.length/2);for(let o=0;o<t.length;o+=2)i[o/2]=Number.parseInt(t.slice(o,o+2),16);return i}function Wh(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var Xo=class{constructor(...t){}};function na(e,t){for(let i in t){let o=Object.getOwnPropertyDescriptor(t,i);o.get?Object.defineProperty(e,i,{...o,enumerable:!1}):qh(e,i,o.value)}}function Be(e,t,i,o=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:o,value:i}),i}function yr(e,t,i){return Be(e,t,i,!1)}function Gh(e,t){for(let i in e){let o=e[i];Object.defineProperty(t,i,{configurable:!0,enumerable:!0,get(){return Be(this,i,o(this))},set(r){Be(this,i,r)}})}return t}function qh(e,t,i){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?i:Be(this,t,i.bind(this))},set(o){Be(this,t,o)}})}function Xh(e,t){let i=Object.getPrototypeOf(e);return t in i?void 0:i}var Go,Je=!1,Hh={configurable:!0,get(){Je=!0}};function R(e,t,i){let o=Object.getPrototypeOf(e._zod);if(t in o&&Go!==e._zod){Go=void 0;return}Go=e._zod,Object.defineProperty(o,t,{configurable:!0,get(){Object.defineProperty(this,t,Hh);let r=Je;Je=!1;try{let n=i(this);return Je?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:n}),Je=Je||r,n}catch(n){throw delete this[t],Je=Je||r,n}},set(r){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r})}})}function Yh(e,t,i,o){let r=Xh(e,t);r&&Object.defineProperty(r,t,{configurable:!0,get(){let n={configurable:!0,writable:!0,enumerable:o,value:void 0};return Object.defineProperty(this,t,n),n.value=i(this),Object.defineProperty(this,t,n),n.value},set(n){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:o,value:n})}})}var In="~constantCatch";function ia(e){let t=()=>e;return t[In]=!0,t}var Qd,aa=Object.freeze({status:"aborted"}),oa={value:void 0,enumerable:!1},em="captureStackTrace"in Error?Error:null;function Qh(e){let t=em;if(t){let i=t.stackTraceLimit;if(typeof i=="number"){try{t.stackTraceLimit=0}catch{return em=null,new e}try{return new e}finally{t.stackTraceLimit=i}}}return new e}function p(e,t,i,o){let r={};function n(m){this.def=m,this.constr=d,this.traits=new Set}n.prototype=r;let a=i,s=a&&new WeakSet;function u(m,f){if(m._zod){if(m._zod.traits.has(e))return}else{oa.value=new n(f);try{Object.defineProperty(m,"_zod",oa)}finally{oa.value=void 0}}if(m._zod.traits.add(e),t(m,f),s){let h=Object.getPrototypeOf(m),b=m._zod.constr.prototype,E=h;for(;E&&E!==b;)E=Object.getPrototypeOf(E);let z=E??h;s.has(z)||(s.add(z),na(z,a))}let v=d.prototype;for(let h in v)Object.prototype.hasOwnProperty.call(v,h)&&(h in m||(m[h]=v[h].bind(m)))}let c=o?.Parent??Object;class l extends c{}Object.defineProperty(l,"name",{value:e});function d(m){let f=o?.Parent?Qh(l):this;u(f,m);let v=f._zod.deferred;if(v){for(let b of v)b();f._zod.deferred=void 0}let h=globalThis.__zod_globalConfig?.postProcessor;return h&&h(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 sa=Symbol("zod_brand"),$e=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Ke=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(Qd=globalThis).__zod_globalConfig??(Qd.__zod_globalConfig={});var ie=globalThis.__zod_globalConfig;function H(e){return e&&Object.assign(ie,e),ie}function e$(){let e=this._zod;return e.message??(e.message=JSON.stringify(e.def,It,2)),e.message}function t$(e){this._zod.message=e}var r$={get:e$,set:t$,enumerable:!0,configurable:!0},ua={value:void 0,enumerable:!1},tm=new WeakSet([Object.prototype,Error.prototype]),rm=(e,t)=>{e.name="$ZodError",ua.value=t,Object.defineProperty(e,"issues",ua),ua.value=void 0,Object.defineProperty(e,"message",r$);let i=Object.getPrototypeOf(e);tm.has(i)||(tm.add(i),Object.defineProperty(i,"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})}}))},la=p("$ZodError",rm),ye=p("$ZodError",rm,void 0,{Parent:Error});function n$(e,t,i){return Object.prototype.hasOwnProperty.call(e,t)||(t==="__proto__"?Object.defineProperty(e,t,{value:i(),writable:!0,enumerable:!0,configurable:!0}):e[t]=i()),e[t]}function _r(e,t=i=>i.message){let i={},o=[];for(let r of e.issues)r.path.length>0?n$(i,r.path[0],()=>[]).push(t(r)):o.push(t(r));return{formErrors:o,fieldErrors:i}}function br(e,t=i=>i.message){let i={_errors:[]},o=(r,n=[])=>{for(let a of r.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(s=>o({issues:s},[...n,...a.path]));else if(a.code==="invalid_key")o({issues:a.issues},[...n,...a.path]);else if(a.code==="invalid_element")o({issues:a.issues},[...n,...a.path]);else{let s=[...n,...a.path];if(s.length===0)i._errors.push(t(a));else{let u=i,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),i}function da(e,t=i=>i.message){let i={errors:[]},o=(r,n=[])=>{var a;for(let s of r.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(u=>o({issues:u},[...n,...s.path]));else if(s.code==="invalid_key")o({issues:s.issues},[...n,...s.path]);else if(s.code==="invalid_element")o({issues:s.issues},[...n,...s.path]);else{let u=[...n,...s.path];if(u.length===0){i.errors.push(t(s));continue}let c=i,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),i}function nm(e){let t=[],i=e.map(o=>typeof o=="object"?o.key:o);for(let o of i)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 ma(e){let t=[],i=[...e.issues].sort((o,r)=>(o.path??[]).length-(r.path??[]).length);for(let o of i)t.push(`\u2716 ${o.message}`),o.path?.length&&t.push(` \u2192 at ${nm(o.path)}`);return t.join(`
|
|
18
|
+
`)}function Sn(e,t){return{callee:t?.callee??e,Err:t?.Err}}var Pt=e=>{let t=(i,o,r,n)=>{let a=r?{...r,async:!1}:{async:!1},s=i._zod.run({value:o,issues:[]},a);if(s instanceof Promise)throw new $e;if(s.issues.length){let u=new(n?.Err??e)(s.issues.map(c=>he(c,a,H())));throw kn(u,n?.callee??t),u}return s.value};return t},zn=Pt(ye),Ot=e=>{let t=async(i,o,r,n)=>{let a=r?{...r,async:!0}:{async:!0},s=i._zod.run({value:o,issues:[]},a);if(s instanceof Promise&&(s=await s),s.issues.length){let u=new(n?.Err??e)(s.issues.map(c=>he(c,a,H())));throw kn(u,n?.callee??t),u}return s.value};return t},jn=Ot(ye),Et=e=>(t,i,o)=>{let r=o?{...o,async:!1}:{async:!1},n=t._zod.run({value:i,issues:[]},r);if(n instanceof Promise)throw new $e;return n.issues.length?im(e,n.issues,r):{success:!0,data:n.value}},o$=Et(ye);function im(e,t,i){let o;return{success:!1,get error(){return o||(o=new e(t.map(r=>he(r,i,H()))),t=void 0,i=void 0),o},set error(r){o=r,t=void 0,i=void 0}}}var Ut=e=>async(t,i,o)=>{let r=o?{...o,async:!0}:{async:!0},n=t._zod.run({value:i,issues:[]},r);return n instanceof Promise&&(n=await n),n.issues.length?im(e,n.issues,r):{success:!0,data:n.value}},a$=Ut(ye),s$=Symbol.for("zod.compile.invalid"),c$=Symbol.for("zod.compile.fallback"),kr=((e,t,i)=>{let o=e._zod.bag.validator;if(o!==void 0){if(o(t)!==s$)return!0;if(o.definite===!0&&i===void 0)return!1}return u$(e,t,i)});function u$(e,t,i){let o=i?{...i,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},r=e._zod.bag.fallbackRun,n;if(r?(o[c$]=!0,n=r({value:t,issues:[]},o)):n=e._zod.run({value:t,issues:[]},o),n instanceof Promise)throw new $e;return n.issues.length===0}var xr=async(e,t,i)=>{let o=i?{...i,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},r=e._zod.run({value:t,issues:[]},o);return r instanceof Promise&&(r=await r),r.issues.length===0},Pn=e=>{let t=Pt(e),i=(o,r,n,a)=>{let s=n?{...n,direction:"backward"}:{direction:"backward"};return t(o,r,s,Sn(i,a))};return i},l$=Pn(ye),On=e=>{let t=Pt(e),i=(o,r,n,a)=>t(o,r,n,Sn(i,a));return i},d$=On(ye),En=e=>{let t=Ot(e),i=async(o,r,n,a)=>{let s=n?{...n,direction:"backward"}:{direction:"backward"};return await t(o,r,s,Sn(i,a))};return i},m$=En(ye),Un=e=>{let t=Ot(e),i=async(o,r,n,a)=>await t(o,r,n,Sn(i,a));return i},f$=Un(ye),Dn=e=>(t,i,o)=>{let r=o?{...o,direction:"backward"}:{direction:"backward"};return Et(e)(t,i,r)},p$=Dn(ye),An=e=>(t,i,o)=>Et(e)(t,i,o),g$=An(ye),Nn=e=>async(t,i,o)=>{let r=o?{...o,direction:"backward"}:{direction:"backward"};return Ut(e)(t,i,r)},v$=Nn(ye),Tn=e=>async(t,i,o)=>Ut(e)(t,i,o),h$=Tn(ye);var Se={};Te(Se,{anyString:()=>Za,base64:()=>Oa,base64url:()=>Ea,bigint:()=>Fa,boolean:()=>Ma,browserEmail:()=>I$,cidrv4:()=>ja,cidrv6:()=>Pa,creditCard:()=>Cn,cuid:()=>pa,cuid2:()=>ga,currencyCode:()=>Na,date:()=>Ta,datetime:()=>Ra,domain:()=>Da,duration:()=>ba,e164:()=>Aa,email:()=>xa,emoji:()=>wa,extendedDuration:()=>$$,guid:()=>ka,hex:()=>Wa,hostname:()=>Ua,html5Email:()=>k$,httpProtocol:()=>wr,iban:()=>Rn,idnEmail:()=>w$,integer:()=>Ir,ipv4:()=>Ia,ipv6:()=>Sa,ksuid:()=>$a,lowercase:()=>Ba,mac:()=>za,md5_base64:()=>P$,md5_base64url:()=>O$,md5_hex:()=>j$,nanoid:()=>ya,nanoidOfLength:()=>_a,null:()=>Va,number:()=>Ze,rfc5322Email:()=>x$,sha1_base64:()=>U$,sha1_base64url:()=>D$,sha1_hex:()=>E$,sha256_base64:()=>N$,sha256_base64url:()=>T$,sha256_hex:()=>A$,sha384_base64:()=>R$,sha384_base64url:()=>Z$,sha384_hex:()=>C$,sha512_base64:()=>F$,sha512_base64url:()=>M$,sha512_hex:()=>L$,string:()=>La,time:()=>Ca,ulid:()=>va,undefined:()=>Ja,unicodeEmail:()=>om,uppercase:()=>Ka,uuid:()=>ot,uuid4:()=>y$,uuid6:()=>_$,uuid7:()=>b$,xid:()=>ha});var pa=/^[cC][0-9a-z]{6,}$/,ga=/^[0-9a-z]+$/,va=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,ha=/^[0-9a-vA-V]{20}$/,$a=/^[A-Za-z0-9]{27}$/,ya=/^[a-zA-Z0-9_-]{21}$/;function _a(e){return new RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var ba=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,$$=/^[-+]?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)?)??$/,ka=/^([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})$/,ot=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)$/,y$=ot(4),_$=ot(6),b$=ot(7),xa=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,k$=/^[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])?)*$/,x$=/^(([^<>()\[\]\\.,;:\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,}))$/,om=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,w$=om,I$=/^[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])?)*$/,S$="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function wa(){return new RegExp(S$,"u")}var Ia=/^(?:(?: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])$/,Sa=/^(([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}|:))$/,za=e=>{let t=Ie(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},ja=/^((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])$/,Pa=/^(([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])$/,Oa=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ea=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,Ua=/^(?=.{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])?)*\.?$/,Da=/^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$/,wr=/^https?$/,Aa=/^\+[1-9]\d{6,14}$/,Cn=/^\d(?:[ -]?\d){11,18}$/,Na=/^(?: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)$/,Rn=/^[A-Z]{2}(?!00|01|99)\d{2}[A-Z0-9]{11,30}$/,am="(?:(?:\\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 z$(e){return new RegExp(`^${e}$`)}var Ta=z$(am);function fa(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 Ca(e){return new RegExp(`^${fa(e)}$`)}function Ra(e){let t=["Z"];e.offset&&t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let i=`${fa({precision:e.precision,seconds:!0})}(?:${t.join("|")})`,o=e.local?`${i}|${fa({precision:e.precision})}`:i;return new RegExp(`^${am}T(?:${o})$`)}var Za=/^[\s\S]{0,}$/,La=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Fa=/^-?\d+n?$/,Ir=/^-?\d+$/,Ze=/^-?\d+(?:\.\d+)?$/,Ma=/^(?:true|false)$/i,Va=/^null$/i;var Ja=/^undefined$/i;var Ba=/^[^A-Z]*$/,Ka=/^[^a-z]*$/,Wa=/^[0-9a-fA-F]*$/;function Sr(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function zr(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var j$=/^[0-9a-fA-F]{32}$/,P$=Sr(22,"=="),O$=zr(22),E$=/^[0-9a-fA-F]{40}$/,U$=Sr(27,"="),D$=zr(27),A$=/^[0-9a-fA-F]{64}$/,N$=Sr(43,"="),T$=zr(43),C$=/^[0-9a-fA-F]{96}$/,R$=Sr(64,""),Z$=zr(64),L$=/^[0-9a-fA-F]{128}$/,F$=Sr(86,"=="),M$=zr(86);var W=p("$ZodCheck",(e,t)=>{var i;e._zod??(e._zod={}),e._zod.def=t,(i=e._zod).onattach??(i.onattach=[])}),Ga=e=>{let t=e.value;return!bn(t)&&t.size!==void 0},qa=e=>{let t=e.value;return!bn(t)&&t.length!==void 0},Zn={number:"number",bigint:"bigint",object:"date"},Fn=p("$ZodCheckLessThan",(e,t)=>{W.init(e,t);let i=Zn[typeof t.value];e._zod.check=o=>{(t.inclusive?o.value<=t.value:o.value<t.value)||o.issues.push({origin:Zn[typeof o.value]??i,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Mn=p("$ZodCheckGreaterThan",(e,t)=>{W.init(e,t);let i=Zn[typeof t.value];e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:Zn[typeof o.value]??i,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Xa=p("$ZodCheckMultipleOf",(e,t)=>{W.init(e,t),e._zod.check=i=>{if(typeof i.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof i.value=="bigint"?t.value!==BigInt(0)&&i.value%t.value===BigInt(0):mr(i.value,t.value)===0)||i.issues.push({origin:typeof i.value,code:"not_multiple_of",divisor:t.value,input:i.value,inst:e,continue:!t.abort})}}),Ha=p("$ZodCheckNumberFormat",(e,t)=>{W.init(e,t),t.format=t.format||"float64";let i=t.format?.includes("int"),o=i?"int":"number",[r,n]=gr[t.format];e._zod.check=a=>{let s=a.value;if(i){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<r&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),s>n&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:n,inclusive:!0,inst:e,continue:!t.abort})}}),Ya=p("$ZodCheckBigIntFormat",(e,t)=>{W.init(e,t);let[i,o]=vr[t.format];e._zod.check=r=>{let n=r.value;n<i&&r.issues.push({origin:"bigint",input:n,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),n>o&&r.issues.push({origin:"bigint",input:n,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),Qa=p("$ZodCheckMaxSize",(e,t)=>{var i;W.init(e,t),(i=e._zod.def).when??(i.when=Ga),e._zod.check=o=>{let r=o.value;r.size<=t.maximum||o.issues.push({origin:hr(r),code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),es=p("$ZodCheckMinSize",(e,t)=>{var i;W.init(e,t),(i=e._zod.def).when??(i.when=Ga),e._zod.check=o=>{let r=o.value;r.size>=t.minimum||o.issues.push({origin:hr(r),code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),ts=p("$ZodCheckSizeEquals",(e,t)=>{var i;W.init(e,t),(i=e._zod.def).when??(i.when=Ga),e._zod.check=o=>{let r=o.value,n=r.size;if(n===t.size)return;let a=n>t.size;o.issues.push({origin:hr(r),...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})}}),rs=p("$ZodCheckMaxLength",(e,t)=>{var i;W.init(e,t),(i=e._zod.def).when??(i.when=qa),e._zod.check=o=>{let r=o.value,n=r.length;if((typeof r=="string"&&n>t.maximum?it(r):n)<=t.maximum)return;let s=$r(r);o.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),ns=p("$ZodCheckMinLength",(e,t)=>{var i;W.init(e,t),(i=e._zod.def).when??(i.when=qa),e._zod.check=o=>{let r=o.value,n=r.length;if((typeof r=="string"&&n>=t.minimum&&n<t.minimum*2?it(r):n)>=t.minimum)return;let s=$r(r);o.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),is=p("$ZodCheckLengthEquals",(e,t)=>{var i;W.init(e,t),(i=e._zod.def).when??(i.when=qa),e._zod.check=o=>{let r=o.value,n=r.length,a=typeof r=="string"&&n>=t.length&&n<=t.length*2?it(r):n;if(a===t.length)return;let s=$r(r),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})}}),Dt=p("$ZodCheckStringFormat",(e,t)=>{var i,o;W.init(e,t),t.pattern?(i=e._zod).check??(i.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(o=e._zod).check??(o.check=()=>{})}),os=p("$ZodCheckRegex",(e,t)=>{Dt.init(e,t),e._zod.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:"regex",input:i.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),as=p("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Ba),Dt.init(e,t)}),ss=p("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Ka),Dt.init(e,t)}),cs=p("$ZodCheckIncludes",(e,t)=>{W.init(e,t);let i=Ie(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position},}${i}`:i);t.pattern=o,e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),us=p("$ZodCheckStartsWith",(e,t)=>{W.init(e,t);let i=new RegExp(`^${Ie(t.prefix)}.*`);t.pattern??(t.pattern=i),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})}}),ls=p("$ZodCheckEndsWith",(e,t)=>{W.init(e,t);let i=new RegExp(`.*${Ie(t.suffix)}$`);t.pattern??(t.pattern=i),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 Ln(e,t,i){e.issues.length&&t.issues.push(...ve(i,e.issues))}var ds=p("$ZodCheckProperty",(e,t)=>{W.init(e,t),e._zod.check=i=>{let o=t.schema._zod.run({value:i.value[t.property],issues:[]},{});if(o instanceof Promise)return o.then(r=>Ln(r,i,t.property));Ln(o,i,t.property)}}),ms=p("$ZodCheckProperties",(e,t)=>{W.init(e,t),yr(e,Symbol.iterator,function*(){yield e});let i;e._zod.check=o=>{if(o.value==null){o.issues.push({expected:"object",code:"invalid_type",input:o.value,inst:e});return}i??(i=Reflect.ownKeys(t.shape).map(a=>[a,t.shape[a]]));let r=o.value,n;for(let[a,s]of i){let u=s._zod.run({value:r[a],issues:[]},{});u instanceof Promise?(n??(n=[]),n.push(u.then(c=>Ln(c,o,a)))):Ln(u,o,a)}if(n)return Promise.all(n).then(()=>{})}}),fs=p("$ZodCheckMimeType",(e,t)=>{W.init(e,t);let i=new Set(t.mime);e._zod.check=o=>{i.has(o.value.type)||o.issues.push({code:"invalid_value",values:t.mime,input:o.value.type,inst:e,continue:!t.abort})}}),ps=p("$ZodCheckOverwrite",(e,t)=>{W.init(e,t),e._zod.check=i=>{i.value=t.tx(i.value)}});var at=class{constructor(t=[],i={}){this.content=[],this.indent=0,this.args=t,this.closed=i}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(`
|
|
19
|
+
`).filter(a=>a),r=Math.min(...o.map(a=>a.length-a.trimStart().length)),n=o.map(a=>a.slice(r)).map(a=>" ".repeat(this.indent*2)+a);for(let a of n)this.content.push(a)}compile(){let t=Function,i=this?.content??[""];return new t(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
|
|
20
|
+
${i.join(`
|
|
21
|
+
`)}
|
|
22
|
+
};`)(...Object.values(this.closed))}};var gs={major:4,minor:6,patch:5};var N=p("$ZodType",(e,t)=>{var i;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=gs;let o=e._zod.def.checks,r=e._zod.traits.has("$ZodCheck")?[e,...o??[]]:o?.length?[...o]:[];for(let n of r)for(let a of n._zod.onattach)a(e);if(r.length===0)(i=e._zod).deferred??(i.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let n=(s,u,c)=>{if(s.memo)return s;let l=de(s),d;for(let m of u){if(m._zod.def.when){if(ra(s)||!m._zod.def.when(s))continue}else if(l)continue;let f=s.issues.length,v=m._zod.check(s);if(v instanceof Promise&&c?.async===!1)throw new $e;if(d||v instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await v,s.issues.length!==f&&(wn(s.issues,f,e),l||(l=de(s,f)))});else{if(s.issues.length===f)continue;wn(s.issues,f,e),l||(l=de(s,f))}}return d?d.then(()=>s):s},a=(s,u,c)=>{if(de(s))return s.aborted=!0,s;let l=n(u,r,c);if(l instanceof Promise){if(c.async===!1)throw new $e;return l.then(d=>e._zod.parse(d,c))}return e._zod.parse(l,c)};e._zod.run=(s,u)=>{if(u.skipChecks)return e._zod.parse(s,u);if(u.direction==="backward"){let l=e._zod.parse({value:s.value,issues:[]},{...u,skipChecks:!0});return l instanceof Promise?l.then(d=>a(d,s,u)):a(l,s,u)}let c=e._zod.parse(s,u);if(c instanceof Promise){if(u.async===!1)throw new $e;return c.then(l=>n(l,r,u))}return n(c,r,u)}}},{get"~standard"(){return yr(this,"~standard",Wn(this))},set"~standard"(e){Be(this,"~standard",e)}}),xm=(e,t)=>e.issues.length?{issues:e.issues.map(i=>he(i,t,H()))}:{value:e.value};async function V$(e,t){let i={async:!0};return xm(await e._zod.run({value:t,issues:[]},i),i)}function Wn(e){return{validate:t=>{let i={async:!1};try{let o=e._zod.run({value:t,issues:[]},i);if(!(o instanceof Promise))return xm(o,i)}catch{}return V$(e,t)},vendor:"zod",version:1}}var st=p("$ZodString",(e,t)=>{N.init(e,t),e._zod.pattern=t.pattern??Za,e._zod.parse=(i,o)=>{if(t.coerce)try{i.value=String(i.value)}catch{}return typeof i.value=="string"||i.issues.push({expected:"string",code:"invalid_type",input:i.value,inst:e}),i}}),V=p("$ZodStringFormat",(e,t)=>{Dt.init(e,t),st.init(e,t)}),hs=p("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=ka),V.init(e,t)}),$s=p("$ZodUUID",(e,t)=>{if(t.version){let o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=ot(o))}else t.pattern??(t.pattern=ot());V.init(e,t)}),ys=p("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=xa),V.init(e,t)}),_s=1,jr=2;function bs(e){try{return typeof URL<"u"&&typeof URL.canParse=="function"?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function Gn(e,t){return!("normalize"in t)&&!("hostname"in t)&&!("protocol"in t)?bs(e)||jr:wm(e,t)}function wm(e,t){if(!t.normalize&&t.protocol?.source===wr.source&&!/^https?:\/\//i.test(e))return _s;try{if(typeof URL<"u"){let i=URL;if(typeof i.parse=="function")return i.parse(e)??jr}return new URL(e)}catch{return jr}}var J$=/[\t\n\r]/g;function Pr(e){return e.replace(J$,"")}function qn(e,t){return t.lastIndex=0,t.test(e.hostname)}function Xn(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(":")?e.protocol.slice(0,-1):e.protocol)}var ks=p("$ZodURL",(e,t)=>{V.init(e,t),e._zod.check=i=>{try{let o=i.value.trim(),r=Gn(o,t);if(r===_s){i.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:i.value,inst:e,continue:!t.abort});return}if(r===jr){i.issues.push({code:"invalid_format",format:"url",input:i.value,inst:e,continue:!t.abort});return}if(r===!0){i.value=Pr(o);return}t.hostname&&!qn(r,t.hostname)&&i.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:i.value,inst:e,continue:!t.abort}),t.protocol&&!Xn(r,t.protocol)&&i.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:i.value,inst:e,continue:!t.abort}),i.value=t.normalize?r.href:Pr(o);return}catch{i.issues.push({code:"invalid_format",format:"url",input:i.value,inst:e,continue:!t.abort})}}}),xs=p("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=wa()),V.init(e,t)}),ws=p("$ZodNanoID",(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw new Error(`Invalid nanoid length: ${t.length}`);t.pattern??(t.pattern=t.length===void 0?ya:_a(t.length)),V.init(e,t)}),Is=p("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=pa),V.init(e,t)}),Ss=p("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=ga),V.init(e,t)}),zs=p("$ZodULID",(e,t)=>{t.pattern??(t.pattern=va),V.init(e,t)}),js=p("$ZodXID",(e,t)=>{t.pattern??(t.pattern=ha),V.init(e,t)}),Ps=p("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=$a),V.init(e,t)}),Os=p("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Ra(t)),V.init(e,t)}),Es=p("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Ta),V.init(e,t)}),Us=p("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Ca(t)),V.init(e,t)}),Ds=p("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=ba),V.init(e,t)}),As=p("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Ia),V.init(e,t)}),B$=/^[0-9a-fA-F:.]+$/;function Or(e){return B$.test(e)?bs(`http://[${e}]`):!1}var Ns=p("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Sa),V.init(e,t),e._zod.check=i=>{Or(i.value)||i.issues.push({code:"invalid_format",format:"ipv6",input:i.value,inst:e,continue:!t.abort})}}),Ts=p("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=za(t.delimiter)),V.init(e,t)}),Cs=p("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=ja),V.init(e,t)});function Hn(e){let t=e.split("/");if(t.length!==2)return!1;let[i,o]=t;if(!o)return!1;let r=Number(o);return`${r}`!==o||r<0||r>128?!1:Or(i)}var Rs=p("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Pa),V.init(e,t),e._zod.check=i=>{Hn(i.value)||i.issues.push({code:"invalid_format",format:"cidrv6",input:i.value,inst:e,continue:!t.abort})}});function Er(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var Yn=/^[0-9a-zA-Z+/]*={0,2}$/,Zs=p("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Yn),V.init(e,t),e._zod.check=i=>{Er(i.value)||i.issues.push({code:"invalid_format",format:"base64",input:i.value,inst:e,continue:!t.abort})}}),Ur=/^[A-Za-z0-9_-]*$/;function Qn(e){if(!Ur.test(e))return!1;let t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),i=t.padEnd(Math.ceil(t.length/4)*4,"=");return Er(i)}var Ls=p("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Ur),V.init(e,t),e._zod.check=i=>{Qn(i.value)||i.issues.push({code:"invalid_format",format:"base64url",input:i.value,inst:e,continue:!t.abort})}}),Fs=p("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Aa),V.init(e,t)}),K$=/[- ]/g;function W$(e){let t=e.length,i=1,o=0;for(;t;){let r=e.charCodeAt(--t)-48;i^=1,o+=i?[0,2,4,6,8,1,3,5,7,9][r]:r}return o%10===0}function ei(e){return Cn.test(e)?W$(e.replace(K$,"")):!1}var Ms=p("$ZodCreditCard",(e,t)=>{t.pattern??(t.pattern=Cn),V.init(e,t),e._zod.check=i=>{ei(i.value)||i.issues.push({code:"invalid_format",format:"credit_card",input:i.value,inst:e,continue:!t.abort})}});function G$(e){let t=0,i=e.length;for(let o=4;o<i;o++){let r=e.charCodeAt(o);t=(r>=65?t*100+(r-55):t*10+(r-48))%97}for(let o=0;o<4;o++){let r=e.charCodeAt(o);t=(r>=65?t*100+(r-55):t*10+(r-48))%97}return t===1}function ti(e){return Rn.test(e)?G$(e):!1}var Vs=p("$ZodIBAN",(e,t)=>{t.pattern??(t.pattern=Rn),V.init(e,t),e._zod.check=i=>{ti(i.value)||i.issues.push({code:"invalid_format",format:"iban",input:i.value,inst:e,continue:!t.abort})}});function ri(e,t=null){try{let i=e.split(".");if(i.length!==3)return!1;let[o]=i;if(!o)return!1;let r=JSON.parse(atob(o));return!("typ"in r&&r?.typ!=="JWT"||!r.alg||t&&(!("alg"in r)||r.alg!==t))}catch{return!1}}var Js=p("$ZodJWT",(e,t)=>{V.init(e,t),e._zod.check=i=>{ri(i.value,t.alg)||i.issues.push({code:"invalid_format",format:"jwt",input:i.value,inst:e,continue:!t.abort})}}),Bs=p("$ZodCustomStringFormat",(e,t)=>{V.init(e,t),e._zod.check=i=>{t.fn(i.value)||i.issues.push({code:"invalid_format",format:t.format,input:i.value,inst:e,continue:!t.abort})}}),ni=p("$ZodNumber",(e,t)=>{N.init(e,t),e._zod.pattern=Ze,e._zod.parse=(i,o)=>{if(t.coerce)try{i.value=Number(i.value)}catch{}let r=i.value;if(typeof r=="number"&&!Number.isNaN(r)&&Number.isFinite(r))return i;let n=typeof r=="number"?Number.isNaN(r)?"NaN":Number.isFinite(r)?void 0:String(r):void 0;return i.issues.push({expected:"number",code:"invalid_type",input:r,inst:e,...n?{received:n}:{}}),i}}),Ks=p("$ZodNumberFormat",(e,t)=>{Ha.init(e,t),ni.init(e,t)}),Dr=p("$ZodBoolean",(e,t)=>{N.init(e,t),e._zod.pattern=Ma,e._zod.parse=(i,o)=>{if(t.coerce)try{i.value=!!i.value}catch{}let r=i.value;return typeof r=="boolean"||i.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:e}),i}}),ii=p("$ZodBigInt",(e,t)=>{N.init(e,t),e._zod.pattern=Fa,e._zod.parse=(i,o)=>{if(t.coerce)try{i.value=BigInt(i.value)}catch{}return typeof i.value=="bigint"||i.issues.push({expected:"bigint",code:"invalid_type",input:i.value,inst:e}),i}}),Ws=p("$ZodBigIntFormat",(e,t)=>{Ya.init(e,t),ii.init(e,t)}),Gs=p("$ZodSymbol",(e,t)=>{N.init(e,t),e._zod.parse=(i,o)=>{let r=i.value;return typeof r=="symbol"||i.issues.push({expected:"symbol",code:"invalid_type",input:r,inst:e}),i}}),qs=p("$ZodUndefined",(e,t)=>{N.init(e,t),e._zod.pattern=Ja,e._zod.values=new Set([void 0]),e._zod.parse=(i,o)=>{let r=i.value;return typeof r>"u"||i.issues.push({expected:"undefined",code:"invalid_type",input:r,inst:e}),i}}),Xs=p("$ZodNull",(e,t)=>{N.init(e,t),e._zod.pattern=Va,e._zod.values=new Set([null]),e._zod.parse=(i,o)=>{let r=i.value;return r===null||i.issues.push({expected:"null",code:"invalid_type",input:r,inst:e}),i}}),Hs=p("$ZodAny",(e,t)=>{N.init(e,t),e._zod.parse=i=>i}),Ys=p("$ZodUnknown",(e,t)=>{N.init(e,t),e._zod.parse=i=>i}),Qs=p("$ZodNever",(e,t)=>{N.init(e,t),e._zod.parse=(i,o)=>(i.issues.push({expected:"never",code:"invalid_type",input:i.value,inst:e}),i)}),ec=p("$ZodVoid",(e,t)=>{N.init(e,t),e._zod.parse=(i,o)=>{let r=i.value;return typeof r>"u"||i.issues.push({expected:"void",code:"invalid_type",input:r,inst:e}),i}}),tc=p("$ZodDate",(e,t)=>{N.init(e,t),e._zod.parse=(i,o)=>{if(t.coerce)try{i.value=new Date(i.value)}catch{}let r=i.value,n=r instanceof Date;return n&&!Number.isNaN(r.getTime())||i.issues.push({expected:"date",code:"invalid_type",input:r,...n?{received:"Invalid Date"}:{},inst:e}),i}});function cm(e,t,i){e.issues.length&&t.issues.push(...ve(i,e.issues)),t.value[i]=e.value}var rc=p("$ZodArray",(e,t)=>{N.init(e,t);let i=ie.memoizer;i?.attach(e),e._zod.parse=(o,r)=>{let n=o.value;if(!Array.isArray(n))return o.issues.push({expected:"array",code:"invalid_type",input:n,inst:e}),o;o.value=i?i.alloc(e,o,Array(n.length),r):Array(n.length);let a=[],s=r?.abortEarly;for(let u=0;u<n.length;u++){let c=n[u],l=t.element._zod.run({value:c,issues:[]},r);if(l instanceof Promise)a.push(l.then(d=>cm(d,o,u)));else if(cm(l,o,u),s&&l.issues.length!==0&&de(l))break}return a.length?Promise.all(a).then(()=>o):o}});function Kn(e,t,i,o,r,n){let a=i in o,s=n==="optional";if(!(!a&&s&&r==="optional")){if(e.issues.length){if(r!==void 0&&s&&!a)return;t.issues.push(...ve(i,e.issues))}if(!a&&r===void 0){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[i]});return}e.value===void 0?(a||r==="defaulted"&&!s)&&(t.value[i]=void 0):t.value[i]=e.value}}var q$=[];function Im(e){let t=Object.keys(e.shape),i=Object.getOwnPropertySymbols(e.shape),o=i.length?i:q$,r=o.length?[...t,...o]:t;for(let a of r)if(!e.shape?.[a]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${String(a)}": expected a Zod schema`);let n=ta(e.shape);return{...e,allKeys:r,symbolKeys:o,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Sm(e,t,i,o,r,n,a){let s=[],u=r.keySet,c=r.catchall._zod,l=c.def.type,d=c.optin,m=c.optout,f=0;for(let v in t){if(a&&i.issues.length!==f){if(de(i,f))break;f=i.issues.length}if(u.has(v))continue;if(v==="__proto__"){l==="never"&&s.push(v);continue}if(l==="never"){s.push(v);continue}let h=c.run({value:t[v],issues:[]},o);h instanceof Promise?e.push(h.then(b=>Kn(b,i,v,t,d,m))):Kn(h,i,v,t,d,m)}return s.length&&i.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:n,continue:!0}),e.length?Promise.all(e).then(()=>i):i}var zm=p("$ZodObject",(e,t)=>{N.init(e,t);let i=Object.getOwnPropertyDescriptor(t,"shape"),o=i?.get?i.get.raw:t.shape??{};if(o){let c=()=>{let l={...o};return Object.defineProperty(t,"shape",{value:l}),c.raw=l,l};c.raw=o,Object.defineProperty(t,"shape",{get:c})}let r=St(()=>Im(t));R(e,"propValues",c=>{let l=c.def.shape,d={};for(let m in l){let f=l[m]._zod;if(f.values){Object.prototype.hasOwnProperty.call(d,m)||ae(d,m,new Set);for(let v of f.values)d[m].add(v);f.optin!==void 0&&d[m].add(void 0)}}return d});let n=nt,a=t.catchall,s,u=ie.memoizer;u?.attach(e),e._zod.parse=(c,l)=>{s??(s=r.value);let d=c.value;if(!n(d))return c.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),c;c.value=u?u.alloc(e,c,{},l):{};let m=[],f=s.shape,v=l?.abortEarly,h=c.issues.length;for(let b of s.allKeys){if(v&&c.issues.length!==h){if(de(c,h))break;h=c.issues.length}if(b==="__proto__")continue;let E=f[b],z=E._zod.optin,I=E._zod.optout,D=E._zod.run({value:d[b],issues:[]},l);D instanceof Promise?m.push(D.then(B=>Kn(B,c,b,d,z,I))):Kn(D,c,b,d,z,I)}return a?Sm(m,d,c,l,r.value,e,v===!0):m.length?Promise.all(m).then(()=>c):c}}),nc=p("$ZodObjectJIT",(e,t)=>{zm.init(e,t);let i=e._zod.parse,o=St(()=>Im(t)),r=ie.memoizer,n=f=>{let v=o.value,h=v.symbolKeys,b=new at(["payload","ctx"],{shape:f,inst:e,memo:r,syms:h}),E=B=>`shape[${B}]._zod.run({ value: input[${B}], issues: [] }, ctx)`,z=(B,F)=>`
|
|
23
|
+
let ${B}_ab = false;
|
|
24
|
+
for (let i = 0; i < ${B}.issues.length; i++) {
|
|
25
|
+
const iss = ${B}.issues[i];
|
|
26
|
+
iss.path = iss.path ? [${F}, ...iss.path] : [${F}];
|
|
27
|
+
payload.issues.push(iss);
|
|
28
|
+
if (iss.continue !== true) ${B}_ab = true;
|
|
29
|
+
}
|
|
30
|
+
if (${B}_ab && ctx && ctx.abortEarly) {
|
|
31
|
+
payload.value = newResult;
|
|
32
|
+
return payload;
|
|
33
|
+
}`;b.write("const input = payload.value;");let I=Object.create(null),D=0;for(let B of v.allKeys)I[B]=`key_${D++}`;b.write(r?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(let B of v.allKeys){if(B==="__proto__")continue;let F=I[B],ce=typeof B=="symbol"?`syms[${h.indexOf(B)}]`:le(B),ur=`${ce} in input`,Id=f[B],Ro=Id?._zod?.optin,Sd=Ro!==void 0,rh=Id?._zod?.optout==="optional";if(b.write(`const ${F} = ${E(ce)};`),Sd&&rh){let nh=Ro==="optional"?`${F}_present`:`${F}.value !== undefined || ${F}_present`;b.write(`
|
|
34
|
+
const ${F}_present = ${ur};
|
|
35
|
+
if (!${F}.issues.length || ${F}_present) {
|
|
36
|
+
if (${F}.issues.length) {${z(F,ce)}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
if (${nh}) {
|
|
40
|
+
newResult[${ce}] = ${F}.value;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
`)}else Sd?(b.write(`
|
|
45
|
+
if (${F}.issues.length) {${z(F,ce)}
|
|
46
|
+
}
|
|
47
|
+
`),Ro==="defaulted"?b.write(`newResult[${ce}] = ${F}.value;`):b.write(`
|
|
48
|
+
if (${F}.value !== undefined || ${ur}) {
|
|
49
|
+
newResult[${ce}] = ${F}.value;
|
|
50
|
+
}
|
|
51
|
+
`)):b.write(`
|
|
52
|
+
const ${F}_present = ${ur};
|
|
53
|
+
if (${F}.issues.length) {${z(F,ce)}
|
|
54
|
+
}
|
|
55
|
+
if (!${F}_present && !${F}.issues.length) {
|
|
56
|
+
payload.issues.push({
|
|
57
|
+
code: "invalid_type",
|
|
58
|
+
expected: "nonoptional",
|
|
59
|
+
input: undefined,
|
|
60
|
+
path: [${ce}]
|
|
61
|
+
});
|
|
62
|
+
if (ctx && ctx.abortEarly) {
|
|
63
|
+
payload.value = newResult;
|
|
64
|
+
return payload;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
if (${F}_present) {
|
|
69
|
+
newResult[${ce}] = ${F}.value;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
`)}return b.write("payload.value = newResult;"),b.write("return payload;"),b.compile()},a,s=nt,u=!ie.jitless,l=u&&Qo.value,d=t.catchall,m;e._zod.parse=(f,v)=>{m??(m=o.value);let h=f.value;return s(h)?u&&l&&v?.async===!1&&v.jitless!==!0?(a||(a=n(t.shape)),f=a(f,v),d?Sm([],h,f,v,m,e,v?.abortEarly===!0):f):i(f,v):(f.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),f)}});function um(e,t,i,o){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let r=e.filter(n=>!de(n));return r.length===1?(t.value=r[0].value,r[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:i,errors:e.map(n=>n.issues.map(a=>he(a,o,H())))}),t)}var Ar=p("$ZodUnion",(e,t)=>{N.init(e,t),R(e,"optin",o=>o.def.options.some(r=>r._zod.optin==="defaulted")?"defaulted":o.def.options.some(r=>r._zod.optin!==void 0)?"optional":void 0),R(e,"optout",o=>o.def.options.some(r=>r._zod.optout==="optional")?"optional":void 0),R(e,"values",o=>{if(o.def.options.every(r=>r._zod.values))return new Set(o.def.options.flatMap(r=>Array.from(r._zod.values)))}),R(e,"pattern",o=>{if(o.def.options.every(r=>r._zod.pattern)){let r=o.def.options.map(n=>n._zod.pattern);return new RegExp(`^(${r.map(n=>Re(n.source)).join("|")})$`)}});let i=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,r)=>{if(i)return i(o,r);let n=!1,a=[];for(let s of t.options){let u=s._zod.run({value:o.value,issues:[]},r);if(u instanceof Promise)a.push(u),n=!0;else{if(u.issues.length===0)return u;a.push(u)}}return n?Promise.all(a).then(s=>um(s,o,e,r)):um(a,o,e,r)}});function lm(e,t,i,o){let r=[];for(let n=0;n<e.length;n++)e[n].issues.length===0&&r.push(n);return r.length===1?(t.value=e[r[0]].value,t):(r.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:i,errors:e.map(n=>n.issues.map(a=>he(a,o,H())))}):t.issues.push({code:"invalid_union",input:t.value,inst:i,errors:[],inclusive:!1,matches:r}),t)}var ic=p("$ZodXor",(e,t)=>{Ar.init(e,t),t.inclusive=!1;let i=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,r)=>{if(i)return i(o,r);let n=!1,a=[];for(let s of t.options){let u=s._zod.run({value:o.value,issues:[]},r);u instanceof Promise?(a.push(u),n=!0):a.push(u)}return n?Promise.all(a).then(s=>lm(s,o,e,r)):lm(a,o,e,r)}});function oc(e,t){let i=e._zod,o=i.bag.optionsMap;o||(o=jm(i.def),i.bag.optionsMap=o);let r=o.get(t);if(r===null)throw new Error(`Ambiguous discriminator value "${String(t)}"`);return r}function jm(e){let t=new Map;for(let i of e.options){let o=i._zod.propValues?.[e.discriminator];if(!o||o.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(i)}"`);for(let r of o)if(t.has(r)){if(r!==void 0)throw new Error(`Duplicate discriminator value "${String(r)}"`);t.set(r,null)}else t.set(r,i)}return t}var ac=p("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Ar.init(e,t);let i=e._zod.parse;R(e,"propValues",r=>{let n={},a=0;for(let s of r.def.options){let u=s._zod.propValues;if(!u||Object.keys(u).length===0)throw new Error(`Invalid discriminated union option at index "${r.def.options.indexOf(s)}"`);u[r.def.discriminator]?.has(void 0)&&a++;for(let[c,l]of Object.entries(u)){Object.prototype.hasOwnProperty.call(n,c)||ae(n,c,new Set);for(let d of l)n[c].add(d)}}return!r.def.unionFallback&&a>1&&n[r.def.discriminator]?.delete(void 0),n}),t.options.forEach((r,n)=>{let a=zt(r._zod.def);if(a&&!Object.prototype.hasOwnProperty.call(a,t.discriminator))throw new Error(`Invalid discriminated union option at index "${n}"`)});let o=St(()=>jm(t));e._zod.parse=(r,n)=>{let a=r.value;if(!nt(a))return r.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),r;let s=a?.[t.discriminator],u=o.value.get(s);return u&&(s!==void 0||n.direction!=="backward")?u._zod.run(r,n):t.unionFallback||n.direction==="backward"?i(r,n):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(o.value.keys()).filter(c=>o.value.get(c)!==null),input:a,path:[t.discriminator],inst:e}),r)}}),sc=p("$ZodIntersection",(e,t)=>{N.init(e,t),e._zod.parse=(i,o)=>{let r=i.value,n=t.left._zod.run({value:r,issues:[]},o),a=t.right._zod.run({value:r,issues:[]},o);return n instanceof Promise||a instanceof Promise?Promise.all([n,a]).then(([u,c])=>dm(i,u,c)):dm(i,n,a)}});function At(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(we(e)&&we(t)){let i=Object.keys(t),o=Object.keys(e).filter(n=>i.indexOf(n)!==-1),r={...e,...t};Object.prototype.hasOwnProperty.call(r,"__proto__")&&delete r.__proto__;for(let n of o){if(n==="__proto__")continue;let a=At(e[n],t[n]);if(!a.valid)return{valid:!1,mergeErrorPath:[n,...a.mergeErrorPath]};r[n]=a.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let i=[];for(let o=0;o<e.length;o++){let r=e[o],n=t[o],a=At(r,n);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};i.push(a.data)}return{valid:!0,data:i}}return{valid:!1,mergeErrorPath:[]}}function dm(e,t,i){let o=new Map,r,n=new Map,a=(c,l)=>{let d;if(c.code==="unrecognized_keys"&&!c.path?.length)r??(r=c),d=c.keys;else if(c.code==="invalid_key"&&c.origin==="record"&&c.path?.length===1){let m=String(c.path[0]);n.has(m)||n.set(m,c),d=[m]}else return!1;for(let m of d)o.has(m)||o.set(m,{}),o.get(m)[l]=!0;return!0};for(let c of t.issues)a(c,"l")||e.issues.push(c);for(let c of i.issues)a(c,"r")||e.issues.push(c);let s=[...o].filter(([,c])=>c.l&&c.r).map(([c])=>c);if(s.length){let c=r?s.filter(l=>r.keys.includes(l)):[];c.length&&e.issues.push({...r,keys:c});for(let l of s)!c.includes(l)&&n.has(l)&&e.issues.push(n.get(l))}let u=At(t.value,i.value);if(!u.valid){if(de(e))return e;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(u.mergeErrorPath)}`)}return e.value=u.data,e}var oi=p("$ZodTuple",(e,t)=>{N.init(e,t);let i=t.items,o=ie.memoizer;o?.attach(e),e._zod.parse=(r,n)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({input:a,inst:e,expected:"tuple",code:"invalid_type"}),r;r.value=o?o.alloc(e,r,[],n):[];let s=[],u=mm(i,"optin"),c=mm(i,"optout");if(!t.rest){if(a.length<u)return r.issues.push({code:"too_small",minimum:u,inclusive:!0,input:a,inst:e,origin:"array"}),r;a.length>i.length&&r.issues.push({code:"too_big",maximum:i.length,inclusive:!0,input:a,inst:e,origin:"array"})}let l=new Array(i.length),d=t.rest?n?.abortEarly:void 0,m=!1;for(let f=0;f<i.length;f++){let v=i[f]._zod.run({value:a[f],issues:[]},n);v instanceof Promise?s.push(v.then(h=>{l[f]=h})):(l[f]=v,d&&!m&&v.issues.length&&(m=de(v)))}if(t.rest&&!m){let f=i.length-1,v=a.slice(i.length),h=r.issues.length;for(let b of v){if(d&&r.issues.length!==h){if(de(r,h))break;h=r.issues.length}f++;let E=t.rest._zod.run({value:b,issues:[]},n);E instanceof Promise?s.push(E.then(z=>fm(z,r,f))):fm(E,r,f)}}return s.length?Promise.all(s).then(()=>pm(l,r,i,a,c)):pm(l,r,i,a,c)}});function mm(e,t){for(let i=e.length-1;i>=0;i--)if(!(t==="optin"?e[i]._zod.optin!==void 0:e[i]._zod.optout==="optional"))return i+1;return 0}function fm(e,t,i){e.issues.length&&t.issues.push(...ve(i,e.issues)),t.value[i]=e.value}function pm(e,t,i,o,r){for(let n=0;n<i.length;n++){let a=e[n],s=n<o.length;if(!s&&n>=r&&i[n]._zod.optin==="optional"){t.value.length=n;break}if(a.issues.length){if(!s&&n>=r){t.value.length=n;break}t.issues.push(...ve(n,a.issues))}t.value[n]=a.value}for(let n=t.value.length-1;n>=o.length&&(i[n]._zod.optout==="optional"&&t.value[n]===void 0);n--)t.value.length=n;return t}var cc=p("$ZodRecord",(e,t)=>{N.init(e,t);let i=ie.memoizer;i?.attach(e),e._zod.parse=(o,r)=>{let n=o.value;if(!we(n))return o.issues.push({expected:"record",code:"invalid_type",input:n,inst:e}),o;let a=[],s=t.keyType._zod.values;if(s&&!t.partial){o.value=i?i.alloc(e,o,{},r):{};let u=new Set;for(let l of s)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){if(u.add(typeof l=="number"?l.toString():l),l==="__proto__")continue;let d=t.keyType._zod.run({value:l,issues:[]},r);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(d.issues.length){o.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(v=>he(v,r,H())),input:l,path:[l],inst:e});continue}let m=d.value;if(m==="__proto__")continue;let f=t.valueType._zod.run({value:n[l],issues:[]},r);f instanceof Promise?a.push(f.then(v=>{v.issues.length&&o.issues.push(...ve(l,v.issues)),o.value[m]=v.value})):(f.issues.length&&o.issues.push(...ve(l,f.issues)),o.value[m]=f.value)}let c;for(let l in n)if(!u.has(l))if(t.mode==="loose"){if(l==="__proto__")continue;o.value[l]=n[l]}else c=c??[],c.push(l);c&&c.length>0&&o.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:c,continue:!0})}else{o.value=i?i.alloc(e,o,{},r):{};let u;for(let c of Reflect.ownKeys(n)){if(c==="__proto__"||!Object.prototype.propertyIsEnumerable.call(n,c))continue;let l=t.keyType._zod.run({value:c,issues:[]},r);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof c=="string"&&Ze.test(c)&&l.issues.length){let v=t.keyType._zod.run({value:Number(c),issues:[]},r);if(v instanceof Promise)throw new Error("Async schemas not supported in object keys currently");v.issues.length===0&&(l=v)}if(l.issues.length){t.mode==="loose"?o.value[c]=n[c]:s?(u=u??[],u.push(c)):o.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(v=>he(v,r,H())),input:c,path:[c],inst:e});continue}let m=l.value;if(m==="__proto__")continue;let f=t.valueType._zod.run({value:n[c],issues:[]},r);f instanceof Promise?a.push(f.then(v=>{v.issues.length&&o.issues.push(...ve(c,v.issues)),o.value[m]=v.value})):(f.issues.length&&o.issues.push(...ve(c,f.issues)),o.value[m]=f.value)}u&&u.length>0&&o.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:u,continue:!0})}return a.length?Promise.all(a).then(()=>o):o}}),uc=p("$ZodMap",(e,t)=>{N.init(e,t);let i=ie.memoizer;i?.attach(e),e._zod.parse=(o,r)=>{let n=o.value;if(!(n instanceof Map))return o.issues.push({expected:"map",code:"invalid_type",input:n,inst:e}),o;let a=[];o.value=i?i.alloc(e,o,new Map,r):new Map;let s=r?.abortEarly,u=o.issues.length;for(let[c,l]of n){if(s&&o.issues.length!==u){if(de(o,u))break;u=o.issues.length}let d=t.keyType._zod.run({value:c,issues:[]},r),m=t.valueType._zod.run({value:l,issues:[]},r);d instanceof Promise||m instanceof Promise?a.push(Promise.all([d,m]).then(([f,v])=>{gm(f,v,o,c,n,e,r)})):gm(d,m,o,c,n,e,r)}return a.length?Promise.all(a).then(()=>o):o}});function gm(e,t,i,o,r,n,a){e.issues.length&&(pr.has(typeof o)?i.issues.push(...ve(o,e.issues)):i.issues.push({code:"invalid_key",origin:"map",input:r,inst:n,issues:e.issues.map(s=>he(s,a,H()))})),t.issues.length&&(pr.has(typeof o)?i.issues.push(...ve(o,t.issues)):i.issues.push({origin:"map",code:"invalid_element",input:r,inst:n,key:o,issues:t.issues.map(s=>he(s,a,H()))})),i.value.set(e.value,t.value)}var lc=p("$ZodSet",(e,t)=>{N.init(e,t);let i=ie.memoizer;i?.attach(e),e._zod.parse=(o,r)=>{let n=o.value;if(!(n instanceof Set))return o.issues.push({input:n,inst:e,expected:"set",code:"invalid_type"}),o;let a=[];o.value=i?i.alloc(e,o,new Set,r):new Set;let s=r?.abortEarly,u=o.issues.length;for(let c of n){if(s&&o.issues.length!==u){if(de(o,u))break;u=o.issues.length}let l=t.valueType._zod.run({value:c,issues:[]},r);l instanceof Promise?a.push(l.then(d=>vm(d,o))):vm(l,o)}return a.length?Promise.all(a).then(()=>o):o}});function vm(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var dc=p("$ZodEnum",(e,t)=>{N.init(e,t);let i=wt(t.entries),o=new Set(i);e._zod.values=o,R(e,"pattern",r=>{let n=wt(r.def.entries).filter(a=>pr.has(typeof a));return new RegExp(n.length?`^(${n.map(a=>Ie(a.toString())).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(r,n)=>{let a=r.value;return o.has(a)||r.issues.push({code:"invalid_value",values:i,input:a,inst:e}),r}}),mc=p("$ZodLiteral",(e,t)=>{N.init(e,t);let i=new Set(t.values);e._zod.values=i,R(e,"pattern",o=>{let r=o.def.values;return new RegExp(r.length?`^(${r.map(n=>typeof n=="string"?Ie(n):n?Ie(n.toString()):String(n)).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(o,r)=>{let n=o.value;return i.has(n)||o.issues.push({code:"invalid_value",values:t.values,input:n,inst:e}),o}}),fc=p("$ZodFile",(e,t)=>{N.init(e,t),e._zod.parse=(i,o)=>{let r=i.value;return r instanceof File||i.issues.push({expected:"file",code:"invalid_type",input:r,inst:e}),i}}),pc=p("$ZodTransform",(e,t)=>{N.init(e,t),e._zod.optin="optional",ie.memoizer?.guard(e),e._zod.parse=(i,o)=>{if(o.direction==="backward")throw new Ke(e.constructor.name);let r=t.transform(i.value,i);if(o.async)return(r instanceof Promise?r:Promise.resolve(r)).then(a=>(i.value=a,i));if(r instanceof Promise)throw new $e;return i.value=r,i}});function hm(e,t){return e.value=t.issues.length?void 0:t.value,e}var ai=p("$ZodOptional",(e,t)=>{N.init(e,t),R(e,"optin",i=>i.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),e._zod.optout="optional",R(e,"values",i=>{let o=i.def.innerType._zod.values;return o?new Set([...o,void 0]):void 0}),R(e,"pattern",i=>{let o=i.def.innerType._zod.pattern;return o?new RegExp(`^(${Re(o.source)})?$`):void 0}),e._zod.parse=(i,o)=>{if(i.value===void 0){if(t.innerType._zod.optin!=="defaulted")return i;let r=t.innerType._zod.run({value:i.value,issues:[]},o);return r instanceof Promise?r.then(n=>hm(i,n)):hm(i,r)}return t.innerType._zod.run(i,o)}}),gc=p("$ZodExactOptional",(e,t)=>{ai.init(e,t),R(e,"values",i=>i.def.innerType._zod.values),R(e,"pattern",i=>i.def.innerType._zod.pattern),e._zod.parse=(i,o)=>t.innerType._zod.run(i,o)}),vc=p("$ZodNullable",(e,t)=>{N.init(e,t),R(e,"optin",i=>i.def.innerType._zod.optin),R(e,"optout",i=>i.def.innerType._zod.optout),R(e,"pattern",i=>{let o=i.def.innerType._zod.pattern;return o?new RegExp(`^(${Re(o.source)}|null)$`):void 0}),R(e,"values",i=>i.def.innerType._zod.values?new Set([...i.def.innerType._zod.values,null]):void 0),e._zod.parse=(i,o)=>i.value===null?i:t.innerType._zod.run(i,o)}),hc=p("$ZodDefault",(e,t)=>{N.init(e,t),e._zod.optin="defaulted",R(e,"values",i=>i.def.innerType._zod.values),e._zod.parse=(i,o)=>{if(o.direction==="backward")return t.innerType._zod.run(i,o);if(i.value===void 0)return i.value=t.defaultValue,i;let r=t.innerType._zod.run(i,o);return r instanceof Promise?r.then(n=>$m(n,t)):$m(r,t)}});function $m(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var $c=p("$ZodPrefault",(e,t)=>{N.init(e,t),e._zod.optin="defaulted",R(e,"values",i=>i.def.innerType._zod.values),e._zod.parse=(i,o)=>(o.direction==="backward"||i.value===void 0&&(i.value=t.defaultValue),t.innerType._zod.run(i,o))}),yc=p("$ZodNonOptional",(e,t)=>{N.init(e,t),R(e,"values",i=>{let o=i.def.innerType._zod.values;return o?new Set([...o].filter(r=>r!==void 0)):void 0}),e._zod.parse=(i,o)=>{let r=t.innerType._zod.run(i,o);return r instanceof Promise?r.then(n=>ym(n,e)):ym(r,e)}});function ym(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var _c=p("$ZodSuccess",(e,t)=>{N.init(e,t),e._zod.parse=(i,o)=>{if(o.direction==="backward")throw new Ke("ZodSuccess");let r=t.innerType._zod.run(i,o);return r instanceof Promise?r.then(n=>(i.value=n.issues.length===0,i)):(i.value=r.issues.length===0,i)}});function _m(e,t,i,o){return t.issues.length?(e.value=i.catchValue({...t,value:e.value,error:{issues:t.issues.map(r=>he(r,o,H()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var bc=p("$ZodCatch",(e,t)=>{N.init(e,t),R(e,"optin",i=>i.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),R(e,"optout",i=>i.def.innerType._zod.optout),R(e,"values",i=>i.def.innerType._zod.values),e._zod.parse=(i,o)=>{if(o.direction==="backward")return t.innerType._zod.run(i,o);let r=t.innerType._zod.run({value:i.value,issues:[]},o);return r instanceof Promise?r.then(n=>_m(i,n,t,o)):_m(i,r,t,o)}}),kc=p("$ZodNaN",(e,t)=>{N.init(e,t),e._zod.parse=(i,o)=>((typeof i.value!="number"||!Number.isNaN(i.value))&&i.issues.push({input:i.value,inst:e,expected:"nan",code:"invalid_type"}),i)}),si=p("$ZodPipe",(e,t)=>{N.init(e,t),R(e,"values",i=>i.def.in._zod.values),R(e,"optin",i=>i.def.in._zod.optin),R(e,"optout",i=>i.def.out._zod.optout),R(e,"propValues",i=>i.def.in._zod.propValues),e._zod.parse=(i,o)=>{if(o.direction==="backward"){let n=t.out._zod.run(i,o);return n instanceof Promise?n.then(a=>Vn(a,t.in,o)):Vn(n,t.in,o)}let r=t.in._zod.run(i,o);return r instanceof Promise?r.then(n=>Vn(n,t.out,o)):Vn(r,t.out,o)}});function Vn(e,t,i){return e.issues.some(o=>o.code!=="unrecognized_keys")?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},i)}var Nr=p("$ZodCodec",(e,t)=>{N.init(e,t),R(e,"values",i=>i.def.in._zod.values),R(e,"optin",i=>i.def.in._zod.optin),R(e,"optout",i=>i.def.out._zod.optout),R(e,"propValues",i=>i.def.in._zod.propValues),e._zod.parse=(i,o)=>{if((o.direction||"forward")==="forward"){let n=t.in._zod.run(i,o);return n instanceof Promise?n.then(a=>Jn(a,t,o)):Jn(n,t,o)}else{let n=t.out._zod.run(i,o);return n instanceof Promise?n.then(a=>Jn(a,t,o)):Jn(n,t,o)}}});function Jn(e,t,i){if(e.issues.length)return e.aborted=!0,e;if((i.direction||"forward")==="forward"){let r=t.transform(e.value,e);return r instanceof Promise?r.then(n=>Bn(e,n,t.out,i)):Bn(e,r,t.out,i)}else{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(n=>Bn(e,n,t.in,i)):Bn(e,r,t.in,i)}}function Bn(e,t,i,o){return e.issues.length?(e.aborted=!0,e):i._zod.run({value:t,issues:e.issues},o)}var xc=p("$ZodPreprocess",(e,t)=>{si.init(e,t)}),wc=p("$ZodReadonly",(e,t)=>{N.init(e,t),R(e,"propValues",i=>i.def.innerType._zod.propValues),R(e,"values",i=>i.def.innerType._zod.values),R(e,"optin",i=>i.def.innerType?._zod?.optin),R(e,"optout",i=>i.def.innerType?._zod?.optout),e._zod.parse=(i,o)=>{if(o.direction==="backward")return t.innerType._zod.run(i,o);let r=t.innerType._zod.run(i,o);return r instanceof Promise?r.then(bm):bm(r)}});function bm(e){return e.memo||(e.value=Object.freeze(e.value)),e}function X$(e){let t=e._zod.def,i=t.pattern,o=!!t.format?.includes("int"),r,n;for(let s of t.checks??[]){let u=s._zod.def;u.pattern&&(i=u.pattern),o||(o=!!u.format?.includes("int"));let c=u.minimum??u.length,l=u.maximum??u.length;c!==void 0&&(r===void 0||c>r)&&(r=c),l!==void 0&&(n===void 0||l<n)&&(n=l)}if(i)return i.source;if(r!==void 0&&n!==void 0&&r>n)return"(?!)";if(r!==void 0||n!==void 0)return La({minimum:r,maximum:n}).source;let a=e._zod.pattern;return(o&&a===Ze?Ir:a)?.source}function vs(e){let t=e._zod.def,i=e._zod.pattern?.source,o=t.innerType??e._zod.innerType;if(o){let r=o._zod.pattern?.source,n=vs(o);return i&&r&&n&&n!==r?i.replace(Re(r),()=>Re(n)):i}if(t.options){let r=t.options.map(vs);if(r.every(Boolean))return`^(${r.map(n=>Re(n)).join("|")})$`}return X$(e)}var Ic=p("$ZodTemplateLiteral",(e,t)=>{N.init(e,t);let i=[];for(let o of t.parts)if(typeof o=="object"&&o!==null){let r=vs(o);if(!r)throw new Error(`Invalid template literal part, no pattern found: ${[...o._zod.traits].shift()}`);i.push(Re(r))}else if(o===null||ea.has(typeof o))i.push(Ie(`${o}`));else throw new Error(`Invalid template literal part: ${o}`);e._zod.pattern=new RegExp(`^${i.join("")}$`),e._zod.parse=(o,r)=>typeof o.value!="string"?(o.issues.push({input:o.value,inst:e,expected:"string",code:"invalid_type"}),o):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(o.value)||o.issues.push({input:o.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),o)}),Sc=p("$ZodFunction",(e,t)=>(N.init(e,t),Object.defineProperty(e,"_def",{value:t}),e._zod.def=t,e.implement=i=>{if(typeof i!="function")throw new Error("implement() must be called with a function");return Object.defineProperty(function(...o){let r=e._def.input?zn(e._def.input,o):o,n=Reflect.apply(i,this,r);return e._def.output?zn(e._def.output,n):n},"_zod",{value:e._zod,enumerable:!1})},e.implementAsync=i=>{if(typeof i!="function")throw new Error("implementAsync() must be called with a function");return Object.defineProperty(async function(...o){let r=e._def.input?await jn(e._def.input,o):o,n=await Reflect.apply(i,this,r);return e._def.output?await jn(e._def.output,n):n},"_zod",{value:e._zod,enumerable:!1})},e._zod.parse=(i,o)=>typeof i.value!="function"?(i.issues.push({code:"invalid_type",expected:"function",input:i.value,inst:e}),i):(e._def.output&&e._def.output._zod.def.type==="promise"?i.value=e.implementAsync(i.value):i.value=e.implement(i.value),i),e.input=(...i)=>{let o=e.constructor;return Array.isArray(i[0])?new o({type:"function",input:new oi({type:"tuple",items:i[0],rest:i[1]}),output:e._def.output}):new o({type:"function",input:i[0],output:e._def.output})},e.output=i=>{let o=e.constructor;return new o({type:"function",input:e._def.input,output:i})},e)),zc=p("$ZodPromise",(e,t)=>{N.init(e,t),e._zod.parse=(i,o)=>Promise.resolve(i.value).then(r=>t.innerType._zod.run({value:r,issues:[]},o))}),Tr=p("$ZodLazy",(e,t)=>{N.init(e,t),Ho(e._zod,"innerType",()=>{let i=t;return i._cachedInner||(i._cachedInner=t.getter()),i._cachedInner}),R(e,"pattern",i=>i.innerType?._zod?.pattern),R(e,"propValues",i=>i.innerType?._zod?.propValues),R(e,"optin",i=>i.innerType?._zod?.optin??void 0),R(e,"optout",i=>i.innerType?._zod?.optout??void 0),e._zod.parse=(i,o)=>e._zod.innerType._zod.run(i,o)}),jc=p("$ZodCustom",(e,t)=>{W.init(e,t),N.init(e,t),e._zod.parse=(i,o)=>i,e._zod.check=i=>{let o=i.value,r=t.fn(o);if(r instanceof Promise)return r.then(n=>km(n,i,o,e));km(r,i,o,e)}});function km(e,t,i,o){if(!e){let r={code:"custom",input:i,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(r.params=o._zod.def.params),t.issues.push(jt(r))}}var di=class extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}},Oc="~memo",Om=[];function Em(e){return e!==null&&typeof e=="object"}function Pc(e){return e.map(t=>t.path?{...t,path:t.path.slice()}:{...t})}var Um=new WeakMap,Nt=0,li=1,Cr=2;function Rr(e,t,i){let o=Um.get(e);if(o!==void 0)return o?Cr:Nt;if(t.has(e))return Cr;t.add(e);let r=Nt,n=l=>{if(r!==Cr&&l?._zod){let d=Rr(l,t,i);d>r&&(r=d)}},a=(l,d)=>{let m=Nt;for(let f of Reflect.ownKeys(l)){let v=Object.getOwnPropertyDescriptor(l,f);if(d&&!v.enumerable)continue;let h=v.get?li:v.value?._zod?Rr(v.value,t,i):Nt;h>m&&(m=h)}return m},s=l=>{l>r&&(r=l)},u=e._zod.def,c=u.type;switch(c){case"object":{let l=zt(u);s(l?a(l,!0):li),n(u.catchall);break}case"array":n(u.element);break;case"tuple":for(let l of u.items)n(l);n(u.rest);break;case"record":case"map":n(u.keyType),n(u.valueType);break;case"set":n(u.valueType);break;case"union":for(let l of u.options)n(l);break;case"intersection":n(u.left),n(u.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":n(u.innerType);break;case"pipe":n(u.in),n(u.out);break;case"function":n(u.input),n(u.output);break;case"lazy":{let l=u._cachedInner??(i?e._zod.innerType:void 0);s(l?Rr(l,t,!1):li);break}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(let l in u){let d=Object.getOwnPropertyDescriptor(u,l);if(!d||d.get)continue;let m=d.value;if(!(!m||typeof m!="object")){if(m._zod)n(m);else if(Array.isArray(m))for(let f of m)n(f)}}}return t.delete(e),H$(e,r)}function H$(e,t){return t!==li&&Um.set(e,t===Cr),t}function mi(e){return Rr(e,new Set,!0)!==Nt}function Y$(e,t){let i=e.buckets.get(t);return i||(i=new WeakMap,e.buckets.set(t,i)),i}var ci,ui=[],Q$={alloc(e,t,i){let o=ci;if(!o)return i;ci=void 0;let r={value:i,issues:null};return o.set(t.value,r),ui.push(r),i},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let i=e._zod.parse,o=(r,n)=>{if(n.direction!=="backward"&&fi(n,r.value))throw new di;return i(r,n)};e._zod.parse=o,e._zod.run===i&&(e._zod.run=o)})},attach(e){var t;let i,o=!1,r,n;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let a=e._zod.parse,s=(u,c)=>{if(i===void 0){let E=Rr(e,new Set,!1);if(E===Nt)return e._zod.parse=a,e._zod.run===s&&(e._zod.run=a),a(u,c);E===Cr||o?i=!0:o=!0}let l=u.value;if(!Em(l))return a(u,c);let d=c[Oc];d||(d={buckets:new WeakMap,backEdges:void 0},c[Oc]=d);let m;r===c?m=n:(m=Y$(d,e),r=c,n=m);let f=m.get(l);if(f)return u.value=f.value,f.issues?f.issues.length&&u.issues.push(...Pc(f.issues)):(u.memo=!0,d.backEdges??(d.backEdges=new WeakSet),d.backEdges.add(f.value)),u;ci=m;let v=ui.length,h=a(u,c);ci=void 0;let b=ui.length>v?ui.pop():void 0;return h instanceof Promise?h.then(E=>(b&&(b.issues=E.issues.length?Pc(E.issues):Om),E)):(b&&(b.issues=h.issues.length?Pc(h.issues):Om),h)};e._zod.parse=s,e._zod.run===a&&(e._zod.run=s)})}};function Zr(){return Q$}function fi(e,t){let i=e[Oc]?.backEdges;return i!==void 0&&Em(t)&&i.has(t)}var Fr={};Te(Fr,{ar:()=>Dm,az:()=>Am,be:()=>Tm,bg:()=>Cm,bn:()=>Rm,ca:()=>Zm,ckb:()=>Lm,cs:()=>Fm,da:()=>Mm,de:()=>Vm,el:()=>Jm,en:()=>pi,eo:()=>Bm,es:()=>Km,fa:()=>Wm,fi:()=>Gm,fr:()=>qm,frCA:()=>Xm,gu:()=>Hm,he:()=>Ym,hi:()=>Qm,hr:()=>ef,hu:()=>tf,hy:()=>nf,id:()=>of,is:()=>af,it:()=>sf,ja:()=>cf,ka:()=>uf,kh:()=>lf,km:()=>gi,kn:()=>df,ko:()=>mf,lt:()=>pf,mk:()=>gf,ms:()=>vf,ne:()=>hf,nl:()=>$f,nn:()=>yf,no:()=>_f,ota:()=>bf,pl:()=>xf,ps:()=>kf,pt:()=>wf,ptBR:()=>If,ro:()=>Sf,ru:()=>jf,sk:()=>Pf,sl:()=>Of,sv:()=>Ef,ta:()=>Uf,tg:()=>Df,th:()=>Af,tk:()=>Nf,tr:()=>Tf,ua:()=>Cf,uk:()=>vi,ur:()=>Rf,uz:()=>Zf,vi:()=>Lf,yo:()=>Vf,zhCN:()=>Ff,zhTW:()=>Mf});var ey=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},map:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(r){return e[r]??null}let i={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",mac:"\u0639\u0646\u0648\u0627\u0646 MAC",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",credit_card:"\u0631\u0642\u0645 \u0628\u0637\u0627\u0642\u0629 \u0627\u0644\u0627\u0626\u062A\u0645\u0627\u0646",currency_code:"\u0631\u0645\u0632 \u0627\u0644\u0639\u0645\u0644\u0629",iban:"IBAN",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${r.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${n}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`}case"invalid_value":return r.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${y(r.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${g(r.values,"|")}`;case"too_big":{let n=r.inclusive?"<=":"<",a=t(r.origin);return a?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${n} ${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${n} ${r.maximum.toString()}`}case"too_small":{let n=r.inclusive?">=":">",a=t(r.origin);return a?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${n} ${r.minimum.toString()} ${a.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${n} ${r.minimum.toString()}`}case"invalid_format":{let n=r;return n.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${r.prefix}"`:n.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${n.suffix}"`:n.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${n.includes}"`:n.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${n.pattern}`:`${i[n.format]??r.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${r.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${r.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${r.keys.length>1?"\u0629":""}: ${g(r.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${r.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${r.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function Dm(){return{localeError:ey()}}var ty=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"},map:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(r){return e[r]??null}let i={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",credit_card:"kredit kart\u0131 n\xF6mr\u0259si",currency_code:"valyuta kodu",iban:"IBAN",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${r.expected}, daxil olan ${s}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${n}, daxil olan ${s}`}case"invalid_value":return r.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${y(r.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${g(r.values,"|")}`;case"too_big":{let n=r.inclusive?"<=":"<",a=t(r.origin);return a?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${n}${r.maximum.toString()} ${a.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${n}${r.maximum.toString()}`}case"too_small":{let n=r.inclusive?">=":">",a=t(r.origin);return a?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${n}${r.minimum.toString()} ${a.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${n}${r.minimum.toString()}`}case"invalid_format":{let n=r;return n.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${n.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:n.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${n.suffix}" il\u0259 bitm\u0259lidir`:n.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${n.includes}" daxil olmal\u0131d\u0131r`:n.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${n.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${i[n.format]??r.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${r.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${r.keys.length>1?"lar":""}: ${g(r.keys,", ")}`;case"invalid_key":return`${r.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${r.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function Am(){return{localeError:ty()}}function Nm(e,t,i,o){let r=Math.abs(e),n=r%10,a=r%100;return a>=11&&a<=19?o:n===1?t:n>=2&&n<=4?i:o}var ry=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},map:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(r){return e[r]??null}let i={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",mac:"MAC \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",credit_card:"\u043D\u0443\u043C\u0430\u0440 \u043A\u0440\u044D\u0434\u044B\u0442\u043D\u0430\u0439 \u043A\u0430\u0440\u0442\u044B",currency_code:"\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u044B",iban:"IBAN",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},o={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${r.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${n}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`}case"invalid_value":return r.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${y(r.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${g(r.values,"|")}`;case"too_big":{let n=r.inclusive?"<=":"<",a=t(r.origin);if(a){let s=Number(r.maximum),u=Nm(s,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${n}${r.maximum.toString()} ${u}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${n}${r.maximum.toString()}`}case"too_small":{let n=r.inclusive?">=":">",a=t(r.origin);if(a){let s=Number(r.minimum),u=Nm(s,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${n}${r.minimum.toString()} ${u}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${n}${r.minimum.toString()}`}case"invalid_format":{let n=r;return n.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${n.prefix}"`:n.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${n.suffix}"`:n.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${n.includes}"`:n.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${n.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${i[n.format]??r.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${r.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${g(r.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${r.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${r.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function Tm(){return{localeError:ry()}}var ny=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},map:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(r){return e[r]??null}let i={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",mac:"MAC \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",credit_card:"\u043D\u043E\u043C\u0435\u0440 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u0430 \u043A\u0430\u0440\u0442\u0430",currency_code:"\u043A\u043E\u0434 \u043D\u0430 \u0432\u0430\u043B\u0443\u0442\u0430",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${r.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${n}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${y(r.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${g(r.values,"|")}`;case"too_big":{let n=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${n}${r.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${n}${r.maximum.toString()}`}case"too_small":{let n=r.inclusive?">=":">",a=t(r.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${n}${r.minimum.toString()} ${a.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${n}${r.minimum.toString()}`}case"invalid_format":{let n=r;if(n.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${n.prefix}"`;if(n.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${n.suffix}"`;if(n.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${n.includes}"`;if(n.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${n.pattern}`;let a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return n.format==="emoji"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),n.format==="datetime"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),n.format==="date"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),n.format==="time"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),n.format==="duration"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${a} ${i[n.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${r.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u043E\u0432\u0435":""}: ${g(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${r.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function Cm(){return{localeError:ny()}}var iy=()=>{let e={string:{unit:"\u0985\u0995\u09CD\u09B7\u09B0",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},file:{unit:"\u09AC\u09BE\u0987\u099F",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},array:{unit:"\u0986\u0987\u099F\u09C7\u09AE",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},set:{unit:"\u0986\u0987\u099F\u09C7\u09AE",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},map:{unit:"\u098F\u09A8\u09CD\u099F\u09CD\u09B0\u09BF",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"}};function t(r){return e[r]??null}let i={regex:"\u0987\u09A8\u09AA\u09C1\u099F",email:"\u0987\u09AE\u09C7\u0987\u09B2 \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",url:"URL",emoji:"\u0987\u09AE\u09CB\u099C\u09BF",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u09A4\u09BE\u09B0\u09BF\u0996 \u0993 \u09B8\u09AE\u09AF\u09BC",date:"ISO \u09A4\u09BE\u09B0\u09BF\u0996",time:"ISO \u09B8\u09AE\u09AF\u09BC",duration:"ISO \u09B8\u09AE\u09AF\u09BC\u0995\u09BE\u09B2",ipv4:"IPv4 \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",ipv6:"IPv6 \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",mac:"MAC \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",cidrv4:"IPv4 \u09B0\u09C7\u099E\u09CD\u099C",cidrv6:"IPv6 \u09B0\u09C7\u099E\u09CD\u099C",base64:"base64-\u098F\u09A8\u0995\u09CB\u09A1\u09C7\u09A1 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",base64url:"base64url-\u098F\u09A8\u0995\u09CB\u09A1\u09C7\u09A1 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",json_string:"JSON \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",e164:"E.164 \u09A8\u09AE\u09CD\u09AC\u09B0",credit_card:"\u0995\u09CD\u09B0\u09C7\u09A1\u09BF\u099F \u0995\u09BE\u09B0\u09CD\u09A1 \u09A8\u09AE\u09CD\u09AC\u09B0",currency_code:"\u09AE\u09C1\u09A6\u09CD\u09B0\u09BE \u0995\u09CB\u09A1",iban:"IBAN",jwt:"JWT",template_literal:"\u0987\u09A8\u09AA\u09C1\u099F"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return`\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F: \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4 ${n}, \u09AA\u09CD\u09B0\u09BE\u09AA\u09CD\u09A4 ${s}`}case"invalid_value":return r.values.length===1?`\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F: \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4 ${y(r.values[0])}`:`\u0985\u09AC\u09C8\u09A7 \u0985\u09AA\u09B6\u09A8: ${g(r.values," | ")} \u098F\u09B0 \u09AE\u09A7\u09CD\u09AF\u09C7 \u098F\u0995\u099F\u09BF \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4`;case"too_big":{let n=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0985\u09A8\u09C7\u0995 \u09AC\u09A1\u09BC: ${r.origin??"\u09AE\u09BE\u09A8"} ${n}${r.maximum.toString()} ${a.unit??"\u098F\u09B2\u09BF\u09AE\u09C7\u09A8\u09CD\u099F"} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:`\u0985\u09A8\u09C7\u0995 \u09AC\u09A1\u09BC: ${r.origin??"\u09AE\u09BE\u09A8"} ${n}${r.maximum.toString()} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`}case"too_small":{let n=r.inclusive?">=":">",a=t(r.origin);return a?`\u0985\u09A8\u09C7\u0995 \u099B\u09CB\u099F: ${r.origin} ${n}${r.minimum.toString()} ${a.unit} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:`\u0985\u09A8\u09C7\u0995 \u099B\u09CB\u099F: ${r.origin} ${n}${r.minimum.toString()} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`}case"invalid_format":{let n=r;return n.format==="starts_with"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: "${n.prefix}" \u09A6\u09BF\u09AF\u09BC\u09C7 \u09B6\u09C1\u09B0\u09C1 \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:n.format==="ends_with"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: "${n.suffix}" \u09A6\u09BF\u09AF\u09BC\u09C7 \u09B6\u09C7\u09B7 \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:n.format==="includes"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: "${n.includes}" \u0985\u09A8\u09CD\u09A4\u09B0\u09CD\u09AD\u09C1\u0995\u09CD\u09A4 \u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7`:n.format==="regex"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: ${n.pattern} \u09AA\u09CD\u09AF\u09BE\u099F\u09BE\u09B0\u09CD\u09A8 \u09AE\u09BF\u09B2\u09A4\u09C7 \u09B9\u09AC\u09C7`:`\u0985\u09AC\u09C8\u09A7 ${i[n.format]??r.format}`}case"not_multiple_of":return`\u0985\u09AC\u09C8\u09A7 \u09A8\u09AE\u09CD\u09AC\u09B0: ${r.divisor} \u098F\u09B0 \u0997\u09C1\u09A3\u09BF\u09A4\u0995 \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`;case"unrecognized_keys":return`\u0985\u099A\u09C7\u09A8\u09BE \u0995\u09C0${r.keys.length>1?"\u0997\u09C1\u09B2\u09CB":""}: ${g(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u098F \u0985\u09AC\u09C8\u09A7 \u0995\u09C0`;case"invalid_union":return r.options&&Array.isArray(r.options)&&r.options.length>0?`\u0985\u09AC\u09C8\u09A7 \u09A1\u09BF\u09B8\u0995\u09CD\u09B0\u09BF\u09AE\u09BF\u09A8\u09C7\u099F\u09B0 \u09AE\u09BE\u09A8\u0964 \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4 ${r.options.map(a=>`'${a}'`).join(" | ")}`:"\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F";case"invalid_element":return`${r.origin} \u098F \u0985\u09AC\u09C8\u09A7 \u09AE\u09BE\u09A8`;default:return"\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F"}}};function Rm(){return{localeError:iy()}}var oy=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"},map:{unit:"elements",verb:"contenir"}};function t(r){return e[r]??null}let i={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",mac:"adre\xE7a MAC",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",credit_card:"n\xFAmero de targeta de cr\xE8dit",currency_code:"codi de moneda",iban:"IBAN",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${r.expected}, s'ha rebut ${s}`:`Tipus inv\xE0lid: s'esperava ${n}, s'ha rebut ${s}`}case"invalid_value":return r.values.length===1?`Valor inv\xE0lid: s'esperava ${y(r.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${g(r.values," o ")}`;case"too_big":{let n=r.inclusive?"com a m\xE0xim":"menys de",a=t(r.origin);return a?`Massa gran: s'esperava que ${r.origin??"el valor"} contingu\xE9s ${n} ${r.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${r.origin??"el valor"} fos ${n} ${r.maximum.toString()}`}case"too_small":{let n=r.inclusive?"com a m\xEDnim":"m\xE9s de",a=t(r.origin);return a?`Massa petit: s'esperava que ${r.origin} contingu\xE9s ${n} ${r.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${r.origin} fos ${n} ${r.minimum.toString()}`}case"invalid_format":{let n=r;return n.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${n.prefix}"`:n.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${n.suffix}"`:n.format==="includes"?`Format inv\xE0lid: ha d'incloure "${n.includes}"`:n.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${n.pattern}`:`Format inv\xE0lid per a ${i[n.format]??r.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${r.divisor}`;case"unrecognized_keys":return`Clau${r.keys.length>1?"s":""} no reconeguda${r.keys.length>1?"s":""}: ${g(r.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${r.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${r.origin}`;default:return"Entrada inv\xE0lida"}}};function Zm(){return{localeError:oy()}}var ay=()=>{let e={string:{unit:"\u067E\u06CC\u062A",verb:"\u0628\u06CE\u062A"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u0628\u06CE\u062A"},array:{unit:"\u062F\u0627\u0646\u06D5",verb:"\u0628\u06CE\u062A"},set:{unit:"\u062F\u0627\u0646\u06D5",verb:"\u0628\u06CE\u062A"},map:{unit:"\u062F\u0627\u0646\u06D5",verb:"\u0628\u06CE\u062A"}};function t(r){return e[r]??null}let i={regex:"regex",email:"\u0626\u06CC\u0645\u06D5\u06CC\u06B5",url:"\u0628\u06D5\u0633\u062A\u06D5\u0631 (URL)",emoji:"\u0626\u06CC\u0645\u06C6\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0695\u06CE\u06A9\u06D5\u0648\u062A \u0648 \u06A9\u0627\u062A",date:"\u0695\u06CE\u06A9\u06D5\u0648\u062A",time:"\u06A9\u0627\u062A",duration:"\u0645\u0627\u0648\u06D5",ipv4:"\u0646\u0627\u0648\u0646\u06CC\u0634\u0627\u0646\u06CC IPv4",ipv6:"\u0646\u0627\u0648\u0646\u06CC\u0634\u0627\u0646\u06CC IPv6",mac:"\u0646\u0627\u0648\u0646\u06CC\u0634\u0627\u0646\u06CC MAC",cidrv4:"\u0645\u06D5\u0648\u062F\u0627\u06CC IPv4",cidrv6:"\u0645\u06D5\u0648\u062F\u0627\u06CC IPv6",base64:"\u062F\u06D5\u0642\u06CC base64",base64url:"\u062F\u06D5\u0642\u06CC base64url",json_string:"\u062F\u06D5\u0642\u06CC JSON",e164:"\u0698\u0645\u0627\u0631\u06D5\u06CC E.164",credit_card:"\u0698\u0645\u0627\u0631\u06D5\u06CC \u06A9\u0627\u0631\u062A\u06CC \u06A9\u0631\u06CE\u062F\u06CC\u062A",currency_code:"\u06A9\u06C6\u062F\u06CC \u062F\u0631\u0627\u0648",iban:"IBAN",jwt:"JWT",template_literal:"\u062A\u06CE\u06A9\u0631\u062F\u06D5"},o={nan:"NaN",string:"\u0646\u0648\u0648\u0633\u06CC\u0646",number:"\u0698\u0645\u0627\u0631\u06D5",boolean:"boolean",array:"array",object:"object",date:"\u0695\u06CE\u06A9\u06D5\u0648\u062A",integer:"\u0698\u0645\u0627\u0631\u06D5",float:"\u0698\u0645\u0627\u0631\u06D5",null:"null",undefined:"undefined",function:"function",symbol:"symbol",unknown:"unknown",promise:"promise",void:"void",never:"never",map:"map",set:"set"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a,u=["\u0627","\u0648","\u06C6","\u0648\u0648","\u06D5","\u06CC","\u06CE"].some(l=>s.endsWith(l))?"\u06CC\u06D5":"\u06D5",c=/^[a-zA-Z]+$/.test(s);return a==="null"||a==="undefined"?"\u062F\u0627\u0648\u0627\u06A9\u0631\u0627\u0648\u06D5":`\u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648\u06D5 ${n} \u0628\u06CE\u062A\u060C \u0628\u06D5\u06B5\u0627\u0645 ${s}${c?"":u}`}case"invalid_value":return r.values.length===1?`\u0628\u06D5\u0647\u0627\u06A9\u06D5 \u0646\u0627\u062F\u0631\u0648\u0648\u0633\u062A\u06D5: \u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648\u06D5 ${y(r.values[0])} \u0628\u06CE\u062A`:`\u0647\u06D5\u06B5\u0628\u0698\u0627\u0631\u062F\u06D5\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648\u06D5 \u06CC\u06D5\u06A9\u06CE\u06A9 \u0628\u06CE\u062A \u0644\u06D5 ${g(r.values,"|")}`;case"too_big":{let n=t(r.origin);return n?`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u0632\u06C6\u0631\u06D5\u0648\u06D5 ${r.maximum.toString()} ${n.unit} ${n.verb}`:`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u0632\u06C6\u0631\u06D5\u0648\u06D5 ${r.maximum.toString()} \u0628\u06CE\u062A`}case"too_small":{let n=t(r.origin);return n?`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u06A9\u06D5\u0645\u06D5\u0648\u06D5 ${r.minimum.toString()} ${n.unit} ${n.verb}`:`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u06A9\u06D5\u0645\u06D5\u0648\u06D5 ${r.minimum.toString()} \u0628\u06CE\u062A`}case"invalid_format":{let n=r;return n.format==="starts_with"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u062F\u06D5\u0633\u062A\u067E\u06CE\u0628\u06A9\u0627\u062A \u0628\u06D5 "${n.prefix}"`:n.format==="ends_with"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u06A9\u06C6\u062A\u0627\u06CC\u06CC\u0628\u06CE\u062A \u0628\u06D5 "${n.suffix}"`:n.format==="includes"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 "${n.includes}" \u0644\u06D5\u062E\u06C6\u0628\u06AF\u0631\u06CE\u062A`:n.format==="regex"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0644\u06D5\u06AF\u06D5\u06B5 \u067E\u0627\u062A\u06CE\u0631\u0646\u06CC ${n.pattern} \u0628\u06AF\u0648\u0646\u062C\u06CE\u062A`:`\u0628\u06D5\u0647\u0627\u06CC ${i[n.format]??r.format} \u0646\u0627\u062F\u0631\u0648\u0633\u062A\u06D5`}case"not_multiple_of":return`\u0698\u0645\u0627\u0631\u06D5\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u062F\u06D5\u0628\u06CE\u062A \u0686\u06D5\u0646\u062F \u0647\u06CE\u0646\u062F\u06D5 \u0628\u06CE\u062A \u0628\u06C6 ${r.divisor}`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u0644\u06CC \u0646\u06D5\u0646\u0627\u0633\u0631\u0627\u0648: ${g(r.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u0644\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A \u0644\u06D5 ${r.origin}`;case"invalid_union":return r.options&&Array.isArray(r.options)&&r.options.length>0?`\u0628\u06D5\u0647\u0627\u06CC \u0646\u06D5\u0646\u0627\u0633\u0631\u0627\u0648 \u0647\u06D5\u06CC\u06D5. \u0628\u06D5\u0647\u0627\u06CC \u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648: ${r.options.map(a=>`'${a}'`).join(" | ")}`:"\u06CC\u06D5\u06A9\u06AF\u0631\u062A\u0646\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A";case"invalid_element":return`${r.origin} \u0628\u06D5\u0647\u0627\u06A9\u06D5 \u0646\u0627\u062F\u0631\u0648\u0633\u062A\u06D5`;default:return"\u062A\u06CE\u06A9\u0631\u062F\u06D5\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A"}}};function Lm(){return{localeError:ay()}}var sy=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"},map:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(r){return e[r]??null}let i={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",mac:"MAC adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",credit_card:"\u010D\xEDslo kreditn\xED karty",currency_code:"k\xF3d m\u011Bny",iban:"IBAN",jwt:"JWT",template_literal:"vstup"},o={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${r.expected}, obdr\u017Eeno ${s}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${n}, obdr\u017Eeno ${s}`}case"invalid_value":return r.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${y(r.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${g(r.values,"|")}`;case"too_big":{let n=r.inclusive?"<=":"<",a=t(r.origin);return a?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${n}${r.maximum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${n}${r.maximum.toString()}`}case"too_small":{let n=r.inclusive?">=":">",a=t(r.origin);return a?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${n}${r.minimum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${n}${r.minimum.toString()}`}case"invalid_format":{let n=r;return n.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${n.prefix}"`:n.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${n.suffix}"`:n.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${n.includes}"`:n.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${n.pattern}`:`Neplatn\xFD form\xE1t ${i[n.format]??r.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${r.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${g(r.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${r.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${r.origin}`;default:return"Neplatn\xFD vstup"}}};function Fm(){return{localeError:sy()}}var cy=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"},map:{unit:"elementer",verb:"indeholdt"}};function t(r){return e[r]??null}let i={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kreditkortnummer",currency_code:"valutakode",iban:"IBAN",jwt:"JWT",template_literal:"input"},o={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Ugyldigt input: forventede instanceof ${r.expected}, fik ${s}`:`Ugyldigt input: forventede ${n}, fik ${s}`}case"invalid_value":return r.values.length===1?`Ugyldig v\xE6rdi: forventede ${y(r.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${g(r.values,"|")}`;case"too_big":{let n=r.inclusive?"<=":"<",a=t(r.origin),s=o[r.origin]??r.origin;return a?`For stor: forventede ${s??"value"} ${a.verb} ${n} ${r.maximum.toString()} ${a.unit??"elementer"}`:`For stor: forventede ${s??"value"} havde ${n} ${r.maximum.toString()}`}case"too_small":{let n=r.inclusive?">=":">",a=t(r.origin),s=o[r.origin]??r.origin;return a?`For lille: forventede ${s} ${a.verb} ${n} ${r.minimum.toString()} ${a.unit}`:`For lille: forventede ${s} havde ${n} ${r.minimum.toString()}`}case"invalid_format":{let n=r;return n.format==="starts_with"?`Ugyldig streng: skal starte med "${n.prefix}"`:n.format==="ends_with"?`Ugyldig streng: skal ende med "${n.suffix}"`:n.format==="includes"?`Ugyldig streng: skal indeholde "${n.includes}"`:n.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${n.pattern}`:`Ugyldig ${i[n.format]??r.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${g(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${r.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${r.origin}`;default:return"Ugyldigt input"}}};function Mm(){return{localeError:cy()}}var uy=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"},map:{unit:"Elemente",verb:"zu haben"}};function t(r){return e[r]??null}let i={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",mac:"MAC-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",credit_card:"Kreditkartennummer",currency_code:"W\xE4hrungscode",iban:"IBAN",jwt:"JWT",template_literal:"Eingabe"},o={nan:"NaN",number:"Zahl",array:"Array"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${r.expected}, erhalten ${s}`:`Ung\xFCltige Eingabe: erwartet ${n}, erhalten ${s}`}case"invalid_value":return r.values.length===1?`Ung\xFCltige Eingabe: erwartet ${y(r.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${g(r.values,"|")}`;case"too_big":{let n=r.inclusive?"<=":"<",a=t(r.origin);return a?`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${n}${r.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${n}${r.maximum.toString()} ist`}case"too_small":{let n=r.inclusive?">=":">",a=t(r.origin);return a?`Zu klein: erwartet, dass ${r.origin} ${n}${r.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${r.origin} ${n}${r.minimum.toString()} ist`}case"invalid_format":{let n=r;return n.format==="starts_with"?`Ung\xFCltiger String: muss mit "${n.prefix}" beginnen`:n.format==="ends_with"?`Ung\xFCltiger String: muss mit "${n.suffix}" enden`:n.format==="includes"?`Ung\xFCltiger String: muss "${n.includes}" enthalten`:n.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${n.pattern} entsprechen`:`Ung\xFCltig: ${i[n.format]??r.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${r.divisor} sein`;case"unrecognized_keys":return`${r.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${g(r.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${r.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${r.origin}`;default:return"Ung\xFCltige Eingabe"}}};function Vm(){return{localeError:uy()}}var ly=()=>{let e={string:{unit:"\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},file:{unit:"bytes",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},array:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},set:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},map:{unit:"\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"}};function t(r){return e[r]??null}let i={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",credit_card:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 \u03C0\u03B9\u03C3\u03C4\u03C9\u03C4\u03B9\u03BA\u03AE\u03C2 \u03BA\u03AC\u03C1\u03C4\u03B1\u03C2",currency_code:"\u03BA\u03C9\u03B4\u03B9\u03BA\u03CC\u03C2 \u03BD\u03BF\u03BC\u03AF\u03C3\u03BC\u03B1\u03C4\u03BF\u03C2",iban:"IBAN",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return typeof r.expected=="string"&&/^[A-Z]/.test(r.expected)?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${r.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${s}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${s}`}case"invalid_value":return r.values.length===1?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${y(r.values[0])}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${g(r.values,"|")}`;case"too_big":{let n=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${n}${r.maximum.toString()} ${a.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${n}${r.maximum.toString()}`}case"too_small":{let n=r.inclusive?">=":">",a=t(r.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${n}${r.minimum.toString()} ${a.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${n}${r.minimum.toString()}`}case"invalid_format":{let n=r;return n.format==="starts_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${n.prefix}"`:n.format==="ends_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${n.suffix}"`:n.format==="includes"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${n.includes}"`:n.format==="regex"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${n.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${i[n.format]??r.format}`}case"not_multiple_of":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${r.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${r.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${r.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${g(r.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${r.origin}`;case"invalid_union":return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case"invalid_element":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${r.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}};function Jm(){return{localeError:ly()}}var dy=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(n){return e[n]??null}let i={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",currency_code:"currency code",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};function r(n,a){return n==="number"&&typeof a=="number"&&!Number.isFinite(a)?String(a):o[n]??n}return n=>{switch(n.code){case"invalid_type":{let a=r(n.expected),s=_(n.input),u=r(s,n.input);return`Invalid input: expected ${a}, received ${u}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${y(n.values[0])}`:`Invalid option: expected one of ${g(n.values,"|")}`;case"too_big":{let a=n.exact?"exactly ":n.inclusive?"<=":"<",s=t(n.origin);return s?`Too big: expected ${n.origin??"value"} to have ${a}${n.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${n.origin??"value"} to be ${a}${n.maximum.toString()}`}case"too_small":{let a=n.exact?"exactly ":n.inclusive?">=":">",s=t(n.origin);return s?`Too small: expected ${n.origin} to have ${a}${n.minimum.toString()} ${s.unit}`:`Too small: expected ${n.origin} to be ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`Invalid string: must start with "${a.prefix}"`:a.format==="ends_with"?`Invalid string: must end with "${a.suffix}"`:a.format==="includes"?`Invalid string: must include "${a.includes}"`:a.format==="regex"?`Invalid string: must match pattern ${a.pattern}`:`Invalid ${i[a.format]??n.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${n.divisor}`;case"unrecognized_keys":return`Unrecognized key${n.keys.length>1?"s":""}: ${g(n.keys,", ")}`;case"invalid_key":return`Invalid key in ${n.origin}`;case"invalid_union":return n.options&&Array.isArray(n.options)&&n.options.length>0?`Invalid discriminator value. Expected ${n.options.map(s=>`'${s}'`).join(" | ")}`:n.inclusive===!1?"Invalid input: more than one option matched":"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`;default:return"Invalid input"}}};function pi(){return{localeError:dy()}}var my=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"},map:{unit:"elementojn",verb:"havi"}};function t(r){return e[r]??null}let i={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",mac:"MAC-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",credit_card:"kreditkarta numero",currency_code:"valuta kodo",iban:"IBAN",jwt:"JWT",template_literal:"enigo"},o={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${r.expected}, ricevi\u011Dis ${s}`:`Nevalida enigo: atendi\u011Dis ${n}, ricevi\u011Dis ${s}`}case"invalid_value":return r.values.length===1?`Nevalida enigo: atendi\u011Dis ${y(r.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${g(r.values,"|")}`;case"too_big":{let n=r.inclusive?"<=":"<",a=t(r.origin);return a?`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${n}${r.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${n}${r.maximum.toString()}`}case"too_small":{let n=r.inclusive?">=":">",a=t(r.origin);return a?`Tro malgranda: atendi\u011Dis ke ${r.origin} havu ${n}${r.minimum.toString()} ${a.unit}`:`Tro malgranda: atendi\u011Dis ke ${r.origin} estu ${n}${r.minimum.toString()}`}case"invalid_format":{let n=r;return n.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${n.prefix}"`:n.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${n.suffix}"`:n.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${n.includes}"`:n.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${n.pattern}`:`Nevalida ${i[n.format]??r.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${r.divisor}`;case"unrecognized_keys":return`Nekonata${r.keys.length>1?"j":""} \u015Dlosilo${r.keys.length>1?"j":""}: ${g(r.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${r.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${r.origin}`;default:return"Nevalida enigo"}}};function Bm(){return{localeError:my()}}var fy=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(r){return e[r]??null}let i={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",mac:"direcci\xF3n MAC",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",credit_card:"n\xFAmero de tarjeta de cr\xE9dito",currency_code:"c\xF3digo de moneda",iban:"IBAN",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${r.expected}, recibido ${s}`:`Entrada inv\xE1lida: se esperaba ${n}, recibido ${s}`}case"invalid_value":return r.values.length===1?`Entrada inv\xE1lida: se esperaba ${y(r.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${g(r.values,"|")}`;case"too_big":{let n=r.inclusive?"<=":"<",a=t(r.origin),s=o[r.origin]??r.origin;return a?`Demasiado grande: se esperaba que ${s??"valor"} tuviera ${n}${r.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${s??"valor"} fuera ${n}${r.maximum.toString()}`}case"too_small":{let n=r.inclusive?">=":">",a=t(r.origin),s=o[r.origin]??r.origin;return a?`Demasiado peque\xF1o: se esperaba que ${s} tuviera ${n}${r.minimum.toString()} ${a.unit}`:`Demasiado peque\xF1o: se esperaba que ${s} fuera ${n}${r.minimum.toString()}`}case"invalid_format":{let n=r;return n.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${n.prefix}"`:n.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${n.suffix}"`:n.format==="includes"?`Cadena inv\xE1lida: debe incluir "${n.includes}"`:n.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${n.pattern}`:`Inv\xE1lido ${i[n.format]??r.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${r.divisor}`;case"unrecognized_keys":return`Llave${r.keys.length>1?"s":""} desconocida${r.keys.length>1?"s":""}: ${g(r.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${o[r.origin]??r.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${o[r.origin]??r.origin}`;default:return"Entrada inv\xE1lida"}}};function Km(){return{localeError:fy()}}var py=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},map:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(r){return e[r]??null}let i={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",mac:"MAC \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",credit_card:"\u0634\u0645\u0627\u0631\u0647 \u06A9\u0627\u0631\u062A \u0627\u0639\u062A\u0628\u0627\u0631\u06CC",currency_code:"\u06A9\u062F \u0627\u0631\u0632",iban:"IBAN",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},o={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${r.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${n} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return r.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${y(r.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${g(r.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let n=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${n}${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${n}${r.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let n=r.inclusive?">=":">",a=t(r.origin);return a?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${n}${r.minimum.toString()} ${a.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${n}${r.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let n=r;return n.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${n.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:n.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${n.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:n.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${n.includes}" \u0628\u0627\u0634\u062F`:n.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${n.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${i[n.format]??r.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${r.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${r.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${g(r.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${r.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${r.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function Wm(){return{localeError:py()}}var gy=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},map:{unit:"alkiota",subject:"kuvauksen"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(r){return e[r]??null}let i={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",mac:"MAC-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",credit_card:"luottokortin numero",currency_code:"valuuttakoodi",iban:"IBAN",jwt:"JWT",template_literal:"templaattimerkkijono"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Virheellinen tyyppi: odotettiin instanceof ${r.expected}, oli ${s}`:`Virheellinen tyyppi: odotettiin ${n}, oli ${s}`}case"invalid_value":return r.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${y(r.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${g(r.values,"|")}`;case"too_big":{let n=r.inclusive?"<=":"<",a=t(r.origin);return a?`Liian suuri: ${a.subject} t\xE4ytyy olla ${n}${r.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${n}${r.maximum.toString()}`}case"too_small":{let n=r.inclusive?">=":">",a=t(r.origin);return a?`Liian pieni: ${a.subject} t\xE4ytyy olla ${n}${r.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${n}${r.minimum.toString()}`}case"invalid_format":{let n=r;return n.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${n.prefix}"`:n.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${n.suffix}"`:n.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${n.includes}"`:n.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${n.pattern}`:`Virheellinen ${i[n.format]??r.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${r.divisor} monikerta`;case"unrecognized_keys":return`${r.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${g(r.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}};function Gm(){return{localeError:gy()}}var vy=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(r){return e[r]??null}let i={regex:"expression r\xE9guli\xE8re",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",mac:"adresse MAC",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne de caract\xE8res encod\xE9e en base64",base64url:"cha\xEEne de caract\xE8res encod\xE9e en base64url",json_string:"cha\xEEne de caract\xE8res JSON",e164:"num\xE9ro au format E.164",credit_card:"num\xE9ro de carte de cr\xE9dit",currency_code:"code de devise",iban:"IBAN",jwt:"JWT",template_literal:"entr\xE9e"},o={string:"cha\xEEne de caract\xE8res",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"record",map:"map",set:"ensemble",file:"fichier",nonoptional:"non optionnel",nan:"NaN",function:"fonction"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : instance de ${r.expected} attendu, ${s} re\xE7u`:`Entr\xE9e invalide : ${n} attendu, ${s} re\xE7u`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : ${y(r.values[0])} attendu`:`Option invalide : une valeur parmi ${g(r.values,"|")} attendue`;case"too_big":{let n=r.inclusive?"<=":"<",a=t(r.origin);return a?`Trop grand : ${o[r.origin]??"valeur"} doit ${a.verb} ${n}${r.maximum.toString()} ${a.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${o[r.origin]??"valeur"} doit \xEAtre ${n}${r.maximum.toString()}`}case"too_small":{let n=r.inclusive?">=":">",a=t(r.origin);return a?`Trop petit : ${o[r.origin]??"valeur"} doit ${a.verb} ${n}${r.minimum.toString()} ${a.unit}`:`Trop petit : ${o[r.origin]??"valeur"} doit \xEAtre ${n}${r.minimum.toString()}`}case"invalid_format":{let n=r;return n.format==="starts_with"?`Cha\xEEne de caract\xE8res invalide : doit commencer par "${n.prefix}"`:n.format==="ends_with"?`Cha\xEEne de caract\xE8res invalide : doit se terminer par "${n.suffix}"`:n.format==="includes"?`Cha\xEEne de caract\xE8res invalide : doit inclure "${n.includes}"`:n.format==="regex"?`Cha\xEEne de caract\xE8res invalide : doit correspondre au motif ${n.pattern}`:`${i[n.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${g(r.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${r.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entr\xE9e invalide"}}};function qm(){return{localeError:vy()}}var hy=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"},map:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(r){return e[r]??null}let i={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",mac:"adresse MAC",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",credit_card:"num\xE9ro de carte de cr\xE9dit",currency_code:"code de devise",iban:"IBAN",jwt:"JWT",template_literal:"entr\xE9e"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : attendu instanceof ${r.expected}, re\xE7u ${s}`:`Entr\xE9e invalide : attendu ${n}, re\xE7u ${s}`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : attendu ${y(r.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${g(r.values,"|")}`;case"too_big":{let n=r.inclusive?"\u2264":"<",a=t(r.origin);return a?`Trop grand : attendu que ${r.origin??"la valeur"} ait ${n}${r.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${r.origin??"la valeur"} soit ${n}${r.maximum.toString()}`}case"too_small":{let n=r.inclusive?"\u2265":">",a=t(r.origin);return a?`Trop petit : attendu que ${r.origin} ait ${n}${r.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${r.origin} soit ${n}${r.minimum.toString()}`}case"invalid_format":{let n=r;return n.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${n.prefix}"`:n.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${n.suffix}"`:n.format==="includes"?`Cha\xEEne invalide : doit inclure "${n.includes}"`:n.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${n.pattern}`:`${i[n.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${g(r.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${r.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entr\xE9e invalide"}}};function Xm(){return{localeError:hy()}}var $y=()=>{let e={string:{unit:"\u0A85\u0A95\u0ACD\u0AB7\u0AB0",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},file:{unit:"\u0AAC\u0ABE\u0AAF\u0A9F",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},array:{unit:"\u0A86\u0A87\u0A9F\u0AAE",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},set:{unit:"\u0A86\u0A87\u0A9F\u0AAE",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},map:{unit:"\u0A8F\u0AA8\u0ACD\u0A9F\u0ACD\u0AB0\u0AC0",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"}};function t(r){return e[r]??null}let i={regex:"\u0A87\u0AA8\u0AAA\u0AC1\u0A9F",email:"\u0A88\u0AAE\u0AC7\u0A87\u0AB2 \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",url:"URL",emoji:"\u0A87\u0AAE\u0ACB\u0A9C\u0AC0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0AA4\u0ABE\u0AB0\u0AC0\u0A96 \u0A85\u0AA8\u0AC7 \u0AB8\u0AAE\u0AAF",date:"ISO \u0AA4\u0ABE\u0AB0\u0AC0\u0A96",time:"ISO \u0AB8\u0AAE\u0AAF",duration:"ISO \u0A85\u0AB5\u0AA7\u0ABF",ipv4:"IPv4 \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",ipv6:"IPv6 \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",mac:"MAC \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",cidrv4:"IPv4 \u0AB6\u0ACD\u0AB0\u0AC7\u0AA3\u0AC0",cidrv6:"IPv6 \u0AB6\u0ACD\u0AB0\u0AC7\u0AA3\u0AC0",base64:"base64-\u0A8F\u0AA8\u0ACD\u0A95\u0ACB\u0AA1\u0AC7\u0AA1 \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",base64url:"base64url-\u0A8F\u0AA8\u0ACD\u0A95\u0ACB\u0AA1\u0AC7\u0AA1 \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",json_string:"JSON \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",e164:"E.164 \u0AA8\u0A82\u0AAC\u0AB0",credit_card:"\u0A95\u0ACD\u0AB0\u0AC7\u0AA1\u0ABF\u0A9F \u0A95\u0ABE\u0AB0\u0ACD\u0AA1 \u0AA8\u0A82\u0AAC\u0AB0",currency_code:"\u0A9A\u0AB2\u0AA3 \u0A95\u0ACB\u0AA1",iban:"IBAN",jwt:"JWT",template_literal:"\u0A87\u0AA8\u0AAA\u0AC1\u0A9F"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F: \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4 ${n}, \u0AAA\u0ACD\u0AB0\u0ABE\u0AAA\u0ACD\u0AA4 ${s}`}case"invalid_value":return r.values.length===1?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F: \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4 ${y(r.values[0])}`:`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB5\u0ABF\u0A95\u0AB2\u0ACD\u0AAA: ${g(r.values," | ")} \u0AAE\u0ABE\u0AA7\u0ACD\u0AAF\u0AAE\u0AA5\u0AC0 \u0A8F\u0A95 \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4`;case"too_big":{let n=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0A96\u0AC2\u0AAC \u0AAE\u0ACB\u0A9F\u0AC1\u0A82: ${r.origin??"\u0AAE\u0AC2\u0AB2\u0ACD\u0AAF"} ${n}${r.maximum.toString()} ${a.unit??"\u0A8F\u0AB2\u0ABF\u0AAE\u0AC7\u0AA8\u0ACD\u0A9F"} \u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F`:`\u0A96\u0AC2\u0AAC \u0AAE\u0ACB\u0A9F\u0AC1\u0A82: ${r.origin??"\u0AAE\u0AC2\u0AB2\u0ACD\u0AAF"} ${n}${r.maximum.toString()} \u0AB9\u0ACB\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`}case"too_small":{let n=r.inclusive?">=":">",a=t(r.origin);return a?`\u0A96\u0AC2\u0AAC \u0AA8\u0ABE\u0AA8\u0AC1\u0A82: ${r.origin} ${n}${r.minimum.toString()} ${a.unit} \u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F`:`\u0A96\u0AC2\u0AAC \u0AA8\u0ABE\u0AA8\u0AC1\u0A82: ${r.origin} ${n}${r.minimum.toString()} \u0AB9\u0ACB\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`}case"invalid_format":{let n=r;return n.format==="starts_with"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: "${n.prefix}" \u0AA5\u0AC0 \u0AB6\u0AB0\u0AC2 \u0AA5\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:n.format==="ends_with"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: "${n.suffix}" \u0AAA\u0AB0 \u0AB8\u0AAE\u0ABE\u0AAA\u0ACD\u0AA4 \u0AA5\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:n.format==="includes"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: "${n.includes}" \u0AB6\u0ABE\u0AAE\u0AC7\u0AB2 \u0AB9\u0ACB\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:n.format==="regex"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: \u0AAA\u0AC7\u0A9F\u0AB0\u0ACD\u0AA8 ${n.pattern} \u0AB8\u0ABE\u0AA5\u0AC7 \u0AAE\u0AC7\u0AB3 \u0A96\u0ABE\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF ${i[n.format]??r.format}`}case"not_multiple_of":return`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AA8\u0A82\u0AAC\u0AB0: ${r.divisor} \u0AA8\u0ACB \u0A97\u0AC1\u0AA3\u0ABE\u0A82\u0A95 \u0AB9\u0ACB\u0AB5\u0ACB \u0A9C\u0ACB\u0A88\u0A8F`;case"unrecognized_keys":return`\u0A93\u0AB3\u0A96\u0AC0 \u0AB6\u0A95\u0ABE\u0AA4\u0ABE \u0AA8\u0AB9\u0AC0\u0A82 \u0AA4\u0AC7 \u0A95\u0AC0${r.keys.length>1?"\u0A93":""}: ${g(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u0AAE\u0ABE\u0A82 \u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A95\u0AC0`;case"invalid_union":return r.options&&Array.isArray(r.options)&&r.options.length>0?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AA1\u0ABF\u0AB8\u0ACD\u0A95\u0ACD\u0AB0\u0ABF\u0AAE\u0ABF\u0AA8\u0AC7\u0A9F\u0AB0 \u0AAE\u0AC2\u0AB2\u0ACD\u0AAF. \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4 ${r.options.map(a=>`'${a}'`).join(" | ")}`:"\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F";case"invalid_element":return`${r.origin} \u0AAE\u0ABE\u0A82 \u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AAE\u0AC2\u0AB2\u0ACD\u0AAF`;default:return"\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F"}}};function Hm(){return{localeError:$y()}}var yy=()=>{let e={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},t={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},i=c=>c?e[c]:void 0,o=c=>{let l=i(c);return l?l.label:c??e.unknown.label},r=c=>`\u05D4${o(c)}`,n=c=>(i(c)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",a=c=>c?t[c]??null:null,s={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},uuidv4:{label:"UUIDv4",gender:"m"},uuidv6:{label:"UUIDv6",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},mac:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA MAC",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},credit_card:{label:"\u05DE\u05E1\u05E4\u05E8 \u05DB\u05E8\u05D8\u05D9\u05E1 \u05D0\u05E9\u05E8\u05D0\u05D9",gender:"m"},currency_code:{label:"\u05E7\u05D5\u05D3 \u05DE\u05D8\u05D1\u05E2",gender:"m"},iban:{label:"IBAN",gender:"m"},jwt:{label:"JWT",gender:"m"},template_literal:{label:"\u05E7\u05DC\u05D8",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},u={nan:"NaN"};return c=>{switch(c.code){case"invalid_type":{let l=c.expected,d=u[l??""]??o(l),m=_(c.input),f=u[m]??e[m]?.label??m;return/^[A-Z]/.test(c.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${c.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${f}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${d}, \u05D4\u05EA\u05E7\u05D1\u05DC ${f}`}case"invalid_value":{if(c.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${y(c.values[0])}`;let l=c.values.map(f=>y(f));if(c.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${l[0]} \u05D0\u05D5 ${l[1]}`;let d=l[l.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${l.slice(0,-1).join(", ")} \u05D0\u05D5 ${d}`}case"too_big":{let l=a(c.origin),d=r(c.origin??"value");if(c.origin==="string")return`${l?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${c.maximum.toString()} ${l?.unit??""} ${c.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(c.origin==="number"){let v=c.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${c.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${c.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${v}`}if(c.origin==="array"||c.origin==="set"){let v=c.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",h=c.inclusive?`${c.maximum} ${l?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${c.maximum} ${l?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${d} ${v} \u05DC\u05D4\u05DB\u05D9\u05DC ${h}`.trim()}let m=c.inclusive?"<=":"<",f=n(c.origin??"value");return l?.unit?`${l.longLabel} \u05DE\u05D3\u05D9: ${d} ${f} ${m}${c.maximum.toString()} ${l.unit}`:`${l?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${d} ${f} ${m}${c.maximum.toString()}`}case"too_small":{let l=a(c.origin),d=r(c.origin??"value");if(c.origin==="string")return`${l?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${c.minimum.toString()} ${l?.unit??""} ${c.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(c.origin==="number"){let v=c.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${c.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${c.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${v}`}if(c.origin==="array"||c.origin==="set"){let v=c.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(c.minimum===1&&c.inclusive){let b=(c.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${v} \u05DC\u05D4\u05DB\u05D9\u05DC ${b}`}let h=c.inclusive?`${c.minimum} ${l?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${c.minimum} ${l?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${v} \u05DC\u05D4\u05DB\u05D9\u05DC ${h}`.trim()}let m=c.inclusive?">=":">",f=n(c.origin??"value");return l?.unit?`${l.shortLabel} \u05DE\u05D3\u05D9: ${d} ${f} ${m}${c.minimum.toString()} ${l.unit}`:`${l?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${d} ${f} ${m}${c.minimum.toString()}`}case"invalid_format":{let l=c;if(l.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${l.prefix}"`;if(l.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${l.suffix}"`;if(l.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${l.includes}"`;if(l.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${l.pattern}`;let d=s[l.format],m=d?.label??l.format,v=(d?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${m} \u05DC\u05D0 ${v}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${c.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${c.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${c.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${g(c.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${r(c.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function Ym(){return{localeError:yy()}}var _y=()=>{let e={string:{unit:"\u0905\u0915\u094D\u0937\u0930",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},file:{unit:"\u092C\u093E\u0907\u091F\u094D\u0938",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},array:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},set:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},map:{unit:"\u092A\u094D\u0930\u0935\u093F\u0937\u094D\u091F\u093F\u092F\u093E\u0901",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"}};function t(r){return e[r]??null}let i={regex:"\u0907\u0928\u092A\u0941\u091F",email:"\u0908\u092E\u0947\u0932 \u092A\u0924\u093E",url:"URL",emoji:"\u0907\u092E\u094B\u091C\u0940",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0924\u093F\u0925\u093F \u0914\u0930 \u0938\u092E\u092F",date:"ISO \u0924\u093F\u0925\u093F",time:"ISO \u0938\u092E\u092F",duration:"ISO \u0905\u0935\u0927\u093F",ipv4:"IPv4 \u092A\u0924\u093E",ipv6:"IPv6 \u092A\u0924\u093E",mac:"MAC \u092A\u0924\u093E",cidrv4:"IPv4 \u0936\u094D\u0930\u0947\u0923\u0940",cidrv6:"IPv6 \u0936\u094D\u0930\u0947\u0923\u0940",base64:"Base64-\u090F\u0928\u094D\u0915\u094B\u0921\u0947\u0921 \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",base64url:"Base64URL-\u090F\u0928\u094D\u0915\u094B\u0921\u0947\u0921 \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",json_string:"JSON \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",e164:"E.164 \u0938\u0902\u0916\u094D\u092F\u093E",credit_card:"\u0915\u094D\u0930\u0947\u0921\u093F\u091F \u0915\u093E\u0930\u094D\u0921 \u0938\u0902\u0916\u094D\u092F\u093E",currency_code:"\u092E\u0941\u0926\u094D\u0930\u093E \u0915\u094B\u0921",iban:"IBAN",jwt:"JWT",template_literal:"\u0907\u0928\u092A\u0941\u091F"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${n}, \u092A\u094D\u0930\u093E\u092A\u094D\u0924 ${s}`}case"invalid_value":return r.values.length===1?`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${y(r.values[0])}`:`\u0905\u092E\u093E\u0928\u094D\u092F \u0935\u093F\u0915\u0932\u094D\u092A: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u092E\u093E\u0928\u094B\u0902 \u092E\u0947\u0902 \u0938\u0947 \u090F\u0915 ${g(r.values,"|")}`;case"too_big":{let n=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u092C\u0939\u0941\u0924 \u092C\u0921\u093C\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${r.origin??"\u092E\u093E\u0928"} \u092E\u0947\u0902 ${n}${r.maximum} ${a.unit} \u0939\u094B\u0902`:`\u092C\u0939\u0941\u0924 \u092C\u0921\u093C\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${r.origin??"\u092E\u093E\u0928"} ${n}${r.maximum} \u0939\u094B`}case"too_small":{let n=r.inclusive?">=":">",a=t(r.origin);return a?`\u092C\u0939\u0941\u0924 \u091B\u094B\u091F\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${r.origin} \u092E\u0947\u0902 ${n}${r.minimum} ${a.unit} \u0939\u094B\u0902`:`\u092C\u0939\u0941\u0924 \u091B\u094B\u091F\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${r.origin} ${n}${r.minimum} \u0939\u094B`}case"invalid_format":{let n=r;return n.format==="starts_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: "${n.prefix}" \u0938\u0947 \u0936\u0941\u0930\u0942 \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:n.format==="ends_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: "${n.suffix}" \u092A\u0930 \u0938\u092E\u093E\u092A\u094D\u0924 \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:n.format==="includes"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: \u0907\u0938\u092E\u0947\u0902 "${n.includes}" \u0936\u093E\u092E\u093F\u0932 \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:n.format==="regex"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: \u092A\u0948\u091F\u0930\u094D\u0928 ${n.pattern} \u0938\u0947 \u092E\u0947\u0932 \u0916\u093E\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:`\u0905\u092E\u093E\u0928\u094D\u092F ${i[n.format]??r.format}`}case"not_multiple_of":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u0902\u0916\u094D\u092F\u093E: \u092F\u0939 ${r.divisor} \u0915\u093E \u0917\u0941\u0923\u091C \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`;case"unrecognized_keys":return`\u0905\u092A\u0930\u093F\u091A\u093F\u0924 \u0915\u0941\u0902\u091C\u0940${r.keys.length>1?"\u092F\u093E\u0901":""}: ${g(r.keys,", ")}`;case"invalid_key":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0915\u0941\u0902\u091C\u0940: ${r.origin} \u092E\u0947\u0902`;case"invalid_union":return r.options&&Array.isArray(r.options)&&r.options.length>0?`\u0905\u092E\u093E\u0928\u094D\u092F \u0921\u093F\u0938\u094D\u0915\u094D\u0930\u093F\u092E\u093F\u0928\u0947\u091F\u0930 \u092E\u093E\u0928: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${r.options.map(a=>`'${a}'`).join(" | ")}`:"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F";case"invalid_element":return`\u0905\u092E\u093E\u0928\u094D\u092F \u092E\u093E\u0928: ${r.origin} \u092E\u0947\u0902`;default:return"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F"}}};function Qm(){return{localeError:_y()}}var by=()=>{let e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function t(r){return e[r]??null}let i={regex:"unos",email:"email adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",mac:"MAC adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",credit_card:"broj kreditne kartice",currency_code:"kod valute",iban:"IBAN",jwt:"JWT",template_literal:"unos"},o={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${r.expected}, a primljeno je ${s}`:`Neispravan unos: o\u010Dekuje se ${n}, a primljeno je ${s}`}case"invalid_value":return r.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${y(r.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${g(r.values,"|")}`;case"too_big":{let n=r.inclusive?"<=":"<",a=t(r.origin),s=o[r.origin]??r.origin;return a?`Preveliko: o\u010Dekivano da ${s??"vrijednost"} ima ${n}${r.maximum.toString()} ${a.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${s??"vrijednost"} bude ${n}${r.maximum.toString()}`}case"too_small":{let n=r.inclusive?">=":">",a=t(r.origin),s=o[r.origin]??r.origin;return a?`Premalo: o\u010Dekivano da ${s} ima ${n}${r.minimum.toString()} ${a.unit}`:`Premalo: o\u010Dekivano da ${s} bude ${n}${r.minimum.toString()}`}case"invalid_format":{let n=r;return n.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${n.prefix}"`:n.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${n.suffix}"`:n.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${n.includes}"`:n.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${n.pattern}`:`Neispravna ${i[n.format]??r.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${r.divisor}`;case"unrecognized_keys":return`Neprepoznat${r.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${g(r.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${o[r.origin]??r.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${o[r.origin]??r.origin}`;default:return"Neispravan unos"}}};function ef(){return{localeError:by()}}var ky=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"},map:{unit:"elem",verb:"legyen"}};function t(r){return e[r]??null}let i={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",mac:"MAC c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",credit_card:"hitelk\xE1rtyasz\xE1m",currency_code:"p\xE9nznemk\xF3d",iban:"IBAN",jwt:"JWT",template_literal:"bemenet"},o={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${r.expected}, a kapott \xE9rt\xE9k ${s}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${n}, a kapott \xE9rt\xE9k ${s}`}case"invalid_value":return r.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${y(r.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${g(r.values,"|")}`;case"too_big":{let n=r.inclusive?"<=":"<",a=t(r.origin);return a?`T\xFAl nagy: ${r.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${n}${r.maximum.toString()} ${a.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${r.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${n}${r.maximum.toString()}`}case"too_small":{let n=r.inclusive?">=":">",a=t(r.origin);return a?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} m\xE9rete t\xFAl kicsi ${n}${r.minimum.toString()} ${a.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} t\xFAl kicsi ${n}${r.minimum.toString()}`}case"invalid_format":{let n=r;return n.format==="starts_with"?`\xC9rv\xE9nytelen string: "${n.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:n.format==="ends_with"?`\xC9rv\xE9nytelen string: "${n.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:n.format==="includes"?`\xC9rv\xE9nytelen string: "${n.includes}" \xE9rt\xE9ket kell tartalmaznia`:n.format==="regex"?`\xC9rv\xE9nytelen string: ${n.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${i[n.format]??r.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${r.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${r.keys.length>1?"s":""}: ${g(r.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${r.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${r.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function tf(){return{localeError:ky()}}function rf(e,t,i){return Math.abs(e)===1?t:i}function Tt(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],i=e[e.length-1];return e+(t.includes(i)?"\u0576":"\u0568")}var xy=()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},map:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(r){return e[r]??null}let i={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",mac:"MAC \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",credit_card:"\u056F\u0580\u0565\u0564\u056B\u057F \u0584\u0561\u0580\u057F\u056B \u0570\u0561\u0574\u0561\u0580",currency_code:"\u0561\u0580\u056A\u0578\u0582\u0575\u0569\u056B \u056F\u0578\u0564",iban:"IBAN",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},o={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${r.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${n}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`}case"invalid_value":return r.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${y(r.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${g(r.values,"|")}`;case"too_big":{let n=r.inclusive?"<=":"<",a=t(r.origin);if(a){let s=Number(r.maximum),u=rf(s,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Tt(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${n}${r.maximum.toString()} ${u}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Tt(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${n}${r.maximum.toString()}`}case"too_small":{let n=r.inclusive?">=":">",a=t(r.origin);if(a){let s=Number(r.minimum),u=rf(s,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Tt(r.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${n}${r.minimum.toString()} ${u}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Tt(r.origin)} \u056C\u056B\u0576\u056B ${n}${r.minimum.toString()}`}case"invalid_format":{let n=r;return n.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${n.prefix}"-\u0578\u057E`:n.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${n.suffix}"-\u0578\u057E`:n.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${n.includes}"`:n.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${n.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${i[n.format]??r.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${r.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${r.keys.length>1?"\u0576\u0565\u0580":""}. ${g(r.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${Tt(r.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${Tt(r.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function nf(){return{localeError:xy()}}var wy=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"},map:{unit:"item",verb:"memiliki"}};function t(r){return e[r]??null}let i={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",mac:"alamat MAC",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",credit_card:"nomor kartu kredit",currency_code:"kode mata uang",iban:"IBAN",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Input tidak valid: diharapkan instanceof ${r.expected}, diterima ${s}`:`Input tidak valid: diharapkan ${n}, diterima ${s}`}case"invalid_value":return r.values.length===1?`Input tidak valid: diharapkan ${y(r.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${g(r.values,"|")}`;case"too_big":{let n=r.inclusive?"<=":"<",a=t(r.origin);return a?`Terlalu besar: diharapkan ${r.origin??"value"} memiliki ${n}${r.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${r.origin??"value"} menjadi ${n}${r.maximum.toString()}`}case"too_small":{let n=r.inclusive?">=":">",a=t(r.origin);return a?`Terlalu kecil: diharapkan ${r.origin} memiliki ${n}${r.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${r.origin} menjadi ${n}${r.minimum.toString()}`}case"invalid_format":{let n=r;return n.format==="starts_with"?`String tidak valid: harus dimulai dengan "${n.prefix}"`:n.format==="ends_with"?`String tidak valid: harus berakhir dengan "${n.suffix}"`:n.format==="includes"?`String tidak valid: harus menyertakan "${n.includes}"`:n.format==="regex"?`String tidak valid: harus sesuai pola ${n.pattern}`:`${i[n.format]??r.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${r.keys.length>1?"s":""}: ${g(r.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${r.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${r.origin}`;default:return"Input tidak valid"}}};function of(){return{localeError:wy()}}var Iy=()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"},map:{unit:"hluti",verb:"a\xF0 hafa"}};function t(r){return e[r]??null}let i={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",credit_card:"kreditkortan\xFAmer",currency_code:"gjaldmi\xF0ilsk\xF3\xF0i",iban:"IBAN",jwt:"JWT",template_literal:"gildi"},o={nan:"NaN",number:"n\xFAmer",array:"fylki"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera instanceof ${r.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera ${n}`}case"invalid_value":return r.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${y(r.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${g(r.values,"|")}`;case"too_big":{let n=r.inclusive?"<=":"<",a=t(r.origin);return a?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} hafi ${n}${r.maximum.toString()} ${a.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} s\xE9 ${n}${r.maximum.toString()}`}case"too_small":{let n=r.inclusive?">=":">",a=t(r.origin);return a?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} hafi ${n}${r.minimum.toString()} ${a.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} s\xE9 ${n}${r.minimum.toString()}`}case"invalid_format":{let n=r;return n.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${n.prefix}"`:n.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${n.suffix}"`:n.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${n.includes}"`:n.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${n.pattern}`:`Rangt ${i[n.format]??r.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${r.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${r.keys.length>1?"ir lyklar":"ur lykill"}: ${g(r.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${r.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${r.origin}`;default:return"Rangt gildi"}}};function af(){return{localeError:Iy()}}var Sy=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"},map:{unit:"elementi",verb:"avere"}};function t(r){return e[r]??null}let i={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",mac:"indirizzo MAC",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",credit_card:"numero di carta di credito",currency_code:"codice valuta",iban:"IBAN",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"numero",array:"vettore"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Input non valido: atteso instanceof ${r.expected}, ricevuto ${s}`:`Input non valido: atteso ${n}, ricevuto ${s}`}case"invalid_value":return r.values.length===1?`Input non valido: atteso ${y(r.values[0])}`:`Opzione non valida: atteso uno tra ${g(r.values,"|")}`;case"too_big":{let n=r.inclusive?"<=":"<",a=t(r.origin);return a?`Troppo grande: ${r.origin??"valore"} deve avere ${n}${r.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${r.origin??"valore"} deve essere ${n}${r.maximum.toString()}`}case"too_small":{let n=r.inclusive?">=":">",a=t(r.origin);return a?`Troppo piccolo: ${r.origin} deve avere ${n}${r.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${r.origin} deve essere ${n}${r.minimum.toString()}`}case"invalid_format":{let n=r;return n.format==="starts_with"?`Stringa non valida: deve iniziare con "${n.prefix}"`:n.format==="ends_with"?`Stringa non valida: deve terminare con "${n.suffix}"`:n.format==="includes"?`Stringa non valida: deve includere "${n.includes}"`:n.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${n.pattern}`:`Input non valido: ${i[n.format]??r.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${r.divisor}`;case"unrecognized_keys":return`Chiav${r.keys.length>1?"i":"e"} non riconosciut${r.keys.length>1?"e":"a"}: ${g(r.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${r.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${r.origin}`;default:return"Input non valido"}}};function sf(){return{localeError:Sy()}}var zy=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},map:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(r){return e[r]??null}let i={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",mac:"MAC\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",credit_card:"\u30AF\u30EC\u30B8\u30C3\u30C8\u30AB\u30FC\u30C9\u756A\u53F7",currency_code:"\u901A\u8CA8\u30B3\u30FC\u30C9",iban:"IBAN",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},o={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${r.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${n}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return r.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${y(r.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${g(r.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let n=r.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",a=t(r.origin);return a?`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${a.unit??"\u8981\u7D20"}${n}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${n}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let n=r.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",a=t(r.origin);return a?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${a.unit}${n}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${n}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let n=r;return n.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${n.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:n.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${n.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:n.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${n.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:n.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${n.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${i[n.format]??r.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${r.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${r.keys.length>1?"\u7FA4":""}: ${g(r.keys,"\u3001")}`;case"invalid_key":return`${r.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${r.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function cf(){return{localeError:zy()}}var jy=()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},map:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(r){return e[r]??null}let i={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",mac:"MAC \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",credit_card:"\u10E1\u10D0\u10D9\u10E0\u10D4\u10D3\u10D8\u10E2\u10DD \u10D1\u10D0\u10E0\u10D0\u10D7\u10D8\u10E1 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",currency_code:"\u10D5\u10D0\u10DA\u10E3\u10E2\u10D8\u10E1 \u10D9\u10DD\u10D3\u10D8",iban:"IBAN",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},o={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${r.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`}case"invalid_value":return r.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${y(r.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${g(r.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let n=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${a.verb} ${n}${r.maximum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${n}${r.maximum.toString()}`}case"too_small":{let n=r.inclusive?">=":">",a=t(r.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin} ${a.verb} ${n}${r.minimum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin} \u10D8\u10E7\u10DD\u10E1 ${n}${r.minimum.toString()}`}case"invalid_format":{let n=r;return n.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${n.prefix}"-\u10D8\u10D7`:n.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${n.suffix}"-\u10D8\u10D7`:n.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${n.includes}"-\u10E1`:n.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${n.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${i[n.format]??r.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${r.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${r.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${g(r.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${r.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${r.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function uf(){return{localeError:jy()}}var Py=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},map:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(r){return e[r]??null}let i={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",mac:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 MAC",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",credit_card:"\u179B\u17C1\u1781\u1794\u17D0\u178E\u17D2\u178E\u17A5\u178E\u1791\u17B6\u1793",currency_code:"\u1780\u17BC\u178A\u179A\u17BC\u1794\u17B7\u1799\u1794\u17D0\u178E\u17D2\u178E",iban:"IBAN",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},o={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${r.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`}case"invalid_value":return r.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${y(r.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${g(r.values,"|")}`;case"too_big":{let n=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${n} ${r.maximum.toString()} ${a.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${n} ${r.maximum.toString()}`}case"too_small":{let n=r.inclusive?">=":">",a=t(r.origin);return a?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${n} ${r.minimum.toString()} ${a.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${n} ${r.minimum.toString()}`}case"invalid_format":{let n=r;return n.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${n.prefix}"`:n.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${n.suffix}"`:n.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${n.includes}"`:n.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${n.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${i[n.format]??r.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${r.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${g(r.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${r.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${r.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function gi(){return{localeError:Py()}}function lf(){return gi()}var Oy=()=>{let e={string:{unit:"\u0C85\u0C95\u0CCD\u0CB7\u0CB0\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},file:{unit:"\u0CAC\u0CC8\u0C9F\u0CCD\u200C\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},array:{unit:"\u0CB5\u0CB8\u0CCD\u0CA4\u0CC1\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},set:{unit:"\u0CB5\u0CB8\u0CCD\u0CA4\u0CC1\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},map:{unit:"entries",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"}};function t(r){return e[r]??null}let i={regex:"\u0C87\u0CA8\u0CCD\u0CAA\u0CC1\u0C9F\u0CCD",email:"email \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0CA6\u0CBF\u0CA8\u0CBE\u0C82\u0C95\u0CA6 \u0CB8\u0CAE\u0CAF",date:"ISO \u0CA6\u0CBF\u0CA8\u0CBE\u0C82\u0C95",time:"ISO \u0CB8\u0CAE\u0CAF",duration:"ISO \u0C85\u0CB5\u0CA7\u0CBF",ipv4:"IPv4 \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",ipv6:"IPv6 \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",mac:"MAC \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",cidrv4:"IPv4 \u0CB5\u0CCD\u0CAF\u0CBE\u0CAA\u0CCD\u0CA4\u0CBF\u0CAF",cidrv6:"IPv6 \u0CB5\u0CCD\u0CAF\u0CBE\u0CAA\u0CCD\u0CA4\u0CBF\u0CAF",base64:"base64-encoded\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",base64url:"base64url-encoded\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",json_string:"JSON\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",e164:"E.164 \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6",credit_card:"\u0C95\u0CCD\u0CB0\u0CC6\u0CA1\u0CBF\u0C9F\u0CCD \u0C95\u0CBE\u0CB0\u0CCD\u0CA1\u0CCD \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6",currency_code:"\u0C95\u0CB0\u0CC6\u0CA8\u0CCD\u0CB8\u0CBF \u0C95\u0CCB\u0CA1\u0CCD",iban:"IBAN",jwt:"JWT",template_literal:"\u0C87\u0CA8\u0CCD\u0CAA\u0CC1\u0C9F\u0CCD"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${n}, \u0CB8\u0CCD\u0CB5\u0CC0\u0C95\u0CB0\u0CBF\u0CB8\u0CBF\u0CA6\u0CA8\u0CC1 ${s}`}case"invalid_value":return r.values.length===1?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${y(r.values[0])}`:`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C86\u0CAF\u0CCD\u0C95\u0CC6: \u0C87\u0CB5\u0CC1\u0C97\u0CB3\u0CB2\u0CCD\u0CB2\u0CBF \u0C92\u0C82\u0CA6\u0CA8\u0CCD\u0CA8\u0CC1 \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${g(r.values,"|")}`;case"too_big":{let n=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0CA6\u0CCA\u0CA1\u0CCD\u0CA1\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${r.origin??"value"} \u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1 ${n}${r.maximum.toString()} ${a.unit??"\u0C85\u0C82\u0CB6\u0C97\u0CB3\u0CC1"}`:`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0CA6\u0CCA\u0CA1\u0CCD\u0CA1\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${r.origin??"value"} \u0C8E\u0C82\u0CA6\u0CC1 ${n}${r.maximum.toString()}`}case"too_small":{let n=r.inclusive?">=":">",a=t(r.origin);return a?`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0C9A\u0CBF\u0C95\u0CCD\u0C95\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${r.origin} \u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1 ${n}${r.minimum.toString()} ${a.unit}`:`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0C9A\u0CBF\u0C95\u0CCD\u0C95\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${r.origin} \u0C8E\u0C82\u0CA6\u0CC1 ${n}${r.minimum.toString()}`}case"invalid_format":{let n=r;return n.format==="starts_with"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0C87\u0CA6\u0CB0\u0CCA\u0C82\u0CA6\u0CBF\u0C97\u0CC6 \u0CAA\u0CCD\u0CB0\u0CBE\u0CB0\u0C82\u0CAD\u0CBF\u0CB8\u0CAC\u0CC7\u0C95\u0CC1 "${n.prefix}"`:n.format==="ends_with"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0C87\u0CA6\u0CB0\u0CCA\u0C82\u0CA6\u0CBF\u0C97\u0CC6 \u0C95\u0CCA\u0CA8\u0CC6\u0C97\u0CCA\u0CB3\u0CCD\u0CB3\u0CAC\u0CC7\u0C95\u0CC1 "${n.suffix}"`:n.format==="includes"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0C92\u0CB3\u0C97\u0CCA\u0C82\u0CA1\u0CBF\u0CB0\u0CAC\u0CC7\u0C95\u0CC1 "${n.includes}"`:n.format==="regex"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0CAE\u0CBE\u0CA6\u0CB0\u0CBF\u0C97\u0CC6 \u0CB9\u0CCA\u0C82\u0CA6\u0CBF\u0C95\u0CC6\u0CAF\u0CBE\u0C97\u0CAC\u0CC7\u0C95\u0CC1 ${n.pattern}`:`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF ${i[n.format]??r.format}`}case"not_multiple_of":return`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6: \u0CAC\u0CB9\u0CC1\u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6\u0CAF\u0CBE\u0C97\u0CBF\u0CB0\u0CAC\u0CC7\u0C95\u0CC1 ${r.divisor}`;case"unrecognized_keys":return`\u0C97\u0CC1\u0CB0\u0CC1\u0CA4\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CA6 \u0C95\u0CC0 ${r.keys.length>1?"s":""}: ${g(r.keys,", ")}`;case"invalid_key":return`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0C95\u0CC0 \u0C87\u0CA8\u0CCD ${r.origin}`;case"invalid_union":return r.options&&Array.isArray(r.options)&&r.options.length>0?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CA4\u0CBE\u0CB0\u0CA4\u0CAE\u0CCD\u0CAF \u0CAE\u0CCC\u0CB2\u0CCD\u0CAF. \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${r.options.map(a=>`'${a}'`).join(" | ")}`:"\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD";case"invalid_element":return`\u0CB0\u0CB2\u0CCD\u0CB2\u0CBF \u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CAE\u0CCC\u0CB2\u0CCD\u0CAF ${r.origin}`;default:return"\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD"}}};function df(){return{localeError:Oy()}}var Ey=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"},map:{unit:"\uAC1C",verb:"to have"}};function t(r){return e[r]??null}let i={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",mac:"MAC \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",credit_card:"\uC2E0\uC6A9\uCE74\uB4DC \uBC88\uD638",currency_code:"\uD1B5\uD654 \uCF54\uB4DC",iban:"IBAN",jwt:"JWT",template_literal:"\uC785\uB825"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${r.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${n}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`}case"invalid_value":return r.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${y(r.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${g(r.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let n=r.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",a=n==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(r.origin),u=s?.unit??"\uC694\uC18C";return s?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()}${u} ${n}${a}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()} ${n}${a}`}case"too_small":{let n=r.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",a=n==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(r.origin),u=s?.unit??"\uC694\uC18C";return s?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()}${u} ${n}${a}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()} ${n}${a}`}case"invalid_format":{let n=r;return n.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${n.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:n.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${n.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:n.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${n.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:n.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${n.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${i[n.format]??r.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${r.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${g(r.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${r.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${r.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function mf(){return{localeError:Ey()}}var Lr=e=>e.charAt(0).toUpperCase()+e.slice(1);function ff(e){let t=Math.abs(e),i=t%10,o=t%100;return o>=11&&o<=19||i===0?"many":i===1?"one":"few"}var Uy=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(r,n,a,s){let u=e[r]??null;return u===null?u:{unit:u.unit[n],verb:u.verb[s][a?"inclusive":"notInclusive"]}}let i={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",mac:"MAC adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",credit_card:"kredito kortel\u0117s numeris",currency_code:"valiutos kodas",iban:"IBAN",jwt:"JWT",template_literal:"\u012Fvestis"},o={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Gautas tipas ${s}, o tik\u0117tasi - instanceof ${r.expected}`:`Gautas tipas ${s}, o tik\u0117tasi - ${n}`}case"invalid_value":return r.values.length===1?`Privalo b\u016Bti ${y(r.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${g(r.values,"|")} pasirinkim\u0173`;case"too_big":{let n=o[r.origin]??r.origin,a=t(r.origin,ff(Number(r.maximum)),r.inclusive??!1,"smaller");if(a?.verb)return`${Lr(n??r.origin??"reik\u0161m\u0117")} ${a.verb} ${r.maximum.toString()} ${a.unit??"element\u0173"}`;let s=r.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${Lr(n??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${r.maximum.toString()} ${a?.unit}`}case"too_small":{let n=o[r.origin]??r.origin,a=t(r.origin,ff(Number(r.minimum)),r.inclusive??!1,"bigger");if(a?.verb)return`${Lr(n??r.origin??"reik\u0161m\u0117")} ${a.verb} ${r.minimum.toString()} ${a.unit??"element\u0173"}`;let s=r.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${Lr(n??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${r.minimum.toString()} ${a?.unit}`}case"invalid_format":{let n=r;return n.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${n.prefix}"`:n.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${n.suffix}"`:n.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${n.includes}"`:n.format==="regex"?`Eilut\u0117 privalo atitikti ${n.pattern}`:`Neteisingas ${i[n.format]??r.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${r.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${r.keys.length>1?"i":"as"} rakt${r.keys.length>1?"ai":"as"}: ${g(r.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let n=o[r.origin]??r.origin;return`${Lr(n??r.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function pf(){return{localeError:Uy()}}var Dy=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},map:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(r){return e[r]??null}let i={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",mac:"MAC \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",credit_card:"\u0431\u0440\u043E\u0458 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u0430 \u043A\u0430\u0440\u0442\u0438\u0447\u043A\u0430",currency_code:"\u043A\u043E\u0434 \u043D\u0430 \u0432\u0430\u043B\u0443\u0442\u0430",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},o={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${r.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`}case"invalid_value":return r.values.length===1?`Invalid input: expected ${y(r.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${g(r.values,"|")}`;case"too_big":{let n=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${n}${r.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${n}${r.maximum.toString()}`}case"too_small":{let n=r.inclusive?">=":">",a=t(r.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0438\u043C\u0430 ${n}${r.minimum.toString()} ${a.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${n}${r.minimum.toString()}`}case"invalid_format":{let n=r;return n.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${n.prefix}"`:n.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${n.suffix}"`:n.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${n.includes}"`:n.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${n.pattern}`:`Invalid ${i[n.format]??r.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${g(r.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${r.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${r.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function gf(){return{localeError:Dy()}}var Ay=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"},map:{unit:"elemen",verb:"mempunyai"}};function t(r){return e[r]??null}let i={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",mac:"alamat MAC",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",credit_card:"nombor kad kredit",currency_code:"kod mata wang",iban:"IBAN",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"nombor"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Input tidak sah: dijangka instanceof ${r.expected}, diterima ${s}`:`Input tidak sah: dijangka ${n}, diterima ${s}`}case"invalid_value":return r.values.length===1?`Input tidak sah: dijangka ${y(r.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${g(r.values,"|")}`;case"too_big":{let n=r.inclusive?"<=":"<",a=t(r.origin);return a?`Terlalu besar: dijangka ${r.origin??"nilai"} ${a.verb} ${n}${r.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${r.origin??"nilai"} adalah ${n}${r.maximum.toString()}`}case"too_small":{let n=r.inclusive?">=":">",a=t(r.origin);return a?`Terlalu kecil: dijangka ${r.origin} ${a.verb} ${n}${r.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${r.origin} adalah ${n}${r.minimum.toString()}`}case"invalid_format":{let n=r;return n.format==="starts_with"?`String tidak sah: mesti bermula dengan "${n.prefix}"`:n.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${n.suffix}"`:n.format==="includes"?`String tidak sah: mesti mengandungi "${n.includes}"`:n.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${n.pattern}`:`${i[n.format]??r.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${g(r.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${r.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${r.origin}`;default:return"Input tidak sah"}}};function vf(){return{localeError:Ay()}}var Ny=()=>{let e={string:{unit:"\u0905\u0915\u094D\u0937\u0930",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},file:{unit:"\u092C\u093E\u0907\u091F",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},array:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},set:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},map:{unit:"\u092A\u094D\u0930\u0935\u093F\u0937\u094D\u091F\u093F",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"}};function t(r){return e[r]??null}let i={regex:"\u0907\u0928\u092A\u0941\u091F",email:"\u0907\u092E\u0947\u0932 \u0920\u0947\u0917\u093E\u0928\u093E",url:"URL",emoji:"\u0907\u092E\u094B\u091C\u0940",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u092E\u093F\u0924\u093F \u0930 \u0938\u092E\u092F",date:"ISO \u092E\u093F\u0924\u093F",time:"ISO \u0938\u092E\u092F",duration:"ISO \u0905\u0935\u0927\u093F",ipv4:"IPv4 \u0920\u0947\u0917\u093E\u0928\u093E",ipv6:"IPv6 \u0920\u0947\u0917\u093E\u0928\u093E",mac:"MAC \u0920\u0947\u0917\u093E\u0928\u093E",cidrv4:"IPv4 \u0926\u093E\u092F\u0930\u093E",cidrv6:"IPv6 \u0926\u093E\u092F\u0930\u093E",base64:"base64-\u0907\u0928\u094D\u0915\u094B\u0921 \u0917\u0930\u093F\u090F\u0915\u094B \u0938\u094D\u091F\u094D\u0930\u093F\u0919",base64url:"base64url-\u0907\u0928\u094D\u0915\u094B\u0921 \u0917\u0930\u093F\u090F\u0915\u094B \u0938\u094D\u091F\u094D\u0930\u093F\u0919",json_string:"JSON \u0938\u094D\u091F\u094D\u0930\u093F\u0919",e164:"E.164 \u0928\u092E\u094D\u092C\u0930",credit_card:"\u0915\u094D\u0930\u0947\u0921\u093F\u091F \u0915\u093E\u0930\u094D\u0921 \u0928\u092E\u094D\u092C\u0930",currency_code:"\u092E\u0941\u0926\u094D\u0930\u093E \u0915\u094B\u0921",iban:"IBAN",jwt:"JWT",template_literal:"\u0907\u0928\u092A\u0941\u091F"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${n}, \u092A\u094D\u0930\u093E\u092A\u094D\u0924 ${s}`}case"invalid_value":return r.values.length===1?`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${y(r.values[0])}`:`\u0905\u092E\u093E\u0928\u094D\u092F \u0935\u093F\u0915\u0932\u094D\u092A: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u092E\u093E\u0928\u0939\u0930\u0942 \u092E\u0927\u094D\u092F\u0947 \u090F\u0915 ${g(r.values,"|")}`;case"too_big":{let n=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0927\u0947\u0930\u0948 \u0920\u0942\u0932\u094B: ${r.origin??"\u092E\u093E\u0928"} \u092E\u093E ${n}${r.maximum.toString()} ${a.unit} ${a.verb}`:`\u0927\u0947\u0930\u0948 \u0920\u0942\u0932\u094B: ${r.origin??"\u092E\u093E\u0928"} ${n}${r.maximum.toString()} \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`}case"too_small":{let n=r.inclusive?">=":">",a=t(r.origin);return a?`\u0927\u0947\u0930\u0948 \u0938\u093E\u0928\u094B: ${r.origin} \u092E\u093E ${n}${r.minimum.toString()} ${a.unit} ${a.verb}`:`\u0927\u0947\u0930\u0948 \u0938\u093E\u0928\u094B: ${r.origin} ${n}${r.minimum.toString()} \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`}case"invalid_format":{let n=r;return n.format==="starts_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: "${n.prefix}" \u092C\u093E\u091F \u0938\u0941\u0930\u0941 \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`:n.format==="ends_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: "${n.suffix}" \u092E\u093E \u0938\u092E\u093E\u092A\u094D\u0924 \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`:n.format==="includes"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: "${n.includes}" \u0938\u092E\u093E\u0935\u0947\u0936 \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`:n.format==="regex"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: \u0922\u093E\u0901\u091A\u093E ${n.pattern} \u0938\u0901\u0917 \u092E\u0947\u0932 \u0916\u093E\u0928\u0941\u092A\u0930\u094D\u091B`:`\u0905\u092E\u093E\u0928\u094D\u092F ${i[n.format]??r.format}`}case"not_multiple_of":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u0902\u0916\u094D\u092F\u093E: ${r.divisor} \u0915\u094B \u0917\u0941\u0923\u091C \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`;case"unrecognized_keys":return`\u0905\u092A\u0930\u093F\u091A\u093F\u0924 \u0915\u0941\u091E\u094D\u091C\u0940${r.keys.length>1?"\u0939\u0930\u0942":""}: ${g(r.keys,", ")}`;case"invalid_key":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0915\u0941\u091E\u094D\u091C\u0940: ${r.origin} \u092E\u093E`;case"invalid_union":return r.options&&Array.isArray(r.options)&&r.options.length>0?`\u0905\u092E\u093E\u0928\u094D\u092F \u0921\u093F\u0938\u094D\u0915\u094D\u0930\u093F\u092E\u093F\u0928\u0947\u091F\u0930 \u092E\u093E\u0928: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${r.options.map(a=>`'${a}'`).join(" | ")}`:"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F";case"invalid_element":return`\u0905\u092E\u093E\u0928\u094D\u092F \u092E\u093E\u0928: ${r.origin} \u092E\u093E`;default:return"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F"}}};function hf(){return{localeError:Ny()}}var Ty=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"},map:{unit:"elementen",verb:"heeft"}};function t(r){return e[r]??null}let i={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",mac:"MAC-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",credit_card:"creditcardnummer",currency_code:"valutacode",iban:"IBAN",jwt:"JWT",template_literal:"invoer"},o={nan:"NaN",number:"getal"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Ongeldige invoer: verwacht instanceof ${r.expected}, ontving ${s}`:`Ongeldige invoer: verwacht ${n}, ontving ${s}`}case"invalid_value":return r.values.length===1?`Ongeldige invoer: verwacht ${y(r.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${g(r.values,"|")}`;case"too_big":{let n=r.inclusive?"<=":"<",a=t(r.origin),s=r.origin==="date"?"laat":r.origin==="string"?"lang":"groot";return a?`Te ${s}: verwacht dat ${r.origin??"waarde"} ${n}${r.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`:`Te ${s}: verwacht dat ${r.origin??"waarde"} ${n}${r.maximum.toString()} is`}case"too_small":{let n=r.inclusive?">=":">",a=t(r.origin),s=r.origin==="date"?"vroeg":r.origin==="string"?"kort":"klein";return a?`Te ${s}: verwacht dat ${r.origin} ${n}${r.minimum.toString()} ${a.unit} ${a.verb}`:`Te ${s}: verwacht dat ${r.origin} ${n}${r.minimum.toString()} is`}case"invalid_format":{let n=r;return n.format==="starts_with"?`Ongeldige tekst: moet met "${n.prefix}" beginnen`:n.format==="ends_with"?`Ongeldige tekst: moet op "${n.suffix}" eindigen`:n.format==="includes"?`Ongeldige tekst: moet "${n.includes}" bevatten`:n.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${n.pattern}`:`Ongeldig: ${i[n.format]??r.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${r.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${r.keys.length>1?"s":""}: ${g(r.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${r.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${r.origin}`;default:return"Ongeldige invoer"}}};function $f(){return{localeError:Ty()}}var Cy=()=>{let e={string:{unit:"teikn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"element",verb:"\xE5 innehalde"},set:{unit:"element",verb:"\xE5 innehalde"},map:{unit:"element",verb:"\xE5 innehalde"}};function t(r){return e[r]??null}let i={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varigheit",ipv4:"IPv4-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkoda streng",base64url:"base64url-enkoda streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kredittkortnummer",currency_code:"valutakode",iban:"IBAN",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"tal",array:"liste"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Ugyldig input: forventa instanceof ${r.expected}, fekk ${s}`:`Ugyldig input: forventa ${n}, fekk ${s}`}case"invalid_value":return r.values.length===1?`Ugyldig verdi: forventa ${y(r.values[0])}`:`Ugyldig val: forventa eitt av ${g(r.values,"|")}`;case"too_big":{let n=r.inclusive?"<=":"<",a=t(r.origin);return a?`For stor(t): forventa ${r.origin??"value"} til \xE5 ha ${n}${r.maximum.toString()} ${a.unit??"element"}`:`For stor(t): forventa ${r.origin??"value"} til \xE5 ha ${n}${r.maximum.toString()}`}case"too_small":{let n=r.inclusive?">=":">",a=t(r.origin);return a?`For lite(n): forventa ${r.origin} til \xE5 ha ${n}${r.minimum.toString()} ${a.unit}`:`For lite(n): forventa ${r.origin} til \xE5 ha ${n}${r.minimum.toString()}`}case"invalid_format":{let n=r;return n.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${n.prefix}"`:n.format==="ends_with"?`Ugyldig streng: m\xE5 slutte med "${n.suffix}"`:n.format==="includes"?`Ugyldig streng: m\xE5 innehalde "${n.includes}"`:n.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${n.pattern}`:`Ugyldig ${i[n.format]??r.format}`}case"not_multiple_of":return`Ugyldig tal: m\xE5 vere eit multiplum av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukjende n\xF8klar":"Ukjend n\xF8kkel"}: ${g(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${r.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${r.origin}`;default:return"Ugyldig input"}}};function yf(){return{localeError:Cy()}}var Ry=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"},map:{unit:"elementer",verb:"\xE5 inneholde"}};function t(r){return e[r]??null}let i={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kredittkortnummer",currency_code:"valutakode",iban:"IBAN",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"tall",array:"liste"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Ugyldig input: forventet instanceof ${r.expected}, fikk ${s}`:`Ugyldig input: forventet ${n}, fikk ${s}`}case"invalid_value":return r.values.length===1?`Ugyldig verdi: forventet ${y(r.values[0])}`:`Ugyldig valg: forventet en av ${g(r.values,"|")}`;case"too_big":{let n=r.inclusive?"<=":"<",a=t(r.origin);return a?`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${n}${r.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${n}${r.maximum.toString()}`}case"too_small":{let n=r.inclusive?">=":">",a=t(r.origin);return a?`For lite(n): forventet ${r.origin} til \xE5 ha ${n}${r.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${r.origin} til \xE5 ha ${n}${r.minimum.toString()}`}case"invalid_format":{let n=r;return n.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${n.prefix}"`:n.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${n.suffix}"`:n.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${n.includes}"`:n.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${n.pattern}`:`Ugyldig ${i[n.format]??r.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${g(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${r.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${r.origin}`;default:return"Ugyldig input"}}};function _f(){return{localeError:Ry()}}var Zy=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"},map:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(r){return e[r]??null}let i={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",mac:"MAC ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",credit_card:"i'tib\xE2r kart\u0131 numaras\u0131",currency_code:"para birimi kodu",iban:"IBAN",jwt:"JWT",template_literal:"giren"},o={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`F\xE2sit giren: umulan instanceof ${r.expected}, al\u0131nan ${s}`:`F\xE2sit giren: umulan ${n}, al\u0131nan ${s}`}case"invalid_value":return r.values.length===1?`F\xE2sit giren: umulan ${y(r.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${g(r.values,"|")}`;case"too_big":{let n=r.inclusive?"<=":"<",a=t(r.origin);return a?`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${n}${r.maximum.toString()} ${a.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${n}${r.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let n=r.inclusive?">=":">",a=t(r.origin);return a?`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${n}${r.minimum.toString()} ${a.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${n}${r.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let n=r;return n.format==="starts_with"?`F\xE2sit metin: "${n.prefix}" ile ba\u015Flamal\u0131.`:n.format==="ends_with"?`F\xE2sit metin: "${n.suffix}" ile bitmeli.`:n.format==="includes"?`F\xE2sit metin: "${n.includes}" ihtiv\xE2 etmeli.`:n.format==="regex"?`F\xE2sit metin: ${n.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${i[n.format]??r.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${r.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${r.keys.length>1?"s":""}: ${g(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${r.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function bf(){return{localeError:Zy()}}var Ly=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},map:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(r){return e[r]??null}let i={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",mac:"\u062F MAC \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",credit_card:"\u062F \u06A9\u0631\u06CC\u0689\u06CC\u067C \u06A9\u0627\u0631\u062A \u0634\u0645\u06CC\u0631\u0647",currency_code:"\u062F \u0627\u0633\u0639\u0627\u0631\u0648 \u06A9\u0648\u0689",iban:"IBAN",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},o={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${r.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${n} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return r.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${y(r.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${g(r.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let n=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${n}${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${n}${r.maximum.toString()} \u0648\u064A`}case"too_small":{let n=r.inclusive?">=":">",a=t(r.origin);return a?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${n}${r.minimum.toString()} ${a.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${n}${r.minimum.toString()} \u0648\u064A`}case"invalid_format":{let n=r;return n.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${n.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:n.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${n.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:n.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${n.includes}" \u0648\u0644\u0631\u064A`:n.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${n.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${i[n.format]??r.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${r.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${r.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${g(r.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${r.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${r.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function kf(){return{localeError:Ly()}}var Fy=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"},map:{unit:"element\xF3w",verb:"mie\u0107"}};function t(r){return e[r]??null}let i={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",mac:"adres MAC",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",credit_card:"numer karty kredytowej",currency_code:"kod waluty",iban:"IBAN",jwt:"JWT",template_literal:"wej\u015Bcie"},o={nan:"NaN",number:"liczba",array:"tablica"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${r.expected}, otrzymano ${s}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${n}, otrzymano ${s}`}case"invalid_value":return r.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${y(r.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${g(r.values,"|")}`;case"too_big":{let n=r.inclusive?"<=":"<",a=t(r.origin);return a?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${n}${r.maximum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${n}${r.maximum.toString()}`}case"too_small":{let n=r.inclusive?">=":">",a=t(r.origin);return a?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${n}${r.minimum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${n}${r.minimum.toString()}`}case"invalid_format":{let n=r;return n.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${n.prefix}"`:n.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${n.suffix}"`:n.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${n.includes}"`:n.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${n.pattern}`:`Nieprawid\u0142ow(y/a/e) ${i[n.format]??r.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${r.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${r.keys.length>1?"s":""}: ${g(r.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${r.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${r.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function xf(){return{localeError:Fy()}}var My=()=>{let e={string:{unit:"caracteres"},file:{unit:"bytes"},array:{unit:"elementos"},set:{unit:"elementos"},map:{unit:"entradas"}};function t(a){return e[a]??null}let i={regex:"a entrada",email:"o endere\xE7o de e-mail",url:"o URL",emoji:"o emoji",uuid:"o UUID",uuidv4:"o UUIDv4",uuidv6:"o UUIDv6",nanoid:"o nanoid",guid:"o GUID",cuid:"o cuid",cuid2:"o cuid2",ulid:"o ULID",xid:"o XID",ksuid:"o KSUID",datetime:"a data e hora ISO",date:"a data ISO",time:"a hora ISO",duration:"a dura\xE7\xE3o ISO",ipv4:"o endere\xE7o IPv4",ipv6:"o endere\xE7o IPv6",mac:"o endere\xE7o MAC",cidrv4:"o intervalo de endere\xE7os IPv4",cidrv6:"o intervalo de endere\xE7os IPv6",base64:"o texto codificado em base64",base64url:"o texto codificado em base64url",json_string:"o texto JSON",e164:"o n\xFAmero E.164",credit_card:"o n\xFAmero de cart\xE3o de cr\xE9dito",currency_code:"o c\xF3digo de moeda",iban:"o IBAN",jwt:"o JWT",template_literal:"a entrada"},o={masculine:{definite:"o",indefinite:"um"},feminine:{definite:"a",indefinite:"uma"}},r={string:{name:"texto",articles:o.masculine},number:{name:"n\xFAmero",articles:o.masculine},int:{name:"n\xFAmero inteiro",articles:o.masculine},boolean:{name:"valor booleano",articles:o.masculine},bigint:{name:"n\xFAmero bigint",articles:o.masculine},symbol:{name:"s\xEDmbolo",articles:o.masculine},undefined:{name:'valor "undefined"',articles:o.masculine},null:{name:'valor "nulo"',articles:o.masculine},never:{name:'valor "never"',articles:o.masculine},void:{name:'valor "void"',articles:o.masculine},date:{name:"data",articles:o.feminine},array:{name:"vetor",articles:o.masculine},object:{name:"objeto",articles:o.masculine},tuple:{name:"tuplo",articles:o.masculine},record:{name:"registo",articles:o.masculine},map:{name:"mapa",articles:o.masculine},set:{name:"conjunto",articles:o.masculine},file:{name:"ficheiro",articles:o.masculine},nonoptional:{name:"valor n\xE3o opcional",articles:o.masculine},nan:{name:'valor "NaN"',articles:o.masculine},function:{name:"fun\xE7\xE3o",articles:o.feminine}};function n(a,s){let u=r[a]??{name:`valor "${a}"`,articles:o.masculine};return`${u.articles[s]} ${u.name}`}return a=>{switch(a.code){case"invalid_type":{let s=n(a.expected,"indefinite"),u=_(a.input),c=n(u,"indefinite");return`Entrada inv\xE1lida: esperava ${s}, recebeu ${c}`}case"invalid_value":return a.values.length===1?`Entrada inv\xE1lida: esperava ${y(a.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperava uma das seguintes op\xE7\xF5es: ${g(a.values,"|")}`;case"too_big":{let s=a.inclusive?"<=":"<",u=t(a.origin);return u?`Demasiado grande: esperava que ${n(a.origin,"definite")} tivesse ${s} ${a.maximum.toString()} ${u.unit??"elementos"}`:`Demasiado grande: esperava que ${n(a.origin,"definite")} fosse ${s} ${a.maximum.toString()}`}case"too_small":{let s=a.inclusive?">=":">",u=t(a.origin);return u?`Demasiado pequeno: esperava que ${n(a.origin,"definite")} tivesse ${s} ${a.minimum.toString()} ${u.unit??"elementos"}`:`Demasiado pequeno: esperava que ${n(a.origin,"definite")} fosse ${s} ${a.minimum.toString()}`}case"invalid_format":{let s=a;return s.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar por "${s.prefix}"`:s.format==="ends_with"?`Texto inv\xE1lido: deve terminar em "${s.suffix}"`:s.format==="includes"?`Texto inv\xE1lido: deve incluir "${s.includes}"`:s.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${s.pattern}`:`Formato d${i[s.format]??a.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${a.divisor}`;case"unrecognized_keys":{let s=a.keys.length>1?"s":"";return`Chave${s} inv\xE1lida${s}: ${g(a.keys,", ")}`}case"invalid_key":return`Entrada inv\xE1lida n${n(a.origin,"definite")}`;case"invalid_union":return a.options&&Array.isArray(a.options)&&a.options.length>0?`Valor de discrimina\xE7\xE3o inv\xE1lido. Esperava ${a.options.map(u=>`'${u}'`).join(" | ")}`:"Entrada inv\xE1lida";case"invalid_element":return`Entrada inv\xE1lida n${n(a.origin,"definite")}`;default:return"Entrada inv\xE1lida"}}};function wf(){return{localeError:My()}}var Vy=()=>{let e={string:{unit:"caracteres"},file:{unit:"bytes"},array:{unit:"elementos"},set:{unit:"elementos"},map:{unit:"entradas"}};function t(a){return e[a]??null}let i={regex:"a entrada",email:"o endere\xE7o de e-mail",url:"o URL",emoji:"o emoji",uuid:"o UUID",uuidv4:"o UUIDv4",uuidv6:"o UUIDv6",nanoid:"o nanoid",guid:"o GUID",cuid:"o cuid",cuid2:"o cuid2",ulid:"o ULID",xid:"o XID",ksuid:"o KSUID",datetime:"a data e hora ISO",date:"a data ISO",time:"a hora ISO",duration:"a dura\xE7\xE3o ISO",ipv4:"o endere\xE7o IPv4",ipv6:"o endere\xE7o IPv6",mac:"o endere\xE7o MAC",cidrv4:"a faixa de endere\xE7os IPv4",cidrv6:"a faixa de endere\xE7os IPv6",base64:"o texto codificado em base64",base64url:"o texto codificado em base64url",json_string:"o texto JSON",e164:"o n\xFAmero E.164",credit_card:"o n\xFAmero de cart\xE3o de cr\xE9dito",currency_code:"o c\xF3digo de moeda",iban:"o IBAN",jwt:"o JWT",template_literal:"a entrada"},o={masculine:{definite:"o",indefinite:"um"},feminine:{definite:"a",indefinite:"uma"}},r={string:{name:"texto",articles:o.masculine},number:{name:"n\xFAmero",articles:o.masculine},int:{name:"n\xFAmero inteiro",articles:o.masculine},boolean:{name:"valor booleano",articles:o.masculine},bigint:{name:"n\xFAmero bigint",articles:o.masculine},symbol:{name:"s\xEDmbolo",articles:o.masculine},undefined:{name:'valor "undefined"',articles:o.masculine},null:{name:'valor "nulo"',articles:o.masculine},never:{name:'valor "never"',articles:o.masculine},void:{name:'valor "void"',articles:o.masculine},date:{name:"data",articles:o.feminine},array:{name:"vetor",articles:o.masculine},object:{name:"objeto",articles:o.masculine},tuple:{name:"tupla",articles:o.feminine},record:{name:"registro",articles:o.masculine},map:{name:"mapa",articles:o.masculine},set:{name:"conjunto",articles:o.masculine},file:{name:"arquivo",articles:o.masculine},nonoptional:{name:"valor n\xE3o opcional",articles:o.masculine},nan:{name:'valor "NaN"',articles:o.masculine},function:{name:"fun\xE7\xE3o",articles:o.feminine}};function n(a,s){let u=r[a]??{name:`valor "${a}"`,articles:o.masculine};return`${u.articles[s]} ${u.name}`}return a=>{switch(a.code){case"invalid_type":{let s=n(a.expected,"indefinite"),u=_(a.input),c=n(u,"indefinite");return`Entrada inv\xE1lida: esperava ${s}, recebeu ${c}`}case"invalid_value":return a.values.length===1?`Entrada inv\xE1lida: esperava ${y(a.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperava uma das seguintes op\xE7\xF5es: ${g(a.values,"|")}`;case"too_big":{let s=a.inclusive?"<=":"<",u=t(a.origin);return u?`Grande demais: esperava que ${n(a.origin,"definite")} tivesse ${s} ${a.maximum.toString()} ${u.unit??"elementos"}`:`Grande demais: esperava que ${n(a.origin,"definite")} fosse ${s} ${a.maximum.toString()}`}case"too_small":{let s=a.inclusive?">=":">",u=t(a.origin);return u?`Pequeno demais: esperava que ${n(a.origin,"definite")} tivesse ${s} ${a.minimum.toString()} ${u.unit??"elementos"}`:`Pequeno demais: esperava que ${n(a.origin,"definite")} fosse ${s} ${a.minimum.toString()}`}case"invalid_format":{let s=a;return s.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${s.prefix}"`:s.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${s.suffix}"`:s.format==="includes"?`Texto inv\xE1lido: deve incluir "${s.includes}"`:s.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${s.pattern}`:`Formato d${i[s.format]??a.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${a.divisor}`;case"unrecognized_keys":{let s=a.keys.length>1?"s":"";return`Chave${s} inv\xE1lida${s}: ${g(a.keys,", ")}`}case"invalid_key":return`Entrada inv\xE1lida n${n(a.origin,"definite")}`;case"invalid_union":return a.options&&Array.isArray(a.options)&&a.options.length>0?`Valor de discrimina\xE7\xE3o inv\xE1lido. Esperava ${a.options.map(u=>`'${u}'`).join(" | ")}`:"Entrada inv\xE1lida";case"invalid_element":return`Entrada inv\xE1lida n${n(a.origin,"definite")}`;default:return"Entrada inv\xE1lida"}}};function If(){return{localeError:Vy()}}var Jy=()=>{let e={string:{unit:"caractere",verb:"s\u0103 aib\u0103"},file:{unit:"octe\u021Bi",verb:"s\u0103 aib\u0103"},array:{unit:"elemente",verb:"s\u0103 aib\u0103"},set:{unit:"elemente",verb:"s\u0103 aib\u0103"},map:{unit:"intr\u0103ri",verb:"s\u0103 aib\u0103"}};function t(r){return e[r]??null}let i={regex:"intrare",email:"adres\u0103 de email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",credit_card:"num\u0103r de card de credit",currency_code:"cod valutar",iban:"IBAN",jwt:"JWT",template_literal:"intrare"},o={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return`Intrare invalid\u0103: a\u0219teptat ${n}, primit ${s}`}case"invalid_value":return r.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${y(r.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${g(r.values,"|")}`;case"too_big":{let n=r.inclusive?"<=":"<",a=t(r.origin);return a?`Prea mare: a\u0219teptat ca ${r.origin??"valoarea"} ${a.verb} ${n}${r.maximum.toString()} ${a.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${r.origin??"valoarea"} s\u0103 fie ${n}${r.maximum.toString()}`}case"too_small":{let n=r.inclusive?">=":">",a=t(r.origin);return a?`Prea mic: a\u0219teptat ca ${r.origin} ${a.verb} ${n}${r.minimum.toString()} ${a.unit}`:`Prea mic: a\u0219teptat ca ${r.origin} s\u0103 fie ${n}${r.minimum.toString()}`}case"invalid_format":{let n=r;return n.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${n.prefix}"`:n.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${n.suffix}"`:n.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${n.includes}"`:n.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${n.pattern}`:`Format invalid: ${i[n.format]??r.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${r.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${g(r.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${r.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${r.origin}`;default:return"Intrare invalid\u0103"}}};function Sf(){return{localeError:Jy()}}function zf(e,t,i,o){let r=Math.abs(e),n=r%10,a=r%100;return a>=11&&a<=19?o:n===1?t:n>=2&&n<=4?i:o}var By=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},map:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(r){return e[r]??null}let i={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",mac:"MAC \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",credit_card:"\u043D\u043E\u043C\u0435\u0440 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u043E\u0439 \u043A\u0430\u0440\u0442\u044B",currency_code:"\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u044B",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${r.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${n}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${y(r.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${g(r.values,"|")}`;case"too_big":{let n=r.inclusive?"<=":"<",a=t(r.origin);if(a){let s=Number(r.maximum),u=zf(s,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${n}${r.maximum.toString()} ${u}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${n}${r.maximum.toString()}`}case"too_small":{let n=r.inclusive?">=":">",a=t(r.origin);if(a){let s=Number(r.minimum),u=zf(s,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${n}${r.minimum.toString()} ${u}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin} \u0431\u0443\u0434\u0435\u0442 ${n}${r.minimum.toString()}`}case"invalid_format":{let n=r;return n.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${n.prefix}"`:n.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${n.suffix}"`:n.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${n.includes}"`:n.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${n.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${i[n.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${r.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0438":""}: ${g(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${r.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function jf(){return{localeError:By()}}var Ky=()=>{let e={string:{unit:"znakov",verb:"ma\u0165"},file:{unit:"bajtov",verb:"ma\u0165"},array:{unit:"prvkov",verb:"ma\u0165"},set:{unit:"prvkov",verb:"ma\u0165"},map:{unit:"polo\u017Eiek",verb:"ma\u0165"}};function t(r){return e[r]??null}let i={regex:"regul\xE1rny v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"d\xE1tum a \u010Das vo form\xE1te ISO",date:"d\xE1tum vo form\xE1te ISO",time:"\u010Das vo form\xE1te ISO",duration:"doba trvania ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",mac:"MAC adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"re\u0165azec zak\xF3dovan\xFD vo form\xE1te base64",base64url:"re\u0165azec zak\xF3dovan\xFD vo form\xE1te base64url",json_string:"re\u0165azec vo form\xE1te JSON",e164:"\u010D\xEDslo E.164",credit_card:"\u010D\xEDslo kreditnej karty",currency_code:"k\xF3d meny",iban:"IBAN",jwt:"JWT",template_literal:"vstup"},o={nan:"NaN",number:"\u010D\xEDslo",string:"re\u0165azec",function:"funkcia",array:"pole"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Neplatn\xFD vstup: o\u010Dak\xE1van\xE9 instanceof ${r.expected}, obdr\u017Ean\xE9 ${s}`:`Neplatn\xFD vstup: o\u010Dak\xE1van\xE9 ${n}, obdr\u017Ean\xE9 ${s}`}case"invalid_value":return r.values.length===1?`Neplatn\xFD vstup: o\u010Dak\xE1van\xE9 ${y(r.values[0])}`:`Neplatn\xFD vstup: o\u010Dak\xE1van\xE1 jedna z hodn\xF4t ${g(r.values,"|")}`;case"too_big":{let n=r.inclusive?"<=":"<",a=t(r.origin);return a?`Hodnota je pr\xEDli\u0161 ve\u013Ek\xE1: ${r.origin??"hodnota"} mus\xED ma\u0165 ${n}${r.maximum.toString()} ${a.unit??"prvkov"}`:`Hodnota je pr\xEDli\u0161 ve\u013Ek\xE1: ${r.origin??"hodnota"} mus\xED by\u0165 ${n}${r.maximum.toString()}`}case"too_small":{let n=r.inclusive?">=":">",a=t(r.origin);return a?`Hodnota je pr\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED ma\u0165 ${n}${r.minimum.toString()} ${a.unit??"prvkov"}`:`Hodnota je pr\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED by\u0165 ${n}${r.minimum.toString()}`}case"invalid_format":{let n=r;return n.format==="starts_with"?`Neplatn\xFD re\u0165azec: mus\xED za\u010D\xEDna\u0165 na "${n.prefix}"`:n.format==="ends_with"?`Neplatn\xFD re\u0165azec: mus\xED kon\u010Di\u0165 na "${n.suffix}"`:n.format==="includes"?`Neplatn\xFD re\u0165azec: mus\xED obsahova\u0165 "${n.includes}"`:n.format==="regex"?`Neplatn\xFD re\u0165azec: mus\xED zodpoveda\u0165 vzoru ${n.pattern}`:`Neplatn\xFD form\xE1t ${i[n.format]??r.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED by\u0165 n\xE1sobkom ${r.divisor}`;case"unrecognized_keys":return`Nezn\xE1me kl\xFA\u010De: ${g(r.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xFA\u010D v ${r.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${r.origin}`;default:return"Neplatn\xFD vstup"}}};function Pf(){return{localeError:Ky()}}var Wy=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"},map:{unit:"elementov",verb:"imeti"}};function t(r){return e[r]??null}let i={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",mac:"MAC naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",credit_card:"\u0161tevilka kreditne kartice",currency_code:"koda valute",iban:"IBAN",jwt:"JWT",template_literal:"vnos"},o={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${r.expected}, prejeto ${s}`:`Neveljaven vnos: pri\u010Dakovano ${n}, prejeto ${s}`}case"invalid_value":return r.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${y(r.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${g(r.values,"|")}`;case"too_big":{let n=r.inclusive?"<=":"<",a=t(r.origin);return a?`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} imelo ${n}${r.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} ${n}${r.maximum.toString()}`}case"too_small":{let n=r.inclusive?">=":">",a=t(r.origin);return a?`Premajhno: pri\u010Dakovano, da bo ${r.origin} imelo ${n}${r.minimum.toString()} ${a.unit}`:`Premajhno: pri\u010Dakovano, da bo ${r.origin} ${n}${r.minimum.toString()}`}case"invalid_format":{let n=r;return n.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${n.prefix}"`:n.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${n.suffix}"`:n.format==="includes"?`Neveljaven niz: mora vsebovati "${n.includes}"`:n.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${n.pattern}`:`Neveljaven ${i[n.format]??r.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${r.divisor}`;case"unrecognized_keys":return`Neprepoznan${r.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${g(r.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${r.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${r.origin}`;default:return"Neveljaven vnos"}}};function Of(){return{localeError:Wy()}}var Gy=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"},map:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(r){return e[r]??null}let i={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-adress",ipv6:"IPv6-adress",mac:"MAC-adress",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",credit_card:"kreditkortsnummer",currency_code:"valutakod",iban:"IBAN",jwt:"JWT",template_literal:"mall-literal"},o={nan:"NaN",number:"antal",array:"lista"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${r.expected}, fick ${s}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${n}, fick ${s}`}case"invalid_value":return r.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${y(r.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${g(r.values,"|")}`;case"too_big":{let n=r.inclusive?"<=":"<",a=t(r.origin);return a?`F\xF6r stor(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${n}${r.maximum.toString()} ${a.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${r.origin??"v\xE4rdet"} att ha ${n}${r.maximum.toString()}`}case"too_small":{let n=r.inclusive?">=":">",a=t(r.origin);return a?`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${n}${r.minimum.toString()} ${a.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${n}${r.minimum.toString()}`}case"invalid_format":{let n=r;return n.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${n.prefix}"`:n.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${n.suffix}"`:n.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${n.includes}"`:n.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${n.pattern}"`:`Ogiltig(t) ${i[n.format]??r.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${g(r.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${r.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${r.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};function Ef(){return{localeError:Gy()}}var qy=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},map:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(r){return e[r]??null}let i={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",mac:"MAC \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",credit_card:"\u0B95\u0B9F\u0BA9\u0BCD \u0B85\u0B9F\u0BCD\u0B9F\u0BC8 \u0B8E\u0BA3\u0BCD",currency_code:"\u0BA8\u0BBE\u0BA3\u0BAF\u0B95\u0BCD \u0B95\u0BC1\u0BB1\u0BBF\u0BAF\u0BC0\u0B9F\u0BC1",iban:"IBAN",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${r.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`}case"invalid_value":return r.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${y(r.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${g(r.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let n=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${n}${r.maximum.toString()} ${a.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${n}${r.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let n=r.inclusive?">=":">",a=t(r.origin);return a?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin} ${n}${r.minimum.toString()} ${a.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin} ${n}${r.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let n=r;return n.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${n.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:n.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${n.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:n.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${n.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:n.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${n.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${i[n.format]??r.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${r.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${r.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${g(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${r.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function Uf(){return{localeError:qy()}}var Xy=()=>{let e={string:{unit:"\u0430\u043B\u043E\u043C\u0430\u0442",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"},file:{unit:"\u0431\u0430\u0439\u0442",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"},array:{unit:"\u0443\u043D\u0441\u0443\u0440",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"},set:{unit:"\u0443\u043D\u0441\u0443\u0440",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"},map:{unit:"\u0441\u0430\u0431\u0442",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"}};function t(r){return e[r]??null}let i={regex:"\u0432\u0443\u0440\u0443\u0434",email:"\u0441\u0443\u0440\u043E\u0493\u0430\u0438 email",url:"URL",emoji:"\u044D\u043C\u043E\u04B7\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0441\u0430\u043D\u0430\u0432\u0443 \u0432\u0430\u049B\u0442\u0438 ISO",date:"\u0441\u0430\u043D\u0430\u0438 ISO",time:"\u0432\u0430\u049B\u0442\u0438 ISO",duration:"\u0434\u0430\u0432\u043E\u043C\u043D\u043E\u043A\u0438\u0438 ISO",ipv4:"\u0441\u0443\u0440\u043E\u0493\u0430\u0438 IPv4",ipv6:"\u0441\u0443\u0440\u043E\u0493\u0430\u0438 IPv6",mac:"\u0441\u0443\u0440\u043E\u0493\u0430\u0438 MAC",cidrv4:"\u043C\u0430\u04B3\u0434\u0443\u0434\u0430\u0438 IPv4",cidrv6:"\u043C\u0430\u04B3\u0434\u0443\u0434\u0430\u0438 IPv6",base64:"\u0441\u0430\u0442\u0440\u0438 \u0434\u0430\u0440 \u0444\u043E\u0440\u043C\u0430\u0442\u0438 base64",base64url:"\u0441\u0430\u0442\u0440\u0438 \u0434\u0430\u0440 \u0444\u043E\u0440\u043C\u0430\u0442\u0438 base64url",json_string:"\u0441\u0430\u0442\u0440\u0438 JSON",e164:"\u0440\u0430\u049B\u0430\u043C\u0438 E.164",credit_card:"\u0440\u0430\u049B\u0430\u043C\u0438 \u043A\u043E\u0440\u0442\u0438 \u043A\u0440\u0435\u0434\u0438\u0442\u04E3",currency_code:"\u0440\u0430\u043C\u0437\u0438 \u0430\u0441\u044A\u043E\u0440",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u0443\u0440\u0443\u0434"},o={nan:"NaN",number:"\u0440\u0430\u049B\u0430\u043C",string:"\u0441\u0430\u0442\u0440",array:"\u043C\u0430\u0441\u0441\u0438\u0432",object:"\u043E\u0431\u044A\u0435\u043A\u0442",date:"\u0441\u0430\u043D\u0430"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return`\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: ${n} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442, ${s} \u0433\u0438\u0440\u0438\u0444\u0442\u0430 \u0448\u0443\u0434`}case"invalid_value":return r.values.length===1?`\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: ${y(r.values[0])} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442`:`\u0418\u043D\u0442\u0438\u0445\u043E\u0431\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u044F\u043A\u0435 \u0430\u0437 ${g(r.values,"|")} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442`;case"too_big":{let n=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0425\u0435\u043B\u0435 \u043A\u0430\u043B\u043E\u043D: ${r.origin??"\u049B\u0438\u043C\u0430\u0442"} \u0431\u043E\u044F\u0434 ${n}${r.maximum.toString()} ${a.unit} ${a.verb}`:`\u0425\u0435\u043B\u0435 \u043A\u0430\u043B\u043E\u043D: ${r.origin??"\u049B\u0438\u043C\u0430\u0442"} \u0431\u043E\u044F\u0434 ${n}${r.maximum.toString()} \u0431\u043E\u0448\u0430\u0434`}case"too_small":{let n=r.inclusive?">=":">",a=t(r.origin);return a?`\u0425\u0435\u043B\u0435 \u0445\u0443\u0440\u0434: ${r.origin} \u0431\u043E\u044F\u0434 ${n}${r.minimum.toString()} ${a.unit} ${a.verb}`:`\u0425\u0435\u043B\u0435 \u0445\u0443\u0440\u0434: ${r.origin} \u0431\u043E\u044F\u0434 ${n}${r.minimum.toString()} \u0431\u043E\u0448\u0430\u0434`}case"invalid_format":{let n=r;return n.format==="starts_with"?`\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u043E "${n.prefix}" \u043E\u0493\u043E\u0437 \u0448\u0430\u0432\u0430\u0434`:n.format==="ends_with"?`\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u043E "${n.suffix}" \u0430\u043D\u04B7\u043E\u043C \u0451\u0431\u0430\u0434`:n.format==="includes"?`\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 "${n.includes}"-\u0440\u043E \u0434\u0430\u0440 \u0431\u0430\u0440 \u0433\u0438\u0440\u0430\u0434`:n.format==="regex"?`\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u0430 \u043D\u0430\u043C\u0443\u043D\u0430\u0438 ${n.pattern} \u043C\u0443\u0432\u043E\u0444\u0438\u049B\u0430\u0442 \u043A\u0443\u043D\u0430\u0434`:`${i[n.format]??r.format}-\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442`}case"not_multiple_of":return`\u0420\u0430\u049B\u0430\u043C\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u0430 ${r.divisor} \u0431\u0435 \u0431\u0430\u049B\u0438\u044F \u0442\u0430\u049B\u0441\u0438\u043C \u0448\u0430\u0432\u0430\u0434`;case"unrecognized_keys":return`\u041A\u0430\u043B\u0438\u0434${r.keys.length>1?"\u04B3\u043E\u0438":"\u0438"} \u043D\u043E\u043C\u0430\u044A\u043B\u0443\u043C: ${g(r.keys,", ")}`;case"invalid_key":return`\u041A\u0430\u043B\u0438\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442 \u0434\u0430\u0440 ${r.origin}`;case"invalid_union":return r.options&&Array.isArray(r.options)&&r.options.length>0?`\u049A\u0438\u043C\u0430\u0442\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442\u0438 \u0434\u0438\u0441\u043A\u0440\u0438\u043C\u0438\u043D\u0430\u0442\u043E\u0440: ${r.options.map(a=>`'${a}'`).join(" | ")} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442`:"\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442";case"invalid_element":return`\u049A\u0438\u043C\u0430\u0442\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442 \u0434\u0430\u0440 ${r.origin}`;default:return"\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442"}}};function Df(){return{localeError:Xy()}}var Hy=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},map:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(r){return e[r]??null}let i={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",mac:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 MAC",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",credit_card:"\u0E2B\u0E21\u0E32\u0E22\u0E40\u0E25\u0E02\u0E1A\u0E31\u0E15\u0E23\u0E40\u0E04\u0E23\u0E14\u0E34\u0E15",currency_code:"\u0E23\u0E2B\u0E31\u0E2A\u0E2A\u0E01\u0E38\u0E25\u0E40\u0E07\u0E34\u0E19",iban:"IBAN",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},o={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${r.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${n} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`}case"invalid_value":return r.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${y(r.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${g(r.values,"|")}`;case"too_big":{let n=r.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",a=t(r.origin);return a?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${n} ${r.maximum.toString()} ${a.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${n} ${r.maximum.toString()}`}case"too_small":{let n=r.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",a=t(r.origin);return a?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${n} ${r.minimum.toString()} ${a.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${n} ${r.minimum.toString()}`}case"invalid_format":{let n=r;return n.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${n.prefix}"`:n.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${n.suffix}"`:n.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${n.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:n.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${n.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${i[n.format]??r.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${r.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${g(r.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${r.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${r.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function Af(){return{localeError:Hy()}}var Yy=()=>{let e={string:{unit:"simwol",verb:"bolmaly"},file:{unit:"ba\xFDt",verb:"bolmaly"},array:{unit:"elementler",verb:"bolmaly"},set:{unit:"elementler",verb:"bolmaly"},map:{unit:"elementler",verb:"bolmaly"}};function t(r){return e[r]??null}let i={regex:"giri\u015F",email:"e-po\xE7ta salgysy",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sene we wagt",date:"ISO sene",time:"ISO wagt",duration:"ISO wagt aralygy",ipv4:"IPv4 salgysy",ipv6:"IPv6 salgysy",mac:"MAC salgysy",cidrv4:"IPv4 aralygy",cidrv6:"IPv6 aralygy",base64:"base64 bilen \u015Fifrlenen setir",base64url:"base64url bilen \u015Fifrlenen setir",json_string:"JSON setiri",e164:"E.164 nomeri",credit_card:"kredit kartyny\u0148 nomeri",currency_code:"wal\xFDuta kody",iban:"IBAN",jwt:"JWT",template_literal:"\u015Fablon"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return`N\xE4dogry baha: gara\u015Fylan ${n} \xFDerine ${s} alyndy`}case"invalid_value":return r.values.length===1?`N\xE4dogry baha: ${y(r.values[0])} bolmaly`:`N\xE4dogry sa\xFDlaw: a\u015Fakdakylardan biri bolmaly: ${g(r.values,"|")}`;case"too_big":{let n=r.inclusive?"<=":"<",a=t(r.origin);return a?`Has uly: gara\u015Fyl\xFDan ${r.origin??"baha"} ${n} ${r.maximum.toString()} ${a.unit??"element"}`:`Has uly: gara\u015Fyl\xFDan ${r.origin??"baha"} ${n} ${r.maximum.toString()}`}case"too_small":{let n=r.inclusive?">=":">",a=t(r.origin);return a?`Has ki\xE7i: gara\u015Fyl\xFDan ${r.origin} ${n} ${r.minimum.toString()} ${a.unit}`:`Has ki\xE7i: gara\u015Fyl\xFDan ${r.origin} ${n} ${r.minimum.toString()}`}case"invalid_format":{let n=r;return n.format==="starts_with"?`N\xE4dogry setir: "${n.prefix}" bilen ba\u015Flamaly`:n.format==="ends_with"?`N\xE4dogry setir: "${n.suffix}" bilen gutarmaly`:n.format==="includes"?`N\xE4dogry setir: "${n.includes}" saklamaly`:n.format==="regex"?`N\xE4dogry setir: ${n.pattern} nusga la\xFDyk bolmaly`:`N\xE4dogry ${i[n.format]??r.format}`}case"not_multiple_of":return`N\xE4dogry san: ${r.divisor} bilen galyndysyz b\xF6l\xFCnmeli`;case"unrecognized_keys":return`Tanalma\xFDan a\xE7ar${r.keys.length>1?"lar":""}: ${g(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7inde n\xE4dogry a\xE7ar`;case"invalid_union":return"N\xE4dogry baha";case"invalid_element":return`${r.origin} i\xE7inde n\xE4dogry baha`;default:return"N\xE4dogry baha"}}};function Nf(){return{localeError:Yy()}}var Qy=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},map:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(r){return e[r]??null}let i={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",mac:"MAC adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",credit_card:"kredi kart\u0131 numaras\u0131",currency_code:"para birimi kodu",iban:"IBAN",jwt:"JWT",template_literal:"\u015Eablon dizesi"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${r.expected}, al\u0131nan ${s}`:`Ge\xE7ersiz de\u011Fer: beklenen ${n}, al\u0131nan ${s}`}case"invalid_value":return r.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${y(r.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${g(r.values,"|")}`;case"too_big":{let n=r.inclusive?"<=":"<",a=t(r.origin);return a?`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${n}${r.maximum.toString()} ${a.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${n}${r.maximum.toString()}`}case"too_small":{let n=r.inclusive?">=":">",a=t(r.origin);return a?`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${n}${r.minimum.toString()} ${a.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${n}${r.minimum.toString()}`}case"invalid_format":{let n=r;return n.format==="starts_with"?`Ge\xE7ersiz metin: "${n.prefix}" ile ba\u015Flamal\u0131`:n.format==="ends_with"?`Ge\xE7ersiz metin: "${n.suffix}" ile bitmeli`:n.format==="includes"?`Ge\xE7ersiz metin: "${n.includes}" i\xE7ermeli`:n.format==="regex"?`Ge\xE7ersiz metin: ${n.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${i[n.format]??r.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${r.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${r.keys.length>1?"lar":""}: ${g(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${r.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function Tf(){return{localeError:Qy()}}var e_=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},map:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(r){return e[r]??null}let i={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",mac:"\u0430\u0434\u0440\u0435\u0441\u0430 MAC",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",credit_card:"\u043D\u043E\u043C\u0435\u0440 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u043E\u0457 \u043A\u0430\u0440\u0442\u043A\u0438",currency_code:"\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u0438",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${r.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${n}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${y(r.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${g(r.values,"|")}`;case"too_big":{let n=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${a.verb} ${n}${r.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${n}${r.maximum.toString()}`}case"too_small":{let n=r.inclusive?">=":">",a=t(r.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin} ${a.verb} ${n}${r.minimum.toString()} ${a.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin} \u0431\u0443\u0434\u0435 ${n}${r.minimum.toString()}`}case"invalid_format":{let n=r;return n.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${n.prefix}"`:n.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${n.suffix}"`:n.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${n.includes}"`:n.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${n.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${i[n.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0456":""}: ${g(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${r.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function vi(){return{localeError:e_()}}function Cf(){return vi()}var t_=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},map:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(r){return e[r]??null}let i={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",mac:"\u0627\u06CC\u0645 \u0627\u06D2 \u0633\u06CC \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",credit_card:"\u06A9\u0631\u06CC\u0688\u0679 \u06A9\u0627\u0631\u0688 \u0646\u0645\u0628\u0631",currency_code:"\u06A9\u0631\u0646\u0633\u06CC \u06A9\u0648\u0688",iban:"IBAN",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},o={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${r.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${n} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return r.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${y(r.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${g(r.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let n=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${n}${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${n}${r.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let n=r.inclusive?">=":">",a=t(r.origin);return a?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u06D2 ${n}${r.minimum.toString()} ${a.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u0627 ${n}${r.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let n=r;return n.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${n.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:n.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${n.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:n.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${n.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:n.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${n.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${i[n.format]??r.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${r.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${r.keys.length>1?"\u0632":""}: ${g(r.keys,"\u060C ")}`;case"invalid_key":return`${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function Rf(){return{localeError:t_()}}var r_=()=>{let e={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"},map:{unit:"yozuv",verb:"bo\u2018lishi kerak"}};function t(r){return e[r]??null}let i={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",credit_card:"kredit karta raqami",currency_code:"valyuta kodi",iban:"IBAN",jwt:"JWT",template_literal:"kirish"},o={nan:"NaN",number:"raqam",array:"massiv"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${r.expected}, qabul qilingan ${s}`:`Noto\u2018g\u2018ri kirish: kutilgan ${n}, qabul qilingan ${s}`}case"invalid_value":return r.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${y(r.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${g(r.values,"|")}`;case"too_big":{let n=r.inclusive?"<=":"<",a=t(r.origin);return a?`Juda katta: kutilgan ${r.origin??"qiymat"} ${n}${r.maximum.toString()} ${a.unit} ${a.verb}`:`Juda katta: kutilgan ${r.origin??"qiymat"} ${n}${r.maximum.toString()}`}case"too_small":{let n=r.inclusive?">=":">",a=t(r.origin);return a?`Juda kichik: kutilgan ${r.origin} ${n}${r.minimum.toString()} ${a.unit} ${a.verb}`:`Juda kichik: kutilgan ${r.origin} ${n}${r.minimum.toString()}`}case"invalid_format":{let n=r;return n.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${n.prefix}" bilan boshlanishi kerak`:n.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${n.suffix}" bilan tugashi kerak`:n.format==="includes"?`Noto\u2018g\u2018ri satr: "${n.includes}" ni o\u2018z ichiga olishi kerak`:n.format==="regex"?`Noto\u2018g\u2018ri satr: ${n.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${i[n.format]??r.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${r.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${r.keys.length>1?"lar":""}: ${g(r.keys,", ")}`;case"invalid_key":return`${r.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${r.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}};function Zf(){return{localeError:r_()}}var n_=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},map:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(r){return e[r]??null}let i={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",mac:"\u0111\u1ECBa ch\u1EC9 MAC",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",credit_card:"s\u1ED1 th\u1EBB t\xEDn d\u1EE5ng",currency_code:"m\xE3 ti\u1EC1n t\u1EC7",iban:"IBAN",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},o={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${r.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${n}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`}case"invalid_value":return r.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${y(r.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${g(r.values,"|")}`;case"too_big":{let n=r.inclusive?"<=":"<",a=t(r.origin);return a?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${a.verb} ${n}${r.maximum.toString()} ${a.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${n}${r.maximum.toString()}`}case"too_small":{let n=r.inclusive?">=":">",a=t(r.origin);return a?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${a.verb} ${n}${r.minimum.toString()} ${a.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${n}${r.minimum.toString()}`}case"invalid_format":{let n=r;return n.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${n.prefix}"`:n.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${n.suffix}"`:n.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${n.includes}"`:n.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${n.pattern}`:`${i[n.format]??r.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${r.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${g(r.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${r.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${r.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function Lf(){return{localeError:n_()}}var i_=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"},map:{unit:"\u9879",verb:"\u5305\u542B"}};function t(r){return e[r]??null}let i={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",mac:"MAC\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",credit_card:"\u4FE1\u7528\u5361\u53F7",currency_code:"\u8D27\u5E01\u4EE3\u7801",iban:"IBAN",jwt:"JWT",template_literal:"\u8F93\u5165"},o={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${r.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${n}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`}case"invalid_value":return r.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${y(r.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${g(r.values,"|")}`;case"too_big":{let n=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${n}${r.maximum.toString()} ${a.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${n}${r.maximum.toString()}`}case"too_small":{let n=r.inclusive?">=":">",a=t(r.origin);return a?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${n}${r.minimum.toString()} ${a.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${n}${r.minimum.toString()}`}case"invalid_format":{let n=r;return n.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${n.prefix}" \u5F00\u5934`:n.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${n.suffix}" \u7ED3\u5C3E`:n.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${n.includes}"`:n.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${n.pattern}`:`\u65E0\u6548${i[n.format]??r.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${r.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${g(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${r.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function Ff(){return{localeError:i_()}}var o_=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},map:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(r){return e[r]??null}let i={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",mac:"MAC \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",credit_card:"\u4FE1\u7528\u5361\u865F",currency_code:"\u8CA8\u5E63\u4EE3\u78BC",iban:"IBAN",jwt:"JWT",template_literal:"\u8F38\u5165"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${r.expected}\uFF0C\u4F46\u6536\u5230 ${s}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${n}\uFF0C\u4F46\u6536\u5230 ${s}`}case"invalid_value":return r.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${y(r.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${g(r.values,"|")}`;case"too_big":{let n=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${n}${r.maximum.toString()} ${a.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${n}${r.maximum.toString()}`}case"too_small":{let n=r.inclusive?">=":">",a=t(r.origin);return a?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${n}${r.minimum.toString()} ${a.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${n}${r.minimum.toString()}`}case"invalid_format":{let n=r;return n.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${n.prefix}" \u958B\u982D`:n.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${n.suffix}" \u7D50\u5C3E`:n.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${n.includes}"`:n.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${n.pattern}`:`\u7121\u6548\u7684 ${i[n.format]??r.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${r.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${r.keys.length>1?"\u5011":""}\uFF1A${g(r.keys,"\u3001")}`;case"invalid_key":return`${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function Mf(){return{localeError:o_()}}var a_=()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"},map:{unit:"nkan",verb:"n\xED"}};function t(r){return e[r]??null}let i={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",mac:"\xE0d\xEDr\u1EB9\u0301s\xEC MAC",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",credit_card:"n\u1ECDmba kaadi gbese",currency_code:"koodu ow\xF3",iban:"IBAN",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},o={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return r=>{switch(r.code){case"invalid_type":{let n=o[r.expected]??r.expected,a=_(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${r.expected}, \xE0m\u1ECD\u0300 a r\xED ${s}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${n}, \xE0m\u1ECD\u0300 a r\xED ${s}`}case"invalid_value":return r.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${y(r.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${g(r.values,"|")}`;case"too_big":{let n=r.inclusive?"<=":"<",a=t(r.origin);return a?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin??"iye"} ${a.verb} ${n}${r.maximum} ${a.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${n}${r.maximum}`}case"too_small":{let n=r.inclusive?">=":">",a=t(r.origin);return a?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin} ${a.verb} ${n}${r.minimum} ${a.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${n}${r.minimum}`}case"invalid_format":{let n=r;return n.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${n.prefix}"`:n.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${n.suffix}"`:n.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${n.includes}"`:n.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${n.pattern}`:`A\u1E63\xEC\u1E63e: ${i[n.format]??r.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${r.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${g(r.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${r.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${r.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function Vf(){return{localeError:a_()}}var Jf,Ec=Symbol("ZodOutput"),Uc=Symbol("ZodInput"),hi=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...i){let o=i[0];return this._map.set(t,o),o&&typeof o=="object"&&"id"in o&&this._idmap.set(o.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let i=this._map.get(t);return i&&typeof i=="object"&&"id"in i&&this._idmap.delete(i.id),this._map.delete(t),this}get(t){let i=t._zod.parent;if(i){let o={...this.get(i)??{}};delete o.id;let r={...o,...this._map.get(t)};return Object.keys(r).length?r:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function $i(){return new hi}(Jf=globalThis).__zod_globalRegistry??(Jf.__zod_globalRegistry=$i());var se=globalThis.__zod_globalRegistry;var me=Symbol.for("zod.compile.invalid"),Bf=Symbol.for("zod.compile.fallback"),Pe=class extends Error{constructor(t="z.compile does not support async refinements, transforms, or checks"){super(t),this.name="ZodCompileAsyncError"}},L=class extends Error{constructor(t,i=!0){super(`z.compile does not support ${t}; this schema must use the runtime parser`),this.name="ZodCompileUnsupportedError",this.islandable=i}};function c_(e,t){try{return _i(e,{assertOnly:!0})}catch{return t}}function Tc(e,t){try{let i=_i(e),o=yi(e,i);return o._zod.bag.validator=c_(e,i),o}catch(i){if(t?.strict)throw i;return e}}function yi(e,t){if(mi(e))throw new L("a schema whose subtree contains a reference cycle");let i=M(e),o=e._zod.run,r=o.__originalRun??o,n=(a,s)=>{if(s?.async||s?.direction==="backward"||s?.skipChecks||s?.[Bf]||s&&fi(s,a.value))return r(a,s);let u=t(a.value);return u!==me?(a.value=u,a):(s&&(s[Bf]=!0),r(a,s))};return n.__originalRun=r,i._zod.bag.fallbackRun=r,i._zod.bag.validator=t,i._zod.run=n,o.__originalRun||u_(i,e,t),i}function u_(e,t,i){let o=e,r=t;if(typeof r.safeParse=="function"){let n=r.safeParse;o.safeParse=(a,s)=>{let u=i(a);return u!==me?{success:!0,data:u}:n(a,s)}}if(typeof r.parse=="function"){let n=r.parse;o.parse=(a,s)=>{let u=i(a);return u!==me?u:n(a,s)}}}function _i(e,t){let i=!0;try{i=mi(e)}catch{}if(i)throw new L("a schema whose subtree contains a reference cycle");let o={constants:new Map,constantCounter:0,varCounter:0,definite:!0},r=new at(["input"]),n=q(r,o,e,"input",!t?.assertOnly);r.write(n===null?"return true;":`return ${n};`);let a=["INVALID",...o.constants.keys()],s=[me,...o.constants.values()],u=r.content.join(`
|
|
73
|
+
`),c=t?.debug?a.length>0?`// Constants: ${a.join(", ")}
|
|
74
|
+
${u}`:u:"",l=Function,d=`return (input) => {
|
|
75
|
+
${u}
|
|
76
|
+
}`,m;try{m=new l(...a,d)(...s)}catch(f){throw new L(`this schema (generated code failed to evaluate: ${f.message})`)}return t?.debug&&(m.code=c),m.definite=o.definite,m}function A(e,t){for(let[o,r]of e.constants)if(r===t)return o;let i=`c${e.constantCounter++}`;return e.constants.set(i,t),i}function lt(e,t){return e.definite=!1,A(e,t)}function U(e){return`v${e.varCounter++}`}function l_(e,t){let i=e._zod.run({value:t,issues:[]},{});if(i&&typeof i.then=="function")return me;let o=i;return o.issues.length===0?o.value:me}function ue(e,t,i,o,r=!0){let n=e.content.length,a=t.constants.size,s=t.constantCounter,u=t.varCounter;try{return q(e,t,i,o,r)}catch(c){if(!(c instanceof L)||!c.islandable)throw c;if(e.content.length=n,t.constants.size>a){let l=Array.from(t.constants.keys()).slice(a);for(let d of l)t.constants.delete(d)}return t.constantCounter=s,t.varCounter=u,d_(e,t,i,o)}}function d_(e,t,i,o){t.definite=!1;let r=A(t,i),n=A(t,l_),a=U(t);return e.write(`const ${a} = ${n}(${r}, ${o});`),e.write(`if (${a} === INVALID) return INVALID;`),a}var m_=new Set(["max_size","min_size","size_equals","max_length","min_length","length_equals"]);function f_(e,t,i,o){let r=i._zod.def.checks;if(!r||r.length===0)return o;let n=o;for(let a of r){let s=a._zod.def;if(s.when&&!m_.has(s.check))throw new L('check with a custom "when" condition');switch(s.check){case"greater_than":p_(e,t,s,n);break;case"less_than":g_(e,t,s,n);break;case"multiple_of":v_(e,t,s,n);break;case"number_format":Hf(e,s,n);break;case"min_length":{let u=ct(s.minimum,"min_length"),c=Dc(e,t,n,`${n}.length >= ${u} && ${n}.length < ${s.minimum*2}`);e.write(`if (${c} < ${u}) return INVALID;`);break}case"max_length":{let u=ct(s.maximum,"max_length"),c=Dc(e,t,n,`${n}.length > ${u}`);e.write(`if (${c} > ${u}) return INVALID;`);break}case"length_equals":{let u=ct(s.length,"length_equals"),c=Dc(e,t,n,`${n}.length >= ${u} && ${n}.length <= ${s.length*2}`);e.write(`if (${c} !== ${u}) return INVALID;`);break}case"min_size":e.write(`if (${n}.size < ${ct(s.minimum,"min_size")}) return INVALID;`);break;case"max_size":e.write(`if (${n}.size > ${ct(s.maximum,"max_size")}) return INVALID;`);break;case"size_equals":e.write(`if (${n}.size !== ${ct(s.size,"size_equals")}) return INVALID;`);break;case"string_format":n=Yf(e,t,s,n);break;case"custom":n=k_(e,t,a,n);break;case"bigint_format":h_(e,s,n);break;case"mime_type":$_(e,t,s,n);break;case"property":__(e,t,s,n);break;case"properties":y_(e,t,s,n);break;case"overwrite":{let u=U(t);b_(e,t,a,n,u),n=u;break}default:throw new L(`check type ${s.check}`)}}return n}function Dc(e,t,i,o){let r=A(t,it),n=U(t);return e.write(`const ${n} = typeof ${i} === "string" && ${o} ? ${r}(${i}) : ${i}.length;`),n}function ct(e,t){if(typeof e!="number"||!Number.isFinite(e))throw new L(`${t} bound of type ${typeof e}`);return`${e}`}function Xf(e,t){if(typeof t=="bigint")return`${t}n`;if(typeof t=="number"){if(Number.isNaN(t))throw new L("comparison check with NaN bound");return`${t}`}if(t instanceof Date){if(Number.isNaN(t.getTime()))throw new L("comparison check with Invalid Date bound");return A(e,t)}throw new L(`comparison check bound of type ${typeof t}`)}function p_(e,t,i,o){let r=i.inclusive?"<":"<=";e.write(`if (${o} ${r} ${Xf(t,i.value)}) return INVALID;`)}function g_(e,t,i,o){let r=i.inclusive?">":">=";e.write(`if (${o} ${r} ${Xf(t,i.value)}) return INVALID;`)}function v_(e,t,i,o){if(typeof i.value=="bigint"){if(i.value===BigInt(0))throw new L("multiple_of check with a zero divisor");e.write(`if (${o} % ${i.value}n !== 0n) return INVALID;`)}else{let r=A(t,mr);e.write(`if (${r}(${o}, ${ct(i.value,"multiple_of")}) !== 0) return INVALID;`)}}function Hf(e,t,i){let o=t.format;switch(o){case"safeint":e.write(`if (!Number.isSafeInteger(${i})) return INVALID;`);break;case"int32":e.write(`if (!Number.isInteger(${i}) || ${i} < -2147483648 || ${i} > 2147483647) return INVALID;`);break;case"uint32":e.write(`if (!Number.isInteger(${i}) || ${i} < 0 || ${i} > 4294967295) return INVALID;`);break;case"float32":e.write(`if (!Number.isFinite(${i}) || ${i} < -3.4028234663852886e38 || ${i} > 3.4028234663852886e38) return INVALID;`);break;case"float64":e.write(`if (!Number.isFinite(${i})) return INVALID;`);break;default:throw new L(`number format ${o}`)}}function h_(e,t,i){let o=t.format;if(o)switch(o){case"int64":e.write(`if (${i} < -9223372036854775808n || ${i} > 9223372036854775807n) return INVALID;`);break;case"uint64":e.write(`if (${i} < 0n || ${i} > 18446744073709551615n) return INVALID;`);break;default:throw new L(`bigint format ${o}`)}}function $_(e,t,i,o){let r=i.mime;if(r&&r.length>0){let n=A(t,new Set(r));e.write(`if (!${n}.has(${o}.type)) return INVALID;`)}}function y_(e,t,i,o){if(i.when)throw new L('check with a custom "when" condition');e.write(`if (${o} == null) return INVALID;`);let r=i.shape;for(let n of Reflect.ownKeys(r)){let a=typeof n=="symbol"?A(t,n):le(n),s=U(t);e.write(`const ${s} = ${o}[${a}];`),ue(e,t,r[n],s,!1)}}function __(e,t,i,o){let r=`${o}[${JSON.stringify(i.property)}]`;q(e,t,i.schema,r)}function b_(e,t,i,o,r){let n=i._zod.def.tx;if(!n)throw new L("overwrite check without a transform function");if(dt(n))throw new Pe("z.compile: async overwrite transforms are not supported");let a=A(t,n);e.write(`const ${r} = ${a}(${o});`)}function Ac(){throw new $e}function Cc(e){this.issues.push(e)}function k_(e,t,i,o){let r=i._zod.def;if(r.fn){if(dt(r.fn))throw new Pe("z.compile: async .refine() predicates are not supported");let n=lt(t,r.fn),a=A(t,Ac),s=U(t);return e.write(`const ${s} = ${n}(${o});`),e.write(`if (${s} instanceof Promise) ${a}();`),e.write(`if (!${s}) return INVALID;`),o}if(i._zod.check){if(dt(i._zod.check))throw new Pe("z.compile: async .superRefine() / check functions are not supported");let n=i._zod.check,s=lt(t,c=>{let l={value:c,issues:[],addIssue:Cc};return n(l)instanceof Promise&&Ac(),l.issues.length===0?l.value:me}),u=U(t);return e.write(`const ${u} = ${s}(${o});`),e.write(`if (${u} === INVALID) return INVALID;`),u}throw new L("custom check without a predicate or check function")}var x_=new Set(["cidrv4","cuid","cuid2","date","datetime","duration","e164","email","emoji","ends_with","guid","includes","ipv4","ksuid","lowercase","mac","nanoid","regex","starts_with","time","ulid","uppercase","uuid","xid"]);function Yf(e,t,i,o,r=!0){let n=i.format;if(n==="base64"){let c=A(t,Er);return e.write(`if (!${c}(${o})) return INVALID;`),o}if(n==="base64url"){let c=A(t,Qn);return e.write(`if (!${c}(${o})) return INVALID;`),o}if(n==="jwt"){let c=A(t,ri),l=A(t,i.alg??null);return e.write(`if (!${c}(${o}, ${l})) return INVALID;`),o}if(n==="ipv6"){let c=A(t,Or);return e.write(`if (!${c}(${o})) return INVALID;`),o}if(n==="cidrv6"){let c=A(t,Hn);return e.write(`if (!${c}(${o})) return INVALID;`),o}if(n==="credit_card"){let c=A(t,ei);return e.write(`if (!${c}(${o})) return INVALID;`),o}if(n==="iban"){let c=A(t,ti);return e.write(`if (!${c}(${o})) return INVALID;`),o}let a=i;if(n==="url"||n==="httpurl"||a.normalize||a.hostname!==void 0||a.protocol!==void 0){let c=A(t,Gn),l=A(t,i),d=U(t),m=U(t);if(e.write(`const ${d} = ${o}.trim();`),e.write(`const ${m} = ${c}(${d}, ${l});`),e.write(`if (typeof ${m} === "number") return INVALID;`),a.hostname!==void 0){let h=A(t,qn);e.write(`if (!${h}(${m}, ${l}.hostname)) return INVALID;`)}if(a.protocol!==void 0){let h=A(t,Xn);e.write(`if (!${h}(${m}, ${l}.protocol)) return INVALID;`)}if(!r)return null;let f=U(t),v=a.normalize?`${m}.href`:`${A(t,Pr)}(${d})`;return e.write(`const ${f} = ${v};`),f}let s=i.fn;if(s){if(dt(s))throw new L(`async string format ${n}`);let c=A(t,s);return e.write(`if (!${c}(${o})) return INVALID;`),o}if(x_.has(n)&&i.pattern){let c=A(t,i.pattern);return e.write(`${c}.lastIndex = 0;`),e.write(`if (!${c}.test(${o})) return INVALID;`),o}let u=i.format;switch(u){case"regex":throw new L("regex format without a pattern");case"lowercase":e.write(`if (${o} !== ${o}.toLowerCase()) return INVALID;`);break;case"uppercase":e.write(`if (${o} !== ${o}.toUpperCase()) return INVALID;`);break;case"includes":e.write(`if (!${o}.includes(${le(i.includes)})) return INVALID;`);break;case"starts_with":{let c=i.prefix;e.write(`if (${o}.slice(0, ${c.length}) !== ${le(c)}) return INVALID;`);break}case"ends_with":{let c=i.suffix;e.write(`if (${o}.slice(-${c.length}) !== ${le(c)}) return INVALID;`);break}default:throw new L(`string format ${u}`)}return o}function q(e,t,i,o,r=!0){let n=i._zod.def,a=n.type;if(n.coerce)throw new L(`coercion (z.coerce.${a}())`);let s=r||!!n.checks?.length,u;switch(a){case"string":u=w_(e,t,i,o,s);break;case"number":u=I_(e,i,o);break;case"boolean":u=S_(e,o);break;case"bigint":u=z_(e,i,o);break;case"symbol":u=j_(e,o);break;case"undefined":u=P_(e,o);break;case"null":u=O_(e,o);break;case"any":case"unknown":u=o;break;case"never":e.write("return INVALID;"),u=o;break;case"void":u=E_(e,o);break;case"nan":u=U_(e,o);break;case"date":u=D_(e,o);break;case"object":u=A_(e,t,i,o,s);break;case"optional":u=N_(e,t,i,o,s);break;case"nullable":u=R_(e,t,i,o,s);break;case"array":u=Z_(e,t,i,o,s);break;case"literal":u=L_(e,t,i,o);break;case"enum":u=F_(e,t,i,o);break;case"readonly":{let c=Wf(e,t,i,o),l=U(t);e.write(`const ${l} = Object.freeze(${c});`),u=l;break}case"success":Wf(e,t,i,o),u="true";break;case"default":case"prefault":u=M_(e,t,i,o);break;case"nonoptional":u=V_(e,t,i,o);break;case"tuple":u=J_(e,t,i,o);break;case"union":u=B_(e,t,i,o);break;case"intersection":u=G_(e,t,i,o);break;case"record":u=q_(e,t,i,o);break;case"map":u=H_(e,t,i,o);break;case"set":u=Y_(e,t,i,o);break;case"file":u=Q_(e,o);break;case"template_literal":u=eb(e,t,i,o);break;case"lazy":u=tb(e,t,i,o);break;case"pipe":u=rb(e,t,i,o);break;case"custom":u=nb(e,t,i,o);break;case"transform":u=ab(e,t,i,o);break;case"catch":u=ob(e,t,i,o);break;default:throw new L(`schema type ${a}`)}return u===null?null:f_(e,t,i,u)}function w_(e,t,i,o,r=!0){e.write(`if (typeof ${o} !== "string") return INVALID;`);let n=i._zod.def;return n.format===void 0?o:Yf(e,t,n,o,r)}function I_(e,t,i){e.write(`if (typeof ${i} !== "number" || !Number.isFinite(${i})) return INVALID;`);let o=t._zod.def;return o.check==="number_format"&&o.format&&Hf(e,{format:o.format},i),i}function S_(e,t){return e.write(`if (typeof ${t} !== "boolean") return INVALID;`),t}function z_(e,t,i){e.write(`if (typeof ${i} !== "bigint") return INVALID;`);let o=t._zod.def;if(o.format)switch(o.format){case"int64":e.write(`if (${i} < -9223372036854775808n || ${i} > 9223372036854775807n) return INVALID;`);break;case"uint64":e.write(`if (${i} < 0n || ${i} > 18446744073709551615n) return INVALID;`);break}return i}function j_(e,t){return e.write(`if (typeof ${t} !== "symbol") return INVALID;`),t}function P_(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function O_(e,t){return e.write(`if (${t} !== null) return INVALID;`),t}function E_(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function U_(e,t){return e.write(`if (typeof ${t} !== "number" || !Number.isNaN(${t})) return INVALID;`),t}function D_(e,t){return e.write(`if (!(${t} instanceof Date) || Number.isNaN(${t}.getTime())) return INVALID;`),t}function A_(e,t,i,o,r=!0){let n=i._zod.def;e.write(`if (typeof ${o} !== "object" || ${o} === null || Array.isArray(${o})) return INVALID;`);let a=n.shape,s=Object.keys(a),u=Object.getOwnPropertySymbols(a),c=u.length?[...s,...u]:s,l=z=>typeof z=="symbol"?A(t,z):le(z),d=z=>typeof z=="symbol"?`[${l(z)}]`:le(z),m=a;if(s.includes("__proto__"))throw new L('object shape key "__proto__"');let f=new Map;for(let z of c){let I=m[z],D=l(z),B=U(t);if(e.write(`const ${B} = ${o}[${D}];`),I._zod.optin!==void 0){let F=U(t);e.write(`let ${F} = (() => {`),e.indented(ce=>{let ur=ue(ce,t,I,B);ce.write(`return ${ur};`)}),e.write("})();"),I._zod.optout==="optional"?(e.write(`if (${F} === INVALID) {`),e.indented(ce=>{ce.write(`if (${D} in ${o}) return INVALID;`),ce.write(`${F} = undefined;`)}),e.write("}")):e.write(`if (${F} === INVALID) return INVALID;`),f.set(z,F)}else{C_(I)&&e.write(`if (!(${D} in ${o})) return INVALID;`);let F=ue(e,t,I,B,r);F!==null&&f.set(z,F)}}let v=n.catchall,h="none";if(v){let z=v._zod.def.type;if(z==="never"){let I=s.map(D=>`k !== ${le(D)}`).join(" && ")||"true";e.write(`for (const k in ${o}) {`),e.indented(D=>{D.write(`if (${I}) return INVALID;`)}),e.write("}")}else(z==="unknown"||z==="any")&&!v._zod.def.checks?.length?h="passthrough":h="schema"}let b=U(t),E=c.some(z=>Kf(m[z])||Nc(m[z]));if(!r){if(h==="schema"){let z=s.length>0?A(t,new Set(s)):null;e.write(`for (const k in ${o}) {`),e.indented(I=>{I.write('if (k === "__proto__") continue;'),z&&I.write(`if (${z}.has(k)) continue;`);let D=U(t);I.write(`const ${D} = ${o}[k];`),ue(I,t,v,D,!1)}),e.write("}")}return null}if(E){e.write(`const ${b} = {};`);for(let z of c){let I=l(z),D=f.get(z);Nc(m[z])?e.write(`if (${I} in ${o}) ${b}[${I}] = ${D};`):Kf(m[z])?e.write(`if (${D} !== undefined || ${I} in ${o}) ${b}[${I}] = ${D};`):e.write(`${b}[${I}] = ${D};`)}}else{let z=c.map(I=>`${d(I)}: ${f.get(I)}`).join(", ");e.write(`const ${b} = { ${z} };`)}if(h!=="none"){let z=s.length>0?A(t,new Set(s)):null;e.write(`for (const k in ${o}) {`),e.indented(I=>{if(I.write('if (k === "__proto__") continue;'),z&&I.write(`if (${z}.has(k)) continue;`),h==="passthrough")I.write(`${b}[k] = ${o}[k];`);else{let D=U(t);I.write(`const ${D} = ${o}[k];`);let B=ue(I,t,v,D);I.write(`${b}[k] = ${B};`)}}),e.write("}")}return b}function N_(e,t,i,o,r=!0){let n=i._zod.def;if(T_(i))return q(e,t,n.innerType,o,r);if(n.innerType._zod.optin==="defaulted"){let s=U(t),u=U(t);return e.write(`let ${s};`),e.write(`if (${o} === undefined) {`),e.indented(c=>{c.write(`const ${u} = (() => {`),c.indented(l=>{let d=q(l,t,n.innerType,o);l.write(`return ${d};`)}),c.write("})();"),c.write(`if (${u} !== INVALID) ${s} = ${u};`)}),e.write("} else {"),e.indented(c=>{let l=q(c,t,n.innerType,o);c.write(`${s} = ${l};`)}),e.write("}"),s}let a=r?U(t):null;return a&&e.write(`let ${a};`),e.write(`if (${o} !== undefined) {`),e.indented(s=>{let u=q(s,t,n.innerType,o,r);a&&u!==null&&s.write(`${a} = ${u};`)}),e.write("}"),a}function T_(e){return e._zod.traits?.has("$ZodExactOptional")===!0}function C_(e){return e._zod.optin===void 0&&ut(e)}function ut(e){if(e._zod.def.coerce)return!0;let t=e._zod.def;switch(t.type){case"any":case"unknown":case"undefined":case"void":case"default":case"prefault":case"transform":case"custom":case"lazy":return!0;case"string":case"number":case"boolean":case"bigint":case"symbol":case"null":case"never":case"nan":case"date":case"object":case"array":case"tuple":case"record":case"map":case"set":case"file":case"template_literal":return!1;case"nonoptional":return t.innerType?ut(t.innerType):!1;case"literal":return!!t.values?.includes(void 0);case"enum":return!!e._zod.values?.has(void 0);case"optional":case"nullable":case"readonly":case"success":return t.innerType?ut(t.innerType):!0;case"catch":return!0;case"union":return t.options?t.options.some(ut):!0;case"intersection":return!t.left||!t.right?!0:ut(t.left)&&ut(t.right);case"pipe":return t.in?ut(t.in):!0;default:return!0}}function Nc(e){return e._zod.optin==="optional"&&e._zod.optout==="optional"}function Kf(e){return(e._zod.optin!=="defaulted"||e._zod.optout==="optional")&&Ct(e)}function Ct(e){let t=e._zod.def;switch(t.type){case"string":case"number":case"boolean":case"bigint":case"symbol":case"null":case"nan":case"date":case"object":case"array":case"tuple":case"record":case"map":case"set":case"file":case"template_literal":case"never":case"success":return!1;case"literal":return!!t.values?.includes(void 0);case"enum":return!!e._zod.values?.has(void 0);case"optional":return!0;case"nullable":case"readonly":case"nonoptional":return t.innerType?Ct(t.innerType):!0;case"union":return t.options?t.options.some(Ct):!0;case"intersection":return!t.left||!t.right||Ct(t.left)||Ct(t.right);case"pipe":return t.out?Ct(t.out):!0;default:return!0}}function R_(e,t,i,o,r=!0){let n=i._zod.def,a=r?U(t):null;return a&&e.write(`let ${a} = null;`),e.write(`if (${o} !== null) {`),e.indented(s=>{let u=q(s,t,n.innerType,o,r);a&&u!==null&&s.write(`${a} = ${u};`)}),e.write("}"),a}function Z_(e,t,i,o,r=!0){let n=i._zod.def;e.write(`if (!Array.isArray(${o})) return INVALID;`);let a=r?U(t):null,s=U(t),u=U(t);return a&&e.write(`const ${a} = new Array(${o}.length);`),e.write(`for (let ${s} = 0; ${s} < ${o}.length; ${s}++) {`),e.indented(c=>{c.write(`const ${u} = ${o}[${s}];`);let l=ue(c,t,n.element,u,r);a&&l!==null&&c.write(`${a}[${s}] = ${l};`)}),e.write("}"),a}function L_(e,t,i,o){let n=i._zod.def.values;if(n.length!==1){let s=A(t,new Set(n));return e.write(`if (!${s}.has(${o})) return INVALID;`),o}let a=n[0];if(typeof a=="number"&&Number.isNaN(a)){let s=A(t,new Set(n));return e.write(`if (!${s}.has(${o})) return INVALID;`),o}if(typeof a=="string")e.write(`if (${o} !== ${le(a)}) return INVALID;`);else if(typeof a=="number"||typeof a=="boolean")e.write(`if (${o} !== ${a}) return INVALID;`);else if(a===null)e.write(`if (${o} !== null) return INVALID;`);else if(a===void 0)e.write(`if (${o} !== undefined) return INVALID;`);else if(typeof a=="bigint")e.write(`if (${o} !== ${a}n) return INVALID;`);else throw new L(`literal type ${typeof a}`);return o}function F_(e,t,i,o){let r=i._zod.values;if(!r)throw new L("enum schema without enumerated values");let n=A(t,r);return e.write(`if (!${n}.has(${o})) return INVALID;`),o}function Wf(e,t,i,o){let r=i._zod.def;return q(e,t,r.innerType,o)}function M_(e,t,i,o){let r=i._zod.def,a=Object.getOwnPropertyDescriptor(i._zod.def,"defaultValue")?()=>i._zod.def.defaultValue:void 0;if(i._zod.def.type==="prefault"){if(!a)return q(e,t,r.innerType,o);let u=A(t,a),c=U(t);return e.write(`let ${c} = ${o};`),e.write(`if (${o} === undefined) ${c} = ${u}();`),q(e,t,r.innerType,c)}let s=U(t);if(a){let u=A(t,a),c=A(t,fr);e.write(`let ${s};`),e.write(`if (${o} === undefined) {`),e.indented(l=>{l.write(`${s} = ${c}(${u}());`)}),e.write("} else {"),e.indented(l=>{let d=q(l,t,r.innerType,o);l.write(`${s} = ${d} === undefined ? ${c}(${u}()) : ${d};`)}),e.write("}")}else e.write(`let ${s};`),e.write(`if (${o} !== undefined) {`),e.indented(u=>{let c=q(u,t,r.innerType,o);u.write(`${s} = ${c};`)}),e.write("}");return s}function V_(e,t,i,o){let r=i._zod.def,n=q(e,t,r.innerType,o),a=U(t);return e.write(`const ${a} = ${n};`),e.write(`if (${a} === undefined) return INVALID;`),a}function J_(e,t,i,o){let r=i._zod.def,n=r.items,a=r.rest;e.write(`if (!Array.isArray(${o})) return INVALID;`);let s=Gf(n,"optin"),u=Gf(n,"optout");a?e.write(`if (${o}.length < ${s}) return INVALID;`):e.write(`if (${o}.length < ${s} || ${o}.length > ${n.length}) return INVALID;`);let c=U(t);e.write(`const ${c} = [];`);for(let l=0;l<n.length;l++){let d=n[l];if(l>=u)e.write(`if (${c}.length === ${l}) {`),e.indented(m=>{m.write(`if (${l} < ${o}.length) {`),m.indented(f=>{let v=U(t);f.write(`const ${v} = ${o}[${l}];`);let h=ue(f,t,d,v);f.write(`${c}[${l}] = ${h};`)}),m.write("} else {"),m.indented(f=>{if(Nc(d)){f.write(`${c}.length = ${l};`);return}let v=U(t),h=U(t);f.write(`const ${v} = undefined;`),f.write(`const ${h} = (() => {`),f.indented(b=>{let E=ue(b,t,d,v);b.write(`return ${E};`)}),f.write("})();"),f.write(`if (${h} === INVALID || ${h} === undefined) ${c}.length = ${l};`),f.write(`else ${c}[${l}] = ${h};`)}),m.write("}")}),e.write("}");else{let m=U(t);e.write(`const ${m} = ${o}[${l}];`);let f=ue(e,t,d,m);e.write(`${c}[${l}] = ${f};`)}}if(a){let l=U(t),d=U(t);e.write(`for (let ${l} = ${n.length}; ${l} < ${o}.length; ${l}++) {`),e.indented(m=>{m.write(`const ${d} = ${o}[${l}];`);let f=ue(m,t,a,d);m.write(`${c}[${l}] = ${f};`)}),e.write("}")}return c}function Gf(e,t){for(let i=e.length-1;i>=0;i--)if(!(t==="optin"?e[i]._zod.optin!==void 0:e[i]._zod.optout==="optional"))return i+1;return 0}function B_(e,t,i,o){let r=i._zod.def,n=r.options;if(r.discriminator)return K_(e,t,r,o);if(r.inclusive===!1)throw new L("exclusive unions (z.xor)");if(n.length===0)return e.write("return INVALID;"),o;if(n.length===1)return q(e,t,n[0],o);if(n.every(u=>u._zod.def.type==="literal"&&!u._zod.def.checks?.length)){let u=new Set(n.flatMap(l=>l._zod.def.values)),c=A(t,u);return e.write(`if (!${c}.has(${o})) return INVALID;`),o}let s=U(t);e.write(`let ${s};`);for(let u=0;u<n.length;u++){let c=n[u];u===0?e.write(`${s} = (() => {`):e.write(`if (${s} === INVALID) ${s} = (() => {`),e.indented(l=>{let d=q(l,t,c,o);l.write(`return ${d};`)}),e.write("})();")}return e.write(`if (${s} === INVALID) return INVALID;`),s}function K_(e,t,i,o){if(i.unionFallback)throw new L("discriminated union with unionFallback");if(i.options.length===0)return e.write("return INVALID;"),o;let r=U(t),n=U(t);e.write(`const ${r} = ${o}?.[${le(i.discriminator)}];`),e.write(`let ${n};`);let a=!0,s=new Set;for(let u of i.options){let c=u._zod.propValues?.[i.discriminator];if(!c||c.size===0)throw new L("discriminated union option without static discriminator values");for(let m of c){if(s.has(m))throw new L(`duplicate discriminator value ${String(m)}`);s.add(m)}let l=Array.from(c,m=>W_(t,r,m)),d=a?"if":"else if";e.write(`${d} (${l.join(" || ")}) {`),e.indented(m=>{let f=q(m,t,u,o);m.write(`${n} = ${f};`)}),e.write("}"),a=!1}return e.write("else { return INVALID; }"),n}function W_(e,t,i){if(typeof i=="string")return`${t} === ${le(i)}`;if(typeof i=="number")return Number.isNaN(i)?`Number.isNaN(${t})`:`${t} === ${i}`;if(typeof i=="boolean")return`${t} === ${i}`;if(i===null)return`${t} === null`;if(i===void 0)return`${t} === undefined`;if(typeof i=="bigint")return`${t} === ${i}n`;if(typeof i=="symbol"){let o=A(e,i);return`${t} === ${o}`}throw new L(`literal discriminator value ${String(i)}`)}function G_(e,t,i,o){let r=i._zod.def;t.definite=!1;let n=ue(e,t,r.left,o),a=ue(e,t,r.right,o),s=A(t,At),u=U(t);return e.write(`const ${u} = ${s}(${n}, ${a});`),e.write(`if (!${u}.valid) return INVALID;`),`${u}.data`}function q_(e,t,i,o){let r=i._zod.def,n=A(t,we);e.write(`if (!${n}(${o})) return INVALID;`);let a=U(t),s=U(t),u=U(t);e.write(`const ${a} = {};`);let c=r,l=c.partial?void 0:r.keyType._zod.values;if(l){let f=[];for(let h of l){if(!(typeof h=="string"||typeof h=="number"||typeof h=="symbol"))throw new L(`record key value ${String(h)}`);let b=typeof h=="number"?h.toString():h;if(b==="__proto__")throw new L('record key "__proto__"');f.push(b);let E=A(t,h),z=q(e,t,r.keyType,E),I=U(t);e.write(`const ${I} = ${o}[${X_(t,b)}];`);let D=ue(e,t,r.valueType,I);e.write(`${a}[${z}] = ${D};`)}let v=A(t,new Set(f));return e.write(`for (const ${s} in ${o}) {`),e.indented(h=>{h.write(`if (${v}.has(${s})) continue;`),c.mode==="loose"?h.write(`if (${s} !== "__proto__") ${a}[${s}] = ${o}[${s}];`):h.write("return INVALID;")}),e.write("}"),a}let d=r.keyType._zod.def;if(!(d.type==="string"&&d.format===void 0&&!d.coerce&&(d.checks?.length??0)===0)){let f=r.mode==="loose",v=_i(r.keyType);v.definite===!1&&(t.definite=!1);let h=A(t,v),b=A(t,Ze),E=U(t);return qf(e,t,o,s,z=>{z.write(`let ${E} = ${h}(${s});`),z.write(`if (${E} === INVALID && typeof ${s} === "string" && ${b}.test(${s})) ${E} = ${h}(Number(${s}));`),f?z.write(`if (${E} === INVALID) { ${a}[${s}] = ${o}[${s}]; continue; }`):z.write(`if (${E} === INVALID) return INVALID;`),z.write(`if (${E} === "__proto__") continue;`);let I=U(t);z.write(`const ${I} = ${o}[${s}];`);let D=ue(z,t,r.valueType,I);z.write(`${a}[${E}] = ${D};`)}),a}return qf(e,t,o,s,f=>{f.write(`const ${u} = ${o}[${s}];`);let v=ue(f,t,r.valueType,u);f.write(`${a}[${s}] = ${v};`)},"return INVALID;"),a}function qf(e,t,i,o,r,n){let a=A(t,Object.prototype.propertyIsEnumerable),s=U(t),u=U(t),c=U(t);e.write(`const ${s} = Object.getOwnPropertySymbols(${i});`),e.write(`const ${u} = Object.getOwnPropertyNames(${i});`),e.write(`for (let ${c} = 0; ${c} < ${u}.length; ${c}++) {`),e.indented(l=>{l.write(`const ${o} = ${u}[${c}];`),l.write(`if (${o} === "__proto__" || !${a}.call(${i}, ${o})) continue;`),r(l)}),e.write("}"),e.write(`for (let ${c} = 0; ${c} < ${s}.length; ${c}++) {`),e.indented(l=>{l.write(`const ${o} = ${s}[${c}];`),l.write(`if (!${a}.call(${i}, ${o})) continue;`),n?l.write(n):r(l)}),e.write("}")}function X_(e,t){return typeof t=="string"?le(t):A(e,t)}function H_(e,t,i,o){let r=i._zod.def;e.write(`if (!(${o} instanceof Map)) return INVALID;`);let n=U(t),a=U(t),s=U(t);return e.write(`const ${n} = new Map();`),e.write(`for (const [${a}, ${s}] of ${o}) {`),e.indented(u=>{let c=q(u,t,r.keyType,a),l=q(u,t,r.valueType,s);u.write(`${n}.set(${c}, ${l});`)}),e.write("}"),n}function Y_(e,t,i,o){let r=i._zod.def;e.write(`if (!(${o} instanceof Set)) return INVALID;`);let n=U(t),a=U(t);return e.write(`const ${n} = new Set();`),e.write(`for (const ${a} of ${o}) {`),e.indented(s=>{let u=q(s,t,r.valueType,a);s.write(`${n}.add(${u});`)}),e.write("}"),n}function Q_(e,t){return e.write(`if (!(${t} instanceof File)) return INVALID;`),t}function eb(e,t,i,o){e.write(`if (typeof ${o} !== "string") return INVALID;`);let r=i._zod.pattern;if(r){let n=A(t,r);e.write(`${n}.lastIndex = 0;`),e.write(`if (!${n}.test(${o})) return INVALID;`)}return o}function tb(e,t,i,o){let r=i._zod.def,n=lt(t,r.getter),a=A(t,{parser:null});e.write(`if (!${a}.parser) {`),e.indented(u=>{u.write(`const inner = ${n}();`),u.write(`${a}.parser = function(input) {`),u.indented(c=>{c.write("const result = inner._zod.run({ value: input, issues: [] }, {});"),c.write("return result.issues.length === 0 ? result.value : INVALID;")}),u.write("};")}),e.write("}");let s=U(t);return e.write(`const ${s} = ${a}.parser(${o});`),e.write(`if (${s} === INVALID) return INVALID;`),s}function rb(e,t,i,o){let r=i._zod.def,n=q(e,t,r.in,o);if(r.transform){if(dt(r.transform))throw new Pe("z.compile: async transforms in pipes are not supported");let a=r.transform,u=lt(t,l=>{let d={value:l,issues:[],addIssue:Cc},m=a(l,d);return m instanceof Promise?me:d.issues.length===0?m:me}),c=U(t);return e.write(`const ${c} = ${u}(${n});`),e.write(`if (${c} === INVALID) return INVALID;`),q(e,t,r.out,c)}else return q(e,t,r.out,n)}function dt(e){return typeof e=="function"&&(e.constructor.name==="AsyncFunction"||e[Symbol.toStringTag]==="AsyncFunction")}function nb(e,t,i,o){let r=i._zod.def;if(r.fn){if(dt(r.fn))throw new Pe("z.compile: async custom predicates are not supported");let n=lt(t,r.fn),a=A(t,Ac),s=U(t);e.write(`const ${s} = ${n}(${o});`),e.write(`if (${s} instanceof Promise) ${a}();`),e.write(`if (!${s}) return INVALID;`)}else throw new L("custom schema without a predicate function");return o}function ib(e,t,i){let o=e._zod.run({value:i,issues:[]},{});if(o&&typeof o.then=="function")return me;let r=o;return r.issues.length===0?r.value:t()}function ob(e,t,i,o){let r=i._zod.def;if(!r.catchValue[In])throw new L("catch with a callback (only a constant catch value compiles)",!1);let n=U(t);e.write(`let ${n} = (() => {`),e.indented(c=>{let l=ue(c,t,r.innerType,o);c.write(`return ${l};`)}),e.write("})();");let a=A(t,r.innerType),s=lt(t,r.catchValue),u=A(t,ib);return e.write(`if (${n} === INVALID) {`),e.indented(c=>{c.write(`${n} = ${u}(${a}, ${s}, ${o});`),c.write(`if (${n} === INVALID) return INVALID;`)}),e.write("}"),n}function ab(e,t,i,o){let r=i._zod.def;if(r.transform){if(dt(r.transform))throw new Pe("z.compile: async transforms are not supported");let n=r.transform,s=lt(t,c=>{let l={value:c,issues:[],addIssue:Cc},d=n(c,l);return d instanceof Promise?me:l.issues.length===0?d:me}),u=U(t);return e.write(`const ${u} = ${s}(${o});`),e.write(`if (${u} === INVALID) return INVALID;`),u}return o}function bi(e){return e.checks&&(e.checks=[...e.checks]),e}function Rc(e,t){return new e(bi({type:"string",...w(t)}))}function Zc(e,t){return new e(bi({type:"string",coerce:!0,...w(t)}))}function ki(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...w(t)})}function xi(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...w(t)})}function wi(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...w(t)})}function Ii(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...w(t)})}function Si(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...w(t)})}function zi(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...w(t)})}function Mr(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...w(t)})}function ji(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...w(t)})}function Pi(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...w(t)})}function Oi(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...w(t)})}function Ei(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...w(t)})}function Ui(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...w(t)})}function Di(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...w(t)})}function Ai(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...w(t)})}function Ni(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...w(t)})}function Ti(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...w(t)})}function Lc(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...w(t)})}function Ci(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...w(t)})}function Ri(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...w(t)})}function Zi(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...w(t)})}function Li(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...w(t)})}function Fi(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...w(t)})}function Fc(e,t){return new e({type:"string",format:"credit_card",check:"string_format",abort:!1,...w(t)})}function Mc(e,t){return new e({type:"string",format:"iban",check:"string_format",abort:!1,...w(t)})}function Mi(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...w(t)})}var Vc={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Vr(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...w(t)})}function Jr(e,t){return new e({type:"string",format:"date",check:"string_format",...w(t)})}function Br(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...w(t)})}function Kr(e,t){return new e({type:"string",format:"duration",check:"string_format",...w(t)})}function Jc(e,t){return new e(bi({type:"number",checks:[],...w(t)}))}function Bc(e,t){return new e(bi({type:"number",coerce:!0,checks:[],...w(t)}))}function Kc(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...w(t)})}function Wc(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...w(t)})}function Gc(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...w(t)})}function qc(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...w(t)})}function Xc(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...w(t)})}function Hc(e,t){return new e({type:"boolean",...w(t)})}function Yc(e,t){return new e({type:"boolean",coerce:!0,...w(t)})}function Qc(e,t){return new e({type:"bigint",...w(t)})}function eu(e,t){return new e({type:"bigint",coerce:!0,...w(t)})}function tu(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...w(t)})}function ru(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...w(t)})}function nu(e,t){return new e({type:"symbol",...w(t)})}function iu(e,t){return new e({type:"undefined",...w(t)})}function ou(e,t){return new e({type:"null",...w(t)})}function au(e){return new e({type:"any"})}function su(e){return new e({type:"unknown"})}function cu(e,t){return new e({type:"never",...w(t)})}function uu(e,t){return new e({type:"void",...w(t)})}function lu(e,t){return new e({type:"date",...w(t)})}function du(e,t){return new e({type:"date",coerce:!0,...w(t)})}function mu(e,t){return new e({type:"nan",...w(t)})}function Ue(e,t){return new Fn({check:"less_than",...w(t),value:e,inclusive:!1})}function be(e,t){return new Fn({check:"less_than",...w(t),value:e,inclusive:!0})}function De(e,t){return new Mn({check:"greater_than",...w(t),value:e,inclusive:!1})}function ke(e,t){return new Mn({check:"greater_than",...w(t),value:e,inclusive:!0})}function Vi(e){return De(0,e)}function Ji(e){return Ue(0,e)}function Bi(e){return be(0,e)}function Ki(e){return ke(0,e)}function We(e,t){return new Xa({check:"multiple_of",...w(t),value:e})}function Ge(e,t){return new Qa({check:"max_size",...w(t),maximum:e})}function Ae(e,t){return new es({check:"min_size",...w(t),minimum:e})}function mt(e,t){return new ts({check:"size_equals",...w(t),size:e})}function ft(e,t){return new rs({check:"max_length",...w(t),maximum:e})}function Le(e,t){return new ns({check:"min_length",...w(t),minimum:e})}function pt(e,t){return new is({check:"length_equals",...w(t),length:e})}function Rt(e,t){return new os({check:"string_format",format:"regex",...w(t),pattern:e})}function Zt(e){return new as({check:"string_format",format:"lowercase",...w(e)})}function Lt(e){return new ss({check:"string_format",format:"uppercase",...w(e)})}function Ft(e,t){return new cs({check:"string_format",format:"includes",...w(t),includes:e})}function Mt(e,t){return new us({check:"string_format",format:"starts_with",...w(t),prefix:e})}function Vt(e,t){return new ls({check:"string_format",format:"ends_with",...w(t),suffix:e})}function Wi(e,t,i){return new ds({check:"property",property:e,schema:t,...w(i)})}function Jt(e,t){return new ms({check:"properties",shape:e,...w(t)})}function Bt(e,t){return new fs({check:"mime_type",mime:e,...w(t)})}function Oe(e){return new ps({check:"overwrite",tx:e})}function Kt(e){return Oe(t=>t.normalize(e))}function Wt(){return Oe(e=>e.trim())}function Gt(){return Oe(e=>e.toLowerCase())}function qt(){return Oe(e=>e.toUpperCase())}function Xt(){return Oe(e=>Yo(e))}function fu(e,t,i){return new e({type:"array",element:t,...w(i)})}function sb(e,t,i){return new e({type:"union",options:t,...w(i)})}function cb(e,t,i){return new e({type:"union",options:t,inclusive:!1,...w(i)})}function ub(e,t,i,o){return new e({type:"union",options:i,discriminator:t,...w(o)})}function lb(e,t,i){return new e({type:"intersection",left:t,right:i})}function db(e,t,i,o){let r=i instanceof N,n=r?o:i,a=r?i:null;return new e({type:"tuple",items:t,rest:a,...w(n)})}function mb(e,t,i,o){return new e({type:"record",keyType:t,valueType:i,...w(o)})}function fb(e,t,i,o){return new e({type:"map",keyType:t,valueType:i,...w(o)})}function pb(e,t,i){return new e({type:"set",valueType:t,...w(i)})}function gb(e,t,i){let o=Array.isArray(t)?Object.fromEntries(t.map(r=>[r,r])):t;return new e({type:"enum",entries:o,...w(i)})}function vb(e,t,i){return new e({type:"enum",entries:t,...w(i)})}function hb(e,t,i){return new e({type:"literal",values:Array.isArray(t)?t:[t],...w(i)})}function pu(e,t){return new e({type:"file",...w(t)})}function $b(e,t){return new e({type:"transform",transform:t})}function yb(e,t){return new e({type:"optional",innerType:t})}function _b(e,t){return new e({type:"nullable",innerType:t})}function bb(e,t,i){return new e({type:"default",innerType:t,get defaultValue(){return typeof i=="function"?i():fr(i)}})}function kb(e,t,i){return new e({type:"nonoptional",innerType:t,...w(i)})}function xb(e,t){return new e({type:"success",innerType:t})}function wb(e,t,i){return new e({type:"catch",innerType:t,catchValue:typeof i=="function"?i:ia(i)})}function Ib(e,t,i){return new e({type:"pipe",in:t,out:i})}function Sb(e,t){return new e({type:"readonly",innerType:t})}function zb(e,t,i){return new e({type:"template_literal",parts:t,...w(i)})}function jb(e,t){return new e({type:"lazy",getter:t})}function Pb(e,t){return new e({type:"promise",innerType:t})}function gu(e,t,i){let o=w(i);return o.abort??(o.abort=!0),new e({type:"custom",check:"custom",fn:t,...o})}function vu(e,t,i){return new e({type:"custom",check:"custom",fn:t,...w(i)})}function hu(e,t){let i=Qf(o=>(o.addIssue=r=>{if(typeof r=="string")o.issues.push(jt(r,o.value,i._zod.def));else{let n=r;n.fatal&&(n.continue=!1),n.code??(n.code="custom"),"input"in n||(n.input=o.value),n.inst??(n.inst=i),n.continue??(n.continue=!i._zod.def.abort),o.issues.push(jt(n))}},e(o.value,o)),t);return i}function Qf(e,t){let i=new W({check:"custom",...w(t)});return i._zod.check=e,i}function $u(e){let t=new W({check:"describe"});return t._zod.onattach=[i=>{let o=se.get(i)??{};se.add(i,{...o,description:e})}],t._zod.check=()=>{},t}function yu(e){let t=new W({check:"meta"});return t._zod.onattach=[i=>{let o=se.get(i)??{};se.add(i,{...o,...e})}],t._zod.check=()=>{},t}function _u(e,t){let i=w(t),o=i.truthy??["true","1","yes","on","y","enabled"],r=i.falsy??["false","0","no","off","n","disabled"];i.case!=="sensitive"&&(o=o.map(f=>typeof f=="string"?f.toLowerCase():f),r=r.map(f=>typeof f=="string"?f.toLowerCase():f));let n=new Set(o),a=new Set(r),s=e.Codec??Nr,u=e.Boolean??Dr,c=e.String??st,l=new c({type:"string",error:i.error}),d=new u({type:"boolean",error:i.error}),m=new s({type:"pipe",in:l,out:d,transform:((f,v)=>{let h=f;return i.case!=="sensitive"&&(h=h.toLowerCase()),n.has(h)?!0:a.has(h)?!1:(v.issues.push({code:"invalid_value",expected:"stringbool",values:[...n,...a],input:v.value,inst:m,continue:!1}),{})}),reverseTransform:((f,v)=>f===!0?o[0]||"true":r[0]||"false"),error:i.error});return m._zod.bag.truthy=o,m._zod.bag.falsy=r,m._zod.bag.case=i.case??"insensitive",m}function gt(e,t,i,o={}){let r=w(o),n={check:"string_format",type:"string",format:t,fn:typeof i=="function"?i:s=>i.test(s),...r};return i instanceof RegExp&&(n.pattern=i),new e(n)}function Wr(e,...t){for(let i of t)for(let o of Reflect.ownKeys(i))Object.prototype.propertyIsEnumerable.call(i,o)&&ae(e,o,i[o]);return e}function qe(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??se,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??"ref",reused:e?.reused??"inline",intersections:[],deferred:[],external:e?.external??void 0}}function te(e,t,i,o,r){let n=typeof t.unrepresentable=="function"?t.unrepresentable({zodSchema:e,path:o.path,message:r}):t.unrepresentable;if(n==="any")return!1;if(n===void 0||n==="throw")throw new Error(r);return Object.assign(i,n),!0}function J(e,t,i={path:[],schemaPath:[]}){var o;let r=e._zod.def,n=t.seen.get(e);if(n)return n.count++,i.schemaPath.includes(e)&&(n.cycle=i.path),n.schema;let a={schema:{},count:1,cycle:void 0,path:i.path};t.seen.set(e,a),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{let l={...i,schemaPath:[...i.schemaPath,e],path:i.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,l);else{let m=a.schema,f=t.processors[r.type];if(!f)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${r.type}`);f(e,t,m,l)}let d=e._zod.parent;d&&(a.ref||(a.ref=d),J(d,t,l),t.seen.get(d).isParent=!0)}let u=t.metadataRegistry.get(e);return u&&Wr(a.schema,u),t.io==="input"&&fe(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&"_prefault"in a.schema&&((o=a.schema).default??(o.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function ep(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function Xe(e,t){let i=e.seen.get(t);if(!i)throw new Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;let o=new Map;for(let a of e.seen.entries()){let s=e.metadataRegistry.get(a[0])?.id;if(s){let u=o.get(s);if(u&&u!==a[0])throw new Error(`Duplicate schema id "${s}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(s,a[0])}}let r=a=>{let s=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let d=e.external.registry.get(a[0])?.id,m=e.external.uri??(v=>v);if(d)return{ref:m(d)};let f=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=f,{defId:f,ref:`${m("__shared")}#/${s}/${ep(f)}`}}let u="#",c=`${u}/${s}/`;if(a[1]===i&&!a[1].schema.id)return{ref:u};let l=a[1].schema.id??`__schema${e.counter++}`;return{defId:l,ref:c+ep(l)}},n=a=>{if(a[1].schema.$ref)return;let s=a[1],{ref:u,defId:c}=r(a);s.def={...s.schema},c&&(s.defId=c);let l=s.schema;for(let d in l)delete l[d];l.$ref=u};if(e.cycles==="throw")for(let a of e.seen.entries()){let s=a[1];if(s.cycle)throw new Error(`Cycle detected: #/${s.cycle?.join("/")}/<root>
|
|
77
|
+
|
|
78
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let a of e.seen.entries()){let s=a[1];if(t===a[0]){n(a);continue}if(e.external){let c=e.external.registry.get(a[0])?.id;if(t!==a[0]&&c){n(a);continue}}if(e.metadataRegistry.get(a[0])?.id){n(a);continue}if(s.cycle){n(a);continue}s.count>1&&e.reused==="ref"&&n(a)}e.external&&(e.sharedDefsExtractedFor=e.external)}function np(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let i=[];for(let o of t){if(!o||typeof o!="object")return;np(o);let r=Object.keys(o);if(r.length!==1||r[0]!=="type")return;let n=o.type;for(let a of Array.isArray(n)?n:[n]){if(typeof a!="string")return;i.includes(a)||i.push(a)}}delete e.anyOf,e.type=i.length===1?i[0]:i}var ip=new Set(["type","properties","required","additionalProperties"]),tp=["oneOf","anyOf"];function rp(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!="object"||t===null?null:Object.keys(t).length?t:null}function bu(e){let t=[];for(let n of e){if(typeof n!="object"||n.type!=="object")return null;for(let a in n)if(!ip.has(a))return null;t.push(n)}let i={},o=new Set;for(let n of t){for(let a in n.properties){if(Object.prototype.hasOwnProperty.call(i,a))continue;let s=[];for(let c of t){let l=c.properties?.[a]??rp(c);l!=null&&(s.some(d=>JSON.stringify(d)===JSON.stringify(l))||s.push(l))}let u=s.length===1?s[0]:bu(s)??{allOf:s};ae(i,a,u)}for(let a of n.required??[])o.add(a)}let r={type:"object",properties:i};if(o.size&&(r.required=[...o]),t.every(n=>n.additionalProperties===!1))r.additionalProperties=!1;else{let n=[];for(let a of t){let s=rp(a);s&&!n.some(u=>JSON.stringify(u)===JSON.stringify(s))&&n.push(s)}n.length===1?r.additionalProperties=n[0]:n.length>1&&(r.additionalProperties={allOf:n})}return r}function Ob(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let r of ip)if(r in e)return;let i=t.filter(r=>tp.some(n=>Array.isArray(r[n]))),o=null;if(!i.length)o=bu(t);else{let r=i[0],n=tp.find(u=>Array.isArray(r[u]));if(Object.keys(r).length!==1)return;let a=t.filter(u=>u!==r),s=r[n].map(u=>bu([...a,u]));if(s.some(u=>!u))return;o={[n]:s}}o&&(delete e.allOf,Wr(e,o))}function He(e,t){let i=e.seen.get(t);if(!i)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=s=>{let u=e.seen.get(s);if(u.ref===null)return;let c=u.def??u.schema,l={...c},d=u.ref;if(u.ref=null,d){o(d);let f=e.seen.get(d),v=f.schema;if(v.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(v)):Wr(c,v),Wr(c,l),s._zod.parent===d)for(let b in c)b==="$ref"||b==="allOf"||b in l||delete c[b];if(v.$ref&&f.def)for(let b in c)b==="$ref"||b==="allOf"||b in f.def&&JSON.stringify(c[b])===JSON.stringify(f.def[b])&&delete c[b]}let m=s._zod.parent;if(m&&m!==d){o(m);let f=e.seen.get(m);if(f?.schema.$ref&&(c.$ref=f.schema.$ref,f.def))for(let v in c)v==="$ref"||v==="allOf"||v in f.def&&JSON.stringify(c[v])===JSON.stringify(f.def[v])&&delete c[v]}e.override({zodSchema:s,jsonSchema:c,path:u.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let s of[...e.seen.entries()].reverse())o(s[0]);if(e.target!=="openapi-3.0")for(let s of e.seen.entries())np(s[1].def??s[1].schema);for(let s of e.deferred)s();if(e.intersections.length){let s=new Map;for(let u of e.seen.values())for(let c of[u.schema,u.def]){let l=c?.allOf;if(!Array.isArray(l))continue;let d=s.get(l);d?d.push(c):s.set(l,[c])}for(let u of e.intersections)for(let c of s.get(u)??[])Ob(c)}}let r={};if(e.target==="draft-2020-12"?r.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?r.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?r.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");r.$id=e.external.uri(s)}Wr(r,i.defId?i.schema:i.def??i.schema);let n=e.metadataRegistry.get(t)?.id;n!==void 0&&r.id===n&&delete r.id;let a=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let s of e.seen.entries()){let u=s[1];u.def&&u.defId&&(u.def.id===u.defId&&delete u.def.id,ae(a,u.defId,u.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?r.$defs=a:r.definitions=a);try{let s=JSON.parse(JSON.stringify(r));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:Ht(t,"input",e.processors),output:Ht(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function fe(e,t){let i=t??{seen:new Set};if(i.seen.has(e))return!1;i.seen.add(e);let o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return fe(o.element,i);if(o.type==="set")return fe(o.valueType,i);if(o.type==="lazy")return fe(o.getter(),i);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault"||o.type==="catch")return fe(o.innerType,i);if(o.type==="intersection")return fe(o.left,i)||fe(o.right,i);if(o.type==="record"||o.type==="map")return fe(o.keyType,i)||fe(o.valueType,i);if(o.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:fe(o.in,i)||fe(o.out,i);if(o.type==="object"){for(let r in o.shape)if(fe(o.shape[r],i))return!0;return!1}if(o.type==="union"){for(let r of o.options)if(fe(r,i))return!0;return!1}if(o.type==="tuple"){for(let r of o.items)if(fe(r,i))return!0;return!!(o.rest&&fe(o.rest,i))}return!1}var ku=(e,t={})=>i=>{let o=qe({...i,processors:t});return J(e,o),Xe(o,e),He(o,e)},Ht=(e,t,i={})=>o=>{let{libraryOptions:r,target:n}=o??{},a=qe({...r??{},target:n,io:t,processors:i});return J(e,a),Xe(a,e),He(a,e)};var Yt=(e,t,i)=>{(e[t]===void 0||i>e[t])&&(e[t]=i)},Qt=(e,t,i)=>{(e[t]===void 0||i<e[t])&&(e[t]=i)},op=(e,t)=>{Yt(e,"minimum",t),Qt(e,"maximum",t)},up=(e,t)=>{e.multipleOf??(e.multipleOf=[]),e.multipleOf.includes(t)||e.multipleOf.push(t)},lp=(e,t)=>{e.patterns??(e.patterns=new Set),e.patterns.add(t)},dp=(e,t)=>{e.mime=e.mime?e.mime.filter(i=>t.includes(i)):[...t]},mp=(e,t)=>{e.format=t,t.includes("int")&&(e.isInt=!0)},ap=(e,t)=>Yt(e,"minimum",t.minimum),sp=(e,t)=>Qt(e,"maximum",t.maximum),cp=e=>(t,i)=>{mp(t,i.format);let[o,r]=e[i.format];Yt(t,"minimum",o),Qt(t,"maximum",r)},Eb={greater_than:(e,t)=>Yt(e,t.inclusive?"minimum":"exclusiveMinimum",t.value),less_than:(e,t)=>Qt(e,t.inclusive?"maximum":"exclusiveMaximum",t.value),multiple_of:(e,t)=>up(e,t.value),number_format:cp(gr),bigint_format:cp(vr),min_length:ap,max_length:sp,length_equals:(e,t)=>op(e,t.length),min_size:ap,max_size:sp,size_equals:(e,t)=>op(e,t.size),string_format:(e,t)=>{mp(e,t.format),t.pattern&&lp(e,t.pattern),(t.format==="base64"||t.format==="base64url")&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>dp(e,t.mime)};function re(e){let t={},i=e._zod.def,o=e._zod.traits.has("$ZodCheck")?[e,...i.checks??[]]:i.checks??[];for(let n of o)Eb[n._zod.def.check]?.(t,n._zod.def);let r=e._zod.bag;r.minimum!==void 0&&Yt(t,"minimum",r.minimum),r.exclusiveMinimum!==void 0&&Yt(t,"exclusiveMinimum",r.exclusiveMinimum),r.maximum!==void 0&&Qt(t,"maximum",r.maximum),r.exclusiveMaximum!==void 0&&Qt(t,"exclusiveMaximum",r.exclusiveMaximum),r.multipleOf!==void 0&&up(t,r.multipleOf),r.format!==void 0&&(t.format??(t.format=r.format),r.format.includes("int")&&(t.isInt=!0)),r.mime&&dp(t,r.mime);for(let n of r.patterns??[])lp(t,n);return t}var Ub={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Db=new Map([[Yn,Oa],[Ur,Ea]]),fp=e=>Db.get(e)??e,Iu=(e,t,i,o)=>{let r=i;r.type="string";let{minimum:n,maximum:a,format:s,patterns:u,contentEncoding:c,laxFormat:l}=re(e);if(typeof n=="number"&&(r.minLength=n),typeof a=="number"&&(r.maxLength=a),s&&(r.format=Ub[s]??s,r.format===""&&delete r.format,(s==="time"||l)&&delete r.format),c&&(r.contentEncoding=c),u&&u.size>0){let d=[...u].map(fp);d.length===1?r.pattern=d[0].source:d.length>1&&(r.allOf=[...d.map(m=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:m.source}))])}},Su=(e,t,i,o)=>{let r=i,{minimum:n,maximum:a,multipleOf:s,exclusiveMaximum:u,exclusiveMinimum:c,isInt:l}=re(e);r.type=l?"integer":"number";let d=typeof c=="number"&&c>=(n??Number.NEGATIVE_INFINITY),m=typeof u=="number"&&u<=(a??Number.POSITIVE_INFINITY),f=t.target==="draft-04"||t.target==="openapi-3.0";if(d?f?(r.minimum=c,r.exclusiveMinimum=!0):r.exclusiveMinimum=c:typeof n=="number"&&(r.minimum=n),m?f?(r.maximum=u,r.exclusiveMaximum=!0):r.exclusiveMaximum=u:typeof a=="number"&&(r.maximum=a),s){let v=new Set;for(let E of s)Number.isFinite(E)&&E!==0?v.add(Math.abs(E)):te(e,t,r,o,`A multipleOf divisor of ${E} cannot be represented in JSON Schema`);let[h,...b]=v;h!==void 0&&(r.multipleOf=h),b.length&&(r.allOf=[...r.allOf??[],...b.map(E=>({multipleOf:E}))])}},zu=(e,t,i,o)=>{i.type="boolean"},ju=(e,t,i,o)=>{te(e,t,i,o,"BigInt cannot be represented in JSON Schema")},Pu=(e,t,i,o)=>{te(e,t,i,o,"Symbols cannot be represented in JSON Schema")},Ou=(e,t,i,o)=>{t.target==="openapi-3.0"?(i.type="string",i.nullable=!0,i.enum=[null]):i.type="null"},Eu=(e,t,i,o)=>{te(e,t,i,o,"Undefined cannot be represented in JSON Schema")},Uu=(e,t,i,o)=>{te(e,t,i,o,"Void cannot be represented in JSON Schema")},Du=(e,t,i,o)=>{i.not={}},Au=(e,t,i,o)=>{},Nu=(e,t,i,o)=>{},Tu=(e,t,i,o)=>{te(e,t,i,o,"Date cannot be represented in JSON Schema")},Cu=(e,t,i,o)=>{let r=e._zod.def,n=wt(r.entries);if(n.length===0){i.not={};return}n.every(a=>typeof a=="number")&&(i.type="number"),n.every(a=>typeof a=="string")&&(i.type="string"),i.enum=n},Ru=(e,t,i,o)=>{let r=e._zod.def;if(r.values.length===0){i.not={};return}let n=[];for(let a of r.values)if(a===void 0){if(te(e,t,i,o,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof a=="bigint"){if(te(e,t,i,o,"BigInt literals cannot be represented in JSON Schema"))return;n.push(Number(a))}else n.push(a);if(n.length!==0)if(n.length===1){let a=n[0];i.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?i.enum=[a]:i.const=a}else n.every(a=>typeof a=="number")&&(i.type="number"),n.every(a=>typeof a=="string")&&(i.type="string"),n.every(a=>typeof a=="boolean")&&(i.type="boolean"),n.every(a=>a===null)&&(i.type="null"),i.enum=n},Zu=(e,t,i,o)=>{te(e,t,i,o,"NaN cannot be represented in JSON Schema")},Lu=(e,t,i,o)=>{let r=i,n=e._zod.pattern;if(!n)throw new Error("Pattern not found in template literal");r.type="string",r.pattern=n.source},Fu=(e,t,i,o)=>{let r=i;r.type="string",r.format="binary",r.contentEncoding="binary";let{minimum:n,maximum:a,mime:s}=re(e);n!==void 0&&(r.minLength=n),a!==void 0&&(r.maxLength=a),s&&(s.length===0?r.not={}:s.length===1?r.contentMediaType=s[0]:r.anyOf=s.map(u=>({contentMediaType:u})))},Mu=(e,t,i,o)=>{i.type="boolean"},Vu=(e,t,i,o)=>{te(e,t,i,o,"Custom types cannot be represented in JSON Schema")},Ju=(e,t,i,o)=>{te(e,t,i,o,"Function types cannot be represented in JSON Schema")},Bu=(e,t,i,o)=>{te(e,t,i,o,"Transforms cannot be represented in JSON Schema")},Ku=(e,t,i,o)=>{te(e,t,i,o,"Map cannot be represented in JSON Schema")},Wu=(e,t,i,o)=>{te(e,t,i,o,"Set cannot be represented in JSON Schema")},Gu=(e,t,i,o)=>{let r=i,n=e._zod.def,{minimum:a,maximum:s}=re(e);typeof a=="number"&&(r.minItems=a),typeof s=="number"&&(r.maxItems=s),r.type="array",r.items=J(n.element,t,{...o,path:[...o.path,"items"]})};function Gr(e){let t=e._zod.def;return t.type==="pipe"&&t.in._zod.traits.has("$ZodTransform")?Gr(t.out):t.type==="catch"?Gr(t.innerType):e._zod.optin}var qu=(e,t,i,o)=>{let r=i,n=e._zod.def,a=n.shape;if(Object.getOwnPropertySymbols(a).length&&te(e,t,r,o,"Symbol keys cannot be represented in JSON Schema"))return;r.type="object",r.properties={};for(let c in a)ae(r.properties,c,J(a[c],t,{...o,path:[...o.path,"properties",c]}));let u=[];for(let c of Object.keys(a)){let l=n.shape[c];(t.io==="input"?Gr(l)===void 0:l._zod.optout===void 0)&&u.push(c)}u.length>0&&(r.required=u),n.catchall?._zod.def.type==="never"?r.additionalProperties=!1:n.catchall?n.catchall&&(r.additionalProperties=J(n.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):t.io==="output"&&(r.additionalProperties=!1)},qi=(e,t,i,o)=>{let r=e._zod.def,n=r.inclusive===!1,a=r.options.map((s,u)=>J(s,t,{...o,path:[...o.path,n?"oneOf":"anyOf",u]}));n?i.oneOf=a:i.anyOf=a},Xu=(e,t,i,o)=>{let r=e._zod.def,n=J(r.left,t,{...o,path:[...o.path,"allOf",0]}),a=J(r.right,t,{...o,path:[...o.path,"allOf",1]}),s=c=>"allOf"in c&&Object.keys(c).length===1,u=[...s(n)?n.allOf:[n],...s(a)?a.allOf:[a]];i.allOf=u,t.intersections.push(u)},Hu=(e,t,i,o)=>{let r=i,n=e._zod.def;r.type="array";let a=t.target==="draft-2020-12"?"prefixItems":"items",s=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",u=n.items.map((h,b)=>J(h,t,{...o,path:[...o.path,a,b]})),c=n.rest?J(n.rest,t,{...o,path:[...o.path,s,...t.target==="openapi-3.0"?[n.items.length]:[]]}):null,l=n.items.length;for(;l>0;){let h=n.items[l-1];if(!(t.io==="input"?Gr(h)!==void 0:h._zod.optout==="optional"))break;l--}let d=n.items.length,m=!n.rest;t.target==="draft-2020-12"?(r.prefixItems=u,m?r.items=!1:c&&(r.items=c),l>0&&(r.minItems=l),m&&(r.maxItems=d)):t.target==="openapi-3.0"?(r.items={anyOf:u},c&&r.items.anyOf.push(c),l>0&&(r.minItems=l),m&&(r.maxItems=d)):(r.items=u,m?r.additionalItems=!1:c&&(r.additionalItems=c),l>0&&(r.minItems=l),m&&(r.maxItems=d));let{minimum:f,maximum:v}=re(e);typeof f=="number"&&(r.minItems=f),typeof v=="number"&&(r.maxItems=v)};function xu(e,t,i){if(t.$ref){if(i.has(t))return t;i.add(t);let v=e.get(t)?.def;if(!v)return t;let h=xu(e,v,i);return h===v?t:h}for(let v of["anyOf","oneOf"]){let h=t[v];if(!Array.isArray(h))continue;let b=h.map(E=>xu(e,E,i));b.some((E,z)=>E!==h[z])&&(t={...t,[v]:b})}let o=Array.isArray(t.type)?t.type:[t.type],r=!o.includes("string")&&o.some(v=>v==="number"||v==="integer"),n=t.enum??(t.const!==void 0?[t.const]:void 0);if(!r&&!n?.some(v=>typeof v=="number"))return t;let{minimum:a,maximum:s,exclusiveMinimum:u,exclusiveMaximum:c,multipleOf:l,format:d,id:m,...f}=t;return f.enum?f.enum=f.enum.map(v=>typeof v=="number"?String(v):v):typeof f.const=="number"&&(f.const=String(f.const)),r&&(f.type="string",n||(f.pattern=(o.includes("number")?Ze:Ir).source)),f}var wu=new WeakMap;function Ab(e){let t=new Map;for(let o of e.seen.values())o.def&&!t.has(o.schema)&&t.set(o.schema,o);let i=new Map;for(let o of wu.get(e)??[]){let r=e.seen.get(o),n=(r?.def??r?.schema)?.propertyNames;if(!n||n===!0||i.has(n))continue;let a=xu(t,n,new Set);a!==n&&i.set(n,a)}if(i.size)for(let o of e.seen.values())for(let r of[o.schema,o.def]){let n=r&&i.get(r.propertyNames);n&&(r.propertyNames=n)}}var Yu=(e,t,i,o)=>{let r=i,n=e._zod.def;r.type="object";let a=n.keyType,s=re(a).patterns;if(n.mode==="loose"&&s&&s.size>0){let l=J(n.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});r.patternProperties={};for(let d of s)ae(r.patternProperties,fp(d).source,l)}else{if(t.target==="draft-07"||t.target==="draft-2020-12"){r.propertyNames=J(n.keyType,t,{...o,path:[...o.path,"propertyNames"]});let l=wu.get(t);l||(l=[],wu.set(t,l),t.deferred.push(()=>Ab(t))),l.push(e)}r.additionalProperties=J(n.valueType,t,{...o,path:[...o.path,"additionalProperties"]})}let u=a._zod.values,c=t.io==="input"&&Gr(n.valueType)!==void 0;if(u&&!n.partial&&!c){let l=[...u].filter(d=>typeof d=="string"||typeof d=="number");l.length>0&&(r.required=l.map(String))}},Qu=(e,t,i,o)=>{let r=e._zod.def,n=J(r.innerType,t,o),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=r.innerType,i.nullable=!0):i.anyOf=[n,{type:"null"}]},el=(e,t,i,o)=>{let r=e._zod.def;J(r.innerType,t,o);let n=t.seen.get(e);n.ref=r.innerType},tl=Symbol();function pp(e,t,i,o,r){let n=!1,a=JSON.stringify(e,(s,u)=>typeof u!="bigint"?u:(n=!0,null));return n?(te(t,i,o,r,"BigInt defaults cannot be represented in JSON Schema"),tl):JSON.parse(a)}var rl=(e,t,i,o)=>{let r=e._zod.def;J(r.innerType,t,o);let n=t.seen.get(e);n.ref=r.innerType;let a=pp(r.defaultValue,e,t,i,o);a!==tl&&(i.default=a)},nl=(e,t,i,o)=>{let r=e._zod.def;J(r.innerType,t,o);let n=t.seen.get(e);if(n.ref=r.innerType,t.io!=="input")return;let a=pp(r.defaultValue,e,t,i,o);a!==tl&&(i._prefault=a)},il=(e,t,i,o)=>{let r=e._zod.def;J(r.innerType,t,o);let n=t.seen.get(e);n.ref=r.innerType;let a;try{a=r.catchValue(void 0)}catch{te(e,t,i,o,"Dynamic catch values are not supported in JSON Schema");return}i.default=a},ol=(e,t,i,o)=>{let r=e._zod.def,n=r.in._zod.traits.has("$ZodTransform"),a=t.io==="input"?n?r.out:r.in:r.out;J(a,t,o);let s=t.seen.get(e);s.ref=a},al=(e,t,i,o)=>{let r=e._zod.def;J(r.innerType,t,o);let n=t.seen.get(e);n.ref=r.innerType,i.readOnly=!0},sl=(e,t,i,o)=>{let r=e._zod.def;J(r.innerType,t,o);let n=t.seen.get(e);n.ref=r.innerType},Xi=(e,t,i,o)=>{let r=e._zod.def;J(r.innerType,t,o);let n=t.seen.get(e);n.ref=r.innerType},cl=(e,t,i,o)=>{let r=e._zod.innerType;J(r,t,o);let n=t.seen.get(e);n.ref=r},Gi={string:Iu,number:Su,boolean:zu,bigint:ju,symbol:Pu,null:Ou,undefined:Eu,void:Uu,never:Du,any:Au,unknown:Nu,date:Tu,enum:Cu,literal:Ru,nan:Zu,template_literal:Lu,file:Fu,success:Mu,custom:Vu,function:Ju,transform:Bu,map:Ku,set:Wu,array:Gu,object:qu,union:qi,intersection:Xu,tuple:Hu,record:Yu,nullable:Qu,nonoptional:el,default:rl,prefault:nl,catch:il,pipe:ol,readonly:al,promise:sl,optional:Xi,lazy:cl};function Hi(e,t){if("_idmap"in e){let o=e,r=qe({...t,processors:Gi}),n={};for(let u of o._idmap.entries()){let[c,l]=u;J(l,r)}let a={},s={registry:o,uri:t?.uri,defs:n};r.external=s;for(let u of o._idmap.entries()){let[c,l]=u;Xe(r,l),ae(a,c,He(r,l))}if(Object.keys(n).length>0){let u=r.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[u]:n}}return{schemas:a}}let i=qe({...t,processors:Gi});return J(e,i),Xe(i,e),He(i,e)}var Yi=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let i=t?.target??"draft-2020-12";i==="draft-4"&&(i="draft-04"),i==="draft-7"&&(i="draft-07"),this.ctx=qe({processors:Gi,target:i,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,i={path:[],schemaPath:[]}){return J(t,this.ctx,i)}emit(t,i){i&&(i.cycles&&(this.ctx.cycles=i.cycles),i.reused&&(this.ctx.reused=i.reused),i.external&&(this.ctx.external=i.external)),this.ctx.sharedDefsExtractedFor=void 0,this.ctx.sharedEmitDoneFor=void 0,Xe(this.ctx,t);let o=He(this.ctx,t),{"~standard":r,...n}=o;return n}};var gp={};var sr={};Te(sr,{ZodAny:()=>Ol,ZodArray:()=>Al,ZodBase64:()=>$o,ZodBase64URL:()=>yo,ZodBigInt:()=>or,ZodBigIntFormat:()=>ko,ZodBoolean:()=>ir,ZodCIDRv4:()=>vo,ZodCIDRv6:()=>ho,ZodCUID:()=>co,ZodCUID2:()=>uo,ZodCatch:()=>td,ZodCodec:()=>on,ZodCreditCard:()=>kl,ZodCustom:()=>an,ZodCustomStringFormat:()=>yt,ZodDate:()=>Yr,ZodDefault:()=>ql,ZodDiscriminatedUnion:()=>Tl,ZodE164:()=>_o,ZodEmail:()=>io,ZodEmoji:()=>ao,ZodEnum:()=>tr,ZodExactOptional:()=>So,ZodFile:()=>Bl,ZodFunction:()=>dd,ZodGUID:()=>oo,ZodIBAN:()=>xl,ZodIPv4:()=>po,ZodIPv6:()=>go,ZodISODate:()=>Qe,ZodISODateTime:()=>Ye,ZodISODuration:()=>tt,ZodISOTime:()=>et,ZodInstanceOf:()=>pd,ZodIntersection:()=>Cl,ZodJWT:()=>bo,ZodKSUID:()=>fo,ZodLazy:()=>cd,ZodLiteral:()=>Jl,ZodMAC:()=>bl,ZodMap:()=>Ml,ZodNaN:()=>nd,ZodNanoID:()=>so,ZodNever:()=>Ul,ZodNonOptional:()=>zo,ZodNull:()=>jl,ZodNullable:()=>Gl,ZodNumber:()=>nr,ZodNumberFormat:()=>_t,ZodObject:()=>en,ZodOptional:()=>rn,ZodPipe:()=>nn,ZodPrefault:()=>Hl,ZodPreprocess:()=>id,ZodPromise:()=>ld,ZodReadonly:()=>od,ZodRecord:()=>er,ZodSet:()=>Vl,ZodString:()=>rr,ZodStringFormat:()=>K,ZodSuccess:()=>ed,ZodSymbol:()=>Sl,ZodTemplateLiteral:()=>sd,ZodTransform:()=>Kl,ZodTuple:()=>Zl,ZodType:()=>C,ZodULID:()=>lo,ZodURL:()=>Hr,ZodUUID:()=>Ne,ZodUndefined:()=>zl,ZodUnion:()=>tn,ZodUnknown:()=>El,ZodVoid:()=>Dl,ZodXID:()=>mo,ZodXor:()=>Nl,_ZodString:()=>no,_default:()=>Xl,_function:()=>zg,any:()=>ig,array:()=>Qr,base64:()=>Rp,base64url:()=>Zp,bigint:()=>Qp,boolean:()=>Il,catch:()=>rd,check:()=>jg,cidrv4:()=>Tp,cidrv6:()=>Cp,codec:()=>xg,creditCard:()=>Fp,cuid:()=>jp,cuid2:()=>Pp,currencyCode:()=>Wp,custom:()=>Pg,date:()=>ag,describe:()=>Og,discriminatedUnion:()=>mg,e164:()=>Lp,email:()=>$p,emoji:()=>Sp,enum:()=>wo,exactOptional:()=>Wl,file:()=>yg,float32:()=>qp,float64:()=>Xp,function:()=>zg,guid:()=>yp,hash:()=>Gp,hex:()=>Kp,hostname:()=>Bp,httpUrl:()=>Ip,iban:()=>Mp,instanceof:()=>Ug,int:()=>to,int32:()=>Hp,int64:()=>eg,intersection:()=>Rl,invertCodec:()=>wg,ipv4:()=>Dp,ipv6:()=>Np,json:()=>Ag,jwt:()=>Vp,keyof:()=>sg,ksuid:()=>Up,lazy:()=>ud,literal:()=>$g,looseObject:()=>lg,looseRecord:()=>pg,mac:()=>Ap,map:()=>gg,meta:()=>Eg,nan:()=>kg,nanoid:()=>zp,nativeEnum:()=>hg,never:()=>xo,nonoptional:()=>Ql,null:()=>Pl,nullable:()=>Xr,nullish:()=>_g,number:()=>wl,object:()=>cg,optional:()=>ht,partialRecord:()=>fg,pipe:()=>ro,prefault:()=>Yl,preprocess:()=>Ng,promise:()=>Sg,readonly:()=>ad,record:()=>Fl,refine:()=>md,set:()=>vg,strictObject:()=>ug,string:()=>qr,stringFormat:()=>Jp,stringbool:()=>Dg,success:()=>bg,superRefine:()=>fd,symbol:()=>rg,templateLiteral:()=>Ig,transform:()=>Io,tuple:()=>Ll,uint32:()=>Yp,uint64:()=>tg,ulid:()=>Op,undefined:()=>ng,union:()=>ar,unknown:()=>vt,url:()=>wp,uuid:()=>_p,uuidv4:()=>bp,uuidv6:()=>kp,uuidv7:()=>xp,void:()=>og,xid:()=>Ep,xor:()=>dg});var Qi={};Te(Qi,{endsWith:()=>Vt,gt:()=>De,gte:()=>ke,includes:()=>Ft,length:()=>pt,lowercase:()=>Zt,lt:()=>Ue,lte:()=>be,maxLength:()=>ft,maxSize:()=>Ge,mime:()=>Bt,minLength:()=>Le,minSize:()=>Ae,multipleOf:()=>We,negative:()=>Ji,nonnegative:()=>Ki,nonpositive:()=>Bi,normalize:()=>Kt,overwrite:()=>Oe,positive:()=>Vi,properties:()=>Jt,property:()=>Wi,regex:()=>Rt,size:()=>mt,slugify:()=>Xt,startsWith:()=>Mt,toLowerCase:()=>Gt,toUpperCase:()=>qt,trim:()=>Wt,uppercase:()=>Lt});var vp=new WeakSet([Object.prototype,Error.prototype]);function eo(e,t,i){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let o=i(this);return Object.defineProperty(this,t,{value:o,configurable:!0,writable:!0}),o},set(o){Object.defineProperty(this,t,{value:o,configurable:!0,writable:!0})}})}var hp=(e,t)=>{la.init(e,t),e.name="ZodError";let i=Object.getPrototypeOf(e);vp.has(i)||(vp.add(i),eo(i,"format",o=>r=>br(o,r)),eo(i,"flatten",o=>r=>_r(o,r)),eo(i,"addIssue",o=>r=>{o.issues.push(r),o.message=JSON.stringify(o.issues,It,2)}),eo(i,"addIssues",o=>r=>{o.issues.push(...r),o.message=JSON.stringify(o.issues,It,2)}),Object.defineProperty(i,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},Tb=p("ZodError",hp),_e=p("ZodError",hp,void 0,{Parent:Error});var ul=Pt(_e),ll=Ot(_e),dl=Et(_e),ml=Ut(_e),fl=Pn(_e),pl=On(_e),gl=En(_e),vl=Un(_e),hl=Dn(_e),$l=An(_e),yl=Nn(_e),_l=Tn(_e);function Rb(){ie.localeError||H(pi())}function $t(){ie.memoizer||H({memoizer:Zr()})}var C=p("ZodType",(e,t)=>(Rb(),N.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone($.mergeDefs(t,{checks:[...t.checks??[],...e.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return M(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(md(e,t))},superRefine(e,t){return this.check(fd(e,t))},overwrite(e){return this.check(Oe(e))},optional(){return ht(this)},exactOptional(){return Wl(this)},nullable(){return Xr(this)},nullish(){return ht(Xr(this))},nonoptional(e){return Ql(this,e)},array(){return Qr(this)},or(e){return ar([this,e])},and(e){return Rl(this,e)},transform(e){return ro(this,Io(e))},default(e){return Xl(this,e)},prefault(e){return Yl(this,e)},catch(e){return rd(this,e)},pipe(e){return ro(this,e)},readonly(){return ad(this)},describe(e){let t=this.clone();return se.add(t,{description:e}),t},meta(...e){if(e.length===0)return se.get(this);let t=this.clone();return se.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return $.hide(this,"~standard",{...Wn(this),jsonSchema:{input:Ht(this,"input"),output:Ht(this,"output")}})},set"~standard"(e){$.own(this,"~standard",e)},parse:function e(t,i){return ul(this,t,i,{callee:e})},parseAsync:async function e(t,i){return await ll(this,t,i,{callee:e})},safeParse(e,t){return dl(this,e,t)},async safeParseAsync(e,t){return ml(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){$.own(this,"spa",e)},validate(e,t){return kr(this,e,t)},validateAsync(e,t){return xr(this,e,t)},encode:function e(t,i){return fl(this,t,i,{callee:e})},decode:function e(t,i){return pl(this,t,i,{callee:e})},encodeAsync:async function e(t,i){return await gl(this,t,i,{callee:e})},decodeAsync:async function e(t,i){return await vl(this,t,i,{callee:e})},safeEncode(e,t){return hl(this,e,t)},safeDecode(e,t){return $l(this,e,t)},async safeEncodeAsync(e,t){return yl(this,e,t)},async safeDecodeAsync(e,t){return _l(this,e,t)},toJSONSchema(e){return ku(this,{})(e)},get description(){return se.get(this)?.description},get _def(){return this._zod.def}}),no=p("_ZodString",(e,t)=>{st.init(e,t),C.init(e,t),e._zod.processJSONSchema=(i,o,r)=>Iu(e,i,o,r)},$.derived({format:e=>re(e).format??null,minLength:e=>re(e).minimum??null,maxLength:e=>re(e).maximum??null},{regex(...e){return this.check(Rt(...e))},includes(...e){return this.check(Ft(...e))},startsWith(...e){return this.check(Mt(...e))},endsWith(...e){return this.check(Vt(...e))},min(...e){return this.check(Le(...e))},max(...e){return this.check(ft(...e))},length(...e){return this.check(pt(...e))},nonempty(...e){return this.check(Le(1,...e))},lowercase(e){return this.check(Zt(e))},uppercase(e){return this.check(Lt(e))},trim(){return this.check(Wt())},normalize(...e){return this.check(Kt(...e))},toLowerCase(){return this.check(Gt())},toUpperCase(){return this.check(qt())},slugify(){return this.check(Xt())}})),rr=p("ZodString",(e,t)=>{st.init(e,t),no.init(e,t)},{email(e){return this.check(ki(io,e))},url(e){return this.check(Mr(Hr,e))},jwt(e){return this.check(Mi(bo,e))},emoji(e){return this.check(ji(ao,e))},guid(e){return this.check(xi(oo,e))},uuid(e){return this.check(wi(Ne,e))},uuidv4(e){return this.check(Ii(Ne,e))},uuidv6(e){return this.check(Si(Ne,e))},uuidv7(e){return this.check(zi(Ne,e))},nanoid(e){return this.check(Pi(so,e))},cuid(e){return this.check(Oi(co,e))},cuid2(e){return this.check(Ei(uo,e))},ulid(e){return this.check(Ui(lo,e))},base64(e){return this.check(Zi($o,e))},base64url(e){return this.check(Li(yo,e))},xid(e){return this.check(Di(mo,e))},ksuid(e){return this.check(Ai(fo,e))},ipv4(e){return this.check(Ni(po,e))},ipv6(e){return this.check(Ti(go,e))},cidrv4(e){return this.check(Ci(vo,e))},cidrv6(e){return this.check(Ri(ho,e))},e164(e){return this.check(Fi(_o,e))},datetime(e){return this.check(Vr(Ye,e))},date(e){return this.check(Jr(Qe,e))},time(e){return this.check(Br(et,e))},duration(e){return this.check(Kr(tt,e))}});function qr(e){return Rc(rr,e)}var K=p("ZodStringFormat",(e,t)=>{V.init(e,t),no.init(e,t)}),Ye=p("ZodISODateTime",(e,t)=>{Os.init(e,t),K.init(e,t)}),Qe=p("ZodISODate",(e,t)=>{Es.init(e,t),K.init(e,t)}),et=p("ZodISOTime",(e,t)=>{Us.init(e,t),K.init(e,t)}),tt=p("ZodISODuration",(e,t)=>{Ds.init(e,t),K.init(e,t)}),io=p("ZodEmail",(e,t)=>{ys.init(e,t),K.init(e,t)});function $p(e){return ki(io,e)}var oo=p("ZodGUID",(e,t)=>{hs.init(e,t),K.init(e,t)});function yp(e){return xi(oo,e)}var Ne=p("ZodUUID",(e,t)=>{$s.init(e,t),K.init(e,t)});function _p(e){return wi(Ne,e)}function bp(e){return Ii(Ne,e)}function kp(e){return Si(Ne,e)}function xp(e){return zi(Ne,e)}var Hr=p("ZodURL",(e,t)=>{ks.init(e,t),K.init(e,t)});function wp(e){return Mr(Hr,e)}function Ip(e){return Mr(Hr,{protocol:wr,hostname:Da,...$.normalizeParams(e)})}var ao=p("ZodEmoji",(e,t)=>{xs.init(e,t),K.init(e,t)});function Sp(e){return ji(ao,e)}var so=p("ZodNanoID",(e,t)=>{ws.init(e,t),K.init(e,t)});function zp(e){return Pi(so,e)}var co=p("ZodCUID",(e,t)=>{Is.init(e,t),K.init(e,t)});function jp(e){return Oi(co,e)}var uo=p("ZodCUID2",(e,t)=>{Ss.init(e,t),K.init(e,t)});function Pp(e){return Ei(uo,e)}var lo=p("ZodULID",(e,t)=>{zs.init(e,t),K.init(e,t)});function Op(e){return Ui(lo,e)}var mo=p("ZodXID",(e,t)=>{js.init(e,t),K.init(e,t)});function Ep(e){return Di(mo,e)}var fo=p("ZodKSUID",(e,t)=>{Ps.init(e,t),K.init(e,t)});function Up(e){return Ai(fo,e)}var po=p("ZodIPv4",(e,t)=>{As.init(e,t),K.init(e,t)});function Dp(e){return Ni(po,e)}var bl=p("ZodMAC",(e,t)=>{Ts.init(e,t),K.init(e,t)});function Ap(e){return Lc(bl,e)}var go=p("ZodIPv6",(e,t)=>{Ns.init(e,t),K.init(e,t)});function Np(e){return Ti(go,e)}var vo=p("ZodCIDRv4",(e,t)=>{Cs.init(e,t),K.init(e,t)});function Tp(e){return Ci(vo,e)}var ho=p("ZodCIDRv6",(e,t)=>{Rs.init(e,t),K.init(e,t)});function Cp(e){return Ri(ho,e)}var $o=p("ZodBase64",(e,t)=>{Zs.init(e,t),K.init(e,t)});function Rp(e){return Zi($o,e)}var yo=p("ZodBase64URL",(e,t)=>{Ls.init(e,t),K.init(e,t)});function Zp(e){return Li(yo,e)}var _o=p("ZodE164",(e,t)=>{Fs.init(e,t),K.init(e,t)});function Lp(e){return Fi(_o,e)}var kl=p("ZodCreditCard",(e,t)=>{Ms.init(e,t),K.init(e,t)});function Fp(e){return Fc(kl,e)}var xl=p("ZodIBAN",(e,t)=>{Vs.init(e,t),K.init(e,t)});function Mp(e){return Mc(xl,e)}var bo=p("ZodJWT",(e,t)=>{Js.init(e,t),K.init(e,t)});function Vp(e){return Mi(bo,e)}var yt=p("ZodCustomStringFormat",(e,t)=>{Bs.init(e,t),K.init(e,t)});function Jp(e,t,i={}){return gt(yt,e,t,i)}function Bp(e){return gt(yt,"hostname",Ua,e)}function Kp(e){return gt(yt,"hex",Wa,e)}function Wp(e){return gt(yt,"currency_code",Na,e)}function Gp(e,t){let i=t?.enc??"hex",o=`${e}_${i}`,r=Se[o];if(!r)throw new Error(`Unrecognized hash format: ${o}`);return gt(yt,o,r,t)}var nr=p("ZodNumber",(e,t)=>{ni.init(e,t),C.init(e,t),e._zod.processJSONSchema=(i,o,r)=>Su(e,i,o,r),e.isFinite=!0},$.derived({minValue:e=>{let{minimum:t,exclusiveMinimum:i}=re(e);return Math.max(t??Number.NEGATIVE_INFINITY,i??Number.NEGATIVE_INFINITY)},maxValue:e=>{let{maximum:t,exclusiveMaximum:i}=re(e);return Math.min(t??Number.POSITIVE_INFINITY,i??Number.POSITIVE_INFINITY)},isInt:e=>{let{isInt:t,multipleOf:i}=re(e);return!!t||!!i?.some(Number.isSafeInteger)},format:e=>re(e).format??null},{gt(e,t){return this.check(De(e,t))},gte(e,t){return this.check(ke(e,t))},min(e,t){return this.check(ke(e,t))},lt(e,t){return this.check(Ue(e,t))},lte(e,t){return this.check(be(e,t))},max(e,t){return this.check(be(e,t))},int(e){return this.check(to(e))},safe(e){return this.check(to(e))},positive(e){return this.check(De(0,e))},nonnegative(e){return this.check(ke(0,e))},negative(e){return this.check(Ue(0,e))},nonpositive(e){return this.check(be(0,e))},multipleOf(e,t){return this.check(We(e,t))},step(e,t){return this.check(We(e,t))},finite(){return this}}));function wl(e){return Jc(nr,e)}var _t=p("ZodNumberFormat",(e,t)=>{Ks.init(e,t),nr.init(e,t)});function to(e){return Kc(_t,e)}function qp(e){return Wc(_t,e)}function Xp(e){return Gc(_t,e)}function Hp(e){return qc(_t,e)}function Yp(e){return Xc(_t,e)}var ir=p("ZodBoolean",(e,t)=>{Dr.init(e,t),C.init(e,t),e._zod.processJSONSchema=(i,o,r)=>zu(e,i,o,r)});function Il(e){return Hc(ir,e)}var or=p("ZodBigInt",(e,t)=>{ii.init(e,t),C.init(e,t),e._zod.processJSONSchema=(i,o,r)=>ju(e,i,o,r)},$.derived({minValue:e=>re(e).minimum??null,maxValue:e=>re(e).maximum??null,format:e=>re(e).format??null},{gte(e,t){return this.check(ke(e,t))},min(e,t){return this.check(ke(e,t))},gt(e,t){return this.check(De(e,t))},lt(e,t){return this.check(Ue(e,t))},lte(e,t){return this.check(be(e,t))},max(e,t){return this.check(be(e,t))},positive(e){return this.check(De(BigInt(0),e))},negative(e){return this.check(Ue(BigInt(0),e))},nonpositive(e){return this.check(be(BigInt(0),e))},nonnegative(e){return this.check(ke(BigInt(0),e))},multipleOf(e,t){return this.check(We(e,t))}}));function Qp(e){return Qc(or,e)}var ko=p("ZodBigIntFormat",(e,t)=>{Ws.init(e,t),or.init(e,t)});function eg(e){return tu(ko,e)}function tg(e){return ru(ko,e)}var Sl=p("ZodSymbol",(e,t)=>{Gs.init(e,t),C.init(e,t),e._zod.processJSONSchema=(i,o,r)=>Pu(e,i,o,r)});function rg(e){return nu(Sl,e)}var zl=p("ZodUndefined",(e,t)=>{qs.init(e,t),C.init(e,t),e._zod.processJSONSchema=(i,o,r)=>Eu(e,i,o,r)});function ng(e){return iu(zl,e)}var jl=p("ZodNull",(e,t)=>{Xs.init(e,t),C.init(e,t),e._zod.processJSONSchema=(i,o,r)=>Ou(e,i,o,r)});function Pl(e){return ou(jl,e)}var Ol=p("ZodAny",(e,t)=>{Hs.init(e,t),C.init(e,t),e._zod.processJSONSchema=(i,o,r)=>Au(e,i,o,r)});function ig(){return au(Ol)}var El=p("ZodUnknown",(e,t)=>{Ys.init(e,t),C.init(e,t),e._zod.processJSONSchema=(i,o,r)=>Nu(e,i,o,r)});function vt(){return su(El)}var Ul=p("ZodNever",(e,t)=>{Qs.init(e,t),C.init(e,t),e._zod.processJSONSchema=(i,o,r)=>Du(e,i,o,r)});function xo(e){return cu(Ul,e)}var Dl=p("ZodVoid",(e,t)=>{ec.init(e,t),C.init(e,t),e._zod.processJSONSchema=(i,o,r)=>Uu(e,i,o,r)});function og(e){return uu(Dl,e)}var Yr=p("ZodDate",(e,t)=>{tc.init(e,t),C.init(e,t),e._zod.processJSONSchema=(i,o,r)=>Tu(e,i,o,r),e.min=(i,o)=>e.check(ke(i,o)),e.max=(i,o)=>e.check(be(i,o))},$.derived({minDate:e=>{let{minimum:t}=re(e);return t?new Date(t):null},maxDate:e=>{let{maximum:t}=re(e);return t?new Date(t):null}},{}));function ag(e){return lu(Yr,e)}var Al=p("ZodArray",(e,t)=>{$t(),rc.init(e,t),C.init(e,t),e._zod.processJSONSchema=(i,o,r)=>Gu(e,i,o,r),e.element=t.element},{min(e,t){return this.check(Le(e,t))},nonempty(e){return this.check(Le(1,e))},max(e,t){return this.check(ft(e,t))},length(e,t){return this.check(pt(e,t))},unwrap(){return this.element}});function Qr(e,t){return fu(Al,e,t)}function sg(e){let t=e._zod.def.shape;return wo(Object.keys(t))}var en=p("ZodObject",(e,t)=>{$t(),nc.init(e,t),C.init(e,t),e._zod.processJSONSchema=(i,o,r)=>qu(e,i,o,r),$.installLazyProp(e,"shape",i=>i._zod.def.shape,!1)},{keyof(){return wo(Object.keys(this._zod.def.shape))},catchall(e){return this.clone($.mergeDefs(this._zod.def,{catchall:e}))},passthrough(){return this.clone($.mergeDefs(this._zod.def,{catchall:vt()}))},loose(){return this.clone($.mergeDefs(this._zod.def,{catchall:vt()}))},strict(){return this.clone($.mergeDefs(this._zod.def,{catchall:xo()}))},strip(){return this.clone($.mergeDefs(this._zod.def,{catchall:void 0}))},extend(e){return $.extend(this,e)},safeExtend(e){return $.safeExtend(this,e)},merge(e){return $.merge(this,e)},pick(e){return $.pick(this,e)},omit(e){return $.omit(this,e)},partial(...e){return $.partial(rn,this,e[0])},exactPartial(...e){return $.partial(So,this,e[0],"exactPartial")},required(...e){return $.required(zo,this,e[0])}});function cg(e,t){let i={type:"object",shape:e??{},...$.normalizeParams(t)};return new en(i)}function ug(e,t){return new en({type:"object",shape:e,catchall:xo(),...$.normalizeParams(t)})}function lg(e,t){return new en({type:"object",shape:e,catchall:vt(),...$.normalizeParams(t)})}var tn=p("ZodUnion",(e,t)=>{Ar.init(e,t),C.init(e,t),e._zod.processJSONSchema=(i,o,r)=>qi(e,i,o,r),e.options=t.options});function ar(e,t){return new tn({type:"union",options:e,...$.normalizeParams(t)})}var Nl=p("ZodXor",(e,t)=>{tn.init(e,t),ic.init(e,t),e._zod.processJSONSchema=(i,o,r)=>qi(e,i,o,r),e.options=t.options});function dg(e,t){return new Nl({type:"union",options:e,inclusive:!1,...$.normalizeParams(t)})}var Tl=p("ZodDiscriminatedUnion",(e,t)=>{tn.init(e,t),ac.init(e,t)});function mg(e,t,i){return new Tl({type:"union",options:t,discriminator:e,...$.normalizeParams(i)})}var Cl=p("ZodIntersection",(e,t)=>{sc.init(e,t),C.init(e,t),e._zod.processJSONSchema=(i,o,r)=>Xu(e,i,o,r)});function Rl(e,t){return new Cl({type:"intersection",left:e,right:t})}var Zl=p("ZodTuple",(e,t)=>{$t(),oi.init(e,t),C.init(e,t),e._zod.processJSONSchema=(i,o,r)=>Hu(e,i,o,r)},{rest(e){return this.clone({...this._zod.def,rest:e})},partial(){let e=this._zod.def;if(e.checks?.length)throw new Error(".partial() cannot be used on tuple schemas containing refinements");return this.clone({...e,items:e.items.map(t=>new rn({type:"optional",innerType:t}))})}});function Ll(e,t,i){let o=t instanceof N,r=o?i:t,n=o?t:null;return new Zl({type:"tuple",items:e,rest:n,...$.normalizeParams(r)})}var er=p("ZodRecord",(e,t)=>{$t(),cc.init(e,t),C.init(e,t),e._zod.processJSONSchema=(i,o,r)=>Yu(e,i,o,r),e.keyType=t.keyType,e.valueType=t.valueType});function Fl(e,t,i){return!t||!t._zod?new er({type:"record",keyType:qr(),valueType:e,...$.normalizeParams(t)}):new er({type:"record",keyType:e,valueType:t,...$.normalizeParams(i)})}function fg(e,t,i){return new er({type:"record",keyType:e,valueType:t,...$.normalizeParams(i),partial:!0})}function pg(e,t,i){return new er({type:"record",keyType:e,valueType:t,mode:"loose",...$.normalizeParams(i)})}var Ml=p("ZodMap",(e,t)=>{$t(),uc.init(e,t),C.init(e,t),e._zod.processJSONSchema=(i,o,r)=>Ku(e,i,o,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...i)=>e.check(Ae(...i)),e.nonempty=i=>e.check(Ae(1,i)),e.max=(...i)=>e.check(Ge(...i)),e.size=(...i)=>e.check(mt(...i))});function gg(e,t,i){return new Ml({type:"map",keyType:e,valueType:t,...$.normalizeParams(i)})}var Vl=p("ZodSet",(e,t)=>{$t(),lc.init(e,t),C.init(e,t),e._zod.processJSONSchema=(i,o,r)=>Wu(e,i,o,r),e.min=(...i)=>e.check(Ae(...i)),e.nonempty=i=>e.check(Ae(1,i)),e.max=(...i)=>e.check(Ge(...i)),e.size=(...i)=>e.check(mt(...i))});function vg(e,t){return new Vl({type:"set",valueType:e,...$.normalizeParams(t)})}var tr=p("ZodEnum",(e,t)=>{dc.init(e,t),C.init(e,t),e._zod.processJSONSchema=(o,r,n)=>Cu(e,o,r,n),e.enum=t.entries,e.options=[...e._zod.values];let i=new Set(Object.keys(t.entries));e.extract=(o,r)=>{let n={};for(let a of o)if(i.has(a))n[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new tr({...t,checks:[],...$.normalizeParams(r),entries:n})},e.exclude=(o,r)=>{let n={...t.entries};for(let a of o)if(i.has(a))delete n[a];else throw new Error(`Key ${a} not found in enum`);return new tr({...t,checks:[],...$.normalizeParams(r),entries:n})}});function wo(e,t){let i=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new tr({type:"enum",entries:i,...$.normalizeParams(t)})}function hg(e,t){return new tr({type:"enum",entries:e,...$.normalizeParams(t)})}var Jl=p("ZodLiteral",(e,t)=>{mc.init(e,t),C.init(e,t),e._zod.processJSONSchema=(i,o,r)=>Ru(e,i,o,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function $g(e,t){return new Jl({type:"literal",values:Array.isArray(e)?e:[e],...$.normalizeParams(t)})}var Bl=p("ZodFile",(e,t)=>{fc.init(e,t),C.init(e,t),e._zod.processJSONSchema=(i,o,r)=>Fu(e,i,o,r),e.min=(i,o)=>e.check(Ae(i,o)),e.max=(i,o)=>e.check(Ge(i,o)),e.mime=(i,o)=>e.check(Bt(Array.isArray(i)?i:[i],o))});function yg(e){return pu(Bl,e)}var Kl=p("ZodTransform",(e,t)=>{$t(),pc.init(e,t),C.init(e,t),e._zod.processJSONSchema=(i,o,r)=>Bu(e,i,o,r),e._zod.parse=(i,o)=>{if(o.direction==="backward")throw new Ke(e.constructor.name);i.addIssue=n=>{if(typeof n=="string")i.issues.push($.issue(n,i.value,t));else{let a=n;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),"input"in a||(a.input=i.value),a.inst??(a.inst=e),i.issues.push($.issue(a))}};let r=t.transform(i.value,i);return r instanceof Promise?r.then(n=>(i.value=n,i)):(i.value=r,i)}});function Io(e){return new Kl({type:"transform",transform:e})}var rn=p("ZodOptional",(e,t)=>{ai.init(e,t),C.init(e,t),e._zod.processJSONSchema=(i,o,r)=>Xi(e,i,o,r),e.unwrap=()=>e._zod.def.innerType});function ht(e){return new rn({type:"optional",innerType:e})}var So=p("ZodExactOptional",(e,t)=>{gc.init(e,t),C.init(e,t),e._zod.processJSONSchema=(i,o,r)=>Xi(e,i,o,r),e.unwrap=()=>e._zod.def.innerType});function Wl(e){return new So({type:"optional",innerType:e})}var Gl=p("ZodNullable",(e,t)=>{vc.init(e,t),C.init(e,t),e._zod.processJSONSchema=(i,o,r)=>Qu(e,i,o,r),e.unwrap=()=>e._zod.def.innerType});function Xr(e){return new Gl({type:"nullable",innerType:e})}function _g(e){return ht(Xr(e))}var ql=p("ZodDefault",(e,t)=>{hc.init(e,t),C.init(e,t),e._zod.processJSONSchema=(i,o,r)=>rl(e,i,o,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Xl(e,t){return new ql({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():$.shallowClone(t)}})}var Hl=p("ZodPrefault",(e,t)=>{$c.init(e,t),C.init(e,t),e._zod.processJSONSchema=(i,o,r)=>nl(e,i,o,r),e.unwrap=()=>e._zod.def.innerType});function Yl(e,t){return new Hl({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():$.shallowClone(t)}})}var zo=p("ZodNonOptional",(e,t)=>{yc.init(e,t),C.init(e,t),e._zod.processJSONSchema=(i,o,r)=>el(e,i,o,r),e.unwrap=()=>e._zod.def.innerType});function Ql(e,t){return new zo({type:"nonoptional",innerType:e,...$.normalizeParams(t)})}var ed=p("ZodSuccess",(e,t)=>{_c.init(e,t),C.init(e,t),e._zod.processJSONSchema=(i,o,r)=>Mu(e,i,o,r),e.unwrap=()=>e._zod.def.innerType});function bg(e){return new ed({type:"success",innerType:e})}var td=p("ZodCatch",(e,t)=>{bc.init(e,t),C.init(e,t),e._zod.processJSONSchema=(i,o,r)=>il(e,i,o,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function rd(e,t){return new td({type:"catch",innerType:e,catchValue:typeof t=="function"?t:$.constantCatch(t)})}var nd=p("ZodNaN",(e,t)=>{kc.init(e,t),C.init(e,t),e._zod.processJSONSchema=(i,o,r)=>Zu(e,i,o,r)});function kg(e){return mu(nd,e)}var nn=p("ZodPipe",(e,t)=>{si.init(e,t),C.init(e,t),e._zod.processJSONSchema=(i,o,r)=>ol(e,i,o,r),e.in=t.in,e.out=t.out});function ro(e,t){return new nn({type:"pipe",in:e,out:t})}var on=p("ZodCodec",(e,t)=>{nn.init(e,t),Nr.init(e,t)});function xg(e,t,i){return new on({type:"pipe",in:e,out:t,transform:i.decode,reverseTransform:i.encode})}function wg(e){let t=e._zod.def;return new on({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var id=p("ZodPreprocess",(e,t)=>{nn.init(e,t),xc.init(e,t)}),od=p("ZodReadonly",(e,t)=>{wc.init(e,t),C.init(e,t),e._zod.processJSONSchema=(i,o,r)=>al(e,i,o,r),e.unwrap=()=>e._zod.def.innerType});function ad(e){return new od({type:"readonly",innerType:e})}var sd=p("ZodTemplateLiteral",(e,t)=>{Ic.init(e,t),C.init(e,t),e._zod.processJSONSchema=(i,o,r)=>Lu(e,i,o,r)});function Ig(e,t){return new sd({type:"template_literal",parts:e,...$.normalizeParams(t)})}var cd=p("ZodLazy",(e,t)=>{Tr.init(e,t),C.init(e,t),e._zod.processJSONSchema=(i,o,r)=>cl(e,i,o,r),e.unwrap=()=>e._zod.def.getter()});function ud(e){return new cd({type:"lazy",getter:e})}var ld=p("ZodPromise",(e,t)=>{zc.init(e,t),C.init(e,t),e._zod.processJSONSchema=(i,o,r)=>sl(e,i,o,r),e.unwrap=()=>e._zod.def.innerType});function Sg(e){return new ld({type:"promise",innerType:e})}var dd=p("ZodFunction",(e,t)=>{Sc.init(e,t),C.init(e,t),e._zod.processJSONSchema=(i,o,r)=>Ju(e,i,o,r)});function zg(e){return new dd({type:"function",input:Array.isArray(e?.input)?Ll(e?.input):e?.input??Qr(vt()),output:e?.output??vt()})}var an=p("ZodCustom",(e,t)=>{jc.init(e,t),C.init(e,t),e._zod.processJSONSchema=(i,o,r)=>Vu(e,i,o,r)});function jg(e){let t=new W({check:"custom"});return t._zod.check=e,t}function Pg(e,t){return gu(an,e??(()=>!0),t)}function md(e,t={}){return vu(an,e,t)}function fd(e,t){return hu(e,t)}var Og=$u,Eg=yu,pd=p("ZodInstanceOf",(e,t)=>{an.init(e,t)},{properties(e,t){return this.check(Jt(e,t))}});function Ug(e,t={}){let i=new pd({type:"custom",check:"custom",fn:o=>o instanceof e,abort:!0,...$.normalizeParams(t)});return i._zod.bag.Class=e,i._zod.check=o=>{o.value instanceof e||o.issues.push({code:"invalid_type",expected:e.name,input:o.value,inst:i,path:[...i._zod.def.path??[]]})},i}var Dg=(...e)=>_u({Codec:on,Boolean:ir,String:rr},...e);function Ag(e){let t=ud(()=>ar([qr(e),wl(),Il(),Pl(),Qr(t),Fl(qr(),t)]));return t}function Ng(e,t){return new id({type:"pipe",in:Io(e),out:t})}var Zb={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function Lb(e){H({customError:e})}function Fb(){return H().customError}var gd;gd||(gd={});var sn={};Te(sn,{ZodISODate:()=>Qe,ZodISODateTime:()=>Ye,ZodISODuration:()=>tt,ZodISOTime:()=>et,date:()=>Vb,datetime:()=>Mb,duration:()=>Bb,time:()=>Jb});function Mb(e){return Vr(Ye,e)}function Vb(e){return Jr(Qe,e)}function Jb(e){return Br(et,e)}function Bb(e){return Kr(tt,e)}var j={...sr,...Qi,iso:sn},Kb=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function Wb(e,t){let i=e.$schema;return i==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":i==="http://json-schema.org/draft-07/schema#"?"draft-7":i==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function Tg(e,t){return e.map((i,o)=>o<t?i:i.optional())}function Gb(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function qb(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let i=e.slice(1).split("/").filter(Boolean);if(i.length===0)return t.rootSchema;let o=t.version==="draft-2020-12"?"$defs":"definitions";if(i[0]===o){let r=i[1]===void 0?void 0:Gb(i[1]);if(!r||!t.defs[r])throw new Error(`Reference not found: ${e}`);return t.defs[r]}throw new Error(`Reference not found: ${e}`)}function Xb(e,t){return j.transform(o=>o).check(o=>{let r=o.value;if(typeof r!="object"||r===null||Array.isArray(r))return;let n=Object.getOwnPropertyNames(r);if(t.minProperties!==void 0&&n.length<t.minProperties&&o.issues.push({origin:"object",code:"too_small",minimum:t.minProperties,inclusive:!0,message:`Too small: expected object to have >=${t.minProperties} properties`,input:r,inst:e,continue:!0}),t.maxProperties!==void 0&&n.length>t.maxProperties&&o.issues.push({origin:"object",code:"too_big",maximum:t.maxProperties,inclusive:!0,message:`Too big: expected object to have <=${t.maxProperties} properties`,input:r,inst:e,continue:!0}),t.keySchema)for(let a of n){let s=t.keySchema.safeParse(a);s.success||o.issues.push({code:"invalid_key",origin:"record",issues:s.error.issues,input:a,path:[a],continue:!0})}}).pipe(e)}function vd(e,t){if(e===null)return"z";let i=typeof e;if(i!=="object"){if(i==="number"&&Number.isNaN(e))return null;let o=String(e);return`${i[0]}${o.length}:${o}`}if(t.has(e))return null;t.add(e);try{if(Array.isArray(e)){let n=[];for(let a of e){let s=vd(a,t);if(s===null)return null;n.push(s)}return`a${n.length}:[${n.join(",")}]`}let o=Object.keys(e).sort(),r=[];for(let n of o){let a=vd(e[n],t);if(a===null)return null;r.push(`${n.length}:${n}=${a}`)}return`o${r.length}:{${r.join(",")}}`}finally{t.delete(e)}}var Hb=new Set(["items","prefixItems","additionalItems","additionalProperties","contains","propertyNames","not","if","then","else","allOf","anyOf","oneOf","unevaluatedItems","unevaluatedProperties","contentSchema"]),Yb=new Set(["properties","patternProperties","dependentSchemas","dependencies","$defs","definitions"]);function cn(e){return typeof e!="object"||e===null?!1:Array.isArray(e)?e.some(cn):typeof e.$ref=="string"?!0:Object.entries(e).some(([t,i])=>Hb.has(t)?cn(i):!Yb.has(t)||typeof i!="object"||i===null?!1:Object.values(i).some(cn))}function Cg(e){return e===1?"element":"elements"}function Qb(e,t){return j.transform(o=>o).check(o=>{let r=o.value;if(Array.isArray(r)){if(t.uniqueItems===!0){let n=new Map;for(let a=0;a<r.length;a++){let s=vd(r[a],new Set);if(s===null)continue;let u=n.get(s);if(u===void 0){n.set(s,a);continue}o.issues.push({code:"custom",message:`Array items must be unique: element at index ${a} duplicates the one at index ${u}`,input:r,path:[a],continue:!0})}}if(t.containsSchema){let n=t.minContains??1,a=t.maxContains!==void 0?t.maxContains+1:Number.POSITIVE_INFINITY,s=0;for(let u of r)if(t.containsSchema.safeParse(u).success&&++s>=a)break;s<n&&o.issues.push({code:"custom",message:`Array must contain at least ${n} matching ${Cg(n)}; found ${s}`,input:r,continue:!0}),t.maxContains!==void 0&&s>t.maxContains&&o.issues.push({code:"custom",message:`Array must contain at most ${t.maxContains} matching ${Cg(t.maxContains)}`,input:r,continue:!0})}}}).pipe(e)}function Rg(e,t){if(e!==!1)return e===void 0||e===!0?j.any():pe(e,t)}var ek=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/;function Zg(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return j.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let r=e.$ref;if(t.refs.has(r))return t.refs.get(r);if(t.processing.has(r))return j.lazy(()=>{if(!t.refs.has(r))throw new Error(`Circular reference not resolved: ${r}`);return t.refs.get(r)});t.processing.add(r);let n=qb(r,t),a=pe(n,t);return t.refs.set(r,a),t.processing.delete(r),a}if(e.enum!==void 0){let r=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&r.length===1&&r[0]===null)return j.null();if(r.length===0)return j.never();if(r.length===1)return j.literal(r[0]);if(r.every(a=>typeof a=="string"))return j.enum(r);let n=r.map(a=>j.literal(a));return n.length<2?n[0]:j.union([n[0],n[1],...n.slice(2)])}if(e.const!==void 0)return j.literal(e.const);let i=e.type;if(Array.isArray(i)){let r=i.map(n=>{let a={...e,type:n};return Zg(a,t)});return r.length===0?j.never():r.length===1?r[0]:j.union(r)}if(!i)return j.any();let o;switch(i){case"string":{let r=j.string();if(e.format){let n=e.format;n==="email"?r=r.check(j.email()):n==="uri"||n==="uri-reference"?r=r.check(j.url()):n==="uuid"||n==="guid"?r=r.check(j.uuid()):n==="date-time"?r=r.check(j.iso.datetime({offset:!0})):n==="date"?r=r.check(j.iso.date()):n==="time"?r=r.check(j.regex(ek)):n==="duration"?r=r.check(j.iso.duration()):n==="hostname"?r=r.check(j.hostname()):n==="ipv4"?r=r.check(j.ipv4()):n==="ipv6"?r=r.check(j.ipv6()):n==="mac"?r=r.check(j.mac()):n==="cidr"?r=r.check(j.cidrv4()):n==="cidr-v6"?r=r.check(j.cidrv6()):n==="base64"?r=r.check(j.base64()):n==="base64url"?r=r.check(j.base64url()):n==="e164"?r=r.check(j.e164()):n==="credit_card"?r=r.check(j.creditCard()):n==="iban"?r=r.check(j.iban()):n==="jwt"?r=r.check(j.jwt()):n==="emoji"?r=r.check(j.emoji()):n==="nanoid"?r=r.check(j.nanoid()):n==="cuid"?r=r.check(j.cuid()):n==="cuid2"?r=r.check(j.cuid2()):n==="ulid"?r=r.check(j.ulid()):n==="xid"?r=r.check(j.xid()):n==="ksuid"&&(r=r.check(j.ksuid()))}typeof e.minLength=="number"&&(r=r.min(e.minLength)),typeof e.maxLength=="number"&&(r=r.max(e.maxLength)),e.pattern&&(r=r.regex(new RegExp(e.pattern))),o=r;break}case"number":case"integer":{let r=i==="integer"?j.number().int():j.number();typeof e.minimum=="number"&&e.exclusiveMinimum!==!0&&(r=r.min(e.minimum)),typeof e.maximum=="number"&&e.exclusiveMaximum!==!0&&(r=r.max(e.maximum)),typeof e.exclusiveMinimum=="number"?r=r.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(r=r.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?r=r.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(r=r.lt(e.maximum)),typeof e.multipleOf=="number"&&(r=r.multipleOf(e.multipleOf)),o=r;break}case"boolean":{o=j.boolean();break}case"null":{o=j.null();break}case"object":{let r={},n=e.properties||{},a=new Set(e.required||[]),s=typeof e.additionalProperties=="object"?pe(e.additionalProperties,t):void 0;for(let[d,m]of Object.entries(n)){let f=pe(m,t);ae(r,d,a.has(d)?f:f.optional())}if(e.patternProperties){let d=e.patternProperties,m=Object.keys(d),f=[];for(let h of m){let b=pe(d[h],t),E=j.string().regex(new RegExp(h));f.push(j.looseRecord(E,b))}let v=[];if(Object.keys(r).length>0&&v.push(j.object(r).passthrough()),v.push(...f),v.length===0)o=j.object({}).passthrough();else if(v.length===1)o=v[0];else{let h=j.intersection(v[0],v[1]);for(let b=2;b<v.length;b++)h=j.intersection(h,v[b]);o=h}if(e.additionalProperties===!1){let h=Object.keys(r),b=m.map(z=>new RegExp(z)),E=o;o=o.check(z=>{if(!we(z.value))return;let I=[];for(let D of Object.keys(z.value))h.includes(D)||b.some(B=>B.test(D))||I.push(D);I.length&&z.issues.push({code:"unrecognized_keys",keys:I,input:z.value,inst:E})})}}else{let d=j.object(r);e.additionalProperties===!1?o=d.strict():s?o=d.catchall(s):o=d.passthrough()}let u=e.propertyNames!==void 0&&e.propertyNames!==!0,c=typeof e.minProperties=="number"?e.minProperties:void 0,l=typeof e.maxProperties=="number"?e.maxProperties:void 0;if(u||c!==void 0||l!==void 0){let d;if(u){let m=typeof e.propertyNames=="object"&&e.propertyNames.type===void 0?{type:"string",...e.propertyNames}:e.propertyNames;d=pe(m,t)}o=Xb(o,{keySchema:d,minProperties:c,maxProperties:l})}break}case"array":{let r=e.prefixItems,n=e.items;if(r&&Array.isArray(r)){let a=typeof e.minItems=="number"?e.minItems:0,s=r.map(d=>pe(d,t)),u=Tg(s,a),c=Array.isArray(n)?void 0:Rg(n,t),l=j.tuple(u);o=c?l.rest(c):l,typeof e.minItems=="number"&&(o=o.check(j.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(j.maxLength(e.maxItems)))}else if(Array.isArray(n)){let a=typeof e.minItems=="number"?e.minItems:0,s=n.map(d=>pe(d,t)),u=Tg(s,a),c=Rg(e.additionalItems,t),l=j.tuple(u);o=c?l.rest(c):l,typeof e.minItems=="number"&&(o=o.check(j.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(j.maxLength(e.maxItems)))}else if(n!==void 0){let a=pe(n,t),s=j.array(a);typeof e.minItems=="number"&&(s=s.min(e.minItems)),typeof e.maxItems=="number"&&(s=s.max(e.maxItems)),o=s}else o=j.array(j.any());(e.uniqueItems===!0||e.contains!==void 0)&&(o=Qb(o,{uniqueItems:e.uniqueItems===!0,containsSchema:e.contains!==void 0?pe(e.contains,t):void 0,minContains:typeof e.minContains=="number"?e.minContains:void 0,maxContains:typeof e.maxContains=="number"?e.maxContains:void 0}));break}default:throw new Error(`Unsupported type: ${i}`)}return o}function pe(e,t){if(typeof e=="boolean")return e?j.any():j.never();let i=Zg(e,t),o=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let s=e.anyOf.map(c=>pe(c,t)),u=j.union(s);i=o?j.intersection(i,u):u}if(e.oneOf&&Array.isArray(e.oneOf)){let s=e.oneOf.map(c=>pe(c,t)),u=j.xor(s);i=o?j.intersection(i,u):u}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)i=o?i:j.any();else{let s=o?i:pe(e.allOf[0],t),u=o?0:1;for(let c=u;c<e.allOf.length;c++)s=j.intersection(s,pe(e.allOf[c],t));i=s}e.nullable===!0&&t.version==="openapi-3.0"&&(i=j.nullable(i)),e.readOnly===!0&&(i=j.readonly(i)),e.default!==void 0&&(i=i.default(e.default));let r={},n=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let s of n)s in e&&(r[s]=e[s]);let a=["contentEncoding","contentMediaType","contentSchema"];for(let s of a)s in e&&(r[s]=e[s]);if(e.type==="object"&&e.$ref===void 0){e.propertyNames!==void 0&&!cn(e.propertyNames)&&(r.propertyNames=e.propertyNames);for(let s of["minProperties","maxProperties"])e[s]!==void 0&&(r[s]=e[s])}if(e.type==="array"&&e.$ref===void 0){e.contains!==void 0&&!cn(e.contains)&&(r.contains=e.contains);for(let s of["uniqueItems","minContains","maxContains"])e[s]!==void 0&&(r[s]=e[s])}for(let s of Object.keys(e))Kb.has(s)||ae(r,s,e[s]);return Object.keys(r).length>0&&t.registry.add(i,r),e.description&&(i=i.describe(e.description)),i}function Lg(e,t){if(typeof e=="boolean")return e?j.any():j.never();let i;try{i=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let o=Wb(i,t?.defaultTarget),r=i.$defs||i.definitions||{},n={version:o,defs:r,refs:new Map,processing:new Set,rootSchema:i,registry:t?.registry??se};return pe(i,n)}var Fg=Symbol("z.visit/resolving");function un(e,t){let i=typeof t=="function"?t:(a,s)=>{let u=t[a._zod.def.type];return u?u(a,s):a},o=new Map;function r(a){let s=o.get(a);if(s===Fg)return new Tr({type:"lazy",getter:()=>o.get(a)});if(s!==void 0)return s;o.set(a,Fg);let u=n(a),c=i(u,u!==a);return o.set(a,c),c}function n(a){let s=a._zod.def,u=s.type;switch(u){case"object":{let c=s.shape,l=Object.keys(c),d=!1,m={};for(let v of l){let h=r(c[v]);h!==c[v]&&(d=!0),m[v]=h}let f=s.catchall;return s.catchall&&(f=r(s.catchall),f!==s.catchall&&(d=!0)),d?M(a,{...s,shape:m,catchall:f}):a}case"array":{let c=r(s.element);return c===s.element?a:M(a,{...s,element:c})}case"tuple":{let c=s.items,l=!1,d=[];for(let f of c){let v=r(f);v!==f&&(l=!0),d.push(v)}let m=s.rest;return s.rest&&(m=r(s.rest),m!==s.rest&&(l=!0)),l?M(a,{...s,items:d,rest:m}):a}case"record":case"map":{let c=r(s.keyType),l=r(s.valueType);return c===s.keyType&&l===s.valueType?a:M(a,{...s,keyType:c,valueType:l})}case"set":{let c=r(s.valueType);return c===s.valueType?a:M(a,{...s,valueType:c})}case"union":{let c=s.options,l=!1,d=[];for(let m of c){let f=r(m);f!==m&&(l=!0),d.push(f)}return l?M(a,{...s,options:d}):a}case"intersection":{let c=r(s.left),l=r(s.right);return c===s.left&&l===s.right?a:M(a,{...s,left:c,right:l})}case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":{let c=r(s.innerType);return c===s.innerType?a:M(a,{...s,innerType:c})}case"pipe":{let c=r(s.in),l=r(s.out);return c===s.in&&l===s.out?a:M(a,{...s,in:c,out:l})}case"function":{let c=r(s.input),l=r(s.output);return c===s.input&&l===s.output?a:M(a,{...s,input:c,output:l})}case"lazy":{let c=s.getter,{_cachedInner:l,...d}=s;return M(a,{...d,getter:()=>r(c())})}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":return a;default:return a}}return r(e)}function Mg(e){return un(e,{object:t=>t.partial(),union:t=>{let i=t._zod.def;return i.discriminator===void 0?t:ar(i.options)}})}function tk(e,t){if(!t?.length)return e;let i=e._zod.def;return M(e,je(i,{checks:[...i.checks??[],...t]}),{parent:!0})}function Vg(e){return tk(e.out,e.checks)}function rk(e){return e.in._zod.traits.has("$ZodTransform")?Vg(e):e.in}function Jg(e){return un(e,{pipe:t=>rk(t._zod.def),default:(t,i)=>i?ht(t._zod.def.innerType):t,catch:(t,i)=>i?t._zod.def.innerType:t})}function Bg(e){return un(e,{pipe:t=>Vg(t._zod.def),prefault:(t,i)=>i?t._zod.def.innerType:t})}var hd={};Te(hd,{bigint:()=>ak,boolean:()=>ok,date:()=>sk,number:()=>ik,string:()=>nk});function nk(e){return Zc(rr,e)}function ik(e){return Bc(nr,e)}function ok(e){return Yc(ir,e)}function ak(e){return eu(or,e)}function sk(e){return du(Yr,e)}var fk="cueframe/components";var pk="cueframe.json",gk=ln.object({componentsDir:ln.string().min(1).default(fk)}).passthrough();function dn(e){let t=e,i=mk(t).root;for(;;){let o=cr(t,pk);if(jo(o)){let r=ck(o,"utf8"),n=gk.parse(JSON.parse(r));return{root:t,manifest:n}}if(t===i)return null;t=dk(t)}}function Kg(e){return cr(e.root,e.manifest.componentsDir)}function Po(e,t){return cr(Kg(e),t)}function Wg(e){let t=Kg(e);return jo(t)?uk(t).filter(i=>{let o=cr(t,i);return lk(o).isDirectory()?jo(cr(o,"index.tsx"))&&jo(cr(o,"config.ts")):!1}).sort():[]}import{existsSync as vk,readFileSync as hk}from"fs";import{join as $k}from"path";var Gg=Object.freeze({version:2,assets:Object.freeze({}),graphics:Object.freeze({api:"canvas2d",required:!0,accelerationPreference:"software-allowed"}),alphaPolicy:"requires-transparency"});var qg=Gg;function Xg(e,t){let i=$k(e.root,"cueframe.json");if(!vk(i))throw Object.assign(new Error("No cueframe.json workspace manifest was found."),{code:"no_component_manifest"});let r=JSON.parse(hk(i,"utf8")).components?.[t]?.manifest;if(r==null)throw Object.assign(new Error(`Component "${t}" has no contract-v2 manifest at cueframe.json components.${t}.manifest.`),{code:"no_component_manifest"});return r}var xk="cueframe.json";function wk(e){return e.split(/[^a-zA-Z0-9]+/).filter(Boolean).map(i=>i.charAt(0).toUpperCase()+i.slice(1)).join("")}function Ik(e){return e.split(/[^a-zA-Z0-9]+/).filter(Boolean).map(i=>i.charAt(0).toUpperCase()+i.slice(1)).join(" ")}function $d(e,t){P(e,"new_component",new Error(t),x.UserError),k(x.UserError)}function Sk(e,t){return`import React from 'react';
|
|
25
79
|
|
|
26
80
|
/** Custom CueFrame component. Mounted through component contract v2. Edit me. */
|
|
27
|
-
export default function ${
|
|
28
|
-
return <div style={{ width: '100%', height: '100%', display: 'grid', placeItems: 'center' }}>{String((params as { text?: unknown }).text ?? '${
|
|
81
|
+
export default function ${t}({ params }: { durationInFrames: number; params: Record<string, unknown>; assets: Record<string, unknown>; render: { frame: number; fps: number; width: number; height: number; seed: string; colorSpace: 'srgb' } }) {
|
|
82
|
+
return <div style={{ width: '100%', height: '100%', display: 'grid', placeItems: 'center' }}>{String((params as { text?: unknown }).text ?? '${e}')}</div>;
|
|
29
83
|
}
|
|
30
|
-
`}function
|
|
84
|
+
`}function zk(e,t){return`import { z } from 'zod';
|
|
31
85
|
import component from './index';
|
|
32
86
|
|
|
33
87
|
const paramsSchema = z.object({}).passthrough();
|
|
34
88
|
|
|
35
89
|
export const config = {
|
|
36
|
-
id: '${
|
|
90
|
+
id: '${e}',
|
|
37
91
|
component,
|
|
38
|
-
name: '${
|
|
92
|
+
name: '${t}',
|
|
39
93
|
category: 'ui-blocks',
|
|
40
94
|
kind: 'component',
|
|
41
95
|
version: '0.1.0',
|
|
42
96
|
paramsSchema,
|
|
43
97
|
};
|
|
44
98
|
export default config;
|
|
45
|
-
`}function
|
|
46
|
-
`)}
|
|
47
|
-
${
|
|
48
|
-
`),console.log(" Shown ONCE \u2014 store it now (paste it into your integration; not saved here).")})}catch(
|
|
49
|
-
Media item ID: ${
|
|
50
|
-
Media item ID: ${
|
|
51
|
-
Run \`cueframe analyze ${
|
|
52
|
-
`),
|
|
53
|
-
`))}function
|
|
54
|
-
${
|
|
55
|
-
${
|
|
56
|
-
Re-fetch via GET /v1/projects/${
|
|
57
|
-
MP4 URL (1-hour TTL): ${
|
|
58
|
-
Render ID: ${
|
|
59
|
-
Project ID: ${
|
|
60
|
-
Re-fetch via GET /v1/projects/${
|
|
61
|
-
Recipe ready in project ${a.id}.`),m&&console.log(`Output: ${m.outputPath}`)}),x}import{readFile as hf,writeFile as cde,rename as pde,unlink as dde}from"fs/promises";import{randomUUID as lde}from"crypto";import{resolve as ff}from"path";function ng(o){return o instanceof Uint8Array||ArrayBuffer.isView(o)&&o.constructor.name==="Uint8Array"}function Oo(o,...e){if(!ng(o))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(o.length))throw new Error("Uint8Array expected of length "+e+", got length="+o.length)}function bn(o,e=!0){if(o.destroyed)throw new Error("Hash instance has been destroyed");if(e&&o.finished)throw new Error("Hash#digest() has already been called")}function vd(o,e){Oo(o);let t=e.outputLen;if(o.length<t)throw new Error("digestInto() expects output buffer of length at least "+t)}function Mo(...o){for(let e=0;e<o.length;e++)o[e].fill(0)}function Vr(o){return new DataView(o.buffer,o.byteOffset,o.byteLength)}function Ze(o,e){return o<<32-e|o>>>e}var ig=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",ag=Array.from({length:256},(o,e)=>e.toString(16).padStart(2,"0"));function Fd(o){if(Oo(o),ig)return o.toHex();let e="";for(let t=0;t<o.length;t++)e+=ag[o[t]];return e}function cg(o){if(typeof o!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(o))}function yn(o){return typeof o=="string"&&(o=cg(o)),Oo(o),o}var jr=class{};function Nd(o){let e=r=>o().update(yn(r)).digest(),t=o();return e.outputLen=t.outputLen,e.blockLen=t.blockLen,e.create=()=>o(),e}function pg(o,e,t,r){if(typeof o.setBigUint64=="function")return o.setBigUint64(e,t,r);let s=BigInt(32),a=BigInt(4294967295),p=Number(t>>s&a),u=Number(t&a),f=r?4:0,m=r?0:4;o.setUint32(e+f,p,r),o.setUint32(e+m,u,r)}function _d(o,e,t){return o&e^~o&t}function Bd(o,e,t){return o&e^o&t^e&t}var Ur=class extends jr{constructor(e,t,r,s){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=s,this.buffer=new Uint8Array(e),this.view=Vr(this.buffer)}update(e){bn(this),e=yn(e),Oo(e);let{view:t,buffer:r,blockLen:s}=this,a=e.length;for(let p=0;p<a;){let u=Math.min(s-this.pos,a-p);if(u===s){let f=Vr(e);for(;s<=a-p;p+=s)this.process(f,p);continue}r.set(e.subarray(p,p+u),this.pos),this.pos+=u,p+=u,this.pos===s&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){bn(this),vd(e,this),this.finished=!0;let{buffer:t,view:r,blockLen:s,isLE:a}=this,{pos:p}=this;t[p++]=128,Mo(this.buffer.subarray(p)),this.padOffset>s-p&&(this.process(r,0),p=0);for(let g=p;g<s;g++)t[g]=0;pg(r,s-8,BigInt(this.length*8),a),this.process(r,0);let u=Vr(e),f=this.outputLen;if(f%4)throw new Error("_sha2: outputLen should be aligned to 32bit");let m=f/4,x=this.get();if(m>x.length)throw new Error("_sha2: outputLen bigger than state");for(let g=0;g<m;g++)u.setUint32(4*g,x[g],a)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());let{blockLen:t,buffer:r,length:s,finished:a,destroyed:p,pos:u}=this;return e.destroyed=p,e.finished=a,e.length=s,e.pos=u,s%t&&e.buffer.set(r),e}clone(){return this._cloneInto()}},St=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]);var dg=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Mt=new Uint32Array(64),Hr=class extends Ur{constructor(e=32){super(64,e,8,!1),this.A=St[0]|0,this.B=St[1]|0,this.C=St[2]|0,this.D=St[3]|0,this.E=St[4]|0,this.F=St[5]|0,this.G=St[6]|0,this.H=St[7]|0}get(){let{A:e,B:t,C:r,D:s,E:a,F:p,G:u,H:f}=this;return[e,t,r,s,a,p,u,f]}set(e,t,r,s,a,p,u,f){this.A=e|0,this.B=t|0,this.C=r|0,this.D=s|0,this.E=a|0,this.F=p|0,this.G=u|0,this.H=f|0}process(e,t){for(let g=0;g<16;g++,t+=4)Mt[g]=e.getUint32(t,!1);for(let g=16;g<64;g++){let z=Mt[g-15],w=Mt[g-2],k=Ze(z,7)^Ze(z,18)^z>>>3,F=Ze(w,17)^Ze(w,19)^w>>>10;Mt[g]=F+Mt[g-7]+k+Mt[g-16]|0}let{A:r,B:s,C:a,D:p,E:u,F:f,G:m,H:x}=this;for(let g=0;g<64;g++){let z=Ze(u,6)^Ze(u,11)^Ze(u,25),w=x+z+_d(u,f,m)+dg[g]+Mt[g]|0,F=(Ze(r,2)^Ze(r,13)^Ze(r,22))+Bd(r,s,a)|0;x=m,m=f,f=u,u=p+w|0,p=a,a=s,s=r,r=w+F|0}r=r+this.A|0,s=s+this.B|0,a=a+this.C|0,p=p+this.D|0,u=u+this.E|0,f=f+this.F|0,m=m+this.G|0,x=x+this.H|0,this.set(r,s,a,p,u,f,m,x)}roundClean(){Mo(Mt)}destroy(){this.set(0,0,0,0,0,0,0,0),Mo(this.buffer)}};var jd=Nd(()=>new Hr);var Vd=jd;var Ud=["Inter","Space Mono","Montserrat","Roboto","Poppins","Oswald","Playfair Display","Bebas Neue","Instrument Serif","National Park","Bricolage Grotesque","Schibsted Grotesk"],Hd=["Georgia"],Wd=Object.freeze({Inter:{slug:"inter",faces:[{weight:"100 900",file:"400"}],captionDefaults:{base:600,emphasis:800}},Montserrat:{slug:"montserrat",faces:[{weight:"100 900",file:"400"}],captionDefaults:{base:600,emphasis:800}},Roboto:{slug:"roboto",faces:[{weight:"100 900",file:"400"}],captionDefaults:{base:600,emphasis:800}},Oswald:{slug:"oswald",faces:[{weight:"400 700",file:"400"}],captionDefaults:{base:600,emphasis:700}},"Playfair Display":{slug:"playfair-display",faces:[{weight:"400 900",file:"400"},{weight:"400 900",file:"400-italic",style:"italic"}],captionDefaults:{base:600,emphasis:800}},"Bricolage Grotesque":{slug:"bricolage-grotesque",faces:[{weight:"200 800",file:"400"}],captionDefaults:{base:600,emphasis:800}},"Schibsted Grotesk":{slug:"schibsted-grotesk",faces:[{weight:"400 900",file:"400"}],captionDefaults:{base:600,emphasis:800}},"Space Mono":{slug:"space-mono",faces:[{weight:"400",file:"400"},{weight:"700",file:"700"}],captionDefaults:{base:400,emphasis:700}},Poppins:{slug:"poppins",faces:[{weight:"400",file:"400"},{weight:"700",file:"700"}],captionDefaults:{base:400,emphasis:700}},"Bebas Neue":{slug:"bebas-neue",faces:[{weight:"400",file:"400"}],captionDefaults:{base:400,emphasis:400}},"Instrument Serif":{slug:"instrument-serif",faces:[{weight:"400",file:"400"},{weight:"400",file:"400-italic",style:"italic"}],captionDefaults:{base:400,emphasis:400}},"National Park":{slug:"national-park",faces:[{weight:"400",file:"400"}],captionDefaults:{base:400,emphasis:400}},Georgia:{slug:"gelasio",faces:[{weight:"400",file:"400"},{weight:"700",file:"700"}],captionDefaults:{base:400,emphasis:700}}}),An="normal";function ko(o){return Wd[o]}function lg(o,e){let t=o.weight.split(/\s+/).map(Number);if(t.some(a=>!Number.isFinite(a)))return!1;if(t.length===1)return t[0]===e;let[r,s]=t;return e>=r&&e<=s}function $d(o,e,t){let r=ko(o);return r?r.faces.some(s=>(s.style??An)===t&&lg(s,e)):!1}function Gd(o){let e=ko(o);return e?[...new Set(e.faces.map(t=>t.weight.split(/\s+/).join("-")))].join(", "):""}function Kd(o){return o.split(",").map(e=>e.trim().replace(/^['"]|['"]$/g,"").trim()).filter(Boolean)}var ug=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","emoji","math","fangsong"]);var mg=new Map(Object.keys(Wd).map(o=>[o.toLowerCase(),o]));function qd(o){if(typeof o!="string"||o.trim().length===0)return{kind:"default"};if(o.includes("$brand:")||o.includes("${"))return{kind:"unknown"};let e;for(let t of Kd(o)){let r=t.toLowerCase();if(ug.has(r))continue;let s=mg.get(r);if(!s)return{kind:"unknown"};e??=s}return e?{kind:"bundled",family:e}:{kind:"default"}}var Wr=Object.freeze({fontFamily:"Inter, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:600,emphasisFontWeight:800,emphasisFontStyle:"normal"}),hg="Inter";function Yd(o){return typeof o!="string"||o.trim().length===0?{kind:"bundled",family:hg}:qd(o)}function Qd(o){return(o.kind==="bundled"?ko(o.family):void 0)?.captionDefaults??{base:Wr.fontWeight,emphasis:Wr.emphasisFontWeight}}function fg(o){let e=o.fontFamily??Wr.fontFamily,t=Yd(o.fontFamily),r=o.fontWeight??Qd(t).base,s=o.emphasisFontFamily,a=s??e,p=s===void 0?t:Yd(s),u=o.emphasisFontWeight??Qd(p).emphasis,f=o.emphasisFontStyle??Wr.emphasisFontStyle;return{base:{role:"base",field:"fontWeight",stack:e,resolved:t,weight:r,style:An,fromDefault:o.fontWeight===void 0},emphasis:{role:"emphasis",field:f==="italic"?"emphasisFontStyle":"emphasisFontWeight",stack:a,resolved:p,weight:u,style:f,fromDefault:f==="italic"?o.emphasisFontStyle===void 0:o.emphasisFontWeight===void 0}}}function xg(o){let{base:e,emphasis:t}=fg(o);return t.stack===e.stack&&t.weight===e.weight&&t.style===e.style?[e]:[e,t]}var ume=Object.freeze(["fontWeight","emphasisFontWeight","emphasisFontStyle"]);function Jd(o){return o.fromDefault?`no ${o.field} is authored, so the ${o.role} run is drawn at the default ${o.style==="italic"?`${o.field} "italic"`:o.weight}`:`${o.field} ${o.style==="italic"?'"italic"':o.weight} has no file behind it`}function gg(o){if(o.resolved.kind==="default"&&o.style==="italic")return{field:o.field,face:{family:o.stack,weight:o.weight,style:o.style},message:`font_not_reproducible \u2014 ${Jd(o)}: "${o.stack}" names no font file the render bundle carries, so this stack ships no italic binary to select and the browser would slant whatever upright face it matched and the render refuses it before capture. Emphasise with emphasisFontWeight, emphasisColor or emphasisScale, or name an uploaded brand font that is sealed in italic.`};if(o.resolved.kind!=="bundled")return null;let e={family:o.resolved.family,weight:o.weight,style:o.style};if(o.style==="italic"&&!ko(o.resolved.family).faces.some(r=>r.style==="italic"))return{field:o.field,face:e,message:`font_not_reproducible \u2014 ${Jd(o)}: ${o.resolved.family} ships no italic binary, so the browser would slant the upright face and the render refuses it before capture. Emphasise with emphasisFontWeight, emphasisColor or emphasisScale, or name an uploaded brand font that is sealed in italic.`};if($d(o.resolved.family,o.weight,o.style))return null;let t=o.role==="emphasis"?"emphasisFontWeight":"fontWeight";return{field:t,face:e,message:`font_not_reproducible \u2014 ${t} ${o.weight} (${o.style}) has no file behind it: ${o.resolved.family} ships ${Gd(o.resolved.family)}. The render refuses a weight outside that range before capture rather than let the browser substitute a nearby file, so set ${t} to a weight the family covers, or pick a family whose files do.`}}function $r(o){let e=[];for(let t of xg(o)){let r=gg(t);r&&e.push(r)}return e}var mme=Object.freeze(["fontFamily","fontWeight","emphasisFontFamily","emphasisFontWeight","emphasisFontStyle"]);function bg(o){return o.caption?{ref:o.caption,slot:"caption"}:o.body?{ref:o.body,slot:"body"}:{ref:o.heading,slot:"heading"}}function yg(o){let e=o.captionProfile?.fontFamily;if(e!==void 0)return{family:e,path:"captionProfile.fontFamily"};let{ref:t,slot:r}=bg(o.fonts);return{family:t?.family,path:`fonts.${r}`}}function Zd(o){let e=yg(o),t=o.captionProfile??{},r={...t,...e.family!==void 0?{fontFamily:e.family}:{fontFamily:void 0}};return $r(r).map(s=>({...s,path:t[s.field]!==void 0?`captionProfile.${s.field}`:e.path}))}var hme=Object.freeze([400,500,600,700,800,900]);var gme=new Set([...Ud,...Hd].map(o=>o.toLowerCase()));var Ue=d.string();var Xd=d.discriminatedUnion("mode",[d.object({mode:d.literal("frame-center")}),d.object({mode:d.literal("point"),x:d.number().min(0).max(1),y:d.number().min(0).max(1)}),d.object({mode:d.literal("face"),faceId:d.string().min(1),shotScale:d.enum(["close","standard","wide"]).optional()}),d.object({mode:d.literal("all-faces")}),d.object({mode:d.literal("active-speaker")})]),el=d.object({startSec:d.number().nonnegative().describe("Segment START in seconds, clip-relative. Segments tile the clip's duration in order."),endSec:d.number().positive().describe("Segment END in seconds, clip-relative. The span (endSec \u2212 startSec) is this segment's duration \u2014 the window `ease` ramps over."),focus:Xd.describe("WHO/WHAT the camera tracks this segment (the reframe center), selected by `mode`: `frame-center` = no tracking, hold the geometric center (static/graphic footage, or a pure zoom); `point` = lock to a fixed source-normalized {x,y} (a non-moving on-screen element); `face` = track a detected face by `faceId` (from get_media_context), with optional `shotScale` close|standard|wide for tightness; `all-faces` = frame the bounding box of every detected face (group/ensemble shots); `active-speaker` = follow whoever is speaking (diarized talking-head / podcast). Pick by what the beat is about; pair with `zoom` for how tight."),intent:d.string().optional().describe("Optional editorial LABEL for diff/log readability (e.g. 'speaker-tight', 'wide-context'). Cosmetic \u2014 NOT honored by the derive math and excluded from the variant cache key."),zoom:d.number().min(.1).max(1).optional().describe("How TIGHT the framing is \u2014 the fraction of the source the output viewport shows. <1 punches IN (a smaller source fraction, magnified to fill the frame); 1 = the full frame (no crop). ~0.6\u20130.8 is a moderate push-in, ~0.5 a tight close-up, 0.1 the maximum zoom. There is NO zoom-OUT past the full frame (max 1). Omit for the full frame. MUTUALLY EXCLUSIVE with `focus.shotScale`: a face-tracked shot is sized EITHER by the editorial scale (shotScale, calibrated to the detected face) OR by an explicit zoom \u2014 never both."),ease:d.object({in:d.number().nonnegative().describe("Ease-IN ramp DURATION in seconds at the segment START."),out:d.number().nonnegative().describe("Ease-OUT ramp DURATION in seconds at the segment END.")}).optional().describe("Zoom/center ramp DURATIONS in SECONDS at this segment's edges \u2014 NOT a unitless 0\u20131 curve. ~0.3\u20130.6s reads as a snappy push; >1s reads sluggish. Keep `in` + `out` \u2264 the segment's duration (endSec \u2212 startSec): the two edges share the span, so to ramp across the WHOLE segment set one edge to the full duration and the other to 0. Omit for an instant cut to this framing."),bias:d.object({x:d.number().min(-.3).max(.3).describe("Horizontal nudge, source-normalized (+ = right)."),y:d.number().min(-.3).max(.3).describe("Vertical nudge, source-normalized (+ = down).")}).optional().describe("Optional FINE framing nudge off the focus center, source-normalized in [\u22120.3, 0.3]. A small correction (headroom, rule-of-thirds), NOT a reframe \u2014 use `focus`/`zoom` for the actual shot. Omit (treated as 0) to sit dead-center on the focus.")}),tl=el.refine(o=>!(o.focus.mode==="face"&&o.focus.shotScale!==void 0&&o.zoom!==void 0),{message:"a face segment takes EITHER focus.shotScale (editorial scale, calibrated to the detected face) OR an explicit zoom \u2014 never both; shotScale wins at bake time and the zoom would be silently discarded",path:["zoom"]}),Sn=d.object({segments:d.array(tl).min(1)});function Fe(o){return o>=48&&o<=57}function lt(o){return Fe(o)||o>=65&&o<=70||o>=97&&o<=102}function Kr(o){return o>=65&&o<=90}function Ag(o){return o>=97&&o<=122}function Sg(o){return Kr(o)||Ag(o)}function zg(o){return o>=128}function Gr(o){return Sg(o)||zg(o)||o===95}function qr(o){return Gr(o)||Fe(o)||o===45}function Tg(o){return o>=0&&o<=8||o===11||o>=14&&o<=31||o===127}function Po(o){return o===10||o===13||o===12}function ut(o){return Po(o)||o===32||o===9}function He(o,e){return!(o!==92||Po(e)||e===0)}function Yr(o,e,t){return o===45?Gr(e)||e===45||He(e,t):Gr(o)?!0:o===92?He(o,e):!1}function Qr(o,e,t){return o===43||o===45?Fe(e)?2:e===46&&Fe(t)?3:0:o===46?Fe(e)?2:0:Fe(o)?1:0}function Jr(o){return o===65279||o===65534?1:0}var zn=new Array(128),Eg=128,Lo=130,Tn=131,Zr=132,En=133;for(let o=0;o<zn.length;o++)zn[o]=ut(o)&&Lo||Fe(o)&&Tn||Gr(o)&&Zr||Tg(o)&&En||o||Eg;function Xr(o){return o<128?zn[o]:Zr}function eo(o,e){return e<o.length?o.charCodeAt(e):0}function es(o,e,t){return t===13&&eo(o,e+1)===10?2:1}function In(o,e,t){let r=o.charCodeAt(e);return Kr(r)&&(r=r|32),r===t}function Nt(o,e,t,r){if(t-e!==r.length||e<0||t>o.length)return!1;for(let s=e;s<t;s++){let a=r.charCodeAt(s-e),p=o.charCodeAt(s);if(Kr(p)&&(p=p|32),p!==a)return!1}return!0}function ol(o,e){for(;e>=0&&ut(o.charCodeAt(e));e--);return e+1}function Do(o,e){for(;e<o.length&&ut(o.charCodeAt(e));e++);return e}function Cn(o,e){for(;e<o.length&&Fe(o.charCodeAt(e));e++);return e}function zt(o,e){if(e+=2,lt(eo(o,e-1))){for(let r=Math.min(o.length,e+5);e<r&<(eo(o,e));e++);let t=eo(o,e);ut(t)&&(e+=es(o,e,t))}return e}function vo(o,e){for(;e<o.length;e++){let t=o.charCodeAt(e);if(!qr(t)){if(He(t,eo(o,e+1))){e=zt(o,e)-1;continue}break}}return e}function ts(o,e){let t=o.charCodeAt(e);if((t===43||t===45)&&(t=o.charCodeAt(e+=1)),Fe(t)&&(e=Cn(o,e+1),t=o.charCodeAt(e)),t===46&&Fe(o.charCodeAt(e+1))&&(e+=2,e=Cn(o,e)),In(o,e,101)){let r=0;t=o.charCodeAt(e+1),(t===45||t===43)&&(r=1,t=o.charCodeAt(e+2)),Fe(t)&&(e=Cn(o,e+1+r+1))}return e}function os(o,e){for(;e<o.length;e++){let t=o.charCodeAt(e);if(t===41){e++;break}He(t,eo(o,e+1))&&(e=zt(o,e))}return e}function rs(o){if(o.length===1&&!lt(o.charCodeAt(0)))return o[0];let e=parseInt(o,16);return(e===0||e>=55296&&e<=57343||e>1114111)&&(e=65533),String.fromCodePoint(e)}var to=["EOF-token","ident-token","function-token","at-keyword-token","hash-token","string-token","bad-string-token","url-token","bad-url-token","delim-token","number-token","percentage-token","dimension-token","whitespace-token","CDO-token","CDC-token","colon-token","semicolon-token","comma-token","[-token","]-token","(-token",")-token","{-token","}-token","comment-token"];function oo(o=null,e){return o===null||o.length<e?new Uint32Array(Math.max(e+1024,16384)):o}var rl=10,Cg=12,sl=13;function nl(o){let e=o.source,t=e.length,r=e.length>0?Jr(e.charCodeAt(0)):0,s=oo(o.lines,t),a=oo(o.columns,t),p=o.startLine,u=o.startColumn;for(let f=r;f<t;f++){let m=e.charCodeAt(f);s[f]=p,a[f]=u++,(m===rl||m===sl||m===Cg)&&(m===sl&&f+1<t&&e.charCodeAt(f+1)===rl&&(f++,s[f]=p,a[f]=u),p++,u=1)}s[t]=p,a[t]=u,o.lines=s,o.columns=a,o.computed=!0}var ss=class{constructor(e,t,r,s){this.setSource(e,t,r,s),this.lines=null,this.columns=null}setSource(e="",t=0,r=1,s=1){this.source=e,this.startOffset=t,this.startLine=r,this.startColumn=s,this.computed=!1}getLocation(e,t){return this.computed||nl(this),{source:t,offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]}}getLocationRange(e,t,r){return this.computed||nl(this),{source:r,start:{offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]},end:{offset:this.startOffset+t,line:this.lines[t],column:this.columns[t]}}}};var Xe=16777215,et=24,No=1,is=2,kt=new Uint8Array(32);kt[2]=22;kt[21]=22;kt[19]=20;kt[23]=24;var tt=new Uint8Array(32);tt[2]=No;tt[21]=No;tt[19]=No;tt[23]=No;tt[22]=is;tt[20]=is;tt[24]=is;function il(o,e,t){return o<e?e:o>t?t:o}var ns=class{constructor(e,t){this.setSource(e,t)}reset(){this.eof=!1,this.tokenIndex=-1,this.tokenType=0,this.tokenStart=this.firstCharOffset,this.tokenEnd=this.firstCharOffset}setSource(e="",t=()=>{}){e=String(e||"");let r=e.length,s=oo(this.offsetAndType,e.length+1),a=oo(this.balance,e.length+1),p=0,u=-1,f=0,m=e.length;this.offsetAndType=null,this.balance=null,a.fill(0),t(e,(x,g,z)=>{let w=p++;if(s[w]=x<<et|z,u===-1&&(u=g),a[w]=m,x===f){let k=a[m];a[m]=w,m=k,f=kt[s[k]>>et]}else this.isBlockOpenerTokenType(x)&&(m=w,f=kt[x])}),s[p]=0<<et|r,a[p]=p;for(let x=0;x<p;x++){let g=a[x];if(g<=x){let z=a[g];z!==x&&(a[x]=z)}else g>p&&(a[x]=p)}this.source=e,this.firstCharOffset=u===-1?0:u,this.tokenCount=p,this.offsetAndType=s,this.balance=a,this.reset(),this.next()}lookupType(e){return e+=this.tokenIndex,e<this.tokenCount?this.offsetAndType[e]>>et:0}lookupTypeNonSC(e){for(let t=this.tokenIndex;t<this.tokenCount;t++){let r=this.offsetAndType[t]>>et;if(r!==13&&r!==25&&e--===0)return r}return 0}lookupOffset(e){return e+=this.tokenIndex,e<this.tokenCount?this.offsetAndType[e-1]&Xe:this.source.length}lookupOffsetNonSC(e){for(let t=this.tokenIndex;t<this.tokenCount;t++){let r=this.offsetAndType[t]>>et;if(r!==13&&r!==25&&e--===0)return t-this.tokenIndex}return 0}lookupValue(e,t){return e+=this.tokenIndex,e<this.tokenCount?Nt(this.source,this.offsetAndType[e-1]&Xe,this.offsetAndType[e]&Xe,t):!1}getTokenStart(e){return e===this.tokenIndex?this.tokenStart:e>0?e<this.tokenCount?this.offsetAndType[e-1]&Xe:this.offsetAndType[this.tokenCount]&Xe:this.firstCharOffset}getTokenEnd(e){return e===this.tokenIndex?this.tokenEnd:this.offsetAndType[il(e,0,this.tokenCount)]&Xe}getTokenType(e){return e===this.tokenIndex?this.tokenType:this.offsetAndType[il(e,0,this.tokenCount)]>>et}substrToCursor(e){return this.source.substring(e,this.tokenStart)}isBlockOpenerTokenType(e){return tt[e]===No}isBlockCloserTokenType(e){return tt[e]===is}getBlockTokenPairIndex(e){let t=this.getTokenType(e);if(tt[t]===1){let r=this.balance[e],s=this.getTokenType(r);return kt[t]===s?r:-1}else if(tt[t]===2){let r=this.balance[e],s=this.getTokenType(r);return kt[s]===t?r:-1}return-1}isBalanceEdge(e){return this.balance[this.tokenIndex]<e}isDelim(e,t){return t?this.lookupType(t)===9&&this.source.charCodeAt(this.lookupOffset(t))===e:this.tokenType===9&&this.source.charCodeAt(this.tokenStart)===e}skip(e){let t=this.tokenIndex+e;t<this.tokenCount?(this.tokenIndex=t,this.tokenStart=this.offsetAndType[t-1]&Xe,t=this.offsetAndType[t],this.tokenType=t>>et,this.tokenEnd=t&Xe):(this.tokenIndex=this.tokenCount,this.next())}next(){let e=this.tokenIndex+1;e<this.tokenCount?(this.tokenIndex=e,this.tokenStart=this.tokenEnd,e=this.offsetAndType[e],this.tokenType=e>>et,this.tokenEnd=e&Xe):(this.eof=!0,this.tokenIndex=this.tokenCount,this.tokenType=0,this.tokenStart=this.tokenEnd=this.source.length)}skipSC(){for(;this.tokenType===13||this.tokenType===25;)this.next()}skipUntilBalanced(e,t){let r=e,s=0,a=0;e:for(;r<this.tokenCount;r++){if(s=this.balance[r],s<e)break e;switch(a=r>0?this.offsetAndType[r-1]&Xe:this.firstCharOffset,t(this.source.charCodeAt(a))){case 1:break e;case 2:r++;break e;default:this.isBlockOpenerTokenType(this.offsetAndType[r]>>et)&&(r=s)}}this.skip(r-this.tokenIndex)}forEachToken(e){for(let t=0,r=this.firstCharOffset;t<this.tokenCount;t++){let s=r,a=this.offsetAndType[t],p=a&Xe,u=a>>et;r=p,e(u,s,p,t)}}dump(){let e=new Array(this.tokenCount);return this.forEachToken((t,r,s,a)=>{e[a]={idx:a,type:to[t],chunk:this.source.substring(r,s),balance:this.balance[a]}}),e}};function cl(o,e){function t(g){return g<u?o.charCodeAt(g):0}function r(){if(m=ts(o,m),Yr(t(m),t(m+1),t(m+2))){x=12,m=vo(o,m);return}if(t(m)===37){x=11,m++;return}x=10}function s(){let g=m;if(m=vo(o,m),Nt(o,g,m,"url")&&t(m)===40){if(m=Do(o,m+1),t(m)===34||t(m)===39){x=2,m=g+4;return}p();return}if(t(m)===40){x=2,m++;return}x=1}function a(g){for(g||(g=t(m++)),x=5;m<o.length;m++){let z=o.charCodeAt(m);switch(Xr(z)){case g:m++;return;case Lo:if(Po(z)){m+=es(o,m,z),x=6;return}break;case 92:if(m===o.length-1)break;let w=t(m+1);Po(w)?m+=es(o,m+1,w):He(z,w)&&(m=zt(o,m)-1);break}}}function p(){for(x=7,m=Do(o,m);m<o.length;m++){let g=o.charCodeAt(m);switch(Xr(g)){case 41:m++;return;case Lo:if(m=Do(o,m),t(m)===41||m>=o.length){m<o.length&&m++;return}m=os(o,m),x=8;return;case 34:case 39:case 40:case En:m=os(o,m),x=8;return;case 92:if(He(g,t(m+1))){m=zt(o,m)-1;break}m=os(o,m),x=8;return}}}o=String(o||"");let u=o.length,f=Jr(t(0)),m=f,x;for(;m<u;){let g=o.charCodeAt(m);switch(Xr(g)){case Lo:x=13,m=Do(o,m+1);break;case 34:a();break;case 35:qr(t(m+1))||He(t(m+1),t(m+2))?(x=4,m=vo(o,m+1)):(x=9,m++);break;case 39:a();break;case 40:x=21,m++;break;case 41:x=22,m++;break;case 43:Qr(g,t(m+1),t(m+2))?r():(x=9,m++);break;case 44:x=18,m++;break;case 45:Qr(g,t(m+1),t(m+2))?r():t(m+1)===45&&t(m+2)===62?(x=15,m=m+3):Yr(g,t(m+1),t(m+2))?s():(x=9,m++);break;case 46:Qr(g,t(m+1),t(m+2))?r():(x=9,m++);break;case 47:t(m+1)===42?(x=25,m=o.indexOf("*/",m+2),m=m===-1?o.length:m+2):(x=9,m++);break;case 58:x=16,m++;break;case 59:x=17,m++;break;case 60:t(m+1)===33&&t(m+2)===45&&t(m+3)===45?(x=14,m=m+4):(x=9,m++);break;case 64:Yr(t(m+1),t(m+2),t(m+3))?(x=3,m=vo(o,m+1)):(x=9,m++);break;case 91:x=19,m++;break;case 92:He(g,t(m+1))?s():(x=9,m++);break;case 93:x=20,m++;break;case 123:x=23,m++;break;case 125:x=24,m++;break;case Tn:r();break;case Zr:s();break;default:x=9,m++}e(x,f,f=m)}}var kn={};X(kn,{generate:()=>Og,name:()=>Rg,parse:()=>Mn,structure:()=>wg});var ht=43,Ge=45,as=110,Vt=!0,Ig=!1;function cs(o,e){let t=this.tokenStart+o,r=this.charCodeAt(t);for((r===ht||r===Ge)&&(e&&this.error("Number sign is not allowed"),t++);t<this.tokenEnd;t++)Fe(this.charCodeAt(t))||this.error("Integer is expected",t)}function ao(o){return cs.call(this,0,o)}function Pt(o,e){if(!this.cmpChar(this.tokenStart+o,e)){let t="";switch(e){case as:t="N is expected";break;case Ge:t="HyphenMinus is expected";break}this.error(t,this.tokenStart+o)}}function On(){let o=0,e=0,t=this.tokenType;for(;t===13||t===25;)t=this.lookupType(++o);if(t!==10)if(this.isDelim(ht,o)||this.isDelim(Ge,o)){e=this.isDelim(ht,o)?ht:Ge;do t=this.lookupType(++o);while(t===13||t===25);t!==10&&(this.skip(o),ao.call(this,Vt))}else return null;return o>0&&this.skip(o),e===0&&(t=this.charCodeAt(this.tokenStart),t!==ht&&t!==Ge&&this.error("Number sign is expected")),ao.call(this,e!==0),e===Ge?"-"+this.consume(10):this.consume(10)}var Rg="AnPlusB",wg={a:[String,null],b:[String,null]};function Mn(){let o=this.tokenStart,e=null,t=null;if(this.tokenType===10)ao.call(this,Ig),t=this.consume(10);else if(this.tokenType===1&&this.cmpChar(this.tokenStart,Ge))switch(e="-1",Pt.call(this,1,as),this.tokenEnd-this.tokenStart){case 2:this.next(),t=On.call(this);break;case 3:Pt.call(this,2,Ge),this.next(),this.skipSC(),ao.call(this,Vt),t="-"+this.consume(10);break;default:Pt.call(this,2,Ge),cs.call(this,3,Vt),this.next(),t=this.substrToCursor(o+2)}else if(this.tokenType===1||this.isDelim(ht)&&this.lookupType(1)===1){let r=0;switch(e="1",this.isDelim(ht)&&(r=1,this.next()),Pt.call(this,0,as),this.tokenEnd-this.tokenStart){case 1:this.next(),t=On.call(this);break;case 2:Pt.call(this,1,Ge),this.next(),this.skipSC(),ao.call(this,Vt),t="-"+this.consume(10);break;default:Pt.call(this,1,Ge),cs.call(this,2,Vt),this.next(),t=this.substrToCursor(o+r+1)}}else if(this.tokenType===12){let r=this.charCodeAt(this.tokenStart),s=r===ht||r===Ge,a=this.tokenStart+s;for(;a<this.tokenEnd&&Fe(this.charCodeAt(a));a++);a===this.tokenStart+s&&this.error("Integer is expected",this.tokenStart+s),Pt.call(this,a-this.tokenStart,as),e=this.substring(o,a),a+1===this.tokenEnd?(this.next(),t=On.call(this)):(Pt.call(this,a-this.tokenStart+1,Ge),a+2===this.tokenEnd?(this.next(),this.skipSC(),ao.call(this,Vt),t="-"+this.consume(10)):(cs.call(this,a-this.tokenStart+2,Vt),this.next(),t=this.substrToCursor(a+1)))}else this.error();return e!==null&&e.charCodeAt(0)===ht&&(e=e.substr(1)),t!==null&&t.charCodeAt(0)===ht&&(t=t.substr(1)),{type:"AnPlusB",loc:this.getLocation(o,this.tokenStart),a:e,b:t}}function Og(o){if(o.a){let e=o.a==="+1"&&"n"||o.a==="1"&&"n"||o.a==="-1"&&"-n"||o.a+"n";if(o.b){let t=o.b[0]==="-"||o.b[0]==="+"?o.b:"+"+o.b;this.tokenize(e+t)}else this.tokenize(e)}else this.tokenize(o.b)}var Ln={};X(Ln,{generate:()=>Dg,name:()=>kg,parse:()=>Pn,structure:()=>Lg,walkContext:()=>Pg});function pl(){return this.Raw(this.consumeUntilLeftCurlyBracketOrSemicolon,!0)}function Mg(){for(let o=1,e;e=this.lookupType(o);o++){if(e===24)return!0;if(e===23||e===3)return!1}return!1}var kg="Atrule",Pg="atrule",Lg={name:String,prelude:["AtrulePrelude","Raw",null],block:["Block",null]};function Pn(o=!1){let e=this.tokenStart,t,r,s=null,a=null;switch(this.eat(3),t=this.substrToCursor(e+1),r=t.toLowerCase(),this.skipSC(),this.eof===!1&&this.tokenType!==23&&this.tokenType!==17&&(this.parseAtrulePrelude?s=this.parseWithFallback(this.AtrulePrelude.bind(this,t,o),pl):s=pl.call(this,this.tokenIndex),this.skipSC()),this.tokenType){case 17:this.next();break;case 23:hasOwnProperty.call(this.atrule,r)&&typeof this.atrule[r].block=="function"?a=this.atrule[r].block.call(this,o):a=this.Block(Mg.call(this));break}return{type:"Atrule",loc:this.getLocation(e,this.tokenStart),name:t,prelude:s,block:a}}function Dg(o){this.token(3,"@"+o.name),o.prelude!==null&&this.node(o.prelude),o.block?this.node(o.block):this.token(17,";")}var vn={};X(vn,{generate:()=>_g,name:()=>vg,parse:()=>Dn,structure:()=>Ng,walkContext:()=>Fg});var vg="AtrulePrelude",Fg="atrulePrelude",Ng={children:[[]]};function Dn(o){let e=null;return o!==null&&(o=o.toLowerCase()),this.skipSC(),hasOwnProperty.call(this.atrule,o)&&typeof this.atrule[o].prelude=="function"?e=this.atrule[o].prelude.call(this):e=this.readSequence(this.scope.AtrulePrelude),this.skipSC(),this.eof!==!0&&this.tokenType!==23&&this.tokenType!==17&&this.error("Semicolon or block is expected"),{type:"AtrulePrelude",loc:this.getLocationFromList(e),children:e}}function _g(o){this.children(o)}var _n={};X(_n,{generate:()=>Gg,name:()=>Wg,parse:()=>Nn,structure:()=>$g});var Bg=36,dl=42,ps=61,jg=94,Fn=124,Vg=126;function Ug(){this.eof&&this.error("Unexpected end of input");let o=this.tokenStart,e=!1;return this.isDelim(dl)?(e=!0,this.next()):this.isDelim(Fn)||this.eat(1),this.isDelim(Fn)?this.charCodeAt(this.tokenStart+1)!==ps?(this.next(),this.eat(1)):e&&this.error("Identifier is expected",this.tokenEnd):e&&this.error("Vertical line is expected"),{type:"Identifier",loc:this.getLocation(o,this.tokenStart),name:this.substrToCursor(o)}}function Hg(){let o=this.tokenStart,e=this.charCodeAt(o);return e!==ps&&e!==Vg&&e!==jg&&e!==Bg&&e!==dl&&e!==Fn&&this.error("Attribute selector (=, ~=, ^=, $=, *=, |=) is expected"),this.next(),e!==ps&&(this.isDelim(ps)||this.error("Equal sign is expected"),this.next()),this.substrToCursor(o)}var Wg="AttributeSelector",$g={name:"Identifier",matcher:[String,null],value:["String","Identifier",null],flags:[String,null]};function Nn(){let o=this.tokenStart,e,t=null,r=null,s=null;return this.eat(19),this.skipSC(),e=Ug.call(this),this.skipSC(),this.tokenType!==20&&(this.tokenType!==1&&(t=Hg.call(this),this.skipSC(),r=this.tokenType===5?this.String():this.Identifier(),this.skipSC()),this.tokenType===1&&(s=this.consume(1),this.skipSC())),this.eat(20),{type:"AttributeSelector",loc:this.getLocation(o,this.tokenStart),name:e,matcher:t,value:r,flags:s}}function Gg(o){this.token(9,"["),this.node(o.name),o.matcher!==null&&(this.tokenize(o.matcher),this.node(o.value)),o.flags!==null&&this.token(1,o.flags),this.token(9,"]")}var jn={};X(jn,{generate:()=>Zg,name:()=>Yg,parse:()=>Bn,structure:()=>Jg,walkContext:()=>Qg});var Kg=38;function ml(){return this.Raw(null,!0)}function ll(){return this.parseWithFallback(this.Rule,ml)}function ul(){return this.Raw(this.consumeUntilSemicolonIncluded,!0)}function qg(){if(this.tokenType===17)return ul.call(this,this.tokenIndex);let o=this.parseWithFallback(this.Declaration,ul);return this.tokenType===17&&this.next(),o}var Yg="Block",Qg="block",Jg={children:[["Atrule","Rule","Declaration"]]};function Bn(o){let e=o?qg:ll,t=this.tokenStart,r=this.createList();this.eat(23);e:for(;!this.eof;)switch(this.tokenType){case 24:break e;case 13:case 25:this.next();break;case 3:r.push(this.parseWithFallback(this.Atrule.bind(this,o),ml));break;default:o&&this.isDelim(Kg)?r.push(ll.call(this)):r.push(e.call(this))}return this.eof||this.eat(24),{type:"Block",loc:this.getLocation(t,this.tokenStart),children:r}}function Zg(o){this.token(23,"{"),this.children(o,e=>{e.type==="Declaration"&&this.token(17,";")}),this.token(24,"}")}var Un={};X(Un,{generate:()=>tb,name:()=>Xg,parse:()=>Vn,structure:()=>eb});var Xg="Brackets",eb={children:[[]]};function Vn(o,e){let t=this.tokenStart,r=null;return this.eat(19),r=o.call(this,e),this.eof||this.eat(20),{type:"Brackets",loc:this.getLocation(t,this.tokenStart),children:r}}function tb(o){this.token(9,"["),this.children(o),this.token(9,"]")}var Wn={};X(Wn,{generate:()=>sb,name:()=>ob,parse:()=>Hn,structure:()=>rb});var ob="CDC",rb=[];function Hn(){let o=this.tokenStart;return this.eat(15),{type:"CDC",loc:this.getLocation(o,this.tokenStart)}}function sb(){this.token(15,"-->")}var Gn={};X(Gn,{generate:()=>ab,name:()=>nb,parse:()=>$n,structure:()=>ib});var nb="CDO",ib=[];function $n(){let o=this.tokenStart;return this.eat(14),{type:"CDO",loc:this.getLocation(o,this.tokenStart)}}function ab(){this.token(14,"<!--")}var qn={};X(qn,{generate:()=>lb,name:()=>pb,parse:()=>Kn,structure:()=>db});var cb=46,pb="ClassSelector",db={name:String};function Kn(){return this.eatDelim(cb),{type:"ClassSelector",loc:this.getLocation(this.tokenStart-1,this.tokenEnd),name:this.consume(1)}}function lb(o){this.token(9,"."),this.token(1,o.name)}var Qn={};X(Qn,{generate:()=>gb,name:()=>fb,parse:()=>Yn,structure:()=>xb});var ub=43,hl=47,mb=62,hb=126,fb="Combinator",xb={name:String};function Yn(){let o=this.tokenStart,e;switch(this.tokenType){case 13:e=" ";break;case 9:switch(this.charCodeAt(this.tokenStart)){case mb:case ub:case hb:this.next();break;case hl:this.next(),this.eatIdent("deep"),this.eatDelim(hl);break;default:this.error("Combinator is expected")}e=this.substrToCursor(o);break}return{type:"Combinator",loc:this.getLocation(o,this.tokenStart),name:e}}function gb(o){this.tokenize(o.name)}var Zn={};X(Zn,{generate:()=>zb,name:()=>Ab,parse:()=>Jn,structure:()=>Sb});var bb=42,yb=47,Ab="Comment",Sb={value:String};function Jn(){let o=this.tokenStart,e=this.tokenEnd;return this.eat(25),e-o+2>=2&&this.charCodeAt(e-2)===bb&&this.charCodeAt(e-1)===yb&&(e-=2),{type:"Comment",loc:this.getLocation(o,this.tokenStart),value:this.substring(o+2,e)}}function zb(o){this.token(25,"/*"+o.value+"*/")}var ei={};X(ei,{generate:()=>Rb,name:()=>Eb,parse:()=>Xn,structure:()=>Cb});var Tb=new Set([16,22,0]),Eb="Condition",Cb={kind:String,children:[["Identifier","Feature","FeatureFunction","FeatureRange","SupportsDeclaration"]]};function fl(o){return this.lookupTypeNonSC(1)===1&&Tb.has(this.lookupTypeNonSC(2))?this.Feature(o):this.FeatureRange(o)}var Ib={media:fl,container:fl,supports(){return this.SupportsDeclaration()}};function Xn(o="media"){let e=this.createList();e:for(;!this.eof;)switch(this.tokenType){case 25:case 13:this.next();continue;case 1:e.push(this.Identifier());break;case 21:{let t=this.parseWithFallback(()=>Ib[o].call(this,o),()=>null);t||(t=this.parseWithFallback(()=>{this.eat(21);let r=this.Condition(o);return this.eat(22),r},()=>this.GeneralEnclosed(o))),e.push(t);break}case 2:{let t=this.parseWithFallback(()=>this.FeatureFunction(o),()=>null);t||(t=this.GeneralEnclosed(o)),e.push(t);break}default:break e}return e.isEmpty&&this.error("Condition is expected"),{type:"Condition",loc:this.getLocationFromList(e),kind:o,children:e}}function Rb(o){o.children.forEach(e=>{e.type==="Condition"?(this.token(21,"("),this.node(e),this.token(22,")")):this.node(e)})}var oi={};X(oi,{generate:()=>Bb,name:()=>Fb,parse:()=>ti,structure:()=>_b,walkContext:()=>Nb});var xl=45;function gl(o,e){return e=e||0,o.length-e>=2&&o.charCodeAt(e)===xl&&o.charCodeAt(e+1)===xl}var yl=33,wb=35,Ob=36,Mb=38,kb=42,Pb=43,bl=47;function Lb(){return this.Raw(this.consumeUntilExclamationMarkOrSemicolon,!0)}function Db(){return this.Raw(this.consumeUntilExclamationMarkOrSemicolon,!1)}function vb(){let o=this.tokenIndex,e=this.Value();return e.type!=="Raw"&&this.eof===!1&&this.tokenType!==17&&this.isDelim(yl)===!1&&this.isBalanceEdge(o)===!1&&this.error(),e}var Fb="Declaration",Nb="declaration",_b={important:[Boolean,String],property:String,value:["Value","Raw"]};function ti(){let o=this.tokenStart,e=this.tokenIndex,t=jb.call(this),r=gl(t),s=r?this.parseCustomProperty:this.parseValue,a=r?Db:Lb,p=!1,u;this.skipSC(),this.eat(16);let f=this.tokenIndex;if(r||this.skipSC(),s?u=this.parseWithFallback(vb,a):u=a.call(this,this.tokenIndex),r&&u.type==="Value"&&u.children.isEmpty){for(let m=f-this.tokenIndex;m<=0;m++)if(this.lookupType(m)===13){u.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}}return this.isDelim(yl)&&(p=Vb.call(this),this.skipSC()),this.eof===!1&&this.tokenType!==17&&this.isBalanceEdge(e)===!1&&this.error(),{type:"Declaration",loc:this.getLocation(o,this.tokenStart),important:p,property:t,value:u}}function Bb(o){this.token(1,o.property),this.token(16,":"),this.node(o.value),o.important&&(this.token(9,"!"),this.token(1,o.important===!0?"important":o.important))}function jb(){let o=this.tokenStart;if(this.tokenType===9)switch(this.charCodeAt(this.tokenStart)){case kb:case Ob:case Pb:case wb:case Mb:this.next();break;case bl:this.next(),this.isDelim(bl)&&this.next();break}return this.tokenType===4?this.eat(4):this.eat(1),this.substrToCursor(o)}function Vb(){this.eat(9),this.skipSC();let o=this.consume(1);return o==="important"?!0:o}var ni={};X(ni,{generate:()=>$b,name:()=>Hb,parse:()=>si,structure:()=>Wb});var Ub=38;function ri(){return this.Raw(this.consumeUntilSemicolonIncluded,!0)}var Hb="DeclarationList",Wb={children:[["Declaration","Atrule","Rule"]]};function si(){let o=this.createList();for(;!this.eof;)switch(this.tokenType){case 13:case 25:case 17:this.next();break;case 3:o.push(this.parseWithFallback(this.Atrule.bind(this,!0),ri));break;default:this.isDelim(Ub)?o.push(this.parseWithFallback(this.Rule,ri)):o.push(this.parseWithFallback(this.Declaration,ri))}return{type:"DeclarationList",loc:this.getLocationFromList(o),children:o}}function $b(o){this.children(o,e=>{e.type==="Declaration"&&this.token(17,";")})}var ai={};X(ai,{generate:()=>qb,name:()=>Gb,parse:()=>ii,structure:()=>Kb});var Gb="Dimension",Kb={value:String,unit:String};function ii(){let o=this.tokenStart,e=this.consumeNumber(12);return{type:"Dimension",loc:this.getLocation(o,this.tokenStart),value:e,unit:this.substring(o+e.length,this.tokenStart)}}function qb(o){this.token(12,o.value+o.unit)}var pi={};X(pi,{generate:()=>Zb,name:()=>Qb,parse:()=>ci,structure:()=>Jb});var Yb=47,Qb="Feature",Jb={kind:String,name:String,value:["Identifier","Number","Dimension","Ratio","Function",null]};function ci(o){let e=this.tokenStart,t,r=null;if(this.eat(21),this.skipSC(),t=this.consume(1),this.skipSC(),this.tokenType!==22){switch(this.eat(16),this.skipSC(),this.tokenType){case 10:this.lookupNonWSType(1)===9?r=this.Ratio():r=this.Number();break;case 12:r=this.Dimension();break;case 1:r=this.Identifier();break;case 2:r=this.parseWithFallback(()=>{let s=this.Function(this.readSequence,this.scope.Value);return this.skipSC(),this.isDelim(Yb)&&this.error(),s},()=>this.Ratio());break;default:this.error("Number, dimension, ratio or identifier is expected")}this.skipSC()}return this.eof||this.eat(22),{type:"Feature",loc:this.getLocation(e,this.tokenStart),kind:o,name:t,value:r}}function Zb(o){this.token(21,"("),this.token(1,o.name),o.value!==null&&(this.token(16,":"),this.node(o.value)),this.token(22,")")}var li={};X(li,{generate:()=>oy,name:()=>Xb,parse:()=>di,structure:()=>ey});var Xb="FeatureFunction",ey={kind:String,feature:String,value:["Declaration","Selector"]};function ty(o,e){let r=(this.features[o]||{})[e];return typeof r!="function"&&this.error(`Unknown feature ${e}()`),r}function di(o="unknown"){let e=this.tokenStart,t=this.consumeFunctionName(),r=ty.call(this,o,t.toLowerCase());this.skipSC();let s=this.parseWithFallback(()=>{let a=this.tokenIndex,p=r.call(this);return this.eof===!1&&this.isBalanceEdge(a)===!1&&this.error(),p},()=>this.Raw(null,!1));return this.eof||this.eat(22),{type:"FeatureFunction",loc:this.getLocation(e,this.tokenStart),kind:o,feature:t,value:s}}function oy(o){this.token(2,o.feature+"("),this.node(o.value),this.token(22,")")}var hi={};X(hi,{generate:()=>ay,name:()=>ny,parse:()=>mi,structure:()=>iy});var Al=47,ry=60,Sl=61,sy=62,ny="FeatureRange",iy={kind:String,left:["Identifier","Number","Dimension","Ratio","Function"],leftComparison:String,middle:["Identifier","Number","Dimension","Ratio","Function"],rightComparison:[String,null],right:["Identifier","Number","Dimension","Ratio","Function",null]};function ui(){switch(this.skipSC(),this.tokenType){case 10:return this.isDelim(Al,this.lookupOffsetNonSC(1))?this.Ratio():this.Number();case 12:return this.Dimension();case 1:return this.Identifier();case 2:return this.parseWithFallback(()=>{let o=this.Function(this.readSequence,this.scope.Value);return this.skipSC(),this.isDelim(Al)&&this.error(),o},()=>this.Ratio());default:this.error("Number, dimension, ratio or identifier is expected")}}function zl(o){if(this.skipSC(),this.isDelim(ry)||this.isDelim(sy)){let e=this.source[this.tokenStart];return this.next(),this.isDelim(Sl)?(this.next(),e+"="):e}if(this.isDelim(Sl))return"=";this.error(`Expected ${o?'":", ':""}"<", ">", "=" or ")"`)}function mi(o="unknown"){let e=this.tokenStart;this.skipSC(),this.eat(21);let t=ui.call(this),r=zl.call(this,t.type==="Identifier"),s=ui.call(this),a=null,p=null;return this.lookupNonWSType(0)!==22&&(a=zl.call(this),p=ui.call(this)),this.skipSC(),this.eat(22),{type:"FeatureRange",loc:this.getLocation(e,this.tokenStart),kind:o,left:t,leftComparison:r,middle:s,rightComparison:a,right:p}}function ay(o){this.token(21,"("),this.node(o.left),this.tokenize(o.leftComparison),this.node(o.middle),o.right&&(this.tokenize(o.rightComparison),this.node(o.right)),this.token(22,")")}var xi={};X(xi,{generate:()=>ly,name:()=>cy,parse:()=>fi,structure:()=>dy,walkContext:()=>py});var cy="Function",py="function",dy={name:String,children:[[]]};function fi(o,e){let t=this.tokenStart,r=this.consumeFunctionName(),s=r.toLowerCase(),a;return a=e.hasOwnProperty(s)?e[s].call(this,e):o.call(this,e),this.eof||this.eat(22),{type:"Function",loc:this.getLocation(t,this.tokenStart),name:r,children:a}}function ly(o){this.token(2,o.name+"("),this.children(o),this.token(22,")")}var bi={};X(bi,{generate:()=>hy,name:()=>uy,parse:()=>gi,structure:()=>my});var uy="GeneralEnclosed",my={kind:String,function:[String,null],children:[[]]};function gi(o){let e=this.tokenStart,t=null;this.tokenType===2?t=this.consumeFunctionName():this.eat(21);let r=this.parseWithFallback(()=>{let s=this.tokenIndex,a=this.readSequence(this.scope.Value);return this.eof===!1&&this.isBalanceEdge(s)===!1&&this.error(),a},()=>this.createSingleNodeList(this.Raw(null,!1)));return this.eof||this.eat(22),{type:"GeneralEnclosed",loc:this.getLocation(e,this.tokenStart),kind:o,function:t,children:r}}function hy(o){o.function?this.token(2,o.function+"("):this.token(21,"("),this.children(o),this.token(22,")")}var Ai={};X(Ai,{generate:()=>by,name:()=>xy,parse:()=>yi,structure:()=>gy,xxx:()=>fy});var fy="XXX",xy="Hash",gy={value:String};function yi(){let o=this.tokenStart;return this.eat(4),{type:"Hash",loc:this.getLocation(o,this.tokenStart),value:this.substrToCursor(o+1)}}function by(o){this.token(4,"#"+o.value)}var zi={};X(zi,{generate:()=>Sy,name:()=>yy,parse:()=>Si,structure:()=>Ay});var yy="Identifier",Ay={name:String};function Si(){return{type:"Identifier",loc:this.getLocation(this.tokenStart,this.tokenEnd),name:this.consume(1)}}function Sy(o){this.token(1,o.name)}var Ei={};X(Ei,{generate:()=>Ey,name:()=>zy,parse:()=>Ti,structure:()=>Ty});var zy="IdSelector",Ty={name:String};function Ti(){let o=this.tokenStart;return this.eat(4),{type:"IdSelector",loc:this.getLocation(o,this.tokenStart),name:this.substrToCursor(o+1)}}function Ey(o){this.token(9,"#"+o.name)}var Ii={};X(Ii,{generate:()=>wy,name:()=>Iy,parse:()=>Ci,structure:()=>Ry});var Cy=46,Iy="Layer",Ry={name:String};function Ci(){let o=this.tokenStart,e=this.consume(1);for(;this.isDelim(Cy);)this.eat(9),e+="."+this.consume(1);return{type:"Layer",loc:this.getLocation(o,this.tokenStart),name:e}}function wy(o){this.tokenize(o.name)}var wi={};X(wi,{generate:()=>ky,name:()=>Oy,parse:()=>Ri,structure:()=>My});var Oy="LayerList",My={children:[["Layer"]]};function Ri(){let o=this.createList();for(this.skipSC();!this.eof&&(o.push(this.Layer()),this.lookupTypeNonSC(0)===18);)this.skipSC(),this.next(),this.skipSC();return{type:"LayerList",loc:this.getLocationFromList(o),children:o}}function ky(o){this.children(o,()=>this.token(18,","))}var Mi={};X(Mi,{generate:()=>Dy,name:()=>Py,parse:()=>Oi,structure:()=>Ly});var Py="MediaQuery",Ly={modifier:[String,null],mediaType:[String,null],condition:["Condition",null]};function Oi(){let o=this.tokenStart,e=null,t=null,r=null;if(this.skipSC(),this.tokenType===1&&this.lookupTypeNonSC(1)!==21){let s=this.consume(1),a=s.toLowerCase();switch(a==="not"||a==="only"?(this.skipSC(),e=a,t=this.consume(1)):t=s,this.lookupTypeNonSC(0)){case 1:{this.skipSC(),this.eatIdent("and"),r=this.Condition("media");break}case 23:case 17:case 18:case 0:break;default:this.error("Identifier or parenthesis is expected")}}else switch(this.tokenType){case 1:case 21:case 2:{r=this.Condition("media");break}case 23:case 17:case 0:break;default:this.error("Identifier or parenthesis is expected")}return{type:"MediaQuery",loc:this.getLocation(o,this.tokenStart),modifier:e,mediaType:t,condition:r}}function Dy(o){o.mediaType?(o.modifier&&this.token(1,o.modifier),this.token(1,o.mediaType),o.condition&&(this.token(1,"and"),this.node(o.condition))):o.condition&&this.node(o.condition)}var Pi={};X(Pi,{generate:()=>Ny,name:()=>vy,parse:()=>ki,structure:()=>Fy});var vy="MediaQueryList",Fy={children:[["MediaQuery"]]};function ki(){let o=this.createList();for(this.skipSC();!this.eof&&(o.push(this.MediaQuery()),this.tokenType===18);)this.next();return{type:"MediaQueryList",loc:this.getLocationFromList(o),children:o}}function Ny(o){this.children(o,()=>this.token(18,","))}var Di={};X(Di,{generate:()=>Vy,name:()=>By,parse:()=>Li,structure:()=>jy});var _y=38,By="NestingSelector",jy={};function Li(){let o=this.tokenStart;return this.eatDelim(_y),{type:"NestingSelector",loc:this.getLocation(o,this.tokenStart)}}function Vy(){this.token(9,"&")}var Fi={};X(Fi,{generate:()=>Wy,name:()=>Uy,parse:()=>vi,structure:()=>Hy});var Uy="Nth",Hy={nth:["AnPlusB","Identifier"],selector:["SelectorList",null]};function vi(){this.skipSC();let o=this.tokenStart,e=o,t=null,r;return this.lookupValue(0,"odd")||this.lookupValue(0,"even")?r=this.Identifier():r=this.AnPlusB(),e=this.tokenStart,this.skipSC(),this.lookupValue(0,"of")&&(this.next(),t=this.SelectorList(),e=this.tokenStart),{type:"Nth",loc:this.getLocation(o,e),nth:r,selector:t}}function Wy(o){this.node(o.nth),o.selector!==null&&(this.token(1,"of"),this.node(o.selector))}var _i={};X(_i,{generate:()=>Ky,name:()=>$y,parse:()=>Ni,structure:()=>Gy});var $y="Number",Gy={value:String};function Ni(){return{type:"Number",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consume(10)}}function Ky(o){this.token(10,o.value)}var ji={};X(ji,{generate:()=>Qy,name:()=>qy,parse:()=>Bi,structure:()=>Yy});var qy="Operator",Yy={value:String};function Bi(){let o=this.tokenStart;return this.next(),{type:"Operator",loc:this.getLocation(o,this.tokenStart),value:this.substrToCursor(o)}}function Qy(o){this.tokenize(o.value)}var Ui={};X(Ui,{generate:()=>Xy,name:()=>Jy,parse:()=>Vi,structure:()=>Zy});var Jy="Parentheses",Zy={children:[[]]};function Vi(o,e){let t=this.tokenStart,r=null;return this.eat(21),r=o.call(this,e),this.eof||this.eat(22),{type:"Parentheses",loc:this.getLocation(t,this.tokenStart),children:r}}function Xy(o){this.token(21,"("),this.children(o),this.token(22,")")}var Wi={};X(Wi,{generate:()=>oA,name:()=>eA,parse:()=>Hi,structure:()=>tA});var eA="Percentage",tA={value:String};function Hi(){return{type:"Percentage",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consumeNumber(11)}}function oA(o){this.token(11,o.value+"%")}var Gi={};X(Gi,{generate:()=>iA,name:()=>rA,parse:()=>$i,structure:()=>nA,walkContext:()=>sA});var rA="PseudoClassSelector",sA="function",nA={name:String,children:[["Raw"],null]};function $i(){let o=this.tokenStart,e=null,t,r;return this.eat(16),this.tokenType===2?(t=this.consumeFunctionName(),r=t.toLowerCase(),this.lookupNonWSType(0)==22?e=this.createList():hasOwnProperty.call(this.pseudo,r)?(this.skipSC(),e=this.pseudo[r].call(this),this.skipSC()):(e=this.createList(),e.push(this.Raw(null,!1))),this.eat(22)):t=this.consume(1),{type:"PseudoClassSelector",loc:this.getLocation(o,this.tokenStart),name:t,children:e}}function iA(o){this.token(16,":"),o.children===null?this.token(1,o.name):(this.token(2,o.name+"("),this.children(o),this.token(22,")"))}var qi={};X(qi,{generate:()=>dA,name:()=>aA,parse:()=>Ki,structure:()=>pA,walkContext:()=>cA});var aA="PseudoElementSelector",cA="function",pA={name:String,children:[["Raw"],null]};function Ki(){let o=this.tokenStart,e=null,t,r;return this.eat(16),this.eat(16),this.tokenType===2?(t=this.consumeFunctionName(),r=t.toLowerCase(),this.lookupNonWSType(0)==22?e=this.createList():hasOwnProperty.call(this.pseudo,r)?(this.skipSC(),e=this.pseudo[r].call(this),this.skipSC()):(e=this.createList(),e.push(this.Raw(null,!1))),this.eat(22)):t=this.consume(1),{type:"PseudoElementSelector",loc:this.getLocation(o,this.tokenStart),name:t,children:e}}function dA(o){this.token(16,":"),this.token(16,":"),o.children===null?this.token(1,o.name):(this.token(2,o.name+"("),this.children(o),this.token(22,")"))}var Qi={};X(Qi,{generate:()=>mA,name:()=>lA,parse:()=>Yi,structure:()=>uA});var Tl=47;function El(){switch(this.skipSC(),this.tokenType){case 10:return this.Number();case 2:return this.Function(this.readSequence,this.scope.Value);default:this.error("Number of function is expected")}}var lA="Ratio",uA={left:["Number","Function"],right:["Number","Function",null]};function Yi(){let o=this.tokenStart,e=El.call(this),t=null;return this.skipSC(),this.isDelim(Tl)&&(this.eatDelim(Tl),t=El.call(this)),{type:"Ratio",loc:this.getLocation(o,this.tokenStart),left:e,right:t}}function mA(o){this.node(o.left),this.token(9,"/"),o.right?this.node(o.right):this.node(10,1)}var Zi={};X(Zi,{generate:()=>gA,name:()=>fA,parse:()=>Ji,structure:()=>xA});function hA(){return this.tokenIndex>0&&this.lookupType(-1)===13?this.tokenIndex>1?this.getTokenStart(this.tokenIndex-1):this.firstCharOffset:this.tokenStart}var fA="Raw",xA={value:String};function Ji(o,e){let t=this.getTokenStart(this.tokenIndex),r;return this.skipUntilBalanced(this.tokenIndex,o||this.consumeUntilBalanceEnd),e&&this.tokenStart>t?r=hA.call(this):r=this.tokenStart,{type:"Raw",loc:this.getLocation(t,r),value:this.substring(t,r)}}function gA(o){this.tokenize(o.value)}var ea={};X(ea,{generate:()=>zA,name:()=>yA,parse:()=>Xi,structure:()=>SA,walkContext:()=>AA});function Cl(){return this.Raw(this.consumeUntilLeftCurlyBracket,!0)}function bA(){let o=this.SelectorList();return o.type!=="Raw"&&this.eof===!1&&this.tokenType!==23&&this.error(),o}var yA="Rule",AA="rule",SA={prelude:["SelectorList","Raw"],block:["Block"]};function Xi(){let o=this.tokenIndex,e=this.tokenStart,t,r;return this.parseRulePrelude?t=this.parseWithFallback(bA,Cl):t=Cl.call(this,o),r=this.Block(!0),{type:"Rule",loc:this.getLocation(e,this.tokenStart),prelude:t,block:r}}function zA(o){this.node(o.prelude),this.node(o.block)}var oa={};X(oa,{generate:()=>CA,name:()=>TA,parse:()=>ta,structure:()=>EA});var TA="Scope",EA={root:["SelectorList","Raw",null],limit:["SelectorList","Raw",null]};function ta(){let o=null,e=null;this.skipSC();let t=this.tokenStart;return this.tokenType===21&&(this.next(),this.skipSC(),o=this.parseWithFallback(this.SelectorList,()=>this.Raw(!1,!0)),this.skipSC(),this.eat(22)),this.lookupNonWSType(0)===1&&(this.skipSC(),this.eatIdent("to"),this.skipSC(),this.eat(21),this.skipSC(),e=this.parseWithFallback(this.SelectorList,()=>this.Raw(!1,!0)),this.skipSC(),this.eat(22)),{type:"Scope",loc:this.getLocation(t,this.tokenStart),root:o,limit:e}}function CA(o){o.root&&(this.token(21,"("),this.node(o.root),this.token(22,")")),o.limit&&(this.token(1,"to"),this.token(21,"("),this.node(o.limit),this.token(22,")"))}var sa={};X(sa,{generate:()=>wA,name:()=>IA,parse:()=>ra,structure:()=>RA});var IA="Selector",RA={children:[["TypeSelector","IdSelector","ClassSelector","AttributeSelector","PseudoClassSelector","PseudoElementSelector","Combinator"]]};function ra(){let o=this.readSequence(this.scope.Selector);return this.getFirstListNode(o)===null&&this.error("Selector is expected"),{type:"Selector",loc:this.getLocationFromList(o),children:o}}function wA(o){this.children(o)}var ia={};X(ia,{generate:()=>PA,name:()=>OA,parse:()=>na,structure:()=>kA,walkContext:()=>MA});var OA="SelectorList",MA="selector",kA={children:[["Selector","Raw"]]};function na(){let o=this.createList();for(;!this.eof;){if(o.push(this.Selector()),this.tokenType===18){this.next();continue}break}return{type:"SelectorList",loc:this.getLocationFromList(o),children:o}}function PA(o){this.children(o,()=>this.token(18,","))}var pa={};X(pa,{generate:()=>FA,name:()=>DA,parse:()=>ca,structure:()=>vA});var aa=92,Il=34,Rl=39;function ds(o){let e=o.length,t=o.charCodeAt(0),r=t===Il||t===Rl?1:0,s=r===1&&e>1&&o.charCodeAt(e-1)===t?e-2:e-1,a="";for(let p=r;p<=s;p++){let u=o.charCodeAt(p);if(u===aa){if(p===s){p!==e-1&&(a=o.substr(p+1));break}if(u=o.charCodeAt(++p),He(aa,u)){let f=p-1,m=zt(o,f);p=m-1,a+=rs(o.substring(f+1,m))}else u===13&&o.charCodeAt(p+1)===10&&p++}else a+=o[p]}return a}function wl(o,e){let t=e?"'":'"',r=e?Rl:Il,s="",a=!1;for(let p=0;p<o.length;p++){let u=o.charCodeAt(p);if(u===0){s+="\uFFFD";continue}if(u<=31||u===127){s+="\\"+u.toString(16),a=!0;continue}u===r||u===aa?(s+="\\"+o.charAt(p),a=!1):(a&&(lt(u)||ut(u))&&(s+=" "),s+=o.charAt(p),a=!1)}return t+s+t}var DA="String",vA={value:String};function ca(){return{type:"String",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:ds(this.consume(5))}}function FA(o){this.token(5,wl(o.value))}var la={};X(la,{generate:()=>VA,name:()=>_A,parse:()=>da,structure:()=>jA,walkContext:()=>BA});var NA=33;function Ol(){return this.Raw(null,!1)}var _A="StyleSheet",BA="stylesheet",jA={children:[["Comment","CDO","CDC","Atrule","Rule","Raw"]]};function da(){let o=this.tokenStart,e=this.createList(),t;for(;!this.eof;){switch(this.tokenType){case 13:this.next();continue;case 25:if(this.charCodeAt(this.tokenStart+2)!==NA){this.next();continue}t=this.Comment();break;case 14:t=this.CDO();break;case 15:t=this.CDC();break;case 3:t=this.parseWithFallback(this.Atrule,Ol);break;default:t=this.parseWithFallback(this.Rule,Ol)}e.push(t)}return{type:"StyleSheet",loc:this.getLocation(o,this.tokenStart),children:e}}function VA(o){this.children(o)}var ma={};X(ma,{generate:()=>WA,name:()=>UA,parse:()=>ua,structure:()=>HA});var UA="SupportsDeclaration",HA={declaration:"Declaration"};function ua(){let o=this.tokenStart;this.eat(21),this.skipSC();let e=this.Declaration();return this.eof||this.eat(22),{type:"SupportsDeclaration",loc:this.getLocation(o,this.tokenStart),declaration:e}}function WA(o){this.token(21,"("),this.node(o.declaration),this.token(22,")")}var xa={};X(xa,{generate:()=>qA,name:()=>GA,parse:()=>fa,structure:()=>KA});var $A=42,Ml=124;function ha(){this.tokenType!==1&&this.isDelim($A)===!1&&this.error("Identifier or asterisk is expected"),this.next()}var GA="TypeSelector",KA={name:String};function fa(){let o=this.tokenStart;return this.isDelim(Ml)?(this.next(),ha.call(this)):(ha.call(this),this.isDelim(Ml)&&(this.next(),ha.call(this))),{type:"TypeSelector",loc:this.getLocation(o,this.tokenStart),name:this.substrToCursor(o)}}function qA(o){this.tokenize(o.name)}var ya={};X(ya,{generate:()=>XA,name:()=>JA,parse:()=>ba,structure:()=>ZA});var kl=43,Pl=45,ga=63;function _o(o,e){let t=0;for(let r=this.tokenStart+o;r<this.tokenEnd;r++){let s=this.charCodeAt(r);if(s===Pl&&e&&t!==0)return _o.call(this,o+t+1,!1),-1;lt(s)||this.error(e&&t!==0?"Hyphen minus"+(t<6?" or hex digit":"")+" is expected":t<6?"Hex digit is expected":"Unexpected input",r),++t>6&&this.error("Too many hex digits",r)}return this.next(),t}function ls(o){let e=0;for(;this.isDelim(ga);)++e>o&&this.error("Too many question marks"),this.next()}function YA(o){this.charCodeAt(this.tokenStart)!==o&&this.error((o===kl?"Plus sign":"Hyphen minus")+" is expected")}function QA(){let o=0;switch(this.tokenType){case 10:if(o=_o.call(this,1,!0),this.isDelim(ga)){ls.call(this,6-o);break}if(this.tokenType===12||this.tokenType===10){YA.call(this,Pl),_o.call(this,1,!1);break}break;case 12:o=_o.call(this,1,!0),o>0&&ls.call(this,6-o);break;default:if(this.eatDelim(kl),this.tokenType===1){o=_o.call(this,0,!0),o>0&&ls.call(this,6-o);break}if(this.isDelim(ga)){this.next(),ls.call(this,5);break}this.error("Hex digit or question mark is expected")}}var JA="UnicodeRange",ZA={value:String};function ba(){let o=this.tokenStart;return this.eatIdent("u"),QA.call(this),{type:"UnicodeRange",loc:this.getLocation(o,this.tokenStart),value:this.substrToCursor(o)}}function XA(o){this.tokenize(o.value)}var za={};X(za,{generate:()=>aS,name:()=>nS,parse:()=>Sa,structure:()=>iS});var eS=32,Aa=92,tS=34,oS=39,rS=40,Ll=41;function Dl(o){let e=o.length,t=4,r=o.charCodeAt(e-1)===Ll?e-2:e-1,s="";for(;t<r&&ut(o.charCodeAt(t));)t++;for(;t<r&&ut(o.charCodeAt(r));)r--;for(let a=t;a<=r;a++){let p=o.charCodeAt(a);if(p===Aa){if(a===r){a!==e-1&&(s=o.substr(a+1));break}if(p=o.charCodeAt(++a),He(Aa,p)){let u=a-1,f=zt(o,u);a=f-1,s+=rs(o.substring(u+1,f))}else p===13&&o.charCodeAt(a+1)===10&&a++}else s+=o[a]}return s}function vl(o){let e="",t=!1;for(let r=0;r<o.length;r++){let s=o.charCodeAt(r);if(s===0){e+="\uFFFD";continue}if(s<=31||s===127){e+="\\"+s.toString(16),t=!0;continue}s===eS||s===Aa||s===tS||s===oS||s===rS||s===Ll?(e+="\\"+o.charAt(r),t=!1):(t&<(s)&&(e+=" "),e+=o.charAt(r),t=!1)}return"url("+e+")"}var nS="Url",iS={value:String};function Sa(){let o=this.tokenStart,e;switch(this.tokenType){case 7:e=Dl(this.consume(7));break;case 2:this.cmpStr(this.tokenStart,this.tokenEnd,"url(")||this.error("Function name must be `url`"),this.eat(2),this.skipSC(),e=ds(this.consume(5)),this.skipSC(),this.eof||this.eat(22);break;default:this.error("Url or Function is expected")}return{type:"Url",loc:this.getLocation(o,this.tokenStart),value:e}}function aS(o){this.token(7,vl(o.value))}var Ea={};X(Ea,{generate:()=>dS,name:()=>cS,parse:()=>Ta,structure:()=>pS});var cS="Value",pS={children:[[]]};function Ta(){let o=this.tokenStart,e=this.readSequence(this.scope.Value);return{type:"Value",loc:this.getLocation(o,this.tokenStart),children:e}}function dS(o){this.children(o)}var Ia={};X(Ia,{generate:()=>hS,name:()=>uS,parse:()=>Ca,structure:()=>mS});var lS=Object.freeze({type:"WhiteSpace",loc:null,value:" "}),uS="WhiteSpace",mS={value:String};function Ca(){return this.eat(13),lS}function hS(o){this.token(13,o.value)}var co=null,Bo=class o{static createItem(e){return{prev:null,next:null,data:e}}constructor(){this.head=null,this.tail=null,this.cursor=null}createItem(e){return o.createItem(e)}allocateCursor(e,t){let r;return co!==null?(r=co,co=co.cursor,r.prev=e,r.next=t,r.cursor=this.cursor):r={prev:e,next:t,cursor:this.cursor},this.cursor=r,r}releaseCursor(){let{cursor:e}=this;this.cursor=e.cursor,e.prev=null,e.next=null,e.cursor=co,co=e}updateCursors(e,t,r,s){let{cursor:a}=this;for(;a!==null;)a.prev===e&&(a.prev=t),a.next===r&&(a.next=s),a=a.cursor}*[Symbol.iterator](){for(let e=this.head;e!==null;e=e.next)yield e.data}get size(){let e=0;for(let t=this.head;t!==null;t=t.next)e++;return e}get isEmpty(){return this.head===null}get first(){return this.head&&this.head.data}get last(){return this.tail&&this.tail.data}fromArray(e){let t=null;this.head=null;for(let r of e){let s=o.createItem(r);t!==null?t.next=s:this.head=s,s.prev=t,t=s}return this.tail=t,this}toArray(){return[...this]}toJSON(){return[...this]}forEach(e,t=this){let r=this.allocateCursor(null,this.head);for(;r.next!==null;){let s=r.next;r.next=s.next,e.call(t,s.data,s,this)}this.releaseCursor()}forEachRight(e,t=this){let r=this.allocateCursor(this.tail,null);for(;r.prev!==null;){let s=r.prev;r.prev=s.prev,e.call(t,s.data,s,this)}this.releaseCursor()}reduce(e,t,r=this){let s=this.allocateCursor(null,this.head),a=t,p;for(;s.next!==null;)p=s.next,s.next=p.next,a=e.call(r,a,p.data,p,this);return this.releaseCursor(),a}reduceRight(e,t,r=this){let s=this.allocateCursor(this.tail,null),a=t,p;for(;s.prev!==null;)p=s.prev,s.prev=p.prev,a=e.call(r,a,p.data,p,this);return this.releaseCursor(),a}some(e,t=this){for(let r=this.head;r!==null;r=r.next)if(e.call(t,r.data,r,this))return!0;return!1}map(e,t=this){let r=new o;for(let s=this.head;s!==null;s=s.next)r.appendData(e.call(t,s.data,s,this));return r}filter(e,t=this){let r=new o;for(let s=this.head;s!==null;s=s.next)e.call(t,s.data,s,this)&&r.appendData(s.data);return r}nextUntil(e,t,r=this){if(e===null)return;let s=this.allocateCursor(null,e);for(;s.next!==null;){let a=s.next;if(s.next=a.next,t.call(r,a.data,a,this))break}this.releaseCursor()}prevUntil(e,t,r=this){if(e===null)return;let s=this.allocateCursor(e,null);for(;s.prev!==null;){let a=s.prev;if(s.prev=a.prev,t.call(r,a.data,a,this))break}this.releaseCursor()}clear(){this.head=null,this.tail=null}copy(){let e=new o;for(let t of this)e.appendData(t);return e}prepend(e){return this.updateCursors(null,e,this.head,e),this.head!==null?(this.head.prev=e,e.next=this.head):this.tail=e,this.head=e,this}prependData(e){return this.prepend(o.createItem(e))}append(e){return this.insert(e)}appendData(e){return this.insert(o.createItem(e))}insert(e,t=null){if(t!==null)if(this.updateCursors(t.prev,e,t,e),t.prev===null){if(this.head!==t)throw new Error("before doesn't belong to list");this.head=e,t.prev=e,e.next=t,this.updateCursors(null,e)}else t.prev.next=e,e.prev=t.prev,t.prev=e,e.next=t;else this.updateCursors(this.tail,e,null,e),this.tail!==null?(this.tail.next=e,e.prev=this.tail):this.head=e,this.tail=e;return this}insertData(e,t){return this.insert(o.createItem(e),t)}remove(e){if(this.updateCursors(e,e.prev,e,e.next),e.prev!==null)e.prev.next=e.next;else{if(this.head!==e)throw new Error("item doesn't belong to list");this.head=e.next}if(e.next!==null)e.next.prev=e.prev;else{if(this.tail!==e)throw new Error("item doesn't belong to list");this.tail=e.prev}return e.prev=null,e.next=null,e}push(e){this.insert(o.createItem(e))}pop(){return this.tail!==null?this.remove(this.tail):null}unshift(e){this.prepend(o.createItem(e))}shift(){return this.head!==null?this.remove(this.head):null}prependList(e){return this.insertList(e,this.head)}appendList(e){return this.insertList(e)}insertList(e,t){return e.head===null?this:(t!=null?(this.updateCursors(t.prev,e.tail,t,e.head),t.prev!==null?(t.prev.next=e.head,e.head.prev=t.prev):this.head=e.head,t.prev=e.tail,e.tail.next=t):(this.updateCursors(this.tail,e.tail,null,e.head),this.tail!==null?(this.tail.next=e.head,e.head.prev=this.tail):this.head=e.head,this.tail=e.tail),e.head=null,e.tail=null,this)}replace(e,t){"head"in t?this.insertList(t,e):this.insert(t,e),this.remove(e)}};function Fl(o,e){let t=Object.create(SyntaxError.prototype),r=new Error;return Object.assign(t,{name:o,message:e,get stack(){return(r.stack||"").replace(/^(.+\n){1,3}/,`${o}: ${e}
|
|
62
|
-
`)
|
|
63
|
-
`)}let u
|
|
64
|
-
|
|
65
|
-
`).replace(/^(\s+\d+\s+\|\n)+/,"").replace(/\n(\s+\d+\s+\|)+$/,"")}function wa(o,e,t,r,s,a=1,p=1){return Object.assign(Fl("SyntaxError",o),{source:e,offset:t,line:r,column:s,sourceFragment(f){return Bl({source:e,line:r,column:s,baseLine:a,baseColumn:p},isNaN(f)?0:f)},get formattedMessage(){return`Parse error: ${o}
|
|
66
|
-
`+Bl({source:e,line:r,column:s,baseLine:a,baseColumn:p},2)}})}function jl(o){let e=this.createList(),t=!1,r={recognizer:o};for(;!this.eof;){switch(this.tokenType){case 25:this.next();continue;case 13:t=!0,this.next();continue}let s=o.getNode.call(this,r);if(s===void 0)break;t&&(o.onWhiteSpace&&o.onWhiteSpace.call(this,s,e,r),t=!1),e.push(s)}return t&&o.onWhiteSpace&&o.onWhiteSpace.call(this,null,e,r),e}var po=()=>{},fS=33,xS=35,Oa=59,Vl=123,Ul=0,gS={createList(){return[]},createSingleNodeList(o){return[o]},getFirstListNode(o){return o&&o[0]||null},getLastListNode(o){return o&&o.length>0?o[o.length-1]:null}},bS={createList(){return new Bo},createSingleNodeList(o){return new Bo().appendData(o)},getFirstListNode(o){return o&&o.first},getLastListNode(o){return o&&o.last}};function yS(o){return function(){return this[o]()}}function Ma(o){let e=Object.create(null);for(let t of Object.keys(o)){let r=o[t],s=r.parse||r;s&&(e[t]=s)}return e}function AS(o){let e={context:Object.create(null),features:Object.assign(Object.create(null),o.features),scope:Object.assign(Object.create(null),o.scope),atrule:Ma(o.atrule),pseudo:Ma(o.pseudo),node:Ma(o.node)};for(let[t,r]of Object.entries(o.parseContext))switch(typeof r){case"function":e.context[t]=r;break;case"string":e.context[t]=yS(r);break}return{config:e,...e,...e.node}}function Hl(o){let e="",t="<unknown>",r=!1,s=po,a=!1,p=new ss,u=Object.assign(new ns,AS(o||{}),{parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:jl,consumeUntilBalanceEnd:()=>0,consumeUntilLeftCurlyBracket(x){return x===Vl?1:0},consumeUntilLeftCurlyBracketOrSemicolon(x){return x===Vl||x===Oa?1:0},consumeUntilExclamationMarkOrSemicolon(x){return x===fS||x===Oa?1:0},consumeUntilSemicolonIncluded(x){return x===Oa?2:0},createList:po,createSingleNodeList:po,getFirstListNode:po,getLastListNode:po,parseWithFallback(x,g){let z=this.tokenIndex;try{return x.call(this)}catch(w){if(a)throw w;this.skip(z-this.tokenIndex);let k=g.call(this);return a=!0,s(w,k),a=!1,k}},lookupNonWSType(x){let g;do if(g=this.lookupType(x++),g!==13&&g!==25)return g;while(g!==Ul);return Ul},charCodeAt(x){return x>=0&&x<e.length?e.charCodeAt(x):0},substring(x,g){return e.substring(x,g)},substrToCursor(x){return this.source.substring(x,this.tokenStart)},cmpChar(x,g){return In(e,x,g)},cmpStr(x,g,z){return Nt(e,x,g,z)},consume(x){let g=this.tokenStart;return this.eat(x),this.substrToCursor(g)},consumeFunctionName(){let x=e.substring(this.tokenStart,this.tokenEnd-1);return this.eat(2),x},consumeNumber(x){let g=e.substring(this.tokenStart,ts(e,this.tokenStart));return this.eat(x),g},eat(x){if(this.tokenType!==x){let g=to[x].slice(0,-6).replace(/-/g," ").replace(/^./,k=>k.toUpperCase()),z=`${/[[\](){}]/.test(g)?`"${g}"`:g} is expected`,w=this.tokenStart;switch(x){case 1:this.tokenType===2||this.tokenType===7?(w=this.tokenEnd-1,z="Identifier is expected but function found"):z="Identifier is expected";break;case 4:this.isDelim(xS)&&(this.next(),w++,z="Name is expected");break;case 11:this.tokenType===10&&(w=this.tokenEnd,z="Percent sign is expected");break}this.error(z,w)}this.next()},eatIdent(x){(this.tokenType!==1||this.lookupValue(0,x)===!1)&&this.error(`Identifier "${x}" is expected`),this.next()},eatDelim(x){this.isDelim(x)||this.error(`Delim "${String.fromCharCode(x)}" is expected`),this.next()},getLocation(x,g){return r?p.getLocationRange(x,g,t):null},getLocationFromList(x){if(r){let g=this.getFirstListNode(x),z=this.getLastListNode(x);return p.getLocationRange(g!==null?g.loc.start.offset-p.startOffset:this.tokenStart,z!==null?z.loc.end.offset-p.startOffset:this.tokenStart,t)}return null},error(x,g){let z=typeof g<"u"&&g<e.length?p.getLocation(g):this.eof?p.getLocation(ol(e,e.length-1)):p.getLocation(this.tokenStart);throw new wa(x||"Unexpected input",e,z.offset,z.line,z.column,p.startLine,p.startColumn)}}),f=()=>({filename:t,source:e,tokenCount:u.tokenCount,getTokenType:x=>u.getTokenType(x),getTokenTypeName:x=>to[u.getTokenType(x)],getTokenStart:x=>u.getTokenStart(x),getTokenEnd:x=>u.getTokenEnd(x),getTokenValue:x=>u.source.substring(u.getTokenStart(x),u.getTokenEnd(x)),substring:(x,g)=>u.source.substring(x,g),balance:u.balance.subarray(0,u.tokenCount+1),isBlockOpenerTokenType:u.isBlockOpenerTokenType,isBlockCloserTokenType:u.isBlockCloserTokenType,getBlockTokenPairIndex:x=>u.getBlockTokenPairIndex(x),getLocation:x=>p.getLocation(x,t),getRangeLocation:(x,g)=>p.getLocationRange(x,g,t)});return Object.assign(function(x,g){e=x,g=g||{},u.setSource(e,cl),p.setSource(e,g.offset,g.line,g.column),t=g.filename||"<unknown>",r=!!g.positions,s=typeof g.onParseError=="function"?g.onParseError:po,a=!1,u.parseAtrulePrelude="parseAtrulePrelude"in g?!!g.parseAtrulePrelude:!0,u.parseRulePrelude="parseRulePrelude"in g?!!g.parseRulePrelude:!0,u.parseValue="parseValue"in g?!!g.parseValue:!0,u.parseCustomProperty="parseCustomProperty"in g?!!g.parseCustomProperty:!1;let{context:z="default",list:w=!0,onComment:k,onToken:F}=g;if(!(z in u.context))throw new Error("Unknown context `"+z+"`");Object.assign(u,w?bS:gS),Array.isArray(F)?u.forEachToken((W,ee,de)=>{F.push({type:W,start:ee,end:de})}):typeof F=="function"&&u.forEachToken(F.bind(f())),typeof k=="function"&&u.forEachToken((W,ee,de)=>{if(W===25){let Te=u.getLocation(ee,de),xr=Nt(e,de-2,de,"*/")?e.slice(ee+2,de-2):e.slice(ee+2,de);k(xr,Te)}});let Y=u.context[z].call(u,g);return u.eof||u.error(),Y},{SyntaxError:wa,config:u.config})}var ka={};X(ka,{AtrulePrelude:()=>$l,Selector:()=>Kl,Value:()=>Jl});var SS=35,zS=42,Wl=43,TS=45,ES=47,CS=117;function jo(o){switch(this.tokenType){case 4:return this.Hash();case 18:return this.Operator();case 21:return this.Parentheses(this.readSequence,o.recognizer);case 19:return this.Brackets(this.readSequence,o.recognizer);case 5:return this.String();case 12:return this.Dimension();case 11:return this.Percentage();case 10:return this.Number();case 2:return this.cmpStr(this.tokenStart,this.tokenEnd,"url(")?this.Url():this.Function(this.readSequence,o.recognizer);case 7:return this.Url();case 1:return this.cmpChar(this.tokenStart,CS)&&this.cmpChar(this.tokenStart+1,Wl)?this.UnicodeRange():this.Identifier();case 9:{let e=this.charCodeAt(this.tokenStart);if(e===ES||e===zS||e===Wl||e===TS)return this.Operator();e===SS&&this.error("Hex or identifier is expected",this.tokenStart+1);break}}}var $l={getNode:jo};var IS=35,RS=38,wS=42,OS=43,MS=47,Gl=46,kS=62,PS=124,LS=126;function DS(o,e){e.last!==null&&e.last.type!=="Combinator"&&o!==null&&o.type!=="Combinator"&&e.push({type:"Combinator",loc:null,name:" "})}function vS(){switch(this.tokenType){case 19:return this.AttributeSelector();case 4:return this.IdSelector();case 16:return this.lookupType(1)===16?this.PseudoElementSelector():this.PseudoClassSelector();case 1:return this.TypeSelector();case 10:case 11:return this.Percentage();case 12:this.charCodeAt(this.tokenStart)===Gl&&this.error("Identifier is expected",this.tokenStart+1);break;case 9:{switch(this.charCodeAt(this.tokenStart)){case OS:case kS:case LS:case MS:return this.Combinator();case Gl:return this.ClassSelector();case wS:case PS:return this.TypeSelector();case IS:return this.IdSelector();case RS:return this.NestingSelector()}break}}}var Kl={onWhiteSpace:DS,getNode:vS};function ql(){return this.createSingleNodeList(this.Raw(null,!1))}function Yl(){let o=this.createList();if(this.skipSC(),o.push(this.Identifier()),this.skipSC(),this.tokenType===18){o.push(this.Operator());let e=this.tokenIndex,t=this.parseCustomProperty?this.Value(null):this.Raw(this.consumeUntilExclamationMarkOrSemicolon,!1);if(t.type==="Value"&&t.children.isEmpty){for(let r=e-this.tokenIndex;r<=0;r++)if(this.lookupType(r)===13){t.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}}o.push(t)}return o}function Ql(o){return o!==null&&o.type==="Operator"&&(o.value[o.value.length-1]==="-"||o.value[o.value.length-1]==="+")}var Jl={getNode:jo,onWhiteSpace(o,e){Ql(o)&&(o.value=" "+o.value),Ql(e.last)&&(e.last.value+=" ")},expression:ql,var:Yl};var FS=new Set(["none","and","not","or"]),Zl={parse:{prelude(){let o=this.createList();if(this.tokenType===1){let e=this.substring(this.tokenStart,this.tokenEnd);FS.has(e.toLowerCase())||o.push(this.Identifier())}return o.push(this.Condition("container")),o},block(o=!1){return this.Block(o)}}};var Xl={parse:{prelude:null,block(){return this.Block(!0)}}};function Pa(o,e){return this.parseWithFallback(()=>{try{return o.call(this)}finally{this.skipSC(),this.lookupNonWSType(0)!==22&&this.error()}},e||(()=>this.Raw(null,!0)))}var eu={layer(){this.skipSC();let o=this.createList(),e=Pa.call(this,this.Layer);return(e.type!=="Raw"||e.value!=="")&&o.push(e),o},supports(){this.skipSC();let o=this.createList(),e=Pa.call(this,this.Declaration,()=>Pa.call(this,()=>this.Condition("supports")));return(e.type!=="Raw"||e.value!=="")&&o.push(e),o}},tu={parse:{prelude(){let o=this.createList();switch(this.tokenType){case 5:o.push(this.String());break;case 7:case 2:o.push(this.Url());break;default:this.error("String or url() is expected")}return this.skipSC(),this.tokenType===1&&this.cmpStr(this.tokenStart,this.tokenEnd,"layer")?o.push(this.Identifier()):this.tokenType===2&&this.cmpStr(this.tokenStart,this.tokenEnd,"layer(")&&o.push(this.Function(null,eu)),this.skipSC(),this.tokenType===2&&this.cmpStr(this.tokenStart,this.tokenEnd,"supports(")&&o.push(this.Function(null,eu)),(this.lookupNonWSType(0)===1||this.lookupNonWSType(0)===21)&&o.push(this.MediaQueryList()),o},block:null}};var ou={parse:{prelude(){return this.createSingleNodeList(this.LayerList())},block(){return this.Block(!1)}}};var ru={parse:{prelude(){return this.createSingleNodeList(this.MediaQueryList())},block(o=!1){return this.Block(o)}}};var su={parse:{prelude(){return this.createSingleNodeList(this.SelectorList())},block(){return this.Block(!0)}}};var nu={parse:{prelude(){return this.createSingleNodeList(this.SelectorList())},block(){return this.Block(!0)}}};var iu={parse:{prelude(){return this.createSingleNodeList(this.Scope())},block(o=!1){return this.Block(o)}}};var au={parse:{prelude:null,block(o=!1){return this.Block(o)}}};var cu={parse:{prelude(){return this.createSingleNodeList(this.Condition("supports"))},block(o=!1){return this.Block(o)}}};var pu={container:Zl,"font-face":Xl,import:tu,layer:ou,media:ru,nest:su,page:nu,scope:iu,"starting-style":au,supports:cu};function du(){let o=this.createList();this.skipSC();e:for(;!this.eof;){switch(this.tokenType){case 1:o.push(this.Identifier());break;case 5:o.push(this.String());break;case 18:o.push(this.Operator());break;case 22:break e;default:this.error("Identifier, string or comma is expected")}this.skipSC()}return o}var Ut={parse(){return this.createSingleNodeList(this.SelectorList())}},La={parse(){return this.createSingleNodeList(this.Selector())}},NS={parse(){return this.createSingleNodeList(this.Identifier())}},_S={parse:du},us={parse(){return this.createSingleNodeList(this.Nth())}},lu={dir:NS,has:Ut,lang:_S,matches:Ut,is:Ut,"-moz-any":Ut,"-webkit-any":Ut,where:Ut,not:Ut,"nth-child":us,"nth-last-child":us,"nth-last-of-type":us,"nth-of-type":us,slotted:La,host:La,"host-context":La};var Da={};X(Da,{AnPlusB:()=>Mn,Atrule:()=>Pn,AtrulePrelude:()=>Dn,AttributeSelector:()=>Nn,Block:()=>Bn,Brackets:()=>Vn,CDC:()=>Hn,CDO:()=>$n,ClassSelector:()=>Kn,Combinator:()=>Yn,Comment:()=>Jn,Condition:()=>Xn,Declaration:()=>ti,DeclarationList:()=>si,Dimension:()=>ii,Feature:()=>ci,FeatureFunction:()=>di,FeatureRange:()=>mi,Function:()=>fi,GeneralEnclosed:()=>gi,Hash:()=>yi,IdSelector:()=>Ti,Identifier:()=>Si,Layer:()=>Ci,LayerList:()=>Ri,MediaQuery:()=>Oi,MediaQueryList:()=>ki,NestingSelector:()=>Li,Nth:()=>vi,Number:()=>Ni,Operator:()=>Bi,Parentheses:()=>Vi,Percentage:()=>Hi,PseudoClassSelector:()=>$i,PseudoElementSelector:()=>Ki,Ratio:()=>Yi,Raw:()=>Ji,Rule:()=>Xi,Scope:()=>ta,Selector:()=>ra,SelectorList:()=>na,String:()=>ca,StyleSheet:()=>da,SupportsDeclaration:()=>ua,TypeSelector:()=>fa,UnicodeRange:()=>ba,Url:()=>Sa,Value:()=>Ta,WhiteSpace:()=>Ca});var uu={parseContext:{default:"StyleSheet",stylesheet:"StyleSheet",atrule:"Atrule",atrulePrelude(o){return this.AtrulePrelude(o.atrule?String(o.atrule):null)},mediaQueryList:"MediaQueryList",mediaQuery:"MediaQuery",condition(o){return this.Condition(o.kind)},rule:"Rule",selectorList:"SelectorList",selector:"Selector",block(){return this.Block(!0)},declarationList:"DeclarationList",declaration:"Declaration",value:"Value"},features:{supports:{selector(){return this.Selector()}},container:{style(){return this.Declaration()}}},scope:ka,atrule:pu,pseudo:lu,node:Da};var mu=Hl(uu);var{hasOwnProperty:va}=Object.prototype,Vo=function(){};function hu(o){return typeof o=="function"?o:Vo}function fu(o,e){return function(t,r,s){t.type===e&&o.call(this,t,r,s)}}function BS(o,e){let t=e.structure,r=[];for(let s in t){if(va.call(t,s)===!1)continue;let a=t[s],p={name:s,type:!1,nullable:!1};Array.isArray(a)||(a=[a]);for(let u of a)u===null?p.nullable=!0:typeof u=="string"?p.type="node":Array.isArray(u)&&(p.type="list");p.type&&r.push(p)}return r.length?{context:e.walkContext,fields:r}:null}function jS(o){let e={};for(let t in o.node)if(va.call(o.node,t)){let r=o.node[t];if(!r.structure)throw new Error("Missed `structure` field in `"+t+"` node type definition");e[t]=BS(t,r)}return e}function xu(o,e){let t=o.fields.slice(),r=o.context,s=typeof r=="string";return e&&t.reverse(),function(a,p,u,f){let m;s&&(m=p[r],p[r]=a);for(let x of t){let g=a[x.name];if(!x.nullable||g){if(x.type==="list"){if(e?g.reduceRight(f,!1):g.reduce(f,!1))return!0}else if(u(g))return!0}}s&&(p[r]=m)}}function gu({StyleSheet:o,Atrule:e,Rule:t,Block:r,DeclarationList:s}){return{Atrule:{StyleSheet:o,Atrule:e,Rule:t,Block:r},Rule:{StyleSheet:o,Atrule:e,Rule:t,Block:r},Declaration:{StyleSheet:o,Atrule:e,Rule:t,Block:r,DeclarationList:s}}}function bu(o){let e=jS(o),t={},r={},s=Symbol("break-walk"),a=Symbol("skip-node");for(let m in e)va.call(e,m)&&e[m]!==null&&(t[m]=xu(e[m],!1),r[m]=xu(e[m],!0));let p=gu(t),u=gu(r),f=function(m,x){function g(W,ee,de){let Te=z.call(Y,W,ee,de);return Te===s?!0:Te===a?!1:!!(k.hasOwnProperty(W.type)&&k[W.type](W,Y,g,F)||w.call(Y,W,ee,de)===s)}let z=Vo,w=Vo,k=t,F=(W,ee,de,Te)=>W||g(ee,de,Te),Y={break:s,skip:a,root:m,stylesheet:null,atrule:null,atrulePrelude:null,rule:null,selector:null,block:null,declaration:null,function:null};if(typeof x=="function")z=x;else if(x&&(z=hu(x.enter),w=hu(x.leave),x.reverse&&(k=r),x.visit)){if(p.hasOwnProperty(x.visit))k=x.reverse?u[x.visit]:p[x.visit];else if(!e.hasOwnProperty(x.visit))throw new Error("Bad value `"+x.visit+"` for `visit` option (should be: "+Object.keys(e).sort().join(", ")+")");z=fu(z,x.visit),w=fu(w,x.visit)}if(z===Vo&&w===Vo)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");g(m)};return f.break=s,f.skip=a,f.find=function(m,x){let g=null;return f(m,function(z,w,k){if(x.call(this,z,w,k))return g=z,s}),g},f.findLast=function(m,x){let g=null;return f(m,{reverse:!0,enter(z,w,k){if(x.call(this,z,w,k))return g=z,s}}),g},f.findAll=function(m,x){let g=[];return f(m,function(z,w,k){x.call(this,z,w,k)&&g.push(z)}),g},f}var Fa={};X(Fa,{AnPlusB:()=>kn,Atrule:()=>Ln,AtrulePrelude:()=>vn,AttributeSelector:()=>_n,Block:()=>jn,Brackets:()=>Un,CDC:()=>Wn,CDO:()=>Gn,ClassSelector:()=>qn,Combinator:()=>Qn,Comment:()=>Zn,Condition:()=>ei,Declaration:()=>oi,DeclarationList:()=>ni,Dimension:()=>ai,Feature:()=>pi,FeatureFunction:()=>li,FeatureRange:()=>hi,Function:()=>xi,GeneralEnclosed:()=>bi,Hash:()=>Ai,IdSelector:()=>Ei,Identifier:()=>zi,Layer:()=>Ii,LayerList:()=>wi,MediaQuery:()=>Mi,MediaQueryList:()=>Pi,NestingSelector:()=>Di,Nth:()=>Fi,Number:()=>_i,Operator:()=>ji,Parentheses:()=>Ui,Percentage:()=>Wi,PseudoClassSelector:()=>Gi,PseudoElementSelector:()=>qi,Ratio:()=>Qi,Raw:()=>Zi,Rule:()=>ea,Scope:()=>oa,Selector:()=>sa,SelectorList:()=>ia,String:()=>pa,StyleSheet:()=>la,SupportsDeclaration:()=>ma,TypeSelector:()=>xa,UnicodeRange:()=>ya,Url:()=>za,Value:()=>Ea,WhiteSpace:()=>Ia});var yu={node:Fa};var Au=bu(yu);var VS=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),he="\uFFFD",S;(function(o){o[o.EOF=-1]="EOF",o[o.NULL=0]="NULL",o[o.TABULATION=9]="TABULATION",o[o.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",o[o.LINE_FEED=10]="LINE_FEED",o[o.FORM_FEED=12]="FORM_FEED",o[o.SPACE=32]="SPACE",o[o.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",o[o.QUOTATION_MARK=34]="QUOTATION_MARK",o[o.AMPERSAND=38]="AMPERSAND",o[o.APOSTROPHE=39]="APOSTROPHE",o[o.HYPHEN_MINUS=45]="HYPHEN_MINUS",o[o.SOLIDUS=47]="SOLIDUS",o[o.DIGIT_0=48]="DIGIT_0",o[o.DIGIT_9=57]="DIGIT_9",o[o.SEMICOLON=59]="SEMICOLON",o[o.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",o[o.EQUALS_SIGN=61]="EQUALS_SIGN",o[o.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",o[o.QUESTION_MARK=63]="QUESTION_MARK",o[o.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",o[o.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",o[o.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",o[o.GRAVE_ACCENT=96]="GRAVE_ACCENT",o[o.LATIN_SMALL_A=97]="LATIN_SMALL_A",o[o.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(S||(S={}));var Ne={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function ms(o){return o>=55296&&o<=57343}function Su(o){return o>=56320&&o<=57343}function zu(o,e){return(o-55296)*1024+9216+e}function hs(o){return o!==32&&o!==10&&o!==13&&o!==9&&o!==12&&o>=1&&o<=31||o>=127&&o<=159}function fs(o){return o>=64976&&o<=65007||VS.has(o)}var D;(function(o){o.controlCharacterInInputStream="control-character-in-input-stream",o.noncharacterInInputStream="noncharacter-in-input-stream",o.surrogateInInputStream="surrogate-in-input-stream",o.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",o.endTagWithAttributes="end-tag-with-attributes",o.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",o.unexpectedSolidusInTag="unexpected-solidus-in-tag",o.unexpectedNullCharacter="unexpected-null-character",o.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",o.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",o.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",o.missingEndTagName="missing-end-tag-name",o.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",o.unknownNamedCharacterReference="unknown-named-character-reference",o.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",o.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",o.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",o.eofBeforeTagName="eof-before-tag-name",o.eofInTag="eof-in-tag",o.missingAttributeValue="missing-attribute-value",o.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",o.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",o.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",o.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",o.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",o.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",o.missingDoctypePublicIdentifier="missing-doctype-public-identifier",o.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",o.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",o.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",o.cdataInHtmlContent="cdata-in-html-content",o.incorrectlyOpenedComment="incorrectly-opened-comment",o.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",o.eofInDoctype="eof-in-doctype",o.nestedComment="nested-comment",o.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",o.eofInComment="eof-in-comment",o.incorrectlyClosedComment="incorrectly-closed-comment",o.eofInCdata="eof-in-cdata",o.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",o.nullCharacterReference="null-character-reference",o.surrogateCharacterReference="surrogate-character-reference",o.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",o.controlCharacterReference="control-character-reference",o.noncharacterCharacterReference="noncharacter-character-reference",o.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",o.missingDoctypeName="missing-doctype-name",o.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",o.duplicateAttribute="duplicate-attribute",o.nonConformingDoctype="non-conforming-doctype",o.missingDoctype="missing-doctype",o.misplacedDoctype="misplaced-doctype",o.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",o.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",o.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",o.openElementsLeftAfterEof="open-elements-left-after-eof",o.abandonedHeadElementChild="abandoned-head-element-child",o.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",o.nestedNoscriptInHead="nested-noscript-in-head",o.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(D||(D={}));var HS=65536,xs=class{constructor(e){this.handler=e,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=HS,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,t){let{line:r,col:s,offset:a}=this,p=s+t,u=a+t;return{code:e,startLine:r,endLine:r,startCol:p,endCol:p,startOffset:u,endOffset:u}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){let t=this.html.charCodeAt(this.pos+1);if(Su(t))return this.pos++,this._addGap(),zu(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,S.EOF;return this._err(D.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let r=0;r<e.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==e.charCodeAt(r))return!1;return!0}peek(e){let t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,S.EOF;let r=this.html.charCodeAt(t);return r===S.CARRIAGE_RETURN?S.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,S.EOF;let e=this.html.charCodeAt(this.pos);return e===S.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,S.LINE_FEED):e===S.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,ms(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===S.LINE_FEED||e===S.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){hs(e)?this._err(D.controlCharacterInInputStream):fs(e)&&this._err(D.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}};var ie;(function(o){o[o.CHARACTER=0]="CHARACTER",o[o.NULL_CHARACTER=1]="NULL_CHARACTER",o[o.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",o[o.START_TAG=3]="START_TAG",o[o.END_TAG=4]="END_TAG",o[o.COMMENT=5]="COMMENT",o[o.DOCTYPE=6]="DOCTYPE",o[o.EOF=7]="EOF",o[o.HIBERNATION=8]="HIBERNATION"})(ie||(ie={}));function gs(o,e){for(let t=o.attrs.length-1;t>=0;t--)if(o.attrs[t].name===e)return o.attrs[t].value;return null}var $S=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function Tu(o){return o>=55296&&o<=57343||o>1114111?65533:$S.get(o)??o}function Eu(o){let e=atob(o),t=e.length&-2,r=new Uint16Array(t/2);for(let s=0,a=0;s<t;s+=2){let p=e.charCodeAt(s),u=e.charCodeAt(s+1);r[a++]=p|u<<8}return r}var Na=Eu("QR08ALkAAgH6AYsDNQR2BO0EPgXZBQEGLAbdBxMISQrvCmQLfQurDKQNLw4fD4YPpA+6D/IPAAAAAAAAAAAAAAAAKhBMEY8TmxUWF2EYLBkxGuAa3RsJHDscWR8YIC8jSCSIJcMl6ie3Ku8rEC0CLjoupS7kLgAIRU1hYmNmZ2xtbm9wcnN0dVQAWgBeAGUAaQBzAHcAfgCBAIQAhwCSAJoAoACsALMAbABpAGcAO4DGAMZAUAA7gCYAJkBjAHUAdABlADuAwQDBQHIiZXZlAAJhAAFpeW0AcgByAGMAO4DCAMJAEGRyAADgNdgE3XIAYQB2AGUAO4DAAMBA8CFoYZFj4SFjcgBhZAAAoFMqAAFncIsAjgBvAG4ABGFmAADgNdg43fAlbHlGdW5jdGlvbgCgYSBpAG4AZwA7gMUAxUAAAWNzpACoAHIAAOA12Jzc6SFnbgCgVCJpAGwAZABlADuAwwDDQG0AbAA7gMQAxEAABGFjZWZvcnN1xQDYANoA7QDxAPYA+QD8AAABY3LJAM8AayNzbGFzaAAAoBYidgHTANUAAKDnKmUAZAAAoAYjeQARZIABY3J0AOAA5QDrAGEidXNlAACgNSLuI291bGxpcwCgLCFhAJJjcgAA4DXYBd1wAGYAAOA12Dnd5SF2ZdhiYwDyAOoAbSJwZXEAAKBOIgAHSE9hY2RlZmhpbG9yc3UXARoBHwE6AVIBVQFiAWQBZgGCAakB6QHtAfIBYwB5ACdkUABZADuAqQCpQIABY3B5ACUBKAE1AfUhdGUGYWmg0iJ0KGFsRGlmZmVyZW50aWFsRAAAoEUhbCJleXMAAKAtIQACYWVpb0EBRAFKAU0B8iFvbgxhZABpAGwAO4DHAMdAcgBjAAhhbiJpbnQAAKAwIm8AdAAKYQABZG5ZAV0BaSJsbGEAuGB0I2VyRG90ALdg8gA5AWkAp2NyImNsZQAAAkRNUFRwAXQBeQF9AW8AdAAAoJkiaSJudXMAAKCWIuwhdXMAoJUiaSJtZXMAAKCXIm8AAAFjc4cBlAFrKndpc2VDb250b3VySW50ZWdyYWwAAKAyImUjQ3VybHkAAAFEUZwBpAFvJXVibGVRdW90ZQAAoB0gdSJvdGUAAKAZIAACbG5wdbABtgHNAdgBbwBuAGWgNyIAoHQqgAFnaXQAvAHBAcUB8iJ1ZW50AKBhIm4AdAAAoC8i7yV1ckludGVncmFsAKAuIgABZnLRAdMBAKACIe8iZHVjdACgECJuLnRlckNsb2Nrd2lzZUNvbnRvdXJJbnRlZ3JhbAAAoDMi7yFzcwCgLypjAHIAAOA12J7ccABDoNMiYQBwAACgTSKABURKU1phY2VmaW9zAAsCEgIVAhgCGwIsAjQCOQI9AnMCfwNvoEUh9CJyYWhkAKARKWMAeQACZGMAeQAFZGMAeQAPZIABZ3JzACECJQIoAuchZXIAoCEgcgAAoKEhaAB2AACg5CoAAWF5MAIzAvIhb24OYRRkbAB0oAciYQCUY3IAAOA12AfdAAFhZkECawIAAWNtRQJnAvIjaXRpY2FsAAJBREdUUAJUAl8CYwJjInV0ZQC0YG8AdAFZAloC2WJiJGxlQWN1dGUA3WJyImF2ZQBgYGkibGRlANxi7yFuZACgxCJmJWVyZW50aWFsRAAAoEYhcAR9AgAAAAAAAIECjgIAABoDZgAA4DXYO91EoagAhQKJAm8AdAAAoNwgcSJ1YWwAAKBQIuIhbGUAA0NETFJVVpkCqAK1Au8C/wIRA28AbgB0AG8AdQByAEkAbgB0AGUAZwByAGEA7ADEAW8AdAKvAgAAAACwAqhgbiNBcnJvdwAAoNMhAAFlb7kC0AJmAHQAgAFBUlQAwQLGAs0CciJyb3cAAKDQIekkZ2h0QXJyb3cAoNQhZQDlACsCbgBnAAABTFLWAugC5SFmdAABQVLcAuECciJyb3cAAKD4J+kkZ2h0QXJyb3cAoPon6SRnaHRBcnJvdwCg+SdpImdodAAAAUFU9gL7AnIicm93AACg0iFlAGUAAKCoInAAQQIGAwAAAAALA3Iicm93AACg0SFvJHduQXJyb3cAAKDVIWUlcnRpY2FsQmFyAACgJSJuAAADQUJMUlRhJAM2AzoDWgNxA3oDciJyb3cAAKGTIUJVLAMwA2EAcgAAoBMpcCNBcnJvdwAAoPUhciJldmUAEWPlIWZ00gJDAwAASwMAAFIDaSVnaHRWZWN0b3IAAKBQKWUkZVZlY3RvcgAAoF4p5SJjdG9yQqC9IWEAcgAAoFYpaSJnaHQA1AFiAwAAaQNlJGVWZWN0b3IAAKBfKeUiY3RvckKgwSFhAHIAAKBXKWUAZQBBoKQiciJyb3cAAKCnIXIAcgBvAPcAtAIAAWN0gwOHA3IAAOA12J/c8iFvaxBhAAhOVGFjZGZnbG1vcHFzdHV4owOlA6kDsAO/A8IDxgPNA9ID8gP9AwEEFAQeBCAEJQRHAEphSAA7gNAA0EBjAHUAdABlADuAyQDJQIABYWl5ALYDuQO+A/Ihb24aYXIAYwA7gMoAykAtZG8AdAAWYXIAAOA12AjdcgBhAHYAZQA7gMgAyEDlIm1lbnQAoAgiAAFhcNYD2QNjAHIAEmF0AHkAUwLhAwAAAADpA20lYWxsU3F1YXJlAACg+yVlJ3J5U21hbGxTcXVhcmUAAKCrJQABZ3D2A/kDbwBuABhhZgAA4DXYPN3zImlsb26VY3UAAAFhaQYEDgRsAFSgdSppImxkZQAAoEIi7CNpYnJpdW0AoMwhAAFjaRgEGwRyAACgMCFtAACgcyphAJdjbQBsADuAywDLQAABaXApBC0E8yF0cwCgAyLvJG5lbnRpYWxFAKBHIYACY2Zpb3MAPQQ/BEMEXQRyBHkAJGRyAADgNdgJ3WwibGVkAFMCTAQAAAAAVARtJWFsbFNxdWFyZQAAoPwlZSdyeVNtYWxsU3F1YXJlAACgqiVwA2UEAABpBAAAAABtBGYAAOA12D3dwSFsbACgACLyI2llcnRyZgCgMSFjAPIAcQQABkpUYWJjZGZnb3JzdIgEiwSOBJMElwSkBKcEqwStBLIE5QTqBGMAeQADZDuAPgA+QO0hbWFkoJMD3GNyImV2ZQAeYYABZWl5AJ0EoASjBOQhaWwiYXIAYwAcYRNkbwB0ACBhcgAA4DXYCt0AoNkicABmAADgNdg+3eUiYXRlcgADRUZHTFNUvwTIBM8E1QTZBOAEcSJ1YWwATKBlIuUhc3MAoNsidSRsbEVxdWFsAACgZyJyI2VhdGVyAACgoirlIXNzAKB3IuwkYW50RXF1YWwAoH4qaSJsZGUAAKBzImMAcgAA4DXYotwAoGsiAARBYWNmaW9zdfkE/QQFBQgFCwUTBSIFKwVSIkRjeQAqZAABY3QBBQQFZQBrAMdiXmDpIXJjJGFyAACgDCFsJWJlcnRTcGFjZQAAoAsh8AEYBQAAGwVmAACgDSHpJXpvbnRhbExpbmUAoAAlAAFjdCYFKAXyABIF8iFvayZhbQBwAEQBMQU5BW8AdwBuAEgAdQBtAPAAAAFxInVhbAAAoE8iAAdFSk9hY2RmZ21ub3N0dVMFVgVZBVwFYwVtBXAFcwV6BZAFtgXFBckFzQVjAHkAFWTsIWlnMmFjAHkAAWRjAHUAdABlADuAzQDNQAABaXlnBWwFcgBjADuAzgDOQBhkbwB0ADBhcgAAoBEhcgBhAHYAZQA7gMwAzEAAoREhYXB/BYsFAAFjZ4MFhQVyACphaSNuYXJ5SQAAoEghbABpAGUA8wD6AvQBlQUAAKUFZaAsIgABZ3KaBZ4F8iFhbACgKyLzI2VjdGlvbgCgwiJpI3NpYmxlAAABQ1SsBbEFbyJtbWEAAKBjIGkibWVzAACgYiCAAWdwdAC8Bb8FwwVvAG4ALmFmAADgNdhA3WEAmWNjAHIAAKAQIWkibGRlAChh6wHSBQAA1QVjAHkABmRsADuAzwDPQIACY2Zvc3UA4QXpBe0F8gX9BQABaXnlBegFcgBjADRhGWRyAADgNdgN3XAAZgAA4DXYQd3jAfcFAAD7BXIAAOA12KXc8iFjeQhk6yFjeQRkgANISmFjZm9zAAwGDwYSBhUGHQYhBiYGYwB5ACVkYwB5AAxk8CFwYZpjAAFleRkGHAbkIWlsNmEaZHIAAOA12A7dcABmAADgNdhC3WMAcgAA4DXYptyABUpUYWNlZmxtb3N0AD0GQAZDBl4GawZkB2gHcAd0B80H2gdjAHkACWQ7gDwAPECAAmNtbnByAEwGTwZSBlUGWwb1IXRlOWHiIWRhm2NnAACg6ifsI2FjZXRyZgCgEiFyAACgniGAAWFleQBkBmcGagbyIW9uPWHkIWlsO2EbZAABZnNvBjQHdAAABUFDREZSVFVWYXKABp4GpAbGBssG3AYDByEHwQIqBwABbnKEBowGZyVsZUJyYWNrZXQAAKDoJ/Ihb3cAoZAhQlKTBpcGYQByAACg5CHpJGdodEFycm93AKDGIWUjaWxpbmcAAKAII28A9QGqBgAAsgZiJWxlQnJhY2tldAAAoOYnbgDUAbcGAAC+BmUkZVZlY3RvcgAAoGEp5SJjdG9yQqDDIWEAcgAAoFkpbCJvb3IAAKAKI2kiZ2h0AAABQVbSBtcGciJyb3cAAKCUIeUiY3RvcgCgTikAAWVy4AbwBmUAAKGjIkFW5gbrBnIicm93AACgpCHlImN0b3IAoFopaSNhbmdsZQBCorIi+wYAAAAA/wZhAHIAAKDPKXEidWFsAACgtCJwAIABRFRWAAoHEQcYB+8kd25WZWN0b3IAoFEpZSRlVmVjdG9yAACgYCnlImN0b3JCoL8hYQByAACgWCnlImN0b3JCoLwhYQByAACgUilpAGcAaAB0AGEAcgByAG8A9wDMAnMAAANFRkdMU1Q/B0cHTgdUB1gHXwfxJXVhbEdyZWF0ZXIAoNoidSRsbEVxdWFsAACgZiJyI2VhdGVyAACgdiLlIXNzAKChKuwkYW50RXF1YWwAoH0qaSJsZGUAAKByInIAAOA12A/dZaDYIuYjdGFycm93AKDaIWkiZG90AD9hgAFucHcAege1B7kHZwAAAkxSbHKCB5QHmwerB+UhZnQAAUFSiAeNB3Iicm93AACg9SfpJGdodEFycm93AKD3J+kkZ2h0QXJyb3cAoPYn5SFmdAABYXLcAqEHaQBnAGgAdABhAHIAcgBvAPcA5wJpAGcAaAB0AGEAcgByAG8A9wDuAmYAAOA12EPdZQByAAABTFK/B8YHZSRmdEFycm93AACgmSHpJGdodEFycm93AKCYIYABY2h0ANMH1QfXB/IAWgYAoLAh8iFva0FhAKBqIgAEYWNlZmlvc3XpB+wH7gf/BwMICQgOCBEIcAAAoAUpeQAcZAABZGzyB/kHaSR1bVNwYWNlAACgXyBsI2ludHJmAACgMyFyAADgNdgQ3e4jdXNQbHVzAKATInAAZgAA4DXYRN1jAPIA/gecY4AESmFjZWZvc3R1ACEIJAgoCDUIgQiFCDsKQApHCmMAeQAKZGMidXRlAENhgAFhZXkALggxCDQI8iFvbkdh5CFpbEVhHWSAAWdzdwA7CGEIfQjhInRpdmWAAU1UVgBECEwIWQhlJWRpdW1TcGFjZQAAoAsgaABpAAABY25SCFMIawBTAHAAYQBjAOUASwhlAHIAeQBUAGgAaQDuAFQI9CFlZAABR0xnCHUIcgBlAGEAdABlAHIARwByAGUAYQB0AGUA8gDrBGUAcwBzAEwAZQBzAPMA2wdMImluZQAKYHIAAOA12BHdAAJCbnB0jAiRCJkInAhyImVhawAAoGAgwiZyZWFraW5nU3BhY2WgYGYAAKAVIUOq7CqzCMIIzQgAAOcIGwkAAAAAAAAtCQAAbwkAAIcJAACdCcAJGQoAADQKAAFvdbYIvAjuI2dydWVudACgYiJwIkNhcAAAoG0ibyh1YmxlVmVydGljYWxCYXIAAKAmIoABbHF4ANII1wjhCOUibWVudACgCSL1IWFsVKBgImkibGRlAADgQiI4A2kic3RzAACgBCJyI2VhdGVyAACjbyJFRkdMU1T1CPoIAgkJCQ0JFQlxInVhbAAAoHEidSRsbEVxdWFsAADgZyI4A3IjZWF0ZXIAAOBrIjgD5SFzcwCgeSLsJGFudEVxdWFsAOB+KjgDaSJsZGUAAKB1IvUhbXBEASAJJwnvI3duSHVtcADgTiI4A3EidWFsAADgTyI4A2UAAAFmczEJRgn0JFRyaWFuZ2xlQqLqIj0JAAAAAEIJYQByAADgzyk4A3EidWFsAACg7CJzAICibiJFR0xTVABRCVYJXAlhCWkJcSJ1YWwAAKBwInIjZWF0ZXIAAKB4IuUhc3MA4GoiOAPsJGFudEVxdWFsAOB9KjgDaSJsZGUAAKB0IuUic3RlZAABR0x1CX8J8iZlYXRlckdyZWF0ZXIA4KIqOAPlI3NzTGVzcwDgoSo4A/IjZWNlZGVzAKGAIkVTjwmVCXEidWFsAADgryo4A+wkYW50RXF1YWwAoOAiAAFlaaAJqQl2JmVyc2VFbGVtZW50AACgDCLnJWh0VHJpYW5nbGVCousitgkAAAAAuwlhAHIAAODQKTgDcSJ1YWwAAKDtIgABcXXDCeAJdSNhcmVTdQAAAWJwywnVCfMhZXRF4I8iOANxInVhbAAAoOIi5SJyc2V0ReCQIjgDcSJ1YWwAAKDjIoABYmNwAOYJ8AkNCvMhZXRF4IIi0iBxInVhbAAAoIgi4yJlZWRzgKGBIkVTVAD6CQAKBwpxInVhbAAA4LAqOAPsJGFudEVxdWFsAKDhImkibGRlAADgfyI4A+UicnNldEXggyLSIHEidWFsAACgiSJpImxkZQCAoUEiRUZUACIKJwouCnEidWFsAACgRCJ1JGxsRXF1YWwAAKBHImkibGRlAACgSSJlJXJ0aWNhbEJhcgAAoCQiYwByAADgNdip3GkAbABkAGUAO4DRANFAnWMAB0VhY2RmZ21vcHJzdHV2XgphCmgKcgp2CnoKgQqRCpYKqwqtCrsKyArNCuwhaWdSYWMAdQB0AGUAO4DTANNAAAFpeWwKcQpyAGMAO4DUANRAHmRiImxhYwBQYXIAAOA12BLdcgBhAHYAZQA7gNIA0kCAAWFlaQCHCooKjQpjAHIATGFnAGEAqWNjInJvbgCfY3AAZgAA4DXYRt3lI25DdXJseQABRFGeCqYKbyV1YmxlUXVvdGUAAKAcIHUib3RlAACgGCAAoFQqAAFjbLEKtQpyAADgNdiq3GEAcwBoADuA2ADYQGkAbAHACsUKZABlADuA1QDVQGUAcwAAoDcqbQBsADuA1gDWQGUAcgAAAUJQ0wrmCgABYXLXCtoKcgAAoD4gYQBjAAABZWvgCuIKAKDeI2UAdAAAoLQjYSVyZW50aGVzaXMAAKDcI4AEYWNmaGlsb3JzAP0KAwsFCwkLCwsMCxELIwtaC3IjdGlhbEQAAKACInkAH2RyAADgNdgT3WkApmOgY/Ujc01pbnVzsWAAAWlwFQsgC24AYwBhAHIAZQBwAGwAYQBuAOUACgVmAACgGSGAobsqZWlvACoLRQtJC+MiZWRlc4CheiJFU1QANAs5C0ALcSJ1YWwAAKCvKuwkYW50RXF1YWwAoHwiaSJsZGUAAKB+Im0AZQAAoDMgAAFkcE0LUQv1IWN0AKAPIm8jcnRpb24AYaA3ImwAAKAdIgABY2leC2ILcgAA4DXYq9yoYwACVWZvc2oLbwtzC3cLTwBUADuAIgAiQHIAAOA12BTdcABmAACgGiFjAHIAAOA12KzcAAZCRWFjZWZoaW9yc3WPC5MLlwupC7YL2AvbC90LhQyTDJoMowzhIXJyAKAQKUcAO4CuAK5AgAFjbnIAnQugC6ML9SF0ZVRhZwAAoOsncgB0oKAhbAAAoBYpgAFhZXkArwuyC7UL8iFvblhh5CFpbFZhIGR2oBwhZSJyc2UAAAFFVb8LzwsAAWxxwwvIC+UibWVudACgCyL1JGlsaWJyaXVtAKDLIXAmRXF1aWxpYnJpdW0AAKBvKXIAAKAcIW8AoWPnIWh0AARBQ0RGVFVWYewLCgwQDDIMNwxeDHwM9gIAAW5y8Av4C2clbGVCcmFja2V0AACg6SfyIW93AKGSIUJM/wsDDGEAcgAAoOUhZSRmdEFycm93AACgxCFlI2lsaW5nAACgCSNvAPUBFgwAAB4MYiVsZUJyYWNrZXQAAKDnJ24A1AEjDAAAKgxlJGVWZWN0b3IAAKBdKeUiY3RvckKgwiFhAHIAAKBVKWwib29yAACgCyMAAWVyOwxLDGUAAKGiIkFWQQxGDHIicm93AACgpiHlImN0b3IAoFspaSNhbmdsZQBCorMiVgwAAAAAWgxhAHIAAKDQKXEidWFsAACgtSJwAIABRFRWAGUMbAxzDO8kd25WZWN0b3IAoE8pZSRlVmVjdG9yAACgXCnlImN0b3JCoL4hYQByAACgVCnlImN0b3JCoMAhYQByAACgUykAAXB1iQyMDGYAAKAdIe4kZEltcGxpZXMAoHAp6SRnaHRhcnJvdwCg2yEAAWNongyhDHIAAKAbIQCgsSHsJGVEZWxheWVkAKD0KYAGSE9hY2ZoaW1vcXN0dQC/DMgMzAzQDOIM5gwKDQ0NFA0ZDU8NVA1YDQABQ2PDDMYMyCFjeSlkeQAoZEYiVGN5ACxkYyJ1dGUAWmEAorwqYWVpedgM2wzeDOEM8iFvbmBh5CFpbF5hcgBjAFxhIWRyAADgNdgW3e8hcnQAAkRMUlXvDPYM/QwEDW8kd25BcnJvdwAAoJMhZSRmdEFycm93AACgkCHpJGdodEFycm93AKCSIXAjQXJyb3cAAKCRIechbWGjY+EkbGxDaXJjbGUAoBgicABmAADgNdhK3XICHw0AAAAAIg10AACgGiLhIXJlgKGhJUlTVQAqDTINSg3uJXRlcnNlY3Rpb24AoJMidQAAAWJwNw1ADfMhZXRFoI8icSJ1YWwAAKCRIuUicnNldEWgkCJxInVhbAAAoJIibiJpb24AAKCUImMAcgAA4DXYrtxhAHIAAKDGIgACYmNtcF8Nag2ODZANc6DQImUAdABFoNAicSJ1YWwAAKCGIgABY2huDYkNZSJlZHMAgKF7IkVTVAB4DX0NhA1xInVhbAAAoLAq7CRhbnRFcXVhbACgfSJpImxkZQAAoH8iVABoAGEA9ADHCwCgESIAodEiZXOVDZ8NciJzZXQARaCDInEidWFsAACghyJlAHQAAKDRIoAFSFJTYWNmaGlvcnMAtQ27Db8NyA3ODdsN3w3+DRgOHQ4jDk8AUgBOADuA3gDeQMEhREUAoCIhAAFIY8MNxg1jAHkAC2R5ACZkAAFidcwNzQ0JYKRjgAFhZXkA1A3XDdoN8iFvbmRh5CFpbGJhImRyAADgNdgX3QABZWnjDe4N8gHoDQAA7Q3lImZvcmUAoDQiYQCYYwABY27yDfkNayNTcGFjZQAA4F8gCiDTInBhY2UAoAkg7CFkZYChPCJFRlQABw4MDhMOcSJ1YWwAAKBDInUkbGxFcXVhbAAAoEUiaSJsZGUAAKBIInAAZgAA4DXYS93pI3BsZURvdACg2yAAAWN0Jw4rDnIAAOA12K/c8iFva2Zh4QpFDlYOYA5qDgAAbg5yDgAAAAAAAAAAAAB5DnwOqA6zDgAADg8RDxYPGg8AAWNySA5ODnUAdABlADuA2gDaQHIAb6CfIeMhaXIAoEkpcgDjAVsOAABdDnkADmR2AGUAbGEAAWl5Yw5oDnIAYwA7gNsA20AjZGIibGFjAHBhcgAA4DXYGN1yAGEAdgBlADuA2QDZQOEhY3JqYQABZGl/Dp8OZQByAAABQlCFDpcOAAFhcokOiw5yAF9gYQBjAAABZWuRDpMOAKDfI2UAdAAAoLUjYSVyZW50aGVzaXMAAKDdI28AbgBQoMMi7CF1cwCgjiIAAWdwqw6uDm8AbgByYWYAAOA12EzdAARBREVUYWRwc78O0g7ZDuEOBQPqDvMOBw9yInJvdwDCoZEhyA4AAMwOYQByAACgEilvJHduQXJyb3cAAKDFIW8kd25BcnJvdwAAoJUhcSV1aWxpYnJpdW0AAKBuKWUAZQBBoKUiciJyb3cAAKClIW8AdwBuAGEAcgByAG8A9wAQA2UAcgAAAUxS+Q4AD2UkZnRBcnJvdwAAoJYh6SRnaHRBcnJvdwCglyFpAGyg0gNvAG4ApWPpIW5nbmFjAHIAAOA12LDcaSJsZGUAaGFtAGwAO4DcANxAgAREYmNkZWZvc3YALQ8xDzUPNw89D3IPdg97D4AP4SFzaACgqyJhAHIAAKDrKnkAEmThIXNobKCpIgCg5ioAAWVyQQ9DDwCgwSKAAWJ0eQBJD00Paw9hAHIAAKAWIGmgFiDjIWFsAAJCTFNUWA9cD18PZg9hAHIAAKAjIukhbmV8YGUkcGFyYXRvcgAAoFgnaSJsZGUAAKBAItQkaGluU3BhY2UAoAogcgAA4DXYGd1wAGYAAOA12E3dYwByAADgNdix3GQiYXNoAACgqiKAAmNlZm9zAI4PkQ+VD5kPng/pIXJjdGHkIWdlAKDAInIAAOA12BrdcABmAADgNdhO3WMAcgAA4DXYstwAAmZpb3OqD64Prw+0D3IAAOA12BvdnmNwAGYAAOA12E/dYwByAADgNdiz3IAEQUlVYWNmb3N1AMgPyw/OD9EP2A/gD+QP6Q/uD2MAeQAvZGMAeQAHZGMAeQAuZGMAdQB0AGUAO4DdAN1AAAFpedwP3w9yAGMAdmErZHIAAOA12BzdcABmAADgNdhQ3WMAcgAA4DXYtNxtAGwAeGEABEhhY2RlZm9z/g8BEAUQDRAQEB0QIBAkEGMAeQAWZGMidXRlAHlhAAFheQkQDBDyIW9ufWEXZG8AdAB7YfIBFRAAABwQbwBXAGkAZAB0AOgAVAhhAJZjcgAAoCghcABmAACgJCFjAHIAAOA12LXc4QtCEEkQTRAAAGcQbRByEAAAAAAAAAAAeRCKEJcQ8hD9EAAAGxEhETIROREAAD4RYwB1AHQAZQA7gOEA4UByImV2ZQADYYCiPiJFZGl1eQBWEFkQWxBgEGUQAOA+IjMDAKA/InIAYwA7gOIA4kB0AGUAO4C0ALRAMGRsAGkAZwA7gOYA5kByoGEgAOA12B7dcgBhAHYAZQA7gOAA4EAAAWVwfBCGEAABZnCAEIQQ8yF5bQCgNSHoAIMQaABhALFjAAFhcI0QWwAAAWNskRCTEHIAAWFnAACgPypkApwQAAAAALEQAKInImFkc3ajEKcQqRCuEG4AZAAAoFUqAKBcKmwib3BlAACgWCoAoFoqAKMgImVsbXJzersQvRDAEN0Q5RDtEACgpCllAACgICJzAGQAYaAhImEEzhDQENIQ1BDWENgQ2hDcEACgqCkAoKkpAKCqKQCgqykAoKwpAKCtKQCgrikAoK8pdAB2oB8iYgBkoL4iAKCdKQABcHTpEOwQaAAAoCIixWDhIXJyAKB8IwABZ3D1EPgQbwBuAAVhZgAA4DXYUt0Ao0giRWFlaW9wBxEJEQ0RDxESERQRAKBwKuMhaXIAoG8qAKBKImQAAKBLInMAJ2DyIW94ZaBIIvEADhFpAG4AZwA7gOUA5UCAAWN0eQAmESoRKxFyAADgNdi23CpgbQBwAGWgSCLxAPgBaQBsAGQAZQA7gOMA40BtAGwAO4DkAORAAAFjaUERRxFvAG4AaQBuAPQA6AFuAHQAAKARKgAITmFiY2RlZmlrbG5vcHJzdWQRaBGXEZ8RpxGrEdIR1hErEjASexKKEn0RThNbE3oTbwB0AACg7SoAAWNybBGJEWsAAAJjZXBzdBF4EX0RghHvIW5nAKBMInAjc2lsb24A9mNyImltZQAAoDUgaQBtAGWgPSJxAACgzSJ2AY0RkRFlAGUAAKC9ImUAZABnoAUjZQAAoAUjcgBrAHSgtSPiIXJrAKC2IwABb3mjEaYRbgDnAHcRMWTxIXVvAKAeIIACY21wcnQAtBG5Eb4RwRHFEeEhdXPloDUi5ABwInR5dgAAoLApcwDpAH0RbgBvAPUA6gCAAWFodwDLEcwRzhGyYwCgNiHlIWVuAKBsInIAAOA12B/dZwCAA2Nvc3R1dncA4xHyEQUSEhIhEiYSKRKAAWFpdQDpEesR7xHwAKMFcgBjAACg7yVwAACgwyKAAWRwdAD4EfwRABJvAHQAAKAAKuwhdXMAoAEqaSJtZXMAAKACKnECCxIAAAAADxLjIXVwAKAGKmEAcgAAoAUm8iNpYW5nbGUAAWR1GhIeEu8hd24AoL0lcAAAoLMlcCJsdXMAAKAEKmUA5QBCD+UAkg9hInJvdwAAoA0pgAFha28ANhJoEncSAAFjbjoSZRJrAIABbHN0AEESRxJNEm8jemVuZ2UAAKDrKXEAdQBhAHIA5QBcBPIjaWFuZ2xlgKG0JWRscgBYElwSYBLvIXduAKC+JeUhZnQAoMIlaSJnaHQAAKC4JWsAAKAjJLEBbRIAAHUSsgFxEgAAcxIAoJIlAKCRJTQAAKCTJWMAawAAoIglAAFlb38ShxJx4D0A5SD1IWl2AOBhIuUgdAAAoBAjAAJwdHd4kRKVEpsSnxJmAADgNdhT3XSgpSJvAG0AAKClIvQhaWUAoMgiAAZESFVWYmRobXB0dXayEsES0RLgEvcS+xIKExoTHxMjEygTNxMAAkxSbHK5ErsSvRK/EgCgVyUAoFQlAKBWJQCgUyUAolAlRFVkdckSyxLNEs8SAKBmJQCgaSUAoGQlAKBnJQACTFJsctgS2hLcEt4SAKBdJQCgWiUAoFwlAKBZJQCjUSVITFJobHLrEu0S7xLxEvMS9RIAoGwlAKBjJQCgYCUAoGslAKBiJQCgXyVvAHgAAKDJKQACTFJscgITBBMGEwgTAKBVJQCgUiUAoBAlAKAMJQCiACVEVWR1EhMUExYTGBMAoGUlAKBoJQCgLCUAoDQlaSJudXMAAKCfIuwhdXMAoJ4iaSJtZXMAAKCgIgACTFJsci8TMRMzEzUTAKBbJQCgWCUAoBglAKAUJQCjAiVITFJobHJCE0QTRhNIE0oTTBMAoGolAKBhJQCgXiUAoDwlAKAkJQCgHCUAAWV2UhNVE3YA5QD5AGIAYQByADuApgCmQAACY2Vpb2ITZhNqE24TcgAA4DXYt9xtAGkAAKBPIG0A5aA9IogRbAAAoVwAYmh0E3YTAKDFKfMhdWIAoMgnbAF+E4QTbABloCIgdAAAoCIgcAAAoU4iRWWJE4sTAKCuKvGgTyI8BeEMqRMAAN8TABQDFB8UAAAjFDQUAAAAAIUUAAAAAI0UAAAAANcU4xT3FPsUAACIFQAAlhWAAWNwcgCuE7ET1RP1IXRlB2GAoikiYWJjZHMAuxO/E8QTzhPSE24AZAAAoEQqciJjdXAAAKBJKgABYXXIE8sTcAAAoEsqcAAAoEcqbwB0AACgQCoA4CkiAP4AAWVv2RPcE3QAAKBBIO4ABAUAAmFlaXXlE+8T9RP4E/AB6hMAAO0TcwAAoE0qbwBuAA1hZABpAGwAO4DnAOdAcgBjAAlhcABzAHOgTCptAACgUCpvAHQAC2GAAWRtbgAIFA0UEhRpAGwAO4C4ALhAcCJ0eXYAAKCyKXQAAIGiADtlGBQZFKJAcgBkAG8A9ABiAXIAAOA12CDdgAFjZWkAKBQqFDIUeQBHZGMAawBtoBMn4SFyawCgEyfHY3IAAKPLJUVjZWZtcz8UQRRHFHcUfBSAFACgwykAocYCZWxGFEkUcQAAoFciZQBhAlAUAAAAAGAUciJyb3cAAAFsclYUWhTlIWZ0AKC6IWkiZ2h0AACguyGAAlJTYWNkAGgUaRRrFG8UcxSuYACgyCRzAHQAAKCbIukhcmMAoJoi4SFzaACgnSJuImludAAAoBAqaQBkAACg7yrjIWlyAKDCKfUhYnN1oGMmaQB0AACgYybsApMUmhS2FAAAwxRvAG4AZaA6APGgVCKrAG0CnxQAAAAAoxRhAHSgLABAYAChASJmbKcUqRTuABMNZQAAAW14rhSyFOUhbnQAoAEiZQDzANIB5wG6FAAAwBRkoEUibwB0AACgbSpuAPQAzAGAAWZyeQDIFMsUzhQA4DXYVN1vAOQA1wEAgakAO3MeAdMUcgAAoBchAAFhb9oU3hRyAHIAAKC1IXMAcwAAoBcnAAFjdeYU6hRyAADgNdi43AABYnDuFPIUZaDPKgCg0SploNAqAKDSKuQhb3QAoO8igANkZWxwcnZ3AAYVEBUbFSEVRBVlFYQV4SFycgABbHIMFQ4VAKA4KQCgNSlwAhYVAAAAABkVcgAAoN4iYwAAoN8i4SFycnCgtiEAoD0pgKIqImJjZG9zACsVMBU6FT4VQRVyImNhcAAAoEgqAAFhdTQVNxVwAACgRipwAACgSipvAHQAAKCNInIAAKBFKgDgKiIA/gACYWxydksVURVuFXMVcgByAG2gtyEAoDwpeQCAAWV2dwBYFWUVaRVxAHACXxUAAAAAYxVyAGUA4wAXFXUA4wAZFWUAZQAAoM4iZSJkZ2UAAKDPImUAbgA7gKQApEBlI2Fycm93AAABbHJ7FX8V5SFmdACgtiFpImdodAAAoLchZQDkAG0VAAFjaYsVkRVvAG4AaQBuAPQAkwFuAHQAAKAxImwiY3R5AACgLSOACUFIYWJjZGVmaGlqbG9yc3R1d3oAuBW7Fb8V1RXgFegV+RUKFhUWHxZUFlcWZRbFFtsW7xb7FgUXChdyAPIAtAJhAHIAAKBlKQACZ2xyc8YVyhXOFdAV5yFlcgCgICDlIXRoAKA4IfIA9QxoAHagECAAoKMiawHZFd4VYSJyb3cAAKAPKWEA4wBfAgABYXnkFecV8iFvbg9hNGQAoUYhYW/tFfQVAAFnciEC8RVyAACgyiF0InNlcQAAoHcqgAFnbG0A/xUCFgUWO4CwALBAdABhALRjcCJ0eXYAAKCxKQABaXIOFhIW8yFodACgfykA4DXYId1hAHIAAAFschsWHRYAoMMhAKDCIYACYWVnc3YAKBauAjYWOhY+Fm0AAKHEIm9zLhY0Fm4AZABzoMQi9SFpdACgZiZhIm1tYQDdY2kAbgAAoPIiAKH3AGlvQxZRFmQAZQAAgfcAO29KFksW90BuI3RpbWVzAACgxyJuAPgAUBZjAHkAUmRjAG8CXhYAAAAAYhZyAG4AAKAeI28AcAAAoA0jgAJscHR1dwBuFnEWdRaSFp4W7CFhciRgZgAA4DXYVd0AotkCZW1wc30WhBaJFo0WcQBkoFAibwB0AACgUSJpIm51cwAAoDgi7CF1cwCgFCLxInVhcmUAoKEiYgBsAGUAYgBhAHIAdwBlAGQAZwDlANcAbgCAAWFkaAClFqoWtBZyAHIAbwD3APUMbwB3AG4AYQByAHIAbwB3APMA8xVhI3Jwb29uAAABbHK8FsAWZQBmAPQAHBZpAGcAaAD0AB4WYgHJFs8WawBhAHIAbwD3AJILbwLUFgAAAADYFnIAbgAAoB8jbwBwAACgDCOAAWNvdADhFukW7BYAAXJ55RboFgDgNdi53FVkbAAAoPYp8iFvaxFhAAFkcvMW9xZvAHQAAKDxImkA5qC/JVsSAAFhaP8WAhdyAPIANQNhAPIA1wvhIm5nbGUAoKYpAAFjaQ4XEBd5AF9k5yJyYXJyAKD/JwAJRGFjZGVmZ2xtbm9wcXJzdHV4MRc4F0YXWxcyBF4XaRd5F40XrBe0F78X2RcVGCEYLRg1GEAYAAFEbzUXgRZvAPQA+BUAAWNzPBdCF3UAdABlADuA6QDpQPQhZXIAoG4qAAJhaW95TRdQF1YXWhfyIW9uG2FyAGOgViI7gOoA6kDsIW9uAKBVIk1kbwB0ABdhAAFEcmIXZhdvAHQAAKBSIgDgNdgi3XKhmipuF3QXYQB2AGUAO4DoAOhAZKCWKm8AdAAAoJgqgKGZKmlscwCAF4UXhxfuInRlcnMAoOcjAKATIWSglSpvAHQAAKCXKoABYXBzAJMXlheiF2MAcgATYXQAeQBzogUinxcAAAAAoRdlAHQAAKAFInAAMaADIDMBqRerFwCgBCAAoAUgAAFnc7AXsRdLYXAAAKACIAABZ3C4F7sXbwBuABlhZgAA4DXYVt2AAWFscwDFF8sXzxdyAHOg1SJsAACg4yl1AHMAAKBxKmkAAKG1A2x21RfYF28AbgC1Y/VjAAJjc3V24BfoF/0XEBgAAWlv5BdWF3IAYwAAoFYiaQLuFwAAAADwF+0ADQThIW50AAFnbPUX+Rd0AHIAAKCWKuUhc3MAoJUqgAFhZWkAAxgGGAoYbABzAD1gcwB0AACgXyJ2AESgYSJEAACgeCrwImFyc2wAoOUpAAFEYRkYHRhvAHQAAKBTInIAcgAAoHEpgAFjZGkAJxgqGO0XcgAAoC8hbwD0AIwCAAFhaDEYMhi3YzuA8ADwQAABbXI5GD0YbAA7gOsA60BvAACgrCCAAWNpcABGGEgYSxhsACFgcwD0ACwEAAFlb08YVxhjAHQAYQB0AGkAbwDuABoEbgBlAG4AdABpAGEAbADlADME4Ql1GAAAgRgAAIMYiBgAAAAAoRilGAAAqhgAALsYvhjRGAAA1xgnGWwAbABpAG4AZwBkAG8AdABzAGUA8QBlF3kARGRtImFsZQAAoEAmgAFpbHIAjRiRGJ0Y7CFpZwCgA/tpApcYAAAAAJoYZwAAoAD7aQBnAACgBPsA4DXYI93sIWlnAKAB++whaWcA4GYAagCAAWFsdACvGLIYthh0AACgbSZpAGcAAKAC+24AcwAAoLElbwBmAJJh8AHCGAAAxhhmAADgNdhX3QABYWvJGMwYbADsAGsEdqDUIgCg2SphI3J0aW50AACgDSoAAWFv2hgiGQABY3PeGB8ZsQPnGP0YBRkSGRUZAAAdGbID7xjyGPQY9xj5GAAA+xg7gL0AvUAAoFMhO4C8ALxAAKBVIQCgWSEAoFshswEBGQAAAxkAoFQhAKBWIbQCCxkOGQAAAAAQGTuAvgC+QACgVyEAoFwhNQAAoFghtgEZGQAAGxkAoFohAKBdITgAAKBeIWwAAKBEIHcAbgAAoCIjYwByAADgNdi73IAIRWFiY2RlZmdpamxub3JzdHYARhlKGVoZXhlmGWkZkhmWGZkZnRmgGa0ZxhnLGc8Z4BkjGmygZyIAoIwqgAFjbXAAUBlTGVgZ9SF0ZfVhbQBhAOSgswM6FgCghipyImV2ZQAfYQABaXliGWUZcgBjAB1hM2RvAHQAIWGAoWUibHFzAMYEcBl6GfGhZSLOBAAAdhlsAGEAbgD0AN8EgKF+KmNkbACBGYQZjBljAACgqSpvAHQAb6CAKmyggioAoIQqZeDbIgD+cwAAoJQqcgAA4DXYJN3noGsirATtIWVsAKA3IWMAeQBTZIChdyJFYWoApxmpGasZAKCSKgCgpSoAoKQqAAJFYWVztBm2Gb0ZwhkAoGkicABwoIoq8iFveACgiipxoIgq8aCIKrUZaQBtAACg5yJwAGYAAOA12FjdYQB2AOUAYwIAAWNp0xnWGXIAAKAKIW0AAKFzImVs3BneGQCgjioAoJAqAIM+ADtjZGxxco0E6xn0GfgZ/BkBGgABY2nvGfEZAKCnKnIAAKB6Km8AdAAAoNci0CFhcgCglSl1ImVzdAAAoHwqgAJhZGVscwAKGvQZFhrVBCAa8AEPGgAAFBpwAHIAbwD4AFkZcgAAoHgpcQAAAWxxxAQbGmwAZQBzAPMASRlpAO0A5AQAAWVuJxouGnIjdG5lcXEAAOBpIgD+xQAsGgAFQWFiY2Vma29zeUAaQxpmGmoabRqDGocalhrCGtMacgDyAMwCAAJpbG1yShpOGlAaVBpyAHMA8ABxD2YAvWBpAGwA9AASBQABZHJYGlsaYwB5AEpkAKGUIWN3YBpkGmkAcgAAoEgpAKCtIWEAcgAAoA8h6SFyYyVhgAFhbHIAcxp7Gn8a8iF0c3WgZSZpAHQAAKBlJuwhaXAAoCYg4yFvbgCguSJyAADgNdgl3XMAAAFld4wakRphInJvdwAAoCUpYSJyb3cAAKAmKYACYW1vcHIAnxqjGqcauhq+GnIAcgAAoP8h9CFodACgOyJrAAABbHKsGrMaZSRmdGFycm93AACgqSHpJGdodGFycm93AKCqIWYAAOA12Fnd4iFhcgCgFSCAAWNsdADIGswa0BpyAADgNdi93GEAcwDoAGka8iFvaydhAAFicNca2xr1IWxsAKBDIOghZW4AoBAg4Qr2GgAA/RoAAAgbExsaGwAAIRs7GwAAAAA+G2IbmRuVG6sbAACyG80b0htjAHUAdABlADuA7QDtQAChYyBpeQEbBhtyAGMAO4DuAO5AOGQAAWN4CxsNG3kANWRjAGwAO4ChAKFAAAFmcssCFhsA4DXYJt1yAGEAdgBlADuA7ADsQIChSCFpbm8AJxsyGzYbAAFpbisbLxtuAHQAAKAMKnQAAKAtIuYhaW4AoNwpdABhAACgKSHsIWlnM2GAAWFvcABDG1sbXhuAAWNndABJG0sbWRtyACthgAFlbHAAcQVRG1UbaQBuAOUAyAVhAHIA9AByBWgAMWFmAACgtyJlAGQAtWEAoggiY2ZvdGkbbRt1G3kb4SFyZQCgBSFpAG4AdKAeImkAZQAAoN0pZABvAPQAWxsAoisiY2VscIEbhRuPG5QbYQBsAACguiIAAWdyiRuNG2UAcgDzACMQ4wCCG2EicmhrAACgFyryIW9kAKA8KgACY2dwdJ8boRukG6gbeQBRZG8AbgAvYWYAAOA12FrdYQC5Y3UAZQBzAHQAO4C/AL9AAAFjabUbuRtyAADgNdi+3G4AAKIIIkVkc3bCG8QbyBvQAwCg+SJvAHQAAKD1Inag9CIAoPMiaaBiIOwhZGUpYesB1hsAANkbYwB5AFZkbAA7gO8A70AAA2NmbW9zdeYb7hvyG/Ub+hsFHAABaXnqG+0bcgBjADVhOWRyAADgNdgn3eEhdGg3YnAAZgAA4DXYW93jAf8bAAADHHIAAOA12L/c8iFjeVhk6yFjeVRkAARhY2ZnaGpvcxUcGhwiHCYcKhwtHDAcNRzwIXBhdqC6A/BjAAFleR4cIRzkIWlsN2E6ZHIAAOA12CjdciJlZW4AOGFjAHkARWRjAHkAXGRwAGYAAOA12FzdYwByAADgNdjA3IALQUJFSGFiY2RlZmdoamxtbm9wcnN0dXYAXhxtHHEcdRx5HN8cBx0dHTwd3B3tHfEdAR4EHh0eLB5FHrwewx7hHgkfPR9LH4ABYXJ0AGQcZxxpHHIA8gBvB/IAxQLhIWlsAKAbKeEhcnIAoA4pZ6BmIgCgiyphAHIAAKBiKWMJjRwAAJAcAACVHAAAAAAAAAAAAACZHJwcAACmHKgcrRwAANIc9SF0ZTph7SJwdHl2AKC0KXIAYQDuAFoG4iFkYbtjZwAAoegnZGyhHKMcAKCRKeUAiwYAoIUqdQBvADuAqwCrQHIAgKOQIWJmaGxwc3QAuhy/HMIcxBzHHMoczhxmoOQhcwAAoB8pcwAAoB0p6wCyGnAAAKCrIWwAAKA5KWkAbQAAoHMpbAAAoKIhAKGrKmFl1hzaHGkAbAAAoBkpc6CtKgDgrSoA/oABYWJyAOUc6RztHHIAcgAAoAwpcgBrAACgcicAAWFr8Rz4HGMAAAFla/Yc9xx7YFtgAAFlc/wc/hwAoIspbAAAAWR1Ax0FHQCgjykAoI0pAAJhZXV5Dh0RHRodHB3yIW9uPmEAAWRpFR0YHWkAbAA8YewAowbiAPccO2QAAmNxcnMkHScdLB05HWEAAKA2KXUAbwDyoBwgqhEAAWR1MB00HeghYXIAoGcpcyJoYXIAAKBLKWgAAKCyIQCiZCJmZ3FzRB1FB5Qdnh10AIACYWhscnQATh1WHWUdbB2NHXIicm93AHSgkCFhAOkAzxxhI3Jwb29uAAABZHVeHWId7yF3bgCgvSFwAACgvCHlJGZ0YXJyb3dzAKDHIWkiZ2h0AIABYWhzAHUdex2DHXIicm93APOglCGdBmEAcgBwAG8AbwBuAPMAzgtxAHUAaQBnAGEAcgByAG8A9wBlGugkcmVldGltZXMAoMsi8aFkIk0HAACaHWwAYQBuAPQAXgcAon0qY2Rnc6YdqR2xHbcdYwAAoKgqbwB0AG+gfypyoIEqAKCDKmXg2iIA/nMAAKCTKoACYWRlZ3MAwB3GHcod1h3ZHXAAcAByAG8A+ACmHG8AdAAAoNYicQAAAWdxzx3SHXQA8gBGB2cAdADyAHQcdADyAFMHaQDtAGMHgAFpbHIA4h3mHeod8yFodACgfClvAG8A8gDKBgDgNdgp3UWgdiIAoJEqYQH1Hf4dcgAAAWR1YB35HWygvCEAoGopbABrAACghCVjAHkAWWQAomoiYWNodAweDx4VHhkecgDyAGsdbwByAG4AZQDyAGAW4SFyZACgaylyAGkAAKD6JQABaW8hHiQe5CFvdEBh9SFzdGGgsCPjIWhlAKCwIwACRWFlczMeNR48HkEeAKBoInAAcKCJKvIhb3gAoIkqcaCHKvGghyo0HmkAbQAAoOYiAARhYm5vcHR3elIeXB5fHoUelh6mHqsetB4AAW5yVh5ZHmcAAKDsJ3IAAKD9IXIA6wCwBmcAgAFsbXIAZh52Hnse5SFmdAABYXKIB2weaQBnAGgAdABhAHIAcgBvAPcAkwfhInBzdG8AoPwnaQBnAGgAdABhAHIAcgBvAPcAmgdwI2Fycm93AAABbHKNHpEeZQBmAPQAxhxpImdodAAAoKwhgAFhZmwAnB6fHqIecgAAoIUpAOA12F3ddQBzAACgLSppIm1lcwAAoDQqYQGvHrMecwB0AACgFyLhAIoOZaHKJbkeRhLuIWdlAKDKJWEAcgBsoCgAdAAAoJMpgAJhY2htdADMHs8e1R7bHt0ecgDyAJ0GbwByAG4AZQDyANYWYQByAGSgyyEAoG0pAKAOIHIAaQAAoL8iAANhY2hpcXTrHu8e1QfzHv0eBh/xIXVvAKA5IHIAAOA12MHcbQDloXIi+h4AAPweAKCNKgCgjyoAAWJ19xwBH28AcqAYIACgGiDyIW9rQmEAhDwAO2NkaGlscXJCBhcfxh0gHyQfKB8sHzEfAAFjaRsfHR8AoKYqcgAAoHkqcgBlAOUAkx3tIWVzAKDJIuEhcnIAoHYpdSJlc3QAAKB7KgABUGk1HzkfYQByAACglillocMlAgdfEnIAAAFkdUIfRx9zImhhcgAAoEop6CFhcgCgZikAAWVuTx9WH3IjdG5lcXEAAOBoIgD+xQBUHwAHRGFjZGVmaGlsbm9wc3VuH3Ifoh+rH68ftx+7H74f5h/uH/MfBwj/HwsgxCFvdACgOiIAAmNscHJ5H30fiR+eH3IAO4CvAK9AAAFldIEfgx8AoEImZaAgJ3MAZQAAoCAnc6CmIXQAbwCAoaYhZGx1AJQfmB+cH28AdwDuAHkDZQBmAPQA6gbwAOkO6yFlcgCgriUAAW95ph+qH+0hbWEAoCkqPGThIXNoAKAUIOElc3VyZWRhbmdsZQCgISJyAADgNdgq3W8AAKAnIYABY2RuAMQfyR/bH3IAbwA7gLUAtUBhoiMi0B8AANMf1x9zAPQAKxFpAHIAAKDwKm8AdAA7gLcAt0B1AHMA4qESIh4TAADjH3WgOCIAoCoqYwHqH+0fcAAAoNsq8gB+GnAAbAB1APMACAgAAWRw9x/7H+UhbHMAoKciZgAA4DXYXt0AAWN0AyAHIHIAAOA12MLc8CFvcwCgPiJsobwDECAVIPQiaW1hcACguCJhAPAAEyAADEdMUlZhYmNkZWZnaGlqbG1vcHJzdHV2dzwgRyBmIG0geSCqILgg2iDeIBEhFSEyIUMhTSFQIZwhnyHSIQAiIyKLIrEivyIUIwABZ3RAIEMgAODZIjgD9uBrItIgBwmAAWVsdABNIF8gYiBmAHQAAAFhclMgWCByInJvdwAAoM0h6SRnaHRhcnJvdwCgziEA4NgiOAP24Goi0iBfCekkZ2h0YXJyb3cAoM8hAAFEZHEgdSDhIXNoAKCvIuEhc2gAoK4igAJiY25wdACCIIYgiSCNIKIgbABhAACgByL1IXRlRGFnAADgICLSIACiSSJFaW9wlSCYIJwgniAA4HAqOANkAADgSyI4A3MASWFyAG8A+AAyCnUAcgBhoG4mbADzoG4mmwjzAa8gAACzIHAAO4CgAKBAbQBwAOXgTiI4AyoJgAJhZW91eQDBIMogzSDWINkg8AHGIAAAyCAAoEMqbwBuAEhh5CFpbEZhbgBnAGSgRyJvAHQAAOBtKjgDcAAAoEIqPWThIXNoAKATIACjYCJBYWRxc3jpIO0g+SD+IAIhDCFyAHIAAKDXIXIAAAFocvIg9SBrAACgJClvoJch9wAGD28AdAAA4FAiOAN1AGkA9gC7CAABZWkGIQohYQByAACgKCntAN8I6SFzdPOgBCLlCHIAAOA12CvdAAJFZXN0/wgcISshLiHxoXEiIiEAABMJ8aFxIgAJAAAnIWwAYQBuAPQAEwlpAO0AGQlyoG8iAKBvIoABQWFwADghOyE/IXIA8gBeIHIAcgAAoK4hYQByAACg8ipzogsiSiEAAAAAxwtkoPwiAKD6ImMAeQBaZIADQUVhZGVzdABcIV8hYiFmIWkhkyGWIXIA8gBXIADgZiI4A3IAcgAAoJohcgAAoCUggKFwImZxcwBwIYQhjiF0AAABYXJ1IXohcgByAG8A9wBlIWkAZwBoAHQAYQByAHIAbwD3AD4h8aFwImAhAACKIWwAYQBuAPQAZwlz4H0qOAMAoG4iaQDtAG0JcqBuImkA5aDqIkUJaQDkADoKAAFwdKMhpyFmAADgNdhf3YCBrAA7aW4AriGvIcchrEBuAIChCSJFZHYAtyG6Ib8hAOD5IjgDbwB0AADg9SI4A+EB1gjEIcYhAKD3IgCg9iJpAHagDCLhAagJzyHRIQCg/iIAoP0igAFhb3IA2CHsIfEhcgCAoSYiYXN0AOAh5SHpIWwAbABlAOwAywhsAADg/SrlIADgAiI4A2wiaW50AACgFCrjoYAi9yEAAPohdQDlAJsJY+CvKjgDZaCAIvEAkwkAAkFhaXQHIgoiFyIeInIA8gBsIHIAcgAAoZshY3cRIhQiAOAzKTgDAOCdITgDZyRodGFycm93AACgmyFyAGkA5aDrIr4JgANjaGltcHF1AC8iPCJHIpwhTSJQIloigKGBImNlcgA2Iv0JOSJ1AOUABgoA4DXYw9zvIXJ0bQKdIQAAAABEImEAcgDhAOEhbQBloEEi8aBEIiYKYQDyAMsIcwB1AAABYnBWIlgi5QDUCeUA3wmAAWJjcABgInMieCKAoYQiRWVzAGci7glqIgDgxSo4A2UAdABl4IIi0iBxAPGgiCJoImMAZaCBIvEA/gmAoYUiRWVzAH8iFgqCIgDgxio4A2UAdABl4IMi0iBxAPGgiSKAIgACZ2lscpIilCKaIpwi7AAMCWwAZABlADuA8QDxQOcAWwlpI2FuZ2xlAAABbHKkIqoi5SFmdGWg6iLxAEUJaSJnaHQAZaDrIvEAvgltoL0DAKEjAGVzuCK8InIAbwAAoBYhcAAAoAcggARESGFkZ2lscnMAziLSItYi2iLeIugi7SICIw8j4SFzaACgrSLhIXJyAKAEKXAAAOBNItIg4SFzaACgrCIAAWV04iLlIgDgZSLSIADgPgDSIG4iZmluAACg3imAAUFldADzIvci+iJyAHIAAKACKQDgZCLSIHLgPADSIGkAZQAA4LQi0iAAAUF0BiMKI3IAcgAAoAMp8iFpZQDgtSLSIGkAbQAA4Dwi0iCAAUFhbgAaIx4jKiNyAHIAAKDWIXIAAAFociMjJiNrAACgIylvoJYh9wD/DuUhYXIAoCcpUxJqFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVCMAAF4jaSN/I4IjjSOeI8AUAAAAAKYjwCMAANoj3yMAAO8jHiQvJD8kRCQAAWNzVyNsFHUAdABlADuA8wDzQAABaXlhI2cjcgBjoJoiO4D0APRAPmSAAmFiaW9zAHEjdCN3I3EBeiNzAOgAdhTsIWFjUWF2AACgOCrvIWxkAKC8KewhaWdTYQABY3KFI4kjaQByAACgvykA4DXYLN1vA5QjAAAAAJYjAACcI24A22JhAHYAZQA7gPIA8kAAoMEpAAFibaEjjAphAHIAAKC1KQACYWNpdKwjryO6I70jcgDyAFkUAAFpcrMjtiNyAACgvinvIXNzAKC7KW4A5QDZCgCgwCmAAWFlaQDFI8gjyyNjAHIATWFnAGEAyWOAAWNkbgDRI9Qj1iPyIW9uv2MAoLYpdQDzAHgBcABmAADgNdhg3YABYWVsAOQj5yPrI3IAAKC3KXIAcAAAoLkpdQDzAHwBAKMoImFkaW9zdvkj/CMPJBMkFiQbJHIA8gBeFIChXSplZm0AAyQJJAwkcgBvoDQhZgAAoDQhO4CqAKpAO4C6ALpA5yFvZgCgtiJyAACgVipsIm9wZQAAoFcqAKBbKoABY2xvACMkJSQrJPIACCRhAHMAaAA7gPgA+EBsAACgmCJpAGwBMyQ4JGQAZQA7gPUA9UBlAHMAYaCXInMAAKA2Km0AbAA7gPYA9kDiIWFyAKA9I+EKXiQAAHokAAB8JJQkAACYJKkkAAAAALUkEQsAAPAkAAAAAAQleiUAAIMlcgCAoSUiYXN0AGUkbyQBCwCBtgA7bGokayS2QGwAZQDsABgDaQJ1JAAAAAB4JG0AAKDzKgCg/Sp5AD9kcgCAAmNpbXB0AIUkiCSLJJkSjyRuAHQAJWBvAGQALmBpAGwAAKAwIOUhbmsAoDEgcgAA4DXYLd2AAWltbwCdJKAkpCR2oMYD1WNtAGEA9AD+B24AZQAAoA4m9KHAA64kAAC0JGMjaGZvcmsAAKDUItZjAAFhdbgkxCRuAAABY2u9JMIkawBooA8hAKAOIfYAaRpzAACkKwBhYmNkZW1zdNMkIRPXJNsk4STjJOck6yTjIWlyAKAjKmkAcgAAoCIqAAFvdYsW3yQAoCUqAKByKm4AO4CxALFAaQBtAACgJip3AG8AAKAnKoABaXB1APUk+iT+JO4idGludACgFSpmAADgNdhh3W4AZAA7gKMAo0CApHoiRWFjZWlub3N1ABMlFSUYJRslTCVRJVklSSV1JQCgsypwAACgtyp1AOUAPwtjoK8qgKJ6ImFjZW5zACclLSU0JTYlSSVwAHAAcgBvAPgAFyV1AHIAbAB5AGUA8QA/C/EAOAuAAWFlcwA8JUElRSXwInByb3gAoLkqcQBxAACgtSppAG0AAKDoImkA7QBEC20AZQDzoDIgIguAAUVhcwBDJVclRSXwAEAlgAFkZnAATwtfJXElgAFhbHMAZSVpJW0l7CFhcgCgLiPpIW5lAKASI/UhcmYAoBMjdKAdIu8AWQvyIWVsAKCwIgABY2l9JYElcgAA4DXYxdzIY24iY3NwAACgCCAAA2Zpb3BzdZElKxuVJZolnyWkJXIAAOA12C7dcABmAADgNdhi3XIiaW1lAACgVyBjAHIAAOA12MbcgAFhZW8AqiW6JcAldAAAAWVpryW2JXIAbgBpAG8AbgDzABkFbgB0AACgFipzAHQAZaA/APEACRj0AG0LgApBQkhhYmNkZWZoaWxtbm9wcnN0dXgA4yXyJfYl+iVpJpAmpia9JtUm5ib4JlonaCdxJ3UnnietJ7EnyCfiJ+cngAFhcnQA6SXsJe4lcgDyAJkM8gD6AuEhaWwAoBwpYQByAPIA3BVhAHIAAKBkKYADY2RlbnFydAAGJhAmEyYYJiYmKyZaJgABZXUKJg0mAOA9IjEDdABlAFVhaQDjACAN7SJwdHl2AKCzKWcAgKHpJ2RlbAAgJiImJCYAoJIpAKClKeUA9wt1AG8AO4C7ALtAcgAApZIhYWJjZmhscHN0dz0mQCZFJkcmSiZMJk4mUSZVJlgmcAAAoHUpZqDlIXMAAKAgKQCgMylzAACgHinrALka8ACVHmwAAKBFKWkAbQAAoHQpbAAAoKMhAKCdIQABYWleJmImaQBsAACgGilvAG6gNiJhAGwA8wB2C4ABYWJyAG8mciZ2JnIA8gAvEnIAawAAoHMnAAFha3omgSZjAAABZWt/JoAmfWBdYAABZXOFJocmAKCMKWwAAAFkdYwmjiYAoI4pAKCQKQACYWV1eZcmmiajJqUm8iFvbllhAAFkaZ4moSZpAGwAV2HsAA8M4gCAJkBkAAJjbHFzrSawJrUmuiZhAACgNylkImhhcgAAoGkpdQBvAPKgHSCjAWgAAKCzIYABYWNnAMMm0iaUC2wAgKEcIWlwcwDLJs4migxuAOUAoAxhAHIA9ADaC3QAAKCtJYABaWxyANsm3ybjJvMhaHQAoH0pbwBvAPIANgwA4DXYL90AAWFv6ib1JnIAAAFkde8m8SYAoMEhbKDAIQCgbCl2oMED8WOAAWducwD+Jk4nUCdoAHQAAANhaGxyc3QKJxInISc1Jz0nRydyInJvdwB0oJIhYQDpAFYmYSNycG9vbgAAAWR1GiceJ28AdwDuAPAmcAAAoMAh5SFmdAABYWgnJy0ncgByAG8AdwDzAAkMYQByAHAAbwBvAG4A8wATBGklZ2h0YXJyb3dzAACgySFxAHUAaQBnAGEAcgByAG8A9wBZJugkcmVldGltZXMAoMwiZwDaYmkAbgBnAGQAbwB0AHMAZQDxABwYgAFhaG0AYCdjJ2YncgDyAAkMYQDyABMEAKAPIG8idXN0AGGgsSPjIWhlAKCxI+0haWQAoO4qAAJhYnB0fCeGJ4knmScAAW5ygCeDJ2cAAKDtJ3IAAKD+IXIA6wAcDIABYWZsAI8nkieVJ3IAAKCGKQDgNdhj3XUAcwAAoC4qaSJtZXMAAKA1KgABYXCiJ6gncgBnoCkAdAAAoJQp7yJsaW50AKASKmEAcgDyADwnAAJhY2hxuCe8J6EMwCfxIXVvAKA6IHIAAOA12MfcAAFidYAmxCdvAPKgGSCoAYABaGlyAM4n0ifWJ3IAZQDlAE0n7SFlcwCgyiJpAIChuSVlZmwAXAxjEt4n9CFyaQCgzinsInVoYXIAoGgpAKAeIWENBSgJKA0oSyhVKIYoAACLKLAoAAAAAOMo5ygAABApJCkxKW0pcSmHKaYpAACYKgAAAACxKmMidXRlAFthcQB1AO8ABR+ApHsiRWFjZWlucHN5ABwoHignKCooLygyKEEoRihJKACgtCrwASMoAAAlKACguCpvAG4AYWF1AOUAgw1koLAqaQBsAF9hcgBjAF1hgAFFYXMAOCg6KD0oAKC2KnAAAKC6KmkAbQAAoOki7yJsaW50AKATKmkA7QCIDUFkbwB0AGKixSKRFgAAAABTKACgZiqAA0FhY21zdHgAYChkKG8ocyh1KHkogihyAHIAAKDYIXIAAAFocmkoayjrAJAab6CYIfcAzAd0ADuApwCnQGkAO2D3IWFyAKApKW0AAAFpbn4ozQBuAHUA8wDOAHQAAKA2J3IA7+A12DDdIxkAAmFjb3mRKJUonSisKHIAcAAAoG8mAAFoeZkonChjAHkASWRIZHIAdABtAqUoAAAAAKgoaQDkAFsPYQByAGEA7ABsJDuArQCtQAABZ22zKLsobQBhAAChwwNmdroouijCY4CjPCJkZWdsbnByAMgozCjPKNMo1yjaKN4obwB0AACgairxoEMiCw5FoJ4qAKCgKkWgnSoAoJ8qZQAAoEYi7CF1cwCgJCrhIXJyAKByKWEAcgDyAPwMAAJhZWl07Sj8KAEpCCkAAWxz8Sj4KGwAcwBlAHQAbQDpAH8oaABwAACgMyrwImFyc2wAoOQpAAFkbFoPBSllAACgIyNloKoqc6CsKgDgrCoA/oABZmxwABUpGCkfKfQhY3lMZGKgLwBhoMQpcgAAoD8jZgAA4DXYZN1hAAABZHIoKRcDZQBzAHWgYCZpAHQAAKBgJoABY3N1ADYpRilhKQABYXU6KUApcABzoJMiAOCTIgD+cABzoJQiAOCUIgD+dQAAAWJwSylWKQChjyJlcz4NUCllAHQAZaCPIvEAPw0AoZAiZXNIDVspZQB0AGWgkCLxAEkNAKGhJWFmZilbBHIAZQFrKVwEAKChJWEAcgDyAAMNAAJjZW10dyl7KX8pgilyAADgNdjI3HQAbQDuAM4AaQDsAAYpYQByAOYAVw0AAWFyiimOKXIA5qAGJhESAAFhbpIpoylpImdodAAAAWVwmSmgKXAAcwBpAGwAbwDuANkXaADpAKAkcwCvYIACYmNtbnAArin8KY4NJSooKgCkgiJFZGVtbnByc7wpvinCKcgpzCnUKdgp3CkAoMUqbwB0AACgvSpkoIYibwB0AACgwyr1IWx0AKDBKgABRWXQKdIpAKDLKgCgiiLsIXVzAKC/KuEhcnIAoHkpgAFlaXUA4inxKfQpdAAAoYIiZW7oKewpcQDxoIYivSllAHEA8aCKItEpbQAAoMcqAAFicPgp+ikAoNUqAKDTKmMAgKJ7ImFjZW5zAAcqDSoUKhYqRihwAHAAcgBvAPgAIyh1AHIAbAB5AGUA8QCDDfEAfA2AAWFlcwAcKiIqPShwAHAAcgBvAPgAPChxAPEAOShnAACgaiYApoMiMTIzRWRlaGxtbnBzPCo/KkIqRSpHKlIqWCpjKmcqaypzKncqO4C5ALlAO4CyALJAO4CzALNAAKDGKgABb3NLKk4qdAAAoL4qdQBiAACg2CpkoIcibwB0AACgxCpzAAABb3VdKmAqbAAAoMknYgAAoNcq4SFycgCgeyn1IWx0AKDCKgABRWVvKnEqAKDMKgCgiyLsIXVzAKDAKoABZWl1AH0qjCqPKnQAAKGDImVugyqHKnEA8aCHIkYqZQBxAPGgiyJwKm0AAKDIKgABYnCTKpUqAKDUKgCg1iqAAUFhbgCdKqEqrCpyAHIAAKDZIXIAAAFocqYqqCrrAJUab6CZIfcAxQf3IWFyAKAqKWwAaQBnADuA3wDfQOELzyrZKtwq6SrsKvEqAAD1KjQrAAAAAAAAAAAAAEwrbCsAAHErvSsAAAAAAADRK3IC1CoAAAAA2CrnIWV0AKAWI8RjcgDrAOUKgAFhZXkA4SrkKucq8iFvbmVh5CFpbGNhQmRvAPQAIg5sInJlYwAAoBUjcgAA4DXYMd0AAmVpa2/7KhIrKCsuK/IBACsAAAkrZQAAATRm6g0EK28AcgDlAOsNYQBzorgDECsAAAAAEit5AG0A0WMAAWNuFislK2sAAAFhcxsrIStwAHAAcgBvAPgAFw5pAG0AAKA8InMA8AD9DQABYXMsKyEr8AAXDnIAbgA7gP4A/kDsATgrOyswG2QA5QBnAmUAcwCAgdcAO2JkAEMrRCtJK9dAYaCgInIAAKAxKgCgMCqAAWVwcwBRK1MraSvhAAkh4qKkIlsrXysAAAAAYytvAHQAAKA2I2kAcgAAoPEqb+A12GXdcgBrAACg2irhAHgociJpbWUAAKA0IIABYWlwAHYreSu3K2QA5QC+DYADYWRlbXBzdACFK6MrmiunK6wrsCuzK24iZ2xlAACitSVkbHFykCuUK5ornCvvIXduAKC/JeUhZnRloMMl8QACBwCgXCJpImdodABloLkl8QBdDG8AdAAAoOwlaSJudXMAAKA6KuwhdXMAoDkqYgAAoM0p6SFtZQCgOyrlInppdW0AoOIjgAFjaHQAwivKK80rAAFyecYrySsA4DXYydxGZGMAeQBbZPIhb2tnYQABaW/UK9creAD0ANERaCJlYWQAAAFsct4r5ytlAGYAdABhAHIAcgBvAPcAXQbpJGdodGFycm93AKCgIQAJQUhhYmNkZmdobG1vcHJzdHV3CiwNLBEsHSwnLDEsQCxLLFIsYix6LIQsjyzLLOgs7Sz/LAotcgDyAAkDYQByAACgYykAAWNyFSwbLHUAdABlADuA+gD6QPIACQ1yAOMBIywAACUseQBeZHYAZQBtYQABaXkrLDAscgBjADuA+wD7QENkgAFhYmgANyw6LD0scgDyANEO7CFhY3FhYQDyAOAOAAFpckQsSCzzIWh0AKB+KQDgNdgy3XIAYQB2AGUAO4D5APlAYQFWLF8scgAAAWxyWixcLACgvyEAoL4hbABrAACggCUAAWN0Zix2LG8CbCwAAAAAcyxyAG4AZaAcI3IAAKAcI28AcAAAoA8jcgBpAACg+CUAAWFsfiyBLGMAcgBrYTuAqACoQAABZ3CILIssbwBuAHNhZgAA4DXYZt0AA2FkaGxzdZksniynLLgsuyzFLHIAcgBvAPcACQ1vAHcAbgBhAHIAcgBvAPcA2A5hI3Jwb29uAAABbHKvLLMsZQBmAPQAWyxpAGcAaAD0AF0sdQDzAKYOaQAAocUDaGzBLMIs0mNvAG4AxWPwI2Fycm93cwCgyCGAAWNpdADRLOEs5CxvAtcsAAAAAN4scgBuAGWgHSNyAACgHSNvAHAAAKAOI24AZwBvYXIAaQAAoPklYwByAADgNdjK3IABZGlyAPMs9yz6LG8AdAAAoPAi7CFkZWlhaQBmoLUlAKC0JQABYW0DLQYtcgDyAMosbAA7gPwA/EDhIm5nbGUAoKcpgAdBQkRhY2RlZmxub3Byc3oAJy0qLTAtNC2bLZ0toS2/LcMtxy3TLdgt3C3gLfwtcgDyABADYQByAHag6CoAoOkqYQBzAOgA/gIAAW5yOC08LechcnQAoJwpgANla25wcnN0AJkpSC1NLVQtXi1iLYItYQBwAHAA4QAaHG8AdABoAGkAbgDnAKEXgAFoaXIAoSmzJFotbwBwAPQAdCVooJUh7wD4JgABaXVmLWotZwBtAOEAuygAAWJwbi14LXMjZXRuZXEAceCKIgD+AODLKgD+cyNldG5lcQBx4IsiAP4A4MwqAP4AAWhyhi2KLWUAdADhABIraSNhbmdsZQAAAWxyki2WLeUhZnQAoLIiaSJnaHQAAKCzInkAMmThIXNoAKCiIoABZWxyAKcttC24LWKiKCKuLQAAAACyLWEAcgAAoLsicQAAoFoi7CFpcACg7iIAAWJ0vC1eD2EA8gBfD3IAAOA12DPddAByAOkAlS1zAHUAAAFicM0t0C0A4IIi0iAA4IMi0iBwAGYAAOA12GfdcgBvAPAAWQt0AHIA6QCaLQABY3XkLegtcgAA4DXYy9wAAWJw7C30LW4AAAFFZXUt8S0A4IoiAP5uAAABRWV/LfktAOCLIgD+6SJnemFnAKCaKYADY2Vmb3BycwANLhAuJS4pLiMuLi40LukhcmN1YQABZGkULiEuAAFiZxguHC5hAHIAAKBfKmUAcaAnIgCgWSLlIXJwAKAYIXIAAOA12DTdcABmAADgNdho3WWgQCJhAHQA6ABqD2MAcgAA4DXYzNzjCuQRUC4AAFQuAABYLmIuAAAAAGMubS5wLnQuAAAAAIguki4AAJouJxIqEnQAcgDpAB0ScgAA4DXYNd0AAUFhWy5eLnIA8gDnAnIA8gCTB75jAAFBYWYuaS5yAPIA4AJyAPIAjAdhAPAAeh5pAHMAAKD7IoABZHB0APgReS6DLgABZmx9LoAuAOA12GnddQDzAP8RaQBtAOUABBIAAUFhiy6OLnIA8gDuAnIA8gCaBwABY3GVLgoScgAA4DXYzdwAAXB0nS6hLmwAdQDzACUScgDpACASAARhY2VmaW9zdbEuvC7ELsguzC7PLtQu2S5jAAABdXm2LrsudABlADuA/QD9QE9kAAFpecAuwy5yAGMAd2FLZG4AO4ClAKVAcgAA4DXYNt1jAHkAV2RwAGYAAOA12GrdYwByAADgNdjO3AABY23dLt8ueQBOZGwAO4D/AP9AAAVhY2RlZmhpb3N38y73Lv8uAi8MLxAvEy8YLx0vIi9jInV0ZQB6YQABYXn7Lv4u8iFvbn5hN2RvAHQAfGEAAWV0Bi8KL3QAcgDmAB8QYQC2Y3IAAOA12DfdYwB5ADZk5yJyYXJyAKDdIXAAZgAA4DXYa91jAHIAAOA12M/cAAFqbiYvKC8AoA0gagAAoAwg");var ke;(function(o){o[o.VALUE_LENGTH=49152]="VALUE_LENGTH",o[o.FLAG13=8192]="FLAG13",o[o.BRANCH_LENGTH=8064]="BRANCH_LENGTH",o[o.JUMP_TABLE=127]="JUMP_TABLE"})(ke||(ke={}));var ze;(function(o){o[o.NUM=35]="NUM",o[o.SEMI=59]="SEMI",o[o.EQUALS=61]="EQUALS",o[o.ZERO=48]="ZERO",o[o.NINE=57]="NINE",o[o.LOWER_A=97]="LOWER_A",o[o.LOWER_F=102]="LOWER_F",o[o.LOWER_X=120]="LOWER_X",o[o.LOWER_Z=122]="LOWER_Z",o[o.UPPER_A=65]="UPPER_A",o[o.UPPER_F=70]="UPPER_F",o[o.UPPER_Z=90]="UPPER_Z"})(ze||(ze={}));var Cu=32;function _a(o){return o>=ze.ZERO&&o<=ze.NINE}function GS(o){return o>=ze.UPPER_A&&o<=ze.UPPER_F||o>=ze.LOWER_A&&o<=ze.LOWER_F}function KS(o){return o>=ze.UPPER_A&&o<=ze.UPPER_Z||o>=ze.LOWER_A&&o<=ze.LOWER_Z||_a(o)}function qS(o){return o===ze.EQUALS||KS(o)}var we;(function(o){o[o.EntityStart=0]="EntityStart",o[o.NumericStart=1]="NumericStart",o[o.NumericDecimal=2]="NumericDecimal",o[o.NumericHex=3]="NumericHex",o[o.NamedEntity=4]="NamedEntity"})(we||(we={}));var ft;(function(o){o[o.Legacy=0]="Legacy",o[o.Strict=1]="Strict",o[o.Attribute=2]="Attribute"})(ft||(ft={}));var bs=class{decodeTree;emitCodePoint;errors;constructor(e,t,r){this.decodeTree=e,this.emitCodePoint=t,this.errors=r}state=we.EntityStart;consumed=1;result=0;treeIndex=0;excess=1;decodeMode=ft.Strict;runConsumed=0;startEntity(e){this.decodeMode=e,this.state=we.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1,this.runConsumed=0}write(e,t){switch(this.state){case we.EntityStart:return e.charCodeAt(t)===ze.NUM?(this.state=we.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=we.NamedEntity,this.stateNamedEntity(e,t));case we.NumericStart:return this.stateNumericStart(e,t);case we.NumericDecimal:return this.stateNumericDecimal(e,t);case we.NumericHex:return this.stateNumericHex(e,t);case we.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|Cu)===ze.LOWER_X?(this.state=we.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=we.NumericDecimal,this.stateNumericDecimal(e,t))}stateNumericHex(e,t){for(;t<e.length;){let r=e.charCodeAt(t);if(_a(r)||GS(r)){let s=r<=ze.NINE?r-ze.ZERO:(r|Cu)-ze.LOWER_A+10;this.result=this.result*16+s,this.consumed++,t++}else return this.emitNumericEntity(r,3)}return-1}stateNumericDecimal(e,t){for(;t<e.length;){let r=e.charCodeAt(t);if(_a(r))this.result=this.result*10+(r-ze.ZERO),this.consumed++,t++;else return this.emitNumericEntity(r,2)}return-1}emitNumericEntity(e,t){if(this.consumed<=t)return this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===ze.SEMI)this.consumed+=1;else if(this.decodeMode===ft.Strict)return 0;return this.emitCodePoint(Tu(this.result),this.consumed),this.errors&&(e!==ze.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){let{decodeTree:r}=this,s=r[this.treeIndex],a=(s&ke.VALUE_LENGTH)>>14;for(;t<e.length;){if(a===0&&(s&ke.FLAG13)!==0){let u=(s&ke.BRANCH_LENGTH)>>7;if(this.runConsumed===0){let f=s&ke.JUMP_TABLE;if(e.charCodeAt(t)!==f)return this.result===0?0:this.emitNotTerminatedNamedEntity();t++,this.excess++,this.runConsumed++}for(;this.runConsumed<u;){if(t>=e.length)return-1;let f=this.runConsumed-1,m=r[this.treeIndex+1+(f>>1)],x=f%2===0?m&255:m>>8&255;if(e.charCodeAt(t)!==x)return this.runConsumed=0,this.result===0?0:this.emitNotTerminatedNamedEntity();t++,this.excess++,this.runConsumed++}this.runConsumed=0,this.treeIndex+=1+(u>>1),s=r[this.treeIndex],a=(s&ke.VALUE_LENGTH)>>14}if(t>=e.length)break;let p=e.charCodeAt(t);if(p===ze.SEMI&&a!==0&&(s&ke.FLAG13)!==0)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);if(this.treeIndex=YS(r,s,this.treeIndex+Math.max(1,a),p),this.treeIndex<0)return this.result===0||this.decodeMode===ft.Attribute&&(a===0||qS(p))?0:this.emitNotTerminatedNamedEntity();if(s=r[this.treeIndex],a=(s&ke.VALUE_LENGTH)>>14,a!==0){if(p===ze.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==ft.Strict&&(s&ke.FLAG13)===0&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}t++,this.excess++}return-1}emitNotTerminatedNamedEntity(){let{result:e,decodeTree:t}=this,r=(t[e]&ke.VALUE_LENGTH)>>14;return this.emitNamedEntityData(e,r,this.consumed),this.errors?.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,r){let{decodeTree:s}=this;return this.emitCodePoint(t===1?s[e]&~(ke.VALUE_LENGTH|ke.FLAG13):s[e+1],r),t===3&&this.emitCodePoint(s[e+2],r),r}end(){switch(this.state){case we.NamedEntity:return this.result!==0&&(this.decodeMode!==ft.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case we.NumericDecimal:return this.emitNumericEntity(0,2);case we.NumericHex:return this.emitNumericEntity(0,3);case we.NumericStart:return this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case we.EntityStart:return 0}}};function YS(o,e,t,r){let s=(e&ke.BRANCH_LENGTH)>>7,a=e&ke.JUMP_TABLE;if(s===0)return a!==0&&r===a?t:-1;if(a){let m=r-a;return m<0||m>=s?-1:o[t+m]-1}let p=s+1>>1,u=0,f=s-1;for(;u<=f;){let m=u+f>>>1,x=m>>1,z=o[t+x]>>(m&1)*8&255;if(z<r)u=m+1;else if(z>r)f=m-1;else return o[t+p+m]}return-1}var _;(function(o){o.HTML="http://www.w3.org/1999/xhtml",o.MATHML="http://www.w3.org/1998/Math/MathML",o.SVG="http://www.w3.org/2000/svg",o.XLINK="http://www.w3.org/1999/xlink",o.XML="http://www.w3.org/XML/1998/namespace",o.XMLNS="http://www.w3.org/2000/xmlns/"})(_||(_={}));var Et;(function(o){o.TYPE="type",o.ACTION="action",o.ENCODING="encoding",o.PROMPT="prompt",o.NAME="name",o.COLOR="color",o.FACE="face",o.SIZE="size"})(Et||(Et={}));var _e;(function(o){o.NO_QUIRKS="no-quirks",o.QUIRKS="quirks",o.LIMITED_QUIRKS="limited-quirks"})(_e||(_e={}));var M;(function(o){o.A="a",o.ADDRESS="address",o.ANNOTATION_XML="annotation-xml",o.APPLET="applet",o.AREA="area",o.ARTICLE="article",o.ASIDE="aside",o.B="b",o.BASE="base",o.BASEFONT="basefont",o.BGSOUND="bgsound",o.BIG="big",o.BLOCKQUOTE="blockquote",o.BODY="body",o.BR="br",o.BUTTON="button",o.CAPTION="caption",o.CENTER="center",o.CODE="code",o.COL="col",o.COLGROUP="colgroup",o.DD="dd",o.DESC="desc",o.DETAILS="details",o.DIALOG="dialog",o.DIR="dir",o.DIV="div",o.DL="dl",o.DT="dt",o.EM="em",o.EMBED="embed",o.FIELDSET="fieldset",o.FIGCAPTION="figcaption",o.FIGURE="figure",o.FONT="font",o.FOOTER="footer",o.FOREIGN_OBJECT="foreignObject",o.FORM="form",o.FRAME="frame",o.FRAMESET="frameset",o.H1="h1",o.H2="h2",o.H3="h3",o.H4="h4",o.H5="h5",o.H6="h6",o.HEAD="head",o.HEADER="header",o.HGROUP="hgroup",o.HR="hr",o.HTML="html",o.I="i",o.IMG="img",o.IMAGE="image",o.INPUT="input",o.IFRAME="iframe",o.KEYGEN="keygen",o.LABEL="label",o.LI="li",o.LINK="link",o.LISTING="listing",o.MAIN="main",o.MALIGNMARK="malignmark",o.MARQUEE="marquee",o.MATH="math",o.MENU="menu",o.META="meta",o.MGLYPH="mglyph",o.MI="mi",o.MO="mo",o.MN="mn",o.MS="ms",o.MTEXT="mtext",o.NAV="nav",o.NOBR="nobr",o.NOFRAMES="noframes",o.NOEMBED="noembed",o.NOSCRIPT="noscript",o.OBJECT="object",o.OL="ol",o.OPTGROUP="optgroup",o.OPTION="option",o.P="p",o.PARAM="param",o.PLAINTEXT="plaintext",o.PRE="pre",o.RB="rb",o.RP="rp",o.RT="rt",o.RTC="rtc",o.RUBY="ruby",o.S="s",o.SCRIPT="script",o.SEARCH="search",o.SECTION="section",o.SELECT="select",o.SOURCE="source",o.SMALL="small",o.SPAN="span",o.STRIKE="strike",o.STRONG="strong",o.STYLE="style",o.SUB="sub",o.SUMMARY="summary",o.SUP="sup",o.TABLE="table",o.TBODY="tbody",o.TEMPLATE="template",o.TEXTAREA="textarea",o.TFOOT="tfoot",o.TD="td",o.TH="th",o.THEAD="thead",o.TITLE="title",o.TR="tr",o.TRACK="track",o.TT="tt",o.U="u",o.UL="ul",o.SVG="svg",o.VAR="var",o.WBR="wbr",o.XMP="xmp"})(M||(M={}));var l;(function(o){o[o.UNKNOWN=0]="UNKNOWN",o[o.A=1]="A",o[o.ADDRESS=2]="ADDRESS",o[o.ANNOTATION_XML=3]="ANNOTATION_XML",o[o.APPLET=4]="APPLET",o[o.AREA=5]="AREA",o[o.ARTICLE=6]="ARTICLE",o[o.ASIDE=7]="ASIDE",o[o.B=8]="B",o[o.BASE=9]="BASE",o[o.BASEFONT=10]="BASEFONT",o[o.BGSOUND=11]="BGSOUND",o[o.BIG=12]="BIG",o[o.BLOCKQUOTE=13]="BLOCKQUOTE",o[o.BODY=14]="BODY",o[o.BR=15]="BR",o[o.BUTTON=16]="BUTTON",o[o.CAPTION=17]="CAPTION",o[o.CENTER=18]="CENTER",o[o.CODE=19]="CODE",o[o.COL=20]="COL",o[o.COLGROUP=21]="COLGROUP",o[o.DD=22]="DD",o[o.DESC=23]="DESC",o[o.DETAILS=24]="DETAILS",o[o.DIALOG=25]="DIALOG",o[o.DIR=26]="DIR",o[o.DIV=27]="DIV",o[o.DL=28]="DL",o[o.DT=29]="DT",o[o.EM=30]="EM",o[o.EMBED=31]="EMBED",o[o.FIELDSET=32]="FIELDSET",o[o.FIGCAPTION=33]="FIGCAPTION",o[o.FIGURE=34]="FIGURE",o[o.FONT=35]="FONT",o[o.FOOTER=36]="FOOTER",o[o.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",o[o.FORM=38]="FORM",o[o.FRAME=39]="FRAME",o[o.FRAMESET=40]="FRAMESET",o[o.H1=41]="H1",o[o.H2=42]="H2",o[o.H3=43]="H3",o[o.H4=44]="H4",o[o.H5=45]="H5",o[o.H6=46]="H6",o[o.HEAD=47]="HEAD",o[o.HEADER=48]="HEADER",o[o.HGROUP=49]="HGROUP",o[o.HR=50]="HR",o[o.HTML=51]="HTML",o[o.I=52]="I",o[o.IMG=53]="IMG",o[o.IMAGE=54]="IMAGE",o[o.INPUT=55]="INPUT",o[o.IFRAME=56]="IFRAME",o[o.KEYGEN=57]="KEYGEN",o[o.LABEL=58]="LABEL",o[o.LI=59]="LI",o[o.LINK=60]="LINK",o[o.LISTING=61]="LISTING",o[o.MAIN=62]="MAIN",o[o.MALIGNMARK=63]="MALIGNMARK",o[o.MARQUEE=64]="MARQUEE",o[o.MATH=65]="MATH",o[o.MENU=66]="MENU",o[o.META=67]="META",o[o.MGLYPH=68]="MGLYPH",o[o.MI=69]="MI",o[o.MO=70]="MO",o[o.MN=71]="MN",o[o.MS=72]="MS",o[o.MTEXT=73]="MTEXT",o[o.NAV=74]="NAV",o[o.NOBR=75]="NOBR",o[o.NOFRAMES=76]="NOFRAMES",o[o.NOEMBED=77]="NOEMBED",o[o.NOSCRIPT=78]="NOSCRIPT",o[o.OBJECT=79]="OBJECT",o[o.OL=80]="OL",o[o.OPTGROUP=81]="OPTGROUP",o[o.OPTION=82]="OPTION",o[o.P=83]="P",o[o.PARAM=84]="PARAM",o[o.PLAINTEXT=85]="PLAINTEXT",o[o.PRE=86]="PRE",o[o.RB=87]="RB",o[o.RP=88]="RP",o[o.RT=89]="RT",o[o.RTC=90]="RTC",o[o.RUBY=91]="RUBY",o[o.S=92]="S",o[o.SCRIPT=93]="SCRIPT",o[o.SEARCH=94]="SEARCH",o[o.SECTION=95]="SECTION",o[o.SELECT=96]="SELECT",o[o.SOURCE=97]="SOURCE",o[o.SMALL=98]="SMALL",o[o.SPAN=99]="SPAN",o[o.STRIKE=100]="STRIKE",o[o.STRONG=101]="STRONG",o[o.STYLE=102]="STYLE",o[o.SUB=103]="SUB",o[o.SUMMARY=104]="SUMMARY",o[o.SUP=105]="SUP",o[o.TABLE=106]="TABLE",o[o.TBODY=107]="TBODY",o[o.TEMPLATE=108]="TEMPLATE",o[o.TEXTAREA=109]="TEXTAREA",o[o.TFOOT=110]="TFOOT",o[o.TD=111]="TD",o[o.TH=112]="TH",o[o.THEAD=113]="THEAD",o[o.TITLE=114]="TITLE",o[o.TR=115]="TR",o[o.TRACK=116]="TRACK",o[o.TT=117]="TT",o[o.U=118]="U",o[o.UL=119]="UL",o[o.SVG=120]="SVG",o[o.VAR=121]="VAR",o[o.WBR=122]="WBR",o[o.XMP=123]="XMP"})(l||(l={}));var QS=new Map([[M.A,l.A],[M.ADDRESS,l.ADDRESS],[M.ANNOTATION_XML,l.ANNOTATION_XML],[M.APPLET,l.APPLET],[M.AREA,l.AREA],[M.ARTICLE,l.ARTICLE],[M.ASIDE,l.ASIDE],[M.B,l.B],[M.BASE,l.BASE],[M.BASEFONT,l.BASEFONT],[M.BGSOUND,l.BGSOUND],[M.BIG,l.BIG],[M.BLOCKQUOTE,l.BLOCKQUOTE],[M.BODY,l.BODY],[M.BR,l.BR],[M.BUTTON,l.BUTTON],[M.CAPTION,l.CAPTION],[M.CENTER,l.CENTER],[M.CODE,l.CODE],[M.COL,l.COL],[M.COLGROUP,l.COLGROUP],[M.DD,l.DD],[M.DESC,l.DESC],[M.DETAILS,l.DETAILS],[M.DIALOG,l.DIALOG],[M.DIR,l.DIR],[M.DIV,l.DIV],[M.DL,l.DL],[M.DT,l.DT],[M.EM,l.EM],[M.EMBED,l.EMBED],[M.FIELDSET,l.FIELDSET],[M.FIGCAPTION,l.FIGCAPTION],[M.FIGURE,l.FIGURE],[M.FONT,l.FONT],[M.FOOTER,l.FOOTER],[M.FOREIGN_OBJECT,l.FOREIGN_OBJECT],[M.FORM,l.FORM],[M.FRAME,l.FRAME],[M.FRAMESET,l.FRAMESET],[M.H1,l.H1],[M.H2,l.H2],[M.H3,l.H3],[M.H4,l.H4],[M.H5,l.H5],[M.H6,l.H6],[M.HEAD,l.HEAD],[M.HEADER,l.HEADER],[M.HGROUP,l.HGROUP],[M.HR,l.HR],[M.HTML,l.HTML],[M.I,l.I],[M.IMG,l.IMG],[M.IMAGE,l.IMAGE],[M.INPUT,l.INPUT],[M.IFRAME,l.IFRAME],[M.KEYGEN,l.KEYGEN],[M.LABEL,l.LABEL],[M.LI,l.LI],[M.LINK,l.LINK],[M.LISTING,l.LISTING],[M.MAIN,l.MAIN],[M.MALIGNMARK,l.MALIGNMARK],[M.MARQUEE,l.MARQUEE],[M.MATH,l.MATH],[M.MENU,l.MENU],[M.META,l.META],[M.MGLYPH,l.MGLYPH],[M.MI,l.MI],[M.MO,l.MO],[M.MN,l.MN],[M.MS,l.MS],[M.MTEXT,l.MTEXT],[M.NAV,l.NAV],[M.NOBR,l.NOBR],[M.NOFRAMES,l.NOFRAMES],[M.NOEMBED,l.NOEMBED],[M.NOSCRIPT,l.NOSCRIPT],[M.OBJECT,l.OBJECT],[M.OL,l.OL],[M.OPTGROUP,l.OPTGROUP],[M.OPTION,l.OPTION],[M.P,l.P],[M.PARAM,l.PARAM],[M.PLAINTEXT,l.PLAINTEXT],[M.PRE,l.PRE],[M.RB,l.RB],[M.RP,l.RP],[M.RT,l.RT],[M.RTC,l.RTC],[M.RUBY,l.RUBY],[M.S,l.S],[M.SCRIPT,l.SCRIPT],[M.SEARCH,l.SEARCH],[M.SECTION,l.SECTION],[M.SELECT,l.SELECT],[M.SOURCE,l.SOURCE],[M.SMALL,l.SMALL],[M.SPAN,l.SPAN],[M.STRIKE,l.STRIKE],[M.STRONG,l.STRONG],[M.STYLE,l.STYLE],[M.SUB,l.SUB],[M.SUMMARY,l.SUMMARY],[M.SUP,l.SUP],[M.TABLE,l.TABLE],[M.TBODY,l.TBODY],[M.TEMPLATE,l.TEMPLATE],[M.TEXTAREA,l.TEXTAREA],[M.TFOOT,l.TFOOT],[M.TD,l.TD],[M.TH,l.TH],[M.THEAD,l.THEAD],[M.TITLE,l.TITLE],[M.TR,l.TR],[M.TRACK,l.TRACK],[M.TT,l.TT],[M.U,l.U],[M.UL,l.UL],[M.SVG,l.SVG],[M.VAR,l.VAR],[M.WBR,l.WBR],[M.XMP,l.XMP]]);function Ht(o){var e;return(e=QS.get(o))!==null&&e!==void 0?e:l.UNKNOWN}var j=l,Iu={[_.HTML]:new Set([j.ADDRESS,j.APPLET,j.AREA,j.ARTICLE,j.ASIDE,j.BASE,j.BASEFONT,j.BGSOUND,j.BLOCKQUOTE,j.BODY,j.BR,j.BUTTON,j.CAPTION,j.CENTER,j.COL,j.COLGROUP,j.DD,j.DETAILS,j.DIR,j.DIV,j.DL,j.DT,j.EMBED,j.FIELDSET,j.FIGCAPTION,j.FIGURE,j.FOOTER,j.FORM,j.FRAME,j.FRAMESET,j.H1,j.H2,j.H3,j.H4,j.H5,j.H6,j.HEAD,j.HEADER,j.HGROUP,j.HR,j.HTML,j.IFRAME,j.IMG,j.INPUT,j.LI,j.LINK,j.LISTING,j.MAIN,j.MARQUEE,j.MENU,j.META,j.NAV,j.NOEMBED,j.NOFRAMES,j.NOSCRIPT,j.OBJECT,j.OL,j.P,j.PARAM,j.PLAINTEXT,j.PRE,j.SCRIPT,j.SECTION,j.SELECT,j.SOURCE,j.STYLE,j.SUMMARY,j.TABLE,j.TBODY,j.TD,j.TEMPLATE,j.TEXTAREA,j.TFOOT,j.TH,j.THEAD,j.TITLE,j.TR,j.TRACK,j.UL,j.WBR,j.XMP]),[_.MATHML]:new Set([j.MI,j.MO,j.MN,j.MS,j.MTEXT,j.ANNOTATION_XML]),[_.SVG]:new Set([j.TITLE,j.FOREIGN_OBJECT,j.DESC]),[_.XLINK]:new Set,[_.XML]:new Set,[_.XMLNS]:new Set},Uo=new Set([j.H1,j.H2,j.H3,j.H4,j.H5,j.H6]),gxe=new Set([M.STYLE,M.SCRIPT,M.XMP,M.IFRAME,M.NOEMBED,M.NOFRAMES,M.PLAINTEXT]);var T;(function(o){o[o.DATA=0]="DATA",o[o.RCDATA=1]="RCDATA",o[o.RAWTEXT=2]="RAWTEXT",o[o.SCRIPT_DATA=3]="SCRIPT_DATA",o[o.PLAINTEXT=4]="PLAINTEXT",o[o.TAG_OPEN=5]="TAG_OPEN",o[o.END_TAG_OPEN=6]="END_TAG_OPEN",o[o.TAG_NAME=7]="TAG_NAME",o[o.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",o[o.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",o[o.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",o[o.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",o[o.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",o[o.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",o[o.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",o[o.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",o[o.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",o[o.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",o[o.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",o[o.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",o[o.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",o[o.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",o[o.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",o[o.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",o[o.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",o[o.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",o[o.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",o[o.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",o[o.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",o[o.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",o[o.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",o[o.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",o[o.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",o[o.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",o[o.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",o[o.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",o[o.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",o[o.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",o[o.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",o[o.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",o[o.BOGUS_COMMENT=40]="BOGUS_COMMENT",o[o.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",o[o.COMMENT_START=42]="COMMENT_START",o[o.COMMENT_START_DASH=43]="COMMENT_START_DASH",o[o.COMMENT=44]="COMMENT",o[o.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",o[o.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",o[o.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",o[o.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",o[o.COMMENT_END_DASH=49]="COMMENT_END_DASH",o[o.COMMENT_END=50]="COMMENT_END",o[o.COMMENT_END_BANG=51]="COMMENT_END_BANG",o[o.DOCTYPE=52]="DOCTYPE",o[o.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",o[o.DOCTYPE_NAME=54]="DOCTYPE_NAME",o[o.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",o[o.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",o[o.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",o[o.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",o[o.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",o[o.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",o[o.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",o[o.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",o[o.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",o[o.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",o[o.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",o[o.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",o[o.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",o[o.CDATA_SECTION=68]="CDATA_SECTION",o[o.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",o[o.CDATA_SECTION_END=70]="CDATA_SECTION_END",o[o.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",o[o.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(T||(T={}));var Pe={DATA:T.DATA,RCDATA:T.RCDATA,RAWTEXT:T.RAWTEXT,SCRIPT_DATA:T.SCRIPT_DATA,PLAINTEXT:T.PLAINTEXT,CDATA_SECTION:T.CDATA_SECTION};function ZS(o){return o>=S.DIGIT_0&&o<=S.DIGIT_9}function Ho(o){return o>=S.LATIN_CAPITAL_A&&o<=S.LATIN_CAPITAL_Z}function XS(o){return o>=S.LATIN_SMALL_A&&o<=S.LATIN_SMALL_Z}function Lt(o){return XS(o)||Ho(o)}function Ru(o){return Lt(o)||ZS(o)}function ys(o){return o+32}function Ou(o){return o===S.SPACE||o===S.LINE_FEED||o===S.TABULATION||o===S.FORM_FEED}function wu(o){return Ou(o)||o===S.SOLIDUS||o===S.GREATER_THAN_SIGN}function e0(o){return o===S.NULL?D.nullCharacterReference:o>1114111?D.characterReferenceOutsideUnicodeRange:ms(o)?D.surrogateCharacterReference:fs(o)?D.noncharacterCharacterReference:hs(o)||o===S.CARRIAGE_RETURN?D.controlCharacterReference:null}var Wo=class{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=T.DATA,this.returnState=T.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new xs(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new bs(Na,(r,s)=>{this.preprocessor.pos=this.entityStartPos+s-1,this._flushCodePointConsumedAsCharacterReference(r)},t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(D.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(D.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{let s=e0(r);s&&this._err(s,1)}}:void 0)}_err(e,t=0){var r,s;(s=(r=this.handler).onParseError)===null||s===void 0||s.call(r,this.preprocessor.getError(e,t))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;let e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||e?.())}write(e,t,r){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||r?.()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t<e;t++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,t){return this.preprocessor.startsWith(e,t)?(this._advanceBy(e.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:ie.START_TAG,tagName:"",tagID:l.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:ie.END_TAG,tagName:"",tagID:l.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:ie.COMMENT,data:"",location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:ie.DOCTYPE,name:e,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e,t;let r=this.currentToken;if(gs(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){let s=(e=(t=r.location).attrs)!==null&&e!==void 0?e:t.attrs=Object.create(null);s[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(D.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(e){this._emitCurrentCharacterToken(e.location),this.currentToken=null,e.location&&(e.location.endLine=this.preprocessor.line,e.location.endCol=this.preprocessor.col+1,e.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){let e=this.currentToken;this.prepareToken(e),e.tagID=Ht(e.tagName),e.type===ie.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(D.endTagWithAttributes),e.selfClosing&&this._err(D.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case ie.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case ie.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case ie.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){let e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:ie.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken)if(this.currentCharacterToken.type===e){this.currentCharacterToken.chars+=t;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(e,t)}_emitCodePoint(e){let t=Ou(e)?ie.WHITESPACE_CHARACTER:e===S.NULL?ie.NULL_CHARACTER:ie.CHARACTER;this._appendCharToCurrentCharacterToken(t,e<65536?String.fromCharCode(e):String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(ie.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=T.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?ft.Attribute:ft.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===T.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===T.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===T.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case T.DATA:{this._stateData(e);break}case T.RCDATA:{this._stateRcdata(e);break}case T.RAWTEXT:{this._stateRawtext(e);break}case T.SCRIPT_DATA:{this._stateScriptData(e);break}case T.PLAINTEXT:{this._statePlaintext(e);break}case T.TAG_OPEN:{this._stateTagOpen(e);break}case T.END_TAG_OPEN:{this._stateEndTagOpen(e);break}case T.TAG_NAME:{this._stateTagName(e);break}case T.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(e);break}case T.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(e);break}case T.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(e);break}case T.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(e);break}case T.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(e);break}case T.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(e);break}case T.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(e);break}case T.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(e);break}case T.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(e);break}case T.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(e);break}case T.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(e);break}case T.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(e);break}case T.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(e);break}case T.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(e);break}case T.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(e);break}case T.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(e);break}case T.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(e);break}case T.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(e);break}case T.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(e);break}case T.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(e);break}case T.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(e);break}case T.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(e);break}case T.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(e);break}case T.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(e);break}case T.ATTRIBUTE_NAME:{this._stateAttributeName(e);break}case T.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(e);break}case T.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(e);break}case T.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(e);break}case T.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(e);break}case T.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(e);break}case T.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(e);break}case T.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(e);break}case T.BOGUS_COMMENT:{this._stateBogusComment(e);break}case T.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(e);break}case T.COMMENT_START:{this._stateCommentStart(e);break}case T.COMMENT_START_DASH:{this._stateCommentStartDash(e);break}case T.COMMENT:{this._stateComment(e);break}case T.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(e);break}case T.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(e);break}case T.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(e);break}case T.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(e);break}case T.COMMENT_END_DASH:{this._stateCommentEndDash(e);break}case T.COMMENT_END:{this._stateCommentEnd(e);break}case T.COMMENT_END_BANG:{this._stateCommentEndBang(e);break}case T.DOCTYPE:{this._stateDoctype(e);break}case T.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(e);break}case T.DOCTYPE_NAME:{this._stateDoctypeName(e);break}case T.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(e);break}case T.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(e);break}case T.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(e);break}case T.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(e);break}case T.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(e);break}case T.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(e);break}case T.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break}case T.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(e);break}case T.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(e);break}case T.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(e);break}case T.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(e);break}case T.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(e);break}case T.BOGUS_DOCTYPE:{this._stateBogusDoctype(e);break}case T.CDATA_SECTION:{this._stateCdataSection(e);break}case T.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(e);break}case T.CDATA_SECTION_END:{this._stateCdataSectionEnd(e);break}case T.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case T.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(e);break}default:throw new Error("Unknown state")}}_stateData(e){switch(e){case S.LESS_THAN_SIGN:{this.state=T.TAG_OPEN;break}case S.AMPERSAND:{this._startCharacterReference();break}case S.NULL:{this._err(D.unexpectedNullCharacter),this._emitCodePoint(e);break}case S.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case S.AMPERSAND:{this._startCharacterReference();break}case S.LESS_THAN_SIGN:{this.state=T.RCDATA_LESS_THAN_SIGN;break}case S.NULL:{this._err(D.unexpectedNullCharacter),this._emitChars(he);break}case S.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case S.LESS_THAN_SIGN:{this.state=T.RAWTEXT_LESS_THAN_SIGN;break}case S.NULL:{this._err(D.unexpectedNullCharacter),this._emitChars(he);break}case S.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case S.LESS_THAN_SIGN:{this.state=T.SCRIPT_DATA_LESS_THAN_SIGN;break}case S.NULL:{this._err(D.unexpectedNullCharacter),this._emitChars(he);break}case S.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case S.NULL:{this._err(D.unexpectedNullCharacter),this._emitChars(he);break}case S.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateTagOpen(e){if(Lt(e))this._createStartTagToken(),this.state=T.TAG_NAME,this._stateTagName(e);else switch(e){case S.EXCLAMATION_MARK:{this.state=T.MARKUP_DECLARATION_OPEN;break}case S.SOLIDUS:{this.state=T.END_TAG_OPEN;break}case S.QUESTION_MARK:{this._err(D.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=T.BOGUS_COMMENT,this._stateBogusComment(e);break}case S.EOF:{this._err(D.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(D.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=T.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(Lt(e))this._createEndTagToken(),this.state=T.TAG_NAME,this._stateTagName(e);else switch(e){case S.GREATER_THAN_SIGN:{this._err(D.missingEndTagName),this.state=T.DATA;break}case S.EOF:{this._err(D.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(D.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=T.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){let t=this.currentToken;switch(e){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:{this.state=T.BEFORE_ATTRIBUTE_NAME;break}case S.SOLIDUS:{this.state=T.SELF_CLOSING_START_TAG;break}case S.GREATER_THAN_SIGN:{this.state=T.DATA,this.emitCurrentTagToken();break}case S.NULL:{this._err(D.unexpectedNullCharacter),t.tagName+=he;break}case S.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:t.tagName+=String.fromCodePoint(Ho(e)?ys(e):e)}}_stateRcdataLessThanSign(e){e===S.SOLIDUS?this.state=T.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=T.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){Lt(e)?(this.state=T.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars("</"),this.state=T.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();let t=this.currentToken;switch(t.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=T.BEFORE_ATTRIBUTE_NAME,!1;case S.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=T.SELF_CLOSING_START_TAG,!1;case S.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=T.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=T.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===S.SOLIDUS?this.state=T.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=T.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){Lt(e)?(this.state=T.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars("</"),this.state=T.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=T.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case S.SOLIDUS:{this.state=T.SCRIPT_DATA_END_TAG_OPEN;break}case S.EXCLAMATION_MARK:{this.state=T.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=T.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){Lt(e)?(this.state=T.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars("</"),this.state=T.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=T.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===S.HYPHEN_MINUS?(this.state=T.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=T.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===S.HYPHEN_MINUS?(this.state=T.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=T.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case S.HYPHEN_MINUS:{this.state=T.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case S.LESS_THAN_SIGN:{this.state=T.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case S.NULL:{this._err(D.unexpectedNullCharacter),this._emitChars(he);break}case S.EOF:{this._err(D.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case S.HYPHEN_MINUS:{this.state=T.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case S.LESS_THAN_SIGN:{this.state=T.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case S.NULL:{this._err(D.unexpectedNullCharacter),this.state=T.SCRIPT_DATA_ESCAPED,this._emitChars(he);break}case S.EOF:{this._err(D.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=T.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case S.HYPHEN_MINUS:{this._emitChars("-");break}case S.LESS_THAN_SIGN:{this.state=T.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case S.GREATER_THAN_SIGN:{this.state=T.SCRIPT_DATA,this._emitChars(">");break}case S.NULL:{this._err(D.unexpectedNullCharacter),this.state=T.SCRIPT_DATA_ESCAPED,this._emitChars(he);break}case S.EOF:{this._err(D.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=T.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===S.SOLIDUS?this.state=T.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Lt(e)?(this._emitChars("<"),this.state=T.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars("<"),this.state=T.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){Lt(e)?(this.state=T.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars("</"),this.state=T.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=T.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(Ne.SCRIPT,!1)&&wu(this.preprocessor.peek(Ne.SCRIPT.length))){this._emitCodePoint(e);for(let t=0;t<Ne.SCRIPT.length;t++)this._emitCodePoint(this._consume());this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=T.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case S.HYPHEN_MINUS:{this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case S.LESS_THAN_SIGN:{this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case S.NULL:{this._err(D.unexpectedNullCharacter),this._emitChars(he);break}case S.EOF:{this._err(D.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case S.HYPHEN_MINUS:{this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case S.LESS_THAN_SIGN:{this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case S.NULL:{this._err(D.unexpectedNullCharacter),this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(he);break}case S.EOF:{this._err(D.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case S.HYPHEN_MINUS:{this._emitChars("-");break}case S.LESS_THAN_SIGN:{this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case S.GREATER_THAN_SIGN:{this.state=T.SCRIPT_DATA,this._emitChars(">");break}case S.NULL:{this._err(D.unexpectedNullCharacter),this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(he);break}case S.EOF:{this._err(D.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===S.SOLIDUS?(this.state=T.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(Ne.SCRIPT,!1)&&wu(this.preprocessor.peek(Ne.SCRIPT.length))){this._emitCodePoint(e);for(let t=0;t<Ne.SCRIPT.length;t++)this._emitCodePoint(this._consume());this.state=T.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:break;case S.SOLIDUS:case S.GREATER_THAN_SIGN:case S.EOF:{this.state=T.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break}case S.EQUALS_SIGN:{this._err(D.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=T.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=T.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:case S.SOLIDUS:case S.GREATER_THAN_SIGN:case S.EOF:{this._leaveAttrName(),this.state=T.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break}case S.EQUALS_SIGN:{this._leaveAttrName(),this.state=T.BEFORE_ATTRIBUTE_VALUE;break}case S.QUOTATION_MARK:case S.APOSTROPHE:case S.LESS_THAN_SIGN:{this._err(D.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break}case S.NULL:{this._err(D.unexpectedNullCharacter),this.currentAttr.name+=he;break}default:this.currentAttr.name+=String.fromCodePoint(Ho(e)?ys(e):e)}}_stateAfterAttributeName(e){switch(e){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:break;case S.SOLIDUS:{this.state=T.SELF_CLOSING_START_TAG;break}case S.EQUALS_SIGN:{this.state=T.BEFORE_ATTRIBUTE_VALUE;break}case S.GREATER_THAN_SIGN:{this.state=T.DATA,this.emitCurrentTagToken();break}case S.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=T.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:break;case S.QUOTATION_MARK:{this.state=T.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case S.APOSTROPHE:{this.state=T.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case S.GREATER_THAN_SIGN:{this._err(D.missingAttributeValue),this.state=T.DATA,this.emitCurrentTagToken();break}default:this.state=T.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case S.QUOTATION_MARK:{this.state=T.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case S.AMPERSAND:{this._startCharacterReference();break}case S.NULL:{this._err(D.unexpectedNullCharacter),this.currentAttr.value+=he;break}case S.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case S.APOSTROPHE:{this.state=T.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case S.AMPERSAND:{this._startCharacterReference();break}case S.NULL:{this._err(D.unexpectedNullCharacter),this.currentAttr.value+=he;break}case S.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:{this._leaveAttrValue(),this.state=T.BEFORE_ATTRIBUTE_NAME;break}case S.AMPERSAND:{this._startCharacterReference();break}case S.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=T.DATA,this.emitCurrentTagToken();break}case S.NULL:{this._err(D.unexpectedNullCharacter),this.currentAttr.value+=he;break}case S.QUOTATION_MARK:case S.APOSTROPHE:case S.LESS_THAN_SIGN:case S.EQUALS_SIGN:case S.GRAVE_ACCENT:{this._err(D.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break}case S.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:{this._leaveAttrValue(),this.state=T.BEFORE_ATTRIBUTE_NAME;break}case S.SOLIDUS:{this._leaveAttrValue(),this.state=T.SELF_CLOSING_START_TAG;break}case S.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=T.DATA,this.emitCurrentTagToken();break}case S.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:this._err(D.missingWhitespaceBetweenAttributes),this.state=T.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case S.GREATER_THAN_SIGN:{let t=this.currentToken;t.selfClosing=!0,this.state=T.DATA,this.emitCurrentTagToken();break}case S.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:this._err(D.unexpectedSolidusInTag),this.state=T.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){let t=this.currentToken;switch(e){case S.GREATER_THAN_SIGN:{this.state=T.DATA,this.emitCurrentComment(t);break}case S.EOF:{this.emitCurrentComment(t),this._emitEOFToken();break}case S.NULL:{this._err(D.unexpectedNullCharacter),t.data+=he;break}default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(Ne.DASH_DASH,!0)?(this._createCommentToken(Ne.DASH_DASH.length+1),this.state=T.COMMENT_START):this._consumeSequenceIfMatch(Ne.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Ne.DOCTYPE.length+1),this.state=T.DOCTYPE):this._consumeSequenceIfMatch(Ne.CDATA_START,!0)?this.inForeignNode?this.state=T.CDATA_SECTION:(this._err(D.cdataInHtmlContent),this._createCommentToken(Ne.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=T.BOGUS_COMMENT):this._ensureHibernation()||(this._err(D.incorrectlyOpenedComment),this._createCommentToken(2),this.state=T.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case S.HYPHEN_MINUS:{this.state=T.COMMENT_START_DASH;break}case S.GREATER_THAN_SIGN:{this._err(D.abruptClosingOfEmptyComment),this.state=T.DATA;let t=this.currentToken;this.emitCurrentComment(t);break}default:this.state=T.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){let t=this.currentToken;switch(e){case S.HYPHEN_MINUS:{this.state=T.COMMENT_END;break}case S.GREATER_THAN_SIGN:{this._err(D.abruptClosingOfEmptyComment),this.state=T.DATA,this.emitCurrentComment(t);break}case S.EOF:{this._err(D.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break}default:t.data+="-",this.state=T.COMMENT,this._stateComment(e)}}_stateComment(e){let t=this.currentToken;switch(e){case S.HYPHEN_MINUS:{this.state=T.COMMENT_END_DASH;break}case S.LESS_THAN_SIGN:{t.data+="<",this.state=T.COMMENT_LESS_THAN_SIGN;break}case S.NULL:{this._err(D.unexpectedNullCharacter),t.data+=he;break}case S.EOF:{this._err(D.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break}default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){let t=this.currentToken;switch(e){case S.EXCLAMATION_MARK:{t.data+="!",this.state=T.COMMENT_LESS_THAN_SIGN_BANG;break}case S.LESS_THAN_SIGN:{t.data+="<";break}default:this.state=T.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===S.HYPHEN_MINUS?this.state=T.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=T.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===S.HYPHEN_MINUS?this.state=T.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=T.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==S.GREATER_THAN_SIGN&&e!==S.EOF&&this._err(D.nestedComment),this.state=T.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){let t=this.currentToken;switch(e){case S.HYPHEN_MINUS:{this.state=T.COMMENT_END;break}case S.EOF:{this._err(D.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break}default:t.data+="-",this.state=T.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){let t=this.currentToken;switch(e){case S.GREATER_THAN_SIGN:{this.state=T.DATA,this.emitCurrentComment(t);break}case S.EXCLAMATION_MARK:{this.state=T.COMMENT_END_BANG;break}case S.HYPHEN_MINUS:{t.data+="-";break}case S.EOF:{this._err(D.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break}default:t.data+="--",this.state=T.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){let t=this.currentToken;switch(e){case S.HYPHEN_MINUS:{t.data+="--!",this.state=T.COMMENT_END_DASH;break}case S.GREATER_THAN_SIGN:{this._err(D.incorrectlyClosedComment),this.state=T.DATA,this.emitCurrentComment(t);break}case S.EOF:{this._err(D.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break}default:t.data+="--!",this.state=T.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:{this.state=T.BEFORE_DOCTYPE_NAME;break}case S.GREATER_THAN_SIGN:{this.state=T.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break}case S.EOF:{this._err(D.eofInDoctype),this._createDoctypeToken(null);let t=this.currentToken;t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:this._err(D.missingWhitespaceBeforeDoctypeName),this.state=T.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(Ho(e))this._createDoctypeToken(String.fromCharCode(ys(e))),this.state=T.DOCTYPE_NAME;else switch(e){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:break;case S.NULL:{this._err(D.unexpectedNullCharacter),this._createDoctypeToken(he),this.state=T.DOCTYPE_NAME;break}case S.GREATER_THAN_SIGN:{this._err(D.missingDoctypeName),this._createDoctypeToken(null);let t=this.currentToken;t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=T.DATA;break}case S.EOF:{this._err(D.eofInDoctype),this._createDoctypeToken(null);let t=this.currentToken;t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=T.DOCTYPE_NAME}}_stateDoctypeName(e){let t=this.currentToken;switch(e){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:{this.state=T.AFTER_DOCTYPE_NAME;break}case S.GREATER_THAN_SIGN:{this.state=T.DATA,this.emitCurrentDoctype(t);break}case S.NULL:{this._err(D.unexpectedNullCharacter),t.name+=he;break}case S.EOF:{this._err(D.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:t.name+=String.fromCodePoint(Ho(e)?ys(e):e)}}_stateAfterDoctypeName(e){let t=this.currentToken;switch(e){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:break;case S.GREATER_THAN_SIGN:{this.state=T.DATA,this.emitCurrentDoctype(t);break}case S.EOF:{this._err(D.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Ne.PUBLIC,!1)?this.state=T.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Ne.SYSTEM,!1)?this.state=T.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(D.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=T.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){let t=this.currentToken;switch(e){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:{this.state=T.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case S.QUOTATION_MARK:{this._err(D.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=T.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case S.APOSTROPHE:{this._err(D.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=T.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case S.GREATER_THAN_SIGN:{this._err(D.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=T.DATA,this.emitCurrentDoctype(t);break}case S.EOF:{this._err(D.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:this._err(D.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=T.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:break;case S.QUOTATION_MARK:{t.publicId="",this.state=T.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case S.APOSTROPHE:{t.publicId="",this.state=T.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case S.GREATER_THAN_SIGN:{this._err(D.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=T.DATA,this.emitCurrentDoctype(t);break}case S.EOF:{this._err(D.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:this._err(D.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=T.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case S.QUOTATION_MARK:{this.state=T.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case S.NULL:{this._err(D.unexpectedNullCharacter),t.publicId+=he;break}case S.GREATER_THAN_SIGN:{this._err(D.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=T.DATA;break}case S.EOF:{this._err(D.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case S.APOSTROPHE:{this.state=T.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case S.NULL:{this._err(D.unexpectedNullCharacter),t.publicId+=he;break}case S.GREATER_THAN_SIGN:{this._err(D.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=T.DATA;break}case S.EOF:{this._err(D.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:{this.state=T.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case S.GREATER_THAN_SIGN:{this.state=T.DATA,this.emitCurrentDoctype(t);break}case S.QUOTATION_MARK:{this._err(D.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=T.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case S.APOSTROPHE:{this._err(D.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=T.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case S.EOF:{this._err(D.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:this._err(D.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=T.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){let t=this.currentToken;switch(e){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:break;case S.GREATER_THAN_SIGN:{this.emitCurrentDoctype(t),this.state=T.DATA;break}case S.QUOTATION_MARK:{t.systemId="",this.state=T.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case S.APOSTROPHE:{t.systemId="",this.state=T.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case S.EOF:{this._err(D.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:this._err(D.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=T.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){let t=this.currentToken;switch(e){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:{this.state=T.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case S.QUOTATION_MARK:{this._err(D.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=T.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case S.APOSTROPHE:{this._err(D.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=T.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case S.GREATER_THAN_SIGN:{this._err(D.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=T.DATA,this.emitCurrentDoctype(t);break}case S.EOF:{this._err(D.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:this._err(D.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=T.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:break;case S.QUOTATION_MARK:{t.systemId="",this.state=T.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case S.APOSTROPHE:{t.systemId="",this.state=T.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case S.GREATER_THAN_SIGN:{this._err(D.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=T.DATA,this.emitCurrentDoctype(t);break}case S.EOF:{this._err(D.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:this._err(D.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=T.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case S.QUOTATION_MARK:{this.state=T.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case S.NULL:{this._err(D.unexpectedNullCharacter),t.systemId+=he;break}case S.GREATER_THAN_SIGN:{this._err(D.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=T.DATA;break}case S.EOF:{this._err(D.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case S.APOSTROPHE:{this.state=T.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case S.NULL:{this._err(D.unexpectedNullCharacter),t.systemId+=he;break}case S.GREATER_THAN_SIGN:{this._err(D.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=T.DATA;break}case S.EOF:{this._err(D.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:break;case S.GREATER_THAN_SIGN:{this.emitCurrentDoctype(t),this.state=T.DATA;break}case S.EOF:{this._err(D.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:this._err(D.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=T.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){let t=this.currentToken;switch(e){case S.GREATER_THAN_SIGN:{this.emitCurrentDoctype(t),this.state=T.DATA;break}case S.NULL:{this._err(D.unexpectedNullCharacter);break}case S.EOF:{this.emitCurrentDoctype(t),this._emitEOFToken();break}default:}}_stateCdataSection(e){switch(e){case S.RIGHT_SQUARE_BRACKET:{this.state=T.CDATA_SECTION_BRACKET;break}case S.EOF:{this._err(D.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===S.RIGHT_SQUARE_BRACKET?this.state=T.CDATA_SECTION_END:(this._emitChars("]"),this.state=T.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case S.GREATER_THAN_SIGN:{this.state=T.DATA;break}case S.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=T.CDATA_SECTION,this._stateCdataSection(e)}}_stateCharacterReference(){let e=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(e<0)if(this.preprocessor.lastChunkWritten)e=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}e===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(S.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Ru(this.preprocessor.peek(1))?T.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){Ru(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===S.SEMICOLON&&this._err(D.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}};var Lu=new Set([l.DD,l.DT,l.LI,l.OPTGROUP,l.OPTION,l.P,l.RB,l.RP,l.RT,l.RTC]),Mu=new Set([...Lu,l.CAPTION,l.COLGROUP,l.TBODY,l.TD,l.TFOOT,l.TH,l.THEAD,l.TR]),As=new Set([l.APPLET,l.CAPTION,l.HTML,l.MARQUEE,l.OBJECT,l.TABLE,l.TD,l.TEMPLATE,l.TH]),t0=new Set([...As,l.OL,l.UL]),o0=new Set([...As,l.BUTTON]),ku=new Set([l.ANNOTATION_XML,l.MI,l.MN,l.MO,l.MS,l.MTEXT]),Pu=new Set([l.DESC,l.FOREIGN_OBJECT,l.TITLE]),r0=new Set([l.TR,l.TEMPLATE,l.HTML]),s0=new Set([l.TBODY,l.TFOOT,l.THEAD,l.TEMPLATE,l.HTML]),n0=new Set([l.TABLE,l.TEMPLATE,l.HTML]),i0=new Set([l.TD,l.TH]),Ss=class{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,r){this.treeAdapter=t,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=l.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===l.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===_.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}pop(){let e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){let r=this._indexOf(e);this.items[r]=t,r===this.stackTop&&(this.current=t)}insertAfter(e,t,r){let s=this._indexOf(e)+1;this.items.splice(s,0,t),this.tagIDs.splice(s,0,r),this.stackTop++,s===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,s===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do t=this.tagIDs.lastIndexOf(e,t-1);while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==_.HTML);this.shortenToLength(Math.max(t,0))}shortenToLength(e){for(;this.stackTop>=e;){let t=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop<e)}}popUntilElementPopped(e){let t=this._indexOf(e);this.shortenToLength(Math.max(t,0))}popUntilPopped(e,t){let r=this._indexOfTagNames(e,t);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Uo,_.HTML)}popUntilTableCellPopped(){this.popUntilPopped(i0,_.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,t){for(let r=this.stackTop;r>=0;r--)if(e.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===t)return r;return-1}clearBackTo(e,t){let r=this._indexOfTagNames(e,t);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(n0,_.HTML)}clearBackToTableBodyContext(){this.clearBackTo(s0,_.HTML)}clearBackToTableRowContext(){this.clearBackTo(r0,_.HTML)}remove(e){let t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===l.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===l.HTML}hasInDynamicScope(e,t){for(let r=this.stackTop;r>=0;r--){let s=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case _.HTML:{if(s===e)return!0;if(t.has(s))return!1;break}case _.SVG:{if(Pu.has(s))return!1;break}case _.MATHML:{if(ku.has(s))return!1;break}}}return!0}hasInScope(e){return this.hasInDynamicScope(e,As)}hasInListItemScope(e){return this.hasInDynamicScope(e,t0)}hasInButtonScope(e){return this.hasInDynamicScope(e,o0)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case _.HTML:{if(Uo.has(t))return!0;if(As.has(t))return!1;break}case _.SVG:{if(Pu.has(t))return!1;break}case _.MATHML:{if(ku.has(t))return!1;break}}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===_.HTML)switch(this.tagIDs[t]){case e:return!0;case l.TABLE:case l.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===_.HTML)switch(this.tagIDs[e]){case l.TBODY:case l.THEAD:case l.TFOOT:return!0;case l.TABLE:case l.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===_.HTML)switch(this.tagIDs[t]){case e:return!0;case l.OPTION:case l.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&Lu.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Mu.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&Mu.has(this.currentTagId);)this.pop()}};var st;(function(o){o[o.Marker=0]="Marker",o[o.Element=1]="Element"})(st||(st={}));var Du={type:st.Marker},zs=class{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){let r=[],s=t.length,a=this.treeAdapter.getTagName(e),p=this.treeAdapter.getNamespaceURI(e);for(let u=0;u<this.entries.length;u++){let f=this.entries[u];if(f.type===st.Marker)break;let{element:m}=f;if(this.treeAdapter.getTagName(m)===a&&this.treeAdapter.getNamespaceURI(m)===p){let x=this.treeAdapter.getAttrList(m);x.length===s&&r.push({idx:u,attrs:x})}}return r}_ensureNoahArkCondition(e){if(this.entries.length<3)return;let t=this.treeAdapter.getAttrList(e),r=this._getNoahArkConditionCandidates(e,t);if(r.length<3)return;let s=new Map(t.map(p=>[p.name,p.value])),a=0;for(let p=0;p<r.length;p++){let u=r[p];u.attrs.every(f=>s.get(f.name)===f.value)&&(a+=1,a>=3&&this.entries.splice(u.idx,1))}}insertMarker(){this.entries.unshift(Du)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:st.Element,element:e,token:t})}insertElementAfterBookmark(e,t){let r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:st.Element,element:e,token:t})}removeEntry(e){let t=this.entries.indexOf(e);t!==-1&&this.entries.splice(t,1)}clearToLastMarker(){let e=this.entries.indexOf(Du);e===-1?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){let t=this.entries.find(r=>r.type===st.Marker||this.treeAdapter.getTagName(r.element)===e);return t&&t.type===st.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===st.Element&&t.element===e)}};var nt={createDocument(){return{nodeName:"#document",mode:_e.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(o,e,t){return{nodeName:o,tagName:o,attrs:t,namespaceURI:e,childNodes:[],parentNode:null}},createCommentNode(o){return{nodeName:"#comment",data:o,parentNode:null}},createTextNode(o){return{nodeName:"#text",value:o,parentNode:null}},appendChild(o,e){o.childNodes.push(e),e.parentNode=o},insertBefore(o,e,t){let r=o.childNodes.indexOf(t);o.childNodes.splice(r,0,e),e.parentNode=o},setTemplateContent(o,e){o.content=e},getTemplateContent(o){return o.content},setDocumentType(o,e,t,r){let s=o.childNodes.find(a=>a.nodeName==="#documentType");if(s)s.name=e,s.publicId=t,s.systemId=r;else{let a={nodeName:"#documentType",name:e,publicId:t,systemId:r,parentNode:null};nt.appendChild(o,a)}},setDocumentMode(o,e){o.mode=e},getDocumentMode(o){return o.mode},detachNode(o){if(o.parentNode){let e=o.parentNode.childNodes.indexOf(o);o.parentNode.childNodes.splice(e,1),o.parentNode=null}},insertText(o,e){if(o.childNodes.length>0){let t=o.childNodes[o.childNodes.length-1];if(nt.isTextNode(t)){t.value+=e;return}}nt.appendChild(o,nt.createTextNode(e))},insertTextBefore(o,e,t){let r=o.childNodes[o.childNodes.indexOf(t)-1];r&&nt.isTextNode(r)?r.value+=e:nt.insertBefore(o,nt.createTextNode(e),t)},adoptAttributes(o,e){let t=new Set(o.attrs.map(r=>r.name));for(let r=0;r<e.length;r++)t.has(e[r].name)||o.attrs.push(e[r])},getFirstChild(o){return o.childNodes[0]},getChildNodes(o){return o.childNodes},getParentNode(o){return o.parentNode},getAttrList(o){return o.attrs},getTagName(o){return o.tagName},getNamespaceURI(o){return o.namespaceURI},getTextNodeContent(o){return o.value},getCommentNodeContent(o){return o.data},getDocumentTypeNodeName(o){return o.name},getDocumentTypeNodePublicId(o){return o.publicId},getDocumentTypeNodeSystemId(o){return o.systemId},isTextNode(o){return o.nodeName==="#text"},isCommentNode(o){return o.nodeName==="#comment"},isDocumentTypeNode(o){return o.nodeName==="#documentType"},isElementNode(o){return Object.prototype.hasOwnProperty.call(o,"tagName")},setNodeSourceCodeLocation(o,e){o.sourceCodeLocation=e},getNodeSourceCodeLocation(o){return o.sourceCodeLocation},updateNodeSourceCodeLocation(o,e){o.sourceCodeLocation={...o.sourceCodeLocation,...e}}};var Fu="html",a0="about:legacy-compat",c0="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Nu=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],p0=[...Nu,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],d0=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),_u=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],l0=[..._u,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function vu(o,e){return e.some(t=>o.startsWith(t))}function Bu(o){return o.name===Fu&&o.publicId===null&&(o.systemId===null||o.systemId===a0)}function ju(o){if(o.name!==Fu)return _e.QUIRKS;let{systemId:e}=o;if(e&&e.toLowerCase()===c0)return _e.QUIRKS;let{publicId:t}=o;if(t!==null){if(t=t.toLowerCase(),d0.has(t))return _e.QUIRKS;let r=e===null?p0:Nu;if(vu(t,r))return _e.QUIRKS;if(r=e===null?_u:l0,vu(t,r))return _e.LIMITED_QUIRKS}return _e.NO_QUIRKS}var Vu={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},m0="definitionurl",h0="definitionURL",f0=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(o=>[o.toLowerCase(),o])),x0=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:_.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:_.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:_.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:_.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:_.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:_.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:_.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:_.XML}],["xml:space",{prefix:"xml",name:"space",namespace:_.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:_.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:_.XMLNS}]]),g0=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(o=>[o.toLowerCase(),o])),b0=new Set([l.B,l.BIG,l.BLOCKQUOTE,l.BODY,l.BR,l.CENTER,l.CODE,l.DD,l.DIV,l.DL,l.DT,l.EM,l.EMBED,l.H1,l.H2,l.H3,l.H4,l.H5,l.H6,l.HEAD,l.HR,l.I,l.IMG,l.LI,l.LISTING,l.MENU,l.META,l.NOBR,l.OL,l.P,l.PRE,l.RUBY,l.S,l.SMALL,l.SPAN,l.STRONG,l.STRIKE,l.SUB,l.SUP,l.TABLE,l.TT,l.U,l.UL,l.VAR]);function Uu(o){let e=o.tagID;return e===l.FONT&&o.attrs.some(({name:r})=>r===Et.COLOR||r===Et.SIZE||r===Et.FACE)||b0.has(e)}function Ba(o){for(let e=0;e<o.attrs.length;e++)if(o.attrs[e].name===m0){o.attrs[e].name=h0;break}}function ja(o){for(let e=0;e<o.attrs.length;e++){let t=f0.get(o.attrs[e].name);t!=null&&(o.attrs[e].name=t)}}function Ts(o){for(let e=0;e<o.attrs.length;e++){let t=x0.get(o.attrs[e].name);t&&(o.attrs[e].prefix=t.prefix,o.attrs[e].name=t.name,o.attrs[e].namespace=t.namespace)}}function Hu(o){let e=g0.get(o.tagName);e!=null&&(o.tagName=e,o.tagID=Ht(o.tagName))}function y0(o,e){return e===_.MATHML&&(o===l.MI||o===l.MO||o===l.MN||o===l.MS||o===l.MTEXT)}function A0(o,e,t){if(e===_.MATHML&&o===l.ANNOTATION_XML){for(let r=0;r<t.length;r++)if(t[r].name===Et.ENCODING){let s=t[r].value.toLowerCase();return s===Vu.TEXT_HTML||s===Vu.APPLICATION_XML}}return e===_.SVG&&(o===l.FOREIGN_OBJECT||o===l.DESC||o===l.TITLE)}function Wu(o,e,t,r){return(!r||r===_.HTML)&&A0(o,e,t)||(!r||r===_.MATHML)&&y0(o,e)}var S0="hidden",z0=8,T0=3,I;(function(o){o[o.INITIAL=0]="INITIAL",o[o.BEFORE_HTML=1]="BEFORE_HTML",o[o.BEFORE_HEAD=2]="BEFORE_HEAD",o[o.IN_HEAD=3]="IN_HEAD",o[o.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",o[o.AFTER_HEAD=5]="AFTER_HEAD",o[o.IN_BODY=6]="IN_BODY",o[o.TEXT=7]="TEXT",o[o.IN_TABLE=8]="IN_TABLE",o[o.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",o[o.IN_CAPTION=10]="IN_CAPTION",o[o.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",o[o.IN_TABLE_BODY=12]="IN_TABLE_BODY",o[o.IN_ROW=13]="IN_ROW",o[o.IN_CELL=14]="IN_CELL",o[o.IN_SELECT=15]="IN_SELECT",o[o.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",o[o.IN_TEMPLATE=17]="IN_TEMPLATE",o[o.AFTER_BODY=18]="AFTER_BODY",o[o.IN_FRAMESET=19]="IN_FRAMESET",o[o.AFTER_FRAMESET=20]="AFTER_FRAMESET",o[o.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",o[o.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(I||(I={}));var E0={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Yu=new Set([l.TABLE,l.TBODY,l.TFOOT,l.THEAD,l.TR]),Gu={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:nt,onParseError:null},Zo=class{constructor(e,t,r=null,s=null){this.fragmentContext=r,this.scriptHandler=s,this.currentToken=null,this.stopped=!1,this.insertionMode=I.INITIAL,this.originalInsertionMode=I.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...Gu,...e},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=t??this.treeAdapter.createDocument(),this.tokenizer=new Wo(this.options,this),this.activeFormattingElements=new zs(this.treeAdapter),this.fragmentContextID=r?Ht(this.treeAdapter.getTagName(r)):l.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new Ss(this.document,this.treeAdapter,this)}static parse(e,t){let r=new this(t);return r.tokenizer.write(e,!0),r.document}static getFragmentParser(e,t){let r={...Gu,...t};e??(e=r.treeAdapter.createElement(M.TEMPLATE,_.HTML,[]));let s=r.treeAdapter.createElement("documentmock",_.HTML,[]),a=new this(r,s,e);return a.fragmentContextID===l.TEMPLATE&&a.tmplInsertionModeStack.unshift(I.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){let e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,r){var s;if(!this.onParseError)return;let a=(s=e.location)!==null&&s!==void 0?s:E0,p={code:t,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:r?a.startLine:a.endLine,endCol:r?a.startCol:a.endCol,endOffset:r?a.startOffset:a.endOffset};this.onParseError(p)}onItemPush(e,t,r){var s,a;(a=(s=this.treeAdapter).onItemPush)===null||a===void 0||a.call(s,e),r&&this.openElements.stackTop>0&&this._setContextModes(e,t)}onItemPop(e,t){var r,s;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(s=(r=this.treeAdapter).onItemPop)===null||s===void 0||s.call(r,e,this.openElements.current),t){let a,p;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,p=this.fragmentContextID):{current:a,currentTagId:p}=this.openElements,this._setContextModes(a,p)}}_setContextModes(e,t){let r=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===_.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&e!==void 0&&t!==void 0&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,_.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=I.TEXT}switchToPlaintextParsing(){this.insertionMode=I.TEXT,this.originalInsertionMode=I.IN_BODY,this.tokenizer.state=Pe.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===M.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==_.HTML))switch(this.fragmentContextID){case l.TITLE:case l.TEXTAREA:{this.tokenizer.state=Pe.RCDATA;break}case l.STYLE:case l.XMP:case l.IFRAME:case l.NOEMBED:case l.NOFRAMES:case l.NOSCRIPT:{this.tokenizer.state=Pe.RAWTEXT;break}case l.SCRIPT:{this.tokenizer.state=Pe.SCRIPT_DATA;break}case l.PLAINTEXT:{this.tokenizer.state=Pe.PLAINTEXT;break}default:}}_setDocumentType(e){let t=e.name||"",r=e.publicId||"",s=e.systemId||"";if(this.treeAdapter.setDocumentType(this.document,t,r,s),e.location){let p=this.treeAdapter.getChildNodes(this.document).find(u=>this.treeAdapter.isDocumentTypeNode(u));p&&this.treeAdapter.setNodeSourceCodeLocation(p,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){let r=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{let r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,e)}}_appendElement(e,t){let r=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(r,e.location)}_insertElement(e,t){let r=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(r,e.location),this.openElements.push(r,e.tagID)}_insertFakeElement(e,t){let r=this.treeAdapter.createElement(e,_.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,t)}_insertTemplate(e){let t=this.treeAdapter.createElement(e.tagName,_.HTML,e.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,r),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){let e=this.treeAdapter.createElement(M.HTML,_.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,l.HTML)}_appendCommentNode(e,t){let r=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,e.location)}_insertCharacters(e){let t,r;if(this._shouldFosterParentOnInsertion()?({parent:t,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(t,e.chars,r):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;let s=this.treeAdapter.getChildNodes(t),a=r?s.lastIndexOf(r):s.length,p=s[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(p)){let{endLine:f,endCol:m,endOffset:x}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(p,{endLine:f,endCol:m,endOffset:x})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(p,e.location)}_adoptNodes(e,t){for(let r=this.treeAdapter.getFirstChild(e);r;r=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(t,r)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){let r=t.location,s=this.treeAdapter.getTagName(e),a=t.type===ie.END_TAG&&s===t.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,a)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,r;return this.openElements.stackTop===0&&this.fragmentContext?(t=this.fragmentContext,r=this.fragmentContextID):{current:t,currentTagId:r}=this.openElements,e.tagID===l.SVG&&this.treeAdapter.getTagName(t)===M.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(t)===_.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===l.MGLYPH||e.tagID===l.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,t,_.HTML)}_processToken(e){switch(e.type){case ie.CHARACTER:{this.onCharacter(e);break}case ie.NULL_CHARACTER:{this.onNullCharacter(e);break}case ie.COMMENT:{this.onComment(e);break}case ie.DOCTYPE:{this.onDoctype(e);break}case ie.START_TAG:{this._processStartTag(e);break}case ie.END_TAG:{this.onEndTag(e);break}case ie.EOF:{this.onEof(e);break}case ie.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(e);break}}}_isIntegrationPoint(e,t,r){let s=this.treeAdapter.getNamespaceURI(t),a=this.treeAdapter.getAttrList(t);return Wu(e,s,a,r)}_reconstructActiveFormattingElements(){let e=this.activeFormattingElements.entries.length;if(e){let t=this.activeFormattingElements.entries.findIndex(s=>s.type===st.Marker||this.openElements.contains(s.element)),r=t===-1?e-1:t-1;for(let s=r;s>=0;s--){let a=this.activeFormattingElements.entries[s];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=I.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(l.P),this.openElements.popUntilTagNamePopped(l.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case l.TR:{this.insertionMode=I.IN_ROW;return}case l.TBODY:case l.THEAD:case l.TFOOT:{this.insertionMode=I.IN_TABLE_BODY;return}case l.CAPTION:{this.insertionMode=I.IN_CAPTION;return}case l.COLGROUP:{this.insertionMode=I.IN_COLUMN_GROUP;return}case l.TABLE:{this.insertionMode=I.IN_TABLE;return}case l.BODY:{this.insertionMode=I.IN_BODY;return}case l.FRAMESET:{this.insertionMode=I.IN_FRAMESET;return}case l.SELECT:{this._resetInsertionModeForSelect(e);return}case l.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case l.HTML:{this.insertionMode=this.headElement?I.AFTER_HEAD:I.BEFORE_HEAD;return}case l.TD:case l.TH:{if(e>0){this.insertionMode=I.IN_CELL;return}break}case l.HEAD:{if(e>0){this.insertionMode=I.IN_HEAD;return}break}}this.insertionMode=I.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){let r=this.openElements.tagIDs[t];if(r===l.TEMPLATE)break;if(r===l.TABLE){this.insertionMode=I.IN_SELECT_IN_TABLE;return}}this.insertionMode=I.IN_SELECT}_isElementCausesFosterParenting(e){return Yu.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){let t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case l.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(t)===_.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break}case l.TABLE:{let r=this.treeAdapter.getParentNode(t);return r?{parent:r,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}default:}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){let t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){let r=this.treeAdapter.getNamespaceURI(e);return Iu[r].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){eT(this,e);return}switch(this.insertionMode){case I.INITIAL:{$o(this,e);break}case I.BEFORE_HTML:{Ko(this,e);break}case I.BEFORE_HEAD:{qo(this,e);break}case I.IN_HEAD:{Yo(this,e);break}case I.IN_HEAD_NO_SCRIPT:{Qo(this,e);break}case I.AFTER_HEAD:{Jo(this,e);break}case I.IN_BODY:case I.IN_CAPTION:case I.IN_CELL:case I.IN_TEMPLATE:{Ju(this,e);break}case I.TEXT:case I.IN_SELECT:case I.IN_SELECT_IN_TABLE:{this._insertCharacters(e);break}case I.IN_TABLE:case I.IN_TABLE_BODY:case I.IN_ROW:{Va(this,e);break}case I.IN_TABLE_TEXT:{rm(this,e);break}case I.IN_COLUMN_GROUP:{Cs(this,e);break}case I.AFTER_BODY:{Is(this,e);break}case I.AFTER_AFTER_BODY:{Es(this,e);break}default:}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Xz(this,e);return}switch(this.insertionMode){case I.INITIAL:{$o(this,e);break}case I.BEFORE_HTML:{Ko(this,e);break}case I.BEFORE_HEAD:{qo(this,e);break}case I.IN_HEAD:{Yo(this,e);break}case I.IN_HEAD_NO_SCRIPT:{Qo(this,e);break}case I.AFTER_HEAD:{Jo(this,e);break}case I.TEXT:{this._insertCharacters(e);break}case I.IN_TABLE:case I.IN_TABLE_BODY:case I.IN_ROW:{Va(this,e);break}case I.IN_COLUMN_GROUP:{Cs(this,e);break}case I.AFTER_BODY:{Is(this,e);break}case I.AFTER_AFTER_BODY:{Es(this,e);break}default:}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){Ua(this,e);return}switch(this.insertionMode){case I.INITIAL:case I.BEFORE_HTML:case I.BEFORE_HEAD:case I.IN_HEAD:case I.IN_HEAD_NO_SCRIPT:case I.AFTER_HEAD:case I.IN_BODY:case I.IN_TABLE:case I.IN_CAPTION:case I.IN_COLUMN_GROUP:case I.IN_TABLE_BODY:case I.IN_ROW:case I.IN_CELL:case I.IN_SELECT:case I.IN_SELECT_IN_TABLE:case I.IN_TEMPLATE:case I.IN_FRAMESET:case I.AFTER_FRAMESET:{Ua(this,e);break}case I.IN_TABLE_TEXT:{Go(this,e);break}case I.AFTER_BODY:{k0(this,e);break}case I.AFTER_AFTER_BODY:case I.AFTER_AFTER_FRAMESET:{P0(this,e);break}default:}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case I.INITIAL:{L0(this,e);break}case I.BEFORE_HEAD:case I.IN_HEAD:case I.IN_HEAD_NO_SCRIPT:case I.AFTER_HEAD:{this._err(e,D.misplacedDoctype);break}case I.IN_TABLE_TEXT:{Go(this,e);break}default:}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,D.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?tT(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case I.INITIAL:{$o(this,e);break}case I.BEFORE_HTML:{D0(this,e);break}case I.BEFORE_HEAD:{F0(this,e);break}case I.IN_HEAD:{it(this,e);break}case I.IN_HEAD_NO_SCRIPT:{B0(this,e);break}case I.AFTER_HEAD:{V0(this,e);break}case I.IN_BODY:{Le(this,e);break}case I.IN_TABLE:{lo(this,e);break}case I.IN_TABLE_TEXT:{Go(this,e);break}case I.IN_CAPTION:{Nz(this,e);break}case I.IN_COLUMN_GROUP:{Ga(this,e);break}case I.IN_TABLE_BODY:{Os(this,e);break}case I.IN_ROW:{Ms(this,e);break}case I.IN_CELL:{jz(this,e);break}case I.IN_SELECT:{im(this,e);break}case I.IN_SELECT_IN_TABLE:{Uz(this,e);break}case I.IN_TEMPLATE:{Wz(this,e);break}case I.AFTER_BODY:{Gz(this,e);break}case I.IN_FRAMESET:{Kz(this,e);break}case I.AFTER_FRAMESET:{Yz(this,e);break}case I.AFTER_AFTER_BODY:{Jz(this,e);break}case I.AFTER_AFTER_FRAMESET:{Zz(this,e);break}default:}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?oT(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case I.INITIAL:{$o(this,e);break}case I.BEFORE_HTML:{v0(this,e);break}case I.BEFORE_HEAD:{N0(this,e);break}case I.IN_HEAD:{_0(this,e);break}case I.IN_HEAD_NO_SCRIPT:{j0(this,e);break}case I.AFTER_HEAD:{U0(this,e);break}case I.IN_BODY:{ws(this,e);break}case I.TEXT:{Rz(this,e);break}case I.IN_TABLE:{Xo(this,e);break}case I.IN_TABLE_TEXT:{Go(this,e);break}case I.IN_CAPTION:{_z(this,e);break}case I.IN_COLUMN_GROUP:{Bz(this,e);break}case I.IN_TABLE_BODY:{Ha(this,e);break}case I.IN_ROW:{nm(this,e);break}case I.IN_CELL:{Vz(this,e);break}case I.IN_SELECT:{am(this,e);break}case I.IN_SELECT_IN_TABLE:{Hz(this,e);break}case I.IN_TEMPLATE:{$z(this,e);break}case I.AFTER_BODY:{pm(this,e);break}case I.IN_FRAMESET:{qz(this,e);break}case I.AFTER_FRAMESET:{Qz(this,e);break}case I.AFTER_AFTER_BODY:{Es(this,e);break}default:}}onEof(e){switch(this.insertionMode){case I.INITIAL:{$o(this,e);break}case I.BEFORE_HTML:{Ko(this,e);break}case I.BEFORE_HEAD:{qo(this,e);break}case I.IN_HEAD:{Yo(this,e);break}case I.IN_HEAD_NO_SCRIPT:{Qo(this,e);break}case I.AFTER_HEAD:{Jo(this,e);break}case I.IN_BODY:case I.IN_TABLE:case I.IN_CAPTION:case I.IN_COLUMN_GROUP:case I.IN_TABLE_BODY:case I.IN_ROW:case I.IN_CELL:case I.IN_SELECT:case I.IN_SELECT_IN_TABLE:{tm(this,e);break}case I.TEXT:{wz(this,e);break}case I.IN_TABLE_TEXT:{Go(this,e);break}case I.IN_TEMPLATE:{cm(this,e);break}case I.AFTER_BODY:case I.IN_FRAMESET:case I.AFTER_FRAMESET:case I.AFTER_AFTER_BODY:case I.AFTER_AFTER_FRAMESET:{$a(this,e);break}default:}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===S.LINE_FEED)){if(e.chars.length===1)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(e);return}switch(this.insertionMode){case I.IN_HEAD:case I.IN_HEAD_NO_SCRIPT:case I.AFTER_HEAD:case I.TEXT:case I.IN_COLUMN_GROUP:case I.IN_SELECT:case I.IN_SELECT_IN_TABLE:case I.IN_FRAMESET:case I.AFTER_FRAMESET:{this._insertCharacters(e);break}case I.IN_BODY:case I.IN_CAPTION:case I.IN_CELL:case I.IN_TEMPLATE:case I.AFTER_BODY:case I.AFTER_AFTER_BODY:case I.AFTER_AFTER_FRAMESET:{Qu(this,e);break}case I.IN_TABLE:case I.IN_TABLE_BODY:case I.IN_ROW:{Va(this,e);break}case I.IN_TABLE_TEXT:{om(this,e);break}default:}}};function C0(o,e){let t=o.activeFormattingElements.getElementEntryInScopeWithTagName(e.tagName);return t?o.openElements.contains(t.element)?o.openElements.hasInScope(e.tagID)||(t=null):(o.activeFormattingElements.removeEntry(t),t=null):em(o,e),t}function I0(o,e){let t=null,r=o.openElements.stackTop;for(;r>=0;r--){let s=o.openElements.items[r];if(s===e.element)break;o._isSpecialElement(s,o.openElements.tagIDs[r])&&(t=s)}return t||(o.openElements.shortenToLength(Math.max(r,0)),o.activeFormattingElements.removeEntry(e)),t}function R0(o,e,t){let r=e,s=o.openElements.getCommonAncestor(e);for(let a=0,p=s;p!==t;a++,p=s){s=o.openElements.getCommonAncestor(p);let u=o.activeFormattingElements.getElementEntry(p),f=u&&a>=T0;!u||f?(f&&o.activeFormattingElements.removeEntry(u),o.openElements.remove(p)):(p=w0(o,u),r===e&&(o.activeFormattingElements.bookmark=u),o.treeAdapter.detachNode(r),o.treeAdapter.appendChild(p,r),r=p)}return r}function w0(o,e){let t=o.treeAdapter.getNamespaceURI(e.element),r=o.treeAdapter.createElement(e.token.tagName,t,e.token.attrs);return o.openElements.replace(e.element,r),e.element=r,r}function O0(o,e,t){let r=o.treeAdapter.getTagName(e),s=Ht(r);if(o._isElementCausesFosterParenting(s))o._fosterParentElement(t);else{let a=o.treeAdapter.getNamespaceURI(e);s===l.TEMPLATE&&a===_.HTML&&(e=o.treeAdapter.getTemplateContent(e)),o.treeAdapter.appendChild(e,t)}}function M0(o,e,t){let r=o.treeAdapter.getNamespaceURI(t.element),{token:s}=t,a=o.treeAdapter.createElement(s.tagName,r,s.attrs);o._adoptNodes(e,a),o.treeAdapter.appendChild(e,a),o.activeFormattingElements.insertElementAfterBookmark(a,s),o.activeFormattingElements.removeEntry(t),o.openElements.remove(t.element),o.openElements.insertAfter(e,a,s.tagID)}function Wa(o,e){for(let t=0;t<z0;t++){let r=C0(o,e);if(!r)break;let s=I0(o,r);if(!s)break;o.activeFormattingElements.bookmark=r;let a=R0(o,s,r.element),p=o.openElements.getCommonAncestor(r.element);o.treeAdapter.detachNode(a),p&&O0(o,p,a),M0(o,s,r)}}function Ua(o,e){o._appendCommentNode(e,o.openElements.currentTmplContentOrNode)}function k0(o,e){o._appendCommentNode(e,o.openElements.items[0])}function P0(o,e){o._appendCommentNode(e,o.document)}function $a(o,e){if(o.stopped=!0,e.location){let t=o.fragmentContext?0:2;for(let r=o.openElements.stackTop;r>=t;r--)o._setEndLocation(o.openElements.items[r],e);if(!o.fragmentContext&&o.openElements.stackTop>=0){let r=o.openElements.items[0],s=o.treeAdapter.getNodeSourceCodeLocation(r);if(s&&!s.endTag&&(o._setEndLocation(r,e),o.openElements.stackTop>=1)){let a=o.openElements.items[1],p=o.treeAdapter.getNodeSourceCodeLocation(a);p&&!p.endTag&&o._setEndLocation(a,e)}}}}function L0(o,e){o._setDocumentType(e);let t=e.forceQuirks?_e.QUIRKS:ju(e);Bu(e)||o._err(e,D.nonConformingDoctype),o.treeAdapter.setDocumentMode(o.document,t),o.insertionMode=I.BEFORE_HTML}function $o(o,e){o._err(e,D.missingDoctype,!0),o.treeAdapter.setDocumentMode(o.document,_e.QUIRKS),o.insertionMode=I.BEFORE_HTML,o._processToken(e)}function D0(o,e){e.tagID===l.HTML?(o._insertElement(e,_.HTML),o.insertionMode=I.BEFORE_HEAD):Ko(o,e)}function v0(o,e){let t=e.tagID;(t===l.HTML||t===l.HEAD||t===l.BODY||t===l.BR)&&Ko(o,e)}function Ko(o,e){o._insertFakeRootElement(),o.insertionMode=I.BEFORE_HEAD,o._processToken(e)}function F0(o,e){switch(e.tagID){case l.HTML:{Le(o,e);break}case l.HEAD:{o._insertElement(e,_.HTML),o.headElement=o.openElements.current,o.insertionMode=I.IN_HEAD;break}default:qo(o,e)}}function N0(o,e){let t=e.tagID;t===l.HEAD||t===l.BODY||t===l.HTML||t===l.BR?qo(o,e):o._err(e,D.endTagWithoutMatchingOpenElement)}function qo(o,e){o._insertFakeElement(M.HEAD,l.HEAD),o.headElement=o.openElements.current,o.insertionMode=I.IN_HEAD,o._processToken(e)}function it(o,e){switch(e.tagID){case l.HTML:{Le(o,e);break}case l.BASE:case l.BASEFONT:case l.BGSOUND:case l.LINK:case l.META:{o._appendElement(e,_.HTML),e.ackSelfClosing=!0;break}case l.TITLE:{o._switchToTextParsing(e,Pe.RCDATA);break}case l.NOSCRIPT:{o.options.scriptingEnabled?o._switchToTextParsing(e,Pe.RAWTEXT):(o._insertElement(e,_.HTML),o.insertionMode=I.IN_HEAD_NO_SCRIPT);break}case l.NOFRAMES:case l.STYLE:{o._switchToTextParsing(e,Pe.RAWTEXT);break}case l.SCRIPT:{o._switchToTextParsing(e,Pe.SCRIPT_DATA);break}case l.TEMPLATE:{o._insertTemplate(e),o.activeFormattingElements.insertMarker(),o.framesetOk=!1,o.insertionMode=I.IN_TEMPLATE,o.tmplInsertionModeStack.unshift(I.IN_TEMPLATE);break}case l.HEAD:{o._err(e,D.misplacedStartTagForHeadElement);break}default:Yo(o,e)}}function _0(o,e){switch(e.tagID){case l.HEAD:{o.openElements.pop(),o.insertionMode=I.AFTER_HEAD;break}case l.BODY:case l.BR:case l.HTML:{Yo(o,e);break}case l.TEMPLATE:{Wt(o,e);break}default:o._err(e,D.endTagWithoutMatchingOpenElement)}}function Wt(o,e){o.openElements.tmplCount>0?(o.openElements.generateImpliedEndTagsThoroughly(),o.openElements.currentTagId!==l.TEMPLATE&&o._err(e,D.closingOfElementWithOpenChildElements),o.openElements.popUntilTagNamePopped(l.TEMPLATE),o.activeFormattingElements.clearToLastMarker(),o.tmplInsertionModeStack.shift(),o._resetInsertionMode()):o._err(e,D.endTagWithoutMatchingOpenElement)}function Yo(o,e){o.openElements.pop(),o.insertionMode=I.AFTER_HEAD,o._processToken(e)}function B0(o,e){switch(e.tagID){case l.HTML:{Le(o,e);break}case l.BASEFONT:case l.BGSOUND:case l.HEAD:case l.LINK:case l.META:case l.NOFRAMES:case l.STYLE:{it(o,e);break}case l.NOSCRIPT:{o._err(e,D.nestedNoscriptInHead);break}default:Qo(o,e)}}function j0(o,e){switch(e.tagID){case l.NOSCRIPT:{o.openElements.pop(),o.insertionMode=I.IN_HEAD;break}case l.BR:{Qo(o,e);break}default:o._err(e,D.endTagWithoutMatchingOpenElement)}}function Qo(o,e){let t=e.type===ie.EOF?D.openElementsLeftAfterEof:D.disallowedContentInNoscriptInHead;o._err(e,t),o.openElements.pop(),o.insertionMode=I.IN_HEAD,o._processToken(e)}function V0(o,e){switch(e.tagID){case l.HTML:{Le(o,e);break}case l.BODY:{o._insertElement(e,_.HTML),o.framesetOk=!1,o.insertionMode=I.IN_BODY;break}case l.FRAMESET:{o._insertElement(e,_.HTML),o.insertionMode=I.IN_FRAMESET;break}case l.BASE:case l.BASEFONT:case l.BGSOUND:case l.LINK:case l.META:case l.NOFRAMES:case l.SCRIPT:case l.STYLE:case l.TEMPLATE:case l.TITLE:{o._err(e,D.abandonedHeadElementChild),o.openElements.push(o.headElement,l.HEAD),it(o,e),o.openElements.remove(o.headElement);break}case l.HEAD:{o._err(e,D.misplacedStartTagForHeadElement);break}default:Jo(o,e)}}function U0(o,e){switch(e.tagID){case l.BODY:case l.HTML:case l.BR:{Jo(o,e);break}case l.TEMPLATE:{Wt(o,e);break}default:o._err(e,D.endTagWithoutMatchingOpenElement)}}function Jo(o,e){o._insertFakeElement(M.BODY,l.BODY),o.insertionMode=I.IN_BODY,Rs(o,e)}function Rs(o,e){switch(e.type){case ie.CHARACTER:{Ju(o,e);break}case ie.WHITESPACE_CHARACTER:{Qu(o,e);break}case ie.COMMENT:{Ua(o,e);break}case ie.START_TAG:{Le(o,e);break}case ie.END_TAG:{ws(o,e);break}case ie.EOF:{tm(o,e);break}default:}}function Qu(o,e){o._reconstructActiveFormattingElements(),o._insertCharacters(e)}function Ju(o,e){o._reconstructActiveFormattingElements(),o._insertCharacters(e),o.framesetOk=!1}function H0(o,e){o.openElements.tmplCount===0&&o.treeAdapter.adoptAttributes(o.openElements.items[0],e.attrs)}function W0(o,e){let t=o.openElements.tryPeekProperlyNestedBodyElement();t&&o.openElements.tmplCount===0&&(o.framesetOk=!1,o.treeAdapter.adoptAttributes(t,e.attrs))}function $0(o,e){let t=o.openElements.tryPeekProperlyNestedBodyElement();o.framesetOk&&t&&(o.treeAdapter.detachNode(t),o.openElements.popAllUpToHtmlElement(),o._insertElement(e,_.HTML),o.insertionMode=I.IN_FRAMESET)}function G0(o,e){o.openElements.hasInButtonScope(l.P)&&o._closePElement(),o._insertElement(e,_.HTML)}function K0(o,e){o.openElements.hasInButtonScope(l.P)&&o._closePElement(),o.openElements.currentTagId!==void 0&&Uo.has(o.openElements.currentTagId)&&o.openElements.pop(),o._insertElement(e,_.HTML)}function q0(o,e){o.openElements.hasInButtonScope(l.P)&&o._closePElement(),o._insertElement(e,_.HTML),o.skipNextNewLine=!0,o.framesetOk=!1}function Y0(o,e){let t=o.openElements.tmplCount>0;(!o.formElement||t)&&(o.openElements.hasInButtonScope(l.P)&&o._closePElement(),o._insertElement(e,_.HTML),t||(o.formElement=o.openElements.current))}function Q0(o,e){o.framesetOk=!1;let t=e.tagID;for(let r=o.openElements.stackTop;r>=0;r--){let s=o.openElements.tagIDs[r];if(t===l.LI&&s===l.LI||(t===l.DD||t===l.DT)&&(s===l.DD||s===l.DT)){o.openElements.generateImpliedEndTagsWithExclusion(s),o.openElements.popUntilTagNamePopped(s);break}if(s!==l.ADDRESS&&s!==l.DIV&&s!==l.P&&o._isSpecialElement(o.openElements.items[r],s))break}o.openElements.hasInButtonScope(l.P)&&o._closePElement(),o._insertElement(e,_.HTML)}function J0(o,e){o.openElements.hasInButtonScope(l.P)&&o._closePElement(),o._insertElement(e,_.HTML),o.tokenizer.state=Pe.PLAINTEXT}function Z0(o,e){o.openElements.hasInScope(l.BUTTON)&&(o.openElements.generateImpliedEndTags(),o.openElements.popUntilTagNamePopped(l.BUTTON)),o._reconstructActiveFormattingElements(),o._insertElement(e,_.HTML),o.framesetOk=!1}function X0(o,e){let t=o.activeFormattingElements.getElementEntryInScopeWithTagName(M.A);t&&(Wa(o,e),o.openElements.remove(t.element),o.activeFormattingElements.removeEntry(t)),o._reconstructActiveFormattingElements(),o._insertElement(e,_.HTML),o.activeFormattingElements.pushElement(o.openElements.current,e)}function ez(o,e){o._reconstructActiveFormattingElements(),o._insertElement(e,_.HTML),o.activeFormattingElements.pushElement(o.openElements.current,e)}function tz(o,e){o._reconstructActiveFormattingElements(),o.openElements.hasInScope(l.NOBR)&&(Wa(o,e),o._reconstructActiveFormattingElements()),o._insertElement(e,_.HTML),o.activeFormattingElements.pushElement(o.openElements.current,e)}function oz(o,e){o._reconstructActiveFormattingElements(),o._insertElement(e,_.HTML),o.activeFormattingElements.insertMarker(),o.framesetOk=!1}function rz(o,e){o.treeAdapter.getDocumentMode(o.document)!==_e.QUIRKS&&o.openElements.hasInButtonScope(l.P)&&o._closePElement(),o._insertElement(e,_.HTML),o.framesetOk=!1,o.insertionMode=I.IN_TABLE}function Zu(o,e){o._reconstructActiveFormattingElements(),o._appendElement(e,_.HTML),o.framesetOk=!1,e.ackSelfClosing=!0}function Xu(o){let e=gs(o,Et.TYPE);return e!=null&&e.toLowerCase()===S0}function sz(o,e){o._reconstructActiveFormattingElements(),o._appendElement(e,_.HTML),Xu(e)||(o.framesetOk=!1),e.ackSelfClosing=!0}function nz(o,e){o._appendElement(e,_.HTML),e.ackSelfClosing=!0}function iz(o,e){o.openElements.hasInButtonScope(l.P)&&o._closePElement(),o._appendElement(e,_.HTML),o.framesetOk=!1,e.ackSelfClosing=!0}function az(o,e){e.tagName=M.IMG,e.tagID=l.IMG,Zu(o,e)}function cz(o,e){o._insertElement(e,_.HTML),o.skipNextNewLine=!0,o.tokenizer.state=Pe.RCDATA,o.originalInsertionMode=o.insertionMode,o.framesetOk=!1,o.insertionMode=I.TEXT}function pz(o,e){o.openElements.hasInButtonScope(l.P)&&o._closePElement(),o._reconstructActiveFormattingElements(),o.framesetOk=!1,o._switchToTextParsing(e,Pe.RAWTEXT)}function dz(o,e){o.framesetOk=!1,o._switchToTextParsing(e,Pe.RAWTEXT)}function Ku(o,e){o._switchToTextParsing(e,Pe.RAWTEXT)}function lz(o,e){o._reconstructActiveFormattingElements(),o._insertElement(e,_.HTML),o.framesetOk=!1,o.insertionMode=o.insertionMode===I.IN_TABLE||o.insertionMode===I.IN_CAPTION||o.insertionMode===I.IN_TABLE_BODY||o.insertionMode===I.IN_ROW||o.insertionMode===I.IN_CELL?I.IN_SELECT_IN_TABLE:I.IN_SELECT}function uz(o,e){o.openElements.currentTagId===l.OPTION&&o.openElements.pop(),o._reconstructActiveFormattingElements(),o._insertElement(e,_.HTML)}function mz(o,e){o.openElements.hasInScope(l.RUBY)&&o.openElements.generateImpliedEndTags(),o._insertElement(e,_.HTML)}function hz(o,e){o.openElements.hasInScope(l.RUBY)&&o.openElements.generateImpliedEndTagsWithExclusion(l.RTC),o._insertElement(e,_.HTML)}function fz(o,e){o._reconstructActiveFormattingElements(),Ba(e),Ts(e),e.selfClosing?o._appendElement(e,_.MATHML):o._insertElement(e,_.MATHML),e.ackSelfClosing=!0}function xz(o,e){o._reconstructActiveFormattingElements(),ja(e),Ts(e),e.selfClosing?o._appendElement(e,_.SVG):o._insertElement(e,_.SVG),e.ackSelfClosing=!0}function qu(o,e){o._reconstructActiveFormattingElements(),o._insertElement(e,_.HTML)}function Le(o,e){switch(e.tagID){case l.I:case l.S:case l.B:case l.U:case l.EM:case l.TT:case l.BIG:case l.CODE:case l.FONT:case l.SMALL:case l.STRIKE:case l.STRONG:{ez(o,e);break}case l.A:{X0(o,e);break}case l.H1:case l.H2:case l.H3:case l.H4:case l.H5:case l.H6:{K0(o,e);break}case l.P:case l.DL:case l.OL:case l.UL:case l.DIV:case l.DIR:case l.NAV:case l.MAIN:case l.MENU:case l.ASIDE:case l.CENTER:case l.FIGURE:case l.FOOTER:case l.HEADER:case l.HGROUP:case l.DIALOG:case l.DETAILS:case l.ADDRESS:case l.ARTICLE:case l.SEARCH:case l.SECTION:case l.SUMMARY:case l.FIELDSET:case l.BLOCKQUOTE:case l.FIGCAPTION:{G0(o,e);break}case l.LI:case l.DD:case l.DT:{Q0(o,e);break}case l.BR:case l.IMG:case l.WBR:case l.AREA:case l.EMBED:case l.KEYGEN:{Zu(o,e);break}case l.HR:{iz(o,e);break}case l.RB:case l.RTC:{mz(o,e);break}case l.RT:case l.RP:{hz(o,e);break}case l.PRE:case l.LISTING:{q0(o,e);break}case l.XMP:{pz(o,e);break}case l.SVG:{xz(o,e);break}case l.HTML:{H0(o,e);break}case l.BASE:case l.LINK:case l.META:case l.STYLE:case l.TITLE:case l.SCRIPT:case l.BGSOUND:case l.BASEFONT:case l.TEMPLATE:{it(o,e);break}case l.BODY:{W0(o,e);break}case l.FORM:{Y0(o,e);break}case l.NOBR:{tz(o,e);break}case l.MATH:{fz(o,e);break}case l.TABLE:{rz(o,e);break}case l.INPUT:{sz(o,e);break}case l.PARAM:case l.TRACK:case l.SOURCE:{nz(o,e);break}case l.IMAGE:{az(o,e);break}case l.BUTTON:{Z0(o,e);break}case l.APPLET:case l.OBJECT:case l.MARQUEE:{oz(o,e);break}case l.IFRAME:{dz(o,e);break}case l.SELECT:{lz(o,e);break}case l.OPTION:case l.OPTGROUP:{uz(o,e);break}case l.NOEMBED:case l.NOFRAMES:{Ku(o,e);break}case l.FRAMESET:{$0(o,e);break}case l.TEXTAREA:{cz(o,e);break}case l.NOSCRIPT:{o.options.scriptingEnabled?Ku(o,e):qu(o,e);break}case l.PLAINTEXT:{J0(o,e);break}case l.COL:case l.TH:case l.TD:case l.TR:case l.HEAD:case l.FRAME:case l.TBODY:case l.TFOOT:case l.THEAD:case l.CAPTION:case l.COLGROUP:break;default:qu(o,e)}}function gz(o,e){if(o.openElements.hasInScope(l.BODY)&&(o.insertionMode=I.AFTER_BODY,o.options.sourceCodeLocationInfo)){let t=o.openElements.tryPeekProperlyNestedBodyElement();t&&o._setEndLocation(t,e)}}function bz(o,e){o.openElements.hasInScope(l.BODY)&&(o.insertionMode=I.AFTER_BODY,pm(o,e))}function yz(o,e){let t=e.tagID;o.openElements.hasInScope(t)&&(o.openElements.generateImpliedEndTags(),o.openElements.popUntilTagNamePopped(t))}function Az(o){let e=o.openElements.tmplCount>0,{formElement:t}=o;e||(o.formElement=null),(t||e)&&o.openElements.hasInScope(l.FORM)&&(o.openElements.generateImpliedEndTags(),e?o.openElements.popUntilTagNamePopped(l.FORM):t&&o.openElements.remove(t))}function Sz(o){o.openElements.hasInButtonScope(l.P)||o._insertFakeElement(M.P,l.P),o._closePElement()}function zz(o){o.openElements.hasInListItemScope(l.LI)&&(o.openElements.generateImpliedEndTagsWithExclusion(l.LI),o.openElements.popUntilTagNamePopped(l.LI))}function Tz(o,e){let t=e.tagID;o.openElements.hasInScope(t)&&(o.openElements.generateImpliedEndTagsWithExclusion(t),o.openElements.popUntilTagNamePopped(t))}function Ez(o){o.openElements.hasNumberedHeaderInScope()&&(o.openElements.generateImpliedEndTags(),o.openElements.popUntilNumberedHeaderPopped())}function Cz(o,e){let t=e.tagID;o.openElements.hasInScope(t)&&(o.openElements.generateImpliedEndTags(),o.openElements.popUntilTagNamePopped(t),o.activeFormattingElements.clearToLastMarker())}function Iz(o){o._reconstructActiveFormattingElements(),o._insertFakeElement(M.BR,l.BR),o.openElements.pop(),o.framesetOk=!1}function em(o,e){let t=e.tagName,r=e.tagID;for(let s=o.openElements.stackTop;s>0;s--){let a=o.openElements.items[s],p=o.openElements.tagIDs[s];if(r===p&&(r!==l.UNKNOWN||o.treeAdapter.getTagName(a)===t)){o.openElements.generateImpliedEndTagsWithExclusion(r),o.openElements.stackTop>=s&&o.openElements.shortenToLength(s);break}if(o._isSpecialElement(a,p))break}}function ws(o,e){switch(e.tagID){case l.A:case l.B:case l.I:case l.S:case l.U:case l.EM:case l.TT:case l.BIG:case l.CODE:case l.FONT:case l.NOBR:case l.SMALL:case l.STRIKE:case l.STRONG:{Wa(o,e);break}case l.P:{Sz(o);break}case l.DL:case l.UL:case l.OL:case l.DIR:case l.DIV:case l.NAV:case l.PRE:case l.MAIN:case l.MENU:case l.ASIDE:case l.BUTTON:case l.CENTER:case l.FIGURE:case l.FOOTER:case l.HEADER:case l.HGROUP:case l.DIALOG:case l.ADDRESS:case l.ARTICLE:case l.DETAILS:case l.SEARCH:case l.SECTION:case l.SUMMARY:case l.LISTING:case l.FIELDSET:case l.BLOCKQUOTE:case l.FIGCAPTION:{yz(o,e);break}case l.LI:{zz(o);break}case l.DD:case l.DT:{Tz(o,e);break}case l.H1:case l.H2:case l.H3:case l.H4:case l.H5:case l.H6:{Ez(o);break}case l.BR:{Iz(o);break}case l.BODY:{gz(o,e);break}case l.HTML:{bz(o,e);break}case l.FORM:{Az(o);break}case l.APPLET:case l.OBJECT:case l.MARQUEE:{Cz(o,e);break}case l.TEMPLATE:{Wt(o,e);break}default:em(o,e)}}function tm(o,e){o.tmplInsertionModeStack.length>0?cm(o,e):$a(o,e)}function Rz(o,e){var t;e.tagID===l.SCRIPT&&((t=o.scriptHandler)===null||t===void 0||t.call(o,o.openElements.current)),o.openElements.pop(),o.insertionMode=o.originalInsertionMode}function wz(o,e){o._err(e,D.eofInElementThatCanContainOnlyText),o.openElements.pop(),o.insertionMode=o.originalInsertionMode,o.onEof(e)}function Va(o,e){if(o.openElements.currentTagId!==void 0&&Yu.has(o.openElements.currentTagId))switch(o.pendingCharacterTokens.length=0,o.hasNonWhitespacePendingCharacterToken=!1,o.originalInsertionMode=o.insertionMode,o.insertionMode=I.IN_TABLE_TEXT,e.type){case ie.CHARACTER:{rm(o,e);break}case ie.WHITESPACE_CHARACTER:{om(o,e);break}}else er(o,e)}function Oz(o,e){o.openElements.clearBackToTableContext(),o.activeFormattingElements.insertMarker(),o._insertElement(e,_.HTML),o.insertionMode=I.IN_CAPTION}function Mz(o,e){o.openElements.clearBackToTableContext(),o._insertElement(e,_.HTML),o.insertionMode=I.IN_COLUMN_GROUP}function kz(o,e){o.openElements.clearBackToTableContext(),o._insertFakeElement(M.COLGROUP,l.COLGROUP),o.insertionMode=I.IN_COLUMN_GROUP,Ga(o,e)}function Pz(o,e){o.openElements.clearBackToTableContext(),o._insertElement(e,_.HTML),o.insertionMode=I.IN_TABLE_BODY}function Lz(o,e){o.openElements.clearBackToTableContext(),o._insertFakeElement(M.TBODY,l.TBODY),o.insertionMode=I.IN_TABLE_BODY,Os(o,e)}function Dz(o,e){o.openElements.hasInTableScope(l.TABLE)&&(o.openElements.popUntilTagNamePopped(l.TABLE),o._resetInsertionMode(),o._processStartTag(e))}function vz(o,e){Xu(e)?o._appendElement(e,_.HTML):er(o,e),e.ackSelfClosing=!0}function Fz(o,e){!o.formElement&&o.openElements.tmplCount===0&&(o._insertElement(e,_.HTML),o.formElement=o.openElements.current,o.openElements.pop())}function lo(o,e){switch(e.tagID){case l.TD:case l.TH:case l.TR:{Lz(o,e);break}case l.STYLE:case l.SCRIPT:case l.TEMPLATE:{it(o,e);break}case l.COL:{kz(o,e);break}case l.FORM:{Fz(o,e);break}case l.TABLE:{Dz(o,e);break}case l.TBODY:case l.TFOOT:case l.THEAD:{Pz(o,e);break}case l.INPUT:{vz(o,e);break}case l.CAPTION:{Oz(o,e);break}case l.COLGROUP:{Mz(o,e);break}default:er(o,e)}}function Xo(o,e){switch(e.tagID){case l.TABLE:{o.openElements.hasInTableScope(l.TABLE)&&(o.openElements.popUntilTagNamePopped(l.TABLE),o._resetInsertionMode());break}case l.TEMPLATE:{Wt(o,e);break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:case l.TBODY:case l.TD:case l.TFOOT:case l.TH:case l.THEAD:case l.TR:break;default:er(o,e)}}function er(o,e){let t=o.fosterParentingEnabled;o.fosterParentingEnabled=!0,Rs(o,e),o.fosterParentingEnabled=t}function om(o,e){o.pendingCharacterTokens.push(e)}function rm(o,e){o.pendingCharacterTokens.push(e),o.hasNonWhitespacePendingCharacterToken=!0}function Go(o,e){let t=0;if(o.hasNonWhitespacePendingCharacterToken)for(;t<o.pendingCharacterTokens.length;t++)er(o,o.pendingCharacterTokens[t]);else for(;t<o.pendingCharacterTokens.length;t++)o._insertCharacters(o.pendingCharacterTokens[t]);o.insertionMode=o.originalInsertionMode,o._processToken(e)}var sm=new Set([l.CAPTION,l.COL,l.COLGROUP,l.TBODY,l.TD,l.TFOOT,l.TH,l.THEAD,l.TR]);function Nz(o,e){let t=e.tagID;sm.has(t)?o.openElements.hasInTableScope(l.CAPTION)&&(o.openElements.generateImpliedEndTags(),o.openElements.popUntilTagNamePopped(l.CAPTION),o.activeFormattingElements.clearToLastMarker(),o.insertionMode=I.IN_TABLE,lo(o,e)):Le(o,e)}function _z(o,e){let t=e.tagID;switch(t){case l.CAPTION:case l.TABLE:{o.openElements.hasInTableScope(l.CAPTION)&&(o.openElements.generateImpliedEndTags(),o.openElements.popUntilTagNamePopped(l.CAPTION),o.activeFormattingElements.clearToLastMarker(),o.insertionMode=I.IN_TABLE,t===l.TABLE&&Xo(o,e));break}case l.BODY:case l.COL:case l.COLGROUP:case l.HTML:case l.TBODY:case l.TD:case l.TFOOT:case l.TH:case l.THEAD:case l.TR:break;default:ws(o,e)}}function Ga(o,e){switch(e.tagID){case l.HTML:{Le(o,e);break}case l.COL:{o._appendElement(e,_.HTML),e.ackSelfClosing=!0;break}case l.TEMPLATE:{it(o,e);break}default:Cs(o,e)}}function Bz(o,e){switch(e.tagID){case l.COLGROUP:{o.openElements.currentTagId===l.COLGROUP&&(o.openElements.pop(),o.insertionMode=I.IN_TABLE);break}case l.TEMPLATE:{Wt(o,e);break}case l.COL:break;default:Cs(o,e)}}function Cs(o,e){o.openElements.currentTagId===l.COLGROUP&&(o.openElements.pop(),o.insertionMode=I.IN_TABLE,o._processToken(e))}function Os(o,e){switch(e.tagID){case l.TR:{o.openElements.clearBackToTableBodyContext(),o._insertElement(e,_.HTML),o.insertionMode=I.IN_ROW;break}case l.TH:case l.TD:{o.openElements.clearBackToTableBodyContext(),o._insertFakeElement(M.TR,l.TR),o.insertionMode=I.IN_ROW,Ms(o,e);break}case l.CAPTION:case l.COL:case l.COLGROUP:case l.TBODY:case l.TFOOT:case l.THEAD:{o.openElements.hasTableBodyContextInTableScope()&&(o.openElements.clearBackToTableBodyContext(),o.openElements.pop(),o.insertionMode=I.IN_TABLE,lo(o,e));break}default:lo(o,e)}}function Ha(o,e){let t=e.tagID;switch(e.tagID){case l.TBODY:case l.TFOOT:case l.THEAD:{o.openElements.hasInTableScope(t)&&(o.openElements.clearBackToTableBodyContext(),o.openElements.pop(),o.insertionMode=I.IN_TABLE);break}case l.TABLE:{o.openElements.hasTableBodyContextInTableScope()&&(o.openElements.clearBackToTableBodyContext(),o.openElements.pop(),o.insertionMode=I.IN_TABLE,Xo(o,e));break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:case l.TD:case l.TH:case l.TR:break;default:Xo(o,e)}}function Ms(o,e){switch(e.tagID){case l.TH:case l.TD:{o.openElements.clearBackToTableRowContext(),o._insertElement(e,_.HTML),o.insertionMode=I.IN_CELL,o.activeFormattingElements.insertMarker();break}case l.CAPTION:case l.COL:case l.COLGROUP:case l.TBODY:case l.TFOOT:case l.THEAD:case l.TR:{o.openElements.hasInTableScope(l.TR)&&(o.openElements.clearBackToTableRowContext(),o.openElements.pop(),o.insertionMode=I.IN_TABLE_BODY,Os(o,e));break}default:lo(o,e)}}function nm(o,e){switch(e.tagID){case l.TR:{o.openElements.hasInTableScope(l.TR)&&(o.openElements.clearBackToTableRowContext(),o.openElements.pop(),o.insertionMode=I.IN_TABLE_BODY);break}case l.TABLE:{o.openElements.hasInTableScope(l.TR)&&(o.openElements.clearBackToTableRowContext(),o.openElements.pop(),o.insertionMode=I.IN_TABLE_BODY,Ha(o,e));break}case l.TBODY:case l.TFOOT:case l.THEAD:{(o.openElements.hasInTableScope(e.tagID)||o.openElements.hasInTableScope(l.TR))&&(o.openElements.clearBackToTableRowContext(),o.openElements.pop(),o.insertionMode=I.IN_TABLE_BODY,Ha(o,e));break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:case l.TD:case l.TH:break;default:Xo(o,e)}}function jz(o,e){let t=e.tagID;sm.has(t)?(o.openElements.hasInTableScope(l.TD)||o.openElements.hasInTableScope(l.TH))&&(o._closeTableCell(),Ms(o,e)):Le(o,e)}function Vz(o,e){let t=e.tagID;switch(t){case l.TD:case l.TH:{o.openElements.hasInTableScope(t)&&(o.openElements.generateImpliedEndTags(),o.openElements.popUntilTagNamePopped(t),o.activeFormattingElements.clearToLastMarker(),o.insertionMode=I.IN_ROW);break}case l.TABLE:case l.TBODY:case l.TFOOT:case l.THEAD:case l.TR:{o.openElements.hasInTableScope(t)&&(o._closeTableCell(),nm(o,e));break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:break;default:ws(o,e)}}function im(o,e){switch(e.tagID){case l.HTML:{Le(o,e);break}case l.OPTION:{o.openElements.currentTagId===l.OPTION&&o.openElements.pop(),o._insertElement(e,_.HTML);break}case l.OPTGROUP:{o.openElements.currentTagId===l.OPTION&&o.openElements.pop(),o.openElements.currentTagId===l.OPTGROUP&&o.openElements.pop(),o._insertElement(e,_.HTML);break}case l.HR:{o.openElements.currentTagId===l.OPTION&&o.openElements.pop(),o.openElements.currentTagId===l.OPTGROUP&&o.openElements.pop(),o._appendElement(e,_.HTML),e.ackSelfClosing=!0;break}case l.INPUT:case l.KEYGEN:case l.TEXTAREA:case l.SELECT:{o.openElements.hasInSelectScope(l.SELECT)&&(o.openElements.popUntilTagNamePopped(l.SELECT),o._resetInsertionMode(),e.tagID!==l.SELECT&&o._processStartTag(e));break}case l.SCRIPT:case l.TEMPLATE:{it(o,e);break}default:}}function am(o,e){switch(e.tagID){case l.OPTGROUP:{o.openElements.stackTop>0&&o.openElements.currentTagId===l.OPTION&&o.openElements.tagIDs[o.openElements.stackTop-1]===l.OPTGROUP&&o.openElements.pop(),o.openElements.currentTagId===l.OPTGROUP&&o.openElements.pop();break}case l.OPTION:{o.openElements.currentTagId===l.OPTION&&o.openElements.pop();break}case l.SELECT:{o.openElements.hasInSelectScope(l.SELECT)&&(o.openElements.popUntilTagNamePopped(l.SELECT),o._resetInsertionMode());break}case l.TEMPLATE:{Wt(o,e);break}default:}}function Uz(o,e){let t=e.tagID;t===l.CAPTION||t===l.TABLE||t===l.TBODY||t===l.TFOOT||t===l.THEAD||t===l.TR||t===l.TD||t===l.TH?(o.openElements.popUntilTagNamePopped(l.SELECT),o._resetInsertionMode(),o._processStartTag(e)):im(o,e)}function Hz(o,e){let t=e.tagID;t===l.CAPTION||t===l.TABLE||t===l.TBODY||t===l.TFOOT||t===l.THEAD||t===l.TR||t===l.TD||t===l.TH?o.openElements.hasInTableScope(t)&&(o.openElements.popUntilTagNamePopped(l.SELECT),o._resetInsertionMode(),o.onEndTag(e)):am(o,e)}function Wz(o,e){switch(e.tagID){case l.BASE:case l.BASEFONT:case l.BGSOUND:case l.LINK:case l.META:case l.NOFRAMES:case l.SCRIPT:case l.STYLE:case l.TEMPLATE:case l.TITLE:{it(o,e);break}case l.CAPTION:case l.COLGROUP:case l.TBODY:case l.TFOOT:case l.THEAD:{o.tmplInsertionModeStack[0]=I.IN_TABLE,o.insertionMode=I.IN_TABLE,lo(o,e);break}case l.COL:{o.tmplInsertionModeStack[0]=I.IN_COLUMN_GROUP,o.insertionMode=I.IN_COLUMN_GROUP,Ga(o,e);break}case l.TR:{o.tmplInsertionModeStack[0]=I.IN_TABLE_BODY,o.insertionMode=I.IN_TABLE_BODY,Os(o,e);break}case l.TD:case l.TH:{o.tmplInsertionModeStack[0]=I.IN_ROW,o.insertionMode=I.IN_ROW,Ms(o,e);break}default:o.tmplInsertionModeStack[0]=I.IN_BODY,o.insertionMode=I.IN_BODY,Le(o,e)}}function $z(o,e){e.tagID===l.TEMPLATE&&Wt(o,e)}function cm(o,e){o.openElements.tmplCount>0?(o.openElements.popUntilTagNamePopped(l.TEMPLATE),o.activeFormattingElements.clearToLastMarker(),o.tmplInsertionModeStack.shift(),o._resetInsertionMode(),o.onEof(e)):$a(o,e)}function Gz(o,e){e.tagID===l.HTML?Le(o,e):Is(o,e)}function pm(o,e){var t;if(e.tagID===l.HTML){if(o.fragmentContext||(o.insertionMode=I.AFTER_AFTER_BODY),o.options.sourceCodeLocationInfo&&o.openElements.tagIDs[0]===l.HTML){o._setEndLocation(o.openElements.items[0],e);let r=o.openElements.items[1];r&&!(!((t=o.treeAdapter.getNodeSourceCodeLocation(r))===null||t===void 0)&&t.endTag)&&o._setEndLocation(r,e)}}else Is(o,e)}function Is(o,e){o.insertionMode=I.IN_BODY,Rs(o,e)}function Kz(o,e){switch(e.tagID){case l.HTML:{Le(o,e);break}case l.FRAMESET:{o._insertElement(e,_.HTML);break}case l.FRAME:{o._appendElement(e,_.HTML),e.ackSelfClosing=!0;break}case l.NOFRAMES:{it(o,e);break}default:}}function qz(o,e){e.tagID===l.FRAMESET&&!o.openElements.isRootHtmlElementCurrent()&&(o.openElements.pop(),!o.fragmentContext&&o.openElements.currentTagId!==l.FRAMESET&&(o.insertionMode=I.AFTER_FRAMESET))}function Yz(o,e){switch(e.tagID){case l.HTML:{Le(o,e);break}case l.NOFRAMES:{it(o,e);break}default:}}function Qz(o,e){e.tagID===l.HTML&&(o.insertionMode=I.AFTER_AFTER_FRAMESET)}function Jz(o,e){e.tagID===l.HTML?Le(o,e):Es(o,e)}function Es(o,e){o.insertionMode=I.IN_BODY,Rs(o,e)}function Zz(o,e){switch(e.tagID){case l.HTML:{Le(o,e);break}case l.NOFRAMES:{it(o,e);break}default:}}function Xz(o,e){e.chars=he,o._insertCharacters(e)}function eT(o,e){o._insertCharacters(e),o.framesetOk=!1}function dm(o){for(;o.treeAdapter.getNamespaceURI(o.openElements.current)!==_.HTML&&o.openElements.currentTagId!==void 0&&!o._isIntegrationPoint(o.openElements.currentTagId,o.openElements.current);)o.openElements.pop()}function tT(o,e){if(Uu(e))dm(o),o._startTagOutsideForeignContent(e);else{let t=o._getAdjustedCurrentElement(),r=o.treeAdapter.getNamespaceURI(t);r===_.MATHML?Ba(e):r===_.SVG&&(Hu(e),ja(e)),Ts(e),e.selfClosing?o._appendElement(e,r):o._insertElement(e,r),e.ackSelfClosing=!0}}function oT(o,e){if(e.tagID===l.P||e.tagID===l.BR){dm(o),o._endTagOutsideForeignContent(e);return}for(let t=o.openElements.stackTop;t>0;t--){let r=o.openElements.items[t];if(o.treeAdapter.getNamespaceURI(r)===_.HTML){o._endTagOutsideForeignContent(e);break}let s=o.treeAdapter.getTagName(r);if(s.toLowerCase()===e.tagName){e.tagName=s,o.openElements.shortenToLength(t);break}}}var Hxe=new Set([M.AREA,M.BASE,M.BASEFONT,M.BGSOUND,M.BR,M.COL,M.EMBED,M.FRAME,M.HR,M.IMG,M.INPUT,M.KEYGEN,M.LINK,M.META,M.PARAM,M.SOURCE,M.TRACK,M.WBR]);function lm(o,e,t){typeof o=="string"&&(t=e,e=o,o=null);let r=Zo.getFragmentParser(o,t);return r.tokenizer.write(e,!0),r.getFragment()}function Ka(o){return o.trim().startsWith("#")}function sT(o){return[...o.matchAll(/url\(\s*(['"]?)(.*?)\1\s*\)/gi)].map(e=>e[2]??"")}function nT(o){return sT(o).some(e=>!Ka(e))}var iT=["abbr","address","article","aside","b","bdi","bdo","blockquote","br","button","caption","cite","code","col","colgroup","data","dd","del","dfn","div","dl","dt","em","figcaption","figure","footer","h1","h2","h3","h4","h5","h6","header","hgroup","hr","i","ins","kbd","label","li","main","mark","meter","nav","ol","p","pre","progress","q","rp","rt","ruby","s","samp","section","small","span","strong","style","sub","sup","table","tbody","td","tfoot","th","thead","time","tr","u","ul","var","wbr"],aT=["svg","g","defs","symbol","use","title","desc","path","rect","circle","ellipse","line","polyline","polygon","text","tspan","textpath","lineargradient","radialgradient","stop","clippath","mask","pattern","marker","filter","feblend","fecolormatrix","fecomponenttransfer","fecomposite","feconvolvematrix","fediffuselighting","fedisplacementmap","fedistantlight","fedropshadow","feflood","fefunca","fefuncb","fefuncg","fefuncr","fegaussianblur","femerge","femergenode","femorphology","feoffset","fepointlight","fespecularlighting","fespotlight","fetile","feturbulence"],cT=new Set([...iT,...aT]),pT=new Set(["action","data","formaction","href","poster","src","srcset"]),dT=new Set(["clip-path","cursor","fill","filter","marker","marker-end","marker-mid","marker-start","mask","stroke"]);function um(o,e){let t;try{t=mu(o,{context:e})}catch(s){return`contains invalid CSS: ${String(s)}`}let r=null;return Au(t,s=>{r||(s.type==="Url"&&!Ka(s.value)?r="contains a CSS url() asset reference":s.type==="Atrule"&&["import","font-face"].includes(s.name.toLowerCase())&&(r=`contains a forbidden CSS @${s.name} rule`))}),r}function mm(o){if(o.nodeName==="#comment"||o.nodeName==="#text")return null;if("tagName"in o){let e=o.tagName.toLowerCase();if(!cT.has(e))return`contains <${o.tagName}>, which a card may not use`;for(let t of o.attrs){let r=t.name.toLowerCase();if(r.startsWith("on"))return`contains the event handler '${t.name}'`;if(pT.has(r)&&!Ka(t.value))return`contains a ${t.name} reference outside the card`;if(r==="style"){let s=um(t.value,"declarationList");if(s)return s}if(dT.has(r)&&nT(t.value))return`contains a ${t.name} url() reference outside the card`}if(e==="style"){let t=o.childNodes.filter(s=>s.nodeName==="#text").map(s=>s.value).join(""),r=um(t,"stylesheet");if(r)return r}}if("childNodes"in o)for(let e of o.childNodes){let t=mm(e);if(t)return t}return null}function lT(o){for(let e of lm(o).childNodes){let t=mm(e);if(t)return t}return null}var ks=d.string().min(1).superRefine((o,e)=>{let t=lT(o);t&&e.addIssue({code:"custom",message:`Card HTML ${t}.`})});var Ya=d.object({aspectRatio:d.enum(["16:9","9:16","1:1","4:5"]),fps:d.union([d.literal(24),d.literal(25),d.literal(30),d.literal(60)]).optional(),resolution:d.enum(["hd","fhd","4k"]).optional(),platform:d.string().optional()}),ym=d.object({start:d.number().nonnegative(),end:d.number().nonnegative()}),uT=d.object({start:d.number().nonnegative(),end:d.number().nonnegative(),reason:d.string().optional()}),mT=d.object({kind:d.literal("media"),mediaId:Ue,trim:ym.optional(),excludedRanges:d.array(uT).optional(),volume:d.number().min(0).max(4).optional(),muted:d.boolean().optional(),playbackRate:d.number().positive().optional(),sync:d.enum(["video","independent"]).optional(),kenBurns:d.enum(["in","out","pan-l","pan-r","none"]).optional(),volumeDb:d.number().optional(),fadeInMs:d.number().nonnegative().optional(),fadeOutMs:d.number().nonnegative().optional(),loop:d.boolean().optional(),audioRole:d.enum(["sfx","music","vo","ambience"]).optional(),duck:d.object({duckDb:d.number().max(0),attackMs:d.number().nonnegative(),releaseMs:d.number().nonnegative(),windows:d.array(d.object({startMs:d.number(),endMs:d.number()})).optional()}).optional(),anchor:d.object({clipId:d.string().min(1),offsetMs:d.number()}).optional(),reframe:Sn.optional()}),hT=d.object({kind:d.literal("component"),componentId:d.string().min(1),props:d.record(d.string(),d.unknown()),assets:d.record(d.string().min(1),d.string().min(1)).optional().describe("Manifest asset slot \u2192 project media id. At mount each slot arrives as `assets[slot].handle`, a fetchable URL for <Img>/<Video>/<Audio>; `props` becomes `params` and never carries an asset URL."),zPlane:d.enum(["front","behind-subject"]).optional()}),fT=d.object({kind:d.literal("overlay"),primitiveId:d.string().min(1),params:d.record(d.string(),d.unknown()),zPlane:d.enum(["front","behind-subject"]).optional(),anchor:d.object({space:d.literal("scene"),x:d.number().min(0).max(1),y:d.number().min(0).max(1)}).optional(),parallax:d.number().min(-.3).max(.3).optional()}),xT=d.object({kind:d.literal("effect"),primitiveId:d.string().min(1),params:d.record(d.string(),d.unknown()).optional()}),gT=d.object({kind:d.literal("card"),html:ks,tokens:d.record(d.string(),d.string()).optional(),zPlane:d.literal("front").optional()}),bT=d.object({kind:d.literal("composition"),compositionId:d.string().min(1),trim:ym.optional()}).strict(),yT=d.discriminatedUnion("kind",[mT,hT,fT,xT,gT,bT]),AT=d.object({type:d.string().min(1),duration:d.number().positive()}),Am=-1,Sm=2,hm=o=>`position.${o} is a FRACTION of the frame (0.5 = centre, 0 to 1 inside it, ${Am} to ${Sm} with entrance/exit overshoot) \u2014 px values are not accepted`,Ps=o=>d.number().min(Am,hm(o)).max(Sm,hm(o)),ST=d.object({x:Ps("x"),y:Ps("y")}).describe("Clip CENTRE as a fraction of the frame: {x:0.5,y:0.5} is dead centre, 0 to 1 is inside the frame, and a little overshoot (down to -1, up to 2) is how an entrance starts off-canvas. NOT pixels: the renderer maps x to `left: x*100%`, so `x: 180` sits 180 frame-widths away and draws nothing."),Ls=d.object({x:d.number().min(0).max(1),y:d.number().min(0).max(1),w:d.number().positive().max(1),h:d.number().positive().max(1)}),zm=Ls.refine(o=>o.x+o.w<=1&&o.y+o.h<=1,"captions style.region must fit within the normalized frame"),zT=d.enum(["cover","contain"]),TT=d.enum(["visible","hidden"]),ET=d.object({primitiveId:d.string().min(1),params:d.record(d.string(),d.unknown()).optional()}),CT=d.union([d.enum(["linear","ease","easeIn","easeOut","easeInOut"]),d.object({cubicBezier:d.tuple([d.number(),d.number(),d.number(),d.number()])}).strict()]),IT=d.object({time:d.number().nonnegative(),value:d.number(),easing:CT.optional()}).strict(),RT=d.array(IT).min(2),fm=["opacity","scale","rotation","position.x","position.y","volume"],wT={opacity:d.number().min(0,"opacity is 0 to 1").max(1,"opacity is 0 to 1"),scale:d.number().positive("scale is a multiplier and must be > 0"),rotation:d.number(),"position.x":Ps("x"),"position.y":Ps("y"),volume:d.number().min(0,"volume is 0 to 4").max(4,"volume is 0 to 4")},OT=d.object({id:d.string().min(1),startTime:d.number().nonnegative(),duration:d.number().positive(),source:yT,kind:d.enum(["video","audio","image","overlay","effect"]).optional(),opacity:d.number().min(0).max(1).optional(),scale:d.number().positive().optional(),rotation:d.number().optional(),position:ST.optional(),region:Ls.optional(),fit:zT.optional(),captionVisibility:TT.optional().describe("Video media clip only. Hide native captions while this clip is topmost and covers the lower picture, or when an opaque, effect-free clip has an explicitly full-frame region, even with fit:contain. Caption words and timings remain stored and resume when another visible clip takes over."),effects:d.array(ET).optional(),transitionIn:AT.optional(),linkGroupId:d.string().min(1).optional(),animate:d.record(d.string(),RT).superRefine((o,e)=>{for(let[t,r]of Object.entries(o)){if(!fm.includes(t)){e.addIssue({code:d.ZodIssueCode.custom,path:[t],message:`"${t}" is not an animatable param (${fm.join(", ")})`});continue}let s=wT[t];r.forEach((a,p)=>{let u=s.safeParse(a.value);u.success||e.addIssue({code:d.ZodIssueCode.custom,path:[t,p,"value"],message:u.error.issues[0]?.message??`invalid ${t} keyframe value`})})}}).describe("Keyframe channels, clip-relative seconds. Each channel's values use the SAME unit as the scalar it animates: `opacity` 0 to 1, `scale` a multiplier (>0), `rotation` degrees, `position.x`/`position.y` a FRACTION of the frame like `position` (0.5 = centre; NOT pixels), `volume` 0 to 4.").optional()}).strict(),MT=d.object({id:d.string().min(1),startTime:d.number().nonnegative(),duration:d.number().positive()}).strict(),kT=d.unknown().transform((o,e)=>{let r=(!!o&&typeof o=="object"&&"source"in o?OT:MT).safeParse(o);return r.success?r.data:(e.issues.push(...r.error.issues),d.NEVER)}),PT=d.object({id:d.string().min(1),kind:d.enum(["video","audio","image","overlay","effect"]),name:d.string().optional(),enabled:d.boolean().optional(),volume:d.number().min(0).max(4).optional(),contents:d.array(kT)}).strict(),LT=d.object({id:d.string().min(1),startTime:d.number().nonnegative(),endTime:d.number().nonnegative().optional(),kind:d.string().min(1),name:d.string().optional(),metadata:d.record(d.string(),d.unknown()).optional()}).strict(),DT=d.object({public:d.boolean().optional(),readerOrgIds:d.array(d.string()).optional(),writerOrgIds:d.array(d.string()).optional()}),vT=d.object({type:d.string().min(1),source:d.string().optional(),notes:d.string().optional()}),FT=d.object({audioDescriptionTrackId:d.string().optional(),captionsTrackId:d.string().optional(),signLanguageTrackId:d.string().optional(),notes:d.string().optional()}),NT=d.object({text:d.string().min(1),startMs:d.number().nonnegative().describe("Word start on the composition timeline, in milliseconds."),endMs:d.number().nonnegative().describe("Word end on the composition timeline, in milliseconds."),emphasis:d.boolean().optional(),annotate:d.enum(["circle","underline"]).optional()}),qa=d.object({fontFamily:d.string().min(1).optional(),fontSize:d.number().min(1,"captions style.fontSize is PERCENT of composition height (1-15, default 5) \u2014 px values are not accepted").max(15,"captions style.fontSize is PERCENT of composition height (1-15, default 5) \u2014 px values are not accepted").optional().describe("Font size as % of composition height (1-15, default 5). NOT px."),fontWeight:d.number().int().min(100).max(900).optional(),color:d.string().min(1).optional(),highlightColor:d.string().min(1).optional(),backgroundColor:d.string().optional(),plate:d.enum(["glass","solid","none"]).optional(),position:d.enum(["top","center","bottom"]).optional(),region:zm.optional().describe("Optional caption layout box {x,y,w,h} in normalized output-frame coordinates. Overrides position; text starts at its top edge and wraps/pages within its width and height."),textTransform:d.enum(["none","uppercase","capitalize"]).optional(),letterSpacing:d.number().min(-5).max(20).optional().describe("Base caption glyph spacing in pixels."),wordGapEm:d.number().min(0).max(2).optional().describe("Gap between caption runs as a multiple of base font size; default 0.35."),lineGapEm:d.number().min(0).max(2).optional().describe("Gap between caption lines as a multiple of base font size; default 0.25."),emphasisColor:d.string().optional(),emphasisGradient:d.string().optional(),emphasisScale:d.number().positive().optional(),emphasisFontFamily:d.string().optional(),emphasisFontWeight:d.number().int().min(100).max(900).optional(),emphasisTextTransform:d.enum(["none","uppercase","capitalize"]).optional(),emphasisLetterSpacing:d.number().optional(),emphasisFontStyle:d.enum(["normal","italic"]).optional(),entrance:d.enum(["none","fade","word-pop","stagger-up"]).optional(),entranceMs:d.number().nonnegative().optional(),entranceStaggerMs:d.number().nonnegative().optional(),exitMs:d.number().nonnegative().optional(),emphasisPlate:d.boolean().optional(),emphasisPlateColor:d.string().optional(),emphasisPlateTextColor:d.string().optional(),emphasisPlateAltColor:d.string().optional(),emphasisPlateAltTextColor:d.string().optional(),emphasisPlateRadius:d.number().nonnegative().optional(),emphasisPlatePadX:d.number().optional(),emphasisPlatePadY:d.number().optional(),emphasisPlateReveal:d.boolean().optional().describe("Grow a shared emphasis plate as saved words appear while reserving its final layout width."),annotationColor:d.string().optional(),annotationStrokeWidth:d.number().min(.5).max(12).optional().describe("Annotation stroke width in its 100\xD7100 SVG coordinate system; default 4."),annotationTexture:d.enum(["clean","pencil"]).optional().describe("Native annotation stroke finish; default clean."),maxWidthPercent:d.number().positive().max(100,"captions style.maxWidthPercent is % of composition width (max 100)").optional()}),_T=qa.pick({fontFamily:!0,fontSize:!0,fontWeight:!0,color:!0,highlightColor:!0,backgroundColor:!0,plate:!0,textTransform:!0,letterSpacing:!0,wordGapEm:!0,lineGapEm:!0,emphasisColor:!0,emphasisScale:!0,emphasisFontFamily:!0,emphasisFontWeight:!0,emphasisTextTransform:!0,emphasisLetterSpacing:!0,emphasisFontStyle:!0,emphasisPlate:!0,emphasisPlateColor:!0,emphasisPlateTextColor:!0,emphasisPlateAltColor:!0,emphasisPlateAltTextColor:!0,emphasisPlateRadius:!0,emphasisPlatePadX:!0,emphasisPlatePadY:!0,emphasisPlateReveal:!0,annotationColor:!0,annotationStrokeWidth:!0,annotationTexture:!0,entrance:!0,entranceMs:!0,entranceStaggerMs:!0,exitMs:!0}).strict(),BT=d.object({segmentIndex:d.number().int().nonnegative(),wordStartIndex:d.number().int().nonnegative(),wordEndIndex:d.number().int().positive().describe("Exclusive word index in the saved caption segment."),region:zm,scale:d.number().min(.25).max(4).optional(),rotation:d.number().min(-45).max(45).optional(),style:_T.optional(),holdThroughWordIndex:d.number().int().nonnegative().optional().describe("Inclusive saved-word index in this segment. The layout stays visible until that word ends."),wordMarks:d.array(d.object({wordIndex:d.number().int().nonnegative(),emphasis:d.boolean().optional(),annotate:d.enum(["circle","underline"]).nullable().optional()}).strict()).optional()}).strict(),xm=BT.extend({wordSignature:d.string().regex(/^[a-f0-9]{64}$/)});function jT(o){let e=JSON.stringify(o.map(t=>({text:t.text,startMs:t.startMs,endMs:t.endMs,emphasis:t.emphasis??null,annotate:t.annotate??null})));return Fd(Vd(new TextEncoder().encode(e)))}function VT(o,e,t=!1){let r=[],s=new Set;return e.forEach((a,p)=>{let u=o[a.segmentIndex]?.words;if(!u){r.push({index:p,field:"segmentIndex",message:"caption layout segment does not exist"});return}if(a.wordStartIndex>=a.wordEndIndex||a.wordEndIndex>u.length){r.push({index:p,field:"wordEndIndex",message:"caption layout word range is outside its segment"});return}let f=a.holdThroughWordIndex??a.wordEndIndex-1;(f<a.wordEndIndex-1||f>=u.length)&&r.push({index:p,field:"holdThroughWordIndex",message:"caption layout hold must reference this or a later word in the same segment"});let m=new Set;for(let x of a.wordMarks??[])(x.wordIndex<a.wordStartIndex||x.wordIndex>=a.wordEndIndex||m.has(x.wordIndex))&&r.push({index:p,field:"wordMarks",message:"caption layout word marks must be unique words inside the layout range"}),m.add(x.wordIndex);for(let x=a.wordStartIndex;x<a.wordEndIndex;x++){let g=`${a.segmentIndex}:${x}`;s.has(g)&&r.push({index:p,field:"wordStartIndex",message:"caption layout word ranges must not overlap"}),s.add(g)}t&&"wordSignature"in a&&a.wordSignature!==jT(u)&&r.push({index:p,field:"wordSignature",message:"caption layout is stale for these saved transcript words; reapply setCaptionLayouts"})}),r}var gm=d.object({words:d.array(NT)}),bm=d.enum(["front","behind-subject"]).optional(),UT=d.discriminatedUnion("source",[d.object({source:d.literal("derived"),from:d.object({clipId:d.string()}),segments:d.array(gm),style:qa.optional(),layouts:d.array(xm).optional(),zPlane:bm}),d.object({source:d.literal("authored"),segments:d.array(gm),style:qa.optional(),layouts:d.array(xm).optional(),zPlane:bm})]).superRefine((o,e)=>{if(o.style)for(let t of $r(o.style))e.addIssue({code:"custom",path:["style",t.field],message:t.message});for(let t of VT(o.segments,o.layouts??[],!0))e.addIssue({code:"custom",path:["layouts",t.index,t.field],message:t.message});for(let[t,r]of(o.layouts??[]).entries())for(let s of $r({...o.style,...r.style}))e.addIssue({code:"custom",path:["layouts",t,"style",s.field],message:s.message})});function HT(o){let e=[];return o.tracks.forEach((t,r)=>{t.contents.forEach((s,a)=>{!("source"in s)||s.captionVisibility===void 0||(t.kind!=="video"||s.source.kind!=="media")&&e.push({trackIndex:r,contentIndex:a})})}),e}var Qa=d.object({v:d.literal(1,{error:o=>o.input===void 0?'Missing version envelope: add top-level "v": 1 to the composition.':`Invalid version envelope: top-level "v" must be the literal 1 (got ${JSON.stringify(o.input)}).`}),format:Ya,tracks:d.array(PT),markers:d.array(LT).optional(),captions:UT.optional(),sourceSuggestionId:d.string().optional(),license:vT.optional(),licenseVerification:d.enum(["attested","cueframe-verified","third-party-verified"]).optional(),accessibility:FT.optional(),ownerOrgId:d.string().optional(),acl:DT.optional()}).strict().superRefine((o,e)=>{for(let t of HT(o))e.addIssue({code:"custom",path:["tracks",t.trackIndex,"contents",t.contentIndex,"captionVisibility"],message:"captionVisibility is supported only on video media clips"})}),WT=d.enum(["user","agent","import"]),mge=d.object({id:d.string().min(1),compositionId:Ue,predecessorId:d.string().optional(),createdAt:d.number(),etag:d.string().min(1),authorKind:WT,authorId:d.string().optional(),composition:Qa});var $T="gp-1",Ds=d.literal($T),Tm=Ls,tr=d.enum(["title-card","stat","lower-third","pull-quote","hero","logo-tag","enumeration","sequence","comparison"]),Ja=d.object({headline:d.string().max(120).optional(),sub:d.string().max(200).optional(),value:d.string().max(40).optional(),label:d.string().max(80).optional(),items:d.array(d.string().max(80)).max(8).optional(),series:d.array(d.object({label:d.string().max(40),value:d.string().max(16)})).max(8).optional()}).strict(),GT=d.object({id:d.string().min(1),atSec:d.number().min(0),durSec:d.number().positive(),role:tr,copy:Ja,intent:d.string().min(1).max(400),priority:d.number().int().min(0).max(10).default(5)}).strict(),KT=d.object({version:Ds,beats:d.array(GT)}).strict(),qT=d.enum(["headline","value","label","sublabel","logo","accent-shape","backdrop"]),YT=d.enum(["heading","body","accent","surface","on-accent","on-surface"]),QT=d.enum(["front","behind-subject"]),JT=d.object({elId:d.string().min(1),role:qT,box:Tm,styleRole:YT,z:QT.default("front"),text:d.string().max(200).optional(),typeScaleStep:d.number().int().min(0).max(8).optional()}).strict(),uo=1e-6,ZT=(o,e)=>o.x<e.x+e.w-uo&&o.x+o.w>e.x+uo&&o.y<e.y+e.h-uo&&o.y+o.h>e.y+uo,XT=d.object({version:Ds,beatId:d.string().min(1),frame:d.object({w:d.number().positive(),h:d.number().positive()}).strict(),keepOut:d.array(Tm),safe:d.object({titleSafe:d.number().min(0).max(1),actionSafe:d.number().min(0).max(1)}).strict(),elements:d.array(JT),dropped:d.object({reason:d.string().min(1)}).strict().optional()}).strict().superRefine((o,e)=>{for(let t of o.elements){if(t.z==="behind-subject")continue;let r=t.box;(r.x+r.w>1+uo||r.y+r.h>1+uo)&&e.addIssue({code:d.ZodIssueCode.custom,message:`element ${t.elId} box spills past the frame`,path:["elements"]});for(let s of o.keepOut)ZT(r,s)&&e.addIssue({code:d.ZodIssueCode.custom,message:`element ${t.elId} overlaps a face keep-out (text on the speaker)`,path:["elements"]})}}),eE=d.enum(["reveal","fade","rise","count-up","wipe"]),tE=d.enum(["pulse","underline","color-shift"]),oE=d.enum(["fade","fall","wipe","cut"]),rE=d.enum(["spring","ease-out","ease-in-out","linear"]),sE=d.object({type:eE,atMs:d.number().min(0),durMs:d.number().positive(),ease:rE.default("spring"),stagger:d.number().min(0).optional()}).strict(),nE=d.object({type:tE,atMs:d.number().min(0),durMs:d.number().positive()}).strict(),iE=d.object({type:oE,atMs:d.number().min(0),durMs:d.number().positive()}).strict(),aE=d.object({elId:d.string().min(1),enter:sE,emphasis:nE.optional(),exit:iE.optional()}).strict(),cE=d.object({version:Ds,beatId:d.string().min(1),elements:d.array(aE)}).strict(),yge=d.object({version:Ds,content:KT,layouts:d.array(XT),motions:d.array(cE)}).strict();var pE=d.discriminatedUnion("kind",[d.object({kind:d.literal("face"),faceId:d.string().min(1)}),d.object({kind:d.literal("all-faces")}),d.object({kind:d.literal("frame-center")}),d.object({kind:d.literal("active-speaker")}),d.object({kind:d.literal("point"),x:d.number().min(0).max(1),y:d.number().min(0).max(1)})]),dE=d.object({startSec:d.number().nonnegative(),endSec:d.number().positive(),action:d.enum(["frame","keep","trim"]).describe("'frame' = SHOW this span cropped/tracked per `subject`. 'keep' = SHOW this span as-is, no reframe (footage with nothing to track). 'trim' = DELETE this span from the output entirely \u2014 trimmed footage never appears."),subject:pE.optional(),shotScale:d.enum(["close","standard","wide"]).optional(),zoomScale:d.number().min(.4).max(1).optional(),verticalBias:d.number().min(-.3).max(.3).optional(),lateralBias:d.number().min(-.3).max(.3).optional(),intent:d.string().optional()}).refine(o=>o.action!=="frame"||o.subject!==void 0,{message:"frame segment requires a subject \u2014 for footage with no trackable subject use action:'keep' (shown as-is); do NOT trim spans you want shown"}).refine(o=>o.action!=="keep"||o.subject===void 0,{message:"keep segment shows footage as-is \u2014 it takes no subject (use action:'frame' to track one)"}).refine(o=>o.shotScale===void 0||o.zoomScale===void 0,{message:"framing segment takes EITHER shotScale (editorial scale \u2014 the bake calibrates the zoom to the detected face) OR zoomScale (an explicit fraction of the frame), never both: shotScale wins and the zoomScale would be silently discarded",path:["zoomScale"]}),lE=d.object({startSec:d.number().nonnegative(),endSec:d.number().positive(),reason:d.string().min(1)}),uE=d.object({id:d.string().min(1),atSec:d.number().nonnegative(),durSec:d.number().positive(),kind:d.enum(["broll","audio","sfx","music","ambience","gif","image"]),source:d.enum(["find","generate"]),intent:d.string().min(1),resolvedMediaId:d.string().optional()}),mE=d.object({id:d.string().min(1),atSec:d.number().nonnegative(),durSec:d.number().positive(),role:tr,copy:Ja,intent:d.string().min(1)}),hE=d.object({startSec:d.number().nonnegative(),endSec:d.number().nonnegative().optional(),kind:d.string().min(1),name:d.string().optional()}),Tge=d.object({framing:d.array(dE).min(1),cuts:d.array(lE).optional(),captions:d.object({styleIntent:d.string().optional()}).optional(),assets:d.array(uE).optional(),graphics:d.array(mE).optional(),markers:d.array(hE).optional()});var fE=d.union([d.enum(["linear","ease","ease-in","ease-out","ease-in-out"]),d.object({kind:d.literal("cubic-bezier"),x1:d.number().min(0).max(1),y1:d.number(),x2:d.number().min(0).max(1),y2:d.number()})]),xt=d.string().min(1),Za=d.union([d.object({kind:d.literal("system"),family:d.string().min(1),weight:d.number().int().min(1).max(1e3).optional(),style:d.enum(["normal","italic"]).optional()}),d.object({kind:d.literal("web"),family:d.string().min(1),url:d.string().url().optional(),weight:d.number().int().min(1).max(1e3).optional(),style:d.enum(["normal","italic"]).optional()}),d.object({kind:d.literal("uploaded"),fontId:Ue,family:d.string().optional(),weight:d.number().int().min(1).max(1e3).optional(),style:d.enum(["normal","italic"]).optional()})]),xE=d.object({primary:d.string().min(1),secondary:d.string().optional(),accent:d.string().min(1),background:d.string().min(1),text:d.string().min(1),textMuted:d.string().optional(),border:d.string().optional(),surface:d.string().optional(),card:d.string().optional(),gridLine:d.string().optional(),accentMuted:d.string().optional(),textOnAccent:d.string().optional(),textOnSurface:d.string().optional()}),gE=d.object({heading:Za,body:Za.optional(),caption:Za.optional()}),bE=d.object({base:d.number().positive().optional(),lg:d.number().positive().optional(),sm:d.number().positive().optional()}),yE=d.object({fontSizeHeading:d.number().positive().optional(),fontSizeBody:d.number().positive().optional(),fontSizeLabel:d.number().positive().optional(),borderRadius:d.number().nonnegative().optional()}),AE=d.object({duration:d.number().positive().optional(),easing:fE.optional(),entrance:d.enum(["none","fade","word-pop","stagger-up"]).optional(),staggerMs:d.number().nonnegative().optional(),exitMs:d.number().nonnegative().optional()}),Cm=d.enum(["tl","tr","bl","br"]),SE=d.object({src:d.string().min(1),alt:d.string().optional(),placement:Cm.optional(),sizePct:d.number().positive().optional()}),Em=d.object({kind:d.enum(["card","video"]),src:d.string().min(1).optional(),title:d.string().optional(),subtitle:d.string().optional(),durationMs:d.number().positive().optional()}),zE=d.object({src:d.string().min(1),opacity:d.number().min(0).max(1).optional(),placement:Cm.optional()}),TE=d.discriminatedUnion("kind",[d.object({kind:d.literal("card"),html:ks,tokens:d.record(d.string(),d.string()).optional()}),d.object({kind:d.literal("overlay"),primitiveId:d.string().min(1),params:d.record(d.string(),d.unknown()).optional()}),d.object({kind:d.literal("component"),componentId:d.string().min(1),props:d.record(d.string(),d.unknown()).optional()})]),EE=d.enum(["fade-up","slide-in-left","slide-in-right","scale-pop","stagger-reveal"]),CE=d.object({id:d.string().min(1).max(40),observed:d.string().min(1).max(500),body:TE,motion:d.object({preset:EE,enterMs:d.number().int().min(0).max(5e3).optional(),exitMs:d.number().int().min(0).max(5e3).optional(),staggerMs:d.number().int().min(0).max(2e3).optional(),confidence:d.enum(["high","low"]).optional()}).optional(),role:tr,zone:d.object({x:d.number(),y:d.number(),w:d.number(),h:d.number()}).optional(),evidence:d.array(d.number().int().min(0)).max(24).optional(),diffScore:d.number().min(0).max(1).optional(),coverage:d.enum(["reproduced","approximated","skipped"]),skipReason:d.string().max(300).optional()}),IE=d.object({public:d.boolean().optional(),readerOrgIds:d.array(d.string()).optional(),writerOrgIds:d.array(d.string()).optional()}),RE=d.object({type:d.string().min(1),source:d.string().optional(),notes:d.string().optional()}),Mge=d.object({id:d.string().min(1),name:d.string().min(1),colors:xE,fonts:gE,syncCaptions:d.boolean().optional(),spacing:bE.optional(),sizing:yE.optional(),motion:AE.optional(),captionProfile:d.object({color:d.string().optional(),highlightColor:d.string().optional(),emphasisColor:d.string().optional(),plate:d.enum(["glass","solid","none"]).optional(),entrance:d.enum(["none","fade","word-pop","stagger-up"]).optional(),entranceMs:d.number().optional(),entranceStaggerMs:d.number().optional(),exitMs:d.number().optional(),fontFamily:d.string().optional(),fontWeight:d.number().int().min(100).max(900).multipleOf(100).optional(),emphasisFontFamily:d.string().optional(),emphasisScale:d.number().positive().optional(),emphasisFontWeight:d.number().int().min(100).max(900).optional(),emphasisFontStyle:d.enum(["normal","italic"]).optional(),emphasisTextTransform:d.enum(["none","uppercase"]).optional(),emphasisLetterSpacing:d.number().optional(),emphasisPlate:d.boolean().optional(),emphasisPlateColor:d.string().optional(),emphasisPlateTextColor:d.string().optional()}).optional(),exemplarKeys:d.array(d.string().min(1)).max(24).optional(),contactSheetKey:d.string().min(1).optional(),motifs:d.array(CE).max(24).optional(),styleRubric:d.string().max(4e3).optional(),density:d.object({graphicsPerMin:d.number().min(0).max(60),maxSimultaneous:d.number().int().min(1).max(6)}).optional(),inspiration:d.object({sources:d.array(d.string()).min(1).max(24),extractedAt:d.number(),extractionVersion:d.string().min(1).max(60)}).optional(),logo:SE.optional(),intro:Em.optional(),outro:Em.optional(),watermark:zE.optional(),audio:d.object({sfxIntensity:d.enum(["off","light","standard","dense"]).optional(),musicEnabled:d.boolean().optional(),musicMood:d.string().max(300).optional(),sonicLogo:d.object({ref:xt,placement:d.enum(["intro","outro","both"]),offsetMs:d.number().int().min(0).max(1e4).optional()}).optional(),uiSoundSet:d.object({tick:xt.optional(),pop:xt.optional(),impact:xt.optional(),confirm:xt.optional(),error:xt.optional(),whoosh:xt.optional(),riser:xt.optional()}).optional(),bedStyle:d.object({bedId:xt.optional(),genre:d.string().max(120).optional(),bpmRange:d.object({min:d.number(),max:d.number()}).optional()}).optional(),ambiencePreference:d.object({ref:xt}).nullable().optional()}).optional(),license:RE.optional(),licenseVerification:d.enum(["attested","cueframe-verified","third-party-verified"]).optional(),ownerOrgId:d.string().optional(),acl:IE.optional()}).superRefine((o,e)=>{for(let t of Zd(o))e.addIssue({code:"custom",path:t.path.split("."),message:t.message})});var vge=d.object({id:Ue,name:d.string().min(1),defaultFormat:Ya.optional(),palConformDefault:d.union([d.literal(24),d.literal(30)]).optional(),activeCompositionId:Ue.nullable().optional(),brandKitId:d.string().optional(),ownerOrgId:d.string().optional(),createdAt:d.number(),updatedAt:d.number()});var wE=d.enum(["main","wide","facecam","screen","audio"]),OE=d.object({mediaId:Ue,role:wE,label:d.string().optional()}),ME=d.object({videoRole:d.enum(["main","wide","facecam","screen"]),audioRole:d.literal("audio")}),Bge=d.object({id:Ue,name:d.string().min(1),members:d.array(OE).nonempty(),mux:d.array(ME).optional(),ownerOrgId:d.string().optional(),createdAt:d.number(),updatedAt:d.number()});var Hge=d.enum(["render.completed","media.transcribed","media.completed","composition.updated"]),kE=d.enum(["pending","delivering","delivered","failed","exhausted"]),Wge=d.object({id:Ue,url:d.string().url(),events:d.array(d.string().min(1)).nonempty(),signingKeyId:d.string().optional(),headers:d.record(d.string(),d.string()).optional(),enabled:d.boolean().optional(),ownerOrgId:d.string().optional(),createdAt:d.number(),updatedAt:d.number()}),$ge=d.object({id:d.string().min(1),webhookId:Ue,event:d.string().min(1),payload:d.record(d.string(),d.unknown()),status:kE,attemptCount:d.number().int().nonnegative(),responseStatus:d.number().int().optional(),responseBody:d.string().optional(),error:d.string().optional(),createdAt:d.number(),deliveredAt:d.number().optional()});function rr(o){return"source"in o}function or(o){return o.startTime+o.duration}function PE(o){let e=[],t=[...o.contents].sort((r,s)=>r.startTime-s.startTime);for(let r=1;r<t.length;r++){let s=t[r-1],a=t[r];a.startTime<or(s)&&e.push({code:"track_clips_overlap",message:`Track ${o.id}: items ${s.id} and ${a.id} overlap at [${a.startTime}, ${Math.min(or(s),or(a))})`,details:{trackId:o.id,clipAId:s.id,clipBId:a.id,overlapRange:[a.startTime,Math.min(or(s),or(a))]}})}return e}function LE(o){let e=[];for(let t of o.contents){if(!rr(t))continue;DE(o.kind,t.source.kind)||e.push({code:"clip_source_track_kind_mismatch",message:`Track ${o.id} (kind=${o.kind}) cannot hold TimelineClip ${t.id} (source.kind=${t.source.kind})`,details:{trackId:o.id,clipId:t.id,sourceKind:t.source.kind,trackKind:o.kind}})}return e}function DE(o,e){switch(o){case"video":return e==="media"||e==="component"||e==="composition";case"audio":return e==="media"||e==="component";case"image":return e==="media"||e==="component";case"overlay":return e==="overlay"||e==="component"||e==="card";case"effect":return e==="effect"}}function vE(o){let e=[],t=[...o.contents].sort((r,s)=>r.startTime-s.startTime);for(let r=0;r<t.length;r++){let s=t[r];if(!rr(s)||!s.transitionIn)continue;let a=t[r-1];if(!a||!rr(a)){e.push({code:"transition_no_predecessor",message:`Track ${o.id}: TimelineClip ${s.id} has transitionIn but no TimelineClip predecessor`,details:{trackId:o.id,clipId:s.id}});continue}let p=s.transitionIn.duration,u=Math.min(a.duration,s.duration);p>u&&e.push({code:"transition_too_long",message:`Track ${o.id}: TimelineClip ${s.id} transitionIn.duration (${p}) exceeds available headroom (${u})`,details:{trackId:o.id,clipId:s.id,transitionDuration:p,available:u}})}return e}function FE(o){let e=[];for(let t of o.contents){if(!rr(t)||t.source.kind!=="media")continue;let r=t.source.excludedRanges;if(!r||r.length===0)continue;let s=t.source.trim,a=s?.start??0,p=t.source.playbackRate??1,u=s?.end??a+t.duration*p,f=-1/0,m=0,x=!1;for(let w=0;w<r.length;w++){let k=r[w];if(k.end<=k.start){e.push({code:"excluded_range_invalid",message:`Track ${o.id}: TimelineClip ${t.id} excludedRanges[${w}] end (${k.end}) must be > start (${k.start})`,details:{trackId:o.id,clipId:t.id,index:w,start:k.start,end:k.end}}),x=!0;break}if(k.start<a||k.end>u){e.push({code:"excluded_range_out_of_bounds",message:`Track ${o.id}: TimelineClip ${t.id} excludedRanges[${w}] [${k.start}, ${k.end}] outside trim [${a}, ${u}]`,details:{trackId:o.id,clipId:t.id,index:w,start:k.start,end:k.end,trimStart:a,trimEnd:u}}),x=!0;break}if(k.start<f){e.push({code:"excluded_range_overlap",message:`Track ${o.id}: TimelineClip ${t.id} excludedRanges[${w}] overlaps preceding range (start ${k.start} < prevEnd ${f})`,details:{trackId:o.id,clipId:t.id,index:w,start:k.start,prevEnd:f}}),x=!0;break}f=k.end,m+=k.end-k.start}if(x)continue;let g=u-a,z=(g-m)/p;Math.abs(z-t.duration)>.001&&e.push({code:"excluded_range_duration_mismatch",message:`Track ${o.id}: TimelineClip ${t.id} duration (${t.duration}) \u2260 (trimSpan (${g}) \u2212 \u03A3excluded (${m})) \xF7 playbackRate (${p}) = ${z}`,details:{trackId:o.id,clipId:t.id,expected:z,actual:t.duration,trimSpan:g,totalExcluded:m,playbackRate:p}})}return e}function NE(o){let e=[];for(let t of o.contents){if(!rr(t)||t.source.kind!=="media")continue;let r=t.source.trim;if(!r)continue;let s=t.source.playbackRate??1;if(!(s>0))continue;let a=t.source.excludedRanges;if(a&&a.length>0)continue;let p=r.end-r.start,u=p/s;Math.abs(u-t.duration)>.001&&e.push({code:"clip_duration_trim_mismatch",message:`Track ${o.id}: TimelineClip ${t.id} duration (${t.duration}) \u2260 trimSpan (${p}) \xF7 playbackRate (${s}) = ${u}`,details:{trackId:o.id,clipId:t.id,expected:u,actual:t.duration,trimSpan:p,playbackRate:s}})}return e}function _E(o){return[...PE(o),...LE(o),...vE(o),...FE(o),...NE(o)]}function Im(o){let e=[];for(let t of o.tracks)e.push(..._E(t));return e}var sr=o=>o.endTime??o.startTime;function Rm(o){let e=(o.markers??[]).filter(r=>r.kind==="scene").sort((r,s)=>r.startTime-s.startTime),t=[];for(let r=1;r<e.length;r++){let s=e[r-1],a=e[r];a.startTime<sr(s)&&t.push({code:"scene_marker_overlap",message:`Scene markers ${s.id} and ${a.id} overlap at [${a.startTime}, ${Math.min(sr(s),sr(a))})`,details:{markerAId:s.id,markerBId:a.id,overlapRange:[a.startTime,Math.min(sr(s),sr(a))]}})}return t}function wm(o){let e=new Map,t=[],r=(s,a)=>{let p=e.get(s);p?t.push({code:"composition_id_collision",message:`Id ${s} used by both ${p} and ${a}`,details:{id:s,existingKind:p,newKind:a}}):e.set(s,a)};for(let s of o.tracks){r(s.id,"track");for(let a of s.contents)r(a.id,"source"in a?"clip":"gap")}for(let s of o.markers??[])r(s.id,"marker");return t}function BE(o){let e=o.animate;if(!e)return[];let t=[];for(let[r,s]of Object.entries(e)){if(!s)continue;let a=[...s].sort((p,u)=>p.time-u.time);for(let p of a)p.time>o.duration+1e-6&&t.push({code:"varying_keyframe_time_out_of_range",message:`clip "${o.id}" animates "${r}" at ${p.time}s, past its own duration of ${o.duration}s \u2014 that keyframe can never be reached`,details:{clipId:o.id,param:r,time:p.time,duration:o.duration}});for(let p=1;p<a.length;p++)Math.abs(a[p].time-a[p-1].time)<1e-6&&t.push({code:"varying_keyframe_duplicate_time",message:`clip "${o.id}" has two "${r}" keyframes at ${a[p].time}s \u2014 the value at that instant is undefined`,details:{clipId:o.id,param:r,time:a[p].time}})}return t}function Om(o){let e=[];for(let t of o.tracks)for(let r of t.contents)"source"in r&&e.push(...BE(r));return e}function Mm(o){return[...wm(o),...Im(o),...Rm(o),...Om(o)]}var km=c({featureId:n().describe("Stable billing feature id."),name:n().describe("Human-readable feature name."),type:h(["metered","boolean","credit_system"]).describe("metered = a depleting/gauge quota (has balances); boolean = an on/off plan grant; credit_system = a spendable wallet the metered lines draw from."),unit:E([h(["cents","count","minutes","gb"]),G()]).describe("What `balance`/`includedUsage`/`usage` are COUNTED IN \u2014 do not assume. `exports` is output-MINUTES (not a number of renders), `compose`/`ai_tokens`/`compose_verify`/`generate` are CENTS of spend (not a number of calls), `compose_capture` is a count of stills, `storage` is GB, a credit system is cents (1 credit = $0.01). null = boolean feature, nothing to count."),included:P().nullable().describe("Does the CURRENT plan grant this feature? For a credit-funded feature (see `fundedBy`) this is true whenever the plan grants the funding wallet \u2014 spend is then bounded by `balance`, not by inclusion. false = not on this plan (a create gated on it 402s billing_required); null = unknown (billing not configured / no live data)."),unlimited:P().nullable().describe("Metered only: the plan grants an effectively-unlimited allowance. null = unknown / boolean feature."),balance:i().nullable().describe("Metered only: remaining balance for the current period, in THIS feature's unit. For a credit-funded feature it is the funding wallet's balance restated at `creditCost` credits per unit \u2014 a SHARE of a pool, not a private allowance. null = unknown / boolean feature."),includedUsage:i().nullable().describe("Metered only: the plan's included allowance (the period limit), in this feature's unit. null = unknown / boolean feature."),usage:i().nullable().describe("Metered only: amount consumed this period, in this feature's unit. null = unknown / boolean feature."),nextResetAt:i().nullable().describe("Metered only: epoch-ms when the period balance resets. null = unknown / no scheduled reset."),fundedBy:n().nullable().describe("The credit system that actually pays for this feature (always `credits` \u2014 there is one wallet). Non-null means the feature has NO separate allowance: its `balance` restates that shared wallet, and every other feature with the same `fundedBy` competes for the same money. null = the plan grants this feature directly."),creditCost:i().nullable().describe("Credits consumed per ONE unit of this feature (exports 50 = $0.50 per 1080p output-minute; compose_capture 2 = $0.02 per still). null = not credit-funded."),listUsdPerUnit:i().nullable().describe("LIST price in USD of ONE unit of this feature (see `unit`) \u2014 the quote to read BEFORE a call. Credit-funded: `creditCost`/100 (exports 0.5 per 1080p output-minute; compose_capture 0.02 per still; compose/ai_tokens/generate 0.015 per cent of provider cost). 0 = the plan grants this feature and it draws NO credits (resource_import: stock search AND import are free for a keyed caller, bytes count toward `storage`; brand_kits). null = not quotable up front (a wallet, a gauge, or a feature the plan does not grant).")}).describe("A single feature's entitlement: whether the plan includes it, remaining/limit when metered, and the per-unit list price to quote before a call");var jE=c({generationLimit:E([c({applies:P(),unit:b("cents_of_provider_cost"),cap:i().nullable(),spent:i().nullable(),remaining:i().nullable()}),G()]).describe("Separate lifetime generation cap before a credit-pack purchase. Wallet balance is still shared; generation must also fit this remaining provider-cost allowance. null means unknown."),orgId:n().describe("The org this API key is bound to \u2014 resolved server-side from the Authorization credential, NEVER from the request body/query."),displayName:n().nullable().describe("Org/customer display name from the billing record; null when not set or unknown."),plan:E([c({id:n().describe("Plan/product id (e.g. free, pro, business, studio)."),name:n().nullable().describe("Plan display name.")}),G()]).describe("The customer's current base plan/tier. null = unknown (billing not configured, or no active plan resolvable yet)."),entitlements:O(n(),km).describe("Per-feature entitlements keyed by featureId. Covers the billing-gated capabilities: `exports` gates create_render AND generate_media output; `compose` gates compose; `brand_kits` gates create_brand_kit; `resource_import` gates import_resource (a boolean grant: `listUsdPerUnit` 0 \u2014 stock search and import cost no credits for a keyed caller); plus ai_tokens/storage/compose_verify/compose_capture/etc. Read `listUsdPerUnit` for what one unit costs before you spend it. Most capabilities are CREDIT-FUNDED \u2014 `included` is true and the real limit is `balance`, drawn from the shared wallet named in `fundedBy` (`credits` \u2014 generation included; a free org is additionally bounded by a generation cap). So read `balance`, not `included`, to decide whether you can afford a call; `included:false` means the plan genuinely lacks the feature. Check BEFORE a metered call to avoid a mid-workflow 402 billing_required (whose error `details.featureId` names the gating feature)."),costCeilings:c({generateMediaUsdPerCall:i().nullable().describe("Per-call USD ceiling for generate_media: a generation whose ESTIMATE exceeds this 402s (generation_budget_exceeded) before any spend. Right-size the prompt/duration under this. null = unknown.")}).describe("Discoverable per-call cost ceilings so an agent can price/right-size a request before a guaranteed 402."),billingConfigured:P().describe("false = billing is not configured in this environment, so plan/entitlement values are best-effort and may be null (unknown), not authoritative."),surfaces:c({console:n().describe("Origin of the authenticated web console."),usage:n().describe("Browser URL for the usage ledger."),billing:n().describe("Browser URL for plan and credits."),apiKeys:n().describe("Browser URL for minting and revoking API keys."),project:G().describe("No per-project browser view exists yet, so there is no URL to hand a user for a project or its composition. Stated as an explicit null so a client does not construct a route that 404s (CUE-19). Show a rendered frame (preview_frame) or a completed render instead.")}).describe('The browser URLs that actually exist, so an agent asked to "show me" can hand the user a real link instead of guessing one from an id. A null means the surface is not built, not that it is hidden from this key.')}).describe("Account discovery for the authenticated key: identity + plan + entitlements + cost ceilings + the browser surfaces that exist. Read this to see what your plan/credits allow before a metered call (create_render / compose / generate_media / create_brand_kit).");var VE=0,UE=9007199254740991,HE=c({name:n().min(1),permissions:O(n(),y(h(["read","write"])).min(1)).describe("Resource \u2192 actions grant. Resources: media, sessions, projects, renders, webhooks, billing. Actions: read, write. Least-privilege \u2014 grant only what's needed (billing:write is required to start a checkout)."),expiresIn:A().gt(VE).max(UE).optional().describe("Lifetime in seconds; omit for no expiry.")});var WE=c({key:n().describe("The full secret key (cf_test_\u2026 / cf_live_\u2026). Shown ONCE \u2014 store it now."),id:n(),prefix:n(),start:n().describe("First chars of the key, for later identification.")});var Pm=c({ref:n().describe("Placement handle: a pack soundId/bedId, or an org media id."),role:h(["vo","music","sfx","ambience"]).describe("Declared role for mix policy."),envelopeClass:h(["transient","sweep","ambient"]).describe("Coarse envelope shape \u2014 the browse grouping."),description:n(),durationSec:i(),evidence:c({envelopeClass:h(["transient","sweep","ambient"]),attackMs:i().optional(),spectralCentroidHz:i().optional(),meanVolumeDb:i().optional(),maxVolumeDb:i().optional()}).describe("Envelope probe evidence (always carries envelopeClass)."),source:h(["pack","org","generated"]).describe("Provenance discriminant."),license:n().describe('"CC0" (pack), "org-owned"/a CC token (org), or "generated".'),provenance:n().describe("Human-legible provenance (pack attribution / org-owned / generator + prompt)."),bpm:i().optional().describe("Tempo \u2014 present for music-role entries."),mood:y(n()).optional().describe("Editorial mood tags \u2014 present for pack music beds.")});var Lm=c({id:n().describe("Billing catalog product id (e.g. pro, pro_yearly)."),tier:n().describe("Plan tier: pro | business | studio."),name:n(),interval:n().describe("month | year."),priceUsd:i().describe("Price in USD for the interval.")});var $E=c({plans:y(Lm).describe("Every purchasable {tier, interval} and its product id."),billingConfigured:P()});var GE=200,KE=200,qE=2e3,YE=500,QE=500,JE=5e3,ZE=0,XE=1,eC=300,tC=0,oC=1e4,rC=120,sC=24,nC=40,iC=500,aC=0,cC=5e3,pC=0,dC=5e3,lC=0,uC=2e3,mC=0,hC=9007199254740991,fC=24,xC=0,gC=1,bC=300,yC=24,AC=4e3,SC=0,zC=60,TC=6,EC=24,CC=60,Dm=c({kitId:n().min(1).max(GE),name:n().min(1).max(KE),description:n().max(qE).optional(),tagline:n().max(YE).optional(),secondaryTagline:n().max(QE).optional(),colors:c({primary:n().min(1),secondary:n().min(1),accent:n().min(1),background:n().min(1),text:n().min(1)}),extraColors:y(c({hex:n().min(1),label:n().min(1),usage:n().optional()})).optional(),headingFont:c({fontFamily:n().min(1),fontWeight:i()}),bodyFont:c({fontFamily:n().min(1),fontWeight:i()}),voiceGuidelines:n().max(JE).optional(),syncCaptions:P().optional(),captionProfile:c({fontFamily:n().optional(),fontSize:i().optional(),fontWeight:i().optional(),color:n().optional(),highlightColor:n().optional(),backgroundColor:n().optional(),plate:h(["glass","solid","none"]).optional(),position:h(["top","center","bottom"]).optional(),textTransform:h(["none","uppercase"]).optional(),entrance:h(["none","fade","word-pop","stagger-up"]).optional(),entranceMs:i().optional(),entranceStaggerMs:i().optional(),exitMs:i().optional(),emphasisColor:n().optional(),emphasisScale:i().optional(),emphasisFontFamily:n().optional(),emphasisFontWeight:i().optional(),emphasisFontStyle:h(["normal","italic"]).optional(),emphasisTextTransform:h(["none","uppercase"]).optional(),emphasisLetterSpacing:i().optional(),emphasisPlate:P().optional(),emphasisPlateColor:n().optional(),emphasisPlateTextColor:n().optional()}).optional(),motion:c({duration:i().optional(),easing:E([h(["linear","ease","ease-in","ease-out","ease-in-out"]),c({kind:b("cubic-bezier"),x1:i(),y1:i(),x2:i(),y2:i()})]).optional(),entrance:h(["none","fade","word-pop","stagger-up"]).optional(),staggerMs:i().optional(),exitMs:i().optional()}).optional(),logo:c({src:n().min(1),alt:n().optional(),placement:h(["tl","tr","bl","br"]).optional(),sizePct:i().optional()}).optional(),intro:c({kind:h(["card","video"]),src:n().min(1).optional(),title:n().optional(),subtitle:n().optional(),durationMs:i().optional()}).optional(),outro:c({kind:h(["card","video"]),src:n().min(1).optional(),title:n().optional(),subtitle:n().optional(),durationMs:i().optional()}).optional(),watermark:c({src:n().min(1),opacity:i().min(ZE).max(XE).optional(),placement:h(["tl","tr","bl","br"]).optional()}).optional(),spacing:c({base:i().optional(),lg:i().optional(),sm:i().optional()}).optional(),sizing:c({fontSizeHeading:i().optional(),fontSizeBody:i().optional(),fontSizeLabel:i().optional(),borderRadius:i().optional()}).optional(),audio:c({sfxIntensity:h(["off","light","standard","dense"]).optional(),musicEnabled:P().optional(),musicMood:n().max(eC).optional(),sonicLogo:c({ref:n().min(1),placement:h(["intro","outro","both"]),offsetMs:A().min(tC).max(oC).optional()}).optional().describe("A brand sound signature bound to the intro/outro bookend. `ref` = a palette reference; bound only when the kit carries the matching bumper (intro/outro), else a non-blocking advisory."),uiSoundSet:c({tick:n().min(1).optional(),pop:n().min(1).optional(),impact:n().min(1).optional(),confirm:n().min(1).optional(),error:n().min(1).optional(),whoosh:n().min(1).optional(),riser:n().min(1).optional()}).optional().describe("Per-family SFX overrides (the brand's own tick/pop/\u2026). Highest-priority tier over the org palette + pack default in the compose SFX draw."),bedStyle:c({bedId:n().min(1).optional(),genre:n().max(rC).optional(),bpmRange:c({min:i(),max:i()}).optional()}).optional().describe("Preferred music bed (`bedId`) or a style hint (`genre` / `bpmRange`). Surfaced for driving agents; compose does not auto-select a pack bed."),ambiencePreference:E([c({ref:n().min(1)}),G()]).optional().describe("Preferred ambience bed (`{ref}`) or explicit null (opt-out). Surfaced for driving agents; compose has no ambience auto-placement.")}).optional(),exemplarKeys:y(n().min(1)).max(sC).optional(),contactSheetKey:n().min(1).optional(),motifs:y(c({id:n().min(1).max(nC),observed:n().min(1).max(iC),body:E([c({kind:b("card"),html:n().min(1),tokens:O(n(),n()).optional()}),c({kind:b("overlay"),primitiveId:n().min(1),params:O(n(),L()).optional()}),c({kind:b("component"),componentId:n().min(1),props:O(n(),L()).optional()})]),motion:c({preset:h(["fade-up","slide-in-left","slide-in-right","scale-pop","stagger-reveal"]),enterMs:A().min(aC).max(cC).optional(),exitMs:A().min(pC).max(dC).optional(),staggerMs:A().min(lC).max(uC).optional(),confidence:h(["high","low"]).optional()}).optional(),role:h(["title-card","stat","lower-third","pull-quote","hero","logo-tag","enumeration","sequence","comparison"]),zone:c({x:i(),y:i(),w:i(),h:i()}).optional(),evidence:y(A().min(mC).max(hC)).max(fC).optional(),diffScore:i().min(xC).max(gC).optional(),coverage:h(["reproduced","approximated","skipped"]),skipReason:n().max(bC).optional()})).max(yC).optional(),styleRubric:n().max(AC).optional(),density:c({graphicsPerMin:i().min(SC).max(zC),maxSimultaneous:A().min(1).max(TC)}).optional(),inspiration:c({sources:y(n()).min(1).max(EC),extractedAt:i(),extractionVersion:n().min(1).max(CC)}).optional()}).describe("POST /brand-kits body. Org/user are server-resolved; never accepted from the body.");var IC=12,RC=c({motifId:n().min(1).optional(),limit:A().min(1).max(IC).optional()}).describe("POST /brand-kits/{id}/exemplars body \u2014 select which exemplar frames to presign.");var wC=-9007199254740991,OC=9007199254740991,MC=c({exemplars:y(c({index:A().min(wC).max(OC),url:n()})),contactSheetUrl:n().optional()});var kC=300,PC=0,LC=1e4,DC=120,vC=24,FC=40,NC=500,_C=0,BC=5e3,jC=0,VC=5e3,UC=0,HC=2e3,WC=0,$C=9007199254740991,GC=24,KC=0,qC=1,YC=300,QC=24,JC=4e3,ZC=0,XC=60,eI=6,tI=24,oI=60,nr=c({id:n(),name:n(),description:n().nullable(),tagline:n().nullable(),colors:O(n(),n()),extraColors:y(c({name:n(),value:n()})).optional(),fonts:c({heading:E([c({family:n(),weight:E([i(),n()]).optional()}),G()]),body:E([c({family:n(),weight:E([i(),n()]).optional()}),G()])}),voiceGuidelines:n().nullable(),captions:c({sync:P(),profile:E([O(n(),L()),G()])}),motion:c({duration:i().optional(),easing:E([h(["linear","ease","ease-in","ease-out","ease-in-out"]),c({kind:b("cubic-bezier"),x1:i(),y1:i(),x2:i(),y2:i()})]).optional(),entrance:h(["none","fade","word-pop","stagger-up"]).optional(),staggerMs:i().optional(),exitMs:i().optional()}).optional(),logo:c({src:n(),alt:n().optional(),placement:h(["tl","tr","bl","br"]).optional(),sizePct:i().optional()}).optional(),intro:c({kind:h(["card","video"]),src:n().optional(),title:n().optional(),subtitle:n().optional(),durationMs:i().optional()}).optional(),outro:c({kind:h(["card","video"]),src:n().optional(),title:n().optional(),subtitle:n().optional(),durationMs:i().optional()}).optional(),watermark:c({src:n(),opacity:i().optional(),placement:h(["tl","tr","bl","br"]).optional()}).optional(),spacing:c({base:i().optional(),lg:i().optional(),sm:i().optional()}).optional(),sizing:c({fontSizeHeading:i().optional(),fontSizeBody:i().optional(),fontSizeLabel:i().optional(),borderRadius:i().optional()}).optional(),audio:c({sfxIntensity:h(["off","light","standard","dense"]).optional(),musicEnabled:P().optional(),musicMood:n().max(kC).optional(),sonicLogo:c({ref:n().min(1),placement:h(["intro","outro","both"]),offsetMs:A().min(PC).max(LC).optional()}).optional().describe("A brand sound signature bound to the intro/outro bookend. `ref` = a palette reference; bound only when the kit carries the matching bumper (intro/outro), else a non-blocking advisory."),uiSoundSet:c({tick:n().min(1).optional(),pop:n().min(1).optional(),impact:n().min(1).optional(),confirm:n().min(1).optional(),error:n().min(1).optional(),whoosh:n().min(1).optional(),riser:n().min(1).optional()}).optional().describe("Per-family SFX overrides (the brand's own tick/pop/\u2026). Highest-priority tier over the org palette + pack default in the compose SFX draw."),bedStyle:c({bedId:n().min(1).optional(),genre:n().max(DC).optional(),bpmRange:c({min:i(),max:i()}).optional()}).optional().describe("Preferred music bed (`bedId`) or a style hint (`genre` / `bpmRange`). Surfaced for driving agents; compose does not auto-select a pack bed."),ambiencePreference:E([c({ref:n().min(1)}),G()]).optional().describe("Preferred ambience bed (`{ref}`) or explicit null (opt-out). Surfaced for driving agents; compose has no ambience auto-placement.")}).optional(),exemplarKeys:y(n().min(1)).max(vC).optional(),contactSheetKey:n().min(1).optional(),motifs:y(c({id:n().min(1).max(FC),observed:n().min(1).max(NC),body:E([c({kind:b("card"),html:n().min(1),tokens:O(n(),n()).optional()}),c({kind:b("overlay"),primitiveId:n().min(1),params:O(n(),L()).optional()}),c({kind:b("component"),componentId:n().min(1),props:O(n(),L()).optional()})]),motion:c({preset:h(["fade-up","slide-in-left","slide-in-right","scale-pop","stagger-reveal"]),enterMs:A().min(_C).max(BC).optional(),exitMs:A().min(jC).max(VC).optional(),staggerMs:A().min(UC).max(HC).optional(),confidence:h(["high","low"]).optional()}).optional(),role:h(["title-card","stat","lower-third","pull-quote","hero","logo-tag","enumeration","sequence","comparison"]),zone:c({x:i(),y:i(),w:i(),h:i()}).optional(),evidence:y(A().min(WC).max($C)).max(GC).optional(),diffScore:i().min(KC).max(qC).optional(),coverage:h(["reproduced","approximated","skipped"]),skipReason:n().max(YC).optional()})).max(QC).optional(),styleRubric:n().max(JC).optional(),density:c({graphicsPerMin:i().min(ZC).max(XC),maxSimultaneous:A().min(1).max(eI)}).optional(),inspiration:c({sources:y(n()).min(1).max(tI),extractedAt:i(),extractionVersion:n().min(1).max(oI)}).optional(),createdAt:n(),updatedAt:n()}).describe("Brand kit response per \xA7Brand Kits.");var be=c({hasMore:P(),nextCursor:n().nullable(),prevCursor:n().nullable()}).describe("Cursor pagination metadata.");var rI=c({data:y(nr),pagination:be});var sI=300,mo=c({music:c({enabled:P().describe("Whether the compose carries a music bed."),mood:n().max(sI).optional().describe("Freeform mood/genre prompt for the GENERATED bed (e.g. 'understated editorial, warm'). Ignored when mediaId pins a track."),mediaId:n().min(1).optional().describe("Pin a client-imported track as the bed. HONOR-OR-REFUSE: must be an org-owned kind:'audio' media item, else 422 \u2014 never accept-and-ignore. Absent \u21D2 generate from mood.")}).optional(),sfx:c({intensity:h(["off","light","standard","dense"]).describe("SFX placement density. Real-footage content keeps restraint caps regardless ('dense' is the explicit opt-out); generated/graphic-led content unlocks the standard tier.")}).optional()});var nI=0,iI=0,aI=0,cI=80,pI=8,ho=c({id:n().min(1),intent:n().min(1).describe("What this beat DOES editorially (hook the claim, prove it, CTA\u2026)."),durationSec:i().gt(nI).optional(),source:c({mediaId:n().min(1),startSec:i().min(iI),endSec:i().gt(aI)}).optional().describe("MOMENT PINNING: this beat uses EXACTLY this window of this media item \u2014 honored to-the-frame or refused. v1: every sourced beat must reference the SAME mediaId (multi-source briefs are refused loudly, not silently merged)."),graphic:c({role:h(["title-card","stat","lower-third","pull-quote","hero","logo-tag","enumeration","sequence","comparison"]).describe("The mandated graphic's editorial role (the graphics-plan GraphicRole vocabulary)."),items:y(n().min(1).max(cI)).max(pI).optional().describe("Mandated list items (enumeration/sequence) \u2014 carried VERBATIM into the plan's copy.items.")}).optional().describe("GRAPHICS MANDATE: the plan MUST carry a graphics request of this role overlapping this beat's window \u2014 enforced at the plan gate (honor-or-refuse, like moment pinning). Prose mustIncludes reaches only the judge; this is the checkable form.")});var fo=h(["overlay","component","card","no-transitions"]);var dI=3,xo=c({holdAt:y(h(["content","layout","motion"])).max(dI).optional().describe("Checkpoint gates \u2014 the compose pauses at each named stage for review via resume. DEFAULT (gates absent): the compose holds at EVERY stage \u2014 your agent reviews and resumes each one; an unreviewed checkpoint times out loudly after 60min. Auto-progression is the opt-in (gates.autoApprove: true)."),autoApprove:P().optional().describe("true = fully autonomous (compose runs with NO gates \u2014 the headless opt-in; without it a brief holds at every stage by default). Mutually exclusive with a non-empty holdAt."),reviewMode:h(["agent","hosted"]).optional().describe("Who captures the review decision. Default 'agent': you relay the packet and call resume. 'hosted': every checkpoint mints a review-page URL (checkpoint.ready payload + get_checkpoint's reviewUrl) where a human approves/revises from the browser \u2014 no account, no agent session; the recorded decision rides the SAME resume rail and you learn of it via checkpoint webhooks / wait_job.")});var ye=c({aspectRatio:h(["16:9","9:16","1:1","4:5"]),fps:E([b(24),b(25),b(30),b(60)]).optional(),resolution:h(["hd","fhd","4k"]).optional()}).describe("Output-format spec per \xA7Format.");var lI=200,uI=2e3,mI=500,hI=100,fI=0,xI=3600,gI=500,bI=500,yI=35,AI=500,SI=2e3,zI=24,TI=24,EI=12,CI=24,II=0,RI=0,wI=0,OI=0,MI=0,kI=0,PI=0,LI=4,DI=0,vI=0,FI=0,NI=0,_I=0,BI=0,jI=0,VI=0,UI=0,HI=1,WI=0,$I=1,GI=.1,KI=1,qI=0,YI=0,QI=-.3,JI=.3,ZI=-.3,XI=.3,eR=0,tR=1,oR=0,rR=1,sR=-.3,nR=.3,iR=0,aR=1,cR=0,pR=-1,dR=2,lR=-1,uR=2,mR=0,hR=1,fR=0,xR=1,gR=0,bR=1,yR=0,AR=1,SR=0,zR=0,TR=2,ER=16,CR=8,IR=c({projectId:n().min(1),name:n().max(lI).optional(),goal:n().min(1).max(uI).describe("What the video must accomplish."),audience:n().max(mI).optional(),platform:n().max(hI).optional(),format:ye.optional(),durationSec:i().gt(fI).max(xI).optional().describe("Target output duration. HONOR-OR-REFUSE: compose validates it against the beat-source window (\xB11.5s) and refuses a brief it cannot honor."),tone:n().max(gI).optional(),cta:n().max(bI).optional(),locale:n().max(yI).optional().describe("Output language (BCP-47 tag, e.g. 'es-419'): ALL on-screen copy + captions."),hook:n().max(AI).optional(),caption:n().max(SI).optional(),beats:y(ho).max(zI).optional(),mustIncludes:y(n().min(1)).max(TI).optional(),references:y(n()).max(EI).optional(),captions:c({styleId:n().min(1).optional().describe("Caption style id (e.g. 'serif-emphasis@1')."),emphasisPhrases:y(n().min(1)).max(CI).optional().describe("Phrases rendered in the caption EMPHASIS style (the big-serif treatment). Matched against the transcript; drives CaptionWord.emphasis.")}).optional(),motionStyle:c({textAnimation:n().optional(),transitions:n().optional(),colorMood:n().optional(),captionStyle:n().optional()}).optional(),seededGraphics:y(c({id:n().min(1),startTime:i().min(II).describe("Timeline start (seconds)."),duration:i().gt(RI).describe("Clip duration (seconds)."),source:E([c({kind:b("media"),mediaId:n().min(1),trim:c({start:i().min(wI).describe("Source trim start (seconds)."),end:i().min(OI).describe("Source trim end (seconds).")}).optional(),excludedRanges:y(c({start:i().min(MI),end:i().min(kI),reason:n().optional()})).optional(),volume:i().min(PI).max(LI).optional(),muted:P().optional(),playbackRate:i().gt(DI).optional(),sync:h(["video","independent"]).optional(),kenBurns:h(["in","out","pan-l","pan-r","none"]).optional(),volumeDb:i().optional(),fadeInMs:i().min(vI).optional(),fadeOutMs:i().min(FI).optional(),loop:P().optional(),audioRole:h(["sfx","music","vo","ambience"]).optional(),duck:c({duckDb:i().max(NI),attackMs:i().min(_I),releaseMs:i().min(BI),windows:y(c({startMs:i(),endMs:i()})).optional()}).optional(),anchor:c({clipId:n().min(1),offsetMs:i()}).optional(),reframe:c({segments:y(c({startSec:i().min(jI).describe("Segment START in seconds, clip-relative. Segments tile the clip's duration in order."),endSec:i().gt(VI).describe("Segment END in seconds, clip-relative. The span (endSec \u2212 startSec) is this segment's duration \u2014 the window `ease` ramps over."),focus:E([c({mode:b("frame-center")}),c({mode:b("point"),x:i().min(UI).max(HI),y:i().min(WI).max($I)}),c({mode:b("face"),faceId:n().min(1),shotScale:h(["close","standard","wide"]).optional()}),c({mode:b("all-faces")}),c({mode:b("active-speaker")})]).describe("WHO/WHAT the camera tracks this segment (the reframe center), selected by `mode`: `frame-center` = no tracking, hold the geometric center (static/graphic footage, or a pure zoom); `point` = lock to a fixed source-normalized {x,y} (a non-moving on-screen element); `face` = track a detected face by `faceId` (from get_media_context), with optional `shotScale` close|standard|wide for tightness; `all-faces` = frame the bounding box of every detected face (group/ensemble shots); `active-speaker` = follow whoever is speaking (diarized talking-head / podcast). Pick by what the beat is about; pair with `zoom` for how tight."),intent:n().optional().describe("Optional editorial LABEL for diff/log readability (e.g. 'speaker-tight', 'wide-context'). Cosmetic \u2014 NOT honored by the derive math and excluded from the variant cache key."),zoom:i().min(GI).max(KI).optional().describe("How TIGHT the framing is \u2014 the fraction of the source the output viewport shows. <1 punches IN (a smaller source fraction, magnified to fill the frame); 1 = the full frame (no crop). ~0.6\u20130.8 is a moderate push-in, ~0.5 a tight close-up, 0.1 the maximum zoom. There is NO zoom-OUT past the full frame (max 1). Omit for the full frame. MUTUALLY EXCLUSIVE with `focus.shotScale` \u2014 a face-tracked shot is sized EITHER by the editorial scale (shotScale, which the bake calibrates to the detected face) OR by an explicit zoom, never both. A segment carrying both is REJECTED: shotScale wins at bake time and the zoom would be silently discarded."),ease:c({in:i().min(qI).describe("Ease-IN ramp DURATION in seconds at the segment START."),out:i().min(YI).describe("Ease-OUT ramp DURATION in seconds at the segment END.")}).optional().describe("Zoom/center ramp DURATIONS in SECONDS at this segment's edges \u2014 NOT a unitless 0\u20131 curve. ~0.3\u20130.6s reads as a snappy push; >1s reads sluggish. Keep `in` + `out` \u2264 the segment's duration (endSec \u2212 startSec): the two edges share the span, so to ramp across the WHOLE segment set one edge to the full duration and the other to 0. Omit for an instant cut to this framing."),bias:c({x:i().min(QI).max(JI).describe("Horizontal nudge, source-normalized (+ = right)."),y:i().min(ZI).max(XI).describe("Vertical nudge, source-normalized (+ = down).")}).optional().describe("Optional FINE framing nudge off the focus center, source-normalized in [\u22120.3, 0.3]. A small correction (headroom, rule-of-thirds), NOT a reframe \u2014 use `focus`/`zoom` for the actual shot. Omit (treated as 0) to sit dead-center on the focus.")})).min(1)}).optional()}),c({kind:b("component"),componentId:n().min(1),props:O(n(),L()),assets:O(n(),n().min(1)).optional().describe("Manifest asset slot \u2192 project media id. At mount each slot arrives as `assets[slot].handle`, a fetchable URL for <Img>/<Video>/<Audio>; `props` becomes `params` and never carries an asset URL."),zPlane:h(["front","behind-subject"]).optional()}),c({kind:b("overlay"),primitiveId:n().min(1),params:O(n(),L()),zPlane:h(["front","behind-subject"]).optional(),anchor:c({space:b("scene"),x:i().min(eR).max(tR),y:i().min(oR).max(rR)}).optional(),parallax:i().min(sR).max(nR).optional()}),c({kind:b("effect"),primitiveId:n().min(1),params:O(n(),L()).optional()}),c({kind:b("card"),html:n().min(1).describe("Your card's HTML \u2014 rendered VERBATIM as the graphic (shell motion via applyMotionPreset in a FOLLOWING call). CANVAS CONTRACT: the card renders in a viewport equal to the composition format's pixel frame (1080\xD71920 at 9:16 fhd); the root is NOT auto-pinned \u2014 declare explicit width/height matching the frame (box-sizing:border-box) and anchor content with flex/grid; position:absolute;inset:0 on the root does NOT fill the frame; for edge-to-edge backgrounds add an inner absolutely-positioned layer with generous negative inset. Overlay compositing applies a ~92% safe-area inset \u2014 keep critical copy away from the extreme edges. FONTS: name a family from GET /v1/fonts (list_render_fonts) \u2014 the renderer loads those faces for the card and waits for them, so `font-family: Inter` draws Inter. `@import` and remote font files are REFUSED: the card renders with no network. A family that is not on that list has no bytes behind it and the browser falls back, so end any stack with a generic (`Inter, sans-serif`) rather than relying on a system face being present."),tokens:O(n(),n()).optional(),zPlane:b("front").optional()})]),kind:h(["video","audio","image","overlay","effect"]).optional(),opacity:i().min(iR).max(aR).optional(),scale:i().gt(cR).optional(),rotation:i().optional(),position:c({x:i().min(pR).max(dR),y:i().min(lR).max(uR)}).optional().describe("Clip CENTRE as a fraction of the frame: {x:0.5,y:0.5} is dead centre, 0 to 1 is inside the frame, and a little overshoot (down to -1, up to 2) is how an entrance starts off-canvas. NOT pixels: the renderer maps x to `left: x*100%`, so `x: 180` sits 180 frame-widths away and draws nothing."),region:c({x:i().min(mR).max(hR),y:i().min(fR).max(xR),w:i().gt(gR).max(bR),h:i().gt(yR).max(AR)}).optional(),fit:h(["cover","contain"]).optional(),captionVisibility:h(["visible","hidden"]).optional().describe("Video media clip only. Hide native captions while this clip is topmost and covers the lower picture, or when an opaque, effect-free clip has an explicitly full-frame region, even with fit:contain. Caption words and timings remain stored and resume when another visible clip takes over."),effects:y(c({primitiveId:n().min(1),params:O(n(),L()).optional()})).optional(),transitionIn:c({type:n().min(1),duration:i().gt(SR)}).optional(),linkGroupId:n().min(1).optional(),animate:O(n(),y(c({time:i().min(zR),value:i(),easing:E([h(["linear","ease","easeIn","easeOut","easeInOut"]),c({cubicBezier:H([i(),i(),i(),i()])})]).optional()})).min(TR)).optional().describe("Keyframe channels, clip-relative seconds. Each channel's values use the SAME unit as the scalar it animates: `opacity` 0 to 1, `scale` a multiplier (>0), `rotation` degrees, `position.x`/`position.y` a FRACTION of the frame like `position` (0.5 = centre; NOT pixels), `volume` 0 to 4.")})).max(ER).optional().describe("Client-authored graphic clips the Director must carry VERBATIM: seeded into the design loop's base composition as LOCKED clips (never re-authored, never discarded)."),exclusions:y(fo).max(CR).optional(),gates:xo.optional(),audio:mo.optional()});var RR=-9007199254740991,wR=9007199254740991,vm=c({composeUsd:i(),renderUsdPerExport:i(),estimatedJourneyUsd:i().describe("compose + expected renders \u2014 relay this BEFORE composing."),revisionCyclesIncluded:A().min(RR).max(wR).describe("Revise cycles the compose price includes per gate (A1). Beyond this, resume(revise) is refused with `revision_cycles_exhausted` \u2014 saying no never silently charges.")});var OR=200,MR=2e3,kR=500,PR=100,LR=0,DR=3600,vR=500,FR=500,NR=35,_R=500,BR=2e3,jR=24,VR=24,UR=12,HR=24,WR=0,$R=0,GR=0,KR=0,qR=0,YR=0,QR=0,JR=4,ZR=0,XR=0,ew=0,tw=0,ow=0,rw=0,sw=0,nw=0,iw=0,aw=1,cw=0,pw=1,dw=.1,lw=1,uw=0,mw=0,hw=-.3,fw=.3,xw=-.3,gw=.3,bw=0,yw=1,Aw=0,Sw=1,zw=-.3,Tw=.3,Ew=0,Cw=1,Iw=0,Rw=-1,ww=2,Ow=-1,Mw=2,kw=0,Pw=1,Lw=0,Dw=1,vw=0,Fw=1,Nw=0,_w=1,Bw=0,jw=0,Vw=2,Uw=16,Hw=8,Xa=c({id:n(),projectId:n(),kind:h(["authored","clip"]).describe("authored = create_brief; clip = minted by suggest_briefs from an AI clip suggestion."),sourceSuggestionId:n().optional().describe("kind:'clip' provenance \u2014 the suggestion this Brief was minted from."),name:n().max(OR).optional(),goal:n().min(1).max(MR).describe("What the video must accomplish."),audience:n().max(kR).optional(),platform:n().max(PR).optional(),format:ye.optional(),durationSec:i().gt(LR).max(DR).optional().describe("Target output duration. HONOR-OR-REFUSE: compose validates it against the beat-source window (\xB11.5s) and refuses a brief it cannot honor."),tone:n().max(vR).optional(),cta:n().max(FR).optional(),locale:n().max(NR).optional().describe("Output language (BCP-47 tag, e.g. 'es-419'): ALL on-screen copy + captions."),hook:n().max(_R).optional(),caption:n().max(BR).optional(),beats:y(ho).max(jR).optional(),mustIncludes:y(n().min(1)).max(VR).optional(),references:y(n()).max(UR).optional(),captions:c({styleId:n().min(1).optional().describe("Caption style id (e.g. 'serif-emphasis@1')."),emphasisPhrases:y(n().min(1)).max(HR).optional().describe("Phrases rendered in the caption EMPHASIS style (the big-serif treatment). Matched against the transcript; drives CaptionWord.emphasis.")}).optional(),motionStyle:c({textAnimation:n().optional(),transitions:n().optional(),colorMood:n().optional(),captionStyle:n().optional()}).optional(),seededGraphics:y(c({id:n().min(1),startTime:i().min(WR).describe("Timeline start (seconds)."),duration:i().gt($R).describe("Clip duration (seconds)."),source:E([c({kind:b("media"),mediaId:n().min(1),trim:c({start:i().min(GR).describe("Source trim start (seconds)."),end:i().min(KR).describe("Source trim end (seconds).")}).optional(),excludedRanges:y(c({start:i().min(qR),end:i().min(YR),reason:n().optional()})).optional(),volume:i().min(QR).max(JR).optional(),muted:P().optional(),playbackRate:i().gt(ZR).optional(),sync:h(["video","independent"]).optional(),kenBurns:h(["in","out","pan-l","pan-r","none"]).optional(),volumeDb:i().optional(),fadeInMs:i().min(XR).optional(),fadeOutMs:i().min(ew).optional(),loop:P().optional(),audioRole:h(["sfx","music","vo","ambience"]).optional(),duck:c({duckDb:i().max(tw),attackMs:i().min(ow),releaseMs:i().min(rw),windows:y(c({startMs:i(),endMs:i()})).optional()}).optional(),anchor:c({clipId:n().min(1),offsetMs:i()}).optional(),reframe:c({segments:y(c({startSec:i().min(sw).describe("Segment START in seconds, clip-relative. Segments tile the clip's duration in order."),endSec:i().gt(nw).describe("Segment END in seconds, clip-relative. The span (endSec \u2212 startSec) is this segment's duration \u2014 the window `ease` ramps over."),focus:E([c({mode:b("frame-center")}),c({mode:b("point"),x:i().min(iw).max(aw),y:i().min(cw).max(pw)}),c({mode:b("face"),faceId:n().min(1),shotScale:h(["close","standard","wide"]).optional()}),c({mode:b("all-faces")}),c({mode:b("active-speaker")})]).describe("WHO/WHAT the camera tracks this segment (the reframe center), selected by `mode`: `frame-center` = no tracking, hold the geometric center (static/graphic footage, or a pure zoom); `point` = lock to a fixed source-normalized {x,y} (a non-moving on-screen element); `face` = track a detected face by `faceId` (from get_media_context), with optional `shotScale` close|standard|wide for tightness; `all-faces` = frame the bounding box of every detected face (group/ensemble shots); `active-speaker` = follow whoever is speaking (diarized talking-head / podcast). Pick by what the beat is about; pair with `zoom` for how tight."),intent:n().optional().describe("Optional editorial LABEL for diff/log readability (e.g. 'speaker-tight', 'wide-context'). Cosmetic \u2014 NOT honored by the derive math and excluded from the variant cache key."),zoom:i().min(dw).max(lw).optional().describe("How TIGHT the framing is \u2014 the fraction of the source the output viewport shows. <1 punches IN (a smaller source fraction, magnified to fill the frame); 1 = the full frame (no crop). ~0.6\u20130.8 is a moderate push-in, ~0.5 a tight close-up, 0.1 the maximum zoom. There is NO zoom-OUT past the full frame (max 1). Omit for the full frame. MUTUALLY EXCLUSIVE with `focus.shotScale` \u2014 a face-tracked shot is sized EITHER by the editorial scale (shotScale, which the bake calibrates to the detected face) OR by an explicit zoom, never both. A segment carrying both is REJECTED: shotScale wins at bake time and the zoom would be silently discarded."),ease:c({in:i().min(uw).describe("Ease-IN ramp DURATION in seconds at the segment START."),out:i().min(mw).describe("Ease-OUT ramp DURATION in seconds at the segment END.")}).optional().describe("Zoom/center ramp DURATIONS in SECONDS at this segment's edges \u2014 NOT a unitless 0\u20131 curve. ~0.3\u20130.6s reads as a snappy push; >1s reads sluggish. Keep `in` + `out` \u2264 the segment's duration (endSec \u2212 startSec): the two edges share the span, so to ramp across the WHOLE segment set one edge to the full duration and the other to 0. Omit for an instant cut to this framing."),bias:c({x:i().min(hw).max(fw).describe("Horizontal nudge, source-normalized (+ = right)."),y:i().min(xw).max(gw).describe("Vertical nudge, source-normalized (+ = down).")}).optional().describe("Optional FINE framing nudge off the focus center, source-normalized in [\u22120.3, 0.3]. A small correction (headroom, rule-of-thirds), NOT a reframe \u2014 use `focus`/`zoom` for the actual shot. Omit (treated as 0) to sit dead-center on the focus.")})).min(1)}).optional()}),c({kind:b("component"),componentId:n().min(1),props:O(n(),L()),assets:O(n(),n().min(1)).optional().describe("Manifest asset slot \u2192 project media id. At mount each slot arrives as `assets[slot].handle`, a fetchable URL for <Img>/<Video>/<Audio>; `props` becomes `params` and never carries an asset URL."),zPlane:h(["front","behind-subject"]).optional()}),c({kind:b("overlay"),primitiveId:n().min(1),params:O(n(),L()),zPlane:h(["front","behind-subject"]).optional(),anchor:c({space:b("scene"),x:i().min(bw).max(yw),y:i().min(Aw).max(Sw)}).optional(),parallax:i().min(zw).max(Tw).optional()}),c({kind:b("effect"),primitiveId:n().min(1),params:O(n(),L()).optional()}),c({kind:b("card"),html:n().min(1).describe("Your card's HTML \u2014 rendered VERBATIM as the graphic (shell motion via applyMotionPreset in a FOLLOWING call). CANVAS CONTRACT: the card renders in a viewport equal to the composition format's pixel frame (1080\xD71920 at 9:16 fhd); the root is NOT auto-pinned \u2014 declare explicit width/height matching the frame (box-sizing:border-box) and anchor content with flex/grid; position:absolute;inset:0 on the root does NOT fill the frame; for edge-to-edge backgrounds add an inner absolutely-positioned layer with generous negative inset. Overlay compositing applies a ~92% safe-area inset \u2014 keep critical copy away from the extreme edges. FONTS: name a family from GET /v1/fonts (list_render_fonts) \u2014 the renderer loads those faces for the card and waits for them, so `font-family: Inter` draws Inter. `@import` and remote font files are REFUSED: the card renders with no network. A family that is not on that list has no bytes behind it and the browser falls back, so end any stack with a generic (`Inter, sans-serif`) rather than relying on a system face being present."),tokens:O(n(),n()).optional(),zPlane:b("front").optional()})]),kind:h(["video","audio","image","overlay","effect"]).optional(),opacity:i().min(Ew).max(Cw).optional(),scale:i().gt(Iw).optional(),rotation:i().optional(),position:c({x:i().min(Rw).max(ww),y:i().min(Ow).max(Mw)}).optional().describe("Clip CENTRE as a fraction of the frame: {x:0.5,y:0.5} is dead centre, 0 to 1 is inside the frame, and a little overshoot (down to -1, up to 2) is how an entrance starts off-canvas. NOT pixels: the renderer maps x to `left: x*100%`, so `x: 180` sits 180 frame-widths away and draws nothing."),region:c({x:i().min(kw).max(Pw),y:i().min(Lw).max(Dw),w:i().gt(vw).max(Fw),h:i().gt(Nw).max(_w)}).optional(),fit:h(["cover","contain"]).optional(),captionVisibility:h(["visible","hidden"]).optional().describe("Video media clip only. Hide native captions while this clip is topmost and covers the lower picture, or when an opaque, effect-free clip has an explicitly full-frame region, even with fit:contain. Caption words and timings remain stored and resume when another visible clip takes over."),effects:y(c({primitiveId:n().min(1),params:O(n(),L()).optional()})).optional(),transitionIn:c({type:n().min(1),duration:i().gt(Bw)}).optional(),linkGroupId:n().min(1).optional(),animate:O(n(),y(c({time:i().min(jw),value:i(),easing:E([h(["linear","ease","easeIn","easeOut","easeInOut"]),c({cubicBezier:H([i(),i(),i(),i()])})]).optional()})).min(Vw)).optional().describe("Keyframe channels, clip-relative seconds. Each channel's values use the SAME unit as the scalar it animates: `opacity` 0 to 1, `scale` a multiplier (>0), `rotation` degrees, `position.x`/`position.y` a FRACTION of the frame like `position` (0.5 = centre; NOT pixels), `volume` 0 to 4.")})).max(Uw).optional().describe("Client-authored graphic clips the Director must carry VERBATIM: seeded into the design loop's base composition as LOCKED clips (never re-authored, never discarded)."),exclusions:y(fo).max(Hw).optional(),gates:xo.optional(),audio:mo.optional(),quote:vm,createdAt:i(),updatedAt:i()});var Ww=c({data:y(Xa),pagination:be});var $w=200,Gw=2e3,Kw=500,qw=100,Yw=0,Qw=3600,Jw=500,Zw=500,Xw=35,eO=500,tO=2e3,oO=24,rO=24,sO=12,nO=24,iO=0,aO=0,cO=0,pO=0,dO=0,lO=0,uO=0,mO=4,hO=0,fO=0,xO=0,gO=0,bO=0,yO=0,AO=0,SO=0,zO=0,TO=1,EO=0,CO=1,IO=.1,RO=1,wO=0,OO=0,MO=-.3,kO=.3,PO=-.3,LO=.3,DO=0,vO=1,FO=0,NO=1,_O=-.3,BO=.3,jO=0,VO=1,UO=0,HO=-1,WO=2,$O=-1,GO=2,KO=0,qO=1,YO=0,QO=1,JO=0,ZO=1,XO=0,eM=1,tM=0,oM=0,rM=2,sM=16,nM=8,iM=c({name:n().max($w).optional(),goal:n().min(1).max(Gw).optional().describe("What the video must accomplish."),audience:n().max(Kw).optional(),platform:n().max(qw).optional(),format:ye.optional(),durationSec:i().gt(Yw).max(Qw).optional().describe("Target output duration. HONOR-OR-REFUSE: compose validates it against the beat-source window (\xB11.5s) and refuses a brief it cannot honor."),tone:n().max(Jw).optional(),cta:n().max(Zw).optional(),locale:n().max(Xw).optional().describe("Output language (BCP-47 tag, e.g. 'es-419'): ALL on-screen copy + captions."),hook:n().max(eO).optional(),caption:n().max(tO).optional(),beats:y(ho).max(oO).optional(),mustIncludes:y(n().min(1)).max(rO).optional(),references:y(n()).max(sO).optional(),captions:c({styleId:n().min(1).optional().describe("Caption style id (e.g. 'serif-emphasis@1')."),emphasisPhrases:y(n().min(1)).max(nO).optional().describe("Phrases rendered in the caption EMPHASIS style (the big-serif treatment). Matched against the transcript; drives CaptionWord.emphasis.")}).optional(),motionStyle:c({textAnimation:n().optional(),transitions:n().optional(),colorMood:n().optional(),captionStyle:n().optional()}).optional(),seededGraphics:y(c({id:n().min(1),startTime:i().min(iO).describe("Timeline start (seconds)."),duration:i().gt(aO).describe("Clip duration (seconds)."),source:E([c({kind:b("media"),mediaId:n().min(1),trim:c({start:i().min(cO).describe("Source trim start (seconds)."),end:i().min(pO).describe("Source trim end (seconds).")}).optional(),excludedRanges:y(c({start:i().min(dO),end:i().min(lO),reason:n().optional()})).optional(),volume:i().min(uO).max(mO).optional(),muted:P().optional(),playbackRate:i().gt(hO).optional(),sync:h(["video","independent"]).optional(),kenBurns:h(["in","out","pan-l","pan-r","none"]).optional(),volumeDb:i().optional(),fadeInMs:i().min(fO).optional(),fadeOutMs:i().min(xO).optional(),loop:P().optional(),audioRole:h(["sfx","music","vo","ambience"]).optional(),duck:c({duckDb:i().max(gO),attackMs:i().min(bO),releaseMs:i().min(yO),windows:y(c({startMs:i(),endMs:i()})).optional()}).optional(),anchor:c({clipId:n().min(1),offsetMs:i()}).optional(),reframe:c({segments:y(c({startSec:i().min(AO).describe("Segment START in seconds, clip-relative. Segments tile the clip's duration in order."),endSec:i().gt(SO).describe("Segment END in seconds, clip-relative. The span (endSec \u2212 startSec) is this segment's duration \u2014 the window `ease` ramps over."),focus:E([c({mode:b("frame-center")}),c({mode:b("point"),x:i().min(zO).max(TO),y:i().min(EO).max(CO)}),c({mode:b("face"),faceId:n().min(1),shotScale:h(["close","standard","wide"]).optional()}),c({mode:b("all-faces")}),c({mode:b("active-speaker")})]).describe("WHO/WHAT the camera tracks this segment (the reframe center), selected by `mode`: `frame-center` = no tracking, hold the geometric center (static/graphic footage, or a pure zoom); `point` = lock to a fixed source-normalized {x,y} (a non-moving on-screen element); `face` = track a detected face by `faceId` (from get_media_context), with optional `shotScale` close|standard|wide for tightness; `all-faces` = frame the bounding box of every detected face (group/ensemble shots); `active-speaker` = follow whoever is speaking (diarized talking-head / podcast). Pick by what the beat is about; pair with `zoom` for how tight."),intent:n().optional().describe("Optional editorial LABEL for diff/log readability (e.g. 'speaker-tight', 'wide-context'). Cosmetic \u2014 NOT honored by the derive math and excluded from the variant cache key."),zoom:i().min(IO).max(RO).optional().describe("How TIGHT the framing is \u2014 the fraction of the source the output viewport shows. <1 punches IN (a smaller source fraction, magnified to fill the frame); 1 = the full frame (no crop). ~0.6\u20130.8 is a moderate push-in, ~0.5 a tight close-up, 0.1 the maximum zoom. There is NO zoom-OUT past the full frame (max 1). Omit for the full frame. MUTUALLY EXCLUSIVE with `focus.shotScale` \u2014 a face-tracked shot is sized EITHER by the editorial scale (shotScale, which the bake calibrates to the detected face) OR by an explicit zoom, never both. A segment carrying both is REJECTED: shotScale wins at bake time and the zoom would be silently discarded."),ease:c({in:i().min(wO).describe("Ease-IN ramp DURATION in seconds at the segment START."),out:i().min(OO).describe("Ease-OUT ramp DURATION in seconds at the segment END.")}).optional().describe("Zoom/center ramp DURATIONS in SECONDS at this segment's edges \u2014 NOT a unitless 0\u20131 curve. ~0.3\u20130.6s reads as a snappy push; >1s reads sluggish. Keep `in` + `out` \u2264 the segment's duration (endSec \u2212 startSec): the two edges share the span, so to ramp across the WHOLE segment set one edge to the full duration and the other to 0. Omit for an instant cut to this framing."),bias:c({x:i().min(MO).max(kO).describe("Horizontal nudge, source-normalized (+ = right)."),y:i().min(PO).max(LO).describe("Vertical nudge, source-normalized (+ = down).")}).optional().describe("Optional FINE framing nudge off the focus center, source-normalized in [\u22120.3, 0.3]. A small correction (headroom, rule-of-thirds), NOT a reframe \u2014 use `focus`/`zoom` for the actual shot. Omit (treated as 0) to sit dead-center on the focus.")})).min(1)}).optional()}),c({kind:b("component"),componentId:n().min(1),props:O(n(),L()),assets:O(n(),n().min(1)).optional().describe("Manifest asset slot \u2192 project media id. At mount each slot arrives as `assets[slot].handle`, a fetchable URL for <Img>/<Video>/<Audio>; `props` becomes `params` and never carries an asset URL."),zPlane:h(["front","behind-subject"]).optional()}),c({kind:b("overlay"),primitiveId:n().min(1),params:O(n(),L()),zPlane:h(["front","behind-subject"]).optional(),anchor:c({space:b("scene"),x:i().min(DO).max(vO),y:i().min(FO).max(NO)}).optional(),parallax:i().min(_O).max(BO).optional()}),c({kind:b("effect"),primitiveId:n().min(1),params:O(n(),L()).optional()}),c({kind:b("card"),html:n().min(1).describe("Your card's HTML \u2014 rendered VERBATIM as the graphic (shell motion via applyMotionPreset in a FOLLOWING call). CANVAS CONTRACT: the card renders in a viewport equal to the composition format's pixel frame (1080\xD71920 at 9:16 fhd); the root is NOT auto-pinned \u2014 declare explicit width/height matching the frame (box-sizing:border-box) and anchor content with flex/grid; position:absolute;inset:0 on the root does NOT fill the frame; for edge-to-edge backgrounds add an inner absolutely-positioned layer with generous negative inset. Overlay compositing applies a ~92% safe-area inset \u2014 keep critical copy away from the extreme edges. FONTS: name a family from GET /v1/fonts (list_render_fonts) \u2014 the renderer loads those faces for the card and waits for them, so `font-family: Inter` draws Inter. `@import` and remote font files are REFUSED: the card renders with no network. A family that is not on that list has no bytes behind it and the browser falls back, so end any stack with a generic (`Inter, sans-serif`) rather than relying on a system face being present."),tokens:O(n(),n()).optional(),zPlane:b("front").optional()})]),kind:h(["video","audio","image","overlay","effect"]).optional(),opacity:i().min(jO).max(VO).optional(),scale:i().gt(UO).optional(),rotation:i().optional(),position:c({x:i().min(HO).max(WO),y:i().min($O).max(GO)}).optional().describe("Clip CENTRE as a fraction of the frame: {x:0.5,y:0.5} is dead centre, 0 to 1 is inside the frame, and a little overshoot (down to -1, up to 2) is how an entrance starts off-canvas. NOT pixels: the renderer maps x to `left: x*100%`, so `x: 180` sits 180 frame-widths away and draws nothing."),region:c({x:i().min(KO).max(qO),y:i().min(YO).max(QO),w:i().gt(JO).max(ZO),h:i().gt(XO).max(eM)}).optional(),fit:h(["cover","contain"]).optional(),captionVisibility:h(["visible","hidden"]).optional().describe("Video media clip only. Hide native captions while this clip is topmost and covers the lower picture, or when an opaque, effect-free clip has an explicitly full-frame region, even with fit:contain. Caption words and timings remain stored and resume when another visible clip takes over."),effects:y(c({primitiveId:n().min(1),params:O(n(),L()).optional()})).optional(),transitionIn:c({type:n().min(1),duration:i().gt(tM)}).optional(),linkGroupId:n().min(1).optional(),animate:O(n(),y(c({time:i().min(oM),value:i(),easing:E([h(["linear","ease","easeIn","easeOut","easeInOut"]),c({cubicBezier:H([i(),i(),i(),i()])})]).optional()})).min(rM)).optional().describe("Keyframe channels, clip-relative seconds. Each channel's values use the SAME unit as the scalar it animates: `opacity` 0 to 1, `scale` a multiplier (>0), `rotation` degrees, `position.x`/`position.y` a FRACTION of the frame like `position` (0.5 = centre; NOT pixels), `volume` 0 to 4.")})).max(sM).optional().describe("Client-authored graphic clips the Director must carry VERBATIM: seeded into the design loop's base composition as LOCKED clips (never re-authored, never discarded)."),exclusions:y(fo).max(nM).optional(),gates:xo.optional(),audio:mo.optional()});var aM="month",cM=c({plan:h(["credit_pack_10","credit_pack_30","credit_pack_100"]).describe("Plan tier to subscribe to."),interval:h(["month","year"]).default(aM).describe("Billing interval: 'month' (monthly) or 'year' (annual, ~2 months free).")});var pM=c({url:n().describe("Hosted Stripe checkout URL to open in a browser to complete payment. Always present on success \u2014 an existing saved card is never charged without confirming here."),plan:n(),interval:n(),productId:n().describe("Resolved billing catalog product id.")});var dM=0,lM=9007199254740991,uM=2e3,Fm=c({anchor:E([c({beatId:n().min(1)}),c({timecodeMs:A().min(dM).max(lM)})]).describe("What the comment is about: a plan beat (content gate) or a timecode on the artifact (layout/motion gates)."),verdict:h(["approve","revise","lock"]).describe("Per-anchor verdict under the single gate decision. `lock` = contractually frozen \u2014 the director touching a locked element is a defect, surfaced as a lock_violation verdict on the next packet (the no-discard machinery)."),note:n().max(uM).optional()});var vs=c({thisStepUsd:i().describe("What approving costs NEXT (the render at the final gate; $0 earlier)."),jobSpendSoFarUsd:i().describe("What has SETTLED so far \u2014 $0 while the run is live (compose is charge-on-delivery on both rails), so abandoning at a gate charges nothing."),estimatedJourneyTotalUsd:i().describe("The same journey number the Brief quoted.")});var Fs=h(["content","layout","motion"]);var mM=-9007199254740991,hM=9007199254740991,fM=-9007199254740991,xM=9007199254740991,ec=c({id:n(),projectId:n(),composeJobId:n().optional(),briefId:n().optional(),kind:h(["gate","score"]),stage:Fs.optional(),version:A().min(mM).max(hM),status:h(["awaiting","approved","revised","abandoned","expired","superseded"]),artifact:L().describe("The stage artifact under review: the locked ComposePlan at content; the composition wire shape at layout/motion; the judged composition snapshot on kind:'score'."),stillUrls:y(n()).optional().describe("Presigned storyboard/eval stills \u2014 the packet's visual evidence (may be GC'd by the retention sweep after the job goes terminal; the decision record is immortal)."),criticVerdicts:L().optional().describe("Per-criterion scores + critique from the design loop / judge, incl. lock_violation entries."),quote:vs.optional(),revisionCycle:A().min(fM).max(xM).describe("Revise cycles this gate has consumed. The brief quote states the included count (revisionCyclesIncluded); beyond it, resume(revise) is refused with a typed error."),decision:L().optional().describe("The recorded decision {decision, comments?, globalNote?, decidedAt} once resolved."),reviewMode:h(["agent","hosted"]).optional().describe("How this packet is decided (from the Brief's gates). 'hosted' = the review PAGE captures the decision; absent/'agent' = the decision flows back through the driving agent."),reviewUrl:n().optional().describe("Hosted review-page URL (present when reviewMode is 'hosted') \u2014 a human decides from this link, no account or agent session; the recorded decision rides the SAME resume rail, and the agent learns of it via checkpoint webhooks / wait_job."),createdAt:i(),updatedAt:i()});var gM=c({data:y(ec),pagination:be});var bM=24,yM=4e3,AM=c({decision:h(["approve","revise","abandon"]).describe("The ONE verdict for this gate (GitHub review grammar). approve = proceed (comments allowed \u2014 they record as taste signal without gating); revise = the director revises per comments/edits and RE-PRESENTS this same gate (in-job, no re-meter); abandon = end the run."),comments:y(Fm).max(bM).optional(),edits:L().optional().describe("Your edited stage artifact (the power path). With edits the re-presented packet carries exactly what you supplied; with comments alone the director re-authors scoped by them."),globalNote:n().max(yM).optional()}).describe("POST /checkpoints/:id/resume body \u2014 the A1 review grammar.");var SM=c({ok:b(!0)}).describe("POST /checkpoints/:id/resume response.");var Mye=c({ok:P()});var Pye=c({etag:n()});var zM=0,TM=64,EM=0,CM=64,IM=1,RM=0,wM=1,OM=1,MM=0,kM=1,Qe=c({version:b(2),assets:O(n(),c({kind:h(["image","video","audio","data"]),required:P(),mimeTypes:y(n().min(1)).min(1).optional(),mediaDemand:E([c({mode:b("original")}),c({mode:b("tier"),tier:E([b(256),b(512),b(1024),b(2048)])}),c({mode:b("auto"),maxProjectedWidthRatio:i().gt(zM).max(TM),maxProjectedHeightRatio:i().gt(EM).max(CM),minVisibleSourceWidthRatio:i().gt(RM).max(wM).default(IM),minVisibleSourceHeightRatio:i().gt(MM).max(kM).default(OM)})]).optional()})),graphics:c({api:h(["canvas2d","webgl","webgl2","webgpu"]),required:b(!0),accelerationPreference:h(["hardware-preferred","software-allowed"])}),alphaPolicy:h(["requires-transparency","allows-opaque"]),sceneShot:c({version:b(2)}).optional()});var PM=200,LM=200,DM=2e3,vM=200,FM=0,NM=c({componentId:n().min(1).max(PM).describe("Caller-chosen stable component id. On create it names the new component. On PUT/PATCH it is optional and, when present, must equal the id in the path; a mismatch is a 400 naming both."),tsxSource:n().min(1),name:n().min(1).max(LM),description:n().max(DM),category:h(["text","effects","transitions","layouts","backgrounds","ui-blocks","scenes"]),propSchema:O(n(),L()).optional(),origin:h(["customer-owned","server-native"]).optional(),ejectedFrom:n().max(vM).optional(),tokens:O(n(),L()).optional(),examples:y(O(n(),L())).optional().describe("Usage examples, as authored. A built-in primitive projects {name, mood?, params?, description?}; an authored component's examples are whatever it wrote, which is why the item is open. One shape for both directions: what you write here is what you read back."),durationInFrames:i().gt(FM).optional(),manifest:Qe}).describe("POST /components body. Org/user are server-resolved; never accepted from the body.");var Ns=c({clipSourceKind:h(["overlay","effect","component"]).describe("The ClipSource `kind` to author this entry as: 'overlay' (built-in text/ui/scene/background/layout), 'effect' (built-in effect/transition), or 'component' (an org-INSTALLED custom component)."),refField:h(["primitiveId","componentId"]).describe("Which id field keys the ClipSource: 'primitiveId' for built-ins (source:'default'), 'componentId' for installed components (source:'installed'). Using the wrong field will NOT resolve at render.")});var _s=c({aspectRatio:h(["16:9","9:16","1:1","4:5"]),fps:E([b(24),b(25),b(30),b(60)]).optional(),resolution:h(["hd","fhd","4k"]).optional()});var _M=200,BM=2e3,jM=200,VM=0,tc=c({name:n().min(1).max(_M),description:n().max(BM),category:h(["text","effects","transitions","layouts","backgrounds","ui-blocks","scenes"]),propSchema:O(n(),L()),origin:h(["customer-owned","server-native"]).optional(),ejectedFrom:n().max(jM).optional(),tokens:O(n(),L()).optional(),examples:y(O(n(),L())).optional().describe("Usage examples, as authored. A built-in primitive projects {name, mood?, params?, description?}; an authored component's examples are whatever it wrote, which is why the item is open. One shape for both directions: what you write here is what you read back."),durationInFrames:i().gt(VM).optional(),manifest:Qe.optional().describe("The stored runtime manifest (assets, graphics API, alpha policy) of an org-INSTALLED component: the same object the create/update body takes, so a manifest read back here can be written back unchanged. Built-in defaults have no stored manifest and omit it. Its `version` is always 2 (the contract version), unlike the entry's semver `version`."),id:n().describe("The entry's id: a `primitiveId` for a built-in, a `componentId` for an installed component."),source:h(["default","installed"]).describe("'default' = built-in primitive (place by primitiveId); 'installed' = org-authored component (place by componentId)."),kind:h(["component","transition","scene"]).describe("RENDER kind (component | transition | scene). NOT the ClipSource variant \u2014 see `placement` for how to author it on the timeline."),version:n().describe("The ENTRY's version: a semver string ('0.0.0' until an authored component is versioned). Distinct from `manifest.version`, which is the runtime contract version and is always the literal 2."),propDefaults:O(n(),L()).optional(),textParam:n().nullish().describe("The param field that carries this primitive's primary text; null = no single text slot."),subtextParam:n().nullish().describe("The param field for secondary text (subtitle/byline); null = none."),format:_s.optional(),intent:n().optional().describe("Selection signal: a verb naming what this primitive accomplishes (e.g. 'product-trailer'). Match it to the beat you are authoring."),useWhen:n().optional().describe("When to use this \u2014 AND when not to. The negative guidance is load-bearing; read it before picking."),pairsWith:y(n()).optional().describe("Authoring guidance: ids of primitives that COMPOSE well with this one in the same edit."),avoidWith:y(n()).optional().describe("Authoring guidance: ids of primitives that CONFLICT with this one \u2014 do not place together."),tags:y(n()).optional().describe("Free-text search keywords."),mood:y(n()).optional().describe("Vibe/tone tags (e.g. 'cinematic', 'minimal'). Filter to match the edit's mood."),tier:h(["recommended","standard","niche"]).optional().describe("Quality/applicability RANKING (a preference, not a flag). Prefer 'recommended'; reach for 'niche' only when its specific use-case is exactly the beat."),useCase:y(h(["intro","outro","full-scene","title-over-footage","transition","background","grade","emphasis","explainer","social-cut"])).optional().describe("The edit ROLE(s) this primitive fills \u2014 the dimension to filter by for a beat (e.g. 'intro', 'title-over-footage', 'grade')."),fixedCopy:y(n()).optional().describe("On-screen strings this primitive BAKES \u2014 the read-side counterpart to propSchema. These literals render REGARDLESS of params (no param can change them); fork the source via get_component_source to edit them. Use this to see at author time what fixed copy (someone-else's marketing text, faux-code, faux-data) will appear before you render."),brandBindings:y(c({param:n(),brandToken:n()})).optional().describe("Params that can follow the project brand kit. Each {param, brandToken} says: set `param` to `brandToken` (a `$brand:` ref, e.g. '$brand:colors.accent') to track the brand instead of a literal. See the list response's `brandTokens` for the full ref vocabulary. Omitted when nothing is brand-bound."),placement:Ns.describe("How to author this entry as a ClipSource via apply_composition: the exact ClipSource `kind` + the id field to key it by. Built-ins place as {kind:'overlay'|'effect', primitiveId}; installed components place as {kind:'component', componentId}. A kind:'scene' primitive has no 'scene' ClipSource \u2014 it is placed as {kind:'overlay', primitiveId}."),warnings:y(n()).optional().describe("Non-blocking save-time advisories \u2014 the create/update SUCCEEDED. Currently: a `fontFamily` string literal referencing a NON-vendored font (a bare CSS generic like 'serif', or an unknown named family like 'Arial') whose LIVE-lane pixels vary by render host \u2014 re-author with a vendored family or 'Georgia'. Omitted when there is nothing to flag; only present on the create/update responses.")}).describe("Component catalog entry per \xA7Components.");var Nm=c({soundId:n().describe("Stable sound-pack item id."),family:h(["tick","pop","impact","confirm","error","whoosh","riser"]).describe("Editorial family the compose sfx pass binds by."),envelopeClass:h(["transient","sweep","ambient"]).describe("Coarse envelope shape \u2014 the browse grouping."),intensity:h(["subtle","standard","strong"]),durationSec:i().describe("Duration of the mastered asset (seconds)."),description:n().describe("One-line human-legible caption."),attribution:n().describe("CC0 provenance string.")});var UM=c({data:y(tc),pagination:be,brandTokens:y(n()).optional().describe("Catalog-level reference: the valid `$brand:` token refs a param value may carry (e.g. accentColor: \"$brand:colors.accent\"). Colors + fonts are the common bindings; the full design-token vocabulary is listed. Derived from the brand kit resolver so it can't drift. See each entry's `brandBindings` for which params are brand-bound by default."),sfx:y(Nm).optional().describe("Catalog-level reference: the curated CC0 SFX pack (closed, versioned). The compose sfx pass places these deterministically; this is the pack-only structural inventory to pick a `soundId` by family. Present on the first page only."),audio:y(Pm).optional().describe(`The UNIFIED org sound palette (audio-substrate Phase 2): the curated packs (SFX + music beds) unioned with THIS org's own uploads/imports (source:"org") and generated audio (source:"generated"), one uniform entry shape carrying role + envelopeClass + provenance + license; music entries carry bpm. Prefer an org sound when it fits \u2014 an org that uploads its product's real UI sounds hears ITS product. Present on the first page only.`)});var HM=200,WM=200,$M=2e3,GM=200,KM=0,qM=c({componentId:n().min(1).max(HM).optional().describe("Caller-chosen stable component id. On create it names the new component. On PUT/PATCH it is optional and, when present, must equal the id in the path; a mismatch is a 400 naming both."),tsxSource:n().min(1).optional(),name:n().min(1).max(WM).optional(),description:n().max($M).optional(),category:h(["text","effects","transitions","layouts","backgrounds","ui-blocks","scenes"]).optional(),propSchema:O(n(),L()).optional(),origin:h(["customer-owned","server-native"]).optional(),ejectedFrom:n().max(GM).optional(),tokens:O(n(),L()).optional(),examples:y(O(n(),L())).optional().describe("Usage examples, as authored. A built-in primitive projects {name, mood?, params?, description?}; an authored component's examples are whatever it wrote, which is why the item is open. One shape for both directions: what you write here is what you read back."),durationInFrames:i().gt(KM).optional(),manifest:Qe.optional(),projectId:n().min(1).optional().describe("A project whose active composition's placements of this component move to the new version in the same write. Without it no placement moves."),compositionId:n().min(1).optional().describe("With `projectId`: the composition to move instead of the project's active one.")}).describe("PATCH /components/:id body, RFC 7396 merge: a field you omit is left exactly as it was. Org/user are server-resolved; never accepted from the body.");var _m=c({artifactKind:b("image"),contentType:h(["image/png","image/jpeg"]),cached:P(),listUsd:i().optional().describe("List price charged for this delivered preview."),url:xe(),urlExpiresAt:n()});var Bm=c({artifactKind:b("motion"),contentType:b("video/webm"),cached:P(),listUsd:i().optional().describe("List price charged for this delivered preview."),url:xe(),urlExpiresAt:n()});var jm=E([_m,Bm]);var YM=0,QM=9007199254740991,JM=0,ZM=9007199254740991,XM=0,ek=120,tk=3600,ok=c({componentId:n().min(1),params:O(n(),L()).optional(),assets:O(n(),n().min(1)).optional().describe("Component asset-slot name to org mediaId. Every required manifest slot must be bound."),width:A().gt(YM).max(QM).optional(),height:A().gt(JM).max(ZM).optional(),fps:i().gt(XM).max(ek).optional().describe("Preview frame rate. When omitted, uses the project's format."),durationInFrames:A().min(1).max(tk).optional().describe("Preview frame count. When omitted, uses the component's declared duration; required if the component has none.")});var rk=200,sk=2e3,nk=200,ik=0,ak=c({tsxSource:n().min(1),name:n().min(1).max(rk),description:n().max(sk),propSchema:O(n(),L()),origin:h(["customer-owned","server-native"]).optional(),ejectedFrom:n().max(nk).optional(),tokens:O(n(),L()).optional(),examples:y(O(n(),L())).optional().describe("Usage examples, as authored. A built-in primitive projects {name, mood?, params?, description?}; an authored component's examples are whatever it wrote, which is why the item is open. One shape for both directions: what you write here is what you read back."),durationInFrames:i().gt(ik).optional(),manifest:Qe,id:n(),source:h(["default","installed"])}).describe("Installed component SOURCE (TSX) + ownership provenance per \xA7Components.");var ck=200,pk=200,dk=2e3,lk=200,uk=0,mk=c({componentId:n().min(1).max(ck).optional().describe("Caller-chosen stable component id. On create it names the new component. On PUT/PATCH it is optional and, when present, must equal the id in the path; a mismatch is a 400 naming both."),tsxSource:n().min(1).optional(),name:n().min(1).max(pk).optional(),description:n().max(dk).optional(),category:h(["text","effects","transitions","layouts","backgrounds","ui-blocks","scenes"]).optional(),propSchema:O(n(),L()).optional(),origin:h(["customer-owned","server-native"]).optional(),ejectedFrom:n().max(lk).optional(),tokens:O(n(),L()).optional(),examples:y(O(n(),L())).optional().describe("Usage examples, as authored. A built-in primitive projects {name, mood?, params?, description?}; an authored component's examples are whatever it wrote, which is why the item is open. One shape for both directions: what you write here is what you read back."),durationInFrames:i().gt(uk).optional(),manifest:Qe.optional(),projectId:n().min(1).optional().describe("A project whose active composition's placements of this component move to the new version in the same write. Without it no placement moves."),compositionId:n().min(1).optional().describe("With `projectId`: the composition to move instead of the project's active one.")}).describe("PUT /components/:id body: every writable field, all optional; an omitted field is carried forward. Org/user are server-resolved; never accepted from the body.");var hk=200,fk=2e3,xk=200,gk=0,bk=0,yk=9007199254740991,Ak=0,Sk=9007199254740991,zk=c({name:n().min(1).max(hk),description:n().max(fk),category:h(["text","effects","transitions","layouts","backgrounds","ui-blocks","scenes"]),propSchema:O(n(),L()),origin:h(["customer-owned","server-native"]).optional(),ejectedFrom:n().max(xk).optional(),tokens:O(n(),L()).optional(),examples:y(O(n(),L())).optional().describe("Usage examples, as authored. A built-in primitive projects {name, mood?, params?, description?}; an authored component's examples are whatever it wrote, which is why the item is open. One shape for both directions: what you write here is what you read back."),durationInFrames:i().gt(gk).optional(),manifest:Qe.optional().describe("The stored runtime manifest (assets, graphics API, alpha policy) of an org-INSTALLED component: the same object the create/update body takes, so a manifest read back here can be written back unchanged. Built-in defaults have no stored manifest and omit it. Its `version` is always 2 (the contract version), unlike the entry's semver `version`."),id:n().describe("The entry's id: a `primitiveId` for a built-in, a `componentId` for an installed component."),source:h(["default","installed"]).describe("'default' = built-in primitive (place by primitiveId); 'installed' = org-authored component (place by componentId)."),kind:h(["component","transition","scene"]).describe("RENDER kind (component | transition | scene). NOT the ClipSource variant \u2014 see `placement` for how to author it on the timeline."),version:n().describe("The ENTRY's version: a semver string ('0.0.0' until an authored component is versioned). Distinct from `manifest.version`, which is the runtime contract version and is always the literal 2."),propDefaults:O(n(),L()).optional(),textParam:n().nullish().describe("The param field that carries this primitive's primary text; null = no single text slot."),subtextParam:n().nullish().describe("The param field for secondary text (subtitle/byline); null = none."),format:_s.optional(),intent:n().optional().describe("Selection signal: a verb naming what this primitive accomplishes (e.g. 'product-trailer'). Match it to the beat you are authoring."),useWhen:n().optional().describe("When to use this \u2014 AND when not to. The negative guidance is load-bearing; read it before picking."),pairsWith:y(n()).optional().describe("Authoring guidance: ids of primitives that COMPOSE well with this one in the same edit."),avoidWith:y(n()).optional().describe("Authoring guidance: ids of primitives that CONFLICT with this one \u2014 do not place together."),tags:y(n()).optional().describe("Free-text search keywords."),mood:y(n()).optional().describe("Vibe/tone tags (e.g. 'cinematic', 'minimal'). Filter to match the edit's mood."),tier:h(["recommended","standard","niche"]).optional().describe("Quality/applicability RANKING (a preference, not a flag). Prefer 'recommended'; reach for 'niche' only when its specific use-case is exactly the beat."),useCase:y(h(["intro","outro","full-scene","title-over-footage","transition","background","grade","emphasis","explainer","social-cut"])).optional().describe("The edit ROLE(s) this primitive fills \u2014 the dimension to filter by for a beat (e.g. 'intro', 'title-over-footage', 'grade')."),fixedCopy:y(n()).optional().describe("On-screen strings this primitive BAKES \u2014 the read-side counterpart to propSchema. These literals render REGARDLESS of params (no param can change them); fork the source via get_component_source to edit them. Use this to see at author time what fixed copy (someone-else's marketing text, faux-code, faux-data) will appear before you render."),brandBindings:y(c({param:n(),brandToken:n()})).optional().describe("Params that can follow the project brand kit. Each {param, brandToken} says: set `param` to `brandToken` (a `$brand:` ref, e.g. '$brand:colors.accent') to track the brand instead of a literal. See the list response's `brandTokens` for the full ref vocabulary. Omitted when nothing is brand-bound."),placement:Ns.describe("How to author this entry as a ClipSource via apply_composition: the exact ClipSource `kind` + the id field to key it by. Built-ins place as {kind:'overlay'|'effect', primitiveId}; installed components place as {kind:'component', componentId}. A kind:'scene' primitive has no 'scene' ClipSource \u2014 it is placed as {kind:'overlay', primitiveId}."),warnings:y(n()).optional().describe("Non-blocking save-time advisories \u2014 the create/update SUCCEEDED. Currently: a `fontFamily` string literal referencing a NON-vendored font (a bare CSS generic like 'serif', or an unknown named family like 'Arial') whose LIVE-lane pixels vary by render host \u2014 re-author with a vendored family or 'Georgia'. Omitted when there is nothing to flag; only present on the create/update responses."),repinned:c({compositionId:n(),pins:A().min(bk).max(yk).describe("Placements in that composition moved from the previous version to this one, nested scene surfaces included."),etag:n().nullable().describe("The composition's ETag after the move; null when no pin moved.")}).optional().describe("Present when the update named `projectId`: the composition whose placements moved to the new version."),placementsPinnedToPrevious:A().min(Ak).max(Sk).describe("Placements across the org that still pin the previous version and will keep rendering it. Name `projectId` (and `compositionId`) on the update to move a composition's placements with it.")}).describe("Updated component entry plus where its placements point.");var Tk=2e3,Ek=5,Ck=0,Ik=0,Rk=10,wk=-9007199254740991,Ok=9007199254740991,Mk=64,kk=3,Pk=c({suggestionId:n().min(1).optional(),fromComposition:P().optional().describe("Reuse the project's current composition as the compose starting point (critique-retry path). The Director RE-AUTHORS graphics: if the current composition is client-authored and contains graphic clips (overlay/component/card), the request is refused (validation_error naming the clips) \u2014 render it verbatim with create_render instead. The director's own output (critique-retry) is exempt."),briefId:n().min(1).optional().describe("Compose from a persisted Brief (create_brief) \u2014 the intent-first door: every Brief field is HONORED or the request is refused loudly naming the field (window from beat moment-pinning; seeded graphics carried VERBATIM as locked clips; exclusions enforced; locale + caption emphasis threaded to the Director). Exactly ONE of suggestionId | fromComposition | briefId."),format:ye.optional().describe("Optional format override. Phase 2 ignores this \u2014 format precedence is project.compositionFormat \u2192 9:16 fhd 30fps default."),scope:L().optional().describe("RequestScope discriminated union (per compose-api-contract.md). Editor-only scopes (captions/overlay-track/broll/overlay-instance/segment) require an editor-session token; API tokens get 403 on those."),critique:n().max(Tk).optional().describe("Structured critique block (per compose-api-contract.md decision #11). Capped at 2KB total; per-criterion blocks capped at 500 chars."),parentJobId:n().optional().describe("Pointer to the prior compose job this run iterates on. Surfaced on the resulting compose job as baselineComposeJobId."),maxCandidates:A().min(1).max(Ek).optional().describe("Ensemble size. Currently pinned to 1 \u2014 the multi-candidate ensemble is disabled pending a capacity bound, so any value >1 is ignored and every compose runs a single candidate. Still accepted for forward-compat; will honor [1, 5] again once re-enabled."),budgetUsd:i().gt(Ck).optional().describe("Per-job budget cap (USD). Clamped at the route against the org's composeMaxBudgetUsdPerJob setting."),qualityThreshold:i().min(Ik).max(Rk).optional().describe("Composite-score accept threshold. Server default per contract."),seed:A().min(wk).max(Ok).optional().describe("Deterministic seed for replay."),clientNonce:n().max(Mk).optional().describe("Opaque caller token that disambiguates intentional same-critique retries. Without it, identical (project, sug, seed, critique) tuples deduplicate; with it, retries create a fresh execution."),holdAt:y(h(["content","layout","motion"])).max(kk).optional().describe("Opt-in checkpoint gates. Each named stage pauses the compose at its boundary (status \u2192 awaiting_input) for client review via resume. Absent/empty \u21D2 fully autonomous. Non-empty \u21D2 the run is a single spine.")}).describe("POST /projects/:id/compose body.");var Lk=c({composeJobId:n().describe("Opaque compose job id; pass to the SSE stream URL."),projectId:n(),status:h(["queued","failed"]).describe("queued = normal; failed = startup failed and the job is already terminal (the SSE stream will emit a single `job_failed` frame and close)."),streamUrl:n().optional().describe("Relative SSE endpoint to stream this job's events (per compose-api-contract.md).")}).describe("POST /projects/:id/compose response.");var Dk=0,vk=9007199254740991,Vm=c({mode:h(["advise","amend","explore"]),assessment:c({editorial:c({score:i(),grounding:h(["measured","judged"]),abstained:P(),reliability:i().optional()}),spatial:c({score:i(),grounding:h(["measured","judged"]),abstained:P(),reliability:i().optional()}),brand:c({score:i(),grounding:h(["measured","judged"]),abstained:P(),reliability:i().optional()}),caption:c({score:i(),grounding:h(["measured","judged"]),abstained:P(),reliability:i().optional()})}).optional().describe("Grounded critique of the CURRENT composition. Omitted for mode=advise."),proposals:y(c({label:n(),candidateIndex:A().min(Dk).max(vk).optional().describe("Present for amend/explore \u2014 adopt via POST /compose/jobs/:jobId/select with this candidateIndex. Absent for advise."),changeSummary:y(n()).describe("Human-legible edit-pattern labels."),boundToEtag:n().optional().describe("The composition etag this proposal was computed against."),expectedDelta:O(n(),n()).optional().describe("Advisory per-criterion score lift; NOT authoritative pre-recalibration.")})),principles:y(n()).describe("Reusable, grounded lessons for the client's next authoring."),plan:L().optional().describe("Present for mode=advise \u2014 the planner agent's ComposePlan (framing/cuts/captions/graphics intents) as GUIDANCE. The client agent reads it and re-authors; it is NOT converted to ops."),checkpointId:n().optional().describe("The durable kind:'score' Checkpoint minted from this advisory (evidence convergence \u2014 get_checkpoint re-reads the envelope later). Stamped at the consult success terminal.")}).describe("The advisory envelope returned by a completed consult job (on ComposeJobDetailResponse.advisoryResult).");var Fk=-9007199254740991,Nk=9007199254740991,_k=0,Bk=9007199254740991,jk=-9007199254740991,Vk=9007199254740991,Uk=c({composeJobId:n(),projectId:n(),status:h(["queued","running","awaiting_input","complete","failed","cancelled"]),error:n().nullable(),request:c({suggestionId:n().optional(),fromComposition:P().optional(),scope:L().optional(),critique:n().optional(),parentJobId:n().optional(),maxCandidates:A().min(Fk).max(Nk).optional(),budgetUsd:i().optional(),qualityThreshold:i().optional()}),candidates:y(L()),winner:E([c({candidateIndex:A().min(_k).max(Bk),compositionRunId:n()}),G()]),listUsd:i().optional(),startedAt:i(),completedAt:i().nullable(),advisoryResult:Vm.optional(),checkpoint:c({checkpointId:n(),stage:h(["content","layout","motion"]),version:A().min(jk).max(Vk)}).optional()});var Um=c({composeJobId:n(),projectId:n(),status:h(["queued","running","awaiting_input","complete","failed","cancelled"]),suggestionId:n().optional(),createdAt:i(),completedAt:i().nullable()});var Hk=c({jobs:y(Um)});var Wk=0,$k=9007199254740991,Gk=c({candidateIndex:A().min(Wk).max($k),selectStrategy:h(["agent-authoritative","editor-merge","editor-replace"]),ifMatch:n().optional()}).describe("POST /projects/:id/compose/jobs/:jobId/select body.");var Kk=0,qk=9007199254740991,Yk=c({newCompositionEtag:n(),mergeResult:c({replayedEdits:A().min(Kk).max(qk),droppedEdits:y(c({trackId:n(),clipId:n().optional(),wordStartMs:i().optional(),reason:h(["target_removed","conflict"])}))}).optional()}).describe("POST /projects/:id/compose/jobs/:jobId/select response.");var Qk=64,Jk=c({seedComposition:L().optional(),leaseJobId:n().min(1).max(Qk).optional()});var Zk=0,Xk=4,eP=0,tP=0,oP=0,rP=0,sP=0,nP=0,iP=0,aP=4,cP=0,pP=0,dP=0,lP=0,uP=0,mP=0,hP=0,fP=0,xP=0,gP=1,bP=0,yP=1,AP=.1,SP=1,zP=0,TP=0,EP=-.3,CP=.3,IP=-.3,RP=.3,wP=0,OP=1,MP=0,kP=1,PP=-.3,LP=.3,DP=0,vP=1,FP=0,NP=-1,_P=2,BP=-1,jP=2,VP=0,UP=1,HP=0,WP=1,$P=0,GP=1,KP=0,qP=1,YP=0,QP=0,JP=2,ZP=0,XP=0,e1=0,t1=0,o1=0,r1=0,s1=15,n1=100,i1=900,a1=0,c1=1,p1=0,d1=1,l1=0,u1=1,m1=0,h1=1,f1=-5,x1=20,g1=0,b1=2,y1=0,A1=2,S1=0,z1=100,T1=900,E1=0,C1=0,I1=0,R1=0,w1=.5,O1=12,M1=0,k1=100,P1=0,L1=9007199254740991,D1=0,v1=9007199254740991,F1=0,N1=9007199254740991,_1=0,B1=1,j1=0,V1=1,U1=0,H1=1,W1=0,$1=1,G1=.25,K1=4,q1=-45,Y1=45,Q1=15,J1=100,Z1=900,X1=-5,eL=20,tL=0,oL=2,rL=0,sL=2,nL=0,iL=100,aL=900,cL=0,pL=.5,dL=12,lL=0,uL=0,mL=0,hL=0,fL=9007199254740991,xL=0,gL=9007199254740991,bL=new RegExp("^[a-f0-9]{64}$"),yL=0,AL=0,SL=15,zL=100,TL=900,EL=0,CL=1,IL=0,RL=1,wL=0,OL=1,ML=0,kL=1,PL=-5,LL=20,DL=0,vL=2,FL=0,NL=2,_L=0,BL=100,jL=900,VL=0,UL=0,HL=0,WL=0,$L=.5,GL=12,KL=0,qL=100,YL=0,QL=9007199254740991,JL=0,ZL=9007199254740991,XL=0,eD=9007199254740991,tD=0,oD=1,rD=0,sD=1,nD=0,iD=1,aD=0,cD=1,pD=.25,dD=4,lD=-45,uD=45,mD=15,hD=100,fD=900,xD=-5,gD=20,bD=0,yD=2,AD=0,SD=2,zD=0,TD=100,ED=900,CD=0,ID=.5,RD=12,wD=0,OD=0,MD=0,kD=0,PD=9007199254740991,LD=0,DD=9007199254740991,vD=new RegExp("^[a-f0-9]{64}$"),oc=c({v:b(1),format:c({aspectRatio:h(["16:9","9:16","1:1","4:5"]),fps:E([b(24),b(25),b(30),b(60)]).optional(),resolution:h(["hd","fhd","4k"]).optional(),platform:n().optional()}),tracks:y(c({id:n().min(1),kind:h(["video","audio","image","overlay","effect"]),name:n().optional(),enabled:P().optional(),volume:i().min(Zk).max(Xk).optional(),contents:y(E([c({id:n().min(1),startTime:i().min(eP).describe("Timeline start (seconds)."),duration:i().gt(tP).describe("Clip duration (seconds)."),source:E([c({kind:b("media"),mediaId:n().min(1),trim:c({start:i().min(oP).describe("Source trim start (seconds)."),end:i().min(rP).describe("Source trim end (seconds).")}).optional(),excludedRanges:y(c({start:i().min(sP),end:i().min(nP),reason:n().optional()})).optional(),volume:i().min(iP).max(aP).optional(),muted:P().optional(),playbackRate:i().gt(cP).optional(),sync:h(["video","independent"]).optional(),kenBurns:h(["in","out","pan-l","pan-r","none"]).optional(),volumeDb:i().optional(),fadeInMs:i().min(pP).optional(),fadeOutMs:i().min(dP).optional(),loop:P().optional(),audioRole:h(["sfx","music","vo","ambience"]).optional(),duck:c({duckDb:i().max(lP),attackMs:i().min(uP),releaseMs:i().min(mP),windows:y(c({startMs:i(),endMs:i()})).optional()}).optional(),anchor:c({clipId:n().min(1),offsetMs:i()}).optional(),reframe:c({segments:y(c({startSec:i().min(hP).describe("Segment START in seconds, clip-relative. Segments tile the clip's duration in order."),endSec:i().gt(fP).describe("Segment END in seconds, clip-relative. The span (endSec \u2212 startSec) is this segment's duration \u2014 the window `ease` ramps over."),focus:E([c({mode:b("frame-center")}),c({mode:b("point"),x:i().min(xP).max(gP),y:i().min(bP).max(yP)}),c({mode:b("face"),faceId:n().min(1),shotScale:h(["close","standard","wide"]).optional()}),c({mode:b("all-faces")}),c({mode:b("active-speaker")})]).describe("WHO/WHAT the camera tracks this segment (the reframe center), selected by `mode`: `frame-center` = no tracking, hold the geometric center (static/graphic footage, or a pure zoom); `point` = lock to a fixed source-normalized {x,y} (a non-moving on-screen element); `face` = track a detected face by `faceId` (from get_media_context), with optional `shotScale` close|standard|wide for tightness; `all-faces` = frame the bounding box of every detected face (group/ensemble shots); `active-speaker` = follow whoever is speaking (diarized talking-head / podcast). Pick by what the beat is about; pair with `zoom` for how tight."),intent:n().optional().describe("Optional editorial LABEL for diff/log readability (e.g. 'speaker-tight', 'wide-context'). Cosmetic \u2014 NOT honored by the derive math and excluded from the variant cache key."),zoom:i().min(AP).max(SP).optional().describe("How TIGHT the framing is \u2014 the fraction of the source the output viewport shows. <1 punches IN (a smaller source fraction, magnified to fill the frame); 1 = the full frame (no crop). ~0.6\u20130.8 is a moderate push-in, ~0.5 a tight close-up, 0.1 the maximum zoom. There is NO zoom-OUT past the full frame (max 1). Omit for the full frame. MUTUALLY EXCLUSIVE with `focus.shotScale` \u2014 a face-tracked shot is sized EITHER by the editorial scale (shotScale, which the bake calibrates to the detected face) OR by an explicit zoom, never both. A segment carrying both is REJECTED: shotScale wins at bake time and the zoom would be silently discarded."),ease:c({in:i().min(zP).describe("Ease-IN ramp DURATION in seconds at the segment START."),out:i().min(TP).describe("Ease-OUT ramp DURATION in seconds at the segment END.")}).optional().describe("Zoom/center ramp DURATIONS in SECONDS at this segment's edges \u2014 NOT a unitless 0\u20131 curve. ~0.3\u20130.6s reads as a snappy push; >1s reads sluggish. Keep `in` + `out` \u2264 the segment's duration (endSec \u2212 startSec): the two edges share the span, so to ramp across the WHOLE segment set one edge to the full duration and the other to 0. Omit for an instant cut to this framing."),bias:c({x:i().min(EP).max(CP).describe("Horizontal nudge, source-normalized (+ = right)."),y:i().min(IP).max(RP).describe("Vertical nudge, source-normalized (+ = down).")}).optional().describe("Optional FINE framing nudge off the focus center, source-normalized in [\u22120.3, 0.3]. A small correction (headroom, rule-of-thirds), NOT a reframe \u2014 use `focus`/`zoom` for the actual shot. Omit (treated as 0) to sit dead-center on the focus.")})).min(1)}).optional()}),c({kind:b("component"),componentId:n().min(1),props:O(n(),L()),assets:O(n(),n().min(1)).optional().describe("Manifest asset slot \u2192 project media id. At mount each slot arrives as `assets[slot].handle`, a fetchable URL for <Img>/<Video>/<Audio>; `props` becomes `params` and never carries an asset URL."),zPlane:h(["front","behind-subject"]).optional()}),c({kind:b("overlay"),primitiveId:n().min(1),params:O(n(),L()),zPlane:h(["front","behind-subject"]).optional(),anchor:c({space:b("scene"),x:i().min(wP).max(OP),y:i().min(MP).max(kP)}).optional(),parallax:i().min(PP).max(LP).optional()}),c({kind:b("effect"),primitiveId:n().min(1),params:O(n(),L()).optional()}),c({kind:b("card"),html:n().min(1).describe("Your card's HTML \u2014 rendered VERBATIM as the graphic (shell motion via applyMotionPreset in a FOLLOWING call). CANVAS CONTRACT: the card renders in a viewport equal to the composition format's pixel frame (1080\xD71920 at 9:16 fhd); the root is NOT auto-pinned \u2014 declare explicit width/height matching the frame (box-sizing:border-box) and anchor content with flex/grid; position:absolute;inset:0 on the root does NOT fill the frame; for edge-to-edge backgrounds add an inner absolutely-positioned layer with generous negative inset. Overlay compositing applies a ~92% safe-area inset \u2014 keep critical copy away from the extreme edges. FONTS: name a family from GET /v1/fonts (list_render_fonts) \u2014 the renderer loads those faces for the card and waits for them, so `font-family: Inter` draws Inter. `@import` and remote font files are REFUSED: the card renders with no network. A family that is not on that list has no bytes behind it and the browser falls back, so end any stack with a generic (`Inter, sans-serif`) rather than relying on a system face being present."),tokens:O(n(),n()).optional(),zPlane:b("front").optional()})]),kind:h(["video","audio","image","overlay","effect"]).optional(),opacity:i().min(DP).max(vP).optional(),scale:i().gt(FP).optional(),rotation:i().optional(),position:c({x:i().min(NP).max(_P),y:i().min(BP).max(jP)}).optional().describe("Clip CENTRE as a fraction of the frame: {x:0.5,y:0.5} is dead centre, 0 to 1 is inside the frame, and a little overshoot (down to -1, up to 2) is how an entrance starts off-canvas. NOT pixels: the renderer maps x to `left: x*100%`, so `x: 180` sits 180 frame-widths away and draws nothing."),region:c({x:i().min(VP).max(UP),y:i().min(HP).max(WP),w:i().gt($P).max(GP),h:i().gt(KP).max(qP)}).optional(),fit:h(["cover","contain"]).optional(),captionVisibility:h(["visible","hidden"]).optional().describe("Video media clip only. Hide native captions while this clip is topmost and covers the lower picture, or when an opaque, effect-free clip has an explicitly full-frame region, even with fit:contain. Caption words and timings remain stored and resume when another visible clip takes over."),effects:y(c({primitiveId:n().min(1),params:O(n(),L()).optional()})).optional(),transitionIn:c({type:n().min(1),duration:i().gt(YP)}).optional(),linkGroupId:n().min(1).optional(),animate:O(n(),y(c({time:i().min(QP),value:i(),easing:E([h(["linear","ease","easeIn","easeOut","easeInOut"]),c({cubicBezier:H([i(),i(),i(),i()])})]).optional()})).min(JP)).optional().describe("Keyframe channels, clip-relative seconds. Each channel's values use the SAME unit as the scalar it animates: `opacity` 0 to 1, `scale` a multiplier (>0), `rotation` degrees, `position.x`/`position.y` a FRACTION of the frame like `position` (0.5 = centre; NOT pixels), `volume` 0 to 4.")}),c({id:n().min(1),startTime:i().min(ZP).describe("Timeline start (seconds)."),duration:i().gt(XP).describe("Gap duration (seconds).")})]))})),markers:y(c({id:n().min(1),startTime:i().min(e1),endTime:i().min(t1).optional(),kind:n().min(1),name:n().optional(),metadata:O(n(),L()).optional()})).optional(),captions:E([c({source:b("derived"),from:c({clipId:n()}),segments:y(c({words:y(c({text:n().min(1),startMs:i().min(o1).describe("Word start on the composition timeline, in milliseconds."),endMs:i().min(r1).describe("Word end on the composition timeline, in milliseconds."),emphasis:P().optional(),annotate:h(["circle","underline"]).optional()}))})),style:c({fontFamily:n().min(1).optional(),fontSize:i().min(1).max(s1).optional().describe("Font size as % of composition height (1-15, default 5). NOT px."),fontWeight:A().min(n1).max(i1).optional(),color:n().min(1).optional(),highlightColor:n().min(1).optional(),backgroundColor:n().optional(),plate:h(["glass","solid","none"]).optional(),position:h(["top","center","bottom"]).optional(),region:c({x:i().min(a1).max(c1),y:i().min(p1).max(d1),w:i().gt(l1).max(u1),h:i().gt(m1).max(h1)}).optional().describe("Optional caption layout box {x,y,w,h} in normalized output-frame coordinates. Overrides position; text starts at its top edge and wraps/pages within its width and height."),textTransform:h(["none","uppercase","capitalize"]).optional(),letterSpacing:i().min(f1).max(x1).optional().describe("Base caption glyph spacing in pixels."),wordGapEm:i().min(g1).max(b1).optional().describe("Gap between caption runs as a multiple of base font size; default 0.35."),lineGapEm:i().min(y1).max(A1).optional().describe("Gap between caption lines as a multiple of base font size; default 0.25."),emphasisColor:n().optional(),emphasisGradient:n().optional(),emphasisScale:i().gt(S1).optional(),emphasisFontFamily:n().optional(),emphasisFontWeight:A().min(z1).max(T1).optional(),emphasisTextTransform:h(["none","uppercase","capitalize"]).optional(),emphasisLetterSpacing:i().optional(),emphasisFontStyle:h(["normal","italic"]).optional(),entrance:h(["none","fade","word-pop","stagger-up"]).optional(),entranceMs:i().min(E1).optional(),entranceStaggerMs:i().min(C1).optional(),exitMs:i().min(I1).optional(),emphasisPlate:P().optional(),emphasisPlateColor:n().optional(),emphasisPlateTextColor:n().optional(),emphasisPlateAltColor:n().optional(),emphasisPlateAltTextColor:n().optional(),emphasisPlateRadius:i().min(R1).optional(),emphasisPlatePadX:i().optional(),emphasisPlatePadY:i().optional(),emphasisPlateReveal:P().optional().describe("Grow a shared emphasis plate as saved words appear while reserving its final layout width."),annotationColor:n().optional(),annotationStrokeWidth:i().min(w1).max(O1).optional().describe("Annotation stroke width in its 100\xD7100 SVG coordinate system; default 4."),annotationTexture:h(["clean","pencil"]).optional().describe("Native annotation stroke finish; default clean."),maxWidthPercent:i().gt(M1).max(k1).optional()}).optional(),layouts:y(c({segmentIndex:A().min(P1).max(L1),wordStartIndex:A().min(D1).max(v1),wordEndIndex:A().gt(F1).max(N1).describe("Exclusive word index in the saved caption segment."),region:c({x:i().min(_1).max(B1),y:i().min(j1).max(V1),w:i().gt(U1).max(H1),h:i().gt(W1).max($1)}),scale:i().min(G1).max(K1).optional(),rotation:i().min(q1).max(Y1).optional(),style:c({fontFamily:n().min(1).optional(),fontSize:i().min(1).max(Q1).optional().describe("Font size as % of composition height (1-15, default 5). NOT px."),fontWeight:A().min(J1).max(Z1).optional(),color:n().min(1).optional(),highlightColor:n().min(1).optional(),backgroundColor:n().optional(),plate:h(["glass","solid","none"]).optional(),textTransform:h(["none","uppercase","capitalize"]).optional(),letterSpacing:i().min(X1).max(eL).optional().describe("Base caption glyph spacing in pixels."),wordGapEm:i().min(tL).max(oL).optional().describe("Gap between caption runs as a multiple of base font size; default 0.35."),lineGapEm:i().min(rL).max(sL).optional().describe("Gap between caption lines as a multiple of base font size; default 0.25."),emphasisColor:n().optional(),emphasisScale:i().gt(nL).optional(),emphasisFontFamily:n().optional(),emphasisFontWeight:A().min(iL).max(aL).optional(),emphasisTextTransform:h(["none","uppercase","capitalize"]).optional(),emphasisLetterSpacing:i().optional(),emphasisFontStyle:h(["normal","italic"]).optional(),emphasisPlate:P().optional(),emphasisPlateColor:n().optional(),emphasisPlateTextColor:n().optional(),emphasisPlateAltColor:n().optional(),emphasisPlateAltTextColor:n().optional(),emphasisPlateRadius:i().min(cL).optional(),emphasisPlatePadX:i().optional(),emphasisPlatePadY:i().optional(),emphasisPlateReveal:P().optional().describe("Grow a shared emphasis plate as saved words appear while reserving its final layout width."),annotationColor:n().optional(),annotationStrokeWidth:i().min(pL).max(dL).optional().describe("Annotation stroke width in its 100\xD7100 SVG coordinate system; default 4."),annotationTexture:h(["clean","pencil"]).optional().describe("Native annotation stroke finish; default clean."),entrance:h(["none","fade","word-pop","stagger-up"]).optional(),entranceMs:i().min(lL).optional(),entranceStaggerMs:i().min(uL).optional(),exitMs:i().min(mL).optional()}).optional(),holdThroughWordIndex:A().min(hL).max(fL).optional().describe("Inclusive saved-word index in this segment. The layout stays visible until that word ends."),wordMarks:y(c({wordIndex:A().min(xL).max(gL),emphasis:P().optional(),annotate:E([h(["circle","underline"]),G()]).optional()})).optional(),wordSignature:n().regex(bL)})).optional(),zPlane:h(["front","behind-subject"]).optional()}),c({source:b("authored"),segments:y(c({words:y(c({text:n().min(1),startMs:i().min(yL).describe("Word start on the composition timeline, in milliseconds."),endMs:i().min(AL).describe("Word end on the composition timeline, in milliseconds."),emphasis:P().optional(),annotate:h(["circle","underline"]).optional()}))})),style:c({fontFamily:n().min(1).optional(),fontSize:i().min(1).max(SL).optional().describe("Font size as % of composition height (1-15, default 5). NOT px."),fontWeight:A().min(zL).max(TL).optional(),color:n().min(1).optional(),highlightColor:n().min(1).optional(),backgroundColor:n().optional(),plate:h(["glass","solid","none"]).optional(),position:h(["top","center","bottom"]).optional(),region:c({x:i().min(EL).max(CL),y:i().min(IL).max(RL),w:i().gt(wL).max(OL),h:i().gt(ML).max(kL)}).optional().describe("Optional caption layout box {x,y,w,h} in normalized output-frame coordinates. Overrides position; text starts at its top edge and wraps/pages within its width and height."),textTransform:h(["none","uppercase","capitalize"]).optional(),letterSpacing:i().min(PL).max(LL).optional().describe("Base caption glyph spacing in pixels."),wordGapEm:i().min(DL).max(vL).optional().describe("Gap between caption runs as a multiple of base font size; default 0.35."),lineGapEm:i().min(FL).max(NL).optional().describe("Gap between caption lines as a multiple of base font size; default 0.25."),emphasisColor:n().optional(),emphasisGradient:n().optional(),emphasisScale:i().gt(_L).optional(),emphasisFontFamily:n().optional(),emphasisFontWeight:A().min(BL).max(jL).optional(),emphasisTextTransform:h(["none","uppercase","capitalize"]).optional(),emphasisLetterSpacing:i().optional(),emphasisFontStyle:h(["normal","italic"]).optional(),entrance:h(["none","fade","word-pop","stagger-up"]).optional(),entranceMs:i().min(VL).optional(),entranceStaggerMs:i().min(UL).optional(),exitMs:i().min(HL).optional(),emphasisPlate:P().optional(),emphasisPlateColor:n().optional(),emphasisPlateTextColor:n().optional(),emphasisPlateAltColor:n().optional(),emphasisPlateAltTextColor:n().optional(),emphasisPlateRadius:i().min(WL).optional(),emphasisPlatePadX:i().optional(),emphasisPlatePadY:i().optional(),emphasisPlateReveal:P().optional().describe("Grow a shared emphasis plate as saved words appear while reserving its final layout width."),annotationColor:n().optional(),annotationStrokeWidth:i().min($L).max(GL).optional().describe("Annotation stroke width in its 100\xD7100 SVG coordinate system; default 4."),annotationTexture:h(["clean","pencil"]).optional().describe("Native annotation stroke finish; default clean."),maxWidthPercent:i().gt(KL).max(qL).optional()}).optional(),layouts:y(c({segmentIndex:A().min(YL).max(QL),wordStartIndex:A().min(JL).max(ZL),wordEndIndex:A().gt(XL).max(eD).describe("Exclusive word index in the saved caption segment."),region:c({x:i().min(tD).max(oD),y:i().min(rD).max(sD),w:i().gt(nD).max(iD),h:i().gt(aD).max(cD)}),scale:i().min(pD).max(dD).optional(),rotation:i().min(lD).max(uD).optional(),style:c({fontFamily:n().min(1).optional(),fontSize:i().min(1).max(mD).optional().describe("Font size as % of composition height (1-15, default 5). NOT px."),fontWeight:A().min(hD).max(fD).optional(),color:n().min(1).optional(),highlightColor:n().min(1).optional(),backgroundColor:n().optional(),plate:h(["glass","solid","none"]).optional(),textTransform:h(["none","uppercase","capitalize"]).optional(),letterSpacing:i().min(xD).max(gD).optional().describe("Base caption glyph spacing in pixels."),wordGapEm:i().min(bD).max(yD).optional().describe("Gap between caption runs as a multiple of base font size; default 0.35."),lineGapEm:i().min(AD).max(SD).optional().describe("Gap between caption lines as a multiple of base font size; default 0.25."),emphasisColor:n().optional(),emphasisScale:i().gt(zD).optional(),emphasisFontFamily:n().optional(),emphasisFontWeight:A().min(TD).max(ED).optional(),emphasisTextTransform:h(["none","uppercase","capitalize"]).optional(),emphasisLetterSpacing:i().optional(),emphasisFontStyle:h(["normal","italic"]).optional(),emphasisPlate:P().optional(),emphasisPlateColor:n().optional(),emphasisPlateTextColor:n().optional(),emphasisPlateAltColor:n().optional(),emphasisPlateAltTextColor:n().optional(),emphasisPlateRadius:i().min(CD).optional(),emphasisPlatePadX:i().optional(),emphasisPlatePadY:i().optional(),emphasisPlateReveal:P().optional().describe("Grow a shared emphasis plate as saved words appear while reserving its final layout width."),annotationColor:n().optional(),annotationStrokeWidth:i().min(ID).max(RD).optional().describe("Annotation stroke width in its 100\xD7100 SVG coordinate system; default 4."),annotationTexture:h(["clean","pencil"]).optional().describe("Native annotation stroke finish; default clean."),entrance:h(["none","fade","word-pop","stagger-up"]).optional(),entranceMs:i().min(wD).optional(),entranceStaggerMs:i().min(OD).optional(),exitMs:i().min(MD).optional()}).optional(),holdThroughWordIndex:A().min(kD).max(PD).optional().describe("Inclusive saved-word index in this segment. The layout stays visible until that word ends."),wordMarks:y(c({wordIndex:A().min(LD).max(DD),emphasis:P().optional(),annotate:E([h(["circle","underline"]),G()]).optional()})).optional(),wordSignature:n().regex(vD)})).optional(),zPlane:h(["front","behind-subject"]).optional()})]).optional(),license:c({type:n().min(1),source:n().optional(),notes:n().optional()}).optional(),accessibility:c({audioDescriptionTrackId:n().optional(),captionsTrackId:n().optional(),signLanguageTrackId:n().optional(),notes:n().optional()}).optional()}).describe("Canonical composition wire shape (multi-track; carries reframe, captions, markers).");var le=E([G(),P(),i(),n(),y(Qs(()=>le)),O(n(),Qs(()=>le))]);var FD=64,ND=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),_D=1,BD=0,jD=1,VD=0,UD=1,HD=200,WD=4e3,$D=0,GD=3.141592653589793,KD=64,qD=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),YD=0,QD=1,JD=0,ZD=1,XD=0,e2=1,t2=0,o2=1,r2=0,s2=1,n2=2.333,i2=0,a2=1,c2=16,p2=64,d2=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),l2=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),u2=256,m2=new RegExp("^[a-f0-9]{64}$"),h2=0,f2=9007199254740991,x2=0,g2=9007199254740991,b2=0,y2=9007199254740991,A2=256,S2=0,z2=0,T2=9007199254740991,E2=0,C2=9007199254740991,I2=64,R2=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),w2=1,O2=0,M2=1,k2=0,P2=1,L2=80,D2=2e3,v2=64,F2=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),N2=0,_2=1,B2=0,j2=1,V2=0,U2=1,H2=0,W2=1,$2=0,G2=1,K2=2.333,q2=0,Y2=1,Q2=16,J2=64,Z2=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),X2=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),ev=256,tv=new RegExp("^[a-f0-9]{64}$"),ov=0,rv=9007199254740991,sv=0,nv=9007199254740991,iv=0,av=9007199254740991,cv=256,pv=0,dv=0,lv=9007199254740991,uv=0,mv=9007199254740991,hv=64,fv=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),xv=1,gv=0,bv=1,yv=0,Av=1,Sv=40,zv=8e3,Tv=40,Ev=8e3,Cv=32,Iv=4,Rv=200,wv=32,Ov=0,Mv=15,kv=0,Pv="satin",Lv=64,Dv=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),vv=0,Fv=1,Nv=0,_v=1,Bv=0,jv=1,Vv=0,Uv=1,Hv=0,Wv=1,$v=2.333,Gv=0,Kv=1,qv=16,Yv=64,Qv=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),Jv=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),Zv=256,Xv=new RegExp("^[a-f0-9]{64}$"),eF=0,tF=9007199254740991,oF=0,rF=9007199254740991,sF=0,nF=9007199254740991,iF=256,aF=0,cF=0,pF=9007199254740991,dF=0,lF=9007199254740991,uF=64,mF=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),hF=1,fF=0,xF=1,gF=0,bF=1,yF=40,AF=8e3,SF=40,zF=8e3,TF="contain",EF="straight",CF=!0,IF="hidden",RF=64,wF=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),OF=0,MF=1,kF=0,PF=1,LF=0,DF=1,vF=0,FF=1,NF=0,_F=1,BF=2.333,jF=0,VF=1,UF=16,HF=64,WF=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),$F=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),GF=256,KF=new RegExp("^[a-f0-9]{64}$"),qF=0,YF=9007199254740991,QF=0,JF=9007199254740991,ZF=0,XF=9007199254740991,eN=256,tN=0,oN=0,rN=9007199254740991,sN=0,nN=9007199254740991,iN=64,aN=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),cN=1,pN=0,dN=1,lN=512,uN=new RegExp("^[^\\r\\n]+$"),mN=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),hN=16,fN=24,xN=128,gN=new RegExp("^[A-Za-z0-9][A-Za-z0-9 _.\\-]*$"),bN=100,yN=900,AN=8,SN=800,zN=1.2,TN=.6,EN=3,CN=0,IN=-20,RN=40,wN="center",ON=0,MN=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),kN=1,PN=0,LN=64,DN=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),vN=1,FN=0,NN=1,_N=512,BN=new RegExp("^[^\\r\\n]+$"),jN=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),VN=16,UN=24,HN=128,WN=new RegExp("^[A-Za-z0-9][A-Za-z0-9 _.\\-]*$"),$N=100,GN=900,KN=8,qN=800,YN=1.2,QN=.6,JN=3,ZN=0,XN=-20,e_=40,t_="center",o_=0,r_=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),s_=0,n_=1,i_=0,Hm=E([c({kind:b("laptop"),id:n().min(1).max(FD).regex(ND),transform:c({position:H([i(),i(),i()]).default([0,0,0]),rotation:H([i(),i(),i()]).default([0,0,0]),scale:i().gt(BD).default(_D)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:i().min(VD).max(UD).default(jD),width:i().min(HD).max(WD),openAngle:i().min($D).max(GD),materials:y(c({role:n().min(1).max(KD),type:h(["physical","unlit"]),color:E([n().regex(qD),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:i().min(YD).max(QD).optional(),metalness:i().min(JD).max(ZD).optional(),clearcoat:i().min(XD).max(e2).optional(),clearcoatRoughness:i().min(t2).max(o2).optional(),anisotropy:i().min(r2).max(s2).optional(),anisotropyRotation:i().optional(),ior:i().min(1).max(n2).optional(),reflectivity:i().min(i2).max(a2).optional()})).max(c2).optional(),surfaces:O(n(),E([c({source:b("image"),assetSlot:n().min(1).max(p2).regex(d2).describe("Image asset slot name bound by the clip assets map; never a URL.")}),c({source:b("color"),color:E([n().regex(l2),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),c({source:b("component"),component:c({version:b(1),componentId:n().min(1).max(u2),sourceVersionId:n().regex(m2)}),captureFrame:A().min(h2).max(f2),layout:c({width:A().gt(x2).max(g2),height:A().gt(b2).max(y2)}),bakeScale:E([b(2),b(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:O(n(),le).optional()}),c({source:b("video"),mediaId:n().min(1).max(A2),startFrame:A().min(z2).max(T2).default(S2),endFrame:A().gt(E2).max(C2).optional()})])).optional()}),c({kind:b("phone"),id:n().min(1).max(I2).regex(R2),transform:c({position:H([i(),i(),i()]).default([0,0,0]),rotation:H([i(),i(),i()]).default([0,0,0]),scale:i().gt(O2).default(w2)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:i().min(k2).max(P2).default(M2),width:i().min(L2).max(D2),materials:y(c({role:n().min(1).max(v2),type:h(["physical","unlit"]),color:E([n().regex(F2),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:i().min(N2).max(_2).optional(),metalness:i().min(B2).max(j2).optional(),clearcoat:i().min(V2).max(U2).optional(),clearcoatRoughness:i().min(H2).max(W2).optional(),anisotropy:i().min($2).max(G2).optional(),anisotropyRotation:i().optional(),ior:i().min(1).max(K2).optional(),reflectivity:i().min(q2).max(Y2).optional()})).max(Q2).optional(),surfaces:O(n(),E([c({source:b("image"),assetSlot:n().min(1).max(J2).regex(Z2).describe("Image asset slot name bound by the clip assets map; never a URL.")}),c({source:b("color"),color:E([n().regex(X2),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),c({source:b("component"),component:c({version:b(1),componentId:n().min(1).max(ev),sourceVersionId:n().regex(tv)}),captureFrame:A().min(ov).max(rv),layout:c({width:A().gt(sv).max(nv),height:A().gt(iv).max(av)}),bakeScale:E([b(2),b(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:O(n(),le).optional()}),c({source:b("video"),mediaId:n().min(1).max(cv),startFrame:A().min(dv).max(lv).default(pv),endFrame:A().gt(uv).max(mv).optional()})])).optional()}),c({kind:b("slab"),id:n().min(1).max(hv).regex(fv),transform:c({position:H([i(),i(),i()]).default([0,0,0]),rotation:H([i(),i(),i()]).default([0,0,0]),scale:i().gt(gv).default(xv)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:i().min(yv).max(Av).default(bv),width:i().min(Sv).max(zv),height:i().min(Tv).max(Ev),thickness:i().min(Iv).max(Rv).default(Cv),cornerRadius:i().min(Ov).default(wv),edgeRadius:i().min(kv).default(Mv),finish:h(["satin","brushed"]).default(Pv),materials:y(c({role:n().min(1).max(Lv),type:h(["physical","unlit"]),color:E([n().regex(Dv),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:i().min(vv).max(Fv).optional(),metalness:i().min(Nv).max(_v).optional(),clearcoat:i().min(Bv).max(jv).optional(),clearcoatRoughness:i().min(Vv).max(Uv).optional(),anisotropy:i().min(Hv).max(Wv).optional(),anisotropyRotation:i().optional(),ior:i().min(1).max($v).optional(),reflectivity:i().min(Gv).max(Kv).optional()})).max(qv).optional(),surfaces:O(n(),E([c({source:b("image"),assetSlot:n().min(1).max(Yv).regex(Qv).describe("Image asset slot name bound by the clip assets map; never a URL.")}),c({source:b("color"),color:E([n().regex(Jv),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),c({source:b("component"),component:c({version:b(1),componentId:n().min(1).max(Zv),sourceVersionId:n().regex(Xv)}),captureFrame:A().min(eF).max(tF),layout:c({width:A().gt(oF).max(rF),height:A().gt(sF).max(nF)}),bakeScale:E([b(2),b(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:O(n(),le).optional()}),c({source:b("video"),mediaId:n().min(1).max(iF),startFrame:A().min(cF).max(pF).default(aF),endFrame:A().gt(dF).max(lF).optional()})])).optional()}),c({kind:b("page"),id:n().min(1).max(uF).regex(mF),transform:c({position:H([i(),i(),i()]).default([0,0,0]),rotation:H([i(),i(),i()]).default([0,0,0]),scale:i().gt(fF).default(hF)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:i().min(gF).max(bF).default(xF),width:i().min(yF).max(AF),height:i().min(SF).max(zF),fit:h(["contain","cover"]).default(TF),transparency:h(["straight","premultiplied","opaque"]).default(EF),depthWrite:P().default(CF),backface:h(["hidden","visible"]).default(IF),materials:y(c({role:n().min(1).max(RF),type:h(["physical","unlit"]),color:E([n().regex(wF),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:i().min(OF).max(MF).optional(),metalness:i().min(kF).max(PF).optional(),clearcoat:i().min(LF).max(DF).optional(),clearcoatRoughness:i().min(vF).max(FF).optional(),anisotropy:i().min(NF).max(_F).optional(),anisotropyRotation:i().optional(),ior:i().min(1).max(BF).optional(),reflectivity:i().min(jF).max(VF).optional()})).max(UF).optional(),surfaces:O(n(),E([c({source:b("image"),assetSlot:n().min(1).max(HF).regex(WF).describe("Image asset slot name bound by the clip assets map; never a URL.")}),c({source:b("color"),color:E([n().regex($F),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),c({source:b("component"),component:c({version:b(1),componentId:n().min(1).max(GF),sourceVersionId:n().regex(KF)}),captureFrame:A().min(qF).max(YF),layout:c({width:A().gt(QF).max(JF),height:A().gt(ZF).max(XF)}),bakeScale:E([b(2),b(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:O(n(),le).optional()}),c({source:b("video"),mediaId:n().min(1).max(eN),startFrame:A().min(oN).max(rN).default(tN),endFrame:A().gt(sN).max(nN).optional()})]))}),c({id:n().min(1).max(iN).regex(aN),kind:b("text"),opacity:i().min(pN).max(dN).default(cN),lines:y(c({runs:y(c({text:n().min(1).max(lN).regex(uN),color:E([n().regex(mN),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),emphasis:P().optional()})).min(1).max(hN)})).min(1).max(fN),fontFamily:E([n().min(1).max(xN).regex(gN),h(["$brand:fonts.heading","$brand:fonts.body","$brand:fonts.caption"])]),fontWeight:A().min(bN).max(yN),fontStyle:h(["normal","italic"]),fontSize:i().min(AN).max(SN),lineHeight:i().min(TN).max(EN).default(zN),letterSpacing:i().min(IN).max(RN).default(CN),align:h(["left","center","right"]).default(wN),maxWidth:i().gt(ON).optional(),color:E([n().regex(MN),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]),space:b("world"),transform:c({position:H([i(),i(),i()]).default([0,0,0]),rotation:H([i(),i(),i()]).default([0,0,0]),scale:i().gt(PN).default(kN)}).default({position:[0,0,0],rotation:[0,0,0],scale:1})}),c({id:n().min(1).max(LN).regex(DN),kind:b("text"),opacity:i().min(FN).max(NN).default(vN),lines:y(c({runs:y(c({text:n().min(1).max(_N).regex(BN),color:E([n().regex(jN),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),emphasis:P().optional()})).min(1).max(VN)})).min(1).max(UN),fontFamily:E([n().min(1).max(HN).regex(WN),h(["$brand:fonts.heading","$brand:fonts.body","$brand:fonts.caption"])]),fontWeight:A().min($N).max(GN),fontStyle:h(["normal","italic"]),fontSize:i().min(KN).max(qN),lineHeight:i().min(QN).max(JN).default(YN),letterSpacing:i().min(XN).max(e_).default(ZN),align:h(["left","center","right"]).default(t_),maxWidth:i().gt(o_).optional(),color:E([n().regex(r_),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]),space:b("screen"),x:i(),y:i(),rotation:i().default(s_),scale:i().gt(i_).default(n_)})]);var a_=64,c_=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),p_=1,d_=0,l_=1,u_=0,m_=1,h_=16,f_=64,x_=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),g_=1,b_=0,y_=1,A_=0,S_=1,z_=200,T_=4e3,E_=0,C_=3.141592653589793,I_=64,R_=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),w_=0,O_=1,M_=0,k_=1,P_=0,L_=1,D_=0,v_=1,F_=0,N_=1,__=2.333,B_=0,j_=1,V_=16,U_=64,H_=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),W_=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),$_=256,G_=new RegExp("^[a-f0-9]{64}$"),K_=0,q_=9007199254740991,Y_=0,Q_=9007199254740991,J_=0,Z_=9007199254740991,X_=256,eB=0,tB=0,oB=9007199254740991,rB=0,sB=9007199254740991,nB=64,iB=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),aB=1,cB=0,pB=1,dB=0,lB=1,uB=80,mB=2e3,hB=64,fB=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),xB=0,gB=1,bB=0,yB=1,AB=0,SB=1,zB=0,TB=1,EB=0,CB=1,IB=2.333,RB=0,wB=1,OB=16,MB=64,kB=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),PB=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),LB=256,DB=new RegExp("^[a-f0-9]{64}$"),vB=0,FB=9007199254740991,NB=0,_B=9007199254740991,BB=0,jB=9007199254740991,VB=256,UB=0,HB=0,WB=9007199254740991,$B=0,GB=9007199254740991,KB=64,qB=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),YB=1,QB=0,JB=1,ZB=0,XB=1,ej=40,tj=8e3,oj=40,rj=8e3,sj=32,nj=4,ij=200,aj=32,cj=0,pj=15,dj=0,lj="satin",uj=64,mj=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),hj=0,fj=1,xj=0,gj=1,bj=0,yj=1,Aj=0,Sj=1,zj=0,Tj=1,Ej=2.333,Cj=0,Ij=1,Rj=16,wj=64,Oj=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),Mj=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),kj=256,Pj=new RegExp("^[a-f0-9]{64}$"),Lj=0,Dj=9007199254740991,vj=0,Fj=9007199254740991,Nj=0,_j=9007199254740991,Bj=256,jj=0,Vj=0,Uj=9007199254740991,Hj=0,Wj=9007199254740991,$j=64,Gj=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),Kj=1,qj=0,Yj=1,Qj=0,Jj=1,Zj=40,Xj=8e3,eV=40,tV=8e3,oV="contain",rV="straight",sV=!0,nV="hidden",iV=64,aV=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),cV=0,pV=1,dV=0,lV=1,uV=0,mV=1,hV=0,fV=1,xV=0,gV=1,bV=2.333,yV=0,AV=1,SV=16,zV=64,TV=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),EV=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),CV=256,IV=new RegExp("^[a-f0-9]{64}$"),RV=0,wV=9007199254740991,OV=0,MV=9007199254740991,kV=0,PV=9007199254740991,LV=256,DV=0,vV=0,FV=9007199254740991,NV=0,_V=9007199254740991,BV=64,jV=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),VV=1,UV=0,HV=1,WV=512,$V=new RegExp("^[^\\r\\n]+$"),GV=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),KV=16,qV=24,YV=128,QV=new RegExp("^[A-Za-z0-9][A-Za-z0-9 _.\\-]*$"),JV=100,ZV=900,XV=8,e4=800,t4=1.2,o4=.6,r4=3,s4=0,n4=-20,i4=40,a4="center",c4=0,p4=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),d4=1,l4=0,u4=64,m4=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),h4=1,f4=0,x4=1,g4=512,b4=new RegExp("^[^\\r\\n]+$"),y4=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),A4=16,S4=24,z4=128,T4=new RegExp("^[A-Za-z0-9][A-Za-z0-9 _.\\-]*$"),E4=100,C4=900,I4=8,R4=800,w4=1.2,O4=.6,M4=3,k4=0,P4=-20,L4=40,D4="center",v4=0,F4=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),N4=0,_4=1,B4=0,Wm=E([c({kind:b("group"),id:n().min(1).max(a_).regex(c_),transform:c({position:H([i(),i(),i()]).default([0,0,0]),rotation:H([i(),i(),i()]).default([0,0,0]),scale:i().gt(d_).default(p_)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:i().min(u_).max(m_).default(l_),children:y(Hm).min(1).max(h_)}),c({kind:b("laptop"),id:n().min(1).max(f_).regex(x_),transform:c({position:H([i(),i(),i()]).default([0,0,0]),rotation:H([i(),i(),i()]).default([0,0,0]),scale:i().gt(b_).default(g_)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:i().min(A_).max(S_).default(y_),width:i().min(z_).max(T_),openAngle:i().min(E_).max(C_),materials:y(c({role:n().min(1).max(I_),type:h(["physical","unlit"]),color:E([n().regex(R_),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:i().min(w_).max(O_).optional(),metalness:i().min(M_).max(k_).optional(),clearcoat:i().min(P_).max(L_).optional(),clearcoatRoughness:i().min(D_).max(v_).optional(),anisotropy:i().min(F_).max(N_).optional(),anisotropyRotation:i().optional(),ior:i().min(1).max(__).optional(),reflectivity:i().min(B_).max(j_).optional()})).max(V_).optional(),surfaces:O(n(),E([c({source:b("image"),assetSlot:n().min(1).max(U_).regex(H_).describe("Image asset slot name bound by the clip assets map; never a URL.")}),c({source:b("color"),color:E([n().regex(W_),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),c({source:b("component"),component:c({version:b(1),componentId:n().min(1).max($_),sourceVersionId:n().regex(G_)}),captureFrame:A().min(K_).max(q_),layout:c({width:A().gt(Y_).max(Q_),height:A().gt(J_).max(Z_)}),bakeScale:E([b(2),b(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:O(n(),le).optional()}),c({source:b("video"),mediaId:n().min(1).max(X_),startFrame:A().min(tB).max(oB).default(eB),endFrame:A().gt(rB).max(sB).optional()})])).optional()}),c({kind:b("phone"),id:n().min(1).max(nB).regex(iB),transform:c({position:H([i(),i(),i()]).default([0,0,0]),rotation:H([i(),i(),i()]).default([0,0,0]),scale:i().gt(cB).default(aB)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:i().min(dB).max(lB).default(pB),width:i().min(uB).max(mB),materials:y(c({role:n().min(1).max(hB),type:h(["physical","unlit"]),color:E([n().regex(fB),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:i().min(xB).max(gB).optional(),metalness:i().min(bB).max(yB).optional(),clearcoat:i().min(AB).max(SB).optional(),clearcoatRoughness:i().min(zB).max(TB).optional(),anisotropy:i().min(EB).max(CB).optional(),anisotropyRotation:i().optional(),ior:i().min(1).max(IB).optional(),reflectivity:i().min(RB).max(wB).optional()})).max(OB).optional(),surfaces:O(n(),E([c({source:b("image"),assetSlot:n().min(1).max(MB).regex(kB).describe("Image asset slot name bound by the clip assets map; never a URL.")}),c({source:b("color"),color:E([n().regex(PB),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),c({source:b("component"),component:c({version:b(1),componentId:n().min(1).max(LB),sourceVersionId:n().regex(DB)}),captureFrame:A().min(vB).max(FB),layout:c({width:A().gt(NB).max(_B),height:A().gt(BB).max(jB)}),bakeScale:E([b(2),b(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:O(n(),le).optional()}),c({source:b("video"),mediaId:n().min(1).max(VB),startFrame:A().min(HB).max(WB).default(UB),endFrame:A().gt($B).max(GB).optional()})])).optional()}),c({kind:b("slab"),id:n().min(1).max(KB).regex(qB),transform:c({position:H([i(),i(),i()]).default([0,0,0]),rotation:H([i(),i(),i()]).default([0,0,0]),scale:i().gt(QB).default(YB)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:i().min(ZB).max(XB).default(JB),width:i().min(ej).max(tj),height:i().min(oj).max(rj),thickness:i().min(nj).max(ij).default(sj),cornerRadius:i().min(cj).default(aj),edgeRadius:i().min(dj).default(pj),finish:h(["satin","brushed"]).default(lj),materials:y(c({role:n().min(1).max(uj),type:h(["physical","unlit"]),color:E([n().regex(mj),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:i().min(hj).max(fj).optional(),metalness:i().min(xj).max(gj).optional(),clearcoat:i().min(bj).max(yj).optional(),clearcoatRoughness:i().min(Aj).max(Sj).optional(),anisotropy:i().min(zj).max(Tj).optional(),anisotropyRotation:i().optional(),ior:i().min(1).max(Ej).optional(),reflectivity:i().min(Cj).max(Ij).optional()})).max(Rj).optional(),surfaces:O(n(),E([c({source:b("image"),assetSlot:n().min(1).max(wj).regex(Oj).describe("Image asset slot name bound by the clip assets map; never a URL.")}),c({source:b("color"),color:E([n().regex(Mj),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),c({source:b("component"),component:c({version:b(1),componentId:n().min(1).max(kj),sourceVersionId:n().regex(Pj)}),captureFrame:A().min(Lj).max(Dj),layout:c({width:A().gt(vj).max(Fj),height:A().gt(Nj).max(_j)}),bakeScale:E([b(2),b(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:O(n(),le).optional()}),c({source:b("video"),mediaId:n().min(1).max(Bj),startFrame:A().min(Vj).max(Uj).default(jj),endFrame:A().gt(Hj).max(Wj).optional()})])).optional()}),c({kind:b("page"),id:n().min(1).max($j).regex(Gj),transform:c({position:H([i(),i(),i()]).default([0,0,0]),rotation:H([i(),i(),i()]).default([0,0,0]),scale:i().gt(qj).default(Kj)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:i().min(Qj).max(Jj).default(Yj),width:i().min(Zj).max(Xj),height:i().min(eV).max(tV),fit:h(["contain","cover"]).default(oV),transparency:h(["straight","premultiplied","opaque"]).default(rV),depthWrite:P().default(sV),backface:h(["hidden","visible"]).default(nV),materials:y(c({role:n().min(1).max(iV),type:h(["physical","unlit"]),color:E([n().regex(aV),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:i().min(cV).max(pV).optional(),metalness:i().min(dV).max(lV).optional(),clearcoat:i().min(uV).max(mV).optional(),clearcoatRoughness:i().min(hV).max(fV).optional(),anisotropy:i().min(xV).max(gV).optional(),anisotropyRotation:i().optional(),ior:i().min(1).max(bV).optional(),reflectivity:i().min(yV).max(AV).optional()})).max(SV).optional(),surfaces:O(n(),E([c({source:b("image"),assetSlot:n().min(1).max(zV).regex(TV).describe("Image asset slot name bound by the clip assets map; never a URL.")}),c({source:b("color"),color:E([n().regex(EV),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),c({source:b("component"),component:c({version:b(1),componentId:n().min(1).max(CV),sourceVersionId:n().regex(IV)}),captureFrame:A().min(RV).max(wV),layout:c({width:A().gt(OV).max(MV),height:A().gt(kV).max(PV)}),bakeScale:E([b(2),b(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:O(n(),le).optional()}),c({source:b("video"),mediaId:n().min(1).max(LV),startFrame:A().min(vV).max(FV).default(DV),endFrame:A().gt(NV).max(_V).optional()})]))}),c({id:n().min(1).max(BV).regex(jV),kind:b("text"),opacity:i().min(UV).max(HV).default(VV),lines:y(c({runs:y(c({text:n().min(1).max(WV).regex($V),color:E([n().regex(GV),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),emphasis:P().optional()})).min(1).max(KV)})).min(1).max(qV),fontFamily:E([n().min(1).max(YV).regex(QV),h(["$brand:fonts.heading","$brand:fonts.body","$brand:fonts.caption"])]),fontWeight:A().min(JV).max(ZV),fontStyle:h(["normal","italic"]),fontSize:i().min(XV).max(e4),lineHeight:i().min(o4).max(r4).default(t4),letterSpacing:i().min(n4).max(i4).default(s4),align:h(["left","center","right"]).default(a4),maxWidth:i().gt(c4).optional(),color:E([n().regex(p4),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]),space:b("world"),transform:c({position:H([i(),i(),i()]).default([0,0,0]),rotation:H([i(),i(),i()]).default([0,0,0]),scale:i().gt(l4).default(d4)}).default({position:[0,0,0],rotation:[0,0,0],scale:1})}),c({id:n().min(1).max(u4).regex(m4),kind:b("text"),opacity:i().min(f4).max(x4).default(h4),lines:y(c({runs:y(c({text:n().min(1).max(g4).regex(b4),color:E([n().regex(y4),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),emphasis:P().optional()})).min(1).max(A4)})).min(1).max(S4),fontFamily:E([n().min(1).max(z4).regex(T4),h(["$brand:fonts.heading","$brand:fonts.body","$brand:fonts.caption"])]),fontWeight:A().min(E4).max(C4),fontStyle:h(["normal","italic"]),fontSize:i().min(I4).max(R4),lineHeight:i().min(O4).max(M4).default(w4),letterSpacing:i().min(P4).max(L4).default(k4),align:h(["left","center","right"]).default(D4),maxWidth:i().gt(v4).optional(),color:E([n().regex(F4),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]),space:b("screen"),x:i(),y:i(),rotation:i().default(N4),scale:i().gt(B4).default(_4)})]);var j4=64,V4=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),U4=1,H4=0,W4=1,$4=0,G4=1,K4=16,q4=64,Y4=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),Q4=1,J4=0,Z4=1,X4=0,e9=1,t9=200,o9=4e3,r9=0,s9=3.141592653589793,n9=64,i9=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),a9=0,c9=1,p9=0,d9=1,l9=0,u9=1,m9=0,h9=1,f9=0,x9=1,g9=2.333,b9=0,y9=1,A9=16,S9=64,z9=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),T9=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),E9=256,C9=new RegExp("^[a-f0-9]{64}$"),I9=0,R9=9007199254740991,w9=0,O9=9007199254740991,M9=0,k9=9007199254740991,P9=256,L9=0,D9=0,v9=9007199254740991,F9=0,N9=9007199254740991,_9=64,B9=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),j9=1,V9=0,U9=1,H9=0,W9=1,$9=80,G9=2e3,K9=64,q9=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),Y9=0,Q9=1,J9=0,Z9=1,X9=0,eU=1,tU=0,oU=1,rU=0,sU=1,nU=2.333,iU=0,aU=1,cU=16,pU=64,dU=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),lU=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),uU=256,mU=new RegExp("^[a-f0-9]{64}$"),hU=0,fU=9007199254740991,xU=0,gU=9007199254740991,bU=0,yU=9007199254740991,AU=256,SU=0,zU=0,TU=9007199254740991,EU=0,CU=9007199254740991,IU=64,RU=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),wU=1,OU=0,MU=1,kU=0,PU=1,LU=40,DU=8e3,vU=40,FU=8e3,NU=32,_U=4,BU=200,jU=32,VU=0,UU=15,HU=0,WU="satin",$U=64,GU=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),KU=0,qU=1,YU=0,QU=1,JU=0,ZU=1,XU=0,e3=1,t3=0,o3=1,r3=2.333,s3=0,n3=1,i3=16,a3=64,c3=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),p3=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),d3=256,l3=new RegExp("^[a-f0-9]{64}$"),u3=0,m3=9007199254740991,h3=0,f3=9007199254740991,x3=0,g3=9007199254740991,b3=256,y3=0,A3=0,S3=9007199254740991,z3=0,T3=9007199254740991,E3=64,C3=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),I3=1,R3=0,w3=1,O3=0,M3=1,k3=40,P3=8e3,L3=40,D3=8e3,v3="contain",F3="straight",N3=!0,_3="hidden",B3=64,j3=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),V3=0,U3=1,H3=0,W3=1,$3=0,G3=1,K3=0,q3=1,Y3=0,Q3=1,J3=2.333,Z3=0,X3=1,eH=16,tH=64,oH=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),rH=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),sH=256,nH=new RegExp("^[a-f0-9]{64}$"),iH=0,aH=9007199254740991,cH=0,pH=9007199254740991,dH=0,lH=9007199254740991,uH=256,mH=0,hH=0,fH=9007199254740991,xH=0,gH=9007199254740991,bH=64,yH=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),AH=1,SH=0,zH=1,TH=512,EH=new RegExp("^[^\\r\\n]+$"),CH=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),IH=16,RH=24,wH=128,OH=new RegExp("^[A-Za-z0-9][A-Za-z0-9 _.\\-]*$"),MH=100,kH=900,PH=8,LH=800,DH=1.2,vH=.6,FH=3,NH=0,_H=-20,BH=40,jH="center",VH=0,UH=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),HH=1,WH=0,$H=64,GH=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),KH=1,qH=0,YH=1,QH=512,JH=new RegExp("^[^\\r\\n]+$"),ZH=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),XH=16,eW=24,tW=128,oW=new RegExp("^[A-Za-z0-9][A-Za-z0-9 _.\\-]*$"),rW=100,sW=900,nW=8,iW=800,aW=1.2,cW=.6,pW=3,dW=0,lW=-20,uW=40,mW="center",hW=0,fW=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),xW=0,gW=1,bW=0,$m=E([c({kind:b("group"),id:n().min(1).max(j4).regex(V4),transform:c({position:H([i(),i(),i()]).default([0,0,0]),rotation:H([i(),i(),i()]).default([0,0,0]),scale:i().gt(H4).default(U4)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:i().min($4).max(G4).default(W4),children:y(Wm).min(1).max(K4)}),c({kind:b("laptop"),id:n().min(1).max(q4).regex(Y4),transform:c({position:H([i(),i(),i()]).default([0,0,0]),rotation:H([i(),i(),i()]).default([0,0,0]),scale:i().gt(J4).default(Q4)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:i().min(X4).max(e9).default(Z4),width:i().min(t9).max(o9),openAngle:i().min(r9).max(s9),materials:y(c({role:n().min(1).max(n9),type:h(["physical","unlit"]),color:E([n().regex(i9),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:i().min(a9).max(c9).optional(),metalness:i().min(p9).max(d9).optional(),clearcoat:i().min(l9).max(u9).optional(),clearcoatRoughness:i().min(m9).max(h9).optional(),anisotropy:i().min(f9).max(x9).optional(),anisotropyRotation:i().optional(),ior:i().min(1).max(g9).optional(),reflectivity:i().min(b9).max(y9).optional()})).max(A9).optional(),surfaces:O(n(),E([c({source:b("image"),assetSlot:n().min(1).max(S9).regex(z9).describe("Image asset slot name bound by the clip assets map; never a URL.")}),c({source:b("color"),color:E([n().regex(T9),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),c({source:b("component"),component:c({version:b(1),componentId:n().min(1).max(E9),sourceVersionId:n().regex(C9)}),captureFrame:A().min(I9).max(R9),layout:c({width:A().gt(w9).max(O9),height:A().gt(M9).max(k9)}),bakeScale:E([b(2),b(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:O(n(),le).optional()}),c({source:b("video"),mediaId:n().min(1).max(P9),startFrame:A().min(D9).max(v9).default(L9),endFrame:A().gt(F9).max(N9).optional()})])).optional()}),c({kind:b("phone"),id:n().min(1).max(_9).regex(B9),transform:c({position:H([i(),i(),i()]).default([0,0,0]),rotation:H([i(),i(),i()]).default([0,0,0]),scale:i().gt(V9).default(j9)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:i().min(H9).max(W9).default(U9),width:i().min($9).max(G9),materials:y(c({role:n().min(1).max(K9),type:h(["physical","unlit"]),color:E([n().regex(q9),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:i().min(Y9).max(Q9).optional(),metalness:i().min(J9).max(Z9).optional(),clearcoat:i().min(X9).max(eU).optional(),clearcoatRoughness:i().min(tU).max(oU).optional(),anisotropy:i().min(rU).max(sU).optional(),anisotropyRotation:i().optional(),ior:i().min(1).max(nU).optional(),reflectivity:i().min(iU).max(aU).optional()})).max(cU).optional(),surfaces:O(n(),E([c({source:b("image"),assetSlot:n().min(1).max(pU).regex(dU).describe("Image asset slot name bound by the clip assets map; never a URL.")}),c({source:b("color"),color:E([n().regex(lU),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),c({source:b("component"),component:c({version:b(1),componentId:n().min(1).max(uU),sourceVersionId:n().regex(mU)}),captureFrame:A().min(hU).max(fU),layout:c({width:A().gt(xU).max(gU),height:A().gt(bU).max(yU)}),bakeScale:E([b(2),b(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:O(n(),le).optional()}),c({source:b("video"),mediaId:n().min(1).max(AU),startFrame:A().min(zU).max(TU).default(SU),endFrame:A().gt(EU).max(CU).optional()})])).optional()}),c({kind:b("slab"),id:n().min(1).max(IU).regex(RU),transform:c({position:H([i(),i(),i()]).default([0,0,0]),rotation:H([i(),i(),i()]).default([0,0,0]),scale:i().gt(OU).default(wU)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:i().min(kU).max(PU).default(MU),width:i().min(LU).max(DU),height:i().min(vU).max(FU),thickness:i().min(_U).max(BU).default(NU),cornerRadius:i().min(VU).default(jU),edgeRadius:i().min(HU).default(UU),finish:h(["satin","brushed"]).default(WU),materials:y(c({role:n().min(1).max($U),type:h(["physical","unlit"]),color:E([n().regex(GU),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:i().min(KU).max(qU).optional(),metalness:i().min(YU).max(QU).optional(),clearcoat:i().min(JU).max(ZU).optional(),clearcoatRoughness:i().min(XU).max(e3).optional(),anisotropy:i().min(t3).max(o3).optional(),anisotropyRotation:i().optional(),ior:i().min(1).max(r3).optional(),reflectivity:i().min(s3).max(n3).optional()})).max(i3).optional(),surfaces:O(n(),E([c({source:b("image"),assetSlot:n().min(1).max(a3).regex(c3).describe("Image asset slot name bound by the clip assets map; never a URL.")}),c({source:b("color"),color:E([n().regex(p3),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),c({source:b("component"),component:c({version:b(1),componentId:n().min(1).max(d3),sourceVersionId:n().regex(l3)}),captureFrame:A().min(u3).max(m3),layout:c({width:A().gt(h3).max(f3),height:A().gt(x3).max(g3)}),bakeScale:E([b(2),b(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:O(n(),le).optional()}),c({source:b("video"),mediaId:n().min(1).max(b3),startFrame:A().min(A3).max(S3).default(y3),endFrame:A().gt(z3).max(T3).optional()})])).optional()}),c({kind:b("page"),id:n().min(1).max(E3).regex(C3),transform:c({position:H([i(),i(),i()]).default([0,0,0]),rotation:H([i(),i(),i()]).default([0,0,0]),scale:i().gt(R3).default(I3)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:i().min(O3).max(M3).default(w3),width:i().min(k3).max(P3),height:i().min(L3).max(D3),fit:h(["contain","cover"]).default(v3),transparency:h(["straight","premultiplied","opaque"]).default(F3),depthWrite:P().default(N3),backface:h(["hidden","visible"]).default(_3),materials:y(c({role:n().min(1).max(B3),type:h(["physical","unlit"]),color:E([n().regex(j3),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:i().min(V3).max(U3).optional(),metalness:i().min(H3).max(W3).optional(),clearcoat:i().min($3).max(G3).optional(),clearcoatRoughness:i().min(K3).max(q3).optional(),anisotropy:i().min(Y3).max(Q3).optional(),anisotropyRotation:i().optional(),ior:i().min(1).max(J3).optional(),reflectivity:i().min(Z3).max(X3).optional()})).max(eH).optional(),surfaces:O(n(),E([c({source:b("image"),assetSlot:n().min(1).max(tH).regex(oH).describe("Image asset slot name bound by the clip assets map; never a URL.")}),c({source:b("color"),color:E([n().regex(rH),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),c({source:b("component"),component:c({version:b(1),componentId:n().min(1).max(sH),sourceVersionId:n().regex(nH)}),captureFrame:A().min(iH).max(aH),layout:c({width:A().gt(cH).max(pH),height:A().gt(dH).max(lH)}),bakeScale:E([b(2),b(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:O(n(),le).optional()}),c({source:b("video"),mediaId:n().min(1).max(uH),startFrame:A().min(hH).max(fH).default(mH),endFrame:A().gt(xH).max(gH).optional()})]))}),c({id:n().min(1).max(bH).regex(yH),kind:b("text"),opacity:i().min(SH).max(zH).default(AH),lines:y(c({runs:y(c({text:n().min(1).max(TH).regex(EH),color:E([n().regex(CH),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),emphasis:P().optional()})).min(1).max(IH)})).min(1).max(RH),fontFamily:E([n().min(1).max(wH).regex(OH),h(["$brand:fonts.heading","$brand:fonts.body","$brand:fonts.caption"])]),fontWeight:A().min(MH).max(kH),fontStyle:h(["normal","italic"]),fontSize:i().min(PH).max(LH),lineHeight:i().min(vH).max(FH).default(DH),letterSpacing:i().min(_H).max(BH).default(NH),align:h(["left","center","right"]).default(jH),maxWidth:i().gt(VH).optional(),color:E([n().regex(UH),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]),space:b("world"),transform:c({position:H([i(),i(),i()]).default([0,0,0]),rotation:H([i(),i(),i()]).default([0,0,0]),scale:i().gt(WH).default(HH)}).default({position:[0,0,0],rotation:[0,0,0],scale:1})}),c({id:n().min(1).max($H).regex(GH),kind:b("text"),opacity:i().min(qH).max(YH).default(KH),lines:y(c({runs:y(c({text:n().min(1).max(QH).regex(JH),color:E([n().regex(ZH),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),emphasis:P().optional()})).min(1).max(XH)})).min(1).max(eW),fontFamily:E([n().min(1).max(tW).regex(oW),h(["$brand:fonts.heading","$brand:fonts.body","$brand:fonts.caption"])]),fontWeight:A().min(rW).max(sW),fontStyle:h(["normal","italic"]),fontSize:i().min(nW).max(iW),lineHeight:i().min(cW).max(pW).default(aW),letterSpacing:i().min(lW).max(uW).default(dW),align:h(["left","center","right"]).default(mW),maxWidth:i().gt(hW).optional(),color:E([n().regex(fW),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]),space:b("screen"),x:i(),y:i(),rotation:i().default(xW),scale:i().gt(bW).default(gW)})]);var yW=64,AW=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),SW=1,zW=0,TW=1,EW=0,CW=1,IW=16,RW=64,wW=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),OW=1,MW=0,kW=1,PW=0,LW=1,DW=200,vW=4e3,FW=0,NW=3.141592653589793,_W=64,BW=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),jW=0,VW=1,UW=0,HW=1,WW=0,$W=1,GW=0,KW=1,qW=0,YW=1,QW=2.333,JW=0,ZW=1,XW=16,e5=64,t5=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),o5=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),r5=256,s5=new RegExp("^[a-f0-9]{64}$"),n5=0,i5=9007199254740991,a5=0,c5=9007199254740991,p5=0,d5=9007199254740991,l5=256,u5=0,m5=0,h5=9007199254740991,f5=0,x5=9007199254740991,g5=64,b5=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),y5=1,A5=0,S5=1,z5=0,T5=1,E5=80,C5=2e3,I5=64,R5=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),w5=0,O5=1,M5=0,k5=1,P5=0,L5=1,D5=0,v5=1,F5=0,N5=1,_5=2.333,B5=0,j5=1,V5=16,U5=64,H5=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),W5=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),$5=256,G5=new RegExp("^[a-f0-9]{64}$"),K5=0,q5=9007199254740991,Y5=0,Q5=9007199254740991,J5=0,Z5=9007199254740991,X5=256,e$=0,t$=0,o$=9007199254740991,r$=0,s$=9007199254740991,n$=64,i$=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),a$=1,c$=0,p$=1,d$=0,l$=1,u$=40,m$=8e3,h$=40,f$=8e3,x$=32,g$=4,b$=200,y$=32,A$=0,S$=15,z$=0,T$="satin",E$=64,C$=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),I$=0,R$=1,w$=0,O$=1,M$=0,k$=1,P$=0,L$=1,D$=0,v$=1,F$=2.333,N$=0,_$=1,B$=16,j$=64,V$=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),U$=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),H$=256,W$=new RegExp("^[a-f0-9]{64}$"),$$=0,G$=9007199254740991,K$=0,q$=9007199254740991,Y$=0,Q$=9007199254740991,J$=256,Z$=0,X$=0,eG=9007199254740991,tG=0,oG=9007199254740991,rG=64,sG=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),nG=1,iG=0,aG=1,cG=0,pG=1,dG=40,lG=8e3,uG=40,mG=8e3,hG="contain",fG="straight",xG=!0,gG="hidden",bG=64,yG=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),AG=0,SG=1,zG=0,TG=1,EG=0,CG=1,IG=0,RG=1,wG=0,OG=1,MG=2.333,kG=0,PG=1,LG=16,DG=64,vG=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),FG=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),NG=256,_G=new RegExp("^[a-f0-9]{64}$"),BG=0,jG=9007199254740991,VG=0,UG=9007199254740991,HG=0,WG=9007199254740991,$G=256,GG=0,KG=0,qG=9007199254740991,YG=0,QG=9007199254740991,JG=64,ZG=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),XG=1,e8=0,t8=1,o8=512,r8=new RegExp("^[^\\r\\n]+$"),s8=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),n8=16,i8=24,a8=128,c8=new RegExp("^[A-Za-z0-9][A-Za-z0-9 _.\\-]*$"),p8=100,d8=900,l8=8,u8=800,m8=1.2,h8=.6,f8=3,x8=0,g8=-20,b8=40,y8="center",A8=0,S8=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),z8=1,T8=0,E8=64,C8=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),I8=1,R8=0,w8=1,O8=512,M8=new RegExp("^[^\\r\\n]+$"),k8=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),P8=16,L8=24,D8=128,v8=new RegExp("^[A-Za-z0-9][A-Za-z0-9 _.\\-]*$"),F8=100,N8=900,_8=8,B8=800,j8=1.2,V8=.6,U8=3,H8=0,W8=-20,$8=40,G8="center",K8=0,q8=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),Y8=0,Q8=1,J8=0,Gm=E([c({kind:b("group"),id:n().min(1).max(yW).regex(AW),transform:c({position:H([i(),i(),i()]).default([0,0,0]),rotation:H([i(),i(),i()]).default([0,0,0]),scale:i().gt(zW).default(SW)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:i().min(EW).max(CW).default(TW),children:y($m).min(1).max(IW)}),c({kind:b("laptop"),id:n().min(1).max(RW).regex(wW),transform:c({position:H([i(),i(),i()]).default([0,0,0]),rotation:H([i(),i(),i()]).default([0,0,0]),scale:i().gt(MW).default(OW)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:i().min(PW).max(LW).default(kW),width:i().min(DW).max(vW),openAngle:i().min(FW).max(NW),materials:y(c({role:n().min(1).max(_W),type:h(["physical","unlit"]),color:E([n().regex(BW),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:i().min(jW).max(VW).optional(),metalness:i().min(UW).max(HW).optional(),clearcoat:i().min(WW).max($W).optional(),clearcoatRoughness:i().min(GW).max(KW).optional(),anisotropy:i().min(qW).max(YW).optional(),anisotropyRotation:i().optional(),ior:i().min(1).max(QW).optional(),reflectivity:i().min(JW).max(ZW).optional()})).max(XW).optional(),surfaces:O(n(),E([c({source:b("image"),assetSlot:n().min(1).max(e5).regex(t5).describe("Image asset slot name bound by the clip assets map; never a URL.")}),c({source:b("color"),color:E([n().regex(o5),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),c({source:b("component"),component:c({version:b(1),componentId:n().min(1).max(r5),sourceVersionId:n().regex(s5)}),captureFrame:A().min(n5).max(i5),layout:c({width:A().gt(a5).max(c5),height:A().gt(p5).max(d5)}),bakeScale:E([b(2),b(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:O(n(),le).optional()}),c({source:b("video"),mediaId:n().min(1).max(l5),startFrame:A().min(m5).max(h5).default(u5),endFrame:A().gt(f5).max(x5).optional()})])).optional()}),c({kind:b("phone"),id:n().min(1).max(g5).regex(b5),transform:c({position:H([i(),i(),i()]).default([0,0,0]),rotation:H([i(),i(),i()]).default([0,0,0]),scale:i().gt(A5).default(y5)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:i().min(z5).max(T5).default(S5),width:i().min(E5).max(C5),materials:y(c({role:n().min(1).max(I5),type:h(["physical","unlit"]),color:E([n().regex(R5),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:i().min(w5).max(O5).optional(),metalness:i().min(M5).max(k5).optional(),clearcoat:i().min(P5).max(L5).optional(),clearcoatRoughness:i().min(D5).max(v5).optional(),anisotropy:i().min(F5).max(N5).optional(),anisotropyRotation:i().optional(),ior:i().min(1).max(_5).optional(),reflectivity:i().min(B5).max(j5).optional()})).max(V5).optional(),surfaces:O(n(),E([c({source:b("image"),assetSlot:n().min(1).max(U5).regex(H5).describe("Image asset slot name bound by the clip assets map; never a URL.")}),c({source:b("color"),color:E([n().regex(W5),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),c({source:b("component"),component:c({version:b(1),componentId:n().min(1).max($5),sourceVersionId:n().regex(G5)}),captureFrame:A().min(K5).max(q5),layout:c({width:A().gt(Y5).max(Q5),height:A().gt(J5).max(Z5)}),bakeScale:E([b(2),b(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:O(n(),le).optional()}),c({source:b("video"),mediaId:n().min(1).max(X5),startFrame:A().min(t$).max(o$).default(e$),endFrame:A().gt(r$).max(s$).optional()})])).optional()}),c({kind:b("slab"),id:n().min(1).max(n$).regex(i$),transform:c({position:H([i(),i(),i()]).default([0,0,0]),rotation:H([i(),i(),i()]).default([0,0,0]),scale:i().gt(c$).default(a$)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:i().min(d$).max(l$).default(p$),width:i().min(u$).max(m$),height:i().min(h$).max(f$),thickness:i().min(g$).max(b$).default(x$),cornerRadius:i().min(A$).default(y$),edgeRadius:i().min(z$).default(S$),finish:h(["satin","brushed"]).default(T$),materials:y(c({role:n().min(1).max(E$),type:h(["physical","unlit"]),color:E([n().regex(C$),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:i().min(I$).max(R$).optional(),metalness:i().min(w$).max(O$).optional(),clearcoat:i().min(M$).max(k$).optional(),clearcoatRoughness:i().min(P$).max(L$).optional(),anisotropy:i().min(D$).max(v$).optional(),anisotropyRotation:i().optional(),ior:i().min(1).max(F$).optional(),reflectivity:i().min(N$).max(_$).optional()})).max(B$).optional(),surfaces:O(n(),E([c({source:b("image"),assetSlot:n().min(1).max(j$).regex(V$).describe("Image asset slot name bound by the clip assets map; never a URL.")}),c({source:b("color"),color:E([n().regex(U$),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),c({source:b("component"),component:c({version:b(1),componentId:n().min(1).max(H$),sourceVersionId:n().regex(W$)}),captureFrame:A().min($$).max(G$),layout:c({width:A().gt(K$).max(q$),height:A().gt(Y$).max(Q$)}),bakeScale:E([b(2),b(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:O(n(),le).optional()}),c({source:b("video"),mediaId:n().min(1).max(J$),startFrame:A().min(X$).max(eG).default(Z$),endFrame:A().gt(tG).max(oG).optional()})])).optional()}),c({kind:b("page"),id:n().min(1).max(rG).regex(sG),transform:c({position:H([i(),i(),i()]).default([0,0,0]),rotation:H([i(),i(),i()]).default([0,0,0]),scale:i().gt(iG).default(nG)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:i().min(cG).max(pG).default(aG),width:i().min(dG).max(lG),height:i().min(uG).max(mG),fit:h(["contain","cover"]).default(hG),transparency:h(["straight","premultiplied","opaque"]).default(fG),depthWrite:P().default(xG),backface:h(["hidden","visible"]).default(gG),materials:y(c({role:n().min(1).max(bG),type:h(["physical","unlit"]),color:E([n().regex(yG),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:i().min(AG).max(SG).optional(),metalness:i().min(zG).max(TG).optional(),clearcoat:i().min(EG).max(CG).optional(),clearcoatRoughness:i().min(IG).max(RG).optional(),anisotropy:i().min(wG).max(OG).optional(),anisotropyRotation:i().optional(),ior:i().min(1).max(MG).optional(),reflectivity:i().min(kG).max(PG).optional()})).max(LG).optional(),surfaces:O(n(),E([c({source:b("image"),assetSlot:n().min(1).max(DG).regex(vG).describe("Image asset slot name bound by the clip assets map; never a URL.")}),c({source:b("color"),color:E([n().regex(FG),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),c({source:b("component"),component:c({version:b(1),componentId:n().min(1).max(NG),sourceVersionId:n().regex(_G)}),captureFrame:A().min(BG).max(jG),layout:c({width:A().gt(VG).max(UG),height:A().gt(HG).max(WG)}),bakeScale:E([b(2),b(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:O(n(),le).optional()}),c({source:b("video"),mediaId:n().min(1).max($G),startFrame:A().min(KG).max(qG).default(GG),endFrame:A().gt(YG).max(QG).optional()})]))}),c({id:n().min(1).max(JG).regex(ZG),kind:b("text"),opacity:i().min(e8).max(t8).default(XG),lines:y(c({runs:y(c({text:n().min(1).max(o8).regex(r8),color:E([n().regex(s8),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),emphasis:P().optional()})).min(1).max(n8)})).min(1).max(i8),fontFamily:E([n().min(1).max(a8).regex(c8),h(["$brand:fonts.heading","$brand:fonts.body","$brand:fonts.caption"])]),fontWeight:A().min(p8).max(d8),fontStyle:h(["normal","italic"]),fontSize:i().min(l8).max(u8),lineHeight:i().min(h8).max(f8).default(m8),letterSpacing:i().min(g8).max(b8).default(x8),align:h(["left","center","right"]).default(y8),maxWidth:i().gt(A8).optional(),color:E([n().regex(S8),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]),space:b("world"),transform:c({position:H([i(),i(),i()]).default([0,0,0]),rotation:H([i(),i(),i()]).default([0,0,0]),scale:i().gt(T8).default(z8)}).default({position:[0,0,0],rotation:[0,0,0],scale:1})}),c({id:n().min(1).max(E8).regex(C8),kind:b("text"),opacity:i().min(R8).max(w8).default(I8),lines:y(c({runs:y(c({text:n().min(1).max(O8).regex(M8),color:E([n().regex(k8),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),emphasis:P().optional()})).min(1).max(P8)})).min(1).max(L8),fontFamily:E([n().min(1).max(D8).regex(v8),h(["$brand:fonts.heading","$brand:fonts.body","$brand:fonts.caption"])]),fontWeight:A().min(F8).max(N8),fontStyle:h(["normal","italic"]),fontSize:i().min(_8).max(B8),lineHeight:i().min(V8).max(U8).default(j8),letterSpacing:i().min(W8).max($8).default(H8),align:h(["left","center","right"]).default(G8),maxWidth:i().gt(K8).optional(),color:E([n().regex(q8),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]),space:b("screen"),x:i(),y:i(),rotation:i().default(Y8),scale:i().gt(J8).default(Q8)})]);var Z8=64,X8=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),e6=1,t6=0,o6=1,r6=0,s6=1,n6=16,i6=64,a6=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),c6=1,p6=0,d6=1,l6=0,u6=1,m6=200,h6=4e3,f6=0,x6=3.141592653589793,g6=64,b6=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),y6=0,A6=1,S6=0,z6=1,T6=0,E6=1,C6=0,I6=1,R6=0,w6=1,O6=2.333,M6=0,k6=1,P6=16,L6=64,D6=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),v6=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),F6=256,N6=new RegExp("^[a-f0-9]{64}$"),_6=0,B6=9007199254740991,j6=0,V6=9007199254740991,U6=0,H6=9007199254740991,W6=256,$6=0,G6=0,K6=9007199254740991,q6=0,Y6=9007199254740991,Q6=64,J6=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),Z6=1,X6=0,eK=1,tK=0,oK=1,rK=80,sK=2e3,nK=64,iK=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),aK=0,cK=1,pK=0,dK=1,lK=0,uK=1,mK=0,hK=1,fK=0,xK=1,gK=2.333,bK=0,yK=1,AK=16,SK=64,zK=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),TK=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),EK=256,CK=new RegExp("^[a-f0-9]{64}$"),IK=0,RK=9007199254740991,wK=0,OK=9007199254740991,MK=0,kK=9007199254740991,PK=256,LK=0,DK=0,vK=9007199254740991,FK=0,NK=9007199254740991,_K=64,BK=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),jK=1,VK=0,UK=1,HK=0,WK=1,$K=40,GK=8e3,KK=40,qK=8e3,YK=32,QK=4,JK=200,ZK=32,XK=0,e7=15,t7=0,o7="satin",r7=64,s7=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),n7=0,i7=1,a7=0,c7=1,p7=0,d7=1,l7=0,u7=1,m7=0,h7=1,f7=2.333,x7=0,g7=1,b7=16,y7=64,A7=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),S7=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),z7=256,T7=new RegExp("^[a-f0-9]{64}$"),E7=0,C7=9007199254740991,I7=0,R7=9007199254740991,w7=0,O7=9007199254740991,M7=256,k7=0,P7=0,L7=9007199254740991,D7=0,v7=9007199254740991,F7=64,N7=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),_7=1,B7=0,j7=1,V7=0,U7=1,H7=40,W7=8e3,$7=40,G7=8e3,K7="contain",q7="straight",Y7=!0,Q7="hidden",J7=64,Z7=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),X7=0,eq=1,tq=0,oq=1,rq=0,sq=1,nq=0,iq=1,aq=0,cq=1,pq=2.333,dq=0,lq=1,uq=16,mq=64,hq=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),fq=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),xq=256,gq=new RegExp("^[a-f0-9]{64}$"),bq=0,yq=9007199254740991,Aq=0,Sq=9007199254740991,zq=0,Tq=9007199254740991,Eq=256,Cq=0,Iq=0,Rq=9007199254740991,wq=0,Oq=9007199254740991,Mq=64,kq=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),Pq=1,Lq=0,Dq=1,vq=512,Fq=new RegExp("^[^\\r\\n]+$"),Nq=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),_q=16,Bq=24,jq=128,Vq=new RegExp("^[A-Za-z0-9][A-Za-z0-9 _.\\-]*$"),Uq=100,Hq=900,Wq=8,$q=800,Gq=1.2,Kq=.6,qq=3,Yq=0,Qq=-20,Jq=40,Zq="center",Xq=0,eY=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),tY=1,oY=0,rY=64,sY=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),nY=1,iY=0,aY=1,cY=512,pY=new RegExp("^[^\\r\\n]+$"),dY=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),lY=16,uY=24,mY=128,hY=new RegExp("^[A-Za-z0-9][A-Za-z0-9 _.\\-]*$"),fY=100,xY=900,gY=8,bY=800,yY=1.2,AY=.6,SY=3,zY=0,TY=-20,EY=40,CY="center",IY=0,RY=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),wY=0,OY=1,MY=0,Km=E([c({kind:b("group"),id:n().min(1).max(Z8).regex(X8),transform:c({position:H([i(),i(),i()]).default([0,0,0]),rotation:H([i(),i(),i()]).default([0,0,0]),scale:i().gt(t6).default(e6)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:i().min(r6).max(s6).default(o6),children:y(Gm).min(1).max(n6)}),c({kind:b("laptop"),id:n().min(1).max(i6).regex(a6),transform:c({position:H([i(),i(),i()]).default([0,0,0]),rotation:H([i(),i(),i()]).default([0,0,0]),scale:i().gt(p6).default(c6)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:i().min(l6).max(u6).default(d6),width:i().min(m6).max(h6),openAngle:i().min(f6).max(x6),materials:y(c({role:n().min(1).max(g6),type:h(["physical","unlit"]),color:E([n().regex(b6),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:i().min(y6).max(A6).optional(),metalness:i().min(S6).max(z6).optional(),clearcoat:i().min(T6).max(E6).optional(),clearcoatRoughness:i().min(C6).max(I6).optional(),anisotropy:i().min(R6).max(w6).optional(),anisotropyRotation:i().optional(),ior:i().min(1).max(O6).optional(),reflectivity:i().min(M6).max(k6).optional()})).max(P6).optional(),surfaces:O(n(),E([c({source:b("image"),assetSlot:n().min(1).max(L6).regex(D6).describe("Image asset slot name bound by the clip assets map; never a URL.")}),c({source:b("color"),color:E([n().regex(v6),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),c({source:b("component"),component:c({version:b(1),componentId:n().min(1).max(F6),sourceVersionId:n().regex(N6)}),captureFrame:A().min(_6).max(B6),layout:c({width:A().gt(j6).max(V6),height:A().gt(U6).max(H6)}),bakeScale:E([b(2),b(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:O(n(),le).optional()}),c({source:b("video"),mediaId:n().min(1).max(W6),startFrame:A().min(G6).max(K6).default($6),endFrame:A().gt(q6).max(Y6).optional()})])).optional()}),c({kind:b("phone"),id:n().min(1).max(Q6).regex(J6),transform:c({position:H([i(),i(),i()]).default([0,0,0]),rotation:H([i(),i(),i()]).default([0,0,0]),scale:i().gt(X6).default(Z6)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:i().min(tK).max(oK).default(eK),width:i().min(rK).max(sK),materials:y(c({role:n().min(1).max(nK),type:h(["physical","unlit"]),color:E([n().regex(iK),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:i().min(aK).max(cK).optional(),metalness:i().min(pK).max(dK).optional(),clearcoat:i().min(lK).max(uK).optional(),clearcoatRoughness:i().min(mK).max(hK).optional(),anisotropy:i().min(fK).max(xK).optional(),anisotropyRotation:i().optional(),ior:i().min(1).max(gK).optional(),reflectivity:i().min(bK).max(yK).optional()})).max(AK).optional(),surfaces:O(n(),E([c({source:b("image"),assetSlot:n().min(1).max(SK).regex(zK).describe("Image asset slot name bound by the clip assets map; never a URL.")}),c({source:b("color"),color:E([n().regex(TK),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),c({source:b("component"),component:c({version:b(1),componentId:n().min(1).max(EK),sourceVersionId:n().regex(CK)}),captureFrame:A().min(IK).max(RK),layout:c({width:A().gt(wK).max(OK),height:A().gt(MK).max(kK)}),bakeScale:E([b(2),b(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:O(n(),le).optional()}),c({source:b("video"),mediaId:n().min(1).max(PK),startFrame:A().min(DK).max(vK).default(LK),endFrame:A().gt(FK).max(NK).optional()})])).optional()}),c({kind:b("slab"),id:n().min(1).max(_K).regex(BK),transform:c({position:H([i(),i(),i()]).default([0,0,0]),rotation:H([i(),i(),i()]).default([0,0,0]),scale:i().gt(VK).default(jK)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:i().min(HK).max(WK).default(UK),width:i().min($K).max(GK),height:i().min(KK).max(qK),thickness:i().min(QK).max(JK).default(YK),cornerRadius:i().min(XK).default(ZK),edgeRadius:i().min(t7).default(e7),finish:h(["satin","brushed"]).default(o7),materials:y(c({role:n().min(1).max(r7),type:h(["physical","unlit"]),color:E([n().regex(s7),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:i().min(n7).max(i7).optional(),metalness:i().min(a7).max(c7).optional(),clearcoat:i().min(p7).max(d7).optional(),clearcoatRoughness:i().min(l7).max(u7).optional(),anisotropy:i().min(m7).max(h7).optional(),anisotropyRotation:i().optional(),ior:i().min(1).max(f7).optional(),reflectivity:i().min(x7).max(g7).optional()})).max(b7).optional(),surfaces:O(n(),E([c({source:b("image"),assetSlot:n().min(1).max(y7).regex(A7).describe("Image asset slot name bound by the clip assets map; never a URL.")}),c({source:b("color"),color:E([n().regex(S7),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),c({source:b("component"),component:c({version:b(1),componentId:n().min(1).max(z7),sourceVersionId:n().regex(T7)}),captureFrame:A().min(E7).max(C7),layout:c({width:A().gt(I7).max(R7),height:A().gt(w7).max(O7)}),bakeScale:E([b(2),b(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:O(n(),le).optional()}),c({source:b("video"),mediaId:n().min(1).max(M7),startFrame:A().min(P7).max(L7).default(k7),endFrame:A().gt(D7).max(v7).optional()})])).optional()}),c({kind:b("page"),id:n().min(1).max(F7).regex(N7),transform:c({position:H([i(),i(),i()]).default([0,0,0]),rotation:H([i(),i(),i()]).default([0,0,0]),scale:i().gt(B7).default(_7)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:i().min(V7).max(U7).default(j7),width:i().min(H7).max(W7),height:i().min($7).max(G7),fit:h(["contain","cover"]).default(K7),transparency:h(["straight","premultiplied","opaque"]).default(q7),depthWrite:P().default(Y7),backface:h(["hidden","visible"]).default(Q7),materials:y(c({role:n().min(1).max(J7),type:h(["physical","unlit"]),color:E([n().regex(Z7),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:i().min(X7).max(eq).optional(),metalness:i().min(tq).max(oq).optional(),clearcoat:i().min(rq).max(sq).optional(),clearcoatRoughness:i().min(nq).max(iq).optional(),anisotropy:i().min(aq).max(cq).optional(),anisotropyRotation:i().optional(),ior:i().min(1).max(pq).optional(),reflectivity:i().min(dq).max(lq).optional()})).max(uq).optional(),surfaces:O(n(),E([c({source:b("image"),assetSlot:n().min(1).max(mq).regex(hq).describe("Image asset slot name bound by the clip assets map; never a URL.")}),c({source:b("color"),color:E([n().regex(fq),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),c({source:b("component"),component:c({version:b(1),componentId:n().min(1).max(xq),sourceVersionId:n().regex(gq)}),captureFrame:A().min(bq).max(yq),layout:c({width:A().gt(Aq).max(Sq),height:A().gt(zq).max(Tq)}),bakeScale:E([b(2),b(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:O(n(),le).optional()}),c({source:b("video"),mediaId:n().min(1).max(Eq),startFrame:A().min(Iq).max(Rq).default(Cq),endFrame:A().gt(wq).max(Oq).optional()})]))}),c({id:n().min(1).max(Mq).regex(kq),kind:b("text"),opacity:i().min(Lq).max(Dq).default(Pq),lines:y(c({runs:y(c({text:n().min(1).max(vq).regex(Fq),color:E([n().regex(Nq),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),emphasis:P().optional()})).min(1).max(_q)})).min(1).max(Bq),fontFamily:E([n().min(1).max(jq).regex(Vq),h(["$brand:fonts.heading","$brand:fonts.body","$brand:fonts.caption"])]),fontWeight:A().min(Uq).max(Hq),fontStyle:h(["normal","italic"]),fontSize:i().min(Wq).max($q),lineHeight:i().min(Kq).max(qq).default(Gq),letterSpacing:i().min(Qq).max(Jq).default(Yq),align:h(["left","center","right"]).default(Zq),maxWidth:i().gt(Xq).optional(),color:E([n().regex(eY),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]),space:b("world"),transform:c({position:H([i(),i(),i()]).default([0,0,0]),rotation:H([i(),i(),i()]).default([0,0,0]),scale:i().gt(oY).default(tY)}).default({position:[0,0,0],rotation:[0,0,0],scale:1})}),c({id:n().min(1).max(rY).regex(sY),kind:b("text"),opacity:i().min(iY).max(aY).default(nY),lines:y(c({runs:y(c({text:n().min(1).max(cY).regex(pY),color:E([n().regex(dY),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),emphasis:P().optional()})).min(1).max(lY)})).min(1).max(uY),fontFamily:E([n().min(1).max(mY).regex(hY),h(["$brand:fonts.heading","$brand:fonts.body","$brand:fonts.caption"])]),fontWeight:A().min(fY).max(xY),fontStyle:h(["normal","italic"]),fontSize:i().min(gY).max(bY),lineHeight:i().min(AY).max(SY).default(yY),letterSpacing:i().min(TY).max(EY).default(zY),align:h(["left","center","right"]).default(CY),maxWidth:i().gt(IY).optional(),color:E([n().regex(RY),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]),space:b("screen"),x:i(),y:i(),rotation:i().default(wY),scale:i().gt(MY).default(OY)})]);var kY=16,PY=8192,LY=16,DY=8192,vY=.3141592653589793,FY=1.3962634015954636,NY="studio",_Y="soft",BY=1,jY=0,VY=-420,UY=.5,HY=0,WY=1,$Y={lightingProfile:"studio",preset:"soft",intensity:1,floorY:-420,shadowOpacity:.5},GY=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),KY=0,qY=0,YY=1,QY=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),JY=2,ZY=8,XY=0,eQ=1,tQ=0,oQ=1,rQ=0,sQ=1,nQ=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),iQ=2,aQ=8,cQ={kind:"transparent"},pQ=64,dQ=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),lQ=0,uQ=1,mQ=0,hQ=1,fQ=-4,xQ=5,gQ=0,bQ=1,yQ=-4,AQ=5,SQ=256,zQ=[],TQ=0,EQ=0,CQ=.5,IQ=0,RQ=0,wQ=1,OQ=0,MQ=0,kQ=0,PQ=64,LQ=null,DQ={grain:0,vignette:0,focus:null},vQ=64,FQ=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),NQ=2,_Q=0,BQ=[],rc=c({version:b(2),referenceSize:c({width:A().min(kY).max(PY),height:A().min(LY).max(DY)}),camera:c({position:H([i(),i(),i()]).optional(),rotation:H([i(),i(),i()]).optional(),fov:i().min(vY).max(FY).optional()}).optional(),environment:E([c({kind:b("studio").optional(),lightingProfile:h(["studio","studio-edge"]).default(NY),preset:h(["soft","key","rim"]).default(_Y),intensity:i().min(jY).default(BY),floorY:i().default(VY),shadowOpacity:i().min(HY).max(WY).default(UY)}),c({kind:b("photographic-studio-v1")})]).default($Y),backdrop:E([c({kind:b("transparent")}),c({kind:b("solid"),color:E([n().regex(GY),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),c({kind:b("linear"),angle:i().default(KY),stops:y(c({at:i().min(qY).max(YY),color:E([n().regex(QY),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])})).min(JY).max(ZY)}),c({kind:b("radial"),at:H([i().min(XY).max(eQ),i().min(tQ).max(oQ)]).default([.5,.5]),stops:y(c({at:i().min(rQ).max(sQ),color:E([n().regex(nQ),h(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])})).min(iQ).max(aQ)})]).default(cQ),layers:y(Km).min(1),animation:y(c({target:E([c({kind:b("camera")}),c({kind:b("layer"),layerId:n().min(1).max(pQ).regex(dQ)}),c({kind:b("environment")}),c({kind:b("focus")})]),property:h(["positionX","positionY","positionZ","rotationX","rotationY","rotationZ","fov","scale","opacity","openAngle","x","y","rotation","intensity","distance","range","maxBlur"]),keyframes:y(c({at:i().min(lQ).max(uQ),value:i(),easing:E([c({kind:b("linear")}),c({kind:b("hold")}),c({kind:b("bezier"),x1:i().min(mQ).max(hQ),y1:i().min(fQ).max(xQ),x2:i().min(gQ).max(bQ),y2:i().min(yQ).max(AQ)})]).optional()})).min(1).max(SQ)})).default(zQ),post:c({grain:i().min(EQ).max(CQ).default(TQ),vignette:i().min(RQ).max(wQ).default(IQ),focus:E([c({distance:i().gt(OQ),range:i().gt(MQ),maxBlur:i().min(kQ).max(PQ)}),G()]).default(LQ)}).default(DQ),constraints:y(c({kind:b("minSeparation"),objects:y(n().min(1).max(vQ).regex(FQ)).min(NQ),gap:i().gt(_Q)})).default(BQ)}).describe("A version-2 scene shot: a self-contained 3D world-object shot that scene.add / scene.update materializes into an ordinary component clip. The shot owns its layers, camera, lighting, backdrop and normalized local animation; the composition owns start, duration, ordering, cuts and transitions. Coordinates are REFERENCE PIXELS: origin at frame centre, +X right, +Y down, +Z toward the viewer. referenceSize must have the SAME aspect ratio as the composition format; mismatch fails instead of cropping. At equal aspect ratio the shot scales uniformly by outputWidth/referenceWidth. A segment's easing belongs to the keyframe it ARRIVES at; the first keyframe has no easing. Authoring limits: 32 layers, 4 devices, 16 distinct image slots, 256 keyframes per channel, 2048 keyframes per shot. Version 2 supports nested groups, procedural slab/page/phone/laptop objects, screen- and world-space text, admitted image/component/video surfaces, fixed photographic and generated studio environments, transparent/solid/linear/radial backdrops, constraints, focus, grain and vignette. Raw HTML, custom shader props, imported GLB models, arbitrary external HDR environments, skeletal animation and physics are refused with an exact field path.");var jQ=0,sc=c({type:h(["cut","fade","dissolve","wipe"]),duration:i().min(jQ).optional()}).describe("Inter-scene transition.");var VQ=0,UQ=0,HQ=0,WQ=0,$Q=0,GQ=0,KQ=0,qQ=0,YQ=0,QQ=0,JQ=0,ZQ=4,XQ=0,eJ=0,tJ=0,oJ=0,rJ=0,sJ=0,nJ=0,iJ=0,aJ=0,cJ=1,pJ=0,dJ=1,lJ=.1,uJ=1,mJ=0,hJ=0,fJ=-.3,xJ=.3,gJ=-.3,bJ=.3,yJ=0,AJ=1,SJ=0,zJ=1,TJ=-.3,EJ=.3,CJ=0,IJ=1,RJ=0,wJ=-1,OJ=2,MJ=-1,kJ=2,PJ=0,LJ=1,DJ=0,vJ=1,FJ=0,NJ=1,_J=0,BJ=1,jJ=0,VJ=0,UJ=2,HJ=0,WJ=0,$J=0,GJ=0,KJ=0,qJ=0,YJ=0,QJ=4,JJ=0,ZJ=0,XJ=0,eZ=0,tZ=0,oZ=0,rZ=0,sZ=0,nZ=0,iZ=1,aZ=0,cZ=1,pZ=.1,dZ=1,lZ=0,uZ=0,mZ=-.3,hZ=.3,fZ=-.3,xZ=.3,gZ=0,bZ=1,yZ=0,AZ=1,SZ=-.3,zZ=.3,TZ=0,EZ=1,CZ=0,IZ=-1,RZ=2,wZ=-1,OZ=2,MZ=0,kZ=1,PZ=0,LZ=1,DZ=0,vZ=1,FZ=0,NZ=1,_Z=0,BZ=0,jZ=2,VZ=0,UZ=0,HZ=0,WZ=0,$Z=0,GZ=0,KZ=0,qZ=4,YZ=0,QZ=0,JZ=0,ZZ=0,XZ=0,eX=0,tX=0,oX=0,rX=0,sX=1,nX=0,iX=1,aX=.1,cX=1,pX=0,dX=0,lX=-.3,uX=.3,mX=-.3,hX=.3,fX=0,xX=1,gX=0,bX=1,yX=-.3,AX=.3,SX=0,zX=1,TX=0,EX=-1,CX=2,IX=-1,RX=2,wX=0,OX=1,MX=0,kX=1,PX=0,LX=1,DX=0,vX=1,FX=0,NX=0,_X=2,BX=0,jX=0,VX=0,UX=0,HX=0,WX=0,$X=0,GX=1,KX=0,qX=1,YX=.1,QX=1,JX=0,ZX=0,XX=-.3,eee=.3,tee=-.3,oee=.3,ree=15,see=100,nee=900,iee=0,aee=1,cee=0,pee=1,dee=0,lee=1,uee=0,mee=1,hee=-5,fee=20,xee=0,gee=2,bee=0,yee=2,Aee=0,See=100,zee=900,Tee=0,Eee=0,Cee=0,Iee=0,Ree=.5,wee=12,Oee=0,Mee=100,kee=0,Pee=9007199254740991,Lee=0,Dee=9007199254740991,vee=0,Fee=9007199254740991,Nee=0,_ee=1,Bee=0,jee=1,Vee=0,Uee=1,Hee=0,Wee=1,$ee=.25,Gee=4,Kee=-45,qee=45,Yee=15,Qee=100,Jee=900,Zee=-5,Xee=20,ete=0,tte=2,ote=0,rte=2,ste=0,nte=100,ite=900,ate=0,cte=.5,pte=12,dte=0,lte=0,ute=0,mte=0,hte=9007199254740991,fte=0,xte=9007199254740991,gte=0,bte=0,yte=15,Ate=100,Ste=900,zte=0,Tte=1,Ete=0,Cte=1,Ite=0,Rte=1,wte=0,Ote=1,Mte=-5,kte=20,Pte=0,Lte=2,Dte=0,vte=2,Fte=0,Nte=100,_te=900,Bte=0,jte=0,Vte=0,Ute=0,Hte=.5,Wte=12,$te=0,Gte=100,Kte=0,qte=0,Yte=0,Qte=2e3,nc=E([c({type:b("scene.add"),clipId:n(),trackId:n().optional(),newTrack:P().optional(),newTrackId:n().optional(),startTime:i().min(VQ),duration:i().gt(UQ),scene:rc,assets:O(n(),n()),transitionIn:sc.optional()}).describe('Author a scene shot and place it on a dedicated overlay track. The host validates the scene, generates and registers an immutable wrapper component source, and emits the ordinary track/clip operations carrying `props.componentRef` \u2014 you edit a scene SPEC, never wrapper TSX or a source hash. Registration and the composition update are ONE undoable edit; a failure publishes nothing and leaves no clip pointing at an unresolved source. Pass EXACTLY ONE of `trackId` (an existing dedicated scene track) or `newTrack: true` (mint one). That track holds scene-shot clips and gaps only \u2014 no generic component/primitive/media clips in v1 \u2014 and existing generic overlay tracks are unaffected. Scene clips use front zPlane and full-frame placement: outer per-clip `region`, `position`, `scale`, `rotation`, `fit`, `effects`, `animate`, `params.transition`, `params.sequenceGroup` and internal fadeIn/fadeOut are REFUSED with a path, because the shot\'s own layer transforms are the single transform owner. TEXT: `space: "screen"` text is composed above the world result, stays fixed in the frame and stays sharp through focus; `space: "world"` text is rasterized into the 3D scene, moves with the camera and is occluded by geometry. Screenshots and world text are UNLIT and colour-managed so product UI colours are not tinted by the studio lighting, while device bodies are lit and cast shadows; an unlit surface still occludes. SCOPE GAP (pre-existing, neither closed nor changed by scene shots): global wrap effects \u2014 composition-level grades and camera effects \u2014 do not reach front-overlay clips, so they do not affect a scene shot. Author the look INSIDE the shot (`post.grain`, `post.vignette`, `post.focus`, `backdrop`, `environment`) instead. DISCOVERY: there is no built-in scene primitive to look up in list_catalog; the wrapper this operation registers appears afterwards as an ordinary INSTALLED component under the existing catalog rules. ASSETS: `assets` binds each slot name a layer references to a media id in the same project, and the slot\'s declared KIND decides what it admits \u2014 an image slot takes PNG, JPEG or WebP, a video slot MP4 or WebM. Binding the wrong kind is refused with the slot\'s path.'),c({type:b("scene.update"),clipId:n(),startTime:i().min(HQ).optional(),duration:i().gt(WQ).optional(),scene:rc.optional(),assets:O(n(),n()).optional(),transitionIn:sc.optional()}).describe("Revise a scene shot in place by clip id. Send a replacement `scene` and/or `assets`; timing changes use the ordinary clip timing fields (`startTime`, `duration`, `transitionIn`). Omitted fields keep their persisted values and the MERGED result is re-validated as a whole, so a partial edit cannot leave the shot invalid. Changing only values or asset IDs updates props and bindings and REUSES the pinned source; changing the referenced SLOT SET regenerates the wrapper manifest and registers a new immutable source version atomically. Undo restores the source reference, spec, bindings and timing together. Topology, asset bindings, text content, font properties, device kind and colours are STATIC within a shot's animation \u2014 change them here (a revised spec) rather than trying to animate them. This is not a source trim or slip: a shortened or extended clip resamples the SAME normalized animation over its new duration, and trim/slip requests on generated animation are rejected rather than reinterpreted as media trims. In one batch, `scene.update` may target a shot added by an earlier `scene.add`. ASSETS: `assets` binds each slot name a layer references to a media id in the same project, and the slot's declared KIND decides what it admits \u2014 an image slot takes PNG, JPEG or WebP, a video slot MP4 or WebM. Binding the wrong kind is refused with the slot's path."),c({type:b("clip.add"),clip:c({id:n().min(1),startTime:i().min($Q).describe("Timeline start (seconds)."),duration:i().gt(GQ).describe("Clip duration (seconds)."),source:E([c({kind:b("media"),mediaId:n().min(1),trim:c({start:i().min(KQ).describe("Source trim start (seconds)."),end:i().min(qQ).describe("Source trim end (seconds).")}).optional(),excludedRanges:y(c({start:i().min(YQ),end:i().min(QQ),reason:n().optional()})).optional(),volume:i().min(JQ).max(ZQ).optional(),muted:P().optional(),playbackRate:i().gt(XQ).optional(),sync:h(["video","independent"]).optional(),kenBurns:h(["in","out","pan-l","pan-r","none"]).optional(),volumeDb:i().optional(),fadeInMs:i().min(eJ).optional(),fadeOutMs:i().min(tJ).optional(),loop:P().optional(),audioRole:h(["sfx","music","vo","ambience"]).optional(),duck:c({duckDb:i().max(oJ),attackMs:i().min(rJ),releaseMs:i().min(sJ),windows:y(c({startMs:i(),endMs:i()})).optional()}).optional(),anchor:c({clipId:n().min(1),offsetMs:i()}).optional(),reframe:c({segments:y(c({startSec:i().min(nJ).describe("Segment START in seconds, clip-relative. Segments tile the clip's duration in order."),endSec:i().gt(iJ).describe("Segment END in seconds, clip-relative. The span (endSec \u2212 startSec) is this segment's duration \u2014 the window `ease` ramps over."),focus:E([c({mode:b("frame-center")}),c({mode:b("point"),x:i().min(aJ).max(cJ),y:i().min(pJ).max(dJ)}),c({mode:b("face"),faceId:n().min(1),shotScale:h(["close","standard","wide"]).optional()}),c({mode:b("all-faces")}),c({mode:b("active-speaker")})]).describe("WHO/WHAT the camera tracks this segment (the reframe center), selected by `mode`: `frame-center` = no tracking, hold the geometric center (static/graphic footage, or a pure zoom); `point` = lock to a fixed source-normalized {x,y} (a non-moving on-screen element); `face` = track a detected face by `faceId` (from get_media_context), with optional `shotScale` close|standard|wide for tightness; `all-faces` = frame the bounding box of every detected face (group/ensemble shots); `active-speaker` = follow whoever is speaking (diarized talking-head / podcast). Pick by what the beat is about; pair with `zoom` for how tight."),intent:n().optional().describe("Optional editorial LABEL for diff/log readability (e.g. 'speaker-tight', 'wide-context'). Cosmetic \u2014 NOT honored by the derive math and excluded from the variant cache key."),zoom:i().min(lJ).max(uJ).optional().describe("How TIGHT the framing is \u2014 the fraction of the source the output viewport shows. <1 punches IN (a smaller source fraction, magnified to fill the frame); 1 = the full frame (no crop). ~0.6\u20130.8 is a moderate push-in, ~0.5 a tight close-up, 0.1 the maximum zoom. There is NO zoom-OUT past the full frame (max 1). Omit for the full frame. MUTUALLY EXCLUSIVE with `focus.shotScale` \u2014 a face-tracked shot is sized EITHER by the editorial scale (shotScale, which the bake calibrates to the detected face) OR by an explicit zoom, never both. A segment carrying both is REJECTED: shotScale wins at bake time and the zoom would be silently discarded."),ease:c({in:i().min(mJ).describe("Ease-IN ramp DURATION in seconds at the segment START."),out:i().min(hJ).describe("Ease-OUT ramp DURATION in seconds at the segment END.")}).optional().describe("Zoom/center ramp DURATIONS in SECONDS at this segment's edges \u2014 NOT a unitless 0\u20131 curve. ~0.3\u20130.6s reads as a snappy push; >1s reads sluggish. Keep `in` + `out` \u2264 the segment's duration (endSec \u2212 startSec): the two edges share the span, so to ramp across the WHOLE segment set one edge to the full duration and the other to 0. Omit for an instant cut to this framing."),bias:c({x:i().min(fJ).max(xJ).describe("Horizontal nudge, source-normalized (+ = right)."),y:i().min(gJ).max(bJ).describe("Vertical nudge, source-normalized (+ = down).")}).optional().describe("Optional FINE framing nudge off the focus center, source-normalized in [\u22120.3, 0.3]. A small correction (headroom, rule-of-thirds), NOT a reframe \u2014 use `focus`/`zoom` for the actual shot. Omit (treated as 0) to sit dead-center on the focus.")})).min(1)}).optional()}),c({kind:b("component"),componentId:n().min(1),props:O(n(),L()),assets:O(n(),n().min(1)).optional().describe("Manifest asset slot \u2192 project media id. At mount each slot arrives as `assets[slot].handle`, a fetchable URL for <Img>/<Video>/<Audio>; `props` becomes `params` and never carries an asset URL."),zPlane:h(["front","behind-subject"]).optional()}),c({kind:b("overlay"),primitiveId:n().min(1),params:O(n(),L()),zPlane:h(["front","behind-subject"]).optional(),anchor:c({space:b("scene"),x:i().min(yJ).max(AJ),y:i().min(SJ).max(zJ)}).optional(),parallax:i().min(TJ).max(EJ).optional()}),c({kind:b("effect"),primitiveId:n().min(1),params:O(n(),L()).optional()}),c({kind:b("card"),html:n().min(1).describe("Your card's HTML \u2014 rendered VERBATIM as the graphic (shell motion via applyMotionPreset in a FOLLOWING call). CANVAS CONTRACT: the card renders in a viewport equal to the composition format's pixel frame (1080\xD71920 at 9:16 fhd); the root is NOT auto-pinned \u2014 declare explicit width/height matching the frame (box-sizing:border-box) and anchor content with flex/grid; position:absolute;inset:0 on the root does NOT fill the frame; for edge-to-edge backgrounds add an inner absolutely-positioned layer with generous negative inset. Overlay compositing applies a ~92% safe-area inset \u2014 keep critical copy away from the extreme edges. FONTS: name a family from GET /v1/fonts (list_render_fonts) \u2014 the renderer loads those faces for the card and waits for them, so `font-family: Inter` draws Inter. `@import` and remote font files are REFUSED: the card renders with no network. A family that is not on that list has no bytes behind it and the browser falls back, so end any stack with a generic (`Inter, sans-serif`) rather than relying on a system face being present."),tokens:O(n(),n()).optional(),zPlane:b("front").optional()})]),kind:h(["video","audio","image","overlay","effect"]).optional(),opacity:i().min(CJ).max(IJ).optional(),scale:i().gt(RJ).optional(),rotation:i().optional(),position:c({x:i().min(wJ).max(OJ),y:i().min(MJ).max(kJ)}).optional().describe("Clip CENTRE as a fraction of the frame: {x:0.5,y:0.5} is dead centre, 0 to 1 is inside the frame, and a little overshoot (down to -1, up to 2) is how an entrance starts off-canvas. NOT pixels: the renderer maps x to `left: x*100%`, so `x: 180` sits 180 frame-widths away and draws nothing."),region:c({x:i().min(PJ).max(LJ),y:i().min(DJ).max(vJ),w:i().gt(FJ).max(NJ),h:i().gt(_J).max(BJ)}).optional(),fit:h(["cover","contain"]).optional(),captionVisibility:h(["visible","hidden"]).optional().describe("Video media clip only. Hide native captions while this clip is topmost and covers the lower picture, or when an opaque, effect-free clip has an explicitly full-frame region, even with fit:contain. Caption words and timings remain stored and resume when another visible clip takes over."),effects:y(c({primitiveId:n().min(1),params:O(n(),L()).optional()})).optional(),transitionIn:c({type:n().min(1),duration:i().gt(jJ)}).optional(),linkGroupId:n().min(1).optional(),animate:O(n(),y(c({time:i().min(VJ),value:i(),easing:E([h(["linear","ease","easeIn","easeOut","easeInOut"]),c({cubicBezier:H([i(),i(),i(),i()])})]).optional()})).min(UJ)).optional().describe("Keyframe channels, clip-relative seconds. Each channel's values use the SAME unit as the scalar it animates: `opacity` 0 to 1, `scale` a multiplier (>0), `rotation` degrees, `position.x`/`position.y` a FRACTION of the frame like `position` (0.5 = centre; NOT pixels), `volume` 0 to 4.")}),trackId:n().optional(),newTrack:P().optional(),newTrackId:n().optional()}).describe("Add a clip to the timeline. The clip self-routes to a track by FAMILY (`clip.kind`, else derived from `source.kind`, else the target track) \u2014 a `media` clip MUST carry `kind` (video|audio|image) or a `trackId`, else it is rejected as ambiguous. `trackId` targets an existing SAME-family track; `newTrack:true` (with optional pinned `newTrackId`) creates a fresh track of that family."),c({type:b("clip.remove"),clipId:n()}).describe("Remove a clip by id (located across every track)."),c({type:b("clip.update"),clipId:n(),patch:c({id:n().min(1).optional(),startTime:i().min(HJ).optional().describe("Timeline start (seconds)."),duration:i().gt(WJ).optional().describe("Clip duration (seconds)."),source:E([c({kind:b("media"),mediaId:n().min(1),trim:c({start:i().min($J).describe("Source trim start (seconds)."),end:i().min(GJ).describe("Source trim end (seconds).")}).optional(),excludedRanges:y(c({start:i().min(KJ),end:i().min(qJ),reason:n().optional()})).optional(),volume:i().min(YJ).max(QJ).optional(),muted:P().optional(),playbackRate:i().gt(JJ).optional(),sync:h(["video","independent"]).optional(),kenBurns:h(["in","out","pan-l","pan-r","none"]).optional(),volumeDb:i().optional(),fadeInMs:i().min(ZJ).optional(),fadeOutMs:i().min(XJ).optional(),loop:P().optional(),audioRole:h(["sfx","music","vo","ambience"]).optional(),duck:c({duckDb:i().max(eZ),attackMs:i().min(tZ),releaseMs:i().min(oZ),windows:y(c({startMs:i(),endMs:i()})).optional()}).optional(),anchor:c({clipId:n().min(1),offsetMs:i()}).optional(),reframe:c({segments:y(c({startSec:i().min(rZ).describe("Segment START in seconds, clip-relative. Segments tile the clip's duration in order."),endSec:i().gt(sZ).describe("Segment END in seconds, clip-relative. The span (endSec \u2212 startSec) is this segment's duration \u2014 the window `ease` ramps over."),focus:E([c({mode:b("frame-center")}),c({mode:b("point"),x:i().min(nZ).max(iZ),y:i().min(aZ).max(cZ)}),c({mode:b("face"),faceId:n().min(1),shotScale:h(["close","standard","wide"]).optional()}),c({mode:b("all-faces")}),c({mode:b("active-speaker")})]).describe("WHO/WHAT the camera tracks this segment (the reframe center), selected by `mode`: `frame-center` = no tracking, hold the geometric center (static/graphic footage, or a pure zoom); `point` = lock to a fixed source-normalized {x,y} (a non-moving on-screen element); `face` = track a detected face by `faceId` (from get_media_context), with optional `shotScale` close|standard|wide for tightness; `all-faces` = frame the bounding box of every detected face (group/ensemble shots); `active-speaker` = follow whoever is speaking (diarized talking-head / podcast). Pick by what the beat is about; pair with `zoom` for how tight."),intent:n().optional().describe("Optional editorial LABEL for diff/log readability (e.g. 'speaker-tight', 'wide-context'). Cosmetic \u2014 NOT honored by the derive math and excluded from the variant cache key."),zoom:i().min(pZ).max(dZ).optional().describe("How TIGHT the framing is \u2014 the fraction of the source the output viewport shows. <1 punches IN (a smaller source fraction, magnified to fill the frame); 1 = the full frame (no crop). ~0.6\u20130.8 is a moderate push-in, ~0.5 a tight close-up, 0.1 the maximum zoom. There is NO zoom-OUT past the full frame (max 1). Omit for the full frame. MUTUALLY EXCLUSIVE with `focus.shotScale` \u2014 a face-tracked shot is sized EITHER by the editorial scale (shotScale, which the bake calibrates to the detected face) OR by an explicit zoom, never both. A segment carrying both is REJECTED: shotScale wins at bake time and the zoom would be silently discarded."),ease:c({in:i().min(lZ).describe("Ease-IN ramp DURATION in seconds at the segment START."),out:i().min(uZ).describe("Ease-OUT ramp DURATION in seconds at the segment END.")}).optional().describe("Zoom/center ramp DURATIONS in SECONDS at this segment's edges \u2014 NOT a unitless 0\u20131 curve. ~0.3\u20130.6s reads as a snappy push; >1s reads sluggish. Keep `in` + `out` \u2264 the segment's duration (endSec \u2212 startSec): the two edges share the span, so to ramp across the WHOLE segment set one edge to the full duration and the other to 0. Omit for an instant cut to this framing."),bias:c({x:i().min(mZ).max(hZ).describe("Horizontal nudge, source-normalized (+ = right)."),y:i().min(fZ).max(xZ).describe("Vertical nudge, source-normalized (+ = down).")}).optional().describe("Optional FINE framing nudge off the focus center, source-normalized in [\u22120.3, 0.3]. A small correction (headroom, rule-of-thirds), NOT a reframe \u2014 use `focus`/`zoom` for the actual shot. Omit (treated as 0) to sit dead-center on the focus.")})).min(1)}).optional()}),c({kind:b("component"),componentId:n().min(1),props:O(n(),L()),assets:O(n(),n().min(1)).optional().describe("Manifest asset slot \u2192 project media id. At mount each slot arrives as `assets[slot].handle`, a fetchable URL for <Img>/<Video>/<Audio>; `props` becomes `params` and never carries an asset URL."),zPlane:h(["front","behind-subject"]).optional()}),c({kind:b("overlay"),primitiveId:n().min(1),params:O(n(),L()),zPlane:h(["front","behind-subject"]).optional(),anchor:c({space:b("scene"),x:i().min(gZ).max(bZ),y:i().min(yZ).max(AZ)}).optional(),parallax:i().min(SZ).max(zZ).optional()}),c({kind:b("effect"),primitiveId:n().min(1),params:O(n(),L()).optional()}),c({kind:b("card"),html:n().min(1).describe("Your card's HTML \u2014 rendered VERBATIM as the graphic (shell motion via applyMotionPreset in a FOLLOWING call). CANVAS CONTRACT: the card renders in a viewport equal to the composition format's pixel frame (1080\xD71920 at 9:16 fhd); the root is NOT auto-pinned \u2014 declare explicit width/height matching the frame (box-sizing:border-box) and anchor content with flex/grid; position:absolute;inset:0 on the root does NOT fill the frame; for edge-to-edge backgrounds add an inner absolutely-positioned layer with generous negative inset. Overlay compositing applies a ~92% safe-area inset \u2014 keep critical copy away from the extreme edges. FONTS: name a family from GET /v1/fonts (list_render_fonts) \u2014 the renderer loads those faces for the card and waits for them, so `font-family: Inter` draws Inter. `@import` and remote font files are REFUSED: the card renders with no network. A family that is not on that list has no bytes behind it and the browser falls back, so end any stack with a generic (`Inter, sans-serif`) rather than relying on a system face being present."),tokens:O(n(),n()).optional(),zPlane:b("front").optional()})]).optional(),kind:h(["video","audio","image","overlay","effect"]).optional(),opacity:i().min(TZ).max(EZ).optional(),scale:i().gt(CZ).optional(),rotation:i().optional(),position:c({x:i().min(IZ).max(RZ),y:i().min(wZ).max(OZ)}).optional().describe("Clip CENTRE as a fraction of the frame: {x:0.5,y:0.5} is dead centre, 0 to 1 is inside the frame, and a little overshoot (down to -1, up to 2) is how an entrance starts off-canvas. NOT pixels: the renderer maps x to `left: x*100%`, so `x: 180` sits 180 frame-widths away and draws nothing."),region:c({x:i().min(MZ).max(kZ),y:i().min(PZ).max(LZ),w:i().gt(DZ).max(vZ),h:i().gt(FZ).max(NZ)}).optional(),fit:h(["cover","contain"]).optional(),captionVisibility:h(["visible","hidden"]).optional().describe("Video media clip only. Hide native captions while this clip is topmost and covers the lower picture, or when an opaque, effect-free clip has an explicitly full-frame region, even with fit:contain. Caption words and timings remain stored and resume when another visible clip takes over."),effects:y(c({primitiveId:n().min(1),params:O(n(),L()).optional()})).optional(),transitionIn:c({type:n().min(1),duration:i().gt(_Z)}).optional(),linkGroupId:n().min(1).optional(),animate:O(n(),y(c({time:i().min(BZ),value:i(),easing:E([h(["linear","ease","easeIn","easeOut","easeInOut"]),c({cubicBezier:H([i(),i(),i(),i()])})]).optional()})).min(jZ)).optional().describe("Keyframe channels, clip-relative seconds. Each channel's values use the SAME unit as the scalar it animates: `opacity` 0 to 1, `scale` a multiplier (>0), `rotation` degrees, `position.x`/`position.y` a FRACTION of the frame like `position` (0.5 = centre; NOT pixels), `volume` 0 to 4.")})}).describe("Patch an existing clip by id (cross-family). The patch is a partial TimelineClip. NOTE: `source` is REPLACED wholesale \u2014 the patch merges at the top level only, so a partial `source` WIPES the source fields you omit. Patch the whole source object when changing it. (To change reframe/excluded ranges, prefer setCropIntents / addExcludedRange, not a source patch.)"),c({type:b("removeClipsByMediaId"),mediaId:n()}).describe("Remove EVERY clip sourced from a given mediaId (e.g. after deleting that media)."),c({type:b("loadOverlays"),clips:y(c({id:n().min(1),startTime:i().min(VZ).describe("Timeline start (seconds)."),duration:i().gt(UZ).describe("Clip duration (seconds)."),source:E([c({kind:b("media"),mediaId:n().min(1),trim:c({start:i().min(HZ).describe("Source trim start (seconds)."),end:i().min(WZ).describe("Source trim end (seconds).")}).optional(),excludedRanges:y(c({start:i().min($Z),end:i().min(GZ),reason:n().optional()})).optional(),volume:i().min(KZ).max(qZ).optional(),muted:P().optional(),playbackRate:i().gt(YZ).optional(),sync:h(["video","independent"]).optional(),kenBurns:h(["in","out","pan-l","pan-r","none"]).optional(),volumeDb:i().optional(),fadeInMs:i().min(QZ).optional(),fadeOutMs:i().min(JZ).optional(),loop:P().optional(),audioRole:h(["sfx","music","vo","ambience"]).optional(),duck:c({duckDb:i().max(ZZ),attackMs:i().min(XZ),releaseMs:i().min(eX),windows:y(c({startMs:i(),endMs:i()})).optional()}).optional(),anchor:c({clipId:n().min(1),offsetMs:i()}).optional(),reframe:c({segments:y(c({startSec:i().min(tX).describe("Segment START in seconds, clip-relative. Segments tile the clip's duration in order."),endSec:i().gt(oX).describe("Segment END in seconds, clip-relative. The span (endSec \u2212 startSec) is this segment's duration \u2014 the window `ease` ramps over."),focus:E([c({mode:b("frame-center")}),c({mode:b("point"),x:i().min(rX).max(sX),y:i().min(nX).max(iX)}),c({mode:b("face"),faceId:n().min(1),shotScale:h(["close","standard","wide"]).optional()}),c({mode:b("all-faces")}),c({mode:b("active-speaker")})]).describe("WHO/WHAT the camera tracks this segment (the reframe center), selected by `mode`: `frame-center` = no tracking, hold the geometric center (static/graphic footage, or a pure zoom); `point` = lock to a fixed source-normalized {x,y} (a non-moving on-screen element); `face` = track a detected face by `faceId` (from get_media_context), with optional `shotScale` close|standard|wide for tightness; `all-faces` = frame the bounding box of every detected face (group/ensemble shots); `active-speaker` = follow whoever is speaking (diarized talking-head / podcast). Pick by what the beat is about; pair with `zoom` for how tight."),intent:n().optional().describe("Optional editorial LABEL for diff/log readability (e.g. 'speaker-tight', 'wide-context'). Cosmetic \u2014 NOT honored by the derive math and excluded from the variant cache key."),zoom:i().min(aX).max(cX).optional().describe("How TIGHT the framing is \u2014 the fraction of the source the output viewport shows. <1 punches IN (a smaller source fraction, magnified to fill the frame); 1 = the full frame (no crop). ~0.6\u20130.8 is a moderate push-in, ~0.5 a tight close-up, 0.1 the maximum zoom. There is NO zoom-OUT past the full frame (max 1). Omit for the full frame. MUTUALLY EXCLUSIVE with `focus.shotScale` \u2014 a face-tracked shot is sized EITHER by the editorial scale (shotScale, which the bake calibrates to the detected face) OR by an explicit zoom, never both. A segment carrying both is REJECTED: shotScale wins at bake time and the zoom would be silently discarded."),ease:c({in:i().min(pX).describe("Ease-IN ramp DURATION in seconds at the segment START."),out:i().min(dX).describe("Ease-OUT ramp DURATION in seconds at the segment END.")}).optional().describe("Zoom/center ramp DURATIONS in SECONDS at this segment's edges \u2014 NOT a unitless 0\u20131 curve. ~0.3\u20130.6s reads as a snappy push; >1s reads sluggish. Keep `in` + `out` \u2264 the segment's duration (endSec \u2212 startSec): the two edges share the span, so to ramp across the WHOLE segment set one edge to the full duration and the other to 0. Omit for an instant cut to this framing."),bias:c({x:i().min(lX).max(uX).describe("Horizontal nudge, source-normalized (+ = right)."),y:i().min(mX).max(hX).describe("Vertical nudge, source-normalized (+ = down).")}).optional().describe("Optional FINE framing nudge off the focus center, source-normalized in [\u22120.3, 0.3]. A small correction (headroom, rule-of-thirds), NOT a reframe \u2014 use `focus`/`zoom` for the actual shot. Omit (treated as 0) to sit dead-center on the focus.")})).min(1)}).optional()}),c({kind:b("component"),componentId:n().min(1),props:O(n(),L()),assets:O(n(),n().min(1)).optional().describe("Manifest asset slot \u2192 project media id. At mount each slot arrives as `assets[slot].handle`, a fetchable URL for <Img>/<Video>/<Audio>; `props` becomes `params` and never carries an asset URL."),zPlane:h(["front","behind-subject"]).optional()}),c({kind:b("overlay"),primitiveId:n().min(1),params:O(n(),L()),zPlane:h(["front","behind-subject"]).optional(),anchor:c({space:b("scene"),x:i().min(fX).max(xX),y:i().min(gX).max(bX)}).optional(),parallax:i().min(yX).max(AX).optional()}),c({kind:b("effect"),primitiveId:n().min(1),params:O(n(),L()).optional()}),c({kind:b("card"),html:n().min(1).describe("Your card's HTML \u2014 rendered VERBATIM as the graphic (shell motion via applyMotionPreset in a FOLLOWING call). CANVAS CONTRACT: the card renders in a viewport equal to the composition format's pixel frame (1080\xD71920 at 9:16 fhd); the root is NOT auto-pinned \u2014 declare explicit width/height matching the frame (box-sizing:border-box) and anchor content with flex/grid; position:absolute;inset:0 on the root does NOT fill the frame; for edge-to-edge backgrounds add an inner absolutely-positioned layer with generous negative inset. Overlay compositing applies a ~92% safe-area inset \u2014 keep critical copy away from the extreme edges. FONTS: name a family from GET /v1/fonts (list_render_fonts) \u2014 the renderer loads those faces for the card and waits for them, so `font-family: Inter` draws Inter. `@import` and remote font files are REFUSED: the card renders with no network. A family that is not on that list has no bytes behind it and the browser falls back, so end any stack with a generic (`Inter, sans-serif`) rather than relying on a system face being present."),tokens:O(n(),n()).optional(),zPlane:b("front").optional()})]),kind:h(["video","audio","image","overlay","effect"]).optional(),opacity:i().min(SX).max(zX).optional(),scale:i().gt(TX).optional(),rotation:i().optional(),position:c({x:i().min(EX).max(CX),y:i().min(IX).max(RX)}).optional().describe("Clip CENTRE as a fraction of the frame: {x:0.5,y:0.5} is dead centre, 0 to 1 is inside the frame, and a little overshoot (down to -1, up to 2) is how an entrance starts off-canvas. NOT pixels: the renderer maps x to `left: x*100%`, so `x: 180` sits 180 frame-widths away and draws nothing."),region:c({x:i().min(wX).max(OX),y:i().min(MX).max(kX),w:i().gt(PX).max(LX),h:i().gt(DX).max(vX)}).optional(),fit:h(["cover","contain"]).optional(),captionVisibility:h(["visible","hidden"]).optional().describe("Video media clip only. Hide native captions while this clip is topmost and covers the lower picture, or when an opaque, effect-free clip has an explicitly full-frame region, even with fit:contain. Caption words and timings remain stored and resume when another visible clip takes over."),effects:y(c({primitiveId:n().min(1),params:O(n(),L()).optional()})).optional(),transitionIn:c({type:n().min(1),duration:i().gt(FX)}).optional(),linkGroupId:n().min(1).optional(),animate:O(n(),y(c({time:i().min(NX),value:i(),easing:E([h(["linear","ease","easeIn","easeOut","easeInOut"]),c({cubicBezier:H([i(),i(),i(),i()])})]).optional()})).min(_X)).optional().describe("Keyframe channels, clip-relative seconds. Each channel's values use the SAME unit as the scalar it animates: `opacity` 0 to 1, `scale` a multiplier (>0), `rotation` degrees, `position.x`/`position.y` a FRACTION of the frame like `position` (0.5 = centre; NOT pixels), `volume` 0 to 4.")}))}).describe("Replace the overlay channel wholesale with the given clips (bulk set, not a merge)."),c({type:b("addMarker"),marker:c({id:n().min(1),startTime:i().min(BX),endTime:i().min(jX).optional(),kind:n().min(1),name:n().optional(),metadata:O(n(),L()).optional()})}).describe("Add a timeline marker (a named time point/range; carry extensions in `metadata`)."),c({type:b("removeMarker"),markerId:n()}).describe("Remove a marker by id."),c({type:b("updateMarker"),markerId:n(),updates:c({id:n().min(1).optional(),startTime:i().min(VX).optional(),endTime:i().min(UX).optional(),kind:n().min(1).optional(),name:n().optional(),metadata:O(n(),L()).optional()})}).describe("Patch a marker's fields by id (partial merge)."),c({type:b("setCropIntents"),clipId:n(),segments:E([y(c({startSec:i().min(HX).describe("Segment START in seconds, clip-relative. Segments tile the clip's duration in order."),endSec:i().gt(WX).describe("Segment END in seconds, clip-relative. The span (endSec \u2212 startSec) is this segment's duration \u2014 the window `ease` ramps over."),focus:E([c({mode:b("frame-center")}),c({mode:b("point"),x:i().min($X).max(GX),y:i().min(KX).max(qX)}),c({mode:b("face"),faceId:n().min(1),shotScale:h(["close","standard","wide"]).optional()}),c({mode:b("all-faces")}),c({mode:b("active-speaker")})]).describe("WHO/WHAT the camera tracks this segment (the reframe center), selected by `mode`: `frame-center` = no tracking, hold the geometric center (static/graphic footage, or a pure zoom); `point` = lock to a fixed source-normalized {x,y} (a non-moving on-screen element); `face` = track a detected face by `faceId` (from get_media_context), with optional `shotScale` close|standard|wide for tightness; `all-faces` = frame the bounding box of every detected face (group/ensemble shots); `active-speaker` = follow whoever is speaking (diarized talking-head / podcast). Pick by what the beat is about; pair with `zoom` for how tight."),intent:n().optional().describe("Optional editorial LABEL for diff/log readability (e.g. 'speaker-tight', 'wide-context'). Cosmetic \u2014 NOT honored by the derive math and excluded from the variant cache key."),zoom:i().min(YX).max(QX).optional().describe("How TIGHT the framing is \u2014 the fraction of the source the output viewport shows. <1 punches IN (a smaller source fraction, magnified to fill the frame); 1 = the full frame (no crop). ~0.6\u20130.8 is a moderate push-in, ~0.5 a tight close-up, 0.1 the maximum zoom. There is NO zoom-OUT past the full frame (max 1). Omit for the full frame. MUTUALLY EXCLUSIVE with `focus.shotScale` \u2014 a face-tracked shot is sized EITHER by the editorial scale (shotScale, which the bake calibrates to the detected face) OR by an explicit zoom, never both. A segment carrying both is REJECTED: shotScale wins at bake time and the zoom would be silently discarded."),ease:c({in:i().min(JX).describe("Ease-IN ramp DURATION in seconds at the segment START."),out:i().min(ZX).describe("Ease-OUT ramp DURATION in seconds at the segment END.")}).optional().describe("Zoom/center ramp DURATIONS in SECONDS at this segment's edges \u2014 NOT a unitless 0\u20131 curve. ~0.3\u20130.6s reads as a snappy push; >1s reads sluggish. Keep `in` + `out` \u2264 the segment's duration (endSec \u2212 startSec): the two edges share the span, so to ramp across the WHOLE segment set one edge to the full duration and the other to 0. Omit for an instant cut to this framing."),bias:c({x:i().min(XX).max(eee).describe("Horizontal nudge, source-normalized (+ = right)."),y:i().min(tee).max(oee).describe("Vertical nudge, source-normalized (+ = down).")}).optional().describe("Optional FINE framing nudge off the focus center, source-normalized in [\u22120.3, 0.3]. A small correction (headroom, rule-of-thirds), NOT a reframe \u2014 use `focus`/`zoom` for the actual shot. Omit (treated as 0) to sit dead-center on the focus.")})),G()])}).describe("Set (or CLEAR, with `segments: null`) the camera/reframe channel on a MEDIA clip \u2014 the time-aligned source\u2192output viewport (focus, zoom, ease, bias). This is the PREFERRED way to author reframing; do NOT reframe via a whole-source `clip.update` patch. Segments tile the clip's duration."),c({type:b("setEffects"),clipId:n(),effects:y(c({primitiveId:n().min(1),params:O(n(),L()).optional()}))}).describe("Set (or CLEAR, with `effects: []`) a clip's EFFECT channel \u2014 the registered effect primitives stacked onto that clip, each `{ primitiveId, params? }`. WHOLESALE: the array REPLACES the clip's current effects, so send the full stack (read the clip first to add one). This is the ONLY way to change effects on an existing clip \u2014 do NOT reach for a `clip.update` patch, whose top-level merge is the source-clobbering footgun documented above."),c({type:b("setCaptionStyle"),style:c({fontFamily:n().min(1).optional(),fontSize:i().min(1).max(ree).optional().describe("Font size as % of composition height (1-15, default 5). NOT px."),fontWeight:A().min(see).max(nee).optional(),color:n().min(1).optional(),highlightColor:n().min(1).optional(),backgroundColor:n().optional(),plate:h(["glass","solid","none"]).optional(),position:h(["top","center","bottom"]).optional(),region:c({x:i().min(iee).max(aee),y:i().min(cee).max(pee),w:i().gt(dee).max(lee),h:i().gt(uee).max(mee)}).optional().describe("Optional caption layout box {x,y,w,h} in normalized output-frame coordinates. Overrides position; text starts at its top edge and wraps/pages within its width and height."),textTransform:h(["none","uppercase","capitalize"]).optional(),letterSpacing:i().min(hee).max(fee).optional().describe("Base caption glyph spacing in pixels."),wordGapEm:i().min(xee).max(gee).optional().describe("Gap between caption runs as a multiple of base font size; default 0.35."),lineGapEm:i().min(bee).max(yee).optional().describe("Gap between caption lines as a multiple of base font size; default 0.25."),emphasisColor:n().optional(),emphasisGradient:n().optional(),emphasisScale:i().gt(Aee).optional(),emphasisFontFamily:n().optional(),emphasisFontWeight:A().min(See).max(zee).optional(),emphasisTextTransform:h(["none","uppercase","capitalize"]).optional(),emphasisLetterSpacing:i().optional(),emphasisFontStyle:h(["normal","italic"]).optional(),entrance:h(["none","fade","word-pop","stagger-up"]).optional(),entranceMs:i().min(Tee).optional(),entranceStaggerMs:i().min(Eee).optional(),exitMs:i().min(Cee).optional(),emphasisPlate:P().optional(),emphasisPlateColor:n().optional(),emphasisPlateTextColor:n().optional(),emphasisPlateAltColor:n().optional(),emphasisPlateAltTextColor:n().optional(),emphasisPlateRadius:i().min(Iee).optional(),emphasisPlatePadX:i().optional(),emphasisPlatePadY:i().optional(),emphasisPlateReveal:P().optional().describe("Grow a shared emphasis plate as saved words appear while reserving its final layout width."),annotationColor:n().optional(),annotationStrokeWidth:i().min(Ree).max(wee).optional().describe("Annotation stroke width in its 100\xD7100 SVG coordinate system; default 4."),annotationTexture:h(["clean","pencil"]).optional().describe("Native annotation stroke finish; default clean."),maxWidthPercent:i().gt(Oee).max(Mee).optional()})}).describe("Merge style overrides (font/color/position/emphasis) onto the composition's caption layer. Partial \u2014 omitted fields keep their current value; creates the caption container if absent."),c({type:b("setCaptionLayouts"),layouts:y(c({segmentIndex:A().min(kee).max(Pee),wordStartIndex:A().min(Lee).max(Dee),wordEndIndex:A().gt(vee).max(Fee).describe("Exclusive word index in the saved caption segment."),region:c({x:i().min(Nee).max(_ee),y:i().min(Bee).max(jee),w:i().gt(Vee).max(Uee),h:i().gt(Hee).max(Wee)}),scale:i().min($ee).max(Gee).optional(),rotation:i().min(Kee).max(qee).optional(),style:c({fontFamily:n().min(1).optional(),fontSize:i().min(1).max(Yee).optional().describe("Font size as % of composition height (1-15, default 5). NOT px."),fontWeight:A().min(Qee).max(Jee).optional(),color:n().min(1).optional(),highlightColor:n().min(1).optional(),backgroundColor:n().optional(),plate:h(["glass","solid","none"]).optional(),textTransform:h(["none","uppercase","capitalize"]).optional(),letterSpacing:i().min(Zee).max(Xee).optional().describe("Base caption glyph spacing in pixels."),wordGapEm:i().min(ete).max(tte).optional().describe("Gap between caption runs as a multiple of base font size; default 0.35."),lineGapEm:i().min(ote).max(rte).optional().describe("Gap between caption lines as a multiple of base font size; default 0.25."),emphasisColor:n().optional(),emphasisScale:i().gt(ste).optional(),emphasisFontFamily:n().optional(),emphasisFontWeight:A().min(nte).max(ite).optional(),emphasisTextTransform:h(["none","uppercase","capitalize"]).optional(),emphasisLetterSpacing:i().optional(),emphasisFontStyle:h(["normal","italic"]).optional(),emphasisPlate:P().optional(),emphasisPlateColor:n().optional(),emphasisPlateTextColor:n().optional(),emphasisPlateAltColor:n().optional(),emphasisPlateAltTextColor:n().optional(),emphasisPlateRadius:i().min(ate).optional(),emphasisPlatePadX:i().optional(),emphasisPlatePadY:i().optional(),emphasisPlateReveal:P().optional().describe("Grow a shared emphasis plate as saved words appear while reserving its final layout width."),annotationColor:n().optional(),annotationStrokeWidth:i().min(cte).max(pte).optional().describe("Annotation stroke width in its 100\xD7100 SVG coordinate system; default 4."),annotationTexture:h(["clean","pencil"]).optional().describe("Native annotation stroke finish; default clean."),entrance:h(["none","fade","word-pop","stagger-up"]).optional(),entranceMs:i().min(dte).optional(),entranceStaggerMs:i().min(lte).optional(),exitMs:i().min(ute).optional()}).optional(),holdThroughWordIndex:A().min(mte).max(hte).optional().describe("Inclusive saved-word index in this segment. The layout stays visible until that word ends."),wordMarks:y(c({wordIndex:A().min(fte).max(xte),emphasis:P().optional(),annotate:E([h(["circle","underline"]),G()]).optional()})).optional()}))}).describe("Replace native caption placements without changing transcript words or timings. Each layout references a half-open word-index range in one saved segment; a one-word range is valid. region places that group independently, optional bounded scale/rotation/style changes its look, and holdThroughWordIndex keeps it visible through a later saved word in the same segment. All words in a placed range occupy one page; rendering refuses a range that cannot fit its box, so enlarge region or split the range. The box reserves horizontal space of 1.6 font sizes and vertical space of 0.8 font sizes for padding, with at most three lines. Unreferenced words keep the default caption layout. Word ranges must not overlap. Reapply after caption regeneration or timeline cuts."),c({type:b("setCaptionDepth"),zPlane:h(["front","behind-subject"])}).describe("Set the caption compositing plane. Use `behind-subject` to place captions behind the segmented foreground subject; use `front` for conventional captions above all video layers."),c({type:b("setCaptions"),segments:y(c({words:y(c({text:n().min(1),startMs:i().min(gte).describe("Word start on the composition timeline, in milliseconds."),endMs:i().min(bte).describe("Word end on the composition timeline, in milliseconds."),emphasis:P().optional(),annotate:h(["circle","underline"]).optional()}))})),style:c({fontFamily:n().min(1).optional(),fontSize:i().min(1).max(yte).optional().describe("Font size as % of composition height (1-15, default 5). NOT px."),fontWeight:A().min(Ate).max(Ste).optional(),color:n().min(1).optional(),highlightColor:n().min(1).optional(),backgroundColor:n().optional(),plate:h(["glass","solid","none"]).optional(),position:h(["top","center","bottom"]).optional(),region:c({x:i().min(zte).max(Tte),y:i().min(Ete).max(Cte),w:i().gt(Ite).max(Rte),h:i().gt(wte).max(Ote)}).optional().describe("Optional caption layout box {x,y,w,h} in normalized output-frame coordinates. Overrides position; text starts at its top edge and wraps/pages within its width and height."),textTransform:h(["none","uppercase","capitalize"]).optional(),letterSpacing:i().min(Mte).max(kte).optional().describe("Base caption glyph spacing in pixels."),wordGapEm:i().min(Pte).max(Lte).optional().describe("Gap between caption runs as a multiple of base font size; default 0.35."),lineGapEm:i().min(Dte).max(vte).optional().describe("Gap between caption lines as a multiple of base font size; default 0.25."),emphasisColor:n().optional(),emphasisGradient:n().optional(),emphasisScale:i().gt(Fte).optional(),emphasisFontFamily:n().optional(),emphasisFontWeight:A().min(Nte).max(_te).optional(),emphasisTextTransform:h(["none","uppercase","capitalize"]).optional(),emphasisLetterSpacing:i().optional(),emphasisFontStyle:h(["normal","italic"]).optional(),entrance:h(["none","fade","word-pop","stagger-up"]).optional(),entranceMs:i().min(Bte).optional(),entranceStaggerMs:i().min(jte).optional(),exitMs:i().min(Vte).optional(),emphasisPlate:P().optional(),emphasisPlateColor:n().optional(),emphasisPlateTextColor:n().optional(),emphasisPlateAltColor:n().optional(),emphasisPlateAltTextColor:n().optional(),emphasisPlateRadius:i().min(Ute).optional(),emphasisPlatePadX:i().optional(),emphasisPlatePadY:i().optional(),emphasisPlateReveal:P().optional().describe("Grow a shared emphasis plate as saved words appear while reserving its final layout width."),annotationColor:n().optional(),annotationStrokeWidth:i().min(Hte).max(Wte).optional().describe("Annotation stroke width in its 100\xD7100 SVG coordinate system; default 4."),annotationTexture:h(["clean","pencil"]).optional().describe("Native annotation stroke finish; default clean."),maxWidthPercent:i().gt($te).max(Gte).optional()}).optional()}).describe("Replace the caption SEGMENTS wholesale \u2014 author the word-timed caption layer directly (each segment = one sentence/page of `words` with timeline-ms `startMs`/`endMs`, optional `emphasis`). This is how a client with its OWN word timings (e.g. a generated VO take) gets word-synced captions without a source transcript; the compose lane's transcript slice writes the same layer. `style`, when given, merges with setCaptionStyle semantics; an omitted style keeps the existing one. Renderer paginates within a segment and never pools words across two \u2014 keep segments sentence-bounded."),c({type:b("captions.fromTranscript"),mediaId:n().min(1),window:c({startSec:i().min(Kte),endSec:i().gt(qte)}).optional()}).describe("Attach caption CONTENT from the media's cached transcript \u2014 no pasting words. ROUTE-MATERIALIZED like applyMotionPreset/materializeGrid: the server slices the word-timed transcript to `window` (source seconds; absent = the whole media), rebases times, sentence-splits into segments, and applies it as `setCaptions`. 422 media_no_transcript when the media has no transcript or no words in the window. For your OWN word timings use setCaptions directly. For edited multi-clip timelines, use captions.fromComposition after saving the edits; that operation projects all selected track clips, trims, exclusions, and placements."),c({type:b("captions.fromComposition"),trackId:n().min(1)}).describe("Snapshot word-timed captions from the SAVED edits on one explicit enabled video or audio track. The host reads each source media transcript, projects words through clip trim, excluded ranges and placement, then replaces the caption segments. This is route-materialized to setCaptions; call it AFTER persisting clip edits and call it again when those edits change. The existing caption style and depth are preserved. Missing transcripts, unsupported clips, inconsistent clip durations, and overlapping audible clips fail loud. Playback rate scales source word times and playable duration on both audio and video tracks."),c({type:b("applyMotionPreset"),clipId:n(),preset:n(),params:c({enterMs:i().optional(),exitMs:i().optional(),staggerMs:i().optional()}).optional()}).describe("Shell a STATIC `card` clip with a frame-driven MOTION preset \u2014 the public card-shelling op (the layout renders VERBATIM; only the container animates in/out). The server wraps the card in the chosen `preset` (fade-up / slide-in-left / slide-in-right / scale-pop / stagger-reveal), transpiles it, mints it as a LIVE component, and swaps the clip source to that component (the bakeless live lane \u2014 no box). `params` tunes timing (`enterMs`/`exitMs`, `staggerMs` for stagger-reveal). The target must be a static card (components already carry motion; library overlays already move); re-run overwrites idempotently ONLY while the target is still a card (an uncompilable shell); once shelled, the clip is a COMPONENT \u2014 to change its motion, remove and re-add the card, then re-shell. Honored under `dry_run` (validates preset + target without transpiling or persisting). ORDERING: the preset resolves its target against the PERSISTED composition \u2014 a card added in the SAME batch is not yet visible to it. Persist the clip.add batch first, then shell in a following call."),c({type:b("materializeGrid"),clipId:n(),grid:h(["beat","word","shot"]),maxMarkers:A().gt(Yte).max(Qte).optional()}).describe('Materialize a clip\'s SOURCE-media temporal GRID as timeline markers \u2014 the rhythm authority you cut to. `grid:"beat"` reads a MUSIC bed\'s beat map (get_media_context.beatGrid), `grid:"word"` the VO word onsets (wordGrid); each grid point is projected from media time to TIMELINE time through the clip\'s placement (startTime, trim, playbackRate, excludedRanges) and written as a `kind:"beat"|"word"` marker (`metadata.sourceClipId` set). Points outside the clip\'s visible window are skipped. Re-running REPLACES the prior markers from the same clip+grid (idempotent). Land cuts and transition MIDPOINTS on the markers (a 0.5s transition starts 0.25s before its marker). `maxMarkers` (default 500, ceiling 2000) \u2014 exceeding it fails loud with the count. `grid:"shot"` is not yet exposed (shot_grid_unavailable). The target must be a media clip; absent evidence fails loud (grid_unavailable) naming how to get it (declare audioRole:"music" at ingest / transcribe).'),c({type:b("setFormat"),format:c({aspectRatio:h(["16:9","9:16","1:1","4:5"]),fps:E([b(24),b(25),b(30),b(60)]).optional(),resolution:h(["hd","fhd","4k"]).optional()})}).describe("Set the output format \u2014 `aspectRatio` (16:9|9:16|1:1|4:5) plus optional `fps` and `resolution`. Merges: an omitted field keeps the current value."),c({type:b("addTrack"),kind:h(["video","audio","image","overlay","effect"]),name:n().optional(),id:n().optional()}).describe("Add an EMPTY track of a given family (video|audio|image|overlay|effect). Optional pinned `id`. The new track is appended, so it starts at the BACK: index 0 is the top layer and higher indices are further back (see `reorderTracks`). Track order only ranks clips on the same plane \u2014 every overlay draws above the video lane unless its `zPlane` is `behind-subject`, whatever its track index."),c({type:b("removeTrack"),trackId:n()}).describe("Remove a track AND all its clips by id."),c({type:b("updateTrack"),trackId:n(),updates:c({name:n().optional(),enabled:P().optional()})}).describe("Patch a track's `name` / `enabled` by id."),c({type:b("reorderTracks"),fromIndex:i(),toIndex:i()}).describe('Move a track from one index to another. ORDER: index 0 is the TOP layer, not the bottom \u2014 moving a backdrop to index 0 puts it in FRONT of everything and hides the composition. Higher index = further back. PRECEDENCE: track order decides compositing only among clips on the same plane. Overlays are composited in a lane ABOVE the video lane whatever their track index; the one exception is `zPlane:"behind-subject"`, which moves the overlay inside its host clip, behind the segmented foreground. So if reordering tracks does not change what you see, the plane split already decided it.'),c({type:b("moveClipToTrack"),clipId:n(),targetTrackId:n(),newStartTime:i().optional()}).describe("Move a clip to another SAME-family track, optionally at a new `newStartTime`."),c({type:b("duplicateClip"),clipId:n(),newClipId:n().optional()}).describe("Duplicate a clip by id. Pin `newClipId` to make the copy's id deterministic (required for a clean undo/inverse)."),c({type:b("cutAndRipple"),start:i(),end:i()}).describe("Server-authoritative: delete the [start,end] time window (seconds) and ripple every downstream clip/marker/caption earlier to close the gap."),c({type:b("ripple"),time:i(),amount:i()}).describe("Server-authoritative: shift everything at/after `time` (seconds) by `amount` seconds (+ opens a gap, \u2212 closes one)."),c({type:b("addExcludedRange"),clipId:n(),sourceStart:i(),sourceEnd:i(),reason:n().optional()}).describe("Server-authoritative: exclude a [sourceStart,sourceEnd] span (seconds) of a clip's SOURCE (an internal trim) and ripple downstream \u2014 the preferred way to drop a sub-range vs a source patch."),c({type:b("removeExcludedRange"),clipId:n(),rangeIdx:i()}).describe("Server-authoritative: remove a clip's previously-added excluded range by index (re-includes that span, ripples downstream)."),c({type:b("component.repin"),componentId:n(),from:n(),to:n()}).describe("Move every pin of a component at version `from` to version `to`: the clips that place it and the scene surfaces that nest it. A clip's version changes only through a composition write; a component edit issues this op over the composition it names.")]).describe("One scoped composition operation. Discriminated by `type` \u2014 `clip.add` / `clip.remove` / `clip.update` patch clips across any family; the rest cover markers, reframe, effects, captions, format, tracks, and the server-authoritative ripple recomputes. Every variant is `.strict()`: an unknown field is refused, not ignored.");var Jte=c({ops:y(nc).min(1),if_match:n().optional().describe('Optional OCC precondition \u2014 the strong etag (`"<hex>"`) the caller last saw. On mismatch the batch is rejected (409 stale_etag) before any op applies.'),dry_run:P().optional().describe("When true, validate the batch (apply + projection accept/reject guards) WITHOUT persisting. Returns `{ valid, errors }` instead of applying."),composition_id:n().optional().describe("Target a SPECIFIC composition instead of the project's active one. Omit it and the project's active composition is edited, which is the default and the common case. `preview_frame` and `create_render` already accept a compositionId; this closes the gap so a second composition minted with `new_composition` can actually be authored into \u2014 build variant A, mint B, edit B, preview both. Mutually exclusive with `session_id`, which targets the session's scratch."),session_id:n().optional().describe("Optional compose-session id. When present, the ops target the session's SCRATCH composition (a derived sibling) instead of the project's active composition \u2014 the server never mutates active until commit.")}).describe("POST /projects/:id/composition/apply body \u2014 a batch of CompositionOps.");var Zte=200,Xte=c({name:n().min(1).max(Zte).optional(),format:ye.optional()}).describe("POST /projects/:id/compositions body \u2014 create a new video (composition) in the project. `format` defaults to the project's compositionFormat when omitted.");var eoe=c({suggestionId:n().min(1),format:c({aspectRatio:h(["16:9","9:16","1:1","4:5"]),fps:E([b(24),b(25),b(30),b(60)]).optional(),resolution:h(["hd","fhd","4k"]).optional(),platform:n().optional()}).optional()});var toe=0,ooe=9007199254740991,qm=c({compositionId:n(),format:ye,etag:n(),isActive:P(),updatedAt:i(),sceneCount:A().min(toe).max(ooe)}).describe("A composition in a project, flagging the active one.");var roe=c({data:y(qm)}).describe("GET /projects/:id/compositions response.");var soe=2e3,noe=c({intent:n().min(1).max(soe).describe("Plain-English goal \u2014 what you're trying to achieve with this edit."),mode:h(["advise","amend","explore"]).optional().describe("advise = proposer-only (no render/judge, no grounded assessment); amend (default) = grade the current composition + author the fix for the weakest criterion; explore = ranked slate of diverse directions. All modes are async \u2014 poll the returned job."),focus:h(["editorial","spatial","brand","caption"]).optional().describe("Optional criterion to concentrate the advice on."),ifMatch:n().optional().describe("Etag of the composition the advice is computed against. Proposals are bound to it; apply a proposal BEFORE any other edit or it will 409.")}).describe("POST /projects/:id/consult body.");var ioe=c({consultJobId:n().describe("Opaque consult job id; poll it for the advisory result."),projectId:n(),status:h(["queued","failed"]).describe("queued = normal; failed = startup failed and the job is already terminal."),streamUrl:n().optional().describe("Relative SSE endpoint to stream this job's events.")}).describe("POST /projects/:id/consult response.");var Ym=c({faceId:n(),bbox:c({x:i(),y:i(),width:i(),height:i()}),speakingShare:i().optional()});var Qm=c({detectorVersion:n().describe("Version of the face detector that produced this source-window roster."),window:c({startSec:i(),endSec:i()}),faces:y(Ym)});var nSe=c({projectId:n(),mediaId:n()});var aoe=0,coe=10,poe=6,doe=c({criticId:n().min(1).describe("Stable client id; re-registering the same id UPSERTS."),label:n().min(1),tier:h(["rules","rubric","evaluator"]),floor:i().min(aoe).max(coe).optional().describe("Score below this routes a refine like a built-in criterion. Defaults to 6."),rules:y(O(n(),L())).optional().describe('tier "rules": declarative ClientRule[] (data).'),rubric:n().optional().describe('tier "rubric": your criterion + description; scored as an extra column.'),referenceMediaIds:y(n()).max(poe).optional().describe('tier "rubric"/"evaluator": up to 6 org media ids whose thumbnails the judge sees as YOUR reference standard \u2014 "looks like mine" becomes a machine check. Each must be an org-owned media item with a visual thumbnail (422 names any that is not).'),url:xe().optional().describe('tier "evaluator": your HTTPS webhook; CueFrame POSTs the artifact.')}).describe("Register a custom compose critic.");var Bs=c({criticId:n(),label:n(),tier:h(["rules","rubric","evaluator"]),floor:i(),referenceMediaIds:y(n()).optional()}).describe("One registered critic (rubric/rules/url stay write-only \u2014 never echoed).");var loe=c({critics:y(Bs)});var uoe=c({id:n(),criticId:n(),tier:h(["rules","rubric","evaluator"]),secret:n().optional().describe("evaluator tier: Standard-Webhooks signing secret, returned ONCE.")}).describe("POST /critics response (evaluator secret present exactly once).");var moe=c({fromCompositionId:n().min(1).describe("Source composition to reframe a sibling from."),targetFormat:ye.describe("The target output format (aspectRatio + optional fps/resolution) for the new sibling.")}).describe("Derive a reframed sibling composition for a new aspect (Auto-Reframe / Magic-Resize, agent-native).");var hoe=c({compositionId:n().describe("The new sibling composition's id.")}).describe("POST /projects/:id/compositions/derive response.");var fSe=c({error:c({code:n().describe("Stable machine-readable error code per \xA7Error Model."),message:n().describe("Human-readable message."),contract:n().describe("Contract version that produced this verdict. If it differs between two calls, the rules changed underneath you, not your request."),details:O(n(),L()).optional().describe("Optional context (currentEtag, projectIds, retryAfter, \u2026).")}).describe("Standard API error envelope.")}).describe("Error envelope used by every non-2xx response.");var go=c({kind:h(["transcript","subjectTrack","matte"]),intent:c({kind:h(["whole","window"]),window:c({startSec:i(),endSec:i()}).optional().describe("The SOURCE window this fact covers, when it is scoped to a clip.")}),status:h(["pending","ready","failed"]),summary:c({presenceFraction:i().optional().describe("Matte only: fraction of frames carrying a detected subject (0\u20131). Below 0.6 there is no reliable silhouette \u2014 the matte is delivered but cannot carry a behind-subject graphic, and is NOT charged."),faceCount:i().optional(),language:n().optional(),wordCount:i().optional(),durationSec:i().optional()}).optional(),charge:c({usd:i()}).optional().describe("What this fact was BILLED, in USD. Absent when it cost nothing: a compose/render side effect (already paid for inside that operation) or an unusable matte."),error:c({code:n(),message:n()}).optional(),readyAt:i().optional()}).describe("One derived fact about a media item \u2014 computed once, charged at most once.");var bo=c({kind:h(["transcript","subjectTrack","matte"]),quotedUsd:i().describe("The server's price for this enhancement, in USD. Meaningful ONLY when `available` is true \u2014 an unavailable offer quotes 0 because there is nothing to price yet."),available:P(),reason:n().optional().describe("Why this cannot be bought right now. Present iff `available` is false. e.g. `media_not_ready` (the source has no known duration yet).")}).describe("A purchasable enhancement that this media item does not have yet.");var Jm=E([c({kind:h(["subjectTrack","matte"]),scope:c({startSec:i(),endSec:i()}),state:h(["pending","ready","failed"]),fact:go}),c({kind:h(["subjectTrack","matte"]),scope:c({startSec:i(),endSec:i()}),state:h(["available","unavailable"]),offer:bo})]).describe("The server-selected fact or offer for one exact source window. Present when kind, startSec, and endSec are supplied; clients consume this instead of recreating the fact hash.");var foe=24,xoe=c({count:A().min(1).max(foe),contentType:h(["image/jpeg","image/png"]).optional(),includeContactSheet:P().optional()}).describe("POST /brand-kits/exemplar-uploads body. Reserve presigned PUT slots for curated reference frames (\u2264720px recommended \u2014 they are vision input tokens downstream).");var goe=c({batchId:n(),uploads:y(c({key:n(),url:n()})),contactSheetUpload:c({key:n(),url:n()}).optional(),expiresAt:n()});var boe=c({clipSuggestionId:n().min(1)}).describe("POST /projects/:id/exports/{fcpxml,premiere} body.");var Zm=c({phase:h(["trim","build","upload","trigger"]),message:n(),detail:n().optional(),retryable:P()});var Xm=h(["fcpxml","premiere"]);var eh=h(["queued","trimming","building","uploading","complete","error","cancelled"]);var yoe=0,Aoe=1,Soe=c({id:n(),format:Xm,status:eh,progress:i().min(yoe).max(Aoe).describe("Fractional progress 0..1 across the trim/build/upload pipeline. Reaches 1 only on `complete`."),outputUrl:n().nullable(),outputExpiresAt:n().nullable(),outputSizeBytes:i().nullable(),outputDurationSec:i().nullable(),error:E([Zm,G()]).describe("Set when status is `error`; null otherwise. The phase field localizes the failure to trim / build / upload / trigger."),trimCacheHit:P().nullable(),clipSuggestionId:n().nullable(),createdAt:n(),updatedAt:n()}).describe("NLE export job response.");var zoe=c({url:xe()}).describe("POST /brand-kits/extract body \u2014 the website URL to extract brand tokens from.");var th=c({colors:y(n()),fonts:y(n()),title:n().optional(),description:n().optional()}).describe("POST /brand-kits/extract response \u2014 extracted brand tokens (not persisted).");var Toe=200,Eoe=0,Coe=50,Ioe=c({query:n().min(1).max(Toe),perPage:A().gt(Eoe).max(Coe).optional()}).describe("POST /fonts/search body.");var Roe=c({results:y(c({family:n(),category:n().optional(),variants:y(n()).optional(),cssUrl:n().optional(),previewText:n().optional()}))}).describe("POST /fonts/search response.");var FSe=c({composition:L()});var _Se=c({compositionId:n().optional()});var woe=0,Ooe=0,Moe=20,koe=100,jSe=c({after:A().min(woe).optional(),before:A().min(Ooe).optional(),limit:A().min(1).max(koe).default(Moe)});var USe=Jt({});var Poe=100,Loe=-9007199254740991,Doe=9007199254740991,voe=-9007199254740991,Foe=9007199254740991,WSe=c({limit:A().min(1).max(Poe).optional(),after:n().optional(),projectId:n().optional(),jobId:n().optional(),from:A().min(Loe).max(Doe).optional(),to:A().min(voe).max(Foe).optional()});var GSe=c({deep:b("1").optional()});var Noe=c({status:h(["ok","degraded"]),version:n(),checks:O(n(),c({ok:P(),detail:n().optional()})).optional()}).describe("Health probe response.");var oh=c({jobId:n().describe("Poll GET /v1/jobs/{jobId} / wait_job until terminal."),jobKey:n().describe("Deterministic identity of the work (content hash of every input the result depends on). Re-enqueueing the same key returns the same job while it runs; a failed key revives as a fresh attempt."),kind:n().describe("Job family, e.g. `verify` | `preview` | `brand_kit_extract`."),status:h(["running","succeeded","cancelled"]).describe("running on a fresh/deduped enqueue; succeeded when an identical request already completed. Cancelled is part of the shared status vocabulary; identical cancelled work revives to running.")});var _oe=0,Boe=9007199254740991,joe=0,Voe=9007199254740991,rh=c({geometry:c({scale:i(),compositionWidth:i().optional(),compositionHeight:i().optional(),width:i().optional(),height:i().optional()}),warnings:y(O(n(),L())).optional(),previewed:c({source:h(["inline","scratch","persisted"]),compositionId:n().optional(),etag:n().optional()}),listUsd:i().optional().describe("List price charged for this delivered capture."),artifacts:y(c({id:n(),beatSec:i(),bytes:A().gt(_oe).max(Boe),contentType:h(["image/png","image/jpeg"]),layers:c({video:n().nullable(),overlays:A().min(joe).max(Voe)}),url:xe(),urlExpiresAt:n()}))});var sh=c({perCriterion:L(),composite:i(),critique:n(),checkpointId:n(),beats:L().optional(),clientScores:y(L()).optional(),listUsd:i().optional().describe("List price charged for this delivered evaluation.")});var Uoe=c({id:n().describe("Job id \u2014 pass to GET /v1/jobs/{id} / wait_job."),jobKey:n().describe("Deterministic identity of the work (idempotency key, e.g. `verify-<sessionId>-<contentHash>` \u2014 the hash covers the composition AND grading inputs). Re-enqueueing the same key returns the same job while it runs."),kind:n().describe("Job family, e.g. `verify`."),status:h(["running","succeeded","failed","cancelled"]).describe("Poll until terminal (`succeeded` | `failed` | `cancelled`)."),progress:E([c({phase:n(),percent:i().optional(),message:n().optional()}),G()]).describe("Executor heartbeat while running; null when none reported."),result:E([E([rh,jm,sh,th]),G()]).describe("Kind-specific payload when status is `succeeded`; null otherwise."),error:E([c({code:n(),message:n()}),G()]).describe("Stable failure code + human message when status is `failed`; null otherwise. `job_timeout` = the executor died mid-run and the stall sweep reaped the job \u2014 re-enqueue to retry."),createdAt:n(),updatedAt:n(),completedAt:n().nullable()});var nh=c({mediaId:n().describe("The media item this moment belongs to \u2014 feed it to apply_composition as a clip source, or GET /v1/media/{id}/context for its faces/beat/word grids."),name:n().describe("The media item's name, so a result is readable without a second call."),score:i().describe("Cosine similarity between the query text and the chunk's frame, in [-1, 1]. Higher is closer. Compare scores WITHIN one response; absolute values are not calibrated across queries."),startSec:i().describe("Moment start, SECONDS from the media item's start."),endSec:i().describe("Moment end, SECONDS from the media item's start."),thumbUrl:n().nullable().describe("Presigned URL for the media item's thumbnail, or null when it has none. This is the ITEM's thumbnail, not a still of this moment \u2014 render a still of the exact range with preview_frame.")});var Hoe=c({results:y(nh).describe("Matching moments, best first. Empty means nothing matched (when `indexing` is false) \u2014 the library was searched and came back empty-handed."),indexing:P().describe('TRUE when some of the org\'s footage is NOT in the visual index yet \u2014 media that predates it, or is still processing. This is COVERAGE, not emptiness: it can be true ALONGSIDE results, and then it means "these are the best moments among what we have looked at so far", not "these are the best moments". An empty `results` with `indexing: true` means "not looked at yet", NOT "no match" \u2014 re-run the media through processing (reprocess) to index it, then search again. FALSE with empty `results` is a real miss: the library was searched and nothing matched.')}).describe(`Semantic search over the org's OWN footage. The query is embedded with the same CLIP model that embedded every indexed frame, so a description of what you want to SEE ("wide shot of the speaker at a whiteboard") finds the moment even when nobody says those words.`);var Woe=100,i0e=c({limit:A().min(1).max(Woe).optional(),after:n().optional()});var $oe=100,c0e=c({limit:A().min(1).max($oe).optional(),after:n().optional(),projectId:n().optional(),kind:h(["authored","clip","all"]).optional()});var Goe=100,d0e=c({category:h(["text","effects","transitions","layouts","backgrounds","ui-blocks","scenes"]).optional(),kind:h(["component","transition","scene"]).optional(),tier:h(["recommended","standard","niche"]).optional(),useCase:h(["intro","outro","full-scene","title-over-footage","transition","background","grade","emphasis","explainer","social-cut"]).optional(),mood:n().optional(),q:n().optional(),intent:n().optional(),limit:A().min(1).max(Goe).optional(),after:n().optional()});var Koe=100,u0e=c({limit:A().min(1).max(Koe).optional(),after:n().optional(),composeJobId:n().optional(),projectId:n().optional()});var h0e=c({kind:h(["subjectTrack","matte"]).optional(),startSec:i().optional(),endSec:i().optional()});var qoe=100,x0e=c({limit:A().min(1).max(qoe).optional(),after:n().optional(),kind:h(["video","audio","image","gif","asset","source","stock"]).optional(),source:h(["upload","generated","import-url","stock"]).optional(),tag:n().optional()});var Yoe=100,b0e=c({limit:A().min(1).max(Yoe).optional(),after:n().optional(),platform:n().optional(),format:n().optional(),topic:n().optional()});var Qoe=100,A0e=c({limit:A().min(1).max(Qoe).optional(),after:n().optional(),status:n().optional()});var Joe=100,z0e=c({limit:A().min(1).max(Joe).optional(),after:n().optional()});var E0e=c({groupId:n().min(1)});var Zoe=100,I0e=c({limit:A().min(1).max(Zoe).optional(),after:n().optional()});var Xoe=100,w0e=c({limit:A().min(1).max(Xoe).optional(),after:n().optional()});var ere=0,tre=0,ore=c({startSec:i().min(ere).describe("Source-in of the window to matte, in seconds into the underlying source."),endSec:i().gt(tre).describe("Source-out of the window to matte, in seconds into the underlying source.")}).describe("POST /media/:id/matte body. The window is REQUIRED and is the clip's SOURCE trim, not timeline time: a matte's cost scales with its duration, so there is no whole-source default to fall back on.");var rre=c({factId:n(),status:h(["pending","ready","failed"]),quotedUsd:i().describe("The server's price for this matte, in USD, quoted from the window duration."),alreadyExisted:P().describe("True when a matte for this exact window was already pending or ready. Nothing was dispatched and nothing will be charged.")}).describe("POST /media/:id/matte response \u2014 the claimed matte fact.");var ic=c({mediaItemId:n(),language:n().nullable(),fullText:n(),utterances:y(O(n(),L())),data:y(O(n(),L())).optional(),pagination:be.optional()}).describe("Transcript response.");var sre=c({mediaId:n(),durationSec:i().nullable(),width:i().nullable(),height:i().nullable(),thumbnail:E([c({url:n()}),G()]).describe("Presigned processing thumbnail (~1 week) \u2014 the footage at a glance. For stills at chosen timestamps, use preview_frame with a one-clip composition over this media."),faces:c({status:h(["ready","not_detected"]),windows:y(Qm)}),transcript:c({status:h(["ready","not_transcribed","unavailable"]),data:E([ic,G()])}),beatGrid:E([c({bpm:i(),beatTimesMs:y(i()).describe("Beat onset times in MILLISECONDS \u2014 divide by 1000 for timeline startTime (composition timeline fields are seconds)."),confidence:i().describe("Rhythmic-periodicity strength (0\u20131). Trust the grid for cutting when high; a beatless bed reports low."),method:h(["requested-anchored","detected"]).describe("`requested-anchored` = phase-locked to a requested BPM (a generated bed whose prompt named a tempo); `detected` = full beat tracking (import/upload).")}),G()]).describe("The MUSIC-role rhythm grid (audio-substrate MVP). Present only for a music bed that carries a computed beat grid; null otherwise. For a music-driven film, cut on these beats (transition midpoints on beats, risers resolving on downbeats)."),wordGrid:E([c({wordTimesMs:y(i()).describe("Word onset times in MILLISECONDS, in order \u2014 divide by 1000 for timeline startTime (composition timeline fields are seconds).")}),G()]).describe("The VO-role rhythm grid: word onsets surfaced from the transcript (pure exposure). Present only when a transcript exists; null otherwise. For a VO-driven (narration) film, cut every beat boundary to the voice \u2014 the film-spine rule."),audioRole:E([h(["vo","music","sfx","ambience"]),G()]).describe("DECLARED audio role of this asset (audio-substrate P0): 'vo' (narration), 'music' (bed that ducks under speech), 'sfx' (one-shot hit), 'ambience' (a bed that HOLDS under VO \u2014 never ducks). Author the clip source's `audioRole` from this. Null for footage/images or an undeclared audio asset."),envelope:E([c({envelopeClass:h(["transient","sweep","ambient"]).describe("Coarse temporal shape: 'transient' (a sharp one-shot), 'sweep' (a bounded rise/fall over ~0.5\u20132s), 'ambient' (an unbounded bed)."),attackMs:i().optional(),spectralCentroidHz:i().optional(),meanVolumeDb:i().optional(),maxVolumeDb:i().optional()}),G()]).describe("Envelope evidence (audio-substrate P0). `envelopeClass` is always present when an envelope exists (the SFX pack carries it); the numeric probe stats are present only when an audio probe has run. Null when no envelope is stored."),facts:y(go).describe("Derived facts about this source (subject tracks, mattes): what has been computed, its status, and what it was billed. Same shape as GET /media/{id}/facts."),offers:y(bo).describe("Enhancements this source does not have yet, with a server quote. Same shape as GET /media/{id}/facts. Mattes are quoted per-window via POST /media/{id}/matte, never here.")}).describe("Read-only authoring context for a source media item: detected face roster + transcript + the temporal grids (beat / word) an agent cuts to, the DECLARED audioRole + envelope of an audio asset, and the paid-enhancement block (facts already computed + offers for what is missing).");var nre=c({id:n(),uploadUrl:xe(),expiresAt:n()}).describe("POST /media response: reserved media id + a presigned PUT URL. PUT the raw bytes to uploadUrl (\u2264 ~5 GiB), then POST /media/:id/finalize.");var ire=0,are=0,cre=c({kind:h(["subjectTrack","matte"]).describe("Which enhancement to buy. `transcript` is NOT purchasable here \u2014 it is delivered by the transcription pipeline."),intent:c({startSec:i().min(ire),endSec:i().gt(are)}).optional().describe("The SOURCE window. REQUIRED for `matte` (its cost scales with duration). OPTIONAL for `subjectTrack`: give a clip's source window to buy the track the render looks up for THAT clip, and pay only for its duration; omit it to detect the whole source.")}).describe("POST /media/:id/facts body.");var pre=c({factId:n(),status:h(["pending","ready","failed"]),quotedUsd:i(),alreadyExisted:P().describe("True when this exact fact was already pending or ready. Nothing was dispatched and nothing will be charged.")}).describe("POST /media/:id/facts response.");var dre=c({facts:y(go),offers:y(bo).describe("What is NOT yet present and could be bought. A `matte` offer appears ONLY when the request carried `startSec`+`endSec` (the clip's SOURCE window) \u2014 a matte's price is a function of its duration, so there is no honest whole-source matte quote. `transcript` is never offered: it is produced by the ingest pipeline, not bought here."),exact:Jm.optional()}).describe("Facts and offers for a media item, plus an exact-window resolution when requested.");var lre=c({audioRole:h(["vo","music","sfx","ambience"]).optional().describe("Declared audio role: 'vo' (narration), 'music' (bed that ducks under speech), 'sfx' (one-shot hit), 'ambience' (a bed that HOLDS under VO \u2014 never ducks).")}).describe("POST /media/:id/finalize body \u2014 optional declared audioRole.");var ure=c({id:n(),status:h(["processing","complete"]),processingPhase:n()}).describe("POST /media/:id/finalize response: ingest triggered (audio/video \u2192 processing) or the item is immediately ready (image/asset \u2192 complete).");var mre=1e4,hre=c({generator:h(["text-to-video","text-to-image","image-to-video","text-to-music","text-to-speech","text-to-sfx","auto"]),prompt:n().min(1).max(mre),style:O(n(),L()).optional().describe("Free-form generation parameters, read per generator. All generators honor `aspect` (string) + `durationSec` (number) where applicable. text-to-speech honors `voice` (string; default voice when omitted), `speed` (number 0.7-1.2), `stability` (number 0-1), and `styleExaggeration` (number 0-1 \u2192 the endpoint's style exaggeration). Provider and model selection are server-owned and cannot be overridden."),refs:c({firstFrameMediaId:n().optional(),lastFrameMediaId:n().optional(),imageMediaIds:y(n()).optional()}).optional()}).describe("POST /media/generate body.");var fre=c({id:n(),status:b("generating"),estimateUsd:i().optional()}).describe("POST /media/generate response.");var xre=2048,gre=500,bre=0,yre=10737418240,Are=c({url:xe().max(xre),filename:n().min(1).max(gre),contentType:h(["video/mp4","video/quicktime","video/x-matroska","video/webm","audio/mpeg","audio/wav","audio/x-wav","audio/mp4","audio/aac","image/png","image/jpeg","image/webp","image/gif","image/svg+xml","application/json","font/ttf","font/otf","font/woff","font/woff2"]),size:A().gt(bre).max(yre).optional(),audioRole:h(["vo","music","sfx","ambience"]).optional().describe("Declared audio role: 'vo' (narration), 'music' (bed that ducks under speech), 'sfx' (one-shot hit), 'ambience' (a bed that HOLDS under VO \u2014 never ducks).")}).describe("POST /media/import body.");var Sre=c({id:n(),status:b("importing")}).describe("POST /media/import response.");var ih=c({phase:h(["idle","pending_import","pending_upload","uploading","extracting","loading_model","transcribing","proxy","embedding","analyzing","indexing","generating","rendering","processing","complete","error","cancelled"]),percent:i().nullish(),message:n().nullish(),error:n().nullish()}).describe("Processing status stored on mediaItems rows.");var ac=c({id:n(),status:n(),source:h(["upload","generated","stock"]),name:n(),mimeType:n(),fileSize:i(),duration:i().nullable(),width:i().nullable(),height:i().nullable(),frameRate:i().nullable(),progress:E([c({phase:n(),percent:i().nullable()}),G()]),analysis:E([O(n(),L()),G()]),listUsd:i().optional().describe("A2 money stamp \u2014 GENERATED media only: the generate meter's LIST price (USD) at the success terminal. A plan allowance may zero the invoice line. Absent for uploads/imports, failures, x402 (on-chain receipts)."),thumbnailUrl:n().nullable().describe("Presigned GET URL for the item's thumbnail (an uploaded image is its own thumbnail), valid ~7 days \u2014 fetch it directly, no auth header. null when no thumbnail exists yet (still processing, stock imports, audio)."),kind:n().nullable(),tags:E([y(n()),G()]),attribution:E([c({provider:h(["pexels","pixabay","freesound","klipy"]),externalId:n().nullable(),assetUrl:n().nullable(),license:n().nullable()}),G()]),processingStatus:E([ih,G()]),createdAt:n(),updatedAt:n()}).describe("Media item response per \xA7Media.");var zre=c({data:y(ac),pagination:be});var Tre=500,Ere=0,Cre=10737418240,Ire=c({filename:n().min(1).max(Tre),contentType:h(["video/mp4","video/quicktime","video/x-matroska","video/webm","audio/mpeg","audio/wav","audio/x-wav","audio/mp4","audio/aac","image/png","image/jpeg","image/webp","image/gif","image/svg+xml","application/json","font/ttf","font/otf","font/woff","font/woff2"]),size:A().gt(Ere).max(Cre),projectId:n().min(1).optional()}).describe("POST /media upload initiation body.");var Rre=c({jobId:n(),status:n(),muxedItems:E([O(n(),n()),G()]).optional(),error:n().nullish(),startedAt:n().nullish(),completedAt:n().nullish()}).describe("Mux job response.");var ize=c({sessionId:n()});var wre=0,Ore=0,Mre=c({fromSec:i().min(wre).describe("Window start, seconds into the composition."),toSec:i().gt(Ore).describe("Window end (exclusive), seconds."),compositionId:n().min(1).optional().describe("Target a specific composition; defaults to the project's active composition.")}).describe("POST /projects/:id/preview-clip body.");var kre=18,Pre=.1,Lre=1,Dre=100,vre=c({composition:L().optional().describe("The composition to render. Absent \u21D2 the project's ACTIVE composition \u2014 what create_render will encode. The response's `previewed.source` names what was rendered."),compositionId:n().optional().describe("Preview a SPECIFIC persisted composition of this project (create_render parity). Absent \u21D2 the active one. A stale/foreign id is a 404 \u2014 never a silent fall-through."),session_id:n().optional().describe("Compose-session id: render that session's SCRATCH composition (what the session has been editing) instead of the active row. Ignored when `composition` is passed."),timestamps:y(i()).min(1).max(kre).describe("Composition seconds to capture, 18 per request. The batch renders as ONE unit of work \u2014 one warm container, one source decode, N seeks \u2014 and that unit has a fixed time budget, so a larger batch is refused here rather than accepted and timed out minutes later. For a denser sweep, split it across calls; identical beats are served from the still cache, so overlapping batches are cheap."),imageFormat:h(["png","jpeg"]).optional().describe("Still format. Default jpeg \u2014 these pixels go to a vision model, where jpeg is equivalent and png costs multiples in bytes to store and move. Pass png only when you need full fidelity."),scale:i().min(Pre).max(Lre).optional().describe("Render scale 0.1\u20131. Default 0.5, which is what this schema has always recommended for vision-bound looks. Pass 1 when judging fine detail \u2014 it costs ~4x the vision tokens."),jpegQuality:A().min(1).max(Dre).optional().describe("JPEG quality (jpeg only). Default 70 \u2014 the quality the eval panel grades at.")});var Fre=300,Nre=0,_re=1e4,Bre=120,jre=c({brandKits:y(c({id:n(),name:n(),audio:c({sfxIntensity:h(["off","light","standard","dense"]).optional(),musicEnabled:P().optional(),musicMood:n().max(Fre).optional(),sonicLogo:c({ref:n().min(1),placement:h(["intro","outro","both"]),offsetMs:A().min(Nre).max(_re).optional()}).optional().describe("A brand sound signature bound to the intro/outro bookend. `ref` = a palette reference; bound only when the kit carries the matching bumper (intro/outro), else a non-blocking advisory."),uiSoundSet:c({tick:n().min(1).optional(),pop:n().min(1).optional(),impact:n().min(1).optional(),confirm:n().min(1).optional(),error:n().min(1).optional(),whoosh:n().min(1).optional(),riser:n().min(1).optional()}).optional().describe("Per-family SFX overrides (the brand's own tick/pop/\u2026). Highest-priority tier over the org palette + pack default in the compose SFX draw."),bedStyle:c({bedId:n().min(1).optional(),genre:n().max(Bre).optional(),bpmRange:c({min:i(),max:i()}).optional()}).optional().describe("Preferred music bed (`bedId`) or a style hint (`genre` / `bpmRange`). Surfaced for driving agents; compose does not auto-select a pack bed."),ambiencePreference:E([c({ref:n().min(1)}),G()]).optional().describe("Preferred ambience bed (`{ref}`) or explicit null (opt-out). Surfaced for driving agents; compose has no ambience auto-placement.")}).optional()})).describe("The org's brand kits (bind one to a project via update_project). `audio` carries the brand sound kit when set."),critics:y(Bs).describe("Registered critics \u2014 run in the Director's gates AND score_composition."),references:y(c({mediaId:n(),name:n().optional(),thumbnailUrl:n().optional().describe("Presigned reference thumbnail (~1 week).")})).describe("The union of critic reference media \u2014 the org's visual standard, with provenance."),recentDecisions:y(c({checkpointId:n(),projectId:n(),kind:h(["gate","score"]),stage:h(["content","layout","motion"]).optional(),decision:n(),decidedAt:i()})).describe("The last recorded checkpoint decisions \u2014 the raw taste log phase 2 will distill.")}).describe("The org's legible taste: brand + critics + references + decision log.");var Vre=0,Ure=9007199254740991,ah=c({hasComposition:P(),sceneCount:A().min(Vre).max(Ure),duration:i().nullable(),updatedAt:n().nullable()}).describe("Summary of a project's stored composition.");var ch=c({id:n(),name:n(),kind:n().nullable(),durationSec:i().nullable().describe("Seconds. Uses the media duration when known; audio without one falls back to its transcript's measured duration (same rule as get_media_context)."),hasTranscript:P().describe("A cached transcript EXISTS for this item. The bodies are never inlined here \u2014 fetch one with GET /v1/media/{id}/transcript (or get_media_context for faces + grids too).")}).describe("One media item as the project context lists it: identity + duration + whether a transcript exists.");var ph=E([c({status:b("ready"),mediaId:n(),words:y(c({text:n(),start:i().describe("Word onset (SECONDS from source start)."),end:i().describe("Word end (SECONDS from source start).")}))}),c({status:b("unavailable"),mediaId:n()})]);var Hre=0,Wre=0,$re=c({composition:E([oc,G()]).describe("The project's ACTIVE composition wire shape \u2014 identical to GET /v1/projects/{id}/composition. NULL when the project has no composition yet (a freshly created project): mint one with new_composition, or let the first apply_composition create it."),format:E([c({aspectRatio:h(["16:9","9:16","1:1","4:5"]),fps:E([b(24),b(25),b(30),b(60)]).optional(),resolution:h(["hd","fhd","4k"]).optional(),platform:n().optional()}),G()]).describe("The composition's format, hoisted \u2014 the pixel frame every card/graphic must be authored against. Null whenever `composition` is null."),media:y(ch).describe("The org's media library (most recent first, capped) \u2014 the pool this project can draw clips from."),transcript:E([ph,G()]).describe('The FIRST transcribed media item\'s word-timed transcript, flattened \u2014 the spine a VO-driven film cuts to. `status:"ready"` carries the words; `status:"unavailable"` means the transcript exists but its body could not be fetched (retry); null means nothing in `media` is transcribed. For any OTHER transcribed item (see each entry\'s `hasTranscript`), read GET /v1/media/{id}/transcript.'),brandKit:E([nr,G()]).describe("The kit BOUND to this project (`projects.brandKitId` is the brand SSOT \u2014 bind one via update_project). Null when the project has no kit bound; enumerate the org's kits with GET /v1/brand-kits."),markers:y(c({id:n().min(1),startTime:i().min(Hre),endTime:i().min(Wre).optional(),kind:n().min(1),name:n().optional(),metadata:O(n(),L()).optional()})).describe("The composition's markers \u2014 hoisted alongside `format`. Empty when the composition carries none AND when there is no composition yet.")}).describe("One-call agent context for a project: composition + format + media pool + the lead transcript + the bound brand kit + markers. Replaces get_composition + get_media_context + get_profile at the start of an authoring session. A 404 means the project doesn't exist for your org \u2014 never that it is empty.");var Gre=200,Kre=0,qre=0,Yre=c({name:n().min(1).max(Gre),description:n().optional(),format:ye.optional(),brandKitId:n().min(1).optional(),width:i().gt(Kre).optional(),height:i().gt(qre).optional()}).describe("POST /projects body.");var dh=E([c({id:n(),status:n(),createdAt:n(),outputUrl:n().nullable(),outputExpiresAt:n().nullable()}),G()]).describe("Most recent render for a project, if any.");var cc=c({id:n(),name:n(),description:n().nullable(),format:E([ye,G()]),brandKitId:n().nullable(),activeCompositionId:n().nullable(),composition:ah,lastRender:dh,webUrl:n().nullable().describe("A browser URL that opens THIS project, or null when CueFrame exposes no web view for a project. Null today: the console serves account surfaces (keys, usage, billing) and has no per-project page, so there is no link to give. Do NOT synthesise one \u2014 a guessed console path 404s. Show the user rendered output (create_render \u2192 outputUrl) or a preview still instead. This field becoming non-null is the signal that a real project view exists."),createdAt:n()}).describe("Project response per \xA7Projects.");var Qre=c({data:y(cc),pagination:be});var Jre=200,Zre=c({name:n().min(1).max(Jre).optional(),description:n().optional(),format:ye.optional(),brandKitId:n().min(1).optional()}).describe("PATCH /projects/:id body.");var Xre=c({clipSuggestionId:n().min(1).optional(),compositionId:n().min(1).optional().describe("Target a specific composition in the project; defaults to the project's active composition."),format:ye.optional(),priority:h(["interactive","standard","background"]).optional(),intent:h(["preview","final"]).optional(),brandKitId:E([n().min(1),G()]).optional()}).describe("POST /projects/:id/renders body.");var ese=c({manifestVersion:n().describe("Identifies this exact face table. Derived from the table's own content, so it moves when and only when the admitted set moves. Record it beside a composition to state which face table a font choice was validated against."),families:y(c({family:n().describe("The family name authoring accepts VERBATIM \u2014 card, caption and scene text alike."),weights:y(c({min:i(),max:i()})).describe("The weights a shipped file declares. A static face has min === max; a variable face gives its declared wght axis range. Any weight inside a range renders; anything outside every range is REFUSED, never synthesised."),styles:y(h(["normal","italic"])).describe("The styles bytes exist for in this family. Request italic only when this list includes 'italic'; the renderer refuses synthetic slant."),captionDefaults:c({base:i(),emphasis:i()}).describe("The weights a caption is drawn at when the style names none."),origin:h(["bundled","aliased"]).describe("'bundled' = bytes ship in the render bundle. 'aliased' = a metric-compatible binary stands in for the named family.")}))}).describe("GET /fonts response \u2014 the renderer's admitted font set. Derived from the same table the font gate refuses by, so any family/weight/style here passes validation by construction. Covers the BUNDLED set only: a brand kit's sealed faces are per-org and per-render.");var tse=0,ose=9007199254740991,rse=0,sse=9007199254740991,lh=c({phase:h(["queued","validating","presigning","collecting-artifacts","resolving","detecting","baking-matte","translating","spawning","encoding","uploading"]),percent:i(),scenesCompleted:A().min(tse).max(ose).optional(),scenesTotal:A().min(rse).max(sse).optional()}).describe("Non-terminal render progress; phase is one of the worker's emitted stages.");var pc=c({id:n(),status:h(["queued","pending","rendering","complete","error","cancelled"]),progress:lh.optional(),outputUrl:n().nullable(),outputExpiresAt:n().nullable(),error:n().nullable().describe("Human-readable failure message. Pair with `errorCode` for a stable, machine-readable code an agent runner can branch on."),errorCode:n().nullable().describe("Stable, machine-readable error code (e.g. `render_pipeline_unavailable`, `render_route_missing`, `render_pipeline_failed`). Null when status is not `error` or unavailable for an older render."),errorDetails:E([O(n(),L()),G()]).describe("Structured failure context \u2014 `{ targetUrl?, upstreamStatus?, upstreamCode?, attemptedAt? }`. Surfaced so agent runners can distinguish operator-config issues from upstream-down vs route-missing without parsing `error`."),category:E([h(["authoring","transient","internal"]),G()]).describe("Failure taxonomy when status is `error`; null otherwise. `authoring` = deterministic defect in YOUR composition/request \u2014 fix it, retrying is futile; `transient` = temporary pipeline/infra failure \u2014 safe to retry_render; `internal` = unexpected server fault \u2014 retry once then escalate. Mirrors the render.failed webhook's `category`."),retryable:P().nullable().describe("Whether re-attempting the SAME render can succeed (status `error`); null otherwise. true \u2192 call retry_render. false \u2192 deterministic (category authoring/internal); fix the composition first \u2014 retry_render alone reproduces it. Mirrors the render.failed webhook's `retryable`."),createdAt:n(),updatedAt:n().describe("ISO-8601 timestamp of the render's most recent progress update. Compute staleness = now \u2212 updatedAt to distinguish a wedged render from a slow one and decide whether to wait, cancel, or retry."),listUsd:i().optional().describe("A2 money stamp: the metered event's LIST price (USD), stamped at the success terminal (exports for deliverable renders, compose_capture for A8 previews). A plan allowance may zero the actual invoice line \u2014 this is the list price, never a Stripe charge. Absent while running, on failure, and for x402 orgs (on-chain receipts). Mirrors the get_usage ledger."),warnings:y(n()).optional().describe("Non-fatal advisories surfaced at render-CREATE (omitted when none, and on GET \u2014 create-time only).")}).describe("Render job response per \xA7Renders.");var nse=c({data:y(pc),pagination:be});var ise=c({outputUrl:n(),outputExpiresAt:n()}).describe("POST /refresh-url response.");var js=c({candidateId:n(),provider:h(["pexels","pixabay","freesound","klipy"]),kind:h(["video","photo","sfx","gif"]),thumbnail:n(),previewUrl:n(),downloadUrl:n().optional(),duration:i().optional(),width:i().optional(),height:i().optional(),author:n(),authorUrl:n().optional(),assetUrl:n().optional(),license:n().optional()}).describe("A stock resource search candidate.");var ase=c({kind:h(["sfx-pack","music-pack"]).optional(),id:n().min(1).optional(),projectId:n().min(1).optional(),candidateId:n().min(1).optional()}).describe('POST /resources/import body \u2014 stock candidate lane { projectId, candidateId } OR curated pack lane { kind:"sfx-pack"|"music-pack", id }.');var cse=c({id:n(),status:h(["importing","ready"])}).describe("POST /resources/import response.");var pse=200,dse=200,lse=10,use=0,mse=50,hse=0,fse=9007199254740991,xse=0,gse=9007199254740991,bse=0,yse=0,Ase=c({query:n().min(1).max(pse).optional(),queries:y(n().min(1).max(dse)).min(1).max(lse).optional(),kind:h(["video","photo","sfx","gif"]).optional(),provider:h(["pexels","pixabay","freesound","klipy"]).optional(),limit:A().gt(use).max(mse).optional(),minWidth:A().gt(hse).max(fse).optional().describe("Video-only minimum selected-rendition width in pixels; smaller results are excluded."),minHeight:A().gt(xse).max(gse).optional().describe("Video-only minimum selected-rendition height in pixels; smaller results are excluded."),durationSec:c({min:i().min(bse).optional(),max:i().gt(yse).optional()}).optional().describe("sfx-only clip-length bound in seconds \u2192 Freesound native filter.")}).describe("POST /resources/search body \u2014 one `query`, or a batch of `queries[]`.");var uh=c({query:n(),provider:h(["pexels","pixabay","freesound","klipy"]).optional(),kind:h(["video","photo","sfx","gif"]).optional(),candidates:y(js),error:n().optional()}).describe("One query's candidates within a batch search.");var Sse=c({provider:h(["pexels","pixabay","freesound","klipy"]).optional(),kind:h(["video","photo","sfx","gif"]).optional(),candidates:y(js).optional(),results:y(uh).optional()}).describe("POST /resources/search response \u2014 `candidates` for one query, `results[]` for a batch.");var zse=-9007199254740991,Tse=9007199254740991,Ese=c({ok:b(!0),stage:h(["content","layout","motion"]).optional(),version:A().min(zse).max(Tse).optional(),composeJobId:n().optional()}).describe("Decision recorded; the run resumes (the SAME rail as POST /checkpoints/{id}/resume).");var Cse=-9007199254740991,Ise=9007199254740991,Rse=-9007199254740991,wse=9007199254740991,Ose=-9007199254740991,Mse=9007199254740991,kse=c({id:n(),projectId:n(),composeJobId:n().optional(),briefId:n().optional(),kind:h(["gate","score"]),stage:Fs.optional(),version:A().min(Cse).max(Ise),status:h(["awaiting","approved","revised","abandoned","expired","superseded"]),artifact:L().describe("The stage artifact under review: the locked ComposePlan at content; the composition wire shape at layout/motion; the judged composition snapshot on kind:'score'."),stillUrls:y(n()).optional().describe("Presigned storyboard/eval stills \u2014 the packet's visual evidence (may be GC'd by the retention sweep after the job goes terminal; the decision record is immortal)."),criticVerdicts:L().optional().describe("Per-criterion scores + critique from the design loop / judge, incl. lock_violation entries."),quote:vs.optional(),revisionCycle:A().min(Rse).max(wse).describe("Revise cycles this gate has consumed. The brief quote states the included count (revisionCyclesIncluded); beyond it, resume(revise) is refused with a typed error."),decision:L().optional().describe("The recorded decision {decision, comments?, globalNote?, decidedAt} once resolved."),reviewMode:h(["agent","hosted"]).optional().describe("How this packet is decided (from the Brief's gates). 'hosted' = the review PAGE captures the decision; absent/'agent' = the decision flows back through the driving agent."),createdAt:i(),updatedAt:i(),versionStack:y(c({id:n(),version:A().min(Ose).max(Mse),stage:h(["content","layout","motion"]).optional(),status:n(),decision:n().optional(),createdAt:i()})).describe("The run's v1\u2192vN gate history \u2014 per-version status + decision summaries.")});var Pse=c({composition:L().optional().describe("The composition to judge. Absent \u21D2 the project's ACTIVE composition."),compositionId:n().optional().describe("Judge a SPECIFIC persisted composition of this project (create_render parity). Absent \u21D2 the active one. A stale/foreign id is a 404 \u2014 never a silent fall-through."),session_id:n().optional().describe("Compose-session id: judge that session's SCRATCH composition (what the session has been editing) instead of the active row. Ignored when `composition` is passed."),editorialIntent:n().optional(),brandContext:n().optional()});var Lse=10,Dse=25,oTe=c({q:n().min(1),limit:A().min(1).max(Dse).default(Lse)});var mh=c({startSec:i(),endSec:i(),candidateId:n().describe("The chosen audio source (the clearest mic) for this span \u2192 programAudioSourceId."),reasons:y(n())});var hh=c({startSec:i(),endSec:i(),candidateId:n(),sourceInSec:i().describe("Chosen source window start (declared-offset resolved)."),sourceOutSec:i(),reasons:y(n())});var fh=c({candidateId:n().describe("Stable angle/source id. An unknown id is rejected, never remapped."),role:n().nullish().describe('Agent-declared semantic tag (e.g. "wide", "webcam").'),score:i().describe("The weighted prominence score (\u03A3 weights\xB7signal)."),contributions:O(n(),i()).describe("signalKey \u2192 weighted contribution (the agent reweights from this)."),reasons:y(n())});var xh=c({startSec:i().describe("Span start (output seconds)."),endSec:i().describe("Span end (output seconds)."),chosen:n().describe('The recommended candidateId, or "__hold__" (abstain).'),pacingNote:n().nullish().describe("Which mechanism produced the pick (argmax / hysteresis / override / hold \u2026)."),candidates:y(fh)});var vse=c({projectId:n(),groupId:n(),selectorVersion:n(),signalVersions:O(n(),n()),moments:y(xh),recommendation:c({cutSchedule:y(hh),audioBed:y(mh).describe("Best-audio bed (instance #3): the clearest mic per span."),suppressedSwitches:y(c({atSec:i(),wouldHaveBeenCandidateId:n(),byScore:i(),blockedBy:n(),releaseAtSec:i().nullable()})).describe("Switches the stabilizer suppressed (the anti-ping-pong audit).")}),divergesFromComposition:P().optional()}).describe("Selector (switch) candidates + recommendation for a synced-angle group. Every candidate carries score + contributions + reasons so the agent reweights from evidence; the recommendation is the lowered cut schedule + best-audio bed.");var Fse=0,Nse=0,_se=0,Bse=0,jse=0,Vse=c({groupId:n().min(1),weights:O(n(),i()).optional().describe("Sparse prominence weights (the taste knob, non-negative). Default = DOMINANCE_WEIGHTS."),minHoldSec:i().gt(Fse).optional(),enterSec:i().min(Nse).optional(),switchMargin:i().min(_se).optional(),cooldownSec:i().min(Bse).optional(),maxHoldSec:i().gt(jse).optional(),lockSourceId:n().optional().describe("Pin a camera/angle for the whole timeline."),overrides:y(c({startSec:i(),endSec:i(),candidateId:n()})).optional()});var Use=200,Hse=50,Wse=20,$se=c({name:n().min(1).max(Use),files:y(c({mediaId:n().min(1),role:n().min(1).max(Hse)})).min(1).max(Wse)}).describe("POST /sessions body.");var gh=c({mediaId:n(),role:n(),status:n().nullable()}).describe("One file member of a session, with optional role + status.");var Gse=0,Kse=9007199254740991,bh=c({id:n(),name:n(),fileCount:A().min(Gse).max(Kse),muxStatus:n().nullable(),createdAt:n()}).describe("Session list summary (per list endpoint).");var qse=c({data:y(bh),pagination:be});var Yse=c({id:n(),name:n(),files:y(gh),mux:c({status:n().nullable(),jobId:n().nullable(),muxedItems:E([O(n(),n()),G()]),error:n().nullable(),startedAt:n().nullable(),completedAt:n().nullable()}),createdAt:n()}).describe("Session response per \xA7Sessions.");var yh=c({name:n(),title:n(),description:n()}).describe("A CueFrame agent skill (metadata).");var Qse=c({skills:y(yh)}).describe("GET /skills response \u2014 the available agent skills.");var Jse=c({factId:n().describe("Opaque identifier for the derived fact."),status:h(["pending","ready","failed"]).describe("State of the fact right now. `ready` with `alreadyExisted` means the detection was already computed and is available immediately."),quotedUsd:i().describe("The server's price for this detection, in USD, quoted from the source duration. Zero is charged when `alreadyExisted` is true."),alreadyExisted:P().describe("True when this exact detection was already pending or ready. Nothing was dispatched and nothing will be charged \u2014 the same fact is served twice for one price.")}).describe("POST /media/:id/detect-subjects response \u2014 the claimed perception fact.");var Zse=0,Xse=9007199254740991,Ah=c({id:n(),briefId:n().nullable(),rank:A().gt(Zse).max(Xse),trim:c({start:i(),end:i()}),score:i(),title:n(),reason:n(),topic:n(),hook:n(),platforms:y(n()),format:n(),caption:n(),hashtags:y(n()),textOverlays:y(n()),editingNotes:n(),motionStyle:c({textAnimation:n(),transitions:n(),colorMood:n(),captionStyle:n()}),visualTreatment:y(c({time:E([i(),n()]),visual:n()})),brollSuggestions:y(c({moment:n(),searchTerms:y(n()),rationale:n()})),thumbnailConcept:n()}).describe("Single ranked clip suggestion.");var ene=c({status:h(["idle","generating","completed","failed"]),createdAt:n().nullable(),analyzedAt:n().nullable(),jobId:n().nullable(),topics:y(n()),suggestions:y(Ah),pagination:be}).describe("GET /media/:id/suggestions envelope.");var tne=c({status:h(["queued","running","complete","failed"]),alreadyRunning:P().optional()}).describe("POST /media/:id/suggestions response.");var one=1e3,rne=0,sne=0,nne=256,ine=256,ane=0,cne=0,pne=256,dne=12e3,lne=c({words:y(c({text:n().min(1).max(one),timelineStart:i().min(rne),timelineEnd:i().min(sne),clipId:n().min(1).max(nne),poolItemId:n().min(1).max(ine),sourceStart:i().min(ane),sourceEnd:i().min(cne),speakerId:E([n().max(pne),G()])})).min(1).max(dne)}).describe("A bounded merged timeline transcript for CueFrame edit analysis. The server selects the model; clients cannot provide a provider, API key, or model override.");var une=0,mne=9007199254740991,hne=0,fne=9007199254740991,xne=0,gne=9007199254740991,bne=c({fillers:y(A().min(une).max(mne)),silenceGaps:y(A().min(hne).max(fne)),emphasis:y(A().min(xne).max(gne))}).describe("CueFrame-model analysis of timeline word indices. Every returned index refers to the request's words array.");var yne=64,Ane=new RegExp("^[a-z][a-z0-9_]*$"),Sne=0,zne=1,Tne=500,Ene=10,Cne=c({scores:y(c({name:n().min(1).max(yne).regex(Ane),value:i().min(Sne).max(zne),comment:n().max(Tne).optional()})).min(1).max(Ene)}).describe("POST /traces/:traceId/scores body.");var Ine=-9007199254740991,Rne=9007199254740991,wne=c({accepted:A().min(Ine).max(Rne)}).describe("POST /traces/:traceId/scores response.");var One=0,Mne=0,kne=c({task:h(["summary","chapters","highlights"]).describe("What to ask of the transcript. `summary` \u2014 prose: the argument plus the concrete takeaways as bullets. `chapters` \u2014 one line per subject change, `[h:mm:ss] Title \u2014 description`. `highlights` \u2014 up to 8 standalone moments, strongest first, one line each as `[h:mm:ss]-[h:mm:ss] Title \u2014 why it lands` plus the line that carries it. Every timestamp is ABSOLUTE seconds from the start of the media, including when you pass a `window`, and every one is verified against the transcript before you see it \u2014 but they are LINE-START markers about 15s apart, so treat a span as APPROXIMATE (up to 15s early) and refine it against the word timings from GET /v1/media/{id}/context before you cut."),window:c({startSec:i().min(One).describe("Window start, SECONDS from the start of the media."),endSec:i().min(Mne).describe("Window end, SECONDS from the start of the media.")}).optional().describe("Analyse only this slice of the transcript. Omit to analyse all of it. Words are windowed exactly as captions.fromTranscript windows them (a word straddling an edge is clamped, a word wholly outside is dropped). Use this when a long recording is rejected with `transcript_too_long`, and to chapter a single segment of a podcast without paying for the whole thing.")}).describe("One editorial question about a media item's transcript.");var Pne=c({task:h(["summary","chapters","highlights"]).describe("Echo of the requested task \u2014 so a batched caller can pair answers to asks."),result:n().describe("The answer, as text. `summary` is prose; `chapters` and `highlights` are one record per LINE in the shape documented on the request's `task` field \u2014 split on newlines to parse them. Timestamps are absolute seconds from the start of the media and every one is CHECKED against the transcript before the response is returned (a fabricated timestamp fails the call rather than shipping), but they are line-start markers about 15s apart \u2014 a boundary can sit up to 15s BEFORE the moment you want. Use them to locate, not to cut: refine against the word timings in GET /v1/media/{id}/context.")}).describe("The analysis of one media item's transcript. Metered: this is a real LLM call, billed on measured token spend, so it is not a read to poll.");var NTe=c({detector:h(["face","person"]).optional()});var Lne=c({projectId:n().optional().describe("Optional project to scope the token to; omitted = org library.")});var Dne=-9007199254740991,vne=9007199254740991,Fne=c({token:n(),expiresAt:A().min(Dne).max(vne).describe("Expiry, ms since epoch (~30 min TTL).")}).describe("POST /uploads/token response: a short-lived token for the signed upload lane (the upload-signing worker's `uppy-auth-token` header). The org is derived from the session server-side and stamped into the token.");var Sh=c({featureId:n().describe("The metered plan feature (exports, compose, compose_verify, \u2026)."),value:i().optional().describe("Metered amount, in the feature's own unit (exports = render-minutes, storage = GB). Absent for a discrete single use, AND deliberately absent on the cost-plus lines (compose, generate, ai_tokens, compose_verify) whose internal metered unit is not a quantity \u2014 read `listUsd` for what those events cost you."),projectId:n().optional(),jobId:n().optional().describe("The job that produced the meter: a render/compose/preview job id, a media id (transcription, generate), or a clip-suggestion run id (jobKind `suggestions` \u2014 see `mediaItemId` for the media it analyzed)."),jobKind:n().optional().describe("render | compose | consult_* | verify | preview | generate | suggestions | session_uptime | \u2026"),mediaItemId:n().optional().describe("The media item the job ran over, when it ran over one (suggestions, transcription). Resolve it with GET /v1/media/{id}."),listUsd:i().optional().describe("LIST price of this metered event, USD. Honest naming: the invoice may zero it inside a plan allowance \u2014 this is the event's list price, not a Stripe line item."),createdAt:i().describe("Epoch-ms when the meter landed.")});var Nne=c({data:y(Sh),pagination:be});var $Te=c({contract:n().describe("The contract this verdict was computed against (the kernel version the deployment runs). If it differs between two calls, the validator changed, not your composition."),valid:P(),errors:y(c({code:n(),stage:n(),category:n(),retryable:P(),message:n(),fix:O(n(),L()).optional()})),advisories:y(c({rule:n(),criterion:n(),clipId:n().optional(),detail:n(),fix:n()})).describe("Deterministic, render-free QUALITY floors (the SAME named defects the Director's in-loop verify and score_composition surface: static-hold, caption-spine, sfx-density, sfx-speech-collision, bed-coverage, audio-role). NON-blocking \u2014 they never flip `valid` (an editorially-weak composition still renders); fix them for quality, not to save. Empty when the composition is clean or the wire shape failed (they need a parsed composition)."),warnings:y(n()).optional().describe("Non-blocking render-fidelity warnings detected before enqueue, including unavailable font families."),quote:c({thisStepUsd:i(),jobSpendSoFarUsd:i(),estimatedJourneyTotalUsd:i()}).describe("The A2 money triple for the commodity lane: validate is free; estimatedJourneyTotalUsd is the render price to finish from a valid composition \u2014 relay it BEFORE create_render.")});var gt=h(["media.transcribed","media.completed","suggest.completed","session.mux.complete","session.mux.failed","render.completed","compose.completed","checkpoint.ready","project.updated","composition.updated","webhook.test"]);var _ne=0,Bne=6e4,jne=c({url:xe().min(1),events:y(gt).min(1),settleMs:A().min(_ne).max(Bne).optional()}).describe("POST /webhooks body.");var Vne=0,Une=9007199254740991,Hne=c({id:n(),url:xe(),events:y(gt),settleMs:A().min(Vne).max(Une),enabled:P(),status:h(["active","pending"]).describe("active = ownership verified + receiving events; pending = challenge not echoed, inactive."),secret:n().describe("Standard Webhooks signing secret, format `whsec_<base64>`. Returned ONCE at create; rotate = delete + recreate. Every delivery carries `webhook-id`, `webhook-timestamp` (unix seconds), and `webhook-signature: v1,<base64>` (HMAC-SHA256 over `{id}.{timestamp}.{rawBody}`). Verify with any Standard-Webhooks library (`standardwebhooks` / `svix`): `new Webhook(secret).verify(rawBody, headers)`."),verification:c({status:b("pending"),reason:n()}).optional().describe('Present ONLY when ownership verification did not complete (status:"pending"). CueFrame POSTs a signed `webhook.verify` challenge whose `data.token` your endpoint must echo in a 2xx to activate; `reason` is one of token_not_echoed | non_2xx_<code> | unreachable | ssrf_blocked. A pending webhook receives no events \u2014 fix the receiver and POST /webhooks/:id/verify (no delete/recreate needed). See GET /webhooks/events for the full contract.')}).describe("POST /webhooks response (secret present exactly once).");var Wne=c({delivery:O(n(),L()).describe("The shared HTTP envelope + headers + retry semantics."),signing:O(n(),L()).describe("Standard Webhooks signing: secret format, signed content, how to verify."),ownershipVerification:O(n(),L()).describe("The synchronous echo-the-token activation handshake + recovery."),events:y(c({event:gt,when:n(),data:O(n(),n())})).describe("Every subscribable event with its exact delivery `data` fields."),sample:O(n(),L()).describe("A fully-worked example delivery (headers + body).")}).describe("The webhook delivery/signing/verification contract, as data. Read this before building a receiver.");var $ne=0,Gne=9007199254740991,Kne=0,qne=9007199254740991,dc=c({id:n(),url:xe(),events:y(gt),settleMs:A().min($ne).max(Gne),enabled:P(),verificationStatus:h(["pending","verified"]).describe("pending = callback URL has not echoed the ownership challenge (receives no events); verified = ownership proven."),createdAt:n(),lastDeliveredAt:n().nullable(),lastFailedAt:n().nullable(),consecutiveFailures:A().min(Kne).max(qne)}).describe("Webhook endpoint record (secret omitted after create).");var Yne=c({data:y(dc),pagination:be});var Qne=0,Jne=6e4,Zne=c({url:xe().min(1).optional(),events:y(gt).min(1).optional(),settleMs:A().min(Qne).max(Jne).optional(),enabled:P().optional()}).describe("PATCH /webhooks/:id body.");var Xne=c({deliveryId:n(),status:b("queued")}).describe("POST /webhooks/:id/test response.");var eie=c({id:n(),status:h(["active","pending"]).describe("active = ownership verified + receiving events; pending = challenge not echoed."),verification:c({status:b("pending"),reason:n()}).optional().describe("Present only when the re-challenge did not verify; `reason` names why (see WebhookCreateResponse.verification).")}).describe("POST /webhooks/:id/verify response.");var tie=c({orgId:n(),permissions:O(n(),y(n())),keyId:n(),keyName:n()}).describe("Whoami response.");var oie=2048,rie=c({videoUrl:xe().max(oie),format:ye.optional()});var uEe=c({x402Version:b(2),accepts:y(Jt({})).describe("Accepted payment requirements. Read `accepts[0]` for scheme (`exact` for a fixed price, `upto` for a measured one), network (CAIP-2), asset, amount and payTo."),error:n().optional().describe("Human-readable reason.")}).describe("x402 v2 PaymentRequired challenge \u2014 the body of a 402 on a priced operation.");var sie=100,nie=-9007199254740991,iie=9007199254740991,aie=-9007199254740991,cie=9007199254740991,pie=v({limit:A().min(1).max(sie).optional().describe("Page size (1..100), default 20. Out-of-range or unparseable clamps into the range."),after:n().optional().describe("Opaque cursor from the previous page's `pagination.nextCursor`. Forward-only."),projectId:n().optional().describe("Only events attributed to this project."),jobId:n().optional().describe('Only events produced by this job \u2014 how to answer "did my failed render post a charge?" for one run.'),from:A().min(nie).max(iie).optional().describe("Period start, epoch milliseconds, INCLUSIVE."),to:A().min(aie).max(cie).optional().describe("Period end, epoch milliseconds, EXCLUSIVE.")});var die=100,lie=v({limit:A().min(1).max(die).optional().describe("Page size (1..100), default 20. Out-of-range or unparseable clamps into the range."),after:n().optional().describe("Opaque cursor from the previous page's `pagination.nextCursor`. Forward-only.")});var lc=Dm;var uie=v({id:n()});var mie=v({id:n()});var hie=100,fie=v({limit:A().min(1).max(hie).optional().describe("Page size (1..100), default 20. Out-of-range or unparseable clamps into the range."),after:n().optional().describe("Opaque cursor from the previous page's `pagination.nextCursor`. Forward-only."),projectId:n().optional().describe("Scope to one project. Omit for every brief in the org."),kind:h(["authored","clip","all"]).optional().describe("Which briefs to list. `authored` (default) = human-authored only; `clip` = the machine-minted clip briefs from suggest_briefs; `all` = both.")});var xie=v({id:n()});var gie=v({id:n()});var bie=v({id:n()}),yie=ve();var Aie=v({id:n()});var Sie=v({id:n()});var zie=100,Tie=v({limit:A().min(1).max(zie).optional().describe("Page size (1..100), default 20. Out-of-range or unparseable clamps into the range."),after:n().optional().describe("Opaque cursor from the previous page's `pagination.nextCursor`. Forward-only."),composeJobId:n().optional().describe("Scope to ONE compose run \u2014 its v1\u2192vN gate history with per-version status and decisions."),projectId:n().optional().describe("Scope to everything reviewable in one project.")});var Eie=v({id:n()});var Cie=v({id:n()});var Iie=v({id:n()});var Rie=L(),wie=v({id:n()}),Oie=100,Mie=v({limit:A().min(1).max(Oie).optional().describe("Page size (1..100), default 20. Out-of-range or unparseable clamps into the range."),after:n().optional().describe("Opaque cursor from the previous page's `pagination.nextCursor`. Forward-only."),platform:n().optional().describe("Only suggestions cut for this delivery platform."),format:n().optional().describe("Only suggestions in this output format."),topic:n().optional().describe("Only suggestions matching this topic label.")});var kie=v({id:n()});var Pie=v({id:n()}),Lie=L();var Die=100,vie=v({category:h(["text","effects","transitions","layouts","backgrounds","ui-blocks","scenes"]).optional().describe("Filter to one category bucket (text|effects|transitions|layouts|backgrounds|ui-blocks|scenes)."),kind:h(["component","transition","scene"]).optional().describe("Filter by render kind (component|transition|scene)."),tier:h(["recommended","standard","niche"]).optional().describe("Filter by curation tier (recommended|standard|niche)."),useCase:h(["intro","outro","full-scene","title-over-footage","transition","background","grade","emphasis","explainer","social-cut"]).optional().describe("Filter to entries whose useCase includes this edit role (e.g. intro, title-over-footage, grade)."),mood:n().optional().describe("Filter to entries whose mood tags include this value (e.g. cinematic, minimal)."),q:n().optional().describe("Free-text match across id/name/description/intent/useWhen/tags/mood. Recommend-orders results."),intent:n().optional().describe("Alias of `q` framed as recommend-by-intent (e.g. intent=intro). Recommend-orders results."),limit:A().min(1).max(Die).optional().describe("Page size (1..100). Omit to return the whole filtered catalog in one page."),after:n().optional().describe("Opaque cursor from a previous page's nextCursor (forward-only).")});var Fie=v({id:n()});var Nie=v({id:n()});var _ie=v({id:n()});var Bie=v({id:n()});var jie=v({id:n()});var Vie=v({id:n(),composeJobId:n()}),Uie=L(),Hie=v({id:n(),composeJobId:n()});var Wie=v({id:n(),composeJobId:n()});var $ie=v({id:n()});var Gie=v({id:n(),composeJobId:n()});var Kie=v({id:n()});var qie=v({sessionId:n()}),Yie=v({id:n(),sessionId:n()}),Qie=v({composition:L()}),Jie=v({id:n(),sessionId:n()}),Zie=v({ok:P()}),Xie=v({id:n(),sessionId:n()}),eae=v({etag:n()});var tae=v({id:n()}),oae=v({compositionId:n().optional().describe("Read a SPECIFIC composition instead of the project's active one. Omit it and the active composition is returned. Pairs with `composition_id` on the apply op: an edit you can make to a second composition is one you can read back.")});var rae=v({id:n()});var sae=L(),nae=v({id:n()});var iae=ve(),aae=v({id:n()});var cae=v({id:n()});var pae=L(),dae=v({id:n()});var lae=L(),uae=v({id:n()});var mae=v({contract:n().describe("The contract this verdict was computed against (the kernel version the deployment runs). If it differs between two calls, the validator changed, not your composition."),valid:P(),errors:y(v({code:n(),stage:n(),category:n(),retryable:P(),message:n(),fix:O(n(),L()).optional()})),advisories:y(v({rule:n(),criterion:n(),clipId:n().optional(),detail:n(),fix:n()})).describe("Deterministic, render-free QUALITY floors (the SAME named defects the Director's in-loop verify and score_composition surface: static-hold, caption-spine, sfx-density, sfx-speech-collision, bed-coverage, audio-role). NON-blocking \u2014 they never flip `valid` (an editorially-weak composition still renders); fix them for quality, not to save. Empty when the composition is clean or the wire shape failed (they need a parsed composition)."),warnings:y(n()).optional().describe("Non-blocking render-fidelity warnings detected before enqueue, including unavailable font families."),quote:v({thisStepUsd:i(),jobSpendSoFarUsd:i(),estimatedJourneyTotalUsd:i()}).describe("The A2 money triple for the commodity lane: validate is free; estimatedJourneyTotalUsd is the render price to finish from a valid composition \u2014 relay it BEFORE create_render.")}),hae=v({id:n(),compositionId:n()}),fae=ve();var xae=v({id:n()});var gae=v({criticId:n()}),bae=ve();var yae=v({id:n()});var Aae=v({id:n()});var Sae=v({id:n()});var zae=v({id:n()});var Tae=v({id:n()});var Eae=v({id:n(),exportId:n()});var Cae=v({id:n(),exportId:n()});var Iae=v({deep:b("1").optional().describe("Pass `1` to run the deep dependency checks instead of the shallow liveness probe.")});var Rae=Jt({});var wae=v({jobId:n()});var Oae=v({jobId:n()});var Mae=10,kae=25,Pae=v({q:n().min(1).describe("What the moment should look like, in plain language. Describe the IMAGE, not the words spoken."),limit:A().min(1).max(kae).default(Mae).describe("Maximum moments to return. Default 10, maximum 25.")});var Lae=100,Dae=v({limit:A().min(1).max(Lae).optional().describe("Page size (1..100), default 20. Out-of-range or unparseable clamps into the range."),after:n().optional().describe("Opaque cursor from the previous page's `pagination.nextCursor`. Forward-only."),kind:h(["video","audio","image","gif","asset","source","stock"]).optional().describe("Filter to one media kind."),source:h(["upload","generated","import-url","stock"]).optional().describe("Filter by how the item entered the library."),tag:n().optional().describe("Filter to items carrying this EXACT tag (not a prefix or substring match).")});var vae=v({id:n()});var Fae=v({id:n()}),Nae=ve(),_ae=v({id:n()});var Bae=v({id:n()}),jae=0,Vae=0,Uae=20,Hae=100,Wae=v({after:A().min(jae).optional().describe("Zero-based utterance cursor returned as pagination.nextCursor."),before:A().min(Vae).optional().describe("Zero-based utterance cursor for a backward page. Do not combine with after."),limit:A().min(1).max(Hae).default(Uae).describe("Utterances per page.")});var $ae=v({id:n()});var Gae=v({id:n()}),Kae=v({detector:h(["face","person"]).optional().describe("Which detector to run. Defaults to `face`; an unknown value is refused, never defaulted.")});var qae=v({id:n()});var Yae=v({id:n()}),Qae=v({kind:h(["subjectTrack","matte"]).optional().describe("Resolve one exact editor prerequisite. Requires startSec and endSec; the response includes the server-selected `exact` result."),startSec:i().optional().describe("Source-in of the clip's trim, in seconds. Must be sent WITH endSec \u2014 one without the other is a 400, never a silent whole-source default."),endSec:i().optional().describe("Source-out of the clip's trim, in seconds. Must be sent WITH startSec.")});var Jae=v({id:n()});var Zae=v({id:n()});var Xae=100,ece=v({limit:A().min(1).max(Xae).optional().describe("Page size (1..100), default 20. Out-of-range or unparseable clamps into the range."),after:n().optional().describe("Opaque cursor from the previous page's `pagination.nextCursor`. Forward-only.")});var tce=v({id:n()});var oce=v({id:n()});var rce=v({id:n()}),sce=ve(),nce=v({id:n()});var ice=v({id:n()});var ace=v({id:n()}),cce=100,pce=v({limit:A().min(1).max(cce).optional().describe("Page size (1..100), default 20. Out-of-range or unparseable clamps into the range."),after:n().optional().describe("Opaque cursor from the previous page's `pagination.nextCursor`. Forward-only."),status:n().optional().describe("Comma-separated render statuses to include (e.g. `error,cancelled`). Omit for every status.")});var dce=v({id:n()});var lce=v({id:n(),renderId:n()});var uce=v({id:n(),renderId:n()});var mce=v({id:n(),renderId:n()});var hce=v({id:n(),renderId:n()});var fce=v({id:n(),renderId:n()}),xce=L();var gce=v({id:n()}),bce=v({groupId:n().min(1).describe("The synced-angle group to score.")});var yce=v({id:n()});var Ace=100,Sce=v({limit:A().min(1).max(Ace).optional().describe("Page size (1..100), default 20. Out-of-range or unparseable clamps into the range."),after:n().optional().describe("Opaque cursor from the previous page's `pagination.nextCursor`. Forward-only.")});var zce=v({id:n()});var Tce=v({id:n()}),Ece=ve(),Cce=v({id:n()});var Ice=v({id:n()});var Rce=v({name:n()}),wce=L();var Oce=v({traceId:n()});var Mce=100,kce=v({limit:A().min(1).max(Mce).optional().describe("Page size (1..100), default 20. Out-of-range or unparseable clamps into the range."),after:n().optional().describe("Opaque cursor from the previous page's `pagination.nextCursor`. Forward-only.")});var Pce=v({id:n()});var Lce=v({id:n()});var Dce=v({id:n()}),vce=ve(),Fce=v({id:n()});var Nce=v({id:n()});var _ce=v({projectId:n(),mediaId:n()});import{createHash as Bce}from"crypto";function zh(o){return o.replace(/\r\n?/g,`
|
|
67
|
-
`).normalize("NFC")}function uc(o,e){if(o===null||typeof o=="boolean")return o;if(typeof o=="string")return zh(o);if(typeof o=="number"){if(!Number.isFinite(o))throw new TypeError("Canonical JSON does not support non-finite numbers.");return Object.is(o,-0)?0:o}if(typeof o!="object")throw new TypeError(`Canonical JSON does not support ${typeof o} values.`);if(e.has(o))throw new TypeError("Canonical JSON does not support cyclic values.");e.add(o);try{if(Array.isArray(o))return o.map(a=>uc(a,e));let t=Object.getPrototypeOf(o);if(t!==Object.prototype&&t!==null)throw new TypeError("Canonical JSON only supports plain objects.");let r=o,s={};for(let a of Object.keys(r).sort()){let p=r[a];if(p===void 0)throw new TypeError("Canonical JSON does not support undefined values.");s[zh(a)]=uc(p,e)}return s}finally{e.delete(o)}}function Th(o){return JSON.stringify(uc(o,new Set))}function Eh(o){return Th(o)}function jce(o){return Bce("sha256").update(o).digest("hex")}function Ch(o){return jce(Eh(o))}var cf=Ff(tf(),1);var Yc=Object.freeze(["react","react/jsx-runtime","remotion","@remotion/media","@remotion/layout-utils","@remotion/transitions","@remotion/motion-blur","@remotion/noise","@remotion/paths","@remotion/shapes","@remotion/three","three","three/webgpu","three/tsl","@react-three/fiber","@cueframe/animate","gsap","postprocessing"]),of=new Set(["Date","requestAnimationFrame","setTimeout","setInterval"]),rf=new Set(["Math.random","Date.now","performance.now","crypto.getRandomValues","crypto.randomUUID"]),sf=new Set(["Audio","Html5Audio","Html5Video","OffthreadVideo","Video"]);var nf=new Set(Yc);function af(o){let e=o.imported;return o.type!=="ImportSpecifier"||!e?null:e.type==="Identifier"&&typeof e.name=="string"?e.name:e.type==="StringLiteral"&&typeof e.value=="string"?e.value:null}function pf(o){if(!o||typeof o!="object")return null;let e=o;if(e.type==="Identifier"&&typeof e.name=="string")return e.name;if(e.type!=="MemberExpression"&&e.type!=="OptionalMemberExpression")return null;let t=pf(e.object);if(!t||!e.property||typeof e.property!="object")return null;let r=e.property,s=e.computed===!0?r.type==="StringLiteral"&&typeof r.value=="string"?r.value:null:r.type==="Identifier"&&typeof r.name=="string"?r.name:null;return s?`${t}.${s}`:null}function Qc(o){return pf(o)?.replace(/^(?:globalThis|window|self)\./,"")??null}function Ke(o){throw new Ot("component_import_denied",`Component import is not allowed: ${JSON.stringify(o)}.`)}var ide=new Set(["loc","start","end","errors","comments"]);function df(o){return Object.entries(o).filter(([e])=>!ide.has(e)).map(([,e])=>e)}function Jc(o,e){if(!o||typeof o!="object")return;if(Array.isArray(o)){for(let s of o)Jc(s,e);return}let t=o,r=t.name;if(t.type==="JSXOpeningElement"&&r?.type==="JSXIdentifier"&&e.has(r.name)){let s=Array.isArray(t.attributes)?t.attributes:[];if(s.some(u=>u.type==="JSXSpreadAttribute"))throw new Ot("component_api_mismatch","MediaTileScene props must be explicit so the source can be admitted.");let a=new Set(s.flatMap(u=>{let f=u.name;return u.type==="JSXAttribute"&&f?.type==="JSXIdentifier"?[f.name]:[]})),p=["streams","tiles"].filter(u=>!a.has(u));if(p.length>0)throw new Ot("component_api_mismatch",`MediaTileScene requires ${p.map(u=>`\`${u}\``).join(" and ")}. Pass \`streams={{ id: { asset: assets.slot } }}\` and make each tile reference that id with \`stream\`.`)}for(let s of df(t))Jc(s,e)}function lf(o,e){let t,r=new Set;try{t=(0,cf.parse)(o,{sourceType:"module",plugins:["jsx","typescript"],errorRecovery:!1})}catch(a){throw new Ot("component_does_not_compile",a instanceof Error?a.message:String(a))}let s=a=>{if(!a||typeof a!="object")return;if(Array.isArray(a)){for(let f of a)s(f);return}let p=a,u=p.type;if((u==="ImportDeclaration"||u==="ExportNamedDeclaration"||u==="ExportAllDeclaration")&&p.source&&typeof p.source=="object"){let f=p.source.value;if(typeof f=="string"&&!nf.has(f)&&Ke(f),(f==="remotion"||f==="@remotion/media")&&u==="ImportDeclaration"){let x=(Array.isArray(p.specifiers)?p.specifiers:[]).map(af).find(g=>g!==null&&sf.has(g));x&&Ke(`${f}.${x}; use @cueframe/animate MediaTileScene`)}if(f==="@cueframe/animate"&&u==="ImportDeclaration"){let m=Array.isArray(p.specifiers)?p.specifiers:[];for(let x of m){let g=af(x);if(g!=="MediaTileScene"&&g!=="ImageTileScene")continue;let z=x.local;r.add(typeof z?.name=="string"?z.name:g)}}}if(u==="ImportExpression"&&Ke("dynamic import()"),u==="CallExpression"){let f=p.callee;f?.type==="Import"&&Ke("dynamic import()"),f?.type==="Identifier"&&f.name==="require"&&Ke("require()"),f?.type==="Identifier"&&typeof f.name=="string"&&of.has(f.name)&&Ke(`ambient ${f.name}`);let m=Qc(p.callee),x=Array.isArray(p.arguments)?p.arguments:[],g=x[0]?.type==="StringLiteral"?x[0].value:void 0;m==="document.createElement"&&(g==="video"||g==="audio")&&Ke(`raw ${g} element; use @cueframe/animate MediaTileScene`)}if(u==="JSXOpeningElement"){let f=p.name;f?.type==="JSXIdentifier"&&(f.name==="video"||f.name==="audio")&&Ke(`raw <${String(f.name)}> element; use @cueframe/animate MediaTileScene`)}if(u==="NewExpression"){let f=p.callee;f?.type==="Identifier"&&(f.name==="Date"||f.name==="Worker"||f.name==="SharedWorker")&&Ke(`ambient ${String(f.name)}`)}if(u==="MemberExpression"||u==="OptionalMemberExpression"){let f=Qc(p);f&&rf.has(f)&&Ke(`ambient ${f}`)}if(u==="VariableDeclarator"){let f=Qc(p.init),m=p.id;f&&["Math","Date","performance","crypto"].includes(f)&&m?.type==="Identifier"&&Ke(`ambient ${f} alias`),f==="Math"&&m?.type==="ObjectPattern"&&(Array.isArray(m.properties)?m.properties:[]).some(g=>{let z=g.key;return z?.name==="random"||z?.value==="random"})&&Ke("ambient Math.random alias")}if(u==="TSImportType"){let f=p.argument;f?.type==="StringLiteral"&&typeof f.value=="string"&&!nf.has(f.value)&&Ke(f.value)}for(let f of df(p))s(f)};if(s(t),r.size!==0&&(Jc(t,r),e!==void 0&&e!=="webgl2"))throw new Ot("component_graphics_mismatch","MediaTileScene requires manifest.graphics.api to be webgl2.")}var qt=d.string().min(1),uf=d.enum(["image","video","audio","data"]),ade=d.object({version:d.literal(1),project:d.object({version:d.literal(4),id:qt,name:qt,createdAt:d.number().finite(),modifiedAt:d.number().finite(),composition:Qa,pool:d.array(d.object({id:qt,kind:uf}).passthrough()),authoredComponents:d.never().optional(),recipe:d.object({schemaVersion:d.literal(1),slug:d.string().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/),mediaSlots:d.array(d.object({id:qt,projectMediaId:qt,kind:uf}).passthrough()).length(1),cloudBrandKit:lc,components:d.array(d.object({componentId:qt,name:qt,category:d.enum(["effects","transitions","text","layouts"]),propSchema:d.record(d.string(),d.unknown()).optional(),sourceVersionId:d.never().optional()}).strict())}).passthrough()}).passthrough(),components:d.array(Rr)}).strict();function Zc(o,e,t){let r=new Map;for(let s of o){let a=e(s);if(r.has(a))throw new Error(`Duplicate ${t}: ${a}`);r.set(a,s)}return r}function mf(o){let e=ade.parse(o),t=Mm(e.project.composition);if(t.length)throw new Error(t.map(w=>`${w.code}: ${w.message}`).join(`
|
|
68
|
-
`));let s=structuredClone(o).project,a=Zc(e.components,w=>w.componentId,"component source"),p=Zc(s.recipe.components,w=>w.componentId,"recipe component"),u=Zc(s.pool,w=>w.id,"pool media id");for(let w of s.recipe.mediaSlots)if(u.get(w.projectMediaId)?.kind!==w.kind)throw new Error(`Media slot ${w.id} must match a pool entry of kind ${w.kind}.`);let f=new Map;for(let[w,k]of a){if(!p.has(w))throw new Error(`Missing recipe metadata for component ${w}.`);if(Buffer.byteLength(k.tsxSource,"utf8")>5e5)throw new Error(`Component ${w} exceeds the recipe loader's 500000-byte source limit.`);lf(k.tsxSource,k.manifest.graphics.api),f.set(w,Ch(k))}for(let w of p.keys())if(!a.has(w))throw new Error(`Missing source for component ${w}.`);for(let w of s.composition.tracks)for(let k of w.contents){if(!("source"in k))continue;let F=k.source;if(F.kind==="media"&&!u.has(F.mediaId))throw new Error(`Missing pool media ${F.mediaId}.`);if(F.kind!=="component")continue;let Y=a.get(F.componentId);if(!Y)throw new Error(`Missing source for placed component ${F.componentId}.`);if(Object.hasOwn(F.props,"componentRef"))throw new Error(`Remove componentRef from ${k.id}; recipe pack owns source pinning.`);let W=F.assets??{};for(let[ee,de]of Object.entries(Y.manifest.assets))if(de.required&&!W[ee])throw new Error(`Missing required asset ${F.componentId}.${ee}.`);for(let[ee,de]of Object.entries(W)){let Te=Y.manifest.assets[ee];if(!Te||u.get(de)?.kind!==Te.kind)throw new Error(`Invalid asset binding ${F.componentId}.${ee}: ${de}.`)}k.source={...F,props:{...F.props,componentRef:{version:1,sourceVersionId:f.get(F.componentId)}}}}let m=Object.fromEntries([...a].map(([w,k])=>{let F=f.get(w);return[w,{headVersionId:F,versions:{[F]:k}}]})),x=s.recipe.mediaSlots[0].projectMediaId;Xt(s.composition,x,x);let{recipe:g,...z}=s;return{...z,authoredComponents:m,recipe:{...g,components:g.components.map(({propSchema:w,...k})=>({...k,sourceVersionId:f.get(k.componentId),...w===void 0?{}:{propSchema:w}}))}}}async function xf(o){try{let e;if(o.body==="@-"){let p=[];for await(let u of process.stdin)p.push(Buffer.from(u));e=Buffer.concat(p).toString("utf8")}else e=o.body.startsWith("@")?await hf(ff(o.body.slice(1)),"utf8"):o.body;let t=mf(JSON.parse(e)),r=ff(o.out),s=JSON.stringify(t,null,2)+`
|
|
69
|
-
`;if(o.check){if(await hf(r,"utf8")!==s)throw new Error(`Stale generated file: ${r}`)}else if(!o.dryRun){let p=`${r}.${lde()}.tmp`;try{await cde(p,s,{flag:"wx"}),await pde(p,r)}finally{await dde(p).catch(u=>{if(u.code!=="ENOENT")throw u})}}let a={output:r,check:!!o.check,dryRun:!!o.dryRun,sourceVersions:Object.fromEntries(Object.entries(t.authoredComponents).map(([p,u])=>[p,u.headVersionId]))};return V(o,"recipe_pack_complete",a),o.json||console.log(`${o.check?"Checked":o.dryRun?"Validated":"Packed"} ${r}`),a}catch(e){K(o,"recipe_pack",e,B.UserError),N(B.UserError)}}import ude from"open";import{createAuthClient as mde}from"better-auth/client";import{deviceAuthorizationClient as hde}from"better-auth/client/plugins";async function gf(o){let e=Qt(o.target),t=mde({baseURL:e,fetchOptions:{headers:yr()},plugins:[hde()]}),r=Ce("Requesting device code\u2026",o.json),s;try{let{data:m,error:x}=await t.device.code({client_id:"cueframe-cli",scope:"openid profile email"});(x||!m)&&(r.fail(`Could not start login: ${x?.message??"unknown error"}`),N(B.NetworkError)),s=m}catch(m){r.fail(`Could not start login: ${m instanceof Error?m.message:String(m)}`),N(B.NetworkError)}r.succeed("Device code issued");let a=s.verification_uri_complete??s.verification_uri;Je("",o),Je(` Visit: ${a}`,o),Je(` Code: ${s.user_code}`,o),Je("",o);try{await ude(a)}catch{}let p=Ce("Waiting for approval in browser\u2026",o.json),u=Date.now()+s.expires_in*1e3,f=s.interval*1e3;for(;Date.now()<u;){await new Promise(m=>setTimeout(m,f));try{let{data:m,error:x}=await t.device.token({grant_type:"urn:ietf:params:oauth:grant-type:device_code",device_code:s.device_code,client_id:"cueframe-cli"});if(m?.access_token){let w=m.access_token;br(w,o.target,o.url),p.succeed(`Logged in. Token saved for target "${o.target}".`),se(o,{ok:!0,target:o.target,apiUrl:e},()=>{});return}let g=m??x,z=g?.error;z==="authorization_pending"||(z==="slow_down"?f+=5e3:z==="access_denied"?(p.fail("Access denied in the browser."),N(B.UserError)):z==="expired_token"?(p.fail("Device code expired before approval. Run `cueframe login` again."),N(B.UserError)):z&&(p.fail(`Login failed: ${g?.error_description??z}`),N(B.ApiClientError)))}catch{}}p.fail("Timed out waiting for approval. Run `cueframe login` again."),N(B.UserError)}import{readFileSync as fde}from"fs";var bf=new Set(["GET","POST","PUT","PATCH","DELETE"]);async function Sf(o,e,t){let r=o.toUpperCase();bf.has(r)||(K(t,"api",new Error(`Unsupported method: ${o}. Allowed: ${[...bf].join(", ")}.`),B.UserError),N(B.UserError)),e.startsWith("/")||(K(t,"api",new Error(`Path must start with '/'. Got: ${e}`),B.UserError),N(B.UserError)),re(t.target);let s=gde(t.header??[]),a=await bde(t.body,r);a!==void 0&&!s.has("content-type")&&s.set("content-type","application/json");let p;try{p=await qe(e,{method:r,headers:s,body:a})}catch(f){K(t,"api",f,q(f)),N(q(f))}xde(p,{include:!!t.include,json:!!t.json,method:r,path:e});let u=Oe(p.status);u!==B.Success&&K(t,"api",Object.assign(new Error(`${r} ${e} \u2192 ${p.status} ${p.statusText}`),{code:p.body?.error?.code,status:p.status}),u),process.exitCode=u}function xde(o,{include:e,json:t,method:r,path:s}){if(t){console.log(JSON.stringify({status:o.status,statusText:o.statusText,headers:o.headers,body:o.body}));return}if(e){process.stdout.write(`HTTP/1.1 ${o.status} ${o.statusText}
|
|
70
|
-
`);for(let[a,p]of Object.entries(o.headers))process.stdout.write(`${a}: ${p}
|
|
99
|
+
`}function Qg(e,t){G(e,"name",t);let i=t.dryRun??!1,o=t.force??!1,r=wk(e);r||$d(t,`name "${e}" has no alphanumeric characters to form a component identifier.`);let n=Ik(e);S(t,"new_component_prepare",{name:e,dryRun:i,force:o});let a=dn(process.cwd());a||$d(t,"No CueFrame workspace found (no cueframe.json up-tree). Run `cueframe init` first to scaffold one.");let s=Po(a,e),u=yk(s);u&&kk(s).length>0&&!o&&$d(t,`Component dir ${s} already exists and is non-empty. Pass --force to overwrite (this replaces local source).`);let c={"index.tsx":Sk(e,r),"config.ts":zk(e,n)};if(!i){_k(s,{recursive:!0});for(let[f,v]of Object.entries(c))Hg(Yg(s,f),v);let l=Yg(a.root,xk),d=JSON.parse(bk(l,"utf8")),m=d.components??{};m[e]={custom:!0,manifest:qg},d.components=m,Hg(l,`${JSON.stringify(d,null,2)}
|
|
100
|
+
`)}Z(t,{ok:!0,dryRun:i,name:e,component:r,dir:s,files:Object.keys(c),overwritten:u&&o},()=>{console.log(`\u2713 ${i?"Would scaffold":"Scaffolded"} custom component ${e} (${r}) into ${s}`);for(let d of Object.keys(c))console.log(` ${i?"would write":"wrote"} ${d}`);i||console.log(` stamped cueframe.json components.${e} (custom)`),console.log("Edit index.tsx, then `cueframe push "+e+"` to publish it to CueFrame.")})}import{existsSync as Eo,readFileSync as Uo}from"fs";import{join as Do}from"path";import ne from"typescript";var jk="cueframe.json",Pk=["effects","transitions","text","layouts"];function Ok(e){return Pk.includes(e??"")?e:"layouts"}function Ek(e){let t=e;for(;ne.isAsExpression(t)||ne.isParenthesizedExpression(t)||typeof ne.isSatisfiesExpression=="function"&&ne.isSatisfiesExpression(t);)t=t.expression;return t}function Uk(e,t){for(let i of e.statements)if(ne.isImportDeclaration(i)&&ne.isStringLiteral(i.moduleSpecifier)&&i.moduleSpecifier.text===t)return!0;return!1}function ev(e,t){let i=ne.createSourceFile(t,e,ne.ScriptTarget.Latest,!0,ne.ScriptKind.TS),o;for(let n of i.statements)if(ne.isVariableStatement(n)){for(let a of n.declarationList.declarations)if(ne.isIdentifier(a.name)&&a.name.text==="config"&&a.initializer){let s=Ek(a.initializer);ne.isObjectLiteralExpression(s)&&(o=s)}if(o)break}let r={};if(!o)return r;for(let n of o.properties){if(!ne.isPropertyAssignment(n)||!(ne.isIdentifier(n.name)||ne.isStringLiteral(n.name)))continue;let a=n.name.text;ne.isStringLiteralLike(n.initializer)&&(a==="name"?r.name=n.initializer.text:a==="category"?r.category=n.initializer.text:a==="version"&&(r.version=n.initializer.text))}return r}function Dk(e){let t=Do(e,"config.ts");if(!Eo(t))return{};let i=Uo(t,"utf8"),o=ne.createSourceFile("config.ts",i,ne.ScriptTarget.Latest,!0,ne.ScriptKind.TS),r=Do(e,"_config.ts");return Uk(o,"./_config")&&Eo(r)?ev(Uo(r,"utf8"),"_config.ts"):ev(i,"config.ts")}function Ak(e){return e.split(/[^a-zA-Z0-9]+/).filter(Boolean).map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}function Nk(e,t){let i=Do(e.root,jk);if(Eo(i))try{let r=JSON.parse(Uo(i,"utf8")).components?.[t]?.ejectedFrom;return typeof r=="string"&&r.length>0?r:void 0}catch{return}}var Oo="none \u2014 params are unvalidated server-side";function tv(e){let t=e.code;return t==="no_component_source"||t==="no_component_manifest"?x.UserError:O(e)}async function rv(e,t,i){let o=Po(e,t),r=Do(o,"index.tsx");if(!Eo(r))throw Object.assign(new Error(`Component "${t}" has no index.tsx at ${o}. Scaffold it first: cueframe new component ${t}`),{code:"no_component_source"});let n=Uo(r,"utf8"),a=Dk(o),s=a.name??Ak(t),u=Ok(a.category),c=Nk(e,t),l=Xg(e,t),d=`Custom component "${t}" pushed from the local CueFrame workspace.`,m={type:"object",properties:{}};S(i,"push_component",{id:t,name:s,category:u,version:a.version,ejectedFrom:c,propSchema:Oo});let f=!1;try{await pn.getComponent(t),f=!0}catch(v){if(v instanceof xe&&v.status===404)f=!1;else throw v}return f?(await pn.updateComponent(t,{tsxSource:n,name:s,description:d,category:u,propSchema:m,origin:"customer-owned",manifest:l,...c?{ejectedFrom:c}:{}}),S(i,"pushed",{id:t,action:"updated"}),{id:t,action:"updated",name:s,category:u,propSchema:Oo}):(await pn.createComponent({componentId:t,tsxSource:n,name:s,description:d,category:u,propSchema:m,origin:"customer-owned",manifest:l,...c?{ejectedFrom:c}:{}}),S(i,"pushed",{id:t,action:"created"}),{id:t,action:"created",name:s,category:u,propSchema:Oo})}async function nv(e,t){e||(P(t,"push",new Error("Pass a component id (cueframe push <id>), or use `cueframe sync` to push all."),x.UserError),k(x.UserError)),G(e,"id",t),T(t.target);let i=dn(process.cwd());i||(P(t,"push",new Error("No CueFrame workspace found (no cueframe.json up-tree). Run `cueframe init` first."),x.UserError),k(x.UserError)),S(t,"push_prepare",{id:e,target:t.target});try{let o=await rv(i,e,t);Z(t,{ok:!0,target:t.target,...o},()=>{console.log(`\u2713 ${o.action} component ${o.id} (${o.name}) on CueFrame`),console.log(` propSchema: ${o.propSchema}`)})}catch(o){let r=tv(o);P(t,"push",o,r),k(r)}}async function iv(e){T(e.target);let t=dn(process.cwd());t||(P(e,"sync",new Error("No CueFrame workspace found (no cueframe.json up-tree). Run `cueframe init` first."),x.UserError),k(x.UserError));let i=Wg(t);S(e,"sync_prepare",{target:e.target,count:i.length,ids:i});let o=[],r=[];for(let n of i)try{o.push(await rv(t,n,e))}catch(a){let s=tv(a);Y(e,"sync",a,s),r.push({id:n,error:a})}Z(e,{ok:r.length===0,target:e.target,pushed:o,failed:r.map(n=>({id:n.id,error:X(n.error)}))},()=>{if(o.length===0&&r.length===0){console.log("No components to sync. Scaffold one with `cueframe eject` or `cueframe new component`.");return}for(let n of o)console.log(`\u2713 ${n.action} ${n.id} (${n.name})`);o.length>0&&console.log(` propSchema: ${Oo}`);for(let n of r)console.error(`\u2716 ${n.id}: ${X(n.error)}`);console.log(`Synced ${o.length}/${i.length} component(s) to CueFrame.`)}),r.length>0&&k(O(r[0].error))}var Ao=["media","sessions","projects","renders","webhooks"],ov={readonly:Object.fromEntries(Ao.map(e=>[e,["read"]])),editall:Object.fromEntries(Ao.map(e=>[e,["read","write"]]))};function Tk(e){if(e.preset){let t=ov[e.preset];return t||(console.error(`Unknown --preset "${e.preset}". Valid: ${Object.keys(ov).join(", ")}.`),k(x.UserError)),t}if(e.scope)return Ck(e.scope);console.error("Provide --scope or --preset (e.g. --preset readonly | editall)."),k(x.UserError)}function Ck(e){let t={};for(let i of e.split(",").map(o=>o.trim()).filter(Boolean)){let[o,r]=i.split(":");(!o||!r)&&(console.error(`Invalid --scope "${i}". Use resource:rw (e.g. renders:rw,media:r).`),k(x.UserError)),Ao.includes(o)||(console.error(`--scope "${i}": unknown resource "${o}". Valid: ${Ao.join(", ")}.`),k(x.UserError));let n=[];/r/i.test(r)&&n.push("read"),/w/i.test(r)&&n.push("write"),n.length===0&&(console.error(`--scope "${i}": actions must include r and/or w.`),k(x.UserError)),t[o]=n}return Object.keys(t).length===0&&(console.error("--scope is required, e.g. --scope media:rw,projects:rw,renders:rw"),k(x.UserError)),t}async function av(e){T(e.target);let t=Tk(e),i={name:e.name,permissions:t};if(e.expires){let o=Number(e.expires);(!Number.isFinite(o)||o<=0)&&(console.error("--expires must be a positive number of days."),k(x.UserError)),i.expiresIn=Math.round(o*86400)}try{let o=await Me("/v1/api-keys",{method:"POST",body:JSON.stringify(i),headers:{"content-type":"application/json"}});Z(e,{ok:!0,id:o.id,prefix:o.prefix,start:o.start,key:o.key},()=>{let r=Object.entries(t).map(([n,a])=>`${n}:${a.map(s=>s[0]).join("")}`).join(" ");console.log(`\u2713 API key "${e.name}" created \u2014 scopes: ${r}`),console.log(`
|
|
101
|
+
${o.key}
|
|
102
|
+
`),console.log(" Shown ONCE \u2014 store it now (paste it into your integration; not saved here).")})}catch(o){P(e,"keys_create",o,O(o)),k(O(o))}}async function sv(e){T(e.target);let t;try{t=await ge("/api/auth/api-key/list",{method:"GET"})}catch(o){P(e,"keys_list",o,O(o)),k(O(o))}t.status>=400&&(P(e,"keys_list",new Error(`list failed (${t.status})`),Q(t.status)),k(Q(t.status)));let i=Array.isArray(t.body)?t.body:[];Z(e,{ok:!0,keys:i},()=>{if(i.length===0){console.log("No API keys.");return}for(let o of i)console.log(` ${o.id} ${o.name??"(unnamed)"} ${o.start??""}\u2026`)})}async function cv(e,t){T(t.target);let i;try{i=await ge("/api/auth/api-key/delete",{method:"POST",body:JSON.stringify({keyId:e}),headers:{"content-type":"application/json"}})}catch(o){P(t,"keys_revoke",o,O(o)),k(O(o))}i.status>=400&&(P(t,"keys_revoke",new Error(`revoke failed (${i.status})`),Q(i.status)),k(Q(i.status))),Z(t,{ok:!0,revoked:e},()=>console.log(`\u2713 Revoked ${e}`))}async function uv(e){T(e.target),S(e,"list_prepare",{target:e.target});try{let t=await bt.listProjects(),i=e.limit,o=typeof i=="number"&&Number.isFinite(i)&&i>0?t.data.slice(0,i):t.data;if(S(e,"list_complete",{count:o.length,total:t.data.length,truncated:o.length<t.data.length,projects:o}),!e.json){if(t.data.length===0){console.log("No projects found.");return}for(let r of o){let n=new Date(r.createdAt).toLocaleDateString();console.log(` ${r.id} ${r.name} (${n})`)}o.length<t.data.length&&console.log(` \u2026 ${t.data.length-o.length} more (raise --limit to see all)`)}}catch(t){P(e,"list",t,O(t)),k(O(t))}}import{readFile as Rk,stat as Zk}from"fs/promises";import{existsSync as Lk}from"fs";import{basename as Fk,extname as Mk}from"path";var Vk=4e3,lv=1800*1e3,dv=5,mv={".mp4":"video/mp4",".mov":"video/quicktime",".webm":"video/webm",".mkv":"video/x-matroska",".wav":"audio/wav",".mp3":"audio/mpeg",".m4a":"audio/mp4",".aac":"audio/aac",".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".webp":"image/webp",".svg":"image/svg+xml"};function Jk(e,t){let i=Mk(e).toLowerCase(),o=mv[i];if(!o){let r=new Error(`Unsupported file extension "${i||"(none)"}" for ${e}. Supported: ${Object.keys(mv).join(", ")}.`);P(t,"preflight",r,x.UserError),k(x.UserError)}return o}var fv=["vo","music","sfx","ambience"];async function No(e,t){Lk(e)||(P(t,"preflight",new Error(`File not found: ${e}`),x.UserError),k(x.UserError));let i=Fk(e),o=(await Zk(e)).size,r=Jk(i,t);if(t.audioRole&&!fv.includes(t.audioRole)){let h=new Error(`--audio-role must be one of ${fv.join("|")} (got "${t.audioRole}")`);P(t,"preflight",h,x.UserError),k(x.UserError)}let n=t.audioRole;if(t.dryRun){S(t,"upload_dry_run",{file:i,sizeBytes:o,contentType:r,target:t.target,analyzeAfter:!!t.analyze,wouldCall:"POST /v1/media \u2192 presigned PUT \u2192 POST /v1/media/:id/finalize \u2192 poll processing"}),t.json||console.log(`[dry-run] Would upload ${i} (${(o/1024/1024).toFixed(1)} MB, ${r}) to ${t.target}.`);return}T(t.target),S(t,"upload_prepare",{file:i,sizeBytes:o,contentType:r,target:t.target});let a=ee("Preparing upload\u2026",t.json),s,u;try{let h=await Ve.createMediaUpload({filename:i,contentType:r,size:o});s=h.id,u=h.uploadUrl,a.succeed("Ready"),S(t,"upload_ready",{mediaItemId:s})}catch(h){a.fail(`Failed: ${X(h)}`),Y(t,"upload_prepare",h,O(h)),k(O(h))}let c=Date.now(),l=ee(`Uploading ${i} (${(o/1024/1024).toFixed(1)} MB)\u2026`,t.json);try{let h=await Rk(e),b=await fetch(u,{method:"PUT",headers:{"Content-Type":r},body:h});if(!b.ok)throw new Error(`presigned PUT failed: ${b.status} ${b.statusText}`);await Ve.finalizeMedia(s,n?{audioRole:n}:{}),l.succeed(`Uploaded: ${i}`),S(t,"upload_complete",{mediaItemId:s,bytesUploaded:o,...n?{audioRole:n}:{},durationMs:Date.now()-c})}catch(h){l.fail(`Upload failed: ${X(h)}`),Y(t,"upload",h,x.NetworkError),k(x.NetworkError)}let d=ee("Processing (transcription)\u2026",t.json),m=Date.now(),f=null,v=0;for(;;){if(await new Promise(h=>setTimeout(h,Vk)),Date.now()-m>lv){let h=`Processing did not complete within ${Math.round(lv/6e4)}m. Media item ID: ${s}.`;d.fail(h),Y(t,"process",new Error(h),x.ApiServerError),k(x.ApiServerError)}try{let h=await Ve.getMedia(s);v=0;let b=h?.processingStatus?.phase??"unknown",E=h?.processingStatus?.percent??null,z=Math.round((Date.now()-m)/1e3),I=E!=null?` \xB7 ${Math.round(E*100)}%`:"";if(d.text=`Processing\u2026 ${b}${I} (${z}s)`,S(t,"process_progress",{phase:b,percent:E,elapsedSec:z}),b==="complete"||b==="completed"){d.succeed(`Ready: ${s}`),f=h,S(t,"process_complete",{mediaItemId:s,durationMs:Date.now()-m,item:h});break}if(b==="error"){let D=h?.processingStatus?.error??"unknown error";d.fail(`Processing failed: ${D}`),Y(t,"process",new Error(D),x.ApiServerError),k(x.ApiServerError)}}catch(h){h instanceof xe&&[401,403,404].includes(h.status)&&(d.fail(`Processing check failed: ${X(h)}`),Y(t,"process",h,O(h)),k(O(h))),v++,v>=dv&&(d.fail(`Processing check failed: ${X(h)}`),Y(t,"process",new Error(`Processing status unreadable after ${dv} consecutive failures: ${X(h)}`),O(h)),k(O(h)))}}if(t.analyze){ze(`
|
|
103
|
+
Media item ID: ${s}`,t);let{analyzeCommand:h}=await import("./analyze-Q6MIQWOJ.js");return await h(s,{target:t.target,wait:!0,json:t.json}),{mediaItemId:s,item:f}}return t.json||Z(t,{mediaItemId:s,item:f},()=>{console.log(`
|
|
104
|
+
Media item ID: ${s}`),console.log(`
|
|
105
|
+
Run \`cueframe analyze ${s} --target ${t.target}\` to generate clip suggestions.`)}),{mediaItemId:s,item:f}}function yd(e){let t=Math.floor(e/60),i=Math.floor(e%60);return`${t}:${String(i).padStart(2,"0")}`}async function pv(e,t){e!==void 0&&G(e,"mediaItemId",t),T(t.target),S(t,"clips_prepare",{target:t.target,mode:e?"suggestions":"media-list",...e?{mediaItemId:e}:{}});try{if(!e){let o=await Ve.listMedia();if(S(t,"clips_complete",{mode:"media-list",count:o.data.length,media:o.data}),!t.json){if(o.data.length===0){console.log("No media items found. Import a video first.");return}console.log("Media items (pass the ID to `cueframe clips <id>`):"),console.log("");for(let r of o.data){let n=r.duration?`${yd(r.duration)} `:"",a=r.processingStatus?.phase??"unknown",s=a==="complete"?"":` [${a}]`;console.log(` ${r.id} ${r.name} ${n}${s}`)}}return}let i=await Od.listMediaSuggestions(e);if(S(t,"clips_complete",{mode:"suggestions",mediaItemId:e,count:i.suggestions.length,suggestions:i.suggestions}),!t.json){if(i.suggestions.length===0){console.log("No clip suggestions found for this media item."),console.log("If analysis is still running, try again shortly. Otherwise the video may not have suitable clips.");return}console.log(`${i.suggestions.length} clip suggestion${i.suggestions.length!==1?"s":""}:`),console.log("");for(let o of i.suggestions){let r=`${yd(o.trim.start)} \u2192 ${yd(o.trim.end)}`,n=(o.trim.end-o.trim.start).toFixed(1);console.log(` ${o.id}`),console.log(` ${o.title}`),console.log(` ${r} (${n}s) ${o.format} score: ${o.score}`),o.reason&&console.log(` ${o.reason}`),console.log("")}}}catch(i){P(t,"clips",i,O(i)),k(O(i))}}import{readFileSync as Bk}from"fs";async function gv(e,t){G(e,"projectId",t),T(t.target),S(t,"composition_get_prepare",{projectId:e});let i=await mn(`/v1/projects/${e}/composition`,{method:"GET"},t,"composition_get");i.status>=400&&(fn(i,t,"composition_get"),k(Q(i.status)));let o=i.headers.etag,r=o&&$v(o);S(t,"composition_get_complete",{projectId:e,etag:r,status:i.status}),Z(t,{etag:r,composition:i.body},()=>{r&&console.log(`# ETag: ${r}`),console.log(JSON.stringify(i.body,null,2))})}async function vv(e,t){G(e,"projectId",t),t.body||(console.error("--body is required (inline JSON, @file.json, or @- for stdin)"),k(x.UserError)),T(t.target);let i=await _d(e,t),o=await yv(t.body);S(t,"composition_put_prepare",{projectId:e,ifMatch:i});let r=new Headers({"content-type":"application/json","if-match":i}),n=await mn(`/v1/projects/${e}/composition`,{method:"PUT",headers:r,body:o},t,"composition_put");n.status>=400&&(fn(n,t,"composition_put"),k(Q(n.status)));let a=n.headers.etag;return S(t,"composition_put_complete",{projectId:e,etag:a,status:n.status,response:n.body}),Z(t,{etag:a,response:n.body},()=>{console.log(`Composition saved (ETag: ${a??"unknown"}).`),n.body&&typeof n.body=="object"&&console.log(JSON.stringify(n.body,null,2))}),{etag:a,response:n.body}}async function To(e,t){G(e,"projectId",t),t.suggestionId||(console.error("--suggestion <suggestionId> is required"),k(x.UserError)),T(t.target);let i=await _d(e,t),o;if(t.format)try{o=JSON.parse(t.format)}catch{console.error(`--format must be JSON, e.g. '{"aspectRatio":"9:16","fps":30,"resolution":"fhd"}'`),k(x.UserError)}let r=JSON.stringify({suggestionId:t.suggestionId,...o?{format:o}:{}});S(t,"composition_from_suggestion_prepare",{projectId:e,suggestionId:t.suggestionId,ifMatch:i});let n,a=i,s=0,u=3;for(;;){s++;let l=new Headers({"content-type":"application/json","if-match":a});if(n=await mn(`/v1/projects/${e}/composition/from-suggestion`,{method:"POST",headers:l,body:r},t,"composition_from_suggestion"),!(n.status===409&&n.body?.error?.code==="stale_etag"))break;if(s>u){S(t,"composition_from_suggestion_etag_retries_exhausted",{projectId:e,attempts:u});break}S(t,"composition_from_suggestion_etag_retry",{projectId:e,attempt:s,reason:"stale_etag"}),a=await _d(e,t)}n.status>=400&&(fn(n,t,"composition_from_suggestion"),k(Q(n.status)));let c=n.headers.etag;S(t,"composition_from_suggestion_complete",{projectId:e,suggestionId:t.suggestionId,etag:c,status:n.status,response:n.body,attempts:s}),Z(t,{etag:c,response:n.body},()=>{console.log(`Composition built from suggestion ${t.suggestionId} (ETag: ${c??"unknown"}).`),n.body&&typeof n.body=="object"&&console.log(JSON.stringify(n.body,null,2))})}async function hv(e){e.body||(console.error("--body is required (inline JSON, @file.json, or @- for stdin)"),k(x.UserError)),T(e.target);let t=await yv(e.body);S(e,"composition_validate_prepare",{});let i=new Headers({"content-type":"application/json"}),o=await mn("/v1/composition/validate",{method:"POST",headers:i,body:t},e,"composition_validate");return o.status>=400&&(fn(o,e,"composition_validate"),k(Q(o.status))),S(e,"composition_validate_complete",{status:o.status}),Z(e,{valid:!0},()=>{console.log("\u2713 Composition is valid.")}),{valid:!0}}function $v(e){return e.replace(/^W\//,"").replace(/-gzip(?=("?)$)/,"")}async function _d(e,t){if(t.force)return"*";if(t.ifMatch)return t.ifMatch;let i=await mn(`/v1/projects/${e}/composition`,{method:"GET"},t,"composition_etag_fetch");if(i.status===404)return ze("No existing composition; treating as create (If-Match: *).",t),"*";i.status>=400&&(fn(i,t,"composition_etag_fetch"),k(Q(i.status)));let o=i.headers.etag;return o||(P(t,"composition_etag_fetch",new Error("Server returned no ETag on composition GET; cannot safely thread If-Match. Pass --force to overwrite anyway."),x.ApiServerError),k(x.ApiServerError)),$v(o)}async function yv(e){if(e.startsWith("@")){let t=e.slice(1);if(t==="-"){let i=[];for await(let o of process.stdin)i.push(Buffer.isBuffer(o)?o:Buffer.from(o));return Buffer.concat(i).toString("utf-8")}return Bk(t,"utf-8")}return e}async function mn(e,t,i,o){try{return await ge(e,t)}catch(r){P(i,o,r,x.NetworkError),k(x.NetworkError)}}function fn(e,t,i){let o=e.body?.error,r=o?.code??"unknown",n=o?.message??e.statusText,a=Kk(r,e.status,o?.details),s=Q(e.status);t.json?P(t,i,Object.assign(new Error(n),{code:r,status:e.status,details:o?.details,advice:a}),s):(process.stderr.write(`\u2716 ${i}: ${n} (${r}, ${e.status})
|
|
106
|
+
`),a&&process.stderr.write(` \u2192 ${a}
|
|
107
|
+
`))}function Kk(e,t,i){let o=new xe(t,{code:e,message:"",details:i&&typeof i=="object"?i:void 0}),r=jd(o);return r||(t===404?"Project or composition not found. Run `cueframe list` to confirm the project ID; the composition may not yet exist.":null)}async function _v(e){let t=e.aspect?{aspectRatio:e.aspect,fps:e.fps??30,resolution:e.resolution??"fhd"}:void 0;if(e.dryRun){if(S(e,"project_create_dry_run",{name:e.name,target:e.target,format:t??null,brandKitId:e.brandKitId??null,fromSuggestion:e.fromSuggestion??null,cheap:e.cheap??!1,wouldCall:e.fromSuggestion?e.cheap?"POST /v1/projects \u2192 POST /v1/projects/:id/composition/from-suggestion (sync translator)":"POST /v1/projects \u2192 POST /v1/projects/:id/compose (async) \u2192 SSE watch":"POST /v1/projects"}),!e.json){let r=e.cheap?" (--cheap: deterministic translator)":"";console.log(`[dry-run] Would create project "${e.name}" on ${e.target}`+(e.fromSuggestion?` from suggestion ${e.fromSuggestion}${r}.`:"."))}return}T(e.target),S(e,"project_create_prepare",{name:e.name,target:e.target,fromSuggestion:e.fromSuggestion??null,brandKitId:e.brandKitId??null,cheap:e.cheap??!1});let i=ee(`Creating project "${e.name}"\u2026`,e.json),o;try{o=await bt.createProject({name:e.name,format:t,brandKitId:e.brandKitId}),i.succeed(`Created: ${o.id}`)}catch(r){i.fail(`Failed: ${X(r)}`),Y(e,"project_create",r,O(r)),k(O(r))}if(S(e,"project_create_complete",{project:o}),!e.json&&!e.fromSuggestion&&console.log(`
|
|
108
|
+
${o.id} ${o.name}`),e.fromSuggestion){let r=!1;if(r||await To(o.id,{target:e.target,suggestionId:e.fromSuggestion,json:e.json,force:!0}),!e.json){let n=r?"(composed)":"(translated)";console.log(`
|
|
109
|
+
${o.id} ${o.name} \u2190 composed from ${e.fromSuggestion} ${n}`)}}return o}async function bv(e,t){G(e,"projectId",t),T(t.target),S(t,"project_delete_prepare",{projectId:e});try{await bt.deleteProject(e),S(t,"project_delete_complete",{projectId:e}),Z(t,{ok:!0,projectId:e},()=>{console.log(`Project ${e} deleted.`)})}catch(i){P(t,"project_delete",i,O(i)),k(O(i))}}async function kv(e,t){G(e,"mediaId",t),T(t.target),S(t,"media_delete_prepare",{mediaId:e});try{await Ve.deleteMedia(e),S(t,"media_delete_complete",{mediaId:e}),Z(t,{ok:!0,mediaId:e},()=>{console.log(`Media ${e} deleted.`)})}catch(i){P(t,"media_delete",i,O(i)),k(O(i))}}import{writeFileSync as Wk}from"fs";import{resolve as Gk}from"path";var qk=1500,Xk=4e3,Hk=1800*1e3,xv=5;async function bd(e,t,i={}){let o=Date.now()+(i.timeoutMs??Hk),r=i.reconnectBackoffMs??qk,n=Date.now(),a=0;for(;Date.now()<o;){let s=null,u=!1;try{for await(let c of Pd(e,t)){if(a=0,c.event==="progress"){let l=Math.round((Date.now()-n)/1e3);if(i.spinner){let d=Math.round(c.data.percent*100);i.spinner.text=`Rendering\u2026 ${c.data.phase}${d>0?` \xB7 ${d}%`:""} (${l}s)`}i.onProgress?.({phase:c.data.phase,percent:c.data.percent,elapsedSec:l});continue}c.event==="complete"?s={kind:"complete",outputUrl:c.data.outputUrl,outputExpiresAt:c.data.outputExpiresAt,duration:c.data.duration}:s={kind:"failed",message:c.data.message};break}}catch(c){if(c instanceof xe)u=!0;else{if(a++,a>=xv)throw Object.assign(new Error(`Render stream unreachable after ${xv} consecutive transport failures: ${c instanceof Error?c.message:String(c)}`),{cause:c});await new Promise(l=>setTimeout(l,r));continue}}if(s)return s;if(u){let c=await Yk(e,t);if(c)return c;await new Promise(l=>setTimeout(l,Xk));continue}await new Promise(c=>setTimeout(c,r))}return{kind:"failed",message:`Timed out waiting for render to reach a terminal state. Render ID: ${t}, Project ID: ${e}.`}}async function Yk(e,t){let i=await Ed.getRender(e,t);return i.status==="complete"?{kind:"complete",outputUrl:i.outputUrl??null,outputExpiresAt:null,duration:null}:i.status==="error"||i.status==="cancelled"?{kind:"failed",message:i.error??`Render ${i.status}`}:null}async function wv(e,t){G(e,"renderId",t),G(t.project,"projectId",t),T(t.target),S(t,"render_watch_prepare",{renderId:e,projectId:t.project,target:t.target});let i=ee(`Watching render ${e}\u2026`,t.json),o;try{o=await bd(t.project,e,{spinner:i,onProgress:n=>S(t,"render_progress",{renderId:e,...n})})}catch(n){i.fail(`Failed to watch render: ${X(n)}`),Y(t,"render_watch",n,O(n)),k(O(n))}o.kind==="failed"&&(i.fail(o.message),Y(t,"render_watch",new Error(o.message),x.ApiServerError),k(x.ApiServerError)),i.succeed(`Render complete (${e})`);let r=null;t.download&&o.outputUrl?r=await kd(o.outputUrl,t.out??`./reel-${e.slice(0,8)}.mp4`,t.json):o.outputUrl||(P(t,"render_watch",new Error("Render reported complete but no outputUrl was returned."),x.ApiServerError),t.json||console.error(`Render reported complete but no outputUrl was returned.
|
|
110
|
+
Re-fetch via GET /v1/projects/${t.project}/renders/${e}.`),k(x.ApiServerError)),S(t,"render_complete",{renderId:e,projectId:t.project,outputUrl:o.outputUrl,outputExpiresAt:o.outputExpiresAt,duration:o.duration,outputPath:r}),t.json||(o.outputUrl&&console.log(`MP4 URL: ${o.outputUrl}`),o.outputExpiresAt&&console.log(`Expires: ${o.outputExpiresAt}`),o.duration!=null&&console.log(`Duration: ${o.duration}s`))}async function kd(e,t,i){let o=Gk(t),r=ee(`Downloading \u2192 ${o}\u2026`,i);try{let n=await fetch(e);if(!n.ok)throw new Error(`HTTP ${n.status}`);let a=Buffer.from(await n.arrayBuffer());return Wk(o,a),r.succeed(`Saved: ${o} (${(a.length/1024/1024).toFixed(1)} MB)`),o}catch(n){r.fail(`Download failed: ${X(n)}`),console.error(`
|
|
111
|
+
MP4 URL (1-hour TTL): ${e}`),k(x.NetworkError)}}async function Iv(e,t){let i=t.map(a=>a==null?"null":String(a)).join(":"),o=`${e}:${i}`,r=new TextEncoder().encode(o),n=await crypto.subtle.digest("SHA-256",r);return Array.from(new Uint8Array(n),a=>a.toString(16).padStart(2,"0")).join("")}async function Qk(e){let t=await ge(`/v1/projects/${e}/composition`,{method:"GET"});return t.status===404?"no-composition":t.status>=400?"unknown-composition":t.headers.etag??"no-etag"}async function Co(e,t){if(G(e,"projectId",t),t.dryRun){S(t,"render_dry_run",{projectId:e,target:t.target,wouldCall:"POST /v1/projects/:id/renders \u2192 SSE watch \u2192 download MP4"}),t.json||console.log(`[dry-run] Would render project ${e} on ${t.target}.`);return}T(t.target),S(t,"render_prepare",{projectId:e,target:t.target});let i;try{i=t.idempotencyKey??await Iv("render",[e,await Qk(e)]),S(t,"idempotency_key",{scope:"render",key:i,overridden:!!t.idempotencyKey})}catch(l){i="",S(t,"idempotency_key",{scope:"render",key:null,skipped:!0,reason:l instanceof Error?l.message:String(l)})}let o=ee("Queuing render\u2026",t.json),r,n,a=!1;try{let l=t.aspect?{format:{aspectRatio:t.aspect,fps:t.fps??30,resolution:t.resolution??"fhd"}}:{};t.priority&&(l.priority=t.priority),t.intent&&(l.intent=t.intent);let d={"content-type":"application/json"};i&&(d["idempotency-key"]=i);let m=await ge(`/v1/projects/${e}/renders`,{method:"POST",headers:d,body:JSON.stringify(l)});if(m.status>=400){let v=m.body?.error;throw new xe(m.status,{code:v?.code??"unknown",message:v?.message??m.statusText})}let f=m.body;r=f.id,n=f.status,a=m.headers["idempotency-replay"]==="true",o.succeed(a?`Render replayed: ${r} (status: ${n})`:`Render queued: ${r}`)}catch(l){o.fail(`Failed: ${X(l)}`),Y(t,"render_prepare",l,O(l)),k(O(l))}a?S(t,"render_idempotent_replay",{renderId:r,projectId:e,status:n,idempotencyKey:i}):S(t,"render_queued",{renderId:r,projectId:e});let s=ee("Rendering\u2026",t.json),u;try{u=await bd(e,r,{spinner:s,onProgress:l=>S(t,"render_progress",{renderId:r,...l})})}catch(l){s.fail(`Failed to watch render: ${X(l)}`),Y(t,"render_progress",l,O(l)),k(O(l))}u.kind==="failed"&&(s.fail(u.message),Y(t,"render_progress",new Error(u.message),x.ApiServerError),k(x.ApiServerError)),s.succeed("Render complete"),u.outputUrl||(P(t,"render_complete",new Error("Render reported complete but no outputUrl was returned."),x.ApiServerError),t.json||console.error(`Render reported complete but no outputUrl was returned.
|
|
112
|
+
Render ID: ${r}
|
|
113
|
+
Project ID: ${e}
|
|
114
|
+
Re-fetch via GET /v1/projects/${e}/renders/${r} once the URL is signed.`),k(x.ApiServerError));let c=await kd(u.outputUrl,t.out??`./reel-${r.slice(0,8)}.mp4`,t.json);return S(t,"render_complete",{renderId:r,projectId:e,outputUrl:u.outputUrl,outputExpiresAt:u.outputExpiresAt,duration:u.duration,outputPath:c}),{renderId:r,projectId:e,outputUrl:u.outputUrl,outputExpiresAt:u.outputExpiresAt,duration:u.duration,outputPath:c}}import{existsSync as Ov}from"fs";import{createHash as ex,randomUUID as tx}from"crypto";import{readFile as rx}from"fs/promises";import{resolve as xd}from"path";function Sv(e){let t=e;if(!t||t.v!==1||typeof t.slug!="string")throw new Error("Not a CueFrame template document (v: 1, slug).");return{v:1,slug:t.slug,name:typeof t.name=="string"?t.name:t.slug,parameters:Array.isArray(t.parameters)?t.parameters:[],presets:t.presets}}function zv(e,t){return e==="number"?t.trim()===""?t:Number(t):e==="boolean"?t==="true"?!0:t==="false"?!1:t:t}var nx=/^[a-z0-9]+(?:-[a-z0-9]+)*$/,ix=/^[a-z0-9]{28,40}$/,jv="https://raw.githubusercontent.com/cueframe-ai/cueframe-templates/main",ox=3e3,ax=60*6e4;function Ev(e){let t=xd(e);if(e.endsWith(".cueframe")||Ov(t))return{kind:"file",path:t};if(ix.test(e)&&!e.includes("-"))return{kind:"org",id:e};if(nx.test(e))return{kind:"slug",slug:e};throw new Error(`"${e}" is not a .cueframe file, a catalog slug, or a template id.`)}function sx(e){let t=e.indexOf("=");if(t<=0)throw new Error(`--media takes name=<file|https url|sample|media:<id>>, got "${e}".`);let i=e.slice(0,t),o=e.slice(t+1);if(o==="sample")return{name:i,value:{sample:!0}};if(/^media:[A-Za-z0-9_-]+$/.test(o))return{name:i,value:{mediaId:o.slice(6)}};if(/^https:\/\//.test(o))return{name:i,value:{url:o}};if(/^[a-z]+:\/\//.test(o))throw new Error(`--media ${i}: only https URLs can be imported, got "${o}".`);return{name:i,file:xd(o)}}function cx(e){let t={};for(let i of e){let o=i.indexOf("=");if(o<=0)throw new Error(`--values takes name=value, got "${i}".`);t[i.slice(0,o)]=i.slice(o+1)}return t}function ux(e,t){let i={},o=[],r=new Map(e.parameters.map(n=>[n.name,n]));for(let[n,a]of Object.entries(t)){let s=r.get(n);if(!s){o.push(`${n}: not a parameter of ${e.slug}`);continue}if(s.type==="media"){o.push(`${n}: a media parameter; pass it with --media`);continue}i[n]=zv(s.type,a)}return{values:i,problems:o}}function lx(e){let t=e.param?`${e.param}: ${e.message}`:e.message;return e.code?`${t} (${e.code})`:t}async function Uv(e,t,i){T(t);let o=await Me("/v1/templates",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({document:e,dryRun:!0,...i})});if(!Array.isArray(o?.problems))throw Object.assign(new Error("The server did not answer a dry run: no problems list came back. The CueFrame API at this target may not support template validation yet."),{code:"template_dry_run_unsupported",exitCode:x.ApiServerError});return o.ok?[]:o.problems.map(lx)}async function Pv(e,t,i,o){let r={},n=new Map(t.parameters.map(s=>[s.name,s]));for(let s of i.mediaArgs)s.value&&"mediaId"in s.value?r[s.name]={mediaId:s.value.mediaId}:n.get(s.name)?.sample&&(r[s.name]={sample:!0});let a;try{a=await Uv(e,o.target,{values:i.values,media:r,...i.preset?{preset:i.preset}:{}})}catch(s){let u=O(s);P(o,"template_validate",s,u),k(u)}a.length&&(P(o,"template_inputs",new Error(a.join(`
|
|
115
|
+
`)),x.UserError),k(x.UserError))}async function Dv(e,t){if(e.kind==="file"){let o=JSON.parse(await rx(e.path,"utf8"));if(o?.v!==1||typeof o.slug!="string")throw new Error(`${e.path} is not a CueFrame template document (v: 1, slug).`);return o}if(e.kind==="slug"){let o=await fetch(`${jv}/templates.json`,{headers:{accept:"application/json"}});if(!o.ok)throw new Error(`The public template catalog answered ${o.status}.`);let r=await o.json();if(r.schemaVersion!==2||!Array.isArray(r.templates))throw new Error("The public template catalog is not schemaVersion 2.");let n=r.templates.find(l=>l.slug===e.slug);if(!n)throw new Error(`The public catalog has no template "${e.slug}".`);if(typeof n.documentSha256!="string"||!/^[a-f0-9]{64}$/.test(n.documentSha256))throw new Error(`The public catalog has no document digest for "${e.slug}".`);let a=`${jv}/artifacts/${n.documentSha256}.cueframe`,s=await fetch(a,{headers:{accept:"application/json"}});if(!s.ok)throw new Error(`The public catalog has no template "${e.slug}" (${s.status}).`);let u=await s.text();if(ex("sha256").update(u).digest("hex")!==n.documentSha256)throw new Error(`The template ${e.slug} changed since the catalog was read. Retry after the catalog refreshes.`);let c=JSON.parse(u);if(c.slug!==e.slug)throw new Error(`The catalog document for ${e.slug} names ${String(c.slug)}.`);return c}return T(t),(await Me(`/v1/templates/${encodeURIComponent(e.id)}`)).document}async function Av(e,t){let i=Date.now(),o=e.stage;for(;e.status==="preparing";)Date.now()-i>ax&&(P(t,"template_instantiate",new Error(`Template job ${e.jobId} is still preparing after an hour. Reconnect with its job id.`),x.ApiServerError),k(x.ApiServerError)),await new Promise(r=>setTimeout(r,ox)),e=await Me(`/v1/template-jobs/${encodeURIComponent(e.jobId)}`),e.stage!==o&&(o=e.stage,S(t,"template_job_progress",{jobId:e.jobId,projectId:e.projectId,stage:e.stage}));return e}async function Nv(e,t){T(t.target);let i=await Me(`/v1/template-jobs/${encodeURIComponent(e)}`);return t.wait&&(i=await Av(i,t)),Z(t,i,()=>console.log(`${i.status} \xB7 ${i.stage}${i.projectId?` \xB7 project ${i.projectId}`:""}`)),t.wait&&i.status!=="ready"&&(P(t,i.errorCode??"template_instantiate",new Error(i.errorMessage??`Template job ${i.jobId} ${i.status}.`),x.ApiServerError),k(x.ApiServerError)),i}async function Tv(e,t){let i,o;try{i=Ev(e),o=await Dv(i,t.target)}catch(u){P(t,"template_read",u,x.UserError),k(x.UserError)}let r;try{r=await Uv(o,t.target)}catch(u){let c=O(u);P(t,"template_validate",u,c),k(c)}let n=o?.slug,a=typeof n=="string"?n:e,s={template:i.kind==="file"?i.path:e,slug:a,ok:r.length===0,problems:r};return Z(t,s,()=>{if(r.length===0){console.log(`ok ${a}`);return}console.error(`FAIL ${a}`);for(let u of r)console.error(` ${u}`)}),r.length&&k(x.UserError),s}async function Cv(e,t){let i,o,r,n,a;try{i=Ev(e),o=await Dv(i,t.target),r=Sv(o),n=t.media.map(sx),a=cx(t.values)}catch(I){P(t,"template_read",I,x.UserError),k(x.UserError)}let{values:s,problems:u}=ux(r,a),c=new Map(r.parameters.filter(I=>I.type==="media").map(I=>[I.name,I]));for(let I of n){let D=c.get(I.name);D?I.value&&"sample"in I.value&&!D.sample?u.push(`${I.name}: the template has no sample for it`):I.file&&!Ov(I.file)&&u.push(`${I.name}: file not found: ${I.file}`):u.push(`${I.name}: not a media parameter of ${r.slug}`)}t.preset!==void 0&&!r.presets?.[t.preset]&&u.push(`preset ${t.preset}: not one of ${Object.keys(r.presets??{}).join(", ")||"(none)"}`);for(let[I,D]of c)D.required&&!n.some(B=>B.name===I)&&u.push(`${I}: required; pass --media ${I}=<file|https url|media:<id>${D.sample?"|sample":""}>`);u.length&&(P(t,"template_inputs",new Error(u.join(`
|
|
116
|
+
`)),x.UserError),k(x.UserError));let l=i.kind==="file"?i.path:e;if(t.dryRun){await Pv(o,r,{values:s,mediaArgs:n,preset:t.preset},t);let I={template:l,slug:r.slug,target:t.target,values:s,media:n.map(D=>D.file??D.value),preset:t.preset??null,render:t.render,output:xd(t.out),wouldRun:[...i.kind==="file"?["publish the document to your org"]:[],...n.filter(D=>D.file).map(D=>`upload ${D.name}`),"start template preparation job","wait for the ready project",...t.render?["render and download MP4"]:[]]};return Z(t,I,()=>console.log(`[dry-run] Template inputs bind. Would create a project from ${r.name}.`)),I}S(t,"template_run_prepare",{template:l,slug:r.slug,target:t.target,preset:t.preset??null}),T(t.target);let d=i.kind==="file"?"":i.kind==="slug"?i.slug:i.id;if(i.kind==="file"){await Pv(o,r,{values:s,mediaArgs:n,preset:t.preset},t);try{let I=await Me("/v1/templates",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({document:o})});d=I.id,S(t,"template_published",{templateId:d,version:I.version})}catch(I){P(t,"template_publish",I,O(I)),k(O(I))}}let m={};for(let I of n){if(I.value){m[I.name]=I.value;continue}let D=await No(I.file,{target:t.target,analyze:!1,json:t.json});if(!D)throw new Error(`Template run stopped before CueFrame returned a media id for ${I.name}.`);m[I.name]={mediaId:D.mediaItemId}}T(t.target);let f=JSON.stringify({projectName:r.name,values:s,media:m,...t.preset?{preset:t.preset}:{},...t.brandKitId?{brandKitId:t.brandKitId}:{}}),v,h=t.idempotencyKey??tx();S(t,"template_job_request",{templateId:d,idempotencyKey:h});try{v=await ge(`/v1/templates/${encodeURIComponent(d)}/instantiate`,{method:"POST",headers:{"content-type":"application/json","Idempotency-Key":h},body:f})}catch(I){P(t,"template_instantiate",I,O(I)),k(O(I))}if(v.status>=400){let I=v.body,D=Object.assign(new Error(I?.error?.message??v.statusText),{code:I?.error?.code,status:v.status,details:I?.error?.details});P(t,"template_instantiate",D,Q(v.status)),k(Q(v.status))}let b=v.body;S(t,"template_job_started",{jobId:b.jobId,projectId:b.projectId,stage:b.stage}),b=await Av(b,t),(b.status!=="ready"||!b.projectId)&&(P(t,b.errorCode??"template_instantiate",new Error(b.errorMessage??`Template job ${b.jobId} ${b.status}.`),x.ApiServerError),k(x.ApiServerError)),S(t,"template_job_complete",{jobId:b.jobId,projectId:b.projectId});let E=t.render?await Co(b.projectId,{target:t.target,out:t.out,json:t.json}):void 0,z={template:l,slug:r.slug,templateId:d,jobId:b.jobId,projectId:b.projectId,media:m,...E?{renderId:E.renderId,outputPath:E.outputPath}:{}};return S(t,"template_run_complete",z),t.json||Z(t,z,()=>{console.log(`
|
|
117
|
+
Project ${b.projectId} created from ${r.name}.`),E&&console.log(`Output: ${E.outputPath}`)}),z}import dx from"open";import{createAuthClient as mx}from"better-auth/client";import{deviceAuthorizationClient as fx}from"better-auth/client/plugins";async function Rv(e){let t=kt(e.target),i=mx({baseURL:t,fetchOptions:{headers:hn()},plugins:[fx()]}),o=ee("Requesting device code\u2026",e.json),r;try{let{data:c,error:l}=await i.device.code({client_id:"cueframe-cli",scope:"openid profile email"});(l||!c)&&(o.fail(`Could not start login: ${l?.message??"unknown error"}`),k(x.NetworkError)),r=c}catch(c){o.fail(`Could not start login: ${c instanceof Error?c.message:String(c)}`),k(x.NetworkError)}o.succeed("Device code issued");let n=r.verification_uri_complete??r.verification_uri;ze("",e),ze(` Visit: ${n}`,e),ze(` Code: ${r.user_code}`,e),ze("",e);try{await dx(n)}catch{}let a=ee("Waiting for approval in browser\u2026",e.json),s=Date.now()+r.expires_in*1e3,u=r.interval*1e3;for(;Date.now()<s;){await new Promise(c=>setTimeout(c,u));try{let{data:c,error:l}=await i.device.token({grant_type:"urn:ietf:params:oauth:grant-type:device_code",device_code:r.device_code,client_id:"cueframe-cli"});if(c?.access_token){let f=c.access_token;vn(f,e.target,e.url),a.succeed(`Logged in. Token saved for target "${e.target}".`),Z(e,{ok:!0,target:e.target,apiUrl:t},()=>{});return}let d=c??l,m=d?.error;m==="authorization_pending"||(m==="slow_down"?u+=5e3:m==="access_denied"?(a.fail("Access denied in the browser."),k(x.UserError)):m==="expired_token"?(a.fail("Device code expired before approval. Run `cueframe login` again."),k(x.UserError)):m&&(a.fail(`Login failed: ${d?.error_description??m}`),k(x.ApiClientError)))}catch{}}a.fail("Timed out waiting for approval. Run `cueframe login` again."),k(x.UserError)}import{readFileSync as px}from"fs";var Zv=new Set(["GET","POST","PUT","PATCH","DELETE"]);async function Mv(e,t,i){let o=e.toUpperCase();Zv.has(o)||(P(i,"api",new Error(`Unsupported method: ${e}. Allowed: ${[...Zv].join(", ")}.`),x.UserError),k(x.UserError)),t.startsWith("/")||(P(i,"api",new Error(`Path must start with '/'. Got: ${t}`),x.UserError),k(x.UserError)),T(i.target);let r=vx(i.header??[]),n=await hx(i.body,o);n!==void 0&&!r.has("content-type")&&r.set("content-type","application/json");let a;try{a=await ge(t,{method:o,headers:r,body:n})}catch(u){P(i,"api",u,O(u)),k(O(u))}gx(a,{include:!!i.include,json:!!i.json,method:o,path:t});let s=Q(a.status);s!==x.Success&&P(i,"api",Object.assign(new Error(`${o} ${t} \u2192 ${a.status} ${a.statusText}`),{code:a.body?.error?.code,status:a.status}),s),process.exitCode=s}function gx(e,{include:t,json:i,method:o,path:r}){if(i){console.log(JSON.stringify({status:e.status,statusText:e.statusText,headers:e.headers,body:e.body}));return}if(t){process.stdout.write(`HTTP/1.1 ${e.status} ${e.statusText}
|
|
118
|
+
`);for(let[n,a]of Object.entries(e.headers))process.stdout.write(`${n}: ${a}
|
|
71
119
|
`);process.stdout.write(`
|
|
72
|
-
`),
|
|
73
|
-
`)?
|
|
74
|
-
`):
|
|
75
|
-
`))}function
|
|
76
|
-
Export ID: ${
|
|
77
|
-
Re-fetch via GET /v1/projects/${
|
|
78
|
-
Export URL (7-day TTL): ${
|
|
79
|
-
${r.name} \u2014 ${r.description}`);for(let s of r.subcommands??[])console.log(` ${r.name} ${s.name} \u2014 ${s.description}`)}}var Pf=["prod","dev","local"];function De(o){if(o===void 0)return"prod";if(Pf.includes(o))return o;console.error(`Invalid --target ${o}. Allowed: ${Pf.join(", ")}.`),N(B.UserError)}function Lf(o){if(!o)return;let e=parseInt(o,10);if(e===24||e===25||e===30||e===60)return e;console.error(`Invalid --fps ${o}. Allowed: 24, 25, 30, 60.`),N(B.UserError)}async function Df(){let o=new Ide;o.name("cueframe").description("AI-assisted video editing and rendering").version("0.4.9").option("--json","Emit a structured JSON document on stdout instead of human-formatted output. Spinners are silenced.").option("--dry-run","Validate inputs and report what would happen \u2014 no API calls, no mutations. Applies to upload, analyze, project create, render.");let e=()=>o.opts();o.command("install").description('One-line setup: wire the CueFrame MCP server into every installed agent (Claude Code / Cursor / Codex) and install the agent skills. No API key \u2014 auth is a browser "Allow" on first call.').option("-t, --target <target>","Target environment: prod (default), dev, local").option("-f, --force","Replace locally changed or untracked skills, retaining backups").action(g=>Kp({json:e().json,target:De(g.target),dryRun:e().dryRun,force:g.force})),o.command("init").description("Scaffold a CueFrame component workspace (cueframe.json + components dir) in the current repo, so `new component` has a home and the render harness can discover it.").action(()=>Qp({json:e().json,dryRun:e().dryRun})),o.command("new").description("Scaffold new owned source in the component workspace").command("component").description("Scaffold a blank custom component in cueframe/components/<name>").argument("<name>","Component id (e.g. my-badge)").option("-f, --force","Overwrite an existing non-empty component dir").action((g,z)=>pd(g,{json:e().json,dryRun:e().dryRun,force:z.force})),o.command("push").description("Publish a locally-authored component (cueframe/components/<id>/index.tsx) to CueFrame so it renders server-side. Upserts by id.").argument("[id]","Component id to push (omit and use `cueframe sync` to push all)").option("-t, --target <target>","Target environment: prod (default), dev, local").action((g,z)=>md(g,{target:De(z.target),json:e().json})),o.command("sync").description("Publish EVERY component in the workspace (cueframe/components/*) to CueFrame. Upserts each by id.").option("-t, --target <target>","Target environment: prod (default), dev, local").action(g=>hd({target:De(g.target),json:e().json}));let r=o.command("keys").description("Manage API keys. `keys create` mints a scoped key \u2014 run `cueframe login` first (keys cannot mint keys).");r.command("create").description("Mint a scoped API key (cf_*). Requires a logged-in session.").requiredOption("-n, --name <name>","Key name, e.g. ci-runner").option("-s, --scope <scope>","Comma-separated resource:actions, e.g. media:rw,projects:rw,renders:rw (resources: media,sessions,projects,renders,webhooks; actions r/w)").option("--preset <preset>","Scope preset instead of --scope: readonly (read all) | editall (read+write all)").option("--expires <days>","Expire after N days (default: never)").option("-t, --target <target>","Target environment: prod (default), dev, local").action(g=>xd({...g,target:De(g.target),json:e().json})),r.command("list").description("List your API keys.").option("-t, --target <target>","Target environment: prod (default), dev, local").action(g=>gd({target:De(g.target),json:e().json})),r.command("revoke").description("Revoke an API key by id.").argument("<keyId>","Key id (from `cueframe keys list`)").option("-t, --target <target>","Target environment: prod (default), dev, local").action((g,z)=>bd(g,{target:De(z.target),json:e().json})),o.command("login").description("Browser-mediated sign-in (OAuth device flow). Recommended for laptops.").option("-t, --target <target>","Target environment: prod (default), dev, local").option("--url <url>","Override the API base URL (advanced)").action(g=>gf({...g,target:De(g.target),json:e().json})),o.command("auth").description("Save a static API key (cf_live_\u2026 / cf_test_\u2026). Use for CI / headless environments.").argument("<api-key>","Your CueFrame API key").option("-t, --target <target>","Target environment: prod (default), dev, local").option("--url <url>","Override the API base URL (advanced)").action((g,z)=>{let w=De(z.target);Fp(g),br(g,w,z.url),e().json?console.log(JSON.stringify({ok:!0,target:w},null,2)):console.log(`API key saved for target "${w}"`)}),o.command("list").description("List projects").option("-t, --target <target>","Target environment: prod (default), dev, local").option("-n, --limit <n>","Max projects to show","10").action(g=>yd({target:De(g.target),limit:parseInt(g.limit),json:e().json}));let s=o.command("project").description("Project commands");s.command("create").description("Create a new project. With --from-suggestion, atomically build the composition from a clip suggestion in one round-trip \u2014 the project is then immediately renderable via `cueframe render <projectId>`.").requiredOption("-n, --name <name>","Project name").option("-t, --target <target>","Target environment: prod (default), dev, local").option("-a, --aspect <ratio>","Aspect ratio: 9:16, 1:1, 16:9","9:16").option("--fps <n>","Frame rate","30").option("--resolution <r>","Resolution: hd, fhd, 2k, 4k","fhd").option("--brand-kit <id>","Bind a brand kit id to the project").option("--from-suggestion <sug>","Clip suggestion publicId (sug_\u2026) \u2014 atomically builds the composition after project creation so render needs no further args").option("--cheap","With --from-suggestion: use the deterministic translator (no LLM, ~100ms) instead of the AI authoring pass. Useful for tests / programmatic flows.").action(async g=>{await Nr({name:g.name,target:De(g.target),aspect:g.aspect,fps:Lf(g.fps),resolution:g.resolution,brandKitId:g.brandKit,fromSuggestion:g.fromSuggestion,cheap:g.cheap,json:e().json,dryRun:e().dryRun})}),s.command("delete").description("Permanently delete a project (irreversible cleanup \u2014 removes the composition and render history).").argument("<projectId>","Project ID (from `cueframe list` or `project create`)").option("-t, --target <target>","Target environment: prod (default), dev, local").action((g,z)=>wd(g,{target:De(z.target),json:e().json})),o.command("media").description("Media library cleanup commands").command("delete").description("Permanently delete a media item (irreversible cleanup \u2014 removes the source and its derived assets).").argument("<mediaId>","Media item ID (from `cueframe clips`)").option("-t, --target <target>","Target environment: prod (default), dev, local").action((g,z)=>Od(g,{target:De(z.target),json:e().json})),o.command("upload").description("Upload a video file and process it").argument("<file>","Path to video file").option("-t, --target <target>","Target environment: prod (default), dev, local").option("-a, --analyze","Run clip analysis after processing completes").option("-r, --audio-role <role>","Declare the audio role (vo|music|sfx|ambience) \u2014 routes ingest enrichment: vo\u2192transcript, music\u2192beat grid, sfx/ambience\u2192envelope").action(async(g,z)=>{await Lr(g,{target:De(z.target),analyze:z.analyze,audioRole:z.audioRole,json:e().json,dryRun:e().dryRun})}),o.command("analyze").description("Trigger AI clip suggestion analysis for a media item").argument("<mediaItemId>","Media item ID (from `cueframe clips`)").option("-t, --target <target>","Target environment: prod (default), dev, local").option("-w, --wait","Wait for analysis to complete and show results").action((g,z)=>Np(g,{target:De(z.target),wait:z.wait,json:e().json,dryRun:e().dryRun})),o.command("clips").description("List AI-generated clip suggestions for a media item").argument("[mediaItemId]","Media item ID (omit to list your media library)").option("-t, --target <target>","Target environment: prod (default), dev, local").action((g,z)=>Ed(g,{target:De(z.target),json:e().json}));let p=o.command("recipe").description("Package or run a portable CueFrame recipe");p.command("pack").description("Validate, pin authored source, and package a recipe offline. No login, upload, compilation, or rendering.").requiredOption("-b, --body <json|@file|@->","Version-1 packaging input: project draft and bundled component sources; @- reads stdin").requiredOption("-o, --out <path>","Generated .cueframe project path (replaced on success)").option("--check","Check that the output is current without writing it").action(async g=>{await xf({...g,json:e().json,dryRun:e().dryRun})}),p.command("run").description("Upload the source, create the recipe project, validate it, and render it").argument("[recipe]","Recipe slug from cueframe-ai/cueframe-recipes, local .cueframe template, or legacy directory",".").requiredOption("-m, --media <path>","Source media file for the recipe").option("-t, --target <target>","Target environment: prod (default), dev, local").option("-o, --out <path>","Output MP4 path","./recipe-output.mp4").option("--no-render","Create the editable project without rendering it").action(async(g,z)=>{await Dd({directory:g,media:z.media,out:z.out,target:De(z.target),render:z.render!==!1,json:e().json,dryRun:e().dryRun})});let u=o.command("render").description("Render a project to MP4 (queues, watches via SSE, downloads). Renders whatever composition is saved on the project \u2014 build it first via `project create --from-suggestion` or `composition from-suggestion`.").allowExcessArguments(!1).argument("<projectId>","Project ID (from `cueframe list` or `project create`)").option("-t, --target <target>","Target environment: prod (default), dev, local").option("-a, --aspect <ratio>","Aspect ratio: 9:16, 1:1, 16:9 (defaults to project format)").option("--fps <n>","Frame rate","30").option("--resolution <r>","Resolution: hd, fhd, 2k, 4k","fhd").option("-o, --out <path>","Output file path (default: ./reel-<id>.mp4)").option("--idempotency-key <key>",'Override the auto-derived Idempotency-Key. Default: sha256("render:<projectId>:<currentCompositionETag>"). Pass a fresh UUID to force a new render row.').option("--priority <p>","Routing intent: interactive (low-latency, access-gated), standard (default), background (lowest queue weight).").option("--intent <i>","Encode-quality hint: preview (fast / low-bitrate, for editor scrubbing) or final (default, full Format).").action(async(g,z)=>{await _r(g,{target:z.target,aspect:z.aspect,fps:Lf(z.fps),resolution:z.resolution,out:z.out,json:e().json,dryRun:e().dryRun,...z.idempotencyKey?{idempotencyKey:z.idempotencyKey}:{},...z.priority?{priority:z.priority}:{},...z.intent?{intent:z.intent}:{}})});o.command("api").description("Raw API call against the v1 surface (escape hatch \u2014 like `gh api`).").argument("<method>","HTTP method: GET, POST, PUT, PATCH, DELETE").argument("<path>","API path starting with /v1, e.g. /v1/projects").option("-t, --target <target>","Target environment: prod (default), dev, local").option("-b, --body <body>","Request body (inline JSON, @file.json to read from disk, @- for stdin)").option("-H, --header <header...>",'Additional header (repeatable), e.g. -H "If-Match: \\"abc\\""').option("-i, --include","Include response status line + headers in stdout (curl-style). Lets agents read ETag etc.").action((g,z,w)=>Sf(g,z,{target:w.target,body:w.body,header:w.header,include:w.include,json:e().json})),o.command("schema").description("Print the live composition wire schema from the server (/v1/openapi.json) \u2014 discover the contract instead of guessing.").argument("[resource]","Schema to print (currently: composition)","composition").option("-t, --target <target>","Target environment: prod (default), dev, local").action((g,z)=>Tf(g,{target:z.target,json:e().json}));let f=o.command("composition").description("Read/write a project's composition. ETag is threaded automatically.");f.command("validate").description("Validate a composition body against the live schema WITHOUT saving or rendering. Returns per-field errors \u2014 author safely before paying for a render.").requiredOption("-b, --body <body>","Composition JSON (inline, @file.json, or @- for stdin)").option("-t, --target <target>","Target environment: prod (default), dev, local").action(async g=>{await Fr({target:g.target,body:g.body,json:e().json})}),f.command("get").description("Fetch the project's composition and ETag").argument("<projectId>","Project ID").option("-t, --target <target>","Target environment: prod (default), dev, local").action((g,z)=>Cd(g,{target:z.target,json:e().json})),f.command("put").description("Replace the composition. GETs ETag first for safe concurrent writes.").argument("<projectId>","Project ID").option("-t, --target <target>","Target environment: prod (default), dev, local").requiredOption("-b, --body <body>","Composition JSON (inline, @file.json, or @- for stdin)").option("--if-match <etag>","Use this ETag (skip the GET round-trip)").option("--force","Use If-Match: * (unconditional overwrite \u2014 may clobber concurrent edits)").action(async(g,z)=>{await Dr(g,{target:z.target,body:z.body,ifMatch:z.ifMatch,force:z.force,json:e().json})}),f.command("from-suggestion").description("Build the composition from an existing clip suggestion").argument("<projectId>","Project ID").requiredOption("-s, --suggestion <suggestionId>","Clip suggestion publicId (sug_\u2026)").option("-t, --target <target>","Target environment: prod (default), dev, local").option("--format <json>",`Optional format override, e.g. '{"aspectRatio":"9:16","fps":30,"resolution":"fhd"}'`).option("--if-match <etag>","Use this ETag (skip the GET round-trip)").option("--force","Use If-Match: * (unconditional overwrite)").action((g,z)=>vr(g,{target:z.target,suggestionId:z.suggestion,format:z.format,ifMatch:z.ifMatch,force:z.force,json:e().json})),u.command("watch").description("Reattach to an existing render and stream progress to terminal state").argument("<renderId>","Render ID (from `cueframe render` output)").requiredOption("-p, --project <projectId>","Project the render belongs to").option("-t, --target <target>","Target environment: prod (default), dev, local").option("--no-download","Print the MP4 URL but skip downloading the file").option("-o, --out <path>","Output file path when downloading (default: ./reel-<id>.mp4)").action((g,z,w)=>{let k=w?.parent?.opts?.()?.target??z.target;return kd(g,{target:k,project:z.project,out:z.out,download:z.download!==!1,json:e().json})});let m=o.command("export").description("Hand the timeline off to a real NLE (Final Cut Pro / Premiere Pro)");m.command("fcpxml").description("Build a Final Cut Pro export zip and (optionally) wait to download it").argument("<projectId>","Project ID").requiredOption("-s, --suggestion <suggestionId>","Clip suggestion publicId (sug_\u2026)").option("-t, --target <target>","Target environment: prod (default), dev, local").option("-o, --out <path>","Output zip path (default: ./export-<id>.zip)").option("--wait","Block until the export finishes, then download the artifact").action((g,z)=>Xc("fcpxml",{target:z.target,projectId:g,suggestionId:z.suggestion,out:z.out,wait:z.wait,json:e().json})),m.command("premiere").description("Build a Premiere Pro export zip and (optionally) wait to download it").argument("<projectId>","Project ID").requiredOption("-s, --suggestion <suggestionId>","Clip suggestion publicId (sug_\u2026)").option("-t, --target <target>","Target environment: prod (default), dev, local").option("-o, --out <path>","Output zip path (default: ./export-<id>.zip)").option("--wait","Block until the export finishes, then download the artifact").action((g,z)=>Xc("premiere",{target:z.target,projectId:g,suggestionId:z.suggestion,out:z.out,wait:z.wait,json:e().json}));let x=o.command("sessions").description("Multi-file ingest sessions (camera A/B/screen \u2192 muxed composition)");x.command("list").description("List sessions in this org").option("-t, --target <target>","Target environment: prod (default), dev, local").action(g=>If({target:g.target,json:e().json})),x.command("get").description("Get a single session by ID").argument("<sessionId>","Session ID").option("-t, --target <target>","Target environment: prod (default), dev, local").action((g,z)=>Rf(g,{target:z.target,json:e().json})),x.command("create").description("Create a session from one or more media files").requiredOption("-n, --name <name>","Session name").requiredOption("-f, --file <entry...>","Each entry is <mediaId>:<role> (repeatable)").option("-t, --target <target>","Target environment: prod (default), dev, local").action(g=>wf({target:g.target,name:g.name,files:g.file,json:e().json})),x.command("delete").description("Delete a session (server checks for compositions referencing it)").argument("<sessionId>","Session ID").option("-t, --target <target>","Target environment: prod (default), dev, local").action((g,z)=>Of(g,{target:z.target,json:e().json})),o.command("describe").description("Print the CLI command tree as structured JSON (agent introspection)").action(()=>kf(o,{json:e().json}));try{await o.parseAsync()}catch(g){let z=q(g);K(e(),"cli",Object.assign(new Error(ue(g)),{code:g?.code,status:g?.status}),z),N(z)}}await Df();
|
|
80
|
-
/*! Bundled license information:
|
|
81
|
-
|
|
82
|
-
@noble/hashes/esm/utils.js:
|
|
83
|
-
(*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
|
|
84
|
-
*/
|
|
120
|
+
`),Lv(e.body,e.status>=400);return}if(e.status===204||e.body===null){console.error(`${o} ${r} \u2192 ${e.status} (no content)`);return}Lv(e.body,e.status>=400)}function Lv(e,t){let i=t?process.stderr:process.stdout;e!=null&&(typeof e=="string"?i.write(e.endsWith(`
|
|
121
|
+
`)?e:e+`
|
|
122
|
+
`):i.write(JSON.stringify(e,null,2)+`
|
|
123
|
+
`))}function vx(e){let t=new Headers;for(let i of e){let o=i.indexOf(":");o===-1&&(console.error(`Invalid --header (expected "Name: value"): ${i}`),k(x.UserError));let r=i.slice(0,o).trim(),n=i.slice(o+1).trim();t.set(r,n)}return t}async function hx(e,t){if(e){if(e.startsWith("@")){let i=e.slice(1);return i==="-"?Fv():px(i,"utf-8")}return e}if(!(t==="GET"||t==="DELETE")&&!process.stdin.isTTY)return Fv()}async function Fv(){let e=[];for await(let t of process.stdin)e.push(Buffer.isBuffer(t)?t:Buffer.from(t));return Buffer.concat(e).toString("utf-8")}var Vv=/#\/components\/schemas\/([A-Za-z0-9_]+)/g;function $x(e,t){let i=new Set,o=[t];for(;o.length;){let r=o.pop();if(i.has(r)||!(r in e))continue;i.add(r);let n=JSON.stringify(e[r]),a;for(Vv.lastIndex=0;a=Vv.exec(n);)o.push(a[1])}return i}function yx(e){let t=e?.paths??{};for(let i of Object.values(t))if(i?.put?.operationId==="putComposition"){let o=i.put?.requestBody?.content?.["application/json"]?.schema?.$ref,r=typeof o=="string"?o.match(/#\/components\/schemas\/(.+)$/):null;if(r)return r[1]}return null}async function Jv(e,t){e!=="composition"&&(console.error(`Unknown schema '${e}'. Supported: composition.`),k(x.UserError)),zd({baseUrl:kt(t.target),headers:hn()});let i;try{i=await ge("/v1/openapi.json",{method:"GET"})}catch(c){P(t,"schema",c,x.NetworkError),k(x.NetworkError)}if(i.status>=400){let c=Q(i.status);P(t,"schema",new Error(`Failed to fetch /v1/openapi.json (${i.status})`),c),k(c)}let o=i.body,r=o?.components?.schemas??{},n=yx(o);(!n||!(n in r))&&(P(t,"schema",new Error("Could not locate the composition schema in openapi.json (putComposition body ref not found)."),x.ApiServerError),k(x.ApiServerError));let a=$x(r,n);a.delete(n);let s={};for(let c of[...a].sort())s[c]=r[c];let u={name:n,schema:r[n],referenced:s};Z(t,u,()=>{console.log(JSON.stringify(u,null,2))})}import{writeFileSync as _x}from"fs";import{resolve as bx}from"path";var Bv=1800*1e3,kx=5e3;async function wd(e,t){G(t.projectId,"projectId",t),G(t.suggestionId,"suggestionId",t),T(t.target),S(t,"export_prepare",{projectId:t.projectId,suggestionId:t.suggestionId,format:e,target:t.target});let i=ee(`Queuing ${e} export\u2026`,t.json),o;try{o=(await(e==="fcpxml"?gn.createFcpxmlExport:gn.createPremiereExport)(t.projectId,{clipSuggestionId:t.suggestionId})).id,i.succeed(`Export queued: ${o}`)}catch(u){i.fail(`Failed: ${X(u)}`),Y(t,"export_prepare",u,O(u)),k(O(u))}if(S(t,"export_queued",{exportId:o,projectId:t.projectId,format:e}),!t.wait){ze(`Poll status with: cueframe api GET /v1/projects/${t.projectId}/exports/${o}`,t);return}let r=await xx(t.projectId,o,t);r.kind==="failed"&&(P(t,"export_progress",Object.assign(new Error(r.message),r.error?{details:r.error}:{}),x.ApiServerError),t.json||console.error(`Export failed: ${r.message}`),k(x.ApiServerError)),r.outputUrl||(P(t,"export_complete",new Error("Export reported complete but no outputUrl was returned."),x.ApiServerError),t.json||console.error(`Export reported complete but no outputUrl was returned.
|
|
124
|
+
Export ID: ${o}
|
|
125
|
+
Re-fetch via GET /v1/projects/${t.projectId}/exports/${o}.`),k(x.ApiServerError));let a=t.out??`./export-${o.slice(0,8)}.zip`,s=await wx(r.outputUrl,a,t.json);S(t,"export_complete",{exportId:o,projectId:t.projectId,format:e,outputUrl:r.outputUrl,outputExpiresAt:r.outputExpiresAt,outputSizeBytes:r.outputSizeBytes,trimCacheHit:r.trimCacheHit,outputPath:s})}async function xx(e,t,i){let o=Date.now()+(i.timeoutMs??Bv),r=i.pollIntervalMs??kx,n=Date.now(),a=ee("Exporting\u2026",i.json);try{for(;Date.now()<o;){let s;try{s=await gn.getExport(e,t)}catch(l){if(l instanceof xe&&l.status>=500){await Kv(r);continue}throw a.fail(`Failed to poll: ${X(l)}`),l}let u=Math.round((Date.now()-n)/1e3),c=Math.round((s.progress??0)*100);if(a.text=`Exporting\u2026 ${s.status}${c>0?` \xB7 ${c}%`:""} (${u}s)`,S(i,"export_progress",{exportId:t,status:s.status,progress:s.progress,elapsedSec:u}),s.status==="complete")return a.succeed(`Export complete (${u}s)`),{kind:"complete",outputUrl:s.outputUrl??null,outputExpiresAt:s.outputExpiresAt??null,outputSizeBytes:s.outputSizeBytes??null,trimCacheHit:s.trimCacheHit??null};if(s.status==="error"||s.status==="cancelled"){let l=s.error?.message??`Export ${s.status}`;return a.fail(l),{kind:"failed",message:l,error:s.error?{phase:s.error.phase,retryable:!!s.error.retryable}:null}}await Kv(r)}return a.fail(`Timed out waiting for export (${Math.round((Date.now()-n)/1e3)}s)`),{kind:"failed",message:`Timed out after ${Math.round((i.timeoutMs??Bv)/1e3)}s`,error:null}}catch(s){P(i,"export_progress",s,O(s)),k(O(s))}}async function wx(e,t,i){let o=bx(t),r=ee(`Downloading \u2192 ${o}\u2026`,i);try{let n=await fetch(e);if(!n.ok)throw new Error(`HTTP ${n.status}`);let a=Buffer.from(await n.arrayBuffer());return _x(o,a),r.succeed(`Saved: ${o} (${(a.length/1024/1024).toFixed(1)} MB)`),o}catch(n){r.fail(`Download failed: ${X(n)}`),i||console.error(`
|
|
126
|
+
Export URL (7-day TTL): ${e}`),k(x.NetworkError)}}function Kv(e){return new Promise(t=>setTimeout(t,e))}async function Wv(e){T(e.target),S(e,"sessions_list_prepare",{});try{let t=await lr.listSessions();S(e,"sessions_list_complete",{count:t.data.length}),Z(e,t,()=>{if(t.data.length===0){console.log("No sessions yet. Create one with `cueframe sessions create --name <n> --files <mediaId:role> \u2026`");return}for(let i of t.data){let o=i.muxStatus??"pending";console.log(`${i.id} ${i.fileCount} files mux:${o} ${i.name}`)}t.pagination.hasMore&&console.log(`# more \u2014 pass --after ${t.pagination.nextCursor} (raw via \`cueframe api\`)`)})}catch(t){P(e,"sessions_list",t,O(t)),k(O(t))}}async function Gv(e,t){G(e,"sessionId",t),T(t.target),S(t,"sessions_get_prepare",{sessionId:e});try{let i=await lr.getSession(e);S(t,"sessions_get_complete",{sessionId:e}),Z(t,i,()=>{console.log(JSON.stringify(i,null,2))})}catch(i){P(t,"sessions_get",i,O(i)),k(O(i))}}async function qv(e){e.name||(console.error("--name is required"),k(x.UserError)),(!e.files||e.files.length===0)&&(console.error("At least one --file <mediaId:role> is required"),k(x.UserError));let t=e.files.map((i,o)=>{let r=i.indexOf(":");return r===-1&&(console.error(`--file[${o}] must be <mediaId>:<role>. Got: ${i}`),k(x.UserError)),{mediaId:i.slice(0,r).trim(),role:i.slice(r+1).trim()}});T(e.target),S(e,"sessions_create_prepare",{name:e.name,fileCount:t.length});try{let i=await lr.createSession({name:e.name,files:t});S(e,"sessions_create_complete",{sessionId:i.id}),Z(e,i,()=>{console.log(`Session created: ${i.id}`),console.log(JSON.stringify(i,null,2))})}catch(i){P(e,"sessions_create",i,O(i)),k(O(i))}}async function Xv(e,t){G(e,"sessionId",t),T(t.target),S(t,"sessions_delete_prepare",{sessionId:e});try{await lr.deleteSession(e),S(t,"sessions_delete_complete",{sessionId:e}),Z(t,{ok:!0,sessionId:e},()=>{console.log(`Session ${e} deleted.`)})}catch(i){P(t,"sessions_delete",i,O(i)),k(O(i))}}function Hv(e){let t=e.commands.map(Hv);return{name:e.name(),description:e.description(),arguments:e.registeredArguments.map(i=>({name:i.name(),required:i.required,description:i.description})),options:e.options.map(i=>({flags:i.flags,description:i.description,...i.defaultValue!==void 0?{default:i.defaultValue}:{}})),...t.length>0?{subcommands:t}:{}}}function Yv(e,t){let i=e.commands.map(Hv);if(t.json){S(t,"describe_complete",{name:e.name(),version:e.version()??null,commands:i});return}console.log(`${e.name()} ${e.version()??""}`.trim());for(let o of i){console.log(`
|
|
127
|
+
${o.name} \u2014 ${o.description}`);for(let r of o.subcommands??[])console.log(` ${o.name} ${r.name} \u2014 ${r.description}`)}}var Qv=["prod","local"];function oe(e){if(e===void 0)return"prod";if(Qv.includes(e))return e;console.error(`Invalid --target ${e}. Allowed: ${Qv.join(", ")}.`),k(x.UserError)}function eh(e){if(!e)return;let t=parseInt(e,10);if(t===24||t===25||t===30||t===60)return t;console.error(`Invalid --fps ${e}. Allowed: 24, 25, 30, 60.`),k(x.UserError)}async function th(){let e=new Ix;e.name("cueframe").description("AI-assisted video editing and rendering").version("0.6.0").option("--json","Emit a structured JSON document on stdout instead of human-formatted output. Spinners are silenced.").option("--dry-run","Report what would happen without mutating anything; `template run` asks the API to bind the inputs without storing a template. Applies to upload, analyze, project create, render, template run.");let t=()=>e.opts();e.command("install").description('One-line setup: wire the CueFrame MCP server into every installed agent (Claude Code / Cursor / Codex) and install the agent skills. No API key \u2014 auth is a browser "Allow" on first call.').option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").option("-f, --force","Replace locally changed or untracked skills, retaining backups").action(d=>Vd({json:t().json,target:oe(d.target),dryRun:t().dryRun,force:d.force})),e.command("init").description("Scaffold a CueFrame component workspace (cueframe.json + components dir) in the current repo, so `new component` has a home and the render harness can discover it.").action(()=>Kd({json:t().json,dryRun:t().dryRun})),e.command("new").description("Scaffold new owned source in the component workspace").command("component").description("Scaffold a blank custom component in cueframe/components/<name>").argument("<name>","Component id (e.g. my-badge)").option("-f, --force","Overwrite an existing non-empty component dir").action((d,m)=>Qg(d,{json:t().json,dryRun:t().dryRun,force:m.force})),e.command("push").description("Publish a locally-authored component (cueframe/components/<id>/index.tsx) to CueFrame so it renders server-side. Upserts by id.").argument("[id]","Component id to push (omit and use `cueframe sync` to push all)").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").action((d,m)=>nv(d,{target:oe(m.target),json:t().json})),e.command("sync").description("Publish EVERY component in the workspace (cueframe/components/*) to CueFrame. Upserts each by id.").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").action(d=>iv({target:oe(d.target),json:t().json}));let o=e.command("keys").description("Manage API keys. `keys create` mints a scoped key \u2014 run `cueframe login` first (keys cannot mint keys).");o.command("create").description("Mint a scoped API key (cf_*). Requires a logged-in session.").requiredOption("-n, --name <name>","Key name, e.g. ci-runner").option("-s, --scope <scope>","Comma-separated resource:actions, e.g. media:rw,projects:rw,renders:rw (resources: media,sessions,projects,renders,webhooks; actions r/w)").option("--preset <preset>","Scope preset instead of --scope: readonly (read all) | editall (read+write all)").option("--expires <days>","Expire after N days (default: never)").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").action(d=>av({...d,target:oe(d.target),json:t().json})),o.command("list").description("List your API keys.").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").action(d=>sv({target:oe(d.target),json:t().json})),o.command("revoke").description("Revoke an API key by id.").argument("<keyId>","Key id (from `cueframe keys list`)").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").action((d,m)=>cv(d,{target:oe(m.target),json:t().json})),e.command("login").description("Browser-mediated sign-in (OAuth device flow). Recommended for laptops.").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").option("--url <url>","Override the API base URL (advanced)").action(d=>Rv({...d,target:oe(d.target),json:t().json})),e.command("auth").description("Save a static API key (cf_live_\u2026 / cf_test_\u2026). Use for CI / headless environments.").argument("<api-key>","Your CueFrame API key").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").option("--url <url>","Override the API base URL (advanced)").action((d,m)=>{let f=oe(m.target);Ud(d),vn(d,f,m.url),t().json?console.log(JSON.stringify({ok:!0,target:f},null,2)):console.log(`API key saved for target "${f}"`)}),e.command("list").description("List projects").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").option("-n, --limit <n>","Max projects to show","10").action(d=>uv({target:oe(d.target),limit:parseInt(d.limit),json:t().json}));let r=e.command("project").description("Project commands");r.command("create").description("Create a new project. With --from-suggestion, atomically build the composition from a clip suggestion in one round-trip \u2014 the project is then immediately renderable via `cueframe render <projectId>`.").requiredOption("-n, --name <name>","Project name").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").option("-a, --aspect <ratio>","Aspect ratio: 9:16, 1:1, 16:9","9:16").option("--fps <n>","Frame rate","30").option("--resolution <r>","Resolution: hd, fhd, 2k, 4k","fhd").option("--brand-kit <id>","Bind a brand kit id to the project").option("--from-suggestion <sug>","Clip suggestion publicId (sug_\u2026) \u2014 atomically builds the composition after project creation so render needs no further args").option("--cheap","With --from-suggestion: use the deterministic translator (no LLM, ~100ms) instead of the AI authoring pass. Useful for tests / programmatic flows.").action(async d=>{await _v({name:d.name,target:oe(d.target),aspect:d.aspect,fps:eh(d.fps),resolution:d.resolution,brandKitId:d.brandKit,fromSuggestion:d.fromSuggestion,cheap:d.cheap,json:t().json,dryRun:t().dryRun})}),r.command("delete").description("Permanently delete a project (irreversible cleanup \u2014 removes the composition and render history).").argument("<projectId>","Project ID (from `cueframe list` or `project create`)").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").action((d,m)=>bv(d,{target:oe(m.target),json:t().json})),e.command("media").description("Media library cleanup commands").command("delete").description("Permanently delete a media item (irreversible cleanup \u2014 removes the source and its derived assets).").argument("<mediaId>","Media item ID (from `cueframe clips`)").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").action((d,m)=>kv(d,{target:oe(m.target),json:t().json})),e.command("upload").description("Upload a video file and process it").argument("<file>","Path to video file").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").option("-a, --analyze","Run clip analysis after processing completes").option("-r, --audio-role <role>","Declare the audio role (vo|music|sfx|ambience) \u2014 routes ingest enrichment: vo\u2192transcript, music\u2192beat grid, sfx/ambience\u2192envelope").action(async(d,m)=>{await No(d,{target:oe(m.target),analyze:m.analyze,audioRole:m.audioRole,json:t().json,dryRun:t().dryRun})}),e.command("analyze").description("Trigger AI clip suggestion analysis for a media item").argument("<mediaItemId>","Media item ID (from `cueframe clips`)").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").option("-w, --wait","Wait for analysis to complete and show results").action((d,m)=>Dd(d,{target:oe(m.target),wait:m.wait,json:t().json,dryRun:t().dryRun})),e.command("clips").description("List AI-generated clip suggestions for a media item").argument("[mediaItemId]","Media item ID (omit to list your media library)").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").action((d,m)=>pv(d,{target:oe(m.target),json:t().json}));let a=e.command("template").description("Run or validate a CueFrame template document (.cueframe), from the public catalog or your org");a.command("run").description("Start a template preparation job, wait for the ready project, and render").argument("<template>","Catalog slug (cueframe-ai/cueframe-templates), a template id in your org, or a local .cueframe document").option("-m, --media <name=source...>","A media parameter: name=<file|https url|sample|media:<id>> (repeatable)",[]).option("-v, --values <name=value...>","A parameter value: name=value (repeatable); coerced by the document",[]).option("-p, --preset <name>","A preset of the document; its values fill what --values leaves out").option("--brand-kit <id>","Apply with one of your org brand kits instead of the template's").option("--idempotency-key <key>","Reuse this key to safely retry a start request whose response was lost").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").option("-o, --out <path>","Output MP4 path","./template-output.mp4").option("--no-render","Create the editable project without rendering it").action(async(d,m)=>{await Cv(d,{media:m.media,values:m.values,preset:m.preset,brandKitId:m.brandKit,idempotencyKey:m.idempotencyKey,out:m.out,target:oe(m.target),render:m.render!==!1,json:t().json,dryRun:t().dryRun})}),a.command("status").description("Read a template preparation job; use --wait to reconnect until it is ready").argument("<jobId>","Job id returned by template run").option("--wait","Poll until ready, failed, or cancelled").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").action(async(d,m)=>{await Nv(d,{target:oe(m.target),json:t().json,wait:m.wait})}),a.command("validate").description("Check a template document: its references, every preset bound with the sample media, its prepared mattes. Runs on the CueFrame API with your key; nothing is stored.").argument("<template>","Catalog slug, a template id in your org, or a local .cueframe document").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").action(async(d,m)=>{await Tv(d,{target:oe(m.target),json:t().json})});let s=e.command("render").description("Render a project to MP4 (queues, watches via SSE, downloads). Renders whatever composition is saved on the project \u2014 build it first via `project create --from-suggestion` or `composition from-suggestion`.").allowExcessArguments(!1).argument("<projectId>","Project ID (from `cueframe list` or `project create`)").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").option("-a, --aspect <ratio>","Aspect ratio: 9:16, 1:1, 16:9 (defaults to project format)").option("--fps <n>","Frame rate","30").option("--resolution <r>","Resolution: hd, fhd, 2k, 4k","fhd").option("-o, --out <path>","Output file path (default: ./reel-<id>.mp4)").option("--idempotency-key <key>",'Override the auto-derived Idempotency-Key. Default: sha256("render:<projectId>:<currentCompositionETag>"). Pass a fresh UUID to force a new render row.').option("--priority <p>","Routing intent: interactive (low-latency, access-gated), standard (default), background (lowest queue weight).").option("--intent <i>","Encode-quality hint: preview (fast / low-bitrate, for editor scrubbing) or final (default, full Format).").action(async(d,m)=>{await Co(d,{target:m.target,aspect:m.aspect,fps:eh(m.fps),resolution:m.resolution,out:m.out,json:t().json,dryRun:t().dryRun,...m.idempotencyKey?{idempotencyKey:m.idempotencyKey}:{},...m.priority?{priority:m.priority}:{},...m.intent?{intent:m.intent}:{}})});e.command("api").description("Raw API call against the v1 surface (escape hatch \u2014 like `gh api`).").argument("<method>","HTTP method: GET, POST, PUT, PATCH, DELETE").argument("<path>","API path starting with /v1, e.g. /v1/projects").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").option("-b, --body <body>","Request body (inline JSON, @file.json to read from disk, @- for stdin)").option("-H, --header <header...>",'Additional header (repeatable), e.g. -H "If-Match: \\"abc\\""').option("-i, --include","Include response status line + headers in stdout (curl-style). Lets agents read ETag etc.").action((d,m,f)=>Mv(d,m,{target:f.target,body:f.body,header:f.header,include:f.include,json:t().json})),e.command("schema").description("Print the live composition wire schema from the server (/v1/openapi.json) \u2014 discover the contract instead of guessing.").argument("[resource]","Schema to print (currently: composition)","composition").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").action((d,m)=>Jv(d,{target:m.target,json:t().json}));let u=e.command("composition").description("Read/write a project's composition. ETag is threaded automatically.");u.command("validate").description("Validate a composition body against the live schema WITHOUT saving or rendering. Returns per-field errors \u2014 author safely before paying for a render.").requiredOption("-b, --body <body>","Composition JSON (inline, @file.json, or @- for stdin)").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").action(async d=>{await hv({target:d.target,body:d.body,json:t().json})}),u.command("get").description("Fetch the project's composition and ETag").argument("<projectId>","Project ID").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").action((d,m)=>gv(d,{target:m.target,json:t().json})),u.command("put").description("Replace the composition. GETs ETag first for safe concurrent writes.").argument("<projectId>","Project ID").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").requiredOption("-b, --body <body>","Composition JSON (inline, @file.json, or @- for stdin)").option("--if-match <etag>","Use this ETag (skip the GET round-trip)").option("--force","Use If-Match: * (unconditional overwrite \u2014 may clobber concurrent edits)").action(async(d,m)=>{await vv(d,{target:m.target,body:m.body,ifMatch:m.ifMatch,force:m.force,json:t().json})}),u.command("from-suggestion").description("Build the composition from an existing clip suggestion").argument("<projectId>","Project ID").requiredOption("-s, --suggestion <suggestionId>","Clip suggestion publicId (sug_\u2026)").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").option("--format <json>",`Optional format override, e.g. '{"aspectRatio":"9:16","fps":30,"resolution":"fhd"}'`).option("--if-match <etag>","Use this ETag (skip the GET round-trip)").option("--force","Use If-Match: * (unconditional overwrite)").action((d,m)=>To(d,{target:m.target,suggestionId:m.suggestion,format:m.format,ifMatch:m.ifMatch,force:m.force,json:t().json})),s.command("watch").description("Reattach to an existing render and stream progress to terminal state").argument("<renderId>","Render ID (from `cueframe render` output)").requiredOption("-p, --project <projectId>","Project the render belongs to").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").option("--no-download","Print the MP4 URL but skip downloading the file").option("-o, --out <path>","Output file path when downloading (default: ./reel-<id>.mp4)").action((d,m,f)=>{let v=f?.parent?.opts?.()?.target??m.target;return wv(d,{target:v,project:m.project,out:m.out,download:m.download!==!1,json:t().json})});let c=e.command("export").description("Hand the timeline off to a real NLE (Final Cut Pro / Premiere Pro)");c.command("fcpxml").description("Build a Final Cut Pro export zip and (optionally) wait to download it").argument("<projectId>","Project ID").requiredOption("-s, --suggestion <suggestionId>","Clip suggestion publicId (sug_\u2026)").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").option("-o, --out <path>","Output zip path (default: ./export-<id>.zip)").option("--wait","Block until the export finishes, then download the artifact").action((d,m)=>wd("fcpxml",{target:m.target,projectId:d,suggestionId:m.suggestion,out:m.out,wait:m.wait,json:t().json})),c.command("premiere").description("Build a Premiere Pro export zip and (optionally) wait to download it").argument("<projectId>","Project ID").requiredOption("-s, --suggestion <suggestionId>","Clip suggestion publicId (sug_\u2026)").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").option("-o, --out <path>","Output zip path (default: ./export-<id>.zip)").option("--wait","Block until the export finishes, then download the artifact").action((d,m)=>wd("premiere",{target:m.target,projectId:d,suggestionId:m.suggestion,out:m.out,wait:m.wait,json:t().json}));let l=e.command("sessions").description("Multi-file ingest sessions (camera A/B/screen \u2192 muxed composition)");l.command("list").description("List sessions in this org").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").action(d=>Wv({target:d.target,json:t().json})),l.command("get").description("Get a single session by ID").argument("<sessionId>","Session ID").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").action((d,m)=>Gv(d,{target:m.target,json:t().json})),l.command("create").description("Create a session from one or more media files").requiredOption("-n, --name <name>","Session name").requiredOption("-f, --file <entry...>","Each entry is <mediaId>:<role> (repeatable)").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").action(d=>qv({target:d.target,name:d.name,files:d.file,json:t().json})),l.command("delete").description("Delete a session (server checks for compositions referencing it)").argument("<sessionId>","Session ID").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").action((d,m)=>Xv(d,{target:m.target,json:t().json})),e.command("describe").description("Print the CLI command tree as structured JSON (agent introspection)").action(()=>Yv(e,{json:t().json}));try{await e.parseAsync()}catch(d){let m=O(d);P(t(),"cli",Object.assign(new Error(X(d)),{code:d?.code,status:d?.status}),m),k(m)}}await th();
|