@cedros/data-react-native 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +37 -0
- package/dist/index.cjs +5 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +816 -0
- package/dist/index.js +6485 -0
- package/dist/index.js.map +1 -0
- package/package.json +50 -0
package/README.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# @cedros/data-react-native
|
|
2
|
+
|
|
3
|
+
React Native components, page templates, and theme system for cedros-data.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @cedros/data-react-native
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
### Peer dependencies
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install react-native-markdown-display
|
|
15
|
+
# Optional:
|
|
16
|
+
npm install react-native-svg @react-native-async-storage/async-storage
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
```tsx
|
|
22
|
+
import { CedrosDataProvider, SiteLayout, BlogIndexTemplate } from '@cedros/data-react-native';
|
|
23
|
+
|
|
24
|
+
function App() {
|
|
25
|
+
return (
|
|
26
|
+
<CedrosDataProvider theme="light">
|
|
27
|
+
<SiteLayout siteTitle="My Site" navigation={[]}>
|
|
28
|
+
{/* your content */}
|
|
29
|
+
</SiteLayout>
|
|
30
|
+
</CedrosDataProvider>
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Navigation
|
|
36
|
+
|
|
37
|
+
Components use `onNavigate?: (route: string) => void` callback props instead of coupling to any specific navigation library. Wire your own `react-navigation` or other router.
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";var Xn=Object.create;var Ut=Object.defineProperty;var er=Object.getOwnPropertyDescriptor;var tr=Object.getOwnPropertyNames;var nr=Object.getPrototypeOf,rr=Object.prototype.hasOwnProperty;var ir=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of tr(t))!rr.call(e,i)&&i!==n&&Ut(e,i,{get:()=>t[i],enumerable:!(r=er(t,i))||r.enumerable});return e};var qt=(e,t,n)=>(n=e!=null?Xn(nr(e)):{},ir(t||!e||!e.__esModule?Ut(n,"default",{value:e,enumerable:!0}):n,e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react/jsx-runtime"),v=require("react"),p=require("react-native"),mn=Object.freeze({background:"#ffffff",foreground:"#0a0a0a",muted:"#f5f5f5",mutedForeground:"#737373",border:"#e5e5e5",link:"#2563eb",primary:"#171717",primaryForeground:"#fafafa",accent:"#f5f5f5",ring:"#0a0a0a",radius:8,success:"#16a34a",error:"#dc2626"}),xn=Object.freeze({background:"#0a0a0a",foreground:"#fafafa",muted:"#262626",mutedForeground:"#a3a3a3",border:"#262626",link:"#60a5fa",primary:"#fafafa",primaryForeground:"#171717",accent:"#262626",ring:"#d4d4d4",radius:8,success:"#22c55e",error:"#ef4444"}),jt=v.createContext(null);function or({theme:e="light",tokenOverrides:t,unstyled:n=!1,children:r}){const i=sr(t),o=v.useMemo(()=>{const l=e==="dark",s=l?xn:mn,u=i?{...s,...i}:s;return{mode:e,isDark:l,tokens:u,unstyled:n}},[e,n,i]);return f.jsx(jt.Provider,{value:o,children:f.jsx(p.View,{style:{flex:1},children:r})})}function q(){const e=v.useContext(jt);if(!e)throw new Error("useCedrosDataTheme must be used within CedrosDataProvider");return e}function lr(){return v.useContext(jt)}function sr(e){const t=v.useRef(e);return ar(t.current,e)||(t.current=e),t.current}function ar(e,t){if(e===t)return!0;if(!e||!t)return!1;const n=Object.keys(e),r=Object.keys(t);return n.length!==r.length?!1:n.every(i=>e[i]===t[i])}function je(e){if(!e)return"/";const[t]=e.split(/[?#]/u,1);return!t||t==="/"?"/":(t.startsWith("/")?t:`/${t}`).replace(/\/+$/u,"")||"/"}function Ne(e,t,n={}){const r=je(e),i=je(t);return n.exact||r==="/"?r===i:i===r||i.startsWith(`${r}/`)}function yn(e,t,n={}){const r=e.filter(o=>o.isActive===void 0&&Ne(o.route,t,n)).map(o=>je(o.route).length),i=r.length>0?Math.max(...r):0;return e.map(o=>{const l=je(o.route).length,s=i>0&&l===i&&Ne(o.route,t,n);return{...o,isActive:o.isActive??s}})}function bn({siteTitle:e,navigation:t,currentPath:n,rightSlot:r,onNavigate:i,onBrandPress:o,layout:l}){const{tokens:s,unstyled:u}=q(),a=n?yn(t,n):t.map(h=>({...h,isActive:!1})),c=(l==null?void 0:l.width)==="full",d=(l==null?void 0:l.linkPosition)==="center",x=(l==null?void 0:l.linkStyle)==="text";return f.jsxs(p.View,{style:[we.header,c&&we.headerFull,!u&&{backgroundColor:s.background,borderBottomColor:s.border,borderBottomWidth:p.StyleSheet.hairlineWidth}],children:[f.jsx(p.Pressable,{onPress:o??(()=>i==null?void 0:i("/")),children:f.jsx(p.Text,{style:[we.brand,!u&&{color:s.foreground}],children:e})}),f.jsx(p.View,{style:[we.nav,d&&we.navCenter],children:a.map(h=>f.jsx(p.Pressable,{onPress:()=>i==null?void 0:i(h.route),style:[we.navLink,!u&&!x&&{backgroundColor:h.isActive?s.accent:"transparent",borderRadius:s.radius}],children:f.jsx(p.Text,{style:[we.navLinkText,!u&&{color:h.isActive?s.foreground:s.mutedForeground}],children:h.label})},h.key))}),r&&f.jsx(p.View,{style:we.rightSlot,children:r})]})}const we=p.StyleSheet.create({header:{flexDirection:"row",alignItems:"center",paddingHorizontal:16,paddingVertical:12},headerFull:{paddingHorizontal:8},brand:{fontSize:16,fontWeight:"600"},nav:{flexDirection:"row",marginLeft:16,gap:4,flex:1},navCenter:{justifyContent:"center"},navLink:{paddingHorizontal:10,paddingVertical:6},navLinkText:{fontSize:14,fontWeight:"500"},rightSlot:{marginLeft:"auto"}});function kn({siteTitle:e,note:t,links:n=[],rightSlot:r,onNavigate:i,layout:o}){const{tokens:l,unstyled:s}=q(),u=(o==null?void 0:o.width)==="full";return f.jsxs(p.View,{style:[Te.footer,u&&Te.footerFull,!s&&{backgroundColor:l.muted,borderTopColor:l.border,borderTopWidth:p.StyleSheet.hairlineWidth}],children:[f.jsxs(p.View,{style:Te.brandRow,children:[f.jsx(p.Text,{style:[Te.brandText,!s&&{color:l.foreground}],children:e}),t&&f.jsx(p.Text,{style:[Te.noteText,!s&&{color:l.mutedForeground}],children:t})]}),n.length>0&&f.jsx(p.View,{style:Te.linksRow,children:n.map(a=>f.jsx(p.Pressable,{onPress:()=>i==null?void 0:i(a.route),children:f.jsx(p.Text,{style:[Te.linkText,!s&&{color:l.link}],children:a.label})},a.key))}),r&&f.jsx(p.View,{style:Te.rightSlot,children:r})]})}const Te=p.StyleSheet.create({footer:{paddingHorizontal:16,paddingVertical:16},footerFull:{paddingHorizontal:8},brandRow:{flexDirection:"row",alignItems:"center",gap:8},brandText:{fontSize:14,fontWeight:"600"},noteText:{fontSize:12},linksRow:{flexDirection:"row",gap:16,marginTop:8},linkText:{fontSize:13},rightSlot:{marginTop:8}});function ke({siteTitle:e,navigation:t,children:n,currentPath:r,footerNote:i="Powered by cedros-data",onNavigate:o,layout:l}){const{tokens:s,unstyled:u}=q();return f.jsxs(p.SafeAreaView,{style:[ot.safe,!u&&{backgroundColor:s.background}],children:[f.jsx(bn,{siteTitle:e,navigation:t,currentPath:r,onNavigate:o,layout:l==null?void 0:l.nav}),f.jsxs(p.ScrollView,{style:ot.scroll,contentContainerStyle:ot.content,children:[n,f.jsx(kn,{siteTitle:e,note:i,onNavigate:o,layout:l==null?void 0:l.footer})]})]})}const ot=p.StyleSheet.create({safe:{flex:1},scroll:{flex:1},content:{flexGrow:1}});let xt=null;try{xt=require("react-native-markdown-display").default}catch{}function Ye({bodyMarkdown:e,bodyHtml:t,allowUnsafeHtmlFallback:n=!1}){const{tokens:r,unstyled:i}=q(),o=i?{}:{body:{color:r.foreground,fontSize:15,lineHeight:24},heading1:{color:r.foreground,fontSize:24,fontWeight:"700",marginVertical:12},heading2:{color:r.foreground,fontSize:20,fontWeight:"600",marginVertical:10},heading3:{color:r.foreground,fontSize:17,fontWeight:"600",marginVertical:8},link:{color:r.link},blockquote:{backgroundColor:r.muted,borderLeftColor:r.border,borderLeftWidth:3,paddingHorizontal:12,paddingVertical:8},code_inline:{backgroundColor:r.muted,color:r.foreground,borderRadius:r.radius/2,paddingHorizontal:4,fontSize:13},fence:{backgroundColor:r.muted,borderRadius:r.radius,padding:12,fontSize:13},hr:{backgroundColor:r.border,height:1}};return e&&e.trim().length>0&&xt?f.jsx(p.View,{style:Ce.container,children:f.jsx(xt,{style:o,children:e})}):e&&e.trim().length>0?f.jsx(p.View,{style:Ce.container,children:f.jsx(p.Text,{style:[Ce.plainText,!i&&{color:r.foreground}],children:e})}):t&&n?f.jsx(p.View,{style:Ce.container,children:f.jsx(p.Text,{style:[Ce.warning,!i&&{color:r.mutedForeground}],children:"HTML rendering is not supported in React Native. Provide bodyMarkdown instead."})}):t?f.jsx(p.View,{style:Ce.container,children:f.jsx(p.Text,{style:[Ce.warning,!i&&{color:r.mutedForeground}],children:"Raw HTML rendering is disabled. Provide bodyMarkdown or enable allowUnsafeHtmlFallback."})}):f.jsx(p.View,{style:Ce.container})}const Ce=p.StyleSheet.create({container:{marginTop:12},plainText:{fontSize:15,lineHeight:24},warning:{fontSize:13,fontStyle:"italic"}});function Et({trail:e,onNavigate:t}){const{tokens:n,unstyled:r}=q();return e.length===0?null:f.jsx(p.View,{style:Ze.container,accessibilityRole:"header",children:e.map((i,o)=>f.jsxs(p.View,{style:Ze.item,children:[o>0&&f.jsx(p.Text,{style:[Ze.separator,!r&&{color:n.mutedForeground}],children:"/"}),f.jsx(p.Pressable,{onPress:()=>t==null?void 0:t(i.href),children:f.jsx(p.Text,{style:[Ze.linkText,!r&&{color:o===e.length-1?n.foreground:n.link}],children:i.label})})]},i.href))})}const Ze=p.StyleSheet.create({container:{flexDirection:"row",alignItems:"center",flexWrap:"wrap",paddingVertical:8,paddingHorizontal:16,gap:4},item:{flexDirection:"row",alignItems:"center",gap:4},separator:{fontSize:12},linkText:{fontSize:13}});function Ft({page:e,totalPages:t,onPageChange:n}){const{tokens:r,unstyled:i}=q();if(t<=1)return null;const o=ur(e,t);return f.jsxs(p.View,{style:Pe.container,children:[f.jsx(p.Pressable,{onPress:()=>n==null?void 0:n(Math.max(1,e-1)),disabled:e===1,style:[Pe.button,!i&&{backgroundColor:r.muted,borderRadius:r.radius,opacity:e===1?.5:1}],children:f.jsx(p.Text,{style:[Pe.buttonText,!i&&{color:r.foreground}],children:"Previous"})}),o.map(l=>f.jsx(p.Pressable,{onPress:()=>n==null?void 0:n(l),style:[Pe.pageButton,!i&&{backgroundColor:l===e?r.primary:r.muted,borderRadius:r.radius}],children:f.jsx(p.Text,{style:[Pe.buttonText,!i&&{color:l===e?r.primaryForeground:r.foreground}],children:l})},l)),f.jsx(p.Pressable,{onPress:()=>n==null?void 0:n(Math.min(t,e+1)),disabled:e===t,style:[Pe.button,!i&&{backgroundColor:r.muted,borderRadius:r.radius,opacity:e===t?.5:1}],children:f.jsx(p.Text,{style:[Pe.buttonText,!i&&{color:r.foreground}],children:"Next"})})]})}function ur(e,t){const n=Math.max(1,e-2),r=Math.min(t,e+2),i=[];for(let o=n;o<=r;o+=1)i.push(o);return i}const Pe=p.StyleSheet.create({container:{flexDirection:"row",justifyContent:"center",alignItems:"center",gap:6,paddingVertical:16,paddingHorizontal:16},button:{paddingHorizontal:14,paddingVertical:8},pageButton:{paddingHorizontal:12,paddingVertical:8,minWidth:36,alignItems:"center"},buttonText:{fontSize:13,fontWeight:"500"}});function Sn({defaultValue:e="",onSearch:t,placeholder:n="Search blog posts"}){const{tokens:r,unstyled:i}=q(),o=v.useRef(null);v.useEffect(()=>()=>{o.current&&clearTimeout(o.current)},[]);const l=v.useCallback(s=>{o.current&&clearTimeout(o.current),o.current=setTimeout(()=>t(s),300)},[t]);return f.jsx(p.TextInput,{defaultValue:e,onChangeText:l,placeholder:n,placeholderTextColor:i?void 0:r.mutedForeground,style:[cr.input,!i&&{color:r.foreground,backgroundColor:r.muted,borderColor:r.border,borderRadius:r.radius}],returnKeyType:"search",autoCapitalize:"none",autoCorrect:!1})}const cr=p.StyleSheet.create({input:{fontSize:14,paddingHorizontal:12,paddingVertical:10,borderWidth:1}});function wn({dimensions:e,active:t,onChange:n}){const{tokens:r,unstyled:i}=q();return f.jsx(p.View,{style:_e.container,children:e.map(o=>f.jsxs(p.View,{style:_e.group,children:[f.jsx(p.Text,{style:[_e.groupLabel,!i&&{color:r.mutedForeground}],children:o.label}),f.jsx(p.View,{style:_e.chipRow,children:o.values.map(l=>{const s=t[o.key]===l;return f.jsx(p.Pressable,{onPress:()=>n(o.key,s?"":l),style:[_e.chip,!i&&{backgroundColor:s?r.primary:r.muted,borderRadius:r.radius}],children:f.jsx(p.Text,{style:[_e.chipText,!i&&{color:s?r.primaryForeground:r.foreground}],children:l})},l)})})]},o.key))})}const _e=p.StyleSheet.create({container:{gap:12},group:{gap:6},groupLabel:{fontSize:12,fontWeight:"600",textTransform:"uppercase"},chipRow:{flexDirection:"row",flexWrap:"wrap",gap:6},chip:{paddingHorizontal:10,paddingVertical:6},chipText:{fontSize:13,fontWeight:"500"}});let Tn=!1,tt=null,nt=null;try{const e=require("react-native-svg");tt=e.Svg??e.default,nt=e.Path,Tn=!!(tt&&nt)}catch{}function At({slug:e,isBookmarked:t,onToggle:n}){const{tokens:r,unstyled:i}=q();return f.jsx(p.Pressable,{onPress:()=>n(e),style:vt.button,accessibilityRole:"button",accessibilityLabel:"Bookmark",accessibilityState:{selected:t},children:Tn&&tt&&nt?f.jsx(tt,{width:16,height:16,viewBox:"0 0 24 24",children:f.jsx(nt,{d:"M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z",fill:t?i?"currentColor":r.primary:"none",stroke:i?"currentColor":r.foreground,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})}):f.jsx(p.Text,{style:[vt.fallbackIcon,!i&&{color:t?r.primary:r.mutedForeground}],children:t?"★":"☆"})})}const vt=p.StyleSheet.create({button:{padding:4},fallbackIcon:{fontSize:18}});function dr({entries:e,activeId:t,onPress:n}){const{tokens:r,unstyled:i}=q(),[o,l]=v.useState(""),s=t??o,u=a=>{t===void 0&&l(a),n==null||n(a)};return f.jsx(p.View,{style:lt.container,accessibilityRole:"header",children:e.map(a=>{const c=a.id===s,d=((a.depth??2)-2)*12;return f.jsx(p.Pressable,{onPress:()=>u(a.id),style:[lt.link,{paddingLeft:12+d},!i&&c&&{borderLeftColor:r.primary,backgroundColor:r.accent},!i&&!c&&{borderLeftColor:"transparent"}],children:f.jsx(p.Text,{style:[lt.linkText,!i&&{color:c?r.foreground:r.mutedForeground,fontWeight:c?"600":"400"}],children:a.label})},a.id)})})}const lt=p.StyleSheet.create({container:{gap:2},link:{paddingVertical:6,paddingRight:12,borderLeftWidth:2,borderRadius:4},linkText:{fontSize:13}});let yt=null;try{yt=require("@react-native-clipboard/clipboard").default}catch{}function hr({code:e,language:t}){const{tokens:n,unstyled:r}=q(),[i,o]=v.useState(!1),l=v.useCallback(()=>{yt&&yt.setString(e),o(!0),setTimeout(()=>o(!1),2e3)},[e]);return f.jsxs(p.View,{style:[De.container,!r&&{backgroundColor:n.muted,borderRadius:n.radius}],children:[f.jsxs(p.View,{style:De.header,children:[t&&f.jsx(p.Text,{style:[De.language,!r&&{color:n.mutedForeground}],children:t}),f.jsx(p.Pressable,{onPress:l,style:De.copyButton,accessibilityLabel:"Copy code",children:f.jsx(p.Text,{style:[De.copyText,!r&&{color:n.mutedForeground}],children:i?"Copied!":"Copy"})})]}),f.jsx(p.Text,{style:[De.code,!r&&{color:n.foreground}],selectable:!0,children:e})]})}const De=p.StyleSheet.create({container:{padding:12,marginVertical:8},header:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:8},language:{fontSize:11,fontWeight:"500",textTransform:"uppercase"},copyButton:{paddingHorizontal:8,paddingVertical:4},copyText:{fontSize:12,fontWeight:"500"},code:{fontFamily:"monospace",fontSize:13,lineHeight:20}}),bt={symbol:"SOL",decimals:9,logo:"",mint:"So11111111111111111111111111111111111111112"},fr={symbol:"USDC",decimals:6,logo:"",mint:"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"};function pr(e,t){const[n,r]=v.useState(null),[i,o]=v.useState(!t),[l,s]=v.useState(null);return v.useEffect(()=>{if(t)return;let u=!1;return(async()=>{try{const a=await fetch(`${e}/site/config/tipping`);if(!a.ok)throw new Error(`Tipping config: ${a.status}`);const c=await a.json();u||(r(c),o(!1))}catch(a){u||(s(a instanceof Error?a.message:String(a)),o(!1))}})(),()=>{u=!0}},[e,t]),{config:n,loading:i,error:l}}function Cn({dataServerUrl:e="",recipient:t,currencies:n,presets:r,label:i,description:o,senderAddress:l,signTransaction:s}){const{tokens:u,unstyled:a}=q(),c=!!t,{config:d,loading:x}=pr(e,c),h=t??(d==null?void 0:d.recipient)??"",z=n??(d==null?void 0:d.currencies)??[bt],C=r??(d==null?void 0:d.presets),P=i??(d==null?void 0:d.label)??"Leave a tip",b=o??(d==null?void 0:d.description),[I,w]=v.useState(0),[j,T]=v.useState(""),[y,E]=v.useState("idle"),[O,V]=v.useState(""),_=z[I]??z[0],F=_?C==null?void 0:C[_.symbol]:void 0,A=v.useCallback(async()=>{if(!_||!h||!l||!s)return;const B=parseFloat(j);if(!(!B||B<=0)){E("loading"),V("");try{const M=_.mint??bt.mint,D=String(Math.round(B*10**_.decimals));let N;try{({TradeApiClient:N}=await import("@cedros/trade-react"))}catch{throw new Error("TipWidget requires @cedros/trade-react. Install it as a dependency.")}const Q=new N(e),ne=await Q.buildTransfer({sender:l,recipient:h,mint:M,amount:D}),le=await s(ne.transaction);if((await Q.executeTransfer(le)).status==="failed")throw new Error("Transaction failed on-chain");E("success"),T("")}catch(M){E("error"),V(M instanceof Error?M.message:String(M))}}},[_,j,h,l,s,e]);return!c&&x||!c&&d&&!d.enabled||!h||!_?null:f.jsxs(p.View,{style:[Z.container,!a&&{backgroundColor:u.background,borderColor:u.border}],children:[f.jsx(p.Text,{style:[Z.title,!a&&{color:u.foreground}],children:P}),b&&f.jsx(p.Text,{style:[Z.description,!a&&{color:u.mutedForeground}],children:b}),z.length>1&&f.jsx(p.View,{style:Z.currencyRow,children:z.map((B,M)=>f.jsx(p.Pressable,{onPress:()=>{w(M),T(""),E("idle")},style:[Z.currencyChip,!a&&{backgroundColor:M===I?u.primary:u.muted,borderRadius:u.radius}],children:f.jsx(p.Text,{style:[Z.currencyText,!a&&{color:M===I?u.primaryForeground:u.foreground}],children:B.symbol})},B.symbol))}),F&&F.length>0&&f.jsx(p.View,{style:Z.presetsRow,children:F.map(B=>f.jsx(p.Pressable,{onPress:()=>{T(String(B)),E("idle")},style:[Z.presetChip,!a&&{backgroundColor:u.muted,borderRadius:u.radius}],children:f.jsxs(p.Text,{style:[Z.presetText,!a&&{color:u.foreground}],children:[B," ",_.symbol]})},B))}),f.jsx(p.TextInput,{value:j,onChangeText:B=>{T(B),E("idle")},placeholder:`Amount in ${_.symbol}`,placeholderTextColor:a?void 0:u.mutedForeground,keyboardType:"decimal-pad",style:[Z.amountInput,!a&&{color:u.foreground,backgroundColor:u.muted,borderColor:u.border,borderRadius:u.radius}]}),f.jsx(p.Pressable,{onPress:()=>void A(),disabled:y==="loading"||!j||parseFloat(j)<=0,style:[Z.submitButton,!a&&{backgroundColor:u.primary,borderRadius:u.radius,opacity:y==="loading"||!j||parseFloat(j)<=0?.5:1}],children:f.jsx(p.Text,{style:[Z.submitText,!a&&{color:u.primaryForeground}],children:y==="loading"?"Sending...":"Send Tip"})}),y==="success"&&f.jsx(p.Text,{style:[Z.statusText,!a&&{color:u.success}],children:"Tip sent successfully!"}),y==="error"&&f.jsx(p.Text,{style:[Z.statusText,!a&&{color:u.error}],children:O||"Failed to send tip."})]})}const Z=p.StyleSheet.create({container:{padding:16,marginHorizontal:16,marginTop:12,borderWidth:1,borderRadius:8,gap:10},title:{fontSize:16,fontWeight:"600"},description:{fontSize:13},currencyRow:{flexDirection:"row",gap:6},currencyChip:{paddingHorizontal:12,paddingVertical:6},currencyText:{fontSize:13,fontWeight:"500"},presetsRow:{flexDirection:"row",flexWrap:"wrap",gap:6},presetChip:{paddingHorizontal:10,paddingVertical:6},presetText:{fontSize:12,fontWeight:"500"},amountInput:{fontSize:14,paddingHorizontal:12,paddingVertical:10,borderWidth:1},submitButton:{paddingHorizontal:20,paddingVertical:12,alignItems:"center"},submitText:{fontSize:15,fontWeight:"600"},statusText:{fontSize:13,textAlign:"center"}});function zn({mode:e,previewContent:t,price:n,payClient:r,purchaseLabel:i="Purchase",subscriptionLabel:o="Subscribe"}){const{tokens:l,unstyled:s}=q(),u=r.useCredits&&r.creditsBalance!==void 0&&r.creditsBalance>0;return f.jsxs(p.View,{style:K.container,children:[e==="preview"&&t&&f.jsx(p.View,{style:K.previewFade,children:f.jsx(Ye,{bodyMarkdown:t})}),e==="locked"&&f.jsxs(p.View,{style:[K.lockBox,!s&&{backgroundColor:l.muted}],children:[f.jsx(p.Text,{style:[K.lockIcon,!s&&{color:l.mutedForeground}],children:"🔒"}),f.jsx(p.Text,{style:[K.lockText,!s&&{color:l.foreground}],children:"Unlock this article"})]}),f.jsxs(p.View,{style:K.ctaSection,children:[n&&n.amount>0&&f.jsxs(p.Text,{style:[K.priceText,!s&&{color:l.foreground}],children:[n.amount," ",n.currency]}),f.jsxs(p.View,{style:K.actionsRow,children:[r.purchase&&f.jsx(p.Pressable,{onPress:()=>void r.purchase(),style:[K.primaryButton,!s&&{backgroundColor:l.primary,borderRadius:l.radius}],children:f.jsx(p.Text,{style:[K.primaryButtonText,!s&&{color:l.primaryForeground}],children:i})}),r.subscribe&&f.jsx(p.Pressable,{onPress:()=>void r.subscribe(),style:[K.secondaryButton,!s&&{backgroundColor:l.muted,borderRadius:l.radius}],children:f.jsx(p.Text,{style:[K.secondaryButtonText,!s&&{color:l.foreground}],children:o})}),u&&f.jsx(p.Pressable,{onPress:()=>void r.useCredits(),style:[K.secondaryButton,!s&&{backgroundColor:l.muted,borderRadius:l.radius}],children:f.jsxs(p.Text,{style:[K.secondaryButtonText,!s&&{color:l.foreground}],children:["Use Credits (",r.creditsBalance,")"]})})]})]})]})}const K=p.StyleSheet.create({container:{gap:16},previewFade:{opacity:.5},lockBox:{alignItems:"center",paddingVertical:32,borderRadius:8,gap:8},lockIcon:{fontSize:28},lockText:{fontSize:15,fontWeight:"500"},ctaSection:{alignItems:"center",gap:10},priceText:{fontSize:18,fontWeight:"700"},actionsRow:{flexDirection:"row",gap:8,flexWrap:"wrap",justifyContent:"center"},primaryButton:{paddingHorizontal:20,paddingVertical:12},primaryButtonText:{fontSize:14,fontWeight:"600"},secondaryButton:{paddingHorizontal:16,paddingVertical:10},secondaryButtonText:{fontSize:13,fontWeight:"500"}});let kt=null;try{kt=require("react-native-render-html").default}catch{}function gr({html:e,contentWidth:t,onLinkPress:n}){const{tokens:r,unstyled:i}=q();if(!e||e.trim().length===0)return f.jsx(p.View,{style:Ue.container});if(kt){const l=i?{}:{color:r.foreground,fontSize:15,lineHeight:24},s=i?{}:{a:{color:r.link},h1:{color:r.foreground,fontSize:24,fontWeight:"700"},h2:{color:r.foreground,fontSize:20,fontWeight:"600"},h3:{color:r.foreground,fontSize:17,fontWeight:"600"},blockquote:{backgroundColor:r.muted,borderLeftColor:r.border,borderLeftWidth:3,paddingHorizontal:12,paddingVertical:8},code:{backgroundColor:r.muted,color:r.foreground,borderRadius:r.radius/2,paddingHorizontal:4,fontSize:13},pre:{backgroundColor:r.muted,borderRadius:r.radius,padding:12,fontSize:13},hr:{backgroundColor:r.border,height:1}},u=n?{a:{onPress:(a,c)=>n(c)}}:void 0;return f.jsx(p.View,{style:Ue.container,children:f.jsx(kt,{source:{html:e},contentWidth:t,baseStyle:l,tagsStyles:s,...u?{renderersProps:u}:{}})})}const o=e.replace(/<[^>]*>/g,"").trim();return o?f.jsx(p.View,{style:Ue.container,children:f.jsx(p.Text,{style:[Ue.plainText,!i&&{color:r.foreground}],children:o})}):f.jsx(p.View,{style:Ue.container})}const Ue=p.StyleSheet.create({container:{marginTop:12},plainText:{fontSize:15,lineHeight:24}});function mr(e,t){const n=[];return Object.entries(t).forEach(([r,i])=>{if(i===void 0)return;const o=`${i}`.trim();o&&n.push(`${encodeURIComponent(r)}=${encodeURIComponent(o)}`)}),n.length>0?`${e}?${n.join("&")}`:e}function In(e,t){let n=e.filter(i=>br(i,t));if(t.dimensions){const i=t.dimensions;n=n.filter(o=>En(o,i))}const r=[...n].sort((i,o)=>Sr(i,o,t.sort??"newest"));return Fn(r,t.page,t.pageSize??8)}function jn(e,t){const r=[...e.filter(i=>kr(i,t))].sort((i,o)=>wr(i,o,t.sort??"title-asc"));return Fn(r,t.page,t.pageSize??10)}function xr(e){const t=new Set,n=new Set;return e.forEach(r=>{var i;r.category&&t.add(r.category),(i=r.tags)==null||i.forEach(o=>n.add(o))}),{categories:[...t].sort((r,i)=>r.localeCompare(i)),tags:[...n].sort((r,i)=>r.localeCompare(i))}}function yr(e,t){const n={};for(const i of t)n[i]=new Set;for(const i of e){const o=i;for(const l of t){if(!(l in o))continue;const s=o[l];if(typeof s=="string"&&s)n[l].add(s);else if(Array.isArray(s))for(const u of s)typeof u=="string"&&u&&n[l].add(u)}}const r={};for(const i of t)r[i]=[...n[i]].sort((o,l)=>o.localeCompare(l));return r}function En(e,t){const n=e;for(const[r,i]of Object.entries(t)){if(!i)continue;if(!(r in n))return!1;const o=n[r];if(typeof o=="string"){if(o!==i)return!1}else if(Array.isArray(o)){if(!o.includes(i))return!1}else return!1}return!0}function br(e,t){var i;if(t.category&&e.category!==t.category||t.tag&&!((i=e.tags)!=null&&i.includes(t.tag)))return!1;if(!t.query)return!0;const n=t.query.trim().toLowerCase();return n?[e.title,e.excerpt,e.category,...e.tags??[]].join(" ").toLowerCase().includes(n):!0}function kr(e,t){var i;if(t.category&&e.category!==t.category||t.tag&&!((i=e.tags)!=null&&i.includes(t.tag)))return!1;if(!t.query)return!0;const n=t.query.trim().toLowerCase();return n?[e.title,e.description,e.category,...e.tags??[]].join(" ").toLowerCase().includes(n):!0}function Sr(e,t,n){return n==="oldest"?rt(e.publishedAt,t.publishedAt)||e.title.localeCompare(t.title):n==="title-asc"?e.title.localeCompare(t.title):n==="title-desc"?t.title.localeCompare(e.title):rt(t.publishedAt,e.publishedAt)||e.title.localeCompare(t.title)}function wr(e,t,n){return n==="updated-desc"?rt(t.lastUpdated,e.lastUpdated)||e.title.localeCompare(t.title):n==="updated-asc"?rt(e.lastUpdated,t.lastUpdated)||e.title.localeCompare(t.title):n==="title-desc"?t.title.localeCompare(e.title):e.title.localeCompare(t.title)}function rt(e,t){return Qt(e)-Qt(t)}function Qt(e){const t=Date.parse(e??"");return Number.isNaN(t)?0:t}function Fn(e,t,n){const r=Nt(n,10),i=e.length,o=Math.max(1,Math.ceil(i/r)),l=Math.min(Nt(t,1),o),s=(l-1)*r;return{items:e.slice(s,s+r),page:l,pageSize:r,totalItems:i,totalPages:o}}function Nt(e,t){return e===void 0||!Number.isFinite(e)?t:Math.max(1,Math.floor(e))}function Tr({siteTitle:e,navigation:t,posts:n,title:r="Blog",description:i="",query:o="",category:l="",tag:s="",sort:u="newest",page:a=1,pageSize:c=8,filterDimensions:d,activeFilters:x,onFilterChange:h,onSearch:z,onPageChange:C,bookmarkedSlugs:P,onBookmarkToggle:b,onNavigate:I,currentPath:w}){const{tokens:j,unstyled:T}=q(),y=In(n,{query:o,category:l,tag:s,sort:u,page:a,pageSize:c,dimensions:x});return f.jsxs(ke,{siteTitle:e,navigation:t,onNavigate:I,currentPath:w,children:[f.jsxs(p.View,{style:[G.card,!T&&{backgroundColor:j.background,borderColor:j.border}],children:[f.jsx(p.Text,{style:[G.title,!T&&{color:j.foreground}],children:r}),!!i&&f.jsx(p.Text,{style:[G.subtitle,!T&&{color:j.mutedForeground}],children:i})]}),(d||z)&&f.jsxs(p.View,{style:[G.card,!T&&{backgroundColor:j.background,borderColor:j.border}],children:[z&&f.jsx(Sn,{defaultValue:o,onSearch:z}),d&&h&&f.jsx(wn,{dimensions:d,active:x??{},onChange:h})]}),y.totalItems===0&&f.jsxs(p.View,{style:[G.card,G.emptyState,!T&&{backgroundColor:j.background,borderColor:j.border}],children:[f.jsx(p.Text,{style:[G.emptyTitle,!T&&{color:j.foreground}],children:"No posts found"}),f.jsx(p.Text,{style:[G.subtitle,!T&&{color:j.mutedForeground}],children:"Adjust filters or search terms to find matching articles."})]}),y.items.map(E=>f.jsxs(p.Pressable,{onPress:()=>I==null?void 0:I(`/blog/${E.slug}`),style:[G.card,!T&&{backgroundColor:j.background,borderColor:j.border}],children:[f.jsxs(p.View,{style:G.entryHeader,children:[f.jsx(p.Text,{style:[G.entryTitle,!T&&{color:j.foreground}],children:E.title}),f.jsxs(p.View,{style:G.entryHeaderRight,children:[E.publishedAt&&f.jsx(p.Text,{style:[G.pill,!T&&{backgroundColor:j.muted,color:j.foreground}],children:E.publishedAt}),P&&b&&f.jsx(At,{slug:E.slug,isBookmarked:P.has(E.slug),onToggle:b})]})]}),(E.author||E.readingMinutes)&&f.jsx(p.Text,{style:[G.meta,!T&&{color:j.mutedForeground}],children:[E.author,Cr(E.readingMinutes)].filter(Boolean).join(" • ")}),E.excerpt&&f.jsx(p.Text,{style:[G.subtitle,!T&&{color:j.mutedForeground}],children:E.excerpt}),E.tags&&E.tags.length>0&&f.jsx(p.View,{style:G.tagList,children:E.tags.map(O=>f.jsx(p.Text,{style:[G.pill,!T&&{backgroundColor:j.muted,color:j.foreground}],children:O},O))})]},E.slug)),f.jsx(Ft,{page:y.page,totalPages:y.totalPages,onPageChange:C})]})}function Cr(e){return e?`${e} min read`:""}const G=p.StyleSheet.create({card:{padding:16,marginHorizontal:16,marginTop:12,borderWidth:1,borderRadius:8,gap:8},title:{fontSize:22,fontWeight:"700"},subtitle:{fontSize:14,lineHeight:20},emptyState:{alignItems:"center",paddingVertical:32},emptyTitle:{fontSize:18,fontWeight:"600"},entryHeader:{flexDirection:"row",justifyContent:"space-between",alignItems:"flex-start",gap:8},entryHeaderRight:{flexDirection:"row",alignItems:"center",gap:6},entryTitle:{fontSize:16,fontWeight:"600",flex:1},meta:{fontSize:12},pill:{fontSize:11,fontWeight:"500",paddingHorizontal:8,paddingVertical:3,borderRadius:12,overflow:"hidden"},tagList:{flexDirection:"row",flexWrap:"wrap",gap:6}});function zr({siteTitle:e,navigation:t,title:n,bodyMarkdown:r,bodyHtml:i,allowUnsafeHtmlFallback:o=!1,publishedAt:l,updatedAt:s,author:u,category:a,tags:c=[],readingMinutes:d,breadcrumbs:x=[],relatedPosts:h=[],isBookmarked:z,onBookmarkToggle:C,slug:P,tipping:b,paywall:I,onNavigate:w,currentPath:j}){const{tokens:T,unstyled:y}=q(),E=[l,s?`Updated ${s}`:"",u,d?`${d} min read`:""].filter(Boolean),O=z!==void 0&&C&&P;return f.jsxs(ke,{siteTitle:e,navigation:t,onNavigate:w,currentPath:j,children:[f.jsx(Et,{trail:x,onNavigate:w}),f.jsxs(p.View,{style:[ie.card,!y&&{backgroundColor:T.background,borderColor:T.border}],children:[f.jsxs(p.View,{style:ie.headerRow,children:[f.jsx(p.Text,{style:[ie.pill,!y&&{backgroundColor:T.muted,color:T.foreground}],children:"blog"}),O&&f.jsx(At,{slug:P,isBookmarked:z,onToggle:C})]}),f.jsx(p.Text,{style:[ie.title,!y&&{color:T.foreground}],children:n}),E.length>0&&f.jsx(p.Text,{style:[ie.meta,!y&&{color:T.mutedForeground}],children:E.join(" • ")}),(a||c.length>0)&&f.jsxs(p.View,{style:ie.tagList,children:[a&&f.jsx(p.Pressable,{onPress:()=>w==null?void 0:w(`/blog?category=${encodeURIComponent(a)}`),children:f.jsx(p.Text,{style:[ie.pill,!y&&{backgroundColor:T.muted,color:T.foreground}],children:a})}),c.map(V=>f.jsx(p.Pressable,{onPress:()=>w==null?void 0:w(`/blog?tag=${encodeURIComponent(V)}`),children:f.jsx(p.Text,{style:[ie.pill,!y&&{backgroundColor:T.muted,color:T.foreground}],children:V})},V))]}),Ir({paywall:I,bodyMarkdown:r,bodyHtml:i,allowUnsafeHtmlFallback:o,tokens:T,unstyled:y})]}),(b==null?void 0:b.enabled)&&f.jsx(Cn,{dataServerUrl:b.dataServerUrl,recipient:b.allowPerPostRecipient&&b.recipientOverride?b.recipientOverride:b.recipient,currencies:b.currencies,presets:b.presets,label:b.label,description:b.description,senderAddress:b.senderAddress,signTransaction:b.signTransaction}),h.length>0&&f.jsxs(p.View,{style:[ie.card,!y&&{backgroundColor:T.background,borderColor:T.border}],children:[f.jsx(p.Text,{style:[ie.sectionTitle,!y&&{color:T.foreground}],children:"Related posts"}),h.map(V=>f.jsxs(p.Pressable,{onPress:()=>w==null?void 0:w(`/blog/${V.slug}`),children:[f.jsx(p.Text,{style:[ie.relatedTitle,!y&&{color:T.link}],children:V.title}),V.excerpt&&f.jsx(p.Text,{style:[ie.relatedExcerpt,!y&&{color:T.mutedForeground}],children:V.excerpt})]},V.slug))]})]})}function Ir({paywall:e,bodyMarkdown:t,bodyHtml:n,allowUnsafeHtmlFallback:r,tokens:i,unstyled:o}){const l=(e==null?void 0:e.remainingFreeReads)!==void 0&&e.remainingFreeReads>0;if(e&&e.mode!=="free"&&!e.unlocked&&!l){const u=e.mode==="preview"&&t?jr(t,e.previewParagraphs??3):void 0;return f.jsx(zn,{mode:e.mode==="preview"?"preview":"locked",previewContent:u,price:e.price,payClient:e.payClient,purchaseLabel:e.purchaseLabel,subscriptionLabel:e.subscriptionLabel})}const s=f.jsx(Ye,{bodyMarkdown:t,bodyHtml:n,allowUnsafeHtmlFallback:r});if(l&&!(e!=null&&e.unlocked)){const u=e.remainingFreeReads,a=u===1?"1 free read remaining this month":`${u} free reads remaining this month`;return f.jsxs(p.View,{children:[s,f.jsx(p.Text,{style:[ie.meteredBanner,!o&&{color:i.mutedForeground}],children:a})]})}return s}function jr(e,t){return e.split(/\n\n+/).slice(0,t).join(`
|
|
2
|
+
|
|
3
|
+
`)}const ie=p.StyleSheet.create({card:{padding:16,marginHorizontal:16,marginTop:12,borderWidth:1,borderRadius:8,gap:8},headerRow:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"},title:{fontSize:22,fontWeight:"700"},meta:{fontSize:12},pill:{fontSize:11,fontWeight:"500",paddingHorizontal:8,paddingVertical:3,borderRadius:12,overflow:"hidden"},tagList:{flexDirection:"row",flexWrap:"wrap",gap:6},sectionTitle:{fontSize:16,fontWeight:"600"},relatedTitle:{fontSize:14,fontWeight:"500",marginTop:8},relatedExcerpt:{fontSize:13,marginTop:2},meteredBanner:{fontSize:13,textAlign:"center",marginTop:12,fontStyle:"italic"}});function Pt({title:e,sections:t,onNavigate:n}){const{tokens:r,unstyled:i}=q(),o=v.useMemo(()=>t.map(a=>a.key).join(","),[t]),[l,s]=v.useState(()=>Er(t));v.useEffect(()=>{s(a=>{const c={};return t.forEach(d=>{c[d.key]=a[d.key]??d.collapsed!==!0}),c})},[o]);const u=a=>{s(c=>({...c,[a]:!c[a]}))};return f.jsxs(p.View,{style:[be.container,!i&&{backgroundColor:r.background,borderColor:r.border}],children:[f.jsx(p.Text,{style:[be.sidebarTitle,!i&&{color:r.foreground}],children:e}),t.length===0&&f.jsx(p.Text,{style:[be.empty,!i&&{color:r.mutedForeground}],children:"No sections available yet."}),t.map(a=>f.jsxs(p.View,{style:be.section,children:[f.jsx(p.Pressable,{onPress:()=>u(a.key),style:be.sectionHeader,children:f.jsxs(p.Text,{style:[be.sectionLabel,!i&&{color:r.foreground}],children:[l[a.key]?"▾ ":"▸ ",a.label]})}),l[a.key]&&a.items.map(c=>f.jsxs(p.Pressable,{onPress:()=>n==null?void 0:n(c.href),style:[be.item,{paddingLeft:16+(c.depth??0)*12},!i&&c.isActive&&{backgroundColor:r.accent}],children:[f.jsx(p.Text,{style:[be.itemText,!i&&{color:c.isActive?r.foreground:r.mutedForeground,fontWeight:c.isActive?"600":"400"}],children:c.label}),c.badge&&f.jsx(p.Text,{style:[be.badge,!i&&{backgroundColor:r.muted,color:r.foreground}],children:c.badge})]},c.key))]},a.key))]})}const be=p.StyleSheet.create({container:{padding:16,marginHorizontal:16,marginTop:12,borderWidth:1,borderRadius:8},sidebarTitle:{fontSize:16,fontWeight:"700",marginBottom:12},empty:{fontSize:13},section:{marginTop:8},sectionHeader:{paddingVertical:6},sectionLabel:{fontSize:14,fontWeight:"600"},item:{paddingVertical:8,paddingRight:12,borderRadius:6,flexDirection:"row",alignItems:"center",justifyContent:"space-between"},itemText:{fontSize:13,flex:1},badge:{fontSize:10,fontWeight:"500",paddingHorizontal:6,paddingVertical:2,borderRadius:10,overflow:"hidden",marginLeft:6}});function Er(e){const t={};return e.forEach(n=>{t[n.key]=n.collapsed!==!0}),t}function Rt(e,t="/docs"){const n=new Map;return e.forEach(r=>{const i=r.category??"Overview",o=i.toLowerCase().replace(/\s+/gu,"-"),l=n.get(o)??{label:i,items:[]};l.items.push({key:r.slug,label:r.title,href:`${t}/${r.slug}`}),n.set(o,l)}),[...n.entries()].map(([r,i])=>({key:r,label:i.label,items:[...i.items].sort((o,l)=>o.label.localeCompare(l.label))})).sort((r,i)=>r.label.localeCompare(i.label))}function Lt(e,t){if(!t)return e.map(i=>({...i,items:i.items.map(o=>({...o,isActive:o.isActive??!1}))}));const n=e.flatMap(i=>i.items).filter(i=>i.isActive===void 0&&Ne(i.href,t)).map(i=>je(i.href).length),r=n.length>0?Math.max(...n):0;return e.map(i=>({...i,items:i.items.map(o=>{const l=r>0&&je(o.href).length===r&&Ne(o.href,t);return{...o,isActive:o.isActive??l}})}))}function Fr({siteTitle:e,navigation:t,docs:n,title:r="Documentation",description:i="",basePath:o="/docs",currentPath:l,query:s="",category:u="",tag:a="",sort:c="title-asc",page:d=1,pageSize:x=10,sidebarSections:h,sidebarTitle:z="Docs",onNavigate:C,onPageChange:P}){const{tokens:b,unstyled:I}=q(),w=l??o,j=Lt(h??Rt(n,o),w),T=jn(n,{query:s,category:u,tag:a,sort:c,page:d,pageSize:x});return f.jsxs(ke,{siteTitle:e,navigation:t,onNavigate:C,currentPath:l,children:[f.jsx(Pt,{title:z,sections:j,onNavigate:C}),f.jsxs(p.View,{style:[J.card,!I&&{backgroundColor:b.background,borderColor:b.border}],children:[f.jsx(p.Text,{style:[J.pill,!I&&{backgroundColor:b.muted,color:b.foreground}],children:"docs"}),f.jsx(p.Text,{style:[J.title,!I&&{color:b.foreground}],children:r}),!!i&&f.jsx(p.Text,{style:[J.subtitle,!I&&{color:b.mutedForeground}],children:i}),f.jsxs(p.Text,{style:[J.meta,!I&&{color:b.mutedForeground}],children:[T.totalItems," results"]})]}),T.totalItems===0&&f.jsxs(p.View,{style:[J.card,J.emptyState,!I&&{backgroundColor:b.background,borderColor:b.border}],children:[f.jsx(p.Text,{style:[J.emptyTitle,!I&&{color:b.foreground}],children:"No documentation pages found"}),f.jsx(p.Text,{style:[J.subtitle,!I&&{color:b.mutedForeground}],children:"Try a broader query or clear filters."})]}),T.items.map(y=>f.jsxs(p.Pressable,{onPress:()=>C==null?void 0:C(`${o}/${y.slug}`),style:[J.card,!I&&{backgroundColor:b.background,borderColor:b.border}],children:[f.jsx(p.Text,{style:[J.entryTitle,!I&&{color:b.foreground}],children:y.title}),y.description&&f.jsx(p.Text,{style:[J.subtitle,!I&&{color:b.mutedForeground}],children:y.description}),(y.lastUpdated||y.category)&&f.jsx(p.Text,{style:[J.meta,!I&&{color:b.mutedForeground}],children:[y.category,y.lastUpdated?`Updated ${y.lastUpdated}`:""].filter(Boolean).join(" • ")}),y.tags&&y.tags.length>0&&f.jsx(p.View,{style:J.tagList,children:y.tags.map(E=>f.jsx(p.Text,{style:[J.pill,!I&&{backgroundColor:b.muted,color:b.foreground}],children:E},E))})]},y.slug)),f.jsx(Ft,{page:T.page,totalPages:T.totalPages,onPageChange:P})]})}const J=p.StyleSheet.create({card:{padding:16,marginHorizontal:16,marginTop:12,borderWidth:1,borderRadius:8,gap:8},title:{fontSize:22,fontWeight:"700"},subtitle:{fontSize:14,lineHeight:20},emptyState:{alignItems:"center",paddingVertical:32},emptyTitle:{fontSize:18,fontWeight:"600"},entryTitle:{fontSize:16,fontWeight:"600"},meta:{fontSize:12},pill:{fontSize:11,fontWeight:"500",paddingHorizontal:8,paddingVertical:3,borderRadius:12,overflow:"hidden",alignSelf:"flex-start"},tagList:{flexDirection:"row",flexWrap:"wrap",gap:6}});function Ar({siteTitle:e,navigation:t,title:n,bodyMarkdown:r,bodyHtml:i,allowUnsafeHtmlFallback:o=!1,lastUpdated:l,readingMinutes:s,basePath:u="/docs",currentPath:a,docs:c=[],sidebarSections:d,sidebarTitle:x="Docs",breadcrumbs:h=[],previousDoc:z,nextDoc:C,onNavigate:P}){var T;const{tokens:b,unstyled:I}=q(),w=a??((T=h[h.length-1])==null?void 0:T.href),j=Lt(d??Rt(c,u),w);return f.jsxs(ke,{siteTitle:e,navigation:t,onNavigate:P,currentPath:a,children:[f.jsx(Pt,{title:x,sections:j,onNavigate:P}),f.jsx(Et,{trail:h,onNavigate:P}),f.jsxs(p.View,{style:[de.card,!I&&{backgroundColor:b.background,borderColor:b.border}],children:[f.jsx(p.Text,{style:[de.pill,!I&&{backgroundColor:b.muted,color:b.foreground}],children:"docs"}),f.jsx(p.Text,{style:[de.title,!I&&{color:b.foreground}],children:n}),(l||s)&&f.jsx(p.Text,{style:[de.meta,!I&&{color:b.mutedForeground}],children:[l?`Last updated ${l}`:"",s?`${s} min read`:""].filter(Boolean).join(" • ")}),f.jsx(Ye,{bodyMarkdown:r,bodyHtml:i,allowUnsafeHtmlFallback:o}),(z||C)&&f.jsxs(p.View,{style:[de.navFooter,!I&&{borderTopColor:b.border}],children:[z&&f.jsx(p.Pressable,{onPress:()=>P==null?void 0:P(z.href),style:de.navButton,children:f.jsxs(p.Text,{style:[de.navButtonText,!I&&{color:b.link}],children:["← ",z.title]})}),C&&f.jsx(p.Pressable,{onPress:()=>P==null?void 0:P(C.href),style:[de.navButton,de.navButtonRight],children:f.jsxs(p.Text,{style:[de.navButtonText,!I&&{color:b.link}],children:[C.title," →"]})})]})]})]})}const de=p.StyleSheet.create({card:{padding:16,marginHorizontal:16,marginTop:12,borderWidth:1,borderRadius:8,gap:8},title:{fontSize:22,fontWeight:"700"},meta:{fontSize:12},pill:{fontSize:11,fontWeight:"500",paddingHorizontal:8,paddingVertical:3,borderRadius:12,overflow:"hidden",alignSelf:"flex-start"},navFooter:{flexDirection:"row",justifyContent:"space-between",marginTop:16,paddingTop:12,borderTopWidth:p.StyleSheet.hairlineWidth,borderTopColor:"transparent"},navButton:{flex:1},navButtonRight:{alignItems:"flex-end"},navButtonText:{fontSize:14,fontWeight:"500"}});function Pr({siteTitle:e,navigation:t,headline:n,subheadline:r="",ctaLabel:i="Get Started",ctaRoute:o="/docs",features:l=[],onNavigate:s,currentPath:u}){const{tokens:a,unstyled:c}=q();return f.jsxs(ke,{siteTitle:e,navigation:t,onNavigate:s,currentPath:u,children:[f.jsxs(p.View,{style:[he.heroCard,!c&&{backgroundColor:a.background,borderColor:a.border}],children:[f.jsx(p.Text,{style:[he.pill,!c&&{backgroundColor:a.muted,color:a.foreground}],children:"home"}),f.jsx(p.Text,{style:[he.headline,!c&&{color:a.foreground}],children:n}),!!r&&f.jsx(p.Text,{style:[he.subheadline,!c&&{color:a.mutedForeground}],children:r}),f.jsx(p.Pressable,{onPress:()=>s==null?void 0:s(o),style:[he.ctaButton,!c&&{backgroundColor:a.primary,borderRadius:a.radius}],children:f.jsx(p.Text,{style:[he.ctaText,!c&&{color:a.primaryForeground}],children:i})})]}),l.length>0&&f.jsx(p.View,{style:he.featuresGrid,children:l.map(d=>f.jsxs(p.View,{style:[he.featureCard,!c&&{backgroundColor:a.background,borderColor:a.border}],children:[f.jsx(p.Text,{style:[he.featureTitle,!c&&{color:a.foreground}],children:d.title}),f.jsx(p.Text,{style:[he.featureDesc,!c&&{color:a.mutedForeground}],children:d.description})]},d.title))})]})}const he=p.StyleSheet.create({heroCard:{padding:24,marginHorizontal:16,marginTop:12,borderWidth:1,borderRadius:8,gap:12},pill:{fontSize:11,fontWeight:"500",paddingHorizontal:8,paddingVertical:3,borderRadius:12,overflow:"hidden",alignSelf:"flex-start"},headline:{fontSize:28,fontWeight:"700"},subheadline:{fontSize:16,lineHeight:24},ctaButton:{paddingHorizontal:20,paddingVertical:12,alignSelf:"flex-start"},ctaText:{fontSize:15,fontWeight:"600"},featuresGrid:{paddingHorizontal:16,marginTop:12,gap:10},featureCard:{padding:16,borderWidth:1,borderRadius:8,gap:6},featureTitle:{fontSize:15,fontWeight:"600"},featureDesc:{fontSize:13,lineHeight:20}});function Rr({siteTitle:e,navigation:t,pageType:n,title:r,bodyMarkdown:i,bodyHtml:o,allowUnsafeHtmlFallback:l=!1,effectiveDate:s,onNavigate:u,currentPath:a}){const{tokens:c,unstyled:d}=q();return f.jsx(ke,{siteTitle:e,navigation:t,onNavigate:u,currentPath:a,children:f.jsxs(p.View,{style:[Ke.card,!d&&{backgroundColor:c.background,borderColor:c.border}],children:[f.jsx(p.Text,{style:[Ke.pill,!d&&{backgroundColor:c.muted,color:c.foreground}],children:n}),f.jsx(p.Text,{style:[Ke.title,!d&&{color:c.foreground}],children:r}),s&&f.jsxs(p.Text,{style:[Ke.subtitle,!d&&{color:c.mutedForeground}],children:["Effective: ",s]}),f.jsx(Ye,{bodyMarkdown:i,bodyHtml:o,allowUnsafeHtmlFallback:l})]})})}const Ke=p.StyleSheet.create({card:{padding:16,marginHorizontal:16,marginTop:12,borderWidth:1,borderRadius:8,gap:8},pill:{fontSize:11,fontWeight:"500",paddingHorizontal:8,paddingVertical:3,borderRadius:12,overflow:"hidden",alignSelf:"flex-start"},title:{fontSize:22,fontWeight:"700"},subtitle:{fontSize:14}});function Lr({siteTitle:e,navigation:t,title:n="Contact",description:r="",details:i,onNavigate:o,onLinkPress:l,currentPath:s}){const{tokens:u,unstyled:a}=q();return f.jsxs(ke,{siteTitle:e,navigation:t,onNavigate:o,currentPath:s,children:[f.jsxs(p.View,{style:[Re.card,!a&&{backgroundColor:u.background,borderColor:u.border}],children:[f.jsx(p.Text,{style:[Re.title,!a&&{color:u.foreground}],children:n}),!!r&&f.jsx(p.Text,{style:[Re.subtitle,!a&&{color:u.mutedForeground}],children:r})]}),i.map(c=>f.jsxs(p.View,{style:[Re.detailCard,!a&&{backgroundColor:u.background,borderColor:u.border}],children:[f.jsx(p.Text,{style:[Re.detailLabel,!a&&{color:u.foreground}],children:c.label}),c.href?f.jsx(p.Pressable,{onPress:()=>l==null?void 0:l(c.href),children:f.jsx(p.Text,{style:[Re.detailValue,!a&&{color:u.link}],children:c.value})}):f.jsx(p.Text,{style:[Re.detailValue,!a&&{color:u.mutedForeground}],children:c.value})]},c.label))]})}const Re=p.StyleSheet.create({card:{padding:16,marginHorizontal:16,marginTop:12,borderWidth:1,borderRadius:8,gap:8},title:{fontSize:22,fontWeight:"700"},subtitle:{fontSize:14,lineHeight:20},detailCard:{padding:16,marginHorizontal:16,marginTop:10,borderWidth:1,borderRadius:8,gap:6},detailLabel:{fontSize:14,fontWeight:"600"},detailValue:{fontSize:14}});function Vr({siteTitle:e,navigation:t,title:n="Page Not Found",message:r="The page you requested could not be found.",onNavigate:i,currentPath:o}){const{tokens:l,unstyled:s}=q();return f.jsx(ke,{siteTitle:e,navigation:t,onNavigate:i,currentPath:o,children:f.jsxs(p.View,{style:[He.card,!s&&{backgroundColor:l.background,borderColor:l.border}],children:[f.jsx(p.Text,{style:[He.pill,!s&&{backgroundColor:l.muted,color:l.foreground}],children:"404"}),f.jsx(p.Text,{style:[He.title,!s&&{color:l.foreground}],children:n}),f.jsx(p.Text,{style:[He.subtitle,!s&&{color:l.mutedForeground}],children:r}),f.jsx(p.Pressable,{onPress:()=>i==null?void 0:i("/"),style:[He.homeButton,!s&&{backgroundColor:l.primary,borderRadius:l.radius}],children:f.jsx(p.Text,{style:[He.homeButtonText,!s&&{color:l.primaryForeground}],children:"Go Home"})})]})})}const He=p.StyleSheet.create({card:{padding:32,marginHorizontal:16,marginTop:24,borderWidth:1,borderRadius:8,alignItems:"center",gap:10},pill:{fontSize:11,fontWeight:"500",paddingHorizontal:8,paddingVertical:3,borderRadius:12,overflow:"hidden"},title:{fontSize:22,fontWeight:"700"},subtitle:{fontSize:14,textAlign:"center"},homeButton:{marginTop:8,paddingHorizontal:20,paddingVertical:10},homeButtonText:{fontSize:14,fontWeight:"600"}});function Yt(e){if(e)throw e}function Br(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var st,Gt;function _r(){if(Gt)return st;Gt=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(a){return typeof Array.isArray=="function"?Array.isArray(a):t.call(a)==="[object Array]"},o=function(a){if(!a||t.call(a)!=="[object Object]")return!1;var c=e.call(a,"constructor"),d=a.constructor&&a.constructor.prototype&&e.call(a.constructor.prototype,"isPrototypeOf");if(a.constructor&&!c&&!d)return!1;var x;for(x in a);return typeof x>"u"||e.call(a,x)},l=function(a,c){n&&c.name==="__proto__"?n(a,c.name,{enumerable:!0,configurable:!0,value:c.newValue,writable:!0}):a[c.name]=c.newValue},s=function(a,c){if(c==="__proto__")if(e.call(a,c)){if(r)return r(a,c).value}else return;return a[c]};return st=function u(){var a,c,d,x,h,z,C=arguments[0],P=1,b=arguments.length,I=!1;for(typeof C=="boolean"&&(I=C,C=arguments[1]||{},P=2),(C==null||typeof C!="object"&&typeof C!="function")&&(C={});P<b;++P)if(a=arguments[P],a!=null)for(c in a)d=s(C,c),x=s(a,c),C!==x&&(I&&x&&(o(x)||(h=i(x)))?(h?(h=!1,z=d&&i(d)?d:[]):z=d&&o(d)?d:{},l(C,{name:c,newValue:u(I,z,x)})):typeof x<"u"&&l(C,{name:c,newValue:x}));return C},st}var Dr=_r();const at=Br(Dr);function St(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Hr(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const l=i.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);s(null,...i);function s(u,...a){const c=e[++o];let d=-1;if(u){l(u);return}for(;++d<i.length;)(a[d]===null||a[d]===void 0)&&(a[d]=i[d]);i=a,c?Wr(c,s)(...a):l(null,...a)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Wr(e,t){let n;return r;function r(...l){const s=e.length>l.length;let u;s&&l.push(i);try{u=e.apply(this,l)}catch(a){const c=a;if(s&&n)throw c;return i(c)}s||(u&&u.then&&typeof u.then=="function"?u.then(o,i):u instanceof Error?i(u):o(u))}function i(l,...s){n||(n=!0,t(l,...s))}function o(l){i(null,l)}}function ve(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Jt(e.position):"start"in e||"end"in e?Jt(e):"line"in e||"column"in e?wt(e):""}function wt(e){return Zt(e&&e.line)+":"+Zt(e&&e.column)}function Jt(e){return wt(e&&e.start)+"-"+wt(e&&e.end)}function Zt(e){return e&&typeof e=="number"?e:1}class te extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},l=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(l=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?o.ruleId=r:(o.source=r.slice(0,u),o.ruleId=r.slice(u+1))}if(!o.place&&o.ancestors&&o.ancestors){const u=o.ancestors[o.ancestors.length-1];u&&(o.place=u.position)}const s=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=s?s.line:void 0,this.name=ve(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=l&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}te.prototype.file="";te.prototype.name="";te.prototype.reason="";te.prototype.message="";te.prototype.stack="";te.prototype.column=void 0;te.prototype.line=void 0;te.prototype.ancestors=void 0;te.prototype.cause=void 0;te.prototype.fatal=void 0;te.prototype.place=void 0;te.prototype.ruleId=void 0;te.prototype.source=void 0;const fe={basename:Mr,dirname:Or,extname:$r,join:Ur,sep:"/"};function Mr(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ge(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else l<0&&(o=!0,l=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function Or(e){if(Ge(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function $r(e){Ge(e);let t=e.length,n=-1,r=0,i=-1,o=0,l;for(;t--;){const s=e.codePointAt(t);if(s===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),s===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function Ur(...e){let t=-1,n;for(;++t<e.length;)Ge(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":qr(n)}function qr(e){Ge(e);const t=e.codePointAt(0)===47;let n=vr(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function vr(e,t){let n="",r=0,i=-1,o=0,l=-1,s,u;for(;++l<=e.length;){if(l<e.length)s=e.codePointAt(l);else{if(s===47)break;s=47}if(s===47){if(!(i===l-1||o===1))if(i!==l-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),i=l,o=0;continue}}else if(n.length>0){n="",r=0,i=l,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,l):n=e.slice(i+1,l),r=l-i-1;i=l,o=0}else s===46&&o>-1?o++:o=-1}return n}function Ge(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Qr={cwd:Nr};function Nr(){return"/"}function Tt(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Yr(e){if(typeof e=="string")e=new URL(e);else if(!Tt(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Gr(e)}function Gr(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const ut=["history","path","basename","stem","extname","dirname"];class Jr{constructor(t){let n;t?Tt(t)?n={path:t}:typeof t=="string"||Zr(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":Qr.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<ut.length;){const o=ut[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)ut.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?fe.basename(this.path):void 0}set basename(t){dt(t,"basename"),ct(t,"basename"),this.path=fe.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?fe.dirname(this.path):void 0}set dirname(t){Kt(this.basename,"dirname"),this.path=fe.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?fe.extname(this.path):void 0}set extname(t){if(ct(t,"extname"),Kt(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=fe.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Tt(t)&&(t=Yr(t)),dt(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?fe.basename(this.path,this.extname):void 0}set stem(t){dt(t,"stem"),ct(t,"stem"),this.path=fe.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new te(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function ct(e,t){if(e&&e.includes(fe.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+fe.sep+"`")}function dt(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Kt(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Zr(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Kr=(function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),Xr={}.hasOwnProperty;class Vt extends Kr{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Hr()}copy(){const t=new Vt;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(at(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(pt("data",this.frozen),this.namespace[t]=n,this):Xr.call(this.namespace,t)&&this.namespace[t]||void 0:t?(pt("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Xe(t),r=this.parser||this.Parser;return ht("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),ht("process",this.parser||this.Parser),ft("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,l){const s=Xe(t),u=r.parse(s);r.run(u,s,function(c,d,x){if(c||!d||!x)return a(c);const h=d,z=r.stringify(h,x);ni(z)?x.value=z:x.result=z,a(c,x)});function a(c,d){c||!d?l(c):o?o(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),ht("processSync",this.parser||this.Parser),ft("processSync",this.compiler||this.Compiler),this.process(t,i),en("processSync","process",n),r;function i(o,l){n=!0,Yt(o),r=l}}run(t,n,r){Xt(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(l,s){const u=Xe(n);i.run(t,u,a);function a(c,d,x){const h=d||t;c?s(c):l?l(h):r(void 0,h,x)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),en("runSync","run",r),i;function o(l,s){Yt(l),i=s,r=!0}}stringify(t,n){this.freeze();const r=Xe(n),i=this.compiler||this.Compiler;return ft("stringify",i),Xt(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(pt("use",this.frozen),t!=null)if(typeof t=="function")u(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(a){if(typeof a=="function")u(a,[]);else if(typeof a=="object")if(Array.isArray(a)){const[c,...d]=a;u(c,d)}else l(a);else throw new TypeError("Expected usable value, not `"+a+"`")}function l(a){if(!("plugins"in a)&&!("settings"in a))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(a.plugins),a.settings&&(i.settings=at(!0,i.settings,a.settings))}function s(a){let c=-1;if(a!=null)if(Array.isArray(a))for(;++c<a.length;){const d=a[c];o(d)}else throw new TypeError("Expected a list of plugins, not `"+a+"`")}function u(a,c){let d=-1,x=-1;for(;++d<r.length;)if(r[d][0]===a){x=d;break}if(x===-1)r.push([a,...c]);else if(c.length>0){let[h,...z]=c;const C=r[x][1];St(C)&&St(h)&&(h=at(!0,C,h)),r[x]=[a,h,...z]}}}}const ei=new Vt().freeze();function ht(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ft(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function pt(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Xt(e){if(!St(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function en(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Xe(e){return ti(e)?e:new Jr(e)}function ti(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function ni(e){return typeof e=="string"||ri(e)}function ri(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const ii={};function oi(e,t){const n=ii,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return An(e,r,i)}function An(e,t,n){if(li(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return tn(e.children,t,n)}return Array.isArray(e)?tn(e,t,n):""}function tn(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=An(e[i],t,n);return r.join("")}function li(e){return!!(e&&typeof e=="object")}const nn=document.createElement("i");function Bt(e){const t="&"+e+";";nn.innerHTML=t;const n=nn.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function ge(e,t,n,r){const i=e.length;let o=0,l;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);o<r.length;)l=r.slice(o,o+1e4),l.unshift(t,0),e.splice(...l),o+=1e4,t+=1e4}function oe(e,t){return e.length>0?(ge(e,e.length,0,t),e):t}const rn={}.hasOwnProperty;function si(e){const t={};let n=-1;for(;++n<e.length;)ai(t,e[n]);return t}function ai(e,t){let n;for(n in t){const i=(rn.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let l;if(o)for(l in o){rn.call(i,l)||(i[l]=[]);const s=o[l];ui(i[l],Array.isArray(s)?s:s?[s]:[])}}}function ui(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);ge(e,0,0,r)}function Pn(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function We(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const pe=Ee(/[A-Za-z]/),ce=Ee(/[\dA-Za-z]/),ci=Ee(/[#-'*+\--9=?A-Z^-~]/);function Ct(e){return e!==null&&(e<32||e===127)}const zt=Ee(/\d/),di=Ee(/[\dA-Fa-f]/),hi=Ee(/[!-/:-@[-`{-~]/);function R(e){return e!==null&&e<-2}function ee(e){return e!==null&&(e<0||e===32)}function W(e){return e===-2||e===-1||e===32}const fi=Ee(new RegExp("\\p{P}|\\p{S}","u")),pi=Ee(/\s/);function Ee(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function U(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(u){return W(u)?(e.enter(n),s(u)):t(u)}function s(u){return W(u)&&o++<i?(e.consume(u),s):(e.exit(n),t(u))}}const gi={tokenize:mi};function mi(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),U(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),o(s)}function o(s){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,l(s)}function l(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return R(s)?(e.consume(s),e.exit("chunkText"),o):(e.consume(s),l)}}const xi={tokenize:yi},on={tokenize:bi};function yi(e){const t=this,n=[];let r=0,i,o,l;return s;function s(w){if(r<n.length){const j=n[r];return t.containerState=j[1],e.attempt(j[0].continuation,u,a)(w)}return a(w)}function u(w){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&I();const j=t.events.length;let T=j,y;for(;T--;)if(t.events[T][0]==="exit"&&t.events[T][1].type==="chunkFlow"){y=t.events[T][1].end;break}b(r);let E=j;for(;E<t.events.length;)t.events[E][1].end={...y},E++;return ge(t.events,T+1,0,t.events.slice(j)),t.events.length=E,a(w)}return s(w)}function a(w){if(r===n.length){if(!i)return x(w);if(i.currentConstruct&&i.currentConstruct.concrete)return z(w);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(on,c,d)(w)}function c(w){return i&&I(),b(r),x(w)}function d(w){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,z(w)}function x(w){return t.containerState={},e.attempt(on,h,z)(w)}function h(w){return r++,n.push([t.currentConstruct,t.containerState]),x(w)}function z(w){if(w===null){i&&I(),b(0),e.consume(w);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),C(w)}function C(w){if(w===null){P(e.exit("chunkFlow"),!0),b(0),e.consume(w);return}return R(w)?(e.consume(w),P(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(w),C)}function P(w,j){const T=t.sliceStream(w);if(j&&T.push(null),w.previous=o,o&&(o.next=w),o=w,i.defineSkip(w.start),i.write(T),t.parser.lazy[w.start.line]){let y=i.events.length;for(;y--;)if(i.events[y][1].start.offset<l&&(!i.events[y][1].end||i.events[y][1].end.offset>l))return;const E=t.events.length;let O=E,V,_;for(;O--;)if(t.events[O][0]==="exit"&&t.events[O][1].type==="chunkFlow"){if(V){_=t.events[O][1].end;break}V=!0}for(b(r),y=E;y<t.events.length;)t.events[y][1].end={..._},y++;ge(t.events,O+1,0,t.events.slice(E)),t.events.length=y}}function b(w){let j=n.length;for(;j-- >w;){const T=n[j];t.containerState=T[1],T[0].exit.call(t,e)}n.length=w}function I(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function bi(e,t,n){return U(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ln(e){if(e===null||ee(e)||pi(e))return 1;if(fi(e))return 2}function _t(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const It={name:"attention",resolveAll:ki,tokenize:Si};function ki(e,t){let n=-1,r,i,o,l,s,u,a,c;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;u=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},x={...e[n][1].start};sn(d,-u),sn(x,u),l={type:u>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},s={type:u>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:x},o={type:u>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:u>1?"strong":"emphasis",start:{...l.start},end:{...s.end}},e[r][1].end={...l.start},e[n][1].start={...s.end},a=[],e[r][1].end.offset-e[r][1].start.offset&&(a=oe(a,[["enter",e[r][1],t],["exit",e[r][1],t]])),a=oe(a,[["enter",i,t],["enter",l,t],["exit",l,t],["enter",o,t]]),a=oe(a,_t(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),a=oe(a,[["exit",o,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,a=oe(a,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,ge(e,r-1,n-r+3,a),n=r+a.length-c-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Si(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=ln(r);let o;return l;function l(u){return o=u,e.enter("attentionSequence"),s(u)}function s(u){if(u===o)return e.consume(u),s;const a=e.exit("attentionSequence"),c=ln(u),d=!c||c===2&&i||n.includes(u),x=!i||i===2&&c||n.includes(r);return a._open=!!(o===42?d:d&&(i||!x)),a._close=!!(o===42?x:x&&(c||!d)),t(u)}}function sn(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const wi={name:"autolink",tokenize:Ti};function Ti(e,t,n){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(h){return pe(h)?(e.consume(h),l):h===64?n(h):a(h)}function l(h){return h===43||h===45||h===46||ce(h)?(r=1,s(h)):a(h)}function s(h){return h===58?(e.consume(h),r=0,u):(h===43||h===45||h===46||ce(h))&&r++<32?(e.consume(h),s):(r=0,a(h))}function u(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||Ct(h)?n(h):(e.consume(h),u)}function a(h){return h===64?(e.consume(h),c):ci(h)?(e.consume(h),a):n(h)}function c(h){return ce(h)?d(h):n(h)}function d(h){return h===46?(e.consume(h),r=0,c):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):x(h)}function x(h){if((h===45||ce(h))&&r++<63){const z=h===45?x:d;return e.consume(h),z}return n(h)}}const it={partial:!0,tokenize:Ci};function Ci(e,t,n){return r;function r(o){return W(o)?U(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||R(o)?t(o):n(o)}}const Rn={continuation:{tokenize:Ii},exit:ji,name:"blockQuote",tokenize:zi};function zi(e,t,n){const r=this;return i;function i(l){if(l===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),o}return n(l)}function o(l){return W(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function Ii(e,t,n){const r=this;return i;function i(l){return W(l)?U(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):o(l)}function o(l){return e.attempt(Rn,t,n)(l)}}function ji(e){e.exit("blockQuote")}const Ln={name:"characterEscape",tokenize:Ei};function Ei(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return hi(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const Vn={name:"characterReference",tokenize:Fi};function Fi(e,t,n){const r=this;let i=0,o,l;return s;function s(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),u}function u(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),a):(e.enter("characterReferenceValue"),o=31,l=ce,c(d))}function a(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,l=di,c):(e.enter("characterReferenceValue"),o=7,l=zt,c(d))}function c(d){if(d===59&&i){const x=e.exit("characterReferenceValue");return l===ce&&!Bt(r.sliceSerialize(x))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(d)&&i++<o?(e.consume(d),c):n(d)}}const an={partial:!0,tokenize:Pi},un={concrete:!0,name:"codeFenced",tokenize:Ai};function Ai(e,t,n){const r=this,i={partial:!0,tokenize:T};let o=0,l=0,s;return u;function u(y){return a(y)}function a(y){const E=r.events[r.events.length-1];return o=E&&E[1].type==="linePrefix"?E[2].sliceSerialize(E[1],!0).length:0,s=y,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(y)}function c(y){return y===s?(l++,e.consume(y),c):l<3?n(y):(e.exit("codeFencedFenceSequence"),W(y)?U(e,d,"whitespace")(y):d(y))}function d(y){return y===null||R(y)?(e.exit("codeFencedFence"),r.interrupt?t(y):e.check(an,C,j)(y)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),x(y))}function x(y){return y===null||R(y)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(y)):W(y)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),U(e,h,"whitespace")(y)):y===96&&y===s?n(y):(e.consume(y),x)}function h(y){return y===null||R(y)?d(y):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),z(y))}function z(y){return y===null||R(y)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(y)):y===96&&y===s?n(y):(e.consume(y),z)}function C(y){return e.attempt(i,j,P)(y)}function P(y){return e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),b}function b(y){return o>0&&W(y)?U(e,I,"linePrefix",o+1)(y):I(y)}function I(y){return y===null||R(y)?e.check(an,C,j)(y):(e.enter("codeFlowValue"),w(y))}function w(y){return y===null||R(y)?(e.exit("codeFlowValue"),I(y)):(e.consume(y),w)}function j(y){return e.exit("codeFenced"),t(y)}function T(y,E,O){let V=0;return _;function _(D){return y.enter("lineEnding"),y.consume(D),y.exit("lineEnding"),F}function F(D){return y.enter("codeFencedFence"),W(D)?U(y,A,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):A(D)}function A(D){return D===s?(y.enter("codeFencedFenceSequence"),B(D)):O(D)}function B(D){return D===s?(V++,y.consume(D),B):V>=l?(y.exit("codeFencedFenceSequence"),W(D)?U(y,M,"whitespace")(D):M(D)):O(D)}function M(D){return D===null||R(D)?(y.exit("codeFencedFence"),E(D)):O(D)}}}function Pi(e,t,n){const r=this;return i;function i(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const gt={name:"codeIndented",tokenize:Li},Ri={partial:!0,tokenize:Vi};function Li(e,t,n){const r=this;return i;function i(a){return e.enter("codeIndented"),U(e,o,"linePrefix",5)(a)}function o(a){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?l(a):n(a)}function l(a){return a===null?u(a):R(a)?e.attempt(Ri,l,u)(a):(e.enter("codeFlowValue"),s(a))}function s(a){return a===null||R(a)?(e.exit("codeFlowValue"),l(a)):(e.consume(a),s)}function u(a){return e.exit("codeIndented"),t(a)}}function Vi(e,t,n){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?n(l):R(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):U(e,o,"linePrefix",5)(l)}function o(l){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(l):R(l)?i(l):n(l)}}const Bi={name:"codeText",previous:Di,resolve:_i,tokenize:Hi};function _i(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Di(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Hi(e,t,n){let r=0,i,o;return l;function l(d){return e.enter("codeText"),e.enter("codeTextSequence"),s(d)}function s(d){return d===96?(e.consume(d),r++,s):(e.exit("codeTextSequence"),u(d))}function u(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),u):d===96?(o=e.enter("codeTextSequence"),i=0,c(d)):R(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),u):(e.enter("codeTextData"),a(d))}function a(d){return d===null||d===32||d===96||R(d)?(e.exit("codeTextData"),u(d)):(e.consume(d),a)}function c(d){return d===96?(e.consume(d),i++,c):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(o.type="codeTextData",a(d))}}class Wi{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&qe(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),qe(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),qe(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);qe(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);qe(this.left,n.reverse())}}}function qe(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Bn(e){const t={};let n=-1,r,i,o,l,s,u,a;const c=new Wi(e);for(;++n<c.length;){for(;n in t;)n=t[n];if(r=c.get(n),n&&r[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,o=0,o<u.length&&u[o][1].type==="lineEndingBlank"&&(o+=2),o<u.length&&u[o][1].type==="content"))for(;++o<u.length&&u[o][1].type!=="content";)u[o][1].type==="chunkText"&&(u[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Mi(c,n)),n=t[n],a=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(l=c.get(o),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),l[1].type="lineEnding",i=o);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;i&&(r[1].end={...c.get(i)[1].start},s=c.slice(i,n),s.unshift(r),c.splice(i,n-i+1,s))}}return ge(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!a}function Mi(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const s=l.events,u=[],a={};let c,d,x=-1,h=n,z=0,C=0;const P=[C];for(;h;){for(;e.get(++i)[1]!==h;);o.push(i),h._tokenizer||(c=r.sliceStream(h),h.next||c.push(null),d&&l.defineSkip(h.start),h._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(c),h._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),d=h,h=h.next}for(h=n;++x<s.length;)s[x][0]==="exit"&&s[x-1][0]==="enter"&&s[x][1].type===s[x-1][1].type&&s[x][1].start.line!==s[x][1].end.line&&(C=x+1,P.push(C),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(l.events=[],h?(h._tokenizer=void 0,h.previous=void 0):P.pop(),x=P.length;x--;){const b=s.slice(P[x],P[x+1]),I=o.pop();u.push([I,I+b.length-1]),e.splice(I,2,b)}for(u.reverse(),x=-1;++x<u.length;)a[z+u[x][0]]=z+u[x][1],z+=u[x][1]-u[x][0]-1;return a}const Oi={resolve:Ui,tokenize:qi},$i={partial:!0,tokenize:vi};function Ui(e){return Bn(e),e}function qi(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?o(s):R(s)?e.check($i,l,o)(s):(e.consume(s),i)}function o(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function l(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function vi(e,t,n){const r=this;return i;function i(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),U(e,o,"linePrefix")}function o(l){if(l===null||R(l))return n(l);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function _n(e,t,n,r,i,o,l,s,u){const a=u||Number.POSITIVE_INFINITY;let c=0;return d;function d(b){return b===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(b),e.exit(o),x):b===null||b===32||b===41||Ct(b)?n(b):(e.enter(r),e.enter(l),e.enter(s),e.enter("chunkString",{contentType:"string"}),C(b))}function x(b){return b===62?(e.enter(o),e.consume(b),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),h(b))}function h(b){return b===62?(e.exit("chunkString"),e.exit(s),x(b)):b===null||b===60||R(b)?n(b):(e.consume(b),b===92?z:h)}function z(b){return b===60||b===62||b===92?(e.consume(b),h):h(b)}function C(b){return!c&&(b===null||b===41||ee(b))?(e.exit("chunkString"),e.exit(s),e.exit(l),e.exit(r),t(b)):c<a&&b===40?(e.consume(b),c++,C):b===41?(e.consume(b),c--,C):b===null||b===32||b===40||Ct(b)?n(b):(e.consume(b),b===92?P:C)}function P(b){return b===40||b===41||b===92?(e.consume(b),C):C(b)}}function Dn(e,t,n,r,i,o){const l=this;let s=0,u;return a;function a(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(o),c}function c(h){return s>999||h===null||h===91||h===93&&!u||h===94&&!s&&"_hiddenFootnoteSupport"in l.parser.constructs?n(h):h===93?(e.exit(o),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):R(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===null||h===91||h===93||R(h)||s++>999?(e.exit("chunkString"),c(h)):(e.consume(h),u||(u=!W(h)),h===92?x:d)}function x(h){return h===91||h===92||h===93?(e.consume(h),s++,d):d(h)}}function Hn(e,t,n,r,i,o){let l;return s;function s(x){return x===34||x===39||x===40?(e.enter(r),e.enter(i),e.consume(x),e.exit(i),l=x===40?41:x,u):n(x)}function u(x){return x===l?(e.enter(i),e.consume(x),e.exit(i),e.exit(r),t):(e.enter(o),a(x))}function a(x){return x===l?(e.exit(o),u(l)):x===null?n(x):R(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),U(e,a,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(x))}function c(x){return x===l||x===null||R(x)?(e.exit("chunkString"),a(x)):(e.consume(x),x===92?d:c)}function d(x){return x===l||x===92?(e.consume(x),c):c(x)}}function Qe(e,t){let n;return r;function r(i){return R(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):W(i)?U(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Qi={name:"definition",tokenize:Yi},Ni={partial:!0,tokenize:Gi};function Yi(e,t,n){const r=this;let i;return o;function o(h){return e.enter("definition"),l(h)}function l(h){return Dn.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function s(h){return i=We(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),u):n(h)}function u(h){return ee(h)?Qe(e,a)(h):a(h)}function a(h){return _n(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function c(h){return e.attempt(Ni,d,d)(h)}function d(h){return W(h)?U(e,x,"whitespace")(h):x(h)}function x(h){return h===null||R(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function Gi(e,t,n){return r;function r(s){return ee(s)?Qe(e,i)(s):n(s)}function i(s){return Hn(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function o(s){return W(s)?U(e,l,"whitespace")(s):l(s)}function l(s){return s===null||R(s)?t(s):n(s)}}const Ji={name:"hardBreakEscape",tokenize:Zi};function Zi(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return R(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const Ki={name:"headingAtx",resolve:Xi,tokenize:eo};function Xi(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},ge(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function eo(e,t,n){let r=0;return i;function i(c){return e.enter("atxHeading"),o(c)}function o(c){return e.enter("atxHeadingSequence"),l(c)}function l(c){return c===35&&r++<6?(e.consume(c),l):c===null||ee(c)?(e.exit("atxHeadingSequence"),s(c)):n(c)}function s(c){return c===35?(e.enter("atxHeadingSequence"),u(c)):c===null||R(c)?(e.exit("atxHeading"),t(c)):W(c)?U(e,s,"whitespace")(c):(e.enter("atxHeadingText"),a(c))}function u(c){return c===35?(e.consume(c),u):(e.exit("atxHeadingSequence"),s(c))}function a(c){return c===null||c===35||ee(c)?(e.exit("atxHeadingText"),s(c)):(e.consume(c),a)}}const to=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],cn=["pre","script","style","textarea"],no={concrete:!0,name:"htmlFlow",resolveTo:oo,tokenize:lo},ro={partial:!0,tokenize:ao},io={partial:!0,tokenize:so};function oo(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function lo(e,t,n){const r=this;let i,o,l,s,u;return a;function a(m){return c(m)}function c(m){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(m),d}function d(m){return m===33?(e.consume(m),x):m===47?(e.consume(m),o=!0,C):m===63?(e.consume(m),i=3,r.interrupt?t:g):pe(m)?(e.consume(m),l=String.fromCharCode(m),P):n(m)}function x(m){return m===45?(e.consume(m),i=2,h):m===91?(e.consume(m),i=5,s=0,z):pe(m)?(e.consume(m),i=4,r.interrupt?t:g):n(m)}function h(m){return m===45?(e.consume(m),r.interrupt?t:g):n(m)}function z(m){const ae="CDATA[";return m===ae.charCodeAt(s++)?(e.consume(m),s===ae.length?r.interrupt?t:A:z):n(m)}function C(m){return pe(m)?(e.consume(m),l=String.fromCharCode(m),P):n(m)}function P(m){if(m===null||m===47||m===62||ee(m)){const ae=m===47,Fe=l.toLowerCase();return!ae&&!o&&cn.includes(Fe)?(i=1,r.interrupt?t(m):A(m)):to.includes(l.toLowerCase())?(i=6,ae?(e.consume(m),b):r.interrupt?t(m):A(m)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(m):o?I(m):w(m))}return m===45||ce(m)?(e.consume(m),l+=String.fromCharCode(m),P):n(m)}function b(m){return m===62?(e.consume(m),r.interrupt?t:A):n(m)}function I(m){return W(m)?(e.consume(m),I):_(m)}function w(m){return m===47?(e.consume(m),_):m===58||m===95||pe(m)?(e.consume(m),j):W(m)?(e.consume(m),w):_(m)}function j(m){return m===45||m===46||m===58||m===95||ce(m)?(e.consume(m),j):T(m)}function T(m){return m===61?(e.consume(m),y):W(m)?(e.consume(m),T):w(m)}function y(m){return m===null||m===60||m===61||m===62||m===96?n(m):m===34||m===39?(e.consume(m),u=m,E):W(m)?(e.consume(m),y):O(m)}function E(m){return m===u?(e.consume(m),u=null,V):m===null||R(m)?n(m):(e.consume(m),E)}function O(m){return m===null||m===34||m===39||m===47||m===60||m===61||m===62||m===96||ee(m)?T(m):(e.consume(m),O)}function V(m){return m===47||m===62||W(m)?w(m):n(m)}function _(m){return m===62?(e.consume(m),F):n(m)}function F(m){return m===null||R(m)?A(m):W(m)?(e.consume(m),F):n(m)}function A(m){return m===45&&i===2?(e.consume(m),N):m===60&&i===1?(e.consume(m),Q):m===62&&i===4?(e.consume(m),se):m===63&&i===3?(e.consume(m),g):m===93&&i===5?(e.consume(m),le):R(m)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(ro,me,B)(m)):m===null||R(m)?(e.exit("htmlFlowData"),B(m)):(e.consume(m),A)}function B(m){return e.check(io,M,me)(m)}function M(m){return e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),D}function D(m){return m===null||R(m)?B(m):(e.enter("htmlFlowData"),A(m))}function N(m){return m===45?(e.consume(m),g):A(m)}function Q(m){return m===47?(e.consume(m),l="",ne):A(m)}function ne(m){if(m===62){const ae=l.toLowerCase();return cn.includes(ae)?(e.consume(m),se):A(m)}return pe(m)&&l.length<8?(e.consume(m),l+=String.fromCharCode(m),ne):A(m)}function le(m){return m===93?(e.consume(m),g):A(m)}function g(m){return m===62?(e.consume(m),se):m===45&&i===2?(e.consume(m),g):A(m)}function se(m){return m===null||R(m)?(e.exit("htmlFlowData"),me(m)):(e.consume(m),se)}function me(m){return e.exit("htmlFlow"),t(m)}}function so(e,t,n){const r=this;return i;function i(l){return R(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):n(l)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function ao(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(it,t,n)}}const uo={name:"htmlText",tokenize:co};function co(e,t,n){const r=this;let i,o,l;return s;function s(g){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(g),u}function u(g){return g===33?(e.consume(g),a):g===47?(e.consume(g),T):g===63?(e.consume(g),w):pe(g)?(e.consume(g),O):n(g)}function a(g){return g===45?(e.consume(g),c):g===91?(e.consume(g),o=0,z):pe(g)?(e.consume(g),I):n(g)}function c(g){return g===45?(e.consume(g),h):n(g)}function d(g){return g===null?n(g):g===45?(e.consume(g),x):R(g)?(l=d,Q(g)):(e.consume(g),d)}function x(g){return g===45?(e.consume(g),h):d(g)}function h(g){return g===62?N(g):g===45?x(g):d(g)}function z(g){const se="CDATA[";return g===se.charCodeAt(o++)?(e.consume(g),o===se.length?C:z):n(g)}function C(g){return g===null?n(g):g===93?(e.consume(g),P):R(g)?(l=C,Q(g)):(e.consume(g),C)}function P(g){return g===93?(e.consume(g),b):C(g)}function b(g){return g===62?N(g):g===93?(e.consume(g),b):C(g)}function I(g){return g===null||g===62?N(g):R(g)?(l=I,Q(g)):(e.consume(g),I)}function w(g){return g===null?n(g):g===63?(e.consume(g),j):R(g)?(l=w,Q(g)):(e.consume(g),w)}function j(g){return g===62?N(g):w(g)}function T(g){return pe(g)?(e.consume(g),y):n(g)}function y(g){return g===45||ce(g)?(e.consume(g),y):E(g)}function E(g){return R(g)?(l=E,Q(g)):W(g)?(e.consume(g),E):N(g)}function O(g){return g===45||ce(g)?(e.consume(g),O):g===47||g===62||ee(g)?V(g):n(g)}function V(g){return g===47?(e.consume(g),N):g===58||g===95||pe(g)?(e.consume(g),_):R(g)?(l=V,Q(g)):W(g)?(e.consume(g),V):N(g)}function _(g){return g===45||g===46||g===58||g===95||ce(g)?(e.consume(g),_):F(g)}function F(g){return g===61?(e.consume(g),A):R(g)?(l=F,Q(g)):W(g)?(e.consume(g),F):V(g)}function A(g){return g===null||g===60||g===61||g===62||g===96?n(g):g===34||g===39?(e.consume(g),i=g,B):R(g)?(l=A,Q(g)):W(g)?(e.consume(g),A):(e.consume(g),M)}function B(g){return g===i?(e.consume(g),i=void 0,D):g===null?n(g):R(g)?(l=B,Q(g)):(e.consume(g),B)}function M(g){return g===null||g===34||g===39||g===60||g===61||g===96?n(g):g===47||g===62||ee(g)?V(g):(e.consume(g),M)}function D(g){return g===47||g===62||ee(g)?V(g):n(g)}function N(g){return g===62?(e.consume(g),e.exit("htmlTextData"),e.exit("htmlText"),t):n(g)}function Q(g){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),ne}function ne(g){return W(g)?U(e,le,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(g):le(g)}function le(g){return e.enter("htmlTextData"),l(g)}}const Dt={name:"labelEnd",resolveAll:go,resolveTo:mo,tokenize:xo},ho={tokenize:yo},fo={tokenize:bo},po={tokenize:ko};function go(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&ge(e,0,e.length,n),e}function mo(e,t){let n=e.length,r=0,i,o,l,s;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(l=n);const u={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},a={type:"label",start:{...e[o][1].start},end:{...e[l][1].end}},c={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[l-2][1].start}};return s=[["enter",u,t],["enter",a,t]],s=oe(s,e.slice(o+1,o+r+3)),s=oe(s,[["enter",c,t]]),s=oe(s,_t(t.parser.constructs.insideSpan.null,e.slice(o+r+4,l-3),t)),s=oe(s,[["exit",c,t],e[l-2],e[l-1],["exit",a,t]]),s=oe(s,e.slice(l+1)),s=oe(s,[["exit",u,t]]),ge(e,o,e.length,s),e}function xo(e,t,n){const r=this;let i=r.events.length,o,l;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return s;function s(x){return o?o._inactive?d(x):(l=r.parser.defined.includes(We(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(x),e.exit("labelMarker"),e.exit("labelEnd"),u):n(x)}function u(x){return x===40?e.attempt(ho,c,l?c:d)(x):x===91?e.attempt(fo,c,l?a:d)(x):l?c(x):d(x)}function a(x){return e.attempt(po,c,d)(x)}function c(x){return t(x)}function d(x){return o._balanced=!0,n(x)}}function yo(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return ee(d)?Qe(e,o)(d):o(d)}function o(d){return d===41?c(d):_n(e,l,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function l(d){return ee(d)?Qe(e,u)(d):c(d)}function s(d){return n(d)}function u(d){return d===34||d===39||d===40?Hn(e,a,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):c(d)}function a(d){return ee(d)?Qe(e,c)(d):c(d)}function c(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function bo(e,t,n){const r=this;return i;function i(s){return Dn.call(r,e,o,l,"reference","referenceMarker","referenceString")(s)}function o(s){return r.parser.defined.includes(We(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function l(s){return n(s)}}function ko(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const So={name:"labelStartImage",resolveAll:Dt.resolveAll,tokenize:wo};function wo(e,t,n){const r=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),o}function o(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),l):n(s)}function l(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const To={name:"labelStartLink",resolveAll:Dt.resolveAll,tokenize:Co};function Co(e,t,n){const r=this;return i;function i(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),o}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const mt={name:"lineEnding",tokenize:zo};function zo(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),U(e,t,"linePrefix")}}const et={name:"thematicBreak",tokenize:Io};function Io(e,t,n){let r=0,i;return o;function o(a){return e.enter("thematicBreak"),l(a)}function l(a){return i=a,s(a)}function s(a){return a===i?(e.enter("thematicBreakSequence"),u(a)):r>=3&&(a===null||R(a))?(e.exit("thematicBreak"),t(a)):n(a)}function u(a){return a===i?(e.consume(a),r++,u):(e.exit("thematicBreakSequence"),W(a)?U(e,s,"whitespace")(a):s(a))}}const X={continuation:{tokenize:Ao},exit:Ro,name:"list",tokenize:Fo},jo={partial:!0,tokenize:Lo},Eo={partial:!0,tokenize:Po};function Fo(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return s;function s(h){const z=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(z==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:zt(h)){if(r.containerState.type||(r.containerState.type=z,e.enter(z,{_container:!0})),z==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(et,n,a)(h):a(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(h)}return n(h)}function u(h){return zt(h)&&++l<10?(e.consume(h),u):(!r.interrupt||l<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),a(h)):n(h)}function a(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(it,r.interrupt?n:c,e.attempt(jo,x,d))}function c(h){return r.containerState.initialBlankLine=!0,o++,x(h)}function d(h){return W(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),x):n(h)}function x(h){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function Ao(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(it,i,o);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,U(e,t,"listItemIndent",r.containerState.size+1)(s)}function o(s){return r.containerState.furtherBlankLines||!W(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Eo,t,l)(s))}function l(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,U(e,e.attempt(X,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function Po(e,t,n){const r=this;return U(e,i,"listItemIndent",r.containerState.size+1);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(o):n(o)}}function Ro(e){e.exit(this.containerState.type)}function Lo(e,t,n){const r=this;return U(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const l=r.events[r.events.length-1];return!W(o)&&l&&l[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const dn={name:"setextUnderline",resolveTo:Vo,tokenize:Bo};function Vo(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",l,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function Bo(e,t,n){const r=this;let i;return o;function o(a){let c=r.events.length,d;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){d=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=a,l(a)):n(a)}function l(a){return e.enter("setextHeadingLineSequence"),s(a)}function s(a){return a===i?(e.consume(a),s):(e.exit("setextHeadingLineSequence"),W(a)?U(e,u,"lineSuffix")(a):u(a))}function u(a){return a===null||R(a)?(e.exit("setextHeadingLine"),t(a)):n(a)}}const _o={tokenize:Do};function Do(e){const t=this,n=e.attempt(it,r,e.attempt(this.parser.constructs.flowInitial,i,U(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Oi,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Ho={resolveAll:Mn()},Wo=Wn("string"),Mo=Wn("text");function Wn(e){return{resolveAll:Mn(e==="text"?Oo:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,l,s);return l;function l(c){return a(c)?o(c):s(c)}function s(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),u}function u(c){return a(c)?(n.exit("data"),o(c)):(n.consume(c),u)}function a(c){if(c===null)return!0;const d=i[c];let x=-1;if(d)for(;++x<d.length;){const h=d[x];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function Mn(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function Oo(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,l=-1,s=0,u;for(;o--;){const a=i[o];if(typeof a=="string"){for(l=a.length;a.charCodeAt(l-1)===32;)s++,l--;if(l)break;l=-1}else if(a===-2)u=!0,s++;else if(a!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){const a={type:n===e.length||u||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?l:r.start._bufferIndex+l,_index:r.start._index+o,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...a.start},r.start.offset===r.end.offset?Object.assign(r,a):(e.splice(n,0,["enter",a,t],["exit",a,t]),n+=2)}n++}return e}const $o={42:X,43:X,45:X,48:X,49:X,50:X,51:X,52:X,53:X,54:X,55:X,56:X,57:X,62:Rn},Uo={91:Qi},qo={[-2]:gt,[-1]:gt,32:gt},vo={35:Ki,42:et,45:[dn,et],60:no,61:dn,95:et,96:un,126:un},Qo={38:Vn,92:Ln},No={[-5]:mt,[-4]:mt,[-3]:mt,33:So,38:Vn,42:It,60:[wi,uo],91:To,92:[Ji,Ln],93:Dt,95:It,96:Bi},Yo={null:[It,Ho]},Go={null:[42,95]},Jo={null:[]},Zo=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Go,contentInitial:Uo,disable:Jo,document:$o,flow:vo,flowInitial:qo,insideSpan:Yo,string:Qo,text:No},Symbol.toStringTag,{value:"Module"}));function Ko(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let l=[],s=[];const u={attempt:E(T),check:E(y),consume:I,enter:w,exit:j,interrupt:E(y,{interrupt:!0})},a={code:null,containerState:{},defineSkip:C,events:[],now:z,parser:e,previous:null,sliceSerialize:x,sliceStream:h,write:d};let c=t.tokenize.call(a,u);return t.resolveAll&&o.push(t),a;function d(F){return l=oe(l,F),P(),l[l.length-1]!==null?[]:(O(t,0),a.events=_t(o,a.events,a),a.events)}function x(F,A){return el(h(F),A)}function h(F){return Xo(l,F)}function z(){const{_bufferIndex:F,_index:A,line:B,column:M,offset:D}=r;return{_bufferIndex:F,_index:A,line:B,column:M,offset:D}}function C(F){i[F.line]=F.column,_()}function P(){let F;for(;r._index<l.length;){const A=l[r._index];if(typeof A=="string")for(F=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===F&&r._bufferIndex<A.length;)b(A.charCodeAt(r._bufferIndex));else b(A)}}function b(F){c=c(F)}function I(F){R(F)?(r.line++,r.column=1,r.offset+=F===-3?2:1,_()):F!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),a.previous=F}function w(F,A){const B=A||{};return B.type=F,B.start=z(),a.events.push(["enter",B,a]),s.push(B),B}function j(F){const A=s.pop();return A.end=z(),a.events.push(["exit",A,a]),A}function T(F,A){O(F,A.from)}function y(F,A){A.restore()}function E(F,A){return B;function B(M,D,N){let Q,ne,le,g;return Array.isArray(M)?me(M):"tokenize"in M?me([M]):se(M);function se(Y){return Me;function Me(Se){const Le=Se!==null&&Y[Se],Ve=Se!==null&&Y.null,Je=[...Array.isArray(Le)?Le:Le?[Le]:[],...Array.isArray(Ve)?Ve:Ve?[Ve]:[]];return me(Je)(Se)}}function me(Y){return Q=Y,ne=0,Y.length===0?N:m(Y[ne])}function m(Y){return Me;function Me(Se){return g=V(),le=Y,Y.partial||(a.currentConstruct=Y),Y.name&&a.parser.constructs.disable.null.includes(Y.name)?Fe():Y.tokenize.call(A?Object.assign(Object.create(a),A):a,u,ae,Fe)(Se)}}function ae(Y){return F(le,g),D}function Fe(Y){return g.restore(),++ne<Q.length?m(Q[ne]):N}}}function O(F,A){F.resolveAll&&!o.includes(F)&&o.push(F),F.resolve&&ge(a.events,A,a.events.length-A,F.resolve(a.events.slice(A),a)),F.resolveTo&&(a.events=F.resolveTo(a.events,a))}function V(){const F=z(),A=a.previous,B=a.currentConstruct,M=a.events.length,D=Array.from(s);return{from:M,restore:N};function N(){r=F,a.previous=A,a.currentConstruct=B,a.events.length=M,s=D,_()}}function _(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Xo(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let l;if(n===i)l=[e[n].slice(r,o)];else{if(l=e.slice(n,i),r>-1){const s=l[0];typeof s=="string"?l[0]=s.slice(r):l.shift()}o>0&&l.push(e[i].slice(0,o))}return l}function el(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let l;if(typeof o=="string")l=o;else switch(o){case-5:{l="\r";break}case-4:{l=`
|
|
4
|
+
`;break}case-3:{l=`\r
|
|
5
|
+
`;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&i)continue;l=" ";break}default:l=String.fromCharCode(o)}i=o===-2,r.push(l)}return r.join("")}function tl(e){const r={constructs:si([Zo,...(e||{}).extensions||[]]),content:i(gi),defined:[],document:i(xi),flow:i(_o),lazy:{},string:i(Wo),text:i(Mo)};return r;function i(o){return l;function l(s){return Ko(r,o,s)}}}function nl(e){for(;!Bn(e););return e}const hn=/[\0\t\n\r]/g;function rl(){let e=1,t="",n=!0,r;return i;function i(o,l,s){const u=[];let a,c,d,x,h;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(l||void 0).decode(o)),d=0,t="",n&&(o.charCodeAt(0)===65279&&d++,n=void 0);d<o.length;){if(hn.lastIndex=d,a=hn.exec(o),x=a&&a.index!==void 0?a.index:o.length,h=o.charCodeAt(x),!a){t=o.slice(d);break}if(h===10&&d===x&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),d<x&&(u.push(o.slice(d,x)),e+=x-d),h){case 0:{u.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,u.push(-2);e++<c;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}d=x+1}return s&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}const il=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function ol(e){return e.replace(il,ll)}function ll(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return Pn(n.slice(o?2:1),o?16:10)}return Bt(n)||e}const On={}.hasOwnProperty;function sl(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),al(n)(nl(tl(n).document().write(rl()(e,t,!0))))}function al(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Ot),autolinkProtocol:V,autolinkEmail:V,atxHeading:o(Ht),blockQuote:o(Ve),characterEscape:V,characterReference:V,codeFenced:o(Je),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(Je,l),codeText:o(qn,l),codeTextData:V,data:V,codeFlowValue:V,definition:o(vn),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(Qn),hardBreakEscape:o(Wt),hardBreakTrailing:o(Wt),htmlFlow:o(Mt,l),htmlFlowData:V,htmlText:o(Mt,l),htmlTextData:V,image:o(Nn),label:l,link:o(Ot),listItem:o(Yn),listItemValue:x,listOrdered:o($t,d),listUnordered:o($t),paragraph:o(Gn),reference:m,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o(Ht),strong:o(Jn),thematicBreak:o(Kn)},exit:{atxHeading:u(),atxHeadingSequence:T,autolink:u(),autolinkEmail:Le,autolinkProtocol:Se,blockQuote:u(),characterEscapeValue:_,characterReferenceMarkerHexadecimal:Fe,characterReferenceMarkerNumeric:Fe,characterReferenceValue:Y,characterReference:Me,codeFenced:u(P),codeFencedFence:C,codeFencedFenceInfo:h,codeFencedFenceMeta:z,codeFlowValue:_,codeIndented:u(b),codeText:u(D),codeTextData:_,data:_,definition:u(),definitionDestinationString:j,definitionLabelString:I,definitionTitleString:w,emphasis:u(),hardBreakEscape:u(A),hardBreakTrailing:u(A),htmlFlow:u(B),htmlFlowData:_,htmlText:u(M),htmlTextData:_,image:u(Q),label:le,labelText:ne,lineEnding:F,link:u(N),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:ae,resourceDestinationString:g,resourceTitleString:se,resource:me,setextHeading:u(O),setextHeadingLineSequence:E,setextHeadingText:y,strong:u(),thematicBreak:u()}};$n(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(k){let S={type:"root",children:[]};const L={stack:[S],tokenStack:[],config:t,enter:s,exit:a,buffer:l,resume:c,data:n},H=[];let $=-1;for(;++$<k.length;)if(k[$][1].type==="listOrdered"||k[$][1].type==="listUnordered")if(k[$][0]==="enter")H.push($);else{const ue=H.pop();$=i(k,ue,$)}for($=-1;++$<k.length;){const ue=t[k[$][0]];On.call(ue,k[$][1].type)&&ue[k[$][1].type].call(Object.assign({sliceSerialize:k[$][2].sliceSerialize},L),k[$][1])}if(L.tokenStack.length>0){const ue=L.tokenStack[L.tokenStack.length-1];(ue[1]||fn).call(L,void 0,ue[0])}for(S.position={start:ze(k.length>0?k[0][1].start:{line:1,column:1,offset:0}),end:ze(k.length>0?k[k.length-2][1].end:{line:1,column:1,offset:0})},$=-1;++$<t.transforms.length;)S=t.transforms[$](S)||S;return S}function i(k,S,L){let H=S-1,$=-1,ue=!1,Ae,xe,Oe,$e;for(;++H<=L;){const re=k[H];switch(re[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{re[0]==="enter"?$++:$--,$e=void 0;break}case"lineEndingBlank":{re[0]==="enter"&&(Ae&&!$e&&!$&&!Oe&&(Oe=H),$e=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:$e=void 0}if(!$&&re[0]==="enter"&&re[1].type==="listItemPrefix"||$===-1&&re[0]==="exit"&&(re[1].type==="listUnordered"||re[1].type==="listOrdered")){if(Ae){let Be=H;for(xe=void 0;Be--;){const ye=k[Be];if(ye[1].type==="lineEnding"||ye[1].type==="lineEndingBlank"){if(ye[0]==="exit")continue;xe&&(k[xe][1].type="lineEndingBlank",ue=!0),ye[1].type="lineEnding",xe=Be}else if(!(ye[1].type==="linePrefix"||ye[1].type==="blockQuotePrefix"||ye[1].type==="blockQuotePrefixWhitespace"||ye[1].type==="blockQuoteMarker"||ye[1].type==="listItemIndent"))break}Oe&&(!xe||Oe<xe)&&(Ae._spread=!0),Ae.end=Object.assign({},xe?k[xe][1].start:re[1].end),k.splice(xe||H,0,["exit",Ae,re[2]]),H++,L++}if(re[1].type==="listItemPrefix"){const Be={type:"listItem",_spread:!1,start:Object.assign({},re[1].start),end:void 0};Ae=Be,k.splice(H,0,["enter",Be,re[2]]),H++,L++,Oe=void 0,$e=!0}}}return k[S][1]._spread=ue,L}function o(k,S){return L;function L(H){s.call(this,k(H),H),S&&S.call(this,H)}}function l(){this.stack.push({type:"fragment",children:[]})}function s(k,S,L){this.stack[this.stack.length-1].children.push(k),this.stack.push(k),this.tokenStack.push([S,L||void 0]),k.position={start:ze(S.start),end:void 0}}function u(k){return S;function S(L){k&&k.call(this,L),a.call(this,L)}}function a(k,S){const L=this.stack.pop(),H=this.tokenStack.pop();if(H)H[0].type!==k.type&&(S?S.call(this,k,H[0]):(H[1]||fn).call(this,k,H[0]));else throw new Error("Cannot close `"+k.type+"` ("+ve({start:k.start,end:k.end})+"): it’s not open");L.position.end=ze(k.end)}function c(){return oi(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function x(k){if(this.data.expectingFirstListItemValue){const S=this.stack[this.stack.length-2];S.start=Number.parseInt(this.sliceSerialize(k),10),this.data.expectingFirstListItemValue=void 0}}function h(){const k=this.resume(),S=this.stack[this.stack.length-1];S.lang=k}function z(){const k=this.resume(),S=this.stack[this.stack.length-1];S.meta=k}function C(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function P(){const k=this.resume(),S=this.stack[this.stack.length-1];S.value=k.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function b(){const k=this.resume(),S=this.stack[this.stack.length-1];S.value=k.replace(/(\r?\n|\r)$/g,"")}function I(k){const S=this.resume(),L=this.stack[this.stack.length-1];L.label=S,L.identifier=We(this.sliceSerialize(k)).toLowerCase()}function w(){const k=this.resume(),S=this.stack[this.stack.length-1];S.title=k}function j(){const k=this.resume(),S=this.stack[this.stack.length-1];S.url=k}function T(k){const S=this.stack[this.stack.length-1];if(!S.depth){const L=this.sliceSerialize(k).length;S.depth=L}}function y(){this.data.setextHeadingSlurpLineEnding=!0}function E(k){const S=this.stack[this.stack.length-1];S.depth=this.sliceSerialize(k).codePointAt(0)===61?1:2}function O(){this.data.setextHeadingSlurpLineEnding=void 0}function V(k){const L=this.stack[this.stack.length-1].children;let H=L[L.length-1];(!H||H.type!=="text")&&(H=Zn(),H.position={start:ze(k.start),end:void 0},L.push(H)),this.stack.push(H)}function _(k){const S=this.stack.pop();S.value+=this.sliceSerialize(k),S.position.end=ze(k.end)}function F(k){const S=this.stack[this.stack.length-1];if(this.data.atHardBreak){const L=S.children[S.children.length-1];L.position.end=ze(k.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(S.type)&&(V.call(this,k),_.call(this,k))}function A(){this.data.atHardBreak=!0}function B(){const k=this.resume(),S=this.stack[this.stack.length-1];S.value=k}function M(){const k=this.resume(),S=this.stack[this.stack.length-1];S.value=k}function D(){const k=this.resume(),S=this.stack[this.stack.length-1];S.value=k}function N(){const k=this.stack[this.stack.length-1];if(this.data.inReference){const S=this.data.referenceType||"shortcut";k.type+="Reference",k.referenceType=S,delete k.url,delete k.title}else delete k.identifier,delete k.label;this.data.referenceType=void 0}function Q(){const k=this.stack[this.stack.length-1];if(this.data.inReference){const S=this.data.referenceType||"shortcut";k.type+="Reference",k.referenceType=S,delete k.url,delete k.title}else delete k.identifier,delete k.label;this.data.referenceType=void 0}function ne(k){const S=this.sliceSerialize(k),L=this.stack[this.stack.length-2];L.label=ol(S),L.identifier=We(S).toLowerCase()}function le(){const k=this.stack[this.stack.length-1],S=this.resume(),L=this.stack[this.stack.length-1];if(this.data.inReference=!0,L.type==="link"){const H=k.children;L.children=H}else L.alt=S}function g(){const k=this.resume(),S=this.stack[this.stack.length-1];S.url=k}function se(){const k=this.resume(),S=this.stack[this.stack.length-1];S.title=k}function me(){this.data.inReference=void 0}function m(){this.data.referenceType="collapsed"}function ae(k){const S=this.resume(),L=this.stack[this.stack.length-1];L.label=S,L.identifier=We(this.sliceSerialize(k)).toLowerCase(),this.data.referenceType="full"}function Fe(k){this.data.characterReferenceType=k.type}function Y(k){const S=this.sliceSerialize(k),L=this.data.characterReferenceType;let H;L?(H=Pn(S,L==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):H=Bt(S);const $=this.stack[this.stack.length-1];$.value+=H}function Me(k){const S=this.stack.pop();S.position.end=ze(k.end)}function Se(k){_.call(this,k);const S=this.stack[this.stack.length-1];S.url=this.sliceSerialize(k)}function Le(k){_.call(this,k);const S=this.stack[this.stack.length-1];S.url="mailto:"+this.sliceSerialize(k)}function Ve(){return{type:"blockquote",children:[]}}function Je(){return{type:"code",lang:null,meta:null,value:""}}function qn(){return{type:"inlineCode",value:""}}function vn(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Qn(){return{type:"emphasis",children:[]}}function Ht(){return{type:"heading",depth:0,children:[]}}function Wt(){return{type:"break"}}function Mt(){return{type:"html",value:""}}function Nn(){return{type:"image",title:null,url:"",alt:null}}function Ot(){return{type:"link",title:null,url:"",children:[]}}function $t(k){return{type:"list",ordered:k.type==="listOrdered",start:null,spread:k._spread,children:[]}}function Yn(k){return{type:"listItem",spread:k._spread,checked:null,children:[]}}function Gn(){return{type:"paragraph",children:[]}}function Jn(){return{type:"strong",children:[]}}function Zn(){return{type:"text",value:""}}function Kn(){return{type:"thematicBreak"}}}function ze(e){return{line:e.line,column:e.column,offset:e.offset}}function $n(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?$n(e,r):ul(e,r)}}function ul(e,t){let n;for(n in t)if(On.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function fn(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ve({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ve({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ve({start:t.start,end:t.end})+") is still open")}function cl(e){const t=this;t.parser=n;function n(r){return sl(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function dl(e){if(!e||e.trim().length===0)return[];const t=ei().use(cl).parse(e),n=[];for(const r of t.children){if(r.type!=="heading")continue;const i=r.depth;if(i<2||i>4)continue;const o=Un(r);o&&n.push({id:hl(o),label:o,depth:i})}return n}function Un(e){return e.children?e.children.map(t=>t.type==="text"||t.type==="inlineCode"?t.value??"":t.children?Un(t):"").join(""):""}function hl(e){return e.toLowerCase().replace(/[^\w\s-]/g,"").replace(/\s+/g,"-").replace(/^-+|-+$/g,"")}const fl=[{prefix:"/blog",contentType:"blog"},{prefix:"/docs",contentType:"docs"},{prefix:"/learn",contentType:"learn"},{prefix:"/projects",contentType:"project"},{prefix:"/airdrop",contentType:"airdrop"},{prefix:"/privacy",contentType:"legal"},{prefix:"/terms",contentType:"legal"},{prefix:"/contact",contentType:"contact"}];function pl(e){if(!e)return{contentType:"home"};const{path:t,query:n,anchor:r}=ml(e),i=je(t);if(i==="/")return{contentType:"home",anchor:r||void 0};for(const{prefix:l,contentType:s}of fl)if(i===l||i.startsWith(`${l}/`)){const u=i.length>l.length?i.slice(l.length+1):void 0;return{contentType:s,slug:u||void 0,filters:pn(n),anchor:r||void 0}}return{contentType:"page",slug:i.slice(1)||void 0,filters:pn(n),anchor:r||void 0}}function gl(e,t,n,r){let i;switch(e){case"home":i="/";break;case"contact":i="/contact";break;case"legal":i=t?`/${t}`:"/privacy";break;case"not-found":i="/404";break;case"blog":i=t?`/blog/${t}`:"/blog";break;case"docs":i=t?`/docs/${t}`:"/docs";break;case"learn":i=t?`/learn/${t}`:"/learn";break;case"project":i=t?`/projects/${t}`:"/projects";break;case"airdrop":i=t?`/airdrop/${t}`:"/airdrop";break;case"page":i=t?`/${t}`:"/";break;default:i=t?`/${t}`:"/"}const o=xl(n),l=r?`#${r}`:"";return`${i}${o}${l}`}function ml(e){let t=e;const n=t.indexOf("://");if(n!==-1){const s=t.slice(n+3),u=t.slice(0,n).toLowerCase();if(u==="http"||u==="https"){const a=s.indexOf("/");t=a!==-1?s.slice(a):"/"}else t=s.startsWith("/")?s:`/${s}`}let r="";const i=t.indexOf("#");i!==-1&&(r=t.slice(i+1),t=t.slice(0,i));let o="";const l=t.indexOf("?");return l!==-1&&(o=t.slice(l+1),t=t.slice(0,l)),{path:t||"/",query:o,anchor:r}}function pn(e){if(!e)return;const t=new URLSearchParams(e),n=t.get("q")??t.get("query")??void 0,r=t.get("category")??t.get("cat")??void 0,i=t.get("tag")??void 0,o=t.get("sort")??void 0,l=t.get("page"),s=l?parseInt(l,10):void 0;if(n||r||i||o||s)return{query:n,category:r,tag:i,sort:o,page:s&&Number.isFinite(s)?Math.max(1,s):void 0}}function xl(e){if(!e)return"";const t=[];return e.query&&t.push(`q=${encodeURIComponent(e.query)}`),e.category&&t.push(`category=${encodeURIComponent(e.category)}`),e.tag&&t.push(`tag=${encodeURIComponent(e.tag)}`),e.sort&&t.push(`sort=${encodeURIComponent(e.sort)}`),e.page&&e.page>1&&t.push(`page=${e.page}`),t.length>0?`?${t.join("&")}`:""}function yl(e){if(!e.serverUrl)throw new Error("@cedros/data-react-native: no serverUrl provided in FetchOptions");return e.serverUrl.replace(/\/+$/,"")}async function bl(e,t,n){const r={"Content-Type":"application/json"};n!=null&&n.apiKey&&(r["x-api-key"]=n.apiKey);const i=await fetch(`${e}${t}`,{method:(n==null?void 0:n.method)??"GET",headers:r,body:(n==null?void 0:n.body)!==void 0?JSON.stringify(n.body):void 0});if(!i.ok){const o=await i.text();throw new Error(`@cedros/data-react-native: ${(n==null?void 0:n.method)??"GET"} ${t} failed (${i.status}): ${o}`)}return await i.json()}let Ie=null;function gn(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}async function kl(){if(Ie)return Ie;try{const e=(await import("@react-native-async-storage/async-storage")).default,t=await e.getItem("cedros_vid");if(t)return Ie=t,t;const n=gn();return await e.setItem("cedros_vid",n),Ie=n,n}catch{return Ie||(Ie=gn()),Ie}}function Sl(){return Ie}exports.BlogIndexTemplate=Tr;exports.BlogPostTemplate=zr;exports.BlogSearchInput=Sn;exports.BookmarkButton=At;exports.Breadcrumbs=Et;exports.CedrosDataProvider=or;exports.CmsContent=gr;exports.CodeBlock=hr;exports.ContactPageTemplate=Lr;exports.ContentPagination=Ft;exports.ContentPaywall=zn;exports.DocArticleTemplate=Ar;exports.DocsIndexTemplate=Fr;exports.DocsSidebar=Pt;exports.FilterDimensionChips=wn;exports.HomePageTemplate=Pr;exports.LegalPageTemplate=Rr;exports.MarkdownContent=Ye;exports.NotFoundTemplate=Vr;exports.SOL_CURRENCY=bt;exports.SiteFooter=kn;exports.SiteLayout=ke;exports.TipWidget=Cn;exports.TocScrollSpy=dr;exports.TopNav=bn;exports.USDC_CURRENCY=fr;exports.buildContentListHref=mr;exports.buildDeepLink=gl;exports.buildDocsSidebarSections=Rt;exports.collectDimensionValues=yr;exports.collectFilterValues=xr;exports.defaultDarkTokens=xn;exports.defaultLightTokens=mn;exports.extractTocFromMarkdown=dl;exports.fetchJson=bl;exports.getOrCreateVisitorId=kl;exports.getVisitorIdSync=Sl;exports.isRouteActive=Ne;exports.matchesFilterDimensions=En;exports.normalizeRoutePath=je;exports.parseDeepLink=pl;exports.prepareBlogIndex=In;exports.prepareDocsIndex=jn;exports.resolveServerUrl=yl;exports.useCedrosDataTheme=q;exports.useCedrosDataThemeOptional=lr;exports.withActiveDocsSidebar=Lt;exports.withActiveRouteState=yn;
|