dsh-edge 0.15.0-alpha.2 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/worker/direct/index.js
CHANGED
|
@@ -4309,7 +4309,7 @@ The web search request used endpoint ${JSON.stringify(e)}. Search endpoint confi
|
|
|
4309
4309
|
button, .button { display: inline-block; box-sizing: border-box; margin-top: 1rem; padding: .75rem 1rem; border: 0; border-radius: .6rem; background: #5a87ff; color: #071022; font: inherit; font-weight: 750; text-decoration: none; cursor: pointer; }
|
|
4310
4310
|
.secondary { background: #29314b; color: #edf2ff; }
|
|
4311
4311
|
.error { padding: .75rem; border-radius: .5rem; background: #461d2b; color: #ffd6df; }
|
|
4312
|
-
`}o(bre,"pageStyles");var GN={name:"dsh-edge",version:"0.15.0-alpha.2",description:"Your DeepSeek Harness, anywhere \u2014 deploy a persistent personal coding agent to Cloudflare Workers in one command",author:"pawaca",license:"MIT",type:"module",bin:{"dsh-edge":"scripts/cli.mjs"},files:["dist","worker","scripts/*.d.mts","scripts/*.mjs","wrangler.jsonc","README.md","README.zh.md","LICENSE","THIRD_PARTY_NOTICES.md"],repository:{type:"git",url:"git+https://github.com/pawaca/dsh-edge.git",directory:"apps/dsh-edge"},homepage:"https://github.com/pawaca/dsh-edge#readme",bugs:{url:"https://github.com/pawaca/dsh-edge/issues"},keywords:["deepseek","deepseek-harness","ai-agents","byok","cloudflare-workers","durable-objects","self-hosted"],engines:{node:">=22.14.0"},publishConfig:{access:"public"},dshEdge:{upstreamVersion:"0.1.5-rc.2"},scripts:{"bundle:direct":"pnpm run web:build && pnpm --dir standalone run build:worker:direct && node standalone/scripts/promote.mjs direct","bundle:isolated":"pnpm run web:build && pnpm --dir standalone run build:worker:isolated && node standalone/scripts/promote.mjs isolated","bundle:workers":"pnpm --dir standalone run build && pnpm --dir standalone run verify && node standalone/scripts/promote.mjs all",dev:"pnpm run bundle:direct && node scripts/dev.mjs direct","dev:isolated":"pnpm run bundle:isolated && node scripts/dev.mjs isolated","dsh-edge":"node scripts/cli.mjs","example:install":"node examples/install-keyless.mjs","install:cloudflare":"pnpm run bundle:workers && node scripts/cli.mjs install","legal:write":"node scripts/legal-files.mjs write","pack:verify":"node scripts/verify-packed.mjs",prepack:"node scripts/legal-files.mjs verify && pnpm run bundle:workers","web:build":"pnpm --dir standalone run build:web && node standalone/scripts/promote.mjs web",test:"vitest run --root ../.. --project edge-runtime","test:integration":"pnpm run bundle:workers && node tests/run-session-integration.mjs","test:snapshot":"vitest run --root ../.. --config apps/dsh-edge/vitest.snapshot.config.ts",typecheck:"tsc --noEmit"},dependencies:{"@clack/prompts":"1.7.0","compare-versions":"6.1.1",execa:"^10.0.1","jsonc-parser":"^3.3.1",wrangler:"4.129.0"},devDependencies:{"@cloudflare/computer":"0.2.1","@cloudflare/workers-types":"5.20260904.1","@deepseek-ai/cordis":"4.0.2","@deepseek-ai/dsh-agent":"0.1.5-rc.2","@deepseek-ai/dsh-agent-loop":"0.1.5-rc.2","@deepseek-ai/dsh-anonymous-user-id":"0.1.5-rc.2","@deepseek-ai/dsh-api-gateway":"0.1.5-rc.2","@deepseek-ai/dsh-api-remotes":"0.1.5-rc.2","@deepseek-ai/dsh-api-session-controller":"0.1.5-rc.2","@deepseek-ai/dsh-api-settings-controller":"0.1.5-rc.2","@deepseek-ai/dsh-api-workspace-controller":"0.1.5-rc.2","@deepseek-ai/dsh-api-workspace-files":"0.1.5-rc.2","@deepseek-ai/dsh-attachment":"0.1.5-rc.2","@deepseek-ai/dsh-brand":"0.1.5-rc.2","@deepseek-ai/dsh-client-store":"0.1.5-rc.2","@deepseek-ai/dsh-commands":"0.1.5-rc.2","@deepseek-ai/dsh-compaction":"0.1.5-rc.2","@deepseek-ai/dsh-compaction-basic":"0.1.5-rc.2","@deepseek-ai/dsh-compaction-tool-result-pruner":"0.1.5-rc.2","@deepseek-ai/dsh-credentials":"0.1.5-rc.2","@deepseek-ai/dsh-file-reference":"0.1.5-rc.2","@deepseek-ai/dsh-fs":"0.1.5-rc.2","@deepseek-ai/dsh-goal":"0.1.5-rc.2","@deepseek-ai/dsh-goal-round-driver":"0.1.5-rc.2","@deepseek-ai/dsh-host-directory-picker":"0.1.5-rc.2","@deepseek-ai/dsh-jobs":"0.1.5-rc.2","@deepseek-ai/dsh-jobs-local":"0.1.5-rc.2","@deepseek-ai/dsh-host-plugin-inventory":"0.1.5-rc.2","@deepseek-ai/dsh-launch-environment":"0.1.5-rc.2","@deepseek-ai/dsh-llm":"0.1.5-rc.2","@deepseek-ai/dsh-llm-deepseek":"0.1.5-rc.2","@deepseek-ai/dsh-message-feedback":"0.1.5-rc.2","@deepseek-ai/dsh-output-retention":"0.1.5-rc.2","@deepseek-ai/dsh-plan-mode":"0.1.5-rc.2","@deepseek-ai/dsh-sandbox":"0.1.5-rc.2","@deepseek-ai/dsh-scope":"0.1.5-rc.2","@deepseek-ai/dsh-schedule":"0.1.5-rc.2","@deepseek-ai/dsh-session":"0.1.5-rc.2","@deepseek-ai/dsh-session-format":"0.1.5-rc.2","@deepseek-ai/dsh-session-format-catalog":"0.1.5-rc.2","@deepseek-ai/dsh-session-format-v0-to-v1":"0.1.5-rc.2","@deepseek-ai/dsh-session-format-v1-to-v2":"0.1.5-rc.2","@deepseek-ai/dsh-session-format-v2-to-v3":"0.1.5-rc.2","@deepseek-ai/dsh-session-persistence":"0.1.5-rc.2","@deepseek-ai/dsh-session-projection":"0.1.5-rc.2","@deepseek-ai/dsh-session-projection-cache":"0.1.5-rc.2","@deepseek-ai/dsh-session-query":"0.1.5-rc.2","@deepseek-ai/dsh-session-reference":"0.1.5-rc.2","@deepseek-ai/dsh-session-title":"0.1.5-rc.2","@deepseek-ai/dsh-session-title-first-prompt-llm":"0.1.5-rc.2","@deepseek-ai/dsh-session-title-llm":"0.1.5-rc.2","@deepseek-ai/dsh-settings":"0.1.5-rc.2","@deepseek-ai/dsh-skill":"0.1.5-rc.2","@deepseek-ai/dsh-subagent":"0.1.5-rc.2","@deepseek-ai/dsh-subagent-in-process-driver":"0.1.5-rc.2","@deepseek-ai/dsh-subagent-spawn-in-process":"0.1.5-rc.2","@deepseek-ai/dsh-tool-subagent":"0.1.5-rc.2","@deepseek-ai/dsh-spill":"0.1.5-rc.2","@deepseek-ai/dsh-spill-policy":"0.1.5-rc.2","@deepseek-ai/dsh-storage":"0.1.5-rc.2","@deepseek-ai/dsh-storage-domain":"0.1.5-rc.2","@deepseek-ai/dsh-system-prompt":"0.1.5-rc.2","@deepseek-ai/dsh-timeout":"0.1.5-rc.2","@deepseek-ai/dsh-token-meter":"0.1.5-rc.2","@deepseek-ai/dsh-tool-ask-user":"0.1.5-rc.2","@deepseek-ai/dsh-tool-call-timeout-policy":"0.1.5-rc.2","@deepseek-ai/dsh-tool-fs":"0.1.5-rc.2","@deepseek-ai/dsh-tool-goal":"0.1.5-rc.2","@deepseek-ai/dsh-tool-jobs":"0.1.5-rc.2","@deepseek-ai/dsh-tool-skill":"0.1.5-rc.2","@deepseek-ai/dsh-tool-web":"0.1.5-rc.2","@deepseek-ai/dsh-tools":"0.1.5-rc.2","@deepseek-ai/dsh-typert-protocol":"0.1.5-rc.2","@deepseek-ai/dsh-typert-registry":"0.1.5-rc.2","@deepseek-ai/dsh-user-questions":"0.1.5-rc.2","@deepseek-ai/dsh-util-values":"0.1.5-rc.2","@deepseek-ai/dsh-web":"0.1.5-rc.2","@deepseek-ai/dsh-web-fetch-http":"0.1.5-rc.2","@deepseek-ai/dsh-web-search-deepseek":"0.1.5-rc.2","@deepseek-ai/dsh-workspace":"0.1.5-rc.2","@mixmark-io/domino":"2.2.0","fast-png":"8.0.0","jpeg-js":"0.4.4","just-bash":"3.4.2",playwright:"^1.49.0",typescript:"^6.0.3",vitest:"^4.1.8",ws:"^8.21.0"}};var US=GN.version,wre=GN.dshEdge.upstreamVersion;function LBe(){return"dsh-edge@0.15.0-alpha.2/direct"}o(LBe,"resolveEdgeDeploymentId");function $0(e){return{baseURL:oO(e.DEEPSEEK_BASE_URL),maxTokens:dO(e.DEEPSEEK_MAX_OUTPUT_TOKENS),model:Xd(e.DEEPSEEK_MODEL),reasoningEffort:lO(e.DEEPSEEK_REASONING_EFFORT),searchBaseURL:tS(e.DEEPSEEK_SEARCH_BASE_URL),streamIdleTimeoutMs:cO(e.DEEPSEEK_STREAM_IDLE_TIMEOUT_MS),commandTimeoutPolicy:T0(e.DSH_EDGE_DEFAULT_COMMAND_TIMEOUT_MS,e.DSH_EDGE_MAX_COMMAND_TIMEOUT_MS)}}o($0,"resolveEdgeDeploymentConfig");function FBe(e){return typeof e.DEEPSEEK_API_KEY=="string"&&e.DEEPSEEK_API_KEY.trim().length>0}o(FBe,"edgeDeploymentApiKeyConfigured");function jBe(e){let t=oO(e),n=new URL(t);return n.search.length===0&&n.hash.length===0?t:(n.search="",n.hash="",n.href)}o(jBe,"projectedEdgeBaseURL");function ZN(e,t){return{shell:e.LOADER===void 0?"just-bash-direct":"just-bash-isolated",storage:"durable-object-sqlite-vfs",attachmentStorage:t??(e.DSH_EDGE_ATTACHMENTS===void 0?"temporary-do":"private-r2"),deploymentId:LBe(),apiKeyConfigured:FBe(e),baseURL:jBe(e.DEEPSEEK_BASE_URL),maxTokens:dO(e.DEEPSEEK_MAX_OUTPUT_TOKENS),model:Xd(e.DEEPSEEK_MODEL),reasoningEffort:lO(e.DEEPSEEK_REASONING_EFFORT),searchBaseURL:tS(e.DEEPSEEK_SEARCH_BASE_URL),streamIdleTimeoutMs:cO(e.DEEPSEEK_STREAM_IDLE_TIMEOUT_MS),commandTimeoutPolicy:T0(e.DSH_EDGE_DEFAULT_COMMAND_TIMEOUT_MS,e.DSH_EDGE_MAX_COMMAND_TIMEOUT_MS)}}o(ZN,"resolveEdgeDeploymentProfile");function BS(e){$0(e);let t=ZN(e);return{ok:!0,service:"dsh-edge",storage:t.storage,attachmentStorage:t.attachmentStorage,shell:t.shell,agent:"upstream-react-loop-agent",access:"single-owner-cookie",deploymentId:t.deploymentId,...e.CF_VERSION_METADATA===void 0?{}:{workerVersionId:e.CF_VERSION_METADATA.id},version:US,upstreamVersion:wre,status:"ready"}}o(BS,"resolveEdgeDeploymentHealth");import{AsyncLocalStorage as Kst}from"node:async_hooks";import{WorkerEntrypoint as r4t}from"cloudflare:workers";var Yu=od(Sre(),1);var KN=o((e,t,n)=>{let r=e instanceof RegExp?Ere(e,n):e,i=t instanceof RegExp?Ere(t,n):t,s=r!==null&&i!=null&&qBe(r,i,n);return s&&{start:s[0],end:s[1],pre:n.slice(0,s[0]),body:n.slice(s[0]+r.length,s[1]),post:n.slice(s[1]+i.length)}},"balanced"),Ere=o((e,t)=>{let n=t.match(e);return n?n[0]:null},"maybeMatch"),qBe=o((e,t,n)=>{let r,i,s,a,l,c=n.indexOf(e),d=n.indexOf(t,c+1),u=c;if(c>=0&&d>0){if(e===t)return[c,d];for(r=[],s=n.length;u>=0&&!l;){if(u===c)r.push(u),c=n.indexOf(e,u+1);else if(r.length===1){let p=r.pop();p!==void 0&&(l=[p,d])}else i=r.pop(),i!==void 0&&i<s&&(s=i,a=d),d=n.indexOf(t,u+1);u=c<d&&c>=0?c:d}r.length&&a!==void 0&&(l=[s,a])}return l},"range");var kre="\0SLASH"+Math.random()+"\0",_re="\0OPEN"+Math.random()+"\0",YN="\0CLOSE"+Math.random()+"\0",Ire="\0COMMA"+Math.random()+"\0",Tre="\0PERIOD"+Math.random()+"\0",UBe=new RegExp(kre,"g"),BBe=new RegExp(_re,"g"),zBe=new RegExp(YN,"g"),WBe=new RegExp(Ire,"g"),HBe=new RegExp(Tre,"g"),VBe=/\\\\/g,GBe=/\\{/g,ZBe=/\\}/g,KBe=/\\,/g,JBe=/\\\./g,XBe=1e5,YBe=4e6;function JN(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}o(JN,"numeric");function QBe(e){return e.replace(VBe,kre).replace(GBe,_re).replace(ZBe,YN).replace(KBe,Ire).replace(JBe,Tre)}o(QBe,"escapeBraces");function eze(e){return e.replace(UBe,"\\").replace(BBe,"{").replace(zBe,"}").replace(WBe,",").replace(HBe,".")}o(eze,"unescapeBraces");function Are(e){if(!e)return[""];let t=[],n=KN("{","}",e);if(!n)return e.split(",");let{pre:r,body:i,post:s}=n,a=r.split(",");a[a.length-1]+="{"+i+"}";let l=Are(s);return s.length&&(a[a.length-1]+=l.shift(),a.push.apply(a,l)),t.push.apply(t,a),t}o(Are,"parseCommaParts");function Cre(e,t={}){if(!e)return[];let{max:n=XBe,maxLength:r=YBe}=t;return e.slice(0,2)==="{}"&&(e="\\{\\}"+e.slice(2)),XN(QBe(e),n,r,!0).map(eze)}o(Cre,"expand");function tze(e){return"{"+e+"}"}o(tze,"embrace");function nze(e){return/^-?0\d/.test(e)}o(nze,"isPadded");function rze(e,t){return e<=t}o(rze,"lte");function ize(e,t){return e>=t}o(ize,"gte");function O0(e,t,n,r,i,s){let a=[],l=0;for(let c=0;c<e.length;c++)for(let d=0;d<n.length;d++){if(a.length>=r)return a;let u=e[c]+t+n[d];if(!(s&&!u)){if(l+u.length>i)return a;a.push(u),l+=u.length}}return a}o(O0,"combine");function sze(e,t,n,r){let i=e.split(/\.\./),s=[];if(i[0]===void 0||i[1]===void 0)return s;let a=JN(i[0]),l=JN(i[1]),c=Math.max(i[0].length,i[1].length),d=i.length===3&&i[2]!==void 0?Math.max(Math.abs(JN(i[2])),1):1,u=rze;l<a&&(d*=-1,u=ize);let h=i.some(nze),f=0;for(let g=a;u(g,l)&&s.length<n;g+=d){let y;if(t)y=String.fromCharCode(g),y==="\\"&&(y="");else if(y=String(g),h){let v=c-y.length;if(v>0){let b=new Array(v+1).join("0");g<0?y="-"+b+y.slice(1):y=b+y}}if(f+y.length>r)break;s.push(y),f+=y.length}return s}o(sze,"expandSequence");function XN(e,t,n,r){let i=[""],s=!1,a=!0;for(;;){let l=KN("{","}",e);if(!l)return O0(i,e,[""],t,n,s);let c=l.pre;if(/\$$/.test(c)){if(i=O0(i,c+"{"+l.body+"}",[""],t,n,s&&!l.post.length),a=!1,!l.post.length)break;e=l.post;continue}let d=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(l.body),u=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(l.body),p=d||u,h=l.body.indexOf(",")>=0;if(!p&&!h){if(l.post.match(/,(?!,).*\}/)){e=l.pre+"{"+l.body+YN+l.post,r=!0;continue}return O0(i,c+"{"+l.body+"}"+l.post,[""],t,n,s)}a&&(s=r&&!p,a=!1);let f;if(p)f=sze(l.body,u,t,n);else{let g=Are(l.body);if(g.length===1&&g[0]!==void 0&&(g=XN(g[0],t,n,!1).map(tze),g.length===1)){if(i=O0(i,c+g[0],[""],t,n,s&&!l.post.length),!l.post.length)break;e=l.post;continue}let y=s&&!l.post.length&&!c;for(let b=0;y&&b<i.length;b++)i[b]&&(y=!1);f=[];let v=0;e:for(let b=0;b<g.length;b++){let x=XN(g[b],t,n,!1);for(let w=0;w<x.length;w++){let S=x[w];if(!(y&&!S)){if(f.length>=t||v+S.length>n)break e;f.push(S),v+=S.length}}}}if(i=O0(i,c,f,t,n,s&&!l.post.length),!l.post.length)break;e=l.post}return i}o(XN,"expand_");var N0=o(e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")},"assertValidPattern");var aze={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},P0=o(e=>e.replace(/[[\]\\-]/g,"\\$&"),"braceEscape"),oze=o(e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regexpEscape"),Rre=o(e=>e.join(""),"rangesToString"),$re=o((e,t)=>{let n=t;if(e.charAt(n)!=="[")throw new Error("not in a brace expression");let r=[],i=[],s=n+1,a=!1,l=!1,c=!1,d=!1,u=n,p="";e:for(;s<e.length;){let y=e.charAt(s);if((y==="!"||y==="^")&&s===n+1){d=!0,s++;continue}if(y==="]"&&a&&!c){u=s+1;break}if(a=!0,y==="\\"&&!c){c=!0,s++;continue}if(y==="["&&!c){for(let[v,[b,x,w]]of Object.entries(aze))if(e.startsWith(v,s)){if(p)return["$.",!1,e.length-n,!0];s+=v.length,w?i.push(b):r.push(b),l=l||x;continue e}}if(c=!1,p){y>p?r.push(P0(p)+"-"+P0(y)):y===p&&r.push(P0(y)),p="",s++;continue}if(e.startsWith("-]",s+1)){r.push(P0(y+"-")),s+=2;continue}if(e.startsWith("-",s+1)){p=y,s+=2;continue}r.push(P0(y)),s++}if(u<s)return["",!1,0,!1];if(!r.length&&!i.length)return["$.",!1,e.length-n,!0];if(i.length===0&&r.length===1&&/^\\?.$/.test(r[0])&&!d){let y=r[0].length===2?r[0].slice(-1):r[0];return[oze(y),!1,u-n,!1]}let h="["+(d?"^":"")+Rre(r)+"]",f="["+(d?"":"^")+Rre(i)+"]";return[r.length&&i.length?"("+h+"|"+f+")":r.length?h:f,l,u-n,!0]},"parseClass");var qc=o((e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!0}={})=>n?t?e.replace(/\[([^/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^/\\])\]/g,"$1$2").replace(/\\([^/])/g,"$1"):t?e.replace(/\[([^/\\{}])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^/\\{}])\]/g,"$1$2").replace(/\\([^/{}])/g,"$1"),"unescape");var fs,lze=new Set(["!","?","+","*","@"]),QN=o(e=>lze.has(e),"isExtglobType"),Ore=o(e=>QN(e.type),"isExtglobAST"),cze=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),dze=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),uze=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),Nre=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),pze="(?!(?:^|/)\\.\\.?(?:$|/))",WS="(?!\\.)",fze=new Set(["[","."]),hze=new Set(["..","."]),mze=new Set("().*{}+?[]^$\\!"),gze=o(e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),e8="[^/]",Pre=e8+"*?",Dre=e8+"+?",yze=0,wu=class{static{o(this,"AST")}type;#e;#n;#r=!1;#t=[];#i;#s;#o;#u=!1;#l;#a;#c=!1;id=++yze;get depth(){return(this.#i?.depth??-1)+1}[Symbol.for("nodejs.util.inspect.custom")](){return{"@@type":"AST",id:this.id,type:this.type,root:this.#e.id,parent:this.#i?.id,depth:this.depth,partsLength:this.#t.length,parts:this.#t}}constructor(t,n,r={}){this.type=t,t&&(this.#n=!0),this.#i=n,this.#e=this.#i?this.#i.#e:this,this.#l=this.#e===this?r:this.#e.#l,this.#o=this.#e===this?[]:this.#e.#o,t==="!"&&!this.#e.#u&&this.#o.push(this),this.#s=this.#i?this.#i.#t.length:0}get hasMagic(){if(this.#n!==void 0)return this.#n;for(let t of this.#t)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#n=!0;return this.#n}toString(){return this.#a!==void 0?this.#a:this.type?this.#a=this.type+"("+this.#t.map(t=>String(t)).join("|")+")":this.#a=this.#t.map(t=>String(t)).join("")}#k(){if(this!==this.#e)throw new Error("should only call on root");if(this.#u)return this;this.toString(),this.#u=!0;let t;for(;t=this.#o.pop();){if(t.type!=="!")continue;let n=t,r=n.#i;for(;r;){for(let i=n.#s+1;!r.type&&i<r.#t.length;i++)for(let s of t.#t){if(typeof s=="string")throw new Error("string part in extglob AST??");s.copyIn(r.#t[i])}n=r,r=n.#i}}return this}push(...t){for(let n of t)if(n!==""){if(typeof n!="string"&&!(n instanceof fs&&n.#i===this))throw new Error("invalid part: "+n);this.#t.push(n)}}toJSON(){let t=this.type===null?this.#t.slice().map(n=>typeof n=="string"?n:n.toJSON()):[this.type,...this.#t.map(n=>n.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#u&&this.#i?.type==="!")&&t.push({}),t}isStart(){if(this.#e===this)return!0;if(!this.#i?.isStart())return!1;if(this.#s===0)return!0;let t=this.#i;for(let n=0;n<this.#s;n++){let r=t.#t[n];if(!(r instanceof fs&&r.type==="!"))return!1}return!0}isEnd(){if(this.#e===this||this.#i?.type==="!")return!0;if(!this.#i?.isEnd())return!1;if(!this.type)return this.#i?.isEnd();let t=this.#i?this.#i.#t.length:0;return this.#s===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){let n=new fs(this.type,t);for(let r of this.#t)n.copyIn(r);return n}static#m(t,n,r,i,s){let a=i.maxExtglobRecursion??2,l=!1,c=!1,d=-1,u=!1;if(n.type===null){let y=r,v="";for(;y<t.length;){let b=t.charAt(y++);if(l||b==="\\"){l=!l,v+=b;continue}if(c){y===d+1?(b==="^"||b==="!")&&(u=!0):b==="]"&&!(y===d+2&&u)&&(c=!1),v+=b;continue}else if(b==="["){c=!0,d=y,u=!1,v+=b;continue}if(!i.noext&&QN(b)&&t.charAt(y)==="("&&s<=a){n.push(v),v="";let w=new fs(b,n);y=fs.#m(t,w,y,i,s+1),n.push(w);continue}v+=b}return n.push(v),y}let p=r+1,h=new fs(null,n),f=[],g="";for(;p<t.length;){let y=t.charAt(p++);if(l||y==="\\"){l=!l,g+=y;continue}if(c){p===d+1?(y==="^"||y==="!")&&(u=!0):y==="]"&&!(p===d+2&&u)&&(c=!1),g+=y;continue}else if(y==="["){c=!0,d=p,u=!1,g+=y;continue}if(!i.noext&&QN(y)&&t.charAt(p)==="("&&(s<=a||n&&n.#y(y))){let b=n&&n.#y(y)?0:1;h.push(g),g="";let x=new fs(y,h);h.push(x),p=fs.#m(t,x,p,i,s+b);continue}if(y==="|"){h.push(g),g="",f.push(h),h=new fs(null,n);continue}if(y===")")return g===""&&n.#t.length===0&&(n.#c=!0),h.push(g),g="",n.push(...f,h),p;g+=y}return n.type=null,n.#n=void 0,n.#t=[t.substring(r-1)],p}#N(t){return this.#g(t,dze)}#g(t,n=cze){if(!t||typeof t!="object"||t.type!==null||t.#t.length!==1||this.type===null)return!1;let r=t.#t[0];return!r||typeof r!="object"||r.type===null?!1:this.#y(r.type,n)}#y(t,n=uze){return!!n.get(this.type)?.includes(t)}#p(t,n){let r=t.#t[0],i=new fs(null,r,this.options);i.#t.push(""),r.push(i),this.#_(t,n)}#_(t,n){let r=t.#t[0];this.#t.splice(n,1,...r.#t);for(let i of r.#t)typeof i=="object"&&(i.#i=this);this.#a=void 0}#I(t){return!!Nre.get(this.type)?.has(t)}#P(t){if(!t||typeof t!="object"||t.type!==null||t.#t.length!==1||this.type===null||this.#t.length!==1)return!1;let n=t.#t[0];return!n||typeof n!="object"||n.type===null?!1:this.#I(n.type)}#v(t){let n=Nre.get(this.type),r=t.#t[0],i=n?.get(r.type);if(!i)return!1;this.#t=r.#t;for(let s of this.#t)typeof s=="object"&&(s.#i=this);this.type=i,this.#a=void 0,this.#c=!1}static fromGlob(t,n={}){let r=new fs(null,void 0,n);return fs.#m(t,r,0,n,0),r}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let t=this.toString(),[n,r,i,s]=this.toRegExpSource();if(!(i||this.#n||this.#l.nocase&&!this.#l.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return r;let l=(this.#l.nocase?"i":"")+(s?"u":"");return Object.assign(new RegExp(`^${n}$`,l),{_src:n,_glob:t})}get options(){return this.#l}toRegExpSource(t){let n=t??!!this.#l.dot;if(this.#e===this&&(this.#f(),this.#k()),!Ore(this)){let c=this.isStart()&&this.isEnd()&&!this.#t.some(f=>typeof f!="string"),d=this.#t.map(f=>{let[g,y,v,b]=typeof f=="string"?fs.#T(f,this.#n,c):f.toRegExpSource(t);return this.#n=this.#n||v,this.#r=this.#r||b,g}).join(""),u="";if(this.isStart()&&typeof this.#t[0]=="string"&&!(this.#t.length===1&&hze.has(this.#t[0]))){let g=fze,y=n&&g.has(d.charAt(0))||d.startsWith("\\.")&&g.has(d.charAt(2))||d.startsWith("\\.\\.")&&g.has(d.charAt(4)),v=!n&&!t&&g.has(d.charAt(0));u=y?pze:v?WS:""}let p="";return this.isEnd()&&this.#e.#u&&this.#i?.type==="!"&&(p="(?:$|\\/)"),[u+d+p,qc(d),this.#n=!!this.#n,this.#r]}let r=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:",s=this.#x(n);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){let c=this.toString(),d=this;return d.#t=[c],d.type=null,d.#n=void 0,[c,qc(this.toString()),!1,!1]}let a=!r||t||n||!WS?"":this.#x(!0);a===s&&(a=""),a&&(s=`(?:${s})(?:${a})*?`);let l="";if(this.type==="!"&&this.#c)l=(this.isStart()&&!n?WS:"")+Dre;else{let c=this.type==="!"?"))"+(this.isStart()&&!n&&!t?WS:"")+Pre+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&a?")":this.type==="*"&&a?")?":`)${this.type}`;l=i+s+c}return[l,qc(s),this.#n=!!this.#n,this.#r]}#f(){if(Ore(this)){let t=0,n=!1;do{n=!0;for(let r=0;r<this.#t.length;r++){let i=this.#t[r];typeof i=="object"&&(i.#f(),this.#g(i)?(n=!1,this.#_(i,r)):this.#N(i)?(n=!1,this.#p(i,r)):this.#P(i)&&(n=!1,this.#v(i)))}}while(!n&&++t<10)}else for(let t of this.#t)typeof t=="object"&&t.#f();this.#a=void 0}#x(t){return this.#t.map(n=>{if(typeof n=="string")throw new Error("string type in extglob ast??");let[r,i,s,a]=n.toRegExpSource(t);return this.#r=this.#r||a,r}).filter(n=>!(this.isStart()&&this.isEnd())||!!n).join("|")}static#T(t,n,r=!1){let i=!1,s="",a=!1,l=!1;for(let c=0;c<t.length;c++){let d=t.charAt(c);if(i){i=!1,s+=(mze.has(d)?"\\":"")+d;continue}if(d==="*"){if(l)continue;l=!0,s+=r&&/^[*]+$/.test(t)?Dre:Pre,n=!0;continue}else l=!1;if(d==="\\"){c===t.length-1?s+="\\\\":i=!0;continue}if(d==="["){let[u,p,h,f]=$re(t,c);if(h){s+=u,a=a||p,c+=h-1,n=n||f;continue}}if(d==="?"){s+=e8,n=!0;continue}s+=gze(d)}return[s,qc(t),!!n,a]}};fs=wu;var t8=o((e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!1}={})=>n?t?e.replace(/[?*()[\]{}]/g,"[$&]"):e.replace(/[?*()[\]\\{}]/g,"\\$&"):t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&"),"escape");var ui=o((e,t,n={})=>(N0(t),!n.nocomment&&t.charAt(0)==="#"?!1:new Zf(t,n).match(e)),"minimatch"),vze=/^\*+([^+@!?*[(]*)$/,xze=o(e=>t=>!t.startsWith(".")&&t.endsWith(e),"starDotExtTest"),bze=o(e=>t=>t.endsWith(e),"starDotExtTestDot"),wze=o(e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),"starDotExtTestNocase"),Sze=o(e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),"starDotExtTestNocaseDot"),Eze=/^\*+\.\*+$/,kze=o(e=>!e.startsWith(".")&&e.includes("."),"starDotStarTest"),_ze=o(e=>e!=="."&&e!==".."&&e.includes("."),"starDotStarTestDot"),Ize=/^\.\*+$/,Tze=o(e=>e!=="."&&e!==".."&&e.startsWith("."),"dotStarTest"),Aze=/^\*+$/,Cze=o(e=>e.length!==0&&!e.startsWith("."),"starTest"),Rze=o(e=>e.length!==0&&e!=="."&&e!=="..","starTestDot"),$ze=/^\?+([^+@!?*[(]*)?$/,Oze=o(([e,t=""])=>{let n=Fre([e]);return t?(t=t.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(t)):n},"qmarksTestNocase"),Nze=o(([e,t=""])=>{let n=jre([e]);return t?(t=t.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(t)):n},"qmarksTestNocaseDot"),Pze=o(([e,t=""])=>{let n=jre([e]);return t?r=>n(r)&&r.endsWith(t):n},"qmarksTestDot"),Dze=o(([e,t=""])=>{let n=Fre([e]);return t?r=>n(r)&&r.endsWith(t):n},"qmarksTest"),Fre=o(([e])=>{let t=e.length;return n=>n.length===t&&!n.startsWith(".")},"qmarksTestNoExt"),jre=o(([e])=>{let t=e.length;return n=>n.length===t&&n!=="."&&n!==".."},"qmarksTestNoExtDot"),qre=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",Mre={win32:{sep:"\\"},posix:{sep:"/"}},Mze=qre==="win32"?Mre.win32.sep:Mre.posix.sep;ui.sep=Mze;var Fi=Symbol("globstar **");ui.GLOBSTAR=Fi;var Lze="[^/]",Fze=Lze+"*?",jze="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",qze="(?:(?!(?:\\/|^)\\.).)*?",Uze=o((e,t={})=>n=>ui(n,e,t),"filter");ui.filter=Uze;var na=o((e,t={})=>Object.assign({},e,t),"ext"),Bze=o(e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return ui;let t=ui;return Object.assign(o((r,i,s={})=>t(r,i,na(e,s)),"m"),{Minimatch:class extends t.Minimatch{static{o(this,"Minimatch")}constructor(i,s={}){super(i,na(e,s))}static defaults(i){return t.defaults(na(e,i)).Minimatch}},AST:class extends t.AST{static{o(this,"AST")}constructor(i,s,a={}){super(i,s,na(e,a))}static fromGlob(i,s={}){return t.AST.fromGlob(i,na(e,s))}},unescape:o((r,i={})=>t.unescape(r,na(e,i)),"unescape"),escape:o((r,i={})=>t.escape(r,na(e,i)),"escape"),filter:o((r,i={})=>t.filter(r,na(e,i)),"filter"),defaults:o(r=>t.defaults(na(e,r)),"defaults"),makeRe:o((r,i={})=>t.makeRe(r,na(e,i)),"makeRe"),braceExpand:o((r,i={})=>t.braceExpand(r,na(e,i)),"braceExpand"),match:o((r,i,s={})=>t.match(r,i,na(e,s)),"match"),sep:t.sep,GLOBSTAR:Fi})},"defaults");ui.defaults=Bze;var Ure=o((e,t={})=>(N0(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:Cre(e,{max:t.braceExpandMax})),"braceExpand");ui.braceExpand=Ure;var zze=o((e,t={})=>new Zf(e,t).makeRe(),"makeRe");ui.makeRe=zze;var Wze=o((e,t,n={})=>{let r=new Zf(t,n);return e=e.filter(i=>r.match(i)),r.options.nonull&&!e.length&&e.push(t),e},"match");ui.match=Wze;var Lre=/[?*]|[+@!]\(.*?\)|\[|\]/,Hze=o(e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),Zf=class{static{o(this,"Minimatch")}options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(t,n={}){N0(t),n=n||{},this.options=n,this.maxGlobstarRecursion=n.maxGlobstarRecursion??200,this.pattern=t,this.platform=n.platform||qre,this.isWindows=this.platform==="win32";let r="allowWindowsEscape";this.windowsPathsNoEscape=!!n.windowsPathsNoEscape||n[r]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!n.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!n.nonegate,this.comment=!1,this.empty=!1,this.partial=!!n.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=n.windowsNoMagicRoot!==void 0?n.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let n of t)if(typeof n!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,n=this.options;if(!n.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],n.debug&&(this.debug=(...s)=>console.error(...s)),this.debug(this.pattern,this.globSet);let r=this.globSet.map(s=>this.slashSplit(s));this.globParts=this.preprocess(r),this.debug(this.pattern,this.globParts);let i=this.globParts.map((s,a,l)=>{if(this.isWindows&&this.windowsNoMagicRoot){let c=s[0]===""&&s[1]===""&&(s[2]==="?"||!Lre.test(s[2]))&&!Lre.test(s[3]),d=/^[a-z]:/i.test(s[0]);if(c)return[...s.slice(0,4),...s.slice(4).map(u=>this.parse(u))];if(d)return[s[0],...s.slice(1).map(u=>this.parse(u))]}return s.map(c=>this.parse(c))});if(this.debug(this.pattern,i),this.set=i.filter(s=>s.indexOf(!1)===-1),this.isWindows)for(let s=0;s<this.set.length;s++){let a=this.set[s];a[0]===""&&a[1]===""&&this.globParts[s][2]==="?"&&typeof a[3]=="string"&&/^[a-z]:$/i.test(a[3])&&(a[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let r of t)for(let i=0;i<r.length;i++)r[i]==="**"&&(r[i]="*");let{optimizationLevel:n=1}=this.options;return n>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):n>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(n=>{let r=-1;for(;(r=n.indexOf("**",r+1))!==-1;){let i=r;for(;n[i+1]==="**";)i++;i!==r&&n.splice(r,i-r)}return n})}levelOneOptimize(t){return t.map(n=>(n=n.reduce((r,i)=>{let s=r[r.length-1];return i==="**"&&s==="**"?r:i===".."&&s&&s!==".."&&s!=="."&&s!=="**"?(r.pop(),r):(r.push(i),r)},[]),n.length===0?[""]:n))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let n=!1;do{if(n=!1,!this.preserveMultipleSlashes){for(let i=1;i<t.length-1;i++){let s=t[i];i===1&&s===""&&t[0]===""||(s==="."||s==="")&&(n=!0,t.splice(i,1),i--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(n=!0,t.pop())}let r=0;for(;(r=t.indexOf("..",r+1))!==-1;){let i=t[r-1];i&&i!=="."&&i!==".."&&i!=="**"&&!(this.isWindows&&/^[a-z]:$/i.test(i))&&(n=!0,t.splice(r-1,2),r-=2)}}while(n);return t.length===0?[""]:t}firstPhasePreProcess(t){let n=!1;do{n=!1;for(let r of t){let i=-1;for(;(i=r.indexOf("**",i+1))!==-1;){let a=i;for(;r[a+1]==="**";)a++;a>i&&r.splice(i+1,a-i);let l=r[i+1],c=r[i+2],d=r[i+3];if(l!==".."||!c||c==="."||c===".."||!d||d==="."||d==="..")continue;n=!0,r.splice(i,1);let u=r.slice(0);u[i]="**",t.push(u),i--}if(!this.preserveMultipleSlashes){for(let a=1;a<r.length-1;a++){let l=r[a];a===1&&l===""&&r[0]===""||(l==="."||l==="")&&(n=!0,r.splice(a,1),a--)}r[0]==="."&&r.length===2&&(r[1]==="."||r[1]==="")&&(n=!0,r.pop())}let s=0;for(;(s=r.indexOf("..",s+1))!==-1;){let a=r[s-1];if(a&&a!=="."&&a!==".."&&a!=="**"){n=!0;let c=s===1&&r[s+1]==="**"?["."]:[];r.splice(s-1,2,...c),r.length===0&&r.push(""),s-=2}}}}while(n);return t}secondPhasePreProcess(t){for(let n=0;n<t.length-1;n++)for(let r=n+1;r<t.length;r++){let i=this.partsMatch(t[n],t[r],!this.preserveMultipleSlashes);if(i){t[n]=[],t[r]=i;break}}return t.filter(n=>n.length)}partsMatch(t,n,r=!1){let i=0,s=0,a=[],l="";for(;i<t.length&&s<n.length;)if(t[i]===n[s])a.push(l==="b"?n[s]:t[i]),i++,s++;else if(r&&t[i]==="**"&&n[s]===t[i+1])a.push(t[i]),i++;else if(r&&n[s]==="**"&&t[i]===n[s+1])a.push(n[s]),s++;else if(t[i]==="*"&&n[s]&&(this.options.dot||!n[s].startsWith("."))&&n[s]!=="**"){if(l==="b")return!1;l="a",a.push(t[i]),i++,s++}else if(n[s]==="*"&&t[i]&&(this.options.dot||!t[i].startsWith("."))&&t[i]!=="**"){if(l==="a")return!1;l="b",a.push(n[s]),i++,s++}else return!1;return t.length===n.length&&a}parseNegate(){if(this.nonegate)return;let t=this.pattern,n=!1,r=0;for(let i=0;i<t.length&&t.charAt(i)==="!";i++)n=!n,r++;r&&(this.pattern=t.slice(r)),this.negate=n}matchOne(t,n,r=!1){let i=0,s=0;if(this.isWindows){let l=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),c=!l&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),d=typeof n[0]=="string"&&/^[a-z]:$/i.test(n[0]),u=!d&&n[0]===""&&n[1]===""&&n[2]==="?"&&typeof n[3]=="string"&&/^[a-z]:$/i.test(n[3]),p=c?3:l?0:void 0,h=u?3:d?0:void 0;if(typeof p=="number"&&typeof h=="number"){let[f,g]=[t[p],n[h]];f.toLowerCase()===g.toLowerCase()&&(n[h]=f,s=h,i=p)}}let{optimizationLevel:a=1}=this.options;return a>=2&&(t=this.levelTwoFileOptimize(t)),n.includes(Fi)?this.#e(t,n,r,i,s):this.#r(t,n,r,i,s)}#e(t,n,r,i,s){let a=n.indexOf(Fi,s),l=n.lastIndexOf(Fi),[c,d,u]=r?[n.slice(s,a),n.slice(a+1),[]]:[n.slice(s,a),n.slice(a+1,l),n.slice(l+1)];if(c.length){let x=t.slice(i,i+c.length);if(!this.#r(x,c,r,0,0))return!1;i+=c.length,s+=c.length}let p=0;if(u.length){if(u.length+i>t.length)return!1;let x=t.length-u.length;if(this.#r(t,u,r,x,0))p=u.length;else{if(t[t.length-1]!==""||i+u.length===t.length||(x--,!this.#r(t,u,r,x,0)))return!1;p=u.length+1}}if(!d.length){let x=!!p;for(let w=i;w<t.length-p;w++){let S=String(t[w]);if(x=!0,S==="."||S===".."||!this.options.dot&&S.startsWith("."))return!1}return r||x}let h=[[[],0]],f=h[0],g=0,y=[0];for(let x of d)x===Fi?(y.push(g),f=[[],0],h.push(f)):(f[0].push(x),g++);let v=h.length-1,b=t.length-p;for(let x of h)x[1]=b-(y[v--]+x[0].length);return!!this.#n(t,h,i,0,r,0,!!p)}#n(t,n,r,i,s,a,l){let c=n[i];if(!c){for(let p=r;p<t.length;p++){l=!0;let h=t[p];if(h==="."||h===".."||!this.options.dot&&h.startsWith("."))return!1}return l}let[d,u]=c;for(;r<=u;){if(this.#r(t.slice(0,r+d.length),d,s,r,0)&&a<this.maxGlobstarRecursion){let f=this.#n(t,n,r+d.length,i+1,s,a+1,l);if(f!==!1)return f}let h=t[r];if(h==="."||h===".."||!this.options.dot&&h.startsWith("."))return!1;r++}return s||null}#r(t,n,r,i,s){let a,l,c,d;for(a=i,l=s,d=t.length,c=n.length;a<d&&l<c;a++,l++){this.debug("matchOne loop");let u=n[l],p=t[a];if(this.debug(n,u,p),u===!1||u===Fi)return!1;let h;if(typeof u=="string"?(h=p===u,this.debug("string match",u,p,h)):(h=u.test(p),this.debug("pattern match",u,p,h)),!h)return!1}if(a===d&&l===c)return!0;if(a===d)return r;if(l===c)return a===d-1&&t[a]==="";throw new Error("wtf?")}braceExpand(){return Ure(this.pattern,this.options)}parse(t){N0(t);let n=this.options;if(t==="**")return Fi;if(t==="")return"";let r,i=null;(r=t.match(Aze))?i=n.dot?Rze:Cze:(r=t.match(vze))?i=(n.nocase?n.dot?Sze:wze:n.dot?bze:xze)(r[1]):(r=t.match($ze))?i=(n.nocase?n.dot?Nze:Oze:n.dot?Pze:Dze)(r):(r=t.match(Eze))?i=n.dot?_ze:kze:(r=t.match(Ize))&&(i=Tze);let s=wu.fromGlob(t,this.options).toMMPattern();return i&&typeof s=="object"&&Reflect.defineProperty(s,"test",{value:i}),s}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let n=this.options,r=n.noglobstar?Fze:n.dot?jze:qze,i=new Set(n.nocase?["i"]:[]),s=t.map(c=>{let d=c.map(p=>{if(p instanceof RegExp)for(let h of p.flags.split(""))i.add(h);return typeof p=="string"?Hze(p):p===Fi?Fi:p._src});d.forEach((p,h)=>{let f=d[h+1],g=d[h-1];p!==Fi||g===Fi||(g===void 0?f!==void 0&&f!==Fi?d[h+1]="(?:\\/|"+r+"\\/)?"+f:d[h]=r:f===void 0?d[h-1]=g+"(?:\\/|\\/"+r+")?":f!==Fi&&(d[h-1]=g+"(?:\\/|\\/"+r+"\\/)"+f,d[h+1]=Fi))});let u=d.filter(p=>p!==Fi);if(this.partial&&u.length>=1){let p=[];for(let h=1;h<=u.length;h++)p.push(u.slice(0,h).join("/"));return"(?:"+p.join("|")+")"}return u.join("/")}).join("|"),[a,l]=t.length>1?["(?:",")"]:["",""];s="^"+a+s+l+"$",this.partial&&(s="^(?:\\/|"+a+s.slice(1,-1)+l+")$"),this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,n=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&n)return!0;let r=this.options;this.isWindows&&(t=t.split("\\").join("/"));let i=this.slashSplit(t);this.debug(this.pattern,"split",i);let s=this.set;this.debug(this.pattern,"set",s);let a=i[i.length-1];if(!a)for(let l=i.length-2;!a&&l>=0;l--)a=i[l];for(let l of s){let c=i;if(r.matchBase&&l.length===1&&(c=[a]),this.matchOne(c,l,n))return r.flipNegate?!0:!this.negate}return r.flipNegate?!1:this.negate}static defaults(t){return ui.defaults(t).Minimatch}};ui.AST=wu;ui.Minimatch=Zf;ui.escape=t8;ui.unescape=qc;import{gunzipSync as JHe}from"node:zlib";var D0=class{static{o(this,"Diff")}diff(t,n,r={}){let i;typeof r=="function"?(i=r,r={}):"callback"in r&&(i=r.callback);let s=this.castInput(t,r),a=this.castInput(n,r),l=this.removeEmpty(this.tokenize(s,r)),c=this.removeEmpty(this.tokenize(a,r));return this.diffWithOptionsObj(l,c,r,i)}diffWithOptionsObj(t,n,r,i){var s;let a=o(x=>{if(x=this.postProcess(x,r),i){setTimeout(function(){i(x)},0);return}else return x},"done"),l=n.length,c=t.length,d=1,u=l+c;r.maxEditLength!=null&&(u=Math.min(u,r.maxEditLength));let p=(s=r.timeout)!==null&&s!==void 0?s:1/0,h=Date.now()+p,f=[{oldPos:-1,lastComponent:void 0}],g=this.extractCommon(f[0],n,t,0,r);if(f[0].oldPos+1>=c&&g+1>=l)return a(this.buildValues(f[0].lastComponent,n,t));let y=-1/0,v=1/0,b=o(()=>{for(let x=Math.max(y,-d);x<=Math.min(v,d);x+=2){let w,S=f[x-1],E=f[x+1];S&&(f[x-1]=void 0);let k=!1;if(E){let O=E.oldPos-x;k=E&&0<=O&&O<l}let _=S&&S.oldPos+1<c;if(!k&&!_){f[x]=void 0;continue}if(!_||k&&S.oldPos<E.oldPos?w=this.addToPath(E,!0,!1,0,r):w=this.addToPath(S,!1,!0,1,r),g=this.extractCommon(w,n,t,x,r),w.oldPos+1>=c&&g+1>=l)return a(this.buildValues(w.lastComponent,n,t))||!0;f[x]=w,w.oldPos+1>=c&&(v=Math.min(v,x-1)),g+1>=l&&(y=Math.max(y,x+1))}d++},"execEditLength");if(i)o(function x(){setTimeout(function(){if(d>u||Date.now()>h)return i(void 0);b()||x()},0)},"exec")();else for(;d<=u&&Date.now()<=h;){let x=b();if(x)return x}}addToPath(t,n,r,i,s){let a=t.lastComponent;return a&&!s.oneChangePerToken&&a.added===n&&a.removed===r?{oldPos:t.oldPos+i,lastComponent:{count:a.count+1,added:n,removed:r,previousComponent:a.previousComponent}}:{oldPos:t.oldPos+i,lastComponent:{count:1,added:n,removed:r,previousComponent:a}}}extractCommon(t,n,r,i,s){let a=n.length,l=r.length,c=t.oldPos,d=c-i,u=0;for(;d+1<a&&c+1<l&&this.equals(r[c+1],n[d+1],s);)d++,c++,u++,s.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return u&&!s.oneChangePerToken&&(t.lastComponent={count:u,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=c,d}equals(t,n,r){return r.comparator?r.comparator(t,n):t===n||!!r.ignoreCase&&t.toLowerCase()===n.toLowerCase()}removeEmpty(t){let n=[];for(let r=0;r<t.length;r++)t[r]&&n.push(t[r]);return n}castInput(t,n){return t}tokenize(t,n){return Array.from(t)}join(t){return t.join("")}postProcess(t,n){return t}get useLongestToken(){return!1}buildValues(t,n,r){let i=[],s;for(;t;)i.push(t),s=t.previousComponent,delete t.previousComponent,t=s;i.reverse();let a=i.length,l=0,c=0,d=0;for(;l<a;l++){let u=i[l];if(u.removed)u.value=this.join(r.slice(d,d+u.count)),d+=u.count;else{if(!u.added&&this.useLongestToken){let p=n.slice(c,c+u.count);p=p.map(function(h,f){let g=r[d+f];return g.length>h.length?g:h}),u.value=this.join(p)}else u.value=this.join(n.slice(c,c+u.count));c+=u.count,u.added||(d+=u.count)}}return i}};var n8=class extends D0{static{o(this,"LineDiff")}constructor(){super(...arguments),this.tokenize=Gze}equals(t,n,r){return r.ignoreWhitespace?((!r.newlineIsToken||!t.includes(`
|
|
4312
|
+
`}o(bre,"pageStyles");var GN={name:"dsh-edge",version:"0.15.0",description:"Your DeepSeek Harness, anywhere \u2014 deploy a persistent personal coding agent to Cloudflare Workers in one command",author:"pawaca",license:"MIT",type:"module",bin:{"dsh-edge":"scripts/cli.mjs"},files:["dist","worker","scripts/*.d.mts","scripts/*.mjs","wrangler.jsonc","README.md","README.zh.md","LICENSE","THIRD_PARTY_NOTICES.md"],repository:{type:"git",url:"git+https://github.com/pawaca/dsh-edge.git",directory:"apps/dsh-edge"},homepage:"https://github.com/pawaca/dsh-edge#readme",bugs:{url:"https://github.com/pawaca/dsh-edge/issues"},keywords:["deepseek","deepseek-harness","ai-agents","byok","cloudflare-workers","durable-objects","self-hosted"],engines:{node:">=22.14.0"},publishConfig:{access:"public"},dshEdge:{upstreamVersion:"0.1.5-rc.2"},scripts:{"bundle:direct":"pnpm run web:build && pnpm --dir standalone run build:worker:direct && node standalone/scripts/promote.mjs direct","bundle:isolated":"pnpm run web:build && pnpm --dir standalone run build:worker:isolated && node standalone/scripts/promote.mjs isolated","bundle:workers":"pnpm --dir standalone run build && pnpm --dir standalone run verify && node standalone/scripts/promote.mjs all",dev:"pnpm run bundle:direct && node scripts/dev.mjs direct","dev:isolated":"pnpm run bundle:isolated && node scripts/dev.mjs isolated","dsh-edge":"node scripts/cli.mjs","example:install":"node examples/install-keyless.mjs","install:cloudflare":"pnpm run bundle:workers && node scripts/cli.mjs install","legal:write":"node scripts/legal-files.mjs write","pack:verify":"node scripts/verify-packed.mjs",prepack:"node scripts/legal-files.mjs verify && pnpm run bundle:workers","web:build":"pnpm --dir standalone run build:web && node standalone/scripts/promote.mjs web",test:"vitest run --root ../.. --project edge-runtime","test:integration":"pnpm run bundle:workers && node tests/run-session-integration.mjs","test:snapshot":"vitest run --root ../.. --config apps/dsh-edge/vitest.snapshot.config.ts",typecheck:"tsc --noEmit"},dependencies:{"@clack/prompts":"1.7.0","compare-versions":"6.1.1",execa:"^10.0.1","jsonc-parser":"^3.3.1",wrangler:"4.129.0"},devDependencies:{"@cloudflare/computer":"0.2.1","@cloudflare/workers-types":"5.20260904.1","@deepseek-ai/cordis":"4.0.2","@deepseek-ai/dsh-agent":"0.1.5-rc.2","@deepseek-ai/dsh-agent-loop":"0.1.5-rc.2","@deepseek-ai/dsh-anonymous-user-id":"0.1.5-rc.2","@deepseek-ai/dsh-api-gateway":"0.1.5-rc.2","@deepseek-ai/dsh-api-remotes":"0.1.5-rc.2","@deepseek-ai/dsh-api-session-controller":"0.1.5-rc.2","@deepseek-ai/dsh-api-settings-controller":"0.1.5-rc.2","@deepseek-ai/dsh-api-workspace-controller":"0.1.5-rc.2","@deepseek-ai/dsh-api-workspace-files":"0.1.5-rc.2","@deepseek-ai/dsh-attachment":"0.1.5-rc.2","@deepseek-ai/dsh-brand":"0.1.5-rc.2","@deepseek-ai/dsh-client-store":"0.1.5-rc.2","@deepseek-ai/dsh-commands":"0.1.5-rc.2","@deepseek-ai/dsh-compaction":"0.1.5-rc.2","@deepseek-ai/dsh-compaction-basic":"0.1.5-rc.2","@deepseek-ai/dsh-compaction-tool-result-pruner":"0.1.5-rc.2","@deepseek-ai/dsh-credentials":"0.1.5-rc.2","@deepseek-ai/dsh-file-reference":"0.1.5-rc.2","@deepseek-ai/dsh-fs":"0.1.5-rc.2","@deepseek-ai/dsh-goal":"0.1.5-rc.2","@deepseek-ai/dsh-goal-round-driver":"0.1.5-rc.2","@deepseek-ai/dsh-host-directory-picker":"0.1.5-rc.2","@deepseek-ai/dsh-jobs":"0.1.5-rc.2","@deepseek-ai/dsh-jobs-local":"0.1.5-rc.2","@deepseek-ai/dsh-host-plugin-inventory":"0.1.5-rc.2","@deepseek-ai/dsh-launch-environment":"0.1.5-rc.2","@deepseek-ai/dsh-llm":"0.1.5-rc.2","@deepseek-ai/dsh-llm-deepseek":"0.1.5-rc.2","@deepseek-ai/dsh-message-feedback":"0.1.5-rc.2","@deepseek-ai/dsh-output-retention":"0.1.5-rc.2","@deepseek-ai/dsh-plan-mode":"0.1.5-rc.2","@deepseek-ai/dsh-sandbox":"0.1.5-rc.2","@deepseek-ai/dsh-scope":"0.1.5-rc.2","@deepseek-ai/dsh-schedule":"0.1.5-rc.2","@deepseek-ai/dsh-session":"0.1.5-rc.2","@deepseek-ai/dsh-session-format":"0.1.5-rc.2","@deepseek-ai/dsh-session-format-catalog":"0.1.5-rc.2","@deepseek-ai/dsh-session-format-v0-to-v1":"0.1.5-rc.2","@deepseek-ai/dsh-session-format-v1-to-v2":"0.1.5-rc.2","@deepseek-ai/dsh-session-format-v2-to-v3":"0.1.5-rc.2","@deepseek-ai/dsh-session-persistence":"0.1.5-rc.2","@deepseek-ai/dsh-session-projection":"0.1.5-rc.2","@deepseek-ai/dsh-session-projection-cache":"0.1.5-rc.2","@deepseek-ai/dsh-session-query":"0.1.5-rc.2","@deepseek-ai/dsh-session-reference":"0.1.5-rc.2","@deepseek-ai/dsh-session-title":"0.1.5-rc.2","@deepseek-ai/dsh-session-title-first-prompt-llm":"0.1.5-rc.2","@deepseek-ai/dsh-session-title-llm":"0.1.5-rc.2","@deepseek-ai/dsh-settings":"0.1.5-rc.2","@deepseek-ai/dsh-skill":"0.1.5-rc.2","@deepseek-ai/dsh-subagent":"0.1.5-rc.2","@deepseek-ai/dsh-subagent-in-process-driver":"0.1.5-rc.2","@deepseek-ai/dsh-subagent-spawn-in-process":"0.1.5-rc.2","@deepseek-ai/dsh-tool-subagent":"0.1.5-rc.2","@deepseek-ai/dsh-spill":"0.1.5-rc.2","@deepseek-ai/dsh-spill-policy":"0.1.5-rc.2","@deepseek-ai/dsh-storage":"0.1.5-rc.2","@deepseek-ai/dsh-storage-domain":"0.1.5-rc.2","@deepseek-ai/dsh-system-prompt":"0.1.5-rc.2","@deepseek-ai/dsh-timeout":"0.1.5-rc.2","@deepseek-ai/dsh-token-meter":"0.1.5-rc.2","@deepseek-ai/dsh-tool-ask-user":"0.1.5-rc.2","@deepseek-ai/dsh-tool-call-timeout-policy":"0.1.5-rc.2","@deepseek-ai/dsh-tool-fs":"0.1.5-rc.2","@deepseek-ai/dsh-tool-goal":"0.1.5-rc.2","@deepseek-ai/dsh-tool-jobs":"0.1.5-rc.2","@deepseek-ai/dsh-tool-skill":"0.1.5-rc.2","@deepseek-ai/dsh-tool-web":"0.1.5-rc.2","@deepseek-ai/dsh-tools":"0.1.5-rc.2","@deepseek-ai/dsh-typert-protocol":"0.1.5-rc.2","@deepseek-ai/dsh-typert-registry":"0.1.5-rc.2","@deepseek-ai/dsh-user-questions":"0.1.5-rc.2","@deepseek-ai/dsh-util-values":"0.1.5-rc.2","@deepseek-ai/dsh-web":"0.1.5-rc.2","@deepseek-ai/dsh-web-fetch-http":"0.1.5-rc.2","@deepseek-ai/dsh-web-search-deepseek":"0.1.5-rc.2","@deepseek-ai/dsh-workspace":"0.1.5-rc.2","@mixmark-io/domino":"2.2.0","fast-png":"8.0.0","jpeg-js":"0.4.4","just-bash":"3.4.2",playwright:"^1.49.0",typescript:"^6.0.3",vitest:"^4.1.8",ws:"^8.21.0"}};var US=GN.version,wre=GN.dshEdge.upstreamVersion;function LBe(){return"dsh-edge@0.15.0/direct"}o(LBe,"resolveEdgeDeploymentId");function $0(e){return{baseURL:oO(e.DEEPSEEK_BASE_URL),maxTokens:dO(e.DEEPSEEK_MAX_OUTPUT_TOKENS),model:Xd(e.DEEPSEEK_MODEL),reasoningEffort:lO(e.DEEPSEEK_REASONING_EFFORT),searchBaseURL:tS(e.DEEPSEEK_SEARCH_BASE_URL),streamIdleTimeoutMs:cO(e.DEEPSEEK_STREAM_IDLE_TIMEOUT_MS),commandTimeoutPolicy:T0(e.DSH_EDGE_DEFAULT_COMMAND_TIMEOUT_MS,e.DSH_EDGE_MAX_COMMAND_TIMEOUT_MS)}}o($0,"resolveEdgeDeploymentConfig");function FBe(e){return typeof e.DEEPSEEK_API_KEY=="string"&&e.DEEPSEEK_API_KEY.trim().length>0}o(FBe,"edgeDeploymentApiKeyConfigured");function jBe(e){let t=oO(e),n=new URL(t);return n.search.length===0&&n.hash.length===0?t:(n.search="",n.hash="",n.href)}o(jBe,"projectedEdgeBaseURL");function ZN(e,t){return{shell:e.LOADER===void 0?"just-bash-direct":"just-bash-isolated",storage:"durable-object-sqlite-vfs",attachmentStorage:t??(e.DSH_EDGE_ATTACHMENTS===void 0?"temporary-do":"private-r2"),deploymentId:LBe(),apiKeyConfigured:FBe(e),baseURL:jBe(e.DEEPSEEK_BASE_URL),maxTokens:dO(e.DEEPSEEK_MAX_OUTPUT_TOKENS),model:Xd(e.DEEPSEEK_MODEL),reasoningEffort:lO(e.DEEPSEEK_REASONING_EFFORT),searchBaseURL:tS(e.DEEPSEEK_SEARCH_BASE_URL),streamIdleTimeoutMs:cO(e.DEEPSEEK_STREAM_IDLE_TIMEOUT_MS),commandTimeoutPolicy:T0(e.DSH_EDGE_DEFAULT_COMMAND_TIMEOUT_MS,e.DSH_EDGE_MAX_COMMAND_TIMEOUT_MS)}}o(ZN,"resolveEdgeDeploymentProfile");function BS(e){$0(e);let t=ZN(e);return{ok:!0,service:"dsh-edge",storage:t.storage,attachmentStorage:t.attachmentStorage,shell:t.shell,agent:"upstream-react-loop-agent",access:"single-owner-cookie",deploymentId:t.deploymentId,...e.CF_VERSION_METADATA===void 0?{}:{workerVersionId:e.CF_VERSION_METADATA.id},version:US,upstreamVersion:wre,status:"ready"}}o(BS,"resolveEdgeDeploymentHealth");import{AsyncLocalStorage as Kst}from"node:async_hooks";import{WorkerEntrypoint as r4t}from"cloudflare:workers";var Yu=od(Sre());var KN=o((e,t,n)=>{let r=e instanceof RegExp?Ere(e,n):e,i=t instanceof RegExp?Ere(t,n):t,s=r!==null&&i!=null&&qBe(r,i,n);return s&&{start:s[0],end:s[1],pre:n.slice(0,s[0]),body:n.slice(s[0]+r.length,s[1]),post:n.slice(s[1]+i.length)}},"balanced"),Ere=o((e,t)=>{let n=t.match(e);return n?n[0]:null},"maybeMatch"),qBe=o((e,t,n)=>{let r,i,s,a,l,c=n.indexOf(e),d=n.indexOf(t,c+1),u=c;if(c>=0&&d>0){if(e===t)return[c,d];for(r=[],s=n.length;u>=0&&!l;){if(u===c)r.push(u),c=n.indexOf(e,u+1);else if(r.length===1){let p=r.pop();p!==void 0&&(l=[p,d])}else i=r.pop(),i!==void 0&&i<s&&(s=i,a=d),d=n.indexOf(t,u+1);u=c<d&&c>=0?c:d}r.length&&a!==void 0&&(l=[s,a])}return l},"range");var kre="\0SLASH"+Math.random()+"\0",_re="\0OPEN"+Math.random()+"\0",YN="\0CLOSE"+Math.random()+"\0",Ire="\0COMMA"+Math.random()+"\0",Tre="\0PERIOD"+Math.random()+"\0",UBe=new RegExp(kre,"g"),BBe=new RegExp(_re,"g"),zBe=new RegExp(YN,"g"),WBe=new RegExp(Ire,"g"),HBe=new RegExp(Tre,"g"),VBe=/\\\\/g,GBe=/\\{/g,ZBe=/\\}/g,KBe=/\\,/g,JBe=/\\\./g,XBe=1e5,YBe=4e6;function JN(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}o(JN,"numeric");function QBe(e){return e.replace(VBe,kre).replace(GBe,_re).replace(ZBe,YN).replace(KBe,Ire).replace(JBe,Tre)}o(QBe,"escapeBraces");function eze(e){return e.replace(UBe,"\\").replace(BBe,"{").replace(zBe,"}").replace(WBe,",").replace(HBe,".")}o(eze,"unescapeBraces");function Are(e){if(!e)return[""];let t=[],n=KN("{","}",e);if(!n)return e.split(",");let{pre:r,body:i,post:s}=n,a=r.split(",");a[a.length-1]+="{"+i+"}";let l=Are(s);return s.length&&(a[a.length-1]+=l.shift(),a.push.apply(a,l)),t.push.apply(t,a),t}o(Are,"parseCommaParts");function Cre(e,t={}){if(!e)return[];let{max:n=XBe,maxLength:r=YBe}=t;return e.slice(0,2)==="{}"&&(e="\\{\\}"+e.slice(2)),XN(QBe(e),n,r,!0).map(eze)}o(Cre,"expand");function tze(e){return"{"+e+"}"}o(tze,"embrace");function nze(e){return/^-?0\d/.test(e)}o(nze,"isPadded");function rze(e,t){return e<=t}o(rze,"lte");function ize(e,t){return e>=t}o(ize,"gte");function O0(e,t,n,r,i,s){let a=[],l=0;for(let c=0;c<e.length;c++)for(let d=0;d<n.length;d++){if(a.length>=r)return a;let u=e[c]+t+n[d];if(!(s&&!u)){if(l+u.length>i)return a;a.push(u),l+=u.length}}return a}o(O0,"combine");function sze(e,t,n,r){let i=e.split(/\.\./),s=[];if(i[0]===void 0||i[1]===void 0)return s;let a=JN(i[0]),l=JN(i[1]),c=Math.max(i[0].length,i[1].length),d=i.length===3&&i[2]!==void 0?Math.max(Math.abs(JN(i[2])),1):1,u=rze;l<a&&(d*=-1,u=ize);let h=i.some(nze),f=0;for(let g=a;u(g,l)&&s.length<n;g+=d){let y;if(t)y=String.fromCharCode(g),y==="\\"&&(y="");else if(y=String(g),h){let v=c-y.length;if(v>0){let b=new Array(v+1).join("0");g<0?y="-"+b+y.slice(1):y=b+y}}if(f+y.length>r)break;s.push(y),f+=y.length}return s}o(sze,"expandSequence");function XN(e,t,n,r){let i=[""],s=!1,a=!0;for(;;){let l=KN("{","}",e);if(!l)return O0(i,e,[""],t,n,s);let c=l.pre;if(/\$$/.test(c)){if(i=O0(i,c+"{"+l.body+"}",[""],t,n,s&&!l.post.length),a=!1,!l.post.length)break;e=l.post;continue}let d=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(l.body),u=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(l.body),p=d||u,h=l.body.indexOf(",")>=0;if(!p&&!h){if(l.post.match(/,(?!,).*\}/)){e=l.pre+"{"+l.body+YN+l.post,r=!0;continue}return O0(i,c+"{"+l.body+"}"+l.post,[""],t,n,s)}a&&(s=r&&!p,a=!1);let f;if(p)f=sze(l.body,u,t,n);else{let g=Are(l.body);if(g.length===1&&g[0]!==void 0&&(g=XN(g[0],t,n,!1).map(tze),g.length===1)){if(i=O0(i,c+g[0],[""],t,n,s&&!l.post.length),!l.post.length)break;e=l.post;continue}let y=s&&!l.post.length&&!c;for(let b=0;y&&b<i.length;b++)i[b]&&(y=!1);f=[];let v=0;e:for(let b=0;b<g.length;b++){let x=XN(g[b],t,n,!1);for(let w=0;w<x.length;w++){let S=x[w];if(!(y&&!S)){if(f.length>=t||v+S.length>n)break e;f.push(S),v+=S.length}}}}if(i=O0(i,c,f,t,n,s&&!l.post.length),!l.post.length)break;e=l.post}return i}o(XN,"expand_");var N0=o(e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")},"assertValidPattern");var aze={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},P0=o(e=>e.replace(/[[\]\\-]/g,"\\$&"),"braceEscape"),oze=o(e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regexpEscape"),Rre=o(e=>e.join(""),"rangesToString"),$re=o((e,t)=>{let n=t;if(e.charAt(n)!=="[")throw new Error("not in a brace expression");let r=[],i=[],s=n+1,a=!1,l=!1,c=!1,d=!1,u=n,p="";e:for(;s<e.length;){let y=e.charAt(s);if((y==="!"||y==="^")&&s===n+1){d=!0,s++;continue}if(y==="]"&&a&&!c){u=s+1;break}if(a=!0,y==="\\"&&!c){c=!0,s++;continue}if(y==="["&&!c){for(let[v,[b,x,w]]of Object.entries(aze))if(e.startsWith(v,s)){if(p)return["$.",!1,e.length-n,!0];s+=v.length,w?i.push(b):r.push(b),l=l||x;continue e}}if(c=!1,p){y>p?r.push(P0(p)+"-"+P0(y)):y===p&&r.push(P0(y)),p="",s++;continue}if(e.startsWith("-]",s+1)){r.push(P0(y+"-")),s+=2;continue}if(e.startsWith("-",s+1)){p=y,s+=2;continue}r.push(P0(y)),s++}if(u<s)return["",!1,0,!1];if(!r.length&&!i.length)return["$.",!1,e.length-n,!0];if(i.length===0&&r.length===1&&/^\\?.$/.test(r[0])&&!d){let y=r[0].length===2?r[0].slice(-1):r[0];return[oze(y),!1,u-n,!1]}let h="["+(d?"^":"")+Rre(r)+"]",f="["+(d?"":"^")+Rre(i)+"]";return[r.length&&i.length?"("+h+"|"+f+")":r.length?h:f,l,u-n,!0]},"parseClass");var qc=o((e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!0}={})=>n?t?e.replace(/\[([^/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^/\\])\]/g,"$1$2").replace(/\\([^/])/g,"$1"):t?e.replace(/\[([^/\\{}])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^/\\{}])\]/g,"$1$2").replace(/\\([^/{}])/g,"$1"),"unescape");var fs,lze=new Set(["!","?","+","*","@"]),QN=o(e=>lze.has(e),"isExtglobType"),Ore=o(e=>QN(e.type),"isExtglobAST"),cze=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),dze=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),uze=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),Nre=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),pze="(?!(?:^|/)\\.\\.?(?:$|/))",WS="(?!\\.)",fze=new Set(["[","."]),hze=new Set(["..","."]),mze=new Set("().*{}+?[]^$\\!"),gze=o(e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),e8="[^/]",Pre=e8+"*?",Dre=e8+"+?",yze=0,wu=class{static{o(this,"AST")}type;#e;#n;#r=!1;#t=[];#i;#s;#o;#u=!1;#l;#a;#c=!1;id=++yze;get depth(){return(this.#i?.depth??-1)+1}[Symbol.for("nodejs.util.inspect.custom")](){return{"@@type":"AST",id:this.id,type:this.type,root:this.#e.id,parent:this.#i?.id,depth:this.depth,partsLength:this.#t.length,parts:this.#t}}constructor(t,n,r={}){this.type=t,t&&(this.#n=!0),this.#i=n,this.#e=this.#i?this.#i.#e:this,this.#l=this.#e===this?r:this.#e.#l,this.#o=this.#e===this?[]:this.#e.#o,t==="!"&&!this.#e.#u&&this.#o.push(this),this.#s=this.#i?this.#i.#t.length:0}get hasMagic(){if(this.#n!==void 0)return this.#n;for(let t of this.#t)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#n=!0;return this.#n}toString(){return this.#a!==void 0?this.#a:this.type?this.#a=this.type+"("+this.#t.map(t=>String(t)).join("|")+")":this.#a=this.#t.map(t=>String(t)).join("")}#k(){if(this!==this.#e)throw new Error("should only call on root");if(this.#u)return this;this.toString(),this.#u=!0;let t;for(;t=this.#o.pop();){if(t.type!=="!")continue;let n=t,r=n.#i;for(;r;){for(let i=n.#s+1;!r.type&&i<r.#t.length;i++)for(let s of t.#t){if(typeof s=="string")throw new Error("string part in extglob AST??");s.copyIn(r.#t[i])}n=r,r=n.#i}}return this}push(...t){for(let n of t)if(n!==""){if(typeof n!="string"&&!(n instanceof fs&&n.#i===this))throw new Error("invalid part: "+n);this.#t.push(n)}}toJSON(){let t=this.type===null?this.#t.slice().map(n=>typeof n=="string"?n:n.toJSON()):[this.type,...this.#t.map(n=>n.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#u&&this.#i?.type==="!")&&t.push({}),t}isStart(){if(this.#e===this)return!0;if(!this.#i?.isStart())return!1;if(this.#s===0)return!0;let t=this.#i;for(let n=0;n<this.#s;n++){let r=t.#t[n];if(!(r instanceof fs&&r.type==="!"))return!1}return!0}isEnd(){if(this.#e===this||this.#i?.type==="!")return!0;if(!this.#i?.isEnd())return!1;if(!this.type)return this.#i?.isEnd();let t=this.#i?this.#i.#t.length:0;return this.#s===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){let n=new fs(this.type,t);for(let r of this.#t)n.copyIn(r);return n}static#m(t,n,r,i,s){let a=i.maxExtglobRecursion??2,l=!1,c=!1,d=-1,u=!1;if(n.type===null){let y=r,v="";for(;y<t.length;){let b=t.charAt(y++);if(l||b==="\\"){l=!l,v+=b;continue}if(c){y===d+1?(b==="^"||b==="!")&&(u=!0):b==="]"&&!(y===d+2&&u)&&(c=!1),v+=b;continue}else if(b==="["){c=!0,d=y,u=!1,v+=b;continue}if(!i.noext&&QN(b)&&t.charAt(y)==="("&&s<=a){n.push(v),v="";let w=new fs(b,n);y=fs.#m(t,w,y,i,s+1),n.push(w);continue}v+=b}return n.push(v),y}let p=r+1,h=new fs(null,n),f=[],g="";for(;p<t.length;){let y=t.charAt(p++);if(l||y==="\\"){l=!l,g+=y;continue}if(c){p===d+1?(y==="^"||y==="!")&&(u=!0):y==="]"&&!(p===d+2&&u)&&(c=!1),g+=y;continue}else if(y==="["){c=!0,d=p,u=!1,g+=y;continue}if(!i.noext&&QN(y)&&t.charAt(p)==="("&&(s<=a||n&&n.#y(y))){let b=n&&n.#y(y)?0:1;h.push(g),g="";let x=new fs(y,h);h.push(x),p=fs.#m(t,x,p,i,s+b);continue}if(y==="|"){h.push(g),g="",f.push(h),h=new fs(null,n);continue}if(y===")")return g===""&&n.#t.length===0&&(n.#c=!0),h.push(g),g="",n.push(...f,h),p;g+=y}return n.type=null,n.#n=void 0,n.#t=[t.substring(r-1)],p}#N(t){return this.#g(t,dze)}#g(t,n=cze){if(!t||typeof t!="object"||t.type!==null||t.#t.length!==1||this.type===null)return!1;let r=t.#t[0];return!r||typeof r!="object"||r.type===null?!1:this.#y(r.type,n)}#y(t,n=uze){return!!n.get(this.type)?.includes(t)}#p(t,n){let r=t.#t[0],i=new fs(null,r,this.options);i.#t.push(""),r.push(i),this.#_(t,n)}#_(t,n){let r=t.#t[0];this.#t.splice(n,1,...r.#t);for(let i of r.#t)typeof i=="object"&&(i.#i=this);this.#a=void 0}#I(t){return!!Nre.get(this.type)?.has(t)}#P(t){if(!t||typeof t!="object"||t.type!==null||t.#t.length!==1||this.type===null||this.#t.length!==1)return!1;let n=t.#t[0];return!n||typeof n!="object"||n.type===null?!1:this.#I(n.type)}#v(t){let n=Nre.get(this.type),r=t.#t[0],i=n?.get(r.type);if(!i)return!1;this.#t=r.#t;for(let s of this.#t)typeof s=="object"&&(s.#i=this);this.type=i,this.#a=void 0,this.#c=!1}static fromGlob(t,n={}){let r=new fs(null,void 0,n);return fs.#m(t,r,0,n,0),r}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let t=this.toString(),[n,r,i,s]=this.toRegExpSource();if(!(i||this.#n||this.#l.nocase&&!this.#l.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return r;let l=(this.#l.nocase?"i":"")+(s?"u":"");return Object.assign(new RegExp(`^${n}$`,l),{_src:n,_glob:t})}get options(){return this.#l}toRegExpSource(t){let n=t??!!this.#l.dot;if(this.#e===this&&(this.#f(),this.#k()),!Ore(this)){let c=this.isStart()&&this.isEnd()&&!this.#t.some(f=>typeof f!="string"),d=this.#t.map(f=>{let[g,y,v,b]=typeof f=="string"?fs.#T(f,this.#n,c):f.toRegExpSource(t);return this.#n=this.#n||v,this.#r=this.#r||b,g}).join(""),u="";if(this.isStart()&&typeof this.#t[0]=="string"&&!(this.#t.length===1&&hze.has(this.#t[0]))){let g=fze,y=n&&g.has(d.charAt(0))||d.startsWith("\\.")&&g.has(d.charAt(2))||d.startsWith("\\.\\.")&&g.has(d.charAt(4)),v=!n&&!t&&g.has(d.charAt(0));u=y?pze:v?WS:""}let p="";return this.isEnd()&&this.#e.#u&&this.#i?.type==="!"&&(p="(?:$|\\/)"),[u+d+p,qc(d),this.#n=!!this.#n,this.#r]}let r=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:",s=this.#x(n);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){let c=this.toString(),d=this;return d.#t=[c],d.type=null,d.#n=void 0,[c,qc(this.toString()),!1,!1]}let a=!r||t||n||!WS?"":this.#x(!0);a===s&&(a=""),a&&(s=`(?:${s})(?:${a})*?`);let l="";if(this.type==="!"&&this.#c)l=(this.isStart()&&!n?WS:"")+Dre;else{let c=this.type==="!"?"))"+(this.isStart()&&!n&&!t?WS:"")+Pre+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&a?")":this.type==="*"&&a?")?":`)${this.type}`;l=i+s+c}return[l,qc(s),this.#n=!!this.#n,this.#r]}#f(){if(Ore(this)){let t=0,n=!1;do{n=!0;for(let r=0;r<this.#t.length;r++){let i=this.#t[r];typeof i=="object"&&(i.#f(),this.#g(i)?(n=!1,this.#_(i,r)):this.#N(i)?(n=!1,this.#p(i,r)):this.#P(i)&&(n=!1,this.#v(i)))}}while(!n&&++t<10)}else for(let t of this.#t)typeof t=="object"&&t.#f();this.#a=void 0}#x(t){return this.#t.map(n=>{if(typeof n=="string")throw new Error("string type in extglob ast??");let[r,i,s,a]=n.toRegExpSource(t);return this.#r=this.#r||a,r}).filter(n=>!(this.isStart()&&this.isEnd())||!!n).join("|")}static#T(t,n,r=!1){let i=!1,s="",a=!1,l=!1;for(let c=0;c<t.length;c++){let d=t.charAt(c);if(i){i=!1,s+=(mze.has(d)?"\\":"")+d;continue}if(d==="*"){if(l)continue;l=!0,s+=r&&/^[*]+$/.test(t)?Dre:Pre,n=!0;continue}else l=!1;if(d==="\\"){c===t.length-1?s+="\\\\":i=!0;continue}if(d==="["){let[u,p,h,f]=$re(t,c);if(h){s+=u,a=a||p,c+=h-1,n=n||f;continue}}if(d==="?"){s+=e8,n=!0;continue}s+=gze(d)}return[s,qc(t),!!n,a]}};fs=wu;var t8=o((e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!1}={})=>n?t?e.replace(/[?*()[\]{}]/g,"[$&]"):e.replace(/[?*()[\]\\{}]/g,"\\$&"):t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&"),"escape");var ui=o((e,t,n={})=>(N0(t),!n.nocomment&&t.charAt(0)==="#"?!1:new Zf(t,n).match(e)),"minimatch"),vze=/^\*+([^+@!?*[(]*)$/,xze=o(e=>t=>!t.startsWith(".")&&t.endsWith(e),"starDotExtTest"),bze=o(e=>t=>t.endsWith(e),"starDotExtTestDot"),wze=o(e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),"starDotExtTestNocase"),Sze=o(e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),"starDotExtTestNocaseDot"),Eze=/^\*+\.\*+$/,kze=o(e=>!e.startsWith(".")&&e.includes("."),"starDotStarTest"),_ze=o(e=>e!=="."&&e!==".."&&e.includes("."),"starDotStarTestDot"),Ize=/^\.\*+$/,Tze=o(e=>e!=="."&&e!==".."&&e.startsWith("."),"dotStarTest"),Aze=/^\*+$/,Cze=o(e=>e.length!==0&&!e.startsWith("."),"starTest"),Rze=o(e=>e.length!==0&&e!=="."&&e!=="..","starTestDot"),$ze=/^\?+([^+@!?*[(]*)?$/,Oze=o(([e,t=""])=>{let n=Fre([e]);return t?(t=t.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(t)):n},"qmarksTestNocase"),Nze=o(([e,t=""])=>{let n=jre([e]);return t?(t=t.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(t)):n},"qmarksTestNocaseDot"),Pze=o(([e,t=""])=>{let n=jre([e]);return t?r=>n(r)&&r.endsWith(t):n},"qmarksTestDot"),Dze=o(([e,t=""])=>{let n=Fre([e]);return t?r=>n(r)&&r.endsWith(t):n},"qmarksTest"),Fre=o(([e])=>{let t=e.length;return n=>n.length===t&&!n.startsWith(".")},"qmarksTestNoExt"),jre=o(([e])=>{let t=e.length;return n=>n.length===t&&n!=="."&&n!==".."},"qmarksTestNoExtDot"),qre=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",Mre={win32:{sep:"\\"},posix:{sep:"/"}},Mze=qre==="win32"?Mre.win32.sep:Mre.posix.sep;ui.sep=Mze;var Fi=Symbol("globstar **");ui.GLOBSTAR=Fi;var Lze="[^/]",Fze=Lze+"*?",jze="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",qze="(?:(?!(?:\\/|^)\\.).)*?",Uze=o((e,t={})=>n=>ui(n,e,t),"filter");ui.filter=Uze;var na=o((e,t={})=>Object.assign({},e,t),"ext"),Bze=o(e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return ui;let t=ui;return Object.assign(o((r,i,s={})=>t(r,i,na(e,s)),"m"),{Minimatch:class extends t.Minimatch{static{o(this,"Minimatch")}constructor(i,s={}){super(i,na(e,s))}static defaults(i){return t.defaults(na(e,i)).Minimatch}},AST:class extends t.AST{static{o(this,"AST")}constructor(i,s,a={}){super(i,s,na(e,a))}static fromGlob(i,s={}){return t.AST.fromGlob(i,na(e,s))}},unescape:o((r,i={})=>t.unescape(r,na(e,i)),"unescape"),escape:o((r,i={})=>t.escape(r,na(e,i)),"escape"),filter:o((r,i={})=>t.filter(r,na(e,i)),"filter"),defaults:o(r=>t.defaults(na(e,r)),"defaults"),makeRe:o((r,i={})=>t.makeRe(r,na(e,i)),"makeRe"),braceExpand:o((r,i={})=>t.braceExpand(r,na(e,i)),"braceExpand"),match:o((r,i,s={})=>t.match(r,i,na(e,s)),"match"),sep:t.sep,GLOBSTAR:Fi})},"defaults");ui.defaults=Bze;var Ure=o((e,t={})=>(N0(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:Cre(e,{max:t.braceExpandMax})),"braceExpand");ui.braceExpand=Ure;var zze=o((e,t={})=>new Zf(e,t).makeRe(),"makeRe");ui.makeRe=zze;var Wze=o((e,t,n={})=>{let r=new Zf(t,n);return e=e.filter(i=>r.match(i)),r.options.nonull&&!e.length&&e.push(t),e},"match");ui.match=Wze;var Lre=/[?*]|[+@!]\(.*?\)|\[|\]/,Hze=o(e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),Zf=class{static{o(this,"Minimatch")}options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(t,n={}){N0(t),n=n||{},this.options=n,this.maxGlobstarRecursion=n.maxGlobstarRecursion??200,this.pattern=t,this.platform=n.platform||qre,this.isWindows=this.platform==="win32";let r="allowWindowsEscape";this.windowsPathsNoEscape=!!n.windowsPathsNoEscape||n[r]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!n.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!n.nonegate,this.comment=!1,this.empty=!1,this.partial=!!n.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=n.windowsNoMagicRoot!==void 0?n.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let n of t)if(typeof n!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,n=this.options;if(!n.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],n.debug&&(this.debug=(...s)=>console.error(...s)),this.debug(this.pattern,this.globSet);let r=this.globSet.map(s=>this.slashSplit(s));this.globParts=this.preprocess(r),this.debug(this.pattern,this.globParts);let i=this.globParts.map((s,a,l)=>{if(this.isWindows&&this.windowsNoMagicRoot){let c=s[0]===""&&s[1]===""&&(s[2]==="?"||!Lre.test(s[2]))&&!Lre.test(s[3]),d=/^[a-z]:/i.test(s[0]);if(c)return[...s.slice(0,4),...s.slice(4).map(u=>this.parse(u))];if(d)return[s[0],...s.slice(1).map(u=>this.parse(u))]}return s.map(c=>this.parse(c))});if(this.debug(this.pattern,i),this.set=i.filter(s=>s.indexOf(!1)===-1),this.isWindows)for(let s=0;s<this.set.length;s++){let a=this.set[s];a[0]===""&&a[1]===""&&this.globParts[s][2]==="?"&&typeof a[3]=="string"&&/^[a-z]:$/i.test(a[3])&&(a[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let r of t)for(let i=0;i<r.length;i++)r[i]==="**"&&(r[i]="*");let{optimizationLevel:n=1}=this.options;return n>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):n>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(n=>{let r=-1;for(;(r=n.indexOf("**",r+1))!==-1;){let i=r;for(;n[i+1]==="**";)i++;i!==r&&n.splice(r,i-r)}return n})}levelOneOptimize(t){return t.map(n=>(n=n.reduce((r,i)=>{let s=r[r.length-1];return i==="**"&&s==="**"?r:i===".."&&s&&s!==".."&&s!=="."&&s!=="**"?(r.pop(),r):(r.push(i),r)},[]),n.length===0?[""]:n))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let n=!1;do{if(n=!1,!this.preserveMultipleSlashes){for(let i=1;i<t.length-1;i++){let s=t[i];i===1&&s===""&&t[0]===""||(s==="."||s==="")&&(n=!0,t.splice(i,1),i--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(n=!0,t.pop())}let r=0;for(;(r=t.indexOf("..",r+1))!==-1;){let i=t[r-1];i&&i!=="."&&i!==".."&&i!=="**"&&!(this.isWindows&&/^[a-z]:$/i.test(i))&&(n=!0,t.splice(r-1,2),r-=2)}}while(n);return t.length===0?[""]:t}firstPhasePreProcess(t){let n=!1;do{n=!1;for(let r of t){let i=-1;for(;(i=r.indexOf("**",i+1))!==-1;){let a=i;for(;r[a+1]==="**";)a++;a>i&&r.splice(i+1,a-i);let l=r[i+1],c=r[i+2],d=r[i+3];if(l!==".."||!c||c==="."||c===".."||!d||d==="."||d==="..")continue;n=!0,r.splice(i,1);let u=r.slice(0);u[i]="**",t.push(u),i--}if(!this.preserveMultipleSlashes){for(let a=1;a<r.length-1;a++){let l=r[a];a===1&&l===""&&r[0]===""||(l==="."||l==="")&&(n=!0,r.splice(a,1),a--)}r[0]==="."&&r.length===2&&(r[1]==="."||r[1]==="")&&(n=!0,r.pop())}let s=0;for(;(s=r.indexOf("..",s+1))!==-1;){let a=r[s-1];if(a&&a!=="."&&a!==".."&&a!=="**"){n=!0;let c=s===1&&r[s+1]==="**"?["."]:[];r.splice(s-1,2,...c),r.length===0&&r.push(""),s-=2}}}}while(n);return t}secondPhasePreProcess(t){for(let n=0;n<t.length-1;n++)for(let r=n+1;r<t.length;r++){let i=this.partsMatch(t[n],t[r],!this.preserveMultipleSlashes);if(i){t[n]=[],t[r]=i;break}}return t.filter(n=>n.length)}partsMatch(t,n,r=!1){let i=0,s=0,a=[],l="";for(;i<t.length&&s<n.length;)if(t[i]===n[s])a.push(l==="b"?n[s]:t[i]),i++,s++;else if(r&&t[i]==="**"&&n[s]===t[i+1])a.push(t[i]),i++;else if(r&&n[s]==="**"&&t[i]===n[s+1])a.push(n[s]),s++;else if(t[i]==="*"&&n[s]&&(this.options.dot||!n[s].startsWith("."))&&n[s]!=="**"){if(l==="b")return!1;l="a",a.push(t[i]),i++,s++}else if(n[s]==="*"&&t[i]&&(this.options.dot||!t[i].startsWith("."))&&t[i]!=="**"){if(l==="a")return!1;l="b",a.push(n[s]),i++,s++}else return!1;return t.length===n.length&&a}parseNegate(){if(this.nonegate)return;let t=this.pattern,n=!1,r=0;for(let i=0;i<t.length&&t.charAt(i)==="!";i++)n=!n,r++;r&&(this.pattern=t.slice(r)),this.negate=n}matchOne(t,n,r=!1){let i=0,s=0;if(this.isWindows){let l=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),c=!l&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),d=typeof n[0]=="string"&&/^[a-z]:$/i.test(n[0]),u=!d&&n[0]===""&&n[1]===""&&n[2]==="?"&&typeof n[3]=="string"&&/^[a-z]:$/i.test(n[3]),p=c?3:l?0:void 0,h=u?3:d?0:void 0;if(typeof p=="number"&&typeof h=="number"){let[f,g]=[t[p],n[h]];f.toLowerCase()===g.toLowerCase()&&(n[h]=f,s=h,i=p)}}let{optimizationLevel:a=1}=this.options;return a>=2&&(t=this.levelTwoFileOptimize(t)),n.includes(Fi)?this.#e(t,n,r,i,s):this.#r(t,n,r,i,s)}#e(t,n,r,i,s){let a=n.indexOf(Fi,s),l=n.lastIndexOf(Fi),[c,d,u]=r?[n.slice(s,a),n.slice(a+1),[]]:[n.slice(s,a),n.slice(a+1,l),n.slice(l+1)];if(c.length){let x=t.slice(i,i+c.length);if(!this.#r(x,c,r,0,0))return!1;i+=c.length,s+=c.length}let p=0;if(u.length){if(u.length+i>t.length)return!1;let x=t.length-u.length;if(this.#r(t,u,r,x,0))p=u.length;else{if(t[t.length-1]!==""||i+u.length===t.length||(x--,!this.#r(t,u,r,x,0)))return!1;p=u.length+1}}if(!d.length){let x=!!p;for(let w=i;w<t.length-p;w++){let S=String(t[w]);if(x=!0,S==="."||S===".."||!this.options.dot&&S.startsWith("."))return!1}return r||x}let h=[[[],0]],f=h[0],g=0,y=[0];for(let x of d)x===Fi?(y.push(g),f=[[],0],h.push(f)):(f[0].push(x),g++);let v=h.length-1,b=t.length-p;for(let x of h)x[1]=b-(y[v--]+x[0].length);return!!this.#n(t,h,i,0,r,0,!!p)}#n(t,n,r,i,s,a,l){let c=n[i];if(!c){for(let p=r;p<t.length;p++){l=!0;let h=t[p];if(h==="."||h===".."||!this.options.dot&&h.startsWith("."))return!1}return l}let[d,u]=c;for(;r<=u;){if(this.#r(t.slice(0,r+d.length),d,s,r,0)&&a<this.maxGlobstarRecursion){let f=this.#n(t,n,r+d.length,i+1,s,a+1,l);if(f!==!1)return f}let h=t[r];if(h==="."||h===".."||!this.options.dot&&h.startsWith("."))return!1;r++}return s||null}#r(t,n,r,i,s){let a,l,c,d;for(a=i,l=s,d=t.length,c=n.length;a<d&&l<c;a++,l++){this.debug("matchOne loop");let u=n[l],p=t[a];if(this.debug(n,u,p),u===!1||u===Fi)return!1;let h;if(typeof u=="string"?(h=p===u,this.debug("string match",u,p,h)):(h=u.test(p),this.debug("pattern match",u,p,h)),!h)return!1}if(a===d&&l===c)return!0;if(a===d)return r;if(l===c)return a===d-1&&t[a]==="";throw new Error("wtf?")}braceExpand(){return Ure(this.pattern,this.options)}parse(t){N0(t);let n=this.options;if(t==="**")return Fi;if(t==="")return"";let r,i=null;(r=t.match(Aze))?i=n.dot?Rze:Cze:(r=t.match(vze))?i=(n.nocase?n.dot?Sze:wze:n.dot?bze:xze)(r[1]):(r=t.match($ze))?i=(n.nocase?n.dot?Nze:Oze:n.dot?Pze:Dze)(r):(r=t.match(Eze))?i=n.dot?_ze:kze:(r=t.match(Ize))&&(i=Tze);let s=wu.fromGlob(t,this.options).toMMPattern();return i&&typeof s=="object"&&Reflect.defineProperty(s,"test",{value:i}),s}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let n=this.options,r=n.noglobstar?Fze:n.dot?jze:qze,i=new Set(n.nocase?["i"]:[]),s=t.map(c=>{let d=c.map(p=>{if(p instanceof RegExp)for(let h of p.flags.split(""))i.add(h);return typeof p=="string"?Hze(p):p===Fi?Fi:p._src});d.forEach((p,h)=>{let f=d[h+1],g=d[h-1];p!==Fi||g===Fi||(g===void 0?f!==void 0&&f!==Fi?d[h+1]="(?:\\/|"+r+"\\/)?"+f:d[h]=r:f===void 0?d[h-1]=g+"(?:\\/|\\/"+r+")?":f!==Fi&&(d[h-1]=g+"(?:\\/|\\/"+r+"\\/)"+f,d[h+1]=Fi))});let u=d.filter(p=>p!==Fi);if(this.partial&&u.length>=1){let p=[];for(let h=1;h<=u.length;h++)p.push(u.slice(0,h).join("/"));return"(?:"+p.join("|")+")"}return u.join("/")}).join("|"),[a,l]=t.length>1?["(?:",")"]:["",""];s="^"+a+s+l+"$",this.partial&&(s="^(?:\\/|"+a+s.slice(1,-1)+l+")$"),this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,n=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&n)return!0;let r=this.options;this.isWindows&&(t=t.split("\\").join("/"));let i=this.slashSplit(t);this.debug(this.pattern,"split",i);let s=this.set;this.debug(this.pattern,"set",s);let a=i[i.length-1];if(!a)for(let l=i.length-2;!a&&l>=0;l--)a=i[l];for(let l of s){let c=i;if(r.matchBase&&l.length===1&&(c=[a]),this.matchOne(c,l,n))return r.flipNegate?!0:!this.negate}return r.flipNegate?!1:this.negate}static defaults(t){return ui.defaults(t).Minimatch}};ui.AST=wu;ui.Minimatch=Zf;ui.escape=t8;ui.unescape=qc;import{gunzipSync as JHe}from"node:zlib";var D0=class{static{o(this,"Diff")}diff(t,n,r={}){let i;typeof r=="function"?(i=r,r={}):"callback"in r&&(i=r.callback);let s=this.castInput(t,r),a=this.castInput(n,r),l=this.removeEmpty(this.tokenize(s,r)),c=this.removeEmpty(this.tokenize(a,r));return this.diffWithOptionsObj(l,c,r,i)}diffWithOptionsObj(t,n,r,i){var s;let a=o(x=>{if(x=this.postProcess(x,r),i){setTimeout(function(){i(x)},0);return}else return x},"done"),l=n.length,c=t.length,d=1,u=l+c;r.maxEditLength!=null&&(u=Math.min(u,r.maxEditLength));let p=(s=r.timeout)!==null&&s!==void 0?s:1/0,h=Date.now()+p,f=[{oldPos:-1,lastComponent:void 0}],g=this.extractCommon(f[0],n,t,0,r);if(f[0].oldPos+1>=c&&g+1>=l)return a(this.buildValues(f[0].lastComponent,n,t));let y=-1/0,v=1/0,b=o(()=>{for(let x=Math.max(y,-d);x<=Math.min(v,d);x+=2){let w,S=f[x-1],E=f[x+1];S&&(f[x-1]=void 0);let k=!1;if(E){let O=E.oldPos-x;k=E&&0<=O&&O<l}let _=S&&S.oldPos+1<c;if(!k&&!_){f[x]=void 0;continue}if(!_||k&&S.oldPos<E.oldPos?w=this.addToPath(E,!0,!1,0,r):w=this.addToPath(S,!1,!0,1,r),g=this.extractCommon(w,n,t,x,r),w.oldPos+1>=c&&g+1>=l)return a(this.buildValues(w.lastComponent,n,t))||!0;f[x]=w,w.oldPos+1>=c&&(v=Math.min(v,x-1)),g+1>=l&&(y=Math.max(y,x+1))}d++},"execEditLength");if(i)o(function x(){setTimeout(function(){if(d>u||Date.now()>h)return i(void 0);b()||x()},0)},"exec")();else for(;d<=u&&Date.now()<=h;){let x=b();if(x)return x}}addToPath(t,n,r,i,s){let a=t.lastComponent;return a&&!s.oneChangePerToken&&a.added===n&&a.removed===r?{oldPos:t.oldPos+i,lastComponent:{count:a.count+1,added:n,removed:r,previousComponent:a.previousComponent}}:{oldPos:t.oldPos+i,lastComponent:{count:1,added:n,removed:r,previousComponent:a}}}extractCommon(t,n,r,i,s){let a=n.length,l=r.length,c=t.oldPos,d=c-i,u=0;for(;d+1<a&&c+1<l&&this.equals(r[c+1],n[d+1],s);)d++,c++,u++,s.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return u&&!s.oneChangePerToken&&(t.lastComponent={count:u,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=c,d}equals(t,n,r){return r.comparator?r.comparator(t,n):t===n||!!r.ignoreCase&&t.toLowerCase()===n.toLowerCase()}removeEmpty(t){let n=[];for(let r=0;r<t.length;r++)t[r]&&n.push(t[r]);return n}castInput(t,n){return t}tokenize(t,n){return Array.from(t)}join(t){return t.join("")}postProcess(t,n){return t}get useLongestToken(){return!1}buildValues(t,n,r){let i=[],s;for(;t;)i.push(t),s=t.previousComponent,delete t.previousComponent,t=s;i.reverse();let a=i.length,l=0,c=0,d=0;for(;l<a;l++){let u=i[l];if(u.removed)u.value=this.join(r.slice(d,d+u.count)),d+=u.count;else{if(!u.added&&this.useLongestToken){let p=n.slice(c,c+u.count);p=p.map(function(h,f){let g=r[d+f];return g.length>h.length?g:h}),u.value=this.join(p)}else u.value=this.join(n.slice(c,c+u.count));c+=u.count,u.added||(d+=u.count)}}return i}};var n8=class extends D0{static{o(this,"LineDiff")}constructor(){super(...arguments),this.tokenize=Gze}equals(t,n,r){return r.ignoreWhitespace?((!r.newlineIsToken||!t.includes(`
|
|
4313
4313
|
`))&&(t=t.trim()),(!r.newlineIsToken||!n.includes(`
|
|
4314
4314
|
`))&&(n=n.trim())):r.ignoreNewlineAtEof&&!r.newlineIsToken&&(t.endsWith(`
|
|
4315
4315
|
`)&&(t=t.slice(0,-1)),n.endsWith(`
|
package/worker/isolated/index.js
CHANGED
|
@@ -4309,7 +4309,7 @@ The web search request used endpoint ${JSON.stringify(e)}. Search endpoint confi
|
|
|
4309
4309
|
button, .button { display: inline-block; box-sizing: border-box; margin-top: 1rem; padding: .75rem 1rem; border: 0; border-radius: .6rem; background: #5a87ff; color: #071022; font: inherit; font-weight: 750; text-decoration: none; cursor: pointer; }
|
|
4310
4310
|
.secondary { background: #29314b; color: #edf2ff; }
|
|
4311
4311
|
.error { padding: .75rem; border-radius: .5rem; background: #461d2b; color: #ffd6df; }
|
|
4312
|
-
`}o(xQ,"pageStyles");var C8={name:"dsh-edge",version:"0.15.0-alpha.2",description:"Your DeepSeek Harness, anywhere \u2014 deploy a persistent personal coding agent to Cloudflare Workers in one command",author:"pawaca",license:"MIT",type:"module",bin:{"dsh-edge":"scripts/cli.mjs"},files:["dist","worker","scripts/*.d.mts","scripts/*.mjs","wrangler.jsonc","README.md","README.zh.md","LICENSE","THIRD_PARTY_NOTICES.md"],repository:{type:"git",url:"git+https://github.com/pawaca/dsh-edge.git",directory:"apps/dsh-edge"},homepage:"https://github.com/pawaca/dsh-edge#readme",bugs:{url:"https://github.com/pawaca/dsh-edge/issues"},keywords:["deepseek","deepseek-harness","ai-agents","byok","cloudflare-workers","durable-objects","self-hosted"],engines:{node:">=22.14.0"},publishConfig:{access:"public"},dshEdge:{upstreamVersion:"0.1.5-rc.2"},scripts:{"bundle:direct":"pnpm run web:build && pnpm --dir standalone run build:worker:direct && node standalone/scripts/promote.mjs direct","bundle:isolated":"pnpm run web:build && pnpm --dir standalone run build:worker:isolated && node standalone/scripts/promote.mjs isolated","bundle:workers":"pnpm --dir standalone run build && pnpm --dir standalone run verify && node standalone/scripts/promote.mjs all",dev:"pnpm run bundle:direct && node scripts/dev.mjs direct","dev:isolated":"pnpm run bundle:isolated && node scripts/dev.mjs isolated","dsh-edge":"node scripts/cli.mjs","example:install":"node examples/install-keyless.mjs","install:cloudflare":"pnpm run bundle:workers && node scripts/cli.mjs install","legal:write":"node scripts/legal-files.mjs write","pack:verify":"node scripts/verify-packed.mjs",prepack:"node scripts/legal-files.mjs verify && pnpm run bundle:workers","web:build":"pnpm --dir standalone run build:web && node standalone/scripts/promote.mjs web",test:"vitest run --root ../.. --project edge-runtime","test:integration":"pnpm run bundle:workers && node tests/run-session-integration.mjs","test:snapshot":"vitest run --root ../.. --config apps/dsh-edge/vitest.snapshot.config.ts",typecheck:"tsc --noEmit"},dependencies:{"@clack/prompts":"1.7.0","compare-versions":"6.1.1",execa:"^10.0.1","jsonc-parser":"^3.3.1",wrangler:"4.129.0"},devDependencies:{"@cloudflare/computer":"0.2.1","@cloudflare/workers-types":"5.20260904.1","@deepseek-ai/cordis":"4.0.2","@deepseek-ai/dsh-agent":"0.1.5-rc.2","@deepseek-ai/dsh-agent-loop":"0.1.5-rc.2","@deepseek-ai/dsh-anonymous-user-id":"0.1.5-rc.2","@deepseek-ai/dsh-api-gateway":"0.1.5-rc.2","@deepseek-ai/dsh-api-remotes":"0.1.5-rc.2","@deepseek-ai/dsh-api-session-controller":"0.1.5-rc.2","@deepseek-ai/dsh-api-settings-controller":"0.1.5-rc.2","@deepseek-ai/dsh-api-workspace-controller":"0.1.5-rc.2","@deepseek-ai/dsh-api-workspace-files":"0.1.5-rc.2","@deepseek-ai/dsh-attachment":"0.1.5-rc.2","@deepseek-ai/dsh-brand":"0.1.5-rc.2","@deepseek-ai/dsh-client-store":"0.1.5-rc.2","@deepseek-ai/dsh-commands":"0.1.5-rc.2","@deepseek-ai/dsh-compaction":"0.1.5-rc.2","@deepseek-ai/dsh-compaction-basic":"0.1.5-rc.2","@deepseek-ai/dsh-compaction-tool-result-pruner":"0.1.5-rc.2","@deepseek-ai/dsh-credentials":"0.1.5-rc.2","@deepseek-ai/dsh-file-reference":"0.1.5-rc.2","@deepseek-ai/dsh-fs":"0.1.5-rc.2","@deepseek-ai/dsh-goal":"0.1.5-rc.2","@deepseek-ai/dsh-goal-round-driver":"0.1.5-rc.2","@deepseek-ai/dsh-host-directory-picker":"0.1.5-rc.2","@deepseek-ai/dsh-jobs":"0.1.5-rc.2","@deepseek-ai/dsh-jobs-local":"0.1.5-rc.2","@deepseek-ai/dsh-host-plugin-inventory":"0.1.5-rc.2","@deepseek-ai/dsh-launch-environment":"0.1.5-rc.2","@deepseek-ai/dsh-llm":"0.1.5-rc.2","@deepseek-ai/dsh-llm-deepseek":"0.1.5-rc.2","@deepseek-ai/dsh-message-feedback":"0.1.5-rc.2","@deepseek-ai/dsh-output-retention":"0.1.5-rc.2","@deepseek-ai/dsh-plan-mode":"0.1.5-rc.2","@deepseek-ai/dsh-sandbox":"0.1.5-rc.2","@deepseek-ai/dsh-scope":"0.1.5-rc.2","@deepseek-ai/dsh-schedule":"0.1.5-rc.2","@deepseek-ai/dsh-session":"0.1.5-rc.2","@deepseek-ai/dsh-session-format":"0.1.5-rc.2","@deepseek-ai/dsh-session-format-catalog":"0.1.5-rc.2","@deepseek-ai/dsh-session-format-v0-to-v1":"0.1.5-rc.2","@deepseek-ai/dsh-session-format-v1-to-v2":"0.1.5-rc.2","@deepseek-ai/dsh-session-format-v2-to-v3":"0.1.5-rc.2","@deepseek-ai/dsh-session-persistence":"0.1.5-rc.2","@deepseek-ai/dsh-session-projection":"0.1.5-rc.2","@deepseek-ai/dsh-session-projection-cache":"0.1.5-rc.2","@deepseek-ai/dsh-session-query":"0.1.5-rc.2","@deepseek-ai/dsh-session-reference":"0.1.5-rc.2","@deepseek-ai/dsh-session-title":"0.1.5-rc.2","@deepseek-ai/dsh-session-title-first-prompt-llm":"0.1.5-rc.2","@deepseek-ai/dsh-session-title-llm":"0.1.5-rc.2","@deepseek-ai/dsh-settings":"0.1.5-rc.2","@deepseek-ai/dsh-skill":"0.1.5-rc.2","@deepseek-ai/dsh-subagent":"0.1.5-rc.2","@deepseek-ai/dsh-subagent-in-process-driver":"0.1.5-rc.2","@deepseek-ai/dsh-subagent-spawn-in-process":"0.1.5-rc.2","@deepseek-ai/dsh-tool-subagent":"0.1.5-rc.2","@deepseek-ai/dsh-spill":"0.1.5-rc.2","@deepseek-ai/dsh-spill-policy":"0.1.5-rc.2","@deepseek-ai/dsh-storage":"0.1.5-rc.2","@deepseek-ai/dsh-storage-domain":"0.1.5-rc.2","@deepseek-ai/dsh-system-prompt":"0.1.5-rc.2","@deepseek-ai/dsh-timeout":"0.1.5-rc.2","@deepseek-ai/dsh-token-meter":"0.1.5-rc.2","@deepseek-ai/dsh-tool-ask-user":"0.1.5-rc.2","@deepseek-ai/dsh-tool-call-timeout-policy":"0.1.5-rc.2","@deepseek-ai/dsh-tool-fs":"0.1.5-rc.2","@deepseek-ai/dsh-tool-goal":"0.1.5-rc.2","@deepseek-ai/dsh-tool-jobs":"0.1.5-rc.2","@deepseek-ai/dsh-tool-skill":"0.1.5-rc.2","@deepseek-ai/dsh-tool-web":"0.1.5-rc.2","@deepseek-ai/dsh-tools":"0.1.5-rc.2","@deepseek-ai/dsh-typert-protocol":"0.1.5-rc.2","@deepseek-ai/dsh-typert-registry":"0.1.5-rc.2","@deepseek-ai/dsh-user-questions":"0.1.5-rc.2","@deepseek-ai/dsh-util-values":"0.1.5-rc.2","@deepseek-ai/dsh-web":"0.1.5-rc.2","@deepseek-ai/dsh-web-fetch-http":"0.1.5-rc.2","@deepseek-ai/dsh-web-search-deepseek":"0.1.5-rc.2","@deepseek-ai/dsh-workspace":"0.1.5-rc.2","@mixmark-io/domino":"2.2.0","fast-png":"8.0.0","jpeg-js":"0.4.4","just-bash":"3.4.2",playwright:"^1.49.0",typescript:"^6.0.3",vitest:"^4.1.8",ws:"^8.21.0"}};var px=C8.version,vQ=C8.dshEdge.upstreamVersion;function uOe(){return"dsh-edge@0.15.0-alpha.2/isolated"}o(uOe,"resolveEdgeDeploymentId");function Sm(e){return{baseURL:z7(e.DEEPSEEK_BASE_URL),maxTokens:G7(e.DEEPSEEK_MAX_OUTPUT_TOKENS),model:Ac(e.DEEPSEEK_MODEL),reasoningEffort:W7(e.DEEPSEEK_REASONING_EFFORT),searchBaseURL:A3(e.DEEPSEEK_SEARCH_BASE_URL),streamIdleTimeoutMs:H7(e.DEEPSEEK_STREAM_IDLE_TIMEOUT_MS),commandTimeoutPolicy:xm(e.DSH_EDGE_DEFAULT_COMMAND_TIMEOUT_MS,e.DSH_EDGE_MAX_COMMAND_TIMEOUT_MS)}}o(Sm,"resolveEdgeDeploymentConfig");function dOe(e){return typeof e.DEEPSEEK_API_KEY=="string"&&e.DEEPSEEK_API_KEY.trim().length>0}o(dOe,"edgeDeploymentApiKeyConfigured");function pOe(e){let t=z7(e),n=new URL(t);return n.search.length===0&&n.hash.length===0?t:(n.search="",n.hash="",n.href)}o(pOe,"projectedEdgeBaseURL");function R8(e,t){return{shell:e.LOADER===void 0?"just-bash-direct":"just-bash-isolated",storage:"durable-object-sqlite-vfs",attachmentStorage:t??(e.DSH_EDGE_ATTACHMENTS===void 0?"temporary-do":"private-r2"),deploymentId:uOe(),apiKeyConfigured:dOe(e),baseURL:pOe(e.DEEPSEEK_BASE_URL),maxTokens:G7(e.DEEPSEEK_MAX_OUTPUT_TOKENS),model:Ac(e.DEEPSEEK_MODEL),reasoningEffort:W7(e.DEEPSEEK_REASONING_EFFORT),searchBaseURL:A3(e.DEEPSEEK_SEARCH_BASE_URL),streamIdleTimeoutMs:H7(e.DEEPSEEK_STREAM_IDLE_TIMEOUT_MS),commandTimeoutPolicy:xm(e.DSH_EDGE_DEFAULT_COMMAND_TIMEOUT_MS,e.DSH_EDGE_MAX_COMMAND_TIMEOUT_MS)}}o(R8,"resolveEdgeDeploymentProfile");function fx(e){Sm(e);let t=R8(e);return{ok:!0,service:"dsh-edge",storage:t.storage,attachmentStorage:t.attachmentStorage,shell:t.shell,agent:"upstream-react-loop-agent",access:"single-owner-cookie",deploymentId:t.deploymentId,...e.CF_VERSION_METADATA===void 0?{}:{workerVersionId:e.CF_VERSION_METADATA.id},version:px,upstreamVersion:vQ,status:"ready"}}o(fx,"resolveEdgeDeploymentHealth");import{AsyncLocalStorage as Rze}from"node:async_hooks";import{WorkerEntrypoint as iyt}from"cloudflare:workers";var fu=Ll(bQ(),1);var $8=o((e,t,n)=>{let r=e instanceof RegExp?wQ(e,n):e,i=t instanceof RegExp?wQ(t,n):t,s=r!==null&&i!=null&&fOe(r,i,n);return s&&{start:s[0],end:s[1],pre:n.slice(0,s[0]),body:n.slice(s[0]+r.length,s[1]),post:n.slice(s[1]+i.length)}},"balanced"),wQ=o((e,t)=>{let n=t.match(e);return n?n[0]:null},"maybeMatch"),fOe=o((e,t,n)=>{let r,i,s,a,l,c=n.indexOf(e),u=n.indexOf(t,c+1),d=c;if(c>=0&&u>0){if(e===t)return[c,u];for(r=[],s=n.length;d>=0&&!l;){if(d===c)r.push(d),c=n.indexOf(e,d+1);else if(r.length===1){let p=r.pop();p!==void 0&&(l=[p,u])}else i=r.pop(),i!==void 0&&i<s&&(s=i,a=u),u=n.indexOf(t,d+1);d=c<u&&c>=0?c:u}r.length&&a!==void 0&&(l=[s,a])}return l},"range");var SQ="\0SLASH"+Math.random()+"\0",EQ="\0OPEN"+Math.random()+"\0",P8="\0CLOSE"+Math.random()+"\0",kQ="\0COMMA"+Math.random()+"\0",_Q="\0PERIOD"+Math.random()+"\0",hOe=new RegExp(SQ,"g"),mOe=new RegExp(EQ,"g"),gOe=new RegExp(P8,"g"),yOe=new RegExp(kQ,"g"),xOe=new RegExp(_Q,"g"),vOe=/\\\\/g,bOe=/\\{/g,wOe=/\\}/g,SOe=/\\,/g,EOe=/\\\./g,kOe=1e5,_Oe=4e6;function N8(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}o(N8,"numeric");function AOe(e){return e.replace(vOe,SQ).replace(bOe,EQ).replace(wOe,P8).replace(SOe,kQ).replace(EOe,_Q)}o(AOe,"escapeBraces");function TOe(e){return e.replace(hOe,"\\").replace(mOe,"{").replace(gOe,"}").replace(yOe,",").replace(xOe,".")}o(TOe,"unescapeBraces");function AQ(e){if(!e)return[""];let t=[],n=$8("{","}",e);if(!n)return e.split(",");let{pre:r,body:i,post:s}=n,a=r.split(",");a[a.length-1]+="{"+i+"}";let l=AQ(s);return s.length&&(a[a.length-1]+=l.shift(),a.push.apply(a,l)),t.push.apply(t,a),t}o(AQ,"parseCommaParts");function TQ(e,t={}){if(!e)return[];let{max:n=kOe,maxLength:r=_Oe}=t;return e.slice(0,2)==="{}"&&(e="\\{\\}"+e.slice(2)),O8(AOe(e),n,r,!0).map(TOe)}o(TQ,"expand");function IOe(e){return"{"+e+"}"}o(IOe,"embrace");function COe(e){return/^-?0\d/.test(e)}o(COe,"isPadded");function ROe(e,t){return e<=t}o(ROe,"lte");function $Oe(e,t){return e>=t}o($Oe,"gte");function Em(e,t,n,r,i,s){let a=[],l=0;for(let c=0;c<e.length;c++)for(let u=0;u<n.length;u++){if(a.length>=r)return a;let d=e[c]+t+n[u];if(!(s&&!d)){if(l+d.length>i)return a;a.push(d),l+=d.length}}return a}o(Em,"combine");function NOe(e,t,n,r){let i=e.split(/\.\./),s=[];if(i[0]===void 0||i[1]===void 0)return s;let a=N8(i[0]),l=N8(i[1]),c=Math.max(i[0].length,i[1].length),u=i.length===3&&i[2]!==void 0?Math.max(Math.abs(N8(i[2])),1):1,d=ROe;l<a&&(u*=-1,d=$Oe);let m=i.some(COe),h=0;for(let g=a;d(g,l)&&s.length<n;g+=u){let y;if(t)y=String.fromCharCode(g),y==="\\"&&(y="");else if(y=String(g),m){let x=c-y.length;if(x>0){let v=new Array(x+1).join("0");g<0?y="-"+v+y.slice(1):y=v+y}}if(h+y.length>r)break;s.push(y),h+=y.length}return s}o(NOe,"expandSequence");function O8(e,t,n,r){let i=[""],s=!1,a=!0;for(;;){let l=$8("{","}",e);if(!l)return Em(i,e,[""],t,n,s);let c=l.pre;if(/\$$/.test(c)){if(i=Em(i,c+"{"+l.body+"}",[""],t,n,s&&!l.post.length),a=!1,!l.post.length)break;e=l.post;continue}let u=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(l.body),d=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(l.body),p=u||d,m=l.body.indexOf(",")>=0;if(!p&&!m){if(l.post.match(/,(?!,).*\}/)){e=l.pre+"{"+l.body+P8+l.post,r=!0;continue}return Em(i,c+"{"+l.body+"}"+l.post,[""],t,n,s)}a&&(s=r&&!p,a=!1);let h;if(p)h=NOe(l.body,d,t,n);else{let g=AQ(l.body);if(g.length===1&&g[0]!==void 0&&(g=O8(g[0],t,n,!1).map(IOe),g.length===1)){if(i=Em(i,c+g[0],[""],t,n,s&&!l.post.length),!l.post.length)break;e=l.post;continue}let y=s&&!l.post.length&&!c;for(let v=0;y&&v<i.length;v++)i[v]&&(y=!1);h=[];let x=0;e:for(let v=0;v<g.length;v++){let b=O8(g[v],t,n,!1);for(let w=0;w<b.length;w++){let E=b[w];if(!(y&&!E)){if(h.length>=t||x+E.length>n)break e;h.push(E),x+=E.length}}}}if(i=Em(i,c,h,t,n,s&&!l.post.length),!l.post.length)break;e=l.post}return i}o(O8,"expand_");var km=o(e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")},"assertValidPattern");var OOe={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},_m=o(e=>e.replace(/[[\]\\-]/g,"\\$&"),"braceEscape"),POe=o(e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regexpEscape"),IQ=o(e=>e.join(""),"rangesToString"),CQ=o((e,t)=>{let n=t;if(e.charAt(n)!=="[")throw new Error("not in a brace expression");let r=[],i=[],s=n+1,a=!1,l=!1,c=!1,u=!1,d=n,p="";e:for(;s<e.length;){let y=e.charAt(s);if((y==="!"||y==="^")&&s===n+1){u=!0,s++;continue}if(y==="]"&&a&&!c){d=s+1;break}if(a=!0,y==="\\"&&!c){c=!0,s++;continue}if(y==="["&&!c){for(let[x,[v,b,w]]of Object.entries(OOe))if(e.startsWith(x,s)){if(p)return["$.",!1,e.length-n,!0];s+=x.length,w?i.push(v):r.push(v),l=l||b;continue e}}if(c=!1,p){y>p?r.push(_m(p)+"-"+_m(y)):y===p&&r.push(_m(y)),p="",s++;continue}if(e.startsWith("-]",s+1)){r.push(_m(y+"-")),s+=2;continue}if(e.startsWith("-",s+1)){p=y,s+=2;continue}r.push(_m(y)),s++}if(d<s)return["",!1,0,!1];if(!r.length&&!i.length)return["$.",!1,e.length-n,!0];if(i.length===0&&r.length===1&&/^\\?.$/.test(r[0])&&!u){let y=r[0].length===2?r[0].slice(-1):r[0];return[POe(y),!1,d-n,!1]}let m="["+(u?"^":"")+IQ(r)+"]",h="["+(u?"":"^")+IQ(i)+"]";return[r.length&&i.length?"("+m+"|"+h+")":r.length?m:h,l,d-n,!0]},"parseClass");var wl=o((e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!0}={})=>n?t?e.replace(/\[([^/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^/\\])\]/g,"$1$2").replace(/\\([^/])/g,"$1"):t?e.replace(/\[([^/\\{}])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^/\\{}])\]/g,"$1$2").replace(/\\([^/{}])/g,"$1"),"unescape");var Ni,DOe=new Set(["!","?","+","*","@"]),D8=o(e=>DOe.has(e),"isExtglobType"),RQ=o(e=>D8(e.type),"isExtglobAST"),MOe=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),LOe=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),jOe=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),$Q=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),FOe="(?!(?:^|/)\\.\\.?(?:$|/))",mx="(?!\\.)",UOe=new Set(["[","."]),qOe=new Set(["..","."]),BOe=new Set("().*{}+?[]^$\\!"),zOe=o(e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),M8="[^/]",NQ=M8+"*?",OQ=M8+"+?",WOe=0,Jc=class{static{o(this,"AST")}type;#e;#n;#r=!1;#t=[];#i;#s;#o;#d=!1;#l;#a;#c=!1;id=++WOe;get depth(){return(this.#i?.depth??-1)+1}[Symbol.for("nodejs.util.inspect.custom")](){return{"@@type":"AST",id:this.id,type:this.type,root:this.#e.id,parent:this.#i?.id,depth:this.depth,partsLength:this.#t.length,parts:this.#t}}constructor(t,n,r={}){this.type=t,t&&(this.#n=!0),this.#i=n,this.#e=this.#i?this.#i.#e:this,this.#l=this.#e===this?r:this.#e.#l,this.#o=this.#e===this?[]:this.#e.#o,t==="!"&&!this.#e.#d&&this.#o.push(this),this.#s=this.#i?this.#i.#t.length:0}get hasMagic(){if(this.#n!==void 0)return this.#n;for(let t of this.#t)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#n=!0;return this.#n}toString(){return this.#a!==void 0?this.#a:this.type?this.#a=this.type+"("+this.#t.map(t=>String(t)).join("|")+")":this.#a=this.#t.map(t=>String(t)).join("")}#k(){if(this!==this.#e)throw new Error("should only call on root");if(this.#d)return this;this.toString(),this.#d=!0;let t;for(;t=this.#o.pop();){if(t.type!=="!")continue;let n=t,r=n.#i;for(;r;){for(let i=n.#s+1;!r.type&&i<r.#t.length;i++)for(let s of t.#t){if(typeof s=="string")throw new Error("string part in extglob AST??");s.copyIn(r.#t[i])}n=r,r=n.#i}}return this}push(...t){for(let n of t)if(n!==""){if(typeof n!="string"&&!(n instanceof Ni&&n.#i===this))throw new Error("invalid part: "+n);this.#t.push(n)}}toJSON(){let t=this.type===null?this.#t.slice().map(n=>typeof n=="string"?n:n.toJSON()):[this.type,...this.#t.map(n=>n.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#d&&this.#i?.type==="!")&&t.push({}),t}isStart(){if(this.#e===this)return!0;if(!this.#i?.isStart())return!1;if(this.#s===0)return!0;let t=this.#i;for(let n=0;n<this.#s;n++){let r=t.#t[n];if(!(r instanceof Ni&&r.type==="!"))return!1}return!0}isEnd(){if(this.#e===this||this.#i?.type==="!")return!0;if(!this.#i?.isEnd())return!1;if(!this.type)return this.#i?.isEnd();let t=this.#i?this.#i.#t.length:0;return this.#s===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){let n=new Ni(this.type,t);for(let r of this.#t)n.copyIn(r);return n}static#m(t,n,r,i,s){let a=i.maxExtglobRecursion??2,l=!1,c=!1,u=-1,d=!1;if(n.type===null){let y=r,x="";for(;y<t.length;){let v=t.charAt(y++);if(l||v==="\\"){l=!l,x+=v;continue}if(c){y===u+1?(v==="^"||v==="!")&&(d=!0):v==="]"&&!(y===u+2&&d)&&(c=!1),x+=v;continue}else if(v==="["){c=!0,u=y,d=!1,x+=v;continue}if(!i.noext&&D8(v)&&t.charAt(y)==="("&&s<=a){n.push(x),x="";let w=new Ni(v,n);y=Ni.#m(t,w,y,i,s+1),n.push(w);continue}x+=v}return n.push(x),y}let p=r+1,m=new Ni(null,n),h=[],g="";for(;p<t.length;){let y=t.charAt(p++);if(l||y==="\\"){l=!l,g+=y;continue}if(c){p===u+1?(y==="^"||y==="!")&&(d=!0):y==="]"&&!(p===u+2&&d)&&(c=!1),g+=y;continue}else if(y==="["){c=!0,u=p,d=!1,g+=y;continue}if(!i.noext&&D8(y)&&t.charAt(p)==="("&&(s<=a||n&&n.#y(y))){let v=n&&n.#y(y)?0:1;m.push(g),g="";let b=new Ni(y,m);m.push(b),p=Ni.#m(t,b,p,i,s+v);continue}if(y==="|"){m.push(g),g="",h.push(m),m=new Ni(null,n);continue}if(y===")")return g===""&&n.#t.length===0&&(n.#c=!0),m.push(g),g="",n.push(...h,m),p;g+=y}return n.type=null,n.#n=void 0,n.#t=[t.substring(r-1)],p}#O(t){return this.#g(t,LOe)}#g(t,n=MOe){if(!t||typeof t!="object"||t.type!==null||t.#t.length!==1||this.type===null)return!1;let r=t.#t[0];return!r||typeof r!="object"||r.type===null?!1:this.#y(r.type,n)}#y(t,n=jOe){return!!n.get(this.type)?.includes(t)}#p(t,n){let r=t.#t[0],i=new Ni(null,r,this.options);i.#t.push(""),r.push(i),this.#_(t,n)}#_(t,n){let r=t.#t[0];this.#t.splice(n,1,...r.#t);for(let i of r.#t)typeof i=="object"&&(i.#i=this);this.#a=void 0}#A(t){return!!$Q.get(this.type)?.has(t)}#P(t){if(!t||typeof t!="object"||t.type!==null||t.#t.length!==1||this.type===null||this.#t.length!==1)return!1;let n=t.#t[0];return!n||typeof n!="object"||n.type===null?!1:this.#A(n.type)}#x(t){let n=$Q.get(this.type),r=t.#t[0],i=n?.get(r.type);if(!i)return!1;this.#t=r.#t;for(let s of this.#t)typeof s=="object"&&(s.#i=this);this.type=i,this.#a=void 0,this.#c=!1}static fromGlob(t,n={}){let r=new Ni(null,void 0,n);return Ni.#m(t,r,0,n,0),r}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let t=this.toString(),[n,r,i,s]=this.toRegExpSource();if(!(i||this.#n||this.#l.nocase&&!this.#l.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return r;let l=(this.#l.nocase?"i":"")+(s?"u":"");return Object.assign(new RegExp(`^${n}$`,l),{_src:n,_glob:t})}get options(){return this.#l}toRegExpSource(t){let n=t??!!this.#l.dot;if(this.#e===this&&(this.#f(),this.#k()),!RQ(this)){let c=this.isStart()&&this.isEnd()&&!this.#t.some(h=>typeof h!="string"),u=this.#t.map(h=>{let[g,y,x,v]=typeof h=="string"?Ni.#T(h,this.#n,c):h.toRegExpSource(t);return this.#n=this.#n||x,this.#r=this.#r||v,g}).join(""),d="";if(this.isStart()&&typeof this.#t[0]=="string"&&!(this.#t.length===1&&qOe.has(this.#t[0]))){let g=UOe,y=n&&g.has(u.charAt(0))||u.startsWith("\\.")&&g.has(u.charAt(2))||u.startsWith("\\.\\.")&&g.has(u.charAt(4)),x=!n&&!t&&g.has(u.charAt(0));d=y?FOe:x?mx:""}let p="";return this.isEnd()&&this.#e.#d&&this.#i?.type==="!"&&(p="(?:$|\\/)"),[d+u+p,wl(u),this.#n=!!this.#n,this.#r]}let r=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:",s=this.#v(n);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){let c=this.toString(),u=this;return u.#t=[c],u.type=null,u.#n=void 0,[c,wl(this.toString()),!1,!1]}let a=!r||t||n||!mx?"":this.#v(!0);a===s&&(a=""),a&&(s=`(?:${s})(?:${a})*?`);let l="";if(this.type==="!"&&this.#c)l=(this.isStart()&&!n?mx:"")+OQ;else{let c=this.type==="!"?"))"+(this.isStart()&&!n&&!t?mx:"")+NQ+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&a?")":this.type==="*"&&a?")?":`)${this.type}`;l=i+s+c}return[l,wl(s),this.#n=!!this.#n,this.#r]}#f(){if(RQ(this)){let t=0,n=!1;do{n=!0;for(let r=0;r<this.#t.length;r++){let i=this.#t[r];typeof i=="object"&&(i.#f(),this.#g(i)?(n=!1,this.#_(i,r)):this.#O(i)?(n=!1,this.#p(i,r)):this.#P(i)&&(n=!1,this.#x(i)))}}while(!n&&++t<10)}else for(let t of this.#t)typeof t=="object"&&t.#f();this.#a=void 0}#v(t){return this.#t.map(n=>{if(typeof n=="string")throw new Error("string type in extglob ast??");let[r,i,s,a]=n.toRegExpSource(t);return this.#r=this.#r||a,r}).filter(n=>!(this.isStart()&&this.isEnd())||!!n).join("|")}static#T(t,n,r=!1){let i=!1,s="",a=!1,l=!1;for(let c=0;c<t.length;c++){let u=t.charAt(c);if(i){i=!1,s+=(BOe.has(u)?"\\":"")+u;continue}if(u==="*"){if(l)continue;l=!0,s+=r&&/^[*]+$/.test(t)?OQ:NQ,n=!0;continue}else l=!1;if(u==="\\"){c===t.length-1?s+="\\\\":i=!0;continue}if(u==="["){let[d,p,m,h]=CQ(t,c);if(m){s+=d,a=a||p,c+=m-1,n=n||h;continue}}if(u==="?"){s+=M8,n=!0;continue}s+=zOe(u)}return[s,wl(t),!!n,a]}};Ni=Jc;var L8=o((e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!1}={})=>n?t?e.replace(/[?*()[\]{}]/g,"[$&]"):e.replace(/[?*()[\]\\{}]/g,"\\$&"):t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&"),"escape");var Dr=o((e,t,n={})=>(km(t),!n.nocomment&&t.charAt(0)==="#"?!1:new cp(t,n).match(e)),"minimatch"),HOe=/^\*+([^+@!?*[(]*)$/,GOe=o(e=>t=>!t.startsWith(".")&&t.endsWith(e),"starDotExtTest"),VOe=o(e=>t=>t.endsWith(e),"starDotExtTestDot"),ZOe=o(e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),"starDotExtTestNocase"),KOe=o(e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),"starDotExtTestNocaseDot"),JOe=/^\*+\.\*+$/,XOe=o(e=>!e.startsWith(".")&&e.includes("."),"starDotStarTest"),QOe=o(e=>e!=="."&&e!==".."&&e.includes("."),"starDotStarTestDot"),YOe=/^\.\*+$/,ePe=o(e=>e!=="."&&e!==".."&&e.startsWith("."),"dotStarTest"),tPe=/^\*+$/,nPe=o(e=>e.length!==0&&!e.startsWith("."),"starTest"),rPe=o(e=>e.length!==0&&e!=="."&&e!=="..","starTestDot"),iPe=/^\?+([^+@!?*[(]*)?$/,sPe=o(([e,t=""])=>{let n=MQ([e]);return t?(t=t.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(t)):n},"qmarksTestNocase"),aPe=o(([e,t=""])=>{let n=LQ([e]);return t?(t=t.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(t)):n},"qmarksTestNocaseDot"),oPe=o(([e,t=""])=>{let n=LQ([e]);return t?r=>n(r)&&r.endsWith(t):n},"qmarksTestDot"),lPe=o(([e,t=""])=>{let n=MQ([e]);return t?r=>n(r)&&r.endsWith(t):n},"qmarksTest"),MQ=o(([e])=>{let t=e.length;return n=>n.length===t&&!n.startsWith(".")},"qmarksTestNoExt"),LQ=o(([e])=>{let t=e.length;return n=>n.length===t&&n!=="."&&n!==".."},"qmarksTestNoExtDot"),jQ=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",PQ={win32:{sep:"\\"},posix:{sep:"/"}},cPe=jQ==="win32"?PQ.win32.sep:PQ.posix.sep;Dr.sep=cPe;var si=Symbol("globstar **");Dr.GLOBSTAR=si;var uPe="[^/]",dPe=uPe+"*?",pPe="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",fPe="(?:(?!(?:\\/|^)\\.).)*?",hPe=o((e,t={})=>n=>Dr(n,e,t),"filter");Dr.filter=hPe;var ds=o((e,t={})=>Object.assign({},e,t),"ext"),mPe=o(e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return Dr;let t=Dr;return Object.assign(o((r,i,s={})=>t(r,i,ds(e,s)),"m"),{Minimatch:class extends t.Minimatch{static{o(this,"Minimatch")}constructor(i,s={}){super(i,ds(e,s))}static defaults(i){return t.defaults(ds(e,i)).Minimatch}},AST:class extends t.AST{static{o(this,"AST")}constructor(i,s,a={}){super(i,s,ds(e,a))}static fromGlob(i,s={}){return t.AST.fromGlob(i,ds(e,s))}},unescape:o((r,i={})=>t.unescape(r,ds(e,i)),"unescape"),escape:o((r,i={})=>t.escape(r,ds(e,i)),"escape"),filter:o((r,i={})=>t.filter(r,ds(e,i)),"filter"),defaults:o(r=>t.defaults(ds(e,r)),"defaults"),makeRe:o((r,i={})=>t.makeRe(r,ds(e,i)),"makeRe"),braceExpand:o((r,i={})=>t.braceExpand(r,ds(e,i)),"braceExpand"),match:o((r,i,s={})=>t.match(r,i,ds(e,s)),"match"),sep:t.sep,GLOBSTAR:si})},"defaults");Dr.defaults=mPe;var FQ=o((e,t={})=>(km(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:TQ(e,{max:t.braceExpandMax})),"braceExpand");Dr.braceExpand=FQ;var gPe=o((e,t={})=>new cp(e,t).makeRe(),"makeRe");Dr.makeRe=gPe;var yPe=o((e,t,n={})=>{let r=new cp(t,n);return e=e.filter(i=>r.match(i)),r.options.nonull&&!e.length&&e.push(t),e},"match");Dr.match=yPe;var DQ=/[?*]|[+@!]\(.*?\)|\[|\]/,xPe=o(e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),cp=class{static{o(this,"Minimatch")}options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(t,n={}){km(t),n=n||{},this.options=n,this.maxGlobstarRecursion=n.maxGlobstarRecursion??200,this.pattern=t,this.platform=n.platform||jQ,this.isWindows=this.platform==="win32";let r="allowWindowsEscape";this.windowsPathsNoEscape=!!n.windowsPathsNoEscape||n[r]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!n.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!n.nonegate,this.comment=!1,this.empty=!1,this.partial=!!n.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=n.windowsNoMagicRoot!==void 0?n.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let n of t)if(typeof n!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,n=this.options;if(!n.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],n.debug&&(this.debug=(...s)=>console.error(...s)),this.debug(this.pattern,this.globSet);let r=this.globSet.map(s=>this.slashSplit(s));this.globParts=this.preprocess(r),this.debug(this.pattern,this.globParts);let i=this.globParts.map((s,a,l)=>{if(this.isWindows&&this.windowsNoMagicRoot){let c=s[0]===""&&s[1]===""&&(s[2]==="?"||!DQ.test(s[2]))&&!DQ.test(s[3]),u=/^[a-z]:/i.test(s[0]);if(c)return[...s.slice(0,4),...s.slice(4).map(d=>this.parse(d))];if(u)return[s[0],...s.slice(1).map(d=>this.parse(d))]}return s.map(c=>this.parse(c))});if(this.debug(this.pattern,i),this.set=i.filter(s=>s.indexOf(!1)===-1),this.isWindows)for(let s=0;s<this.set.length;s++){let a=this.set[s];a[0]===""&&a[1]===""&&this.globParts[s][2]==="?"&&typeof a[3]=="string"&&/^[a-z]:$/i.test(a[3])&&(a[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let r of t)for(let i=0;i<r.length;i++)r[i]==="**"&&(r[i]="*");let{optimizationLevel:n=1}=this.options;return n>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):n>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(n=>{let r=-1;for(;(r=n.indexOf("**",r+1))!==-1;){let i=r;for(;n[i+1]==="**";)i++;i!==r&&n.splice(r,i-r)}return n})}levelOneOptimize(t){return t.map(n=>(n=n.reduce((r,i)=>{let s=r[r.length-1];return i==="**"&&s==="**"?r:i===".."&&s&&s!==".."&&s!=="."&&s!=="**"?(r.pop(),r):(r.push(i),r)},[]),n.length===0?[""]:n))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let n=!1;do{if(n=!1,!this.preserveMultipleSlashes){for(let i=1;i<t.length-1;i++){let s=t[i];i===1&&s===""&&t[0]===""||(s==="."||s==="")&&(n=!0,t.splice(i,1),i--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(n=!0,t.pop())}let r=0;for(;(r=t.indexOf("..",r+1))!==-1;){let i=t[r-1];i&&i!=="."&&i!==".."&&i!=="**"&&!(this.isWindows&&/^[a-z]:$/i.test(i))&&(n=!0,t.splice(r-1,2),r-=2)}}while(n);return t.length===0?[""]:t}firstPhasePreProcess(t){let n=!1;do{n=!1;for(let r of t){let i=-1;for(;(i=r.indexOf("**",i+1))!==-1;){let a=i;for(;r[a+1]==="**";)a++;a>i&&r.splice(i+1,a-i);let l=r[i+1],c=r[i+2],u=r[i+3];if(l!==".."||!c||c==="."||c===".."||!u||u==="."||u==="..")continue;n=!0,r.splice(i,1);let d=r.slice(0);d[i]="**",t.push(d),i--}if(!this.preserveMultipleSlashes){for(let a=1;a<r.length-1;a++){let l=r[a];a===1&&l===""&&r[0]===""||(l==="."||l==="")&&(n=!0,r.splice(a,1),a--)}r[0]==="."&&r.length===2&&(r[1]==="."||r[1]==="")&&(n=!0,r.pop())}let s=0;for(;(s=r.indexOf("..",s+1))!==-1;){let a=r[s-1];if(a&&a!=="."&&a!==".."&&a!=="**"){n=!0;let c=s===1&&r[s+1]==="**"?["."]:[];r.splice(s-1,2,...c),r.length===0&&r.push(""),s-=2}}}}while(n);return t}secondPhasePreProcess(t){for(let n=0;n<t.length-1;n++)for(let r=n+1;r<t.length;r++){let i=this.partsMatch(t[n],t[r],!this.preserveMultipleSlashes);if(i){t[n]=[],t[r]=i;break}}return t.filter(n=>n.length)}partsMatch(t,n,r=!1){let i=0,s=0,a=[],l="";for(;i<t.length&&s<n.length;)if(t[i]===n[s])a.push(l==="b"?n[s]:t[i]),i++,s++;else if(r&&t[i]==="**"&&n[s]===t[i+1])a.push(t[i]),i++;else if(r&&n[s]==="**"&&t[i]===n[s+1])a.push(n[s]),s++;else if(t[i]==="*"&&n[s]&&(this.options.dot||!n[s].startsWith("."))&&n[s]!=="**"){if(l==="b")return!1;l="a",a.push(t[i]),i++,s++}else if(n[s]==="*"&&t[i]&&(this.options.dot||!t[i].startsWith("."))&&t[i]!=="**"){if(l==="a")return!1;l="b",a.push(n[s]),i++,s++}else return!1;return t.length===n.length&&a}parseNegate(){if(this.nonegate)return;let t=this.pattern,n=!1,r=0;for(let i=0;i<t.length&&t.charAt(i)==="!";i++)n=!n,r++;r&&(this.pattern=t.slice(r)),this.negate=n}matchOne(t,n,r=!1){let i=0,s=0;if(this.isWindows){let l=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),c=!l&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),u=typeof n[0]=="string"&&/^[a-z]:$/i.test(n[0]),d=!u&&n[0]===""&&n[1]===""&&n[2]==="?"&&typeof n[3]=="string"&&/^[a-z]:$/i.test(n[3]),p=c?3:l?0:void 0,m=d?3:u?0:void 0;if(typeof p=="number"&&typeof m=="number"){let[h,g]=[t[p],n[m]];h.toLowerCase()===g.toLowerCase()&&(n[m]=h,s=m,i=p)}}let{optimizationLevel:a=1}=this.options;return a>=2&&(t=this.levelTwoFileOptimize(t)),n.includes(si)?this.#e(t,n,r,i,s):this.#r(t,n,r,i,s)}#e(t,n,r,i,s){let a=n.indexOf(si,s),l=n.lastIndexOf(si),[c,u,d]=r?[n.slice(s,a),n.slice(a+1),[]]:[n.slice(s,a),n.slice(a+1,l),n.slice(l+1)];if(c.length){let b=t.slice(i,i+c.length);if(!this.#r(b,c,r,0,0))return!1;i+=c.length,s+=c.length}let p=0;if(d.length){if(d.length+i>t.length)return!1;let b=t.length-d.length;if(this.#r(t,d,r,b,0))p=d.length;else{if(t[t.length-1]!==""||i+d.length===t.length||(b--,!this.#r(t,d,r,b,0)))return!1;p=d.length+1}}if(!u.length){let b=!!p;for(let w=i;w<t.length-p;w++){let E=String(t[w]);if(b=!0,E==="."||E===".."||!this.options.dot&&E.startsWith("."))return!1}return r||b}let m=[[[],0]],h=m[0],g=0,y=[0];for(let b of u)b===si?(y.push(g),h=[[],0],m.push(h)):(h[0].push(b),g++);let x=m.length-1,v=t.length-p;for(let b of m)b[1]=v-(y[x--]+b[0].length);return!!this.#n(t,m,i,0,r,0,!!p)}#n(t,n,r,i,s,a,l){let c=n[i];if(!c){for(let p=r;p<t.length;p++){l=!0;let m=t[p];if(m==="."||m===".."||!this.options.dot&&m.startsWith("."))return!1}return l}let[u,d]=c;for(;r<=d;){if(this.#r(t.slice(0,r+u.length),u,s,r,0)&&a<this.maxGlobstarRecursion){let h=this.#n(t,n,r+u.length,i+1,s,a+1,l);if(h!==!1)return h}let m=t[r];if(m==="."||m===".."||!this.options.dot&&m.startsWith("."))return!1;r++}return s||null}#r(t,n,r,i,s){let a,l,c,u;for(a=i,l=s,u=t.length,c=n.length;a<u&&l<c;a++,l++){this.debug("matchOne loop");let d=n[l],p=t[a];if(this.debug(n,d,p),d===!1||d===si)return!1;let m;if(typeof d=="string"?(m=p===d,this.debug("string match",d,p,m)):(m=d.test(p),this.debug("pattern match",d,p,m)),!m)return!1}if(a===u&&l===c)return!0;if(a===u)return r;if(l===c)return a===u-1&&t[a]==="";throw new Error("wtf?")}braceExpand(){return FQ(this.pattern,this.options)}parse(t){km(t);let n=this.options;if(t==="**")return si;if(t==="")return"";let r,i=null;(r=t.match(tPe))?i=n.dot?rPe:nPe:(r=t.match(HOe))?i=(n.nocase?n.dot?KOe:ZOe:n.dot?VOe:GOe)(r[1]):(r=t.match(iPe))?i=(n.nocase?n.dot?aPe:sPe:n.dot?oPe:lPe)(r):(r=t.match(JOe))?i=n.dot?QOe:XOe:(r=t.match(YOe))&&(i=ePe);let s=Jc.fromGlob(t,this.options).toMMPattern();return i&&typeof s=="object"&&Reflect.defineProperty(s,"test",{value:i}),s}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let n=this.options,r=n.noglobstar?dPe:n.dot?pPe:fPe,i=new Set(n.nocase?["i"]:[]),s=t.map(c=>{let u=c.map(p=>{if(p instanceof RegExp)for(let m of p.flags.split(""))i.add(m);return typeof p=="string"?xPe(p):p===si?si:p._src});u.forEach((p,m)=>{let h=u[m+1],g=u[m-1];p!==si||g===si||(g===void 0?h!==void 0&&h!==si?u[m+1]="(?:\\/|"+r+"\\/)?"+h:u[m]=r:h===void 0?u[m-1]=g+"(?:\\/|\\/"+r+")?":h!==si&&(u[m-1]=g+"(?:\\/|\\/"+r+"\\/)"+h,u[m+1]=si))});let d=u.filter(p=>p!==si);if(this.partial&&d.length>=1){let p=[];for(let m=1;m<=d.length;m++)p.push(d.slice(0,m).join("/"));return"(?:"+p.join("|")+")"}return d.join("/")}).join("|"),[a,l]=t.length>1?["(?:",")"]:["",""];s="^"+a+s+l+"$",this.partial&&(s="^(?:\\/|"+a+s.slice(1,-1)+l+")$"),this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,n=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&n)return!0;let r=this.options;this.isWindows&&(t=t.split("\\").join("/"));let i=this.slashSplit(t);this.debug(this.pattern,"split",i);let s=this.set;this.debug(this.pattern,"set",s);let a=i[i.length-1];if(!a)for(let l=i.length-2;!a&&l>=0;l--)a=i[l];for(let l of s){let c=i;if(r.matchBase&&l.length===1&&(c=[a]),this.matchOne(c,l,n))return r.flipNegate?!0:!this.negate}return r.flipNegate?!1:this.negate}static defaults(t){return Dr.defaults(t).Minimatch}};Dr.AST=Jc;Dr.Minimatch=cp;Dr.escape=L8;Dr.unescape=wl;import{gunzipSync as BMe}from"node:zlib";var Am=class{static{o(this,"Diff")}diff(t,n,r={}){let i;typeof r=="function"?(i=r,r={}):"callback"in r&&(i=r.callback);let s=this.castInput(t,r),a=this.castInput(n,r),l=this.removeEmpty(this.tokenize(s,r)),c=this.removeEmpty(this.tokenize(a,r));return this.diffWithOptionsObj(l,c,r,i)}diffWithOptionsObj(t,n,r,i){var s;let a=o(b=>{if(b=this.postProcess(b,r),i){setTimeout(function(){i(b)},0);return}else return b},"done"),l=n.length,c=t.length,u=1,d=l+c;r.maxEditLength!=null&&(d=Math.min(d,r.maxEditLength));let p=(s=r.timeout)!==null&&s!==void 0?s:1/0,m=Date.now()+p,h=[{oldPos:-1,lastComponent:void 0}],g=this.extractCommon(h[0],n,t,0,r);if(h[0].oldPos+1>=c&&g+1>=l)return a(this.buildValues(h[0].lastComponent,n,t));let y=-1/0,x=1/0,v=o(()=>{for(let b=Math.max(y,-u);b<=Math.min(x,u);b+=2){let w,E=h[b-1],S=h[b+1];E&&(h[b-1]=void 0);let k=!1;if(S){let D=S.oldPos-b;k=S&&0<=D&&D<l}let T=E&&E.oldPos+1<c;if(!k&&!T){h[b]=void 0;continue}if(!T||k&&E.oldPos<S.oldPos?w=this.addToPath(S,!0,!1,0,r):w=this.addToPath(E,!1,!0,1,r),g=this.extractCommon(w,n,t,b,r),w.oldPos+1>=c&&g+1>=l)return a(this.buildValues(w.lastComponent,n,t))||!0;h[b]=w,w.oldPos+1>=c&&(x=Math.min(x,b-1)),g+1>=l&&(y=Math.max(y,b+1))}u++},"execEditLength");if(i)o(function b(){setTimeout(function(){if(u>d||Date.now()>m)return i(void 0);v()||b()},0)},"exec")();else for(;u<=d&&Date.now()<=m;){let b=v();if(b)return b}}addToPath(t,n,r,i,s){let a=t.lastComponent;return a&&!s.oneChangePerToken&&a.added===n&&a.removed===r?{oldPos:t.oldPos+i,lastComponent:{count:a.count+1,added:n,removed:r,previousComponent:a.previousComponent}}:{oldPos:t.oldPos+i,lastComponent:{count:1,added:n,removed:r,previousComponent:a}}}extractCommon(t,n,r,i,s){let a=n.length,l=r.length,c=t.oldPos,u=c-i,d=0;for(;u+1<a&&c+1<l&&this.equals(r[c+1],n[u+1],s);)u++,c++,d++,s.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return d&&!s.oneChangePerToken&&(t.lastComponent={count:d,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=c,u}equals(t,n,r){return r.comparator?r.comparator(t,n):t===n||!!r.ignoreCase&&t.toLowerCase()===n.toLowerCase()}removeEmpty(t){let n=[];for(let r=0;r<t.length;r++)t[r]&&n.push(t[r]);return n}castInput(t,n){return t}tokenize(t,n){return Array.from(t)}join(t){return t.join("")}postProcess(t,n){return t}get useLongestToken(){return!1}buildValues(t,n,r){let i=[],s;for(;t;)i.push(t),s=t.previousComponent,delete t.previousComponent,t=s;i.reverse();let a=i.length,l=0,c=0,u=0;for(;l<a;l++){let d=i[l];if(d.removed)d.value=this.join(r.slice(u,u+d.count)),u+=d.count;else{if(!d.added&&this.useLongestToken){let p=n.slice(c,c+d.count);p=p.map(function(m,h){let g=r[u+h];return g.length>m.length?g:m}),d.value=this.join(p)}else d.value=this.join(n.slice(c,c+d.count));c+=d.count,d.added||(u+=d.count)}}return i}};var j8=class extends Am{static{o(this,"LineDiff")}constructor(){super(...arguments),this.tokenize=bPe}equals(t,n,r){return r.ignoreWhitespace?((!r.newlineIsToken||!t.includes(`
|
|
4312
|
+
`}o(xQ,"pageStyles");var C8={name:"dsh-edge",version:"0.15.0",description:"Your DeepSeek Harness, anywhere \u2014 deploy a persistent personal coding agent to Cloudflare Workers in one command",author:"pawaca",license:"MIT",type:"module",bin:{"dsh-edge":"scripts/cli.mjs"},files:["dist","worker","scripts/*.d.mts","scripts/*.mjs","wrangler.jsonc","README.md","README.zh.md","LICENSE","THIRD_PARTY_NOTICES.md"],repository:{type:"git",url:"git+https://github.com/pawaca/dsh-edge.git",directory:"apps/dsh-edge"},homepage:"https://github.com/pawaca/dsh-edge#readme",bugs:{url:"https://github.com/pawaca/dsh-edge/issues"},keywords:["deepseek","deepseek-harness","ai-agents","byok","cloudflare-workers","durable-objects","self-hosted"],engines:{node:">=22.14.0"},publishConfig:{access:"public"},dshEdge:{upstreamVersion:"0.1.5-rc.2"},scripts:{"bundle:direct":"pnpm run web:build && pnpm --dir standalone run build:worker:direct && node standalone/scripts/promote.mjs direct","bundle:isolated":"pnpm run web:build && pnpm --dir standalone run build:worker:isolated && node standalone/scripts/promote.mjs isolated","bundle:workers":"pnpm --dir standalone run build && pnpm --dir standalone run verify && node standalone/scripts/promote.mjs all",dev:"pnpm run bundle:direct && node scripts/dev.mjs direct","dev:isolated":"pnpm run bundle:isolated && node scripts/dev.mjs isolated","dsh-edge":"node scripts/cli.mjs","example:install":"node examples/install-keyless.mjs","install:cloudflare":"pnpm run bundle:workers && node scripts/cli.mjs install","legal:write":"node scripts/legal-files.mjs write","pack:verify":"node scripts/verify-packed.mjs",prepack:"node scripts/legal-files.mjs verify && pnpm run bundle:workers","web:build":"pnpm --dir standalone run build:web && node standalone/scripts/promote.mjs web",test:"vitest run --root ../.. --project edge-runtime","test:integration":"pnpm run bundle:workers && node tests/run-session-integration.mjs","test:snapshot":"vitest run --root ../.. --config apps/dsh-edge/vitest.snapshot.config.ts",typecheck:"tsc --noEmit"},dependencies:{"@clack/prompts":"1.7.0","compare-versions":"6.1.1",execa:"^10.0.1","jsonc-parser":"^3.3.1",wrangler:"4.129.0"},devDependencies:{"@cloudflare/computer":"0.2.1","@cloudflare/workers-types":"5.20260904.1","@deepseek-ai/cordis":"4.0.2","@deepseek-ai/dsh-agent":"0.1.5-rc.2","@deepseek-ai/dsh-agent-loop":"0.1.5-rc.2","@deepseek-ai/dsh-anonymous-user-id":"0.1.5-rc.2","@deepseek-ai/dsh-api-gateway":"0.1.5-rc.2","@deepseek-ai/dsh-api-remotes":"0.1.5-rc.2","@deepseek-ai/dsh-api-session-controller":"0.1.5-rc.2","@deepseek-ai/dsh-api-settings-controller":"0.1.5-rc.2","@deepseek-ai/dsh-api-workspace-controller":"0.1.5-rc.2","@deepseek-ai/dsh-api-workspace-files":"0.1.5-rc.2","@deepseek-ai/dsh-attachment":"0.1.5-rc.2","@deepseek-ai/dsh-brand":"0.1.5-rc.2","@deepseek-ai/dsh-client-store":"0.1.5-rc.2","@deepseek-ai/dsh-commands":"0.1.5-rc.2","@deepseek-ai/dsh-compaction":"0.1.5-rc.2","@deepseek-ai/dsh-compaction-basic":"0.1.5-rc.2","@deepseek-ai/dsh-compaction-tool-result-pruner":"0.1.5-rc.2","@deepseek-ai/dsh-credentials":"0.1.5-rc.2","@deepseek-ai/dsh-file-reference":"0.1.5-rc.2","@deepseek-ai/dsh-fs":"0.1.5-rc.2","@deepseek-ai/dsh-goal":"0.1.5-rc.2","@deepseek-ai/dsh-goal-round-driver":"0.1.5-rc.2","@deepseek-ai/dsh-host-directory-picker":"0.1.5-rc.2","@deepseek-ai/dsh-jobs":"0.1.5-rc.2","@deepseek-ai/dsh-jobs-local":"0.1.5-rc.2","@deepseek-ai/dsh-host-plugin-inventory":"0.1.5-rc.2","@deepseek-ai/dsh-launch-environment":"0.1.5-rc.2","@deepseek-ai/dsh-llm":"0.1.5-rc.2","@deepseek-ai/dsh-llm-deepseek":"0.1.5-rc.2","@deepseek-ai/dsh-message-feedback":"0.1.5-rc.2","@deepseek-ai/dsh-output-retention":"0.1.5-rc.2","@deepseek-ai/dsh-plan-mode":"0.1.5-rc.2","@deepseek-ai/dsh-sandbox":"0.1.5-rc.2","@deepseek-ai/dsh-scope":"0.1.5-rc.2","@deepseek-ai/dsh-schedule":"0.1.5-rc.2","@deepseek-ai/dsh-session":"0.1.5-rc.2","@deepseek-ai/dsh-session-format":"0.1.5-rc.2","@deepseek-ai/dsh-session-format-catalog":"0.1.5-rc.2","@deepseek-ai/dsh-session-format-v0-to-v1":"0.1.5-rc.2","@deepseek-ai/dsh-session-format-v1-to-v2":"0.1.5-rc.2","@deepseek-ai/dsh-session-format-v2-to-v3":"0.1.5-rc.2","@deepseek-ai/dsh-session-persistence":"0.1.5-rc.2","@deepseek-ai/dsh-session-projection":"0.1.5-rc.2","@deepseek-ai/dsh-session-projection-cache":"0.1.5-rc.2","@deepseek-ai/dsh-session-query":"0.1.5-rc.2","@deepseek-ai/dsh-session-reference":"0.1.5-rc.2","@deepseek-ai/dsh-session-title":"0.1.5-rc.2","@deepseek-ai/dsh-session-title-first-prompt-llm":"0.1.5-rc.2","@deepseek-ai/dsh-session-title-llm":"0.1.5-rc.2","@deepseek-ai/dsh-settings":"0.1.5-rc.2","@deepseek-ai/dsh-skill":"0.1.5-rc.2","@deepseek-ai/dsh-subagent":"0.1.5-rc.2","@deepseek-ai/dsh-subagent-in-process-driver":"0.1.5-rc.2","@deepseek-ai/dsh-subagent-spawn-in-process":"0.1.5-rc.2","@deepseek-ai/dsh-tool-subagent":"0.1.5-rc.2","@deepseek-ai/dsh-spill":"0.1.5-rc.2","@deepseek-ai/dsh-spill-policy":"0.1.5-rc.2","@deepseek-ai/dsh-storage":"0.1.5-rc.2","@deepseek-ai/dsh-storage-domain":"0.1.5-rc.2","@deepseek-ai/dsh-system-prompt":"0.1.5-rc.2","@deepseek-ai/dsh-timeout":"0.1.5-rc.2","@deepseek-ai/dsh-token-meter":"0.1.5-rc.2","@deepseek-ai/dsh-tool-ask-user":"0.1.5-rc.2","@deepseek-ai/dsh-tool-call-timeout-policy":"0.1.5-rc.2","@deepseek-ai/dsh-tool-fs":"0.1.5-rc.2","@deepseek-ai/dsh-tool-goal":"0.1.5-rc.2","@deepseek-ai/dsh-tool-jobs":"0.1.5-rc.2","@deepseek-ai/dsh-tool-skill":"0.1.5-rc.2","@deepseek-ai/dsh-tool-web":"0.1.5-rc.2","@deepseek-ai/dsh-tools":"0.1.5-rc.2","@deepseek-ai/dsh-typert-protocol":"0.1.5-rc.2","@deepseek-ai/dsh-typert-registry":"0.1.5-rc.2","@deepseek-ai/dsh-user-questions":"0.1.5-rc.2","@deepseek-ai/dsh-util-values":"0.1.5-rc.2","@deepseek-ai/dsh-web":"0.1.5-rc.2","@deepseek-ai/dsh-web-fetch-http":"0.1.5-rc.2","@deepseek-ai/dsh-web-search-deepseek":"0.1.5-rc.2","@deepseek-ai/dsh-workspace":"0.1.5-rc.2","@mixmark-io/domino":"2.2.0","fast-png":"8.0.0","jpeg-js":"0.4.4","just-bash":"3.4.2",playwright:"^1.49.0",typescript:"^6.0.3",vitest:"^4.1.8",ws:"^8.21.0"}};var px=C8.version,vQ=C8.dshEdge.upstreamVersion;function uOe(){return"dsh-edge@0.15.0/isolated"}o(uOe,"resolveEdgeDeploymentId");function Sm(e){return{baseURL:z7(e.DEEPSEEK_BASE_URL),maxTokens:G7(e.DEEPSEEK_MAX_OUTPUT_TOKENS),model:Ac(e.DEEPSEEK_MODEL),reasoningEffort:W7(e.DEEPSEEK_REASONING_EFFORT),searchBaseURL:A3(e.DEEPSEEK_SEARCH_BASE_URL),streamIdleTimeoutMs:H7(e.DEEPSEEK_STREAM_IDLE_TIMEOUT_MS),commandTimeoutPolicy:xm(e.DSH_EDGE_DEFAULT_COMMAND_TIMEOUT_MS,e.DSH_EDGE_MAX_COMMAND_TIMEOUT_MS)}}o(Sm,"resolveEdgeDeploymentConfig");function dOe(e){return typeof e.DEEPSEEK_API_KEY=="string"&&e.DEEPSEEK_API_KEY.trim().length>0}o(dOe,"edgeDeploymentApiKeyConfigured");function pOe(e){let t=z7(e),n=new URL(t);return n.search.length===0&&n.hash.length===0?t:(n.search="",n.hash="",n.href)}o(pOe,"projectedEdgeBaseURL");function R8(e,t){return{shell:e.LOADER===void 0?"just-bash-direct":"just-bash-isolated",storage:"durable-object-sqlite-vfs",attachmentStorage:t??(e.DSH_EDGE_ATTACHMENTS===void 0?"temporary-do":"private-r2"),deploymentId:uOe(),apiKeyConfigured:dOe(e),baseURL:pOe(e.DEEPSEEK_BASE_URL),maxTokens:G7(e.DEEPSEEK_MAX_OUTPUT_TOKENS),model:Ac(e.DEEPSEEK_MODEL),reasoningEffort:W7(e.DEEPSEEK_REASONING_EFFORT),searchBaseURL:A3(e.DEEPSEEK_SEARCH_BASE_URL),streamIdleTimeoutMs:H7(e.DEEPSEEK_STREAM_IDLE_TIMEOUT_MS),commandTimeoutPolicy:xm(e.DSH_EDGE_DEFAULT_COMMAND_TIMEOUT_MS,e.DSH_EDGE_MAX_COMMAND_TIMEOUT_MS)}}o(R8,"resolveEdgeDeploymentProfile");function fx(e){Sm(e);let t=R8(e);return{ok:!0,service:"dsh-edge",storage:t.storage,attachmentStorage:t.attachmentStorage,shell:t.shell,agent:"upstream-react-loop-agent",access:"single-owner-cookie",deploymentId:t.deploymentId,...e.CF_VERSION_METADATA===void 0?{}:{workerVersionId:e.CF_VERSION_METADATA.id},version:px,upstreamVersion:vQ,status:"ready"}}o(fx,"resolveEdgeDeploymentHealth");import{AsyncLocalStorage as Rze}from"node:async_hooks";import{WorkerEntrypoint as iyt}from"cloudflare:workers";var fu=Ll(bQ(),1);var $8=o((e,t,n)=>{let r=e instanceof RegExp?wQ(e,n):e,i=t instanceof RegExp?wQ(t,n):t,s=r!==null&&i!=null&&fOe(r,i,n);return s&&{start:s[0],end:s[1],pre:n.slice(0,s[0]),body:n.slice(s[0]+r.length,s[1]),post:n.slice(s[1]+i.length)}},"balanced"),wQ=o((e,t)=>{let n=t.match(e);return n?n[0]:null},"maybeMatch"),fOe=o((e,t,n)=>{let r,i,s,a,l,c=n.indexOf(e),u=n.indexOf(t,c+1),d=c;if(c>=0&&u>0){if(e===t)return[c,u];for(r=[],s=n.length;d>=0&&!l;){if(d===c)r.push(d),c=n.indexOf(e,d+1);else if(r.length===1){let p=r.pop();p!==void 0&&(l=[p,u])}else i=r.pop(),i!==void 0&&i<s&&(s=i,a=u),u=n.indexOf(t,d+1);d=c<u&&c>=0?c:u}r.length&&a!==void 0&&(l=[s,a])}return l},"range");var SQ="\0SLASH"+Math.random()+"\0",EQ="\0OPEN"+Math.random()+"\0",P8="\0CLOSE"+Math.random()+"\0",kQ="\0COMMA"+Math.random()+"\0",_Q="\0PERIOD"+Math.random()+"\0",hOe=new RegExp(SQ,"g"),mOe=new RegExp(EQ,"g"),gOe=new RegExp(P8,"g"),yOe=new RegExp(kQ,"g"),xOe=new RegExp(_Q,"g"),vOe=/\\\\/g,bOe=/\\{/g,wOe=/\\}/g,SOe=/\\,/g,EOe=/\\\./g,kOe=1e5,_Oe=4e6;function N8(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}o(N8,"numeric");function AOe(e){return e.replace(vOe,SQ).replace(bOe,EQ).replace(wOe,P8).replace(SOe,kQ).replace(EOe,_Q)}o(AOe,"escapeBraces");function TOe(e){return e.replace(hOe,"\\").replace(mOe,"{").replace(gOe,"}").replace(yOe,",").replace(xOe,".")}o(TOe,"unescapeBraces");function AQ(e){if(!e)return[""];let t=[],n=$8("{","}",e);if(!n)return e.split(",");let{pre:r,body:i,post:s}=n,a=r.split(",");a[a.length-1]+="{"+i+"}";let l=AQ(s);return s.length&&(a[a.length-1]+=l.shift(),a.push.apply(a,l)),t.push.apply(t,a),t}o(AQ,"parseCommaParts");function TQ(e,t={}){if(!e)return[];let{max:n=kOe,maxLength:r=_Oe}=t;return e.slice(0,2)==="{}"&&(e="\\{\\}"+e.slice(2)),O8(AOe(e),n,r,!0).map(TOe)}o(TQ,"expand");function IOe(e){return"{"+e+"}"}o(IOe,"embrace");function COe(e){return/^-?0\d/.test(e)}o(COe,"isPadded");function ROe(e,t){return e<=t}o(ROe,"lte");function $Oe(e,t){return e>=t}o($Oe,"gte");function Em(e,t,n,r,i,s){let a=[],l=0;for(let c=0;c<e.length;c++)for(let u=0;u<n.length;u++){if(a.length>=r)return a;let d=e[c]+t+n[u];if(!(s&&!d)){if(l+d.length>i)return a;a.push(d),l+=d.length}}return a}o(Em,"combine");function NOe(e,t,n,r){let i=e.split(/\.\./),s=[];if(i[0]===void 0||i[1]===void 0)return s;let a=N8(i[0]),l=N8(i[1]),c=Math.max(i[0].length,i[1].length),u=i.length===3&&i[2]!==void 0?Math.max(Math.abs(N8(i[2])),1):1,d=ROe;l<a&&(u*=-1,d=$Oe);let m=i.some(COe),h=0;for(let g=a;d(g,l)&&s.length<n;g+=u){let y;if(t)y=String.fromCharCode(g),y==="\\"&&(y="");else if(y=String(g),m){let x=c-y.length;if(x>0){let v=new Array(x+1).join("0");g<0?y="-"+v+y.slice(1):y=v+y}}if(h+y.length>r)break;s.push(y),h+=y.length}return s}o(NOe,"expandSequence");function O8(e,t,n,r){let i=[""],s=!1,a=!0;for(;;){let l=$8("{","}",e);if(!l)return Em(i,e,[""],t,n,s);let c=l.pre;if(/\$$/.test(c)){if(i=Em(i,c+"{"+l.body+"}",[""],t,n,s&&!l.post.length),a=!1,!l.post.length)break;e=l.post;continue}let u=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(l.body),d=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(l.body),p=u||d,m=l.body.indexOf(",")>=0;if(!p&&!m){if(l.post.match(/,(?!,).*\}/)){e=l.pre+"{"+l.body+P8+l.post,r=!0;continue}return Em(i,c+"{"+l.body+"}"+l.post,[""],t,n,s)}a&&(s=r&&!p,a=!1);let h;if(p)h=NOe(l.body,d,t,n);else{let g=AQ(l.body);if(g.length===1&&g[0]!==void 0&&(g=O8(g[0],t,n,!1).map(IOe),g.length===1)){if(i=Em(i,c+g[0],[""],t,n,s&&!l.post.length),!l.post.length)break;e=l.post;continue}let y=s&&!l.post.length&&!c;for(let v=0;y&&v<i.length;v++)i[v]&&(y=!1);h=[];let x=0;e:for(let v=0;v<g.length;v++){let b=O8(g[v],t,n,!1);for(let w=0;w<b.length;w++){let E=b[w];if(!(y&&!E)){if(h.length>=t||x+E.length>n)break e;h.push(E),x+=E.length}}}}if(i=Em(i,c,h,t,n,s&&!l.post.length),!l.post.length)break;e=l.post}return i}o(O8,"expand_");var km=o(e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")},"assertValidPattern");var OOe={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},_m=o(e=>e.replace(/[[\]\\-]/g,"\\$&"),"braceEscape"),POe=o(e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regexpEscape"),IQ=o(e=>e.join(""),"rangesToString"),CQ=o((e,t)=>{let n=t;if(e.charAt(n)!=="[")throw new Error("not in a brace expression");let r=[],i=[],s=n+1,a=!1,l=!1,c=!1,u=!1,d=n,p="";e:for(;s<e.length;){let y=e.charAt(s);if((y==="!"||y==="^")&&s===n+1){u=!0,s++;continue}if(y==="]"&&a&&!c){d=s+1;break}if(a=!0,y==="\\"&&!c){c=!0,s++;continue}if(y==="["&&!c){for(let[x,[v,b,w]]of Object.entries(OOe))if(e.startsWith(x,s)){if(p)return["$.",!1,e.length-n,!0];s+=x.length,w?i.push(v):r.push(v),l=l||b;continue e}}if(c=!1,p){y>p?r.push(_m(p)+"-"+_m(y)):y===p&&r.push(_m(y)),p="",s++;continue}if(e.startsWith("-]",s+1)){r.push(_m(y+"-")),s+=2;continue}if(e.startsWith("-",s+1)){p=y,s+=2;continue}r.push(_m(y)),s++}if(d<s)return["",!1,0,!1];if(!r.length&&!i.length)return["$.",!1,e.length-n,!0];if(i.length===0&&r.length===1&&/^\\?.$/.test(r[0])&&!u){let y=r[0].length===2?r[0].slice(-1):r[0];return[POe(y),!1,d-n,!1]}let m="["+(u?"^":"")+IQ(r)+"]",h="["+(u?"":"^")+IQ(i)+"]";return[r.length&&i.length?"("+m+"|"+h+")":r.length?m:h,l,d-n,!0]},"parseClass");var wl=o((e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!0}={})=>n?t?e.replace(/\[([^/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^/\\])\]/g,"$1$2").replace(/\\([^/])/g,"$1"):t?e.replace(/\[([^/\\{}])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^/\\{}])\]/g,"$1$2").replace(/\\([^/{}])/g,"$1"),"unescape");var Ni,DOe=new Set(["!","?","+","*","@"]),D8=o(e=>DOe.has(e),"isExtglobType"),RQ=o(e=>D8(e.type),"isExtglobAST"),MOe=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),LOe=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),jOe=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),$Q=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),FOe="(?!(?:^|/)\\.\\.?(?:$|/))",mx="(?!\\.)",UOe=new Set(["[","."]),qOe=new Set(["..","."]),BOe=new Set("().*{}+?[]^$\\!"),zOe=o(e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),M8="[^/]",NQ=M8+"*?",OQ=M8+"+?",WOe=0,Jc=class{static{o(this,"AST")}type;#e;#n;#r=!1;#t=[];#i;#s;#o;#d=!1;#l;#a;#c=!1;id=++WOe;get depth(){return(this.#i?.depth??-1)+1}[Symbol.for("nodejs.util.inspect.custom")](){return{"@@type":"AST",id:this.id,type:this.type,root:this.#e.id,parent:this.#i?.id,depth:this.depth,partsLength:this.#t.length,parts:this.#t}}constructor(t,n,r={}){this.type=t,t&&(this.#n=!0),this.#i=n,this.#e=this.#i?this.#i.#e:this,this.#l=this.#e===this?r:this.#e.#l,this.#o=this.#e===this?[]:this.#e.#o,t==="!"&&!this.#e.#d&&this.#o.push(this),this.#s=this.#i?this.#i.#t.length:0}get hasMagic(){if(this.#n!==void 0)return this.#n;for(let t of this.#t)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#n=!0;return this.#n}toString(){return this.#a!==void 0?this.#a:this.type?this.#a=this.type+"("+this.#t.map(t=>String(t)).join("|")+")":this.#a=this.#t.map(t=>String(t)).join("")}#k(){if(this!==this.#e)throw new Error("should only call on root");if(this.#d)return this;this.toString(),this.#d=!0;let t;for(;t=this.#o.pop();){if(t.type!=="!")continue;let n=t,r=n.#i;for(;r;){for(let i=n.#s+1;!r.type&&i<r.#t.length;i++)for(let s of t.#t){if(typeof s=="string")throw new Error("string part in extglob AST??");s.copyIn(r.#t[i])}n=r,r=n.#i}}return this}push(...t){for(let n of t)if(n!==""){if(typeof n!="string"&&!(n instanceof Ni&&n.#i===this))throw new Error("invalid part: "+n);this.#t.push(n)}}toJSON(){let t=this.type===null?this.#t.slice().map(n=>typeof n=="string"?n:n.toJSON()):[this.type,...this.#t.map(n=>n.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#d&&this.#i?.type==="!")&&t.push({}),t}isStart(){if(this.#e===this)return!0;if(!this.#i?.isStart())return!1;if(this.#s===0)return!0;let t=this.#i;for(let n=0;n<this.#s;n++){let r=t.#t[n];if(!(r instanceof Ni&&r.type==="!"))return!1}return!0}isEnd(){if(this.#e===this||this.#i?.type==="!")return!0;if(!this.#i?.isEnd())return!1;if(!this.type)return this.#i?.isEnd();let t=this.#i?this.#i.#t.length:0;return this.#s===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){let n=new Ni(this.type,t);for(let r of this.#t)n.copyIn(r);return n}static#m(t,n,r,i,s){let a=i.maxExtglobRecursion??2,l=!1,c=!1,u=-1,d=!1;if(n.type===null){let y=r,x="";for(;y<t.length;){let v=t.charAt(y++);if(l||v==="\\"){l=!l,x+=v;continue}if(c){y===u+1?(v==="^"||v==="!")&&(d=!0):v==="]"&&!(y===u+2&&d)&&(c=!1),x+=v;continue}else if(v==="["){c=!0,u=y,d=!1,x+=v;continue}if(!i.noext&&D8(v)&&t.charAt(y)==="("&&s<=a){n.push(x),x="";let w=new Ni(v,n);y=Ni.#m(t,w,y,i,s+1),n.push(w);continue}x+=v}return n.push(x),y}let p=r+1,m=new Ni(null,n),h=[],g="";for(;p<t.length;){let y=t.charAt(p++);if(l||y==="\\"){l=!l,g+=y;continue}if(c){p===u+1?(y==="^"||y==="!")&&(d=!0):y==="]"&&!(p===u+2&&d)&&(c=!1),g+=y;continue}else if(y==="["){c=!0,u=p,d=!1,g+=y;continue}if(!i.noext&&D8(y)&&t.charAt(p)==="("&&(s<=a||n&&n.#y(y))){let v=n&&n.#y(y)?0:1;m.push(g),g="";let b=new Ni(y,m);m.push(b),p=Ni.#m(t,b,p,i,s+v);continue}if(y==="|"){m.push(g),g="",h.push(m),m=new Ni(null,n);continue}if(y===")")return g===""&&n.#t.length===0&&(n.#c=!0),m.push(g),g="",n.push(...h,m),p;g+=y}return n.type=null,n.#n=void 0,n.#t=[t.substring(r-1)],p}#O(t){return this.#g(t,LOe)}#g(t,n=MOe){if(!t||typeof t!="object"||t.type!==null||t.#t.length!==1||this.type===null)return!1;let r=t.#t[0];return!r||typeof r!="object"||r.type===null?!1:this.#y(r.type,n)}#y(t,n=jOe){return!!n.get(this.type)?.includes(t)}#p(t,n){let r=t.#t[0],i=new Ni(null,r,this.options);i.#t.push(""),r.push(i),this.#_(t,n)}#_(t,n){let r=t.#t[0];this.#t.splice(n,1,...r.#t);for(let i of r.#t)typeof i=="object"&&(i.#i=this);this.#a=void 0}#A(t){return!!$Q.get(this.type)?.has(t)}#P(t){if(!t||typeof t!="object"||t.type!==null||t.#t.length!==1||this.type===null||this.#t.length!==1)return!1;let n=t.#t[0];return!n||typeof n!="object"||n.type===null?!1:this.#A(n.type)}#x(t){let n=$Q.get(this.type),r=t.#t[0],i=n?.get(r.type);if(!i)return!1;this.#t=r.#t;for(let s of this.#t)typeof s=="object"&&(s.#i=this);this.type=i,this.#a=void 0,this.#c=!1}static fromGlob(t,n={}){let r=new Ni(null,void 0,n);return Ni.#m(t,r,0,n,0),r}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let t=this.toString(),[n,r,i,s]=this.toRegExpSource();if(!(i||this.#n||this.#l.nocase&&!this.#l.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return r;let l=(this.#l.nocase?"i":"")+(s?"u":"");return Object.assign(new RegExp(`^${n}$`,l),{_src:n,_glob:t})}get options(){return this.#l}toRegExpSource(t){let n=t??!!this.#l.dot;if(this.#e===this&&(this.#f(),this.#k()),!RQ(this)){let c=this.isStart()&&this.isEnd()&&!this.#t.some(h=>typeof h!="string"),u=this.#t.map(h=>{let[g,y,x,v]=typeof h=="string"?Ni.#T(h,this.#n,c):h.toRegExpSource(t);return this.#n=this.#n||x,this.#r=this.#r||v,g}).join(""),d="";if(this.isStart()&&typeof this.#t[0]=="string"&&!(this.#t.length===1&&qOe.has(this.#t[0]))){let g=UOe,y=n&&g.has(u.charAt(0))||u.startsWith("\\.")&&g.has(u.charAt(2))||u.startsWith("\\.\\.")&&g.has(u.charAt(4)),x=!n&&!t&&g.has(u.charAt(0));d=y?FOe:x?mx:""}let p="";return this.isEnd()&&this.#e.#d&&this.#i?.type==="!"&&(p="(?:$|\\/)"),[d+u+p,wl(u),this.#n=!!this.#n,this.#r]}let r=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:",s=this.#v(n);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){let c=this.toString(),u=this;return u.#t=[c],u.type=null,u.#n=void 0,[c,wl(this.toString()),!1,!1]}let a=!r||t||n||!mx?"":this.#v(!0);a===s&&(a=""),a&&(s=`(?:${s})(?:${a})*?`);let l="";if(this.type==="!"&&this.#c)l=(this.isStart()&&!n?mx:"")+OQ;else{let c=this.type==="!"?"))"+(this.isStart()&&!n&&!t?mx:"")+NQ+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&a?")":this.type==="*"&&a?")?":`)${this.type}`;l=i+s+c}return[l,wl(s),this.#n=!!this.#n,this.#r]}#f(){if(RQ(this)){let t=0,n=!1;do{n=!0;for(let r=0;r<this.#t.length;r++){let i=this.#t[r];typeof i=="object"&&(i.#f(),this.#g(i)?(n=!1,this.#_(i,r)):this.#O(i)?(n=!1,this.#p(i,r)):this.#P(i)&&(n=!1,this.#x(i)))}}while(!n&&++t<10)}else for(let t of this.#t)typeof t=="object"&&t.#f();this.#a=void 0}#v(t){return this.#t.map(n=>{if(typeof n=="string")throw new Error("string type in extglob ast??");let[r,i,s,a]=n.toRegExpSource(t);return this.#r=this.#r||a,r}).filter(n=>!(this.isStart()&&this.isEnd())||!!n).join("|")}static#T(t,n,r=!1){let i=!1,s="",a=!1,l=!1;for(let c=0;c<t.length;c++){let u=t.charAt(c);if(i){i=!1,s+=(BOe.has(u)?"\\":"")+u;continue}if(u==="*"){if(l)continue;l=!0,s+=r&&/^[*]+$/.test(t)?OQ:NQ,n=!0;continue}else l=!1;if(u==="\\"){c===t.length-1?s+="\\\\":i=!0;continue}if(u==="["){let[d,p,m,h]=CQ(t,c);if(m){s+=d,a=a||p,c+=m-1,n=n||h;continue}}if(u==="?"){s+=M8,n=!0;continue}s+=zOe(u)}return[s,wl(t),!!n,a]}};Ni=Jc;var L8=o((e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!1}={})=>n?t?e.replace(/[?*()[\]{}]/g,"[$&]"):e.replace(/[?*()[\]\\{}]/g,"\\$&"):t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&"),"escape");var Dr=o((e,t,n={})=>(km(t),!n.nocomment&&t.charAt(0)==="#"?!1:new cp(t,n).match(e)),"minimatch"),HOe=/^\*+([^+@!?*[(]*)$/,GOe=o(e=>t=>!t.startsWith(".")&&t.endsWith(e),"starDotExtTest"),VOe=o(e=>t=>t.endsWith(e),"starDotExtTestDot"),ZOe=o(e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),"starDotExtTestNocase"),KOe=o(e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),"starDotExtTestNocaseDot"),JOe=/^\*+\.\*+$/,XOe=o(e=>!e.startsWith(".")&&e.includes("."),"starDotStarTest"),QOe=o(e=>e!=="."&&e!==".."&&e.includes("."),"starDotStarTestDot"),YOe=/^\.\*+$/,ePe=o(e=>e!=="."&&e!==".."&&e.startsWith("."),"dotStarTest"),tPe=/^\*+$/,nPe=o(e=>e.length!==0&&!e.startsWith("."),"starTest"),rPe=o(e=>e.length!==0&&e!=="."&&e!=="..","starTestDot"),iPe=/^\?+([^+@!?*[(]*)?$/,sPe=o(([e,t=""])=>{let n=MQ([e]);return t?(t=t.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(t)):n},"qmarksTestNocase"),aPe=o(([e,t=""])=>{let n=LQ([e]);return t?(t=t.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(t)):n},"qmarksTestNocaseDot"),oPe=o(([e,t=""])=>{let n=LQ([e]);return t?r=>n(r)&&r.endsWith(t):n},"qmarksTestDot"),lPe=o(([e,t=""])=>{let n=MQ([e]);return t?r=>n(r)&&r.endsWith(t):n},"qmarksTest"),MQ=o(([e])=>{let t=e.length;return n=>n.length===t&&!n.startsWith(".")},"qmarksTestNoExt"),LQ=o(([e])=>{let t=e.length;return n=>n.length===t&&n!=="."&&n!==".."},"qmarksTestNoExtDot"),jQ=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",PQ={win32:{sep:"\\"},posix:{sep:"/"}},cPe=jQ==="win32"?PQ.win32.sep:PQ.posix.sep;Dr.sep=cPe;var si=Symbol("globstar **");Dr.GLOBSTAR=si;var uPe="[^/]",dPe=uPe+"*?",pPe="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",fPe="(?:(?!(?:\\/|^)\\.).)*?",hPe=o((e,t={})=>n=>Dr(n,e,t),"filter");Dr.filter=hPe;var ds=o((e,t={})=>Object.assign({},e,t),"ext"),mPe=o(e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return Dr;let t=Dr;return Object.assign(o((r,i,s={})=>t(r,i,ds(e,s)),"m"),{Minimatch:class extends t.Minimatch{static{o(this,"Minimatch")}constructor(i,s={}){super(i,ds(e,s))}static defaults(i){return t.defaults(ds(e,i)).Minimatch}},AST:class extends t.AST{static{o(this,"AST")}constructor(i,s,a={}){super(i,s,ds(e,a))}static fromGlob(i,s={}){return t.AST.fromGlob(i,ds(e,s))}},unescape:o((r,i={})=>t.unescape(r,ds(e,i)),"unescape"),escape:o((r,i={})=>t.escape(r,ds(e,i)),"escape"),filter:o((r,i={})=>t.filter(r,ds(e,i)),"filter"),defaults:o(r=>t.defaults(ds(e,r)),"defaults"),makeRe:o((r,i={})=>t.makeRe(r,ds(e,i)),"makeRe"),braceExpand:o((r,i={})=>t.braceExpand(r,ds(e,i)),"braceExpand"),match:o((r,i,s={})=>t.match(r,i,ds(e,s)),"match"),sep:t.sep,GLOBSTAR:si})},"defaults");Dr.defaults=mPe;var FQ=o((e,t={})=>(km(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:TQ(e,{max:t.braceExpandMax})),"braceExpand");Dr.braceExpand=FQ;var gPe=o((e,t={})=>new cp(e,t).makeRe(),"makeRe");Dr.makeRe=gPe;var yPe=o((e,t,n={})=>{let r=new cp(t,n);return e=e.filter(i=>r.match(i)),r.options.nonull&&!e.length&&e.push(t),e},"match");Dr.match=yPe;var DQ=/[?*]|[+@!]\(.*?\)|\[|\]/,xPe=o(e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),cp=class{static{o(this,"Minimatch")}options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(t,n={}){km(t),n=n||{},this.options=n,this.maxGlobstarRecursion=n.maxGlobstarRecursion??200,this.pattern=t,this.platform=n.platform||jQ,this.isWindows=this.platform==="win32";let r="allowWindowsEscape";this.windowsPathsNoEscape=!!n.windowsPathsNoEscape||n[r]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!n.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!n.nonegate,this.comment=!1,this.empty=!1,this.partial=!!n.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=n.windowsNoMagicRoot!==void 0?n.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let n of t)if(typeof n!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,n=this.options;if(!n.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],n.debug&&(this.debug=(...s)=>console.error(...s)),this.debug(this.pattern,this.globSet);let r=this.globSet.map(s=>this.slashSplit(s));this.globParts=this.preprocess(r),this.debug(this.pattern,this.globParts);let i=this.globParts.map((s,a,l)=>{if(this.isWindows&&this.windowsNoMagicRoot){let c=s[0]===""&&s[1]===""&&(s[2]==="?"||!DQ.test(s[2]))&&!DQ.test(s[3]),u=/^[a-z]:/i.test(s[0]);if(c)return[...s.slice(0,4),...s.slice(4).map(d=>this.parse(d))];if(u)return[s[0],...s.slice(1).map(d=>this.parse(d))]}return s.map(c=>this.parse(c))});if(this.debug(this.pattern,i),this.set=i.filter(s=>s.indexOf(!1)===-1),this.isWindows)for(let s=0;s<this.set.length;s++){let a=this.set[s];a[0]===""&&a[1]===""&&this.globParts[s][2]==="?"&&typeof a[3]=="string"&&/^[a-z]:$/i.test(a[3])&&(a[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let r of t)for(let i=0;i<r.length;i++)r[i]==="**"&&(r[i]="*");let{optimizationLevel:n=1}=this.options;return n>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):n>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(n=>{let r=-1;for(;(r=n.indexOf("**",r+1))!==-1;){let i=r;for(;n[i+1]==="**";)i++;i!==r&&n.splice(r,i-r)}return n})}levelOneOptimize(t){return t.map(n=>(n=n.reduce((r,i)=>{let s=r[r.length-1];return i==="**"&&s==="**"?r:i===".."&&s&&s!==".."&&s!=="."&&s!=="**"?(r.pop(),r):(r.push(i),r)},[]),n.length===0?[""]:n))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let n=!1;do{if(n=!1,!this.preserveMultipleSlashes){for(let i=1;i<t.length-1;i++){let s=t[i];i===1&&s===""&&t[0]===""||(s==="."||s==="")&&(n=!0,t.splice(i,1),i--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(n=!0,t.pop())}let r=0;for(;(r=t.indexOf("..",r+1))!==-1;){let i=t[r-1];i&&i!=="."&&i!==".."&&i!=="**"&&!(this.isWindows&&/^[a-z]:$/i.test(i))&&(n=!0,t.splice(r-1,2),r-=2)}}while(n);return t.length===0?[""]:t}firstPhasePreProcess(t){let n=!1;do{n=!1;for(let r of t){let i=-1;for(;(i=r.indexOf("**",i+1))!==-1;){let a=i;for(;r[a+1]==="**";)a++;a>i&&r.splice(i+1,a-i);let l=r[i+1],c=r[i+2],u=r[i+3];if(l!==".."||!c||c==="."||c===".."||!u||u==="."||u==="..")continue;n=!0,r.splice(i,1);let d=r.slice(0);d[i]="**",t.push(d),i--}if(!this.preserveMultipleSlashes){for(let a=1;a<r.length-1;a++){let l=r[a];a===1&&l===""&&r[0]===""||(l==="."||l==="")&&(n=!0,r.splice(a,1),a--)}r[0]==="."&&r.length===2&&(r[1]==="."||r[1]==="")&&(n=!0,r.pop())}let s=0;for(;(s=r.indexOf("..",s+1))!==-1;){let a=r[s-1];if(a&&a!=="."&&a!==".."&&a!=="**"){n=!0;let c=s===1&&r[s+1]==="**"?["."]:[];r.splice(s-1,2,...c),r.length===0&&r.push(""),s-=2}}}}while(n);return t}secondPhasePreProcess(t){for(let n=0;n<t.length-1;n++)for(let r=n+1;r<t.length;r++){let i=this.partsMatch(t[n],t[r],!this.preserveMultipleSlashes);if(i){t[n]=[],t[r]=i;break}}return t.filter(n=>n.length)}partsMatch(t,n,r=!1){let i=0,s=0,a=[],l="";for(;i<t.length&&s<n.length;)if(t[i]===n[s])a.push(l==="b"?n[s]:t[i]),i++,s++;else if(r&&t[i]==="**"&&n[s]===t[i+1])a.push(t[i]),i++;else if(r&&n[s]==="**"&&t[i]===n[s+1])a.push(n[s]),s++;else if(t[i]==="*"&&n[s]&&(this.options.dot||!n[s].startsWith("."))&&n[s]!=="**"){if(l==="b")return!1;l="a",a.push(t[i]),i++,s++}else if(n[s]==="*"&&t[i]&&(this.options.dot||!t[i].startsWith("."))&&t[i]!=="**"){if(l==="a")return!1;l="b",a.push(n[s]),i++,s++}else return!1;return t.length===n.length&&a}parseNegate(){if(this.nonegate)return;let t=this.pattern,n=!1,r=0;for(let i=0;i<t.length&&t.charAt(i)==="!";i++)n=!n,r++;r&&(this.pattern=t.slice(r)),this.negate=n}matchOne(t,n,r=!1){let i=0,s=0;if(this.isWindows){let l=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),c=!l&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),u=typeof n[0]=="string"&&/^[a-z]:$/i.test(n[0]),d=!u&&n[0]===""&&n[1]===""&&n[2]==="?"&&typeof n[3]=="string"&&/^[a-z]:$/i.test(n[3]),p=c?3:l?0:void 0,m=d?3:u?0:void 0;if(typeof p=="number"&&typeof m=="number"){let[h,g]=[t[p],n[m]];h.toLowerCase()===g.toLowerCase()&&(n[m]=h,s=m,i=p)}}let{optimizationLevel:a=1}=this.options;return a>=2&&(t=this.levelTwoFileOptimize(t)),n.includes(si)?this.#e(t,n,r,i,s):this.#r(t,n,r,i,s)}#e(t,n,r,i,s){let a=n.indexOf(si,s),l=n.lastIndexOf(si),[c,u,d]=r?[n.slice(s,a),n.slice(a+1),[]]:[n.slice(s,a),n.slice(a+1,l),n.slice(l+1)];if(c.length){let b=t.slice(i,i+c.length);if(!this.#r(b,c,r,0,0))return!1;i+=c.length,s+=c.length}let p=0;if(d.length){if(d.length+i>t.length)return!1;let b=t.length-d.length;if(this.#r(t,d,r,b,0))p=d.length;else{if(t[t.length-1]!==""||i+d.length===t.length||(b--,!this.#r(t,d,r,b,0)))return!1;p=d.length+1}}if(!u.length){let b=!!p;for(let w=i;w<t.length-p;w++){let E=String(t[w]);if(b=!0,E==="."||E===".."||!this.options.dot&&E.startsWith("."))return!1}return r||b}let m=[[[],0]],h=m[0],g=0,y=[0];for(let b of u)b===si?(y.push(g),h=[[],0],m.push(h)):(h[0].push(b),g++);let x=m.length-1,v=t.length-p;for(let b of m)b[1]=v-(y[x--]+b[0].length);return!!this.#n(t,m,i,0,r,0,!!p)}#n(t,n,r,i,s,a,l){let c=n[i];if(!c){for(let p=r;p<t.length;p++){l=!0;let m=t[p];if(m==="."||m===".."||!this.options.dot&&m.startsWith("."))return!1}return l}let[u,d]=c;for(;r<=d;){if(this.#r(t.slice(0,r+u.length),u,s,r,0)&&a<this.maxGlobstarRecursion){let h=this.#n(t,n,r+u.length,i+1,s,a+1,l);if(h!==!1)return h}let m=t[r];if(m==="."||m===".."||!this.options.dot&&m.startsWith("."))return!1;r++}return s||null}#r(t,n,r,i,s){let a,l,c,u;for(a=i,l=s,u=t.length,c=n.length;a<u&&l<c;a++,l++){this.debug("matchOne loop");let d=n[l],p=t[a];if(this.debug(n,d,p),d===!1||d===si)return!1;let m;if(typeof d=="string"?(m=p===d,this.debug("string match",d,p,m)):(m=d.test(p),this.debug("pattern match",d,p,m)),!m)return!1}if(a===u&&l===c)return!0;if(a===u)return r;if(l===c)return a===u-1&&t[a]==="";throw new Error("wtf?")}braceExpand(){return FQ(this.pattern,this.options)}parse(t){km(t);let n=this.options;if(t==="**")return si;if(t==="")return"";let r,i=null;(r=t.match(tPe))?i=n.dot?rPe:nPe:(r=t.match(HOe))?i=(n.nocase?n.dot?KOe:ZOe:n.dot?VOe:GOe)(r[1]):(r=t.match(iPe))?i=(n.nocase?n.dot?aPe:sPe:n.dot?oPe:lPe)(r):(r=t.match(JOe))?i=n.dot?QOe:XOe:(r=t.match(YOe))&&(i=ePe);let s=Jc.fromGlob(t,this.options).toMMPattern();return i&&typeof s=="object"&&Reflect.defineProperty(s,"test",{value:i}),s}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let n=this.options,r=n.noglobstar?dPe:n.dot?pPe:fPe,i=new Set(n.nocase?["i"]:[]),s=t.map(c=>{let u=c.map(p=>{if(p instanceof RegExp)for(let m of p.flags.split(""))i.add(m);return typeof p=="string"?xPe(p):p===si?si:p._src});u.forEach((p,m)=>{let h=u[m+1],g=u[m-1];p!==si||g===si||(g===void 0?h!==void 0&&h!==si?u[m+1]="(?:\\/|"+r+"\\/)?"+h:u[m]=r:h===void 0?u[m-1]=g+"(?:\\/|\\/"+r+")?":h!==si&&(u[m-1]=g+"(?:\\/|\\/"+r+"\\/)"+h,u[m+1]=si))});let d=u.filter(p=>p!==si);if(this.partial&&d.length>=1){let p=[];for(let m=1;m<=d.length;m++)p.push(d.slice(0,m).join("/"));return"(?:"+p.join("|")+")"}return d.join("/")}).join("|"),[a,l]=t.length>1?["(?:",")"]:["",""];s="^"+a+s+l+"$",this.partial&&(s="^(?:\\/|"+a+s.slice(1,-1)+l+")$"),this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,n=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&n)return!0;let r=this.options;this.isWindows&&(t=t.split("\\").join("/"));let i=this.slashSplit(t);this.debug(this.pattern,"split",i);let s=this.set;this.debug(this.pattern,"set",s);let a=i[i.length-1];if(!a)for(let l=i.length-2;!a&&l>=0;l--)a=i[l];for(let l of s){let c=i;if(r.matchBase&&l.length===1&&(c=[a]),this.matchOne(c,l,n))return r.flipNegate?!0:!this.negate}return r.flipNegate?!1:this.negate}static defaults(t){return Dr.defaults(t).Minimatch}};Dr.AST=Jc;Dr.Minimatch=cp;Dr.escape=L8;Dr.unescape=wl;import{gunzipSync as BMe}from"node:zlib";var Am=class{static{o(this,"Diff")}diff(t,n,r={}){let i;typeof r=="function"?(i=r,r={}):"callback"in r&&(i=r.callback);let s=this.castInput(t,r),a=this.castInput(n,r),l=this.removeEmpty(this.tokenize(s,r)),c=this.removeEmpty(this.tokenize(a,r));return this.diffWithOptionsObj(l,c,r,i)}diffWithOptionsObj(t,n,r,i){var s;let a=o(b=>{if(b=this.postProcess(b,r),i){setTimeout(function(){i(b)},0);return}else return b},"done"),l=n.length,c=t.length,u=1,d=l+c;r.maxEditLength!=null&&(d=Math.min(d,r.maxEditLength));let p=(s=r.timeout)!==null&&s!==void 0?s:1/0,m=Date.now()+p,h=[{oldPos:-1,lastComponent:void 0}],g=this.extractCommon(h[0],n,t,0,r);if(h[0].oldPos+1>=c&&g+1>=l)return a(this.buildValues(h[0].lastComponent,n,t));let y=-1/0,x=1/0,v=o(()=>{for(let b=Math.max(y,-u);b<=Math.min(x,u);b+=2){let w,E=h[b-1],S=h[b+1];E&&(h[b-1]=void 0);let k=!1;if(S){let D=S.oldPos-b;k=S&&0<=D&&D<l}let T=E&&E.oldPos+1<c;if(!k&&!T){h[b]=void 0;continue}if(!T||k&&E.oldPos<S.oldPos?w=this.addToPath(S,!0,!1,0,r):w=this.addToPath(E,!1,!0,1,r),g=this.extractCommon(w,n,t,b,r),w.oldPos+1>=c&&g+1>=l)return a(this.buildValues(w.lastComponent,n,t))||!0;h[b]=w,w.oldPos+1>=c&&(x=Math.min(x,b-1)),g+1>=l&&(y=Math.max(y,b+1))}u++},"execEditLength");if(i)o(function b(){setTimeout(function(){if(u>d||Date.now()>m)return i(void 0);v()||b()},0)},"exec")();else for(;u<=d&&Date.now()<=m;){let b=v();if(b)return b}}addToPath(t,n,r,i,s){let a=t.lastComponent;return a&&!s.oneChangePerToken&&a.added===n&&a.removed===r?{oldPos:t.oldPos+i,lastComponent:{count:a.count+1,added:n,removed:r,previousComponent:a.previousComponent}}:{oldPos:t.oldPos+i,lastComponent:{count:1,added:n,removed:r,previousComponent:a}}}extractCommon(t,n,r,i,s){let a=n.length,l=r.length,c=t.oldPos,u=c-i,d=0;for(;u+1<a&&c+1<l&&this.equals(r[c+1],n[u+1],s);)u++,c++,d++,s.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return d&&!s.oneChangePerToken&&(t.lastComponent={count:d,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=c,u}equals(t,n,r){return r.comparator?r.comparator(t,n):t===n||!!r.ignoreCase&&t.toLowerCase()===n.toLowerCase()}removeEmpty(t){let n=[];for(let r=0;r<t.length;r++)t[r]&&n.push(t[r]);return n}castInput(t,n){return t}tokenize(t,n){return Array.from(t)}join(t){return t.join("")}postProcess(t,n){return t}get useLongestToken(){return!1}buildValues(t,n,r){let i=[],s;for(;t;)i.push(t),s=t.previousComponent,delete t.previousComponent,t=s;i.reverse();let a=i.length,l=0,c=0,u=0;for(;l<a;l++){let d=i[l];if(d.removed)d.value=this.join(r.slice(u,u+d.count)),u+=d.count;else{if(!d.added&&this.useLongestToken){let p=n.slice(c,c+d.count);p=p.map(function(m,h){let g=r[u+h];return g.length>m.length?g:m}),d.value=this.join(p)}else d.value=this.join(n.slice(c,c+d.count));c+=d.count,d.added||(u+=d.count)}}return i}};var j8=class extends Am{static{o(this,"LineDiff")}constructor(){super(...arguments),this.tokenize=bPe}equals(t,n,r){return r.ignoreWhitespace?((!r.newlineIsToken||!t.includes(`
|
|
4313
4313
|
`))&&(t=t.trim()),(!r.newlineIsToken||!n.includes(`
|
|
4314
4314
|
`))&&(n=n.trim())):r.ignoreNewlineAtEof&&!r.newlineIsToken&&(t.endsWith(`
|
|
4315
4315
|
`)&&(t=t.slice(0,-1)),n.endsWith(`
|