Compare commits

..
4 Commits
Author SHA1 Message Date
yunyingk 2ab4e69122 Merge pull request #39 from yunyingk/codex/release-v0.10.11
🧪 CI / 🧪 Test, Type-Check & Build Validation (push) Has been cancelled
🚀 Release / 🚀 Build & Publish GitHub Release (push) Has been cancelled
🚀 Release / 📦 Sync Gitea Mirror (push) Has been cancelled
Release v0.10.11: Standard approval runs Excel export command and tool
2026-09-07 16:34:26 +08:00
gitea 06561bc893 Release v0.10.11: Standard approval runs Excel export command and tool 2026-09-07 16:33:12 +08:00
yunyingk b950e2b562 Merge pull request #38 from yunyingk/codex/release-v0.10.10
🧪 CI / 🧪 Test, Type-Check & Build Validation (push) Has been cancelled
🚀 Release / 🚀 Build & Publish GitHub Release (push) Has been cancelled
🚀 Release / 📦 Sync Gitea Mirror (push) Has been cancelled
Release v0.10.10: Remove default cwd enterprises loading and add global test-dir config
2026-09-07 15:27:25 +08:00
gitea b5cc7c874e Release v0.10.10: Remove default cwd enterprises loading and add global test-dir config 2026-09-07 15:26:21 +08:00
19 changed files with 1028 additions and 160 deletions

No files matched your search

+4
View File
@@ -14,4 +14,8 @@ enterprises/*.json
# Local generated reports and exported deliverables.
.local/
.apifox/
exports/
scripts/export-*.ts
# Local custom linters
linters/
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "seal-use",
"version": "0.10.9",
"version": "0.10.11",
"description": "Seal Use tenant operations: approval-run diagnosis, minimal rule remediation, delegation links, Hose/合思 authorization, users, rules, billing, and search.",
"author": {
"name": "yingqing"
+22
View File
@@ -5,6 +5,28 @@ All notable changes to `seal-use` will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.10.11] - 2026-09-07
### Added & Enhanced
- **Standard Approval Runs Excel Export**:
- Added `seal-use approval-runs export` command to export tenant approval records into high-fidelity Excel workbooks with frozen headers, dynamic rule columns, and color-coded status badges.
- Automatically resolves document template names, manual approval statuses (`APPROVED`, `TERMINATED`, `PROCESSING`), and human reviewer reject comments from `manualApprovalRecord`.
- Dynamically fetches tenant active approval rules (`api.listApprovalRules`) and appends rule check results (`PASS`, `FAIL`, `TRIGGERED`) as individual column badges.
- Added `--downloads` flag to conveniently output directly to the user's `~/Downloads` folder.
- Added `seal_approval_runs_export` tool in MCP/agent tools for automated reporting and data inspection.
- Supports `--start`, `--end`, `--limit`, `--status`, `--manual-status`, and `--completed-only` filters with gentle pagination and progress reporting to `stderr`.
## [0.10.10] - 2026-09-07
### Changed & Fixed
- **Enterprise Config Resolution Isolation**:
- Removed default loading of `./enterprises` from the current working directory (`cwd`), ensuring local repo files never unintentionally leak or override user enterprise configs.
- Candidate enterprise directories now strictly default to user global configuration directories (`~/.config/seal-use/enterprises`, `~/.config/seal-home/enterprises`) unless an explicit environment variable or test directory is configured.
- **Global Test Enterprises Directory Configuration**:
- Added `testEnterprisesDir` field to `GlobalConfigSchema`.
- Added `seal-use config test-dir [<path>|--clear]` command to safely configure or clear a dedicated test enterprise directory without impacting normal user operations.
- Included `testEnterprisesDir` in global configuration summaries and candidate directory listings.
## [0.10.9] - 2026-09-04
### Refactored & Purged
+138 -135
View File
@@ -1,102 +1,97 @@
import{createRequire as WL0}from"node:module";var YL0=Object.create;var{getPrototypeOf:JL0,defineProperty:SD,getOwnPropertyNames:QL0}=Object;var KL0=Object.prototype.hasOwnProperty;function zL0($){return this[$]}var wL0,GL0,CY=($,q,I)=>{var U=$!=null&&typeof $==="object";if(U){var Y=q?wL0??=new WeakMap:GL0??=new WeakMap,J=Y.get($);if(J)return J}I=$!=null?YL0(JL0($)):{};let Q=q||!$||!$.__esModule?SD(I,"default",{value:$,enumerable:!0}):I;for(let K of QL0($))if(!KL0.call(Q,K))SD(Q,K,{get:zL0.bind($,K),enumerable:!0});if(U)Y.set($,Q);return Q};var O=($,q)=>()=>(q||$((q={exports:{}}).exports,q),q.exports);var HL0=($)=>$;function VL0($,q){this[$]=HL0.bind(null,q)}var l8=($,q)=>{for(var I in q)SD($,I,{get:q[I],enumerable:!0,configurable:!0,set:VL0.bind(q,I)})};var o=WL0(import.meta.url);var vJ=O((cf)=>{Object.defineProperty(cf,"__esModule",{value:!0});cf.regexpCode=cf.getEsmExportName=cf.getProperty=cf.safeStringify=cf.stringify=cf.strConcat=cf.addCodeArg=cf.str=cf._=cf.nil=cf._Code=cf.Name=cf.IDENTIFIER=cf._CodeOrName=void 0;class hG{}cf._CodeOrName=hG;cf.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class pq extends hG{constructor($){super();if(!cf.IDENTIFIER.test($))throw Error("CodeGen: name must be a valid identifier");this.str=$}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}cf.Name=pq;class x$ extends hG{constructor($){super();this._items=typeof $==="string"?[$]:$}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let $=this._items[0];return $===""||$==='""'}get str(){var $;return($=this._str)!==null&&$!==void 0?$:this._str=this._items.reduce((q,I)=>`${q}${I}`,"")}get names(){var $;return($=this._names)!==null&&$!==void 0?$:this._names=this._items.reduce((q,I)=>{if(I instanceof pq)q[I.str]=(q[I.str]||0)+1;return q},{})}}cf._Code=x$;cf.nil=new x$("");function bf($,...q){let I=[$[0]],U=0;while(U<q.length)mP(I,q[U]),I.push($[++U]);return new x$(I)}cf._=bf;var lP=new x$("+");function pf($,...q){let I=[RJ($[0])],U=0;while(U<q.length)I.push(lP),mP(I,q[U]),I.push(lP,RJ($[++U]));return SF0(I),new x$(I)}cf.str=pf;function mP($,q){if(q instanceof x$)$.push(...q._items);else if(q instanceof pq)$.push(q);else $.push(xF0(q))}cf.addCodeArg=mP;function SF0($){let q=1;while(q<$.length-1){if($[q]===lP){let I=yF0($[q-1],$[q+1]);if(I!==void 0){$.splice(q-1,3,I);continue}$[q++]="+"}q++}}function yF0($,q){if(q==='""')return $;if($==='""')return q;if(typeof $=="string"){if(q instanceof pq||$[$.length-1]!=='"')return;if(typeof q!="string")return`${$.slice(0,-1)}${q}"`;if(q[0]==='"')return $.slice(0,-1)+q.slice(1);return}if(typeof q=="string"&&q[0]==='"'&&!($ instanceof pq))return`"${$}${q.slice(1)}`;return}function uF0($,q){return q.emptyStr()?$:$.emptyStr()?q:pf`${$}${q}`}cf.strConcat=uF0;function xF0($){return typeof $=="number"||typeof $=="boolean"||$===null?$:RJ(Array.isArray($)?$.join(","):$)}function kF0($){return new x$(RJ($))}cf.stringify=kF0;function RJ($){return JSON.stringify($).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}cf.safeStringify=RJ;function fF0($){return typeof $=="string"&&cf.IDENTIFIER.test($)?new x$(`.${$}`):bf`[${$}]`}cf.getProperty=fF0;function nF0($){if(typeof $=="string"&&cf.IDENTIFIER.test($))return new x$(`${$}`);throw Error(`CodeGen: invalid export name: ${$}, use explicit $id name mapping`)}cf.getEsmExportName=nF0;function bF0($){return new x$($.toString())}cf.regexpCode=bF0});var aP=O((of)=>{Object.defineProperty(of,"__esModule",{value:!0});of.ValueScope=of.ValueScopeName=of.Scope=of.varKinds=of.UsedValueState=void 0;var k6=vJ();class lf extends Error{constructor($){super(`CodeGen: "code" for ${$} not defined`);this.value=$.value}}var yG;(function($){$[$.Started=0]="Started",$[$.Completed=1]="Completed"})(yG||(of.UsedValueState=yG={}));of.varKinds={const:new k6.Name("const"),let:new k6.Name("let"),var:new k6.Name("var")};class rP{constructor({prefixes:$,parent:q}={}){this._names={},this._prefixes=$,this._parent=q}toName($){return $ instanceof k6.Name?$:this.name($)}name($){return new k6.Name(this._newName($))}_newName($){let q=this._names[$]||this._nameGroup($);return`${$}${q.index++}`}_nameGroup($){var q,I;if(((I=(q=this._parent)===null||q===void 0?void 0:q._prefixes)===null||I===void 0?void 0:I.has($))||this._prefixes&&!this._prefixes.has($))throw Error(`CodeGen: prefix "${$}" is not allowed in this scope`);return this._names[$]={prefix:$,index:0}}}of.Scope=rP;class tP extends k6.Name{constructor($,q){super(q);this.prefix=$}setValue($,{property:q,itemIndex:I}){this.value=$,this.scopePath=k6._`.${new k6.Name(q)}[${I}]`}}of.ValueScopeName=tP;var $M0=k6._`\n`;class mf extends rP{constructor($){super($);this._values={},this._scope=$.scope,this.opts={...$,_n:$.lines?$M0:k6.nil}}get(){return this._scope}name($){return new tP($,this._newName($))}value($,q){var I;if(q.ref===void 0)throw Error("CodeGen: ref must be passed in value");let U=this.toName($),{prefix:Y}=U,J=(I=q.key)!==null&&I!==void 0?I:q.ref,Q=this._values[Y];if(Q){let w=Q.get(J);if(Line truncated
`:""},this._extScope=$,this._scope=new k$.Scope({parent:$}),this._nodes=[new In]}toString(){return this._root.render(this.opts)}name($){return this._scope.name($)}scopeName($){return this._extScope.name($)}scopeValue($,q){let I=this._extScope.value($,q);return(this._values[I.prefix]||(this._values[I.prefix]=new Set)).add(I),I}getScopeValue($,q){return this._extScope.getValue($,q)}scopeRefs($){return this._extScope.scopeRefs($,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def($,q,I,U){let Y=this._scope.toName(q);if(I!==void 0&&U)this._constants[Y.str]=I;return this._leafNode(new tf($,Y,I)),Y}const($,q,I){return this._def(k$.varKinds.const,$,q,I)}let($,q,I){return this._def(k$.varKinds.let,$,q,I)}var($,q,I){return this._def(k$.varKinds.var,$,q,I)}assign($,q,I){return this._leafNode(new $T($,q,I))}add($,q){return this._leafNode(new af($,f6.operators.ADD,q))}code($){if(typeof $=="function")$();else if($!==U1.nil)this._leafNode(new qn($));return this}object(...$){let q=["{"];for(let[I,U]of $){if(q.length>1)q.push(",");if(q.push(I),I!==U||this.opts.es5)q.push(":"),(0,U1.addCodeArg)(q,U)}return q.push("}"),new U1._Code(q)}if($,q,I){if(this._blockNode(new a8($)),q&&I)this.code(q).else().code(I).endIf();else if(q)this.code(q).endIf();else if(I)throw Error('CodeGen: "else" body without "then" body');return this}elseIf($){return this._elseNode(new a8($))}else(){return this._elseNode(new CJ)}endIf(){return this._endBlockNode(a8,CJ)}_for($,q){if(this._blockNode($),q)this.code(q).endFor();return this}for($,q){return this._for(new Un($),q)}forRange($,q,I,U,Y=this.opts.es5?k$.varKinds.var:k$.varKinds.let){let J=this._scope.toName($);return this._for(new Yn(Y,J,q,I),()=>U(J))}forOf($,q,I,U=k$.varKinds.const){let Y=this._scope.toName($);if(this.opts.es5){let J=q instanceof U1.Name?q:this.var("_arr",q);return this.forRange("_i",0,U1._`${J}.length`,(Q)=>{this.var(Y,U1._`${J}[${Q}]`),I(Y)})}return this._for(new sP("of",U,Y,q),()=>I(Y))}forIn($,q,I,U=this.opts.es5?k$.varKinds.var:k$.varKinds.const){if(this.opts.ownProperties)return this.forOf($,U1._`Object.keys(${q})`,I);let Y=this._scope.toName($);return this._for(new sP("in",U,Y,q),()=>I(Y))}endFor(){return this._endBlockNode(cq)}label($){return this._leafNode(new sf($))}break($){return this._leafNode(new ef($))}return($){let q=new xG;if(this._blockNode(q),this.code($),q.nodes.length!==1)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(xG)}try($,q,I){if(!q&&!I)throw Error('CodeGen: "try" without "catch" and "finally"');let U=new Jn;if(this._blockNode(U),this.code($),q){let Y=this.name("e");this._currNode=U.catch=new kG(Y),q(Y)}if(I)this._currNode=U.finally=new fG,this.code(I);return this._endBlockNode(kG,fG)}throw($){return this._leafNode(new $n($))}block($,q){if(this._blockStarts.push(this._nodes.length),$)this.code($).endBlock(q);return this}endBlock($){let q=this._blockStarts.pop();if(q===void 0)throw Error("CodeGen: not in self-balancing block");let I=this._nodes.length-q;if(I<0||$!==void 0&&I!==$)throw Error(`CodeGen: wrong number of nodes: ${I} vs ${$} expected`);return this._nodes.length=q,this}func($,q=U1.nil,I,U){if(this._blockNode(new uG($,q,I)),U)this.code(U).endFunc();return this}endFunc(){return this._endBlockNode(uG)}optimize($=1){while($-- >0)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode($){return this._currNode.nodes.push($),this}_blockNode($){this._currNode.nodes.push($),this._nodes.push($)}_endBlockNode($,q){let I=this._currNode;if(I instanceof $||q&&I instanceof q)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${q?`${$.kind}/${q.kind}`:$.kind}"`)}_elseNode($){let q=this._currNode;if(!(q instanceof a8))throw Error('CodeGen: "else" without "if"');return this._currNode=q.else=$,this}get _root(){return this._nodes[0]}get _currNode(){let $=this._nodes;return $[$.length-1]}set _currNode($){let q=this._nodes;q[q.length-1]=$}}f6.CodeGen=Qn;function B7($,q){for(let I in q)$[I]=($[I]||0)+(q[I]||0);return $}function nG($,q){return q instanceof U1._CodeOrName?B7($,q.names):$}function dq($,q,I){if($ instanceof U1.Name)return U($);if(!Y($))return $;return new U1._Code($._items.reduce((J,Q)=>{if(Q instanceof U1.Name)Q=U(Q);if(Q instanceof U1._Code)J.push(...Q._items);else J.push(Q);return J},[]));function U(J){let Q=I[J.str];if(Q===void 0||q[J.str]!==1)return J;return delete q[J.str],Q}function Y(J){return J instanceof U1._Code&&J._items.some((Q)=>Q instanceof U1.Name&&q[Q.str]===1&&I[Q.str]!==void 0)}}function YM0($,q){for(let I in q)$[I]=($[I]||0)-(q[I]||0)}function Kn($){return typeof $=="boolean"||typeof $=="number"||$===null?!$:U1._`!${eP($)}`}f6.not=Kn;var JM0=zn(f6.operators.AND);function QM0(...$){return $.reduce(JM0)}f6.and=QM0;var KM0=zn(f6.operators.OR);function zM0(...$){return $.reduce(KM0)}f6.or=zM0;function zn($){return(q,I)=>q===U1.nil?I:I===U1.nil?q:U1._`${eP(q)} ${$} ${eP(I)}`}function eP($){return $ instanceof U1.Name?$:U1._`(${Line truncated
|| (${Q} == "string" && ${Y} && ${Y} == +${Y})`).assign(K,d0._`+${Y}`);return;case"integer":U.elseIf(d0._`${Q} === "boolean" || ${Y} === null
|| (${Q} === "string" && ${Y} && ${Y} == +${Y} && !(${Y} % 1))`).assign(K,d0._`+${Y}`);return;case"boolean":U.elseIf(d0._`${Y} === "false" || ${Y} === 0 || ${Y} === null`).assign(K,!1).elseIf(d0._`${Y} === "true" || ${Y} === 1`).assign(K,!0);return;case"null":U.elseIf(d0._`${Y} === "" || ${Y} === 0 || ${Y} === false`),U.assign(K,null);return;case"array":U.elseIf(d0._`${Q} === "string" || ${Q} === "number"
|| ${Q} === "boolean" || ${Y} === null`).assign(K,d0._`[${Y}]`)}}}function MA0({gen:$,parentData:q,parentDataProperty:I},U){$.if(d0._`${q} !== undefined`,()=>$.assign(d0._`${q}[${I}]`,U))}function KT($,q,I,U=lq.Correct){let Y=U===lq.Correct?d0.operators.EQ:d0.operators.NEQ,J;switch($){case"null":return d0._`${q} ${Y} null`;case"array":J=d0._`Array.isArray(${q})`;break;case"object":J=d0._`${q} && typeof ${q} == "object" && !Array.isArray(${q})`;break;case"integer":J=Q(d0._`!(${q} % 1) && !isNaN(${q})`);break;case"number":J=Q();break;default:return d0._`typeof ${q} ${Y} ${$}`}return U===lq.Correct?J:(0,d0.not)(J);function Q(K=d0.nil){return(0,d0.and)(d0._`typeof ${q} == "number"`,K,I?d0._`isFinite(${q})`:d0.nil)}}kn.checkDataType=KT;function zT($,q,I,U){if($.length===1)return KT($[0],q,I,U);let Y,J=(0,yn.toHash)($);if(J.array&&J.object){let Q=d0._`typeof ${q} != "object"`;Y=J.null?Q:d0._`!${q} || ${Q}`,delete J.null,delete J.array,delete J.object}else Y=d0.nil;if(J.number)delete J.integer;for(let Q in J)Y=(0,d0.and)(Y,KT(Q,q,I,U));return Y}kn.checkDataTypes=zT;var AA0={message:({schema:$})=>`must be ${$}`,params:({schema:$,schemaValue:q})=>typeof $=="string"?d0._`{type: ${$}}`:d0._`{type: ${q}}`};function wT($){let q=PA0($);(0,LA0.reportError)(q,AA0)}kn.reportTypeError=wT;function PA0($){let{gen:q,data:I,schema:U}=$,Y=(0,yn.schemaRefOrVal)($,U,"type");return{gen:q,keyword:"type",data:I,schema:U.type,schemaCode:Y,schemaValue:Y,parentSchema:U,params:{},it:$}}});var cn=O((bn)=>{Object.defineProperty(bn,"__esModule",{value:!0});bn.assignDefaults=void 0;var mq=m0(),vA0=z1();function CA0($,q){let{properties:I,items:U}=$.schema;if(q==="object"&&I)for(let Y in I)nn($,Y,I[Y].default);else if(q==="array"&&Array.isArray(U))U.forEach((Y,J)=>nn($,J,Y.default))}bn.assignDefaults=CA0;function nn($,q,I){let{gen:U,compositeRule:Y,data:J,opts:Q}=$;if(I===void 0)return;let K=mq._`${J}${(0,mq.getProperty)(q)}`;if(Y){(0,vA0.checkStrictMode)($,`default is ignored for: ${K}`);return}let z=mq._`${K} === undefined`;if(Q.useDefaults==="empty")z=mq._`${z} || ${K} === null || ${K} === ""`;U.if(z,mq._`${K} = ${(0,mq.stringify)(I)}`)}});var O$=O((mn)=>{Object.defineProperty(mn,"__esModule",{value:!0});mn.validateUnion=mn.validateArray=mn.usePattern=mn.callValidateCode=mn.schemaProperties=mn.allSchemaProperties=mn.noPropertyInData=mn.propertyInData=mn.isOwnProperty=mn.hasPropFunc=mn.reportMissingProp=mn.checkMissingProp=mn.checkReportMissingProp=void 0;var l1=m0(),GT=z1(),z9=s8(),_A0=z1();function hA0($,q){let{gen:I,data:U,it:Y}=$;I.if(VT(I,U,q,Y.opts.ownProperties),()=>{$.setParams({missingProperty:l1._`${q}`},!0),$.error()})}mn.checkReportMissingProp=hA0;function SA0({gen:$,data:q,it:{opts:I}},U,Y){return(0,l1.or)(...U.map((J)=>(0,l1.and)(VT($,q,J,I.ownProperties),l1._`${Y} = ${J}`)))}mn.checkMissingProp=SA0;function yA0($,q){$.setParams({missingProperty:q},!0),$.error()}mn.reportMissingProp=yA0;function dn($){return $.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:l1._`Object.prototype.hasOwnProperty`})}mn.hasPropFunc=dn;function HT($,q,I){return l1._`${dn($)}.call(${q}, ${I})`}mn.isOwnProperty=HT;function uA0($,q,I,U){let Y=l1._`${q}${(0,l1.getProperty)(I)} !== undefined`;return U?l1._`${Y} && ${HT($,q,I)}`:Y}mn.propertyInData=uA0;function VT($,q,I,U){let Y=l1._`${q}${(0,l1.getProperty)(I)} === undefined`;return U?(0,l1.or)(Y,(0,l1.not)(HT($,q,I))):Y}mn.noPropertyInData=VT;function ln($){return $?Object.keys($).filter((q)=>q!=="__proto__"):[]}mn.allSchemaProperties=ln;function xA0($,q){return ln(q).filter((I)=>!(0,GT.alwaysValidSchema)($,q[I]))}mn.schemaProperties=xA0;function kA0({schemaCode:$,data:q,it:{gen:I,topSchemaRef:U,schemaPath:Y,errorPath:J},it:Q},K,z,w){let G=w?l1._`${$}, ${q}, ${U}${Y}`:q,H=[[z9.default.instancePath,(0,l1.strConcat)(z9.default.instancePath,J)],[z9.default.parentData,Q.parentData],[z9.default.parentDataProperty,Q.parentDataProperty],[z9.default.rootData,z9.default.rootData]];if(Q.opts.dynamicRef)H.push([z9.default.dynamicAnchors,z9.default.dynamicAnchors]);let V=l1._`${G}, ${I.object(...H)}`;return z!==l1.nil?l1._`${K}.call(${z}, ${V})`:l1._`${K}(${V})`}mn.callValidateCode=kA0;var fA0=l1._`new RegExp`;function nA0({gen:$,it:{opts:q}},I){let U=q.unicodeRegExp?"u":"",{regExp:Y}=q.code,J=Y(I,U);return $.scopeValue("pattern",{key:J.toString(),ref:J,code:l1._`${Y.code==="new RegExp"?fA0:(0,_A0.useFunc)($,Y)}(${I}, ${U})`})}mn.usePattern=nA0;function bA0($){let{gen:q,data:I,keyword:U,it:Y}=$,J=q.name("valid");if(Y.allErrors){let K=q.let("valid",!0);return Q(()=>q.assign(K,!1)),K}return q.var(J,!0),Q(()=>q.break()),J;function Q(K){let z=q.const("len",l1._`${I}.length`);q.forRange("i",0,z,(w)=>{$.subschema({keyword:U,dataProp:w,dataPropType:GT.Type.Num},J),q.if((0,l1.not)(J),K)})}}mn.validateArray=bA0;function iA0($){let{gen:q,schema:I,keyword:U,it:Y}=$;if(!Array.isArray(I))throw Error("ajv implementation error");if(I.some((z)=>(0,GT.alwaysValidSchema)(Y,z))&&!Y.opts.unevaluated)return;le Line truncated
import{createRequire as OL0}from"node:module";var GL0=Object.create;var{getPrototypeOf:HL0,defineProperty:uD,getOwnPropertyNames:wL0}=Object;var VL0=Object.prototype.hasOwnProperty;function WL0($){return this[$]}var ZL0,XL0,Hq=($,q,I)=>{var U=$!=null&&typeof $==="object";if(U){var Y=q?ZL0??=new WeakMap:XL0??=new WeakMap,J=Y.get($);if(J)return J}I=$!=null?GL0(HL0($)):{};let Q=q||!$||!$.__esModule?uD(I,"default",{value:$,enumerable:!0}):I;for(let K of wL0($))if(!VL0.call(Q,K))uD(Q,K,{get:WL0.bind($,K),enumerable:!0});if(U)Y.set($,Q);return Q};var O=($,q)=>()=>(q||$((q={exports:{}}).exports,q),q.exports);var LL0=($)=>$;function DL0($,q){this[$]=LL0.bind(null,q)}var l8=($,q)=>{for(var I in q)uD($,I,{get:q[I],enumerable:!0,configurable:!0,set:DL0.bind(q,I)})};var r=OL0(import.meta.url);var _J=O((mf)=>{Object.defineProperty(mf,"__esModule",{value:!0});mf.regexpCode=mf.getEsmExportName=mf.getProperty=mf.safeStringify=mf.stringify=mf.strConcat=mf.addCodeArg=mf.str=mf._=mf.nil=mf._Code=mf.Name=mf.IDENTIFIER=mf._CodeOrName=void 0;class SH{}mf._CodeOrName=SH;mf.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class oq extends SH{constructor($){super();if(!mf.IDENTIFIER.test($))throw Error("CodeGen: name must be a valid identifier");this.str=$}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}mf.Name=oq;class k$ extends SH{constructor($){super();this._items=typeof $==="string"?[$]:$}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let $=this._items[0];return $===""||$==='""'}get str(){var $;return($=this._str)!==null&&$!==void 0?$:this._str=this._items.reduce((q,I)=>`${q}${I}`,"")}get names(){var $;return($=this._names)!==null&&$!==void 0?$:this._names=this._items.reduce((q,I)=>{if(I instanceof oq)q[I.str]=(q[I.str]||0)+1;return q},{})}}mf._Code=k$;mf.nil=new k$("");function cf($,...q){let I=[$[0]],U=0;while(U<q.length)rP(I,q[U]),I.push($[++U]);return new k$(I)}mf._=cf;var oP=new k$("+");function df($,...q){let I=[CJ($[0])],U=0;while(U<q.length)I.push(oP),rP(I,q[U]),I.push(oP,CJ($[++U]));return fF0(I),new k$(I)}mf.str=df;function rP($,q){if(q instanceof k$)$.push(...q._items);else if(q instanceof oq)$.push(q);else $.push(iF0(q))}mf.addCodeArg=rP;function fF0($){let q=1;while(q<$.length-1){if($[q]===oP){let I=bF0($[q-1],$[q+1]);if(I!==void 0){$.splice(q-1,3,I);continue}$[q++]="+"}q++}}function bF0($,q){if(q==='""')return $;if($==='""')return q;if(typeof $=="string"){if(q instanceof oq||$[$.length-1]!=='"')return;if(typeof q!="string")return`${$.slice(0,-1)}${q}"`;if(q[0]==='"')return $.slice(0,-1)+q.slice(1);return}if(typeof q=="string"&&q[0]==='"'&&!($ instanceof oq))return`"${$}${q.slice(1)}`;return}function nF0($,q){return q.emptyStr()?$:$.emptyStr()?q:df`${$}${q}`}mf.strConcat=nF0;function iF0($){return typeof $=="number"||typeof $=="boolean"||$===null?$:CJ(Array.isArray($)?$.join(","):$)}function pF0($){return new k$(CJ($))}mf.stringify=pF0;function CJ($){return JSON.stringify($).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}mf.safeStringify=CJ;function cF0($){return typeof $=="string"&&mf.IDENTIFIER.test($)?new k$(`.${$}`):cf`[${$}]`}mf.getProperty=cF0;function dF0($){if(typeof $=="string"&&mf.IDENTIFIER.test($))return new k$(`${$}`);throw Error(`CodeGen: invalid export name: ${$}, use explicit $id name mapping`)}mf.getEsmExportName=dF0;function mF0($){return new k$($.toString())}mf.regexpCode=mF0});var eP=O((tf)=>{Object.defineProperty(tf,"__esModule",{value:!0});tf.ValueScope=tf.ValueScopeName=tf.Scope=tf.varKinds=tf.UsedValueState=void 0;var k6=_J();class of extends Error{constructor($){super(`CodeGen: "code" for ${$} not defined`);this.value=$.value}}var uH;(function($){$[$.Started=0]="Started",$[$.Completed=1]="Completed"})(uH||(tf.UsedValueState=uH={}));tf.varKinds={const:new k6.Name("const"),let:new k6.Name("let"),var:new k6.Name("var")};class aP{constructor({prefixes:$,parent:q}={}){this._names={},this._prefixes=$,this._parent=q}toName($){return $ instanceof k6.Name?$:this.name($)}name($){return new k6.Name(this._newName($))}_newName($){let q=this._names[$]||this._nameGroup($);return`${$}${q.index++}`}_nameGroup($){var q,I;if(((I=(q=this._parent)===null||q===void 0?void 0:q._prefixes)===null||I===void 0?void 0:I.has($))||this._prefixes&&!this._prefixes.has($))throw Error(`CodeGen: prefix "${$}" is not allowed in this scope`);return this._names[$]={prefix:$,index:0}}}tf.Scope=aP;class sP extends k6.Name{constructor($,q){super(q);this.prefix=$}setValue($,{property:q,itemIndex:I}){this.value=$,this.scopePath=k6._`.${new k6.Name(q)}[${I}]`}}tf.ValueScopeName=sP;var JM0=k6._`\n`;class rf extends aP{constructor($){super($);this._values={},this._scope=$.scope,this.opts={...$,_n:$.lines?JM0:k6.nil}}get(){return this._scope}name($){return new sP($,this._newName($))}value($,q){var I;if(q.ref===void 0)throw Error("CodeGen: ref must be passed in value");let U=this.toName($),{prefix:Y}=U,J=(I=q.key)!==null&&I!==void 0?I:q.ref,Q=this._values[Y];if(Q){let G=Q.get(J);if(Line truncated
`:""},this._extScope=$,this._scope=new f$.Scope({parent:$}),this._nodes=[new Yb]}toString(){return this._root.render(this.opts)}name($){return this._scope.name($)}scopeName($){return this._extScope.name($)}scopeValue($,q){let I=this._extScope.value($,q);return(this._values[I.prefix]||(this._values[I.prefix]=new Set)).add(I),I}getScopeValue($,q){return this._extScope.getValue($,q)}scopeRefs($){return this._extScope.scopeRefs($,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def($,q,I,U){let Y=this._scope.toName(q);if(I!==void 0&&U)this._constants[Y.str]=I;return this._leafNode(new sf($,Y,I)),Y}const($,q,I){return this._def(f$.varKinds.const,$,q,I)}let($,q,I){return this._def(f$.varKinds.let,$,q,I)}var($,q,I){return this._def(f$.varKinds.var,$,q,I)}assign($,q,I){return this._leafNode(new IT($,q,I))}add($,q){return this._leafNode(new ef($,f6.operators.ADD,q))}code($){if(typeof $=="function")$();else if($!==Q1.nil)this._leafNode(new Ub($));return this}object(...$){let q=["{"];for(let[I,U]of $){if(q.length>1)q.push(",");if(q.push(I),I!==U||this.opts.es5)q.push(":"),(0,Q1.addCodeArg)(q,U)}return q.push("}"),new Q1._Code(q)}if($,q,I){if(this._blockNode(new s8($)),q&&I)this.code(q).else().code(I).endIf();else if(q)this.code(q).endIf();else if(I)throw Error('CodeGen: "else" body without "then" body');return this}elseIf($){return this._elseNode(new s8($))}else(){return this._elseNode(new hJ)}endIf(){return this._endBlockNode(s8,hJ)}_for($,q){if(this._blockNode($),q)this.code(q).endFor();return this}for($,q){return this._for(new Jb($),q)}forRange($,q,I,U,Y=this.opts.es5?f$.varKinds.var:f$.varKinds.let){let J=this._scope.toName($);return this._for(new Qb(Y,J,q,I),()=>U(J))}forOf($,q,I,U=f$.varKinds.const){let Y=this._scope.toName($);if(this.opts.es5){let J=q instanceof Q1.Name?q:this.var("_arr",q);return this.forRange("_i",0,Q1._`${J}.length`,(Q)=>{this.var(Y,Q1._`${J}[${Q}]`),I(Y)})}return this._for(new $T("of",U,Y,q),()=>I(Y))}forIn($,q,I,U=this.opts.es5?f$.varKinds.var:f$.varKinds.const){if(this.opts.ownProperties)return this.forOf($,Q1._`Object.keys(${q})`,I);let Y=this._scope.toName($);return this._for(new $T("in",U,Y,q),()=>I(Y))}endFor(){return this._endBlockNode(rq)}label($){return this._leafNode(new $b($))}break($){return this._leafNode(new qb($))}return($){let q=new kH;if(this._blockNode(q),this.code($),q.nodes.length!==1)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(kH)}try($,q,I){if(!q&&!I)throw Error('CodeGen: "try" without "catch" and "finally"');let U=new Kb;if(this._blockNode(U),this.code($),q){let Y=this.name("e");this._currNode=U.catch=new fH(Y),q(Y)}if(I)this._currNode=U.finally=new bH,this.code(I);return this._endBlockNode(fH,bH)}throw($){return this._leafNode(new Ib($))}block($,q){if(this._blockStarts.push(this._nodes.length),$)this.code($).endBlock(q);return this}endBlock($){let q=this._blockStarts.pop();if(q===void 0)throw Error("CodeGen: not in self-balancing block");let I=this._nodes.length-q;if(I<0||$!==void 0&&I!==$)throw Error(`CodeGen: wrong number of nodes: ${I} vs ${$} expected`);return this._nodes.length=q,this}func($,q=Q1.nil,I,U){if(this._blockNode(new xH($,q,I)),U)this.code(U).endFunc();return this}endFunc(){return this._endBlockNode(xH)}optimize($=1){while($-- >0)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode($){return this._currNode.nodes.push($),this}_blockNode($){this._currNode.nodes.push($),this._nodes.push($)}_endBlockNode($,q){let I=this._currNode;if(I instanceof $||q&&I instanceof q)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${q?`${$.kind}/${q.kind}`:$.kind}"`)}_elseNode($){let q=this._currNode;if(!(q instanceof s8))throw Error('CodeGen: "else" without "if"');return this._currNode=q.else=$,this}get _root(){return this._nodes[0]}get _currNode(){let $=this._nodes;return $[$.length-1]}set _currNode($){let q=this._nodes;q[q.length-1]=$}}f6.CodeGen=zb;function B7($,q){for(let I in q)$[I]=($[I]||0)+(q[I]||0);return $}function nH($,q){return q instanceof Q1._CodeOrName?B7($,q.names):$}function tq($,q,I){if($ instanceof Q1.Name)return U($);if(!Y($))return $;return new Q1._Code($._items.reduce((J,Q)=>{if(Q instanceof Q1.Name)Q=U(Q);if(Q instanceof Q1._Code)J.push(...Q._items);else J.push(Q);return J},[]));function U(J){let Q=I[J.str];if(Q===void 0||q[J.str]!==1)return J;return delete q[J.str],Q}function Y(J){return J instanceof Q1._Code&&J._items.some((Q)=>Q instanceof Q1.Name&&q[Q.str]===1&&I[Q.str]!==void 0)}}function GM0($,q){for(let I in q)$[I]=($[I]||0)-(q[I]||0)}function Gb($){return typeof $=="boolean"||typeof $=="number"||$===null?!$:Q1._`!${qT($)}`}f6.not=Gb;var HM0=Hb(f6.operators.AND);function wM0(...$){return $.reduce(HM0)}f6.and=wM0;var VM0=Hb(f6.operators.OR);function WM0(...$){return $.reduce(VM0)}f6.or=WM0;function Hb($){return(q,I)=>q===Q1.nil?I:I===Q1.nil?q:Q1._`${qT(q)} ${$} ${qT(I)}`}function qT($){return $ instanceof Q1.Name?$:Q1._`(${Line truncated
|| (${Q} == "string" && ${Y} && ${Y} == +${Y})`).assign(K,r0._`+${Y}`);return;case"integer":U.elseIf(r0._`${Q} === "boolean" || ${Y} === null
|| (${Q} === "string" && ${Y} && ${Y} == +${Y} && !(${Y} % 1))`).assign(K,r0._`+${Y}`);return;case"boolean":U.elseIf(r0._`${Y} === "false" || ${Y} === 0 || ${Y} === null`).assign(K,!1).elseIf(r0._`${Y} === "true" || ${Y} === 1`).assign(K,!0);return;case"null":U.elseIf(r0._`${Y} === "" || ${Y} === 0 || ${Y} === false`),U.assign(K,null);return;case"array":U.elseIf(r0._`${Q} === "string" || ${Q} === "number"
|| ${Q} === "boolean" || ${Y} === null`).assign(K,r0._`[${Y}]`)}}}function jA0({gen:$,parentData:q,parentDataProperty:I},U){$.if(r0._`${q} !== undefined`,()=>$.assign(r0._`${q}[${I}]`,U))}function GT($,q,I,U=aq.Correct){let Y=U===aq.Correct?r0.operators.EQ:r0.operators.NEQ,J;switch($){case"null":return r0._`${q} ${Y} null`;case"array":J=r0._`Array.isArray(${q})`;break;case"object":J=r0._`${q} && typeof ${q} == "object" && !Array.isArray(${q})`;break;case"integer":J=Q(r0._`!(${q} % 1) && !isNaN(${q})`);break;case"number":J=Q();break;default:return r0._`typeof ${q} ${Y} ${$}`}return U===aq.Correct?J:(0,r0.not)(J);function Q(K=r0.nil){return(0,r0.and)(r0._`typeof ${q} == "number"`,K,I?r0._`isFinite(${q})`:r0.nil)}}bb.checkDataType=GT;function HT($,q,I,U){if($.length===1)return GT($[0],q,I,U);let Y,J=(0,xb.toHash)($);if(J.array&&J.object){let Q=r0._`typeof ${q} != "object"`;Y=J.null?Q:r0._`!${q} || ${Q}`,delete J.null,delete J.array,delete J.object}else Y=r0.nil;if(J.number)delete J.integer;for(let Q in J)Y=(0,r0.and)(Y,GT(Q,q,I,U));return Y}bb.checkDataTypes=HT;var gA0={message:({schema:$})=>`must be ${$}`,params:({schema:$,schemaValue:q})=>typeof $=="string"?r0._`{type: ${$}}`:r0._`{type: ${q}}`};function wT($){let q=BA0($);(0,MA0.reportError)(q,gA0)}bb.reportTypeError=wT;function BA0($){let{gen:q,data:I,schema:U}=$,Y=(0,xb.schemaRefOrVal)($,U,"type");return{gen:q,keyword:"type",data:I,schema:U.type,schemaCode:Y,schemaValue:Y,parentSchema:U,params:{},it:$}}});var db=O((pb)=>{Object.defineProperty(pb,"__esModule",{value:!0});pb.assignDefaults=void 0;var sq=t0(),yA0=w1();function uA0($,q){let{properties:I,items:U}=$.schema;if(q==="object"&&I)for(let Y in I)ib($,Y,I[Y].default);else if(q==="array"&&Array.isArray(U))U.forEach((Y,J)=>ib($,J,Y.default))}pb.assignDefaults=uA0;function ib($,q,I){let{gen:U,compositeRule:Y,data:J,opts:Q}=$;if(I===void 0)return;let K=sq._`${J}${(0,sq.getProperty)(q)}`;if(Y){(0,yA0.checkStrictMode)($,`default is ignored for: ${K}`);return}let z=sq._`${K} === undefined`;if(Q.useDefaults==="empty")z=sq._`${z} || ${K} === null || ${K} === ""`;U.if(z,sq._`${K} = ${(0,sq.stringify)(I)}`)}});var O$=O((ob)=>{Object.defineProperty(ob,"__esModule",{value:!0});ob.validateUnion=ob.validateArray=ob.usePattern=ob.callValidateCode=ob.schemaProperties=ob.allSchemaProperties=ob.noPropertyInData=ob.propertyInData=ob.isOwnProperty=ob.hasPropFunc=ob.reportMissingProp=ob.checkMissingProp=ob.checkReportMissingProp=void 0;var m1=t0(),VT=w1(),G9=e8(),xA0=w1();function kA0($,q){let{gen:I,data:U,it:Y}=$;I.if(ZT(I,U,q,Y.opts.ownProperties),()=>{$.setParams({missingProperty:m1._`${q}`},!0),$.error()})}ob.checkReportMissingProp=kA0;function fA0({gen:$,data:q,it:{opts:I}},U,Y){return(0,m1.or)(...U.map((J)=>(0,m1.and)(ZT($,q,J,I.ownProperties),m1._`${Y} = ${J}`)))}ob.checkMissingProp=fA0;function bA0($,q){$.setParams({missingProperty:q},!0),$.error()}ob.reportMissingProp=bA0;function mb($){return $.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:m1._`Object.prototype.hasOwnProperty`})}ob.hasPropFunc=mb;function WT($,q,I){return m1._`${mb($)}.call(${q}, ${I})`}ob.isOwnProperty=WT;function nA0($,q,I,U){let Y=m1._`${q}${(0,m1.getProperty)(I)} !== undefined`;return U?m1._`${Y} && ${WT($,q,I)}`:Y}ob.propertyInData=nA0;function ZT($,q,I,U){let Y=m1._`${q}${(0,m1.getProperty)(I)} === undefined`;return U?(0,m1.or)(Y,(0,m1.not)(WT($,q,I))):Y}ob.noPropertyInData=ZT;function lb($){return $?Object.keys($).filter((q)=>q!=="__proto__"):[]}ob.allSchemaProperties=lb;function iA0($,q){return lb(q).filter((I)=>!(0,VT.alwaysValidSchema)($,q[I]))}ob.schemaProperties=iA0;function pA0({schemaCode:$,data:q,it:{gen:I,topSchemaRef:U,schemaPath:Y,errorPath:J},it:Q},K,z,G){let H=G?m1._`${$}, ${q}, ${U}${Y}`:q,w=[[G9.default.instancePath,(0,m1.strConcat)(G9.default.instancePath,J)],[G9.default.parentData,Q.parentData],[G9.default.parentDataProperty,Q.parentDataProperty],[G9.default.rootData,G9.default.rootData]];if(Q.opts.dynamicRef)w.push([G9.default.dynamicAnchors,G9.default.dynamicAnchors]);let V=m1._`${H}, ${I.object(...w)}`;return z!==m1.nil?m1._`${K}.call(${z}, ${V})`:m1._`${K}(${V})`}ob.callValidateCode=pA0;var cA0=m1._`new RegExp`;function dA0({gen:$,it:{opts:q}},I){let U=q.unicodeRegExp?"u":"",{regExp:Y}=q.code,J=Y(I,U);return $.scopeValue("pattern",{key:J.toString(),ref:J,code:m1._`${Y.code==="new RegExp"?cA0:(0,xA0.useFunc)($,Y)}(${I}, ${U})`})}ob.usePattern=dA0;function mA0($){let{gen:q,data:I,keyword:U,it:Y}=$,J=q.name("valid");if(Y.allErrors){let K=q.let("valid",!0);return Q(()=>q.assign(K,!1)),K}return q.var(J,!0),Q(()=>q.break()),J;function Q(K){let z=q.const("len",m1._`${I}.length`);q.forRange("i",0,z,(G)=>{$.subschema({keyword:U,dataProp:G,dataPropType:VT.Type.Num},J),q.if((0,m1.not)(J),K)})}}ob.validateArray=mA0;function lA0($){let{gen:q,schema:I,keyword:U,it:Y}=$;if(!Array.isArray(I))throw Error("ajv implementation error");if(I.some((z)=>(0,VT.alwaysValidSchema)(Y,z))&&!Y.opts.unevaluated)return;le Line truncated
missingProperty: ${U},
depsCount: ${q},
deps: ${I}}`};var Kj0={keyword:"dependencies",type:"object",schemaType:"object",error:Gp.error,code($){let[q,I]=zj0($);zp($,q),wp($,I)}};function zj0({schema:$}){let q={},I={};for(let U in $){if(U==="__proto__")continue;let Y=Array.isArray($[U])?q:I;Y[U]=$[U]}return[q,I]}function zp($,q=$.schema){let{gen:I,data:U,it:Y}=$;if(Object.keys(q).length===0)return;let J=I.let("missing");for(let Q in q){let K=q[Q];if(K.length===0)continue;let z=(0,rJ.propertyInData)(I,U,Q,Y.opts.ownProperties);if($.setParams({property:Q,depsCount:K.length,deps:K.join(", ")}),Y.allErrors)I.if(z,()=>{for(let w of K)(0,rJ.checkReportMissingProp)($,w)});else I.if(yT._`${z} && (${(0,rJ.checkMissingProp)($,K,J)})`),(0,rJ.reportMissingProp)($,J),I.else()}}Gp.validatePropertyDeps=zp;function wp($,q=$.schema){let{gen:I,data:U,keyword:Y,it:J}=$,Q=I.name("valid");for(let K in q){if((0,Qj0.alwaysValidSchema)(J,q[K]))continue;I.if((0,rJ.propertyInData)(I,U,K,J.opts.ownProperties),()=>{let z=$.subschema({keyword:Y,schemaProp:K},Q);$.mergeValidEvaluated(z,Q)},()=>I.var(Q,!0)),$.ok(Q)}}Gp.validateSchemaDeps=wp;Gp.default=Kj0});var Lp=O((Xp)=>{Object.defineProperty(Xp,"__esModule",{value:!0});var Zp=m0(),Hj0=z1(),Vj0={message:"property name must be valid",params:({params:$})=>Zp._`{propertyName: ${$.propertyName}}`},Wj0={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:Vj0,code($){let{gen:q,schema:I,data:U,it:Y}=$;if((0,Hj0.alwaysValidSchema)(Y,I))return;let J=q.name("valid");q.forIn("key",U,(Q)=>{$.setParams({propertyName:Q}),$.subschema({keyword:"propertyNames",data:Q,dataTypes:["string"],propertyName:Q,compositeRule:!0},J),q.if((0,Zp.not)(J),()=>{if($.error(!0),!Y.allErrors)q.break()})}),$.ok(J)}};Xp.default=Wj0});var uT=O((Dp)=>{Object.defineProperty(Dp,"__esModule",{value:!0});var zH=O$(),b$=m0(),Xj0=s8(),wH=z1(),Lj0={message:"must NOT have additional properties",params:({params:$})=>b$._`{additionalProperty: ${$.additionalProperty}}`},Dj0={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:Lj0,code($){let{gen:q,schema:I,parentSchema:U,data:Y,errsCount:J,it:Q}=$;if(!J)throw Error("ajv implementation error");let{allErrors:K,opts:z}=Q;if(Q.props=!0,z.removeAdditional!=="all"&&(0,wH.alwaysValidSchema)(Q,I))return;let w=(0,zH.allSchemaProperties)(U.properties),G=(0,zH.allSchemaProperties)(U.patternProperties);H(),$.ok(b$._`${J} === ${Xj0.default.errors}`);function H(){q.forIn("key",Y,(D)=>{if(!w.length&&!G.length)X(D);else q.if(V(D),()=>X(D))})}function V(D){let N;if(w.length>8){let E=(0,wH.schemaRefOrVal)(Q,U.properties,"properties");N=(0,zH.isOwnProperty)(q,E,D)}else if(w.length)N=(0,b$.or)(...w.map((E)=>b$._`${D} === ${E}`));else N=b$.nil;if(G.length)N=(0,b$.or)(N,...G.map((E)=>b$._`${(0,zH.usePattern)($,E)}.test(${D})`));return(0,b$.not)(N)}function W(D){q.code(b$._`delete ${Y}[${D}]`)}function X(D){if(z.removeAdditional==="all"||z.removeAdditional&&I===!1){W(D);return}if(I===!1){if($.setParams({additionalProperty:D}),$.error(),!K)q.break();return}if(typeof I=="object"&&!(0,wH.alwaysValidSchema)(Q,I)){let N=q.name("valid");if(z.removeAdditional==="failing")L(D,N,!1),q.if((0,b$.not)(N),()=>{$.reset(),W(D)});else if(L(D,N),!K)q.if((0,b$.not)(N),()=>q.break())}}function L(D,N,E){let T={keyword:"additionalProperties",dataProp:D,dataPropType:wH.Type.Str};if(E===!1)Object.assign(T,{compositeRule:!0,createErrors:!1,allErrors:!1});$.subschema(T,N)}}};Dp.default=Dj0});var Mp=O((Fp)=>{Object.defineProperty(Fp,"__esModule",{value:!0});var Nj0=xJ(),Op=O$(),xT=z1(),Np=uT(),Fj0={keyword:"properties",type:"object",schemaType:"object",code($){let{gen:q,schema:I,parentSchema:U,data:Y,it:J}=$;if(J.opts.removeAdditional==="all"&&U.additionalProperties===void 0)Np.default.code(new Nj0.KeywordCxt(J,Np.default,"additionalProperties"));let Q=(0,Op.allSchemaProperties)(I);for(let H of Q)J.definedProperties.add(H);if(J.opts.unevaluated&&Q.length&&J.props!==!0)J.props=xT.mergeEvaluated.props(q,(0,xT.toHash)(Q),J.props);let K=Q.filter((H)=>!(0,xT.alwaysValidSchema)(J,I[H]));if(K.length===0)return;let z=q.name("valid");for(let H of K){if(w(H))G(H);else{if(q.if((0,Op.propertyInData)(q,Y,H,J.opts.ownProperties)),G(H),!J.allErrors)q.else().var(z,!0);q.endIf()}$.it.definedProperties.add(H),$.ok(z)}function w(H){return J.opts.useDefaults&&!J.compositeRule&&I[H].default!==void 0}function G(H){$.subschema({keyword:"properties",schemaProp:H,dataProp:H},z)}}};Fp.default=Fj0});var gp=O((Ep)=>{Object.defineProperty(Ep,"__esModule",{value:!0});var Ap=O$(),GH=m0(),Pp=z1(),Tp=z1(),Aj0={keyword:"patternProperties",type:"object",schemaType:"object",code($){let{gen:q,schema:I,data:U,parentSchema:Y,it:J}=$,{opts:Q}=J,K=(0,Ap.allSchemaProperties)(I),z=K.filter((L)=>(0,Pp.alwaysValidSchema)(J,I[L]));if(K.length===0||z.length===K.length&&(!J.opts.unevaluated||J.props===!0))return;let w=Q.strictSchema&&!Q.allowMatchingProperties&&Y.properties,G=q.name("valid");if(J.props!==!0&&!(J.props instanceo Line truncated
\v\f\r\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F !"#$٪&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~°·∙√▒─│┼┤┬├┴┐┌└┘β∞φ±½¼≈«»ﻷﻸ��ﻻﻼ� ­ﺂ£¤ﺄ��ﺎﺏﺕﺙ،ﺝﺡﺥ٠١٢٣٤٥٦٧٨٩ﻑ؛ﺱﺵﺹ؟¢ﺀﺁﺃﺅﻊﺋﺍﺑﺓﺗﺛﺟﺣﺧﺩﺫﺭﺯﺳﺷﺻﺿﻁﻅﻋﻏ¦¬÷×ﻉـﻓﻗﻛﻟﻣﻧﻫﻭﻯﻳﺽﻌﻎﻍﻡﹽّﻥﻩﻬﻰﻲﻐﻕﻵﻶﻝﻙﻱ■�`},ibm864:"cp864",csibm864:"cp864",cp865:{type:"_sbcs",chars:"ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø₧ƒáíóúñѪº¿⌐¬½¼¡«¤░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ "},ibm865:"cp865",csibm865:"cp865",cp866:{type:"_sbcs",chars:"АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№¤■ "},ibm866:"cp866",csibm866:"cp866",cp869:{type:"_sbcs",chars:"������Ά�·¬¦‘’Έ―ΉΊΪΌ��ΎΫ©Ώ²³ά£έήίϊΐόύΑΒΓΔΕΖΗ½ΘΙ«»░▒▓│┤ΚΛΜΝ╣║╗╝ΞΟ┐└┴┬├─┼ΠΡ╚╔╩╦╠═╬ΣΤΥΦΧΨΩαβγ┘┌█▄δε▀ζηθικλμνξοπρσςτ΄­±υφχ§ψ΅°¨ωϋΰώ■ "},ibm869:"cp869",csibm869:"cp869",cp922:{type:"_sbcs",chars:"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®‾°±²³´µ·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŠÑÒÓÔÕÖרÙÚÛÜÝŽßàáâãäåæçèéêëìíîïšñòóôõö÷øùúûüýžÿ"},ibm922:"cp922",csibm922:"cp922",cp1046:{type:"_sbcs",chars:"ﺈ×÷ﹱˆ■│─┐┌└┘ﹹﹻﹽﹿﹷﺊﻰﻳﻲﻎﻏﻐﻶﻸﻺﻼ ¤ﺋﺑﺗﺛﺟﺣ،­ﺧﺳ٠١٢٣٤٥٦٧٨٩ﺷ؛ﺻﺿﻊ؟ﻋءآأؤإئابةتثجحخدذرزسشصضطﻇعغﻌﺂﺄﺎﻓـفقكلمنهوىيًٌٍَُِّْﻗﻛﻟﻵﻷﻹﻻﻣﻧﻬﻩ�"},ibm1046:"cp1046",csibm1046:"cp1046",cp1124:{type:"_sbcs",chars:"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ЁЂҐЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђґєѕіїјљњћќ§ўџ"},ibm1124:"cp1124",csibm1124:"cp1124",cp1125:{type:"_sbcs",chars:"АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёҐґЄєІіЇї·√№¤■ "},ibm1125:"cp1125",csibm1125:"cp1125",cp1129:{type:"_sbcs",chars:"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§œ©ª«¬­®¯°±²³Ÿµ·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖרÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ"},ibm1129:"cp1129",csibm1129:"cp1129",cp1133:{type:"_sbcs",chars:"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ກຂຄງຈສຊຍດຕຖທນບປຜຝພຟມຢຣລວຫອຮ���ຯະາຳິີຶືຸູຼັົຽ���ເແໂໃໄ່້໊໋໌ໍໆ�ໜໝ₭����������������໐໑໒໓໔໕໖໗໘໙��¢¬¦�"},ibm1133:"cp1133",csibm1133:"cp1133",cp1161:{type:"_sbcs",chars:"��������������������������������่กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู้๊๋€฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛¢¬¦ "},ibm1161:"cp1161",csibm1161:"cp1161",cp1162:{type:"_sbcs",chars:"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����"},ibm1162:"cp1162",csibm1162:"cp1162",cp1163:{type:"_sbcs",chars:"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥¦§œ©ª«¬­®¯°±²³Ÿµ·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖרÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ"},ibm1163:"cp1163",csiLine truncated
\v\f\r\x0E\x0F\x10ỨỰỲỶỸÝỴ\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~ÀẢÃÁẠẶẬÈẺẼÉẸỆÌỈĨÍỊÒỎÕÓỌỘỜỞỠỚỢÙỦŨ ĂÂÊÔƠƯĐăâêôơưđẶ̀̀̉̃́àảãáạẲằẳẵắẴẮẦẨẪẤỀặầẩẫấậèỂẻẽéẹềểễếệìỉỄẾỒĩíịòỔỏõóọồổỗốộờởỡớợùỖủũúụừửữứựỳỷỹýỵỐ`},georgianacademy:{type:"_sbcs",chars:"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ·¸¹º»¼½¾¿აბგდევზთიკლმნოპჟრსტუფქღყშჩცძწჭხჯჰჱჲჳჴჵჶçèéêëìíîïðñòóôõö÷øùúûüýþÿ"},georgianps:{type:"_sbcs",chars:"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ·¸¹º»¼½¾¿აბგდევზჱთიკლმნჲოპჟრსტჳუფქღყშჩცძწჭხჴჯჰჵæçèéêëìíîïðñòóôõö÷øùúûüýþÿ"},pt154:{type:"_sbcs",chars:"ҖҒӮғ„…ҶҮҲүҠӢҢҚҺҸҗ‘’“”•–—ҳҷҡӣңқһҹ ЎўЈӨҘҰ§Ё©Ә«¬ӯ®Ҝ°ұІіҙө·ё№ә»јҪҫҝАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя"},viscii:{type:"_sbcs",chars:`\x00\x01Ẳ\x03\x04ẴẪ\x07\b
\v\f\r\x0E\x0F\x10\x11\x12\x13Ỷ\x15\x16\x17\x18Ỹ\x1A\x1B\x1C\x1DỴ\x1F !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~ẠẮẰẶẤẦẨẬẼẸẾỀỂỄỆỐỒỔỖỘỢỚỜỞỊỎỌỈỦŨỤỲÕắằặấầẩậẽẹếềểễệốồổỗỠƠộờởịỰỨỪỬơớƯÀÁÂÃẢĂẳẵÈÉÊẺÌÍĨỳĐứÒÓÔạỷừửÙÚỹỵÝỡưàáâãảăữẫèéêẻìíĩỉđựòóôõỏọụùúũủýợỮ`},iso646cn:{type:"_sbcs",chars:`\x00\x01\x02\x03\x04\x05\x06\x07\b
\v\f\r\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F !"#¥%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������`},iso646jp:{type:"_sbcs",chars:`\x00\x01\x02\x03\x04\x05\x06\x07\b
\v\f\r\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[¥]^_\`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������`},hproman8:{type:"_sbcs",chars:"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ÀÂÈÊËÎÏ´ˋˆ¨˜ÙÛ₤¯Ýý°ÇçÑñ¡¿¤£¥§ƒ¢âêôûáéóúàèòùäëöüÅîØÆåíøæÄìÖÜÉïßÔÁÃãÐðÍÌÓÒÕõŠšÚŸÿÞþ·µ¾—¼½ªº«■»±�"},macintosh:{type:"_sbcs",chars:"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ"},ascii:{type:"_sbcs",chars:"��������������������������������������������������������������������������������������������������������������������������������"},tis620:{type:"_sbcs",chars:"���������������������������������กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����"}}});var um=O((z_0)=>{var Rg=J5().Buffer;z_0._dbcs=K5;var a4=-1,ym=-2,A$=-10,B6=-1000,PI=Array(256),DQ=-1;for(LQ=0;LQ<256;LQ++)PI[LQ]=a4;var LQ;function K5($,q){if(this.encodingName=$.encodingName,!$)throw Error("DBCS codec is called without the data.");if(!$.table)throw Error("Encoding '"+this.encodingName+"' has no data.");var I=$.table();this.decodeTables=[],this.decodeTables[0]=PI.slice(0),this.decodeTableSeq=[];for(var U=0;U<I.length;U++)this._addDecodeChunk(I[U]);if(typeof $.gb18030==="function"){this.gb18030=$.gb18030();var Y=this.decodeTables.length;this.decodeTables.push(PI.slice(0));var J=this.decodeTables.length;this.decodeTables.push(PI.slice(0));var Q=this.decodeTables[0];for(var U=129;U<=254;U++){var K=this.decodeTables[B6-Q[U]];for(var z=48;z<=57;z++){if(K[z]===a4)K[z]=B6-Y;else if(K[z]>B6)throw Error("gb18030 decode tables conflict at byte 2");var w=this.decodeTables[B6-K[z]];for(var G=129;G<=254;G++){if(w[G]===a4)w[G]=B6-J;else if(w[G]===B6-J)continue;else if(w[G]>B6)throw Error("gb18030 decode tables conflict at byte 3");var H=this.decodeTables[B6-w[G]];for(var V=48;V<=57;V++)if(H[V]===a4)H[V]=ym}}}}this.defaultCharUnicode=q.defaultCharUnicode,this.encodeTable=[],this.encodeTableSeq=[];var W={};if($.encodeSkipVals)for(var U=0;U<$.encodeSkipVals.length;U++){var X=$.encodeSkipVals[U];if(typeof X==="number")W[X]=!0;else for(var z=X.from;z<=X.to;z++)W[z]=!0}if(this._fillEncodeTable(0,0,W),$.encodeAdd){for(var L in $.encodeAdd)if(Object.prototype.hasOwnProperty.call($.encodeAdd,L))this._setEncodeChar(L.charCodeAt(0),$.encodeAdd[L])}if(this.defCharSB=this.encodeTable[0][q.defaultCharSingleByte.charCodeAt(0)],this.defCharSB===a4)this.defCharSB=this.encodeTable[0]["?"];if(this.defCharSB===a4)this.defCharSB=63}K5.prototype.encoder=QV;K5.prototype.decoder=vg;K5.prototype._getDecodeTrieNode=function($){var q=[];for(;$>0;$>>>=8)q.push($&255);if(q.length==0)q.push(0);var I=this.decodeTables[0];for(var U=q.length-1;U>0;U--){var Y=I[q[U]];if(Y==a4)I[q[U]]=B6-this.decodeTables.length,this.decodeTables.push(I=PI.slice(0));else if(Y<=B6)I=this.decodeTables[B6-Y];else throw Error("Overwrite byte in "+this.encodingName+", addr: "+$.toString(16))}return I};K5.prototype._addDecodeChunk=function($){var q=parseInt($[0],16),I=this._getDecodeTrieNode(q);q=q&255;for(var U=1;U<$.length;U++){var Y=$[U];if(typeof Y==="string")for(var J=0;J<Y.length;){var Q=Y.charCodeAt(J++);if(Q>=55296&&Q<56320){var K=Y.charCodeAt(J++);if(K>=56320&&K<57344)I[q++]=65536+(Q-55296)*1024+(K-56320);else throw Error("Incorrect surrogate pair in "+this.encodingName+" at chunk "+$[0])}else if(Q>4080&&Q<=4095){var z=4095-Q+2,w=[];for(var G=0;G<z;G++)w.push(Y.charCodeAt(J++));I[q++]=A$-this.decodeTableSeq.length,this.decodeTableSeq.push(w)}else I[q++]=Q}else if(typeof Y==="number"){var H=I[q-1]+1;for(var J=0;J<Y;J++)I[q++]=H++}else throw Error("Incorrect type '"+typeof Y+"' given in "+this.encodingName+" at chunk "+$[0])}if(q>255)throw Error("Incorrect chunk in "+this.encodinLine truncated
\x00`,p+=p1(f,2),p+=K.magic,p+=p1(D,2),p+=p1(N,2),p+=p1(h.crc32,4),p+=p1(h.compressedSize,4),p+=p1(h.uncompressedSize,4),p+=p1(w.length,2),p+=p1(E.length,2);var C=QW.LOCAL_FILE_HEADER+p+w+E,n=QW.CENTRAL_FILE_HEADER+p1(t,2)+p+p1(V.length,2)+"\x00\x00\x00\x00"+p1(S,4)+p1(U,4)+w+E+V;return{fileRecord:C,dirRecord:n}},Zf0=function($,q,I,U,Y){var J="",Q=dI.transformTo("string",Y(U));return J=QW.CENTRAL_DIRECTORY_END+"\x00\x00\x00\x00"+p1($,2)+p1($,2)+p1(q,4)+p1(I,4)+p1(Q.length,2)+Q,J},Xf0=function($){var q="";return q=QW.DATA_DESCRIPTOR+p1($.crc32,4)+p1($.compressedSize,4)+p1($.uncompressedSize,4),q};function o$($,q,I,U){lI.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=q,this.zipPlatform=I,this.encodeFileName=U,this.streamFiles=$,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}dI.inherits(o$,lI);o$.prototype.push=function($){var q=$.meta.percent||0,I=this.entriesCount,U=this._sources.length;if(this.accumulate)this.contentBuffer.push($);else this.bytesWritten+=$.data.length,lI.prototype.push.call(this,{data:$.data,meta:{currentFile:this.currentFile,percent:I?(q+100*(I-U-1))/I:100}})};o$.prototype.openedSource=function($){this.currentSourceOffset=this.bytesWritten,this.currentFile=$.file.name;var q=this.streamFiles&&!$.file.dir;if(q){var I=_s($,q,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:I.fileRecord,meta:{percent:0}})}else this.accumulate=!0};o$.prototype.closedSource=function($){this.accumulate=!1;var q=this.streamFiles&&!$.file.dir,I=_s($,q,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(I.dirRecord),q)this.push({data:Xf0($),meta:{percent:100}});else{this.push({data:I.fileRecord,meta:{percent:0}});while(this.contentBuffer.length)this.push(this.contentBuffer.shift())}this.currentFile=null};o$.prototype.flush=function(){var $=this.bytesWritten;for(var q=0;q<this.dirRecords.length;q++)this.push({data:this.dirRecords[q],meta:{percent:100}});var I=this.bytesWritten-$,U=Zf0(this.dirRecords.length,I,$,this.zipComment,this.encodeFileName);this.push({data:U,meta:{percent:100}})};o$.prototype.prepareNextSource=function(){if(this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused)this.previous.pause();else this.previous.resume()};o$.prototype.registerPrevious=function($){this._sources.push($);var q=this;return $.on("data",function(I){q.processChunk(I)}),$.on("end",function(){if(q.closedSource(q.previous.streamInfo),q._sources.length)q.prepareNextSource();else q.end()}),$.on("error",function(I){q.error(I)}),this};o$.prototype.resume=function(){if(!lI.prototype.resume.call(this))return!1;if(!this.previous&&this._sources.length)return this.prepareNextSource(),!0;if(!this.previous&&!this._sources.length&&!this.generatedError)return this.end(),!0};o$.prototype.error=function($){var q=this._sources;if(!lI.prototype.error.call(this,$))return!1;for(var I=0;I<q.length;I++)try{q[I].error($)}catch(U){}return!0};o$.prototype.lock=function(){lI.prototype.lock.call(this);var $=this._sources;for(var q=0;q<$.length;q++)$[q].lock()};hs.exports=o$});var ys=O((Nf0)=>{var Lf0=OB(),Df0=Ss(),Of0=function($,q){var I=$||q,U=Lf0[I];if(!U)throw Error(I+" is not a valid compression method !");return U};Nf0.generateWorker=function($,q,I){var U=new Df0(q.streamFiles,I,q.platform,q.encodeFileName),Y=0;try{$.forEach(function(J,Q){Y++;var K=Of0(Q.options.compression,q.compression),z=Q.options.compressionOptions||q.compressionOptions||{},w=Q.dir,G=Q.date;Q._compressWorker(K,z).withStreamInfo("file",{name:J,dir:w,date:G,comment:Q.comment||"",unixPermissions:Q.unixPermissions,dosPermissions:Q.dosPermissions}).pipe(U)}),U.entriesCount=Y}catch(J){U.error(J)}return U}});var xs=O((iP1,us)=>{var Mf0=w4(),KW=U$();function U2($,q){KW.call(this,"Nodejs stream input adapter for "+$),this._upstreamEnded=!1,this._bindStream(q)}Mf0.inherits(U2,KW);U2.prototype._bindStream=function($){var q=this;this._stream=$,$.pause(),$.on("data",function(I){q.push({data:I,meta:{percent:0}})}).on("error",function(I){if(q.isPaused)this.generatedError=I;else q.error(I)}).on("end",function(){if(q.isPaused)q._upstreamEnded=!0;else q.end()})};U2.prototype.pause=function(){if(!KW.prototype.pause.call(this))return!1;return this._stream.pause(),!0};U2.prototype.resume=function(){if(!KW.prototype.resume.call(this))return!1;if(this._upstreamEnded)this.end();else this._stream.resume();return!0};us.exports=U2});var ms=O((pP1,ls)=>{var Af0=yI(),Y2=w4(),bs=U$(),Pf0=Tj(),is=Ej(),ks=iV(),Tf0=ft(),Ef0=ys(),fs=uQ(),gf0=xs(),ps=function($,q,I){var U=Y2.getTypeOf(q),Y,J=Y2.extend(I||{},is);if(J.date=J.date||new Date,J.compression!==null)J.compression=J.compression.toUpperCase();if(typeof J.unixPermissions==="string")J.unixPermissions=parseInt(J.unixPermissions,8);if(J.unixPermissions&&J.unixPermissions&16384)J.dir=!0;if(J.dosPermissions&&J.dosPermissions&16)J.dir=!0;if(J. Line truncated
`)}openNode($,q){let I=this.tos,U=this._xml;if(I&&this.open)U.push(">");this._stack.push($),U.push("<"),U.push($),IR(U,q),this.leaf=!0,this.open=!0}addAttribute($,q){if(!this.open)throw Error("Cannot write attributes to node if it is not open");if(q!==void 0)x00(this._xml,$,q)}addAttributes($){if(!this.open)throw Error("Cannot write attributes to node if it is not open");IR(this._xml,$)}writeText($){let q=this._xml;if(this.open)q.push(">"),this.open=!1;this.leaf=!1,q.push(u00.xmlEncode($.toString()))}writeXml($){if(this.open)this._xml.push(">"),this.open=!1;this.leaf=!1,this._xml.push($)}closeNode(){let $=this._stack.pop(),q=this._xml;if(this.leaf)q.push("/>");else q.push("</"),q.push($),q.push(">");this.open=!1,this.leaf=!1}leafNode($,q,I){if(this.openNode($,q),I!==void 0)this.writeText(I);this.closeNode()}closeAll(){while(this._stack.length)this.closeNode()}addRollback(){return this._rollbacks.push({xml:this._xml.length,stack:this._stack.length,leaf:this.leaf,open:this.open}),this.cursor}commit(){this._rollbacks.pop()}rollback(){let $=this._rollbacks.pop();if(this._xml.length>$.xml)this._xml.splice($.xml,this._xml.length-$.xml);if(this._stack.length>$.stack)this._stack.splice($.stack,this._stack.length-$.stack);this.leaf=$.leaf,this.open=$.open}get xml(){return this.closeAll(),this._xml.join("")}}UR.StdDocAttributes={version:"1.0",encoding:"UTF-8",standalone:"yes"};k00.exports=UR});var YR=O((Di0)=>{var f00=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");function Li0($){if(typeof $==="string")return $;if(f00)return f00.decode($);return $.toString()}Di0.bufferToString=Li0});var c00=O((b00)=>{Object.defineProperty(b00,"__esModule",{value:!0});b00.CHAR=`
\r -퟿-�\uD800\uDC00-\uDBFF\uDFFF`;b00.S=` \r
`;b00.NAME_START_CHAR=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�\uD800\uDC00-\uDB7F\uDFFF";b00.NAME_CHAR="-"+b00.NAME_START_CHAR+".0-9·̀-ͯ‿-⁀";b00.CHAR_RE=new RegExp("^["+b00.CHAR+"]$","u");b00.S_RE=new RegExp("^["+b00.S+"]+$","u");b00.NAME_START_CHAR_RE=new RegExp("^["+b00.NAME_START_CHAR+"]$","u");b00.NAME_CHAR_RE=new RegExp("^["+b00.NAME_CHAR+"]$","u");b00.NAME_RE=new RegExp("^["+b00.NAME_START_CHAR+"]["+b00.NAME_CHAR+"]*$","u");b00.NMTOKEN_RE=new RegExp("^["+b00.NAME_CHAR+"]+$","u");var JR=9,QR=10,KR=13,zR=32;b00.S_LIST=[zR,QR,KR,JR];function Ni0($){return $>=zR&&$<=55295||$===QR||$===KR||$===JR||$>=57344&&$<=65533||$>=65536&&$<=1114111}b00.isChar=Ni0;function Fi0($){return $===zR||$===QR||$===KR||$===JR}b00.isS=Fi0;function n00($){return $>=65&&$<=90||$>=97&&$<=122||$===58||$===95||$===8204||$===8205||$>=192&&$<=214||$>=216&&$<=246||$>=248&&$<=767||$>=880&&$<=893||$>=895&&$<=8191||$>=8304&&$<=8591||$>=11264&&$<=12271||$>=12289&&$<=55295||$>=63744&&$<=64975||$>=65008&&$<=65533||$>=65536&&$<=983039}b00.isNameStartChar=n00;function Mi0($){return n00($)||$>=48&&$<=57||$===45||$===46||$===183||$>=768&&$<=879||$>=8255&&$<=8256}b00.isNameChar=Mi0});var $10=O((t00)=>{Object.defineProperty(t00,"__esModule",{value:!0});t00.CHAR="\x01-퟿-�\uD800\uDC00-\uDBFF\uDFFF";t00.RESTRICTED_CHAR="\x01-\b\v\f\x0E-\x1F-„†-Ÿ";t00.S=` \r
`;t00.NAME_START_CHAR=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�\uD800\uDC00-\uDB7F\uDFFF";t00.NAME_CHAR="-"+t00.NAME_START_CHAR+".0-9·̀-ͯ‿-⁀";t00.CHAR_RE=new RegExp("^["+t00.CHAR+"]$","u");t00.RESTRICTED_CHAR_RE=new RegExp("^["+t00.RESTRICTED_CHAR+"]$","u");t00.S_RE=new RegExp("^["+t00.S+"]+$","u");t00.NAME_START_CHAR_RE=new RegExp("^["+t00.NAME_START_CHAR+"]$","u");t00.NAME_CHAR_RE=new RegExp("^["+t00.NAME_CHAR+"]$","u");t00.NAME_RE=new RegExp("^["+t00.NAME_START_CHAR+"]["+t00.NAME_CHAR+"]*$","u");t00.NMTOKEN_RE=new RegExp("^["+t00.NAME_CHAR+"]+$","u");var d00=9,l00=10,m00=13,o00=32;t00.S_LIST=[o00,l00,m00,d00];function hi0($){return $>=1&&$<=55295||$>=57344&&$<=65533||$>=65536&&$<=1114111}t00.isChar=hi0;function Si0($){return $>=1&&$<=8||$===11||$===12||$>=14&&$<=31||$>=127&&$<=132||$>=134&&$<=159}t00.isRestrictedChar=Si0;function yi0($){return $===9||$===10||$===13||$>31&&$<127||$===133||$>159&&$<=55295||$>=57344&&$<=65533||$>=65536&&$<=1114111}t00.isCharAndNotRestricted=yi0;function ui0($){return $===o00||$===l00||$===m00||$===d00}t00.isS=ui0;function r00($){return $>=65&&$<=90||$>=97&&$<=122||$===58||$===95||$===8204||$===8205||$>=192&&$<=214||$>=216&&$<=246||$>=248&&$<=767||$>=880&&$<=893||$>=895&&$<=8191||$>=8304&&$<=8591||$>=11264&&$<=12271||$>=12289&&$<=55295||$>=63744&&$<=64975||$>=65008&&$<=65533||$>=65536&&$<=983039}t00.isNameStartChar=r00;function xi0($){return r00($)||$>=48&&$<=57||$===45||$===46||$===183||$>=768&&$<=879||$>=8255&&$<=8256}t00.isNameChar=xi0});var U10=O((I10)=>{Object.defineProperty(I10,"__esModule",{value:!0});I10.NC_NAME_START_CHAR="A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�\uD800\uDC00-\uDB7F\uDFFF";I10.NC_NAME_CHAR="-"+I10.NC_NAME_START_CHAR+".0-9·̀-ͯ‿-⁀";I10.NC_NAME_START_CHAR_RE=new RegExp("^["+I10.NC_NAME_START_CHAR+"]$","u");I10.NC_NAME_CHAR_RE=new RegExp("^["+I10.NC_NAME_CHAR+"]$","u");I10.NC_NAME_RE=new RegExp("^["+I10.NC_NAME_START_CHAR+"]["+I10.NC_NAME_CHAR+"]*$","u");function q10($){return $>=65&&$<=90||$===95||$>=97&&$<=122||$>=192&&$<=214||$>=216&&$<=246||$>=248&&$<=767||$>=880&&$<=893||$>=895&&$<=8191||$>=8204&&$<=8205||$>=8304&&$<=8591||$>=11264&&$<=12271||$>=12289&&$<=55295||$>=63744&&$<=64975||$>=65008&&$<=65533||$>=65536&&$<=983039}I10.isNCNameStartChar=q10;function si0($){return q10($)||($===45||$===46||$>=48&&$<=57||$===183||$>=768&&$<=879||$>=8255&&$<=8256)}I10.isNCNameChar=si0});var E10=O((T10)=>{Object.defineProperty(T10,"__esModule",{value:!0});var UU=c00(),Yp0=$10(),AR=U10(),d6=UU.isS,Jp0=UU.isChar,D2=UU.isNameStartChar,Y10=UU.isNameChar,O10=UU.S_LIST,Qp0=UU.NAME_RE,Kp0=Yp0.isChar,zp0=AR.isNCNameStartChar,wp0=AR.isNCNameChar,Gp0=AR.NC_NAME_RE,uW="http://www.w3.org/XML/1998/namespace",IU="http://www.w3.org/2000/xmlns/",Hp0={__proto__:null,xml:uW,xmlns:IU},Vp0={__proto__:null,amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},Y4=-1,v8=-2,J10=0,Wp0=1,GR=2,Zp0=3,eI=4,Xp0=5,Lp0=6,Dp0=7,HR=8,Op0=9,Np0=10,Fp0=11,Mp0=12,v6=13,CW=14,VR=15,Ap0=16,WR=17,Pp0=18,Tp0=19,ZR=20,Ep0=21,gp0=22,jp0=23,Q10=24,XR=25,_W=26,K10=27,Bp0=28,Rp0=29,z10=30,vp0=31,Cp0=32,Q3=33,_p0=34,LR=35,O2=36,DR=37,hp0=38,w10=39,G10=40,Sp0=41,H10=42,yp0=43,up0=44,OR=9,t$=10,NR=13,V10=32,W10=33,N10=34,N2=38,F10=39,hW=45,SW=47,xp0=59,_9=60,$U=61,h4=62,q6=63,M10=91,qU=93,Z10=133,X10=8232,yW=($)=>$===N10||$===F10,A10=[N10,F10],kp0=[...A10,M10,h4],fp0=[...A10,_9,qU],np0=[$U,q6,...O10],bp0=[...O10,h4,N2,_9];function MR($,q,I){switch(q){case"xml":if(I!==uW)$.fail(`xml prefix must be bound to ${uW}.`);break;case"xmlns":if(I!==IU)$.fail(`xmlns prefix must be bound to ${IU}.`);break;default:}switch(I){case IU:$.fail(q===""?`the default namespace may not be set to ${I}.`:`may not assign a prefix (even "xmlns") to the URI ${IU}.`);break;case uW:switch(q){case"xml":break;case"":$.fail(`the default namespace may not be set to ${I}.`);break;default:$.fail("may not assign the xml namespace to another prefix.")}break;default:}}function ip0($,q){for(let I of Object.keys(q))MR($,I,q[I])}var pp0=($)=>Gp0.test($),cp0=($)=>Qp0.test($),K3=0,L10=1,FR=2;T10.EVENTS=["xmldecl","text","processinginstruction","doctype","comment","opentagstart","attribute","opentag","closetag","cdata","error","end","ready"];var D10={xmldecl:"xmldeclHandler",text:"textHandler",processinginstruction:"piHandler",doctype:"doctypeHandler",comment:"commentHandler",opentagstart:"openTagStartHandler",attribute:"attributeHandler",opentag:"openTagHandler",closetag:"closeTagHandler",cdata:"cdataHandler",error:"errorHandler",end:"endHandler",ready:"readyHandler"};class P10{constructor($){this.opt=$!==null&&$!==void 0?$:{},this.fragmentOpt=!!this.opt.fragment;let q=this.xmlnsOpt=!!this.opt.xmlns;if(this.trackPosition=this.opt.position!==!1,this.fileName=this.opt.fileName,q){this.nameStartCheck=zp0,this.nameCheck=wp0,this.isName=pp0,this.processAttribs=this.processAttribsNS,this.pushAttrib=this.pushAttribNS,this.ns=Object.assign({__proto__:null},Hp0);let I=this.opt.additionalNamesp Line truncated
`,q=this.i}}captureToChar($){let{i:q}=this,{chunk:I}=this;while(!0){let U=this.getCode();switch(U){case v8:this.text+=`${I.slice(q,this.prevI)}
`,q=this.i,U=t$;break;case Y4:return this.text+=I.slice(q),!1;default:}if(U===$)return this.text+=I.slice(q,this.prevI),!0}}captureNameChars(){let{chunk:$,i:q}=this;while(!0){let I=this.getCode();if(I===Y4)return this.name+=$.slice(q),Y4;if(!Y10(I))return this.name+=$.slice(q,this.prevI),I===v8?t$:I}}skipSpaces(){while(!0){let $=this.getCodeNorm();if($===Y4||!d6($))return $}}setXMLVersion($){if(this.currentXMLVersion=$,$==="1.0")this.isChar=Jp0,this.getCode=this.getCode10;else this.isChar=Kp0,this.getCode=this.getCode11}sBegin(){if(this.chunk.charCodeAt(0)===65279)this.i++,this.column++;this.state=Wp0}sBeginWhitespace(){let $=this.i,q=this.skipSpaces();if(this.prevI!==$)this.xmlDeclPossible=!1;switch(q){case _9:if(this.state=VR,this.text.length!==0)throw Error("no-empty text at start");break;case Y4:break;default:this.unget(),this.state=v6,this.xmlDeclPossible=!1}}sDoctype(){var $;let q=this.captureTo(kp0);switch(q){case h4:{($=this.doctypeHandler)===null||$===void 0||$.call(this,this.text),this.text="",this.state=v6,this.doctype=!0;break}case Y4:break;default:if(this.text+=String.fromCodePoint(q),q===M10)this.state=eI;else if(yW(q))this.state=Zp0,this.q=q}}sDoctypeQuote(){let $=this.q;if(this.captureToChar($))this.text+=String.fromCodePoint($),this.q=null,this.state=GR}sDTD(){let $=this.captureTo(fp0);if($===Y4)return;if(this.text+=String.fromCodePoint($),$===qU)this.state=GR;else if($===_9)this.state=Lp0;else if(yW($))this.state=Xp0,this.q=$}sDTDQuoted(){let $=this.q;if(this.captureToChar($))this.text+=String.fromCodePoint($),this.state=eI,this.q=null}sDTDOpenWaka(){let $=this.getCodeNorm();switch(this.text+=String.fromCodePoint($),$){case W10:this.state=Dp0,this.openWakaBang="";break;case q6:this.state=Fp0;break;default:this.state=eI}}sDTDOpenWakaBang(){let $=String.fromCodePoint(this.getCodeNorm()),q=this.openWakaBang+=$;if(this.text+=$,q!=="-")this.state=q==="--"?HR:eI,this.openWakaBang=""}sDTDComment(){if(this.captureToChar(hW))this.text+="-",this.state=Op0}sDTDCommentEnding(){let $=this.getCodeNorm();this.text+=String.fromCodePoint($),this.state=$===hW?Np0:HR}sDTDCommentEnded(){let $=this.getCodeNorm();if(this.text+=String.fromCodePoint($),$===h4)this.state=eI;else this.fail("malformed comment."),this.state=HR}sDTDPI(){if(this.captureToChar(q6))this.text+="?",this.state=Mp0}sDTDPIEnding(){let $=this.getCodeNorm();if(this.text+=String.fromCodePoint($),$===h4)this.state=eI}sText(){if(this.tags.length!==0)this.handleTextInRoot();else this.handleTextOutsideRoot()}sEntity(){let{i:$}=this,{chunk:q}=this;$:while(!0)switch(this.getCode()){case v8:this.entity+=`${q.slice($,this.prevI)}
`,$=this.i;break;case xp0:{let{entityReturnState:I}=this,U=this.entity+q.slice($,this.prevI);this.state=I;let Y;if(U==="")this.fail("empty entity name."),Y="&;";else Y=this.parseEntity(U),this.entity="";if(I!==v6||this.textHandler!==void 0)this.text+=Y;break $}case Y4:this.entity+=q.slice($);break $;default:}}sOpenWaka(){let $=this.getCode();if(D2($))this.state=_p0,this.unget(),this.xmlDeclPossible=!1;else switch($){case SW:this.state=yp0,this.xmlDeclPossible=!1;break;case W10:this.state=Ap0,this.openWakaBang="",this.xmlDeclPossible=!1;break;case q6:this.state=jp0;break;default:this.fail("disallowed character in tag name"),this.state=v6,this.xmlDeclPossible=!1}}sOpenWakaBang(){switch(this.openWakaBang+=String.fromCodePoint(this.getCodeNorm()),this.openWakaBang){case"[CDATA[":if(!this.sawRoot&&!this.reportedTextBeforeRoot)this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0;if(this.closedRoot&&!this.reportedTextAfterRoot)this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0;this.state=ZR,this.openWakaBang="";break;case"--":this.state=WR,this.openWakaBang="";break;case"DOCTYPE":if(this.state=GR,this.doctype||this.sawRoot)this.fail("inappropriately located doctype declaration.");this.openWakaBang="";break;default:if(this.openWakaBang.length>=7)this.fail("incorrect syntax.")}}sComment(){if(this.captureToChar(hW))this.state=Pp0}sCommentEnding(){var $;let q=this.getCodeNorm();if(q===hW)this.state=Tp0,($=this.commentHandler)===null||$===void 0||$.call(this,this.text),this.text="";else this.text+=`-${String.fromCodePoint(q)}`,this.state=WR}sCommentEnded(){let $=this.getCodeNorm();if($!==h4)this.fail("malformed comment."),this.text+=`--${String.fromCodePoint($)}`,this.state=WR;else this.state=v6}sCData(){if(this.captureToChar(qU))this.state=Ep0}sCDataEnding(){let $=this.getCodeNorm();if($===qU)this.state=gp0;else this.text+=`]${String.fromCodePoint($)}`,this.state=ZR}sCDataEnding2(){var $;let q=this.getCodeNorm();switch(q){case h4:{($=this.cdataHandler)===null||$===void 0||$.call(this,this.text),this.text="",this.state=v6;break}case qU:this.text+="]";break;default:this.text+=`]]${String.fromCodePoint(q)}`,this.state=ZR}}sPIFirstChar(){let $=this.getCodeNorm();if(this.nameStartCheck($))this.piTarget+=String.fromCodePoint($),this.state=Q10;else if($===q6||d6($))this.fail("processing instruction without a target."),this.state=$===q6?_W:XR;else this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint($),this.state=Q10}sPIRest(){let{chunk:$,i:q}=this;while(!0){let I=this.getCodeNorm();if(I===Y4){this.piTarget+=$.slice(q);return}if(!this.nameCheck(I)){this.piTarget+=$.slice(q,this.prevI);let U=I===q6;if(U||d6(I))if(this.piTarget==="xml"){if(!this.xmlDeclPossible)this.fail("an XML declaration must be at the start of the document.");this.state=U?Q3:K10}else this.state=U?_W:XR;else this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(I);break}}}sPIBody(){if(this.text.length===0){let $=this.getCodeNorm();if($===q6)this.state=_W;else if(!d6($))this.text=String.fromCodePoint($)}else if(this.captureToChar(q6))this.state=_W}sPIEnding(){var $;let q=this.getCodeNorm();if(q===h4){let{piTarget:I}=this;if(I.toLowerCase()==="xml")this.fail("the XML declaration must appear at the start of the document.");($=this.piHandler)===null||$===void 0||$.call(this,{target:I,body:this.text}),this.piTarget=this.text="",this.state=v6}else if(q===q6)this.text+="?";else this.text+=`?${String.fromCodePoint(q)}`,this.state=XR;this.xmlDeclPossible=!1}sXMLDeclNameStart(){let $=this.skipSpaces();if($===q6){this.state=Q3;return}if($!==Y4)this.state=Bp0,this.name=String.fromCodePoint($)}sXMLDeclName(){let $=this.captureTo(np0);if($===q6){this.state=Q3,this.name+=this.text,this.text="",this.fail("XML declaration is incomplete.");return}if(!(d6($)||$===$U))return;if(this.name+=this.text,this.text="",!this.xmlDeclExpects.includes(this.name))switch(this.name.length){case 0:this.fail("did not expect any more name/value pairs.");break;case 1:this.fail(`expected the name ${this.xmlDeclExpects[0]}.`);break;default:this.fail(`expected one of ${this.xmlDeclExpects.join(", ")}`)}this.state=$===$U?z10:Rp0}sXMLDeclEq(){let $=this.getCodeNorm();if($===q6){this.state=Q3,this.fail("XML declaration is incomplete.");return}if(d6($))return;if($!==$U)this.fail("value required.");this.state=z10}sXMLDeclValueStart(){let $=this.getCodeNorm();if($===q6){this.state=Q3,this.fail("XML declaration is incomplete.");return}if(d6($))return;if(!yW($))this.fail("value must be quoted."),this.q=V10;else this.q=$;this.state=vp0}sXMLDeclValue(){let $=this.captureTo([this.q,q6]);if($===q6){this.state=Q3,this.text="",this.fail("XML declaration is incomplete.");return}if($===Y4)return;let q=this.text;switch(this.text="",this.name){case"version":{this.xmlDeclExpects=["encoding","standalone"];let I=q;if(this.xmlDecl.version=I,!/^1\.[0-9]+$/.test(I))this.fail("ver Line truncated
`;$=this.i,q=K3;break;case Y4:if(U!==void 0)this.text+=I.slice($);break $;default:q=K3}this.forbiddenState=q}handleTextOutsideRoot(){let{i:$}=this,{chunk:q,textHandler:I}=this,U=!1;$:while(!0){let Y=this.getCode();switch(Y){case _9:{if(this.state=VR,I!==void 0){let{text:J}=this,Q=q.slice($,this.prevI);if(J.length!==0)I(J+Q),this.text="";else if(Q.length!==0)I(Q)}break $}case N2:if(this.state=CW,this.entityReturnState=v6,I!==void 0)this.text+=q.slice($,this.prevI);U=!0;break $;case v8:if(I!==void 0)this.text+=`${q.slice($,this.prevI)}
`;$=this.i;break;case Y4:if(I!==void 0)this.text+=q.slice($);break $;default:if(!d6(Y))U=!0}}if(!U)return;if(!this.sawRoot&&!this.reportedTextBeforeRoot)this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0;if(this.closedRoot&&!this.reportedTextAfterRoot)this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0}pushAttribNS($,q){var I;let{prefix:U,local:Y}=this.qname($),J={name:$,prefix:U,local:Y,value:q};if(this.attribList.push(J),(I=this.attributeHandler)===null||I===void 0||I.call(this,J),U==="xmlns"){let Q=q.trim();if(this.currentXMLVersion==="1.0"&&Q==="")this.fail("invalid attempt to undefine prefix in XML 1.0");this.topNS[Y]=Q,MR(this,Y,Q)}else if($==="xmlns"){let Q=q.trim();this.topNS[""]=Q,MR(this,"",Q)}}pushAttribPlain($,q){var I;let U={name:$,value:q};this.attribList.push(U),(I=this.attributeHandler)===null||I===void 0||I.call(this,U)}end(){var $,q;if(!this.sawRoot)this.fail("document must contain a root element.");let{tags:I}=this;while(I.length>0){let Y=I.pop();this.fail(`unclosed tag: ${Y.name}`)}if(this.state!==J10&&this.state!==v6)this.fail("unexpected end.");let{text:U}=this;if(U.length!==0)($=this.textHandler)===null||$===void 0||$.call(this,U),this.text="";return this._closed=!0,(q=this.endHandler)===null||q===void 0||q.call(this),this._init(),this}resolve($){var q,I;let U=this.topNS[$];if(U!==void 0)return U;let{tags:Y}=this;for(let J=Y.length-1;J>=0;J--)if(U=Y[J].ns[$],U!==void 0)return U;if(U=this.ns[$],U!==void 0)return U;return(I=(q=this.opt).resolvePrefix)===null||I===void 0?void 0:I.call(q,$)}qname($){let q=$.indexOf(":");if(q===-1)return{prefix:"",local:$};let I=$.slice(q+1),U=$.slice(0,q);if(U===""||I===""||I.includes(":"))this.fail(`malformed name: ${$}.`);return{prefix:U,local:I}}processAttribsNS(){var $;let{attribList:q}=this,I=this.tag;{let{prefix:J,local:Q}=this.qname(I.name);I.prefix=J,I.local=Q;let K=I.uri=($=this.resolve(J))!==null&&$!==void 0?$:"";if(J!==""){if(J==="xmlns")this.fail('tags may not have "xmlns" as prefix.');if(K==="")this.fail(`unbound namespace prefix: ${JSON.stringify(J)}.`),I.uri=J}}if(q.length===0)return;let{attributes:U}=I,Y=new Set;for(let J of q){let{name:Q,prefix:K,local:z}=J,w,G;if(K==="")w=Q==="xmlns"?IU:"",G=Q;else{if(w=this.resolve(K),w===void 0)this.fail(`unbound namespace prefix: ${JSON.stringify(K)}.`),w=K;G=`{${w}}${z}`}if(Y.has(G))this.fail(`duplicate attribute: ${G}.`);Y.add(G),J.uri=w,U[Q]=J}this.attribList=[]}processAttribsPlain(){let{attribList:$}=this,q=this.tag.attributes;for(let{name:I,value:U}of $){if(q[I]!==void 0)this.fail(`duplicate attribute: ${I}.`);q[I]=U}this.attribList=[]}openTag(){var $;this.processAttribs();let{tags:q}=this,I=this.tag;I.isSelfClosing=!1,($=this.openTagHandler)===null||$===void 0||$.call(this,I),q.push(I),this.state=v6,this.name=""}openSelfClosingTag(){var $,q,I;this.processAttribs();let{tags:U}=this,Y=this.tag;if(Y.isSelfClosing=!0,($=this.openTagHandler)===null||$===void 0||$.call(this,Y),(q=this.closeTagHandler)===null||q===void 0||q.call(this,Y),(this.tag=(I=U[U.length-1])!==null&&I!==void 0?I:null)===null)this.closedRoot=!0;this.state=v6,this.name=""}closeTag(){let{tags:$,name:q}=this;if(this.state=v6,this.name="",q===""){this.fail("weird empty close tag."),this.text+="</>";return}let I=this.closeTagHandler,U=$.length;while(U-- >0){let Y=this.tag=$.pop();if(this.topNS=Y.ns,I===null||I===void 0||I(Y),Y.name===q)break;this.fail("unexpected close tag.")}if(U===0)this.closedRoot=!0;else if(U<0)this.fail(`unmatched closing tag: ${q}.`),this.text+=`</${q}>`}parseEntity($){if($[0]!=="#"){let I=this.ENTITIES[$];if(I!==void 0)return I;return this.fail(this.isName($)?"undefined entity.":"disallowed character in entity name."),`&${$};`}let q=NaN;if($[1]==="x"&&/^#x[0-9a-f]+$/i.test($))q=parseInt($.slice(2),16);else if(/^#[0-9]+$/.test($))q=parseInt($.slice(1),10);if(!this.isChar(q))return this.fail("malformed character entity."),`&${$};`;return String.fromCodePoint(q)}}T10.SaxesParser=P10});var F2=O((gT1,g10)=>{var{SaxesParser:mp0}=E10(),{PassThrough:op0}=X6(),{bufferToString:rp0}=YR();g10.exports=async function*($){if($.pipe&&!$[Symbol.asyncIterator])$=$.pipe(new op0);let q=new mp0,I;q.on("error",(Y)=>{I=Y});let U=[];q.on("opentag",(Y)=>U.push({eventType:"opentag",value:Y})),q.on("text",(Y)=>U.push({eventType:"text",value:Y})),q.on("closetag",(Y)=>U.push({eventType:"closetag",value:Y}));for await(let Y of $){if(q.write(rp0(Y)),I)throw I;yield U,U=[]}}});var Z0=O((jT1,j10)=>{var tp0=F2(),ap0=$6();class YU{prepare(){}render(){}parseOpen($){}parseText($){}parseClose($){}reconcile($,q){}reset(){if(this.model=null,this.map)Object.values(this.map).forEach(($)=>{if($ instanceof YU)$.reset();else if($.xform)$.xform.reset()})}mergeModel($){this.model=Object.assign(this.model||{},$)}async parse($){for await(let q of $)for(let{eventType:I,value:U}of q)if(I==="opentag")this.parseOpen(U);else if(I==="text")this.parseText(U);else if(I==="closetag"){if(!this.parseClose(U.name))return thLine truncated
<a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme"> <a:themeElements> <a:clrScheme name="Office"> <a:dk1> <a:sysClr val="windowText" lastClr="000000"/> </a:dk1> <a:lt1> <a:sysClr val="window" lastClr="FFFFFF"/> </a:lt1> <a:dk2> <a:srgbClr val="1F497D"/> </a:dk2> <a:lt2> <a:srgbClr val="EEECE1"/> </a:lt2> <a:accent1> <a:srgbClr val="4F81BD"/> </a:accent1> <a:accent2> <a:srgbClr val="C0504D"/> </a:accent2> <a:accent3> <a:srgbClr val="9BBB59"/> </a:accent3> <a:accent4> <a:srgbClr val="8064A2"/> </a:accent4> <a:accent5> <a:srgbClr val="4BACC6"/> </a:accent5> <a:accent6> <a:srgbClr val="F79646"/> </a:accent6> <a:hlink> <a:srgbClr val="0000FF"/> </a:hlink> <a:folHlink> <a:srgbClr val="800080"/> </a:folHlink> </a:clrScheme> <a:fontScheme name="Office"> <a:majorFont> <a:latin typeface="Cambria"/> <a:ea typeface=""/> <a:cs typeface=""/> <a:font script="Jpan" typeface="MS Pゴシック"/> <a:font script="Hang" typeface="맑은 고딕"/> <a:font script="Hans" typeface="宋体"/> <a:font script="Hant" typeface="新細明體"/> <a:font script="Arab" typeface="Times New Roman"/> <a:font script="Hebr" typeface="Times New Roman"/> <a:font script="Thai" typeface="Tahoma"/> <a:font script="Ethi" typeface="Nyala"/> <a:font script="Beng" typeface="Vrinda"/> <a:font script="Gujr" typeface="Shruti"/> <a:font script="Khmr" typeface="MoolBoran"/> <a:font script="Knda" typeface="Tunga"/> <a:font script="Guru" typeface="Raavi"/> <a:font script="Cans" typeface="Euphemia"/> <a:font script="Cher" typeface="Plantagenet Cherokee"/> <a:font script="Yiii" typeface="Microsoft Yi Baiti"/> <a:font script="Tibt" typeface="Microsoft Himalaya"/> <a:font script="Thaa" typeface="MV Boli"/> <a:font script="Deva" typeface="Mangal"/> <a:font script="Telu" typeface="Gautami"/> <a:font script="Taml" typeface="Latha"/> <a:font script="Syrc" typeface="Estrangelo Edessa"/> <a:font script="Orya" typeface="Kalinga"/> <a:font script="Mlym" typeface="Kartika"/> <a:font script="Laoo" typeface="DokChampa"/> <a:font script="Sinh" typeface="Iskoola Pota"/> <a:font script="Mong" typeface="Mongolian Baiti"/> <a:font script="Viet" typeface="Times New Roman"/> <a:font script="Uigh" typeface="Microsoft Uighur"/> <a:font script="Geor" typeface="Sylfaen"/> </a:majorFont> <a:minorFont> <a:latin typeface="Calibri"/> <a:ea typeface=""/> <a:cs typeface=""/> <a:font script="Jpan" typeface="MS Pゴシック"/> <a:font script="Hang" typeface="맑은 고딕"/> <a:font script="Hans" typeface="宋体"/> <a:font script="Hant" typeface="新細明體"/> <a:font script="Arab" typeface="Arial"/> <a:font script="Hebr" typeface="Arial"/> <a:font script="Thai" typeface="Tahoma"/> <a:font script="Ethi" typeface="Nyala"/> <a:font script="Beng" typeface="Vrinda"/> <a:font script="Gujr" typeface="Shruti"/> <a:font script="Khmr" typeface="DaunPenh"/> <a:font script="Knda" typeface="Tunga"/> <a:font script="Guru" typeface="Raavi"/> <a:font script="Cans" typeface="Euphemia"/> <a:font script="Cher" typeface="Plantagenet Cherokee"/> <a:font script="Yiii" typeface="Microsoft Yi Baiti"/> <a:font script="Tibt" typeface="Microsoft Himalaya"/> <a:font script="Thaa" typeface="MV Boli"/> <a:font script="Deva" typeface="Mangal"/> <a:font script="Telu" typeface="Gautami"/> <a:font script="Taml" typeface="Latha"/> <a:font script="Syrc" typeface="Estrangelo Edessa"/> <a:font script="Orya" typeface="Kalinga"/> <a:font script="Mlym" typeface="Kartika"/> <a:font script="Laoo" typeface="DokChampa"/> <a:font script="Sinh" typeface="Iskoola Pota"/> <a:font script="Mong" typeface="Mongolian Baiti"/> <a:font script="Viet" typeface="Arial"/> <a:font script="Uigh" typeface="Microsoft Uighur"/> <a:font script="Geor" typeface="Sylfaen"/> </a:minorFont> </a:fontScheme> <a:fmtScheme name="Office"> <a:fillStyleLst> <a:solidFill> <a:schemeClr val="phClr"/> </a:solidFill> <a:gradFill rotWithShape="1"> <a:gsLst> <a:gs pos="0"> <a:schemeClr val="phClr"> <a:tint val="50000"/> <a:satMod val="300000"/> </a:schemeClr> </a:gs> <a:gs pos="35000"> <a:schemeClr val="phClr"> <a:tint val="37000"/> <a:satMod val="300000"/> </a:schemeClr> </a:gs> <a:gs pos="100000"> <a:schemeClr val="phClr"> <a:tint val="15000"/> <a:satMod val="350000"/> </a:schemeClr> </a:gs> </a:gsLst> <a:lin ang="16200000" scaled="1"/> </a:gradFill> <a:gradFill rotWithShape="1"> <a:gsLst> <a:gs pos="0"> <a:schemeClr val="phClr"> <a:tint val="100000"/> <a:shade val="100000"/> <a:satMod val="130000"/> </a:schemeClr> </a:gs> <a:gs pos="100000"> <a:schemeClr val="phClr"> <a:tint val="50000"/> <a:shade val="100000"/> <a:satMod val="350000"/> </a:schemeClr> </a:gs> </a:gsLst> <a:lin ang="16200000" scaled="0"/> </a:gradFill> </a:fillStyleLst> <a:lnStyleLst> <a:ln w="9525" cap="flat" cmpd="sng" algn="ctr"> <a:solidFill> <a:schemeClr val="phClr"> <a:shade val="95000"/> <a:satMod val="105000"/> </a:schemeClr> </a:solidFill> <a:prstDash val="solid"/> </a:ln> <a:ln w="25400" cap="flat" cmpd="sng" algn="ctr"> <a:solidFill> <a:Line truncated
`,this.quote='"',this.escape=this.quote,this.quoteColumns=!1,this.quoteHeaders=this.quoteColumns,this.headers=null,this.includeEndRowDelimiter=!1,this.writeBOM=!1,this.BOM="\uFEFF",this.alwaysWriteHeaders=!1,Object.assign(this,$||{}),typeof($===null||$===void 0?void 0:$.quoteHeaders)>"u")this.quoteHeaders=this.quoteColumns;if(($===null||$===void 0?void 0:$.quote)===!0)this.quote='"';else if(($===null||$===void 0?void 0:$.quote)===!1)this.quote="";if(typeof($===null||$===void 0?void 0:$.escape)!=="string")this.escape=this.quote;this.shouldWriteHeaders=!!this.headers&&((q=$.writeHeaders)!==null&&q!==void 0?q:!0),this.headers=Array.isArray(this.headers)?this.headers:null,this.escapedQuote=`${this.escape}${this.quote}`}}U70.FormatterOptions=I70});var XZ=O((sg1,z70)=>{var Kt0="[object AsyncFunction]",zt0="[object Function]",wt0="[object GeneratorFunction]",Gt0="[object Null]",Ht0="[object Proxy]",Vt0="[object Undefined]",Wt0=typeof global=="object"&&global&&global.Object===Object&&global,Zt0=typeof self=="object"&&self&&self.Object===Object&&self,Xt0=Wt0||Zt0||Function("return this")(),Q70=Object.prototype,Lt0=Q70.hasOwnProperty,K70=Q70.toString,J70=Xt0.Symbol,Z3=J70?J70.toStringTag:void 0;function Dt0($){if($==null)return $===void 0?Vt0:Gt0;return Z3&&Z3 in Object($)?Ot0($):Nt0($)}function Ot0($){var q=Lt0.call($,Z3),I=$[Z3];try{$[Z3]=void 0;var U=!0}catch(J){}var Y=K70.call($);if(U)if(q)$[Z3]=I;else delete $[Z3];return Y}function Nt0($){return K70.call($)}function Ft0($){if(!Mt0($))return!1;var q=Dt0($);return q==zt0||q==wt0||q==Kt0||q==Ht0}function Mt0($){var q=typeof $;return $!=null&&(q=="object"||q=="function")}z70.exports=Ft0});var p70=O((LZ,ZU)=>{var At0=200,dv="__lodash_hash_undefined__",TZ=1,F70=2,M70=9007199254740991,DZ="[object Arguments]",kv="[object Array]",Pt0="[object AsyncFunction]",A70="[object Boolean]",P70="[object Date]",T70="[object Error]",E70="[object Function]",Tt0="[object GeneratorFunction]",OZ="[object Map]",g70="[object Number]",Et0="[object Null]",WU="[object Object]",w70="[object Promise]",gt0="[object Proxy]",j70="[object RegExp]",NZ="[object Set]",B70="[object String]",jt0="[object Symbol]",Bt0="[object Undefined]",fv="[object WeakMap]",R70="[object ArrayBuffer]",FZ="[object DataView]",Rt0="[object Float32Array]",vt0="[object Float64Array]",Ct0="[object Int8Array]",_t0="[object Int16Array]",ht0="[object Int32Array]",St0="[object Uint8Array]",yt0="[object Uint8ClampedArray]",ut0="[object Uint16Array]",xt0="[object Uint32Array]",kt0=/[\\^$.*+?()[\]{}|]/g,ft0=/^\[object .+?Constructor\]$/,nt0=/^(?:0|[1-9]\d*)$/,o1={};o1[Rt0]=o1[vt0]=o1[Ct0]=o1[_t0]=o1[ht0]=o1[St0]=o1[yt0]=o1[ut0]=o1[xt0]=!0;o1[DZ]=o1[kv]=o1[R70]=o1[A70]=o1[FZ]=o1[P70]=o1[T70]=o1[E70]=o1[OZ]=o1[g70]=o1[WU]=o1[j70]=o1[NZ]=o1[B70]=o1[fv]=!1;var v70=typeof global=="object"&&global&&global.Object===Object&&global,bt0=typeof self=="object"&&self&&self.Object===Object&&self,M5=v70||bt0||Function("return this")(),C70=typeof LZ=="object"&&LZ&&!LZ.nodeType&&LZ,G70=C70&&typeof ZU=="object"&&ZU&&!ZU.nodeType&&ZU,_70=G70&&G70.exports===C70,yv=_70&&v70.process,H70=function(){try{return yv&&yv.binding&&yv.binding("util")}catch($){}}(),V70=H70&&H70.isTypedArray;function it0($,q){var I=-1,U=$==null?0:$.length,Y=0,J=[];while(++I<U){var Q=$[I];if(q(Q,I,$))J[Y++]=Q}return J}function pt0($,q){var I=-1,U=q.length,Y=$.length;while(++I<U)$[Y+I]=q[I];return $}function ct0($,q){var I=-1,U=$==null?0:$.length;while(++I<U)if(q($[I],I,$))return!0;return!1}function dt0($,q){var I=-1,U=Array($);while(++I<$)U[I]=q(I);return U}function lt0($){return function(q){return $(q)}}function mt0($,q){return $.has(q)}function ot0($,q){return $==null?void 0:$[q]}function rt0($){var q=-1,I=Array($.size);return $.forEach(function(U,Y){I[++q]=[Y,U]}),I}function tt0($,q){return function(I){return $(q(I))}}function at0($){var q=-1,I=Array($.size);return $.forEach(function(U){I[++q]=U}),I}var st0=Array.prototype,et0=Function.prototype,EZ=Object.prototype,uv=M5["__core-js_shared__"],h70=et0.toString,_8=EZ.hasOwnProperty,W70=function(){var $=/[^.]+$/.exec(uv&&uv.keys&&uv.keys.IE_PROTO||"");return $?"Symbol(src)_1."+$:""}(),S70=EZ.toString,$a0=RegExp("^"+h70.call(_8).replace(kt0,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Z70=_70?M5.Buffer:void 0,MZ=M5.Symbol,X70=M5.Uint8Array,y70=EZ.propertyIsEnumerable,qa0=st0.splice,X3=MZ?MZ.toStringTag:void 0,L70=Object.getOwnPropertySymbols,Ia0=Z70?Z70.isBuffer:void 0,Ua0=tt0(Object.keys,Object),nv=XU(M5,"DataView"),j2=XU(M5,"Map"),bv=XU(M5,"Promise"),iv=XU(M5,"Set"),pv=XU(M5,"WeakMap"),B2=XU(Object,"create"),Ya0=O3(nv),Ja0=O3(j2),Qa0=O3(bv),Ka0=O3(iv),za0=O3(pv),D70=MZ?MZ.prototype:void 0,xv=D70?D70.valueOf:void 0;function L3($){var q=-1,I=$==null?0:$.length;this.clear();while(++q<I){var U=$[q];this.set(U[0],U[1])}}function wa0(){this.__data__=B2?B2(null):{},this.size=0}function Ga0($){var q=this.has($)&&delete this.__data__[$];return this.size-=q?1:0,q}function Ha0($){var q=this.__data Line truncated
]`;this.ESCAPE_REGEXP=new RegExp(q)}set headers($){this._headers=$}shouldQuote($,q){let I=q?this.formatterOptions.quoteHeaders:this.formatterOptions.quoteColumns;if(Ds0.default(I))return I;if(Array.isArray(I))return I[$];if(this._headers!==null)return I[this._headers[$]];return!1}format($,q,I){let U=`${Os0.default($)?"":$}`.replace(/\0/g,""),{formatterOptions:Y}=this;if(Y.quote!==""){if(U.indexOf(Y.quote)!==-1)return this.quoteField(U.replace(this.REPLACE_REGEXP,Y.escapedQuote))}if(U.search(this.ESCAPE_REGEXP)!==-1||this.shouldQuote(q,I))return this.quoteField(U);return U}quoteField($){let{quote:q}=this.formatterOptions;return`${q}${$}${q}`}}LU.FieldFormatter=s70});var tv=O((e70)=>{Object.defineProperty(e70,"__esModule",{value:!0});e70.isSyncTransform=void 0;e70.isSyncTransform=($)=>$.length===1});var I30=O((DU)=>{var q30=DU&&DU.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(DU,"__esModule",{value:!0});DU.RowFormatter=void 0;var Fs0=q30(XZ()),Ms0=q30(p70()),As0=rv(),Ps0=tv();class N3{constructor($){if(this.rowCount=0,this.formatterOptions=$,this.fieldFormatter=new As0.FieldFormatter($),this.headers=$.headers,this.shouldWriteHeaders=$.shouldWriteHeaders,this.hasWrittenHeaders=!1,this.headers!==null)this.fieldFormatter.headers=this.headers;if($.transform)this.rowTransform=$.transform}static isRowHashArray($){if(Array.isArray($))return Array.isArray($[0])&&$[0].length===2;return!1}static isRowArray($){return Array.isArray($)&&!this.isRowHashArray($)}static gatherHeaders($){if(N3.isRowHashArray($))return $.map((q)=>q[0]);if(Array.isArray($))return $;return Object.keys($)}static createTransform($){if(Ps0.isSyncTransform($))return(q,I)=>{let U=null;try{U=$(q)}catch(Y){return I(Y)}return I(null,U)};return(q,I)=>{$(q,I)}}set rowTransform($){if(!Fs0.default($))throw TypeError("The transform should be a function");this._rowTransform=N3.createTransform($)}format($,q){this.callTransformer($,(I,U)=>{if(I)return q(I);if(!$)return q(null);let Y=[];if(U){let{shouldFormatColumns:J,headers:Q}=this.checkHeaders(U);if(this.shouldWriteHeaders&&Q&&!this.hasWrittenHeaders)Y.push(this.formatColumns(Q,!0)),this.hasWrittenHeaders=!0;if(J){let K=this.gatherColumns(U);Y.push(this.formatColumns(K,!1))}}return q(null,Y)})}finish($){let q=[];if(this.formatterOptions.alwaysWriteHeaders&&this.rowCount===0){if(!this.headers)return $(Error("`alwaysWriteHeaders` option is set to true but `headers` option not provided."));q.push(this.formatColumns(this.headers,!0))}if(this.formatterOptions.includeEndRowDelimiter)q.push(this.formatterOptions.rowDelimiter);return $(null,q)}checkHeaders($){if(this.headers)return{shouldFormatColumns:!0,headers:this.headers};let q=N3.gatherHeaders($);if(this.headers=q,this.fieldFormatter.headers=q,!this.shouldWriteHeaders)return{shouldFormatColumns:!0,headers:null};return{shouldFormatColumns:!Ms0.default(q,$),headers:q}}gatherColumns($){if(this.headers===null)throw Error("Headers is currently null");if(!Array.isArray($))return this.headers.map((q)=>$[q]);if(N3.isRowHashArray($))return this.headers.map((q,I)=>{let U=$[I];if(U)return U[1];return""});if(N3.isRowArray($)&&!this.shouldWriteHeaders)return $;return this.headers.map((q,I)=>$[I])}callTransformer($,q){if(!this._rowTransform)return q(null,$);return this._rowTransform($,q)}formatColumns($,q){let I=$.map((Y,J)=>this.fieldFormatter.format(Y,J,q)).join(this.formatterOptions.delimiter),{rowCount:U}=this;if(this.rowCount+=1,U)return[this.formatterOptions.rowDelimiter,I].join("");return I}}DU.RowFormatter=N3});var U30=O((BZ)=>{Object.defineProperty(BZ,"__esModule",{value:!0});BZ.FieldFormatter=BZ.RowFormatter=void 0;var Ts0=I30();Object.defineProperty(BZ,"RowFormatter",{enumerable:!0,get:function(){return Ts0.RowFormatter}});var Es0=rv();Object.defineProperty(BZ,"FieldFormatter",{enumerable:!0,get:function(){return Es0.FieldFormatter}})});var av=O((J30)=>{Object.defineProperty(J30,"__esModule",{value:!0});J30.CsvFormatterStream=void 0;var js0=o("stream"),Bs0=U30();class Y30 extends js0.Transform{constructor($){super({writableObjectMode:$.objectMode});this.hasWrittenBOM=!1,this.formatterOptions=$,this.rowFormatter=new Bs0.RowFormatter($),this.hasWrittenBOM=!$.writeBOM}transform($){return this.rowFormatter.rowTransform=$,this}_transform($,q,I){let U=!1;try{if(!this.hasWrittenBOM)this.push(this.formatterOptions.BOM),this.hasWrittenBOM=!0;this.rowFormatter.format($,(Y,J)=>{if(Y)return U=!0,I(Y);if(J)J.forEach((Q)=>{this.push(Buffer.from(Q,"utf8"))});return U=!0,I()})}catch(Y){if(U)throw Y;I(Y)}}_flush($){this.rowFormatter.finish((q,I)=>{if(q)return $(q);if(I)I.forEach((U)=>{this.push(Buffer.from(U,"utf8"))});return $()})}}J30.CsvFormatterStream=Y30});var z30=O((L1)=>{var K30=L1&&L1.__createBinding||(Object.create?function($,q,I,U){if(U===void 0)U=I;Object.defineProperty($,U,{enumerable:!0,get:function(){return q[I]}})}:function($,q,I,U){if(U===void 0)U=I;$[U]=q[I]}),Rs0=L1&&L1.__setModuleDefault||(Object.create?function($,q){Ob Line truncated
deps: ${I}}`};var Vg0={keyword:"dependencies",type:"object",schemaType:"object",error:Vp.error,code($){let[q,I]=Wg0($);Hp($,q),wp($,I)}};function Wg0({schema:$}){let q={},I={};for(let U in $){if(U==="__proto__")continue;let Y=Array.isArray($[U])?q:I;Y[U]=$[U]}return[q,I]}function Hp($,q=$.schema){let{gen:I,data:U,it:Y}=$;if(Object.keys(q).length===0)return;let J=I.let("missing");for(let Q in q){let K=q[Q];if(K.length===0)continue;let z=(0,aJ.propertyInData)(I,U,Q,Y.opts.ownProperties);if($.setParams({property:Q,depsCount:K.length,deps:K.join(", ")}),Y.allErrors)I.if(z,()=>{for(let G of K)(0,aJ.checkReportMissingProp)($,G)});else I.if(xT._`${z} && (${(0,aJ.checkMissingProp)($,K,J)})`),(0,aJ.reportMissingProp)($,J),I.else()}}Vp.validatePropertyDeps=Hp;function wp($,q=$.schema){let{gen:I,data:U,keyword:Y,it:J}=$,Q=I.name("valid");for(let K in q){if((0,wg0.alwaysValidSchema)(J,q[K]))continue;I.if((0,aJ.propertyInData)(I,U,K,J.opts.ownProperties),()=>{let z=$.subschema({keyword:Y,schemaProp:K},Q);$.mergeValidEvaluated(z,Q)},()=>I.var(Q,!0)),$.ok(Q)}}Vp.validateSchemaDeps=wp;Vp.default=Vg0});var Op=O((Dp)=>{Object.defineProperty(Dp,"__esModule",{value:!0});var Lp=t0(),Lg0=w1(),Dg0={message:"property name must be valid",params:({params:$})=>Lp._`{propertyName: ${$.propertyName}}`},Og0={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:Dg0,code($){let{gen:q,schema:I,data:U,it:Y}=$;if((0,Lg0.alwaysValidSchema)(Y,I))return;let J=q.name("valid");q.forIn("key",U,(Q)=>{$.setParams({propertyName:Q}),$.subschema({keyword:"propertyNames",data:Q,dataTypes:["string"],propertyName:Q,compositeRule:!0},J),q.if((0,Lp.not)(J),()=>{if($.error(!0),!Y.allErrors)q.break()})}),$.ok(J)}};Dp.default=Og0});var kT=O((Np)=>{Object.defineProperty(Np,"__esModule",{value:!0});var Gw=O$(),i$=t0(),Fg0=e8(),Hw=w1(),Mg0={message:"must NOT have additional properties",params:({params:$})=>i$._`{additionalProperty: ${$.additionalProperty}}`},Ag0={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:Mg0,code($){let{gen:q,schema:I,parentSchema:U,data:Y,errsCount:J,it:Q}=$;if(!J)throw Error("ajv implementation error");let{allErrors:K,opts:z}=Q;if(Q.props=!0,z.removeAdditional!=="all"&&(0,Hw.alwaysValidSchema)(Q,I))return;let G=(0,Gw.allSchemaProperties)(U.properties),H=(0,Gw.allSchemaProperties)(U.patternProperties);w(),$.ok(i$._`${J} === ${Fg0.default.errors}`);function w(){q.forIn("key",Y,(D)=>{if(!G.length&&!H.length)X(D);else q.if(V(D),()=>X(D))})}function V(D){let N;if(G.length>8){let E=(0,Hw.schemaRefOrVal)(Q,U.properties,"properties");N=(0,Gw.isOwnProperty)(q,E,D)}else if(G.length)N=(0,i$.or)(...G.map((E)=>i$._`${D} === ${E}`));else N=i$.nil;if(H.length)N=(0,i$.or)(N,...H.map((E)=>i$._`${(0,Gw.usePattern)($,E)}.test(${D})`));return(0,i$.not)(N)}function W(D){q.code(i$._`delete ${Y}[${D}]`)}function X(D){if(z.removeAdditional==="all"||z.removeAdditional&&I===!1){W(D);return}if(I===!1){if($.setParams({additionalProperty:D}),$.error(),!K)q.break();return}if(typeof I=="object"&&!(0,Hw.alwaysValidSchema)(Q,I)){let N=q.name("valid");if(z.removeAdditional==="failing")L(D,N,!1),q.if((0,i$.not)(N),()=>{$.reset(),W(D)});else if(L(D,N),!K)q.if((0,i$.not)(N),()=>q.break())}}function L(D,N,E){let T={keyword:"additionalProperties",dataProp:D,dataPropType:Hw.Type.Str};if(E===!1)Object.assign(T,{compositeRule:!0,createErrors:!1,allErrors:!1});$.subschema(T,N)}}};Np.default=Ag0});var Pp=O((Ap)=>{Object.defineProperty(Ap,"__esModule",{value:!0});var Tg0=fJ(),Fp=O$(),fT=w1(),Mp=kT(),Eg0={keyword:"properties",type:"object",schemaType:"object",code($){let{gen:q,schema:I,parentSchema:U,data:Y,it:J}=$;if(J.opts.removeAdditional==="all"&&U.additionalProperties===void 0)Mp.default.code(new Tg0.KeywordCxt(J,Mp.default,"additionalProperties"));let Q=(0,Fp.allSchemaProperties)(I);for(let w of Q)J.definedProperties.add(w);if(J.opts.unevaluated&&Q.length&&J.props!==!0)J.props=fT.mergeEvaluated.props(q,(0,fT.toHash)(Q),J.props);let K=Q.filter((w)=>!(0,fT.alwaysValidSchema)(J,I[w]));if(K.length===0)return;let z=q.name("valid");for(let w of K){if(G(w))H(w);else{if(q.if((0,Fp.propertyInData)(q,Y,w,J.opts.ownProperties)),H(w),!J.allErrors)q.else().var(z,!0);q.endIf()}$.it.definedProperties.add(w),$.ok(z)}function G(w){return J.opts.useDefaults&&!J.compositeRule&&I[w].default!==void 0}function H(w){$.subschema({keyword:"properties",schemaProp:w,dataProp:w},z)}}};Ap.default=Eg0});var Bp=O((gp)=>{Object.defineProperty(gp,"__esModule",{value:!0});var Tp=O$(),ww=t0(),Ep=w1(),jp=w1(),gg0={keyword:"patternProperties",type:"object",schemaType:"object",code($){let{gen:q,schema:I,data:U,parentSchema:Y,it:J}=$,{opts:Q}=J,K=(0,Tp.allSchemaProperties)(I),z=K.filter((L)=>(0,Ep.alwaysValidSchema)(J,I[L]));if(K.length===0||z.length===K.length&&(!J.opts.unevaluated||J.props===!0))return;let G=Q.strictSchema&&!Q.allowMatchingProperties&&Y.properties,H=q.name("valid");if(J.props!==!0&&!(J.props instanceo Line truncated
\x00`,i+=p1(n,2),i+=K.magic,i+=p1(D,2),i+=p1(N,2),i+=p1(S.crc32,4),i+=p1(S.compressedSize,4),i+=p1(S.uncompressedSize,4),i+=p1(G.length,2),i+=p1(E.length,2);var C=uV.LOCAL_FILE_HEADER+i+G+E,k=uV.CENTRAL_FILE_HEADER+p1(p,2)+i+p1(V.length,2)+"\x00\x00\x00\x00"+p1(R,4)+p1(U,4)+G+E+V;return{fileRecord:C,dirRecord:k}},au0=function($,q,I,U,Y){var J="",Q=xI.transformTo("string",Y(U));return J=uV.CENTRAL_DIRECTORY_END+"\x00\x00\x00\x00"+p1($,2)+p1($,2)+p1(q,4)+p1(I,4)+p1(Q.length,2)+Q,J},su0=function($){var q="";return q=uV.DATA_DESCRIPTOR+p1($.crc32,4)+p1($.compressedSize,4)+p1($.uncompressedSize,4),q};function r$($,q,I,U){kI.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=q,this.zipPlatform=I,this.encodeFileName=U,this.streamFiles=$,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}xI.inherits(r$,kI);r$.prototype.push=function($){var q=$.meta.percent||0,I=this.entriesCount,U=this._sources.length;if(this.accumulate)this.contentBuffer.push($);else this.bytesWritten+=$.data.length,kI.prototype.push.call(this,{data:$.data,meta:{currentFile:this.currentFile,percent:I?(q+100*(I-U-1))/I:100}})};r$.prototype.openedSource=function($){this.currentSourceOffset=this.bytesWritten,this.currentFile=$.file.name;var q=this.streamFiles&&!$.file.dir;if(q){var I=$a($,q,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:I.fileRecord,meta:{percent:0}})}else this.accumulate=!0};r$.prototype.closedSource=function($){this.accumulate=!1;var q=this.streamFiles&&!$.file.dir,I=$a($,q,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(I.dirRecord),q)this.push({data:su0($),meta:{percent:100}});else{this.push({data:I.fileRecord,meta:{percent:0}});while(this.contentBuffer.length)this.push(this.contentBuffer.shift())}this.currentFile=null};r$.prototype.flush=function(){var $=this.bytesWritten;for(var q=0;q<this.dirRecords.length;q++)this.push({data:this.dirRecords[q],meta:{percent:100}});var I=this.bytesWritten-$,U=au0(this.dirRecords.length,I,$,this.zipComment,this.encodeFileName);this.push({data:U,meta:{percent:100}})};r$.prototype.prepareNextSource=function(){if(this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused)this.previous.pause();else this.previous.resume()};r$.prototype.registerPrevious=function($){this._sources.push($);var q=this;return $.on("data",function(I){q.processChunk(I)}),$.on("end",function(){if(q.closedSource(q.previous.streamInfo),q._sources.length)q.prepareNextSource();else q.end()}),$.on("error",function(I){q.error(I)}),this};r$.prototype.resume=function(){if(!kI.prototype.resume.call(this))return!1;if(!this.previous&&this._sources.length)return this.prepareNextSource(),!0;if(!this.previous&&!this._sources.length&&!this.generatedError)return this.end(),!0};r$.prototype.error=function($){var q=this._sources;if(!kI.prototype.error.call(this,$))return!1;for(var I=0;I<q.length;I++)try{q[I].error($)}catch(U){}return!0};r$.prototype.lock=function(){kI.prototype.lock.call(this);var $=this._sources;for(var q=0;q<$.length;q++)$[q].lock()};qa.exports=r$});var Ua=O((Ix0)=>{var eu0=Lg(),$x0=Ia(),qx0=function($,q){var I=$||q,U=eu0[I];if(!U)throw Error(I+" is not a valid compression method !");return U};Ix0.generateWorker=function($,q,I){var U=new $x0(q.streamFiles,I,q.platform,q.encodeFileName),Y=0;try{$.forEach(function(J,Q){Y++;var K=qx0(Q.options.compression,q.compression),z=Q.options.compressionOptions||q.compressionOptions||{},G=Q.dir,H=Q.date;Q._compressWorker(K,z).withStreamInfo("file",{name:J,dir:G,date:H,comment:Q.comment||"",unixPermissions:Q.unixPermissions,dosPermissions:Q.dosPermissions}).pipe(U)}),U.entriesCount=Y}catch(J){U.error(J)}return U}});var Ja=O((bA1,Ya)=>{var Yx0=G4(),xV=U$();function aQ($,q){xV.call(this,"Nodejs stream input adapter for "+$),this._upstreamEnded=!1,this._bindStream(q)}Yx0.inherits(aQ,xV);aQ.prototype._bindStream=function($){var q=this;this._stream=$,$.pause(),$.on("data",function(I){q.push({data:I,meta:{percent:0}})}).on("error",function(I){if(q.isPaused)this.generatedError=I;else q.error(I)}).on("end",function(){if(q.isPaused)q._upstreamEnded=!0;else q.end()})};aQ.prototype.pause=function(){if(!xV.prototype.pause.call(this))return!1;return this._stream.pause(),!0};aQ.prototype.resume=function(){if(!xV.prototype.resume.call(this))return!1;if(this._upstreamEnded)this.end();else this._stream.resume();return!0};Ya.exports=aQ});var Xa=O((nA1,Za)=>{var Jx0=gI(),sQ=G4(),Ga=U$(),Qx0=Aj(),Ha=Pj(),Qa=OV(),Kx0=Kr(),zx0=Ua(),Ka=vQ(),Gx0=Ja(),wa=function($,q,I){var U=sQ.getTypeOf(q),Y,J=sQ.extend(I||{},Ha);if(J.date=J.date||new Date,J.compression!==null)J.compression=J.compression.toUpperCase();if(typeof J.unixPermissions==="string")J.unixPermissions=parseInt(J.unixPermissions,8);if(J.unixPermissions&&J.unixPermissions&16384)J.dir=!0;if(J.dosPermissions&&J.dosPermissions&16)J.dir=!0;if(J. Line truncated
`)}openNode($,q){let I=this.tos,U=this._xml;if(I&&this.open)U.push(">");this._stack.push($),U.push("<"),U.push($),$B(U,q),this.leaf=!0,this.open=!0}addAttribute($,q){if(!this.open)throw Error("Cannot write attributes to node if it is not open");if(q!==void 0)Je(this._xml,$,q)}addAttributes($){if(!this.open)throw Error("Cannot write attributes to node if it is not open");$B(this._xml,$)}writeText($){let q=this._xml;if(this.open)q.push(">"),this.open=!1;this.leaf=!1,q.push(Ye.xmlEncode($.toString()))}writeXml($){if(this.open)this._xml.push(">"),this.open=!1;this.leaf=!1,this._xml.push($)}closeNode(){let $=this._stack.pop(),q=this._xml;if(this.leaf)q.push("/>");else q.push("</"),q.push($),q.push(">");this.open=!1,this.leaf=!1}leafNode($,q,I){if(this.openNode($,q),I!==void 0)this.writeText(I);this.closeNode()}closeAll(){while(this._stack.length)this.closeNode()}addRollback(){return this._rollbacks.push({xml:this._xml.length,stack:this._stack.length,leaf:this.leaf,open:this.open}),this.cursor}commit(){this._rollbacks.pop()}rollback(){let $=this._rollbacks.pop();if(this._xml.length>$.xml)this._xml.splice($.xml,this._xml.length-$.xml);if(this._stack.length>$.stack)this._stack.splice($.stack,this._stack.length-$.stack);this.leaf=$.leaf,this.open=$.open}get xml(){return this.closeAll(),this._xml.join("")}}qB.StdDocAttributes={version:"1.0",encoding:"UTF-8",standalone:"yes"};Qe.exports=qB});var IB=O(($b0)=>{var Ke=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");function ef0($){if(typeof $==="string")return $;if(Ke)return Ke.decode($);return $.toString()}$b0.bufferToString=ef0});var Ve=O((Ge)=>{Object.defineProperty(Ge,"__esModule",{value:!0});Ge.CHAR=`
\r -퟿-�\uD800\uDC00-\uDBFF\uDFFF`;Ge.S=` \r
`;Ge.NAME_START_CHAR=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�\uD800\uDC00-\uDB7F\uDFFF";Ge.NAME_CHAR="-"+Ge.NAME_START_CHAR+".0-9·̀-ͯ‿-⁀";Ge.CHAR_RE=new RegExp("^["+Ge.CHAR+"]$","u");Ge.S_RE=new RegExp("^["+Ge.S+"]+$","u");Ge.NAME_START_CHAR_RE=new RegExp("^["+Ge.NAME_START_CHAR+"]$","u");Ge.NAME_CHAR_RE=new RegExp("^["+Ge.NAME_CHAR+"]$","u");Ge.NAME_RE=new RegExp("^["+Ge.NAME_START_CHAR+"]["+Ge.NAME_CHAR+"]*$","u");Ge.NMTOKEN_RE=new RegExp("^["+Ge.NAME_CHAR+"]+$","u");var UB=9,YB=10,JB=13,QB=32;Ge.S_LIST=[QB,YB,JB,UB];function Ib0($){return $>=QB&&$<=55295||$===YB||$===JB||$===UB||$>=57344&&$<=65533||$>=65536&&$<=1114111}Ge.isChar=Ib0;function Ub0($){return $===QB||$===YB||$===JB||$===UB}Ge.isS=Ub0;function ze($){return $>=65&&$<=90||$>=97&&$<=122||$===58||$===95||$===8204||$===8205||$>=192&&$<=214||$>=216&&$<=246||$>=248&&$<=767||$>=880&&$<=893||$>=895&&$<=8191||$>=8304&&$<=8591||$>=11264&&$<=12271||$>=12289&&$<=55295||$>=63744&&$<=64975||$>=65008&&$<=65533||$>=65536&&$<=983039}Ge.isNameStartChar=ze;function Yb0($){return ze($)||$>=48&&$<=57||$===45||$===46||$===183||$>=768&&$<=879||$>=8255&&$<=8256}Ge.isNameChar=Yb0});var Ae=O((Oe)=>{Object.defineProperty(Oe,"__esModule",{value:!0});Oe.CHAR="\x01-퟿-�\uD800\uDC00-\uDBFF\uDFFF";Oe.RESTRICTED_CHAR="\x01-\b\v\f\x0E-\x1F-„†-Ÿ";Oe.S=` \r
`;Oe.NAME_START_CHAR=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�\uD800\uDC00-\uDB7F\uDFFF";Oe.NAME_CHAR="-"+Oe.NAME_START_CHAR+".0-9·̀-ͯ‿-⁀";Oe.CHAR_RE=new RegExp("^["+Oe.CHAR+"]$","u");Oe.RESTRICTED_CHAR_RE=new RegExp("^["+Oe.RESTRICTED_CHAR+"]$","u");Oe.S_RE=new RegExp("^["+Oe.S+"]+$","u");Oe.NAME_START_CHAR_RE=new RegExp("^["+Oe.NAME_START_CHAR+"]$","u");Oe.NAME_CHAR_RE=new RegExp("^["+Oe.NAME_CHAR+"]$","u");Oe.NAME_RE=new RegExp("^["+Oe.NAME_START_CHAR+"]["+Oe.NAME_CHAR+"]*$","u");Oe.NMTOKEN_RE=new RegExp("^["+Oe.NAME_CHAR+"]+$","u");var We=9,Ze=10,Xe=13,Le=32;Oe.S_LIST=[Le,Ze,Xe,We];function Lb0($){return $>=1&&$<=55295||$>=57344&&$<=65533||$>=65536&&$<=1114111}Oe.isChar=Lb0;function Db0($){return $>=1&&$<=8||$===11||$===12||$>=14&&$<=31||$>=127&&$<=132||$>=134&&$<=159}Oe.isRestrictedChar=Db0;function Ob0($){return $===9||$===10||$===13||$>31&&$<127||$===133||$>159&&$<=55295||$>=57344&&$<=65533||$>=65536&&$<=1114111}Oe.isCharAndNotRestricted=Ob0;function Nb0($){return $===Le||$===Ze||$===Xe||$===We}Oe.isS=Nb0;function De($){return $>=65&&$<=90||$>=97&&$<=122||$===58||$===95||$===8204||$===8205||$>=192&&$<=214||$>=216&&$<=246||$>=248&&$<=767||$>=880&&$<=893||$>=895&&$<=8191||$>=8304&&$<=8591||$>=11264&&$<=12271||$>=12289&&$<=55295||$>=63744&&$<=64975||$>=65008&&$<=65533||$>=65536&&$<=983039}Oe.isNameStartChar=De;function Fb0($){return De($)||$>=48&&$<=57||$===45||$===46||$===183||$>=768&&$<=879||$>=8255&&$<=8256}Oe.isNameChar=Fb0});var Ee=O((Te)=>{Object.defineProperty(Te,"__esModule",{value:!0});Te.NC_NAME_START_CHAR="A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�\uD800\uDC00-\uDB7F\uDFFF";Te.NC_NAME_CHAR="-"+Te.NC_NAME_START_CHAR+".0-9·̀-ͯ‿-⁀";Te.NC_NAME_START_CHAR_RE=new RegExp("^["+Te.NC_NAME_START_CHAR+"]$","u");Te.NC_NAME_CHAR_RE=new RegExp("^["+Te.NC_NAME_CHAR+"]$","u");Te.NC_NAME_RE=new RegExp("^["+Te.NC_NAME_START_CHAR+"]["+Te.NC_NAME_CHAR+"]*$","u");function Pe($){return $>=65&&$<=90||$===95||$>=97&&$<=122||$>=192&&$<=214||$>=216&&$<=246||$>=248&&$<=767||$>=880&&$<=893||$>=895&&$<=8191||$>=8204&&$<=8205||$>=8304&&$<=8591||$>=11264&&$<=12271||$>=12289&&$<=55295||$>=63744&&$<=64975||$>=65008&&$<=65533||$>=65536&&$<=983039}Te.isNCNameStartChar=Pe;function yb0($){return Pe($)||($===45||$===46||$>=48&&$<=57||$===183||$>=768&&$<=879||$>=8255&&$<=8256)}Te.isNCNameChar=yb0});var le=O((me)=>{Object.defineProperty(me,"__esModule",{value:!0});var rI=Ve(),nb0=Ae(),FB=Ee(),c6=rI.isS,ib0=rI.isChar,w2=rI.isNameStartChar,je=rI.isNameChar,be=rI.S_LIST,pb0=rI.NAME_RE,cb0=nb0.isChar,db0=FB.isNCNameStartChar,mb0=FB.isNCNameChar,lb0=FB.NC_NAME_RE,VW="http://www.w3.org/XML/1998/namespace",oI="http://www.w3.org/2000/xmlns/",ob0={__proto__:null,xml:VW,xmlns:oI},rb0={__proto__:null,amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},Y4=-1,B8=-2,ge=0,tb0=1,zB=2,ab0=3,dI=4,sb0=5,eb0=6,$n0=7,GB=8,qn0=9,In0=10,Un0=11,Yn0=12,R6=13,KW=14,HB=15,Jn0=16,wB=17,Qn0=18,Kn0=19,VB=20,zn0=21,Gn0=22,Hn0=23,Be=24,WB=25,zW=26,Re=27,wn0=28,Vn0=29,ve=30,Wn0=31,Zn0=32,I3=33,Xn0=34,ZB=35,V2=36,XB=37,Ln0=38,Ce=39,_e=40,Dn0=41,he=42,On0=43,Nn0=44,LB=9,a$=10,DB=13,Se=32,ye=33,ne=34,W2=38,ie=39,GW=45,HW=47,Fn0=59,v9=60,mI=61,S4=62,I6=63,pe=91,lI=93,ue=133,xe=8232,wW=($)=>$===ne||$===ie,ce=[ne,ie],Mn0=[...ce,pe,S4],An0=[...ce,v9,lI],Pn0=[mI,I6,...be],Tn0=[...be,S4,W2,v9];function NB($,q,I){switch(q){case"xml":if(I!==VW)$.fail(`xml prefix must be bound to ${VW}.`);break;case"xmlns":if(I!==oI)$.fail(`xmlns prefix must be bound to ${oI}.`);break;default:}switch(I){case oI:$.fail(q===""?`the default namespace may not be set to ${I}.`:`may not assign a prefix (even "xmlns") to the URI ${oI}.`);break;case VW:switch(q){case"xml":break;case"":$.fail(`the default namespace may not be set to ${I}.`);break;default:$.fail("may not assign the xml namespace to another prefix.")}break;default:}}function En0($,q){for(let I of Object.keys(q))NB($,I,q[I])}var jn0=($)=>lb0.test($),gn0=($)=>pb0.test($),U3=0,ke=1,OB=2;me.EVENTS=["xmldecl","text","processinginstruction","doctype","comment","opentagstart","attribute","opentag","closetag","cdata","error","end","ready"];var fe={xmldecl:"xmldeclHandler",text:"textHandler",processinginstruction:"piHandler",doctype:"doctypeHandler",comment:"commentHandler",opentagstart:"openTagStartHandler",attribute:"attributeHandler",opentag:"openTagHandler",closetag:"closeTagHandler",cdata:"cdataHandler",error:"errorHandler",end:"endHandler",ready:"readyHandler"};class de{constructor($){this.opt=$!==null&&$!==void 0?$:{},this.fragmentOpt=!!this.opt.fragment;let q=this.xmlnsOpt=!!this.opt.xmlns;if(this.trackPosition=this.opt.position!==!1,this.fileName=this.opt.fileName,q){this.nameStartCheck=db0,this.nameCheck=mb0,this.isName=jn0,this.processAttribs=this.processAttribsNS,this.pushAttrib=this.pushAttribNS,this.ns=Object.assign({__proto__:null},ob0);let I=this.opt.additionalNamespaces;if(I!=null)En0(this,I),Object.assign(this.ns,I)}else this.nameStartCheck=w2,this.nameChec Line truncated
`,q=this.i}}captureToChar($){let{i:q}=this,{chunk:I}=this;while(!0){let U=this.getCode();switch(U){case B8:this.text+=`${I.slice(q,this.prevI)}
`,q=this.i,U=a$;break;case Y4:return this.text+=I.slice(q),!1;default:}if(U===$)return this.text+=I.slice(q,this.prevI),!0}}captureNameChars(){let{chunk:$,i:q}=this;while(!0){let I=this.getCode();if(I===Y4)return this.name+=$.slice(q),Y4;if(!je(I))return this.name+=$.slice(q,this.prevI),I===B8?a$:I}}skipSpaces(){while(!0){let $=this.getCodeNorm();if($===Y4||!c6($))return $}}setXMLVersion($){if(this.currentXMLVersion=$,$==="1.0")this.isChar=ib0,this.getCode=this.getCode10;else this.isChar=cb0,this.getCode=this.getCode11}sBegin(){if(this.chunk.charCodeAt(0)===65279)this.i++,this.column++;this.state=tb0}sBeginWhitespace(){let $=this.i,q=this.skipSpaces();if(this.prevI!==$)this.xmlDeclPossible=!1;switch(q){case v9:if(this.state=HB,this.text.length!==0)throw Error("no-empty text at start");break;case Y4:break;default:this.unget(),this.state=R6,this.xmlDeclPossible=!1}}sDoctype(){var $;let q=this.captureTo(Mn0);switch(q){case S4:{($=this.doctypeHandler)===null||$===void 0||$.call(this,this.text),this.text="",this.state=R6,this.doctype=!0;break}case Y4:break;default:if(this.text+=String.fromCodePoint(q),q===pe)this.state=dI;else if(wW(q))this.state=ab0,this.q=q}}sDoctypeQuote(){let $=this.q;if(this.captureToChar($))this.text+=String.fromCodePoint($),this.q=null,this.state=zB}sDTD(){let $=this.captureTo(An0);if($===Y4)return;if(this.text+=String.fromCodePoint($),$===lI)this.state=zB;else if($===v9)this.state=eb0;else if(wW($))this.state=sb0,this.q=$}sDTDQuoted(){let $=this.q;if(this.captureToChar($))this.text+=String.fromCodePoint($),this.state=dI,this.q=null}sDTDOpenWaka(){let $=this.getCodeNorm();switch(this.text+=String.fromCodePoint($),$){case ye:this.state=$n0,this.openWakaBang="";break;case I6:this.state=Un0;break;default:this.state=dI}}sDTDOpenWakaBang(){let $=String.fromCodePoint(this.getCodeNorm()),q=this.openWakaBang+=$;if(this.text+=$,q!=="-")this.state=q==="--"?GB:dI,this.openWakaBang=""}sDTDComment(){if(this.captureToChar(GW))this.text+="-",this.state=qn0}sDTDCommentEnding(){let $=this.getCodeNorm();this.text+=String.fromCodePoint($),this.state=$===GW?In0:GB}sDTDCommentEnded(){let $=this.getCodeNorm();if(this.text+=String.fromCodePoint($),$===S4)this.state=dI;else this.fail("malformed comment."),this.state=GB}sDTDPI(){if(this.captureToChar(I6))this.text+="?",this.state=Yn0}sDTDPIEnding(){let $=this.getCodeNorm();if(this.text+=String.fromCodePoint($),$===S4)this.state=dI}sText(){if(this.tags.length!==0)this.handleTextInRoot();else this.handleTextOutsideRoot()}sEntity(){let{i:$}=this,{chunk:q}=this;$:while(!0)switch(this.getCode()){case B8:this.entity+=`${q.slice($,this.prevI)}
`,$=this.i;break;case Fn0:{let{entityReturnState:I}=this,U=this.entity+q.slice($,this.prevI);this.state=I;let Y;if(U==="")this.fail("empty entity name."),Y="&;";else Y=this.parseEntity(U),this.entity="";if(I!==R6||this.textHandler!==void 0)this.text+=Y;break $}case Y4:this.entity+=q.slice($);break $;default:}}sOpenWaka(){let $=this.getCode();if(w2($))this.state=Xn0,this.unget(),this.xmlDeclPossible=!1;else switch($){case HW:this.state=On0,this.xmlDeclPossible=!1;break;case ye:this.state=Jn0,this.openWakaBang="",this.xmlDeclPossible=!1;break;case I6:this.state=Hn0;break;default:this.fail("disallowed character in tag name"),this.state=R6,this.xmlDeclPossible=!1}}sOpenWakaBang(){switch(this.openWakaBang+=String.fromCodePoint(this.getCodeNorm()),this.openWakaBang){case"[CDATA[":if(!this.sawRoot&&!this.reportedTextBeforeRoot)this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0;if(this.closedRoot&&!this.reportedTextAfterRoot)this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0;this.state=VB,this.openWakaBang="";break;case"--":this.state=wB,this.openWakaBang="";break;case"DOCTYPE":if(this.state=zB,this.doctype||this.sawRoot)this.fail("inappropriately located doctype declaration.");this.openWakaBang="";break;default:if(this.openWakaBang.length>=7)this.fail("incorrect syntax.")}}sComment(){if(this.captureToChar(GW))this.state=Qn0}sCommentEnding(){var $;let q=this.getCodeNorm();if(q===GW)this.state=Kn0,($=this.commentHandler)===null||$===void 0||$.call(this,this.text),this.text="";else this.text+=`-${String.fromCodePoint(q)}`,this.state=wB}sCommentEnded(){let $=this.getCodeNorm();if($!==S4)this.fail("malformed comment."),this.text+=`--${String.fromCodePoint($)}`,this.state=wB;else this.state=R6}sCData(){if(this.captureToChar(lI))this.state=zn0}sCDataEnding(){let $=this.getCodeNorm();if($===lI)this.state=Gn0;else this.text+=`]${String.fromCodePoint($)}`,this.state=VB}sCDataEnding2(){var $;let q=this.getCodeNorm();switch(q){case S4:{($=this.cdataHandler)===null||$===void 0||$.call(this,this.text),this.text="",this.state=R6;break}case lI:this.text+="]";break;default:this.text+=`]]${String.fromCodePoint(q)}`,this.state=VB}}sPIFirstChar(){let $=this.getCodeNorm();if(this.nameStartCheck($))this.piTarget+=String.fromCodePoint($),this.state=Be;else if($===I6||c6($))this.fail("processing instruction without a target."),this.state=$===I6?zW:WB;else this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint($),this.state=Be}sPIRest(){let{chunk:$,i:q}=this;while(!0){let I=this.getCodeNorm();if(I===Y4){this.piTarget+=$.slice(q);return}if(!this.nameCheck(I)){this.piTarget+=$.slice(q,this.prevI);let U=I===I6;if(U||c6(I))if(this.piTarget==="xml"){if(!this.xmlDeclPossible)this.fail("an XML declaration must be at the start of the document.");this.state=U?I3:Re}else this.state=U?zW:WB;else this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(I);break}}}sPIBody(){if(this.text.length===0){let $=this.getCodeNorm();if($===I6)this.state=zW;else if(!c6($))this.text=String.fromCodePoint($)}else if(this.captureToChar(I6))this.state=zW}sPIEnding(){var $;let q=this.getCodeNorm();if(q===S4){let{piTarget:I}=this;if(I.toLowerCase()==="xml")this.fail("the XML declaration must appear at the start of the document.");($=this.piHandler)===null||$===void 0||$.call(this,{target:I,body:this.text}),this.piTarget=this.text="",this.state=R6}else if(q===I6)this.text+="?";else this.text+=`?${String.fromCodePoint(q)}`,this.state=WB;this.xmlDeclPossible=!1}sXMLDeclNameStart(){let $=this.skipSpaces();if($===I6){this.state=I3;return}if($!==Y4)this.state=wn0,this.name=String.fromCodePoint($)}sXMLDeclName(){let $=this.captureTo(Pn0);if($===I6){this.state=I3,this.name+=this.text,this.text="",this.fail("XML declaration is incomplete.");return}if(!(c6($)||$===mI))return;if(this.name+=this.text,this.text="",!this.xmlDeclExpects.includes(this.name))switch(this.name.length){case 0:this.fail("did not expect any more name/value pairs.");break;case 1:this.fail(`expected the name ${this.xmlDeclExpects[0]}.`);break;default:this.fail(`expected one of ${this.xmlDeclExpects.join(", ")}`)}this.state=$===mI?ve:Vn0}sXMLDeclEq(){let $=this.getCodeNorm();if($===I6){this.state=I3,this.fail("XML declaration is incomplete.");return}if(c6($))return;if($!==mI)this.fail("value required.");this.state=ve}sXMLDeclValueStart(){let $=this.getCodeNorm();if($===I6){this.state=I3,this.fail("XML declaration is incomplete.");return}if(c6($))return;if(!wW($))this.fail("value must be quoted."),this.q=Se;else this.q=$;this.state=Wn0}sXMLDeclValue(){let $=this.captureTo([this.q,I6]);if($===I6){this.state=I3,this.text="",this.fail("XML declaration is incomplete.");return}if($===Y4)return;let q=this.text;switch(this.text="",this.name){case"version":{this.xmlDeclExpects=["encoding","standalone"];let I=q;if(this.xmlDecl.version=I,!/^1\.[0-9]+$/.test(I))this.fail("version nu Line truncated
`;$=this.i,q=U3;break;case Y4:if(U!==void 0)this.text+=I.slice($);break $;default:q=U3}this.forbiddenState=q}handleTextOutsideRoot(){let{i:$}=this,{chunk:q,textHandler:I}=this,U=!1;$:while(!0){let Y=this.getCode();switch(Y){case v9:{if(this.state=HB,I!==void 0){let{text:J}=this,Q=q.slice($,this.prevI);if(J.length!==0)I(J+Q),this.text="";else if(Q.length!==0)I(Q)}break $}case W2:if(this.state=KW,this.entityReturnState=R6,I!==void 0)this.text+=q.slice($,this.prevI);U=!0;break $;case B8:if(I!==void 0)this.text+=`${q.slice($,this.prevI)}
`;$=this.i;break;case Y4:if(I!==void 0)this.text+=q.slice($);break $;default:if(!c6(Y))U=!0}}if(!U)return;if(!this.sawRoot&&!this.reportedTextBeforeRoot)this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0;if(this.closedRoot&&!this.reportedTextAfterRoot)this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0}pushAttribNS($,q){var I;let{prefix:U,local:Y}=this.qname($),J={name:$,prefix:U,local:Y,value:q};if(this.attribList.push(J),(I=this.attributeHandler)===null||I===void 0||I.call(this,J),U==="xmlns"){let Q=q.trim();if(this.currentXMLVersion==="1.0"&&Q==="")this.fail("invalid attempt to undefine prefix in XML 1.0");this.topNS[Y]=Q,NB(this,Y,Q)}else if($==="xmlns"){let Q=q.trim();this.topNS[""]=Q,NB(this,"",Q)}}pushAttribPlain($,q){var I;let U={name:$,value:q};this.attribList.push(U),(I=this.attributeHandler)===null||I===void 0||I.call(this,U)}end(){var $,q;if(!this.sawRoot)this.fail("document must contain a root element.");let{tags:I}=this;while(I.length>0){let Y=I.pop();this.fail(`unclosed tag: ${Y.name}`)}if(this.state!==ge&&this.state!==R6)this.fail("unexpected end.");let{text:U}=this;if(U.length!==0)($=this.textHandler)===null||$===void 0||$.call(this,U),this.text="";return this._closed=!0,(q=this.endHandler)===null||q===void 0||q.call(this),this._init(),this}resolve($){var q,I;let U=this.topNS[$];if(U!==void 0)return U;let{tags:Y}=this;for(let J=Y.length-1;J>=0;J--)if(U=Y[J].ns[$],U!==void 0)return U;if(U=this.ns[$],U!==void 0)return U;return(I=(q=this.opt).resolvePrefix)===null||I===void 0?void 0:I.call(q,$)}qname($){let q=$.indexOf(":");if(q===-1)return{prefix:"",local:$};let I=$.slice(q+1),U=$.slice(0,q);if(U===""||I===""||I.includes(":"))this.fail(`malformed name: ${$}.`);return{prefix:U,local:I}}processAttribsNS(){var $;let{attribList:q}=this,I=this.tag;{let{prefix:J,local:Q}=this.qname(I.name);I.prefix=J,I.local=Q;let K=I.uri=($=this.resolve(J))!==null&&$!==void 0?$:"";if(J!==""){if(J==="xmlns")this.fail('tags may not have "xmlns" as prefix.');if(K==="")this.fail(`unbound namespace prefix: ${JSON.stringify(J)}.`),I.uri=J}}if(q.length===0)return;let{attributes:U}=I,Y=new Set;for(let J of q){let{name:Q,prefix:K,local:z}=J,G,H;if(K==="")G=Q==="xmlns"?oI:"",H=Q;else{if(G=this.resolve(K),G===void 0)this.fail(`unbound namespace prefix: ${JSON.stringify(K)}.`),G=K;H=`{${G}}${z}`}if(Y.has(H))this.fail(`duplicate attribute: ${H}.`);Y.add(H),J.uri=G,U[Q]=J}this.attribList=[]}processAttribsPlain(){let{attribList:$}=this,q=this.tag.attributes;for(let{name:I,value:U}of $){if(q[I]!==void 0)this.fail(`duplicate attribute: ${I}.`);q[I]=U}this.attribList=[]}openTag(){var $;this.processAttribs();let{tags:q}=this,I=this.tag;I.isSelfClosing=!1,($=this.openTagHandler)===null||$===void 0||$.call(this,I),q.push(I),this.state=R6,this.name=""}openSelfClosingTag(){var $,q,I;this.processAttribs();let{tags:U}=this,Y=this.tag;if(Y.isSelfClosing=!0,($=this.openTagHandler)===null||$===void 0||$.call(this,Y),(q=this.closeTagHandler)===null||q===void 0||q.call(this,Y),(this.tag=(I=U[U.length-1])!==null&&I!==void 0?I:null)===null)this.closedRoot=!0;this.state=R6,this.name=""}closeTag(){let{tags:$,name:q}=this;if(this.state=R6,this.name="",q===""){this.fail("weird empty close tag."),this.text+="</>";return}let I=this.closeTagHandler,U=$.length;while(U-- >0){let Y=this.tag=$.pop();if(this.topNS=Y.ns,I===null||I===void 0||I(Y),Y.name===q)break;this.fail("unexpected close tag.")}if(U===0)this.closedRoot=!0;else if(U<0)this.fail(`unmatched closing tag: ${q}.`),this.text+=`</${q}>`}parseEntity($){if($[0]!=="#"){let I=this.ENTITIES[$];if(I!==void 0)return I;return this.fail(this.isName($)?"undefined entity.":"disallowed character in entity name."),`&${$};`}let q=NaN;if($[1]==="x"&&/^#x[0-9a-f]+$/i.test($))q=parseInt($.slice(2),16);else if(/^#[0-9]+$/.test($))q=parseInt($.slice(1),10);if(!this.isChar(q))return this.fail("malformed character entity."),`&${$};`;return String.fromCodePoint(q)}}me.SaxesParser=de});var Z2=O((TP1,oe)=>{var{SaxesParser:vn0}=le(),{PassThrough:Cn0}=X6(),{bufferToString:_n0}=IB();oe.exports=async function*($){if($.pipe&&!$[Symbol.asyncIterator])$=$.pipe(new Cn0);let q=new vn0,I;q.on("error",(Y)=>{I=Y});let U=[];q.on("opentag",(Y)=>U.push({eventType:"opentag",value:Y})),q.on("text",(Y)=>U.push({eventType:"text",value:Y})),q.on("closetag",(Y)=>U.push({eventType:"closetag",value:Y}));for await(let Y of $){if(q.write(_n0(Y)),I)throw I;yield U,U=[]}}});var Z0=O((EP1,re)=>{var hn0=Z2(),Sn0=q6();class tI{prepare(){}render(){}parseOpen($){}parseText($){}parseClose($){}reconcile($,q){}reset(){if(this.model=null,this.map)Object.values(this.map).forEach(($)=>{if($ instanceof tI)$.reset();else if($.xform)$.xform.reset()})}mergeModel($){this.model=Object.assign(this.model||{},$)}async parse($){for await(let q of $)for(let{eventType:I,value:U}of q)if(I==="opentag")this.parseOpen(U);else if(I==="text")this.parseText(U);else if(I==="closetag"){if(!this.parseClose(U.name))return this.modeLine truncated
<a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme"> <a:themeElements> <a:clrScheme name="Office"> <a:dk1> <a:sysClr val="windowText" lastClr="000000"/> </a:dk1> <a:lt1> <a:sysClr val="window" lastClr="FFFFFF"/> </a:lt1> <a:dk2> <a:srgbClr val="1F497D"/> </a:dk2> <a:lt2> <a:srgbClr val="EEECE1"/> </a:lt2> <a:accent1> <a:srgbClr val="4F81BD"/> </a:accent1> <a:accent2> <a:srgbClr val="C0504D"/> </a:accent2> <a:accent3> <a:srgbClr val="9BBB59"/> </a:accent3> <a:accent4> <a:srgbClr val="8064A2"/> </a:accent4> <a:accent5> <a:srgbClr val="4BACC6"/> </a:accent5> <a:accent6> <a:srgbClr val="F79646"/> </a:accent6> <a:hlink> <a:srgbClr val="0000FF"/> </a:hlink> <a:folHlink> <a:srgbClr val="800080"/> </a:folHlink> </a:clrScheme> <a:fontScheme name="Office"> <a:majorFont> <a:latin typeface="Cambria"/> <a:ea typeface=""/> <a:cs typeface=""/> <a:font script="Jpan" typeface="MS Pゴシック"/> <a:font script="Hang" typeface="맑은 고딕"/> <a:font script="Hans" typeface="宋体"/> <a:font script="Hant" typeface="新細明體"/> <a:font script="Arab" typeface="Times New Roman"/> <a:font script="Hebr" typeface="Times New Roman"/> <a:font script="Thai" typeface="Tahoma"/> <a:font script="Ethi" typeface="Nyala"/> <a:font script="Beng" typeface="Vrinda"/> <a:font script="Gujr" typeface="Shruti"/> <a:font script="Khmr" typeface="MoolBoran"/> <a:font script="Knda" typeface="Tunga"/> <a:font script="Guru" typeface="Raavi"/> <a:font script="Cans" typeface="Euphemia"/> <a:font script="Cher" typeface="Plantagenet Cherokee"/> <a:font script="Yiii" typeface="Microsoft Yi Baiti"/> <a:font script="Tibt" typeface="Microsoft Himalaya"/> <a:font script="Thaa" typeface="MV Boli"/> <a:font script="Deva" typeface="Mangal"/> <a:font script="Telu" typeface="Gautami"/> <a:font script="Taml" typeface="Latha"/> <a:font script="Syrc" typeface="Estrangelo Edessa"/> <a:font script="Orya" typeface="Kalinga"/> <a:font script="Mlym" typeface="Kartika"/> <a:font script="Laoo" typeface="DokChampa"/> <a:font script="Sinh" typeface="Iskoola Pota"/> <a:font script="Mong" typeface="Mongolian Baiti"/> <a:font script="Viet" typeface="Times New Roman"/> <a:font script="Uigh" typeface="Microsoft Uighur"/> <a:font script="Geor" typeface="Sylfaen"/> </a:majorFont> <a:minorFont> <a:latin typeface="Calibri"/> <a:ea typeface=""/> <a:cs typeface=""/> <a:font script="Jpan" typeface="MS Pゴシック"/> <a:font script="Hang" typeface="맑은 고딕"/> <a:font script="Hans" typeface="宋体"/> <a:font script="Hant" typeface="新細明體"/> <a:font script="Arab" typeface="Arial"/> <a:font script="Hebr" typeface="Arial"/> <a:font script="Thai" typeface="Tahoma"/> <a:font script="Ethi" typeface="Nyala"/> <a:font script="Beng" typeface="Vrinda"/> <a:font script="Gujr" typeface="Shruti"/> <a:font script="Khmr" typeface="DaunPenh"/> <a:font script="Knda" typeface="Tunga"/> <a:font script="Guru" typeface="Raavi"/> <a:font script="Cans" typeface="Euphemia"/> <a:font script="Cher" typeface="Plantagenet Cherokee"/> <a:font script="Yiii" typeface="Microsoft Yi Baiti"/> <a:font script="Tibt" typeface="Microsoft Himalaya"/> <a:font script="Thaa" typeface="MV Boli"/> <a:font script="Deva" typeface="Mangal"/> <a:font script="Telu" typeface="Gautami"/> <a:font script="Taml" typeface="Latha"/> <a:font script="Syrc" typeface="Estrangelo Edessa"/> <a:font script="Orya" typeface="Kalinga"/> <a:font script="Mlym" typeface="Kartika"/> <a:font script="Laoo" typeface="DokChampa"/> <a:font script="Sinh" typeface="Iskoola Pota"/> <a:font script="Mong" typeface="Mongolian Baiti"/> <a:font script="Viet" typeface="Arial"/> <a:font script="Uigh" typeface="Microsoft Uighur"/> <a:font script="Geor" typeface="Sylfaen"/> </a:minorFont> </a:fontScheme> <a:fmtScheme name="Office"> <a:fillStyleLst> <a:solidFill> <a:schemeClr val="phClr"/> </a:solidFill> <a:gradFill rotWithShape="1"> <a:gsLst> <a:gs pos="0"> <a:schemeClr val="phClr"> <a:tint val="50000"/> <a:satMod val="300000"/> </a:schemeClr> </a:gs> <a:gs pos="35000"> <a:schemeClr val="phClr"> <a:tint val="37000"/> <a:satMod val="300000"/> </a:schemeClr> </a:gs> <a:gs pos="100000"> <a:schemeClr val="phClr"> <a:tint val="15000"/> <a:satMod val="350000"/> </a:schemeClr> </a:gs> </a:gsLst> <a:lin ang="16200000" scaled="1"/> </a:gradFill> <a:gradFill rotWithShape="1"> <a:gsLst> <a:gs pos="0"> <a:schemeClr val="phClr"> <a:tint val="100000"/> <a:shade val="100000"/> <a:satMod val="130000"/> </a:schemeClr> </a:gs> <a:gs pos="100000"> <a:schemeClr val="phClr"> <a:tint val="50000"/> <a:shade val="100000"/> <a:satMod val="350000"/> </a:schemeClr> </a:gs> </a:gsLst> <a:lin ang="16200000" scaled="0"/> </a:gradFill> </a:fillStyleLst> <a:lnStyleLst> <a:ln w="9525" cap="flat" cmpd="sng" algn="ctr"> <a:solidFill> <a:schemeClr val="phClr"> <a:shade val="95000"/> <a:satMod val="105000"/> </a:schemeClr> </a:solidFill> <a:prstDash val="solid"/> </a:ln> <a:ln w="25400" cap="flat" cmpd="sng" algn="ctr"> <a:solidFill> <a:Line truncated
`,this.quote='"',this.escape=this.quote,this.quoteColumns=!1,this.quoteHeaders=this.quoteColumns,this.headers=null,this.includeEndRowDelimiter=!1,this.writeBOM=!1,this.BOM="\uFEFF",this.alwaysWriteHeaders=!1,Object.assign(this,$||{}),typeof($===null||$===void 0?void 0:$.quoteHeaders)>"u")this.quoteHeaders=this.quoteColumns;if(($===null||$===void 0?void 0:$.quote)===!0)this.quote='"';else if(($===null||$===void 0?void 0:$.quote)===!1)this.quote="";if(typeof($===null||$===void 0?void 0:$.escape)!=="string")this.escape=this.quote;this.shouldWriteHeaders=!!this.headers&&((q=$.writeHeaders)!==null&&q!==void 0?q:!0),this.headers=Array.isArray(this.headers)?this.headers:null,this.escapedQuote=`${this.escape}${this.quote}`}}E50.FormatterOptions=T50});var dW=O((tE1,v50)=>{var cl0="[object AsyncFunction]",dl0="[object Function]",ml0="[object GeneratorFunction]",ll0="[object Null]",ol0="[object Proxy]",rl0="[object Undefined]",tl0=typeof global=="object"&&global&&global.Object===Object&&global,al0=typeof self=="object"&&self&&self.Object===Object&&self,sl0=tl0||al0||Function("return this")(),B50=Object.prototype,el0=B50.hasOwnProperty,R50=B50.toString,g50=sl0.Symbol,H3=g50?g50.toStringTag:void 0;function $o0($){if($==null)return $===void 0?rl0:ll0;return H3&&H3 in Object($)?qo0($):Io0($)}function qo0($){var q=el0.call($,H3),I=$[H3];try{$[H3]=void 0;var U=!0}catch(J){}var Y=R50.call($);if(U)if(q)$[H3]=I;else delete $[H3];return Y}function Io0($){return R50.call($)}function Uo0($){if(!Yo0($))return!1;var q=$o0($);return q==dl0||q==ml0||q==cl0||q==ol0}function Yo0($){var q=typeof $;return $!=null&&(q=="object"||q=="function")}v50.exports=Uo0});var w90=O((mW,QU)=>{var Jo0=200,pR="__lodash_hash_undefined__",$Z=1,i50=2,p50=9007199254740991,lW="[object Arguments]",uR="[object Array]",Qo0="[object AsyncFunction]",c50="[object Boolean]",d50="[object Date]",m50="[object Error]",l50="[object Function]",Ko0="[object GeneratorFunction]",oW="[object Map]",o50="[object Number]",zo0="[object Null]",JU="[object Object]",C50="[object Promise]",Go0="[object Proxy]",r50="[object RegExp]",rW="[object Set]",t50="[object String]",Ho0="[object Symbol]",wo0="[object Undefined]",xR="[object WeakMap]",a50="[object ArrayBuffer]",tW="[object DataView]",Vo0="[object Float32Array]",Wo0="[object Float64Array]",Zo0="[object Int8Array]",Xo0="[object Int16Array]",Lo0="[object Int32Array]",Do0="[object Uint8Array]",Oo0="[object Uint8ClampedArray]",No0="[object Uint16Array]",Fo0="[object Uint32Array]",Mo0=/[\\^$.*+?()[\]{}|]/g,Ao0=/^\[object .+?Constructor\]$/,Po0=/^(?:0|[1-9]\d*)$/,o1={};o1[Vo0]=o1[Wo0]=o1[Zo0]=o1[Xo0]=o1[Lo0]=o1[Do0]=o1[Oo0]=o1[No0]=o1[Fo0]=!0;o1[lW]=o1[uR]=o1[a50]=o1[c50]=o1[tW]=o1[d50]=o1[m50]=o1[l50]=o1[oW]=o1[o50]=o1[JU]=o1[r50]=o1[rW]=o1[t50]=o1[xR]=!1;var s50=typeof global=="object"&&global&&global.Object===Object&&global,To0=typeof self=="object"&&self&&self.Object===Object&&self,O5=s50||To0||Function("return this")(),e50=typeof mW=="object"&&mW&&!mW.nodeType&&mW,_50=e50&&typeof QU=="object"&&QU&&!QU.nodeType&&QU,$90=_50&&_50.exports===e50,hR=$90&&s50.process,h50=function(){try{return hR&&hR.binding&&hR.binding("util")}catch($){}}(),S50=h50&&h50.isTypedArray;function Eo0($,q){var I=-1,U=$==null?0:$.length,Y=0,J=[];while(++I<U){var Q=$[I];if(q(Q,I,$))J[Y++]=Q}return J}function jo0($,q){var I=-1,U=q.length,Y=$.length;while(++I<U)$[Y+I]=q[I];return $}function go0($,q){var I=-1,U=$==null?0:$.length;while(++I<U)if(q($[I],I,$))return!0;return!1}function Bo0($,q){var I=-1,U=Array($);while(++I<$)U[I]=q(I);return U}function Ro0($){return function(q){return $(q)}}function vo0($,q){return $.has(q)}function Co0($,q){return $==null?void 0:$[q]}function _o0($){var q=-1,I=Array($.size);return $.forEach(function(U,Y){I[++q]=[Y,U]}),I}function ho0($,q){return function(I){return $(q(I))}}function So0($){var q=-1,I=Array($.size);return $.forEach(function(U){I[++q]=U}),I}var yo0=Array.prototype,uo0=Function.prototype,qZ=Object.prototype,SR=O5["__core-js_shared__"],q90=uo0.toString,v8=qZ.hasOwnProperty,y50=function(){var $=/[^.]+$/.exec(SR&&SR.keys&&SR.keys.IE_PROTO||"");return $?"Symbol(src)_1."+$:""}(),I90=qZ.toString,xo0=RegExp("^"+q90.call(v8).replace(Mo0,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),u50=$90?O5.Buffer:void 0,aW=O5.Symbol,x50=O5.Uint8Array,U90=qZ.propertyIsEnumerable,ko0=yo0.splice,w3=aW?aW.toStringTag:void 0,k50=Object.getOwnPropertySymbols,fo0=u50?u50.isBuffer:void 0,bo0=ho0(Object.keys,Object),kR=KU(O5,"DataView"),M2=KU(O5,"Map"),fR=KU(O5,"Promise"),bR=KU(O5,"Set"),nR=KU(O5,"WeakMap"),A2=KU(Object,"create"),no0=Z3(kR),io0=Z3(M2),po0=Z3(fR),co0=Z3(bR),do0=Z3(nR),f50=aW?aW.prototype:void 0,yR=f50?f50.valueOf:void 0;function V3($){var q=-1,I=$==null?0:$.length;this.clear();while(++q<I){var U=$[q];this.set(U[0],U[1])}}function mo0(){this.__data__=A2?A2(null):{},this.size=0}function lo0($){var q=this.has($)&&delete this.__data__[$];return this.size-=q?1:0,q}function oo0($){var q=this.__data Line truncated
]`;this.ESCAPE_REGEXP=new RegExp(q)}set headers($){this._headers=$}shouldQuote($,q){let I=q?this.formatterOptions.quoteHeaders:this.formatterOptions.quoteColumns;if($t0.default(I))return I;if(Array.isArray(I))return I[$];if(this._headers!==null)return I[this._headers[$]];return!1}format($,q,I){let U=`${qt0.default($)?"":$}`.replace(/\0/g,""),{formatterOptions:Y}=this;if(Y.quote!==""){if(U.indexOf(Y.quote)!==-1)return this.quoteField(U.replace(this.REPLACE_REGEXP,Y.escapedQuote))}if(U.search(this.ESCAPE_REGEXP)!==-1||this.shouldQuote(q,I))return this.quoteField(U);return U}quoteField($){let{quote:q}=this.formatterOptions;return`${q}${$}${q}`}}zU.FieldFormatter=F90});var oR=O((M90)=>{Object.defineProperty(M90,"__esModule",{value:!0});M90.isSyncTransform=void 0;M90.isSyncTransform=($)=>$.length===1});var T90=O((GU)=>{var P90=GU&&GU.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(GU,"__esModule",{value:!0});GU.RowFormatter=void 0;var Ut0=P90(dW()),Yt0=P90(w90()),Jt0=lR(),Qt0=oR();class X3{constructor($){if(this.rowCount=0,this.formatterOptions=$,this.fieldFormatter=new Jt0.FieldFormatter($),this.headers=$.headers,this.shouldWriteHeaders=$.shouldWriteHeaders,this.hasWrittenHeaders=!1,this.headers!==null)this.fieldFormatter.headers=this.headers;if($.transform)this.rowTransform=$.transform}static isRowHashArray($){if(Array.isArray($))return Array.isArray($[0])&&$[0].length===2;return!1}static isRowArray($){return Array.isArray($)&&!this.isRowHashArray($)}static gatherHeaders($){if(X3.isRowHashArray($))return $.map((q)=>q[0]);if(Array.isArray($))return $;return Object.keys($)}static createTransform($){if(Qt0.isSyncTransform($))return(q,I)=>{let U=null;try{U=$(q)}catch(Y){return I(Y)}return I(null,U)};return(q,I)=>{$(q,I)}}set rowTransform($){if(!Ut0.default($))throw TypeError("The transform should be a function");this._rowTransform=X3.createTransform($)}format($,q){this.callTransformer($,(I,U)=>{if(I)return q(I);if(!$)return q(null);let Y=[];if(U){let{shouldFormatColumns:J,headers:Q}=this.checkHeaders(U);if(this.shouldWriteHeaders&&Q&&!this.hasWrittenHeaders)Y.push(this.formatColumns(Q,!0)),this.hasWrittenHeaders=!0;if(J){let K=this.gatherColumns(U);Y.push(this.formatColumns(K,!1))}}return q(null,Y)})}finish($){let q=[];if(this.formatterOptions.alwaysWriteHeaders&&this.rowCount===0){if(!this.headers)return $(Error("`alwaysWriteHeaders` option is set to true but `headers` option not provided."));q.push(this.formatColumns(this.headers,!0))}if(this.formatterOptions.includeEndRowDelimiter)q.push(this.formatterOptions.rowDelimiter);return $(null,q)}checkHeaders($){if(this.headers)return{shouldFormatColumns:!0,headers:this.headers};let q=X3.gatherHeaders($);if(this.headers=q,this.fieldFormatter.headers=q,!this.shouldWriteHeaders)return{shouldFormatColumns:!0,headers:null};return{shouldFormatColumns:!Yt0.default(q,$),headers:q}}gatherColumns($){if(this.headers===null)throw Error("Headers is currently null");if(!Array.isArray($))return this.headers.map((q)=>$[q]);if(X3.isRowHashArray($))return this.headers.map((q,I)=>{let U=$[I];if(U)return U[1];return""});if(X3.isRowArray($)&&!this.shouldWriteHeaders)return $;return this.headers.map((q,I)=>$[I])}callTransformer($,q){if(!this._rowTransform)return q(null,$);return this._rowTransform($,q)}formatColumns($,q){let I=$.map((Y,J)=>this.fieldFormatter.format(Y,J,q)).join(this.formatterOptions.delimiter),{rowCount:U}=this;if(this.rowCount+=1,U)return[this.formatterOptions.rowDelimiter,I].join("");return I}}GU.RowFormatter=X3});var E90=O((YZ)=>{Object.defineProperty(YZ,"__esModule",{value:!0});YZ.FieldFormatter=YZ.RowFormatter=void 0;var Kt0=T90();Object.defineProperty(YZ,"RowFormatter",{enumerable:!0,get:function(){return Kt0.RowFormatter}});var zt0=lR();Object.defineProperty(YZ,"FieldFormatter",{enumerable:!0,get:function(){return zt0.FieldFormatter}})});var rR=O((g90)=>{Object.defineProperty(g90,"__esModule",{value:!0});g90.CsvFormatterStream=void 0;var Ht0=r("stream"),wt0=E90();class j90 extends Ht0.Transform{constructor($){super({writableObjectMode:$.objectMode});this.hasWrittenBOM=!1,this.formatterOptions=$,this.rowFormatter=new wt0.RowFormatter($),this.hasWrittenBOM=!$.writeBOM}transform($){return this.rowFormatter.rowTransform=$,this}_transform($,q,I){let U=!1;try{if(!this.hasWrittenBOM)this.push(this.formatterOptions.BOM),this.hasWrittenBOM=!0;this.rowFormatter.format($,(Y,J)=>{if(Y)return U=!0,I(Y);if(J)J.forEach((Q)=>{this.push(Buffer.from(Q,"utf8"))});return U=!0,I()})}catch(Y){if(U)throw Y;I(Y)}}_flush($){this.rowFormatter.finish((q,I)=>{if(q)return $(q);if(I)I.forEach((U)=>{this.push(Buffer.from(U,"utf8"))});return $()})}}g90.CsvFormatterStream=j90});var v90=O((F1)=>{var R90=F1&&F1.__createBinding||(Object.create?function($,q,I,U){if(U===void 0)U=I;Object.defineProperty($,U,{enumerable:!0,get:function(){return q[I]}})}:function($,q,I,U){if(U===void 0)U=I;$[U]=q[I]}),Vt0=F1&&F1.__setModuleDefault||(Object.create?function($,q){Ob Line truncated
`||q===`\r
`}static isTokenCarriageReturn($,q){return $.token===q.carriageReturn}static isTokenComment($,q){return q.supportsComments&&!!$&&$.token===q.comment}static isTokenEscapeCharacter($,q){return $.token===q.escapeChar}static isTokenQuote($,q){return $.token===q.quote}static isTokenDelimiter($,q){return $.token===q.delimiter}}wq0.Token=zq0});var MC=O((Wq0)=>{Object.defineProperty(Wq0,"__esModule",{value:!0});Wq0.Scanner=void 0;var Hq0=p9(),x11=/((?:\r\n)|\n|\r)/;class Vq0{constructor($){this.cursor=0,this.line=$.line,this.lineLength=this.line.length,this.parserOptions=$.parserOptions,this.hasMoreData=$.hasMoreData,this.cursor=$.cursor||0}get hasMoreCharacters(){return this.lineLength>this.cursor}get nextNonSpaceToken(){let{lineFromCursor:$}=this,q=this.parserOptions.NEXT_TOKEN_REGEXP;if($.search(q)===-1)return null;let I=q.exec($);if(I==null)return null;let U=I[1],Y=this.cursor+(I.index||0);return new Hq0.Token({token:U,startCursor:Y,endCursor:Y+U.length-1})}get nextCharacterToken(){let{cursor:$,lineLength:q}=this;if(q<=$)return null;return new Hq0.Token({token:this.line[$],startCursor:$,endCursor:$})}get lineFromCursor(){return this.line.substr(this.cursor)}advancePastLine(){let $=x11.exec(this.lineFromCursor);if(!$){if(this.hasMoreData)return null;return this.cursor=this.lineLength,this}return this.cursor+=($.index||0)+$[0].length,this}advanceTo($){return this.cursor=$,this}advanceToToken($){return this.cursor=$.startCursor,this}advancePastToken($){return this.cursor=$.endCursor+1,this}truncateToCursor(){return this.line=this.lineFromCursor,this.lineLength=this.line.length,this.cursor=0,this}}Wq0.Scanner=Vq0});var aZ=O((Lq0)=>{Object.defineProperty(Lq0,"__esModule",{value:!0});Lq0.ColumnFormatter=void 0;class Xq0{constructor($){if($.trim)this.format=(q)=>q.trim();else if($.ltrim)this.format=(q)=>q.trimLeft();else if($.rtrim)this.format=(q)=>q.trimRight();else this.format=(q)=>q}}Lq0.ColumnFormatter=Xq0});var AC=O((Fq0)=>{Object.defineProperty(Fq0,"__esModule",{value:!0});Fq0.NonQuotedColumnParser=void 0;var k11=aZ(),Oq0=p9();class Nq0{constructor($){this.parserOptions=$,this.columnFormatter=new k11.ColumnFormatter($)}parse($){if(!$.hasMoreCharacters)return null;let{parserOptions:q}=this,I=[],U=$.nextCharacterToken;for(;U;U=$.nextCharacterToken){if(Oq0.Token.isTokenDelimiter(U,q)||Oq0.Token.isTokenRowDelimiter(U))break;I.push(U.token),$.advancePastToken(U)}return this.columnFormatter.format(I.join(""))}}Fq0.NonQuotedColumnParser=Nq0});var PC=O((Pq0)=>{Object.defineProperty(Pq0,"__esModule",{value:!0});Pq0.QuotedColumnParser=void 0;var f11=aZ(),BU=p9();class Aq0{constructor($){this.parserOptions=$,this.columnFormatter=new f11.ColumnFormatter($)}parse($){if(!$.hasMoreCharacters)return null;let q=$.cursor,{foundClosingQuote:I,col:U}=this.gatherDataBetweenQuotes($);if(!I){if($.advanceTo(q),!$.hasMoreData)throw Error(`Parse Error: missing closing: '${this.parserOptions.quote||""}' in line: at '${$.lineFromCursor.replace(/[\r\n]/g,"\\n'")}'`);return null}return this.checkForMalformedColumn($),U}gatherDataBetweenQuotes($){let{parserOptions:q}=this,I=!1,U=!1,Y=[],J=$.nextCharacterToken;for(;!U&&J!==null;J=$.nextCharacterToken){let Q=BU.Token.isTokenQuote(J,q);if(!I&&Q)I=!0;else if(I)if(BU.Token.isTokenEscapeCharacter(J,q)){$.advancePastToken(J);let K=$.nextCharacterToken;if(K!==null&&(BU.Token.isTokenQuote(K,q)||BU.Token.isTokenEscapeCharacter(K,q)))Y.push(K.token),J=K;else if(Q)U=!0;else Y.push(J.token)}else if(Q)U=!0;else Y.push(J.token);$.advancePastToken(J)}return{col:this.columnFormatter.format(Y.join("")),foundClosingQuote:U}}checkForMalformedColumn($){let{parserOptions:q}=this,{nextNonSpaceToken:I}=$;if(I){let U=BU.Token.isTokenDelimiter(I,q),Y=BU.Token.isTokenRowDelimiter(I);if(!(U||Y)){let J=$.lineFromCursor.substr(0,10).replace(/[\r\n]/g,"\\n'");throw Error(`Parse Error: expected: '${q.escapedDelimiter}' OR new line got: '${I.token}'. at '${J}`)}$.advanceToToken(I)}else if(!$.hasMoreData)$.advancePastLine()}}Pq0.QuotedColumnParser=Aq0});var Bq0=O((gq0)=>{Object.defineProperty(gq0,"__esModule",{value:!0});gq0.ColumnParser=void 0;var n11=AC(),b11=PC(),i11=p9();class Eq0{constructor($){this.parserOptions=$,this.quotedColumnParser=new b11.QuotedColumnParser($),this.nonQuotedColumnParser=new n11.NonQuotedColumnParser($)}parse($){let{nextNonSpaceToken:q}=$;if(q!==null&&i11.Token.isTokenQuote(q,this.parserOptions))return $.advanceToToken(q),this.quotedColumnParser.parse($);return this.nonQuotedColumnParser.parse($)}}gq0.ColumnParser=Eq0});var TC=O((RU)=>{Object.defineProperty(RU,"__esModule",{value:!0});RU.ColumnFormatter=RU.QuotedColumnParser=RU.NonQuotedColumnParser=RU.ColumnParser=void 0;var p11=Bq0();Object.defineProperty(RU,"ColumnParser",{enumerable:!0,get:function(){return p11.ColumnParser}});var c11=AC();Object.defineProperty(RU,"NonQuotedColumnParser",{enumerable:!0,get:function(){return c11.NonQuotedColumnParser}});var d11=PC();Object.defineProperty(RU,"QuotedColumnParser",{enumerable:!0,get:function(){re Line truncated
%s`,k,k,W,U);let h=W.type==="*"?nC:W.type==="?"?pC:"\\"+W.type;Y=!0,U=U.slice(0,W.reStart)+h+"\\("+k}if(T(),J)U+="\\\\";let P=u41[U.charAt(0)];for(let k=K.length-1;k>-1;k--){let h=K[k],f=U.slice(0,h.reStart),S=U.slice(h.reStart,h.reEnd-8),t=U.slice(h.reEnd),p=U.slice(h.reEnd-8,h.reEnd)+t,C=f.split(")").length,n=f.split("(").length-C,b=t;for(let g=0;g<n;g++)b=b.replace(/\)[+*?]?/,"");t=b;let J0=t===""&&q!==bC?"(?:$|\\/)":"";U=f+S+t+J0+p}if(U!==""&&Y)U="(?=.)"+U;if(P)U=N()+U;if(q===bC)return[U,Y];if(I.nocase&&!Y)Y=$.toUpperCase()!==$.toLowerCase();if(!Y)return k41($);let B=I.nocase?"i":"";try{return Object.assign(new RegExp("^"+U+"$",B),{_glob:$,_src:U})}catch(k){return new RegExp("$.")}}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let $=this.set;if(!$.length)return this.regexp=!1,this.regexp;let q=this.options,I=q.noglobstar?nC:q.dot?S41:y41,U=q.nocase?"i":"",Y=$.map((J)=>{return J=J.map((Q)=>typeof Q==="string"?n41(Q):Q===C6?C6:Q._src).reduce((Q,K)=>{if(!(Q[Q.length-1]===C6&&K===C6))Q.push(K);return Q},[]),J.forEach((Q,K)=>{if(Q!==C6||J[K-1]===C6)return;if(K===0)if(J.length>1)J[K+1]="(?:\\/|"+I+"\\/)?"+J[K+1];else J[K]=I;else if(K===J.length-1)J[K-1]+="(?:\\/|"+I+")?";else J[K-1]+="(?:\\/|\\/"+I+"\\/)"+J[K+1],J[K+1]=C6}),J.filter((Q)=>Q!==C6).join("/")}).join("|");if(Y="^(?:"+Y+")$",this.negate)Y="^(?!"+Y+").*$";try{this.regexp=new RegExp(Y,U)}catch(J){this.regexp=!1}return this.regexp}match($,q=this.partial){if(this.debug("match",$,this.pattern),this.comment)return!1;if(this.empty)return $==="";if($==="/"&&q)return!0;let I=this.options;if(iC.sep!=="/")$=$.split(iC.sep).join("/");$=$.split(FI0),this.debug(this.pattern,"split",$);let U=this.set;this.debug(this.pattern,"set",U);let Y;for(let J=$.length-1;J>=0;J--)if(Y=$[J],Y)break;for(let J=0;J<U.length;J++){let Q=U[J],K=$;if(I.matchBase&&Q.length===1)K=[Y];if(this.matchOne(K,Q,q)){if(I.flipNegate)return!0;return!this.negate}}if(I.flipNegate)return!1;return this.negate}static defaults($){return Q$.defaults($).Minimatch}}Q$.Minimatch=u2});var BI0=O((KB1,jI0)=>{jI0.exports=gI0;var lC=o("fs"),{EventEmitter:i41}=o("events"),{Minimatch:dC}=PI0(),{resolve:p41}=o("path");function c41($,q){return new Promise((I,U)=>{lC.readdir($,{withFileTypes:!0},(Y,J)=>{if(Y)switch(Y.code){case"ENOTDIR":if(q)U(Y);else I([]);break;case"ENOTSUP":case"ENOENT":case"ENAMETOOLONG":case"UNKNOWN":I([]);break;case"ELOOP":default:U(Y);break}else I(J)})})}function TI0($,q){return new Promise((I,U)=>{(q?lC.stat:lC.lstat)($,(J,Q)=>{if(J)switch(J.code){case"ENOENT":if(q)I(TI0($,!1));else I(null);break;default:I(null);break}else I(Q)})})}async function*EI0($,q,I,U,Y,J){let Q=await c41(q+$,J);for(let K of Q){let z=K.name;if(z===void 0)z=K,U=!0;let w=$+"/"+z,G=w.slice(1),H=q+"/"+G,V=null;if(U||I)V=await TI0(H,I);if(!V&&K.name!==void 0)V=K;if(V===null)V={isDirectory:()=>!1};if(V.isDirectory()){if(!Y(G))yield{relative:G,absolute:H,stats:V},yield*EI0(w,q,I,U,Y,!1)}else yield{relative:G,absolute:H,stats:V}}}async function*d41($,q,I,U){yield*EI0("",$,q,I,U,!0)}function l41($){return{pattern:$.pattern,dot:!!$.dot,noglobstar:!!$.noglobstar,matchBase:!!$.matchBase,nocase:!!$.nocase,ignore:$.ignore,skip:$.skip,follow:!!$.follow,stat:!!$.stat,nodir:!!$.nodir,mark:!!$.mark,silent:!!$.silent,absolute:!!$.absolute}}class mC extends i41{constructor($,q,I){super();if(typeof q==="function")I=q,q=null;if(this.options=l41(q||{}),this.matchers=[],this.options.pattern){let U=Array.isArray(this.options.pattern)?this.options.pattern:[this.options.pattern];this.matchers=U.map((Y)=>new dC(Y,{dot:this.options.dot,noglobstar:this.options.noglobstar,matchBase:this.options.matchBase,nocase:this.options.nocase}))}if(this.ignoreMatchers=[],this.options.ignore){let U=Array.isArray(this.options.ignore)?this.options.ignore:[this.options.ignore];this.ignoreMatchers=U.map((Y)=>new dC(Y,{dot:!0}))}if(this.skipMatchers=[],this.options.skip){let U=Array.isArray(this.options.skip)?this.options.skip:[this.options.skip];this.skipMatchers=U.map((Y)=>new dC(Y,{dot:!0}))}if(this.iterator=d41(p41($||"."),this.options.follow,this.options.stat,this._shouldSkipDirectory.bind(this)),this.paused=!1,this.inactive=!1,this.aborted=!1,I)this._matches=[],this.on("match",(U)=>this._matches.push(this.options.absolute?U.absolute:U.relative)),this.on("error",(U)=>I(U)),this.on("end",()=>I(null,this._matches));setTimeout(()=>this._next(),0)}_shouldSkipDirectory($){return this.skipMatchers.some((q)=>q.match($))}_fileMatches($,q){let I=$+(q?"/":"");return(this.matchers.length===0||this.matchers.some((U)=>U.match(I)))&&!this.ignoreMatchers.some((U)=>U.match(I))&&(!this.options.nodir||!q)}_next(){if(!this.paused&&!this.aborted)this.iterator.next().then(($)=>{if(!$.done){let q=$.value.stats.isDirectory();if(this._fileMatches($.value.relative,q)){let I=$.value.relative,U=$.value.absolute;if(this.options.mark&&q)I+="/",U+="/";if(this.options.stat)this.emit("match",{relative:I,absolute:U,stat:$.value.stats});else this.emit("match",{relative:I,ab Line truncated
`,v);v=$0===-1?A.length:$0}else if(i!==-1&&A[v]==="/"&&A[v+1]==="*"){let $0=A.indexOf("*/",v);if($0!==-1)v=$0+2,i=A.indexOf("*/",v);else j+=A[v],v++}else j+=A[v],v++;return j}function d8(A){let j=V$(A.toString()),v=j.match(H$);if(!v)v=j.match(S$);if(!v)throw Error(`could not parse args in autoInject
`}static isTokenCarriageReturn($,q){return $.token===q.carriageReturn}static isTokenComment($,q){return q.supportsComments&&!!$&&$.token===q.comment}static isTokenEscapeCharacter($,q){return $.token===q.escapeChar}static isTokenQuote($,q){return $.token===q.quote}static isTokenDelimiter($,q){return $.token===q.delimiter}}C70.Token=v70});var Nv=O((y70)=>{Object.defineProperty(y70,"__esModule",{value:!0});y70.Scanner=void 0;var h70=n9(),Fe0=/((?:\r\n)|\n|\r)/;class S70{constructor($){this.cursor=0,this.line=$.line,this.lineLength=this.line.length,this.parserOptions=$.parserOptions,this.hasMoreData=$.hasMoreData,this.cursor=$.cursor||0}get hasMoreCharacters(){return this.lineLength>this.cursor}get nextNonSpaceToken(){let{lineFromCursor:$}=this,q=this.parserOptions.NEXT_TOKEN_REGEXP;if($.search(q)===-1)return null;let I=q.exec($);if(I==null)return null;let U=I[1],Y=this.cursor+(I.index||0);return new h70.Token({token:U,startCursor:Y,endCursor:Y+U.length-1})}get nextCharacterToken(){let{cursor:$,lineLength:q}=this;if(q<=$)return null;return new h70.Token({token:this.line[$],startCursor:$,endCursor:$})}get lineFromCursor(){return this.line.substr(this.cursor)}advancePastLine(){let $=Fe0.exec(this.lineFromCursor);if(!$){if(this.hasMoreData)return null;return this.cursor=this.lineLength,this}return this.cursor+=($.index||0)+$[0].length,this}advanceTo($){return this.cursor=$,this}advanceToToken($){return this.cursor=$.startCursor,this}advancePastToken($){return this.cursor=$.endCursor+1,this}truncateToCursor(){return this.line=this.lineFromCursor,this.lineLength=this.line.length,this.cursor=0,this}}y70.Scanner=S70});var gZ=O((k70)=>{Object.defineProperty(k70,"__esModule",{value:!0});k70.ColumnFormatter=void 0;class x70{constructor($){if($.trim)this.format=(q)=>q.trim();else if($.ltrim)this.format=(q)=>q.trimLeft();else if($.rtrim)this.format=(q)=>q.trimRight();else this.format=(q)=>q}}k70.ColumnFormatter=x70});var Fv=O((i70)=>{Object.defineProperty(i70,"__esModule",{value:!0});i70.NonQuotedColumnParser=void 0;var Me0=gZ(),b70=n9();class n70{constructor($){this.parserOptions=$,this.columnFormatter=new Me0.ColumnFormatter($)}parse($){if(!$.hasMoreCharacters)return null;let{parserOptions:q}=this,I=[],U=$.nextCharacterToken;for(;U;U=$.nextCharacterToken){if(b70.Token.isTokenDelimiter(U,q)||b70.Token.isTokenRowDelimiter(U))break;I.push(U.token),$.advancePastToken(U)}return this.columnFormatter.format(I.join(""))}}i70.NonQuotedColumnParser=n70});var Mv=O((d70)=>{Object.defineProperty(d70,"__esModule",{value:!0});d70.QuotedColumnParser=void 0;var Ae0=gZ(),FU=n9();class c70{constructor($){this.parserOptions=$,this.columnFormatter=new Ae0.ColumnFormatter($)}parse($){if(!$.hasMoreCharacters)return null;let q=$.cursor,{foundClosingQuote:I,col:U}=this.gatherDataBetweenQuotes($);if(!I){if($.advanceTo(q),!$.hasMoreData)throw Error(`Parse Error: missing closing: '${this.parserOptions.quote||""}' in line: at '${$.lineFromCursor.replace(/[\r\n]/g,"\\n'")}'`);return null}return this.checkForMalformedColumn($),U}gatherDataBetweenQuotes($){let{parserOptions:q}=this,I=!1,U=!1,Y=[],J=$.nextCharacterToken;for(;!U&&J!==null;J=$.nextCharacterToken){let Q=FU.Token.isTokenQuote(J,q);if(!I&&Q)I=!0;else if(I)if(FU.Token.isTokenEscapeCharacter(J,q)){$.advancePastToken(J);let K=$.nextCharacterToken;if(K!==null&&(FU.Token.isTokenQuote(K,q)||FU.Token.isTokenEscapeCharacter(K,q)))Y.push(K.token),J=K;else if(Q)U=!0;else Y.push(J.token)}else if(Q)U=!0;else Y.push(J.token);$.advancePastToken(J)}return{col:this.columnFormatter.format(Y.join("")),foundClosingQuote:U}}checkForMalformedColumn($){let{parserOptions:q}=this,{nextNonSpaceToken:I}=$;if(I){let U=FU.Token.isTokenDelimiter(I,q),Y=FU.Token.isTokenRowDelimiter(I);if(!(U||Y)){let J=$.lineFromCursor.substr(0,10).replace(/[\r\n]/g,"\\n'");throw Error(`Parse Error: expected: '${q.escapedDelimiter}' OR new line got: '${I.token}'. at '${J}`)}$.advanceToToken(I)}else if(!$.hasMoreData)$.advancePastLine()}}d70.QuotedColumnParser=c70});var t70=O((o70)=>{Object.defineProperty(o70,"__esModule",{value:!0});o70.ColumnParser=void 0;var Pe0=Fv(),Te0=Mv(),Ee0=n9();class l70{constructor($){this.parserOptions=$,this.quotedColumnParser=new Te0.QuotedColumnParser($),this.nonQuotedColumnParser=new Pe0.NonQuotedColumnParser($)}parse($){let{nextNonSpaceToken:q}=$;if(q!==null&&Ee0.Token.isTokenQuote(q,this.parserOptions))return $.advanceToToken(q),this.quotedColumnParser.parse($);return this.nonQuotedColumnParser.parse($)}}o70.ColumnParser=l70});var Av=O((MU)=>{Object.defineProperty(MU,"__esModule",{value:!0});MU.ColumnFormatter=MU.QuotedColumnParser=MU.NonQuotedColumnParser=MU.ColumnParser=void 0;var je0=t70();Object.defineProperty(MU,"ColumnParser",{enumerable:!0,get:function(){return je0.ColumnParser}});var ge0=Fv();Object.defineProperty(MU,"NonQuotedColumnParser",{enumerable:!0,get:function(){return ge0.NonQuotedColumnParser}});var Be0=Mv();Object.defineProperty(MU,"QuotedColumnParser",{enumerable:!0,get:function(){re Line truncated
%s`,f,f,W,U);let S=W.type==="*"?kv:W.type==="?"?nv:"\\"+W.type;Y=!0,U=U.slice(0,W.reStart)+S+"\\("+f}if(T(),J)U+="\\\\";let P=N01[U.charAt(0)];for(let f=K.length-1;f>-1;f--){let S=K[f],n=U.slice(0,S.reStart),R=U.slice(S.reStart,S.reEnd-8),p=U.slice(S.reEnd),i=U.slice(S.reEnd-8,S.reEnd)+p,C=n.split(")").length,k=n.split("(").length-C,b=p;for(let j=0;j<k;j++)b=b.replace(/\)[+*?]?/,"");p=b;let U0=p===""&&q!==fv?"(?:$|\\/)":"";U=n+R+p+U0+i}if(U!==""&&Y)U="(?=.)"+U;if(P)U=N()+U;if(q===fv)return[U,Y];if(I.nocase&&!Y)Y=$.toUpperCase()!==$.toLowerCase();if(!Y)return M01($);let B=I.nocase?"i":"";try{return Object.assign(new RegExp("^"+U+"$",B),{_glob:$,_src:U})}catch(f){return new RegExp("$.")}}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let $=this.set;if(!$.length)return this.regexp=!1,this.regexp;let q=this.options,I=q.noglobstar?kv:q.dot?D01:O01,U=q.nocase?"i":"",Y=$.map((J)=>{return J=J.map((Q)=>typeof Q==="string"?P01(Q):Q===v6?v6:Q._src).reduce((Q,K)=>{if(!(Q[Q.length-1]===v6&&K===v6))Q.push(K);return Q},[]),J.forEach((Q,K)=>{if(Q!==v6||J[K-1]===v6)return;if(K===0)if(J.length>1)J[K+1]="(?:\\/|"+I+"\\/)?"+J[K+1];else J[K]=I;else if(K===J.length-1)J[K-1]+="(?:\\/|"+I+")?";else J[K-1]+="(?:\\/|\\/"+I+"\\/)"+J[K+1],J[K+1]=v6}),J.filter((Q)=>Q!==v6).join("/")}).join("|");if(Y="^(?:"+Y+")$",this.negate)Y="^(?!"+Y+").*$";try{this.regexp=new RegExp(Y,U)}catch(J){this.regexp=!1}return this.regexp}match($,q=this.partial){if(this.debug("match",$,this.pattern),this.comment)return!1;if(this.empty)return $==="";if($==="/"&&q)return!0;let I=this.options;if(bv.sep!=="/")$=$.split(bv.sep).join("/");$=$.split(i30),this.debug(this.pattern,"split",$);let U=this.set;this.debug(this.pattern,"set",U);let Y;for(let J=$.length-1;J>=0;J--)if(Y=$[J],Y)break;for(let J=0;J<U.length;J++){let Q=U[J],K=$;if(I.matchBase&&Q.length===1)K=[Y];if(this.matchOne(K,Q,q)){if(I.flipNegate)return!0;return!this.negate}}if(I.flipNegate)return!1;return this.negate}static defaults($){return Q$.defaults($).Minimatch}}Q$.Minimatch=v2});var t30=O((Jg1,r30)=>{r30.exports=o30;var cv=r("fs"),{EventEmitter:E01}=r("events"),{Minimatch:pv}=d30(),{resolve:j01}=r("path");function g01($,q){return new Promise((I,U)=>{cv.readdir($,{withFileTypes:!0},(Y,J)=>{if(Y)switch(Y.code){case"ENOTDIR":if(q)U(Y);else I([]);break;case"ENOTSUP":case"ENOENT":case"ENAMETOOLONG":case"UNKNOWN":I([]);break;case"ELOOP":default:U(Y);break}else I(J)})})}function m30($,q){return new Promise((I,U)=>{(q?cv.stat:cv.lstat)($,(J,Q)=>{if(J)switch(J.code){case"ENOENT":if(q)I(m30($,!1));else I(null);break;default:I(null);break}else I(Q)})})}async function*l30($,q,I,U,Y,J){let Q=await g01(q+$,J);for(let K of Q){let z=K.name;if(z===void 0)z=K,U=!0;let G=$+"/"+z,H=G.slice(1),w=q+"/"+H,V=null;if(U||I)V=await m30(w,I);if(!V&&K.name!==void 0)V=K;if(V===null)V={isDirectory:()=>!1};if(V.isDirectory()){if(!Y(H))yield{relative:H,absolute:w,stats:V},yield*l30(G,q,I,U,Y,!1)}else yield{relative:H,absolute:w,stats:V}}}async function*B01($,q,I,U){yield*l30("",$,q,I,U,!0)}function R01($){return{pattern:$.pattern,dot:!!$.dot,noglobstar:!!$.noglobstar,matchBase:!!$.matchBase,nocase:!!$.nocase,ignore:$.ignore,skip:$.skip,follow:!!$.follow,stat:!!$.stat,nodir:!!$.nodir,mark:!!$.mark,silent:!!$.silent,absolute:!!$.absolute}}class dv extends E01{constructor($,q,I){super();if(typeof q==="function")I=q,q=null;if(this.options=R01(q||{}),this.matchers=[],this.options.pattern){let U=Array.isArray(this.options.pattern)?this.options.pattern:[this.options.pattern];this.matchers=U.map((Y)=>new pv(Y,{dot:this.options.dot,noglobstar:this.options.noglobstar,matchBase:this.options.matchBase,nocase:this.options.nocase}))}if(this.ignoreMatchers=[],this.options.ignore){let U=Array.isArray(this.options.ignore)?this.options.ignore:[this.options.ignore];this.ignoreMatchers=U.map((Y)=>new pv(Y,{dot:!0}))}if(this.skipMatchers=[],this.options.skip){let U=Array.isArray(this.options.skip)?this.options.skip:[this.options.skip];this.skipMatchers=U.map((Y)=>new pv(Y,{dot:!0}))}if(this.iterator=B01(j01($||"."),this.options.follow,this.options.stat,this._shouldSkipDirectory.bind(this)),this.paused=!1,this.inactive=!1,this.aborted=!1,I)this._matches=[],this.on("match",(U)=>this._matches.push(this.options.absolute?U.absolute:U.relative)),this.on("error",(U)=>I(U)),this.on("end",()=>I(null,this._matches));setTimeout(()=>this._next(),0)}_shouldSkipDirectory($){return this.skipMatchers.some((q)=>q.match($))}_fileMatches($,q){let I=$+(q?"/":"");return(this.matchers.length===0||this.matchers.some((U)=>U.match(I)))&&!this.ignoreMatchers.some((U)=>U.match(I))&&(!this.options.nodir||!q)}_next(){if(!this.paused&&!this.aborted)this.iterator.next().then(($)=>{if(!$.done){let q=$.value.stats.isDirectory();if(this._fileMatches($.value.relative,q)){let I=$.value.relative,U=$.value.absolute;if(this.options.mark&&q)I+="/",U+="/";if(this.options.stat)this.emit("match",{relative:I,absolute:U,stat:$.value.stats});else this.emit("match",{relative:I,ab Line truncated
`,h);h=$0===-1?A.length:$0}else if(c!==-1&&A[h]==="/"&&A[h+1]==="*"){let $0=A.indexOf("*/",h);if($0!==-1)h=$0+2,c=A.indexOf("*/",h);else g+=A[h],h++}else g+=A[h],h++;return g}function m8(A){let g=V$(A.toString()),h=g.match(w$);if(!h)h=g.match(y$);if(!h)throw Error(`could not parse args in autoInject
Source:
`+j);let[,i]=v;return i.replace(/\s/g,"").split(c8).map(($0)=>$0.replace(y$,"").trim())}function s6(A,j){var v={};return Object.keys(A).forEach((i)=>{var $0=A[i],I0,Q0=W($0),z0=!Q0&&$0.length===1||Q0&&$0.length===0;if(Array.isArray($0))I0=[...$0],$0=I0.pop(),v[i]=I0.concat(I0.length>0?V0:$0);else if(z0)v[i]=$0;else{if(I0=d8($0),$0.length===0&&!Q0&&I0.length===0)throw Error("autoInject task functions require explicit parameters.");if(!Q0)I0.pop();v[i]=I0.concat(V0)}function V0(g0,I1){var V1=I0.map((Q1)=>g0[Q1]);V1.push(I1),D($0)(...V1)}}),v4(v,j)}class L7{constructor(){this.head=this.tail=null,this.length=0}removeLink(A){if(A.prev)A.prev.next=A.next;else this.head=A.next;if(A.next)A.next.prev=A.prev;else this.tail=A.prev;return A.prev=A.next=null,this.length-=1,A}empty(){while(this.head)this.shift();return this}insertAfter(A,j){if(j.prev=A,j.next=A.next,A.next)A.next.prev=j;else this.tail=j;A.next=j,this.length+=1}insertBefore(A,j){if(j.prev=A.prev,j.next=A,A.prev)A.prev.next=j;else this.head=j;A.prev=j,this.length+=1}unshift(A){if(this.head)this.insertBefore(this.head,A);else e6(this,A)}push(A){if(this.tail)this.insertAfter(this.tail,A);else e6(this,A)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){var A=this.head;while(A)yield A.data,A=A.next}remove(A){var j=this.head;while(j){var{next:v}=j;if(A(j))this.removeLink(j);j=v}return this}}function e6(A,j){A.length=1,A.head=A.tail=j}function c5(A,j,v){if(j==null)j=1;else if(j===0)throw RangeError("Concurrency must not be zero");var i=D(A),$0=0,I0=[];let Q0={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function z0(h0,T0){Q0[h0].push(T0)}function V0(h0,T0){let S0=(...K1)=>{g0(h0,S0),T0(...K1)};Q0[h0].push(S0)}function g0(h0,T0){if(!h0)return Object.keys(Q0).forEach((S0)=>Q0[S0]=[]);if(!T0)return Q0[h0]=[];Q0[h0]=Q0[h0].filter((S0)=>S0!==T0)}function I1(h0,...T0){Q0[h0].forEach((S0)=>S0(...T0))}var V1=!1;function Q1(h0,T0,S0,K1){if(K1!=null&&typeof K1!=="function")throw Error("task callback must be a function");W1.started=!0;var q4,k4;function Z$(O7,...vY){if(O7)return S0?k4(O7):q4();if(vY.length<=1)return q4(vY[0]);q4(vY)}var Jq=W1._createTaskItem(h0,S0?Z$:K1||Z$);if(T0)W1._tasks.unshift(Jq);else W1._tasks.push(Jq);if(!V1)V1=!0,w(()=>{V1=!1,W1.process()});if(S0||!K1)return new Promise((O7,vY)=>{q4=O7,k4=vY})}function W$(h0){return function(T0,...S0){$0-=1;for(var K1=0,q4=h0.length;K1<q4;K1++){var k4=h0[K1],Z$=I0.indexOf(k4);if(Z$===0)I0.shift();else if(Z$>0)I0.splice(Z$,1);if(k4.callback(T0,...S0),T0!=null)I1("error",T0,k4.data)}if($0<=W1.concurrency-W1.buffer)I1("unsaturated");if(W1.idle())I1("drain");W1.process()}}function Yq(h0){if(h0.length===0&&W1.idle())return w(()=>I1("drain")),!0;return!1}let D7=(h0)=>(T0)=>{if(!T0)return new Promise((S0,K1)=>{V0(h0,(q4,k4)=>{if(q4)return K1(q4);S0(k4)})});g0(h0),z0(h0,T0)};var RY=!1,W1={_tasks:new L7,_createTaskItem(h0,T0){return{data:h0,callback:T0}},*[Symbol.iterator](){yield*W1._tasks[Symbol.iterator]()},concurrency:j,payload:v,buffer:j/4,started:!1,paused:!1,push(h0,T0){if(Array.isArray(h0)){if(Yq(h0))return;return h0.map((S0)=>Q1(S0,!1,!1,T0))}return Q1(h0,!1,!1,T0)},pushAsync(h0,T0){if(Array.isArray(h0)){if(Yq(h0))return;return h0.map((S0)=>Q1(S0,!1,!0,T0))}return Q1(h0,!1,!0,T0)},kill(){g0(),W1._tasks.empty()},unshift(h0,T0){if(Array.isArray(h0)){if(Yq(h0))return;return h0.map((S0)=>Q1(S0,!0,!1,T0))}return Q1(h0,!0,!1,T0)},unshiftAsync(h0,T0){if(Array.isArray(h0)){if(Yq(h0))return;return h0.map((S0)=>Q1(S0,!0,!0,T0))}return Q1(h0,!0,!0,T0)},remove(h0){W1._tasks.remove(h0)},process(){if(RY)return;RY=!0;while(!W1.paused&&$0<W1.concurrency&&W1._tasks.length){var h0=[],T0=[],S0=W1._tasks.length;if(W1.payload)S0=Math.min(S0,W1.payload);for(var K1=0;K1<S0;K1++){var q4=W1._tasks.shift();h0.push(q4),I0.push(q4),T0.push(q4.data)}if($0+=1,W1._tasks.length===0)I1("empty");if($0===W1.concurrency)I1("saturated");var k4=C(W$(h0));i(T0,k4)}RY=!1},length(){return W1._tasks.length},running(){return $0},workersList(){return I0},idle(){return W1._tasks.length+$0===0},pause(){W1.paused=!0},resume(){if(W1.paused===!1)return;W1.paused=!1,w(W1.process)}};return Object.defineProperties(W1,{saturated:{writable:!1,value:D7("saturated")},unsaturated:{writable:!1,value:D7("unsaturated")},empty:{writable:!1,value:D7("empty")},drain:{writable:!1,value:D7("drain")},error:{writable:!1,value:D7("error")}}),W1}function P0(A,j){return c5(A,1,j)}function r(A,j,v){return c5(A,j,v)}function F(A,j,v,i){i=k(i);var $0=D(v);return l0(A,(I0,Q0,z0)=>{$0(j,I0,(V0,g0)=>{j=g0,z0(V0)})},(I0)=>i(I0,j))}var M=N(F,4);function R(...A){var j=A.map(D);return function(...v){var i=this,$0=v[v.length-1];if(typeof $0=="function")v.pop();else $0=J4();return M(j,v,(I0,Q0,z0)=>{Q0.apply(i,I0.concat((V0,...g0)=>{z0(V0,g0)}))},(I0,Q0)=>$0(I0,...Q0)),$0[C1]}}function y(...A){return R(...A.reverse())}function s(A,j,v,i){return T(b(j),A,v,i)}var c=N(s,4);function e( Line truncated
GFS4: `),console.error($)};if(!H4[U6]){if(oC=global[U6]||[],fI0(H4,oC),H4.close=function($){function q(I,U){return $.call(H4,I,function(Y){if(!Y)kI0();if(typeof U==="function")U.apply(this,arguments)})}return Object.defineProperty(q,KX,{value:$}),q}(H4.close),H4.closeSync=function($){function q(I){$.apply(H4,arguments),kI0()}return Object.defineProperty(q,KX,{value:$}),q}(H4.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))process.on("exit",function(){P3(H4[U6]),o("assert").equal(H4[U6].length,0)})}var oC;if(!global[U6])fI0(global,H4[U6]);aC.exports=rC(q61(H4));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!H4.__patched)aC.exports=rC(H4),H4.__patched=!0;function rC($){e41($),$.gracefulify=rC,$.createReadStream=B,$.createWriteStream=k;var q=$.readFile;$.readFile=I;function I(S,t,p){if(typeof t==="function")p=t,t=null;return C(S,t,p);function C(n,b,J0,g){return q(n,b,function(u){if(u&&(u.code==="EMFILE"||u.code==="ENFILE"))_U([C,[n,b,J0],u,g||Date.now(),Date.now()]);else if(typeof J0==="function")J0.apply(this,arguments)})}}var U=$.writeFile;$.writeFile=Y;function Y(S,t,p,C){if(typeof p==="function")C=p,p=null;return n(S,t,p,C);function n(b,J0,g,u,d){return U(b,J0,g,function(a){if(a&&(a.code==="EMFILE"||a.code==="ENFILE"))_U([n,[b,J0,g,u],a,d||Date.now(),Date.now()]);else if(typeof u==="function")u.apply(this,arguments)})}}var J=$.appendFile;if(J)$.appendFile=Q;function Q(S,t,p,C){if(typeof p==="function")C=p,p=null;return n(S,t,p,C);function n(b,J0,g,u,d){return J(b,J0,g,function(a){if(a&&(a.code==="EMFILE"||a.code==="ENFILE"))_U([n,[b,J0,g,u],a,d||Date.now(),Date.now()]);else if(typeof u==="function")u.apply(this,arguments)})}}var K=$.copyFile;if(K)$.copyFile=z;function z(S,t,p,C){if(typeof p==="function")C=p,p=0;return n(S,t,p,C);function n(b,J0,g,u,d){return K(b,J0,g,function(a){if(a&&(a.code==="EMFILE"||a.code==="ENFILE"))_U([n,[b,J0,g,u],a,d||Date.now(),Date.now()]);else if(typeof u==="function")u.apply(this,arguments)})}}var w=$.readdir;$.readdir=H;var G=/^v[0-5]\./;function H(S,t,p){if(typeof t==="function")p=t,t=null;var C=G.test(process.version)?function(J0,g,u,d){return w(J0,n(J0,g,u,d))}:function(J0,g,u,d){return w(J0,g,n(J0,g,u,d))};return C(S,t,p);function n(b,J0,g,u){return function(d,a){if(d&&(d.code==="EMFILE"||d.code==="ENFILE"))_U([C,[b,J0,g],d,u||Date.now(),Date.now()]);else{if(a&&a.sort)a.sort();if(typeof g==="function")g.call(this,d,a)}}}}if(process.version.substr(0,4)==="v0.8"){var V=$61($);N=V.ReadStream,T=V.WriteStream}var W=$.ReadStream;if(W)N.prototype=Object.create(W.prototype),N.prototype.open=E;var X=$.WriteStream;if(X)T.prototype=Object.create(X.prototype),T.prototype.open=P;Object.defineProperty($,"ReadStream",{get:function(){return N},set:function(S){N=S},enumerable:!0,configurable:!0}),Object.defineProperty($,"WriteStream",{get:function(){return T},set:function(S){T=S},enumerable:!0,configurable:!0});var L=N;Object.defineProperty($,"FileReadStream",{get:function(){return L},set:function(S){L=S},enumerable:!0,configurable:!0});var D=T;Object.defineProperty($,"FileWriteStream",{get:function(){return D},set:function(S){D=S},enumerable:!0,configurable:!0});function N(S,t){if(this instanceof N)return W.apply(this,arguments),this;else return N.apply(Object.create(N.prototype),arguments)}function E(){var S=this;f(S.path,S.flags,S.mode,function(t,p){if(t){if(S.autoClose)S.destroy();S.emit("error",t)}else S.fd=p,S.emit("open",p),S.read()})}function T(S,t){if(this instanceof T)return X.apply(this,arguments),this;else return T.apply(Object.create(T.prototype),arguments)}function P(){var S=this;f(S.path,S.flags,S.mode,function(t,p){if(t)S.destroy(),S.emit("error",t);else S.fd=p,S.emit("open",p)})}function B(S,t){return new $.ReadStream(S,t)}function k(S,t){return new $.WriteStream(S,t)}var h=$.open;$.open=f;function f(S,t,p,C){if(typeof p==="function")C=p,p=null;return n(S,t,p,C);function n(b,J0,g,u,d){return h(b,J0,g,function(a,K0){if(a&&(a.code==="EMFILE"||a.code==="ENFILE"))_U([n,[b,J0,g,u],a,d||Date.now(),Date.now()]);else if(typeof u==="function")u.apply(this,arguments)})}}return $}function _U($){P3("ENQUEUE",$[0].name,$[1]),H4[U6].push($),tC()}var QX;function kI0(){var $=Date.now();for(var q=0;q<H4[U6].length;++q)if(H4[U6][q].length>2)H4[U6][q][3]=$,H4[U6][q][4]=$;tC()}function tC(){if(clearTimeout(QX),QX=void 0,H4[U6].length===0)return;var $=H4[U6].shift(),q=$[0],I=$[1],U=$[2],Y=$[3],J=$[4];if(Y===void 0)P3("RETRY",q.name,I),q.apply(null,I);else if(Date.now()-Y>=60000){P3("TIMEOUT",q.name,I);var Q=I.pop();if(typeof Q==="function")Q.call(null,U)}else{var K=Date.now()-J,z=Math.max(J-Y,1),w=Math.min(z*1.2,100);if(K>=w)P3("RETRY",q.name,I),q.apply(null,I.concat([Y]));else H4[U6].push($)}if(QX===void 0)QX=setTimeout(tC,0)}});var bI0=O((VB1,sC)=>{function U61($,q){if(!($ instanceof q))throw TypeError("Cannot call a class as a function")}var nI0=M4().Buffer,x2=o("util");function Y61($,q,I){$.copy(q,I)}sC.exports=function(){function $(){U61(this,$),this.head=null,this.tail=null,th Line truncated
`+g);let[,c]=h;return c.replace(/\s/g,"").split(d8).map(($0)=>$0.replace(u$,"").trim())}function s6(A,g){var h={};return Object.keys(A).forEach((c)=>{var $0=A[c],I0,K0=W($0),z0=!K0&&$0.length===1||K0&&$0.length===0;if(Array.isArray($0))I0=[...$0],$0=I0.pop(),h[c]=I0.concat(I0.length>0?V0:$0);else if(z0)h[c]=$0;else{if(I0=m8($0),$0.length===0&&!K0&&I0.length===0)throw Error("autoInject task functions require explicit parameters.");if(!K0)I0.pop();h[c]=I0.concat(V0)}function V0(R0,J1){var L1=I0.map((G1)=>R0[G1]);L1.push(J1),D($0)(...L1)}}),C4(h,g)}class L7{constructor(){this.head=this.tail=null,this.length=0}removeLink(A){if(A.prev)A.prev.next=A.next;else this.head=A.next;if(A.next)A.next.prev=A.prev;else this.tail=A.prev;return A.prev=A.next=null,this.length-=1,A}empty(){while(this.head)this.shift();return this}insertAfter(A,g){if(g.prev=A,g.next=A.next,A.next)A.next.prev=g;else this.tail=g;A.next=g,this.length+=1}insertBefore(A,g){if(g.prev=A.prev,g.next=A,A.prev)A.prev.next=g;else this.head=g;A.prev=g,this.length+=1}unshift(A){if(this.head)this.insertBefore(this.head,A);else e6(this,A)}push(A){if(this.tail)this.insertAfter(this.tail,A);else e6(this,A)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){var A=this.head;while(A)yield A.data,A=A.next}remove(A){var g=this.head;while(g){var{next:h}=g;if(A(g))this.removeLink(g);g=h}return this}}function e6(A,g){A.length=1,A.head=A.tail=g}function d5(A,g,h){if(g==null)g=1;else if(g===0)throw RangeError("Concurrency must not be zero");var c=D(A),$0=0,I0=[];let K0={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function z0(y0,g0){K0[y0].push(g0)}function V0(y0,g0){let u0=(...H1)=>{R0(y0,u0),g0(...H1)};K0[y0].push(u0)}function R0(y0,g0){if(!y0)return Object.keys(K0).forEach((u0)=>K0[u0]=[]);if(!g0)return K0[y0]=[];K0[y0]=K0[y0].filter((u0)=>u0!==g0)}function J1(y0,...g0){K0[y0].forEach((u0)=>u0(...g0))}var L1=!1;function G1(y0,g0,u0,H1){if(H1!=null&&typeof H1!=="function")throw Error("task callback must be a function");D1.started=!0;var q4,f4;function Z$(O7,...hY){if(O7)return u0?f4(O7):q4();if(hY.length<=1)return q4(hY[0]);q4(hY)}var Gq=D1._createTaskItem(y0,u0?Z$:H1||Z$);if(g0)D1._tasks.unshift(Gq);else D1._tasks.push(Gq);if(!L1)L1=!0,G(()=>{L1=!1,D1.process()});if(u0||!H1)return new Promise((O7,hY)=>{q4=O7,f4=hY})}function W$(y0){return function(g0,...u0){$0-=1;for(var H1=0,q4=y0.length;H1<q4;H1++){var f4=y0[H1],Z$=I0.indexOf(f4);if(Z$===0)I0.shift();else if(Z$>0)I0.splice(Z$,1);if(f4.callback(g0,...u0),g0!=null)J1("error",g0,f4.data)}if($0<=D1.concurrency-D1.buffer)J1("unsaturated");if(D1.idle())J1("drain");D1.process()}}function zq(y0){if(y0.length===0&&D1.idle())return G(()=>J1("drain")),!0;return!1}let D7=(y0)=>(g0)=>{if(!g0)return new Promise((u0,H1)=>{V0(y0,(q4,f4)=>{if(q4)return H1(q4);u0(f4)})});R0(y0),z0(y0,g0)};var _Y=!1,D1={_tasks:new L7,_createTaskItem(y0,g0){return{data:y0,callback:g0}},*[Symbol.iterator](){yield*D1._tasks[Symbol.iterator]()},concurrency:g,payload:h,buffer:g/4,started:!1,paused:!1,push(y0,g0){if(Array.isArray(y0)){if(zq(y0))return;return y0.map((u0)=>G1(u0,!1,!1,g0))}return G1(y0,!1,!1,g0)},pushAsync(y0,g0){if(Array.isArray(y0)){if(zq(y0))return;return y0.map((u0)=>G1(u0,!1,!0,g0))}return G1(y0,!1,!0,g0)},kill(){R0(),D1._tasks.empty()},unshift(y0,g0){if(Array.isArray(y0)){if(zq(y0))return;return y0.map((u0)=>G1(u0,!0,!1,g0))}return G1(y0,!0,!1,g0)},unshiftAsync(y0,g0){if(Array.isArray(y0)){if(zq(y0))return;return y0.map((u0)=>G1(u0,!0,!0,g0))}return G1(y0,!0,!0,g0)},remove(y0){D1._tasks.remove(y0)},process(){if(_Y)return;_Y=!0;while(!D1.paused&&$0<D1.concurrency&&D1._tasks.length){var y0=[],g0=[],u0=D1._tasks.length;if(D1.payload)u0=Math.min(u0,D1.payload);for(var H1=0;H1<u0;H1++){var q4=D1._tasks.shift();y0.push(q4),I0.push(q4),g0.push(q4.data)}if($0+=1,D1._tasks.length===0)J1("empty");if($0===D1.concurrency)J1("saturated");var f4=C(W$(y0));c(g0,f4)}_Y=!1},length(){return D1._tasks.length},running(){return $0},workersList(){return I0},idle(){return D1._tasks.length+$0===0},pause(){D1.paused=!0},resume(){if(D1.paused===!1)return;D1.paused=!1,G(D1.process)}};return Object.defineProperties(D1,{saturated:{writable:!1,value:D7("saturated")},unsaturated:{writable:!1,value:D7("unsaturated")},empty:{writable:!1,value:D7("empty")},drain:{writable:!1,value:D7("drain")},error:{writable:!1,value:D7("error")}}),D1}function T0(A,g){return d5(A,1,g)}function a(A,g,h){return d5(A,g,h)}function F(A,g,h,c){c=f(c);var $0=D(h);return f0(A,(I0,K0,z0)=>{$0(g,I0,(V0,R0)=>{g=R0,z0(V0)})},(I0)=>c(I0,g))}var M=N(F,4);function v(...A){var g=A.map(D);return function(...h){var c=this,$0=h[h.length-1];if(typeof $0=="function")h.pop();else $0=J4();return M(g,h,(I0,K0,z0)=>{K0.apply(c,I0.concat((V0,...R0)=>{z0(V0,R0)}))},(I0,K0)=>$0(I0,...K0)),$0[d0]}}function u(...A){return v(...A.reverse())}function s(A,g,h,c){return T(b(g),A,h,c)}var m=N(s,4);function e( Line truncated
GFS4: `),console.error($)};if(!w4[Y6]){if(mv=global[Y6]||[],Kq0(w4,mv),w4.close=function($){function q(I,U){return $.call(w4,I,function(Y){if(!Y)Qq0();if(typeof U==="function")U.apply(this,arguments)})}return Object.defineProperty(q,xZ,{value:$}),q}(w4.close),w4.closeSync=function($){function q(I){$.apply(w4,arguments),Qq0()}return Object.defineProperty(q,xZ,{value:$}),q}(w4.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))process.on("exit",function(){N3(w4[Y6]),r("assert").equal(w4[Y6].length,0)})}var mv;if(!global[Y6])Kq0(global,w4[Y6]);rv.exports=lv(k01(w4));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!w4.__patched)rv.exports=lv(w4),w4.__patched=!0;function lv($){u01($),$.gracefulify=lv,$.createReadStream=B,$.createWriteStream=f;var q=$.readFile;$.readFile=I;function I(R,p,i){if(typeof p==="function")i=p,p=null;return C(R,p,i);function C(k,b,U0,j){return q(k,b,function(x){if(x&&(x.code==="EMFILE"||x.code==="ENFILE"))TU([C,[k,b,U0],x,j||Date.now(),Date.now()]);else if(typeof U0==="function")U0.apply(this,arguments)})}}var U=$.writeFile;$.writeFile=Y;function Y(R,p,i,C){if(typeof i==="function")C=i,i=null;return k(R,p,i,C);function k(b,U0,j,x,d){return U(b,U0,j,function(t){if(t&&(t.code==="EMFILE"||t.code==="ENFILE"))TU([k,[b,U0,j,x],t,d||Date.now(),Date.now()]);else if(typeof x==="function")x.apply(this,arguments)})}}var J=$.appendFile;if(J)$.appendFile=Q;function Q(R,p,i,C){if(typeof i==="function")C=i,i=null;return k(R,p,i,C);function k(b,U0,j,x,d){return J(b,U0,j,function(t){if(t&&(t.code==="EMFILE"||t.code==="ENFILE"))TU([k,[b,U0,j,x],t,d||Date.now(),Date.now()]);else if(typeof x==="function")x.apply(this,arguments)})}}var K=$.copyFile;if(K)$.copyFile=z;function z(R,p,i,C){if(typeof i==="function")C=i,i=0;return k(R,p,i,C);function k(b,U0,j,x,d){return K(b,U0,j,function(t){if(t&&(t.code==="EMFILE"||t.code==="ENFILE"))TU([k,[b,U0,j,x],t,d||Date.now(),Date.now()]);else if(typeof x==="function")x.apply(this,arguments)})}}var G=$.readdir;$.readdir=w;var H=/^v[0-5]\./;function w(R,p,i){if(typeof p==="function")i=p,p=null;var C=H.test(process.version)?function(U0,j,x,d){return G(U0,k(U0,j,x,d))}:function(U0,j,x,d){return G(U0,j,k(U0,j,x,d))};return C(R,p,i);function k(b,U0,j,x){return function(d,t){if(d&&(d.code==="EMFILE"||d.code==="ENFILE"))TU([C,[b,U0,j],d,x||Date.now(),Date.now()]);else{if(t&&t.sort)t.sort();if(typeof j==="function")j.call(this,d,t)}}}}if(process.version.substr(0,4)==="v0.8"){var V=x01($);N=V.ReadStream,T=V.WriteStream}var W=$.ReadStream;if(W)N.prototype=Object.create(W.prototype),N.prototype.open=E;var X=$.WriteStream;if(X)T.prototype=Object.create(X.prototype),T.prototype.open=P;Object.defineProperty($,"ReadStream",{get:function(){return N},set:function(R){N=R},enumerable:!0,configurable:!0}),Object.defineProperty($,"WriteStream",{get:function(){return T},set:function(R){T=R},enumerable:!0,configurable:!0});var L=N;Object.defineProperty($,"FileReadStream",{get:function(){return L},set:function(R){L=R},enumerable:!0,configurable:!0});var D=T;Object.defineProperty($,"FileWriteStream",{get:function(){return D},set:function(R){D=R},enumerable:!0,configurable:!0});function N(R,p){if(this instanceof N)return W.apply(this,arguments),this;else return N.apply(Object.create(N.prototype),arguments)}function E(){var R=this;n(R.path,R.flags,R.mode,function(p,i){if(p){if(R.autoClose)R.destroy();R.emit("error",p)}else R.fd=i,R.emit("open",i),R.read()})}function T(R,p){if(this instanceof T)return X.apply(this,arguments),this;else return T.apply(Object.create(T.prototype),arguments)}function P(){var R=this;n(R.path,R.flags,R.mode,function(p,i){if(p)R.destroy(),R.emit("error",p);else R.fd=i,R.emit("open",i)})}function B(R,p){return new $.ReadStream(R,p)}function f(R,p){return new $.WriteStream(R,p)}var S=$.open;$.open=n;function n(R,p,i,C){if(typeof i==="function")C=i,i=null;return k(R,p,i,C);function k(b,U0,j,x,d){return S(b,U0,j,function(t,Q0){if(t&&(t.code==="EMFILE"||t.code==="ENFILE"))TU([k,[b,U0,j,x],t,d||Date.now(),Date.now()]);else if(typeof x==="function")x.apply(this,arguments)})}}return $}function TU($){N3("ENQUEUE",$[0].name,$[1]),w4[Y6].push($),ov()}var uZ;function Qq0(){var $=Date.now();for(var q=0;q<w4[Y6].length;++q)if(w4[Y6][q].length>2)w4[Y6][q][3]=$,w4[Y6][q][4]=$;ov()}function ov(){if(clearTimeout(uZ),uZ=void 0,w4[Y6].length===0)return;var $=w4[Y6].shift(),q=$[0],I=$[1],U=$[2],Y=$[3],J=$[4];if(Y===void 0)N3("RETRY",q.name,I),q.apply(null,I);else if(Date.now()-Y>=60000){N3("TIMEOUT",q.name,I);var Q=I.pop();if(typeof Q==="function")Q.call(null,U)}else{var K=Date.now()-J,z=Math.max(J-Y,1),G=Math.min(z*1.2,100);if(K>=G)N3("RETRY",q.name,I),q.apply(null,I.concat([Y]));else w4[Y6].push($)}if(uZ===void 0)uZ=setTimeout(ov,0)}});var Gq0=O((Hg1,tv)=>{function b01($,q){if(!($ instanceof q))throw TypeError("Cannot call a class as a function")}var zq0=M4().Buffer,C2=r("util");function n01($,q,I){$.copy(q,I)}tv.exports=function(){function $(){b01(this,$),this.head=null,this.tail=null,th Line truncated
* normalize-path <https://github.com/jonschlinkert/normalize-path>
*
* Copyright (c) 2014-2018, Jon Schlinkert.
* Released under the MIT License.
*/jU0.exports=function($,q){if(typeof $!=="string")throw TypeError("expected path to be a string");if($==="\\"||$==="/")return"/";var I=$.length;if(I<=1)return $;var U="";if(I>4&&$[3]==="\\"){var Y=$[2];if((Y==="?"||Y===".")&&$.slice(0,2)==="\\\\")$=$.slice(2),U="//"}var J=$.split(/[/\\]+/);if(q!==!1&&J[J.length-1]==="")J.pop();return U+J.join("/")}});var O_=O((TB1,SU0)=>{var RU0=9007199254740991,G$1="[object Arguments]",H$1="[object Function]",V$1="[object GeneratorFunction]",W$1=/^(?:0|[1-9]\d*)$/;function vU0($,q,I){switch(I.length){case 0:return $.call(q);case 1:return $.call(q,I[0]);case 2:return $.call(q,I[0],I[1]);case 3:return $.call(q,I[0],I[1],I[2])}return $.apply(q,I)}function Z$1($,q){var I=-1,U=Array($);while(++I<$)U[I]=q(I);return U}var l2=Object.prototype,m2=l2.hasOwnProperty,CU0=l2.toString,X$1=l2.propertyIsEnumerable,BU0=Math.max;function L$1($,q){var I=g$1($)||E$1($)?Z$1($.length,String):[],U=I.length,Y=!!U;for(var J in $)if((q||m2.call($,J))&&!(Y&&(J=="length"||hU0(J,U))))I.push(J);return I}function D$1($,q,I,U){if($===void 0||X_($,l2[I])&&!m2.call(U,I))return q;return $}function O$1($,q,I){var U=$[q];if(!(m2.call($,q)&&X_(U,I))||I===void 0&&!(q in $))$[q]=I}function N$1($){if(!D_($))return T$1($);var q=P$1($),I=[];for(var U in $)if(!(U=="constructor"&&(q||!m2.call($,U))))I.push(U);return I}function _U0($,q){return q=BU0(q===void 0?$.length-1:q,0),function(){var I=arguments,U=-1,Y=BU0(I.length-q,0),J=Array(Y);while(++U<Y)J[U]=I[q+U];U=-1;var Q=Array(q+1);while(++U<q)Q[U]=I[U];return Q[q]=J,vU0($,this,Q)}}function F$1($,q,I,U){I||(I={});var Y=-1,J=q.length;while(++Y<J){var Q=q[Y],K=U?U(I[Q],$[Q],Q,I,$):void 0;O$1(I,Q,K===void 0?$[Q]:K)}return I}function M$1($){return _U0(function(q,I){var U=-1,Y=I.length,J=Y>1?I[Y-1]:void 0,Q=Y>2?I[2]:void 0;if(J=$.length>3&&typeof J=="function"?(Y--,J):void 0,Q&&A$1(I[0],I[1],Q))J=Y<3?void 0:J,Y=1;q=Object(q);while(++U<Y){var K=I[U];if(K)$(q,K,U,J)}return q})}function hU0($,q){return q=q==null?RU0:q,!!q&&(typeof $=="number"||W$1.test($))&&($>-1&&$%1==0&&$<q)}function A$1($,q,I){if(!D_(I))return!1;var U=typeof q;if(U=="number"?L_(I)&&hU0(q,I.length):U=="string"&&(q in I))return X_(I[q],$);return!1}function P$1($){var q=$&&$.constructor,I=typeof q=="function"&&q.prototype||l2;return $===I}function T$1($){var q=[];if($!=null)for(var I in Object($))q.push(I);return q}function X_($,q){return $===q||$!==$&&q!==q}function E$1($){return j$1($)&&m2.call($,"callee")&&(!X$1.call($,"callee")||CU0.call($)==G$1)}var g$1=Array.isArray;function L_($){return $!=null&&R$1($.length)&&!B$1($)}function j$1($){return v$1($)&&L_($)}function B$1($){var q=D_($)?CU0.call($):"";return q==H$1||q==V$1}function R$1($){return typeof $=="number"&&$>-1&&$%1==0&&$<=RU0}function D_($){var q=typeof $;return!!$&&(q=="object"||q=="function")}function v$1($){return!!$&&typeof $=="object"}var C$1=M$1(function($,q,I,U){F$1(q,h$1(q),$,U)}),_$1=_U0(function($){return $.push(void 0,D$1),vU0(C$1,void 0,$)});function h$1($){return L_($)?L$1($,!0):N$1($)}SU0.exports=_$1});var uU0=O((EB1,N_)=>{function S$1($,q){if(!($ instanceof q))throw TypeError("Cannot call a class as a function")}var yU0=M4().Buffer,o2=o("util");function y$1($,q,I){$.copy(q,I)}N_.exports=function(){function $(){S$1(this,$),this.head=null,this.tail=null,this.length=0}return $.prototype.push=function(I){var U={data:I,next:null};if(this.length>0)this.tail.next=U;else this.head=U;this.tail=U,++this.length},$.prototype.unshift=function(I){var U={data:I,next:this.head};if(this.length===0)this.tail=U;this.head=U,++this.length},$.prototype.shift=function(){if(this.length===0)return;var I=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;return--this.length,I},$.prototype.clear=function(){this.head=this.tail=null,this.length=0},$.prototype.join=function(I){if(this.length===0)return"";var U=this.head,Y=""+U.data;while(U=U.next)Y+=I+U.data;return Y},$.prototype.concat=function(I){if(this.length===0)return yU0.alloc(0);var U=yU0.allocUnsafe(I>>>0),Y=this.head,J=0;while(Y)y$1(Y.data,U,J),J+=Y.data.length,Y=Y.next;return U},$}();if(o2&&o2.inspect&&o2.inspect.custom)N_.exports.prototype[o2.inspect.custom]=function(){var $=o2.inspect({length:this.length});return this.constructor.name+" "+$}});var F_=O((gB1,xU0)=>{var FX=F4();function u$1($,q){var I=this,U=this._readableState&&this._readableState.destroyed,Y=this._writableState&&this._writableState.destroyed;if(U||Y){if(q)q($);else if($){if(!this._writableState)FX.nextTick(MX,this,$);else if(!this._writableState.errorEmitted)this._writableState.errorEmitted=!0,FX.nextTick(MX,this,$)}return this}if(this._readableState)this._readableState.destroyed=!0;if(this._writableState)this._writableState.destroyed=!0;return this._destroy($||null,function(J){if(!q&&J){if(!I._writableState)FX.nextTick(MX,I,J);else if(!I._writableState.errorEmitted)I._writableState.errorEmitted=!0,FX.nextTick(MX,I,J)}else if(q)q(J)}),this}function x$1(){if(this._readableState)this._readable Line truncated
%s`,B,B,E,U);var k=E.type==="*"?Yh:E.type==="?"?Uh:"\\"+E.type;Y=!0,U=U.slice(0,E.reStart)+k+"\\("+B}if(X(),J)U+="\\\\";var h=!1;switch(U.charAt(0)){case"[":case".":case"(":h=!0}for(var f=K.length-1;f>-1;f--){var S=K[f],t=U.slice(0,S.reStart),p=U.slice(S.reStart,S.reEnd-8),C=U.slice(S.reEnd-8,S.reEnd),n=U.slice(S.reEnd);C+=n;var b=t.split("(").length-1,J0=n;for(L=0;L<b;L++)J0=J0.replace(/\)[+*?]?/,"");n=J0;var g="";if(n===""&&q!==xX)g="$";var u=t+p+n+g+C;U=u}if(U!==""&&Y)U="(?=.)"+U;if(h)U=V+U;if(q===xX)return[U,Y];if(!Y)return I31($);var d=I.nocase?"i":"";try{var a=new RegExp("^"+U+"$",d)}catch(K0){return new RegExp("$.")}return a._glob=$,a._src=U,a}K$.makeRe=function($,q){return new g4($,q||{}).makeRe()};g4.prototype.makeRe=q31;function q31(){if(this.regexp||this.regexp===!1)return this.regexp;var $=this.set;if(!$.length)return this.regexp=!1,this.regexp;var q=this.options,I=q.noglobstar?Yh:q.dot?m71:o71,U=q.nocase?"i":"",Y=$.map(function(J){return J.map(function(Q){return Q===C3?I:typeof Q==="string"?U31(Q):Q._src}).join("\\/")}).join("|");if(Y="^(?:"+Y+")$",this.negate)Y="^(?!"+Y+").*$";try{this.regexp=new RegExp(Y,U)}catch(J){this.regexp=!1}return this.regexp}K$.match=function($,q,I){I=I||{};var U=new g4(q,I);if($=$.filter(function(Y){return U.match(Y)}),U.options.nonull&&!$.length)$.push(q);return $};g4.prototype.match=function(q,I){if(typeof I>"u")I=this.partial;if(this.debug("match",q,this.pattern),this.comment)return!1;if(this.empty)return q==="";if(q==="/"&&I)return!0;var U=this.options;if(QK.sep!=="/")q=q.split(QK.sep).join("/");q=q.split(HJ0),this.debug(this.pattern,"split",q);var Y=this.set;this.debug(this.pattern,"set",Y);var J,Q;for(Q=q.length-1;Q>=0;Q--)if(J=q[Q],J)break;for(Q=0;Q<Y.length;Q++){var K=Y[Q],z=q;if(U.matchBase&&K.length===1)z=[J];var w=this.matchOne(z,K,I);if(w){if(U.flipNegate)return!0;return!this.negate}}if(U.flipNegate)return!1;return this.negate};g4.prototype.matchOne=function($,q,I){if(q.indexOf(C3)!==-1)return this._matchGlobstar($,q,I,0,0);return this._matchOne($,q,I,0,0)};g4.prototype._matchGlobstar=function($,q,I,U,Y){var J,Q=-1;for(J=Y;J<q.length;J++)if(q[J]===C3){Q=J;break}var K=-1;for(J=q.length-1;J>=0;J--)if(q[J]===C3){K=J;break}var z=q.slice(Y,Q),w=I?q.slice(Q+1):q.slice(Q+1,K),G=I?[]:q.slice(K+1);if(z.length){var H=$.slice(U,U+z.length);if(!this._matchOne(H,z,I,0,0))return!1;U+=z.length}var V=0;if(G.length){if(G.length+U>$.length)return!1;var W=$.length-G.length;if(this._matchOne($,G,I,W,0))V=G.length;else{if($[$.length-1]!==""||U+G.length===$.length)return!1;if(W--,!this._matchOne($,G,I,W,0))return!1;V=G.length+1}}if(!w.length){var X=!!V;for(J=U;J<$.length-V;J++){var L=String($[J]);if(X=!0,L==="."||L===".."||!this.options.dot&&L.charAt(0)===".")return!1}return I||X}var D=[[[],0]],N=D[0],E=0,T=[0];for(var P=0;P<w.length;P++){var B=w[P];if(B===C3)T.push(E),N=[[],0],D.push(N);else N[0].push(B),E++}var k=D.length-1,h=$.length-V;for(var f=0;f<D.length;f++)D[f][1]=h-(T[k--]+D[f][0].length);return!!this._matchGlobStarBodySections($,D,U,0,I,0,!!V)};g4.prototype._matchGlobStarBodySections=function($,q,I,U,Y,J,Q){var K=q[U];if(!K){for(var z=I;z<$.length;z++){Q=!0;var w=$[z];if(w==="."||w===".."||!this.options.dot&&w.charAt(0)===".")return!1}return Q}var G=K[0],H=K[1];while(I<=H){var V=this._matchOne($.slice(0,I+G.length),G,Y,I,0);if(V&&J<this.maxGlobstarRecursion){var W=this._matchGlobStarBodySections($,q,I+G.length,U+1,Y,J+1,Q);if(W!==!1)return W}var w=$[I];if(w==="."||w===".."||!this.options.dot&&w.charAt(0)===".")return!1;I++}return Y||null};g4.prototype._matchOne=function($,q,I,U,Y){var J,Q,K,z;for(J=U,Q=Y,K=$.length,z=q.length;J<K&&Q<z;J++,Q++){this.debug("matchOne loop");var w=q[Q],G=$[J];if(this.debug(q,w,G),w===!1||w===C3)return!1;var H;if(typeof w==="string")H=G===w,this.debug("string match",w,G,H);else H=G.match(w),this.debug("pattern match",w,G,H);if(!H)return!1}if(J===K&&Q===z)return!0;else if(J===K)return I;else if(Q===z)return J===K-1&&$[J]==="";throw Error("wtf?")};function I31($){return $.replace(/\\(.)/g,"$1")}function U31($){return $.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}});var bX=O((dB1,nX)=>{function ZJ0($){return $.charAt(0)==="/"}function XJ0($){var q=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/,I=q.exec($),U=I[1]||"",Y=Boolean(U&&U.charAt(1)!==":");return Boolean(I[2]||Y)}nX.exports=process.platform==="win32"?XJ0:ZJ0;nX.exports.posix=ZJ0;nX.exports.win32=XJ0});var Qh=O((W31)=>{W31.setopts=w31;W31.ownProp=LJ0;W31.makeAbs=KK;W31.finish=G31;W31.mark=H31;W31.isIgnored=OJ0;W31.childrenIgnored=V31;function LJ0($,q){return Object.prototype.hasOwnProperty.call($,q)}var Y31=o("fs"),dU=o("path"),J31=fX(),DJ0=bX(),Jh=J31.Minimatch;function Q31($,q){return $.localeCompare(q,"en")}function K31($,q){if($.ignore=q.ignore||[],!Array.isArray($.ignore))$.ignore=[$.ignore];if($.ignore.length)$.ignore=$.ignore.map(z31)}function z31($){var q=null;if($.slice(-3)==="/**"){var I=$.replace(/(\/\*\*)+$/,"");q=new Jh(I,{dot:!0})}return{matcher Line truncated
See: https://github.com/isaacs/node-glob/issues/167`);return new S4($,q).found}function S4($,q){if(!$)throw Error("must provide pattern");if(typeof q==="function"||arguments.length===3)throw TypeError(`callback provided to sync glob
See: https://github.com/isaacs/node-glob/issues/167`);if(!(this instanceof S4))return new S4($,q);if(A31(this,$,q),this.noprocess)return this;var I=this.minimatch.set.length;this.matches=Array(I);for(var U=0;U<I;U++)this._process(this.minimatch.set[U],U,!1);this._finish()}S4.prototype._finish=function(){if(FJ0.ok(this instanceof S4),this.realpath){var $=this;this.matches.forEach(function(q,I){var U=$.matches[I]=Object.create(null);for(var Y in q)try{Y=$._makeAbs(Y);var J=M31.realpathSync(Y,$.realpathCache);U[J]=!0}catch(Q){if(Q.syscall==="stat")U[$._makeAbs(Y)]=!0;else throw Q}})}_3.finish(this)};S4.prototype._process=function($,q,I){FJ0.ok(this instanceof S4);var U=0;while(typeof $[U]==="string")U++;var Y;switch(U){case $.length:this._processSimple($.join("/"),q);return;case 0:Y=null;break;default:Y=$.slice(0,U).join("/");break}var J=$.slice(U),Q;if(Y===null)Q=".";else if(iX(Y)||iX($.map(function(w){return typeof w==="string"?w:"[*]"}).join("/"))){if(!Y||!iX(Y))Y="/"+Y;Q=Y}else Q=Y;var K=this._makeAbs(Q);if(P31(this,Q))return;var z=J[0]===NJ0.GLOBSTAR;if(z)this._processGlobStar(Y,Q,K,J,q,I);else this._processReaddir(Y,Q,K,J,q,I)};S4.prototype._processReaddir=function($,q,I,U,Y,J){var Q=this._readdir(I,J);if(!Q)return;var K=U[0],z=!!this.minimatch.negate,w=K._glob,G=this.dot||w.charAt(0)===".",H=[];for(var V=0;V<Q.length;V++){var W=Q[V];if(W.charAt(0)!=="."||G){var X;if(z&&!$)X=!W.match(K);else X=W.match(K);if(X)H.push(W)}}var L=H.length;if(L===0)return;if(U.length===1&&!this.mark&&!this.stat){if(!this.matches[Y])this.matches[Y]=Object.create(null);for(var V=0;V<L;V++){var W=H[V];if($)if($.slice(-1)!=="/")W=$+"/"+W;else W=$+W;if(W.charAt(0)==="/"&&!this.nomount)W=Kh.join(this.root,W);this._emitMatch(Y,W)}return}U.shift();for(var V=0;V<L;V++){var W=H[V],D;if($)D=[$,W];else D=[W];this._process(D.concat(U),Y,J)}};S4.prototype._emitMatch=function($,q){if(T31(this,q))return;var I=this._makeAbs(q);if(this.mark)q=this._mark(q);if(this.absolute)q=I;if(this.matches[$][q])return;if(this.nodir){var U=this.cache[I];if(U==="DIR"||Array.isArray(U))return}if(this.matches[$][q]=!0,this.stat)this._stat(q)};S4.prototype._readdirInGlobStar=function($){if(this.follow)return this._readdir($,!1);var q,I,U;try{I=this.fs.lstatSync($)}catch(J){if(J.code==="ENOENT")return null}var Y=I&&I.isSymbolicLink();if(this.symlinks[$]=Y,!Y&&I&&!I.isDirectory())this.cache[$]="FILE";else q=this._readdir($,!1);return q};S4.prototype._readdir=function($,q){var I;if(q&&!zh(this.symlinks,$))return this._readdirInGlobStar($);if(zh(this.cache,$)){var U=this.cache[$];if(!U||U==="FILE")return null;if(Array.isArray(U))return U}try{return this._readdirEntries($,this.fs.readdirSync($))}catch(Y){return this._readdirError($,Y),null}};S4.prototype._readdirEntries=function($,q){if(!this.mark&&!this.stat)for(var I=0;I<q.length;I++){var U=q[I];if($==="/")U=$+U;else U=$+"/"+U;this.cache[U]=!0}return this.cache[$]=q,q};S4.prototype._readdirError=function($,q){switch(q.code){case"ENOTSUP":case"ENOTDIR":var I=this._makeAbs($);if(this.cache[I]="FILE",I===this.cwdAbs){var U=Error(q.code+" invalid cwd "+this.cwd);throw U.path=this.cwd,U.code=q.code,U}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs($)]=!1;break;default:if(this.cache[this._makeAbs($)]=!1,this.strict)throw q;if(!this.silent)console.error("glob error",q);break}};S4.prototype._processGlobStar=function($,q,I,U,Y,J){var Q=this._readdir(I,J);if(!Q)return;var K=U.slice(1),z=$?[$]:[],w=z.concat(K);this._process(w,Y,!1);var G=Q.length,H=this.symlinks[I];if(H&&J)return;for(var V=0;V<G;V++){var W=Q[V];if(W.charAt(0)==="."&&!this.dot)continue;var X=z.concat(Q[V],K);this._process(X,Y,!0);var L=z.concat(Q[V],U);this._process(L,Y,!0)}};S4.prototype._processSimple=function($,q){var I=this._stat($);if(!this.matches[q])this.matches[q]=Object.create(null);if(!I)return;if($&&iX($)&&!this.nomount){var U=/[\/\\]$/.test($);if($.charAt(0)==="/")$=Kh.join(this.root,$);else if($=Kh.resolve(this.root,$),U)$+="/"}if(process.platform==="win32")$=$.replace(/\\/g,"/");this._emitMatch(q,$)};S4.prototype._stat=function($){var q=this._makeAbs($),I=$.slice(-1)==="/";if($.length>this.maxLength)return!1;if(!this.stat&&zh(this.cache,q)){var Q=this.cache[q];if(Array.isArray(Q))Q="DIR";if(!I||Q==="DIR")return Q;if(I&&Q==="FILE")return!1}var U,Y=this.statCache[q];if(!Y){var J;try{J=this.fs.lstatSync(q)}catch(K){if(K&&(K.code==="ENOENT"||K.code==="ENOTDIR"))return this.statCache[q]=!1,!1}if(J&&J.isSymbolicLink())try{Y=this.fs.statSync(q)}catch(K){Y=J}else Y=J}this.statCache[q]=Y;var Q=!0;if(Y)Q=Y.isDirectory()?"DIR":"FILE";if(this.cache[q]=this.cache[q]||Q,I&&Q==="FILE")return!1;return Q};S4.prototype._mark=function($){return _3.mark(this,$)};S4.prototype._makeAbs=function($){return _3.makeAbs(this,$)}});var wh=O((aB1,EJ0)=>{EJ0.exports=TJ0;function TJ0($,q){if($&&q)return TJ0($)(q);if(typeof $!=="function")throw TypeError("need wrapper function");return Object.keys($).forEach(function(U){I[U]=$[U]}),I;f Line truncated
`);if($.linkname)q+=bh(" linkpath="+$.linkname+`
`);var I=$.pax;if(I)for(var U in I)q+=bh(" "+U+"="+I[U]+`
`);return Buffer.from(q)};nq1.decodePax=function($){var q={};while($.length){var I=0;while(I<$.length&&$[I]!==32)I++;var U=parseInt($.slice(0,I).toString(),10);if(!U)return q;var Y=$.slice(I+1,U-1).toString(),J=Y.indexOf("=");if(J===-1)return q;q[Y.slice(0,J)]=Y.slice(J+1),$=$.slice(U)}return q};nq1.encode=function($){var q=Rq1(512),I=$.name,U="";if($.typeflag===5&&I[I.length-1]!=="/")I+="/";if(Buffer.byteLength(I)!==I.length)return null;while(Buffer.byteLength(I)>100){var Y=I.indexOf("/");if(Y===-1)return null;U+=U?"/"+I.slice(0,Y):I.slice(0,Y),I=I.slice(Y+1)}if(Buffer.byteLength(I)>100||Buffer.byteLength(U)>155)return null;if($.linkname&&Buffer.byteLength($.linkname)>100)return null;if(q.write(I),q.write(e9($.mode&yq1,6),100),q.write(e9($.uid,6),108),q.write(e9($.gid,6),116),q.write(e9($.size,11),124),q.write(e9($.mtime.getTime()/1000|0,11),136),q[156]=pQ0+kq1($.type),$.linkname)q.write($.linkname,157);if(cQ0.copy(q,WK),_q1.copy(q,ih),$.uname)q.write($.uname,265);if($.gname)q.write($.gname,297);if(q.write(e9($.devmajor||0,6),329),q.write(e9($.devminor||0,6),337),U)q.write(U,345);return q.write(e9(lQ0(q),6),148),q};nq1.decode=function($,q,I){var U=$[156]===0?0:$[156]-pQ0,Y=rU($,0,100,q),J=$7($,100,8),Q=$7($,108,8),K=$7($,116,8),z=$7($,124,12),w=$7($,136,12),G=xq1(U),H=$[157]===0?null:rU($,157,100,q),V=rU($,265,32),W=rU($,297,32),X=$7($,329,8),L=$7($,337,8),D=lQ0($);if(D===256)return null;if(D!==$7($,148,8))throw Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(cQ0.compare($,WK,WK+6)===0){if($[345])Y=rU($,345,155,q)+"/"+Y}else if(hq1.compare($,WK,WK+6)===0&&Sq1.compare($,ih,ih+2)===0);else if(!I)throw Error("Invalid tar header: unknown format.");if(U===0&&Y&&Y[Y.length-1]==="/")U=5;return{name:Y,mode:J,uid:Q,gid:K,size:z,mtime:new Date(1000*w),type:G,linkname:H,uname:V,gname:W,devmajor:X,devminor:L}}});var eQ0=O((_R1,sQ0)=>{var oQ0=o("util"),lq1=iQ0(),ZK=ph(),rQ0=X6().Writable,tQ0=X6().PassThrough,aQ0=function(){},mQ0=function($){return $&=511,$&&512-$},mq1=function($,q){var I=new rX($,q);return I.end(),I},oq1=function($,q){if(q.path)$.name=q.path;if(q.linkpath)$.linkname=q.linkpath;if(q.size)$.size=parseInt(q.size,10);return $.pax=q,$},rX=function($,q){this._parent=$,this.offset=q,tQ0.call(this,{autoDestroy:!1})};oQ0.inherits(rX,tQ0);rX.prototype.destroy=function($){this._parent.destroy($)};var C5=function($){if(!(this instanceof C5))return new C5($);rQ0.call(this,$),$=$||{},this._offset=0,this._buffer=lq1(),this._missing=0,this._partial=!1,this._onparse=aQ0,this._header=null,this._stream=null,this._overflow=null,this._cb=null,this._locked=!1,this._destroyed=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null;var q=this,I=q._buffer,U=function(){q._continue()},Y=function(V){if(q._locked=!1,V)return q.destroy(V);if(!q._stream)U()},J=function(){q._stream=null;var V=mQ0(q._header.size);if(V)q._parse(V,Q);else q._parse(512,H);if(!q._locked)U()},Q=function(){q._buffer.consume(mQ0(q._header.size)),q._parse(512,H),U()},K=function(){var V=q._header.size;q._paxGlobal=ZK.decodePax(I.slice(0,V)),I.consume(V),J()},z=function(){var V=q._header.size;if(q._pax=ZK.decodePax(I.slice(0,V)),q._paxGlobal)q._pax=Object.assign({},q._paxGlobal,q._pax);I.consume(V),J()},w=function(){var V=q._header.size;this._gnuLongPath=ZK.decodeLongPath(I.slice(0,V),$.filenameEncoding),I.consume(V),J()},G=function(){var V=q._header.size;this._gnuLongLinkPath=ZK.decodeLongPath(I.slice(0,V),$.filenameEncoding),I.consume(V),J()},H=function(){var V=q._offset,W;try{W=q._header=ZK.decode(I.slice(0,512),$.filenameEncoding,$.allowUnknownFormat)}catch(X){q.emit("error",X)}if(I.consume(512),!W){q._parse(512,H),U();return}if(W.type==="gnu-long-path"){q._parse(W.size,w),U();return}if(W.type==="gnu-long-link-path"){q._parse(W.size,G),U();return}if(W.type==="pax-global-header"){q._parse(W.size,K),U();return}if(W.type==="pax-header"){q._parse(W.size,z),U();return}if(q._gnuLongPath)W.name=q._gnuLongPath,q._gnuLongPath=null;if(q._gnuLongLinkPath)W.linkname=q._gnuLongLinkPath,q._gnuLongLinkPath=null;if(q._pax)q._header=W=oq1(W,q._pax),q._pax=null;if(q._locked=!0,!W.size||W.type==="directory"){q._parse(512,H),q.emit("entry",W,mq1(q,V),Y);return}q._stream=new rX(q,V),q.emit("entry",W,q._stream,Y),q._parse(W.size,J),U()};this._onheader=H,this._parse(512,H)};oQ0.inherits(C5,rQ0);C5.prototype.destroy=function($){if(this._destroyed)return;if(this._destroyed=!0,$)this.emit("error",$);if(this.emit("close"),this._stream)this._stream.emit("close")};C5.prototype._parse=function($,q){if(this._destroyed)return;if(this._offset+=$,this._missing=$,q===this._onheader)this._partial=!1;this._onparse=q};C5.prototype._continue=function(){if(this._destroyed)return;var $=this._cb;if(this._cb=aQ0,this._overflow)this._write(this._overflow,void 0,$);else $()};C5.prototype._write=function($,q,I){if(this._destroyed)return;var U=this._stream,Y=this._buffer,J=this._missing;if($.length)this._partial=!0;if($.length<J){ Line truncated
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">`)}_writeRelationship($){if(!this.count)this._writeOpen();let q=`rId${++this.count}`;if($.TargetMode)this.stream.write(`<Relationship Id="${q}" Type="${$.Type}" Target="${WI1.xmlEncode($.Target)}" TargetMode="${$.TargetMode}"/>`);else this.stream.write(`<Relationship Id="${q}" Type="${$.Type}" Target="${$.Target}"/>`);return q}_writeClose(){this.stream.write("</Relationships>")}}E20.exports=T20});var C20=O((iR1,v20)=>{var j20=$6(),B20=u9(),XI1=z4(),LI1=Av(),DI1=Tv();class R20{constructor($,q,I){this.id=I.id,this.count=0,this._worksheet=$,this._workbook=I.workbook,this._sheetRelsWriter=q}get commentsStream(){if(!this._commentsStream)this._commentsStream=this._workbook._openStream(`/xl/comments${this.id}.xml`);return this._commentsStream}get vmlStream(){if(!this._vmlStream)this._vmlStream=this._workbook._openStream(`xl/drawings/vmlDrawing${this.id}.vml`);return this._vmlStream}_addRelationships(){let $={Type:B20.Comments,Target:`../comments${this.id}.xml`};this._sheetRelsWriter.addRelationship($);let q={Type:B20.VmlDrawing,Target:`../drawings/vmlDrawing${this.id}.vml`};this.vmlRelId=this._sheetRelsWriter.addRelationship(q)}_addCommentRefs(){this._workbook.commentRefs.push({commentName:`comments${this.id}`,vmlDrawing:`vmlDrawing${this.id}`})}_writeOpen(){this.commentsStream.write('<?xml version="1.0" encoding="UTF-8" standalone="yes"?><comments xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"><authors><author>Author</author></authors><commentList>'),this.vmlStream.write('<?xml version="1.0" encoding="UTF-8"?><xml xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:x="urn:schemas-microsoft-com:office:excel"><o:shapelayout v:ext="edit"><o:idmap v:ext="edit" data="1" /></o:shapelayout><v:shapetype id="_x0000_t202" coordsize="21600,21600" o:spt="202" path="m,l,21600r21600,l21600,xe"><v:stroke joinstyle="miter" /><v:path gradientshapeok="t" o:connecttype="rect" /></v:shapetype>')}_writeComment($,q){let I=new LI1,U=new j20;I.render(U,$),this.commentsStream.write(U.xml);let Y=new DI1,J=new j20;Y.render(J,$,q),this.vmlStream.write(J.xml)}_writeClose(){this.commentsStream.write("</commentList></comments>"),this.vmlStream.write("</xml>")}addComments($){if($&&$.length){if(!this.startedData)this._worksheet.comments=[],this._writeOpen(),this._addRelationships(),this._addCommentRefs(),this.startedData=!0;$.forEach((q)=>{q.refAddress=XI1.decodeAddress(q.ref)}),$.forEach((q)=>{this._writeComment(q,this.count),this.count+=1})}}commit(){if(this.count)this._writeClose(),this.commentsStream.end(),this.vmlStream.end()}}v20.exports=R20});var x20=O((pR1,u20)=>{var OI1=Z4(),NI1=u9(),lh=z4(),_20=ng(),h20=w5(),FI1=qR(),S20=WV(),mh=XV(),MI1=g20(),AI1=C20(),PI1=kg(),n4=new FI1,oh=h9(),TI1=tR(),EI1=aR(),gI1=sR(),jI1=lR(),BI1=cR(),RI1=mR(),vI1=eR(),CI1=$v(),_I1=qv(),hI1=Iv(),SI1=Uv(),yI1=Yv(),uI1=wv(),xI1=Qv(),kI1=Jv(),b4={dataValidations:new TI1,sheetProperties:new EI1,sheetFormatProperties:new gI1,columns:new oh({tag:"cols",length:!1,childXform:new jI1}),row:new BI1,hyperlinks:new oh({tag:"hyperlinks",length:!1,childXform:new RI1}),sheetViews:new oh({tag:"sheetViews",length:!1,childXform:new vI1}),sheetProtection:new CI1,pageMargins:new _I1,pageSeteup:new hI1,autoFilter:new SI1,picture:new yI1,conditionalFormattings:new uI1,headerFooter:new xI1,rowBreaks:new kI1};class y20{constructor($){this.id=$.id,this.name=$.name||`Sheet${this.id}`,this.state=$.state||"visible",this._rows=[],this._columns=null,this._keys={},this._merges=[],this._merges.add=function(){},this._sheetRelsWriter=new MI1($),this._sheetCommentsWriter=new AI1(this,this._sheetRelsWriter,$),this._dimensions=new h20,this._rowZero=1,this.committed=!1,this.dataValidations=new PI1,this._formulae={},this._siFormulae=0,this.conditionalFormatting=[],this.rowBreaks=[],this.properties=Object.assign({},{defaultRowHeight:15,dyDescent:55,outlineLevelCol:0,outlineLevelRow:0},$.properties),this.headerFooter=Object.assign({},{differentFirst:!1,differentOddEven:!1,oddHeader:null,oddFooter:null,evenHeader:null,evenFooter:null,firstHeader:null,firstFooter:null},$.headerFooter),this.pageSetup=Object.assign({},{margins:{left:0.7,right:0.7,top:0.75,bottom:0.75,header:0.3,footer:0.3},orientation:"portrait",horizontalDpi:4294967295,verticalDpi:4294967295,fitToPage:!!($.pageSetup&&($.pageSetup.fitToWidth||$.pageSetup.fitToHeight)&&!$.pageSetup.scale),pageOrder:"downThenOver",blackAndWhite:!1,draft:!1,cellComments:"None",errors:"displayed",scale:100,fitToWidth:1,fitToHeight:1,paperSize:void 0,showRowColHeaders:!1,showGridLines:!1,horizontalCentered:!1,verticalCentered:!1,rowBreaks:null,colBreaks:null},$.pageSetup),this.useSharedStrings=$.useSharedStrings||!1,this._workbook=$.workbook,this.hasComments=!1,this._views=$.views||[],this.autoFilter=$.autoFilter||null,this._media=[],this.sheetProtection=null,this._writeOpenWorksheet(),this.startedData=!1}get Line truncated
*/rq0.exports=function($,q){if(typeof $!=="string")throw TypeError("expected path to be a string");if($==="\\"||$==="/")return"/";var I=$.length;if(I<=1)return $;var U="";if(I>4&&$[3]==="\\"){var Y=$[2];if((Y==="?"||Y===".")&&$.slice(0,2)==="\\\\")$=$.slice(2),U="//"}var J=$.split(/[/\\]+/);if(q!==!1&&J[J.length-1]==="")J.pop();return U+J.join("/")}});var LC=O((Ag1,II0)=>{var aq0=9007199254740991,l11="[object Arguments]",o11="[object Function]",r11="[object GeneratorFunction]",t11=/^(?:0|[1-9]\d*)$/;function sq0($,q,I){switch(I.length){case 0:return $.call(q);case 1:return $.call(q,I[0]);case 2:return $.call(q,I[0],I[1]);case 3:return $.call(q,I[0],I[1],I[2])}return $.apply(q,I)}function a11($,q){var I=-1,U=Array($);while(++I<$)U[I]=q(I);return U}var b2=Object.prototype,n2=b2.hasOwnProperty,eq0=b2.toString,s11=b2.propertyIsEnumerable,tq0=Math.max;function e11($,q){var I=G41($)||z41($)?a11($.length,String):[],U=I.length,Y=!!U;for(var J in $)if((q||n2.call($,J))&&!(Y&&(J=="length"||qI0(J,U))))I.push(J);return I}function $41($,q,I,U){if($===void 0||WC($,b2[I])&&!n2.call(U,I))return q;return $}function q41($,q,I){var U=$[q];if(!(n2.call($,q)&&WC(U,I))||I===void 0&&!(q in $))$[q]=I}function I41($){if(!XC($))return K41($);var q=Q41($),I=[];for(var U in $)if(!(U=="constructor"&&(q||!n2.call($,U))))I.push(U);return I}function $I0($,q){return q=tq0(q===void 0?$.length-1:q,0),function(){var I=arguments,U=-1,Y=tq0(I.length-q,0),J=Array(Y);while(++U<Y)J[U]=I[q+U];U=-1;var Q=Array(q+1);while(++U<q)Q[U]=I[U];return Q[q]=J,sq0($,this,Q)}}function U41($,q,I,U){I||(I={});var Y=-1,J=q.length;while(++Y<J){var Q=q[Y],K=U?U(I[Q],$[Q],Q,I,$):void 0;q41(I,Q,K===void 0?$[Q]:K)}return I}function Y41($){return $I0(function(q,I){var U=-1,Y=I.length,J=Y>1?I[Y-1]:void 0,Q=Y>2?I[2]:void 0;if(J=$.length>3&&typeof J=="function"?(Y--,J):void 0,Q&&J41(I[0],I[1],Q))J=Y<3?void 0:J,Y=1;q=Object(q);while(++U<Y){var K=I[U];if(K)$(q,K,U,J)}return q})}function qI0($,q){return q=q==null?aq0:q,!!q&&(typeof $=="number"||t11.test($))&&($>-1&&$%1==0&&$<q)}function J41($,q,I){if(!XC(I))return!1;var U=typeof q;if(U=="number"?ZC(I)&&qI0(q,I.length):U=="string"&&(q in I))return WC(I[q],$);return!1}function Q41($){var q=$&&$.constructor,I=typeof q=="function"&&q.prototype||b2;return $===I}function K41($){var q=[];if($!=null)for(var I in Object($))q.push(I);return q}function WC($,q){return $===q||$!==$&&q!==q}function z41($){return H41($)&&n2.call($,"callee")&&(!s11.call($,"callee")||eq0.call($)==l11)}var G41=Array.isArray;function ZC($){return $!=null&&V41($.length)&&!w41($)}function H41($){return W41($)&&ZC($)}function w41($){var q=XC($)?eq0.call($):"";return q==o11||q==r11}function V41($){return typeof $=="number"&&$>-1&&$%1==0&&$<=aq0}function XC($){var q=typeof $;return!!$&&(q=="object"||q=="function")}function W41($){return!!$&&typeof $=="object"}var Z41=Y41(function($,q,I,U){U41(q,L41(q),$,U)}),X41=$I0(function($){return $.push(void 0,$41),sq0(Z41,void 0,$)});function L41($){return ZC($)?e11($,!0):I41($)}II0.exports=X41});var YI0=O((Pg1,DC)=>{function D41($,q){if(!($ instanceof q))throw TypeError("Cannot call a class as a function")}var UI0=M4().Buffer,i2=r("util");function O41($,q,I){$.copy(q,I)}DC.exports=function(){function $(){D41(this,$),this.head=null,this.tail=null,this.length=0}return $.prototype.push=function(I){var U={data:I,next:null};if(this.length>0)this.tail.next=U;else this.head=U;this.tail=U,++this.length},$.prototype.unshift=function(I){var U={data:I,next:this.head};if(this.length===0)this.tail=U;this.head=U,++this.length},$.prototype.shift=function(){if(this.length===0)return;var I=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;return--this.length,I},$.prototype.clear=function(){this.head=this.tail=null,this.length=0},$.prototype.join=function(I){if(this.length===0)return"";var U=this.head,Y=""+U.data;while(U=U.next)Y+=I+U.data;return Y},$.prototype.concat=function(I){if(this.length===0)return UI0.alloc(0);var U=UI0.allocUnsafe(I>>>0),Y=this.head,J=0;while(Y)O41(Y.data,U,J),J+=Y.data.length,Y=Y.next;return U},$}();if(i2&&i2.inspect&&i2.inspect.custom)DC.exports.prototype[i2.inspect.custom]=function(){var $=i2.inspect({length:this.length});return this.constructor.name+" "+$}});var OC=O((Tg1,JI0)=>{var tZ=F4();function N41($,q){var I=this,U=this._readableState&&this._readableState.destroyed,Y=this._writableState&&this._writableState.destroyed;if(U||Y){if(q)q($);else if($){if(!this._writableState)tZ.nextTick(aZ,this,$);else if(!this._writableState.errorEmitted)this._writableState.errorEmitted=!0,tZ.nextTick(aZ,this,$)}return this}if(this._readableState)this._readableState.destroyed=!0;if(this._writableState)this._writableState.destroyed=!0;return this._destroy($||null,function(J){if(!q&&J){if(!I._writableState)tZ.nextTick(aZ,I,J);else if(!I._writableState.errorEmitted)I._writableState.errorEmitted=!0,tZ.nextTick(aZ,I,J)}else if(q)q(J)}),this}function F41(){if(this._readableState)this._readable Line truncated
%s`,B,B,E,U);var f=E.type==="*"?I_:E.type==="?"?q_:"\\"+E.type;Y=!0,U=U.slice(0,E.reStart)+f+"\\("+B}if(X(),J)U+="\\\\";var S=!1;switch(U.charAt(0)){case"[":case".":case"(":S=!0}for(var n=K.length-1;n>-1;n--){var R=K[n],p=U.slice(0,R.reStart),i=U.slice(R.reStart,R.reEnd-8),C=U.slice(R.reEnd-8,R.reEnd),k=U.slice(R.reEnd);C+=k;var b=p.split("(").length-1,U0=k;for(L=0;L<b;L++)U0=U0.replace(/\)[+*?]?/,"");k=U0;var j="";if(k===""&&q!==WX)j="$";var x=p+i+k+j+C;U=x}if(U!==""&&Y)U="(?=.)"+U;if(S)U=V+U;if(q===WX)return[U,Y];if(!Y)return f51($);var d=I.nocase?"i":"";try{var t=new RegExp("^"+U+"$",d)}catch(Q0){return new RegExp("$.")}return t._glob=$,t._src=U,t}K$.makeRe=function($,q){return new j4($,q||{}).makeRe()};j4.prototype.makeRe=k51;function k51(){if(this.regexp||this.regexp===!1)return this.regexp;var $=this.set;if(!$.length)return this.regexp=!1,this.regexp;var q=this.options,I=q.noglobstar?I_:q.dot?v51:C51,U=q.nocase?"i":"",Y=$.map(function(J){return J.map(function(Q){return Q===g3?I:typeof Q==="string"?b51(Q):Q._src}).join("\\/")}).join("|");if(Y="^(?:"+Y+")$",this.negate)Y="^(?!"+Y+").*$";try{this.regexp=new RegExp(Y,U)}catch(J){this.regexp=!1}return this.regexp}K$.match=function($,q,I){I=I||{};var U=new j4(q,I);if($=$.filter(function(Y){return U.match(Y)}),U.options.nonull&&!$.length)$.push(q);return $};j4.prototype.match=function(q,I){if(typeof I>"u")I=this.partial;if(this.debug("match",q,this.pattern),this.comment)return!1;if(this.empty)return q==="";if(q==="/"&&I)return!0;var U=this.options;if($K.sep!=="/")q=q.split($K.sep).join("/");q=q.split(hU0),this.debug(this.pattern,"split",q);var Y=this.set;this.debug(this.pattern,"set",Y);var J,Q;for(Q=q.length-1;Q>=0;Q--)if(J=q[Q],J)break;for(Q=0;Q<Y.length;Q++){var K=Y[Q],z=q;if(U.matchBase&&K.length===1)z=[J];var G=this.matchOne(z,K,I);if(G){if(U.flipNegate)return!0;return!this.negate}}if(U.flipNegate)return!1;return this.negate};j4.prototype.matchOne=function($,q,I){if(q.indexOf(g3)!==-1)return this._matchGlobstar($,q,I,0,0);return this._matchOne($,q,I,0,0)};j4.prototype._matchGlobstar=function($,q,I,U,Y){var J,Q=-1;for(J=Y;J<q.length;J++)if(q[J]===g3){Q=J;break}var K=-1;for(J=q.length-1;J>=0;J--)if(q[J]===g3){K=J;break}var z=q.slice(Y,Q),G=I?q.slice(Q+1):q.slice(Q+1,K),H=I?[]:q.slice(K+1);if(z.length){var w=$.slice(U,U+z.length);if(!this._matchOne(w,z,I,0,0))return!1;U+=z.length}var V=0;if(H.length){if(H.length+U>$.length)return!1;var W=$.length-H.length;if(this._matchOne($,H,I,W,0))V=H.length;else{if($[$.length-1]!==""||U+H.length===$.length)return!1;if(W--,!this._matchOne($,H,I,W,0))return!1;V=H.length+1}}if(!G.length){var X=!!V;for(J=U;J<$.length-V;J++){var L=String($[J]);if(X=!0,L==="."||L===".."||!this.options.dot&&L.charAt(0)===".")return!1}return I||X}var D=[[[],0]],N=D[0],E=0,T=[0];for(var P=0;P<G.length;P++){var B=G[P];if(B===g3)T.push(E),N=[[],0],D.push(N);else N[0].push(B),E++}var f=D.length-1,S=$.length-V;for(var n=0;n<D.length;n++)D[n][1]=S-(T[f--]+D[n][0].length);return!!this._matchGlobStarBodySections($,D,U,0,I,0,!!V)};j4.prototype._matchGlobStarBodySections=function($,q,I,U,Y,J,Q){var K=q[U];if(!K){for(var z=I;z<$.length;z++){Q=!0;var G=$[z];if(G==="."||G===".."||!this.options.dot&&G.charAt(0)===".")return!1}return Q}var H=K[0],w=K[1];while(I<=w){var V=this._matchOne($.slice(0,I+H.length),H,Y,I,0);if(V&&J<this.maxGlobstarRecursion){var W=this._matchGlobStarBodySections($,q,I+H.length,U+1,Y,J+1,Q);if(W!==!1)return W}var G=$[I];if(G==="."||G===".."||!this.options.dot&&G.charAt(0)===".")return!1;I++}return Y||null};j4.prototype._matchOne=function($,q,I,U,Y){var J,Q,K,z;for(J=U,Q=Y,K=$.length,z=q.length;J<K&&Q<z;J++,Q++){this.debug("matchOne loop");var G=q[Q],H=$[J];if(this.debug(q,G,H),G===!1||G===g3)return!1;var w;if(typeof G==="string")w=H===G,this.debug("string match",G,H,w);else w=H.match(G),this.debug("pattern match",G,H,w);if(!w)return!1}if(J===K&&Q===z)return!0;else if(J===K)return I;else if(Q===z)return J===K-1&&$[J]==="";throw Error("wtf?")};function f51($){return $.replace(/\\(.)/g,"$1")}function b51($){return $.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}});var DX=O((pg1,LX)=>{function uU0($){return $.charAt(0)==="/"}function xU0($){var q=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/,I=q.exec($),U=I[1]||"",Y=Boolean(U&&U.charAt(1)!==":");return Boolean(I[2]||Y)}LX.exports=process.platform==="win32"?xU0:uU0;LX.exports.posix=uU0;LX.exports.win32=xU0});var Y_=O((t51)=>{t51.setopts=m51;t51.ownProp=kU0;t51.makeAbs=qK;t51.finish=l51;t51.mark=o51;t51.isIgnored=bU0;t51.childrenIgnored=r51;function kU0($,q){return Object.prototype.hasOwnProperty.call($,q)}var n51=r("fs"),xU=r("path"),i51=XX(),fU0=DX(),U_=i51.Minimatch;function p51($,q){return $.localeCompare(q,"en")}function c51($,q){if($.ignore=q.ignore||[],!Array.isArray($.ignore))$.ignore=[$.ignore];if($.ignore.length)$.ignore=$.ignore.map(d51)}function d51($){var q=null;if($.slice(-3)==="/**"){var I=$.replace(/(\/\*\*)+$/,"");q=new U_(I,{dot:!0})}return{matcher Line truncated
See: https://github.com/isaacs/node-glob/issues/167`);return new y4($,q).found}function y4($,q){if(!$)throw Error("must provide pattern");if(typeof q==="function"||arguments.length===3)throw TypeError(`callback provided to sync glob
See: https://github.com/isaacs/node-glob/issues/167`);if(!(this instanceof y4))return new y4($,q);if(J91(this,$,q),this.noprocess)return this;var I=this.minimatch.set.length;this.matches=Array(I);for(var U=0;U<I;U++)this._process(this.minimatch.set[U],U,!1);this._finish()}y4.prototype._finish=function(){if(iU0.ok(this instanceof y4),this.realpath){var $=this;this.matches.forEach(function(q,I){var U=$.matches[I]=Object.create(null);for(var Y in q)try{Y=$._makeAbs(Y);var J=Y91.realpathSync(Y,$.realpathCache);U[J]=!0}catch(Q){if(Q.syscall==="stat")U[$._makeAbs(Y)]=!0;else throw Q}})}B3.finish(this)};y4.prototype._process=function($,q,I){iU0.ok(this instanceof y4);var U=0;while(typeof $[U]==="string")U++;var Y;switch(U){case $.length:this._processSimple($.join("/"),q);return;case 0:Y=null;break;default:Y=$.slice(0,U).join("/");break}var J=$.slice(U),Q;if(Y===null)Q=".";else if(OX(Y)||OX($.map(function(G){return typeof G==="string"?G:"[*]"}).join("/"))){if(!Y||!OX(Y))Y="/"+Y;Q=Y}else Q=Y;var K=this._makeAbs(Q);if(Q91(this,Q))return;var z=J[0]===nU0.GLOBSTAR;if(z)this._processGlobStar(Y,Q,K,J,q,I);else this._processReaddir(Y,Q,K,J,q,I)};y4.prototype._processReaddir=function($,q,I,U,Y,J){var Q=this._readdir(I,J);if(!Q)return;var K=U[0],z=!!this.minimatch.negate,G=K._glob,H=this.dot||G.charAt(0)===".",w=[];for(var V=0;V<Q.length;V++){var W=Q[V];if(W.charAt(0)!=="."||H){var X;if(z&&!$)X=!W.match(K);else X=W.match(K);if(X)w.push(W)}}var L=w.length;if(L===0)return;if(U.length===1&&!this.mark&&!this.stat){if(!this.matches[Y])this.matches[Y]=Object.create(null);for(var V=0;V<L;V++){var W=w[V];if($)if($.slice(-1)!=="/")W=$+"/"+W;else W=$+W;if(W.charAt(0)==="/"&&!this.nomount)W=J_.join(this.root,W);this._emitMatch(Y,W)}return}U.shift();for(var V=0;V<L;V++){var W=w[V],D;if($)D=[$,W];else D=[W];this._process(D.concat(U),Y,J)}};y4.prototype._emitMatch=function($,q){if(K91(this,q))return;var I=this._makeAbs(q);if(this.mark)q=this._mark(q);if(this.absolute)q=I;if(this.matches[$][q])return;if(this.nodir){var U=this.cache[I];if(U==="DIR"||Array.isArray(U))return}if(this.matches[$][q]=!0,this.stat)this._stat(q)};y4.prototype._readdirInGlobStar=function($){if(this.follow)return this._readdir($,!1);var q,I,U;try{I=this.fs.lstatSync($)}catch(J){if(J.code==="ENOENT")return null}var Y=I&&I.isSymbolicLink();if(this.symlinks[$]=Y,!Y&&I&&!I.isDirectory())this.cache[$]="FILE";else q=this._readdir($,!1);return q};y4.prototype._readdir=function($,q){var I;if(q&&!Q_(this.symlinks,$))return this._readdirInGlobStar($);if(Q_(this.cache,$)){var U=this.cache[$];if(!U||U==="FILE")return null;if(Array.isArray(U))return U}try{return this._readdirEntries($,this.fs.readdirSync($))}catch(Y){return this._readdirError($,Y),null}};y4.prototype._readdirEntries=function($,q){if(!this.mark&&!this.stat)for(var I=0;I<q.length;I++){var U=q[I];if($==="/")U=$+U;else U=$+"/"+U;this.cache[U]=!0}return this.cache[$]=q,q};y4.prototype._readdirError=function($,q){switch(q.code){case"ENOTSUP":case"ENOTDIR":var I=this._makeAbs($);if(this.cache[I]="FILE",I===this.cwdAbs){var U=Error(q.code+" invalid cwd "+this.cwd);throw U.path=this.cwd,U.code=q.code,U}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs($)]=!1;break;default:if(this.cache[this._makeAbs($)]=!1,this.strict)throw q;if(!this.silent)console.error("glob error",q);break}};y4.prototype._processGlobStar=function($,q,I,U,Y,J){var Q=this._readdir(I,J);if(!Q)return;var K=U.slice(1),z=$?[$]:[],G=z.concat(K);this._process(G,Y,!1);var H=Q.length,w=this.symlinks[I];if(w&&J)return;for(var V=0;V<H;V++){var W=Q[V];if(W.charAt(0)==="."&&!this.dot)continue;var X=z.concat(Q[V],K);this._process(X,Y,!0);var L=z.concat(Q[V],U);this._process(L,Y,!0)}};y4.prototype._processSimple=function($,q){var I=this._stat($);if(!this.matches[q])this.matches[q]=Object.create(null);if(!I)return;if($&&OX($)&&!this.nomount){var U=/[\/\\]$/.test($);if($.charAt(0)==="/")$=J_.join(this.root,$);else if($=J_.resolve(this.root,$),U)$+="/"}if(process.platform==="win32")$=$.replace(/\\/g,"/");this._emitMatch(q,$)};y4.prototype._stat=function($){var q=this._makeAbs($),I=$.slice(-1)==="/";if($.length>this.maxLength)return!1;if(!this.stat&&Q_(this.cache,q)){var Q=this.cache[q];if(Array.isArray(Q))Q="DIR";if(!I||Q==="DIR")return Q;if(I&&Q==="FILE")return!1}var U,Y=this.statCache[q];if(!Y){var J;try{J=this.fs.lstatSync(q)}catch(K){if(K&&(K.code==="ENOENT"||K.code==="ENOTDIR"))return this.statCache[q]=!1,!1}if(J&&J.isSymbolicLink())try{Y=this.fs.statSync(q)}catch(K){Y=J}else Y=J}this.statCache[q]=Y;var Q=!0;if(Y)Q=Y.isDirectory()?"DIR":"FILE";if(this.cache[q]=this.cache[q]||Q,I&&Q==="FILE")return!1;return Q};y4.prototype._mark=function($){return B3.mark(this,$)};y4.prototype._makeAbs=function($){return B3.makeAbs(this,$)}});var K_=O((rg1,lU0)=>{lU0.exports=mU0;function mU0($,q){if($&&q)return mU0($)(q);if(typeof $!=="function")throw TypeError("need wrapper function");return Object.keys($).forEach(function(U){I[U]=$[U]}),I;f Line truncated
`);if($.linkname)q+=f_(" linkpath="+$.linkname+`
`);var I=$.pax;if(I)for(var U in I)q+=f_(" "+U+"="+I[U]+`
`);return Buffer.from(q)};P71.decodePax=function($){var q={};while($.length){var I=0;while(I<$.length&&$[I]!==32)I++;var U=parseInt($.slice(0,I).toString(),10);if(!U)return q;var Y=$.slice(I+1,U-1).toString(),J=Y.indexOf("=");if(J===-1)return q;q[Y.slice(0,J)]=Y.slice(J+1),$=$.slice(U)}return q};P71.encode=function($){var q=V71(512),I=$.name,U="";if($.typeflag===5&&I[I.length-1]!=="/")I+="/";if(Buffer.byteLength(I)!==I.length)return null;while(Buffer.byteLength(I)>100){var Y=I.indexOf("/");if(Y===-1)return null;U+=U?"/"+I.slice(0,Y):I.slice(0,Y),I=I.slice(Y+1)}if(Buffer.byteLength(I)>100||Buffer.byteLength(U)>155)return null;if($.linkname&&Buffer.byteLength($.linkname)>100)return null;if(q.write(I),q.write(a9($.mode&O71,6),100),q.write(a9($.uid,6),108),q.write(a9($.gid,6),116),q.write(a9($.size,11),124),q.write(a9($.mtime.getTime()/1000|0,11),136),q[156]=wJ0+M71($.type),$.linkname)q.write($.linkname,157);if(VJ0.copy(q,KK),X71.copy(q,b_),$.uname)q.write($.uname,265);if($.gname)q.write($.gname,297);if(q.write(a9($.devmajor||0,6),329),q.write(a9($.devminor||0,6),337),U)q.write(U,345);return q.write(a9(ZJ0(q),6),148),q};P71.decode=function($,q,I){var U=$[156]===0?0:$[156]-wJ0,Y=nU($,0,100,q),J=s9($,100,8),Q=s9($,108,8),K=s9($,116,8),z=s9($,124,12),G=s9($,136,12),H=F71(U),w=$[157]===0?null:nU($,157,100,q),V=nU($,265,32),W=nU($,297,32),X=s9($,329,8),L=s9($,337,8),D=ZJ0($);if(D===256)return null;if(D!==s9($,148,8))throw Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(VJ0.compare($,KK,KK+6)===0){if($[345])Y=nU($,345,155,q)+"/"+Y}else if(L71.compare($,KK,KK+6)===0&&D71.compare($,b_,b_+2)===0);else if(!I)throw Error("Invalid tar header: unknown format.");if(U===0&&Y&&Y[Y.length-1]==="/")U=5;return{name:Y,mode:J,uid:Q,gid:K,size:z,mtime:new Date(1000*G),type:H,linkname:w,uname:V,gname:W,devmajor:X,devminor:L}}});var MJ0=O((vB1,FJ0)=>{var LJ0=r("util"),R71=HJ0(),zK=n_(),DJ0=X6().Writable,OJ0=X6().PassThrough,NJ0=function(){},XJ0=function($){return $&=511,$&&512-$},v71=function($,q){var I=new EX($,q);return I.end(),I},C71=function($,q){if(q.path)$.name=q.path;if(q.linkpath)$.linkname=q.linkpath;if(q.size)$.size=parseInt(q.size,10);return $.pax=q,$},EX=function($,q){this._parent=$,this.offset=q,OJ0.call(this,{autoDestroy:!1})};LJ0.inherits(EX,OJ0);EX.prototype.destroy=function($){this._parent.destroy($)};var B5=function($){if(!(this instanceof B5))return new B5($);DJ0.call(this,$),$=$||{},this._offset=0,this._buffer=R71(),this._missing=0,this._partial=!1,this._onparse=NJ0,this._header=null,this._stream=null,this._overflow=null,this._cb=null,this._locked=!1,this._destroyed=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null;var q=this,I=q._buffer,U=function(){q._continue()},Y=function(V){if(q._locked=!1,V)return q.destroy(V);if(!q._stream)U()},J=function(){q._stream=null;var V=XJ0(q._header.size);if(V)q._parse(V,Q);else q._parse(512,w);if(!q._locked)U()},Q=function(){q._buffer.consume(XJ0(q._header.size)),q._parse(512,w),U()},K=function(){var V=q._header.size;q._paxGlobal=zK.decodePax(I.slice(0,V)),I.consume(V),J()},z=function(){var V=q._header.size;if(q._pax=zK.decodePax(I.slice(0,V)),q._paxGlobal)q._pax=Object.assign({},q._paxGlobal,q._pax);I.consume(V),J()},G=function(){var V=q._header.size;this._gnuLongPath=zK.decodeLongPath(I.slice(0,V),$.filenameEncoding),I.consume(V),J()},H=function(){var V=q._header.size;this._gnuLongLinkPath=zK.decodeLongPath(I.slice(0,V),$.filenameEncoding),I.consume(V),J()},w=function(){var V=q._offset,W;try{W=q._header=zK.decode(I.slice(0,512),$.filenameEncoding,$.allowUnknownFormat)}catch(X){q.emit("error",X)}if(I.consume(512),!W){q._parse(512,w),U();return}if(W.type==="gnu-long-path"){q._parse(W.size,G),U();return}if(W.type==="gnu-long-link-path"){q._parse(W.size,H),U();return}if(W.type==="pax-global-header"){q._parse(W.size,K),U();return}if(W.type==="pax-header"){q._parse(W.size,z),U();return}if(q._gnuLongPath)W.name=q._gnuLongPath,q._gnuLongPath=null;if(q._gnuLongLinkPath)W.linkname=q._gnuLongLinkPath,q._gnuLongLinkPath=null;if(q._pax)q._header=W=C71(W,q._pax),q._pax=null;if(q._locked=!0,!W.size||W.type==="directory"){q._parse(512,w),q.emit("entry",W,v71(q,V),Y);return}q._stream=new EX(q,V),q.emit("entry",W,q._stream,Y),q._parse(W.size,J),U()};this._onheader=w,this._parse(512,w)};LJ0.inherits(B5,DJ0);B5.prototype.destroy=function($){if(this._destroyed)return;if(this._destroyed=!0,$)this.emit("error",$);if(this.emit("close"),this._stream)this._stream.emit("close")};B5.prototype._parse=function($,q){if(this._destroyed)return;if(this._offset+=$,this._missing=$,q===this._onheader)this._partial=!1;this._onparse=q};B5.prototype._continue=function(){if(this._destroyed)return;var $=this._cb;if(this._cb=NJ0,this._overflow)this._write(this._overflow,void 0,$);else $()};B5.prototype._write=function($,q,I){if(this._destroyed)return;var U=this._stream,Y=this._buffer,J=this._missing;if($.length)this._partial=!0;if($.length<J){ Line truncated
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">`)}_writeRelationship($){if(!this.count)this._writeOpen();let q=`rId${++this.count}`;if($.TargetMode)this.stream.write(`<Relationship Id="${q}" Type="${$.Type}" Target="${t71.xmlEncode($.Target)}" TargetMode="${$.TargetMode}"/>`);else this.stream.write(`<Relationship Id="${q}" Type="${$.Type}" Target="${$.Target}"/>`);return q}_writeClose(){this.stream.write("</Relationships>")}}lJ0.exports=mJ0});var eJ0=O((bB1,sJ0)=>{var rJ0=q6(),tJ0=S9(),s71=z4(),e71=FR(),$31=AR();class aJ0{constructor($,q,I){this.id=I.id,this.count=0,this._worksheet=$,this._workbook=I.workbook,this._sheetRelsWriter=q}get commentsStream(){if(!this._commentsStream)this._commentsStream=this._workbook._openStream(`/xl/comments${this.id}.xml`);return this._commentsStream}get vmlStream(){if(!this._vmlStream)this._vmlStream=this._workbook._openStream(`xl/drawings/vmlDrawing${this.id}.vml`);return this._vmlStream}_addRelationships(){let $={Type:tJ0.Comments,Target:`../comments${this.id}.xml`};this._sheetRelsWriter.addRelationship($);let q={Type:tJ0.VmlDrawing,Target:`../drawings/vmlDrawing${this.id}.vml`};this.vmlRelId=this._sheetRelsWriter.addRelationship(q)}_addCommentRefs(){this._workbook.commentRefs.push({commentName:`comments${this.id}`,vmlDrawing:`vmlDrawing${this.id}`})}_writeOpen(){this.commentsStream.write('<?xml version="1.0" encoding="UTF-8" standalone="yes"?><comments xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"><authors><author>Author</author></authors><commentList>'),this.vmlStream.write('<?xml version="1.0" encoding="UTF-8"?><xml xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:x="urn:schemas-microsoft-com:office:excel"><o:shapelayout v:ext="edit"><o:idmap v:ext="edit" data="1" /></o:shapelayout><v:shapetype id="_x0000_t202" coordsize="21600,21600" o:spt="202" path="m,l,21600r21600,l21600,xe"><v:stroke joinstyle="miter" /><v:path gradientshapeok="t" o:connecttype="rect" /></v:shapetype>')}_writeComment($,q){let I=new e71,U=new rJ0;I.render(U,$),this.commentsStream.write(U.xml);let Y=new $31,J=new rJ0;Y.render(J,$,q),this.vmlStream.write(J.xml)}_writeClose(){this.commentsStream.write("</commentList></comments>"),this.vmlStream.write("</xml>")}addComments($){if($&&$.length){if(!this.startedData)this._worksheet.comments=[],this._writeOpen(),this._addRelationships(),this._addCommentRefs(),this.startedData=!0;$.forEach((q)=>{q.refAddress=s71.decodeAddress(q.ref)}),$.forEach((q)=>{this._writeComment(q,this.count),this.count+=1})}}commit(){if(this.count)this._writeClose(),this.commentsStream.end(),this.vmlStream.end()}}sJ0.exports=aJ0});var JQ0=O((nB1,YQ0)=>{var q31=Z4(),I31=S9(),c_=z4(),$Q0=kE(),qQ0=Q5(),U31=eg(),IQ0=pw(),d_=dw(),Y31=oJ0(),J31=eJ0(),Q31=uE(),i4=new U31,m_=C9(),K31=oB(),z31=rB(),G31=tB(),H31=cB(),w31=iB(),V31=dB(),W31=aB(),Z31=sB(),X31=eB(),L31=$R(),D31=qR(),O31=IR(),N31=KR(),F31=YR(),M31=UR(),p4={dataValidations:new K31,sheetProperties:new z31,sheetFormatProperties:new G31,columns:new m_({tag:"cols",length:!1,childXform:new H31}),row:new w31,hyperlinks:new m_({tag:"hyperlinks",length:!1,childXform:new V31}),sheetViews:new m_({tag:"sheetViews",length:!1,childXform:new W31}),sheetProtection:new Z31,pageMargins:new X31,pageSeteup:new L31,autoFilter:new D31,picture:new O31,conditionalFormattings:new N31,headerFooter:new F31,rowBreaks:new M31};class UQ0{constructor($){this.id=$.id,this.name=$.name||`Sheet${this.id}`,this.state=$.state||"visible",this._rows=[],this._columns=null,this._keys={},this._merges=[],this._merges.add=function(){},this._sheetRelsWriter=new Y31($),this._sheetCommentsWriter=new J31(this,this._sheetRelsWriter,$),this._dimensions=new qQ0,this._rowZero=1,this.committed=!1,this.dataValidations=new Q31,this._formulae={},this._siFormulae=0,this.conditionalFormatting=[],this.rowBreaks=[],this.properties=Object.assign({},{defaultRowHeight:15,dyDescent:55,outlineLevelCol:0,outlineLevelRow:0},$.properties),this.headerFooter=Object.assign({},{differentFirst:!1,differentOddEven:!1,oddHeader:null,oddFooter:null,evenHeader:null,evenFooter:null,firstHeader:null,firstFooter:null},$.headerFooter),this.pageSetup=Object.assign({},{margins:{left:0.7,right:0.7,top:0.75,bottom:0.75,header:0.3,footer:0.3},orientation:"portrait",horizontalDpi:4294967295,verticalDpi:4294967295,fitToPage:!!($.pageSetup&&($.pageSetup.fitToWidth||$.pageSetup.fitToHeight)&&!$.pageSetup.scale),pageOrder:"downThenOver",blackAndWhite:!1,draft:!1,cellComments:"None",errors:"displayed",scale:100,fitToWidth:1,fitToHeight:1,paperSize:void 0,showRowColHeaders:!1,showGridLines:!1,horizontalCentered:!1,verticalCentered:!1,rowBreaks:null,colBreaks:null},$.pageSetup),this.useSharedStrings=$.useSharedStrings||!1,this._workbook=$.workbook,this.hasComments=!1,this._views=$.views||[],this.autoFilter=$.autoFilter||null,this._media=[],this.sheetProtection=null,this._writeOpenWorksheet(),this.startedData=!1}get Line truncated
See http://goo.gl/MqrFmX
`)},VS=WS.getNativePromise();if(WS.isNode&&typeof MutationObserver>"u")ZS=global.setImmediate,XS=process.nextTick,n3=WS.isRecentNode?function($){ZS.call(global,$)}:function($){XS.call(process,$)};else if(typeof VS==="function"&&typeof VS.resolve==="function")LS=VS.resolve(),n3=function($){LS.then($)};else if(typeof MutationObserver<"u"&&!(typeof window<"u"&&window.navigator&&(window.navigator.standalone||window.cordova)))n3=function(){var $=document.createElement("div"),q={attributes:!0},I=!1,U=document.createElement("div"),Y=new MutationObserver(function(){$.classList.toggle("foo"),I=!1});Y.observe(U,q);var J=function(){if(I)return;I=!0,U.classList.toggle("foo")};return function(K){var z=new MutationObserver(function(){z.disconnect(),K()});z.observe($,q),J()}}();else if(typeof setImmediate<"u")n3=function($){setImmediate($)};else if(typeof setTimeout<"u")n3=function($){setTimeout($,0)};else n3=RU1;var ZS,XS,LS;LK0.exports=n3});var NK0=O((qv1,OK0)=>{function vU1($,q,I,U,Y){for(var J=0;J<Y;++J)I[J+U]=$[J+q],$[J+q]=void 0}function U7($){this._capacity=$,this._length=0,this._front=0}U7.prototype._willBeOverCapacity=function($){return this._capacity<$};U7.prototype._pushOne=function($){var q=this.length();this._checkCapacity(q+1);var I=this._front+q&this._capacity-1;this[I]=$,this._length=q+1};U7.prototype.push=function($,q,I){var U=this.length()+3;if(this._willBeOverCapacity(U)){this._pushOne($),this._pushOne(q),this._pushOne(I);return}var Y=this._front+U-3;this._checkCapacity(U);var J=this._capacity-1;this[Y+0&J]=$,this[Y+1&J]=q,this[Y+2&J]=I,this._length=U};U7.prototype.shift=function(){var $=this._front,q=this[$];return this[$]=void 0,this._front=$+1&this._capacity-1,this._length--,q};U7.prototype.length=function(){return this._length};U7.prototype._checkCapacity=function($){if(this._capacity<$)this._resizeTo(this._capacity<<1)};U7.prototype._resizeTo=function($){var q=this._capacity;this._capacity=$;var I=this._front,U=this._length,Y=I+U&q-1;vU1(this,0,this,q,Y)};OK0.exports=U7});var gK0=O((Iv1,DS)=>{var TK0;try{throw Error()}catch($){TK0=$}var CU1=DK0(),FK0=NK0(),EK0=n1();function i4(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new FK0(16),this._normalQueue=new FK0(16),this._haveDrainedQueues=!1,this._trampolineEnabled=!0;var $=this;this.drainQueues=function(){$._drainQueues()},this._schedule=CU1}i4.prototype.setScheduler=function($){var q=this._schedule;return this._schedule=$,this._customScheduler=!0,q};i4.prototype.hasCustomScheduler=function(){return this._customScheduler};i4.prototype.enableTrampoline=function(){this._trampolineEnabled=!0};i4.prototype.disableTrampolineIfNecessary=function(){if(EK0.hasDevTools)this._trampolineEnabled=!1};i4.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues};i4.prototype.fatalError=function($,q){if(q)process.stderr.write("Fatal "+($ instanceof Error?$.stack:$)+`
`),process.exit(2);else this.throwLater($)};i4.prototype.throwLater=function($,q){if(arguments.length===1)q=$,$=function(){throw q};if(typeof setTimeout<"u")setTimeout(function(){$(q)},0);else try{this._schedule(function(){$(q)})}catch(I){throw Error(`No async scheduler available
`)},Hh=wh.getNativePromise();if(wh.isNode&&typeof MutationObserver>"u")Vh=global.setImmediate,Wh=process.nextTick,u3=wh.isRecentNode?function($){Vh.call(global,$)}:function($){Wh.call(process,$)};else if(typeof Hh==="function"&&typeof Hh.resolve==="function")Zh=Hh.resolve(),u3=function($){Zh.then($)};else if(typeof MutationObserver<"u"&&!(typeof window<"u"&&window.navigator&&(window.navigator.standalone||window.cordova)))u3=function(){var $=document.createElement("div"),q={attributes:!0},I=!1,U=document.createElement("div"),Y=new MutationObserver(function(){$.classList.toggle("foo"),I=!1});Y.observe(U,q);var J=function(){if(I)return;I=!0,U.classList.toggle("foo")};return function(K){var z=new MutationObserver(function(){z.disconnect(),K()});z.observe($,q),J()}}();else if(typeof setImmediate<"u")u3=function($){setImmediate($)};else if(typeof setTimeout<"u")u3=function($){setTimeout($,0)};else u3=Vq1;var Vh,Wh,Zh;kQ0.exports=u3});var nQ0=O((eB1,bQ0)=>{function Wq1($,q,I,U,Y){for(var J=0;J<Y;++J)I[J+U]=$[J+q],$[J+q]=void 0}function q7($){this._capacity=$,this._length=0,this._front=0}q7.prototype._willBeOverCapacity=function($){return this._capacity<$};q7.prototype._pushOne=function($){var q=this.length();this._checkCapacity(q+1);var I=this._front+q&this._capacity-1;this[I]=$,this._length=q+1};q7.prototype.push=function($,q,I){var U=this.length()+3;if(this._willBeOverCapacity(U)){this._pushOne($),this._pushOne(q),this._pushOne(I);return}var Y=this._front+U-3;this._checkCapacity(U);var J=this._capacity-1;this[Y+0&J]=$,this[Y+1&J]=q,this[Y+2&J]=I,this._length=U};q7.prototype.shift=function(){var $=this._front,q=this[$];return this[$]=void 0,this._front=$+1&this._capacity-1,this._length--,q};q7.prototype.length=function(){return this._length};q7.prototype._checkCapacity=function($){if(this._capacity<$)this._resizeTo(this._capacity<<1)};q7.prototype._resizeTo=function($){var q=this._capacity;this._capacity=$;var I=this._front,U=this._length,Y=I+U&q-1;Wq1(this,0,this,q,Y)};bQ0.exports=q7});var oQ0=O(($R1,Xh)=>{var mQ0;try{throw Error()}catch($){mQ0=$}var Zq1=fQ0(),iQ0=nQ0(),lQ0=b1();function c4(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new iQ0(16),this._normalQueue=new iQ0(16),this._haveDrainedQueues=!1,this._trampolineEnabled=!0;var $=this;this.drainQueues=function(){$._drainQueues()},this._schedule=Zq1}c4.prototype.setScheduler=function($){var q=this._schedule;return this._schedule=$,this._customScheduler=!0,q};c4.prototype.hasCustomScheduler=function(){return this._customScheduler};c4.prototype.enableTrampoline=function(){this._trampolineEnabled=!0};c4.prototype.disableTrampolineIfNecessary=function(){if(lQ0.hasDevTools)this._trampolineEnabled=!1};c4.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues};c4.prototype.fatalError=function($,q){if(q)process.stderr.write("Fatal "+($ instanceof Error?$.stack:$)+`
`),process.exit(2);else this.throwLater($)};c4.prototype.throwLater=function($,q){if(arguments.length===1)q=$,$=function(){throw q};if(typeof setTimeout<"u")setTimeout(function(){$(q)},0);else try{this._schedule(function(){$(q)})}catch(I){throw Error(`No async scheduler available
See http://goo.gl/MqrFmX
`)}};function MK0($,q,I){this._lateQueue.push($,q,I),this._queueTick()}function AK0($,q,I){this._normalQueue.push($,q,I),this._queueTick()}function PK0($){this._normalQueue._pushOne($),this._queueTick()}if(!EK0.hasDevTools)i4.prototype.invokeLater=MK0,i4.prototype.invoke=AK0,i4.prototype.settlePromises=PK0;else i4.prototype.invokeLater=function($,q,I){if(this._trampolineEnabled)MK0.call(this,$,q,I);else this._schedule(function(){setTimeout(function(){$.call(q,I)},100)})},i4.prototype.invoke=function($,q,I){if(this._trampolineEnabled)AK0.call(this,$,q,I);else this._schedule(function(){$.call(q,I)})},i4.prototype.settlePromises=function($){if(this._trampolineEnabled)PK0.call(this,$);else this._schedule(function(){$._settlePromises()})};i4.prototype._drainQueue=function($){while($.length()>0){var q=$.shift();if(typeof q!=="function"){q._settlePromises();continue}var I=$.shift(),U=$.shift();q.call(I,U)}};i4.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)};i4.prototype._queueTick=function(){if(!this._isTickUsed)this._isTickUsed=!0,this._schedule(this.drainQueues)};i4.prototype._reset=function(){this._isTickUsed=!1};DS.exports=i4;DS.exports.firstLineError=TK0});var h5=O((Uv1,RK0)=>{var FS=f3(),_U1=FS.freeze,jK0=n1(),BK0=jK0.inherits,$Y=jK0.notEnumerableProp;function qY($,q){function I(U){if(!(this instanceof I))return new I(U);if($Y(this,"message",typeof U==="string"?U:q),$Y(this,"name",$),Error.captureStackTrace)Error.captureStackTrace(this,this.constructor);else Error.call(this)}return BK0(I,Error),I}var OS,NS,hU1=qY("Warning","warning"),SU1=qY("CancellationError","cancellation error"),yU1=qY("TimeoutError","timeout error"),FK=qY("AggregateError","aggregate error");try{OS=TypeError,NS=RangeError}catch($){OS=qY("TypeError","type error"),NS=qY("RangeError","range error")}var YL="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" ");for(b3=0;b3<YL.length;++b3)if(typeof Array.prototype[YL[b3]]==="function")FK.prototype[YL[b3]]=Array.prototype[YL[b3]];var b3;FS.defineProperty(FK.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0});FK.prototype.isOperational=!0;var JL=0;FK.prototype.toString=function(){var $=Array(JL*4+1).join(" "),q=`
`)}};function pQ0($,q,I){this._lateQueue.push($,q,I),this._queueTick()}function cQ0($,q,I){this._normalQueue.push($,q,I),this._queueTick()}function dQ0($){this._normalQueue._pushOne($),this._queueTick()}if(!lQ0.hasDevTools)c4.prototype.invokeLater=pQ0,c4.prototype.invoke=cQ0,c4.prototype.settlePromises=dQ0;else c4.prototype.invokeLater=function($,q,I){if(this._trampolineEnabled)pQ0.call(this,$,q,I);else this._schedule(function(){setTimeout(function(){$.call(q,I)},100)})},c4.prototype.invoke=function($,q,I){if(this._trampolineEnabled)cQ0.call(this,$,q,I);else this._schedule(function(){$.call(q,I)})},c4.prototype.settlePromises=function($){if(this._trampolineEnabled)dQ0.call(this,$);else this._schedule(function(){$._settlePromises()})};c4.prototype._drainQueue=function($){while($.length()>0){var q=$.shift();if(typeof q!=="function"){q._settlePromises();continue}var I=$.shift(),U=$.shift();q.call(I,U)}};c4.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)};c4.prototype._queueTick=function(){if(!this._isTickUsed)this._isTickUsed=!0,this._schedule(this.drainQueues)};c4.prototype._reset=function(){this._isTickUsed=!1};Xh.exports=c4;Xh.exports.firstLineError=mQ0});var v5=O((qR1,aQ0)=>{var Oh=y3(),Xq1=Oh.freeze,rQ0=b1(),tQ0=rQ0.inherits,mU=rQ0.notEnumerableProp;function lU($,q){function I(U){if(!(this instanceof I))return new I(U);if(mU(this,"message",typeof U==="string"?U:q),mU(this,"name",$),Error.captureStackTrace)Error.captureStackTrace(this,this.constructor);else Error.call(this)}return tQ0(I,Error),I}var Lh,Dh,Lq1=lU("Warning","warning"),Dq1=lU("CancellationError","cancellation error"),Oq1=lU("TimeoutError","timeout error"),ZK=lU("AggregateError","aggregate error");try{Lh=TypeError,Dh=RangeError}catch($){Lh=lU("TypeError","type error"),Dh=lU("RangeError","range error")}var SX="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" ");for(x3=0;x3<SX.length;++x3)if(typeof Array.prototype[SX[x3]]==="function")ZK.prototype[SX[x3]]=Array.prototype[SX[x3]];var x3;Oh.defineProperty(ZK.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0});ZK.prototype.isOperational=!0;var yX=0;ZK.prototype.toString=function(){var $=Array(yX*4+1).join(" "),q=`
`+$+`AggregateError of:
`;JL++,$=Array(JL*4+1).join(" ");for(var I=0;I<this.length;++I){var U=this[I]===this?"[Circular AggregateError]":this[I]+"",Y=U.split(`
`;yX++,$=Array(yX*4+1).join(" ");for(var I=0;I<this.length;++I){var U=this[I]===this?"[Circular AggregateError]":this[I]+"",Y=U.split(`
`);for(var J=0;J<Y.length;++J)Y[J]=$+Y[J];U=Y.join(`
`),q+=U+`
`}return JL--,q};function NK($){if(!(this instanceof NK))return new NK($);if($Y(this,"name","OperationalError"),$Y(this,"message",$),this.cause=$,this.isOperational=!0,$ instanceof Error)$Y(this,"message",$.message),$Y(this,"stack",$.stack);else if(Error.captureStackTrace)Error.captureStackTrace(this,this.constructor)}BK0(NK,Error);var i3=Error.__BluebirdErrorTypes__;if(!i3)i3=_U1({CancellationError:SU1,TimeoutError:yU1,OperationalError:NK,RejectionError:NK,AggregateError:FK}),FS.defineProperty(Error,"__BluebirdErrorTypes__",{value:i3,writable:!1,enumerable:!1,configurable:!1});RK0.exports={Error,TypeError:OS,RangeError:NS,CancellationError:i3.CancellationError,OperationalError:i3.OperationalError,TimeoutError:i3.TimeoutError,AggregateError:i3.AggregateError,Warning:hU1}});var CK0=O((Yv1,vK0)=>{vK0.exports=function($,q){var I=n1(),U=I.errorObj,Y=I.isObject;function J(H,V){if(Y(H)){if(H instanceof $)return H;var W=K(H);if(W===U){if(V)V._pushContext();var X=$.reject(W.e);if(V)V._popContext();return X}else if(typeof W==="function"){if(w(H)){var X=new $(q);return H._then(X._fulfill,X._reject,void 0,X,null),X}return G(H,W,V)}}return H}function Q(H){return H.then}function K(H){try{return Q(H)}catch(V){return U.e=V,U}}var z={}.hasOwnProperty;function w(H){try{return z.call(H,"_promise0")}catch(V){return!1}}function G(H,V,W){var X=new $(q),L=X;if(W)W._pushContext();if(X._captureStackTrace(),W)W._popContext();var D=!0,N=I.tryCatch(V).call(H,E,T);if(D=!1,X&&N===U)X._rejectCallback(N.e,!0,!0),X=null;function E(P){if(!X)return;X._resolveCallback(P),X=null}function T(P){if(!X)return;X._rejectCallback(P,D,!0),X=null}return L}return J}});var hK0=O((Jv1,_K0)=>{_K0.exports=function($,q,I,U,Y){var J=n1(),Q=J.isArray;function K(w){switch(w){case-2:return[];case-3:return{}}}function z(w){var G=this._promise=new $(q);if(w instanceof $)G._propagateFrom(w,3);G._setOnCancel(this),this._values=w,this._length=0,this._totalResolved=0,this._init(void 0,-2)}return J.inherits(z,Y),z.prototype.length=function(){return this._length},z.prototype.promise=function(){return this._promise},z.prototype._init=function w(G,H){var V=I(this._values,this._promise);if(V instanceof $){V=V._target();var W=V._bitField;if(this._values=V,(W&50397184)===0)return this._promise._setAsyncGuaranteed(),V._then(w,this._reject,void 0,this,H);else if((W&33554432)!==0)V=V._value();else if((W&16777216)!==0)return this._reject(V._reason());else return this._cancel()}if(V=J.asArray(V),V===null){var X=U("expecting an array or an iterable object but got "+J.classString(V)).reason();this._promise._rejectCallback(X,!1);return}if(V.length===0){if(H===-5)this._resolveEmptyArray();else this._resolve(K(H));return}this._iterate(V)},z.prototype._iterate=function(w){var G=this.getActualLength(w.length);this._length=G,this._values=this.shouldCopyValues()?Array(G):this._values;var H=this._promise,V=!1,W=null;for(var X=0;X<G;++X){var L=I(w[X],H);if(L instanceof $)L=L._target(),W=L._bitField;else W=null;if(V){if(W!==null)L.suppressUnhandledRejections()}else if(W!==null)if((W&50397184)===0)L._proxy(this,X),this._values[X]=L;else if((W&33554432)!==0)V=this._promiseFulfilled(L._value(),X);else if((W&16777216)!==0)V=this._promiseRejected(L._reason(),X);else V=this._promiseCancelled(X);else V=this._promiseFulfilled(L,X)}if(!V)H._setAsyncGuaranteed()},z.prototype._isResolved=function(){return this._values===null},z.prototype._resolve=function(w){this._values=null,this._promise._fulfill(w)},z.prototype._cancel=function(){if(this._isResolved()||!this._promise._isCancellable())return;this._values=null,this._promise._cancel()},z.prototype._reject=function(w){this._values=null,this._promise._rejectCallback(w,!1)},z.prototype._promiseFulfilled=function(w,G){this._values[G]=w;var H=++this._totalResolved;if(H>=this._length)return this._resolve(this._values),!0;return!1},z.prototype._promiseCancelled=function(){return this._cancel(),!0},z.prototype._promiseRejected=function(w){return this._totalResolved++,this._reject(w),!0},z.prototype._resultCancelled=function(){if(this._isResolved())return;var w=this._values;if(this._cancel(),w instanceof $)w.cancel();else for(var G=0;G<w.length;++G)if(w[G]instanceof $)w[G].cancel()},z.prototype.shouldCopyValues=function(){return!0},z.prototype.getActualLength=function(w){return w},z}});var yK0=O((Qv1,SK0)=>{SK0.exports=function($){var q=!1,I=[];$.prototype._promiseCreated=function(){},$.prototype._pushContext=function(){},$.prototype._popContext=function(){return null},$._peekContext=$.prototype._peekContext=function(){};function U(){this._trace=new U.CapturedTrace(J())}U.prototype._pushContext=function(){if(this._trace!==void 0)this._trace._promiseCreated=null,I.push(this._trace)},U.prototype._popContext=function(){if(this._trace!==void 0){var Q=I.pop(),K=Q._promiseCreated;return Q._promiseCreated=null,K}return null};function Y(){if(q)return new U}function J(){var Q=I.length-1;if(Q>=0)return I[Q];return}return U.CapturedTrace=null,U.create=Y,U.deactivateLong Line truncated
`}return yX--,q};function WK($){if(!(this instanceof WK))return new WK($);if(mU(this,"name","OperationalError"),mU(this,"message",$),this.cause=$,this.isOperational=!0,$ instanceof Error)mU(this,"message",$.message),mU(this,"stack",$.stack);else if(Error.captureStackTrace)Error.captureStackTrace(this,this.constructor)}tQ0(WK,Error);var k3=Error.__BluebirdErrorTypes__;if(!k3)k3=Xq1({CancellationError:Dq1,TimeoutError:Oq1,OperationalError:WK,RejectionError:WK,AggregateError:ZK}),Oh.defineProperty(Error,"__BluebirdErrorTypes__",{value:k3,writable:!1,enumerable:!1,configurable:!1});aQ0.exports={Error,TypeError:Lh,RangeError:Dh,CancellationError:k3.CancellationError,OperationalError:k3.OperationalError,TimeoutError:k3.TimeoutError,AggregateError:k3.AggregateError,Warning:Lq1}});var eQ0=O((IR1,sQ0)=>{sQ0.exports=function($,q){var I=b1(),U=I.errorObj,Y=I.isObject;function J(w,V){if(Y(w)){if(w instanceof $)return w;var W=K(w);if(W===U){if(V)V._pushContext();var X=$.reject(W.e);if(V)V._popContext();return X}else if(typeof W==="function"){if(G(w)){var X=new $(q);return w._then(X._fulfill,X._reject,void 0,X,null),X}return H(w,W,V)}}return w}function Q(w){return w.then}function K(w){try{return Q(w)}catch(V){return U.e=V,U}}var z={}.hasOwnProperty;function G(w){try{return z.call(w,"_promise0")}catch(V){return!1}}function H(w,V,W){var X=new $(q),L=X;if(W)W._pushContext();if(X._captureStackTrace(),W)W._popContext();var D=!0,N=I.tryCatch(V).call(w,E,T);if(D=!1,X&&N===U)X._rejectCallback(N.e,!0,!0),X=null;function E(P){if(!X)return;X._resolveCallback(P),X=null}function T(P){if(!X)return;X._rejectCallback(P,D,!0),X=null}return L}return J}});var q20=O((UR1,$20)=>{$20.exports=function($,q,I,U,Y){var J=b1(),Q=J.isArray;function K(G){switch(G){case-2:return[];case-3:return{}}}function z(G){var H=this._promise=new $(q);if(G instanceof $)H._propagateFrom(G,3);H._setOnCancel(this),this._values=G,this._length=0,this._totalResolved=0,this._init(void 0,-2)}return J.inherits(z,Y),z.prototype.length=function(){return this._length},z.prototype.promise=function(){return this._promise},z.prototype._init=function G(H,w){var V=I(this._values,this._promise);if(V instanceof $){V=V._target();var W=V._bitField;if(this._values=V,(W&50397184)===0)return this._promise._setAsyncGuaranteed(),V._then(G,this._reject,void 0,this,w);else if((W&33554432)!==0)V=V._value();else if((W&16777216)!==0)return this._reject(V._reason());else return this._cancel()}if(V=J.asArray(V),V===null){var X=U("expecting an array or an iterable object but got "+J.classString(V)).reason();this._promise._rejectCallback(X,!1);return}if(V.length===0){if(w===-5)this._resolveEmptyArray();else this._resolve(K(w));return}this._iterate(V)},z.prototype._iterate=function(G){var H=this.getActualLength(G.length);this._length=H,this._values=this.shouldCopyValues()?Array(H):this._values;var w=this._promise,V=!1,W=null;for(var X=0;X<H;++X){var L=I(G[X],w);if(L instanceof $)L=L._target(),W=L._bitField;else W=null;if(V){if(W!==null)L.suppressUnhandledRejections()}else if(W!==null)if((W&50397184)===0)L._proxy(this,X),this._values[X]=L;else if((W&33554432)!==0)V=this._promiseFulfilled(L._value(),X);else if((W&16777216)!==0)V=this._promiseRejected(L._reason(),X);else V=this._promiseCancelled(X);else V=this._promiseFulfilled(L,X)}if(!V)w._setAsyncGuaranteed()},z.prototype._isResolved=function(){return this._values===null},z.prototype._resolve=function(G){this._values=null,this._promise._fulfill(G)},z.prototype._cancel=function(){if(this._isResolved()||!this._promise._isCancellable())return;this._values=null,this._promise._cancel()},z.prototype._reject=function(G){this._values=null,this._promise._rejectCallback(G,!1)},z.prototype._promiseFulfilled=function(G,H){this._values[H]=G;var w=++this._totalResolved;if(w>=this._length)return this._resolve(this._values),!0;return!1},z.prototype._promiseCancelled=function(){return this._cancel(),!0},z.prototype._promiseRejected=function(G){return this._totalResolved++,this._reject(G),!0},z.prototype._resultCancelled=function(){if(this._isResolved())return;var G=this._values;if(this._cancel(),G instanceof $)G.cancel();else for(var H=0;H<G.length;++H)if(G[H]instanceof $)G[H].cancel()},z.prototype.shouldCopyValues=function(){return!0},z.prototype.getActualLength=function(G){return G},z}});var U20=O((YR1,I20)=>{I20.exports=function($){var q=!1,I=[];$.prototype._promiseCreated=function(){},$.prototype._pushContext=function(){},$.prototype._popContext=function(){return null},$._peekContext=$.prototype._peekContext=function(){};function U(){this._trace=new U.CapturedTrace(J())}U.prototype._pushContext=function(){if(this._trace!==void 0)this._trace._promiseCreated=null,I.push(this._trace)},U.prototype._popContext=function(){if(this._trace!==void 0){var Q=I.pop(),K=Q._promiseCreated;return Q._promiseCreated=null,K}return null};function Y(){if(q)return new U}function J(){var Q=I.length-1;if(Q>=0)return I[Q];return}return U.CapturedTrace=null,U.create=Y,U.deactivateLong Line truncated
See http://goo.gl/MqrFmX
`);if(!P0.longStackTraces&&y$()){var r=$.prototype._captureStackTrace,F=$.prototype._attachExtraTrace;P0.longStackTraces=!0,P=function(){if(U.haveItemsQueued()&&!P0.longStackTraces)throw Error(`cannot enable long stack traces after promises have been created
`);if(!T0.longStackTraces&&u$()){var a=$.prototype._captureStackTrace,F=$.prototype._attachExtraTrace;T0.longStackTraces=!0,P=function(){if(U.haveItemsQueued()&&!T0.longStackTraces)throw Error(`cannot enable long stack traces after promises have been created
See http://goo.gl/MqrFmX
`);$.prototype._captureStackTrace=r,$.prototype._attachExtraTrace=F,q.deactivateLongStackTraces(),U.enableTrampoline(),P0.longStackTraces=!1},$.prototype._captureStackTrace=K0,$.prototype._attachExtraTrace=G0,q.activateLongStackTraces(),U.disableTrampolineIfNecessary()}},$.hasLongStackTraces=function(){return P0.longStackTraces&&y$()};var B=function(){try{if(typeof CustomEvent==="function"){var r=new CustomEvent("CustomEvent");return J.global.dispatchEvent(r),function(F,M){var R=new CustomEvent(F.toLowerCase(),{detail:M,cancelable:!0});return!J.global.dispatchEvent(R)}}else if(typeof Event==="function"){var r=new Event("CustomEvent");return J.global.dispatchEvent(r),function(M,R){var y=new Event(M.toLowerCase(),{cancelable:!0});return y.detail=R,!J.global.dispatchEvent(y)}}else{var r=document.createEvent("CustomEvent");return r.initCustomEvent("testingtheevent",!1,!0,{}),J.global.dispatchEvent(r),function(M,R){var y=document.createEvent("CustomEvent");return y.initCustomEvent(M.toLowerCase(),!1,!0,R),!J.global.dispatchEvent(y)}}}catch(F){}return function(){return!1}}(),k=function(){if(J.isNode)return function(){return process.emit.apply(process,arguments)};else{if(!J.global)return function(){return!1};return function(r){var F="on"+r.toLowerCase(),M=J.global[F];if(!M)return!1;return M.apply(J.global,[].slice.call(arguments,1)),!0}}}();function h(r,F){return{promise:F}}var f={promiseCreated:h,promiseFulfilled:h,promiseRejected:h,promiseResolved:h,promiseCancelled:h,promiseChained:function(r,F,M){return{promise:F,child:M}},warning:function(r,F){return{warning:F}},unhandledRejection:function(r,F,M){return{reason:F,promise:M}},rejectionHandled:h},S=function(r){var F=!1;try{F=k.apply(null,arguments)}catch(R){U.throwLater(R),F=!0}var M=!1;try{M=B(r,f[r].apply(null,arguments))}catch(R){U.throwLater(R),M=!0}return M||F};$.config=function(r){if(r=Object(r),"longStackTraces"in r){if(r.longStackTraces)$.longStackTraces();else if(!r.longStackTraces&&$.hasLongStackTraces())P()}if("warnings"in r){var F=r.warnings;if(P0.warnings=!!F,T=P0.warnings,J.isObject(F)){if("wForgottenReturn"in F)T=!!F.wForgottenReturn}}if("cancellation"in r&&r.cancellation&&!P0.cancellation){if(U.haveItemsQueued())throw Error("cannot enable cancellation after promises are in use");$.prototype._clearCancellationData=J0,$.prototype._propagateFrom=g,$.prototype._onCancel=n,$.prototype._setOnCancel=b,$.prototype._attachCancellationCallback=C,$.prototype._execute=p,d=g,P0.cancellation=!0}if("monitoring"in r){if(r.monitoring&&!P0.monitoring)P0.monitoring=!0,$.prototype._fireEvent=S;else if(!r.monitoring&&P0.monitoring)P0.monitoring=!1,$.prototype._fireEvent=t}return $};function t(){return!1}$.prototype._fireEvent=t,$.prototype._execute=function(r,F,M){try{r(F,M)}catch(R){return R}},$.prototype._onCancel=function(){},$.prototype._setOnCancel=function(r){},$.prototype._attachCancellationCallback=function(r){},$.prototype._captureStackTrace=function(){},$.prototype._attachExtraTrace=function(){},$.prototype._clearCancellationData=function(){},$.prototype._propagateFrom=function(r,F){};function p(r,F,M){var R=this;try{r(F,M,function(y){if(typeof y!=="function")throw TypeError("onCancel must be a function, got: "+J.toString(y));R._attachCancellationCallback(y)})}catch(y){return y}}function C(r){if(!this._isCancellable())return this;var F=this._onCancel();if(F!==void 0)if(J.isArray(F))F.push(r);else this._setOnCancel([F,r]);else this._setOnCancel(r)}function n(){return this._onCancelField}function b(r){this._onCancelField=r}function J0(){this._cancellationParent=void 0,this._onCancelField=void 0}function g(r,F){if((F&1)!==0){this._cancellationParent=r;var M=r._branchesRemainingToCancel;if(M===void 0)M=0;r._branchesRemainingToCancel=M+1}if((F&2)!==0&&r._isBound())this._setBoundTo(r._boundTo)}function u(r,F){if((F&2)!==0&&r._isBound())this._setBoundTo(r._boundTo)}var d=u;function a(){var r=this._boundTo;if(r!==void 0){if(r instanceof $)if(r.isFulfilled())return r.value();else return}return r}function K0(){this._trace=new e6(this._peekContext())}function G0(r,F){if(Q(r)){var M=this._trace;if(M!==void 0){if(F)M=M._parent}if(M!==void 0)M.attachExtraTrace(r);else if(!r.__stackCleaned__){var R=J4(r);J.notEnumerableProp(r,"stack",R.message+`
`+R.stack.join(`
`)),J.notEnumerableProp(r,"__stackCleaned__",!0)}}}function M0(r,F,M,R,y){if(r===void 0&&F!==null&&T){if(y!==void 0&&y._returnedNonUndefined())return;if((R._bitField&65535)===0)return;if(M)M=M+" ";var s="",c="";if(F._trace){var e=F._trace.stack.split(`
`),U0=J1(e);for(var w0=U0.length-1;w0>=0;--w0){var E0=U0[w0];if(!G.test(E0)){var x0=E0.match(H);if(x0)s="at "+x0[1]+":"+x0[2]+":"+x0[3]+" ";break}}if(U0.length>0){var y0=U0[0];for(var w0=0;w0<e.length;++w0)if(e[w0]===y0){if(w0>0)c=`
`+e[w0-1];break}}}var q1="a promise was created in a "+M+"handler "+s+"but was not returned from it, see http://goo.gl/rRqMUw"+c;R._warn(q1,!0,F)}}function v0(r,F){var M=r+" is deprecated and will be removed in a future version.";if(F)M+=" Use "+F+" instead.";return R1(M)}function R1(r,F,M){if(!P0.warnings)return;var R=new Y(r),y;if(F)M._attachExtraTrace(R);else if(P0.longStackTraces&&(y=$._peekContext()))y.attachExtraTrace(R);else{var s=J4(R);R.stack=s.message+`
`);$.prototype._captureStackTrace=a,$.prototype._attachExtraTrace=F,q.deactivateLongStackTraces(),U.enableTrampoline(),T0.longStackTraces=!1},$.prototype._captureStackTrace=Q0,$.prototype._attachExtraTrace=H0,q.activateLongStackTraces(),U.disableTrampolineIfNecessary()}},$.hasLongStackTraces=function(){return T0.longStackTraces&&u$()};var B=function(){try{if(typeof CustomEvent==="function"){var a=new CustomEvent("CustomEvent");return J.global.dispatchEvent(a),function(F,M){var v=new CustomEvent(F.toLowerCase(),{detail:M,cancelable:!0});return!J.global.dispatchEvent(v)}}else if(typeof Event==="function"){var a=new Event("CustomEvent");return J.global.dispatchEvent(a),function(M,v){var u=new Event(M.toLowerCase(),{cancelable:!0});return u.detail=v,!J.global.dispatchEvent(u)}}else{var a=document.createEvent("CustomEvent");return a.initCustomEvent("testingtheevent",!1,!0,{}),J.global.dispatchEvent(a),function(M,v){var u=document.createEvent("CustomEvent");return u.initCustomEvent(M.toLowerCase(),!1,!0,v),!J.global.dispatchEvent(u)}}}catch(F){}return function(){return!1}}(),f=function(){if(J.isNode)return function(){return process.emit.apply(process,arguments)};else{if(!J.global)return function(){return!1};return function(a){var F="on"+a.toLowerCase(),M=J.global[F];if(!M)return!1;return M.apply(J.global,[].slice.call(arguments,1)),!0}}}();function S(a,F){return{promise:F}}var n={promiseCreated:S,promiseFulfilled:S,promiseRejected:S,promiseResolved:S,promiseCancelled:S,promiseChained:function(a,F,M){return{promise:F,child:M}},warning:function(a,F){return{warning:F}},unhandledRejection:function(a,F,M){return{reason:F,promise:M}},rejectionHandled:S},R=function(a){var F=!1;try{F=f.apply(null,arguments)}catch(v){U.throwLater(v),F=!0}var M=!1;try{M=B(a,n[a].apply(null,arguments))}catch(v){U.throwLater(v),M=!0}return M||F};$.config=function(a){if(a=Object(a),"longStackTraces"in a){if(a.longStackTraces)$.longStackTraces();else if(!a.longStackTraces&&$.hasLongStackTraces())P()}if("warnings"in a){var F=a.warnings;if(T0.warnings=!!F,T=T0.warnings,J.isObject(F)){if("wForgottenReturn"in F)T=!!F.wForgottenReturn}}if("cancellation"in a&&a.cancellation&&!T0.cancellation){if(U.haveItemsQueued())throw Error("cannot enable cancellation after promises are in use");$.prototype._clearCancellationData=U0,$.prototype._propagateFrom=j,$.prototype._onCancel=k,$.prototype._setOnCancel=b,$.prototype._attachCancellationCallback=C,$.prototype._execute=i,d=j,T0.cancellation=!0}if("monitoring"in a){if(a.monitoring&&!T0.monitoring)T0.monitoring=!0,$.prototype._fireEvent=R;else if(!a.monitoring&&T0.monitoring)T0.monitoring=!1,$.prototype._fireEvent=p}return $};function p(){return!1}$.prototype._fireEvent=p,$.prototype._execute=function(a,F,M){try{a(F,M)}catch(v){return v}},$.prototype._onCancel=function(){},$.prototype._setOnCancel=function(a){},$.prototype._attachCancellationCallback=function(a){},$.prototype._captureStackTrace=function(){},$.prototype._attachExtraTrace=function(){},$.prototype._clearCancellationData=function(){},$.prototype._propagateFrom=function(a,F){};function i(a,F,M){var v=this;try{a(F,M,function(u){if(typeof u!=="function")throw TypeError("onCancel must be a function, got: "+J.toString(u));v._attachCancellationCallback(u)})}catch(u){return u}}function C(a){if(!this._isCancellable())return this;var F=this._onCancel();if(F!==void 0)if(J.isArray(F))F.push(a);else this._setOnCancel([F,a]);else this._setOnCancel(a)}function k(){return this._onCancelField}function b(a){this._onCancelField=a}function U0(){this._cancellationParent=void 0,this._onCancelField=void 0}function j(a,F){if((F&1)!==0){this._cancellationParent=a;var M=a._branchesRemainingToCancel;if(M===void 0)M=0;a._branchesRemainingToCancel=M+1}if((F&2)!==0&&a._isBound())this._setBoundTo(a._boundTo)}function x(a,F){if((F&2)!==0&&a._isBound())this._setBoundTo(a._boundTo)}var d=x;function t(){var a=this._boundTo;if(a!==void 0){if(a instanceof $)if(a.isFulfilled())return a.value();else return}return a}function Q0(){this._trace=new e6(this._peekContext())}function H0(a,F){if(Q(a)){var M=this._trace;if(M!==void 0){if(F)M=M._parent}if(M!==void 0)M.attachExtraTrace(a);else if(!a.__stackCleaned__){var v=J4(a);J.notEnumerableProp(a,"stack",v.message+`
`+v.stack.join(`
`)),J.notEnumerableProp(a,"__stackCleaned__",!0)}}}function M0(a,F,M,v,u){if(a===void 0&&F!==null&&T){if(u!==void 0&&u._returnedNonUndefined())return;if((v._bitField&65535)===0)return;if(M)M=M+" ";var s="",m="";if(F._trace){var e=F._trace.stack.split(`
`),Y0=h0(e);for(var G0=Y0.length-1;G0>=0;--G0){var B0=Y0[G0];if(!H.test(B0)){var b0=B0.match(w);if(b0)s="at "+b0[1]+":"+b0[2]+":"+b0[3]+" ";break}}if(Y0.length>0){var x0=Y0[0];for(var G0=0;G0<e.length;++G0)if(e[G0]===x0){if(G0>0)m=`
`+e[G0-1];break}}}var Y1="a promise was created in a "+M+"handler "+s+"but was not returned from it, see http://goo.gl/rRqMUw"+m;v._warn(Y1,!0,F)}}function j0(a,F){var M=a+" is deprecated and will be removed in a future version.";if(F)M+=" Use "+F+" instead.";return X1(M)}function X1(a,F,M){if(!T0.warnings)return;var v=new Y(a),u;if(F)M._attachExtraTrace(v);else if(T0.longStackTraces&&(u=$._peekContext()))u.attachExtraTrace(v);else{var s=J4(v);v.stack=s.message+`
`+s.stack.join(`
`)}if(!S("warning",R))v4(R,"",!0)}function l0(r,F){for(var M=0;M<F.length-1;++M)F[M].push("From previous event:"),F[M]=F[M].join(`
`)}if(!R("warning",v))C4(v,"",!0)}function f0(a,F){for(var M=0;M<F.length-1;++M)F[M].push("From previous event:"),F[M]=F[M].join(`
`);if(M<F.length)F[M]=F[M].join(`
`);return r+`
`);return a+`
`+F.join(`
`)}function O1(r){for(var F=0;F<r.length;++F)if(r[F].length===0||F+1<r.length&&r[F][0]===r[F+1][0])r.splice(F,1),F--}function N1(r){var F=r[0];for(var M=1;M<r.length;++M){var R=r[M],y=F.length-1,s=F[y],c=-1;for(var e=R.length-1;e>=0;--e)if(R[e]===s){c=e;break}for(var e=c;e>=0;--e){var U0=R[e];if(F[y]===U0)F.pop(),y--;else break}F=R}}function J1(r){var F=[];for(var M=0;M<r.length;++M){var R=r[M],y=R===" (No stack trace)"||V.test(R),s=y&&V$(R);if(y&&!s){if(X&&R.charAt(0)!==" ")R=" "+R;F.push(R)}}return F}function C1(r){var F=r.stack.replace(/\s+$/g,"").split(`
`);for(var M=0;M<F.length;++M){var R=F[M];if(R===" (No stack trace)"||V.test(R))break}if(M>0&&r.name!="SyntaxError")F=F.slice(M);return F}function J4(r){var F=r.stack,M=r.toString();return F=typeof F==="string"&&F.length>0?C1(r):[" (No stack trace)"],{message:M,stack:r.name=="SyntaxError"?F:J1(F)}}function v4(r,F,M){if(typeof console<"u"){var R;if(J.isObject(r)){var y=r.stack;R=F+W(y,r)}else R=F+String(r);if(typeof L==="function")L(R,M);else if(typeof console.log==="function"||typeof console.log==="object")console.log(R)}}function H$(r,F,M,R){var y=!1;try{if(typeof F==="function")if(y=!0,r==="rejectionHandled")F(R);else F(M,R)}catch(s){U.throwLater(s)}if(r==="unhandledRejection"){if(!S(r,M,R)&&!y)v4(M,"Unhandled rejection ")}else S(r,R)}function S$(r){var F;if(typeof r==="function")F="[function "+(r.name||"anonymous")+"]";else{F=r&&typeof r.toString==="function"?r.toString():J.toString(r);var M=/\[object [a-zA-Z0-9$_]+\]/;if(M.test(F))try{var R=JSON.stringify(r);F=R}catch(y){}if(F.length===0)F="(empty array)"}return"(<"+c8(F)+">, no stack trace)"}function c8(r){var F=41;if(r.length<F)return r;return r.substr(0,F-3)+"..."}function y$(){return typeof c5==="function"}var V$=function(){return!1},d8=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;function s6(r){var F=r.match(d8);if(F)return{fileName:F[1],line:parseInt(F[2],10)}}function L7(r,F){if(!y$())return;var M=r.stack.split(`
`),R=F.stack.split(`
`),y=-1,s=-1,c,e;for(var U0=0;U0<M.length;++U0){var w0=s6(M[U0]);if(w0){c=w0.fileName,y=w0.line;break}}for(var U0=0;U0<R.length;++U0){var w0=s6(R[U0]);if(w0){e=w0.fileName,s=w0.line;break}}if(y<0||s<0||!c||!e||c!==e||y>=s)return;V$=function(E0){if(w.test(E0))return!0;var x0=s6(E0);if(x0){if(x0.fileName===c&&(y<=x0.line&&x0.line<=s))return!0}return!1}}function e6(r){this._parent=r,this._promisesCreated=0;var F=this._length=1+(r===void 0?0:r._length);if(c5(this,e6),F>32)this.uncycle()}J.inherits(e6,Error),q.CapturedTrace=e6,e6.prototype.uncycle=function(){var r=this._length;if(r<2)return;var F=[],M={};for(var R=0,y=this;y!==void 0;++R)F.push(y),y=y._parent;r=this._length=R;for(var R=r-1;R>=0;--R){var s=F[R].stack;if(M[s]===void 0)M[s]=R}for(var R=0;R<r;++R){var c=F[R].stack,e=M[c];if(e!==void 0&&e!==R){if(e>0)F[e-1]._parent=void 0,F[e-1]._length=1;F[R]._parent=void 0,F[R]._length=1;var U0=R>0?F[R-1]:this;if(e<r-1)U0._parent=F[e+1],U0._parent.uncycle(),U0._length=U0._parent._length+1;else U0._parent=void 0,U0._length=1;var w0=U0._length+1;for(var E0=R-2;E0>=0;--E0)F[E0]._length=w0,w0++;return}}},e6.prototype.attachExtraTrace=function(r){if(r.__stackCleaned__)return;this.uncycle();var F=J4(r),M=F.message,R=[F.stack],y=this;while(y!==void 0)R.push(J1(y.stack.split(`
`))),y=y._parent;N1(R),O1(R),J.notEnumerableProp(r,"stack",l0(M,R)),J.notEnumerableProp(r,"__stackCleaned__",!0)};var c5=function(){var F=/^\s*at\s*/,M=function(c,e){if(typeof c==="string")return c;if(e.name!==void 0&&e.message!==void 0)return e.toString();return S$(e)};if(typeof Error.stackTraceLimit==="number"&&typeof Error.captureStackTrace==="function"){Error.stackTraceLimit+=6,V=F,W=M;var R=Error.captureStackTrace;return V$=function(c){return w.test(c)},function(c,e){Error.stackTraceLimit+=6,R(c,e),Error.stackTraceLimit-=6}}var y=Error();if(typeof y.stack==="string"&&y.stack.split(`
`)[0].indexOf("stackDetection@")>=0)return V=/@/,W=M,X=!0,function(e){e.stack=Error().stack};var s;try{throw Error()}catch(c){s="stack"in c}if(!("stack"in y)&&s&&typeof Error.stackTraceLimit==="number")return V=F,W=M,function(e){Error.stackTraceLimit+=6;try{throw Error()}catch(U0){e.stack=U0.stack}Error.stackTraceLimit-=6};return W=function(c,e){if(typeof c==="string")return c;if((typeof e==="object"||typeof e==="function")&&e.name!==void 0&&e.message!==void 0)return e.toString();return S$(e)},null}([]);if(typeof console<"u"&&typeof console.warn<"u"){if(L=function(r){console.warn(r)},J.isNode&&process.stderr.isTTY)L=function(r,F){var M=F?"\x1B[33m":"\x1B[31m";console.warn(M+r+`\x1B[0m
`)};else if(!J.isNode&&typeof Error().stack==="string")L=function(r,F){console.warn("%c"+r,F?"color: darkorange":"color: red")}}var P0={warnings:N,longStackTraces:!1,cancellation:!1,monitoring:!1};if(E)$.longStackTraces();return{longStackTraces:function(){return P0.longStackTraces},warnings:function(){return P0.warnings},cancellation:function(){return P0.cancellation},monitoring:function(){return P0.monitoring},propagateFromFunction:function(){return d},boundValueFunction:function(){return a},checkForgottenReturns:M0,setBounds:L7,warn:R1,deprecated:v0,CapturedTrace:e6,fireDomEvent:B,fireGlobalEvent:k}}});var fK0=O((zv1,kK0)=>{kK0.exports=function($,q){var I=n1(),U=$.CancellationError,Y=I.errorObj;function J(H,V,W){this.promise=H,this.type=V,this.handler=W,this.called=!1,this.cancelPromise=null}J.prototype.isFinallyHandler=function(){return this.type===0};function Q(H){this.finallyHandler=H}Q.prototype._resultCancelled=function(){K(this.finallyHandler)};function K(H,V){if(H.cancelPromise!=null){if(arguments.length>1)H.cancelPromise._reject(V);else H.cancelPromise._cancel();return H.cancelPromise=null,!0}return!1}function z(){return G.call(this,this.promise._target()._settledValue())}function w(H){if(K(this,H))return;return Y.e=H,Y}function G(H){var V=this.promise,W=this.handler;if(!this.called){this.called=!0;var X=this.isFinallyHandler()?W.call(V._boundValue()):W.call(V._boundValue(),H);if(X!==void 0){V._setReturnedNonUndefined();var L=q(X,V);if(L instanceof $){if(this.cancelPromise!=null){if(L._isCancelled()){var D=new U("late cancellation observer");return V._attachExtraTrace(D),Y.e=D,Y}else if(L.isPending())L._attachCancellationCallback(new Q(this))}return L._then(z,w,void 0,this,void 0)}}}if(V.isRejected())return K(this),Y.e=H,Y;else return K(this),H}return $.prototype._passThrough=function(H,V,W,X){if(typeof H!=="function")return this.then();return this._then(W,X,void 0,new J(this,V,H),void 0)},$.prototype.lastly=$.prototype.finally=function(H){return this._passThrough(H,0,G,G)},$.prototype.tap=function(H){return this._passThrough(H,1,G)},J}});var bK0=O((wv1,nK0)=>{nK0.exports=function($){var q=n1(),I=f3().keys,U=q.tryCatch,Y=q.errorObj;function J(Q,K,z){return function(w){var G=z._boundValue();$:for(var H=0;H<Q.length;++H){var V=Q[H];if(V===Error||V!=null&&V.prototype instanceof Error){if(w instanceof V)return U(K).call(G,w)}else if(typeof V==="function"){var W=U(V).call(G,w);if(W===Y)return W;else if(W)return U(K).call(G,w)}else if(q.isObject(w)){var X=I(V);for(var L=0;L<X.length;++L){var D=X[L];if(V[D]!=w[D])continue $}return U(K).call(G,w)}}return $}}return J}});var MS=O((Gv1,cK0)=>{var iK0=n1(),uU1=iK0.maybeWrapAsError,xU1=h5(),kU1=xU1.OperationalError,pK0=f3();function fU1($){return $ instanceof Error&&pK0.getPrototypeOf($)===Error.prototype}var nU1=/^(?:name|message|stack|cause)$/;function bU1($){var q;if(fU1($)){q=new kU1($),q.name=$.name,q.message=$.message,q.stack=$.stack;var I=pK0.keys($);for(var U=0;U<I.length;++U){var Y=I[U];if(!nU1.test(Y))q[Y]=$[Y]}return q}return iK0.markAsOriginatingFromRejection($),$}function iU1($,q){return function(I,U){if($===null)return;if(I){var Y=bU1(uU1(I));$._attachExtraTrace(Y),$._reject(Y)}else if(!q)$._fulfill(U);else{var J=arguments.length,Q=Array(Math.max(J-1,0));for(var K=1;K<J;++K)Q[K-1]=arguments[K];$._fulfill(Q)}$=null}}cK0.exports=iU1});var lK0=O((Hv1,dK0)=>{dK0.exports=function($,q,I,U,Y){var J=n1(),Q=J.tryCatch;$.method=function(K){if(typeof K!=="function")throw new $.TypeError("expecting a function but got "+J.classString(K));return function(){var z=new $(q);z._captureStackTrace(),z._pushContext();var w=Q(K).apply(this,arguments),G=z._popContext();return Y.checkForgottenReturns(w,G,"Promise.method",z),z._resolveFromSyncValue(w),z}},$.attempt=$.try=function(K){if(typeof K!=="function")return U("expecting a function but got "+J.classString(K));var z=new $(q);z._captureStackTrace(),z._pushContext();var w;if(arguments.length>1){Y.deprecated("calling Promise.try with more than 1 argument");var G=arguments[1],H=arguments[2];w=J.isArray(G)?Q(K).apply(H,G):Q(K).call(H,G)}else w=Q(K)();var V=z._popContext();return Y.checkForgottenReturns(w,V,"Promise.try",z),z._resolveFromSyncValue(w),z},$.prototype._resolveFromSyncValue=function(K){if(K===J.errorObj)this._rejectCallback(K.e,!1);else this._resolveCallback(K,!0)}}});var oK0=O((Vv1,mK0)=>{mK0.exports=function($,q,I,U){var Y=!1,J=function(w,G){this._reject(G)},Q=function(w,G){G.promiseRejectionQueued=!0,G.bindingPromise._then(J,J,null,this,w)},K=function(w,G){if((this._bitField&50397184)===0)this._resolveCallback(G.target)},z=function(w,G){if(!G.promiseRejectionQueued)this._reject(w)};$.prototype.bind=function(w){if(!Y)Y=!0,$.prototype._propagateFrom=U.propagateFromFunction(),$.prototype._boundValue=U.boundValueFunction();var G=I(w),H=new $(q);H._propagateFrom(this,1);var V=this._target();if(H._setBoundTo(G),G instanceof $){var W={promiseRejectionQueued:!1,promise:H,target:V,bindingPromise:G};V._then(q,Q,voi Line truncated
`)}function z1(a){for(var F=0;F<a.length;++F)if(a[F].length===0||F+1<a.length&&a[F][0]===a[F+1][0])a.splice(F,1),F--}function O0(a){var F=a[0];for(var M=1;M<a.length;++M){var v=a[M],u=F.length-1,s=F[u],m=-1;for(var e=v.length-1;e>=0;--e)if(v[e]===s){m=e;break}for(var e=m;e>=0;--e){var Y0=v[e];if(F[u]===Y0)F.pop(),u--;else break}F=v}}function h0(a){var F=[];for(var M=0;M<a.length;++M){var v=a[M],u=v===" (No stack trace)"||V.test(v),s=u&&V$(v);if(u&&!s){if(X&&v.charAt(0)!==" ")v=" "+v;F.push(v)}}return F}function d0(a){var F=a.stack.replace(/\s+$/g,"").split(`
`);for(var M=0;M<F.length;++M){var v=F[M];if(v===" (No stack trace)"||V.test(v))break}if(M>0&&a.name!="SyntaxError")F=F.slice(M);return F}function J4(a){var F=a.stack,M=a.toString();return F=typeof F==="string"&&F.length>0?d0(a):[" (No stack trace)"],{message:M,stack:a.name=="SyntaxError"?F:h0(F)}}function C4(a,F,M){if(typeof console<"u"){var v;if(J.isObject(a)){var u=a.stack;v=F+W(u,a)}else v=F+String(a);if(typeof L==="function")L(v,M);else if(typeof console.log==="function"||typeof console.log==="object")console.log(v)}}function w$(a,F,M,v){var u=!1;try{if(typeof F==="function")if(u=!0,a==="rejectionHandled")F(v);else F(M,v)}catch(s){U.throwLater(s)}if(a==="unhandledRejection"){if(!R(a,M,v)&&!u)C4(M,"Unhandled rejection ")}else R(a,v)}function y$(a){var F;if(typeof a==="function")F="[function "+(a.name||"anonymous")+"]";else{F=a&&typeof a.toString==="function"?a.toString():J.toString(a);var M=/\[object [a-zA-Z0-9$_]+\]/;if(M.test(F))try{var v=JSON.stringify(a);F=v}catch(u){}if(F.length===0)F="(empty array)"}return"(<"+d8(F)+">, no stack trace)"}function d8(a){var F=41;if(a.length<F)return a;return a.substr(0,F-3)+"..."}function u$(){return typeof d5==="function"}var V$=function(){return!1},m8=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;function s6(a){var F=a.match(m8);if(F)return{fileName:F[1],line:parseInt(F[2],10)}}function L7(a,F){if(!u$())return;var M=a.stack.split(`
`),v=F.stack.split(`
`),u=-1,s=-1,m,e;for(var Y0=0;Y0<M.length;++Y0){var G0=s6(M[Y0]);if(G0){m=G0.fileName,u=G0.line;break}}for(var Y0=0;Y0<v.length;++Y0){var G0=s6(v[Y0]);if(G0){e=G0.fileName,s=G0.line;break}}if(u<0||s<0||!m||!e||m!==e||u>=s)return;V$=function(B0){if(G.test(B0))return!0;var b0=s6(B0);if(b0){if(b0.fileName===m&&(u<=b0.line&&b0.line<=s))return!0}return!1}}function e6(a){this._parent=a,this._promisesCreated=0;var F=this._length=1+(a===void 0?0:a._length);if(d5(this,e6),F>32)this.uncycle()}J.inherits(e6,Error),q.CapturedTrace=e6,e6.prototype.uncycle=function(){var a=this._length;if(a<2)return;var F=[],M={};for(var v=0,u=this;u!==void 0;++v)F.push(u),u=u._parent;a=this._length=v;for(var v=a-1;v>=0;--v){var s=F[v].stack;if(M[s]===void 0)M[s]=v}for(var v=0;v<a;++v){var m=F[v].stack,e=M[m];if(e!==void 0&&e!==v){if(e>0)F[e-1]._parent=void 0,F[e-1]._length=1;F[v]._parent=void 0,F[v]._length=1;var Y0=v>0?F[v-1]:this;if(e<a-1)Y0._parent=F[e+1],Y0._parent.uncycle(),Y0._length=Y0._parent._length+1;else Y0._parent=void 0,Y0._length=1;var G0=Y0._length+1;for(var B0=v-2;B0>=0;--B0)F[B0]._length=G0,G0++;return}}},e6.prototype.attachExtraTrace=function(a){if(a.__stackCleaned__)return;this.uncycle();var F=J4(a),M=F.message,v=[F.stack],u=this;while(u!==void 0)v.push(h0(u.stack.split(`
`))),u=u._parent;O0(v),z1(v),J.notEnumerableProp(a,"stack",f0(M,v)),J.notEnumerableProp(a,"__stackCleaned__",!0)};var d5=function(){var F=/^\s*at\s*/,M=function(m,e){if(typeof m==="string")return m;if(e.name!==void 0&&e.message!==void 0)return e.toString();return y$(e)};if(typeof Error.stackTraceLimit==="number"&&typeof Error.captureStackTrace==="function"){Error.stackTraceLimit+=6,V=F,W=M;var v=Error.captureStackTrace;return V$=function(m){return G.test(m)},function(m,e){Error.stackTraceLimit+=6,v(m,e),Error.stackTraceLimit-=6}}var u=Error();if(typeof u.stack==="string"&&u.stack.split(`
`)[0].indexOf("stackDetection@")>=0)return V=/@/,W=M,X=!0,function(e){e.stack=Error().stack};var s;try{throw Error()}catch(m){s="stack"in m}if(!("stack"in u)&&s&&typeof Error.stackTraceLimit==="number")return V=F,W=M,function(e){Error.stackTraceLimit+=6;try{throw Error()}catch(Y0){e.stack=Y0.stack}Error.stackTraceLimit-=6};return W=function(m,e){if(typeof m==="string")return m;if((typeof e==="object"||typeof e==="function")&&e.name!==void 0&&e.message!==void 0)return e.toString();return y$(e)},null}([]);if(typeof console<"u"&&typeof console.warn<"u"){if(L=function(a){console.warn(a)},J.isNode&&process.stderr.isTTY)L=function(a,F){var M=F?"\x1B[33m":"\x1B[31m";console.warn(M+a+`\x1B[0m
`)};else if(!J.isNode&&typeof Error().stack==="string")L=function(a,F){console.warn("%c"+a,F?"color: darkorange":"color: red")}}var T0={warnings:N,longStackTraces:!1,cancellation:!1,monitoring:!1};if(E)$.longStackTraces();return{longStackTraces:function(){return T0.longStackTraces},warnings:function(){return T0.warnings},cancellation:function(){return T0.cancellation},monitoring:function(){return T0.monitoring},propagateFromFunction:function(){return d},boundValueFunction:function(){return t},checkForgottenReturns:M0,setBounds:L7,warn:X1,deprecated:j0,CapturedTrace:e6,fireDomEvent:B,fireGlobalEvent:f}}});var K20=O((QR1,Q20)=>{Q20.exports=function($,q){var I=b1(),U=$.CancellationError,Y=I.errorObj;function J(w,V,W){this.promise=w,this.type=V,this.handler=W,this.called=!1,this.cancelPromise=null}J.prototype.isFinallyHandler=function(){return this.type===0};function Q(w){this.finallyHandler=w}Q.prototype._resultCancelled=function(){K(this.finallyHandler)};function K(w,V){if(w.cancelPromise!=null){if(arguments.length>1)w.cancelPromise._reject(V);else w.cancelPromise._cancel();return w.cancelPromise=null,!0}return!1}function z(){return H.call(this,this.promise._target()._settledValue())}function G(w){if(K(this,w))return;return Y.e=w,Y}function H(w){var V=this.promise,W=this.handler;if(!this.called){this.called=!0;var X=this.isFinallyHandler()?W.call(V._boundValue()):W.call(V._boundValue(),w);if(X!==void 0){V._setReturnedNonUndefined();var L=q(X,V);if(L instanceof $){if(this.cancelPromise!=null){if(L._isCancelled()){var D=new U("late cancellation observer");return V._attachExtraTrace(D),Y.e=D,Y}else if(L.isPending())L._attachCancellationCallback(new Q(this))}return L._then(z,G,void 0,this,void 0)}}}if(V.isRejected())return K(this),Y.e=w,Y;else return K(this),w}return $.prototype._passThrough=function(w,V,W,X){if(typeof w!=="function")return this.then();return this._then(W,X,void 0,new J(this,V,w),void 0)},$.prototype.lastly=$.prototype.finally=function(w){return this._passThrough(w,0,H,H)},$.prototype.tap=function(w){return this._passThrough(w,1,H)},J}});var G20=O((KR1,z20)=>{z20.exports=function($){var q=b1(),I=y3().keys,U=q.tryCatch,Y=q.errorObj;function J(Q,K,z){return function(G){var H=z._boundValue();$:for(var w=0;w<Q.length;++w){var V=Q[w];if(V===Error||V!=null&&V.prototype instanceof Error){if(G instanceof V)return U(K).call(H,G)}else if(typeof V==="function"){var W=U(V).call(H,G);if(W===Y)return W;else if(W)return U(K).call(H,G)}else if(q.isObject(G)){var X=I(V);for(var L=0;L<X.length;++L){var D=X[L];if(V[D]!=G[D])continue $}return U(K).call(H,G)}}return $}}return J}});var Nh=O((zR1,V20)=>{var H20=b1(),Nq1=H20.maybeWrapAsError,Fq1=v5(),Mq1=Fq1.OperationalError,w20=y3();function Aq1($){return $ instanceof Error&&w20.getPrototypeOf($)===Error.prototype}var Pq1=/^(?:name|message|stack|cause)$/;function Tq1($){var q;if(Aq1($)){q=new Mq1($),q.name=$.name,q.message=$.message,q.stack=$.stack;var I=w20.keys($);for(var U=0;U<I.length;++U){var Y=I[U];if(!Pq1.test(Y))q[Y]=$[Y]}return q}return H20.markAsOriginatingFromRejection($),$}function Eq1($,q){return function(I,U){if($===null)return;if(I){var Y=Tq1(Nq1(I));$._attachExtraTrace(Y),$._reject(Y)}else if(!q)$._fulfill(U);else{var J=arguments.length,Q=Array(Math.max(J-1,0));for(var K=1;K<J;++K)Q[K-1]=arguments[K];$._fulfill(Q)}$=null}}V20.exports=Eq1});var Z20=O((GR1,W20)=>{W20.exports=function($,q,I,U,Y){var J=b1(),Q=J.tryCatch;$.method=function(K){if(typeof K!=="function")throw new $.TypeError("expecting a function but got "+J.classString(K));return function(){var z=new $(q);z._captureStackTrace(),z._pushContext();var G=Q(K).apply(this,arguments),H=z._popContext();return Y.checkForgottenReturns(G,H,"Promise.method",z),z._resolveFromSyncValue(G),z}},$.attempt=$.try=function(K){if(typeof K!=="function")return U("expecting a function but got "+J.classString(K));var z=new $(q);z._captureStackTrace(),z._pushContext();var G;if(arguments.length>1){Y.deprecated("calling Promise.try with more than 1 argument");var H=arguments[1],w=arguments[2];G=J.isArray(H)?Q(K).apply(w,H):Q(K).call(w,H)}else G=Q(K)();var V=z._popContext();return Y.checkForgottenReturns(G,V,"Promise.try",z),z._resolveFromSyncValue(G),z},$.prototype._resolveFromSyncValue=function(K){if(K===J.errorObj)this._rejectCallback(K.e,!1);else this._resolveCallback(K,!0)}}});var L20=O((HR1,X20)=>{X20.exports=function($,q,I,U){var Y=!1,J=function(G,H){this._reject(H)},Q=function(G,H){H.promiseRejectionQueued=!0,H.bindingPromise._then(J,J,null,this,G)},K=function(G,H){if((this._bitField&50397184)===0)this._resolveCallback(H.target)},z=function(G,H){if(!H.promiseRejectionQueued)this._reject(G)};$.prototype.bind=function(G){if(!Y)Y=!0,$.prototype._propagateFrom=U.propagateFromFunction(),$.prototype._boundValue=U.boundValueFunction();var H=I(G),w=new $(q);w._propagateFrom(this,1);var V=this._target();if(w._setBoundTo(H),H instanceof $){var W={promiseRejectionQueued:!1,promise:w,target:V,bindingPromise:H};V._then(q,Q,voi Line truncated
See http://goo.gl/MqrFmX
`);return this._settledValue()},U=q.prototype.error=q.prototype.reason=function(){if(!this.isRejected())throw TypeError(`cannot get rejection reason of a non-rejected promise
See http://goo.gl/MqrFmX
`);return this._settledValue()},Y=q.prototype.isFulfilled=function(){return(this._bitField&33554432)!==0},J=q.prototype.isRejected=function(){return(this._bitField&16777216)!==0},Q=q.prototype.isPending=function(){return(this._bitField&50397184)===0},K=q.prototype.isResolved=function(){return(this._bitField&50331648)!==0};q.prototype.isCancelled=function(){return(this._bitField&8454144)!==0},$.prototype.__isCancelled=function(){return(this._bitField&65536)===65536},$.prototype._isCancelled=function(){return this._target().__isCancelled()},$.prototype.isCancelled=function(){return(this._target()._bitField&8454144)!==0},$.prototype.isPending=function(){return Q.call(this._target())},$.prototype.isRejected=function(){return J.call(this._target())},$.prototype.isFulfilled=function(){return Y.call(this._target())},$.prototype.isResolved=function(){return K.call(this._target())},$.prototype.value=function(){return I.call(this._target())},$.prototype.reason=function(){var z=this._target();return z._unsetRejectionIsUnhandled(),U.call(z)},$.prototype._value=function(){return this._settledValue()},$.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},$.PromiseInspection=q}});var Iz0=O((Lv1,qz0)=>{qz0.exports=function($,q,I,U,Y,J){var Q=n1(),K=Q.canEvaluate,z=Q.tryCatch,w=Q.errorObj,G;if(K){var H=function(E){return Function("value","holder",`
`);return this._settledValue()},Y=q.prototype.isFulfilled=function(){return(this._bitField&33554432)!==0},J=q.prototype.isRejected=function(){return(this._bitField&16777216)!==0},Q=q.prototype.isPending=function(){return(this._bitField&50397184)===0},K=q.prototype.isResolved=function(){return(this._bitField&50331648)!==0};q.prototype.isCancelled=function(){return(this._bitField&8454144)!==0},$.prototype.__isCancelled=function(){return(this._bitField&65536)===65536},$.prototype._isCancelled=function(){return this._target().__isCancelled()},$.prototype.isCancelled=function(){return(this._target()._bitField&8454144)!==0},$.prototype.isPending=function(){return Q.call(this._target())},$.prototype.isRejected=function(){return J.call(this._target())},$.prototype.isFulfilled=function(){return Y.call(this._target())},$.prototype.isResolved=function(){return K.call(this._target())},$.prototype.value=function(){return I.call(this._target())},$.prototype.reason=function(){var z=this._target();return z._unsetRejectionIsUnhandled(),U.call(z)},$.prototype._value=function(){return this._settledValue()},$.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},$.PromiseInspection=q}});var T20=O((ZR1,P20)=>{P20.exports=function($,q,I,U,Y,J){var Q=b1(),K=Q.canEvaluate,z=Q.tryCatch,G=Q.errorObj,H;if(K){var w=function(E){return Function("value","holder",`
'use strict';
holder.pIndex = value;
holder.checkFulfillment(this);
`.replace(/Index/g,E))},V=function(E){return Function("promise","holder",`
'use strict';
holder.pIndex = promise;
`.replace(/Index/g,E))},W=function(E){var T=Array(E);for(var P=0;P<T.length;++P)T[P]="this.p"+(P+1);var B=T.join(" = ")+" = null;",k=`var promise;
`+T.map(function(t){return`
promise = `+t+`;
`.replace(/Index/g,E))},W=function(E){var T=Array(E);for(var P=0;P<T.length;++P)T[P]="this.p"+(P+1);var B=T.join(" = ")+" = null;",f=`var promise;
`+T.map(function(p){return`
promise = `+p+`;
if (promise instanceof Promise) {
promise.cancel();
}
`}).join(`
`),h=T.join(", "),f="Holder$"+E,S=`return function(tryCatch, errorObj, Promise, async) {
`),S=T.join(", "),n="Holder$"+E,R=`return function(tryCatch, errorObj, Promise, async) {
'use strict';
function [TheName](fn) {
[TheProperties]
@@ -134,7 +129,7 @@ See: https://github.com/isaacs/node-glob/issues/167`);if(!(this instanceof S4))r
return [TheName];
}(tryCatch, errorObj, Promise, async);
`;return S=S.replace(/\[TheName\]/g,f).replace(/\[TheTotal\]/g,E).replace(/\[ThePassedArguments\]/g,h).replace(/\[TheProperties\]/g,B).replace(/\[CancellationCode\]/g,k),Function("tryCatch","errorObj","Promise","async",S)(z,w,$,Y)},X=[],L=[],D=[];for(var N=0;N<8;++N)X.push(W(N+1)),L.push(H(N+1)),D.push(V(N+1));G=function(E){this._reject(E)}}$.join=function(){var E=arguments.length-1,T;if(E>0&&typeof arguments[E]==="function"){if(T=arguments[E],E<=8&&K){var b=new $(U);b._captureStackTrace();var P=X[E-1],B=new P(T),k=L;for(var h=0;h<E;++h){var f=I(arguments[h],b);if(f instanceof $){f=f._target();var S=f._bitField;if((S&50397184)===0)f._then(k[h],G,void 0,b,B),D[h](f,B),B.asyncNeeded=!1;else if((S&33554432)!==0)k[h].call(b,f._value(),B);else if((S&16777216)!==0)b._reject(f._reason());else b._cancel()}else k[h].call(b,f,B)}if(!b._isFateSealed()){if(B.asyncNeeded){var t=J();if(t!==null)B.fn=Q.domainBind(t,B.fn)}b._setAsyncGuaranteed(),b._setOnCancel(B)}return b}}var p=arguments.length,C=Array(p);for(var n=0;n<p;++n)C[n]=arguments[n];if(T)C.pop();var b=new q(C).promise();return T!==void 0?b.spread(T):b}}});var Yz0=O((Dv1,Uz0)=>{Uz0.exports=function($,q,I,U,Y,J){var Q=$._getDomain,K=n1(),z=K.tryCatch,w=K.errorObj,G=$._async;function H(W,X,L,D){this.constructor$(W),this._promise._captureStackTrace();var N=Q();this._callback=N===null?X:K.domainBind(N,X),this._preservedValues=D===Y?Array(this.length()):null,this._limit=L,this._inFlight=0,this._queue=[],G.invoke(this._asyncInit,this,void 0)}K.inherits(H,q),H.prototype._asyncInit=function(){this._init$(void 0,-2)},H.prototype._init=function(){},H.prototype._promiseFulfilled=function(W,X){var L=this._values,D=this.length(),N=this._preservedValues,E=this._limit;if(X<0){if(X=X*-1-1,L[X]=W,E>=1){if(this._inFlight--,this._drainQueue(),this._isResolved())return!0}}else{if(E>=1&&this._inFlight>=E)return L[X]=W,this._queue.push(X),!1;if(N!==null)N[X]=W;var T=this._promise,P=this._callback,B=T._boundValue();T._pushContext();var k=z(P).call(B,W,X,D),h=T._popContext();if(J.checkForgottenReturns(k,h,N!==null?"Promise.filter":"Promise.map",T),k===w)return this._reject(k.e),!0;var f=U(k,this._promise);if(f instanceof $){f=f._target();var S=f._bitField;if((S&50397184)===0){if(E>=1)this._inFlight++;return L[X]=f,f._proxy(this,(X+1)*-1),!1}else if((S&33554432)!==0)k=f._value();else if((S&16777216)!==0)return this._reject(f._reason()),!0;else return this._cancel(),!0}L[X]=k}var t=++this._totalResolved;if(t>=D){if(N!==null)this._filter(L,N);else this._resolve(L);return!0}return!1},H.prototype._drainQueue=function(){var W=this._queue,X=this._limit,L=this._values;while(W.length>0&&this._inFlight<X){if(this._isResolved())return;var D=W.pop();this._promiseFulfilled(L[D],D)}},H.prototype._filter=function(W,X){var L=X.length,D=Array(L),N=0;for(var E=0;E<L;++E)if(W[E])D[N++]=X[E];D.length=N,this._resolve(D)},H.prototype.preservedValues=function(){return this._preservedValues};function V(W,X,L,D){if(typeof X!=="function")return I("expecting a function but got "+K.classString(X));var N=0;if(L!==void 0)if(typeof L==="object"&&L!==null){if(typeof L.concurrency!=="number")return $.reject(TypeError("'concurrency' must be a number but it is "+K.classString(L.concurrency)));N=L.concurrency}else return $.reject(TypeError("options argument must be an object but it is "+K.classString(L)));return N=typeof N==="number"&&isFinite(N)&&N>=1?N:0,new H(W,X,N,D).promise()}$.prototype.map=function(W,X){return V(this,W,X,null)},$.map=function(W,X,L,D){return V(W,X,L,D)}}});var Qz0=O((Ov1,Jz0)=>{var AS=Object.create;if(AS)QL=AS(null),KL=AS(null),QL[" size"]=KL[" size"]=0;var QL,KL;Jz0.exports=function($){var q=n1(),I=q.canEvaluate,U=q.isIdentifier,Y,J,Q=function(W){return Function("ensureMethod",`
`;return R=R.replace(/\[TheName\]/g,n).replace(/\[TheTotal\]/g,E).replace(/\[ThePassedArguments\]/g,S).replace(/\[TheProperties\]/g,B).replace(/\[CancellationCode\]/g,f),Function("tryCatch","errorObj","Promise","async",R)(z,G,$,Y)},X=[],L=[],D=[];for(var N=0;N<8;++N)X.push(W(N+1)),L.push(w(N+1)),D.push(V(N+1));H=function(E){this._reject(E)}}$.join=function(){var E=arguments.length-1,T;if(E>0&&typeof arguments[E]==="function"){if(T=arguments[E],E<=8&&K){var b=new $(U);b._captureStackTrace();var P=X[E-1],B=new P(T),f=L;for(var S=0;S<E;++S){var n=I(arguments[S],b);if(n instanceof $){n=n._target();var R=n._bitField;if((R&50397184)===0)n._then(f[S],H,void 0,b,B),D[S](n,B),B.asyncNeeded=!1;else if((R&33554432)!==0)f[S].call(b,n._value(),B);else if((R&16777216)!==0)b._reject(n._reason());else b._cancel()}else f[S].call(b,n,B)}if(!b._isFateSealed()){if(B.asyncNeeded){var p=J();if(p!==null)B.fn=Q.domainBind(p,B.fn)}b._setAsyncGuaranteed(),b._setOnCancel(B)}return b}}var i=arguments.length,C=Array(i);for(var k=0;k<i;++k)C[k]=arguments[k];if(T)C.pop();var b=new q(C).promise();return T!==void 0?b.spread(T):b}}});var j20=O((XR1,E20)=>{E20.exports=function($,q,I,U,Y,J){var Q=$._getDomain,K=b1(),z=K.tryCatch,G=K.errorObj,H=$._async;function w(W,X,L,D){this.constructor$(W),this._promise._captureStackTrace();var N=Q();this._callback=N===null?X:K.domainBind(N,X),this._preservedValues=D===Y?Array(this.length()):null,this._limit=L,this._inFlight=0,this._queue=[],H.invoke(this._asyncInit,this,void 0)}K.inherits(w,q),w.prototype._asyncInit=function(){this._init$(void 0,-2)},w.prototype._init=function(){},w.prototype._promiseFulfilled=function(W,X){var L=this._values,D=this.length(),N=this._preservedValues,E=this._limit;if(X<0){if(X=X*-1-1,L[X]=W,E>=1){if(this._inFlight--,this._drainQueue(),this._isResolved())return!0}}else{if(E>=1&&this._inFlight>=E)return L[X]=W,this._queue.push(X),!1;if(N!==null)N[X]=W;var T=this._promise,P=this._callback,B=T._boundValue();T._pushContext();var f=z(P).call(B,W,X,D),S=T._popContext();if(J.checkForgottenReturns(f,S,N!==null?"Promise.filter":"Promise.map",T),f===G)return this._reject(f.e),!0;var n=U(f,this._promise);if(n instanceof $){n=n._target();var R=n._bitField;if((R&50397184)===0){if(E>=1)this._inFlight++;return L[X]=n,n._proxy(this,(X+1)*-1),!1}else if((R&33554432)!==0)f=n._value();else if((R&16777216)!==0)return this._reject(n._reason()),!0;else return this._cancel(),!0}L[X]=f}var p=++this._totalResolved;if(p>=D){if(N!==null)this._filter(L,N);else this._resolve(L);return!0}return!1},w.prototype._drainQueue=function(){var W=this._queue,X=this._limit,L=this._values;while(W.length>0&&this._inFlight<X){if(this._isResolved())return;var D=W.pop();this._promiseFulfilled(L[D],D)}},w.prototype._filter=function(W,X){var L=X.length,D=Array(L),N=0;for(var E=0;E<L;++E)if(W[E])D[N++]=X[E];D.length=N,this._resolve(D)},w.prototype.preservedValues=function(){return this._preservedValues};function V(W,X,L,D){if(typeof X!=="function")return I("expecting a function but got "+K.classString(X));var N=0;if(L!==void 0)if(typeof L==="object"&&L!==null){if(typeof L.concurrency!=="number")return $.reject(TypeError("'concurrency' must be a number but it is "+K.classString(L.concurrency)));N=L.concurrency}else return $.reject(TypeError("options argument must be an object but it is "+K.classString(L)));return N=typeof N==="number"&&isFinite(N)&&N>=1?N:0,new w(W,X,N,D).promise()}$.prototype.map=function(W,X){return V(this,W,X,null)},$.map=function(W,X,L,D){return V(W,X,L,D)}}});var B20=O((LR1,g20)=>{var Fh=Object.create;if(Fh)uX=Fh(null),xX=Fh(null),uX[" size"]=xX[" size"]=0;var uX,xX;g20.exports=function($){var q=b1(),I=q.canEvaluate,U=q.isIdentifier,Y,J,Q=function(W){return Function("ensureMethod",`
return function(obj) {
'use strict'
var len = this.length;
@@ -148,10 +143,10 @@ See: https://github.com/isaacs/node-glob/issues/167`);if(!(this instanceof S4))r
return obj.methodName.apply(obj, this);
}
};
`.replace(/methodName/g,W))(w)},K=function(W){return Function("obj",`
`.replace(/methodName/g,W))(G)},K=function(W){return Function("obj",`
'use strict';
return obj.propertyName;
`.replace("propertyName",W))},z=function(W,X,L){var D=L[W];if(typeof D!=="function"){if(!U(W))return null;if(D=X(W),L[W]=D,L[" size"]++,L[" size"]>512){var N=Object.keys(L);for(var E=0;E<256;++E)delete L[N[E]];L[" size"]=N.length-256}}return D};Y=function(W){return z(W,Q,QL)},J=function(W){return z(W,K,KL)};function w(W,X){var L;if(W!=null)L=W[X];if(typeof L!=="function"){var D="Object "+q.classString(W)+" has no method '"+q.toString(X)+"'";throw new $.TypeError(D)}return L}function G(W){var X=this.pop(),L=w(W,X);return L.apply(W,this)}$.prototype.call=function(W){var X=arguments.length,L=Array(Math.max(X-1,0));for(var D=1;D<X;++D)L[D-1]=arguments[D];if(I){var N=Y(W);if(N!==null)return this._then(N,void 0,void 0,L,void 0)}return L.push(W),this._then(G,void 0,void 0,L,void 0)};function H(W){return W[this]}function V(W){var X=+this;if(X<0)X=Math.max(0,X+W.length);return W[X]}$.prototype.get=function(W){var X=typeof W==="number",L;if(!X)if(I){var D=J(W);L=D!==null?D:H}else L=H;else L=V;return this._then(L,void 0,void 0,W,void 0)}}});var zz0=O((Nv1,Kz0)=>{Kz0.exports=function($,q,I,U,Y,J){var Q=n1(),K=h5().TypeError,z=n1().inherits,w=Q.errorObj,G=Q.tryCatch,H={};function V(T){setTimeout(function(){throw T},0)}function W(T){var P=I(T);if(P!==T&&typeof T._isDisposable==="function"&&typeof T._getDisposer==="function"&&T._isDisposable())P._setDisposable(T._getDisposer());return P}function X(T,P){var B=0,k=T.length,h=new $(Y);function f(){if(B>=k)return h._fulfill();var S=W(T[B++]);if(S instanceof $&&S._isDisposable()){try{S=I(S._getDisposer().tryDispose(P),T.promise)}catch(t){return V(t)}if(S instanceof $)return S._then(f,V,null,null,null)}f()}return f(),h}function L(T,P,B){this._data=T,this._promise=P,this._context=B}L.prototype.data=function(){return this._data},L.prototype.promise=function(){return this._promise},L.prototype.resource=function(){if(this.promise().isFulfilled())return this.promise().value();return H},L.prototype.tryDispose=function(T){var P=this.resource(),B=this._context;if(B!==void 0)B._pushContext();var k=P!==H?this.doDispose(P,T):null;if(B!==void 0)B._popContext();return this._promise._unsetDisposable(),this._data=null,k},L.isDisposer=function(T){return T!=null&&typeof T.resource==="function"&&typeof T.tryDispose==="function"};function D(T,P,B){this.constructor$(T,P,B)}z(D,L),D.prototype.doDispose=function(T,P){var B=this.data();return B.call(T,T,P)};function N(T){if(L.isDisposer(T))return this.resources[this.index]._setDisposable(T),T.promise();return T}function E(T){this.length=T,this.promise=null,this[T-1]=null}E.prototype._resultCancelled=function(){var T=this.length;for(var P=0;P<T;++P){var B=this[P];if(B instanceof $)B.cancel()}},$.using=function(){var T=arguments.length;if(T<2)return q("you must pass at least 2 arguments to Promise.using");var P=arguments[T-1];if(typeof P!=="function")return q("expecting a function but got "+Q.classString(P));var B,k=!0;if(T===2&&Array.isArray(arguments[0]))B=arguments[0],T=B.length,k=!1;else B=arguments,T--;var h=new E(T);for(var f=0;f<T;++f){var S=B[f];if(L.isDisposer(S)){var t=S;S=S.promise(),S._setDisposable(t)}else{var p=I(S);if(p instanceof $)S=p._then(N,null,null,{resources:h,index:f},void 0)}h[f]=S}var C=Array(h.length);for(var f=0;f<C.length;++f)C[f]=$.resolve(h[f]).reflect();var n=$.all(C).then(function(J0){for(var g=0;g<J0.length;++g){var u=J0[g];if(u.isRejected())return w.e=u.error(),w;else if(!u.isFulfilled()){n.cancel();return}J0[g]=u.value()}b._pushContext(),P=G(P);var d=k?P.apply(void 0,J0):P(J0),a=b._popContext();return J.checkForgottenReturns(d,a,"Promise.using",b),d}),b=n.lastly(function(){var J0=new $.PromiseInspection(n);return X(h,J0)});return h.promise=b,b._setOnCancel(h),b},$.prototype._setDisposable=function(T){this._bitField=this._bitField|131072,this._disposer=T},$.prototype._isDisposable=function(){return(this._bitField&131072)>0},$.prototype._getDisposer=function(){return this._disposer},$.prototype._unsetDisposable=function(){this._bitField=this._bitField&-131073,this._disposer=void 0},$.prototype.disposer=function(T){if(typeof T==="function")return new D(T,this,U());throw new K}}});var Gz0=O((Fv1,wz0)=>{wz0.exports=function($,q,I){var U=n1(),Y=$.TimeoutError;function J(H){this.handle=H}J.prototype._resultCancelled=function(){clearTimeout(this.handle)};var Q=function(H){return K(+this).thenReturn(H)},K=$.delay=function(H,V){var W,X;if(V!==void 0){if(W=$.resolve(V)._then(Q,null,null,H,void 0),I.cancellation()&&V instanceof $)W._setOnCancel(V)}else{if(W=new $(q),X=setTimeout(function(){W._fulfill()},+H),I.cancellation())W._setOnCancel(new J(X));W._captureStackTrace()}return W._setAsyncGuaranteed(),W};$.prototype.delay=function(H){return K(H,this)};var z=function(H,V,W){var X;if(typeof V!=="string")if(V instanceof Error)X=V;else X=new Y("operation timed out");else X=new Y(V);if(U.markAsOriginatingFromRejection(X),H._attachExtraTrace(X),H._reject(X),W!=null)W.cancel()};function w(H){return clearTimeout(this.handle),H}f Line truncated
`.replace("propertyName",W))},z=function(W,X,L){var D=L[W];if(typeof D!=="function"){if(!U(W))return null;if(D=X(W),L[W]=D,L[" size"]++,L[" size"]>512){var N=Object.keys(L);for(var E=0;E<256;++E)delete L[N[E]];L[" size"]=N.length-256}}return D};Y=function(W){return z(W,Q,uX)},J=function(W){return z(W,K,xX)};function G(W,X){var L;if(W!=null)L=W[X];if(typeof L!=="function"){var D="Object "+q.classString(W)+" has no method '"+q.toString(X)+"'";throw new $.TypeError(D)}return L}function H(W){var X=this.pop(),L=G(W,X);return L.apply(W,this)}$.prototype.call=function(W){var X=arguments.length,L=Array(Math.max(X-1,0));for(var D=1;D<X;++D)L[D-1]=arguments[D];if(I){var N=Y(W);if(N!==null)return this._then(N,void 0,void 0,L,void 0)}return L.push(W),this._then(H,void 0,void 0,L,void 0)};function w(W){return W[this]}function V(W){var X=+this;if(X<0)X=Math.max(0,X+W.length);return W[X]}$.prototype.get=function(W){var X=typeof W==="number",L;if(!X)if(I){var D=J(W);L=D!==null?D:w}else L=w;else L=V;return this._then(L,void 0,void 0,W,void 0)}}});var v20=O((DR1,R20)=>{R20.exports=function($,q,I,U,Y,J){var Q=b1(),K=v5().TypeError,z=b1().inherits,G=Q.errorObj,H=Q.tryCatch,w={};function V(T){setTimeout(function(){throw T},0)}function W(T){var P=I(T);if(P!==T&&typeof T._isDisposable==="function"&&typeof T._getDisposer==="function"&&T._isDisposable())P._setDisposable(T._getDisposer());return P}function X(T,P){var B=0,f=T.length,S=new $(Y);function n(){if(B>=f)return S._fulfill();var R=W(T[B++]);if(R instanceof $&&R._isDisposable()){try{R=I(R._getDisposer().tryDispose(P),T.promise)}catch(p){return V(p)}if(R instanceof $)return R._then(n,V,null,null,null)}n()}return n(),S}function L(T,P,B){this._data=T,this._promise=P,this._context=B}L.prototype.data=function(){return this._data},L.prototype.promise=function(){return this._promise},L.prototype.resource=function(){if(this.promise().isFulfilled())return this.promise().value();return w},L.prototype.tryDispose=function(T){var P=this.resource(),B=this._context;if(B!==void 0)B._pushContext();var f=P!==w?this.doDispose(P,T):null;if(B!==void 0)B._popContext();return this._promise._unsetDisposable(),this._data=null,f},L.isDisposer=function(T){return T!=null&&typeof T.resource==="function"&&typeof T.tryDispose==="function"};function D(T,P,B){this.constructor$(T,P,B)}z(D,L),D.prototype.doDispose=function(T,P){var B=this.data();return B.call(T,T,P)};function N(T){if(L.isDisposer(T))return this.resources[this.index]._setDisposable(T),T.promise();return T}function E(T){this.length=T,this.promise=null,this[T-1]=null}E.prototype._resultCancelled=function(){var T=this.length;for(var P=0;P<T;++P){var B=this[P];if(B instanceof $)B.cancel()}},$.using=function(){var T=arguments.length;if(T<2)return q("you must pass at least 2 arguments to Promise.using");var P=arguments[T-1];if(typeof P!=="function")return q("expecting a function but got "+Q.classString(P));var B,f=!0;if(T===2&&Array.isArray(arguments[0]))B=arguments[0],T=B.length,f=!1;else B=arguments,T--;var S=new E(T);for(var n=0;n<T;++n){var R=B[n];if(L.isDisposer(R)){var p=R;R=R.promise(),R._setDisposable(p)}else{var i=I(R);if(i instanceof $)R=i._then(N,null,null,{resources:S,index:n},void 0)}S[n]=R}var C=Array(S.length);for(var n=0;n<C.length;++n)C[n]=$.resolve(S[n]).reflect();var k=$.all(C).then(function(U0){for(var j=0;j<U0.length;++j){var x=U0[j];if(x.isRejected())return G.e=x.error(),G;else if(!x.isFulfilled()){k.cancel();return}U0[j]=x.value()}b._pushContext(),P=H(P);var d=f?P.apply(void 0,U0):P(U0),t=b._popContext();return J.checkForgottenReturns(d,t,"Promise.using",b),d}),b=k.lastly(function(){var U0=new $.PromiseInspection(k);return X(S,U0)});return S.promise=b,b._setOnCancel(S),b},$.prototype._setDisposable=function(T){this._bitField=this._bitField|131072,this._disposer=T},$.prototype._isDisposable=function(){return(this._bitField&131072)>0},$.prototype._getDisposer=function(){return this._disposer},$.prototype._unsetDisposable=function(){this._bitField=this._bitField&-131073,this._disposer=void 0},$.prototype.disposer=function(T){if(typeof T==="function")return new D(T,this,U());throw new K}}});var _20=O((OR1,C20)=>{C20.exports=function($,q,I){var U=b1(),Y=$.TimeoutError;function J(w){this.handle=w}J.prototype._resultCancelled=function(){clearTimeout(this.handle)};var Q=function(w){return K(+this).thenReturn(w)},K=$.delay=function(w,V){var W,X;if(V!==void 0){if(W=$.resolve(V)._then(Q,null,null,w,void 0),I.cancellation()&&V instanceof $)W._setOnCancel(V)}else{if(W=new $(q),X=setTimeout(function(){W._fulfill()},+w),I.cancellation())W._setOnCancel(new J(X));W._captureStackTrace()}return W._setAsyncGuaranteed(),W};$.prototype.delay=function(w){return K(w,this)};var z=function(w,V,W){var X;if(typeof V!=="string")if(V instanceof Error)X=V;else X=new Y("operation timed out");else X=new Y(V);if(U.markAsOriginatingFromRejection(X),w._attachExtraTrace(X),w._reject(X),W!=null)W.cancel()};function G(w){return clearTimeout(this.handle),w}f Line truncated
See http://goo.gl/MqrFmX
@@ -161,16 +156,16 @@ See: https://github.com/isaacs/node-glob/issues/167`);if(!(this instanceof S4))r
`)));return}}N=N._target();var E=N._bitField;if((E&50397184)===0)this._yieldedPromise=N,N._proxy(this,null);else if((E&33554432)!==0)$._async.invoke(this._promiseFulfilled,this,N._value());else if((E&16777216)!==0)$._async.invoke(this._promiseRejected,this,N._reason());else this._promiseCancelled()}},$.coroutine=function(X,L){if(typeof X!=="function")throw new K(`generatorFunction must be a function
See http://goo.gl/MqrFmX
`);var D=Object(L).yieldHandler,N=W,E=Error().stack;return function(){var T=X.apply(this,arguments),P=new N(void 0,void 0,D,E),B=P.promise();return P._generator=T,P._promiseFulfilled(void 0),B}},$.coroutine.addYieldHandler=function(X){if(typeof X!=="function")throw new K("expecting a function but got "+z.classString(X));H.push(X)},$.spawn=function(X){if(J.deprecated("Promise.spawn()","Promise.coroutine()"),typeof X!=="function")return q(`generatorFunction must be a function
`);var D=Object(L).yieldHandler,N=W,E=Error().stack;return function(){var T=X.apply(this,arguments),P=new N(void 0,void 0,D,E),B=P.promise();return P._generator=T,P._promiseFulfilled(void 0),B}},$.coroutine.addYieldHandler=function(X){if(typeof X!=="function")throw new K("expecting a function but got "+z.classString(X));w.push(X)},$.spawn=function(X){if(J.deprecated("Promise.spawn()","Promise.coroutine()"),typeof X!=="function")return q(`generatorFunction must be a function
See http://goo.gl/MqrFmX
`);var L=new W(X,this),D=L.promise();return L._run($.spawn),D}}});var Zz0=O((Av1,Wz0)=>{Wz0.exports=function($){var q=n1(),I=$._async,U=q.tryCatch,Y=q.errorObj;function J(z,w){var G=this;if(!q.isArray(z))return Q.call(G,z,w);var H=U(w).apply(G._boundValue(),[null].concat(z));if(H===Y)I.throwLater(H.e)}function Q(z,w){var G=this,H=G._boundValue(),V=z===void 0?U(w).call(H,null):U(w).call(H,null,z);if(V===Y)I.throwLater(V.e)}function K(z,w){var G=this;if(!z){var H=Error(z+"");H.cause=z,z=H}var V=U(w).call(G._boundValue(),z);if(V===Y)I.throwLater(V.e)}$.prototype.asCallback=$.prototype.nodeify=function(z,w){if(typeof z=="function"){var G=Q;if(w!==void 0&&Object(w).spread)G=J;this._then(G,K,void 0,this,z)}return this}}});var Lz0=O((Pv1,Xz0)=>{Xz0.exports=function($,q){var I={},U=n1(),Y=MS(),J=U.withAppended,Q=U.maybeWrapAsError,K=U.canEvaluate,z=h5().TypeError,w="Async",G={__isPromisified__:!0},H=["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"],V=new RegExp("^(?:"+H.join("|")+")$"),W=function(n){return U.isIdentifier(n)&&n.charAt(0)!=="_"&&n!=="constructor"};function X(n){return!V.test(n)}function L(n){try{return n.__isPromisified__===!0}catch(b){return!1}}function D(n,b,J0){var g=U.getDataPropertyOrDefault(n,b+J0,G);return g?L(g):!1}function N(n,b,J0){for(var g=0;g<n.length;g+=2){var u=n[g];if(J0.test(u)){var d=u.replace(J0,"");for(var a=0;a<n.length;a+=2)if(n[a]===d)throw new z(`Cannot promisify an API that has normal methods with '%s'-suffix
`);var L=new W(X,this),D=L.promise();return L._run($.spawn),D}}});var u20=O((FR1,y20)=>{y20.exports=function($){var q=b1(),I=$._async,U=q.tryCatch,Y=q.errorObj;function J(z,G){var H=this;if(!q.isArray(z))return Q.call(H,z,G);var w=U(G).apply(H._boundValue(),[null].concat(z));if(w===Y)I.throwLater(w.e)}function Q(z,G){var H=this,w=H._boundValue(),V=z===void 0?U(G).call(w,null):U(G).call(w,null,z);if(V===Y)I.throwLater(V.e)}function K(z,G){var H=this;if(!z){var w=Error(z+"");w.cause=z,z=w}var V=U(G).call(H._boundValue(),z);if(V===Y)I.throwLater(V.e)}$.prototype.asCallback=$.prototype.nodeify=function(z,G){if(typeof z=="function"){var H=Q;if(G!==void 0&&Object(G).spread)H=J;this._then(H,K,void 0,this,z)}return this}}});var k20=O((MR1,x20)=>{x20.exports=function($,q){var I={},U=b1(),Y=Nh(),J=U.withAppended,Q=U.maybeWrapAsError,K=U.canEvaluate,z=v5().TypeError,G="Async",H={__isPromisified__:!0},w=["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"],V=new RegExp("^(?:"+w.join("|")+")$"),W=function(k){return U.isIdentifier(k)&&k.charAt(0)!=="_"&&k!=="constructor"};function X(k){return!V.test(k)}function L(k){try{return k.__isPromisified__===!0}catch(b){return!1}}function D(k,b,U0){var j=U.getDataPropertyOrDefault(k,b+U0,H);return j?L(j):!1}function N(k,b,U0){for(var j=0;j<k.length;j+=2){var x=k[j];if(U0.test(x)){var d=x.replace(U0,"");for(var t=0;t<k.length;t+=2)if(k[t]===d)throw new z(`Cannot promisify an API that has normal methods with '%s'-suffix
See http://goo.gl/MqrFmX
`.replace("%s",b))}}}function E(n,b,J0,g){var u=U.inheritedDataKeys(n),d=[];for(var a=0;a<u.length;++a){var K0=u[a],G0=n[K0],M0=g===W?!0:W(K0,G0,n);if(typeof G0==="function"&&!L(G0)&&!D(n,K0,b)&&g(K0,G0,n,M0))d.push(K0,G0)}return N(d,b,J0),d}var T=function(n){return n.replace(/([$])/,"\\$")},P,B=function(n){var b=[n],J0=Math.max(0,n-1-3);for(var g=n-1;g>=J0;--g)b.push(g);for(var g=n+1;g<=3;++g)b.push(g);return b},k=function(n){return U.filledRange(n,"_arg","")},h=function(n){return U.filledRange(Math.max(n,3),"_arg","")},f=function(n){if(typeof n.length==="number")return Math.max(Math.min(n.length,1024),0);return 0};P=function(n,b,J0,g,u,d){var a=Math.max(0,f(g)-1),K0=B(a),G0=typeof n==="string"||b===I;function M0(O1){var N1=k(O1).join(", "),J1=O1>0?", ":"",C1;if(G0)C1=`ret = callback.call(this, {{args}}, nodeback); break;
`;else C1=b===void 0?`ret = callback({{args}}, nodeback); break;
`.replace("%s",b))}}}function E(k,b,U0,j){var x=U.inheritedDataKeys(k),d=[];for(var t=0;t<x.length;++t){var Q0=x[t],H0=k[Q0],M0=j===W?!0:W(Q0,H0,k);if(typeof H0==="function"&&!L(H0)&&!D(k,Q0,b)&&j(Q0,H0,k,M0))d.push(Q0,H0)}return N(d,b,U0),d}var T=function(k){return k.replace(/([$])/,"\\$")},P,B=function(k){var b=[k],U0=Math.max(0,k-1-3);for(var j=k-1;j>=U0;--j)b.push(j);for(var j=k+1;j<=3;++j)b.push(j);return b},f=function(k){return U.filledRange(k,"_arg","")},S=function(k){return U.filledRange(Math.max(k,3),"_arg","")},n=function(k){if(typeof k.length==="number")return Math.max(Math.min(k.length,1024),0);return 0};P=function(k,b,U0,j,x,d){var t=Math.max(0,n(j)-1),Q0=B(t),H0=typeof k==="string"||b===I;function M0(z1){var O0=f(z1).join(", "),h0=z1>0?", ":"",d0;if(H0)d0=`ret = callback.call(this, {{args}}, nodeback); break;
`;else d0=b===void 0?`ret = callback({{args}}, nodeback); break;
`:`ret = callback.call(receiver, {{args}}, nodeback); break;
`;return C1.replace("{{args}}",N1).replace(", ",J1)}function v0(){var O1="";for(var N1=0;N1<K0.length;++N1)O1+="case "+K0[N1]+":"+M0(K0[N1]);return O1+=`
`;return d0.replace("{{args}}",O0).replace(", ",h0)}function j0(){var z1="";for(var O0=0;O0<Q0.length;++O0)z1+="case "+Q0[O0]+":"+M0(Q0[O0]);return z1+=`
default:
var args = new Array(len + 1);
var i = 0;
@@ -180,9 +175,9 @@ See: https://github.com/isaacs/node-glob/issues/167`);if(!(this instanceof S4))r
args[i] = nodeback;
[CodeForCall]
break;
`.replace("[CodeForCall]",G0?`ret = callback.apply(this, args);
`.replace("[CodeForCall]",H0?`ret = callback.apply(this, args);
`:`ret = callback.apply(receiver, args);
`),O1}var R1=typeof n==="string"?"this != null ? this['"+n+"'] : fn":"fn",l0=`'use strict';
`),z1}var X1=typeof k==="string"?"this != null ? this['"+k+"'] : fn":"fn",f0=`'use strict';
var ret = function (Parameters) {
'use strict';
var len = arguments.length;
@@ -202,25 +197,25 @@ See: https://github.com/isaacs/node-glob/issues/167`);if(!(this instanceof S4))r
};
notEnumerableProp(ret, '__isPromisified__', true);
return ret;
`.replace("[CodeForSwitchCase]",v0()).replace("[GetFunctionCode]",R1);return l0=l0.replace("Parameters",h(a)),Function("Promise","fn","receiver","withAppended","maybeWrapAsError","nodebackForPromise","tryCatch","errorObj","notEnumerableProp","INTERNAL",l0)($,g,b,J,Q,Y,U.tryCatch,U.errorObj,U.notEnumerableProp,q)};function S(n,b,J0,g,u,d){var a=function(){return this}(),K0=n;if(typeof K0==="string")n=g;function G0(){var M0=b;if(b===I)M0=this;var v0=new $(q);v0._captureStackTrace();var R1=typeof K0==="string"&&this!==a?this[K0]:n,l0=Y(v0,d);try{R1.apply(M0,J(arguments,l0))}catch(O1){v0._rejectCallback(Q(O1),!0,!0)}if(!v0._isFateSealed())v0._setAsyncGuaranteed();return v0}return U.notEnumerableProp(G0,"__isPromisified__",!0),G0}var t=K?P:S;function p(n,b,J0,g,u){var d=new RegExp(T(b)+"$"),a=E(n,b,d,J0);for(var K0=0,G0=a.length;K0<G0;K0+=2){var M0=a[K0],v0=a[K0+1],R1=M0+b;if(g===t)n[R1]=t(M0,I,M0,v0,b,u);else{var l0=g(v0,function(){return t(M0,I,M0,v0,b,u)});U.notEnumerableProp(l0,"__isPromisified__",!0),n[R1]=l0}}return U.toFastProperties(n),n}function C(n,b,J0){return t(n,b,void 0,n,null,J0)}$.promisify=function(n,b){if(typeof n!=="function")throw new z("expecting a function but got "+U.classString(n));if(L(n))return n;b=Object(b);var J0=b.context===void 0?I:b.context,g=!!b.multiArgs,u=C(n,J0,g);return U.copyDescriptors(n,u,X),u},$.promisifyAll=function(n,b){if(typeof n!=="function"&&typeof n!=="object")throw new z(`the target of promisifyAll must be an object or a function
`.replace("[CodeForSwitchCase]",j0()).replace("[GetFunctionCode]",X1);return f0=f0.replace("Parameters",S(t)),Function("Promise","fn","receiver","withAppended","maybeWrapAsError","nodebackForPromise","tryCatch","errorObj","notEnumerableProp","INTERNAL",f0)($,j,b,J,Q,Y,U.tryCatch,U.errorObj,U.notEnumerableProp,q)};function R(k,b,U0,j,x,d){var t=function(){return this}(),Q0=k;if(typeof Q0==="string")k=j;function H0(){var M0=b;if(b===I)M0=this;var j0=new $(q);j0._captureStackTrace();var X1=typeof Q0==="string"&&this!==t?this[Q0]:k,f0=Y(j0,d);try{X1.apply(M0,J(arguments,f0))}catch(z1){j0._rejectCallback(Q(z1),!0,!0)}if(!j0._isFateSealed())j0._setAsyncGuaranteed();return j0}return U.notEnumerableProp(H0,"__isPromisified__",!0),H0}var p=K?P:R;function i(k,b,U0,j,x){var d=new RegExp(T(b)+"$"),t=E(k,b,d,U0);for(var Q0=0,H0=t.length;Q0<H0;Q0+=2){var M0=t[Q0],j0=t[Q0+1],X1=M0+b;if(j===p)k[X1]=p(M0,I,M0,j0,b,x);else{var f0=j(j0,function(){return p(M0,I,M0,j0,b,x)});U.notEnumerableProp(f0,"__isPromisified__",!0),k[X1]=f0}}return U.toFastProperties(k),k}function C(k,b,U0){return p(k,b,void 0,k,null,U0)}$.promisify=function(k,b){if(typeof k!=="function")throw new z("expecting a function but got "+U.classString(k));if(L(k))return k;b=Object(b);var U0=b.context===void 0?I:b.context,j=!!b.multiArgs,x=C(k,U0,j);return U.copyDescriptors(k,x,X),x},$.promisifyAll=function(k,b){if(typeof k!=="function"&&typeof k!=="object")throw new z(`the target of promisifyAll must be an object or a function
See http://goo.gl/MqrFmX
`);b=Object(b);var J0=!!b.multiArgs,g=b.suffix;if(typeof g!=="string")g=w;var u=b.filter;if(typeof u!=="function")u=W;var d=b.promisifier;if(typeof d!=="function")d=t;if(!U.isIdentifier(g))throw RangeError(`suffix must be a valid identifier
`);b=Object(b);var U0=!!b.multiArgs,j=b.suffix;if(typeof j!=="string")j=G;var x=b.filter;if(typeof x!=="function")x=W;var d=b.promisifier;if(typeof d!=="function")d=p;if(!U.isIdentifier(j))throw RangeError(`suffix must be a valid identifier
See http://goo.gl/MqrFmX
`);var a=U.inheritedDataKeys(n);for(var K0=0;K0<a.length;++K0){var G0=n[a[K0]];if(a[K0]!=="constructor"&&U.isClass(G0))p(G0.prototype,g,u,d,J0),p(G0,g,u,d,J0)}return p(n,g,u,d,J0)}}});var Oz0=O((Tv1,Dz0)=>{Dz0.exports=function($,q,I,U){var Y=n1(),J=Y.isObject,Q=f3(),K;if(typeof Map==="function")K=Map;var z=function(){var V=0,W=0;function X(L,D){this[V]=L,this[V+W]=D,V++}return function(D){W=D.size,V=0;var N=Array(D.size*2);return D.forEach(X,N),N}}(),w=function(V){var W=new K,X=V.length/2|0;for(var L=0;L<X;++L){var D=V[X+L],N=V[L];W.set(D,N)}return W};function G(V){var W=!1,X;if(K!==void 0&&V instanceof K)X=z(V),W=!0;else{var L=Q.keys(V),D=L.length;X=Array(D*2);for(var N=0;N<D;++N){var E=L[N];X[N]=V[E],X[N+D]=E}}this.constructor$(X),this._isMap=W,this._init$(void 0,-3)}Y.inherits(G,q),G.prototype._init=function(){},G.prototype._promiseFulfilled=function(V,W){this._values[W]=V;var X=++this._totalResolved;if(X>=this._length){var L;if(this._isMap)L=w(this._values);else{L={};var D=this.length();for(var N=0,E=this.length();N<E;++N)L[this._values[N+D]]=this._values[N]}return this._resolve(L),!0}return!1},G.prototype.shouldCopyValues=function(){return!1},G.prototype.getActualLength=function(V){return V>>1};function H(V){var W,X=I(V);if(!J(X))return U(`cannot await properties of a non-object
`);var t=U.inheritedDataKeys(k);for(var Q0=0;Q0<t.length;++Q0){var H0=k[t[Q0]];if(t[Q0]!=="constructor"&&U.isClass(H0))i(H0.prototype,j,x,d,U0),i(H0,j,x,d,U0)}return i(k,j,x,d,U0)}}});var b20=O((AR1,f20)=>{f20.exports=function($,q,I,U){var Y=b1(),J=Y.isObject,Q=y3(),K;if(typeof Map==="function")K=Map;var z=function(){var V=0,W=0;function X(L,D){this[V]=L,this[V+W]=D,V++}return function(D){W=D.size,V=0;var N=Array(D.size*2);return D.forEach(X,N),N}}(),G=function(V){var W=new K,X=V.length/2|0;for(var L=0;L<X;++L){var D=V[X+L],N=V[L];W.set(D,N)}return W};function H(V){var W=!1,X;if(K!==void 0&&V instanceof K)X=z(V),W=!0;else{var L=Q.keys(V),D=L.length;X=Array(D*2);for(var N=0;N<D;++N){var E=L[N];X[N]=V[E],X[N+D]=E}}this.constructor$(X),this._isMap=W,this._init$(void 0,-3)}Y.inherits(H,q),H.prototype._init=function(){},H.prototype._promiseFulfilled=function(V,W){this._values[W]=V;var X=++this._totalResolved;if(X>=this._length){var L;if(this._isMap)L=G(this._values);else{L={};var D=this.length();for(var N=0,E=this.length();N<E;++N)L[this._values[N+D]]=this._values[N]}return this._resolve(L),!0}return!1},H.prototype.shouldCopyValues=function(){return!1},H.prototype.getActualLength=function(V){return V>>1};function w(V){var W,X=I(V);if(!J(X))return U(`cannot await properties of a non-object
See http://goo.gl/MqrFmX
`);else if(X instanceof $)W=X._then($.props,void 0,void 0,void 0,void 0);else W=new G(X).promise();if(X instanceof $)W._propagateFrom(X,2);return W}$.prototype.props=function(){return H(this)},$.props=function(V){return H(V)}}});var Fz0=O((Ev1,Nz0)=>{Nz0.exports=function($,q,I,U){var Y=n1(),J=function(K){return K.then(function(z){return Q(z,K)})};function Q(K,z){var w=I(K);if(w instanceof $)return J(w);else if(K=Y.asArray(K),K===null)return U("expecting an array or an iterable object but got "+Y.classString(K));var G=new $(q);if(z!==void 0)G._propagateFrom(z,3);var{_fulfill:H,_reject:V}=G;for(var W=0,X=K.length;W<X;++W){var L=K[W];if(L===void 0&&!(W in K))continue;$.cast(L)._then(H,V,void 0,G,null)}return G}$.race=function(K){return Q(K,void 0)},$.prototype.race=function(){return Q(this,void 0)}}});var Az0=O((gv1,Mz0)=>{Mz0.exports=function($,q,I,U,Y,J){var Q=$._getDomain,K=n1(),z=K.tryCatch;function w(X,L,D,N){this.constructor$(X);var E=Q();if(this._fn=E===null?L:K.domainBind(E,L),D!==void 0)D=$.resolve(D),D._attachCancellationCallback(this);if(this._initialValue=D,this._currentCancellable=null,N===Y)this._eachValues=Array(this._length);else if(N===0)this._eachValues=null;else this._eachValues=void 0;this._promise._captureStackTrace(),this._init$(void 0,-5)}K.inherits(w,q),w.prototype._gotAccum=function(X){if(this._eachValues!==void 0&&this._eachValues!==null&&X!==Y)this._eachValues.push(X)},w.prototype._eachComplete=function(X){if(this._eachValues!==null)this._eachValues.push(X);return this._eachValues},w.prototype._init=function(){},w.prototype._resolveEmptyArray=function(){this._resolve(this._eachValues!==void 0?this._eachValues:this._initialValue)},w.prototype.shouldCopyValues=function(){return!1},w.prototype._resolve=function(X){this._promise._resolveCallback(X),this._values=null},w.prototype._resultCancelled=function(X){if(X===this._initialValue)return this._cancel();if(this._isResolved())return;if(this._resultCancelled$(),this._currentCancellable instanceof $)this._currentCancellable.cancel();if(this._initialValue instanceof $)this._initialValue.cancel()},w.prototype._iterate=function(X){this._values=X;var L,D,N=X.length;if(this._initialValue!==void 0)L=this._initialValue,D=0;else L=$.resolve(X[0]),D=1;if(this._currentCancellable=L,!L.isRejected())for(;D<N;++D){var E={accum:null,value:X[D],index:D,length:N,array:this};L=L._then(V,void 0,void 0,E,void 0)}if(this._eachValues!==void 0)L=L._then(this._eachComplete,void 0,void 0,this,void 0);L._then(G,G,void 0,L,this)},$.prototype.reduce=function(X,L){return H(this,X,L,null)},$.reduce=function(X,L,D,N){return H(X,L,D,N)};function G(X,L){if(this.isFulfilled())L._resolve(X);else L._reject(X)}function H(X,L,D,N){if(typeof L!=="function")return I("expecting a function but got "+K.classString(L));var E=new w(X,L,D,N);return E.promise()}function V(X){this.accum=X,this.array._gotAccum(X);var L=U(this.value,this.array._promise);if(L instanceof $)return this.array._currentCancellable=L,L._then(W,void 0,void 0,this,void 0);else return W.call(this,L)}function W(X){var L=this.array,D=L._promise,N=z(L._fn);D._pushContext();var E;if(L._eachValues!==void 0)E=N.call(D._boundValue(),X,this.index,this.length);else E=N.call(D._boundValue(),this.accum,X,this.index,this.length);if(E instanceof $)L._currentCancellable=E;var T=D._popContext();return J.checkForgottenReturns(E,T,L._eachValues!==void 0?"Promise.each":"Promise.reduce",D),E}}});var Tz0=O((jv1,Pz0)=>{Pz0.exports=function($,q,I){var U=$.PromiseInspection,Y=n1();function J(Q){this.constructor$(Q)}Y.inherits(J,q),J.prototype._promiseResolved=function(Q,K){this._values[Q]=K;var z=++this._totalResolved;if(z>=this._length)return this._resolve(this._values),!0;return!1},J.prototype._promiseFulfilled=function(Q,K){var z=new U;return z._bitField=33554432,z._settledValueField=Q,this._promiseResolved(K,z)},J.prototype._promiseRejected=function(Q,K){var z=new U;return z._bitField=16777216,z._settledValueField=Q,this._promiseResolved(K,z)},$.settle=function(Q){return I.deprecated(".settle()",".reflect()"),new J(Q).promise()},$.prototype.settle=function(){return $.settle(this)}}});var gz0=O((Bv1,Ez0)=>{Ez0.exports=function($,q,I){var U=n1(),Y=h5().RangeError,J=h5().AggregateError,Q=U.isArray,K={};function z(G){this.constructor$(G),this._howMany=0,this._unwrap=!1,this._initialized=!1}U.inherits(z,q),z.prototype._init=function(){if(!this._initialized)return;if(this._howMany===0){this._resolve([]);return}this._init$(void 0,-5);var G=Q(this._values);if(!this._isResolved()&&G&&this._howMany>this._canPossiblyFulfill())this._reject(this._getRangeError(this.length()))},z.prototype.init=function(){this._initialized=!0,this._init()},z.prototype.setUnwrap=function(){this._unwrap=!0},z.prototype.howMany=function(){return this._howMany},z.prototype.setHowMany=function(G){this._howMany=G},z.prototype._promiseFulfilled=function(G){if(this._addFulfilled(G),this._fulfilled()===this.howMany()){if(this._values.length=this.howMany(),this.howMany()= Line truncated
`);else if(X instanceof $)W=X._then($.props,void 0,void 0,void 0,void 0);else W=new H(X).promise();if(X instanceof $)W._propagateFrom(X,2);return W}$.prototype.props=function(){return w(this)},$.props=function(V){return w(V)}}});var i20=O((PR1,n20)=>{n20.exports=function($,q,I,U){var Y=b1(),J=function(K){return K.then(function(z){return Q(z,K)})};function Q(K,z){var G=I(K);if(G instanceof $)return J(G);else if(K=Y.asArray(K),K===null)return U("expecting an array or an iterable object but got "+Y.classString(K));var H=new $(q);if(z!==void 0)H._propagateFrom(z,3);var{_fulfill:w,_reject:V}=H;for(var W=0,X=K.length;W<X;++W){var L=K[W];if(L===void 0&&!(W in K))continue;$.cast(L)._then(w,V,void 0,H,null)}return H}$.race=function(K){return Q(K,void 0)},$.prototype.race=function(){return Q(this,void 0)}}});var c20=O((TR1,p20)=>{p20.exports=function($,q,I,U,Y,J){var Q=$._getDomain,K=b1(),z=K.tryCatch;function G(X,L,D,N){this.constructor$(X);var E=Q();if(this._fn=E===null?L:K.domainBind(E,L),D!==void 0)D=$.resolve(D),D._attachCancellationCallback(this);if(this._initialValue=D,this._currentCancellable=null,N===Y)this._eachValues=Array(this._length);else if(N===0)this._eachValues=null;else this._eachValues=void 0;this._promise._captureStackTrace(),this._init$(void 0,-5)}K.inherits(G,q),G.prototype._gotAccum=function(X){if(this._eachValues!==void 0&&this._eachValues!==null&&X!==Y)this._eachValues.push(X)},G.prototype._eachComplete=function(X){if(this._eachValues!==null)this._eachValues.push(X);return this._eachValues},G.prototype._init=function(){},G.prototype._resolveEmptyArray=function(){this._resolve(this._eachValues!==void 0?this._eachValues:this._initialValue)},G.prototype.shouldCopyValues=function(){return!1},G.prototype._resolve=function(X){this._promise._resolveCallback(X),this._values=null},G.prototype._resultCancelled=function(X){if(X===this._initialValue)return this._cancel();if(this._isResolved())return;if(this._resultCancelled$(),this._currentCancellable instanceof $)this._currentCancellable.cancel();if(this._initialValue instanceof $)this._initialValue.cancel()},G.prototype._iterate=function(X){this._values=X;var L,D,N=X.length;if(this._initialValue!==void 0)L=this._initialValue,D=0;else L=$.resolve(X[0]),D=1;if(this._currentCancellable=L,!L.isRejected())for(;D<N;++D){var E={accum:null,value:X[D],index:D,length:N,array:this};L=L._then(V,void 0,void 0,E,void 0)}if(this._eachValues!==void 0)L=L._then(this._eachComplete,void 0,void 0,this,void 0);L._then(H,H,void 0,L,this)},$.prototype.reduce=function(X,L){return w(this,X,L,null)},$.reduce=function(X,L,D,N){return w(X,L,D,N)};function H(X,L){if(this.isFulfilled())L._resolve(X);else L._reject(X)}function w(X,L,D,N){if(typeof L!=="function")return I("expecting a function but got "+K.classString(L));var E=new G(X,L,D,N);return E.promise()}function V(X){this.accum=X,this.array._gotAccum(X);var L=U(this.value,this.array._promise);if(L instanceof $)return this.array._currentCancellable=L,L._then(W,void 0,void 0,this,void 0);else return W.call(this,L)}function W(X){var L=this.array,D=L._promise,N=z(L._fn);D._pushContext();var E;if(L._eachValues!==void 0)E=N.call(D._boundValue(),X,this.index,this.length);else E=N.call(D._boundValue(),this.accum,X,this.index,this.length);if(E instanceof $)L._currentCancellable=E;var T=D._popContext();return J.checkForgottenReturns(E,T,L._eachValues!==void 0?"Promise.each":"Promise.reduce",D),E}}});var m20=O((ER1,d20)=>{d20.exports=function($,q,I){var U=$.PromiseInspection,Y=b1();function J(Q){this.constructor$(Q)}Y.inherits(J,q),J.prototype._promiseResolved=function(Q,K){this._values[Q]=K;var z=++this._totalResolved;if(z>=this._length)return this._resolve(this._values),!0;return!1},J.prototype._promiseFulfilled=function(Q,K){var z=new U;return z._bitField=33554432,z._settledValueField=Q,this._promiseResolved(K,z)},J.prototype._promiseRejected=function(Q,K){var z=new U;return z._bitField=16777216,z._settledValueField=Q,this._promiseResolved(K,z)},$.settle=function(Q){return I.deprecated(".settle()",".reflect()"),new J(Q).promise()},$.prototype.settle=function(){return $.settle(this)}}});var o20=O((jR1,l20)=>{l20.exports=function($,q,I){var U=b1(),Y=v5().RangeError,J=v5().AggregateError,Q=U.isArray,K={};function z(H){this.constructor$(H),this._howMany=0,this._unwrap=!1,this._initialized=!1}U.inherits(z,q),z.prototype._init=function(){if(!this._initialized)return;if(this._howMany===0){this._resolve([]);return}this._init$(void 0,-5);var H=Q(this._values);if(!this._isResolved()&&H&&this._howMany>this._canPossiblyFulfill())this._reject(this._getRangeError(this.length()))},z.prototype.init=function(){this._initialized=!0,this._init()},z.prototype.setUnwrap=function(){this._unwrap=!0},z.prototype.howMany=function(){return this._howMany},z.prototype.setHowMany=function(H){this._howMany=H},z.prototype._promiseFulfilled=function(H){if(this._addFulfilled(H),this._fulfilled()===this.howMany()){if(this._values.length=this.howMany(),this.howMany()= Line truncated
See http://goo.gl/MqrFmX
`);var V=new z(G),W=V.promise();return V.setHowMany(H),V.init(),W}$.some=function(G,H){return w(G,H)},$.prototype.some=function(G){return w(this,G)},$._SomePromiseArray=z}});var Bz0=O((Rv1,jz0)=>{jz0.exports=function($,q){var I=$.map;$.prototype.filter=function(U,Y){return I(this,U,Y,q)},$.filter=function(U,Y,J){return I(U,Y,J,q)}}});var vz0=O((vv1,Rz0)=>{Rz0.exports=function($,q){var{reduce:I,all:U}=$;function Y(){return U(this)}function J(Q,K){return I(Q,K,q,q)}$.prototype.each=function(Q){return I(this,Q,q,0)._then(Y,void 0,void 0,this,void 0)},$.prototype.mapSeries=function(Q){return I(this,Q,q,q)},$.each=function(Q,K){return I(Q,K,q,0)._then(Y,void 0,void 0,Q,void 0)},$.mapSeries=J}});var _z0=O((Cv1,Cz0)=>{Cz0.exports=function($){var q=$._SomePromiseArray;function I(U){var Y=new q(U),J=Y.promise();return Y.setHowMany(1),Y.setUnwrap(),Y.init(),J}$.any=function(U){return I(U)},$.prototype.any=function(){return I(this)}}});var hz0=O((_v1,PS)=>{PS.exports=function(){var $=function(){return new H(`circular promise resolution chain
`);var V=new z(H),W=V.promise();return V.setHowMany(w),V.init(),W}$.some=function(H,w){return G(H,w)},$.prototype.some=function(H){return G(this,H)},$._SomePromiseArray=z}});var t20=O((gR1,r20)=>{r20.exports=function($,q){var I=$.map;$.prototype.filter=function(U,Y){return I(this,U,Y,q)},$.filter=function(U,Y,J){return I(U,Y,J,q)}}});var s20=O((BR1,a20)=>{a20.exports=function($,q){var{reduce:I,all:U}=$;function Y(){return U(this)}function J(Q,K){return I(Q,K,q,q)}$.prototype.each=function(Q){return I(this,Q,q,0)._then(Y,void 0,void 0,this,void 0)},$.prototype.mapSeries=function(Q){return I(this,Q,q,q)},$.each=function(Q,K){return I(Q,K,q,0)._then(Y,void 0,void 0,Q,void 0)},$.mapSeries=J}});var $K0=O((RR1,e20)=>{e20.exports=function($){var q=$._SomePromiseArray;function I(U){var Y=new q(U),J=Y.promise();return Y.setHowMany(1),Y.setUnwrap(),Y.init(),J}$.any=function(U){return I(U)},$.prototype.any=function(){return I(this)}}});var qK0=O((vR1,Mh)=>{Mh.exports=function(){var $=function(){return new w(`circular promise resolution chain
See http://goo.gl/MqrFmX
`)},q=function(){return new C.PromiseInspection(this._target())},I=function(g){return C.reject(new H(g))};function U(){}var Y={},J=n1(),Q;if(J.isNode)Q=function(){var g=process.domain;if(g===void 0)g=null;return g};else Q=function(){return null};J.notEnumerableProp(C,"_getDomain",Q);var K=f3(),z=gK0(),w=new z;K.defineProperty(C,"_async",{value:w});var G=h5(),H=C.TypeError=G.TypeError;C.RangeError=G.RangeError;var V=C.CancellationError=G.CancellationError;C.TimeoutError=G.TimeoutError,C.OperationalError=G.OperationalError,C.RejectionError=G.OperationalError,C.AggregateError=G.AggregateError;var W=function(){},X={},L={},D=CK0()(C,W),N=hK0()(C,W,D,I,U),E=yK0()(C),T=E.create,P=xK0()(C,E),B=P.CapturedTrace,k=fK0()(C,D),h=bK0()(L),f=MS(),S=J.errorObj,t=J.tryCatch;function p(g,u){if(typeof u!=="function")throw new H("expecting a function but got "+J.classString(u));if(g.constructor!==C)throw new H(`the promise constructor cannot be invoked directly
`)},q=function(){return new C.PromiseInspection(this._target())},I=function(j){return C.reject(new w(j))};function U(){}var Y={},J=b1(),Q;if(J.isNode)Q=function(){var j=process.domain;if(j===void 0)j=null;return j};else Q=function(){return null};J.notEnumerableProp(C,"_getDomain",Q);var K=y3(),z=oQ0(),G=new z;K.defineProperty(C,"_async",{value:G});var H=v5(),w=C.TypeError=H.TypeError;C.RangeError=H.RangeError;var V=C.CancellationError=H.CancellationError;C.TimeoutError=H.TimeoutError,C.OperationalError=H.OperationalError,C.RejectionError=H.OperationalError,C.AggregateError=H.AggregateError;var W=function(){},X={},L={},D=eQ0()(C,W),N=q20()(C,W,D,I,U),E=U20()(C),T=E.create,P=J20()(C,E),B=P.CapturedTrace,f=K20()(C,D),S=G20()(L),n=Nh(),R=J.errorObj,p=J.tryCatch;function i(j,x){if(typeof x!=="function")throw new w("expecting a function but got "+J.classString(x));if(j.constructor!==C)throw new w(`the promise constructor cannot be invoked directly
See http://goo.gl/MqrFmX
`)}function C(g){if(this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,g!==W)p(this,g),this._resolveFromExecutor(g);this._promiseCreated(),this._fireEvent("promiseCreated",this)}C.prototype.toString=function(){return"[object Promise]"},C.prototype.caught=C.prototype.catch=function(g){var u=arguments.length;if(u>1){var d=Array(u-1),a=0,K0;for(K0=0;K0<u-1;++K0){var G0=arguments[K0];if(J.isObject(G0))d[a++]=G0;else return I("expecting an object but got A catch statement predicate "+J.classString(G0))}return d.length=a,g=arguments[K0],this.then(void 0,h(d,g,this))}return this.then(void 0,g)},C.prototype.reflect=function(){return this._then(q,q,void 0,this,void 0)},C.prototype.then=function(g,u){if(P.warnings()&&arguments.length>0&&typeof g!=="function"&&typeof u!=="function"){var d=".then() only accepts functions but was passed: "+J.classString(g);if(arguments.length>1)d+=", "+J.classString(u);this._warn(d)}return this._then(g,u,void 0,void 0,void 0)},C.prototype.done=function(g,u){var d=this._then(g,u,void 0,void 0,void 0);d._setIsFinal()},C.prototype.spread=function(g){if(typeof g!=="function")return I("expecting a function but got "+J.classString(g));return this.all()._then(g,void 0,void 0,X,void 0)},C.prototype.toJSON=function(){var g={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};if(this.isFulfilled())g.fulfillmentValue=this.value(),g.isFulfilled=!0;else if(this.isRejected())g.rejectionReason=this.reason(),g.isRejected=!0;return g},C.prototype.all=function(){if(arguments.length>0)this._warn(".all() was passed arguments but it does not take any");return new N(this).promise()},C.prototype.error=function(g){return this.caught(J.originatesFromRejection,g)},C.getNewLibraryCopy=PS.exports,C.is=function(g){return g instanceof C},C.fromNode=C.fromCallback=function(g){var u=new C(W);u._captureStackTrace();var d=arguments.length>1?!!Object(arguments[1]).multiArgs:!1,a=t(g)(f(u,d));if(a===S)u._rejectCallback(a.e,!0);if(!u._isFateSealed())u._setAsyncGuaranteed();return u},C.all=function(g){return new N(g).promise()},C.cast=function(g){var u=D(g);if(!(u instanceof C))u=new C(W),u._captureStackTrace(),u._setFulfilled(),u._rejectionHandler0=g;return u},C.resolve=C.fulfilled=C.cast,C.reject=C.rejected=function(g){var u=new C(W);return u._captureStackTrace(),u._rejectCallback(g,!0),u},C.setScheduler=function(g){if(typeof g!=="function")throw new H("expecting a function but got "+J.classString(g));return w.setScheduler(g)},C.prototype._then=function(g,u,d,a,K0){var G0=K0!==void 0,M0=G0?K0:new C(W),v0=this._target(),R1=v0._bitField;if(!G0){if(M0._propagateFrom(this,3),M0._captureStackTrace(),a===void 0&&(this._bitField&2097152)!==0)if((R1&50397184)!==0)a=this._boundValue();else a=v0===this?void 0:this._boundTo;this._fireEvent("promiseChained",this,M0)}var l0=Q();if((R1&50397184)!==0){var O1,N1,J1=v0._settlePromiseCtx;if((R1&33554432)!==0)N1=v0._rejectionHandler0,O1=g;else if((R1&16777216)!==0)N1=v0._fulfillmentHandler0,O1=u,v0._unsetRejectionIsUnhandled();else J1=v0._settlePromiseLateCancellationObserver,N1=new V("late cancellation observer"),v0._attachExtraTrace(N1),O1=u;w.invoke(J1,v0,{handler:l0===null?O1:typeof O1==="function"&&J.domainBind(l0,O1),promise:M0,receiver:a,value:N1})}else v0._addCallbacks(g,u,M0,a,l0);return M0},C.prototype._length=function(){return this._bitField&65535},C.prototype._isFateSealed=function(){return(this._bitField&117506048)!==0},C.prototype._isFollowing=function(){return(this._bitField&67108864)===67108864},C.prototype._setLength=function(g){this._bitField=this._bitField&-65536|g&65535},C.prototype._setFulfilled=function(){this._bitField=this._bitField|33554432,this._fireEvent("promiseFulfilled",this)},C.prototype._setRejected=function(){this._bitField=this._bitField|16777216,this._fireEvent("promiseRejected",this)},C.prototype._setFollowing=function(){this._bitField=this._bitField|67108864,this._fireEvent("promiseResolved",this)},C.prototype._setIsFinal=function(){this._bitField=this._bitField|4194304},C.prototype._isFinal=function(){return(this._bitField&4194304)>0},C.prototype._unsetCancelled=function(){this._bitField=this._bitField&-65537},C.prototype._setCancelled=function(){this._bitField=this._bitField|65536,this._fireEvent("promiseCancelled",this)},C.prototype._setWillBeCancelled=function(){this._bitField=this._bitField|8388608},C.prototype._setAsyncGuaranteed=function(){if(w.hasCustomScheduler())return;this._bitField=this._bitField|134217728},C.prototype._receiverAt=function(g){var u=g===0?this._receiver0:this[g*4-4+3];if(u===Y)return;else if(u===void 0&&this._isBound())return this._boundValue();return u},C.prototype._promiseAt=function(g){return this[g*4-4+2]},C.prototype._fulfillmentHandlerAt=function(g){return this[g*4-4+0]},C.prototype._rejectionHandlerAt=function(g){return this[g*4-4+1]},C.prototype._boundValue=function(){},C.prototype._migrateCallback0=function(g){var{_bit Line truncated
`)}function C(j){if(this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,j!==W)i(this,j),this._resolveFromExecutor(j);this._promiseCreated(),this._fireEvent("promiseCreated",this)}C.prototype.toString=function(){return"[object Promise]"},C.prototype.caught=C.prototype.catch=function(j){var x=arguments.length;if(x>1){var d=Array(x-1),t=0,Q0;for(Q0=0;Q0<x-1;++Q0){var H0=arguments[Q0];if(J.isObject(H0))d[t++]=H0;else return I("expecting an object but got A catch statement predicate "+J.classString(H0))}return d.length=t,j=arguments[Q0],this.then(void 0,S(d,j,this))}return this.then(void 0,j)},C.prototype.reflect=function(){return this._then(q,q,void 0,this,void 0)},C.prototype.then=function(j,x){if(P.warnings()&&arguments.length>0&&typeof j!=="function"&&typeof x!=="function"){var d=".then() only accepts functions but was passed: "+J.classString(j);if(arguments.length>1)d+=", "+J.classString(x);this._warn(d)}return this._then(j,x,void 0,void 0,void 0)},C.prototype.done=function(j,x){var d=this._then(j,x,void 0,void 0,void 0);d._setIsFinal()},C.prototype.spread=function(j){if(typeof j!=="function")return I("expecting a function but got "+J.classString(j));return this.all()._then(j,void 0,void 0,X,void 0)},C.prototype.toJSON=function(){var j={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};if(this.isFulfilled())j.fulfillmentValue=this.value(),j.isFulfilled=!0;else if(this.isRejected())j.rejectionReason=this.reason(),j.isRejected=!0;return j},C.prototype.all=function(){if(arguments.length>0)this._warn(".all() was passed arguments but it does not take any");return new N(this).promise()},C.prototype.error=function(j){return this.caught(J.originatesFromRejection,j)},C.getNewLibraryCopy=Mh.exports,C.is=function(j){return j instanceof C},C.fromNode=C.fromCallback=function(j){var x=new C(W);x._captureStackTrace();var d=arguments.length>1?!!Object(arguments[1]).multiArgs:!1,t=p(j)(n(x,d));if(t===R)x._rejectCallback(t.e,!0);if(!x._isFateSealed())x._setAsyncGuaranteed();return x},C.all=function(j){return new N(j).promise()},C.cast=function(j){var x=D(j);if(!(x instanceof C))x=new C(W),x._captureStackTrace(),x._setFulfilled(),x._rejectionHandler0=j;return x},C.resolve=C.fulfilled=C.cast,C.reject=C.rejected=function(j){var x=new C(W);return x._captureStackTrace(),x._rejectCallback(j,!0),x},C.setScheduler=function(j){if(typeof j!=="function")throw new w("expecting a function but got "+J.classString(j));return G.setScheduler(j)},C.prototype._then=function(j,x,d,t,Q0){var H0=Q0!==void 0,M0=H0?Q0:new C(W),j0=this._target(),X1=j0._bitField;if(!H0){if(M0._propagateFrom(this,3),M0._captureStackTrace(),t===void 0&&(this._bitField&2097152)!==0)if((X1&50397184)!==0)t=this._boundValue();else t=j0===this?void 0:this._boundTo;this._fireEvent("promiseChained",this,M0)}var f0=Q();if((X1&50397184)!==0){var z1,O0,h0=j0._settlePromiseCtx;if((X1&33554432)!==0)O0=j0._rejectionHandler0,z1=j;else if((X1&16777216)!==0)O0=j0._fulfillmentHandler0,z1=x,j0._unsetRejectionIsUnhandled();else h0=j0._settlePromiseLateCancellationObserver,O0=new V("late cancellation observer"),j0._attachExtraTrace(O0),z1=x;G.invoke(h0,j0,{handler:f0===null?z1:typeof z1==="function"&&J.domainBind(f0,z1),promise:M0,receiver:t,value:O0})}else j0._addCallbacks(j,x,M0,t,f0);return M0},C.prototype._length=function(){return this._bitField&65535},C.prototype._isFateSealed=function(){return(this._bitField&117506048)!==0},C.prototype._isFollowing=function(){return(this._bitField&67108864)===67108864},C.prototype._setLength=function(j){this._bitField=this._bitField&-65536|j&65535},C.prototype._setFulfilled=function(){this._bitField=this._bitField|33554432,this._fireEvent("promiseFulfilled",this)},C.prototype._setRejected=function(){this._bitField=this._bitField|16777216,this._fireEvent("promiseRejected",this)},C.prototype._setFollowing=function(){this._bitField=this._bitField|67108864,this._fireEvent("promiseResolved",this)},C.prototype._setIsFinal=function(){this._bitField=this._bitField|4194304},C.prototype._isFinal=function(){return(this._bitField&4194304)>0},C.prototype._unsetCancelled=function(){this._bitField=this._bitField&-65537},C.prototype._setCancelled=function(){this._bitField=this._bitField|65536,this._fireEvent("promiseCancelled",this)},C.prototype._setWillBeCancelled=function(){this._bitField=this._bitField|8388608},C.prototype._setAsyncGuaranteed=function(){if(G.hasCustomScheduler())return;this._bitField=this._bitField|134217728},C.prototype._receiverAt=function(j){var x=j===0?this._receiver0:this[j*4-4+3];if(x===Y)return;else if(x===void 0&&this._isBound())return this._boundValue();return x},C.prototype._promiseAt=function(j){return this[j*4-4+2]},C.prototype._fulfillmentHandlerAt=function(j){return this[j*4-4+0]},C.prototype._rejectionHandlerAt=function(j){return this[j*4-4+1]},C.prototype._boundValue=function(){},C.prototype._migrateCallback0=function(j){var{_bit Line truncated
path = %s
syscall = %s
fstream_type = %s
@@ -230,21 +225,26 @@ fstream_class = %s
fstream_stack =
%s
`,q||"UNKNOWN",U.stack,U.path,U.syscall,U.fstream_type,U.fstream_path,U.fstream_unc_path,U.fstream_class,U.fstream_stack.join(`
`));else I.emit("warn",U)};Q7.prototype.info=function($,q){this.emit("info",$,q)};Q7.prototype.error=function($,q,I){var U=VG0($,q,this);if(I)throw U;else this.emit("error",U)};function VG0($,q,I){if(!($ instanceof Error))$=Error($);if($.code=$.code||q,$.path=$.path||I.path,$.fstream_type=$.fstream_type||I.type,$.fstream_path=$.fstream_path||I.path,I._path!==I.path)$.fstream_unc_path=$.fstream_unc_path||I._path;if(I.linkpath)$.fstream_linkpath=$.fstream_linkpath||I.linkpath;return $.fstream_class=$.fstream_class||I.constructor.name,$.fstream_stack=$.fstream_stack||Error().stack.split(/\n/).slice(3).map(function(U){return U.replace(/^ {4}at /,"")}),$}});var pK=O((zC1,ZG0)=>{ZG0.exports=MQ1;function MQ1($){var q=["Directory","File","SymbolicLink","Link","BlockDevice","CharacterDevice","FIFO","Socket"],I;if($.type&&q.indexOf($.type)!==-1)return $[$.type]=!0,$.type;for(var U=0,Y=q.length;U<Y;U++){I=q[U];var J=$[I]||$["is"+I];if(typeof J==="function")J=J.call($);if(J)return $[I]=!0,$.type=I,I}return null}});var wy=O((wC1,XG0)=>{XG0.exports=cK;var AQ1=o6(),PQ1=n0(),zy=o3();PQ1(cK,zy);function cK($){var q=this;if(!(q instanceof cK))throw Error("LinkReader must be called as constructor.");if(!($.type==="Link"&&$.Link||$.type==="SymbolicLink"&&$.SymbolicLink))throw Error("Non-link type "+$.type);zy.call(q,$)}cK.prototype._stat=function($){var q=this;AQ1.readlink(q._path,function(I,U){if(I)return q.error(I);q.linkpath=q.props.linkpath=U,q.emit("linkpath",U),zy.prototype._stat.call(q,$)})};cK.prototype._read=function(){var $=this;if($._paused)return;if(!$._ended)$.emit("end"),$.emit("close"),$._ended=!0}});var Hy=O((GC1,OG0)=>{OG0.exports=b8;var DG0=o6(),TQ1=n0(),dK=o("path"),Gy=o3(),LG0=o("assert").ok;TQ1(b8,Gy);function b8($){var q=this;if(!(q instanceof b8))throw Error("DirReader must be called as constructor.");if($.type!=="Directory"||!$.Directory)throw Error("Non-directory type "+$.type);if(q.entries=null,q._index=-1,q._paused=!1,q._length=-1,$.sort)this.sort=$.sort;Gy.call(this,$)}b8.prototype._getEntries=function(){var $=this;if($._gotEntries)return;$._gotEntries=!0,DG0.readdir($._path,function(q,I){if(q)return $.error(q);if($.entries=I,$.emit("entries",I),$._paused)$.once("resume",U);else U();function U(){if($._length=$.entries.length,typeof $.sort==="function")$.entries=$.entries.sort($.sort.bind($));$._read()}})};b8.prototype._read=function(){var $=this;if(!$.entries)return $._getEntries();if($._paused||$._currentEntry||$._aborted)return;if($._index++,$._index>=$.entries.length){if(!$._ended)$._ended=!0,$.emit("end"),$.emit("close");return}var q=dK.resolve($._path,$.entries[$._index]);LG0(q!==$._path),LG0($.entries[$._index]),$._currentEntry=q,DG0[$.props.follow?"stat":"lstat"](q,function(I,U){if(I)return $.error(I);var Y=$._proxy||$;U.path=q,U.basename=dK.basename(q),U.dirname=dK.dirname(q);var J=$.getChildProps.call(Y,U);J.path=q,J.basename=dK.basename(q),J.dirname=dK.dirname(q);var Q=Gy(J,U);$._currentEntry=Q,Q.on("pause",function(w){if(!$._paused&&!Q._disowned)$.pause(w)}),Q.on("resume",function(w){if($._paused&&!Q._disowned)$.resume(w)}),Q.on("stat",function(w){if($.emit("_entryStat",Q,w),Q._aborted)return;if(Q._paused)Q.once("resume",function(){$.emit("entryStat",Q,w)});else $.emit("entryStat",Q,w)}),Q.on("ready",function w(){if($._paused)return Q.pause($),$.once("resume",w);if(Q.type==="Socket")$.emit("socket",Q);else $.emitEntry(Q)});var K=!1;Q.on("close",z),Q.on("disown",z);function z(){if(K)return;if(K=!0,$.emit("childEnd",Q),$.emit("entryEnd",Q),$._currentEntry=null,!$._paused)$._read()}Q.on("error",function(w){if(Q._swallowErrors)$.warn(w),Q.emit("end"),Q.emit("close");else $.emit("error",w)}),["child","childEnd","warn"].forEach(function(w){Q.on(w,$.emit.bind($,w))})})};b8.prototype.disown=function($){if($.emit("beforeDisown"),$._disowned=!0,$.parent=$.root=null,$===this._currentEntry)this._currentEntry=null;$.emit("disown")};b8.prototype.getChildProps=function(){return{depth:this.depth+1,root:this.root||this,parent:this,follow:this.follow,filter:this.filter,sort:this.props.sort,hardlinks:this.props.hardlinks}};b8.prototype.pause=function($){var q=this;if(q._paused)return;if($=$||q,q._paused=!0,q._currentEntry&&q._currentEntry.pause)q._currentEntry.pause($);q.emit("pause",$)};b8.prototype.resume=function($){var q=this;if(!q._paused)return;if($=$||q,q._paused=!1,q.emit("resume",$),q._paused)return;if(q._currentEntry){if(q._currentEntry.resume)q._currentEntry.resume($)}else q._read()};b8.prototype.emitEntry=function($){this.emit("entry",$),this.emit("child",$)}});var Vy=O((HC1,AG0)=>{AG0.exports=r3;var EQ1=o6(),gQ1=n0(),NG0=o3(),FG0={EOF:!0},MG0={CLOSE:!0};gQ1(r3,NG0);function r3($){var q=this;if(!(q instanceof r3))throw Error("FileReader must be called as constructor.");if(!($.type==="Link"&&$.Link||$.type==="File"&&$.File))throw Error("Non-file type "+$.type);q._buffer=[],q._bytesEmitted=0,NG0.call(q,$)}r3.prototype._getStream=function(){var $=this,q=$._stream=EQ1.createReadStream($._path,$.pro Line truncated
`));else I.emit("warn",U)};Y7.prototype.info=function($,q){this.emit("info",$,q)};Y7.prototype.error=function($,q,I){var U=Sz0($,q,this);if(I)throw U;else this.emit("error",U)};function Sz0($,q,I){if(!($ instanceof Error))$=Error($);if($.code=$.code||q,$.path=$.path||I.path,$.fstream_type=$.fstream_type||I.type,$.fstream_path=$.fstream_path||I.path,I._path!==I.path)$.fstream_unc_path=$.fstream_unc_path||I._path;if(I.linkpath)$.fstream_linkpath=$.fstream_linkpath||I.linkpath;return $.fstream_class=$.fstream_class||I.constructor.name,$.fstream_stack=$.fstream_stack||Error().stack.split(/\n/).slice(3).map(function(U){return U.replace(/^ {4}at /,"")}),$}});var xK=O((Qv1,uz0)=>{uz0.exports=YY1;function YY1($){var q=["Directory","File","SymbolicLink","Link","BlockDevice","CharacterDevice","FIFO","Socket"],I;if($.type&&q.indexOf($.type)!==-1)return $[$.type]=!0,$.type;for(var U=0,Y=q.length;U<Y;U++){I=q[U];var J=$[I]||$["is"+I];if(typeof J==="function")J=J.call($);if(J)return $[I]=!0,$.type=I,I}return null}});var KS=O((Kv1,xz0)=>{xz0.exports=kK;var JY1=l6(),QY1=p0(),QS=c3();QY1(kK,QS);function kK($){var q=this;if(!(q instanceof kK))throw Error("LinkReader must be called as constructor.");if(!($.type==="Link"&&$.Link||$.type==="SymbolicLink"&&$.SymbolicLink))throw Error("Non-link type "+$.type);QS.call(q,$)}kK.prototype._stat=function($){var q=this;JY1.readlink(q._path,function(I,U){if(I)return q.error(I);q.linkpath=q.props.linkpath=U,q.emit("linkpath",U),QS.prototype._stat.call(q,$)})};kK.prototype._read=function(){var $=this;if($._paused)return;if(!$._ended)$.emit("end"),$.emit("close"),$._ended=!0}});var GS=O((zv1,bz0)=>{bz0.exports=f8;var fz0=l6(),KY1=p0(),fK=r("path"),zS=c3(),kz0=r("assert").ok;KY1(f8,zS);function f8($){var q=this;if(!(q instanceof f8))throw Error("DirReader must be called as constructor.");if($.type!=="Directory"||!$.Directory)throw Error("Non-directory type "+$.type);if(q.entries=null,q._index=-1,q._paused=!1,q._length=-1,$.sort)this.sort=$.sort;zS.call(this,$)}f8.prototype._getEntries=function(){var $=this;if($._gotEntries)return;$._gotEntries=!0,fz0.readdir($._path,function(q,I){if(q)return $.error(q);if($.entries=I,$.emit("entries",I),$._paused)$.once("resume",U);else U();function U(){if($._length=$.entries.length,typeof $.sort==="function")$.entries=$.entries.sort($.sort.bind($));$._read()}})};f8.prototype._read=function(){var $=this;if(!$.entries)return $._getEntries();if($._paused||$._currentEntry||$._aborted)return;if($._index++,$._index>=$.entries.length){if(!$._ended)$._ended=!0,$.emit("end"),$.emit("close");return}var q=fK.resolve($._path,$.entries[$._index]);kz0(q!==$._path),kz0($.entries[$._index]),$._currentEntry=q,fz0[$.props.follow?"stat":"lstat"](q,function(I,U){if(I)return $.error(I);var Y=$._proxy||$;U.path=q,U.basename=fK.basename(q),U.dirname=fK.dirname(q);var J=$.getChildProps.call(Y,U);J.path=q,J.basename=fK.basename(q),J.dirname=fK.dirname(q);var Q=zS(J,U);$._currentEntry=Q,Q.on("pause",function(G){if(!$._paused&&!Q._disowned)$.pause(G)}),Q.on("resume",function(G){if($._paused&&!Q._disowned)$.resume(G)}),Q.on("stat",function(G){if($.emit("_entryStat",Q,G),Q._aborted)return;if(Q._paused)Q.once("resume",function(){$.emit("entryStat",Q,G)});else $.emit("entryStat",Q,G)}),Q.on("ready",function G(){if($._paused)return Q.pause($),$.once("resume",G);if(Q.type==="Socket")$.emit("socket",Q);else $.emitEntry(Q)});var K=!1;Q.on("close",z),Q.on("disown",z);function z(){if(K)return;if(K=!0,$.emit("childEnd",Q),$.emit("entryEnd",Q),$._currentEntry=null,!$._paused)$._read()}Q.on("error",function(G){if(Q._swallowErrors)$.warn(G),Q.emit("end"),Q.emit("close");else $.emit("error",G)}),["child","childEnd","warn"].forEach(function(G){Q.on(G,$.emit.bind($,G))})})};f8.prototype.disown=function($){if($.emit("beforeDisown"),$._disowned=!0,$.parent=$.root=null,$===this._currentEntry)this._currentEntry=null;$.emit("disown")};f8.prototype.getChildProps=function(){return{depth:this.depth+1,root:this.root||this,parent:this,follow:this.follow,filter:this.filter,sort:this.props.sort,hardlinks:this.props.hardlinks}};f8.prototype.pause=function($){var q=this;if(q._paused)return;if($=$||q,q._paused=!0,q._currentEntry&&q._currentEntry.pause)q._currentEntry.pause($);q.emit("pause",$)};f8.prototype.resume=function($){var q=this;if(!q._paused)return;if($=$||q,q._paused=!1,q.emit("resume",$),q._paused)return;if(q._currentEntry){if(q._currentEntry.resume)q._currentEntry.resume($)}else q._read()};f8.prototype.emitEntry=function($){this.emit("entry",$),this.emit("child",$)}});var HS=O((Gv1,cz0)=>{cz0.exports=d3;var zY1=l6(),GY1=p0(),nz0=c3(),iz0={EOF:!0},pz0={CLOSE:!0};GY1(d3,nz0);function d3($){var q=this;if(!(q instanceof d3))throw Error("FileReader must be called as constructor.");if(!($.type==="Link"&&$.Link||$.type==="File"&&$.File))throw Error("Non-file type "+$.type);q._buffer=[],q._bytesEmitted=0,nz0.call(q,$)}d3.prototype._getStream=function(){var $=this,q=$._stream=zY1.createReadStream($._path,$.pro Line truncated
expect: `+$.props.size+`
actual: `+$._bytesEmitted)}),q.on("close",function(){if($._paused||$._buffer.length)$._buffer.push(MG0),$._read();else $.emit("close")}),q.on("error",function(I){$.emit("error",I)}),$._read()};r3.prototype._read=function(){var $=this;if($._paused)return;if(!$._stream)return $._getStream();if($._buffer.length){var q=$._buffer;for(var I=0,U=q.length;I<U;I++){var Y=q[I];if(Y===FG0)$.emit("end");else if(Y===MG0)$.emit("close");else $.emit("data",Y);if($._paused){$._buffer=q.slice(I);return}}$._buffer.length=0}};r3.prototype.pause=function($){var q=this;if(q._paused)return;if($=$||q,q._paused=!0,q._stream)q._stream.pause();q.emit("pause",$)};r3.prototype.resume=function($){var q=this;if(!q._paused)return;if($=$||q,q.emit("resume",$),q._paused=!1,q._stream)q._stream.resume();q._read()}});var EG0=O((VC1,TG0)=>{TG0.exports=hL;var jQ1=n0(),PG0=o3();jQ1(hL,PG0);function hL($){var q=this;if(!(q instanceof hL))throw Error("SocketReader must be called as constructor.");if(!($.type==="Socket"&&$.Socket))throw Error("Non-socket type "+$.type);PG0.call(q,$)}hL.prototype._read=function(){var $=this;if($._paused)return;if(!$._ended)$.emit("end"),$.emit("close"),$._ended=!0}});var Zy=O((WC1,gG0)=>{gG0.exports=t3;var Wy=o3(),BQ1=pK(),RQ1=n0(),vQ1=o6();RQ1(t3,Wy);function t3($){var q=this;if(!(q instanceof t3))throw Error("ProxyReader must be called as constructor.");q.props=$,q._buffer=[],q.ready=!1,Wy.call(q,$)}t3.prototype._stat=function(){var $=this,q=$.props,I=q.follow?"stat":"lstat";vQ1[I](q.path,function(U,Y){var J;if(U||!Y)J="File";else J=BQ1(Y);q[J]=!0,q.type=$.type=J,$._old=Y,$._addProxy(Wy(q,Y))})};t3.prototype._addProxy=function($){var q=this;if(q._proxyTarget)return q.error("proxy already set");q._proxyTarget=$,$._proxy=q,["error","data","end","close","linkpath","entry","entryEnd","child","childEnd","warn","stat"].forEach(function(U){$.on(U,q.emit.bind(q,U))}),q.emit("proxy",$),$.on("ready",function(){q.ready=!0,q.emit("ready")});var I=q._buffer;q._buffer.length=0,I.forEach(function(U){$[U[0]].apply($,U[1])})};t3.prototype.pause=function(){return this._proxyTarget?this._proxyTarget.pause():!1};t3.prototype.resume=function(){return this._proxyTarget?this._proxyTarget.resume():!1}});var o3=O((ZC1,RG0)=>{RG0.exports=I8;var CQ1=o6(),_Q1=o("stream").Stream,hQ1=n0(),Xy=o("path"),Ly=pK(),SL=I8.hardLinks={},jG0=_L();hQ1(I8,jG0);var BG0=wy();function I8($,q){var I=this;if(!(I instanceof I8))return new I8($,q);if(typeof $==="string")$={path:$};var U,Y;if($.type&&typeof $.type==="function")U=$.type,Y=U;else U=Ly($),Y=I8;if(q&&!U)U=Ly(q),$[U]=!0,$.type=U;switch(U){case"Directory":Y=Hy();break;case"Link":case"File":Y=Vy();break;case"SymbolicLink":Y=BG0;break;case"Socket":Y=EG0();break;case null:Y=Zy();break}if(!(I instanceof Y))return new Y($);if(jG0.call(I),!$.path)I.error("Must provide a path",null,!0);if(I.readable=!0,I.writable=!1,I.type=U,I.props=$,I.depth=$.depth=$.depth||0,I.parent=$.parent||null,I.root=$.root||$.parent&&$.parent.root||I,I._path=I.path=Xy.resolve($.path),process.platform==="win32"){if(I.path=I._path=I.path.replace(/\?/g,"_"),I._path.length>=260)I._swallowErrors=!0,I._path="\\\\?\\"+I.path.replace(/\//g,"\\")}if(I.basename=$.basename=Xy.basename(I.path),I.dirname=$.dirname=Xy.dirname(I.path),$.parent=$.root=null,I.size=$.size,I.filter=typeof $.filter==="function"?$.filter:null,$.sort==="alpha")$.sort=SQ1;I._stat(q)}function SQ1($,q){return $===q?0:$.toLowerCase()>q.toLowerCase()?1:$.toLowerCase()<q.toLowerCase()?-1:$>q?1:-1}I8.prototype._stat=function($){var q=this,I=q.props,U=I.follow?"stat":"lstat";if($)process.nextTick(Y.bind(null,null,$));else CQ1[U](q._path,Y);function Y(J,Q){if(J)return q.error(J);if(Object.keys(Q).forEach(function(W){I[W]=Q[W]}),q.size!==void 0&&I.size!==q.size)return q.error("incorrect size");q.size=I.size;var K=Ly(I),z=I.hardlinks!==!1;if(z&&K!=="Directory"&&I.nlink&&I.nlink>1){var w=I.dev+":"+I.ino;if(SL[w]===q._path||!SL[w])SL[w]=q._path;else K=q.type=q.props.type="Link",q.Link=q.props.Link=!0,q.linkpath=q.props.linkpath=SL[w],q._stat=q._read=BG0.prototype._read}if(q.type&&q.type!==K)q.error("Unexpected type: "+K);if(q.filter){var G=q._proxy||q;if(!q.filter.call(G,G,I)){if(!q._disowned)q.abort(),q.emit("end"),q.emit("close");return}}var H=["_stat","stat","ready"],V=0;(function W(){if(q._aborted){q.emit("end"),q.emit("close");return}if(q._paused&&q.type!=="Directory"){q.once("resume",W);return}var X=H[V++];if(!X)return q._read();q.emit(X,I),W()})()}};I8.prototype.pipe=function($){var q=this;if(typeof $.add==="function")q.on("entry",function(I){var U=$.add(I);if(U===!1)q.pause()});return _Q1.prototype.pipe.apply(this,arguments)};I8.prototype.pause=function($){if(this._paused=!0,$=$||this,this.emit("pause",$),this._stream)this._stream.pause($)};I8.prototype.resume=function($){if(this._paused=!1,$=$||this,this.emit("resume",$),this._stream)this._stream.resume($);this._read()};I8.prototype._read=function(){this.error("Cannot read unknown type: "+this.type)}});var Fy=O((XC1,xG0)=>{x Line truncated
actual: `+$._bytesEmitted)}),q.on("close",function(){if($._paused||$._buffer.length)$._buffer.push(pz0),$._read();else $.emit("close")}),q.on("error",function(I){$.emit("error",I)}),$._read()};d3.prototype._read=function(){var $=this;if($._paused)return;if(!$._stream)return $._getStream();if($._buffer.length){var q=$._buffer;for(var I=0,U=q.length;I<U;I++){var Y=q[I];if(Y===iz0)$.emit("end");else if(Y===pz0)$.emit("close");else $.emit("data",Y);if($._paused){$._buffer=q.slice(I);return}}$._buffer.length=0}};d3.prototype.pause=function($){var q=this;if(q._paused)return;if($=$||q,q._paused=!0,q._stream)q._stream.pause();q.emit("pause",$)};d3.prototype.resume=function($){var q=this;if(!q._paused)return;if($=$||q,q.emit("resume",$),q._paused=!1,q._stream)q._stream.resume();q._read()}});var lz0=O((Hv1,mz0)=>{mz0.exports=GL;var HY1=p0(),dz0=c3();HY1(GL,dz0);function GL($){var q=this;if(!(q instanceof GL))throw Error("SocketReader must be called as constructor.");if(!($.type==="Socket"&&$.Socket))throw Error("Non-socket type "+$.type);dz0.call(q,$)}GL.prototype._read=function(){var $=this;if($._paused)return;if(!$._ended)$.emit("end"),$.emit("close"),$._ended=!0}});var VS=O((wv1,oz0)=>{oz0.exports=m3;var wS=c3(),wY1=xK(),VY1=p0(),WY1=l6();VY1(m3,wS);function m3($){var q=this;if(!(q instanceof m3))throw Error("ProxyReader must be called as constructor.");q.props=$,q._buffer=[],q.ready=!1,wS.call(q,$)}m3.prototype._stat=function(){var $=this,q=$.props,I=q.follow?"stat":"lstat";WY1[I](q.path,function(U,Y){var J;if(U||!Y)J="File";else J=wY1(Y);q[J]=!0,q.type=$.type=J,$._old=Y,$._addProxy(wS(q,Y))})};m3.prototype._addProxy=function($){var q=this;if(q._proxyTarget)return q.error("proxy already set");q._proxyTarget=$,$._proxy=q,["error","data","end","close","linkpath","entry","entryEnd","child","childEnd","warn","stat"].forEach(function(U){$.on(U,q.emit.bind(q,U))}),q.emit("proxy",$),$.on("ready",function(){q.ready=!0,q.emit("ready")});var I=q._buffer;q._buffer.length=0,I.forEach(function(U){$[U[0]].apply($,U[1])})};m3.prototype.pause=function(){return this._proxyTarget?this._proxyTarget.pause():!1};m3.prototype.resume=function(){return this._proxyTarget?this._proxyTarget.resume():!1}});var c3=O((Vv1,az0)=>{az0.exports=U8;var ZY1=l6(),XY1=r("stream").Stream,LY1=p0(),WS=r("path"),ZS=xK(),HL=U8.hardLinks={},rz0=zL();LY1(U8,rz0);var tz0=KS();function U8($,q){var I=this;if(!(I instanceof U8))return new U8($,q);if(typeof $==="string")$={path:$};var U,Y;if($.type&&typeof $.type==="function")U=$.type,Y=U;else U=ZS($),Y=U8;if(q&&!U)U=ZS(q),$[U]=!0,$.type=U;switch(U){case"Directory":Y=GS();break;case"Link":case"File":Y=HS();break;case"SymbolicLink":Y=tz0;break;case"Socket":Y=lz0();break;case null:Y=VS();break}if(!(I instanceof Y))return new Y($);if(rz0.call(I),!$.path)I.error("Must provide a path",null,!0);if(I.readable=!0,I.writable=!1,I.type=U,I.props=$,I.depth=$.depth=$.depth||0,I.parent=$.parent||null,I.root=$.root||$.parent&&$.parent.root||I,I._path=I.path=WS.resolve($.path),process.platform==="win32"){if(I.path=I._path=I.path.replace(/\?/g,"_"),I._path.length>=260)I._swallowErrors=!0,I._path="\\\\?\\"+I.path.replace(/\//g,"\\")}if(I.basename=$.basename=WS.basename(I.path),I.dirname=$.dirname=WS.dirname(I.path),$.parent=$.root=null,I.size=$.size,I.filter=typeof $.filter==="function"?$.filter:null,$.sort==="alpha")$.sort=DY1;I._stat(q)}function DY1($,q){return $===q?0:$.toLowerCase()>q.toLowerCase()?1:$.toLowerCase()<q.toLowerCase()?-1:$>q?1:-1}U8.prototype._stat=function($){var q=this,I=q.props,U=I.follow?"stat":"lstat";if($)process.nextTick(Y.bind(null,null,$));else ZY1[U](q._path,Y);function Y(J,Q){if(J)return q.error(J);if(Object.keys(Q).forEach(function(W){I[W]=Q[W]}),q.size!==void 0&&I.size!==q.size)return q.error("incorrect size");q.size=I.size;var K=ZS(I),z=I.hardlinks!==!1;if(z&&K!=="Directory"&&I.nlink&&I.nlink>1){var G=I.dev+":"+I.ino;if(HL[G]===q._path||!HL[G])HL[G]=q._path;else K=q.type=q.props.type="Link",q.Link=q.props.Link=!0,q.linkpath=q.props.linkpath=HL[G],q._stat=q._read=tz0.prototype._read}if(q.type&&q.type!==K)q.error("Unexpected type: "+K);if(q.filter){var H=q._proxy||q;if(!q.filter.call(H,H,I)){if(!q._disowned)q.abort(),q.emit("end"),q.emit("close");return}}var w=["_stat","stat","ready"],V=0;(function W(){if(q._aborted){q.emit("end"),q.emit("close");return}if(q._paused&&q.type!=="Directory"){q.once("resume",W);return}var X=w[V++];if(!X)return q._read();q.emit(X,I),W()})()}};U8.prototype.pipe=function($){var q=this;if(typeof $.add==="function")q.on("entry",function(I){var U=$.add(I);if(U===!1)q.pause()});return XY1.prototype.pipe.apply(this,arguments)};U8.prototype.pause=function($){if(this._paused=!0,$=$||this,this.emit("pause",$),this._stream)this._stream.pause($)};U8.prototype.resume=function($){if(this._paused=!1,$=$||this,this.emit("resume",$),this._stream)this._stream.resume($);this._read()};U8.prototype._read=function(){this.error("Cannot read unknown type: "+this.type)}});var OS=O((Wv1,JG0)=>{J Line truncated
expect: `+$.size+`
actual: `+$._bytesWritten);dL.prototype._finish.call($)}});var Cy=O((hC1,gH0)=>{gH0.exports=H7;var vy=WY(),K21=pK(),z21=n0(),w21=pL(),G21=o("fs");z21(H7,vy);function H7($){var q=this;if(!(q instanceof H7))throw Error("ProxyWriter must be called as constructor.");q.props=$,q._needDrain=!1,vy.call(q,$)}H7.prototype._stat=function(){var $=this,q=$.props,I=q.follow?"stat":"lstat";G21[I](q.path,function(U,Y){var J;if(U||!Y)J="File";else J=K21(Y);q[J]=!0,q.type=$.type=J,$._old=Y,$._addProxy(vy(q,Y))})};H7.prototype._addProxy=function($){var q=this;if(q._proxy)return q.error("proxy already set");q._proxy=$,["ready","error","close","pipe","drain","warn"].forEach(function(U){$.on(U,q.emit.bind(q,U))}),q.emit("proxy",$);var I=q._buffer;if(I.forEach(function(U){$[U[0]].apply($,U[1])}),q._buffer.length=0,q._needsDrain)q.emit("drain")};H7.prototype.add=function($){if(w21($),!this._proxy)return this._buffer.push(["add",[$]]),this._needDrain=!0,!1;return this._proxy.add($)};H7.prototype.write=function($){if(!this._proxy)return this._buffer.push(["write",[$]]),this._needDrain=!0,!1;return this._proxy.write($)};H7.prototype.end=function($){if(!this._proxy)return this._buffer.push(["end",[$]]),!1;return this._proxy.end($)}});var WY=O((SC1,yH0)=>{yH0.exports=h$;var _$=o6(),H21=n0(),V21=Fy(),W21=Ey(),rK=o("path"),BH0=process.platform==="win32"?0:process.umask(),RH0=pK(),vH0=_L();H21(h$,vH0);h$.dirmode=parseInt("0777",8)&~BH0;h$.filemode=parseInt("0666",8)&~BH0;var Z21=jy(),X21=By(),L21=Ry(),D21=Cy();function h$($,q){var I=this;if(typeof $==="string")$={path:$};var U=RH0($),Y=h$;switch(U){case"Directory":Y=Z21;break;case"File":Y=L21;break;case"Link":case"SymbolicLink":Y=X21;break;case null:default:Y=D21;break}if(!(I instanceof Y))return new Y($);if(vH0.call(I),!$.path)I.error("Must provide a path",null,!0);if(I.type=$.type,I.props=$,I.depth=$.depth||0,I.clobber=$.clobber===!1?$.clobber:!0,I.parent=$.parent||null,I.root=$.root||$.parent&&$.parent.root||I,I._path=I.path=rK.resolve($.path),process.platform==="win32"){if(I.path=I._path=I.path.replace(/\?/g,"_"),I._path.length>=260)I._swallowErrors=!0,I._path="\\\\?\\"+I.path.replace(/\//g,"\\")}if(I.basename=rK.basename($.path),I.dirname=rK.dirname($.path),I.linkpath=$.linkpath||null,$.parent=$.root=null,I.size=$.size,typeof $.mode==="string")$.mode=parseInt($.mode,8);I.readable=!1,I.writable=!0,I._buffer=[],I.ready=!1,I.filter=typeof $.filter==="function"?$.filter:null,I._stat(q)}h$.prototype._create=function(){var $=this;_$[$.props.follow?"stat":"lstat"]($._path,function(q){if(q)return $.warn("Cannot create "+$._path+`
Unsupported type: `+$.type,"ENOTSUP");$._finish()})};h$.prototype._stat=function($){var q=this,I=q.props,U=I.follow?"stat":"lstat",Y=q._proxy||q;if($)J(null,$);else _$[U](q._path,J);function J(Q,K){if(q.filter&&!q.filter.call(Y,Y,K)){q._aborted=!0,q.emit("end"),q.emit("close");return}if(Q||!K)return _y(q);q._old=K;var z=RH0(K);if(z!==q.type||q.type==="File"&&K.nlink>1)return V21(q._path,function(w){if(w)return q.error(w);q._old=null,_y(q)});_y(q)}};function _y($){W21(rK.dirname($._path),h$.dirmode,function(q,I){if(q)return $.error(q);return $._madeDir=I,$._create()})}function CH0($,q,I,U,Y){var J=q.mode,Q=q.follow||$.type!=="SymbolicLink"?"chmod":"lchmod";if(!_$[Q])return Y();if(typeof J!=="number")return Y();var K=I.mode&parseInt("0777",8);if(J=J&parseInt("0777",8),J===K)return Y();_$[Q](U,J,Y)}function _H0($,q,I,U,Y){if(process.platform==="win32")return Y();if(!process.getuid||process.getuid()!==0)return Y();if(typeof q.uid!=="number"&&typeof q.gid!=="number")return Y();if(I.uid===q.uid&&I.gid===q.gid)return Y();var J=$.props.follow||$.type!=="SymbolicLink"?"chown":"lchown";if(!_$[J])return Y();if(typeof q.uid!=="number")q.uid=I.uid;if(typeof q.gid!=="number")q.gid=I.gid;_$[J](U,q.uid,q.gid,Y)}function hH0($,q,I,U,Y){if(!_$.utimes||process.platform==="win32")return Y();var J=q.follow||$.type!=="SymbolicLink"?"utimes":"lutimes";if(J==="lutimes"&&!_$[J])J="utimes";if(!_$[J])return Y();var{atime:Q,mtime:K}=I,z=q.atime,w=q.mtime;if(z===void 0)z=Q;if(w===void 0)w=K;if(!jH0(z))z=new Date(z);if(!jH0(w))z=new Date(w);if(z.getTime()===Q.getTime()&&w.getTime()===K.getTime())return Y();_$[J](U,z,w,Y)}h$.prototype._finish=function(){var $=this;if($._finishing)return;$._finishing=!0;var q=0,I=null,U=!1;if($._old)$._old.atime=new Date(0),$._old.mtime=new Date(0),J($._old);else{var Y=$.props.follow?"stat":"lstat";_$[Y]($._path,function(K,z){if(K)if(K.code==="ENOENT"&&($.type==="Link"||$.type==="SymbolicLink")&&process.platform==="win32"){$.ready=!0,$.emit("ready"),$.emit("end"),$.emit("close"),$.end=$._finish=function(){};return}else return $.error(K);J($._old=z)})}return;function J(K){q+=3,CH0($,$.props,K,$._path,Q("chmod")),_H0($,$.props,K,$._path,Q("chown")),hH0($,$.props,K,$._path,Q("utimes"))}function Q(K){return function(z){if(I)return;if(z)return z.fstream_finish_call=K,$.error(I=z);if(--q>0)return;if(U)return;if(U=!0,!$._madeDir)return w();else SH0($,$._path,w);function w(G){if(G)return G.fstream_finish_call="setupMadeDir",$.error(G);$.emit("end"),$.emit("close")}}}};function SH0($,q,I){var U=$._madeDir,Y=rK.dirname(q);O21($,Y,function(J){if(J)return I(J);if(Y===U)return I();SH0($,Y,I)})}function O21($,q,I){var U={};Object.keys($.props).forEach(function(K){if(U[K]=$.props[K],K==="mode"&&$.type!=="Directory")U[K]=U[K]|parseInt("0111",8)});var Y=3,J=null;_$.stat(q,function(K,z){if(K)return I(J=K);CH0($,U,z,q,Q),_H0($,U,z,q,Q),hH0($,U,z,q,Q)});function Q(K){if(J)return;if(K)return I(J=K);if(--Y===0)return I()}}h$.prototype.pipe=function(){this.error("Can't pipe from writable stream")};h$.prototype.add=function(){this.error("Can't add to non-Directory type")};h$.prototype.write=function(){return!0};function N21($){return Object.prototype.toString.call($)}function jH0($){return typeof $==="object"&&N21($)==="[object Date]"}});var xy=O((F21)=>{F21.Abstract=_L();F21.Reader=o3();F21.Writer=WY();F21.File={Reader:Vy(),Writer:Ry()};F21.Dir={Reader:Hy(),Writer:jy()};F21.Link={Reader:wy(),Writer:By()};F21.Proxy={Reader:Zy(),Writer:Cy()};F21.Reader.Dir=F21.DirReader=F21.Dir.Reader;F21.Reader.File=F21.FileReader=F21.File.Reader;F21.Reader.Link=F21.LinkReader=F21.Link.Reader;F21.Reader.Proxy=F21.ProxyReader=F21.Proxy.Reader;F21.Writer.Dir=F21.DirWriter=F21.Dir.Writer;F21.Writer.File=F21.FileWriter=F21.File.Writer;F21.Writer.Link=F21.LinkWriter=F21.Link.Writer;F21.Writer.Proxy=F21.ProxyWriter=F21.Proxy.Writer;F21.collect=pL()});var xH0=O((cC1,uH0)=>{uH0.exports=B21;var P21=PL(),T21=xy().Writer,ky=o("path"),E21=o("stream"),g21=Qy(),j21=Y7();function B21($){$.path=ky.resolve(ky.normalize($.path));var q=new P21($),I=new E21.Writable({objectMode:!0});I._write=function(Y,J,Q){if(Y.type=="Directory")return Q();var K=ky.join($.path,Y.path);if(K.indexOf($.path)!=0)return Q();let z=$.getWriter?$.getWriter({path:K}):T21({path:K});Y.pipe(z).on("error",Q).on("close",Q)};var U=g21(q,I);return q.once("crx-header",function(Y){U.crxHeader=Y}),q.pipe(I).on("finish",function(){U.emit("close")}),U.promise=function(){return new j21(function(Y,J){U.on("close",Y),U.on("error",J)})},U}});var kH0=O((dC1,lL)=>{var y4=function($){var q=1e7,I=7,U=9007199254740992,Y=V(U),J="0123456789abcdefghijklmnopqrstuvwxyz",Q=typeof BigInt==="function";function K(F,M,R,y){if(typeof F>"u")return K[0];if(typeof M<"u")return+M===10&&!R?P0(F):y$(F,M,R,y);return P0(F)}function z(F,M){this.value=F,this.sign=M,this.isSmall=!1}z.prototype=Object.create(K.prototype);function w(F){this.value=F,this.sign=F<0,this.isSmall=!0}w.prototype=Object.create(K.prototype);function G(F){th Line truncated
actual: `+$._bytesWritten);ML.prototype._finish.call($)}});var RS=O((Cv1,oG0)=>{oG0.exports=G7;var BS=JY(),cY1=xK(),dY1=p0(),mY1=NL(),lY1=r("fs");dY1(G7,BS);function G7($){var q=this;if(!(q instanceof G7))throw Error("ProxyWriter must be called as constructor.");q.props=$,q._needDrain=!1,BS.call(q,$)}G7.prototype._stat=function(){var $=this,q=$.props,I=q.follow?"stat":"lstat";lY1[I](q.path,function(U,Y){var J;if(U||!Y)J="File";else J=cY1(Y);q[J]=!0,q.type=$.type=J,$._old=Y,$._addProxy(BS(q,Y))})};G7.prototype._addProxy=function($){var q=this;if(q._proxy)return q.error("proxy already set");q._proxy=$,["ready","error","close","pipe","drain","warn"].forEach(function(U){$.on(U,q.emit.bind(q,U))}),q.emit("proxy",$);var I=q._buffer;if(I.forEach(function(U){$[U[0]].apply($,U[1])}),q._buffer.length=0,q._needsDrain)q.emit("drain")};G7.prototype.add=function($){if(mY1($),!this._proxy)return this._buffer.push(["add",[$]]),this._needDrain=!0,!1;return this._proxy.add($)};G7.prototype.write=function($){if(!this._proxy)return this._buffer.push(["write",[$]]),this._needDrain=!0,!1;return this._proxy.write($)};G7.prototype.end=function($){if(!this._proxy)return this._buffer.push(["end",[$]]),!1;return this._proxy.end($)}});var JY=O((_v1,UH0)=>{UH0.exports=C$;var v$=l6(),oY1=p0(),rY1=OS(),tY1=PS(),pK=r("path"),tG0=process.platform==="win32"?0:process.umask(),aG0=xK(),sG0=zL();oY1(C$,sG0);C$.dirmode=parseInt("0777",8)&~tG0;C$.filemode=parseInt("0666",8)&~tG0;var aY1=ES(),sY1=jS(),eY1=gS(),$J1=RS();function C$($,q){var I=this;if(typeof $==="string")$={path:$};var U=aG0($),Y=C$;switch(U){case"Directory":Y=aY1;break;case"File":Y=eY1;break;case"Link":case"SymbolicLink":Y=sY1;break;case null:default:Y=$J1;break}if(!(I instanceof Y))return new Y($);if(sG0.call(I),!$.path)I.error("Must provide a path",null,!0);if(I.type=$.type,I.props=$,I.depth=$.depth||0,I.clobber=$.clobber===!1?$.clobber:!0,I.parent=$.parent||null,I.root=$.root||$.parent&&$.parent.root||I,I._path=I.path=pK.resolve($.path),process.platform==="win32"){if(I.path=I._path=I.path.replace(/\?/g,"_"),I._path.length>=260)I._swallowErrors=!0,I._path="\\\\?\\"+I.path.replace(/\//g,"\\")}if(I.basename=pK.basename($.path),I.dirname=pK.dirname($.path),I.linkpath=$.linkpath||null,$.parent=$.root=null,I.size=$.size,typeof $.mode==="string")$.mode=parseInt($.mode,8);I.readable=!1,I.writable=!0,I._buffer=[],I.ready=!1,I.filter=typeof $.filter==="function"?$.filter:null,I._stat(q)}C$.prototype._create=function(){var $=this;v$[$.props.follow?"stat":"lstat"]($._path,function(q){if(q)return $.warn("Cannot create "+$._path+`
Unsupported type: `+$.type,"ENOTSUP");$._finish()})};C$.prototype._stat=function($){var q=this,I=q.props,U=I.follow?"stat":"lstat",Y=q._proxy||q;if($)J(null,$);else v$[U](q._path,J);function J(Q,K){if(q.filter&&!q.filter.call(Y,Y,K)){q._aborted=!0,q.emit("end"),q.emit("close");return}if(Q||!K)return vS(q);q._old=K;var z=aG0(K);if(z!==q.type||q.type==="File"&&K.nlink>1)return rY1(q._path,function(G){if(G)return q.error(G);q._old=null,vS(q)});vS(q)}};function vS($){tY1(pK.dirname($._path),C$.dirmode,function(q,I){if(q)return $.error(q);return $._madeDir=I,$._create()})}function eG0($,q,I,U,Y){var J=q.mode,Q=q.follow||$.type!=="SymbolicLink"?"chmod":"lchmod";if(!v$[Q])return Y();if(typeof J!=="number")return Y();var K=I.mode&parseInt("0777",8);if(J=J&parseInt("0777",8),J===K)return Y();v$[Q](U,J,Y)}function $H0($,q,I,U,Y){if(process.platform==="win32")return Y();if(!process.getuid||process.getuid()!==0)return Y();if(typeof q.uid!=="number"&&typeof q.gid!=="number")return Y();if(I.uid===q.uid&&I.gid===q.gid)return Y();var J=$.props.follow||$.type!=="SymbolicLink"?"chown":"lchown";if(!v$[J])return Y();if(typeof q.uid!=="number")q.uid=I.uid;if(typeof q.gid!=="number")q.gid=I.gid;v$[J](U,q.uid,q.gid,Y)}function qH0($,q,I,U,Y){if(!v$.utimes||process.platform==="win32")return Y();var J=q.follow||$.type!=="SymbolicLink"?"utimes":"lutimes";if(J==="lutimes"&&!v$[J])J="utimes";if(!v$[J])return Y();var{atime:Q,mtime:K}=I,z=q.atime,G=q.mtime;if(z===void 0)z=Q;if(G===void 0)G=K;if(!rG0(z))z=new Date(z);if(!rG0(G))z=new Date(G);if(z.getTime()===Q.getTime()&&G.getTime()===K.getTime())return Y();v$[J](U,z,G,Y)}C$.prototype._finish=function(){var $=this;if($._finishing)return;$._finishing=!0;var q=0,I=null,U=!1;if($._old)$._old.atime=new Date(0),$._old.mtime=new Date(0),J($._old);else{var Y=$.props.follow?"stat":"lstat";v$[Y]($._path,function(K,z){if(K)if(K.code==="ENOENT"&&($.type==="Link"||$.type==="SymbolicLink")&&process.platform==="win32"){$.ready=!0,$.emit("ready"),$.emit("end"),$.emit("close"),$.end=$._finish=function(){};return}else return $.error(K);J($._old=z)})}return;function J(K){q+=3,eG0($,$.props,K,$._path,Q("chmod")),$H0($,$.props,K,$._path,Q("chown")),qH0($,$.props,K,$._path,Q("utimes"))}function Q(K){return function(z){if(I)return;if(z)return z.fstream_finish_call=K,$.error(I=z);if(--q>0)return;if(U)return;if(U=!0,!$._madeDir)return G();else IH0($,$._path,G);function G(H){if(H)return H.fstream_finish_call="setupMadeDir",$.error(H);$.emit("end"),$.emit("close")}}}};function IH0($,q,I){var U=$._madeDir,Y=pK.dirname(q);qJ1($,Y,function(J){if(J)return I(J);if(Y===U)return I();IH0($,Y,I)})}function qJ1($,q,I){var U={};Object.keys($.props).forEach(function(K){if(U[K]=$.props[K],K==="mode"&&$.type!=="Directory")U[K]=U[K]|parseInt("0111",8)});var Y=3,J=null;v$.stat(q,function(K,z){if(K)return I(J=K);eG0($,U,z,q,Q),$H0($,U,z,q,Q),qH0($,U,z,q,Q)});function Q(K){if(J)return;if(K)return I(J=K);if(--Y===0)return I()}}C$.prototype.pipe=function(){this.error("Can't pipe from writable stream")};C$.prototype.add=function(){this.error("Can't add to non-Directory type")};C$.prototype.write=function(){return!0};function IJ1($){return Object.prototype.toString.call($)}function rG0($){return typeof $==="object"&&IJ1($)==="[object Date]"}});var yS=O((UJ1)=>{UJ1.Abstract=zL();UJ1.Reader=c3();UJ1.Writer=JY();UJ1.File={Reader:HS(),Writer:gS()};UJ1.Dir={Reader:GS(),Writer:ES()};UJ1.Link={Reader:KS(),Writer:jS()};UJ1.Proxy={Reader:VS(),Writer:RS()};UJ1.Reader.Dir=UJ1.DirReader=UJ1.Dir.Reader;UJ1.Reader.File=UJ1.FileReader=UJ1.File.Reader;UJ1.Reader.Link=UJ1.LinkReader=UJ1.Link.Reader;UJ1.Reader.Proxy=UJ1.ProxyReader=UJ1.Proxy.Reader;UJ1.Writer.Dir=UJ1.DirWriter=UJ1.Dir.Writer;UJ1.Writer.File=UJ1.FileWriter=UJ1.File.Writer;UJ1.Writer.Link=UJ1.LinkWriter=UJ1.Link.Writer;UJ1.Writer.Proxy=UJ1.ProxyWriter=UJ1.Proxy.Writer;UJ1.collect=NL()});var JH0=O((iv1,YH0)=>{YH0.exports=wJ1;var QJ1=eX(),KJ1=yS().Writer,uS=r("path"),zJ1=r("stream"),GJ1=YS(),HJ1=I7();function wJ1($){$.path=uS.resolve(uS.normalize($.path));var q=new QJ1($),I=new zJ1.Writable({objectMode:!0});I._write=function(Y,J,Q){if(Y.type=="Directory")return Q();var K=uS.join($.path,Y.path);if(K.indexOf($.path)!=0)return Q();let z=$.getWriter?$.getWriter({path:K}):KJ1({path:K});Y.pipe(z).on("error",Q).on("close",Q)};var U=GJ1(q,I);return q.once("crx-header",function(Y){U.crxHeader=Y}),q.pipe(I).on("finish",function(){U.emit("close")}),U.promise=function(){return new HJ1(function(Y,J){U.on("close",Y),U.on("error",J)})},U}});var QH0=O((pv1,AL)=>{var u4=function($){var q=1e7,I=7,U=9007199254740992,Y=V(U),J="0123456789abcdefghijklmnopqrstuvwxyz",Q=typeof BigInt==="function";function K(F,M,v,u){if(typeof F>"u")return K[0];if(typeof M<"u")return+M===10&&!v?T0(F):u$(F,M,v,u);return T0(F)}function z(F,M){this.value=F,this.sign=M,this.isSmall=!1}z.prototype=Object.create(K.prototype);function G(F){this.value=F,this.sign=F<0,this.isSmall=!0}G.prototype=Object.create(K.prototype);function H(F){th Line truncated
* Tmp
*
* Copyright (c) 2011-2017 KARASZI Istvan <github@spam.raszi.hu>
*
* MIT Licensed
*/var u1=o("fs"),sL=o("os"),u4=o("path"),aH0=o("crypto"),i8={fs:u1.constants,os:sL.constants},qV0=/XXXXXX/,IV0=(i8.O_CREAT||i8.fs.O_CREAT)|(i8.O_EXCL||i8.fs.O_EXCL)|(i8.O_RDWR||i8.fs.O_RDWR),s21=sL.platform()==="win32",e21=i8.EBADF||i8.os.errno.EBADF,$K1=i8.ENOENT||i8.os.errno.ENOENT,XY=[],UV0=u1.rmdirSync.bind(u1),YV0=!1;function qK1($,q){return u1.rm($,{recursive:!0},q)}function JV0($){return u1.rmSync($,{recursive:!0})}function py($,q){let I=LY($,q),U=I[0],Y=I[1];HK1(U,function(J,Q){if(J)return Y(J);let K=Q.tries;(function z(){try{let w=KV0(Q);u1.stat(w,function(G){if(!G){if(K-- >0)return z();return Y(Error("Could not get a unique tmp filename, max tries reached "+w))}Y(null,w)})}catch(w){Y(w)}})()})}function cy($){let q=LY($),I=q[0],U=VK1(I),Y=U.tries;do{let J=KV0(U);try{u1.statSync(J)}catch(Q){return J}}while(Y-- >0);throw Error("Could not get a unique tmp filename, max tries reached")}function IK1($,q){let I=LY($,q),U=I[0],Y=I[1];py(U,function(Q,K){if(Q)return Y(Q);u1.open(K,IV0,U.mode||384,function(w,G){if(w)return Y(w);if(U.discardDescriptor)return u1.close(G,function(V){return Y(V,K,void 0,by(K,-1,U,!1))});else{let H=U.discardDescriptor||U.detachDescriptor;Y(null,K,G,by(K,H?-1:G,U,!1))}})})}function UK1($){let q=LY($),I=q[0],U=I.discardDescriptor||I.detachDescriptor,Y=cy(I),J=u1.openSync(Y,IV0,I.mode||384);if(I.discardDescriptor)u1.closeSync(J),J=void 0;return{name:Y,fd:J,removeCallback:by(Y,U?-1:J,I,!0)}}function YK1($,q){let I=LY($,q),U=I[0],Y=I[1];py(U,function(Q,K){if(Q)return Y(Q);u1.mkdir(K,U.mode||448,function(w){if(w)return Y(w);Y(null,K,QV0(K,U,!1))})})}function JK1($){let q=LY($),I=q[0],U=cy(I);return u1.mkdirSync(U,I.mode||448),{name:U,removeCallback:QV0(U,I,!0)}}function QK1($,q){let I=function(U){if(U&&!iy(U))return q(U);q()};if(0<=$[0])u1.close($[0],function(){u1.unlink($[1],I)});else u1.unlink($[1],I)}function KK1($){let q=null;try{if(0<=$[0])u1.closeSync($[0])}catch(I){if(!WK1(I)&&!iy(I))throw I}finally{try{u1.unlinkSync($[1])}catch(I){if(!iy(I))q=I}}if(q!==null)throw q}function by($,q,I,U){let Y=aL(KK1,[q,$],U),J=aL(QK1,[q,$],U,Y);if(!I.keep)XY.unshift(Y);return U?Y:J}function QV0($,q,I){let U=q.unsafeCleanup?qK1:u1.rmdir.bind(u1),Y=q.unsafeCleanup?JV0:UV0,J=aL(Y,$,I),Q=aL(U,$,I,J);if(!q.keep)XY.unshift(J);return I?J:Q}function aL($,q,I,U){let Y=!1;return function J(Q){if(!Y){let K=U||J,z=XY.indexOf(K);if(z>=0)XY.splice(z,1);if(Y=!0,I||$===UV0||$===JV0)return $(q);else return $(q,Q||function(){})}}}function zK1(){if(!YV0)return;while(XY.length)try{XY[0]()}catch($){}}function sH0($){let q=[],I=null;try{I=aH0.randomBytes($)}catch(U){I=aH0.pseudoRandomBytes($)}for(let U=0;U<$;U++)q.push("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"[I[U]%62]);return q.join("")}function t6($){return typeof $>"u"}function LY($,q){if(typeof $==="function")return[{},$];if(t6($))return[{},q];let I={};for(let U of Object.getOwnPropertyNames($))I[U]=$[U];return[I,q]}function wK1($,q,I){let U=u4.isAbsolute($)?$:u4.join(q,$);u1.stat(U,function(Y){if(Y)u1.realpath(u4.dirname(U),function(J,Q){if(J)return I(J);I(null,u4.join(Q,u4.basename(U)))});else u1.realpath(U,I)})}function GK1($,q){let I=u4.isAbsolute($)?$:u4.join(q,$);try{return u1.statSync(I),u1.realpathSync(I)}catch(U){let Y=u1.realpathSync(u4.dirname(I));return u4.join(Y,u4.basename(I))}}function KV0($){let q=$.tmpdir;if(!t6($.name))return u4.join(q,$.dir,$.name);if(!t6($.template))return u4.join(q,$.dir,$.template).replace(qV0,sH0(6));let I=[$.prefix?$.prefix:"tmp","-",process.pid,"-",sH0(12),$.postfix?"-"+$.postfix:""].join("");return u4.join(q,$.dir,I)}function ny($,q){if(typeof q!=="string")throw Error(`${$} option must be a string, got "${typeof q}".`);if(q.includes(".."))throw Error("Relative value not allowed");return q}function zV0($){if(!t6($.name)){let q=$.name;if(u4.isAbsolute(q))throw Error(`name option must not contain an absolute path, found "${q}".`);let I=u4.basename(q);if(I===".."||I==="."||I!==q)throw Error(`name option must not contain a path, found "${q}".`)}if(!t6($.template)){if(typeof $.template!=="string")throw Error(`template option must be a string, got "${typeof $.template}".`);if(!$.template.match(qV0))throw Error(`Invalid template, found "${$.template}".`)}if(!t6($.tries)&&isNaN($.tries)||$.tries<0)throw Error(`Invalid tries, found "${$.tries}".`);$.tries=t6($.name)?$.tries||3:1,$.keep=!!$.keep,$.detachDescriptor=!!$.detachDescriptor,$.discardDescriptor=!!$.discardDescriptor,$.unsafeCleanup=!!$.unsafeCleanup,$.prefix=t6($.prefix)?"":ny("prefix",$.prefix),$.postfix=t6($.postfix)?"":ny("postfix",$.postfix),$.template=t6($.template)?void 0:ny("template",$.template)}function eH0($,q,I,U){if(t6(q))return U(null);wK1(q,I,function(Y,J){if(Y)return U(Y);let Q=u4.relative(I,J);if(Q.startsWith("..")||u4.isAbsolute(Q))return U(Error(`${$} option must be relative to "${I}", found "${Q}".`));U(null,Q)})}function $V0($,q,I){if(t6(q))return;let U=GK1(q,I),Y=u4.relative(I,U);if(Y.startsWith("..")||u4.isAbsolute(Y))throw ELine truncated
`)}var wq=($)=>(q,I,U,Y)=>{let J=U?{...U,async:!1}:{async:!1},Q=q._zod.run({value:I,issues:[]},J);if(Q instanceof Promise)throw new Y8;if(Q.issues.length){let K=new(Y?.Err??$)(Q.issues.map((z)=>P6(z,J,W4())));throw cz(K,Y?.callee),K}return Q.value},bY=wq(u6),Gq=($)=>async(q,I,U,Y)=>{let J=U?{...U,async:!0}:{async:!0},Q=q._zod.run({value:I,issues:[]},J);if(Q instanceof Promise)Q=await Q;if(Q.issues.length){let K=new(Y?.Err??$)(Q.issues.map((z)=>P6(z,J,W4())));throw cz(K,Y?.callee),K}return Q.value},iY=Gq(u6),Hq=($)=>(q,I,U)=>{let Y=U?{...U,async:!1}:{async:!1},J=q._zod.run({value:I,issues:[]},Y);if(J instanceof Promise)throw new Y8;return J.issues.length?{success:!1,error:new($??kY)(J.issues.map((Q)=>P6(Q,Y,W4())))}:{success:!0,data:J.value}},Vq=Hq(u6),Wq=($)=>async(q,I,U)=>{let Y=U?{...U,async:!0}:{async:!0},J=q._zod.run({value:I,issues:[]},Y);if(J instanceof Promise)J=await J;return J.issues.length?{success:!1,error:new $(J.issues.map((Q)=>P6(Q,Y,W4())))}:{success:!0,data:J.value}},pY=Wq(u6),dz=($)=>(q,I,U)=>{let Y=U?{...U,direction:"backward"}:{direction:"backward"};return wq($)(q,I,Y)},Ax=dz(u6),lz=($)=>(q,I,U)=>{return wq($)(q,I,U)},Px=lz(u6),mz=($)=>async(q,I,U)=>{let Y=U?{...U,direction:"backward"}:{direction:"backward"};return Gq($)(q,I,Y)},Tx=mz(u6),oz=($)=>async(q,I,U)=>{return Gq($)(q,I,U)},Ex=oz(u6),rz=($)=>(q,I,U)=>{let Y=U?{...U,direction:"backward"}:{direction:"backward"};return Hq($)(q,I,Y)},gx=rz(u6),tz=($)=>(q,I,U)=>{return Hq($)(q,I,U)},jx=tz(u6),az=($)=>async(q,I,U)=>{let Y=U?{...U,direction:"backward"}:{direction:"backward"};return Wq($)(q,I,Y)},Bx=az(u6),sz=($)=>async(q,I,U)=>{return Wq($)(q,I,U)},Rx=sz(u6);var $$={};l8($$,{xid:()=>sD,uuid7:()=>pL0,uuid6:()=>iL0,uuid4:()=>bL0,uuid:()=>A7,uppercase:()=>PO,unicodeEmail:()=>vx,undefined:()=>MO,ulid:()=>aD,time:()=>ZO,string:()=>LO,sha512_hex:()=>GD0,sha512_base64url:()=>VD0,sha512_base64:()=>HD0,sha384_hex:()=>KD0,sha384_base64url:()=>wD0,sha384_base64:()=>zD0,sha256_hex:()=>YD0,sha256_base64url:()=>QD0,sha256_base64:()=>JD0,sha1_hex:()=>qD0,sha1_base64url:()=>UD0,sha1_base64:()=>ID0,rfc5322Email:()=>dL0,number:()=>cY,null:()=>FO,nanoid:()=>$O,md5_hex:()=>sL0,md5_base64url:()=>$D0,md5_base64:()=>eL0,mac:()=>KO,lowercase:()=>AO,ksuid:()=>eD,ipv6:()=>QO,ipv4:()=>JO,integer:()=>OO,idnEmail:()=>lL0,httpProtocol:()=>HO,html5Email:()=>cL0,hostname:()=>rL0,hex:()=>aL0,guid:()=>IO,extendedDuration:()=>nL0,emoji:()=>YO,email:()=>UO,e164:()=>VO,duration:()=>qO,domain:()=>tL0,datetime:()=>XO,date:()=>WO,cuid2:()=>tD,cuid:()=>rD,cidrv6:()=>wO,cidrv4:()=>zO,browserEmail:()=>mL0,boolean:()=>NO,bigint:()=>DO,base64url:()=>ez,base64:()=>GO});var rD=/^[cC][0-9a-z]{6,}$/,tD=/^[0-9a-z]+$/,aD=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,sD=/^[0-9a-vA-V]{20}$/,eD=/^[A-Za-z0-9]{27}$/,$O=/^[a-zA-Z0-9_-]{21}$/,qO=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,nL0=/^[-+]?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)?)??$/,IO=/^([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})$/,A7=($)=>{if(!$)return/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${$}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`)},bL0=A7(4),iL0=A7(6),pL0=A7(7),UO=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,cL0=/^[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])?)*$/,dL0=/^(([^<>()\[\]\\.,;:\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,}))$/,vx=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,lL0=vx,mL0=/^[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])?)*$/,oL0="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function YO(){return new RegExp(oL0,"u")}var JO=/^(?:(?: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])$/,QO=/^(([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}|:))$/,KO=($)=>{let q=X$($??":");return new RegExp(`^(?:[0-9A-F]{2}${q}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${q}){5}[0-9a-f]{2}$`)},zO=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0Line truncated
*/var u1=r("fs"),BL=r("os"),x4=r("path"),NH0=r("crypto"),b8={fs:u1.constants,os:BL.constants},PH0=/XXXXXX/,TH0=(b8.O_CREAT||b8.fs.O_CREAT)|(b8.O_EXCL||b8.fs.O_EXCL)|(b8.O_RDWR||b8.fs.O_RDWR),yJ1=BL.platform()==="win32",uJ1=b8.EBADF||b8.os.errno.EBADF,xJ1=b8.ENOENT||b8.os.errno.ENOENT,KY=[],EH0=u1.rmdirSync.bind(u1),jH0=!1;function kJ1($,q){return u1.rm($,{recursive:!0},q)}function gH0($){return u1.rmSync($,{recursive:!0})}function nS($,q){let I=zY($,q),U=I[0],Y=I[1];oJ1(U,function(J,Q){if(J)return Y(J);let K=Q.tries;(function z(){try{let G=RH0(Q);u1.stat(G,function(H){if(!H){if(K-- >0)return z();return Y(Error("Could not get a unique tmp filename, max tries reached "+G))}Y(null,G)})}catch(G){Y(G)}})()})}function iS($){let q=zY($),I=q[0],U=rJ1(I),Y=U.tries;do{let J=RH0(U);try{u1.statSync(J)}catch(Q){return J}}while(Y-- >0);throw Error("Could not get a unique tmp filename, max tries reached")}function fJ1($,q){let I=zY($,q),U=I[0],Y=I[1];nS(U,function(Q,K){if(Q)return Y(Q);u1.open(K,TH0,U.mode||384,function(G,H){if(G)return Y(G);if(U.discardDescriptor)return u1.close(H,function(V){return Y(V,K,void 0,fS(K,-1,U,!1))});else{let w=U.discardDescriptor||U.detachDescriptor;Y(null,K,H,fS(K,w?-1:H,U,!1))}})})}function bJ1($){let q=zY($),I=q[0],U=I.discardDescriptor||I.detachDescriptor,Y=iS(I),J=u1.openSync(Y,TH0,I.mode||384);if(I.discardDescriptor)u1.closeSync(J),J=void 0;return{name:Y,fd:J,removeCallback:fS(Y,U?-1:J,I,!0)}}function nJ1($,q){let I=zY($,q),U=I[0],Y=I[1];nS(U,function(Q,K){if(Q)return Y(Q);u1.mkdir(K,U.mode||448,function(G){if(G)return Y(G);Y(null,K,BH0(K,U,!1))})})}function iJ1($){let q=zY($),I=q[0],U=iS(I);return u1.mkdirSync(U,I.mode||448),{name:U,removeCallback:BH0(U,I,!0)}}function pJ1($,q){let I=function(U){if(U&&!bS(U))return q(U);q()};if(0<=$[0])u1.close($[0],function(){u1.unlink($[1],I)});else u1.unlink($[1],I)}function cJ1($){let q=null;try{if(0<=$[0])u1.closeSync($[0])}catch(I){if(!tJ1(I)&&!bS(I))throw I}finally{try{u1.unlinkSync($[1])}catch(I){if(!bS(I))q=I}}if(q!==null)throw q}function fS($,q,I,U){let Y=gL(cJ1,[q,$],U),J=gL(pJ1,[q,$],U,Y);if(!I.keep)KY.unshift(Y);return U?Y:J}function BH0($,q,I){let U=q.unsafeCleanup?kJ1:u1.rmdir.bind(u1),Y=q.unsafeCleanup?gH0:EH0,J=gL(Y,$,I),Q=gL(U,$,I,J);if(!q.keep)KY.unshift(J);return I?J:Q}function gL($,q,I,U){let Y=!1;return function J(Q){if(!Y){let K=U||J,z=KY.indexOf(K);if(z>=0)KY.splice(z,1);if(Y=!0,I||$===EH0||$===gH0)return $(q);else return $(q,Q||function(){})}}}function dJ1(){if(!jH0)return;while(KY.length)try{KY[0]()}catch($){}}function FH0($){let q=[],I=null;try{I=NH0.randomBytes($)}catch(U){I=NH0.pseudoRandomBytes($)}for(let U=0;U<$;U++)q.push("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"[I[U]%62]);return q.join("")}function r6($){return typeof $>"u"}function zY($,q){if(typeof $==="function")return[{},$];if(r6($))return[{},q];let I={};for(let U of Object.getOwnPropertyNames($))I[U]=$[U];return[I,q]}function mJ1($,q,I){let U=x4.isAbsolute($)?$:x4.join(q,$);u1.stat(U,function(Y){if(Y)u1.realpath(x4.dirname(U),function(J,Q){if(J)return I(J);I(null,x4.join(Q,x4.basename(U)))});else u1.realpath(U,I)})}function lJ1($,q){let I=x4.isAbsolute($)?$:x4.join(q,$);try{return u1.statSync(I),u1.realpathSync(I)}catch(U){let Y=u1.realpathSync(x4.dirname(I));return x4.join(Y,x4.basename(I))}}function RH0($){let q=$.tmpdir;if(!r6($.name))return x4.join(q,$.dir,$.name);if(!r6($.template))return x4.join(q,$.dir,$.template).replace(PH0,FH0(6));let I=[$.prefix?$.prefix:"tmp","-",process.pid,"-",FH0(12),$.postfix?"-"+$.postfix:""].join("");return x4.join(q,$.dir,I)}function kS($,q){if(typeof q!=="string")throw Error(`${$} option must be a string, got "${typeof q}".`);if(q.includes(".."))throw Error("Relative value not allowed");return q}function vH0($){if(!r6($.name)){let q=$.name;if(x4.isAbsolute(q))throw Error(`name option must not contain an absolute path, found "${q}".`);let I=x4.basename(q);if(I===".."||I==="."||I!==q)throw Error(`name option must not contain a path, found "${q}".`)}if(!r6($.template)){if(typeof $.template!=="string")throw Error(`template option must be a string, got "${typeof $.template}".`);if(!$.template.match(PH0))throw Error(`Invalid template, found "${$.template}".`)}if(!r6($.tries)&&isNaN($.tries)||$.tries<0)throw Error(`Invalid tries, found "${$.tries}".`);$.tries=r6($.name)?$.tries||3:1,$.keep=!!$.keep,$.detachDescriptor=!!$.detachDescriptor,$.discardDescriptor=!!$.discardDescriptor,$.unsafeCleanup=!!$.unsafeCleanup,$.prefix=r6($.prefix)?"":kS("prefix",$.prefix),$.postfix=r6($.postfix)?"":kS("postfix",$.postfix),$.template=r6($.template)?void 0:kS("template",$.template)}function MH0($,q,I,U){if(r6(q))return U(null);mJ1(q,I,function(Y,J){if(Y)return U(Y);let Q=x4.relative(I,J);if(Q.startsWith("..")||x4.isAbsolute(Q))return U(Error(`${$} option must be relative to "${I}", found "${Q}".`));U(null,Q)})}function AH0($,q,I){if(r6(q))return;let U=lJ1(q,I),Y=x4.relative(I,U);if(Y.startsWith("..")||x4.isAbsolute(Y))throw ELine truncated
\v\f\r\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F !"#$٪&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~°·∙√▒─│┼┤┬├┴┐┌└┘β∞φ±½¼≈«»ﻷﻸ��ﻻﻼ� ­ﺂ£¤ﺄ��ﺎﺏﺕﺙ،ﺝﺡﺥ٠١٢٣٤٥٦٧٨٩ﻑ؛ﺱﺵﺹ؟¢ﺀﺁﺃﺅﻊﺋﺍﺑﺓﺗﺛﺟﺣﺧﺩﺫﺭﺯﺳﺷﺻﺿﻁﻅﻋﻏ¦¬÷×ﻉـﻓﻗﻛﻟﻣﻧﻫﻭﻯﻳﺽﻌﻎﻍﻡﹽّﻥﻩﻬﻰﻲﻐﻕﻵﻶﻝﻙﻱ■�`},ibm864:"cp864",csibm864:"cp864",cp865:{type:"_sbcs",chars:"ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø₧ƒáíóúñѪº¿⌐¬½¼¡«¤░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ "},ibm865:"cp865",csibm865:"cp865",cp866:{type:"_sbcs",chars:"АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№¤■ "},ibm866:"cp866",csibm866:"cp866",cp869:{type:"_sbcs",chars:"������Ά�·¬¦‘’Έ―ΉΊΪΌ��ΎΫ©Ώ²³ά£έήίϊΐόύΑΒΓΔΕΖΗ½ΘΙ«»░▒▓│┤ΚΛΜΝ╣║╗╝ΞΟ┐└┴┬├─┼ΠΡ╚╔╩╦╠═╬ΣΤΥΦΧΨΩαβγ┘┌█▄δε▀ζηθικλμνξοπρσςτ΄­±υφχ§ψ΅°¨ωϋΰώ■ "},ibm869:"cp869",csibm869:"cp869",cp922:{type:"_sbcs",chars:"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®‾°±²³´µ·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŠÑÒÓÔÕÖרÙÚÛÜÝŽßàáâãäåæçèéêëìíîïšñòóôõö÷øùúûüýžÿ"},ibm922:"cp922",csibm922:"cp922",cp1046:{type:"_sbcs",chars:"ﺈ×÷ﹱˆ■│─┐┌└┘ﹹﹻﹽﹿﹷﺊﻰﻳﻲﻎﻏﻐﻶﻸﻺﻼ ¤ﺋﺑﺗﺛﺟﺣ،­ﺧﺳ٠١٢٣٤٥٦٧٨٩ﺷ؛ﺻﺿﻊ؟ﻋءآأؤإئابةتثجحخدذرزسشصضطﻇعغﻌﺂﺄﺎﻓـفقكلمنهوىيًٌٍَُِّْﻗﻛﻟﻵﻷﻹﻻﻣﻧﻬﻩ�"},ibm1046:"cp1046",csibm1046:"cp1046",cp1124:{type:"_sbcs",chars:"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ЁЂҐЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђґєѕіїјљњћќ§ўџ"},ibm1124:"cp1124",csibm1124:"cp1124",cp1125:{type:"_sbcs",chars:"АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёҐґЄєІіЇї·√№¤■ "},ibm1125:"cp1125",csibm1125:"cp1125",cp1129:{type:"_sbcs",chars:"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§œ©ª«¬­®¯°±²³Ÿµ·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖרÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ"},ibm1129:"cp1129",csibm1129:"cp1129",cp1133:{type:"_sbcs",chars:"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ກຂຄງຈສຊຍດຕຖທນບປຜຝພຟມຢຣລວຫອຮ���ຯະາຳິີຶືຸູຼັົຽ���ເແໂໃໄ່້໊໋໌ໍໆ�ໜໝ₭����������������໐໑໒໓໔໕໖໗໘໙��¢¬¦�"},ibm1133:"cp1133",csibm1133:"cp1133",cp1161:{type:"_sbcs",chars:"��������������������������������่กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู้๊๋€฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛¢¬¦ "},ibm1161:"cp1161",csibm1161:"cp1161",cp1162:{type:"_sbcs",chars:"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����"},ibm1162:"cp1162",csibm1162:"cp1162",cp1163:{type:"_sbcs",chars:"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥¦§œ©ª«¬­®¯°±²³Ÿµ·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖרÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ"},ibm1163:"cp1163",csiLine truncated
\v\f\r\x0E\x0F\x10ỨỰỲỶỸÝỴ\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~ÀẢÃÁẠẶẬÈẺẼÉẸỆÌỈĨÍỊÒỎÕÓỌỘỜỞỠỚỢÙỦŨ ĂÂÊÔƠƯĐăâêôơưđẶ̀̀̉̃́àảãáạẲằẳẵắẴẮẦẨẪẤỀặầẩẫấậèỂẻẽéẹềểễếệìỉỄẾỒĩíịòỔỏõóọồổỗốộờởỡớợùỖủũúụừửữứựỳỷỹýỵỐ`},georgianacademy:{type:"_sbcs",chars:"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ·¸¹º»¼½¾¿აბგდევზთიკლმნოპჟრსტუფქღყშჩცძწჭხჯჰჱჲჳჴჵჶçèéêëìíîïðñòóôõö÷øùúûüýþÿ"},georgianps:{type:"_sbcs",chars:"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ·¸¹º»¼½¾¿აბგდევზჱთიკლმნჲოპჟრსტჳუფქღყშჩცძწჭხჴჯჰჵæçèéêëìíîïðñòóôõö÷øùúûüýþÿ"},pt154:{type:"_sbcs",chars:"ҖҒӮғ„…ҶҮҲүҠӢҢҚҺҸҗ‘’“”•–—ҳҷҡӣңқһҹ ЎўЈӨҘҰ§Ё©Ә«¬ӯ®Ҝ°ұІіҙө·ё№ә»јҪҫҝАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя"},viscii:{type:"_sbcs",chars:`\x00\x01Ẳ\x03\x04ẴẪ\x07\b
\v\f\r\x0E\x0F\x10\x11\x12\x13Ỷ\x15\x16\x17\x18Ỹ\x1A\x1B\x1C\x1DỴ\x1F !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~ẠẮẰẶẤẦẨẬẼẸẾỀỂỄỆỐỒỔỖỘỢỚỜỞỊỎỌỈỦŨỤỲÕắằặấầẩậẽẹếềểễệốồổỗỠƠộờởịỰỨỪỬơớƯÀÁÂÃẢĂẳẵÈÉÊẺÌÍĨỳĐứÒÓÔạỷừửÙÚỹỵÝỡưàáâãảăữẫèéêẻìíĩỉđựòóôõỏọụùúũủýợỮ`},iso646cn:{type:"_sbcs",chars:`\x00\x01\x02\x03\x04\x05\x06\x07\b
\v\f\r\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F !"#¥%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������`},iso646jp:{type:"_sbcs",chars:`\x00\x01\x02\x03\x04\x05\x06\x07\b
\v\f\r\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[¥]^_\`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������`},hproman8:{type:"_sbcs",chars:"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ÀÂÈÊËÎÏ´ˋˆ¨˜ÙÛ₤¯Ýý°ÇçÑñ¡¿¤£¥§ƒ¢âêôûáéóúàèòùäëöüÅîØÆåíøæÄìÖÜÉïßÔÁÃãÐðÍÌÓÒÕõŠšÚŸÿÞþ·µ¾—¼½ªº«■»±�"},macintosh:{type:"_sbcs",chars:"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ"},ascii:{type:"_sbcs",chars:"��������������������������������������������������������������������������������������������������������������������������������"},tis620:{type:"_sbcs",chars:"���������������������������������กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����"}}});var HV0=O((RK1)=>{var ny=k5().Buffer;RK1._dbcs=b5;var H6=-1,GV0=-2,S$=-10,h6=-1000,NY=Array(256),qz=-1;for($z=0;$z<256;$z++)NY[$z]=H6;var $z;function b5($,q){if(this.encodingName=$.encodingName,!$)throw Error("DBCS codec is called without the data.");if(!$.table)throw Error("Encoding '"+this.encodingName+"' has no data.");var I=$.table();this.decodeTables=[],this.decodeTables[0]=NY.slice(0),this.decodeTableSeq=[];for(var U=0;U<I.length;U++)this._addDecodeChunk(I[U]);if(typeof $.gb18030==="function"){this.gb18030=$.gb18030();var Y=this.decodeTables.length;this.decodeTables.push(NY.slice(0));var J=this.decodeTables.length;this.decodeTables.push(NY.slice(0));var Q=this.decodeTables[0];for(var U=129;U<=254;U++){var K=this.decodeTables[h6-Q[U]];for(var z=48;z<=57;z++){if(K[z]===H6)K[z]=h6-Y;else if(K[z]>h6)throw Error("gb18030 decode tables conflict at byte 2");var G=this.decodeTables[h6-K[z]];for(var H=129;H<=254;H++){if(G[H]===H6)G[H]=h6-J;else if(G[H]===h6-J)continue;else if(G[H]>h6)throw Error("gb18030 decode tables conflict at byte 3");var w=this.decodeTables[h6-G[H]];for(var V=48;V<=57;V++)if(w[V]===H6)w[V]=GV0}}}}this.defaultCharUnicode=q.defaultCharUnicode,this.encodeTable=[],this.encodeTableSeq=[];var W={};if($.encodeSkipVals)for(var U=0;U<$.encodeSkipVals.length;U++){var X=$.encodeSkipVals[U];if(typeof X==="number")W[X]=!0;else for(var z=X.from;z<=X.to;z++)W[z]=!0}if(this._fillEncodeTable(0,0,W),$.encodeAdd){for(var L in $.encodeAdd)if(Object.prototype.hasOwnProperty.call($.encodeAdd,L))this._setEncodeChar(L.charCodeAt(0),$.encodeAdd[L])}if(this.defCharSB=this.encodeTable[0][q.defaultCharSingleByte.charCodeAt(0)],this.defCharSB===H6)this.defCharSB=this.encodeTable[0]["?"];if(this.defCharSB===H6)this.defCharSB=63}b5.prototype.encoder=aL;b5.prototype.decoder=iy;b5.prototype._getDecodeTrieNode=function($){var q=[];for(;$>0;$>>>=8)q.push($&255);if(q.length==0)q.push(0);var I=this.decodeTables[0];for(var U=q.length-1;U>0;U--){var Y=I[q[U]];if(Y==H6)I[q[U]]=h6-this.decodeTables.length,this.decodeTables.push(I=NY.slice(0));else if(Y<=h6)I=this.decodeTables[h6-Y];else throw Error("Overwrite byte in "+this.encodingName+", addr: "+$.toString(16))}return I};b5.prototype._addDecodeChunk=function($){var q=parseInt($[0],16),I=this._getDecodeTrieNode(q);q=q&255;for(var U=1;U<$.length;U++){var Y=$[U];if(typeof Y==="string")for(var J=0;J<Y.length;){var Q=Y.charCodeAt(J++);if(Q>=55296&&Q<56320){var K=Y.charCodeAt(J++);if(K>=56320&&K<57344)I[q++]=65536+(Q-55296)*1024+(K-56320);else throw Error("Incorrect surrogate pair in "+this.encodingName+" at chunk "+$[0])}else if(Q>4080&&Q<=4095){var z=4095-Q+2,G=[];for(var H=0;H<z;H++)G.push(Y.charCodeAt(J++));I[q++]=S$-this.decodeTableSeq.length,this.decodeTableSeq.push(G)}else I[q++]=Q}else if(typeof Y==="number"){var w=I[q-1]+1;for(var J=0;J<Y;J++)I[q++]=w++}else throw Error("Incorrect type '"+typeof Y+"' given in "+this.encodingName+" at chunk "+$[0])}if(q>255)throw Error("Incorrect chunk in "+this.encoLine truncated
`)}var Zq=($)=>(q,I,U,Y)=>{let J=U?{...U,async:!1}:{async:!1},Q=q._zod.run({value:I,issues:[]},J);if(Q instanceof Promise)throw new J8;if(Q.issues.length){let K=new(Y?.Err??$)(Q.issues.map((z)=>P6(z,J,W4())));throw dz(K,Y?.callee),K}return Q.value},pY=Zq(u6),Xq=($)=>async(q,I,U,Y)=>{let J=U?{...U,async:!0}:{async:!0},Q=q._zod.run({value:I,issues:[]},J);if(Q instanceof Promise)Q=await Q;if(Q.issues.length){let K=new(Y?.Err??$)(Q.issues.map((z)=>P6(z,J,W4())));throw dz(K,Y?.callee),K}return Q.value},cY=Xq(u6),Lq=($)=>(q,I,U)=>{let Y=U?{...U,async:!1}:{async:!1},J=q._zod.run({value:I,issues:[]},Y);if(J instanceof Promise)throw new J8;return J.issues.length?{success:!1,error:new($??bY)(J.issues.map((Q)=>P6(Q,Y,W4())))}:{success:!0,data:J.value}},Dq=Lq(u6),Oq=($)=>async(q,I,U)=>{let Y=U?{...U,async:!0}:{async:!0},J=q._zod.run({value:I,issues:[]},Y);if(J instanceof Promise)J=await J;return J.issues.length?{success:!1,error:new $(J.issues.map((Q)=>P6(Q,Y,W4())))}:{success:!0,data:J.value}},dY=Oq(u6),mz=($)=>(q,I,U)=>{let Y=U?{...U,direction:"backward"}:{direction:"backward"};return Zq($)(q,I,Y)},Tx=mz(u6),lz=($)=>(q,I,U)=>{return Zq($)(q,I,U)},Ex=lz(u6),oz=($)=>async(q,I,U)=>{let Y=U?{...U,direction:"backward"}:{direction:"backward"};return Xq($)(q,I,Y)},jx=oz(u6),rz=($)=>async(q,I,U)=>{return Xq($)(q,I,U)},gx=rz(u6),tz=($)=>(q,I,U)=>{let Y=U?{...U,direction:"backward"}:{direction:"backward"};return Lq($)(q,I,Y)},Bx=tz(u6),az=($)=>(q,I,U)=>{return Lq($)(q,I,U)},Rx=az(u6),sz=($)=>async(q,I,U)=>{let Y=U?{...U,direction:"backward"}:{direction:"backward"};return Oq($)(q,I,Y)},vx=sz(u6),ez=($)=>async(q,I,U)=>{return Oq($)(q,I,U)},Cx=ez(u6);var $$={};l8($$,{xid:()=>$O,uuid7:()=>oL0,uuid6:()=>lL0,uuid4:()=>mL0,uuid:()=>A7,uppercase:()=>EO,unicodeEmail:()=>_x,undefined:()=>PO,ulid:()=>eD,time:()=>LO,string:()=>OO,sha512_hex:()=>XD0,sha512_base64url:()=>DD0,sha512_base64:()=>LD0,sha384_hex:()=>VD0,sha384_base64url:()=>ZD0,sha384_base64:()=>WD0,sha256_hex:()=>GD0,sha256_base64url:()=>wD0,sha256_base64:()=>HD0,sha1_hex:()=>QD0,sha1_base64url:()=>zD0,sha1_base64:()=>KD0,rfc5322Email:()=>tL0,number:()=>mY,null:()=>AO,nanoid:()=>IO,md5_hex:()=>UD0,md5_base64url:()=>JD0,md5_base64:()=>YD0,mac:()=>GO,lowercase:()=>TO,ksuid:()=>qO,ipv6:()=>zO,ipv4:()=>KO,integer:()=>FO,idnEmail:()=>aL0,httpProtocol:()=>WO,html5Email:()=>rL0,hostname:()=>$D0,hex:()=>ID0,guid:()=>YO,extendedDuration:()=>dL0,emoji:()=>QO,email:()=>JO,e164:()=>ZO,duration:()=>UO,domain:()=>qD0,datetime:()=>DO,date:()=>XO,cuid2:()=>sD,cuid:()=>aD,cidrv6:()=>wO,cidrv4:()=>HO,browserEmail:()=>sL0,boolean:()=>MO,bigint:()=>NO,base64url:()=>$G,base64:()=>VO});var aD=/^[cC][0-9a-z]{6,}$/,sD=/^[0-9a-z]+$/,eD=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,$O=/^[0-9a-vA-V]{20}$/,qO=/^[A-Za-z0-9]{27}$/,IO=/^[a-zA-Z0-9_-]{21}$/,UO=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,dL0=/^[-+]?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)?)??$/,YO=/^([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})$/,A7=($)=>{if(!$)return/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${$}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`)},mL0=A7(4),lL0=A7(6),oL0=A7(7),JO=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,rL0=/^[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])?)*$/,tL0=/^(([^<>()\[\]\\.,;:\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,}))$/,_x=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,aL0=_x,sL0=/^[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])?)*$/,eL0="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function QO(){return new RegExp(eL0,"u")}var KO=/^(?:(?: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])$/,zO=/^(([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}|:))$/,GO=($)=>{let q=X$($??":");return new RegExp(`^(?:[0-9A-F]{2}${q}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${q}){5}[0-9a-f]{2}$`)},HO=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0Line truncated
`).filter((J)=>J),U=Math.min(...I.map((J)=>J.length-J.trimStart().length)),Y=I.map((J)=>J.slice(U)).map((J)=>" ".repeat(this.indent*2)+J);for(let J of Y)this.content.push(J)}compile(){let $=Function,q=this?.args,U=[...(this?.content??[""]).map((Y)=>` ${Y}`)];return new $(...q,U.join(`
`))}}var iO={major:4,minor:4,patch:3};var k0=m("$ZodType",($,q)=>{var I;$??($={}),$._zod.def=q,$._zod.bag=$._zod.bag||{},$._zod.version=iO;let U=[...$._zod.def.checks??[]];if($._zod.traits.has("$ZodCheck"))U.unshift($);for(let Y of U)for(let J of Y._zod.onattach)J($);if(U.length===0)(I=$._zod).deferred??(I.deferred=[]),$._zod.deferred?.push(()=>{$._zod.run=$._zod.parse});else{let Y=(Q,K,z)=>{let w=r5(Q),G;for(let H of K){if(H._zod.def.when){if(lD(Q))continue;if(!H._zod.def.when(Q))continue}else if(w)continue;let V=Q.issues.length,W=H._zod.check(Q);if(W instanceof Promise&&z?.async===!1)throw new Y8;if(G||W instanceof Promise)G=(G??Promise.resolve()).then(async()=>{if(await W,Q.issues.length===V)return;if(!w)w=r5(Q,V)});else{if(Q.issues.length===V)continue;if(!w)w=r5(Q,V)}}if(G)return G.then(()=>{return Q});return Q},J=(Q,K,z)=>{if(r5(Q))return Q.aborted=!0,Q;let w=Y(K,U,z);if(w instanceof Promise){if(z.async===!1)throw new Y8;return w.then((G)=>$._zod.parse(G,z))}return $._zod.parse(w,z)};$._zod.run=(Q,K)=>{if(K.skipChecks)return $._zod.parse(Q,K);if(K.direction==="backward"){let w=$._zod.parse({value:Q.value,issues:[]},{...K,skipChecks:!0});if(w instanceof Promise)return w.then((G)=>{return J(G,Q,K)});return J(w,Q,K)}let z=$._zod.parse(Q,K);if(z instanceof Promise){if(K.async===!1)throw new Y8;return z.then((w)=>Y(w,U,K))}return Y(z,U,K)}}o0($,"~standard",()=>({validate:(Y)=>{try{let J=Vq($,Y);return J.success?{value:J.data}:{issues:J.error?.issues}}catch(J){return pY($,Y).then((Q)=>Q.success?{value:Q.data}:{issues:Q.error?.issues})}},vendor:"zod",version:1}))}),P7=m("$ZodString",($,q)=>{k0.init($,q),$._zod.pattern=[...$?._zod.bag?.patterns??[]].pop()??LO($._zod.bag),$._zod.parse=(I,U)=>{if(q.coerce)try{I.value=String(I.value)}catch(Y){}if(typeof I.value==="string")return I;return I.issues.push({expected:"string",code:"invalid_type",input:I.value,inst:$}),I}}),_1=m("$ZodStringFormat",($,q)=>{Zq.init($,q),P7.init($,q)}),cO=m("$ZodGUID",($,q)=>{q.pattern??(q.pattern=IO),_1.init($,q)}),dO=m("$ZodUUID",($,q)=>{if(q.version){let U={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[q.version];if(U===void 0)throw Error(`Invalid UUID version: "${q.version}"`);q.pattern??(q.pattern=A7(U))}else q.pattern??(q.pattern=A7());_1.init($,q)}),lO=m("$ZodEmail",($,q)=>{q.pattern??(q.pattern=UO),_1.init($,q)}),mO=m("$ZodURL",($,q)=>{_1.init($,q),$._zod.check=(I)=>{try{let U=I.value.trim();if(!q.normalize&&q.protocol?.source===HO.source){if(!/^https?:\/\//i.test(U)){I.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:I.value,inst:$,continue:!q.abort});return}}let Y=new URL(U);if(q.hostname){if(q.hostname.lastIndex=0,!q.hostname.test(Y.hostname))I.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:q.hostname.source,input:I.value,inst:$,continue:!q.abort})}if(q.protocol){if(q.protocol.lastIndex=0,!q.protocol.test(Y.protocol.endsWith(":")?Y.protocol.slice(0,-1):Y.protocol))I.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:q.protocol.source,input:I.value,inst:$,continue:!q.abort})}if(q.normalize)I.value=Y.href;else I.value=U;return}catch(U){I.issues.push({code:"invalid_format",format:"url",input:I.value,inst:$,continue:!q.abort})}}}),oO=m("$ZodEmoji",($,q)=>{q.pattern??(q.pattern=YO()),_1.init($,q)}),rO=m("$ZodNanoID",($,q)=>{q.pattern??(q.pattern=$O),_1.init($,q)}),tO=m("$ZodCUID",($,q)=>{q.pattern??(q.pattern=rD),_1.init($,q)}),aO=m("$ZodCUID2",($,q)=>{q.pattern??(q.pattern=tD),_1.init($,q)}),sO=m("$ZodULID",($,q)=>{q.pattern??(q.pattern=aD),_1.init($,q)}),eO=m("$ZodXID",($,q)=>{q.pattern??(q.pattern=sD),_1.init($,q)}),$N=m("$ZodKSUID",($,q)=>{q.pattern??(q.pattern=eD),_1.init($,q)}),qN=m("$ZodISODateTime",($,q)=>{q.pattern??(q.pattern=XO(q)),_1.init($,q)}),IN=m("$ZodISODate",($,q)=>{q.pattern??(q.pattern=WO),_1.init($,q)}),UN=m("$ZodISOTime",($,q)=>{q.pattern??(q.pattern=ZO(q)),_1.init($,q)}),YN=m("$ZodISODuration",($,q)=>{q.pattern??(q.pattern=qO),_1.init($,q)}),JN=m("$ZodIPv4",($,q)=>{q.pattern??(q.pattern=JO),_1.init($,q),$._zod.bag.format="ipv4"}),QN=m("$ZodIPv6",($,q)=>{q.pattern??(q.pattern=QO),_1.init($,q),$._zod.bag.format="ipv6",$._zod.check=(I)=>{try{new URL(`http://[${I.value}]`)}catch{I.issues.push({code:"invalid_format",format:"ipv6",input:I.value,inst:$,continue:!q.abort})}}}),KN=m("$ZodMAC",($,q)=>{q.pattern??(q.pattern=KO(q.delimiter)),_1.init($,q),$._zod.bag.format="mac"}),zN=m("$ZodCIDRv4",($,q)=>{q.pattern??(q.pattern=zO),_1.init($,q)}),wN=m("$ZodCIDRv6",($,q)=>{q.pattern??(q.pattern=wO),_1.init($,q),$._zod.check=(I)=>{let U=I.value.split("/");try{if(U.length!==2)throw Error();let[Y,J]=U;if(!J)throw Error();let Q=Number(J);if(`${Q}`!==J)throw Error();if(Q<0||Q>128)throw Error();new URL(`http://[${Y}]`)}catch{I.issues.push({code:"invalid_format",format:"cidrv6",input:I.value,inst:$,continue:!q.abort})}}});function GN($){if($==="")return!0;if(/\s/.test($))return!1;if($.length%4!==0)return!1;try{return atob($),!0}catch{return!1}} Line truncated
`))}}var cO={major:4,minor:4,patch:3};var n0=o("$ZodType",($,q)=>{var I;$??($={}),$._zod.def=q,$._zod.bag=$._zod.bag||{},$._zod.version=cO;let U=[...$._zod.def.checks??[]];if($._zod.traits.has("$ZodCheck"))U.unshift($);for(let Y of U)for(let J of Y._zod.onattach)J($);if(U.length===0)(I=$._zod).deferred??(I.deferred=[]),$._zod.deferred?.push(()=>{$._zod.run=$._zod.parse});else{let Y=(Q,K,z)=>{let G=t5(Q),H;for(let w of K){if(w._zod.def.when){if(oD(Q))continue;if(!w._zod.def.when(Q))continue}else if(G)continue;let V=Q.issues.length,W=w._zod.check(Q);if(W instanceof Promise&&z?.async===!1)throw new J8;if(H||W instanceof Promise)H=(H??Promise.resolve()).then(async()=>{if(await W,Q.issues.length===V)return;if(!G)G=t5(Q,V)});else{if(Q.issues.length===V)continue;if(!G)G=t5(Q,V)}}if(H)return H.then(()=>{return Q});return Q},J=(Q,K,z)=>{if(t5(Q))return Q.aborted=!0,Q;let G=Y(K,U,z);if(G instanceof Promise){if(z.async===!1)throw new J8;return G.then((H)=>$._zod.parse(H,z))}return $._zod.parse(G,z)};$._zod.run=(Q,K)=>{if(K.skipChecks)return $._zod.parse(Q,K);if(K.direction==="backward"){let G=$._zod.parse({value:Q.value,issues:[]},{...K,skipChecks:!0});if(G instanceof Promise)return G.then((H)=>{return J(H,Q,K)});return J(G,Q,K)}let z=$._zod.parse(Q,K);if(z instanceof Promise){if(K.async===!1)throw new J8;return z.then((G)=>Y(G,U,K))}return Y(z,U,K)}}a0($,"~standard",()=>({validate:(Y)=>{try{let J=Dq($,Y);return J.success?{value:J.data}:{issues:J.error?.issues}}catch(J){return dY($,Y).then((Q)=>Q.success?{value:Q.data}:{issues:Q.error?.issues})}},vendor:"zod",version:1}))}),P7=o("$ZodString",($,q)=>{n0.init($,q),$._zod.pattern=[...$?._zod.bag?.patterns??[]].pop()??OO($._zod.bag),$._zod.parse=(I,U)=>{if(q.coerce)try{I.value=String(I.value)}catch(Y){}if(typeof I.value==="string")return I;return I.issues.push({expected:"string",code:"invalid_type",input:I.value,inst:$}),I}}),_1=o("$ZodStringFormat",($,q)=>{Nq.init($,q),P7.init($,q)}),mO=o("$ZodGUID",($,q)=>{q.pattern??(q.pattern=YO),_1.init($,q)}),lO=o("$ZodUUID",($,q)=>{if(q.version){let U={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[q.version];if(U===void 0)throw Error(`Invalid UUID version: "${q.version}"`);q.pattern??(q.pattern=A7(U))}else q.pattern??(q.pattern=A7());_1.init($,q)}),oO=o("$ZodEmail",($,q)=>{q.pattern??(q.pattern=JO),_1.init($,q)}),rO=o("$ZodURL",($,q)=>{_1.init($,q),$._zod.check=(I)=>{try{let U=I.value.trim();if(!q.normalize&&q.protocol?.source===WO.source){if(!/^https?:\/\//i.test(U)){I.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:I.value,inst:$,continue:!q.abort});return}}let Y=new URL(U);if(q.hostname){if(q.hostname.lastIndex=0,!q.hostname.test(Y.hostname))I.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:q.hostname.source,input:I.value,inst:$,continue:!q.abort})}if(q.protocol){if(q.protocol.lastIndex=0,!q.protocol.test(Y.protocol.endsWith(":")?Y.protocol.slice(0,-1):Y.protocol))I.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:q.protocol.source,input:I.value,inst:$,continue:!q.abort})}if(q.normalize)I.value=Y.href;else I.value=U;return}catch(U){I.issues.push({code:"invalid_format",format:"url",input:I.value,inst:$,continue:!q.abort})}}}),tO=o("$ZodEmoji",($,q)=>{q.pattern??(q.pattern=QO()),_1.init($,q)}),aO=o("$ZodNanoID",($,q)=>{q.pattern??(q.pattern=IO),_1.init($,q)}),sO=o("$ZodCUID",($,q)=>{q.pattern??(q.pattern=aD),_1.init($,q)}),eO=o("$ZodCUID2",($,q)=>{q.pattern??(q.pattern=sD),_1.init($,q)}),$N=o("$ZodULID",($,q)=>{q.pattern??(q.pattern=eD),_1.init($,q)}),qN=o("$ZodXID",($,q)=>{q.pattern??(q.pattern=$O),_1.init($,q)}),IN=o("$ZodKSUID",($,q)=>{q.pattern??(q.pattern=qO),_1.init($,q)}),UN=o("$ZodISODateTime",($,q)=>{q.pattern??(q.pattern=DO(q)),_1.init($,q)}),YN=o("$ZodISODate",($,q)=>{q.pattern??(q.pattern=XO),_1.init($,q)}),JN=o("$ZodISOTime",($,q)=>{q.pattern??(q.pattern=LO(q)),_1.init($,q)}),QN=o("$ZodISODuration",($,q)=>{q.pattern??(q.pattern=UO),_1.init($,q)}),KN=o("$ZodIPv4",($,q)=>{q.pattern??(q.pattern=KO),_1.init($,q),$._zod.bag.format="ipv4"}),zN=o("$ZodIPv6",($,q)=>{q.pattern??(q.pattern=zO),_1.init($,q),$._zod.bag.format="ipv6",$._zod.check=(I)=>{try{new URL(`http://[${I.value}]`)}catch{I.issues.push({code:"invalid_format",format:"ipv6",input:I.value,inst:$,continue:!q.abort})}}}),GN=o("$ZodMAC",($,q)=>{q.pattern??(q.pattern=GO(q.delimiter)),_1.init($,q),$._zod.bag.format="mac"}),HN=o("$ZodCIDRv4",($,q)=>{q.pattern??(q.pattern=HO),_1.init($,q)}),wN=o("$ZodCIDRv6",($,q)=>{q.pattern??(q.pattern=wO),_1.init($,q),$._zod.check=(I)=>{let U=I.value.split("/");try{if(U.length!==2)throw Error();let[Y,J]=U;if(!J)throw Error();let Q=Number(J);if(`${Q}`!==J)throw Error();if(Q<0||Q>128)throw Error();new URL(`http://[${Y}]`)}catch{I.issues.push({code:"invalid_format",format:"cidrv6",input:I.value,inst:$,continue:!q.abort})}}});function VN($){if($==="")return!0;if(/\s/.test($))return!1;if($.length%4!==0)return!1;try{return atob($),!0}catch{return!1}} Line truncated
if (${P}.issues.length) {
if (${B} in input) {
payload.issues = payload.issues.concat(${P}.issues.map(iss => ({
@@ -262,7 +262,7 @@ Unsupported type: `+$.type,"ENOTSUP");$._finish()})};h$.prototype._stat=function
newResult[${B}] = ${P}.value;
}
`);else if(!h)W.write(`
`);else if(!S)W.write(`
const ${P}_present = ${B} in input;
if (${P}.issues.length) {
payload.issues = payload.issues.concat(${P}.issues.map(iss => ({
@@ -303,17 +303,17 @@ Unsupported type: `+$.type,"ENOTSUP");$._finish()})};h$.prototype._stat=function
newResult[${B}] = ${P}.value;
}
`)}W.write("payload.value = newResult;"),W.write("return payload;");let E=W.compile();return(T,P)=>E(V,T,P)},J,Q=M7,K=!N7.jitless,w=K&&nD.value,G=q.catchall,H;$._zod.parse=(V,W)=>{H??(H=U.value);let X=V.value;if(!Q(X))return V.issues.push({expected:"object",code:"invalid_type",input:X,inst:$}),V;if(K&&w&&W?.async===!1&&W.jitless!==!0){if(!J)J=Y(q.shape);if(V=J(V,W),!G)return V;return ex([],X,V,W,H,$)}return I(V,W)}});function xx($,q,I,U){for(let J of $)if(J.issues.length===0)return q.value=J.value,q;let Y=$.filter((J)=>!r5(J));if(Y.length===1)return q.value=Y[0].value,Y[0];return q.issues.push({code:"invalid_union",input:q.value,inst:I,errors:$.map((J)=>J.issues.map((Q)=>P6(Q,U,W4())))}),q}var oY=m("$ZodUnion",($,q)=>{k0.init($,q),o0($._zod,"optin",()=>q.options.some((U)=>U._zod.optin==="optional")?"optional":void 0),o0($._zod,"optout",()=>q.options.some((U)=>U._zod.optout==="optional")?"optional":void 0),o0($._zod,"values",()=>{if(q.options.every((U)=>U._zod.values))return new Set(q.options.flatMap((U)=>Array.from(U._zod.values)));return}),o0($._zod,"pattern",()=>{if(q.options.every((U)=>U._zod.pattern)){let U=q.options.map((Y)=>Y._zod.pattern);return new RegExp(`^(${U.map((Y)=>SY(Y.source)).join("|")})$`)}return});let I=q.options.length===1?q.options[0]._zod.run:null;$._zod.parse=(U,Y)=>{if(I)return I(U,Y);let J=!1,Q=[];for(let K of q.options){let z=K._zod.run({value:U.value,issues:[]},Y);if(z instanceof Promise)Q.push(z),J=!0;else{if(z.issues.length===0)return z;Q.push(z)}}if(!J)return xx(Q,U,$,Y);return Promise.all(Q).then((K)=>{return xx(K,U,$,Y)})}});function kx($,q,I,U){let Y=$.filter((J)=>J.issues.length===0);if(Y.length===1)return q.value=Y[0].value,q;if(Y.length===0)q.issues.push({code:"invalid_union",input:q.value,inst:I,errors:$.map((J)=>J.issues.map((Q)=>P6(Q,U,W4())))});else q.issues.push({code:"invalid_union",input:q.value,inst:I,errors:[],inclusive:!1});return q}var BN=m("$ZodXor",($,q)=>{oY.init($,q),q.inclusive=!1;let I=q.options.length===1?q.options[0]._zod.run:null;$._zod.parse=(U,Y)=>{if(I)return I(U,Y);let J=!1,Q=[];for(let K of q.options){let z=K._zod.run({value:U.value,issues:[]},Y);if(z instanceof Promise)Q.push(z),J=!0;else Q.push(z)}if(!J)return kx(Q,U,$,Y);return Promise.all(Q).then((K)=>{return kx(K,U,$,Y)})}}),RN=m("$ZodDiscriminatedUnion",($,q)=>{q.inclusive=!1,oY.init($,q);let I=$._zod.parse;o0($._zod,"propValues",()=>{let Y={};for(let J of q.options){let Q=J._zod.propValues;if(!Q||Object.keys(Q).length===0)throw Error(`Invalid discriminated union option at index "${q.options.indexOf(J)}"`);for(let[K,z]of Object.entries(Q)){if(!Y[K])Y[K]=new Set;for(let w of z)Y[K].add(w)}}return Y});let U=Kq(()=>{let Y=q.options,J=new Map;for(let Q of Y){let K=Q._zod.propValues?.[q.discriminator];if(!K||K.size===0)throw Error(`Invalid discriminated union option at index "${q.options.indexOf(Q)}"`);for(let z of K){if(J.has(z))throw Error(`Duplicate discriminator value "${String(z)}"`);J.set(z,Q)}}return J});$._zod.parse=(Y,J)=>{let Q=Y.value;if(!M7(Q))return Y.issues.push({code:"invalid_type",expected:"object",input:Q,inst:$}),Y;let K=U.value.get(Q?.[q.discriminator]);if(K)return K._zod.run(Y,J);if(q.unionFallback||J.direction==="backward")return I(Y,J);return Y.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:q.discriminator,options:Array.from(U.value.keys()),input:Q,path:[q.discriminator],inst:$}),Y}}),vN=m("$ZodIntersection",($,q)=>{k0.init($,q),$._zod.parse=(I,U)=>{let Y=I.value,J=q.left._zod.run({value:Y,issues:[]},U),Q=q.right._zod.run({value:Y,issues:[]},U);if(J instanceof Promise||Q instanceof Promise)return Promise.all([J,Q]).then(([z,w])=>{return fx(I,z,w)});return fx(I,J,Q)}});function pO($,q){if($===q)return{valid:!0,data:$};if($ instanceof Date&&q instanceof Date&&+$===+q)return{valid:!0,data:$};if(o5($)&&o5(q)){let I=Object.keys(q),U=Object.keys($).filter((J)=>I.indexOf(J)!==-1),Y={...$,...q};for(let J of U){let Q=pO($[J],q[J]);if(!Q.valid)return{valid:!1,mergeErrorPath:[J,...Q.mergeErrorPath]};Y[J]=Q.data}return{valid:!0,data:Y}}if(Array.isArray($)&&Array.isArray(q)){if($.length!==q.length)return{valid:!1,mergeErrorPath:[]};let I=[];for(let U=0;U<$.length;U++){let Y=$[U],J=q[U],Q=pO(Y,J);if(!Q.valid)return{valid:!1,mergeErrorPath:[U,...Q.mergeErrorPath]};I.push(Q.data)}return{valid:!0,data:I}}return{valid:!1,mergeErrorPath:[]}}function fx($,q,I){let U=new Map,Y;for(let K of q.issues)if(K.code==="unrecognized_keys"){Y??(Y=K);for(let z of K.keys){if(!U.has(z))U.set(z,{});U.get(z).l=!0}}else $.issues.push(K);for(let K of I.issues)if(K.code==="unrecognized_keys")for(let z of K.keys){if(!U.has(z))U.set(z,{});U.get(z).r=!0}else $.issues.push(K);let J=[...U].filter(([,K])=>K.l&&K.r).map(([K])=>K);if(J.length&&Y)$.issues.push({...Y,keys:J});if(r5($))return $;let Q=pO(q.value,I.value);if(!Q.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(Q.mergeErrorPath)}`);return $.value=Q.data,$}var ww=m("$ZodTuple",($,q)=>{k0. Line truncated
`)}W.write("payload.value = newResult;"),W.write("return payload;");let E=W.compile();return(T,P)=>E(V,T,P)},J,Q=M7,K=!N7.jitless,G=K&&iD.value,H=q.catchall,w;$._zod.parse=(V,W)=>{w??(w=U.value);let X=V.value;if(!Q(X))return V.issues.push({expected:"object",code:"invalid_type",input:X,inst:$}),V;if(K&&G&&W?.async===!1&&W.jitless!==!0){if(!J)J=Y(q.shape);if(V=J(V,W),!H)return V;return qk([],X,V,W,w,$)}return I(V,W)}});function fx($,q,I,U){for(let J of $)if(J.issues.length===0)return q.value=J.value,q;let Y=$.filter((J)=>!t5(J));if(Y.length===1)return q.value=Y[0].value,Y[0];return q.issues.push({code:"invalid_union",input:q.value,inst:I,errors:$.map((J)=>J.issues.map((Q)=>P6(Q,U,W4())))}),q}var tY=o("$ZodUnion",($,q)=>{n0.init($,q),a0($._zod,"optin",()=>q.options.some((U)=>U._zod.optin==="optional")?"optional":void 0),a0($._zod,"optout",()=>q.options.some((U)=>U._zod.optout==="optional")?"optional":void 0),a0($._zod,"values",()=>{if(q.options.every((U)=>U._zod.values))return new Set(q.options.flatMap((U)=>Array.from(U._zod.values)));return}),a0($._zod,"pattern",()=>{if(q.options.every((U)=>U._zod.pattern)){let U=q.options.map((Y)=>Y._zod.pattern);return new RegExp(`^(${U.map((Y)=>uY(Y.source)).join("|")})$`)}return});let I=q.options.length===1?q.options[0]._zod.run:null;$._zod.parse=(U,Y)=>{if(I)return I(U,Y);let J=!1,Q=[];for(let K of q.options){let z=K._zod.run({value:U.value,issues:[]},Y);if(z instanceof Promise)Q.push(z),J=!0;else{if(z.issues.length===0)return z;Q.push(z)}}if(!J)return fx(Q,U,$,Y);return Promise.all(Q).then((K)=>{return fx(K,U,$,Y)})}});function bx($,q,I,U){let Y=$.filter((J)=>J.issues.length===0);if(Y.length===1)return q.value=Y[0].value,q;if(Y.length===0)q.issues.push({code:"invalid_union",input:q.value,inst:I,errors:$.map((J)=>J.issues.map((Q)=>P6(Q,U,W4())))});else q.issues.push({code:"invalid_union",input:q.value,inst:I,errors:[],inclusive:!1});return q}var vN=o("$ZodXor",($,q)=>{tY.init($,q),q.inclusive=!1;let I=q.options.length===1?q.options[0]._zod.run:null;$._zod.parse=(U,Y)=>{if(I)return I(U,Y);let J=!1,Q=[];for(let K of q.options){let z=K._zod.run({value:U.value,issues:[]},Y);if(z instanceof Promise)Q.push(z),J=!0;else Q.push(z)}if(!J)return bx(Q,U,$,Y);return Promise.all(Q).then((K)=>{return bx(K,U,$,Y)})}}),CN=o("$ZodDiscriminatedUnion",($,q)=>{q.inclusive=!1,tY.init($,q);let I=$._zod.parse;a0($._zod,"propValues",()=>{let Y={};for(let J of q.options){let Q=J._zod.propValues;if(!Q||Object.keys(Q).length===0)throw Error(`Invalid discriminated union option at index "${q.options.indexOf(J)}"`);for(let[K,z]of Object.entries(Q)){if(!Y[K])Y[K]=new Set;for(let G of z)Y[K].add(G)}}return Y});let U=Vq(()=>{let Y=q.options,J=new Map;for(let Q of Y){let K=Q._zod.propValues?.[q.discriminator];if(!K||K.size===0)throw Error(`Invalid discriminated union option at index "${q.options.indexOf(Q)}"`);for(let z of K){if(J.has(z))throw Error(`Duplicate discriminator value "${String(z)}"`);J.set(z,Q)}}return J});$._zod.parse=(Y,J)=>{let Q=Y.value;if(!M7(Q))return Y.issues.push({code:"invalid_type",expected:"object",input:Q,inst:$}),Y;let K=U.value.get(Q?.[q.discriminator]);if(K)return K._zod.run(Y,J);if(q.unionFallback||J.direction==="backward")return I(Y,J);return Y.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:q.discriminator,options:Array.from(U.value.keys()),input:Q,path:[q.discriminator],inst:$}),Y}}),_N=o("$ZodIntersection",($,q)=>{n0.init($,q),$._zod.parse=(I,U)=>{let Y=I.value,J=q.left._zod.run({value:Y,issues:[]},U),Q=q.right._zod.run({value:Y,issues:[]},U);if(J instanceof Promise||Q instanceof Promise)return Promise.all([J,Q]).then(([z,G])=>{return nx(I,z,G)});return nx(I,J,Q)}});function dO($,q){if($===q)return{valid:!0,data:$};if($ instanceof Date&&q instanceof Date&&+$===+q)return{valid:!0,data:$};if(r5($)&&r5(q)){let I=Object.keys(q),U=Object.keys($).filter((J)=>I.indexOf(J)!==-1),Y={...$,...q};for(let J of U){let Q=dO($[J],q[J]);if(!Q.valid)return{valid:!1,mergeErrorPath:[J,...Q.mergeErrorPath]};Y[J]=Q.data}return{valid:!0,data:Y}}if(Array.isArray($)&&Array.isArray(q)){if($.length!==q.length)return{valid:!1,mergeErrorPath:[]};let I=[];for(let U=0;U<$.length;U++){let Y=$[U],J=q[U],Q=dO(Y,J);if(!Q.valid)return{valid:!1,mergeErrorPath:[U,...Q.mergeErrorPath]};I.push(Q.data)}return{valid:!0,data:I}}return{valid:!1,mergeErrorPath:[]}}function nx($,q,I){let U=new Map,Y;for(let K of q.issues)if(K.code==="unrecognized_keys"){Y??(Y=K);for(let z of K.keys){if(!U.has(z))U.set(z,{});U.get(z).l=!0}}else $.issues.push(K);for(let K of I.issues)if(K.code==="unrecognized_keys")for(let z of K.keys){if(!U.has(z))U.set(z,{});U.get(z).r=!0}else $.issues.push(K);let J=[...U].filter(([,K])=>K.l&&K.r).map(([K])=>K);if(J.length&&Y)$.issues.push({...Y,keys:J});if(t5($))return $;let Q=dO(q.value,I.value);if(!Q.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(Q.mergeErrorPath)}`);return $.value=Q.data,$}var HG=o("$ZodTuple",($,q)=>{n0. Line truncated
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let Q of $.seen.entries()){let K=Q[1];if(q===Q[0]){J(Q);continue}if($.external){let w=$.external.registry.get(Q[0])?.id;if(q!==Q[0]&&w){J(Q);continue}}if($.metadataRegistry.get(Q[0])?.id){J(Q);continue}if(K.cycle){J(Q);continue}if(K.count>1){if($.reused==="ref"){J(Q);continue}}}}function $9($,q){let I=$.seen.get(q);if(!I)throw Error("Unprocessed schema. This is a bug in Zod.");let U=(K)=>{let z=$.seen.get(K);if(z.ref===null)return;let w=z.def??z.schema,G={...w},H=z.ref;if(z.ref=null,H){U(H);let W=$.seen.get(H),X=W.schema;if(X.$ref&&($.target==="draft-07"||$.target==="draft-04"||$.target==="openapi-3.0"))w.allOf=w.allOf??[],w.allOf.push(X);else Object.assign(w,X);if(Object.assign(w,G),K._zod.parent===H)for(let D in w){if(D==="$ref"||D==="allOf")continue;if(!(D in G))delete w[D]}if(X.$ref&&W.def)for(let D in w){if(D==="$ref"||D==="allOf")continue;if(D in W.def&&JSON.stringify(w[D])===JSON.stringify(W.def[D]))delete w[D]}}let V=K._zod.parent;if(V&&V!==H){U(V);let W=$.seen.get(V);if(W?.schema.$ref){if(w.$ref=W.schema.$ref,W.def)for(let X in w){if(X==="$ref"||X==="allOf")continue;if(X in W.def&&JSON.stringify(w[X])===JSON.stringify(W.def[X]))delete w[X]}}}$.override({zodSchema:K,jsonSchema:w,path:z.path??[]})};for(let K of[...$.seen.entries()].reverse())U(K[0]);let Y={};if($.target==="draft-2020-12")Y.$schema="https://json-schema.org/draft/2020-12/schema";else if($.target==="draft-07")Y.$schema="http://json-schema.org/draft-07/schema#";else if($.target==="draft-04")Y.$schema="http://json-schema.org/draft-04/schema#";else if($.target==="openapi-3.0");if($.external?.uri){let K=$.external.registry.get(q)?.id;if(!K)throw Error("Schema is missing an `id` property");Y.$id=$.external.uri(K)}Object.assign(Y,I.def??I.schema);let J=$.metadataRegistry.get(q)?.id;if(J!==void 0&&Y.id===J)delete Y.id;let Q=$.external?.defs??{};for(let K of $.seen.entries()){let z=K[1];if(z.def&&z.defId){if(z.def.id===z.defId)delete z.def.id;Q[z.defId]=z.def}}if($.external);else if(Object.keys(Q).length>0)if($.target==="draft-2020-12")Y.$defs=Q;else Y.definitions=Q;try{let K=JSON.parse(JSON.stringify(Y));return Object.defineProperty(K,"~standard",{value:{...q["~standard"],jsonSchema:{input:Rq(q,"input",$.processors),output:Rq(q,"output",$.processors)}},enumerable:!1,writable:!1}),K}catch(K){throw Error("Error converting schema to JSON.")}}function E6($,q){let I=q??{seen:new Set};if(I.seen.has($))return!1;I.seen.add($);let U=$._zod.def;if(U.type==="transform")return!0;if(U.type==="array")return E6(U.element,I);if(U.type==="set")return E6(U.valueType,I);if(U.type==="lazy")return E6(U.getter(),I);if(U.type==="promise"||U.type==="optional"||U.type==="nonoptional"||U.type==="nullable"||U.type==="readonly"||U.type==="default"||U.type==="prefault")return E6(U.innerType,I);if(U.type==="intersection")return E6(U.left,I)||E6(U.right,I);if(U.type==="record"||U.type==="map")return E6(U.keyType,I)||E6(U.valueType,I);if(U.type==="pipe"){if($._zod.traits.has("$ZodCodec"))return!0;return E6(U.in,I)||E6(U.out,I)}if(U.type==="object"){for(let Y in U.shape)if(E6(U.shape[Y],I))return!0;return!1}if(U.type==="union"){for(let Y of U.options)if(E6(Y,I))return!0;return!1}if(U.type==="tuple"){for(let Y of U.items)if(E6(Y,I))return!0;if(U.rest&&E6(U.rest,I))return!0;return!1}return!1}var uM=($,q={})=>(I)=>{let U=s5({...I,processors:q});return j1($,U),e5(U,$),$9(U,$)},Rq=($,q,I={})=>(U)=>{let{libraryOptions:Y,target:J}=U??{},Q=s5({...Y??{},target:J,io:q,processors:I});return j1($,Q),e5(Q,$),$9(Q,$)};var SO0={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},xM=($,q,I,U)=>{let Y=I;Y.type="string";let{minimum:J,maximum:Q,format:K,patterns:z,contentEncoding:w}=$._zod.bag;if(typeof J==="number")Y.minLength=J;if(typeof Q==="number")Y.maxLength=Q;if(K){if(Y.format=SO0[K]??K,Y.format==="")delete Y.format;if(K==="time")delete Y.format}if(w)Y.contentEncoding=w;if(z&&z.size>0){let G=[...z];if(G.length===1)Y.pattern=G[0].source;else if(G.length>1)Y.allOf=[...G.map((H)=>({...q.target==="draft-07"||q.target==="draft-04"||q.target==="openapi-3.0"?{type:"string"}:{},pattern:H.source}))]}},kM=($,q,I,U)=>{let Y=I,{minimum:J,maximum:Q,format:K,multipleOf:z,exclusiveMaximum:w,exclusiveMinimum:G}=$._zod.bag;if(typeof K==="string"&&K.includes("int"))Y.type="integer";else Y.type="number";let H=typeof G==="number"&&G>=(J??Number.NEGATIVE_INFINITY),V=typeof w==="number"&&w<=(Q??Number.POSITIVE_INFINITY),W=q.target==="draft-04"||q.target==="openapi-3.0";if(H)if(W)Y.minimum=G,Y.exclusiveMinimum=!0;else Y.exclusiveMinimum=G;else if(typeof J==="number")Y.minimum=J;if(V)if(W)Y.maximum=w,Y.exclusiveMaximum=!0;else Y.exclusiveMaximum=w;else if(typeof Q==="number")Y.maximum=Q;if(typeof z==="number")Y.multipleOf=z},fM=($,q,I,U)=>{I.type="boolean"},nM=($,q,I,U)=>{if(q.unrepresentable==="throw")throw Error("BigInt cannot be represented in JSON Schema")},bM=($,q,I,U)=>{if(q.unrepresentable==Line truncated
`);if($===-1)return null;let q=this._buffer.toString("utf8",0,$).replace(/\r$/,"");return this._buffer=this._buffer.subarray($+1),IR0(q)}clear(){this._buffer=void 0}}function IR0($){return vf.parse(JSON.parse($))}function Bc($){return JSON.stringify($)+`
`}class $E{constructor($=Rc.stdin,q=Rc.stdout){this._stdin=$,this._stdout=q,this._readBuffer=new eT,this._started=!1,this._ondata=(I)=>{this._readBuffer.append(I),this.processReadBuffer()},this._onerror=(I)=>{this.onerror?.(I)}}async start(){if(this._started)throw Error("StdioServerTransport already started! If using Server class, note that connect() calls start() automatically.");this._started=!0,this._stdin.on("data",this._ondata),this._stdin.on("error",this._onerror)}processReadBuffer(){while(!0)try{let $=this._readBuffer.readMessage();if($===null)break;this.onmessage?.($)}catch($){this.onerror?.($)}}async close(){if(this._stdin.off("data",this._ondata),this._stdin.off("error",this._onerror),this._stdin.listenerCount("data")===0)this._stdin.pause();this._readBuffer.clear(),this.onclose?.()}send($){return new Promise((q)=>{let I=Bc($);if(this._stdout.write(I))q();else this._stdout.once("drain",q)})}}import{dirname as _u,join as kw1}from"node:path";import{fileURLToPath as fw1}from"node:url";class q5 extends Error{name="KyError";get isKyError(){return!0}}class i6 extends q5{name="HTTPError";response;request;options;data;constructor($,q,I){let U=$.status||$.status===0?$.status:"",Y=$.statusText??"",J=`${U} ${Y}`.trim(),Q=J?`status code ${J}`:"an unknown error";super(`Request failed with ${Q}: ${q.method} ${q.url}`);this.response=$,this.request=q,this.options=I}}class sJ extends q5{name="NetworkError";request;constructor($,q){super(`Request failed due to a network error: ${$.method} ${$.url}`,q);this.request=$}}class eJ extends Error{name="NonError";value;constructor($){let q="Non-error value was thrown";try{if(typeof $==="string")q=$;else if($&&typeof $==="object"&&"message"in $&&typeof $.message==="string")q=$.message}catch{}super(q);this.value=$}}class II extends q5{name="ForceRetryError";customDelay;code;customRequest;constructor($){let q=$?.cause?$.cause instanceof Error?$.cause:new eJ($.cause):void 0;super($?.code?`Forced retry: ${$.code}`:"Forced retry",q?{cause:q}:void 0);this.customDelay=$?.delay,this.code=$?.code,this.customRequest=$?.request}}class qE extends Error{name="SchemaValidationError";issues;constructor($){super("Response schema validation failed");this.issues=$}}class p$ extends q5{name="TimeoutError";request;constructor($){super(`Request timed out: ${$.method} ${$.url}`);this.request=$}}var IE=(()=>{let $=!1,q=!1,I=typeof globalThis.ReadableStream==="function",U=typeof globalThis.Request==="function";if(I&&U)try{q=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return $=!0,"half"}}).headers.has("Content-Type")}catch(Y){if(Y instanceof Error&&Y.message==="unsupported BodyInit type")return!1;throw Y}return $&&!q})(),vc=typeof globalThis.AbortController==="function",XH=typeof globalThis.AbortSignal==="function"&&typeof globalThis.AbortSignal.any==="function",Cc=typeof globalThis.ReadableStream==="function",_c=typeof globalThis.FormData==="function",LH=["get","post","put","patch","head","delete"],UR0=()=>{return};UR0();var hc={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*",bytes:"*/*"},UI=2147483647,Sc=40,DH=Symbol("stop");class OH{options;constructor($){this.options=$}}var yc=($)=>new OH($),uc={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,baseUrl:!0,prefix:!0,retry:!0,timeout:!0,totalTimeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0,context:!0},xc={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,duplex:!0};var NH=new TextEncoder,YR0=($)=>{if(!$)return 0;if($ instanceof FormData){let q=0;for(let[I,U]of $)q+=Sc,q+=NH.encode(`Content-Disposition: form-data; name="${I}"`).byteLength,q+=typeof U==="string"?NH.encode(U).byteLength:U.size;return q}if($ instanceof Blob)return $.size;if($ instanceof ArrayBuffer||ArrayBuffer.isView($))return $.byteLength;if(typeof $==="string")return NH.encode($).byteLength;if($ instanceof URLSearchParams)return NH.encode($.toString()).byteLength;return 0},kc=($,q,I)=>{let U,Y=0;return $.pipeThrough(new TransformStream({transform(J,Q){if(Q.enqueue(J),U){Y+=U.byteLength;let K=q===0?0:Y/q;if(K>=1)K=1-Number.EPSILON;I?.({percent:K,totalBytes:Math.max(q,Y),transferredBytes:Y},U)}U=J},flush(){if(U)Y+=U.byteLength,I?.({percent:1,totalBytes:Math.max(q,Y),transferredBytes:Y},U)}}))},fc=($,q)=>{if(!$.body)return $;let I={status:$.status,statusText:$.statusText,headers:$.headers};if($.status===204)return new Response(null,I);let U=Math.max(0,Number($.headers.get("content-length"))||0);return new Response(kc($.body,U,q),I)},nc=($,q,I)=>{if(!$.body)return $;let U=YR0(I??$.body);return new Request($,{duplex:"half",body:kc($.body,U,q)})};var H8=($)=>$!==null&&typeof $==="object";var JR0=Symbol("replaceOption"),UE=($)=>H8($)&&$[JR0]===!0?{isReplace:!0,value:$.value}:{isReplace:!1,value:$};var qQ=(...$)=>{for(let q of $)if( Line truncated
`,{mode:384}),q}function ZI($,q,I=[]){let U=q.corpId?.trim()||void 0,Y=q.stateful?q.defaultCorpId?.trim()||void 0:void 0,J=U??Y;if(J){let K=$.find((z)=>z.id===J);if(K)return K;throw Error(`No enterprise config found for ${J}`)}if(!q.stateful)throw Error("Stateless mode is enabled. Every enterprise command requires --corp <corpId>. Use `seal-home config mode stateful` to enable a default enterprise.");let Q=$[0];if(Q)return Q;throw Error("No enterprise config found. Add a non-example JSON file under one of: "+(I.length?I.join(", "):"the configured enterprise directories"))}import{readFileSync as Gz1}from"node:fs";import{randomBytes as Hz1}from"node:crypto";var il=300000,nl=new Map;function vv0($,q){return $.map((I)=>I.trim()).filter(Boolean).map((I)=>q?I:I.toLowerCase())}function Cv0($,q){return q?$:$.toLowerCase()}function _v0($,q,I,U){let Y=Cv0($,U),J=q.filter((Q)=>Y.includes(Q));if(I==="all"&&J.length!==q.length)return[];return J}function hv0($){if(typeof $==="string")return $.split(/\r?\n/);return JSON.stringify($,null,2).split(/\r?\n/)}function Sv0($,q){if(q.fields&&!q.fields.has($.field))return[];let I=hv0($.value),U=[];return I.forEach((Y,J)=>{let Q=_v0(Y,q.keywords,q.matchMode,q.caseSensitive);if(Q.length===0)return;let K=Math.max(0,J-q.contextLines),z=Math.min(I.length,J+q.contextLines+1),w={area:$.area,entityType:$.entityType,entityId:$.entityId,title:$.title,field:$.field,lineNumber:J+1,matchedKeywords:Q,matchedText:dH(Y,q.maxChars),context:{before:q.snippetOnly?[]:I.slice(K,J).map((G)=>dH(G,q.maxChars)),line:dH(Y,q.maxChars),after:q.snippetOnly?[]:I.slice(J+1,z).map((G)=>dH(G,q.maxChars))},metadata:$.metadata};if(q.snippetOnly)w.context={before:[],line:w.context.line,after:[]};U.push(w)}),U}function dH($,q){if(!q||$.length<=q)return $;return`${$.slice(0,Math.max(0,q))}...`}function yv0($){return[{area:"rules",entityType:"rule",entityId:$.id,title:$.scope,field:"description",value:$.description,metadata:{scope:$.scope,strictness:$.strictness,status:$.status}},{area:"rules",entityType:"rule",entityId:$.id,title:$.scope,field:"scope",value:$.scope,metadata:{strictness:$.strictness,status:$.status}}]}function bl($){return $.rules.flatMap((q,I)=>{let U=`${$.id}:${q.description.slice(0,32)}`,Y={versionId:$.id,versionNumber:$.versionNumber,versionName:$.versionName,publishedByName:$.publishedByName,publishedAt:$.publishedAt,scope:q.scope,strictness:q.strictness,code:"code"in q?q.code:void 0,index:I};return[{area:"rules",entityType:"rule",entityId:U,title:`${$.versionName} / ${q.scope}`,field:"history.description",value:q.description,metadata:Y},{area:"rules",entityType:"rule",entityId:U,title:`${$.versionName} / ${q.scope}`,field:"history.scope",value:q.scope,metadata:Y}]})}function uv0($){return[{area:"documents",entityType:"document",entityId:$.id,title:$.title,field:"title",value:$.title,metadata:{status:$.status,scenarios:$.scenarios,tags:$.tags}},{area:"documents",entityType:"document",entityId:$.id,title:$.title,field:"purpose",value:$.purpose,metadata:{status:$.status,scenarios:$.scenarios,tags:$.tags}},{area:"documents",entityType:"document",entityId:$.id,title:$.title,field:"content",value:$.content,metadata:{status:$.status,scenarios:$.scenarios,tags:$.tags}}]}function xv0($){let q=[];if($.decisionPreferences)for(let[I,U]of Object.entries($.decisionPreferences))q.push({area:"preferences",entityType:"preference",field:`decisionPreferences.${I}`,value:U,metadata:{integrationSystem:$.integrationSystem}});return $.integrations.forEach((I,U)=>{q.push({area:"preferences",entityType:"integration",title:I.outboundName,field:`integrations[${U}]`,value:I,metadata:{type:I.type,outboundName:I.outboundName,mode:I.mode,corporationId:I.corporationId}})}),q}async function kv0($,q,I){let U=I.ruleVersionScope??"current",Y=[q.id,`ruleVersionScope=${U}`,`ruleVersionId=${I.ruleVersionId??""}`,`ruleVersionNumber=${I.ruleVersionNumber??""}`,`latestRuleVersion=${I.latestRuleVersion??!1}`,`documentLimit=${I.documentLimit??100}`].join("|"),J=nl.get(Y);if(!I.refresh&&J&&Date.now()<J.expiresAt)return J;let[Q,K,z]=await Promise.all([fv0($,{scope:U,versionId:I.ruleVersionId,versionNumber:I.ruleVersionNumber,latest:I.latestRuleVersion}),HQ($,{limit:I.documentLimit??100}),K4($,q.seal.endpoints.approvalStylePreferences)]),w=Date.now(),G={entries:[...Q,...K.articles.flatMap(uv0),...xv0(z)],fetchedAt:w,expiresAt:w+il};return nl.set(Y,G),G}async function fv0($,q){if(q.scope==="current")return(await Z8($)).rules.flatMap(yv0);if(q.scope==="version"){let U=await nv0($,q);return bl(U)}return(await U5($)).flatMap(bl)}async function nv0($,q){if(q.versionId)return GQ($,q.versionId);let I=await U5($),U=q.versionNumber?I.find((Y)=>Y.versionNumber===q.versionNumber):I[0];if(!U)throw Error(q.versionNumber?`Rule version not found: ${q.versionNumber}`:"No rule versions found");return U}async function pl($,q,I){let U=I.matchMode??"any",Y=I.caseSensitive??!1,J=I.contextLines??3,Q=new Set(I.areas??["rules","documents","preferences"]),K=I.maxRe Line truncated
`,"utf8"),I}function rl($){return $.map((q,I)=>{let U;if(typeof q.code==="number")U=`#${String(q.code).padStart(4,"0")}`;else if(typeof q.code==="string")U=q.code.startsWith("#")?q.code:`#${q.code}`;else U=`#${String(I+1).padStart(4,"0")}`;return{id:q.id,code:U,name:q.name,description:q.description,scope:q.scope,strictness:q.strictness}})}class k7 extends Error{errors;warnings;constructor($,q=[]){super(`材料包校验失败:${$.length} 个错误`);this.errors=$;this.warnings=q;this.name="MaterialPackValidationError"}}import{createHmac as IC0,randomBytes as UC0}from"node:crypto";function YC0($,q,I,U){return IC0("sha256",U).update(`${$}.${q}.${JSON.stringify(I)}`).digest("hex")}function dE($,q){let I=Math.floor(Date.now()/1000),U=UC0(16).toString("hex");return{Authorization:`Bearer ${q}`,"x-webhook-signature":YC0(I,U,$,q),"x-webhook-timestamp":String(I),"x-webhook-nonce":U}}var yg=CY(Xm(),1),Yo=CY(Uo(),1);var GV={maxEntries:1000,maxTotalSize:524288000,maxCompressionRatio:150};async function Jo($){return new Promise((q,I)=>{yg.default.fromBuffer(Buffer.from($),{lazyEntries:!0,autoClose:!0},(U,Y)=>{if(U||!Y)return I(U??Error("无法打开 ZIP"));let J=[];Y.readEntry(),Y.on("entry",(Q)=>{let K=Qo(Q);if(!K.endsWith("/")&&!h_0(K))J.push({fileName:K,uncompressedSize:Q.uncompressedSize,compressedSize:Q.compressedSize,raw:Q});Y.readEntry()}),Y.on("end",()=>q(J)),Y.on("error",I)})})}function Qo($){if($.fileNameUTF8||$.generalPurposeBitFlag&2048)return $.fileNameUTF8??$.fileName;let q=Buffer.from(String($.fileName),"binary"),I=q.toString("utf8");if(I.includes("�")||/[\u0080-\u00FF]/.test(I)){let U=Yo.default.decode(q,"gbk");if(!U.includes("�"))return U}return I}function h_0($){let q=$.split("/").pop()??"";return $.split("/").includes("__MACOSX")||q===".DS_Store"||q.startsWith("._")||q.startsWith(".~")||q.startsWith("~$")}function Ko($){let q=[];if($.length>GV.maxEntries)q.push(`文件数超过 ${GV.maxEntries}`);if($.reduce((Y,J)=>Y+J.uncompressedSize,0)>GV.maxTotalSize)q.push("解压后总大小超过 500MB");for(let Y of $){if(Y.fileName.startsWith("/")||Y.fileName.split("/").includes(".."))q.push(`存在不安全路径: ${Y.fileName}`);if(Y.compressedSize>0&&Y.uncompressedSize/Y.compressedSize>GV.maxCompressionRatio)q.push(`压缩比超过 150: ${Y.fileName}`)}if(!$.find((Y)=>Y.fileName==="信息表.xlsx"))q.push("ZIP 根目录缺少精确名为「信息表.xlsx」的文件");if($.some((Y)=>Y.fileName.toLowerCase().endsWith(".zip")))q.push("不允许嵌套 ZIP");if(q.length)throw new k7(q)}function ug($,q){return new Promise((I,U)=>{yg.default.fromBuffer(Buffer.from($),{lazyEntries:!0,autoClose:!0},(Y,J)=>{if(Y||!J)return U(Y??Error("无法打开 ZIP"));J.readEntry(),J.on("entry",(Q)=>{if(Qo(Q)!==q.fileName)return J.readEntry();J.openReadStream(Q,(K,z)=>{if(K||!z)return U(K??Error(`无法读取 ${q.fileName}`));let w=[];z.on("data",(G)=>w.push(G)),z.on("end",()=>I(Buffer.concat(w))),z.on("error",U)})}),J.on("error",U)})})}var _V0=CY(vV0(),1);function $D($,q,I,U){return{key:$,label:q,type:I,value:U}}function hV0($,q,I){return $D($,q,"TEXT",I==null?"":String(I))}function SV0($,q,I){return $D($,q,"AMOUNT",typeof I==="number"?{amount:I,currency:"CNY"}:null)}function yV0($){if($ instanceof Date)return $.toISOString();if(typeof $==="string"&&$.trim())return $.trim();return null}function cK1($){if($ instanceof Date)return Math.floor($.getTime()/1000);if(typeof $==="string"&&$.trim()){let q=Date.parse($.trim().replace(" ","T"));if(Number.isFinite(q))return Math.floor(q/1000)}return null}function DY($){let q=new Map;return $.getRow(1).eachCell((I,U)=>q.set(String(I.value??"").trim(),U)),q}function OY($,q,I){let U=q.get(I);return U?$.getCell(U).value:void 0}function dK1($,q){return[["会议编号","meeting_id","TEXT"],["会议名称","meeting_name","TEXT"],["状态","status","TEXT"],["总金额","total_amount","AMOUNT"],["税前劳务总额","pretax_labor_total","AMOUNT"],["报销事由","reimbursement_reason","TEXT"],["po码","po_code","TEXT"],["快递单号","tracking_number","TEXT"],["申请日期","application_date","DATE"],["更新日期","updated_date","DATE"]].flatMap(([U,Y,J])=>{let Q=OY($,q,U);if(Q==null||Q==="")return[];return[J==="TEXT"?hV0(Y,U,Q):J==="AMOUNT"?SV0(Y,U,Q):$D(Y,U,J,yV0(Q))]})}function CV0($,q,I){return I.flatMap(([U,Y,J])=>{let Q=OY($,q,U);if(Q==null||Q==="")return[];return[J==="TEXT"?hV0(Y,U,Q):J==="AMOUNT"?SV0(Y,U,Q):$D(Y,U,J,yV0(Q))]})}var lK1=[["姓名","name","TEXT"],["身份证号码","id_number","TEXT"],["手机号","phone","TEXT"],["劳务费用","labor_fee","AMOUNT"],["税前费用","pretax_fee","AMOUNT"],["开户行","bank","TEXT"],["支行名称","branch_name","TEXT"],["联行号","bank_code","TEXT"],["银行卡号","bank_card_number","TEXT"]],mK1=[["报销金额","reimbursement_amount","AMOUNT"],["费用类型","expense_type","TEXT"],["发生时间","occurrence_time","DATE"],["收款人","payee","TEXT"],["开户行","bank","TEXT"],["支行名称","branch_name","TEXT"],["支行行 Line truncated
`);return{recordId:$.id,sourceDocumentSN:$.sourceDocumentSN,sourceDocumentId:$.sourceDocumentId,document:FY({id:q?.id,sn:q?.sn??q?.sourceDocumentSN??$.sourceDocumentSN,title:q?.title??q?.name,template:GD(q,["template.name","templateName","form.name","formName","formTitle"]),amount:zD(I,["金额","报销金额","付款金额","合计","价税合计"])??GD(q,["amount","totalAmount","expenseAmount"]),expenseType:zD(I,["费用类型","费用类别","报销类型"]),costCompany:zD(I,["费用承担公司","承担公司","成本中心","费用归属"]),payee:zD(I,["收款方","收款账户","收款信息","开户名","银行账号"]),keyFields:I.slice(0,30)}),invoices:Tz1($),attachments:HI($,{summary:!0}).attachments,aiResult:VD($),manualResult:$q($)?.value,hints:FY({amountMentions:uW0(U,["金额","合计","税率"],8),partyMentions:uW0(U,["买方","卖方","甲方","乙方","收款"],8)})}}function Fz1($){let q=[["result.citedRules",b5($,"result.citedRules")],["result.matchedRules",b5($,"result.matchedRules")],["result.ruleResults",b5($,"result.ruleResults")],["result.rules",b5($,"result.rules")],["pipelineData.citedRules",b5($,"pipelineData.citedRules")],["pipelineData.matchedRules",b5($,"pipelineData.matchedRules")]],I=[],U=new Set;for(let[Y,J]of q)(Array.isArray(J)?J:J&&typeof J==="object"?Object.values(J):[]).forEach((K,z)=>{let w=Hz(K);if(!w)return;let G=$4(w.runtimeRuleId)??$4(w.runtimeId)??$4(w.id)??$4(w.ruleId),H=$4(w.ruleCode)??$4(w.code)??(G?jz1(G):void 0),V=FY({runtimeRuleId:G,ruleCode:H,versionNumber:Az1(w.versionNumber)??$.ruleSetVersionNumber,scope:$4(w.scope),strictness:$4(w.strictness),appliedAnalysis:w.appliedAnalysis??w.analysis??w.reasoning,checkResult:w.checkResult??w.result??w.decision,findings:w.findings??w.riskPoints??w.evidence,sourcePath:`${Y}.${z}`}),W=JSON.stringify(V);if(!U.has(W))U.add(W),I.push(V)});return{recordId:$.id,sourceDocumentSN:$.sourceDocumentSN,sourceDocumentId:$.sourceDocumentId,ruleSetVersionNumber:$.ruleSetVersionNumber,count:I.length,rules:I}}function GD($,q){if(!$)return;for(let I of q){let U=b5($,I);if(U!==void 0)return U}return}function yW0($,q){if(!$)return 0;for(let I of q){let U=b5($,I);if(Array.isArray(U))return U.length;if(U&&typeof U==="object")return Object.keys(U).length;if(typeof U==="number")return U}return 0}function b5($,q){return q.split(".").reduce((I,U)=>{if(I===void 0||I===null)return;if(Array.isArray(I)){let Y=Number(U);return Number.isInteger(Y)?I[Y]:void 0}if(typeof I==="object")return I[U];return},$)}function Mz1($,q,I){let U=q.split("."),Y=$;for(let J of U.slice(0,-1)){let Q=Y[J];if(!Q||typeof Q!=="object"||Array.isArray(Q))Y[J]={};Y=Y[J]}Y[U[U.length-1]??q]=I}function FY($){return Object.fromEntries(Object.entries($).filter(([,q])=>q!==void 0))}function Hz($){return $&&typeof $==="object"&&!Array.isArray($)?$:void 0}function Az1($){return typeof $==="number"&&Number.isFinite($)?$:void 0}function Pz1($){let q=[];return Uu($,"document",q),q}function Uu($,q,I){if(Array.isArray($)){$.forEach((Q,K)=>Uu(Q,`${q}.${K}`,I));return}let U=Hz($);if(!U)return;let Y=$4(U.label)??$4(U.name)??$4(U.title)??$4(U.fieldName),J=U.value??U.displayValue??U.text??U.content;if(Y&&J!==void 0&&typeof J!=="object")I.push(FY({path:q,label:Y,value:J,type:$4(U.type)??$4(U.fieldType)}));for(let[Q,K]of Object.entries(U)){if(Q==="attachments")continue;Uu(K,`${q}.${Q}`,I)}}function zD($,q){return $.find((U)=>{let Y=$4(U.label)??"";return q.some((J)=>Y.includes(J))})?.value}function Tz1($){let q=[];return HD($.result,"result",q),HD($.document,"document",q),q.slice(0,20)}function HD($,q,I){if(Array.isArray($)){$.forEach((Y,J)=>HD(Y,`${q}.${J}`,I));return}let U=Hz($);if(!U)return;if(/invoice|发票/i.test(q))I.push(FY({path:q,fileName:$4(U.fileName)??$4(U.filename)??$4(U.name),buyer:U.buyer??U.buyerName??U.purchaserName,seller:U.seller??U.sellerName,amount:U.amount??U.totalAmount??U.total,taxRate:U.taxRate,category:U.category??U.type}));for(let[Y,J]of Object.entries(U))HD(J,`${q}.${Y}`,I)}function uW0($,q,I){return $.split(/\r?\n/).filter((U)=>q.some((Y)=>U.includes(Y))).slice(0,I)}function wD($){return $.map((q)=>{let I=e3(q);return{recordId:I.id,tenantId:I.tenantId,agentId:I.agentId,sourceDocumentSN:I.sourceDocumentSN,sourceDocumentId:I.sourceDocumentId,simulationBatchId:I.simulationBatchId,langfuseTraceId:I.langfuseTraceId,langfuseSessionFallback:I.langfuseSessionFallback,ruleSetVersionNumber:I.ruleSetVersionNumber,ruleSetPublishedAt:I.ruleSetPublishedAt,ruleSetPublishedByName:I.ruleSetPublishedByName,resolution:I.langfuseTraceId?"trace":I.langfuseSessionFallback?"session-fallback":"unresolved"}})}function qu($){return{id:$.id,tenantId:$.tenantId,versionNumber:$.versionNumber,versionName:$.versionName,publishedBy:$.publishedBy,publishedByName:$.publishedByName,rulesCount:$.rules.length,publishedAt:$.publishedAt,createdAt:$.createdAt}}async function Ez1($,q){if(q.recordId&&!q.versionId&&!q.versionNumber&&!q.latest){let I=await V6($,q.recordId);if(!I.ruleSetVersionNumber)throw Er Line truncated
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let Q of $.seen.entries()){let K=Q[1];if(q===Q[0]){J(Q);continue}if($.external){let G=$.external.registry.get(Q[0])?.id;if(q!==Q[0]&&G){J(Q);continue}}if($.metadataRegistry.get(Q[0])?.id){J(Q);continue}if(K.cycle){J(Q);continue}if(K.count>1){if($.reused==="ref"){J(Q);continue}}}}function q9($,q){let I=$.seen.get(q);if(!I)throw Error("Unprocessed schema. This is a bug in Zod.");let U=(K)=>{let z=$.seen.get(K);if(z.ref===null)return;let G=z.def??z.schema,H={...G},w=z.ref;if(z.ref=null,w){U(w);let W=$.seen.get(w),X=W.schema;if(X.$ref&&($.target==="draft-07"||$.target==="draft-04"||$.target==="openapi-3.0"))G.allOf=G.allOf??[],G.allOf.push(X);else Object.assign(G,X);if(Object.assign(G,H),K._zod.parent===w)for(let D in G){if(D==="$ref"||D==="allOf")continue;if(!(D in H))delete G[D]}if(X.$ref&&W.def)for(let D in G){if(D==="$ref"||D==="allOf")continue;if(D in W.def&&JSON.stringify(G[D])===JSON.stringify(W.def[D]))delete G[D]}}let V=K._zod.parent;if(V&&V!==w){U(V);let W=$.seen.get(V);if(W?.schema.$ref){if(G.$ref=W.schema.$ref,W.def)for(let X in G){if(X==="$ref"||X==="allOf")continue;if(X in W.def&&JSON.stringify(G[X])===JSON.stringify(W.def[X]))delete G[X]}}}$.override({zodSchema:K,jsonSchema:G,path:z.path??[]})};for(let K of[...$.seen.entries()].reverse())U(K[0]);let Y={};if($.target==="draft-2020-12")Y.$schema="https://json-schema.org/draft/2020-12/schema";else if($.target==="draft-07")Y.$schema="http://json-schema.org/draft-07/schema#";else if($.target==="draft-04")Y.$schema="http://json-schema.org/draft-04/schema#";else if($.target==="openapi-3.0");if($.external?.uri){let K=$.external.registry.get(q)?.id;if(!K)throw Error("Schema is missing an `id` property");Y.$id=$.external.uri(K)}Object.assign(Y,I.def??I.schema);let J=$.metadataRegistry.get(q)?.id;if(J!==void 0&&Y.id===J)delete Y.id;let Q=$.external?.defs??{};for(let K of $.seen.entries()){let z=K[1];if(z.def&&z.defId){if(z.def.id===z.defId)delete z.def.id;Q[z.defId]=z.def}}if($.external);else if(Object.keys(Q).length>0)if($.target==="draft-2020-12")Y.$defs=Q;else Y.definitions=Q;try{let K=JSON.parse(JSON.stringify(Y));return Object.defineProperty(K,"~standard",{value:{...q["~standard"],jsonSchema:{input:Sq(q,"input",$.processors),output:Sq(q,"output",$.processors)}},enumerable:!1,writable:!1}),K}catch(K){throw Error("Error converting schema to JSON.")}}function E6($,q){let I=q??{seen:new Set};if(I.seen.has($))return!1;I.seen.add($);let U=$._zod.def;if(U.type==="transform")return!0;if(U.type==="array")return E6(U.element,I);if(U.type==="set")return E6(U.valueType,I);if(U.type==="lazy")return E6(U.getter(),I);if(U.type==="promise"||U.type==="optional"||U.type==="nonoptional"||U.type==="nullable"||U.type==="readonly"||U.type==="default"||U.type==="prefault")return E6(U.innerType,I);if(U.type==="intersection")return E6(U.left,I)||E6(U.right,I);if(U.type==="record"||U.type==="map")return E6(U.keyType,I)||E6(U.valueType,I);if(U.type==="pipe"){if($._zod.traits.has("$ZodCodec"))return!0;return E6(U.in,I)||E6(U.out,I)}if(U.type==="object"){for(let Y in U.shape)if(E6(U.shape[Y],I))return!0;return!1}if(U.type==="union"){for(let Y of U.options)if(E6(Y,I))return!0;return!1}if(U.type==="tuple"){for(let Y of U.items)if(E6(Y,I))return!0;if(U.rest&&E6(U.rest,I))return!0;return!1}return!1}var kM=($,q={})=>(I)=>{let U=e5({...I,processors:q});return R1($,U),$9(U,$),q9(U,$)},Sq=($,q,I={})=>(U)=>{let{libraryOptions:Y,target:J}=U??{},Q=e5({...Y??{},target:J,io:q,processors:I});return R1($,Q),$9(Q,$),q9(Q,$)};var fO0={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},fM=($,q,I,U)=>{let Y=I;Y.type="string";let{minimum:J,maximum:Q,format:K,patterns:z,contentEncoding:G}=$._zod.bag;if(typeof J==="number")Y.minLength=J;if(typeof Q==="number")Y.maxLength=Q;if(K){if(Y.format=fO0[K]??K,Y.format==="")delete Y.format;if(K==="time")delete Y.format}if(G)Y.contentEncoding=G;if(z&&z.size>0){let H=[...z];if(H.length===1)Y.pattern=H[0].source;else if(H.length>1)Y.allOf=[...H.map((w)=>({...q.target==="draft-07"||q.target==="draft-04"||q.target==="openapi-3.0"?{type:"string"}:{},pattern:w.source}))]}},bM=($,q,I,U)=>{let Y=I,{minimum:J,maximum:Q,format:K,multipleOf:z,exclusiveMaximum:G,exclusiveMinimum:H}=$._zod.bag;if(typeof K==="string"&&K.includes("int"))Y.type="integer";else Y.type="number";let w=typeof H==="number"&&H>=(J??Number.NEGATIVE_INFINITY),V=typeof G==="number"&&G<=(Q??Number.POSITIVE_INFINITY),W=q.target==="draft-04"||q.target==="openapi-3.0";if(w)if(W)Y.minimum=H,Y.exclusiveMinimum=!0;else Y.exclusiveMinimum=H;else if(typeof J==="number")Y.minimum=J;if(V)if(W)Y.maximum=G,Y.exclusiveMaximum=!0;else Y.exclusiveMaximum=G;else if(typeof Q==="number")Y.maximum=Q;if(typeof z==="number")Y.multipleOf=z},nM=($,q,I,U)=>{I.type="boolean"},iM=($,q,I,U)=>{if(q.unrepresentable==="throw")throw Error("BigInt cannot be represented in JSON Schema")},pM=($,q,I,U)=>{if(q.unrepresentable==Line truncated
`);if($===-1)return null;let q=this._buffer.toString("utf8",0,$).replace(/\r$/,"");return this._buffer=this._buffer.subarray($+1),KR0(q)}clear(){this._buffer=void 0}}function KR0($){return _f.parse(JSON.parse($))}function vc($){return JSON.stringify($)+`
`}class IE{constructor($=Cc.stdin,q=Cc.stdout){this._stdin=$,this._stdout=q,this._readBuffer=new qE,this._started=!1,this._ondata=(I)=>{this._readBuffer.append(I),this.processReadBuffer()},this._onerror=(I)=>{this.onerror?.(I)}}async start(){if(this._started)throw Error("StdioServerTransport already started! If using Server class, note that connect() calls start() automatically.");this._started=!0,this._stdin.on("data",this._ondata),this._stdin.on("error",this._onerror)}processReadBuffer(){while(!0)try{let $=this._readBuffer.readMessage();if($===null)break;this.onmessage?.($)}catch($){this.onerror?.($)}}async close(){if(this._stdin.off("data",this._ondata),this._stdin.off("error",this._onerror),this._stdin.listenerCount("data")===0)this._stdin.pause();this._readBuffer.clear(),this.onclose?.()}send($){return new Promise((q)=>{let I=vc($);if(this._stdout.write(I))q();else this._stdout.once("drain",q)})}}import{dirname as Su,join as rG1}from"node:path";import{fileURLToPath as tG1}from"node:url";class I5 extends Error{name="KyError";get isKyError(){return!0}}class i6 extends I5{name="HTTPError";response;request;options;data;constructor($,q,I){let U=$.status||$.status===0?$.status:"",Y=$.statusText??"",J=`${U} ${Y}`.trim(),Q=J?`status code ${J}`:"an unknown error";super(`Request failed with ${Q}: ${q.method} ${q.url}`);this.response=$,this.request=q,this.options=I}}class $Q extends I5{name="NetworkError";request;constructor($,q){super(`Request failed due to a network error: ${$.method} ${$.url}`,q);this.request=$}}class qQ extends Error{name="NonError";value;constructor($){let q="Non-error value was thrown";try{if(typeof $==="string")q=$;else if($&&typeof $==="object"&&"message"in $&&typeof $.message==="string")q=$.message}catch{}super(q);this.value=$}}class KI extends I5{name="ForceRetryError";customDelay;code;customRequest;constructor($){let q=$?.cause?$.cause instanceof Error?$.cause:new qQ($.cause):void 0;super($?.code?`Forced retry: ${$.code}`:"Forced retry",q?{cause:q}:void 0);this.customDelay=$?.delay,this.code=$?.code,this.customRequest=$?.request}}class UE extends Error{name="SchemaValidationError";issues;constructor($){super("Response schema validation failed");this.issues=$}}class c$ extends I5{name="TimeoutError";request;constructor($){super(`Request timed out: ${$.method} ${$.url}`);this.request=$}}var YE=(()=>{let $=!1,q=!1,I=typeof globalThis.ReadableStream==="function",U=typeof globalThis.Request==="function";if(I&&U)try{q=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return $=!0,"half"}}).headers.has("Content-Type")}catch(Y){if(Y instanceof Error&&Y.message==="unsupported BodyInit type")return!1;throw Y}return $&&!q})(),_c=typeof globalThis.AbortController==="function",Lw=typeof globalThis.AbortSignal==="function"&&typeof globalThis.AbortSignal.any==="function",hc=typeof globalThis.ReadableStream==="function",Sc=typeof globalThis.FormData==="function",Dw=["get","post","put","patch","head","delete"],zR0=()=>{return};zR0();var yc={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*",bytes:"*/*"},zI=2147483647,uc=40,Ow=Symbol("stop");class Nw{options;constructor($){this.options=$}}var xc=($)=>new Nw($),kc={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,baseUrl:!0,prefix:!0,retry:!0,timeout:!0,totalTimeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0,context:!0},fc={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,duplex:!0};var Fw=new TextEncoder,GR0=($)=>{if(!$)return 0;if($ instanceof FormData){let q=0;for(let[I,U]of $)q+=uc,q+=Fw.encode(`Content-Disposition: form-data; name="${I}"`).byteLength,q+=typeof U==="string"?Fw.encode(U).byteLength:U.size;return q}if($ instanceof Blob)return $.size;if($ instanceof ArrayBuffer||ArrayBuffer.isView($))return $.byteLength;if(typeof $==="string")return Fw.encode($).byteLength;if($ instanceof URLSearchParams)return Fw.encode($.toString()).byteLength;return 0},bc=($,q,I)=>{let U,Y=0;return $.pipeThrough(new TransformStream({transform(J,Q){if(Q.enqueue(J),U){Y+=U.byteLength;let K=q===0?0:Y/q;if(K>=1)K=1-Number.EPSILON;I?.({percent:K,totalBytes:Math.max(q,Y),transferredBytes:Y},U)}U=J},flush(){if(U)Y+=U.byteLength,I?.({percent:1,totalBytes:Math.max(q,Y),transferredBytes:Y},U)}}))},nc=($,q)=>{if(!$.body)return $;let I={status:$.status,statusText:$.statusText,headers:$.headers};if($.status===204)return new Response(null,I);let U=Math.max(0,Number($.headers.get("content-length"))||0);return new Response(bc($.body,U,q),I)},ic=($,q,I)=>{if(!$.body)return $;let U=GR0(I??$.body);return new Request($,{duplex:"half",body:bc($.body,U,q)})};var V8=($)=>$!==null&&typeof $==="object";var HR0=Symbol("replaceOption"),JE=($)=>V8($)&&$[HR0]===!0?{isReplace:!0,value:$.value}:{isReplace:!1,value:$};var UQ=(...$)=>{for(let q of $)if( Line truncated
`,{mode:384}),q}function HY($,q,I=[]){let U=q.corpId?.trim()||void 0,Y=q.stateful?q.defaultCorpId?.trim()||void 0:void 0,J=U??Y;if(J){let K=$.find((z)=>z.id===J);if(K)return K;throw Error(`No enterprise config found for ${J}`)}if(!q.stateful)throw Error("Stateless mode is enabled. Every enterprise command requires --corp <corpId>. Use `seal-home config mode stateful` to enable a default enterprise.");let Q=$[0];if(Q)return Q;throw Error("No enterprise config found. Add a non-example JSON file under one of: "+(I.length?I.join(", "):"the configured enterprise directories"))}import{readFileSync as Mz1}from"node:fs";import{randomBytes as Az1}from"node:crypto";var Lw0=300000,Zw0=new Map;function aQ1($,q){return $.map((I)=>I.trim()).filter(Boolean).map((I)=>q?I:I.toLowerCase())}function sQ1($,q){return q?$:$.toLowerCase()}function eQ1($,q,I,U){let Y=sQ1($,U),J=q.filter((Q)=>Y.includes(Q));if(I==="all"&&J.length!==q.length)return[];return J}function $21($){if(typeof $==="string")return $.split(/\r?\n/);return JSON.stringify($,null,2).split(/\r?\n/)}function q21($,q){if(q.fields&&!q.fields.has($.field))return[];let I=$21($.value),U=[];return I.forEach((Y,J)=>{let Q=eQ1(Y,q.keywords,q.matchMode,q.caseSensitive);if(Q.length===0)return;let K=Math.max(0,J-q.contextLines),z=Math.min(I.length,J+q.contextLines+1),G={area:$.area,entityType:$.entityType,entityId:$.entityId,title:$.title,field:$.field,lineNumber:J+1,matchedKeywords:Q,matchedText:uL(Y,q.maxChars),context:{before:q.snippetOnly?[]:I.slice(K,J).map((H)=>uL(H,q.maxChars)),line:uL(Y,q.maxChars),after:q.snippetOnly?[]:I.slice(J+1,z).map((H)=>uL(H,q.maxChars))},metadata:$.metadata};if(q.snippetOnly)G.context={before:[],line:G.context.line,after:[]};U.push(G)}),U}function uL($,q){if(!q||$.length<=q)return $;return`${$.slice(0,Math.max(0,q))}...`}function I21($){return[{area:"rules",entityType:"rule",entityId:$.id,title:$.scope,field:"description",value:$.description,metadata:{scope:$.scope,strictness:$.strictness,status:$.status}},{area:"rules",entityType:"rule",entityId:$.id,title:$.scope,field:"scope",value:$.scope,metadata:{strictness:$.strictness,status:$.status}}]}function Xw0($){return $.rules.flatMap((q,I)=>{let U=`${$.id}:${q.description.slice(0,32)}`,Y={versionId:$.id,versionNumber:$.versionNumber,versionName:$.versionName,publishedByName:$.publishedByName,publishedAt:$.publishedAt,scope:q.scope,strictness:q.strictness,code:"code"in q?q.code:void 0,index:I};return[{area:"rules",entityType:"rule",entityId:U,title:`${$.versionName} / ${q.scope}`,field:"history.description",value:q.description,metadata:Y},{area:"rules",entityType:"rule",entityId:U,title:`${$.versionName} / ${q.scope}`,field:"history.scope",value:q.scope,metadata:Y}]})}function U21($){return[{area:"documents",entityType:"document",entityId:$.id,title:$.title,field:"title",value:$.title,metadata:{status:$.status,scenarios:$.scenarios,tags:$.tags}},{area:"documents",entityType:"document",entityId:$.id,title:$.title,field:"purpose",value:$.purpose,metadata:{status:$.status,scenarios:$.scenarios,tags:$.tags}},{area:"documents",entityType:"document",entityId:$.id,title:$.title,field:"content",value:$.content,metadata:{status:$.status,scenarios:$.scenarios,tags:$.tags}}]}function Y21($){let q=[];if($.decisionPreferences)for(let[I,U]of Object.entries($.decisionPreferences))q.push({area:"preferences",entityType:"preference",field:`decisionPreferences.${I}`,value:U,metadata:{integrationSystem:$.integrationSystem}});return $.integrations.forEach((I,U)=>{q.push({area:"preferences",entityType:"integration",title:I.outboundName,field:`integrations[${U}]`,value:I,metadata:{type:I.type,outboundName:I.outboundName,mode:I.mode,corporationId:I.corporationId}})}),q}async function J21($,q,I){let U=I.ruleVersionScope??"current",Y=[q.id,`ruleVersionScope=${U}`,`ruleVersionId=${I.ruleVersionId??""}`,`ruleVersionNumber=${I.ruleVersionNumber??""}`,`latestRuleVersion=${I.latestRuleVersion??!1}`,`documentLimit=${I.documentLimit??100}`].join("|"),J=Zw0.get(Y);if(!I.refresh&&J&&Date.now()<J.expiresAt)return J;let[Q,K,z]=await Promise.all([Q21($,{scope:U,versionId:I.ruleVersionId,versionNumber:I.ruleVersionNumber,latest:I.latestRuleVersion}),WQ($,{limit:I.documentLimit??100}),K4($,q.seal.endpoints.approvalStylePreferences)]),G=Date.now(),H={entries:[...Q,...K.articles.flatMap(U21),...Y21(z)],fetchedAt:G,expiresAt:G+Lw0};return Zw0.set(Y,H),H}async function Q21($,q){if(q.scope==="current")return(await F$($)).rules.flatMap(I21);if(q.scope==="version"){let U=await K21($,q);return Xw0(U)}return(await Y5($)).flatMap(Xw0)}async function K21($,q){if(q.versionId)return VQ($,q.versionId);let I=await Y5($),U=q.versionNumber?I.find((Y)=>Y.versionNumber===q.versionNumber):I[0];if(!U)throw Error(q.versionNumber?`Rule version not found: ${q.versionNumber}`:"No rule versions found");return U}async function Dw0($,q,I){let U=I.matchMode??"any",Y=I.caseSensitive??!1,J=I.contextLines??3,Q=new Set(I.areas??["rules","documents","preferences"]), Line truncated
`,"utf8"),I}function Pw0($){return $.map((q,I)=>{let U;if(typeof q.code==="number")U=`#${String(q.code).padStart(4,"0")}`;else if(typeof q.code==="string")U=q.code.startsWith("#")?q.code:`#${q.code}`;else U=`#${String(I+1).padStart(4,"0")}`;return{id:q.id,code:U,name:q.name,description:q.description,scope:q.scope,strictness:q.strictness}})}class $q extends Error{errors;warnings;constructor($,q=[]){super(`材料包校验失败:${$.length} 个错误`);this.errors=$;this.warnings=q;this.name="MaterialPackValidationError"}}import{createHmac as P21,randomBytes as T21}from"node:crypto";function E21($,q,I,U){return P21("sha256",U).update(`${$}.${q}.${JSON.stringify(I)}`).digest("hex")}function Uy($,q){let I=Math.floor(Date.now()/1000),U=T21(16).toString("hex");return{Authorization:`Bearer ${q}`,"x-webhook-signature":E21(I,U,$,q),"x-webhook-timestamp":String(I),"x-webhook-nonce":U}}var ly=Hq(pw0(),1),_V0=Hq(CV0(),1);var qD={maxEntries:1000,maxTotalSize:524288000,maxCompressionRatio:150};async function hV0($){return new Promise((q,I)=>{ly.default.fromBuffer(Buffer.from($),{lazyEntries:!0,autoClose:!0},(U,Y)=>{if(U||!Y)return I(U??Error("无法打开 ZIP"));let J=[];Y.readEntry(),Y.on("entry",(Q)=>{let K=SV0(Q);if(!K.endsWith("/")&&!$z1(K))J.push({fileName:K,uncompressedSize:Q.uncompressedSize,compressedSize:Q.compressedSize,raw:Q});Y.readEntry()}),Y.on("end",()=>q(J)),Y.on("error",I)})})}function SV0($){if($.fileNameUTF8||$.generalPurposeBitFlag&2048)return $.fileNameUTF8??$.fileName;let q=Buffer.from(String($.fileName),"binary"),I=q.toString("utf8");if(I.includes("�")||/[\u0080-\u00FF]/.test(I)){let U=_V0.default.decode(q,"gbk");if(!U.includes("�"))return U}return I}function $z1($){let q=$.split("/").pop()??"";return $.split("/").includes("__MACOSX")||q===".DS_Store"||q.startsWith("._")||q.startsWith(".~")||q.startsWith("~$")}function yV0($){let q=[];if($.length>qD.maxEntries)q.push(`文件数超过 ${qD.maxEntries}`);if($.reduce((Y,J)=>Y+J.uncompressedSize,0)>qD.maxTotalSize)q.push("解压后总大小超过 500MB");for(let Y of $){if(Y.fileName.startsWith("/")||Y.fileName.split("/").includes(".."))q.push(`存在不安全路径: ${Y.fileName}`);if(Y.compressedSize>0&&Y.uncompressedSize/Y.compressedSize>qD.maxCompressionRatio)q.push(`压缩比超过 150: ${Y.fileName}`)}if(!$.find((Y)=>Y.fileName==="信息表.xlsx"))q.push("ZIP 根目录缺少精确名为「信息表.xlsx」的文件");if($.some((Y)=>Y.fileName.toLowerCase().endsWith(".zip")))q.push("不允许嵌套 ZIP");if(q.length)throw new $q(q)}function oy($,q){return new Promise((I,U)=>{ly.default.fromBuffer(Buffer.from($),{lazyEntries:!0,autoClose:!0},(Y,J)=>{if(Y||!J)return U(Y??Error("无法打开 ZIP"));J.readEntry(),J.on("entry",(Q)=>{if(SV0(Q)!==q.fileName)return J.readEntry();J.openReadStream(Q,(K,z)=>{if(K||!z)return U(K??Error(`无法读取 ${q.fileName}`));let G=[];z.on("data",(H)=>G.push(H)),z.on("end",()=>I(Buffer.concat(G))),z.on("error",U)})}),J.on("error",U)})})}var xV0=Hq(dS(),1);function ID($,q,I,U){return{key:$,label:q,type:I,value:U}}function kV0($,q,I){return ID($,q,"TEXT",I==null?"":String(I))}function fV0($,q,I){return ID($,q,"AMOUNT",typeof I==="number"?{amount:I,currency:"CNY"}:null)}function bV0($){if($ instanceof Date)return $.toISOString();if(typeof $==="string"&&$.trim())return $.trim();return null}function qz1($){if($ instanceof Date)return Math.floor($.getTime()/1000);if(typeof $==="string"&&$.trim()){let q=Date.parse($.trim().replace(" ","T"));if(Number.isFinite(q))return Math.floor(q/1000)}return null}function FY($){let q=new Map;return $.getRow(1).eachCell((I,U)=>q.set(String(I.value??"").trim(),U)),q}function MY($,q,I){let U=q.get(I);return U?$.getCell(U).value:void 0}function Iz1($,q){return[["会议编号","meeting_id","TEXT"],["会议名称","meeting_name","TEXT"],["状态","status","TEXT"],["总金额","total_amount","AMOUNT"],["税前劳务总额","pretax_labor_total","AMOUNT"],["报销事由","reimbursement_reason","TEXT"],["po码","po_code","TEXT"],["快递单号","tracking_number","TEXT"],["申请日期","application_date","DATE"],["更新日期","updated_date","DATE"]].flatMap(([U,Y,J])=>{let Q=MY($,q,U);if(Q==null||Q==="")return[];return[J==="TEXT"?kV0(Y,U,Q):J==="AMOUNT"?fV0(Y,U,Q):ID(Y,U,J,bV0(Q))]})}function uV0($,q,I){return I.flatMap(([U,Y,J])=>{let Q=MY($,q,U);if(Q==null||Q==="")return[];return[J==="TEXT"?kV0(Y,U,Q):J==="AMOUNT"?fV0(Y,U,Q):ID(Y,U,J,bV0(Q))]})}var Uz1=[["姓名","name","TEXT"],["身份证号码","id_number","TEXT"],["手机号","phone","TEXT"],["劳务费用","labor_fee","AMOUNT"],["税前费用","pretax_fee","AMOUNT"],["开户行","bank","TEXT"],["支行名称","branch_name","TEXT"],["联行号","bank_code","TEXT"],["银行卡号","bank_card_number","TEXT"]],Yz1=[["报销金额","reimbursement_amount","AMOUNT"],["费用类型","expense_type","TEXT"],["发生时间","occurrence_time","DATE"],["收款人","payee","TEXT"],["开户行","bank","TEXT"],["支行名称","branch_name","TEXT"],[" Line truncated
`);return{recordId:$.id,sourceDocumentSN:$.sourceDocumentSN,sourceDocumentId:$.sourceDocumentId,document:PY({id:q?.id,sn:q?.sn??q?.sourceDocumentSN??$.sourceDocumentSN,title:q?.title??q?.name,template:VD(q,["template.name","templateName","form.name","formName","formTitle"]),amount:HD(I,["金额","报销金额","付款金额","合计","价税合计"])??VD(q,["amount","totalAmount","expenseAmount"]),expenseType:HD(I,["费用类型","费用类别","报销类型"]),costCompany:HD(I,["费用承担公司","承担公司","成本中心","费用归属"]),payee:HD(I,["收款方","收款账户","收款信息","开户名","银行账号"]),keyFields:I.slice(0,30)}),invoices:yz1($),attachments:GY($,{summary:!0}).attachments,aiResult:ZD($),manualResult:Uq($)?.value,hints:PY({amountMentions:nW0(U,["金额","合计","税率"],8),partyMentions:nW0(U,["买方","卖方","甲方","乙方","收款"],8)})}}function Cz1($){let q=[["result.citedRules",i5($,"result.citedRules")],["result.matchedRules",i5($,"result.matchedRules")],["result.ruleResults",i5($,"result.ruleResults")],["result.rules",i5($,"result.rules")],["pipelineData.citedRules",i5($,"pipelineData.citedRules")],["pipelineData.matchedRules",i5($,"pipelineData.matchedRules")]],I=[],U=new Set;for(let[Y,J]of q)(Array.isArray(J)?J:J&&typeof J==="object"?Object.values(J):[]).forEach((K,z)=>{let G=Wz(K);if(!G)return;let H=$4(G.runtimeRuleId)??$4(G.runtimeId)??$4(G.id)??$4(G.ruleId),w=$4(G.ruleCode)??$4(G.code)??(H?kz1(H):void 0),V=PY({runtimeRuleId:H,ruleCode:w,versionNumber:hz1(G.versionNumber)??$.ruleSetVersionNumber,scope:$4(G.scope),strictness:$4(G.strictness),appliedAnalysis:G.appliedAnalysis??G.analysis??G.reasoning,checkResult:G.checkResult??G.result??G.decision,findings:G.findings??G.riskPoints??G.evidence,sourcePath:`${Y}.${z}`}),W=JSON.stringify(V);if(!U.has(W))U.add(W),I.push(V)});return{recordId:$.id,sourceDocumentSN:$.sourceDocumentSN,sourceDocumentId:$.sourceDocumentId,ruleSetVersionNumber:$.ruleSetVersionNumber,count:I.length,rules:I}}function VD($,q){if(!$)return;for(let I of q){let U=i5($,I);if(U!==void 0)return U}return}function bW0($,q){if(!$)return 0;for(let I of q){let U=i5($,I);if(Array.isArray(U))return U.length;if(U&&typeof U==="object")return Object.keys(U).length;if(typeof U==="number")return U}return 0}function i5($,q){return q.split(".").reduce((I,U)=>{if(I===void 0||I===null)return;if(Array.isArray(I)){let Y=Number(U);return Number.isInteger(Y)?I[Y]:void 0}if(typeof I==="object")return I[U];return},$)}function _z1($,q,I){let U=q.split("."),Y=$;for(let J of U.slice(0,-1)){let Q=Y[J];if(!Q||typeof Q!=="object"||Array.isArray(Q))Y[J]={};Y=Y[J]}Y[U[U.length-1]??q]=I}function PY($){return Object.fromEntries(Object.entries($).filter(([,q])=>q!==void 0))}function Wz($){return $&&typeof $==="object"&&!Array.isArray($)?$:void 0}function hz1($){return typeof $==="number"&&Number.isFinite($)?$:void 0}function Sz1($){let q=[];return Ju($,"document",q),q}function Ju($,q,I){if(Array.isArray($)){$.forEach((Q,K)=>Ju(Q,`${q}.${K}`,I));return}let U=Wz($);if(!U)return;let Y=$4(U.label)??$4(U.name)??$4(U.title)??$4(U.fieldName),J=U.value??U.displayValue??U.text??U.content;if(Y&&J!==void 0&&typeof J!=="object")I.push(PY({path:q,label:Y,value:J,type:$4(U.type)??$4(U.fieldType)}));for(let[Q,K]of Object.entries(U)){if(Q==="attachments")continue;Ju(K,`${q}.${Q}`,I)}}function HD($,q){return $.find((U)=>{let Y=$4(U.label)??"";return q.some((J)=>Y.includes(J))})?.value}function yz1($){let q=[];return WD($.result,"result",q),WD($.document,"document",q),q.slice(0,20)}function WD($,q,I){if(Array.isArray($)){$.forEach((Y,J)=>WD(Y,`${q}.${J}`,I));return}let U=Wz($);if(!U)return;if(/invoice|发票/i.test(q))I.push(PY({path:q,fileName:$4(U.fileName)??$4(U.filename)??$4(U.name),buyer:U.buyer??U.buyerName??U.purchaserName,seller:U.seller??U.sellerName,amount:U.amount??U.totalAmount??U.total,taxRate:U.taxRate,category:U.category??U.type}));for(let[Y,J]of Object.entries(U))WD(J,`${q}.${Y}`,I)}function nW0($,q,I){return $.split(/\r?\n/).filter((U)=>q.some((Y)=>U.includes(Y))).slice(0,I)}function wD($){return $.map((q)=>{let I=Iq(q);return{recordId:I.id,tenantId:I.tenantId,agentId:I.agentId,sourceDocumentSN:I.sourceDocumentSN,sourceDocumentId:I.sourceDocumentId,simulationBatchId:I.simulationBatchId,langfuseTraceId:I.langfuseTraceId,langfuseSessionFallback:I.langfuseSessionFallback,ruleSetVersionNumber:I.ruleSetVersionNumber,ruleSetPublishedAt:I.ruleSetPublishedAt,ruleSetPublishedByName:I.ruleSetPublishedByName,resolution:I.langfuseTraceId?"trace":I.langfuseSessionFallback?"session-fallback":"unresolved"}})}function Uu($){return{id:$.id,tenantId:$.tenantId,versionNumber:$.versionNumber,versionName:$.versionName,publishedBy:$.publishedBy,publishedByName:$.publishedByName,rulesCount:$.rules.length,publishedAt:$.publishedAt,createdAt:$.createdAt}}async function uz1($,q){if(q.recordId&&!q.versionId&&!q.versionNumber&&!q.latest){let I=await b4($,q.recordId);if(!I.ruleSetVersionNumber)throw Er Line truncated
`)}
`}function Zz($){return $.replace(/([?&](?:accessToken|token|returnToken)=)[^&\s]+/gi,"$1<redacted>").replace(/(Bearer\s+)[A-Za-z0-9._~+/=-]+/gi,"$1<redacted>")}function B0($,q={}){nz1($,q);let I=`${JSON.stringify($,null,2)}
`;if(q.outputFile){uz1(q.outputFile,I),console.log(JSON.stringify({outputFile:q.outputFile,bytes:Buffer.byteLength(I,"utf-8")},null,2));return}console.log(I.trimEnd())}function nz1($,q={}){if(q.allowFull||q.outputFile)return;let I=Buffer.byteLength(JSON.stringify($),"utf-8");if(I>fz1)throw Error(`Output is large (${I} bytes). Use --summary, --fields, --count, or --output-file; pass --full only when you really need the full response.`)}function YZ0($,q){if(q)return;let I=$&&typeof $==="object"?$:{},U=typeof I.count==="number"?I.count:void 0,Y=Array.isArray(I.rules)?I.rules.length:void 0,J=Buffer.byteLength(JSON.stringify($),"utf-8"),Q=U??Y??0;if(Q>xz1||J>kz1)throw Error(`Rule list is large (${Q} rules, ${J} bytes). Use "seal-use rules list --summary" or "seal-use rules count"; pass --full only when you really need full descriptions.`)}function D0($){return{allowFull:C0($.full)===!0,outputFile:x($.outputFile)??x($["output-file"])}}function JZ0(){console.log(`seal-use CLI
`}function Lz($){return $.replace(/([?&](?:accessToken|token|returnToken)=)[^&\s]+/gi,"$1<redacted>").replace(/(Bearer\s+)[A-Za-z0-9._~+/=-]+/gi,"$1<redacted>")}function E0($,q={}){az1($,q);let I=`${JSON.stringify($,null,2)}
`;if(q.outputFile){lz1(q.outputFile,I),console.log(JSON.stringify({outputFile:q.outputFile,bytes:Buffer.byteLength(I,"utf-8")},null,2));return}console.log(I.trimEnd())}function az1($,q={}){if(q.allowFull||q.outputFile)return;let I=Buffer.byteLength(JSON.stringify($),"utf-8");if(I>tz1)throw Error(`Output is large (${I} bytes). Use --summary, --fields, --count, or --output-file; pass --full only when you really need the full response.`)}function GZ0($,q){if(q)return;let I=$&&typeof $==="object"?$:{},U=typeof I.count==="number"?I.count:void 0,Y=Array.isArray(I.rules)?I.rules.length:void 0,J=Buffer.byteLength(JSON.stringify($),"utf-8"),Q=U??Y??0;if(Q>oz1||J>rz1)throw Error(`Rule list is large (${Q} rules, ${J} bytes). Use "seal-use rules list --summary" or "seal-use rules count"; pass --full only when you really need full descriptions.`)}function D0($){return{allowFull:C0($.full)===!0,outputFile:y($.outputFile)??y($["output-file"])}}function HZ0(){console.log(`seal-use CLI
Usage:
seal-use version
@@ -330,6 +330,8 @@ Usage:
seal-use config paths
seal-use config get
seal-use config mode <stateful|stateless> [--corp <corpId>]
seal-use config test-dir [<path>|--clear]
seal-use config lint [status|enable|disable] [--linter <name|path>] [--min-score <score>]
seal-use update [--check] [--force] [--version <v>]
seal-use update check
seal-use update changelog [--limit <n>]
@@ -392,6 +394,7 @@ Usage:
seal-use approval-runs summary [--date YYYY-MM-DD] [--timezone Asia/Shanghai] [--corp <corpId>]
seal-use approval-runs stats [--since 3months] [--dedupe-by sourceDocumentSN|sourceDocumentId|id] [--corp <corpId>]
seal-use approval-runs count [--status APPROVED] [--corp <corpId>]
seal-use approval-runs export [--start <YYYY-MM-DD|ms>] [--end <YYYY-MM-DD|ms>] [--limit <n>] [--downloads] [--out <file>] [--corp <corpId>]
seal-use approval-runs list|search [--query text] [--humanResult 驳回] [--manualApprovalStatus TERMINATED] [--startDate ms] [--endDate ms] [--limit 20] [--includeBridge true] [--corp <corpId>]
seal-use approval-runs pick --sn <documentSN> [--batch <batchId>] [--latest] [--fields recordId,status,aiDecision] [--corp <corpId>]
seal-use approval-runs get <recordId> [--summary] [--fields metadata|document.fields,result.summary] [--full] [--output-file file.json] [--corp <corpId>]
@@ -416,12 +419,12 @@ Usage:
seal-use simulation templates [--corp <corpId>]
seal-use simulation integrations [--corp <corpId>]
seal-use simulation package-upload <材料包.zip> [--corp <corpId>]
`)}function D4($){let q=X8(),I=W6();return ZI(q,{stateful:I.stateful,defaultCorpId:I.defaultCorpId,corpId:$},u7())}function Xz($=W6()){return{mode:$.stateful?"stateful":"stateless",stateful:$.stateful,...$.stateful&&$.defaultCorpId?{defaultCorpId:$.defaultCorpId}:{},lint:$.lint,configFile:WI()}}async function O0($,q,I,U,Y={}){B0(await qq($,q,I,U),Y)}async function qq($,q,I,U){let Y=Gz.find((K)=>K.name===$);if(!Y)throw Error(`Unknown Seal tool: ${$}`);let J=Object.fromEntries(Object.entries(U).filter(([,K])=>K!==void 0)),Q=Y.handler;return Q(q,J,{corp:I})}async function QZ0($,q,I,U,Y){if($==="summary"){let J=await qq("seal_approval_runs_summary",I,U,{date:x(Y.options.date),timezone:x(Y.options.timezone),limit:e0(Y.options.limit),startDate:x(Y.options.startDate),endDate:x(Y.options.endDate),status:x(Y.options.status),taskMode:x(Y.options.taskMode),manualApprovalStatus:x(Y.options.manualApprovalStatus),sourceDocumentSN:x(Y.options.sourceDocumentSN),sourceDocumentId:x(Y.options.sourceDocumentId),humanResult:x(Y.options.humanResult),query:x(Y.options.query)});if(J?.matched===0&&J?.total>0)console.error(`提示:在 ${J.date} 未匹配到记录(该企业共有 ${J.total} 条历史记录)。可使用 --date YYYY-MM-DD 指定日期,或运行 seal-use approval-runs list --limit 10 查看最近记录。`);B0(J,D0(Y.options));return}if($==="stats"){await O0("seal_approval_runs_stats",I,U,{since:x(Y.options.since),dedupeBy:x(Y.options.dedupeBy)??x(Y.options["dedupe-by"]),status:x(Y.options.status),sourceSystem:x(Y.options.sourceSystem)??x(Y.options["source-system"]),taskMode:x(Y.options.taskMode)??x(Y.options["task-mode"])},D0(Y.options));return}if($==="count"){await O0("seal_approval_runs_count",I,U,{status:x(Y.options.status),sourceSystem:x(Y.options.sourceSystem)??x(Y.options["source-system"]),taskMode:x(Y.options.taskMode)??x(Y.options["task-mode"]),search:x(Y.options.search)??x(Y.options.query)},D0(Y.options));return}if($==="search"||$==="list"){await O0("seal_approval_runs_search",I,U,{limit:e0(Y.options.limit),offset:e0(Y.options.offset),startDate:x(Y.options.startDate),endDate:x(Y.options.endDate),status:x(Y.options.status),taskMode:x(Y.options.taskMode),manualApprovalStatus:x(Y.options.manualApprovalStatus),sourceDocumentSN:x(Y.options.sourceDocumentSN),sourceDocumentId:x(Y.options.sourceDocumentId),humanResult:x(Y.options.humanResult),query:x(Y.options.query),includeBridge:C0(Y.options.includeBridge)},D0(Y.options));return}if($==="bridge"){await O0("seal_approval_run_langfuse_bridge_get",I,U,{recordId:x(Y.options.recordId),sourceDocumentSN:x(Y.options.sourceDocumentSN),sourceDocumentId:x(Y.options.sourceDocumentId),simulationBatchId:x(Y.options.simulationBatchId),limit:e0(Y.options.limit)},D0(Y.options));return}if($==="pick"){let J=q??x(Y.options.query)??x(Y.options.sn);if(!J)throw Error("Usage: seal-use approval-runs pick --sn <documentSN>");await O0("seal_approval_run_pick",I,U,{query:J,sn:x(Y.options.sn),batchId:x(Y.options.batch)??x(Y.options.batchId),latest:C0(Y.options.latest),fields:x(Y.options.fields),limit:e0(Y.options.limit),includeBridge:C0(Y.options.includeBridge)},D0(Y.options));return}if($==="get"){let J=Y.command[2];if(!J)throw Error("Missing approval run recordId");await O0("seal_approval_run_get",I,U,{recordId:J,fields:x(Y.options.fields),summary:C0(Y.options.summary)},D0(Y.options));return}if($==="cited-rules"){let J=Y.command[2];if(!J)throw Error("Usage: seal-use approval-runs cited-rules <recordId>");await O0("seal_approval_run_cited_rules_get",I,U,{recordId:J},D0(Y.options));return}if($==="document-summary"){let J=Y.command[2];if(!J)throw Error("Usage: seal-use approval-runs document-summary <recordId>");await O0("seal_approval_run_document_summary_get",I,U,{recordId:J},D0(Y.options));return}if($==="attachments"){if(Y.command[2]==="download"){let w=Y.command[3];if(!w)throw Error("Usage: seal-use approval-runs attachments download <recordId> [--all] [--name <name>] [--out-dir <dir>]");let G=await V6(I,w),H=await bH({record:G,all:C0(Y.options.all),name:x(Y.options.name),outDir:x(Y.options["out-dir"])??x(Y.options.outDir)??x(Y.options.dir)});if(B0(H,D0(Y.options)),H.total>0&&H.downloaded===0)throw Error(`所有 ${H.total} 个附件下载均失败。`);return}let Q=Y.command[2];if(!Q)throw Error("Usage: seal-use approval-runs attachments <recordId> | seal-use approval-runs attachments download <recordId>");if(C0(Y.options.download)){let w=await V6(I,Q),G=await bH({record:w,all:C0(Y.options.all)??!0,name:x(Y.options.name),outDir:x(Y.options["out-dir"])??x(Y.options.outDir)??x(Y.options.dir)});if(B0(G,D0(Y.options)),G.total>0&&G.downloaded===0)throw Error(`所有 ${G.total} 个附件下载均失败。`);return}let K=await V6(I,Q),z=HI(K,{summary:C0(Y.options.summary)});B0(z,D0(Y.options));return}if($==="download"){let J=Y.command[2];if(!J)throw Error("Usage: seal-use approval-runs download <recordId> [--all] [--name <name>] [--out-dir <dir>]");let Q=await V6(I,J),K=await bH({record:Q,al Line truncated
- `);throw Error(`Missing required parameter: staffId. Found ${S.length} candidate administrators:
- ${t}
Please specify 'staffId', 'staffName', or 'staffPhone' to explicitly select an account (or pass force:true to bypass).`)}}}if(!L)if(!G&&J)L=J;else throw Error("Missing required parameter: staffId (or proxyStaffBizId). Run 'seal-use corps hose-staffs' to discover available administrators.");let D=b1($,"id")??V,N=W??V,E=b1($,"sealUrl")??`https://${V.toLowerCase()}.sealai.cc`,T={id:D,name:N,seal:{url:E,endpoints:{approvalStylePreferences:"api/v1/agent/ai-approval/config"}},source:{type:"hose",domain:H,appKey:I,appSecurity:U,corpId:V,staffId:L},auth:{refreshTtl:300}};if(G)TH(D),await MY(T);let P=kE();LZ0(P,{recursive:!0,mode:448});let B=OZ0(P,`${Gu(D)}.json`);if(XZ0(B)&&$.overwrite!==!0)throw Error(`Enterprise config already exists: ${B}. Pass "overwrite": true to replace it.`);DZ0(B,`${JSON.stringify(T,null,2)}
`,{mode:384}),B0({id:D,name:N,corpId:V,domain:H,staffId:L,verified:G,path:B})}async function mz1($){let q=Z7($,"token"),I=(b1($,"sealUrl")??b1($,"url")??"").replace(/\/+$/,"");if(!I)throw Error("Missing required JSON field: sealUrl");let U=sW0($,"expiresIn")??2592000,Y=$.force===!0||$.verify===!1?!1:!0,J=Y?await rz1(I,q):void 0;FZ0($,{token:q,sealUrl:I,expiresIn:U,verify:Y,remote:J})}async function oz1($,q,I){let U=await EH($),Y=QQ(U.sealUrl,U.token),J=await W8(Y),Q={user:J.user,tenant:J.tenant};gH(U.corpId,Q.tenant),FZ0({id:U.corpId,corpId:U.corpId,name:q,provider:"hosecloud",overwrite:I},{token:U.token,sealUrl:U.sealUrl,expiresIn:U.expiresIn,verify:!0,remote:Q})}function FZ0($,q){let{token:I,sealUrl:U,expiresIn:Y,verify:J,remote:Q}=q,K=Q?.user,z=Q?.tenant,w=b1($,"tenantSlug")??X7(z?.tenantSlug),G=b1($,"tenantId")??X7(z?.id),H=b1($,"tenantName")??X7(z?.name),V=b1($,"id")??w??G;if(!V)throw Error("Missing required JSON field: id. Seal whoami did not return tenantSlug or tenantId.");let W=b1($,"staffId")??X7(K?.providerUserId)??X7(K?.id)??"seal",X=b1($,"provider")??X7(K?.provider)??X7(z?.providerConfig?.provider),L=b1($,"corpId")??w??G??V,D={id:V,name:b1($,"name")??H??V,seal:{url:U,tenantSlug:w,endpoints:{approvalStylePreferences:"api/v1/agent/ai-approval/config"}},source:{type:"seal",token:I,sealUrl:U,expiresIn:Y,staffId:W,corpId:L,tenantId:G,tenantSlug:w,tenantName:H,providerUserId:X7(K?.providerUserId),provider:X},auth:{refreshTtl:300}},N=kE();LZ0(N,{recursive:!0,mode:448});let E=OZ0(N,`${Gu(V)}.json`);if(XZ0(E)&&$.overwrite!==!0)throw Error(`Enterprise config already exists: ${E}. Pass "overwrite": true to replace it.`);DZ0(E,`${JSON.stringify(D,null,2)}
`,{mode:384}),B0({id:V,name:D.name,tenantId:G,tenantSlug:w,verified:J,path:E})}async function rz1($,q){let I=await tz1(`${$}/api/v1/auth/me`,{authorization:`Bearer ${q}`}),U=ZD(I.data);return{user:ZD(U.user??I.user),tenant:ZD(U.tenant??I.tenant)}}async function tz1($,q={}){let I=await fetch($,{headers:q}),U=await I.text();if(!I.ok)throw Error(`${I.status} ${U}`);let Y=JSON.parse(U);return ZD(Y)}function ZD($){return $&&typeof $==="object"&&!Array.isArray($)?$:{}}function X7($){return typeof $==="string"&&$?$:void 0}async function MZ0($,q){let I=await EH($),U=QQ(I.sealUrl,I.token),Y=await W8(U);gH(I.corpId,Y.tenant);let J=await zI(U,{note:q});B0({tenant:{id:Y.tenant.id,name:Y.tenant.name,tenantSlug:Y.tenant.tenantSlug,corpId:I.corpId},user:{id:Y.user.id,name:Y.user.name,providerUserId:Y.user.providerUserId,isAdmin:Y.user.isAdmin},delegation:J,expiresIn:I.expiresIn})}async function AZ0($,q,I,U,Y){if($==="list"){await O0("seal_delegation_list",I,U,{},D0(Y.options));return}if($==="create"){let J=x(Y.options.note)??(q?[q,...Y.command.slice(2)].join(" "):void 0);await O0("seal_delegation_create",I,U,{note:J},D0(Y.options));return}if($==="revoke"){let J=q??x(Y.options.tokenId);if(!J)throw Error("Usage: seal-use delegation revoke <tokenId>");await O0("seal_delegation_revoke",I,U,{tokenId:J},D0(Y.options));return}throw Error(`Unknown delegation command: ${$??""}. Run 'seal-use help' for available commands.`)}import{readFileSync as az1}from"node:fs";async function PZ0($,q,I,U,Y,J){if(!$||$==="help")throw Error(`Usage: seal-use deploy <system> <action> [options]
`)}function D4($){let q=n8(),I=R4();return HY(q,{stateful:I.stateful,defaultCorpId:I.defaultCorpId,corpId:$},t3())}function Yq($=R4()){return{mode:$.stateful?"stateful":"stateless",stateful:$.stateful,...$.stateful&&$.defaultCorpId?{defaultCorpId:$.defaultCorpId}:{},...$.testEnterprisesDir?{testEnterprisesDir:$.testEnterprisesDir}:{},lint:$.lint,configFile:a3()}}async function N0($,q,I,U,Y={}){E0(await Jq($,q,I,U),Y)}async function Jq($,q,I,U){let Y=Vz.find((K)=>K.name===$);if(!Y)throw Error(`Unknown Seal tool: ${$}`);let J=Object.fromEntries(Object.entries(U).filter(([,K])=>K!==void 0)),Q=Y.handler;return Q(q,J,{corp:I})}async function wZ0($,q,I,U,Y){if($==="summary"){let J=await Jq("seal_approval_runs_summary",I,U,{date:y(Y.options.date),timezone:y(Y.options.timezone),limit:I1(Y.options.limit),startDate:y(Y.options.startDate),endDate:y(Y.options.endDate),status:y(Y.options.status),taskMode:y(Y.options.taskMode),manualApprovalStatus:y(Y.options.manualApprovalStatus),sourceDocumentSN:y(Y.options.sourceDocumentSN),sourceDocumentId:y(Y.options.sourceDocumentId),humanResult:y(Y.options.humanResult),query:y(Y.options.query)});if(J?.matched===0&&J?.total>0)console.error(`提示:在 ${J.date} 未匹配到记录(该企业共有 ${J.total} 条历史记录)。可使用 --date YYYY-MM-DD 指定日期,或运行 seal-use approval-runs list --limit 10 查看最近记录。`);E0(J,D0(Y.options));return}if($==="stats"){await N0("seal_approval_runs_stats",I,U,{since:y(Y.options.since),dedupeBy:y(Y.options.dedupeBy)??y(Y.options["dedupe-by"]),status:y(Y.options.status),sourceSystem:y(Y.options.sourceSystem)??y(Y.options["source-system"]),taskMode:y(Y.options.taskMode)??y(Y.options["task-mode"])},D0(Y.options));return}if($==="count"){await N0("seal_approval_runs_count",I,U,{status:y(Y.options.status),sourceSystem:y(Y.options.sourceSystem)??y(Y.options["source-system"]),taskMode:y(Y.options.taskMode)??y(Y.options["task-mode"]),search:y(Y.options.search)??y(Y.options.query)},D0(Y.options));return}if($==="search"||$==="list"){await N0("seal_approval_runs_search",I,U,{limit:I1(Y.options.limit),offset:I1(Y.options.offset),startDate:y(Y.options.startDate),endDate:y(Y.options.endDate),status:y(Y.options.status),taskMode:y(Y.options.taskMode),manualApprovalStatus:y(Y.options.manualApprovalStatus),sourceDocumentSN:y(Y.options.sourceDocumentSN),sourceDocumentId:y(Y.options.sourceDocumentId),humanResult:y(Y.options.humanResult),query:y(Y.options.query),includeBridge:C0(Y.options.includeBridge)},D0(Y.options));return}if($==="bridge"){await N0("seal_approval_run_langfuse_bridge_get",I,U,{recordId:y(Y.options.recordId),sourceDocumentSN:y(Y.options.sourceDocumentSN),sourceDocumentId:y(Y.options.sourceDocumentId),simulationBatchId:y(Y.options.simulationBatchId),limit:I1(Y.options.limit)},D0(Y.options));return}if($==="pick"){let J=q??y(Y.options.query)??y(Y.options.sn);if(!J)throw Error("Usage: seal-use approval-runs pick --sn <documentSN>");await N0("seal_approval_run_pick",I,U,{query:J,sn:y(Y.options.sn),batchId:y(Y.options.batch)??y(Y.options.batchId),latest:C0(Y.options.latest),fields:y(Y.options.fields),limit:I1(Y.options.limit),includeBridge:C0(Y.options.includeBridge)},D0(Y.options));return}if($==="get"){let J=Y.command[2];if(!J)throw Error("Missing approval run recordId");await N0("seal_approval_run_get",I,U,{recordId:J,fields:y(Y.options.fields),summary:C0(Y.options.summary)},D0(Y.options));return}if($==="cited-rules"){let J=Y.command[2];if(!J)throw Error("Usage: seal-use approval-runs cited-rules <recordId>");await N0("seal_approval_run_cited_rules_get",I,U,{recordId:J},D0(Y.options));return}if($==="document-summary"){let J=Y.command[2];if(!J)throw Error("Usage: seal-use approval-runs document-summary <recordId>");await N0("seal_approval_run_document_summary_get",I,U,{recordId:J},D0(Y.options));return}if($==="attachments"){if(Y.command[2]==="download"){let G=Y.command[3];if(!G)throw Error("Usage: seal-use approval-runs attachments download <recordId> [--all] [--name <name>] [--out-dir <dir>]");let H=await b4(I,G),w=await _L({record:H,all:C0(Y.options.all),name:y(Y.options.name),outDir:y(Y.options["out-dir"])??y(Y.options.outDir)??y(Y.options.dir)});if(E0(w,D0(Y.options)),w.total>0&&w.downloaded===0)throw Error(`所有 ${w.total} 个附件下载均失败。`);return}let Q=Y.command[2];if(!Q)throw Error("Usage: seal-use approval-runs attachments <recordId> | seal-use approval-runs attachments download <recordId>");if(C0(Y.options.download)){let G=await b4(I,Q),H=await _L({record:G,all:C0(Y.options.all)??!0,name:y(Y.options.name),outDir:y(Y.options["out-dir"])??y(Y.options.outDir)??y(Y.options.dir)});if(E0(H,D0(Y.options)),H.total>0&&H.downloaded===0)throw Error(`所有 ${H.total} 个附件下载均失败。`);return}let K=await b4(I,Q),z=GY(K,{summary:C0(Y.options.summary)});E0(z,D0(Y.options));return}if($==="download"){let J=Y.command[2];if(!J)throw Error("Usage: seal-use approval-runs download <recordId> [--all] [--name <n Line truncated
- `);throw Error(`Missing required parameter: staffId. Found ${R.length} candidate administrators:
- ${p}
Please specify 'staffId', 'staffName', or 'staffPhone' to explicitly select an account (or pass force:true to bypass).`)}}}if(!L)if(!H&&J)L=J;else throw Error("Missing required parameter: staffId (or proxyStaffBizId). Run 'seal-use corps hose-staffs' to discover available administrators.");let D=n1($,"id")??V,N=W??V,E=n1($,"sealUrl")??`https://${V.toLowerCase()}.sealai.cc`,T={id:D,name:N,seal:{url:E,endpoints:{approvalStylePreferences:"api/v1/agent/ai-approval/config"}},source:{type:"hose",domain:w,appKey:I,appSecurity:U,corpId:V,staffId:L},auth:{refreshTtl:300}};if(H)Ew(D),await TY(T);let P=tS();MZ0(P,{recursive:!0,mode:448});let B=PZ0(P,`${Vu(D)}.json`);if(FZ0(B)&&$.overwrite!==!0)throw Error(`Enterprise config already exists: ${B}. Pass "overwrite": true to replace it.`);AZ0(B,`${JSON.stringify(T,null,2)}
`,{mode:384}),E0({id:D,name:N,corpId:V,domain:w,staffId:L,verified:H,path:B})}async function YG1($){let q=Z7($,"token"),I=(n1($,"sealUrl")??n1($,"url")??"").replace(/\/+$/,"");if(!I)throw Error("Missing required JSON field: sealUrl");let U=UZ0($,"expiresIn")??2592000,Y=$.force===!0||$.verify===!1?!1:!0,J=Y?await QG1(I,q):void 0;EZ0($,{token:q,sealUrl:I,expiresIn:U,verify:Y,remote:J})}async function JG1($,q,I){let U=await jw($),Y=zQ(U.sealUrl,U.token),J=await Z8(Y),Q={user:J.user,tenant:J.tenant};gw(U.corpId,Q.tenant),EZ0({id:U.corpId,corpId:U.corpId,name:q,provider:"hosecloud",overwrite:I},{token:U.token,sealUrl:U.sealUrl,expiresIn:U.expiresIn,verify:!0,remote:Q})}function EZ0($,q){let{token:I,sealUrl:U,expiresIn:Y,verify:J,remote:Q}=q,K=Q?.user,z=Q?.tenant,G=n1($,"tenantSlug")??X7(z?.tenantSlug),H=n1($,"tenantId")??X7(z?.id),w=n1($,"tenantName")??X7(z?.name),V=n1($,"id")??G??H;if(!V)throw Error("Missing required JSON field: id. Seal whoami did not return tenantSlug or tenantId.");let W=n1($,"staffId")??X7(K?.providerUserId)??X7(K?.id)??"seal",X=n1($,"provider")??X7(K?.provider)??X7(z?.providerConfig?.provider),L=n1($,"corpId")??G??H??V,D={id:V,name:n1($,"name")??w??V,seal:{url:U,tenantSlug:G,endpoints:{approvalStylePreferences:"api/v1/agent/ai-approval/config"}},source:{type:"seal",token:I,sealUrl:U,expiresIn:Y,staffId:W,corpId:L,tenantId:H,tenantSlug:G,tenantName:w,providerUserId:X7(K?.providerUserId),provider:X},auth:{refreshTtl:300}},N=tS();MZ0(N,{recursive:!0,mode:448});let E=PZ0(N,`${Vu(V)}.json`);if(FZ0(E)&&$.overwrite!==!0)throw Error(`Enterprise config already exists: ${E}. Pass "overwrite": true to replace it.`);AZ0(E,`${JSON.stringify(D,null,2)}
`,{mode:384}),E0({id:V,name:D.name,tenantId:H,tenantSlug:G,verified:J,path:E})}async function QG1($,q){let I=await KG1(`${$}/api/v1/auth/me`,{authorization:`Bearer ${q}`}),U=LD(I.data);return{user:LD(U.user??I.user),tenant:LD(U.tenant??I.tenant)}}async function KG1($,q={}){let I=await fetch($,{headers:q}),U=await I.text();if(!I.ok)throw Error(`${I.status} ${U}`);let Y=JSON.parse(U);return LD(Y)}function LD($){return $&&typeof $==="object"&&!Array.isArray($)?$:{}}function X7($){return typeof $==="string"&&$?$:void 0}async function jZ0($,q){let I=await jw($),U=zQ(I.sealUrl,I.token),Y=await Z8(U);gw(I.corpId,Y.tenant);let J=await WI(U,{note:q});E0({tenant:{id:Y.tenant.id,name:Y.tenant.name,tenantSlug:Y.tenant.tenantSlug,corpId:I.corpId},user:{id:Y.user.id,name:Y.user.name,providerUserId:Y.user.providerUserId,isAdmin:Y.user.isAdmin},delegation:J,expiresIn:I.expiresIn})}async function gZ0($,q,I,U,Y){if($==="list"){await N0("seal_delegation_list",I,U,{},D0(Y.options));return}if($==="create"){let J=y(Y.options.note)??(q?[q,...Y.command.slice(2)].join(" "):void 0);await N0("seal_delegation_create",I,U,{note:J},D0(Y.options));return}if($==="revoke"){let J=q??y(Y.options.tokenId);if(!J)throw Error("Usage: seal-use delegation revoke <tokenId>");await N0("seal_delegation_revoke",I,U,{tokenId:J},D0(Y.options));return}throw Error(`Unknown delegation command: ${$??""}. Run 'seal-use help' for available commands.`)}import{readFileSync as zG1}from"node:fs";async function BZ0($,q,I,U,Y,J){if(!$||$==="help")throw Error(`Usage: seal-use deploy <system> <action> [options]
`+`支持的审批系统与发布目标:
`+` • hosecloud (合思费控): seal-use deploy hosecloud <requirements|list|get|status|configure|sync> --corp <corpId>
@@ -429,25 +432,25 @@ Please specify 'staffId', 'staffName', or 'staffPhone' to explicitly select an a
`+` • feishu (飞书审批): 建议使用 Webhook 模式对接
`+` • weaver (泛微 OA): 建议使用 Webhook 模式对接
`+` • helios (汇联易): 建议使用 Webhook 模式对接
`+" • maycur (每刻报销): 建议使用 Webhook 模式对接");if($==="webhook"||$==="webhooks")throw Error("Webhook 审批流发布请直接使用专有命令:seal-use webhook <list|get|add|update|delete> --corp <corpId>");if($==="feishu"||$==="lark")throw Error("飞书审批发布:建议使用 Webhook 通用发布模式对接。命令:seal-use webhook add --name '飞书审批' --result-url <url> --corp <corpId>");if($==="weaver")throw Error("泛微 OA 发布:建议使用 Webhook 通用发布模式对接。命令:seal-use webhook add --name '泛微OA' --result-url <url> --corp <corpId>");if($==="maycur"||$==="helios"){let w=$==="maycur"?"每刻报销":"汇联易";throw Error(`${w}发布:目前可通过 Webhook 模式接入。命令:seal-use webhook add --name '${w}' --result-url <url> --corp <corpId>`)}let Q=$==="hosecloud",K=$==="hosecloud"?q:$,z=$==="hosecloud"?I:q;if(!Q)throw Error(`未知的发布目标系统: ${$}。当前支持: hosecloud (合思费控) 与 webhook (通用回调)。`);if(K==="requirements"){await O0("seal_deploy_hosecloud_requirements",U,Y,{},D0(J.options));return}if(K==="list"){await O0("seal_deploy_hosecloud_list",U,Y,{},D0(J.options));return}if(K==="get"){let w=z??x(J.options.signKey)??x(J.options["sign-key"]);if(!w){let H=((await K4(U)).integrations??[]).filter((V)=>V.type==="hosecloud");if(H.length===0)throw Error(`当前企业 (${Y.name}) 尚未添加合思发布配置。
`+" • maycur (每刻报销): 建议使用 Webhook 模式对接");if($==="webhook"||$==="webhooks")throw Error("Webhook 审批流发布请直接使用专有命令:seal-use webhook <list|get|add|update|delete> --corp <corpId>");if($==="feishu"||$==="lark")throw Error("飞书审批发布:建议使用 Webhook 通用发布模式对接。命令:seal-use webhook add --name '飞书审批' --result-url <url> --corp <corpId>");if($==="weaver")throw Error("泛微 OA 发布:建议使用 Webhook 通用发布模式对接。命令:seal-use webhook add --name '泛微OA' --result-url <url> --corp <corpId>");if($==="maycur"||$==="helios"){let G=$==="maycur"?"每刻报销":"汇联易";throw Error(`${G}发布:目前可通过 Webhook 模式接入。命令:seal-use webhook add --name '${G}' --result-url <url> --corp <corpId>`)}let Q=$==="hosecloud",K=$==="hosecloud"?q:$,z=$==="hosecloud"?I:q;if(!Q)throw Error(`未知的发布目标系统: ${$}。当前支持: hosecloud (合思费控) 与 webhook (通用回调)。`);if(K==="requirements"){await N0("seal_deploy_hosecloud_requirements",U,Y,{},D0(J.options));return}if(K==="list"){await N0("seal_deploy_hosecloud_list",U,Y,{},D0(J.options));return}if(K==="get"){let G=z??y(J.options.signKey)??y(J.options["sign-key"]);if(!G){let w=((await K4(U)).integrations??[]).filter((V)=>V.type==="hosecloud");if(w.length===0)throw Error(`当前企业 (${Y.name}) 尚未添加合思发布配置。
`+`\uD83D\uDC49 请先运行配置命令:seal-use deploy hosecloud configure --json '{...}' --corp ${Y.id}`);console.error(`Usage: seal-use deploy hosecloud get <sign-key> [--corp ${Y.id}]
`),console.error("ℹ️ 当前企业发现以下可用的合思配置卡片:");for(let V of H){let W=V.outboundName??"SealAI 审批",X=V.signKey,L=V.apiOrigin??"production";console.error(` • "${W}" (signKey: ${X}, 环境: ${L})`),console.error(` \uD83D\uDC49 查看命令: seal-use deploy hosecloud get ${X} --corp ${Y.id}
`)}throw Error("缺少必需参数 <sign-key>。请从上述候选列表中选择并指定 signKey。")}await O0("seal_deploy_hosecloud_get",U,Y,{signKey:w},D0(J.options));return}if(K==="status"){await O0("seal_deploy_hosecloud_status",U,Y,{},D0(J.options));return}if(K==="configure"){let w=x(J.options.input),G=w?JSON.parse(az1(w,"utf8")):a6(J.json);if(!G||Object.keys(G).length===0)throw Error("Usage: seal-use deploy hosecloud configure --json '{...}' or --input <file>");await O0("seal_deploy_hosecloud_configure",U,Y,G,D0(J.options));return}if(K==="sync"){let w=z??x(J.options.signKey)??x(J.options["sign-key"]),G=C0(J.options.auto)??C0(J.options.yes);if(!w){let V=((await K4(U)).integrations??[]).filter((X)=>X.type==="hosecloud");if(V.length===0)throw Error(`当前企业 (${Y.name}) 尚未添加合思发布配置。
`+`\uD83D\uDC49 请先运行配置命令:seal-use deploy hosecloud configure --json '{...}' --corp ${Y.id}`);let W=V[0];if(W&&V.length===1&&G){let X=W.signKey;console.error(`ℹ️ [auto] 检测到企业仅有 1 个合思配置,已自动选择 (signKey: ${X})`),await O0("seal_deploy_hosecloud_sync",U,Y,{signKey:X},D0(J.options));return}console.error(`Usage: seal-use deploy hosecloud sync <sign-key> [--corp ${Y.id}]
`),console.error("ℹ️ 当前企业发现以下可用的合思配置卡片:");for(let V of w){let W=V.outboundName??"SealAI 审批",X=V.signKey,L=V.apiOrigin??"production";console.error(` • "${W}" (signKey: ${X}, 环境: ${L})`),console.error(` \uD83D\uDC49 查看命令: seal-use deploy hosecloud get ${X} --corp ${Y.id}
`)}throw Error("缺少必需参数 <sign-key>。请从上述候选列表中选择并指定 signKey。")}await N0("seal_deploy_hosecloud_get",U,Y,{signKey:G},D0(J.options));return}if(K==="status"){await N0("seal_deploy_hosecloud_status",U,Y,{},D0(J.options));return}if(K==="configure"){let G=y(J.options.input),H=G?JSON.parse(zG1(G,"utf8")):a6(J.json);if(!H||Object.keys(H).length===0)throw Error("Usage: seal-use deploy hosecloud configure --json '{...}' or --input <file>");await N0("seal_deploy_hosecloud_configure",U,Y,H,D0(J.options));return}if(K==="sync"){let G=z??y(J.options.signKey)??y(J.options["sign-key"]),H=C0(J.options.auto)??C0(J.options.yes);if(!G){let V=((await K4(U)).integrations??[]).filter((X)=>X.type==="hosecloud");if(V.length===0)throw Error(`当前企业 (${Y.name}) 尚未添加合思发布配置。
`+`\uD83D\uDC49 请先运行配置命令:seal-use deploy hosecloud configure --json '{...}' --corp ${Y.id}`);let W=V[0];if(W&&V.length===1&&H){let X=W.signKey;console.error(`ℹ️ [auto] 检测到企业仅有 1 个合思配置,已自动选择 (signKey: ${X})`),await N0("seal_deploy_hosecloud_sync",U,Y,{signKey:X},D0(J.options));return}console.error(`Usage: seal-use deploy hosecloud sync <sign-key> [--corp ${Y.id}]
`),console.error("ℹ️ 当前企业发现以下可用的合思配置卡片:");for(let X of V){let L=X.outboundName??"SealAI 审批",D=X.signKey,N=X.apiOrigin??"production";console.error(` • "${L}" (signKey: ${D}, 环境: ${N})`),console.error(` \uD83D\uDC49 同步命令: seal-use deploy hosecloud sync ${D} --corp ${Y.id}
`)}if(V.length===1)console.error(`\uD83D\uDCA1 提示:若希望单配置自动同步,可附加 --auto 参数:seal-use deploy hosecloud sync --auto --corp ${Y.id}
`);throw Error("缺少必需参数 <sign-key>。请从上述候选列表中选择并指定 signKey 执行同步。")}await O0("seal_deploy_hosecloud_sync",U,Y,{signKey:w},D0(J.options));return}throw Error(`Unknown deploy hosecloud action: ${K??""}. Available: requirements, list, get, status, configure, sync.`)}import{createServer as Iw1}from"node:http";import{URL as ez1}from"node:url";var TZ0={openapi:"3.1.0",info:{title:"seal-use Wrapped API",version:"0.10.9",description:`Planned HTTP contract for the seal-use wrapped backend API.
`);throw Error("缺少必需参数 <sign-key>。请从上述候选列表中选择并指定 signKey 执行同步。")}await N0("seal_deploy_hosecloud_sync",U,Y,{signKey:G},D0(J.options));return}throw Error(`Unknown deploy hosecloud action: ${K??""}. Available: requirements, list, get, status, configure, sync.`)}import{createServer as WG1}from"node:http";import{URL as HG1}from"node:url";var RZ0={openapi:"3.1.0",info:{title:"seal-use Wrapped API",version:"0.10.11",description:`Planned HTTP contract for the seal-use wrapped backend API.
These endpoints describe the intended stable API for frontend developers and agents once
the HTTP adapter is implemented.
They are not the raw downstream Seal endpoints. seal-use is responsible for enterprise
selection, source authentication, response compaction, and diagnostics-friendly fields.
`},servers:[{url:"http://localhost:8787",description:"Reserved for a future local HTTP adapter; the current service uses MCP stdio."}],security:[{localSession:[]}],tags:[{name:"Corps",description:"Local enterprise configuration selection."},{name:"Source",description:"Source-derived Seal enterprise configuration."},{name:"Auth",description:"Wrapped authentication diagnostics and current identity."},{name:"Approval Runs",description:"Wrapped approval run history, summaries, document URLs, and trace bridge helpers."},{name:"Approval Knowledge",description:"Wrapped approval rules, documents, preferences, and search."},{name:"Simulation",description:"Wrapped simulation batch record access."}],paths:{"/v1/corps":{get:{tags:["Corps"],operationId:"listCorps",summary:"List configured enterprises",responses:{"200":{description:"Configured enterprises.",content:{"application/json":{schema:{type:"array",items:{type:"object",required:["id","name","sourceType","current"],properties:{id:{type:"string"},name:{type:"string"},sourceType:{type:"string",enum:["hose","direct","seal"]},current:{type:"boolean"}}}}}}}}}},"/v1/corps/current":{get:{tags:["Corps"],operationId:"getCurrentCorp",summary:"Get current enterprise",description:"Returns the configured default enterprise in stateful mode. Stateless mode has no current enterprise and requires an explicit corpId for enterprise operations.",responses:{"200":{description:"Current enterprise.",content:{"application/json":{schema:{type:"object",required:["id","name","sourceType","current"],properties:{id:{type:"string"},name:{type:"string"},sourceType:{type:"string",enum:["hose","direct","seal"]},current:{type:"boolean"}}}}}}}}},"/v1/corps/current/switch":{post:{tags:["Corps"],operationId:"switchCurrentCorp",summary:"Switch current enterprise",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",required:["corpId"],properties:{corpId:{type:"string"}}}}}},responses:{"200":{description:"Switched enterprise.",content:{"application/json":{schema:{type:"object",required:["current","id","name"],properties:{current:{type:"boolean"},id:{type:"string"},name:{type:"string"}}}}}},"404":{description:"Requested resource was not found.",content:{"application/json":{schema:{type:"object",additionalProperties:!0,required:["error"],properties:{error:{type:"string"},message:{type:"string"},details:{}}}}}}}}},"/v1/source/config":{get:{tags:["Source"],operationId:"getSourceConfig",summary:"Resolve source-derived Seal enterprise config",parameters:[{name:"corpId",in:"query",schema:{type:"string"},description:"Local enterprise config ID. Required when global selection mode is stateless; optional in stateful mode, where the configured default enterprise is used."}],responses:{"200":{description:"Redacted Seal enterprise config.",content:{"application/json":{schema:{type:"object",additionalProperties:!0,description:"Redacted Seal enterprise config resolved from the configured source."}}}},"401":{description:"Local service authentication failed or downstream Seal auth failed.",content:{"application/json":{schema:{type:"object",additionalProperties:!0,required:["error"],properties:{error:{type:"string"},message:{type:"string"},details:{}}}}}}}}},"/v1/auth/diagnose":{get:{tags:["Auth"],operationId:"diagnoseAuth",summary:"Diagnose wrapped source-to-Seal authentication",parameters:[{name:"corpId",in:"query",schema:{type:"string"},description:"Local enterprise config ID. Required when global selection mode is stateless; optional in stateful mode, where the configured default enterprise is used."}],responses:{"200":{description:"Authentication stage diagnosis.",content:{"application/json":{schema:{type:"object",required:["stages"],properties:{stages:{type:"array",items:{$ref:"#/components/schemas/AuthStage"}}}}}}}}}},"/v1/whoami":{get:{tags:["Auth"],operationId:"whoami",summary:"Get current wrapped Seal identity",parameters:[{name:"corpId",in:"query",schema:{type:"string"},description:"Local enterprise config ID. Required when global selection mode is stateless; optional in stateful mode, where the configured default enterprise is used."}],responses:{"200":{description:"Current Seal user and tenant.",content:{"application/json":{schema:{type:"object",required:["user","tenant"],properties:{user:{$ref:"#/components/schemas/SealUser"},tenant:{$ref:"#/components/schemas/SealTenant"}}}}}},"401":{description:"Local service authentication failed or downstream Seal auth failed.",content:{"application/json":{schema:{type:"object",additionalProperties:!0,required:["error"],properties:{error:{type:"string"},message:{type:"string"},details:{}}}}}}}}},"/v1/session":{get:{tags:["Auth"],operationId:"getSession",summary:"Get current wrapped Seal session metadata",parameters:[{name:"corpId",in:"query",schema:{type:"string"},description:"Local enterprise config ID. Required when global selection mode is stateless; optional in stateful mode, where the configured default enterprise is used."}],responses:{"2 Line truncated
`},servers:[{url:"http://localhost:8787",description:"Reserved for a future local HTTP adapter; the current service uses MCP stdio."}],security:[{localSession:[]}],tags:[{name:"Corps",description:"Local enterprise configuration selection."},{name:"Source",description:"Source-derived Seal enterprise configuration."},{name:"Auth",description:"Wrapped authentication diagnostics and current identity."},{name:"Approval Runs",description:"Wrapped approval run history, summaries, document URLs, and trace bridge helpers."},{name:"Approval Knowledge",description:"Wrapped approval rules, documents, preferences, and search."},{name:"Simulation",description:"Wrapped simulation batch record access."}],paths:{"/v1/corps":{get:{tags:["Corps"],operationId:"listCorps",summary:"List configured enterprises",responses:{"200":{description:"Configured enterprises.",content:{"application/json":{schema:{type:"array",items:{type:"object",required:["id","name","sourceType","current"],properties:{id:{type:"string"},name:{type:"string"},sourceType:{type:"string",enum:["hose","direct","seal"]},current:{type:"boolean"}}}}}}}}}},"/v1/corps/current":{get:{tags:["Corps"],operationId:"getCurrentCorp",summary:"Get current enterprise",description:"Returns the configured default enterprise in stateful mode. Stateless mode has no current enterprise and requires an explicit corpId for enterprise operations.",responses:{"200":{description:"Current enterprise.",content:{"application/json":{schema:{type:"object",required:["id","name","sourceType","current"],properties:{id:{type:"string"},name:{type:"string"},sourceType:{type:"string",enum:["hose","direct","seal"]},current:{type:"boolean"}}}}}}}}},"/v1/corps/current/switch":{post:{tags:["Corps"],operationId:"switchCurrentCorp",summary:"Switch current enterprise",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",required:["corpId"],properties:{corpId:{type:"string"}}}}}},responses:{"200":{description:"Switched enterprise.",content:{"application/json":{schema:{type:"object",required:["current","id","name"],properties:{current:{type:"boolean"},id:{type:"string"},name:{type:"string"}}}}}},"404":{description:"Requested resource was not found.",content:{"application/json":{schema:{type:"object",additionalProperties:!0,required:["error"],properties:{error:{type:"string"},message:{type:"string"},details:{}}}}}}}}},"/v1/source/config":{get:{tags:["Source"],operationId:"getSourceConfig",summary:"Resolve source-derived Seal enterprise config",parameters:[{name:"corpId",in:"query",schema:{type:"string"},description:"Local enterprise config ID. Required when global selection mode is stateless; optional in stateful mode, where the configured default enterprise is used."}],responses:{"200":{description:"Redacted Seal enterprise config.",content:{"application/json":{schema:{type:"object",additionalProperties:!0,description:"Redacted Seal enterprise config resolved from the configured source."}}}},"401":{description:"Local service authentication failed or downstream Seal auth failed.",content:{"application/json":{schema:{type:"object",additionalProperties:!0,required:["error"],properties:{error:{type:"string"},message:{type:"string"},details:{}}}}}}}}},"/v1/auth/diagnose":{get:{tags:["Auth"],operationId:"diagnoseAuth",summary:"Diagnose wrapped source-to-Seal authentication",parameters:[{name:"corpId",in:"query",schema:{type:"string"},description:"Local enterprise config ID. Required when global selection mode is stateless; optional in stateful mode, where the configured default enterprise is used."}],responses:{"200":{description:"Authentication stage diagnosis.",content:{"application/json":{schema:{type:"object",required:["stages"],properties:{stages:{type:"array",items:{$ref:"#/components/schemas/AuthStage"}}}}}}}}}},"/v1/whoami":{get:{tags:["Auth"],operationId:"whoami",summary:"Get current wrapped Seal identity",parameters:[{name:"corpId",in:"query",schema:{type:"string"},description:"Local enterprise config ID. Required when global selection mode is stateless; optional in stateful mode, where the configured default enterprise is used."}],responses:{"200":{description:"Current Seal user and tenant.",content:{"application/json":{schema:{type:"object",required:["user","tenant"],properties:{user:{$ref:"#/components/schemas/SealUser"},tenant:{$ref:"#/components/schemas/SealTenant"}}}}}},"401":{description:"Local service authentication failed or downstream Seal auth failed.",content:{"application/json":{schema:{type:"object",additionalProperties:!0,required:["error"],properties:{error:{type:"string"},message:{type:"string"},details:{}}}}}}}}},"/v1/session":{get:{tags:["Auth"],operationId:"getSession",summary:"Get current wrapped Seal session metadata",parameters:[{name:"corpId",in:"query",schema:{type:"string"},description:"Local enterprise config ID. Required when global selection mode is stateless; optional in stateful mode, where the configured default enterprise is used."}],responses:{"2 Line truncated
<html lang="zh-CN">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<title>Seal Home API Docs (v${t0})</title>
<title>Seal Home API Docs (v${e0})</title>
<link rel="icon" type="image/svg+xml" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>\uD83E\uDDAD</text></svg>" />
<style>
body {
@@ -466,21 +469,21 @@ selection, source authentication, response compaction, and diagnostics-friendly
src="https://cdn.jsdelivr.net/npm/@scalar/api-reference@1.25.101/dist/browser/standalone.js"
></script>
</body>
</html>`}async function x4($,q,I,U){let Y=$.handler;return Y(q,I,{corp:U})}async function gZ0($,q){if(q.setHeader("Access-Control-Allow-Origin","*"),q.setHeader("Access-Control-Allow-Methods","GET, POST, PUT, DELETE, OPTIONS, PATCH"),q.setHeader("Access-Control-Allow-Headers","Content-Type, Authorization, X-Seal-Corp, X-Seal-Home-Session"),$.method==="OPTIONS"){q.writeHead(204),q.end();return}let I=$.headers.host||"localhost",U=$.headers["x-forwarded-proto"]||"http",Y=new ez1($.url||"/",`${U}://${I}`),J=Y.pathname.replace(/\/+$/,"")||"/",Q=($.method||"GET").toUpperCase();try{if(Q==="GET"&&J==="/"){d1(q,200,{name:"seal-use",version:t0,description:"Seal tenant operations and approval automation HTTP API",docs:"/docs",openapi:"/openapi.json",health:"/health",endpoints:{cli:"POST /api/cli",tools:"GET /api/tools",toolInvoke:"POST /api/tool/:name",restV1:"GET/POST /v1/*"}});return}if(Q==="GET"&&J==="/docs"){qw1(q,200,EZ0());return}if(Q==="GET"&&J==="/openapi.json"){d1(q,200,XD());return}if(Q==="GET"&&J==="/health"){d1(q,200,{status:"ok",version:t0,name:"seal-use",timestamp:new Date().toISOString()});return}if(Q==="POST"&&(J==="/shutdown"||J==="/api/shutdown")){d1(q,200,{success:!0,message:"Shutting down seal-use background daemon",pid:process.pid}),setTimeout(()=>{process.kill(process.pid,"SIGTERM")},50);return}if(Q==="POST"&&J==="/api/cli"){let K=await DD($),z=(typeof K?.command==="string"?K.command:"").trim();if(!z){LD(q,400,"Missing 'command' property in request body");return}let w=Lu(z),G=w[0]==="seal-use"||w[0]==="seal-home"||w[0]?.endsWith("/seal-use")||w[0]?.endsWith("/seal-home")?w.slice(1):w,H=await Dz(G),V=void 0;try{if(H.stdout.trim().startsWith("{")||H.stdout.trim().startsWith("["))V=JSON.parse(H.stdout)}catch{}d1(q,H.isError?400:200,{success:!H.isError,stdout:H.stdout,stderr:H.stderr,exitCode:H.exitCode,data:V});return}if(Q==="POST"&&J.startsWith("/api/tool/")){let K=J.slice(10).trim(),z=R4(K);if(!z){LD(q,404,`Tool not found: '${K}'`);return}let w=await DD($)||{},G=S6($,Y,w),H=D4(G),V=await I4(H),W={...w};delete W.corp;let X=await x4(z,V,W,H);d1(q,200,X);return}if(J.startsWith("/v1/")){if(await $w1($,q,Q,J,Y))return}LD(q,404,`Cannot ${Q} ${J}. Visit /docs for available endpoints.`)}catch(K){let z=K instanceof Error?K.message:String(K);LD(q,500,z)}}async function $w1($,q,I,U,Y){let J=Object.fromEntries(Y.searchParams.entries());if(I==="GET"&&U==="/v1/corps"){let Q=X8(),K=W6();return d1(q,200,{count:Q.length,mode:K.stateful?"stateful":"stateless",defaultCorpId:K.defaultCorpId,corps:Q.map((z)=>({id:z.id,name:z.name,sourceType:z.source.type,sealUrl:z.seal?.url}))}),!0}if(I==="GET"&&U==="/v1/whoami"){let Q=S6($,Y,J),K=D4(Q),z=await I4(K),w=R4("seal_whoami"),G=await x4(w,z,{},K);return d1(q,200,G),!0}if(I==="GET"&&U==="/v1/session"){let Q=S6($,Y,J),K=D4(Q),z=await I4(K),w=R4("seal_session_get"),G=await x4(w,z,{},K);return d1(q,200,G),!0}if(I==="GET"&&U==="/v1/approval-runs/summary"){let Q=S6($,Y,J),K=D4(Q),z=await I4(K),w=R4("seal_approval_runs_summary"),G=await x4(w,z,J,K);return d1(q,200,G),!0}if(I==="GET"&&U==="/v1/approval-runs/stats"){let Q=S6($,Y,J),K=D4(Q),z=await I4(K),w=R4("seal_approval_runs_stats"),G=await x4(w,z,J,K);return d1(q,200,G),!0}if(I==="GET"&&U==="/v1/approval-runs/pick"){let Q=S6($,Y,J),K=D4(Q),z=await I4(K),w=R4("seal_approval_run_pick"),G=await x4(w,z,J,K);return d1(q,200,G),!0}if(I==="GET"&&U==="/v1/approval-runs/url"){let Q=S6($,Y,J),K=D4(Q),z=await I4(K),w=R4("seal_approval_run_url_get"),G=await x4(w,z,J,K);return d1(q,200,G),!0}if(U.startsWith("/v1/approval-runs/")){let Q=U.slice(18).split("/"),K=Q[0],z=Q[1];if(K&&!["summary","pick","stats","url","bridge"].includes(K)){let w=S6($,Y,J),G=D4(w),H=await I4(G);if(!z){let V=R4("seal_approval_run_get"),W=await x4(V,H,{recordId:K,...J},G);return d1(q,200,W),!0}if(z==="attachments"){let V=R4("seal_approval_run_attachments_get"),W=await x4(V,H,{recordId:K,...J},G);return d1(q,200,W),!0}if(z==="cited-rules"){let V=R4("seal_approval_run_cited_rules_get"),W=await x4(V,H,{recordId:K,...J},G);return d1(q,200,W),!0}if(z==="document-summary"){let V=R4("seal_approval_run_document_summary_get"),W=await x4(V,H,{recordId:K,...J},G);return d1(q,200,W),!0}if(z==="result"){let V=R4("seal_approval_run_result_get"),W=await x4(V,H,{recordId:K,...J},G);return d1(q,200,W),!0}}}if(I==="GET"&&U==="/v1/approval-runs"){let Q=S6($,Y,J),K=D4(Q),z=await I4(K),w=R4("seal_approval_runs_search"),G=await x4(w,z,{...J,limit:J.limit?Number(J.limit):void 0,offset:J.offset?Number(J.offset):void 0,includeBridge:J.includeBridge==="true"},K);return d1(q,200,G),!0}if(I==="GET"&&U==="/v1/approval/rules"){let Q=S6($,Y,J),K=D4(Q),z=await I4(K),w=R4("seal_approval_rules_list"),G=await x4(w,z,J,K);return d1(q,200,G),!0}if(I==="GET"&&U==="/v1/simulation/batches"){let Q=S6($,Y,J),K=D4(Q),z=await I4(K),w=R4("seal_simulation_batches_list"),G=await x4(w,z,J,K);return d1(q,200,G),!0}if(I==="POST"&&U==="/v1/simulation/create-batch"){let Q=await DD($)||{},K=S6($,Y,Q),z=D4(K),w=await I4Line truncated
\uD83D\uDE80 seal-use HTTP Server (v${t0}) started`),console.error(` URL: http://${I}:${q}`),console.error(` Docs: http://${I}:${q}/docs`),console.error(` OpenAPI: http://${I}:${q}/openapi.json`),console.error(` CLI Exec: POST http://${I}:${q}/api/cli`),console.error(` REST API: http://${I}:${q}/v1/...
`);Y(U)})})}async function jZ0($){let q=e0($.options.port)??e0($.options.p),I=x($.options.host)??x($.options.h),U=await FD({port:q,host:I}),Y=()=>{U.close(()=>{process.exit(0)})};process.on("SIGINT",Y),process.on("SIGTERM",Y),await new Promise(()=>{})}async function BZ0($,q,I,U){if($==="config"||$==="get"){await O0("seal_llm_config_get",q,I,{},D0(U.options));return}if($==="providers"||$==="list"){await O0("seal_llm_providers_list",q,I,{},D0(U.options));return}throw Error(`Unknown llm command: ${$??""}. Run 'seal-use help' for available commands.`)}async function RZ0($,q){if($==="config"||$==="json"){Du();return}await Ou()}function Du(){B0({mcpServers:{"seal-use":{type:"stdio",command:"seal-use",args:["mcp"],env:{SEAL_USE_MCP_ENABLED:"true"}}}})}function vZ0($){let q=XD();B0(q,{...D0($.options),allowFull:!0})}async function CZ0($,q,I,U){if($==="available"){await O0("seal_permissions_available_list",q,I,{},D0(U.options));return}if($==="configs"||$==="list"){await O0("seal_permissions_configs_list",q,I,{},D0(U.options));return}throw Error(`Unknown permissions command: ${$??""}. Run 'seal-use help' for available commands.`)}import{readFileSync as _Z0}from"node:fs";async function hZ0($,q,I,U,Y,J,Q){if(!$||$==="get"){await O0("seal_preference_get",Y,J,{},D0(Q.options));return}if($==="decision"){if(q==="update"||!q){let K=x(Q.options.input),z=K?JSON.parse(_Z0(K,"utf8")):a6(Q.json);if(!z||Object.keys(z).length===0)throw Error(`Usage: seal-use preference decision update --json '{"explicitApprove":"..."}'`);await O0("seal_preference_decision_update",Y,J,z,D0(Q.options));return}}if($==="thinking-depth"||$==="thinkingDepth"){if(q==="set"){let K=x(Q.options.default)??x(Q.options.level)??U;if(K!=="medium"&&K!=="high")throw Error("Usage: seal-use preference thinking-depth set --default <medium|high>");await O0("seal_preference_thinking_depth_set",Y,J,{defaultLevel:K},D0(Q.options));return}if(q==="policies"){if(I==="list"||!I){await O0("seal_preference_thinking_depth_policies_list",Y,J,{},D0(Q.options));return}if(I==="upsert"){let K=x(Q.options.input),z=K?JSON.parse(_Z0(K,"utf8")):a6(Q.json);if(!z||!z.id||!z.name)throw Error(`Usage: seal-use preference thinking-depth policies upsert --json '{"id":"...","name":"...","level":"high"}'`);await O0("seal_preference_thinking_depth_policies_upsert",Y,J,z,D0(Q.options));return}if(I==="remove"||I==="delete"){let K=U??x(Q.options.id)??x(Q.options.policyId);if(!K)throw Error("Usage: seal-use preference thinking-depth policies remove <policyId>");await O0("seal_preference_thinking_depth_policies_remove",Y,J,{policyId:K},D0(Q.options));return}}}throw Error(`Unknown preference action: ${$??""}. Available: get, decision update, thinking-depth set, thinking-depth policies list/upsert/remove.`)}async function SZ0($={}){let q=X8(),I=W6(),U=ZI(q,{stateful:I.stateful,defaultCorpId:I.defaultCorpId,corpId:$.corpId},u7());console.log(`[probe] corp=${U.id} source=${U.source.type}`);let Y=await MY(U);console.log("[probe] seal enterprise"),console.log(JSON.stringify(Y,null,2));let J=await I4(U),Q=await fH(J,{documentLimit:20,stylePreferencesEndpoint:U.seal.endpoints.approvalStylePreferences});console.log("[probe] approval context summary"),console.log(JSON.stringify({rules:Q.rules.rules.length,hasPendingRuleDeletes:Q.rules.hasPendingDeletes,documents:Q.documents.articles.length,documentsTotal:Q.documents.total,stylePreferences:Q.stylePreferences.ok?"ok":`error: ${Q.stylePreferences.error}`},null,2))}async function yZ0($,q,I){let U=q??x(I.options.corp)??($&&$!=="--corp"?$:void 0);await SZ0({corpId:U})}async function Nu($,q,I,U,Y){if($==="count"){await O0("seal_approval_rules_list",I,U,{countOnly:!0},D0(Y.options));return}if($==="list"){if(C0(Y.options.count)){await O0("seal_approval_rules_list",I,U,{countOnly:!0},D0(Y.options));return}let J=e0(Y.options.limit),Q=e0(Y.options.offset);if(C0(Y.options.summary)){await O0("seal_approval_rules_list",I,U,{fields:UZ0,limit:J,offset:Q},D0(Y.options));return}let K=await qq("seal_approval_rules_list",I,U,{limit:J,offset:Q});YZ0(K,C0(Y.options.full)===!0),B0(K);return}if($==="clear"){let J=C0(Y.options.yes)===!0,Q=C0(Y.options.dryRun)??C0(Y.options["dry-run"])??!J;if(!J&&!Q)throw Error("Refusing to clear rules without --yes. Use --dry-run to preview.");let K=await qq("seal_approval_rules_clear",I,U,{dryRun:Q,recode:C0(Y.options.recode)});if(!J&&Q&&K&&typeof K==="object"){B0({...K,nextCommand:`seal-use rules clear --corp ${U.id} --yes`},D0(Y.options));return}B0(K,D0(Y.options));return}if($==="versions"){await O0("seal_approval_rule_versions_list",I,U,{},D0(Y.options));return}if($==="version"){let J=q??x(Y.options.version);if(!J)throw Error("Usage: seal-use rules version <versionId|versionNumber|latest>");await O0("seal_approval_rule_version_get",I,U,Vz(J),D0(Y.options));return}if($==="get"){await O0("seal_approval_rule_get",I,U,{...IZ0(x(Y.options.version)),code:x(Y.options.code),runtimeId:x(Y.options.runtimeId)??x(Y.options["runtime-id"]),recordId:x(Y.options.r Line truncated
`).filter(Boolean),J=Y.slice(-q);return{logFile:I,lines:J,totalLines:Y.length}}async function Kw1($){let q=TD($),I=Au($),U=Oz($);fZ0($.stateDir);let Y=$.port??(process.env.PORT?Number.parseInt(process.env.PORT,10):OD),J=$.host??(process.env.HOST?process.env.HOST:ND);AD(q,`${process.pid}
`,{mode:384}),AD(I,JSON.stringify({pid:process.pid,port:Y,host:J,version:$.version,startedAt:new Date().toISOString()},null,2),{mode:384}),AY(U,`service starting on http://${J}:${Y} pid=${process.pid}`);let Q=null;try{Q=await FD({port:Y,host:J,silent:!0}),AY(U,`service listening pid=${process.pid}`)}catch(z){if(AY(U,`service failed to bind port ${Y}: ${z instanceof Error?z.message:String(z)}`),PD(q)===process.pid)p8(q,{force:!0}),p8(I,{force:!0});throw z}let K=()=>{if(Q)Q.close(),Q=null;if(PD(q)===process.pid)p8(q,{force:!0}),p8(I,{force:!0});AY(U,`stopped pid=${process.pid}`)};await new Promise((z)=>{let w=!1,G=()=>{if(w)return;w=!0,K(),process.off("SIGTERM",G),process.off("SIGINT",G),z()};process.once("SIGTERM",G),process.once("SIGINT",G)})}function uZ0($){fZ0($.stateDir);let q=PY($);if(q.running)return q;let I=$.launcher??{command:process.execPath,args:[$.entryFile]},U=[...I.args??[],"service","run"];if($.port)U.push("--port",String($.port));if($.host)U.push("--host",String($.host));let Y=Uw1(I.command,U,{cwd:$.appRoot,detached:!0,stdio:["ignore","ignore","ignore"],env:process.env});Y.unref();let J=TD($);return AD(J,`${Y.pid}
`,{mode:384}),AY(Oz($),`started pid=${Y.pid}`),{started:!0,...PY($)}}function xZ0($,q={}){let I=TD($),U=Au($),Y=PD(I);if(!Y||!kZ0(Y,$.appRoot))return p8(I,{force:!0}),p8(U,{force:!0}),q.quiet?void 0:{stopped:!1,reason:"not running"};return process.kill(Y,"SIGTERM"),p8(I,{force:!0}),p8(U,{force:!0}),AY(Oz($),`stop requested pid=${Y}`),q.quiet?void 0:{stopped:!0,pid:Y}}function kZ0($,q){if(!zw1($))return!1;try{let I=Yw1("ps",["-p",String($),"-o","command="],{encoding:"utf8"});return(I.includes(q)||I.includes("seal-use")||I.includes("src/cli.ts"))&&I.includes("service")&&I.includes("run")}catch{return!1}}function zw1($){try{return process.kill($,0),!0}catch{return!1}}function TD($){return Mu($.stateDir,"service.pid")}function Au($){return Mu($.stateDir,"service.json")}function Oz($){return Mu($.stateDir,"service.log")}function PD($){if(!MD($))return;let q=Number(Fu($,"utf8").trim());return Number.isInteger(q)&&q>0?q:void 0}function fZ0($){Jw1($,{recursive:!0,mode:448})}function AY($,q){AD($,`${new Date().toISOString()} ${q}
`,{flag:"a",mode:384})}var Pu=Gw1(ww1(),".config","seal-use");async function Tu($,q,I){let U=I?e0(I.options.port)??e0(I.options.p):void 0,Y=I?x(I.options.host)??x(I.options.h):void 0,J=I?e0(I.options.lines)??e0(I.options.n):void 0,Q=await Iq($,{appRoot:q.appRoot,entryFile:q.entryFile,stateDir:Pu,version:t0,launcher:q.launcher,port:U,host:Y},{maxLines:J});if(Q!==void 0)B0(Q)}import{existsSync as Hw1,readFileSync as nZ0}from"node:fs";async function bZ0($,q,I,U,Y){if($==="batch-records"||$==="records"){let J=q??x(Y.options.batchId)??x(Y.options["batch-id"]);if(!J)throw Error("Usage: seal-use simulation batch-records <batchId>");await O0("seal_simulation_batch_records_get",I,U,{batchId:J,query:x(Y.options.query)},D0(Y.options));return}if($==="create"||$==="run"){let J=x(Y.options.mode)??x(Y.options.sourceSystem)??x(Y.options["source-system"])??"hosecloud",Q=J==="material-pack"?"material_pack":J,K=x(Y.options.schemaConfig)??x(Y.options["schema-config"]),z=K?JSON.parse(nZ0(K,"utf8")):void 0,w=x(Y.options.input),G=w?JSON.parse(nZ0(w,"utf8")):a6(Y.json),H=x(Y.options.packageId)??x(Y.options["package-id"]),V=M6(Y.options.packageIds)??M6(Y.options["package-ids"])??(H?[H]:void 0),W=M6(Y.options.flowIds)??M6(Y.options["flow-ids"])??M6(Y.options.documentSn)??M6(Y.options["document-sn"]),X=x(Y.options.signKey)??x(Y.options["sign-key"])??x(Y.options.integration);await O0("seal_simulation_batch_create",I,U,{mode:Q,sourceSystem:Q,flowIds:W,documentSn:W,rejectNodeName:x(Y.options.rejectNode)??x(Y.options["reject-node"])??null,thinkingDepthOverride:x(Y.options.thinkingDepth)??x(Y.options["thinking-depth"]),skipInvoiceGeneration:C0(Y.options.skipInvoiceGeneration)??C0(Y.options["skip-invoice-generation"]),skipExpenseExtraction:C0(Y.options.skipExpenseExtraction)??C0(Y.options["skip-expense-extraction"]),disableAttachmentCache:C0(Y.options.disableAttachmentCache)??C0(Y.options["disable-attachment-cache"]),signKey:X,packageIds:V,packageId:H,templateId:x(Y.options.templateId)??x(Y.options["template-id"]),schemaConfig:z,requestIds:M6(Y.options.requestIds)??M6(Y.options["request-ids"]),workflowTypeId:x(Y.options.workflowTypeId)??x(Y.options["workflow-type-id"]),flowStatusList:M6(Y.options.flowStatusList)?.map(Number)??M6(Y.options["flow-status-list"])?.map(Number),businessCodes:M6(Y.options.businessCodes)??M6(Y.options["business-codes"]),documentType:x(Y.options.documentType)??x(Y.options["document-type"]),startTime:e0(Y.options.startTime)??e0(Y.options["start-time"]),endTime:e0(Y.options.endTime)??e0(Y.options["end-time"]),status:M6(Y.options.status),limit:e0(Y.options.limit),rawParams:G},D0(Y.options));return}if($==="wait"){let J=q??x(Y.options.batchId)??x(Y.options["batch-id"]);if(!J)throw Error("Usage: seal-use simulation wait <batchId> [--timeout 10m] [--poll-interval 2s]");await O0("seal_simulation_batch_wait",I,U,{batchId:J,timeout:x(Y.options.timeout),pollInterval:x(Y.options.pollInterval)??x(Y.options["poll-interval"])},D0(Y.options));return}if($==="clean"||$==="delete"){let J=q??x(Y.options.batchId)??x(Y.options["batch-id"]);if(!J)throw Error("Usage: seal-use simulation clean <batchId>");await O0("seal_simulation_batch_clean",I,U,{batchId:J},D0(Y.options));return}if($==="specifications"){let J=q??x(Y.options.integration)??x(Y.options.signKey)??x(Y.options["sign-key"]);await O0("seal_simulation_specifications_list",I,U,{signKey:J},D0(Y.options));return}if($==="list"){await O0("seal_simulation_batches_list",I,U,{limit:e0(Y.options.limit)},D0(Y.options));return}if($==="get"){let J=q??x(Y.options.batchId)??x(Y.options["batch-id"]);if(!J)throw Error("Usage: seal-use simulation get <batchId>");await O0("seal_simulation_batch_get",I,U,{batchId:J},D0(Y.options));return}if($==="templates"){await O0("seal_simulation_templates_get",I,U,{},D0(Y.options));return}if($==="integrations"){await O0("seal_simulation_integrations_get",I,U,{},D0(Y.options));return}if($==="package-upload"){let J=q??x(Y.options.file);if(!J)throw Error("Usage: seal-use simulation package-upload <材料包.zip>");if(!Hw1(J))throw Error(`File not found: ${J}`);await O0("seal_simulation_material_package_upload",I,U,{filePath:J},D0(Y.options));return}throw Error(`Unknown simulation command: ${$??""}. Run 'seal-use help' for available commands.`)}import{existsSync as JX0}from"node:fs";import{join as ED}from"node:path";import{existsSync as Eu,mkdirSync as eZ0,rmSync as Pw1,writeFileSync as Tw1}from"node:fs";import{homedir as $X0}from"node:os";import{dirname as Ew1,join as gu}from"node:path";var iZ0=`---
</html>`}async function k4($,q,I,U){let Y=$.handler;return Y(q,I,{corp:U})}async function CZ0($,q){if(q.setHeader("Access-Control-Allow-Origin","*"),q.setHeader("Access-Control-Allow-Methods","GET, POST, PUT, DELETE, OPTIONS, PATCH"),q.setHeader("Access-Control-Allow-Headers","Content-Type, Authorization, X-Seal-Corp, X-Seal-Home-Session"),$.method==="OPTIONS"){q.writeHead(204),q.end();return}let I=$.headers.host||"localhost",U=$.headers["x-forwarded-proto"]||"http",Y=new HG1($.url||"/",`${U}://${I}`),J=Y.pathname.replace(/\/+$/,"")||"/",Q=($.method||"GET").toUpperCase();try{if(Q==="GET"&&J==="/"){d1(q,200,{name:"seal-use",version:e0,description:"Seal tenant operations and approval automation HTTP API",docs:"/docs",openapi:"/openapi.json",health:"/health",endpoints:{cli:"POST /api/cli",tools:"GET /api/tools",toolInvoke:"POST /api/tool/:name",restV1:"GET/POST /v1/*"}});return}if(Q==="GET"&&J==="/docs"){VG1(q,200,vZ0());return}if(Q==="GET"&&J==="/openapi.json"){d1(q,200,DD());return}if(Q==="GET"&&J==="/health"){d1(q,200,{status:"ok",version:e0,name:"seal-use",timestamp:new Date().toISOString()});return}if(Q==="POST"&&(J==="/shutdown"||J==="/api/shutdown")){d1(q,200,{success:!0,message:"Shutting down seal-use background daemon",pid:process.pid}),setTimeout(()=>{process.kill(process.pid,"SIGTERM")},50);return}if(Q==="POST"&&J==="/api/cli"){let K=await ND($),z=(typeof K?.command==="string"?K.command:"").trim();if(!z){OD(q,400,"Missing 'command' property in request body");return}let G=Ou(z),H=G[0]==="seal-use"||G[0]==="seal-home"||G[0]?.endsWith("/seal-use")||G[0]?.endsWith("/seal-home")?G.slice(1):G,w=await Oz(H),V=void 0;try{if(w.stdout.trim().startsWith("{")||w.stdout.trim().startsWith("["))V=JSON.parse(w.stdout)}catch{}d1(q,w.isError?400:200,{success:!w.isError,stdout:w.stdout,stderr:w.stderr,exitCode:w.exitCode,data:V});return}if(Q==="POST"&&J.startsWith("/api/tool/")){let K=J.slice(10).trim(),z=v4(K);if(!z){OD(q,404,`Tool not found: '${K}'`);return}let G=await ND($)||{},H=S6($,Y,G),w=D4(H),V=await I4(w),W={...G};delete W.corp;let X=await k4(z,V,W,w);d1(q,200,X);return}if(J.startsWith("/v1/")){if(await wG1($,q,Q,J,Y))return}OD(q,404,`Cannot ${Q} ${J}. Visit /docs for available endpoints.`)}catch(K){let z=K instanceof Error?K.message:String(K);OD(q,500,z)}}async function wG1($,q,I,U,Y){let J=Object.fromEntries(Y.searchParams.entries());if(I==="GET"&&U==="/v1/corps"){let Q=n8(),K=R4();return d1(q,200,{count:Q.length,mode:K.stateful?"stateful":"stateless",defaultCorpId:K.defaultCorpId,corps:Q.map((z)=>({id:z.id,name:z.name,sourceType:z.source.type,sealUrl:z.seal?.url}))}),!0}if(I==="GET"&&U==="/v1/whoami"){let Q=S6($,Y,J),K=D4(Q),z=await I4(K),G=v4("seal_whoami"),H=await k4(G,z,{},K);return d1(q,200,H),!0}if(I==="GET"&&U==="/v1/session"){let Q=S6($,Y,J),K=D4(Q),z=await I4(K),G=v4("seal_session_get"),H=await k4(G,z,{},K);return d1(q,200,H),!0}if(I==="GET"&&U==="/v1/approval-runs/summary"){let Q=S6($,Y,J),K=D4(Q),z=await I4(K),G=v4("seal_approval_runs_summary"),H=await k4(G,z,J,K);return d1(q,200,H),!0}if(I==="GET"&&U==="/v1/approval-runs/stats"){let Q=S6($,Y,J),K=D4(Q),z=await I4(K),G=v4("seal_approval_runs_stats"),H=await k4(G,z,J,K);return d1(q,200,H),!0}if(I==="GET"&&U==="/v1/approval-runs/pick"){let Q=S6($,Y,J),K=D4(Q),z=await I4(K),G=v4("seal_approval_run_pick"),H=await k4(G,z,J,K);return d1(q,200,H),!0}if(I==="GET"&&U==="/v1/approval-runs/url"){let Q=S6($,Y,J),K=D4(Q),z=await I4(K),G=v4("seal_approval_run_url_get"),H=await k4(G,z,J,K);return d1(q,200,H),!0}if(U.startsWith("/v1/approval-runs/")){let Q=U.slice(18).split("/"),K=Q[0],z=Q[1];if(K&&!["summary","pick","stats","url","bridge"].includes(K)){let G=S6($,Y,J),H=D4(G),w=await I4(H);if(!z){let V=v4("seal_approval_run_get"),W=await k4(V,w,{recordId:K,...J},H);return d1(q,200,W),!0}if(z==="attachments"){let V=v4("seal_approval_run_attachments_get"),W=await k4(V,w,{recordId:K,...J},H);return d1(q,200,W),!0}if(z==="cited-rules"){let V=v4("seal_approval_run_cited_rules_get"),W=await k4(V,w,{recordId:K,...J},H);return d1(q,200,W),!0}if(z==="document-summary"){let V=v4("seal_approval_run_document_summary_get"),W=await k4(V,w,{recordId:K,...J},H);return d1(q,200,W),!0}if(z==="result"){let V=v4("seal_approval_run_result_get"),W=await k4(V,w,{recordId:K,...J},H);return d1(q,200,W),!0}}}if(I==="GET"&&U==="/v1/approval-runs"){let Q=S6($,Y,J),K=D4(Q),z=await I4(K),G=v4("seal_approval_runs_search"),H=await k4(G,z,{...J,limit:J.limit?Number(J.limit):void 0,offset:J.offset?Number(J.offset):void 0,includeBridge:J.includeBridge==="true"},K);return d1(q,200,H),!0}if(I==="GET"&&U==="/v1/approval/rules"){let Q=S6($,Y,J),K=D4(Q),z=await I4(K),G=v4("seal_approval_rules_list"),H=await k4(G,z,J,K);return d1(q,200,H),!0}if(I==="GET"&&U==="/v1/simulation/batches"){let Q=S6($,Y,J),K=D4(Q),z=await I4(K),G=v4("seal_simulation_batches_list"),H=await k4(G,z,J,K);return d1(q,200,H),!0}if(I==="POST"&&U==="/v1/simulation/create-batch"){let Q=await ND($)||{},K=S6($,Y,Q),z=D4(K),G=await I4Line truncated
\uD83D\uDE80 seal-use HTTP Server (v${e0}) started`),console.error(` URL: http://${I}:${q}`),console.error(` Docs: http://${I}:${q}/docs`),console.error(` OpenAPI: http://${I}:${q}/openapi.json`),console.error(` CLI Exec: POST http://${I}:${q}/api/cli`),console.error(` REST API: http://${I}:${q}/v1/...
`);Y(U)})})}async function _Z0($){let q=I1($.options.port)??I1($.options.p),I=y($.options.host)??y($.options.h),U=await AD({port:q,host:I}),Y=()=>{U.close(()=>{process.exit(0)})};process.on("SIGINT",Y),process.on("SIGTERM",Y),await new Promise(()=>{})}async function hZ0($,q,I,U){if($==="config"||$==="get"){await N0("seal_llm_config_get",q,I,{},D0(U.options));return}if($==="providers"||$==="list"){await N0("seal_llm_providers_list",q,I,{},D0(U.options));return}throw Error(`Unknown llm command: ${$??""}. Run 'seal-use help' for available commands.`)}async function SZ0($,q){if($==="config"||$==="json"){Nu();return}await Fu()}function Nu(){E0({mcpServers:{"seal-use":{type:"stdio",command:"seal-use",args:["mcp"],env:{SEAL_USE_MCP_ENABLED:"true"}}}})}function yZ0($){let q=DD();E0(q,{...D0($.options),allowFull:!0})}async function uZ0($,q,I,U){if($==="available"){await N0("seal_permissions_available_list",q,I,{},D0(U.options));return}if($==="configs"||$==="list"){await N0("seal_permissions_configs_list",q,I,{},D0(U.options));return}throw Error(`Unknown permissions command: ${$??""}. Run 'seal-use help' for available commands.`)}import{readFileSync as xZ0}from"node:fs";async function kZ0($,q,I,U,Y,J,Q){if(!$||$==="get"){await N0("seal_preference_get",Y,J,{},D0(Q.options));return}if($==="decision"){if(q==="update"||!q){let K=y(Q.options.input),z=K?JSON.parse(xZ0(K,"utf8")):a6(Q.json);if(!z||Object.keys(z).length===0)throw Error(`Usage: seal-use preference decision update --json '{"explicitApprove":"..."}'`);await N0("seal_preference_decision_update",Y,J,z,D0(Q.options));return}}if($==="thinking-depth"||$==="thinkingDepth"){if(q==="set"){let K=y(Q.options.default)??y(Q.options.level)??U;if(K!=="medium"&&K!=="high")throw Error("Usage: seal-use preference thinking-depth set --default <medium|high>");await N0("seal_preference_thinking_depth_set",Y,J,{defaultLevel:K},D0(Q.options));return}if(q==="policies"){if(I==="list"||!I){await N0("seal_preference_thinking_depth_policies_list",Y,J,{},D0(Q.options));return}if(I==="upsert"){let K=y(Q.options.input),z=K?JSON.parse(xZ0(K,"utf8")):a6(Q.json);if(!z||!z.id||!z.name)throw Error(`Usage: seal-use preference thinking-depth policies upsert --json '{"id":"...","name":"...","level":"high"}'`);await N0("seal_preference_thinking_depth_policies_upsert",Y,J,z,D0(Q.options));return}if(I==="remove"||I==="delete"){let K=U??y(Q.options.id)??y(Q.options.policyId);if(!K)throw Error("Usage: seal-use preference thinking-depth policies remove <policyId>");await N0("seal_preference_thinking_depth_policies_remove",Y,J,{policyId:K},D0(Q.options));return}}}throw Error(`Unknown preference action: ${$??""}. Available: get, decision update, thinking-depth set, thinking-depth policies list/upsert/remove.`)}async function fZ0($={}){let q=n8(),I=R4(),U=HY(q,{stateful:I.stateful,defaultCorpId:I.defaultCorpId,corpId:$.corpId},t3());console.log(`[probe] corp=${U.id} source=${U.source.type}`);let Y=await TY(U);console.log("[probe] seal enterprise"),console.log(JSON.stringify(Y,null,2));let J=await I4(U),Q=await bw(J,{documentLimit:20,stylePreferencesEndpoint:U.seal.endpoints.approvalStylePreferences});console.log("[probe] approval context summary"),console.log(JSON.stringify({rules:Q.rules.rules.length,hasPendingRuleDeletes:Q.rules.hasPendingDeletes,documents:Q.documents.articles.length,documentsTotal:Q.documents.total,stylePreferences:Q.stylePreferences.ok?"ok":`error: ${Q.stylePreferences.error}`},null,2))}async function bZ0($,q,I){let U=q??y(I.options.corp)??($&&$!=="--corp"?$:void 0);await fZ0({corpId:U})}async function Mu($,q,I,U,Y){if($==="count"){await N0("seal_approval_rules_list",I,U,{countOnly:!0},D0(Y.options));return}if($==="list"){if(C0(Y.options.count)){await N0("seal_approval_rules_list",I,U,{countOnly:!0},D0(Y.options));return}let J=I1(Y.options.limit),Q=I1(Y.options.offset);if(C0(Y.options.summary)){await N0("seal_approval_rules_list",I,U,{fields:zZ0,limit:J,offset:Q},D0(Y.options));return}let K=await Jq("seal_approval_rules_list",I,U,{limit:J,offset:Q});GZ0(K,C0(Y.options.full)===!0),E0(K);return}if($==="clear"){let J=C0(Y.options.yes)===!0,Q=C0(Y.options.dryRun)??C0(Y.options["dry-run"])??!J;if(!J&&!Q)throw Error("Refusing to clear rules without --yes. Use --dry-run to preview.");let K=await Jq("seal_approval_rules_clear",I,U,{dryRun:Q,recode:C0(Y.options.recode)});if(!J&&Q&&K&&typeof K==="object"){E0({...K,nextCommand:`seal-use rules clear --corp ${U.id} --yes`},D0(Y.options));return}E0(K,D0(Y.options));return}if($==="versions"){await N0("seal_approval_rule_versions_list",I,U,{},D0(Y.options));return}if($==="version"){let J=q??y(Y.options.version);if(!J)throw Error("Usage: seal-use rules version <versionId|versionNumber|latest>");await N0("seal_approval_rule_version_get",I,U,Zz(J),D0(Y.options));return}if($==="get"){await N0("seal_approval_rule_get",I,U,{...KZ0(y(Y.options.version)),code:y(Y.options.code),runtimeId:y(Y.options.runtimeId)??y(Y.options["runtime-id"]),recordId:y(Y.options.r Line truncated
`).filter(Boolean),J=Y.slice(-q);return{logFile:I,lines:J,totalLines:Y.length}}async function OG1($){let q=jD($),I=Tu($),U=Nz($);cZ0($.stateDir);let Y=$.port??(process.env.PORT?Number.parseInt(process.env.PORT,10):FD),J=$.host??(process.env.HOST?process.env.HOST:MD);TD(q,`${process.pid}
`,{mode:384}),TD(I,JSON.stringify({pid:process.pid,port:Y,host:J,version:$.version,startedAt:new Date().toISOString()},null,2),{mode:384}),EY(U,`service starting on http://${J}:${Y} pid=${process.pid}`);let Q=null;try{Q=await AD({port:Y,host:J,silent:!0}),EY(U,`service listening pid=${process.pid}`)}catch(z){if(EY(U,`service failed to bind port ${Y}: ${z instanceof Error?z.message:String(z)}`),ED(q)===process.pid)c8(q,{force:!0}),c8(I,{force:!0});throw z}let K=()=>{if(Q)Q.close(),Q=null;if(ED(q)===process.pid)c8(q,{force:!0}),c8(I,{force:!0});EY(U,`stopped pid=${process.pid}`)};await new Promise((z)=>{let G=!1,H=()=>{if(G)return;G=!0,K(),process.off("SIGTERM",H),process.off("SIGINT",H),z()};process.once("SIGTERM",H),process.once("SIGINT",H)})}function nZ0($){cZ0($.stateDir);let q=jY($);if(q.running)return q;let I=$.launcher??{command:process.execPath,args:[$.entryFile]},U=[...I.args??[],"service","run"];if($.port)U.push("--port",String($.port));if($.host)U.push("--host",String($.host));let Y=ZG1(I.command,U,{cwd:$.appRoot,detached:!0,stdio:["ignore","ignore","ignore"],env:process.env});Y.unref();let J=jD($);return TD(J,`${Y.pid}
`,{mode:384}),EY(Nz($),`started pid=${Y.pid}`),{started:!0,...jY($)}}function iZ0($,q={}){let I=jD($),U=Tu($),Y=ED(I);if(!Y||!pZ0(Y,$.appRoot))return c8(I,{force:!0}),c8(U,{force:!0}),q.quiet?void 0:{stopped:!1,reason:"not running"};return process.kill(Y,"SIGTERM"),c8(I,{force:!0}),c8(U,{force:!0}),EY(Nz($),`stop requested pid=${Y}`),q.quiet?void 0:{stopped:!0,pid:Y}}function pZ0($,q){if(!NG1($))return!1;try{let I=XG1("ps",["-p",String($),"-o","command="],{encoding:"utf8"});return(I.includes(q)||I.includes("seal-use")||I.includes("src/cli.ts"))&&I.includes("service")&&I.includes("run")}catch{return!1}}function NG1($){try{return process.kill($,0),!0}catch{return!1}}function jD($){return Pu($.stateDir,"service.pid")}function Tu($){return Pu($.stateDir,"service.json")}function Nz($){return Pu($.stateDir,"service.log")}function ED($){if(!PD($))return;let q=Number(Au($,"utf8").trim());return Number.isInteger(q)&&q>0?q:void 0}function cZ0($){LG1($,{recursive:!0,mode:448})}function EY($,q){TD($,`${new Date().toISOString()} ${q}
`,{flag:"a",mode:384})}var Eu=MG1(FG1(),".config","seal-use");async function ju($,q,I){let U=I?I1(I.options.port)??I1(I.options.p):void 0,Y=I?y(I.options.host)??y(I.options.h):void 0,J=I?I1(I.options.lines)??I1(I.options.n):void 0,Q=await Qq($,{appRoot:q.appRoot,entryFile:q.entryFile,stateDir:Eu,version:e0,launcher:q.launcher,port:U,host:Y},{maxLines:J});if(Q!==void 0)E0(Q)}import{existsSync as AG1,readFileSync as dZ0}from"node:fs";async function mZ0($,q,I,U,Y){if($==="batch-records"||$==="records"){let J=q??y(Y.options.batchId)??y(Y.options["batch-id"]);if(!J)throw Error("Usage: seal-use simulation batch-records <batchId>");await N0("seal_simulation_batch_records_get",I,U,{batchId:J,query:y(Y.options.query)},D0(Y.options));return}if($==="create"||$==="run"){let J=y(Y.options.mode)??y(Y.options.sourceSystem)??y(Y.options["source-system"])??"hosecloud",Q=J==="material-pack"?"material_pack":J,K=y(Y.options.schemaConfig)??y(Y.options["schema-config"]),z=K?JSON.parse(dZ0(K,"utf8")):void 0,G=y(Y.options.input),H=G?JSON.parse(dZ0(G,"utf8")):a6(Y.json),w=y(Y.options.packageId)??y(Y.options["package-id"]),V=M6(Y.options.packageIds)??M6(Y.options["package-ids"])??(w?[w]:void 0),W=M6(Y.options.flowIds)??M6(Y.options["flow-ids"])??M6(Y.options.documentSn)??M6(Y.options["document-sn"]),X=y(Y.options.signKey)??y(Y.options["sign-key"])??y(Y.options.integration);await N0("seal_simulation_batch_create",I,U,{mode:Q,sourceSystem:Q,flowIds:W,documentSn:W,rejectNodeName:y(Y.options.rejectNode)??y(Y.options["reject-node"])??null,thinkingDepthOverride:y(Y.options.thinkingDepth)??y(Y.options["thinking-depth"]),skipInvoiceGeneration:C0(Y.options.skipInvoiceGeneration)??C0(Y.options["skip-invoice-generation"]),skipExpenseExtraction:C0(Y.options.skipExpenseExtraction)??C0(Y.options["skip-expense-extraction"]),disableAttachmentCache:C0(Y.options.disableAttachmentCache)??C0(Y.options["disable-attachment-cache"]),signKey:X,packageIds:V,packageId:w,templateId:y(Y.options.templateId)??y(Y.options["template-id"]),schemaConfig:z,requestIds:M6(Y.options.requestIds)??M6(Y.options["request-ids"]),workflowTypeId:y(Y.options.workflowTypeId)??y(Y.options["workflow-type-id"]),flowStatusList:M6(Y.options.flowStatusList)?.map(Number)??M6(Y.options["flow-status-list"])?.map(Number),businessCodes:M6(Y.options.businessCodes)??M6(Y.options["business-codes"]),documentType:y(Y.options.documentType)??y(Y.options["document-type"]),startTime:I1(Y.options.startTime)??I1(Y.options["start-time"]),endTime:I1(Y.options.endTime)??I1(Y.options["end-time"]),status:M6(Y.options.status),limit:I1(Y.options.limit),rawParams:H},D0(Y.options));return}if($==="wait"){let J=q??y(Y.options.batchId)??y(Y.options["batch-id"]);if(!J)throw Error("Usage: seal-use simulation wait <batchId> [--timeout 10m] [--poll-interval 2s]");await N0("seal_simulation_batch_wait",I,U,{batchId:J,timeout:y(Y.options.timeout),pollInterval:y(Y.options.pollInterval)??y(Y.options["poll-interval"])},D0(Y.options));return}if($==="clean"||$==="delete"){let J=q??y(Y.options.batchId)??y(Y.options["batch-id"]);if(!J)throw Error("Usage: seal-use simulation clean <batchId>");await N0("seal_simulation_batch_clean",I,U,{batchId:J},D0(Y.options));return}if($==="specifications"){let J=q??y(Y.options.integration)??y(Y.options.signKey)??y(Y.options["sign-key"]);await N0("seal_simulation_specifications_list",I,U,{signKey:J},D0(Y.options));return}if($==="list"){await N0("seal_simulation_batches_list",I,U,{limit:I1(Y.options.limit)},D0(Y.options));return}if($==="get"){let J=q??y(Y.options.batchId)??y(Y.options["batch-id"]);if(!J)throw Error("Usage: seal-use simulation get <batchId>");await N0("seal_simulation_batch_get",I,U,{batchId:J},D0(Y.options));return}if($==="templates"){await N0("seal_simulation_templates_get",I,U,{},D0(Y.options));return}if($==="integrations"){await N0("seal_simulation_integrations_get",I,U,{},D0(Y.options));return}if($==="package-upload"){let J=q??y(Y.options.file);if(!J)throw Error("Usage: seal-use simulation package-upload <材料包.zip>");if(!AG1(J))throw Error(`File not found: ${J}`);await N0("seal_simulation_material_package_upload",I,U,{filePath:J},D0(Y.options));return}throw Error(`Unknown simulation command: ${$??""}. Run 'seal-use help' for available commands.`)}import{existsSync as HX0}from"node:fs";import{join as gD}from"node:path";import{existsSync as gu,mkdirSync as YX0,rmSync as SG1,writeFileSync as yG1}from"node:fs";import{homedir as JX0}from"node:os";import{dirname as uG1,join as Bu}from"node:path";var lZ0=`---
name: seal-use
description: "v0.10.9: Use for Seal Use first-time enterprise onboarding, Hose/合思 or Seal-native authentication, assistance links and browser cURL intake, plus tenant approval operations, diagnosis, simulation, rules, users, configuration, and search."
description: "v0.10.11: Use for Seal Use first-time enterprise onboarding, Hose/合思 or Seal-native authentication, assistance links and browser cURL intake, plus tenant approval operations, diagnosis, simulation, rules, users, configuration, and search."
metadata:
version: 0.10.9
short-description: Seal tenant and Hose approval automation (v0.10.9)
version: 0.10.11
short-description: Seal tenant and Hose approval automation (v0.10.11)
---
# Seal Use (v0.10.9)
# Seal Use (v0.10.11)
Use the \`seal_cli\` MCP tool when it is available; pass the command string as its \`command\` argument. If MCP is unavailable, fall back to the global \`seal-use\` CLI. This skill is a routing layer for agents: keep this file short, choose the right command, and read a focused reference only when the task needs detail.
@@ -600,11 +603,11 @@ seal-use tool seal_approval_search --corp <corpId> --json '{"keywords":["差旅"
## Safety
Rule, document, style preference, and publish actions mutate Seal configuration. Make the target enterprise explicit, show the intended payload, and verify after the write. Never send real \`enterprises/*.json\` files, tokens, signed URLs, or full raw documents to GitHub, tickets, logs, or chat unless the user explicitly requests a safe export.
`;var pZ0=`interface:
`;var oZ0=`interface:
display_name: "Seal Use"
short_description: "Diagnose approval feedback and publish minimal rule fixes"
default_prompt: "Use $seal-use to resolve a customer feedback package to the correct tenant, diagnose the approval run, propose a minimal rule diff, and publish only after explicit confirmation."
`;var cZ0=`# Rule Lightweight Queries
`;var rZ0=`# Rule Lightweight Queries
Use this reference when the user wants rule counts, compact rule lists, one rule from a historical version, or approval knowledge search without dumping hundreds of rule descriptions.
@@ -709,7 +712,7 @@ Use current search only when the question is about current draft/current knowled
## Output Discipline
If a rule command would return many descriptions or more than about 20 rules, use \`rules count\`, \`rules list --summary\`, \`fields\`, \`snippetOnly\`, or \`--output-file\`. Use \`--full\` only for deliberate exports.
`;var dZ0=`# Approval Bad Case Catalog
`;var tZ0=`# Approval Bad Case Catalog
Use this file only as a comparison catalog after inspecting the current trace. Do not treat any case below as a default diagnosis.
@@ -759,7 +762,7 @@ Important nuance:
- This is a bad-case pattern, not a general rule that every amount-total dispute is caused by \`pre_analysis\`.
- Use it when the current trace shows recognized amounts being excluded downstream or duplicate attachments producing inconsistent conclusions.
`;var lZ0="# Seal Use CLI Reference\n\nRun from any directory after installing the global CLI:\n\n```bash\nseal-use <command>\n```\n\nEnterprise config lookup:\n\n- If `SEAL_USE_ENTERPRISES_DIR` is set, only that directory is loaded.\n- Otherwise `./enterprises` and `~/.config/seal-use/enterprises` are merged.\n- User-level configs override same-ID local configs.\n\nEnterprise selection is stateless by default. Commands that access an enterprise require\n`--corp <corpId>` unless stateful mode is explicitly enabled:\n\n```bash\nseal-use config mode stateful --corp <corpId>\nseal-use corps switch <corpId>\nseal-use config mode stateless\n```\n\nThe global mode is stored in `~/.config/seal-use/config.json`; set `SEAL_USE_CONFIG_FILE` to\noverride that path. The legacy `current-corp` file is not read.\n\n## Stream & Exit Code Contract\n\n- **`stdout`**: Pure, deterministic JSON for machine/Agent parsing.\n- **`stderr`**: Diagnostics, probing logs, and **Next-Step Command Suggestions** (e.g. `👉 Next action: ...`).\n- **`Exit Code`**: `0` on success, non-zero (e.g. `1`) on failure to trigger Agent error self-remediation.\n\n## Top-Level Commands\n\n```bash\nseal-use version\nseal-use config paths\nseal-use config get\nseal-use config mode <stateful|stateless> [--corp <corpId>]\nseal-use config lint <enable|disable|status> [--linter <name>] [--min-score <score>]\nseal-use rules pull [--corp <corpId>] [--version <id|num|latest>] [--out <file>]\nseal-use rules lint [--file <path>] [--corp <corpId>] [--linter <name|path>] [--version <num>] [--code <code>] [--min-score <score>] [--summary]\nseal-use rules push [--file <path>] [--corp <corpId>] [--publish] [--version-name <name>] [--dry-run|--yes]\nseal-use service <start|stop|restart|status|logs> [--port 8787] [--host 127.0.0.1] [--lines 50]\nseal-use http [--port 8787] [--host 127.0.0.1]\nseal-use serve [--port 8787]\nseal-use update\nseal-use tools list\nseal-use corps list [--corp <corpId>]\nseal-use corps current [--corp <corpId>]\nseal-use corps switch <corpId>\nseal-use corps add-hose --json '{\"name\":\"企业名称\",\"domain\":\"https://app.ekuaibao.com\",\"appKey\":\"...\",\"appSecurity\":\"...\",\"proxyStaffBizId\":\"corpId:staffId\"}'\nseal-use corps add-seal --json '{\"sealUrl\":\"https://tenant.sealai.cc\",\"token\":\"seal-bearer-token\"}'\nseal-use corps add-link <https://.../web/thirdparty.html?...> [--name <customName>] [--overwrite]\nseal-use auth diagnose [--corp <corpId>]\nseal-use auth hose-link [--corp <corpId>] [--expire 7200]\nseal-use delegation list [--corp <corpId>]\nseal-use delegation create [--note <note>] [--from-link <url>] [--corp <corpId>]\nseal-use delegation revoke <tokenId> [--corp <corpId>]\nseal-use users create --name <name> --phone <phone> [--dept <deptId>] [--corp <corpId>]\nseal-use users reset-password <userId> [--corp <corpId>]\nseal-use users get <userId> [--corp <corpId>]\nseal-use users delete <userId> [--corp <corpId>]\nseal-use llm config [--corp <corpId>]\nseal-use llm providers [--corp <corpId>]\nseal-use permissions available [--corp <corpId>]\nseal-use permissions configs [--corp <corpId>]\nseal-use billing status [--corp <corpId>]\nseal-use billing plans [--corp <corpId>]\nseal-use billing features [--corp <corpId>]\nseal-use webhook list [--query <text>] [--show-secret] [--corp <corpId>]\nseal-use webhook get|find <idOrName> [--show-secret] [--corp <corpId>]\nseal-use webhook add --name <name> --result-url <url> [--mode assisted|semi_automatic|fully_automatic] [--auto-approval-rate 60] [--secret <secret>] [--corp <corpId>]\nseal-use webhook update <idOrName> [--name <name>] [--result-url <url>] [--mode assisted|semi_automatic|fully_automatic] [--auto-approval-rate 60] [--secret <secret>|--rotate-secret] [--corp <corpId>]\nseal-use webhook delete <idOrName> --yes [--corp <corpId>]\nseal-use deploy hosecloud requirements [--corp <corpId>]\nseal-use deploy hosecloud list [--corp <corpId>]\nseal-use deploy hosecloud get [<sign-key>] [--corp <corpId>]\nseal-use deploy hosecloud status [--corp <corpId>]\nseal-use deploy hosecloud configure --json '{...}' [--corp <corpId>]\nseal-use deploy hosecloud sync [<sign-key>] [--auto] [--corp <corpId>]\nseal-use preference get [--corp <corpId>]\nseal-use preference decision update --json '{\"explicitApprove\":\"...\"}' [--corp <corpId>]\nseal-use preference thinking-depth set --default <medium|high> [--corp <corpId>]\nseal-use preference thinking-depth policies list [--corp <corpId>]\nseal-use preference thinking-depth policies upsert --json '{...}' [--corp <corpId>]\nseal-use preference thinking-depth policies remove <policyId> [--corp <corpId>]\nseal-use source config [--corp <corpId>]\nseal-use tool <toolName> [--corp <corpId>] [--json '{\"key\":\"value\"}']\nseal-use approval-runs summary --corp <corpId> [--date YYYY-MM-DD] [--timezone Asia/Shanghai]\nseal-use approval-runs stats --corp <corpId> [--since 3months] [--dedupe-by sourceDocumentSN|sourceDocumentId|id]\nseal-uLine truncated
`;var aZ0="# Seal Use CLI Reference\n\nRun from any directory after installing the global CLI:\n\n```bash\nseal-use <command>\n```\n\nEnterprise config lookup:\n\n- If `SEAL_USE_ENTERPRISES_DIR` is set, only that directory is loaded.\n- Otherwise `./enterprises` and `~/.config/seal-use/enterprises` are merged.\n- User-level configs override same-ID local configs.\n\nEnterprise selection is stateless by default. Commands that access an enterprise require\n`--corp <corpId>` unless stateful mode is explicitly enabled:\n\n```bash\nseal-use config mode stateful --corp <corpId>\nseal-use corps switch <corpId>\nseal-use config mode stateless\n```\n\nThe global mode is stored in `~/.config/seal-use/config.json`; set `SEAL_USE_CONFIG_FILE` to\noverride that path. The legacy `current-corp` file is not read.\n\n## Stream & Exit Code Contract\n\n- **`stdout`**: Pure, deterministic JSON for machine/Agent parsing.\n- **`stderr`**: Diagnostics, probing logs, and **Next-Step Command Suggestions** (e.g. `👉 Next action: ...`).\n- **`Exit Code`**: `0` on success, non-zero (e.g. `1`) on failure to trigger Agent error self-remediation.\n\n## Top-Level Commands\n\n```bash\nseal-use version\nseal-use config paths\nseal-use config get\nseal-use config mode <stateful|stateless> [--corp <corpId>]\nseal-use config test-dir [<path>|--clear]\nseal-use config lint <enable|disable|status> [--linter <name>] [--min-score <score>]\nseal-use rules pull [--corp <corpId>] [--version <id|num|latest>] [--out <file>]\nseal-use rules lint [--file <path>] [--corp <corpId>] [--linter <name|path>] [--version <num>] [--code <code>] [--min-score <score>] [--summary]\nseal-use rules push [--file <path>] [--corp <corpId>] [--publish] [--version-name <name>] [--dry-run|--yes]\nseal-use service <start|stop|restart|status|logs> [--port 8787] [--host 127.0.0.1] [--lines 50]\nseal-use http [--port 8787] [--host 127.0.0.1]\nseal-use serve [--port 8787]\nseal-use update\nseal-use tools list\nseal-use corps list [--corp <corpId>]\nseal-use corps current [--corp <corpId>]\nseal-use corps switch <corpId>\nseal-use corps add-hose --json '{\"name\":\"企业名称\",\"domain\":\"https://app.ekuaibao.com\",\"appKey\":\"...\",\"appSecurity\":\"...\",\"proxyStaffBizId\":\"corpId:staffId\"}'\nseal-use corps add-seal --json '{\"sealUrl\":\"https://tenant.sealai.cc\",\"token\":\"seal-bearer-token\"}'\nseal-use corps add-link <https://.../web/thirdparty.html?...> [--name <customName>] [--overwrite]\nseal-use auth diagnose [--corp <corpId>]\nseal-use auth hose-link [--corp <corpId>] [--expire 7200]\nseal-use delegation list [--corp <corpId>]\nseal-use delegation create [--note <note>] [--from-link <url>] [--corp <corpId>]\nseal-use delegation revoke <tokenId> [--corp <corpId>]\nseal-use users create --name <name> --phone <phone> [--dept <deptId>] [--corp <corpId>]\nseal-use users reset-password <userId> [--corp <corpId>]\nseal-use users get <userId> [--corp <corpId>]\nseal-use users delete <userId> [--corp <corpId>]\nseal-use llm config [--corp <corpId>]\nseal-use llm providers [--corp <corpId>]\nseal-use permissions available [--corp <corpId>]\nseal-use permissions configs [--corp <corpId>]\nseal-use billing status [--corp <corpId>]\nseal-use billing plans [--corp <corpId>]\nseal-use billing features [--corp <corpId>]\nseal-use webhook list [--query <text>] [--show-secret] [--corp <corpId>]\nseal-use webhook get|find <idOrName> [--show-secret] [--corp <corpId>]\nseal-use webhook add --name <name> --result-url <url> [--mode assisted|semi_automatic|fully_automatic] [--auto-approval-rate 60] [--secret <secret>] [--corp <corpId>]\nseal-use webhook update <idOrName> [--name <name>] [--result-url <url>] [--mode assisted|semi_automatic|fully_automatic] [--auto-approval-rate 60] [--secret <secret>|--rotate-secret] [--corp <corpId>]\nseal-use webhook delete <idOrName> --yes [--corp <corpId>]\nseal-use deploy hosecloud requirements [--corp <corpId>]\nseal-use deploy hosecloud list [--corp <corpId>]\nseal-use deploy hosecloud get [<sign-key>] [--corp <corpId>]\nseal-use deploy hosecloud status [--corp <corpId>]\nseal-use deploy hosecloud configure --json '{...}' [--corp <corpId>]\nseal-use deploy hosecloud sync [<sign-key>] [--auto] [--corp <corpId>]\nseal-use preference get [--corp <corpId>]\nseal-use preference decision update --json '{\"explicitApprove\":\"...\"}' [--corp <corpId>]\nseal-use preference thinking-depth set --default <medium|high> [--corp <corpId>]\nseal-use preference thinking-depth policies list [--corp <corpId>]\nseal-use preference thinking-depth policies upsert --json '{...}' [--corp <corpId>]\nseal-use preference thinking-depth policies remove <policyId> [--corp <corpId>]\nseal-use source config [--corp <corpId>]\nseal-use tool <toolName> [--corp <corpId>] [--json '{\"key\":\"value\"}']\nseal-use approval-runs summary --corp <corpId> [--date YYYY-MM-DD] [--timezone Asia/Shanghai]\nseal-use approval-runs stats --corp <corpId> [--since 3months] [--dedupe-by soLine truncated
Use this workflow when a customer disputes an AI approval finding about an attachment, invoice, receipt, OCR result, or a UI-highlighted audit result.
@@ -980,7 +983,7 @@ Manual image check:
- The customer's objection that they were receipts rather than invoices was reasonable.
However, the final rejection also had an independent rule-37 reason: payment screenshots totaled 699.48 while reimbursement was 700.00.
`;var rZ0=`# Customer Feedback Rule Remediation
`;var $X0=`# Customer Feedback Rule Remediation
Use this low-freedom workflow when the user provides packaged customer feedback from WeChat, screenshots, rejection notifications, a document number, or expected business behavior and wants diagnosis or an approval-rule change.
@@ -1144,7 +1147,7 @@ Return a compact report containing:
- New version number and version name, if published
- Verification result
- Whether a regression rerun was performed
`;var tZ0="# Enterprise Onboarding\n\nRead this reference for first installation, zero configured enterprises, incoming credentials or assistance links, and browser-copied cURL. The goal is to identify the enterprise with the least user effort while keeping authentication material confidential.\n\n## Start With Discovery\n\nRun this before asking for setup parameters (if `seal-use` is not installed, first run `curl -fsSL https://git.ying-qing.cn/gitea/seal-use/raw/branch/main/scripts/install.sh | bash`):\n\n```bash\nseal-use version\nseal-use corps list\n```\n\n- If `seal-use` is not installed on the system, run the curl install script above to install it.\n- If the target enterprise is listed, match the user's human enterprise name to its returned `id` and use that value as `--corp` on every command. Do not ask the user for `corpId`.\n- If multiple configured enterprises plausibly match, show their human names and let the user choose. Keep their IDs as implementation details.\n- If none are configured, ask one plain-language question: “你现在手上有哪一种接入材料:合思开放平台 appKey/appSecurity、合思授权/协助链接、Seal 协助链接,还是从已登录的合思或 Seal 网页复制的 cURL?”\n\nDo not open with a JSON template or a list of internal fields.\n\nAll command examples in this reference are for the Agent to run. Do not hand them to the user as setup instructions. Communicate with the user in natural language and translate their answer into CLI/MCP parameters yourself.\n\n## Keep Two Concepts Separate\n\nClassify both the enterprise identity origin and how the current credential was acquired:\n\n| Enterprise identity origin | Credential material the user may have | Meaning |\n| --- | --- | --- |\n| Hose/合思-sourced Seal tenant | Hose `appKey` + `appSecurity` | Stable, refreshable standard integration |\n| Hose/合思-sourced Seal tenant | Hose authorization/assistance link | Temporary Hose authorization that can lead into the Seal SSO session |\n| Hose/合思-sourced Seal tenant | cURL copied from an authenticated Hose or Seal page | Snapshot of a signed-in browser session; it may expire |\n| Seal-native tenant | Seal assistance/delegation link | Temporary delegated access to a Seal tenant |\n| Seal-native tenant | cURL copied from an authenticated Seal page | Snapshot containing the Seal host and session authentication |\n\nCredential shape alone does not define identity origin. In particular, a Hose-sourced user eventually receives a Seal Bearer session after SSO. When `whoami` returns provider metadata, preserve it and use it to describe the tenant accurately.\n\n## Parameter Ownership\n\nAsk the user only for information that cannot be discovered safely:\n\n| Field | Owner and behavior |\n| --- | --- |\n| `appKey`, `appSecurity` | User supplies these for standard Hose OpenAPI onboarding. Explain that they come from the enterprise's 合思开放平台 application credentials. Treat both as secrets. |\n| `domain` | Probe the standard Hose SaaS domains automatically. Ask only when probing fails and the enterprise uses a private or dedicated deployment. |\n| Enterprise name and `corpId` | Discover from the credential response or Seal `whoami`. Do not ask the user to invent or locate them first. |\n| Administrator and `staffId` | Discover administrator candidates. If more than one is eligible, present name and masked phone for the user to choose; pass the selected ID internally. |\n| Seal URL, tenant ID, tenant slug | Discover from the assistance link, cURL host, and Seal `whoami`. |\n| Bearer token, cookies, signed query tokens | Extract only from user-supplied authentication material. Never print them back or include them in summaries. |\n\n## Route 1: Standard Hose Credentials\n\nThis is the preferred durable route for a Hose-sourced tenant. Read `hose-enterprise-init.md`, then use:\n\n```bash\nseal-use corps add-hose --json '{\"appKey\":\"...\",\"appSecurity\":\"...\"}'\n```\n\nThe CLI probes the standard domains, discovers the corporation, and discovers administrator candidates. If it returns multiple candidates, show only useful identifying information and ask which person should be used; retry with `staffName`, `staffPhone`, or the selected `staffId` internally. After creation, run:\n\n```bash\nseal-use auth diagnose --corp <discovered-id>\n```\n\nDo not ask for `domain`, `corpId`, or `proxyStaffBizId` up front. For a dedicated/private Hose deployment, add `domain` only after standard probing reports that it cannot find the enterprise.\n\n## Route 2: Incoming Assistance Link\n\nFirst distinguish the link by its host and purpose:\n\n- A Hose authorization/provisional link opens a Hose session and may continue through Seal SSO. It is not a Seal delegation link.\n- A Seal assistance/delegation link grants temporary delegated access on a Seal tenant. It is not a Hose OpenAPI credential.\n- `seal-use auth hose-link` and `seal-use delegation create` generat Line truncated
`;var qX0="# Enterprise Onboarding\n\nRead this reference for first installation, zero configured enterprises, incoming credentials or assistance links, and browser-copied cURL. The goal is to identify the enterprise with the least user effort while keeping authentication material confidential.\n\n## Start With Discovery\n\nRun this before asking for setup parameters (if `seal-use` is not installed, first run `curl -fsSL https://git.ying-qing.cn/gitea/seal-use/raw/branch/main/scripts/install.sh | bash`):\n\n```bash\nseal-use version\nseal-use corps list\n```\n\n- If `seal-use` is not installed on the system, run the curl install script above to install it.\n- If the target enterprise is listed, match the user's human enterprise name to its returned `id` and use that value as `--corp` on every command. Do not ask the user for `corpId`.\n- If multiple configured enterprises plausibly match, show their human names and let the user choose. Keep their IDs as implementation details.\n- If none are configured, ask one plain-language question: “你现在手上有哪一种接入材料:合思开放平台 appKey/appSecurity、合思授权/协助链接、Seal 协助链接,还是从已登录的合思或 Seal 网页复制的 cURL?”\n\nDo not open with a JSON template or a list of internal fields.\n\nAll command examples in this reference are for the Agent to run. Do not hand them to the user as setup instructions. Communicate with the user in natural language and translate their answer into CLI/MCP parameters yourself.\n\n## Keep Two Concepts Separate\n\nClassify both the enterprise identity origin and how the current credential was acquired:\n\n| Enterprise identity origin | Credential material the user may have | Meaning |\n| --- | --- | --- |\n| Hose/合思-sourced Seal tenant | Hose `appKey` + `appSecurity` | Stable, refreshable standard integration |\n| Hose/合思-sourced Seal tenant | Hose authorization/assistance link | Temporary Hose authorization that can lead into the Seal SSO session |\n| Hose/合思-sourced Seal tenant | cURL copied from an authenticated Hose or Seal page | Snapshot of a signed-in browser session; it may expire |\n| Seal-native tenant | Seal assistance/delegation link | Temporary delegated access to a Seal tenant |\n| Seal-native tenant | cURL copied from an authenticated Seal page | Snapshot containing the Seal host and session authentication |\n\nCredential shape alone does not define identity origin. In particular, a Hose-sourced user eventually receives a Seal Bearer session after SSO. When `whoami` returns provider metadata, preserve it and use it to describe the tenant accurately.\n\n## Parameter Ownership\n\nAsk the user only for information that cannot be discovered safely:\n\n| Field | Owner and behavior |\n| --- | --- |\n| `appKey`, `appSecurity` | User supplies these for standard Hose OpenAPI onboarding. Explain that they come from the enterprise's 合思开放平台 application credentials. Treat both as secrets. |\n| `domain` | Probe the standard Hose SaaS domains automatically. Ask only when probing fails and the enterprise uses a private or dedicated deployment. |\n| Enterprise name and `corpId` | Discover from the credential response or Seal `whoami`. Do not ask the user to invent or locate them first. |\n| Administrator and `staffId` | Discover administrator candidates. If more than one is eligible, present name and masked phone for the user to choose; pass the selected ID internally. |\n| Seal URL, tenant ID, tenant slug | Discover from the assistance link, cURL host, and Seal `whoami`. |\n| Bearer token, cookies, signed query tokens | Extract only from user-supplied authentication material. Never print them back or include them in summaries. |\n\n## Route 1: Standard Hose Credentials\n\nThis is the preferred durable route for a Hose-sourced tenant. Read `hose-enterprise-init.md`, then use:\n\n```bash\nseal-use corps add-hose --json '{\"appKey\":\"...\",\"appSecurity\":\"...\"}'\n```\n\nThe CLI probes the standard domains, discovers the corporation, and discovers administrator candidates. If it returns multiple candidates, show only useful identifying information and ask which person should be used; retry with `staffName`, `staffPhone`, or the selected `staffId` internally. After creation, run:\n\n```bash\nseal-use auth diagnose --corp <discovered-id>\n```\n\nDo not ask for `domain`, `corpId`, or `proxyStaffBizId` up front. For a dedicated/private Hose deployment, add `domain` only after standard probing reports that it cannot find the enterprise.\n\n## Route 2: Incoming Assistance Link\n\nFirst distinguish the link by its host and purpose:\n\n- A Hose authorization/provisional link opens a Hose session and may continue through Seal SSO. It is not a Seal delegation link.\n- A Seal assistance/delegation link grants temporary delegated access on a Seal tenant. It is not a Hose OpenAPI credential.\n- `seal-use auth hose-link` and `seal-use delegation create` generat Line truncated
Use this reference for Hose/合思 enterprise configuration and user-facing Hose authorization links.
@@ -1209,7 +1212,7 @@ Important:
- \`seal-use auth diagnose\` proves this stage works but redacts the token, so it is not enough when the user needs the actual clickable Hose link.
- **Formatting Requirement**: When returning a Hose authorization link to the user, ALWAYS provide BOTH a code block (\` \`\`\`text ... \`\`\` \`) for easy copying without accidental default browser redirection, AND a clickable hyperlink.
- If the CLI later provides a dedicated command for this, prefer that command.
`;var sZ0=`# Hose Enterprise Initialization & Automated Discovery
`;var UX0=`# Hose Enterprise Initialization & Automated Discovery
Use this reference for automated Hose/合思 enterprise onboarding, multi-domain probing (including dedicated private cloud domains like 美年大健康), OpenAPI role and staff discovery, and non-TUI safe administrator selection.
@@ -1315,12 +1318,12 @@ seal-use corps hose-staffs --json '{
}'
\`\`\`
* 直接使用指定 ID 完成接入并进行连通性验证。
`;var qX0={"SKILL.md":iZ0,"agents/openai.yaml":pZ0,"references/rule-lightweight.md":cZ0,"references/approval-bad-cases.md":dZ0,"references/cli.md":lZ0,"references/approval-run-lightweight.md":mZ0,"references/approval-attachment-trace.md":oZ0,"references/customer-feedback-rule-remediation.md":rZ0,"references/enterprise-onboarding.md":tZ0,"references/hose-enterprise-auth.md":aZ0,"references/hose-enterprise-init.md":sZ0};function IX0(){return qX0["SKILL.md"]||""}function Nz(){return gu($X0(),".agents","skills","seal-use")}function UX0(){return gu($X0(),".agents","skills","seal-home")}function YX0(){let $=UX0();if(Eu($))try{return Pw1($,{recursive:!0,force:!0}),!0}catch{return!1}return!1}function ju($=Nz()){YX0(),eZ0($,{recursive:!0});let q=[];for(let[I,U]of Object.entries(qX0)){let Y=gu($,I);eZ0(Ew1(Y),{recursive:!0}),Tw1(Y,U,"utf8"),q.push(I)}return{targetDir:$,files:q}}function Bu(){let $=UX0(),q=Nz(),I=Eu($),U=Eu(q);if(I||U)return YX0(),ju(q),{synced:!0,targetDir:q};return{synced:!1}}function QX0($,q,I){if($==="dump"||$==="cat"||$==="show"){process.stdout.write(`${IX0()}
`);return}if($==="install"||$==="init"||$==="sync"){let U=C0(I.options.local)||C0(I.options.workspace),Y=x(I.options.dir)??x(I.options.target)??q,J=Y?Y:U?ED(process.cwd(),".agents","skills","seal-use"):Nz(),Q=ju(J);B0({installed:!0,targetDir:Q.targetDir,fileCount:Q.files.length,files:Q.files});return}if($==="status"||$==="get"||!$){let U=Nz(),Y=ED(process.cwd(),".agents","skills","seal-use");B0({global:{dir:U,installed:JX0(ED(U,"SKILL.md"))},local:{dir:Y,installed:JX0(ED(Y,"SKILL.md"))}});return}throw Error(`Unknown skill command: ${$}. Run 'seal-use help' for available commands.`)}async function KX0($,q){if($==="config"){B0(await MY(q));return}throw Error(`Unknown source command: ${$??""}. Run 'seal-use help' for available commands.`)}async function zX0($,q,I,U){if(!$)throw Error("Usage: seal-use tool <toolName> [--json '{...}']");await O0($,q,I,a6(U.json),D0(U.options))}function wX0(){B0(Gz.map(($)=>({name:$.name,description:$.description})))}import{chmodSync as gw1,mkdirSync as jw1,renameSync as Ru,rmSync as Bw1,unlinkSync as ZX0,writeFileSync as GX0}from"node:fs";import{dirname as Rw1,join as HX0}from"node:path";import{spawnSync as Uq}from"node:child_process";function gD($=process.execPath,q=import.meta.url){if(q.includes("/$bunfs/")||q.includes("\\$bunfs\\"))return!0;let I=$.toLowerCase().replace(/\\/g,"/");return!I.endsWith("/bun")&&!I.endsWith("/bun.exe")&&!I.endsWith("/node")&&!I.endsWith("/node.exe")}var XX0="yunyingk/seal-use",Mz="yunyingk/seal-home";var vw1="SEAL_USE_GITHUB_REPO",Cw1="SEAL_HOME_GITHUB_REPO";async function LX0($,q={}){let I={appRoot:$.appRoot,entryFile:$.entryFile,stateDir:Pu,version:t0,launcher:$.launcher},U=q.repo||process.env[vw1]?.trim()||process.env[Cw1]?.trim()||XX0,Y=q.targetVersion?.trim(),J=Y&&Y.toLowerCase()!=="latest"?Y:void 0;if(J){let P=J.replace(/^v/,""),B=DX0(P,t0);if(B<0){B0({updated:!1,currentVersion:t0,targetVersion:P,mode:gD()?"binary":"source",message:`Cannot downgrade seal-use from v${t0} to older version v${P}. Updates must be forward-only.`});return}if(B===0&&!q.force){B0({updated:!1,currentVersion:t0,targetVersion:P,mode:gD()?"binary":"source",message:`seal-use is already at version v${t0}. Use --force to reinstall.`});return}}if(q.changelogOnly){let P=await vu(U,q.limit??10);B0({currentVersion:t0,totalQueried:P.length,releases:P.map((B)=>({version:B.version,tagName:B.tagName,publishedAt:B.publishedAt,author:B.author,releaseNotes:B.notes,releaseUrl:B.htmlUrl,isCurrent:B.version===t0,isNewer:Fz(B.version,t0)}))});return}if(!gD()){if(q.checkOnly){let B=await vu(U,30),k=B[0],h=k?.version??t0,f=B.find((p)=>p.version===t0),S=Fz(h,t0),t=B.filter((p)=>Fz(p.version,t0));B0({updated:!1,updateAvailable:S,currentVersion:t0,currentVersionPublishedAt:f?.publishedAt,latestVersion:h,latestVersionPublishedAt:k?.publishedAt,behindCount:t.length,pendingReleases:t.map((p)=>({version:p.version,tagName:p.tagName,publishedAt:p.publishedAt,author:p.author,releaseNotes:p.notes,releaseUrl:p.htmlUrl})),releaseNotes:k?.notes??"",releaseUrl:k?.htmlUrl??"",mode:"source",message:"Running in source development mode. Run 'seal-use update' to git pull & bun install."});return}let P=PY(I).running;if(P)await Iq("stop",I);try{WX0("git",["-C",$.appRoot,"pull","--ff-only"])}catch(B){console.error(`git pull skipped: ${B instanceof Error?B.message:String(B)}`)}if(WX0("bun",["install"],{cwd:$.appRoot}),P)await Iq("start",I);B0({updated:!0,serviceRestarted:P,version:t0,mode:"source"});return}let Q=_w1(),K=hw1(),z=await vu(U,30),w=J?z.find((P)=>P.version===J||P.tagName===J||P.tagName===`v${J}`)??await VX0(U,J):z[0]??await VX0(U);if(!w){B0({updated:!1,currentVersion:t0,mode:"binary",message:`Failed to query releases from repository '${U}'`});return}let G=w.version,H=z.find((P)=>P.version===t0),V=Fz(G,t0),W=V||Boolean(q.force),X=z.filter((P)=>Fz(P.version,t0));if(q.checkOnly){B0({updated:!1,updateAvailable:V,currentVersion:t0,currentVersionPublishedAt:H?.publishedAt,latestVersion:G,latestVersionPublishedAt:w.publishedAt,behindCount:X.length,pendingReleases:X.map((P)=>({version:P.version,tagName:P.tagName,publishedAt:P.publishedAt,author:P.author,releaseNotes:P.notes,releaseUrl:P.htmlUrl})),releaseNotes:w.notes,releaseUrl:w.htmlUrl,mode:"binary"});return}if(!W){B0({updated:!1,currentVersion:t0,currentVersionPublishedAt:H?.publishedAt,latestVersion:G,latestVersionPublishedAt:w.publishedAt,mode:"binary",message:`seal-use is already up to date (v${t0})`});return}let L=Sw1(w.assets,Q,K);if(!L)throw Error(`No compatible binary found for ${Q}-${K} in release v${G}. Available assets: ${w.assets.map((P)=>P.name).join(", ")}`);let D=PY(I).running;if(D)await Iq("stop",I);let N=process.execPath,E=Rw1(N),T=HX0(E,`.tmp-update-${Date.now()}`);jw1(T,{recursive:!0});try{let P=HX0(T,L.name);await yw1(L.downloadUrl,P,w.tagName,L.name);let B=P;if(L.name.endsWith(".tar.gz")||L.name.endsWith(".tgz"))B=uw1(P,T,Q);else if(L.name.endsWith(".zip"))B=xw1(P,T,Q);if(gw1(B,493),process.platform==="darwin")try{Uq("/usr/bin/codesig Line truncated
`)}catch{}}async function yw1($,q,I,U){let Y=Cu(),J=[],Q=I?I.startsWith("v")?I:`v${I}`:void 0,K=U||$.split("/").pop()||"";if(Y!=="github"){if(Q&&K)J.push(`https://git.ying-qing.cn/gitea/seal-use/releases/download/${Q}/${K}`,`https://git.ying-qing.cn/gitea/seal-home/releases/download/${Q}/${K}`);if($.startsWith("https://git.ying-qing.cn"))J.push($)}if(Y!=="gitea")if(Q&&K){let L=`https://github.com/${XX0}/releases/download/${Q}/${K}`;if(!process.env.CI)J.push(`https://ghfast.top/${L}`,`https://gh.ddlc.top/${L}`);J.push(L)}else if($.includes("github.com")){if(!process.env.CI)J.push(`https://ghfast.top/${$}`,`https://gh.ddlc.top/${$}`);J.push($)}else J.push($);let z=Array.from(new Set(J)),w,G=6000,H=6000,V=307200,W=1e4,X=180000;for(let L=0;L<z.length;L++){let D=z[L],N=new AbortController,E="",T=(h)=>{E=h;try{N.abort()}catch{}},P=setTimeout(()=>{T("Connection timed out (no response headers within 6s)")},G),B,k;try{jD(`==> [${L+1}/${z.length}] Downloading via: ${D}`);let h=await fetch(D,{signal:N.signal});if(P)clearTimeout(P),P=void 0;if(!h.ok)throw Error(`HTTP ${h.status} ${h.statusText}`);B=setTimeout(()=>{T("Overall download time exceeded 3 minutes")},X);let f=Number(h.headers.get("content-length"))||0,S=h.body?.getReader();if(!S){let b=Buffer.from(await h.arrayBuffer());if(b.length<1000)throw Error(`Downloaded content is suspiciously small (${b.length} bytes)`);GX0(q,b),jD(`✓ Download succeeded (${(b.length/1024/1024).toFixed(1)} MB)`);return}let t=[],p=0,C=0;k=setTimeout(()=>{if(p<V){let b=(p/1024).toFixed(1);T(`Initial transfer too slow (${b} KB < 300 KB in 6s), switching mirror...`)}},H);while(!0){let b=S.read(),J0,g=new Promise((K0,G0)=>{J0=setTimeout(()=>{G0(Error("Data transfer stalled (no chunk received for 10s)"))},W)}),u;try{u=await Promise.race([b,g])}finally{if(J0)clearTimeout(J0)}let{done:d,value:a}=u;if(d)break;if(a){if(t.push(a),p+=a.length,k&&p>=V)clearTimeout(k),k=void 0;let K0=Date.now();if(K0-C>200){C=K0;let G0=f?Math.round(p/f*100):0,M0=(p/1048576).toFixed(1),v0=f?(f/1048576).toFixed(1):"?";try{process.stderr.write(`\r ↳ Progress: ${G0}% (${M0} / ${v0} MB)...`)}catch{}}}}try{process.stderr.write(`
`)}catch{}let n=Buffer.concat(t);if(n.length<1000)throw Error(`Downloaded content is suspiciously small (${n.length} bytes)`);GX0(q,n),jD(`✓ Download completed successfully (${(n.length/1024/1024).toFixed(1)} MB)`);return}catch(h){if(P)clearTimeout(P);if(k)clearTimeout(k);if(B)clearTimeout(B);let f=E||(h instanceof Error?h.message:String(h));w=Error(f),jD(`
↳ Mirror failed: ${w.message}`)}finally{if(P)clearTimeout(P);if(k)clearTimeout(k);if(B)clearTimeout(B)}}throw Error(`Failed to download asset from all mirrors: ${w?.message}`)}function uw1($,q,I){let U=Uq("tar",["-xzf",$,"-C",q],{stdio:"pipe"});if(U.status!==0)throw Error(`Failed to extract tar archive: ${U.stderr.toString()}`);ZX0($);let Y=I==="windows"?"seal-use.exe":"seal-use",J=Uq("find",[q,"-type","f"],{encoding:"utf8"}).stdout.trim().split(`
`).filter(Boolean),Q=J.find((K)=>K.endsWith(`/${Y}`)||K.endsWith(Y));if(Q)return Q;return J[0]||$}function xw1($,q,I){let U=Uq("unzip",["-q","-o",$,"-d",q],{stdio:"pipe"});if(U.status!==0)throw Error(`Failed to extract zip archive: ${U.stderr.toString()}`);ZX0($);let Y=I==="windows"?"seal-use.exe":"seal-use",J=Uq("find",[q,"-type","f"],{encoding:"utf8"}).stdout.trim().split(`
`).filter(Boolean),Q=J.find((K)=>K.endsWith(`/${Y}`)||K.endsWith(Y));if(Q)return Q;return J[0]||$}function DX0($,q){let I=$.replace(/^v/,"").split(".").map((Y)=>Number.parseInt(Y,10)||0),U=q.replace(/^v/,"").split(".").map((Y)=>Number.parseInt(Y,10)||0);for(let Y=0;Y<Math.max(I.length,U.length);Y++){let J=I[Y]??0,Q=U[Y]??0;if(J>Q)return 1;if(J<Q)return-1}return 0}function Fz($,q){return DX0($,q)>0}function WX0($,q,I={}){let U=Uq($,q,{cwd:I.cwd,encoding:"utf8",stdio:["ignore","pipe","pipe"]});if(U.stdout)console.error(U.stdout.trimEnd());if(U.stderr)console.error(U.stderr.trimEnd());if(U.status!==0)throw Error(`${$} ${q.join(" ")} failed with status ${U.status}`)}async function OX0($,q,I,U,Y){if($==="create"){let J=x(Y.options.name)??q,Q=x(Y.options.phone);if(!J||!Q)throw Error("Usage: seal-use users create --name <name> --phone <phone> [--dept <deptId>]");let K=x(Y.options.dept)??x(Y.options.departmentId);await O0("seal_user_create",I,U,{name:J,phone:Q,departmentIds:K?[K]:void 0},D0(Y.options));return}if($==="reset-password"){let J=q??x(Y.options.userId);if(!J)throw Error("Usage: seal-use users reset-password <userId>");await O0("seal_user_reset_password",I,U,{userId:J},D0(Y.options));return}if($==="search"||$==="list"){let J=q??x(Y.options.keyword)??x(Y.options.query)??"";await O0("seal_user_search",I,U,{keyword:J},D0(Y.options));return}if($==="get"){let J=q??x(Y.options.userId);if(!J)throw Error("Usage: seal-use users get <userId>");await O0("seal_user_get",I,U,{userId:J},D0(Y.options));return}if($==="delete"){let J=q??x(Y.options.userId);if(!J)throw Error("Usage: seal-use users delete <userId>");await O0("seal_user_delete",I,U,{userId:J},D0(Y.options));return}if($==="activate"){let J=q??x(Y.options.userId);if(!J)throw Error("Usage: seal-use users activate <userId>");await O0("seal_user_activate",I,U,{userId:J},D0(Y.options));return}if($==="delegation"||$==="impersonate"){let J=q??x(Y.options.userId)??x(Y.options.phone);if(!J)throw Error("Usage: seal-use users delegation <userIdOrPhone> [--note <note>]");let Q=x(Y.options.note);await O0("seal_user_delegation_create",I,U,{userIdOrPhone:J,note:Q},D0(Y.options));return}throw Error(`Unknown users command: ${$??""}. Run 'seal-use help' for available commands.`)}import{existsSync as NX0}from"node:fs";async function FX0($){if(!NX0($))throw Error(`File not found: ${$}`);let q=zz($);console.log(JSON.stringify(await Kz(q.fileBuffer,q.fileName),null,2))}async function MX0($,q,I,U,Y){if($==="material-pack"||$==="material-pack-push"){let J=$==="material-pack-push"?"push":q,Q=$==="material-pack-push"?x(Y.options.file)??x(Y.options.input):Y.command[3]??x(Y.options.file)??x(Y.options.input);if(!Q)throw Error("Usage: seal-use webhook material-pack <preview|push> <材料包.zip>");if(!NX0(Q))throw Error(`File not found: ${Q}`);let K=zz(Q);if(J==="preview"){console.log(JSON.stringify(await Kz(K.fileBuffer,K.fileName),null,2));return}if(J!=="push")throw Error("Usage: seal-use webhook material-pack <preview|push> <材料包.zip>");let z=x(Y.options.webhook)??x(Y.options.selector);if(!z)throw Error("Push requires --webhook <idOrName>");let w=GI(await wI(I),z),G=await QD(K.fileBuffer,K.fileName,{webhookUrl:w.incomingDocumentWebhook.url,secret:w.secret});console.log(JSON.stringify(G,null,2));return}if($==="list"){await O0("seal_webhook_list",I,U,{query:x(Y.options.query)??x(Y.options.keyword),includeSecret:Wu(Y.options)},D0(Y.options));return}if($==="get"||$==="find"){let J=q??x(Y.options.selector)??x(Y.options.id);if(!J)throw Error("Usage: seal-use webhook get <idOrName> [--show-secret]");await O0("seal_webhook_get",I,U,{selector:J,includeSecret:Wu(Y.options)},D0(Y.options));return}if($==="add"||$==="create"){let J=x(Y.options.name)??q,Q=x(Y.options.resultUrl)??x(Y.options["result-url"])??x(Y.options.outgoingResultWebhook)??x(Y.options["outgoing-result-webhook"]);if(!J||!Q)throw Error("Usage: seal-use webhook add --name <name> --result-url <url> [--mode assisted|semi_automatic|fully_automatic]");let K=Vu(Y.options);await O0("seal_webhook_add",I,U,{name:J,mode:Hu(x(Y.options.mode)),outgoingResultWebhook:Q,autoApprovalRate:K,secret:x(Y.options.secret)},D0(Y.options));return}if($==="update"){let J=q??x(Y.options.selector)??x(Y.options.id);if(!J)throw Error("Usage: seal-use webhook update <idOrName> [options]");let Q=x(Y.options.secret),K=C0(Y.options.rotateSecret)??C0(Y.options["rotate-secret"]);if(Q!==void 0&&K)throw Error("Use either --secret or --rotate-secret, not both");let z=x(Y.options.name),w=Hu(x(Y.options.mode)),G=x(Y.options.resultUrl)??x(Y.options["result-url"])??x(Y.options.outgoingResultWebhook)??x(Y.options["outgoing-result-webhook"]),H=Vu(Y.options);if(z===void 0&&w===void 0&&G===void 0&&H===void 0&&Q===void 0&&!K)throw Error("Webhook update requires at least one field option");await O0("seal_webhook_update",I,U,{selector:J,name:z,mode:w,outgoingResultWebhook:G,autoApprovalRate:H,secret:Q,rotateSecret:K},D0(Y.options));return}if($==="delete"){let J=q??x(Y.options. Line truncated
`;var QX0={"SKILL.md":lZ0,"agents/openai.yaml":oZ0,"references/rule-lightweight.md":rZ0,"references/approval-bad-cases.md":tZ0,"references/cli.md":aZ0,"references/approval-run-lightweight.md":sZ0,"references/approval-attachment-trace.md":eZ0,"references/customer-feedback-rule-remediation.md":$X0,"references/enterprise-onboarding.md":qX0,"references/hose-enterprise-auth.md":IX0,"references/hose-enterprise-init.md":UX0};function KX0(){return QX0["SKILL.md"]||""}function Fz(){return Bu(JX0(),".agents","skills","seal-use")}function zX0(){return Bu(JX0(),".agents","skills","seal-home")}function GX0(){let $=zX0();if(gu($))try{return SG1($,{recursive:!0,force:!0}),!0}catch{return!1}return!1}function Ru($=Fz()){GX0(),YX0($,{recursive:!0});let q=[];for(let[I,U]of Object.entries(QX0)){let Y=Bu($,I);YX0(uG1(Y),{recursive:!0}),yG1(Y,U,"utf8"),q.push(I)}return{targetDir:$,files:q}}function vu(){let $=zX0(),q=Fz(),I=gu($),U=gu(q);if(I||U)return GX0(),Ru(q),{synced:!0,targetDir:q};return{synced:!1}}function wX0($,q,I){if($==="dump"||$==="cat"||$==="show"){process.stdout.write(`${KX0()}
`);return}if($==="install"||$==="init"||$==="sync"){let U=C0(I.options.local)||C0(I.options.workspace),Y=y(I.options.dir)??y(I.options.target)??q,J=Y?Y:U?gD(process.cwd(),".agents","skills","seal-use"):Fz(),Q=Ru(J);E0({installed:!0,targetDir:Q.targetDir,fileCount:Q.files.length,files:Q.files});return}if($==="status"||$==="get"||!$){let U=Fz(),Y=gD(process.cwd(),".agents","skills","seal-use");E0({global:{dir:U,installed:HX0(gD(U,"SKILL.md"))},local:{dir:Y,installed:HX0(gD(Y,"SKILL.md"))}});return}throw Error(`Unknown skill command: ${$}. Run 'seal-use help' for available commands.`)}async function VX0($,q){if($==="config"){E0(await TY(q));return}throw Error(`Unknown source command: ${$??""}. Run 'seal-use help' for available commands.`)}async function WX0($,q,I,U){if(!$)throw Error("Usage: seal-use tool <toolName> [--json '{...}']");await N0($,q,I,a6(U.json),D0(U.options))}function ZX0(){E0(Vz.map(($)=>({name:$.name,description:$.description})))}import{chmodSync as xG1,mkdirSync as kG1,renameSync as Cu,rmSync as fG1,unlinkSync as NX0,writeFileSync as XX0}from"node:fs";import{dirname as bG1,join as LX0}from"node:path";import{spawnSync as Kq}from"node:child_process";function BD($=process.execPath,q=import.meta.url){if(q.includes("/$bunfs/")||q.includes("\\$bunfs\\"))return!0;let I=$.toLowerCase().replace(/\\/g,"/");return!I.endsWith("/bun")&&!I.endsWith("/bun.exe")&&!I.endsWith("/node")&&!I.endsWith("/node.exe")}var FX0="yunyingk/seal-use",Az="yunyingk/seal-home";var nG1="SEAL_USE_GITHUB_REPO",iG1="SEAL_HOME_GITHUB_REPO";async function MX0($,q={}){let I={appRoot:$.appRoot,entryFile:$.entryFile,stateDir:Eu,version:e0,launcher:$.launcher},U=q.repo||process.env[nG1]?.trim()||process.env[iG1]?.trim()||FX0,Y=q.targetVersion?.trim(),J=Y&&Y.toLowerCase()!=="latest"?Y:void 0;if(J){let P=J.replace(/^v/,""),B=AX0(P,e0);if(B<0){E0({updated:!1,currentVersion:e0,targetVersion:P,mode:BD()?"binary":"source",message:`Cannot downgrade seal-use from v${e0} to older version v${P}. Updates must be forward-only.`});return}if(B===0&&!q.force){E0({updated:!1,currentVersion:e0,targetVersion:P,mode:BD()?"binary":"source",message:`seal-use is already at version v${e0}. Use --force to reinstall.`});return}}if(q.changelogOnly){let P=await _u(U,q.limit??10);E0({currentVersion:e0,totalQueried:P.length,releases:P.map((B)=>({version:B.version,tagName:B.tagName,publishedAt:B.publishedAt,author:B.author,releaseNotes:B.notes,releaseUrl:B.htmlUrl,isCurrent:B.version===e0,isNewer:Mz(B.version,e0)}))});return}if(!BD()){if(q.checkOnly){let B=await _u(U,30),f=B[0],S=f?.version??e0,n=B.find((i)=>i.version===e0),R=Mz(S,e0),p=B.filter((i)=>Mz(i.version,e0));E0({updated:!1,updateAvailable:R,currentVersion:e0,currentVersionPublishedAt:n?.publishedAt,latestVersion:S,latestVersionPublishedAt:f?.publishedAt,behindCount:p.length,pendingReleases:p.map((i)=>({version:i.version,tagName:i.tagName,publishedAt:i.publishedAt,author:i.author,releaseNotes:i.notes,releaseUrl:i.htmlUrl})),releaseNotes:f?.notes??"",releaseUrl:f?.htmlUrl??"",mode:"source",message:"Running in source development mode. Run 'seal-use update' to git pull & bun install."});return}let P=jY(I).running;if(P)await Qq("stop",I);try{OX0("git",["-C",$.appRoot,"pull","--ff-only"])}catch(B){console.error(`git pull skipped: ${B instanceof Error?B.message:String(B)}`)}if(OX0("bun",["install"],{cwd:$.appRoot}),P)await Qq("start",I);E0({updated:!0,serviceRestarted:P,version:e0,mode:"source"});return}let Q=pG1(),K=cG1(),z=await _u(U,30),G=J?z.find((P)=>P.version===J||P.tagName===J||P.tagName===`v${J}`)??await DX0(U,J):z[0]??await DX0(U);if(!G){E0({updated:!1,currentVersion:e0,mode:"binary",message:`Failed to query releases from repository '${U}'`});return}let H=G.version,w=z.find((P)=>P.version===e0),V=Mz(H,e0),W=V||Boolean(q.force),X=z.filter((P)=>Mz(P.version,e0));if(q.checkOnly){E0({updated:!1,updateAvailable:V,currentVersion:e0,currentVersionPublishedAt:w?.publishedAt,latestVersion:H,latestVersionPublishedAt:G.publishedAt,behindCount:X.length,pendingReleases:X.map((P)=>({version:P.version,tagName:P.tagName,publishedAt:P.publishedAt,author:P.author,releaseNotes:P.notes,releaseUrl:P.htmlUrl})),releaseNotes:G.notes,releaseUrl:G.htmlUrl,mode:"binary"});return}if(!W){E0({updated:!1,currentVersion:e0,currentVersionPublishedAt:w?.publishedAt,latestVersion:H,latestVersionPublishedAt:G.publishedAt,mode:"binary",message:`seal-use is already up to date (v${e0})`});return}let L=dG1(G.assets,Q,K);if(!L)throw Error(`No compatible binary found for ${Q}-${K} in release v${H}. Available assets: ${G.assets.map((P)=>P.name).join(", ")}`);let D=jY(I).running;if(D)await Qq("stop",I);let N=process.execPath,E=bG1(N),T=LX0(E,`.tmp-update-${Date.now()}`);kG1(T,{recursive:!0});try{let P=LX0(T,L.name);await mG1(L.downloadUrl,P,G.tagName,L.name);let B=P;if(L.name.endsWith(".tar.gz")||L.name.endsWith(".tgz"))B=lG1(P,T,Q);else if(L.name.endsWith(".zip"))B=oG1(P,T,Q);if(xG1(B,493),process.platform==="darwin")try{Kq("/usr/bin/codesig Line truncated
`)}catch{}}async function mG1($,q,I,U){let Y=hu(),J=[],Q=I?I.startsWith("v")?I:`v${I}`:void 0,K=U||$.split("/").pop()||"";if(Y!=="github"){if(Q&&K)J.push(`https://git.ying-qing.cn/gitea/seal-use/releases/download/${Q}/${K}`,`https://git.ying-qing.cn/gitea/seal-home/releases/download/${Q}/${K}`);if($.startsWith("https://git.ying-qing.cn"))J.push($)}if(Y!=="gitea")if(Q&&K){let L=`https://github.com/${FX0}/releases/download/${Q}/${K}`;if(!process.env.CI)J.push(`https://ghfast.top/${L}`,`https://gh.ddlc.top/${L}`);J.push(L)}else if($.includes("github.com")){if(!process.env.CI)J.push(`https://ghfast.top/${$}`,`https://gh.ddlc.top/${$}`);J.push($)}else J.push($);let z=Array.from(new Set(J)),G,H=6000,w=6000,V=307200,W=1e4,X=180000;for(let L=0;L<z.length;L++){let D=z[L],N=new AbortController,E="",T=(S)=>{E=S;try{N.abort()}catch{}},P=setTimeout(()=>{T("Connection timed out (no response headers within 6s)")},H),B,f;try{RD(`==> [${L+1}/${z.length}] Downloading via: ${D}`);let S=await fetch(D,{signal:N.signal});if(P)clearTimeout(P),P=void 0;if(!S.ok)throw Error(`HTTP ${S.status} ${S.statusText}`);B=setTimeout(()=>{T("Overall download time exceeded 3 minutes")},X);let n=Number(S.headers.get("content-length"))||0,R=S.body?.getReader();if(!R){let b=Buffer.from(await S.arrayBuffer());if(b.length<1000)throw Error(`Downloaded content is suspiciously small (${b.length} bytes)`);XX0(q,b),RD(`✓ Download succeeded (${(b.length/1024/1024).toFixed(1)} MB)`);return}let p=[],i=0,C=0;f=setTimeout(()=>{if(i<V){let b=(i/1024).toFixed(1);T(`Initial transfer too slow (${b} KB < 300 KB in 6s), switching mirror...`)}},w);while(!0){let b=R.read(),U0,j=new Promise((Q0,H0)=>{U0=setTimeout(()=>{H0(Error("Data transfer stalled (no chunk received for 10s)"))},W)}),x;try{x=await Promise.race([b,j])}finally{if(U0)clearTimeout(U0)}let{done:d,value:t}=x;if(d)break;if(t){if(p.push(t),i+=t.length,f&&i>=V)clearTimeout(f),f=void 0;let Q0=Date.now();if(Q0-C>200){C=Q0;let H0=n?Math.round(i/n*100):0,M0=(i/1048576).toFixed(1),j0=n?(n/1048576).toFixed(1):"?";try{process.stderr.write(`\r ↳ Progress: ${H0}% (${M0} / ${j0} MB)...`)}catch{}}}}try{process.stderr.write(`
`)}catch{}let k=Buffer.concat(p);if(k.length<1000)throw Error(`Downloaded content is suspiciously small (${k.length} bytes)`);XX0(q,k),RD(`✓ Download completed successfully (${(k.length/1024/1024).toFixed(1)} MB)`);return}catch(S){if(P)clearTimeout(P);if(f)clearTimeout(f);if(B)clearTimeout(B);let n=E||(S instanceof Error?S.message:String(S));G=Error(n),RD(`
↳ Mirror failed: ${G.message}`)}finally{if(P)clearTimeout(P);if(f)clearTimeout(f);if(B)clearTimeout(B)}}throw Error(`Failed to download asset from all mirrors: ${G?.message}`)}function lG1($,q,I){let U=Kq("tar",["-xzf",$,"-C",q],{stdio:"pipe"});if(U.status!==0)throw Error(`Failed to extract tar archive: ${U.stderr.toString()}`);NX0($);let Y=I==="windows"?"seal-use.exe":"seal-use",J=Kq("find",[q,"-type","f"],{encoding:"utf8"}).stdout.trim().split(`
`).filter(Boolean),Q=J.find((K)=>K.endsWith(`/${Y}`)||K.endsWith(Y));if(Q)return Q;return J[0]||$}function oG1($,q,I){let U=Kq("unzip",["-q","-o",$,"-d",q],{stdio:"pipe"});if(U.status!==0)throw Error(`Failed to extract zip archive: ${U.stderr.toString()}`);NX0($);let Y=I==="windows"?"seal-use.exe":"seal-use",J=Kq("find",[q,"-type","f"],{encoding:"utf8"}).stdout.trim().split(`
`).filter(Boolean),Q=J.find((K)=>K.endsWith(`/${Y}`)||K.endsWith(Y));if(Q)return Q;return J[0]||$}function AX0($,q){let I=$.replace(/^v/,"").split(".").map((Y)=>Number.parseInt(Y,10)||0),U=q.replace(/^v/,"").split(".").map((Y)=>Number.parseInt(Y,10)||0);for(let Y=0;Y<Math.max(I.length,U.length);Y++){let J=I[Y]??0,Q=U[Y]??0;if(J>Q)return 1;if(J<Q)return-1}return 0}function Mz($,q){return AX0($,q)>0}function OX0($,q,I={}){let U=Kq($,q,{cwd:I.cwd,encoding:"utf8",stdio:["ignore","pipe","pipe"]});if(U.stdout)console.error(U.stdout.trimEnd());if(U.stderr)console.error(U.stderr.trimEnd());if(U.status!==0)throw Error(`${$} ${q.join(" ")} failed with status ${U.status}`)}async function PX0($,q,I,U,Y){if($==="create"){let J=y(Y.options.name)??q,Q=y(Y.options.phone);if(!J||!Q)throw Error("Usage: seal-use users create --name <name> --phone <phone> [--dept <deptId>]");let K=y(Y.options.dept)??y(Y.options.departmentId);await N0("seal_user_create",I,U,{name:J,phone:Q,departmentIds:K?[K]:void 0},D0(Y.options));return}if($==="reset-password"){let J=q??y(Y.options.userId);if(!J)throw Error("Usage: seal-use users reset-password <userId>");await N0("seal_user_reset_password",I,U,{userId:J},D0(Y.options));return}if($==="search"||$==="list"){let J=q??y(Y.options.keyword)??y(Y.options.query)??"";await N0("seal_user_search",I,U,{keyword:J},D0(Y.options));return}if($==="get"){let J=q??y(Y.options.userId);if(!J)throw Error("Usage: seal-use users get <userId>");await N0("seal_user_get",I,U,{userId:J},D0(Y.options));return}if($==="delete"){let J=q??y(Y.options.userId);if(!J)throw Error("Usage: seal-use users delete <userId>");await N0("seal_user_delete",I,U,{userId:J},D0(Y.options));return}if($==="activate"){let J=q??y(Y.options.userId);if(!J)throw Error("Usage: seal-use users activate <userId>");await N0("seal_user_activate",I,U,{userId:J},D0(Y.options));return}if($==="delegation"||$==="impersonate"){let J=q??y(Y.options.userId)??y(Y.options.phone);if(!J)throw Error("Usage: seal-use users delegation <userIdOrPhone> [--note <note>]");let Q=y(Y.options.note);await N0("seal_user_delegation_create",I,U,{userIdOrPhone:J,note:Q},D0(Y.options));return}throw Error(`Unknown users command: ${$??""}. Run 'seal-use help' for available commands.`)}import{existsSync as TX0}from"node:fs";async function EX0($){if(!TX0($))throw Error(`File not found: ${$}`);let q=Hz($);console.log(JSON.stringify(await Gz(q.fileBuffer,q.fileName),null,2))}async function jX0($,q,I,U,Y){if($==="material-pack"||$==="material-pack-push"){let J=$==="material-pack-push"?"push":q,Q=$==="material-pack-push"?y(Y.options.file)??y(Y.options.input):Y.command[3]??y(Y.options.file)??y(Y.options.input);if(!Q)throw Error("Usage: seal-use webhook material-pack <preview|push> <材料包.zip>");if(!TX0(Q))throw Error(`File not found: ${Q}`);let K=Hz(Q);if(J==="preview"){console.log(JSON.stringify(await Gz(K.fileBuffer,K.fileName),null,2));return}if(J!=="push")throw Error("Usage: seal-use webhook material-pack <preview|push> <材料包.zip>");let z=y(Y.options.webhook)??y(Y.options.selector);if(!z)throw Error("Push requires --webhook <idOrName>");let G=XI(await ZI(I),z),H=await zD(K.fileBuffer,K.fileName,{webhookUrl:G.incomingDocumentWebhook.url,secret:G.secret});console.log(JSON.stringify(H,null,2));return}if($==="list"){await N0("seal_webhook_list",I,U,{query:y(Y.options.query)??y(Y.options.keyword),includeSecret:Xu(Y.options)},D0(Y.options));return}if($==="get"||$==="find"){let J=q??y(Y.options.selector)??y(Y.options.id);if(!J)throw Error("Usage: seal-use webhook get <idOrName> [--show-secret]");await N0("seal_webhook_get",I,U,{selector:J,includeSecret:Xu(Y.options)},D0(Y.options));return}if($==="add"||$==="create"){let J=y(Y.options.name)??q,Q=y(Y.options.resultUrl)??y(Y.options["result-url"])??y(Y.options.outgoingResultWebhook)??y(Y.options["outgoing-result-webhook"]);if(!J||!Q)throw Error("Usage: seal-use webhook add --name <name> --result-url <url> [--mode assisted|semi_automatic|fully_automatic]");let K=Zu(Y.options);await N0("seal_webhook_add",I,U,{name:J,mode:Wu(y(Y.options.mode)),outgoingResultWebhook:Q,autoApprovalRate:K,secret:y(Y.options.secret)},D0(Y.options));return}if($==="update"){let J=q??y(Y.options.selector)??y(Y.options.id);if(!J)throw Error("Usage: seal-use webhook update <idOrName> [options]");let Q=y(Y.options.secret),K=C0(Y.options.rotateSecret)??C0(Y.options["rotate-secret"]);if(Q!==void 0&&K)throw Error("Use either --secret or --rotate-secret, not both");let z=y(Y.options.name),G=Wu(y(Y.options.mode)),H=y(Y.options.resultUrl)??y(Y.options["result-url"])??y(Y.options.outgoingResultWebhook)??y(Y.options["outgoing-result-webhook"]),w=Zu(Y.options);if(z===void 0&&G===void 0&&H===void 0&&w===void 0&&Q===void 0&&!K)throw Error("Webhook update requires at least one field option");await N0("seal_webhook_update",I,U,{selector:J,name:z,mode:G,outgoingResultWebhook:H,autoApprovalRate:w,secret:Q,rotateSecret:K},D0(Y.options));return}if($==="delete"){let J=q??y(Y.options. Line truncated
`)?"":`
`}`);process.exitCode=$.exitCode}var sw1=Boolean(o.main==o.module||!import.meta.url.includes("$bunfs")&&process.argv[1]&&EX0(process.argv[1])===EX0(p5));if(sw1)if(process.argv[2]==="--seal-use-cli"||process.argv[2]==="--seal-home-cli")await aw1();else Ou().catch(($)=>{console.error($),process.exitCode=1});export{Lu as tokenizeCommand,Ou as startServer,ow1 as resolveMcpEnabled,rw1 as createServer,lw1 as SEAL_MCP_ENABLED_ENV,dw1 as SEAL_CLI_TOOL_NAME,mw1 as LEGACY_SEAL_MCP_ENABLED_ENV};
`}`);process.exitCode=$.exitCode}var GH1=Boolean(r.main==r.module||!import.meta.url.includes("$bunfs")&&process.argv[1]&&vX0(process.argv[1])===vX0(c5));if(GH1)if(process.argv[2]==="--seal-use-cli"||process.argv[2]==="--seal-home-cli")await zH1();else Fu().catch(($)=>{console.error($),process.exitCode=1});export{Ou as tokenizeCommand,Fu as startServer,JH1 as resolveMcpEnabled,QH1 as createServer,UH1 as SEAL_MCP_ENABLED_ENV,IH1 as SEAL_CLI_TOOL_NAME,YH1 as LEGACY_SEAL_MCP_ENABLED_ENV};
+1 -1
View File
@@ -2,7 +2,7 @@
"openapi": "3.1.0",
"info": {
"title": "seal-use Wrapped API",
"version": "0.10.9",
"version": "0.10.11",
"description": "Planned HTTP contract for the seal-use wrapped backend API.\n\nThese endpoints describe the intended stable API for frontend developers and agents once\nthe HTTP adapter is implemented.\nThey are not the raw downstream Seal endpoints. seal-use is responsible for enterprise\nselection, source authentication, response compaction, and diagnostics-friendly fields.\n"
},
"servers": [
+1 -1
View File
@@ -1,7 +1,7 @@
openapi: 3.1.0
info:
title: seal-use Wrapped API
version: 0.10.9
version: 0.10.11
description: |
Planned HTTP contract for the seal-use wrapped backend API.
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "seal-use",
"version": "0.10.9",
"version": "0.10.11",
"type": "module",
"module": "src/server.ts",
"bin": {
+4 -4
View File
@@ -1,12 +1,12 @@
---
name: seal-use
description: "v0.10.9: Use for Seal Use first-time enterprise onboarding, Hose/合思 or Seal-native authentication, assistance links and browser cURL intake, plus tenant approval operations, diagnosis, simulation, rules, users, configuration, and search."
description: "v0.10.11: Use for Seal Use first-time enterprise onboarding, Hose/合思 or Seal-native authentication, assistance links and browser cURL intake, plus tenant approval operations, diagnosis, simulation, rules, users, configuration, and search."
metadata:
version: 0.10.9
short-description: Seal tenant and Hose approval automation (v0.10.9)
version: 0.10.11
short-description: Seal tenant and Hose approval automation (v0.10.11)
---
# Seal Use (v0.10.9)
# Seal Use (v0.10.11)
Use the `seal_cli` MCP tool when it is available; pass the command string as its `command` argument. If MCP is unavailable, fall back to the global `seal-use` CLI. This skill is a routing layer for agents: keep this file short, choose the right command, and read a focused reference only when the task needs detail.
+2
View File
@@ -37,6 +37,7 @@ seal-use version
seal-use config paths
seal-use config get
seal-use config mode <stateful|stateless> [--corp <corpId>]
seal-use config test-dir [<path>|--clear]
seal-use config lint <enable|disable|status> [--linter <name>] [--min-score <score>]
seal-use rules pull [--corp <corpId>] [--version <id|num|latest>] [--out <file>]
seal-use rules lint [--file <path>] [--corp <corpId>] [--linter <name|path>] [--version <num>] [--code <code>] [--min-score <score>] [--summary]
@@ -90,6 +91,7 @@ seal-use tool <toolName> [--corp <corpId>] [--json '{"key":"value"}']
seal-use approval-runs summary --corp <corpId> [--date YYYY-MM-DD] [--timezone Asia/Shanghai]
seal-use approval-runs stats --corp <corpId> [--since 3months] [--dedupe-by sourceDocumentSN|sourceDocumentId|id]
seal-use approval-runs count --corp <corpId> [--status APPROVED]
seal-use approval-runs export --corp <corpId> [--start <YYYY-MM-DD|ms>] [--end <YYYY-MM-DD|ms>] [--limit <n>] [--downloads] [--out <file>]
seal-use approval-runs search --corp <corpId> [--query text] [--limit 20] [--includeBridge true]
seal-use approval-runs get <recordId> --corp <corpId> [--fields metadata|document.fields,result.summary] [--output-file file.json]
seal-use approval-runs attachments <recordId> --corp <corpId>
+26
View File
@@ -1,6 +1,7 @@
import type { CorpConfig } from "../../core/config/types.js";
import type { createSealClient } from "../../core/http/factory.js";
import * as api from "../../domains/seal/api.js";
import { exportApprovalRunsToExcel } from "../../domains/seal/approval-runs-export.js";
import {
downloadApprovalRunAttachments,
extractApprovalRunAttachments
@@ -285,5 +286,30 @@ export async function handleApprovalRunsCommand(
return;
}
if (action === "export") {
const result = await exportApprovalRunsToExcel(client, corp, {
limit: numberOption(args.options.limit),
startDate:
stringOption(args.options.start) ??
stringOption(args.options.startDate) ??
stringOption(args.options.since),
endDate: stringOption(args.options.end) ?? stringOption(args.options.endDate),
status: stringOption(args.options.status),
manualApprovalStatus:
stringOption(args.options["manual-status"]) ??
stringOption(args.options.manualStatus) ??
stringOption(args.options.manualApprovalStatus),
includeCompletedOnly:
booleanOption(args.options["completed-only"]) ?? booleanOption(args.options.completedOnly),
outputFile:
stringOption(args.options.out) ??
stringOption(args.options.output) ??
stringOption(args.options.file),
toDownloads: booleanOption(args.options.downloads) ?? booleanOption(args.options.download)
});
printJson(result, outputOptions(args.options));
return;
}
throw new Error(`Unknown approval-runs command: ${action ?? ""}. Run 'seal-use help' for available commands.`);
}
+34 -1
View File
@@ -90,5 +90,38 @@ export function handleConfigCommand(action: string | undefined, maybeName: strin
return;
}
throw new Error(`Unknown config command: ${action ?? ""}. Available: paths, get, status, mode, lint. Run 'seal-use help' for available commands.`);
if (action === "test-dir" || action === "test-enterprises-dir") {
const isClear = args.options.clear === true || maybeName === "--clear" || maybeName === "clear";
const previousConfig = loadGlobalConfig();
if (isClear) {
const config = saveGlobalConfig({
...previousConfig,
testEnterprisesDir: undefined
});
printJson(globalConfigSummary(config));
return;
}
const newPath = maybeName && !maybeName.startsWith("-")
? maybeName
: stringOption(args.options.path) ?? stringOption(args.options.dir);
if (!newPath) {
printJson({
testEnterprisesDir: previousConfig.testEnterprisesDir ?? null,
configFile: resolveGlobalConfigFile()
});
return;
}
const config = saveGlobalConfig({
...previousConfig,
testEnterprisesDir: newPath
});
printJson(globalConfigSummary(config));
return;
}
throw new Error(`Unknown config command: ${action ?? ""}. Available: paths, get, status, mode, lint, test-dir. Run 'seal-use help' for available commands.`);
}
+3
View File
@@ -27,6 +27,9 @@ export function globalConfigSummary(config: GlobalConfig = loadGlobalConfig()) {
...(config.stateful && config.defaultCorpId
? { defaultCorpId: config.defaultCorpId }
: {}),
...(config.testEnterprisesDir
? { testEnterprisesDir: config.testEnterprisesDir }
: {}),
lint: config.lint,
configFile: resolveGlobalConfigFile()
};
+3
View File
@@ -87,6 +87,8 @@ Usage:
seal-use config paths
seal-use config get
seal-use config mode <stateful|stateless> [--corp <corpId>]
seal-use config test-dir [<path>|--clear]
seal-use config lint [status|enable|disable] [--linter <name|path>] [--min-score <score>]
seal-use update [--check] [--force] [--version <v>]
seal-use update check
seal-use update changelog [--limit <n>]
@@ -149,6 +151,7 @@ Usage:
seal-use approval-runs summary [--date YYYY-MM-DD] [--timezone Asia/Shanghai] [--corp <corpId>]
seal-use approval-runs stats [--since 3months] [--dedupe-by sourceDocumentSN|sourceDocumentId|id] [--corp <corpId>]
seal-use approval-runs count [--status APPROVED] [--corp <corpId>]
seal-use approval-runs export [--start <YYYY-MM-DD|ms>] [--end <YYYY-MM-DD|ms>] [--limit <n>] [--downloads] [--out <file>] [--corp <corpId>]
seal-use approval-runs list|search [--query text] [--humanResult 驳回] [--manualApprovalStatus TERMINATED] [--startDate ms] [--endDate ms] [--limit 20] [--includeBridge true] [--corp <corpId>]
seal-use approval-runs pick --sn <documentSN> [--batch <batchId>] [--latest] [--fields recordId,status,aiDecision] [--corp <corpId>]
seal-use approval-runs get <recordId> [--summary] [--fields metadata|document.fields,result.summary] [--full] [--output-file file.json] [--corp <corpId>]
+24 -9
View File
@@ -84,21 +84,34 @@ describe("loadCorpConfigs", () => {
expect(loadCorpConfigs()).toEqual([]);
});
test("merges local and user enterprise directories with user configs taking precedence", () => {
test("does not load current directory enterprises by default, only reading user directory", () => {
const workspace = makeTempDir();
const workspaceEnterprises = join(workspace, "enterprises");
const userDir = makeTempDir();
mkdirSync(workspaceEnterprises, { recursive: true });
writeCorpConfig(join(workspaceEnterprises, "shared.json"), "shared", "Workspace");
writeCorpConfig(join(userDir, "shared.json"), "shared", "User");
writeCorpConfig(join(workspaceEnterprises, "cwd-only.json"), "cwd-only", "CWD Enterprise");
writeCorpConfig(join(userDir, "user-only.json"), "user-only", "User Only");
process.chdir(workspace);
process.env.SEAL_USE_USER_ENTERPRISES_DIR = userDir;
expect(loadCorpConfigs().map((corp) => [corp.id, corp.name])).toEqual([
["shared", "User"],
["user-only", "User Only"]
]);
// cwd enterprises/ should NOT be loaded by default
expect(loadCorpConfigs().map((corp) => corp.id)).toEqual(["user-only"]);
});
test("loads testEnterprisesDir from global config when specified", () => {
const testDir = makeTempDir();
const userDir = makeTempDir();
writeCorpConfig(join(testDir, "test-corp.json"), "test-corp", "Test Corp");
writeCorpConfig(join(userDir, "user-corp.json"), "user-corp", "User Corp");
const configFile = join(makeTempDir(), "config.json");
process.env.SEAL_USE_CONFIG_FILE = configFile;
process.env.SEAL_USE_USER_ENTERPRISES_DIR = userDir;
saveGlobalConfig({ testEnterprisesDir: testDir });
const corps = loadCorpConfigs();
expect(corps.map((corp) => corp.id).sort()).toEqual(["test-corp", "user-corp"].sort());
});
test("defaults global config to stateless", () => {
@@ -114,13 +127,14 @@ describe("loadCorpConfigs", () => {
});
});
test("saves and loads the global state mode", () => {
test("saves and loads the global state mode and testEnterprisesDir", () => {
const file = join(makeTempDir(), "nested", "config.json");
process.env.SEAL_USE_CONFIG_FILE = file;
expect(saveGlobalConfig({ stateful: true, defaultCorpId: "corp-a" })).toEqual({
expect(saveGlobalConfig({ stateful: true, defaultCorpId: "corp-a", testEnterprisesDir: "/tmp/test-corps" })).toEqual({
stateful: true,
defaultCorpId: "corp-a",
testEnterprisesDir: "/tmp/test-corps",
lint: {
enabled: false,
activeLinter: "builtin",
@@ -131,6 +145,7 @@ describe("loadCorpConfigs", () => {
expect(loadGlobalConfig()).toEqual({
stateful: true,
defaultCorpId: "corp-a",
testEnterprisesDir: "/tmp/test-corps",
lint: {
enabled: false,
activeLinter: "builtin",
+12 -7
View File
@@ -3,7 +3,6 @@ import { homedir } from "node:os";
import { dirname, join } from "node:path";
import { CorpConfig, CorpConfigSchema, GlobalConfig, GlobalConfigInput, GlobalConfigSchema } from "./types.js";
const ENTERPRISES_DIR = "enterprises";
const CONFIG_ENV = "SEAL_USE_ENTERPRISES_DIR";
const LEGACY_CONFIG_ENV = "SEAL_HOME_ENTERPRISES_DIR";
const USER_DIR_ENV = "SEAL_USE_USER_ENTERPRISES_DIR";
@@ -43,13 +42,16 @@ function resolveEnterprisesDirs(): string[] {
if (configured) return existsSync(configured) ? [configured] : [];
const configuredUserDir = (process.env[USER_DIR_ENV] ?? process.env[LEGACY_USER_DIR_ENV])?.trim();
if (configuredUserDir) {
return [ENTERPRISES_DIR, configuredUserDir].filter((dir) => existsSync(dir));
}
const userDirs = configuredUserDir
? (existsSync(configuredUserDir) ? [configuredUserDir] : [])
: [PRIMARY_USER_ENTERPRISES_DIR, LEGACY_USER_ENTERPRISES_DIR];
const dirs = [ENTERPRISES_DIR, PRIMARY_USER_ENTERPRISES_DIR, LEGACY_USER_ENTERPRISES_DIR];
const globalConfig = loadGlobalConfig();
const testDir = globalConfig.testEnterprisesDir?.trim();
const candidates = testDir ? [testDir, ...userDirs] : userDirs;
const uniqueExisting: string[] = [];
for (const d of dirs) {
for (const d of candidates) {
if (existsSync(d) && !uniqueExisting.includes(d)) {
uniqueExisting.push(d);
}
@@ -62,13 +64,16 @@ export function resolveWritableEnterprisesDir(): string {
if (configured) return configured;
const configuredUserDir = (process.env[USER_DIR_ENV] ?? process.env[LEGACY_USER_DIR_ENV])?.trim();
if (configuredUserDir) return configuredUserDir;
const testDir = loadGlobalConfig().testEnterprisesDir?.trim();
if (testDir && existsSync(testDir)) return testDir;
return PRIMARY_USER_ENTERPRISES_DIR;
}
export function getEnterprisesDirCandidates(): string[] {
const testDir = loadGlobalConfig().testEnterprisesDir?.trim();
return [
`${CONFIG_ENV}=<path>`,
ENTERPRISES_DIR,
...(testDir ? [`testEnterprisesDir: ${testDir}`] : []),
PRIMARY_USER_ENTERPRISES_DIR,
LEGACY_USER_ENTERPRISES_DIR
];
+1
View File
@@ -97,6 +97,7 @@ export const GlobalLintConfigSchema = z.object({
export const GlobalConfigSchema = z.object({
stateful: z.boolean().default(false),
defaultCorpId: z.string().min(1).optional(),
testEnterprisesDir: z.string().min(1).optional(),
lint: GlobalLintConfigSchema
});
@@ -0,0 +1,191 @@
import { describe, expect, test } from "bun:test";
import { existsSync, rmSync } from "node:fs";
import { join } from "node:path";
import { tmpdir } from "node:os";
import ExcelJS from "exceljs";
import {
getRuleBriefTitle,
normalizeManualApprovalStatus,
normalizeTimestamp,
resolveOutputFilePath,
exportApprovalRunsToExcel
} from "./approval-runs-export.js";
import type { CorpConfig } from "../../core/config/types.js";
describe("approval-runs-export helpers", () => {
test("normalizeTimestamp converts YYYY-MM-DD to Beijing time epoch string", () => {
const start = normalizeTimestamp("2026-08-07", false);
expect(start).toBe(String(new Date("2026-08-07T00:00:00.000+08:00").getTime()));
const end = normalizeTimestamp("2026-08-07", true);
expect(end).toBe(String(new Date("2026-08-07T23:59:59.999+08:00").getTime()));
// 10-digit epoch
expect(normalizeTimestamp("1786032000")).toBe("1786032000000");
// 13-digit epoch
expect(normalizeTimestamp("1786032000123")).toBe("1786032000123");
// number
expect(normalizeTimestamp(1786032000000)).toBe("1786032000000");
// undefined/empty
expect(normalizeTimestamp(undefined)).toBeUndefined();
expect(normalizeTimestamp("")).toBeUndefined();
});
test("normalizeManualApprovalStatus maps human words to backend enum", () => {
expect(normalizeManualApprovalStatus("APPROVED")).toEqual(["APPROVED"]);
expect(normalizeManualApprovalStatus("已通过")).toEqual(["APPROVED"]);
expect(normalizeManualApprovalStatus("已支付/审批完成")).toEqual(["APPROVED"]);
expect(normalizeManualApprovalStatus("TERMINATED")).toEqual(["TERMINATED"]);
expect(normalizeManualApprovalStatus("被驳回")).toEqual(["TERMINATED"]);
expect(normalizeManualApprovalStatus("处理中")).toEqual(["PROCESSING"]);
expect(normalizeManualApprovalStatus("已撤回")).toEqual(["CANCELLED"]);
expect(normalizeManualApprovalStatus(["已通过", "被驳回"])).toEqual(["APPROVED", "TERMINATED"]);
expect(normalizeManualApprovalStatus(undefined)).toBeUndefined();
});
test("getRuleBriefTitle extracts clean concise summary", () => {
expect(getRuleBriefTitle("rule-0", "所有单据:报销公司不是浙江大黄蜂建筑机械设备有限公司时提示")).toBe(
"所有单据:报销公司不是浙江大黄蜂建筑机械设备"
);
expect(getRuleBriefTitle("rule-1", "### 发票合规校验\n第二行内容")).toBe("发票合规校验");
expect(getRuleBriefTitle("rule-2", undefined, "通用范围")).toBe("rule-2 (通用范围)");
});
test("resolveOutputFilePath supports custom path, downloads, and default exports dir", () => {
const custom = resolveOutputFilePath({
outputFile: "/tmp/custom-export.xlsx",
corpName: "TestCorp",
recordCount: 10
});
expect(custom).toBe("/tmp/custom-export.xlsx");
const dl = resolveOutputFilePath({
toDownloads: true,
corpName: "大黄蜂",
dateTag: "2026-08-07至今",
recordCount: 50
});
expect(dl).toContain("Downloads/大黄蜂_审核记录_2026-08-07至今_50条.xlsx");
});
});
describe("exportApprovalRunsToExcel integration", () => {
const testCorp: CorpConfig = {
id: "test-corp",
name: "测试企业",
seal: {
endpoints: {
approvalStylePreferences: "api/v1/agent/ai-approval/config"
}
},
source: {
type: "direct",
token: "test-token",
sealUrl: "https://mock.sealai.cc",
expiresIn: 3600,
staffId: "direct"
},
auth: {
refreshTtl: 300
}
};
test("generates valid formatted excel workbook", async () => {
const mockClient = {
get: (url: string, opts?: any) => {
if (url.includes("api/v1/rules")) {
return {
json: async () => ({
rules: [
{ id: "r1", code: 0, description: "发票与收据真实性核验", scope: "全局", strictness: "SHOULD_FOLLOW" },
{ id: "r2", code: 1, description: "差旅标准不得超标", scope: "差旅", strictness: "MUST_FOLLOW" }
]
})
};
}
if (url.includes("api/v1/approvals")) {
return {
json: async () => ({
total: 2,
records: [
{
id: "run-1",
sourceDocumentSN: "B26001",
status: "completed",
taskMode: "assisted",
sourceSystem: "hosecloud",
document: {
fields: [{ label: "单据模板", value: "差旅报销单" }]
},
result: {
decision: "APPROVE",
rulesResult: [{ id: "rule-0", checkResult: "PASS" }]
},
manualApprovalRecord: {
status: { label: "已支付/审批完成", type: "APPROVED" }
},
createdAt: 1788760000000,
updatedAt: 1788760020000
},
{
id: "run-2",
sourceDocumentSN: "B26002",
status: "completed",
taskMode: "assisted",
sourceSystem: "hosecloud",
document: {
fields: [{ label: "单据模板", value: "差旅报销单" }]
},
result: {
decision: "REJECT",
rulesResult: [{ id: "rule-0", checkResult: "FAIL" }]
},
manualApprovalRecord: {
status: { label: "被驳回", type: "TERMINATED" },
rejectComment: "请上传正确的行程单凭据"
},
createdAt: 1788760000000,
updatedAt: 1788760030000
}
]
})
};
}
throw new Error(`Unexpected url: ${url}`);
}
} as any;
const tmpOut = join(tmpdir(), `test-export-${Date.now()}.xlsx`);
try {
const result = await exportApprovalRunsToExcel(mockClient, testCorp, {
outputFile: tmpOut,
limit: 10,
pageDelayMs: 0
});
expect(result.recordCount).toBe(2);
expect(result.ruleColumnCount).toBe(2);
expect(result.statusCounts["已支付/审批完成"]).toBe(1);
expect(result.statusCounts["被驳回"]).toBe(1);
expect(result.rejectReasonCount).toBe(1);
expect(existsSync(tmpOut)).toBe(true);
// Verify Excel contents with ExcelJS
const wb = new ExcelJS.Workbook();
await wb.xlsx.readFile(tmpOut);
const ws = wb.worksheets[0]!;
expect(ws.rowCount).toBe(3); // 1 header + 2 rows
expect(ws.getRow(1).getCell(1).value).toBe("单据编号");
expect(ws.getRow(2).getCell(1).value).toBe("B26001");
expect(ws.getRow(2).getCell(9).value).toBe("已支付/审批完成");
expect(ws.getRow(3).getCell(1).value).toBe("B26002");
expect(ws.getRow(3).getCell(9).value).toBe("被驳回");
expect(ws.getRow(3).getCell(10).value).toBe("请上传正确的行程单凭据");
} finally {
if (existsSync(tmpOut)) {
rmSync(tmpOut, { force: true });
}
}
});
});
+531
View File
@@ -0,0 +1,531 @@
import { existsSync, mkdirSync, statSync } from "node:fs";
import { homedir } from "node:os";
import { dirname, resolve } from "node:path";
import ExcelJS from "exceljs";
import type { KyInstance } from "ky";
import type { CorpConfig } from "../../core/config/types.js";
import * as api from "./api.js";
import type { ApprovalRun, ApprovalRunListData } from "./types.js";
export interface ApprovalRunsExportOptions {
limit?: number;
startDate?: string | number;
endDate?: string | number;
status?: string;
manualApprovalStatus?: string | string[];
includeCompletedOnly?: boolean;
outputFile?: string;
toDownloads?: boolean;
pageSize?: number;
pageDelayMs?: number;
}
export interface ApprovalRunsExportResult {
filePath: string;
corpId: string;
corpName: string;
recordCount: number;
ruleColumnCount: number;
statusCounts: Record<string, number>;
rejectReasonCount: number;
fileSizeBytes: number;
exportedAt: string;
}
export function normalizeTimestamp(val?: string | number, endOfDay = false): string | undefined {
if (val === undefined || val === null || val === "") return undefined;
if (typeof val === "number") return String(val);
const str = String(val).trim();
if (!str) return undefined;
if (/^\d{10,13}$/.test(str)) {
return str.length === 10 ? `${str}000` : str;
}
if (/^\d{4}-\d{2}-\d{2}$/.test(str)) {
const timeSuffix = endOfDay ? "T23:59:59.999+08:00" : "T00:00:00.000+08:00";
const parsed = new Date(`${str}${timeSuffix}`).getTime();
if (!Number.isNaN(parsed)) return String(parsed);
}
const parsed = new Date(str).getTime();
if (!Number.isNaN(parsed)) return String(parsed);
return str;
}
export function normalizeManualApprovalStatus(status?: string | string[]): string[] | undefined {
if (!status) return undefined;
const rawList = Array.isArray(status) ? status : [status];
const list: string[] = [];
for (const s of rawList) {
const normalized = s.trim().toUpperCase();
if (["APPROVED", "已通过", "已完成", "已支付", "已支付/审批完成"].includes(normalized)) {
list.push("APPROVED");
} else if (["TERMINATED", "REJECTED", "REJECT", "驳回", "被驳回", "已驳回"].includes(normalized)) {
list.push("TERMINATED");
} else if (["PROCESSING", "审批中", "处理中"].includes(normalized)) {
list.push("PROCESSING");
} else if (["CANCELLED", "CANCELED", "已撤回", "已撤销"].includes(normalized)) {
list.push("CANCELLED");
} else if (normalized) {
list.push(normalized);
}
}
return list.length > 0 ? list : undefined;
}
export function getRuleBriefTitle(ruleId: string, desc?: string, scope?: string): string {
if (!desc) return scope ? `${ruleId} (${scope})` : ruleId;
const firstSentence = desc.split(/[。\n\r;;!!]/)[0]?.trim() || desc.trim();
const clean = firstSentence.replace(/[*#`_]/g, "").trim();
return clean.slice(0, 22);
}
export function resolveOutputFilePath(options: {
outputFile?: string;
toDownloads?: boolean;
corpName: string;
dateTag?: string;
recordCount: number;
}): string {
if (options.outputFile) {
const p = resolve(options.outputFile);
const dir = dirname(p);
if (!existsSync(dir)) {
mkdirSync(dir, { recursive: true });
}
return p;
}
const safeCorpName = options.corpName.replace(/[/\\?%*:|"<>]/g, "_").trim() || "审批记录";
const dateTag = options.dateTag || new Date().toISOString().slice(0, 10);
const countTag = options.recordCount > 0 ? `${options.recordCount}条` : "空数据";
const fileName = `${safeCorpName}_审核记录_${dateTag}_${countTag}.xlsx`;
let targetDir: string;
if (options.toDownloads) {
targetDir = resolve(homedir(), "Downloads");
} else {
targetDir = resolve(process.cwd(), "exports");
}
if (!existsSync(targetDir)) {
mkdirSync(targetDir, { recursive: true });
}
return resolve(targetDir, fileName);
}
export async function exportApprovalRunsToExcel(
client: KyInstance,
corp: CorpConfig,
options: ApprovalRunsExportOptions = {}
): Promise<ApprovalRunsExportResult> {
const corpName = corp.name || corp.id;
const pageSize = options.pageSize ?? 100;
const pageDelayMs = options.pageDelayMs ?? 250;
const limit = options.limit ?? 100000;
const startDateTs = normalizeTimestamp(options.startDate, false);
const endDateTs = normalizeTimestamp(options.endDate, true);
const manualStatusFilter = normalizeManualApprovalStatus(options.manualApprovalStatus);
// 1. 动态加载企业规则集,生成列定义
console.error(`正在加载企业「${corpName}」审核规则集...`);
const ruleMap = new Map<string, { id: string; code: string; title: string; desc: string }>();
try {
const rulesData = await api.listApprovalRules(client);
rulesData.rules.forEach((r, idx) => {
const runtimeId = `rule-${r.code ?? idx}`;
const title = getRuleBriefTitle(runtimeId, r.description, r.scope);
ruleMap.set(runtimeId, {
id: runtimeId,
code: String(r.code ?? idx),
title: `[${runtimeId}] ${title}`,
desc: r.description
});
});
} catch (err: any) {
console.error(`⚠️ 加载规则字典失败: ${err.message},将仅导出基础信息列。`);
}
const sortedRuleKeys = Array.from(ruleMap.keys()).sort((a, b) => {
const numA = parseInt(a.replace(/\D/g, ""), 10) || 0;
const numB = parseInt(b.replace(/\D/g, ""), 10) || 0;
return numA - numB;
});
console.error(`已就绪 ${sortedRuleKeys.length} 个规则列。开始拉取单据...`);
// 2. 温和分页拉取单据记录
const fetchedRecords: ApprovalRun[] = [];
let offset = 0;
let totalAvailable = 0;
while (fetchedRecords.length < limit) {
let batch: ApprovalRunListData | undefined;
let retries = 3;
while (retries > 0) {
try {
batch = await api.listApprovalRuns(client, {
limit: pageSize,
offset,
startDate: startDateTs,
endDate: endDateTs,
status: options.status,
manualApprovalStatus: manualStatusFilter
});
break;
} catch (e: any) {
retries--;
console.error(`分页拉取失败 (offset=${offset}): ${e.message},剩余重试 ${retries} 次...`);
if (retries === 0) throw e;
await new Promise((r) => setTimeout(r, 1000));
}
}
if (!batch || !batch.records || batch.records.length === 0) break;
totalAvailable = batch.total ?? totalAvailable;
for (const r of batch.records) {
if (options.includeCompletedOnly && r.status !== "completed") {
continue;
}
// 如果是已完成单据但列表未附带规则结果,做安全补查
if (r.status === "completed" && (!r.result || !(r.result as any).rulesResult)) {
try {
const full = await api.getApprovalRun(client, r.id);
fetchedRecords.push(full);
} catch {
fetchedRecords.push(r);
}
} else {
fetchedRecords.push(r);
}
if (fetchedRecords.length >= limit) break;
}
offset += batch.records.length;
const currentProgress = totalAvailable > 0 ? ((offset / totalAvailable) * 100).toFixed(1) : "-";
if (offset % 500 === 0 || offset >= totalAvailable || fetchedRecords.length >= limit) {
console.error(
`[进度] 已读取单据: ${offset}/${totalAvailable} (${currentProgress}%),有效加入: ${fetchedRecords.length} 条`
);
}
if (batch.records.length < pageSize || offset >= totalAvailable) {
break;
}
if (pageDelayMs > 0) {
await new Promise((r) => setTimeout(r, pageDelayMs));
}
}
console.error(`成功拉取 ${fetchedRecords.length} 条单据数据,正在生成高保真 Excel...`);
// 3. 构建 Excel 工作簿
const workbook = new ExcelJS.Workbook();
workbook.creator = "Seal AI (seal-use)";
workbook.created = new Date();
const worksheet = workbook.addWorksheet("审核记录明细", {
views: [{ state: "frozen", ySplit: 1, xSplit: 2 }]
});
const baseColumns: Array<{ header: string; key: string; width: number }> = [
{ header: "单据编号", key: "sn", width: 16 },
{ header: "单据模板名称", key: "templateName", width: 26 },
{ header: "来源系统", key: "sourceSystem", width: 12 },
{ header: "任务模式", key: "taskMode", width: 12 },
{ header: "状态", key: "status", width: 12 },
{ header: "AI行为", key: "aiAction", width: 14 },
{ header: "AI决策", key: "aiDecision", width: 14 },
{ header: "思考深度", key: "thinkingDepth", width: 12 },
{ header: "人工审核", key: "manualStatus", width: 16 },
{ header: "人工驳回原因", key: "humanRejectReason", width: 36 },
{ header: "创建时间", key: "createdAt", width: 20 },
{ header: "任务耗时", key: "duration", width: 12 },
{ header: "关联规则数", key: "hitRuleCount", width: 12 },
{ header: "关联规则汇总", key: "hitRulesSummary", width: 30 },
{ header: "AI审核结论摘要", key: "aiSummary", width: 45 }
];
const ruleColumns = sortedRuleKeys.map((ruleKey) => {
const rInfo = ruleMap.get(ruleKey)!;
return {
header: rInfo.title,
key: `rule_${ruleKey}`,
width: 22
};
});
worksheet.columns = [...baseColumns, ...ruleColumns];
// 表头样式设置
const headerRow = worksheet.getRow(1);
headerRow.height = 32;
headerRow.eachCell((cell, colNumber) => {
const isBase = colNumber <= baseColumns.length;
cell.font = {
name: "Microsoft YaHei",
bold: true,
color: { argb: "FFFFFFFF" },
size: 11
};
cell.fill = {
type: "pattern",
pattern: "solid",
fgColor: { argb: isBase ? "FF1E3A8A" : "FF334155" }
};
cell.alignment = {
vertical: "middle",
horizontal: isBase && colNumber <= 2 ? "left" : "center",
wrapText: false
};
});
const statusCounts: Record<string, number> = {};
let rejectReasonCount = 0;
// 填充数据行
for (const record of fetchedRecords) {
const res = (record.result as any) || {};
const doc = (record.document as any) || {};
// 1. 提取单据模板名称
let templateName = "未知模板";
if (Array.isArray(doc.fields)) {
const tField = doc.fields.find(
(f: any) =>
f.label === "单据模板" ||
f.label === "流程名称" ||
f.key === "templateName" ||
f.key === "specificationId" ||
f.key === "formName"
);
if (tField?.value) templateName = String(tField.value);
}
if (templateName === "未知模板" && (doc.name || doc.title)) {
templateName = doc.name || doc.title;
}
// 2. 映射任务模式
let taskModeDesc = record.taskMode || "-";
if (taskModeDesc === "assisted") taskModeDesc = "辅助审核";
else if (taskModeDesc === "simulation") taskModeDesc = "测试任务";
else if (taskModeDesc === "automatic") taskModeDesc = "自动审批";
// 3. 映射状态
let statusDesc = record.status || "-";
if (statusDesc === "completed") statusDesc = "已完成";
else if (statusDesc === "processing") statusDesc = "处理中";
else if (statusDesc === "failed") statusDesc = "失败";
// 4. AI 决策与行为
const aiDecision = res.decision || (record as any).aiDecision || "-";
let aiDecisionDesc = aiDecision;
let aiAction = "-";
if (aiDecision === "APPROVE") {
aiDecisionDesc = "通过";
aiAction = "添加评论";
} else if (aiDecision === "REVIEW") {
aiDecisionDesc = "转交复核";
aiAction = "转交复核";
} else if (aiDecision === "REJECT") {
aiDecisionDesc = "驳回";
aiAction = "驳回";
}
// 5. 耗时计算
let durationStr = "-";
if (record.createdAt && record.updatedAt && record.status === "completed") {
const diffSec = Math.round((Number(record.updatedAt) - Number(record.createdAt)) / 1000);
if (diffSec >= 60) {
durationStr = `${Math.floor(diffSec / 60)}分${diffSec % 60}秒`;
} else if (diffSec > 0) {
durationStr = `${diffSec}秒`;
}
}
// 6. 人工审核状态与驳回原因
const mar = (record as any).manualApprovalRecord || {};
let manualStatus = "-";
if (mar.status?.label) {
manualStatus = String(mar.status.label);
} else if (mar.status?.type) {
const t = String(mar.status.type);
if (t === "APPROVED") manualStatus = "已通过";
else if (t === "TERMINATED") manualStatus = "被驳回";
else if (t === "PROCESSING") manualStatus = "处理中";
else if (t === "CANCELLED") manualStatus = "已撤回";
else manualStatus = t;
}
statusCounts[manualStatus] = (statusCounts[manualStatus] || 0) + 1;
const humanRejectReason = mar.rejectComment ? String(mar.rejectComment).trim() : "-";
if (humanRejectReason !== "-") {
rejectReasonCount++;
}
// 7. 解析规则核验结果
const ruleResultMap = new Map<string, string>();
const hitRuleIds: string[] = [];
if (Array.isArray(res.rulesResult)) {
for (const rr of res.rulesResult) {
if (rr.id) {
ruleResultMap.set(rr.id, rr.checkResult || "PASS");
hitRuleIds.push(rr.id);
}
}
}
if (Array.isArray(res.hitRules)) {
for (const hr of res.hitRules) {
if (hr.id && !ruleResultMap.has(hr.id)) {
ruleResultMap.set(hr.id, "TRIGGERED");
hitRuleIds.push(hr.id);
}
}
}
// 8. 创建时间
let createdAtStr = "-";
if (record.createdAt) {
const d = new Date(Number(record.createdAt));
createdAtStr = d.toLocaleString("zh-CN", { timeZone: "Asia/Shanghai", hour12: false });
}
const rowData: Record<string, any> = {
sn: record.sourceDocumentSN || record.sourceDocumentId || "-",
templateName,
sourceSystem: record.sourceSystem || "合思",
taskMode: taskModeDesc,
status: statusDesc,
aiAction,
aiDecision: aiDecisionDesc,
thinkingDepth: "标准",
manualStatus,
humanRejectReason,
createdAt: createdAtStr,
duration: durationStr,
hitRuleCount: hitRuleIds.length,
hitRulesSummary: hitRuleIds.join(", ") || "-",
aiSummary: res.summary || "-"
};
for (const ruleKey of sortedRuleKeys) {
const checkResult = ruleResultMap.get(ruleKey);
if (checkResult) {
if (checkResult === "PASS") rowData[`rule_${ruleKey}`] = "关联 (通过)";
else if (checkResult === "FAIL") rowData[`rule_${ruleKey}`] = "关联 (不通过)";
else if (checkResult === "UNKNOWN") rowData[`rule_${ruleKey}`] = "关联 (待复核)";
else rowData[`rule_${ruleKey}`] = "已关联";
} else {
rowData[`rule_${ruleKey}`] = "未关联";
}
}
const addedRow = worksheet.addRow(rowData);
addedRow.height = 24;
addedRow.eachCell((cell, colNumber) => {
const val = String(cell.value || "");
cell.font = { name: "Microsoft YaHei", size: 10 };
cell.border = {
top: { style: "thin", color: { argb: "FFE2E8F0" } },
bottom: { style: "thin", color: { argb: "FFE2E8F0" } },
left: { style: "thin", color: { argb: "FFE2E8F0" } },
right: { style: "thin", color: { argb: "FFE2E8F0" } }
};
if (colNumber <= baseColumns.length) {
cell.alignment = {
vertical: "middle",
horizontal: [1, 2, 10, 14, 15].includes(colNumber) ? "left" : "center",
wrapText: [10, 14, 15].includes(colNumber)
};
// AI 决策颜色区分
if (colNumber === 7) {
if (val === "通过") cell.font = { color: { argb: "FF16A34A" }, bold: true };
else if (val === "转交复核") cell.font = { color: { argb: "FFD97706" }, bold: true };
else if (val === "驳回") cell.font = { color: { argb: "FFDC2626" }, bold: true };
}
// 人工审核高亮
if (colNumber === 9) {
if (val.includes("驳回")) {
cell.font = { name: "Microsoft YaHei", size: 10, color: { argb: "FFDC2626" }, bold: true };
cell.fill = { type: "pattern", pattern: "solid", fgColor: { argb: "FFFEE2E2" } };
} else if (val.includes("通过") || val.includes("支付") || val.includes("完成")) {
cell.font = { name: "Microsoft YaHei", size: 10, color: { argb: "FF16A34A" }, bold: true };
cell.fill = { type: "pattern", pattern: "solid", fgColor: { argb: "FFDCFCE7" } };
} else if (val.includes("处理中") || val.includes("审批中")) {
cell.font = { name: "Microsoft YaHei", size: 10, color: { argb: "FF2563EB" } };
cell.fill = { type: "pattern", pattern: "solid", fgColor: { argb: "FFEFF6FF" } };
}
}
// 人工驳回原因字体
if (colNumber === 10 && val !== "-") {
cell.font = { name: "Microsoft YaHei", size: 9, color: { argb: "FF991B1B" } };
}
} else {
cell.alignment = { vertical: "middle", horizontal: "center" };
if (val.includes("不通过")) {
cell.fill = { type: "pattern", pattern: "solid", fgColor: { argb: "FFFEE2E2" } };
cell.font = { color: { argb: "FF991B1B" }, bold: true };
} else if (val.includes("通过")) {
cell.fill = { type: "pattern", pattern: "solid", fgColor: { argb: "FFDCFCE7" } };
cell.font = { color: { argb: "FF166534" }, bold: true };
} else if (val.includes("待复核") || val.includes("已关联")) {
cell.fill = { type: "pattern", pattern: "solid", fgColor: { argb: "FFFEF3C7" } };
cell.font = { color: { argb: "FF92400E" } };
} else {
cell.font = { color: { argb: "FF94A3B8" } };
}
}
});
}
// 4. 保存文件落地
let dateTag: string | undefined;
if (options.startDate) {
const rawStart = String(options.startDate);
if (/^\d{4}-\d{2}-\d{2}/.test(rawStart)) {
dateTag = `${rawStart.slice(0, 10)}至今`;
} else if (/^\d+$/.test(rawStart)) {
const d = new Date(Number(rawStart));
dateTag = `${d.getFullYear()}${String(d.getMonth() + 1).padStart(2, "0")}${String(d.getDate()).padStart(2, "0")}至今`;
}
}
const targetPath = resolveOutputFilePath({
outputFile: options.outputFile,
toDownloads: options.toDownloads,
corpName,
dateTag,
recordCount: fetchedRecords.length
});
await workbook.xlsx.writeFile(targetPath);
console.error(`Excel 文件已成功落地: ${targetPath}`);
const stat = statSync(targetPath);
return {
filePath: targetPath,
corpId: corp.id,
corpName,
recordCount: fetchedRecords.length,
ruleColumnCount: sortedRuleKeys.length,
statusCounts,
rejectReasonCount,
fileSizeBytes: stat.size,
exportedAt: new Date().toISOString()
};
}
+29
View File
@@ -19,6 +19,7 @@ import { previewMaterialPack, pushMaterialPack, readMaterialPackFile } from "./m
import {
extractApprovalRunAttachments
} from "./attachments.js";
import { exportApprovalRunsToExcel } from "./approval-runs-export.js";
import {
ThinkingPolicySchema,
type ApprovalRule,
@@ -1164,6 +1165,34 @@ export const sealTools = [
});
}
},
{
name: "seal_approval_runs_export",
description: "将企业的审批审核记录导出为高保真 Excel 报表(包含单据模板、AI决策、人工审核结论、驳回原因及企业规则列细分结果)",
parameters: z.object({
startDate: z.string().optional().describe("起始时间,支持 YYYY-MM-DD 或毫秒时间戳"),
endDate: z.string().optional().describe("截止时间,支持 YYYY-MM-DD 或毫秒时间戳"),
limit: z.number().int().positive().optional().describe("最大拉取记录条数"),
status: z.string().optional().describe("单据状态过滤,如 completed, processing, failed"),
manualApprovalStatus: z.union([z.string(), z.array(z.string())]).optional().describe("人工审核状态过滤,如 APPROVED, TERMINATED, PROCESSING"),
includeCompletedOnly: z.boolean().optional().describe("是否仅导出已完成单据"),
outputFile: z.string().optional().describe("输出 Excel 文件的自定义绝对或相对路径"),
toDownloads: z.boolean().optional().describe("是否直接保存到用户的系统下载目录")
}),
handler: async (
client: KyInstance,
params: {
startDate?: string;
endDate?: string;
limit?: number;
status?: string;
manualApprovalStatus?: string | string[];
includeCompletedOnly?: boolean;
outputFile?: string;
toDownloads?: boolean;
},
context: ToolContext
) => exportApprovalRunsToExcel(client, context.corp, params)
},
{
name: "seal_approval_run_get",
description: "获取 Seal 单条审批/审核运行记录详情;可用 fields 只取 metadata、document.fields、result.summary 等局部字段",