adminizer 5.1.0-build.28 → 5.2.0-build.30
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/assets/{abnfDiagram-VCTEODGH-uWOVpoSR.js → abnfDiagram-VCTEODGH-BhZn7BLv.js} +1 -1
- package/assets/{add-A_fIlNKI.js → add-DDfJt70P.js} +1 -1
- package/assets/{add-group-C2x6K3tV.js → add-group-Cs3S9VVn.js} +1 -1
- package/assets/{add-user-u61kYlEm.js → add-user-DxI_sJLw.js} +1 -1
- package/assets/ai-assistant/agent.es.js +14736 -11737
- package/assets/app-DM8KzeFz.css +1 -0
- package/assets/app-DOMFUTFw.js +138 -0
- package/assets/{arc--ZX64bmY.js → arc-BRY7wCfa.js} +1 -1
- package/assets/{architectureDiagram-5GKGNRK7-W9AzLZvl.js → architectureDiagram-5GKGNRK7-DfBT7jAW.js} +1 -1
- package/assets/{blockDiagram-I7D4REHJ-BpK_yEa7.js → blockDiagram-I7D4REHJ-CW2mcR7Z.js} +1 -1
- package/assets/{c4Diagram-7LVT6UL2-DiQzU1s0.js → c4Diagram-7LVT6UL2-BGsyO-4Y.js} +1 -1
- package/assets/{catalog-dSCv3Szm.js → catalog-cyCZOCXs.js} +3 -3
- package/assets/channel-Bd-bsjgh.js +1 -0
- package/assets/{chunk-2Q5K7J3B-GPHETbCq.js → chunk-2Q5K7J3B-4EnjsYhG.js} +1 -1
- package/assets/{chunk-5VM5RSS4-bLovkogd.js → chunk-5VM5RSS4-BVzmz0IS.js} +1 -1
- package/assets/{chunk-F27PBJKO-DbkTY41z.js → chunk-F27PBJKO-Bkf9Z4lt.js} +1 -1
- package/assets/{chunk-IMKFNOWR-CL0VAxX7.js → chunk-IMKFNOWR-Dg6Y3xGC.js} +1 -1
- package/assets/{chunk-JWPE2WC7-d1Grk14b.js → chunk-JWPE2WC7-BdVNpqE2.js} +1 -1
- package/assets/{chunk-POPQ4Y6H-CAUhiiNt.js → chunk-POPQ4Y6H-0R-etdBM.js} +1 -1
- package/assets/{chunk-SVP7TREG-C8ADZUEr.js → chunk-SVP7TREG-CdABJwLU.js} +1 -1
- package/assets/{chunk-TICWLB2K-oRqFZabo.js → chunk-TICWLB2K-Da-oSw37.js} +1 -1
- package/assets/{chunk-XXDRQBXY-C3zo4c2P.js → chunk-XXDRQBXY-Ba8BsH2Z.js} +1 -1
- package/assets/classDiagram-ZZMXUADV-BftNBmvr.js +1 -0
- package/assets/classDiagram-v2-VYDZK3BY-BftNBmvr.js +1 -0
- package/assets/controls/ckeditor.es.js +10659 -10551
- package/assets/controls/handsontable.es.js +9053 -8479
- package/assets/controls/jsoneditor.es.js +641 -614
- package/assets/controls/leaflet.es.js +672 -663
- package/assets/controls/toast-ui.es.js +13696 -13676
- package/assets/{cose-bilkent-JH36ORCC-ZPvVaI6n.js → cose-bilkent-JH36ORCC-BYrWDdVx.js} +1 -1
- package/assets/{cynefin-OW5HDTMX-EEL4eqU7.js → cynefin-OW5HDTMX-CwHzXvDB.js} +1 -1
- package/assets/{cynefinDiagram-5FMLGOSQ-DpDFbbrn.js → cynefinDiagram-5FMLGOSQ-V6tH6arn.js} +1 -1
- package/assets/{dagre-GXQ25YYZ-Dtjy1xN1.js → dagre-GXQ25YYZ-CaBvafdG.js} +1 -1
- package/assets/{dashboard-DXs-vdJG.js → dashboard-C27hB1GI.js} +1 -1
- package/assets/{diagram-S7CK7UJ4-BhWisCOy.js → diagram-S7CK7UJ4-85jkE9hd.js} +1 -1
- package/assets/{diagram-UQ7AKVKN-BBH2Mm33.js → diagram-UQ7AKVKN-DHJRq1TM.js} +1 -1
- package/assets/{diagram-VSXAHHWV-B1Xc2cPz.js → diagram-VSXAHHWV-C74VLfSc.js} +1 -1
- package/assets/{diagram-VX7I27RA-CTTYzy1s.js → diagram-VX7I27RA-CVJcG5hn.js} +1 -1
- package/assets/{diagram-Z3DM3KII-DdH0yWH0.js → diagram-Z3DM3KII-B8ybg5RA.js} +1 -1
- package/assets/{docs-BZYlfOON.js → docs-CK6W0Jko.js} +1 -1
- package/assets/{ebnfDiagram-PWID7BFC-R9cSqf0y.js → ebnfDiagram-PWID7BFC-D_gz_iz6.js} +1 -1
- package/assets/{erDiagram-RLTQ6QDP-Bpu-Pm95.js → erDiagram-RLTQ6QDP-D3W95aGH.js} +1 -1
- package/assets/{flowDiagram-HODETNUW-NdXf-fRN.js → flowDiagram-HODETNUW-D2PTWIEg.js} +1 -1
- package/assets/{ganttDiagram-EL5Y4UJY-itQHv_dH.js → ganttDiagram-EL5Y4UJY-TFBUh0C6.js} +1 -1
- package/assets/{gitGraphDiagram-WWUBYQGX-DorHK4Wx.js → gitGraphDiagram-WWUBYQGX-BfFJzeqx.js} +1 -1
- package/assets/{history-DB48MCa8.js → history-DX6CEQqv.js} +1 -1
- package/assets/{infoDiagram-27XIBGKW-FgFATKk4.js → infoDiagram-27XIBGKW-esGmrWiw.js} +1 -1
- package/assets/{init-user-DAXb55S_.js → init-user-D1G_dbcZ.js} +1 -1
- package/assets/{ishikawaDiagram-5VMMS53U-Bjl1a496.js → ishikawaDiagram-5VMMS53U--aGHPnva.js} +1 -1
- package/assets/{journeyDiagram-3NMN7TZE-DU1TmnbI.js → journeyDiagram-3NMN7TZE-03BXeE8O.js} +1 -1
- package/assets/{kanban-definition-UXKFOSKX-BsrlKdcU.js → kanban-definition-UXKFOSKX-JdDv2WHg.js} +1 -1
- package/assets/{layout-C68duuC7.js → layout-Bz6WKClu.js} +1 -1
- package/assets/{linear-DdadsTLS.js → linear-Chzx_9mb.js} +1 -1
- package/assets/{list-D3R3q3Ti.js → list-BuSdZ2Ic.js} +1 -1
- package/assets/{login-DwxC2WD6.js → login-DFWfnrmE.js} +1 -1
- package/assets/manifest.json +277 -277
- package/assets/media-manager-CT4LZgo_.js +7 -0
- package/assets/mermaid.core-Dp-0i8FJ.js +310 -0
- package/assets/{mindmap-definition-YA3MSWOX-BfdP8hOy.js → mindmap-definition-YA3MSWOX-BJSEYobY.js} +1 -1
- package/assets/{module-DKdDlng0.js → module-Cgn-q5gZ.js} +1 -1
- package/assets/{notification-DDWbaooT.js → notification-BrfoqVVT.js} +1 -1
- package/assets/{pegDiagram-XKGWAZYB-BO9cFGCI.js → pegDiagram-XKGWAZYB-ccVsKwl1.js} +1 -1
- package/assets/{pieDiagram-E7YTZNPT-B4KrTpto.js → pieDiagram-E7YTZNPT-B1XZVgNq.js} +1 -1
- package/assets/{quadrantDiagram-AXDQQJYC-BumScZvv.js → quadrantDiagram-AXDQQJYC-CdABEYmF.js} +1 -1
- package/assets/{railroadDiagram-O6MQD6OU-DUDQQC-p.js → railroadDiagram-O6MQD6OU-OX83MXuO.js} +1 -1
- package/assets/{register-5rs1OSaq.js → register-Cxf3Pow-.js} +1 -1
- package/assets/{requirementDiagram-BXWQKSXE-BtNsxNt1.js → requirementDiagram-BXWQKSXE-CD7swf9u.js} +1 -1
- package/assets/{ru-Cf1WWSt0.js → ru-DxiFV21N.js} +1 -1
- package/assets/{sankeyDiagram-P5KCCOFB-xjPcSTcN.js → sankeyDiagram-P5KCCOFB-Cgwq2DVJ.js} +1 -1
- package/assets/{sequenceDiagram-WJ2MYXX4-BVOgA3-B.js → sequenceDiagram-WJ2MYXX4-BgjP07Zh.js} +1 -1
- package/assets/{sizeCapture-INFHLROL-BDI5FsKO.js → sizeCapture-INFHLROL-B-jQ1aKT.js} +1 -1
- package/assets/{stateDiagram-D77RDMKH-DreIJby8.js → stateDiagram-D77RDMKH-Drot14NK.js} +1 -1
- package/assets/stateDiagram-v2-MP3YSRHH-C5VLF0H1.js +1 -0
- package/assets/{swimlanes-42K2YHIH-J_CNnPZv.js → swimlanes-42K2YHIH-lCqHhK1l.js} +1 -1
- package/assets/swimlanesDiagram-VR7AAH4N-4yyX1ZbA.js +8 -0
- package/assets/{timeline-definition-24CTP7MA-BXGN0YmT.js → timeline-definition-24CTP7MA-B-QLcvwc.js} +1 -1
- package/assets/{use-appearance-B2YFalXG.js → use-appearance-B0ck1CR_.js} +1 -1
- package/assets/{user-filters-list-D8WohjvX.js → user-filters-list-ce2cmS5Z.js} +1 -1
- package/assets/{vennDiagram-4TSXK5OY-Mu0lMKUo.js → vennDiagram-4TSXK5OY-2DN2uspP.js} +1 -1
- package/assets/{wardleyDiagram-VM6X3IG4-CXFMI74r.js → wardleyDiagram-VM6X3IG4-C_GODc0p.js} +1 -1
- package/assets/{welcome-DHQx7R11.js → welcome-DaAj6jOI.js} +1 -1
- package/assets/with-app-layout-CwAECGwY.js +34 -0
- package/assets/{xychartDiagram-S5SC5T6Z-DCr7j1YG.js → xychartDiagram-S5SC5T6Z-Cq8htGoW.js} +1 -1
- package/controllers/catalog/FrontendCatalogAdapter.d.ts +5 -5
- package/controllers/catalog/FrontentCatalogAdapter.d.ts +5 -5
- package/controllers/initUser.js +1 -1
- package/helpers/inertiaAddHelper.js +10 -1
- package/helpers/inertiaMenuHelper.d.ts +3 -2
- package/helpers/inertiaMenuHelper.js +9 -4
- package/helpers/navigationAccessHelper.d.ts +5 -0
- package/helpers/navigationAccessHelper.js +13 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/interfaces/adminpanelConfig.d.ts +7 -0
- package/lib/Adminizer.d.ts +2 -0
- package/lib/Adminizer.js +3 -0
- package/lib/admin-links/AdminLinkHandler.js +5 -1
- package/lib/app-manager/AdminizerApp.d.ts +34 -0
- package/lib/app-manager/AppManager.js +35 -0
- package/lib/app-manager/ContextHandler.d.ts +240 -0
- package/lib/app-manager/ContextHandler.js +446 -0
- package/lib/app-manager/ControllerHandler.d.ts +2 -0
- package/lib/app-manager/ControllerHandler.js +7 -0
- package/lib/media-manager/helpers/MediaManagerHelper.d.ts +1 -1
- package/lib/notifications/AbstractNotificationService.d.ts +3 -3
- package/package.json +3 -2
- package/system/bindDocs.js +1 -1
- package/system/bindInertia.js +34 -9
- package/assets/app-CRa5Kokq.js +0 -138
- package/assets/app-TCCHARSx.css +0 -1
- package/assets/channel-DRO88SVn.js +0 -1
- package/assets/classDiagram-ZZMXUADV-Cb-leHEm.js +0 -1
- package/assets/classDiagram-v2-VYDZK3BY-Cb-leHEm.js +0 -1
- package/assets/media-manager-mt4Ykki7.js +0 -6
- package/assets/mermaid.core-DxLHD4PF.js +0 -310
- package/assets/stateDiagram-v2-MP3YSRHH-BNzSJJYe.js +0 -1
- package/assets/swimlanesDiagram-VR7AAH4N-DN5N1rG7.js +0 -8
- package/assets/with-app-layout-Cvg36gxr.js +0 -31
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./mermaid.core-Dp-0i8FJ.js","./app-DOMFUTFw.js","./app-DM8KzeFz.css","./isObject-DL-BuaBl.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as v,u as re,a as Ge,bn as Xl,j as c,q as ee,i as Yl,k as Kl,l as Ql,m as Zl,n as es,o as Xe,bX as si,d as ne,X as ai,bY as ts,T as ns,bZ as rs,c as X,b_ as oi,b$ as cn,c0 as is,f as wt,c1 as ls,c2 as We,c3 as Ae,aA as It,aB as Tt,c4 as Ie,aD as Pt,aE as In,aF as zt,c5 as ss,c6 as as,c7 as os,bk as Je,c8 as us,c9 as fn,ca as cs,cb as hn,cc as pn,cd as dn,ce as fs,p as pe,b1 as hs,bW as ps,cf as ds,bo as ms,b2 as gs,b3 as xs,b4 as ys,cg as bs,b5 as ks,b6 as ws,L as qt,I as Ss,be as Cs,ch as js,bd as vs,ci as ui,cj as Tn,ck as ci,cl as Es,cm as Ns,cn as As,co as Is,cp as Ts,cq as Ps,cr as zs,cs as Ls,ct as Ds,cu as Ms,cv as _s,cw as sr,cx as ar,cy as or,cz as Fs,cA as Os,cB as Rs,cC as Bs,cD as $s,cE as Hs,cF as Us,cG as qs,cH as Vs,cI as Ws,H as Js,cJ as Gs,cK as Xs,cL as Ys,cM as Ks,bj as Qs,N as Lt,O as Dt,au as Zs,Q as Mt,b as ft,e as fi,S as ea,cN as ta,aY as na,aZ as ra,a_ as ia,a$ as la,b0 as sa,az as hi,bL as aa,Z as oa,P as ua,cO as ca,cP as fa,cQ as ha,bA as pa,cR as da,cS as ma,av as ga,aw as xa,ax as ur,ay as cr,F as ya,B as ba,cT as ka,cU as wa,cV as pi,cW as Sa}from"./app-DOMFUTFw.js";import{i as Ca,u as ja}from"./use-appearance-B0ck1CR_.js";const di=v.createContext(void 0),va=({children:e})=>{const[n,t]=v.useState([]),[r,i]=v.useState([]),[s,l]=v.useState([]),[a,o]=v.useState(!1),[u,f]=v.useState(null),[h,d]=v.useState(""),p=re(),{t:m}=Ge(),w=Xl.useMemo(()=>({"Make read":m("Make read"),"View All":m("View All"),Search:m("Search"),"Make all read":m("Make all read"),Title:m("Title"),Message:m("Message"),Date:m("Date"),Diff:m("Diff"),"No notifications":m("No notifications"),"No notifications found":m("No notifications found"),"The end of the list has been reached":m("The end of the list has been reached")}),[m]),C=[...r,...s],b=async()=>{try{const y=await ee.getJson(`${window.routePrefix}/notifications/api`,{params:{unreadOnly:!0,limit:4}});t(y.data)}catch(y){console.error("Error fetching bell notifications:",y)}},N=async()=>{await b()},E=async()=>{try{const y=await ee.getJson(`${window.routePrefix}/notifications/api/get-classes`);y.data&&(f(y.data.activeServices),d(y.data.initTab))}catch(y){console.error("Error fetching tabs:",y)}},A=async(y,I)=>{try{if(!y){await j(I);return}const L=await ee.postJson(`${window.routePrefix}/notifications/api/search`,{s:y,notificationClass:I});l(L.data)}catch(L){console.error("Error searching notifications:",L)}},j=async y=>{o(!0);try{const I=`${window.routePrefix}/notifications/api/${y}`,L=await ee.getJson(I,{params:{limit:20,skip:0,unreadOnly:!1}});return i([]),l(L.data),L.data}catch(I){return console.error("Error fetching all notifications:",I),[]}finally{o(!1)}},k=async(y,I)=>{try{const L=`${window.routePrefix}/notifications/api/${y}`,R=await ee.getJson(L,{params:{limit:20,skip:I,unreadOnly:!1}});return l(_=>[..._,...R.data]),R.data}catch(L){return console.error("Error paginating notifications:",L),[]}};v.useEffect(()=>{if(!p.props.notifications)return;b();const y=new EventSource(`${window.routePrefix}/notifications/api/stream`);return y.addEventListener("connected",I=>{E()}),y.addEventListener("notification",I=>{const L=JSON.parse(I.data);i(R=>[L,...R]),t(R=>[L,...R].slice(0,4))}),y.onerror=()=>{console.error("SSE connection error")},()=>y.close()},[]);const P=async(y,I)=>{try{await ee.putJson(`${window.routePrefix}/notifications/api/${y}/${I}/read`,{}),i(L=>L.map(R=>R.id===I?{...R,read:!0}:R)),l(L=>L.map(R=>R.id===I?{...R,read:!0}:R)),t([])}catch(L){console.error("Error marking as read:",L)}},D=async()=>{try{await ee.putJson(`${window.routePrefix}/notifications/api/read-all`,{}),i(y=>y.map(I=>({...I,read:!0}))),l(y=>y.map(I=>({...I,read:!0}))),await b()}catch(y){console.error("Error marking all as read:",y)}},O=n.filter(y=>!y.read).length;return c.jsx(di.Provider,{value:{bellNotifications:n,allNotifications:C,unreadCount:O,getTabs:E,tabs:u,initTab:h,search:A,markAsRead:P,markAllAsRead:D,messages:w,fetchAllNotifications:j,paginateNotifications:k,loading:a,refreshBellNotifications:N},children:e})},mi=()=>{const e=v.useContext(di);if(e===void 0)throw new Error("useNotifications must be used within a NotificationProvider");return e},gi="adminizer.aiAssistant.state",Ea=()=>{if(!(typeof window>"u")){try{const e=window.localStorage.getItem(gi);if(e){const n=JSON.parse(e);if(typeof n.isOpen=="boolean")return{isOpen:n.isOpen,activeModel:typeof n.activeModel=="string"?n.activeModel:void 0}}}catch{}return window.__adminizerAiAssistantState__??void 0}},Na=e=>{if(!(typeof window>"u")){window.__adminizerAiAssistantState__=e;try{window.localStorage.setItem(gi,JSON.stringify(e))}catch{}}},xi=v.createContext(void 0),Aa=({children:e})=>{const t=re().props.aiAssistant,r=v.useMemo(()=>Ea(),[]),[i,s]=v.useState(()=>r?.isOpen??!1),[l,a]=v.useState([]),[o,u]=v.useState(()=>r?.activeModel??t?.defaultModel??void 0),[f,h]=v.useState(!1),[d,p]=v.useState(null),m=t?.enabled??!1,w=v.useCallback(async()=>{if(m)try{h(!0);const{data:j}=await ee.getJson(`${window.routePrefix}/api/ai-assistant/models`);a(j),u(k=>k&&j.some(D=>D.id===k)?k:t?.defaultModel&&j.some(D=>D.id===t.defaultModel)?t.defaultModel:j[0]?.id)}catch(j){console.error("Failed to load AI assistant models",j),p("Unable to load AI assistant models")}finally{h(!1)}},[t?.defaultModel,m]);v.useEffect(()=>{m&&w()},[w,m]);const C=v.useCallback(j=>{u(j)},[]),b=v.useCallback(()=>s(!0),[]),N=v.useCallback(()=>s(!1),[]),E=v.useCallback(()=>s(j=>!j),[]);v.useEffect(()=>{m||s(!1)},[m]),v.useEffect(()=>{Na({isOpen:i,activeModel:o})},[o,i]);const A=v.useMemo(()=>({isEnabled:m,isOpen:i,openChat:b,closeChat:N,toggleChat:E,models:l,activeModel:o,setActiveModel:C,loading:f,error:d}),[o,N,d,m,i,f,l,b,C,E]);return c.jsx(xi.Provider,{value:A,children:e})},_t=()=>{const e=v.useContext(xi);if(!e)throw new Error("useAiAssistant must be used within an AiAssistantProvider");return e},Ia=()=>`${window.routePrefix??""}/assets/ai-assistant/agent.es.js?v=${window.adminizerVersion??""}`;function Ta({width:e="min(25vw, 420px)",isResizing:n=!1,onResizeStart:t}){const{isEnabled:r,isOpen:i,closeChat:s,models:l,activeModel:a,setActiveModel:o,loading:u,error:f}=_t(),[h,d]=v.useState(null),[p,m]=v.useState(null);if(v.useEffect(()=>{if(!i||h||p)return;let N=!1;return import(Ia()).then(E=>{N||d(()=>E.default)}).catch(E=>{console.error("Failed to load the AI assistant UI",E),N||m("Unable to load the AI assistant UI")}),()=>{N=!0}},[h,i,p]),!r)return null;const w=l.find(N=>N.id===a),C=c.jsx(ne,{variant:"ghost",size:"icon",onClick:s,"aria-label":"Close AI assistant",children:c.jsx(ai,{className:"size-4"})}),b=c.jsxs(c.Fragment,{children:[l.length>1&&c.jsxs(Yl,{value:a,onValueChange:o,children:[c.jsx(Kl,{className:"h-8 w-36 text-xs","aria-label":"Select assistant",children:c.jsx(Ql,{placeholder:"Assistant"})}),c.jsx(Zl,{className:"z-[70]",children:l.map(N=>c.jsx(es,{value:N.id,children:N.name},N.id))})]}),C]});return c.jsxs("aside",{id:"ai-assistant-panel","aria-label":"AI assistant chat","aria-hidden":!i,className:si("bg-card text-card-foreground fixed bottom-0 right-0 top-0 z-[60] flex h-full flex-col border-l shadow-xl transition-all duration-300 ease-in-out","md:w-auto w-full",i?"translate-x-0 opacity-100":"translate-x-full opacity-0 pointer-events-none",n&&"transition-none"),style:{width:"var(--ai-assistant-panel-actual-width, "+e+")"},children:[c.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":"Resize AI assistant panel",className:"absolute -left-2 top-0 z-10 hidden h-full w-4 cursor-col-resize touch-none md:block",onPointerDown:t}),a&&h&&!p?c.jsx(h,{routePrefix:window.routePrefix??"",modelId:a,title:w?.name,layout:"panel",headerActions:b},a):c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"flex items-center justify-between border-b px-3 py-2",children:[c.jsx("span",{className:"font-semibold leading-tight",children:"AI assistant"}),C]}),c.jsx("div",{className:"flex flex-1 items-center justify-center p-6 text-center text-sm text-muted-foreground",children:p||f?c.jsx("span",{className:"text-destructive",children:p??f}):!u&&l.length===0?c.jsx("span",{children:"No AI models are available for your account."}):c.jsx(Xe,{className:"size-8 animate-spin"})})]})]})}const Pa="25vw",fr="margin-right 300ms ease-in-out",yi=.25,za=.55,bi="adminizer.aiAssistant.panelWidth",mn=()=>({min:Math.round(window.innerWidth*yi),max:Math.round(window.innerWidth*za)}),La=()=>window.innerWidth*yi,Da=()=>{try{const e=Number(window.localStorage.getItem(bi));if(!Number.isFinite(e))return null;const{min:n,max:t}=mn();return Math.min(t,Math.max(n,e))}catch{return null}};function Ma({children:e,panelWidth:n=Pa}){const{isEnabled:t,isOpen:r}=_t(),[i,s]=v.useState(Da),[l,a]=v.useState(!1),o=i===null?n:`${i}px`,u=v.useCallback(f=>{if(window.innerWidth<768)return;f.preventDefault();const h=f.clientX,d=i??La(),p=document.body.style.userSelect;document.body.style.userSelect="none",a(!0);const m=C=>{const{min:b,max:N}=mn(),E=Math.min(N,Math.max(b,d+h-C.clientX));s(Math.round(E))},w=()=>{document.body.style.userSelect=p,a(!1),document.removeEventListener("pointermove",m),document.removeEventListener("pointerup",w),document.removeEventListener("pointercancel",w)};document.addEventListener("pointermove",m),document.addEventListener("pointerup",w),document.addEventListener("pointercancel",w)},[i]);return v.useEffect(()=>{if(i!==null)try{window.localStorage.setItem(bi,String(i))}catch{}},[i]),v.useEffect(()=>{const f=document.getElementById("app");if(!f)return;const h=f.style.transition,d=h?.includes("margin-right");return d||(f.style.transition=h?`${h}, ${fr}`:fr),f.classList.add("ai-assistant-host"),f.style.setProperty("--ai-assistant-panel-width",o),()=>{f.classList.remove("ai-assistant-host"),f.style.removeProperty("--ai-assistant-panel-width"),f.style.removeProperty("--ai-assistant-panel-actual-width"),f.style.removeProperty("margin-right"),delete f.dataset.aiAssistantOpen,d||(f.style.transition=h)}},[o]),v.useEffect(()=>{const f=document.getElementById("app");if(!f)return;const h=window.innerWidth<768,d=h?"100vw":o;f.style.setProperty("--ai-assistant-panel-actual-width",d),t&&r?(f.style.marginRight=h?"0":o,f.dataset.aiAssistantOpen="true"):(f.style.removeProperty("margin-right"),f.dataset.aiAssistantOpen="false");const p=()=>{const m=window.innerWidth<768,w=m?"100vw":o;if(f.style.setProperty("--ai-assistant-panel-actual-width",w),i!==null&&!m){const{min:C,max:b}=mn();s(N=>N===null?N:Math.min(b,Math.max(C,N)))}t&&r&&(f.style.marginRight=m?"0":o)};return window.addEventListener("resize",p),()=>window.removeEventListener("resize",p)},[o,i,t,r]),c.jsxs(c.Fragment,{children:[e,c.jsx(Ta,{width:o,isResizing:l,onResizeStart:u})]})}function _a({children:e}){return v.useEffect(()=>{Ca()},[]),c.jsx(va,{children:c.jsx(Aa,{children:c.jsxs(ts,{children:[e,c.jsx(Ma,{}),c.jsx(ns,{position:"top-center",richColors:!0,closeButton:!0})]})})})}const ki=v.memo(({children:e,variant:n="header"})=>{const[t,r]=v.useState(()=>typeof window<"u"?localStorage.getItem("sidebar")!=="false":!0),i=s=>{r(s),typeof window<"u"&&localStorage.setItem("sidebar",String(s))};return n==="header"?c.jsx("div",{className:"flex min-h-screen w-full flex-col",children:e}):c.jsx(rs,{className:"h-svh overflow-hidden",defaultOpen:t,open:t,onOpenChange:i,children:e})});function Y({name:e,className:n,style:t}){return c.jsx("span",{className:X("material-icons-outlined",n),style:t,children:e})}function St(e){return e.split(/[?#]/)[0].replace(/\/+$/,"")}function wi(e,n){const t=St(n);let r=null;for(const i of e){if(!i)continue;const s=St(i);(t===s||t.startsWith(`${s}/`))&&(r===null||s.length>r.length)&&(r=s)}return r}function Si(e){return e.flatMap(n=>[n.link,...(n.actions??[]).map(t=>t.link)])}const Fa="folder",Oa="radio_button_checked",Ue=v.forwardRef(({entry:e,...n},t)=>{const r=c.jsxs(c.Fragment,{children:[e.icon&&c.jsx(Y,{name:e.icon,className:"!text-[18px]"}),c.jsx("span",{children:e.title})]});return e.type==="blank"?c.jsx("a",{...n,ref:t,href:e.link,target:"_blank",rel:"noopener noreferrer",children:r}):c.jsx(pe,{...n,ref:t,href:e.link,children:r})});Ue.displayName="EntryLink";function Ci({items:e=[]}){const n=re(),{state:t,isMobile:r}=oi(),i=t==="collapsed"&&!r,s=n.props.menuSections??{},l=(A,j)=>s[A]?.icon||j.find(k=>k.icon)?.icon||Fa,a=e.reduce((A,j)=>{const k=j.section||"Platform";return A[k]||(A[k]=[]),A[k].push(j),A},{}),o=Object.keys(a).sort((A,j)=>{const k=s[A]?.order,P=s[j]?.order;return k!==void 0&&P!==void 0?k-P:k!==void 0?-1:P!==void 0?1:A==="Platform"?-1:j==="Platform"||A==="System"?1:j==="System"?-1:A.localeCompare(j)}),[u,f]=v.useState(()=>{const A={};return e.forEach(j=>{const k=j.section||"Platform";A[k]=!1}),A}),[h,d]=v.useState(()=>{const A={};return e.forEach(j=>{const k=j.section||"Platform";A[k]=!1}),A}),p=wi(Si(e),n.url),m=A=>p!==null&&St(A)===p,w=v.useRef(u),C=v.useRef(h);w.current=u,C.current=h;const b=A=>{for(const j of A){const k=j.actions?.find(P=>m(P.link));if(k)return k}return A.find(j=>m(j.link))??null},N=({item:A})=>A.actions?.length>0?c.jsx(us,{asChild:!0,defaultOpen:m(A.link)||A.actions.some(j=>m(j.link)),className:"group/collapsible",children:c.jsxs(Ae,{children:[c.jsx(fn,{asChild:!0,children:c.jsxs(Ie,{tooltip:A.title,children:[c.jsx(Y,{name:A.icon,className:"!text-[18px]"}),c.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:A.title}),c.jsx(wt,{className:"ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90"})]})}),c.jsx(cs,{children:c.jsx(hn,{children:A.actions?.map(j=>c.jsx(pn,{children:c.jsx(dn,{asChild:!0,isActive:m(j.link),children:c.jsx(Ue,{entry:j})})},j.id))})})]})},A.title):c.jsxs(Ae,{children:[c.jsx(Ie,{asChild:!0,isActive:m(A.link),tooltip:{children:A.title},children:c.jsx(Ue,{entry:A})}),A.badge?c.jsx(fs,{children:A.badge}):null]},A.title),E=({section:A,itemsInSection:j})=>{const k=b(j);return c.jsx(cn,{className:"px-2 py-0",children:c.jsxs(We,{children:[c.jsx(Ae,{children:c.jsxs(It,{children:[c.jsx(Tt,{asChild:!0,children:c.jsxs(Ie,{isActive:!!k,"aria-label":A,children:[c.jsx(Y,{name:l(A,j),className:"!text-[18px]"}),c.jsx("span",{children:A})]})}),c.jsxs(Pt,{side:"right",align:"start",className:"min-w-56 z-[1003]",children:[c.jsxs(In,{className:"flex items-center gap-2",children:[c.jsx(Y,{name:l(A,j),className:"!text-[18px]"}),c.jsx("span",{children:A})]}),c.jsx(zt,{}),j.map(P=>P.actions?.length>0?c.jsxs(ss,{children:[c.jsxs(as,{children:[P.icon&&c.jsx(Y,{name:P.icon,className:"!text-[18px]"}),c.jsx("span",{children:P.title})]}),c.jsx(os,{className:"z-[1003]",children:P.actions?.map(D=>c.jsx(Je,{asChild:!0,children:c.jsx(Ue,{entry:D})},D.id||D.title))})]},P.id||P.title):c.jsx(Je,{asChild:!0,children:c.jsx(Ue,{entry:P})},P.id||P.title))]})]})}),k&&c.jsx(Ae,{children:c.jsx(Ie,{asChild:!0,isActive:!0,tooltip:k.title,children:c.jsx(Ue,{entry:{...k,icon:k.icon||Oa}})})})]})})};return c.jsx(c.Fragment,{children:o.map(A=>{const j=a[A];if(i)return c.jsx(E,{section:A,itemsInSection:j},A);const k=j.some(D=>D.actions?.length>0?D.actions.some(O=>m(O.link)):m(D.link)),P=h[A]?u[A]:k;return c.jsxs(cn,{className:"px-2 py-0",children:[c.jsx(is,{asChild:!0,className:"cursor-pointer",onClick:()=>{const y=!(C.current[A]?w.current[A]:k);d(I=>({...I,[A]:!0})),f(I=>({...I,[A]:y}))},children:c.jsxs("div",{className:"flex w-full items-center gap-2",children:[c.jsx(Y,{name:l(A,j),className:"!text-[16px]"}),c.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:A}),c.jsx(wt,{className:`ml-auto shrink-0 transform transition-transform duration-200 ${P?"rotate-90":""}`})]})}),P&&c.jsx(ls,{children:c.jsx(We,{children:j.map(D=>c.jsx(N,{item:D},D.id||D.title))})})]},A)})})}const Ra=5*1024*1024,Ba=(e,n)=>{const t=e?.response?.data;if(!t)return n;if(typeof t=="string")try{const r=JSON.parse(t);return r.error??r.message??n}catch{return t||n}if(typeof t=="object"){const r=t;return r.error??r.message??n}return n},ji=v.memo(({routePrefix:e,triggerLabel:n,placeholder:t,t:r,onClose:i})=>{const[s,l]=v.useState(""),[a,o]=v.useState(""),[u,f]=v.useState([]),[h,d]=v.useState({}),[p,m]=v.useState(!1),[w,C]=v.useState(!1),b=v.useRef(null),N=j=>{if(!j)return;const k={},P=[];Array.from(j).forEach(D=>{D.size>Ra?k[D.name]=r("File size exceeds the 5 MB limit"):P.push(D)}),f(D=>[...D,...P]),Object.keys(k).length&&d(D=>({...D,...k}))},E=j=>f(k=>k.filter((P,D)=>D!==j)),A=async j=>{if(j.preventDefault(),!s.trim()){d({title:r("Title is required")});return}m(!0),d({});const k=new FormData;k.append("title",s.trim()),k.append("description",a.trim()),u.forEach(P=>k.append("files",P));try{await ee.post(`${e}/api/feedback`,k),C(!0)}catch(P){const D=Ba(P,r("Internal server error"));d({_global:D}),m(!1)}};return v.useEffect(()=>{if(!w)return;const j=setTimeout(i,2e3);return()=>clearTimeout(j)},[w,i]),w?c.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 py-24 text-center",children:[c.jsx(bs,{size:48,className:"text-green-500 dark:text-green-400"}),c.jsx("p",{className:"text-base font-medium",children:r("Feedback sent successfully")})]}):c.jsxs(c.Fragment,{children:[c.jsxs(ks,{className:"mb-4",children:[c.jsx(ws,{children:n??r("Feedback")}),t&&c.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:t})]}),c.jsxs("form",{onSubmit:A,className:"space-y-5",noValidate:!0,children:[c.jsxs("div",{className:"space-y-1.5",children:[c.jsx(qt,{htmlFor:"fb-title",children:r("Title")}),c.jsx(Ss,{id:"fb-title",value:s,onChange:j=>l(j.target.value),disabled:p,placeholder:r("Title"),className:h.title?"border-destructive":""}),h.title&&c.jsx("p",{className:"text-xs text-destructive",children:h.title})]}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsx(qt,{htmlFor:"fb-desc",children:r("Description")}),c.jsx(Cs,{id:"fb-desc",value:a,onChange:j=>o(j.target.value),disabled:p,placeholder:r("Description"),rows:5,className:"resize-none"})]}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsx(qt,{children:r("Attach files")}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsxs(ne,{type:"button",variant:"outline",size:"sm",onClick:()=>b.current?.click(),disabled:p,children:[c.jsx(js,{size:14,className:"mr-1"}),r("Attach files")]}),c.jsx("span",{className:"text-xs text-muted-foreground",children:r("Max 5 MB per file")})]}),c.jsx("input",{ref:b,type:"file",multiple:!0,className:"hidden",onChange:j=>N(j.target.files),disabled:p}),u.length>0&&c.jsx("ul",{className:"mt-2 space-y-1",children:u.map((j,k)=>c.jsxs("li",{className:"flex items-center justify-between rounded-md border bg-muted/40 px-3 py-1.5 text-xs",children:[c.jsx("span",{className:"truncate max-w-[340px]",children:j.name}),c.jsx("button",{type:"button",onClick:()=>E(k),className:"ml-2 text-muted-foreground hover:text-destructive transition-colors","aria-label":r("Remove file"),disabled:p,children:c.jsx(ai,{size:13})})]},k))}),Object.entries(h).filter(([j])=>j!=="title"&&j!=="_global").map(([j,k])=>c.jsx("p",{className:"text-xs text-destructive",children:k},j))]}),h._global&&c.jsx("p",{className:"text-xs text-destructive",children:h._global}),c.jsx(vs,{children:c.jsx(ne,{type:"submit",disabled:p,children:p?c.jsxs(c.Fragment,{children:[c.jsx(Xe,{size:14,className:"mr-1.5 animate-spin"}),r("Sending...")]}):r("Send")})})]})]})});ji.displayName="FeedbackForm";function $a(){const e=re(),{t:n}=Ge(),t=e.props.routePrefix??window.routePrefix??"",r=e.props.feedbackTriggerLabel??null,i=e.props.feedbackPlaceholder??null,[s,l]=v.useState(!1),[a,o]=v.useState(0),u=v.useCallback(()=>l(!1),[]),f=v.useCallback(h=>{l(h),h||o(d=>d+1)},[]);return c.jsxs(hs,{open:s,onOpenChange:f,children:[c.jsx(ps,{asChild:!0,children:c.jsxs("button",{className:"flex items-center gap-1.5 text-xs opacity-60 hover:opacity-100 transition-opacity cursor-pointer mt-1 mx-auto","aria-label":r??n("Send feedback"),children:[c.jsx(ds,{size:13}),r??n("Send feedback")]})}),ms.createPortal(c.jsx(gs,{}),document.body),c.jsx(xs,{children:c.jsx(ys,{children:c.jsx(ji,{routePrefix:t,triggerLabel:r,placeholder:i,t:n,onClose:u},a)})})]})}const hr="rocket_launch";function vi({className:e,side:n="bottom"}){const t=re(),{adminContext:r,adminContexts:i=[],brand:s}=t.props,l=ui(),a=(t.props.section??[]).slice(1).flatMap(o=>o.subItems?.length?o.subItems:[o]);return c.jsxs(It,{children:[c.jsx(Tt,{asChild:!0,children:c.jsxs(ne,{variant:"ghost",className:X("w-full justify-start px-2! cursor-pointer",e),children:[c.jsx(Y,{name:r?.icon??hr,className:"!text-[18px]"}),c.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap group-data-[state=collapsed]:hidden",children:r?.title??s}),c.jsx(Tn,{className:"ml-auto group-data-[state=collapsed]:hidden"})]})}),c.jsxs(Pt,{side:l?"bottom":n,align:"start",className:"min-w-56 z-[1003]",children:[c.jsx(In,{className:"text-xs text-muted-foreground",children:s}),i.map(o=>c.jsx(Je,{asChild:!0,children:c.jsxs(pe,{href:o.link,className:"flex gap-2 items-center cursor-pointer",children:[c.jsx(Y,{name:o.icon??hr,className:"!text-[18px]"}),c.jsx("span",{children:o.title}),o.id===r?.id&&c.jsx(ci,{className:"ml-auto size-4"})]})},o.id)),a.length>0&&c.jsx(zt,{}),a.map(o=>c.jsx(Je,{asChild:!0,children:o.type==="blank"?c.jsxs("a",{href:o.link,target:"_blank",rel:"noreferrer",className:"flex gap-2 items-center",children:[o.icon&&c.jsx(Y,{name:o.icon,className:"!text-[18px]"}),c.jsx("span",{children:o.title})]}):c.jsxs(pe,{href:o.link,className:"flex gap-2 items-center",children:[o.icon&&c.jsx(Y,{name:o.icon,className:"!text-[18px]"}),c.jsx("span",{children:o.title})]})},o.id))]})]})}const Ei=["Layout","Sidebar","SidebarHeader","SidebarContent","SidebarFooter","Header","HeaderStart","HeaderActions"],Ni=v.createContext({});function Ha({layers:e,children:n}){const t=v.useMemo(()=>{const r={};for(const i of e)for(const s of Ei){const l=i[s];(typeof l=="function"||typeof l=="object"&&l!==null)&&(r[s]??=[]).push(l)}return r},[e]);return c.jsx(Ni.Provider,{value:t,children:n})}class Ua extends v.Component{state={failed:!1};static getDerivedStateFromError(){return{failed:!0}}componentDidCatch(n,t){console.error(`[Adminizer] The "${this.props.name}" layout override failed; the inherited part is shown instead`,n,t.componentStack)}render(){return this.state.failed?this.props.fallback():this.props.children}}function Te({name:e,Default:n,...t}){const r=v.useContext(Ni)[e],i=v.useMemo(()=>{let s=n;for(const l of r??[]){const a=s,o=u=>c.jsx(Ua,{name:e,fallback:()=>c.jsx(a,{...u}),children:c.jsx(l,{...u,Default:a})});o.displayName=`ShellSlot(${e})`,s=o}return s},[r,n,e]);return c.jsx(i,{...t})}function Ai(){return c.jsxs(Es,{collapsible:"icon",variant:"inset",children:[c.jsx(Ns,{children:c.jsx(Te,{name:"SidebarHeader",Default:qa})}),c.jsx(As,{children:c.jsx(Te,{name:"SidebarContent",Default:Va})}),c.jsx(Is,{children:c.jsx(Te,{name:"SidebarFooter",Default:Wa})})]})}function qa(){const e=re(),n=(e.props.adminContexts?.length??0)>1;return c.jsx(We,{children:c.jsx(Ae,{children:n?c.jsx(vi,{side:"right"}):c.jsxs(c.Fragment,{children:[c.jsx(Ts,{className:"p-0 shadow-none border-none bg-transparent hidden md:block",children:c.jsxs(Ps,{children:[c.jsx(zs,{asChild:!0,className:"text-sidebar-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground rounded-md",children:c.jsx(Ie,{asChild:!0,children:c.jsx(ne,{variant:"ghost",asChild:!0,className:`w-full px-2! ${e.props.section?"":"pointer-events-none"}`,children:c.jsxs("div",{children:[c.jsx(Y,{name:"rocket_launch",className:"!text-[18px]"}),c.jsx("span",{className:"group-data-[state=collapsed]:hidden",children:e.props.brand}),e.props.section&&c.jsx(Tn,{className:"ml-auto group-data-[state=collapsed]:hidden"})]})})})}),e.props.section&&c.jsx(Ls,{side:"right",className:"z-[1003]",children:e.props.section.map(t=>c.jsx("div",{children:t.subItems?c.jsxs(Ds,{children:[c.jsxs(Ms,{className:"flex gap-2 items-center cursor-pointer",children:[c.jsx(Y,{name:t.icon,className:"!text-[18px]"}),c.jsx("span",{className:"hover:underline",children:t.title})]}),c.jsx(_s,{children:t.subItems.map(r=>c.jsx(sr,{children:r.type==="blank"?c.jsxs("a",{href:r.link,target:"_blank",className:"flex gap-2 items-center",children:[r.icon&&c.jsx(Y,{name:r.icon,className:"!text-[18px]"}),c.jsx("span",{className:"hover:underline",children:r.title})]},r.id):c.jsxs(pe,{href:r.link,className:"flex gap-2 items-center",children:[r.icon&&c.jsx(Y,{name:r.icon,className:"!text-[18px]"}),c.jsx("span",{className:"hover:underline",children:r.title})]},r.id)},r.id))})]}):c.jsx(sr,{children:t.type==="blank"?c.jsxs("a",{href:t.link,target:"_blank",className:"flex gap-2 items-center",children:[t.icon&&c.jsx(Y,{name:t.icon,className:"!text-[18px]"}),c.jsx("span",{className:"hover:underline",children:t.title})]}):c.jsxs(pe,{href:t.link,className:"flex gap-2 items-center",children:[t.icon&&c.jsx(Y,{name:t.icon,className:"!text-[18px]"}),c.jsx("span",{className:"hover:underline",children:t.title})]})})},t.id))})]})}),c.jsx(cn,{className:"px-2 py-0 block md:hidden",children:c.jsx(We,{children:c.jsx(ar,{asChild:!0,className:"group/collapsible",children:c.jsxs(Ae,{children:[c.jsx(fn,{asChild:!0,children:c.jsxs(Ie,{children:[c.jsx(Y,{name:"rocket_launch",className:"!text-[18px]"}),c.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:e.props.brand}),e.props.section&&c.jsx(wt,{className:"ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90"})]})}),e.props.section&&c.jsx(or,{children:c.jsx(hn,{children:e.props.section&&e.props.section.map(t=>t.subItems?c.jsx(We,{children:c.jsx(ar,{asChild:!0,className:"group/collapsible-sub",children:c.jsxs(Ae,{children:[c.jsx(fn,{asChild:!0,children:c.jsxs(Ie,{children:[c.jsx(Y,{name:t.icon,className:"!text-[18px]"}),c.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:t.title}),c.jsx(wt,{className:"ml-auto transition-transform duration-200 group-data-[state=open]/collapsible-sub:rotate-90"})]})}),c.jsx(or,{children:c.jsx(hn,{children:t.subItems.map(r=>c.jsx(pn,{children:c.jsx(dn,{asChild:!0,children:r.type==="blank"?c.jsxs("a",{href:r.link,target:"_blank",className:"flex gap-2 items-center",children:[r.icon&&c.jsx(Y,{name:r.icon,className:"!text-[18px]"}),c.jsx("span",{className:"hover:underline",children:r.title})]}):c.jsxs(pe,{href:r.link,className:"flex gap-2 items-center",children:[r.icon&&c.jsx(Y,{name:r.icon,className:"!text-[18px]"}),c.jsx("span",{className:"hover:underline",children:r.title})]})})},r.id))})})]})})},t.id):c.jsx(pn,{children:c.jsx(dn,{asChild:!0,children:t.type==="blank"?c.jsxs("a",{href:t.link,target:"_blank",className:"flex gap-2 items-center",children:[t.icon&&c.jsx(Y,{name:t.icon,className:"!text-[18px]"}),c.jsx("span",{className:"hover:underline",children:t.title})]}):c.jsxs(pe,{href:t.link,className:"flex gap-2 items-center",children:[t.icon&&c.jsx(Y,{name:t.icon,className:"!text-[18px]"}),c.jsx("span",{className:"hover:underline",children:t.title})]})})},t.id))})})]})})})})]})},e.props.brand)})}function Va(){const e=re();return c.jsx(Ci,{items:e.props.menu})}function Wa(){const e=re();return c.jsxs("div",{className:"flex flex-col items-center",children:[e.props.version&&(()=>{const n=e.props.version,t=n.text||"5.2.0",r=new Date("2026-10-07T10:21:03.217Z").toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}),i=n.text?`v.${t}`:`v.${t} · ${r}`,s="text-center opacity-70 hover:opacity-100 transition-opacity text-xs";return n.link?c.jsx("a",{href:n.link,target:"_blank",rel:"noreferrer",title:n.hint??void 0,className:s,children:i}):c.jsx("span",{title:n.hint??void 0,className:s,children:i})})(),e.props.showFeedback&&c.jsx($a,{})]})}function Ii({breadcrumbs:e}){return c.jsx(c.Fragment,{children:e.length>0&&c.jsx(Fs,{children:c.jsx(Os,{children:e.map((n,t)=>{const r=t===e.length-1;return c.jsxs(v.Fragment,{children:[c.jsx(Rs,{children:r||!n.href?c.jsx(Bs,{children:n.title}):c.jsx($s,{asChild:!0,children:c.jsx(pe,{href:n.href,children:n.title})})}),!r&&c.jsx(Hs,{})]},t)})})})})}function Ja(){return v.useCallback(n=>{const t=n.trim().split(" ");if(t.length===0)return"";if(t.length===1)return t[0].charAt(0).toUpperCase();const r=t[0].charAt(0),i=t[t.length-1].charAt(0);return`${r}${i}`.toUpperCase()},[])}function Pn({user:e,showEmail:n=!1}){const t=Ja();return c.jsxs(c.Fragment,{children:[c.jsxs(Us,{className:"h-8 w-8 overflow-hidden rounded-full",children:[c.jsx(qs,{src:e.avatar,alt:e.login}),c.jsx(Vs,{className:"rounded-lg bg-neutral-200 text-black dark:bg-neutral-700 dark:text-white",children:t(e.login)})]}),c.jsxs("div",{className:"grid flex-1 text-left text-sm leading-tight",children:[c.jsx("span",{className:"truncate font-medium",children:e.login}),n&&c.jsx("span",{className:"text-muted-foreground truncate text-xs",children:e.email})]})]})}function Ga(){return v.useCallback(()=>{document.body.style.removeProperty("pointer-events")},[])}function Ti({user:e,logout:n,logoutBtn:t}){const r=Ga();return c.jsxs(c.Fragment,{children:[c.jsx(In,{className:"p-0 font-normal",children:c.jsx("div",{className:"flex items-center gap-2 px-1 py-1.5 text-left text-sm",children:c.jsx(Pn,{user:e,showEmail:!0})})}),c.jsx(zt,{}),c.jsx(Je,{asChild:!0,children:c.jsxs(pe,{className:"block w-full cursor-pointer",method:"get",href:n,as:"button",onClick:r,children:[c.jsx(Ws,{className:"mr-2"}),t]})})]})}function Pi(){const{auth:e,logout:n,logoutBtn:t}=re().props,{state:r}=oi(),i=ui();return c.jsx(We,{children:c.jsx(Ae,{children:c.jsxs(It,{children:[c.jsx(Tt,{asChild:!0,children:c.jsxs(Ie,{size:"lg",className:"text-sidebar-accent-foreground data-[state=open]:bg-sidebar-accent group focus-visible:ring-0 cursor-pointer",children:[c.jsx(Pn,{user:e.user}),c.jsx(Tn,{className:"ml-auto size-4"})]})}),c.jsx(Pt,{className:"w-(--radix-dropdown-menu-trigger-width) min-w-56 rounded-lg z-[1002]",align:"end",side:i?"bottom":r==="collapsed"?"left":"bottom",children:c.jsx(Ti,{user:e.user,logout:n,logoutBtn:t})})]})})})}function zi(){const{appearance:e,updateAppearance:n}=ja(),t={light:"dark",dark:"system",system:"light"},r={light:Ys,dark:Xs,system:Gs},i=()=>n(t[e]),s=r[e];return c.jsx(ne,{variant:"ghost",size:"icon",onClick:i,className:"shrink-0",children:c.jsx(Js,{iconNode:s})})}function Xa(){const{bellNotifications:e,markAsRead:n,unreadCount:t,refreshBellNotifications:r,messages:i}=mi(),[s,l]=v.useState(!1),a=async(u,f)=>{l(!0);try{await n(u,f),await r()}catch(h){console.error("Error marking as read:",h)}finally{l(!1)}},o=u=>{const f=new Date,h=new Date(u),d=f.getTime()-h.getTime(),p=Math.floor(d/1e3),m=new Intl.RelativeTimeFormat("en",{numeric:"auto"});if(p<60)return m.format(-p,"second");const w=Math.floor(p/60);if(w<60)return m.format(-w,"minute");const C=Math.floor(w/60);if(C<24)return m.format(-C,"hour");const b=Math.floor(C/24);if(b<30)return m.format(-b,"day");const N=Math.floor(b/30);if(N<12)return m.format(-N,"month");const E=Math.floor(N/12);return m.format(-E,"year")};return c.jsxs(It,{children:[c.jsx(Tt,{asChild:!0,className:"cursor-pointer data-[state=open]:bg-sidebar-accent",children:c.jsxs(ne,{variant:"ghost",className:"relative",children:[c.jsx(Ks,{}),t>0&&c.jsx("div",{className:"absolute top-1.5 right-1.5 size-1.5 rounded-full bg-destructive"})]})}),c.jsxs(Pt,{className:"z-[1002] p-2",align:"end",onCloseAutoFocus:u=>u.preventDefault(),children:[c.jsx(Qs,{className:`${s?"opacity-50 pointer-events-none":""}`,children:e.length===0?c.jsx("div",{className:"p-4 text-center text-muted-foreground",children:i["No notifications"]}):e.map(u=>c.jsxs("div",{children:[c.jsx(Je,{asChild:!0,className:"cursor-pointer",onSelect:f=>{f.preventDefault(),ft.visit(`${window.routePrefix}/notifications?type=${u.notificationClass}`)},children:c.jsxs("div",{className:"grid grid-cols-[32px_250px] grid-rows-[auto_1fr] items-start gap-x-4 gap-y-2",children:[u.icon?c.jsx(Y,{name:u.icon.icon,style:{color:u.icon.iconColor},className:"!text-[32px]"}):c.jsx("div",{}),c.jsxs("div",{className:"flex flex-col",children:[c.jsx("span",{className:"font-medium",children:u.title}),c.jsx("span",{className:"truncate",children:u.message})]}),c.jsxs("div",{className:"col-start-2 flex justify-between flex-nowrap items-center",children:[c.jsx("div",{className:"flex flex-nowrap gap-2 items-center",children:c.jsx("div",{children:o(u.createdAt)})}),c.jsxs(Lt,{children:[c.jsx(Dt,{asChild:!0,children:c.jsx(ne,{variant:"ghost",size:"icon",className:"size-4",onClick:f=>{f.stopPropagation(),a(u.notificationClass,u.id)},children:c.jsx(Zs,{className:"text-primary"})})}),c.jsx(Mt,{side:"left",className:"z-[1003]",children:c.jsx("p",{children:i["Make read"]})})]})]})]})}),c.jsx(zt,{})]},u.id))}),c.jsx(ne,{variant:"secondary",asChild:!0,children:c.jsxs(pe,{href:`${window.routePrefix}/notifications`,className:`w-full ${s?"opacity-50 pointer-events-none":""}`,children:[i["View All"],s&&c.jsx(Xe,{className:"h-4 w-4 animate-spin"})]})})]})]})}function Ya(){const{isEnabled:e,isOpen:n,toggleChat:t,models:r,loading:i}=_t();if(!e)return null;const s=r.length>0;return c.jsx(c.Fragment,{children:c.jsxs(Lt,{children:[c.jsx(Dt,{asChild:!0,children:c.jsx(ne,{variant:"ghost",className:si("relative",{"text-primary":n}),onClick:t,"aria-expanded":n,"aria-haspopup":"true","aria-controls":"ai-assistant-panel",disabled:!s&&i,children:i&&!s?c.jsx(Xe,{className:"size-4 animate-spin"}):c.jsx(fi,{className:"size-4"})})}),c.jsx(Mt,{side:"bottom",className:"z-[1002]",children:c.jsx("span",{children:"AI assistant"})})]})})}const Ka=200,pr="adminizer:ai-search-admin-links";function Li(){const e=re(),{t:n}=Ge(),[t,r]=v.useState(!1),[i,s]=v.useState(""),[l,a]=v.useState([]),[o,u]=v.useState(!1);v.useEffect(()=>{const d=m=>{m.defaultPrevented||!(m.metaKey||m.ctrlKey)||m.key.toLowerCase()!=="k"||(m.preventDefault(),r(w=>!w))},p=m=>{const w=m.detail;s(typeof w?.query=="string"?w.query:""),r(!0)};return window.addEventListener("keydown",d),window.addEventListener(pr,p),()=>{window.removeEventListener("keydown",d),window.removeEventListener(pr,p)}},[]),v.useEffect(()=>{if(!t)return;let d=!1;u(!0);const p=window.setTimeout(async()=>{try{const{data:m}=await ee.getJson(`${window.routePrefix}/api/links/search?q=${encodeURIComponent(i)}`);d||a(m.results.filter(w=>w.link))}catch{d||a([])}finally{d||u(!1)}},Ka);return()=>{d=!0,window.clearTimeout(p)}},[t,i]);const f=v.useMemo(()=>{const d=new Map;for(const p of l){const m=p.section||"Platform";d.has(m)||d.set(m,[]),d.get(m).push(p)}return[...d]},[l]),h=v.useCallback(d=>{r(!1),ft.visit(d)},[]);return e.props.auth?.user?c.jsxs(c.Fragment,{children:[c.jsxs(Lt,{children:[c.jsx(Dt,{asChild:!0,children:c.jsx(ne,{variant:"ghost",size:"icon",className:"shrink-0",onClick:()=>r(!0),"aria-label":n("Search"),children:c.jsx(ea,{className:"size-4"})})}),c.jsx(Mt,{side:"bottom",className:"z-[1002]",children:c.jsxs("span",{children:[n("Search")," · Ctrl K"]})})]}),c.jsxs(ta,{open:t,onOpenChange:r,shouldFilter:!1,title:n("Search"),description:n("Search"),children:[c.jsx(na,{value:i,onValueChange:s,placeholder:`${n("Search")}…`}),c.jsxs(ra,{children:[c.jsx(ia,{children:o?"…":n("Nothing found","Nothing found")}),f.map(([d,p])=>c.jsx(la,{heading:d,children:p.map(m=>c.jsxs(sa,{value:m.id,onSelect:()=>h(m.link),children:[c.jsx("span",{className:"truncate",children:m.title}),m.description&&c.jsx("span",{className:"text-muted-foreground ml-2 truncate text-xs",children:m.description})]},m.id))},d))]})]})]}):null}function Di({fields:e,title:n,loading:t=!1,className:r}){const{t:i}=Ge();return c.jsxs("div",{className:X("overflow-hidden rounded-xl border",r),children:[n&&c.jsx("div",{className:"bg-muted/50 border-b px-3 py-1.5 text-sm font-medium",children:n}),t||!e?c.jsx("div",{className:"text-muted-foreground p-3 text-sm",children:i("Loading...")}):e.length===0?c.jsx("div",{className:"text-muted-foreground p-3 text-sm",children:i("No fields to display")}):c.jsxs("table",{className:"w-full text-sm",children:[c.jsx("thead",{children:c.jsxs("tr",{className:"bg-muted/30 text-muted-foreground",children:[c.jsx("th",{className:"px-3 py-1.5 text-start font-medium",children:i("Field")}),c.jsx("th",{className:"px-3 py-1.5 text-start font-medium",children:i("Type")}),c.jsx("th",{className:"px-3 py-1.5 text-start font-medium",children:i("Required")})]})}),c.jsx("tbody",{children:e.map(s=>c.jsxs("tr",{className:"border-t",children:[c.jsxs("td",{className:"px-3 py-1.5",children:[c.jsx("span",{className:"font-medium",children:s.title||s.name}),s.title&&s.title!==s.name&&c.jsx("span",{className:"text-muted-foreground ms-2 font-mono text-xs",children:s.name})]}),c.jsx("td",{className:"px-3 py-1.5 font-mono text-xs",children:s.type}),c.jsx("td",{className:"px-3 py-1.5",children:s.required?i("Yes"):i("No")})]},s.name))})]})]})}function Qa(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const Za=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,eo=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,to={};function dr(e,n){return(to.jsx?eo:Za).test(e)}const no=/[ \t\n\f\r]/g;function ro(e){return typeof e=="object"?e.type==="text"?mr(e.value):!1:mr(e)}function mr(e){return e.replace(no,"")===""}class ht{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}ht.prototype.normal={};ht.prototype.property={};ht.prototype.space=void 0;function Mi(e,n){const t={},r={};for(const i of e)Object.assign(t,i.property),Object.assign(r,i.normal);return new ht(t,r,n)}function gn(e){return e.toLowerCase()}class ue{constructor(n,t){this.attribute=t,this.property=n}}ue.prototype.attribute="";ue.prototype.booleanish=!1;ue.prototype.boolean=!1;ue.prototype.commaOrSpaceSeparated=!1;ue.prototype.commaSeparated=!1;ue.prototype.defined=!1;ue.prototype.mustUseProperty=!1;ue.prototype.number=!1;ue.prototype.overloadedBoolean=!1;ue.prototype.property="";ue.prototype.spaceSeparated=!1;ue.prototype.space=void 0;let io=0;const B=Fe(),K=Fe(),xn=Fe(),T=Fe(),W=Fe(),Me=Fe(),fe=Fe();function Fe(){return 2**++io}const yn=Object.freeze(Object.defineProperty({__proto__:null,boolean:B,booleanish:K,commaOrSpaceSeparated:fe,commaSeparated:Me,number:T,overloadedBoolean:xn,spaceSeparated:W},Symbol.toStringTag,{value:"Module"})),Vt=Object.keys(yn);class zn extends ue{constructor(n,t,r,i){let s=-1;if(super(n,t),gr(this,"space",i),typeof r=="number")for(;++s<Vt.length;){const l=Vt[s];gr(this,Vt[s],(r&yn[l])===yn[l])}}}zn.prototype.defined=!0;function gr(e,n,t){t&&(e[n]=t)}function Ye(e){const n={},t={};for(const[r,i]of Object.entries(e.properties)){const s=new zn(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),n[r]=s,t[gn(r)]=r,t[gn(s.attribute)]=r}return new ht(n,t,e.space)}const _i=Ye({properties:{ariaActiveDescendant:null,ariaAtomic:K,ariaAutoComplete:null,ariaBusy:K,ariaChecked:K,ariaColCount:T,ariaColIndex:T,ariaColSpan:T,ariaControls:W,ariaCurrent:null,ariaDescribedBy:W,ariaDetails:null,ariaDisabled:K,ariaDropEffect:W,ariaErrorMessage:null,ariaExpanded:K,ariaFlowTo:W,ariaGrabbed:K,ariaHasPopup:null,ariaHidden:K,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:W,ariaLevel:T,ariaLive:null,ariaModal:K,ariaMultiLine:K,ariaMultiSelectable:K,ariaOrientation:null,ariaOwns:W,ariaPlaceholder:null,ariaPosInSet:T,ariaPressed:K,ariaReadOnly:K,ariaRelevant:null,ariaRequired:K,ariaRoleDescription:W,ariaRowCount:T,ariaRowIndex:T,ariaRowSpan:T,ariaSelected:K,ariaSetSize:T,ariaSort:null,ariaValueMax:T,ariaValueMin:T,ariaValueNow:T,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function Fi(e,n){return n in e?e[n]:n}function Oi(e,n){return Fi(e,n.toLowerCase())}const lo=Ye({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Me,acceptCharset:W,accessKey:W,action:null,allow:null,allowFullScreen:B,allowPaymentRequest:B,allowUserMedia:B,alpha:B,alt:null,as:null,async:B,autoCapitalize:null,autoComplete:W,autoFocus:B,autoPlay:B,blocking:W,capture:null,charSet:null,checked:B,cite:null,className:W,closedBy:null,colorSpace:null,cols:T,colSpan:T,command:null,commandFor:null,content:null,contentEditable:K,controls:B,controlsList:W,coords:T|Me,crossOrigin:null,data:null,dateTime:null,decoding:null,default:B,defer:B,dir:null,dirName:null,disabled:B,download:xn,draggable:K,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:B,formTarget:null,headers:W,height:T,hidden:xn,high:T,href:null,hrefLang:null,htmlFor:W,httpEquiv:W,id:null,imageSizes:null,imageSrcSet:null,inert:B,inputMode:null,integrity:null,is:null,isMap:B,itemId:null,itemProp:W,itemRef:W,itemScope:B,itemType:W,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:B,low:T,manifest:null,max:null,maxLength:T,media:null,method:null,min:null,minLength:T,multiple:B,muted:B,name:null,nonce:null,noModule:B,noValidate:B,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:B,optimum:T,pattern:null,ping:W,placeholder:null,playsInline:B,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:B,referrerPolicy:null,rel:W,required:B,reversed:B,rows:T,rowSpan:T,sandbox:W,scope:null,scoped:B,seamless:B,selected:B,shadowRootClonable:B,shadowRootCustomElementRegistry:B,shadowRootDelegatesFocus:B,shadowRootMode:null,shadowRootSerializable:B,shape:null,size:T,sizes:null,slot:null,span:T,spellCheck:K,src:null,srcDoc:null,srcLang:null,srcSet:null,start:T,step:null,style:null,tabIndex:T,target:null,title:null,translate:null,type:null,typeMustMatch:B,useMap:null,value:K,width:T,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:W,axis:null,background:null,bgColor:null,border:T,borderColor:null,bottomMargin:T,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:B,declare:B,event:null,face:null,frame:null,frameBorder:null,hSpace:T,leftMargin:T,link:null,longDesc:null,lowSrc:null,marginHeight:T,marginWidth:T,noResize:B,noHref:B,noShade:B,noWrap:B,object:null,profile:null,prompt:null,rev:null,rightMargin:T,rules:null,scheme:null,scrolling:K,standby:null,summary:null,text:null,topMargin:T,valueType:null,version:null,vAlign:null,vLink:null,vSpace:T,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:B,disablePictureInPicture:B,disableRemotePlayback:B,exportParts:Me,part:W,prefix:null,property:null,results:T,security:null,unselectable:null},space:"html",transform:Oi}),so=Ye({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:fe,accentHeight:T,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:T,amplitude:T,arabicForm:null,ascent:T,attributeName:null,attributeType:null,azimuth:T,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:T,by:null,calcMode:null,capHeight:T,className:W,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:T,diffuseConstant:T,direction:null,display:null,dur:null,divisor:T,dominantBaseline:null,download:B,dx:null,dy:null,edgeMode:null,editable:null,elevation:T,enableBackground:null,end:null,event:null,exponent:T,externalResourcesRequired:null,fill:null,fillOpacity:T,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Me,g2:Me,glyphName:Me,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:T,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:T,horizOriginX:T,horizOriginY:T,id:null,ideographic:T,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:T,k:T,k1:T,k2:T,k3:T,k4:T,kernelMatrix:fe,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:T,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:T,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:T,overlineThickness:T,paintOrder:null,panose1:null,path:null,pathLength:T,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:W,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:T,pointsAtY:T,pointsAtZ:T,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:fe,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:fe,rev:fe,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:fe,requiredFeatures:fe,requiredFonts:fe,requiredFormats:fe,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:T,specularExponent:T,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:T,strikethroughThickness:T,string:null,stroke:null,strokeDashArray:fe,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:T,strokeOpacity:T,strokeWidth:null,style:null,surfaceScale:T,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:fe,tabIndex:T,tableValues:null,target:null,targetX:T,targetY:T,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:fe,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:T,underlineThickness:T,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:T,values:null,vAlphabetic:T,vMathematical:T,vectorEffect:null,vHanging:T,vIdeographic:T,version:null,vertAdvY:T,vertOriginX:T,vertOriginY:T,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:T,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Fi}),Ri=Ye({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()}}),Bi=Ye({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Oi}),$i=Ye({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),ao={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},oo=/[A-Z]/g,xr=/-[a-z]/g,uo=/^data[-\w.:]+$/i;function co(e,n){const t=gn(n);let r=n,i=ue;if(t in e.normal)return e.property[e.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&uo.test(n)){if(n.charAt(4)==="-"){const s=n.slice(5).replace(xr,ho);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=n.slice(4);if(!xr.test(s)){let l=s.replace(oo,fo);l.charAt(0)!=="-"&&(l="-"+l),n="data"+l}}i=zn}return new i(r,n)}function fo(e){return"-"+e.toLowerCase()}function ho(e){return e.charAt(1).toUpperCase()}const po=Mi([_i,lo,Ri,Bi,$i],"html"),Ln=Mi([_i,so,Ri,Bi,$i],"svg");function mo(e){return e.join(" ").trim()}var He={},Wt,yr;function go(){if(yr)return Wt;yr=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,a=/^\s+|\s+$/g,o=`
|
|
3
|
+
`,u="/",f="*",h="",d="comment",p="declaration";function m(C,b){if(typeof C!="string")throw new TypeError("First argument must be a string");if(!C)return[];b=b||{};var N=1,E=1;function A(_){var M=_.match(n);M&&(N+=M.length);var V=_.lastIndexOf(o);E=~V?_.length-V:E+_.length}function j(){var _={line:N,column:E};return function(M){return M.position=new k(_),O(),M}}function k(_){this.start=_,this.end={line:N,column:E},this.source=b.source}k.prototype.content=C;function P(_){var M=new Error(b.source+":"+N+":"+E+": "+_);if(M.reason=_,M.filename=b.source,M.line=N,M.column=E,M.source=C,!b.silent)throw M}function D(_){var M=_.exec(C);if(M){var V=M[0];return A(V),C=C.slice(V.length),M}}function O(){D(t)}function y(_){var M;for(_=_||[];M=I();)M!==!1&&_.push(M);return _}function I(){var _=j();if(!(u!=C.charAt(0)||f!=C.charAt(1))){for(var M=2;h!=C.charAt(M)&&(f!=C.charAt(M)||u!=C.charAt(M+1));)++M;if(M+=2,h===C.charAt(M-1))return P("End of comment missing");var V=C.slice(2,M-2);return E+=2,A(V),C=C.slice(M),E+=2,_({type:d,comment:V})}}function L(){var _=j(),M=D(r);if(M){if(I(),!D(i))return P("property missing ':'");var V=D(s),Q=_({type:p,property:w(M[0].replace(e,h)),value:V?w(V[0].replace(e,h)):h});return D(l),Q}}function R(){var _=[];y(_);for(var M;M=L();)M!==!1&&(_.push(M),y(_));return _}return O(),R()}function w(C){return C?C.replace(a,h):h}return Wt=m,Wt}var br;function xo(){if(br)return He;br=1;var e=He&&He.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(He,"__esModule",{value:!0}),He.default=t;const n=e(go());function t(r,i){let s=null;if(!r||typeof r!="string")return s;const l=(0,n.default)(r),a=typeof i=="function";return l.forEach(o=>{if(o.type!=="declaration")return;const{property:u,value:f}=o;a?i(u,f,o):f&&(s=s||{},s[u]=f)}),s}return He}var nt={},kr;function yo(){if(kr)return nt;kr=1,Object.defineProperty(nt,"__esModule",{value:!0}),nt.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,s=function(u){return!u||t.test(u)||e.test(u)},l=function(u,f){return f.toUpperCase()},a=function(u,f){return"".concat(f,"-")},o=function(u,f){return f===void 0&&(f={}),s(u)?u:(u=u.toLowerCase(),f.reactCompat?u=u.replace(i,a):u=u.replace(r,a),u.replace(n,l))};return nt.camelCase=o,nt}var rt,wr;function bo(){if(wr)return rt;wr=1;var e=rt&&rt.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},n=e(xo()),t=yo();function r(i,s){var l={};return!i||typeof i!="string"||(0,n.default)(i,function(a,o){a&&o&&(l[(0,t.camelCase)(a,s)]=o)}),l}return r.default=r,rt=r,rt}var ko=bo();const wo=hi(ko),Hi=Ui("end"),Dn=Ui("start");function Ui(e){return n;function n(t){const r=t&&t.position&&t.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function So(e){const n=Dn(e),t=Hi(e);if(n&&t)return{start:n,end:t}}function st(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Sr(e.position):"start"in e||"end"in e?Sr(e):"line"in e||"column"in e?bn(e):""}function bn(e){return Cr(e&&e.line)+":"+Cr(e&&e.column)}function Sr(e){return bn(e&&e.start)+"-"+bn(e&&e.end)}function Cr(e){return e&&typeof e=="number"?e:1}class ie extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let i="",s={},l=!1;if(t&&("line"in t&&"column"in t?s={place:t}:"start"in t&&"end"in t?s={place:t}:"type"in t?s={ancestors:[t],place:t.position}:s={...t}),typeof n=="string"?i=n:!s.cause&&n&&(l=!0,i=n.message,s.cause=n),!s.ruleId&&!s.source&&typeof r=="string"){const o=r.indexOf(":");o===-1?s.ruleId=r:(s.source=r.slice(0,o),s.ruleId=r.slice(o+1))}if(!s.place&&s.ancestors&&s.ancestors){const o=s.ancestors[s.ancestors.length-1];o&&(s.place=o.position)}const a=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=st(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=l&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ie.prototype.file="";ie.prototype.name="";ie.prototype.reason="";ie.prototype.message="";ie.prototype.stack="";ie.prototype.column=void 0;ie.prototype.line=void 0;ie.prototype.ancestors=void 0;ie.prototype.cause=void 0;ie.prototype.fatal=void 0;ie.prototype.place=void 0;ie.prototype.ruleId=void 0;ie.prototype.source=void 0;const Mn={}.hasOwnProperty,Co=new Map,jo=/[A-Z]/g,vo=new Set(["table","tbody","thead","tfoot","tr"]),Eo=new Set(["td","th"]),qi="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function No(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=n.filePath||void 0;let r;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Mo(t,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Do(t,n.jsx,n.jsxs)}const i={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:r,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?Ln:po,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},s=Vi(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function Vi(e,n,t){if(n.type==="element")return Ao(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return Io(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return Po(e,n,t);if(n.type==="mdxjsEsm")return To(e,n);if(n.type==="root")return zo(e,n,t);if(n.type==="text")return Lo(e,n)}function Ao(e,n,t){const r=e.schema;let i=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Ln,e.schema=i),e.ancestors.push(n);const s=Ji(e,n.tagName,!1),l=_o(e,n);let a=Fn(e,n);return vo.has(n.tagName)&&(a=a.filter(function(o){return typeof o=="string"?!ro(o):!0})),Wi(e,l,s,n),_n(l,a),e.ancestors.pop(),e.schema=r,e.create(n,s,l,t)}function Io(e,n){if(n.data&&n.data.estree&&e.evaluater){const r=n.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}ct(e,n.position)}function To(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);ct(e,n.position)}function Po(e,n,t){const r=e.schema;let i=r;n.name==="svg"&&r.space==="html"&&(i=Ln,e.schema=i),e.ancestors.push(n);const s=n.name===null?e.Fragment:Ji(e,n.name,!0),l=Fo(e,n),a=Fn(e,n);return Wi(e,l,s,n),_n(l,a),e.ancestors.pop(),e.schema=r,e.create(n,s,l,t)}function zo(e,n,t){const r={};return _n(r,Fn(e,n)),e.create(n,e.Fragment,r,t)}function Lo(e,n){return n.value}function Wi(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function _n(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function Do(e,n,t){return r;function r(i,s,l,a){const u=Array.isArray(l.children)?t:n;return a?u(s,l,a):u(s,l)}}function Mo(e,n){return t;function t(r,i,s,l){const a=Array.isArray(s.children),o=Dn(r);return n(i,s,l,a,{columnNumber:o?o.column-1:void 0,fileName:e,lineNumber:o?o.line:void 0},void 0)}}function _o(e,n){const t={};let r,i;for(i in n.properties)if(i!=="children"&&Mn.call(n.properties,i)){const s=Oo(e,i,n.properties[i]);if(s){const[l,a]=s;e.tableCellAlignToStyle&&l==="align"&&typeof a=="string"&&Eo.has(n.tagName)?r=a:t[l]=a}}if(r){const s=t.style||(t.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function Fo(e,n){const t={};for(const r of n.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const s=r.data.estree.body[0];s.type;const l=s.expression;l.type;const a=l.properties[0];a.type,Object.assign(t,e.evaluater.evaluateExpression(a.argument))}else ct(e,n.position);else{const i=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,s=e.evaluater.evaluateExpression(a.expression)}else ct(e,n.position);else s=r.value===null?!0:r.value;t[i]=s}return t}function Fn(e,n){const t=[];let r=-1;const i=e.passKeys?new Map:Co;for(;++r<n.children.length;){const s=n.children[r];let l;if(e.passKeys){const o=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(o){const u=i.get(o)||0;l=o+"-"+u,i.set(o,u+1)}}const a=Vi(e,s,l);a!==void 0&&t.push(a)}return t}function Oo(e,n,t){const r=co(e.schema,n);if(!(t==null||typeof t=="number"&&Number.isNaN(t))){if(Array.isArray(t)&&(t=r.commaSeparated?Qa(t):mo(t)),r.property==="style"){let i=typeof t=="object"?t:Ro(e,String(t));return e.stylePropertyNameCase==="css"&&(i=Bo(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?ao[r.property]||r.property:r.attribute,t]}}function Ro(e,n){try{return wo(n,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};const r=t,i=new ie("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=qi+"#cannot-parse-style-attribute",i}}function Ji(e,n,t){let r;if(!t)r={type:"Literal",value:n};else if(n.includes(".")){const i=n.split(".");let s=-1,l;for(;++s<i.length;){const a=dr(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};l=l?{type:"MemberExpression",object:l,property:a,computed:!!(s&&a.type==="Literal"),optional:!1}:a}r=l}else r=dr(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(r.type==="Literal"){const i=r.value;return Mn.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);ct(e)}function ct(e,n){const t=new ie("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:n,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw t.file=e.filePath||void 0,t.url=qi+"#cannot-handle-mdx-estrees-without-createevaluater",t}function Bo(e){const n={};let t;for(t in e)Mn.call(e,t)&&(n[$o(t)]=e[t]);return n}function $o(e){let n=e.replace(jo,Ho);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function Ho(e){return"-"+e.toLowerCase()}const Jt={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Uo={};function On(e,n){const t=Uo,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,i=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return Gi(e,r,i)}function Gi(e,n,t){if(qo(e)){if("value"in e)return e.type==="html"&&!t?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return jr(e.children,n,t)}return Array.isArray(e)?jr(e,n,t):""}function jr(e,n,t){const r=[];let i=-1;for(;++i<e.length;)r[i]=Gi(e[i],n,t);return r.join("")}function qo(e){return!!(e&&typeof e=="object")}const vr=document.createElement("i");function Rn(e){const n="&"+e+";";vr.innerHTML=n;const t=vr.textContent;return t.charCodeAt(t.length-1)===59&&e!=="semi"||t===n?!1:t}function xe(e,n,t,r){const i=e.length;let s=0,l;if(n<0?n=-n>i?0:i+n:n=n>i?i:n,t=t>0?t:0,r.length<1e4)l=Array.from(r),l.unshift(n,t),e.splice(...l);else for(t&&e.splice(n,t);s<r.length;)l=r.slice(s,s+1e4),l.unshift(n,0),e.splice(...l),s+=1e4,n+=1e4}function he(e,n){return e.length>0?(xe(e,e.length,0,n),e):n}const Er={}.hasOwnProperty;function Xi(e){const n={};let t=-1;for(;++t<e.length;)Vo(n,e[t]);return n}function Vo(e,n){let t;for(t in n){const i=(Er.call(e,t)?e[t]:void 0)||(e[t]={}),s=n[t];let l;if(s)for(l in s){Er.call(i,l)||(i[l]=[]);const a=s[l];Wo(i[l],Array.isArray(a)?a:a?[a]:[])}}}function Wo(e,n){let t=-1;const r=[];for(;++t<n.length;)(n[t].add==="after"?e:r).push(n[t]);xe(e,0,0,r)}function Yi(e,n){const t=Number.parseInt(e,n);return t<9||t===11||t>13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function ye(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const le=Pe(/[A-Za-z]/),te=Pe(/[\dA-Za-z]/),Jo=Pe(/[#-'*+\--9=?A-Z^-~]/);function Ct(e){return e!==null&&(e<32||e===127)}const kn=Pe(/\d/),Go=Pe(/[\dA-Fa-f]/),Xo=Pe(/[!-/:-@[-`{-~]/);function F(e){return e!==null&&e<-2}function J(e){return e!==null&&(e<0||e===32)}function U(e){return e===-2||e===-1||e===32}const Ft=Pe(new RegExp("\\p{P}|\\p{S}","u")),_e=Pe(/\s/);function Pe(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Ke(e){const n=[];let t=-1,r=0,i=0;for(;++t<e.length;){const s=e.charCodeAt(t);let l="";if(s===37&&te(e.charCodeAt(t+1))&&te(e.charCodeAt(t+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(l=String.fromCharCode(s));else if(s>55295&&s<57344){const a=e.charCodeAt(t+1);s<56320&&a>56319&&a<57344?(l=String.fromCharCode(s,a),i=1):l="�"}else l=String.fromCharCode(s);l&&(n.push(e.slice(r,t),encodeURIComponent(l)),r=t+i+1,l=""),i&&(t+=i,i=0)}return n.join("")+e.slice(r)}function q(e,n,t,r){const i=r?r-1:1/0;let s=0;return l;function l(o){return U(o)?(e.enter(t),a(o)):n(o)}function a(o){return U(o)&&s++<i?(e.consume(o),a):(e.exit(t),n(o))}}function Ki(e,n,t,r,i,s){let l=0;return a;function a(f){return U(f)?(e.enter(r),o(f)):u(f)}function o(f){return U(f)&&l<s?(e.consume(f),l++,o):(e.exit(r),u(f))}function u(f){return l>=i?n(f):t(f)}}const Yo={tokenize:Ko};function Ko(e){const n=e.attempt(this.parser.constructs.contentInitial,r,i);let t;return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),q(e,n,"linePrefix")}function i(a){return e.enter("paragraph"),s(a)}function s(a){const o=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=o),t=o,l(a)}function l(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return F(a)?(e.consume(a),e.exit("chunkText"),s):(e.consume(a),l)}}let jt=class{constructor(){this.index=new Map,this.map=[]}add(n,t,r){Nr(this,n,t,r,!1)}addBefore(n,t,r){Nr(this,n,t,r,!0)}consume(n){if(this.map.sort(function(s,l){return s[0]-l[0]}),this.map.length===0)return;let t=this.map.length;const r=[];for(;t>0;)t-=1,r.push(n.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),n.length=this.map[t][0];r.push(n.slice()),n.length=0;let i=r.pop();for(;i;){for(const s of i)n.push(s);i=r.pop()}this.map.length=0,this.index.clear()}};function Nr(e,n,t,r,i){if(t===0&&r.length===0)return;const s=e.index.get(n);if(s){s[1]+=t,i?(r.push(...s[2]),s[2]=r):s[2].push(...r);return}const l=[n,t,r];e.map.push(l),e.index.set(n,l)}const Qo={tokenize:Zo},Ar={tokenize:eu};function Zo(e){const n=this,t=[];let r=0,i,s,l;return a;function a(E){if(r<t.length){const A=t[r];return n.containerState=A[1],e.attempt(A[0].continuation,o,u)(E)}return u(E)}function o(E){if(r++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,i&&N();const A=n.events.length;let j=A,k;for(;j--;)if(n.events[j][0]==="exit"&&n.events[j][1].type==="chunkFlow"){k=n.events[j][1].end;break}b(r);let P=A;for(;P<n.events.length;)n.events[P][1].end={...k},P++;const D=new jt;return D.add(j+1,0,n.events.slice(A)),D.add(A,P-A,[]),D.consume(n.events),u(E)}return a(E)}function u(E){if(r===t.length){if(!i)return d(E);if(i.currentConstruct&&i.currentConstruct.concrete)return m(E);n.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(Ar,f,h)(E)}function f(E){return i&&N(),b(r),d(E)}function h(E){return n.parser.lazy[n.now().line]=r!==t.length,l=n.now().offset,m(E)}function d(E){return n.containerState={},e.attempt(Ar,p,m)(E)}function p(E){return r++,t.push([n.currentConstruct,n.containerState]),d(E)}function m(E){if(E===null){i&&N(),b(0),e.consume(E);return}return i=i||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),w(E)}function w(E){if(E===null){C(e.exit("chunkFlow"),!0),b(0),e.consume(E);return}return F(E)?(e.consume(E),C(e.exit("chunkFlow")),r=0,n.interrupt=void 0,a):(e.consume(E),w)}function C(E,A){const j=n.sliceStream(E);if(A&&j.push(null),E.previous=s,s&&(s.next=E),s=E,i.defineSkip(E.start),i.write(j),n.parser.lazy[E.start.line]){let k=i.events.length;for(;k--;)if(i.events[k][1].start.offset<l&&(!i.events[k][1].end||i.events[k][1].end.offset>l))return;const P=n.events.length;let D=P,O,y;for(;D--;)if(n.events[D][0]==="exit"&&n.events[D][1].type==="chunkFlow"){if(O){y=n.events[D][1].end;break}O=!0}for(b(r),k=P;k<n.events.length;)n.events[k][1].end={...y},k++;const I=new jt;I.add(D+1,0,n.events.slice(P)),I.add(P,k-P,[]),I.consume(n.events)}}function b(E){let A=t.length;for(;A-- >E;){const j=t[A];n.containerState=j[1],j[0].exit.call(n,e)}t.length=E}function N(){i.write([null]),s=void 0,i=void 0,n.containerState._closeFlow=void 0}}function eu(e,n,t){return q(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function vt(e){if(e===null||J(e)||_e(e))return 1;if(Ft(e))return 2}function Ot(e,n,t){const r=[];let i=-1;for(;++i<e.length;){const s=e[i].resolveAll;s&&!r.includes(s)&&(n=s(n,t),r.push(s))}return n}const wn={name:"attention",resolveAll:tu,tokenize:nu};function tu(e,n){let t=-1,r;for(;++t<e.length;)if(e[t][0]==="enter"&&e[t][1].type==="attentionSequence"&&e[t][1]._close){let i=t;for(;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&n.sliceSerialize(e[i][1]).charCodeAt(0)===n.sliceSerialize(e[t][1]).charCodeAt(0)){if((e[i][1]._close||e[t][1]._open)&&(e[t][1].end.offset-e[t][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[t][1].end.offset-e[t][1].start.offset)%3))continue;const s=e[i][1].end.offset-e[i][1].start.offset>1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1,l={...e[i][1].end},a={...e[t][1].start};Ir(l,-s),Ir(a,s);const o={type:s>1?"strongSequence":"emphasisSequence",start:l,end:{...e[i][1].end}},u={type:s>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:a},f={type:s>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[t][1].start}},h={type:s>1?"strong":"emphasis",start:{...o.start},end:{...u.end}};e[i][1].end={...o.start},e[t][1].start={...u.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=he(r,[["enter",e[i][1],n],["exit",e[i][1],n]])),r=he(r,[["enter",h,n],["enter",o,n],["exit",o,n],["enter",f,n]]),r=he(r,Ot(n.parser.constructs.insideSpan.null,e.slice(i+1,t),n)),r=he(r,[["exit",f,n],["enter",u,n],["exit",u,n],["exit",h,n]]);let d=0;e[t][1].end.offset-e[t][1].start.offset&&(d=2,r=he(r,[["enter",e[t][1],n],["exit",e[t][1],n]])),xe(e,i-1,t-i+3,r),t=i+r.length-d-2;break}}for(t=-1;++t<e.length;)e[t][1].type==="attentionSequence"&&(e[t][1].type="data");return e}function nu(e,n){const t=this.parser.constructs.attentionMarkers.null,r=this.previous,i=vt(r);let s;return l;function l(o){return s=o,e.enter("attentionSequence"),a(o)}function a(o){if(o===s)return e.consume(o),a;const u=e.exit("attentionSequence"),f=vt(o),h=!f||f===2&&i||t.includes(o)&&o!==42&&o!==95,d=!i||i===2&&f||t.includes(r)&&r!==42&&r!==95;return u._open=!!(s===42?h:h&&(i||!d)),u._close=!!(s===42?d:d&&(f||!h)),n(o)}}function Ir(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const ru={name:"autolink",tokenize:iu};function iu(e,n,t){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(p){return le(p)?(e.consume(p),l):p===64?t(p):u(p)}function l(p){return p===43||p===45||p===46||te(p)?(r=1,a(p)):u(p)}function a(p){return p===58?(e.consume(p),r=0,o):(p===43||p===45||p===46||te(p))&&r++<32?(e.consume(p),a):(r=0,u(p))}function o(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),n):p===null||p===32||p===60||Ct(p)?t(p):(e.consume(p),o)}function u(p){return p===64?(e.consume(p),f):Jo(p)?(e.consume(p),u):t(p)}function f(p){return te(p)?h(p):t(p)}function h(p){return p===46?(e.consume(p),r=0,f):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),n):d(p)}function d(p){if((p===45||te(p))&&r++<63){const m=p===45?d:h;return e.consume(p),m}return t(p)}}const pt={partial:!0,tokenize:lu};function lu(e,n,t){return r;function r(s){return U(s)?q(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||F(s)?n(s):t(s)}}const Qi={continuation:{tokenize:au},exit:ou,name:"blockQuote",tokenize:su};function su(e,n,t){const r=this;return i;function i(l){if(l===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),s}return t(l)}function s(l){return U(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(l))}}function au(e,n,t){const r=this;return i;function i(l){return U(l)?q(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):s(l)}function s(l){return e.attempt(Qi,n,t)(l)}}function ou(e){e.exit("blockQuote")}const Zi={name:"characterEscape",tokenize:uu};function uu(e,n,t){return r;function r(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),i}function i(s){return Xo(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):t(s)}}const el={name:"characterReference",tokenize:cu};function cu(e,n,t){const r=this;let i=0,s,l;return a;function a(h){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),o}function o(h){return h===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(h),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),s=31,l=te,f(h))}function u(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,l=Go,f):(e.enter("characterReferenceValue"),s=7,l=kn,f(h))}function f(h){if(h===59&&i){const d=e.exit("characterReferenceValue");return l===te&&!Rn(r.sliceSerialize(d))?t(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return l(h)&&i++<s?(e.consume(h),f):t(h)}}const Sn={partial:!0,tokenize:fu};function fu(e,n,t){const r=this;return i;function i(l){return l===null?t(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),s)}function s(l){return r.parser.lazy[r.now().line]?t(l):n(l)}}const Tr={concrete:!0,name:"codeFenced",tokenize:hu};function hu(e,n,t){const r=this,i={partial:!0,tokenize:j};let s=0,l=0,a;return o;function o(k){return u(k)}function u(k){const P=r.events[r.events.length-1];return s=P&&P[1].type==="linePrefix"?P[2].sliceSerialize(P[1],!0).length:0,a=k,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(k)}function f(k){return k===a?(l++,e.consume(k),f):l<3?t(k):(e.exit("codeFencedFenceSequence"),U(k)?q(e,h,"whitespace")(k):h(k))}function h(k){return k===null||F(k)?(e.exit("codeFencedFence"),r.interrupt?n(k):e.check(Sn,w,A)(k)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),d(k))}function d(k){return k===null||F(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(k)):U(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),q(e,p,"whitespace")(k)):k===96&&k===a?t(k):(e.consume(k),d)}function p(k){return k===null||F(k)?h(k):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(k))}function m(k){return k===null||F(k)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(k)):k===96&&k===a?t(k):(e.consume(k),m)}function w(k){return e.attempt(i,A,C)(k)}function C(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),b}function b(k){return s>0&&U(k)?q(e,N,"linePrefix",s+1)(k):N(k)}function N(k){return k===null||F(k)?e.check(Sn,w,A)(k):(e.enter("codeFlowValue"),E(k))}function E(k){return k===null||F(k)?(e.exit("codeFlowValue"),N(k)):(e.consume(k),E)}function A(k){return e.exit("codeFenced"),n(k)}function j(k,P,D){let O=0;return y;function y(M){return k.enter("lineEnding"),k.consume(M),k.exit("lineEnding"),I}function I(M){return k.enter("codeFencedFence"),U(M)?q(k,L,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):L(M)}function L(M){return M===a?(k.enter("codeFencedFenceSequence"),R(M)):D(M)}function R(M){return M===a?(O++,k.consume(M),R):O>=l?(k.exit("codeFencedFenceSequence"),U(M)?q(k,_,"whitespace")(M):_(M)):D(M)}function _(M){return M===null||F(M)?(k.exit("codeFencedFence"),P(M)):D(M)}}}const Gt={name:"codeIndented",tokenize:du},pu={partial:!0,tokenize:mu};function du(e,n,t){return r;function r(a){return e.enter("codeIndented"),Ki(e,i,t,"linePrefix",4,4)(a)}function i(a){return a===null?l(a):F(a)?e.attempt(pu,i,l)(a):(e.enter("codeFlowValue"),s(a))}function s(a){return a===null||F(a)?(e.exit("codeFlowValue"),i(a)):(e.consume(a),s)}function l(a){return e.exit("codeIndented"),n(a)}}function mu(e,n,t){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?t(l):F(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):Ki(e,n,s,"linePrefix",4,4)(l)}function s(l){return F(l)?i(l):t(l)}}const gu={name:"codeText",previous:yu,resolve:xu,tokenize:bu};function xu(e){let n=e.length-4,t=3,r,i;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(r=t;++r<n;)if(e[r][1].type==="codeTextData"){e[t][1].type="codeTextPadding",e[n][1].type="codeTextPadding",t+=2,n-=2;break}}for(r=t-1,n++;++r<=n;)i===void 0?r!==n&&e[r][1].type!=="lineEnding"&&(i=r):(r===n||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),n-=r-i-2,r=i+2),i=void 0);return e}function yu(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function bu(e,n,t){let r=0,i,s;return l;function l(h){return e.enter("codeText"),e.enter("codeTextSequence"),a(h)}function a(h){return h===96?(e.consume(h),r++,a):(e.exit("codeTextSequence"),o(h))}function o(h){return h===null?t(h):h===32?(e.enter("space"),e.consume(h),e.exit("space"),o):h===96?(s=e.enter("codeTextSequence"),i=0,f(h)):F(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),o):(e.enter("codeTextData"),u(h))}function u(h){return h===null||h===32||h===96||F(h)?(e.exit("codeTextData"),o(h)):(e.consume(h),u)}function f(h){return h===96?(e.consume(h),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),n(h)):(s.type="codeTextData",u(h))}}class ku{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,t){const r=t??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(n,r):n>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(n,t,r){const i=t||0;this.setCursor(Math.trunc(n));const s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&it(this.left,r),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),it(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),it(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const t=this.left.splice(n,Number.POSITIVE_INFINITY);it(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);it(this.left,t.reverse())}}}function it(e,n){let t=0;if(n.length<1e4)e.push(...n);else for(;t<n.length;)e.push(...n.slice(t,t+1e4)),t+=1e4}function tl(e){const n={};let t=-1,r,i,s,l,a,o,u;const f=new ku(e);for(;++t<f.length;){for(;t in n;)t=n[t];if(r=f.get(t),t&&r[1].type==="chunkFlow"&&f.get(t-1)[1].type==="listItemPrefix"&&(o=r[1]._tokenizer.events,s=0,s<o.length&&o[s][1].type==="lineEndingBlank"&&(s+=2),s<o.length&&o[s][1].type==="content"))for(;++s<o.length&&o[s][1].type!=="content";)o[s][1].type==="chunkText"&&(o[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(n,wu(f,t)),t=n[t],u=!0);else if(r[1]._container){for(s=t,i=void 0;s--;)if(l=f.get(s),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),l[1].type="lineEnding",i=s);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},a=f.slice(i,t),a.unshift(r),f.splice(i,t-i+1,a))}}return xe(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!u}function wu(e,n){const t=e.get(n)[1],r=e.get(n)[2];let i=n-1;const s=[];let l=t._tokenizer;l||(l=r.parser[t.contentType](t.start),t._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const a=l.events,o=[],u={};let f,h,d=-1,p=t,m=0,w=0;const C=[w];for(;p;){for(;e.get(++i)[1]!==p;);s.push(i),p._tokenizer||(f=r.sliceStream(p),p.next||f.push(null),h&&l.defineSkip(p.start),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(f),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),h=p,p=p.next}for(p=t;++d<a.length;)a[d][0]==="exit"&&a[d-1][0]==="enter"&&a[d][1].type===a[d-1][1].type&&a[d][1].start.line!==a[d][1].end.line&&(w=d+1,C.push(w),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(l.events=[],p?(p._tokenizer=void 0,p.previous=void 0):C.pop(),d=C.length;d--;){const b=a.slice(C[d],C[d+1]),N=s.pop();o.push([N,N+b.length-1]),e.splice(N,2,b)}for(o.reverse(),d=-1;++d<o.length;)u[m+o[d][0]]=m+o[d][1],m+=o[d][1]-o[d][0]-1;return u}const Su={resolve:ju,tokenize:vu},Cu={partial:!0,tokenize:Eu};function ju(e){return tl(e),e}function vu(e,n){let t;return r;function r(a){return e.enter("content"),t=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?s(a):F(a)?e.check(Cu,l,s)(a):(e.consume(a),i)}function s(a){return e.exit("chunkContent"),e.exit("content"),n(a)}function l(a){return e.consume(a),e.exit("chunkContent"),t.next=e.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,i}}function Eu(e,n,t){const r=this;return i;function i(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),q(e,s,"linePrefix")}function s(l){if(l===null||F(l))return t(l);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?n(l):e.interrupt(r.parser.constructs.flow,t,n)(l)}}function nl(e,n,t,r,i,s,l,a,o){const u=o||Number.POSITIVE_INFINITY;let f=0;return h;function h(b){return b===60?(e.enter(r),e.enter(i),e.enter(s),e.consume(b),e.exit(s),d):b===null||b===32||b===41||Ct(b)?t(b):(e.enter(r),e.enter(l),e.enter(a),e.enter("chunkString",{contentType:"string"}),w(b))}function d(b){return b===62?(e.enter(s),e.consume(b),e.exit(s),e.exit(i),e.exit(r),n):(e.enter(a),e.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===62?(e.exit("chunkString"),e.exit(a),d(b)):b===null||b===60||F(b)?t(b):(e.consume(b),b===92?m:p)}function m(b){return b===60||b===62||b===92?(e.consume(b),p):p(b)}function w(b){return!f&&(b===null||b===41||J(b))?(e.exit("chunkString"),e.exit(a),e.exit(l),e.exit(r),n(b)):f<u&&b===40?(e.consume(b),f++,w):b===41?(e.consume(b),f--,w):b===null||b===32||b===40||Ct(b)?t(b):(e.consume(b),b===92?C:w)}function C(b){return b===40||b===41||b===92?(e.consume(b),w):w(b)}}function rl(e,n,t,r,i,s){const l=this;let a=0,o;return u;function u(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(s),f}function f(p){return a>999||p===null||p===91||p===93&&!o||p===94&&!a&&"_hiddenFootnoteSupport"in l.parser.constructs?t(p):p===93?(e.exit(s),e.enter(i),e.consume(p),e.exit(i),e.exit(r),n):F(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===null||p===91||p===93||F(p)||a++>999?(e.exit("chunkString"),f(p)):(e.consume(p),o||(o=!U(p)),p===92?d:h)}function d(p){return p===91||p===92||p===93?(e.consume(p),a++,h):h(p)}}function il(e,n,t,r,i,s){let l;return a;function a(d){return d===34||d===39||d===40?(e.enter(r),e.enter(i),e.consume(d),e.exit(i),l=d===40?41:d,o):t(d)}function o(d){return d===l?(e.enter(i),e.consume(d),e.exit(i),e.exit(r),n):(e.enter(s),u(d))}function u(d){return d===l?(e.exit(s),o(l)):d===null?t(d):F(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),q(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(d))}function f(d){return d===l||d===null||F(d)?(e.exit("chunkString"),u(d)):(e.consume(d),d===92?h:f)}function h(d){return d===l||d===92?(e.consume(d),f):f(d)}}function at(e,n){let t;return r;function r(i){return F(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t=!0,r):U(i)?q(e,r,t?"linePrefix":"lineSuffix")(i):n(i)}}const Nu={name:"definition",tokenize:Iu},Au={partial:!0,tokenize:Tu};function Iu(e,n,t){const r=this;let i;return s;function s(p){return e.enter("definition"),l(p)}function l(p){return rl.call(r,e,a,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function a(p){return i=ye(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),o):t(p)}function o(p){return J(p)?at(e,u)(p):u(p)}function u(p){return nl(e,f,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function f(p){return e.attempt(Au,h,h)(p)}function h(p){return U(p)?q(e,d,"whitespace")(p):d(p)}function d(p){return p===null||F(p)?(e.exit("definition"),r.parser.defined.push(i),n(p)):t(p)}}function Tu(e,n,t){return r;function r(a){return J(a)?at(e,i)(a):t(a)}function i(a){return il(e,s,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function s(a){return U(a)?q(e,l,"whitespace")(a):l(a)}function l(a){return a===null||F(a)?n(a):t(a)}}const Pu={name:"hardBreakEscape",tokenize:zu};function zu(e,n,t){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return F(s)?(e.exit("hardBreakEscape"),n(s)):t(s)}}const Lu={name:"headingAtx",resolve:Du,tokenize:Mu};function Du(e,n){let t=e.length-2,r=3;if(e[r][1].type==="whitespace"&&(r+=2),t-2>r&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&e[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r){const i={type:"atxHeadingText",start:e[r][1].start,end:e[t][1].end},s={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"};xe(e,r,t-r+1,[["enter",i,n],["enter",s,n],["exit",s,n],["exit",i,n]])}return e}function Mu(e,n,t){let r=0;return i;function i(f){return e.enter("atxHeading"),s(f)}function s(f){return e.enter("atxHeadingSequence"),l(f)}function l(f){return f===35&&r++<6?(e.consume(f),l):f===null||J(f)?(e.exit("atxHeadingSequence"),a(f)):t(f)}function a(f){return f===35?(e.enter("atxHeadingSequence"),o(f)):f===null||F(f)?(e.exit("atxHeading"),n(f)):U(f)?q(e,a,"whitespace")(f):(e.enter("atxHeadingText"),u(f))}function o(f){return f===35?(e.consume(f),o):(e.exit("atxHeadingSequence"),a(f))}function u(f){return f===null||f===35||J(f)?(e.exit("atxHeadingText"),a(f)):(e.consume(f),u)}}const _u=["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"],Pr=["pre","script","style","textarea"],Fu={concrete:!0,name:"htmlFlow",resolveTo:Ru,tokenize:Bu},Ou={partial:!0,tokenize:$u};function Ru(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function Bu(e,n,t){const r=this;let i,s,l,a,o;return u;function u(x){return f(x)}function f(x){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(x),h}function h(x){return x===33?(e.consume(x),d):x===47?(e.consume(x),s=!0,w):x===63?(e.consume(x),i=3,r.interrupt?n:g):le(x)?(e.consume(x),l=String.fromCharCode(x),C):t(x)}function d(x){return x===45?(e.consume(x),i=2,p):x===91?(e.consume(x),i=5,a=0,m):le(x)?(e.consume(x),i=4,r.interrupt?n:g):t(x)}function p(x){return x===45?(e.consume(x),r.interrupt?n:g):t(x)}function m(x){const ge="CDATA[";return x===ge.charCodeAt(a++)?(e.consume(x),a===ge.length?r.interrupt?n:L:m):t(x)}function w(x){return le(x)?(e.consume(x),l=String.fromCharCode(x),C):t(x)}function C(x){if(x===null||x===47||x===62||J(x)){const ge=x===47,Oe=l.toLowerCase();return!ge&&!s&&Pr.includes(Oe)?(i=1,r.interrupt?n(x):L(x)):_u.includes(l.toLowerCase())?(i=6,ge?(e.consume(x),b):r.interrupt?n(x):L(x)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(x):s?N(x):E(x))}return x===45||te(x)?(e.consume(x),l+=String.fromCharCode(x),C):t(x)}function b(x){return x===62?(e.consume(x),r.interrupt?n:L):t(x)}function N(x){return U(x)?(e.consume(x),N):y(x)}function E(x){return x===47?(e.consume(x),y):x===58||x===95||le(x)?(e.consume(x),A):U(x)?(e.consume(x),E):y(x)}function A(x){return x===45||x===46||x===58||x===95||te(x)?(e.consume(x),A):j(x)}function j(x){return x===61?(e.consume(x),k):U(x)?(e.consume(x),j):E(x)}function k(x){return x===null||x===60||x===61||x===62||x===96?t(x):x===34||x===39?(e.consume(x),o=x,P):U(x)?(e.consume(x),k):D(x)}function P(x){return x===o?(e.consume(x),o=null,O):x===null||F(x)?t(x):(e.consume(x),P)}function D(x){return x===null||x===34||x===39||x===47||x===60||x===61||x===62||x===96||J(x)?j(x):(e.consume(x),D)}function O(x){return x===47||x===62||U(x)?E(x):t(x)}function y(x){return x===62?(e.consume(x),I):t(x)}function I(x){return x===null||F(x)?L(x):U(x)?(e.consume(x),I):t(x)}function L(x){return x===45&&i===2?(e.consume(x),V):x===60&&i===1?(e.consume(x),Q):x===62&&i===4?(e.consume(x),me):x===63&&i===3?(e.consume(x),g):x===93&&i===5?(e.consume(x),Se):F(x)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Ou,Ce,R)(x)):x===null||F(x)?(e.exit("htmlFlowData"),R(x)):(e.consume(x),L)}function R(x){return e.check(Sn,_,Ce)(x)}function _(x){return e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),M}function M(x){return x===null||F(x)?R(x):(e.enter("htmlFlowData"),L(x))}function V(x){return x===45?(e.consume(x),g):L(x)}function Q(x){return x===47?(e.consume(x),l="",de):L(x)}function de(x){if(x===62){const ge=l.toLowerCase();return Pr.includes(ge)?(e.consume(x),me):L(x)}return le(x)&&l.length<8?(e.consume(x),l+=String.fromCharCode(x),de):L(x)}function Se(x){return x===93?(e.consume(x),g):L(x)}function g(x){return x===62?(e.consume(x),me):x===45&&i===2?(e.consume(x),g):L(x)}function me(x){return x===null||F(x)?(e.exit("htmlFlowData"),Ce(x)):(e.consume(x),me)}function Ce(x){return e.exit("htmlFlow"),n(x)}}function $u(e,n,t){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(pt,n,t)}}const Hu={name:"htmlText",tokenize:Uu};function Uu(e,n,t){const r=this;let i,s,l;return a;function a(g){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(g),o}function o(g){return g===33?(e.consume(g),u):g===47?(e.consume(g),j):g===63?(e.consume(g),E):le(g)?(e.consume(g),D):t(g)}function u(g){return g===45?(e.consume(g),f):g===91?(e.consume(g),s=0,m):le(g)?(e.consume(g),N):t(g)}function f(g){return g===45?(e.consume(g),p):t(g)}function h(g){return g===null?t(g):g===45?(e.consume(g),d):F(g)?(l=h,Q(g)):(e.consume(g),h)}function d(g){return g===45?(e.consume(g),p):h(g)}function p(g){return g===62?V(g):g===45?d(g):h(g)}function m(g){const me="CDATA[";return g===me.charCodeAt(s++)?(e.consume(g),s===me.length?w:m):t(g)}function w(g){return g===null?t(g):g===93?(e.consume(g),C):F(g)?(l=w,Q(g)):(e.consume(g),w)}function C(g){return g===93?(e.consume(g),b):w(g)}function b(g){return g===62?V(g):g===93?(e.consume(g),b):w(g)}function N(g){return g===null||g===62?V(g):F(g)?(l=N,Q(g)):(e.consume(g),N)}function E(g){return g===null?t(g):g===63?(e.consume(g),A):F(g)?(l=E,Q(g)):(e.consume(g),E)}function A(g){return g===62?V(g):E(g)}function j(g){return le(g)?(e.consume(g),k):t(g)}function k(g){return g===45||te(g)?(e.consume(g),k):P(g)}function P(g){return F(g)?(l=P,Q(g)):U(g)?(e.consume(g),P):V(g)}function D(g){return g===45||te(g)?(e.consume(g),D):g===47||g===62||J(g)?O(g):t(g)}function O(g){return g===47?(e.consume(g),V):g===58||g===95||le(g)?(e.consume(g),y):F(g)?(l=O,Q(g)):U(g)?(e.consume(g),O):V(g)}function y(g){return g===45||g===46||g===58||g===95||te(g)?(e.consume(g),y):I(g)}function I(g){return g===61?(e.consume(g),L):F(g)?(l=I,Q(g)):U(g)?(e.consume(g),I):O(g)}function L(g){return g===null||g===60||g===61||g===62||g===96?t(g):g===34||g===39?(e.consume(g),i=g,R):F(g)?(l=L,Q(g)):U(g)?(e.consume(g),L):(e.consume(g),_)}function R(g){return g===i?(e.consume(g),i=void 0,M):g===null?t(g):F(g)?(l=R,Q(g)):(e.consume(g),R)}function _(g){return g===null||g===34||g===39||g===60||g===61||g===96?t(g):g===47||g===62||J(g)?O(g):(e.consume(g),_)}function M(g){return g===47||g===62||J(g)?O(g):t(g)}function V(g){return g===62?(e.consume(g),e.exit("htmlTextData"),e.exit("htmlText"),n):t(g)}function Q(g){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),de}function de(g){return U(g)?q(e,Se,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(g):Se(g)}function Se(g){return e.enter("htmlTextData"),l(g)}}const Bn={name:"labelEnd",resolveAll:Ju,resolveTo:Gu,tokenize:Xu},qu={tokenize:Yu},Vu={tokenize:Ku},Wu={tokenize:Qu};function Ju(e){let n=-1;const t=[];for(;++n<e.length;){const r=e[n][1];if(t.push(e[n]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",n+=i}}return e.length!==t.length&&xe(e,0,e.length,t),e}function Gu(e,n){let t=e.length,r=0,i,s,l;for(;t--;){const f=e[t][1];if(i){if(f.type==="link"||f.type==="labelLink"&&f._inactive)break;e[t][0]==="enter"&&f.type==="labelLink"&&(f._inactive=!0)}else if(s){if(e[t][0]==="enter"&&(f.type==="labelImage"||f.type==="labelLink")&&!f._balanced&&(i=t,f.type!=="labelLink")){r=2;break}}else f.type==="labelEnd"&&(s=t)}const a={type:e[i][1].type==="labelLink"?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},o={type:"label",start:{...e[i][1].start},end:{...e[s][1].end}},u={type:"labelText",start:{...e[i+r+2][1].end},end:{...e[s-2][1].start}};return l=[["enter",a,n],["enter",o,n]],l=he(l,e.slice(i+1,i+r+3)),l=he(l,[["enter",u,n]]),l=he(l,Ot(n.parser.constructs.insideSpan.null,e.slice(i+r+4,s-3),n)),l=he(l,[["exit",u,n],e[s-2],e[s-1],["exit",o,n]]),l=he(l,e.slice(s+1)),l=he(l,[["exit",a,n]]),xe(e,i,e.length,l),e}function Xu(e,n,t){const r=this,i=r._labelStarts;let s,l;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();s=i[i.length-1]}return a;function a(d){return s?s._inactive?h(d):(l=r.parser.defined.includes(ye(r.sliceSerialize({start:s.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelEnd"),o):t(d)}function o(d){return d===40?e.attempt(qu,f,l?f:h)(d):d===91?e.attempt(Vu,f,l?u:h)(d):l?f(d):h(d)}function u(d){return e.attempt(Wu,f,h)(d)}function f(d){return i.pop(),n(d)}function h(d){return s._balanced=!0,t(d)}}function Yu(e,n,t){return r;function r(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),i}function i(h){return J(h)?at(e,s)(h):s(h)}function s(h){return h===41?f(h):nl(e,l,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function l(h){return J(h)?at(e,o)(h):f(h)}function a(h){return t(h)}function o(h){return h===34||h===39||h===40?il(e,u,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):f(h)}function u(h){return J(h)?at(e,f)(h):f(h)}function f(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),n):t(h)}}function Ku(e,n,t){const r=this;return i;function i(a){return rl.call(r,e,s,l,"reference","referenceMarker","referenceString")(a)}function s(a){return r.parser.defined.includes(ye(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?n(a):t(a)}function l(a){return t(a)}}function Qu(e,n,t){return r;function r(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),i}function i(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),n):t(s)}}const Zu={name:"labelStartImage",resolveAll:Bn.resolveAll,tokenize:ec};function ec(e,n,t){const r=this;let i;return s;function s(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),l}function l(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),i=e.exit("labelImage"),a):t(o)}function a(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(o):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),n(o))}}const tc={name:"labelStartLink",resolveAll:Bn.resolveAll,tokenize:nc};function nc(e,n,t){const r=this;let i;return s;function s(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),i=e.exit("labelLink"),l}function l(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(a):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),n(a))}}const Xt={name:"lineEnding",tokenize:rc};function rc(e,n){return t;function t(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),q(e,n,"linePrefix")}}const bt={name:"thematicBreak",tokenize:ic};function ic(e,n,t){let r=0,i;return s;function s(u){return e.enter("thematicBreak"),l(u)}function l(u){return i=u,a(u)}function a(u){return u===i?(e.enter("thematicBreakSequence"),o(u)):r>=3&&(u===null||F(u))?(e.exit("thematicBreak"),n(u)):t(u)}function o(u){return u===i?(e.consume(u),r++,o):(e.exit("thematicBreakSequence"),U(u)?q(e,a,"whitespace")(u):a(u))}}const oe={continuation:{tokenize:oc},exit:cc,name:"list",tokenize:ac},lc={partial:!0,tokenize:fc},sc={partial:!0,tokenize:uc};function ac(e,n,t){const r=this,i=r.events[r.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return a;function a(p){const m=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:kn(p)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(bt,t,u)(p):u(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),o(p)}return t(p)}function o(p){return kn(p)&&++l<10?(e.consume(p),o):(!r.interrupt||l<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),u(p)):t(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(pt,r.interrupt?t:f,e.attempt(lc,d,h))}function f(p){return r.containerState.initialBlankLine=!0,s++,d(p)}function h(p){return U(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),d):t(p)}function d(p){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(p)}}function oc(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(pt,i,s);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,q(e,n,"listItemIndent",r.containerState.size+1)(a)}function s(a){return r.containerState.furtherBlankLines||!U(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(sc,n,l)(a))}function l(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,q(e,e.attempt(oe,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function uc(e,n,t){const r=this;return q(e,i,"listItemIndent",r.containerState.size+1);function i(s){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?n(s):t(s)}}function cc(e){e.exit(this.containerState.type)}function fc(e,n,t){const r=this;return q(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const l=r.events[r.events.length-1];return!U(s)&&l&&l[1].type==="listItemPrefixWhitespace"?n(s):t(s)}}const zr={name:"setextUnderline",resolveTo:hc,tokenize:pc};function hc(e,n){const t=new jt;let r=e.length,i,s,l;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){i=r;break}e[r][1].type==="paragraph"&&(s=r)}else e[r][1].type==="content"&&t.add(r,1,[]),!l&&e[r][1].type==="definition"&&(l=r);const a={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",l?(t.add(s,0,[["enter",a,n]]),t.add(l+1,0,[["exit",e[i][1],n]]),e[i][1].end={...e[l][1].end}):e[i][1]=a,t.add(e.length,0,[["exit",a,n]]),t.consume(e),e}function pc(e,n,t){const r=this;let i;return s;function s(u){let f=r.events.length,h;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){h=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||h)?(e.enter("setextHeadingLine"),i=u,l(u)):t(u)}function l(u){return e.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===i?(e.consume(u),a):(e.exit("setextHeadingLineSequence"),U(u)?q(e,o,"lineSuffix")(u):o(u))}function o(u){return u===null||F(u)?(e.exit("setextHeadingLine"),n(u)):t(u)}}const dc={tokenize:mc};function mc(e){const n=this,t=e.attempt(pt,r,e.attempt(this.parser.constructs.flowInitial,i,q(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Su,i)),"linePrefix")));return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function i(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const gc={resolveAll:sl()},xc=ll("string"),yc=ll("text");function ll(e){return{resolveAll:sl(e==="text"?bc:void 0),tokenize:n};function n(t){const r=this,i=this.parser.constructs[e],s=t.attempt(i,l,a);return l;function l(f){return u(f)?s(f):a(f)}function a(f){if(f===null){t.consume(f);return}return t.enter("data"),t.consume(f),o}function o(f){return u(f)?(t.exit("data"),s(f)):(t.consume(f),o)}function u(f){if(f===null)return!0;const h=i[f];let d=-1;if(h)for(;++d<h.length;){const p=h[d];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function sl(e){return n;function n(t,r){let i=-1,s;for(;++i<=t.length;)s===void 0?t[i]&&t[i][1].type==="data"&&(s=i,i++):(!t[i]||t[i][1].type!=="data")&&(i!==s+2&&(t[s][1].end=t[i-1][1].end,t.splice(s+2,i-s-2),i=s+2),s=void 0);return e?e(t,r):t}}function bc(e,n){const t=new jt;let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const i=e[r-1][1],s=n.sliceStream(i);let l=s.length,a=-1,o=0,u;for(;l--;){const f=s[l];if(typeof f=="string"){for(a=f.length;f.charCodeAt(a-1)===32;)o++,a--;if(a)break;a=-1}else if(f===-2)u=!0,o++;else if(f!==-1){l++;break}}if(n._contentTypeTextTrailing&&r===e.length&&(o=0),o){const f={type:r===e.length||u||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?a:i.start._bufferIndex+a,_index:i.start._index+l,line:i.end.line,column:i.end.column-o,offset:i.end.offset-o},end:{...i.end}};i.end={...f.start},i.start.offset===i.end.offset?Object.assign(i,f):t.add(r,0,[["enter",f,n],["exit",f,n]])}r++}return t.consume(e),e}const kc={42:oe,43:oe,45:oe,48:oe,49:oe,50:oe,51:oe,52:oe,53:oe,54:oe,55:oe,56:oe,57:oe,62:Qi},wc={91:Nu},Sc={[-2]:Gt,[-1]:Gt,32:Gt},Cc={35:Lu,42:bt,45:[zr,bt],60:Fu,61:zr,95:bt,96:Tr,126:Tr},jc={38:el,92:Zi},vc={[-5]:Xt,[-4]:Xt,[-3]:Xt,33:Zu,38:el,42:wn,60:[ru,Hu],91:tc,92:[Pu,Zi],93:Bn,95:wn,96:gu},Ec={null:[wn,gc]},Nc={null:[42,95]},Ac={null:[]},Ic=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Nc,contentInitial:wc,disable:Ac,document:kc,flow:Cc,flowInitial:Sc,insideSpan:Ec,string:jc,text:vc},Symbol.toStringTag,{value:"Module"}));function Tc(e,n,t){let r={_bufferIndex:-1,_index:0,line:t&&t.line||1,column:t&&t.column||1,offset:t&&t.offset||0};const i={},s=[];let l=[],a=[];const o={attempt:P(j),check:P(k),consume:N,enter:E,exit:A,interrupt:P(k,{interrupt:!0})},u={code:null,containerState:{},defineSkip:w,events:[],now:m,parser:e,previous:null,sliceSerialize:d,sliceStream:p,write:h};let f=n.tokenize.call(u,o);return n.resolveAll&&s.push(n),u;function h(I){return l=he(l,I),C(),l[l.length-1]!==null?[]:(D(n,0),u.events=Ot(s,u.events,u),u.events)}function d(I,L){return zc(p(I),L)}function p(I){return Pc(l,I)}function m(){const{_bufferIndex:I,_index:L,line:R,column:_,offset:M}=r;return{_bufferIndex:I,_index:L,line:R,column:_,offset:M}}function w(I){i[I.line]=I.column,y()}function C(){for(;r._index<l.length;){const I=l[r._index];if(typeof I=="string"){const L=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===L&&r._bufferIndex<I.length;)b(I.charCodeAt(r._bufferIndex))}else b(I)}}function b(I){f=f(I)}function N(I){F(I)?(r.line++,r.column=1,r.offset+=I===-3?2:1,y()):I!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=I}function E(I,L){const R=L||{};return R.type=I,R.start=m(),u.events.push(["enter",R,u]),a.push(R),R}function A(I){const L=a.pop();return L.end=m(),u.events.push(["exit",L,u]),L}function j(I,L){D(I,L.from)}function k(I,L){L.restore()}function P(I,L){return R;function R(_,M,V){let Q,de,Se,g;return Array.isArray(_)?Ce(_):"tokenize"in _?Ce([_]):me(_);function me(Z){return Qe;function Qe(Ee){const Re=Ee!==null&&Z[Ee],Be=Ee!==null&&Z.null,Ht=[...Array.isArray(Re)?Re:Re?[Re]:[],...Array.isArray(Be)?Be:Be?[Be]:[]];return Ce(Ht)(Ee)}}function Ce(Z){return Q=Z,de=0,Z.length===0?V:x(Z[de])}function x(Z){return Qe;function Qe(Ee){return g=O(),Se=Z,Z.partial||(u.currentConstruct=Z),Z.name&&u.parser.constructs.disable.null.includes(Z.name)?Oe():Z.tokenize.call(L?Object.assign(Object.create(u),L):u,o,ge,Oe)(Ee)}}function ge(Z){return I(Se,g),M}function Oe(Z){return g.restore(),++de<Q.length?x(Q[de]):V}}}function D(I,L){I.resolveAll&&!s.includes(I)&&s.push(I),I.resolve&&xe(u.events,L,u.events.length-L,I.resolve(u.events.slice(L),u)),I.resolveTo&&(u.events=I.resolveTo(u.events,u))}function O(){const I=m(),L=u.previous,R=u.currentConstruct,_=u.events.length,M=Array.from(a);return{from:_,restore:V};function V(){r=I,u.previous=L,u.currentConstruct=R,u.events.length=_,a=M,y()}}function y(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Pc(e,n){const t=n.start._index,r=n.start._bufferIndex,i=n.end._index,s=n.end._bufferIndex;let l;if(t===i)l=[e[t].slice(r,s)];else{if(l=e.slice(t,i),r>-1){const a=l[0];typeof a=="string"?l[0]=a.slice(r):l.shift()}s>0&&l.push(e[i].slice(0,s))}return l}function zc(e,n){let t=-1;const r=[];let i;for(;++t<e.length;){const s=e[t];let l;if(typeof s=="string")l=s;else switch(s){case-5:{l="\r";break}case-4:{l=`
|
|
4
|
+
`;break}case-3:{l=`\r
|
|
5
|
+
`;break}case-2:{l=n?" ":" ";break}case-1:{if(!n&&i)continue;l=" ";break}default:l=String.fromCharCode(s)}i=s===-2,r.push(l)}return r.join("")}function Lc(e){const r={constructs:Xi([Ic,...(e||{}).extensions||[]]),content:i(Yo),defined:[],document:i(Qo),flow:i(dc),lazy:{},string:i(xc),text:i(yc)};return r;function i(s){return l;function l(a){return Tc(r,s,a)}}}function Dc(e){for(;!tl(e););return e}const Lr=/[\0\t\n\r]/g;function Mc(){let e=1,n="",t=!0,r;return i;function i(s,l,a){s=n+(typeof s=="string"?s.toString():new TextDecoder(l||void 0).decode(s));const o=[];let u=0;for(n="",t&&(s.charCodeAt(0)===65279&&u++,t=void 0);u<s.length;){Lr.lastIndex=u;const f=Lr.exec(s),h=f&&f.index!==void 0?f.index:s.length,d=s.charCodeAt(h);if(!f){n=s.slice(u);break}if(d===10&&u===h&&r)o.push(-3),r=void 0;else switch(r&&(o.push(-5),r=void 0),u<h&&(o.push(s.slice(u,h)),e+=h-u),d){case 0:{o.push(65533),e++;break}case 9:{const p=Math.ceil(e/4)*4;for(o.push(-2);e++<p;)o.push(-1);break}case 10:{o.push(-4),e=1;break}default:r=!0,e=1}u=h+1}return a&&(r&&o.push(-5),n&&o.push(n),o.push(null)),o}}const _c=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Fc(e){return e.replace(_c,Oc)}function Oc(e,n,t){if(n)return n;if(t.charCodeAt(0)===35){const i=t.charCodeAt(1),s=i===120||i===88;return Yi(t.slice(s?2:1),s?16:10)}return Rn(t)||e}const al={}.hasOwnProperty;function Rc(e,n,t){return n&&typeof n=="object"&&(t=n,n=void 0),Bc(t)(Dc(Lc(t).document().write(Mc()(e,n,!0))))}function Bc(e){const n={afterExit:[],beforeEnter:[],transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(rr),autolinkProtocol:y,autolinkEmail:y,atxHeading:l(er),blockQuote:l(Ht),characterEscape:y,characterReference:y,codeFenced:l(Zn),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:l(Zn,a),codeText:l(Bl,a),codeTextData:y,data:y,codeFlowValue:y,definition:l($l),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:l(Hl),hardBreakEscape:l(tr),hardBreakTrailing:l(tr),htmlFlow:l(nr,a),htmlFlowData:y,htmlText:l(nr,a),htmlTextData:y,image:l(Ul),label:a,link:l(rr),listItem:l(ql),listItemValue:p,listOrdered:l(ir,d),listUnordered:l(ir),paragraph:l(Vl),reference:ge,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:l(er),strong:l(Wl),thematicBreak:l(Gl)},exit:{atxHeading:u(),atxHeadingSequence:k,autolink:u(),autolinkEmail:Be,autolinkProtocol:Re,blockQuote:u(),characterEscapeValue:I,characterReferenceMarkerHexadecimal:Z,characterReferenceMarkerNumeric:Z,characterReferenceValue:Qe,characterReference:Ee,codeFenced:u(b),codeFencedFence:C,codeFencedFenceInfo:m,codeFencedFenceMeta:w,codeFlowValue:I,codeIndented:u(N),codeText:u(V),codeTextData:I,data:I,definition:u(),definitionDestinationString:j,definitionLabelString:E,definitionTitleString:A,emphasis:u(),hardBreakEscape:u(R),hardBreakTrailing:u(R),htmlFlow:u(_),htmlFlowData:I,htmlText:u(M),htmlTextData:I,image:u(de),label:g,labelText:Se,lineEnding:L,link:u(Q),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:Oe,resourceDestinationString:me,resourceTitleString:Ce,resource:x,setextHeading:u(O),setextHeadingLineSequence:D,setextHeadingText:P,strong:u(),thematicBreak:u()}};ol(n,(e||{}).mdastExtensions||[]);const t={};return r;function r(S){let z={type:"root",children:[],position:void 0};const $={stack:[z],tokenStack:[],config:n,enter:o,exit:f,buffer:a,resume:h,data:t},H=[],se=[];let G=-1;for(;++G<S.length;)if(se.push(S[G]),S[G][1].type==="listOrdered"||S[G][1].type==="listUnordered")if(S[G][0]==="enter")H.push(se.length-1);else{const ae=H.pop();s(se,ae)}for(S=se,G=-1;++G<S.length;){const ae=n[S[G][0]];S[G][0]==="enter"&&n.beforeEnter.length>0&&i(n.beforeEnter,{...$,sliceSerialize:S[G][2].sliceSerialize},S[G][1]),al.call(ae,S[G][1].type)&&ae[S[G][1].type].call({...$,sliceSerialize:S[G][2].sliceSerialize},S[G][1]),S[G][0]==="exit"&&n.afterExit.length>0&&i(n.afterExit,{...$,sliceSerialize:S[G][2].sliceSerialize},S[G][1])}if($.tokenStack.length>0){const ae=$.tokenStack[$.tokenStack.length-1];(ae[1]||Dr).call($,void 0,ae[0])}for(z.position={start:Ne(S.length>0?S[0][1].start:{line:1,column:1,offset:0}),end:Ne(S.length>0?S[S.length-2][1].end:{line:1,column:1,offset:0})},G=-1;++G<n.transforms.length;)z=n.transforms[G](z)||z;return z}function i(S,z,$){let H=-1;for(;++H<S.length;)S[H].call(z,$)}function s(S,z){const $=S.length-1;let H=z-1,se=-1,G=!1,ae,be,Ze,et;const tt=[];for(;++H<=$;){const ce=S[H];switch(ce[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ce[0]==="enter"?se++:se--,et=void 0;break}case"lineEndingBlank":{ce[0]==="enter"&&(ae&&!et&&!se&&!Ze&&(Ze=H),et=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:et=void 0}if(!se&&ce[0]==="enter"&&ce[1].type==="listItemPrefix"||se===-1&&ce[0]==="exit"&&(ce[1].type==="listUnordered"||ce[1].type==="listOrdered")){if(ae){let $e=H;for(be=void 0;$e--;){const je=S[$e];if(je[1].type==="lineEnding"||je[1].type==="lineEndingBlank"){if(je[0]==="exit")continue;be&&(S[be][1].type="lineEndingBlank",G=!0),je[1].type="lineEnding",be=$e}else if(!(je[1].type==="linePrefix"||je[1].type==="blockQuotePrefix"||je[1].type==="blockQuotePrefixWhitespace"||je[1].type==="blockQuoteMarker"||je[1].type==="listItemIndent"))break}Ze&&(!be||Ze<be)&&(ae._spread=!0),ae.end=Object.assign({},be?S[be][1].start:ce[1].end),tt.push({at:be||H,event:["exit",ae,ce[2]]})}if(ce[1].type==="listItemPrefix"){const $e={type:"listItem",_spread:!1,start:Object.assign({},ce[1].start),end:void 0};ae=$e,tt.push({at:H,event:["enter",$e,ce[2]]}),Ze=void 0,et=!0}}}const lr=S.splice(z);let Ut=0;for(H=-1;++H<lr.length;){for(;Ut<tt.length&&tt[Ut].at===z+H;)S.push(tt[Ut++].event);S.push(lr[H])}S[z][1]._spread=G}function l(S,z){return $;function $(H){o.call(this,S(H),H),z&&z.call(this,H)}}function a(){this.stack.push({type:"fragment",children:[]})}function o(S,z,$){this.stack[this.stack.length-1].children.push(S),this.stack.push(S),this.tokenStack.push([z,$||void 0]),S.position={start:Ne(z.start),end:void 0}}function u(S){return z;function z($){S&&S.call(this,$),f.call(this,$)}}function f(S,z){const $=this.stack.pop(),H=this.tokenStack.pop();if(!H)throw new Error("Cannot close `"+S.type+"` ("+st({start:S.start,end:S.end})+"): it’s not open");H[0].type!==S.type&&(z?z.call(this,S,H[0]):(H[1]||Dr).call(this,S,H[0])),$.position.end=Ne(S.end)}function h(){return On(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function p(S){if(this.data.expectingFirstListItemValue){const z=this.stack[this.stack.length-2];z.start=Number.parseInt(this.sliceSerialize(S),10),this.data.expectingFirstListItemValue=void 0}}function m(){const S=this.resume(),z=this.stack[this.stack.length-1];z.lang=S}function w(){const S=this.resume(),z=this.stack[this.stack.length-1];z.meta=S}function C(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function b(){const S=this.resume(),z=this.stack[this.stack.length-1];z.value=S.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function N(){const S=this.resume(),z=this.stack[this.stack.length-1];z.value=S.replace(/(\r?\n|\r)$/g,"")}function E(S){const z=this.resume(),$=this.stack[this.stack.length-1];$.label=z,$.identifier=ye(this.sliceSerialize(S)).toLowerCase()}function A(){const S=this.resume(),z=this.stack[this.stack.length-1];z.title=S}function j(){const S=this.resume(),z=this.stack[this.stack.length-1];z.url=S}function k(S){const z=this.stack[this.stack.length-1];if(!z.depth){const $=this.sliceSerialize(S).length;z.depth=$}}function P(){this.data.setextHeadingSlurpLineEnding=!0}function D(S){const z=this.stack[this.stack.length-1];z.depth=this.sliceSerialize(S).codePointAt(0)===61?1:2}function O(){this.data.setextHeadingSlurpLineEnding=void 0}function y(S){const $=this.stack[this.stack.length-1].children;let H=$[$.length-1];(!H||H.type!=="text")&&(H=Jl(),H.position={start:Ne(S.start),end:void 0},$.push(H)),this.stack.push(H)}function I(S){const z=this.stack.pop();z.value+=this.sliceSerialize(S),z.position.end=Ne(S.end)}function L(S){const z=this.stack[this.stack.length-1];if(this.data.atHardBreak){const $=z.children[z.children.length-1];$.position.end=Ne(S.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(z.type)&&(y.call(this,S),I.call(this,S))}function R(){this.data.atHardBreak=!0}function _(){const S=this.resume(),z=this.stack[this.stack.length-1];z.value=S}function M(){const S=this.resume(),z=this.stack[this.stack.length-1];z.value=S}function V(){const S=this.resume(),z=this.stack[this.stack.length-1];z.value=S}function Q(){const S=this.stack[this.stack.length-1];if(this.data.inReference){const z=this.data.referenceType||"shortcut";S.type+="Reference",S.referenceType=z,delete S.url,delete S.title}else delete S.identifier,delete S.label;this.data.referenceType=void 0}function de(){const S=this.stack[this.stack.length-1];if(this.data.inReference){const z=this.data.referenceType||"shortcut";S.type+="Reference",S.referenceType=z,delete S.url,delete S.title}else delete S.identifier,delete S.label;this.data.referenceType=void 0}function Se(S){const z=this.sliceSerialize(S),$=this.stack[this.stack.length-2];$.label=Fc(z),$.identifier=ye(z).toLowerCase()}function g(){const S=this.stack[this.stack.length-1],z=this.resume(),$=this.stack[this.stack.length-1];if(this.data.inReference=!0,$.type==="link"){const H=S.children;$.children=H}else $.alt=z}function me(){const S=this.resume(),z=this.stack[this.stack.length-1];z.url=S}function Ce(){const S=this.resume(),z=this.stack[this.stack.length-1];z.title=S}function x(){this.data.inReference=void 0}function ge(){this.data.referenceType="collapsed"}function Oe(S){const z=this.resume(),$=this.stack[this.stack.length-1];$.label=z,$.identifier=ye(this.sliceSerialize(S)).toLowerCase(),this.data.referenceType="full"}function Z(S){this.data.characterReferenceType=S.type}function Qe(S){const z=this.sliceSerialize(S),$=this.data.characterReferenceType;let H;$?(H=Yi(z,$==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):H=Rn(z);const se=this.stack[this.stack.length-1];se.value+=H}function Ee(S){const z=this.stack.pop();z.position.end=Ne(S.end)}function Re(S){I.call(this,S);const z=this.stack[this.stack.length-1];z.url=this.sliceSerialize(S)}function Be(S){I.call(this,S);const z=this.stack[this.stack.length-1];z.url="mailto:"+this.sliceSerialize(S)}function Ht(){return{type:"blockquote",children:[],position:void 0}}function Zn(){return{type:"code",lang:null,meta:null,value:"",position:void 0}}function Bl(){return{type:"inlineCode",value:"",position:void 0}}function $l(){return{type:"definition",identifier:"",label:null,title:null,url:"",position:void 0}}function Hl(){return{type:"emphasis",children:[],position:void 0}}function er(){return{type:"heading",depth:0,children:[],position:void 0}}function tr(){return{type:"break",position:void 0}}function nr(){return{type:"html",value:"",position:void 0}}function Ul(){return{type:"image",title:null,url:"",alt:null,position:void 0}}function rr(){return{type:"link",title:null,url:"",children:[],position:void 0}}function ir(S){return{type:"list",ordered:S.type==="listOrdered",start:null,spread:S._spread,children:[],position:void 0}}function ql(S){return{type:"listItem",spread:S._spread,checked:null,children:[],position:void 0}}function Vl(){return{type:"paragraph",children:[],position:void 0}}function Wl(){return{type:"strong",children:[],position:void 0}}function Jl(){return{type:"text",value:"",position:void 0}}function Gl(){return{type:"thematicBreak",position:void 0}}}function Ne(e){return{line:e.line,column:e.column,offset:e.offset}}function ol(e,n){let t=-1;for(;++t<n.length;){const r=n[t];Array.isArray(r)?ol(e,r):$c(e,r)}}function $c(e,n){let t;for(t in n)if(al.call(n,t))switch(t){case"canContainEols":{const r=n[t];r&&e[t].push(...r);break}case"transforms":{const r=n[t];r&&e[t].push(...r);break}case"afterExit":case"beforeEnter":{const r=n[t];r&&e[t].push(r);break}case"enter":case"exit":{const r=n[t];r&&Object.assign(e[t],r);break}}}function Dr(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+st({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+st({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+st({start:n.start,end:n.end})+") is still open")}function Hc(e){const n=this;n.parser=t;function t(r){return Rc(r,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function Uc(e,n){const t={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,t),e.applyData(n,t)}function qc(e,n){const t={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,t),[e.applyData(n,t),{type:"text",value:`
|
|
6
|
+
`}]}function Vc(e,n){const t=n.value?n.value+`
|
|
7
|
+
`:"",r={},i=n.lang?n.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:t}]};return n.meta&&(s.data={meta:n.meta}),e.patch(n,s),s=e.applyData(n,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(n,s),s}function Wc(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Jc(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Gc(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(n.identifier).toUpperCase(),i=Ke(r.toLowerCase()),s=e.footnoteOrder.indexOf(r);let l,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=s+1,a+=1,e.footnoteCounts.set(r,a);const o={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+i,id:t+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(n,o);const u={type:"element",tagName:"sup",properties:{},children:[o]};return e.patch(n,u),e.applyData(n,u)}function Xc(e,n){const t={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Yc(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function ul(e,n){const t=n.referenceType;let r="]";if(t==="collapsed"?r+="[]":t==="full"&&(r+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+r}];const i=e.all(n),s=i[0];s&&s.type==="text"?s.value="["+s.value:i.unshift({type:"text",value:"["});const l=i[i.length-1];return l&&l.type==="text"?l.value+=r:i.push({type:"text",value:r}),i}function Kc(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return ul(e,n);const i={src:Ke(r.url||""),alt:n.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"img",properties:i,children:[]};return e.patch(n,s),e.applyData(n,s)}function Qc(e,n){const t={src:Ke(n.url)};n.alt!==null&&n.alt!==void 0&&(t.alt=n.alt),n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"img",properties:t,children:[]};return e.patch(n,r),e.applyData(n,r)}function Zc(e,n){const t={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,t);const r={type:"element",tagName:"code",properties:{},children:[t]};return e.patch(n,r),e.applyData(n,r)}function ef(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return ul(e,n);const i={href:Ke(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"a",properties:i,children:e.all(n)};return e.patch(n,s),e.applyData(n,s)}function tf(e,n){const t={href:Ke(n.url)};n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"a",properties:t,children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function nf(e,n,t){const r=e.all(n),i=t?rf(t):cl(n),s={},l=[];if(typeof n.checked=="boolean"){const f=r[0];let h;f&&f.type==="element"&&f.tagName==="p"?h=f:(h={type:"element",tagName:"p",properties:{},children:[]},r.unshift(h)),h.children.length>0&&h.children.unshift({type:"text",value:" "}),h.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const f=r[a];(i||a!==0||f.type!=="element"||f.tagName!=="p")&&l.push({type:"text",value:`
|
|
8
|
+
`}),f.type==="element"&&f.tagName==="p"&&!i?l.push(...f.children):l.push(f)}const o=r[r.length-1];o&&(i||o.type!=="element"||o.tagName!=="p")&&l.push({type:"text",value:`
|
|
9
|
+
`});const u={type:"element",tagName:"li",properties:s,children:l};return e.patch(n,u),e.applyData(n,u)}function rf(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const t=e.children;let r=-1;for(;!n&&++r<t.length;)n=cl(t[r])}return n}function cl(e){const n=e.spread;return n??e.children.length>1}function lf(e,n){const t={},r=e.all(n);let i=-1;for(typeof n.start=="number"&&n.start!==1&&(t.start=n.start);++i<r.length;){const l=r[i];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){t.className=["contains-task-list"];break}}const s={type:"element",tagName:n.ordered?"ol":"ul",properties:t,children:e.wrap(r,!0)};return e.patch(n,s),e.applyData(n,s)}function sf(e,n){const t={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function af(e,n){const t={type:"root",children:e.wrap(e.all(n))};return e.patch(n,t),e.applyData(n,t)}function of(e,n){const t={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function uf(e,n){const t=e.all(n),r=t.shift(),i=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(n.children[0],l),i.push(l)}if(t.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},a=Dn(n.children[1]),o=Hi(n.children[n.children.length-1]);a&&o&&(l.position={start:a,end:o}),i.push(l)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(n,s),e.applyData(n,s)}function cf(e,n,t){const r=t?t.children:void 0,s=(r?r.indexOf(n):1)===0?"th":"td",l=t&&t.type==="table"?t.align:void 0,a=l?l.length:n.children.length;let o=-1;const u=[];for(;++o<a;){const h=n.children[o],d={},p=l?l[o]:void 0;p&&(d.align=p);let m={type:"element",tagName:s,properties:d,children:[]};h&&(m.children=e.all(h),e.patch(h,m),m=e.applyData(h,m)),u.push(m)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(n,f),e.applyData(n,f)}function ff(e,n){const t={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}const Mr=9,_r=32;function hf(e){const n=String(e),t=/\r?\n|\r/g;let r=t.exec(n),i=0;const s=[];for(;r;)s.push(Fr(n.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=t.exec(n);return s.push(Fr(n.slice(i),i>0,!1)),s.join("")}function Fr(e,n,t){let r=0,i=e.length;if(n){let s=e.codePointAt(r);for(;s===Mr||s===_r;)r++,s=e.codePointAt(r)}if(t){let s=e.codePointAt(i-1);for(;s===Mr||s===_r;)i--,s=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function pf(e,n){const t={type:"text",value:hf(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function df(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const mf={blockquote:Uc,break:qc,code:Vc,delete:Wc,emphasis:Jc,footnoteReference:Gc,heading:Xc,html:Yc,imageReference:Kc,image:Qc,inlineCode:Zc,linkReference:ef,link:tf,listItem:nf,list:lf,paragraph:sf,root:af,strong:of,table:uf,tableCell:ff,tableRow:cf,text:pf,thematicBreak:df,toml:mt,yaml:mt,definition:mt,footnoteDefinition:mt};function mt(){}const fl=-1,Rt=0,ot=1,Et=2,$n=3,Hn=4,Un=5,qn=6,hl=7,pl=8,{defineProperty:gf}=Object,dl=typeof self=="object"?self:globalThis,Or=(e,n)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new dl[e](n)},xf=(e,n)=>{const t=(i,s)=>(e.set(s,i),i),r=i=>{if(e.has(i))return e.get(i);const[s,l]=n[i];switch(s){case Rt:case fl:return t(l,i);case ot:{const a=t([],i);for(const o of l)a.push(r(o));return a}case Et:{const a=t({},i);for(const[o,u]of l){const f=r(o),h=r(u);f==="__proto__"?gf(a,f,{value:h,configurable:!0,enumerable:!0,writable:!0}):a[f]=h}return a}case $n:return t(new Date(l),i);case Hn:{const{source:a,flags:o}=l;return t(new RegExp(a,o),i)}case Un:{const a=t(new Map,i);for(const[o,u]of l)a.set(r(o),r(u));return a}case qn:{const a=t(new Set,i);for(const o of l)a.add(r(o));return a}case hl:{const{name:a,message:o}=l;return t(typeof dl[a]=="function"?Or(a,o):new Error(o),i)}case pl:return t(BigInt(l),i);case"BigInt":return t(Object(BigInt(l)),i);case"ArrayBuffer":return t(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:a}=new Uint8Array(l);return t(new DataView(a),l)}case"-0":return-0}return t(Or(s,l),i)};return r},Rr=e=>xf(new Map,e)(0),De="",{toString:yf}={},{keys:bf,is:kf}=Object,lt=e=>{const n=typeof e;if(n!=="object"||!e)return[Rt,n];const t=yf.call(e).slice(8,-1);switch(t){case"Array":return[ot,De];case"Object":return[Et,De];case"Date":return[$n,De];case"RegExp":return[Hn,De];case"Map":return[Un,De];case"Set":return[qn,De];case"DataView":return[ot,t]}return t.includes("Array")?[ot,t]:e instanceof Error?[hl,e.name||"Error"]:[Et,t]},gt=([e,n])=>e===Rt&&(n==="function"||n==="symbol"),wf=(e,n,t,r)=>{const i=(l,a)=>{const o=r.push(l)-1;return t.set(a,o),o},s=l=>{if(t.has(l))return t.get(l);let[a,o]=lt(l);switch(a){case Rt:{let f=l;switch(o){case"bigint":a=pl,f=l.toString();break;case"number":if(!l&&kf(l,-0))return r.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+o);f=null;break;case"undefined":return i([fl],l)}return i([a,f],l)}case ot:{if(o){let d=l;return o==="DataView"?d=new Uint8Array(l.buffer):o==="ArrayBuffer"&&(d=new Uint8Array(l)),i([o,[...d]],l)}const f=[],h=i([a,f],l);for(const d of l)f.push(s(d));return h}case Et:{if(o)switch(o){case"BigInt":return i([o,l.toString()],l);case"Boolean":case"Number":case"String":return i([o,l.valueOf()],l)}if(n&&"toJSON"in l)return s(l.toJSON());const f=[],h=i([a,f],l);for(const d of bf(l))(e||!gt(lt(l[d])))&&f.push([s(d),s(l[d])]);return h}case $n:return i([a,isNaN(l.getTime())?De:l.toISOString()],l);case Hn:{const{source:f,flags:h}=l;return i([a,{source:f,flags:h}],l)}case Un:{const f=[],h=i([a,f],l);for(const[d,p]of l)(e||!(gt(lt(d))||gt(lt(p))))&&f.push([s(d),s(p)]);return h}case qn:{const f=[],h=i([a,f],l);for(const d of l)(e||!gt(lt(d)))&&f.push(s(d));return h}}const{message:u}=l;return i([a,{name:o,message:u}],l)};return s},Br=(e,{json:n,lossy:t}={})=>{const r=[];return wf(!(n||t),!!n,new Map,r)(e),r},Nt=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?Rr(Br(e,n)):structuredClone(e):(e,n)=>Rr(Br(e,n));function Sf(e,n){const t=[{type:"text",value:"↩"}];return n>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),t}function Cf(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function jf(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||Sf,r=e.options.footnoteBackLabel||Cf,i=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let o=-1;for(;++o<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[o]);if(!u)continue;const f=e.all(u),h=String(u.identifier).toUpperCase(),d=Ke(h.toLowerCase());let p=0;const m=[],w=e.footnoteCounts.get(h);for(;w!==void 0&&++p<=w;){m.length>0&&m.push({type:"text",value:" "});let N=typeof t=="string"?t:t(o,p);typeof N=="string"&&(N={type:"text",value:N}),m.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+d+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(o,p),className:["data-footnote-backref"]},children:Array.isArray(N)?N:[N]})}const C=f[f.length-1];if(C&&C.type==="element"&&C.tagName==="p"){const N=C.children[C.children.length-1];N&&N.type==="text"?N.value+=" ":C.children.push({type:"text",value:" "}),C.children.push(...m)}else f.push(...m);const b={type:"element",tagName:"li",properties:{id:n+"fn-"+d},children:e.wrap(f,!0)};e.patch(u,b),a.push(b)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Nt(l),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
10
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:`
|
|
11
|
+
`}]}}const Bt=(function(e){if(e==null)return Af;if(typeof e=="function")return $t(e);if(typeof e=="object")return Array.isArray(e)?vf(e):Ef(e);if(typeof e=="string")return Nf(e);throw new Error("Expected function, string, or object as test")});function vf(e){const n=[];let t=-1;for(;++t<e.length;)n[t]=Bt(e[t]);return $t(r);function r(...i){let s=-1;for(;++s<n.length;)if(n[s].apply(this,i))return!0;return!1}}function Ef(e){const n=e;return $t(t);function t(r){const i=r;let s;for(s in e)if(i[s]!==n[s])return!1;return!0}}function Nf(e){return $t(n);function n(t){return t&&t.type===e}}function $t(e){return n;function n(t,r,i){return!!(If(t)&&e.call(this,t,typeof r=="number"?r:void 0,i||void 0))}}function Af(){return!0}function If(e){return e!==null&&typeof e=="object"&&"type"in e}const ml=[],Tf=!0,Cn=!1,Pf="skip";function gl(e,n,t,r){let i;typeof n=="function"&&typeof t!="function"?(r=t,t=n):i=n;const s=Bt(i),l=r?-1:1;a(e,void 0,[])();function a(o,u,f){const h=o&&typeof o=="object"?o:{};if(typeof h.type=="string"){const p=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(d,"name",{value:"node ("+(o.type+(p?"<"+p+">":""))+")"})}return d;function d(){let p=ml,m,w,C;if((!n||s(o,u,f[f.length-1]||void 0))&&(p=zf(t(o,f)),p[0]===Cn))return p;if("children"in o&&o.children){const b=o;if(b.children&&p[0]!==Pf)for(w=(r?b.children.length:-1)+l,C=f.concat(b);w>-1&&w<b.children.length;){const N=b.children[w];if(m=a(N,w,C)(),m[0]===Cn)return m;w=typeof m[1]=="number"?m[1]:w+l}}return p}}}function zf(e){return Array.isArray(e)?e:typeof e=="number"?[Tf,e]:e==null?ml:[e]}function Vn(e,n,t,r){let i,s,l;typeof n=="function"&&typeof t!="function"?(s=void 0,l=n,i=t):(s=n,l=t,i=r),gl(e,s,a,i);function a(o,u){const f=u[u.length-1],h=f?f.children.indexOf(o):void 0;return l(o,h,f)}}const jn={}.hasOwnProperty,Lf={};function Df(e,n){const t=n||Lf,r=new Map,i=new Map,s=new Map,l={...mf,...t.handlers},a={all:u,applyData:_f,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:l,one:o,options:t,patch:Mf,wrap:Of};return Vn(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const h=f.type==="definition"?r:i,d=String(f.identifier).toUpperCase();h.has(d)||h.set(d,f)}}),a;function o(f,h){const d=f.type,p=a.handlers[d];if(jn.call(a.handlers,d)&&p)return p(a,f,h);if(a.options.passThrough&&a.options.passThrough.includes(d)){if("children"in f){const{children:w,...C}=f,b=Nt(C);return b.children=a.all(f),b}return Nt(f)}return(a.options.unknownHandler||Ff)(a,f,h)}function u(f){const h=[];if("children"in f){const d=f.children;let p=-1;for(;++p<d.length;){const m=a.one(d[p],f);if(m){if(p&&d[p-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=$r(m.value)),!Array.isArray(m)&&m.type==="element")){const w=m.children[0];w&&w.type==="text"&&(w.value=$r(w.value))}Array.isArray(m)?h.push(...m):h.push(m)}}}return h}}function Mf(e,n){e.position&&(n.position=So(e))}function _f(e,n){let t=n;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,s=e.data.hProperties;if(typeof r=="string")if(t.type==="element")t.tagName=r;else{const l="children"in t?t.children:[t];t={type:"element",tagName:r,properties:{},children:l}}t.type==="element"&&s&&Object.assign(t.properties,Nt(s)),"children"in t&&t.children&&i!==null&&i!==void 0&&(t.children=i)}return t}function Ff(e,n){const t=n.data||{},r="value"in n&&!(jn.call(t,"hProperties")||jn.call(t,"hChildren"))?{type:"text",value:n.value}:{type:"element",tagName:"div",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function Of(e,n){const t=[];let r=-1;for(n&&t.push({type:"text",value:`
|
|
12
|
+
`});++r<e.length;)r&&t.push({type:"text",value:`
|
|
13
|
+
`}),t.push(e[r]);return n&&e.length>0&&t.push({type:"text",value:`
|
|
14
|
+
`}),t}function $r(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function Hr(e,n){const t=Df(e,n),r=t.one(e,void 0),i=jf(t),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&s.children.push({type:"text",value:`
|
|
15
|
+
`},i),s}function Rf(e,n){return e&&"run"in e?async function(t,r){const i=Hr(t,{file:r,...n});await e.run(i,r)}:function(t,r){return Hr(t,{file:r,...e||n})}}function Ur(e){if(e)throw e}var Yt,qr;function Bf(){if(qr)return Yt;qr=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(u){return typeof Array.isArray=="function"?Array.isArray(u):n.call(u)==="[object Array]"},s=function(u){if(!u||n.call(u)!=="[object Object]")return!1;var f=e.call(u,"constructor"),h=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!f&&!h)return!1;var d;for(d in u);return typeof d>"u"||e.call(u,d)},l=function(u,f){t&&f.name==="__proto__"?t(u,f.name,{enumerable:!0,configurable:!0,value:f.newValue,writable:!0}):u[f.name]=f.newValue},a=function(u,f){if(f==="__proto__")if(e.call(u,f)){if(r)return r(u,f).value}else return;return u[f]};return Yt=function o(){var u,f,h,d,p,m,w=arguments[0],C=1,b=arguments.length,N=!1;for(typeof w=="boolean"&&(N=w,w=arguments[1]||{},C=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});C<b;++C)if(u=arguments[C],u!=null)for(f in u)h=a(w,f),d=a(u,f),w!==d&&(N&&d&&(s(d)||(p=i(d)))?(p?(p=!1,m=h&&i(h)?h:[]):m=h&&s(h)?h:{},l(w,{name:f,newValue:o(N,m,d)})):typeof d<"u"&&l(w,{name:f,newValue:d}));return w},Yt}var $f=Bf();const Kt=hi($f);function vn(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Hf(){const e=[],n={run:t,use:r};return n;function t(...i){let s=-1;const l=i.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);a(null,...i);function a(o,...u){const f=e[++s];let h=-1;if(o){l(o);return}for(;++h<i.length;)(u[h]===null||u[h]===void 0)&&(u[h]=i[h]);i=u,f?Uf(f,a)(...u):l(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),n}}function Uf(e,n){let t;return r;function r(...l){const a=e.length>l.length;let o;a&&l.push(i);try{o=e.apply(this,l)}catch(u){const f=u;if(a&&t)throw f;return i(f)}a||(o&&o.then&&typeof o.then=="function"?o.then(s,i):o instanceof Error?i(o):s(o))}function i(l,...a){t||(t=!0,n(l,...a))}function s(l){i(null,l)}}const ke={basename:qf,dirname:Vf,extname:Wf,join:Jf,sep:"/"};function qf(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');dt(e);let t=0,r=-1,i=e.length,s;if(n===void 0||n.length===0||n.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(s){t=i+1;break}}else r<0&&(s=!0,r=i+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let l=-1,a=n.length-1;for(;i--;)if(e.codePointAt(i)===47){if(s){t=i+1;break}}else l<0&&(s=!0,l=i+1),a>-1&&(e.codePointAt(i)===n.codePointAt(a--)?a<0&&(r=i):(a=-1,r=l));return t===r?r=l:r<0&&(r=e.length),e.slice(t,r)}function Vf(e){if(dt(e),e.length===0)return".";let n=-1,t=e.length,r;for(;--t;)if(e.codePointAt(t)===47){if(r){n=t;break}}else r||(r=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function Wf(e){dt(e);let n=e.length,t=-1,r=0,i=-1,s=0,l;for(;n--;){const a=e.codePointAt(n);if(a===47){if(l){r=n+1;break}continue}t<0&&(l=!0,t=n+1),a===46?i<0?i=n:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||t<0||s===0||s===1&&i===t-1&&i===r+1?"":e.slice(i,t)}function Jf(...e){let n=-1,t;for(;++n<e.length;)dt(e[n]),e[n]&&(t=t===void 0?e[n]:t+"/"+e[n]);return t===void 0?".":Gf(t)}function Gf(e){dt(e);const n=e.codePointAt(0)===47;let t=Xf(e,!n);return t.length===0&&!n&&(t="."),t.length>0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function Xf(e,n){let t="",r=0,i=-1,s=0,l=-1,a,o;for(;++l<=e.length;){if(l<e.length)a=e.codePointAt(l);else{if(a===47)break;a=47}if(a===47){if(!(i===l-1||s===1))if(i!==l-1&&s===2){if(t.length<2||r!==2||t.codePointAt(t.length-1)!==46||t.codePointAt(t.length-2)!==46){if(t.length>2){if(o=t.lastIndexOf("/"),o!==t.length-1){o<0?(t="",r=0):(t=t.slice(0,o),r=t.length-1-t.lastIndexOf("/")),i=l,s=0;continue}}else if(t.length>0){t="",r=0,i=l,s=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(i+1,l):t=e.slice(i+1,l),r=l-i-1;i=l,s=0}else a===46&&s>-1?s++:s=-1}return t}function dt(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Yf={cwd:Kf};function Kf(){return"/"}function En(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Qf(e){if(typeof e=="string")e=new URL(e);else if(!En(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return Zf(e)}function Zf(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 n=e.pathname;let t=-1;for(;++t<n.length;)if(n.codePointAt(t)===37&&n.codePointAt(t+1)===50){const r=n.codePointAt(t+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(n)}const Qt=["history","path","basename","stem","extname","dirname"];class xl{constructor(n){let t;n?En(n)?t={path:n}:typeof n=="string"||eh(n)?t={value:n}:t=n:t={},this.cwd="cwd"in t?"":Yf.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Qt.length;){const s=Qt[r];s in t&&t[s]!==void 0&&t[s]!==null&&(this[s]=s==="history"?[...t[s]]:t[s])}let i;for(i in t)Qt.includes(i)||(this[i]=t[i])}get basename(){return typeof this.path=="string"?ke.basename(this.path):void 0}set basename(n){en(n,"basename"),Zt(n,"basename"),this.path=ke.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?ke.dirname(this.path):void 0}set dirname(n){Vr(this.basename,"dirname"),this.path=ke.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?ke.extname(this.path):void 0}set extname(n){if(Zt(n,"extname"),Vr(this.dirname,"extname"),n){if(n.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(n.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ke.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){En(n)&&(n=Qf(n)),en(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?ke.basename(this.path,this.extname):void 0}set stem(n){en(n,"stem"),Zt(n,"stem"),this.path=ke.join(this.dirname||"",n+(this.extname||""))}fail(n,t,r){const i=this.message(n,t,r);throw i.fatal=!0,i}info(n,t,r){const i=this.message(n,t,r);return i.fatal=void 0,i}message(n,t,r){const i=new ie(n,t,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}}function Zt(e,n){if(e&&e.includes(ke.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+ke.sep+"`")}function en(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function Vr(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function eh(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const th=(function(e){const r=this.constructor.prototype,i=r[e],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s}),nh={}.hasOwnProperty;class Wn extends th{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=Hf()}copy(){const n=new Wn;let t=-1;for(;++t<this.attachers.length;){const r=this.attachers[t];n.use(...r)}return n.data(Kt(!0,{},this.namespace)),n}data(n,t){return typeof n=="string"?arguments.length===2?(rn("data",this.frozen),this.namespace[n]=t,this):nh.call(this.namespace,n)&&this.namespace[n]||void 0:n?(rn("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;const n=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=t.call(n,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const t=xt(n),r=this.parser||this.Parser;return tn("parse",r),r(String(t),t)}process(n,t){const r=this;return this.freeze(),tn("process",this.parser||this.Parser),nn("process",this.compiler||this.Compiler),t?i(void 0,t):new Promise(i);function i(s,l){const a=xt(n),o=r.parse(a);r.run(o,a,function(f,h,d){if(f||!h||!d)return u(f);const p=h,m=r.stringify(p,d);lh(m)?d.value=m:d.result=m,u(f,d)});function u(f,h){f||!h?l(f):s?s(h):t(void 0,h)}}}processSync(n){let t=!1,r;return this.freeze(),tn("processSync",this.parser||this.Parser),nn("processSync",this.compiler||this.Compiler),this.process(n,i),Jr("processSync","process",t),r;function i(s,l){t=!0,Ur(s),r=l}}run(n,t,r){Wr(n),this.freeze();const i=this.transformers;return!r&&typeof t=="function"&&(r=t,t=void 0),r?s(void 0,r):new Promise(s);function s(l,a){const o=xt(t);i.run(n,o,u);function u(f,h,d){const p=h||n;f?a(f):l?l(p):r(void 0,p,d)}}}runSync(n,t){let r=!1,i;return this.run(n,t,s),Jr("runSync","run",r),i;function s(l,a){Ur(l),i=a,r=!0}}stringify(n,t){this.freeze();const r=xt(t),i=this.compiler||this.Compiler;return nn("stringify",i),Wr(n),i(n,r)}use(n,...t){const r=this.attachers,i=this.namespace;if(rn("use",this.frozen),n!=null)if(typeof n=="function")o(n,t);else if(typeof n=="object")Array.isArray(n)?a(n):l(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function s(u){if(typeof u=="function")o(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[f,...h]=u;o(f,h)}else l(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function l(u){if(!("plugins"in u)&&!("settings"in u))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");a(u.plugins),u.settings&&(i.settings=Kt(!0,i.settings,u.settings))}function a(u){let f=-1;if(u!=null)if(Array.isArray(u))for(;++f<u.length;){const h=u[f];s(h)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function o(u,f){let h=-1,d=-1;for(;++h<r.length;)if(r[h][0]===u){d=h;break}if(d===-1)r.push([u,...f]);else if(f.length>0){let[p,...m]=f;const w=r[d][1];vn(w)&&vn(p)&&(p=Kt(!0,w,p)),r[d]=[u,p,...m]}}}}const rh=new Wn().freeze();function tn(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function nn(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function rn(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Wr(e){if(!vn(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Jr(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function xt(e){return ih(e)?e:new xl(e)}function ih(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function lh(e){return typeof e=="string"||sh(e)}function sh(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const ah="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Gr=[],Xr={allowDangerousHtml:!0},oh=/^(https?|ircs?|mailto|xmpp)$/i,uh=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function ch(e){const n=fh(e),t=hh(e);return ph(n.runSync(n.parse(t),t),e)}function fh(e){const n=e.rehypePlugins||Gr,t=e.remarkPlugins||Gr,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Xr}:Xr;return rh().use(Hc).use(t).use(Rf,r).use(n)}function hh(e){const n=e.children||"",t=new xl;return typeof n=="string"&&(t.value=n),t}function ph(e,n){const t=n.allowedElements,r=n.allowElement,i=n.components,s=n.disallowedElements,l=n.skipHtml,a=n.unwrapDisallowed,o=n.urlTransform||dh;for(const f of uh)Object.hasOwn(n,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+ah+f.id,void 0);return Vn(e,u),No(e,{Fragment:c.Fragment,components:i,ignoreInvalidStyle:!0,jsx:c.jsx,jsxs:c.jsxs,passKeys:!0,passNode:!0});function u(f,h,d){if(f.type==="raw"&&d&&typeof h=="number")return l?d.children.splice(h,1):d.children[h]={type:"text",value:f.value},h;if(f.type==="element"){let p;for(p in Jt)if(Object.hasOwn(Jt,p)&&Object.hasOwn(f.properties,p)){const m=f.properties[p],w=Jt[p];(w===null||w.includes(f.tagName))&&(f.properties[p]=o(String(m||""),p,f))}}if(f.type==="element"){let p=t?!t.includes(f.tagName):s?s.includes(f.tagName):!1;if(!p&&r&&typeof h=="number"&&(p=!r(f,h,d)),p&&d&&typeof h=="number")return a&&f.children?d.children.splice(h,1,...f.children):d.children.splice(h,1),h}}}function dh(e){const n=e.indexOf(":"),t=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return n===-1||i!==-1&&n>i||t!==-1&&n>t||r!==-1&&n>r||oh.test(e.slice(0,n))?e:""}function Yr(e,n){const t=String(e);if(typeof n!="string")throw new TypeError("Expected character");let r=0,i=t.indexOf(n);for(;i!==-1;)r++,i=t.indexOf(n,i+n.length);return r}function mh(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function gh(e,n,t){const i=Bt((t||{}).ignore||[]),s=xh(n);let l=-1;for(;++l<s.length;)gl(e,"text",a);function a(u,f){let h=-1,d;for(;++h<f.length;){const p=f[h],m=d?d.children:void 0;if(i(p,m?m.indexOf(p):void 0,d))return;d=p}if(d)return o(u,f)}function o(u,f){const h=f[f.length-1],d=s[l][0],p=s[l][1];let m=0;const C=h.children.indexOf(u);let b=!1,N=[];d.lastIndex=0;let E=d.exec(u.value);for(;E;){const j=E.index,k={index:E.index,input:E.input,stack:[...f,u]};let P=p(...E,k);if(typeof P=="string"&&(P=P.length>0?{type:"text",value:P}:void 0),P===!1)d.lastIndex=j+1;else{if(m!==j&&A({type:"text",value:u.value.slice(m,j)}),Array.isArray(P))for(const D of P)A(D);else P&&A(P);m=j+E[0].length,b=!0}if(!d.global)break;E=d.exec(u.value)}return b?(m<u.value.length&&A({type:"text",value:u.value.slice(m)}),h.children.splice(C,1,...N)):N=[u],C+N.length;function A(j){const k=N[N.length-1];k&&k.type==="text"&&j.type==="text"?k.value+=j.value:N.push(j)}}}function xh(e){if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=[],t=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<t.length;){const i=t[r];n.push([yh(i[0]),bh(i[1])])}return n}function yh(e){return typeof e=="string"?new RegExp(mh(e),"g"):e}function bh(e){return typeof e=="function"?e:function(){return e}}const ln="phrasing",sn=["autolink","link","image","label"];function kh(){return{transforms:[Nh],enter:{literalAutolink:Sh,literalAutolinkEmail:an,literalAutolinkHttp:an,literalAutolinkWww:an},exit:{literalAutolink:Eh,literalAutolinkEmail:vh,literalAutolinkHttp:Ch,literalAutolinkWww:jh}}}function wh(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ln,notInConstruct:sn},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ln,notInConstruct:sn},{character:":",before:"[ps]",after:"\\/",inConstruct:ln,notInConstruct:sn}]}}function Sh(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function an(e){this.config.enter.autolinkProtocol.call(this,e)}function Ch(e){this.config.exit.autolinkProtocol.call(this,e)}function jh(e){this.config.exit.data.call(this,e);const n=this.stack[this.stack.length-1];n.type,n.url="http://"+this.sliceSerialize(e)}function vh(e){this.config.exit.autolinkEmail.call(this,e)}function Eh(e){this.exit(e)}function Nh(e){gh(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Ah],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Ih]],{ignore:["link","linkReference"]})}function Ah(e,n,t,r,i){let s="";if(!yl(i)||(/^w/i.test(n)&&(t=n+t,n="",s="http://"),!Th(t)))return!1;const l=Ph(t+r);if(!l[0])return!1;const a={type:"link",title:null,url:s+n+l[0],children:[{type:"text",value:n+l[0]}]};return l[1]?[a,{type:"text",value:l[1]}]:a}function Ih(e,n,t,r){return!yl(r,!0)||/[-\d_]$/.test(t)?!1:{type:"link",title:null,url:"mailto:"+n+"@"+t,children:[{type:"text",value:n+"@"+t}]}}function Th(e){const n=e.split(".");return!(n.length<2||n[n.length-1]&&(/_/.test(n[n.length-1])||!/[a-zA-Z\d]/.test(n[n.length-1]))||n[n.length-2]&&(/_/.test(n[n.length-2])||!/[a-zA-Z\d]/.test(n[n.length-2])))}function Ph(e){const n=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],r=t.indexOf(")");const i=Yr(e,"(");let s=Yr(e,")");for(;r!==-1&&i>s;)e+=t.slice(0,r+1),t=t.slice(r+1),r=t.indexOf(")"),s++;return[e,t]}function yl(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||_e(t)||Ft(t))&&(!n||t!==47)}bl.peek=Bh;function zh(){this.buffer()}function Lh(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Dh(){this.buffer()}function Mh(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function _h(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=ye(this.sliceSerialize(e)).toLowerCase(),t.label=n}function Fh(e){this.exit(e)}function Oh(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=ye(this.sliceSerialize(e)).toLowerCase(),t.label=n}function Rh(e){this.exit(e)}function Bh(){return"["}function bl(e,n,t,r){const i=t.createTracker(r);let s=i.move("[^");const l=t.enter("footnoteReference"),a=t.enter("reference");return s+=i.move(t.safe(t.associationId(e),{after:"]",before:s})),a(),l(),s+=i.move("]"),s}function $h(){return{enter:{gfmFootnoteCallString:zh,gfmFootnoteCall:Lh,gfmFootnoteDefinitionLabelString:Dh,gfmFootnoteDefinition:Mh},exit:{gfmFootnoteCallString:_h,gfmFootnoteCall:Fh,gfmFootnoteDefinitionLabelString:Oh,gfmFootnoteDefinition:Rh}}}function Hh(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:bl},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(r,i,s,l){const a=s.createTracker(l);let o=a.move("[^");const u=s.enter("footnoteDefinition"),f=s.enter("label");return o+=a.move(s.safe(s.associationId(r),{before:o,after:"]"})),f(),o+=a.move("]:"),r.children&&r.children.length>0&&(a.shift(4),o+=a.move((n?`
|
|
16
|
+
`:" ")+s.indentLines(s.containerFlow(r,a.current()),n?kl:Uh))),u(),o}}function Uh(e,n,t){return n===0?e:kl(e,n,t)}function kl(e,n,t){return(t?"":" ")+e}const qh=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Jn.attention=Xh;Jn.peek=Yh;function Vh(){return{canContainEols:["delete"],enter:{strikethrough:Jh},exit:{strikethrough:Gh}}}function Wh(){return{handlers:{delete:Jn},unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:qh}]}}function Jh(e){this.enter({type:"delete",children:[],position:void 0},e)}function Gh(e){this.exit(e)}function Jn(e,n,t,r){const i=t.createTracker(r),s=t.stack.includes("strikethrough")?"~":"~~",l=t.enter("strikethrough");let a=i.move(s);return a+=t.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move(s),l(),a}function Xh(){return{construct:"strikethrough",markers:["~"],sizes:[2,1]}}function Yh(){return"~"}function Kh(e){return e.length}function Qh(e,n){const t=n||{},r=(t.align||[]).concat(),i=t.stringLength||Kh,s=[],l=[],a=[],o=[];let u=0,f=-1;for(;++f<e.length;){const w=[],C=[];let b=-1;for(e[f].length>u&&(u=e[f].length);++b<e[f].length;){const N=Zh(e[f][b]);if(t.alignDelimiters!==!1){const E=i(N);C[b]=E,(o[b]===void 0||E>o[b])&&(o[b]=E)}w.push(N)}l[f]=w,a[f]=C}let h=-1;if(typeof r=="object"&&"length"in r)for(;++h<u;)s[h]=Kr(r[h]);else{const w=Kr(r);for(;++h<u;)s[h]=w}h=-1;const d=[],p=[];for(;++h<u;){const w=s[h];let C="",b="";w===99?(C=":",b=":"):w===108?C=":":w===114&&(b=":");let N=t.alignDelimiters===!1?1:Math.max(1,o[h]-C.length-b.length);const E=C+"-".repeat(N)+b;t.alignDelimiters!==!1&&(N=C.length+N+b.length,N>o[h]&&(o[h]=N),p[h]=N),d[h]=E}l.splice(1,0,d),a.splice(1,0,p),f=-1;const m=[];for(;++f<l.length;){const w=l[f],C=a[f];h=-1;const b=[];for(;++h<u;){const N=w[h]||"";let E="",A="";if(t.alignDelimiters!==!1){const j=o[h]-(C[h]||0),k=s[h];k===114?E=" ".repeat(j):k===99?j%2?(E=" ".repeat(j/2+.5),A=" ".repeat(j/2-.5)):(E=" ".repeat(j/2),A=E):A=" ".repeat(j)}t.delimiterStart!==!1&&!h&&b.push("|"),t.padding!==!1&&!(t.alignDelimiters===!1&&N==="")&&(t.delimiterStart!==!1||h)&&b.push(" "),t.alignDelimiters!==!1&&b.push(E),b.push(N),t.alignDelimiters!==!1&&b.push(A),t.padding!==!1&&b.push(" "),(t.delimiterEnd!==!1||h!==u-1)&&b.push("|")}m.push(t.delimiterEnd===!1?b.join("").replace(/ +$/,""):b.join(""))}return m.join(`
|
|
17
|
+
`)}function Zh(e){return e==null?"":String(e)}function Kr(e){const n=typeof e=="string"?e.codePointAt(0):0;return n===67||n===99?99:n===76||n===108?108:n===82||n===114?114:0}const ep=Bt(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function tp(e,n,t,r){const i=t.enter("blockquote"),s=t.createTracker(r);s.move("> "),s.shift(2);const l=t.indentLines(t.containerFlow(e,s.current()),np);return i(),l}function np(e,n,t){return">"+(t?"":" ")+e}function rp(e,n){return Qr(e,n.inConstruct,!0)&&!Qr(e,n.notInConstruct,!1)}function Qr(e,n,t){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return t;let r=-1;for(;++r<n.length;)if(e.includes(n[r]))return!0;return!1}function Zr(e,n,t,r){let i=-1;for(;++i<t.unsafe.length;){const s=t.unsafe[i];if(s.character===`
|
|
18
|
+
`&&!s.before&&!s.after&&rp(t.stack,s))return/[\t ]/.test(r.before)?"":" "}return`\\
|
|
19
|
+
`}function ip(e,n){const t=String(e);let r=t.indexOf(n),i=r,s=0,l=0;if(typeof n!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++s>l&&(l=s):s=1,i=r+n.length,r=t.indexOf(n,i);return l}function lp(e,n){return!!(n.options.fences===!1&&e.value&&!e.lang&&/[^\n\r ]/.test(e.value)&&!/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}function sp(e){const n=e.options.fence||"`";if(n!=="`"&&n!=="~")throw new Error("Cannot serialize code with `"+n+"` for `options.fence`, expected `` ` `` or `~`");return n}function ap(e,n,t,r){const i=sp(t),s=e.value||"";if(lp(e,t)){const h=t.enter("codeIndented"),d=t.indentLines(s,op);return h(),d}const l=t.createTracker(r),a=i.repeat(Math.max(ip(s,i)+1,3)),o=t.enter("codeFenced"),u=i==="`"?"GraveAccent":"Tilde";let f=l.move(a);if(e.lang){const h=t.enter(`codeFencedLang${u}`);f+=l.move(t.safe(e.lang,{before:f,after:" ",encode:["`"],...l.current()})),h()}if(e.lang&&e.meta){const h=t.enter(`codeFencedMeta${u}`);f+=l.move(" "),f+=l.move(t.safe(e.meta,{before:f,after:`
|
|
20
|
+
`,encode:["`"],...l.current()})),h()}return f+=l.move(`
|
|
21
|
+
`),s&&(f+=l.move(s+`
|
|
22
|
+
`)),f+=l.move(a),o(),f}function op(e,n,t){return(t?"":" ")+e}function Gn(e){const n=e.options.quote||'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize title with `"+n+"` for `options.quote`, expected `\"`, or `'`");return n}function up(e,n,t,r){const i=Gn(t),s=i==='"'?"Quote":"Apostrophe",l=t.enter("definition");let a=t.enter("label");const o=t.createTracker(r);let u=o.move("[");return u+=o.move(t.safe(t.associationId(e),{before:u,after:"]",...o.current()})),u+=o.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=t.enter("destinationLiteral"),u+=o.move("<"),u+=o.move(t.safe(e.url,{before:u,after:">",...o.current()})),u+=o.move(">")):(a=t.enter("destinationRaw"),u+=o.move(t.safe(e.url,{before:u,after:e.title?" ":`
|
|
23
|
+
`,...o.current()}))),a(),e.title&&(a=t.enter(`title${s}`),u+=o.move(" "+i),u+=o.move(t.safe(e.title,{before:u,after:i,...o.current()})),u+=o.move(i),a()),l(),u}function cp(e){const n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}Xn.attention=fp;Xn.peek=hp;function Xn(e,n,t,r){const i=t.enter("phrasing"),s=t.containerPhrasing({type:"root",children:[e]},r);return i(),s}function fp(e,n){return{construct:"emphasis",markers:cp(n)==="*"?["*","_"]:["_","*"],sizes:[1]}}function hp(e,n,t){return t.options.emphasis||"*"}function pp(e){return"&#x"+e.toString(16).toUpperCase()+";"}function dp(e,n){let t=!1;return Vn(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return t=!0,Cn}),!!((!e.depth||e.depth<3)&&On(e)&&(n.options.setext||t))}function mp(e,n,t,r){const i=Math.max(Math.min(6,e.depth||1),1),s=t.createTracker(r);if(dp(e,t)){const h=t.enter("headingSetext"),d=t.enter("phrasing"),p=t.containerPhrasing(e,{...s.current(),before:`
|
|
24
|
+
`,after:`
|
|
25
|
+
`});return d(),h(),p+`
|
|
26
|
+
`+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
|
|
27
|
+
`))+1))}const l="#".repeat(i),a=t.enter("headingAtx"),o=t.enter("phrasing");s.move(l+" ");let u=t.containerPhrasing(e,{before:"# ",after:`
|
|
28
|
+
`,...s.current()});const f=u.charCodeAt(0);return(f===9||f===32)&&(u=pp(f)+u.slice(1)),u=u?l+" "+u:l,t.options.closeAtx&&(u+=" "+l),o(),a(),u}wl.peek=gp;function wl(e){return e.value||""}function gp(){return"<"}Sl.peek=xp;function Sl(e,n,t,r){const i=Gn(t),s=i==='"'?"Quote":"Apostrophe",l=t.enter("image");let a=t.enter("label");const o=t.createTracker(r);let u=o.move("![");return u+=o.move(t.safe(e.alt,{before:u,after:"]",...o.current()})),u+=o.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=t.enter("destinationLiteral"),u+=o.move("<"),u+=o.move(t.safe(e.url,{before:u,after:">",...o.current()})),u+=o.move(">")):(a=t.enter("destinationRaw"),u+=o.move(t.safe(e.url,{before:u,after:e.title?" ":")",...o.current()}))),a(),e.title&&(a=t.enter(`title${s}`),u+=o.move(" "+i),u+=o.move(t.safe(e.title,{before:u,after:i,...o.current()})),u+=o.move(i),a()),u+=o.move(")"),l(),u}function xp(){return"!"}Cl.peek=yp;function Cl(e,n,t,r){const i=e.referenceType,s=t.enter("imageReference");let l=t.enter("label");const a=t.createTracker(r);let o=a.move("![");const u=t.safe(e.alt,{before:o,after:"]",...a.current()});o+=a.move(u+"]["),l();const f=t.stack;t.stack=f.filter(function(d){return d!=="phrasing"}),l=t.enter("reference");const h=t.safe(t.associationId(e),{before:o,after:"]",...a.current()});return l(),t.stack=f,s(),i==="full"||!u||u!==h?o+=a.move(h+"]"):i==="shortcut"?o=o.slice(0,-1):o+=a.move("]"),o}function yp(){return"!"}jl.peek=bp;function jl(e,n,t){let r=e.value||"",i="`",s=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++s<t.unsafe.length;){const l=t.unsafe[s],a=t.compilePattern(l);if(!l.atBreak)continue;let o;for(;o=a.exec(r);){let u=o.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(o.index+1)}}return i+r+i}function bp(){return"`"}function vl(e,n){const t=On(e);return!!(!n.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(t===e.url||"mailto:"+t===e.url)&&/^[a-z][+\-.a-z]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}El.peek=kp;function El(e,n,t,r){const i=Gn(t),s=i==='"'?"Quote":"Apostrophe",l=t.createTracker(r);if(vl(e,t)){const f=t.stack;t.stack=f.filter(function(p){return p!=="phrasing"});const h=t.enter("autolink");let d=l.move("<");return d+=l.move(t.containerPhrasing(e,{before:d,after:">",...l.current()})),d+=l.move(">"),h(),t.stack=f,d}const a=t.enter("link");let o=t.enter("label"),u=l.move("[");return u+=l.move(t.containerPhrasing(e,{before:u,after:"](",...l.current()})),u+=l.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=t.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(t.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(o=t.enter("destinationRaw"),u+=l.move(t.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),o(),e.title&&(o=t.enter(`title${s}`),u+=l.move(" "+i),u+=l.move(t.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),o()),u+=l.move(")"),a(),u}function kp(e,n,t){return vl(e,t)?"<":"["}Nl.peek=wp;function Nl(e,n,t,r){const i=e.referenceType,s=t.enter("linkReference");let l=t.enter("label");const a=t.createTracker(r);let o=a.move("[");const u=t.containerPhrasing(e,{before:o,after:"]",...a.current()});o+=a.move(u+"]["),l();const f=t.stack;t.stack=f.filter(function(d){return d!=="phrasing"}),l=t.enter("reference");const h=t.safe(t.associationId(e),{before:o,after:"]",...a.current()});return l(),t.stack=f,s(),i==="full"||!u||u!==h?o+=a.move(h+"]"):i==="shortcut"?o=o.slice(0,-1):o+=a.move("]"),o}function wp(){return"["}function Yn(e){const n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function Sp(e){const n=Yn(e),t=e.options.bulletOther;if(!t)return n==="*"?"-":"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(t===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+t+"`) to be different");return t}function Cp(e){const n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function Al(e){const n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function jp(e,n,t,r){const i=t.enter("list"),s=t.bulletCurrent;let l=e.ordered?Cp(t):Yn(t);const a=e.ordered?l==="."?")":".":Sp(t);let o=n&&t.bulletLastUsed?l===t.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&f&&(!f.children||!f.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(o=!0),Al(t)===l&&f){let h=-1;for(;++h<e.children.length;){const d=e.children[h];if(d&&d.type==="listItem"&&d.children&&d.children[0]&&d.children[0].type==="thematicBreak"){o=!0;break}}}}o&&(l=a),t.bulletCurrent=l;const u=t.containerFlow(e,r);return t.bulletLastUsed=l,t.bulletCurrent=s,i(),u}function vp(e){const n=e.options.listItemIndent||"one";if(n!=="tab"&&n!=="one"&&n!=="mixed")throw new Error("Cannot serialize items with `"+n+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return n}function Ep(e,n,t,r){const i=vp(t);let s=t.bulletCurrent||Yn(t);n&&n.type==="list"&&n.ordered&&(s=(typeof n.start=="number"&&n.start>-1?n.start:1)+(t.options.incrementListMarker===!1?0:n.children.indexOf(e))+s);let l=s.length+1;(i==="tab"||i==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(l=Math.ceil(l/4)*4);const a=t.createTracker(r);a.move(s+" ".repeat(l-s.length)),a.shift(l);const o=t.enter("listItem"),u=t.indentLines(t.containerFlow(e,a.current()),f);return o(),u;function f(h,d,p){return d?(p?"":" ".repeat(l))+h:(p?s:s+" ".repeat(l-s.length))+h}}function Np(e,n,t,r){const i=t.enter("paragraph"),s=t.enter("phrasing"),l=t.containerPhrasing(e,r);return s(),i(),l}function Ap(e,n,t,r){if(!e.children.some(function(a){return ep(a)}))return t.containerFlow(e,r);const s=t.enter("phrasing"),l=t.containerPhrasing(e,r);return s(),l}function Ip(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}Kn.attention=Tp;Kn.peek=Pp;function Kn(e,n,t,r){const i=t.enter("phrasing"),s=t.containerPhrasing({type:"root",children:[e]},r);return i(),s}function Tp(e,n){return{construct:"strong",markers:Ip(n)==="*"?["*","_"]:["_","*"],sizes:[2]}}function Pp(e,n,t){return t.options.strong||"*"}function zp(e,n,t,r){const i=n?n.children:[],s=i.indexOf(e);return t.safe(e.value,{...r,afterNode:i[s+1],beforeNode:i[s-1]})}function Lp(e){const n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function Dp(e,n,t){const r=(Al(t)+(t.options.ruleSpaces?" ":"")).repeat(Lp(t));return t.options.ruleSpaces?r.slice(0,-1):r}const Il={blockquote:tp,break:Zr,code:ap,definition:up,emphasis:Xn,hardBreak:Zr,heading:mp,html:wl,image:Sl,imageReference:Cl,inlineCode:jl,link:El,linkReference:Nl,list:jp,listItem:Ep,paragraph:Np,root:Ap,strong:Kn,text:zp,thematicBreak:Dp};function Mp(){return{enter:{table:_p,tableData:ei,tableHeader:ei,tableRow:Op},exit:{codeText:Rp,table:Fp,tableData:on,tableHeader:on,tableRow:on}}}function _p(e){const n=e._align;this.enter({type:"table",align:n.map(function(t){return t==="none"?null:t}),children:[]},e),this.data.inTable=!0}function Fp(e){this.exit(e),this.data.inTable=void 0}function Op(e){this.enter({type:"tableRow",children:[]},e)}function on(e){this.exit(e)}function ei(e){this.enter({type:"tableCell",children:[]},e)}function Rp(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,Bp));const t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function Bp(e,n){return n==="|"?n:e}function $p(e){const n=e||{},t=n.tableCellPadding,r=n.tablePipeAlign,i=n.stringLength,s=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
29
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:d,table:l,tableCell:o,tableRow:a}};function l(p,m,w,C){return u(f(p,w,C),p.align)}function a(p,m,w,C){const b=h(p,w,C),N=u([b]);return N.slice(0,N.indexOf(`
|
|
30
|
+
`))}function o(p,m,w,C){const b=w.enter("tableCell"),N=w.enter("phrasing"),E=w.containerPhrasing(p,{...C,before:s,after:s});return N(),b(),E}function u(p,m){return Qh(p,{align:m,alignDelimiters:r,padding:t,stringLength:i})}function f(p,m,w){const C=p.children;let b=-1;const N=[],E=m.enter("table");for(;++b<C.length;)N[b]=h(C[b],m,w);return E(),N}function h(p,m,w){const C=p.children;let b=-1;const N=[],E=m.enter("tableRow");for(;++b<C.length;)N[b]=o(C[b],p,m,w);return E(),N}function d(p,m,w){let C=Il.inlineCode(p,m,w);return w.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function Hp(){return{exit:{taskListCheckValueChecked:ti,taskListCheckValueUnchecked:ti,paragraph:qp}}}function Up(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Vp}}}function ti(e){const n=this.stack[this.stack.length-2];n.type,n.checked=e.type==="taskListCheckValueChecked"}function qp(e){const n=this.stack[this.stack.length-2];if(n&&n.type==="listItem"&&typeof n.checked=="boolean"){const t=this.stack[this.stack.length-1];t.type;const r=t.children[0];if(r&&r.type==="text"){const i=n.children;let s=-1,l;for(;++s<i.length;){const a=i[s];if(a.type==="paragraph"){l=a;break}}l===t&&(r.value=r.value.slice(1),r.value.length===0?t.children.shift():t.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,t.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Vp(e,n,t,r){const i=e.children[0],s=typeof e.checked=="boolean"&&i&&i.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",a=t.createTracker(r);s&&a.move(l);let o=Il.listItem(e,n,t,{...r,...a.current()});return s&&(o=o.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),o;function u(f){return f+l}}function Wp(){return[kh(),$h(),Vh(),Mp(),Hp()]}function Jp(e){return{extensions:[wh(),Hh(e),Wh(),$p(e),Up()]}}const Gp={tokenize:ed,partial:!0},Tl={tokenize:td,partial:!0},Pl={tokenize:nd,partial:!0},zl={tokenize:rd,partial:!0},Xp={tokenize:id,partial:!0},Ll={name:"wwwAutolink",tokenize:Qp,previous:Ml},Dl={name:"protocolAutolink",tokenize:Zp,previous:_l},ve={name:"emailAutolink",tokenize:Kp,previous:Fl},we={};function Yp(){return{text:we}}let ze=48;for(;ze<123;)we[ze]=ve,ze++,ze===58?ze=65:ze===91&&(ze=97);we[43]=ve;we[45]=ve;we[46]=ve;we[95]=ve;we[72]=[ve,Dl];we[104]=[ve,Dl];we[87]=[ve,Ll];we[119]=[ve,Ll];function Kp(e,n,t){const r=this;let i,s;return l;function l(h){return!Nn(h)||!Fl.call(r,r.previous)||Qn(r.events)?t(h):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(h))}function a(h){return Nn(h)?(e.consume(h),a):h===64?(e.consume(h),o):t(h)}function o(h){return h===46?e.check(Xp,f,u)(h):h===45||h===95||te(h)?(s=!0,e.consume(h),o):f(h)}function u(h){return e.consume(h),i=!0,o}function f(h){return s&&i&&le(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(h)):t(h)}}function Qp(e,n,t){const r=this;return i;function i(l){return l!==87&&l!==119||!Ml.call(r,r.previous)||Qn(r.events)?t(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Gp,e.attempt(Tl,e.attempt(Pl,s),t),t)(l))}function s(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(l)}}function Zp(e,n,t){const r=this;let i="",s=!1;return l;function l(h){return(h===72||h===104)&&_l.call(r,r.previous)&&!Qn(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(h),e.consume(h),a):t(h)}function a(h){if(le(h)&&i.length<5)return i+=String.fromCodePoint(h),e.consume(h),a;if(h===58){const d=i.toLowerCase();if(d==="http"||d==="https")return e.consume(h),o}return t(h)}function o(h){return h===47?(e.consume(h),s?u:(s=!0,o)):t(h)}function u(h){return h===null||Ct(h)||J(h)||_e(h)||Ft(h)?t(h):e.attempt(Tl,e.attempt(Pl,f),t)(h)}function f(h){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(h)}}function ed(e,n,t){let r=0;return i;function i(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),i):l===46&&r===3?(e.consume(l),s):t(l)}function s(l){return l===null?t(l):n(l)}}function td(e,n,t){let r,i,s;return l;function l(u){return u===46||u===95?e.check(zl,o,a)(u):u===null||J(u)||_e(u)||u!==45&&Ft(u)?o(u):(s=!0,e.consume(u),l)}function a(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),l}function o(u){return i||r||!s?t(u):n(u)}}function nd(e,n){let t=0,r=0;return i;function i(l){return l===40?(t++,e.consume(l),i):l===41&&r<t?s(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(zl,n,s)(l):l===null||J(l)||_e(l)?n(l):(e.consume(l),i)}function s(l){return l===41&&r++,e.consume(l),i}}function rd(e,n,t){return r;function r(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(e.consume(a),r):a===38?(e.consume(a),s):a===93?(e.consume(a),i):a===60||a===null||J(a)||_e(a)?n(a):t(a)}function i(a){return a===null||a===40||a===91||J(a)||_e(a)?n(a):r(a)}function s(a){return le(a)?l(a):t(a)}function l(a){return a===59?(e.consume(a),r):le(a)?(e.consume(a),l):t(a)}}function id(e,n,t){return r;function r(s){return e.consume(s),i}function i(s){return te(s)?t(s):n(s)}}function Ml(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||J(e)}function _l(e){return!le(e)}function Fl(e){return!(e===47||Nn(e))}function Nn(e){return e===43||e===45||e===46||e===95||te(e)}function Qn(e){let n=e.length,t=!1;for(;n--;){const r=e[n][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){t=!0;break}if(r._gfmAutolinkLiteralWalkedInto){t=!1;break}}return e.length>0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const ld={tokenize:pd,partial:!0};function sd(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:cd,continuation:{tokenize:fd},exit:hd}},text:{91:{name:"gfmFootnoteCall",tokenize:ud},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:ad,resolveTo:od}}}}function ad(e,n,t){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;i--;){const o=r.events[i][1];if(o.type==="labelImage"){l=o;break}if(o.type==="gfmFootnoteCall"||o.type==="labelLink"||o.type==="label"||o.type==="image"||o.type==="link")break}return a;function a(o){if(!l||!l._balanced)return t(o);const u=ye(r.sliceSerialize({start:l.end,end:r.now()}));return u.codePointAt(0)!==94||!s.includes(u.slice(1))?t(o):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),n(o))}}function od(e,n){let t=e.length;for(;t--;)if(e[t][1].type==="labelImage"&&e[t][0]==="enter"){e[t][1];break}e[t+1][1].type="data",e[t+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[t+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[t+3][1].end),end:Object.assign({},e[t+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},a=[e[t+1],e[t+2],["enter",r,n],e[t+3],e[t+4],["enter",i,n],["exit",i,n],["enter",s,n],["enter",l,n],["exit",l,n],["exit",s,n],e[e.length-2],e[e.length-1],["exit",r,n]];return e.splice(t,e.length-t+1,...a),e}function ud(e,n,t){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,l;return a;function a(h){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),o}function o(h){return h!==94?t(h):(e.enter("gfmFootnoteCallMarker"),e.consume(h),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(h){if(s>999||h===93&&!l||h===null||h===91||J(h))return t(h);if(h===93){e.exit("chunkString");const d=e.exit("gfmFootnoteCallString");return i.includes(ye(r.sliceSerialize(d)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(h)}return J(h)||(l=!0),s++,e.consume(h),h===92?f:u}function f(h){return h===91||h===92||h===93?(e.consume(h),s++,u):u(h)}}function cd(e,n,t){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,l=0,a;return o;function o(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):t(m)}function f(m){if(l>999||m===93&&!a||m===null||m===91||J(m))return t(m);if(m===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return s=ye(r.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return J(m)||(a=!0),l++,e.consume(m),m===92?h:f}function h(m){return m===91||m===92||m===93?(e.consume(m),l++,f):f(m)}function d(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),i.includes(s)||i.push(s),q(e,p,"gfmFootnoteDefinitionWhitespace")):t(m)}function p(m){return n(m)}}function fd(e,n,t){return e.check(pt,n,e.attempt(ld,n,t))}function hd(e){e.exit("gfmFootnoteDefinition")}function pd(e,n,t){const r=this;return q(e,i,"gfmFootnoteDefinitionIndent",5);function i(s){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?n(s):t(s)}}function dd(e){let t=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:i};return t==null&&(t=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(l,a){let o=-1;for(;++o<l.length;)if(l[o][0]==="enter"&&l[o][1].type==="strikethroughSequenceTemporary"&&l[o][1]._close){let u=o;for(;u--;)if(l[u][0]==="exit"&&l[u][1].type==="strikethroughSequenceTemporary"&&l[u][1]._open&&l[o][1].end.offset-l[o][1].start.offset===l[u][1].end.offset-l[u][1].start.offset){l[o][1].type="strikethroughSequence",l[u][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},l[u][1].start),end:Object.assign({},l[o][1].end)},h={type:"strikethroughText",start:Object.assign({},l[u][1].end),end:Object.assign({},l[o][1].start)},d=[["enter",f,a],["enter",l[u][1],a],["exit",l[u][1],a],["enter",h,a]],p=a.parser.constructs.insideSpan.null;p&&xe(d,d.length,0,Ot(p,l.slice(u+1,o),a)),xe(d,d.length,0,[["exit",h,a],["enter",l[o][1],a],["exit",l[o][1],a],["exit",f,a]]),xe(l,u-1,o-u+3,d),o=u+d.length-2;break}}for(o=-1;++o<l.length;)l[o][1].type==="strikethroughSequenceTemporary"&&(l[o][1].type="data");return l}function s(l,a,o){const u=this.previous,f=this.events;let h=0;return d;function d(m){return u===126&&f[f.length-1][1].type!=="characterEscape"?o(m):(l.enter("strikethroughSequenceTemporary"),p(m))}function p(m){const w=vt(u);if(m===126)return h>1?o(m):(l.consume(m),h++,p);if(h<2&&!t)return o(m);const C=l.exit("strikethroughSequenceTemporary"),b=vt(m);return C._open=!b||b===2&&!!w,C._close=!w||w===2&&!!b,a(m)}}}class md{constructor(){this.map=[],this.index=new Map}add(n,t,r){gd(this,n,t,r)}consume(n){if(this.map.sort(function(s,l){return s[0]-l[0]}),this.map.length===0)return;let t=this.map.length;const r=[];for(;t>0;)t-=1,r.push(n.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),n.length=this.map[t][0];r.push(n.slice()),n.length=0;let i=r.pop();for(;i;){for(const s of i)n.push(s);i=r.pop()}this.map.length=0,this.index.clear()}}function gd(e,n,t,r){if(t===0&&r.length===0)return;const i=e.index.get(n);if(i){i[1]+=t,i[2].push(...r);return}const s=[n,t,r];e.map.push(s),e.index.set(n,s)}function xd(e,n){let t=!1;const r=[];for(;n<e.length;){const i=e[n];if(t){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[n+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[n-1][1].type==="tableDelimiterMarker"){const s=r.length-1;r[s]=r[s]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(t=!0);n+=1}return r}function yd(){return{flow:{null:{name:"table",tokenize:bd,resolveAll:kd}}}}function bd(e,n,t){const r=this;let i=0,s=0,l;return a;function a(y){let I=r.events.length-1;for(;I>-1;){const{type:_}=r.events[I][1];if(_==="lineEnding"||_==="linePrefix")I--;else break}const L=I>-1?r.events[I][1].type:null,R=L==="tableHead"||L==="tableRow"?k:o;return R===k&&r.parser.lazy[r.now().line]?t(y):R(y)}function o(y){return e.enter("tableHead"),e.enter("tableRow"),u(y)}function u(y){return y===124||(l=!0,s+=1),f(y)}function f(y){return y===null?t(y):F(y)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):t(y):U(y)?q(e,f,"whitespace")(y):(s+=1,l&&(l=!1,i+=1),y===124?(e.enter("tableCellDivider"),e.consume(y),e.exit("tableCellDivider"),l=!0,f):(e.enter("data"),h(y)))}function h(y){return y===null||y===124||J(y)?(e.exit("data"),f(y)):(e.consume(y),y===92?d:h)}function d(y){return y===92||y===124?(e.consume(y),h):h(y)}function p(y){return r.interrupt=!1,r.parser.lazy[r.now().line]?t(y):(e.enter("tableDelimiterRow"),l=!1,U(y)?q(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(y):m(y))}function m(y){return y===45||y===58?C(y):y===124?(l=!0,e.enter("tableCellDivider"),e.consume(y),e.exit("tableCellDivider"),w):j(y)}function w(y){return U(y)?q(e,C,"whitespace")(y):C(y)}function C(y){return y===58?(s+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(y),e.exit("tableDelimiterMarker"),b):y===45?(s+=1,b(y)):y===null||F(y)?A(y):j(y)}function b(y){return y===45?(e.enter("tableDelimiterFiller"),N(y)):j(y)}function N(y){return y===45?(e.consume(y),N):y===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(y),e.exit("tableDelimiterMarker"),E):(e.exit("tableDelimiterFiller"),E(y))}function E(y){return U(y)?q(e,A,"whitespace")(y):A(y)}function A(y){return y===124?m(y):y===null||F(y)?!l||i!==s?j(y):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(y)):j(y)}function j(y){return t(y)}function k(y){return e.enter("tableRow"),P(y)}function P(y){return y===124?(e.enter("tableCellDivider"),e.consume(y),e.exit("tableCellDivider"),P):y===null||F(y)?(e.exit("tableRow"),n(y)):U(y)?q(e,P,"whitespace")(y):(e.enter("data"),D(y))}function D(y){return y===null||y===124||J(y)?(e.exit("data"),P(y)):(e.consume(y),y===92?O:D)}function O(y){return y===92||y===124?(e.consume(y),D):D(y)}}function kd(e,n){let t=-1,r=!0,i=0,s=[0,0,0,0],l=[0,0,0,0],a=!1,o=0,u,f,h;const d=new md;for(;++t<e.length;){const p=e[t],m=p[1];p[0]==="enter"?m.type==="tableHead"?(a=!1,o!==0&&(ni(d,n,o,u,f),f=void 0,o=0),u={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},d.add(t,0,[["enter",u,n]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,h=void 0,s=[0,0,0,0],l=[0,t+1,0,0],a&&(a=!1,f={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},d.add(t,0,[["enter",f,n]])),i=m.type==="tableDelimiterRow"?2:f?3:1):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(s[1]!==0&&(l[0]=l[1],h=yt(d,n,s,i,void 0,h),s=[0,0,0,0]),l[2]=t)):m.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(l[0]=l[1],h=yt(d,n,s,i,void 0,h)),s=l,l=[s[1],t,0,0])):m.type==="tableHead"?(a=!0,o=t):m.type==="tableRow"||m.type==="tableDelimiterRow"?(o=t,s[1]!==0?(l[0]=l[1],h=yt(d,n,s,i,t,h)):l[1]!==0&&(h=yt(d,n,l,i,t,h)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(l[3]=t)}for(o!==0&&ni(d,n,o,u,f),d.consume(n.events),t=-1;++t<n.events.length;){const p=n.events[t];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=xd(n.events,t))}return e}function yt(e,n,t,r,i,s){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";t[0]!==0&&(s.end=Object.assign({},qe(n.events,t[0])),e.add(t[0],0,[["exit",s,n]]));const o=qe(n.events,t[1]);if(s={type:l,start:Object.assign({},o),end:Object.assign({},o)},e.add(t[1],0,[["enter",s,n]]),t[2]!==0){const u=qe(n.events,t[2]),f=qe(n.events,t[3]),h={type:a,start:Object.assign({},u),end:Object.assign({},f)};if(e.add(t[2],0,[["enter",h,n]]),r!==2){const d=n.events[t[2]],p=n.events[t[3]];if(d[1].end=Object.assign({},p[1].end),d[1].type="chunkText",d[1].contentType="text",t[3]>t[2]+1){const m=t[2]+1,w=t[3]-t[2]-1;e.add(m,w,[])}}e.add(t[3]+1,0,[["exit",h,n]])}return i!==void 0&&(s.end=Object.assign({},qe(n.events,i)),e.add(i,0,[["exit",s,n]]),s=void 0),s}function ni(e,n,t,r,i){const s=[],l=qe(n.events,t);i&&(i.end=Object.assign({},l),s.push(["exit",i,n])),r.end=Object.assign({},l),s.push(["exit",r,n]),e.add(t+1,0,s)}function qe(e,n){const t=e[n],r=t[0]==="enter"?"start":"end";return t[1][r]}const wd={name:"tasklistCheck",tokenize:Cd};function Sd(){return{text:{91:wd}}}function Cd(e,n,t){const r=this;return i;function i(o){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?t(o):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),s)}function s(o){return J(o)?(e.enter("taskListCheckValueUnchecked"),e.consume(o),e.exit("taskListCheckValueUnchecked"),l):o===88||o===120?(e.enter("taskListCheckValueChecked"),e.consume(o),e.exit("taskListCheckValueChecked"),l):t(o)}function l(o){return o===93?(e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):t(o)}function a(o){return F(o)?n(o):U(o)?e.check({tokenize:jd},n,t)(o):t(o)}}function jd(e,n,t){return q(e,r,"whitespace");function r(i){return i===null?t(i):n(i)}}function vd(e){return Xi([Yp(),sd(),dd(e),yd(),Sd()])}const Ed={};function Nd(e){const n=this,t=e||Ed,r=n.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(vd(t)),s.push(Wp()),l.push(Jp(t))}const Le=()=>`${window.routePrefix??""}/docs/api`,Ad=e=>`${window.routePrefix??""}/docs/${encodeURIComponent(e)}`,At={list:async(e,n)=>{const{data:t}=await ee.getJson(`${Le()}/list`,{params:{locale:e},signal:n});return t.documents??[]},keywords:async(e,n)=>{const{data:t}=await ee.getJson(`${Le()}/keywords`,{params:{locale:e},signal:n});return t.keywords??{}},search:async(e,n)=>{const{data:t}=await ee.getJson(`${Le()}/search`,{params:{q:e.query||void 0,keywords:e.keywords?.length?e.keywords.join(","):void 0,url:e.url||void 0,model:e.model||void 0,locale:e.locale||void 0},signal:n});return t.results??[]},context:async(e,n,t,r)=>{const{data:i}=await ee.getJson(`${Le()}/context`,{params:{url:e,model:n,locale:t},signal:r});return i.documents??[]},doc:async(e,n,t)=>{const{data:r}=await ee.getJson(`${Le()}/doc/${encodeURIComponent(e)}`,{params:{locale:n},signal:t});return r},resolve:async(e,n,t)=>{if(n.length===0)return{};const{data:r}=await ee.getJson(`${Le()}/resolve`,{params:{from:e,refs:n.join(",")},signal:t});return r.resolved??{}},schema:async(e,n)=>{const{data:t}=await ee.getJson(`${Le()}/schema`,{params:{model:e},signal:n});return t}},kt=e=>e.trim().toLowerCase().replace(/[^\p{L}\p{N}]+/gu,"-").replace(/^-+|-+$/g,""),fm=e=>{const n=[];let t=!1;for(const r of e.split(`
|
|
31
|
+
`)){if(/^\s*(```|~~~)/.test(r)){t=!t;continue}if(t)continue;const i=/^(#{2,3})\s+(.+?)\s*#*\s*$/.exec(r);if(!i)continue;const s=i[2].replace(/[*_`]/g,"").trim();n.push({depth:i[1].length,title:s,slug:kt(s)})}return n},Id=e=>{const n=new Set,t=/\]\(\s*([^)\s]+)/g;let r;for(;(r=t.exec(e))!==null;){const i=r[1];!i||i.startsWith("#")||i.startsWith("/")||/^[a-z][a-z0-9+.-]*:/i.test(i)||i.startsWith("//")||n.add(i)}return[...n]},Ve=e=>e==null||typeof e=="boolean"?"":typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map(Ve).join(""):v.isValidElement(e)?Ve(e.props.children):"",Td=()=>typeof document<"u"&&document.documentElement.classList.contains("dark"),Pd=()=>{const[e,n]=v.useState(!1);return{isCopied:e,copy:r=>{!r||typeof navigator>"u"||!navigator.clipboard||navigator.clipboard.writeText(r).then(()=>{n(!0),setTimeout(()=>n(!1),2e3)},()=>{})}}},zd=({code:e})=>{const[n,t]=v.useState(null),[r,i]=v.useState(!1),s=v.useId().replace(/[^a-zA-Z0-9]/g,"");return v.useEffect(()=>{let l=!1;return t(null),i(!1),aa(()=>import("./mermaid.core-Dp-0i8FJ.js").then(a=>a.bI),__vite__mapDeps([0,1,2,3]),import.meta.url).then(async({default:a})=>{a.initialize({startOnLoad:!1,securityLevel:"strict",theme:Td()?"dark":"default"});const o=await a.render(`mermaid-${s}`,e);l||t(o.svg)}).catch(()=>{l||i(!0)}),()=>{l=!0}},[e,s]),r?c.jsx("pre",{className:"aui-md-pre border-border/50 bg-muted/30 overflow-x-auto rounded-xl border p-3.5 text-[13px]",children:e}):n?c.jsx("div",{className:"my-3 flex justify-center overflow-x-auto rounded-xl border p-3 [&_svg]:max-w-full",dangerouslySetInnerHTML:{__html:n}}):c.jsx("div",{className:"bg-muted/30 text-muted-foreground my-3 rounded-xl border p-4 text-sm",children:"…"})},Ld=({source:e})=>{const[n,t]=v.useState(null),[r,i]=v.useState(null),[s,l]=v.useState(!1),a=v.useMemo(()=>{try{const o=JSON.parse(e);return o&&typeof o=="object"?o:null}catch{return null}},[e]);return v.useEffect(()=>{if(!a){l(!0);return}if(a.fields){t(a.fields),i(a.title??null);return}if(!a.model){l(!0);return}const o=new AbortController;return At.schema(a.model,o.signal).then(u=>{o.signal.aborted||(t(u.fields),i(a.title??u.title))}).catch(()=>{o.signal.aborted||l(!0)}),()=>o.abort()},[a]),s?c.jsx("pre",{className:"aui-md-pre border-border/50 bg-muted/30 overflow-x-auto rounded-xl border p-3.5 text-[13px]",children:e}):c.jsx(Di,{className:"my-3",fields:n,title:r,loading:!n})},Dd=({language:e,code:n})=>{const{isCopied:t,copy:r}=Pd();return c.jsxs("div",{className:"my-3",children:[c.jsxs("div",{className:"border-border/50 bg-muted/50 flex items-center justify-between rounded-t-xl border border-b-0 px-3.5 py-1.5 text-xs",children:[c.jsx("span",{className:"text-muted-foreground font-medium lowercase",children:e}),c.jsx("button",{type:"button",className:"text-muted-foreground hover:text-foreground transition-colors",onClick:()=>r(n),"aria-label":"Copy",children:t?c.jsx(ci,{className:"size-3.5"}):c.jsx(oa,{className:"size-3.5"})})]}),c.jsx("pre",{className:"aui-md-pre border-border/50 bg-muted/30 overflow-x-auto rounded-b-xl border border-t-0 p-3.5 text-[13px] leading-relaxed",children:c.jsx("code",{children:n})})]})};function Md({markdown:e,docLinks:n={},onDocLink:t,className:r}){const i=v.useMemo(()=>({h1:({className:s,children:l,...a})=>c.jsx("h1",{id:kt(Ve(l)),className:X("aui-md-h1 mt-6 mb-3 scroll-mt-20 text-2xl font-semibold first:mt-0",s),...a,children:l}),h2:({className:s,children:l,...a})=>c.jsx("h2",{id:kt(Ve(l)),className:X("aui-md-h2 mt-6 mb-2 scroll-mt-20 text-xl font-semibold first:mt-0",s),...a,children:l}),h3:({className:s,children:l,...a})=>c.jsx("h3",{id:kt(Ve(l)),className:X("aui-md-h3 mt-5 mb-2 scroll-mt-20 text-lg font-semibold first:mt-0",s),...a,children:l}),h4:({className:s,...l})=>c.jsx("h4",{className:X("aui-md-h4 mt-4 mb-1.5 text-base font-medium first:mt-0",s),...l}),p:({className:s,...l})=>c.jsx("p",{className:X("aui-md-p my-3 leading-relaxed first:mt-0 last:mb-0",s),...l}),a:({className:s,href:l,children:a,...o})=>{const u=(l??"").trim(),f=X("aui-md-a text-primary hover:text-primary/80 underline underline-offset-2",s);if(u.startsWith("#"))return c.jsx("a",{className:f,href:u,...o,children:a});if(/^[a-z][a-z0-9+.-]*:/i.test(u)||u.startsWith("//"))return c.jsx("a",{className:f,href:u,target:"_blank",rel:"noreferrer",...o,children:a});if(u.startsWith("/"))return c.jsx("a",{className:f,href:u,onClick:p=>{p.button!==0||p.metaKey||p.ctrlKey||p.shiftKey||p.altKey||(p.preventDefault(),ft.visit(u))},...o,children:a});const d=n[u]??n[u.replace(/#.*$/,"")];return!d||!t?c.jsx("span",{className:X("text-foreground",s),children:a}):c.jsx("a",{className:f,href:Ad(d),onClick:p=>{p.button!==0||p.metaKey||p.ctrlKey||p.shiftKey||p.altKey||(p.preventDefault(),t(d))},...o,children:a})},blockquote:({className:s,...l})=>c.jsx("blockquote",{className:X("aui-md-blockquote border-muted-foreground/30 text-muted-foreground my-3 border-s-2 ps-4",s),...l}),ul:({className:s,...l})=>c.jsx("ul",{className:X("aui-md-ul marker:text-muted-foreground my-3 ms-5 list-disc [&>li]:mt-1",s),...l}),ol:({className:s,...l})=>c.jsx("ol",{className:X("aui-md-ol marker:text-muted-foreground my-3 ms-5 list-decimal [&>li]:mt-1",s),...l}),li:({className:s,...l})=>c.jsx("li",{className:X("aui-md-li leading-relaxed",s),...l}),hr:({className:s,...l})=>c.jsx("hr",{className:X("aui-md-hr border-muted-foreground/20 my-4",s),...l}),table:({className:s,...l})=>c.jsx("div",{className:"my-3 overflow-x-auto",children:c.jsx("table",{className:X("aui-md-table w-full border-separate border-spacing-0 text-sm",s),...l})}),th:({className:s,...l})=>c.jsx("th",{className:X("aui-md-th bg-muted px-3 py-1.5 text-start font-medium first:rounded-ss-lg last:rounded-se-lg",s),...l}),td:({className:s,...l})=>c.jsx("td",{className:X("aui-md-td border-muted-foreground/20 border-s border-b px-3 py-1.5 text-start last:border-e",s),...l}),tr:({className:s,...l})=>c.jsx("tr",{className:X("aui-md-tr m-0 border-b p-0 first:border-t",s),...l}),img:({className:s,...l})=>c.jsx("img",{className:X("my-3 max-w-full rounded-lg border",s),...l}),code:({className:s,...l})=>c.jsx("code",{className:X("aui-md-inline-code bg-muted rounded-md px-1.5 py-0.5 font-mono text-[0.85em]",s),...l}),pre:({children:s})=>{const l=Array.isArray(s)?s[0]:s;if(!v.isValidElement(l))return c.jsx("pre",{className:"aui-md-pre border-border/50 bg-muted/30 my-3 overflow-x-auto rounded-xl border p-3.5 text-[13px]",children:s});const a=/language-([\w-]+)/.exec(l.props.className??"")?.[1]??"",o=Ve(l.props.children).replace(/\n$/,"");return a==="mermaid"?c.jsx(zd,{code:o}):a==="schema"?c.jsx(Ld,{source:o}):c.jsx(Dd,{language:a||"text",code:o})}}),[n,t]);return c.jsx("div",{className:X("aui-md text-sm",r),children:c.jsx(ch,{remarkPlugins:[Nd],components:i,children:e})})}function _d(e,n){const[t,r]=v.useState(null),[i,s]=v.useState({}),[l,a]=v.useState(!1),[o,u]=v.useState(!1);return v.useEffect(()=>{if(!e){r(null),s({}),u(!1);return}const f=new AbortController;return a(!0),u(!1),At.doc(e,n,f.signal).then(async h=>{if(f.signal.aborted)return;r(h);const d=Id(h.markdown),p=d.length>0?await At.resolve(h.meta.id,d,f.signal).catch(()=>({})):{};f.signal.aborted||s(p)}).catch(()=>{f.signal.aborted||(r(null),u(!0))}).finally(()=>{f.signal.aborted||a(!1)}),()=>f.abort()},[e,n]),{content:t,docLinks:i,loading:l,error:o}}const Fd="adminizer:ai-attach-doc";function Od(e){window.__adminizerAttachDoc__=e,window.dispatchEvent(new CustomEvent(Fd,{detail:e}))}const ut="info",ri=()=>{if(typeof window>"u")return{open:!1,docId:null};const e=window.location.hash.replace(/^#/,"");return e===ut?{open:!0,docId:null}:e.startsWith(`${ut}=`)?{open:!0,docId:decodeURIComponent(e.slice(ut.length+1))||null}:{open:!1,docId:null}},Rd=e=>{const{pathname:n,search:t}=window.location;window.history.pushState(null,"",`${n}${t}${e}`),window.dispatchEvent(new HashChangeEvent("hashchange"))},Bd=()=>{const[e,n]=v.useState(ri);return v.useEffect(()=>{const t=()=>n(ri());window.addEventListener("hashchange",t),window.addEventListener("popstate",t);const r=ft.on("navigate",t);return()=>{window.removeEventListener("hashchange",t),window.removeEventListener("popstate",t),r()}},[]),e},$d=()=>{const e=re();return v.useMemo(()=>{const n=window.routePrefix??"",t=(e.url||window.location.pathname).split(/[?#]/)[0],r=n&&t.startsWith(n)?t.slice(n.length):t,i=/^\/model\/([^/]+)/.exec(r);return i?decodeURIComponent(i[1]):null},[e.url])};function Hd({open:e,docId:n,items:t,model:r,onOpenDoc:i,onClose:s}){const{t:l,locale:a}=Ge(),{isEnabled:o,openChat:u}=_t(),[f,h]=v.useState(void 0),{content:d,docLinks:p,loading:m,error:w}=_d(e?n:null,f??a),[C,b]=v.useState(null),[N,E]=v.useState(!1),[A,j]=v.useState("docs");v.useEffect(()=>h(void 0),[n]),v.useEffect(()=>{if(!e||!r)return;const O=new AbortController;return b(null),E(!1),At.schema(r,O.signal).then(y=>{O.signal.aborted||b(y)}).catch(()=>{O.signal.aborted||E(!0)}),()=>O.abort()},[r,e]);const k=v.useMemo(()=>{const O=new Map;for(const y of t){const I=y.section??"";O.set(I,[...O.get(I)??[],y])}return[...O.entries()]},[t]),P=v.useRef(!1),D=()=>{d&&(P.current=!0,s(),u(),Od({id:d.meta.id,title:d.meta.title}))};return c.jsx(ca,{open:e,onOpenChange:O=>!O&&s(),children:c.jsxs(fa,{side:"right",className:"z-[1002] w-full gap-0 p-0 sm:max-w-xl",onCloseAutoFocus:O=>{P.current&&(P.current=!1,O.preventDefault())},children:[c.jsxs(ha,{className:"border-b px-4 py-3",children:[c.jsxs("div",{className:"flex items-center gap-2 pe-8",children:[n&&c.jsx(ne,{variant:"ghost",size:"icon",className:"-ms-2 shrink-0",onClick:()=>i(null),"aria-label":l("Back to contents"),children:c.jsx(pa,{className:"size-4"})}),c.jsx(da,{className:"truncate",children:n?d?.meta.title??l("Documentation"):l("Page documentation")})]}),c.jsx(ma,{className:"sr-only",children:l("Documentation")})]}),c.jsxs(ga,{value:r?A:"docs",onValueChange:j,className:"flex min-h-0 flex-1 flex-col gap-0",children:[r&&c.jsxs(xa,{className:"mx-4 mt-3 w-fit",children:[c.jsx(ur,{value:"docs",children:l("Documentation")}),c.jsx(ur,{value:"schema",children:l("Schema")})]}),c.jsx(cr,{value:"docs",className:"min-h-0 flex-1 overflow-y-auto px-4 py-3",children:n?m&&!d?c.jsx("p",{className:"text-muted-foreground text-sm",children:l("Loading...")}):w||!d?c.jsx("p",{className:"text-muted-foreground text-sm",children:l("Failed to load documentation")}):c.jsxs("div",{className:"flex flex-col gap-3",children:[(d.meta.locales?.length??0)>1&&c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx("span",{className:"text-muted-foreground text-xs",children:l("Language")}),d.meta.locales?.map(O=>c.jsx("button",{type:"button",onClick:()=>h(O),className:X("rounded-full border px-2 py-0.5 text-xs uppercase transition-colors",O===d.locale?"bg-primary text-primary-foreground border-transparent":"hover:bg-accent"),children:O},O))]}),c.jsx(Md,{markdown:d.markdown,docLinks:p,onDocLink:i})]}):t.length===0?c.jsx("p",{className:"text-muted-foreground text-sm",children:l("Nothing found")}):c.jsx("div",{className:"flex flex-col gap-4",children:k.map(([O,y])=>c.jsxs("div",{className:"flex flex-col gap-1",children:[O&&c.jsx("div",{className:"text-muted-foreground px-1 text-xs font-medium uppercase",children:O}),y.map(I=>c.jsxs("button",{type:"button",onClick:()=>i(I.id),className:"hover:bg-accent flex items-center gap-2 rounded-md px-2 py-1.5 text-start text-sm transition-colors",children:[c.jsx(ya,{className:"text-muted-foreground size-4 shrink-0"}),c.jsx("span",{className:"truncate",children:I.title})]},I.id))]},O))})}),r&&c.jsx(cr,{value:"schema",className:"min-h-0 flex-1 overflow-y-auto px-4 py-3",children:c.jsx(Di,{fields:C?.fields??(N?[]:null),title:C?.title??r,loading:!C&&!N})})]}),c.jsxs("div",{className:"flex items-center justify-between gap-2 border-t px-4 py-3",children:[c.jsx(ne,{variant:"ghost",size:"sm",asChild:!0,children:c.jsxs(pe,{href:`${window.routePrefix}/docs${n?`/${encodeURIComponent(n)}`:""}`,children:[c.jsx(ba,{className:"size-4"}),l("Open in knowledge base")]})}),o&&d&&c.jsxs(ne,{variant:"outline",size:"sm",onClick:D,children:[c.jsx(fi,{className:"size-4"}),l("Send to assistant")]})]})]})})}function Ud(){const n=re().props.docs,{t}=Ge(),{open:r,docId:i}=Bd(),s=$d(),l=v.useCallback(f=>{Rd(f?`#${ut}=${encodeURIComponent(f)}`:`#${ut}`)},[]),a=v.useCallback(()=>{const{pathname:f,search:h}=window.location;window.history.pushState(null,"",`${f}${h}`),window.dispatchEvent(new HashChangeEvent("hashchange"))},[]);if(!n)return null;const o=n.items??[],u=o.length>0||!!s;return c.jsxs(c.Fragment,{children:[u&&c.jsxs(Lt,{children:[c.jsx(Dt,{asChild:!0,children:c.jsx(ne,{variant:"ghost",size:"icon",className:"shrink-0",onClick:()=>l(null),"aria-label":t("Page documentation"),children:c.jsx(ua,{className:"size-4"})})}),c.jsx(Mt,{side:"bottom",className:"z-[1002]",children:c.jsx("span",{children:t("Page documentation")})})]}),c.jsx(Hd,{open:r,docId:i,items:o,model:s,onOpenDoc:l,onClose:a})]})}function Ol({breadcrumbs:e=[]}){return c.jsx("header",{className:"border-sidebar-border/50 flex h-16 shrink-0 items-center gap-2 border-b px-6 transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12 md:px-4",children:c.jsxs("div",{className:"flex justify-between w-full",children:[c.jsx("div",{className:"flex items-center gap-2",children:c.jsx(Te,{name:"HeaderStart",Default:qd,breadcrumbs:e})}),c.jsx("div",{className:"flex gap-4 items-center",children:c.jsx(Te,{name:"HeaderActions",Default:Vd,breadcrumbs:e})})]})})}function qd({breadcrumbs:e=[]}){return c.jsxs(c.Fragment,{children:[c.jsx(ka,{className:"-ml-1"}),c.jsx(Ii,{breadcrumbs:e})]})}function Vd(){const{tabs:e}=mi(),n=re();return c.jsxs(c.Fragment,{children:[c.jsx(Li,{}),c.jsx(Ya,{}),c.jsx(Ud,{}),n.props.history&&c.jsx(pe,{href:`${window.routePrefix}/history/view-all`,children:c.jsx(ne,{variant:"ghost",size:"icon",className:"shrink-0",children:c.jsx(wa,{})})}),c.jsx(zi,{}),n.props.notifications&&(e===null?c.jsx("div",{className:"w-[40px] flex-none flex justify-center",children:c.jsx(Xe,{className:"size-4 animate-spin"})}):e.length?c.jsx(Xa,{}):null),c.jsx(Pi,{})]})}const Rl=v.memo(({children:e,breadcrumbs:n=[],className:t})=>{const r=re(),i=n.length?n:r.props.breadcrumbs??[];return c.jsxs(ki,{variant:"sidebar",children:[c.jsx(pi,{title:r.props.title}),c.jsx(Te,{name:"Sidebar",Default:Ai}),c.jsxs(Sa,{className:"overflow-hidden",children:[c.jsx(Te,{name:"Header",Default:Ol,breadcrumbs:i}),c.jsx("div",{"data-scroll-region":"content",className:X("relative flex min-h-0 flex-1 overflow-y-auto overscroll-contain",t),children:c.jsx("div",{className:"flex min-h-full w-full flex-col",children:e})})]})]})}),un=new Map,An=new Map;function Wd(e){let n=un.get(e);return n||(n=import(e).then(t=>(An.set(e,t),t)),n.catch(()=>un.delete(e)),un.set(e,n)),n}function Jd(e){if([...document.head.querySelectorAll("link[rel='stylesheet']")].some(r=>r.href.includes(e)))return;const t=document.createElement("link");t.rel="stylesheet",t.href=e,document.head.appendChild(t)}const ii=[],li=[];function Gd(e,n=[]){const t=e.join(`
|
|
32
|
+
`),r=e.every(l=>An.has(l))?e.map(l=>An.get(l)):null,[i,s]=v.useState({key:"",modules:ii,errors:[]});return v.useEffect(()=>{if(n.forEach(Jd),r)return;let l=!1;return Promise.allSettled(e.map(Wd)).then(a=>{l||s({key:t,modules:a.map(o=>o.status==="fulfilled"?o.value:null),errors:a.flatMap(o=>o.status==="rejected"?[o.reason]:[])})}),()=>{l=!0}},[t,n.join(`
|
|
33
|
+
`)]),!e.length||r?{modules:r??ii,loading:!1,errors:li}:i.key===t?{modules:i.modules,loading:!1,errors:i.errors}:{modules:null,loading:!0,errors:li}}const Xd={root:"stock",layers:[],stylesheets:[]};function Yd(e){if(!e||typeof e!="object")return Xd;const{root:n,layers:t,stylesheets:r}=e;return{root:n==="none"?"none":"stock",layers:Array.isArray(t)?t.filter(i=>typeof i?.module=="string"):[],stylesheets:Array.isArray(r)?r.filter(i=>typeof i=="string"):[]}}function Kd(e,n){const t={};for(const r of Ei)n[r]!==void 0&&(t[r]=n[r]);return e.default==="Layout"&&n.default!==void 0&&(t.Layout=n.default),t}function Qd({children:e,className:n}){return c.jsx("div",{"data-scroll-region":"content",className:X("flex min-h-svh w-full flex-col",n),children:e})}function Zd({head:e}){return c.jsxs("div",{className:"flex h-svh w-full items-center justify-center",children:[e,c.jsx(Xe,{className:"size-10 animate-spin text-neutral-500"})]})}const em=[];function tm({children:e,breadcrumbs:n=[],className:t}){const r=re(),i=r.props.adminContext,s=Yd(i?.layout),l=v.useMemo(()=>s.layers.map(p=>p.module),[s.layers.map(p=>p.module).join(`
|
|
34
|
+
`)]),a=Gd(l,s.stylesheets),o=v.useMemo(()=>a.modules?a.modules.flatMap((p,m)=>p?[Kd(s.layers[m],p)]:[]):em,[l,a.modules?.length,a.loading]);v.useEffect(()=>{a.errors.forEach(p=>console.error("[Adminizer] Failed to load a context layout module",p))},[a.errors]);const u=c.jsx(pi,{title:r.props.title});if(a.loading)return c.jsx(Zd,{head:u});const f=n.length?n:r.props.breadcrumbs??[],h=s.root==="none"?Qd:Rl,d=s.root==="none"||o.some(p=>p.Layout!==void 0);return c.jsxs(Ha,{layers:o,children:[d&&u,c.jsx(Te,{name:"Layout",Default:h,breadcrumbs:f,className:t,context:i,children:e})]})}const nm=[],rm=[];function im(){const e=re(),{adminContext:n,adminContexts:t=rm,menu:r,menuSections:i}=e.props,s=r??nm,l=v.useMemo(()=>wi(Si(s),e.url),[s,e.url]),a=v.useCallback(u=>l!==null&&St(u)===l,[l]),o=v.useCallback(u=>{const f=t.find(h=>h.id===u);f&&ft.visit(f.link)},[t]);return{context:n,contexts:t,menu:s,sections:i??{},isActive:a,switchTo:o}}const lm=Object.freeze(Object.defineProperty({__proto__:null,AppShell:ki,AppSidebar:Ai,AppSidebarHeader:Ol,Breadcrumbs:Ii,ContextSwitcher:vi,DefaultLayout:Rl,GlobalSearch:Li,MaterialIcon:Y,NavMain:Ci,NavUser:Pi,ThemeSwitcher:zi,UserInfo:Pn,UserMenuContent:Ti,useAdminContext:im},Symbol.toStringTag,{value:"Module"}));function sm(){window.AdminizerShell??={},Object.assign(window.AdminizerShell,lm)}sm();const am=v.memo(({children:e,className:n,breadcrumbs:t})=>c.jsx(_a,{children:c.jsx(tm,{breadcrumbs:t,className:n,children:e})})),hm=(e,n={})=>{const t=e;return t.layout=r=>c.jsx(am,{...n,children:r}),t};export{Md as M,_d as a,Ad as b,Y as c,At as d,fm as e,mi as f,Od as s,_t as u,hm as w};
|