fumapress 0.1.21 → 0.1.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/cli/index.mjs +1 -1
- package/dist/waku/public/assets/Icon-DLjCXBap.js +1 -0
- package/dist/waku/public/assets/{Icon-D30p-2dq.js → Icon-uimJ5tpe.js} +1 -1
- package/dist/waku/public/assets/_root-BWpoCRFY.css +1 -0
- package/dist/waku/public/assets/{_root-BWh8XBln.js → _root-DcSLRIv8.js} +2 -2
- package/dist/waku/public/assets/{algolia-B1uhfuD6.js → algolia-akct_lCZ.js} +1 -1
- package/dist/waku/public/assets/{chevron-right-DmP6Xa1g.js → chevron-right-DJ6X4mXo.js} +1 -1
- package/dist/waku/public/assets/{client-BSFjekJY.js → client-DU5zOesq.js} +1 -1
- package/dist/waku/public/assets/{collapsible-B2rvGry7.js → collapsible-Bqzit3JO.js} +1 -1
- package/dist/waku/public/assets/{core-C4jOG9I2.js → core-BfOvCGca.js} +1 -1
- package/dist/waku/public/assets/{i18n-V4QzeUbV.js → i18n-BU0Gqrrh.js} +1 -1
- package/dist/waku/public/assets/{index-xXa72sZS.js → index-C3-lsDRv.js} +1 -1
- package/dist/waku/public/assets/{index-NB9D4S1v.js → index-CCR9ecA8.js} +1 -1
- package/dist/waku/public/assets/{index-DW9Fo86a.js → index-CWwHJATE.js} +1 -1
- package/dist/waku/public/assets/{index-BQZmdbam.js → index-CY9LswMc.js} +1 -1
- package/dist/waku/public/assets/{index-CYJW3hzB.js → index-Cae1bXCh.js} +1 -1
- package/dist/waku/public/assets/{index-Bojr-xLv.js → index-CkzHlXhF.js} +1 -1
- package/dist/waku/public/assets/{index-B-5ouVG_.js → index-DOC-_zsC.js} +1 -1
- package/dist/waku/public/assets/{index-B65N5043.js → index-DOsFxkYv.js} +1 -1
- package/dist/waku/public/assets/{index-DHENdpwd.js → index-DhgWLnXf.js} +1 -1
- package/dist/waku/public/assets/index-E12FLc8f.js +1 -0
- package/dist/waku/public/assets/{index-OFfnl8sH.js → index-Po1UZSgL.js} +3 -3
- package/dist/waku/public/assets/{index-2HLUYgxN.js → index-T_b7wuyJ.js} +5 -5
- package/dist/waku/public/assets/{index-CBSxJfFU.js → index-yiM3u0f9.js} +1 -1
- package/dist/waku/public/assets/{index-Bonlu0LX.js → index-zSjxh5o9.js} +1 -1
- package/dist/waku/public/assets/{link-item-BlYkot48.js → link-item-CAVxr8-m.js} +1 -1
- package/dist/waku/public/assets/{merge-refs-BIez66Kl.js → merge-refs-B7SuKGTI.js} +1 -1
- package/dist/waku/public/assets/{orama-cloud-CazpSeQ0.js → orama-cloud-D6HIyrrx.js} +1 -1
- package/dist/waku/public/assets/{orama-cloud-legacy-CINWERV2.js → orama-cloud-legacy-AQ__GML5.js} +1 -1
- package/dist/waku/public/assets/{orama-static-DwfVMMmc.js → orama-static-CyMYfAPj.js} +1 -1
- package/dist/waku/public/assets/{page-actions--VStSULV.js → page-actions-CcyvVvdr.js} +1 -1
- package/dist/waku/public/assets/{proxy-CWSxKwWP.js → proxy-DdABrE5r.js} +1 -1
- package/dist/waku/public/assets/{search-D1WUBd3N.js → search-AdRfsIll.js} +1 -1
- package/dist/waku/public/assets/{search-default-B2jTK1EC.js → search-default-B4NAC8AJ.js} +3 -3
- package/dist/waku/public/assets/{use-copy-button-BO3GBlwZ.js → use-copy-button-auHqSfgW.js} +1 -1
- package/dist/waku/public/assets/{x-CB1cQ-bo.js → x-Blg1xIpd.js} +1 -1
- package/dist/waku/server/__vite_rsc_assets_manifest.js +151 -151
- package/dist/waku/server/assets/{_...slugs_-8lFegkVB.js → _...slugs_-DF1SYPMg.js} +32 -30
- package/dist/waku/server/assets/_root-BWpoCRFY.css +1 -0
- package/dist/waku/server/assets/{_root-B7AMftRI.js → _root-BiaZL9xf.js} +1 -1
- package/dist/waku/server/assets/{ai-C1Bf8DXZ.js → ai-vEEzbqB8.js} +2 -2
- package/dist/waku/server/assets/{chat-CN1qUeN-.js → chat-DOZ_Cx8A.js} +202 -12
- package/dist/waku/server/assets/{image.webp-PNGidV2r.js → image.webp-BW_97iH9.js} +1 -1
- package/dist/waku/server/assets/{img-C2Ne7ke5.js → img-B-t2xy2h.js} +1 -1
- package/dist/waku/server/assets/{index-CtEJq0xW.js → index--w0er2WH.js} +5 -5
- package/dist/waku/server/assets/{index-AIo6cWfN.js → index-BK2ZBQW1.js} +132 -54
- package/dist/waku/server/assets/{index-dpJ5KyUl.js → index-BXqq5kje.js} +1 -1
- package/dist/waku/server/assets/{index-D6orYQqE.js → index-CoHTzFHF.js} +1 -1
- package/dist/waku/server/assets/{index-QgPg52ej.js → index-D32Kgl7D.js} +1 -1
- package/dist/waku/server/assets/{index-BtnFj3IN.js → index-DShTeblm.js} +1 -1
- package/dist/waku/server/assets/{index-DFPuXyRR.js → index-DWNJLNyX.js} +1 -1
- package/dist/waku/server/assets/{index-6LQQnOj9.js → index-eAdvdAYz.js} +1 -1
- package/dist/waku/server/assets/{search-BuYfcIgW.js → search-BHsWHDmx.js} +2 -2
- package/dist/waku/server/assets/{server-entry-inner-DrYrCg3c.js → server-entry-inner-CYeTE9pH.js} +230 -189
- package/dist/waku/server/assets/{token-BJQ71htz.js → token-Dc4bIZyb.js} +3 -3
- package/dist/waku/server/assets/{token-util-BdUbceAe.js → token-util-BDWFgKKT.js} +16 -16
- package/dist/waku/server/assets/{token-util-WrcienE5.js → token-util-yHc1UlLV.js} +2 -2
- package/dist/waku/server/build.js +1 -1
- package/dist/waku/server/index.js +1 -1
- package/dist/waku/server/ssr/__vite_rsc_assets_manifest.js +151 -151
- package/dist/waku/server/ssr/assets/{Icon-BkWS2wcn.js → Icon-CjkqongL.js} +2 -2
- package/dist/waku/server/ssr/assets/{core-CLB7CUo5.js → core-Ru16gShL.js} +3 -3
- package/dist/waku/server/ssr/assets/{index-CKMvBRnq.js → index-BFvm1zbH.js} +4 -4
- package/dist/waku/server/ssr/assets/{index-BggSP1CG.js → index-CTD5LS21.js} +3 -3
- package/dist/waku/server/ssr/assets/{index-F8Xj3Sj4.js → index-DR2zqaC5.js} +1 -1
- package/dist/waku/server/ssr/index.js +12 -13
- package/package.json +15 -15
- package/dist/waku/public/assets/Icon-C79MpmBL.js +0 -1
- package/dist/waku/public/assets/_root-CzUOgPm2.css +0 -1
- package/dist/waku/public/assets/index-B7lX48CB.js +0 -1
- package/dist/waku/server/assets/_root-CzUOgPm2.css +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{h as Bt}from"./index-CkdplsNl.js";import{J as Ie,s as nt,f as Mt,c as jt,d as Dt,z as Wt,h as Ft}from"./index-B65N5043.js";import{c as Me}from"./index-2HLUYgxN.js";import"./index-OFfnl8sH.js";import"./index-B-5ouVG_.js";import"./merge-refs-BIez66Kl.js";import"./index-Bojr-xLv.js";import"./Icon-D30p-2dq.js";import"./schemas-BzqjMV9-.js";import"./use-copy-button-BO3GBlwZ.js";import"./index-DHENdpwd.js";import"./x-CB1cQ-bo.js";import"./search-D1WUBd3N.js";var S=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function qt(t){return Le(t)}function Le(t){return Array.isArray(t)?zt(t):t instanceof RegExp?t:typeof t=="object"?Ht(t):t}function zt(t){let e=[];for(let n=0,s=t.length;n<s;n++)e[n]=Le(t[n]);return e}function Ht(t){let e={};for(let n in t)e[n]=Le(t[n]);return e}function st(t,...e){return e.forEach(n=>{for(let s in n)t[s]=n[s]}),t}function rt(t){const e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return e===0?t:~e===t.length-1?rt(t.substring(0,t.length-1)):t.substr(~e+1)}var de=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,H=class{static hasCaptures(t){return t===null?!1:(de.lastIndex=0,de.test(t))}static replaceCaptures(t,e,n){return t.replace(de,(s,r,i,o)=>{let a=n[parseInt(r||i,10)];if(a){let c=e.substring(a.start,a.end);for(;c[0]===".";)c=c.substring(1);switch(o){case"downcase":return c.toLowerCase();case"upcase":return c.toUpperCase();default:return c}}else return s})}};function it(t,e){return t<e?-1:t>e?1:0}function ot(t,e){if(t===null&&e===null)return 0;if(!t)return-1;if(!e)return 1;let n=t.length,s=e.length;if(n===s){for(let r=0;r<n;r++){let i=it(t[r],e[r]);if(i!==0)return i}return 0}return n-s}function je(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 at(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var ct=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}},V=class{constructor(t,e,n){this._colorMap=t,this._defaults=e,this._root=n}static createFromRawTheme(t,e){return this.createFromParsedTheme(Yt(t),e)}static createFromParsedTheme(t,e){return Vt(t,e)}_cachedMatchRoot=new ct(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,s=this._cachedMatchRoot.get(e).find(r=>Ut(t.parent,r.parentScopes));return s?new lt(s.fontStyle,s.foreground,s.background):null}},ge=class Y{constructor(e,n){this.parent=e,this.scopeName=n}static push(e,n){for(const s of n)e=new Y(e,s);return e}static from(...e){let n=null;for(let s=0;s<e.length;s++)n=new Y(n,e[s]);return n}push(e){return new Y(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 s=this;for(;s&&s!==e;)n.push(s.scopeName),s=s.parent;return s===e?n.reverse():void 0}};function Ut(t,e){if(e.length===0)return!0;for(let n=0;n<e.length;n++){let s=e[n],r=!1;if(s===">"){if(n===e.length-1)return!1;s=e[++n],r=!0}for(;t&&!Kt(t.scopeName,s);){if(r)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function Kt(t,e){return e===t||t.startsWith(e)&&t[e.length]==="."}var lt=class{constructor(t,e,n){this.fontStyle=t,this.foregroundId=e,this.backgroundId=n}};function Yt(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,n=[],s=0;for(let r=0,i=e.length;r<i;r++){let o=e[r];if(!o.settings)continue;let a;if(typeof o.scope=="string"){let h=o.scope;h=h.replace(/^[,]+/,""),h=h.replace(/[,]+$/,""),a=h.split(",")}else Array.isArray(o.scope)?a=o.scope:a=[""];let c=-1;if(typeof o.settings.fontStyle=="string"){c=0;let h=o.settings.fontStyle.split(" ");for(let f=0,d=h.length;f<d;f++)switch(h[f]){case"italic":c=c|1;break;case"bold":c=c|2;break;case"underline":c=c|4;break;case"strikethrough":c=c|8;break}}let l=null;typeof o.settings.foreground=="string"&&je(o.settings.foreground)&&(l=o.settings.foreground);let u=null;typeof o.settings.background=="string"&&je(o.settings.background)&&(u=o.settings.background);for(let h=0,f=a.length;h<f;h++){let g=a[h].trim().split(" "),b=g[g.length-1],_=null;g.length>1&&(_=g.slice(0,g.length-1),_.reverse()),n[s++]=new Jt(b,_,r,c,l,u)}}return n}var Jt=class{constructor(t,e,n,s,r,i){this.scope=t,this.parentScopes=e,this.index=n,this.fontStyle=s,this.foreground=r,this.background=i}},k=(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))(k||{});function Vt(t,e){t.sort((c,l)=>{let u=it(c.scope,l.scope);return u!==0||(u=ot(c.parentScopes,l.parentScopes),u!==0)?u:c.index-l.index});let n=0,s="#000000",r="#ffffff";for(;t.length>=1&&t[0].scope==="";){let c=t.shift();c.fontStyle!==-1&&(n=c.fontStyle),c.foreground!==null&&(s=c.foreground),c.background!==null&&(r=c.background)}let i=new Qt(e),o=new lt(n,i.getId(s),i.getId(r)),a=new Zt(new be(0,null,-1,0,0),[]);for(let c=0,l=t.length;c<l;c++){let u=t[c];a.insert(0,u.scope,u.parentScopes,u.fontStyle,i.getId(u.foreground),i.getId(u.background))}return new V(i,o,a)}var Qt=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)}},Xt=Object.freeze([]),be=class ut{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,n,s,r,i){this.scopeDepth=e,this.parentScopes=n||Xt,this.fontStyle=s,this.foreground=r,this.background=i}clone(){return new ut(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let n=[];for(let s=0,r=e.length;s<r;s++)n[s]=e[s].clone();return n}acceptOverwrite(e,n,s,r){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,n!==-1&&(this.fontStyle=n),s!==0&&(this.foreground=s),r!==0&&(this.background=r)}},Zt=class Se{constructor(e,n=[],s={}){this._mainRule=e,this._children=s,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(e,n){if(e.scopeDepth!==n.scopeDepth)return n.scopeDepth-e.scopeDepth;let s=0,r=0;for(;e.parentScopes[s]===">"&&s++,n.parentScopes[r]===">"&&r++,!(s>=e.parentScopes.length||r>=n.parentScopes.length);){const i=n.parentScopes[r].length-e.parentScopes[s].length;if(i!==0)return i;s++,r++}return n.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let s=e.indexOf("."),r,i;if(s===-1?(r=e,i=""):(r=e.substring(0,s),i=e.substring(s+1)),this._children.hasOwnProperty(r))return this._children[r].match(i)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(Se._cmpBySpecificity),n}insert(e,n,s,r,i,o){if(n===""){this._doInsertHere(e,s,r,i,o);return}let a=n.indexOf("."),c,l;a===-1?(c=n,l=""):(c=n.substring(0,a),l=n.substring(a+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new Se(this._mainRule.clone(),be.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(e+1,l,s,r,i,o)}_doInsertHere(e,n,s,r,i){if(n===null){this._mainRule.acceptOverwrite(e,s,r,i);return}for(let o=0,a=this._rulesWithParentScopes.length;o<a;o++){let c=this._rulesWithParentScopes[o];if(ot(c.parentScopes,n)===0){c.acceptOverwrite(e,s,r,i);return}}s===-1&&(s=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new be(e,n,s,r,i))}},$=class A{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const n=A.getLanguageId(e),s=A.getTokenType(e),r=A.getFontStyle(e),i=A.getForeground(e),o=A.getBackground(e);console.log({languageId:n,tokenType:s,fontStyle:r,foreground:i,background:o})}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,s,r,i,o,a){let c=A.getLanguageId(e),l=A.getTokenType(e),u=A.containsBalancedBrackets(e)?1:0,h=A.getFontStyle(e),f=A.getForeground(e),d=A.getBackground(e);return n!==0&&(c=n),s!==8&&(l=s),r!==null&&(u=r?1:0),i!==-1&&(h=i),o!==0&&(f=o),a!==0&&(d=a),(c<<0|l<<8|u<<10|h<<11|f<<15|d<<24)>>>0}};function Q(t,e){const n=[],s=en(t);let r=s.next();for(;r!==null;){let c=0;if(r.length===2&&r.charAt(1)===":"){switch(r.charAt(0)){case"R":c=1;break;case"L":c=-1;break;default:console.log(`Unknown priority ${r} in scope selector`)}r=s.next()}let l=o();if(n.push({matcher:l,priority:c}),r!==",")break;r=s.next()}return n;function i(){if(r==="-"){r=s.next();const c=i();return l=>!!c&&!c(l)}if(r==="("){r=s.next();const c=a();return r===")"&&(r=s.next()),c}if(De(r)){const c=[];do c.push(r),r=s.next();while(De(r));return l=>e(c,l)}return null}function o(){const c=[];let l=i();for(;l;)c.push(l),l=i();return u=>c.every(h=>h(u))}function a(){const c=[];let l=o();for(;l&&(c.push(l),r==="|"||r===",");){do r=s.next();while(r==="|"||r===",");l=o()}return u=>c.some(h=>h(u))}}function De(t){return!!t&&!!t.match(/[\w\.:]+/)}function en(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=e.exec(t);return{next:()=>{if(!n)return null;const s=n[0];return n=e.exec(t),s}}}function ht(t){typeof t.dispose=="function"&&t.dispose()}var D=class{constructor(t){this.scopeName=t}toKey(){return this.scopeName}},tn=class{constructor(t,e){this.scopeName=t,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},nn=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))}},sn=class{constructor(t,e){this.repo=t,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new D(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const t=this.Q;this.Q=[];const e=new nn;for(const n of t)rn(n,this.initialScopeName,this.repo,e);for(const n of e.references)if(n instanceof D){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 rn(t,e,n,s){const r=n.lookup(t.scopeName);if(!r){if(t.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const i=n.lookup(e);t instanceof D?J({baseGrammar:i,selfGrammar:r},s):Ce(t.ruleName,{baseGrammar:i,selfGrammar:r,repository:r.repository},s);const o=n.injections(t.scopeName);if(o)for(const a of o)s.add(new D(a))}function Ce(t,e,n){if(e.repository&&e.repository[t]){const s=e.repository[t];X([s],e,n)}}function J(t,e){t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns)&&X(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e),t.selfGrammar.injections&&X(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function X(t,e,n){for(const s of t){if(n.visitedRule.has(s))continue;n.visitedRule.add(s);const r=s.repository?st({},e.repository,s.repository):e.repository;Array.isArray(s.patterns)&&X(s.patterns,{...e,repository:r},n);const i=s.include;if(!i)continue;const o=ft(i);switch(o.kind){case 0:J({...e,selfGrammar:e.baseGrammar},n);break;case 1:J(e,n);break;case 2:Ce(o.ruleName,{...e,repository:r},n);break;case 3:case 4:const a=o.scopeName===e.selfGrammar.scopeName?e.selfGrammar:o.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(a){const c={baseGrammar:e.baseGrammar,selfGrammar:a,repository:r};o.kind===4?Ce(o.ruleName,c,n):J(c,n)}else o.kind===4?n.add(new tn(o.scopeName,o.ruleName)):n.add(new D(o.scopeName));break}}}var on=class{kind=0},an=class{kind=1},cn=class{constructor(t){this.ruleName=t}kind=2},ln=class{constructor(t){this.scopeName=t}kind=3},un=class{constructor(t,e){this.scopeName=t,this.ruleName=e}kind=4};function ft(t){if(t==="$base")return new on;if(t==="$self")return new an;const e=t.indexOf("#");if(e===-1)return new ln(t);if(e===0)return new cn(t.substring(1));{const n=t.substring(0,e),s=t.substring(e+1);return new un(n,s)}}var hn=/\\(\d+)/,We=/\\(\d+)/g,fn=-1,dt=-2;var z=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(t,e,n,s){this.$location=t,this.id=e,this._name=n||null,this._nameIsCapturing=H.hasCaptures(this._name),this._contentName=s||null,this._contentNameIsCapturing=H.hasCaptures(this._contentName)}get debugName(){const t=this.$location?`${rt(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,e){return!this._nameIsCapturing||this._name===null||t===null||e===null?this._name:H.replaceCaptures(this._name,t,e)}getContentName(t,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:H.replaceCaptures(this._contentName,t,e)}},dn=class extends z{retokenizeCapturedWithRuleId;constructor(t,e,n,s,r){super(t,e,n,s),this.retokenizeCapturedWithRuleId=r}dispose(){}collectPatterns(t,e){throw new Error("Not supported!")}compile(t,e){throw new Error("Not supported!")}compileAG(t,e,n,s){throw new Error("Not supported!")}},gn=class extends z{_match;captures;_cachedCompiledPatterns;constructor(t,e,n,s,r){super(t,e,n,null),this._match=new W(s,this.id),this.captures=r,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,s){return this._getCachedCompiledPatterns(t).compileAG(t,n,s)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new F,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Fe=class extends z{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,s,r){super(t,e,n,s),this.patterns=r.patterns,this.hasMissingPatterns=r.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,s){return this._getCachedCompiledPatterns(t).compileAG(t,n,s)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new F,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},we=class extends z{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,s,r,i,o,a,c,l){super(t,e,n,s),this._begin=new W(r,this.id),this.beginCaptures=i,this._end=new W(o||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.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,s){return this._getCachedCompiledPatterns(t,e).compileAG(t,n,s)}_getCachedCompiledPatterns(t,e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new F;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}},Z=class extends z{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(t,e,n,s,r,i,o,a,c){super(t,e,n,s),this._begin=new W(r,this.id),this.beginCaptures=i,this.whileCaptures=a,this._while=new W(o,dt),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.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,s){return this._getCachedCompiledPatterns(t).compileAG(t,n,s)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new F;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,s){return this._getCachedCompiledWhilePatterns(t,e).compileAG(t,n,s)}_getCachedCompiledWhilePatterns(t,e){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new F,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,e||""),this._cachedCompiledWhilePatterns}},gt=class N{static createCaptureRule(e,n,s,r,i){return e.registerRule(o=>new dn(n,o,s,r,i))}static getCompiledRuleId(e,n,s){return e.id||n.registerRule(r=>{if(e.id=r,e.match)return new gn(e.$vscodeTextmateLocation,e.id,e.name,e.match,N._compileCaptures(e.captures,n,s));if(typeof e.begin>"u"){e.repository&&(s=st({},s,e.repository));let i=e.patterns;return typeof i>"u"&&e.include&&(i=[{include:e.include}]),new Fe(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,N._compilePatterns(i,n,s))}return e.while?new Z(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,N._compileCaptures(e.beginCaptures||e.captures,n,s),e.while,N._compileCaptures(e.whileCaptures||e.captures,n,s),N._compilePatterns(e.patterns,n,s)):new we(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,N._compileCaptures(e.beginCaptures||e.captures,n,s),e.end,N._compileCaptures(e.endCaptures||e.captures,n,s),e.applyEndPatternLast,N._compilePatterns(e.patterns,n,s))}),e.id}static _compileCaptures(e,n,s){let r=[];if(e){let i=0;for(const o in e){if(o==="$vscodeTextmateLocation")continue;const a=parseInt(o,10);a>i&&(i=a)}for(let o=0;o<=i;o++)r[o]=null;for(const o in e){if(o==="$vscodeTextmateLocation")continue;const a=parseInt(o,10);let c=0;e[o].patterns&&(c=N.getCompiledRuleId(e[o],n,s)),r[a]=N.createCaptureRule(n,e[o].$vscodeTextmateLocation,e[o].name,e[o].contentName,c)}}return r}static _compilePatterns(e,n,s){let r=[];if(e)for(let i=0,o=e.length;i<o;i++){const a=e[i];let c=-1;if(a.include){const l=ft(a.include);switch(l.kind){case 0:case 1:c=N.getCompiledRuleId(s[a.include],n,s);break;case 2:let u=s[l.ruleName];u&&(c=N.getCompiledRuleId(u,n,s));break;case 3:case 4:const h=l.scopeName,f=l.kind===4?l.ruleName:null,d=n.getExternalGrammar(h,s);if(d)if(f){let g=d.repository[f];g&&(c=N.getCompiledRuleId(g,n,d.repository))}else c=N.getCompiledRuleId(d.repository.$self,n,d.repository);break}}else c=N.getCompiledRuleId(a,n,s);if(c!==-1){const l=n.getRule(c);let u=!1;if((l instanceof Fe||l instanceof we||l instanceof Z)&&l.hasMissingPatterns&&l.patterns.length===0&&(u=!0),u)continue;r.push(c)}}return{patterns:r,hasMissingPatterns:(e?e.length:0)!==r.length}}},W=class mt{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,n){if(e&&typeof e=="string"){const s=e.length;let r=0,i=[],o=!1;for(let a=0;a<s;a++)if(e.charAt(a)==="\\"&&a+1<s){const l=e.charAt(a+1);l==="z"?(i.push(e.substring(r,a)),i.push("$(?!\\n)(?<!\\n)"),r=a+2):(l==="A"||l==="G")&&(o=!0),a++}this.hasAnchor=o,r===0?this.source=e:(i.push(e.substring(r,s)),this.source=i.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=hn.test(this.source):this.hasBackReferences=!1}clone(){return new mt(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 s=n.map(r=>e.substring(r.start,r.end));return We.lastIndex=0,this.source.replace(We,(r,i)=>at(s[parseInt(i,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=[],s=[],r=[],i,o,a,c;for(i=0,o=this.source.length;i<o;i++)a=this.source.charAt(i),e[i]=a,n[i]=a,s[i]=a,r[i]=a,a==="\\"&&i+1<o&&(c=this.source.charAt(i+1),c==="A"?(e[i+1]="",n[i+1]="",s[i+1]="A",r[i+1]="A"):c==="G"?(e[i+1]="",n[i+1]="G",s[i+1]="",r[i+1]="G"):(e[i+1]=c,n[i+1]=c,s[i+1]=c,r[i+1]=c),i++);return{A0_G0:e.join(""),A0_G1:n.join(""),A1_G0:s.join(""),A1_G1:r.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}},F=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 qe(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 s=this._items.map(r=>r.resolveAnchors(e,n));return new qe(t,s,this._items.map(r=>r.ruleId))}},qe=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(`
|
|
1
|
+
import{h as Bt}from"./index-CkdplsNl.js";import{J as Ie,s as nt,f as Mt,c as jt,d as Dt,z as Wt,h as Ft}from"./index-DOsFxkYv.js";import{c as Me}from"./index-T_b7wuyJ.js";import"./index-Po1UZSgL.js";import"./index-DOC-_zsC.js";import"./merge-refs-B7SuKGTI.js";import"./index-CkzHlXhF.js";import"./Icon-uimJ5tpe.js";import"./schemas-BzqjMV9-.js";import"./use-copy-button-auHqSfgW.js";import"./index-DhgWLnXf.js";import"./x-Blg1xIpd.js";import"./search-AdRfsIll.js";var S=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function qt(t){return Le(t)}function Le(t){return Array.isArray(t)?zt(t):t instanceof RegExp?t:typeof t=="object"?Ht(t):t}function zt(t){let e=[];for(let n=0,s=t.length;n<s;n++)e[n]=Le(t[n]);return e}function Ht(t){let e={};for(let n in t)e[n]=Le(t[n]);return e}function st(t,...e){return e.forEach(n=>{for(let s in n)t[s]=n[s]}),t}function rt(t){const e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return e===0?t:~e===t.length-1?rt(t.substring(0,t.length-1)):t.substr(~e+1)}var de=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,H=class{static hasCaptures(t){return t===null?!1:(de.lastIndex=0,de.test(t))}static replaceCaptures(t,e,n){return t.replace(de,(s,r,i,o)=>{let a=n[parseInt(r||i,10)];if(a){let c=e.substring(a.start,a.end);for(;c[0]===".";)c=c.substring(1);switch(o){case"downcase":return c.toLowerCase();case"upcase":return c.toUpperCase();default:return c}}else return s})}};function it(t,e){return t<e?-1:t>e?1:0}function ot(t,e){if(t===null&&e===null)return 0;if(!t)return-1;if(!e)return 1;let n=t.length,s=e.length;if(n===s){for(let r=0;r<n;r++){let i=it(t[r],e[r]);if(i!==0)return i}return 0}return n-s}function je(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 at(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var ct=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}},V=class{constructor(t,e,n){this._colorMap=t,this._defaults=e,this._root=n}static createFromRawTheme(t,e){return this.createFromParsedTheme(Yt(t),e)}static createFromParsedTheme(t,e){return Vt(t,e)}_cachedMatchRoot=new ct(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,s=this._cachedMatchRoot.get(e).find(r=>Ut(t.parent,r.parentScopes));return s?new lt(s.fontStyle,s.foreground,s.background):null}},ge=class Y{constructor(e,n){this.parent=e,this.scopeName=n}static push(e,n){for(const s of n)e=new Y(e,s);return e}static from(...e){let n=null;for(let s=0;s<e.length;s++)n=new Y(n,e[s]);return n}push(e){return new Y(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 s=this;for(;s&&s!==e;)n.push(s.scopeName),s=s.parent;return s===e?n.reverse():void 0}};function Ut(t,e){if(e.length===0)return!0;for(let n=0;n<e.length;n++){let s=e[n],r=!1;if(s===">"){if(n===e.length-1)return!1;s=e[++n],r=!0}for(;t&&!Kt(t.scopeName,s);){if(r)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function Kt(t,e){return e===t||t.startsWith(e)&&t[e.length]==="."}var lt=class{constructor(t,e,n){this.fontStyle=t,this.foregroundId=e,this.backgroundId=n}};function Yt(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,n=[],s=0;for(let r=0,i=e.length;r<i;r++){let o=e[r];if(!o.settings)continue;let a;if(typeof o.scope=="string"){let h=o.scope;h=h.replace(/^[,]+/,""),h=h.replace(/[,]+$/,""),a=h.split(",")}else Array.isArray(o.scope)?a=o.scope:a=[""];let c=-1;if(typeof o.settings.fontStyle=="string"){c=0;let h=o.settings.fontStyle.split(" ");for(let f=0,d=h.length;f<d;f++)switch(h[f]){case"italic":c=c|1;break;case"bold":c=c|2;break;case"underline":c=c|4;break;case"strikethrough":c=c|8;break}}let l=null;typeof o.settings.foreground=="string"&&je(o.settings.foreground)&&(l=o.settings.foreground);let u=null;typeof o.settings.background=="string"&&je(o.settings.background)&&(u=o.settings.background);for(let h=0,f=a.length;h<f;h++){let g=a[h].trim().split(" "),b=g[g.length-1],_=null;g.length>1&&(_=g.slice(0,g.length-1),_.reverse()),n[s++]=new Jt(b,_,r,c,l,u)}}return n}var Jt=class{constructor(t,e,n,s,r,i){this.scope=t,this.parentScopes=e,this.index=n,this.fontStyle=s,this.foreground=r,this.background=i}},k=(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))(k||{});function Vt(t,e){t.sort((c,l)=>{let u=it(c.scope,l.scope);return u!==0||(u=ot(c.parentScopes,l.parentScopes),u!==0)?u:c.index-l.index});let n=0,s="#000000",r="#ffffff";for(;t.length>=1&&t[0].scope==="";){let c=t.shift();c.fontStyle!==-1&&(n=c.fontStyle),c.foreground!==null&&(s=c.foreground),c.background!==null&&(r=c.background)}let i=new Qt(e),o=new lt(n,i.getId(s),i.getId(r)),a=new Zt(new be(0,null,-1,0,0),[]);for(let c=0,l=t.length;c<l;c++){let u=t[c];a.insert(0,u.scope,u.parentScopes,u.fontStyle,i.getId(u.foreground),i.getId(u.background))}return new V(i,o,a)}var Qt=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)}},Xt=Object.freeze([]),be=class ut{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,n,s,r,i){this.scopeDepth=e,this.parentScopes=n||Xt,this.fontStyle=s,this.foreground=r,this.background=i}clone(){return new ut(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let n=[];for(let s=0,r=e.length;s<r;s++)n[s]=e[s].clone();return n}acceptOverwrite(e,n,s,r){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,n!==-1&&(this.fontStyle=n),s!==0&&(this.foreground=s),r!==0&&(this.background=r)}},Zt=class Se{constructor(e,n=[],s={}){this._mainRule=e,this._children=s,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(e,n){if(e.scopeDepth!==n.scopeDepth)return n.scopeDepth-e.scopeDepth;let s=0,r=0;for(;e.parentScopes[s]===">"&&s++,n.parentScopes[r]===">"&&r++,!(s>=e.parentScopes.length||r>=n.parentScopes.length);){const i=n.parentScopes[r].length-e.parentScopes[s].length;if(i!==0)return i;s++,r++}return n.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let s=e.indexOf("."),r,i;if(s===-1?(r=e,i=""):(r=e.substring(0,s),i=e.substring(s+1)),this._children.hasOwnProperty(r))return this._children[r].match(i)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(Se._cmpBySpecificity),n}insert(e,n,s,r,i,o){if(n===""){this._doInsertHere(e,s,r,i,o);return}let a=n.indexOf("."),c,l;a===-1?(c=n,l=""):(c=n.substring(0,a),l=n.substring(a+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new Se(this._mainRule.clone(),be.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(e+1,l,s,r,i,o)}_doInsertHere(e,n,s,r,i){if(n===null){this._mainRule.acceptOverwrite(e,s,r,i);return}for(let o=0,a=this._rulesWithParentScopes.length;o<a;o++){let c=this._rulesWithParentScopes[o];if(ot(c.parentScopes,n)===0){c.acceptOverwrite(e,s,r,i);return}}s===-1&&(s=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new be(e,n,s,r,i))}},$=class A{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const n=A.getLanguageId(e),s=A.getTokenType(e),r=A.getFontStyle(e),i=A.getForeground(e),o=A.getBackground(e);console.log({languageId:n,tokenType:s,fontStyle:r,foreground:i,background:o})}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,s,r,i,o,a){let c=A.getLanguageId(e),l=A.getTokenType(e),u=A.containsBalancedBrackets(e)?1:0,h=A.getFontStyle(e),f=A.getForeground(e),d=A.getBackground(e);return n!==0&&(c=n),s!==8&&(l=s),r!==null&&(u=r?1:0),i!==-1&&(h=i),o!==0&&(f=o),a!==0&&(d=a),(c<<0|l<<8|u<<10|h<<11|f<<15|d<<24)>>>0}};function Q(t,e){const n=[],s=en(t);let r=s.next();for(;r!==null;){let c=0;if(r.length===2&&r.charAt(1)===":"){switch(r.charAt(0)){case"R":c=1;break;case"L":c=-1;break;default:console.log(`Unknown priority ${r} in scope selector`)}r=s.next()}let l=o();if(n.push({matcher:l,priority:c}),r!==",")break;r=s.next()}return n;function i(){if(r==="-"){r=s.next();const c=i();return l=>!!c&&!c(l)}if(r==="("){r=s.next();const c=a();return r===")"&&(r=s.next()),c}if(De(r)){const c=[];do c.push(r),r=s.next();while(De(r));return l=>e(c,l)}return null}function o(){const c=[];let l=i();for(;l;)c.push(l),l=i();return u=>c.every(h=>h(u))}function a(){const c=[];let l=o();for(;l&&(c.push(l),r==="|"||r===",");){do r=s.next();while(r==="|"||r===",");l=o()}return u=>c.some(h=>h(u))}}function De(t){return!!t&&!!t.match(/[\w\.:]+/)}function en(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=e.exec(t);return{next:()=>{if(!n)return null;const s=n[0];return n=e.exec(t),s}}}function ht(t){typeof t.dispose=="function"&&t.dispose()}var D=class{constructor(t){this.scopeName=t}toKey(){return this.scopeName}},tn=class{constructor(t,e){this.scopeName=t,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},nn=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))}},sn=class{constructor(t,e){this.repo=t,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new D(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const t=this.Q;this.Q=[];const e=new nn;for(const n of t)rn(n,this.initialScopeName,this.repo,e);for(const n of e.references)if(n instanceof D){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 rn(t,e,n,s){const r=n.lookup(t.scopeName);if(!r){if(t.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const i=n.lookup(e);t instanceof D?J({baseGrammar:i,selfGrammar:r},s):Ce(t.ruleName,{baseGrammar:i,selfGrammar:r,repository:r.repository},s);const o=n.injections(t.scopeName);if(o)for(const a of o)s.add(new D(a))}function Ce(t,e,n){if(e.repository&&e.repository[t]){const s=e.repository[t];X([s],e,n)}}function J(t,e){t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns)&&X(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e),t.selfGrammar.injections&&X(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function X(t,e,n){for(const s of t){if(n.visitedRule.has(s))continue;n.visitedRule.add(s);const r=s.repository?st({},e.repository,s.repository):e.repository;Array.isArray(s.patterns)&&X(s.patterns,{...e,repository:r},n);const i=s.include;if(!i)continue;const o=ft(i);switch(o.kind){case 0:J({...e,selfGrammar:e.baseGrammar},n);break;case 1:J(e,n);break;case 2:Ce(o.ruleName,{...e,repository:r},n);break;case 3:case 4:const a=o.scopeName===e.selfGrammar.scopeName?e.selfGrammar:o.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(a){const c={baseGrammar:e.baseGrammar,selfGrammar:a,repository:r};o.kind===4?Ce(o.ruleName,c,n):J(c,n)}else o.kind===4?n.add(new tn(o.scopeName,o.ruleName)):n.add(new D(o.scopeName));break}}}var on=class{kind=0},an=class{kind=1},cn=class{constructor(t){this.ruleName=t}kind=2},ln=class{constructor(t){this.scopeName=t}kind=3},un=class{constructor(t,e){this.scopeName=t,this.ruleName=e}kind=4};function ft(t){if(t==="$base")return new on;if(t==="$self")return new an;const e=t.indexOf("#");if(e===-1)return new ln(t);if(e===0)return new cn(t.substring(1));{const n=t.substring(0,e),s=t.substring(e+1);return new un(n,s)}}var hn=/\\(\d+)/,We=/\\(\d+)/g,fn=-1,dt=-2;var z=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(t,e,n,s){this.$location=t,this.id=e,this._name=n||null,this._nameIsCapturing=H.hasCaptures(this._name),this._contentName=s||null,this._contentNameIsCapturing=H.hasCaptures(this._contentName)}get debugName(){const t=this.$location?`${rt(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,e){return!this._nameIsCapturing||this._name===null||t===null||e===null?this._name:H.replaceCaptures(this._name,t,e)}getContentName(t,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:H.replaceCaptures(this._contentName,t,e)}},dn=class extends z{retokenizeCapturedWithRuleId;constructor(t,e,n,s,r){super(t,e,n,s),this.retokenizeCapturedWithRuleId=r}dispose(){}collectPatterns(t,e){throw new Error("Not supported!")}compile(t,e){throw new Error("Not supported!")}compileAG(t,e,n,s){throw new Error("Not supported!")}},gn=class extends z{_match;captures;_cachedCompiledPatterns;constructor(t,e,n,s,r){super(t,e,n,null),this._match=new W(s,this.id),this.captures=r,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,s){return this._getCachedCompiledPatterns(t).compileAG(t,n,s)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new F,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Fe=class extends z{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,s,r){super(t,e,n,s),this.patterns=r.patterns,this.hasMissingPatterns=r.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,s){return this._getCachedCompiledPatterns(t).compileAG(t,n,s)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new F,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},we=class extends z{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,s,r,i,o,a,c,l){super(t,e,n,s),this._begin=new W(r,this.id),this.beginCaptures=i,this._end=new W(o||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.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,s){return this._getCachedCompiledPatterns(t,e).compileAG(t,n,s)}_getCachedCompiledPatterns(t,e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new F;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}},Z=class extends z{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(t,e,n,s,r,i,o,a,c){super(t,e,n,s),this._begin=new W(r,this.id),this.beginCaptures=i,this.whileCaptures=a,this._while=new W(o,dt),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.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,s){return this._getCachedCompiledPatterns(t).compileAG(t,n,s)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new F;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,s){return this._getCachedCompiledWhilePatterns(t,e).compileAG(t,n,s)}_getCachedCompiledWhilePatterns(t,e){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new F,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,e||""),this._cachedCompiledWhilePatterns}},gt=class N{static createCaptureRule(e,n,s,r,i){return e.registerRule(o=>new dn(n,o,s,r,i))}static getCompiledRuleId(e,n,s){return e.id||n.registerRule(r=>{if(e.id=r,e.match)return new gn(e.$vscodeTextmateLocation,e.id,e.name,e.match,N._compileCaptures(e.captures,n,s));if(typeof e.begin>"u"){e.repository&&(s=st({},s,e.repository));let i=e.patterns;return typeof i>"u"&&e.include&&(i=[{include:e.include}]),new Fe(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,N._compilePatterns(i,n,s))}return e.while?new Z(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,N._compileCaptures(e.beginCaptures||e.captures,n,s),e.while,N._compileCaptures(e.whileCaptures||e.captures,n,s),N._compilePatterns(e.patterns,n,s)):new we(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,N._compileCaptures(e.beginCaptures||e.captures,n,s),e.end,N._compileCaptures(e.endCaptures||e.captures,n,s),e.applyEndPatternLast,N._compilePatterns(e.patterns,n,s))}),e.id}static _compileCaptures(e,n,s){let r=[];if(e){let i=0;for(const o in e){if(o==="$vscodeTextmateLocation")continue;const a=parseInt(o,10);a>i&&(i=a)}for(let o=0;o<=i;o++)r[o]=null;for(const o in e){if(o==="$vscodeTextmateLocation")continue;const a=parseInt(o,10);let c=0;e[o].patterns&&(c=N.getCompiledRuleId(e[o],n,s)),r[a]=N.createCaptureRule(n,e[o].$vscodeTextmateLocation,e[o].name,e[o].contentName,c)}}return r}static _compilePatterns(e,n,s){let r=[];if(e)for(let i=0,o=e.length;i<o;i++){const a=e[i];let c=-1;if(a.include){const l=ft(a.include);switch(l.kind){case 0:case 1:c=N.getCompiledRuleId(s[a.include],n,s);break;case 2:let u=s[l.ruleName];u&&(c=N.getCompiledRuleId(u,n,s));break;case 3:case 4:const h=l.scopeName,f=l.kind===4?l.ruleName:null,d=n.getExternalGrammar(h,s);if(d)if(f){let g=d.repository[f];g&&(c=N.getCompiledRuleId(g,n,d.repository))}else c=N.getCompiledRuleId(d.repository.$self,n,d.repository);break}}else c=N.getCompiledRuleId(a,n,s);if(c!==-1){const l=n.getRule(c);let u=!1;if((l instanceof Fe||l instanceof we||l instanceof Z)&&l.hasMissingPatterns&&l.patterns.length===0&&(u=!0),u)continue;r.push(c)}}return{patterns:r,hasMissingPatterns:(e?e.length:0)!==r.length}}},W=class mt{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,n){if(e&&typeof e=="string"){const s=e.length;let r=0,i=[],o=!1;for(let a=0;a<s;a++)if(e.charAt(a)==="\\"&&a+1<s){const l=e.charAt(a+1);l==="z"?(i.push(e.substring(r,a)),i.push("$(?!\\n)(?<!\\n)"),r=a+2):(l==="A"||l==="G")&&(o=!0),a++}this.hasAnchor=o,r===0?this.source=e:(i.push(e.substring(r,s)),this.source=i.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=hn.test(this.source):this.hasBackReferences=!1}clone(){return new mt(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 s=n.map(r=>e.substring(r.start,r.end));return We.lastIndex=0,this.source.replace(We,(r,i)=>at(s[parseInt(i,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=[],s=[],r=[],i,o,a,c;for(i=0,o=this.source.length;i<o;i++)a=this.source.charAt(i),e[i]=a,n[i]=a,s[i]=a,r[i]=a,a==="\\"&&i+1<o&&(c=this.source.charAt(i+1),c==="A"?(e[i+1]="",n[i+1]="",s[i+1]="A",r[i+1]="A"):c==="G"?(e[i+1]="",n[i+1]="G",s[i+1]="",r[i+1]="G"):(e[i+1]=c,n[i+1]=c,s[i+1]=c,r[i+1]=c),i++);return{A0_G0:e.join(""),A0_G1:n.join(""),A1_G0:s.join(""),A1_G1:r.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}},F=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 qe(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 s=this._items.map(r=>r.resolveAnchors(e,n));return new qe(t,s,this._items.map(r=>r.ruleId))}},qe=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
2
|
`)}findNextMatchSync(t,e,n){const s=this.scanner.findNextMatchSync(t,e,n);return s?{ruleId:this.rules[s.index],captureIndices:s.captureIndices}:null}},me=class{constructor(t,e){this.languageId=t,this.tokenType=e}},mn=class Re{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,n){this._defaultAttributes=new me(e,8),this._embeddedLanguagesMatcher=new pn(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return e===null?Re._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}static _NULL_SCOPE_METADATA=new me(0,0);_getBasicScopeAttributes=new ct(e=>{const n=this._scopeToLanguage(e),s=this._toStandardTokenType(e);return new me(n,s)});_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const n=e.match(Re.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/},pn=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,s])=>at(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])}},ze=class{constructor(t,e){this.stack=t,this.stoppedEarly=e}};function pt(t,e,n,s,r,i,o,a){const c=e.content.length;let l=!1,u=-1;if(o){const d=_n(t,e,n,s,r,i);r=d.stack,s=d.linePos,n=d.isFirstLine,u=d.anchorPosition}const h=Date.now();for(;!l;){if(a!==0&&Date.now()-h>a)return new ze(r,!0);f()}return new ze(r,!1);function f(){const d=yn(t,e,n,s,r,u);if(!d){i.produce(r,c),l=!0;return}const g=d.captureIndices,b=d.matchedRuleId,_=g&&g.length>0?g[0].end>s:!1;if(b===fn){const p=r.getRule(t);i.produce(r,g[0].start),r=r.withContentNameScopesList(r.nameScopesList),M(t,e,n,r,i,p.endCaptures,g),i.produce(r,g[0].end);const m=r;if(r=r.parent,u=m.getAnchorPos(),!_&&m.getEnterPos()===s){r=m,i.produce(r,c),l=!0;return}}else{const p=t.getRule(b);i.produce(r,g[0].start);const m=r,y=p.getName(e.content,g),R=r.contentNameScopesList.pushAttributed(y,t);if(r=r.push(b,s,u,g[0].end===c,null,R,R),p instanceof we){const C=p;M(t,e,n,r,i,C.beginCaptures,g),i.produce(r,g[0].end),u=g[0].end;const v=C.getContentName(e.content,g),x=R.pushAttributed(v,t);if(r=r.withContentNameScopesList(x),C.endHasBackReferences&&(r=r.withEndRule(C.getEndWithResolvedBackReferences(e.content,g))),!_&&m.hasSameRuleAs(r)){r=r.pop(),i.produce(r,c),l=!0;return}}else if(p instanceof Z){const C=p;M(t,e,n,r,i,C.beginCaptures,g),i.produce(r,g[0].end),u=g[0].end;const v=C.getContentName(e.content,g),x=R.pushAttributed(v,t);if(r=r.withContentNameScopesList(x),C.whileHasBackReferences&&(r=r.withEndRule(C.getWhileWithResolvedBackReferences(e.content,g))),!_&&m.hasSameRuleAs(r)){r=r.pop(),i.produce(r,c),l=!0;return}}else if(M(t,e,n,r,i,p.captures,g),i.produce(r,g[0].end),r=r.pop(),!_){r=r.safePop(),i.produce(r,c),l=!0;return}}g[0].end>s&&(s=g[0].end,n=!1)}}function _n(t,e,n,s,r,i){let o=r.beginRuleCapturedEOL?0:-1;const a=[];for(let c=r;c;c=c.pop()){const l=c.getRule(t);l instanceof Z&&a.push({rule:l,stack:c})}for(let c=a.pop();c;c=a.pop()){const{ruleScanner:l,findOptions:u}=Cn(c.rule,t,c.stack.endRule,n,s===o),h=l.findNextMatchSync(e,s,u);if(h){if(h.ruleId!==dt){r=c.stack.pop();break}h.captureIndices&&h.captureIndices.length&&(i.produce(c.stack,h.captureIndices[0].start),M(t,e,n,c.stack,i,c.rule.whileCaptures,h.captureIndices),i.produce(c.stack,h.captureIndices[0].end),o=h.captureIndices[0].end,h.captureIndices[0].end>s&&(s=h.captureIndices[0].end,n=!1))}else{r=c.stack.pop();break}}return{stack:r,linePos:s,anchorPosition:o,isFirstLine:n}}function yn(t,e,n,s,r,i){const o=bn(t,e,n,s,r,i),a=t.getInjections();if(a.length===0)return o;const c=Sn(a,t,e,n,s,r,i);if(!c)return o;if(!o)return c;const l=o.captureIndices[0].start,u=c.captureIndices[0].start;return u<l||c.priorityMatch&&u===l?c:o}function bn(t,e,n,s,r,i){const o=r.getRule(t),{ruleScanner:a,findOptions:c}=_t(o,t,r.endRule,n,s===i),l=a.findNextMatchSync(e,s,c);return l?{captureIndices:l.captureIndices,matchedRuleId:l.ruleId}:null}function Sn(t,e,n,s,r,i,o){let a=Number.MAX_VALUE,c=null,l,u=0;const h=i.contentNameScopesList.getScopeNames();for(let f=0,d=t.length;f<d;f++){const g=t[f];if(!g.matcher(h))continue;const b=e.getRule(g.ruleId),{ruleScanner:_,findOptions:p}=_t(b,e,null,s,r===o),m=_.findNextMatchSync(n,r,p);if(!m)continue;const y=m.captureIndices[0].start;if(!(y>=a)&&(a=y,c=m.captureIndices,l=m.ruleId,u=g.priority,a===r))break}return c?{priorityMatch:u===-1,captureIndices:c,matchedRuleId:l}:null}function _t(t,e,n,s,r){return{ruleScanner:t.compileAG(e,n,s,r),findOptions:0}}function Cn(t,e,n,s,r){return{ruleScanner:t.compileWhileAG(e,n,s,r),findOptions:0}}function M(t,e,n,s,r,i,o){if(i.length===0)return;const a=e.content,c=Math.min(i.length,o.length),l=[],u=o[0].end;for(let h=0;h<c;h++){const f=i[h];if(f===null)continue;const d=o[h];if(d.length===0)continue;if(d.start>u)break;for(;l.length>0&&l[l.length-1].endPos<=d.start;)r.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?r.produceFromScopes(l[l.length-1].scopes,d.start):r.produce(s,d.start),f.retokenizeCapturedWithRuleId){const b=f.getName(a,o),_=s.contentNameScopesList.pushAttributed(b,t),p=f.getContentName(a,o),m=_.pushAttributed(p,t),y=s.push(f.retokenizeCapturedWithRuleId,d.start,-1,!1,null,_,m),R=t.createOnigString(a.substring(0,d.end));pt(t,R,n&&d.start===0,d.start,y,r,!1,0),ht(R);continue}const g=f.getName(a,o);if(g!==null){const _=(l.length>0?l[l.length-1].scopes:s.contentNameScopesList).pushAttributed(g,t);l.push(new wn(_,d.end))}}for(;l.length>0;)r.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var wn=class{scopes;endPos;constructor(t,e){this.scopes=t,this.endPos=e}};function Rn(t,e,n,s,r,i,o,a){return new kn(t,e,n,s,r,i,o,a)}function He(t,e,n,s,r){const i=Q(e,ee),o=gt.getCompiledRuleId(n,s,r.repository);for(const a of i)t.push({debugSelector:e,matcher:a.matcher,ruleId:o,grammar:r,priority:a.priority})}function ee(t,e){if(e.length<t.length)return!1;let n=0;return t.every(s=>{for(let r=n;r<e.length;r++)if(Nn(e[r],s))return n=r+1,!0;return!1})}function Nn(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 kn=class{constructor(t,e,n,s,r,i,o,a){if(this._rootScopeName=t,this.balancedBracketSelectors=i,this._onigLib=a,this._basicScopeAttributesProvider=new mn(n,s),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=Ue(e,null),this._injections=null,this._tokenTypeMatchers=[],r)for(const c of Object.keys(r)){const l=Q(c,ee);for(const u of l)this._tokenTypeMatchers.push({matcher:u.matcher,type:r[c]})}}_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:r=>r===this._rootScopeName?this._grammar:this.getExternalGrammar(r),injections:r=>this._grammarRepository.injections(r)},e=[],n=this._rootScopeName,s=t.lookup(n);if(s){const r=s.injections;if(r)for(let o in r)He(e,o,r[o],this,s);const i=this._grammarRepository.injections(n);i&&i.forEach(o=>{const a=this.getExternalGrammar(o);if(a){const c=a.injectionSelector;c&&He(e,c,a,this,a)}})}return e.sort((r,i)=>r.priority-i.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]=Ue(n,e&&e.$base),this._includedGrammars[t]}}tokenizeLine(t,e,n=0){const s=this._tokenize(t,e,!1,n);return{tokens:s.lineTokens.getResult(s.ruleStack,s.lineLength),ruleStack:s.ruleStack,stoppedEarly:s.stoppedEarly}}tokenizeLine2(t,e,n=0){const s=this._tokenize(t,e,!0,n);return{tokens:s.lineTokens.getBinaryResult(s.ruleStack,s.lineLength),ruleStack:s.ruleStack,stoppedEarly:s.stoppedEarly}}_tokenize(t,e,n,s){this._rootId===-1&&(this._rootId=gt.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let r;if(!e||e===Ne.NULL){r=!0;const l=this._basicScopeAttributesProvider.getDefaultAttributes(),u=this.themeProvider.getDefaults(),h=$.set(0,l.languageId,l.tokenType,null,u.fontStyle,u.foregroundId,u.backgroundId),f=this.getRule(this._rootId).getName(null,null);let d;f?d=j.createRootAndLookUpScopeName(f,h,this):d=j.createRoot("unknown",h),e=new Ne(null,this._rootId,-1,-1,!1,null,d,d)}else r=!1,e.reset();t=t+`
|
|
3
3
|
`;const i=this.createOnigString(t),o=i.content.length,a=new vn(n,t,this._tokenTypeMatchers,this.balancedBracketSelectors),c=pt(this,i,r,0,e,a,!0,s);return ht(i),{lineLength:o,lineTokens:a,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function Ue(t,e){return t=qt(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 j=class T{constructor(e,n,s){this.parent=e,this.scopePath=n,this.tokenAttributes=s}static fromExtension(e,n){let s=e,r=e?.scopePath??null;for(const i of n)r=ge.push(r,i.scopeNames),s=new T(s,r,i.encodedTokenAttributes);return s}static createRoot(e,n){return new T(null,new ge(null,e),n)}static createRootAndLookUpScopeName(e,n,s){const r=s.getMetadataForScope(e),i=new ge(null,e),o=s.themeProvider.themeMatch(i),a=T.mergeAttributes(n,r,o);return new T(null,i,a)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return T.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,s){let r=-1,i=0,o=0;return s!==null&&(r=s.fontStyle,i=s.foregroundId,o=s.backgroundId),$.set(e,n.languageId,n.tokenType,null,r,i,o)}pushAttributed(e,n){if(e===null)return this;if(e.indexOf(" ")===-1)return T._pushAttributed(this,e,n);const s=e.split(/ /g);let r=this;for(const i of s)r=T._pushAttributed(r,i,n);return r}static _pushAttributed(e,n,s){const r=s.getMetadataForScope(n),i=e.scopePath.push(n),o=s.themeProvider.themeMatch(i),a=T.mergeAttributes(e.tokenAttributes,r,o);return new T(e,i,a)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){const n=[];let s=this;for(;s&&s!==e;)n.push({encodedTokenAttributes:s.tokenAttributes,scopeNames:s.scopePath.getExtensionIfDefined(s.parent?.scopePath??null)}),s=s.parent;return s===e?n.reverse():void 0}},Ne=class E{constructor(e,n,s,r,i,o,a,c){this.parent=e,this.ruleId=n,this.beginRuleCapturedEOL=i,this.endRule=o,this.nameScopesList=a,this.contentNameScopesList=c,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=s,this._anchorPos=r}_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)?j.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,s,r,i,o,a){return new E(this,e,n,s,r,i,o,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 s=j.fromExtension(e?.nameScopesList??null,n.nameScopesList);return new E(e,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,s,j.fromExtension(s,n.contentNameScopesList))}},An=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(t,e){this.balancedBracketScopes=t.flatMap(n=>n==="*"?(this.allowAny=!0,[]):Q(n,ee).map(s=>s.matcher)),this.unbalancedBracketScopes=e.flatMap(n=>Q(n,ee).map(s=>s.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}},vn=class{constructor(t,e,n,s){this.balancedBracketSelectors=s,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 s=t?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const i=t?.getScopeNames()??[];for(const o of this._tokenTypeOverrides)o.matcher(i)&&(s=$.set(s,0,o.type,null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(i))}if(r&&(s=$.set(s,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===s){this._lastTokenEndIndex=e;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(s),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 s=0,r=this._binaryTokens.length;s<r;s++)n[s]=this._binaryTokens[s];return n}},Tn=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,s,r){if(!this._grammars.has(t)){let i=this._rawGrammars.get(t);if(!i)return null;this._grammars.set(t,Rn(t,i,e,n,s,r,this,this._onigLib))}return this._grammars.get(t)}},In=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new Tn(V.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,n){this._syncRegistry.setTheme(V.createFromRawTheme(e,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,n,s){return this.loadGrammarWithConfiguration(e,n,{embeddedLanguages:s})}loadGrammarWithConfiguration(e,n,s){return this._loadGrammar(e,n,s.embeddedLanguages,s.tokenTypes,new An(s.balancedBracketSelectors||[],s.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,n,s,r,i){const o=new sn(this._syncRegistry,e);for(;o.Q.length>0;)o.Q.map(a=>this._loadSingleGrammar(a.scopeName)),o.processQueue();return this._grammarForScopeName(e,n,s,r,i)}_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 s=typeof this._options.getInjections=="function"?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(n,s)}}addGrammar(e,n=[],s=0,r=null){return this._syncRegistry.addGrammar(e,n),this._grammarForScopeName(e.scopeName,s,r)}_grammarForScopeName(e,n=0,s=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(e,n,s,r,i)}},ke=Ne.NULL;function te(t,e){const n=typeof t=="string"?{}:{...t.colorReplacements},s=typeof t=="string"?t:t.name;for(const[r,i]of Object.entries(e?.colorReplacements||{}))typeof i=="string"?n[r]=i:r===s&&Object.assign(n,i);return n}function L(t,e){return t&&(e?.[t?.toLowerCase()]||t)}function Ln(t){return Array.isArray(t)?t:[t]}async function yt(t){return Promise.resolve(typeof t=="function"?t():t).then(e=>e.default||e)}function oe(t){return!t||["plaintext","txt","text","plain"].includes(t)}function bt(t){return t==="ansi"||oe(t)}function ae(t){return t==="none"}function St(t){return ae(t)}function ce(t,e=!1){if(t.length===0)return[["",0]];const n=t.split(/(\r?\n)/g);let s=0;const r=[];for(let i=0;i<n.length;i+=2){const o=e?n[i]+(n[i+1]||""):n[i];r.push([o,s]),s+=n[i].length,s+=n[i+1]?.length||0}return r}const Ke={light:"#333333",dark:"#bbbbbb"},Ye={light:"#fffffe",dark:"#1e1e1e"},Je="__shiki_resolved";function xe(t){if(t?.[Je])return t;const e={...t};e.tokenColors&&!e.settings&&(e.settings=e.tokenColors,delete e.tokenColors),e.type||="dark",e.colorReplacements={...e.colorReplacements},e.settings||=[];let{bg:n,fg:s}=e;if(!n||!s){const a=e.settings?e.settings.find(c=>!c.name&&!c.scope):void 0;a?.settings?.foreground&&(s=a.settings.foreground),a?.settings?.background&&(n=a.settings.background),!s&&e?.colors?.["editor.foreground"]&&(s=e.colors["editor.foreground"]),!n&&e?.colors?.["editor.background"]&&(n=e.colors["editor.background"]),s||(s=e.type==="light"?Ke.light:Ke.dark),n||(n=e.type==="light"?Ye.light:Ye.dark),e.fg=s,e.bg=n}e.settings[0]&&e.settings[0].settings&&!e.settings[0].scope||e.settings.unshift({settings:{foreground:e.fg,background:e.bg}});let r=0;const i=new Map;function o(a){if(i.has(a))return i.get(a);r+=1;const c=`#${r.toString(16).padStart(8,"0").toLowerCase()}`;return e.colorReplacements?.[`#${c}`]?o(a):(i.set(a,c),c)}e.settings=e.settings.map(a=>{const c=a.settings?.foreground&&!a.settings.foreground.startsWith("#"),l=a.settings?.background&&!a.settings.background.startsWith("#");if(!c&&!l)return a;const u={...a,settings:{...a.settings}};if(c){const h=o(a.settings.foreground);e.colorReplacements[h]=a.settings.foreground,u.settings.foreground=h}if(l){const h=o(a.settings.background);e.colorReplacements[h]=a.settings.background,u.settings.background=h}return u});for(const a of Object.keys(e.colors||{}))if((a==="editor.foreground"||a==="editor.background"||a.startsWith("terminal.ansi"))&&!e.colors[a]?.startsWith("#")){const c=o(e.colors[a]);e.colorReplacements[c]=e.colors[a],e.colors[a]=c}return Object.defineProperty(e,Je,{enumerable:!1,writable:!1,value:!0}),e}async function Ct(t){return Array.from(new Set((await Promise.all(t.filter(e=>!bt(e)).map(async e=>await yt(e).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function wt(t){return(await Promise.all(t.map(async e=>St(e)?null:xe(await yt(e))))).filter(e=>!!e)}function Rt(t,e){if(!e)return t;if(e[t]){const n=new Set([t]);for(;e[t];){if(t=e[t],n.has(t))throw new S(`Circular alias \`${Array.from(n).join(" -> ")} -> ${t}\``);n.add(t)}}return t}var xn=class extends In{_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(t,e,n,s={}){super(t),this._resolver=t,this._themes=e,this._langs=n,this._alias=s,this._themes.map(r=>this.loadTheme(r)),this.loadLanguages(this._langs)}getTheme(t){return typeof t=="string"?this._resolvedThemes.get(t):this.loadTheme(t)}loadTheme(t){const e=xe(t);return e.name&&(this._resolvedThemes.set(e.name,e),this._loadedThemesCache=null),e}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(t){let e=this._textmateThemeCache.get(t);e||(e=V.createFromRawTheme(t),this._textmateThemeCache.set(t,e)),this._syncRegistry.setTheme(e)}getGrammar(t){return t=Rt(t,this._alias),this._resolvedGrammars.get(t)}loadLanguage(t){if(this.getGrammar(t.name))return;const e=new Set([...this._langMap.values()].filter(r=>r.embeddedLangsLazy?.includes(t.name)));this._resolver.addLanguage(t);const n={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);const s=this.loadGrammarWithConfiguration(t.scopeName,1,n);if(s.name=t.name,this._resolvedGrammars.set(t.name,s),t.aliases&&t.aliases.forEach(r=>{this._alias[r]=t.name}),this._loadedLanguagesCache=null,e.size)for(const r of e)this._resolvedGrammars.delete(r.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(r.scopeName),this._syncRegistry?._grammars?.delete(r.scopeName),this.loadLanguage(this._langMap.get(r.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(t){for(const s of t)this.resolveEmbeddedLanguages(s);const e=Array.from(this._langGraph.entries()),n=e.filter(([s,r])=>!r);if(n.length){const s=e.filter(([r,i])=>i?(i.embeddedLanguages||i.embeddedLangs)?.some(o=>n.map(([a])=>a).includes(o)):!1).filter(r=>!n.includes(r));throw new S(`Missing languages ${n.map(([r])=>`\`${r}\``).join(", ")}, required by ${s.map(([r])=>`\`${r}\``).join(", ")}`)}for(const[s,r]of e)this._resolver.addLanguage(r);for(const[s,r]of e)this.loadLanguage(r)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(t){this._langMap.set(t.name,t),this._langGraph.set(t.name,t);const e=t.embeddedLanguages??t.embeddedLangs;if(e)for(const n of e)this._langGraph.set(n,this._langMap.get(n))}},En=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(t,e){this._onigLib={createOnigScanner:n=>t.createScanner(n),createOnigString:n=>t.createString(n)},e.forEach(n=>this.addLanguage(n))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach(e=>{this._langs.set(e,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(e=>{this._injections.get(e)||this._injections.set(e,[]),this._injections.get(e).push(t.scopeName)})}getInjections(t){const e=t.split(".");let n=[];for(let s=1;s<=e.length;s++){const r=e.slice(0,s).join(".");n=[...n,...this._injections.get(r)||[]]}return n}};let B=0;function Pn(t){B+=1,t.warnings!==!1&&B>=10&&B%10===0&&console.warn(`[Shiki] ${B} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let e=!1;if(!t.engine)throw new S("`engine` option is required for synchronous mode");const n=(t.langs||[]).flat(1),s=(t.themes||[]).flat(1).map(xe),r=new xn(new En(t.engine,n),s,n,t.langAlias);let i;function o(m){return Rt(m,t.langAlias)}function a(m){_();const y=r.getGrammar(typeof m=="string"?m:m.name);if(!y)throw new S(`Language \`${m}\` not found, you may need to load it first`);return y}function c(m){if(m==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};_();const y=r.getTheme(m);if(!y)throw new S(`Theme \`${m}\` not found, you may need to load it first`);return y}function l(m){_();const y=c(m);return i!==m&&(r.setTheme(y),i=m),{theme:y,colorMap:r.getColorMap()}}function u(){return _(),r.getLoadedThemes()}function h(){return _(),r.getLoadedLanguages()}function f(...m){_(),r.loadLanguages(m.flat(1))}async function d(...m){return f(await Ct(m))}function g(...m){_();for(const y of m.flat(1))r.loadTheme(y)}async function b(...m){return _(),g(await wt(m))}function _(){if(e)throw new S("Shiki instance has been disposed")}function p(){e||(e=!0,r.dispose(),B-=1)}return{setTheme:l,getTheme:c,getLanguage:a,getLoadedThemes:u,getLoadedLanguages:h,resolveLangAlias:o,loadLanguage:d,loadLanguageSync:f,loadTheme:b,loadThemeSync:g,dispose:p,[Symbol.dispose]:p}}async function Gn(t){t.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[e,n,s]=await Promise.all([wt(t.themes||[]),Ct(t.langs||[]),t.engine]);return Pn({...t,themes:e,langs:n,engine:s})}const Nt=new WeakMap;function le(t,e){Nt.set(t,e)}function q(t){return Nt.get(t)}var ue=class kt{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(e,n){return new kt(Object.fromEntries(Ln(n).map(s=>[s,ke])),e)}constructor(...e){if(e.length===2){const[n,s]=e;this.lang=s,this._stacks=n}else{const[n,s,r]=e;this.lang=s,this._stacks={[r]:n}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return On(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function On(t){const e=[],n=new Set;function s(r){if(n.has(r))return;n.add(r);const i=r?.nameScopesList?.scopeName;i&&e.push(i),r.parent&&s(r.parent)}return s(t),e}function $n(t,e){if(!(t instanceof ue))throw new S("Invalid grammar state");return t.getInternalStack(e)}function At(t,e,n={}){const{theme:s=t.getLoadedThemes()[0]}=n;if(oe(t.resolveLangAlias(n.lang||"text"))||ae(s))return ce(e).map(a=>[{content:a[0],offset:a[1]}]);const{theme:r,colorMap:i}=t.setTheme(s),o=t.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==o.name)throw new S(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(r.name))throw new S(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${r.name}"`)}return Mn(e,o,r,i,n)}function Bn(...t){if(t.length===2)return q(t[1]);const[e,n,s={}]=t,{lang:r="text",theme:i=e.getLoadedThemes()[0]}=s;if(oe(r)||ae(i))throw new S("Plain language does not have grammar state");if(r==="ansi")throw new S("ANSI language does not have grammar state");const{theme:o,colorMap:a}=e.setTheme(i),c=e.getLanguage(r);return new ue(Ee(n,c,o,a,s).stateStack,c.name,o.name)}function Mn(t,e,n,s,r){const i=Ee(t,e,n,s,r),o=new ue(i.stateStack,e.name,n.name);return le(i.tokens,o),i.tokens}function Ee(t,e,n,s,r){const i=te(n,r),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:a=500}=r,c=ce(t);let l=r.grammarState?$n(r.grammarState,n.name)??ke:r.grammarContextCode!=null?Ee(r.grammarContextCode,e,n,s,{...r,grammarState:void 0,grammarContextCode:void 0}).stateStack:ke,u=[];const h=[];for(let f=0,d=c.length;f<d;f++){const[g,b]=c[f];if(g===""){u=[],h.push([]);continue}if(o>0&&g.length>=o){u=[],h.push([{content:g,offset:b,color:"",fontStyle:0}]);continue}let _,p,m;r.includeExplanation&&(_=e.tokenizeLine(g,l,a),p=_.tokens,m=0);const y=e.tokenizeLine2(g,l,a),R=y.tokens.length/2;for(let C=0;C<R;C++){const v=y.tokens[2*C],x=C+1<R?y.tokens[2*C+2]:g.length;if(v===x)continue;const Oe=y.tokens[2*C+1],Ot=L(s[$.getForeground(Oe)],i),$t=$.getFontStyle(Oe),he={content:g.substring(v,x),offset:b+v,color:Ot,fontStyle:$t};if(r.includeExplanation){const $e=[];if(r.includeExplanation!=="scopeName")for(const I of n.settings){let G;switch(typeof I.scope){case"string":G=I.scope.split(/,/).map(fe=>fe.trim());break;case"object":G=I.scope;break;default:continue}$e.push({settings:I,selectors:G.map(fe=>fe.split(/ /))})}he.explanation=[];let Be=0;for(;v+Be<x;){const I=p[m],G=g.substring(I.startIndex,I.endIndex);Be+=G.length,he.explanation.push({content:G,scopes:r.includeExplanation==="scopeName"?jn(I.scopes):Dn($e,I.scopes)}),m+=1}}u.push(he)}h.push(u),u=[],l=y.ruleStack}return{tokens:h,stateStack:l}}function jn(t){return t.map(e=>({scopeName:e}))}function Dn(t,e){const n=[];for(let s=0,r=e.length;s<r;s++){const i=e[s];n[s]={scopeName:i,themeMatches:Fn(t,i,e.slice(0,s))}}return n}function Ve(t,e){return t===e||e.substring(0,t.length)===t&&e[t.length]==="."}function Wn(t,e,n){if(!Ve(t[t.length-1],e))return!1;let s=t.length-2,r=n.length-1;for(;s>=0&&r>=0;)Ve(t[s],n[r])&&(s-=1),r-=1;return s===-1}function Fn(t,e,n){const s=[];for(const{selectors:r,settings:i}of t)for(const o of r)if(Wn(o,e,n)){s.push(i);break}return s}function vt(t,e,n,s=At){const r=Object.entries(n.themes).filter(l=>l[1]).map(l=>({color:l[0],theme:l[1]})),i=r.map(l=>{const u=s(t,e,{...n,theme:l.theme});return{tokens:u,state:q(u),theme:typeof l.theme=="string"?l.theme:l.theme.name}}),o=qn(...i.map(l=>l.tokens)),a=o[0].map((l,u)=>l.map((h,f)=>{const d={content:h.content,variants:{},offset:h.offset};return"includeExplanation"in n&&n.includeExplanation&&(d.explanation=h.explanation),o.forEach((g,b)=>{const{content:_,explanation:p,offset:m,...y}=g[u][f];d.variants[r[b].color]=y}),d})),c=i[0].state?new ue(Object.fromEntries(i.map(l=>[l.theme,l.state?.getInternalStack(l.theme)])),i[0].state.lang):void 0;return c&&le(a,c),a}function qn(...t){const e=t.map(()=>[]),n=t.length;for(let s=0;s<t[0].length;s++){const r=t.map(c=>c[s]),i=e.map(()=>[]);e.forEach((c,l)=>c.push(i[l]));const o=r.map(()=>0),a=r.map(c=>c[0]);for(;a.every(c=>c);){const c=Math.min(...a.map(l=>l.content.length));for(let l=0;l<n;l++){const u=a[l];u.content.length===c?(i[l].push(u),o[l]+=1,a[l]=r[l][o[l]]):(i[l].push({...u,content:u.content.slice(0,c)}),a[l]={...u,content:u.content.slice(c),offset:u.offset+c})}}}return e}const zn=/["&'<>`]/g,Hn=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Un=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Kn=/[|\\{}()[\]^$+*?.]/g,Qe=new WeakMap;function Yn(t,e){if(t=t.replace(e.subset?Jn(e.subset):zn,s),e.subset||e.escapeOnly)return t;return t.replace(Hn,n).replace(Un,s);function n(r,i,o){return e.format((r.charCodeAt(0)-55296)*1024+r.charCodeAt(1)-56320+65536,o.charCodeAt(i+2),e)}function s(r,i,o){return e.format(r.charCodeAt(0),o.charCodeAt(i+1),e)}}function Jn(t){let e=Qe.get(t);return e||(e=Vn(t),Qe.set(t,e)),e}function Vn(t){const e=[];let n=-1;for(;++n<t.length;)e.push(t[n].replace(Kn,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}const Qn=/[\dA-Fa-f]/;function Xn(t,e,n){const s="&#x"+t.toString(16).toUpperCase();return n&&e&&!Qn.test(String.fromCharCode(e))?s:s+";"}const Zn=/\d/;function es(t,e,n){const s="&#"+String(t);return n&&e&&!Zn.test(String.fromCharCode(e))?s:s+";"}const ts=["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"],pe={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:"€"},ns=["cent","copy","divide","gt","lt","not","para","times"],Tt={}.hasOwnProperty,Ae={};let U;for(U in pe)Tt.call(pe,U)&&(Ae[pe[U]]=U);const ss=/[^\dA-Za-z]/;function rs(t,e,n,s){const r=String.fromCharCode(t);if(Tt.call(Ae,r)){const i=Ae[r],o="&"+i;return n&&ts.includes(i)&&!ns.includes(i)&&(!s||e&&e!==61&&ss.test(String.fromCharCode(e)))?o:o+";"}return""}function is(t,e,n){let s=Xn(t,e,n.omitOptionalSemicolons),r;if((n.useNamedReferences||n.useShortestReferences)&&(r=rs(t,e,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!r)&&n.useShortestReferences){const i=es(t,e,n.omitOptionalSemicolons);i.length<s.length&&(s=i)}return r&&(!n.useShortestReferences||r.length<s.length)?r:s}function O(t,e){return Yn(t,Object.assign({format:is},e))}const os=/^>|^->|<!--|-->|--!>|<!-$/g,as=[">"],cs=["<",">"];function ls(t,e,n,s){return s.settings.bogusComments?"<?"+O(t.value,Object.assign({},s.settings.characterReferences,{subset:as}))+">":"<!--"+t.value.replace(os,r)+"-->";function r(i){return O(i,Object.assign({},s.settings.characterReferences,{subset:cs}))}}function us(t,e,n,s){return"<!"+(s.settings.upperDoctype?"DOCTYPE":"doctype")+(s.settings.tightDoctype?"":" ")+"html>"}const w=Lt(1),It=Lt(-1),hs=[];function Lt(t){return e;function e(n,s,r){const i=n?n.children:hs;let o=(s||0)+t,a=i[o];if(!r)for(;a&&Ie(a);)o+=t,a=i[o];return a}}const fs={}.hasOwnProperty;function xt(t){return e;function e(n,s,r){return fs.call(t,n.tagName)&&t[n.tagName](n,s,r)}}const Pe=xt({body:gs,caption:_e,colgroup:_e,dd:ys,dt:_s,head:_e,html:ds,li:ps,optgroup:bs,option:Ss,p:ms,rp:Xe,rt:Xe,tbody:ws,td:Ze,tfoot:Rs,th:Ze,thead:Cs,tr:Ns});function _e(t,e,n){const s=w(n,e,!0);return!s||s.type!=="comment"&&!(s.type==="text"&&Ie(s.value.charAt(0)))}function ds(t,e,n){const s=w(n,e);return!s||s.type!=="comment"}function gs(t,e,n){const s=w(n,e);return!s||s.type!=="comment"}function ms(t,e,n){const s=w(n,e);return s?s.type==="element"&&(s.tagName==="address"||s.tagName==="article"||s.tagName==="aside"||s.tagName==="blockquote"||s.tagName==="details"||s.tagName==="div"||s.tagName==="dl"||s.tagName==="fieldset"||s.tagName==="figcaption"||s.tagName==="figure"||s.tagName==="footer"||s.tagName==="form"||s.tagName==="h1"||s.tagName==="h2"||s.tagName==="h3"||s.tagName==="h4"||s.tagName==="h5"||s.tagName==="h6"||s.tagName==="header"||s.tagName==="hgroup"||s.tagName==="hr"||s.tagName==="main"||s.tagName==="menu"||s.tagName==="nav"||s.tagName==="ol"||s.tagName==="p"||s.tagName==="pre"||s.tagName==="section"||s.tagName==="table"||s.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 ps(t,e,n){const s=w(n,e);return!s||s.type==="element"&&s.tagName==="li"}function _s(t,e,n){const s=w(n,e);return!!(s&&s.type==="element"&&(s.tagName==="dt"||s.tagName==="dd"))}function ys(t,e,n){const s=w(n,e);return!s||s.type==="element"&&(s.tagName==="dt"||s.tagName==="dd")}function Xe(t,e,n){const s=w(n,e);return!s||s.type==="element"&&(s.tagName==="rp"||s.tagName==="rt")}function bs(t,e,n){const s=w(n,e);return!s||s.type==="element"&&s.tagName==="optgroup"}function Ss(t,e,n){const s=w(n,e);return!s||s.type==="element"&&(s.tagName==="option"||s.tagName==="optgroup")}function Cs(t,e,n){const s=w(n,e);return!!(s&&s.type==="element"&&(s.tagName==="tbody"||s.tagName==="tfoot"))}function ws(t,e,n){const s=w(n,e);return!s||s.type==="element"&&(s.tagName==="tbody"||s.tagName==="tfoot")}function Rs(t,e,n){return!w(n,e)}function Ns(t,e,n){const s=w(n,e);return!s||s.type==="element"&&s.tagName==="tr"}function Ze(t,e,n){const s=w(n,e);return!s||s.type==="element"&&(s.tagName==="td"||s.tagName==="th")}const ks=xt({body:Ts,colgroup:Is,head:vs,html:As,tbody:Ls});function As(t){const e=w(t,-1);return!e||e.type!=="comment"}function vs(t){const e=new Set;for(const s of t.children)if(s.type==="element"&&(s.tagName==="base"||s.tagName==="title")){if(e.has(s.tagName))return!1;e.add(s.tagName)}const n=t.children[0];return!n||n.type==="element"}function Ts(t){const e=w(t,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&Ie(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function Is(t,e,n){const s=It(n,e),r=w(t,-1,!0);return n&&s&&s.type==="element"&&s.tagName==="colgroup"&&Pe(s,n.children.indexOf(s),n)?!1:!!(r&&r.type==="element"&&r.tagName==="col")}function Ls(t,e,n){const s=It(n,e),r=w(t,-1);return n&&s&&s.type==="element"&&(s.tagName==="thead"||s.tagName==="tbody")&&Pe(s,n.children.indexOf(s),n)?!1:!!(r&&r.type==="element"&&r.tagName==="tr")}const K={name:[[`
|
|
4
4
|
\f\r &/=>`.split(""),`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,j as m}from"./index-
|
|
1
|
+
import{r as s,j as m}from"./index-Po1UZSgL.js";import{u as d,a as P}from"./index-DOC-_zsC.js";const c={search:"Search",searchNoResult:"No results found",toc:"On this page",tocNoHeadings:"No Headings",lastUpdate:"Last updated on",chooseLanguage:"Choose a language",nextPage:"Next Page",previousPage:"Previous Page",chooseTheme:"Theme",editOnGithub:"Edit on GitHub"},h=s.createContext({text:{...c}});function R(t){return C().text[t.label]}function C(){return s.useContext(h)}function b({locales:t=[],locale:o,onLocaleChange:a,children:g,translations:r}){const f=d(),x=P(),u=e=>{if(a)return a(e);const n=x.split("/").filter(p=>p.length>0);n[0]!==o?n.unshift(e):n[0]=e,f.push(`/${n.join("/")}`)},i=s.useRef(u);return i.current=u,m.jsx(h,{value:s.useMemo(()=>({locale:o,locales:t,text:{...c,...r},onChange:e=>i.current(e)}),[o,t,r]),children:g})}export{R as I,b as a,C as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as s,j as Re}from"./index-OFfnl8sH.js";import{f as j,u as Oe,P as Pe,h as he,l as nt}from"./index-Bojr-xLv.js";function rt(e,t=globalThis?.document){const n=j(e);s.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var ot="DismissableLayer",Se="dismissableLayer.update",at="dismissableLayer.pointerDownOutside",it="dismissableLayer.focusOutside",ke,Ke=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ct=s.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:u,onDismiss:a,...p}=e,d=s.useContext(Ke),[h,m]=s.useState(null),f=h?.ownerDocument??globalThis?.document,[,E]=s.useState({}),S=Oe(t,g=>m(g)),c=Array.from(d.layers),[l]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),v=c.indexOf(l),y=h?c.indexOf(h):-1,b=d.layersWithOutsidePointerEventsDisabled.size>0,w=y>=v,R=lt(g=>{const P=g.target,F=[...d.branches].some(A=>A.contains(P));!w||F||(o?.(g),u?.(g),g.defaultPrevented||a?.())},f),O=dt(g=>{const P=g.target;[...d.branches].some(A=>A.contains(P))||(i?.(g),u?.(g),g.defaultPrevented||a?.())},f);return rt(g=>{y===d.layers.size-1&&(r?.(g),!g.defaultPrevented&&a&&(g.preventDefault(),a()))},f),s.useEffect(()=>{if(h)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(ke=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(h)),d.layers.add(h),Fe(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=ke)}},[h,f,n,d]),s.useEffect(()=>()=>{h&&(d.layers.delete(h),d.layersWithOutsidePointerEventsDisabled.delete(h),Fe())},[h,d]),s.useEffect(()=>{const g=()=>E({});return document.addEventListener(Se,g),()=>document.removeEventListener(Se,g)},[]),Re.jsx(Pe.div,{...p,ref:S,style:{pointerEvents:b?w?"auto":"none":void 0,...e.style},onFocusCapture:he(e.onFocusCapture,O.onFocusCapture),onBlurCapture:he(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:he(e.onPointerDownCapture,R.onPointerDownCapture)})});ct.displayName=ot;var st="DismissableLayerBranch",ut=s.forwardRef((e,t)=>{const n=s.useContext(Ke),r=s.useRef(null),o=Oe(t,r);return s.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),Re.jsx(Pe.div,{...e,ref:o})});ut.displayName=st;function lt(e,t=globalThis?.document){const n=j(e),r=s.useRef(!1),o=s.useRef(()=>{});return s.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let p=function(){Xe(at,n,d,{discrete:!0})};const d={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=p,t.addEventListener("click",o.current,{once:!0})):p()}else t.removeEventListener("click",o.current);r.current=!1},u=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(u),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function dt(e,t=globalThis?.document){const n=j(e),r=s.useRef(!1);return s.useEffect(()=>{const o=i=>{i.target&&!r.current&&Xe(it,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Fe(){const e=new CustomEvent(Se);document.dispatchEvent(e)}function Xe(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?nt(o,i):o.dispatchEvent(i)}var me=0;function dn(){s.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ae()),document.body.insertAdjacentElement("beforeend",e[1]??Ae()),me++,()=>{me===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),me--}},[])}function Ae(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var pe="focusScope.autoFocusOnMount",ge="focusScope.autoFocusOnUnmount",De={bubbles:!1,cancelable:!0},ft="FocusScope",vt=s.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...u}=e,[a,p]=s.useState(null),d=j(o),h=j(i),m=s.useRef(null),f=Oe(t,c=>p(c)),E=s.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;s.useEffect(()=>{if(r){let c=function(b){if(E.paused||!a)return;const w=b.target;a.contains(w)?m.current=w:N(m.current,{select:!0})},l=function(b){if(E.paused||!a)return;const w=b.relatedTarget;w!==null&&(a.contains(w)||N(m.current,{select:!0}))},v=function(b){if(document.activeElement===document.body)for(const R of b)R.removedNodes.length>0&&N(a)};document.addEventListener("focusin",c),document.addEventListener("focusout",l);const y=new MutationObserver(v);return a&&y.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",c),document.removeEventListener("focusout",l),y.disconnect()}}},[r,a,E.paused]),s.useEffect(()=>{if(a){Ne.add(E);const c=document.activeElement;if(!a.contains(c)){const v=new CustomEvent(pe,De);a.addEventListener(pe,d),a.dispatchEvent(v),v.defaultPrevented||(ht(Et(Ye(a)),{select:!0}),document.activeElement===c&&N(a))}return()=>{a.removeEventListener(pe,d),setTimeout(()=>{const v=new CustomEvent(ge,De);a.addEventListener(ge,h),a.dispatchEvent(v),v.defaultPrevented||N(c??document.body,{select:!0}),a.removeEventListener(ge,h),Ne.remove(E)},0)}}},[a,d,h,E]);const S=s.useCallback(c=>{if(!n&&!r||E.paused)return;const l=c.key==="Tab"&&!c.altKey&&!c.ctrlKey&&!c.metaKey,v=document.activeElement;if(l&&v){const y=c.currentTarget,[b,w]=mt(y);b&&w?!c.shiftKey&&v===w?(c.preventDefault(),n&&N(b,{select:!0})):c.shiftKey&&v===b&&(c.preventDefault(),n&&N(w,{select:!0})):v===y&&c.preventDefault()}},[n,r,E.paused]);return Re.jsx(Pe.div,{tabIndex:-1,...u,ref:f,onKeyDown:S})});vt.displayName=ft;function ht(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(N(r,{select:t}),document.activeElement!==n)return}function mt(e){const t=Ye(e),n=Me(t,e),r=Me(t.reverse(),e);return[n,r]}function Ye(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Me(e,t){for(const n of e)if(!pt(n,{upTo:t}))return n}function pt(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function gt(e){return e instanceof HTMLInputElement&&"select"in e}function N(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&>(e)&&t&&e.select()}}var Ne=yt();function yt(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=We(e,t),e.unshift(t)},remove(t){e=We(e,t),e[0]?.resume()}}}function We(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Et(e){return e.filter(t=>t.tagName!=="A")}var bt=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},I=new WeakMap,ee=new WeakMap,te={},ye=0,ze=function(e){return e&&(e.host||ze(e.parentNode))},wt=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=ze(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},St=function(e,t,n,r){var o=wt(t,Array.isArray(e)?e:[e]);te[n]||(te[n]=new WeakMap);var i=te[n],u=[],a=new Set,p=new Set(o),d=function(m){!m||a.has(m)||(a.add(m),d(m.parentNode))};o.forEach(d);var h=function(m){!m||p.has(m)||Array.prototype.forEach.call(m.children,function(f){if(a.has(f))h(f);else try{var E=f.getAttribute(r),S=E!==null&&E!=="false",c=(I.get(f)||0)+1,l=(i.get(f)||0)+1;I.set(f,c),i.set(f,l),u.push(f),c===1&&S&&ee.set(f,!0),l===1&&f.setAttribute(n,"true"),S||f.setAttribute(r,"true")}catch(v){console.error("aria-hidden: cannot operate on ",f,v)}})};return h(t),a.clear(),ye++,function(){u.forEach(function(m){var f=I.get(m)-1,E=i.get(m)-1;I.set(m,f),i.set(m,E),f||(ee.has(m)||m.removeAttribute(r),ee.delete(m)),E||m.removeAttribute(n)}),ye--,ye||(I=new WeakMap,I=new WeakMap,ee=new WeakMap,te={})}},fn=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=bt(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),St(r,o,n,"aria-hidden")):function(){return null}},k=function(){return k=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},k.apply(this,arguments)};function Ge(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Ct(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var ie="right-scroll-bar-position",ce="width-before-scroll-bar",Rt="with-scroll-bars-hidden",Ot="--removed-body-scroll-bar-size";function Ee(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Pt(e,t){var n=s.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Tt=typeof window<"u"?s.useLayoutEffect:s.useEffect,xe=new WeakMap;function Lt(e,t){var n=Pt(null,function(r){return e.forEach(function(o){return Ee(o,r)})});return Tt(function(){var r=xe.get(n);if(r){var o=new Set(r),i=new Set(e),u=n.current;o.forEach(function(a){i.has(a)||Ee(a,null)}),i.forEach(function(a){o.has(a)||Ee(a,u)})}xe.set(n,e)},[e]),n}function kt(e){return e}function Ft(e,t){t===void 0&&(t=kt);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var u=t(i,r);return n.push(u),function(){n=n.filter(function(a){return a!==u})}},assignSyncMedium:function(i){for(r=!0;n.length;){var u=n;n=[],u.forEach(i)}n={push:function(a){return i(a)},filter:function(){return n}}},assignMedium:function(i){r=!0;var u=[];if(n.length){var a=n;n=[],a.forEach(i),u=n}var p=function(){var h=u;u=[],h.forEach(i)},d=function(){return Promise.resolve().then(p)};d(),n={push:function(h){u.push(h),d()},filter:function(h){return u=u.filter(h),n}}}};return o}function At(e){e===void 0&&(e={});var t=Ft(null);return t.options=k({async:!0,ssr:!1},e),t}var Ze=function(e){var t=e.sideCar,n=Ge(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return s.createElement(r,k({},n))};Ze.isSideCarExport=!0;function Dt(e,t){return e.useMedium(t),Ze}var qe=At(),be=function(){},se=s.forwardRef(function(e,t){var n=s.useRef(null),r=s.useState({onScrollCapture:be,onWheelCapture:be,onTouchMoveCapture:be}),o=r[0],i=r[1],u=e.forwardProps,a=e.children,p=e.className,d=e.removeScrollBar,h=e.enabled,m=e.shards,f=e.sideCar,E=e.noRelative,S=e.noIsolation,c=e.inert,l=e.allowPinchZoom,v=e.as,y=v===void 0?"div":v,b=e.gapMode,w=Ge(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),R=f,O=Lt([n,t]),g=k(k({},w),o);return s.createElement(s.Fragment,null,h&&s.createElement(R,{sideCar:qe,removeScrollBar:d,shards:m,noRelative:E,noIsolation:S,inert:c,setCallbacks:i,allowPinchZoom:!!l,lockRef:n,gapMode:b}),u?s.cloneElement(s.Children.only(a),k(k({},g),{ref:O})):s.createElement(y,k({},g,{className:p,ref:O}),a))});se.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};se.classNames={fullWidth:ce,zeroRight:ie};var Mt=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Nt(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Mt();return t&&e.setAttribute("nonce",t),e}function Wt(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function xt(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var It=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Nt())&&(Wt(t,n),xt(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Bt=function(){var e=It();return function(t,n){s.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Qe=function(){var e=Bt(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Ht={left:0,top:0,right:0,gap:0},we=function(e){return parseInt(e||"",10)||0},Ut=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[we(n),we(r),we(o)]},_t=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Ht;var t=Ut(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},jt=Qe(),U="data-scroll-locked",Vt=function(e,t,n,r){var o=e.left,i=e.top,u=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
1
|
+
import{r as s,j as Re}from"./index-Po1UZSgL.js";import{f as j,u as Oe,P as Pe,h as he,l as nt}from"./index-CkzHlXhF.js";function rt(e,t=globalThis?.document){const n=j(e);s.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var ot="DismissableLayer",Se="dismissableLayer.update",at="dismissableLayer.pointerDownOutside",it="dismissableLayer.focusOutside",ke,Ke=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ct=s.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:u,onDismiss:a,...p}=e,d=s.useContext(Ke),[h,m]=s.useState(null),f=h?.ownerDocument??globalThis?.document,[,E]=s.useState({}),S=Oe(t,g=>m(g)),c=Array.from(d.layers),[l]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),v=c.indexOf(l),y=h?c.indexOf(h):-1,b=d.layersWithOutsidePointerEventsDisabled.size>0,w=y>=v,R=lt(g=>{const P=g.target,F=[...d.branches].some(A=>A.contains(P));!w||F||(o?.(g),u?.(g),g.defaultPrevented||a?.())},f),O=dt(g=>{const P=g.target;[...d.branches].some(A=>A.contains(P))||(i?.(g),u?.(g),g.defaultPrevented||a?.())},f);return rt(g=>{y===d.layers.size-1&&(r?.(g),!g.defaultPrevented&&a&&(g.preventDefault(),a()))},f),s.useEffect(()=>{if(h)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(ke=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(h)),d.layers.add(h),Fe(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=ke)}},[h,f,n,d]),s.useEffect(()=>()=>{h&&(d.layers.delete(h),d.layersWithOutsidePointerEventsDisabled.delete(h),Fe())},[h,d]),s.useEffect(()=>{const g=()=>E({});return document.addEventListener(Se,g),()=>document.removeEventListener(Se,g)},[]),Re.jsx(Pe.div,{...p,ref:S,style:{pointerEvents:b?w?"auto":"none":void 0,...e.style},onFocusCapture:he(e.onFocusCapture,O.onFocusCapture),onBlurCapture:he(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:he(e.onPointerDownCapture,R.onPointerDownCapture)})});ct.displayName=ot;var st="DismissableLayerBranch",ut=s.forwardRef((e,t)=>{const n=s.useContext(Ke),r=s.useRef(null),o=Oe(t,r);return s.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),Re.jsx(Pe.div,{...e,ref:o})});ut.displayName=st;function lt(e,t=globalThis?.document){const n=j(e),r=s.useRef(!1),o=s.useRef(()=>{});return s.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let p=function(){Xe(at,n,d,{discrete:!0})};const d={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=p,t.addEventListener("click",o.current,{once:!0})):p()}else t.removeEventListener("click",o.current);r.current=!1},u=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(u),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function dt(e,t=globalThis?.document){const n=j(e),r=s.useRef(!1);return s.useEffect(()=>{const o=i=>{i.target&&!r.current&&Xe(it,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Fe(){const e=new CustomEvent(Se);document.dispatchEvent(e)}function Xe(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?nt(o,i):o.dispatchEvent(i)}var me=0;function dn(){s.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ae()),document.body.insertAdjacentElement("beforeend",e[1]??Ae()),me++,()=>{me===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),me--}},[])}function Ae(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var pe="focusScope.autoFocusOnMount",ge="focusScope.autoFocusOnUnmount",De={bubbles:!1,cancelable:!0},ft="FocusScope",vt=s.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...u}=e,[a,p]=s.useState(null),d=j(o),h=j(i),m=s.useRef(null),f=Oe(t,c=>p(c)),E=s.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;s.useEffect(()=>{if(r){let c=function(b){if(E.paused||!a)return;const w=b.target;a.contains(w)?m.current=w:N(m.current,{select:!0})},l=function(b){if(E.paused||!a)return;const w=b.relatedTarget;w!==null&&(a.contains(w)||N(m.current,{select:!0}))},v=function(b){if(document.activeElement===document.body)for(const R of b)R.removedNodes.length>0&&N(a)};document.addEventListener("focusin",c),document.addEventListener("focusout",l);const y=new MutationObserver(v);return a&&y.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",c),document.removeEventListener("focusout",l),y.disconnect()}}},[r,a,E.paused]),s.useEffect(()=>{if(a){Ne.add(E);const c=document.activeElement;if(!a.contains(c)){const v=new CustomEvent(pe,De);a.addEventListener(pe,d),a.dispatchEvent(v),v.defaultPrevented||(ht(Et(Ye(a)),{select:!0}),document.activeElement===c&&N(a))}return()=>{a.removeEventListener(pe,d),setTimeout(()=>{const v=new CustomEvent(ge,De);a.addEventListener(ge,h),a.dispatchEvent(v),v.defaultPrevented||N(c??document.body,{select:!0}),a.removeEventListener(ge,h),Ne.remove(E)},0)}}},[a,d,h,E]);const S=s.useCallback(c=>{if(!n&&!r||E.paused)return;const l=c.key==="Tab"&&!c.altKey&&!c.ctrlKey&&!c.metaKey,v=document.activeElement;if(l&&v){const y=c.currentTarget,[b,w]=mt(y);b&&w?!c.shiftKey&&v===w?(c.preventDefault(),n&&N(b,{select:!0})):c.shiftKey&&v===b&&(c.preventDefault(),n&&N(w,{select:!0})):v===y&&c.preventDefault()}},[n,r,E.paused]);return Re.jsx(Pe.div,{tabIndex:-1,...u,ref:f,onKeyDown:S})});vt.displayName=ft;function ht(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(N(r,{select:t}),document.activeElement!==n)return}function mt(e){const t=Ye(e),n=Me(t,e),r=Me(t.reverse(),e);return[n,r]}function Ye(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Me(e,t){for(const n of e)if(!pt(n,{upTo:t}))return n}function pt(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function gt(e){return e instanceof HTMLInputElement&&"select"in e}function N(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&>(e)&&t&&e.select()}}var Ne=yt();function yt(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=We(e,t),e.unshift(t)},remove(t){e=We(e,t),e[0]?.resume()}}}function We(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Et(e){return e.filter(t=>t.tagName!=="A")}var bt=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},I=new WeakMap,ee=new WeakMap,te={},ye=0,ze=function(e){return e&&(e.host||ze(e.parentNode))},wt=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=ze(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},St=function(e,t,n,r){var o=wt(t,Array.isArray(e)?e:[e]);te[n]||(te[n]=new WeakMap);var i=te[n],u=[],a=new Set,p=new Set(o),d=function(m){!m||a.has(m)||(a.add(m),d(m.parentNode))};o.forEach(d);var h=function(m){!m||p.has(m)||Array.prototype.forEach.call(m.children,function(f){if(a.has(f))h(f);else try{var E=f.getAttribute(r),S=E!==null&&E!=="false",c=(I.get(f)||0)+1,l=(i.get(f)||0)+1;I.set(f,c),i.set(f,l),u.push(f),c===1&&S&&ee.set(f,!0),l===1&&f.setAttribute(n,"true"),S||f.setAttribute(r,"true")}catch(v){console.error("aria-hidden: cannot operate on ",f,v)}})};return h(t),a.clear(),ye++,function(){u.forEach(function(m){var f=I.get(m)-1,E=i.get(m)-1;I.set(m,f),i.set(m,E),f||(ee.has(m)||m.removeAttribute(r),ee.delete(m)),E||m.removeAttribute(n)}),ye--,ye||(I=new WeakMap,I=new WeakMap,ee=new WeakMap,te={})}},fn=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=bt(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),St(r,o,n,"aria-hidden")):function(){return null}},k=function(){return k=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},k.apply(this,arguments)};function Ge(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Ct(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var ie="right-scroll-bar-position",ce="width-before-scroll-bar",Rt="with-scroll-bars-hidden",Ot="--removed-body-scroll-bar-size";function Ee(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Pt(e,t){var n=s.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Tt=typeof window<"u"?s.useLayoutEffect:s.useEffect,xe=new WeakMap;function Lt(e,t){var n=Pt(null,function(r){return e.forEach(function(o){return Ee(o,r)})});return Tt(function(){var r=xe.get(n);if(r){var o=new Set(r),i=new Set(e),u=n.current;o.forEach(function(a){i.has(a)||Ee(a,null)}),i.forEach(function(a){o.has(a)||Ee(a,u)})}xe.set(n,e)},[e]),n}function kt(e){return e}function Ft(e,t){t===void 0&&(t=kt);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var u=t(i,r);return n.push(u),function(){n=n.filter(function(a){return a!==u})}},assignSyncMedium:function(i){for(r=!0;n.length;){var u=n;n=[],u.forEach(i)}n={push:function(a){return i(a)},filter:function(){return n}}},assignMedium:function(i){r=!0;var u=[];if(n.length){var a=n;n=[],a.forEach(i),u=n}var p=function(){var h=u;u=[],h.forEach(i)},d=function(){return Promise.resolve().then(p)};d(),n={push:function(h){u.push(h),d()},filter:function(h){return u=u.filter(h),n}}}};return o}function At(e){e===void 0&&(e={});var t=Ft(null);return t.options=k({async:!0,ssr:!1},e),t}var Ze=function(e){var t=e.sideCar,n=Ge(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return s.createElement(r,k({},n))};Ze.isSideCarExport=!0;function Dt(e,t){return e.useMedium(t),Ze}var qe=At(),be=function(){},se=s.forwardRef(function(e,t){var n=s.useRef(null),r=s.useState({onScrollCapture:be,onWheelCapture:be,onTouchMoveCapture:be}),o=r[0],i=r[1],u=e.forwardProps,a=e.children,p=e.className,d=e.removeScrollBar,h=e.enabled,m=e.shards,f=e.sideCar,E=e.noRelative,S=e.noIsolation,c=e.inert,l=e.allowPinchZoom,v=e.as,y=v===void 0?"div":v,b=e.gapMode,w=Ge(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),R=f,O=Lt([n,t]),g=k(k({},w),o);return s.createElement(s.Fragment,null,h&&s.createElement(R,{sideCar:qe,removeScrollBar:d,shards:m,noRelative:E,noIsolation:S,inert:c,setCallbacks:i,allowPinchZoom:!!l,lockRef:n,gapMode:b}),u?s.cloneElement(s.Children.only(a),k(k({},g),{ref:O})):s.createElement(y,k({},g,{className:p,ref:O}),a))});se.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};se.classNames={fullWidth:ce,zeroRight:ie};var Mt=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Nt(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Mt();return t&&e.setAttribute("nonce",t),e}function Wt(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function xt(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var It=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Nt())&&(Wt(t,n),xt(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Bt=function(){var e=It();return function(t,n){s.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Qe=function(){var e=Bt(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Ht={left:0,top:0,right:0,gap:0},we=function(e){return parseInt(e||"",10)||0},Ut=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[we(n),we(r),we(o)]},_t=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Ht;var t=Ut(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},jt=Qe(),U="data-scroll-locked",Vt=function(e,t,n,r){var o=e.left,i=e.top,u=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
2
2
|
.`.concat(Rt,` {
|
|
3
3
|
overflow: hidden `).concat(r,`;
|
|
4
4
|
padding-right: `).concat(a,"px ").concat(r,`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as g,v as h}from"./index-
|
|
1
|
+
import{r as g,v as h}from"./index-DOsFxkYv.js";function u(i){return i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function c(i){const s=i.trim();if(s.length===0)return null;const t=Array.from(new Set(s.split(/\s+/).filter(Boolean)));if(t.length===0)return null;const e=t.map(u).join("|");return new RegExp(`(${e})`,"gi")}const o=g();function p(i){const s=typeof i=="string"?c(i):i;return{highlight(t){if(!s)return[{type:"text",content:t}];const e=[];let n=0;for(const r of t.matchAll(s))n<r.index&&e.push({type:"text",content:t.substring(n,r.index)}),e.push({type:"text",content:r[0],styles:{highlight:!0}}),n=r.index+r[0].length;return n<t.length&&e.push({type:"text",content:t.substring(n)}),e},highlightMarkdown(t){if(!s)return t;const e=o.parse(t);return a(e,s),o.stringify(e).trim()}}}function a(i,s){h(i,"text",t=>{let e="";const n=t.value;let r=0;for(const l of n.matchAll(s))r<l.index&&(e+=n.substring(r,l.index)),e+=`<mark>${l[0]}</mark>`,r=l.index+l[0].length;r<n.length&&(e+=n.substring(r)),t.type="html",t.value=e})}export{p as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as d,a as V,b as L}from"./index-Bojr-xLv.js";import{P as q,a as B,b as U,T as X}from"./collapsible-B2rvGry7.js";import{u as Y}from"./index-Bonlu0LX.js";import{j as G,C as H,b as J,P as K,d as Q,a as W,e as Z,f as ee,s as te,q as re,o as ae,n as se,m as ne,u as y,p as C,r as oe,t as ie,w as P,c as de,L as le,v as ce}from"./link-item-BlYkot48.js";import{r as x,j as e}from"./index-OFfnl8sH.js";import{a as me}from"./index-B-5ouVG_.js";import{L as fe,C as ue,m as pe}from"./merge-refs-BIez66Kl.js";import{A as F,m as u}from"./proxy-CWSxKwWP.js";import{R as I}from"./index-xXa72sZS.js";import{X as xe}from"./x-CB1cQ-bo.js";import"./Icon-D30p-2dq.js";import"./i18n-V4QzeUbV.js";import"./search-D1WUBd3N.js";import"./index-DHENdpwd.js";function he({tabs:t,placeholder:r,className:a,...s}){const[n,l]=x.useState(!1),o=me(),c=x.useMemo(()=>t.findLastIndex(f=>G(f,o)),[t,o]),m=c!==-1?t[c]:void 0,b=()=>{l(!1)},p=m?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"size-4.5 shrink-0 empty:hidden",children:m.icon}),e.jsx("p",{className:"font-medium",children:m.title})]}):r;return e.jsxs(q,{open:n,onOpenChange:l,children:[p&&e.jsxs(B,{className:d("flex items-center gap-2 rounded-xl overflow-hidden p-1.5 border shadow-sm text-sm text-start transition-colors hover:bg-fd-accent hover:text-fd-accent-foreground data-[state=open]:bg-fd-accent data-[state=open]:text-fd-accent-foreground",a),...s,children:[e.jsx(F,{mode:"popLayout",children:e.jsx(u.span,{className:"flex w-full min-w-0 overflow-hidden items-center text-nowrap gap-1.5",initial:{opacity:0,y:"100%"},animate:{opacity:1,y:0},exit:{opacity:0,y:"-100%"},children:p},c)}),e.jsx(H,{className:"shrink-0 ms-auto size-4 text-fd-muted-foreground"})]}),e.jsx(U,{align:"start",className:"flex flex-col gap-1 max-w-svw p-1 fd-scroll-container",children:t.map((f,g)=>{const v=g===c;if(!(!v&&f.unlisted))return e.jsxs(fe,{href:f.url,onClick:b,...f.props,className:d("flex items-center gap-1.5 rounded-lg p-1.5 hover:bg-fd-accent hover:text-fd-accent-foreground",f.props?.className),children:[e.jsx("div",{className:"shrink-0 mb-auto size-4.5 empty:hidden",children:f.icon}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium leading-none",children:f.title}),e.jsx("p",{className:"text-[0.8125rem] text-fd-muted-foreground mt-1 empty:hidden",children:f.description})]}),e.jsx(ue,{className:d("shrink-0 ms-auto size-3.5 text-fd-primary",!v&&"invisible")})]},f.url)})})]})}const be=u.create(te),ge=u.create(re),ve=u.create(ae),ye=u.create(se),w=V("relative flex flex-row items-center gap-2 rounded-lg p-2 text-start text-fd-muted-foreground wrap-anywhere [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{link:"transition-colors hover:bg-fd-accent/50 hover:text-fd-accent-foreground/80 hover:transition-none data-[active=true]:bg-fd-primary/10 data-[active=true]:text-fd-primary data-[active=true]:hover:transition-colors",button:"transition-colors hover:bg-fd-accent/50 hover:text-fd-accent-foreground/80 hover:transition-none"},highlight:{true:"data-[active=true]:before:content-[''] data-[active=true]:before:bg-fd-primary data-[active=true]:before:absolute data-[active=true]:before:w-px data-[active=true]:before:inset-y-2.5 data-[active=true]:before:start-2.5"}}});function j(t){return`calc(${2+3*t} * var(--spacing))`}const{useSidebar:N}=J;function je(t){return e.jsx(Q,{...t})}function we({footer:t,banner:r,components:a,...s}){const{menuItems:n}=S();return e.jsxs(Se,{...s,children:[e.jsx("div",{className:"flex flex-col gap-3 p-4 pb-2 empty:hidden",children:r}),e.jsxs(W,{viewport:{className:"*:gap-0!"},children:[n.filter(l=>l.type!=="icon").map((l,o,c)=>e.jsx(Pe,{item:l,className:d(o===c.length-1&&"mb-4")},o)),e.jsx(Le,{...a})]}),t]})}function Ne(t){const{open:r,setOpen:a}=N();return e.jsx("button",{onClick:()=>a(s=>!s),...t,children:e.jsx(F,{mode:"wait",children:e.jsx(u.span,{transition:{duration:.2},initial:{y:"100%",opacity:0},animate:{y:0,opacity:1},exit:{y:"100%",opacity:0},children:r?e.jsx(xe,{}):e.jsx(K,{})},r?"open":"closed")})})}function Se({ref:t,className:r,children:a,...s}){const n=x.useRef(null),[l,o]=x.useState(!1),{open:c,setOpen:m}=N(),b=x.useEffectEvent(p=>{c&&p.key==="Escape"&&(m(!1),p.preventDefault())});return x.useEffect(()=>(window.addEventListener("keydown",b),()=>{window.removeEventListener("keydown",b)}),[]),c&&!l&&o(!0),e.jsx(I,{enabled:l,children:e.jsx(u.div,{className:d("fixed inset-0 py-10 z-30 backdrop-blur-md bg-fd-background/60",!c&&"pointer-events-none"),initial:"hide",variants:{show:{opacity:1},hide:{opacity:0}},animate:c?"show":"hide",exit:"hide",onClick:()=>{m(!1)},onAnimationComplete:p=>{p==="hide"&&o(!1)},children:e.jsx(u.div,{className:"absolute top-0 min-h-0 inset-x-0 bottom-26 overflow-y-auto fd-scroll-container pr-(--removed-body-scroll-bar-size,0) py-16 mask-[linear-gradient(to_bottom,transparent,white_--spacing(14),white_calc(100%---spacing(14)),transparent)] lg:text-sm",variants:{show:{y:0,opacity:1},hide:{y:"80%",opacity:0}},transition:{duration:.4,ease:[.16,1,.3,1]},children:e.jsx(u.aside,{id:"nd-sidebar",ref:pe(n,t),className:d("mx-auto sm:max-w-[400px]",r),onClick:p=>p.stopPropagation(),...s,children:a})})})})}function T(t){return e.jsx(ne,{...t})}function ke({className:t,style:r,children:a,...s}){const n=y();return e.jsx(oe,{className:d("inline-flex items-center gap-2 mb-1.5 px-2 mt-6 empty:mb-0 [&_svg]:size-4 [&_svg]:shrink-0",n===0&&"first:mt-0",t),style:{paddingInlineStart:j(n),...r},...s,children:a})}function z({className:t,style:r,children:a,...s}){const n=y();return e.jsx(be,{className:d(w({variant:"link",highlight:n>=1}),t),style:{paddingInlineStart:j(n),...r},...s,children:a})}function D({className:t,style:r,...a}){const{depth:s,collapsible:n}=C();return e.jsx(ge,{className:d(w({variant:n?"button":null}),"w-full",t),style:{paddingInlineStart:j(s-1),...r},...a,children:a.children})}function E({className:t,style:r,...a}){const s=y();return e.jsx(ve,{className:d(w({variant:"link",highlight:s>1}),"w-full",t),style:{paddingInlineStart:j(s-1),...r},...a,children:a.children})}function _({className:t,children:r,...a}){const s=y(),{open:n}=C();return e.jsx(ye,{className:d("relative",s===1&&"before:content-[''] before:absolute before:w-px before:inset-y-1 before:bg-fd-border before:start-2.5",t),...a,children:e.jsx(u.div,{initial:"hide",animate:n?"show":"hide",exit:"hide",variants:{show:{opacity:1},hide:{opacity:0}},children:r})})}const Le=ee({SidebarFolder:T,SidebarFolderContent:_,SidebarSeparator:ke,SidebarFolderLink:E,SidebarFolderTrigger:D,SidebarItem:z}),Pe=Z({SidebarFolder:T,SidebarFolderContent:_,SidebarFolderLink:E,SidebarFolderTrigger:D,SidebarItem:z});function Ce(t){return e.jsx("div",{id:"nd-flux-layout",...t,className:d("flex flex-col items-center pb-24 overflow-x-clip",t.className)})}const O=x.createContext(null);function S(){const t=x.use(O);if(!t)throw new Error("Please use Flux layout components under <DocsLayout /> (`fumadocs-ui/layouts/flux`).");return t}const{useProvider:Fe}=ce({useProps(){return S().props}});function Ie(t){const{tree:r,nav:a={},sidebar:{enabled:s=!0,tabs:n,defaultOpenLevel:l,prefetch:o,...c}={},tabs:m=n,children:b,containerProps:p,renderNavigationPanel:f=h=>e.jsx(R,{...h}),slots:g={}}=t,v=ie(t),{baseSlots:$,baseProps:A}=Fe(t),k=x.useMemo(()=>Array.isArray(m)?m:typeof m=="object"?P(r,m):m!==!1?P(r):[],[r,m]),i={...$,container:g.container??Ce,tabDropdown:g.tabDropdown??he,sidebar:g.sidebar??{root:we,provider:je,trigger:Ne,useSidebar:N}};return e.jsx(O,{value:{props:A,slots:i,...v},children:e.jsxs(X,{tree:r,children:[e.jsx(i.sidebar.provider,{defaultOpenLevel:l,prefetch:o,children:e.jsxs(i.container,{...p,children:[s&&e.jsx(i.sidebar.root,{...c}),b]})}),f({head:e.jsxs(e.Fragment,{children:[i.navTitle&&e.jsx(i.navTitle,{className:"inline-flex items-center gap-2.5 text-sm font-semibold"}),a.children]}),tabDropdown:i.tabDropdown&&k.length>0&&e.jsx(i.tabDropdown,{className:"flex-1",tabs:k}),tool:e.jsxs(e.Fragment,{children:[i.languageSelect&&e.jsx(i.languageSelect.root,{children:e.jsx(le,{className:"size-4.5"})}),i.searchTrigger&&e.jsx(i.searchTrigger.sm,{hideIfDisabled:!0,className:"rounded-lg"}),i.sidebar&&e.jsx(i.sidebar.trigger,{className:d(L({variant:"ghost",size:"icon-sm",className:"overflow-hidden"}))}),i.themeSwitch&&e.jsx(i.themeSwitch,{className:"p-1 h-full ms-1 rounded-xl bg-fd-muted *:rounded-lg"})]}),link:v.menuItems.filter(h=>h.type==="icon").map((h,M)=>e.jsx(de,{item:h,className:d(L({size:"icon-sm",color:"ghost"})),"aria-label":h.label,children:h.icon},M))})]})})}function R({head:t,tabDropdown:r,tool:a,link:s,children:n=o=>o,...l}){const{open:o}=Y();return e.jsx(u.div,{...l,className:d("fixed left-1/2 w-[calc(100%-var(--removed-body-scroll-bar-size,0px))] translate-x-[calc(-50%-var(--removed-body-scroll-bar-size,0px)/2)] bottom-0 z-40 bg-fd-popover text-fd-popover-foreground border-t shadow-lg sm:bottom-6 sm:rounded-2xl sm:border sm:max-w-[380px]",l.className),animate:l.animate??{scale:o?.9:1,translateY:o?20:0,opacity:o?.8:1},children:n(e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-row items-center ps-2.5 p-1 gap-2 min-h-11",children:[t,e.jsx("div",{id:"flux-layout-slot",className:"flex-1"})]}),e.jsxs("div",{className:"flex flex-row gap-1.5 overflow-x-auto overflow-y-hidden p-2 sm:p-1",children:[e.jsx("div",{className:"flex flex-row items-center gap-2 min-w-0 flex-1",children:r}),e.jsx("div",{className:"flex flex-row items-center text-fd-muted-foreground border-x px-0.5 empty:hidden",children:s}),e.jsx("div",{className:"flex flex-row items-center text-fd-muted-foreground empty:hidden",children:a})]})]}))})}function Te({enabled:t=!1,className:r,...a}){return e.jsx(I,{enabled:t,children:e.jsx(u.div,{className:d("fixed inset-0 z-30 pr-(--removed-body-scroll-bar-size,0) backdrop-blur-md bg-fd-background/60",!t&&"pointer-events-none",r),initial:"hide",variants:{show:{opacity:1},hide:{opacity:0}},animate:t?"show":"hide",exit:"hide",...a})})}const Ye={DocsLayout:Ie,NavigationPanel:R,NavigationPanelOverlay:Te,useFluxLayout:S};export{Ye as export_b6fcdec1f0c6};
|
|
1
|
+
import{t as d,a as V,b as L}from"./index-CkzHlXhF.js";import{P as q,a as B,b as U,T as X}from"./collapsible-Bqzit3JO.js";import{u as Y}from"./index-zSjxh5o9.js";import{j as G,C as H,b as J,P as K,d as Q,a as W,e as Z,f as ee,s as te,q as re,o as ae,n as se,m as ne,u as y,p as C,r as oe,t as ie,w as P,c as de,L as le,v as ce}from"./link-item-CAVxr8-m.js";import{r as x,j as e}from"./index-Po1UZSgL.js";import{a as me}from"./index-DOC-_zsC.js";import{L as fe,C as ue,m as pe}from"./merge-refs-B7SuKGTI.js";import{A as F,m as u}from"./proxy-DdABrE5r.js";import{R as I}from"./index-C3-lsDRv.js";import{X as xe}from"./x-Blg1xIpd.js";import"./Icon-uimJ5tpe.js";import"./i18n-BU0Gqrrh.js";import"./search-AdRfsIll.js";import"./index-DhgWLnXf.js";function he({tabs:t,placeholder:r,className:a,...s}){const[n,l]=x.useState(!1),o=me(),c=x.useMemo(()=>t.findLastIndex(f=>G(f,o)),[t,o]),m=c!==-1?t[c]:void 0,b=()=>{l(!1)},p=m?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"size-4.5 shrink-0 empty:hidden",children:m.icon}),e.jsx("p",{className:"font-medium",children:m.title})]}):r;return e.jsxs(q,{open:n,onOpenChange:l,children:[p&&e.jsxs(B,{className:d("flex items-center gap-2 rounded-xl overflow-hidden p-1.5 border shadow-sm text-sm text-start transition-colors hover:bg-fd-accent hover:text-fd-accent-foreground data-[state=open]:bg-fd-accent data-[state=open]:text-fd-accent-foreground",a),...s,children:[e.jsx(F,{mode:"popLayout",children:e.jsx(u.span,{className:"flex w-full min-w-0 overflow-hidden items-center text-nowrap gap-1.5",initial:{opacity:0,y:"100%"},animate:{opacity:1,y:0},exit:{opacity:0,y:"-100%"},children:p},c)}),e.jsx(H,{className:"shrink-0 ms-auto size-4 text-fd-muted-foreground"})]}),e.jsx(U,{align:"start",className:"flex flex-col gap-1 max-w-svw p-1 fd-scroll-container",children:t.map((f,g)=>{const v=g===c;if(!(!v&&f.unlisted))return e.jsxs(fe,{href:f.url,onClick:b,...f.props,className:d("flex items-center gap-1.5 rounded-lg p-1.5 hover:bg-fd-accent hover:text-fd-accent-foreground",f.props?.className),children:[e.jsx("div",{className:"shrink-0 mb-auto size-4.5 empty:hidden",children:f.icon}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium leading-none",children:f.title}),e.jsx("p",{className:"text-[0.8125rem] text-fd-muted-foreground mt-1 empty:hidden",children:f.description})]}),e.jsx(ue,{className:d("shrink-0 ms-auto size-3.5 text-fd-primary",!v&&"invisible")})]},f.url)})})]})}const be=u.create(te),ge=u.create(re),ve=u.create(ae),ye=u.create(se),w=V("relative flex flex-row items-center gap-2 rounded-lg p-2 text-start text-fd-muted-foreground wrap-anywhere [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{link:"transition-colors hover:bg-fd-accent/50 hover:text-fd-accent-foreground/80 hover:transition-none data-[active=true]:bg-fd-primary/10 data-[active=true]:text-fd-primary data-[active=true]:hover:transition-colors",button:"transition-colors hover:bg-fd-accent/50 hover:text-fd-accent-foreground/80 hover:transition-none"},highlight:{true:"data-[active=true]:before:content-[''] data-[active=true]:before:bg-fd-primary data-[active=true]:before:absolute data-[active=true]:before:w-px data-[active=true]:before:inset-y-2.5 data-[active=true]:before:start-2.5"}}});function j(t){return`calc(${2+3*t} * var(--spacing))`}const{useSidebar:N}=J;function je(t){return e.jsx(Q,{...t})}function we({footer:t,banner:r,components:a,...s}){const{menuItems:n}=S();return e.jsxs(Se,{...s,children:[e.jsx("div",{className:"flex flex-col gap-3 p-4 pb-2 empty:hidden",children:r}),e.jsxs(W,{viewport:{className:"*:gap-0!"},children:[n.filter(l=>l.type!=="icon").map((l,o,c)=>e.jsx(Pe,{item:l,className:d(o===c.length-1&&"mb-4")},o)),e.jsx(Le,{...a})]}),t]})}function Ne(t){const{open:r,setOpen:a}=N();return e.jsx("button",{onClick:()=>a(s=>!s),...t,children:e.jsx(F,{mode:"wait",children:e.jsx(u.span,{transition:{duration:.2},initial:{y:"100%",opacity:0},animate:{y:0,opacity:1},exit:{y:"100%",opacity:0},children:r?e.jsx(xe,{}):e.jsx(K,{})},r?"open":"closed")})})}function Se({ref:t,className:r,children:a,...s}){const n=x.useRef(null),[l,o]=x.useState(!1),{open:c,setOpen:m}=N(),b=x.useEffectEvent(p=>{c&&p.key==="Escape"&&(m(!1),p.preventDefault())});return x.useEffect(()=>(window.addEventListener("keydown",b),()=>{window.removeEventListener("keydown",b)}),[]),c&&!l&&o(!0),e.jsx(I,{enabled:l,children:e.jsx(u.div,{className:d("fixed inset-0 py-10 z-30 backdrop-blur-md bg-fd-background/60",!c&&"pointer-events-none"),initial:"hide",variants:{show:{opacity:1},hide:{opacity:0}},animate:c?"show":"hide",exit:"hide",onClick:()=>{m(!1)},onAnimationComplete:p=>{p==="hide"&&o(!1)},children:e.jsx(u.div,{className:"absolute top-0 min-h-0 inset-x-0 bottom-26 overflow-y-auto fd-scroll-container pr-(--removed-body-scroll-bar-size,0) py-16 mask-[linear-gradient(to_bottom,transparent,white_--spacing(14),white_calc(100%---spacing(14)),transparent)] lg:text-sm",variants:{show:{y:0,opacity:1},hide:{y:"80%",opacity:0}},transition:{duration:.4,ease:[.16,1,.3,1]},children:e.jsx(u.aside,{id:"nd-sidebar",ref:pe(n,t),className:d("mx-auto sm:max-w-[400px]",r),onClick:p=>p.stopPropagation(),...s,children:a})})})})}function T(t){return e.jsx(ne,{...t})}function ke({className:t,style:r,children:a,...s}){const n=y();return e.jsx(oe,{className:d("inline-flex items-center gap-2 mb-1.5 px-2 mt-6 empty:mb-0 [&_svg]:size-4 [&_svg]:shrink-0",n===0&&"first:mt-0",t),style:{paddingInlineStart:j(n),...r},...s,children:a})}function z({className:t,style:r,children:a,...s}){const n=y();return e.jsx(be,{className:d(w({variant:"link",highlight:n>=1}),t),style:{paddingInlineStart:j(n),...r},...s,children:a})}function D({className:t,style:r,...a}){const{depth:s,collapsible:n}=C();return e.jsx(ge,{className:d(w({variant:n?"button":null}),"w-full",t),style:{paddingInlineStart:j(s-1),...r},...a,children:a.children})}function E({className:t,style:r,...a}){const s=y();return e.jsx(ve,{className:d(w({variant:"link",highlight:s>1}),"w-full",t),style:{paddingInlineStart:j(s-1),...r},...a,children:a.children})}function _({className:t,children:r,...a}){const s=y(),{open:n}=C();return e.jsx(ye,{className:d("relative",s===1&&"before:content-[''] before:absolute before:w-px before:inset-y-1 before:bg-fd-border before:start-2.5",t),...a,children:e.jsx(u.div,{initial:"hide",animate:n?"show":"hide",exit:"hide",variants:{show:{opacity:1},hide:{opacity:0}},children:r})})}const Le=ee({SidebarFolder:T,SidebarFolderContent:_,SidebarSeparator:ke,SidebarFolderLink:E,SidebarFolderTrigger:D,SidebarItem:z}),Pe=Z({SidebarFolder:T,SidebarFolderContent:_,SidebarFolderLink:E,SidebarFolderTrigger:D,SidebarItem:z});function Ce(t){return e.jsx("div",{id:"nd-flux-layout",...t,className:d("flex flex-col items-center pb-24 overflow-x-clip",t.className)})}const O=x.createContext(null);function S(){const t=x.use(O);if(!t)throw new Error("Please use Flux layout components under <DocsLayout /> (`fumadocs-ui/layouts/flux`).");return t}const{useProvider:Fe}=ce({useProps(){return S().props}});function Ie(t){const{tree:r,nav:a={},sidebar:{enabled:s=!0,tabs:n,defaultOpenLevel:l,prefetch:o,...c}={},tabs:m=n,children:b,containerProps:p,renderNavigationPanel:f=h=>e.jsx(R,{...h}),slots:g={}}=t,v=ie(t),{baseSlots:$,baseProps:A}=Fe(t),k=x.useMemo(()=>Array.isArray(m)?m:typeof m=="object"?P(r,m):m!==!1?P(r):[],[r,m]),i={...$,container:g.container??Ce,tabDropdown:g.tabDropdown??he,sidebar:g.sidebar??{root:we,provider:je,trigger:Ne,useSidebar:N}};return e.jsx(O,{value:{props:A,slots:i,...v},children:e.jsxs(X,{tree:r,children:[e.jsx(i.sidebar.provider,{defaultOpenLevel:l,prefetch:o,children:e.jsxs(i.container,{...p,children:[s&&e.jsx(i.sidebar.root,{...c}),b]})}),f({head:e.jsxs(e.Fragment,{children:[i.navTitle&&e.jsx(i.navTitle,{className:"inline-flex items-center gap-2.5 text-sm font-semibold"}),a.children]}),tabDropdown:i.tabDropdown&&k.length>0&&e.jsx(i.tabDropdown,{className:"flex-1",tabs:k}),tool:e.jsxs(e.Fragment,{children:[i.languageSelect&&e.jsx(i.languageSelect.root,{children:e.jsx(le,{className:"size-4.5"})}),i.searchTrigger&&e.jsx(i.searchTrigger.sm,{hideIfDisabled:!0,className:"rounded-lg"}),i.sidebar&&e.jsx(i.sidebar.trigger,{className:d(L({variant:"ghost",size:"icon-sm",className:"overflow-hidden"}))}),i.themeSwitch&&e.jsx(i.themeSwitch,{className:"p-1 h-full ms-1 rounded-xl bg-fd-muted *:rounded-lg"})]}),link:v.menuItems.filter(h=>h.type==="icon").map((h,M)=>e.jsx(de,{item:h,className:d(L({size:"icon-sm",color:"ghost"})),"aria-label":h.label,children:h.icon},M))})]})})}function R({head:t,tabDropdown:r,tool:a,link:s,children:n=o=>o,...l}){const{open:o}=Y();return e.jsx(u.div,{...l,className:d("fixed left-1/2 w-[calc(100%-var(--removed-body-scroll-bar-size,0px))] translate-x-[calc(-50%-var(--removed-body-scroll-bar-size,0px)/2)] bottom-0 z-40 bg-fd-popover text-fd-popover-foreground border-t shadow-lg sm:bottom-6 sm:rounded-2xl sm:border sm:max-w-[380px]",l.className),animate:l.animate??{scale:o?.9:1,translateY:o?20:0,opacity:o?.8:1},children:n(e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-row items-center ps-2.5 p-1 gap-2 min-h-11",children:[t,e.jsx("div",{id:"flux-layout-slot",className:"flex-1"})]}),e.jsxs("div",{className:"flex flex-row gap-1.5 overflow-x-auto overflow-y-hidden p-2 sm:p-1",children:[e.jsx("div",{className:"flex flex-row items-center gap-2 min-w-0 flex-1",children:r}),e.jsx("div",{className:"flex flex-row items-center text-fd-muted-foreground border-x px-0.5 empty:hidden",children:s}),e.jsx("div",{className:"flex flex-row items-center text-fd-muted-foreground empty:hidden",children:a})]})]}))})}function Te({enabled:t=!1,className:r,...a}){return e.jsx(I,{enabled:t,children:e.jsx(u.div,{className:d("fixed inset-0 z-30 pr-(--removed-body-scroll-bar-size,0) backdrop-blur-md bg-fd-background/60",!t&&"pointer-events-none",r),initial:"hide",variants:{show:{opacity:1},hide:{opacity:0}},animate:t?"show":"hide",exit:"hide",...a})})}const Ye={DocsLayout:Ie,NavigationPanel:R,NavigationPanelOverlay:Te,useFluxLayout:S};export{Ye as export_b6fcdec1f0c6};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as g,I as O}from"./i18n-
|
|
1
|
+
import{u as g,I as O}from"./i18n-BU0Gqrrh.js";import{t as u,b as T}from"./index-CkzHlXhF.js";import{j as e,r as d,a as k}from"./index-Po1UZSgL.js";import{a as I}from"./index-DOC-_zsC.js";import{t as E,u as L,c as B,d as M,T as F,e as _,f as V,C as $,S as A,V as G,M as S}from"./page-actions-CcyvVvdr.js";import{e as U,u as j,d as H,C as R,c as q,i as z,f as J,g as K}from"./collapsible-Bqzit3JO.js";import{A as Q,m as p}from"./proxy-DdABrE5r.js";import{L as v}from"./merge-refs-B7SuKGTI.js";import{C as b}from"./chevron-right-DJ6X4mXo.js";import"./Icon-uimJ5tpe.js";import"./index-C3-lsDRv.js";import"./use-copy-button-auHqSfgW.js";const C=d.createContext(null),{TOCProvider:X}=E;function Y({container:t,trigger:s,content:r,header:o,footer:n,style:c="normal"}){const a=L(),{TOCItems:i,TOCEmpty:l,TOCItem:m}=c==="clerk"?B:M;return e.jsxs(Z,{...t,children:[e.jsxs(se,{...r,children:[o,e.jsx(F,{children:e.jsxs(i,{children:[a.length===0&&e.jsx(l,{}),a.map(x=>e.jsx(m,{item:x},x.url))]})}),n]}),e.jsx(ee,{...s})]})}function Z(t){const[s,r]=d.useState(null);if(d.useEffect(()=>{const o=document.getElementById("flux-layout-slot");o&&r(o)},[]),!!s)return k.createPortal(e.jsx(W,{...t}),s)}function W({className:t,children:s,...r}){const o=d.useRef(null),[n,c]=d.useState(!1),a=d.useEffectEvent(i=>{n&&o.current&&!o.current.contains(i.target)&&c(!1)});return d.useEffect(()=>(window.addEventListener("click",a),()=>{window.removeEventListener("click",a)}),[]),e.jsx(C,{value:d.useMemo(()=>({open:n,setOpen:c}),[c,n]),children:e.jsx(q,{open:n,onOpenChange:c,"data-toc-popover":"",className:u("relative h-9 animate-fd-fade-in",t),...r,children:e.jsx("header",{ref:o,className:u("absolute w-full bottom-0 border rounded-xl transition-colors bg-fd-secondary text-fd-secondary-foreground backdrop-blur-sm",n&&"shadow-lg bg-fd-popover/80 text-fd-popover-foreground"),children:s})})})}function ee({className:t,...s}){const{text:r}=g(),{open:o}=d.use(C),n=_(),c=n.findIndex(l=>l.active),a=j().at(-1),i={transition:{duration:.1},initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:u(o&&"text-fd-popover-foreground")};return e.jsxs(H,{className:u("flex w-full h-8.5 items-center text-sm text-fd-muted-foreground gap-2.5 px-2 text-start focus-visible:outline-none [&_svg]:size-4",t),"data-toc-popover-trigger":"",...s,children:[e.jsx(re,{value:(c+1)/Math.max(1,n.length),max:1,className:u("shrink-0",o&&"text-fd-primary")}),e.jsx(Q,{mode:"wait",children:n[c]&&!o?e.jsx(p.span,{...i,children:n[c].original.title},c):a?e.jsx(p.span,{...i,children:a.name},a.$id??":pathId"):e.jsx(p.span,{...i,children:r.toc},":toc")}),e.jsx(R,{className:u("ms-auto shrink-0 transition-transform",o&&"rotate-180")})]})}function te(t,s,r){return t<s?s:t>r?r:t}function re({value:t,strokeWidth:s=2,size:r=24,min:o=0,max:n=100,...c}){const a=te(t,o,n),i=(r-s)/2,l=2*Math.PI*i,m=a/n*l,x={cx:r/2,cy:r/2,r:i,fill:"none",strokeWidth:s};return e.jsxs("svg",{role:"progressbar",viewBox:`0 0 ${r} ${r}`,"aria-valuenow":a,"aria-valuemin":o,"aria-valuemax":n,...c,children:[e.jsx("circle",{...x,className:"stroke-current/25"}),e.jsx("circle",{...x,stroke:"currentColor",strokeDasharray:l,strokeDashoffset:l-m,strokeLinecap:"round",transform:`rotate(-90 ${r/2} ${r/2})`,className:"transition-all"})]})}function se(t){return e.jsx(U,{"data-toc-popover-content":"",...t,children:e.jsx("div",{className:"flex flex-col px-2 max-h-[50vh]",children:t.children})})}function P({items:t,children:s,className:r,...o}){const n=V(),c=I(),{previous:a,next:i}=d.useMemo(()=>{if(t)return t;const l=n.findIndex(m=>z(m.url,c));return l===-1?{}:{previous:n[l-1],next:n[l+1]}},[n,t,c]);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:u("@container grid gap-4",a&&i?"grid-cols-2":"grid-cols-1",r),...o,children:[a&&e.jsx(h,{item:a,index:0}),i&&e.jsx(h,{item:i,index:1})]}),s]})}function h({item:t,index:s}){const{text:r}=g(),o=s===0?$:b;return e.jsxs(v,{href:t.url,className:u("flex flex-col gap-2 rounded-lg border p-4 text-sm transition-colors hover:bg-fd-accent/80 hover:text-fd-accent-foreground @max-lg:col-span-full",s===1&&"text-end"),children:[e.jsxs("div",{className:u("inline-flex items-center gap-1.5 font-medium",s===1&&"flex-row-reverse"),children:[e.jsx(o,{className:"-mx-1 size-4 shrink-0 rtl:rotate-180"}),e.jsx("p",{children:t.name})]}),e.jsx("p",{className:"text-fd-muted-foreground truncate",children:t.description??(s===0?r.previousPage:r.nextPage)})]})}function N({includeRoot:t,includeSeparator:s,includePage:r,...o}){const n=j(),{root:c}=J(),a=d.useMemo(()=>K(c,n,{includePage:r,includeSeparator:s,includeRoot:t}),[r,t,s,n,c]);return a.length===0?null:e.jsx("div",{...o,className:u("flex items-center gap-1.5 text-sm text-fd-muted-foreground",o.className),children:a.map((i,l)=>{const m=u("truncate",l===a.length-1&&"text-fd-primary font-medium");return e.jsxs(d.Fragment,{children:[l!==0&&e.jsx(b,{className:"size-3.5 shrink-0"}),i.url?e.jsx(v,{href:i.url,className:u(m,"transition-opacity hover:opacity-80"),children:i.name}):e.jsx("span",{className:m,children:i.name})]},l)})})}function ne(t){const{props:{full:s}}=w();return e.jsx("article",{id:"nd-page","data-full":s,...t,className:u("flex flex-col w-full max-w-[900px] mx-auto [grid-area:main] px-4 py-6 gap-4 md:px-6 md:pt-8 xl:px-8 xl:pt-14",s?"max-w-[1200px]":"xl:layout:[--fd-toc-width:268px]",t.className),children:t.children})}const y=d.createContext(null);function w(){const t=d.use(y);if(!t)throw new Error("Please use page components under <DocsPage /> (`fumadocs-ui/layouts/flux/page`).");return t}function oe({tableOfContent:{enabled:t,single:s,...r}={},breadcrumb:{enabled:o=!0,...n}={},footer:{enabled:c=!0,...a}={},full:i=!1,toc:l=[],slots:m={},children:x,...D}){t??=!!(l.length>0||r.header||r.footer);const f={breadcrumb:m.breadcrumb??N,footer:m.footer??P,container:m.container??ne,toc:m.toc??{provider:X,main:Y}};return e.jsx(y,{value:{props:{full:i},slots:f},children:e.jsxs(f.toc.provider,{single:s,toc:t?l:[],children:[t&&(r.component??e.jsx(f.toc.main,{...r})),e.jsxs(f.container,{...D,children:[o&&(n.component??e.jsx(f.breadcrumb,{...n})),x,c&&(a.component??e.jsx(f.footer,{...a}))]})]})})}function ae(t){return e.jsx("a",{target:"_blank",rel:"noreferrer noopener",...t,className:u(T({color:"secondary",size:"sm"}),"gap-1.5 not-prose",t.className),children:t.children??e.jsxs(e.Fragment,{children:[e.jsx(A,{className:"size-3.5"}),e.jsx(O,{label:"editOnGithub"})]})})}function ce({children:t,className:s,...r}){return e.jsx("div",{...r,className:u("prose flex-1",s),children:t})}function ie({children:t,className:s,...r}){return t===void 0?null:e.jsx("p",{...r,className:u("mb-8 text-lg text-fd-muted-foreground",s),children:t})}function le({children:t,className:s,...r}){return e.jsx("h1",{...r,className:u("text-[1.75em] font-semibold",s),children:t})}function ue({date:t,...s}){const{text:r}=g(),[o,n]=d.useState("");return d.useEffect(()=>{n(t.toLocaleDateString())},[t]),e.jsxs("p",{...s,className:u("text-sm text-fd-muted-foreground",s.className),children:[r.lastUpdate," ",o]})}const Ne={DocsBody:ce,DocsDescription:ie,DocsPage:oe,DocsTitle:le,EditOnGitHub:ae,MarkdownCopyButton:S,PageBreadcrumb:N,PageFooter:P,PageLastUpdate:ue,ViewOptionsPopover:G,useDocsPage:w};export{Ne as export_581e97026e7b};
|