sliccy 2.22.2 → 2.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/node-server/index.js +136 -18
- package/dist/node-server/release-package.d.ts +0 -1
- package/dist/node-server/release-package.js +1 -8
- package/dist/ui/assets/{anthropic-CePl-niV.js → anthropic-DzA7ID1f.js} +4 -4
- package/dist/ui/assets/azure-openai-responses-L-g8xGN9.js +1 -0
- package/dist/ui/assets/{dist-DEU7LMsW.js → dist-BETSJsV5.js} +1 -1
- package/dist/ui/assets/{dist-DY89ppnG.js → dist-BVxswsnA.js} +2 -2
- package/dist/ui/assets/{dist-Bsu1jCSL.js → dist-C_pwrhfY.js} +1 -1
- package/dist/ui/assets/{dist-UfV1NDbo.js → dist-Ck3Vla0r.js} +1 -1
- package/dist/ui/assets/{dist-DfXP7YfQ.js → dist-DB19jrs9.js} +1 -1
- package/dist/ui/assets/{es-Ctukg7Pf.js → es-ANbLTHCW.js} +1 -1
- package/dist/ui/assets/{fs-C0vsW7YS.js → fs-B0gD1h31.js} +1 -1
- package/dist/ui/assets/google-BFrczX47.js +1 -0
- package/dist/ui/assets/google-shared-tCK79d6s.js +11 -0
- package/dist/ui/assets/google-vertex-DVupsUV0.js +1 -0
- package/dist/ui/assets/{index-n7dM8Ny6.js → index-BVA4YIGJ.js} +1020 -940
- package/dist/ui/assets/{magick-wasm-CNSmo9gu.js → magick-wasm-DpuDwl7G.js} +1 -1
- package/dist/ui/assets/{mistral-DPFFr-1D.js → mistral-BytTBgnp.js} +4 -4
- package/dist/ui/assets/{onboarding-orchestrator-DX-WA9oh.js → onboarding-orchestrator-De86ExKz.js} +1 -1
- package/dist/ui/assets/openai-codex-responses-DpZthon5.js +7 -0
- package/dist/ui/assets/openai-completions-C9gJOWvK.js +5 -0
- package/dist/ui/assets/openai-responses-De-ZNw7W.js +1 -0
- package/dist/ui/assets/provider-settings-ciu6URbL.js +95 -0
- package/dist/ui/assets/simple-options-CDIijiMb.js +1 -0
- package/dist/ui/assets/{skills-Cp2_zExC.js → skills-DShRVTVQ.js} +1 -1
- package/dist/ui/assets/{slicc-editor-Bv8eZLtW.js → slicc-editor-C9a_yd9R.js} +2 -2
- package/dist/ui/index.html +16 -13
- package/dist/ui/llm-proxy-sw.js +1 -0
- package/dist/ui/packages/webapp/index.html +16 -13
- package/package.json +4 -3
- package/dist/node-server/sync-release-version.d.ts +0 -4
- package/dist/node-server/sync-release-version.js +0 -44
- package/dist/ui/assets/azure-openai-responses-B0ars-Hm.js +0 -1
- package/dist/ui/assets/google-CgTHsA2_.js +0 -1
- package/dist/ui/assets/google-shared-nj0IYXjb.js +0 -11
- package/dist/ui/assets/google-vertex-cqyT1zM2.js +0 -1
- package/dist/ui/assets/openai-codex-responses-DjTLNv18.js +0 -7
- package/dist/ui/assets/openai-completions-BnCyVXK7.js +0 -5
- package/dist/ui/assets/openai-responses-9MflKa27.js +0 -1
- package/dist/ui/assets/openai-responses-shared-D8Vix6-m.js +0 -10
- package/dist/ui/assets/provider-settings-DY_N8CBx.js +0 -95
- package/dist/ui/assets/sanitize-unicode-BD2XKRoV.js +0 -1
- package/dist/ui/assets/simple-options-CRMUB9za.js +0 -1
- /package/dist/ui/assets/{addon-fit-_YHcqy0h.js → addon-fit-CniRnSyE.js} +0 -0
- /package/dist/ui/assets/{browser-Cl7Q1LkV.js → browser-CFDl2kC3.js} +0 -0
- /package/dist/ui/assets/{bsh-watchdog-5FY6DxLX.js → bsh-watchdog-DWN1spIr.js} +0 -0
- /package/dist/ui/assets/{chat-fixture-Dp2mIM1B.js → chat-fixture-BGLmPevX.js} +0 -0
- /package/dist/ui/assets/{db-CDfQGWkv.js → db-QbwB670D.js} +0 -0
- /package/dist/ui/assets/{dist-BByiYVMV.js → dist-CkF25Z3T.js} +0 -0
- /package/dist/ui/assets/{dist-D6ztLqPA.js → dist-uJp2dR6X.js} +0 -0
- /package/dist/ui/assets/{fetch-body-DJGM6_Jl.js → fetch-body-DPMYsjzA.js} +0 -0
- /package/dist/ui/assets/{github-copilot-headers-B6Fvsk-Y.js → github-copilot-headers-DGaOrqaW.js} +0 -0
- /package/dist/ui/assets/{global-db-D767Oa4m.js → global-db-Cui6Md0w.js} +0 -0
- /package/dist/ui/assets/{hash-Dit8ENAX.js → hash-BN8UQrrC.js} +0 -0
- /package/dist/ui/assets/{headers-DkHU-pcw.js → headers-qDMOQQGF.js} +0 -0
- /package/dist/ui/assets/{lick-manager-proxy-DYlDsj9K.js → lick-manager-proxy-Dw3D3AzG.js} +0 -0
- /package/dist/ui/assets/{oauth-service-CKR4S63v.js → oauth-service-DUXASG7L.js} +0 -0
- /package/dist/ui/assets/{offscreen-client-BM0UHxmA.js → offscreen-client-DRN1fwvT.js} +0 -0
- /package/dist/ui/assets/{openai-CQsomflW.js → openai-D4NSaQIs.js} +0 -0
- /package/dist/ui/assets/{path-utils-CNNVZ3-O.js → path-utils-DAY6ORUp.js} +0 -0
- /package/dist/ui/assets/{pdfjs-BGlny-4w.js → pdfjs-C0bwNEC1.js} +0 -0
- /package/dist/ui/assets/{pyodide-B0OcGzKl.js → pyodide-DCMrvZhT.js} +0 -0
- /package/dist/ui/assets/{rum-C22a_afY.js → rum-sVedwbc1.js} +0 -0
- /package/dist/ui/assets/{secret-masking-D8cHWx2y.js → secret-masking-ZNVanUmG.js} +0 -0
- /package/dist/ui/assets/{sql-wasm-BaMgQAJZ.js → sql-wasm-GAMLdFdJ.js} +0 -0
- /package/dist/ui/assets/{src-Bd0ucr8W.js → src-DSYf97Eh.js} +0 -0
- /package/dist/ui/assets/{xterm-GX0WTpdZ.js → xterm-BaLOnk9X.js} +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{r as e}from"./chunk-jRWAZmH_.js";import"./fs-
|
|
1
|
+
import{r as e}from"./chunk-jRWAZmH_.js";import"./fs-B0gD1h31.js";import{t}from"./browser-CFDl2kC3.js";import{r as n,t as r}from"./path-utils-DAY6ORUp.js";var i=`skills`,a=`.skill`,o=50*1024*1024,s=1e3,c=`/workspace/skills`,l=`SKILL.md`,u=/^[A-Za-z0-9][A-Za-z0-9._-]*$/;function d(e){if(e===`__MACOSX`||e.startsWith(`__MACOSX/`))return!0;let t=e.includes(`/`)?e.slice(e.lastIndexOf(`/`)+1):e;return!!(t===`.DS_Store`||t===`Thumbs.db`||t===`desktop.ini`||t.startsWith(`._`))}var f=class extends Error{};function p(e){let t=e.replace(/\\/g,`/`);if(!t||t.endsWith(`/`))return null;if(t.startsWith(`/`)||/^[A-Za-z]:\//.test(t))throw Error(`Blocked suspicious path "${e}".`);let n=t.split(`/`);if(n.some(e=>e===``||e===`.`||e===`..`))throw Error(`Blocked suspicious path "${e}".`);return n.join(`/`)}function m(e){if(!u.test(e))throw Error(`Invalid skill: skill name "${e}" must be a simple directory name.`)}function h(e){let t=[];for(let[n,r]of Object.entries(e)){let e=p(n);e&&(d(e)||t.push({originalPath:n,path:e,bytes:r}))}return t}function g(e){let t=e.filter(e=>e.path===`SKILL.md`||e.path.endsWith(`/SKILL.md`));if(t.length===0)throw Error(`Skill archive is missing ${l}.`);if(t.length>1)throw Error(`Skill archive contains multiple ${l} files.`);return t[0]}function _(e){let n=0,r=0;return t(e,{filter(e){if(n++,n>1e3)throw new f(`Skill archives may contain at most ${s} entries.`);if(r+=e.originalSize,r>52428800)throw new f(`Skill archives must expand to 50 MB or smaller after extraction.`);return!0}})}function v(e){return r(c,`.${e}.tmp-${`${Date.now()}-${Math.random().toString(16).slice(2,8)}`}`)}function y(e,t){return t===`SKILL.md`?e.replace(/\.skill$/i,``):t.slice(0,-9).split(`/`).pop()??``}async function b(e,t){if(!t.name.toLowerCase().endsWith(`.skill`))throw Error(`Only ${a} archives can be installed with drag and drop.`);if(t.size>52428800)throw Error(`Skill archives must be 50 MB or smaller.`);let i;try{i=_(new Uint8Array(await t.arrayBuffer()))}catch(e){if(e instanceof f)throw e;let t=e instanceof Error?e.message:String(e);throw Error(`Invalid .skill archive: ${t}`)}let o=h(i),s=g(o),u=y(t.name,s.path);m(u);let d=r(c,u);if(await e.exists(d))throw Error(`Skill "${u}" already exists at ${d}.`);let p=v(u),b=s.path===`SKILL.md`?``:s.path.slice(0,-(l.length+1));await e.mkdir(p,{recursive:!0});try{let t=0;for(let i of o){if(b&&(i.path===b||!i.path.startsWith(`${b}/`)))continue;let a=b?i.path.slice(b.length+1):i.path;if(!a)continue;let o=r(p,a),{dir:s}=n(o);s!==`/`&&await e.mkdir(s,{recursive:!0}),await e.writeFile(o,i.bytes),t++}return await e.rename(p,d),{skillName:u,destinationPath:d,fileCount:t}}catch(t){throw await e.exists(p)&&await e.rm(p,{recursive:!0}),t}}var x=[`native`,`agents`,`claude`],S=new Map([[`.agents`,`agents`],[`.claude`,`claude`]]),C=new Set([`.git`,`.slicc`]),w=[`mkdir`,`mount`,`rename`,`rm`,`unmount`,`writeFile`],T=new WeakMap,E=new WeakSet;async function D(e,t=c){let n=await A(e,t),r=await O(e);return[...x.flatMap(e=>(e===`native`?n:r.filter(t=>t.source===e)).sort((e,t)=>e.path.localeCompare(t.path)))]}async function O(e){M(e);let t=e,n=T.get(t);if(n)return n.map(e=>({...e}));let r=await j(e);return T.set(t,r),r.map(e=>({...e}))}function k(e,t){let n=new Map,r=new Map;for(let i of e){let e=t(i);if(!n.has(e)){n.set(e,i);continue}let a=r.get(e)??{name:e,winner:n.get(e),shadowed:[]};a.shadowed.push(i),r.set(e,a)}return{winners:Array.from(n.values()),collisions:Array.from(r.values())}}async function A(e,t){let n=await P(e,t),r=[];for(let i of n){if(i.type!==`directory`)continue;let n=`${t}/${i.name}`,a=`${n}/${l}`;await N(e,a)&&r.push({source:`native`,sourceRoot:t,path:n,skillFilePath:a})}return r}async function j(e){let t=[],n=new Set,r=[`/`];for(let i=0;i<r.length;i+=1){let a=r[i],o=await P(e,a);for(let i of o){if(i.type!==`directory`)continue;let o=a===`/`?`/${i.name}`:`${a}/${i.name}`,s=S.get(i.name);if(s){let r=`${o}/skills`,i=await P(e,r);for(let a of i){if(a.type!==`directory`)continue;let i=`${r}/${a.name}`,o=`${i}/${l}`;!await N(e,o)||n.has(i)||(n.add(i),t.push({source:s,sourceRoot:r,path:i,skillFilePath:o}))}}C.has(i.name)||r.push(o)}}return t}function M(e){let t=e;if(E.has(t))return;E.add(t);let n=e;for(let r of w){let i=n[r];if(typeof i!=`function`)continue;let a=i;try{n[r]=async(...n)=>{let r=await a.apply(e,n);return T.delete(t),r}}catch{}}}async function N(e,t){try{return await e.stat(t),!0}catch{return!1}}async function P(e,t){try{return[...await e.readDir(t)].sort((e,t)=>e.name.localeCompare(t.name))}catch{return[]}}async function F(e,t=`/workspace/skills`){let n=await D(e,t),r=[];for(let t of n){let n=t.path.split(`/`).pop()??t.path,i=``;if(t.skillFilePath)try{i=R(await e.readTextFile(t.skillFilePath))??``}catch{}r.push({name:n,source:t.source,sourceRoot:t.sourceRoot,path:t.path,skillFilePath:t.skillFilePath,description:i})}let{winners:i,collisions:a}=k(r,e=>e.name),o=new Map(a.map(e=>[e.winner.path,e.shadowed.map(e=>e.path)]));return i.map(e=>({...e,shadowedPaths:o.get(e.path)}))}async function I(e,t,n=`/workspace/skills`){return(await F(e,n)).find(e=>e.name===t)||null}async function L(e,t,n=`/workspace/skills`){let r=await I(e,t,n);if(!r?.skillFilePath)return null;try{return await e.readTextFile(r.skillFilePath)}catch{return null}}function R(e){let t=e.replace(/^\uFEFF/,``).replace(/\r\n?/g,`
|
|
2
2
|
`).trimStart().match(/^---\s*\n([\s\S]*?)\n---/);if(!t)return null;for(let e of t[1].split(`
|
|
3
3
|
`)){let t=e.match(/^description:\s*(.*)$/);if(t)return t[1].trim()}return null}var z=e({MAX_SKILL_ARCHIVE_SIZE_BYTES:()=>o,SKILLS_DIR:()=>i,SKILL_ARCHIVE_EXTENSION:()=>a,SKILL_FILE:()=>l,WORKSPACE_SKILLS_PATH:()=>c,discoverSkillCandidates:()=>D,discoverSkills:()=>F,getSkillInfo:()=>I,installSkillFromDrop:()=>b,readSkillInstructions:()=>L,resolveSkillNameCollisions:()=>k});export{a as i,F as n,b as r,z as t};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dist-
|
|
2
|
-
import{t as e}from"./preload-helper-ca-nBW7U.js";import{$ as t,A as n,B as r,D as i,E as a,F as o,H as s,I as c,J as l,L as u,N as d,P as f,Q as p,R as m,S as ee,U as te,V as h,X as g,Y as ne,Z as re,at as _,c as ie,d as ae,j as oe,k as se,n as ce,nt as v,q as y,t as le,v as b,w as x,x as S,y as C,z as ue}from"./dist-D6ztLqPA.js";var de=e=>{let{state:t}=e,n=t.doc.lineAt(t.selection.main.from),r=T(e.state,n.from);return r.line?fe(e):r.block?me(e):!1};function w(e,t){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=e(t,n);return i?(r(n.update(i)),!0):!1}}var fe=w(ve,0),pe=w(_e,0),me=w((e,t)=>_e(e,t,ge(t)),0);function T(e,t){let n=e.languageDataAt(`commentTokens`,t,1);return n.length?n[0]:{}}var E=50;function he(e,{open:t,close:n},r,i){let a=e.sliceDoc(r-E,r),o=e.sliceDoc(i,i+E),s=/\s*$/.exec(a)[0].length,c=/^\s*/.exec(o)[0].length,l=a.length-s;if(a.slice(l-t.length,l)==t&&o.slice(c,c+n.length)==n)return{open:{pos:r-s,margin:s&&1},close:{pos:i+c,margin:c&&1}};let u,d;i-r<=2*E?u=d=e.sliceDoc(r,i):(u=e.sliceDoc(r,r+E),d=e.sliceDoc(i-E,i));let f=/^\s*/.exec(u)[0].length,p=/\s*$/.exec(d)[0].length,m=d.length-p-n.length;return u.slice(f,f+t.length)==t&&d.slice(m,m+n.length)==n?{open:{pos:r+f+t.length,margin:+!!/\s/.test(u.charAt(f+t.length))},close:{pos:i-p-n.length,margin:+!!/\s/.test(d.charAt(m-1))}}:null}function ge(e){let t=[];for(let n of e.selection.ranges){let r=e.doc.lineAt(n.from),i=n.to<=r.to?r:e.doc.lineAt(n.to);i.from>r.from&&i.from==n.to&&(i=n.to==r.to+1?r:e.doc.lineAt(n.to-1));let a=t.length-1;a>=0&&t[a].to>r.from?t[a].to=i.to:t.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return t}function _e(e,t,n=t.selection.ranges){let r=n.map(e=>T(t,e.from).block);if(!r.every(e=>e))return null;let i=n.map((e,n)=>he(t,r[n],e.from,e.to));if(e!=2&&!i.every(e=>e))return{changes:t.changes(n.map((e,t)=>i[t]?[]:[{from:e.from,insert:r[t].open+` `},{from:e.to,insert:` `+r[t].close}]))};if(e!=1&&i.some(e=>e)){let e=[];for(let t=0,n;t<i.length;t++)if(n=i[t]){let i=r[t],{open:a,close:o}=n;e.push({from:a.pos-i.open.length,to:a.pos+a.margin},{from:o.pos-o.margin,to:o.pos+i.close.length})}return{changes:e}}return null}function ve(e,t,n=t.selection.ranges){let r=[],i=-1;ranges:for(let{from:e,to:a}of n){let n=r.length,o=1e9,s;for(let n=e;n<=a;){let c=t.doc.lineAt(n);if(s==null&&(s=T(t,c.from).line,!s))continue ranges;if(c.from>i&&(e==a||a>c.from)){i=c.from;let e=/^\s*/.exec(c.text)[0].length,t=e==c.length,n=c.text.slice(e,e+s.length)==s?e:-1;e<c.text.length&&e<o&&(o=e),r.push({line:c,comment:n,token:s,indent:e,empty:t,single:!1})}n=c.to+1}if(o<1e9)for(let e=n;e<r.length;e++)r[e].indent<r[e].line.text.length&&(r[e].indent=o);r.length==n+1&&(r[n].single=!0)}if(e!=2&&r.some(e=>e.comment<0&&(!e.empty||e.single))){let e=[];for(let{line:t,token:n,indent:i,empty:a,single:o}of r)(o||!a)&&e.push({from:t.from+i,insert:n+` `});let n=t.changes(e);return{changes:n,selection:t.selection.map(n,1)}}else if(e!=1&&r.some(e=>e.comment>=0)){let e=[];for(let{line:t,comment:n,token:i}of r)if(n>=0){let r=t.from+n,a=r+i.length;t.text[a-t.from]==` `&&a++,e.push({from:r,to:a})}return{changes:e}}return null}var D=u.define(),ye=u.define(),be=te.define(),xe=te.define({combine(e){return re(e,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(n,r)=>e(n,r)||t(n,r)})}}),Se=l.define({create(){return P.empty},update(e,t){let n=t.state.facet(xe),r=t.annotation(D);if(r){let i=A.fromTransaction(t,r.selection),a=r.side,o=a==0?e.undone:e.done;return o=i?j(o,o.length,n.minDepth,i):je(o,t.startState.selection),new P(a==0?r.rest:o,a==0?o:r.rest)}let i=t.annotation(ye);if((i==`full`||i==`before`)&&(e=e.isolate()),t.annotation(g.addToHistory)===!1)return t.changes.empty?e:e.addMapping(t.changes.desc);let a=A.fromTransaction(t),o=t.annotation(g.time),s=t.annotation(g.userEvent);return a?e=e.addChanges(a,o,s,n,t):t.selection&&(e=e.addSelection(t.startState.selection,o,s,n.newGroupDelay)),(i==`full`||i==`after`)&&(e=e.isolate()),e},toJSON(e){return{done:e.done.map(e=>e.toJSON()),undone:e.undone.map(e=>e.toJSON())}},fromJSON(e){return new P(e.done.map(A.fromJSON),e.undone.map(A.fromJSON))}});function Ce(e={}){return[Se,xe.of(e),n.domEventHandlers({beforeinput(e,t){let n=e.inputType==`historyUndo`?we:e.inputType==`historyRedo`?k:null;return n?(e.preventDefault(),n(t)):!1}})]}function O(e,t){return function({state:n,dispatch:r}){if(!t&&n.readOnly)return!1;let i=n.field(Se,!1);if(!i)return!1;let a=i.pop(e,n,t);return a?(r(a),!0):!1}}var we=O(0,!1),k=O(1,!1),Te=O(0,!0),Ee=O(1,!0),A=class e{constructor(e,t,n,r,i){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=r,this.selectionsAfter=i}setSelAfter(t){return new e(this.changes,this.effects,this.mapped,this.startSelection,t)}toJSON(){return{changes:this.changes?.toJSON(),mapped:this.mapped?.toJSON(),startSelection:this.startSelection?.toJSON(),selectionsAfter:this.selectionsAfter.map(e=>e.toJSON())}}static fromJSON(t){return new e(t.changes&&ue.fromJSON(t.changes),[],t.mapped&&m.fromJSON(t.mapped),t.startSelection&&h.fromJSON(t.startSelection),t.selectionsAfter.map(h.fromJSON))}static fromTransaction(t,n){let r=M;for(let e of t.startState.facet(be)){let n=e(t);n.length&&(r=r.concat(n))}return!r.length&&t.changes.empty?null:new e(t.changes.invert(t.startState.doc),r,void 0,n||t.startState.selection,M)}static selection(t){return new e(void 0,M,void 0,void 0,t)}};function j(e,t,n,r){let i=t+1>n+20?t-n-1:0,a=e.slice(i,t);return a.push(r),a}function De(e,t){let n=[],r=!1;return e.iterChangedRanges((e,t)=>n.push(e,t)),t.iterChangedRanges((e,t,i,a)=>{for(let e=0;e<n.length;){let t=n[e++],o=n[e++];a>=t&&i<=o&&(r=!0)}}),r}function Oe(e,t){return e.ranges.length==t.ranges.length&&e.ranges.filter((e,n)=>e.empty!=t.ranges[n].empty).length===0}function ke(e,t){return e.length?t.length?e.concat(t):e:t}var M=[],Ae=200;function je(e,t){if(e.length){let n=e[e.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-Ae));return r.length&&r[r.length-1].eq(t)?e:(r.push(t),j(e,e.length-1,1e9,n.setSelAfter(r)))}else return[A.selection([t])]}function Me(e){let t=e[e.length-1],n=e.slice();return n[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),n}function N(e,t){if(!e.length)return e;let n=e.length,r=M;for(;n;){let i=Ne(e[n-1],t,r);if(i.changes&&!i.changes.empty||i.effects.length){let t=e.slice(0,n);return t[n-1]=i,t}else t=i.mapped,n--,r=i.selectionsAfter}return r.length?[A.selection(r)]:M}function Ne(e,t,n){let r=ke(e.selectionsAfter.length?e.selectionsAfter.map(e=>e.map(t)):M,n);if(!e.changes)return A.selection(r);let i=e.changes.map(t),a=t.mapDesc(e.changes,!0),o=e.mapped?e.mapped.composeDesc(a):a;return new A(i,y.mapEffects(e.effects,t),o,e.startSelection.map(a),r)}var Pe=/^(input\.type|delete)($|\.)/,P=class e{constructor(e,t,n=0,r=void 0){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=r}isolate(){return this.prevTime?new e(this.done,this.undone):this}addChanges(t,n,r,i,a){let o=this.done,s=o[o.length-1];return o=s&&s.changes&&!s.changes.empty&&t.changes&&(!r||Pe.test(r))&&(!s.selectionsAfter.length&&n-this.prevTime<i.newGroupDelay&&i.joinToEvent(a,De(s.changes,t.changes))||r==`input.type.compose`)?j(o,o.length-1,i.minDepth,new A(t.changes.compose(s.changes),ke(y.mapEffects(t.effects,s.changes),s.effects),s.mapped,s.startSelection,M)):j(o,o.length,i.minDepth,t),new e(o,M,n,r)}addSelection(t,n,r,i){let a=this.done.length?this.done[this.done.length-1].selectionsAfter:M;return a.length>0&&n-this.prevTime<i&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&Oe(a[a.length-1],t)?this:new e(je(this.done,t),this.undone,n,r)}addMapping(t){return new e(N(this.done,t),N(this.undone,t),this.prevTime,this.prevUserEvent)}pop(e,t,n){let r=e==0?this.done:this.undone;if(r.length==0)return null;let i=r[r.length-1],a=i.selectionsAfter[0]||(i.startSelection?i.startSelection.map(i.changes.invertedDesc,1):t.selection);if(n&&i.selectionsAfter.length)return t.update({selection:i.selectionsAfter[i.selectionsAfter.length-1],annotations:D.of({side:e,rest:Me(r),selection:a}),userEvent:e==0?`select.undo`:`select.redo`,scrollIntoView:!0});if(i.changes){let n=r.length==1?M:r.slice(0,r.length-1);return i.mapped&&(n=N(n,i.mapped)),t.update({changes:i.changes,selection:i.startSelection,effects:i.effects,annotations:D.of({side:e,rest:n,selection:a}),filter:!1,userEvent:e==0?`undo`:`redo`,scrollIntoView:!0})}else return null}};P.empty=new P(M,M);var Fe=[{key:`Mod-z`,run:we,preventDefault:!0},{key:`Mod-y`,mac:`Mod-Shift-z`,run:k,preventDefault:!0},{linux:`Ctrl-Shift-z`,run:k,preventDefault:!0},{key:`Mod-u`,run:Te,preventDefault:!0},{key:`Alt-u`,mac:`Mod-Shift-u`,run:Ee,preventDefault:!0}];function F(e,t){return h.create(e.ranges.map(t),e.mainIndex)}function I(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:`select`})}function L({state:e,dispatch:t},n){let r=F(e.selection,n);return r.eq(e.selection,!0)?!1:(t(I(e,r)),!0)}function R(e,t){return h.cursor(t?e.to:e.from)}function Ie(e,t){return L(e,n=>n.empty?e.moveByChar(n,t):R(n,t))}function z(e){return e.textDirectionAt(e.state.selection.main.head)==se.LTR}var B=e=>Ie(e,!z(e)),V=e=>Ie(e,z(e));function H(e,t){return L(e,n=>n.empty?e.moveByGroup(n,t):R(n,t))}var Le=e=>H(e,!z(e)),Re=e=>H(e,z(e));typeof Intl<`u`&&Intl.Segmenter;function ze(e,t,n){if(t.type.prop(n))return!0;let r=t.to-t.from;return r&&(r>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function U(e,t,n){let r=i(e).resolveInner(t.head),a=n?_.closedBy:_.openedBy;for(let i=t.head;;){let t=n?r.childAfter(i):r.childBefore(i);if(!t)break;ze(e,t,a)?r=t:i=n?t.to:t.from}let o=r.type.prop(a),s,c;return c=o&&(s=n?x(e,r.from,1):x(e,r.to,-1))&&s.matched?n?s.end.to:s.end.from:n?r.to:r.from,h.cursor(c,n?-1:1)}var Be=e=>L(e,t=>U(e.state,t,!z(e))),Ve=e=>L(e,t=>U(e.state,t,z(e)));function W(e,t){return L(e,n=>{if(!n.empty)return R(n,t);let r=e.moveVertically(n,t);return r.head==n.head?e.moveToLineBoundary(n,t):r})}var He=e=>W(e,!1),Ue=e=>W(e,!0);function We(e){let t=e.scrollDOM.clientHeight<e.scrollDOM.scrollHeight-2,r=0,i=0,a;if(t){for(let t of e.state.facet(n.scrollMargins)){let n=t(e);n?.top&&(r=Math.max(n?.top,r)),n?.bottom&&(i=Math.max(n?.bottom,i))}a=e.scrollDOM.clientHeight-r-i}else a=(e.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:r,marginBottom:i,selfScroll:t,height:Math.max(e.defaultLineHeight,a-5)}}function Ge(e,t){let r=We(e),{state:i}=e,a=F(i.selection,n=>n.empty?e.moveVertically(n,t,r.height):R(n,t));if(a.eq(i.selection))return!1;let o;if(r.selfScroll){let t=e.coordsAtPos(i.selection.main.head),s=e.scrollDOM.getBoundingClientRect(),c=s.top+r.marginTop,l=s.bottom-r.marginBottom;t&&t.top>c&&t.bottom<l&&(o=n.scrollIntoView(a.main.head,{y:`start`,yMargin:t.top-c}))}return e.dispatch(I(i,a),{effects:o}),!0}var Ke=e=>Ge(e,!1),G=e=>Ge(e,!0);function K(e,t,n){let r=e.lineBlockAt(t.head),i=e.moveToLineBoundary(t,n);if(i.head==t.head&&i.head!=(n?r.to:r.from)&&(i=e.moveToLineBoundary(t,n,!1)),!n&&i.head==r.from&&r.length){let n=/^\s*/.exec(e.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;n&&t.head!=r.from+n&&(i=h.cursor(r.from+n))}return i}var qe=e=>L(e,t=>K(e,t,!0)),Je=e=>L(e,t=>K(e,t,!1)),Ye=e=>L(e,t=>K(e,t,!z(e))),Xe=e=>L(e,t=>K(e,t,z(e))),Ze=e=>L(e,t=>h.cursor(e.lineBlockAt(t.head).from,1)),Qe=e=>L(e,t=>h.cursor(e.lineBlockAt(t.head).to,-1));function $e(e,t,n){let r=!1,i=F(e.selection,t=>{let i=x(e,t.head,-1)||x(e,t.head,1)||t.head>0&&x(e,t.head-1,1)||t.head<e.doc.length&&x(e,t.head+1,-1);if(!i||!i.end)return t;r=!0;let a=i.start.from==t.head?i.end.to:i.end.from;return n?h.range(t.anchor,a):h.cursor(a)});return r?(t(I(e,i)),!0):!1}var et=({state:e,dispatch:t})=>$e(e,t,!1);function q(e,t){let n=F(e.state.selection,e=>{let n=t(e);return h.range(e.anchor,n.head,n.goalColumn,n.bidiLevel||void 0,n.assoc)});return n.eq(e.state.selection)?!1:(e.dispatch(I(e.state,n)),!0)}function tt(e,t){return q(e,n=>e.moveByChar(n,t))}var nt=e=>tt(e,!z(e)),rt=e=>tt(e,z(e));function it(e,t){return q(e,n=>e.moveByGroup(n,t))}var at=e=>it(e,!z(e)),ot=e=>it(e,z(e)),st=e=>q(e,t=>U(e.state,t,!z(e))),ct=e=>q(e,t=>U(e.state,t,z(e)));function lt(e,t){return q(e,n=>e.moveVertically(n,t))}var ut=e=>lt(e,!1),dt=e=>lt(e,!0);function ft(e,t){return q(e,n=>e.moveVertically(n,t,We(e).height))}var pt=e=>ft(e,!1),mt=e=>ft(e,!0),ht=e=>q(e,t=>K(e,t,!0)),gt=e=>q(e,t=>K(e,t,!1)),_t=e=>q(e,t=>K(e,t,!z(e))),vt=e=>q(e,t=>K(e,t,z(e))),yt=e=>q(e,t=>h.cursor(e.lineBlockAt(t.head).from)),bt=e=>q(e,t=>h.cursor(e.lineBlockAt(t.head).to)),xt=({state:e,dispatch:t})=>(t(I(e,{anchor:0})),!0),St=({state:e,dispatch:t})=>(t(I(e,{anchor:e.doc.length})),!0),Ct=({state:e,dispatch:t})=>(t(I(e,{anchor:e.selection.main.anchor,head:0})),!0),wt=({state:e,dispatch:t})=>(t(I(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0),Tt=({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:`select`})),!0),Et=({state:e,dispatch:t})=>{let n=Q(e).map(({from:t,to:n})=>h.range(t,Math.min(n+1,e.doc.length)));return t(e.update({selection:h.create(n),userEvent:`select`})),!0},Dt=({state:e,dispatch:t})=>{let n=F(e.selection,t=>{let n=i(e),r=n.resolveStack(t.from,1);if(t.empty){let e=n.resolveStack(t.from,-1);e.node.from>=r.node.from&&e.node.to<=r.node.to&&(r=e)}for(let e=r;e;e=e.next){let{node:n}=e;if((n.from<t.from&&n.to>=t.to||n.to>t.to&&n.from<=t.from)&&e.next)return h.range(n.to,n.from)}return t});return n.eq(e.selection)?!1:(t(I(e,n)),!0)};function Ot(e,t){let{state:n}=e,r=n.selection,i=n.selection.ranges.slice();for(let r of n.selection.ranges){let a=n.doc.lineAt(r.head);if(t?a.to<e.state.doc.length:a.from>0)for(let n=r;;){let r=e.moveVertically(n,t);if(r.head<a.from||r.head>a.to){i.some(e=>e.head==r.head)||i.push(r);break}else if(r.head==n.head)break;else n=r}}return i.length==r.ranges.length?!1:(e.dispatch(I(n,h.create(i,i.length-1))),!0)}var kt=e=>Ot(e,!1),At=e=>Ot(e,!0),jt=({state:e,dispatch:t})=>{let n=e.selection,r=null;return n.ranges.length>1?r=h.create([n.main]):n.main.empty||(r=h.create([h.cursor(n.main.head)])),r?(t(I(e,r)),!0):!1};function J(e,t){if(e.state.readOnly)return!1;let r=`delete.selection`,{state:i}=e,a=i.changeByRange(n=>{let{from:i,to:a}=n;if(i==a){let o=t(n);o<i?(r=`delete.backward`,o=Y(e,o,!1)):o>i&&(r=`delete.forward`,o=Y(e,o,!0)),i=Math.min(i,o),a=Math.max(a,o)}else i=Y(e,i,!1),a=Y(e,a,!0);return i==a?{range:n}:{changes:{from:i,to:a},range:h.cursor(i,i<n.head?-1:1)}});return a.changes.empty?!1:(e.dispatch(i.update(a,{scrollIntoView:!0,userEvent:r,effects:r==`delete.selection`?n.announce.of(i.phrase(`Selection deleted`)):void 0})),!0)}function Y(e,t,r){if(e instanceof n)for(let i of e.state.facet(n.atomicRanges).map(t=>t(e)))i.between(t,t,(e,n)=>{e<t&&n>t&&(t=r?n:e)});return t}var Mt=(e,n,r)=>J(e,i=>{let a=i.from,{state:o}=e,s=o.doc.lineAt(a),c,l;if(r&&!n&&a>s.from&&a<s.from+200&&!/[^ \t]/.test(c=s.text.slice(0,a-s.from))){if(c[c.length-1]==` `)return a-1;let e=p(c,o.tabSize)%b(o)||b(o);for(let t=0;t<e&&c[c.length-1-t]==` `;t++)a--;l=a}else l=t(s.text,a-s.from,n,n)+s.from,l==a&&s.number!=(n?o.doc.lines:1)?l+=n?1:-1:!n&&/[\ufe00-\ufe0f]/.test(s.text.slice(l-s.from,a-s.from))&&(l=t(s.text,l-s.from,!1,!1)+s.from);return l}),X=e=>Mt(e,!1,!0),Nt=e=>Mt(e,!0,!1),Pt=(e,n)=>J(e,r=>{let i=r.head,{state:a}=e,o=a.doc.lineAt(i),s=a.charCategorizer(i);for(let e=null;;){if(i==(n?o.to:o.from)){i==r.head&&o.number!=(n?a.doc.lines:1)&&(i+=n?1:-1);break}let c=t(o.text,i-o.from,n)+o.from,l=o.text.slice(Math.min(i,c)-o.from,Math.max(i,c)-o.from),u=s(l);if(e!=null&&u!=e)break;(l!=` `||i!=r.head)&&(e=u),i=c}return i}),Z=e=>Pt(e,!1),Ft=e=>Pt(e,!0),It=e=>J(e,t=>{let n=e.lineBlockAt(t.head).to;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)}),Lt=e=>J(e,t=>{let n=e.moveToLineBoundary(t,!1).head;return t.head>n?n:Math.max(0,t.head-1)}),Rt=e=>J(e,t=>{let n=e.moveToLineBoundary(t,!0).head;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)}),zt=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(e=>({changes:{from:e.from,to:e.to,insert:ne.of([``,``])},range:h.cursor(e.from)}));return t(e.update(n,{scrollIntoView:!0,userEvent:`input`})),!0},Bt=({state:e,dispatch:n})=>{if(e.readOnly)return!1;let r=e.changeByRange(n=>{if(!n.empty||n.from==0||n.from==e.doc.length)return{range:n};let r=n.from,i=e.doc.lineAt(r),a=r==i.from?r-1:t(i.text,r-i.from,!1)+i.from,o=r==i.to?r+1:t(i.text,r-i.from,!0)+i.from;return{changes:{from:a,to:o,insert:e.doc.slice(r,o).append(e.doc.slice(a,r))},range:h.cursor(o)}});return r.changes.empty?!1:(n(e.update(r,{scrollIntoView:!0,userEvent:`move.character`})),!0)};function Q(e){let t=[],n=-1;for(let r of e.selection.ranges){let i=e.doc.lineAt(r.from),a=e.doc.lineAt(r.to);if(!r.empty&&r.to==a.from&&(a=e.doc.lineAt(r.to-1)),n>=i.number){let e=t[t.length-1];e.to=a.to,e.ranges.push(r)}else t.push({from:i.from,to:a.to,ranges:[r]});n=a.number+1}return t}function Vt(e,t,n){if(e.readOnly)return!1;let r=[],i=[];for(let t of Q(e)){if(n?t.to==e.doc.length:t.from==0)continue;let a=e.doc.lineAt(n?t.to+1:t.from-1),o=a.length+1;if(n){r.push({from:t.to,to:a.to},{from:t.from,insert:a.text+e.lineBreak});for(let n of t.ranges)i.push(h.range(Math.min(e.doc.length,n.anchor+o),Math.min(e.doc.length,n.head+o)))}else{r.push({from:a.from,to:t.from},{from:t.to,insert:e.lineBreak+a.text});for(let e of t.ranges)i.push(h.range(e.anchor-o,e.head-o))}}return r.length?(t(e.update({changes:r,scrollIntoView:!0,selection:h.create(i,e.selection.mainIndex),userEvent:`move.line`})),!0):!1}var Ht=({state:e,dispatch:t})=>Vt(e,t,!1),Ut=({state:e,dispatch:t})=>Vt(e,t,!0);function Wt(e,t,n){if(e.readOnly)return!1;let r=[];for(let t of Q(e))n?r.push({from:t.from,insert:e.doc.slice(t.from,t.to)+e.lineBreak}):r.push({from:t.to,insert:e.lineBreak+e.doc.slice(t.from,t.to)});let i=e.changes(r);return t(e.update({changes:i,selection:e.selection.map(i,n?1:-1),scrollIntoView:!0,userEvent:`input.copyline`})),!0}var Gt=({state:e,dispatch:t})=>Wt(e,t,!1),Kt=({state:e,dispatch:t})=>Wt(e,t,!0),qt=e=>{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(Q(t).map(({from:e,to:n})=>(e>0?e--:n<t.doc.length&&n++,{from:e,to:n}))),r=F(t.selection,t=>{let n;if(e.lineWrapping){let r=e.lineBlockAt(t.head),i=e.coordsAtPos(t.head,t.assoc||1);i&&(n=r.bottom+e.documentTop-i.bottom+e.defaultLineHeight/2)}return e.moveVertically(t,!0,n)}).map(n);return e.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:`delete.line`}),!0};function Jt(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let n=i(e).resolveInner(t),r=n.childBefore(t),a=n.childAfter(t),o;return r&&a&&r.to<=t&&a.from>=t&&(o=r.type.prop(_.closedBy))&&o.indexOf(a.name)>-1&&e.doc.lineAt(r.to).from==e.doc.lineAt(a.from).from&&!/\S/.test(e.sliceDoc(r.to,a.from))?{from:r.to,to:a.from}:null}var Yt=Zt(!1),Xt=Zt(!0);function Zt(e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let r=t.changeByRange(n=>{let{from:r,to:i}=n,a=t.doc.lineAt(r),o=!e&&r==i&&Jt(t,r);e&&(r=i=(i<=a.to?a:t.doc.lineAt(i)).to);let s=new ce(t,{simulateBreak:r,simulateDoubleBreak:!!o}),c=C(s,r);for(c??=p(/^\s*/.exec(t.doc.lineAt(r).text)[0],t.tabSize);i<a.to&&/\s/.test(a.text[i-a.from]);)i++;o?{from:r,to:i}=o:r>a.from&&r<a.from+100&&!/\S/.test(a.text.slice(0,r))&&(r=a.from);let l=[``,S(t,c)];return o&&l.push(S(t,s.lineIndent(a.from,-1))),{changes:{from:r,to:i,insert:ne.of(l)},range:h.cursor(r+1+l[1].length)}});return n(t.update(r,{scrollIntoView:!0,userEvent:`input`})),!0}}function $(e,t){let n=-1;return e.changeByRange(r=>{let i=[];for(let a=r.from;a<=r.to;){let o=e.doc.lineAt(a);o.number>n&&(r.empty||r.to>o.from)&&(t(o,i,r),n=o.number),a=o.to+1}let a=e.changes(i);return{changes:i,range:h.range(a.mapPos(r.anchor,1),a.mapPos(r.head,1))}})}var Qt=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Object.create(null),r=new ce(e,{overrideIndentation:e=>n[e]??-1}),i=$(e,(t,i,a)=>{let o=C(r,t.from);if(o==null)return;/\S/.test(t.text)||(o=0);let s=/^\s*/.exec(t.text)[0],c=S(e,o);(s!=c||a.from<t.from+s.length)&&(n[t.from]=o,i.push({from:t.from,to:t.from+s.length,insert:c}))});return i.changes.empty||t(e.update(i,{userEvent:`indent`})),!0},$t=({state:e,dispatch:t})=>e.readOnly?!1:(t(e.update($(e,(t,n)=>{n.push({from:t.from,insert:e.facet(ee)})}),{userEvent:`input.indent`})),!0),en=({state:e,dispatch:t})=>e.readOnly?!1:(t(e.update($(e,(t,n)=>{let r=/^\s*/.exec(t.text)[0];if(!r)return;let i=p(r,e.tabSize),a=0,o=S(e,Math.max(0,i-b(e)));for(;a<r.length&&a<o.length&&r.charCodeAt(a)==o.charCodeAt(a);)a++;n.push({from:t.from+a,to:t.from+r.length,insert:o.slice(a)})}),{userEvent:`delete.dedent`})),!0),tn=e=>(e.setTabFocusMode(),!0),nn=[{key:`Ctrl-b`,run:B,shift:nt,preventDefault:!0},{key:`Ctrl-f`,run:V,shift:rt},{key:`Ctrl-p`,run:He,shift:ut},{key:`Ctrl-n`,run:Ue,shift:dt},{key:`Ctrl-a`,run:Ze,shift:yt},{key:`Ctrl-e`,run:Qe,shift:bt},{key:`Ctrl-d`,run:Nt},{key:`Ctrl-h`,run:X},{key:`Ctrl-k`,run:It},{key:`Ctrl-Alt-h`,run:Z},{key:`Ctrl-o`,run:zt},{key:`Ctrl-t`,run:Bt},{key:`Ctrl-v`,run:G}],rn=[{key:`ArrowLeft`,run:B,shift:nt,preventDefault:!0},{key:`Mod-ArrowLeft`,mac:`Alt-ArrowLeft`,run:Le,shift:at,preventDefault:!0},{mac:`Cmd-ArrowLeft`,run:Ye,shift:_t,preventDefault:!0},{key:`ArrowRight`,run:V,shift:rt,preventDefault:!0},{key:`Mod-ArrowRight`,mac:`Alt-ArrowRight`,run:Re,shift:ot,preventDefault:!0},{mac:`Cmd-ArrowRight`,run:Xe,shift:vt,preventDefault:!0},{key:`ArrowUp`,run:He,shift:ut,preventDefault:!0},{mac:`Cmd-ArrowUp`,run:xt,shift:Ct},{mac:`Ctrl-ArrowUp`,run:Ke,shift:pt},{key:`ArrowDown`,run:Ue,shift:dt,preventDefault:!0},{mac:`Cmd-ArrowDown`,run:St,shift:wt},{mac:`Ctrl-ArrowDown`,run:G,shift:mt},{key:`PageUp`,run:Ke,shift:pt},{key:`PageDown`,run:G,shift:mt},{key:`Home`,run:Je,shift:gt,preventDefault:!0},{key:`Mod-Home`,run:xt,shift:Ct},{key:`End`,run:qe,shift:ht,preventDefault:!0},{key:`Mod-End`,run:St,shift:wt},{key:`Enter`,run:Yt,shift:Yt},{key:`Mod-a`,run:Tt},{key:`Backspace`,run:X,shift:X,preventDefault:!0},{key:`Delete`,run:Nt,preventDefault:!0},{key:`Mod-Backspace`,mac:`Alt-Backspace`,run:Z,preventDefault:!0},{key:`Mod-Delete`,mac:`Alt-Delete`,run:Ft,preventDefault:!0},{mac:`Mod-Backspace`,run:Lt,preventDefault:!0},{mac:`Mod-Delete`,run:Rt,preventDefault:!0}].concat(nn.map(e=>({mac:e.key,run:e.run,shift:e.shift}))),an=[{key:`Alt-ArrowLeft`,mac:`Ctrl-ArrowLeft`,run:Be,shift:st},{key:`Alt-ArrowRight`,mac:`Ctrl-ArrowRight`,run:Ve,shift:ct},{key:`Alt-ArrowUp`,run:Ht},{key:`Shift-Alt-ArrowUp`,run:Gt},{key:`Alt-ArrowDown`,run:Ut},{key:`Shift-Alt-ArrowDown`,run:Kt},{key:`Mod-Alt-ArrowUp`,run:kt},{key:`Mod-Alt-ArrowDown`,run:At},{key:`Escape`,run:jt},{key:`Mod-Enter`,run:Xt},{key:`Alt-l`,mac:`Ctrl-l`,run:Et},{key:`Mod-i`,run:Dt,preventDefault:!0},{key:`Mod-[`,run:en},{key:`Mod-]`,run:$t},{key:`Mod-Alt-\\`,run:Qt},{key:`Shift-Mod-k`,run:qt},{key:`Shift-Mod-\\`,run:et},{key:`Mod-/`,run:de},{key:`Alt-A`,run:pe},{key:`Ctrl-m`,mac:`Shift-Alt-m`,run:tn}].concat(rn),on={json:async()=>{let{json:t}=await e(async()=>{let{json:e}=await import(`./dist-DfXP7YfQ.js`);return{json:e}},__vite__mapDeps([0,1,2]));return t()},markdown:async()=>{let{markdown:t}=await e(async()=>{let{markdown:e}=await import(`./dist-DEU7LMsW.js`);return{markdown:e}},__vite__mapDeps([3,4,1,2]));return t()},html:async()=>{let{html:t}=await e(async()=>{let{html:e}=await import(`./dist-UfV1NDbo.js`);return{html:e}},__vite__mapDeps([4,1,2]));return t()}};function sn(e){return e?le.define([{tag:v.keyword,color:`#d19afc`},{tag:v.string,color:`#87d68d`},{tag:v.number,color:`#f5a76c`},{tag:v.comment,color:`#8a8a8a`,fontStyle:`italic`},{tag:v.punctuation,color:`#7cc5e9`},{tag:v.function(v.variableName),color:`#7ea8f8`},{tag:v.propertyName,color:`#7ea8f8`},{tag:v.bool,color:`#f5a76c`},{tag:v.null,color:`#f5a76c`},{tag:v.operator,color:`#7cc5e9`},{tag:v.typeName,color:`#d19afc`},{tag:v.tagName,color:`#d19afc`},{tag:v.attributeName,color:`#87d68d`},{tag:v.attributeValue,color:`#87d68d`},{tag:v.heading,fontWeight:`bold`},{tag:v.emphasis,fontStyle:`italic`},{tag:v.strong,fontWeight:`bold`}]):le.define([{tag:v.keyword,color:`#8839ef`},{tag:v.string,color:`#40a02b`},{tag:v.number,color:`#d05d1a`},{tag:v.comment,color:`#8a8a8a`,fontStyle:`italic`},{tag:v.punctuation,color:`#1e66f5`},{tag:v.function(v.variableName),color:`#2b6cb0`},{tag:v.propertyName,color:`#2b6cb0`},{tag:v.bool,color:`#d05d1a`},{tag:v.null,color:`#d05d1a`},{tag:v.operator,color:`#1e66f5`},{tag:v.typeName,color:`#8839ef`},{tag:v.tagName,color:`#8839ef`},{tag:v.attributeName,color:`#40a02b`},{tag:v.attributeValue,color:`#40a02b`},{tag:v.heading,fontWeight:`bold`},{tag:v.emphasis,fontStyle:`italic`},{tag:v.strong,fontWeight:`bold`}])}function cn(e){return!(e.closest?.(`.theme-light`)||document.documentElement.classList.contains(`theme-light`))}function ln(){return n.theme({"&":{fontSize:`13px`,border:`1px solid var(--s2-border-subtle, #333)`,borderRadius:`var(--s2-radius-default, 8px)`,overflow:`hidden`},"&.cm-focused":{outline:`none`,borderColor:`var(--s2-border-focus, var(--s2-accent, #3562ff))`},".cm-content":{fontFamily:`var(--s2-font-mono, "SF Mono", "Fira Code", Consolas, monospace)`,caretColor:`var(--s2-accent, #3562ff)`,padding:`8px 0`},".cm-scroller":{overflow:`auto`},".cm-cursor, .cm-dropCursor":{borderLeftColor:`var(--s2-accent, #3562ff)`},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground":{background:`color-mix(in srgb, var(--s2-accent, #3562ff) 20%, transparent)`},".cm-activeLine":{background:`color-mix(in srgb, var(--s2-accent, #3562ff) 5%, transparent)`},".cm-gutters":{backgroundColor:`var(--s2-bg-layer-1, #1a1a1a)`,color:`var(--s2-content-tertiary, #5a5a5a)`,borderRight:`none`,borderRadius:`var(--s2-radius-default, 8px) 0 0 var(--s2-radius-default, 8px)`},".cm-lineNumbers .cm-gutterElement":{padding:`0 8px 0 12px`,minWidth:`32px`},".cm-placeholder":{color:`var(--s2-content-tertiary, #5a5a5a)`,fontStyle:`italic`}})}var un=`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dist-DB19jrs9.js","assets/dist-uJp2dR6X.js","assets/dist-C_pwrhfY.js","assets/dist-BETSJsV5.js","assets/dist-Ck3Vla0r.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{t as e}from"./preload-helper-ca-nBW7U.js";import{$ as t,A as n,B as r,D as i,E as a,F as o,H as s,I as c,J as l,L as u,N as d,P as f,Q as p,R as m,S as ee,U as te,V as h,X as g,Y as ne,Z as re,at as _,c as ie,d as ae,j as oe,k as se,n as ce,nt as v,q as y,t as le,v as b,w as x,x as S,y as C,z as ue}from"./dist-uJp2dR6X.js";var de=e=>{let{state:t}=e,n=t.doc.lineAt(t.selection.main.from),r=T(e.state,n.from);return r.line?fe(e):r.block?me(e):!1};function w(e,t){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=e(t,n);return i?(r(n.update(i)),!0):!1}}var fe=w(ve,0),pe=w(_e,0),me=w((e,t)=>_e(e,t,ge(t)),0);function T(e,t){let n=e.languageDataAt(`commentTokens`,t,1);return n.length?n[0]:{}}var E=50;function he(e,{open:t,close:n},r,i){let a=e.sliceDoc(r-E,r),o=e.sliceDoc(i,i+E),s=/\s*$/.exec(a)[0].length,c=/^\s*/.exec(o)[0].length,l=a.length-s;if(a.slice(l-t.length,l)==t&&o.slice(c,c+n.length)==n)return{open:{pos:r-s,margin:s&&1},close:{pos:i+c,margin:c&&1}};let u,d;i-r<=2*E?u=d=e.sliceDoc(r,i):(u=e.sliceDoc(r,r+E),d=e.sliceDoc(i-E,i));let f=/^\s*/.exec(u)[0].length,p=/\s*$/.exec(d)[0].length,m=d.length-p-n.length;return u.slice(f,f+t.length)==t&&d.slice(m,m+n.length)==n?{open:{pos:r+f+t.length,margin:+!!/\s/.test(u.charAt(f+t.length))},close:{pos:i-p-n.length,margin:+!!/\s/.test(d.charAt(m-1))}}:null}function ge(e){let t=[];for(let n of e.selection.ranges){let r=e.doc.lineAt(n.from),i=n.to<=r.to?r:e.doc.lineAt(n.to);i.from>r.from&&i.from==n.to&&(i=n.to==r.to+1?r:e.doc.lineAt(n.to-1));let a=t.length-1;a>=0&&t[a].to>r.from?t[a].to=i.to:t.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return t}function _e(e,t,n=t.selection.ranges){let r=n.map(e=>T(t,e.from).block);if(!r.every(e=>e))return null;let i=n.map((e,n)=>he(t,r[n],e.from,e.to));if(e!=2&&!i.every(e=>e))return{changes:t.changes(n.map((e,t)=>i[t]?[]:[{from:e.from,insert:r[t].open+` `},{from:e.to,insert:` `+r[t].close}]))};if(e!=1&&i.some(e=>e)){let e=[];for(let t=0,n;t<i.length;t++)if(n=i[t]){let i=r[t],{open:a,close:o}=n;e.push({from:a.pos-i.open.length,to:a.pos+a.margin},{from:o.pos-o.margin,to:o.pos+i.close.length})}return{changes:e}}return null}function ve(e,t,n=t.selection.ranges){let r=[],i=-1;ranges:for(let{from:e,to:a}of n){let n=r.length,o=1e9,s;for(let n=e;n<=a;){let c=t.doc.lineAt(n);if(s==null&&(s=T(t,c.from).line,!s))continue ranges;if(c.from>i&&(e==a||a>c.from)){i=c.from;let e=/^\s*/.exec(c.text)[0].length,t=e==c.length,n=c.text.slice(e,e+s.length)==s?e:-1;e<c.text.length&&e<o&&(o=e),r.push({line:c,comment:n,token:s,indent:e,empty:t,single:!1})}n=c.to+1}if(o<1e9)for(let e=n;e<r.length;e++)r[e].indent<r[e].line.text.length&&(r[e].indent=o);r.length==n+1&&(r[n].single=!0)}if(e!=2&&r.some(e=>e.comment<0&&(!e.empty||e.single))){let e=[];for(let{line:t,token:n,indent:i,empty:a,single:o}of r)(o||!a)&&e.push({from:t.from+i,insert:n+` `});let n=t.changes(e);return{changes:n,selection:t.selection.map(n,1)}}else if(e!=1&&r.some(e=>e.comment>=0)){let e=[];for(let{line:t,comment:n,token:i}of r)if(n>=0){let r=t.from+n,a=r+i.length;t.text[a-t.from]==` `&&a++,e.push({from:r,to:a})}return{changes:e}}return null}var D=u.define(),ye=u.define(),be=te.define(),xe=te.define({combine(e){return re(e,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(n,r)=>e(n,r)||t(n,r)})}}),Se=l.define({create(){return P.empty},update(e,t){let n=t.state.facet(xe),r=t.annotation(D);if(r){let i=A.fromTransaction(t,r.selection),a=r.side,o=a==0?e.undone:e.done;return o=i?j(o,o.length,n.minDepth,i):je(o,t.startState.selection),new P(a==0?r.rest:o,a==0?o:r.rest)}let i=t.annotation(ye);if((i==`full`||i==`before`)&&(e=e.isolate()),t.annotation(g.addToHistory)===!1)return t.changes.empty?e:e.addMapping(t.changes.desc);let a=A.fromTransaction(t),o=t.annotation(g.time),s=t.annotation(g.userEvent);return a?e=e.addChanges(a,o,s,n,t):t.selection&&(e=e.addSelection(t.startState.selection,o,s,n.newGroupDelay)),(i==`full`||i==`after`)&&(e=e.isolate()),e},toJSON(e){return{done:e.done.map(e=>e.toJSON()),undone:e.undone.map(e=>e.toJSON())}},fromJSON(e){return new P(e.done.map(A.fromJSON),e.undone.map(A.fromJSON))}});function Ce(e={}){return[Se,xe.of(e),n.domEventHandlers({beforeinput(e,t){let n=e.inputType==`historyUndo`?we:e.inputType==`historyRedo`?k:null;return n?(e.preventDefault(),n(t)):!1}})]}function O(e,t){return function({state:n,dispatch:r}){if(!t&&n.readOnly)return!1;let i=n.field(Se,!1);if(!i)return!1;let a=i.pop(e,n,t);return a?(r(a),!0):!1}}var we=O(0,!1),k=O(1,!1),Te=O(0,!0),Ee=O(1,!0),A=class e{constructor(e,t,n,r,i){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=r,this.selectionsAfter=i}setSelAfter(t){return new e(this.changes,this.effects,this.mapped,this.startSelection,t)}toJSON(){return{changes:this.changes?.toJSON(),mapped:this.mapped?.toJSON(),startSelection:this.startSelection?.toJSON(),selectionsAfter:this.selectionsAfter.map(e=>e.toJSON())}}static fromJSON(t){return new e(t.changes&&ue.fromJSON(t.changes),[],t.mapped&&m.fromJSON(t.mapped),t.startSelection&&h.fromJSON(t.startSelection),t.selectionsAfter.map(h.fromJSON))}static fromTransaction(t,n){let r=M;for(let e of t.startState.facet(be)){let n=e(t);n.length&&(r=r.concat(n))}return!r.length&&t.changes.empty?null:new e(t.changes.invert(t.startState.doc),r,void 0,n||t.startState.selection,M)}static selection(t){return new e(void 0,M,void 0,void 0,t)}};function j(e,t,n,r){let i=t+1>n+20?t-n-1:0,a=e.slice(i,t);return a.push(r),a}function De(e,t){let n=[],r=!1;return e.iterChangedRanges((e,t)=>n.push(e,t)),t.iterChangedRanges((e,t,i,a)=>{for(let e=0;e<n.length;){let t=n[e++],o=n[e++];a>=t&&i<=o&&(r=!0)}}),r}function Oe(e,t){return e.ranges.length==t.ranges.length&&e.ranges.filter((e,n)=>e.empty!=t.ranges[n].empty).length===0}function ke(e,t){return e.length?t.length?e.concat(t):e:t}var M=[],Ae=200;function je(e,t){if(e.length){let n=e[e.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-Ae));return r.length&&r[r.length-1].eq(t)?e:(r.push(t),j(e,e.length-1,1e9,n.setSelAfter(r)))}else return[A.selection([t])]}function Me(e){let t=e[e.length-1],n=e.slice();return n[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),n}function N(e,t){if(!e.length)return e;let n=e.length,r=M;for(;n;){let i=Ne(e[n-1],t,r);if(i.changes&&!i.changes.empty||i.effects.length){let t=e.slice(0,n);return t[n-1]=i,t}else t=i.mapped,n--,r=i.selectionsAfter}return r.length?[A.selection(r)]:M}function Ne(e,t,n){let r=ke(e.selectionsAfter.length?e.selectionsAfter.map(e=>e.map(t)):M,n);if(!e.changes)return A.selection(r);let i=e.changes.map(t),a=t.mapDesc(e.changes,!0),o=e.mapped?e.mapped.composeDesc(a):a;return new A(i,y.mapEffects(e.effects,t),o,e.startSelection.map(a),r)}var Pe=/^(input\.type|delete)($|\.)/,P=class e{constructor(e,t,n=0,r=void 0){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=r}isolate(){return this.prevTime?new e(this.done,this.undone):this}addChanges(t,n,r,i,a){let o=this.done,s=o[o.length-1];return o=s&&s.changes&&!s.changes.empty&&t.changes&&(!r||Pe.test(r))&&(!s.selectionsAfter.length&&n-this.prevTime<i.newGroupDelay&&i.joinToEvent(a,De(s.changes,t.changes))||r==`input.type.compose`)?j(o,o.length-1,i.minDepth,new A(t.changes.compose(s.changes),ke(y.mapEffects(t.effects,s.changes),s.effects),s.mapped,s.startSelection,M)):j(o,o.length,i.minDepth,t),new e(o,M,n,r)}addSelection(t,n,r,i){let a=this.done.length?this.done[this.done.length-1].selectionsAfter:M;return a.length>0&&n-this.prevTime<i&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&Oe(a[a.length-1],t)?this:new e(je(this.done,t),this.undone,n,r)}addMapping(t){return new e(N(this.done,t),N(this.undone,t),this.prevTime,this.prevUserEvent)}pop(e,t,n){let r=e==0?this.done:this.undone;if(r.length==0)return null;let i=r[r.length-1],a=i.selectionsAfter[0]||(i.startSelection?i.startSelection.map(i.changes.invertedDesc,1):t.selection);if(n&&i.selectionsAfter.length)return t.update({selection:i.selectionsAfter[i.selectionsAfter.length-1],annotations:D.of({side:e,rest:Me(r),selection:a}),userEvent:e==0?`select.undo`:`select.redo`,scrollIntoView:!0});if(i.changes){let n=r.length==1?M:r.slice(0,r.length-1);return i.mapped&&(n=N(n,i.mapped)),t.update({changes:i.changes,selection:i.startSelection,effects:i.effects,annotations:D.of({side:e,rest:n,selection:a}),filter:!1,userEvent:e==0?`undo`:`redo`,scrollIntoView:!0})}else return null}};P.empty=new P(M,M);var Fe=[{key:`Mod-z`,run:we,preventDefault:!0},{key:`Mod-y`,mac:`Mod-Shift-z`,run:k,preventDefault:!0},{linux:`Ctrl-Shift-z`,run:k,preventDefault:!0},{key:`Mod-u`,run:Te,preventDefault:!0},{key:`Alt-u`,mac:`Mod-Shift-u`,run:Ee,preventDefault:!0}];function F(e,t){return h.create(e.ranges.map(t),e.mainIndex)}function I(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:`select`})}function L({state:e,dispatch:t},n){let r=F(e.selection,n);return r.eq(e.selection,!0)?!1:(t(I(e,r)),!0)}function R(e,t){return h.cursor(t?e.to:e.from)}function Ie(e,t){return L(e,n=>n.empty?e.moveByChar(n,t):R(n,t))}function z(e){return e.textDirectionAt(e.state.selection.main.head)==se.LTR}var B=e=>Ie(e,!z(e)),V=e=>Ie(e,z(e));function H(e,t){return L(e,n=>n.empty?e.moveByGroup(n,t):R(n,t))}var Le=e=>H(e,!z(e)),Re=e=>H(e,z(e));typeof Intl<`u`&&Intl.Segmenter;function ze(e,t,n){if(t.type.prop(n))return!0;let r=t.to-t.from;return r&&(r>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function U(e,t,n){let r=i(e).resolveInner(t.head),a=n?_.closedBy:_.openedBy;for(let i=t.head;;){let t=n?r.childAfter(i):r.childBefore(i);if(!t)break;ze(e,t,a)?r=t:i=n?t.to:t.from}let o=r.type.prop(a),s,c;return c=o&&(s=n?x(e,r.from,1):x(e,r.to,-1))&&s.matched?n?s.end.to:s.end.from:n?r.to:r.from,h.cursor(c,n?-1:1)}var Be=e=>L(e,t=>U(e.state,t,!z(e))),Ve=e=>L(e,t=>U(e.state,t,z(e)));function W(e,t){return L(e,n=>{if(!n.empty)return R(n,t);let r=e.moveVertically(n,t);return r.head==n.head?e.moveToLineBoundary(n,t):r})}var He=e=>W(e,!1),Ue=e=>W(e,!0);function We(e){let t=e.scrollDOM.clientHeight<e.scrollDOM.scrollHeight-2,r=0,i=0,a;if(t){for(let t of e.state.facet(n.scrollMargins)){let n=t(e);n?.top&&(r=Math.max(n?.top,r)),n?.bottom&&(i=Math.max(n?.bottom,i))}a=e.scrollDOM.clientHeight-r-i}else a=(e.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:r,marginBottom:i,selfScroll:t,height:Math.max(e.defaultLineHeight,a-5)}}function Ge(e,t){let r=We(e),{state:i}=e,a=F(i.selection,n=>n.empty?e.moveVertically(n,t,r.height):R(n,t));if(a.eq(i.selection))return!1;let o;if(r.selfScroll){let t=e.coordsAtPos(i.selection.main.head),s=e.scrollDOM.getBoundingClientRect(),c=s.top+r.marginTop,l=s.bottom-r.marginBottom;t&&t.top>c&&t.bottom<l&&(o=n.scrollIntoView(a.main.head,{y:`start`,yMargin:t.top-c}))}return e.dispatch(I(i,a),{effects:o}),!0}var Ke=e=>Ge(e,!1),G=e=>Ge(e,!0);function K(e,t,n){let r=e.lineBlockAt(t.head),i=e.moveToLineBoundary(t,n);if(i.head==t.head&&i.head!=(n?r.to:r.from)&&(i=e.moveToLineBoundary(t,n,!1)),!n&&i.head==r.from&&r.length){let n=/^\s*/.exec(e.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;n&&t.head!=r.from+n&&(i=h.cursor(r.from+n))}return i}var qe=e=>L(e,t=>K(e,t,!0)),Je=e=>L(e,t=>K(e,t,!1)),Ye=e=>L(e,t=>K(e,t,!z(e))),Xe=e=>L(e,t=>K(e,t,z(e))),Ze=e=>L(e,t=>h.cursor(e.lineBlockAt(t.head).from,1)),Qe=e=>L(e,t=>h.cursor(e.lineBlockAt(t.head).to,-1));function $e(e,t,n){let r=!1,i=F(e.selection,t=>{let i=x(e,t.head,-1)||x(e,t.head,1)||t.head>0&&x(e,t.head-1,1)||t.head<e.doc.length&&x(e,t.head+1,-1);if(!i||!i.end)return t;r=!0;let a=i.start.from==t.head?i.end.to:i.end.from;return n?h.range(t.anchor,a):h.cursor(a)});return r?(t(I(e,i)),!0):!1}var et=({state:e,dispatch:t})=>$e(e,t,!1);function q(e,t){let n=F(e.state.selection,e=>{let n=t(e);return h.range(e.anchor,n.head,n.goalColumn,n.bidiLevel||void 0,n.assoc)});return n.eq(e.state.selection)?!1:(e.dispatch(I(e.state,n)),!0)}function tt(e,t){return q(e,n=>e.moveByChar(n,t))}var nt=e=>tt(e,!z(e)),rt=e=>tt(e,z(e));function it(e,t){return q(e,n=>e.moveByGroup(n,t))}var at=e=>it(e,!z(e)),ot=e=>it(e,z(e)),st=e=>q(e,t=>U(e.state,t,!z(e))),ct=e=>q(e,t=>U(e.state,t,z(e)));function lt(e,t){return q(e,n=>e.moveVertically(n,t))}var ut=e=>lt(e,!1),dt=e=>lt(e,!0);function ft(e,t){return q(e,n=>e.moveVertically(n,t,We(e).height))}var pt=e=>ft(e,!1),mt=e=>ft(e,!0),ht=e=>q(e,t=>K(e,t,!0)),gt=e=>q(e,t=>K(e,t,!1)),_t=e=>q(e,t=>K(e,t,!z(e))),vt=e=>q(e,t=>K(e,t,z(e))),yt=e=>q(e,t=>h.cursor(e.lineBlockAt(t.head).from)),bt=e=>q(e,t=>h.cursor(e.lineBlockAt(t.head).to)),xt=({state:e,dispatch:t})=>(t(I(e,{anchor:0})),!0),St=({state:e,dispatch:t})=>(t(I(e,{anchor:e.doc.length})),!0),Ct=({state:e,dispatch:t})=>(t(I(e,{anchor:e.selection.main.anchor,head:0})),!0),wt=({state:e,dispatch:t})=>(t(I(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0),Tt=({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:`select`})),!0),Et=({state:e,dispatch:t})=>{let n=Q(e).map(({from:t,to:n})=>h.range(t,Math.min(n+1,e.doc.length)));return t(e.update({selection:h.create(n),userEvent:`select`})),!0},Dt=({state:e,dispatch:t})=>{let n=F(e.selection,t=>{let n=i(e),r=n.resolveStack(t.from,1);if(t.empty){let e=n.resolveStack(t.from,-1);e.node.from>=r.node.from&&e.node.to<=r.node.to&&(r=e)}for(let e=r;e;e=e.next){let{node:n}=e;if((n.from<t.from&&n.to>=t.to||n.to>t.to&&n.from<=t.from)&&e.next)return h.range(n.to,n.from)}return t});return n.eq(e.selection)?!1:(t(I(e,n)),!0)};function Ot(e,t){let{state:n}=e,r=n.selection,i=n.selection.ranges.slice();for(let r of n.selection.ranges){let a=n.doc.lineAt(r.head);if(t?a.to<e.state.doc.length:a.from>0)for(let n=r;;){let r=e.moveVertically(n,t);if(r.head<a.from||r.head>a.to){i.some(e=>e.head==r.head)||i.push(r);break}else if(r.head==n.head)break;else n=r}}return i.length==r.ranges.length?!1:(e.dispatch(I(n,h.create(i,i.length-1))),!0)}var kt=e=>Ot(e,!1),At=e=>Ot(e,!0),jt=({state:e,dispatch:t})=>{let n=e.selection,r=null;return n.ranges.length>1?r=h.create([n.main]):n.main.empty||(r=h.create([h.cursor(n.main.head)])),r?(t(I(e,r)),!0):!1};function J(e,t){if(e.state.readOnly)return!1;let r=`delete.selection`,{state:i}=e,a=i.changeByRange(n=>{let{from:i,to:a}=n;if(i==a){let o=t(n);o<i?(r=`delete.backward`,o=Y(e,o,!1)):o>i&&(r=`delete.forward`,o=Y(e,o,!0)),i=Math.min(i,o),a=Math.max(a,o)}else i=Y(e,i,!1),a=Y(e,a,!0);return i==a?{range:n}:{changes:{from:i,to:a},range:h.cursor(i,i<n.head?-1:1)}});return a.changes.empty?!1:(e.dispatch(i.update(a,{scrollIntoView:!0,userEvent:r,effects:r==`delete.selection`?n.announce.of(i.phrase(`Selection deleted`)):void 0})),!0)}function Y(e,t,r){if(e instanceof n)for(let i of e.state.facet(n.atomicRanges).map(t=>t(e)))i.between(t,t,(e,n)=>{e<t&&n>t&&(t=r?n:e)});return t}var Mt=(e,n,r)=>J(e,i=>{let a=i.from,{state:o}=e,s=o.doc.lineAt(a),c,l;if(r&&!n&&a>s.from&&a<s.from+200&&!/[^ \t]/.test(c=s.text.slice(0,a-s.from))){if(c[c.length-1]==` `)return a-1;let e=p(c,o.tabSize)%b(o)||b(o);for(let t=0;t<e&&c[c.length-1-t]==` `;t++)a--;l=a}else l=t(s.text,a-s.from,n,n)+s.from,l==a&&s.number!=(n?o.doc.lines:1)?l+=n?1:-1:!n&&/[\ufe00-\ufe0f]/.test(s.text.slice(l-s.from,a-s.from))&&(l=t(s.text,l-s.from,!1,!1)+s.from);return l}),X=e=>Mt(e,!1,!0),Nt=e=>Mt(e,!0,!1),Pt=(e,n)=>J(e,r=>{let i=r.head,{state:a}=e,o=a.doc.lineAt(i),s=a.charCategorizer(i);for(let e=null;;){if(i==(n?o.to:o.from)){i==r.head&&o.number!=(n?a.doc.lines:1)&&(i+=n?1:-1);break}let c=t(o.text,i-o.from,n)+o.from,l=o.text.slice(Math.min(i,c)-o.from,Math.max(i,c)-o.from),u=s(l);if(e!=null&&u!=e)break;(l!=` `||i!=r.head)&&(e=u),i=c}return i}),Z=e=>Pt(e,!1),Ft=e=>Pt(e,!0),It=e=>J(e,t=>{let n=e.lineBlockAt(t.head).to;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)}),Lt=e=>J(e,t=>{let n=e.moveToLineBoundary(t,!1).head;return t.head>n?n:Math.max(0,t.head-1)}),Rt=e=>J(e,t=>{let n=e.moveToLineBoundary(t,!0).head;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)}),zt=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(e=>({changes:{from:e.from,to:e.to,insert:ne.of([``,``])},range:h.cursor(e.from)}));return t(e.update(n,{scrollIntoView:!0,userEvent:`input`})),!0},Bt=({state:e,dispatch:n})=>{if(e.readOnly)return!1;let r=e.changeByRange(n=>{if(!n.empty||n.from==0||n.from==e.doc.length)return{range:n};let r=n.from,i=e.doc.lineAt(r),a=r==i.from?r-1:t(i.text,r-i.from,!1)+i.from,o=r==i.to?r+1:t(i.text,r-i.from,!0)+i.from;return{changes:{from:a,to:o,insert:e.doc.slice(r,o).append(e.doc.slice(a,r))},range:h.cursor(o)}});return r.changes.empty?!1:(n(e.update(r,{scrollIntoView:!0,userEvent:`move.character`})),!0)};function Q(e){let t=[],n=-1;for(let r of e.selection.ranges){let i=e.doc.lineAt(r.from),a=e.doc.lineAt(r.to);if(!r.empty&&r.to==a.from&&(a=e.doc.lineAt(r.to-1)),n>=i.number){let e=t[t.length-1];e.to=a.to,e.ranges.push(r)}else t.push({from:i.from,to:a.to,ranges:[r]});n=a.number+1}return t}function Vt(e,t,n){if(e.readOnly)return!1;let r=[],i=[];for(let t of Q(e)){if(n?t.to==e.doc.length:t.from==0)continue;let a=e.doc.lineAt(n?t.to+1:t.from-1),o=a.length+1;if(n){r.push({from:t.to,to:a.to},{from:t.from,insert:a.text+e.lineBreak});for(let n of t.ranges)i.push(h.range(Math.min(e.doc.length,n.anchor+o),Math.min(e.doc.length,n.head+o)))}else{r.push({from:a.from,to:t.from},{from:t.to,insert:e.lineBreak+a.text});for(let e of t.ranges)i.push(h.range(e.anchor-o,e.head-o))}}return r.length?(t(e.update({changes:r,scrollIntoView:!0,selection:h.create(i,e.selection.mainIndex),userEvent:`move.line`})),!0):!1}var Ht=({state:e,dispatch:t})=>Vt(e,t,!1),Ut=({state:e,dispatch:t})=>Vt(e,t,!0);function Wt(e,t,n){if(e.readOnly)return!1;let r=[];for(let t of Q(e))n?r.push({from:t.from,insert:e.doc.slice(t.from,t.to)+e.lineBreak}):r.push({from:t.to,insert:e.lineBreak+e.doc.slice(t.from,t.to)});let i=e.changes(r);return t(e.update({changes:i,selection:e.selection.map(i,n?1:-1),scrollIntoView:!0,userEvent:`input.copyline`})),!0}var Gt=({state:e,dispatch:t})=>Wt(e,t,!1),Kt=({state:e,dispatch:t})=>Wt(e,t,!0),qt=e=>{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(Q(t).map(({from:e,to:n})=>(e>0?e--:n<t.doc.length&&n++,{from:e,to:n}))),r=F(t.selection,t=>{let n;if(e.lineWrapping){let r=e.lineBlockAt(t.head),i=e.coordsAtPos(t.head,t.assoc||1);i&&(n=r.bottom+e.documentTop-i.bottom+e.defaultLineHeight/2)}return e.moveVertically(t,!0,n)}).map(n);return e.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:`delete.line`}),!0};function Jt(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let n=i(e).resolveInner(t),r=n.childBefore(t),a=n.childAfter(t),o;return r&&a&&r.to<=t&&a.from>=t&&(o=r.type.prop(_.closedBy))&&o.indexOf(a.name)>-1&&e.doc.lineAt(r.to).from==e.doc.lineAt(a.from).from&&!/\S/.test(e.sliceDoc(r.to,a.from))?{from:r.to,to:a.from}:null}var Yt=Zt(!1),Xt=Zt(!0);function Zt(e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let r=t.changeByRange(n=>{let{from:r,to:i}=n,a=t.doc.lineAt(r),o=!e&&r==i&&Jt(t,r);e&&(r=i=(i<=a.to?a:t.doc.lineAt(i)).to);let s=new ce(t,{simulateBreak:r,simulateDoubleBreak:!!o}),c=C(s,r);for(c??=p(/^\s*/.exec(t.doc.lineAt(r).text)[0],t.tabSize);i<a.to&&/\s/.test(a.text[i-a.from]);)i++;o?{from:r,to:i}=o:r>a.from&&r<a.from+100&&!/\S/.test(a.text.slice(0,r))&&(r=a.from);let l=[``,S(t,c)];return o&&l.push(S(t,s.lineIndent(a.from,-1))),{changes:{from:r,to:i,insert:ne.of(l)},range:h.cursor(r+1+l[1].length)}});return n(t.update(r,{scrollIntoView:!0,userEvent:`input`})),!0}}function $(e,t){let n=-1;return e.changeByRange(r=>{let i=[];for(let a=r.from;a<=r.to;){let o=e.doc.lineAt(a);o.number>n&&(r.empty||r.to>o.from)&&(t(o,i,r),n=o.number),a=o.to+1}let a=e.changes(i);return{changes:i,range:h.range(a.mapPos(r.anchor,1),a.mapPos(r.head,1))}})}var Qt=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Object.create(null),r=new ce(e,{overrideIndentation:e=>n[e]??-1}),i=$(e,(t,i,a)=>{let o=C(r,t.from);if(o==null)return;/\S/.test(t.text)||(o=0);let s=/^\s*/.exec(t.text)[0],c=S(e,o);(s!=c||a.from<t.from+s.length)&&(n[t.from]=o,i.push({from:t.from,to:t.from+s.length,insert:c}))});return i.changes.empty||t(e.update(i,{userEvent:`indent`})),!0},$t=({state:e,dispatch:t})=>e.readOnly?!1:(t(e.update($(e,(t,n)=>{n.push({from:t.from,insert:e.facet(ee)})}),{userEvent:`input.indent`})),!0),en=({state:e,dispatch:t})=>e.readOnly?!1:(t(e.update($(e,(t,n)=>{let r=/^\s*/.exec(t.text)[0];if(!r)return;let i=p(r,e.tabSize),a=0,o=S(e,Math.max(0,i-b(e)));for(;a<r.length&&a<o.length&&r.charCodeAt(a)==o.charCodeAt(a);)a++;n.push({from:t.from+a,to:t.from+r.length,insert:o.slice(a)})}),{userEvent:`delete.dedent`})),!0),tn=e=>(e.setTabFocusMode(),!0),nn=[{key:`Ctrl-b`,run:B,shift:nt,preventDefault:!0},{key:`Ctrl-f`,run:V,shift:rt},{key:`Ctrl-p`,run:He,shift:ut},{key:`Ctrl-n`,run:Ue,shift:dt},{key:`Ctrl-a`,run:Ze,shift:yt},{key:`Ctrl-e`,run:Qe,shift:bt},{key:`Ctrl-d`,run:Nt},{key:`Ctrl-h`,run:X},{key:`Ctrl-k`,run:It},{key:`Ctrl-Alt-h`,run:Z},{key:`Ctrl-o`,run:zt},{key:`Ctrl-t`,run:Bt},{key:`Ctrl-v`,run:G}],rn=[{key:`ArrowLeft`,run:B,shift:nt,preventDefault:!0},{key:`Mod-ArrowLeft`,mac:`Alt-ArrowLeft`,run:Le,shift:at,preventDefault:!0},{mac:`Cmd-ArrowLeft`,run:Ye,shift:_t,preventDefault:!0},{key:`ArrowRight`,run:V,shift:rt,preventDefault:!0},{key:`Mod-ArrowRight`,mac:`Alt-ArrowRight`,run:Re,shift:ot,preventDefault:!0},{mac:`Cmd-ArrowRight`,run:Xe,shift:vt,preventDefault:!0},{key:`ArrowUp`,run:He,shift:ut,preventDefault:!0},{mac:`Cmd-ArrowUp`,run:xt,shift:Ct},{mac:`Ctrl-ArrowUp`,run:Ke,shift:pt},{key:`ArrowDown`,run:Ue,shift:dt,preventDefault:!0},{mac:`Cmd-ArrowDown`,run:St,shift:wt},{mac:`Ctrl-ArrowDown`,run:G,shift:mt},{key:`PageUp`,run:Ke,shift:pt},{key:`PageDown`,run:G,shift:mt},{key:`Home`,run:Je,shift:gt,preventDefault:!0},{key:`Mod-Home`,run:xt,shift:Ct},{key:`End`,run:qe,shift:ht,preventDefault:!0},{key:`Mod-End`,run:St,shift:wt},{key:`Enter`,run:Yt,shift:Yt},{key:`Mod-a`,run:Tt},{key:`Backspace`,run:X,shift:X,preventDefault:!0},{key:`Delete`,run:Nt,preventDefault:!0},{key:`Mod-Backspace`,mac:`Alt-Backspace`,run:Z,preventDefault:!0},{key:`Mod-Delete`,mac:`Alt-Delete`,run:Ft,preventDefault:!0},{mac:`Mod-Backspace`,run:Lt,preventDefault:!0},{mac:`Mod-Delete`,run:Rt,preventDefault:!0}].concat(nn.map(e=>({mac:e.key,run:e.run,shift:e.shift}))),an=[{key:`Alt-ArrowLeft`,mac:`Ctrl-ArrowLeft`,run:Be,shift:st},{key:`Alt-ArrowRight`,mac:`Ctrl-ArrowRight`,run:Ve,shift:ct},{key:`Alt-ArrowUp`,run:Ht},{key:`Shift-Alt-ArrowUp`,run:Gt},{key:`Alt-ArrowDown`,run:Ut},{key:`Shift-Alt-ArrowDown`,run:Kt},{key:`Mod-Alt-ArrowUp`,run:kt},{key:`Mod-Alt-ArrowDown`,run:At},{key:`Escape`,run:jt},{key:`Mod-Enter`,run:Xt},{key:`Alt-l`,mac:`Ctrl-l`,run:Et},{key:`Mod-i`,run:Dt,preventDefault:!0},{key:`Mod-[`,run:en},{key:`Mod-]`,run:$t},{key:`Mod-Alt-\\`,run:Qt},{key:`Shift-Mod-k`,run:qt},{key:`Shift-Mod-\\`,run:et},{key:`Mod-/`,run:de},{key:`Alt-A`,run:pe},{key:`Ctrl-m`,mac:`Shift-Alt-m`,run:tn}].concat(rn),on={json:async()=>{let{json:t}=await e(async()=>{let{json:e}=await import(`./dist-DB19jrs9.js`);return{json:e}},__vite__mapDeps([0,1,2]));return t()},markdown:async()=>{let{markdown:t}=await e(async()=>{let{markdown:e}=await import(`./dist-BETSJsV5.js`);return{markdown:e}},__vite__mapDeps([3,4,1,2]));return t()},html:async()=>{let{html:t}=await e(async()=>{let{html:e}=await import(`./dist-Ck3Vla0r.js`);return{html:e}},__vite__mapDeps([4,1,2]));return t()}};function sn(e){return e?le.define([{tag:v.keyword,color:`#d19afc`},{tag:v.string,color:`#87d68d`},{tag:v.number,color:`#f5a76c`},{tag:v.comment,color:`#8a8a8a`,fontStyle:`italic`},{tag:v.punctuation,color:`#7cc5e9`},{tag:v.function(v.variableName),color:`#7ea8f8`},{tag:v.propertyName,color:`#7ea8f8`},{tag:v.bool,color:`#f5a76c`},{tag:v.null,color:`#f5a76c`},{tag:v.operator,color:`#7cc5e9`},{tag:v.typeName,color:`#d19afc`},{tag:v.tagName,color:`#d19afc`},{tag:v.attributeName,color:`#87d68d`},{tag:v.attributeValue,color:`#87d68d`},{tag:v.heading,fontWeight:`bold`},{tag:v.emphasis,fontStyle:`italic`},{tag:v.strong,fontWeight:`bold`}]):le.define([{tag:v.keyword,color:`#8839ef`},{tag:v.string,color:`#40a02b`},{tag:v.number,color:`#d05d1a`},{tag:v.comment,color:`#8a8a8a`,fontStyle:`italic`},{tag:v.punctuation,color:`#1e66f5`},{tag:v.function(v.variableName),color:`#2b6cb0`},{tag:v.propertyName,color:`#2b6cb0`},{tag:v.bool,color:`#d05d1a`},{tag:v.null,color:`#d05d1a`},{tag:v.operator,color:`#1e66f5`},{tag:v.typeName,color:`#8839ef`},{tag:v.tagName,color:`#8839ef`},{tag:v.attributeName,color:`#40a02b`},{tag:v.attributeValue,color:`#40a02b`},{tag:v.heading,fontWeight:`bold`},{tag:v.emphasis,fontStyle:`italic`},{tag:v.strong,fontWeight:`bold`}])}function cn(e){return!(e.closest?.(`.theme-light`)||document.documentElement.classList.contains(`theme-light`))}function ln(){return n.theme({"&":{fontSize:`13px`,border:`1px solid var(--s2-border-subtle, #333)`,borderRadius:`var(--s2-radius-default, 8px)`,overflow:`hidden`},"&.cm-focused":{outline:`none`,borderColor:`var(--s2-border-focus, var(--s2-accent, #3562ff))`},".cm-content":{fontFamily:`var(--s2-font-mono, "SF Mono", "Fira Code", Consolas, monospace)`,caretColor:`var(--s2-accent, #3562ff)`,padding:`8px 0`},".cm-scroller":{overflow:`auto`},".cm-cursor, .cm-dropCursor":{borderLeftColor:`var(--s2-accent, #3562ff)`},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground":{background:`color-mix(in srgb, var(--s2-accent, #3562ff) 20%, transparent)`},".cm-activeLine":{background:`color-mix(in srgb, var(--s2-accent, #3562ff) 5%, transparent)`},".cm-gutters":{backgroundColor:`var(--s2-bg-layer-1, #1a1a1a)`,color:`var(--s2-content-tertiary, #5a5a5a)`,borderRight:`none`,borderRadius:`var(--s2-radius-default, 8px) 0 0 var(--s2-radius-default, 8px)`},".cm-lineNumbers .cm-gutterElement":{padding:`0 8px 0 12px`,minWidth:`32px`},".cm-placeholder":{color:`var(--s2-content-tertiary, #5a5a5a)`,fontStyle:`italic`}})}var un=`
|
|
3
3
|
:host {
|
|
4
4
|
display: block;
|
|
5
5
|
background: var(--s2-bg-layer-2, var(--s2-gray-75, #252525));
|
package/dist/ui/index.html
CHANGED
|
@@ -5,24 +5,27 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>slicc</title>
|
|
7
7
|
<link rel="icon" type="image/png" href="/logos/sliccy-color-1scoops-32x32.png" />
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-BVA4YIGJ.js"></script>
|
|
9
9
|
<link rel="modulepreload" crossorigin href="/assets/chunk-jRWAZmH_.js">
|
|
10
10
|
<link rel="modulepreload" crossorigin href="/assets/preload-helper-ca-nBW7U.js">
|
|
11
11
|
<link rel="modulepreload" crossorigin href="/assets/logger-GnnuzSDq.js">
|
|
12
|
-
<link rel="modulepreload" crossorigin href="/assets/path-utils-
|
|
13
|
-
<link rel="modulepreload" crossorigin href="/assets/fs-
|
|
14
|
-
<link rel="modulepreload" crossorigin href="/assets/simple-options-
|
|
15
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
16
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
17
|
-
<link rel="modulepreload" crossorigin href="/assets/db-
|
|
12
|
+
<link rel="modulepreload" crossorigin href="/assets/path-utils-DAY6ORUp.js">
|
|
13
|
+
<link rel="modulepreload" crossorigin href="/assets/fs-B0gD1h31.js">
|
|
14
|
+
<link rel="modulepreload" crossorigin href="/assets/simple-options-CDIijiMb.js">
|
|
15
|
+
<link rel="modulepreload" crossorigin href="/assets/hash-BN8UQrrC.js">
|
|
16
|
+
<link rel="modulepreload" crossorigin href="/assets/browser-CFDl2kC3.js">
|
|
17
|
+
<link rel="modulepreload" crossorigin href="/assets/global-db-Cui6Md0w.js">
|
|
18
|
+
<link rel="modulepreload" crossorigin href="/assets/db-QbwB670D.js">
|
|
18
19
|
<link rel="modulepreload" crossorigin href="/assets/types-U7svdiTt.js">
|
|
19
|
-
<link rel="modulepreload" crossorigin href="/assets/fetch-body-
|
|
20
|
-
<link rel="modulepreload" crossorigin href="/assets/magick-wasm-
|
|
21
|
-
<link rel="modulepreload" crossorigin href="/assets/skills-
|
|
20
|
+
<link rel="modulepreload" crossorigin href="/assets/fetch-body-DPMYsjzA.js">
|
|
21
|
+
<link rel="modulepreload" crossorigin href="/assets/magick-wasm-DpuDwl7G.js">
|
|
22
|
+
<link rel="modulepreload" crossorigin href="/assets/skills-DShRVTVQ.js">
|
|
22
23
|
<link rel="modulepreload" crossorigin href="/assets/__vite-browser-external-BD_HvDfc.js">
|
|
23
|
-
<link rel="modulepreload" crossorigin href="/assets/index-
|
|
24
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
25
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
24
|
+
<link rel="modulepreload" crossorigin href="/assets/index-BVA4YIGJ.js">
|
|
25
|
+
<link rel="modulepreload" crossorigin href="/assets/headers-qDMOQQGF.js">
|
|
26
|
+
<link rel="modulepreload" crossorigin href="/assets/openai-codex-responses-DpZthon5.js">
|
|
27
|
+
<link rel="modulepreload" crossorigin href="/assets/openai-D4NSaQIs.js">
|
|
28
|
+
<link rel="modulepreload" crossorigin href="/assets/provider-settings-ciu6URbL.js">
|
|
26
29
|
<link rel="stylesheet" crossorigin href="/assets/index-Bue9YB3a.css">
|
|
27
30
|
</head>
|
|
28
31
|
<body>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(()=>{function c(e){if(!e)return{};let r={};for(let[t,n]of Object.entries(e)){let o=t.toLowerCase();o==="cookie"?r["X-Proxy-Cookie"]=n:o==="origin"?r["X-Proxy-Origin"]=n:o==="referer"?r["X-Proxy-Referer"]=n:o.startsWith("proxy-")?r[`X-Proxy-${t}`]=n:r[t]=n}return r}var f="/api/fetch-proxy",d="x-bypass-llm-proxy";self.importScripts("/preview-sw.js");self.addEventListener("install",e=>{e.waitUntil(self.skipWaiting())});self.addEventListener("activate",e=>{e.waitUntil(self.clients.claim())});self.addEventListener("fetch",e=>{let r=e.request;if(r.headers.get(d)==="1")return;let t;try{t=new URL(r.url)}catch{return}t.origin!==self.location.origin&&(t.protocol!=="http:"&&t.protocol!=="https:"||e.respondWith(l(r)))});async function l(e){let r=e.url,t={};e.headers.forEach((i,s)=>{s.toLowerCase()!==d&&(t[s]=i)});let n=c(t),o=new Headers;for(let[i,s]of Object.entries(n))o.set(i,s);o.set("X-Target-URL",r);let a={method:e.method,headers:o,cache:"no-store",credentials:"omit",redirect:"manual",signal:e.signal,body:e.method==="GET"||e.method==="HEAD"?void 0:e.body,duplex:e.method==="GET"||e.method==="HEAD"?void 0:"half"};return await fetch(f,a)}})();
|
|
@@ -5,24 +5,27 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>slicc</title>
|
|
7
7
|
<link rel="icon" type="image/png" href="/logos/sliccy-color-1scoops-32x32.png" />
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-BVA4YIGJ.js"></script>
|
|
9
9
|
<link rel="modulepreload" crossorigin href="/assets/chunk-jRWAZmH_.js">
|
|
10
10
|
<link rel="modulepreload" crossorigin href="/assets/preload-helper-ca-nBW7U.js">
|
|
11
11
|
<link rel="modulepreload" crossorigin href="/assets/logger-GnnuzSDq.js">
|
|
12
|
-
<link rel="modulepreload" crossorigin href="/assets/path-utils-
|
|
13
|
-
<link rel="modulepreload" crossorigin href="/assets/fs-
|
|
14
|
-
<link rel="modulepreload" crossorigin href="/assets/simple-options-
|
|
15
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
16
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
17
|
-
<link rel="modulepreload" crossorigin href="/assets/db-
|
|
12
|
+
<link rel="modulepreload" crossorigin href="/assets/path-utils-DAY6ORUp.js">
|
|
13
|
+
<link rel="modulepreload" crossorigin href="/assets/fs-B0gD1h31.js">
|
|
14
|
+
<link rel="modulepreload" crossorigin href="/assets/simple-options-CDIijiMb.js">
|
|
15
|
+
<link rel="modulepreload" crossorigin href="/assets/hash-BN8UQrrC.js">
|
|
16
|
+
<link rel="modulepreload" crossorigin href="/assets/browser-CFDl2kC3.js">
|
|
17
|
+
<link rel="modulepreload" crossorigin href="/assets/global-db-Cui6Md0w.js">
|
|
18
|
+
<link rel="modulepreload" crossorigin href="/assets/db-QbwB670D.js">
|
|
18
19
|
<link rel="modulepreload" crossorigin href="/assets/types-U7svdiTt.js">
|
|
19
|
-
<link rel="modulepreload" crossorigin href="/assets/fetch-body-
|
|
20
|
-
<link rel="modulepreload" crossorigin href="/assets/magick-wasm-
|
|
21
|
-
<link rel="modulepreload" crossorigin href="/assets/skills-
|
|
20
|
+
<link rel="modulepreload" crossorigin href="/assets/fetch-body-DPMYsjzA.js">
|
|
21
|
+
<link rel="modulepreload" crossorigin href="/assets/magick-wasm-DpuDwl7G.js">
|
|
22
|
+
<link rel="modulepreload" crossorigin href="/assets/skills-DShRVTVQ.js">
|
|
22
23
|
<link rel="modulepreload" crossorigin href="/assets/__vite-browser-external-BD_HvDfc.js">
|
|
23
|
-
<link rel="modulepreload" crossorigin href="/assets/index-
|
|
24
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
25
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
24
|
+
<link rel="modulepreload" crossorigin href="/assets/index-BVA4YIGJ.js">
|
|
25
|
+
<link rel="modulepreload" crossorigin href="/assets/headers-qDMOQQGF.js">
|
|
26
|
+
<link rel="modulepreload" crossorigin href="/assets/openai-codex-responses-DpZthon5.js">
|
|
27
|
+
<link rel="modulepreload" crossorigin href="/assets/openai-D4NSaQIs.js">
|
|
28
|
+
<link rel="modulepreload" crossorigin href="/assets/provider-settings-ciu6URbL.js">
|
|
26
29
|
<link rel="stylesheet" crossorigin href="/assets/index-Bue9YB3a.css">
|
|
27
30
|
</head>
|
|
28
31
|
<body>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sliccy",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.23.0",
|
|
4
4
|
"description": "Browser-based coding agent with thin CLI server",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -58,14 +58,15 @@
|
|
|
58
58
|
"@playwright/test": "^1.58.2",
|
|
59
59
|
"@semantic-release/commit-analyzer": "13.0.1",
|
|
60
60
|
"@semantic-release/exec": "7.1.0",
|
|
61
|
+
"@semantic-release/git": "10.0.1",
|
|
61
62
|
"@semantic-release/github": "12.0.6",
|
|
62
63
|
"@semantic-release/npm": "13.1.5",
|
|
63
64
|
"@semantic-release/release-notes-generator": "14.1.0",
|
|
64
65
|
"@types/node": "^24.0.0",
|
|
65
66
|
"esbuild": "0.28.0",
|
|
66
|
-
"eslint": "10.
|
|
67
|
+
"eslint": "10.3.0",
|
|
67
68
|
"eslint-config-prettier": "10.1.8",
|
|
68
|
-
"globals": "17.
|
|
69
|
+
"globals": "17.6.0",
|
|
69
70
|
"husky": "9.1.7",
|
|
70
71
|
"lint-staged": "16.4.0",
|
|
71
72
|
"prettier": "3.8.3",
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export declare function updateManifestVersionContents(contents: string, version: string): string;
|
|
2
|
-
export declare function writeManifestVersion(manifestPath: string, version: string): void;
|
|
3
|
-
export declare function buildVfsRootVersionContents(version: string, releasedAt: string): string;
|
|
4
|
-
export declare function writeVfsRootVersion(versionFilePath: string, version: string, releasedAt: string): void;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { readFileSync, writeFileSync } from 'fs';
|
|
2
|
-
import { resolve } from 'path';
|
|
3
|
-
import { fileURLToPath } from 'url';
|
|
4
|
-
const __dirname = fileURLToPath(new URL('.', import.meta.url));
|
|
5
|
-
const PROJECT_ROOT = resolve(__dirname, '..', '..');
|
|
6
|
-
export function updateManifestVersionContents(contents, version) {
|
|
7
|
-
const manifest = JSON.parse(contents);
|
|
8
|
-
if (typeof manifest.version !== 'string') {
|
|
9
|
-
throw new Error('manifest.json must contain a string version before semantic-release can update it.');
|
|
10
|
-
}
|
|
11
|
-
manifest.version = version;
|
|
12
|
-
return `${JSON.stringify(manifest, null, 2)}\n`;
|
|
13
|
-
}
|
|
14
|
-
export function writeManifestVersion(manifestPath, version) {
|
|
15
|
-
writeFileSync(manifestPath, updateManifestVersionContents(readFileSync(manifestPath, 'utf8'), version));
|
|
16
|
-
}
|
|
17
|
-
export function buildVfsRootVersionContents(version, releasedAt) {
|
|
18
|
-
const payload = { version, releasedAt };
|
|
19
|
-
return `${JSON.stringify(payload, null, 2)}\n`;
|
|
20
|
-
}
|
|
21
|
-
export function writeVfsRootVersion(versionFilePath, version, releasedAt) {
|
|
22
|
-
writeFileSync(versionFilePath, buildVfsRootVersionContents(version, releasedAt));
|
|
23
|
-
}
|
|
24
|
-
function main() {
|
|
25
|
-
const version = process.argv[2];
|
|
26
|
-
if (!version) {
|
|
27
|
-
throw new Error('Usage: node dist/node-server/sync-release-version.js <version>');
|
|
28
|
-
}
|
|
29
|
-
writeManifestVersion(resolve(PROJECT_ROOT, 'packages/chrome-extension/manifest.json'), version);
|
|
30
|
-
console.log(`Updated manifest.json version to ${version}`);
|
|
31
|
-
const releasedAt = new Date().toISOString();
|
|
32
|
-
writeVfsRootVersion(resolve(PROJECT_ROOT, 'packages/vfs-root/shared/version.json'), version, releasedAt);
|
|
33
|
-
console.log(`Updated vfs-root/shared/version.json to ${version} (releasedAt=${releasedAt})`);
|
|
34
|
-
}
|
|
35
|
-
if (process.argv[1] && fileURLToPath(import.meta.url) === resolve(process.argv[1])) {
|
|
36
|
-
try {
|
|
37
|
-
main();
|
|
38
|
-
}
|
|
39
|
-
catch (error) {
|
|
40
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
41
|
-
console.error(`[sync-release-version] ${message}`);
|
|
42
|
-
process.exit(1);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e,d as t,n,r}from"./simple-options-CRMUB9za.js";import{t as i}from"./openai-CQsomflW.js";import{d as a}from"./index-n7dM8Ny6.js";import{t as o}from"./headers-DkHU-pcw.js";import{n as s,r as c,t as l}from"./openai-responses-shared-D8Vix6-m.js";var u=`v1`,d=new Set([`openai`,`openai-codex`,`opencode`,`azure-openai-responses`]);function f(e){let t=new Map;if(!e)return t;for(let n of e.split(`,`)){let e=n.trim();if(!e)continue;let[r,i]=e.split(`=`,2);!r||!i||t.set(r.trim(),i.trim())}return t}function p(e,t){return t?.azureDeploymentName?t.azureDeploymentName:f({}.AZURE_OPENAI_DEPLOYMENT_NAME_MAP).get(e.id)||e.id}var m=(t,n,r)=>{let i=new e;return(async()=>{let e=p(t,r),s={role:`assistant`,content:[],api:`azure-openai-responses`,provider:t.provider,model:t.id,usage:{input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},stopReason:`stop`,timestamp:Date.now()};try{let l=y(t,r?.apiKey||a(t.provider)||``,r),u=b(t,n,r,e),d=await r?.onPayload?.(u,t);d!==void 0&&(u=d);let f={...r?.signal?{signal:r.signal}:{},...r?.timeoutMs===void 0?{}:{timeout:r.timeoutMs},...r?.maxRetries===void 0?{}:{maxRetries:r.maxRetries}},{data:p,response:m}=await l.responses.create(u,f).withResponse();if(await r?.onResponse?.({status:m.status,headers:o(m.headers)},t),i.push({type:`start`,partial:s}),await c(p,s,i,t),r?.signal?.aborted)throw Error(`Request was aborted`);if(s.stopReason===`aborted`||s.stopReason===`error`)throw Error(`An unknown error occurred`);i.push({type:`done`,reason:s.stopReason,message:s}),i.end()}catch(e){for(let e of s.content)delete e.index,delete e.partialJson;s.stopReason=r?.signal?.aborted?`aborted`:`error`,s.errorMessage=e instanceof Error?e.message:JSON.stringify(e),i.push({type:`error`,reason:s.stopReason,error:s}),i.end()}})(),i},h=(e,i,o)=>{let s=o?.apiKey||a(e.provider);if(!s)throw Error(`No API key for provider: ${e.provider}`);let c=n(e,o,s),l=t(e)?o?.reasoning:r(o?.reasoning);return m(e,i,{...c,reasoningEffort:l})};function g(e){let t=e.trim().replace(/\/+$/,``),n;try{n=new URL(t)}catch{throw Error(`Invalid Azure OpenAI base URL: ${e}`)}let r=n.hostname.endsWith(`.openai.azure.com`)||n.hostname.endsWith(`.cognitiveservices.azure.com`),i=n.pathname.replace(/\/+$/,``);return r&&(i===``||i===`/`||i===`/openai`)&&(n.pathname=`/openai/v1`,n.search=``),n.toString().replace(/\/+$/,``)}function _(e){return`https://${e}.openai.azure.com/openai/v1`}function v(e,t){let n=t?.azureApiVersion||{}.AZURE_OPENAI_API_VERSION||u,r=t?.azureBaseUrl?.trim()||{}.AZURE_OPENAI_BASE_URL?.trim()||void 0,i=t?.azureResourceName||{}.AZURE_OPENAI_RESOURCE_NAME,a=r;if(!a&&i&&(a=_(i)),!a&&e.baseUrl&&(a=e.baseUrl),!a)throw Error(`Azure OpenAI base URL is required. Set AZURE_OPENAI_BASE_URL or AZURE_OPENAI_RESOURCE_NAME, or pass azureBaseUrl, azureResourceName, or model.baseUrl.`);return{baseUrl:g(a),apiVersion:n}}function y(e,t,n){if(!t){if(!{}.AZURE_OPENAI_API_KEY)throw Error(`Azure OpenAI API key is required. Set AZURE_OPENAI_API_KEY environment variable or pass it as an argument.`);t={}.AZURE_OPENAI_API_KEY}let r={...e.headers};n?.headers&&Object.assign(r,n.headers);let{baseUrl:a,apiVersion:o}=v(e,n);return new i({apiKey:t,apiVersion:o,dangerouslyAllowBrowser:!0,defaultHeaders:r,baseURL:a})}function b(e,t,n,r){let i={model:r,input:l(e,t,d),stream:!0,prompt_cache_key:n?.sessionId};return n?.maxTokens&&(i.max_output_tokens=n?.maxTokens),n?.temperature!==void 0&&(i.temperature=n?.temperature),t.tools&&t.tools.length>0&&(i.tools=s(t.tools)),e.reasoning&&(n?.reasoningEffort||n?.reasoningSummary?(i.reasoning={effort:n?.reasoningEffort||`medium`,summary:n?.reasoningSummary||`auto`},i.include=[`reasoning.encrypted_content`]):i.reasoning={effort:`none`}),i}export{m as streamAzureOpenAIResponses,h as streamSimpleAzureOpenAIResponses};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e,n as t,r as n,s as r}from"./simple-options-CRMUB9za.js";import{d as i}from"./index-n7dM8Ny6.js";import{t as a}from"./sanitize-unicode-BD2XKRoV.js";import{a as o,i as s,n as c,o as l,r as u,s as d,t as f}from"./google-shared-nj0IYXjb.js";var p=0,m=(t,n,a)=>{let o=new e;return(async()=>{let e={role:`assistant`,content:[],api:`google-generative-ai`,provider:t.provider,model:t.id,usage:{input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},stopReason:`stop`,timestamp:Date.now()};try{let c=g(t,a?.apiKey||i(t.provider)||``,a?.headers),d=_(t,n,a),f=await a?.onPayload?.(d,t);f!==void 0&&(d=f);let m=await c.models.generateContentStream(d);o.push({type:`start`,partial:e});let h=null,v=e.content,y=()=>v.length-1;for await(let n of m){e.responseId||=n.responseId;let i=n.candidates?.[0];if(i?.content?.parts)for(let t of i.content.parts){if(t.text!==void 0){let n=u(t);(!h||n&&h.type!==`thinking`||!n&&h.type!==`text`)&&(h&&(h.type===`text`?o.push({type:`text_end`,contentIndex:v.length-1,content:h.text,partial:e}):o.push({type:`thinking_end`,contentIndex:y(),content:h.thinking,partial:e})),n?(h={type:`thinking`,thinking:``,thinkingSignature:void 0},e.content.push(h),o.push({type:`thinking_start`,contentIndex:y(),partial:e})):(h={type:`text`,text:``},e.content.push(h),o.push({type:`text_start`,contentIndex:y(),partial:e}))),h.type===`thinking`?(h.thinking+=t.text,h.thinkingSignature=l(h.thinkingSignature,t.thoughtSignature),o.push({type:`thinking_delta`,contentIndex:y(),delta:t.text,partial:e})):(h.text+=t.text,h.textSignature=l(h.textSignature,t.thoughtSignature),o.push({type:`text_delta`,contentIndex:y(),delta:t.text,partial:e}))}if(t.functionCall){h&&=(h.type===`text`?o.push({type:`text_end`,contentIndex:y(),content:h.text,partial:e}):o.push({type:`thinking_end`,contentIndex:y(),content:h.thinking,partial:e}),null);let n=t.functionCall.id,r={type:`toolCall`,id:!n||e.content.some(e=>e.type===`toolCall`&&e.id===n)?`${t.functionCall.name}_${Date.now()}_${++p}`:n,name:t.functionCall.name||``,arguments:t.functionCall.args??{},...t.thoughtSignature&&{thoughtSignature:t.thoughtSignature}};e.content.push(r),o.push({type:`toolcall_start`,contentIndex:y(),partial:e}),o.push({type:`toolcall_delta`,contentIndex:y(),delta:JSON.stringify(r.arguments),partial:e}),o.push({type:`toolcall_end`,contentIndex:y(),toolCall:r,partial:e})}}i?.finishReason&&(e.stopReason=s(i.finishReason),e.content.some(e=>e.type===`toolCall`)&&(e.stopReason=`toolUse`)),n.usageMetadata&&(e.usage={input:(n.usageMetadata.promptTokenCount||0)-(n.usageMetadata.cachedContentTokenCount||0),output:(n.usageMetadata.candidatesTokenCount||0)+(n.usageMetadata.thoughtsTokenCount||0),cacheRead:n.usageMetadata.cachedContentTokenCount||0,cacheWrite:0,totalTokens:n.usageMetadata.totalTokenCount||0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},r(t,e.usage))}if(h&&(h.type===`text`?o.push({type:`text_end`,contentIndex:y(),content:h.text,partial:e}):o.push({type:`thinking_end`,contentIndex:y(),content:h.thinking,partial:e})),a?.signal?.aborted)throw Error(`Request was aborted`);if(e.stopReason===`aborted`||e.stopReason===`error`)throw Error(`An unknown error occurred`);o.push({type:`done`,reason:e.stopReason,message:e}),o.end()}catch(t){for(let t of e.content)`index`in t&&delete t.index;e.stopReason=a?.signal?.aborted?`aborted`:`error`,e.errorMessage=t instanceof Error?t.message:JSON.stringify(t),o.push({type:`error`,reason:e.stopReason,error:e}),o.end()}})(),o},h=(e,r,a)=>{let o=a?.apiKey||i(e.provider);if(!o)throw Error(`No API key for provider: ${e.provider}`);let s=t(e,a,o);if(!a?.reasoning)return m(e,r,{...s,thinking:{enabled:!1}});let c=n(a.reasoning),l=e;return y(l)||b(l)||v(l)?m(e,r,{...s,thinking:{enabled:!0,level:S(c,l)}}):m(e,r,{...s,thinking:{enabled:!0,budgetTokens:C(l,c,a.thinkingBudgets)}})};function g(e,t,n){let r={};return e.baseUrl&&(r.baseUrl=e.baseUrl,r.apiVersion=``),(e.headers||n)&&(r.headers={...e.headers,...n}),new d({apiKey:t,httpOptions:Object.keys(r).length>0?r:void 0})}function _(e,t,n={}){let r=f(e,t),i={};n.temperature!==void 0&&(i.temperature=n.temperature),n.maxTokens!==void 0&&(i.maxOutputTokens=n.maxTokens);let s={...Object.keys(i).length>0&&i,...t.systemPrompt&&{systemInstruction:a(t.systemPrompt)},...t.tools&&t.tools.length>0&&{tools:c(t.tools)}};if(t.tools&&t.tools.length>0&&n.toolChoice?s.toolConfig={functionCallingConfig:{mode:o(n.toolChoice)}}:s.toolConfig=void 0,n.thinking?.enabled&&e.reasoning){let e={includeThoughts:!0};n.thinking.level===void 0?n.thinking.budgetTokens!==void 0&&(e.thinkingBudget=n.thinking.budgetTokens):e.thinkingLevel=n.thinking.level,s.thinkingConfig=e}else e.reasoning&&n.thinking&&!n.thinking.enabled&&(s.thinkingConfig=x(e));if(n.signal){if(n.signal.aborted)throw Error(`Request aborted`);s.abortSignal=n.signal}return{model:e.id,contents:r,config:s}}function v(e){return/gemma-?4/.test(e.id.toLowerCase())}function y(e){return/gemini-3(?:\.\d+)?-pro/.test(e.id.toLowerCase())}function b(e){return/gemini-3(?:\.\d+)?-flash/.test(e.id.toLowerCase())}function x(e){return y(e)?{thinkingLevel:`LOW`}:b(e)||v(e)?{thinkingLevel:`MINIMAL`}:{thinkingBudget:0}}function S(e,t){if(y(t))switch(e){case`minimal`:case`low`:return`LOW`;case`medium`:case`high`:return`HIGH`}if(v(t))switch(e){case`minimal`:case`low`:return`MINIMAL`;case`medium`:case`high`:return`HIGH`}switch(e){case`minimal`:return`MINIMAL`;case`low`:return`LOW`;case`medium`:return`MEDIUM`;case`high`:return`HIGH`}}function C(e,t,n){return n?.[t]===void 0?e.id.includes(`2.5-pro`)?{minimal:128,low:2048,medium:8192,high:32768}[t]:e.id.includes(`2.5-flash-lite`)?{minimal:512,low:2048,medium:8192,high:24576}[t]:e.id.includes(`2.5-flash`)?{minimal:128,low:2048,medium:8192,high:24576}[t]:-1:n[t]}export{m as streamGoogle,h as streamSimpleGoogle};
|