failproofai 1.0.2-beta.8 → 1.0.2
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/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/build-manifest.json +3 -3
- package/.next/standalone/.next/prerender-manifest.json +4 -4
- package/.next/standalone/.next/required-server-files.json +1 -1
- package/.next/standalone/.next/server/app/_global-error/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +7 -7
- package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +6 -6
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +7 -7
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/.next/server/app/_not-found.rsc +14 -14
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +14 -14
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +13 -13
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/api/audit/invite/route.js +3 -2
- package/.next/standalone/.next/server/app/api/audit/invite/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/audit/run/route.js +4 -3
- package/.next/standalone/.next/server/app/api/audit/run/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/audit/status/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/login-request/route.js +2 -2
- package/.next/standalone/.next/server/app/api/auth/login-request/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/login-verify/route.js +4 -3
- package/.next/standalone/.next/server/app/api/auth/login-verify/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/logout/route.js +4 -4
- package/.next/standalone/.next/server/app/api/auth/logout/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/status/route.js +4 -4
- package/.next/standalone/.next/server/app/api/auth/status/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/download/[project]/[session]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/audit/page/server-reference-manifest.json +2 -2
- package/.next/standalone/.next/server/app/audit/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/audit/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/index.html +1 -1
- package/.next/standalone/.next/server/app/index.rsc +14 -14
- package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +13 -13
- package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +14 -14
- package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/policies/page/server-reference-manifest.json +14 -14
- package/.next/standalone/.next/server/app/policies/page.js +4 -4
- package/.next/standalone/.next/server/app/policies/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/policies/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/project/[name]/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/project/[name]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/project/[name]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/react-loadable-manifest.json +2 -2
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/server-reference-manifest.json +2 -2
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/projects/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/projects/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/projects/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +4 -4
- package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/chunks/[externals]__0-9ti7z._.js +3 -0
- package/.next/standalone/.next/server/chunks/{[externals]__1lt47k4._.js → [externals]__0sg9-3p._.js} +1 -1
- package/.next/standalone/.next/server/chunks/[externals]__0u3wrvq._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__01eqny5._.js +3 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__1p8poxd._.js → [root-of-the-server]__0igxt32._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0o07qi9._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0zlqo2t._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1anxb5k._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1le9jqc._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1p-qi2t._.js +5 -0
- package/.next/standalone/.next/server/chunks/_09dz7xv._.js +27 -0
- package/.next/standalone/.next/server/chunks/_0bs-v8p._.js +3 -0
- package/.next/standalone/.next/server/chunks/_0tovk6q._.js +3 -0
- package/.next/standalone/.next/server/chunks/_0trp3yc._.js +3 -0
- package/.next/standalone/.next/server/chunks/{_19uwam-._.js → _1-akg6w._.js} +2 -2
- package/.next/standalone/.next/server/chunks/_185gyk9._.js +3 -0
- package/.next/standalone/.next/server/chunks/_1ek68ln._.js +5 -7
- package/.next/standalone/.next/server/chunks/{node_modules_posthog-node_dist_entrypoints_index_node_mjs_09d5c79._.js → node_modules_posthog-node_dist_entrypoints_index_node_mjs_04op_ou._.js} +1 -1
- package/.next/standalone/.next/server/chunks/{node_modules_posthog-node_dist_entrypoints_index_node_mjs_1d2g73o._.js → node_modules_posthog-node_dist_entrypoints_index_node_mjs_0dr20uz._.js} +1 -1
- package/.next/standalone/.next/server/chunks/package_json_[json]_cjs_1nxcc4v._.js +1 -1
- package/.next/standalone/.next/server/chunks/src_hooks_0iu54mz._.js +3 -0
- package/.next/standalone/.next/server/chunks/src_hooks_custom-hooks-loader_ts_0lnb3n3._.js +10 -0
- package/.next/standalone/.next/server/chunks/src_hooks_fp-home_ts_09kv0bn._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__013jr2b._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__01wy8d-._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__02npjtd._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0da85px._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ftmoxc._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0n_lxhg._.js +5 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0oa1lav._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0p-5p8u._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0s740oi._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1p2otjt._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1yh7hlv._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_08x1r5t._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0ehudfr._.js +23 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__1n2ywfz._.js → _1es2j7i._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/_1u8-lu2._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_1h33neq._.js → _1un1pug._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_1zopuov._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_next-internal_server_app_policies_page_actions_1sp2-yo.js +9 -9
- package/.next/standalone/.next/server/chunks/ssr/app_audit__components_audit-dashboard_tsx_0p9ud47._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_global-error_tsx_1kp6l3x._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_policies_hooks-client_tsx_19dqvpc._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/app_settings_settings-client_tsx_20lq-mq._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_hooks_1cv9_c4._.js +10 -0
- package/.next/standalone/.next/server/chunks/ssr/src_hooks_builtin-policies_ts_09j2ndl._.js +1 -1
- package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
- package/.next/standalone/.next/server/middleware.js +1 -1
- package/.next/standalone/.next/server/pages/404.html +1 -1
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +19 -19
- package/.next/standalone/.next/static/chunks/0nkpwjk01ei3t.js +1 -0
- package/.next/standalone/.next/static/chunks/{2iryw37qfqy5y.js → 0ofdelz65_517.js} +1 -1
- package/.next/standalone/.next/static/chunks/{34j7nmidlcuni.js → 12uhnpwgsmcev.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0i3a6wf-f_yky.js → 1_1eb_149xyt9.js} +1 -1
- package/.next/standalone/.next/static/chunks/{3927pu4ss_l4k.js → 1tx9pnxyjrkoj.js} +1 -1
- package/.next/standalone/.next/static/chunks/{1n04wzsaes73g.js → 1x0jrl3a4_i2m.js} +1 -1
- package/.next/standalone/.next/static/chunks/{3r0udrtpn78-e.js → 1zpv6omeln7al.js} +1 -1
- package/.next/standalone/.next/static/chunks/{416zumre3fvfw.js → 20hbg-r3io_ip.js} +1 -1
- package/.next/standalone/.next/static/chunks/{11a_m8yksthtf.js → 32bhi32ym8yrz.js} +2 -2
- package/.next/standalone/.next/static/chunks/{0u2ojcw25c_np.js → 3fr78ugeb4tjc.js} +1 -1
- package/.next/standalone/app/actions/get-hooks-config.ts +8 -1
- package/.next/standalone/app/actions/pack-actions.ts +12 -1
- package/.next/standalone/app/policies/hooks-client.tsx +41 -4
- package/.next/standalone/fp-cloud-cli/tests/test_pagination.py +204 -0
- package/.next/standalone/package.json +9 -9
- package/.next/standalone/server.js +1 -1
- package/README.md +58 -13
- package/bin/failproofai.mjs +10 -1
- package/dist/cli.mjs +22429 -21292
- package/dist/worker.mjs +1247 -540
- package/package.json +9 -9
- package/src/audit/index.ts +24 -4
- package/src/hooks/builtin-policies.ts +933 -8
- package/src/hooks/custom-hooks-loader.ts +98 -8
- package/src/hooks/handler.ts +26 -14
- package/src/hooks/manager.ts +36 -2
- package/src/hooks/pack-cli.ts +415 -42
- package/src/hooks/pack-failclosed.ts +100 -4
- package/src/hooks/pack-manifest.ts +29 -0
- package/src/hooks/pack-param-key.ts +36 -0
- package/src/hooks/pack-store.ts +101 -9
- package/src/hooks/policy-catalog.ts +9 -1
- package/src/hooks/policy-evaluator.ts +77 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__06cuf1y._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0_usx0j._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0_zk340._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0jnjf2t._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0oy4kxb._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0zf034w._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1tg4pu6._.js +0 -3
- package/.next/standalone/.next/server/chunks/_0lxbzdq._.js +0 -3
- package/.next/standalone/.next/server/chunks/_1zuiiy3._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0mgrjnx._.js +0 -10
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1-wzs7f._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1wlvpe5._.js +0 -5
- package/.next/standalone/.next/server/chunks/ssr/_0l7zv8b._.js +0 -23
- package/.next/standalone/.next/static/chunks/1ch5l9t2p16y4.js +0 -1
- /package/.next/standalone/.next/static/{NgD5HvuyPxwgrpeIiafJL → 5-xDMxcnrcXDFPQiy3yhg}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{NgD5HvuyPxwgrpeIiafJL → 5-xDMxcnrcXDFPQiy3yhg}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{NgD5HvuyPxwgrpeIiafJL → 5-xDMxcnrcXDFPQiy3yhg}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
module.exports=[70406,(e,t,n)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},18622,(e,t,n)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},20635,(e,t,n)=>{t.exports=e.x("next/dist/server/app-render/action-async-storage.external.js",()=>require("next/dist/server/app-render/action-async-storage.external.js"))},24725,(e,t,n)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},56704,(e,t,n)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,n)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},59043,(e,t,n)=>{t.exports=e.x("next/dist/server/runtime-reacts.external.js",()=>require("next/dist/server/runtime-reacts.external.js"))},93695,(e,t,n)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},74533,(e,t,n)=>{t.exports=e.x("node:child_process",()=>require("node:child_process"))},66680,(e,t,n)=>{t.exports=e.x("node:crypto",()=>require("node:crypto"))},2157,(e,t,n)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},60526,(e,t,n)=>{t.exports=e.x("node:os",()=>require("node:os"))},50227,(e,t,n)=>{t.exports=e.x("node:path",()=>require("node:path"))},81111,(e,t,n)=>{t.exports=e.x("node:stream",()=>require("node:stream"))},48480,e=>{"use strict";let t={running:!1,error:null};e.s(["finishRun",0,function(e){t.running=!1,t.startedAt=void 0,t.error=e},"getRunState",0,function(){return{...t}},"tryAcquireRun",0,function(){return!t.running&&(t.running=!0,t.startedAt=Date.now(),t.error=null,!0)}])},30441,e=>{"use strict";var t=e.i(50227),n=e.i(79708),i=e.i(93114),s=e.i(83534),r=e.i(81580),o=e.i(28557),a=e.i(40911);function l(){return(0,t.join)((0,i.antigravityHome)(),"conversation_summaries.db")}async function c(){let e=new Map,t=await (0,n.openSqliteReadonly)(l());if(!t)return e;try{for(let n of t.query("SELECT conversation_id, title, step_count, workspace_uris, last_modified_time FROM conversation_summaries"))n.conversation_id&&e.set(n.conversation_id,{title:n.title??void 0,cwd:function(e){let t;if(!e)return;try{let n=JSON.parse(e);Array.isArray(n)&&"string"==typeof n[0]?t=n[0]:"string"==typeof n&&(t=n)}catch{t=e}if(!t)return;let n=t.replace(/^file:\/\//,"");return n.length>0?n:void 0}(n.workspace_uris),stepCount:"number"==typeof n.step_count?n.step_count:void 0,lastMs:function(e){if("number"==typeof e&&Number.isFinite(e))return e>1e12?e:e>1e9?1e3*e:void 0;if("string"==typeof e){let t=Date.parse(e);if(!Number.isNaN(t))return t}}(n.last_modified_time)})}catch{}finally{t.close()}return e}async function u(){let e;try{e=(0,i.listAntigravityTranscripts)()}catch(e){return(0,a.logWarn)("Failed to scan Antigravity brain dir:",e),[]}let t=await c(),n=[];for(let s of e){let e=t.get(s.conversationId),r=e?.cwd??null;if(!r)try{let e=await (0,i.getAntigravitySessionLog)(s.conversationId);r=e?.cwd??null}catch{r=null}n.push({conversationId:s.conversationId,cwd:r,title:e?.title,mtimeMs:e?.lastMs??s.mtimeMs})}return n}let d="antigravity";async function f(){let e=await u(),t=new Map;for(let n of e){let e=n.cwd?(0,r.encodeFolderName)(n.cwd):d,i=n.cwd??"antigravity",s=t.get(e);(!s||n.mtimeMs>s.latest)&&t.set(e,{latest:n.mtimeMs,path:i})}let n=[];for(let[e,{latest:i,path:s}]of t){let t=new Date(i);n.push({name:e,path:s,isDirectory:!0,lastModified:t,lastModifiedFormatted:(0,o.formatDate)(t),cli:["antigravity"]})}return n.sort((e,t)=>t.lastModified.getTime()-e.lastModified.getTime()),n}async function m(e){let t=(await u()).filter(t=>(t.cwd?(0,r.encodeFolderName)(t.cwd):d)===e);if(0===t.length)return{cwd:null,sessions:[]};let n=[...t].sort((e,t)=>t.mtimeMs-e.mtimeMs);return{cwd:n.find(e=>e.cwd)?.cwd??(e===d?null:(0,r.decodeFolderName)(e)),sessions:n.map(e=>{let t=new Date(e.mtimeMs);return{name:e.title??e.conversationId,path:`antigravity://${e.conversationId}`,lastModified:t,lastModifiedFormatted:(0,o.formatDate)(t),sessionId:e.conversationId,cli:"antigravity"}})}}let p=(0,s.runtimeCache)(f,30),y=(0,s.runtimeCache)(e=>m(e),30,{maxSize:50});e.s(["antigravitySummariesDbPath",0,l,"getAntigravityIndex",0,c,"getAntigravityProjects",0,f,"getAntigravitySessionsByEncodedName",0,m,"getCachedAntigravityProjects",0,p,"getCachedAntigravitySessionsByEncodedName",0,y])},93114,e=>{"use strict";var t=e.i(12714),n=e.i(2157),i=e.i(60526),s=e.i(50227),r=e.i(83534),o=e.i(54214),a=e.i(67405);let l=/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,c=new Set(["CONVERSATION_HISTORY","CHECKPOINT"]);function u(){return process.env.ANTIGRAVITY_HOME||(0,s.join)((0,i.homedir)(),".gemini","antigravity-cli")}function d(){return(0,s.join)(u(),"brain")}function f(){return(0,s.join)(".system_generated","logs","transcript_full.jsonl")}function m(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function p(e,t="session"){let n=[],i=new Map,s=Date.now();for(let r=0;r<e.length;r++){let l=e[r];if(!m(l))continue;let u="string"==typeof l.type?l.type:"";if(!u||c.has(u))continue;let d=function(e,t){if("number"==typeof e&&Number.isFinite(e)){if(e>1e12)return new Date(e);if(e>1e9)return new Date(1e3*e)}if("string"==typeof e){let t=Date.parse(e);if(!Number.isNaN(t))return new Date(t)}return new Date(t)}(l.created_at,s+r),f=d.toISOString(),p="number"==typeof l.step_index?l.step_index:r,y={uuid:`antigravity-${p}`,parentUuid:null},g=(0,o.baseEntry)(y,f,d,t);if("USER_INPUT"===u){let e="string"==typeof l.content?l.content:"";n.push({type:"user",...g,message:{role:"user",content:e}});continue}if("PLANNER_RESPONSE"===u){let e=[];if("string"==typeof l.content&&l.content.length>0&&e.push({type:"text",text:l.content}),Array.isArray(l.tool_calls))for(let t=0;t<l.tool_calls.length;t++){let n=l.tool_calls[t];if(!m(n))continue;let s="string"==typeof n.name?n.name:"tool",r={type:"tool_use",id:`${s}-${p}-${t}`,name:s,input:m(n.args)?n.args:{}};e.push(r);let o=s.toUpperCase(),a=i.get(o)??[];a.push({block:r,startMs:d.getTime()}),i.set(o,a)}if(0===e.length)continue;n.push({type:"assistant",...g,message:{role:"assistant",content:e}});continue}let h=i.get(u);if(h&&h.length>0){let{block:e,startMs:t}=h.shift(),n=Math.max(0,d.getTime()-t);e.result={timestamp:f,timestampFormatted:(0,o.formatTimestamp)(d),content:"string"==typeof l.content?l.content:"",durationMs:n,durationFormatted:(0,a.formatDuration)(n)};continue}n.push({type:"system",...g,raw:y})}return n.sort((e,t)=>e.timestampMs-t.timestampMs),n}function y(e){if(!l.test(e))return null;let t=(0,s.join)(d(),e,f());try{if((0,n.statSync)(t).isFile())return t}catch{}return null}async function g(e){let n,i=y(e);if(!i)return null;try{n=await (0,t.readFile)(i,"utf-8")}catch{return null}let s=(0,o.parseRawLines)(n,"session"),r=p(s,"session"),a=function(e){for(let t of e)if(m(t)&&Array.isArray(t.tool_calls))for(let e of t.tool_calls){if(!m(e)||!m(e.args))continue;let t=e.args.Cwd??e.args.cwd;if("string"==typeof t&&t.length>0)return t}}(s);return{entries:r,rawLines:s,cwd:a,filePath:i}}(0,r.runtimeCache)(e=>g(e),60,{maxSize:50}),e.s(["antigravityHome",0,u,"antigravityLinesToLogEntries",0,p,"findAntigravityTranscript",0,y,"getAntigravitySessionLog",0,g,"listAntigravityTranscripts",0,function(){let e,t=d(),i=f(),r=[];try{e=(0,n.readdirSync)(t,{withFileTypes:!0}).filter(e=>e.isDirectory())}catch{return r}for(let o of e){let e=o.name;if(!l.test(e))continue;let a=(0,s.join)(t,e,i);try{let t=(0,n.statSync)(a);if(!t.isFile())continue;r.push({conversationId:e,transcriptPath:a,mtimeMs:t.mtimeMs,sizeBytes:t.size})}catch{}}return r}])},94930,e=>{"use strict";var t=e.i(2157),n=e.i(50227),i=e.i(66680);e.s(["writeJsonAtomically",0,function(e,s,r={}){let o=r.mode??384,a=r.dirMode??448,l=(0,n.dirname)(e);(0,t.existsSync)(l)||(0,t.mkdirSync)(l,{recursive:!0,mode:a});let c=`${e}.${process.pid}.${(0,i.randomBytes)(6).toString("hex")}.tmp`;try{(0,t.writeFileSync)(c,JSON.stringify(s,null,2),{mode:o});try{(63&(0,t.statSync)(c).mode)!=0&&(0,t.chmodSync)(c,o)}catch{}(0,t.renameSync)(c,e);try{(63&(0,t.statSync)(e).mode)!=0&&(0,t.chmodSync)(e,o)}catch{}}catch(e){try{(0,t.rmSync)(c,{force:!0})}catch{}throw e}}])},36203,e=>{"use strict";var t=e.i(12714),n=e.i(60526),i=e.i(50227),s=e.i(81580),r=e.i(83534),o=e.i(71809),a=e.i(28557),l=e.i(40911);let c=(0,i.join)((0,n.homedir)(),".codex","sessions"),u=/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/i;async function d(e){try{return await (0,t.readdir)(e,{withFileTypes:!0})}catch{return null}}async function f(e){let n=null;try{n=await (0,t.open)(e,"r");let i=Buffer.alloc(262144),{bytesRead:s}=await n.read(i,0,262144,0);if(0===s)return null;let r=i.subarray(0,s),o=r.indexOf(10),a=-1===o?s:o;return r.subarray(0,a).toString("utf-8")}catch{return null}finally{n&&await n.close().catch(()=>{})}}async function m(e){let t=await d(e);return t?t.filter(e=>e.isFile()&&e.name.endsWith(".jsonl")).map(t=>(0,i.join)(e,t.name)):[]}async function p(){let e=await d(c);if(!e)return[];let n=[];for(let t of e){if(!t.isDirectory())continue;let e=await d((0,i.join)(c,t.name));if(e)for(let s of e){if(!s.isDirectory())continue;let e=await d((0,i.join)(c,t.name,s.name));if(e)for(let r of e){if(!r.isDirectory())continue;let e=(0,i.join)(c,t.name,s.name,r.name);n.push(...await m(e))}}}return 0===n.length?[]:(await (0,o.batchAll)(n.map(e=>async()=>{let n,i,s=(i=(e.split("/").pop()??"").match(u))?i[0]:null;if(!s)return null;let r=await f(e);if(!r)return null;let{cwd:o}=function(e){try{let t=JSON.parse(e);if("session_meta"!==t.type)return{};let n=t.payload?.cwd;if("string"!=typeof n||0===n.length)return{};return{cwd:n}}catch{return{}}}(r);if(!o)return null;try{let i=await (0,t.open)(e,"r");try{n=(await i.stat()).mtime}finally{await i.close().catch(()=>{})}}catch{n=new Date(0)}return{filePath:e,fileName:e.split("/").pop()??"",cwd:o,sessionId:s,fileMtime:n}}),16)).filter(e=>"fulfilled"===e.status).map(e=>e.value).filter(e=>null!==e)}let y=(0,r.runtimeCache)(p,30);async function g(){let e;try{e=await y()}catch(e){return(0,l.logWarn)("Failed to scan Codex sessions:",e),[]}let t=new Map;for(let n of e){let e=t.get(n.cwd);(!e||n.fileMtime.getTime()>e.latest.getTime())&&t.set(n.cwd,{latest:n.fileMtime,cwd:n.cwd})}let n=[];for(let{cwd:e,latest:i}of t.values())n.push({name:(0,s.encodeFolderName)(e),path:e,isDirectory:!0,lastModified:i,lastModifiedFormatted:(0,a.formatDate)(i),cli:["codex"]});return n.sort((e,t)=>t.lastModified.getTime()-e.lastModified.getTime()),n}function h(e){let t=e.map(e=>({name:e.fileName.replace(/\.jsonl$/,""),path:e.filePath,lastModified:e.fileMtime,lastModifiedFormatted:(0,a.formatDate)(e.fileMtime),sessionId:e.sessionId,cli:"codex"}));return t.sort((e,t)=>t.lastModified.getTime()-e.lastModified.getTime()),t}async function w(e){let t;try{t=await y()}catch(e){return(0,l.logWarn)("Failed to scan Codex sessions:",e),[]}return h(t.filter(t=>t.cwd===e))}async function _(e){let t;try{t=await y()}catch(e){return(0,l.logWarn)("Failed to scan Codex sessions:",e),{cwd:null,sessions:[]}}let n=t.filter(t=>(0,s.encodeFolderName)(t.cwd)===e);return{cwd:n[0]?.cwd??null,sessions:h(n)}}let S=(0,r.runtimeCache)(g,30),M=(0,r.runtimeCache)(e=>w(e),30,{maxSize:50}),v=(0,r.runtimeCache)(e=>_(e),30,{maxSize:50});e.s(["getCachedCodexProjects",0,S,"getCachedCodexSessionsByEncodedName",0,v,"getCachedCodexSessionsForCwd",0,M,"getCodexProjects",0,g,"getCodexSessionsByEncodedName",0,_,"getCodexSessionsForCwd",0,w])},57232,e=>{"use strict";var t=e.i(2157),n=e.i(12714),i=e.i(50227),s=e.i(60526),r=e.i(83534),o=e.i(54214),a=e.i(67405);let l=(0,e.i(79857).codexSessionPathsFile)();function c(){try{if(!(0,t.existsSync)(l))return{};return JSON.parse((0,t.readFileSync)(l,"utf-8"))}catch{return{}}}function u(e,n){try{(0,t.mkdirSync)((0,i.dirname)(l),{recursive:!0});let s=c();s[e]=n,(0,t.writeFileSync)(l,JSON.stringify(s),"utf-8")}catch{}}function d(e,n){try{for(let s of(0,t.readdirSync)(e,{withFileTypes:!0}))if(s.isFile()&&s.name.includes(n)&&s.name.endsWith(".jsonl"))return(0,i.join)(e,s.name)}catch{}return null}function f(e){let n=c()[e];if(n&&(0,t.existsSync)(n))return n;let r=(0,i.join)((0,s.homedir)(),".codex","sessions"),o=new Date,a=new Date(o.getTime()-864e5);for(let t of[o,a].map(e=>{let t=String(e.getUTCFullYear()),n=String(e.getUTCMonth()+1).padStart(2,"0"),s=String(e.getUTCDate()).padStart(2,"0");return(0,i.join)(r,t,n,s)})){let n=d(t,e);if(n)return u(e,n),n}try{for(let n of(0,t.readdirSync)(r,{withFileTypes:!0}))if(n.isDirectory()){for(let s of(0,t.readdirSync)((0,i.join)(r,n.name),{withFileTypes:!0}))if(s.isDirectory())for(let o of(0,t.readdirSync)((0,i.join)(r,n.name,s.name),{withFileTypes:!0})){if(!o.isDirectory())continue;let t=d((0,i.join)(r,n.name,s.name,o.name),e);if(t)return u(e,t),t}}}catch{}return null}function m(e,t){return Array.isArray(e)?e.filter(e=>e?.type===t&&"string"==typeof e.text).map(e=>e.text).join("\n"):""}async function p(e,t="session"){let n,i=e.split("\n").filter(e=>""!==e.trim()),s=[],r=[],l=new Map,c=new Map,u=!1;for(let e=0;e<i.length;e++){let d;e>0&&e%200==0&&await new Promise(e=>setImmediate(e));let f=i[e];try{d=JSON.parse(f)}catch{continue}let p={...d,_source:t};r.push(p);let y=d.timestamp;if(!y)continue;let g=new Date(y);if(Number.isNaN(g.getTime()))continue;let h=d.type,w=d.payload??{};if("session_meta"===h){let e=w.cwd;"string"!=typeof e||n||(n=e),s.push({type:"system",...(0,o.baseEntry)(p,y,g,t),raw:p});continue}if("response_item"===h){let e=w.type;if("message"===e){let e=w.role,n=w.content;if("user"===e||"developer"===e){let i=m(n,"input_text");if(!i)continue;let r="developer"===e?`[developer] ${i}`:i;s.push({type:"user",...(0,o.baseEntry)(p,y,g,t),message:{role:"user",content:r}});continue}if("assistant"===e){let e=m(n,"output_text");if(!e)continue;let i=[{type:"text",text:e}];s.push({type:"assistant",...(0,o.baseEntry)(p,y,g,t),message:{role:"assistant",content:i}});continue}s.push({type:"system",...(0,o.baseEntry)(p,y,g,t),raw:p});continue}if("function_call"===e){let e=w.call_id,n=w.name??"function_call",i={type:"tool_use",id:e??`${y}-${n}`,name:n,input:function(e){if(!e)return{};try{return JSON.parse(e)}catch{return{}}}(w.arguments)},r={type:"assistant",...(0,o.baseEntry)(p,y,g,t),message:{role:"assistant",content:[i]}};s.push(r),e&&(l.set(e,i),c.set(e,g.getTime()));continue}if("function_call_output"===e){let e=w.call_id,n=e?l.get(e):void 0;if(n){let t=c.get(e)??g.getTime(),i=Math.max(0,g.getTime()-t);n.result={timestamp:y,timestampFormatted:(0,o.formatTimestamp)(g),content:"string"==typeof w.output?w.output:JSON.stringify(w.output),durationMs:i,durationFormatted:(0,a.formatDuration)(i)};continue}s.push({type:"system",...(0,o.baseEntry)(p,y,g,t),raw:p});continue}s.push({type:"system",...(0,o.baseEntry)(p,y,g,t),raw:p});continue}if("event_msg"===h){let e=w.type;if("task_started"===e){let e=u?"Session Resumed":"Session Started";u=!0,s.push({type:"queue-operation",...(0,o.baseEntry)(p,y,g,t),label:e});continue}if("exec_command_end"===e){let e=w.call_id,n=e?l.get(e):void 0;if(n){let t=w.duration,i=t?(t.secs??0)*1e3+Math.round((t.nanos??0)/1e6):Math.max(0,g.getTime()-(c.get(e)??g.getTime())),s=w.aggregated_output;n.result={timestamp:y,timestampFormatted:(0,o.formatTimestamp)(g),content:"string"==typeof s?s:JSON.stringify(s),durationMs:i,durationFormatted:(0,a.formatDuration)(i)};continue}s.push({type:"system",...(0,o.baseEntry)(p,y,g,t),raw:p});continue}if("user_message"===e||"agent_message"===e)continue;s.push({type:"system",...(0,o.baseEntry)(p,y,g,t),raw:p});continue}s.push({type:"system",...(0,o.baseEntry)(p,y,g,t),raw:p})}return s.length>500&&await new Promise(e=>setImmediate(e)),s.sort((e,t)=>e.timestampMs-t.timestampMs),{entries:s,rawLines:r,cwd:n}}async function y(e){let t=f(e);if(!t)return null;let i=await (0,n.readFile)(t,"utf-8"),{entries:s,rawLines:r,cwd:o}=await p(i,"session");return{entries:s,rawLines:r,cwd:o,filePath:t}}(0,r.runtimeCache)(e=>y(e),60,{maxSize:50}),e.s(["findCodexTranscript",0,f,"getCodexSessionLog",0,y])},55851,e=>{"use strict";var t=e.i(12714),n=e.i(60526),i=e.i(50227),s=e.i(81580),r=e.i(83534),o=e.i(71809),a=e.i(28557),l=e.i(40911);async function c(e){try{return await (0,t.readdir)(e,{withFileTypes:!0})}catch{return null}}async function u(e){try{return(await (0,t.stat)(e)).mtime}catch{return null}}async function d(){let e=(0,i.join)(process.env.COPILOT_HOME||(0,i.join)((0,n.homedir)(),".copilot"),"session-state"),s=await c(e);if(!s)return[];let r=s.filter(e=>e.isDirectory()).map(t=>({sessionId:t.name,workspacePath:(0,i.join)(e,t.name,"workspace.yaml"),eventsPath:(0,i.join)(e,t.name,"events.jsonl")}));return(await (0,o.batchAll)(r.map(e=>async()=>{let n;try{n=await (0,t.readFile)(e.workspacePath,"utf-8")}catch{return null}let i=function(e){let t=e.match(/^cwd\s*:\s*(.+?)\s*$/m);if(t)return t[1].replace(/^['"]|['"]$/g,"")}(n);if(!i)return null;let s=await u(e.eventsPath),r=await u(e.workspacePath),o=null!==s,a=s&&r?new Date(Math.max(s.getTime(),r.getTime())):s??r??new Date(0);return{workspacePath:e.workspacePath,eventsPath:e.eventsPath,sessionId:e.sessionId,cwd:i,fileMtime:a,hasTranscript:o}}),16)).filter(e=>"fulfilled"===e.status).map(e=>e.value).filter(e=>null!==e)}let f=(0,r.runtimeCache)(d,30);async function m(){let e;try{e=await f()}catch(e){return(0,l.logWarn)("Failed to scan Copilot sessions:",e),[]}let t=new Map;for(let n of e){if(!n.hasTranscript)continue;let e=t.get(n.cwd);(!e||n.fileMtime.getTime()>e.latest.getTime())&&t.set(n.cwd,{latest:n.fileMtime,cwd:n.cwd})}let n=[];for(let{cwd:e,latest:i}of t.values())n.push({name:(0,s.encodeFolderName)(e),path:e,isDirectory:!0,lastModified:i,lastModifiedFormatted:(0,a.formatDate)(i),cli:["copilot"]});return n.sort((e,t)=>t.lastModified.getTime()-e.lastModified.getTime()),n}function p(e){let t=e.filter(e=>e.hasTranscript).map(e=>({name:e.sessionId,path:e.eventsPath,lastModified:e.fileMtime,lastModifiedFormatted:(0,a.formatDate)(e.fileMtime),sessionId:e.sessionId,cli:"copilot"}));return t.sort((e,t)=>t.lastModified.getTime()-e.lastModified.getTime()),t}async function y(e){let t;try{t=await f()}catch(e){return(0,l.logWarn)("Failed to scan Copilot sessions:",e),[]}return p(t.filter(t=>t.cwd===e))}async function g(e){let t;try{t=await f()}catch(e){return(0,l.logWarn)("Failed to scan Copilot sessions:",e),{cwd:null,sessions:[]}}let n=t.filter(t=>t.hasTranscript&&(0,s.encodeFolderName)(t.cwd)===e);return{cwd:n[0]?.cwd??null,sessions:p(n)}}let h=(0,r.runtimeCache)(m,30),w=(0,r.runtimeCache)(e=>y(e),30,{maxSize:50}),_=(0,r.runtimeCache)(e=>g(e),30,{maxSize:50});e.s(["getCachedCopilotProjects",0,h,"getCachedCopilotSessionsByEncodedName",0,_,"getCachedCopilotSessionsForCwd",0,w,"getCopilotProjects",0,m,"getCopilotSessionsByEncodedName",0,g,"getCopilotSessionsForCwd",0,y])},78166,e=>{"use strict";var t=e.i(2157),n=e.i(12714),i=e.i(50227),s=e.i(60526),r=e.i(83534),o=e.i(54214),a=e.i(67405);function l(e,t){let n=function(e){if(!e)return null;let t=(0,i.resolve)((0,i.join)(process.env.COPILOT_HOME||(0,i.join)((0,s.homedir)(),".copilot"),"session-state")),n=(0,i.resolve)(t,e);return n!==t&&n.startsWith(`${t}${i.sep}`)?n:null}(e);return n?(0,i.join)(n,t):null}function c(e){let n=l(e,"events.jsonl");return n&&(0,t.existsSync)(n)?n:null}async function u(e,t="session"){let n,i=e.split("\n").filter(e=>""!==e.trim()),s=[],r=[],l=new Map,c=new Map,d=!1;for(let e=0;e<i.length;e++){let u;e>0&&e%200==0&&await new Promise(e=>setImmediate(e));let f=i[e];try{u=JSON.parse(f)}catch{continue}let m={...u,_source:t};r.push(m);let p=u.timestamp;if(!p)continue;let y=new Date(p);if(Number.isNaN(y.getTime()))continue;let g=y.toISOString(),h=u.type,w=u.data??{};if("session.start"===h){let e=w.context,i=e?.cwd;"string"!=typeof i||n||(n=i);let r=d?"Session Resumed":"Session Started";d=!0,s.push({type:"queue-operation",...(0,o.baseEntry)(m,g,y,t),label:r});continue}if("user.message"===h){let e=w.content??"";if(!e)continue;s.push({type:"user",...(0,o.baseEntry)(m,g,y,t),message:{role:"user",content:e}});continue}if("system.message"===h){s.push({type:"system",...(0,o.baseEntry)(m,g,y,t),raw:m});continue}if("assistant.message"===h){let e=w.content??"";if(!e){s.push({type:"system",...(0,o.baseEntry)(m,g,y,t),raw:m});continue}let n=[{type:"text",text:e}];s.push({type:"assistant",...(0,o.baseEntry)(m,g,y,t),message:{role:"assistant",content:n}});continue}if("tool.execution_start"===h){let e=w.toolCallId,n=w.toolName??"tool",i=w.arguments??{},r={type:"tool_use",id:e??`${y.getTime()}-${n}`,name:n,input:i},a={type:"assistant",...(0,o.baseEntry)(m,g,y,t),message:{role:"assistant",content:[r]}};s.push(a),e&&(l.set(e,r),c.set(e,y.getTime()));continue}if("tool.execution_complete"===h){let e=w.toolCallId,n=e?l.get(e):void 0;if(n){let t=c.get(e)??y.getTime(),i=w.result??{},s=w.toolTelemetry??{},r=s.metrics?.commandTimeMs??s.metrics?.durationMs??null,l="number"==typeof r&&r>=0?r:Math.max(0,y.getTime()-t),u=i.detailedContent??i.content??"";n.result={timestamp:g,timestampFormatted:(0,o.formatTimestamp)(y),content:"string"==typeof u?u:JSON.stringify(u),durationMs:l,durationFormatted:(0,a.formatDuration)(l)};continue}s.push({type:"system",...(0,o.baseEntry)(m,g,y,t),raw:m});continue}s.push({type:"system",...(0,o.baseEntry)(m,g,y,t),raw:m})}return s.length>500&&await new Promise(e=>setImmediate(e)),s.sort((e,t)=>e.timestampMs-t.timestampMs),{entries:s,rawLines:r,cwd:n}}async function d(e){let i,s=c(e);if(!s)return null;try{i=await (0,n.readFile)(s,"utf-8")}catch{return null}let{entries:r,rawLines:o,cwd:a}=await u(i,"session");return{entries:r,rawLines:o,cwd:a??function(e){let n,i=(n=l(e,"workspace.yaml"))&&(0,t.existsSync)(n)?n:null;if(i)try{let e=(0,t.readFileSync)(i,"utf-8"),n=RegExp("^cwd\\s*:\\s*(.+?)\\s*$","m"),s=e.match(n);if(!s)return;return s[1].replace(/^['"]|['"]$/g,"")}catch{return}}(e),filePath:s}}(0,r.runtimeCache)(e=>d(e),60,{maxSize:50}),e.s(["findCopilotTranscript",0,c,"getCopilotSessionLog",0,d])},46413,e=>{"use strict";var t=e.i(12714),n=e.i(60526),i=e.i(50227),s=e.i(81580),r=e.i(83534),o=e.i(71809),a=e.i(28557),l=e.i(40911);let c=["agent-sessions","conversations","sessions"],u=["meta.json","session.json","workspace.json","workspace.yaml"],d=["events.jsonl","transcript.jsonl","messages.jsonl"];async function f(e){try{return await (0,t.readdir)(e,{withFileTypes:!0})}catch{return null}}async function m(e){try{return(await (0,t.stat)(e)).mtime}catch{return null}}async function p(e,n){for(let s of n){let n,r=(0,i.join)(e,s);if(await m(r)===null)continue;try{n=await (0,t.readFile)(r,"utf-8")}catch{continue}let o=function(e){try{let t=JSON.parse(e);if("string"==typeof t.cwd&&t.cwd.length>0)return t.cwd}catch{}let t=e.match(/^\s*cwd\s*:\s*(.+?)\s*$/m);if(t){let e=t[1].replace(/^['"]|['"]$/g,"");if(e.length>0)return e}}(n);if(o)return{path:r,cwd:o}}return null}async function y(e,t){for(let n of t){let t=(0,i.join)(e,n);if(await m(t)!==null)return t}return null}async function g(){let e=process.env.CURSOR_HOME||(0,i.join)((0,n.homedir)(),".cursor"),t=[],r=[],a=(0,i.join)(e,"projects"),l=await f(a);if(l)for(let e of l){if(!e.isDirectory())continue;let n=(0,s.decodeFolderName)(e.name),r=n.startsWith("/")||/^[A-Za-z]:\//.test(n)?n:`/${n}`,o=(0,i.join)(a,e.name,"agent-transcripts"),l=await f(o);if(l)for(let e of l)e.isDirectory()&&t.push({sessionId:e.name,dir:(0,i.join)(o,e.name),cwd:r})}for(let t of c){let n=(0,i.join)(e,t),s=await f(n);if(s)for(let e of s)e.isDirectory()&&r.push({sessionId:e.name,dir:(0,i.join)(n,e.name)})}return 0===t.length&&0===r.length?[]:(await (0,o.batchAll)([...t.map(e=>async()=>{let t=(0,i.join)(e.dir,`${e.sessionId}.jsonl`),n=await m(t);return n?{metaPath:e.dir,transcriptPath:t,sessionId:e.sessionId,cwd:e.cwd,fileMtime:n,hasTranscript:!0}:null}),...r.map(e=>async()=>{let t=await p(e.dir,u);if(!t)return null;let n=await y(e.dir,d),i=n?await m(n):null,s=await m(t.path),r=i&&s?new Date(Math.max(i.getTime(),s.getTime())):i??s??new Date(0);return{metaPath:t.path,transcriptPath:n,sessionId:e.sessionId,cwd:t.cwd,fileMtime:r,hasTranscript:null!==n}})],16)).filter(e=>"fulfilled"===e.status).map(e=>e.value).filter(e=>null!==e)}let h=(0,r.runtimeCache)(g,30);async function w(){let e;try{e=await h()}catch(e){return(0,l.logWarn)("Failed to scan Cursor sessions:",e),[]}let t=new Map;for(let n of e){if(!n.hasTranscript)continue;let e=t.get(n.cwd);(!e||n.fileMtime.getTime()>e.latest.getTime())&&t.set(n.cwd,{latest:n.fileMtime,cwd:n.cwd})}let n=[];for(let{cwd:e,latest:i}of t.values())n.push({name:(0,s.encodeFolderName)(e),path:e,isDirectory:!0,lastModified:i,lastModifiedFormatted:(0,a.formatDate)(i),cli:["cursor"]});return n.sort((e,t)=>t.lastModified.getTime()-e.lastModified.getTime()),n}function _(e){let t=e.filter(e=>e.hasTranscript&&e.transcriptPath).map(e=>({name:e.sessionId,path:e.transcriptPath,lastModified:e.fileMtime,lastModifiedFormatted:(0,a.formatDate)(e.fileMtime),sessionId:e.sessionId,cli:"cursor"}));return t.sort((e,t)=>t.lastModified.getTime()-e.lastModified.getTime()),t}async function S(e){let t;try{t=await h()}catch(e){return(0,l.logWarn)("Failed to scan Cursor sessions:",e),[]}return _(t.filter(t=>t.cwd===e))}async function M(e){let t;try{t=await h()}catch(e){return(0,l.logWarn)("Failed to scan Cursor sessions:",e),{cwd:null,sessions:[]}}let n=t.filter(t=>t.hasTranscript&&(0,s.encodeFolderName)(t.cwd)===e);return{cwd:n[0]?.cwd??null,sessions:_(n)}}let v=(0,r.runtimeCache)(w,30),C=(0,r.runtimeCache)(e=>S(e),30,{maxSize:50}),E=(0,r.runtimeCache)(e=>M(e),30,{maxSize:50});e.s(["getCachedCursorProjects",0,v,"getCachedCursorSessionsByEncodedName",0,E,"getCachedCursorSessionsForCwd",0,C,"getCursorProjects",0,w,"getCursorSessionsByEncodedName",0,M,"getCursorSessionsForCwd",0,S])},72094,e=>{"use strict";var t=e.i(2157),n=e.i(12714),i=e.i(50227),s=e.i(60526),r=e.i(83534),o=e.i(54214),a=e.i(67405);let l=["agent-sessions","conversations","sessions"],c=["events.jsonl","transcript.jsonl","messages.jsonl"],u="agent-transcripts";function d(e){let n=function(e){if(!e)return null;let n=(0,i.resolve)(process.env.CURSOR_HOME||(0,i.join)((0,s.homedir)(),".cursor")),r=(0,i.resolve)(n,"projects"),o=[];try{o=(0,t.readdirSync)(r,{withFileTypes:!0})}catch{}for(let n of o){if(!n.isDirectory())continue;let s=(0,i.resolve)(r,n.name,u,e),o=(0,i.resolve)(r,n.name,u);if(s!==o&&s.startsWith(`${o}${i.sep}`)&&(0,t.existsSync)(s))return s}for(let s of l){let r=(0,i.resolve)(n,s),o=(0,i.resolve)(r,e);if(o!==r&&o.startsWith(`${r}${i.sep}`)&&(0,t.existsSync)(o))return o}return null}(e);if(!n)return null;let r=(0,i.join)(n,`${(0,i.basename)(n)}.jsonl`);if((0,t.existsSync)(r))return r;for(let e of c){let s=(0,i.join)(n,e);if((0,t.existsSync)(s))return s}return null}async function f(e,t="session"){let n,i=e.split("\n").filter(e=>""!==e.trim()),s=[],r=[],l=new Map,c=new Map,u=!1,d=Date.now();for(let e=0;e<i.length;e++){let f;e>0&&e%200==0&&await new Promise(e=>setImmediate(e));let m=i[e];try{f=JSON.parse(m)}catch{continue}let p={...f,_source:t};if(r.push(p),!f.type&&f.role&&f.message?.content){let n=new Date(d+e),i=n.toISOString(),r=f.message.content.filter(e=>e?.type==="text"&&"string"==typeof e.text).map(e=>e.text).join("");if("user"===f.role){let e=/<user_query>\s*([\s\S]*?)\s*<\/user_query>/.exec(r),a=e?e[1]:r;a&&s.push({type:"user",...(0,o.baseEntry)(p,i,n,t),message:{role:"user",content:a}});continue}if("assistant"===f.role){let e=r?[{type:"text",text:r}]:[];0===e.length?s.push({type:"system",...(0,o.baseEntry)(p,i,n,t),raw:p}):s.push({type:"assistant",...(0,o.baseEntry)(p,i,n,t),message:{role:"assistant",content:e}});continue}s.push({type:"system",...(0,o.baseEntry)(p,i,n,t),raw:p});continue}let y=f.timestamp;if(!y)continue;let g=new Date(y);if(Number.isNaN(g.getTime()))continue;let h=g.toISOString(),w=f.type,_=f.data??{};if("session.start"===w||"sessionStart"===w||"session_start"===w){let e=_.context??_,i=e.cwd;"string"!=typeof i||n||(n=i),!n&&Array.isArray(e.workspace_roots)&&"string"==typeof e.workspace_roots[0]&&(n=e.workspace_roots[0]);let r=u?"Session Resumed":"Session Started";u=!0,s.push({type:"queue-operation",...(0,o.baseEntry)(p,h,g,t),label:r});continue}if("user.message"===w||"userMessage"===w){let e="string"==typeof _.content?_.content:"string"==typeof _.text?_.text:"";if(!e)continue;s.push({type:"user",...(0,o.baseEntry)(p,h,g,t),message:{role:"user",content:e}});continue}if("system.message"===w||"systemMessage"===w){s.push({type:"system",...(0,o.baseEntry)(p,h,g,t),raw:p});continue}if("assistant.message"===w||"assistantMessage"===w){let e="string"==typeof _.content?_.content:"string"==typeof _.text?_.text:"";if(!e){s.push({type:"system",...(0,o.baseEntry)(p,h,g,t),raw:p});continue}let n=[{type:"text",text:e}];s.push({type:"assistant",...(0,o.baseEntry)(p,h,g,t),message:{role:"assistant",content:n}});continue}if("tool.execution_start"===w||"tool.executionStart"===w||"preToolUse"===w){let e=_.toolCallId??_.tool_use_id,n=_.toolName??_.tool_name??"tool",i=_.arguments??_.tool_input??{},r={type:"tool_use",id:e??`${g.getTime()}-${n}`,name:n,input:i},a={type:"assistant",...(0,o.baseEntry)(p,h,g,t),message:{role:"assistant",content:[r]}};s.push(a),e&&(l.set(e,r),c.set(e,g.getTime()));continue}if("tool.execution_complete"===w||"tool.executionComplete"===w||"postToolUse"===w){let e=_.toolCallId??_.tool_use_id,n=e?l.get(e):void 0;if(n){let t=c.get(e)??g.getTime(),i=_.result??{},s=_.duration,r="number"==typeof s&&s>=0?s:Math.max(0,g.getTime()-t),l=i.detailedContent??i.content??_.tool_output??"";n.result={timestamp:h,timestampFormatted:(0,o.formatTimestamp)(g),content:"string"==typeof l?l:JSON.stringify(l),durationMs:r,durationFormatted:(0,a.formatDuration)(r)};continue}s.push({type:"system",...(0,o.baseEntry)(p,h,g,t),raw:p});continue}s.push({type:"system",...(0,o.baseEntry)(p,h,g,t),raw:p})}return s.length>500&&await new Promise(e=>setImmediate(e)),s.sort((e,t)=>e.timestampMs-t.timestampMs),{entries:s,rawLines:r,cwd:n}}async function m(e){let t,i=d(e);if(!i)return null;try{t=await (0,n.readFile)(i,"utf-8")}catch{return null}let{entries:s,rawLines:r,cwd:o}=await f(t,"session");return{entries:s,rawLines:r,cwd:o,filePath:i}}(0,r.runtimeCache)(e=>m(e),60,{maxSize:50}),e.s(["findCursorTranscript",0,d,"getCursorSessionLog",0,m])},79364,e=>{"use strict";var t=e.i(79708),n=e.i(40375),i=e.i(81580),s=e.i(83534),r=e.i(28557);async function o(){let e=await (0,t.openSqliteReadonly)((0,n.devinDbPath)());if(!e)return[];try{return e.query("SELECT id, working_directory, title, created_at, last_activity_at, hidden FROM sessions ORDER BY last_activity_at DESC").filter(e=>!e.hidden).map(e=>{let t=e.working_directory??void 0;return{sessionId:e.id,cwd:t,title:e.title??void 0,projectName:t?(0,i.encodeFolderName)(t):"devin",mtimeMs:(0,n.devinEpochToMs)(e.last_activity_at??e.created_at)}})}catch{return[]}finally{e.close()}}let a=(0,s.runtimeCache)(o,2);async function l(){let e=await o(),t=new Map;for(let n of e){if(!n.cwd)continue;let e=t.get(n.projectName);(!e||n.mtimeMs>e.latest)&&t.set(n.projectName,{latest:n.mtimeMs,cwd:n.cwd,name:n.projectName})}let n=[];for(let{name:e,cwd:i,latest:s}of t.values()){let t=new Date(s);n.push({name:e,path:i,isDirectory:!0,lastModified:t,lastModifiedFormatted:(0,r.formatDate)(t),cli:["devin"]})}return n.sort((e,t)=>t.lastModified.getTime()-e.lastModified.getTime()),n}async function c(e){let t=(await o()).filter(t=>t.cwd&&t.projectName===e);if(0===t.length)return{cwd:null,sessions:[]};let n=[...t].sort((e,t)=>t.mtimeMs-e.mtimeMs);return{cwd:n[0].cwd??null,sessions:n.map(e=>{let t=new Date(e.mtimeMs);return{name:e.title??e.sessionId,path:`devin-db://${e.sessionId}`,lastModified:t,lastModifiedFormatted:(0,r.formatDate)(t),sessionId:e.sessionId,cli:"devin"}})}}let u=(0,s.runtimeCache)(l,2),d=(0,s.runtimeCache)(e=>c(e),2,{maxSize:50});e.s(["getCachedDevinProjects",0,u,"getCachedDevinSessions",0,a,"getCachedDevinSessionsByEncodedName",0,d,"getDevinProjects",0,l,"getDevinSessions",0,o,"getDevinSessionsByEncodedName",0,c])},40375,e=>{"use strict";var t=e.i(60526),n=e.i(50227),i=e.i(79708),s=e.i(83534),r=e.i(54214),o=e.i(67405);let a=/^[A-Za-z0-9_-]+$/;function l(){return process.env.DEVIN_DB_PATH||(0,n.join)(process.env.DEVIN_HOME||(0,n.join)((0,t.homedir)(),".local","share","devin"),"cli","sessions.db")}function c(e){if("string"==typeof e&&0!==e.length)try{return JSON.parse(e)}catch{return}}function u(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function d(e){return"string"==typeof e?e:Array.isArray(e)?e.map(e=>u(e)&&"string"==typeof e.text?e.text:"").filter(Boolean).join("\n"):""}function f(e,t){if("number"==typeof e&&Number.isFinite(e)){if(e>1e12)return new Date(e);if(e>1e9)return new Date(1e3*e)}if("string"==typeof e){let t=Date.parse(e);if(!Number.isNaN(t))return new Date(t)}return new Date(t)}async function m(e){if(!e||!a.test(e))return null;let t=await (0,i.openSqliteReadonly)(l());if(!t)return null;try{let n=t.query("SELECT working_directory FROM sessions WHERE id = ?",[e]);if(0===n.length)return null;let i=n[0].working_directory,s=t.query("SELECT node_id, parent_node_id, chat_message, created_at FROM message_nodes WHERE session_id = ? ORDER BY node_id ASC",[e]),a=function(e){let t=[];for(let n of e){let e=c(n.chat_message);u(e)&&(null!=n.created_at&&null==e._created_at&&(e._created_at=n.created_at),t.push(e))}return t}(function(e){if(0===e.length)return e;let t=new Map;for(let n of e)"number"==typeof n.node_id&&t.set(n.node_id,n);let n=e.reduce((e,t)=>(e.node_id??-1)>(t.node_id??-1)?e:t),i=[],s=new Set;for(;n&&"number"==typeof n.node_id&&!s.has(n.node_id);)s.add(n.node_id),i.push(n),n=null!=n.parent_node_id?t.get(n.parent_node_id):void 0;return i.reverse()}(s)),l=function(e,t="session"){let n=[],i=new Map,s=new Map,a=Date.now();for(let l=0;l<e.length;l++){let m=e[l];if(!u(m))continue;let p="string"==typeof m.role?m.role:"system",y=function(e,t){let n=u(e.metadata)?e.metadata:void 0;return n&&null!=n.created_at?f(n.created_at,t):null!=e._created_at?f(e._created_at,t):new Date(t)}(m,a+l),g=y.toISOString(),h={uuid:null!=m.message_id?String(m.message_id):`devin-${l}`,parentUuid:null},w=(0,r.baseEntry)(h,g,y,t);if("user"===p){n.push({type:"user",...w,message:{role:"user",content:d(m.content)}});continue}if("assistant"===p){let e=[],t=d(m.content);for(let n of(t&&e.push({type:"text",text:t}),function(e){let t=Array.isArray(e)?e:c(e);if(!Array.isArray(t))return[];let n=[];for(let e of t){if(!u(e))continue;let t=u(e.function)?e.function:{},i="string"==typeof e.name?e.name:"string"==typeof t.name?t.name:"tool",s="string"==typeof e.id&&e.id||"string"==typeof e.call_id&&e.call_id||`${i}-${n.length}`,r=e.arguments??t.arguments,o=u(r)?r:c(r);n.push({id:s,name:i,input:u(o)?o:{}})}return n}(m.tool_calls))){let t={type:"tool_use",id:n.id,name:n.name,input:n.input};e.push(t),i.set(n.id,t),s.set(n.id,y.getTime())}if(0===e.length)continue;n.push({type:"assistant",...w,message:{role:"assistant",content:e,model:"string"==typeof m.model?m.model:void 0}});continue}if("tool"===p){let e="string"==typeof m.tool_call_id?m.tool_call_id:void 0,t=e?i.get(e):void 0;if(t){let n=e&&s.get(e)||y.getTime(),i=Math.max(0,y.getTime()-n);t.result={timestamp:g,timestampFormatted:(0,r.formatTimestamp)(y),content:d(m.content),durationMs:i,durationFormatted:(0,o.formatDuration)(i)};continue}}n.push({type:"system",...w,raw:h})}return n.sort((e,t)=>e.timestampMs-t.timestampMs),n}(a,"session"),m=i&&i.length>0?i:void 0;return{entries:l,rawLines:a,cwd:m,filePath:`devin-db://${e}`}}catch{return null}finally{t.close()}}(0,s.runtimeCache)(e=>m(e),2,{maxSize:50}),e.s(["devinDbPath",0,l,"devinEpochToMs",0,function(e){if("number"==typeof e&&Number.isFinite(e)){if(e>1e12)return e;if(e>1e9)return 1e3*e}return Date.now()},"getDevinSessionLog",0,m])},28246,e=>{"use strict";var t=e.i(12714),n=e.i(2157),i=e.i(60526),s=e.i(50227),r=e.i(81580),o=e.i(83534),a=e.i(54214),l=e.i(67405);let c=/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/;function u(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function d(e){return"string"==typeof e?e:Array.isArray(e)?e.map(e=>u(e)&&"string"==typeof e.text?e.text:"").filter(Boolean).join("\n"):""}function f(e,t="session"){let n=[],i=new Map,s=new Map,r=Date.now();for(let o=0;o<e.length;o++){let c=e[o];if(!u(c)||"message"!==c.type)continue;let f=u(c.message)?c.message:void 0;if(!f)continue;let m="string"==typeof f.role?f.role:"system",p=function(e,t){if("number"==typeof e&&Number.isFinite(e)){if(e>1e12)return new Date(e);if(e>1e9)return new Date(1e3*e)}if("string"==typeof e){let t=Date.parse(e);if(!Number.isNaN(t))return new Date(t)}return new Date(t)}(c.timestamp??f.timestamp,r+o),y=p.toISOString(),g={uuid:null!=c.id?String(c.id):`factory-${o}`,parentUuid:null!=c.parentId?String(c.parentId):null},h=(0,a.baseEntry)(g,y,p,t),w=f.content;if("assistant"===m){let e=[];if(Array.isArray(w)){for(let t of w)if(u(t)){if("text"===t.type&&"string"==typeof t.text)e.push({type:"text",text:t.text});else if("tool_use"===t.type){let n="string"==typeof t.id?t.id:`${String(t.name??"tool")}-${e.length}`,r={type:"tool_use",id:n,name:"string"==typeof t.name?t.name:"tool",input:u(t.input)?t.input:{}};e.push(r),i.set(n,r),s.set(n,p.getTime())}}}else{let t=d(w);t&&e.push({type:"text",text:t})}if(0===e.length)continue;n.push({type:"assistant",...h,message:{role:"assistant",content:e,model:"string"==typeof f.model?f.model:void 0}});continue}if(Array.isArray(w)){let e=!1,t=[];for(let n of w)if(u(n)){if("tool_result"===n.type){let t="string"==typeof n.tool_use_id?n.tool_use_id:"string"==typeof n.toolUseId?n.toolUseId:void 0,r=t?i.get(t):void 0;if(r){let i=t&&s.get(t)||p.getTime(),o=Math.max(0,p.getTime()-i);r.result={timestamp:y,timestampFormatted:(0,a.formatTimestamp)(p),content:d(n.content),durationMs:o,durationFormatted:(0,l.formatDuration)(o)},e=!0;continue}}"text"===n.type&&"string"==typeof n.text&&t.push(n.text)}t.length>0?n.push({type:"user",...h,message:{role:"user",content:t.join("\n")}}):e||n.push({type:"system",...h,raw:g});continue}if("user"===m){n.push({type:"user",...h,message:{role:"user",content:d(w)}});continue}n.push({type:"system",...h,raw:g})}return n.sort((e,t)=>e.timestampMs-t.timestampMs),n}function m(){let e,t=(0,s.join)(process.env.FACTORY_HOME||(0,s.join)((0,i.homedir)(),".factory"),"sessions"),o=[];try{e=(0,n.readdirSync)(t,{withFileTypes:!0}).filter(e=>e.isDirectory())}catch{return o}for(let i of e){let e,a=i.name,l=(0,r.decodeFolderName)(a),u=(0,s.join)(t,a);try{e=(0,n.readdirSync)(u)}catch{continue}for(let t of e){if(!t.endsWith(".jsonl"))continue;let e=t.slice(0,-6);if(!c.test(e))continue;let i=(0,s.join)(u,t);try{let t=(0,n.statSync)(i);o.push({projectName:a,cwd:l,sessionId:e,transcriptPath:i,mtimeMs:t.mtimeMs,sizeBytes:t.size})}catch{}}}return o}function p(e){if(!c.test(e))return null;for(let t of m())if(t.sessionId===e)return t.transcriptPath;return null}async function y(e){let n,i,s=p(e);if(!s)return null;try{n=await (0,t.readFile)(s,"utf-8")}catch{return null}let r=(0,a.parseRawLines)(n,"session"),o=f(r,"session");for(let e of r)if(u(e)&&"session_start"===e.type&&"string"==typeof e.cwd&&e.cwd.length>0){i=e.cwd;break}return{entries:o,rawLines:r,cwd:i,filePath:s}}(0,o.runtimeCache)(e=>y(e),60,{maxSize:50}),e.s(["factoryLinesToLogEntries",0,f,"findFactoryTranscript",0,p,"getFactorySessionLog",0,y,"listFactoryTranscripts",0,m])},69164,e=>{"use strict";var t=e.i(79708),n=e.i(36618),i=e.i(81580),s=e.i(83534),r=e.i(28557);async function o(){let e=await (0,t.openSqliteReadonly)((0,n.gooseDbPath)());if(!e)return[];try{return e.query("SELECT id, working_dir, description, name, session_type, created_at, updated_at FROM sessions ORDER BY updated_at DESC").filter(e=>"hidden"!==e.session_type).map(e=>{let t=e.working_dir??void 0,s=(e.description&&e.description.length>0?e.description:e.name)??void 0;return{sessionId:e.id,cwd:t,title:s&&s.length>0?s:void 0,projectName:t?(0,i.encodeFolderName)(t):"goose",mtimeMs:(0,n.gooseTimestampToMs)(e.updated_at??e.created_at)}})}catch{return[]}finally{e.close()}}let a=(0,s.runtimeCache)(o,2);async function l(){let e=await o(),t=new Map;for(let n of e){if(!n.cwd)continue;let e=t.get(n.projectName);(!e||n.mtimeMs>e.latest)&&t.set(n.projectName,{latest:n.mtimeMs,cwd:n.cwd,name:n.projectName})}let n=[];for(let{name:e,cwd:i,latest:s}of t.values()){let t=new Date(s);n.push({name:e,path:i,isDirectory:!0,lastModified:t,lastModifiedFormatted:(0,r.formatDate)(t),cli:["goose"]})}return n.sort((e,t)=>t.lastModified.getTime()-e.lastModified.getTime()),n}async function c(e){let t=(await o()).filter(t=>t.cwd&&t.projectName===e);if(0===t.length)return{cwd:null,sessions:[]};let n=[...t].sort((e,t)=>t.mtimeMs-e.mtimeMs);return{cwd:n[0].cwd??null,sessions:n.map(e=>{let t=new Date(e.mtimeMs);return{name:e.title??e.sessionId,path:`goose-db://${e.sessionId}`,lastModified:t,lastModifiedFormatted:(0,r.formatDate)(t),sessionId:e.sessionId,cli:"goose"}})}}let u=(0,s.runtimeCache)(l,2),d=(0,s.runtimeCache)(e=>c(e),2,{maxSize:50});e.s(["getCachedGooseProjects",0,u,"getCachedGooseSessions",0,a,"getCachedGooseSessionsByEncodedName",0,d,"getGooseProjects",0,l,"getGooseSessions",0,o,"getGooseSessionsByEncodedName",0,c])},36618,e=>{"use strict";var t=e.i(60526),n=e.i(50227),i=e.i(79708),s=e.i(83534),r=e.i(54214),o=e.i(67405);let a=/^\d{8}_\d+$/;function l(){return process.env.GOOSE_DB_PATH||(0,n.join)(function(){if(process.env.GOOSE_HOME)return process.env.GOOSE_HOME;let e=process.env.XDG_DATA_HOME;return(0,n.join)(e&&e.length>0?e:(0,n.join)((0,t.homedir)(),".local","share"),"goose")}(),"sessions","sessions.db")}function c(e){if("number"==typeof e&&Number.isFinite(e)){if(e>1e12)return e;if(e>1e9)return 1e3*e}if("string"==typeof e&&e.length>0){let t=Date.parse(/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(e)?e.replace(" ","T")+"Z":e);if(!Number.isNaN(t))return t}return Date.now()}function u(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function d(e){return"string"==typeof e?e:Array.isArray(e)?e.map(e=>u(e)&&"string"==typeof e.text?e.text:"").filter(Boolean).join("\n"):""}async function f(e){if(!e||!a.test(e))return null;let t=await (0,i.openSqliteReadonly)(l());if(!t)return null;try{let n=t.query("SELECT working_dir FROM sessions WHERE id = ?",[e]);if(0===n.length)return null;let i=n[0].working_dir,s=t.query("SELECT role, content_json, created_timestamp FROM messages WHERE session_id = ? ORDER BY id ASC",[e]),a=function(e,t="session"){let n=[],i=new Map,s=new Map,a=Date.now();for(let l=0;l<e.length;l++){let f=e[l],m=function(e){if("string"==typeof e&&0!==e.length)try{return JSON.parse(e)}catch{return}}(f.content_json);if(!Array.isArray(m))continue;let p="string"==typeof f.role?f.role:"system",y=function(e,t){let n="number"==typeof e||"string"==typeof e?c(e):NaN;return new Date(Number.isNaN(n)?t:n)}(f.created_timestamp,a+l),g=y.toISOString(),h={uuid:`goose-${l}`,parentUuid:null},w=(0,r.baseEntry)(h,g,y,t),_=[],S=[],M=[];for(let e of m)u(e)&&("text"===e.type&&"string"==typeof e.text?_.push(e.text):"toolRequest"===e.type?S.push(e):"toolResponse"===e.type&&M.push(e));for(let e of M){let t="string"==typeof e.id?e.id:void 0,n=t?i.get(t):void 0;if(!n)continue;let a=t&&s.get(t)||y.getTime(),l=Math.max(0,y.getTime()-a);n.result={timestamp:g,timestampFormatted:(0,r.formatTimestamp)(y),content:function(e){let t=(u(e.toolResult)?e.toolResult:{}).value;return u(t)&&Array.isArray(t.content)?d(t.content):"string"==typeof t?t:Array.isArray(t)?d(t):""}(e),durationMs:l,durationFormatted:(0,o.formatDuration)(l)}}let v=_.join("\n").trim();if(S.length>0||"assistant"===p&&v){let e=[];for(let t of(v&&e.push({type:"text",text:v}),S)){let{id:n,name:r,input:o}=function(e,t){let n="string"==typeof e.id&&e.id?e.id:`goose-tool-${t}`,i=u(e.toolCall)?e.toolCall:{},s=u(i.value)?i.value:{},r="string"==typeof s.name?s.name:"tool";return{id:n,name:r,input:u(s.arguments)?s.arguments:{}}}(t,e.length),a={type:"tool_use",id:n,name:r,input:o};e.push(a),i.set(n,a),s.set(n,y.getTime())}if(0===e.length)continue;n.push({type:"assistant",...w,message:{role:"assistant",content:e}});continue}if("user"===p&&v){n.push({type:"user",...w,message:{role:"user",content:v}});continue}v&&n.push({type:"system",...w,raw:h})}return n.sort((e,t)=>e.timestampMs-t.timestampMs),n}(s,"session"),l=i&&i.length>0?i:void 0;return{entries:a,rawLines:s,cwd:l,filePath:`goose-db://${e}`}}catch{return null}finally{t.close()}}(0,s.runtimeCache)(e=>f(e),2,{maxSize:50}),e.s(["getGooseSessionLog",0,f,"gooseDbPath",0,l,"gooseTimestampToMs",0,c])},28898,e=>{"use strict";var t=e.i(2157),n=e.i(60526),i=e.i(50227);let s="profiles",r="default";function o(){let e=(process.env.HERMES_HOME||"").trim();if(e){let t=(0,i.resolve)(e),n=(0,i.dirname)(t);return(0,i.basename)(n)===s?(0,i.dirname)(n):t}return(0,i.join)((0,n.homedir)(),".hermes")}function a(){let e,n=o(),a=[{name:r,home:n}],l=new Set([r]);try{e=(0,t.readdirSync)((0,i.join)(n,s),{withFileTypes:!0}).filter(e=>(e.isDirectory()||e.isSymbolicLink())&&!e.name.startsWith(".")).map(e=>e.name).sort()}catch{return a}for(let t of e)l.has(t)||(l.add(t),a.push({name:t,home:(0,i.join)(n,s,t)}));return a}e.s(["HERMES_DEFAULT_PROFILE",0,r,"hermesProjectName",0,function(e,t){return`hermes-${e}-${t}`},"hermesProjectNameCandidates",0,function(e){if(!e.startsWith("hermes-"))return[];let t=e.slice(7);if(!t)return[];let n=[];for(let e of a().map(e=>e.name).sort((e,t)=>t.length-e.length)){let i=`${e}-`;t.startsWith(i)&&t.length>i.length&&n.push({profile:e,source:t.slice(i.length)})}return n.push({profile:r,source:t}),n},"hermesProjectPath",0,function(e,t){return`hermes:${e}:${t}`},"hermesRoot",0,o,"listHermesProfiles",0,a])},64828,e=>{"use strict";var t=e.i(79708),n=e.i(3605),i=e.i(28898),s=e.i(83534),r=e.i(28557);async function o(){let e=[];for(let{profile:t,dbPath:i}of(0,n.hermesDbPaths)())e.push(...await a(i,t));return e.sort((e,t)=>t.mtimeMs-e.mtimeMs),e}async function a(e,i){let s=await (0,t.openSqliteReadonly)(e);if(!s)return[];try{return s.query("SELECT s.id, s.source, s.cwd, s.title, s.user_id, s.chat_id, s.chat_type, s.started_at, s.ended_at, s.message_count, lm.last_activity FROM sessions s LEFT JOIN (SELECT session_id, MAX(timestamp) AS last_activity FROM messages GROUP BY session_id) lm ON lm.session_id = s.id ORDER BY lm.last_activity DESC").map(e=>({sessionId:e.id,profile:i,source:e.source??void 0,cwd:e.cwd??void 0,title:e.title??void 0,userId:e.user_id??void 0,chatId:e.chat_id??void 0,chatType:e.chat_type??void 0,mtimeMs:(0,n.epochToMs)(e.last_activity??e.ended_at??e.started_at),messageCount:"number"==typeof e.message_count?e.message_count:0,hasMessages:null!=e.last_activity}))}catch{return[]}finally{s.close()}}let l=(0,s.runtimeCache)(o,2);async function c(){let e=await o(),t=new Map;for(let n of e){if(n.messageCount<=0&&!n.hasMessages)continue;let e=n.profile||i.HERMES_DEFAULT_PROFILE,s=n.source??"unknown",r=JSON.stringify([e,s]),o=t.get(r);o?(o.latest=Math.max(o.latest,n.mtimeMs),o.count+=1):t.set(r,{profile:e,source:s,latest:n.mtimeMs,count:1})}let n=[];for(let{profile:e,source:s,latest:o,count:a}of t.values()){let t=new Date(o);n.push({name:(0,i.hermesProjectName)(e,s),path:(0,i.hermesProjectPath)(e,s),isDirectory:!0,lastModified:t,lastModifiedFormatted:(0,r.formatDate)(t),cli:["hermes"],sessionCount:a})}return n.sort((e,t)=>t.lastModified.getTime()-e.lastModified.getTime()),n}async function u(e){let t=(0,i.hermesProjectNameCandidates)(e);if(0===t.length)return{cwd:null,sessions:[]};let n=await o(),s=e=>n.filter(t=>(t.messageCount>0||t.hasMessages)&&(t.profile||i.HERMES_DEFAULT_PROFILE)===e.profile&&(t.source??"unknown")===e.source),a=t[0],l=s(a);if(0===l.length)for(let e of t.slice(1)){let t=s(e);if(t.length>0){a=e,l=t;break}}let{profile:c,source:u}=a;return{cwd:(0,i.hermesProjectPath)(c,u),sessions:l.map(e=>{let t=new Date(e.mtimeMs);return{name:e.title??e.sessionId,path:`hermes://${e.sessionId}`,lastModified:t,lastModifiedFormatted:(0,r.formatDate)(t),sessionId:e.sessionId,cli:"hermes",userId:e.userId,channelId:e.chatId,channelType:e.chatType}})}}let d=(0,s.runtimeCache)(c,2),f=(0,s.runtimeCache)(e=>u(e),2,{maxSize:50});e.s(["getCachedHermesProjects",0,d,"getCachedHermesSessions",0,l,"getCachedHermesSessionsByEncodedName",0,f,"getHermesProjects",0,c,"getHermesSessions",0,o,"getHermesSessionsByEncodedName",0,u])},3605,e=>{"use strict";var t=e.i(50227),n=e.i(79708),i=e.i(28898),s=e.i(83534),r=e.i(54214),o=e.i(67405);function a(){let e=process.env.HERMES_DB_PATH;return e?[{profile:i.HERMES_DEFAULT_PROFILE,dbPath:e}]:(0,i.listHermesProfiles)().map(e=>({profile:e.name,dbPath:(0,t.join)(e.home,"state.db")}))}function l(e){if("string"==typeof e&&0!==e.length)try{return JSON.parse(e)}catch{return}}function c(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function u(e){return"string"==typeof e?e:Array.isArray(e)?e.map(e=>c(e)&&"string"==typeof e.text?e.text:"").filter(Boolean).join("\n"):""}async function d(e){if(!e||!/^[A-Za-z0-9_-]+$/.test(e))return null;for(let{profile:t,dbPath:n}of a()){let i=await f(n,t,e);if(i)return i}return null}async function f(e,t,s){let a=await (0,n.openSqliteReadonly)(e);if(!a)return null;try{let e=a.query("SELECT source, cwd FROM sessions WHERE id = ?",[s]);if(0===e.length)return null;let{source:n,cwd:d}=e[0],f=a.query("SELECT id, role, content, tool_call_id, tool_calls, tool_name, timestamp FROM messages WHERE session_id = ? ORDER BY timestamp ASC",[s]),m=function(e,t="session"){let n=[],i=new Map,s=new Map,a=Date.now();for(let d=0;d<e.length;d++){let f=e[d];if(!c(f))continue;let m="string"==typeof f.role?f.role:"system",p=function(e,t){if("number"==typeof e&&Number.isFinite(e)){if(e>1e12)return new Date(e);if(e>1e9)return new Date(1e3*e)}if("string"==typeof e){let t=Date.parse(e);if(!Number.isNaN(t))return new Date(t)}return new Date(t)}(f.timestamp??f.time_created,a+d),y=p.toISOString(),g={uuid:null!=f.id?String(f.id):`hermes-${d}`,parentUuid:null},h=(0,r.baseEntry)(g,y,p,t);if("user"===m){n.push({type:"user",...h,message:{role:"user",content:u(f.content)}});continue}if("assistant"===m){let e=[],t=u(f.content);for(let n of(t&&e.push({type:"text",text:t}),function(e){let t=Array.isArray(e)?e:l(e);if(!Array.isArray(t))return[];let n=[];for(let e of t){if(!c(e))continue;let t=c(e.function)?e.function:{},i="string"==typeof t.name?t.name:"string"==typeof e.name?e.name:"tool",s="string"==typeof e.id&&e.id||"string"==typeof e.call_id&&e.call_id||`${i}-${n.length}`,r=c(t.arguments)?t.arguments:l(t.arguments);n.push({id:s,name:i,input:c(r)?r:{}})}return n}(f.tool_calls))){let t={type:"tool_use",id:n.id,name:n.name,input:n.input};e.push(t),i.set(n.id,t),s.set(n.id,p.getTime())}if(0===e.length)continue;n.push({type:"assistant",...h,message:{role:"assistant",content:e}});continue}if("tool"===m){let e="string"==typeof f.tool_call_id?f.tool_call_id:void 0,t=e?i.get(e):void 0;if(t){let n=e&&s.get(e)||p.getTime(),i=Math.max(0,p.getTime()-n);t.result={timestamp:y,timestampFormatted:(0,r.formatTimestamp)(p),content:u(f.content),durationMs:i,durationFormatted:(0,o.formatDuration)(i)};continue}}n.push({type:"system",...h,raw:g})}return n.sort((e,t)=>e.timestampMs-t.timestampMs),n}(f,"session"),p=d&&d.length>0?d:n?(0,i.hermesProjectPath)(t,n):void 0;return{entries:m,rawLines:f,cwd:p,filePath:`hermes://${s}`,profile:t}}catch{return null}finally{a.close()}}(0,s.runtimeCache)(e=>d(e),2,{maxSize:50}),e.s(["epochToMs",0,function(e){if("number"==typeof e&&Number.isFinite(e)){if(e>1e12)return e;if(e>1e9)return 1e3*e}return Date.now()},"getHermesSessionLog",0,d,"hermesDbPaths",0,a])},90624,e=>{"use strict";var t=e.i(2157),n=e.i(50227),i=e.i(83534),s=e.i(64199),r=e.i(28557);function o(e){return"string"==typeof e&&e.length>0?e:void 0}async function a(){let e=(0,s.listOpenClawTranscripts)(),i=new Map,r=[];for(let a of e){let e=i.get(a.agentId);e||(e=function(e){let i,r=new Map,a=(0,n.join)((0,s.openclawHome)(),"agents",e,"sessions","sessions.json");try{i=JSON.parse((0,t.readFileSync)(a,"utf-8"))}catch{return r}if(!i||"object"!=typeof i)return r;for(let e of Object.values(i)){if(!e||"object"!=typeof e)continue;let t=o(e.sessionId);if(!t)continue;let n=e.origin&&"object"==typeof e.origin?e.origin:{},i="number"==typeof e.lastInteractionAt?e.lastInteractionAt:"number"==typeof e.updatedAt?e.updatedAt:void 0;r.set(t,{lastMs:i,channel:o(e.lastChannel)??o(n.provider)??o(n.surface),chatType:o(e.chatType)??o(n.chatType),label:o(n.label),chatId:o(e.lastTo)??o(n.from)})}return r}(a.agentId),i.set(a.agentId,e));let l=e.get(a.sessionId);r.push({sessionId:a.sessionId,agentId:a.agentId,channel:l?.channel??"local",label:l?.label,chatType:l?.chatType,chatId:l?.chatId,transcriptPath:a.transcriptPath,mtimeMs:l?.lastMs??a.mtimeMs,sizeBytes:a.sizeBytes})}return r.sort((e,t)=>t.mtimeMs-e.mtimeMs),r}let l=(0,i.runtimeCache)(a,2);function c(e,t){return`openclaw-${e}-${t}`}function u(e,t){return`openclaw:${e}:${t}`}function d(e){if(!e.startsWith("openclaw-"))return[];let t=e.slice(9);if(!t)return[];let n=[];for(let e of(0,s.listOpenClawAgents)().sort((e,t)=>t.length-e.length)){let i=`${e}-`;t.startsWith(i)&&t.length>i.length&&n.push({agentId:e,channel:t.slice(i.length)})}return n.push({agentId:null,channel:t}),n}async function f(){let e=await a(),t=new Map;for(let n of e){let e=JSON.stringify([n.agentId,n.channel]),i=t.get(e);i?(i.latest=Math.max(i.latest,n.mtimeMs),i.count+=1):t.set(e,{agentId:n.agentId,channel:n.channel,latest:n.mtimeMs,count:1})}let n=[];for(let{agentId:e,channel:i,latest:s,count:o}of t.values()){let t=new Date(s);n.push({name:c(e,i),path:u(e,i),isDirectory:!0,lastModified:t,lastModifiedFormatted:(0,r.formatDate)(t),cli:["openclaw"],sessionCount:o})}return n.sort((e,t)=>t.lastModified.getTime()-e.lastModified.getTime()),n}async function m(e){let t=d(e);if(0===t.length)return{cwd:null,sessions:[]};let n=await a(),i=e=>n.filter(t=>t.channel===e.channel&&(null===e.agentId||t.agentId===e.agentId)),s=t[0],o=i(s);if(0===o.length)for(let e of t.slice(1)){let t=i(e);if(t.length>0){s=e,o=t;break}}let{agentId:l,channel:c}=s;return{cwd:null===l?`openclaw:${c}`:u(l,c),sessions:o.map(e=>{let t=new Date(e.mtimeMs);return{name:e.label??e.chatId??e.sessionId,path:e.sessionId,lastModified:t,lastModifiedFormatted:(0,r.formatDate)(t),sessionId:e.sessionId,cli:"openclaw",channelId:e.chatId,channelType:e.chatType}})}}let p=(0,i.runtimeCache)(f,2),y=(0,i.runtimeCache)(e=>m(e),2,{maxSize:50});e.s(["getCachedOpenClawProjects",0,p,"getCachedOpenClawSessions",0,l,"getCachedOpenClawSessionsByEncodedName",0,y,"getOpenClawProjects",0,f,"getOpenClawSessions",0,a,"getOpenClawSessionsByEncodedName",0,m,"openClawProjectName",0,c,"openClawProjectNameCandidates",0,d,"openClawProjectPath",0,u,"parseOpenClawProjectName",0,function(e){return d(e)[0]??null}])},64199,e=>{"use strict";var t=e.i(12714),n=e.i(2157),i=e.i(60526),s=e.i(50227),r=e.i(83534),o=e.i(54214),a=e.i(67405);let l=/^[0-9a-fA-F-]{36}$/;function c(){return process.env.OPENCLAW_HOME||(0,s.join)((0,i.homedir)(),".openclaw")}function u(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function d(e){return"string"==typeof e?e:Array.isArray(e)?e.map(e=>u(e)&&"string"==typeof e.text?e.text:"").filter(Boolean).join("\n"):""}function f(){let e,t=(0,s.join)(c(),"agents"),i=[];try{e=(0,n.readdirSync)(t,{withFileTypes:!0}).filter(e=>e.isDirectory()).map(e=>e.name)}catch{return i}for(let r of e){let e,o=(0,s.join)(t,r,"sessions");try{e=(0,n.readdirSync)(o)}catch{continue}for(let t of e){if(!t.endsWith(".jsonl")||t.endsWith(".trajectory.jsonl"))continue;let e=t.slice(0,-6);if(!l.test(e))continue;let a=(0,s.join)(o,t);try{let t=(0,n.statSync)(a);i.push({agentId:r,sessionId:e,transcriptPath:a,mtimeMs:t.mtimeMs,sizeBytes:t.size})}catch{}}}return i}function m(e){if(!l.test(e))return null;for(let t of f())if(t.sessionId===e)return t.transcriptPath;return null}async function p(e){let n,i,s=m(e);if(!s)return null;try{n=await (0,t.readFile)(s,"utf-8")}catch{return null}let r=(0,o.parseRawLines)(n,"session"),l=function(e,t="session"){let n=[],i=new Map,s=new Map,r=Date.now();for(let l=0;l<e.length;l++){let c=e[l];if(!u(c)||"message"!==c.type)continue;let f=u(c.message)?c.message:void 0;if(!f)continue;let m="string"==typeof f.role?f.role:"system",p=function(e,t){if("number"==typeof e&&Number.isFinite(e)){if(e>1e12)return new Date(e);if(e>1e9)return new Date(1e3*e)}if("string"==typeof e){let t=Date.parse(e);if(!Number.isNaN(t))return new Date(t)}return new Date(t)}(c.timestamp??f.timestamp,r+l),y=p.toISOString(),g={uuid:null!=c.id?String(c.id):`openclaw-${l}`,parentUuid:null!=c.parentId?String(c.parentId):null},h=(0,o.baseEntry)(g,y,p,t);if("user"===m){n.push({type:"user",...h,message:{role:"user",content:d(f.content)}});continue}if("assistant"===m){let e=[],t=f.content;if(Array.isArray(t)){for(let n of t)if(u(n)){if("text"===n.type&&"string"==typeof n.text)e.push({type:"text",text:n.text});else if("toolCall"===n.type){let t="string"==typeof n.id?n.id:`${String(n.name??"tool")}-${e.length}`,r={type:"tool_use",id:t,name:"string"==typeof n.name?n.name:"tool",input:u(n.arguments)?n.arguments:{}};e.push(r),i.set(t,r),s.set(t,p.getTime())}}}else{let n=d(t);n&&e.push({type:"text",text:n})}if(0===e.length)continue;n.push({type:"assistant",...h,message:{role:"assistant",content:e,model:"string"==typeof f.model?f.model:void 0}});continue}if("toolResult"===m){let e="string"==typeof f.toolCallId?f.toolCallId:void 0,t=e?i.get(e):void 0;if(t){let n=u(f.details)?f.details:void 0,i=e&&s.get(e)||p.getTime(),r=n&&"number"==typeof n.durationMs?n.durationMs:Math.max(0,p.getTime()-i);t.result={timestamp:y,timestampFormatted:(0,o.formatTimestamp)(p),content:d(f.content),durationMs:r,durationFormatted:(0,a.formatDuration)(r)};continue}}n.push({type:"system",...h,raw:g})}return n.sort((e,t)=>e.timestampMs-t.timestampMs),n}(r,"session");for(let e of r)if(u(e)&&"session"===e.type&&"string"==typeof e.cwd&&e.cwd.length>0){i=e.cwd;break}return{entries:l,rawLines:r,cwd:i,filePath:s}}(0,r.runtimeCache)(e=>p(e),2,{maxSize:50}),e.s(["findOpenClawTranscript",0,m,"getOpenClawSessionLog",0,p,"listOpenClawAgents",0,function(){try{return(0,n.readdirSync)((0,s.join)(c(),"agents"),{withFileTypes:!0}).filter(e=>e.isDirectory()&&!e.name.startsWith(".")).map(e=>e.name).sort()}catch{return[]}},"listOpenClawTranscripts",0,f,"openclawHome",0,c])},40759,e=>{"use strict";var t=e.i(60526),n=e.i(50227),i=e.i(79708);async function s(e){let s=await (0,i.openSqliteReadonly)(function(){if(process.env.OPENCODE_DB_PATH)return process.env.OPENCODE_DB_PATH;let e=process.env.OPENCODE_HOME??(0,n.join)((0,t.homedir)(),".local","share","opencode");return(0,n.join)(e,"opencode.db")}());if(!s)return null;try{return e(s)}catch{return null}finally{try{s.close()}catch{}}}async function r(e,t=[]){return s(n=>n.query(e,t))}e.s(["queryOpenCodeDb",0,r,"withOpenCodeDb",0,s])},35435,e=>{"use strict";var t=e.i(40759),n=e.i(81580),i=e.i(83534),s=e.i(28557),r=e.i(40911);async function o(){return(0,t.queryOpenCodeDb)("SELECT id, project_id, slug, directory, title, time_created, time_updated FROM session ORDER BY time_updated DESC LIMIT ?",[1e3])}async function a(){let e=await (0,t.withOpenCodeDb)(e=>({sessions:e.query("SELECT id, project_id, slug, directory, title, time_created, time_updated FROM session ORDER BY time_updated DESC LIMIT ?",[1e3]),projects:e.query("SELECT id, worktree, vcs, name, time_created, time_updated FROM project")}));return{sessions:e?.sessions??null,projects:e?.projects??null}}async function l(){let{sessions:e,projects:t}=await a();if(null===e&&null===t)return[];let i=new Map;for(let e of t??[])i.set(e.id,e);let r=new Map;for(let t of e??[]){if(!t.project_id)continue;let e=r.get(t.project_id);e||(e={rows:[],latest:0},r.set(t.project_id,e)),e.rows.push(t),t.time_updated>e.latest&&(e.latest=t.time_updated)}let o=new Set,l=[];for(let[e,t]of r){o.add(e);let r=i.get(e),a=r?.worktree??t.rows[0]?.directory??null,c=a?(0,n.encodeFolderName)(a):e,u=a??"",d=new Date(Math.max(t.latest,r?.time_updated??0));l.push({name:c,path:u,isDirectory:!0,lastModified:d,lastModifiedFormatted:(0,s.formatDate)(d),cli:["opencode"]})}for(let e of t??[]){if(o.has(e.id))continue;let t=e.worktree??"",i=t?(0,n.encodeFolderName)(t):e.id,r=new Date(e.time_updated);l.push({name:i,path:t,isDirectory:!0,lastModified:r,lastModifiedFormatted:(0,s.formatDate)(r),cli:["opencode"]})}return l.sort((e,t)=>t.lastModified.getTime()-e.lastModified.getTime()),l}async function c(e){let t=await o();return t?t.filter(t=>t.directory===e).map(e=>{let t=new Date(e.time_updated);return{name:e.title??e.slug??e.id,path:`opencode://${e.id}`,lastModified:t,lastModifiedFormatted:(0,s.formatDate)(t),sessionId:e.id,cli:"opencode"}}):[]}async function u(e){let t,i;try{({projects:t,sessions:i}=await a())}catch(e){return(0,r.logWarn)("Failed to read OpenCode DB:",e),{cwd:null,sessions:[]}}if(!t||!i)return{cwd:null,sessions:[]};let o=t.find(t=>t.worktree&&(0,n.encodeFolderName)(t.worktree)===e);if(!o||!o.worktree)return{cwd:null,sessions:[]};let l=i.filter(e=>e.project_id===o.id);return{cwd:o.worktree,sessions:l.map(e=>{let t=new Date(e.time_updated);return{name:e.title??e.slug??e.id,path:`opencode://${e.id}`,lastModified:t,lastModifiedFormatted:(0,s.formatDate)(t),sessionId:e.id,cli:"opencode"}})}}let d=(0,i.runtimeCache)(l,30),f=(0,i.runtimeCache)(e=>c(e),30,{maxSize:50}),m=(0,i.runtimeCache)(e=>u(e),30,{maxSize:50});e.s(["getCachedOpenCodeProjects",0,d,"getCachedOpenCodeSessionsByEncodedName",0,m,"getCachedOpenCodeSessionsForCwd",0,f,"getOpenCodeProjects",0,l,"getOpenCodeSessionsByEncodedName",0,u,"getOpenCodeSessionsForCwd",0,c])},99440,e=>{"use strict";var t=e.i(40759),n=e.i(83534),i=e.i(54214),s=e.i(67405);function r(e){try{return e()}catch{return null}}function o(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function a(e){if("string"!=typeof e||0===e.length)return null;try{let t=JSON.parse(e);return o(t)?t:null}catch{return null}}async function l(e){if(!e||!/^[A-Za-z0-9_-]+$/.test(e))return null;let n=await (0,t.withOpenCodeDb)(t=>({sessions:r(()=>t.query("SELECT id, project_id, slug, directory, title, time_created, time_updated FROM session WHERE id = ?",[e])),messages:r(()=>t.query("SELECT id, session_id, time_created, time_updated, data FROM message WHERE session_id = ? ORDER BY time_created ASC",[e])),parts:r(()=>t.query("SELECT id, message_id, session_id, time_created, time_updated, data FROM part WHERE session_id = ? ORDER BY time_created ASC",[e]))})),l=n?.sessions??null;if(!l||0===l.length)return null;let c=l[0],u=n?.messages??null,d=n?.parts??null;if(!u)return{entries:[],rawLines:[],cwd:c.directory??void 0,filePath:`opencode://${e}`};let f=new Map;for(let e of d??[]){let t=f.get(e.message_id);t||(t=[],f.set(e.message_id,t)),t.push(e)}let m=[],p=[];for(let e of u){let t=f.get(e.id)??[];m.push(function(e,t,n){let r=a(e.data)??{},l="string"==typeof r.role?r.role:"system",c=new Date(e.time_created),u=c.toISOString(),d={uuid:e.id,parentUuid:null},f=(0,i.baseEntry)(d,u,c,n),m=[],p="";for(let e of t){let t=a(e.data);if(!t)continue;let n="string"==typeof t.type?t.type:"unknown";if("text"===n){let e="string"==typeof t.text?t.text:"string"==typeof t.content?t.content:"";e&&(m.push({type:"text",text:e}),p+=(p?"\n":"")+e);continue}if("tool"===n){let n="string"==typeof t.tool?t.tool:"string"==typeof t.name?t.name:"tool",r=o(t.state)?t.state:null,a=r&&o(r.input)?r.input:o(t.input)?t.input:o(t.args)?t.args:{},l={type:"tool_use",id:e.id,name:n,input:a},c=r&&"string"==typeof r.status?r.status:"";if(r&&("completed"===c||"error"===c)){let t=("error"===c&&"string"==typeof r.error?r.error:null)??r.output,n="string"==typeof t?t:null!=t?JSON.stringify(t):"",a=o(r.time)?r.time:{},u="number"==typeof a.start?a.start:e.time_created,d="number"==typeof a.end?a.end:e.time_updated,f=Math.max(0,d-u),m=new Date(d);l.result={timestamp:m.toISOString(),timestampFormatted:(0,i.formatTimestamp)(m),content:n,durationMs:f,durationFormatted:(0,s.formatDuration)(f)}}m.push(l);continue}m.push({type:"text",text:`[opencode ${n}]`})}if("user"===l)return{...f,type:"user",message:{role:"user",content:p}};if("assistant"===l){let e=o(r.model)?r.model:null,t=e&&"string"==typeof e.modelID?e.modelID:void 0;return{...f,type:"assistant",message:{role:"assistant",content:m,model:t}}}return{...f,type:"system",raw:{id:e.id,role:l,parts:m}}}(e,t,"session"));let n=a(e.data);p.push({id:e.id,session_id:e.session_id,time_created:e.time_created,data:n??e.data})}return{entries:m,rawLines:p,cwd:c.directory??void 0,filePath:`opencode://${e}`}}async function c(e){if(!e||!/^[A-Za-z0-9_-]+$/.test(e))return null;let n=await (0,t.withOpenCodeDb)(t=>({sessions:r(()=>t.query("SELECT id, project_id, slug, directory, title, time_created, time_updated FROM session WHERE id = ?",[e])),messages:r(()=>t.query("SELECT id, session_id, time_created, time_updated, data FROM message WHERE session_id = ? ORDER BY time_created ASC",[e])),parts:r(()=>t.query("SELECT id, message_id, session_id, time_created, time_updated, data FROM part WHERE session_id = ? ORDER BY time_created ASC",[e]))})),i=n?.sessions??null;if(!i||0===i.length)return null;let s=n?.messages??null,o=n?.parts??null;return null===s||null===o?null:{session:i[0],messages:s.map(e=>({...e,data:a(e.data)??e.data})),parts:o.map(e=>({...e,data:a(e.data)??e.data}))}}(0,n.runtimeCache)(e=>l(e),30,{maxSize:50}),e.s(["getOpenCodeSessionExport",0,c,"getOpenCodeSessionLog",0,l])},19791,e=>{"use strict";var t=e.i(12714),n=e.i(60526),i=e.i(50227),s=e.i(81580),r=e.i(83534),o=e.i(71809),a=e.i(28557),l=e.i(40911);let c=/^[\d-]+T[\d-]+Z_([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\.jsonl$/i;async function u(e){try{return await (0,t.readdir)(e,{withFileTypes:!0})}catch{return null}}async function d(e){try{return(await (0,t.stat)(e)).mtime}catch{return null}}async function f(e){let n;try{n=await (0,t.readFile)(e,"utf-8")}catch{return null}let i=n.indexOf("\n")>=0?n.slice(0,n.indexOf("\n")):n;if(!i)return null;try{let e=JSON.parse(i);if("session"!==e.type||"string"!=typeof e.cwd||0===e.cwd.length)return null;return e.cwd}catch{return null}}async function m(){let e=process.env.PI_SESSIONS_DIR||(0,i.join)((0,n.homedir)(),".pi","agent","sessions"),t=await u(e);if(!t)return[];let s=[];for(let n of t){if(!n.isDirectory())continue;let t=(0,i.join)(e,n.name),r=await u(t);if(r)for(let e of r){if(!e.isFile())continue;let n=c.exec(e.name);n&&s.push({sessionId:n[1],filePath:(0,i.join)(t,e.name)})}}return 0===s.length?[]:(await (0,o.batchAll)(s.map(e=>async()=>{let t=await f(e.filePath);if(!t)return null;let n=await d(e.filePath);return n?{filePath:e.filePath,sessionId:e.sessionId,cwd:t,fileMtime:n}:null}),16)).filter(e=>"fulfilled"===e.status).map(e=>e.value).filter(e=>null!==e)}let p=(0,r.runtimeCache)(m,30);async function y(){let e;try{e=await p()}catch(e){return(0,l.logWarn)("Failed to scan Pi sessions:",e),[]}let t=new Map;for(let n of e){let e=t.get(n.cwd);(!e||n.fileMtime.getTime()>e.latest.getTime())&&t.set(n.cwd,{latest:n.fileMtime,cwd:n.cwd})}let n=[];for(let{cwd:e,latest:i}of t.values())n.push({name:(0,s.encodeFolderName)(e),path:e,isDirectory:!0,lastModified:i,lastModifiedFormatted:(0,a.formatDate)(i),cli:["pi"]});return n.sort((e,t)=>t.lastModified.getTime()-e.lastModified.getTime()),n}function g(e){let t=e.map(e=>({name:e.sessionId,path:e.filePath,lastModified:e.fileMtime,lastModifiedFormatted:(0,a.formatDate)(e.fileMtime),sessionId:e.sessionId,cli:"pi"}));return t.sort((e,t)=>t.lastModified.getTime()-e.lastModified.getTime()),t}async function h(e){let t;try{t=await p()}catch(e){return(0,l.logWarn)("Failed to scan Pi sessions:",e),[]}return g(t.filter(t=>t.cwd===e))}async function w(e){let t;try{t=await p()}catch(e){return(0,l.logWarn)("Failed to scan Pi sessions:",e),{cwd:null,sessions:[]}}let n=t.filter(t=>(0,s.encodeFolderName)(t.cwd)===e),i=Array.from(new Set(n.map(e=>e.cwd)));return 1!==i.length?{cwd:null,sessions:[]}:{cwd:i[0],sessions:g(n)}}let _=(0,r.runtimeCache)(y,30),S=(0,r.runtimeCache)(e=>h(e),30,{maxSize:50}),M=(0,r.runtimeCache)(e=>w(e),30,{maxSize:50});e.s(["getCachedPiProjects",0,_,"getCachedPiSessionsByEncodedName",0,M,"getCachedPiSessionsForCwd",0,S,"getPiProjects",0,y,"getPiSessionsByEncodedName",0,w,"getPiSessionsForCwd",0,h])},85116,e=>{"use strict";var t=e.i(2157),n=e.i(12714),i=e.i(50227),s=e.i(60526),r=e.i(83534),o=e.i(54214),a=e.i(67405);let l=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,c=/^[\d-]+T[\d-]+Z_([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\.jsonl$/i;function u(e){let n;if(!l.test(e))return null;let r=(0,i.resolve)(process.env.PI_SESSIONS_DIR||(0,i.join)((0,s.homedir)(),".pi","agent","sessions"));try{n=(0,t.readdirSync)(r)}catch{return null}for(let s of n){let n,o=(0,i.resolve)(r,s);if(o.startsWith(`${r}${i.sep}`)){try{n=(0,t.readdirSync)(o)}catch{continue}for(let s of n){let n=c.exec(s);if(!n||n[1].toLowerCase()!==e.toLowerCase())continue;let r=(0,i.resolve)(o,s);if(r.startsWith(`${o}${i.sep}`)&&(0,t.existsSync)(r))return r}}}return null}function d(e){if(!Array.isArray(e))return"";let t=[];for(let n of e)n?.type==="text"&&"string"==typeof n.text&&t.push(n.text);return t.join("\n\n")}async function f(e,t="session"){let n,i=e.split("\n").filter(e=>""!==e.trim()),s=[],r=[],l=!1,c=new Map,u=new Map;for(let e=0;e<i.length;e++){let f;e>0&&e%200==0&&await new Promise(e=>setImmediate(e));let m=i[e];try{f=JSON.parse(m)}catch{continue}let p={...f,_source:t};r.push(p);let y=f.timestamp;if(!y)continue;let g=new Date(y);if(Number.isNaN(g.getTime()))continue;let h=g.toISOString(),w=f.type;if("session"===w){"string"!=typeof f.cwd||n||(n=f.cwd);let e=l?"Session Resumed":"Session Started";l=!0,s.push({type:"queue-operation",...(0,o.baseEntry)(p,h,g,t),label:e});continue}if("message"===w&&f.message&&"object"==typeof f.message){let e=f.message.role,n=f.message.content;if("user"===e){let e=d(n);if(!e)continue;s.push({type:"user",...(0,o.baseEntry)(p,h,g,t),message:{role:"user",content:e}});continue}if("assistant"===e){let e=function(e,t){if(!Array.isArray(e))return[];let n=[];for(let i of e)if(i?.type==="text"&&"string"==typeof i.text&&i.text.length>0&&n.push({type:"text",text:i.text}),i?.type==="thinking"&&"string"==typeof i.thinking&&i.thinking.length>0&&n.push({type:"text",text:`[thinking] ${i.thinking}`}),i?.type==="toolCall"){let e="string"==typeof i.id&&i.id.length>0?i.id:`${"string"==typeof i.name?i.name:"tool"}-${n.length}`,s={type:"tool_use",id:e,name:"string"==typeof i.name?i.name:"tool",input:i.arguments&&"object"==typeof i.arguments&&!Array.isArray(i.arguments)?i.arguments:{}};n.push(s),t?.(s)}return n}(n,e=>{c.set(e.id,e),u.set(e.id,g.getTime())});if(0===e.length){s.push({type:"system",...(0,o.baseEntry)(p,h,g,t),raw:p});continue}s.push({type:"assistant",...(0,o.baseEntry)(p,h,g,t),message:{role:"assistant",content:e}});continue}if("toolResult"===e){let e=f.message.toolCallId,t="string"==typeof e?c.get(e):void 0;if(t){let i="string"==typeof e&&u.get(e)||g.getTime(),s=Math.max(0,g.getTime()-i);t.result={timestamp:h,timestampFormatted:(0,o.formatTimestamp)(g),content:d(n),durationMs:s,durationFormatted:(0,a.formatDuration)(s)};continue}}s.push({type:"system",...(0,o.baseEntry)(p,h,g,t),raw:p});continue}s.push({type:"system",...(0,o.baseEntry)(p,h,g,t),raw:p})}return s.length>500&&await new Promise(e=>setImmediate(e)),s.sort((e,t)=>e.timestampMs-t.timestampMs),{entries:s,rawLines:r,cwd:n}}async function m(e){let t,i,s=u(e);if(!s)return null;try{t=await (0,n.readFile)(s,"utf-8")}catch{return null}try{i=await f(t,"session")}catch{return null}return{entries:i.entries,rawLines:i.rawLines,cwd:i.cwd,filePath:s}}(0,r.runtimeCache)(e=>m(e),60,{maxSize:50}),e.s(["findPiTranscript",0,u,"getPiSessionLog",0,m])},46501,e=>{"use strict";var t=e.i(10659),n=e.i(17694),i=e.i(24214),s=e.i(28067);let r=s.POSTHOG_API_KEY;async function o(){try{if(!(0,n.isTelemetryEnabled)()||globalThis.__FAILPROOFAI_POSTHOG__)return;let t=await e.A(78081),i=process.env.FAILPROOFAI_POSTHOG_KEY??r,s=process.env.FAILPROOFAI_POSTHOG_HOST??"https://us.i.posthog.com";globalThis.__FAILPROOFAI_POSTHOG__=new t.PostHog(i,{host:s,flushAt:1,flushInterval:1e4,requestTimeout:1e4,fetchRetryCount:3,fetchRetryDelay:3e3});let o=!1,a=()=>{o||(o=!0,globalThis.__FAILPROOFAI_POSTHOG__?.shutdown().catch(()=>{}))};process.on("beforeExit",a),process.on("SIGTERM",a),process.on("SIGINT",a)}catch(e){console.warn("[failproofai:telemetry] init failed:",e instanceof Error?e.message:e)}}e.s(["initTelemetry",0,o,"trackEvent",0,function(e,r){if(!(0,n.isTelemetryEnabled)())return;let o=globalThis.__FAILPROOFAI_POSTHOG__;o&&o.capture({distinctId:(0,t.getInstanceId)(),event:e,properties:{...r,$lib:"failproofai",failproofai_version:i.version,product:s.POSTHOG_PRODUCT}})}])},29095,e=>{"use strict";var t=e.i(2157),n=e.i(79857);function i(e,t){return!(e&&function(e){if(!Number.isInteger(e)||e<=0)return!1;try{return process.kill(e,0),!0}catch(e){return"EPERM"===e.code}}(e.pid))||t-e.startedAt>36e5}function s(e,n){let i=!1,s=()=>{if(i)return;i=!0,process.removeListener("exit",s);let o=r(e);if(!o||o.pid===n.pid)try{(0,t.unlinkSync)(e)}catch{}};return process.once("exit",s),{info:n,release:s}}function r(e){try{let n=JSON.parse((0,t.readFileSync)(e,"utf8"));if("number"!=typeof n?.pid||"number"!=typeof n?.startedAt)return null;return{pid:n.pid,startedAt:n.startedAt,source:n.source??"cli"}}catch{return null}}function o(e,n){let i=JSON.stringify(n),s=`${e}.${process.pid}.tmp`;try{(0,t.writeFileSync)(s,i,{mode:384})}catch{return!1}try{return(0,t.linkSync)(s,e),!0}catch(s){let n;if("EEXIST"===s.code)return!1;var r=e,o=i;try{return n=(0,t.openSync)(r,"wx",384),(0,t.writeSync)(n,o),!0}catch{return!1}finally{if(void 0!==n)try{(0,t.closeSync)(n)}catch{}}}finally{try{(0,t.unlinkSync)(s)}catch{}}}e.s(["acquireAuditLock",0,function(e,a=Date.now()){let l=(0,n.auditLockFile)(),c={pid:process.pid,startedAt:a,source:e};try{(0,t.mkdirSync)((0,n.failproofaiHome)(),{recursive:!0}),(0,t.mkdirSync)((0,n.runDir)(),{recursive:!0,mode:448})}catch{return{ok:!1,heldBy:null}}if(o(l,c))return{ok:!0,lock:s(l,c)};let u=r(l);if(!i(u,a))return{ok:!1,heldBy:u};try{(0,t.unlinkSync)(l)}catch{}return o(l,c)?{ok:!0,lock:s(l,c)}:{ok:!1,heldBy:r(l)}},"readActiveAuditLock",0,function(e=Date.now()){let t=r((0,n.auditLockFile)());return i(t,e)?null:t}])},47756,e=>{"use strict";var t=e.i(2157),n=e.i(94930),i=e.i(79857);function s(){return(0,i.auditDashboardFile)()}e.s(["readDashboardCache",0,function(){let e=s();if(!(0,t.existsSync)(e))return null;try{let n=(0,t.readFileSync)(e,"utf-8"),i=JSON.parse(n);if(!i||"object"!=typeof i||"string"!=typeof i.cachedAt||!i.params||"object"!=typeof i.params||!i.result||"object"!=typeof i.result||2!==i.schemaVersion||function(e,t=30){let n=new Date(e).getTime();return!!Number.isNaN(n)||Date.now()-n>6e4*t}(i.cachedAt,10080))return null;return i}catch{return null}},"writeDashboardCache",0,function(e,t){try{let i={schemaVersion:2,cachedAt:new Date().toISOString(),params:e,result:t};return(0,n.writeJsonAtomically)(s(),i),!0}catch{return!1}}])},97348,73136,49335,e=>{"use strict";var t=e.i(2157),n=e.i(50227),i=e.i(79857);let s={info:0,warn:1,error:2},r=(0,i.logsDir)(),o=!1,a="warn",l=!1,c=r;function u(e){return!function(){if(o)return;o=!0;let e=(process.env.FAILPROOFAI_LOG_LEVEL??"").toLowerCase();("info"===e||"warn"===e||"error"===e)&&(a=e);let t=(process.env.FAILPROOFAI_HOOK_LOG_FILE??"").trim();t&&(l=!0,"1"!==t&&"true"!==t&&(c=t))}(),s[e]>=s[a]}function d(e,t){process.stderr.write(`[failproofai:hook] ${e} ${t}
|
|
2
|
+
`)}function f(e,i){if(l)try{(0,t.existsSync)(c)||(0,t.mkdirSync)(c,{recursive:!0});let s=(0,n.join)(c,"hooks.log");try{if((0,t.statSync)(s).size>=524288){let e=`hooks-${Date.now()}.log`;(0,t.renameSync)(s,(0,n.join)(c,e))}}catch{}let r=new Date().toISOString(),o=`[${r}] ${e} ${i}
|
|
3
|
+
`;(0,t.appendFileSync)(s,o,"utf-8")}catch{}}function m(e){u("warn")&&(d("WARN",e),f("WARN",e))}e.s(["hookLogError",0,function(e){u("error")&&(d("ERROR",e),f("ERROR",e))},"hookLogInfo",0,function(e){u("info")&&(d("INFO",e),f("INFO",e))},"hookLogWarn",0,m],97348);var p=e.i(60526);function y(e){if(!(0,t.existsSync)(e))return{};try{let n=(0,t.readFileSync)(e,"utf8");return JSON.parse(n)}catch(t){return m(`failed to parse config at ${e}: ${t instanceof Error?t.message:String(t)}`),{}}}e.s(["readMergedHooksConfig",0,function(e){let s=function(e){let i=(0,p.homedir)(),s=(0,n.resolve)(e);for(;s!==i;){let e=(0,n.resolve)(s,".failproofai");try{if((0,t.statSync)(e).isDirectory())return s}catch{}let i=(0,n.dirname)(s);if(i===s)break;s=i}return(0,n.resolve)(e)}(e??process.cwd()),r=(0,n.resolve)(s,".failproofai","policies-config.json"),o=(0,n.resolve)(s,".failproofai","policies-config.local.json"),a=(0,i.globalPolicyConfigFile)(),l=y(r),c=y(o),u=y(a),d=new Set([...l.enabledPolicies??[],...c.enabledPolicies??[],...u.enabledPolicies??[]]),f={};for(let e of[l,c,u])if(e.policyParams)for(let[t,n]of Object.entries(e.policyParams))t in f||(f[t]=n);let m=[l,c,u].map(e=>void 0!==e.customPoliciesPaths?e.customPoliciesPaths:void 0!==e.customPoliciesPath?[e.customPoliciesPath]:void 0).find(e=>void 0!==e),g=new Set([...l.disabledCustomPolicies??[],...c.disabledCustomPolicies??[],...u.disabledCustomPolicies??[]]),h=l.customPoliciesEnabled??c.customPoliciesEnabled??u.customPoliciesEnabled,w=l.llm??c.llm??u.llm;return{enabledPolicies:[...d],...Object.keys(f).length>0?{policyParams:f}:{},...void 0!==m?{customPoliciesPaths:m}:{},...g.size?{disabledCustomPolicies:[...g]}:{},...void 0!==h?{customPoliciesEnabled:h}:{},...void 0!==w?{llm:w}:{}}}],73136);var g=e.i(24214),h=e.i(28067),w=e.i(17694);let _=h.POSTHOG_API_KEY,S=new Set;async function M(e,t,n){let i=JSON.stringify({api_key:process.env.FAILPROOFAI_POSTHOG_KEY??_,event:t,distinct_id:e,properties:{...n,$lib:"failproofai-hooks",failproofai_version:g.version,product:h.POSTHOG_PRODUCT}});try{await fetch(process.env.FAILPROOFAI_POSTHOG_HOST?`${process.env.FAILPROOFAI_POSTHOG_HOST}/capture/`:"https://us.i.posthog.com/capture/",{method:"POST",headers:{"Content-Type":"application/json"},body:i,signal:AbortSignal.timeout(5e3)})}catch{}}async function v(e,t,n){if(!(0,w.isTelemetryEnabled)())return;let i=M(e,t,n);S.add(i),i.finally(()=>S.delete(i)),await i}e.s(["trackHookEvent",0,v],49335)}];
|
|
4
|
+
|
|
5
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__1p-qi2t._.js.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
module.exports=[62004,(e,t,s)=>{"use strict";let r=Symbol.for("yaml.alias"),i=Symbol.for("yaml.document"),n=Symbol.for("yaml.map"),o=Symbol.for("yaml.pair"),a=Symbol.for("yaml.scalar"),l=Symbol.for("yaml.seq"),c=Symbol.for("yaml.node.type"),u=e=>!!e&&"object"==typeof e&&e[c]===a;function f(e){if(e&&"object"==typeof e)switch(e[c]){case n:case l:return!0}return!1}s.ALIAS=r,s.DOC=i,s.MAP=n,s.NODE_TYPE=c,s.PAIR=o,s.SCALAR=a,s.SEQ=l,s.hasAnchor=e=>(u(e)||f(e))&&!!e.anchor,s.isAlias=e=>!!e&&"object"==typeof e&&e[c]===r,s.isCollection=f,s.isDocument=e=>!!e&&"object"==typeof e&&e[c]===i,s.isMap=e=>!!e&&"object"==typeof e&&e[c]===n,s.isNode=function(e){if(e&&"object"==typeof e)switch(e[c]){case r:case n:case a:case l:return!0}return!1},s.isPair=e=>!!e&&"object"==typeof e&&e[c]===o,s.isScalar=u,s.isSeq=e=>!!e&&"object"==typeof e&&e[c]===l},5746,(e,t,s)=>{"use strict";var r=e.r(62004);let i=Symbol("break visit"),n=Symbol("skip children"),o=Symbol("remove node");function a(e,t){let s=f(t);r.isDocument(e)?l(null,e.contents,s,Object.freeze([e]))===o&&(e.contents=null):l(null,e,s,Object.freeze([]))}function l(e,t,s,n){let a=h(e,t,s,n);if(r.isNode(a)||r.isPair(a))return d(e,n,a),l(e,a,s,n);if("symbol"!=typeof a){if(r.isCollection(t)){n=Object.freeze(n.concat(t));for(let e=0;e<t.items.length;++e){let r=l(e,t.items[e],s,n);if("number"==typeof r)e=r-1;else{if(r===i)return i;r===o&&(t.items.splice(e,1),e-=1)}}}else if(r.isPair(t)){n=Object.freeze(n.concat(t));let e=l("key",t.key,s,n);if(e===i)return i;e===o&&(t.key=null);let r=l("value",t.value,s,n);if(r===i)return i;r===o&&(t.value=null)}}return a}async function c(e,t){let s=f(t);r.isDocument(e)?await u(null,e.contents,s,Object.freeze([e]))===o&&(e.contents=null):await u(null,e,s,Object.freeze([]))}async function u(e,t,s,n){let a=await h(e,t,s,n);if(r.isNode(a)||r.isPair(a))return d(e,n,a),u(e,a,s,n);if("symbol"!=typeof a){if(r.isCollection(t)){n=Object.freeze(n.concat(t));for(let e=0;e<t.items.length;++e){let r=await u(e,t.items[e],s,n);if("number"==typeof r)e=r-1;else{if(r===i)return i;r===o&&(t.items.splice(e,1),e-=1)}}}else if(r.isPair(t)){n=Object.freeze(n.concat(t));let e=await u("key",t.key,s,n);if(e===i)return i;e===o&&(t.key=null);let r=await u("value",t.value,s,n);if(r===i)return i;r===o&&(t.value=null)}}return a}function f(e){return"object"==typeof e&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function h(e,t,s,i){return"function"==typeof s?s(e,t,i):r.isMap(t)?s.Map?.(e,t,i):r.isSeq(t)?s.Seq?.(e,t,i):r.isPair(t)?s.Pair?.(e,t,i):r.isScalar(t)?s.Scalar?.(e,t,i):r.isAlias(t)?s.Alias?.(e,t,i):void 0}function d(e,t,s){let i=t[t.length-1];if(r.isCollection(i))i.items[e]=s;else if(r.isPair(i))"key"===e?i.key=s:i.value=s;else if(r.isDocument(i))i.contents=s;else{let e=r.isAlias(i)?"alias":"scalar";throw Error(`Cannot replace node with ${e} parent`)}}a.BREAK=i,a.SKIP=n,a.REMOVE=o,c.BREAK=i,c.SKIP=n,c.REMOVE=o,s.visit=a,s.visitAsync=c},43474,(e,t,s)=>{"use strict";var r=e.r(62004),i=e.r(5746);let n={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},o=e=>e.replace(/[!,[\]{}]/g,e=>n[e]);class a{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},a.defaultYaml,e),this.tags=Object.assign({},a.defaultTags,t)}clone(){let e=new a(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new a(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:a.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},a.defaultTags)}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:a.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},a.defaultTags),this.atNextDocument=!1);let s=e.trim().split(/[ \t]+/),r=s.shift();switch(r){case"%TAG":{if(2!==s.length&&(t(0,"%TAG directive should contain exactly two parts"),s.length<2))return!1;let[e,r]=s;return this.tags[e]=r,!0}case"%YAML":{if(this.yaml.explicit=!0,1!==s.length)return t(0,"%YAML directive should contain exactly one part"),!1;let[e]=s;if("1.1"===e||"1.2"===e)return this.yaml.version=e,!0;{let s=/^\d+\.\d+$/.test(e);return t(6,`Unsupported YAML version ${e}`,s),!1}}default:return t(0,`Unknown directive ${r}`,!0),!1}}tagName(e,t){if("!"===e)return"!";if("!"!==e[0])return t(`Not a valid tag: ${e}`),null;if("<"===e[1]){let s=e.slice(2,-1);return"!"===s||"!!"===s?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(">"!==e[e.length-1]&&t("Verbatim tags must end with a >"),s)}let[,s,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);let i=this.tags[s];if(i)try{return i+decodeURIComponent(r)}catch(e){return t(String(e)),null}return"!"===s?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,s]of Object.entries(this.tags))if(e.startsWith(s))return t+o(e.substring(s.length));return"!"===e[0]?e:`!<${e}>`}toString(e){let t,s=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],n=Object.entries(this.tags);if(e&&n.length>0&&r.isNode(e.contents)){let s={};i.visit(e.contents,(e,t)=>{r.isNode(t)&&t.tag&&(s[t.tag]=!0)}),t=Object.keys(s)}else t=[];for(let[r,i]of n)("!!"!==r||"tag:yaml.org,2002:"!==i)&&(!e||t.some(e=>e.startsWith(i)))&&s.push(`%TAG ${r} ${i}`);return s.join("\n")}}a.defaultYaml={explicit:!1,version:"1.2"},a.defaultTags={"!!":"tag:yaml.org,2002:"},s.Directives=a},97943,(e,t,s)=>{"use strict";var r=e.r(62004),i=e.r(5746);function n(e){let t=new Set;return i.visit(e,{Value(e,s){s.anchor&&t.add(s.anchor)}}),t}function o(e,t){for(let s=1;;++s){let r=`${e}${s}`;if(!t.has(r))return r}}s.anchorIsValid=function(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let t=JSON.stringify(e);throw Error(`Anchor must not contain whitespace or control characters: ${t}`)}return!0},s.anchorNames=n,s.createNodeAnchors=function(e,t){let s=[],i=new Map,a=null;return{onAnchor:r=>{s.push(r),a??(a=n(e));let i=o(t,a);return a.add(i),i},setAnchors:()=>{for(let e of s){let t=i.get(e);if("object"==typeof t&&t.anchor&&(r.isScalar(t.node)||r.isCollection(t.node)))t.node.anchor=t.anchor;else{let t=Error("Failed to resolve repeated object (this should not happen)");throw t.source=e,t}}},sourceObjects:i}},s.findNewAnchor=o},53418,(e,t,s)=>{"use strict";s.applyReviver=function e(t,s,r,i){if(i&&"object"==typeof i)if(Array.isArray(i))for(let s=0,r=i.length;s<r;++s){let r=i[s],n=e(t,i,String(s),r);void 0===n?delete i[s]:n!==r&&(i[s]=n)}else if(i instanceof Map)for(let s of Array.from(i.keys())){let r=i.get(s),n=e(t,i,s,r);void 0===n?i.delete(s):n!==r&&i.set(s,n)}else if(i instanceof Set)for(let s of Array.from(i)){let r=e(t,i,s,s);void 0===r?i.delete(s):r!==s&&(i.delete(s),i.add(r))}else for(let[s,r]of Object.entries(i)){let n=e(t,i,s,r);void 0===n?delete i[s]:n!==r&&(i[s]=n)}return t.call(s,r,i)}},84922,(e,t,s)=>{"use strict";var r=e.r(62004);s.toJS=function e(t,s,i){if(Array.isArray(t))return t.map((t,s)=>e(t,String(s),i));if(t&&"function"==typeof t.toJSON){if(!i||!r.hasAnchor(t))return t.toJSON(s,i);let e={aliasCount:0,count:1,res:void 0};i.anchors.set(t,e),i.onCreate=t=>{e.res=t,delete i.onCreate};let n=t.toJSON(s,i);return i.onCreate&&i.onCreate(n),n}return"bigint"!=typeof t||i?.keep?t:Number(t)}},88865,(e,t,s)=>{"use strict";var r=e.r(53418),i=e.r(62004),n=e.r(84922);s.NodeBase=class{constructor(e){Object.defineProperty(this,i.NODE_TYPE,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:s,onAnchor:o,reviver:a}={}){if(!i.isDocument(e))throw TypeError("A document argument is required");let l={anchors:new Map,doc:e,keep:!0,mapAsMap:!0===t,mapKeyWarned:!1,maxAliasCount:"number"==typeof s?s:100},c=n.toJS(this,"",l);if("function"==typeof o)for(let{count:e,res:t}of l.anchors.values())o(t,e);return"function"==typeof a?r.applyReviver(a,{"":c},"",c):c}}},84079,(e,t,s)=>{"use strict";var r=e.r(97943),i=e.r(5746),n=e.r(62004),o=e.r(88865),a=e.r(84922);class l extends o.NodeBase{constructor(e){super(n.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw Error("Alias nodes cannot have tags")}})}resolve(e,t){let s,r;if(t?.maxAliasCount===0)throw ReferenceError("Alias resolution is disabled");for(let o of(t?.aliasResolveCache?s=t.aliasResolveCache:(s=[],i.visit(e,{Node:(e,t)=>{(n.isAlias(t)||n.hasAnchor(t))&&s.push(t)}}),t&&(t.aliasResolveCache=s)),s)){if(o===this)break;o.anchor===this.source&&(r=o)}return r}toJSON(e,t){if(!t)return{source:this.source};let{anchors:s,doc:r,maxAliasCount:i}=t,o=this.resolve(r,t);if(!o)throw ReferenceError(`Unresolved alias (the anchor must be set before the alias): ${this.source}`);let l=s.get(o);if(l||(a.toJS(o,null,t),l=s.get(o)),l?.res===void 0)throw ReferenceError("This should not happen: Alias anchor was not resolved?");if(i>=0&&(l.count+=1,0===l.aliasCount&&(l.aliasCount=function e(t,s,r){if(n.isAlias(s)){let e=s.resolve(t),i=r&&e&&r.get(e);return i?i.count*i.aliasCount:0}if(n.isCollection(s)){let i=0;for(let n of s.items){let s=e(t,n,r);s>i&&(i=s)}return i}return n.isPair(s)?Math.max(e(t,s.key,r),e(t,s.value,r)):1}(r,o,s)),l.count*l.aliasCount>i))throw ReferenceError("Excessive alias count indicates a resource exhaustion attack");return l.res}toString(e,t,s){let i=`*${this.source}`;if(e){if(r.anchorIsValid(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source))throw Error(`Unresolved alias (the anchor must be set before the alias): ${this.source}`);if(e.implicitKey)return`${i} `}return i}}s.Alias=l},45942,(e,t,s)=>{"use strict";var r=e.r(62004),i=e.r(88865),n=e.r(84922);class o extends i.NodeBase{constructor(e){super(r.SCALAR),this.value=e}toJSON(e,t){return t?.keep?this.value:n.toJS(this.value,e,t)}toString(){return String(this.value)}}o.BLOCK_FOLDED="BLOCK_FOLDED",o.BLOCK_LITERAL="BLOCK_LITERAL",o.PLAIN="PLAIN",o.QUOTE_DOUBLE="QUOTE_DOUBLE",o.QUOTE_SINGLE="QUOTE_SINGLE",s.Scalar=o,s.isScalarValue=e=>!e||"function"!=typeof e&&"object"!=typeof e},12270,(e,t,s)=>{"use strict";var r=e.r(84079),i=e.r(62004),n=e.r(45942);s.createNode=function(e,t,s){let o;if(i.isDocument(e)&&(e=e.contents),i.isNode(e))return e;if(i.isPair(e)){let t=s.schema[i.MAP].createNode?.(s.schema,null,s);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||"u">typeof BigInt&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:a,onAnchor:l,onTagObj:c,schema:u,sourceObjects:f}=s;if(a&&e&&"object"==typeof e){if(o=f.get(e))return o.anchor??(o.anchor=l(e)),new r.Alias(o.anchor);o={anchor:null,node:null},f.set(e,o)}t?.startsWith("!!")&&(t="tag:yaml.org,2002:"+t.slice(2));let h=function(e,t,s){if(t){let e=s.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw Error(`Tag ${t} not found`);return r}return s.find(t=>t.identify?.(e)&&!t.format)}(e,t,u.tags);if(!h){if(e&&"function"==typeof e.toJSON&&(e=e.toJSON()),!e||"object"!=typeof e){let t=new n.Scalar(e);return o&&(o.node=t),t}h=e instanceof Map?u[i.MAP]:Symbol.iterator in Object(e)?u[i.SEQ]:u[i.MAP]}c&&(c(h),delete s.onTagObj);let d=h?.createNode?h.createNode(s.schema,e,s):"function"==typeof h?.nodeClass?.from?h.nodeClass.from(s.schema,e,s):new n.Scalar(e);return t?d.tag=t:h.default||(d.tag=h.tag),o&&(o.node=d),d}},60044,(e,t,s)=>{"use strict";var r=e.r(12270),i=e.r(62004),n=e.r(88865);function o(e,t,s){let i=s;for(let e=t.length-1;e>=0;--e){let s=t[e];if("number"==typeof s&&Number.isInteger(s)&&s>=0){let e=[];e[s]=i,i=e}else i=new Map([[s,i]])}return r.createNode(i,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}let a=e=>null==e||"object"==typeof e&&!!e[Symbol.iterator]().next().done;class l extends n.NodeBase{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(t=>i.isNode(t)||i.isPair(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(a(e))this.add(t);else{let[s,...r]=e,n=this.get(s,!0);if(i.isCollection(n))n.addIn(r,t);else if(void 0===n&&this.schema)this.set(s,o(this.schema,r,t));else throw Error(`Expected YAML collection at ${s}. Remaining path: ${r}`)}}deleteIn(e){let[t,...s]=e;if(0===s.length)return this.delete(t);let r=this.get(t,!0);if(i.isCollection(r))return r.deleteIn(s);throw Error(`Expected YAML collection at ${t}. Remaining path: ${s}`)}getIn(e,t){let[s,...r]=e,n=this.get(s,!0);return 0===r.length?!t&&i.isScalar(n)?n.value:n:i.isCollection(n)?n.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!i.isPair(t))return!1;let s=t.value;return null==s||e&&i.isScalar(s)&&null==s.value&&!s.commentBefore&&!s.comment&&!s.tag})}hasIn(e){let[t,...s]=e;if(0===s.length)return this.has(t);let r=this.get(t,!0);return!!i.isCollection(r)&&r.hasIn(s)}setIn(e,t){let[s,...r]=e;if(0===r.length)this.set(s,t);else{let e=this.get(s,!0);if(i.isCollection(e))e.setIn(r,t);else if(void 0===e&&this.schema)this.set(s,o(this.schema,r,t));else throw Error(`Expected YAML collection at ${s}. Remaining path: ${r}`)}}}s.Collection=l,s.collectionFromPath=o,s.isEmptyPath=a},36803,(e,t,s)=>{"use strict";function r(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}s.indentComment=r,s.lineComment=(e,t,s)=>e.endsWith("\n")?r(s,t):s.includes("\n")?"\n"+r(s,t):(e.endsWith(" ")?"":" ")+s,s.stringifyComment=e=>e.replace(/^(?!$)(?: $)?/gm,"#")},36502,(e,t,s)=>{"use strict";let r="block",i="quoted";function n(e,t,s){let r=t,i=t+1,n=e[i];for(;" "===n||" "===n;)if(t<i+s)n=e[++t];else{do n=e[++t];while(n&&"\n"!==n)r=t,n=e[i=t+1]}return r}s.FOLD_BLOCK=r,s.FOLD_FLOW="flow",s.FOLD_QUOTED=i,s.foldFlowLines=function(e,t,s="flow",{indentAtStart:o,lineWidth:a=80,minContentWidth:l=20,onFold:c,onOverflow:u}={}){let f,h,d;if(!a||a<0)return e;a<l&&(l=0);let p=Math.max(1+l,1+a-t.length);if(e.length<=p)return e;let m=[],g={},y=a-t.length;"number"==typeof o&&(o>a-Math.max(2,l)?m.push(0):y=a-o);let b=!1,S=-1,k=-1,v=-1;for(s===r&&-1!==(S=n(e,S,t.length))&&(y=S+p);d=e[S+=1];){if(s===i&&"\\"===d){switch(k=S,e[S+1]){case"x":S+=3;break;case"u":S+=5;break;case"U":S+=9;break;default:S+=1}v=S}if("\n"===d)s===r&&(S=n(e,S,t.length)),y=S+t.length+p,f=void 0;else{if(" "===d&&h&&" "!==h&&"\n"!==h&&" "!==h){let t=e[S+1];t&&" "!==t&&"\n"!==t&&" "!==t&&(f=S)}if(S>=y)if(f)m.push(f),y=f+p,f=void 0;else if(s===i){for(;" "===h||" "===h;)h=d,d=e[S+=1],b=!0;let t=S>v+1?S-2:k-1;if(g[t])return e;m.push(t),g[t]=!0,y=t+p,f=void 0}else b=!0}h=d}if(b&&u&&u(),0===m.length)return e;c&&c();let w=e.slice(0,m[0]);for(let r=0;r<m.length;++r){let n=m[r],o=m[r+1]||e.length;0===n?w=`
|
|
2
|
+
${t}${e.slice(0,o)}`:(s===i&&g[n]&&(w+=`${e[n]}\\`),w+=`
|
|
3
|
+
${t}${e.slice(n+1,o)}`)}return w}},23157,(e,t,s)=>{"use strict";let r;var i=e.r(45942),n=e.r(36502);let o=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth});function a(e,t){let s=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return s;let{implicitKey:r}=t,i=t.options.doubleQuotedMinMultiLineLength,a=t.indent||(/^(%|---|\.\.\.)/m.test(e)?" ":""),l="",c=0;for(let e=0,t=s[e];t;t=s[++e])if(" "===t&&"\\"===s[e+1]&&"n"===s[e+2]&&(l+=s.slice(c,e)+"\\ ",e+=1,c=e,t="\\"),"\\"===t)switch(s[e+1]){case"u":{l+=s.slice(c,e);let t=s.substr(e+2,4);switch(t){case"0000":l+="\\0";break;case"0007":l+="\\a";break;case"000b":l+="\\v";break;case"001b":l+="\\e";break;case"0085":l+="\\N";break;case"00a0":l+="\\_";break;case"2028":l+="\\L";break;case"2029":l+="\\P";break;default:"00"===t.substr(0,2)?l+="\\x"+t.substr(2):l+=s.substr(e,6)}e+=5,c=e+1}break;case"n":if(r||'"'===s[e+2]||s.length<i)e+=1;else{for(l+=s.slice(c,e)+"\n\n";"\\"===s[e+2]&&"n"===s[e+3]&&'"'!==s[e+4];)l+="\n",e+=2;l+=a," "===s[e+2]&&(l+="\\"),e+=1,c=e+1}break;default:e+=1}return l=c?l+s.slice(c):s,r?l:n.foldFlowLines(l,a,n.FOLD_QUOTED,o(t,!1))}function l(e,t){if(!1===t.options.singleQuote||t.implicitKey&&e.includes("\n")||/[ \t]\n|\n[ \t]/.test(e))return a(e,t);let s=t.indent||(/^(%|---|\.\.\.)/m.test(e)?" ":""),r="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
4
|
+
${s}`)+"'";return t.implicitKey?r:n.foldFlowLines(r,s,n.FOLD_FLOW,o(t,!1))}function c(e,t){let s,{singleQuote:r}=t.options;if(!1===r)s=a;else{let t=e.includes('"'),i=e.includes("'");s=t&&!i?l:i&&!t?a:r?l:a}return s(e,t)}try{r=RegExp("(^|(?<!\n))\n+(?!\n|$)","g")}catch{r=/\n+(?!\n|$)/g}function u({comment:e,type:t,value:s},a,l,f){let h,d,p,m,{blockQuote:g,commentString:y,lineWidth:b}=a.options;if(!g||/\n[\t ]+$/.test(s))return c(s,a);let S=a.indent||(a.forceBlockIndent||(m=s,/^(%|---|\.\.\.)/m.test(m))?" ":""),k="literal"===g||"folded"!==g&&t!==i.Scalar.BLOCK_FOLDED&&(t===i.Scalar.BLOCK_LITERAL||!function(e,t,s){if(!t||t<0)return!1;let r=t-s,i=e.length;if(i<=r)return!1;for(let t=0,s=0;t<i;++t)if("\n"===e[t]){if(t-s>r)return!0;if(i-(s=t+1)<=r)return!1}return!0}(s,b,S.length));if(!s)return k?"|\n":">\n";for(d=s.length;d>0;--d){let e=s[d-1];if("\n"!==e&&" "!==e&&" "!==e)break}let v=s.substring(d),w=v.indexOf("\n");-1===w?h="-":s===v||w!==v.length-1?(h="+",f&&f()):h="",v&&(s=s.slice(0,-v.length),"\n"===v[v.length-1]&&(v=v.slice(0,-1)),v=v.replace(r,`$&${S}`));let E=!1,O=-1;for(p=0;p<s.length;++p){let e=s[p];if(" "===e)E=!0;else if("\n"===e)O=p;else break}let N=s.substring(0,O<p?O+1:p);N&&(s=s.substring(N.length),N=N.replace(/\n+/g,`$&${S}`));let A=S?"2":"1",T=(E?A:"")+h;if(e&&(T+=" "+y(e.replace(/ ?[\r\n]+/g," ")),l&&l()),!k){let e=s.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${S}`),r=!1,l=o(a,!0);"folded"!==g&&t!==i.Scalar.BLOCK_FOLDED&&(l.onOverflow=()=>{r=!0});let c=n.foldFlowLines(`${N}${e}${v}`,S,n.FOLD_BLOCK,l);if(!r)return`>${T}
|
|
5
|
+
${S}${c}`}return s=s.replace(/\n+/g,`$&${S}`),`|${T}
|
|
6
|
+
${S}${N}${s}${v}`}s.stringifyString=function(e,t,s,r){let{implicitKey:f,inFlow:h}=t,d="string"==typeof e.value?e:Object.assign({},e,{value:String(e.value)}),{type:p}=e;p!==i.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(d.value)&&(p=i.Scalar.QUOTE_DOUBLE);let m=e=>{switch(e){case i.Scalar.BLOCK_FOLDED:case i.Scalar.BLOCK_LITERAL:return f||h?c(d.value,t):u(d,t,s,r);case i.Scalar.QUOTE_DOUBLE:return a(d.value,t);case i.Scalar.QUOTE_SINGLE:return l(d.value,t);case i.Scalar.PLAIN:return function(e,t,s,r){let{type:a,value:l}=e,{actualString:f,implicitKey:h,indent:d,indentStep:p,inFlow:m}=t;if(h&&l.includes("\n")||m&&/[[\]{},]/.test(l))return c(l,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(l))return h||m||!l.includes("\n")?c(l,t):u(e,t,s,r);if(!h&&!m&&a!==i.Scalar.PLAIN&&l.includes("\n"))return u(e,t,s,r);if(/^(%|---|\.\.\.)/m.test(l)){if(""===d)return t.forceBlockIndent=!0,u(e,t,s,r);else if(h&&d===p)return c(l,t)}let g=l.replace(/\n+/g,`$&
|
|
7
|
+
${d}`);if(f){let e=e=>e.default&&"tag:yaml.org,2002:str"!==e.tag&&e.test?.test(g),{compat:s,tags:r}=t.doc.schema;if(r.some(e)||s?.some(e))return c(l,t)}return h?g:n.foldFlowLines(g,d,n.FOLD_FLOW,o(t,!1))}(d,t,s,r);default:return null}},g=m(p);if(null===g){let{defaultKeyType:e,defaultStringType:s}=t.options,r=f&&e||s;if(null===(g=m(r)))throw Error(`Unsupported default string type ${r}`)}return g}},84100,(e,t,s)=>{"use strict";var r=e.r(97943),i=e.r(62004),n=e.r(36803),o=e.r(23157);s.createStringifyContext=function(e,t){let s,r=Object.assign({blockQuote:!0,commentString:n.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);switch(r.collectionStyle){case"block":s=!1;break;case"flow":s=!0;break;default:s=null}return{anchors:new Set,doc:e,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:"number"==typeof r.indent?" ".repeat(r.indent):" ",inFlow:s,options:r}},s.stringify=function(e,t,s,n){let a;if(i.isPair(e))return e.toString(t,s,n);if(i.isAlias(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let l=i.isNode(e)?e:t.doc.createNode(e,{onTagObj:e=>a=e});a??(a=function(e,t){let s,r;if(t.tag){let s=e.filter(e=>e.tag===t.tag);if(s.length>0)return s.find(e=>e.format===t.format)??s[0]}if(i.isScalar(t)){s=t.value;let i=e.filter(e=>e.identify?.(s));if(i.length>1){let e=i.filter(e=>e.test);e.length>0&&(i=e)}r=i.find(e=>e.format===t.format)??i.find(e=>!e.format)}else s=t,r=e.find(e=>e.nodeClass&&s instanceof e.nodeClass);if(!r){let e=s?.constructor?.name??(null===s?"null":typeof s);throw Error(`Tag not resolved for ${e} value`)}return r}(t.doc.schema.tags,l));let c=function(e,t,{anchors:s,doc:n}){if(!n.directives)return"";let o=[],a=(i.isScalar(e)||i.isCollection(e))&&e.anchor;a&&r.anchorIsValid(a)&&(s.add(a),o.push(`&${a}`));let l=e.tag??(t.default?null:t.tag);return l&&o.push(n.directives.tagString(l)),o.join(" ")}(l,a,t);c.length>0&&(t.indentAtStart=(t.indentAtStart??0)+c.length+1);let u="function"==typeof a.stringify?a.stringify(l,t,s,n):i.isScalar(l)?o.stringifyString(l,t,s,n):l.toString(t,s,n);return c?i.isScalar(l)||"{"===u[0]||"["===u[0]?`${c} ${u}`:`${c}
|
|
8
|
+
${t.indent}${u}`:u}},79879,(e,t,s)=>{"use strict";var r=e.r(62004),i=e.r(45942),n=e.r(84100),o=e.r(36803);s.stringifyPair=function({key:e,value:t},s,a,l){let c,u,f,{allNullValues:h,doc:d,indent:p,indentStep:m,options:{commentString:g,indentSeq:y,simpleKeys:b}}=s,S=r.isNode(e)&&e.comment||null;if(b){if(S)throw Error("With simple keys, key nodes cannot have comments");if(r.isCollection(e)||!r.isNode(e)&&"object"==typeof e)throw Error("With simple keys, collection cannot be used as a key value")}let k=!b&&(!e||S&&null==t&&!s.inFlow||r.isCollection(e)||(r.isScalar(e)?e.type===i.Scalar.BLOCK_FOLDED||e.type===i.Scalar.BLOCK_LITERAL:"object"==typeof e));s=Object.assign({},s,{allNullValues:!1,implicitKey:!k&&(b||!h),indent:p+m});let v=!1,w=!1,E=n.stringify(e,s,()=>v=!0,()=>w=!0);if(!k&&!s.inFlow&&E.length>1024){if(b)throw Error("With simple keys, single line scalar must not span more than 1024 characters");k=!0}if(s.inFlow){if(h||null==t)return v&&a&&a(),""===E?"?":k?`? ${E}`:E}else if(h&&!b||null==t&&k)return E=`? ${E}`,S&&!v?E+=o.lineComment(E,s.indent,g(S)):w&&l&&l(),E;v&&(S=null),k?(S&&(E+=o.lineComment(E,s.indent,g(S))),E=`? ${E}
|
|
9
|
+
${p}:`):(E=`${E}:`,S&&(E+=o.lineComment(E,s.indent,g(S)))),r.isNode(t)?(c=!!t.spaceBefore,u=t.commentBefore,f=t.comment):(c=!1,u=null,f=null,t&&"object"==typeof t&&(t=d.createNode(t))),s.implicitKey=!1,!k&&!S&&r.isScalar(t)&&(s.indentAtStart=E.length+1),w=!1,!(!y&&m.length>=2&&!s.inFlow&&!k&&r.isSeq(t))||t.flow||t.tag||t.anchor||(s.indent=s.indent.substring(2));let O=!1,N=n.stringify(t,s,()=>O=!0,()=>w=!0),A=" ";if(S||c||u){if(A=c?"\n":"",u){let e=g(u);A+=`
|
|
10
|
+
${o.indentComment(e,s.indent)}`}""!==N||s.inFlow?A+=`
|
|
11
|
+
${s.indent}`:"\n"===A&&f&&(A="\n\n")}else if(!k&&r.isCollection(t)){let e=N[0],r=N.indexOf("\n"),i=-1!==r,n=s.inFlow??t.flow??0===t.items.length;if(i||!n){let t=!1;if(i&&("&"===e||"!"===e)){let s=N.indexOf(" ");"&"===e&&-1!==s&&s<r&&"!"===N[s+1]&&(s=N.indexOf(" ",s+1)),(-1===s||r<s)&&(t=!0)}t||(A=`
|
|
12
|
+
${s.indent}`)}}else(""===N||"\n"===N[0])&&(A="");return E+=A+N,s.inFlow?O&&a&&a():f&&!O?E+=o.lineComment(E,s.indent,g(f)):w&&l&&l(),E}},87449,(e,t,s)=>{"use strict";var r=e.r(5365);s.debug=function(e,...t){"debug"===e&&console.log(...t)},s.warn=function(e,t){("debug"===e||"warn"===e)&&("function"==typeof r.emitWarning?r.emitWarning(t):console.warn(t))}},9382,(e,t,s)=>{"use strict";var r=e.r(62004),i=e.r(45942);let n={identify:e=>"<<"===e||"symbol"==typeof e&&"<<"===e.description,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new i.Scalar(Symbol("<<")),{addToJSMap:o}),stringify:()=>"<<"};function o(e,t,s){let i=l(e,s);if(r.isSeq(i))for(let s of i.items)a(e,t,s);else if(Array.isArray(i))for(let s of i)a(e,t,s);else a(e,t,i)}function a(e,t,s){let i=l(e,s);if(!r.isMap(i))throw Error("Merge sources must be maps or map aliases");for(let[s,r]of i.toJSON(null,e,Map))t instanceof Map?t.has(s)||t.set(s,r):t instanceof Set?t.add(s):Object.prototype.hasOwnProperty.call(t,s)||Object.defineProperty(t,s,{value:r,writable:!0,enumerable:!0,configurable:!0});return t}function l(e,t){return e&&r.isAlias(t)?t.resolve(e.doc,e):t}s.addMergeToJSMap=o,s.isMergeKey=(e,t)=>(n.identify(t)||r.isScalar(t)&&(!t.type||t.type===i.Scalar.PLAIN)&&n.identify(t.value))&&e?.doc.schema.tags.some(e=>e.tag===n.tag&&e.default),s.merge=n},57837,(e,t,s)=>{"use strict";var r=e.r(87449),i=e.r(9382),n=e.r(84100),o=e.r(62004),a=e.r(84922);s.addPairToJSMap=function(e,t,{key:s,value:l}){if(o.isNode(s)&&s.addToJSMap)s.addToJSMap(e,t,l);else if(i.isMergeKey(e,s))i.addMergeToJSMap(e,t,l);else{let i=a.toJS(s,"",e);if(t instanceof Map)t.set(i,a.toJS(l,i,e));else if(t instanceof Set)t.add(i);else{let c=function(e,t,s){if(null===t)return"";if("object"!=typeof t)return String(t);if(o.isNode(e)&&s?.doc){let t=n.createStringifyContext(s.doc,{});for(let e of(t.anchors=new Set,s.anchors.keys()))t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;let i=e.toString(t);if(!s.mapKeyWarned){let e=JSON.stringify(i);e.length>40&&(e=e.substring(0,36)+'..."'),r.warn(s.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`),s.mapKeyWarned=!0}return i}return JSON.stringify(t)}(s,i,e),u=a.toJS(l,c,e);c in t?Object.defineProperty(t,c,{value:u,writable:!0,enumerable:!0,configurable:!0}):t[c]=u}}return t}},34165,(e,t,s)=>{"use strict";var r=e.r(12270),i=e.r(79879),n=e.r(57837),o=e.r(62004);class a{constructor(e,t=null){Object.defineProperty(this,o.NODE_TYPE,{value:o.PAIR}),this.key=e,this.value=t}clone(e){let{key:t,value:s}=this;return o.isNode(t)&&(t=t.clone(e)),o.isNode(s)&&(s=s.clone(e)),new a(t,s)}toJSON(e,t){let s=t?.mapAsMap?new Map:{};return n.addPairToJSMap(t,s,this)}toString(e,t,s){return e?.doc?i.stringifyPair(this,e,t,s):JSON.stringify(this)}}s.Pair=a,s.createPair=function(e,t,s){return new a(r.createNode(e,void 0,s),r.createNode(t,void 0,s))}},83614,(e,t,s)=>{"use strict";var r=e.r(62004),i=e.r(84100),n=e.r(36803);function o({indent:e,options:{commentString:t}},s,r,i){if(r&&i&&(r=r.replace(/^\n+/,"")),r){let i=n.indentComment(t(r),e);s.push(i.trimStart())}}s.stringifyCollection=function(e,t,s){return(t.inFlow??e.flow?function({items:e},t,{flowChars:s,itemIndent:a}){let{indent:l,indentStep:c,flowCollectionPadding:u,options:{commentString:f}}=t,h=Object.assign({},t,{indent:a+=c,inFlow:!0,type:null}),d=!1,p=0,m=[];for(let s=0;s<e.length;++s){let l=e[s],c=null;if(r.isNode(l))l.spaceBefore&&m.push(""),o(t,m,l.commentBefore,!1),l.comment&&(c=l.comment);else if(r.isPair(l)){let e=r.isNode(l.key)?l.key:null;e&&(e.spaceBefore&&m.push(""),o(t,m,e.commentBefore,!1),e.comment&&(d=!0));let s=r.isNode(l.value)?l.value:null;s?(s.comment&&(c=s.comment),s.commentBefore&&(d=!0)):null==l.value&&e?.comment&&(c=e.comment)}c&&(d=!0);let u=i.stringify(l,h,()=>c=null);d||(d=m.length>p||u.includes("\n")),s<e.length-1?u+=",":t.options.trailingComma&&(t.options.lineWidth>0&&(d||(d=m.reduce((e,t)=>e+t.length+2,2)+(u.length+2)>t.options.lineWidth)),d&&(u+=",")),c&&(u+=n.lineComment(u,a,f(c))),m.push(u),p=m.length}let{start:g,end:y}=s;if(0===m.length)return g+y;if(!d){let e=m.reduce((e,t)=>e+t.length+2,2);d=t.options.lineWidth>0&&e>t.options.lineWidth}if(!d)return`${g}${u}${m.join(" ")}${u}${y}`;{let e=g;for(let t of m)e+=t?`
|
|
13
|
+
${c}${l}${t}`:"\n";return`${e}
|
|
14
|
+
${l}${y}`}}:function({comment:e,items:t},s,{blockItemPrefix:a,flowChars:l,itemIndent:c,onChompKeep:u,onComment:f}){let h,{indent:d,options:{commentString:p}}=s,m=Object.assign({},s,{indent:c,type:null}),g=!1,y=[];for(let e=0;e<t.length;++e){let l=t[e],u=null;if(r.isNode(l))!g&&l.spaceBefore&&y.push(""),o(s,y,l.commentBefore,g),l.comment&&(u=l.comment);else if(r.isPair(l)){let e=r.isNode(l.key)?l.key:null;e&&(!g&&e.spaceBefore&&y.push(""),o(s,y,e.commentBefore,g))}g=!1;let f=i.stringify(l,m,()=>u=null,()=>g=!0);u&&(f+=n.lineComment(f,c,p(u))),g&&u&&(g=!1),y.push(a+f)}if(0===y.length)h=l.start+l.end;else{h=y[0];for(let e=1;e<y.length;++e){let t=y[e];h+=t?`
|
|
15
|
+
${d}${t}`:"\n"}}return e?(h+="\n"+n.indentComment(p(e),d),f&&f()):g&&u&&u(),h})(e,t,s)}},75212,(e,t,s)=>{"use strict";var r=e.r(83614),i=e.r(57837),n=e.r(60044),o=e.r(62004),a=e.r(34165),l=e.r(45942);function c(e,t){let s=o.isScalar(t)?t.value:t;for(let r of e)if(o.isPair(r)&&(r.key===t||r.key===s||o.isScalar(r.key)&&r.key.value===s))return r}class u extends n.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(o.MAP,e),this.items=[]}static from(e,t,s){let{keepUndefined:r,replacer:i}=s,n=new this(e),o=(e,o)=>{if("function"==typeof i)o=i.call(t,e,o);else if(Array.isArray(i)&&!i.includes(e))return;(void 0!==o||r)&&n.items.push(a.createPair(e,o,s))};if(t instanceof Map)for(let[e,s]of t)o(e,s);else if(t&&"object"==typeof t)for(let e of Object.keys(t))o(e,t[e]);return"function"==typeof e.sortMapEntries&&n.items.sort(e.sortMapEntries),n}add(e,t){let s;s=o.isPair(e)?e:e&&"object"==typeof e&&"key"in e?new a.Pair(e.key,e.value):new a.Pair(e,e?.value);let r=c(this.items,s.key),i=this.schema?.sortMapEntries;if(r){if(!t)throw Error(`Key ${s.key} already set`);o.isScalar(r.value)&&l.isScalarValue(s.value)?r.value.value=s.value:r.value=s.value}else if(i){let e=this.items.findIndex(e=>0>i(s,e));-1===e?this.items.push(s):this.items.splice(e,0,s)}else this.items.push(s)}delete(e){let t=c(this.items,e);return!!t&&this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){let s=c(this.items,e),r=s?.value;return(!t&&o.isScalar(r)?r.value:r)??void 0}has(e){return!!c(this.items,e)}set(e,t){this.add(new a.Pair(e,t),!0)}toJSON(e,t,s){let r=s?new s:t?.mapAsMap?new Map:{};for(let e of(t?.onCreate&&t.onCreate(r),this.items))i.addPairToJSMap(t,r,e);return r}toString(e,t,s){if(!e)return JSON.stringify(this);for(let e of this.items)if(!o.isPair(e))throw Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),r.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:s,onComment:t})}}s.YAMLMap=u,s.findPair=c},60752,(e,t,s)=>{"use strict";var r=e.r(62004),i=e.r(75212);s.map={collection:"map",default:!0,nodeClass:i.YAMLMap,tag:"tag:yaml.org,2002:map",resolve:(e,t)=>(r.isMap(e)||t("Expected a mapping for this tag"),e),createNode:(e,t,s)=>i.YAMLMap.from(e,t,s)}},98600,(e,t,s)=>{"use strict";var r=e.r(12270),i=e.r(83614),n=e.r(60044),o=e.r(62004),a=e.r(45942),l=e.r(84922);class c extends n.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(o.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=u(e);return"number"==typeof t&&this.items.splice(t,1).length>0}get(e,t){let s=u(e);if("number"!=typeof s)return;let r=this.items[s];return!t&&o.isScalar(r)?r.value:r}has(e){let t=u(e);return"number"==typeof t&&t<this.items.length}set(e,t){let s=u(e);if("number"!=typeof s)throw Error(`Expected a valid index, not ${e}.`);let r=this.items[s];o.isScalar(r)&&a.isScalarValue(t)?r.value=t:this.items[s]=t}toJSON(e,t){let s=[];t?.onCreate&&t.onCreate(s);let r=0;for(let e of this.items)s.push(l.toJS(e,String(r++),t));return s}toString(e,t,s){return e?i.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:s,onComment:t}):JSON.stringify(this)}static from(e,t,s){let{replacer:i}=s,n=new this(e);if(t&&Symbol.iterator in Object(t)){let e=0;for(let o of t){if("function"==typeof i){let s=t instanceof Set?o:String(e++);o=i.call(t,s,o)}n.items.push(r.createNode(o,void 0,s))}}return n}}function u(e){let t=o.isScalar(e)?e.value:e;return t&&"string"==typeof t&&(t=Number(t)),"number"==typeof t&&Number.isInteger(t)&&t>=0?t:null}s.YAMLSeq=c},85726,(e,t,s)=>{"use strict";var r=e.r(62004),i=e.r(98600);s.seq={collection:"seq",default:!0,nodeClass:i.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve:(e,t)=>(r.isSeq(e)||t("Expected a sequence for this tag"),e),createNode:(e,t,s)=>i.YAMLSeq.from(e,t,s)}},92951,(e,t,s)=>{"use strict";var r=e.r(23157);s.string={identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:(e,t,s,i)=>(t=Object.assign({actualString:!0},t),r.stringifyString(e,t,s,i))}},98469,(e,t,s)=>{"use strict";var r=e.r(45942);let i={identify:e=>null==e,createNode:()=>new r.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new r.Scalar(null),stringify:({source:e},t)=>"string"==typeof e&&i.test.test(e)?e:t.options.nullStr};s.nullTag=i},51216,(e,t,s)=>{"use strict";var r=e.r(45942);let i={identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new r.Scalar("t"===e[0]||"T"===e[0]),stringify:({source:e,value:t},s)=>e&&i.test.test(e)&&t===("t"===e[0]||"T"===e[0])?e:t?s.options.trueStr:s.options.falseStr};s.boolTag=i},86228,(e,t,s)=>{"use strict";s.stringifyNumber=function({format:e,minFractionDigits:t,tag:s,value:r}){if("bigint"==typeof r)return String(r);let i="number"==typeof r?r:Number(r);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let n=Object.is(r,-0)?"-0":JSON.stringify(r);if(!e&&t&&(!s||"tag:yaml.org,2002:float"===s)&&/^-?\d/.test(n)&&!n.includes("e")){let e=n.indexOf(".");e<0&&(e=n.length,n+=".");let s=t-(n.length-e-1);for(;s-- >0;)n+="0"}return n}},80790,(e,t,s)=>{"use strict";var r=e.r(45942),i=e.r(86228);let n={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?-1/0:1/0,stringify:i.stringifyNumber};s.float={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){let t=new r.Scalar(parseFloat(e)),s=e.indexOf(".");return -1!==s&&"0"===e[e.length-1]&&(t.minFractionDigits=e.length-s-1),t},stringify:i.stringifyNumber},s.floatExp={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():i.stringifyNumber(e)}},s.floatNaN=n},93469,(e,t,s)=>{"use strict";var r=e.r(86228);let i=e=>"bigint"==typeof e||Number.isInteger(e),n=(e,t,s,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),s);function o(e,t,s){let{value:n}=e;return i(n)&&n>=0?s+n.toString(t):r.stringifyNumber(e)}s.int={identify:i,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,s)=>n(e,0,10,s),stringify:r.stringifyNumber},s.intHex={identify:e=>i(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,s)=>n(e,2,16,s),stringify:e=>o(e,16,"0x")},s.intOct={identify:e=>i(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,s)=>n(e,2,8,s),stringify:e=>o(e,8,"0o")}},8820,(e,t,s)=>{"use strict";var r=e.r(60752),i=e.r(98469),n=e.r(85726),o=e.r(92951),a=e.r(51216),l=e.r(80790),c=e.r(93469);s.schema=[r.map,n.seq,o.string,i.nullTag,a.boolTag,c.intOct,c.int,c.intHex,l.floatNaN,l.floatExp,l.float]},17052,(e,t,s)=>{"use strict";var r=e.r(45942),i=e.r(60752),n=e.r(85726);function o(e){return"bigint"==typeof e||Number.isInteger(e)}let a=({value:e})=>JSON.stringify(e),l=[{identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:a},{identify:e=>null==e,createNode:()=>new r.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:a},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>"true"===e,stringify:a},{identify:o,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:s})=>s?BigInt(e):parseInt(e,10),stringify:({value:e})=>o(e)?e.toString():JSON.stringify(e)},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:a}];s.schema=[i.map,n.seq].concat(l,{default:!0,tag:"",test:/^/,resolve:(e,t)=>(t(`Unresolved plain scalar ${JSON.stringify(e)}`),e)})},16125,(e,t,s)=>{"use strict";var r=e.r(874),i=e.r(45942),n=e.r(23157);s.binary={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if("function"==typeof r.Buffer)return r.Buffer.from(e,"base64");if("function"!=typeof atob)return t("This environment does not support reading binary tags; either Buffer or atob is required"),e;{let t=atob(e.replace(/[\n\r]/g,"")),s=new Uint8Array(t.length);for(let e=0;e<t.length;++e)s[e]=t.charCodeAt(e);return s}},stringify({comment:e,type:t,value:s},o,a,l){let c;if(!s)return"";if("function"==typeof r.Buffer)c=s instanceof r.Buffer?s.toString("base64"):r.Buffer.from(s.buffer).toString("base64");else if("function"==typeof btoa){let e="";for(let t=0;t<s.length;++t)e+=String.fromCharCode(s[t]);c=btoa(e)}else throw Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(t??(t=i.Scalar.BLOCK_LITERAL),t!==i.Scalar.QUOTE_DOUBLE){let e=Math.max(o.options.lineWidth-o.indent.length,o.options.minContentWidth),s=Math.ceil(c.length/e),r=Array(s);for(let t=0,i=0;t<s;++t,i+=e)r[t]=c.substr(i,e);c=r.join(t===i.Scalar.BLOCK_LITERAL?"\n":" ")}return n.stringifyString({comment:e,type:t,value:c},o,a,l)}}},23784,(e,t,s)=>{"use strict";var r=e.r(62004),i=e.r(34165),n=e.r(45942),o=e.r(98600);function a(e,t){if(r.isSeq(e))for(let s=0;s<e.items.length;++s){let o=e.items[s];if(!r.isPair(o)){if(r.isMap(o)){o.items.length>1&&t("Each pair must have its own sequence indicator");let e=o.items[0]||new i.Pair(new n.Scalar(null));if(o.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${o.commentBefore}
|
|
16
|
+
${e.key.commentBefore}`:o.commentBefore),o.comment){let t=e.value??e.key;t.comment=t.comment?`${o.comment}
|
|
17
|
+
${t.comment}`:o.comment}o=e}e.items[s]=r.isPair(o)?o:new i.Pair(o)}}else t("Expected a sequence for this tag");return e}function l(e,t,s){let{replacer:r}=s,n=new o.YAMLSeq(e);n.tag="tag:yaml.org,2002:pairs";let a=0;if(t&&Symbol.iterator in Object(t))for(let e of t){let o,l;if("function"==typeof r&&(e=r.call(t,String(a++),e)),Array.isArray(e))if(2===e.length)o=e[0],l=e[1];else throw TypeError(`Expected [key, value] tuple: ${e}`);else if(e&&e instanceof Object){let t=Object.keys(e);if(1===t.length)l=e[o=t[0]];else throw TypeError(`Expected tuple with one key, not ${t.length} keys`)}else o=e;n.items.push(i.createPair(o,l,s))}return n}s.createPairs=l,s.pairs={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:a,createNode:l},s.resolvePairs=a},25428,(e,t,s)=>{"use strict";var r=e.r(62004),i=e.r(84922),n=e.r(75212),o=e.r(98600),a=e.r(23784);class l extends o.YAMLSeq{constructor(){super(),this.add=n.YAMLMap.prototype.add.bind(this),this.delete=n.YAMLMap.prototype.delete.bind(this),this.get=n.YAMLMap.prototype.get.bind(this),this.has=n.YAMLMap.prototype.has.bind(this),this.set=n.YAMLMap.prototype.set.bind(this),this.tag=l.tag}toJSON(e,t){if(!t)return super.toJSON(e);let s=new Map;for(let e of(t?.onCreate&&t.onCreate(s),this.items)){let n,o;if(r.isPair(e)?(n=i.toJS(e.key,"",t),o=i.toJS(e.value,n,t)):n=i.toJS(e,"",t),s.has(n))throw Error("Ordered maps must not include duplicate keys");s.set(n,o)}return s}static from(e,t,s){let r=a.createPairs(e,t,s),i=new this;return i.items=r.items,i}}l.tag="tag:yaml.org,2002:omap",s.YAMLOMap=l,s.omap={collection:"seq",identify:e=>e instanceof Map,nodeClass:l,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){let s=a.resolvePairs(e,t),i=[];for(let{key:e}of s.items)r.isScalar(e)&&(i.includes(e.value)?t(`Ordered maps must not include duplicate keys: ${e.value}`):i.push(e.value));return Object.assign(new l,s)},createNode:(e,t,s)=>l.from(e,t,s)}},10922,(e,t,s)=>{"use strict";var r=e.r(45942);function i({value:e,source:t},s){let r=e?n:o;return t&&r.test.test(t)?t:e?s.options.trueStr:s.options.falseStr}let n={identify:e=>!0===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new r.Scalar(!0),stringify:i},o={identify:e=>!1===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new r.Scalar(!1),stringify:i};s.falseTag=o,s.trueTag=n},98260,(e,t,s)=>{"use strict";var r=e.r(45942),i=e.r(86228);let n={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?-1/0:1/0,stringify:i.stringifyNumber};s.float={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){let t=new r.Scalar(parseFloat(e.replace(/_/g,""))),s=e.indexOf(".");if(-1!==s){let r=e.substring(s+1).replace(/_/g,"");"0"===r[r.length-1]&&(t.minFractionDigits=r.length)}return t},stringify:i.stringifyNumber},s.floatExp={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():i.stringifyNumber(e)}},s.floatNaN=n},4484,(e,t,s)=>{"use strict";var r=e.r(86228);let i=e=>"bigint"==typeof e||Number.isInteger(e);function n(e,t,s,{intAsBigInt:r}){let i=e[0];if(("-"===i||"+"===i)&&(t+=1),e=e.substring(t).replace(/_/g,""),r){switch(s){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}let t=BigInt(e);return"-"===i?BigInt(-1)*t:t}let o=parseInt(e,s);return"-"===i?-1*o:o}function o(e,t,s){let{value:n}=e;if(i(n)){let e=n.toString(t);return n<0?"-"+s+e.substr(1):s+e}return r.stringifyNumber(e)}s.int={identify:i,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,s)=>n(e,0,10,s),stringify:r.stringifyNumber},s.intBin={identify:i,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,s)=>n(e,2,2,s),stringify:e=>o(e,2,"0b")},s.intHex={identify:i,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,s)=>n(e,2,16,s),stringify:e=>o(e,16,"0x")},s.intOct={identify:i,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,s)=>n(e,1,8,s),stringify:e=>o(e,8,"0")}},57909,(e,t,s)=>{"use strict";var r=e.r(62004),i=e.r(34165),n=e.r(75212);class o extends n.YAMLMap{constructor(e){super(e),this.tag=o.tag}add(e){let t;t=r.isPair(e)?e:e&&"object"==typeof e&&"key"in e&&"value"in e&&null===e.value?new i.Pair(e.key,null):new i.Pair(e,null),n.findPair(this.items,t.key)||this.items.push(t)}get(e,t){let s=n.findPair(this.items,e);return!t&&r.isPair(s)?r.isScalar(s.key)?s.key.value:s.key:s}set(e,t){if("boolean"!=typeof t)throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let s=n.findPair(this.items,e);s&&!t?this.items.splice(this.items.indexOf(s),1):!s&&t&&this.items.push(new i.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,s){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,s);throw Error("Set items must all have null values")}static from(e,t,s){let{replacer:r}=s,n=new this(e);if(t&&Symbol.iterator in Object(t))for(let e of t)"function"==typeof r&&(e=r.call(t,e,e)),n.items.push(i.createPair(e,null,s));return n}}o.tag="tag:yaml.org,2002:set",s.YAMLSet=o,s.set={collection:"map",identify:e=>e instanceof Set,nodeClass:o,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,s)=>o.from(e,t,s),resolve(e,t){if(r.isMap(e))if(e.hasAllNullValues(!0))return Object.assign(new o,e);else t("Set items must all have null values");else t("Expected a mapping for this tag");return e}}},1243,(e,t,s)=>{"use strict";var r=e.r(86228);function i(e,t){let s=e[0],r="-"===s||"+"===s?e.substring(1):e,i=e=>t?BigInt(e):Number(e),n=r.replace(/_/g,"").split(":").reduce((e,t)=>e*i(60)+i(t),i(0));return"-"===s?i(-1)*n:n}function n(e){let{value:t}=e,s=e=>e;if("bigint"==typeof t)s=e=>BigInt(e);else if(isNaN(t)||!isFinite(t))return r.stringifyNumber(e);let i="";t<0&&(i="-",t*=s(-1));let n=s(60),o=[t%n];return t<60?o.unshift(0):(t=(t-o[0])/n,o.unshift(t%n),t>=60&&(t=(t-o[0])/n,o.unshift(t))),i+o.map(e=>String(e).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}let o={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){let t=e.match(o.test);if(!t)throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,s,r,n,a,l,c]=t.map(Number),u=Date.UTC(s,r-1,n,a||0,l||0,c||0,t[7]?Number((t[7]+"00").substr(1,3)):0),f=t[8];if(f&&"Z"!==f){let e=i(f,!1);30>Math.abs(e)&&(e*=60),u-=6e4*e}return new Date(u)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};s.floatTime={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>i(e,!1),stringify:n},s.intTime={identify:e=>"bigint"==typeof e||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:s})=>i(e,s),stringify:n},s.timestamp=o},61298,(e,t,s)=>{"use strict";var r=e.r(60752),i=e.r(98469),n=e.r(85726),o=e.r(92951),a=e.r(16125),l=e.r(10922),c=e.r(98260),u=e.r(4484),f=e.r(9382),h=e.r(25428),d=e.r(23784),p=e.r(57909),m=e.r(1243);s.schema=[r.map,n.seq,o.string,i.nullTag,l.trueTag,l.falseTag,u.intBin,u.intOct,u.int,u.intHex,c.floatNaN,c.floatExp,c.float,a.binary,f.merge,h.omap,d.pairs,p.set,m.intTime,m.floatTime,m.timestamp]},37052,(e,t,s)=>{"use strict";var r=e.r(60752),i=e.r(98469),n=e.r(85726),o=e.r(92951),a=e.r(51216),l=e.r(80790),c=e.r(93469),u=e.r(8820),f=e.r(17052),h=e.r(16125),d=e.r(9382),p=e.r(25428),m=e.r(23784),g=e.r(61298),y=e.r(57909),b=e.r(1243);let S=new Map([["core",u.schema],["failsafe",[r.map,n.seq,o.string]],["json",f.schema],["yaml11",g.schema],["yaml-1.1",g.schema]]),k={binary:h.binary,bool:a.boolTag,float:l.float,floatExp:l.floatExp,floatNaN:l.floatNaN,floatTime:b.floatTime,int:c.int,intHex:c.intHex,intOct:c.intOct,intTime:b.intTime,map:r.map,merge:d.merge,null:i.nullTag,omap:p.omap,pairs:m.pairs,seq:n.seq,set:y.set,timestamp:b.timestamp};s.coreKnownTags={"tag:yaml.org,2002:binary":h.binary,"tag:yaml.org,2002:merge":d.merge,"tag:yaml.org,2002:omap":p.omap,"tag:yaml.org,2002:pairs":m.pairs,"tag:yaml.org,2002:set":y.set,"tag:yaml.org,2002:timestamp":b.timestamp},s.getTags=function(e,t,s){let r=S.get(t);if(r&&!e)return s&&!r.includes(d.merge)?r.concat(d.merge):r.slice();let i=r;if(!i)if(Array.isArray(e))i=[];else{let e=Array.from(S.keys()).filter(e=>"yaml11"!==e).map(e=>JSON.stringify(e)).join(", ");throw Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}if(Array.isArray(e))for(let t of e)i=i.concat(t);else"function"==typeof e&&(i=e(i.slice()));return s&&(i=i.concat(d.merge)),i.reduce((e,t)=>{let s="string"==typeof t?k[t]:t;if(!s){let e=JSON.stringify(t),s=Object.keys(k).map(e=>JSON.stringify(e)).join(", ");throw Error(`Unknown custom tag ${e}; use one of ${s}`)}return e.includes(s)||e.push(s),e},[])}},94637,(e,t,s)=>{"use strict";var r=e.r(62004),i=e.r(60752),n=e.r(85726),o=e.r(92951),a=e.r(37052);let l=(e,t)=>e.key<t.key?-1:+(e.key>t.key);s.Schema=class e{constructor({compat:e,customTags:t,merge:s,resolveKnownTags:c,schema:u,sortMapEntries:f,toStringDefaults:h}){this.compat=Array.isArray(e)?a.getTags(e,"compat"):e?a.getTags(null,e):null,this.name="string"==typeof u&&u||"core",this.knownTags=c?a.coreKnownTags:{},this.tags=a.getTags(t,this.name,s),this.toStringOptions=h??null,Object.defineProperty(this,r.MAP,{value:i.map}),Object.defineProperty(this,r.SCALAR,{value:o.string}),Object.defineProperty(this,r.SEQ,{value:n.seq}),this.sortMapEntries="function"==typeof f?f:!0===f?l:null}clone(){let t=Object.create(e.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}}},97720,(e,t,s)=>{"use strict";var r=e.r(62004),i=e.r(84100),n=e.r(36803);s.stringifyDocument=function(e,t){let s=[],o=!0===t.directives;if(!1!==t.directives&&e.directives){let t=e.directives.toString(e);t?(s.push(t),o=!0):e.directives.docStart&&(o=!0)}o&&s.push("---");let a=i.createStringifyContext(e,t),{commentString:l}=a.options;if(e.commentBefore){1!==s.length&&s.unshift("");let t=l(e.commentBefore);s.unshift(n.indentComment(t,""))}let c=!1,u=null;if(e.contents){if(r.isNode(e.contents)){if(e.contents.spaceBefore&&o&&s.push(""),e.contents.commentBefore){let t=l(e.contents.commentBefore);s.push(n.indentComment(t,""))}a.forceBlockIndent=!!e.comment,u=e.contents.comment}let t=u?void 0:()=>c=!0,f=i.stringify(e.contents,a,()=>u=null,t);u&&(f+=n.lineComment(f,"",l(u))),("|"===f[0]||">"===f[0])&&"---"===s[s.length-1]?s[s.length-1]=`--- ${f}`:s.push(f)}else s.push(i.stringify(e.contents,a));if(e.directives?.docEnd)if(e.comment){let t=l(e.comment);t.includes("\n")?(s.push("..."),s.push(n.indentComment(t,""))):s.push(`... ${t}`)}else s.push("...");else{let t=e.comment;t&&c&&(t=t.replace(/^\n+/,"")),t&&((!c||u)&&""!==s[s.length-1]&&s.push(""),s.push(n.indentComment(l(t),"")))}return s.join("\n")+"\n"}},94912,(e,t,s)=>{"use strict";var r=e.r(84079),i=e.r(60044),n=e.r(62004),o=e.r(34165),a=e.r(84922),l=e.r(94637),c=e.r(97720),u=e.r(97943),f=e.r(53418),h=e.r(12270),d=e.r(43474);function p(e){if(n.isCollection(e))return!0;throw Error("Expected a YAML collection as document contents")}s.Document=class e{constructor(e,t,s){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,n.NODE_TYPE,{value:n.DOC});let r=null;"function"==typeof t||Array.isArray(t)?r=t:void 0===s&&t&&(s=t,t=void 0);const i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},s);this.options=i;let{version:o}=i;s?._directives?(this.directives=s._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new d.Directives({version:o}),this.setSchema(o,s),this.contents=void 0===e?null:this.createNode(e,r,s)}clone(){let t=Object.create(e.prototype,{[n.NODE_TYPE]:{value:n.DOC}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=n.isNode(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(e){p(this.contents)&&this.contents.add(e)}addIn(e,t){p(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let s=u.anchorNames(this);e.anchor=!t||s.has(t)?u.findNewAnchor(t||"a",s):t}return new r.Alias(e.anchor)}createNode(e,t,s){let r;if("function"==typeof t)e=t.call({"":e},"",e),r=t;else if(Array.isArray(t)){let e=t.filter(e=>"number"==typeof e||e instanceof String||e instanceof Number).map(String);e.length>0&&(t=t.concat(e)),r=t}else void 0===s&&t&&(s=t,t=void 0);let{aliasDuplicateObjects:i,anchorPrefix:o,flow:a,keepUndefined:l,onTagObj:c,tag:f}=s??{},{onAnchor:d,setAnchors:p,sourceObjects:m}=u.createNodeAnchors(this,o||"a"),g={aliasDuplicateObjects:i??!0,keepUndefined:l??!1,onAnchor:d,onTagObj:c,replacer:r,schema:this.schema,sourceObjects:m},y=h.createNode(e,f,g);return a&&n.isCollection(y)&&(y.flow=!0),p(),y}createPair(e,t,s={}){let r=this.createNode(e,null,s),i=this.createNode(t,null,s);return new o.Pair(r,i)}delete(e){return!!p(this.contents)&&this.contents.delete(e)}deleteIn(e){return i.isEmptyPath(e)?null!=this.contents&&(this.contents=null,!0):!!p(this.contents)&&this.contents.deleteIn(e)}get(e,t){return n.isCollection(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return i.isEmptyPath(e)?!t&&n.isScalar(this.contents)?this.contents.value:this.contents:n.isCollection(this.contents)?this.contents.getIn(e,t):void 0}has(e){return!!n.isCollection(this.contents)&&this.contents.has(e)}hasIn(e){return i.isEmptyPath(e)?void 0!==this.contents:!!n.isCollection(this.contents)&&this.contents.hasIn(e)}set(e,t){null==this.contents?this.contents=i.collectionFromPath(this.schema,[e],t):p(this.contents)&&this.contents.set(e,t)}setIn(e,t){i.isEmptyPath(e)?this.contents=t:null==this.contents?this.contents=i.collectionFromPath(this.schema,Array.from(e),t):p(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){let s;switch("number"==typeof e&&(e=String(e)),e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new d.Directives({version:"1.1"}),s={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new d.Directives({version:e}),s={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,s=null;break;default:{let t=JSON.stringify(e);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(s)this.schema=new l.Schema(Object.assign(s,t));else throw Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:t,mapAsMap:s,maxAliasCount:r,onAnchor:i,reviver:n}={}){let o={anchors:new Map,doc:this,keep:!e,mapAsMap:!0===s,mapKeyWarned:!1,maxAliasCount:"number"==typeof r?r:100},l=a.toJS(this.contents,t??"",o);if("function"==typeof i)for(let{count:e,res:t}of o.anchors.values())i(t,e);return"function"==typeof n?f.applyReviver(n,{"":l},"",l):l}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||0>=Number(e.indent))){let t=JSON.stringify(e.indent);throw Error(`"indent" option must be a positive integer, not ${t}`)}return c.stringifyDocument(this,e)}}},43675,(e,t,s)=>{"use strict";class r extends Error{constructor(e,t,s,r){super(),this.name=e,this.code=s,this.message=r,this.pos=t}}s.YAMLError=r,s.YAMLParseError=class extends r{constructor(e,t,s){super("YAMLParseError",e,t,s)}},s.YAMLWarning=class extends r{constructor(e,t,s){super("YAMLWarning",e,t,s)}},s.prettifyError=(e,t)=>s=>{if(-1===s.pos[0])return;s.linePos=s.pos.map(e=>t.linePos(e));let{line:r,col:i}=s.linePos[0];s.message+=` at line ${r}, column ${i}`;let n=i-1,o=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[\n\r]+$/,"");if(n>=60&&o.length>80){let e=Math.min(n-39,o.length-79);o="…"+o.substring(e),n-=e-1}if(o.length>80&&(o=o.substring(0,79)+"…"),r>1&&/^ *$/.test(o.substring(0,n))){let s=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);s.length>80&&(s=s.substring(0,79)+"…\n"),o=s+o}if(/[^ ]/.test(o)){let e=1,t=s.linePos[1];t?.line===r&&t.col>i&&(e=Math.max(1,Math.min(t.col-i,80-n)));let a=" ".repeat(n)+"^".repeat(e);s.message+=`:
|
|
18
|
+
|
|
19
|
+
${o}
|
|
20
|
+
${a}
|
|
21
|
+
`}}},27800,(e,t,s)=>{"use strict";s.resolveProps=function(e,{flow:t,indicator:s,next:r,offset:i,onError:n,parentIndent:o,startOnNewline:a}){let l=!1,c=a,u=a,f="",h="",d=!1,p=!1,m=null,g=null,y=null,b=null,S=null,k=null,v=null;for(let i of e)switch(p&&("space"!==i.type&&"newline"!==i.type&&"comma"!==i.type&&n(i.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),p=!1),m&&(c&&"comment"!==i.type&&"newline"!==i.type&&n(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),m=null),i.type){case"space":!t&&("doc-start"!==s||r?.type!=="flow-collection")&&i.source.includes(" ")&&(m=i),u=!0;break;case"comment":{u||n(i,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let e=i.source.substring(1)||" ";f?f+=h+e:f=e,h="",c=!1;break}case"newline":c?f?f+=i.source:k&&"seq-item-ind"===s||(l=!0):h+=i.source,c=!0,d=!0,(g||y)&&(b=i),u=!0;break;case"anchor":g&&n(i,"MULTIPLE_ANCHORS","A node can have at most one anchor"),i.source.endsWith(":")&&n(i.offset+i.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),g=i,v??(v=i.offset),c=!1,u=!1,p=!0;break;case"tag":y&&n(i,"MULTIPLE_TAGS","A node can have at most one tag"),y=i,v??(v=i.offset),c=!1,u=!1,p=!0;break;case s:(g||y)&&n(i,"BAD_PROP_ORDER",`Anchors and tags must be after the ${i.source} indicator`),k&&n(i,"UNEXPECTED_TOKEN",`Unexpected ${i.source} in ${t??"collection"}`),k=i,c="seq-item-ind"===s||"explicit-key-ind"===s,u=!1;break;case"comma":if(t){S&&n(i,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),S=i,c=!1,u=!1;break}default:n(i,"UNEXPECTED_TOKEN",`Unexpected ${i.type} token`),c=!1,u=!1}let w=e[e.length-1],E=w?w.offset+w.source.length:i;return p&&r&&"space"!==r.type&&"newline"!==r.type&&"comma"!==r.type&&("scalar"!==r.type||""!==r.source)&&n(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),m&&(c&&m.indent<=o||r?.type==="block-map"||r?.type==="block-seq")&&n(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:S,found:k,spaceBefore:l,comment:f,hasNewline:d,anchor:g,tag:y,newlineAfterProp:b,end:E,start:v??E}}},19654,(e,t,s)=>{"use strict";s.containsNewline=function e(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes("\n"))return!0;if(t.end){for(let e of t.end)if("newline"===e.type)return!0}return!1;case"flow-collection":for(let s of t.items){for(let e of s.start)if("newline"===e.type)return!0;if(s.sep){for(let e of s.sep)if("newline"===e.type)return!0}if(e(s.key)||e(s.value))return!0}return!1;default:return!0}}},99065,(e,t,s)=>{"use strict";var r=e.r(19654);s.flowIndentCheck=function(e,t,s){if(t?.type==="flow-collection"){let i=t.end[0];i.indent===e&&("]"===i.source||"}"===i.source)&&r.containsNewline(t)&&s(i,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}},65973,(e,t,s)=>{"use strict";var r=e.r(62004);s.mapIncludes=function(e,t,s){let{uniqueKeys:i}=e.options;if(!1===i)return!1;let n="function"==typeof i?i:(e,t)=>e===t||r.isScalar(e)&&r.isScalar(t)&&e.value===t.value;return t.some(e=>n(e.key,s))}},1675,(e,t,s)=>{"use strict";var r=e.r(34165),i=e.r(75212),n=e.r(27800),o=e.r(19654),a=e.r(99065),l=e.r(65973);let c="All mapping items must start at the same column";s.resolveBlockMap=function({composeNode:e,composeEmptyNode:t},s,u,f,h){let d=new(h?.nodeClass??i.YAMLMap)(s.schema);s.atRoot&&(s.atRoot=!1);let p=u.offset,m=null;for(let i of u.items){let{start:h,key:g,sep:y,value:b}=i,S=n.resolveProps(h,{indicator:"explicit-key-ind",next:g??y?.[0],offset:p,onError:f,parentIndent:u.indent,startOnNewline:!0}),k=!S.found;if(k){if(g&&("block-seq"===g.type?f(p,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in g&&g.indent!==u.indent&&f(p,"BAD_INDENT",c)),!S.anchor&&!S.tag&&!y){m=S.end,S.comment&&(d.comment?d.comment+="\n"+S.comment:d.comment=S.comment);continue}(S.newlineAfterProp||o.containsNewline(g))&&f(g??h[h.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else S.found?.indent!==u.indent&&f(p,"BAD_INDENT",c);s.atKey=!0;let v=S.end,w=g?e(s,g,S,f):t(s,v,h,null,S,f);s.schema.compat&&a.flowIndentCheck(u.indent,g,f),s.atKey=!1,l.mapIncludes(s,d.items,w)&&f(v,"DUPLICATE_KEY","Map keys must be unique");let E=n.resolveProps(y??[],{indicator:"map-value-ind",next:b,offset:w.range[2],onError:f,parentIndent:u.indent,startOnNewline:!g||"block-scalar"===g.type});if(p=E.end,E.found){k&&(b?.type!=="block-map"||E.hasNewline||f(p,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),s.options.strict&&S.start<E.found.offset-1024&&f(w.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let n=b?e(s,b,E,f):t(s,p,y,null,E,f);s.schema.compat&&a.flowIndentCheck(u.indent,b,f),p=n.range[2];let o=new r.Pair(w,n);s.options.keepSourceTokens&&(o.srcToken=i),d.items.push(o)}else{k&&f(w.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),E.comment&&(w.comment?w.comment+="\n"+E.comment:w.comment=E.comment);let e=new r.Pair(w);s.options.keepSourceTokens&&(e.srcToken=i),d.items.push(e)}}return m&&m<p&&f(m,"IMPOSSIBLE","Map comment with trailing content"),d.range=[u.offset,p,m??p],d}},61779,(e,t,s)=>{"use strict";var r=e.r(98600),i=e.r(27800),n=e.r(99065);s.resolveBlockSeq=function({composeNode:e,composeEmptyNode:t},s,o,a,l){let c=new(l?.nodeClass??r.YAMLSeq)(s.schema);s.atRoot&&(s.atRoot=!1),s.atKey&&(s.atKey=!1);let u=o.offset,f=null;for(let{start:r,value:l}of o.items){let h=i.resolveProps(r,{indicator:"seq-item-ind",next:l,offset:u,onError:a,parentIndent:o.indent,startOnNewline:!0});if(!h.found)if(h.anchor||h.tag||l)l?.type==="block-seq"?a(h.end,"BAD_INDENT","All sequence items must start at the same column"):a(u,"MISSING_CHAR","Sequence item without - indicator");else{f=h.end,h.comment&&(c.comment=h.comment);continue}let d=l?e(s,l,h,a):t(s,h.end,r,null,h,a);s.schema.compat&&n.flowIndentCheck(o.indent,l,a),u=d.range[2],c.items.push(d)}return c.range=[o.offset,u,f??u],c}},83412,(e,t,s)=>{"use strict";s.resolveEnd=function(e,t,s,r){let i="";if(e){let n=!1,o="";for(let a of e){let{source:e,type:l}=a;switch(l){case"space":n=!0;break;case"comment":{s&&!n&&r(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let t=e.substring(1)||" ";i?i+=o+t:i=t,o="";break}case"newline":i&&(o+=e),n=!0;break;default:r(a,"UNEXPECTED_TOKEN",`Unexpected ${l} at node end`)}t+=e.length}}return{comment:i,offset:t}}},31172,(e,t,s)=>{"use strict";var r=e.r(62004),i=e.r(34165),n=e.r(75212),o=e.r(98600),a=e.r(83412),l=e.r(27800),c=e.r(19654),u=e.r(65973);let f="Block collections are not allowed within flow collections",h=e=>e&&("block-map"===e.type||"block-seq"===e.type);s.resolveFlowCollection=function({composeNode:e,composeEmptyNode:t},s,d,p,m){let g="{"===d.start.source,y=g?"flow map":"flow sequence",b=new(m?.nodeClass??(g?n.YAMLMap:o.YAMLSeq))(s.schema);b.flow=!0;let S=s.atRoot;S&&(s.atRoot=!1),s.atKey&&(s.atKey=!1);let k=d.offset+d.start.source.length;for(let o=0;o<d.items.length;++o){let a=d.items[o],{start:m,key:S,sep:v,value:w}=a,E=l.resolveProps(m,{flow:y,indicator:"explicit-key-ind",next:S??v?.[0],offset:k,onError:p,parentIndent:d.indent,startOnNewline:!1});if(!E.found){if(!E.anchor&&!E.tag&&!v&&!w){0===o&&E.comma?p(E.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${y}`):o<d.items.length-1&&p(E.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${y}`),E.comment&&(b.comment?b.comment+="\n"+E.comment:b.comment=E.comment),k=E.end;continue}!g&&s.options.strict&&c.containsNewline(S)&&p(S,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(0===o)E.comma&&p(E.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${y}`);else if(E.comma||p(E.start,"MISSING_CHAR",`Missing , between ${y} items`),E.comment){let e="";e:for(let t of m)switch(t.type){case"comma":case"space":break;case"comment":e=t.source.substring(1);break e;default:break e}if(e){let t=b.items[b.items.length-1];r.isPair(t)&&(t=t.value??t.key),t.comment?t.comment+="\n"+e:t.comment=e,E.comment=E.comment.substring(e.length+1)}}if(g||v||E.found){s.atKey=!0;let r=E.end,o=S?e(s,S,E,p):t(s,r,m,null,E,p);h(S)&&p(o.range,"BLOCK_IN_FLOW",f),s.atKey=!1;let c=l.resolveProps(v??[],{flow:y,indicator:"map-value-ind",next:w,offset:o.range[2],onError:p,parentIndent:d.indent,startOnNewline:!1});if(c.found){if(!g&&!E.found&&s.options.strict){if(v)for(let e of v){if(e===c.found)break;if("newline"===e.type){p(e,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}E.start<c.found.offset-1024&&p(c.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else w&&("source"in w&&w.source?.[0]===":"?p(w,"MISSING_CHAR",`Missing space after : in ${y}`):p(c.start,"MISSING_CHAR",`Missing , or : between ${y} items`));let O=w?e(s,w,c,p):c.found?t(s,c.end,v,null,c,p):null;O?h(w)&&p(O.range,"BLOCK_IN_FLOW",f):c.comment&&(o.comment?o.comment+="\n"+c.comment:o.comment=c.comment);let N=new i.Pair(o,O);if(s.options.keepSourceTokens&&(N.srcToken=a),g)u.mapIncludes(s,b.items,o)&&p(r,"DUPLICATE_KEY","Map keys must be unique"),b.items.push(N);else{let e=new n.YAMLMap(s.schema);e.flow=!0,e.items.push(N);let t=(O??o).range;e.range=[o.range[0],t[1],t[2]],b.items.push(e)}k=O?O.range[2]:c.end}else{let r=w?e(s,w,E,p):t(s,E.end,v,null,E,p);b.items.push(r),k=r.range[2],h(w)&&p(r.range,"BLOCK_IN_FLOW",f)}}let v=g?"}":"]",[w,...E]=d.end,O=k;if(w?.source===v)O=w.offset+w.source.length;else{let e=y[0].toUpperCase()+y.substring(1),t=S?`${e} must end with a ${v}`:`${e} in block collection must be sufficiently indented and end with a ${v}`;p(k,S?"MISSING_CHAR":"BAD_INDENT",t),w&&1!==w.source.length&&E.unshift(w)}if(E.length>0){let e=a.resolveEnd(E,O,s.options.strict,p);e.comment&&(b.comment?b.comment+="\n"+e.comment:b.comment=e.comment),b.range=[d.offset,O,e.offset]}else b.range=[d.offset,O,O];return b}},71656,(e,t,s)=>{"use strict";var r=e.r(62004),i=e.r(45942),n=e.r(75212),o=e.r(98600),a=e.r(1675),l=e.r(61779),c=e.r(31172);function u(e,t,s,r,i,n){let o="block-map"===s.type?a.resolveBlockMap(e,t,s,r,n):"block-seq"===s.type?l.resolveBlockSeq(e,t,s,r,n):c.resolveFlowCollection(e,t,s,r,n),u=o.constructor;return"!"===i||i===u.tagName?o.tag=u.tagName:i&&(o.tag=i),o}s.composeCollection=function(e,t,s,a,l){let c=a.tag,f=c?t.directives.tagName(c.source,e=>l(c,"TAG_RESOLVE_FAILED",e)):null;if("block-seq"===s.type){let{anchor:e,newlineAfterProp:t}=a,s=e&&c?e.offset>c.offset?e:c:e??c;s&&(!t||t.offset<s.offset)&&l(s,"MISSING_CHAR","Missing newline after block sequence props")}let h="block-map"===s.type?"map":"block-seq"===s.type?"seq":"{"===s.start.source?"map":"seq";if(!c||!f||"!"===f||f===n.YAMLMap.tagName&&"map"===h||f===o.YAMLSeq.tagName&&"seq"===h)return u(e,t,s,l,f);let d=t.schema.tags.find(e=>e.tag===f&&e.collection===h);if(!d){let r=t.schema.knownTags[f];if(r?.collection!==h)return r?l(c,"BAD_COLLECTION_TYPE",`${r.tag} used for ${h} collection, but expects ${r.collection??"scalar"}`,!0):l(c,"TAG_RESOLVE_FAILED",`Unresolved tag: ${f}`,!0),u(e,t,s,l,f);t.schema.tags.push(Object.assign({},r,{default:!1})),d=r}let p=u(e,t,s,l,f,d),m=d.resolve?.(p,e=>l(c,"TAG_RESOLVE_FAILED",e),t.options)??p,g=r.isNode(m)?m:new i.Scalar(m);return g.range=p.range,g.tag=f,d?.format&&(g.format=d.format),g}},6767,(e,t,s)=>{"use strict";var r=e.r(45942);s.resolveBlockScalar=function(e,t,s){let i=t.offset,n=function({offset:e,props:t},s,r){if("block-scalar-header"!==t[0].type)return r(t[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:i}=t[0],n=i[0],o=0,a="",l=-1;for(let t=1;t<i.length;++t){let s=i[t];if(a||"-"!==s&&"+"!==s){let r=Number(s);!o&&r?o=r:-1===l&&(l=e+t)}else a=s}-1!==l&&r(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let c=!1,u="",f=i.length;for(let e=1;e<t.length;++e){let i=t[e];switch(i.type){case"space":c=!0;case"newline":f+=i.source.length;break;case"comment":s&&!c&&r(i,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),f+=i.source.length,u=i.source.substring(1);break;case"error":r(i,"UNEXPECTED_TOKEN",i.message),f+=i.source.length;break;default:{let e=`Unexpected token in block scalar header: ${i.type}`;r(i,"UNEXPECTED_TOKEN",e);let t=i.source;t&&"string"==typeof t&&(f+=t.length)}}}return{mode:n,indent:o,chomp:a,comment:u,length:f}}(t,e.options.strict,s);if(!n)return{value:"",type:null,comment:"",range:[i,i,i]};let o=">"===n.mode?r.Scalar.BLOCK_FOLDED:r.Scalar.BLOCK_LITERAL,a=t.source?function(e){let t=e.split(/\n( *)/),s=t[0],r=s.match(/^( *)/),i=[r?.[1]?[r[1],s.slice(r[1].length)]:["",s]];for(let e=1;e<t.length;e+=2)i.push([t[e],t[e+1]]);return i}(t.source):[],l=a.length;for(let e=a.length-1;e>=0;--e){let t=a[e][1];if(""===t||"\r"===t)l=e;else break}if(0===l){let e="+"===n.chomp&&a.length>0?"\n".repeat(Math.max(1,a.length-1)):"",s=i+n.length;return t.source&&(s+=t.source.length),{value:e,type:o,comment:n.comment,range:[i,s,s]}}let c=t.indent+n.indent,u=t.offset+n.length,f=0;for(let t=0;t<l;++t){let[r,i]=a[t];if(""===i||"\r"===i)0===n.indent&&r.length>c&&(c=r.length);else{r.length<c&&s(u+r.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),0===n.indent&&(c=r.length),f=t,0!==c||e.atRoot||s(u,"BAD_INDENT","Block scalar values in collections must be indented");break}u+=r.length+i.length+1}for(let e=a.length-1;e>=l;--e)a[e][0].length>c&&(l=e+1);let h="",d="",p=!1;for(let e=0;e<f;++e)h+=a[e][0].slice(c)+"\n";for(let e=f;e<l;++e){let[t,i]=a[e];u+=t.length+i.length+1;let l="\r"===i[i.length-1];if(l&&(i=i.slice(0,-1)),i&&t.length<c){let e=n.indent?"explicit indentation indicator":"first line",r=`Block scalar lines must not be less indented than their ${e}`;s(u-i.length-(l?2:1),"BAD_INDENT",r),t=""}o===r.Scalar.BLOCK_LITERAL?(h+=d+t.slice(c)+i,d="\n"):t.length>c||" "===i[0]?(" "===d?d="\n":p||"\n"!==d||(d="\n\n"),h+=d+t.slice(c)+i,d="\n",p=!0):""===i?"\n"===d?h+="\n":d="\n":(h+=d+i,d=" ",p=!1)}switch(n.chomp){case"-":break;case"+":for(let e=l;e<a.length;++e)h+="\n"+a[e][0].slice(c);"\n"!==h[h.length-1]&&(h+="\n");break;default:h+="\n"}let m=i+n.length+t.source.length;return{value:h,type:o,comment:n.comment,range:[i,m,m]}}},1402,(e,t,s)=>{"use strict";var r=e.r(45942),i=e.r(83412);function n(e){let t,s;try{t=RegExp("(.*?)(?<![ ])[ ]*\r?\n","sy"),s=RegExp("[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?\n","sy")}catch{t=/(.*?)[ \t]*\r?\n/sy,s=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=t.exec(e);if(!r)return e;let i=r[1],n=" ",o=t.lastIndex;for(s.lastIndex=o;r=s.exec(e);)""===r[1]?"\n"===n?i+=n:n="\n":(i+=n+r[1],n=" "),o=s.lastIndex;let a=/[ \t]*(.*)/sy;return a.lastIndex=o,r=a.exec(e),i+n+(r?.[1]??"")}let o={0:"\0",a:"\x07",b:"\b",e:"\x1b",f:"\f",n:"\n",r:"\r",t:" ",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};s.resolveFlowScalar=function(e,t,s){let a,l,{offset:c,type:u,source:f,end:h}=e,d=(e,t,r)=>s(c+e,t,r);switch(u){case"scalar":a=r.Scalar.PLAIN,l=function(e,t){let s="";switch(e[0]){case" ":s="a tab character";break;case",":s="flow indicator character ,";break;case"%":s="directive indicator character %";break;case"|":case">":s=`block scalar indicator ${e[0]}`;break;case"@":case"`":s=`reserved character ${e[0]}`}return s&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${s}`),n(e)}(f,d);break;case"single-quoted-scalar":var p,m;a=r.Scalar.QUOTE_SINGLE,p=f,m=d,("'"!==p[p.length-1]||1===p.length)&&m(p.length,"MISSING_CHAR","Missing closing 'quote"),l=n(p.slice(1,-1)).replace(/''/g,"'");break;case"double-quoted-scalar":a=r.Scalar.QUOTE_DOUBLE,l=function(e,t){let s="";for(let r=1;r<e.length-1;++r){let i=e[r];if("\r"!==i||"\n"!==e[r+1])if("\n"===i){let{fold:t,offset:i}=function(e,t){let s="",r=e[t+1];for(;(" "===r||" "===r||"\n"===r||"\r"===r)&&("\r"!==r||"\n"===e[t+2]);)"\n"===r&&(s+="\n"),t+=1,r=e[t+1];return s||(s=" "),{fold:s,offset:t}}(e,r);s+=t,r=i}else if("\\"===i){let i=e[++r],n=o[i];if(n)s+=n;else if("\n"===i)for(i=e[r+1];" "===i||" "===i;)i=e[++r+1];else if("\r"===i&&"\n"===e[r+1])for(i=e[++r+1];" "===i||" "===i;)i=e[++r+1];else if("x"===i||"u"===i||"U"===i){let n="x"===i?2:"u"===i?4:8;s+=function(e,t,s,r){let i=e.substr(t,s),n=i.length===s&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;try{return String.fromCodePoint(n)}catch{let i=e.substr(t-2,s+2);return r(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${i}`),i}}(e,r+1,n,t),r+=n}else{let i=e.substr(r-1,2);t(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${i}`),s+=i}}else if(" "===i||" "===i){let t=r,n=e[r+1];for(;" "===n||" "===n;)n=e[++r+1];"\n"!==n&&("\r"!==n||"\n"!==e[r+2])&&(s+=r>t?e.slice(t,r+1):i)}else s+=i}return('"'!==e[e.length-1]||1===e.length)&&t(e.length,"MISSING_CHAR",'Missing closing "quote'),s}(f,d);break;default:return s(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${u}`),{value:"",type:null,comment:"",range:[c,c+f.length,c+f.length]}}let g=c+f.length,y=i.resolveEnd(h,g,t,s);return{value:l,type:a,comment:y.comment,range:[c,g,y.offset]}}},5417,(e,t,s)=>{"use strict";var r=e.r(62004),i=e.r(45942),n=e.r(6767),o=e.r(1402);s.composeScalar=function(e,t,s,a){let l,c,{value:u,type:f,comment:h,range:d}="block-scalar"===t.type?n.resolveBlockScalar(e,t,a):o.resolveFlowScalar(t,e.options.strict,a),p=s?e.directives.tagName(s.source,e=>a(s,"TAG_RESOLVE_FAILED",e)):null;l=e.options.stringKeys&&e.atKey?e.schema[r.SCALAR]:p?function(e,t,s,i,n){if("!"===s)return e[r.SCALAR];let o=[];for(let t of e.tags)if(!t.collection&&t.tag===s)if(!t.default||!t.test)return t;else o.push(t);for(let e of o)if(e.test?.test(t))return e;let a=e.knownTags[s];return a&&!a.collection?(e.tags.push(Object.assign({},a,{default:!1,test:void 0})),a):(n(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${s}`,"tag:yaml.org,2002:str"!==s),e[r.SCALAR])}(e.schema,u,p,s,a):"scalar"===t.type?function({atKey:e,directives:t,schema:s},i,n,o){let a=s.tags.find(t=>(!0===t.default||e&&"key"===t.default)&&t.test?.test(i))||s[r.SCALAR];if(s.compat){let e=s.compat.find(e=>e.default&&e.test?.test(i))??s[r.SCALAR];if(a.tag!==e.tag){let s=t.tagString(a.tag),r=t.tagString(e.tag);o(n,"TAG_RESOLVE_FAILED",`Value may be parsed as either ${s} or ${r}`,!0)}}return a}(e,u,t,a):e.schema[r.SCALAR];try{let n=l.resolve(u,e=>a(s??t,"TAG_RESOLVE_FAILED",e),e.options);c=r.isScalar(n)?n:new i.Scalar(n)}catch(e){a(s??t,"TAG_RESOLVE_FAILED",e instanceof Error?e.message:String(e)),c=new i.Scalar(u)}return c.range=d,c.source=u,f&&(c.type=f),p&&(c.tag=p),l.format&&(c.format=l.format),h&&(c.comment=h),c}},53331,(e,t,s)=>{"use strict";s.emptyScalarPosition=function(e,t,s){if(t){s??(s=t.length);for(let r=s-1;r>=0;--r){let s=t[r];switch(s.type){case"space":case"comment":case"newline":e-=s.source.length;continue}for(s=t[++r];s?.type==="space";)e+=s.source.length,s=t[++r];break}}return e}},46679,(e,t,s)=>{"use strict";var r=e.r(84079),i=e.r(62004),n=e.r(71656),o=e.r(5417),a=e.r(83412),l=e.r(53331);let c={composeNode:u,composeEmptyNode:f};function u(e,t,s,l){let u,h=e.atKey,{spaceBefore:d,comment:p,anchor:m,tag:g}=s,y=!0;switch(t.type){case"alias":u=function({options:e},{offset:t,source:s,end:i},n){let o=new r.Alias(s.substring(1));""===o.source&&n(t,"BAD_ALIAS","Alias cannot be an empty string"),o.source.endsWith(":")&&n(t+s.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let l=t+s.length,c=a.resolveEnd(i,l,e.strict,n);return o.range=[t,l,c.offset],c.comment&&(o.comment=c.comment),o}(e,t,l),(m||g)&&l(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":u=o.composeScalar(e,t,g,l),m&&(u.anchor=m.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{u=n.composeCollection(c,e,t,s,l),m&&(u.anchor=m.source.substring(1))}catch(e){l(t,"RESOURCE_EXHAUSTION",e instanceof Error?e.message:String(e))}break;default:{let e="error"===t.type?t.message:`Unsupported token (type: ${t.type})`;l(t,"UNEXPECTED_TOKEN",e),y=!1}}return u??(u=f(e,t.offset,void 0,null,s,l)),m&&""===u.anchor&&l(m,"BAD_ALIAS","Anchor cannot be an empty string"),h&&e.options.stringKeys&&(!i.isScalar(u)||"string"!=typeof u.value||u.tag&&"tag:yaml.org,2002:str"!==u.tag)&&l(g??t,"NON_STRING_KEY","With stringKeys, all keys must be strings"),d&&(u.spaceBefore=!0),p&&("scalar"===t.type&&""===t.source?u.comment=p:u.commentBefore=p),e.options.keepSourceTokens&&y&&(u.srcToken=t),u}function f(e,t,s,r,{spaceBefore:i,comment:n,anchor:a,tag:c,end:u},h){let d={type:"scalar",offset:l.emptyScalarPosition(t,s,r),indent:-1,source:""},p=o.composeScalar(e,d,c,h);return a&&(p.anchor=a.source.substring(1),""===p.anchor&&h(a,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(p.spaceBefore=!0),n&&(p.comment=n,p.range[2]=u),p}s.composeEmptyNode=f,s.composeNode=u},68408,(e,t,s)=>{"use strict";var r=e.r(94912),i=e.r(46679),n=e.r(83412),o=e.r(27800);s.composeDoc=function(e,t,{offset:s,start:a,value:l,end:c},u){let f=Object.assign({_directives:t},e),h=new r.Document(void 0,f),d={atKey:!1,atRoot:!0,directives:h.directives,options:h.options,schema:h.schema},p=o.resolveProps(a,{indicator:"doc-start",next:l??c?.[0],offset:s,onError:u,parentIndent:0,startOnNewline:!0});p.found&&(h.directives.docStart=!0,l&&("block-map"===l.type||"block-seq"===l.type)&&!p.hasNewline&&u(p.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),h.contents=l?i.composeNode(d,l,p,u):i.composeEmptyNode(d,p.end,a,null,p,u);let m=h.contents.range[2],g=n.resolveEnd(c,m,!1,u);return g.comment&&(h.comment=g.comment),h.range=[s,m,g.offset],h}},91506,(e,t,s)=>{"use strict";var r=e.r(5365),i=e.r(43474),n=e.r(94912),o=e.r(43675),a=e.r(62004),l=e.r(68408),c=e.r(83412);function u(e){if("number"==typeof e)return[e,e+1];if(Array.isArray(e))return 2===e.length?e:[e[0],e[1]];let{offset:t,source:s}=e;return[t,t+("string"==typeof s?s.length:1)]}function f(e){let t="",s=!1,r=!1;for(let i=0;i<e.length;++i){let n=e[i];switch(n[0]){case"#":t+=(""===t?"":r?"\n\n":"\n")+(n.substring(1)||" "),s=!0,r=!1;break;case"%":e[i+1]?.[0]!=="#"&&(i+=1),s=!1;break;default:s||(r=!0),s=!1}}return{comment:t,afterEmptyLine:r}}s.Composer=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,s,r)=>{let i=u(e);r?this.warnings.push(new o.YAMLWarning(i,t,s)):this.errors.push(new o.YAMLParseError(i,t,s))},this.directives=new i.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,t){let{comment:s,afterEmptyLine:r}=f(this.prelude);if(s){let i=e.contents;if(t)e.comment=e.comment?`${e.comment}
|
|
22
|
+
${s}`:s;else if(r||e.directives.docStart||!i)e.commentBefore=s;else if(a.isCollection(i)&&!i.flow&&i.items.length>0){let e=i.items[0];a.isPair(e)&&(e=e.key);let t=e.commentBefore;e.commentBefore=t?`${s}
|
|
23
|
+
${t}`:s}else{let e=i.commentBefore;i.commentBefore=e?`${s}
|
|
24
|
+
${e}`:s}}if(t){for(let t=0;t<this.errors.length;++t)e.errors.push(this.errors[t]);for(let t=0;t<this.warnings.length;++t)e.warnings.push(this.warnings[t])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:f(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,s=-1){for(let t of e)yield*this.next(t);yield*this.end(t,s)}*next(e){switch(r.env.LOG_STREAM&&console.dir(e,{depth:null}),e.type){case"directive":this.directives.add(e.source,(t,s,r)=>{let i=u(e);i[0]+=t,this.onError(i,"BAD_DIRECTIVE",s,r)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let t=l.composeDoc(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,s=new o.YAMLParseError(u(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(s):this.doc.errors.push(s);break}case"doc-end":{if(!this.doc){this.errors.push(new o.YAMLParseError(u(e),"UNEXPECTED_TOKEN","Unexpected doc-end without preceding document"));break}this.doc.directives.docEnd=!0;let t=c.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let e=this.doc.comment;this.doc.comment=e?`${e}
|
|
25
|
+
${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new o.YAMLParseError(u(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let e=Object.assign({_directives:this.directives},this.options),s=new n.Document(void 0,e);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),s.range=[0,t,t],this.decorate(s,!1),yield s}}}},66002,(e,t,s)=>{"use strict";var r=e.r(6767),i=e.r(1402),n=e.r(43675),o=e.r(23157);function a(e,t){if(t)for(let s of t)switch(s.type){case"space":case"comment":e.push(s);break;case"newline":return e.push(s),!0}return!1}function l(e,t,s){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=s,e.source=t;break;case"block-scalar":{let r=e.props.slice(1),i=t.length;for(let t of("block-scalar-header"===e.props[0].type&&(i-=e.props[0].source.length),r))t.offset+=i;delete e.props,Object.assign(e,{type:s,source:t,end:r});break}case"block-map":case"block-seq":{let r={type:"newline",offset:e.offset+t.length,indent:e.indent,source:"\n"};delete e.items,Object.assign(e,{type:s,source:t,end:[r]});break}default:{let r="indent"in e?e.indent:-1,i="end"in e&&Array.isArray(e.end)?e.end.filter(e=>"space"===e.type||"comment"===e.type||"newline"===e.type):[];for(let t of Object.keys(e))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:s,indent:r,source:t,end:i})}}}s.createScalarToken=function(e,t){let{implicitKey:s=!1,indent:r,inFlow:i=!1,offset:n=-1,type:l="PLAIN"}=t,c=o.stringifyString({type:l,value:e},{implicitKey:s,indent:r>0?" ".repeat(r):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),u=t.end??[{type:"newline",offset:-1,indent:r,source:"\n"}];switch(c[0]){case"|":case">":{let e=c.indexOf("\n"),t=c.substring(0,e),s=c.substring(e+1)+"\n",i=[{type:"block-scalar-header",offset:n,indent:r,source:t}];return a(i,u)||i.push({type:"newline",offset:-1,indent:r,source:"\n"}),{type:"block-scalar",offset:n,indent:r,props:i,source:s}}case'"':return{type:"double-quoted-scalar",offset:n,indent:r,source:c,end:u};case"'":return{type:"single-quoted-scalar",offset:n,indent:r,source:c,end:u};default:return{type:"scalar",offset:n,indent:r,source:c,end:u}}},s.resolveAsScalar=function(e,t=!0,s){if(e){let o=(e,t,r)=>{let i="number"==typeof e?e:Array.isArray(e)?e[0]:e.offset;if(s)s(i,t,r);else throw new n.YAMLParseError([i,i+1],t,r)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return i.resolveFlowScalar(e,t,o);case"block-scalar":return r.resolveBlockScalar({options:{strict:t}},e,o)}}return null},s.setScalarValue=function(e,t,s={}){let{afterKey:r=!1,implicitKey:i=!1,inFlow:n=!1,type:c}=s,u="indent"in e?e.indent:null;if(r&&"number"==typeof u&&(u+=2),!c)switch(e.type){case"single-quoted-scalar":c="QUOTE_SINGLE";break;case"double-quoted-scalar":c="QUOTE_DOUBLE";break;case"block-scalar":{let t=e.props[0];if("block-scalar-header"!==t.type)throw Error("Invalid block scalar header");c=">"===t.source[0]?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:c="PLAIN"}let f=o.stringifyString({type:c,value:t},{implicitKey:i||null===u,indent:null!==u&&u>0?" ".repeat(u):"",inFlow:n,options:{blockQuote:!0,lineWidth:-1}});switch(f[0]){case"|":case">":!function(e,t){let s=t.indexOf("\n"),r=t.substring(0,s),i=t.substring(s+1)+"\n";if("block-scalar"===e.type){let t=e.props[0];if("block-scalar-header"!==t.type)throw Error("Invalid block scalar header");t.source=r,e.source=i}else{let{offset:t}=e,s="indent"in e?e.indent:-1,n=[{type:"block-scalar-header",offset:t,indent:s,source:r}];for(let t of(a(n,"end"in e?e.end:void 0)||n.push({type:"newline",offset:-1,indent:s,source:"\n"}),Object.keys(e)))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:"block-scalar",indent:s,props:n,source:i})}}(e,f);break;case'"':l(e,f,"double-quoted-scalar");break;case"'":l(e,f,"single-quoted-scalar");break;default:l(e,f,"scalar")}}},46967,(e,t,s)=>{"use strict";function r(e){switch(e.type){case"block-scalar":{let t="";for(let s of e.props)t+=r(s);return t+e.source}case"block-map":case"block-seq":{let t="";for(let s of e.items)t+=i(s);return t}case"flow-collection":{let t=e.start.source;for(let s of e.items)t+=i(s);for(let s of e.end)t+=s.source;return t}case"document":{let t=i(e);if(e.end)for(let s of e.end)t+=s.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(let s of e.end)t+=s.source;return t}}}function i({start:e,key:t,sep:s,value:n}){let o="";for(let t of e)o+=t.source;if(t&&(o+=r(t)),s)for(let e of s)o+=e.source;return n&&(o+=r(n)),o}s.stringify=e=>"type"in e?r(e):i(e)},45315,(e,t,s)=>{"use strict";let r=Symbol("break visit"),i=Symbol("skip children"),n=Symbol("remove item");function o(e,t){"type"in e&&"document"===e.type&&(e={start:e.start,value:e.value}),function e(t,s,i){let o=i(s,t);if("symbol"==typeof o)return o;for(let a of["key","value"]){let l=s[a];if(l&&"items"in l){for(let s=0;s<l.items.length;++s){let o=e(Object.freeze(t.concat([[a,s]])),l.items[s],i);if("number"==typeof o)s=o-1;else{if(o===r)return r;o===n&&(l.items.splice(s,1),s-=1)}}"function"==typeof o&&"key"===a&&(o=o(s,t))}}return"function"==typeof o?o(s,t):o}(Object.freeze([]),e,t)}o.BREAK=r,o.SKIP=i,o.REMOVE=n,o.itemAtPath=(e,t)=>{let s=e;for(let[e,r]of t){let t=s?.[e];if(!t||!("items"in t))return;s=t.items[r]}return s},o.parentCollection=(e,t)=>{let s=o.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],i=s?.[r];if(i&&"items"in i)return i;throw Error("Parent collection not found")},s.visit=o},83183,(e,t,s)=>{"use strict";var r=e.r(66002),i=e.r(46967),n=e.r(45315);s.createScalarToken=r.createScalarToken,s.resolveAsScalar=r.resolveAsScalar,s.setScalarValue=r.setScalarValue,s.stringify=i.stringify,s.visit=n.visit,s.BOM="\uFEFF",s.DOCUMENT="\x02",s.FLOW_END="\x18",s.SCALAR="\x1f",s.isCollection=e=>!!e&&"items"in e,s.isScalar=e=>!!e&&("scalar"===e.type||"single-quoted-scalar"===e.type||"double-quoted-scalar"===e.type||"block-scalar"===e.type),s.prettyToken=function(e){switch(e){case"\uFEFF":return"<BOM>";case"\x02":return"<DOC>";case"\x18":return"<FLOW_END>";case"\x1f":return"<SCALAR>";default:return JSON.stringify(e)}},s.tokenType=function(e){switch(e){case"\uFEFF":return"byte-order-mark";case"\x02":return"doc-mode";case"\x18":return"flow-error-end";case"\x1f":return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case"\n":case"\r\n":return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}},98319,(e,t,s)=>{"use strict";var r=e.r(83183);function i(e){switch(e){case void 0:case" ":case"\n":case"\r":case" ":return!0;default:return!1}}let n=new Set("0123456789ABCDEFabcdef"),o=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),a=new Set(",[]{}"),l=new Set(" ,[]{}\n\r "),c=e=>!e||l.has(e);s.Lexer=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if("string"!=typeof e)throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let s=this.next??"stream";for(;s&&(t||this.hasChars(1));)s=yield*this.parseNext(s)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;" "===t||" "===t;)t=this.buffer[++e];return!t||"#"===t||"\n"===t||"\r"===t&&"\n"===this.buffer[e+1]}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let s=0;for(;" "===t;)t=this.buffer[++s+e];if("\r"===t){let t=this.buffer[s+e+1];if("\n"===t||!t&&!this.atEnd)return e+s+1}return"\n"!==t&&!(s>=this.indentNext)&&(t||this.atEnd)?-1:e+s}if("-"===t||"."===t){let t=this.buffer.substr(e,3);if(("---"===t||"..."===t)&&i(this.buffer[e+3]))return -1}return e}getLine(){let e=this.lineEndPos;return(("number"!=typeof e||-1!==e&&e<this.pos)&&(e=this.buffer.indexOf("\n",this.pos),this.lineEndPos=e),-1===e)?this.atEnd?this.buffer.substring(this.pos):null:("\r"===this.buffer[e-1]&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(null===e)return this.setNext("stream");if(e[0]===r.BOM&&(yield*this.pushCount(1),e=e.substring(1)),"%"===e[0]){let t=e.length,s=e.indexOf("#");for(;-1!==s;){let r=e[s-1];if(" "===r||" "===r){t=s-1;break}s=e.indexOf("#",s+1)}for(;;){let s=e[t-1];if(" "===s||" "===s)t-=1;else break}let r=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-r),this.pushNewline(),"stream"}if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield r.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if("-"===e||"."===e){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let e=this.peek(3);if(("---"===e||"..."===e)&&i(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,"---"===e?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!i(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if(("-"===e||"?"===e||":"===e)&&i(t)){let e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(null===e)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(c),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,s=-1;do(e=yield*this.pushNewline())>0?(t=yield*this.pushSpaces(!1),this.indentValue=s=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0)let n=this.getLine();if(null===n)return this.setNext("flow");if((-1!==s&&s<this.indentNext&&"#"!==n[0]||0===s&&(n.startsWith("---")||n.startsWith("..."))&&i(n[3]))&&(s!==this.indentNext-1||1!==this.flowLevel||"]"!==n[0]&&"}"!==n[0]))return this.flowLevel=0,yield r.FLOW_END,yield*this.parseLineStart();let o=0;for(;","===n[o];)o+=yield*this.pushCount(1),o+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(n[o+=yield*this.pushIndicators()]){case void 0:return"flow";case"#":return yield*this.pushCount(n.length-o),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(c),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let e=this.charAt(1);if(this.flowKey||i(e)||","===e)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),t=this.buffer.indexOf(e,this.pos+1);if("'"===e)for(;-1!==t&&"'"===this.buffer[t+1];)t=this.buffer.indexOf("'",t+2);else for(;-1!==t;){let e=0;for(;"\\"===this.buffer[t-1-e];)e+=1;if(e%2==0)break;t=this.buffer.indexOf('"',t+1)}let s=this.buffer.substring(0,t),r=s.indexOf("\n",this.pos);if(-1!==r){for(;-1!==r;){let e=this.continueScalar(r+1);if(-1===e)break;r=s.indexOf("\n",e)}-1!==r&&(t=r-("\r"===s[r-1]?2:1))}if(-1===t){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if("+"===t)this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if("-"!==t)break}return yield*this.pushUntil(e=>i(e)||"#"===e)}*parseBlockScalar(){let e,t=this.pos-1,s=0;e:for(let r=this.pos;e=this.buffer[r];++r)switch(e){case" ":s+=1;break;case"\n":t=r,s=0;break;case"\r":{let e=this.buffer[r+1];if(!e&&!this.atEnd)return this.setNext("block-scalar");if("\n"===e)break}default:break e}if(!e&&!this.atEnd)return this.setNext("block-scalar");if(s>=this.indentNext){-1===this.blockScalarIndent?this.indentNext=s:this.indentNext=this.blockScalarIndent+(0===this.indentNext?1:this.indentNext);do{let e=this.continueScalar(t+1);if(-1===e)break;t=this.buffer.indexOf("\n",e)}while(-1!==t)if(-1===t){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}let i=t+1;for(e=this.buffer[i];" "===e;)e=this.buffer[++i];if(" "===e){for(;" "===e||" "===e||"\r"===e||"\n"===e;)e=this.buffer[++i];t=i-1}else if(!this.blockScalarKeep)for(;;){let e=t-1,r=this.buffer[e];"\r"===r&&(r=this.buffer[--e]);let i=e;for(;" "===r;)r=this.buffer[--e];if("\n"===r&&e>=this.pos&&e+1+s>i)t=e;else break}return yield r.SCALAR,yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e,t=this.flowLevel>0,s=this.pos-1,n=this.pos-1;for(;e=this.buffer[++n];)if(":"===e){let e=this.buffer[n+1];if(i(e)||t&&a.has(e))break;s=n}else if(i(e)){let r=this.buffer[n+1];if("\r"===e&&("\n"===r?(n+=1,e="\n",r=this.buffer[n+1]):s=n),"#"===r||t&&a.has(r))break;if("\n"===e){let e=this.continueScalar(n+1);if(-1===e)break;n=Math.max(n,e-2)}}else{if(t&&a.has(e))break;s=n}return e||this.atEnd?(yield r.SCALAR,yield*this.pushToIndex(s+1,!0),t?"flow":"doc"):this.setNext("plain-scalar")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let s=this.buffer.slice(this.pos,e);return s?(yield s,this.pos+=s.length,s.length):(t&&(yield""),0)}*pushIndicators(){let e=0;for(;;){switch(this.charAt(0)){case"!":e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue;case"&":e+=yield*this.pushUntil(c),e+=yield*this.pushSpaces(!0);continue;case"-":case"?":case":":{let t=this.flowLevel>0,s=this.charAt(1);if(i(s)||t&&a.has(s)){t?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue}}}break}return e}*pushTag(){if("<"===this.charAt(1)){let e=this.pos+2,t=this.buffer[e];for(;!i(t)&&">"!==t;)t=this.buffer[++e];return yield*this.pushToIndex(">"===t?e+1:e,!1)}{let e=this.pos+1,t=this.buffer[e];for(;t;)if(o.has(t))t=this.buffer[++e];else if("%"===t&&n.has(this.buffer[e+1])&&n.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return"\n"===e?yield*this.pushCount(1):"\r"===e&&"\n"===this.charAt(1)?yield*this.pushCount(2):0}*pushSpaces(e){let t,s=this.pos-1;do t=this.buffer[++s];while(" "===t||e&&" "===t)let r=s-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=s),r}*pushUntil(e){let t=this.pos,s=this.buffer[t];for(;!e(s);)s=this.buffer[++t];return yield*this.pushToIndex(t,!1)}}},76815,(e,t,s)=>{"use strict";s.LineCounter=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,s=this.lineStarts.length;for(;t<s;){let r=t+s>>1;this.lineStarts[r]<e?t=r+1:s=r}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(0===t)return{line:0,col:e};let r=this.lineStarts[t-1];return{line:t,col:e-r+1}}}}},18377,(e,t,s)=>{"use strict";var r=e.r(5365),i=e.r(83183),n=e.r(98319);function o(e,t){for(let s=0;s<e.length;++s)if(e[s].type===t)return!0;return!1}function a(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return t}return -1}function l(e){switch(e?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function c(e){switch(e.type){case"document":return e.start;case"block-map":{let t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function u(e){if(0===e.length)return[];let t=e.length;e:for(;--t>=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;e[++t]?.type==="space";);return e.splice(t,e.length)}function f(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let s=0;s<t.length;++s)e.push(t[s])}function h(e){if("flow-seq-start"===e.start.type)for(let t of e.items)!t.sep||t.value||o(t.start,"explicit-key-ind")||o(t.sep,"map-value-ind")||(t.key&&(t.value=t.key),delete t.key,l(t.value)?t.value.end?f(t.value.end,t.sep):t.value.end=t.sep:f(t.start,t.sep),delete t.sep)}s.Parser=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new n.Lexer,this.onNewLine=e}*parse(e,t=!1){for(let s of(this.onNewLine&&0===this.offset&&this.onNewLine(0),this.lexer.lex(e,t)))yield*this.next(s);t||(yield*this.end())}*next(e){if(this.source=e,r.env.LOG_TOKENS&&console.log("|",i.prettyToken(e)),this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=i.tokenType(e);if(t)if("scalar"===t)this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&" "===e[0]&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{let t=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:t,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if("doc-end"===this.type&&e?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e??this.stack.pop();if(t)if(0===this.stack.length)yield t;else{let e=this.peek(1);switch("block-scalar"===t.type?t.indent="indent"in e?e.indent:0:"flow-collection"===t.type&&"document"===e.type&&(t.indent=0),"flow-collection"===t.type&&h(t),e.type){case"document":e.value=t;break;case"block-scalar":e.props.push(t);break;case"block-map":{let s=e.items[e.items.length-1];if(s.value){e.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}if(s.sep)s.value=t;else{Object.assign(s,{key:t,sep:[]}),this.onKeyLine=!s.explicitKey;return}break}case"block-seq":{let s=e.items[e.items.length-1];s.value?e.items.push({start:[],value:t}):s.value=t;break}case"flow-collection":{let s=e.items[e.items.length-1];!s||s.value?e.items.push({start:[],key:t,sep:[]}):s.sep?s.value=t:Object.assign(s,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if(("document"===e.type||"block-map"===e.type||"block-seq"===e.type)&&("block-map"===t.type||"block-seq"===t.type)){let s=t.items[t.items.length-1];s&&!s.sep&&!s.value&&s.start.length>0&&-1===a(s.start)&&(0===t.indent||s.start.every(e=>"comment"!==e.type||e.indent<t.indent))&&("document"===e.type?e.end=s.start:e.items.push({start:s.start}),t.items.splice(-1,1))}}else yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let e={type:"document",offset:this.offset,start:[]};"doc-start"===this.type&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":-1!==a(e.start)?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return;case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}let t=this.startBlockValue(e);t?this.stack.push(t):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if("map-value-ind"===this.type){let t,s=u(c(this.peek(2)));e.end?((t=e.end).push(this.sourceToken),delete e.end):t=[this.sourceToken];let r={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:s,key:e,sep:t}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=r}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){let s="end"in t.value?t.value.end:void 0,r=Array.isArray(s)?s[s.length-1]:void 0;r?.type==="comment"?s?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let s=e.items[e.items.length-2],r=s?.value?.end;if(Array.isArray(r)){f(r,t.start),r.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let s=!this.onKeyLine&&this.indent===e.indent,r=s&&(t.sep||t.explicitKey)&&"seq-item-ind"!==this.type,i=[];if(r&&t.sep&&!t.value){let s=[];for(let r=0;r<t.sep.length;++r){let i=t.sep[r];switch(i.type){case"newline":s.push(r);break;case"space":break;case"comment":i.indent>e.indent&&(s.length=0);break;default:s.length=0}}s.length>=2&&(i=t.sep.splice(s[1]))}switch(this.type){case"anchor":case"tag":r||t.value?(i.push(this.sourceToken),e.items.push({start:i}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"explicit-key-ind":t.sep||t.explicitKey?r||t.value?(i.push(this.sourceToken),e.items.push({start:i,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}):(t.start.push(this.sourceToken),t.explicitKey=!0),this.onKeyLine=!0;return;case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(o(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if(l(t.key)&&!o(t.sep,"newline")){let e=u(t.start),s=t.key,r=t.sep;r.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:s,sep:r}]})}else i.length>0?t.sep=t.sep.concat(i,this.sourceToken):t.sep.push(this.sourceToken);else if(o(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let e=u(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||r?e.items.push({start:i,key:null,sep:[this.sourceToken]}):o(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let s=this.flowScalar(this.type);r||t.value?(e.items.push({start:i,key:s,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(s):(Object.assign(t,{key:s,sep:[]}),this.onKeyLine=!0);return}default:{let r=this.startBlockValue(e);if(r){if("block-seq"===r.type){if(!t.explicitKey&&t.sep&&!o(t.sep,"newline"))return void(yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source}))}else s&&e.items.push({start:i});this.stack.push(r);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){let s="end"in t.value?t.value.end:void 0,r=Array.isArray(s)?s[s.length-1]:void 0;r?.type==="comment"?s?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){let s=e.items[e.items.length-2],r=s?.value?.end;if(Array.isArray(r)){f(r,t.start),r.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;t.value||o(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let t=this.startBlockValue(e);if(t)return void this.stack.push(t)}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if("flow-error-end"===this.type){let e;do yield*this.pop(),e=this.peek(1);while(e?.type==="flow-collection")}else if(0===e.end.length){switch(this.type){case"comma":case"explicit-key-ind":!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case"map-value-ind":!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let s=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:s,sep:[]}):t.sep?this.stack.push(s):Object.assign(t,{key:s,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let s=this.startBlockValue(e);s?this.stack.push(s):(yield*this.pop(),yield*this.step())}else{let t=this.peek(2);if("block-map"!==t.type||("map-value-ind"!==this.type||t.indent!==e.indent)&&("newline"!==this.type||t.items[t.items.length-1].sep))if("map-value-ind"===this.type&&"flow-collection"!==t.type){let s=u(c(t));h(e);let r=e.end.splice(1,e.end.length);r.push(this.sourceToken);let i={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:s,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=i}else yield*this.lineEnd(e);else yield*this.pop(),yield*this.step()}}flowScalar(e){if(this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let t=u(c(e));return t.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let t=u(c(e));return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return"comment"===this.type&&!(this.indent<=t)&&e.every(e=>"newline"===e.type||"space"===e.type)}*documentEnd(e){"doc-mode"!==this.type&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop())}}}},72709,(e,t,s)=>{"use strict";var r=e.r(91506),i=e.r(94912),n=e.r(43675),o=e.r(87449),a=e.r(62004),l=e.r(76815),c=e.r(18377);function u(e){let t=!1!==e.prettyErrors;return{lineCounter:e.lineCounter||t&&new l.LineCounter||null,prettyErrors:t}}function f(e,t={}){let{lineCounter:s,prettyErrors:i}=u(t),o=new c.Parser(s?.addNewLine),a=new r.Composer(t),l=null;for(let t of a.compose(o.parse(e),!0,e.length))if(l){if("silent"!==l.options.logLevel){l.errors.push(new n.YAMLParseError(t.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}}else l=t;return i&&s&&(l.errors.forEach(n.prettifyError(e,s)),l.warnings.forEach(n.prettifyError(e,s))),l}s.parse=function(e,t,s){let r;"function"==typeof t?r=t:void 0===s&&t&&"object"==typeof t&&(s=t);let i=f(e,s);if(!i)return null;if(i.warnings.forEach(e=>o.warn(i.options.logLevel,e)),i.errors.length>0)if("silent"!==i.options.logLevel)throw i.errors[0];else i.errors=[];return i.toJS(Object.assign({reviver:r},s))},s.parseAllDocuments=function(e,t={}){let{lineCounter:s,prettyErrors:i}=u(t),o=new c.Parser(s?.addNewLine),a=new r.Composer(t),l=Array.from(a.compose(o.parse(e)));if(i&&s)for(let t of l)t.errors.forEach(n.prettifyError(e,s)),t.warnings.forEach(n.prettifyError(e,s));return l.length>0?l:Object.assign([],{empty:!0},a.streamInfo())},s.parseDocument=f,s.stringify=function(e,t,s){let r=null;if("function"==typeof t||Array.isArray(t)?r=t:void 0===s&&t&&(s=t),"string"==typeof s&&(s=s.length),"number"==typeof s){let e=Math.round(s);s=e<1?void 0:e>8?{indent:8}:{indent:e}}if(void 0===e){let{keepUndefined:e}=s??t??{};if(!e)return}return a.isDocument(e)&&!r?e.toString(s):new i.Document(e,r,s).toString(s)}},23008,(e,t,s)=>{"use strict";var r=e.r(91506),i=e.r(94912),n=e.r(94637),o=e.r(43675),a=e.r(84079),l=e.r(62004),c=e.r(34165),u=e.r(45942),f=e.r(75212),h=e.r(98600),d=e.r(83183),p=e.r(98319),m=e.r(76815),g=e.r(18377),y=e.r(72709),b=e.r(5746);s.Composer=r.Composer,s.Document=i.Document,s.Schema=n.Schema,s.YAMLError=o.YAMLError,s.YAMLParseError=o.YAMLParseError,s.YAMLWarning=o.YAMLWarning,s.Alias=a.Alias,s.isAlias=l.isAlias,s.isCollection=l.isCollection,s.isDocument=l.isDocument,s.isMap=l.isMap,s.isNode=l.isNode,s.isPair=l.isPair,s.isScalar=l.isScalar,s.isSeq=l.isSeq,s.Pair=c.Pair,s.Scalar=u.Scalar,s.YAMLMap=f.YAMLMap,s.YAMLSeq=h.YAMLSeq,s.CST=d,s.Lexer=p.Lexer,s.LineCounter=m.LineCounter,s.Parser=g.Parser,s.parse=y.parse,s.parseAllDocuments=y.parseAllDocuments,s.parseDocument=y.parseDocument,s.stringify=y.stringify,s.visit=b.visit,s.visitAsync=b.visitAsync},22367,e=>{"use strict";e.i(74533);e.i(60526),e.i(66680);var t=e.i(2157),s=e.i(50227),r=e.i(38441);e.i(52306);e.i(57764),e.i(23008),e.i(28898);r.HOOK_SCOPES,r.CLAUDE_INSTALL_EVENT_TYPES,r.CODEX_HOOK_SCOPES,r.CODEX_HOOK_EVENT_TYPES,r.COPILOT_HOOK_SCOPES,r.COPILOT_HOOK_EVENT_TYPES,r.CURSOR_HOOK_SCOPES,r.CURSOR_HOOK_EVENT_TYPES;r.OPENCODE_HOOK_SCOPES,r.OPENCODE_HOOK_EVENT_TYPES,r.PI_HOOK_SCOPES,r.PI_HOOK_EVENT_TYPES,r.HERMES_HOOK_SCOPES,r.HERMES_HOOK_EVENT_TYPES;r.OPENCLAW_HOOK_SCOPES,r.OPENCLAW_HOOK_EVENT_TYPES,r.FACTORY_HOOK_SCOPES,r.FACTORY_HOOK_EVENT_TYPES,r.DEVIN_HOOK_SCOPES,r.DEVIN_HOOK_EVENT_TYPES;r.ANTIGRAVITY_HOOK_SCOPES,r.ANTIGRAVITY_HOOK_EVENT_TYPES,r.GOOSE_HOOK_SCOPES,r.GOOSE_HOOK_EVENT_TYPES;var i=e.i(71194);e.i(90521),e.i(1457);Symbol("failproofai.back"),Object.values({on:"✓ ON",off:"· OFF",mixed:"◐ MIXED",locked:"✓ LOCK",cloud:"✓ CLOUD",pack:"✓ PACK",failed:"▲ FAIL",observe:"◉ OBS"}).map(e=>e.length),i.PACK_MANIFEST_ASSET,i.PACK_ENTRY_ASSET,i.PACK_CHECKSUMS_ASSET,process.env.FAILPROOFAI_GITHUB_API,process.env.FAILPROOFAI_GITHUB_UPLOADS,process.env.FAILPROOFAI_GITHUB_GIT,e.s(["parseReleaseBody",0,function(e){let t="string"==typeof e?e:"",s={},r=/(\d+)\s+policies,\s*(\d+)\s+on by default/.exec(t);r&&(s.policies=Number(r[1]),s.defaultOn=Number(r[2]));let i=/(?:^|\n)\s*commit\s+([0-9a-f]{7,40})\b/i.exec(t);return i&&(s.commit=i[1].toLowerCase()),s}],22367)}];
|
|
26
|
+
|
|
27
|
+
//# sourceMappingURL=_09dz7xv._.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[20855,e=>{"use strict";var t=e.i(89171),a=e.i(17707);async function r(){let e=(0,a.readAuth)();return e?t.NextResponse.json({authenticated:!0,user:{id:e.user.id,email:e.user.email}},{status:200}):t.NextResponse.json({authenticated:!1},{status:200})}e.s(["GET",0,r,"dynamic",0,"force-dynamic"])},96889,e=>{"use strict";var t=e.i(47909),a=e.i(74017),r=e.i(96250),n=e.i(59756),s=e.i(61916),i=e.i(74677),o=e.i(69741),l=e.i(16795),u=e.i(87718),d=e.i(95169),c=e.i(47587),p=e.i(66012),h=e.i(70101),R=e.i(26937),v=e.i(10372),m=e.i(93695);e.i(52474);var g=e.i(220);let f=new t.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/auth/status/route",pathname:"/api/auth/status",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/auth/status/route.ts",nextConfigOutput:"standalone",userland:()=>e.r(20855),...{}}),{workAsyncStorage:E,workUnitAsyncStorage:C,serverHooks:w}=f;async function x(e,t,r){r.requestMeta&&(0,n.setRequestMeta)(e,r.requestMeta),f.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let E="/api/auth/status/route";E=E.replace(/\/index$/,"")||"/";let C=await f.prepare(e,t,{srcPage:E,multiZoneDraftMode:!1});if(!C)return t.statusCode=400,t.end("Bad Request"),null==r.waitUntil||r.waitUntil.call(r,Promise.resolve()),null;let{buildId:w,deploymentId:x,params:_,nextConfig:A,parsedUrl:y,isDraftMode:T,prerenderManifest:P,routerServerContext:N,isOnDemandRevalidate:S,revalidateOnlyGenerated:b,resolvedPathname:O,clientReferenceManifest:q,serverActionsManifest:H}=C,I=(0,o.normalizeAppPath)(E),M=!!(P.dynamicRoutes[I]||P.routes[O]),k=async()=>((null==N?void 0:N.render404)?await N.render404(e,t,y,!1):t.end("This page could not be found"),null);if(M&&!T){let e=!!P.routes[O],t=P.dynamicRoutes[I];if(t&&!1===t.fallback&&!e){if(A.adapterPath)return await k();throw new m.NoFallbackError}}let U=null;!M||f.isDev||T||(U="/index"===(U=O)?"/":U);let D=!0===f.isDev||!M,j=M&&!D;H&&q&&(0,i.setManifestsSingleton)({page:E,clientReferenceManifest:q,serverActionsManifest:H});let F=e.method||"GET",K=(0,s.getTracer)(),L=K.getActiveScopeSpan(),$=!!(null==N?void 0:N.isWrappedByNextServer),B=!!(0,n.getRequestMeta)(e,"minimalMode"),G=(0,n.getRequestMeta)(e,"incrementalCache")||await f.getIncrementalCache(e,A,P,B);null==G||G.resetRequestCache(),globalThis.__incrementalCache=G;let V={params:_,previewProps:P.preview,renderOpts:{experimental:{authInterrupts:!!A.experimental.authInterrupts,useCacheTimeout:A.experimental.useCacheTimeout},cacheComponents:!!A.cacheComponents,validationLevel:A.experimental.instantInsights.validationLevel,supportsDynamicResponse:D,incrementalCache:G,hmrRefreshHash:(0,n.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:A.cacheLife,staticPageGenerationTimeout:A.staticPageGenerationTimeout,waitUntil:r.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,a,r,n)=>f.onRequestError(e,t,r,n,N)},sharedContext:{buildId:w,deploymentId:x}},X=new l.NodeNextRequest(e),W=new l.NodeNextResponse(t),z=u.NextRequestAdapter.fromNodeNextRequest(X,(0,u.signalFromNodeResponse)(t)),Z=async({previousCacheEntry:a})=>{try{if(!B&&S&&b&&!a)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let n=await f.handle(z,V);e.fetchMetrics=V.renderOpts.fetchMetrics;let s=V.renderOpts.pendingWaitUntil;s&&r.waitUntil&&(r.waitUntil(s),s=void 0);let i=V.renderOpts.collectedTags;if(!M)return await (0,p.sendResponse)(X,W,n,s),null;{let e=await n.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(n.headers);i&&(t[v.NEXT_CACHE_TAGS_HEADER]=i),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let a=void 0!==V.renderOpts.collectedRevalidate&&!(V.renderOpts.collectedRevalidate>=v.INFINITE_CACHE)&&V.renderOpts.collectedRevalidate,r=void 0===V.renderOpts.collectedExpire||V.renderOpts.collectedExpire>=v.INFINITE_CACHE?!1!==a&&a>0?A.expireTime:void 0:V.renderOpts.collectedExpire;return{value:{kind:g.CachedRouteKind.APP_ROUTE,status:n.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:a,expire:r}}}}catch(t){throw(null==a?void 0:a.isStale)&&await f.onRequestError(e,t,{routerKind:"App Router",routePath:E,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:j,isOnDemandRevalidate:S})},!1,N),t}},J=async(n,i)=>{try{var o,l;let n=await f.handleResponse({req:e,nextConfig:A,cacheKey:U,routeKind:a.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:P,isRoutePPREnabled:!1,isOnDemandRevalidate:S,revalidateOnlyGenerated:b,responseGenerator:Z,waitUntil:r.waitUntil,isMinimalMode:B});if(!M)return;if((null==n||null==(o=n.value)?void 0:o.kind)!==g.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==n||null==(l=n.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});B||t.setHeader("x-nextjs-cache",S?"REVALIDATED":n.isMiss?"MISS":n.isStale?"STALE":"HIT"),T&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let s=(0,h.fromNodeOutgoingHttpHeaders)(n.value.headers);B&&M||s.delete(v.NEXT_CACHE_TAGS_HEADER),!n.cacheControl||t.getHeader("Cache-Control")||s.get("Cache-Control")||s.set("Cache-Control",(0,R.getCacheControlHeader)(n.cacheControl)),await (0,p.sendResponse)(X,W,new Response(n.value.body,{headers:s,status:n.value.status||200}));return}catch(t){if(t instanceof m.NoFallbackError||await f.onRequestError(e,t,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:j,isOnDemandRevalidate:S})},!1,N),M)throw t;await (0,p.sendResponse)(X,W,new Response(null,{status:500}));return}finally{(()=>{if(!n)return;let e=t.statusCode;n.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(n.setStatus({code:s.SpanStatusCode.ERROR}),n.setAttribute("error.type",e.toString()));let a=K.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==d.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let r=a.get("next.route")||I,o=`${F} ${r}`;n.setAttributes({"next.route":r,"http.route":r,"next.span_name":o}),n.updateName(o),i&&i!==n&&(i.setAttribute("http.route",r),i.updateName(o))})()}};if($&&L)await J(L,void 0);else{let t=K.getActiveScopeSpan();await K.withPropagatedContext(e.headers,()=>K.trace(d.BaseServerSpan.handleRequest,{spanName:`${F} ${E}`,kind:s.SpanKind.SERVER,attributes:{"http.method":F,"http.target":e.url}},e=>J(e,t)),void 0,!$)}}e.s(["handler",0,x,"patchFetch",0,function(){return(0,r.patchFetch)({workAsyncStorage:E,workUnitAsyncStorage:C})},"routeModule",0,f,"serverHooks",0,w,"workAsyncStorage",0,E,"workUnitAsyncStorage",0,C])},78081,e=>{e.v(t=>Promise.all(["server/chunks/[externals]__0qxhecv._.js","server/chunks/node_modules_posthog-node_dist_entrypoints_index_node_mjs_01r25oi._.js"].map(t=>e.l(t))).then(()=>t(39702)))}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=_0bs-v8p._.js.map
|