@epic-web/workshop-app 6.88.1 → 6.89.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/client/assets/{_exerciseNumber-BkoIHU4s.js → _exerciseNumber-BZvzAp9f.js} +2 -2
- package/build/client/assets/{_exerciseNumber-BkoIHU4s.js.map → _exerciseNumber-BZvzAp9f.js.map} +1 -1
- package/build/client/assets/{_exerciseNumber_.finished-BRspQYAo.js → _exerciseNumber_.finished-D5eMZ_ok.js} +2 -2
- package/build/client/assets/{_exerciseNumber_.finished-BRspQYAo.js.map → _exerciseNumber_.finished-D5eMZ_ok.js.map} +1 -1
- package/build/client/assets/{_extra-qH2jDBa4.js → _extra-Bd0-gThk.js} +2 -2
- package/build/client/assets/{_extra-qH2jDBa4.js.map → _extra-Bd0-gThk.js.map} +1 -1
- package/build/client/assets/{_layout-Bg1RFS9D.js → _layout-CbP-ZGKA.js} +2 -2
- package/build/client/assets/{_layout-Bg1RFS9D.js.map → _layout-CbP-ZGKA.js.map} +1 -1
- package/build/client/assets/{app-BH96aYJx.js → app-BTlBQWy_.js} +2 -2
- package/build/client/assets/{app-BH96aYJx.js.map → app-BTlBQWy_.js.map} +1 -1
- package/build/client/assets/{cache-5tXauWqp.js → cache-Cjjb4Th1.js} +2 -2
- package/build/client/assets/{cache-5tXauWqp.js.map → cache-Cjjb4Th1.js.map} +1 -1
- package/build/client/assets/{db-CPB2ZdAy.js → db-n83JPsm9.js} +2 -2
- package/build/client/assets/{db-CPB2ZdAy.js.map → db-n83JPsm9.js.map} +1 -1
- package/build/client/assets/{diff-BncP0Faq.js → diff-C4LoXlDb.js} +3 -3
- package/build/client/assets/diff-C4LoXlDb.js.map +1 -0
- package/build/client/assets/{diff-IVQnB3Pk.js → diff-Fut2J8f5.js} +2 -2
- package/build/client/assets/{diff-IVQnB3Pk.js.map → diff-Fut2J8f5.js.map} +1 -1
- package/build/client/assets/{finished-CYdLPdvJ.js → finished-CsRM8483.js} +2 -2
- package/build/client/assets/{finished-CYdLPdvJ.js.map → finished-CsRM8483.js.map} +1 -1
- package/build/client/assets/{index-n4CWCwSA.js → index-BnHkUMN_.js} +2 -2
- package/build/client/assets/{index-n4CWCwSA.js.map → index-BnHkUMN_.js.map} +1 -1
- package/build/client/assets/{index-CKhNevM7.js → index-Bo0DKzj5.js} +2 -2
- package/build/client/assets/{index-CKhNevM7.js.map → index-Bo0DKzj5.js.map} +1 -1
- package/build/client/assets/{index-Cb8U85TK.js → index-m9K7ACZe.js} +2 -2
- package/build/client/assets/{index-Cb8U85TK.js.map → index-m9K7ACZe.js.map} +1 -1
- package/build/client/assets/launch-editor-C-8ah8qM.js +2 -0
- package/build/client/assets/launch-editor-C-8ah8qM.js.map +1 -0
- package/build/client/assets/{manifest-d6d8ad00.js → manifest-72875289.js} +1 -1
- package/build/client/assets/{mdx-Bvb9XNyL.js → mdx-C3Jl4O5D.js} +2 -2
- package/build/client/assets/{mdx-Bvb9XNyL.js.map → mdx-C3Jl4O5D.js.map} +1 -1
- package/build/client/assets/{playground-CEUo0DCy.js → playground-BV2y1ifv.js} +2 -2
- package/build/client/assets/{playground-CEUo0DCy.js.map → playground-BV2y1ifv.js.map} +1 -1
- package/build/client/assets/{preview-BS9wGiJ3.js → preview-Dav9KrHN.js} +2 -2
- package/build/client/assets/{preview-BS9wGiJ3.js.map → preview-Dav9KrHN.js.map} +1 -1
- package/build/server/index.js +36 -4
- package/build/server/index.js.map +1 -1
- package/package.json +3 -3
- package/build/client/assets/diff-BncP0Faq.js.map +0 -1
- package/build/client/assets/launch-editor-C8OwTN5L.js +0 -2
- package/build/client/assets/launch-editor-C8OwTN5L.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-CU67Zn6k.js","assets/html-GMplVEZG.js","assets/javascript-wDzz0qaB.js","assets/css-DPfMkruS.js","assets/angular-ts-BwZT4LLn.js","assets/scss-OYdSNvt2.js","assets/apl-dKokRX4l.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/json-Cp-IABpG.js","assets/astro-CbQHKStN.js","assets/typescript-BPQ3VLAy.js","assets/postcss-CXtECtnM.js","assets/tsx-COt5Ahok.js","assets/blade-D4QpJJKB.js","assets/html-derivative-BFtXZ54Q.js","assets/sql-BLtJtn59.js","assets/bsl-BO_Y6i37.js","assets/sdbl-DVxCFoDh.js","assets/cairo-KRGpt6FW.js","assets/python-B6aJPvgy.js","assets/cobol-nwyudZeR.js","assets/coffee-Ch7k5sss.js","assets/cpp-CofmeUqb.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/c-BIGW1oBm.js","assets/crystal-tKQVLTB8.js","assets/shellscript-Yzrsuije.js","assets/edge-BkV0erSs.js","assets/elixir-CDX3lj18.js","assets/elm-DbKCFpqz.js","assets/erb-CgJxNhIT.js","assets/ruby-Cw6WdidG.js","assets/haml-B8DHNrY2.js","assets/graphql-ChdNCCLP.js","assets/jsx-g9-lgVsj.js","assets/lua-BaeVxFsk.js","assets/yaml-Buea-lGh.js","assets/erlang-DsQrWhSR.js","assets/markdown-Cvjx9yec.js","assets/fortran-fixed-form-CkoXwp7k.js","assets/fortran-free-form-BxgE0vQu.js","assets/fsharp-CXgrBDvD.js","assets/gdresource-BOOCDP_w.js","assets/gdshader-DkwncUOv.js","assets/gdscript-C5YyOfLZ.js","assets/git-commit-F4YmCXRG.js","assets/diff-D97Zzqfu.js","assets/git-rebase-r7XF79zn.js","assets/glimmer-js-Rg0-pVw9.js","assets/glimmer-ts-U6CK756n.js","assets/hack-CaT9iCJl.js","assets/handlebars-BL8al0AC.js","assets/http-jrhK8wxY.js","assets/hurl-irOxFIW8.js","assets/csv-fuZLfV_i.js","assets/hxml-Bvhsp5Yf.js","assets/haxe-CzTSHFRz.js","assets/jinja-4LBKfQ-Z.js","assets/jison-wvAkD_A8.js","assets/julia-CxzCAyBv.js","assets/r-Dspwwk_N.js","assets/latex-DGMBWnxU.js","assets/tex-CvyZ59Mk.js","assets/liquid-DYVedYrR.js","assets/marko-DZsq8hO1.js","assets/less-B1dDrJ26.js","assets/mdc-DUICxH0z.js","assets/nginx-BpAMiNFr.js","assets/nim-CVrawwO9.js","assets/perl-C0TMdlhV.js","assets/php-Dhbhpdrm.js","assets/pug-CGlum2m_.js","assets/qml-3beO22l8.js","assets/razor-Uh8Bk_45.js","assets/csharp-COcwbKMJ.js","assets/rst-D5oM4XIm.js","assets/cmake-D1j8_8rp.js","assets/sas-cz2c8ADy.js","assets/shaderlab-Dg9Lc6iA.js","assets/hlsl-D3lLCCz7.js","assets/shellsession-BADoaaVG.js","assets/soy-Brmx7dQM.js","assets/sparql-rVzFXLq3.js","assets/turtle-BsS91CYL.js","assets/stata-BH5u7GGu.js","assets/surrealql-Bq5Q-fJD.js","assets/svelte-zxCyuUbr.js","assets/templ-P3uqSqPl.js","assets/go-CxLEBnE3.js","assets/ts-tags-zn1MmPIZ.js","assets/twig-ChbOoGGc.js","assets/vue-DN_0RTcg.js","assets/vue-html-AaS7Mt5G.js","assets/vue-vine-CQOfvN7w.js","assets/stylus-BEDo0Tqx.js","assets/xsl-CtQFsRM5.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{j as E}from"./jsx-runtime-C5WNSv3b.js";import{m as To,R as Io,I as Po,H as Do,T as No,C as Oo}from"./react-error-boundary-DFNLMQmr.js";import{_ as f}from"./preload-helper-BXl3LOEh.js";import{r as re,R as Mo}from"./index-Bi6L2ga8.js";import{R as $o,T as Vo,V as jo,I as Fo,P as Go,C as Bo,S as Ho,a as Uo,G as Wo,L as zo,c as qo,d as Xo,e as Ko,f as Qo}from"./index-BvE6USCZ.js";import{I as te,d as Jo,c as ft,a as ii}from"./misc-D9k_mI0z.js";import{A as oi,T as Yo,d as Zo,k as es,L as ts,F as ns}from"./chunk-JZWAC4HX-BuixXc9D.js";import{u as rs}from"./index-DSpM0ReJ.js";import{L as et}from"./launch-editor-C8OwTN5L.js";import{a as is}from"./root-loader-DAxaiFMN.js";import{D as os}from"./epic-video-C9q0z-QM.js";import{u as ss}from"./revalidation-ws-JHvxsHsY.js";import{S as dn}from"./tooltip-H74tOFSr.js";const ht="diffs-container",as=/(?=^From [a-f0-9]+ .+$)/m,Mt=/(?=^diff --git)/gm,Zn=/(?=^---\s+\S)/gm,ls=/(?=^@@ )/gm,cs=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@(?: (.*))?/m,fn=new RegExp("(?<=\\n)"),us=/^(---|\+\+\+)\s+([^\t\r\n]+)/,ds=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,fs=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,hs=/^index (?:[0-9a-f]+)\.\.(?:[0-9a-f]+)(?: (\d+))?/,On="header-metadata",ne={dark:"pierre-dark",light:"pierre-light"},si="data-unsafe-css";function ps(t,e){return t?.start===e?.start&&t?.end===e?.end&&t?.side===e?.side&&t?.endSide===e?.endSide}var ms=class{pre;selectedRange=null;renderedSelectionRange;anchor;_queuedRender;constructor(t={}){this.options=t}setOptions(t){this.options={...this.options,...t},this.removeEventListeners(),this.options.enableLineSelection===!0&&this.attachEventListeners()}cleanUp(){this.removeEventListeners(),this._queuedRender!=null&&(cancelAnimationFrame(this._queuedRender),this._queuedRender=void 0),this.pre!=null&&delete this.pre.dataset.interactiveLineNumbers,this.pre=void 0}setup(t){this.setDirty(),this.pre!==t&&this.cleanUp(),this.pre=t;const{enableLineSelection:e=!1}=this.options;e?(this.pre.dataset.interactiveLineNumbers="",this.attachEventListeners()):(this.removeEventListeners(),delete this.pre.dataset.interactiveLineNumbers),this.setSelection(this.selectedRange)}setDirty(){this.renderedSelectionRange=void 0}isDirty(){return this.renderedSelectionRange===void 0}setSelection(t){const e=!(t===this.selectedRange||ps(t??void 0,this.selectedRange??void 0));!this.isDirty()&&!e||(this.selectedRange=t,this.renderSelection(),e&&this.notifySelectionChange())}getSelection(){return this.selectedRange}attachEventListeners(){this.pre!=null&&(this.removeEventListeners(),this.pre.addEventListener("pointerdown",this.handleMouseDown))}removeEventListeners(){this.pre!=null&&(this.pre.removeEventListener("pointerdown",this.handleMouseDown),document.removeEventListener("pointermove",this.handleMouseMove),document.removeEventListener("pointerup",this.handleMouseUp))}handleMouseDown=t=>{const e=t.button===0?this.getMouseEventDataForPath(t.composedPath(),"click"):void 0;if(e==null)return;t.preventDefault();const{lineNumber:n,eventSide:r,lineIndex:i}=e;if(t.shiftKey&&this.selectedRange!=null){const o=this.deriveRowRangeFromDOM(this.selectedRange,this.pre?.dataset.type==="split");if(o==null)return;const s=o.start<=o.end?i>=o.start:i<=o.end;this.anchor={line:s?this.selectedRange.start:this.selectedRange.end,side:(s?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side)??"additions"},this.updateSelection(n,r),this.notifySelectionStart(this.selectedRange)}else{if(this.selectedRange?.start===n&&this.selectedRange?.end===n){this.updateSelection(null),this.notifySelectionEnd(null),this.notifySelectionChange();return}this.selectedRange=null,this.anchor={line:n,side:r},this.updateSelection(n,r),this.notifySelectionStart(this.selectedRange)}document.addEventListener("pointermove",this.handleMouseMove),document.addEventListener("pointerup",this.handleMouseUp)};handleMouseMove=t=>{const e=this.getMouseEventDataForPath(t.composedPath(),"move");if(e==null||this.anchor==null)return;const{lineNumber:n,eventSide:r}=e;this.updateSelection(n,r)};handleMouseUp=()=>{this.anchor=void 0,document.removeEventListener("pointermove",this.handleMouseMove),document.removeEventListener("pointerup",this.handleMouseUp),this.notifySelectionEnd(this.selectedRange),this.notifySelectionChange()};updateSelection(t,e){if(t==null)this.selectedRange=null;else{const n=this.anchor?.side??e;this.selectedRange={start:this.anchor?.line??t,end:t,side:n,endSide:n!==e?e:void 0}}this._queuedRender??=requestAnimationFrame(this.renderSelection)}renderSelection=()=>{if(this._queuedRender!=null&&(cancelAnimationFrame(this._queuedRender),this._queuedRender=void 0),this.pre==null||this.renderedSelectionRange===this.selectedRange)return;const t=this.pre.querySelectorAll("[data-selected-line]");for(const a of t)a.removeAttribute("data-selected-line");if(this.renderedSelectionRange=this.selectedRange,this.selectedRange==null)return;const e=this.pre.querySelectorAll("[data-code]");if(e.length===0)return;if(e.length>2)throw console.error(e),new Error("LineSelectionManager.applySelectionToDOM: Somehow there are more than 2 code elements...");const n=this.pre.dataset.type==="split",r=this.deriveRowRangeFromDOM(this.selectedRange,n);if(r==null)throw console.error({rowRange:r,selectedRange:this.selectedRange}),new Error("LineSelectionManager.renderSelection: No valid rowRange");const i=r.start===r.end,o=Math.min(r.start,r.end),s=Math.max(r.start,r.end);for(const a of e)for(const l of a.children){if(!(l instanceof HTMLElement))continue;const c=this.getLineIndex(l,n);if((c??0)>s)break;if(c==null||c<o)continue;let u=i?"single":c===o?"first":c===s?"last":"";l.setAttribute("data-selected-line",u),l.nextSibling instanceof HTMLElement&&l.nextSibling.hasAttribute("data-line-annotation")&&(i?(u="last",l.setAttribute("data-selected-line","first")):c===o?u="":c===s&&l.setAttribute("data-selected-line",""),l.nextSibling.setAttribute("data-selected-line",u))}};deriveRowRangeFromDOM(t,e){if(t==null)return;const n=this.findRowIndexForLineNumber(t.start,t.side,e),r=t.end===t.start&&(t.endSide==null||t.endSide===t.side)?n:this.findRowIndexForLineNumber(t.end,t.endSide??t.side,e);return n!=null&&r!=null?{start:n,end:r}:void 0}findRowIndexForLineNumber(t,e="additions",n){if(this.pre==null)return;const r=Array.from(this.pre.querySelectorAll(`[data-line="${t}"]`));if(r.push(...Array.from(this.pre.querySelectorAll(`[data-alt-line="${t}"]`))),r.length!==0){for(const i of r)if(i instanceof HTMLElement){if(this.getLineSideFromElement(i)===e)return this.getLineIndex(i,n);if(parseInt(i.dataset.altLine??"")===t)return this.getLineIndex(i,n)}console.error("LineSelectionManager.findRowIndexForLineNumber: Invalid selection",t,e)}}notifySelectionChange(){const{onLineSelected:t}=this.options;t?.(this.selectedRange??null)}notifySelectionStart(t){const{onLineSelectionStart:e}=this.options;e?.(t)}notifySelectionEnd(t){const{onLineSelectionEnd:e}=this.options;e?.(t)}getMouseEventDataForPath(t,e){let n,r,i=!1,o;for(const s of t)if(s instanceof HTMLElement){if(s.hasAttribute("data-column-number")){i=!0;continue}if(s.hasAttribute("data-line")){if(n=this.getLineNumber(s),r=this.getLineIndex(s,this.pre?.dataset.type==="split"),s.dataset.lineType==="change-deletion"?o="deletions":s.dataset.lineType==="change-additions"&&(o="additions"),r==null||n==null){r=void 0,n=void 0;break}if(o!=null)break;continue}if(s.hasAttribute("data-code")){o??=s.hasAttribute("data-deletions")?"deletions":"additions";break}}if(!(e==="click"&&!i||r==null||n==null))return{lineIndex:r,lineNumber:n,eventSide:o??"additions"}}getLineNumber(t){const e=parseInt(t.dataset.line??"",10);return Number.isNaN(e)?void 0:e}getLineIndex(t,e){const n=(t.dataset.lineIndex??"").split(",").map(r=>parseInt(r)).filter(r=>!Number.isNaN(r));if(e&&n.length===2)return n[1];if(!e)return n[0]}getLineSideFromElement(t){if(t.dataset.lineType==="change-deletion")return"deletions";if(t.dataset.lineType==="change-addition")return"additions";const e=t.closest("[data-code]");return e instanceof HTMLElement&&e.hasAttribute("data-deletions")?"deletions":"additions"}};function er({enableLineSelection:t,onLineSelected:e,onLineSelectionStart:n,onLineSelectionEnd:r}){return{enableLineSelection:t,onLineSelected:e,onLineSelectionStart:n,onLineSelectionEnd:r}}function $t(t,e){return t==null?!1:e==="file"?t.type==="line":t.type==="diff-line"}function gs(t){return t?.type==="line-info"}var _s=class{hoveredLine;pre;hoverSlot;constructor(t,e){this.mode=t,this.options=e}setOptions(t){this.options=t}cleanUp(){this.pre?.removeEventListener("click",this.handleMouseClick),this.pre?.removeEventListener("pointermove",this.handleMouseMove),this.pre?.removeEventListener("pointerout",this.handleMouseLeave),delete this.pre?.dataset.interactiveLines,delete this.pre?.dataset.interactiveLineNumbers,this.pre=void 0}setup(t){const{__debugMouseEvents:e,onLineClick:n,onLineNumberClick:r,onLineEnter:i,onLineLeave:o,onHunkExpand:s,enableHoverUtility:a=!1}=this.options;if(this.cleanUp(),this.pre=t,a&&this.hoverSlot==null){this.hoverSlot=document.createElement("div"),this.hoverSlot.dataset.hoverSlot="";const l=document.createElement("slot");l.name="hover-slot",this.hoverSlot.appendChild(l)}else!a&&this.hoverSlot!=null&&(this.hoverSlot.parentNode?.removeChild(this.hoverSlot),this.hoverSlot=void 0);(n!=null||r!=null||s!=null)&&(t.addEventListener("click",this.handleMouseClick),n!=null?t.dataset.interactiveLines="":r!=null&&(t.dataset.interactiveLineNumbers=""),B(e,"click","FileDiff.DEBUG.attachEventListeners: Attaching click events for:",(()=>{const l=[];return(e==="both"||e==="click")&&(n!=null&&l.push("onLineClick"),r!=null&&l.push("onLineNumberClick"),s!=null&&l.push("expandable hunk separators")),l})())),(i!=null||o!=null||a)&&(t.addEventListener("pointermove",this.handleMouseMove),B(e,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer move event"),t.addEventListener("pointerleave",this.handleMouseLeave),B(e,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event"))}getHoveredLine=()=>{if(this.hoveredLine!=null){if(this.mode==="diff"&&this.hoveredLine.type==="diff-line")return{lineNumber:this.hoveredLine.lineNumber,side:this.hoveredLine.annotationSide};if(this.mode==="file"&&this.hoveredLine.type==="line")return{lineNumber:this.hoveredLine.lineNumber}}};handleMouseClick=t=>{B(this.options.__debugMouseEvents,"click","FileDiff.DEBUG.handleMouseClick:",t),this.handleMouseEvent({eventType:"click",event:t})};handleMouseMove=t=>{B(this.options.__debugMouseEvents,"move","FileDiff.DEBUG.handleMouseMove:",t),this.handleMouseEvent({eventType:"move",event:t})};handleMouseLeave=t=>{const{__debugMouseEvents:e}=this.options;if(B(e,"move","FileDiff.DEBUG.handleMouseLeave: no event"),this.hoveredLine==null){B(e,"move","FileDiff.DEBUG.handleMouseLeave: returned early, no .hoveredLine");return}this.hoverSlot?.parentElement?.removeChild(this.hoverSlot),this.options.onLineLeave?.({...this.hoveredLine,event:t}),this.hoveredLine=void 0};handleMouseEvent({eventType:t,event:e}){const{__debugMouseEvents:n}=this.options,r=e.composedPath();B(n,t,"FileDiff.DEBUG.handleMouseEvent:",{eventType:t,composedPath:r});const i=this.getLineData(r);B(n,t,"FileDiff.DEBUG.handleMouseEvent: getLineData result:",i);const{onLineClick:o,onLineNumberClick:s,onLineEnter:a,onLineLeave:l,onHunkExpand:c}=this.options;switch(t){case"move":if($t(i,this.mode)&&this.hoveredLine?.lineElement===i.lineElement){B(n,"move","FileDiff.DEBUG.handleMouseEvent: switch, 'move', returned early because same line");break}this.hoveredLine!=null&&(B(n,"move","FileDiff.DEBUG.handleMouseEvent: switch, 'move', clearing an existing hovered line and firing onLineLeave"),this.hoverSlot?.parentElement?.removeChild(this.hoverSlot),l?.({...this.hoveredLine,event:e}),this.hoveredLine=void 0),$t(i,this.mode)&&(B(n,"move","FileDiff.DEBUG.handleMouseEvent: switch, 'move', setting up a new hoveredLine and firing onLineEnter"),this.hoveredLine=i,this.hoverSlot!=null&&i.numberElement?.appendChild(this.hoverSlot),a?.({...this.hoveredLine,event:e}));break;case"click":if(B(n,"click","FileDiff.DEBUG.handleMouseEvent: switch, 'click', with data:",i),i==null)break;if(gs(i)&&c!=null){B(n,"click","FileDiff.DEBUG.handleMouseEvent: switch, 'click', expanding a hunk"),c(i.hunkIndex,i.direction);break}$t(i,this.mode)&&(s!=null&&i.numberColumn?(B(n,"click","FileDiff.DEBUG.handleMouseEvent: switch, 'click', firing 'onLineNumberClick'"),s({...i,event:e})):o!=null?(B(n,"click","FileDiff.DEBUG.handleMouseEvent: switch, 'click', firing 'onLineClick'"),o({...i,event:e})):B(n,"click","FileDiff.DEBUG.handleMouseEvent: switch, 'click', fell through, no event to fire"));break}}getLineData(t){let e=!1;const n=t.find(s=>s instanceof HTMLElement?(e=e||"columnNumber"in s.dataset,"line"in s.dataset||"expandIndex"in s.dataset):!1);if(!(n instanceof HTMLElement))return;if(n.dataset.expandIndex!=null){const s=parseInt(n.dataset.expandIndex);if(isNaN(s))return;let a;for(const l of t)if(l===n||l instanceof HTMLElement&&(a=a??("expandUp"in l.dataset?"up":void 0)??("expandDown"in l.dataset?"down":void 0)??("expandBoth"in l.dataset?"both":void 0),a!=null))break;return a!=null?{type:"line-info",hunkIndex:s,direction:a}:void 0}const r=parseInt(n.dataset.line??"");if(isNaN(r))return;const i=n.dataset.lineType;if(i!=="context"&&i!=="context-expanded"&&i!=="change-deletion"&&i!=="change-addition")return;const o=(()=>{const s=n.children[0];return s instanceof HTMLElement&&s.dataset.columnNumber!=null?s:void 0})();return this.mode==="file"?{type:"line",lineElement:n,lineNumber:r,numberElement:o,numberColumn:e}:{type:"diff-line",annotationSide:(()=>{if(i==="change-deletion")return"deletions";if(i==="change-addition")return"additions";const s=n.closest("[data-code]");return s instanceof HTMLElement&&"deletions"in s.dataset?"deletions":"additions"})(),lineType:i,lineElement:n,numberElement:o,lineNumber:r,numberColumn:e}}};function B(t="none",e,...n){switch(t){case"none":return;case"both":break;case"click":if(e!=="click")return;break;case"move":if(e!=="move")return;break}console.log(...n)}function tr({onLineClick:t,onLineNumberClick:e,onLineEnter:n,onLineLeave:r,enableHoverUtility:i,__debugMouseEvents:o},s){return{onLineClick:t,onLineNumberClick:e,onLineEnter:n,onLineLeave:r,enableHoverUtility:i,__debugMouseEvents:o,onHunkExpand:s}}var bs=class{observedNodes=new Map;cleanUp(){this.resizeObserver?.disconnect(),this.observedNodes.clear()}resizeObserver;setup(t){this.cleanUp();const e=t.querySelectorAll('[data-line-annotation*=","]');this.resizeObserver??=new ResizeObserver(this.handleResizeObserver);const n=t.querySelectorAll("code");for(const i of n){let o=i.querySelector("[data-column-number]");o instanceof HTMLElement||(o=null);const s={type:"code",codeElement:i,numberElement:o,codeWidth:"auto",numberWidth:0};this.observedNodes.set(i,s),this.resizeObserver.observe(i),o!=null&&(this.observedNodes.set(o,s),this.resizeObserver.observe(o))}if(n.length<=1)return;const r=new Map;for(const i of e){if(!(i instanceof HTMLElement))continue;const{lineAnnotation:o=""}=i.dataset;if(!/^\d+,\d+$/.test(o)){console.error("DiffFileRenderer.setupResizeObserver: Invalid element or annotation",{lineAnnotation:o,element:i});continue}let s=r.get(o);s==null&&(s=[],r.set(o,s)),s.push(i)}for(const[i,o]of r){if(o.length!==2){console.error("DiffFileRenderer.setupResizeObserver: Bad Pair",i,o);continue}const[s,a]=o,l=s.firstElementChild,c=a.firstElementChild;if(!(s instanceof HTMLElement)||!(a instanceof HTMLElement)||!(l instanceof HTMLElement)||!(c instanceof HTMLElement))continue;const u={type:"annotations",column1:{container:s,child:l,childHeight:0},column2:{container:a,child:c,childHeight:0},currentHeight:"auto"};this.observedNodes.set(l,u),this.observedNodes.set(c,u),this.resizeObserver.observe(l),this.resizeObserver.observe(c)}}handleResizeObserver=t=>{for(const e of t){const{target:n,borderBoxSize:r}=e;if(!(n instanceof HTMLElement)){console.error("FileDiff.handleResizeObserver: Invalid element for ResizeObserver",e);continue}const i=this.observedNodes.get(n);if(i==null){console.error("FileDiff.handleResizeObserver: Not a valid observed node",e);continue}const o=r[0];if(i.type==="annotations"){const s=(()=>{if(n===i.column1.child)return i.column1;if(n===i.column2.child)return i.column2})();if(s==null){console.error("FileDiff.handleResizeObserver: Couldn't find a column for",{item:i,target:n});continue}s.childHeight=o.blockSize;const a=Math.max(i.column1.childHeight,i.column2.childHeight);a!==i.currentHeight&&(i.currentHeight=Math.max(a,0),i.column1.container.style.setProperty("--diffs-annotation-min-height",`${i.currentHeight}px`),i.column2.container.style.setProperty("--diffs-annotation-min-height",`${i.currentHeight}px`))}else i.type==="code"&&(n===i.codeElement?o.inlineSize!==i.codeWidth&&(i.codeWidth=o.inlineSize,i.codeElement.style.setProperty("--diffs-column-content-width",`${Math.max(i.codeWidth-i.numberWidth,0)}px`),i.codeElement.style.setProperty("--diffs-column-width",`${i.codeWidth}px`)):n===i.numberElement&&o.inlineSize!==i.numberWidth&&(i.numberWidth=o.inlineSize,i.codeElement.style.setProperty("--diffs-column-number-width",`${i.numberWidth}px`),i.codeWidth!=="auto"&&i.codeElement.style.setProperty("--diffs-column-content-width",`${Math.max(i.codeWidth-i.numberWidth,0)}px`)))}}};const We=new Map,Vt=new Map,hn=new Set;function nr(t){for(const e of Array.isArray(t)?t:[t])if(!hn.has(e))return!1;return!0}function rr(t,e){t=Array.isArray(t)?t:[t];for(const n of t){if(hn.has(n.name))continue;let r=We.get(n.name);r==null&&(r=n,We.set(n.name,r)),hn.add(r.name),e.loadLanguageSync(r.data)}}function ai(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}let N=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function vs(t){return Mn(t)}function Mn(t){return Array.isArray(t)?ys(t):t instanceof RegExp?t:typeof t=="object"?ws(t):t}function ys(t){let e=[];for(let n=0,r=t.length;n<r;n++)e[n]=Mn(t[n]);return e}function ws(t){let e={};for(let n in t)e[n]=Mn(t[n]);return e}function li(t,...e){return e.forEach(n=>{for(let r in n)t[r]=n[r]}),t}function ci(t){const e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return e===0?t:~e===t.length-1?ci(t.substring(0,t.length-1)):t.substr(~e+1)}var jt=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,tt=class{static hasCaptures(t){return t===null?!1:(jt.lastIndex=0,jt.test(t))}static replaceCaptures(t,e,n){return t.replace(jt,(r,i,o,s)=>{let a=n[parseInt(i||o,10)];if(a){let l=e.substring(a.start,a.end);for(;l[0]===".";)l=l.substring(1);switch(s){case"downcase":return l.toLowerCase();case"upcase":return l.toUpperCase();default:return l}}else return r})}};function ui(t,e){return t<e?-1:t>e?1:0}function di(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 i=0;i<n;i++){let o=ui(t[i],e[i]);if(o!==0)return o}return 0}return n-r}function ir(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 fi(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var hi=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}},pt=class{constructor(t,e,n){this._colorMap=t,this._defaults=e,this._root=n}static createFromRawTheme(t,e){return this.createFromParsedTheme(Cs(t),e)}static createFromParsedTheme(t,e){return Ss(t,e)}_cachedMatchRoot=new hi(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(i=>Es(t.parent,i.parentScopes));return r?new pi(r.fontStyle,r.foreground,r.background):null}},Ft=class ct{constructor(e,n){this.parent=e,this.scopeName=n}static push(e,n){for(const r of n)e=new ct(e,r);return e}static from(...e){let n=null;for(let r=0;r<e.length;r++)n=new ct(n,e[r]);return n}push(e){return new ct(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 Es(t,e){if(e.length===0)return!0;for(let n=0;n<e.length;n++){let r=e[n],i=!1;if(r===">"){if(n===e.length-1)return!1;r=e[++n],i=!0}for(;t&&!ks(t.scopeName,r);){if(i)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function ks(t,e){return e===t||t.startsWith(e)&&t[e.length]==="."}var pi=class{constructor(t,e,n){this.fontStyle=t,this.foregroundId=e,this.backgroundId=n}};function Cs(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,n=[],r=0;for(let i=0,o=e.length;i<o;i++){let s=e[i];if(!s.settings)continue;let a;if(typeof s.scope=="string"){let d=s.scope;d=d.replace(/^[,]+/,""),d=d.replace(/[,]+$/,""),a=d.split(",")}else Array.isArray(s.scope)?a=s.scope:a=[""];let l=-1;if(typeof s.settings.fontStyle=="string"){l=0;let d=s.settings.fontStyle.split(" ");for(let h=0,p=d.length;h<p;h++)switch(d[h]){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 s.settings.foreground=="string"&&ir(s.settings.foreground)&&(c=s.settings.foreground);let u=null;typeof s.settings.background=="string"&&ir(s.settings.background)&&(u=s.settings.background);for(let d=0,h=a.length;d<h;d++){let m=a[d].trim().split(" "),v=m[m.length-1],y=null;m.length>1&&(y=m.slice(0,m.length-1),y.reverse()),n[r++]=new xs(v,y,i,l,c,u)}}return n}var xs=class{constructor(t,e,n,r,i,o){this.scope=t,this.parentScopes=e,this.index=n,this.fontStyle=r,this.foreground=i,this.background=o}},W=(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))(W||{});function Ss(t,e){t.sort((l,c)=>{let u=ui(l.scope,c.scope);return u!==0||(u=di(l.parentScopes,c.parentScopes),u!==0)?u:l.index-c.index});let n=0,r="#000000",i="#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&&(i=l.background)}let o=new Ls(e),s=new pi(n,o.getId(r),o.getId(i)),a=new Rs(new pn(0,null,-1,0,0),[]);for(let l=0,c=t.length;l<c;l++){let u=t[l];a.insert(0,u.scope,u.parentScopes,u.fontStyle,o.getId(u.foreground),o.getId(u.background))}return new pt(o,s,a)}var Ls=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)}},As=Object.freeze([]),pn=class mi{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,n,r,i,o){this.scopeDepth=e,this.parentScopes=n||As,this.fontStyle=r,this.foreground=i,this.background=o}clone(){return new mi(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let n=[];for(let r=0,i=e.length;r<i;r++)n[r]=e[r].clone();return n}acceptOverwrite(e,n,r,i){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),i!==0&&(this.background=i)}},Rs=class mn{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,i=0;for(;e.parentScopes[r]===">"&&r++,n.parentScopes[i]===">"&&i++,!(r>=e.parentScopes.length||i>=n.parentScopes.length);){const o=n.parentScopes[i].length-e.parentScopes[r].length;if(o!==0)return o;r++,i++}return n.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let r=e.indexOf("."),i,o;if(r===-1?(i=e,o=""):(i=e.substring(0,r),o=e.substring(r+1)),this._children.hasOwnProperty(i))return this._children[i].match(o)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(mn._cmpBySpecificity),n}insert(e,n,r,i,o,s){if(n===""){this._doInsertHere(e,r,i,o,s);return}let a=n.indexOf("."),l,c;a===-1?(l=n,c=""):(l=n.substring(0,a),c=n.substring(a+1));let u;this._children.hasOwnProperty(l)?u=this._children[l]:(u=new mn(this._mainRule.clone(),pn.cloneArr(this._rulesWithParentScopes)),this._children[l]=u),u.insert(e+1,c,r,i,o,s)}_doInsertHere(e,n,r,i,o){if(n===null){this._mainRule.acceptOverwrite(e,r,i,o);return}for(let s=0,a=this._rulesWithParentScopes.length;s<a;s++){let l=this._rulesWithParentScopes[s];if(di(l.parentScopes,n)===0){l.acceptOverwrite(e,r,i,o);return}}r===-1&&(r=this._mainRule.fontStyle),i===0&&(i=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new pn(e,n,r,i,o))}},Pe=class Q{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const n=Q.getLanguageId(e),r=Q.getTokenType(e),i=Q.getFontStyle(e),o=Q.getForeground(e),s=Q.getBackground(e);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:o,background:s})}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,i,o,s,a){let l=Q.getLanguageId(e),c=Q.getTokenType(e),u=Q.containsBalancedBrackets(e)?1:0,d=Q.getFontStyle(e),h=Q.getForeground(e),p=Q.getBackground(e);return n!==0&&(l=n),r!==8&&(c=r),i!==null&&(u=i?1:0),o!==-1&&(d=o),s!==0&&(h=s),a!==0&&(p=a),(l<<0|c<<8|u<<10|d<<11|h<<15|p<<24)>>>0}};function mt(t,e){const n=[],r=Ts(t);let i=r.next();for(;i!==null;){let l=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":l=1;break;case"L":l=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let c=s();if(n.push({matcher:c,priority:l}),i!==",")break;i=r.next()}return n;function o(){if(i==="-"){i=r.next();const l=o();return c=>!!l&&!l(c)}if(i==="("){i=r.next();const l=a();return i===")"&&(i=r.next()),l}if(or(i)){const l=[];do l.push(i),i=r.next();while(or(i));return c=>e(l,c)}return null}function s(){const l=[];let c=o();for(;c;)l.push(c),c=o();return u=>l.every(d=>d(u))}function a(){const l=[];let c=s();for(;c&&(l.push(c),i==="|"||i===",");){do i=r.next();while(i==="|"||i===",");c=s()}return u=>l.some(d=>d(u))}}function or(t){return!!t&&!!t.match(/[\w\.:]+/)}function Ts(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 gi(t){typeof t.dispose=="function"&&t.dispose()}var ze=class{constructor(t){this.scopeName=t}toKey(){return this.scopeName}},Is=class{constructor(t,e){this.scopeName=t,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},Ps=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))}},Ds=class{constructor(t,e){this.repo=t,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new ze(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const t=this.Q;this.Q=[];const e=new Ps;for(const n of t)Ns(n,this.initialScopeName,this.repo,e);for(const n of e.references)if(n instanceof ze){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 Ns(t,e,n,r){const i=n.lookup(t.scopeName);if(!i){if(t.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const o=n.lookup(e);t instanceof ze?ut({baseGrammar:o,selfGrammar:i},r):gn(t.ruleName,{baseGrammar:o,selfGrammar:i,repository:i.repository},r);const s=n.injections(t.scopeName);if(s)for(const a of s)r.add(new ze(a))}function gn(t,e,n){if(e.repository&&e.repository[t]){const r=e.repository[t];gt([r],e,n)}}function ut(t,e){t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns)&>(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e),t.selfGrammar.injections&>(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function gt(t,e,n){for(const r of t){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const i=r.repository?li({},e.repository,r.repository):e.repository;Array.isArray(r.patterns)&>(r.patterns,{...e,repository:i},n);const o=r.include;if(!o)continue;const s=_i(o);switch(s.kind){case 0:ut({...e,selfGrammar:e.baseGrammar},n);break;case 1:ut(e,n);break;case 2:gn(s.ruleName,{...e,repository:i},n);break;case 3:case 4:const a=s.scopeName===e.selfGrammar.scopeName?e.selfGrammar:s.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(a){const l={baseGrammar:e.baseGrammar,selfGrammar:a,repository:i};s.kind===4?gn(s.ruleName,l,n):ut(l,n)}else s.kind===4?n.add(new Is(s.scopeName,s.ruleName)):n.add(new ze(s.scopeName));break}}}var Os=class{kind=0},Ms=class{kind=1},$s=class{constructor(t){this.ruleName=t}kind=2},Vs=class{constructor(t){this.scopeName=t}kind=3},js=class{constructor(t,e){this.scopeName=t,this.ruleName=e}kind=4};function _i(t){if(t==="$base")return new Os;if(t==="$self")return new Ms;const e=t.indexOf("#");if(e===-1)return new Vs(t);if(e===0)return new $s(t.substring(1));{const n=t.substring(0,e),r=t.substring(e+1);return new js(n,r)}}var Fs=/\\(\d+)/,sr=/\\(\d+)/g,Gs=-1,bi=-2;var Je=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(t,e,n,r){this.$location=t,this.id=e,this._name=n||null,this._nameIsCapturing=tt.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=tt.hasCaptures(this._contentName)}get debugName(){const t=this.$location?`${ci(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:tt.replaceCaptures(this._name,t,e)}getContentName(t,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:tt.replaceCaptures(this._contentName,t,e)}},Bs=class extends Je{retokenizeCapturedWithRuleId;constructor(t,e,n,r,i){super(t,e,n,r),this.retokenizeCapturedWithRuleId=i}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!")}},Hs=class extends Je{_match;captures;_cachedCompiledPatterns;constructor(t,e,n,r,i){super(t,e,n,null),this._match=new qe(r,this.id),this.captures=i,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 Xe,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ar=class extends Je{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,r,i){super(t,e,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.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 Xe,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},_n=class extends Je{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,r,i,o,s,a,l,c){super(t,e,n,r),this._begin=new qe(i,this.id),this.beginCaptures=o,this._end=new qe(s||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,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 Xe;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}},_t=class extends Je{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(t,e,n,r,i,o,s,a,l){super(t,e,n,r),this._begin=new qe(i,this.id),this.beginCaptures=o,this.whileCaptures=a,this._while=new qe(s,bi),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 Xe;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 Xe,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,e||""),this._cachedCompiledWhilePatterns}},vi=class U{static createCaptureRule(e,n,r,i,o){return e.registerRule(s=>new Bs(n,s,r,i,o))}static getCompiledRuleId(e,n,r){return e.id||n.registerRule(i=>{if(e.id=i,e.match)return new Hs(e.$vscodeTextmateLocation,e.id,e.name,e.match,U._compileCaptures(e.captures,n,r));if(typeof e.begin>"u"){e.repository&&(r=li({},r,e.repository));let o=e.patterns;return typeof o>"u"&&e.include&&(o=[{include:e.include}]),new ar(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,U._compilePatterns(o,n,r))}return e.while?new _t(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,U._compileCaptures(e.beginCaptures||e.captures,n,r),e.while,U._compileCaptures(e.whileCaptures||e.captures,n,r),U._compilePatterns(e.patterns,n,r)):new _n(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,U._compileCaptures(e.beginCaptures||e.captures,n,r),e.end,U._compileCaptures(e.endCaptures||e.captures,n,r),e.applyEndPatternLast,U._compilePatterns(e.patterns,n,r))}),e.id}static _compileCaptures(e,n,r){let i=[];if(e){let o=0;for(const s in e){if(s==="$vscodeTextmateLocation")continue;const a=parseInt(s,10);a>o&&(o=a)}for(let s=0;s<=o;s++)i[s]=null;for(const s in e){if(s==="$vscodeTextmateLocation")continue;const a=parseInt(s,10);let l=0;e[s].patterns&&(l=U.getCompiledRuleId(e[s],n,r)),i[a]=U.createCaptureRule(n,e[s].$vscodeTextmateLocation,e[s].name,e[s].contentName,l)}}return i}static _compilePatterns(e,n,r){let i=[];if(e)for(let o=0,s=e.length;o<s;o++){const a=e[o];let l=-1;if(a.include){const c=_i(a.include);switch(c.kind){case 0:case 1:l=U.getCompiledRuleId(r[a.include],n,r);break;case 2:let u=r[c.ruleName];u&&(l=U.getCompiledRuleId(u,n,r));break;case 3:case 4:const d=c.scopeName,h=c.kind===4?c.ruleName:null,p=n.getExternalGrammar(d,r);if(p)if(h){let m=p.repository[h];m&&(l=U.getCompiledRuleId(m,n,p.repository))}else l=U.getCompiledRuleId(p.repository.$self,n,p.repository);break}}else l=U.getCompiledRuleId(a,n,r);if(l!==-1){const c=n.getRule(l);let u=!1;if((c instanceof ar||c instanceof _n||c instanceof _t)&&c.hasMissingPatterns&&c.patterns.length===0&&(u=!0),u)continue;i.push(l)}}return{patterns:i,hasMissingPatterns:(e?e.length:0)!==i.length}}},qe=class yi{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,n){if(e&&typeof e=="string"){const r=e.length;let i=0,o=[],s=!1;for(let a=0;a<r;a++)if(e.charAt(a)==="\\"&&a+1<r){const c=e.charAt(a+1);c==="z"?(o.push(e.substring(i,a)),o.push("$(?!\\n)(?<!\\n)"),i=a+2):(c==="A"||c==="G")&&(s=!0),a++}this.hasAnchor=s,i===0?this.source=e:(o.push(e.substring(i,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=Fs.test(this.source):this.hasBackReferences=!1}clone(){return new yi(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(i=>e.substring(i.start,i.end));return sr.lastIndex=0,this.source.replace(sr,(i,o)=>fi(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=[],i=[],o,s,a,l;for(o=0,s=this.source.length;o<s;o++)a=this.source.charAt(o),e[o]=a,n[o]=a,r[o]=a,i[o]=a,a==="\\"&&o+1<s&&(l=this.source.charAt(o+1),l==="A"?(e[o+1]="",n[o+1]="",r[o+1]="A",i[o+1]="A"):l==="G"?(e[o+1]="",n[o+1]="G",r[o+1]="",i[o+1]="G"):(e[o+1]=l,n[o+1]=l,r[o+1]=l,i[o+1]=l),o++);return{A0_G0:e.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:i.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}},Xe=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 lr(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(i=>i.resolveAnchors(e,n));return new lr(t,r,this._items.map(i=>i.ruleId))}},lr=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
|
+
import{j as E}from"./jsx-runtime-C5WNSv3b.js";import{m as To,R as Io,I as Po,H as Do,T as No,C as Oo}from"./react-error-boundary-DFNLMQmr.js";import{_ as f}from"./preload-helper-BXl3LOEh.js";import{r as re,R as Mo}from"./index-Bi6L2ga8.js";import{R as $o,T as Vo,V as jo,I as Fo,P as Go,C as Bo,S as Ho,a as Uo,G as Wo,L as zo,c as qo,d as Xo,e as Ko,f as Qo}from"./index-BvE6USCZ.js";import{I as te,d as Jo,c as ft,a as ii}from"./misc-D9k_mI0z.js";import{A as oi,T as Yo,d as Zo,k as es,L as ts,F as ns}from"./chunk-JZWAC4HX-BuixXc9D.js";import{u as rs}from"./index-DSpM0ReJ.js";import{L as et}from"./launch-editor-C-8ah8qM.js";import{a as is}from"./root-loader-DAxaiFMN.js";import{D as os}from"./epic-video-C9q0z-QM.js";import{u as ss}from"./revalidation-ws-JHvxsHsY.js";import{S as dn}from"./tooltip-H74tOFSr.js";const ht="diffs-container",as=/(?=^From [a-f0-9]+ .+$)/m,Mt=/(?=^diff --git)/gm,Zn=/(?=^---\s+\S)/gm,ls=/(?=^@@ )/gm,cs=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@(?: (.*))?/m,fn=new RegExp("(?<=\\n)"),us=/^(---|\+\+\+)\s+([^\t\r\n]+)/,ds=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,fs=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,hs=/^index (?:[0-9a-f]+)\.\.(?:[0-9a-f]+)(?: (\d+))?/,On="header-metadata",ne={dark:"pierre-dark",light:"pierre-light"},si="data-unsafe-css";function ps(t,e){return t?.start===e?.start&&t?.end===e?.end&&t?.side===e?.side&&t?.endSide===e?.endSide}var ms=class{pre;selectedRange=null;renderedSelectionRange;anchor;_queuedRender;constructor(t={}){this.options=t}setOptions(t){this.options={...this.options,...t},this.removeEventListeners(),this.options.enableLineSelection===!0&&this.attachEventListeners()}cleanUp(){this.removeEventListeners(),this._queuedRender!=null&&(cancelAnimationFrame(this._queuedRender),this._queuedRender=void 0),this.pre!=null&&delete this.pre.dataset.interactiveLineNumbers,this.pre=void 0}setup(t){this.setDirty(),this.pre!==t&&this.cleanUp(),this.pre=t;const{enableLineSelection:e=!1}=this.options;e?(this.pre.dataset.interactiveLineNumbers="",this.attachEventListeners()):(this.removeEventListeners(),delete this.pre.dataset.interactiveLineNumbers),this.setSelection(this.selectedRange)}setDirty(){this.renderedSelectionRange=void 0}isDirty(){return this.renderedSelectionRange===void 0}setSelection(t){const e=!(t===this.selectedRange||ps(t??void 0,this.selectedRange??void 0));!this.isDirty()&&!e||(this.selectedRange=t,this.renderSelection(),e&&this.notifySelectionChange())}getSelection(){return this.selectedRange}attachEventListeners(){this.pre!=null&&(this.removeEventListeners(),this.pre.addEventListener("pointerdown",this.handleMouseDown))}removeEventListeners(){this.pre!=null&&(this.pre.removeEventListener("pointerdown",this.handleMouseDown),document.removeEventListener("pointermove",this.handleMouseMove),document.removeEventListener("pointerup",this.handleMouseUp))}handleMouseDown=t=>{const e=t.button===0?this.getMouseEventDataForPath(t.composedPath(),"click"):void 0;if(e==null)return;t.preventDefault();const{lineNumber:n,eventSide:r,lineIndex:i}=e;if(t.shiftKey&&this.selectedRange!=null){const o=this.deriveRowRangeFromDOM(this.selectedRange,this.pre?.dataset.type==="split");if(o==null)return;const s=o.start<=o.end?i>=o.start:i<=o.end;this.anchor={line:s?this.selectedRange.start:this.selectedRange.end,side:(s?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side)??"additions"},this.updateSelection(n,r),this.notifySelectionStart(this.selectedRange)}else{if(this.selectedRange?.start===n&&this.selectedRange?.end===n){this.updateSelection(null),this.notifySelectionEnd(null),this.notifySelectionChange();return}this.selectedRange=null,this.anchor={line:n,side:r},this.updateSelection(n,r),this.notifySelectionStart(this.selectedRange)}document.addEventListener("pointermove",this.handleMouseMove),document.addEventListener("pointerup",this.handleMouseUp)};handleMouseMove=t=>{const e=this.getMouseEventDataForPath(t.composedPath(),"move");if(e==null||this.anchor==null)return;const{lineNumber:n,eventSide:r}=e;this.updateSelection(n,r)};handleMouseUp=()=>{this.anchor=void 0,document.removeEventListener("pointermove",this.handleMouseMove),document.removeEventListener("pointerup",this.handleMouseUp),this.notifySelectionEnd(this.selectedRange),this.notifySelectionChange()};updateSelection(t,e){if(t==null)this.selectedRange=null;else{const n=this.anchor?.side??e;this.selectedRange={start:this.anchor?.line??t,end:t,side:n,endSide:n!==e?e:void 0}}this._queuedRender??=requestAnimationFrame(this.renderSelection)}renderSelection=()=>{if(this._queuedRender!=null&&(cancelAnimationFrame(this._queuedRender),this._queuedRender=void 0),this.pre==null||this.renderedSelectionRange===this.selectedRange)return;const t=this.pre.querySelectorAll("[data-selected-line]");for(const a of t)a.removeAttribute("data-selected-line");if(this.renderedSelectionRange=this.selectedRange,this.selectedRange==null)return;const e=this.pre.querySelectorAll("[data-code]");if(e.length===0)return;if(e.length>2)throw console.error(e),new Error("LineSelectionManager.applySelectionToDOM: Somehow there are more than 2 code elements...");const n=this.pre.dataset.type==="split",r=this.deriveRowRangeFromDOM(this.selectedRange,n);if(r==null)throw console.error({rowRange:r,selectedRange:this.selectedRange}),new Error("LineSelectionManager.renderSelection: No valid rowRange");const i=r.start===r.end,o=Math.min(r.start,r.end),s=Math.max(r.start,r.end);for(const a of e)for(const l of a.children){if(!(l instanceof HTMLElement))continue;const c=this.getLineIndex(l,n);if((c??0)>s)break;if(c==null||c<o)continue;let u=i?"single":c===o?"first":c===s?"last":"";l.setAttribute("data-selected-line",u),l.nextSibling instanceof HTMLElement&&l.nextSibling.hasAttribute("data-line-annotation")&&(i?(u="last",l.setAttribute("data-selected-line","first")):c===o?u="":c===s&&l.setAttribute("data-selected-line",""),l.nextSibling.setAttribute("data-selected-line",u))}};deriveRowRangeFromDOM(t,e){if(t==null)return;const n=this.findRowIndexForLineNumber(t.start,t.side,e),r=t.end===t.start&&(t.endSide==null||t.endSide===t.side)?n:this.findRowIndexForLineNumber(t.end,t.endSide??t.side,e);return n!=null&&r!=null?{start:n,end:r}:void 0}findRowIndexForLineNumber(t,e="additions",n){if(this.pre==null)return;const r=Array.from(this.pre.querySelectorAll(`[data-line="${t}"]`));if(r.push(...Array.from(this.pre.querySelectorAll(`[data-alt-line="${t}"]`))),r.length!==0){for(const i of r)if(i instanceof HTMLElement){if(this.getLineSideFromElement(i)===e)return this.getLineIndex(i,n);if(parseInt(i.dataset.altLine??"")===t)return this.getLineIndex(i,n)}console.error("LineSelectionManager.findRowIndexForLineNumber: Invalid selection",t,e)}}notifySelectionChange(){const{onLineSelected:t}=this.options;t?.(this.selectedRange??null)}notifySelectionStart(t){const{onLineSelectionStart:e}=this.options;e?.(t)}notifySelectionEnd(t){const{onLineSelectionEnd:e}=this.options;e?.(t)}getMouseEventDataForPath(t,e){let n,r,i=!1,o;for(const s of t)if(s instanceof HTMLElement){if(s.hasAttribute("data-column-number")){i=!0;continue}if(s.hasAttribute("data-line")){if(n=this.getLineNumber(s),r=this.getLineIndex(s,this.pre?.dataset.type==="split"),s.dataset.lineType==="change-deletion"?o="deletions":s.dataset.lineType==="change-additions"&&(o="additions"),r==null||n==null){r=void 0,n=void 0;break}if(o!=null)break;continue}if(s.hasAttribute("data-code")){o??=s.hasAttribute("data-deletions")?"deletions":"additions";break}}if(!(e==="click"&&!i||r==null||n==null))return{lineIndex:r,lineNumber:n,eventSide:o??"additions"}}getLineNumber(t){const e=parseInt(t.dataset.line??"",10);return Number.isNaN(e)?void 0:e}getLineIndex(t,e){const n=(t.dataset.lineIndex??"").split(",").map(r=>parseInt(r)).filter(r=>!Number.isNaN(r));if(e&&n.length===2)return n[1];if(!e)return n[0]}getLineSideFromElement(t){if(t.dataset.lineType==="change-deletion")return"deletions";if(t.dataset.lineType==="change-addition")return"additions";const e=t.closest("[data-code]");return e instanceof HTMLElement&&e.hasAttribute("data-deletions")?"deletions":"additions"}};function er({enableLineSelection:t,onLineSelected:e,onLineSelectionStart:n,onLineSelectionEnd:r}){return{enableLineSelection:t,onLineSelected:e,onLineSelectionStart:n,onLineSelectionEnd:r}}function $t(t,e){return t==null?!1:e==="file"?t.type==="line":t.type==="diff-line"}function gs(t){return t?.type==="line-info"}var _s=class{hoveredLine;pre;hoverSlot;constructor(t,e){this.mode=t,this.options=e}setOptions(t){this.options=t}cleanUp(){this.pre?.removeEventListener("click",this.handleMouseClick),this.pre?.removeEventListener("pointermove",this.handleMouseMove),this.pre?.removeEventListener("pointerout",this.handleMouseLeave),delete this.pre?.dataset.interactiveLines,delete this.pre?.dataset.interactiveLineNumbers,this.pre=void 0}setup(t){const{__debugMouseEvents:e,onLineClick:n,onLineNumberClick:r,onLineEnter:i,onLineLeave:o,onHunkExpand:s,enableHoverUtility:a=!1}=this.options;if(this.cleanUp(),this.pre=t,a&&this.hoverSlot==null){this.hoverSlot=document.createElement("div"),this.hoverSlot.dataset.hoverSlot="";const l=document.createElement("slot");l.name="hover-slot",this.hoverSlot.appendChild(l)}else!a&&this.hoverSlot!=null&&(this.hoverSlot.parentNode?.removeChild(this.hoverSlot),this.hoverSlot=void 0);(n!=null||r!=null||s!=null)&&(t.addEventListener("click",this.handleMouseClick),n!=null?t.dataset.interactiveLines="":r!=null&&(t.dataset.interactiveLineNumbers=""),B(e,"click","FileDiff.DEBUG.attachEventListeners: Attaching click events for:",(()=>{const l=[];return(e==="both"||e==="click")&&(n!=null&&l.push("onLineClick"),r!=null&&l.push("onLineNumberClick"),s!=null&&l.push("expandable hunk separators")),l})())),(i!=null||o!=null||a)&&(t.addEventListener("pointermove",this.handleMouseMove),B(e,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer move event"),t.addEventListener("pointerleave",this.handleMouseLeave),B(e,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event"))}getHoveredLine=()=>{if(this.hoveredLine!=null){if(this.mode==="diff"&&this.hoveredLine.type==="diff-line")return{lineNumber:this.hoveredLine.lineNumber,side:this.hoveredLine.annotationSide};if(this.mode==="file"&&this.hoveredLine.type==="line")return{lineNumber:this.hoveredLine.lineNumber}}};handleMouseClick=t=>{B(this.options.__debugMouseEvents,"click","FileDiff.DEBUG.handleMouseClick:",t),this.handleMouseEvent({eventType:"click",event:t})};handleMouseMove=t=>{B(this.options.__debugMouseEvents,"move","FileDiff.DEBUG.handleMouseMove:",t),this.handleMouseEvent({eventType:"move",event:t})};handleMouseLeave=t=>{const{__debugMouseEvents:e}=this.options;if(B(e,"move","FileDiff.DEBUG.handleMouseLeave: no event"),this.hoveredLine==null){B(e,"move","FileDiff.DEBUG.handleMouseLeave: returned early, no .hoveredLine");return}this.hoverSlot?.parentElement?.removeChild(this.hoverSlot),this.options.onLineLeave?.({...this.hoveredLine,event:t}),this.hoveredLine=void 0};handleMouseEvent({eventType:t,event:e}){const{__debugMouseEvents:n}=this.options,r=e.composedPath();B(n,t,"FileDiff.DEBUG.handleMouseEvent:",{eventType:t,composedPath:r});const i=this.getLineData(r);B(n,t,"FileDiff.DEBUG.handleMouseEvent: getLineData result:",i);const{onLineClick:o,onLineNumberClick:s,onLineEnter:a,onLineLeave:l,onHunkExpand:c}=this.options;switch(t){case"move":if($t(i,this.mode)&&this.hoveredLine?.lineElement===i.lineElement){B(n,"move","FileDiff.DEBUG.handleMouseEvent: switch, 'move', returned early because same line");break}this.hoveredLine!=null&&(B(n,"move","FileDiff.DEBUG.handleMouseEvent: switch, 'move', clearing an existing hovered line and firing onLineLeave"),this.hoverSlot?.parentElement?.removeChild(this.hoverSlot),l?.({...this.hoveredLine,event:e}),this.hoveredLine=void 0),$t(i,this.mode)&&(B(n,"move","FileDiff.DEBUG.handleMouseEvent: switch, 'move', setting up a new hoveredLine and firing onLineEnter"),this.hoveredLine=i,this.hoverSlot!=null&&i.numberElement?.appendChild(this.hoverSlot),a?.({...this.hoveredLine,event:e}));break;case"click":if(B(n,"click","FileDiff.DEBUG.handleMouseEvent: switch, 'click', with data:",i),i==null)break;if(gs(i)&&c!=null){B(n,"click","FileDiff.DEBUG.handleMouseEvent: switch, 'click', expanding a hunk"),c(i.hunkIndex,i.direction);break}$t(i,this.mode)&&(s!=null&&i.numberColumn?(B(n,"click","FileDiff.DEBUG.handleMouseEvent: switch, 'click', firing 'onLineNumberClick'"),s({...i,event:e})):o!=null?(B(n,"click","FileDiff.DEBUG.handleMouseEvent: switch, 'click', firing 'onLineClick'"),o({...i,event:e})):B(n,"click","FileDiff.DEBUG.handleMouseEvent: switch, 'click', fell through, no event to fire"));break}}getLineData(t){let e=!1;const n=t.find(s=>s instanceof HTMLElement?(e=e||"columnNumber"in s.dataset,"line"in s.dataset||"expandIndex"in s.dataset):!1);if(!(n instanceof HTMLElement))return;if(n.dataset.expandIndex!=null){const s=parseInt(n.dataset.expandIndex);if(isNaN(s))return;let a;for(const l of t)if(l===n||l instanceof HTMLElement&&(a=a??("expandUp"in l.dataset?"up":void 0)??("expandDown"in l.dataset?"down":void 0)??("expandBoth"in l.dataset?"both":void 0),a!=null))break;return a!=null?{type:"line-info",hunkIndex:s,direction:a}:void 0}const r=parseInt(n.dataset.line??"");if(isNaN(r))return;const i=n.dataset.lineType;if(i!=="context"&&i!=="context-expanded"&&i!=="change-deletion"&&i!=="change-addition")return;const o=(()=>{const s=n.children[0];return s instanceof HTMLElement&&s.dataset.columnNumber!=null?s:void 0})();return this.mode==="file"?{type:"line",lineElement:n,lineNumber:r,numberElement:o,numberColumn:e}:{type:"diff-line",annotationSide:(()=>{if(i==="change-deletion")return"deletions";if(i==="change-addition")return"additions";const s=n.closest("[data-code]");return s instanceof HTMLElement&&"deletions"in s.dataset?"deletions":"additions"})(),lineType:i,lineElement:n,numberElement:o,lineNumber:r,numberColumn:e}}};function B(t="none",e,...n){switch(t){case"none":return;case"both":break;case"click":if(e!=="click")return;break;case"move":if(e!=="move")return;break}console.log(...n)}function tr({onLineClick:t,onLineNumberClick:e,onLineEnter:n,onLineLeave:r,enableHoverUtility:i,__debugMouseEvents:o},s){return{onLineClick:t,onLineNumberClick:e,onLineEnter:n,onLineLeave:r,enableHoverUtility:i,__debugMouseEvents:o,onHunkExpand:s}}var bs=class{observedNodes=new Map;cleanUp(){this.resizeObserver?.disconnect(),this.observedNodes.clear()}resizeObserver;setup(t){this.cleanUp();const e=t.querySelectorAll('[data-line-annotation*=","]');this.resizeObserver??=new ResizeObserver(this.handleResizeObserver);const n=t.querySelectorAll("code");for(const i of n){let o=i.querySelector("[data-column-number]");o instanceof HTMLElement||(o=null);const s={type:"code",codeElement:i,numberElement:o,codeWidth:"auto",numberWidth:0};this.observedNodes.set(i,s),this.resizeObserver.observe(i),o!=null&&(this.observedNodes.set(o,s),this.resizeObserver.observe(o))}if(n.length<=1)return;const r=new Map;for(const i of e){if(!(i instanceof HTMLElement))continue;const{lineAnnotation:o=""}=i.dataset;if(!/^\d+,\d+$/.test(o)){console.error("DiffFileRenderer.setupResizeObserver: Invalid element or annotation",{lineAnnotation:o,element:i});continue}let s=r.get(o);s==null&&(s=[],r.set(o,s)),s.push(i)}for(const[i,o]of r){if(o.length!==2){console.error("DiffFileRenderer.setupResizeObserver: Bad Pair",i,o);continue}const[s,a]=o,l=s.firstElementChild,c=a.firstElementChild;if(!(s instanceof HTMLElement)||!(a instanceof HTMLElement)||!(l instanceof HTMLElement)||!(c instanceof HTMLElement))continue;const u={type:"annotations",column1:{container:s,child:l,childHeight:0},column2:{container:a,child:c,childHeight:0},currentHeight:"auto"};this.observedNodes.set(l,u),this.observedNodes.set(c,u),this.resizeObserver.observe(l),this.resizeObserver.observe(c)}}handleResizeObserver=t=>{for(const e of t){const{target:n,borderBoxSize:r}=e;if(!(n instanceof HTMLElement)){console.error("FileDiff.handleResizeObserver: Invalid element for ResizeObserver",e);continue}const i=this.observedNodes.get(n);if(i==null){console.error("FileDiff.handleResizeObserver: Not a valid observed node",e);continue}const o=r[0];if(i.type==="annotations"){const s=(()=>{if(n===i.column1.child)return i.column1;if(n===i.column2.child)return i.column2})();if(s==null){console.error("FileDiff.handleResizeObserver: Couldn't find a column for",{item:i,target:n});continue}s.childHeight=o.blockSize;const a=Math.max(i.column1.childHeight,i.column2.childHeight);a!==i.currentHeight&&(i.currentHeight=Math.max(a,0),i.column1.container.style.setProperty("--diffs-annotation-min-height",`${i.currentHeight}px`),i.column2.container.style.setProperty("--diffs-annotation-min-height",`${i.currentHeight}px`))}else i.type==="code"&&(n===i.codeElement?o.inlineSize!==i.codeWidth&&(i.codeWidth=o.inlineSize,i.codeElement.style.setProperty("--diffs-column-content-width",`${Math.max(i.codeWidth-i.numberWidth,0)}px`),i.codeElement.style.setProperty("--diffs-column-width",`${i.codeWidth}px`)):n===i.numberElement&&o.inlineSize!==i.numberWidth&&(i.numberWidth=o.inlineSize,i.codeElement.style.setProperty("--diffs-column-number-width",`${i.numberWidth}px`),i.codeWidth!=="auto"&&i.codeElement.style.setProperty("--diffs-column-content-width",`${Math.max(i.codeWidth-i.numberWidth,0)}px`)))}}};const We=new Map,Vt=new Map,hn=new Set;function nr(t){for(const e of Array.isArray(t)?t:[t])if(!hn.has(e))return!1;return!0}function rr(t,e){t=Array.isArray(t)?t:[t];for(const n of t){if(hn.has(n.name))continue;let r=We.get(n.name);r==null&&(r=n,We.set(n.name,r)),hn.add(r.name),e.loadLanguageSync(r.data)}}function ai(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}let N=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function vs(t){return Mn(t)}function Mn(t){return Array.isArray(t)?ys(t):t instanceof RegExp?t:typeof t=="object"?ws(t):t}function ys(t){let e=[];for(let n=0,r=t.length;n<r;n++)e[n]=Mn(t[n]);return e}function ws(t){let e={};for(let n in t)e[n]=Mn(t[n]);return e}function li(t,...e){return e.forEach(n=>{for(let r in n)t[r]=n[r]}),t}function ci(t){const e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return e===0?t:~e===t.length-1?ci(t.substring(0,t.length-1)):t.substr(~e+1)}var jt=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,tt=class{static hasCaptures(t){return t===null?!1:(jt.lastIndex=0,jt.test(t))}static replaceCaptures(t,e,n){return t.replace(jt,(r,i,o,s)=>{let a=n[parseInt(i||o,10)];if(a){let l=e.substring(a.start,a.end);for(;l[0]===".";)l=l.substring(1);switch(s){case"downcase":return l.toLowerCase();case"upcase":return l.toUpperCase();default:return l}}else return r})}};function ui(t,e){return t<e?-1:t>e?1:0}function di(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 i=0;i<n;i++){let o=ui(t[i],e[i]);if(o!==0)return o}return 0}return n-r}function ir(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 fi(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var hi=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}},pt=class{constructor(t,e,n){this._colorMap=t,this._defaults=e,this._root=n}static createFromRawTheme(t,e){return this.createFromParsedTheme(Cs(t),e)}static createFromParsedTheme(t,e){return Ss(t,e)}_cachedMatchRoot=new hi(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(i=>Es(t.parent,i.parentScopes));return r?new pi(r.fontStyle,r.foreground,r.background):null}},Ft=class ct{constructor(e,n){this.parent=e,this.scopeName=n}static push(e,n){for(const r of n)e=new ct(e,r);return e}static from(...e){let n=null;for(let r=0;r<e.length;r++)n=new ct(n,e[r]);return n}push(e){return new ct(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 Es(t,e){if(e.length===0)return!0;for(let n=0;n<e.length;n++){let r=e[n],i=!1;if(r===">"){if(n===e.length-1)return!1;r=e[++n],i=!0}for(;t&&!ks(t.scopeName,r);){if(i)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function ks(t,e){return e===t||t.startsWith(e)&&t[e.length]==="."}var pi=class{constructor(t,e,n){this.fontStyle=t,this.foregroundId=e,this.backgroundId=n}};function Cs(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,n=[],r=0;for(let i=0,o=e.length;i<o;i++){let s=e[i];if(!s.settings)continue;let a;if(typeof s.scope=="string"){let d=s.scope;d=d.replace(/^[,]+/,""),d=d.replace(/[,]+$/,""),a=d.split(",")}else Array.isArray(s.scope)?a=s.scope:a=[""];let l=-1;if(typeof s.settings.fontStyle=="string"){l=0;let d=s.settings.fontStyle.split(" ");for(let h=0,p=d.length;h<p;h++)switch(d[h]){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 s.settings.foreground=="string"&&ir(s.settings.foreground)&&(c=s.settings.foreground);let u=null;typeof s.settings.background=="string"&&ir(s.settings.background)&&(u=s.settings.background);for(let d=0,h=a.length;d<h;d++){let m=a[d].trim().split(" "),v=m[m.length-1],y=null;m.length>1&&(y=m.slice(0,m.length-1),y.reverse()),n[r++]=new xs(v,y,i,l,c,u)}}return n}var xs=class{constructor(t,e,n,r,i,o){this.scope=t,this.parentScopes=e,this.index=n,this.fontStyle=r,this.foreground=i,this.background=o}},W=(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))(W||{});function Ss(t,e){t.sort((l,c)=>{let u=ui(l.scope,c.scope);return u!==0||(u=di(l.parentScopes,c.parentScopes),u!==0)?u:l.index-c.index});let n=0,r="#000000",i="#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&&(i=l.background)}let o=new Ls(e),s=new pi(n,o.getId(r),o.getId(i)),a=new Rs(new pn(0,null,-1,0,0),[]);for(let l=0,c=t.length;l<c;l++){let u=t[l];a.insert(0,u.scope,u.parentScopes,u.fontStyle,o.getId(u.foreground),o.getId(u.background))}return new pt(o,s,a)}var Ls=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)}},As=Object.freeze([]),pn=class mi{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,n,r,i,o){this.scopeDepth=e,this.parentScopes=n||As,this.fontStyle=r,this.foreground=i,this.background=o}clone(){return new mi(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let n=[];for(let r=0,i=e.length;r<i;r++)n[r]=e[r].clone();return n}acceptOverwrite(e,n,r,i){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),i!==0&&(this.background=i)}},Rs=class mn{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,i=0;for(;e.parentScopes[r]===">"&&r++,n.parentScopes[i]===">"&&i++,!(r>=e.parentScopes.length||i>=n.parentScopes.length);){const o=n.parentScopes[i].length-e.parentScopes[r].length;if(o!==0)return o;r++,i++}return n.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let r=e.indexOf("."),i,o;if(r===-1?(i=e,o=""):(i=e.substring(0,r),o=e.substring(r+1)),this._children.hasOwnProperty(i))return this._children[i].match(o)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(mn._cmpBySpecificity),n}insert(e,n,r,i,o,s){if(n===""){this._doInsertHere(e,r,i,o,s);return}let a=n.indexOf("."),l,c;a===-1?(l=n,c=""):(l=n.substring(0,a),c=n.substring(a+1));let u;this._children.hasOwnProperty(l)?u=this._children[l]:(u=new mn(this._mainRule.clone(),pn.cloneArr(this._rulesWithParentScopes)),this._children[l]=u),u.insert(e+1,c,r,i,o,s)}_doInsertHere(e,n,r,i,o){if(n===null){this._mainRule.acceptOverwrite(e,r,i,o);return}for(let s=0,a=this._rulesWithParentScopes.length;s<a;s++){let l=this._rulesWithParentScopes[s];if(di(l.parentScopes,n)===0){l.acceptOverwrite(e,r,i,o);return}}r===-1&&(r=this._mainRule.fontStyle),i===0&&(i=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new pn(e,n,r,i,o))}},Pe=class Q{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const n=Q.getLanguageId(e),r=Q.getTokenType(e),i=Q.getFontStyle(e),o=Q.getForeground(e),s=Q.getBackground(e);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:o,background:s})}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,i,o,s,a){let l=Q.getLanguageId(e),c=Q.getTokenType(e),u=Q.containsBalancedBrackets(e)?1:0,d=Q.getFontStyle(e),h=Q.getForeground(e),p=Q.getBackground(e);return n!==0&&(l=n),r!==8&&(c=r),i!==null&&(u=i?1:0),o!==-1&&(d=o),s!==0&&(h=s),a!==0&&(p=a),(l<<0|c<<8|u<<10|d<<11|h<<15|p<<24)>>>0}};function mt(t,e){const n=[],r=Ts(t);let i=r.next();for(;i!==null;){let l=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":l=1;break;case"L":l=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let c=s();if(n.push({matcher:c,priority:l}),i!==",")break;i=r.next()}return n;function o(){if(i==="-"){i=r.next();const l=o();return c=>!!l&&!l(c)}if(i==="("){i=r.next();const l=a();return i===")"&&(i=r.next()),l}if(or(i)){const l=[];do l.push(i),i=r.next();while(or(i));return c=>e(l,c)}return null}function s(){const l=[];let c=o();for(;c;)l.push(c),c=o();return u=>l.every(d=>d(u))}function a(){const l=[];let c=s();for(;c&&(l.push(c),i==="|"||i===",");){do i=r.next();while(i==="|"||i===",");c=s()}return u=>l.some(d=>d(u))}}function or(t){return!!t&&!!t.match(/[\w\.:]+/)}function Ts(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 gi(t){typeof t.dispose=="function"&&t.dispose()}var ze=class{constructor(t){this.scopeName=t}toKey(){return this.scopeName}},Is=class{constructor(t,e){this.scopeName=t,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},Ps=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))}},Ds=class{constructor(t,e){this.repo=t,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new ze(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const t=this.Q;this.Q=[];const e=new Ps;for(const n of t)Ns(n,this.initialScopeName,this.repo,e);for(const n of e.references)if(n instanceof ze){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 Ns(t,e,n,r){const i=n.lookup(t.scopeName);if(!i){if(t.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const o=n.lookup(e);t instanceof ze?ut({baseGrammar:o,selfGrammar:i},r):gn(t.ruleName,{baseGrammar:o,selfGrammar:i,repository:i.repository},r);const s=n.injections(t.scopeName);if(s)for(const a of s)r.add(new ze(a))}function gn(t,e,n){if(e.repository&&e.repository[t]){const r=e.repository[t];gt([r],e,n)}}function ut(t,e){t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns)&>(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e),t.selfGrammar.injections&>(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function gt(t,e,n){for(const r of t){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const i=r.repository?li({},e.repository,r.repository):e.repository;Array.isArray(r.patterns)&>(r.patterns,{...e,repository:i},n);const o=r.include;if(!o)continue;const s=_i(o);switch(s.kind){case 0:ut({...e,selfGrammar:e.baseGrammar},n);break;case 1:ut(e,n);break;case 2:gn(s.ruleName,{...e,repository:i},n);break;case 3:case 4:const a=s.scopeName===e.selfGrammar.scopeName?e.selfGrammar:s.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(a){const l={baseGrammar:e.baseGrammar,selfGrammar:a,repository:i};s.kind===4?gn(s.ruleName,l,n):ut(l,n)}else s.kind===4?n.add(new Is(s.scopeName,s.ruleName)):n.add(new ze(s.scopeName));break}}}var Os=class{kind=0},Ms=class{kind=1},$s=class{constructor(t){this.ruleName=t}kind=2},Vs=class{constructor(t){this.scopeName=t}kind=3},js=class{constructor(t,e){this.scopeName=t,this.ruleName=e}kind=4};function _i(t){if(t==="$base")return new Os;if(t==="$self")return new Ms;const e=t.indexOf("#");if(e===-1)return new Vs(t);if(e===0)return new $s(t.substring(1));{const n=t.substring(0,e),r=t.substring(e+1);return new js(n,r)}}var Fs=/\\(\d+)/,sr=/\\(\d+)/g,Gs=-1,bi=-2;var Je=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(t,e,n,r){this.$location=t,this.id=e,this._name=n||null,this._nameIsCapturing=tt.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=tt.hasCaptures(this._contentName)}get debugName(){const t=this.$location?`${ci(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:tt.replaceCaptures(this._name,t,e)}getContentName(t,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:tt.replaceCaptures(this._contentName,t,e)}},Bs=class extends Je{retokenizeCapturedWithRuleId;constructor(t,e,n,r,i){super(t,e,n,r),this.retokenizeCapturedWithRuleId=i}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!")}},Hs=class extends Je{_match;captures;_cachedCompiledPatterns;constructor(t,e,n,r,i){super(t,e,n,null),this._match=new qe(r,this.id),this.captures=i,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 Xe,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ar=class extends Je{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,r,i){super(t,e,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.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 Xe,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},_n=class extends Je{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,r,i,o,s,a,l,c){super(t,e,n,r),this._begin=new qe(i,this.id),this.beginCaptures=o,this._end=new qe(s||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,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 Xe;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}},_t=class extends Je{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(t,e,n,r,i,o,s,a,l){super(t,e,n,r),this._begin=new qe(i,this.id),this.beginCaptures=o,this.whileCaptures=a,this._while=new qe(s,bi),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 Xe;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 Xe,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,e||""),this._cachedCompiledWhilePatterns}},vi=class U{static createCaptureRule(e,n,r,i,o){return e.registerRule(s=>new Bs(n,s,r,i,o))}static getCompiledRuleId(e,n,r){return e.id||n.registerRule(i=>{if(e.id=i,e.match)return new Hs(e.$vscodeTextmateLocation,e.id,e.name,e.match,U._compileCaptures(e.captures,n,r));if(typeof e.begin>"u"){e.repository&&(r=li({},r,e.repository));let o=e.patterns;return typeof o>"u"&&e.include&&(o=[{include:e.include}]),new ar(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,U._compilePatterns(o,n,r))}return e.while?new _t(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,U._compileCaptures(e.beginCaptures||e.captures,n,r),e.while,U._compileCaptures(e.whileCaptures||e.captures,n,r),U._compilePatterns(e.patterns,n,r)):new _n(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,U._compileCaptures(e.beginCaptures||e.captures,n,r),e.end,U._compileCaptures(e.endCaptures||e.captures,n,r),e.applyEndPatternLast,U._compilePatterns(e.patterns,n,r))}),e.id}static _compileCaptures(e,n,r){let i=[];if(e){let o=0;for(const s in e){if(s==="$vscodeTextmateLocation")continue;const a=parseInt(s,10);a>o&&(o=a)}for(let s=0;s<=o;s++)i[s]=null;for(const s in e){if(s==="$vscodeTextmateLocation")continue;const a=parseInt(s,10);let l=0;e[s].patterns&&(l=U.getCompiledRuleId(e[s],n,r)),i[a]=U.createCaptureRule(n,e[s].$vscodeTextmateLocation,e[s].name,e[s].contentName,l)}}return i}static _compilePatterns(e,n,r){let i=[];if(e)for(let o=0,s=e.length;o<s;o++){const a=e[o];let l=-1;if(a.include){const c=_i(a.include);switch(c.kind){case 0:case 1:l=U.getCompiledRuleId(r[a.include],n,r);break;case 2:let u=r[c.ruleName];u&&(l=U.getCompiledRuleId(u,n,r));break;case 3:case 4:const d=c.scopeName,h=c.kind===4?c.ruleName:null,p=n.getExternalGrammar(d,r);if(p)if(h){let m=p.repository[h];m&&(l=U.getCompiledRuleId(m,n,p.repository))}else l=U.getCompiledRuleId(p.repository.$self,n,p.repository);break}}else l=U.getCompiledRuleId(a,n,r);if(l!==-1){const c=n.getRule(l);let u=!1;if((c instanceof ar||c instanceof _n||c instanceof _t)&&c.hasMissingPatterns&&c.patterns.length===0&&(u=!0),u)continue;i.push(l)}}return{patterns:i,hasMissingPatterns:(e?e.length:0)!==i.length}}},qe=class yi{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,n){if(e&&typeof e=="string"){const r=e.length;let i=0,o=[],s=!1;for(let a=0;a<r;a++)if(e.charAt(a)==="\\"&&a+1<r){const c=e.charAt(a+1);c==="z"?(o.push(e.substring(i,a)),o.push("$(?!\\n)(?<!\\n)"),i=a+2):(c==="A"||c==="G")&&(s=!0),a++}this.hasAnchor=s,i===0?this.source=e:(o.push(e.substring(i,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=Fs.test(this.source):this.hasBackReferences=!1}clone(){return new yi(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(i=>e.substring(i.start,i.end));return sr.lastIndex=0,this.source.replace(sr,(i,o)=>fi(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=[],i=[],o,s,a,l;for(o=0,s=this.source.length;o<s;o++)a=this.source.charAt(o),e[o]=a,n[o]=a,r[o]=a,i[o]=a,a==="\\"&&o+1<s&&(l=this.source.charAt(o+1),l==="A"?(e[o+1]="",n[o+1]="",r[o+1]="A",i[o+1]="A"):l==="G"?(e[o+1]="",n[o+1]="G",r[o+1]="",i[o+1]="G"):(e[o+1]=l,n[o+1]=l,r[o+1]=l,i[o+1]=l),o++);return{A0_G0:e.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:i.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}},Xe=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 lr(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(i=>i.resolveAnchors(e,n));return new lr(t,r,this._items.map(i=>i.ruleId))}},lr=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(`
|
|
3
3
|
`)}findNextMatchSync(t,e,n){const r=this.scanner.findNextMatchSync(t,e,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},Gt=class{constructor(t,e){this.languageId=t,this.tokenType=e}},Us=class bn{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,n){this._defaultAttributes=new Gt(e,8),this._embeddedLanguagesMatcher=new Ws(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return e===null?bn._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}static _NULL_SCOPE_METADATA=new Gt(0,0);_getBasicScopeAttributes=new hi(e=>{const n=this._scopeToLanguage(e),r=this._toStandardTokenType(e);return new Gt(n,r)});_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const n=e.match(bn.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/},Ws=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])=>fi(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])}},cr=class{constructor(t,e){this.stack=t,this.stoppedEarly=e}};function wi(t,e,n,r,i,o,s,a){const l=e.content.length;let c=!1,u=-1;if(s){const p=zs(t,e,n,r,i,o);i=p.stack,r=p.linePos,n=p.isFirstLine,u=p.anchorPosition}const d=Date.now();for(;!c;){if(a!==0&&Date.now()-d>a)return new cr(i,!0);h()}return new cr(i,!1);function h(){const p=qs(t,e,n,r,i,u);if(!p){o.produce(i,l),c=!0;return}const m=p.captureIndices,v=p.matchedRuleId,y=m&&m.length>0?m[0].end>r:!1;if(v===Gs){const _=i.getRule(t);o.produce(i,m[0].start),i=i.withContentNameScopesList(i.nameScopesList),Ge(t,e,n,i,o,_.endCaptures,m),o.produce(i,m[0].end);const g=i;if(i=i.parent,u=g.getAnchorPos(),!y&&g.getEnterPos()===r){i=g,o.produce(i,l),c=!0;return}}else{const _=t.getRule(v);o.produce(i,m[0].start);const g=i,b=_.getName(e.content,m),w=i.contentNameScopesList.pushAttributed(b,t);if(i=i.push(v,r,u,m[0].end===l,null,w,w),_ instanceof _n){const C=_;Ge(t,e,n,i,o,C.beginCaptures,m),o.produce(i,m[0].end),u=m[0].end;const x=C.getContentName(e.content,m),A=w.pushAttributed(x,t);if(i=i.withContentNameScopesList(A),C.endHasBackReferences&&(i=i.withEndRule(C.getEndWithResolvedBackReferences(e.content,m))),!y&&g.hasSameRuleAs(i)){i=i.pop(),o.produce(i,l),c=!0;return}}else if(_ instanceof _t){const C=_;Ge(t,e,n,i,o,C.beginCaptures,m),o.produce(i,m[0].end),u=m[0].end;const x=C.getContentName(e.content,m),A=w.pushAttributed(x,t);if(i=i.withContentNameScopesList(A),C.whileHasBackReferences&&(i=i.withEndRule(C.getWhileWithResolvedBackReferences(e.content,m))),!y&&g.hasSameRuleAs(i)){i=i.pop(),o.produce(i,l),c=!0;return}}else if(Ge(t,e,n,i,o,_.captures,m),o.produce(i,m[0].end),i=i.pop(),!y){i=i.safePop(),o.produce(i,l),c=!0;return}}m[0].end>r&&(r=m[0].end,n=!1)}}function zs(t,e,n,r,i,o){let s=i.beginRuleCapturedEOL?0:-1;const a=[];for(let l=i;l;l=l.pop()){const c=l.getRule(t);c instanceof _t&&a.push({rule:c,stack:l})}for(let l=a.pop();l;l=a.pop()){const{ruleScanner:c,findOptions:u}=Qs(l.rule,t,l.stack.endRule,n,r===s),d=c.findNextMatchSync(e,r,u);if(d){if(d.ruleId!==bi){i=l.stack.pop();break}d.captureIndices&&d.captureIndices.length&&(o.produce(l.stack,d.captureIndices[0].start),Ge(t,e,n,l.stack,o,l.rule.whileCaptures,d.captureIndices),o.produce(l.stack,d.captureIndices[0].end),s=d.captureIndices[0].end,d.captureIndices[0].end>r&&(r=d.captureIndices[0].end,n=!1))}else{i=l.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:s,isFirstLine:n}}function qs(t,e,n,r,i,o){const s=Xs(t,e,n,r,i,o),a=t.getInjections();if(a.length===0)return s;const l=Ks(a,t,e,n,r,i,o);if(!l)return s;if(!s)return l;const c=s.captureIndices[0].start,u=l.captureIndices[0].start;return u<c||l.priorityMatch&&u===c?l:s}function Xs(t,e,n,r,i,o){const s=i.getRule(t),{ruleScanner:a,findOptions:l}=Ei(s,t,i.endRule,n,r===o),c=a.findNextMatchSync(e,r,l);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function Ks(t,e,n,r,i,o,s){let a=Number.MAX_VALUE,l=null,c,u=0;const d=o.contentNameScopesList.getScopeNames();for(let h=0,p=t.length;h<p;h++){const m=t[h];if(!m.matcher(d))continue;const v=e.getRule(m.ruleId),{ruleScanner:y,findOptions:_}=Ei(v,e,null,r,i===s),g=y.findNextMatchSync(n,i,_);if(!g)continue;const b=g.captureIndices[0].start;if(!(b>=a)&&(a=b,l=g.captureIndices,c=g.ruleId,u=m.priority,a===i))break}return l?{priorityMatch:u===-1,captureIndices:l,matchedRuleId:c}:null}function Ei(t,e,n,r,i){return{ruleScanner:t.compileAG(e,n,r,i),findOptions:0}}function Qs(t,e,n,r,i){return{ruleScanner:t.compileWhileAG(e,n,r,i),findOptions:0}}function Ge(t,e,n,r,i,o,s){if(o.length===0)return;const a=e.content,l=Math.min(o.length,s.length),c=[],u=s[0].end;for(let d=0;d<l;d++){const h=o[d];if(h===null)continue;const p=s[d];if(p.length===0)continue;if(p.start>u)break;for(;c.length>0&&c[c.length-1].endPos<=p.start;)i.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop();if(c.length>0?i.produceFromScopes(c[c.length-1].scopes,p.start):i.produce(r,p.start),h.retokenizeCapturedWithRuleId){const v=h.getName(a,s),y=r.contentNameScopesList.pushAttributed(v,t),_=h.getContentName(a,s),g=y.pushAttributed(_,t),b=r.push(h.retokenizeCapturedWithRuleId,p.start,-1,!1,null,y,g),w=t.createOnigString(a.substring(0,p.end));wi(t,w,n&&p.start===0,p.start,b,i,!1,0),gi(w);continue}const m=h.getName(a,s);if(m!==null){const y=(c.length>0?c[c.length-1].scopes:r.contentNameScopesList).pushAttributed(m,t);c.push(new Js(y,p.end))}}for(;c.length>0;)i.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop()}var Js=class{scopes;endPos;constructor(t,e){this.scopes=t,this.endPos=e}};function Ys(t,e,n,r,i,o,s,a){return new ea(t,e,n,r,i,o,s,a)}function ur(t,e,n,r,i){const o=mt(e,bt),s=vi.getCompiledRuleId(n,r,i.repository);for(const a of o)t.push({debugSelector:e,matcher:a.matcher,ruleId:s,grammar:i,priority:a.priority})}function bt(t,e){if(e.length<t.length)return!1;let n=0;return t.every(r=>{for(let i=n;i<e.length;i++)if(Zs(e[i],r))return n=i+1,!0;return!1})}function Zs(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 ea=class{constructor(t,e,n,r,i,o,s,a){if(this._rootScopeName=t,this.balancedBracketSelectors=o,this._onigLib=a,this._basicScopeAttributesProvider=new Us(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=s,this._grammar=dr(e,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const l of Object.keys(i)){const c=mt(l,bt);for(const u of c)this._tokenTypeMatchers.push({matcher:u.matcher,type:i[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:i=>i===this._rootScopeName?this._grammar:this.getExternalGrammar(i),injections:i=>this._grammarRepository.injections(i)},e=[],n=this._rootScopeName,r=t.lookup(n);if(r){const i=r.injections;if(i)for(let s in i)ur(e,s,i[s],this,r);const o=this._grammarRepository.injections(n);o&&o.forEach(s=>{const a=this.getExternalGrammar(s);if(a){const l=a.injectionSelector;l&&ur(e,l,a,this,a)}})}return e.sort((i,o)=>i.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]=dr(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=vi.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!e||e===vn.NULL){i=!0;const c=this._basicScopeAttributesProvider.getDefaultAttributes(),u=this.themeProvider.getDefaults(),d=Pe.set(0,c.languageId,c.tokenType,null,u.fontStyle,u.foregroundId,u.backgroundId),h=this.getRule(this._rootId).getName(null,null);let p;h?p=Be.createRootAndLookUpScopeName(h,d,this):p=Be.createRoot("unknown",d),e=new vn(null,this._rootId,-1,-1,!1,null,p,p)}else i=!1,e.reset();t=t+`
|
|
4
4
|
`;const o=this.createOnigString(t),s=o.content.length,a=new na(n,t,this._tokenTypeMatchers,this.balancedBracketSelectors),l=wi(this,o,i,0,e,a,!0,r);return gi(o),{lineLength:s,lineTokens:a,ruleStack:l.stack,stoppedEarly:l.stoppedEarly}}};function dr(t,e){return t=vs(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 Be=class oe{constructor(e,n,r){this.parent=e,this.scopePath=n,this.tokenAttributes=r}static fromExtension(e,n){let r=e,i=e?.scopePath??null;for(const o of n)i=Ft.push(i,o.scopeNames),r=new oe(r,i,o.encodedTokenAttributes);return r}static createRoot(e,n){return new oe(null,new Ft(null,e),n)}static createRootAndLookUpScopeName(e,n,r){const i=r.getMetadataForScope(e),o=new Ft(null,e),s=r.themeProvider.themeMatch(o),a=oe.mergeAttributes(n,i,s);return new oe(null,o,a)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return oe.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 i=-1,o=0,s=0;return r!==null&&(i=r.fontStyle,o=r.foregroundId,s=r.backgroundId),Pe.set(e,n.languageId,n.tokenType,null,i,o,s)}pushAttributed(e,n){if(e===null)return this;if(e.indexOf(" ")===-1)return oe._pushAttributed(this,e,n);const r=e.split(/ /g);let i=this;for(const o of r)i=oe._pushAttributed(i,o,n);return i}static _pushAttributed(e,n,r){const i=r.getMetadataForScope(n),o=e.scopePath.push(n),s=r.themeProvider.themeMatch(o),a=oe.mergeAttributes(e.tokenAttributes,i,s);return new oe(e,o,a)}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}},vn=class _e{constructor(e,n,r,i,o,s,a,l){this.parent=e,this.ruleId=n,this.beginRuleCapturedEOL=o,this.endRule=s,this.nameScopesList=a,this.contentNameScopesList=l,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=i}_stackElementBrand=void 0;static NULL=new _e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(e){return e===null?!1:_e._equals(this,e)}static _equals(e,n){return e===n?!0:this._structuralEquals(e,n)?Be.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(){_e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,n,r,i,o,s,a){return new _e(this,e,n,r,i,o,s,a)}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 _e(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=Be.fromExtension(e?.nameScopesList??null,n.nameScopesList);return new _e(e,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Be.fromExtension(r,n.contentNameScopesList))}},ta=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(t,e){this.balancedBracketScopes=t.flatMap(n=>n==="*"?(this.allowAny=!0,[]):mt(n,bt).map(r=>r.matcher)),this.unbalancedBracketScopes=e.flatMap(n=>mt(n,bt).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}},na=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,i=!1;if(this.balancedBracketSelectors?.matchesAlways&&(i=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const o=t?.getScopeNames()??[];for(const s of this._tokenTypeOverrides)s.matcher(o)&&(r=Pe.set(r,0,s.type,null,-1,0,0));this.balancedBracketSelectors&&(i=this.balancedBracketSelectors.match(o))}if(i&&(r=Pe.set(r,0,8,i,-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,i=this._binaryTokens.length;r<i;r++)n[r]=this._binaryTokens[r];return n}},ra=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,i){if(!this._grammars.has(t)){let o=this._rawGrammars.get(t);if(!o)return null;this._grammars.set(t,Ys(t,o,e,n,r,i,this,this._onigLib))}return this._grammars.get(t)}},ia=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new ra(pt.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,n){this._syncRegistry.setTheme(pt.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 ta(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,n,r,i,o){const s=new Ds(this._syncRegistry,e);for(;s.Q.length>0;)s.Q.map(a=>this._loadSingleGrammar(a.scopeName)),s.processQueue();return this._grammarForScopeName(e,n,r,i,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,i=null){return this._syncRegistry.addGrammar(e,n),this._grammarForScopeName(e.scopeName,r,i)}_grammarForScopeName(e,n=0,r=null,i=null,o=null){return this._syncRegistry.grammarForScopeName(e,n,r,i,o)}},yn=vn.NULL;const oa=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class Ye{constructor(e,n,r){this.normal=n,this.property=e,r&&(this.space=r)}}Ye.prototype.normal={};Ye.prototype.property={};Ye.prototype.space=void 0;function ki(t,e){const n={},r={};for(const i of t)Object.assign(n,i.property),Object.assign(r,i.normal);return new Ye(n,r,e)}function wn(t){return t.toLowerCase()}class z{constructor(e,n){this.attribute=n,this.property=e}}z.prototype.attribute="";z.prototype.booleanish=!1;z.prototype.boolean=!1;z.prototype.commaOrSpaceSeparated=!1;z.prototype.commaSeparated=!1;z.prototype.defined=!1;z.prototype.mustUseProperty=!1;z.prototype.number=!1;z.prototype.overloadedBoolean=!1;z.prototype.property="";z.prototype.spaceSeparated=!1;z.prototype.space=void 0;let sa=0;const L=ke(),D=ke(),En=ke(),k=ke(),I=ke(),Te=ke(),q=ke();function ke(){return 2**++sa}const kn=Object.freeze(Object.defineProperty({__proto__:null,boolean:L,booleanish:D,commaOrSpaceSeparated:q,commaSeparated:Te,number:k,overloadedBoolean:En,spaceSeparated:I},Symbol.toStringTag,{value:"Module"})),Bt=Object.keys(kn);class $n extends z{constructor(e,n,r,i){let o=-1;if(super(e,n),fr(this,"space",i),typeof r=="number")for(;++o<Bt.length;){const s=Bt[o];fr(this,Bt[o],(r&kn[s])===kn[s])}}}$n.prototype.defined=!0;function fr(t,e,n){n&&(t[e]=n)}function Ne(t){const e={},n={};for(const[r,i]of Object.entries(t.properties)){const o=new $n(r,t.transform(t.attributes||{},r),i,t.space);t.mustUseProperty&&t.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),e[r]=o,n[wn(r)]=r,n[wn(o.attribute)]=r}return new Ye(e,n,t.space)}const Ci=Ne({properties:{ariaActiveDescendant:null,ariaAtomic:D,ariaAutoComplete:null,ariaBusy:D,ariaChecked:D,ariaColCount:k,ariaColIndex:k,ariaColSpan:k,ariaControls:I,ariaCurrent:null,ariaDescribedBy:I,ariaDetails:null,ariaDisabled:D,ariaDropEffect:I,ariaErrorMessage:null,ariaExpanded:D,ariaFlowTo:I,ariaGrabbed:D,ariaHasPopup:null,ariaHidden:D,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:I,ariaLevel:k,ariaLive:null,ariaModal:D,ariaMultiLine:D,ariaMultiSelectable:D,ariaOrientation:null,ariaOwns:I,ariaPlaceholder:null,ariaPosInSet:k,ariaPressed:D,ariaReadOnly:D,ariaRelevant:null,ariaRequired:D,ariaRoleDescription:I,ariaRowCount:k,ariaRowIndex:k,ariaRowSpan:k,ariaSelected:D,ariaSetSize:k,ariaSort:null,ariaValueMax:k,ariaValueMin:k,ariaValueNow:k,ariaValueText:null,role:null},transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function xi(t,e){return e in t?t[e]:e}function Si(t,e){return xi(t,e.toLowerCase())}const aa=Ne({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Te,acceptCharset:I,accessKey:I,action:null,allow:null,allowFullScreen:L,allowPaymentRequest:L,allowUserMedia:L,alt:null,as:null,async:L,autoCapitalize:null,autoComplete:I,autoFocus:L,autoPlay:L,blocking:I,capture:null,charSet:null,checked:L,cite:null,className:I,cols:k,colSpan:null,content:null,contentEditable:D,controls:L,controlsList:I,coords:k|Te,crossOrigin:null,data:null,dateTime:null,decoding:null,default:L,defer:L,dir:null,dirName:null,disabled:L,download:En,draggable:D,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:L,formTarget:null,headers:I,height:k,hidden:En,high:k,href:null,hrefLang:null,htmlFor:I,httpEquiv:I,id:null,imageSizes:null,imageSrcSet:null,inert:L,inputMode:null,integrity:null,is:null,isMap:L,itemId:null,itemProp:I,itemRef:I,itemScope:L,itemType:I,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:L,low:k,manifest:null,max:null,maxLength:k,media:null,method:null,min:null,minLength:k,multiple:L,muted:L,name:null,nonce:null,noModule:L,noValidate:L,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:L,optimum:k,pattern:null,ping:I,placeholder:null,playsInline:L,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:L,referrerPolicy:null,rel:I,required:L,reversed:L,rows:k,rowSpan:k,sandbox:I,scope:null,scoped:L,seamless:L,selected:L,shadowRootClonable:L,shadowRootDelegatesFocus:L,shadowRootMode:null,shape:null,size:k,sizes:null,slot:null,span:k,spellCheck:D,src:null,srcDoc:null,srcLang:null,srcSet:null,start:k,step:null,style:null,tabIndex:k,target:null,title:null,translate:null,type:null,typeMustMatch:L,useMap:null,value:D,width:k,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:I,axis:null,background:null,bgColor:null,border:k,borderColor:null,bottomMargin:k,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:L,declare:L,event:null,face:null,frame:null,frameBorder:null,hSpace:k,leftMargin:k,link:null,longDesc:null,lowSrc:null,marginHeight:k,marginWidth:k,noResize:L,noHref:L,noShade:L,noWrap:L,object:null,profile:null,prompt:null,rev:null,rightMargin:k,rules:null,scheme:null,scrolling:D,standby:null,summary:null,text:null,topMargin:k,valueType:null,version:null,vAlign:null,vLink:null,vSpace:k,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:L,disableRemotePlayback:L,prefix:null,property:null,results:k,security:null,unselectable:null},space:"html",transform:Si}),la=Ne({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",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:q,accentHeight:k,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:k,amplitude:k,arabicForm:null,ascent:k,attributeName:null,attributeType:null,azimuth:k,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:k,by:null,calcMode:null,capHeight:k,className:I,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:k,diffuseConstant:k,direction:null,display:null,dur:null,divisor:k,dominantBaseline:null,download:L,dx:null,dy:null,edgeMode:null,editable:null,elevation:k,enableBackground:null,end:null,event:null,exponent:k,externalResourcesRequired:null,fill:null,fillOpacity:k,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:Te,g2:Te,glyphName:Te,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:k,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:k,horizOriginX:k,horizOriginY:k,id:null,ideographic:k,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:k,k,k1:k,k2:k,k3:k,k4:k,kernelMatrix:q,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:k,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:k,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:k,overlineThickness:k,paintOrder:null,panose1:null,path:null,pathLength:k,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:I,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:k,pointsAtY:k,pointsAtZ:k,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:q,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:q,rev:q,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:q,requiredFeatures:q,requiredFonts:q,requiredFormats:q,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:k,specularExponent:k,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:k,strikethroughThickness:k,string:null,stroke:null,strokeDashArray:q,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:k,strokeOpacity:k,strokeWidth:null,style:null,surfaceScale:k,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:q,tabIndex:k,tableValues:null,target:null,targetX:k,targetY:k,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:q,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:k,underlineThickness:k,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:k,values:null,vAlphabetic:k,vMathematical:k,vectorEffect:null,vHanging:k,vIdeographic:k,version:null,vertAdvY:k,vertOriginX:k,vertOriginY:k,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:k,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:xi}),Li=Ne({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()}}),Ai=Ne({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Si}),Ri=Ne({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()}}),ca=/[A-Z]/g,hr=/-[a-z]/g,ua=/^data[-\w.:]+$/i;function da(t,e){const n=wn(e);let r=e,i=z;if(n in t.normal)return t.property[t.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&ua.test(e)){if(e.charAt(4)==="-"){const o=e.slice(5).replace(hr,ha);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=e.slice(4);if(!hr.test(o)){let s=o.replace(ca,fa);s.charAt(0)!=="-"&&(s="-"+s),e="data"+s}}i=$n}return new i(r,e)}function fa(t){return"-"+t.toLowerCase()}function ha(t){return t.charAt(1).toUpperCase()}const pa=ki([Ci,aa,Li,Ai,Ri],"html"),Ti=ki([Ci,la,Li,Ai,Ri],"svg"),pr={}.hasOwnProperty;function ma(t,e){const n=e||{};function r(i,...o){let s=r.invalid;const a=r.handlers;if(i&&pr.call(i,t)){const l=String(i[t]);s=pr.call(a,l)?a[l]:r.unknown}if(s)return s.call(this,i,...o)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const ga=/["&'<>`]/g,_a=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,ba=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,va=/[|\\{}()[\]^$+*?.]/g,mr=new WeakMap;function ya(t,e){if(t=t.replace(e.subset?wa(e.subset):ga,r),e.subset||e.escapeOnly)return t;return t.replace(_a,n).replace(ba,r);function n(i,o,s){return e.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,s.charCodeAt(o+2),e)}function r(i,o,s){return e.format(i.charCodeAt(0),s.charCodeAt(o+1),e)}}function wa(t){let e=mr.get(t);return e||(e=Ea(t),mr.set(t,e)),e}function Ea(t){const e=[];let n=-1;for(;++n<t.length;)e.push(t[n].replace(va,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}const ka=/[\dA-Fa-f]/;function Ca(t,e,n){const r="&#x"+t.toString(16).toUpperCase();return n&&e&&!ka.test(String.fromCharCode(e))?r:r+";"}const xa=/\d/;function Sa(t,e,n){const r="&#"+String(t);return n&&e&&!xa.test(String.fromCharCode(e))?r:r+";"}const La=["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"],Ht={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:"€"},Aa=["cent","copy","divide","gt","lt","not","para","times"],Ii={}.hasOwnProperty,Cn={};let nt;for(nt in Ht)Ii.call(Ht,nt)&&(Cn[Ht[nt]]=nt);const Ra=/[^\dA-Za-z]/;function Ta(t,e,n,r){const i=String.fromCharCode(t);if(Ii.call(Cn,i)){const o=Cn[i],s="&"+o;return n&&La.includes(o)&&!Aa.includes(o)&&(!r||e&&e!==61&&Ra.test(String.fromCharCode(e)))?s:s+";"}return""}function Ia(t,e,n){let r=Ca(t,e,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=Ta(t,e,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){const o=Sa(t,e,n.omitOptionalSemicolons);o.length<r.length&&(r=o)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function Ie(t,e){return ya(t,Object.assign({format:Ia},e))}const Pa=/^>|^->|<!--|-->|--!>|<!-$/g,Da=[">"],Na=["<",">"];function Oa(t,e,n,r){return r.settings.bogusComments?"<?"+Ie(t.value,Object.assign({},r.settings.characterReferences,{subset:Da}))+">":"<!--"+t.value.replace(Pa,i)+"-->";function i(o){return Ie(o,Object.assign({},r.settings.characterReferences,{subset:Na}))}}function Ma(t,e,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function gr(t,e){const n=String(t);if(typeof e!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(e);for(;i!==-1;)r++,i=n.indexOf(e,i+e.length);return r}function $a(t,e){const n=e||{};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function Va(t){return t.join(" ").trim()}const ja=/[ \t\n\f\r]/g;function Vn(t){return typeof t=="object"?t.type==="text"?_r(t.value):!1:_r(t)}function _r(t){return t.replace(ja,"")===""}const $=Di(1),Pi=Di(-1),Fa=[];function Di(t){return e;function e(n,r,i){const o=n?n.children:Fa;let s=(r||0)+t,a=o[s];if(!i)for(;a&&Vn(a);)s+=t,a=o[s];return a}}const Ga={}.hasOwnProperty;function Ni(t){return e;function e(n,r,i){return Ga.call(t,n.tagName)&&t[n.tagName](n,r,i)}}const jn=Ni({body:Ha,caption:Ut,colgroup:Ut,dd:qa,dt:za,head:Ut,html:Ba,li:Wa,optgroup:Xa,option:Ka,p:Ua,rp:br,rt:br,tbody:Ja,td:vr,tfoot:Ya,th:vr,thead:Qa,tr:Za});function Ut(t,e,n){const r=$(n,e,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&Vn(r.value.charAt(0)))}function Ba(t,e,n){const r=$(n,e);return!r||r.type!=="comment"}function Ha(t,e,n){const r=$(n,e);return!r||r.type!=="comment"}function Ua(t,e,n){const r=$(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 Wa(t,e,n){const r=$(n,e);return!r||r.type==="element"&&r.tagName==="li"}function za(t,e,n){const r=$(n,e);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function qa(t,e,n){const r=$(n,e);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function br(t,e,n){const r=$(n,e);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function Xa(t,e,n){const r=$(n,e);return!r||r.type==="element"&&r.tagName==="optgroup"}function Ka(t,e,n){const r=$(n,e);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function Qa(t,e,n){const r=$(n,e);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function Ja(t,e,n){const r=$(n,e);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function Ya(t,e,n){return!$(n,e)}function Za(t,e,n){const r=$(n,e);return!r||r.type==="element"&&r.tagName==="tr"}function vr(t,e,n){const r=$(n,e);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const el=Ni({body:rl,colgroup:il,head:nl,html:tl,tbody:ol});function tl(t){const e=$(t,-1);return!e||e.type!=="comment"}function nl(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 rl(t){const e=$(t,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&Vn(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function il(t,e,n){const r=Pi(n,e),i=$(t,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&jn(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function ol(t,e,n){const r=Pi(n,e),i=$(t,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&jn(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const rt={name:[[`
|
|
5
5
|
\f\r &/=>`.split(""),`
|
|
@@ -1297,5 +1297,5 @@ XID_Start XIDS`.split(/\s/).map(t=>[Dt(t),t])),Du=new Map([["s",M(383)],[M(383),
|
|
|
1297
1297
|
[data-line-type='context-expanded'] [data-column-content] *::selection {
|
|
1298
1298
|
background: var(--diffs-bg-selection);
|
|
1299
1299
|
}
|
|
1300
|
-
`,Ao={foreground:"var(--base05)",background:"var(--base00)","token-link":"var(--base0D)","token-string":"var(--base0B)","token-comment":"var(--base03)","token-constant":"var(--base08)","token-keyword":"var(--base0A)","token-parameter":"var(--base08)","token-function":"var(--base0D)","token-string-expression":"var(--base0C)","token-punctuation":"var(--base0E)","token-inserted":"var(--diff-color-added)","token-deleted":"var(--diff-color-deleted)","token-changed":"var(--diff-color-modified)","ansi-green":"var(--diff-color-added)","ansi-red":"var(--diff-color-deleted)","ansi-blue":"var(--diff-color-modified)"};xo(So,Ao);xo(Lo,Ao);function Tf(t){return`${t.prevName??""}::${t.name}`}function If(t){return t.prevName&&t.prevName!==t.name?`${t.prevName} -> ${t.name}`:t.name}function Ro(t){switch(t.type){case"new":return"added";case"deleted":return"deleted";case"rename-pure":case"rename-changed":return"renamed";default:return"changed"}}function Pf(t){switch(Ro(t)){case"added":return"Added";case"deleted":return"Deleted";case"renamed":return"Renamed";default:return"Modified"}}function Df(t){switch(Ro(t)){case"added":return"text-[var(--diff-color-added)]";case"deleted":return"text-[var(--diff-color-deleted)]";case"renamed":return"text-[var(--diff-color-renamed)]";case"changed":default:return"text-[var(--diff-color-modified)]"}}function Nf(t){return t.hunks.reduce((e,n)=>({added:e.added+n.additionCount,deleted:e.deleted+n.deletionCount}),{added:0,deleted:0})}function ni(t){return!t||t==="/dev/null"?void 0:t.replace(/^["']|["']$/g,"").replace(/^[ab]\//,"")}function Of(t){return{app1Path:ni(t.prevName??t.name),app2Path:ni(t.name??t.prevName)}}function Mf(t){const e=t.hunks[0];return{app1Line:e?.deletionStart||e?.splitLineStart||1,app2Line:e?.additionStart||e?.splitLineStart||1}}function $f({fileDiff:t,app1Name:e,app2Name:n}){if(!e||!n)return null;const{app1Path:r,app2Path:i}=Of(t);if(!r||!i)return null;const{app1Line:o,app2Line:s}=Mf(t),a="bg-background/80 border-border/80 hover:bg-background inline-flex h-6 cursor-pointer items-center justify-center rounded border",l=ft(a,"w-11 px-1.5 font-mono text-[10px] leading-none uppercase"),c=ft(a,"text-foreground w-6");return E.jsxs("div",{className:"flex items-center gap-1",onClick:u=>u.stopPropagation(),onPointerDown:u=>u.stopPropagation(),children:[E.jsx(et,{appFile:`${r},${o},1`,appName:e,className:l,children:"App 1"}),E.jsxs("div",{className:"display-alt-down flex items-center gap-1",children:[E.jsx(et,{appFile:r,appName:e,syncTo:{appFile:i,appName:n},className:c,children:E.jsx(te,{name:"ArrowLeft",title:"Copy app 2 file to app 1"})}),E.jsx(et,{appFile:i,appName:n,syncTo:{appFile:r,appName:e},className:c,children:E.jsx(te,{name:"ArrowRight",title:"Copy app 1 file to app 2"})})]}),E.jsx(et,{appFile:`${i},${s},1`,appName:n,className:l,children:"App 2"})]})}function Vf({app1:t,app2:e}){const n=is(),r=n.find(o=>o.name===t),i=n.find(o=>o.name===e);return ss({watchPaths:[r?.fullPath,i?.fullPath].filter(Boolean)}),null}function ih({userHasAccessPromise:t,diff:e,allApps:n}){return E.jsx(To,{fallbackRender:()=>E.jsx("div",{className:"w-full p-12",children:E.jsxs("div",{className:"flex w-full flex-col gap-4 text-center",children:[E.jsx("p",{className:"text-2xl font-bold",children:"Error"}),E.jsx("p",{className:"text-lg",children:"There was an error loading the user access."})]})}),children:E.jsx(re.Suspense,{fallback:E.jsx("div",{className:"flex items-center justify-center p-8",children:E.jsx(dn,{content:"Loading user access",children:E.jsx(te,{name:"Refresh",className:"animate-spin"})})}),children:E.jsx(oi,{resolve:t,children:r=>r?E.jsx(jf,{diff:e,allApps:n}):E.jsxs("div",{className:"w-full p-12",children:[E.jsxs("div",{className:"flex w-full flex-col gap-4 text-center",children:[E.jsx("p",{className:"text-2xl font-bold",children:"Access Denied"}),E.jsx("p",{className:"text-lg",children:"You must login or register for the workshop to view the diff."})]}),E.jsx("div",{className:"h-16"}),E.jsx("p",{className:"pb-4",children:"Check out this video to see how the diff tab works."}),E.jsx(os,{url:"https://www.epicweb.dev/tips/epic-workshop-diff-tab-demo"})]})})})})}function jf({diff:t,allApps:e}){const n=Yo(),[r]=Zo(),i=new URLSearchParams(r);i.set("forceFresh","diff");const o=es(),s=Jo.useSpinDelay(o.state!=="idle",{delay:0,minDuration:1e3}),[a,l]=Mo.useState([]),c=rs(),u={theme:{light:So,dark:Lo},themeType:c,diffStyle:"unified",hunkSeparators:"line-info",overflow:"scroll",disableFileHeader:!0,unsafeCSS:Rf},d=[];for(const[h,p]of r.entries())h==="app1"||h==="app2"||d.push(E.jsx("input",{type:"hidden",name:h,value:p},h));return E.jsx(re.Suspense,{fallback:E.jsx("div",{className:"flex items-center justify-center p-8",children:E.jsx(dn,{content:"Loading diff",children:E.jsx(te,{name:"Refresh",className:"animate-spin"})})}),children:E.jsx(oi,{resolve:t,errorElement:E.jsx("p",{className:"text-foreground-destructive p-6",children:"There was an error calculating the diff. Sorry."}),children:h=>{let p=[],m=!1;if(h.diffPatch)try{p=Co(h.diffPatch).flatMap(v=>v.files)}catch{m=!0}return E.jsxs("div",{className:"flex h-full w-full flex-col",children:[E.jsxs("div",{className:"flex h-14 min-h-14 w-full overflow-x-hidden border-b",children:[E.jsx("div",{className:"border-r",children:E.jsx(dn,{content:"Reload diff",children:E.jsx(ts,{to:`.?${i}`,className:"flex h-full w-14 items-center justify-center",children:E.jsx(te,{name:"Refresh",className:ft({"animate-spin":s})})})})}),E.jsxs(ns,{onChange:v=>n(v.currentTarget),className:"scrollbar-thin scrollbar-thumb-scrollbar flex h-full flex-1 items-center overflow-x-auto",children:[d,E.jsx(ri,{name:"app1",label:"App 1",className:"border-r",allApps:e,defaultValue:h.app1}),E.jsx(ri,{name:"app2",label:"App 2",allApps:e,defaultValue:h.app2})]},`${h.app1}${h.app2}`)]}),E.jsx("div",{className:"scrollbar-thin scrollbar-thumb-scrollbar grow overflow-y-scroll",children:m?E.jsx("p",{className:"bg-foreground text-background m-5 inline-flex items-center justify-center px-1 py-0.5 font-mono text-sm uppercase",children:"There was a problem rendering the diff"}):p.length?E.jsx(Io,{type:"multiple",value:a,onValueChange:l,className:"w-full",children:p.map((v,y)=>{const _=Tf(v),g=Nf(v);return E.jsxs(Po,{value:_,children:[E.jsxs(Do,{className:"bg-background/95 hover:bg-background/90 supports-[backdrop-filter]:bg-background/80 supports-[backdrop-filter]:hover:bg-background/70 border-border/70 relative sticky top-0 z-10 flex w-full items-center gap-3 border-b px-4 py-2 backdrop-blur",children:[E.jsxs(No,{className:"group flex min-w-0 flex-1 items-center justify-between gap-3 pr-38 text-left",children:[E.jsxs("span",{className:"flex min-w-0 items-center gap-2 font-mono text-sm",children:[E.jsx(te,{name:Pf(v),className:ft("shrink-0",Df(v))}),E.jsx("span",{className:"truncate",children:If(v)})]}),E.jsxs("span",{className:"text-muted-foreground flex shrink-0 items-center gap-2 font-mono text-xs",children:[E.jsxs("span",{className:"text-(--diff-color-deleted)",children:["-",g.deleted]}),E.jsxs("span",{className:"text-(--diff-color-added)",children:["+",g.added]}),E.jsx(te,{name:"TriangleDownSmall",className:"group-radix-state-open:rotate-180 transition","aria-hidden":!0})]})]}),E.jsx("div",{className:"absolute top-1/2 right-4 -translate-y-1/2",children:E.jsx($f,{fileDiff:v,app1Name:h.app1,app2Name:h.app2})})]}),E.jsx(Oo,{className:"radix-state-closed:hidden border-b",children:E.jsx(Af,{fileDiff:v,options:u})})]},`${_}:${y}`)})}):h.diffPatch===""?E.jsx("p",{className:"bg-foreground text-background m-5 inline-flex items-center justify-center px-1 py-0.5 font-mono text-sm uppercase",children:"No changes"}):h.app1&&h.app2?E.jsx("p",{className:"bg-foreground text-background m-5 inline-flex items-center justify-center px-1 py-0.5 font-mono text-sm uppercase",children:"There was a problem generating the diff"}):E.jsx("p",{className:"bg-foreground text-background m-5 inline-flex items-center justify-center px-1 py-0.5 font-mono text-sm uppercase",children:"Select two apps to compare"})}),E.jsx(Vf,{app1:h.app1,app2:h.app2})]})}})})}function ri({name:t,label:e,className:n,allApps:r,defaultValue:i}){return E.jsxs($o,{name:t,defaultValue:i,children:[E.jsxs(Vo,{className:ii("radix-placeholder:text-muted-foreground flex h-full w-full max-w-[50%] items-center justify-between px-3 text-left focus-visible:outline-none",n),"aria-label":`Select ${e} for git Diff`,children:[E.jsxs("span",{className:"truncate",children:[e,":"," ",E.jsx(jo,{placeholder:`Select ${e}`,className:"inline-block w-40 truncate"})]}),E.jsx(Fo,{className:"",children:E.jsx(te,{name:"TriangleDownSmall"})})]}),E.jsx(Go,{children:E.jsxs(Bo,{position:"popper",align:"start",className:"bg-popover text-popover-foreground z-20 max-h-[50vh] lg:max-h-[70vh]",children:[E.jsx(Ho,{className:"flex h-5 cursor-default items-center justify-center",children:E.jsx(te,{name:"ChevronUp"})}),E.jsx(Uo,{className:"p-3",children:E.jsxs(Wo,{children:[E.jsx(zo,{className:"px-5 pb-3 font-mono uppercase",children:e}),r.map(o=>E.jsx(Ff,{value:o.name,children:o.displayName},o.name))]})}),E.jsx(qo,{className:"flex h-5 cursor-default items-center justify-center",children:E.jsx(te,{name:"ChevronDown"})})]})})]})}const Ff=({ref:t,children:e,className:n,...r})=>E.jsxs(Xo,{className:ii("radix-disabled:text-muted-foreground radix-highlighted:opacity-100 radix-highlighted:outline-none radix-state-checked:opacity-100 relative flex cursor-pointer items-center rounded px-10 py-2 leading-none opacity-80 select-none",n),...r,ref:t,children:[E.jsx(Ko,{children:e}),E.jsx(Qo,{className:"absolute left-0 inline-flex w-[25px] items-center justify-center",children:E.jsx(te,{name:"CheckSmall"})})]});export{ih as U};
|
|
1301
|
-
//# sourceMappingURL=diff-
|
|
1300
|
+
`,Ao={foreground:"var(--base05)",background:"var(--base00)","token-link":"var(--base0D)","token-string":"var(--base0B)","token-comment":"var(--base03)","token-constant":"var(--base08)","token-keyword":"var(--base0A)","token-parameter":"var(--base08)","token-function":"var(--base0D)","token-string-expression":"var(--base0C)","token-punctuation":"var(--base0E)","token-inserted":"var(--diff-color-added)","token-deleted":"var(--diff-color-deleted)","token-changed":"var(--diff-color-modified)","ansi-green":"var(--diff-color-added)","ansi-red":"var(--diff-color-deleted)","ansi-blue":"var(--diff-color-modified)"};xo(So,Ao);xo(Lo,Ao);function Tf(t){return`${t.prevName??""}::${t.name}`}function If(t){return t.prevName&&t.prevName!==t.name?`${t.prevName} -> ${t.name}`:t.name}function Ro(t){switch(t.type){case"new":return"added";case"deleted":return"deleted";case"rename-pure":case"rename-changed":return"renamed";default:return"changed"}}function Pf(t){switch(Ro(t)){case"added":return"Added";case"deleted":return"Deleted";case"renamed":return"Renamed";default:return"Modified"}}function Df(t){switch(Ro(t)){case"added":return"text-[var(--diff-color-added)]";case"deleted":return"text-[var(--diff-color-deleted)]";case"renamed":return"text-[var(--diff-color-renamed)]";case"changed":default:return"text-[var(--diff-color-modified)]"}}function Nf(t){return t.hunks.reduce((e,n)=>({added:e.added+n.additionCount,deleted:e.deleted+n.deletionCount}),{added:0,deleted:0})}function ni(t){return!t||t==="/dev/null"?void 0:t.replace(/^["']|["']$/g,"").replace(/^[ab]\//,"")}function Of(t){return{app1Path:ni(t.prevName??t.name),app2Path:ni(t.name??t.prevName)}}function Mf(t){const e=t.hunks[0];return{app1Line:e?.deletionStart||e?.splitLineStart||1,app2Line:e?.additionStart||e?.splitLineStart||1}}function $f({fileDiff:t,app1Name:e,app2Name:n}){if(!e||!n)return null;const{app1Path:r,app2Path:i}=Of(t);if(!r||!i)return null;const{app1Line:o,app2Line:s}=Mf(t),a="bg-background/80 border-border/80 hover:bg-background inline-flex h-6 cursor-pointer items-center justify-center rounded border",l=ft(a,"w-11 px-1.5 font-mono text-[10px] leading-none uppercase"),c=ft(a,"text-foreground w-6");return E.jsxs("div",{className:"flex items-center gap-1",onClick:u=>u.stopPropagation(),onPointerDown:u=>u.stopPropagation(),children:[E.jsx(et,{appFile:`${r},${o},1`,appName:e,className:l,children:"App 1"}),E.jsxs("div",{className:"display-alt-down flex items-center gap-1",children:[E.jsx(et,{appFile:r,appName:e,syncTo:{appFile:i,appName:n},className:c,children:E.jsx(te,{name:"ArrowLeft",title:"Copy app 2 file to app 1 (Option+Command to sync without opening)"})}),E.jsx(et,{appFile:i,appName:n,syncTo:{appFile:r,appName:e},className:c,children:E.jsx(te,{name:"ArrowRight",title:"Copy app 1 file to app 2 (Option+Command to sync without opening)"})})]}),E.jsx(et,{appFile:`${i},${s},1`,appName:n,className:l,children:"App 2"})]})}function Vf({app1:t,app2:e}){const n=is(),r=n.find(o=>o.name===t),i=n.find(o=>o.name===e);return ss({watchPaths:[r?.fullPath,i?.fullPath].filter(Boolean)}),null}function ih({userHasAccessPromise:t,diff:e,allApps:n}){return E.jsx(To,{fallbackRender:()=>E.jsx("div",{className:"w-full p-12",children:E.jsxs("div",{className:"flex w-full flex-col gap-4 text-center",children:[E.jsx("p",{className:"text-2xl font-bold",children:"Error"}),E.jsx("p",{className:"text-lg",children:"There was an error loading the user access."})]})}),children:E.jsx(re.Suspense,{fallback:E.jsx("div",{className:"flex items-center justify-center p-8",children:E.jsx(dn,{content:"Loading user access",children:E.jsx(te,{name:"Refresh",className:"animate-spin"})})}),children:E.jsx(oi,{resolve:t,children:r=>r?E.jsx(jf,{diff:e,allApps:n}):E.jsxs("div",{className:"w-full p-12",children:[E.jsxs("div",{className:"flex w-full flex-col gap-4 text-center",children:[E.jsx("p",{className:"text-2xl font-bold",children:"Access Denied"}),E.jsx("p",{className:"text-lg",children:"You must login or register for the workshop to view the diff."})]}),E.jsx("div",{className:"h-16"}),E.jsx("p",{className:"pb-4",children:"Check out this video to see how the diff tab works."}),E.jsx(os,{url:"https://www.epicweb.dev/tips/epic-workshop-diff-tab-demo"})]})})})})}function jf({diff:t,allApps:e}){const n=Yo(),[r]=Zo(),i=new URLSearchParams(r);i.set("forceFresh","diff");const o=es(),s=Jo.useSpinDelay(o.state!=="idle",{delay:0,minDuration:1e3}),[a,l]=Mo.useState([]),c=rs(),u={theme:{light:So,dark:Lo},themeType:c,diffStyle:"unified",hunkSeparators:"line-info",overflow:"scroll",disableFileHeader:!0,unsafeCSS:Rf},d=[];for(const[h,p]of r.entries())h==="app1"||h==="app2"||d.push(E.jsx("input",{type:"hidden",name:h,value:p},h));return E.jsx(re.Suspense,{fallback:E.jsx("div",{className:"flex items-center justify-center p-8",children:E.jsx(dn,{content:"Loading diff",children:E.jsx(te,{name:"Refresh",className:"animate-spin"})})}),children:E.jsx(oi,{resolve:t,errorElement:E.jsx("p",{className:"text-foreground-destructive p-6",children:"There was an error calculating the diff. Sorry."}),children:h=>{let p=[],m=!1;if(h.diffPatch)try{p=Co(h.diffPatch).flatMap(v=>v.files)}catch{m=!0}return E.jsxs("div",{className:"flex h-full w-full flex-col",children:[E.jsxs("div",{className:"flex h-14 min-h-14 w-full overflow-x-hidden border-b",children:[E.jsx("div",{className:"border-r",children:E.jsx(dn,{content:"Reload diff",children:E.jsx(ts,{to:`.?${i}`,className:"flex h-full w-14 items-center justify-center",children:E.jsx(te,{name:"Refresh",className:ft({"animate-spin":s})})})})}),E.jsxs(ns,{onChange:v=>n(v.currentTarget),className:"scrollbar-thin scrollbar-thumb-scrollbar flex h-full flex-1 items-center overflow-x-auto",children:[d,E.jsx(ri,{name:"app1",label:"App 1",className:"border-r",allApps:e,defaultValue:h.app1}),E.jsx(ri,{name:"app2",label:"App 2",allApps:e,defaultValue:h.app2})]},`${h.app1}${h.app2}`)]}),E.jsx("div",{className:"scrollbar-thin scrollbar-thumb-scrollbar grow overflow-y-scroll",children:m?E.jsx("p",{className:"bg-foreground text-background m-5 inline-flex items-center justify-center px-1 py-0.5 font-mono text-sm uppercase",children:"There was a problem rendering the diff"}):p.length?E.jsx(Io,{type:"multiple",value:a,onValueChange:l,className:"w-full",children:p.map((v,y)=>{const _=Tf(v),g=Nf(v);return E.jsxs(Po,{value:_,children:[E.jsxs(Do,{className:"bg-background/95 hover:bg-background/90 supports-[backdrop-filter]:bg-background/80 supports-[backdrop-filter]:hover:bg-background/70 border-border/70 relative sticky top-0 z-10 flex w-full items-center gap-3 border-b px-4 py-2 backdrop-blur",children:[E.jsxs(No,{className:"group flex min-w-0 flex-1 items-center justify-between gap-3 pr-38 text-left",children:[E.jsxs("span",{className:"flex min-w-0 items-center gap-2 font-mono text-sm",children:[E.jsx(te,{name:Pf(v),className:ft("shrink-0",Df(v))}),E.jsx("span",{className:"truncate",children:If(v)})]}),E.jsxs("span",{className:"text-muted-foreground flex shrink-0 items-center gap-2 font-mono text-xs",children:[E.jsxs("span",{className:"text-(--diff-color-deleted)",children:["-",g.deleted]}),E.jsxs("span",{className:"text-(--diff-color-added)",children:["+",g.added]}),E.jsx(te,{name:"TriangleDownSmall",className:"group-radix-state-open:rotate-180 transition","aria-hidden":!0})]})]}),E.jsx("div",{className:"absolute top-1/2 right-4 -translate-y-1/2",children:E.jsx($f,{fileDiff:v,app1Name:h.app1,app2Name:h.app2})})]}),E.jsx(Oo,{className:"radix-state-closed:hidden border-b",children:E.jsx(Af,{fileDiff:v,options:u})})]},`${_}:${y}`)})}):h.diffPatch===""?E.jsx("p",{className:"bg-foreground text-background m-5 inline-flex items-center justify-center px-1 py-0.5 font-mono text-sm uppercase",children:"No changes"}):h.app1&&h.app2?E.jsx("p",{className:"bg-foreground text-background m-5 inline-flex items-center justify-center px-1 py-0.5 font-mono text-sm uppercase",children:"There was a problem generating the diff"}):E.jsx("p",{className:"bg-foreground text-background m-5 inline-flex items-center justify-center px-1 py-0.5 font-mono text-sm uppercase",children:"Select two apps to compare"})}),E.jsx(Vf,{app1:h.app1,app2:h.app2})]})}})})}function ri({name:t,label:e,className:n,allApps:r,defaultValue:i}){return E.jsxs($o,{name:t,defaultValue:i,children:[E.jsxs(Vo,{className:ii("radix-placeholder:text-muted-foreground flex h-full w-full max-w-[50%] items-center justify-between px-3 text-left focus-visible:outline-none",n),"aria-label":`Select ${e} for git Diff`,children:[E.jsxs("span",{className:"truncate",children:[e,":"," ",E.jsx(jo,{placeholder:`Select ${e}`,className:"inline-block w-40 truncate"})]}),E.jsx(Fo,{className:"",children:E.jsx(te,{name:"TriangleDownSmall"})})]}),E.jsx(Go,{children:E.jsxs(Bo,{position:"popper",align:"start",className:"bg-popover text-popover-foreground z-20 max-h-[50vh] lg:max-h-[70vh]",children:[E.jsx(Ho,{className:"flex h-5 cursor-default items-center justify-center",children:E.jsx(te,{name:"ChevronUp"})}),E.jsx(Uo,{className:"p-3",children:E.jsxs(Wo,{children:[E.jsx(zo,{className:"px-5 pb-3 font-mono uppercase",children:e}),r.map(o=>E.jsx(Ff,{value:o.name,children:o.displayName},o.name))]})}),E.jsx(qo,{className:"flex h-5 cursor-default items-center justify-center",children:E.jsx(te,{name:"ChevronDown"})})]})})]})}const Ff=({ref:t,children:e,className:n,...r})=>E.jsxs(Xo,{className:ii("radix-disabled:text-muted-foreground radix-highlighted:opacity-100 radix-highlighted:outline-none radix-state-checked:opacity-100 relative flex cursor-pointer items-center rounded px-10 py-2 leading-none opacity-80 select-none",n),...r,ref:t,children:[E.jsx(Ko,{children:e}),E.jsx(Qo,{className:"absolute left-0 inline-flex w-[25px] items-center justify-center",children:E.jsx(te,{name:"CheckSmall"})})]});export{ih as U};
|
|
1301
|
+
//# sourceMappingURL=diff-C4LoXlDb.js.map
|