@agentdocumentformat/cli 0.8.3 → 0.8.5
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/README.md +55 -4
- package/dist/adf.mjs +16 -13
- package/dist/chunks/{App-UHLJRFZJ.mjs → App-XOPHZTGN.mjs} +336 -296
- package/dist/chunks/{auth-manager-TBNKCJ45.mjs → auth-manager-2YHTYI3C.mjs} +2 -1
- package/dist/chunks/{build-QF5W473T.mjs → build-BFOCXM5S.mjs} +1 -1
- package/dist/chunks/{chunk-RHBGCOS3.mjs → chunk-22ZGZFOV.mjs} +5 -16
- package/dist/chunks/chunk-26RK7T5L.mjs +20 -0
- package/dist/chunks/{chunk-D7A77SNL.mjs → chunk-3FWPIWYM.mjs} +1 -1
- package/dist/chunks/chunk-4T745GJA.mjs +431 -0
- package/dist/chunks/{chunk-WPT3FAFX.mjs → chunk-7ADDKFT5.mjs} +3 -30
- package/dist/chunks/chunk-A53XYNJL.mjs +26 -0
- package/dist/chunks/{chunk-MZRXFWPQ.mjs → chunk-AN6USKYQ.mjs} +40 -8
- package/dist/chunks/{chunk-2Z7X3UUR.mjs → chunk-DHO5Z6HP.mjs} +14 -12
- package/dist/chunks/{chunk-F5ELW46V.mjs → chunk-GJYMGPH4.mjs} +1 -0
- package/dist/chunks/chunk-HONGRUAE.mjs +175 -0
- package/dist/chunks/{chunk-KCIRFUZH.mjs → chunk-IHARCBZH.mjs} +10 -3
- package/dist/chunks/{chunk-AEAJDCVK.mjs → chunk-IM5JKLXO.mjs} +1 -1
- package/dist/chunks/chunk-J2N63ZUD.mjs +12 -0
- package/dist/chunks/{chunk-FUQRYTGX.mjs → chunk-JK6K2BMV.mjs} +9 -35
- package/dist/chunks/{chunk-75DC5EWN.mjs → chunk-KBXC5EHK.mjs} +1 -0
- package/dist/chunks/chunk-NRTRTR7C.mjs +43 -0
- package/dist/chunks/{chunk-BS3USVEA.mjs → chunk-P4G5ZEBI.mjs} +1 -1
- package/dist/chunks/{chunk-E7LC6SHP.mjs → chunk-RIAB37IS.mjs} +4 -2
- package/dist/chunks/{chunk-LVF2DRBR.mjs → chunk-TBMQOM7Y.mjs} +247 -610
- package/dist/chunks/{chunk-SOSPQPEN.mjs → chunk-TDRQG5UO.mjs} +1 -162
- package/dist/chunks/{chunk-OHTB4UW4.mjs → chunk-TPA2ITKV.mjs} +32 -18
- package/dist/chunks/{chunk-BHY7QDCM.mjs → chunk-UBWWGUMU.mjs} +1 -0
- package/dist/chunks/{chunk-3AT7IIP7.mjs → chunk-WZ6S3SQP.mjs} +1 -1
- package/dist/chunks/chunk-X6R32YVE.mjs +43 -0
- package/dist/chunks/chunk-XJWGENZ5.mjs +5903 -0
- package/dist/chunks/{chunk-F3WSCAJD.mjs → chunk-XP4U4A2W.mjs} +1 -1
- package/dist/chunks/chunk-XS46KYYY.mjs +31 -0
- package/dist/chunks/{chunk-HBOFZRUS.mjs → chunk-XZQVDY3U.mjs} +9 -1
- package/dist/chunks/chunk-ZECGH3LT.mjs +88 -0
- package/dist/chunks/{claude-subscription-EB4LAAVV.mjs → claude-subscription-X5EVR3Q4.mjs} +4 -3
- package/dist/chunks/{cli-UVIJAGRZ.mjs → cli-JPRYEY4J.mjs} +22 -7
- package/dist/chunks/{commands-KOMPXJZS.mjs → commands-TZW2FSXG.mjs} +5 -2
- package/dist/chunks/context-AZOIJOUG.mjs +5933 -0
- package/dist/chunks/{daemon-YHD7PUQI.mjs → daemon-YRG2QUF4.mjs} +3362 -6724
- package/dist/chunks/{daemon-control-MKN7G5M3.mjs → daemon-control-U4OGCAAJ.mjs} +4 -4
- package/dist/chunks/{devtools-H7CI2ZVG.mjs → devtools-AUZWFIPL.mjs} +1 -1
- package/dist/chunks/firewall-service-7RGJN4LD.mjs +163 -0
- package/dist/chunks/{open-3OR6WT4T.mjs → open-T3VGLWGF.mjs} +6 -5
- package/dist/chunks/{pipeline-executor-DRYEEFDR.mjs → pipeline-executor-MHRI7ODL.mjs} +6 -3
- package/dist/chunks/{remote-access-cli-GLEEP7DI.mjs → remote-access-cli-EFVCXFOY.mjs} +22 -6
- package/dist/chunks/{store-D2WLXEY2.mjs → store-37YHXFJ6.mjs} +4 -3
- package/dist/chunks/{tui-ZEI2NAQV.mjs → tui-NJKGFAKU.mjs} +12 -11
- package/dist/chunks/web-F4XHDGUX.mjs +149 -0
- package/dist/chunks/{whatsapp-YJFFVN4Q.mjs → whatsapp-J7PX7TKT.mjs} +1 -1
- package/package.json +4 -3
- package/web/assets/EditorPanel-YXnanvaL.js +161 -0
- package/web/assets/MeshGraphView-BZV40eAE.css +1 -0
- package/web/assets/MeshGraphView-ChgwUT3O.js +23 -0
- package/web/assets/SettingsPage-BTu2-Yon.js +6 -0
- package/web/assets/agent-window-DlJbRHzy.js +3 -0
- package/web/assets/agent.store-CGzsE0VA.js +1 -0
- package/web/assets/app.store-hw-ZYpyz.js +1 -0
- package/web/assets/core-DVezgdzc.js +12 -0
- package/web/assets/css-Z72CF80r.js +1 -0
- package/web/assets/diff-D97Zzqfu.js +1 -0
- package/web/assets/document.store-BcN3UW-e.js +1 -0
- package/web/assets/edit-recovery-uWM2umPk.js +3 -0
- package/web/assets/engine-javascript-CuxHA8oH.js +141 -0
- package/web/assets/github-dark-dimmed-DH5Ifo-i.js +1 -0
- package/web/assets/github-light-DAi9KRSo.js +1 -0
- package/web/assets/go-C27-OAKa.js +1 -0
- package/web/assets/html-BlS82ilI.js +1 -0
- package/web/assets/index-B0BKR-7b.js +1 -0
- package/web/assets/index-Ba28S-D0.js +1 -0
- package/web/assets/index-BxmMf4oH.js +2 -0
- package/web/assets/index-BxrG4na5.js +1 -0
- package/web/assets/index-C0ujp8ua.js +1 -0
- package/web/assets/index-CBCcou8F.js +13 -0
- package/web/assets/index-CuTaWSEs.css +1 -0
- package/web/assets/index-Cuc6TCV0.js +1 -0
- package/web/assets/index-DlQ8IXY2.js +3 -0
- package/web/assets/index-Dms-d0wP.js +1 -0
- package/web/assets/index-LwIi-F1W.js +11 -0
- package/web/assets/index-mW7p_CTU.js +6 -0
- package/web/assets/inter-tight-cyrillic-ext-wght-italic-BJqtfpQe.woff2 +0 -0
- package/web/assets/inter-tight-cyrillic-ext-wght-normal-okcGN4Nq.woff2 +0 -0
- package/web/assets/inter-tight-cyrillic-wght-italic-HmhN1gQv.woff2 +0 -0
- package/web/assets/inter-tight-cyrillic-wght-normal-BS41q_Tv.woff2 +0 -0
- package/web/assets/inter-tight-greek-ext-wght-italic-B_3RbJza.woff2 +0 -0
- package/web/assets/inter-tight-greek-ext-wght-normal-DQgQPNk4.woff2 +0 -0
- package/web/assets/inter-tight-greek-wght-italic-Bb1BGCmL.woff2 +0 -0
- package/web/assets/inter-tight-greek-wght-normal-sS1B39LI.woff2 +0 -0
- package/web/assets/inter-tight-latin-ext-wght-italic-DYqsmiDd.woff2 +0 -0
- package/web/assets/inter-tight-latin-ext-wght-normal-B4u9PlvR.woff2 +0 -0
- package/web/assets/inter-tight-latin-wght-italic-DiXukCDG.woff2 +0 -0
- package/web/assets/inter-tight-latin-wght-normal-DX-nOvPD.woff2 +0 -0
- package/web/assets/inter-tight-vietnamese-wght-italic-CiVF0Juh.woff2 +0 -0
- package/web/assets/inter-tight-vietnamese-wght-normal-TKKdAiBA.woff2 +0 -0
- package/web/assets/javascript-wDzz0qaB.js +1 -0
- package/web/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2 +0 -0
- package/web/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2 +0 -0
- package/web/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 +0 -0
- package/web/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
- package/web/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2 +0 -0
- package/web/assets/json-Cp-IABpG.js +1 -0
- package/web/assets/jsx-g9-lgVsj.js +1 -0
- package/web/assets/main-CR7cfmOT.js +319 -0
- package/web/assets/main-Zf3qnQYd.css +1 -0
- package/web/assets/markdown-Cvjx9yec.js +1 -0
- package/web/assets/message-queue.store-BMjJTJTP.js +2 -0
- package/web/assets/module-RjUF93sV.js +716 -0
- package/web/assets/native-48B9X9Wg.js +1 -0
- package/web/assets/orbital-render.worker-BovOTauk.js +1 -0
- package/web/assets/python-B6aJPvgy.js +1 -0
- package/web/assets/react-wKFncLeZ.js +1 -0
- package/web/assets/rust-DPvrY3IQ.js +1 -0
- package/web/assets/shellscript-Yzrsuije.js +1 -0
- package/web/assets/sql-DkvoVjww.js +1 -0
- package/web/assets/stix-two-text-cyrillic-wght-italic-BzL1BdzR.woff2 +0 -0
- package/web/assets/stix-two-text-cyrillic-wght-normal-CcrOj1MU.woff2 +0 -0
- package/web/assets/stix-two-text-greek-wght-italic-glgrbyRu.woff2 +0 -0
- package/web/assets/stix-two-text-greek-wght-normal-DAdwyhkq.woff2 +0 -0
- package/web/assets/stix-two-text-latin-ext-wght-italic--XhV508b.woff2 +0 -0
- package/web/assets/stix-two-text-latin-ext-wght-normal-BUpo8gM0.woff2 +0 -0
- package/web/assets/stix-two-text-latin-wght-italic-BDl6bBME.woff2 +0 -0
- package/web/assets/stix-two-text-latin-wght-normal-BTZaHlTl.woff2 +0 -0
- package/web/assets/stix-two-text-vietnamese-wght-italic-B1jFRJrJ.woff2 +0 -0
- package/web/assets/stix-two-text-vietnamese-wght-normal-CfS0RdBA.woff2 +0 -0
- package/web/assets/tsx-COt5Ahok.js +1 -0
- package/web/assets/typescript-BPQ3VLAy.js +1 -0
- package/web/assets/window-kind-35FHmfEB.js +1 -0
- package/web/assets/with-selector-CBB0rjuB.js +1 -0
- package/web/assets/yaml-Buea-lGh.js +1 -0
- package/web/index.html +15 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{c as T}from"./react-wKFncLeZ.js";import{useDocumentStore as l}from"./document.store-BcN3UW-e.js";import{u as h,s as v,M as y}from"./agent.store-CGzsE0VA.js";import{L as m}from"./index-LwIi-F1W.js";import{a as x,h as K,s as M,u as f,M as C,b as g,n as _,p as H,q as B}from"./message-queue.store-BMjJTJTP.js";import{i as p,w as V,a as z}from"./window-kind-35FHmfEB.js";const X=new Set(["image/png","image/jpeg","image/gif","image/webp"]),Y=new Set(["audio/wav","audio/mpeg","audio/mp3","audio/aiff","audio/aac","audio/ogg","audio/flac","audio/x-m4a","audio/webm"]),G=new Set(["video/mp4","video/mpeg","video/quicktime","video/webm"]);function J(e){return!!e&&X.has(e)}function Z(e){return!!e&&Y.has(e)}function ee(e){return!!e&&G.has(e)}function te(e){if(J(e))return"image";if(Z(e))return"audio";if(ee(e))return"video"}function ne(e){return e.type==="file_ref"&&!!e.file_ref&&typeof e.file_ref.path=="string"}function oe(e){return te(e.mime_type)}function N(e){const t=e.path.split("/");return t[t.length-1]||e.path}function $e(e){return`[deleted: ${N(e)}]`}function Me(e){return`adf-file://${e.split("/").map(encodeURIComponent).join("/")}`}function se(e){const t=oe(e);return{path:e.path,name:N(e),mime_type:e.mime_type,...t?{kind:t}:{},...e.deleted?{deleted:!0}:{}}}function ie(e){const t=[];for(const n of e)ne(n)&&t.push(se(n.file_ref));return t}function re(e,t=[]){const n=ie(e);if(!(n.length===0&&t.length===0))return{...t.length>0?{imagePreviewUrls:t}:{},...n.length>0?{attachments:n}:{}}}function j(e){const t=window.adfApi,n=e||m;if((typeof t?.runtimeId=="string"&&t.runtimeId?t.runtimeId:m)===n||typeof t?.runtime!="function")return t;let r=R.get(t);r||(r=new Map,R.set(t,r));let s=r.get(n);return s||(s=t.runtime(n),r.set(n,s)),s}const R=new WeakMap;function ae(){return p?window.adfApi:j(l.getState().runtimeId)}function ue(){return l.getState().runtimeId}function _e(){return p?void 0:ue()}function ke(e){return p||(e||m)===m}function S(){const{filePath:e,runtimeId:t}=l.getState();return e?p?e:x({runtimeId:t,filePath:e}):null}function k(e,t){return p?t:x({runtimeId:e,filePath:t})}function qe(){return l(e=>e.filePath?k(e.runtimeId,e.filePath):null)}function Ie(){return l(e=>e.runtimeId)}function q(e,t,...n){if(p)return window.adfApi?.invokeAgent(t,e,...n);const{runtimeId:o,filePath:r}=H(e);return j(o)?.invokeAgent(t,r,...n)}function b(e,t,n={}){if(n.automatic&&K(M(f.getState(),e,t)))return console.warn(`[queue] Not retrying the queue of ${e} (${t}) on this turn end: its send failed ${C} times; it waits for the owner`),!1;const o=f.getState().take(e,t);return o.length===0?!1:(ce(e,t,o),!0)}function ce(e,t,n){const o=n.flatMap(a=>a.content??[{type:"text",text:a.text}]),r=o.filter(a=>a.type==="text"&&a.text).map(a=>a.text).join(`
|
|
2
|
+
|
|
3
|
+
`),s=n.flatMap(a=>a.imagePreviewUrls??[]);let i=null,u=null;if(g(S(),e)){const a=h.getState();u=v(a,t).state,i=_(),a.addLogEntry({id:i,type:"user",content:r,timestamp:Date.now(),metadata:re(o,s)},t),a.setState("active",t)}const c=a=>{if(f.getState().restore(e,t,n,a),!i||!g(S(),e))return;const w=h.getState(),A=v(w,t);A.log.some(O=>O.id===i)&&w.setLog(A.log.filter(O=>O.id!==i),void 0,t),u&&A.state==="active"&&w.setState(u,t)},d=F(()=>q(e,r,o,t));if(!d){c(D);return}Promise.resolve(d).then(a=>{if(!a||a.success!==!1)return;const w=a.code==="daemon_exited"&&!g(S(),e);if(a.accepted&&!w){console.warn(`[queue] Queued message to ${e} (${t}) was delivered; its turn's end was not seen: ${a.error??"unknown"}`);return}c(w?U:a.error??"The agent did not take the message")},a=>c(a instanceof Error?a.message:String(a)))}const D="Studio is not connected to the agent runtime";function F(e){try{return e()}catch(t){return Promise.reject(t)}}const U="the ADF daemon exited before its turn ended";function W(e){return!e||e.success!==!1?null:e.code==="daemon_exited"?{reason:U,notSent:!0}:{reason:e.error??"The agent did not take the message",notSent:!e.accepted}}function Ee(e,t,n,o){const r=q(e,n);if(!r){o(`Orders not sent to ${t}: Studio is not connected to the agent runtime`);return}Promise.resolve(r).then(s=>{const i=W(s);i&&(console.warn(`[fleet] Orders to ${e}: ${i.reason}`),o(i.notSent?`Orders not sent to ${t}: ${i.reason}`:`Orders sent to ${t}, but ${i.reason}`))},s=>o(`Orders not sent to ${t}: ${s instanceof Error?s.message:String(s)}`))}function Re(e,t,n,o,r=[]){const s=F(()=>e?q(e,n,o,t):ae()?.invokeAgent(n,void 0,o,t)),i=(u,c)=>{if(console.warn(`[chat] Message to ${e??"the open agent"} (${t}) was not sent: ${u}`),e&&!g(S(),e)){const a={id:_(),text:n,content:o,...r.length>0?{imagePreviewUrls:r}:{}};f.getState().restore(e,t,[a],u);return}if(!c)return;const d=h.getState();d.addLogEntry({id:_(),type:"error",content:`Not sent: ${u}`,timestamp:Date.now()},t),v(d,t).state==="active"&&d.setState("idle",t)};if(!s){i(D,!0);return}Promise.resolve(s).then(u=>{const c=W(u);c?.notSent&&i(c.reason,u?.code!=="daemon_exited")},u=>i(u instanceof Error?u.message:String(u),!0))}function Qe(e,t,n,o,r,s){if(!e)return!1;const i=M(f.getState(),e,t).length>0;if(n!=="active"&&!i)return!1;if(f.getState().releaseHold(e,t),f.getState().enqueue(e,t,r),o==="off"){const u=M(f.getState(),e,t).length;return s?(console.info(`[queue] ${e} is off: starting it to send its ${u} queued messages (${t})`),s().then(c=>{c&&b(e,t)},c=>console.warn(`[queue] Starting ${e} for its queue failed: ${c instanceof Error?c.message:String(c)}`)),!0):(console.warn(`[queue] ${e} is off: its ${u} queued messages (${t}) wait until it is started`),!0)}return n==="idle"&&b(e,t),!0}function fe(e,t,n){for(const o of B(f.getState(),e))t[o]==="idle"&&(o!==y&&n==="off"||b(e,o,{automatic:!0}))}function Te(e,t,n){const o=new Map,r=(s,i,u)=>{if(typeof u!="string")return;const c=o.get(s)??{};c[i]=u,o.set(s,c)};for(const s of t){const i=s.payload;switch(s.type){case"agent_started":if(r(i.filePath,y,i.state),i.loopStates&&typeof i.loopStates=="object")for(const[u,c]of Object.entries(i.loopStates))r(i.filePath,u,c);break;case"agent_state_changed":r(i.filePath,y,i.state);break;case"agent_loop_state_changed":typeof i.loop=="string"&&r(i.filePath,i.loop,i.state);break}}for(const[s,i]of o)n(s)||fe(s,i,e.find(u=>g(u.filePath,s))?.state)}const de=[];function ge(e,t){return!t||t===m?e.agents:e.byRuntime[t]??de}const le=T(e=>({agents:[],byRuntime:{},setAgents:(t,n)=>e(o=>!n||n===m?{agents:t}:{byRuntime:{...o.byRuntime,[n]:t}}),reset:()=>e({agents:[],byRuntime:{}}),dropRuntime:t=>e(n=>{if(!(t in n.byRuntime))return n;const{[t]:o,...r}=n.byRuntime;return{byRuntime:r}})})),L=T(e=>({status:"opening",error:null,setOpening:()=>e({status:"opening",error:null}),setFailed:t=>e({status:"failed",error:t})}));async function me(e){L.getState().setOpening(),await I();let t=z;try{const n=await window.adfApi?.getCurrentFile?.();n?.filePath&&(t=n.filePath)}catch{}if(!t){$("This window has no agent file.");return}try{const n=await e(t);if(l.getState().filePath)return;$(n?.error??"The agent did not open.")}catch(n){$(n instanceof Error?n.message:String(n))}}function $(e){console.error("[AgentWindow] The agent did not open:",e),L.getState().setFailed(e),window.adfApi?.agentWindowOpenFailed?.().catch(()=>{})}function P(e,t,n=V){const o=[],r=n&&n!==m?{runtimeId:n}:{};for(const[s,i]of Object.entries(e)){const u=t&&g(t,s)?t:s;for(const[c,d]of Object.entries(i))d.length!==0&&o.push({filePath:u,...r,loop:c,messages:d.map(a=>({id:a.id,text:a.text,...a.content?{content:a.content}:{},...a.error?{error:a.error}:{},...a.failures?{failures:a.failures}:{}}))})}return o}let Q=null;function I(){return Q??=(async()=>{try{const e=await window.adfApi?.getWindowQueue?.();e?.length&&E(e,{deliver:!1})}catch{}})(),Q}function pe(){let e=!1,t=!1;const n=()=>{if(!e||t)return;const s=P(f.getState().queues,l.getState().filePath);window.adfApi?.syncQueuedMessages?.(s)?.catch(()=>{})},o=f.subscribe((s,i)=>{s.queues!==i.queues&&n()}),r=l.subscribe((s,i)=>{s.filePath!==i.filePath&&Object.keys(f.getState().queues).length>0&&n()});return I().then(()=>{e=!0,n()}),()=>{t=!0,o(),r()}}function E(e,t={}){const n=f.getState();for(const o of e){const r=k(o.runtimeId,o.filePath);for(const s of o.messages)n.enqueue(r,o.loop,{text:s.text,...s.content?{content:s.content}:{},...s.error?{error:s.error}:{},...s.failures?{failures:s.failures}:{}});console.info(`[queue] ${o.messages.length} queued message(s) of ${o.filePath}${o.runtimeId?` on ${o.runtimeId}`:""} (${o.loop}) taken over`),t.deliver!==!1&&we(o.runtimeId,r,o.loop)&&b(r,o.loop,{automatic:!0})}}function we(e,t,n){if(g(S(),t)){const r=h.getState();return r.state!=="off"&&v(r,n).state==="idle"}return n!==y?!1:ge(le.getState(),p?void 0:e).some(r=>g(k(e,r.filePath),t)&&r.state==="idle")}function Se(){const e=()=>{window.adfApi?.takeQueueHandover?.().then(n=>{n?.length&&E(n)}).catch(()=>{})},t=window.adfApi?.onQueueHandover?.(e);return e(),()=>t?.()}const xe=Object.freeze(Object.defineProperty({__proto__:null,adoptQueueHandover:E,openWindowAgent:me,queueEntries:P,restoreWindowQueue:I,startQueueHandover:Se,startQueueMirror:pe},Symbol.toStringTag,{value:"Module"}));export{j as a,qe as b,S as c,b as d,ge as e,le as f,fe as g,$e as h,Me as i,re as j,Re as k,ie as l,ce as m,_e as n,ae as o,ke as p,Qe as q,L as r,Ee as s,me as t,Ie as u,Te as v,k as w,pe as x,Se as y,xe as z};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as f}from"./react-wKFncLeZ.js";const d="main";function p(){return{state:"idle",log:[],logVersion:0,structuralVersion:0,earlierCount:0,pendingApprovals:new Map,pendingAsks:new Map,pendingSuspend:null,tokenUsage:{input:0,output:0},tokenEstimate:null}}const k=p();function V(i,l){return(l.type==="text"||l.type==="thinking")&&i.type===l.type&&i.id===l.id&&i.timestamp===l.timestamp&&i.metadata===l.metadata}function c(i){return!i||i===d}function A(i,l){return c(l)?i:i.sideLoops[l]??k}function v(i){let l=i.logVersion;for(const a in i.sideLoops)l+=i.sideLoops[a].logVersion;return l}const w=f((i,l)=>{const a=(e,n)=>{const o=l();if(c(e)){i(n(o));return}const t=e,r=o.sideLoops[t]??p();i({sideLoops:{...o.sideLoops,[t]:{...r,...n(r)}}})};return{state:"off",starting:!1,sessionId:null,log:[],logVersion:0,structuralVersion:0,earlierCount:0,sideLoops:{},config:null,configConflict:null,statusText:"",viewedLoop:d,tokenUsage:{input:0,output:0},tokenEstimate:null,pendingApprovals:new Map,pendingAsks:new Map,pendingSuspend:null,setState:(e,n)=>a(n,()=>({state:e})),setStarting:e=>i({starting:e}),setSessionId:e=>i({sessionId:e}),addLogEntry:(e,n)=>a(n,o=>({log:[...o.log,e],logVersion:o.logVersion+1,structuralVersion:o.structuralVersion+1})),settleOwnerCommand:(e,n)=>a(n,o=>({log:[...o.log.filter(t=>typeof t.metadata?.seq=="number"||t.metadata?.ownerCommand?.id!==e.metadata?.ownerCommand?.id),e],logVersion:o.logVersion+1,structuralVersion:o.structuralVersion+1})),removePendingOwnerCommand:(e,n)=>a(n,o=>({log:o.log.filter(t=>typeof t.metadata?.seq=="number"||t.metadata?.ownerCommand?.id!==e),logVersion:o.logVersion+1,structuralVersion:o.structuralVersion+1})),updateLastEntry:(e,n)=>a(n,o=>{const t=o.log[o.log.length-1];if(!t)return{};const r={...t};return e(r),o.log[o.log.length-1]=r,V(t,r)?{logVersion:o.logVersion+1}:{logVersion:o.logVersion+1,structuralVersion:o.structuralVersion+1}}),updateEntryAt:(e,n,o)=>a(o,t=>{const r=t.log[e];if(!r)return{};const s={...r};return n(s),t.log[e]=s,V(r,s)?{logVersion:t.logVersion+1}:{logVersion:t.logVersion+1,structuralVersion:t.structuralVersion+1}}),stampSeq:(e,n,o)=>{if(e.length===0)return;const t=A(l(),o);for(const r of e){const s=t.log[r];!s||typeof s.metadata?.seq=="number"||(s.metadata={...s.metadata,seq:n})}},setLog:(e,n,o)=>a(o,t=>({log:e,logVersion:t.logVersion+1,structuralVersion:t.structuralVersion+1,...n!==void 0?{earlierCount:n}:{}})),prependLog:(e,n,o)=>a(o,t=>({log:[...e,...t.log],logVersion:t.logVersion+1,structuralVersion:t.structuralVersion+1,earlierCount:n})),setEarlierCount:(e,n)=>a(n,()=>({earlierCount:e})),clearLog:e=>a(e,n=>({log:[],logVersion:n.logVersion+1,structuralVersion:n.structuralVersion+1,earlierCount:0})),dropLoop:e=>{if(c(e))return;const n=l();if(!(e in n.sideLoops))return;const o={...n.sideLoops};delete o[e],i({sideLoops:o,...n.viewedLoop===e?{viewedLoop:d}:{}})},setConfig:e=>i({config:e}),setConfigRevision:e=>i({configRevision:e}),setConfigConflict:e=>i({configConflict:e}),setStatusText:e=>i({statusText:e}),setTokenUsage:(e,n)=>a(n,()=>({tokenUsage:e})),setTokenEstimate:(e,n)=>a(n,()=>({tokenEstimate:e})),setViewedLoop:e=>i({viewedLoop:e||d}),addPendingApproval:(e,n,o,t)=>a(t,r=>{const s=new Map(r.pendingApprovals);return s.set(e,{...o,requestId:n}),{pendingApprovals:s}}),removePendingApproval:(e,n)=>a(n,o=>{const t=new Map(o.pendingApprovals);return t.delete(e),{pendingApprovals:t}}),markApprovalOutcome:(e,n,o)=>a(o,t=>{const r=t.log.findIndex(u=>u.id===e),s=t.log[r];return!s||s.metadata?.outOfBand!==!0?{}:(t.log[r]={...s,metadata:{...s.metadata,overrideOutcome:n==="completed"?"completed":n?"approved":"denied"}},{logVersion:t.logVersion+1,structuralVersion:t.structuralVersion+1})}),markApprovalEnded:(e,n,o)=>a(o,t=>{const r=t.log.findIndex(u=>u.id===e),s=t.log[r];return s?(t.log[r]={...s,metadata:{...s.metadata,approvalEndedBy:n}},{logVersion:t.logVersion+1,structuralVersion:t.structuralVersion+1}):{}}),addPendingAsk:(e,n,o,t)=>a(t,r=>{const s=new Map(r.pendingAsks);s.set(e,{requestId:n,questions:o});const u=r.log.findIndex(m=>m.id===e),g=r.log[u];return!g||g.metadata?.askRequestId===n?{pendingAsks:s}:(r.log[u]={...g,metadata:{...g.metadata,askRequestId:n}},{pendingAsks:s,logVersion:r.logVersion+1,structuralVersion:r.structuralVersion+1})}),removePendingAsk:(e,n)=>a(n,o=>{const t=new Map(o.pendingAsks);return t.delete(e),{pendingAsks:t}}),setAskDrafts:(e,n,o)=>a(o,t=>{const r=t.pendingAsks.get(e);if(!r)return{};const s=new Map(t.pendingAsks);return s.set(e,{...r,drafts:n}),{pendingAsks:s}}),clearPendingAsks:e=>a(e,n=>n.pendingAsks.size>0?{pendingAsks:new Map}:{}),setPendingSuspend:(e,n)=>a(n,()=>({pendingSuspend:e})),reset:()=>i({...p(),state:"off",starting:!1,sessionId:null,sideLoops:{},config:null,configRevision:void 0,configConflict:null,statusText:"",viewedLoop:d})}});export{d as M,v as a,A as s,w as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as c,o as u}from"./window-kind-35FHmfEB.js";import{L as G}from"./index-LwIi-F1W.js";import{c as U}from"./react-wKFncLeZ.js";const d=["🤖","🦾","📡","🔭","🔬","🧭","🧲","🔋","💡","🧬","🔮","⚡","🦊","🦉","🐙","🦅","🐺","🦡","🐢","🦫","🐝","🦋","🐋","🦈","🐉","🦑","🦜","🔨","🪛","🪚","🧰","📐","🏹","🔩","🌋","🗻","🌊","🌵","🍄","🌲","🎯","🎲","🧩","📦","💎","🧪","📜","🏺"];function W(t){let a=0;for(let e=0;e<t.length;e++)a=a*31+t.charCodeAt(e)|0;return d[Math.abs(a)%d.length]}const B="orbital";function ge(t){return t==="orbital"||t==="emoji"}const m=typeof Intl<"u"&&"Segmenter"in Intl?new Intl.Segmenter(void 0,{granularity:"grapheme"}):null;function K(t){return m?m.segment(t)[Symbol.iterator]().next().value?.segment??t:t}function Y(t,a){const e=t?.trim();return e?K(e):a?W(a):null}function he(t,a){return t==="emoji"?{kind:"emoji",emoji:Y(a.icon,a.iconSeed||a.seed)}:{kind:"orbital",seed:a.seed??null}}const x="adf-sidebar-width",ce="adf-sidebar-running-cap",ue="adf-right-panel-width",V="adf-logs-panel-height";function $(t,a,e){return Math.max(a,Math.min(e,t))}function p(t,a,e,n){try{const o=localStorage.getItem(t);if(o===null)return a;const i=Number(o);return Number.isFinite(i)?$(Math.round(i),e,n):a}catch{return a}}function de(t,a){try{localStorage.setItem(t,String(Math.round(a)))}catch{}}const f="system",l="-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif",P={"inter-tight":`'Inter Tight Variable', ${l}`,system:l,segoe:`'Segoe UI Variable', 'Segoe UI', ${l}`,inter:`'Inter', ${l}`,roboto:`'Roboto', ${l}`,sf:`-apple-system, 'SF Pro Text', 'SF Pro Display', ${l}`,calibri:`'Calibri', ${l}`,verdana:`'Verdana', ${l}`,georgia:"'Georgia', serif"},b=[{value:"system",label:"System",family:null},{value:"inter-tight",label:"Inter Tight",family:null},{value:"segoe",label:"Segoe UI",family:"Segoe UI"},{value:"inter",label:"Inter",family:"Inter"},{value:"roboto",label:"Roboto",family:"Roboto"},{value:"sf",label:"SF Pro",family:"SF Pro Text"},{value:"calibri",label:"Calibri",family:"Calibri"},{value:"verdana",label:"Verdana",family:"Verdana"},{value:"georgia",label:"Georgia (serif)",family:"Georgia"}];function j(t){return t==="custom"||b.some(a=>a.value===t)}function k(t,a){if(t!=="custom")return P[t];const e=a.trim().replace(/["']/g,"");return e?`'${e}', ${l}`:l}const T=[.9,1,1.1,1.25];function q(t){return typeof t=="number"&&T.includes(t)}const A=200,w=480,_=240,z=40,v=100,I=600,C=200,R="adf-chat-placement",F="adf-chat-width",M="adf-computer-match-tab",E="adf-dock-tab",D="adf-dock-agent-subtab",y="adf-dock-collapsed",O="adf-bottom-panel-open",L="adf-bottom-panel-tab",H="adf-logs-live",X=["overview","loop","inbox","files","agent"],J=["config","timers","identity","skills"],Q=["logs","tasks"];function g(t,a,e){try{const n=localStorage.getItem(t);return n!==null&&a.includes(n)?n:e}catch{return e}}function h(t,a){try{const e=localStorage.getItem(t);return e==="1"?!0:e==="0"?!1:a}catch{return a}}function r(t,a){try{localStorage.setItem(t,typeof a=="boolean"?a?"1":"0":a)}catch{}}function Z(){try{return localStorage.getItem(M)==="1"}catch{return!1}}function S(){try{return localStorage.getItem(R)==="center"?"center":"side"}catch{return"side"}}function ee(t){try{localStorage.setItem(R,t)}catch{}}function te(){try{return localStorage.getItem(F)==="full"?"full":"comfortable"}catch{return"comfortable"}}function ne(t){try{localStorage.setItem(F,t)}catch{}}const s=t=>t.chatPlacement==="center"&&!t.showMeshGraph,ae=t=>s(t)&&t.chatWidth==="comfortable",oe=t=>s(t)&&t.rightPanel==="loop"?"overview":t.rightPanel,le=t=>t.chatPlacement!=="center"&&!t.showMeshGraph,N=U((t,a)=>({showSettings:!1,pendingSettingsSection:null,pendingSettingsAnchor:null,rightPanel:g(E,X,"overview"),agentSubTab:g(D,J,"timers"),pendingConfigSection:null,pendingConfigLoop:null,chatPlacement:S(),chatWidth:te(),computerMatchTab:Z(),centerChatTabActive:S()==="center",sidebarCollapsed:!1,sidebarWidth:p(x,_,A,w),rightPanelCollapsed:h(y,!1),theme:"system",uiFont:f,uiFontCustom:"",uiScale:1,agentAvatars:B,passwordDialogOpen:!1,passwordDialogFilePath:null,ownerMismatchDialogOpen:!1,ownerMismatchFileOwnerDid:null,startingFilePaths:new Set,stoppingFilePaths:new Set,showMeshGraph:!1,showHome:!1,agentReviewDialogOpen:!1,agentReviewSummary:null,agentNeedsReview:!1,fileMoveWarning:null,providerSetupRequest:null,shareDialogFilePath:null,pendingFirstMessage:null,homeProviderId:null,homeFolder:null,homeRuntime:G,homeDraft:"",homeFiles:[],homeName:null,homeTemplateId:null,homeModelId:null,templateReview:null,showLogsPanel:h(O,!1),logsAutoRefresh:h(H,!0),logsPanelHeight:p(V,C,v,I),bottomPanelTab:g(L,Q,"logs"),shuttingDown:!1,setShowSettings:e=>{if(e&&c){u();return}t({showSettings:e,...e?{showMeshGraph:!1,showHome:!1}:{}})},openSettingsAt:(e,n)=>{if(c){u(e,n);return}t({showSettings:!0,showMeshGraph:!1,showHome:!1,pendingSettingsSection:e,pendingSettingsAnchor:n??null})},consumePendingSettingsAnchor:()=>{const e=a().pendingSettingsAnchor;return e&&t({pendingSettingsAnchor:null}),e},consumePendingSettingsSection:()=>{const e=a().pendingSettingsSection;return e&&t({pendingSettingsSection:null}),e},setRightPanel:e=>t({rightPanel:e}),setAgentSubTab:e=>t({agentSubTab:e}),setPendingConfigSection:e=>t({pendingConfigSection:e}),setPendingConfigLoop:e=>t({pendingConfigLoop:e}),setComputerMatchTab:e=>{try{localStorage.setItem(M,e?"1":"0")}catch{}t({computerMatchTab:e})},setChatPlacement:e=>{ee(e),t(n=>e==="center"?{chatPlacement:e,centerChatTabActive:!0,rightPanel:n.rightPanel==="loop"?"overview":n.rightPanel}:{chatPlacement:e,centerChatTabActive:!1,rightPanel:"loop",rightPanelCollapsed:!1})},setChatWidth:e=>{ne(e),t({chatWidth:e})},setCenterChatTabActive:e=>t({centerChatTabActive:e}),revealRightPanel:()=>t({rightPanelCollapsed:!1}),toggleSidebar:()=>t(e=>({sidebarCollapsed:!e.sidebarCollapsed})),setSidebarWidth:e=>t({sidebarWidth:e}),toggleRightPanel:()=>t(e=>({rightPanelCollapsed:!e.rightPanelCollapsed})),setTheme:e=>t({theme:e}),setUiFont:e=>t({uiFont:e}),setUiFontCustom:e=>t({uiFontCustom:e}),setUiScale:e=>t({uiScale:e}),setAgentAvatars:e=>t({agentAvatars:e}),setPasswordDialogOpen:(e,n)=>t({passwordDialogOpen:e,passwordDialogFilePath:n??null}),setOwnerMismatchDialogOpen:(e,n)=>t({ownerMismatchDialogOpen:e,ownerMismatchFileOwnerDid:n??null}),addStartingFilePath:e=>t(n=>({startingFilePaths:new Set(n.startingFilePaths).add(e)})),removeStartingFilePath:e=>t(n=>{const o=new Set(n.startingFilePaths);return o.delete(e),{startingFilePaths:o}}),addStoppingFilePath:e=>t(n=>({stoppingFilePaths:new Set(n.stoppingFilePaths).add(e)})),removeStoppingFilePath:e=>t(n=>{const o=new Set(n.stoppingFilePaths);return o.delete(e),{stoppingFilePaths:o}}),setShowMeshGraph:e=>t(n=>({showMeshGraph:e,...e?{showHome:!1}:{},...e&&!n.showMeshGraph&&n.chatPlacement==="center"?{rightPanel:"loop"}:{}})),setShowHome:e=>t(e?{showHome:!0,showSettings:!1,showMeshGraph:!1}:{showHome:!1}),expandRightPanelToTab:(e,n)=>t(o=>e==="loop"&&s(o)?{centerChatTabActive:!0}:{rightPanelCollapsed:!1,rightPanel:e,...n?{agentSubTab:n}:{}}),setAgentReviewDialog:(e,n)=>t(o=>({agentReviewDialogOpen:e,agentReviewSummary:n!==void 0?n:o.agentReviewSummary,...e?{agentNeedsReview:!0}:{}})),setAgentNeedsReview:e=>t({agentNeedsReview:e}),setFileMoveWarning:e=>t({fileMoveWarning:e}),resetAgentReview:()=>t({agentReviewDialogOpen:!1,agentReviewSummary:null,agentNeedsReview:!1,fileMoveWarning:null}),requestProviderSetup:(e,n)=>a().connectProvider(e,n).then(o=>o!==null),connectProvider:(e,n)=>new Promise(o=>{t(i=>(i.providerSetupRequest?.resolve(null),{providerSetupRequest:{reason:e,filePath:n,resolve:o}}))}),resolveProviderSetup:e=>t(n=>(n.providerSetupRequest?.resolve(e),{providerSetupRequest:null})),openShareDialog:e=>t({shareDialogFilePath:e??""}),closeShareDialog:()=>t({shareDialogFilePath:null}),setPendingFirstMessage:e=>t({pendingFirstMessage:e}),setHomeProviderId:e=>t({homeProviderId:e}),setHomeFolder:e=>t({homeFolder:e}),setHomeRuntime:e=>t(n=>n.homeRuntime===e?n:{homeRuntime:e,homeFolder:null,homeTemplateId:null,homeProviderId:null,homeModelId:null}),setHomeDraft:e=>t({homeDraft:e}),setHomeFiles:e=>t({homeFiles:e}),setHomeName:e=>t({homeName:e}),setHomeTemplateId:e=>t({homeTemplateId:e}),setHomeModelId:e=>t({homeModelId:e}),openTemplateReview:(e,n,o,i)=>t({templateReview:{id:e,summary:n,onDone:o,runtimeId:i}}),closeTemplateReview:e=>{const n=a().templateReview;t({templateReview:null}),n?.onDone?.(e)},takePendingFirstMessage:e=>{const n=a().pendingFirstMessage;return!n||n.filePath!==e?null:(t({pendingFirstMessage:null}),n)},toggleLogsPanel:()=>t(e=>({showLogsPanel:!e.showLogsPanel})),setLogsAutoRefresh:e=>t({logsAutoRefresh:e}),setLogsPanelHeight:e=>t({logsPanelHeight:e}),setBottomPanelTab:e=>t({bottomPanelTab:e}),setShuttingDown:e=>t({shuttingDown:e})}));N.subscribe((t,a)=>{t.rightPanel!==a.rightPanel&&r(E,t.rightPanel),t.agentSubTab!==a.agentSubTab&&r(D,t.agentSubTab),t.rightPanelCollapsed!==a.rightPanelCollapsed&&r(y,t.rightPanelCollapsed),t.showLogsPanel!==a.showLogsPanel&&r(O,t.showLogsPanel),t.logsAutoRefresh!==a.logsAutoRefresh&&r(H,t.logsAutoRefresh),t.bottomPanelTab!==a.bottomPanelTab&&r(L,t.bottomPanelTab)});const me=Object.freeze(Object.defineProperty({__proto__:null,LOGS_PANEL_HEIGHT_DEFAULT:C,LOGS_PANEL_HEIGHT_MAX:I,LOGS_PANEL_HEIGHT_MIN:v,SIDEBAR_MAX_VW:z,SIDEBAR_WIDTH_DEFAULT:_,SIDEBAR_WIDTH_MAX:w,SIDEBAR_WIDTH_MIN:A,UI_FONT_DEFAULT:f,UI_FONT_PRESETS:b,UI_FONT_STACKS:P,UI_FONT_SYSTEM_STACK:l,UI_SCALE_OPTIONS:T,isUiFont:j,isUiScale:q,resolveUiFontStack:k,selectActiveDockPanel:oe,selectCanPromoteChat:le,selectChatColumnCapped:ae,selectChatInCenter:s,useAppStore:N},Symbol.toStringTag,{value:"Module"}));export{I as L,ue as R,A as S,b as U,T as a,Y as b,$ as c,de as d,x as e,w as f,z as g,_ as h,he as i,ce as j,le as k,p as l,ae as m,oe as n,v as o,W as p,V as q,C as r,s,j as t,N as u,q as v,ge as w,k as x,me as y};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
var k=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function yn(t){return Ue(t)}function Ue(t){return Array.isArray(t)?_n(t):t instanceof RegExp?t:typeof t=="object"?bn(t):t}function _n(t){let e=[];for(let n=0,r=t.length;n<r;n++)e[n]=Ue(t[n]);return e}function bn(t){let e={};for(let n in t)e[n]=Ue(t[n]);return e}function vt(t,...e){return e.forEach(n=>{for(let r in n)t[r]=n[r]}),t}function Rt(t){const e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return e===0?t:~e===t.length-1?Rt(t.substring(0,t.length-1)):t.substr(~e+1)}var Te=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,se=class{static hasCaptures(t){return t===null?!1:(Te.lastIndex=0,Te.test(t))}static replaceCaptures(t,e,n){return t.replace(Te,(r,s,o,a)=>{let i=n[parseInt(s||o,10)];if(i){let l=e.substring(i.start,i.end);for(;l[0]===".";)l=l.substring(1);switch(a){case"downcase":return l.toLowerCase();case"upcase":return l.toUpperCase();default:return l}}else return r})}};function Tt(t,e){return t<e?-1:t>e?1:0}function At(t,e){if(t===null&&e===null)return 0;if(!t)return-1;if(!e)return 1;let n=t.length,r=e.length;if(n===r){for(let s=0;s<n;s++){let o=Tt(t[s],e[s]);if(o!==0)return o}return 0}return n-r}function tt(t){return!!(/^#[0-9a-f]{6}$/i.test(t)||/^#[0-9a-f]{8}$/i.test(t)||/^#[0-9a-f]{3}$/i.test(t)||/^#[0-9a-f]{4}$/i.test(t))}function Nt(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var xt=class{constructor(t){this.fn=t}cache=new Map;get(t){if(this.cache.has(t))return this.cache.get(t);const e=this.fn(t);return this.cache.set(t,e),e}},ce=class{constructor(t,e,n){this._colorMap=t,this._defaults=e,this._root=n}static createFromRawTheme(t,e){return this.createFromParsedTheme(wn(t),e)}static createFromParsedTheme(t,e){return vn(t,e)}_cachedMatchRoot=new xt(t=>this._root.match(t));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(t===null)return this._defaults;const e=t.scopeName,r=this._cachedMatchRoot.get(e).find(s=>Sn(t.parent,s.parentScopes));return r?new Lt(r.fontStyle,r.foreground,r.background):null}},Ae=class ie{constructor(e,n){this.parent=e,this.scopeName=n}static push(e,n){for(const r of n)e=new ie(e,r);return e}static from(...e){let n=null;for(let r=0;r<e.length;r++)n=new ie(n,e[r]);return n}push(e){return new ie(this,e)}getSegments(){let e=this;const n=[];for(;e;)n.push(e.scopeName),e=e.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){const n=[];let r=this;for(;r&&r!==e;)n.push(r.scopeName),r=r.parent;return r===e?n.reverse():void 0}};function Sn(t,e){if(e.length===0)return!0;for(let n=0;n<e.length;n++){let r=e[n],s=!1;if(r===">"){if(n===e.length-1)return!1;r=e[++n],s=!0}for(;t&&!Cn(t.scopeName,r);){if(s)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function Cn(t,e){return e===t||t.startsWith(e)&&t[e.length]==="."}var Lt=class{constructor(t,e,n){this.fontStyle=t,this.foregroundId=e,this.backgroundId=n}};function wn(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,n=[],r=0;for(let s=0,o=e.length;s<o;s++){let a=e[s];if(!a.settings)continue;let i;if(typeof a.scope=="string"){let h=a.scope;h=h.replace(/^[,]+/,""),h=h.replace(/[,]+$/,""),i=h.split(",")}else Array.isArray(a.scope)?i=a.scope:i=[""];let l=-1;if(typeof a.settings.fontStyle=="string"){l=0;let h=a.settings.fontStyle.split(" ");for(let f=0,g=h.length;f<g;f++)switch(h[f]){case"italic":l=l|1;break;case"bold":l=l|2;break;case"underline":l=l|4;break;case"strikethrough":l=l|8;break}}let c=null;typeof a.settings.foreground=="string"&&tt(a.settings.foreground)&&(c=a.settings.foreground);let u=null;typeof a.settings.background=="string"&&tt(a.settings.background)&&(u=a.settings.background);for(let h=0,f=i.length;h<f;h++){let p=i[h].trim().split(" "),b=p[p.length-1],_=null;p.length>1&&(_=p.slice(0,p.length-1),_.reverse()),n[r++]=new kn(b,_,s,l,c,u)}}return n}var kn=class{constructor(t,e,n,r,s,o){this.scope=t,this.parentScopes=e,this.index=n,this.fontStyle=r,this.foreground=s,this.background=o}},x=(t=>(t[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline",t[t.Strikethrough=8]="Strikethrough",t))(x||{});function vn(t,e){t.sort((l,c)=>{let u=Tt(l.scope,c.scope);return u!==0||(u=At(l.parentScopes,c.parentScopes),u!==0)?u:l.index-c.index});let n=0,r="#000000",s="#ffffff";for(;t.length>=1&&t[0].scope==="";){let l=t.shift();l.fontStyle!==-1&&(n=l.fontStyle),l.foreground!==null&&(r=l.foreground),l.background!==null&&(s=l.background)}let o=new Rn(e),a=new Lt(n,o.getId(r),o.getId(s)),i=new An(new Ie(0,null,-1,0,0),[]);for(let l=0,c=t.length;l<c;l++){let u=t[l];i.insert(0,u.scope,u.parentScopes,u.fontStyle,o.getId(u.foreground),o.getId(u.background))}return new ce(o,a,i)}var Rn=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(t){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(t)){this._isFrozen=!0;for(let e=0,n=t.length;e<n;e++)this._color2id[t[e]]=e,this._id2color[e]=t[e]}else this._isFrozen=!1}getId(t){if(t===null)return 0;t=t.toUpperCase();let e=this._color2id[t];if(e)return e;if(this._isFrozen)throw new Error(`Missing color in color map - ${t}`);return e=++this._lastColorId,this._color2id[t]=e,this._id2color[e]=t,e}getColorMap(){return this._id2color.slice(0)}},Tn=Object.freeze([]),Ie=class Et{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,n,r,s,o){this.scopeDepth=e,this.parentScopes=n||Tn,this.fontStyle=r,this.foreground=s,this.background=o}clone(){return new Et(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let n=[];for(let r=0,s=e.length;r<s;r++)n[r]=e[r].clone();return n}acceptOverwrite(e,n,r,s){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),s!==0&&(this.background=s)}},An=class Oe{constructor(e,n=[],r={}){this._mainRule=e,this._children=r,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(e,n){if(e.scopeDepth!==n.scopeDepth)return n.scopeDepth-e.scopeDepth;let r=0,s=0;for(;e.parentScopes[r]===">"&&r++,n.parentScopes[s]===">"&&s++,!(r>=e.parentScopes.length||s>=n.parentScopes.length);){const o=n.parentScopes[s].length-e.parentScopes[r].length;if(o!==0)return o;r++,s++}return n.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let r=e.indexOf("."),s,o;if(r===-1?(s=e,o=""):(s=e.substring(0,r),o=e.substring(r+1)),this._children.hasOwnProperty(s))return this._children[s].match(o)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(Oe._cmpBySpecificity),n}insert(e,n,r,s,o,a){if(n===""){this._doInsertHere(e,r,s,o,a);return}let i=n.indexOf("."),l,c;i===-1?(l=n,c=""):(l=n.substring(0,i),c=n.substring(i+1));let u;this._children.hasOwnProperty(l)?u=this._children[l]:(u=new Oe(this._mainRule.clone(),Ie.cloneArr(this._rulesWithParentScopes)),this._children[l]=u),u.insert(e+1,c,r,s,o,a)}_doInsertHere(e,n,r,s,o){if(n===null){this._mainRule.acceptOverwrite(e,r,s,o);return}for(let a=0,i=this._rulesWithParentScopes.length;a<i;a++){let l=this._rulesWithParentScopes[a];if(At(l.parentScopes,n)===0){l.acceptOverwrite(e,r,s,o);return}}r===-1&&(r=this._mainRule.fontStyle),s===0&&(s=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new Ie(e,n,r,s,o))}},j=class I{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const n=I.getLanguageId(e),r=I.getTokenType(e),s=I.getFontStyle(e),o=I.getForeground(e),a=I.getBackground(e);console.log({languageId:n,tokenType:r,fontStyle:s,foreground:o,background:a})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,n,r,s,o,a,i){let l=I.getLanguageId(e),c=I.getTokenType(e),u=I.containsBalancedBrackets(e)?1:0,h=I.getFontStyle(e),f=I.getForeground(e),g=I.getBackground(e);return n!==0&&(l=n),r!==8&&(c=r),s!==null&&(u=s?1:0),o!==-1&&(h=o),a!==0&&(f=a),i!==0&&(g=i),(l<<0|c<<8|u<<10|h<<11|f<<15|g<<24)>>>0}};function ue(t,e){const n=[],r=Nn(t);let s=r.next();for(;s!==null;){let l=0;if(s.length===2&&s.charAt(1)===":"){switch(s.charAt(0)){case"R":l=1;break;case"L":l=-1;break;default:console.log(`Unknown priority ${s} in scope selector`)}s=r.next()}let c=a();if(n.push({matcher:c,priority:l}),s!==",")break;s=r.next()}return n;function o(){if(s==="-"){s=r.next();const l=o();return c=>!!l&&!l(c)}if(s==="("){s=r.next();const l=i();return s===")"&&(s=r.next()),l}if(nt(s)){const l=[];do l.push(s),s=r.next();while(nt(s));return c=>e(l,c)}return null}function a(){const l=[];let c=o();for(;c;)l.push(c),c=o();return u=>l.every(h=>h(u))}function i(){const l=[];let c=a();for(;c&&(l.push(c),s==="|"||s===",");){do s=r.next();while(s==="|"||s===",");c=a()}return u=>l.some(h=>h(u))}}function nt(t){return!!t&&!!t.match(/[\w\.:]+/)}function Nn(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=e.exec(t);return{next:()=>{if(!n)return null;const r=n[0];return n=e.exec(t),r}}}function Pt(t){typeof t.dispose=="function"&&t.dispose()}var Y=class{constructor(t){this.scopeName=t}toKey(){return this.scopeName}},xn=class{constructor(t,e){this.scopeName=t,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},Ln=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(t){const e=t.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(t))}},En=class{constructor(t,e){this.repo=t,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Y(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const t=this.Q;this.Q=[];const e=new Ln;for(const n of t)Pn(n,this.initialScopeName,this.repo,e);for(const n of e.references)if(n instanceof Y){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function Pn(t,e,n,r){const s=n.lookup(t.scopeName);if(!s){if(t.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const o=n.lookup(e);t instanceof Y?le({baseGrammar:o,selfGrammar:s},r):Me(t.ruleName,{baseGrammar:o,selfGrammar:s,repository:s.repository},r);const a=n.injections(t.scopeName);if(a)for(const i of a)r.add(new Y(i))}function Me(t,e,n){if(e.repository&&e.repository[t]){const r=e.repository[t];he([r],e,n)}}function le(t,e){t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns)&&he(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e),t.selfGrammar.injections&&he(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function he(t,e,n){for(const r of t){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const s=r.repository?vt({},e.repository,r.repository):e.repository;Array.isArray(r.patterns)&&he(r.patterns,{...e,repository:s},n);const o=r.include;if(!o)continue;const a=It(o);switch(a.kind){case 0:le({...e,selfGrammar:e.baseGrammar},n);break;case 1:le(e,n);break;case 2:Me(a.ruleName,{...e,repository:s},n);break;case 3:case 4:const i=a.scopeName===e.selfGrammar.scopeName?e.selfGrammar:a.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(i){const l={baseGrammar:e.baseGrammar,selfGrammar:i,repository:s};a.kind===4?Me(a.ruleName,l,n):le(l,n)}else a.kind===4?n.add(new xn(a.scopeName,a.ruleName)):n.add(new Y(a.scopeName));break}}}var In=class{kind=0},On=class{kind=1},Mn=class{constructor(t){this.ruleName=t}kind=2},Bn=class{constructor(t){this.scopeName=t}kind=3},Gn=class{constructor(t,e){this.scopeName=t,this.ruleName=e}kind=4};function It(t){if(t==="$base")return new In;if(t==="$self")return new On;const e=t.indexOf("#");if(e===-1)return new Bn(t);if(e===0)return new Mn(t.substring(1));{const n=t.substring(0,e),r=t.substring(e+1);return new Gn(n,r)}}var $n=/\\(\d+)/,rt=/\\(\d+)/g,Dn=-1,Ot=-2;var te=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(t,e,n,r){this.$location=t,this.id=e,this._name=n||null,this._nameIsCapturing=se.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=se.hasCaptures(this._contentName)}get debugName(){const t=this.$location?`${Rt(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,e){return!this._nameIsCapturing||this._name===null||t===null||e===null?this._name:se.replaceCaptures(this._name,t,e)}getContentName(t,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:se.replaceCaptures(this._contentName,t,e)}},jn=class extends te{retokenizeCapturedWithRuleId;constructor(t,e,n,r,s){super(t,e,n,r),this.retokenizeCapturedWithRuleId=s}dispose(){}collectPatterns(t,e){throw new Error("Not supported!")}compile(t,e){throw new Error("Not supported!")}compileAG(t,e,n,r){throw new Error("Not supported!")}},Fn=class extends te{_match;captures;_cachedCompiledPatterns;constructor(t,e,n,r,s){super(t,e,n,null),this._match=new X(r,this.id),this.captures=s,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,e){e.push(this._match)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new J,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},st=class extends te{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,r,s){super(t,e,n,r),this.patterns=s.patterns,this.hasMissingPatterns=s.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(t,e){for(const n of this.patterns)t.getRule(n).collectPatterns(t,e)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new J,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Be=class extends te{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,r,s,o,a,i,l,c){super(t,e,n,r),this._begin=new X(s,this.id),this.beginCaptures=o,this._end=new X(a||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=i,this.applyEndPatternLast=l||!1,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(t,e){return this._end.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t,e).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t,e).compileAG(t,n,r)}_getCachedCompiledPatterns(t,e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new J;for(const n of this.patterns)t.getRule(n).collectPatterns(t,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,e):this._cachedCompiledPatterns.setSource(0,e)),this._cachedCompiledPatterns}},de=class extends te{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(t,e,n,r,s,o,a,i,l){super(t,e,n,r),this._begin=new X(s,this.id),this.beginCaptures=o,this.whileCaptures=i,this._while=new X(a,Ot),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(t,e){return this._while.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new J;for(const e of this.patterns)t.getRule(e).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,e){return this._getCachedCompiledWhilePatterns(t,e).compile(t)}compileWhileAG(t,e,n,r){return this._getCachedCompiledWhilePatterns(t,e).compileAG(t,n,r)}_getCachedCompiledWhilePatterns(t,e){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new J,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,e||""),this._cachedCompiledWhilePatterns}},Mt=class N{static createCaptureRule(e,n,r,s,o){return e.registerRule(a=>new jn(n,a,r,s,o))}static getCompiledRuleId(e,n,r){return e.id||n.registerRule(s=>{if(e.id=s,e.match)return new Fn(e.$vscodeTextmateLocation,e.id,e.name,e.match,N._compileCaptures(e.captures,n,r));if(typeof e.begin>"u"){e.repository&&(r=vt({},r,e.repository));let o=e.patterns;return typeof o>"u"&&e.include&&(o=[{include:e.include}]),new st(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,N._compilePatterns(o,n,r))}return e.while?new de(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,N._compileCaptures(e.beginCaptures||e.captures,n,r),e.while,N._compileCaptures(e.whileCaptures||e.captures,n,r),N._compilePatterns(e.patterns,n,r)):new Be(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,N._compileCaptures(e.beginCaptures||e.captures,n,r),e.end,N._compileCaptures(e.endCaptures||e.captures,n,r),e.applyEndPatternLast,N._compilePatterns(e.patterns,n,r))}),e.id}static _compileCaptures(e,n,r){let s=[];if(e){let o=0;for(const a in e){if(a==="$vscodeTextmateLocation")continue;const i=parseInt(a,10);i>o&&(o=i)}for(let a=0;a<=o;a++)s[a]=null;for(const a in e){if(a==="$vscodeTextmateLocation")continue;const i=parseInt(a,10);let l=0;e[a].patterns&&(l=N.getCompiledRuleId(e[a],n,r)),s[i]=N.createCaptureRule(n,e[a].$vscodeTextmateLocation,e[a].name,e[a].contentName,l)}}return s}static _compilePatterns(e,n,r){let s=[];if(e)for(let o=0,a=e.length;o<a;o++){const i=e[o];let l=-1;if(i.include){const c=It(i.include);switch(c.kind){case 0:case 1:l=N.getCompiledRuleId(r[i.include],n,r);break;case 2:let u=r[c.ruleName];u&&(l=N.getCompiledRuleId(u,n,r));break;case 3:case 4:const h=c.scopeName,f=c.kind===4?c.ruleName:null,g=n.getExternalGrammar(h,r);if(g)if(f){let p=g.repository[f];p&&(l=N.getCompiledRuleId(p,n,g.repository))}else l=N.getCompiledRuleId(g.repository.$self,n,g.repository);break}}else l=N.getCompiledRuleId(i,n,r);if(l!==-1){const c=n.getRule(l);let u=!1;if((c instanceof st||c instanceof Be||c instanceof de)&&c.hasMissingPatterns&&c.patterns.length===0&&(u=!0),u)continue;s.push(l)}}return{patterns:s,hasMissingPatterns:(e?e.length:0)!==s.length}}},X=class Bt{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,n){if(e&&typeof e=="string"){const r=e.length;let s=0,o=[],a=!1;for(let i=0;i<r;i++)if(e.charAt(i)==="\\"&&i+1<r){const c=e.charAt(i+1);c==="z"?(o.push(e.substring(s,i)),o.push("$(?!\\n)(?<!\\n)"),s=i+2):(c==="A"||c==="G")&&(a=!0),i++}this.hasAnchor=a,s===0?this.source=e:(o.push(e.substring(s,r)),this.source=o.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=$n.test(this.source):this.hasBackReferences=!1}clone(){return new Bt(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=n.map(s=>e.substring(s.start,s.end));return rt.lastIndex=0,this.source.replace(rt,(s,o)=>Nt(r[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let e=[],n=[],r=[],s=[],o,a,i,l;for(o=0,a=this.source.length;o<a;o++)i=this.source.charAt(o),e[o]=i,n[o]=i,r[o]=i,s[o]=i,i==="\\"&&o+1<a&&(l=this.source.charAt(o+1),l==="A"?(e[o+1]="",n[o+1]="",r[o+1]="A",s[o+1]="A"):l==="G"?(e[o+1]="",n[o+1]="G",r[o+1]="",s[o+1]="G"):(e[o+1]=l,n[o+1]=l,r[o+1]=l,s[o+1]=l),o++);return{A0_G0:e.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:s.join("")}}resolveAnchors(e,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:e?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},J=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(t){this._items.push(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}unshift(t){this._items.unshift(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}length(){return this._items.length}setSource(t,e){this._items[t].source!==e&&(this._disposeCaches(),this._items[t].setSource(e))}compile(t){if(!this._cached){let e=this._items.map(n=>n.source);this._cached=new ot(t,e,this._items.map(n=>n.ruleId))}return this._cached}compileAG(t,e,n){return this._hasAnchors?e?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G0):this.compile(t)}_resolveAnchors(t,e,n){let r=this._items.map(s=>s.resolveAnchors(e,n));return new ot(t,r,this._items.map(s=>s.ruleId))}},ot=class{constructor(t,e,n){this.regExps=e,this.rules=n,this.scanner=t.createOnigScanner(e)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const t=[];for(let e=0,n=this.rules.length;e<n;e++)t.push(" - "+this.rules[e]+": "+this.regExps[e]);return t.join(`
|
|
2
|
+
`)}findNextMatchSync(t,e,n){const r=this.scanner.findNextMatchSync(t,e,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},Ne=class{constructor(t,e){this.languageId=t,this.tokenType=e}},Wn=class Ge{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,n){this._defaultAttributes=new Ne(e,8),this._embeddedLanguagesMatcher=new zn(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return e===null?Ge._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}static _NULL_SCOPE_METADATA=new Ne(0,0);_getBasicScopeAttributes=new xt(e=>{const n=this._scopeToLanguage(e),r=this._toStandardTokenType(e);return new Ne(n,r)});_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const n=e.match(Ge.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},zn=class{values;scopesRegExp;constructor(t){if(t.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(t);const e=t.map(([n,r])=>Nt(n));e.sort(),e.reverse(),this.scopesRegExp=new RegExp(`^((${e.join(")|(")}))($|\\.)`,"")}}match(t){if(!this.scopesRegExp)return;const e=t.match(this.scopesRegExp);if(e)return this.values.get(e[1])}},at=class{constructor(t,e){this.stack=t,this.stoppedEarly=e}};function Gt(t,e,n,r,s,o,a,i){const l=e.content.length;let c=!1,u=-1;if(a){const g=Hn(t,e,n,r,s,o);s=g.stack,r=g.linePos,n=g.isFirstLine,u=g.anchorPosition}const h=Date.now();for(;!c;){if(i!==0&&Date.now()-h>i)return new at(s,!0);f()}return new at(s,!1);function f(){const g=Un(t,e,n,r,s,u);if(!g){o.produce(s,l),c=!0;return}const p=g.captureIndices,b=g.matchedRuleId,_=p&&p.length>0?p[0].end>r:!1;if(b===Dn){const y=s.getRule(t);o.produce(s,p[0].start),s=s.withContentNameScopesList(s.nameScopesList),V(t,e,n,s,o,y.endCaptures,p),o.produce(s,p[0].end);const m=s;if(s=s.parent,u=m.getAnchorPos(),!_&&m.getEnterPos()===r){s=m,o.produce(s,l),c=!0;return}}else{const y=t.getRule(b);o.produce(s,p[0].start);const m=s,C=y.getName(e.content,p),v=s.contentNameScopesList.pushAttributed(C,t);if(s=s.push(b,r,u,p[0].end===l,null,v,v),y instanceof Be){const A=y;V(t,e,n,s,o,A.beginCaptures,p),o.produce(s,p[0].end),u=p[0].end;const P=A.getContentName(e.content,p),B=v.pushAttributed(P,t);if(s=s.withContentNameScopesList(B),A.endHasBackReferences&&(s=s.withEndRule(A.getEndWithResolvedBackReferences(e.content,p))),!_&&m.hasSameRuleAs(s)){s=s.pop(),o.produce(s,l),c=!0;return}}else if(y instanceof de){const A=y;V(t,e,n,s,o,A.beginCaptures,p),o.produce(s,p[0].end),u=p[0].end;const P=A.getContentName(e.content,p),B=v.pushAttributed(P,t);if(s=s.withContentNameScopesList(B),A.whileHasBackReferences&&(s=s.withEndRule(A.getWhileWithResolvedBackReferences(e.content,p))),!_&&m.hasSameRuleAs(s)){s=s.pop(),o.produce(s,l),c=!0;return}}else if(V(t,e,n,s,o,y.captures,p),o.produce(s,p[0].end),s=s.pop(),!_){s=s.safePop(),o.produce(s,l),c=!0;return}}p[0].end>r&&(r=p[0].end,n=!1)}}function Hn(t,e,n,r,s,o){let a=s.beginRuleCapturedEOL?0:-1;const i=[];for(let l=s;l;l=l.pop()){const c=l.getRule(t);c instanceof de&&i.push({rule:c,stack:l})}for(let l=i.pop();l;l=i.pop()){const{ruleScanner:c,findOptions:u}=Kn(l.rule,t,l.stack.endRule,n,r===a),h=c.findNextMatchSync(e,r,u);if(h){if(h.ruleId!==Ot){s=l.stack.pop();break}h.captureIndices&&h.captureIndices.length&&(o.produce(l.stack,h.captureIndices[0].start),V(t,e,n,l.stack,o,l.rule.whileCaptures,h.captureIndices),o.produce(l.stack,h.captureIndices[0].end),a=h.captureIndices[0].end,h.captureIndices[0].end>r&&(r=h.captureIndices[0].end,n=!1))}else{s=l.stack.pop();break}}return{stack:s,linePos:r,anchorPosition:a,isFirstLine:n}}function Un(t,e,n,r,s,o){const a=qn(t,e,n,r,s,o),i=t.getInjections();if(i.length===0)return a;const l=Vn(i,t,e,n,r,s,o);if(!l)return a;if(!a)return l;const c=a.captureIndices[0].start,u=l.captureIndices[0].start;return u<c||l.priorityMatch&&u===c?l:a}function qn(t,e,n,r,s,o){const a=s.getRule(t),{ruleScanner:i,findOptions:l}=$t(a,t,s.endRule,n,r===o),c=i.findNextMatchSync(e,r,l);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function Vn(t,e,n,r,s,o,a){let i=Number.MAX_VALUE,l=null,c,u=0;const h=o.contentNameScopesList.getScopeNames();for(let f=0,g=t.length;f<g;f++){const p=t[f];if(!p.matcher(h))continue;const b=e.getRule(p.ruleId),{ruleScanner:_,findOptions:y}=$t(b,e,null,r,s===a),m=_.findNextMatchSync(n,s,y);if(!m)continue;const C=m.captureIndices[0].start;if(!(C>=i)&&(i=C,l=m.captureIndices,c=m.ruleId,u=p.priority,i===s))break}return l?{priorityMatch:u===-1,captureIndices:l,matchedRuleId:c}:null}function $t(t,e,n,r,s){return{ruleScanner:t.compileAG(e,n,r,s),findOptions:0}}function Kn(t,e,n,r,s){return{ruleScanner:t.compileWhileAG(e,n,r,s),findOptions:0}}function V(t,e,n,r,s,o,a){if(o.length===0)return;const i=e.content,l=Math.min(o.length,a.length),c=[],u=a[0].end;for(let h=0;h<l;h++){const f=o[h];if(f===null)continue;const g=a[h];if(g.length===0)continue;if(g.start>u)break;for(;c.length>0&&c[c.length-1].endPos<=g.start;)s.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop();if(c.length>0?s.produceFromScopes(c[c.length-1].scopes,g.start):s.produce(r,g.start),f.retokenizeCapturedWithRuleId){const b=f.getName(i,a),_=r.contentNameScopesList.pushAttributed(b,t),y=f.getContentName(i,a),m=_.pushAttributed(y,t),C=r.push(f.retokenizeCapturedWithRuleId,g.start,-1,!1,null,_,m),v=t.createOnigString(i.substring(0,g.end));Gt(t,v,n&&g.start===0,g.start,C,s,!1,0),Pt(v);continue}const p=f.getName(i,a);if(p!==null){const _=(c.length>0?c[c.length-1].scopes:r.contentNameScopesList).pushAttributed(p,t);c.push(new Yn(_,g.end))}}for(;c.length>0;)s.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop()}var Yn=class{scopes;endPos;constructor(t,e){this.scopes=t,this.endPos=e}};function Xn(t,e,n,r,s,o,a,i){return new Qn(t,e,n,r,s,o,a,i)}function it(t,e,n,r,s){const o=ue(e,fe),a=Mt.getCompiledRuleId(n,r,s.repository);for(const i of o)t.push({debugSelector:e,matcher:i.matcher,ruleId:a,grammar:s,priority:i.priority})}function fe(t,e){if(e.length<t.length)return!1;let n=0;return t.every(r=>{for(let s=n;s<e.length;s++)if(Jn(e[s],r))return n=s+1,!0;return!1})}function Jn(t,e){if(!t)return!1;if(t===e)return!0;const n=e.length;return t.length>n&&t.substr(0,n)===e&&t[n]==="."}var Qn=class{constructor(t,e,n,r,s,o,a,i){if(this._rootScopeName=t,this.balancedBracketSelectors=o,this._onigLib=i,this._basicScopeAttributesProvider=new Wn(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=a,this._grammar=lt(e,null),this._injections=null,this._tokenTypeMatchers=[],s)for(const l of Object.keys(s)){const c=ue(l,fe);for(const u of c)this._tokenTypeMatchers.push({matcher:u.matcher,type:s[l]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const t of this._ruleId2desc)t&&t.dispose()}createOnigScanner(t){return this._onigLib.createOnigScanner(t)}createOnigString(t){return this._onigLib.createOnigString(t)}getMetadataForScope(t){return this._basicScopeAttributesProvider.getBasicScopeAttributes(t)}_collectInjections(){const t={lookup:s=>s===this._rootScopeName?this._grammar:this.getExternalGrammar(s),injections:s=>this._grammarRepository.injections(s)},e=[],n=this._rootScopeName,r=t.lookup(n);if(r){const s=r.injections;if(s)for(let a in s)it(e,a,s[a],this,r);const o=this._grammarRepository.injections(n);o&&o.forEach(a=>{const i=this.getExternalGrammar(a);if(i){const l=i.injectionSelector;l&&it(e,l,i,this,i)}})}return e.sort((s,o)=>s.priority-o.priority),e}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(t){const e=++this._lastRuleId,n=t(e);return this._ruleId2desc[e]=n,n}getRule(t){return this._ruleId2desc[t]}getExternalGrammar(t,e){if(this._includedGrammars[t])return this._includedGrammars[t];if(this._grammarRepository){const n=this._grammarRepository.lookup(t);if(n)return this._includedGrammars[t]=lt(n,e&&e.$base),this._includedGrammars[t]}}tokenizeLine(t,e,n=0){const r=this._tokenize(t,e,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(t,e,n=0){const r=this._tokenize(t,e,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(t,e,n,r){this._rootId===-1&&(this._rootId=Mt.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let s;if(!e||e===$e.NULL){s=!0;const c=this._basicScopeAttributesProvider.getDefaultAttributes(),u=this.themeProvider.getDefaults(),h=j.set(0,c.languageId,c.tokenType,null,u.fontStyle,u.foregroundId,u.backgroundId),f=this.getRule(this._rootId).getName(null,null);let g;f?g=K.createRootAndLookUpScopeName(f,h,this):g=K.createRoot("unknown",h),e=new $e(null,this._rootId,-1,-1,!1,null,g,g)}else s=!1,e.reset();t=t+`
|
|
3
|
+
`;const o=this.createOnigString(t),a=o.content.length,i=new er(n,t,this._tokenTypeMatchers,this.balancedBracketSelectors),l=Gt(this,o,s,0,e,i,!0,r);return Pt(o),{lineLength:a,lineTokens:i,ruleStack:l.stack,stoppedEarly:l.stoppedEarly}}};function lt(t,e){return t=yn(t),t.repository=t.repository||{},t.repository.$self={$vscodeTextmateLocation:t.$vscodeTextmateLocation,patterns:t.patterns,name:t.scopeName},t.repository.$base=e||t.repository.$self,t}var K=class O{constructor(e,n,r){this.parent=e,this.scopePath=n,this.tokenAttributes=r}static fromExtension(e,n){let r=e,s=e?.scopePath??null;for(const o of n)s=Ae.push(s,o.scopeNames),r=new O(r,s,o.encodedTokenAttributes);return r}static createRoot(e,n){return new O(null,new Ae(null,e),n)}static createRootAndLookUpScopeName(e,n,r){const s=r.getMetadataForScope(e),o=new Ae(null,e),a=r.themeProvider.themeMatch(o),i=O.mergeAttributes(n,s,a);return new O(null,o,i)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return O.equals(this,e)}static equals(e,n){do{if(e===n||!e&&!n)return!0;if(!e||!n||e.scopeName!==n.scopeName||e.tokenAttributes!==n.tokenAttributes)return!1;e=e.parent,n=n.parent}while(!0)}static mergeAttributes(e,n,r){let s=-1,o=0,a=0;return r!==null&&(s=r.fontStyle,o=r.foregroundId,a=r.backgroundId),j.set(e,n.languageId,n.tokenType,null,s,o,a)}pushAttributed(e,n){if(e===null)return this;if(e.indexOf(" ")===-1)return O._pushAttributed(this,e,n);const r=e.split(/ /g);let s=this;for(const o of r)s=O._pushAttributed(s,o,n);return s}static _pushAttributed(e,n,r){const s=r.getMetadataForScope(n),o=e.scopePath.push(n),a=r.themeProvider.themeMatch(o),i=O.mergeAttributes(e.tokenAttributes,s,a);return new O(e,o,i)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){const n=[];let r=this;for(;r&&r!==e;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(r.parent?.scopePath??null)}),r=r.parent;return r===e?n.reverse():void 0}},$e=class ${constructor(e,n,r,s,o,a,i,l){this.parent=e,this.ruleId=n,this.beginRuleCapturedEOL=o,this.endRule=a,this.nameScopesList=i,this.contentNameScopesList=l,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=s}_stackElementBrand=void 0;static NULL=new $(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(e){return e===null?!1:$._equals(this,e)}static _equals(e,n){return e===n?!0:this._structuralEquals(e,n)?K.equals(e.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(e,n){do{if(e===n||!e&&!n)return!0;if(!e||!n||e.depth!==n.depth||e.ruleId!==n.ruleId||e.endRule!==n.endRule)return!1;e=e.parent,n=n.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){$._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,n,r,s,o,a,i){return new $(this,e,n,r,s,o,a,i)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){const e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,n){return this.parent&&(n=this.parent._writeString(e,n)),e[n++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,n}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(e){return this.endRule===e?this:new $(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let n=this;for(;n&&n._enterPos===e._enterPos;){if(n.ruleId===e.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(e,n){const r=K.fromExtension(e?.nameScopesList??null,n.nameScopesList);return new $(e,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,K.fromExtension(r,n.contentNameScopesList))}},Zn=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(t,e){this.balancedBracketScopes=t.flatMap(n=>n==="*"?(this.allowAny=!0,[]):ue(n,fe).map(r=>r.matcher)),this.unbalancedBracketScopes=e.flatMap(n=>ue(n,fe).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(t){for(const e of this.unbalancedBracketScopes)if(e(t))return!1;for(const e of this.balancedBracketScopes)if(e(t))return!0;return this.allowAny}},er=class{constructor(t,e,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=t,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(t,e){this.produceFromScopes(t.contentNameScopesList,e)}produceFromScopes(t,e){if(this._lastTokenEndIndex>=e)return;if(this._emitBinaryTokens){let r=t?.tokenAttributes??0,s=!1;if(this.balancedBracketSelectors?.matchesAlways&&(s=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const o=t?.getScopeNames()??[];for(const a of this._tokenTypeOverrides)a.matcher(o)&&(r=j.set(r,0,a.type,null,-1,0,0));this.balancedBracketSelectors&&(s=this.balancedBracketSelectors.match(o))}if(s&&(r=j.set(r,0,8,s,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=e;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=e;return}const n=t?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:e,scopes:n}),this._lastTokenEndIndex=e}getResult(t,e){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===e-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(t,e){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===e-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let r=0,s=this._binaryTokens.length;r<s;r++)n[r]=this._binaryTokens[r];return n}},tr=class{constructor(t,e){this._onigLib=e,this._theme=t}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(const t of this._grammars.values())t.dispose()}setTheme(t){this._theme=t}getColorMap(){return this._theme.getColorMap()}addGrammar(t,e){this._rawGrammars.set(t.scopeName,t),e&&this._injectionGrammars.set(t.scopeName,e)}lookup(t){return this._rawGrammars.get(t)}injections(t){return this._injectionGrammars.get(t)}getDefaults(){return this._theme.getDefaults()}themeMatch(t){return this._theme.match(t)}grammarForScopeName(t,e,n,r,s){if(!this._grammars.has(t)){let o=this._rawGrammars.get(t);if(!o)return null;this._grammars.set(t,Xn(t,o,e,n,r,s,this,this._onigLib))}return this._grammars.get(t)}},nr=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new tr(ce.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,n){this._syncRegistry.setTheme(ce.createFromRawTheme(e,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,n,r){return this.loadGrammarWithConfiguration(e,n,{embeddedLanguages:r})}loadGrammarWithConfiguration(e,n,r){return this._loadGrammar(e,n,r.embeddedLanguages,r.tokenTypes,new Zn(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,n,r,s,o){const a=new En(this._syncRegistry,e);for(;a.Q.length>0;)a.Q.map(i=>this._loadSingleGrammar(i.scopeName)),a.processQueue();return this._grammarForScopeName(e,n,r,s,o)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){const n=this._options.loadGrammar(e);if(n){const r=typeof this._options.getInjections=="function"?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(n,r)}}addGrammar(e,n=[],r=0,s=null){return this._syncRegistry.addGrammar(e,n),this._grammarForScopeName(e.scopeName,r,s)}_grammarForScopeName(e,n=0,r=null,s=null,o=null){return this._syncRegistry.grammarForScopeName(e,n,r,s,o)}},De=$e.NULL;function ge(t,e){const n=typeof t=="string"?{}:{...t.colorReplacements},r=typeof t=="string"?t:t.name;for(const[s,o]of Object.entries(e?.colorReplacements||{}))typeof o=="string"?n[s]=o:s===r&&Object.assign(n,o);return n}function G(t,e){return t&&(e?.[t?.toLowerCase()]||t)}function rr(t){return Array.isArray(t)?t:[t]}async function Dt(t){return Promise.resolve(typeof t=="function"?t():t).then(e=>e.default||e)}function _e(t){return!t||["plaintext","txt","text","plain"].includes(t)}function jt(t){return t==="ansi"||_e(t)}function be(t){return t==="none"}function Ft(t){return be(t)}const sr=/(\r?\n)/g;function Se(t,e=!1){if(t.length===0)return[["",0]];const n=t.split(sr);let r=0;const s=[];for(let o=0;o<n.length;o+=2){const a=e?n[o]+(n[o+1]||""):n[o];s.push([a,r]),r+=n[o].length,r+=n[o+1]?.length||0}return s}const ct={light:"#333333",dark:"#bbbbbb"},ut={light:"#fffffe",dark:"#1e1e1e"},ht="__shiki_resolved";function qe(t){if(t?.[ht])return t;const e={...t};e.tokenColors&&!e.settings&&(e.settings=e.tokenColors,delete e.tokenColors),e.type||="dark",e.colorReplacements={...e.colorReplacements},e.settings||=[];let{bg:n,fg:r}=e;if(!n||!r){const i=e.settings?e.settings.find(l=>!l.name&&!l.scope):void 0;i?.settings?.foreground&&(r=i.settings.foreground),i?.settings?.background&&(n=i.settings.background),!r&&e?.colors?.["editor.foreground"]&&(r=e.colors["editor.foreground"]),!n&&e?.colors?.["editor.background"]&&(n=e.colors["editor.background"]),r||(r=e.type==="light"?ct.light:ct.dark),n||(n=e.type==="light"?ut.light:ut.dark),e.fg=r,e.bg=n}e.settings[0]&&e.settings[0].settings&&!e.settings[0].scope||e.settings.unshift({settings:{foreground:e.fg,background:e.bg}});let s=0;const o=new Map;function a(i){if(o.has(i))return o.get(i);s+=1;const l=`#${s.toString(16).padStart(8,"0").toLowerCase()}`;return e.colorReplacements?.[`#${l}`]?a(i):(o.set(i,l),l)}e.settings=e.settings.map(i=>{const l=i.settings?.foreground&&!i.settings.foreground.startsWith("#"),c=i.settings?.background&&!i.settings.background.startsWith("#");if(!l&&!c)return i;const u={...i,settings:{...i.settings}};if(l){const h=a(i.settings.foreground);e.colorReplacements[h]=i.settings.foreground,u.settings.foreground=h}if(c){const h=a(i.settings.background);e.colorReplacements[h]=i.settings.background,u.settings.background=h}return u});for(const i of Object.keys(e.colors||{}))if((i==="editor.foreground"||i==="editor.background"||i.startsWith("terminal.ansi"))&&!e.colors[i]?.startsWith("#")){const l=a(e.colors[i]);e.colorReplacements[l]=e.colors[i],e.colors[i]=l}return Object.defineProperty(e,ht,{enumerable:!1,writable:!1,value:!0}),e}async function Wt(t){return[...new Set((await Promise.all(t.filter(e=>!jt(e)).map(async e=>await Dt(e).then(n=>Array.isArray(n)?n:[n])))).flat())]}async function zt(t){return(await Promise.all(t.map(async e=>Ft(e)?null:qe(await Dt(e))))).filter(e=>!!e)}function Ht(t,e){if(!e)return t;if(e[t]){const n=new Set([t]);for(;e[t];){if(t=e[t],n.has(t))throw new k(`Circular alias \`${[...n].join(" -> ")} -> ${t}\``);n.add(t)}}return t}var or=class extends nr{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(t,e,n,r={}){super(t),this._resolver=t,this._themes=e,this._langs=n,this._alias=r,this._themes.map(s=>this.loadTheme(s)),this.loadLanguages(this._langs)}getTheme(t){return typeof t=="string"?this._resolvedThemes.get(t):this.loadTheme(t)}loadTheme(t){const e=qe(t);return e.name&&(this._resolvedThemes.set(e.name,e),this._loadedThemesCache=null),e}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(t){let e=this._textmateThemeCache.get(t);e||(e=ce.createFromRawTheme(t),this._textmateThemeCache.set(t,e)),this._syncRegistry.setTheme(e)}getGrammar(t){return t=Ht(t,this._alias),this._resolvedGrammars.get(t)}loadLanguage(t){if(this.getGrammar(t.name))return;const e=new Set([...this._langMap.values()].filter(s=>s.embeddedLangsLazy?.includes(t.name)));this._resolver.addLanguage(t);const n={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);const r=this.loadGrammarWithConfiguration(t.scopeName,1,n);if(r.name=t.name,this._resolvedGrammars.set(t.name,r),t.aliases&&t.aliases.forEach(s=>{this._alias[s]=t.name}),this._loadedLanguagesCache=null,e.size)for(const s of e)this._syncRegistry?._grammars?.get(s.scopeName)?.dispose(),this._resolvedGrammars.delete(s.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(s.scopeName),this._syncRegistry?._grammars?.delete(s.scopeName),this.loadLanguage(this._langMap.get(s.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(t){for(const r of t)this.resolveEmbeddedLanguages(r);const e=[...this._langGraph.entries()],n=e.filter(([r,s])=>!s);if(n.length){const r=e.filter(([s,o])=>o?(o.embeddedLanguages||o.embeddedLangs)?.some(a=>n.map(([i])=>i).includes(a)):!1).filter(s=>!n.includes(s));throw new k(`Missing languages ${n.map(([s])=>`\`${s}\``).join(", ")}, required by ${r.map(([s])=>`\`${s}\``).join(", ")}`)}for(const[r,s]of e)this._resolver.addLanguage(s);for(const[r,s]of e)this.loadLanguage(s)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(t){this._langMap.set(t.name,t),this._langGraph.set(t.name,t);const e=t.embeddedLanguages??t.embeddedLangs;if(e)for(const n of e)this._langGraph.set(n,this._langMap.get(n))}},ar=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(t,e){this._onigLib={createOnigScanner:n=>t.createScanner(n),createOnigString:n=>t.createString(n)},e.forEach(n=>this.addLanguage(n))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach(e=>{this._langs.set(e,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(e=>{this._injections.get(e)||this._injections.set(e,[]),this._injections.get(e).includes(t.scopeName)||this._injections.get(e).push(t.scopeName)})}getInjections(t){const e=t.split(".");let n=[];for(let r=1;r<=e.length;r++){const s=e.slice(0,r).join(".");n=[...n,...this._injections.get(s)||[]]}return n}};let q=0;function Ve(t){q+=1,t.warnings!==!1&&q>=10&&q%10===0&&console.warn(`[Shiki] ${q} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let e=!1;if(!t.engine)throw new k("`engine` option is required for synchronous mode");const n=(t.langs||[]).flat(1),r=(t.themes||[]).flat(1).map(qe),s=new or(new ar(t.engine,n),r,n,t.langAlias);let o;function a(m){return Ht(m,t.langAlias)}function i(m){_();const C=s.getGrammar(typeof m=="string"?m:m.name);if(!C)throw new k(`Language \`${m}\` not found, you may need to load it first`);return C}function l(m){if(m==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};_();const C=s.getTheme(m);if(!C)throw new k(`Theme \`${m}\` not found, you may need to load it first`);return C}function c(m){_();const C=l(m);return o!==m&&(s.setTheme(C),o=m),{theme:C,colorMap:s.getColorMap()}}function u(){return _(),s.getLoadedThemes()}function h(){return _(),s.getLoadedLanguages()}function f(...m){_(),s.loadLanguages(m.flat(1))}async function g(...m){return f(await Wt(m))}function p(...m){_();for(const C of m.flat(1))s.loadTheme(C)}async function b(...m){return _(),p(await zt(m))}function _(){if(e)throw new k("Shiki instance has been disposed")}function y(){e||(e=!0,s.dispose(),q-=1)}return{setTheme:c,getTheme:l,getLanguage:i,getLoadedThemes:u,getLoadedLanguages:h,resolveLangAlias:a,loadLanguage:g,loadLanguageSync:f,loadTheme:b,loadThemeSync:p,dispose:y,[Symbol.dispose]:y}}const go=Ve;async function Ut(t){t.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[e,n,r]=await Promise.all([zt(t.themes||[]),Wt(t.langs||[]),t.engine]);return Ve({...t,themes:e,langs:n,engine:r})}const po=Ut,qt=new WeakMap;function Ce(t,e){qt.set(t,e)}function Q(t){return qt.get(t)}var we=class Vt{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(e,n){return new Vt(Object.fromEntries(rr(n).map(r=>[r,De])),e)}constructor(...e){if(e.length===2){const[n,r]=e;this.lang=r,this._stacks=n}else{const[n,r,s]=e;this.lang=r,this._stacks={[s]:n}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return ir(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function ir(t){const e=[],n=new Set;function r(s){if(n.has(s))return;n.add(s);const o=s?.nameScopesList?.scopeName;o&&e.push(o),s.parent&&r(s.parent)}return r(t),e}function lr(t,e){if(!(t instanceof we))throw new k("Invalid grammar state");return t.getInternalStack(e)}const cr=/,/,ur=/ /;function Kt(t,e,n={}){const{theme:r=t.getLoadedThemes()[0]}=n;if(_e(t.resolveLangAlias(n.lang||"text"))||be(r))return Se(e).map(i=>[{content:i[0],offset:i[1]}]);const{theme:s,colorMap:o}=t.setTheme(r),a=t.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==a.name)throw new k(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${a.name}"`);if(!n.grammarState.themes.includes(s.name))throw new k(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${s.name}"`)}return hr(e,a,s,o,n)}function Yt(...t){if(t.length===2)return Q(t[1]);const[e,n,r={}]=t,{lang:s="text",theme:o=e.getLoadedThemes()[0]}=r;if(_e(s)||be(o))throw new k("Plain language does not have grammar state");if(s==="ansi")throw new k("ANSI language does not have grammar state");const{theme:a,colorMap:i}=e.setTheme(o),l=e.getLanguage(s);return new we(Ke(n,l,a,i,r).stateStack,l.name,a.name)}function hr(t,e,n,r,s){const o=Ke(t,e,n,r,s),a=new we(o.stateStack,e.name,n.name);return Ce(o.tokens,a),o.tokens}function Ke(t,e,n,r,s){const o=ge(n,s),{tokenizeMaxLineLength:a=0,tokenizeTimeLimit:i=500,includeExplanation:l=!1}=s,c=Se(t);let u=s.grammarState?lr(s.grammarState,n.name)??De:s.grammarContextCode!=null?Ke(s.grammarContextCode,e,n,r,{...s,grammarState:void 0,grammarContextCode:void 0}).stateStack:De,h=[];const f=[];for(let g=0,p=c.length;g<p;g++){const[b,_]=c[g];if(b===""){h=[],f.push([]);continue}if(a>0&&b.length>=a){h=[],f.push([{content:b,offset:_,color:"",fontStyle:0}]);continue}let y,m,C;l&&l!=="tokenType"&&(y=e.tokenizeLine(b,u,i),m=y.tokens,C=0);const v=e.tokenizeLine2(b,u,i),A=v.tokens.length/2;for(let P=0;P<A;P++){const B=v.tokens[2*P],ke=P+1<A?v.tokens[2*P+2]:b.length;if(B===ke)continue;const ve=v.tokens[2*P+1],pn=G(r[j.getForeground(ve)],o),mn=j.getFontStyle(ve),re={content:b.substring(B,ke),offset:_+B,color:pn,fontStyle:mn};if(l==="tokenType")re.type=j.getTokenType(ve);else if(l){const Ze=[];if(l!=="scopeName")for(const M of n.settings){let z;switch(typeof M.scope){case"string":z=M.scope.split(cr).map(Re=>Re.trim());break;case"object":z=M.scope;break;default:continue}Ze.push({settings:M,selectors:z.map(Re=>Re.split(ur))})}re.explanation=[];let et=0;for(;B+et<ke;){const M=m[C],z=b.substring(M.startIndex,M.endIndex);et+=z.length,re.explanation.push({content:z,scopes:l==="scopeName"?dr(M.scopes):fr(Ze,M.scopes)}),C+=1}}h.push(re)}f.push(h),h=[],u=v.ruleStack}return{tokens:f,stateStack:u}}function dr(t){return t.map(e=>({scopeName:e}))}function fr(t,e){const n=[];for(let r=0,s=e.length;r<s;r++){const o=e[r];n[r]={scopeName:o,themeMatches:pr(t,o,e.slice(0,r))}}return n}function dt(t,e){return t===e||e.substring(0,t.length)===t&&e[t.length]==="."}function gr(t,e,n){if(!dt(t.at(-1),e))return!1;let r=t.length-2,s=n.length-1;for(;r>=0&&s>=0;)dt(t[r],n[s])&&(r-=1),s-=1;return r===-1}function pr(t,e,n){const r=[];for(const{selectors:s,settings:o}of t)for(const a of s)if(gr(a,e,n)){r.push(o);break}return r}function Ye(t,e,n,r=Kt){const s=Object.entries(n.themes).filter(c=>c[1]).map(c=>({color:c[0],theme:c[1]})),o=s.map(c=>{const u=r(t,e,{...n,theme:c.theme});return{tokens:u,state:Q(u),theme:typeof c.theme=="string"?c.theme:c.theme.name}}),a=mr(...o.map(c=>c.tokens)),i=a[0].map((c,u)=>c.map((h,f)=>{const g={content:h.content,variants:{},offset:h.offset};return"includeExplanation"in n&&n.includeExplanation&&(g.explanation=h.explanation),a.forEach((p,b)=>{const{content:_,explanation:y,offset:m,...C}=p[u][f];g.variants[s[b].color]=C}),g})),l=o[0].state?new we(Object.fromEntries(o.map(c=>[c.theme,c.state?.getInternalStack(c.theme)])),o[0].state.lang):void 0;return l&&Ce(i,l),i}function mr(...t){const e=t.map(()=>[]),n=t.length;for(let r=0;r<t[0].length;r++){const s=t.map(l=>l[r]),o=e.map(()=>[]);e.forEach((l,c)=>l.push(o[c]));const a=s.map(()=>0),i=s.map(l=>l[0]);for(;i.every(l=>l);){const l=Math.min(...i.map(c=>c.content.length));for(let c=0;c<n;c++){const u=i[c];u.content.length===l?(o[c].push(u),a[c]+=1,i[c]=s[c][a[c]]):(o[c].push({...u,content:u.content.slice(0,l)}),i[c]={...u,content:u.content.slice(l),offset:u.offset+l})}}}return e}const yr=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class ne{constructor(e,n,r){this.normal=n,this.property=e,r&&(this.space=r)}}ne.prototype.normal={};ne.prototype.property={};ne.prototype.space=void 0;function Xt(t,e){const n={},r={};for(const s of t)Object.assign(n,s.property),Object.assign(r,s.normal);return new ne(n,r,e)}function je(t){return t.toLowerCase()}class L{constructor(e,n){this.attribute=n,this.property=e}}L.prototype.attribute="";L.prototype.booleanish=!1;L.prototype.boolean=!1;L.prototype.commaOrSpaceSeparated=!1;L.prototype.commaSeparated=!1;L.prototype.defined=!1;L.prototype.mustUseProperty=!1;L.prototype.number=!1;L.prototype.overloadedBoolean=!1;L.prototype.property="";L.prototype.spaceSeparated=!1;L.prototype.space=void 0;let _r=0;const S=W(),R=W(),Fe=W(),d=W(),w=W(),F=W(),E=W();function W(){return 2**++_r}const We=Object.freeze(Object.defineProperty({__proto__:null,boolean:S,booleanish:R,commaOrSpaceSeparated:E,commaSeparated:F,number:d,overloadedBoolean:Fe,spaceSeparated:w},Symbol.toStringTag,{value:"Module"})),xe=Object.keys(We);class Xe extends L{constructor(e,n,r,s){let o=-1;if(super(e,n),ft(this,"space",s),typeof r=="number")for(;++o<xe.length;){const a=xe[o];ft(this,xe[o],(r&We[a])===We[a])}}}Xe.prototype.defined=!0;function ft(t,e,n){n&&(t[e]=n)}function U(t){const e={},n={};for(const[r,s]of Object.entries(t.properties)){const o=new Xe(r,t.transform(t.attributes||{},r),s,t.space);t.mustUseProperty&&t.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),e[r]=o,n[je(r)]=r,n[je(o.attribute)]=r}return new ne(e,n,t.space)}const Jt=U({properties:{ariaActiveDescendant:null,ariaAtomic:R,ariaAutoComplete:null,ariaBusy:R,ariaChecked:R,ariaColCount:d,ariaColIndex:d,ariaColSpan:d,ariaControls:w,ariaCurrent:null,ariaDescribedBy:w,ariaDetails:null,ariaDisabled:R,ariaDropEffect:w,ariaErrorMessage:null,ariaExpanded:R,ariaFlowTo:w,ariaGrabbed:R,ariaHasPopup:null,ariaHidden:R,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:w,ariaLevel:d,ariaLive:null,ariaModal:R,ariaMultiLine:R,ariaMultiSelectable:R,ariaOrientation:null,ariaOwns:w,ariaPlaceholder:null,ariaPosInSet:d,ariaPressed:R,ariaReadOnly:R,ariaRelevant:null,ariaRequired:R,ariaRoleDescription:w,ariaRowCount:d,ariaRowIndex:d,ariaRowSpan:d,ariaSelected:R,ariaSetSize:d,ariaSort:null,ariaValueMax:d,ariaValueMin:d,ariaValueNow:d,ariaValueText:null,role:null},transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function Qt(t,e){return e in t?t[e]:e}function Zt(t,e){return Qt(t,e.toLowerCase())}const br=U({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:F,acceptCharset:w,accessKey:w,action:null,allow:null,allowFullScreen:S,allowPaymentRequest:S,allowUserMedia:S,alpha:S,alt:null,as:null,async:S,autoCapitalize:null,autoComplete:w,autoFocus:S,autoPlay:S,blocking:w,capture:null,charSet:null,checked:S,cite:null,className:w,closedBy:null,colorSpace:null,cols:d,colSpan:d,command:null,commandFor:null,content:null,contentEditable:R,controls:S,controlsList:w,coords:d|F,crossOrigin:null,data:null,dateTime:null,decoding:null,default:S,defer:S,dir:null,dirName:null,disabled:S,download:Fe,draggable:R,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:S,formTarget:null,headers:w,height:d,hidden:Fe,high:d,href:null,hrefLang:null,htmlFor:w,httpEquiv:w,id:null,imageSizes:null,imageSrcSet:null,inert:S,inputMode:null,integrity:null,is:null,isMap:S,itemId:null,itemProp:w,itemRef:w,itemScope:S,itemType:w,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:S,low:d,manifest:null,max:null,maxLength:d,media:null,method:null,min:null,minLength:d,multiple:S,muted:S,name:null,nonce:null,noModule:S,noValidate:S,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:S,optimum:d,pattern:null,ping:w,placeholder:null,playsInline:S,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:S,referrerPolicy:null,rel:w,required:S,reversed:S,rows:d,rowSpan:d,sandbox:w,scope:null,scoped:S,seamless:S,selected:S,shadowRootClonable:S,shadowRootCustomElementRegistry:S,shadowRootDelegatesFocus:S,shadowRootMode:null,shadowRootSerializable:S,shape:null,size:d,sizes:null,slot:null,span:d,spellCheck:R,src:null,srcDoc:null,srcLang:null,srcSet:null,start:d,step:null,style:null,tabIndex:d,target:null,title:null,translate:null,type:null,typeMustMatch:S,useMap:null,value:R,width:d,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:w,axis:null,background:null,bgColor:null,border:d,borderColor:null,bottomMargin:d,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:S,declare:S,event:null,face:null,frame:null,frameBorder:null,hSpace:d,leftMargin:d,link:null,longDesc:null,lowSrc:null,marginHeight:d,marginWidth:d,noResize:S,noHref:S,noShade:S,noWrap:S,object:null,profile:null,prompt:null,rev:null,rightMargin:d,rules:null,scheme:null,scrolling:R,standby:null,summary:null,text:null,topMargin:d,valueType:null,version:null,vAlign:null,vLink:null,vSpace:d,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:S,disablePictureInPicture:S,disableRemotePlayback:S,exportParts:F,part:w,prefix:null,property:null,results:d,security:null,unselectable:null},space:"html",transform:Zt}),Sr=U({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:E,accentHeight:d,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:d,amplitude:d,arabicForm:null,ascent:d,attributeName:null,attributeType:null,azimuth:d,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:d,by:null,calcMode:null,capHeight:d,className:w,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:d,diffuseConstant:d,direction:null,display:null,dur:null,divisor:d,dominantBaseline:null,download:S,dx:null,dy:null,edgeMode:null,editable:null,elevation:d,enableBackground:null,end:null,event:null,exponent:d,externalResourcesRequired:null,fill:null,fillOpacity:d,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:F,g2:F,glyphName:F,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:d,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:d,horizOriginX:d,horizOriginY:d,id:null,ideographic:d,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:d,k:d,k1:d,k2:d,k3:d,k4:d,kernelMatrix:E,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:d,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:d,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:d,overlineThickness:d,paintOrder:null,panose1:null,path:null,pathLength:d,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:w,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:d,pointsAtY:d,pointsAtZ:d,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:E,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:E,rev:E,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:E,requiredFeatures:E,requiredFonts:E,requiredFormats:E,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:d,specularExponent:d,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:d,strikethroughThickness:d,string:null,stroke:null,strokeDashArray:E,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:d,strokeOpacity:d,strokeWidth:null,style:null,surfaceScale:d,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:E,tabIndex:d,tableValues:null,target:null,targetX:d,targetY:d,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:E,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:d,underlineThickness:d,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:d,values:null,vAlphabetic:d,vMathematical:d,vectorEffect:null,vHanging:d,vIdeographic:d,version:null,vertAdvY:d,vertOriginX:d,vertOriginY:d,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:d,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Qt}),en=U({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,e){return"xlink:"+e.slice(5).toLowerCase()}}),tn=U({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Zt}),nn=U({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()}}),Cr=/[A-Z]/g,gt=/-[a-z]/g,wr=/^data[-\w.:]+$/i;function kr(t,e){const n=je(e);let r=e,s=L;if(n in t.normal)return t.property[t.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&wr.test(e)){if(e.charAt(4)==="-"){const o=e.slice(5).replace(gt,Rr);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=e.slice(4);if(!gt.test(o)){let a=o.replace(Cr,vr);a.charAt(0)!=="-"&&(a="-"+a),e="data"+a}}s=Xe}return new s(r,e)}function vr(t){return"-"+t.toLowerCase()}function Rr(t){return t.charAt(1).toUpperCase()}const Tr=Xt([Jt,br,en,tn,nn],"html"),rn=Xt([Jt,Sr,en,tn,nn],"svg"),pt={}.hasOwnProperty;function Ar(t,e){const n=e||{};function r(s,...o){let a=r.invalid;const i=r.handlers;if(s&&pt.call(s,t)){const l=String(s[t]);a=pt.call(i,l)?i[l]:r.unknown}if(a)return a.call(this,s,...o)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const Nr=/["&'<>`]/g,xr=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Lr=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Er=/[|\\{}()[\]^$+*?.]/g,mt=new WeakMap;function Pr(t,e){if(t=t.replace(e.subset?Ir(e.subset):Nr,r),e.subset||e.escapeOnly)return t;return t.replace(xr,n).replace(Lr,r);function n(s,o,a){return e.format((s.charCodeAt(0)-55296)*1024+s.charCodeAt(1)-56320+65536,a.charCodeAt(o+2),e)}function r(s,o,a){return e.format(s.charCodeAt(0),a.charCodeAt(o+1),e)}}function Ir(t){let e=mt.get(t);return e||(e=Or(t),mt.set(t,e)),e}function Or(t){const e=[];let n=-1;for(;++n<t.length;)e.push(t[n].replace(Er,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}const Mr=/[\dA-Fa-f]/;function Br(t,e,n){const r="&#x"+t.toString(16).toUpperCase();return n&&e&&!Mr.test(String.fromCharCode(e))?r:r+";"}const Gr=/\d/;function $r(t,e,n){const r="&#"+String(t);return n&&e&&!Gr.test(String.fromCharCode(e))?r:r+";"}const Dr=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],Le={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},jr=["cent","copy","divide","gt","lt","not","para","times"],sn={}.hasOwnProperty,ze={};let oe;for(oe in Le)sn.call(Le,oe)&&(ze[Le[oe]]=oe);const Fr=/[^\dA-Za-z]/;function Wr(t,e,n,r){const s=String.fromCharCode(t);if(sn.call(ze,s)){const o=ze[s],a="&"+o;return n&&Dr.includes(o)&&!jr.includes(o)&&(!r||e&&e!==61&&Fr.test(String.fromCharCode(e)))?a:a+";"}return""}function zr(t,e,n){let r=Br(t,e,n.omitOptionalSemicolons),s;if((n.useNamedReferences||n.useShortestReferences)&&(s=Wr(t,e,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!s)&&n.useShortestReferences){const o=$r(t,e,n.omitOptionalSemicolons);o.length<r.length&&(r=o)}return s&&(!n.useShortestReferences||s.length<r.length)?s:r}function H(t,e){return Pr(t,Object.assign({format:zr},e))}const Hr=/^>|^->|<!--|-->|--!>|<!-$/g,Ur=[">"],qr=["<",">"];function Vr(t,e,n,r){return r.settings.bogusComments?"<?"+H(t.value,Object.assign({},r.settings.characterReferences,{subset:Ur}))+">":"<!--"+t.value.replace(Hr,s)+"-->";function s(o){return H(o,Object.assign({},r.settings.characterReferences,{subset:qr}))}}function Kr(t,e,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function yt(t,e){const n=String(t);if(typeof e!="string")throw new TypeError("Expected character");let r=0,s=n.indexOf(e);for(;s!==-1;)r++,s=n.indexOf(e,s+e.length);return r}function Yr(t,e){const n=e||{};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function Xr(t){return t.join(" ").trim()}const Jr=/[ \t\n\f\r]/g;function Je(t){return typeof t=="object"?t.type==="text"?_t(t.value):!1:_t(t)}function _t(t){return t.replace(Jr,"")===""}const T=an(1),on=an(-1),Qr=[];function an(t){return e;function e(n,r,s){const o=n?n.children:Qr;let a=(r||0)+t,i=o[a];if(!s)for(;i&&Je(i);)a+=t,i=o[a];return i}}const Zr={}.hasOwnProperty;function ln(t){return e;function e(n,r,s){return Zr.call(t,n.tagName)&&t[n.tagName](n,r,s)}}const Qe=ln({body:ts,caption:Ee,colgroup:Ee,dd:os,dt:ss,head:Ee,html:es,li:rs,optgroup:as,option:is,p:ns,rp:bt,rt:bt,tbody:cs,td:St,tfoot:us,th:St,thead:ls,tr:hs});function Ee(t,e,n){const r=T(n,e,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&Je(r.value.charAt(0)))}function es(t,e,n){const r=T(n,e);return!r||r.type!=="comment"}function ts(t,e,n){const r=T(n,e);return!r||r.type!=="comment"}function ns(t,e,n){const r=T(n,e);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function rs(t,e,n){const r=T(n,e);return!r||r.type==="element"&&r.tagName==="li"}function ss(t,e,n){const r=T(n,e);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function os(t,e,n){const r=T(n,e);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function bt(t,e,n){const r=T(n,e);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function as(t,e,n){const r=T(n,e);return!r||r.type==="element"&&r.tagName==="optgroup"}function is(t,e,n){const r=T(n,e);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function ls(t,e,n){const r=T(n,e);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function cs(t,e,n){const r=T(n,e);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function us(t,e,n){return!T(n,e)}function hs(t,e,n){const r=T(n,e);return!r||r.type==="element"&&r.tagName==="tr"}function St(t,e,n){const r=T(n,e);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const ds=ln({body:ps,colgroup:ms,head:gs,html:fs,tbody:ys});function fs(t){const e=T(t,-1);return!e||e.type!=="comment"}function gs(t){const e=new Set;for(const r of t.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(e.has(r.tagName))return!1;e.add(r.tagName)}const n=t.children[0];return!n||n.type==="element"}function ps(t){const e=T(t,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&Je(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function ms(t,e,n){const r=on(n,e),s=T(t,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&Qe(r,n.children.indexOf(r),n)?!1:!!(s&&s.type==="element"&&s.tagName==="col")}function ys(t,e,n){const r=on(n,e),s=T(t,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&Qe(r,n.children.indexOf(r),n)?!1:!!(s&&s.type==="element"&&s.tagName==="tr")}const ae={name:[[`
|
|
4
|
+
\f\r &/=>`.split(""),`
|
|
5
|
+
\f\r "&'/=>\``.split("")],[`\0
|
|
6
|
+
\f\r "&'/<=>`.split(""),`\0
|
|
7
|
+
\f\r "&'/<=>\``.split("")]],unquoted:[[`
|
|
8
|
+
\f\r &>`.split(""),`\0
|
|
9
|
+
\f\r "&'<=>\``.split("")],[`\0
|
|
10
|
+
\f\r "&'<=>\``.split(""),`\0
|
|
11
|
+
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function _s(t,e,n,r){const s=r.schema,o=s.space==="svg"?!1:r.settings.omitOptionalTags;let a=s.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(t.tagName.toLowerCase());const i=[];let l;s.space==="html"&&t.tagName==="svg"&&(r.schema=rn);const c=bs(r,t.properties),u=r.all(s.space==="html"&&t.tagName==="template"?t.content:t);return r.schema=s,u&&(a=!1),(c||!o||!ds(t,e,n))&&(i.push("<",t.tagName,c?" "+c:""),a&&(s.space==="svg"||r.settings.closeSelfClosing)&&(l=c.charAt(c.length-1),(!r.settings.tightSelfClosing||l==="/"||l&&l!=='"'&&l!=="'")&&i.push(" "),i.push("/")),i.push(">")),i.push(u),!a&&(!o||!Qe(t,e,n))&&i.push("</"+t.tagName+">"),i.join("")}function bs(t,e){const n=[];let r=-1,s;if(e){for(s in e)if(e[s]!==null&&e[s]!==void 0){const o=Ss(t,s,e[s]);o&&n.push(o)}}for(;++r<n.length;){const o=t.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&o!=='"'&&o!=="'"&&(n[r]+=" ")}return n.join("")}function Ss(t,e,n){const r=kr(t.schema,e),s=t.settings.allowParseErrors&&t.schema.space==="html"?0:1,o=t.settings.allowDangerousCharacters?0:1;let a=t.quote,i;if(r.overloadedBoolean&&(n===r.attribute||n==="")?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!="string"||n===r.attribute||n==="")&&(n=!!n),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";const l=H(r.attribute,Object.assign({},t.settings.characterReferences,{subset:ae.name[s][o]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?Yr:Xr)(n,{padLeft:!t.settings.tightCommaSeparatedLists}):String(n),t.settings.collapseEmptyAttributes&&!n)?l:(t.settings.preferUnquoted&&(i=H(n,Object.assign({},t.settings.characterReferences,{attribute:!0,subset:ae.unquoted[s][o]}))),i!==n&&(t.settings.quoteSmart&&yt(n,a)>yt(n,t.alternative)&&(a=t.alternative),i=a+H(n,Object.assign({},t.settings.characterReferences,{subset:(a==="'"?ae.single:ae.double)[s][o],attribute:!0}))+a),l+(i&&"="+i))}const Cs=["<","&"];function cn(t,e,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?t.value:H(t.value,Object.assign({},r.settings.characterReferences,{subset:Cs}))}function ws(t,e,n,r){return r.settings.allowDangerousHtml?t.value:cn(t,e,n,r)}function ks(t,e,n,r){return r.all(t)}const vs=Ar("type",{invalid:Rs,unknown:Ts,handlers:{comment:Vr,doctype:Kr,element:_s,raw:ws,root:ks,text:cn}});function Rs(t){throw new Error("Expected node, not `"+t+"`")}function Ts(t){const e=t;throw new Error("Cannot compile unknown node `"+e.type+"`")}const As={},Ns={},xs=[];function Ls(t,e){const n=e||As,r=n.quote||'"',s=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:Es,all:Ps,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||yr,characterReferences:n.characterReferences||Ns,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?rn:Tr,quote:r,alternative:s}.one(Array.isArray(t)?{type:"root",children:t}:t,void 0,void 0)}function Es(t,e,n){return vs(t,e,n,this)}function Ps(t){const e=[],n=t&&t.children||xs;let r=-1;for(;++r<n.length;)e[r]=this.one(n[r],r,t);return e.join("")}const Ct=/\s+/g;function un(t,e){if(!e)return t;t.properties||={},t.properties.class||=[],typeof t.properties.class=="string"&&(t.properties.class=t.properties.class.split(Ct)),Array.isArray(t.properties.class)||(t.properties.class=[]);const n=Array.isArray(e)?e:e.split(Ct);for(const r of n)r&&!t.properties.class.includes(r)&&t.properties.class.push(r);return t}const Is=/:?lang=["']([^"']+)["']/g,Os=/(?:```|~~~)([\w-]+)/g,Ms=/\\begin\{([\w-]+)\}/g,Bs=/<script\s+(?:type|lang)=["']([^"']+)["']/gi,Gs=/^\s*---\r?\n[\s\S]*?\r?\n---(?:\r?\n|\s*$)/;function $s(t){const e=Se(t,!0).map(([s])=>s);function n(s){if(s===t.length)return{line:e.length-1,character:e.at(-1).length};let o=s,a=0;for(const i of e){if(o<i.length)break;o-=i.length,a++}return{line:a,character:o}}function r(s,o){let a=0;for(let i=0;i<s;i++)a+=e[i].length;return a+=o,a}return{lines:e,indexToPos:n,posToIndex:r}}function mo(t,e,n){const r=new Set;for(const o of t.matchAll(Is)){const a=o[1].toLowerCase().trim();a&&r.add(a)}for(const o of t.matchAll(Os)){const a=o[1].toLowerCase().trim();a&&r.add(a)}for(const o of t.matchAll(Ms)){const a=o[1].toLowerCase().trim();a&&r.add(a)}for(const o of t.matchAll(Bs)){const a=o[1].toLowerCase().trim(),i=a.includes("/")?a.split("/").pop():a;i&&r.add(i)}if(Gs.test(t)&&r.add("yaml"),!n)return[...r];const s=n.getBundledLanguages();return[...r].filter(o=>o&&s[o])}const Ds=["color","background-color"];function js(t,e){let n=0;const r=[];for(const s of e)s>n&&r.push({...t,content:t.content.slice(n,s),offset:t.offset+n}),n=s;return n<t.content.length&&r.push({...t,content:t.content.slice(n),offset:t.offset+n}),r}function Fs(t,e){let n=0,r=t.length;for(;n<r;){const s=n+(r-n>>1);t[s]<=e?n=s+1:r=s}return n}function Ws(t,e){const n=[...e instanceof Set?e:new Set(e)].sort((r,s)=>r-s);return n.length?t.map(r=>r.flatMap(s=>{const o=s.offset+s.content.length,a=Fs(n,s.offset);let i=a;for(;i<n.length&&n[i]<o;)i++;if(a===i)return s;const l=n.slice(a,i);for(let c=0;c<l.length;c++)l[c]-=s.offset;return js(s,l)})):t}function zs(t,e,n,r,s="css-vars"){const o={content:t.content,explanation:t.explanation,offset:t.offset},a=e.map(u=>pe(t.variants[u])),i=new Set(a.flatMap(u=>Object.keys(u))),l={},c=(u,h)=>{const f=h==="color"?"":h==="background-color"?"-bg":`-${h}`;return n+e[u]+(h==="color"?"":f)};return a.forEach((u,h)=>{for(const f of i){const g=u[f]||"inherit";if(h===0&&r&&Ds.includes(f))if(r==="light-dark()"&&a.length>1){const p=e.findIndex(m=>m==="light"),b=e.findIndex(m=>m==="dark");if(p===-1||b===-1)throw new k('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const _=a[p][f]||"inherit",y=a[b][f]||"inherit";l[f]=`light-dark(${_}, ${y})`,s==="css-vars"&&(l[c(h,f)]=g)}else l[f]=g;else s==="css-vars"&&(l[c(h,f)]=g)}}),o.htmlStyle=l,o}function pe(t){const e={};if(t.color&&(e.color=t.color),t.bgColor&&(e["background-color"]=t.bgColor),t.fontStyle){t.fontStyle&x.Italic&&(e["font-style"]="italic"),t.fontStyle&x.Bold&&(e["font-weight"]="bold");const n=[];t.fontStyle&x.Underline&&n.push("underline"),t.fontStyle&x.Strikethrough&&n.push("line-through"),n.length&&(e["text-decoration"]=n.join(" "))}return e}function He(t){return typeof t=="string"?t:Object.entries(t).map(([e,n])=>`${e}:${n}`).join(";")}function Hs(){const t=new WeakMap;function e(n){if(!t.has(n.meta)){let s=function(a){if(typeof a=="number"){if(a<0||a>n.source.length)throw new k(`Invalid decoration offset: ${a}. Code length: ${n.source.length}`);return{...r.indexToPos(a),offset:a}}else{const i=r.lines[a.line];if(i===void 0)throw new k(`Invalid decoration position ${JSON.stringify(a)}. Lines length: ${r.lines.length}`);let l=a.character;if(l<0&&(l=i.length+l),l<0||l>i.length)throw new k(`Invalid decoration position ${JSON.stringify(a)}. Line ${a.line} length: ${i.length}`);return{...a,character:l,offset:r.posToIndex(a.line,l)}}};const r=$s(n.source),o=(n.options.decorations||[]).map(a=>({...a,start:s(a.start),end:s(a.end)}));Us(o),t.set(n.meta,{decorations:o,converter:r,source:n.source})}return t.get(n.meta)}return{name:"shiki:decorations",tokens(n){if(this.options.decorations?.length)return Ws(n,e(this).decorations.flatMap(r=>[r.start.offset,r.end.offset]))},code(n){if(!this.options.decorations?.length)return;const r=e(this),s=[...n.children].filter(u=>u.type==="element"&&u.tagName==="span");if(s.length!==r.converter.lines.length)throw new k(`Number of lines in code element (${s.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);function o(u,h,f,g){const p=s[u];let b="",_=-1,y=-1;if(h===0&&(_=0),f===0&&(y=0),f===Number.POSITIVE_INFINITY&&(y=p.children.length),_===-1||y===-1)for(let C=0;C<p.children.length;C++)b+=hn(p.children[C]),_===-1&&b.length===h&&(_=C+1),y===-1&&b.length===f&&(y=C+1);if(_===-1)throw new k(`Failed to find start index for decoration ${JSON.stringify(g.start)}`);if(y===-1)throw new k(`Failed to find end index for decoration ${JSON.stringify(g.end)}`);const m=p.children.slice(_,y);if(!g.alwaysWrap&&m.length===p.children.length)i(p,g,"line");else if(!g.alwaysWrap&&m.length===1&&m[0].type==="element")i(m[0],g,"token");else{const C={type:"element",tagName:"span",properties:{},children:m};i(C,g,"wrapper"),p.children.splice(_,m.length,C)}}function a(u,h){s[u]=i(s[u],h,"line")}function i(u,h,f){const g=h.properties||{},p=h.transform||(b=>b);return u.tagName=h.tagName||"span",u.properties={...u.properties,...g,class:u.properties.class},h.properties?.class&&un(u,h.properties.class),u=p(u,f)||u,u}const l=[],c=r.decorations.sort((u,h)=>h.start.offset-u.start.offset||u.end.offset-h.end.offset);for(const u of c){const{start:h,end:f}=u;if(h.line===f.line)o(h.line,h.character,f.character,u);else if(h.line<f.line){o(h.line,h.character,Number.POSITIVE_INFINITY,u);for(let g=h.line+1;g<f.line;g++)l.unshift(()=>a(g,u));o(f.line,0,f.character,u)}}l.forEach(u=>u())}}}function Us(t){for(let e=0;e<t.length;e++){const n=t[e];if(n.start.offset>n.end.offset)throw new k(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=e+1;r<t.length;r++){const s=t[r],o=n.start.offset<=s.start.offset&&s.start.offset<n.end.offset,a=n.start.offset<s.end.offset&&s.end.offset<=n.end.offset,i=s.start.offset<=n.start.offset&&n.start.offset<s.end.offset,l=s.start.offset<n.end.offset&&n.end.offset<=s.end.offset;if(o||a||i||l){if(o&&a||i&&l||i&&n.start.offset===n.end.offset||a&&s.start.offset===s.end.offset)continue;throw new k(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(s.start)} intersect.`)}}}}function hn(t){return t.type==="text"?t.value:t.type==="element"?t.children.map(hn).join(""):""}const qs=[Hs()];function me(t){const e=Vs(t.transformers||[]);return[...e.pre,...e.normal,...e.post,...qs]}function Vs(t){const e=[],n=[],r=[];for(const s of t)switch(s.enforce){case"pre":e.push(s);break;case"post":n.push(s);break;default:r.push(s)}return{pre:e,post:n,normal:r}}var D=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Pe={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function Ks(t,e){const n=t.indexOf("\x1B",e);if(n!==-1&&t[n+1]==="["){const r=t.indexOf("m",n);if(r!==-1)return{sequence:t.substring(n+2,r).split(";"),startPosition:n,position:r+1}}return{position:t.length}}function wt(t){const e=t.shift();if(e==="2"){const n=t.splice(0,3).map(r=>Number.parseInt(r));return n.length!==3||n.some(r=>Number.isNaN(r))?void 0:{type:"rgb",rgb:n}}else if(e==="5"){const n=t.shift();if(n)return{type:"table",index:Number(n)}}}function Ys(t){const e=[];for(;t.length>0;){const n=t.shift();if(!n)continue;const r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)e.push({type:"resetAll"});else if(r<=9)Pe[r]&&e.push({type:"setDecoration",value:Pe[r]});else if(r<=29){const s=Pe[r-20];s&&(e.push({type:"resetDecoration",value:s}),s==="dim"&&e.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)e.push({type:"setForegroundColor",value:{type:"named",name:D[r-30]}});else if(r===38){const s=wt(t);s&&e.push({type:"setForegroundColor",value:s})}else if(r===39)e.push({type:"resetForegroundColor"});else if(r<=47)e.push({type:"setBackgroundColor",value:{type:"named",name:D[r-40]}});else if(r===48){const s=wt(t);s&&e.push({type:"setBackgroundColor",value:s})}else r===49?e.push({type:"resetBackgroundColor"}):r===53?e.push({type:"setDecoration",value:"overline"}):r===55?e.push({type:"resetDecoration",value:"overline"}):r>=90&&r<=97?e.push({type:"setForegroundColor",value:{type:"named",name:D[r-90+8]}}):r>=100&&r<=107&&e.push({type:"setBackgroundColor",value:{type:"named",name:D[r-100+8]}})}return e}function Xs(){let t=null,e=null,n=new Set;return{parse(r){const s=[];let o=0;do{const a=Ks(r,o),i=a.sequence?r.substring(o,a.startPosition):r.substring(o);if(i.length>0&&s.push({value:i,foreground:t,background:e,decorations:new Set(n)}),a.sequence){const l=Ys(a.sequence);for(const c of l)c.type==="resetAll"?(t=null,e=null,n.clear()):c.type==="resetForegroundColor"?t=null:c.type==="resetBackgroundColor"?e=null:c.type==="resetDecoration"&&n.delete(c.value);for(const c of l)c.type==="setForegroundColor"?t=c.value:c.type==="setBackgroundColor"?e=c.value:c.type==="setDecoration"&&n.add(c.value)}o=a.position}while(o<r.length);return s}}}var Js={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function Qs(t=Js){function e(i){return t[i]}function n(i){return`#${i.map(l=>Math.max(0,Math.min(l,255)).toString(16).padStart(2,"0")).join("")}`}let r;function s(){if(r)return r;r=[];for(let c=0;c<D.length;c++)r.push(e(D[c]));let i=[0,95,135,175,215,255];for(let c=0;c<6;c++)for(let u=0;u<6;u++)for(let h=0;h<6;h++)r.push(n([i[c],i[u],i[h]]));let l=8;for(let c=0;c<24;c++,l+=10)r.push(n([l,l,l]));return r}function o(i){return s()[i]}function a(i){switch(i.type){case"named":return e(i.name);case"rgb":return n(i.rgb);case"table":return o(i.index)}}return{value:a}}const Zs=/#([0-9a-f]{3,8})/i,eo=/var\((--[\w-]+-ansi-[\w-]+)\)/,to={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function no(t,e,n){const r=ge(t,n),s=Se(e),o=Qs(Object.fromEntries(D.map(i=>{const l=`terminal.ansi${i[0].toUpperCase()}${i.substring(1)}`;return[i,t.colors?.[l]||to[i]]}))),a=Xs();return s.map(i=>a.parse(i[0]).map(l=>{let c,u;l.decorations.has("reverse")?(c=l.background?o.value(l.background):t.bg,u=l.foreground?o.value(l.foreground):t.fg):(c=l.foreground?o.value(l.foreground):t.fg,u=l.background?o.value(l.background):void 0),c=G(c,r),u=G(u,r),l.decorations.has("dim")&&(c=ro(c));let h=x.None;return l.decorations.has("bold")&&(h|=x.Bold),l.decorations.has("italic")&&(h|=x.Italic),l.decorations.has("underline")&&(h|=x.Underline),l.decorations.has("strikethrough")&&(h|=x.Strikethrough),{content:l.value,offset:i[1],color:c,bgColor:u,fontStyle:h}}))}function ro(t){const e=t.match(Zs);if(e){const r=e[1];if(r.length===8){const s=Math.round(Number.parseInt(r.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${r.slice(0,6)}${s}`}else{if(r.length===6)return`#${r}80`;if(r.length===4){const s=r[0],o=r[1],a=r[2],i=r[3];return`#${s}${s}${o}${o}${a}${a}${Math.round(Number.parseInt(`${i}${i}`,16)/2).toString(16).padStart(2,"0")}`}else if(r.length===3){const s=r[0],o=r[1],a=r[2];return`#${s}${s}${o}${o}${a}${a}80`}}}const n=t.match(eo);return n?`var(${n[1]}-dim)`:t}function ye(t,e,n={}){const r=t.resolveLangAlias(n.lang||"text"),{theme:s=t.getLoadedThemes()[0]}=n;if(!_e(r)&&!be(s)&&r==="ansi"){const{theme:o}=t.setTheme(s);return no(o,e,n)}return Kt(t,e,n)}function Z(t,e,n){let r,s,o,a,i,l;if("themes"in n){const{defaultColor:c="light",cssVariablePrefix:u="--shiki-",colorsRendering:h="css-vars"}=n,f=Object.entries(n.themes).filter(y=>y[1]).map(y=>({color:y[0],theme:y[1]})).sort((y,m)=>y.color===c?-1:m.color===c?1:0);if(f.length===0)throw new k("`themes` option must not be empty");const g=Ye(t,e,n,ye);if(l=Q(g),c&&c!=="light-dark()"&&!f.some(y=>y.color===c))throw new k(`\`themes\` option must contain the defaultColor key \`${c}\``);const p=f.map(y=>t.getTheme(y.theme)),b=f.map(y=>y.color);o=g.map(y=>y.map(m=>zs(m,b,u,c,h))),l&&Ce(o,l);const _=f.map(y=>ge(y.theme,n));s=kt(f,p,_,u,c,"fg",h),r=kt(f,p,_,u,c,"bg",h),a=`shiki-themes ${p.map(y=>y.name).join(" ")}`,i=c?void 0:[s,r].join(";")}else if("theme"in n){const c=ge(n.theme,n);o=ye(t,e,n);const u=t.getTheme(n.theme);r=G(u.bg,c),s=G(u.fg,c),a=u.name,l=Q(o)}else throw new k("Invalid options, either `theme` or `themes` must be provided");return{tokens:o,fg:s,bg:r,themeName:a,rootStyle:i,grammarState:l}}function kt(t,e,n,r,s,o,a){return t.map((i,l)=>{const c=G(e[l][o],n[l])||"inherit",u=`${r+i.color}${o==="bg"?"-bg":""}:${c}`;if(l===0&&s){if(s==="light-dark()"&&t.length>1){const h=t.findIndex(g=>g.color==="light"),f=t.findIndex(g=>g.color==="dark");if(h===-1||f===-1)throw new k('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${G(e[h][o],n[h])||"inherit"}, ${G(e[f][o],n[f])||"inherit"});${u}`}return c}return a==="css-vars"?u:null}).filter(i=>!!i).join(";")}const dn=/^\s+$/,so=/^(\s*)(.*?)(\s*)$/;function ee(t,e,n,r={meta:{},options:n,codeToHast:(s,o)=>ee(t,s,o),codeToTokens:(s,o)=>Z(t,s,o)}){let s=e;for(const p of me(n))s=p.preprocess?.call(r,s,n)||s;let{tokens:o,fg:a,bg:i,themeName:l,rootStyle:c,grammarState:u}=Z(t,s,n);const{mergeWhitespaces:h=!0,mergeSameStyleTokens:f=!1}=n;h===!0?o=ao(o):h==="never"&&(o=io(o)),f&&(o=lo(o));const g={...r,get source(){return s}};for(const p of me(n))o=p.tokens?.call(g,o)||o;return oo(o,{...n,fg:a,bg:i,themeName:l,rootStyle:n.rootStyle===!1?!1:n.rootStyle??c},g,u)}function oo(t,e,n,r=Q(t)){const s=me(e),o=[],a={type:"root",children:[]},{structure:i="classic",tabindex:l="0"}=e,c={class:`shiki ${e.themeName||""}`};e.rootStyle!==!1&&(e.rootStyle!=null?c.style=e.rootStyle:c.style=`background-color:${e.bg};color:${e.fg}`),l!==!1&&l!=null&&(c.tabindex=l.toString());for(const[b,_]of Object.entries(e.meta||{}))b.startsWith("_")||(c[b]=_);let u={type:"element",tagName:"pre",properties:c,children:[],data:e.data},h={type:"element",tagName:"code",properties:{},children:o};const f=[],g={...n,structure:i,addClassToHast:un,get source(){return n.source},get tokens(){return t},get options(){return e},get root(){return a},get pre(){return u},get code(){return h},get lines(){return f}};if(t.forEach((b,_)=>{_&&(i==="inline"?a.children.push({type:"element",tagName:"br",properties:{},children:[]}):i==="classic"&&o.push({type:"text",value:`
|
|
12
|
+
`}));let y={type:"element",tagName:"span",properties:{class:"line"},children:[]},m=0;for(const C of b){let v={type:"element",tagName:"span",properties:{...C.htmlAttrs},children:[{type:"text",value:C.content}]};const A=He(C.htmlStyle||pe(C));A&&(v.properties.style=A);for(const P of s)v=P?.span?.call(g,v,_+1,m,y,C)||v;i==="inline"?a.children.push(v):i==="classic"&&y.children.push(v),m+=C.content.length}if(i==="classic"){for(const C of s)y=C?.line?.call(g,y,_+1)||y;f.push(y),o.push(y)}else i==="inline"&&f.push(y)}),i==="classic"){for(const b of s)h=b?.code?.call(g,h)||h;u.children.push(h);for(const b of s)u=b?.pre?.call(g,u)||u;a.children.push(u)}else if(i==="inline"){const b=[];let _={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const m of a.children)m.type==="element"&&m.tagName==="br"?(b.push(_),_={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(m.type==="element"||m.type==="text")&&_.children.push(m);b.push(_);let y={type:"element",tagName:"code",properties:{},children:b};for(const m of s)y=m?.code?.call(g,y)||y;a.children=[];for(let m=0;m<y.children.length;m++){m>0&&a.children.push({type:"element",tagName:"br",properties:{},children:[]});const C=y.children[m];C.type==="element"&&a.children.push(...C.children)}}let p=a;for(const b of s)p=b?.root?.call(g,p)||p;return r&&Ce(p,r),p}function ao(t){return t.map(e=>{const n=[];let r="",s;return e.forEach((o,a)=>{const i=!(o.fontStyle&&(o.fontStyle&x.Underline||o.fontStyle&x.Strikethrough));i&&dn.test(o.content)&&e[a+1]?(s===void 0&&(s=o.offset),r+=o.content):r?(i?n.push({...o,offset:s,content:r+o.content}):n.push({content:r,offset:s},o),s=void 0,r=""):n.push(o)}),n})}function io(t){return t.map(e=>e.flatMap(n=>{if(dn.test(n.content))return n;const r=n.content.match(so);if(!r)return n;const[,s,o,a]=r;if(!s&&!a)return n;const i=[{...n,offset:n.offset+s.length,content:o}];return s&&i.unshift({content:s,offset:n.offset}),a&&i.push({content:a,offset:n.offset+s.length+o.length}),i}))}function lo(t){return t.map(e=>{const n=[];for(const r of e){if(n.length===0){n.push({...r});continue}const s=n.at(-1),o=He(s.htmlStyle||pe(s)),a=He(r.htmlStyle||pe(r)),i=s.fontStyle&&(s.fontStyle&x.Underline||s.fontStyle&x.Strikethrough),l=r.fontStyle&&(r.fontStyle&x.Underline||r.fontStyle&x.Strikethrough);!i&&!l&&o===a?s.content+=r.content:n.push({...r})}return n})}const co=Ls;function fn(t,e,n){const r={meta:{},options:n,codeToHast:(o,a)=>ee(t,o,a),codeToTokens:(o,a)=>Z(t,o,a)};let s=co(ee(t,e,n,r));for(const o of me(n))s=o.postprocess?.call(r,s,n)||s;return s}async function gn(t){const e=await Ut(t);return{getLastGrammarState:(...n)=>Yt(e,...n),codeToTokensBase:(n,r)=>ye(e,n,r),codeToTokensWithThemes:(n,r)=>Ye(e,n,r),codeToTokens:(n,r)=>Z(e,n,r),codeToHast:(n,r)=>ee(e,n,r),codeToHtml:(n,r)=>fn(e,n,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...e,getInternalContext:()=>e}}function yo(t){const e=Ve(t);return{getLastGrammarState:(...n)=>Yt(e,...n),codeToTokensBase:(n,r)=>ye(e,n,r),codeToTokensWithThemes:(n,r)=>Ye(e,n,r),codeToTokens:(n,r)=>Z(e,n,r),codeToHast:(n,r)=>ee(e,n,r),codeToHtml:(n,r)=>fn(e,n,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...e,getInternalContext:()=>e}}function uo(t){let e;async function n(r){if(e){const s=await e;return await Promise.all([s.loadTheme(...r.themes||[]),s.loadLanguage(...r.langs||[])]),s}else return e=t({...r,themes:r.themes||[],langs:r.langs||[]}),e}return n}const _o=uo(gn);function bo(t){const e=t.langs,n=t.themes,r=t.engine;async function s(o){function a(h){if(typeof h=="string"){if(h=o.langAlias?.[h]||h,jt(h))return[];const f=e[h];if(!f)throw new k(`Language \`${h}\` is not included in this bundle. You may want to load it from external source.`);return f}return h}function i(h){if(Ft(h))return"none";if(typeof h=="string"){const f=n[h];if(!f)throw new k(`Theme \`${h}\` is not included in this bundle. You may want to load it from external source.`);return f}return h}const l=(o.themes??[]).map(h=>i(h)),c=(o.langs??[]).map(h=>a(h)),u=await gn({engine:o.engine??r(),...o,themes:l,langs:c});return{...u,loadLanguage(...h){return u.loadLanguage(...h.map(a))},loadTheme(...h){return u.loadTheme(...h.map(i))},getBundledLanguages(){return e},getBundledThemes(){return n}}}return s}function ho(t){let e;async function n(r={}){if(e){const s=await e;return await Promise.all([s.loadTheme(...r.themes||[]),s.loadLanguage(...r.langs||[])]),s}else{e=t({...r,themes:[],langs:[]});const s=await e;return await Promise.all([s.loadTheme(...r.themes||[]),s.loadLanguage(...r.langs||[])]),s}}return n}function So(t,e){const n=ho(t);async function r(s,o){const a=await n({langs:[o.lang],themes:"theme"in o?[o.theme]:Object.values(o.themes)}),i=await e?.guessEmbeddedLanguages?.(s,o.lang,a);return i&&await a.loadLanguage(...i),a}return{getSingletonHighlighter(s){return n(s)},async codeToHtml(s,o){return(await r(s,o)).codeToHtml(s,o)},async codeToHast(s,o){return(await r(s,o)).codeToHast(s,o)},async codeToTokens(s,o){return(await r(s,o)).codeToTokens(s,o)},async codeToTokensBase(s,o){return(await r(s,o)).codeToTokensBase(s,o)},async codeToTokensWithThemes(s,o){return(await r(s,o)).codeToTokensWithThemes(s,o)},async getLastGrammarState(s,o){return(await n({langs:[o.lang],themes:[o.theme]})).getLastGrammarState(s,o)}}}function Co(t={}){const{name:e="css-variables",variablePrefix:n="--shiki-",fontStyle:r=!0}=t,s=a=>t.variableDefaults?.[a]?`var(${n}${a}, ${t.variableDefaults[a]})`:`var(${n}${a})`,o={name:e,type:"dark",colors:{"editor.foreground":s("foreground"),"editor.background":s("background"),"terminal.ansiBlack":s("ansi-black"),"terminal.ansiRed":s("ansi-red"),"terminal.ansiGreen":s("ansi-green"),"terminal.ansiYellow":s("ansi-yellow"),"terminal.ansiBlue":s("ansi-blue"),"terminal.ansiMagenta":s("ansi-magenta"),"terminal.ansiCyan":s("ansi-cyan"),"terminal.ansiWhite":s("ansi-white"),"terminal.ansiBrightBlack":s("ansi-bright-black"),"terminal.ansiBrightRed":s("ansi-bright-red"),"terminal.ansiBrightGreen":s("ansi-bright-green"),"terminal.ansiBrightYellow":s("ansi-bright-yellow"),"terminal.ansiBrightBlue":s("ansi-bright-blue"),"terminal.ansiBrightMagenta":s("ansi-bright-magenta"),"terminal.ansiBrightCyan":s("ansi-bright-cyan"),"terminal.ansiBrightWhite":s("ansi-bright-white")},tokenColors:[{scope:["keyword.operator.accessor","meta.group.braces.round.function.arguments","meta.template.expression","markup.fenced_code meta.embedded.block"],settings:{foreground:s("foreground")}},{scope:"emphasis",settings:{fontStyle:"italic"}},{scope:["strong","markup.heading.markdown","markup.bold.markdown"],settings:{fontStyle:"bold"}},{scope:["markup.italic.markdown"],settings:{fontStyle:"italic"}},{scope:"meta.link.inline.markdown",settings:{fontStyle:"underline",foreground:s("token-link")}},{scope:["string","markup.fenced_code","markup.inline"],settings:{foreground:s("token-string")}},{scope:["comment","string.quoted.docstring.multi"],settings:{foreground:s("token-comment")}},{scope:["constant.numeric","constant.language","constant.other.placeholder","constant.character.format.placeholder","variable.language.this","variable.other.object","variable.other.class","variable.other.constant","meta.property-name","meta.property-value","support"],settings:{foreground:s("token-constant")}},{scope:["keyword","storage.modifier","storage.type","storage.control.clojure","entity.name.function.clojure","entity.name.tag.yaml","support.function.node","support.type.property-name.json","punctuation.separator.key-value","punctuation.definition.template-expression"],settings:{foreground:s("token-keyword")}},{scope:"variable.parameter.function",settings:{foreground:s("token-parameter")}},{scope:["support.function","entity.name.type","entity.other.inherited-class","meta.function-call","meta.instance.constructor","entity.other.attribute-name","entity.name.function","constant.keyword.clojure"],settings:{foreground:s("token-function")}},{scope:["entity.name.tag","string.quoted","string.regexp","string.interpolated","string.template","string.unquoted.plain.out.yaml","keyword.other.template"],settings:{foreground:s("token-string-expression")}},{scope:["punctuation.definition.arguments","punctuation.definition.dict","punctuation.separator","meta.function-call.arguments"],settings:{foreground:s("token-punctuation")}},{scope:["markup.underline.link","punctuation.definition.metadata.markdown"],settings:{foreground:s("token-link")}},{scope:["beginning.punctuation.definition.list.markdown"],settings:{foreground:s("token-string")}},{scope:["punctuation.definition.string.begin.markdown","punctuation.definition.string.end.markdown","string.other.link.title.markdown","string.other.link.description.markdown"],settings:{foreground:s("token-keyword")}},{scope:["markup.inserted","meta.diff.header.to-file","punctuation.definition.inserted"],settings:{foreground:s("token-inserted")}},{scope:["markup.deleted","meta.diff.header.from-file","punctuation.definition.deleted"],settings:{foreground:s("token-deleted")}},{scope:["markup.changed","punctuation.definition.changed"],settings:{foreground:s("token-changed")}}]};return r||(o.tokenColors=o.tokenColors?.map(a=>(a.settings?.fontStyle&&delete a.settings.fontStyle,a))),o}export{k as ShikiError,un as addClassToHast,G as applyColorReplacements,ee as codeToHast,fn as codeToHtml,Z as codeToTokens,ye as codeToTokensBase,Ye as codeToTokensWithThemes,bo as createBundledHighlighter,Co as createCssVariablesTheme,gn as createHighlighterCore,yo as createHighlighterCoreSync,$s as createPositionConverter,po as createShikiInternal,go as createShikiInternalSync,Ve as createShikiPrimitive,Ut as createShikiPrimitiveAsync,So as createSingletonShorthands,zs as flatTokenVariants,Yt as getLastGrammarState,_o as getSingletonHighlighterCore,pe as getTokenStyleObject,mo as guessEmbeddedLanguages,co as hastToHtml,be as isNoneTheme,_e as isPlainLang,jt as isSpecialLang,Ft as isSpecialTheme,ho as makeSingletonHighlighter,uo as makeSingletonHighlighterCore,Dt as normalizeGetter,qe as normalizeTheme,ge as resolveColorReplacements,Se as splitLines,js as splitToken,Ws as splitTokens,He as stringifyTokenStyle,rr as toArray,no as tokenizeAnsiWithTheme,hr as tokenizeWithTheme,oo as tokensToHast,Hs as transformerDecorations};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=Object.freeze(JSON.parse(`{"displayName":"CSS","name":"css","patterns":[{"include":"#comment-block"},{"include":"#escapes"},{"include":"#combinator-invalid"},{"include":"#selector"},{"include":"#at-rules"},{"include":"#rule-list"}],"repository":{"arithmetic-operators":{"match":"[*/]|(?<=\\\\s|^)[-+](?=\\\\s|$)","name":"keyword.operator.arithmetic.css"},"at-rules":{"patterns":[{"begin":"\\\\A\\\\uFEFF?(?i:(?=\\\\s*@charset\\\\b))","end":";|(?=$)","endCaptures":{"0":{"name":"punctuation.terminator.rule.css"}},"name":"meta.at-rule.charset.css","patterns":[{"captures":{"1":{"name":"invalid.illegal.not-lowercase.charset.css"},"2":{"name":"invalid.illegal.leading-whitespace.charset.css"},"3":{"name":"invalid.illegal.no-whitespace.charset.css"},"4":{"name":"invalid.illegal.whitespace.charset.css"},"5":{"name":"invalid.illegal.not-double-quoted.charset.css"},"6":{"name":"invalid.illegal.unclosed-string.charset.css"},"7":{"name":"invalid.illegal.unexpected-characters.charset.css"}},"match":"\\\\G((?!@charset)@\\\\w+)|\\\\G(\\\\s+)|(@charset\\\\S[^;]*)|(?<=@charset)( {2,}|\\\\t+)|(?<=@charset )([^\\";]+)|(\\"[^\\"]+)$|(?<=\\")([^;]+)"},{"captures":{"1":{"name":"keyword.control.at-rule.charset.css"},"2":{"name":"punctuation.definition.keyword.css"}},"match":"((@)charset)(?=\\\\s)"},{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.css"}},"end":"\\"|$","endCaptures":{"0":{"name":"punctuation.definition.string.end.css"}},"name":"string.quoted.double.css","patterns":[{"begin":"(?:\\\\G|^)(?=[^\\"]+$)","end":"$","name":"invalid.illegal.unclosed.string.css"}]}]},{"begin":"(?i)((@)import)(?:\\\\s+|$|(?=[\\"']|/\\\\*))","beginCaptures":{"1":{"name":"keyword.control.at-rule.import.css"},"2":{"name":"punctuation.definition.keyword.css"}},"end":";","endCaptures":{"0":{"name":"punctuation.terminator.rule.css"}},"name":"meta.at-rule.import.css","patterns":[{"begin":"\\\\G\\\\s*(?=/\\\\*)","end":"(?<=\\\\*/)\\\\s*","patterns":[{"include":"#comment-block"}]},{"include":"#string"},{"include":"#url"},{"match":"\\\\s+"},{"include":"#layer-import"},{"include":"#media-query-list"}]},{"begin":"(?i)((@)font-face)(?=\\\\s*|\\\\{|/\\\\*|$)","beginCaptures":{"1":{"name":"keyword.control.at-rule.font-face.css"},"2":{"name":"punctuation.definition.keyword.css"}},"end":"(?!\\\\G)","name":"meta.at-rule.font-face.css","patterns":[{"include":"#comment-block"},{"include":"#escapes"},{"include":"#rule-list"}]},{"begin":"(?i)(@)page(?=[:{\\\\s]|/\\\\*|$)","captures":{"0":{"name":"keyword.control.at-rule.page.css"},"1":{"name":"punctuation.definition.keyword.css"}},"end":"(?=\\\\s*($|[:;{]))","name":"meta.at-rule.page.css","patterns":[{"include":"#rule-list"}]},{"begin":"(?i)(?=@media([(\\\\s]|/\\\\*|$))","end":"(?<=})(?!\\\\G)","patterns":[{"begin":"(?i)\\\\G(@)media","beginCaptures":{"0":{"name":"keyword.control.at-rule.media.css"},"1":{"name":"punctuation.definition.keyword.css"}},"end":"(?=\\\\s*[;{])","name":"meta.at-rule.media.header.css","patterns":[{"include":"#media-query-list"}]},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.media.begin.bracket.curly.css"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.media.end.bracket.curly.css"}},"name":"meta.at-rule.media.body.css","patterns":[{"include":"#rule-list-innards"},{"include":"$self"}]}]},{"begin":"(?i)(?=@counter-style([\\"';{\\\\s]|/\\\\*|$))","end":"(?<=})(?!\\\\G)","patterns":[{"begin":"(?i)\\\\G(@)counter-style","beginCaptures":{"0":{"name":"keyword.control.at-rule.counter-style.css"},"1":{"name":"punctuation.definition.keyword.css"}},"end":"(?=\\\\s*\\\\{)","name":"meta.at-rule.counter-style.header.css","patterns":[{"include":"#comment-block"},{"include":"#escapes"},{"captures":{"0":{"patterns":[{"include":"#escapes"}]}},"match":"[-A-Z_a-z[^\\\\x00-\\\\x7F]](?:[-0-9A-Z_a-z[^\\\\x00-\\\\x7F]]|\\\\\\\\(?:\\\\h{1,6}|.))*","name":"variable.parameter.style-name.css"}]},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.property-list.begin.bracket.curly.css"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.property-list.end.bracket.curly.css"}},"name":"meta.at-rule.counter-style.body.css","patterns":[{"include":"#comment-block"},{"include":"#escapes"},{"include":"#rule-list-innards"}]}]},{"begin":"(?i)(?=@document([\\"';{\\\\s]|/\\\\*|$))","end":"(?<=})(?!\\\\G)","patterns":[{"begin":"(?i)\\\\G(@)document","beginCaptures":{"0":{"name":"keyword.control.at-rule.document.css"},"1":{"name":"punctuation.definition.keyword.css"}},"end":"(?=\\\\s*[;{])","name":"meta.at-rule.document.header.css","patterns":[{"begin":"(?i)(?<![-\\\\w])(url-prefix|domain|regexp)(\\\\()","beginCaptures":{"1":{"name":"support.function.document-rule.css"},"2":{"name":"punctuation.section.function.begin.bracket.round.css"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.function.end.bracket.round.css"}},"name":"meta.function.document-rule.css","patterns":[{"include":"#string"},{"include":"#comment-block"},{"include":"#escapes"},{"match":"[^\\"')\\\\s]+","name":"variable.parameter.document-rule.css"}]},{"include":"#url"},{"include":"#commas"},{"include":"#comment-block"},{"include":"#escapes"}]},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.document.begin.bracket.curly.css"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.document.end.bracket.curly.css"}},"name":"meta.at-rule.document.body.css","patterns":[{"include":"$self"}]}]},{"begin":"(?i)(?=@(?:-(?:webkit|moz|o|ms)-)?keyframes([\\"';{\\\\s]|/\\\\*|$))","end":"(?<=})(?!\\\\G)","patterns":[{"begin":"(?i)\\\\G(@)(?:-(?:webkit|moz|o|ms)-)?keyframes","beginCaptures":{"0":{"name":"keyword.control.at-rule.keyframes.css"},"1":{"name":"punctuation.definition.keyword.css"}},"end":"(?=\\\\s*\\\\{)","name":"meta.at-rule.keyframes.header.css","patterns":[{"include":"#comment-block"},{"include":"#escapes"},{"captures":{"0":{"patterns":[{"include":"#escapes"}]}},"match":"[-A-Z_a-z[^\\\\x00-\\\\x7F]](?:[-0-9A-Z_a-z[^\\\\x00-\\\\x7F]]|\\\\\\\\(?:\\\\h{1,6}|.))*","name":"variable.parameter.keyframe-list.css"}]},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.keyframes.begin.bracket.curly.css"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.keyframes.end.bracket.curly.css"}},"name":"meta.at-rule.keyframes.body.css","patterns":[{"include":"#comment-block"},{"include":"#escapes"},{"captures":{"1":{"name":"entity.other.keyframe-offset.css"},"2":{"name":"entity.other.keyframe-offset.percentage.css"}},"match":"(?i)(?<![-\\\\w])(from|to)(?![-\\\\w])|([-+]?(?:\\\\d+(?:\\\\.\\\\d+)?|\\\\.\\\\d+)%)"},{"include":"#rule-list"}]}]},{"begin":"(?i)(?=@supports([(\\\\s]|/\\\\*|$))","end":"(?<=})(?!\\\\G)|(?=;)","patterns":[{"begin":"(?i)\\\\G(@)supports","beginCaptures":{"0":{"name":"keyword.control.at-rule.supports.css"},"1":{"name":"punctuation.definition.keyword.css"}},"end":"(?=\\\\s*[;{])","name":"meta.at-rule.supports.header.css","patterns":[{"include":"#feature-query-operators"},{"include":"#feature-query"},{"include":"#comment-block"},{"include":"#escapes"}]},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.supports.begin.bracket.curly.css"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.supports.end.bracket.curly.css"}},"name":"meta.at-rule.supports.body.css","patterns":[{"include":"$self"}]}]},{"begin":"(?i)(?=@layer(?:[;{\\\\s]|/\\\\*|$))","end":"(?<=})(?!\\\\G)|;","endCaptures":{"0":{"name":"punctuation.terminator.rule.css"}},"patterns":[{"begin":"(?i)\\\\G(@)layer","beginCaptures":{"0":{"name":"keyword.control.at-rule.layer.css"},"1":{"name":"punctuation.definition.keyword.css"}},"end":"(?=\\\\s*[;{])","name":"meta.at-rule.layer.header.css","patterns":[{"include":"#layer-name-list"},{"include":"#comment-block"},{"include":"#escapes"}]},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.layer.begin.bracket.curly.css"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.layer.end.bracket.curly.css"}},"name":"meta.at-rule.layer.body.css","patterns":[{"include":"$self"}]}]},{"begin":"(?i)((@)(-(ms|o)-)?viewport)(?=[\\"';{\\\\s]|/\\\\*|$)","beginCaptures":{"1":{"name":"keyword.control.at-rule.viewport.css"},"2":{"name":"punctuation.definition.keyword.css"}},"end":"(?=\\\\s*[;@{])","name":"meta.at-rule.viewport.css","patterns":[{"include":"#comment-block"},{"include":"#escapes"}]},{"begin":"(?i)((@)font-feature-values)(?=[\\"';{\\\\s]|/\\\\*|$)\\\\s*","beginCaptures":{"1":{"name":"keyword.control.at-rule.font-feature-values.css"},"2":{"name":"punctuation.definition.keyword.css"}},"contentName":"variable.parameter.font-name.css","end":"(?=\\\\s*[;@{])","name":"meta.at-rule.font-features.css","patterns":[{"include":"#comment-block"},{"include":"#escapes"}]},{"include":"#font-features"},{"begin":"(?i)((@)namespace)(?=[\\"';\\\\s]|/\\\\*|$)","beginCaptures":{"1":{"name":"keyword.control.at-rule.namespace.css"},"2":{"name":"punctuation.definition.keyword.css"}},"end":";|(?=[@{])","endCaptures":{"0":{"name":"punctuation.terminator.rule.css"}},"name":"meta.at-rule.namespace.css","patterns":[{"include":"#url"},{"captures":{"1":{"patterns":[{"include":"#comment-block"}]},"2":{"name":"entity.name.function.namespace-prefix.css","patterns":[{"include":"#escapes"}]}},"match":"(?i)(?:\\\\G|^|(?<=\\\\s))(?=(?<=\\\\s|^)[-A-Z_a-z[^\\\\x00-\\\\x7F]]|\\\\s*/\\\\*(?:[^*]|\\\\*[^/])*\\\\*/)(.*?)([-A-Z_a-z[^\\\\x00-\\\\x7F]](?:[-0-9A-Z_a-z[^\\\\x00-\\\\x7F]]|\\\\\\\\(?:\\\\h{1,6}|.))*)"},{"include":"#comment-block"},{"include":"#escapes"},{"include":"#string"}]},{"begin":"(?i)(?=@[-\\\\w]+[^;]+;s*$)","end":"(?<=;)(?!\\\\G)","patterns":[{"begin":"(?i)\\\\G(@)[-\\\\w]+","beginCaptures":{"0":{"name":"keyword.control.at-rule.css"},"1":{"name":"punctuation.definition.keyword.css"}},"end":";","endCaptures":{"0":{"name":"punctuation.terminator.rule.css"}},"name":"meta.at-rule.header.css"}]},{"begin":"(?i)(?=@[-\\\\w]+([({\\\\s]|/\\\\*|$))","end":"(?<=})(?!\\\\G)","patterns":[{"begin":"(?i)\\\\G(@)[-\\\\w]+","beginCaptures":{"0":{"name":"keyword.control.at-rule.css"},"1":{"name":"punctuation.definition.keyword.css"}},"end":"(?=\\\\s*[;{])","name":"meta.at-rule.header.css"},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.begin.bracket.curly.css"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.end.bracket.curly.css"}},"name":"meta.at-rule.body.css","patterns":[{"include":"#rule-list-innards"},{"include":"$self"}]}]}]},"color-keywords":{"patterns":[{"match":"(?i)(?<![-\\\\w])(aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow)(?![-\\\\w])","name":"support.constant.color.w3c-standard-color-name.css"},{"match":"(?i)(?<![-\\\\w])(aliceblue|antiquewhite|aquamarine|azure|beige|bisque|blanchedalmond|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|gainsboro|ghostwhite|gold|goldenrod|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|limegreen|linen|magenta|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|oldlace|olivedrab|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|rebeccapurple|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|thistle|tomato|transparent|turquoise|violet|wheat|whitesmoke|yellowgreen)(?![-\\\\w])","name":"support.constant.color.w3c-extended-color-name.css"},{"match":"(?i)(?<![-\\\\w])currentColor(?![-\\\\w])","name":"support.constant.color.current.css"},{"match":"(?i)(?<![-\\\\w])(ActiveBorder|ActiveCaption|AppWorkspace|Background|ButtonFace|ButtonHighlight|ButtonShadow|ButtonText|CaptionText|GrayText|Highlight|HighlightText|InactiveBorder|InactiveCaption|InactiveCaptionText|InfoBackground|InfoText|Menu|MenuText|Scrollbar|ThreeDDarkShadow|ThreeDFace|ThreeDHighlight|ThreeDLightShadow|ThreeDShadow|Window|WindowFrame|WindowText)(?![-\\\\w])","name":"invalid.deprecated.color.system.css"}]},"combinator-invalid":{"match":"/deep/|>>>","name":"invalid.deprecated.combinator.css"},"combinators":{"patterns":[{"include":"#combinator-invalid"},{"match":">>|[+>~]","name":"keyword.operator.combinator.css"}]},"commas":{"match":",","name":"punctuation.separator.list.comma.css"},"comment-block":{"begin":"/\\\\*","beginCaptures":{"0":{"name":"punctuation.definition.comment.begin.css"}},"end":"\\\\*/","endCaptures":{"0":{"name":"punctuation.definition.comment.end.css"}},"name":"comment.block.css"},"escapes":{"patterns":[{"match":"\\\\\\\\\\\\h{1,6}","name":"constant.character.escape.codepoint.css"},{"begin":"\\\\\\\\$\\\\s*","end":"^(?<!\\\\G)","name":"constant.character.escape.newline.css"},{"match":"\\\\\\\\.","name":"constant.character.escape.css"}]},"feature-query":{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.condition.begin.bracket.round.css"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.condition.end.bracket.round.css"}},"name":"meta.feature-query.css","patterns":[{"include":"#feature-query-operators"},{"include":"#feature-query"}]},"feature-query-operators":{"patterns":[{"match":"(?i)(?<=[()\\\\s]|^|\\\\*/)(and|not|or)(?=[()\\\\s]|/\\\\*|$)","name":"keyword.operator.logical.feature.$1.css"},{"include":"#rule-list-innards"}]},"font-features":{"begin":"(?i)((@)(annotation|character-variant|ornaments|styleset|stylistic|swash))(?=[\\"';@{\\\\s]|/\\\\*|$)","beginCaptures":{"1":{"name":"keyword.control.at-rule.\${3:/downcase}.css"},"2":{"name":"punctuation.definition.keyword.css"}},"end":"(?<=})","name":"meta.at-rule.\${3:/downcase}.css","patterns":[{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.property-list.begin.bracket.curly.css"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.property-list.end.bracket.curly.css"}},"name":"meta.property-list.font-feature.css","patterns":[{"captures":{"0":{"patterns":[{"include":"#escapes"}]}},"match":"[-A-Z_a-z[^\\\\x00-\\\\x7F]](?:[-0-9A-Z_a-z[^\\\\x00-\\\\x7F]]|\\\\\\\\(?:\\\\h{1,6}|.))*","name":"variable.font-feature.css"},{"include":"#rule-list-innards"}]}]},"function-nesting":{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.function.begin.bracket.round.css"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.function.end.bracket.round.css"}},"patterns":[{"include":"#arithmetic-operators"},{"include":"#property-values"},{"include":"#function-nesting"}]},"functional-pseudo-classes":{"patterns":[{"begin":"(?i)((:)dir)(\\\\()","beginCaptures":{"1":{"name":"entity.other.attribute-name.pseudo-class.css"},"2":{"name":"punctuation.definition.entity.css"},"3":{"name":"punctuation.section.function.begin.bracket.round.css"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.function.end.bracket.round.css"}},"patterns":[{"include":"#comment-block"},{"include":"#escapes"},{"match":"(?i)(?<![-\\\\w])(ltr|rtl)(?![-\\\\w])","name":"support.constant.text-direction.css"},{"include":"#property-values"}]},{"begin":"(?i)((:)lang)(\\\\()","beginCaptures":{"1":{"name":"entity.other.attribute-name.pseudo-class.css"},"2":{"name":"punctuation.definition.entity.css"},"3":{"name":"punctuation.section.function.begin.bracket.round.css"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.function.end.bracket.round.css"}},"patterns":[{"match":"(?<=[(,\\\\s])[A-Za-z]+(-[0-9A-Za-z]*|\\\\\\\\(?:\\\\h{1,6}|.))*(?=[),\\\\s])","name":"support.constant.language-range.css"},{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.css"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.css"}},"name":"string.quoted.double.css","patterns":[{"include":"#escapes"},{"match":"(?<=[\\"\\\\s])[*A-Za-z]+(-[*0-9A-Za-z]*)*(?=[\\"\\\\s])","name":"support.constant.language-range.css"}]},{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.css"}},"end":"'","endCaptures":{"0":{"name":"punctuation.definition.string.end.css"}},"name":"string.quoted.single.css","patterns":[{"include":"#escapes"},{"match":"(?<=['\\\\s])[*A-Za-z]+(-[*0-9A-Za-z]*)*(?=['\\\\s])","name":"support.constant.language-range.css"}]},{"include":"#commas"}]},{"begin":"(?i)((:)(?:not|has|matches|where|is))(\\\\()","beginCaptures":{"1":{"name":"entity.other.attribute-name.pseudo-class.css"},"2":{"name":"punctuation.definition.entity.css"},"3":{"name":"punctuation.section.function.begin.bracket.round.css"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.function.end.bracket.round.css"}},"patterns":[{"include":"#selector-innards"}]},{"begin":"(?i)((:)nth-(?:last-)?(?:child|of-type))(\\\\()","beginCaptures":{"1":{"name":"entity.other.attribute-name.pseudo-class.css"},"2":{"name":"punctuation.definition.entity.css"},"3":{"name":"punctuation.section.function.begin.bracket.round.css"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.function.end.bracket.round.css"}},"patterns":[{"match":"(?i)[-+]?(\\\\d+n?|n)(\\\\s*[-+]\\\\s*\\\\d+)?","name":"constant.numeric.css"},{"match":"(?i)even|odd","name":"support.constant.parity.css"}]}]},"functions":{"patterns":[{"begin":"(?i)(?<![-\\\\w])(calc)(\\\\()","beginCaptures":{"1":{"name":"support.function.calc.css"},"2":{"name":"punctuation.section.function.begin.bracket.round.css"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.function.end.bracket.round.css"}},"name":"meta.function.calc.css","patterns":[{"include":"#arithmetic-operators"},{"include":"#property-values"},{"include":"#function-nesting"}]},{"begin":"(?i)(?<![-\\\\w])(rgba?|hsla?|hwb|lab|oklab|lch|oklch|color)(\\\\()","beginCaptures":{"1":{"name":"support.function.misc.css"},"2":{"name":"punctuation.section.function.begin.bracket.round.css"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.function.end.bracket.round.css"}},"name":"meta.function.color.css","patterns":[{"include":"#property-values"}]},{"begin":"(?i)(?<![-\\\\w])((?:-(?:webkit-|moz-|o-))?(?:repeating-)?(?:linear|radial|conic)-gradient)(\\\\()","beginCaptures":{"1":{"name":"support.function.gradient.css"},"2":{"name":"punctuation.section.function.begin.bracket.round.css"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.function.end.bracket.round.css"}},"name":"meta.function.gradient.css","patterns":[{"match":"(?i)(?<![-\\\\w])(from|to|at|in|hue)(?![-\\\\w])","name":"keyword.operator.gradient.css"},{"include":"#property-values"}]},{"begin":"(?i)(?<![-\\\\w])(-webkit-gradient)(\\\\()","beginCaptures":{"1":{"name":"invalid.deprecated.gradient.function.css"},"2":{"name":"punctuation.section.function.begin.bracket.round.css"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.function.end.bracket.round.css"}},"name":"meta.function.gradient.invalid.deprecated.gradient.css","patterns":[{"begin":"(?i)(?<![-\\\\w])(from|to|color-stop)(\\\\()","beginCaptures":{"1":{"name":"invalid.deprecated.function.css"},"2":{"name":"punctuation.section.function.begin.bracket.round.css"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.function.end.bracket.round.css"}},"patterns":[{"include":"#property-values"}]},{"include":"#property-values"}]},{"begin":"(?i)(?<![-\\\\w])(annotation|attr|blur|brightness|character-variant|clamp|contrast|counters?|cross-fade|drop-shadow|element|fit-content|format|grayscale|hue-rotate|color-mix|image-set|invert|local|max|min|minmax|opacity|ornaments|repeat|saturate|sepia|styleset|stylistic|swash|symbols|cos|sin|tan|acos|asin|atan2??|hypot|sqrt|pow|log|exp|abs|sign|if|style)(\\\\()","beginCaptures":{"1":{"name":"support.function.misc.css"},"2":{"name":"punctuation.section.function.begin.bracket.round.css"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.function.end.bracket.round.css"}},"name":"meta.function.misc.css","patterns":[{"match":"(?i)(?<=[\\",\\\\s]|\\\\*/|^)\\\\d+x(?=[\\"'),\\\\s]|/\\\\*|$)","name":"constant.numeric.other.density.css"},{"include":"#arithmetic-operators"},{"include":"#property-values"},{"match":"[^\\"'),\\\\s]+","name":"variable.parameter.misc.css"}]},{"begin":"(?i)(?<![-\\\\w])(circle|ellipse|inset|polygon|rect)(\\\\()","beginCaptures":{"1":{"name":"support.function.shape.css"},"2":{"name":"punctuation.section.function.begin.bracket.round.css"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.function.end.bracket.round.css"}},"name":"meta.function.shape.css","patterns":[{"match":"(?i)(?<=\\\\s|^|\\\\*/)(at|round)(?=\\\\s|/\\\\*|$)","name":"keyword.operator.shape.css"},{"include":"#property-values"}]},{"begin":"(?i)(?<![-\\\\w])(cubic-bezier|steps)(\\\\()","beginCaptures":{"1":{"name":"support.function.timing-function.css"},"2":{"name":"punctuation.section.function.begin.bracket.round.css"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.function.end.bracket.round.css"}},"name":"meta.function.timing-function.css","patterns":[{"match":"(?i)(?<![-\\\\w])(start|end)(?=\\\\s*\\\\)|$)","name":"support.constant.step-direction.css"},{"include":"#property-values"}]},{"begin":"(?i)(?<![-\\\\w])((?:translate|scale|rotate)(?:[XYZ]|3D)?|matrix(?:3D)?|skew[XY]?|perspective)(\\\\()","beginCaptures":{"1":{"name":"support.function.transform.css"},"2":{"name":"punctuation.section.function.begin.bracket.round.css"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.function.end.bracket.round.css"}},"patterns":[{"include":"#property-values"}]},{"include":"#url"},{"begin":"(?<![-\\\\w])(--[-A-Z_a-z[^\\\\x00-\\\\x7F]](?:[-0-9A-Z_a-z[^\\\\x00-\\\\x7F]]|\\\\\\\\(?:\\\\h{1,6}|.))*)(\\\\()","beginCaptures":{"1":{"name":"support.function.custom.css"},"2":{"name":"punctuation.section.function.begin.bracket.round.css"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.function.end.bracket.round.css"}},"name":"meta.function.custom.css","patterns":[{"include":"#property-values"}]},{"begin":"(?i)(?<![-\\\\w])(var)(\\\\()","beginCaptures":{"1":{"name":"support.function.misc.css"},"2":{"name":"punctuation.section.function.begin.bracket.round.css"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.function.end.bracket.round.css"}},"name":"meta.function.variable.css","patterns":[{"match":"--[-A-Z_a-z[^\\\\x00-\\\\x7F]](?:[-0-9A-Z_a-z[^\\\\x00-\\\\x7F]]|\\\\\\\\(?:\\\\h{1,6}|.))*","name":"variable.argument.css"},{"include":"#property-values"}]}]},"layer-import":{"patterns":[{"begin":"(?i)(?<![-\\\\w])(layer)(\\\\()","beginCaptures":{"1":{"name":"support.function.layer.css"},"2":{"name":"punctuation.section.function.begin.bracket.round.css"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.function.end.bracket.round.css"}},"name":"meta.function.layer.css","patterns":[{"include":"#layer-name-list"},{"include":"#comment-block"},{"include":"#escapes"}]},{"captures":{"1":{"name":"keyword.other.layer.css"}},"match":"(?i)(?<![-\\\\w])(layer)(?![-\\\\w])"}]},"layer-name-list":{"patterns":[{"include":"#comment-block"},{"match":",","name":"punctuation.separator.list.comma.css"},{"match":"\\\\.","name":"punctuation.accessor.layer.css"},{"captures":{"0":{"patterns":[{"include":"#escapes"}]}},"match":"[-A-Z_a-z[^\\\\x00-\\\\x7F]](?:[-0-9A-Z_a-z[^\\\\x00-\\\\x7F]]|\\\\\\\\(?:\\\\h{1,6}|.))*","name":"variable.parameter.layer-name.css"}]},"media-feature-keywords":{"match":"(?i)(?<=^|[:\\\\s]|\\\\*/)(?:portrait|landscape|progressive|interlace|fullscreen|standalone|minimal-ui|browser|hover)(?=[)\\\\s]|$)","name":"support.constant.property-value.css"},"media-features":{"captures":{"1":{"name":"support.type.property-name.media.css"},"2":{"name":"support.type.property-name.media.css"},"3":{"name":"support.type.vendored.property-name.media.css"}},"match":"(?i)(?<=^|[(\\\\s]|\\\\*/)(?:((?:m(?:in-|ax-))?(?:height|width|aspect-ratio|color|color-index|monochrome|resolution)|grid|scan|orientation|display-mode|hover)|((?:m(?:in-|ax-))?device-(?:height|width|aspect-ratio))|((?:[-_](?:webkit|apple|khtml|epub|moz|ms|o|xv|ah|rim|atsc|hp|tc|wap|ro)|(?:mso|prince))-[-\\\\w]+(?=\\\\s*(?:/\\\\*(?:[^*]|\\\\*[^/])*\\\\*/)?\\\\s*[):])))(?=\\\\s|$|[):<=>]|/\\\\*)"},"media-query":{"begin":"\\\\G","end":"(?=\\\\s*[;{])","patterns":[{"include":"#comment-block"},{"include":"#escapes"},{"include":"#media-types"},{"match":"(?i)(?<=\\\\s|^|,|\\\\*/)(only|not)(?=[{\\\\s]|/\\\\*|$)","name":"keyword.operator.logical.$1.media.css"},{"match":"(?i)(?<=\\\\s|^|\\\\*/|\\\\))and(?=\\\\s|/\\\\*|$)","name":"keyword.operator.logical.and.media.css"},{"match":",(?:(?:\\\\s*,)+|(?=\\\\s*[);{]))","name":"invalid.illegal.comma.css"},{"include":"#commas"},{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.parameters.begin.bracket.round.css"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.parameters.end.bracket.round.css"}},"patterns":[{"include":"#media-features"},{"include":"#media-feature-keywords"},{"match":":","name":"punctuation.separator.key-value.css"},{"match":">=|<=|[<=>]","name":"keyword.operator.comparison.css"},{"captures":{"1":{"name":"constant.numeric.css"},"2":{"name":"keyword.operator.arithmetic.css"},"3":{"name":"constant.numeric.css"}},"match":"(\\\\d+)\\\\s*(/)\\\\s*(\\\\d+)","name":"meta.ratio.css"},{"include":"#numeric-values"},{"include":"#comment-block"},{"include":"#functions"}]}]},"media-query-list":{"begin":"(?=\\\\s*[^;{])","end":"(?=\\\\s*[;{])","patterns":[{"include":"#media-query"}]},"media-types":{"captures":{"1":{"name":"support.constant.media.css"},"2":{"name":"invalid.deprecated.constant.media.css"}},"match":"(?i)(?<=^|[,\\\\s]|\\\\*/)(?:(all|print|screen|speech)|(aural|braille|embossed|handheld|projection|tty|tv))(?=$|[,;{\\\\s]|/\\\\*)"},"numeric-values":{"patterns":[{"captures":{"1":{"name":"punctuation.definition.constant.css"}},"match":"(#)(?:\\\\h{3,4}|\\\\h{6}|\\\\h{8})\\\\b","name":"constant.other.color.rgb-value.hex.css"},{"captures":{"1":{"name":"keyword.other.unit.percentage.css"},"2":{"name":"keyword.other.unit.\${2:/downcase}.css"}},"match":"(?i)(?<![-\\\\w])[-+]?(?:[0-9]+(?:\\\\.[0-9]+)?|\\\\.[0-9]+)(?:(?<=[0-9])E[-+]?[0-9]+)?(?:(%)|(deg|grad|rad|turn|Hz|kHz|ch|cm|em|ex|fr|in|mm|mozmm|pc|pt|px|q|rem|rch|rex|rlh|ic|ric|rcap|vh|vw|vb|vi|svh|svw|svb|svi|dvh|dvw|dvb|dvi|lvh|lvw|lvb|lvi|vmax|vmin|cqw|cqi|cqh|cqb|cqmin|cqmax|dpi|dpcm|dppx|s|ms)\\\\b)?","name":"constant.numeric.css"}]},"property-keywords":{"patterns":[{"match":"(?i)(?<![-\\\\w])(above|absolute|active|add|additive|after-edge|alias|all|all-petite-caps|all-scroll|all-small-caps|alpha|alphabetic|alternate|alternate-reverse|always|antialiased|auto|auto-fill|auto-fit|auto-pos|available|avoid|avoid-column|avoid-page|avoid-region|backwards|balance|baseline|before-edge|below|bevel|bidi-override|blink|block|block-axis|block-start|block-end|bold|bolder|border|border-box|both|bottom|bottom-outside|break-all|break-word|bullets|butt|capitalize|caption|cell|center|central|char|circle|clip|clone|close-quote|closest-corner|closest-side|col-resize|collapse|color|color-burn|color-dodge|column|column-reverse|common-ligatures|compact|condensed|contain|content|content-box|contents|context-menu|contextual|copy|cover|crisp-edges|crispEdges|crosshair|cyclic|dark|darken|dashed|decimal|default|dense|diagonal-fractions|difference|digits|disabled|disc|discretionary-ligatures|distribute|distribute-all-lines|distribute-letter|distribute-space|dot|dotted|double|double-circle|downleft|downright|e-resize|each-line|ease|ease-in|ease-in-out|ease-out|economy|ellipse|ellipsis|embed|end|evenodd|ew-resize|exact|exclude|exclusion|expanded|extends|extra-condensed|extra-expanded|fallback|farthest-corner|farthest-side|fill|fill-available|fill-box|filled|fit-content|fixed|flat|flex|flex-end|flex-start|flip|flow|flow-root|forwards|freeze|from-image|full-width|geometricPrecision|georgian|grab|grabbing|grayscale|grid|groove|hand|hanging|hard-light|help|hidden|hide|historical-forms|historical-ligatures|horizontal|horizontal-tb|hue|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|infinite|inherit|initial|inline|inline-axis|inline-block|inline-end|inline-flex|inline-grid|inline-list-item|inline-start|inline-table|inset|inside|inter-character|inter-ideograph|inter-word|intersect|invert|isolate|isolate-override|italic|jis04|jis78|jis83|jis90|justify|justify-all|kannada|keep-all|landscape|larger??|left|light|lighten|lighter|line|line-edge|line-through|linear|linearRGB|lining-nums|list-item|local|loose|lowercase|lr|lr-tb|ltr|luminance|luminosity|main-size|mandatory|manipulation|manual|margin-box|match-parent|match-source|mathematical|max-content|medium|menu|message-box|middle|min-content|miter|mixed|move|multiply|n-resize|narrower|ne-resize|nearest-neighbor|nesw-resize|newspaper|no-change|no-clip|no-close-quote|no-common-ligatures|no-contextual|no-discretionary-ligatures|no-drop|no-historical-ligatures|no-open-quote|no-repeat|none|nonzero|normal|not-allowed|nowrap|ns-resize|numbers|numeric|nw-resize|nwse-resize|oblique|oldstyle-nums|open|open-quote|optimizeLegibility|optimizeQuality|optimizeSpeed|optional|ordinal|outset|outside|over|overlay|overline|padding|padding-box|page|painted|pan-down|pan-left|pan-right|pan-up|pan-x|pan-y|paused|petite-caps|pixelated|plaintext|pointer|portrait|pre|pre-line|pre-wrap|preserve-3d|progress|progressive|proportional-nums|proportional-width|proximity|radial|recto|region|relative|remove|repeat|repeat-[xy]|reset-size|reverse|revert|revert-layer|ridge|right|rl|rl-tb|round|row|row-resize|row-reverse|row-severse|rtl|ruby|ruby-base|ruby-base-container|ruby-text|ruby-text-container|run-in|running|s-resize|saturation|scale-down|screen|scroll|scroll-position|se-resize|semi-condensed|semi-expanded|separate|sesame|show|sideways|sideways-left|sideways-lr|sideways-right|sideways-rl|simplified|slashed-zero|slice|small|small-caps|small-caption|smaller|smooth|soft-light|solid|space|space-around|space-between|space-evenly|spell-out|square|sRGB|stacked-fractions|start|static|status-bar|swap|step-end|step-start|sticky|stretch|strict|stroke|stroke-box|style|sub|subgrid|subpixel-antialiased|subtract|super|sw-resize|symbolic|table|table-caption|table-cell|table-column|table-column-group|table-footer-group|table-header-group|table-row|table-row-group|tabular-nums|tb|tb-rl|text|text-after-edge|text-before-edge|text-bottom|text-top|thick|thin|titling-caps|top|top-outside|touch|traditional|transparent|triangle|ultra-condensed|ultra-expanded|under|underline|unicase|unset|upleft|uppercase|upright|use-glyph-orientation|use-script|verso|vertical|vertical-ideographic|vertical-lr|vertical-rl|vertical-text|view-box|visible|visibleFill|visiblePainted|visibleStroke|w-resize|wait|wavy|weight|whitespace|wider|words|wrap|wrap-reverse|x|x-large|x-small|xx-large|xx-small|y|zero|zoom-in|zoom-out)(?![-\\\\w])","name":"support.constant.property-value.css"},{"match":"(?i)(?<![-\\\\w])(arabic-indic|armenian|bengali|cambodian|circle|cjk-decimal|cjk-earthly-branch|cjk-heavenly-stem|cjk-ideographic|decimal|decimal-leading-zero|devanagari|disc|disclosure-closed|disclosure-open|ethiopic-halehame-am|ethiopic-halehame-ti-e[rt]|ethiopic-numeric|georgian|gujarati|gurmukhi|hangul|hangul-consonant|hebrew|hiragana|hiragana-iroha|japanese-formal|japanese-informal|kannada|katakana|katakana-iroha|khmer|korean-hangul-formal|korean-hanja-formal|korean-hanja-informal|lao|lower-alpha|lower-armenian|lower-greek|lower-latin|lower-roman|malayalam|mongolian|myanmar|oriya|persian|simp-chinese-formal|simp-chinese-informal|square|tamil|telugu|thai|tibetan|trad-chinese-formal|trad-chinese-informal|upper-alpha|upper-armenian|upper-latin|upper-roman|urdu)(?![-\\\\w])","name":"support.constant.property-value.list-style-type.css"},{"match":"(?<![-\\\\w])(?i:-(?:ah|apple|atsc|epub|hp|khtml|moz|ms|o|rim|ro|tc|wap|webkit|xv)|(?:mso|prince))-[-A-Za-z]+","name":"support.constant.vendored.property-value.css"},{"match":"(?<![-\\\\w])(?i:arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system-ui|system|tahoma|times|trebuchet|ui-monospace|ui-rounded|ui-sans-serif|ui-serif|utopia|verdana|webdings|sans-serif|serif|monospace)(?![-\\\\w])","name":"support.constant.font-name.css"}]},"property-names":{"patterns":[{"match":"(?i)(?<![-\\\\w])(?:accent-color|additive-symbols|align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|aspect-ratio|backdrop-filter|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-position-[xy]|background-repeat|background-size|bleed|block-size|border|border-block-end|border-block-end-color|border-block-end-style|border-block-end-width|border-block-start|border-block-start-color|border-block-start-style|border-block-start-width|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-end-end-radius|border-end-start-radius|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-inline-end|border-inline-end-color|border-inline-end-style|border-inline-end-width|border-inline-start|border-inline-start-color|border-inline-start-style|border-inline-start-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-start-end-radius|border-start-start-radius|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-decoration-break|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|caret-color|clear|clip|clip-path|clip-rule|color|color-adjust|color-interpolation-filters|color-scheme|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|contain|container|container-name|container-type|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|enable-background|fallback|fill|fill-opacity|fill-rule|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|flood-color|flood-opacity|font|font-display|font-family|font-feature-settings|font-kerning|font-language-override|font-optical-sizing|font-size|font-size-adjust|font-stretch|font-style|font-synthesis|font-variant|font-variant-alternates|font-variant-caps|font-variant-east-asian|font-variant-ligatures|font-variant-numeric|font-variant-position|font-variation-settings|font-weight|gap|glyph-orientation-horizontal|glyph-orientation-vertical|grid|grid-area|grid-auto-columns|grid-auto-flow|grid-auto-rows|grid-column|grid-column-end|grid-column-gap|grid-column-start|grid-gap|grid-row|grid-row-end|grid-row-gap|grid-row-start|grid-template|grid-template-areas|grid-template-columns|grid-template-rows|hanging-punctuation|height|hyphens|image-orientation|image-rendering|image-resolution|ime-mode|initial-letter|initial-letter-align|inline-size|inset|inset-block|inset-block-end|inset-block-start|inset-inline|inset-inline-end|inset-inline-start|isolation|justify-content|justify-items|justify-self|kerning|left|letter-spacing|lighting-color|line-break|line-clamp|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-block|margin-block-end|margin-block-start|margin-bottom|margin-inline|margin-inline-end|margin-inline-start|margin-left|margin-right|margin-top|marker-end|marker-mid|marker-start|marks|mask|mask-border|mask-border-mode|mask-border-outset|mask-border-repeat|mask-border-slice|mask-border-source|mask-border-width|mask-clip|mask-composite|mask-image|mask-mode|mask-origin|mask-position|mask-repeat|mask-size|mask-type|max-block-size|max-height|max-inline-size|max-lines|max-width|max-zoom|min-block-size|min-height|min-inline-size|min-width|min-zoom|mix-blend-mode|negative|object-fit|object-position|offset|offset-anchor|offset-distance|offset-path|offset-position|offset-rotation|opacity|order|orientation|orphans|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-anchor|overflow-block|overflow-inline|overflow-wrap|overflow-[xy]|overscroll-behavior|overscroll-behavior-block|overscroll-behavior-inline|overscroll-behavior-[xy]|pad|padding|padding-block|padding-block-end|padding-block-start|padding-bottom|padding-inline|padding-inline-end|padding-inline-start|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|paint-order|perspective|perspective-origin|place-content|place-items|place-self|pointer-events|position|prefix|quotes|range|resize|right|rotate|row-gap|ruby-align|ruby-merge|ruby-position|scale|scroll-behavior|scroll-margin|scroll-margin-block|scroll-margin-block-end|scroll-margin-block-start|scroll-margin-bottom|scroll-margin-inline|scroll-margin-inline-end|scroll-margin-inline-start|scroll-margin-left|scroll-margin-right|scroll-margin-top|scroll-padding|scroll-padding-block|scroll-padding-block-end|scroll-padding-block-start|scroll-padding-bottom|scroll-padding-inline|scroll-padding-inline-end|scroll-padding-inline-start|scroll-padding-left|scroll-padding-right|scroll-padding-top|scroll-snap-align|scroll-snap-coordinate|scroll-snap-destination|scroll-snap-stop|scroll-snap-type|scrollbar-color|scrollbar-gutter|scrollbar-width|shape-image-threshold|shape-margin|shape-outside|shape-rendering|size|speak-as|src|stop-color|stop-opacity|stroke|stroke-dasharray|stroke-dashoffset|stroke-linecap|stroke-linejoin|stroke-miterlimit|stroke-opacity|stroke-width|suffix|symbols|system|tab-size|table-layout|text-align|text-align-last|text-anchor|text-combine-upright|text-decoration|text-decoration-color|text-decoration-line|text-decoration-skip|text-decoration-skip-ink|text-decoration-style|text-decoration-thickness|text-emphasis|text-emphasis-color|text-emphasis-position|text-emphasis-style|text-indent|text-justify|text-orientation|text-overflow|text-rendering|text-shadow|text-size-adjust|text-transform|text-underline-offset|text-underline-position|top|touch-action|transform|transform-box|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|translate|unicode-bidi|unicode-range|user-select|user-zoom|vertical-align|visibility|white-space|widows|width|will-change|word-break|word-spacing|word-wrap|writing-mode|z-index|zoom|alignment-baseline|baseline-shift|clip-rule|color-interpolation|color-interpolation-filters|color-profile|color-rendering|cx|cy|dominant-baseline|enable-background|fill|fill-opacity|fill-rule|flood-color|flood-opacity|glyph-orientation-horizontal|glyph-orientation-vertical|height|kerning|lighting-color|marker-end|marker-mid|marker-start|rx??|ry|shape-rendering|stop-color|stop-opacity|stroke|stroke-dasharray|stroke-dashoffset|stroke-linecap|stroke-linejoin|stroke-miterlimit|stroke-opacity|stroke-width|text-anchor|width|[xy]|adjust|after|align|align-last|alignment|alignment-adjust|appearance|attachment|azimuth|background-break|balance|baseline|before|bidi|binding|bookmark|bookmark-label|bookmark-level|bookmark-target|border-length|bottom-color|bottom-left-radius|bottom-right-radius|bottom-style|bottom-width|box|box-align|box-direction|box-flex|box-flex-group|box-lines|box-ordinal-group|box-orient|box-pack|break|character|collapse|column|column-break-after|column-break-before|count|counter|crop|cue|cue-after|cue-before|decoration|decoration-break|delay|display-model|display-role|down|drop|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|duration|elevation|emphasis|family|fit|fit-position|flex-group|float-offset|gap|grid-columns|grid-rows|hanging-punctuation|header|hyphenate|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|icon|image|increment|indent|index|initial-after-adjust|initial-after-align|initial-before-adjust|initial-before-align|initial-size|initial-value|inline-box-align|iteration-count|justify|label|left-color|left-style|left-width|length|level|line|line-stacking|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|lines|list|mark|mark-after|mark-before|marks|marquee|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max|min|model|move-to|name|nav|nav-down|nav-index|nav-left|nav-right|nav-up|new|numeral|offset|ordinal-group|orient|origin|overflow-style|overhang|pack|page|page-policy|pause|pause-after|pause-before|phonemes|pitch|pitch-range|play-count|play-during|play-state|point|presentation|presentation-level|profile|property|punctuation|punctuation-trim|radius|rate|rendering-intent|repeat|replace|reset|resolution|resource|respond-to|rest|rest-after|rest-before|richness|right-color|right-style|right-width|role|rotation|rotation-point|rows|ruby|ruby-overhang|ruby-span|rule|rule-color|rule-style|rule-width|shadow|size|size-adjust|sizing|space|space-collapse|spacing|span|speak|speak-header|speak-numeral|speak-punctuation|speech|speech-rate|speed|stacking|stacking-ruby|stacking-shift|stacking-strategy|stress|stretch|string-set|style|style-image|style-position|style-type|target|target-name|target-new|target-position|text|text-height|text-justify|text-outline|text-replace|text-wrap|timing-function|top-color|top-left-radius|top-right-radius|top-style|top-width|trim|unicode|up|user-select|variant|voice|voice-balance|voice-duration|voice-family|voice-pitch|voice-pitch-range|voice-rate|voice-stress|voice-volume|volume|weight|white|white-space-collapse|word|wrap)(?![-\\\\w])","name":"meta.property-name.css support.type.property-name.css"},{"match":"(?<![-\\\\w])(?i:-(?:ah|apple|atsc|epub|hp|khtml|moz|ms|o|rim|ro|tc|wap|webkit|xv)|(?:mso|prince))-[-A-Za-z]+","name":"meta.property-name.css support.type.vendored.property-name.css"}]},"property-values":{"patterns":[{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.group.begin.bracket.curly.css"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.group.end.bracket.curly.css"}},"patterns":[{"include":"#property-values"}]},{"include":"#commas"},{"include":"#comment-block"},{"include":"#escapes"},{"include":"#functions"},{"include":"#property-keywords"},{"include":"#unicode-range"},{"include":"#numeric-values"},{"include":"#color-keywords"},{"include":"#string"},{"match":"!\\\\s*important(?![-\\\\w])","name":"keyword.other.important.css"}]},"pseudo-classes":{"captures":{"1":{"name":"punctuation.definition.entity.css"},"2":{"name":"invalid.illegal.colon.css"}},"match":"(?i)(:)(:*)(?:active|any-link|checked|default|disabled|empty|enabled|first|(?:first|last|only)-(?:child|of-type)|focus|focus-visible|focus-within|fullscreen|host|hover|in-range|indeterminate|invalid|left|link|optional|out-of-range|read-only|read-write|required|right|root|scope|target|unresolved|valid|visited)(?![-\\\\w]|\\\\s*[;}])","name":"entity.other.attribute-name.pseudo-class.css"},"pseudo-elements":{"captures":{"1":{"name":"punctuation.definition.entity.css"},"2":{"name":"punctuation.definition.entity.css"}},"match":"(?i)(?:(::?)(?:after|before|first-letter|first-line|(?:-(?:ah|apple|atsc|epub|hp|khtml|moz|ms|o|rim|ro|tc|wap|webkit|xv)|(?:mso|prince))-[-a-z]+)|(::)(?:backdrop|content|grammar-error|marker|placeholder|selection|shadow|spelling-error))(?![-\\\\w]|\\\\s*[;}])","name":"entity.other.attribute-name.pseudo-element.css"},"rule-list":{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.property-list.begin.bracket.curly.css"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.property-list.end.bracket.curly.css"}},"name":"meta.property-list.css","patterns":[{"include":"#rule-list-innards"},{"include":"$self"}]},"rule-list-innards":{"patterns":[{"include":"#comment-block"},{"include":"#escapes"},{"include":"#font-features"},{"match":"(?<![-\\\\w])--[-A-Z_a-z[^\\\\x00-\\\\x7F]](?:[-0-9A-Z_a-z[^\\\\x00-\\\\x7F]]|\\\\\\\\(?:\\\\h{1,6}|.))*","name":"variable.css"},{"include":"#shared-names"},{"include":"#property-names"},{"include":"#selector"},{"begin":"(?<![-A-Za-z])(?=[-A-Za-z])","end":"$|(?![-A-Za-z])","name":"meta.property-name.css"},{"begin":"(:)\\\\s*","beginCaptures":{"1":{"name":"punctuation.separator.key-value.css"}},"contentName":"meta.property-value.css","end":"\\\\s*(;)|\\\\s*(?=[)}])","endCaptures":{"1":{"name":"punctuation.terminator.rule.css"}},"patterns":[{"include":"#comment-block"},{"include":"#property-values"}]},{"match":";","name":"punctuation.terminator.rule.css"}]},"selector":{"begin":"(?i)(?<=^|(^|[^:])\\\\s|[;{}]|\\\\*/|\\\\\\\\(?:\\\\h{1,6}|.))(?=[\\\\&*+>A-\\\\[a-z|~[^\\\\x00-\\\\x7F]]|\\\\\\\\(?:\\\\h{1,6}|.)|[#.](?:[-\\\\w]|\\\\\\\\(?:\\\\h{1,6}|.))|::??[-A-Za-z])(?![-\\\\w]*:+\\\\s|[^{]*;|[^{]*}|[^:]+(::):+)","end":"(?=\\\\s*(?:[)/@{]|$))","name":"meta.selector.css","patterns":[{"include":"#selector-innards"}]},"selector-innards":{"patterns":[{"include":"#comment-block"},{"include":"#commas"},{"include":"#escapes"},{"include":"#combinators"},{"captures":{"1":{"name":"entity.other.namespace-prefix.css"},"2":{"name":"punctuation.separator.css"}},"match":"(?:^|(?<=[(,;}\\\\s]))(?![-*\\\\w]+\\\\|(?![-#\\\\&*.:A-\\\\[_a-z[^\\\\x00-\\\\x7F]]))([-A-Z_a-z[^\\\\x00-\\\\x7F]](?:[-0-9A-Z_a-z[^\\\\x00-\\\\x7F]]|\\\\\\\\(?:\\\\h{1,6}|.))*|\\\\*)?(\\\\|)"},{"include":"#tag-names"},{"match":"&","name":"entity.name.tag.nesting.css"},{"match":"\\\\*","name":"entity.name.tag.wildcard.css"},{"captures":{"1":{"name":"punctuation.definition.entity.css"},"2":{"patterns":[{"include":"#escapes"}]}},"match":"(?<![-@\\\\w])([#.])((?:-?[0-9]|-(?=$|[#\\\\&)+,.:>\\\\[{|~\\\\s]|/\\\\*)|(?:[-0-9A-Z_a-z[^\\\\x00-\\\\x7F]]|\\\\\\\\(?:\\\\h{1,6}|.))*(?:[]!\\"%'(*;<?@^\`|}]|/(?!\\\\*)|&(?=[-0-9A-Z_a-z[^\\\\x00-\\\\x7F]]))+)(?:[-0-9A-Z_a-z[^\\\\x00-\\\\x7F]]|\\\\\\\\(?:\\\\h{1,6}|.))*)","name":"invalid.illegal.bad-identifier.css"},{"captures":{"1":{"name":"punctuation.definition.entity.css"},"2":{"patterns":[{"include":"#escapes"}]}},"match":"(\\\\.)((?:[-0-9A-Z_a-z[^\\\\x00-\\\\x7F]]|\\\\\\\\(?:\\\\h{1,6}|.))+)(?=$|[#\\\\&)+,.:>\\\\[{|~\\\\s]|/\\\\*)","name":"entity.other.attribute-name.class.css"},{"captures":{"1":{"name":"punctuation.definition.entity.css"},"2":{"patterns":[{"include":"#escapes"}]}},"match":"(#)(-?(?![0-9])(?:[-0-9A-Z_a-z[^\\\\x00-\\\\x7F]]|\\\\\\\\(?:\\\\h{1,6}|.))+)(?=$|[#\\\\&)+,.:>\\\\[{|~\\\\s]|/\\\\*)","name":"entity.other.attribute-name.id.css"},{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.entity.begin.bracket.square.css"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.entity.end.bracket.square.css"}},"name":"meta.attribute-selector.css","patterns":[{"include":"#comment-block"},{"include":"#string"},{"captures":{"1":{"name":"storage.modifier.ignore-case.css"}},"match":"(?<=[\\"'\\\\s]|^|\\\\*/)\\\\s*([Ii])\\\\s*(?=[]\\\\s]|/\\\\*|$)"},{"captures":{"1":{"name":"string.unquoted.attribute-value.css","patterns":[{"include":"#escapes"}]}},"match":"(?<==)\\\\s*((?!/\\\\*)(?:[^]\\"'\\\\\\\\\\\\s]|\\\\\\\\.)+)"},{"include":"#escapes"},{"match":"[$*^|~]?=","name":"keyword.operator.pattern.css"},{"match":"\\\\|","name":"punctuation.separator.css"},{"captures":{"1":{"name":"entity.other.namespace-prefix.css","patterns":[{"include":"#escapes"}]}},"match":"(-?(?!\\\\d)(?:[-\\\\w[^\\\\x00-\\\\x7F]]|\\\\\\\\(?:\\\\h{1,6}|.))+|\\\\*)(?=\\\\|(?![=\\\\s]|$|])(?:-?(?!\\\\d)|[-\\\\\\\\\\\\w[^\\\\x00-\\\\x7F]]))"},{"captures":{"1":{"name":"entity.other.attribute-name.css","patterns":[{"include":"#escapes"}]}},"match":"(-?(?!\\\\d)(?>[-\\\\w[^\\\\x00-\\\\x7F]]|\\\\\\\\(?:\\\\h{1,6}|.))+)\\\\s*(?=[]$*=^|~]|/\\\\*)"}]},{"include":"#pseudo-classes"},{"include":"#pseudo-elements"},{"include":"#functional-pseudo-classes"},{"match":"(?<![-@\\\\w])(?=[a-z]\\\\w*-)(?:(?![A-Z])[-\\\\w])+(?![-(\\\\w])","name":"entity.name.tag.custom.css"}]},"shared-names":{"patterns":[{"begin":"(?i)(?<=^|(^|[^:])\\\\s|[{}]|\\\\*/|\\\\\\\\(?:\\\\h{1,6}|.))(?=(?:header|image|label|marquee|mask|nav|ruby|shadow|span|style|color-profile|line|text)(?!.*;|[^{]*}|-|:\\\\s+))","end":"(?i)(?=\\\\s|/\\\\*|[,{]|$)","patterns":[{"include":"#selector"}]},{"begin":"(?i)(?<=^|(^|[^:])\\\\s|[{}]|\\\\*/|\\\\\\\\(?:\\\\h{1,6}|.))(?=(?:content|font|mark|cursor|filter)(?!.*;|[^{]*}|-|:(?![^}]*\\\\{|active|any-link|checked|disabled|empty|enabled|first|(?:first|last|only)-(?:child|of-type)|focus|focus-visible|focus-within|fullscreen|host|hover|in-range|indeterminate|invalid|link|out-of-range|read-only|read-write|required|root|scope|target|unresolved|valid|visited|(?:dir|lang|not|has|matches|where|is|nth-(?:last-)?(?:child|of-type))\\\\(|after|before|first-letter|first-line|(?:-(?:ah|apple|atsc|epub|hp|khtml|moz|ms|o|rim|ro|tc|wap|webkit|xv)|(?:mso|prince))-[-a-z]+)))","end":"(?i)(?=\\\\s|/\\\\*|[,{]|$)","patterns":[{"include":"#selector"}]}]},"string":{"patterns":[{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.css"}},"end":"\\"|(?<!\\\\\\\\)(?=$|\\\\n)","endCaptures":{"0":{"name":"punctuation.definition.string.end.css"}},"name":"string.quoted.double.css","patterns":[{"begin":"(?:\\\\G|^)(?=(?:[^\\"\\\\\\\\]|\\\\\\\\.)+$)","end":"$","name":"invalid.illegal.unclosed.string.css","patterns":[{"include":"#escapes"}]},{"include":"#escapes"}]},{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.css"}},"end":"'|(?<!\\\\\\\\)(?=$|\\\\n)","endCaptures":{"0":{"name":"punctuation.definition.string.end.css"}},"name":"string.quoted.single.css","patterns":[{"begin":"(?:\\\\G|^)(?=(?:[^'\\\\\\\\]|\\\\\\\\.)+$)","end":"$","name":"invalid.illegal.unclosed.string.css","patterns":[{"include":"#escapes"}]},{"include":"#escapes"}]}]},"tag-names":{"match":"(?i)(?<![-:\\\\w])(?:a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdi|bdo|bgsound|big|blink|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|command|content|data|datalist|dd|del|details|dfn|dialog|dir|div|dl|dt|element|em|embed|fieldset|figcaption|figure|font|footer|form|frame|frameset|h[1-6]|head|header|hgroup|hr|html|i|iframe|image|img|input|ins|isindex|kbd|keygen|label|legend|li|link|listing|main|map|mark|marquee|math|menu|menuitem|meta|meter|multicol|nav|nextid|nobr|noembed|noframes|noscript|object|ol|optgroup|option|output|p|param|picture|plaintext|pre|progress|q|rb|rp|rtc??|ruby|s|samp|script|section|select|shadow|slot|small|source|spacer|span|strike|strong|style|sub|summary|sup|table|tbody|td|template|textarea|tfoot|th|thead|time|title|tr|track|tt|ul??|var|video|wbr|xmp|altGlyph|altGlyphDef|altGlyphItem|animate|animateColor|animateMotion|animateTransform|circle|clipPath|color-profile|cursor|defs|desc|discard|ellipse|feBlend|feColorMatrix|feComponentTransfer|feComposite|feConvolveMatrix|feDiffuseLighting|feDisplacementMap|feDistantLight|feDropShadow|feFlood|feFuncA|feFuncB|feFuncG|feFuncR|feGaussianBlur|feImage|feMerge|feMergeNode|feMorphology|feOffset|fePointLight|feSpecularLighting|feSpotLight|feTile|feTurbulence|filter|font-face|font-face-format|font-face-name|font-face-src|font-face-uri|foreignObject|g|glyph|glyphRef|hatch|hatchpath|hkern|line|linearGradient|marker|mask|mesh|meshgradient|meshpatch|meshrow|metadata|missing-glyph|mpath|path|pattern|polygon|polyline|radialGradient|rect|set|solidcolor|stop|svg|switch|symbol|text|textPath|tref|tspan|use|view|vkern|annotation|annotation-xml|maction|maligngroup|malignmark|math|menclose|merror|mfenced|mfrac|mglyph|mi|mlabeledtr|mlongdiv|mmultiscripts|mn|mo|mover|mpadded|mphantom|mroot|mrow|ms|mscarries|mscarry|msgroup|msline|mspace|msqrt|msrow|mstack|mstyle|msub|msubsup|msup|mtable|mtd|mtext|mtr|munder|munderover|semantics)(?=[#\\\\&)+,.:>\\\\[{|~\\\\s]|/\\\\*|$)","name":"entity.name.tag.css"},"unicode-range":{"captures":{"0":{"name":"constant.other.unicode-range.css"},"1":{"name":"punctuation.separator.dash.unicode-range.css"}},"match":"(?<![-\\\\w])[Uu]\\\\+[?\\\\h]{1,6}(?:(-)\\\\h{1,6})?(?![-\\\\w])"},"url":{"begin":"(?i)(?<![-@\\\\w])(url)(\\\\()","beginCaptures":{"1":{"name":"support.function.url.css"},"2":{"name":"punctuation.section.function.begin.bracket.round.css"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.function.end.bracket.round.css"}},"name":"meta.function.url.css","patterns":[{"match":"[^\\"')\\\\s]+","name":"variable.parameter.url.css"},{"include":"#string"},{"include":"#comment-block"},{"include":"#escapes"}]}},"scopeName":"source.css"}`)),t=[e];export{t as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const n=Object.freeze(JSON.parse('{"displayName":"Diff","name":"diff","patterns":[{"captures":{"1":{"name":"punctuation.definition.separator.diff"}},"match":"^((\\\\*{15})|(={67})|(-{3}))$\\\\n?","name":"meta.separator.diff"},{"match":"^\\\\d+(,\\\\d+)*([acd])\\\\d+(,\\\\d+)*$\\\\n?","name":"meta.diff.range.normal"},{"captures":{"1":{"name":"punctuation.definition.range.diff"},"2":{"name":"meta.toc-list.line-number.diff"},"3":{"name":"punctuation.definition.range.diff"}},"match":"^(@@)\\\\s*(.+?)\\\\s*(@@)($\\\\n?)?","name":"meta.diff.range.unified"},{"captures":{"3":{"name":"punctuation.definition.range.diff"},"4":{"name":"punctuation.definition.range.diff"},"6":{"name":"punctuation.definition.range.diff"},"7":{"name":"punctuation.definition.range.diff"}},"match":"^(((-{3}) .+ (-{4}))|((\\\\*{3}) .+ (\\\\*{4})))$\\\\n?","name":"meta.diff.range.context"},{"match":"^diff --git a/.*$\\\\n?","name":"meta.diff.header.git"},{"match":"^diff (-|\\\\S+\\\\s+\\\\S+).*$\\\\n?","name":"meta.diff.header.command"},{"captures":{"4":{"name":"punctuation.definition.from-file.diff"},"6":{"name":"punctuation.definition.from-file.diff"},"7":{"name":"punctuation.definition.from-file.diff"}},"match":"^((((-{3}) .+)|((\\\\*{3}) .+))$\\\\n?|(={4}) .+(?= - ))","name":"meta.diff.header.from-file"},{"captures":{"2":{"name":"punctuation.definition.to-file.diff"},"3":{"name":"punctuation.definition.to-file.diff"},"4":{"name":"punctuation.definition.to-file.diff"}},"match":"(^(\\\\+{3}) .+$\\\\n?| (-) .* (={4})$\\\\n?)","name":"meta.diff.header.to-file"},{"captures":{"3":{"name":"punctuation.definition.inserted.diff"},"6":{"name":"punctuation.definition.inserted.diff"}},"match":"^(((>)( .*)?)|((\\\\+).*))$\\\\n?","name":"markup.inserted.diff"},{"captures":{"1":{"name":"punctuation.definition.changed.diff"}},"match":"^(!).*$\\\\n?","name":"markup.changed.diff"},{"captures":{"3":{"name":"punctuation.definition.deleted.diff"},"6":{"name":"punctuation.definition.deleted.diff"}},"match":"^(((<)( .*)?)|((-).*))$\\\\n?","name":"markup.deleted.diff"},{"begin":"^(#)","captures":{"1":{"name":"punctuation.definition.comment.diff"}},"end":"\\\\n","name":"comment.line.number-sign.diff"},{"match":"^index [0-9a-f]{7,40}\\\\.\\\\.[0-9a-f]{7,40}.*$\\\\n?","name":"meta.diff.index.git"},{"captures":{"1":{"name":"punctuation.separator.key-value.diff"},"2":{"name":"meta.toc-list.file-name.diff"}},"match":"^Index(:) (.+)$\\\\n?","name":"meta.diff.index"},{"match":"^Only in .*: .*$\\\\n?","name":"meta.diff.only-in"}],"scopeName":"source.diff"}')),e=[n];export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{w as r}from"./window-kind-35FHmfEB.js";import{c as o}from"./react-wKFncLeZ.js";import"./index-LwIi-F1W.js";const d=o(n=>({viewGeneration:0,documentContent:"",isDirty:!1,filePath:null,runtimeId:r,fileName:null,draftInputs:{},setDocumentContent:(t,e)=>n(e?{documentContent:t,isDirty:!0,documentRevision:e.revision,documentWriter:e.writer??null}:{documentContent:t,isDirty:!0}),setFilePath:(t,e)=>n(i=>({viewGeneration:i.viewGeneration+1,filePath:t,...e?{runtimeId:e}:{},fileName:t?t.split("/").pop()?.replace(".adf","")??null:null})),setDirty:t=>n({isDirty:t}),setDraftInput:(t,e)=>n(i=>({draftInputs:{...i.draftInputs,[t]:e}})),removeDraftInput:t=>n(e=>{if(!(t in e.draftInputs))return e;const i={...e.draftInputs};return delete i[t],{draftInputs:i}}),reset:()=>n(t=>({viewGeneration:t.viewGeneration+1,documentContent:"",documentRevision:void 0,documentWriter:void 0,isDirty:!1,filePath:null,runtimeId:r,fileName:null,draftInputs:{}}))}));export{d as useDocumentStore};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{c as k}from"./react-wKFncLeZ.js";import{u as S}from"./agent.store-CGzsE0VA.js";import{useDocumentStore as y}from"./document.store-BcN3UW-e.js";function x(r){const f=r.lastIndexOf(".");return f>=0?r.slice(f+1).toLowerCase():""}let M=0,$=0;const m=k((r,f)=>({tabs:[],activeTabPath:null,lastExternalWrite:null,conflictFocusSeq:0,openTab:(o,n,e,i,t)=>{const{tabs:a}=f(),c=a.find(d=>d.path===o);if(c){const d=c.content!==n||c.isBinary!==e||e&&c.mimeType!==i;if(!c.isDirty&&d){r({tabs:a.map(l=>l.path===o?{...l,content:n,savedContent:n,isBinary:e,mimeType:i,revision:t}:l),activeTabPath:o});return}r({activeTabPath:o});return}const u={path:o,content:n,savedContent:n,isDirty:!1,isBinary:e,mimeType:i,extension:x(o),kind:"file",...t!==void 0?{revision:t}:{}};r({tabs:[...a,u],activeTabPath:o})},openBrowserTab:(o,n)=>{const e=n?.activate??!0,i=`browser://${o.agentFilePath}`,{tabs:t,activeTabPath:a}=f();if(t.find(d=>d.path===i)){r({tabs:t.map(d=>d.path===i?{...d,browserMeta:o}:d),activeTabPath:e?i:a});return}const u={path:i,content:"",savedContent:"",isDirty:!1,isBinary:!1,extension:"",kind:"browser",browserMeta:o};r({tabs:[...t,u],activeTabPath:e?i:a})},reloadBrowserTab:o=>{r(n=>({tabs:n.tabs.map(e=>e.path===o&&e.kind==="browser"&&e.browserMeta?{...e,browserMeta:{...e.browserMeta,reloadNonce:(e.browserMeta.reloadNonce??0)+1}}:e)}))},closeTab:o=>{const{tabs:n,activeTabPath:e}=f(),i=n.findIndex(c=>c.path===o);if(i===-1)return;const t=n.filter(c=>c.path!==o);let a=e;e===o&&(t.length===0?a=null:i<t.length?a=t[i].path:a=t[t.length-1].path),r({tabs:t,activeTabPath:a})},setActiveTab:o=>{r({activeTabPath:o})},updateTabContent:(o,n)=>{r(e=>({tabs:e.tabs.map(i=>i.path===o?{...i,content:n,isDirty:n!==i.savedContent,...i.replaced&&n!==i.content?{replaced:void 0}:{}}:i)}))},markTabSaved:(o,n)=>{r(e=>({tabs:e.tabs.map(i=>i.path===o?n===void 0?{...i,savedContent:i.content,isDirty:!1}:{...i,savedContent:n,isDirty:i.content!==n}:i)}))},updateTabFromExternal:(o,n,e)=>{r(i=>({tabs:i.tabs.map(t=>{if(t.path!==o)return t;if(t.isDirty&&t.content!==n)return t.conflict&&t.conflict.content===n&&e===void 0?t:{...t,conflict:{content:n,revision:e?.revision,writer:e?.writer??null}};const a=t.content!==n&&t.kind==="file"&&!t.isBinary?{previous:t.content,writer:e?.writer??null,seq:++$}:t.replaced;return{...t,content:n,savedContent:n,isDirty:!1,revision:e?e.revision:t.revision,conflict:void 0,replaced:a}}),lastExternalWrite:{path:o,seq:++M}}))},setTabRevision:(o,n)=>{r(e=>({tabs:e.tabs.map(i=>i.path===o?{...i,revision:n}:i)}))},setTabConflict:(o,n,e)=>{r(i=>({tabs:i.tabs.map(t=>{if(t.path!==o)return t;const a=!t.isDirty&&(t.content===e||t.content===n.content);return{...t,content:a?e??t.content:t.content,conflict:n,isDirty:!0,savedContent:n.content??t.savedContent,replaced:void 0}})}))},resolveTabConflict:(o,n,e)=>{r(i=>({tabs:i.tabs.map(t=>{if(t.path!==o||!t.conflict)return t;if(n==="reload"){const a=e?.content??t.conflict.content??t.savedContent;return{...t,content:a,savedContent:a,isDirty:!1,revision:e?e.revision:t.conflict.revision,conflict:void 0,replaced:void 0}}return{...t,isDirty:!0,revision:t.conflict.revision,conflict:void 0}})}))},focusConflictNotice:()=>{r(o=>({conflictFocusSeq:o.conflictFocusSeq+1}))},undoExternalReplace:o=>{const n=f().tabs.find(i=>i.path===o);if(!n?.replaced||n.conflict)return null;const e=n.replaced.previous;return r(i=>({tabs:i.tabs.map(t=>t.path===o?{...t,content:e,isDirty:e!==t.savedContent,replaced:void 0}:t)})),e},dismissExternalReplace:o=>{r(n=>({tabs:n.tabs.map(e=>e.path===o&&e.replaced?{...e,replaced:void 0}:e)}))},reset:()=>{r({tabs:[],activeTabPath:null,lastExternalWrite:null})}}));let h=0;const T=new Set;function _(r){return T.add(r),()=>{T.delete(r)}}function j(){if(h===0)for(const r of T)try{r()}catch{}h++}function W(){h>0&&h--}function B(){return h>0}const g="config.json";function C(){const r=y.getState().runtimeId;return r&&r!=="local"?{runtimeId:r}:{}}const E=(r,f,o)=>`${r??""}\0${f}\0${o}`;let A=0;const P=new Set;function R(r=typeof window<"u"?window.adfApi:void 0,f=500){if(!r?.recoveryStash)return()=>{};const o=l=>{r.recoveryStash(l).catch(p=>console.error("[Recovery] Could not keep a copy of unsaved text:",p))},n=new Map,e=new Map,i=new Map,t=()=>{const l=new Map,p=y.getState().filePath,D=new Set;for(const s of m.getState().tabs){if(!s.conflict)continue;D.add(s.path),!i.has(s.path)&&p&&i.set(s.path,p);const b=i.get(s.path);if(b){const v=C();l.set(E(v.runtimeId,b,s.path),{agentFilePath:b,path:s.path,content:s.content,...v})}}for(const s of[...i.keys()])D.has(s)||i.delete(s);const w=S.getState().configConflict;if(w?.owner){const s=C();l.set(E(s.runtimeId,w.owner,g),{agentFilePath:w.owner,path:g,content:`${JSON.stringify(w.mine,null,2)}
|
|
2
|
+
`,...s})}for(const[s,b]of l){const v=n.get(s);v?.content!==b.content&&(clearTimeout(e.get(s)),e.delete(s),v?e.set(s,setTimeout(()=>{e.delete(s),n.set(s,b),o(b)},f)):(n.set(s,b),o(b)))}for(const[s,b]of[...n])l.has(s)||(clearTimeout(e.get(s)),e.delete(s),n.delete(s),o({...b,content:null}))},a=()=>{for(const[l,p]of[...e])clearTimeout(p),e.delete(l);n.clear(),t()},c=typeof window<"u"?window:null;c?.addEventListener("beforeunload",a);const u=m.subscribe(t),d=S.subscribe((l,p)=>{l.configConflict!==p.configConflict&&t()});return t(),()=>{u(),d(),c?.removeEventListener("beforeunload",a);for(const l of e.values())clearTimeout(l)}}async function F(r=typeof window<"u"?window.adfApi:void 0){const f=y.getState().filePath;if(!r?.recoveryStash||!f)return 0;const o=C(),n=new Map;for(const c of m.getState().tabs)c.kind==="file"&&!c.isBinary&&c.isDirty&&n.set(c.path,c.content);const e=y.getState();e.isDirty&&!n.has("README.md")&&n.set("README.md",e.documentContent);const i=S.getState().configConflict;if(i?.owner===f&&n.set(g,`${JSON.stringify(i.mine,null,2)}
|
|
3
|
+
`),n.size===0)return 0;const t=`${new Date().toISOString().replace(/[:.]/g,"-")}-${++A}`;let a=0;for(const[c,u]of n)try{await r.recoveryStash({agentFilePath:f,path:c,content:u,...o,kept:t}),a++}catch(d){console.error(`[Recovery] Could not keep a copy of unsaved ${c}:`,d)}if(a>0)for(const c of[...P])try{c()}catch(u){console.error("[Recovery] A listener of kept copies failed:",u)}return a}function O(r,f){if(!r?.recoveryList)return()=>{};let o=!0,n=new Set,e=Promise.resolve();const i=a=>{e=e.then(()=>r.recoveryList()).then(c=>{if(!o)return;const u=c?.files??[];a||(n=new Set(u.map(l=>l.file)));const d=u.filter(l=>l.kept||n.has(l.file));(a||d.length>0)&&f(d,a)}).catch(()=>{})};i(!1);const t=()=>i(!0);return P.add(t),()=>{o=!1,P.delete(t)}}function I(r,f={}){const o=r.map(e=>`${e.agent}/${e.path}`),n=o.length>3?`${o.slice(0,3).join(", ")} and ${o.length-3} more`:o.join(", ");return f.session?`Studio kept your unsaved version of ${n}.`:`Studio kept your unsaved version of ${n} from the last session, which ended before it was saved.`}const z=Object.freeze(Object.defineProperty({__proto__:null,CONFIG_RECOVERY_PATH:g,recoveredEditsMessage:I,startEditRecovery:R,stashUnsavedEditors:F,watchRecoveredEdits:O},Symbol.toStringTag,{value:"Module"}));export{I as a,j as b,R as c,z as d,W as e,B as i,_ as r,F as s,m as u,O as w};
|