juneau 0.3.0 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +13 -13
- package/dist/index.js.map +1 -1
- package/dist/server/createSkillSet.d.ts.map +1 -1
- package/dist/server/index.cjs +12 -0
- package/dist/server/index.cjs.map +1 -0
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +105 -68
- package/dist/server/index.js.map +1 -1
- package/dist/server/streamToWire.d.ts +8 -5
- package/dist/server/streamToWire.d.ts.map +1 -1
- package/dist/server/types.d.ts +8 -0
- package/dist/server/types.d.ts.map +1 -1
- package/dist/server/withToolRecovery.d.ts +17 -6
- package/dist/server/withToolRecovery.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -228,15 +228,15 @@ Wraps skill definitions into ai-sdk `tools` with a built-in activity buffer. Eac
|
|
|
228
228
|
|
|
229
229
|
`SkillSet` members: `tools`, `drainActivities()`, `hadFailure`, `failureContext`.
|
|
230
230
|
|
|
231
|
-
`SkillSetOptions`: `language?` — selects label variant (`'en'` default).
|
|
231
|
+
`SkillSetOptions`: `language?` — selects label variant (`'en'` default). `debug?` — emit `console.debug` logs per skill execution (default: `false`).
|
|
232
232
|
|
|
233
|
-
#### `streamToWire(fullStream, skillSet?)`
|
|
233
|
+
#### `streamToWire(fullStream, skillSet?, options?)`
|
|
234
234
|
|
|
235
|
-
Converts ai-sdk `fullStream` to Juneau wire SSE strings. Handles ai-sdk
|
|
235
|
+
Converts ai-sdk `fullStream` to Juneau wire SSE strings. Handles all ai-sdk v7 text chunk types (`text-delta` and `text`), drains activity buffer at the right moment, emits `done` at the end. Pass `{ debug: true }` to log every chunk received from ai-sdk.
|
|
236
236
|
|
|
237
237
|
#### `withToolRecovery(options)`
|
|
238
238
|
|
|
239
|
-
Two-phase pattern for Gemini-style tool
|
|
239
|
+
Two-phase pattern for Gemini-style tool calls. Phase 1 streams with tools. Phase 2 triggers only when a tool failed **and** no text was produced — it calls the model without tools and injects the failure context to force a text response. Pass `debug: true` to log phase decisions and the `textProduced` / `hadFailure` state at each decision point.
|
|
240
240
|
|
|
241
241
|
---
|
|
242
242
|
|
package/dist/index.cjs
CHANGED
|
@@ -20,7 +20,7 @@ Try asking: *"Show me the data"* or *"Can you suggest something?"*`,25),yield{ty
|
|
|
20
20
|
`,22),await G(150),yield*Z(`- Say **"error"** or **"fail"** → simulates an error response
|
|
21
21
|
`,22),yield{type:"done"}}async function*Z(e,t){for(let r=0;r<e.length;r+=3)yield{type:"text",text:e.slice(r,r+3)},await G(t)}function kr(e){if(!e||e==="[DONE]")return[];let t;try{t=JSON.parse(e)}catch{return[]}switch(t.type){case"text":return t.text?[{type:"text",text:t.text}]:[];case"activity":return[{type:"part",part:{type:"activity",id:t.id,title:t.title,description:t.description,status:t.status,metadata:t.metadata}}];case"part":return[{type:"part",part:t.part}];case"done":return[{type:"done"}];case"error":return[{type:"error",message:t.message}];default:return[]}}function rl(e,t={}){const{method:n="POST",headers:r={},getHeaders:i,getBody:o,getMessages:l,parseEvent:a=ll,credentials:s}=t;return{async*sendMessage(u){const f=i?await i(u):{},c=l?await l(u.messages):u.messages,h={...u,messages:c},p=o?o(h):{messages:h.messages,context:h.context},g=await fetch(e,{method:n,credentials:s,headers:{"Content-Type":"application/json",...r,...f},body:JSON.stringify(p)});if(!g.ok){const b=await g.text().catch(()=>`HTTP ${g.status}`);yield{type:"error",message:`Request failed (${g.status}): ${b}`};return}if(!g.body){yield{type:"error",message:"Response body is empty — server may not support streaming."};return}yield*il(g.body,a)}}}async function*il(e,t){const n=e.getReader(),r=new TextDecoder;let i="";try{for(;;){const{done:o,value:l}=await n.read();if(o)break;i+=r.decode(l,{stream:!0});const a=i.split(`
|
|
22
22
|
`);i=a.pop()??"";for(const s of a){const u=s.trim();if(!(!u||u.startsWith(":"))&&u.startsWith("data: ")){const f=u.slice(6);if(f==="[DONE]"){yield{type:"done"};return}const c=t(f);for(const h of c)if(yield h,h.type==="done"||h.type==="error")return}}}}finally{n.releaseLock()}yield{type:"done"}}const ll=e=>{if(!e||e==="[DONE]")return[];const t=kr(e);if(t.length>0)return t;try{const n=JSON.parse(e);if(n.error?.message)return[{type:"error",message:n.error.message}];const r=n.choices?.[0]?.delta;return n.choices?.[0]?.finish_reason==="stop"?[{type:"done"}]:r?.content?[{type:"text",text:r.content}]:[]}catch{return[]}};function ol(e,t={}){const{method:n="POST",headers:r={},getHeaders:i,getBody:o,parseChunk:l=sl,credentials:a}=t;return{async*sendMessage(s){const u=i?await i(s):{},f=o?o(s):{messages:s.messages,context:s.context},c=await fetch(e,{method:n,credentials:a,headers:{"Content-Type":"application/json",...r,...u},body:JSON.stringify(f)});if(!c.ok){const h=await c.text().catch(()=>`HTTP ${c.status}`);yield{type:"error",message:`Request failed (${c.status}): ${h}`};return}if(!c.body){yield{type:"error",message:"Response body is empty — server may not support streaming."};return}yield*al(c.body,l)}}}async function*al(e,t){const n=e.getReader(),r=new TextDecoder;let i="";try{for(;;){const{done:o,value:l}=await n.read();if(o)break;i+=r.decode(l,{stream:!0});const a=i.split(`
|
|
23
|
-
`);i=a.pop()??"";for(const s of a){const u=s.trim();if(!u)continue;const f=t(u);for(const c of f)if(yield c,c.type==="done"||c.type==="error")return}}if(i.trim()){const o=t(i.trim());for(const l of o)if(yield l,l.type==="done"||l.type==="error")return}}finally{n.releaseLock()}yield{type:"done"}}const sl=e=>{const t=kr(e);return t.length>0?t:e?[{type:"text",text:e}]:[]};let ul=0;const ut=()=>`msg-${++ul}-${Date.now()}`,En=xr;function br({adapter:e,context:t,onProposalConfirm:n,onProposalCancel:r}){const[i,o]=X.useState([]),[l,a]=X.useState(""),[s,u]=X.useState(!1),[f,c]=X.useState(!1),[h,p]=X.useState(null),g=X.useRef(null),b=X.useCallback(L=>{o(y=>{const _=y[y.length-1];if(!_||_.role!=="assistant")return y;if(L.type==="activity"&&L.id){const P=[..._.parts],F=P.findIndex(z=>z.type==="activity"&&z.id===L.id);if(F!==-1)return P[F]=L,[...y.slice(0,-1),{..._,parts:P}]}return[...y.slice(0,-1),{..._,parts:[..._.parts,L]}]})},[]),S=X.useCallback(L=>{o(y=>{const _=y[y.length-1];if(!_||_.role!=="assistant")return y;const P=[..._.parts],F=P[P.length-1];return F?.type==="text"?P[P.length-1]={type:"text",text:F.text+L}:P.push({type:"text",text:L}),[...y.slice(0,-1),{..._,parts:P}]})},[]),x=X.useCallback(async(L,y)=>{p(null);const _={id:ut(),role:"user",parts:[{type:"text",text:L}],createdAt:new Date},P=ut();let F=!1;const z=()=>{if(F)return;F=!0;const B={id:P,role:"assistant",parts:[],createdAt:new Date};o(U=>[...U,B])};o(B=>[...B,_]),u(!0),c(!0),g.current?.abort();const T=new AbortController;g.current=T;try{const B=e.sendMessage({messages:En([...y,_]),context:t});await Vt(B,U=>{switch(c(!1),U.type){case"text":z(),S(U.text);break;case"part":z(),b(U.part);break;case"error":z(),b({type:"error",message:U.message}),p(U.message);break;case"done":break}},T.signal)}catch(B){const U=B instanceof Error?B.message:"Unknown error occurred";p(U),z(),b({type:"error",message:U})}finally{u(!1),c(!1)}},[e,t,S,b]),I=X.useCallback(async()=>{const L=l.trim();!L||s||(a(""),await x(L,i))},[l,s,i,x]),v=X.useCallback(async L=>{!L.trim()||s||await x(L,i)},[s,i,x]),j=X.useCallback(async L=>{if(s)return;p(null),u(!0),c(!0);const y={id:ut(),role:"assistant",parts:[],createdAt:new Date};o(F=>[...F,y]),g.current?.abort();const _=new AbortController;g.current=_;const P={id:ut(),role:"system",parts:[{type:"text",text:L}],createdAt:new Date};try{const F=e.sendMessage({messages:En([P]),context:t});await Vt(F,z=>{switch(c(!1),z.type){case"text":S(z.text);break;case"part":b(z.part);break;case"error":b({type:"error",message:z.message}),p(z.message);break;case"done":break}},_.signal)}catch(F){const z=F instanceof Error?F.message:"Unknown error occurred";p(z),b({type:"error",message:z})}finally{u(!1),c(!1)}},[s,e,t,S,b]),M=X.useCallback(()=>{g.current?.abort(),u(!1),c(!1)},[]),w=X.useCallback(()=>{g.current?.abort(),o([]),a(""),p(null),u(!1),c(!1)},[]),O=X.useCallback((L,y)=>{n?.(L,y)},[n]),V=X.useCallback(L=>{r?.(L)},[r]);return{messages:i,input:l,setInput:a,sendMessage:I,sendMessageWithText:v,sendGreeting:j,stop:M,isLoading:s,isConnecting:f,error:h,reset:w,confirmProposal:O,cancelProposal:V}}const nn={sidebarTitle:"AI Assistant",clearConversation:"Clear conversation",resetConversation:"Reset conversation",minimizeSidebar:"Minimize",expandSidebar:"Expand",userLabel:"You",inputPlaceholder:"Ask a question… (Enter to send)",sendMessage:"Send message",stopMessage:"Stop",typingMessage:"Assistant is typing",connectingMessage:"Connecting…",emptyStateText:"How can I help you today?",emptyStateHint:'Try: "Show me the data" or "Can you suggest something?"',proposalConfirm:"Confirm",proposalCancel:"Cancel",errorDismiss:"Dismiss",actionAddFile:"Add file",actionQuickActions:"Quick actions",actionNew:"New",actionHistory:"History",actionRules:"Rules"},wr=X.createContext(nn);function je(){return X.useContext(wr)}const cl="_root_14q8g_1",fl={root:cl};function pl({children:e,theme:t,labels:n,defaultTitle:r,className:i,style:o}){const l={...nn,...r?{sidebarTitle:r}:{},...n},a=t?hl(t):void 0;return k.jsx(wr.Provider,{value:l,children:k.jsx("div",{className:[fl.root,i].filter(Boolean).join(" "),style:{...a,...o},children:e})})}function hl(e){const t={"--juneau-color-primary":e.colorPrimary,"--juneau-color-primary-dark":e.colorPrimaryDark,"--juneau-color-primary-light":e.colorPrimaryLight,"--juneau-color-primary-border":e.colorPrimaryBorder,"--juneau-color-accent":e.colorAccent,"--juneau-color-accent-dark":e.colorAccentDark,"--juneau-color-accent-light":e.colorAccentLight,"--juneau-color-accent-border":e.colorAccentBorder,"--juneau-color-surface":e.colorSurface,"--juneau-color-surface-raised":e.colorSurfaceRaised,"--juneau-color-surface-hover":e.colorSurfaceHover,"--juneau-color-border":e.colorBorder,"--juneau-color-border-subtle":e.colorBorderSubtle,"--juneau-color-text-primary":e.colorTextPrimary,"--juneau-color-text-secondary":e.colorTextSecondary,"--juneau-color-text-muted":e.colorTextMuted,"--juneau-color-text-faint":e.colorTextFaint,"--juneau-color-text-inverse":e.colorTextInverse,"--juneau-color-assistant-avatar":e.colorAssistantAvatar,"--juneau-radius-sm":e.radiusSm,"--juneau-radius-md":e.radiusMd,"--juneau-radius-lg":e.radiusLg,"--juneau-font-family":e.fontFamily};return Object.fromEntries(Object.entries(t).filter(([,n])=>n!==void 0))}const Cr=X.createContext(null);function Sr(){const e=X.useContext(Cr);if(!e)throw new Error("useAiChatContext must be used inside <AiChatProvider>. Wrap your app (or layout) with <AiChatProvider adapter={...}>.");return e}function dl({adapter:e,context:t,onProposalConfirm:n,onProposalCancel:r,children:i}){const[o,l]=X.useState(t),a=X.useCallback(u=>{l(u)},[]),s=br({adapter:e,context:o,onProposalConfirm:n,onProposalCancel:r});return k.jsx(Cr.Provider,{value:{...s,setContext:a},children:i})}const ml={sidebarTitle:"AI Asistent",clearConversation:"Vymazat konverzaci",resetConversation:"Resetovat konverzaci",minimizeSidebar:"Minimalizovat",expandSidebar:"Rozbalit",userLabel:"Vy",inputPlaceholder:"Zeptejte se na cokoliv… (Enter pro odeslání)",sendMessage:"Odeslat zprávu",stopMessage:"Zastavit",typingMessage:"Asistent píše",connectingMessage:"Připojování…",emptyStateText:"Jak vám mohu dnes pomoci?",emptyStateHint:'Zkuste: „Ukáž mi data" nebo „Máš nějaký návrh?"',proposalConfirm:"Potvrdit",proposalCancel:"Zrušit",errorDismiss:"Zavřít",actionAddFile:"Přidat soubor",actionQuickActions:"Rychlé akce",actionNew:"Nový",actionHistory:"Historie",actionRules:"Pravidla"};function vr({className:e,style:t,"aria-hidden":n=!0}){return k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:k.jsx("path",{d:"M456 0c-48.6 0-88 39.4-88 88l0 29.2L12.5 390.6c-14 10.8-16.6 30.9-5.9 44.9s30.9 16.6 44.9 5.9L126.1 384l133.1 0 46.6 113.1c5 12.3 19.1 18.1 31.3 13.1s18.1-19.1 13.1-31.3L311.1 384l40.9 0c1.1 0 2.1 0 3.2 0l46.6 113.2c5 12.3 19.1 18.1 31.3 13.1s18.1-19.1 13.1-31.3l-42-102C484.9 354.1 544 280 544 192l0-64 0-8 80.5-20.1c8.6-2.1 13.8-10.8 11.6-19.4C629 52 603.4 32 574 32l-50.1 0C507.7 12.5 483.3 0 456 0zm0 64a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"})})}function gl({className:e,style:t,"aria-hidden":n=!0}){return k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:k.jsx("path",{d:"M498.1 5.6c10.1 7 15.4 19.1 13.5 31.2l-64 416c-1.5 9.7-7.4 18.2-16 23s-18.9 5.4-28 1.6L284 427.7l-68.5 74.1c-8.9 9.7-22.9 12.9-35.2 8.1S160 493.2 160 480V396.4c0-4 1.5-7.8 4.2-10.8L331.8 202.8c5.8-6.3 5.6-16-.4-22s-15.7-6.4-22-.7L106 360.8 17.7 316.6C7.1 311.3 .3 300.7 0 288.9s6.2-22.8 16.4-28.7l448-256c10.7-6.1 23.9-5.5 34 1.4z"})})}function yl({className:e,style:t,"aria-hidden":n=!0}){return k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:k.jsx("path",{d:"M364.2 83.8c-24.4-24.4-64-24.4-88.4 0l-184 184c-42.1 42.1-42.1 110.3 0 152.4s110.3 42.1 152.4 0l152-152c10.9-10.9 28.7-10.9 39.6 0s10.9 28.7 0 39.6l-152 152c-64 64-167.6 64-231.6 0s-64-167.6 0-231.6l184-184c46.3-46.3 121.3-46.3 167.6 0s46.3 121.3 0 167.6l-176 176c-28.6 28.6-75 28.6-103.6 0s-28.6-75 0-103.6l144-144c10.9-10.9 28.7-10.9 39.6 0s10.9 28.7 0 39.6l-144 144c-6.7 6.7-6.7 17.7 0 24.4s17.7 6.7 24.4 0l176-176c24.4-24.4 24.4-64 0-88.4z"})})}function xl({className:e,style:t,"aria-hidden":n=!0}){return k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:k.jsx("path",{d:"M349.4 44.6c5.9-13.7 1.5-29.7-10.6-38.5s-28.6-8-39.9 1.8l-256 224c-10 8.8-13.6 22.9-8.9 35.3S50.7 288 64 288l111.5 0L98.6 467.4c-5.9 13.7-1.5 29.7 10.6 38.5s28.6 8 39.9-1.8l256-224c10-8.8 13.6-22.9 8.9-35.3s-16.6-20.7-30-20.7l-111.5 0L349.4 44.6z"})})}function kl({className:e,style:t,"aria-hidden":n=!0}){return k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:k.jsx("path",{d:"M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 144L48 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l144 0 0 144c0 17.7 14.3 32 32 32s32-14.3 32-32l0-144 144 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-144 0 0-144z"})})}function bl({className:e,style:t,"aria-hidden":n=!0}){return k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:k.jsx("path",{d:"M75 75L41 41C25.9 25.9 0 36.6 0 57.9L0 168c0 13.3 10.7 24 24 24l110.1 0c21.4 0 32.1-25.9 17-41l-31.8-31.8C143.9 83.5 196.2 64 252.6 64C370.8 64 464 157.8 464 276c0 77.5-40.8 145.4-102 182.9c-15.1 9.2-19.9 29-10.7 44.1s29 19.9 44.1 10.7C471 467.5 528 378.4 528 276C528 124.1 404.5 0 252.6 0C186 0 125.3 26.4 80 70.2L75 75zM256 152c-13.3 0-24 10.7-24 24l0 104c0 6.4 2.5 12.5 7 17l72 72c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-65-65 0-94.1c0-13.3-10.7-24-24-24z"})})}function wl({className:e,style:t,"aria-hidden":n=!0}){return k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:k.jsx("path",{d:"M0 80C0 53.5 21.5 32 48 32l96 0c26.5 0 48 21.5 48 48l0 16 192 0 0-16c0-26.5 21.5-48 48-48l96 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-26.6 0c-25.8 50.9-72.7 88.5-129.4 99.8L384 416l32 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-256 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l32 0 0-72.2C135.3 332.5 88.4 294.9 62.6 244L48 244c-26.5 0-48-21.5-48-48L0 80zM128 240c0 70.7 57.3 128 128 128s128-57.3 128-128l0-128L128 112l0 128zM512 176l0-64-64 0 0 64-48 0 0 16c0 8.8-.7 17.4-2 25.8c3.3 .1 6.6 .2 9.9 .2l56 0c26.5 0 48-21.5 48-48l0-64zM48 176c0 26.5 21.5 48 48 48l56 0c3.4 0 6.7-.1 9.9-.2c-1.3-8.4-2-17-2-25.8l0-16-48 0 0-64-64 0 0 58z"})})}function Cl({className:e,style:t,"aria-hidden":n=!0}){return k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:k.jsx("path",{d:"M32 416c-17.7 0-32 14.3-32 32s14.3 32 32 32l448 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416z"})})}function Sl({className:e,style:t,"aria-hidden":n=!0}){return k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:k.jsx("path",{d:"M432 64L208 64c-8.8 0-16 7.2-16 16l0 16-64 0 0-16c0-44.2 35.8-80 80-80L432 0c44.2 0 80 35.8 80 80l0 224c0 44.2-35.8 80-80 80l-16 0 0-64 16 0c8.8 0 16-7.2 16-16l0-224c0-8.8-7.2-16-16-16zM0 192c0-35.3 28.7-64 64-64l256 0c35.3 0 64 28.7 64 64l0 256c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 192zm64 32c0 17.7 14.3 32 32 32l192 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L96 192c-17.7 0-32 14.3-32 32z"})})}function vl({className:e,style:t,"aria-hidden":n=!0}){return k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:k.jsx("path",{fillRule:"evenodd",d:"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495zM10 5a.75.75 0 01.75.75v3.5a.75.75 0 01-1.5 0v-3.5A.75.75 0 0110 5zm0 9a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})})}function Al(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Il=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,El=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,_l={};function _n(e,t){return(_l.jsx?El:Il).test(e)}const Tl=/[ \t\n\f\r]/g;function Pl(e){return typeof e=="object"?e.type==="text"?Tn(e.value):!1:Tn(e)}function Tn(e){return e.replace(Tl,"")===""}class lt{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}lt.prototype.normal={};lt.prototype.property={};lt.prototype.space=void 0;function Ar(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new lt(n,r,t)}function Ut(e){return e.toLowerCase()}class ie{constructor(t,n){this.attribute=n,this.property=t}}ie.prototype.attribute="";ie.prototype.booleanish=!1;ie.prototype.boolean=!1;ie.prototype.commaOrSpaceSeparated=!1;ie.prototype.commaSeparated=!1;ie.prototype.defined=!1;ie.prototype.mustUseProperty=!1;ie.prototype.number=!1;ie.prototype.overloadedBoolean=!1;ie.prototype.property="";ie.prototype.spaceSeparated=!1;ie.prototype.space=void 0;let zl=0;const R=Me(),J=Me(),Wt=Me(),A=Me(),Q=Me(),Le=Me(),oe=Me();function Me(){return 2**++zl}const Qt=Object.freeze(Object.defineProperty({__proto__:null,boolean:R,booleanish:J,commaOrSpaceSeparated:oe,commaSeparated:Le,number:A,overloadedBoolean:Wt,spaceSeparated:Q},Symbol.toStringTag,{value:"Module"})),It=Object.keys(Qt);class rn extends ie{constructor(t,n,r,i){let o=-1;if(super(t,n),Pn(this,"space",i),typeof r=="number")for(;++o<It.length;){const l=It[o];Pn(this,It[o],(r&Qt[l])===Qt[l])}}}rn.prototype.defined=!0;function Pn(e,t,n){n&&(e[t]=n)}function $e(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new rn(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[Ut(r)]=r,n[Ut(o.attribute)]=r}return new lt(t,n,e.space)}const Ir=$e({properties:{ariaActiveDescendant:null,ariaAtomic:J,ariaAutoComplete:null,ariaBusy:J,ariaChecked:J,ariaColCount:A,ariaColIndex:A,ariaColSpan:A,ariaControls:Q,ariaCurrent:null,ariaDescribedBy:Q,ariaDetails:null,ariaDisabled:J,ariaDropEffect:Q,ariaErrorMessage:null,ariaExpanded:J,ariaFlowTo:Q,ariaGrabbed:J,ariaHasPopup:null,ariaHidden:J,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Q,ariaLevel:A,ariaLive:null,ariaModal:J,ariaMultiLine:J,ariaMultiSelectable:J,ariaOrientation:null,ariaOwns:Q,ariaPlaceholder:null,ariaPosInSet:A,ariaPressed:J,ariaReadOnly:J,ariaRelevant:null,ariaRequired:J,ariaRoleDescription:Q,ariaRowCount:A,ariaRowIndex:A,ariaRowSpan:A,ariaSelected:J,ariaSetSize:A,ariaSort:null,ariaValueMax:A,ariaValueMin:A,ariaValueNow:A,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Er(e,t){return t in e?e[t]:t}function _r(e,t){return Er(e,t.toLowerCase())}const Ll=$e({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Le,acceptCharset:Q,accessKey:Q,action:null,allow:null,allowFullScreen:R,allowPaymentRequest:R,allowUserMedia:R,alpha:R,alt:null,as:null,async:R,autoCapitalize:null,autoComplete:Q,autoFocus:R,autoPlay:R,blocking:Q,capture:null,charSet:null,checked:R,cite:null,className:Q,closedBy:null,colorSpace:null,cols:A,colSpan:A,command:null,commandFor:null,content:null,contentEditable:J,controls:R,controlsList:Q,coords:A|Le,crossOrigin:null,data:null,dateTime:null,decoding:null,default:R,defer:R,dir:null,dirName:null,disabled:R,download:Wt,draggable:J,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:R,formTarget:null,headers:Q,height:A,hidden:Wt,high:A,href:null,hrefLang:null,htmlFor:Q,httpEquiv:Q,id:null,imageSizes:null,imageSrcSet:null,inert:R,inputMode:null,integrity:null,is:null,isMap:R,itemId:null,itemProp:Q,itemRef:Q,itemScope:R,itemType:Q,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:R,low:A,manifest:null,max:null,maxLength:A,media:null,method:null,min:null,minLength:A,multiple:R,muted:R,name:null,nonce:null,noModule:R,noValidate:R,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:R,optimum:A,pattern:null,ping:Q,placeholder:null,playsInline:R,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:R,referrerPolicy:null,rel:Q,required:R,reversed:R,rows:A,rowSpan:A,sandbox:Q,scope:null,scoped:R,seamless:R,selected:R,shadowRootClonable:R,shadowRootCustomElementRegistry:R,shadowRootDelegatesFocus:R,shadowRootMode:null,shadowRootSerializable:R,shape:null,size:A,sizes:null,slot:null,span:A,spellCheck:J,src:null,srcDoc:null,srcLang:null,srcSet:null,start:A,step:null,style:null,tabIndex:A,target:null,title:null,translate:null,type:null,typeMustMatch:R,useMap:null,value:J,width:A,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Q,axis:null,background:null,bgColor:null,border:A,borderColor:null,bottomMargin:A,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:R,declare:R,event:null,face:null,frame:null,frameBorder:null,hSpace:A,leftMargin:A,link:null,longDesc:null,lowSrc:null,marginHeight:A,marginWidth:A,noResize:R,noHref:R,noShade:R,noWrap:R,object:null,profile:null,prompt:null,rev:null,rightMargin:A,rules:null,scheme:null,scrolling:J,standby:null,summary:null,text:null,topMargin:A,valueType:null,version:null,vAlign:null,vLink:null,vSpace:A,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:R,disablePictureInPicture:R,disableRemotePlayback:R,exportParts:Le,part:Q,prefix:null,property:null,results:A,security:null,unselectable:null},space:"html",transform:_r}),Dl=$e({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:oe,accentHeight:A,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:A,amplitude:A,arabicForm:null,ascent:A,attributeName:null,attributeType:null,azimuth:A,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:A,by:null,calcMode:null,capHeight:A,className:Q,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:A,diffuseConstant:A,direction:null,display:null,dur:null,divisor:A,dominantBaseline:null,download:R,dx:null,dy:null,edgeMode:null,editable:null,elevation:A,enableBackground:null,end:null,event:null,exponent:A,externalResourcesRequired:null,fill:null,fillOpacity:A,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:Le,g2:Le,glyphName:Le,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:A,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:A,horizOriginX:A,horizOriginY:A,id:null,ideographic:A,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:A,k:A,k1:A,k2:A,k3:A,k4:A,kernelMatrix:oe,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:A,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:A,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:A,overlineThickness:A,paintOrder:null,panose1:null,path:null,pathLength:A,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Q,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:A,pointsAtY:A,pointsAtZ:A,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:oe,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:oe,rev:oe,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:oe,requiredFeatures:oe,requiredFonts:oe,requiredFormats:oe,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:A,specularExponent:A,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:A,strikethroughThickness:A,string:null,stroke:null,strokeDashArray:oe,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:A,strokeOpacity:A,strokeWidth:null,style:null,surfaceScale:A,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:oe,tabIndex:A,tableValues:null,target:null,targetX:A,targetY:A,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:oe,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:A,underlineThickness:A,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:A,values:null,vAlphabetic:A,vMathematical:A,vectorEffect:null,vHanging:A,vIdeographic:A,version:null,vertAdvY:A,vertOriginX:A,vertOriginY:A,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:A,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Er}),Tr=$e({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Pr=$e({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:_r}),zr=$e({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),jl={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"},Ml=/[A-Z]/g,zn=/-[a-z]/g,Fl=/^data[-\w.:]+$/i;function Rl(e,t){const n=Ut(t);let r=t,i=ie;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Fl.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(zn,Ol);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!zn.test(o)){let l=o.replace(Ml,Nl);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}i=rn}return new i(r,t)}function Nl(e){return"-"+e.toLowerCase()}function Ol(e){return e.charAt(1).toUpperCase()}const Bl=Ar([Ir,Ll,Tr,Pr,zr],"html"),ln=Ar([Ir,Dl,Tr,Pr,zr],"svg");function Hl(e){return e.join(" ").trim()}function Lr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Oe={},Et,Ln;function $l(){if(Ln)return Et;Ln=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,a=/^\s+|\s+$/g,s=`
|
|
23
|
+
`);i=a.pop()??"";for(const s of a){const u=s.trim();if(!u)continue;const f=t(u);for(const c of f)if(yield c,c.type==="done"||c.type==="error")return}}if(i.trim()){const o=t(i.trim());for(const l of o)if(yield l,l.type==="done"||l.type==="error")return}}finally{n.releaseLock()}yield{type:"done"}}const sl=e=>{const t=kr(e);return t.length>0?t:e?[{type:"text",text:e}]:[]};let ul=0;const ut=()=>`msg-${++ul}-${Date.now()}`,En=xr;function br({adapter:e,context:t,onProposalConfirm:n,onProposalCancel:r}){const[i,o]=X.useState([]),[l,a]=X.useState(""),[s,u]=X.useState(!1),[f,c]=X.useState(!1),[h,p]=X.useState(null),g=X.useRef(null),b=X.useCallback(L=>{o(y=>{const _=y[y.length-1];if(!_||_.role!=="assistant")return y;if(L.type==="activity"&&L.id){const P=[..._.parts],F=P.findIndex(z=>z.type==="activity"&&z.id===L.id);if(F!==-1)return P[F]=L,[...y.slice(0,-1),{..._,parts:P}]}return[...y.slice(0,-1),{..._,parts:[..._.parts,L]}]})},[]),S=X.useCallback(L=>{o(y=>{const _=y[y.length-1];if(!_||_.role!=="assistant")return y;const P=[..._.parts],F=P[P.length-1];return F?.type==="text"?P[P.length-1]={type:"text",text:F.text+L}:P.push({type:"text",text:L}),[...y.slice(0,-1),{..._,parts:P}]})},[]),x=X.useCallback(async(L,y)=>{p(null);const _={id:ut(),role:"user",parts:[{type:"text",text:L}],createdAt:new Date},P=ut();let F=!1;const z=()=>{if(F)return;F=!0;const B={id:P,role:"assistant",parts:[],createdAt:new Date};o(U=>[...U,B])};o(B=>[...B,_]),u(!0),c(!0),g.current?.abort();const T=new AbortController;g.current=T;try{const B=e.sendMessage({messages:En([...y,_]),context:t});await Vt(B,U=>{switch(c(!1),U.type){case"text":z(),S(U.text);break;case"part":z(),b(U.part);break;case"error":z(),b({type:"error",message:U.message}),p(U.message);break;case"done":break}},T.signal)}catch(B){const U=B instanceof Error?B.message:"Unknown error occurred";p(U),z(),b({type:"error",message:U})}finally{u(!1),c(!1)}},[e,t,S,b]),I=X.useCallback(async()=>{const L=l.trim();!L||s||(a(""),await x(L,i))},[l,s,i,x]),v=X.useCallback(async L=>{!L.trim()||s||await x(L,i)},[s,i,x]),j=X.useCallback(async L=>{if(s)return;p(null),u(!0),c(!0);const y={id:ut(),role:"assistant",parts:[],createdAt:new Date};o(F=>[...F,y]),g.current?.abort();const _=new AbortController;g.current=_;const P={id:ut(),role:"system",parts:[{type:"text",text:L}],createdAt:new Date};try{const F=e.sendMessage({messages:En([P]),context:t});await Vt(F,z=>{switch(c(!1),z.type){case"text":S(z.text);break;case"part":b(z.part);break;case"error":b({type:"error",message:z.message}),p(z.message);break;case"done":break}},_.signal)}catch(F){const z=F instanceof Error?F.message:"Unknown error occurred";p(z),b({type:"error",message:z})}finally{u(!1),c(!1)}},[s,e,t,S,b]),M=X.useCallback(()=>{g.current?.abort(),u(!1),c(!1)},[]),w=X.useCallback(()=>{g.current?.abort(),o([]),a(""),p(null),u(!1),c(!1)},[]),O=X.useCallback((L,y)=>{n?.(L,y)},[n]),V=X.useCallback(L=>{r?.(L)},[r]);return{messages:i,input:l,setInput:a,sendMessage:I,sendMessageWithText:v,sendGreeting:j,stop:M,isLoading:s,isConnecting:f,error:h,reset:w,confirmProposal:O,cancelProposal:V}}const nn={sidebarTitle:"AI Assistant",clearConversation:"Clear conversation",resetConversation:"Reset conversation",minimizeSidebar:"Minimize",expandSidebar:"Expand",userLabel:"You",inputPlaceholder:"Ask a question… (Enter to send)",sendMessage:"Send message",stopMessage:"Stop",typingMessage:"Assistant is typing",connectingMessage:"Connecting…",emptyStateText:"How can I help you today?",emptyStateHint:'Try: "Show me the data" or "Can you suggest something?"',proposalConfirm:"Confirm",proposalCancel:"Cancel",errorDismiss:"Dismiss",actionAddFile:"Add file",actionQuickActions:"Quick actions",actionNew:"New",actionHistory:"History",actionRules:"Rules"},wr=X.createContext(nn);function je(){return X.useContext(wr)}const cl="_root_1etc2_1",fl={root:cl};function pl({children:e,theme:t,labels:n,defaultTitle:r,className:i,style:o}){const l={...nn,...r?{sidebarTitle:r}:{},...n},a=t?hl(t):void 0;return k.jsx(wr.Provider,{value:l,children:k.jsx("div",{className:[fl.root,i].filter(Boolean).join(" "),style:{...a,...o},children:e})})}function hl(e){const t={"--juneau-color-primary":e.colorPrimary,"--juneau-color-primary-dark":e.colorPrimaryDark,"--juneau-color-primary-light":e.colorPrimaryLight,"--juneau-color-primary-border":e.colorPrimaryBorder,"--juneau-color-accent":e.colorAccent,"--juneau-color-accent-dark":e.colorAccentDark,"--juneau-color-accent-light":e.colorAccentLight,"--juneau-color-accent-border":e.colorAccentBorder,"--juneau-color-surface":e.colorSurface,"--juneau-color-surface-raised":e.colorSurfaceRaised,"--juneau-color-surface-hover":e.colorSurfaceHover,"--juneau-color-border":e.colorBorder,"--juneau-color-border-subtle":e.colorBorderSubtle,"--juneau-color-text-primary":e.colorTextPrimary,"--juneau-color-text-secondary":e.colorTextSecondary,"--juneau-color-text-muted":e.colorTextMuted,"--juneau-color-text-faint":e.colorTextFaint,"--juneau-color-text-inverse":e.colorTextInverse,"--juneau-color-assistant-avatar":e.colorAssistantAvatar,"--juneau-radius-sm":e.radiusSm,"--juneau-radius-md":e.radiusMd,"--juneau-radius-lg":e.radiusLg,"--juneau-font-family":e.fontFamily};return Object.fromEntries(Object.entries(t).filter(([,n])=>n!==void 0))}const Cr=X.createContext(null);function Sr(){const e=X.useContext(Cr);if(!e)throw new Error("useAiChatContext must be used inside <AiChatProvider>. Wrap your app (or layout) with <AiChatProvider adapter={...}>.");return e}function dl({adapter:e,context:t,onProposalConfirm:n,onProposalCancel:r,children:i}){const[o,l]=X.useState(t),a=X.useCallback(u=>{l(u)},[]),s=br({adapter:e,context:o,onProposalConfirm:n,onProposalCancel:r});return k.jsx(Cr.Provider,{value:{...s,setContext:a},children:i})}const ml={sidebarTitle:"AI Asistent",clearConversation:"Vymazat konverzaci",resetConversation:"Resetovat konverzaci",minimizeSidebar:"Minimalizovat",expandSidebar:"Rozbalit",userLabel:"Vy",inputPlaceholder:"Zeptejte se na cokoliv… (Enter pro odeslání)",sendMessage:"Odeslat zprávu",stopMessage:"Zastavit",typingMessage:"Asistent píše",connectingMessage:"Připojování…",emptyStateText:"Jak vám mohu dnes pomoci?",emptyStateHint:'Zkuste: „Ukáž mi data" nebo „Máš nějaký návrh?"',proposalConfirm:"Potvrdit",proposalCancel:"Zrušit",errorDismiss:"Zavřít",actionAddFile:"Přidat soubor",actionQuickActions:"Rychlé akce",actionNew:"Nový",actionHistory:"Historie",actionRules:"Pravidla"};function vr({className:e,style:t,"aria-hidden":n=!0}){return k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:k.jsx("path",{d:"M456 0c-48.6 0-88 39.4-88 88l0 29.2L12.5 390.6c-14 10.8-16.6 30.9-5.9 44.9s30.9 16.6 44.9 5.9L126.1 384l133.1 0 46.6 113.1c5 12.3 19.1 18.1 31.3 13.1s18.1-19.1 13.1-31.3L311.1 384l40.9 0c1.1 0 2.1 0 3.2 0l46.6 113.2c5 12.3 19.1 18.1 31.3 13.1s18.1-19.1 13.1-31.3l-42-102C484.9 354.1 544 280 544 192l0-64 0-8 80.5-20.1c8.6-2.1 13.8-10.8 11.6-19.4C629 52 603.4 32 574 32l-50.1 0C507.7 12.5 483.3 0 456 0zm0 64a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"})})}function gl({className:e,style:t,"aria-hidden":n=!0}){return k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:k.jsx("path",{d:"M498.1 5.6c10.1 7 15.4 19.1 13.5 31.2l-64 416c-1.5 9.7-7.4 18.2-16 23s-18.9 5.4-28 1.6L284 427.7l-68.5 74.1c-8.9 9.7-22.9 12.9-35.2 8.1S160 493.2 160 480V396.4c0-4 1.5-7.8 4.2-10.8L331.8 202.8c5.8-6.3 5.6-16-.4-22s-15.7-6.4-22-.7L106 360.8 17.7 316.6C7.1 311.3 .3 300.7 0 288.9s6.2-22.8 16.4-28.7l448-256c10.7-6.1 23.9-5.5 34 1.4z"})})}function yl({className:e,style:t,"aria-hidden":n=!0}){return k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:k.jsx("path",{d:"M364.2 83.8c-24.4-24.4-64-24.4-88.4 0l-184 184c-42.1 42.1-42.1 110.3 0 152.4s110.3 42.1 152.4 0l152-152c10.9-10.9 28.7-10.9 39.6 0s10.9 28.7 0 39.6l-152 152c-64 64-167.6 64-231.6 0s-64-167.6 0-231.6l184-184c46.3-46.3 121.3-46.3 167.6 0s46.3 121.3 0 167.6l-176 176c-28.6 28.6-75 28.6-103.6 0s-28.6-75 0-103.6l144-144c10.9-10.9 28.7-10.9 39.6 0s10.9 28.7 0 39.6l-144 144c-6.7 6.7-6.7 17.7 0 24.4s17.7 6.7 24.4 0l176-176c24.4-24.4 24.4-64 0-88.4z"})})}function xl({className:e,style:t,"aria-hidden":n=!0}){return k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:k.jsx("path",{d:"M349.4 44.6c5.9-13.7 1.5-29.7-10.6-38.5s-28.6-8-39.9 1.8l-256 224c-10 8.8-13.6 22.9-8.9 35.3S50.7 288 64 288l111.5 0L98.6 467.4c-5.9 13.7-1.5 29.7 10.6 38.5s28.6 8 39.9-1.8l256-224c10-8.8 13.6-22.9 8.9-35.3s-16.6-20.7-30-20.7l-111.5 0L349.4 44.6z"})})}function kl({className:e,style:t,"aria-hidden":n=!0}){return k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:k.jsx("path",{d:"M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 144L48 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l144 0 0 144c0 17.7 14.3 32 32 32s32-14.3 32-32l0-144 144 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-144 0 0-144z"})})}function bl({className:e,style:t,"aria-hidden":n=!0}){return k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:k.jsx("path",{d:"M75 75L41 41C25.9 25.9 0 36.6 0 57.9L0 168c0 13.3 10.7 24 24 24l110.1 0c21.4 0 32.1-25.9 17-41l-31.8-31.8C143.9 83.5 196.2 64 252.6 64C370.8 64 464 157.8 464 276c0 77.5-40.8 145.4-102 182.9c-15.1 9.2-19.9 29-10.7 44.1s29 19.9 44.1 10.7C471 467.5 528 378.4 528 276C528 124.1 404.5 0 252.6 0C186 0 125.3 26.4 80 70.2L75 75zM256 152c-13.3 0-24 10.7-24 24l0 104c0 6.4 2.5 12.5 7 17l72 72c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-65-65 0-94.1c0-13.3-10.7-24-24-24z"})})}function wl({className:e,style:t,"aria-hidden":n=!0}){return k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:k.jsx("path",{d:"M0 80C0 53.5 21.5 32 48 32l96 0c26.5 0 48 21.5 48 48l0 16 192 0 0-16c0-26.5 21.5-48 48-48l96 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-26.6 0c-25.8 50.9-72.7 88.5-129.4 99.8L384 416l32 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-256 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l32 0 0-72.2C135.3 332.5 88.4 294.9 62.6 244L48 244c-26.5 0-48-21.5-48-48L0 80zM128 240c0 70.7 57.3 128 128 128s128-57.3 128-128l0-128L128 112l0 128zM512 176l0-64-64 0 0 64-48 0 0 16c0 8.8-.7 17.4-2 25.8c3.3 .1 6.6 .2 9.9 .2l56 0c26.5 0 48-21.5 48-48l0-64zM48 176c0 26.5 21.5 48 48 48l56 0c3.4 0 6.7-.1 9.9-.2c-1.3-8.4-2-17-2-25.8l0-16-48 0 0-64-64 0 0 58z"})})}function Cl({className:e,style:t,"aria-hidden":n=!0}){return k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:k.jsx("path",{d:"M32 416c-17.7 0-32 14.3-32 32s14.3 32 32 32l448 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416z"})})}function Sl({className:e,style:t,"aria-hidden":n=!0}){return k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:k.jsx("path",{d:"M432 64L208 64c-8.8 0-16 7.2-16 16l0 16-64 0 0-16c0-44.2 35.8-80 80-80L432 0c44.2 0 80 35.8 80 80l0 224c0 44.2-35.8 80-80 80l-16 0 0-64 16 0c8.8 0 16-7.2 16-16l0-224c0-8.8-7.2-16-16-16zM0 192c0-35.3 28.7-64 64-64l256 0c35.3 0 64 28.7 64 64l0 256c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 192zm64 32c0 17.7 14.3 32 32 32l192 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L96 192c-17.7 0-32 14.3-32 32z"})})}function vl({className:e,style:t,"aria-hidden":n=!0}){return k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:k.jsx("path",{fillRule:"evenodd",d:"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495zM10 5a.75.75 0 01.75.75v3.5a.75.75 0 01-1.5 0v-3.5A.75.75 0 0110 5zm0 9a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})})}function Al(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Il=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,El=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,_l={};function _n(e,t){return(_l.jsx?El:Il).test(e)}const Tl=/[ \t\n\f\r]/g;function Pl(e){return typeof e=="object"?e.type==="text"?Tn(e.value):!1:Tn(e)}function Tn(e){return e.replace(Tl,"")===""}class lt{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}lt.prototype.normal={};lt.prototype.property={};lt.prototype.space=void 0;function Ar(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new lt(n,r,t)}function Ut(e){return e.toLowerCase()}class ie{constructor(t,n){this.attribute=n,this.property=t}}ie.prototype.attribute="";ie.prototype.booleanish=!1;ie.prototype.boolean=!1;ie.prototype.commaOrSpaceSeparated=!1;ie.prototype.commaSeparated=!1;ie.prototype.defined=!1;ie.prototype.mustUseProperty=!1;ie.prototype.number=!1;ie.prototype.overloadedBoolean=!1;ie.prototype.property="";ie.prototype.spaceSeparated=!1;ie.prototype.space=void 0;let zl=0;const R=Me(),J=Me(),Wt=Me(),A=Me(),Q=Me(),Le=Me(),oe=Me();function Me(){return 2**++zl}const Qt=Object.freeze(Object.defineProperty({__proto__:null,boolean:R,booleanish:J,commaOrSpaceSeparated:oe,commaSeparated:Le,number:A,overloadedBoolean:Wt,spaceSeparated:Q},Symbol.toStringTag,{value:"Module"})),It=Object.keys(Qt);class rn extends ie{constructor(t,n,r,i){let o=-1;if(super(t,n),Pn(this,"space",i),typeof r=="number")for(;++o<It.length;){const l=It[o];Pn(this,It[o],(r&Qt[l])===Qt[l])}}}rn.prototype.defined=!0;function Pn(e,t,n){n&&(e[t]=n)}function $e(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new rn(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[Ut(r)]=r,n[Ut(o.attribute)]=r}return new lt(t,n,e.space)}const Ir=$e({properties:{ariaActiveDescendant:null,ariaAtomic:J,ariaAutoComplete:null,ariaBusy:J,ariaChecked:J,ariaColCount:A,ariaColIndex:A,ariaColSpan:A,ariaControls:Q,ariaCurrent:null,ariaDescribedBy:Q,ariaDetails:null,ariaDisabled:J,ariaDropEffect:Q,ariaErrorMessage:null,ariaExpanded:J,ariaFlowTo:Q,ariaGrabbed:J,ariaHasPopup:null,ariaHidden:J,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Q,ariaLevel:A,ariaLive:null,ariaModal:J,ariaMultiLine:J,ariaMultiSelectable:J,ariaOrientation:null,ariaOwns:Q,ariaPlaceholder:null,ariaPosInSet:A,ariaPressed:J,ariaReadOnly:J,ariaRelevant:null,ariaRequired:J,ariaRoleDescription:Q,ariaRowCount:A,ariaRowIndex:A,ariaRowSpan:A,ariaSelected:J,ariaSetSize:A,ariaSort:null,ariaValueMax:A,ariaValueMin:A,ariaValueNow:A,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Er(e,t){return t in e?e[t]:t}function _r(e,t){return Er(e,t.toLowerCase())}const Ll=$e({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Le,acceptCharset:Q,accessKey:Q,action:null,allow:null,allowFullScreen:R,allowPaymentRequest:R,allowUserMedia:R,alpha:R,alt:null,as:null,async:R,autoCapitalize:null,autoComplete:Q,autoFocus:R,autoPlay:R,blocking:Q,capture:null,charSet:null,checked:R,cite:null,className:Q,closedBy:null,colorSpace:null,cols:A,colSpan:A,command:null,commandFor:null,content:null,contentEditable:J,controls:R,controlsList:Q,coords:A|Le,crossOrigin:null,data:null,dateTime:null,decoding:null,default:R,defer:R,dir:null,dirName:null,disabled:R,download:Wt,draggable:J,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:R,formTarget:null,headers:Q,height:A,hidden:Wt,high:A,href:null,hrefLang:null,htmlFor:Q,httpEquiv:Q,id:null,imageSizes:null,imageSrcSet:null,inert:R,inputMode:null,integrity:null,is:null,isMap:R,itemId:null,itemProp:Q,itemRef:Q,itemScope:R,itemType:Q,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:R,low:A,manifest:null,max:null,maxLength:A,media:null,method:null,min:null,minLength:A,multiple:R,muted:R,name:null,nonce:null,noModule:R,noValidate:R,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:R,optimum:A,pattern:null,ping:Q,placeholder:null,playsInline:R,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:R,referrerPolicy:null,rel:Q,required:R,reversed:R,rows:A,rowSpan:A,sandbox:Q,scope:null,scoped:R,seamless:R,selected:R,shadowRootClonable:R,shadowRootCustomElementRegistry:R,shadowRootDelegatesFocus:R,shadowRootMode:null,shadowRootSerializable:R,shape:null,size:A,sizes:null,slot:null,span:A,spellCheck:J,src:null,srcDoc:null,srcLang:null,srcSet:null,start:A,step:null,style:null,tabIndex:A,target:null,title:null,translate:null,type:null,typeMustMatch:R,useMap:null,value:J,width:A,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Q,axis:null,background:null,bgColor:null,border:A,borderColor:null,bottomMargin:A,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:R,declare:R,event:null,face:null,frame:null,frameBorder:null,hSpace:A,leftMargin:A,link:null,longDesc:null,lowSrc:null,marginHeight:A,marginWidth:A,noResize:R,noHref:R,noShade:R,noWrap:R,object:null,profile:null,prompt:null,rev:null,rightMargin:A,rules:null,scheme:null,scrolling:J,standby:null,summary:null,text:null,topMargin:A,valueType:null,version:null,vAlign:null,vLink:null,vSpace:A,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:R,disablePictureInPicture:R,disableRemotePlayback:R,exportParts:Le,part:Q,prefix:null,property:null,results:A,security:null,unselectable:null},space:"html",transform:_r}),Dl=$e({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:oe,accentHeight:A,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:A,amplitude:A,arabicForm:null,ascent:A,attributeName:null,attributeType:null,azimuth:A,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:A,by:null,calcMode:null,capHeight:A,className:Q,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:A,diffuseConstant:A,direction:null,display:null,dur:null,divisor:A,dominantBaseline:null,download:R,dx:null,dy:null,edgeMode:null,editable:null,elevation:A,enableBackground:null,end:null,event:null,exponent:A,externalResourcesRequired:null,fill:null,fillOpacity:A,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:Le,g2:Le,glyphName:Le,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:A,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:A,horizOriginX:A,horizOriginY:A,id:null,ideographic:A,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:A,k:A,k1:A,k2:A,k3:A,k4:A,kernelMatrix:oe,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:A,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:A,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:A,overlineThickness:A,paintOrder:null,panose1:null,path:null,pathLength:A,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Q,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:A,pointsAtY:A,pointsAtZ:A,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:oe,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:oe,rev:oe,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:oe,requiredFeatures:oe,requiredFonts:oe,requiredFormats:oe,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:A,specularExponent:A,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:A,strikethroughThickness:A,string:null,stroke:null,strokeDashArray:oe,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:A,strokeOpacity:A,strokeWidth:null,style:null,surfaceScale:A,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:oe,tabIndex:A,tableValues:null,target:null,targetX:A,targetY:A,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:oe,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:A,underlineThickness:A,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:A,values:null,vAlphabetic:A,vMathematical:A,vectorEffect:null,vHanging:A,vIdeographic:A,version:null,vertAdvY:A,vertOriginX:A,vertOriginY:A,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:A,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Er}),Tr=$e({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Pr=$e({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:_r}),zr=$e({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),jl={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"},Ml=/[A-Z]/g,zn=/-[a-z]/g,Fl=/^data[-\w.:]+$/i;function Rl(e,t){const n=Ut(t);let r=t,i=ie;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Fl.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(zn,Ol);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!zn.test(o)){let l=o.replace(Ml,Nl);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}i=rn}return new i(r,t)}function Nl(e){return"-"+e.toLowerCase()}function Ol(e){return e.charAt(1).toUpperCase()}const Bl=Ar([Ir,Ll,Tr,Pr,zr],"html"),ln=Ar([Ir,Dl,Tr,Pr,zr],"svg");function Hl(e){return e.join(" ").trim()}function Lr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Oe={},Et,Ln;function $l(){if(Ln)return Et;Ln=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,a=/^\s+|\s+$/g,s=`
|
|
24
24
|
`,u="/",f="*",c="",h="comment",p="declaration";function g(S,x){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];x=x||{};var I=1,v=1;function j(z){var T=z.match(t);T&&(I+=T.length);var B=z.lastIndexOf(s);v=~B?z.length-B:v+z.length}function M(){var z={line:I,column:v};return function(T){return T.position=new w(z),L(),T}}function w(z){this.start=z,this.end={line:I,column:v},this.source=x.source}w.prototype.content=S;function O(z){var T=new Error(x.source+":"+I+":"+v+": "+z);if(T.reason=z,T.filename=x.source,T.line=I,T.column=v,T.source=S,!x.silent)throw T}function V(z){var T=z.exec(S);if(T){var B=T[0];return j(B),S=S.slice(B.length),T}}function L(){V(n)}function y(z){var T;for(z=z||[];T=_();)T!==!1&&z.push(T);return z}function _(){var z=M();if(!(u!=S.charAt(0)||f!=S.charAt(1))){for(var T=2;c!=S.charAt(T)&&(f!=S.charAt(T)||u!=S.charAt(T+1));)++T;if(T+=2,c===S.charAt(T-1))return O("End of comment missing");var B=S.slice(2,T-2);return v+=2,j(B),S=S.slice(T),v+=2,z({type:h,comment:B})}}function P(){var z=M(),T=V(r);if(T){if(_(),!V(i))return O("property missing ':'");var B=V(o),U=z({type:p,property:b(T[0].replace(e,c)),value:B?b(B[0].replace(e,c)):c});return V(l),U}}function F(){var z=[];y(z);for(var T;T=P();)T!==!1&&(z.push(T),y(z));return z}return L(),F()}function b(S){return S?S.replace(a,c):c}return Et=g,Et}var Dn;function ql(){if(Dn)return Oe;Dn=1;var e=Oe&&Oe.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.default=n;const t=e($l());function n(r,i){let o=null;if(!r||typeof r!="string")return o;const l=(0,t.default)(r),a=typeof i=="function";return l.forEach(s=>{if(s.type!=="declaration")return;const{property:u,value:f}=s;a?i(u,f,s):f&&(o=o||{},o[u]=f)}),o}return Oe}var Qe={},jn;function Vl(){if(jn)return Qe;jn=1,Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,o=function(u){return!u||n.test(u)||e.test(u)},l=function(u,f){return f.toUpperCase()},a=function(u,f){return"".concat(f,"-")},s=function(u,f){return f===void 0&&(f={}),o(u)?u:(u=u.toLowerCase(),f.reactCompat?u=u.replace(i,a):u=u.replace(r,a),u.replace(t,l))};return Qe.camelCase=s,Qe}var Ye,Mn;function Ul(){if(Mn)return Ye;Mn=1;var e=Ye&&Ye.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(ql()),n=Vl();function r(i,o){var l={};return!i||typeof i!="string"||(0,t.default)(i,function(a,s){a&&s&&(l[(0,n.camelCase)(a,o)]=s)}),l}return r.default=r,Ye=r,Ye}var Wl=Ul();const Ql=Lr(Wl),Dr=jr("end"),on=jr("start");function jr(e){return t;function t(n){const r=n&&n.position&&n.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 Yl(e){const t=on(e),n=Dr(e);if(t&&n)return{start:t,end:n}}function et(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Fn(e.position):"start"in e||"end"in e?Fn(e):"line"in e||"column"in e?Yt(e):""}function Yt(e){return Rn(e&&e.line)+":"+Rn(e&&e.column)}function Fn(e){return Yt(e&&e.start)+"-"+Yt(e&&e.end)}function Rn(e){return e&&typeof e=="number"?e:1}class te extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},l=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(l=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const s=r.indexOf(":");s===-1?o.ruleId=r:(o.source=r.slice(0,s),o.ruleId=r.slice(s+1))}if(!o.place&&o.ancestors&&o.ancestors){const s=o.ancestors[o.ancestors.length-1];s&&(o.place=s.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=et(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=l&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}te.prototype.file="";te.prototype.name="";te.prototype.reason="";te.prototype.message="";te.prototype.stack="";te.prototype.column=void 0;te.prototype.line=void 0;te.prototype.ancestors=void 0;te.prototype.cause=void 0;te.prototype.fatal=void 0;te.prototype.place=void 0;te.prototype.ruleId=void 0;te.prototype.source=void 0;const an={}.hasOwnProperty,Xl=new Map,Jl=/[A-Z]/g,Gl=new Set(["table","tbody","thead","tfoot","tr"]),Kl=new Set(["td","th"]),Mr="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Zl(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=ao(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=oo(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?ln:Bl,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=Fr(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function Fr(e,t,n){if(t.type==="element")return eo(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return to(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return ro(e,t,n);if(t.type==="mdxjsEsm")return no(e,t);if(t.type==="root")return io(e,t,n);if(t.type==="text")return lo(e,t)}function eo(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=ln,e.schema=i),e.ancestors.push(t);const o=Nr(e,t.tagName,!1),l=so(e,t);let a=un(e,t);return Gl.has(t.tagName)&&(a=a.filter(function(s){return typeof s=="string"?!Pl(s):!0})),Rr(e,l,o,t),sn(l,a),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function to(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}rt(e,t.position)}function no(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);rt(e,t.position)}function ro(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=ln,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:Nr(e,t.name,!0),l=uo(e,t),a=un(e,t);return Rr(e,l,o,t),sn(l,a),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function io(e,t,n){const r={};return sn(r,un(e,t)),e.create(t,e.Fragment,r,n)}function lo(e,t){return t.value}function Rr(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function sn(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function oo(e,t,n){return r;function r(i,o,l,a){const u=Array.isArray(l.children)?n:t;return a?u(o,l,a):u(o,l)}}function ao(e,t){return n;function n(r,i,o,l){const a=Array.isArray(o.children),s=on(r);return t(i,o,l,a,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function so(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&an.call(t.properties,i)){const o=co(e,i,t.properties[i]);if(o){const[l,a]=o;e.tableCellAlignToStyle&&l==="align"&&typeof a=="string"&&Kl.has(t.tagName)?r=a:n[l]=a}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function uo(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const l=o.expression;l.type;const a=l.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else rt(e,t.position);else{const i=r.name;let o;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,o=e.evaluater.evaluateExpression(a.expression)}else rt(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function un(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Xl;for(;++r<t.children.length;){const o=t.children[r];let l;if(e.passKeys){const s=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(s){const u=i.get(s)||0;l=s+"-"+u,i.set(s,u+1)}}const a=Fr(e,o,l);a!==void 0&&n.push(a)}return n}function co(e,t,n){const r=Rl(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Al(n):Hl(n)),r.property==="style"){let i=typeof n=="object"?n:fo(e,String(n));return e.stylePropertyNameCase==="css"&&(i=po(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?jl[r.property]||r.property:r.attribute,n]}}function fo(e,t){try{return Ql(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new te("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=Mr+"#cannot-parse-style-attribute",i}}function Nr(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,l;for(;++o<i.length;){const a=_n(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};l=l?{type:"MemberExpression",object:l,property:a,computed:!!(o&&a.type==="Literal"),optional:!1}:a}r=l}else r=_n(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return an.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);rt(e)}function rt(e,t){const n=new te("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Mr+"#cannot-handle-mdx-estrees-without-createevaluater",n}function po(e){const t={};let n;for(n in e)an.call(e,n)&&(t[ho(n)]=e[n]);return t}function ho(e){let t=e.replace(Jl,mo);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function mo(e){return"-"+e.toLowerCase()}const _t={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"]},go={};function cn(e,t){const n=go,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Or(e,r,i)}function Or(e,t,n){if(yo(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Nn(e.children,t,n)}return Array.isArray(e)?Nn(e,t,n):""}function Nn(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Or(e[i],t,n);return r.join("")}function yo(e){return!!(e&&typeof e=="object")}const On=document.createElement("i");function fn(e){const t="&"+e+";";On.innerHTML=t;const n=On.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function ae(e,t,n,r){const i=e.length;let o=0,l;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);o<r.length;)l=r.slice(o,o+1e4),l.unshift(t,0),e.splice(...l),o+=1e4,t+=1e4}function se(e,t){return e.length>0?(ae(e,e.length,0,t),e):t}const Bn={}.hasOwnProperty;function Br(e){const t={};let n=-1;for(;++n<e.length;)xo(t,e[n]);return t}function xo(e,t){let n;for(n in t){const i=(Bn.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let l;if(o)for(l in o){Bn.call(i,l)||(i[l]=[]);const a=o[l];ko(i[l],Array.isArray(a)?a:a?[a]:[])}}}function ko(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);ae(e,0,0,r)}function Hr(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function he(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ne=Ae(/[A-Za-z]/),ee=Ae(/[\dA-Za-z]/),bo=Ae(/[#-'*+\--9=?A-Z^-~]/);function yt(e){return e!==null&&(e<32||e===127)}const Xt=Ae(/\d/),wo=Ae(/[\dA-Fa-f]/),Co=Ae(/[!-/:-@[-`{-~]/);function D(e){return e!==null&&e<-2}function Y(e){return e!==null&&(e<0||e===32)}function H(e){return e===-2||e===-1||e===32}const wt=Ae(/\p{P}|\p{S}/u),De=Ae(/\s/);function Ae(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function qe(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let l="";if(o===37&&ee(e.charCodeAt(n+1))&&ee(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(l=String.fromCharCode(o));else if(o>55295&&o<57344){const a=e.charCodeAt(n+1);o<56320&&a>56319&&a<57344?(l=String.fromCharCode(o,a),i=1):l="�"}else l=String.fromCharCode(o);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+i+1,l=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function q(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(s){return H(s)?(e.enter(n),a(s)):t(s)}function a(s){return H(s)&&o++<i?(e.consume(s),a):(e.exit(n),t(s))}}const So={tokenize:vo};function vo(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),q(e,t,"linePrefix")}function i(a){return e.enter("paragraph"),o(a)}function o(a){const s=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=s),n=s,l(a)}function l(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return D(a)?(e.consume(a),e.exit("chunkText"),o):(e.consume(a),l)}}const Ao={tokenize:Io},Hn={tokenize:Eo};function Io(e){const t=this,n=[];let r=0,i,o,l;return a;function a(v){if(r<n.length){const j=n[r];return t.containerState=j[1],e.attempt(j[0].continuation,s,u)(v)}return u(v)}function s(v){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&I();const j=t.events.length;let M=j,w;for(;M--;)if(t.events[M][0]==="exit"&&t.events[M][1].type==="chunkFlow"){w=t.events[M][1].end;break}x(r);let O=j;for(;O<t.events.length;)t.events[O][1].end={...w},O++;return ae(t.events,M+1,0,t.events.slice(j)),t.events.length=O,u(v)}return a(v)}function u(v){if(r===n.length){if(!i)return h(v);if(i.currentConstruct&&i.currentConstruct.concrete)return g(v);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Hn,f,c)(v)}function f(v){return i&&I(),x(r),h(v)}function c(v){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,g(v)}function h(v){return t.containerState={},e.attempt(Hn,p,g)(v)}function p(v){return r++,n.push([t.currentConstruct,t.containerState]),h(v)}function g(v){if(v===null){i&&I(),x(0),e.consume(v);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),b(v)}function b(v){if(v===null){S(e.exit("chunkFlow"),!0),x(0),e.consume(v);return}return D(v)?(e.consume(v),S(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(v),b)}function S(v,j){const M=t.sliceStream(v);if(j&&M.push(null),v.previous=o,o&&(o.next=v),o=v,i.defineSkip(v.start),i.write(M),t.parser.lazy[v.start.line]){let w=i.events.length;for(;w--;)if(i.events[w][1].start.offset<l&&(!i.events[w][1].end||i.events[w][1].end.offset>l))return;const O=t.events.length;let V=O,L,y;for(;V--;)if(t.events[V][0]==="exit"&&t.events[V][1].type==="chunkFlow"){if(L){y=t.events[V][1].end;break}L=!0}for(x(r),w=O;w<t.events.length;)t.events[w][1].end={...y},w++;ae(t.events,V+1,0,t.events.slice(O)),t.events.length=w}}function x(v){let j=n.length;for(;j-- >v;){const M=n[j];t.containerState=M[1],M[0].exit.call(t,e)}n.length=v}function I(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Eo(e,t,n){return q(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function He(e){if(e===null||Y(e)||De(e))return 1;if(wt(e))return 2}function Ct(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const Jt={name:"attention",resolveAll:_o,tokenize:To};function _o(e,t){let n=-1,r,i,o,l,a,s,u,f;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;s=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const c={...e[r][1].end},h={...e[n][1].start};$n(c,-s),$n(h,s),l={type:s>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},a={type:s>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:h},o={type:s>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:s>1?"strong":"emphasis",start:{...l.start},end:{...a.end}},e[r][1].end={...l.start},e[n][1].start={...a.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=se(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=se(u,[["enter",i,t],["enter",l,t],["exit",l,t],["enter",o,t]]),u=se(u,Ct(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=se(u,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,u=se(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,ae(e,r-1,n-r+3,u),n=r+u.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function To(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=He(r);let o;return l;function l(s){return o=s,e.enter("attentionSequence"),a(s)}function a(s){if(s===o)return e.consume(s),a;const u=e.exit("attentionSequence"),f=He(s),c=!f||f===2&&i||n.includes(s),h=!i||i===2&&f||n.includes(r);return u._open=!!(o===42?c:c&&(i||!h)),u._close=!!(o===42?h:h&&(f||!c)),t(s)}}function $n(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Po={name:"autolink",tokenize:zo};function zo(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(p){return ne(p)?(e.consume(p),l):p===64?n(p):u(p)}function l(p){return p===43||p===45||p===46||ee(p)?(r=1,a(p)):u(p)}function a(p){return p===58?(e.consume(p),r=0,s):(p===43||p===45||p===46||ee(p))&&r++<32?(e.consume(p),a):(r=0,u(p))}function s(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||yt(p)?n(p):(e.consume(p),s)}function u(p){return p===64?(e.consume(p),f):bo(p)?(e.consume(p),u):n(p)}function f(p){return ee(p)?c(p):n(p)}function c(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"),t):h(p)}function h(p){if((p===45||ee(p))&&r++<63){const g=p===45?h:c;return e.consume(p),g}return n(p)}}const ot={partial:!0,tokenize:Lo};function Lo(e,t,n){return r;function r(o){return H(o)?q(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||D(o)?t(o):n(o)}}const $r={continuation:{tokenize:jo},exit:Mo,name:"blockQuote",tokenize:Do};function Do(e,t,n){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"),o}return n(l)}function o(l){return H(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function jo(e,t,n){const r=this;return i;function i(l){return H(l)?q(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):o(l)}function o(l){return e.attempt($r,t,n)(l)}}function Mo(e){e.exit("blockQuote")}const qr={name:"characterEscape",tokenize:Fo};function Fo(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return Co(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const Vr={name:"characterReference",tokenize:Ro};function Ro(e,t,n){const r=this;let i=0,o,l;return a;function a(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),s}function s(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),o=31,l=ee,f(c))}function u(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,l=wo,f):(e.enter("characterReferenceValue"),o=7,l=Xt,f(c))}function f(c){if(c===59&&i){const h=e.exit("characterReferenceValue");return l===ee&&!fn(r.sliceSerialize(h))?n(c):(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(c)&&i++<o?(e.consume(c),f):n(c)}}const qn={partial:!0,tokenize:Oo},Vn={concrete:!0,name:"codeFenced",tokenize:No};function No(e,t,n){const r=this,i={partial:!0,tokenize:M};let o=0,l=0,a;return s;function s(w){return u(w)}function u(w){const O=r.events[r.events.length-1];return o=O&&O[1].type==="linePrefix"?O[2].sliceSerialize(O[1],!0).length:0,a=w,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(w)}function f(w){return w===a?(l++,e.consume(w),f):l<3?n(w):(e.exit("codeFencedFenceSequence"),H(w)?q(e,c,"whitespace")(w):c(w))}function c(w){return w===null||D(w)?(e.exit("codeFencedFence"),r.interrupt?t(w):e.check(qn,b,j)(w)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(w))}function h(w){return w===null||D(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(w)):H(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),q(e,p,"whitespace")(w)):w===96&&w===a?n(w):(e.consume(w),h)}function p(w){return w===null||D(w)?c(w):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(w))}function g(w){return w===null||D(w)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(w)):w===96&&w===a?n(w):(e.consume(w),g)}function b(w){return e.attempt(i,j,S)(w)}function S(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),x}function x(w){return o>0&&H(w)?q(e,I,"linePrefix",o+1)(w):I(w)}function I(w){return w===null||D(w)?e.check(qn,b,j)(w):(e.enter("codeFlowValue"),v(w))}function v(w){return w===null||D(w)?(e.exit("codeFlowValue"),I(w)):(e.consume(w),v)}function j(w){return e.exit("codeFenced"),t(w)}function M(w,O,V){let L=0;return y;function y(T){return w.enter("lineEnding"),w.consume(T),w.exit("lineEnding"),_}function _(T){return w.enter("codeFencedFence"),H(T)?q(w,P,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):P(T)}function P(T){return T===a?(w.enter("codeFencedFenceSequence"),F(T)):V(T)}function F(T){return T===a?(L++,w.consume(T),F):L>=l?(w.exit("codeFencedFenceSequence"),H(T)?q(w,z,"whitespace")(T):z(T)):V(T)}function z(T){return T===null||D(T)?(w.exit("codeFencedFence"),O(T)):V(T)}}}function Oo(e,t,n){const r=this;return i;function i(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const Tt={name:"codeIndented",tokenize:Ho},Bo={partial:!0,tokenize:$o};function Ho(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),q(e,o,"linePrefix",5)(u)}function o(u){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?l(u):n(u)}function l(u){return u===null?s(u):D(u)?e.attempt(Bo,l,s)(u):(e.enter("codeFlowValue"),a(u))}function a(u){return u===null||D(u)?(e.exit("codeFlowValue"),l(u)):(e.consume(u),a)}function s(u){return e.exit("codeIndented"),t(u)}}function $o(e,t,n){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?n(l):D(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):q(e,o,"linePrefix",5)(l)}function o(l){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(l):D(l)?i(l):n(l)}}const qo={name:"codeText",previous:Uo,resolve:Vo,tokenize:Wo};function Vo(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Uo(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Wo(e,t,n){let r=0,i,o;return l;function l(c){return e.enter("codeText"),e.enter("codeTextSequence"),a(c)}function a(c){return c===96?(e.consume(c),r++,a):(e.exit("codeTextSequence"),s(c))}function s(c){return c===null?n(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),s):c===96?(o=e.enter("codeTextSequence"),i=0,f(c)):D(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s):(e.enter("codeTextData"),u(c))}function u(c){return c===null||c===32||c===96||D(c)?(e.exit("codeTextData"),s(c)):(e.consume(c),u)}function f(c){return c===96?(e.consume(c),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(c)):(o.type="codeTextData",u(c))}}class Qo{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Xe(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Xe(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Xe(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Xe(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Xe(this.left,n.reverse())}}}function Xe(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Ur(e){const t={};let n=-1,r,i,o,l,a,s,u;const f=new Qo(e);for(;++n<f.length;){for(;n in t;)n=t[n];if(r=f.get(n),n&&r[1].type==="chunkFlow"&&f.get(n-1)[1].type==="listItemPrefix"&&(s=r[1]._tokenizer.events,o=0,o<s.length&&s[o][1].type==="lineEndingBlank"&&(o+=2),o<s.length&&s[o][1].type==="content"))for(;++o<s.length&&s[o][1].type!=="content";)s[o][1].type==="chunkText"&&(s[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Yo(f,n)),n=t[n],u=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(l=f.get(o),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),l[1].type="lineEnding",i=o);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},a=f.slice(i,n),a.unshift(r),f.splice(i,n-i+1,a))}}return ae(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!u}function Yo(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const a=l.events,s=[],u={};let f,c,h=-1,p=n,g=0,b=0;const S=[b];for(;p;){for(;e.get(++i)[1]!==p;);o.push(i),p._tokenizer||(f=r.sliceStream(p),p.next||f.push(null),c&&l.defineSkip(p.start),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(f),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),c=p,p=p.next}for(p=n;++h<a.length;)a[h][0]==="exit"&&a[h-1][0]==="enter"&&a[h][1].type===a[h-1][1].type&&a[h][1].start.line!==a[h][1].end.line&&(b=h+1,S.push(b),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(l.events=[],p?(p._tokenizer=void 0,p.previous=void 0):S.pop(),h=S.length;h--;){const x=a.slice(S[h],S[h+1]),I=o.pop();s.push([I,I+x.length-1]),e.splice(I,2,x)}for(s.reverse(),h=-1;++h<s.length;)u[g+s[h][0]]=g+s[h][1],g+=s[h][1]-s[h][0]-1;return u}const Xo={resolve:Go,tokenize:Ko},Jo={partial:!0,tokenize:Zo};function Go(e){return Ur(e),e}function Ko(e,t){let n;return r;function r(a){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?o(a):D(a)?e.check(Jo,l,o)(a):(e.consume(a),i)}function o(a){return e.exit("chunkContent"),e.exit("content"),t(a)}function l(a){return e.consume(a),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Zo(e,t,n){const r=this;return i;function i(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),q(e,o,"linePrefix")}function o(l){if(l===null||D(l))return n(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?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function Wr(e,t,n,r,i,o,l,a,s){const u=s||Number.POSITIVE_INFINITY;let f=0;return c;function c(x){return x===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(x),e.exit(o),h):x===null||x===32||x===41||yt(x)?n(x):(e.enter(r),e.enter(l),e.enter(a),e.enter("chunkString",{contentType:"string"}),b(x))}function h(x){return x===62?(e.enter(o),e.consume(x),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),p(x))}function p(x){return x===62?(e.exit("chunkString"),e.exit(a),h(x)):x===null||x===60||D(x)?n(x):(e.consume(x),x===92?g:p)}function g(x){return x===60||x===62||x===92?(e.consume(x),p):p(x)}function b(x){return!f&&(x===null||x===41||Y(x))?(e.exit("chunkString"),e.exit(a),e.exit(l),e.exit(r),t(x)):f<u&&x===40?(e.consume(x),f++,b):x===41?(e.consume(x),f--,b):x===null||x===32||x===40||yt(x)?n(x):(e.consume(x),x===92?S:b)}function S(x){return x===40||x===41||x===92?(e.consume(x),b):b(x)}}function Qr(e,t,n,r,i,o){const l=this;let a=0,s;return u;function u(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(o),f}function f(p){return a>999||p===null||p===91||p===93&&!s||p===94&&!a&&"_hiddenFootnoteSupport"in l.parser.constructs?n(p):p===93?(e.exit(o),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):D(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===null||p===91||p===93||D(p)||a++>999?(e.exit("chunkString"),f(p)):(e.consume(p),s||(s=!H(p)),p===92?h:c)}function h(p){return p===91||p===92||p===93?(e.consume(p),a++,c):c(p)}}function Yr(e,t,n,r,i,o){let l;return a;function a(h){return h===34||h===39||h===40?(e.enter(r),e.enter(i),e.consume(h),e.exit(i),l=h===40?41:h,s):n(h)}function s(h){return h===l?(e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):(e.enter(o),u(h))}function u(h){return h===l?(e.exit(o),s(l)):h===null?n(h):D(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),q(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===l||h===null||D(h)?(e.exit("chunkString"),u(h)):(e.consume(h),h===92?c:f)}function c(h){return h===l||h===92?(e.consume(h),f):f(h)}}function tt(e,t){let n;return r;function r(i){return D(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):H(i)?q(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const ea={name:"definition",tokenize:na},ta={partial:!0,tokenize:ra};function na(e,t,n){const r=this;let i;return o;function o(p){return e.enter("definition"),l(p)}function l(p){return Qr.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function a(p){return i=he(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),s):n(p)}function s(p){return Y(p)?tt(e,u)(p):u(p)}function u(p){return Wr(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function f(p){return e.attempt(ta,c,c)(p)}function c(p){return H(p)?q(e,h,"whitespace")(p):h(p)}function h(p){return p===null||D(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function ra(e,t,n){return r;function r(a){return Y(a)?tt(e,i)(a):n(a)}function i(a){return Yr(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return H(a)?q(e,l,"whitespace")(a):l(a)}function l(a){return a===null||D(a)?t(a):n(a)}}const ia={name:"hardBreakEscape",tokenize:la};function la(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return D(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const oa={name:"headingAtx",resolve:aa,tokenize:sa};function aa(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},ae(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function sa(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),o(f)}function o(f){return e.enter("atxHeadingSequence"),l(f)}function l(f){return f===35&&r++<6?(e.consume(f),l):f===null||Y(f)?(e.exit("atxHeadingSequence"),a(f)):n(f)}function a(f){return f===35?(e.enter("atxHeadingSequence"),s(f)):f===null||D(f)?(e.exit("atxHeading"),t(f)):H(f)?q(e,a,"whitespace")(f):(e.enter("atxHeadingText"),u(f))}function s(f){return f===35?(e.consume(f),s):(e.exit("atxHeadingSequence"),a(f))}function u(f){return f===null||f===35||Y(f)?(e.exit("atxHeadingText"),a(f)):(e.consume(f),u)}}const ua=["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"],Un=["pre","script","style","textarea"],ca={concrete:!0,name:"htmlFlow",resolveTo:ha,tokenize:da},fa={partial:!0,tokenize:ga},pa={partial:!0,tokenize:ma};function ha(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function da(e,t,n){const r=this;let i,o,l,a,s;return u;function u(m){return f(m)}function f(m){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(m),c}function c(m){return m===33?(e.consume(m),h):m===47?(e.consume(m),o=!0,b):m===63?(e.consume(m),i=3,r.interrupt?t:d):ne(m)?(e.consume(m),l=String.fromCharCode(m),S):n(m)}function h(m){return m===45?(e.consume(m),i=2,p):m===91?(e.consume(m),i=5,a=0,g):ne(m)?(e.consume(m),i=4,r.interrupt?t:d):n(m)}function p(m){return m===45?(e.consume(m),r.interrupt?t:d):n(m)}function g(m){const fe="CDATA[";return m===fe.charCodeAt(a++)?(e.consume(m),a===fe.length?r.interrupt?t:P:g):n(m)}function b(m){return ne(m)?(e.consume(m),l=String.fromCharCode(m),S):n(m)}function S(m){if(m===null||m===47||m===62||Y(m)){const fe=m===47,Ie=l.toLowerCase();return!fe&&!o&&Un.includes(Ie)?(i=1,r.interrupt?t(m):P(m)):ua.includes(l.toLowerCase())?(i=6,fe?(e.consume(m),x):r.interrupt?t(m):P(m)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(m):o?I(m):v(m))}return m===45||ee(m)?(e.consume(m),l+=String.fromCharCode(m),S):n(m)}function x(m){return m===62?(e.consume(m),r.interrupt?t:P):n(m)}function I(m){return H(m)?(e.consume(m),I):y(m)}function v(m){return m===47?(e.consume(m),y):m===58||m===95||ne(m)?(e.consume(m),j):H(m)?(e.consume(m),v):y(m)}function j(m){return m===45||m===46||m===58||m===95||ee(m)?(e.consume(m),j):M(m)}function M(m){return m===61?(e.consume(m),w):H(m)?(e.consume(m),M):v(m)}function w(m){return m===null||m===60||m===61||m===62||m===96?n(m):m===34||m===39?(e.consume(m),s=m,O):H(m)?(e.consume(m),w):V(m)}function O(m){return m===s?(e.consume(m),s=null,L):m===null||D(m)?n(m):(e.consume(m),O)}function V(m){return m===null||m===34||m===39||m===47||m===60||m===61||m===62||m===96||Y(m)?M(m):(e.consume(m),V)}function L(m){return m===47||m===62||H(m)?v(m):n(m)}function y(m){return m===62?(e.consume(m),_):n(m)}function _(m){return m===null||D(m)?P(m):H(m)?(e.consume(m),_):n(m)}function P(m){return m===45&&i===2?(e.consume(m),B):m===60&&i===1?(e.consume(m),U):m===62&&i===4?(e.consume(m),ce):m===63&&i===3?(e.consume(m),d):m===93&&i===5?(e.consume(m),ge):D(m)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(fa,ye,F)(m)):m===null||D(m)?(e.exit("htmlFlowData"),F(m)):(e.consume(m),P)}function F(m){return e.check(pa,z,ye)(m)}function z(m){return e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),T}function T(m){return m===null||D(m)?F(m):(e.enter("htmlFlowData"),P(m))}function B(m){return m===45?(e.consume(m),d):P(m)}function U(m){return m===47?(e.consume(m),l="",ue):P(m)}function ue(m){if(m===62){const fe=l.toLowerCase();return Un.includes(fe)?(e.consume(m),ce):P(m)}return ne(m)&&l.length<8?(e.consume(m),l+=String.fromCharCode(m),ue):P(m)}function ge(m){return m===93?(e.consume(m),d):P(m)}function d(m){return m===62?(e.consume(m),ce):m===45&&i===2?(e.consume(m),d):P(m)}function ce(m){return m===null||D(m)?(e.exit("htmlFlowData"),ye(m)):(e.consume(m),ce)}function ye(m){return e.exit("htmlFlow"),t(m)}}function ma(e,t,n){const r=this;return i;function i(l){return D(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):n(l)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function ga(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(ot,t,n)}}const ya={name:"htmlText",tokenize:xa};function xa(e,t,n){const r=this;let i,o,l;return a;function a(d){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(d),s}function s(d){return d===33?(e.consume(d),u):d===47?(e.consume(d),M):d===63?(e.consume(d),v):ne(d)?(e.consume(d),V):n(d)}function u(d){return d===45?(e.consume(d),f):d===91?(e.consume(d),o=0,g):ne(d)?(e.consume(d),I):n(d)}function f(d){return d===45?(e.consume(d),p):n(d)}function c(d){return d===null?n(d):d===45?(e.consume(d),h):D(d)?(l=c,U(d)):(e.consume(d),c)}function h(d){return d===45?(e.consume(d),p):c(d)}function p(d){return d===62?B(d):d===45?h(d):c(d)}function g(d){const ce="CDATA[";return d===ce.charCodeAt(o++)?(e.consume(d),o===ce.length?b:g):n(d)}function b(d){return d===null?n(d):d===93?(e.consume(d),S):D(d)?(l=b,U(d)):(e.consume(d),b)}function S(d){return d===93?(e.consume(d),x):b(d)}function x(d){return d===62?B(d):d===93?(e.consume(d),x):b(d)}function I(d){return d===null||d===62?B(d):D(d)?(l=I,U(d)):(e.consume(d),I)}function v(d){return d===null?n(d):d===63?(e.consume(d),j):D(d)?(l=v,U(d)):(e.consume(d),v)}function j(d){return d===62?B(d):v(d)}function M(d){return ne(d)?(e.consume(d),w):n(d)}function w(d){return d===45||ee(d)?(e.consume(d),w):O(d)}function O(d){return D(d)?(l=O,U(d)):H(d)?(e.consume(d),O):B(d)}function V(d){return d===45||ee(d)?(e.consume(d),V):d===47||d===62||Y(d)?L(d):n(d)}function L(d){return d===47?(e.consume(d),B):d===58||d===95||ne(d)?(e.consume(d),y):D(d)?(l=L,U(d)):H(d)?(e.consume(d),L):B(d)}function y(d){return d===45||d===46||d===58||d===95||ee(d)?(e.consume(d),y):_(d)}function _(d){return d===61?(e.consume(d),P):D(d)?(l=_,U(d)):H(d)?(e.consume(d),_):L(d)}function P(d){return d===null||d===60||d===61||d===62||d===96?n(d):d===34||d===39?(e.consume(d),i=d,F):D(d)?(l=P,U(d)):H(d)?(e.consume(d),P):(e.consume(d),z)}function F(d){return d===i?(e.consume(d),i=void 0,T):d===null?n(d):D(d)?(l=F,U(d)):(e.consume(d),F)}function z(d){return d===null||d===34||d===39||d===60||d===61||d===96?n(d):d===47||d===62||Y(d)?L(d):(e.consume(d),z)}function T(d){return d===47||d===62||Y(d)?L(d):n(d)}function B(d){return d===62?(e.consume(d),e.exit("htmlTextData"),e.exit("htmlText"),t):n(d)}function U(d){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),ue}function ue(d){return H(d)?q(e,ge,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d):ge(d)}function ge(d){return e.enter("htmlTextData"),l(d)}}const pn={name:"labelEnd",resolveAll:Ca,resolveTo:Sa,tokenize:va},ka={tokenize:Aa},ba={tokenize:Ia},wa={tokenize:Ea};function Ca(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&ae(e,0,e.length,n),e}function Sa(e,t){let n=e.length,r=0,i,o,l,a;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(l=n);const s={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[o][1].start},end:{...e[l][1].end}},f={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[l-2][1].start}};return a=[["enter",s,t],["enter",u,t]],a=se(a,e.slice(o+1,o+r+3)),a=se(a,[["enter",f,t]]),a=se(a,Ct(t.parser.constructs.insideSpan.null,e.slice(o+r+4,l-3),t)),a=se(a,[["exit",f,t],e[l-2],e[l-1],["exit",u,t]]),a=se(a,e.slice(l+1)),a=se(a,[["exit",s,t]]),ae(e,o,e.length,a),e}function va(e,t,n){const r=this;let i=r.events.length,o,l;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return a;function a(h){return o?o._inactive?c(h):(l=r.parser.defined.includes(he(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),s):n(h)}function s(h){return h===40?e.attempt(ka,f,l?f:c)(h):h===91?e.attempt(ba,f,l?u:c)(h):l?f(h):c(h)}function u(h){return e.attempt(wa,f,c)(h)}function f(h){return t(h)}function c(h){return o._balanced=!0,n(h)}}function Aa(e,t,n){return r;function r(c){return e.enter("resource"),e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),i}function i(c){return Y(c)?tt(e,o)(c):o(c)}function o(c){return c===41?f(c):Wr(e,l,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function l(c){return Y(c)?tt(e,s)(c):f(c)}function a(c){return n(c)}function s(c){return c===34||c===39||c===40?Yr(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):f(c)}function u(c){return Y(c)?tt(e,f)(c):f(c)}function f(c){return c===41?(e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),e.exit("resource"),t):n(c)}}function Ia(e,t,n){const r=this;return i;function i(a){return Qr.call(r,e,o,l,"reference","referenceMarker","referenceString")(a)}function o(a){return r.parser.defined.includes(he(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function l(a){return n(a)}}function Ea(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const _a={name:"labelStartImage",resolveAll:pn.resolveAll,tokenize:Ta};function Ta(e,t,n){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),o}function o(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),l):n(a)}function l(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const Pa={name:"labelStartLink",resolveAll:pn.resolveAll,tokenize:za};function za(e,t,n){const r=this;return i;function i(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),o}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const Pt={name:"lineEnding",tokenize:La};function La(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),q(e,t,"linePrefix")}}const gt={name:"thematicBreak",tokenize:Da};function Da(e,t,n){let r=0,i;return o;function o(u){return e.enter("thematicBreak"),l(u)}function l(u){return i=u,a(u)}function a(u){return u===i?(e.enter("thematicBreakSequence"),s(u)):r>=3&&(u===null||D(u))?(e.exit("thematicBreak"),t(u)):n(u)}function s(u){return u===i?(e.consume(u),r++,s):(e.exit("thematicBreakSequence"),H(u)?q(e,a,"whitespace")(u):a(u))}}const re={continuation:{tokenize:Ra},exit:Oa,name:"list",tokenize:Fa},ja={partial:!0,tokenize:Ba},Ma={partial:!0,tokenize:Na};function Fa(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return a;function a(p){const g=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:Xt(p)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(gt,n,u)(p):u(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(p)}return n(p)}function s(p){return Xt(p)&&++l<10?(e.consume(p),s):(!r.interrupt||l<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),u(p)):n(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(ot,r.interrupt?n:f,e.attempt(ja,h,c))}function f(p){return r.containerState.initialBlankLine=!0,o++,h(p)}function c(p){return H(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),h):n(p)}function h(p){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function Ra(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ot,i,o);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,q(e,t,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!H(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(Ma,t,l)(a))}function l(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,q(e,e.attempt(re,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function Na(e,t,n){const r=this;return q(e,i,"listItemIndent",r.containerState.size+1);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(o):n(o)}}function Oa(e){e.exit(this.containerState.type)}function Ba(e,t,n){const r=this;return q(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const l=r.events[r.events.length-1];return!H(o)&&l&&l[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const Wn={name:"setextUnderline",resolveTo:Ha,tokenize:$a};function Ha(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",l,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function $a(e,t,n){const r=this;let i;return o;function o(u){let f=r.events.length,c;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){c=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||c)?(e.enter("setextHeadingLine"),i=u,l(u)):n(u)}function l(u){return e.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===i?(e.consume(u),a):(e.exit("setextHeadingLineSequence"),H(u)?q(e,s,"lineSuffix")(u):s(u))}function s(u){return u===null||D(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const qa={tokenize:Va};function Va(e){const t=this,n=e.attempt(ot,r,e.attempt(this.parser.constructs.flowInitial,i,q(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Xo,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Ua={resolveAll:Jr()},Wa=Xr("string"),Qa=Xr("text");function Xr(e){return{resolveAll:Jr(e==="text"?Ya:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,l,a);return l;function l(f){return u(f)?o(f):a(f)}function a(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),s}function s(f){return u(f)?(n.exit("data"),o(f)):(n.consume(f),s)}function u(f){if(f===null)return!0;const c=i[f];let h=-1;if(c)for(;++h<c.length;){const p=c[h];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function Jr(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function Ya(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,l=-1,a=0,s;for(;o--;){const u=i[o];if(typeof u=="string"){for(l=u.length;u.charCodeAt(l-1)===32;)a++,l--;if(l)break;l=-1}else if(u===-2)s=!0,a++;else if(u!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(a=0),a){const u={type:n===e.length||s||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?l:r.start._bufferIndex+l,_index:r.start._index+o,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const Xa={42:re,43:re,45:re,48:re,49:re,50:re,51:re,52:re,53:re,54:re,55:re,56:re,57:re,62:$r},Ja={91:ea},Ga={[-2]:Tt,[-1]:Tt,32:Tt},Ka={35:oa,42:gt,45:[Wn,gt],60:ca,61:Wn,95:gt,96:Vn,126:Vn},Za={38:Vr,92:qr},es={[-5]:Pt,[-4]:Pt,[-3]:Pt,33:_a,38:Vr,42:Jt,60:[Po,ya],91:Pa,92:[ia,qr],93:pn,95:Jt,96:qo},ts={null:[Jt,Ua]},ns={null:[42,95]},rs={null:[]},is=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:ns,contentInitial:Ja,disable:rs,document:Xa,flow:Ka,flowInitial:Ga,insideSpan:ts,string:Za,text:es},Symbol.toStringTag,{value:"Module"}));function ls(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let l=[],a=[];const s={attempt:O(M),check:O(w),consume:I,enter:v,exit:j,interrupt:O(w,{interrupt:!0})},u={code:null,containerState:{},defineSkip:b,events:[],now:g,parser:e,previous:null,sliceSerialize:h,sliceStream:p,write:c};let f=t.tokenize.call(u,s);return t.resolveAll&&o.push(t),u;function c(_){return l=se(l,_),S(),l[l.length-1]!==null?[]:(V(t,0),u.events=Ct(o,u.events,u),u.events)}function h(_,P){return as(p(_),P)}function p(_){return os(l,_)}function g(){const{_bufferIndex:_,_index:P,line:F,column:z,offset:T}=r;return{_bufferIndex:_,_index:P,line:F,column:z,offset:T}}function b(_){i[_.line]=_.column,y()}function S(){let _;for(;r._index<l.length;){const P=l[r._index];if(typeof P=="string")for(_=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===_&&r._bufferIndex<P.length;)x(P.charCodeAt(r._bufferIndex));else x(P)}}function x(_){f=f(_)}function I(_){D(_)?(r.line++,r.column=1,r.offset+=_===-3?2:1,y()):_!==-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=_}function v(_,P){const F=P||{};return F.type=_,F.start=g(),u.events.push(["enter",F,u]),a.push(F),F}function j(_){const P=a.pop();return P.end=g(),u.events.push(["exit",P,u]),P}function M(_,P){V(_,P.from)}function w(_,P){P.restore()}function O(_,P){return F;function F(z,T,B){let U,ue,ge,d;return Array.isArray(z)?ye(z):"tokenize"in z?ye([z]):ce(z);function ce(K){return Ve;function Ve(Ce){const Fe=Ce!==null&&K[Ce],Re=Ce!==null&&K.null,st=[...Array.isArray(Fe)?Fe:Fe?[Fe]:[],...Array.isArray(Re)?Re:Re?[Re]:[]];return ye(st)(Ce)}}function ye(K){return U=K,ue=0,K.length===0?B:m(K[ue])}function m(K){return Ve;function Ve(Ce){return d=L(),ge=K,K.partial||(u.currentConstruct=K),K.name&&u.parser.constructs.disable.null.includes(K.name)?Ie():K.tokenize.call(P?Object.assign(Object.create(u),P):u,s,fe,Ie)(Ce)}}function fe(K){return _(ge,d),T}function Ie(K){return d.restore(),++ue<U.length?m(U[ue]):B}}}function V(_,P){_.resolveAll&&!o.includes(_)&&o.push(_),_.resolve&&ae(u.events,P,u.events.length-P,_.resolve(u.events.slice(P),u)),_.resolveTo&&(u.events=_.resolveTo(u.events,u))}function L(){const _=g(),P=u.previous,F=u.currentConstruct,z=u.events.length,T=Array.from(a);return{from:z,restore:B};function B(){r=_,u.previous=P,u.currentConstruct=F,u.events.length=z,a=T,y()}}function y(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function os(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let l;if(n===i)l=[e[n].slice(r,o)];else{if(l=e.slice(n,i),r>-1){const a=l[0];typeof a=="string"?l[0]=a.slice(r):l.shift()}o>0&&l.push(e[i].slice(0,o))}return l}function as(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let l;if(typeof o=="string")l=o;else switch(o){case-5:{l="\r";break}case-4:{l=`
|
|
25
25
|
`;break}case-3:{l=`\r
|
|
26
26
|
`;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&i)continue;l=" ";break}default:l=String.fromCharCode(o)}i=o===-2,r.push(l)}return r.join("")}function ss(e){const r={constructs:Br([is,...(e||{}).extensions||[]]),content:i(So),defined:[],document:i(Ao),flow:i(qa),lazy:{},string:i(Wa),text:i(Qa)};return r;function i(o){return l;function l(a){return ls(r,o,a)}}}function us(e){for(;!Ur(e););return e}const Qn=/[\0\t\n\r]/g;function cs(){let e=1,t="",n=!0,r;return i;function i(o,l,a){const s=[];let u,f,c,h,p;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(l||void 0).decode(o)),c=0,t="",n&&(o.charCodeAt(0)===65279&&c++,n=void 0);c<o.length;){if(Qn.lastIndex=c,u=Qn.exec(o),h=u&&u.index!==void 0?u.index:o.length,p=o.charCodeAt(h),!u){t=o.slice(c);break}if(p===10&&c===h&&r)s.push(-3),r=void 0;else switch(r&&(s.push(-5),r=void 0),c<h&&(s.push(o.slice(c,h)),e+=h-c),p){case 0:{s.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,s.push(-2);e++<f;)s.push(-1);break}case 10:{s.push(-4),e=1;break}default:r=!0,e=1}c=h+1}return a&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}const fs=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function ps(e){return e.replace(fs,hs)}function hs(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return Hr(n.slice(o?2:1),o?16:10)}return fn(n)||e}const Gr={}.hasOwnProperty;function ds(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),ms(n)(us(ss(n).document().write(cs()(e,t,!0))))}function ms(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(An),autolinkProtocol:L,autolinkEmail:L,atxHeading:o(Cn),blockQuote:o(Re),characterEscape:L,characterReference:L,codeFenced:o(st),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(st,l),codeText:o(Bi,l),codeTextData:L,data:L,codeFlowValue:L,definition:o(Hi),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o($i),hardBreakEscape:o(Sn),hardBreakTrailing:o(Sn),htmlFlow:o(vn,l),htmlFlowData:L,htmlText:o(vn,l),htmlTextData:L,image:o(qi),label:l,link:o(An),listItem:o(Vi),listItemValue:h,listOrdered:o(In,c),listUnordered:o(In),paragraph:o(Ui),reference:m,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o(Cn),strong:o(Wi),thematicBreak:o(Yi)},exit:{atxHeading:s(),atxHeadingSequence:M,autolink:s(),autolinkEmail:Fe,autolinkProtocol:Ce,blockQuote:s(),characterEscapeValue:y,characterReferenceMarkerHexadecimal:Ie,characterReferenceMarkerNumeric:Ie,characterReferenceValue:K,characterReference:Ve,codeFenced:s(S),codeFencedFence:b,codeFencedFenceInfo:p,codeFencedFenceMeta:g,codeFlowValue:y,codeIndented:s(x),codeText:s(T),codeTextData:y,data:y,definition:s(),definitionDestinationString:j,definitionLabelString:I,definitionTitleString:v,emphasis:s(),hardBreakEscape:s(P),hardBreakTrailing:s(P),htmlFlow:s(F),htmlFlowData:y,htmlText:s(z),htmlTextData:y,image:s(U),label:ge,labelText:ue,lineEnding:_,link:s(B),listItem:s(),listOrdered:s(),listUnordered:s(),paragraph:s(),referenceString:fe,resourceDestinationString:d,resourceTitleString:ce,resource:ye,setextHeading:s(V),setextHeadingLineSequence:O,setextHeadingText:w,strong:s(),thematicBreak:s()}};Kr(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(C){let E={type:"root",children:[]};const N={stack:[E],tokenStack:[],config:t,enter:a,exit:u,buffer:l,resume:f,data:n},$=[];let W=-1;for(;++W<C.length;)if(C[W][1].type==="listOrdered"||C[W][1].type==="listUnordered")if(C[W][0]==="enter")$.push(W);else{const pe=$.pop();W=i(C,pe,W)}for(W=-1;++W<C.length;){const pe=t[C[W][0]];Gr.call(pe,C[W][1].type)&&pe[C[W][1].type].call(Object.assign({sliceSerialize:C[W][2].sliceSerialize},N),C[W][1])}if(N.tokenStack.length>0){const pe=N.tokenStack[N.tokenStack.length-1];(pe[1]||Yn).call(N,void 0,pe[0])}for(E.position={start:Se(C.length>0?C[0][1].start:{line:1,column:1,offset:0}),end:Se(C.length>0?C[C.length-2][1].end:{line:1,column:1,offset:0})},W=-1;++W<t.transforms.length;)E=t.transforms[W](E)||E;return E}function i(C,E,N){let $=E-1,W=-1,pe=!1,Ee,xe,Ue,We;for(;++$<=N;){const le=C[$];switch(le[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{le[0]==="enter"?W++:W--,We=void 0;break}case"lineEndingBlank":{le[0]==="enter"&&(Ee&&!We&&!W&&!Ue&&(Ue=$),We=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:We=void 0}if(!W&&le[0]==="enter"&&le[1].type==="listItemPrefix"||W===-1&&le[0]==="exit"&&(le[1].type==="listUnordered"||le[1].type==="listOrdered")){if(Ee){let Ne=$;for(xe=void 0;Ne--;){const ke=C[Ne];if(ke[1].type==="lineEnding"||ke[1].type==="lineEndingBlank"){if(ke[0]==="exit")continue;xe&&(C[xe][1].type="lineEndingBlank",pe=!0),ke[1].type="lineEnding",xe=Ne}else if(!(ke[1].type==="linePrefix"||ke[1].type==="blockQuotePrefix"||ke[1].type==="blockQuotePrefixWhitespace"||ke[1].type==="blockQuoteMarker"||ke[1].type==="listItemIndent"))break}Ue&&(!xe||Ue<xe)&&(Ee._spread=!0),Ee.end=Object.assign({},xe?C[xe][1].start:le[1].end),C.splice(xe||$,0,["exit",Ee,le[2]]),$++,N++}if(le[1].type==="listItemPrefix"){const Ne={type:"listItem",_spread:!1,start:Object.assign({},le[1].start),end:void 0};Ee=Ne,C.splice($,0,["enter",Ne,le[2]]),$++,N++,Ue=void 0,We=!0}}}return C[E][1]._spread=pe,N}function o(C,E){return N;function N($){a.call(this,C($),$),E&&E.call(this,$)}}function l(){this.stack.push({type:"fragment",children:[]})}function a(C,E,N){this.stack[this.stack.length-1].children.push(C),this.stack.push(C),this.tokenStack.push([E,N||void 0]),C.position={start:Se(E.start),end:void 0}}function s(C){return E;function E(N){C&&C.call(this,N),u.call(this,N)}}function u(C,E){const N=this.stack.pop(),$=this.tokenStack.pop();if($)$[0].type!==C.type&&(E?E.call(this,C,$[0]):($[1]||Yn).call(this,C,$[0]));else throw new Error("Cannot close `"+C.type+"` ("+et({start:C.start,end:C.end})+"): it’s not open");N.position.end=Se(C.end)}function f(){return cn(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function h(C){if(this.data.expectingFirstListItemValue){const E=this.stack[this.stack.length-2];E.start=Number.parseInt(this.sliceSerialize(C),10),this.data.expectingFirstListItemValue=void 0}}function p(){const C=this.resume(),E=this.stack[this.stack.length-1];E.lang=C}function g(){const C=this.resume(),E=this.stack[this.stack.length-1];E.meta=C}function b(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const C=this.resume(),E=this.stack[this.stack.length-1];E.value=C.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){const C=this.resume(),E=this.stack[this.stack.length-1];E.value=C.replace(/(\r?\n|\r)$/g,"")}function I(C){const E=this.resume(),N=this.stack[this.stack.length-1];N.label=E,N.identifier=he(this.sliceSerialize(C)).toLowerCase()}function v(){const C=this.resume(),E=this.stack[this.stack.length-1];E.title=C}function j(){const C=this.resume(),E=this.stack[this.stack.length-1];E.url=C}function M(C){const E=this.stack[this.stack.length-1];if(!E.depth){const N=this.sliceSerialize(C).length;E.depth=N}}function w(){this.data.setextHeadingSlurpLineEnding=!0}function O(C){const E=this.stack[this.stack.length-1];E.depth=this.sliceSerialize(C).codePointAt(0)===61?1:2}function V(){this.data.setextHeadingSlurpLineEnding=void 0}function L(C){const N=this.stack[this.stack.length-1].children;let $=N[N.length-1];(!$||$.type!=="text")&&($=Qi(),$.position={start:Se(C.start),end:void 0},N.push($)),this.stack.push($)}function y(C){const E=this.stack.pop();E.value+=this.sliceSerialize(C),E.position.end=Se(C.end)}function _(C){const E=this.stack[this.stack.length-1];if(this.data.atHardBreak){const N=E.children[E.children.length-1];N.position.end=Se(C.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(E.type)&&(L.call(this,C),y.call(this,C))}function P(){this.data.atHardBreak=!0}function F(){const C=this.resume(),E=this.stack[this.stack.length-1];E.value=C}function z(){const C=this.resume(),E=this.stack[this.stack.length-1];E.value=C}function T(){const C=this.resume(),E=this.stack[this.stack.length-1];E.value=C}function B(){const C=this.stack[this.stack.length-1];if(this.data.inReference){const E=this.data.referenceType||"shortcut";C.type+="Reference",C.referenceType=E,delete C.url,delete C.title}else delete C.identifier,delete C.label;this.data.referenceType=void 0}function U(){const C=this.stack[this.stack.length-1];if(this.data.inReference){const E=this.data.referenceType||"shortcut";C.type+="Reference",C.referenceType=E,delete C.url,delete C.title}else delete C.identifier,delete C.label;this.data.referenceType=void 0}function ue(C){const E=this.sliceSerialize(C),N=this.stack[this.stack.length-2];N.label=ps(E),N.identifier=he(E).toLowerCase()}function ge(){const C=this.stack[this.stack.length-1],E=this.resume(),N=this.stack[this.stack.length-1];if(this.data.inReference=!0,N.type==="link"){const $=C.children;N.children=$}else N.alt=E}function d(){const C=this.resume(),E=this.stack[this.stack.length-1];E.url=C}function ce(){const C=this.resume(),E=this.stack[this.stack.length-1];E.title=C}function ye(){this.data.inReference=void 0}function m(){this.data.referenceType="collapsed"}function fe(C){const E=this.resume(),N=this.stack[this.stack.length-1];N.label=E,N.identifier=he(this.sliceSerialize(C)).toLowerCase(),this.data.referenceType="full"}function Ie(C){this.data.characterReferenceType=C.type}function K(C){const E=this.sliceSerialize(C),N=this.data.characterReferenceType;let $;N?($=Hr(E,N==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):$=fn(E);const W=this.stack[this.stack.length-1];W.value+=$}function Ve(C){const E=this.stack.pop();E.position.end=Se(C.end)}function Ce(C){y.call(this,C);const E=this.stack[this.stack.length-1];E.url=this.sliceSerialize(C)}function Fe(C){y.call(this,C);const E=this.stack[this.stack.length-1];E.url="mailto:"+this.sliceSerialize(C)}function Re(){return{type:"blockquote",children:[]}}function st(){return{type:"code",lang:null,meta:null,value:""}}function Bi(){return{type:"inlineCode",value:""}}function Hi(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function $i(){return{type:"emphasis",children:[]}}function Cn(){return{type:"heading",depth:0,children:[]}}function Sn(){return{type:"break"}}function vn(){return{type:"html",value:""}}function qi(){return{type:"image",title:null,url:"",alt:null}}function An(){return{type:"link",title:null,url:"",children:[]}}function In(C){return{type:"list",ordered:C.type==="listOrdered",start:null,spread:C._spread,children:[]}}function Vi(C){return{type:"listItem",spread:C._spread,checked:null,children:[]}}function Ui(){return{type:"paragraph",children:[]}}function Wi(){return{type:"strong",children:[]}}function Qi(){return{type:"text",value:""}}function Yi(){return{type:"thematicBreak"}}}function Se(e){return{line:e.line,column:e.column,offset:e.offset}}function Kr(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Kr(e,r):gs(e,r)}}function gs(e,t){let n;for(n in t)if(Gr.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Yn(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+et({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+et({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+et({start:t.start,end:t.end})+") is still open")}function ys(e){const t=this;t.parser=n;function n(r){return ds(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function xs(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function ks(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
@@ -48,5 +48,5 @@ Try asking: *"Show me the data"* or *"Can you suggest something?"*`,25),yield{ty
|
|
|
48
48
|
`))+1))}const l="#".repeat(i),a=n.enter("headingAtx"),s=n.enter("phrasing");o.move(l+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
|
|
49
49
|
`,...o.current()});return/^[\t ]/.test(u)&&(u=it(u.charCodeAt(0))+u.slice(1)),u=u?l+" "+u:l,n.options.closeAtx&&(u+=" "+l),s(),a(),u}hi.peek=Nc;function hi(e){return e.value||""}function Nc(){return"<"}di.peek=Oc;function di(e,t,n,r){const i=kn(n),o=i==='"'?"Quote":"Apostrophe",l=n.enter("image");let a=n.enter("label");const s=n.createTracker(r);let u=s.move("![");return u+=s.move(n.safe(e.alt,{before:u,after:"]",...s.current()})),u+=s.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(n.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(a=n.enter("destinationRaw"),u+=s.move(n.safe(e.url,{before:u,after:e.title?" ":")",...s.current()}))),a(),e.title&&(a=n.enter(`title${o}`),u+=s.move(" "+i),u+=s.move(n.safe(e.title,{before:u,after:i,...s.current()})),u+=s.move(i),a()),u+=s.move(")"),l(),u}function Oc(){return"!"}mi.peek=Bc;function mi(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let l=n.enter("label");const a=n.createTracker(r);let s=a.move("![");const u=n.safe(e.alt,{before:s,after:"]",...a.current()});s+=a.move(u+"]["),l();const f=n.stack;n.stack=[],l=n.enter("reference");const c=n.safe(n.associationId(e),{before:s,after:"]",...a.current()});return l(),n.stack=f,o(),i==="full"||!u||u!==c?s+=a.move(c+"]"):i==="shortcut"?s=s.slice(0,-1):s+=a.move("]"),s}function Bc(){return"!"}gi.peek=Hc;function gi(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const l=n.unsafe[o],a=n.compilePattern(l);let s;if(l.atBreak)for(;s=a.exec(r);){let u=s.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(s.index+1)}}return i+r+i}function Hc(){return"`"}function yi(e,t){const n=cn(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}xi.peek=$c;function xi(e,t,n,r){const i=kn(n),o=i==='"'?"Quote":"Apostrophe",l=n.createTracker(r);let a,s;if(yi(e,n)){const f=n.stack;n.stack=[],a=n.enter("autolink");let c=l.move("<");return c+=l.move(n.containerPhrasing(e,{before:c,after:">",...l.current()})),c+=l.move(">"),a(),n.stack=f,c}a=n.enter("link"),s=n.enter("label");let u=l.move("[");return u+=l.move(n.containerPhrasing(e,{before:u,after:"](",...l.current()})),u+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(s=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${o}`),u+=l.move(" "+i),u+=l.move(n.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),s()),u+=l.move(")"),a(),u}function $c(e,t,n){return yi(e,n)?"<":"["}ki.peek=qc;function ki(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let l=n.enter("label");const a=n.createTracker(r);let s=a.move("[");const u=n.containerPhrasing(e,{before:s,after:"]",...a.current()});s+=a.move(u+"]["),l();const f=n.stack;n.stack=[],l=n.enter("reference");const c=n.safe(n.associationId(e),{before:s,after:"]",...a.current()});return l(),n.stack=f,o(),i==="full"||!u||u!==c?s+=a.move(c+"]"):i==="shortcut"?s=s.slice(0,-1):s+=a.move("]"),s}function qc(){return"["}function bn(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Vc(e){const t=bn(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Uc(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function bi(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Wc(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let l=e.ordered?Uc(n):bn(n);const a=e.ordered?l==="."?")":".":Vc(n);let s=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&f&&(!f.children||!f.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(s=!0),bi(n)===l&&f){let c=-1;for(;++c<e.children.length;){const h=e.children[c];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){s=!0;break}}}}s&&(l=a),n.bulletCurrent=l;const u=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=o,i(),u}function Qc(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Yc(e,t,n,r){const i=Qc(n);let o=n.bulletCurrent||bn(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let l=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const a=n.createTracker(r);a.move(o+" ".repeat(l-o.length)),a.shift(l);const s=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,a.current()),f);return s(),u;function f(c,h,p){return h?(p?"":" ".repeat(l))+c:(p?o:o+" ".repeat(l-o.length))+c}}function Xc(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),l=n.containerPhrasing(e,r);return o(),i(),l}const Jc=vt(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Gc(e,t,n,r){return(e.children.some(function(l){return Jc(l)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Kc(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}wi.peek=Zc;function wi(e,t,n,r){const i=Kc(n),o=n.enter("strong"),l=n.createTracker(r),a=l.move(i+i);let s=l.move(n.containerPhrasing(e,{after:i,before:a,...l.current()}));const u=s.charCodeAt(0),f=bt(r.before.charCodeAt(r.before.length-1),u,i);f.inside&&(s=it(u)+s.slice(1));const c=s.charCodeAt(s.length-1),h=bt(r.after.charCodeAt(0),c,i);h.inside&&(s=s.slice(0,-1)+it(c));const p=l.move(i+i);return o(),n.attentionEncodeSurroundingInfo={after:h.outside,before:f.outside},a+s+p}function Zc(e,t,n){return n.options.strong||"*"}function ef(e,t,n,r){return n.safe(e.value,r)}function tf(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function nf(e,t,n){const r=(bi(n)+(n.options.ruleSpaces?" ":"")).repeat(tf(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Ci={blockquote:Ac,break:hr,code:zc,definition:Dc,emphasis:pi,hardBreak:hr,heading:Rc,html:hi,image:di,imageReference:mi,inlineCode:gi,link:xi,linkReference:ki,list:Wc,listItem:Yc,paragraph:Xc,root:Gc,strong:wi,text:ef,thematicBreak:nf};function rf(){return{enter:{table:lf,tableData:dr,tableHeader:dr,tableRow:af},exit:{codeText:sf,table:of,tableData:$t,tableHeader:$t,tableRow:$t}}}function lf(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function of(e){this.exit(e),this.data.inTable=void 0}function af(e){this.enter({type:"tableRow",children:[]},e)}function $t(e){this.exit(e)}function dr(e){this.enter({type:"tableCell",children:[]},e)}function sf(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,uf));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function uf(e,t){return t==="|"?t:e}function cf(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
50
50
|
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:h,table:l,tableCell:s,tableRow:a}};function l(p,g,b,S){return u(f(p,b,S),p.align)}function a(p,g,b,S){const x=c(p,b,S),I=u([x]);return I.slice(0,I.indexOf(`
|
|
51
|
-
`))}function s(p,g,b,S){const x=b.enter("tableCell"),I=b.enter("phrasing"),v=b.containerPhrasing(p,{...S,before:o,after:o});return I(),x(),v}function u(p,g){return Sc(p,{align:g,alignDelimiters:r,padding:n,stringLength:i})}function f(p,g,b){const S=p.children;let x=-1;const I=[],v=g.enter("table");for(;++x<S.length;)I[x]=c(S[x],g,b);return v(),I}function c(p,g,b){const S=p.children;let x=-1;const I=[],v=g.enter("tableRow");for(;++x<S.length;)I[x]=s(S[x],p,g,b);return v(),I}function h(p,g,b){let S=Ci.inlineCode(p,g,b);return b.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function ff(){return{exit:{taskListCheckValueChecked:mr,taskListCheckValueUnchecked:mr,paragraph:hf}}}function pf(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:df}}}function mr(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function hf(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,l;for(;++o<i.length;){const a=i[o];if(a.type==="paragraph"){l=a;break}}l===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function df(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",a=n.createTracker(r);o&&a.move(l);let s=Ci.listItem(e,t,n,{...r,...a.current()});return o&&(s=s.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),s;function u(f){return f+l}}function mf(){return[Wu(),hc(),yc(),rf(),ff()]}function gf(e){return{extensions:[Qu(),dc(e),xc(),cf(e),pf()]}}const yf={tokenize:Sf,partial:!0},Si={tokenize:vf,partial:!0},vi={tokenize:Af,partial:!0},Ai={tokenize:If,partial:!0},xf={tokenize:Ef,partial:!0},Ii={name:"wwwAutolink",tokenize:wf,previous:_i},Ei={name:"protocolAutolink",tokenize:Cf,previous:Ti},we={name:"emailAutolink",tokenize:bf,previous:Pi},me={};function kf(){return{text:me}}let _e=48;for(;_e<123;)me[_e]=we,_e++,_e===58?_e=65:_e===91&&(_e=97);me[43]=we;me[45]=we;me[46]=we;me[95]=we;me[72]=[we,Ei];me[104]=[we,Ei];me[87]=[we,Ii];me[119]=[we,Ii];function bf(e,t,n){const r=this;let i,o;return l;function l(c){return!tn(c)||!Pi.call(r,r.previous)||wn(r.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(c))}function a(c){return tn(c)?(e.consume(c),a):c===64?(e.consume(c),s):n(c)}function s(c){return c===46?e.check(xf,f,u)(c):c===45||c===95||ee(c)?(o=!0,e.consume(c),s):f(c)}function u(c){return e.consume(c),i=!0,s}function f(c){return o&&i&&ne(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(c)):n(c)}}function wf(e,t,n){const r=this;return i;function i(l){return l!==87&&l!==119||!_i.call(r,r.previous)||wn(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(yf,e.attempt(Si,e.attempt(vi,o),n),n)(l))}function o(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function Cf(e,t,n){const r=this;let i="",o=!1;return l;function l(c){return(c===72||c===104)&&Ti.call(r,r.previous)&&!wn(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(c),e.consume(c),a):n(c)}function a(c){if(ne(c)&&i.length<5)return i+=String.fromCodePoint(c),e.consume(c),a;if(c===58){const h=i.toLowerCase();if(h==="http"||h==="https")return e.consume(c),s}return n(c)}function s(c){return c===47?(e.consume(c),o?u:(o=!0,s)):n(c)}function u(c){return c===null||yt(c)||Y(c)||De(c)||wt(c)?n(c):e.attempt(Si,e.attempt(vi,f),n)(c)}function f(c){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(c)}}function Sf(e,t,n){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),o):n(l)}function o(l){return l===null?n(l):t(l)}}function vf(e,t,n){let r,i,o;return l;function l(u){return u===46||u===95?e.check(Ai,s,a)(u):u===null||Y(u)||De(u)||u!==45&&wt(u)?s(u):(o=!0,e.consume(u),l)}function a(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),l}function s(u){return i||r||!o?n(u):t(u)}}function Af(e,t){let n=0,r=0;return i;function i(l){return l===40?(n++,e.consume(l),i):l===41&&r<n?o(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(Ai,t,o)(l):l===null||Y(l)||De(l)?t(l):(e.consume(l),i)}function o(l){return l===41&&r++,e.consume(l),i}}function If(e,t,n){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),o):a===93?(e.consume(a),i):a===60||a===null||Y(a)||De(a)?t(a):n(a)}function i(a){return a===null||a===40||a===91||Y(a)||De(a)?t(a):r(a)}function o(a){return ne(a)?l(a):n(a)}function l(a){return a===59?(e.consume(a),r):ne(a)?(e.consume(a),l):n(a)}}function Ef(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return ee(o)?n(o):t(o)}}function _i(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Y(e)}function Ti(e){return!ne(e)}function Pi(e){return!(e===47||tn(e))}function tn(e){return e===43||e===45||e===46||e===95||ee(e)}function wn(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const _f={tokenize:Ff,partial:!0};function Tf(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Df,continuation:{tokenize:jf},exit:Mf}},text:{91:{name:"gfmFootnoteCall",tokenize:Lf},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Pf,resolveTo:zf}}}}function Pf(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;i--;){const s=r.events[i][1];if(s.type==="labelImage"){l=s;break}if(s.type==="gfmFootnoteCall"||s.type==="labelLink"||s.type==="label"||s.type==="image"||s.type==="link")break}return a;function a(s){if(!l||!l._balanced)return n(s);const u=he(r.sliceSerialize({start:l.end,end:r.now()}));return u.codePointAt(0)!==94||!o.includes(u.slice(1))?n(s):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),t(s))}}function zf(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},a=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",l,t],["exit",l,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...a),e}function Lf(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,l;return a;function a(c){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),s}function s(c){return c!==94?n(c):(e.enter("gfmFootnoteCallMarker"),e.consume(c),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(c){if(o>999||c===93&&!l||c===null||c===91||Y(c))return n(c);if(c===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return i.includes(he(r.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(c)}return Y(c)||(l=!0),o++,e.consume(c),c===92?f:u}function f(c){return c===91||c===92||c===93?(e.consume(c),o++,u):u(c)}}function Df(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,l=0,a;return s;function s(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(g)}function f(g){if(l>999||g===93&&!a||g===null||g===91||Y(g))return n(g);if(g===93){e.exit("chunkString");const b=e.exit("gfmFootnoteDefinitionLabelString");return o=he(r.sliceSerialize(b)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return Y(g)||(a=!0),l++,e.consume(g),g===92?c:f}function c(g){return g===91||g===92||g===93?(e.consume(g),l++,f):f(g)}function h(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),i.includes(o)||i.push(o),q(e,p,"gfmFootnoteDefinitionWhitespace")):n(g)}function p(g){return t(g)}}function jf(e,t,n){return e.check(ot,t,e.attempt(_f,t,n))}function Mf(e){e.exit("gfmFootnoteDefinition")}function Ff(e,t,n){const r=this;return q(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(o):n(o)}}function Rf(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(l,a){let s=-1;for(;++s<l.length;)if(l[s][0]==="enter"&&l[s][1].type==="strikethroughSequenceTemporary"&&l[s][1]._close){let u=s;for(;u--;)if(l[u][0]==="exit"&&l[u][1].type==="strikethroughSequenceTemporary"&&l[u][1]._open&&l[s][1].end.offset-l[s][1].start.offset===l[u][1].end.offset-l[u][1].start.offset){l[s][1].type="strikethroughSequence",l[u][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},l[u][1].start),end:Object.assign({},l[s][1].end)},c={type:"strikethroughText",start:Object.assign({},l[u][1].end),end:Object.assign({},l[s][1].start)},h=[["enter",f,a],["enter",l[u][1],a],["exit",l[u][1],a],["enter",c,a]],p=a.parser.constructs.insideSpan.null;p&&ae(h,h.length,0,Ct(p,l.slice(u+1,s),a)),ae(h,h.length,0,[["exit",c,a],["enter",l[s][1],a],["exit",l[s][1],a],["exit",f,a]]),ae(l,u-1,s-u+3,h),s=u+h.length-2;break}}for(s=-1;++s<l.length;)l[s][1].type==="strikethroughSequenceTemporary"&&(l[s][1].type="data");return l}function o(l,a,s){const u=this.previous,f=this.events;let c=0;return h;function h(g){return u===126&&f[f.length-1][1].type!=="characterEscape"?s(g):(l.enter("strikethroughSequenceTemporary"),p(g))}function p(g){const b=He(u);if(g===126)return c>1?s(g):(l.consume(g),c++,p);if(c<2&&!n)return s(g);const S=l.exit("strikethroughSequenceTemporary"),x=He(g);return S._open=!x||x===2&&!!b,S._close=!b||b===2&&!!x,a(g)}}}class Nf{constructor(){this.map=[]}add(t,n,r){Of(this,t,n,r)}consume(t){if(this.map.sort(function(o,l){return o[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const o of i)t.push(o);i=r.pop()}this.map.length=0}}function Of(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function Bf(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function Hf(){return{flow:{null:{name:"table",tokenize:$f,resolveAll:qf}}}}function $f(e,t,n){const r=this;let i=0,o=0,l;return a;function a(y){let _=r.events.length-1;for(;_>-1;){const z=r.events[_][1].type;if(z==="lineEnding"||z==="linePrefix")_--;else break}const P=_>-1?r.events[_][1].type:null,F=P==="tableHead"||P==="tableRow"?w:s;return F===w&&r.parser.lazy[r.now().line]?n(y):F(y)}function s(y){return e.enter("tableHead"),e.enter("tableRow"),u(y)}function u(y){return y===124||(l=!0,o+=1),f(y)}function f(y){return y===null?n(y):D(y)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):n(y):H(y)?q(e,f,"whitespace")(y):(o+=1,l&&(l=!1,i+=1),y===124?(e.enter("tableCellDivider"),e.consume(y),e.exit("tableCellDivider"),l=!0,f):(e.enter("data"),c(y)))}function c(y){return y===null||y===124||Y(y)?(e.exit("data"),f(y)):(e.consume(y),y===92?h:c)}function h(y){return y===92||y===124?(e.consume(y),c):c(y)}function p(y){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(y):(e.enter("tableDelimiterRow"),l=!1,H(y)?q(e,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(y):g(y))}function g(y){return y===45||y===58?S(y):y===124?(l=!0,e.enter("tableCellDivider"),e.consume(y),e.exit("tableCellDivider"),b):M(y)}function b(y){return H(y)?q(e,S,"whitespace")(y):S(y)}function S(y){return y===58?(o+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(y),e.exit("tableDelimiterMarker"),x):y===45?(o+=1,x(y)):y===null||D(y)?j(y):M(y)}function x(y){return y===45?(e.enter("tableDelimiterFiller"),I(y)):M(y)}function I(y){return y===45?(e.consume(y),I):y===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(y),e.exit("tableDelimiterMarker"),v):(e.exit("tableDelimiterFiller"),v(y))}function v(y){return H(y)?q(e,j,"whitespace")(y):j(y)}function j(y){return y===124?g(y):y===null||D(y)?!l||i!==o?M(y):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(y)):M(y)}function M(y){return n(y)}function w(y){return e.enter("tableRow"),O(y)}function O(y){return y===124?(e.enter("tableCellDivider"),e.consume(y),e.exit("tableCellDivider"),O):y===null||D(y)?(e.exit("tableRow"),t(y)):H(y)?q(e,O,"whitespace")(y):(e.enter("data"),V(y))}function V(y){return y===null||y===124||Y(y)?(e.exit("data"),O(y)):(e.consume(y),y===92?L:V)}function L(y){return y===92||y===124?(e.consume(y),V):V(y)}}function qf(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],l=[0,0,0,0],a=!1,s=0,u,f,c;const h=new Nf;for(;++n<e.length;){const p=e[n],g=p[1];p[0]==="enter"?g.type==="tableHead"?(a=!1,s!==0&&(gr(h,t,s,u,f),f=void 0,s=0),u={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},h.add(n,0,[["enter",u,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,c=void 0,o=[0,0,0,0],l=[0,n+1,0,0],a&&(a=!1,f={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},h.add(n,0,[["enter",f,t]])),i=g.type==="tableDelimiterRow"?2:f?3:1):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(o[1]!==0&&(l[0]=l[1],c=ht(h,t,o,i,void 0,c),o=[0,0,0,0]),l[2]=n)):g.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(l[0]=l[1],c=ht(h,t,o,i,void 0,c)),o=l,l=[o[1],n,0,0])):g.type==="tableHead"?(a=!0,s=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(s=n,o[1]!==0?(l[0]=l[1],c=ht(h,t,o,i,n,c)):l[1]!==0&&(c=ht(h,t,l,i,n,c)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(l[3]=n)}for(s!==0&&gr(h,t,s,u,f),h.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=Bf(t.events,n))}return e}function ht(e,t,n,r,i,o){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";n[0]!==0&&(o.end=Object.assign({},Be(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const s=Be(t.events,n[1]);if(o={type:l,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const u=Be(t.events,n[2]),f=Be(t.events,n[3]),c={type:a,start:Object.assign({},u),end:Object.assign({},f)};if(e.add(n[2],0,[["enter",c,t]]),r!==2){const h=t.events[n[2]],p=t.events[n[3]];if(h[1].end=Object.assign({},p[1].end),h[1].type="chunkText",h[1].contentType="text",n[3]>n[2]+1){const g=n[2]+1,b=n[3]-n[2]-1;e.add(g,b,[])}}e.add(n[3]+1,0,[["exit",c,t]])}return i!==void 0&&(o.end=Object.assign({},Be(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function gr(e,t,n,r,i){const o=[],l=Be(t.events,n);i&&(i.end=Object.assign({},l),o.push(["exit",i,t])),r.end=Object.assign({},l),o.push(["exit",r,t]),e.add(n+1,0,o)}function Be(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Vf={name:"tasklistCheck",tokenize:Wf};function Uf(){return{text:{91:Vf}}}function Wf(e,t,n){const r=this;return i;function i(s){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(s):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),o)}function o(s){return Y(s)?(e.enter("taskListCheckValueUnchecked"),e.consume(s),e.exit("taskListCheckValueUnchecked"),l):s===88||s===120?(e.enter("taskListCheckValueChecked"),e.consume(s),e.exit("taskListCheckValueChecked"),l):n(s)}function l(s){return s===93?(e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(s)}function a(s){return D(s)?t(s):H(s)?e.check({tokenize:Qf},t,n)(s):n(s)}}function Qf(e,t,n){return q(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function Yf(e){return Br([kf(),Tf(),Rf(e),Hf(),Uf()])}const Xf={};function Jf(e){const t=this,n=e||Xf,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Yf(n)),o.push(mf()),l.push(gf(n))}const Gf="_wrapper_v5oy7_1",Kf="_table_v5oy7_8",Zf="_th_v5oy7_14",ep="_tr_v5oy7_24",tp="_td_v5oy7_32",Ge={wrapper:Gf,table:Kf,th:Zf,tr:ep,td:tp};function zi({part:e}){return k.jsx("div",{className:Ge.wrapper,children:k.jsxs("table",{className:Ge.table,children:[k.jsx("thead",{children:k.jsx("tr",{children:e.columns.map(t=>k.jsx("th",{className:Ge.th,children:t},t))})}),k.jsx("tbody",{children:e.rows.map((t,n)=>k.jsx("tr",{className:Ge.tr,children:e.columns.map(r=>k.jsx("td",{className:Ge.td,children:String(t[r]??"")},r))},n))})]})})}const np="_card_q8nsq_1",rp="_header_q8nsq_9",ip="_icon_q8nsq_16",lp="_title_q8nsq_23",op="_description_q8nsq_29",ap="_actions_q8nsq_36",sp="_confirm_q8nsq_41",up="_cancel_q8nsq_57",ve={card:np,header:rp,icon:ip,title:lp,description:op,actions:ap,confirm:sp,cancel:up};function Li({part:e,onConfirm:t,onCancel:n}){const r=je(),{proposal:i}=e;return k.jsxs("div",{className:ve.card,children:[k.jsxs("div",{className:ve.header,children:[k.jsx("svg",{className:ve.icon,viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:k.jsx("path",{d:"M10 1a.75.75 0 01.75.75v1.5a.75.75 0 01-1.5 0v-1.5A.75.75 0 0110 1zM5.05 3.05a.75.75 0 011.06 1.06l-1.06 1.06a.75.75 0 11-1.06-1.06l1.06-1.06zm9.9 0a.75.75 0 010 1.06l-1.06 1.06a.75.75 0 11-1.06-1.06l1.06-1.06a.75.75 0 011.06 0zM10 6a4 4 0 100 8 4 4 0 000-8zm-9 4a.75.75 0 01.75-.75h1.5a.75.75 0 010 1.5h-1.5A.75.75 0 011 10zm15.75-.75a.75.75 0 000 1.5h1.5a.75.75 0 000-1.5h-1.5zM4.11 14.89a.75.75 0 010 1.06l-1.06 1.06a.75.75 0 11-1.06-1.06l1.06-1.06a.75.75 0 011.06 0zm11.84 1.06a.75.75 0 10-1.06-1.06l-1.06 1.06a.75.75 0 101.06 1.06l1.06-1.06zM10 17.25a.75.75 0 01.75.75v1.5a.75.75 0 01-1.5 0v-1.5a.75.75 0 01.75-.75z"})}),k.jsx("span",{className:ve.title,children:i.title})]}),i.description&&k.jsx("p",{className:ve.description,children:i.description}),k.jsxs("div",{className:ve.actions,children:[k.jsx("button",{className:ve.confirm,onClick:()=>t(i.id,i.payload),children:i.confirmLabel??r.proposalConfirm}),k.jsx("button",{className:ve.cancel,onClick:()=>n(i.id),children:i.cancelLabel??r.proposalCancel})]})]})}const cp="_activity_2jjfs_1",fp="_indicator_2jjfs_13",pp="_content_2jjfs_36",hp="_title_2jjfs_40",dp="_description_2jjfs_45",Ke={activity:cp,indicator:fp,content:pp,title:hp,description:dp};function Di({part:e}){return k.jsxs("div",{className:Ke.activity,"data-status":e.status,children:[k.jsx("span",{className:Ke.indicator,"aria-hidden":"true"}),k.jsxs("div",{className:Ke.content,children:[k.jsx("div",{className:Ke.title,children:e.title}),e.description&&k.jsx("div",{className:Ke.description,children:e.description})]})]})}const mp="_markdown_187bn_1",gp="_errorText_187bn_83",yp="_errorIcon_187bn_91",qt={markdown:mp,errorText:gp,errorIcon:yp};function ji({part:e,onProposalConfirm:t,onProposalCancel:n}){switch(e.type){case"text":return k.jsx("div",{className:qt.markdown,children:k.jsx(Fu,{remarkPlugins:[Jf],children:e.text})});case"table":return k.jsx(zi,{part:e});case"activity":return k.jsx(Di,{part:e});case"proposal":return k.jsx(Li,{part:e,onConfirm:t,onCancel:n});case"error":return k.jsxs("span",{className:qt.errorText,children:[k.jsx(vl,{className:qt.errorIcon}),e.message]})}}const xp="_wrapper_13l1e_1",kp="_user_13l1e_8",bp="_assistant_13l1e_12",wp="_avatar_13l1e_16",Cp="_bubble_13l1e_39",Sp="_empty_13l1e_61",Te={wrapper:xp,user:kp,assistant:bp,avatar:wp,bubble:Cp,empty:Sp};function Mi({message:e,onProposalConfirm:t,onProposalCancel:n,assistantIcon:r}){const i=je(),o=e.role==="user";return k.jsxs("div",{className:`${Te.wrapper} ${o?Te.user:Te.assistant}`,children:[!o&&k.jsx("div",{className:Te.avatar,"aria-hidden":"true",children:r??k.jsx(vr,{})}),k.jsxs("div",{className:Te.bubble,children:[e.parts.map((l,a)=>k.jsx(ji,{part:l,onProposalConfirm:t,onProposalCancel:n},a)),e.parts.length===0&&k.jsx("span",{className:Te.empty})]}),o&&k.jsx("div",{className:Te.avatar,children:i.userLabel})]})}const vp="_wrapper_1dvvu_1",Ap="_dot_1dvvu_8",Ip="_connectingLabel_1dvvu_19",Ze={wrapper:vp,dot:Ap,connectingLabel:Ip};function Fi({connecting:e=!1}){const t=je();return k.jsxs("div",{className:Ze.wrapper,"aria-label":e?t.connectingMessage:t.typingMessage,children:[k.jsx("span",{className:Ze.dot}),k.jsx("span",{className:Ze.dot}),k.jsx("span",{className:Ze.dot}),e&&k.jsx("span",{className:Ze.connectingLabel,children:t.connectingMessage})]})}const Ep="_list_1f8gn_1",_p="_empty_1f8gn_11",Tp="_hint_1f8gn_24",Pp="_typing_1f8gn_31",dt={list:Ep,empty:_p,hint:Tp,typing:Pp};function Ri({messages:e,isLoading:t,isConnecting:n,onProposalConfirm:r,onProposalCancel:i,assistantIcon:o}){const l=je(),a=X.useRef(null);return X.useEffect(()=>{a.current?.scrollIntoView({behavior:"smooth"})},[e,t]),k.jsxs("div",{className:dt.list,children:[e.length===0&&k.jsxs("div",{className:dt.empty,children:[k.jsx("p",{children:l.emptyStateText}),k.jsx("p",{className:dt.hint,children:k.jsx("em",{children:l.emptyStateHint})})]}),e.map(s=>k.jsx(Mi,{message:s,onProposalConfirm:r,onProposalCancel:i,assistantIcon:o},s.id)),t&&k.jsx("div",{className:dt.typing,children:k.jsx(Fi,{connecting:n})}),k.jsx("div",{ref:a})]})}const zp="_wrapper_v8iyr_1",Lp="_textarea_v8iyr_11",Dp="_toolbar_v8iyr_35",jp="_actions_v8iyr_45",Mp="_actionBtn_v8iyr_52",Fp="_sendBtn_v8iyr_85",Rp="_spinnerIcon_v8iyr_116",Np="_stopBtn_v8iyr_126",Op="_stopIcon_v8iyr_149",be={wrapper:zp,textarea:Lp,toolbar:Dp,actions:jp,actionBtn:Mp,sendBtn:Fp,spinnerIcon:Rp,stopBtn:Np,stopIcon:Op};function Ni({value:e,onChange:t,onSend:n,onStop:r,isLoading:i,placeholder:o,actions:l,sendIcon:a}){const s=je(),u=[{icon:k.jsx(yl,{}),label:s.actionAddFile},{icon:k.jsx(xl,{}),label:s.actionQuickActions},{icon:k.jsx(kl,{}),label:s.actionNew},{icon:k.jsx(bl,{}),label:s.actionHistory},{icon:k.jsx(wl,{}),label:s.actionRules}],f=l??u,c=h=>{h.key==="Enter"&&!h.shiftKey&&(h.preventDefault(),n())};return k.jsxs("div",{className:be.wrapper,children:[k.jsx("textarea",{className:be.textarea,value:e,onChange:h=>t(h.target.value),onKeyDown:c,placeholder:o??s.inputPlaceholder,rows:3,disabled:i,"aria-label":s.sendMessage}),k.jsxs("div",{className:be.toolbar,children:[f.length>0&&k.jsx("div",{className:be.actions,children:f.map((h,p)=>k.jsxs("button",{className:be.actionBtn,type:"button",disabled:i,"aria-label":h.label,onClick:h.onClick,children:[h.icon,k.jsx("span",{children:h.label})]},p))}),i&&r?k.jsxs("button",{className:be.stopBtn,onClick:r,"aria-label":s.stopMessage,type:"button",children:[k.jsx("svg",{className:be.stopIcon,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:k.jsx("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"})}),k.jsx("span",{children:s.stopMessage})]}):k.jsxs("button",{className:be.sendBtn,onClick:n,disabled:i||!e.trim(),"aria-label":s.sendMessage,type:"button",children:[i?k.jsx("svg",{className:be.spinnerIcon,viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:k.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeDasharray:"32",strokeDashoffset:"12"})}):a??k.jsx(gl,{}),k.jsx("span",{children:s.sendMessage})]})]})]})}const Bp="_wrapper_1kefv_1",Hp="_icon_1kefv_14",$p="_message_1kefv_20",qp="_dismiss_1kefv_24",mt={wrapper:Bp,icon:Hp,message:$p,dismiss:qp};function Oi({message:e,onDismiss:t}){const n=je();return k.jsxs("div",{className:mt.wrapper,role:"alert",children:[k.jsx("svg",{className:mt.icon,viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:k.jsx("path",{fillRule:"evenodd",d:"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495zM10 5a.75.75 0 01.75.75v3.5a.75.75 0 01-1.5 0v-3.5A.75.75 0 0110 5zm0 9a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})}),k.jsx("span",{className:mt.message,children:e}),t&&k.jsx("button",{className:mt.dismiss,onClick:t,"aria-label":n.errorDismiss,children:k.jsx("svg",{viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:k.jsx("path",{d:"M3.72 3.72a.75.75 0 011.06 0L8 6.94l3.22-3.22a.75.75 0 111.06 1.06L9.06 8l3.22 3.22a.75.75 0 11-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 01-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 010-1.06z"})})})]})}const Vp="_chat_1acbe_1",Up={chat:Vp};function Wp({messages:e,input:t,isLoading:n,isConnecting:r,error:i,onInputChange:o,onSend:l,onStop:a,onProposalConfirm:s,onProposalCancel:u,placeholder:f,assistantIcon:c,actions:h,sendIcon:p,className:g,style:b}){return k.jsxs("div",{className:[Up.chat,g].filter(Boolean).join(" "),style:b,children:[k.jsx(Ri,{messages:e,isLoading:n,isConnecting:r,onProposalConfirm:s,onProposalCancel:u,assistantIcon:c}),i&&k.jsx(Oi,{message:i}),k.jsx(Ni,{value:t,onChange:o,onSend:l,onStop:a,isLoading:n,placeholder:f,actions:h,sendIcon:p})]})}const Qp="_header_f9hy1_1",Yp="_left_f9hy1_12",Xp="_icon_f9hy1_18",Jp="_title_f9hy1_23",Gp="_resetBtn_f9hy1_29",Kp="_actions_f9hy1_50",Pe={header:Qp,left:Yp,icon:Xp,title:Jp,resetBtn:Gp,actions:Kp};function Zp({title:e,onMinimize:t,isMinimized:n,icon:r,onReset:i}){const o=je();return k.jsxs("div",{className:Pe.header,children:[k.jsxs("div",{className:Pe.left,children:[k.jsx("span",{className:Pe.icon,"aria-hidden":"true",children:r??k.jsx(vr,{})}),k.jsx("span",{className:Pe.title,children:e??o.sidebarTitle})]}),(t||i)&&k.jsxs("div",{className:Pe.actions,children:[i&&k.jsx("button",{className:Pe.resetBtn,onClick:i,title:o.resetConversation,"aria-label":o.resetConversation,children:"↺"}),t&&k.jsx("button",{className:Pe.resetBtn,onClick:t,title:n?o.expandSidebar:o.minimizeSidebar,"aria-label":n?o.expandSidebar:o.minimizeSidebar,children:n?k.jsx(Sl,{}):k.jsx(Cl,{})})]})]})}const eh="_sidebar_17ski_1",th="_minimized_17ski_20",yr={sidebar:eh,minimized:th};function nh({title:e,icon:t,actions:n,sendIcon:r,height:i="60vh",className:o,style:l,onReset:a}){const[s,u]=X.useState(!1),{messages:f,input:c,setInput:h,sendMessage:p,stop:g,isLoading:b,isConnecting:S,error:x,reset:I,confirmProposal:v,cancelProposal:j}=Sr(),M=a?()=>{I(),a()}:void 0;return k.jsxs("aside",{className:[yr.sidebar,s?yr.minimized:"",o].filter(Boolean).join(" "),style:{height:s?void 0:i,...l},children:[k.jsx(Zp,{title:e,icon:t,onMinimize:()=>u(w=>!w),isMinimized:s,onReset:M}),!s&&k.jsx(Wp,{messages:f,input:c,isLoading:b,isConnecting:S,error:x,onInputChange:h,onSend:p,onStop:g,onProposalConfirm:v,onProposalCancel:j,assistantIcon:t,actions:n,sendIcon:r})]})}exports.AiActivityPart=Di;exports.AiChatProvider=dl;exports.AiError=Oi;exports.AiInput=Ni;exports.AiMessageBubble=Mi;exports.AiMessageList=Ri;exports.AiMessagePartRenderer=ji;exports.AiProposalCard=Li;exports.AiSidebar=nh;exports.AiTablePart=zi;exports.AiTypingIndicator=Fi;exports.JuneauProvider=pl;exports.consumeStream=Vt;exports.createFetchStreamAdapter=ol;exports.createSseAdapter=rl;exports.delay=G;exports.getMessageText=Xi;exports.juneauCs=ml;exports.juneauEn=nn;exports.mockAdapter=Ji;exports.serializeMessages=xr;exports.useAiChat=br;exports.useAiChatContext=Sr;
|
|
51
|
+
`))}function s(p,g,b,S){const x=b.enter("tableCell"),I=b.enter("phrasing"),v=b.containerPhrasing(p,{...S,before:o,after:o});return I(),x(),v}function u(p,g){return Sc(p,{align:g,alignDelimiters:r,padding:n,stringLength:i})}function f(p,g,b){const S=p.children;let x=-1;const I=[],v=g.enter("table");for(;++x<S.length;)I[x]=c(S[x],g,b);return v(),I}function c(p,g,b){const S=p.children;let x=-1;const I=[],v=g.enter("tableRow");for(;++x<S.length;)I[x]=s(S[x],p,g,b);return v(),I}function h(p,g,b){let S=Ci.inlineCode(p,g,b);return b.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function ff(){return{exit:{taskListCheckValueChecked:mr,taskListCheckValueUnchecked:mr,paragraph:hf}}}function pf(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:df}}}function mr(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function hf(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,l;for(;++o<i.length;){const a=i[o];if(a.type==="paragraph"){l=a;break}}l===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function df(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",a=n.createTracker(r);o&&a.move(l);let s=Ci.listItem(e,t,n,{...r,...a.current()});return o&&(s=s.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),s;function u(f){return f+l}}function mf(){return[Wu(),hc(),yc(),rf(),ff()]}function gf(e){return{extensions:[Qu(),dc(e),xc(),cf(e),pf()]}}const yf={tokenize:Sf,partial:!0},Si={tokenize:vf,partial:!0},vi={tokenize:Af,partial:!0},Ai={tokenize:If,partial:!0},xf={tokenize:Ef,partial:!0},Ii={name:"wwwAutolink",tokenize:wf,previous:_i},Ei={name:"protocolAutolink",tokenize:Cf,previous:Ti},we={name:"emailAutolink",tokenize:bf,previous:Pi},me={};function kf(){return{text:me}}let _e=48;for(;_e<123;)me[_e]=we,_e++,_e===58?_e=65:_e===91&&(_e=97);me[43]=we;me[45]=we;me[46]=we;me[95]=we;me[72]=[we,Ei];me[104]=[we,Ei];me[87]=[we,Ii];me[119]=[we,Ii];function bf(e,t,n){const r=this;let i,o;return l;function l(c){return!tn(c)||!Pi.call(r,r.previous)||wn(r.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(c))}function a(c){return tn(c)?(e.consume(c),a):c===64?(e.consume(c),s):n(c)}function s(c){return c===46?e.check(xf,f,u)(c):c===45||c===95||ee(c)?(o=!0,e.consume(c),s):f(c)}function u(c){return e.consume(c),i=!0,s}function f(c){return o&&i&&ne(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(c)):n(c)}}function wf(e,t,n){const r=this;return i;function i(l){return l!==87&&l!==119||!_i.call(r,r.previous)||wn(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(yf,e.attempt(Si,e.attempt(vi,o),n),n)(l))}function o(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function Cf(e,t,n){const r=this;let i="",o=!1;return l;function l(c){return(c===72||c===104)&&Ti.call(r,r.previous)&&!wn(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(c),e.consume(c),a):n(c)}function a(c){if(ne(c)&&i.length<5)return i+=String.fromCodePoint(c),e.consume(c),a;if(c===58){const h=i.toLowerCase();if(h==="http"||h==="https")return e.consume(c),s}return n(c)}function s(c){return c===47?(e.consume(c),o?u:(o=!0,s)):n(c)}function u(c){return c===null||yt(c)||Y(c)||De(c)||wt(c)?n(c):e.attempt(Si,e.attempt(vi,f),n)(c)}function f(c){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(c)}}function Sf(e,t,n){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),o):n(l)}function o(l){return l===null?n(l):t(l)}}function vf(e,t,n){let r,i,o;return l;function l(u){return u===46||u===95?e.check(Ai,s,a)(u):u===null||Y(u)||De(u)||u!==45&&wt(u)?s(u):(o=!0,e.consume(u),l)}function a(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),l}function s(u){return i||r||!o?n(u):t(u)}}function Af(e,t){let n=0,r=0;return i;function i(l){return l===40?(n++,e.consume(l),i):l===41&&r<n?o(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(Ai,t,o)(l):l===null||Y(l)||De(l)?t(l):(e.consume(l),i)}function o(l){return l===41&&r++,e.consume(l),i}}function If(e,t,n){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),o):a===93?(e.consume(a),i):a===60||a===null||Y(a)||De(a)?t(a):n(a)}function i(a){return a===null||a===40||a===91||Y(a)||De(a)?t(a):r(a)}function o(a){return ne(a)?l(a):n(a)}function l(a){return a===59?(e.consume(a),r):ne(a)?(e.consume(a),l):n(a)}}function Ef(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return ee(o)?n(o):t(o)}}function _i(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Y(e)}function Ti(e){return!ne(e)}function Pi(e){return!(e===47||tn(e))}function tn(e){return e===43||e===45||e===46||e===95||ee(e)}function wn(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const _f={tokenize:Ff,partial:!0};function Tf(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Df,continuation:{tokenize:jf},exit:Mf}},text:{91:{name:"gfmFootnoteCall",tokenize:Lf},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Pf,resolveTo:zf}}}}function Pf(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;i--;){const s=r.events[i][1];if(s.type==="labelImage"){l=s;break}if(s.type==="gfmFootnoteCall"||s.type==="labelLink"||s.type==="label"||s.type==="image"||s.type==="link")break}return a;function a(s){if(!l||!l._balanced)return n(s);const u=he(r.sliceSerialize({start:l.end,end:r.now()}));return u.codePointAt(0)!==94||!o.includes(u.slice(1))?n(s):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),t(s))}}function zf(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},a=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",l,t],["exit",l,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...a),e}function Lf(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,l;return a;function a(c){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),s}function s(c){return c!==94?n(c):(e.enter("gfmFootnoteCallMarker"),e.consume(c),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(c){if(o>999||c===93&&!l||c===null||c===91||Y(c))return n(c);if(c===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return i.includes(he(r.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(c)}return Y(c)||(l=!0),o++,e.consume(c),c===92?f:u}function f(c){return c===91||c===92||c===93?(e.consume(c),o++,u):u(c)}}function Df(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,l=0,a;return s;function s(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(g)}function f(g){if(l>999||g===93&&!a||g===null||g===91||Y(g))return n(g);if(g===93){e.exit("chunkString");const b=e.exit("gfmFootnoteDefinitionLabelString");return o=he(r.sliceSerialize(b)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return Y(g)||(a=!0),l++,e.consume(g),g===92?c:f}function c(g){return g===91||g===92||g===93?(e.consume(g),l++,f):f(g)}function h(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),i.includes(o)||i.push(o),q(e,p,"gfmFootnoteDefinitionWhitespace")):n(g)}function p(g){return t(g)}}function jf(e,t,n){return e.check(ot,t,e.attempt(_f,t,n))}function Mf(e){e.exit("gfmFootnoteDefinition")}function Ff(e,t,n){const r=this;return q(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(o):n(o)}}function Rf(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(l,a){let s=-1;for(;++s<l.length;)if(l[s][0]==="enter"&&l[s][1].type==="strikethroughSequenceTemporary"&&l[s][1]._close){let u=s;for(;u--;)if(l[u][0]==="exit"&&l[u][1].type==="strikethroughSequenceTemporary"&&l[u][1]._open&&l[s][1].end.offset-l[s][1].start.offset===l[u][1].end.offset-l[u][1].start.offset){l[s][1].type="strikethroughSequence",l[u][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},l[u][1].start),end:Object.assign({},l[s][1].end)},c={type:"strikethroughText",start:Object.assign({},l[u][1].end),end:Object.assign({},l[s][1].start)},h=[["enter",f,a],["enter",l[u][1],a],["exit",l[u][1],a],["enter",c,a]],p=a.parser.constructs.insideSpan.null;p&&ae(h,h.length,0,Ct(p,l.slice(u+1,s),a)),ae(h,h.length,0,[["exit",c,a],["enter",l[s][1],a],["exit",l[s][1],a],["exit",f,a]]),ae(l,u-1,s-u+3,h),s=u+h.length-2;break}}for(s=-1;++s<l.length;)l[s][1].type==="strikethroughSequenceTemporary"&&(l[s][1].type="data");return l}function o(l,a,s){const u=this.previous,f=this.events;let c=0;return h;function h(g){return u===126&&f[f.length-1][1].type!=="characterEscape"?s(g):(l.enter("strikethroughSequenceTemporary"),p(g))}function p(g){const b=He(u);if(g===126)return c>1?s(g):(l.consume(g),c++,p);if(c<2&&!n)return s(g);const S=l.exit("strikethroughSequenceTemporary"),x=He(g);return S._open=!x||x===2&&!!b,S._close=!b||b===2&&!!x,a(g)}}}class Nf{constructor(){this.map=[]}add(t,n,r){Of(this,t,n,r)}consume(t){if(this.map.sort(function(o,l){return o[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const o of i)t.push(o);i=r.pop()}this.map.length=0}}function Of(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function Bf(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function Hf(){return{flow:{null:{name:"table",tokenize:$f,resolveAll:qf}}}}function $f(e,t,n){const r=this;let i=0,o=0,l;return a;function a(y){let _=r.events.length-1;for(;_>-1;){const z=r.events[_][1].type;if(z==="lineEnding"||z==="linePrefix")_--;else break}const P=_>-1?r.events[_][1].type:null,F=P==="tableHead"||P==="tableRow"?w:s;return F===w&&r.parser.lazy[r.now().line]?n(y):F(y)}function s(y){return e.enter("tableHead"),e.enter("tableRow"),u(y)}function u(y){return y===124||(l=!0,o+=1),f(y)}function f(y){return y===null?n(y):D(y)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):n(y):H(y)?q(e,f,"whitespace")(y):(o+=1,l&&(l=!1,i+=1),y===124?(e.enter("tableCellDivider"),e.consume(y),e.exit("tableCellDivider"),l=!0,f):(e.enter("data"),c(y)))}function c(y){return y===null||y===124||Y(y)?(e.exit("data"),f(y)):(e.consume(y),y===92?h:c)}function h(y){return y===92||y===124?(e.consume(y),c):c(y)}function p(y){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(y):(e.enter("tableDelimiterRow"),l=!1,H(y)?q(e,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(y):g(y))}function g(y){return y===45||y===58?S(y):y===124?(l=!0,e.enter("tableCellDivider"),e.consume(y),e.exit("tableCellDivider"),b):M(y)}function b(y){return H(y)?q(e,S,"whitespace")(y):S(y)}function S(y){return y===58?(o+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(y),e.exit("tableDelimiterMarker"),x):y===45?(o+=1,x(y)):y===null||D(y)?j(y):M(y)}function x(y){return y===45?(e.enter("tableDelimiterFiller"),I(y)):M(y)}function I(y){return y===45?(e.consume(y),I):y===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(y),e.exit("tableDelimiterMarker"),v):(e.exit("tableDelimiterFiller"),v(y))}function v(y){return H(y)?q(e,j,"whitespace")(y):j(y)}function j(y){return y===124?g(y):y===null||D(y)?!l||i!==o?M(y):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(y)):M(y)}function M(y){return n(y)}function w(y){return e.enter("tableRow"),O(y)}function O(y){return y===124?(e.enter("tableCellDivider"),e.consume(y),e.exit("tableCellDivider"),O):y===null||D(y)?(e.exit("tableRow"),t(y)):H(y)?q(e,O,"whitespace")(y):(e.enter("data"),V(y))}function V(y){return y===null||y===124||Y(y)?(e.exit("data"),O(y)):(e.consume(y),y===92?L:V)}function L(y){return y===92||y===124?(e.consume(y),V):V(y)}}function qf(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],l=[0,0,0,0],a=!1,s=0,u,f,c;const h=new Nf;for(;++n<e.length;){const p=e[n],g=p[1];p[0]==="enter"?g.type==="tableHead"?(a=!1,s!==0&&(gr(h,t,s,u,f),f=void 0,s=0),u={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},h.add(n,0,[["enter",u,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,c=void 0,o=[0,0,0,0],l=[0,n+1,0,0],a&&(a=!1,f={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},h.add(n,0,[["enter",f,t]])),i=g.type==="tableDelimiterRow"?2:f?3:1):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(o[1]!==0&&(l[0]=l[1],c=ht(h,t,o,i,void 0,c),o=[0,0,0,0]),l[2]=n)):g.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(l[0]=l[1],c=ht(h,t,o,i,void 0,c)),o=l,l=[o[1],n,0,0])):g.type==="tableHead"?(a=!0,s=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(s=n,o[1]!==0?(l[0]=l[1],c=ht(h,t,o,i,n,c)):l[1]!==0&&(c=ht(h,t,l,i,n,c)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(l[3]=n)}for(s!==0&&gr(h,t,s,u,f),h.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=Bf(t.events,n))}return e}function ht(e,t,n,r,i,o){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";n[0]!==0&&(o.end=Object.assign({},Be(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const s=Be(t.events,n[1]);if(o={type:l,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const u=Be(t.events,n[2]),f=Be(t.events,n[3]),c={type:a,start:Object.assign({},u),end:Object.assign({},f)};if(e.add(n[2],0,[["enter",c,t]]),r!==2){const h=t.events[n[2]],p=t.events[n[3]];if(h[1].end=Object.assign({},p[1].end),h[1].type="chunkText",h[1].contentType="text",n[3]>n[2]+1){const g=n[2]+1,b=n[3]-n[2]-1;e.add(g,b,[])}}e.add(n[3]+1,0,[["exit",c,t]])}return i!==void 0&&(o.end=Object.assign({},Be(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function gr(e,t,n,r,i){const o=[],l=Be(t.events,n);i&&(i.end=Object.assign({},l),o.push(["exit",i,t])),r.end=Object.assign({},l),o.push(["exit",r,t]),e.add(n+1,0,o)}function Be(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Vf={name:"tasklistCheck",tokenize:Wf};function Uf(){return{text:{91:Vf}}}function Wf(e,t,n){const r=this;return i;function i(s){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(s):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),o)}function o(s){return Y(s)?(e.enter("taskListCheckValueUnchecked"),e.consume(s),e.exit("taskListCheckValueUnchecked"),l):s===88||s===120?(e.enter("taskListCheckValueChecked"),e.consume(s),e.exit("taskListCheckValueChecked"),l):n(s)}function l(s){return s===93?(e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(s)}function a(s){return D(s)?t(s):H(s)?e.check({tokenize:Qf},t,n)(s):n(s)}}function Qf(e,t,n){return q(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function Yf(e){return Br([kf(),Tf(),Rf(e),Hf(),Uf()])}const Xf={};function Jf(e){const t=this,n=e||Xf,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Yf(n)),o.push(mf()),l.push(gf(n))}const Gf="_wrapper_izvjy_1",Kf="_table_izvjy_15",Zf="_th_izvjy_27",ep="_tr_izvjy_47",tp="_td_izvjy_63",Ge={wrapper:Gf,table:Kf,th:Zf,tr:ep,td:tp};function zi({part:e}){return k.jsx("div",{className:Ge.wrapper,children:k.jsxs("table",{className:Ge.table,children:[k.jsx("thead",{children:k.jsx("tr",{children:e.columns.map(t=>k.jsx("th",{className:Ge.th,children:t},t))})}),k.jsx("tbody",{children:e.rows.map((t,n)=>k.jsx("tr",{className:Ge.tr,children:e.columns.map(r=>k.jsx("td",{className:Ge.td,children:String(t[r]??"")},r))},n))})]})})}const np="_card_qrvry_1",rp="_header_qrvry_17",ip="_icon_qrvry_31",lp="_title_qrvry_45",op="_description_qrvry_57",ap="_actions_qrvry_71",sp="_confirm_qrvry_81",up="_cancel_qrvry_113",ve={card:np,header:rp,icon:ip,title:lp,description:op,actions:ap,confirm:sp,cancel:up};function Li({part:e,onConfirm:t,onCancel:n}){const r=je(),{proposal:i}=e;return k.jsxs("div",{className:ve.card,children:[k.jsxs("div",{className:ve.header,children:[k.jsx("svg",{className:ve.icon,viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:k.jsx("path",{d:"M10 1a.75.75 0 01.75.75v1.5a.75.75 0 01-1.5 0v-1.5A.75.75 0 0110 1zM5.05 3.05a.75.75 0 011.06 1.06l-1.06 1.06a.75.75 0 11-1.06-1.06l1.06-1.06zm9.9 0a.75.75 0 010 1.06l-1.06 1.06a.75.75 0 11-1.06-1.06l1.06-1.06a.75.75 0 011.06 0zM10 6a4 4 0 100 8 4 4 0 000-8zm-9 4a.75.75 0 01.75-.75h1.5a.75.75 0 010 1.5h-1.5A.75.75 0 011 10zm15.75-.75a.75.75 0 000 1.5h1.5a.75.75 0 000-1.5h-1.5zM4.11 14.89a.75.75 0 010 1.06l-1.06 1.06a.75.75 0 11-1.06-1.06l1.06-1.06a.75.75 0 011.06 0zm11.84 1.06a.75.75 0 10-1.06-1.06l-1.06 1.06a.75.75 0 101.06 1.06l1.06-1.06zM10 17.25a.75.75 0 01.75.75v1.5a.75.75 0 01-1.5 0v-1.5a.75.75 0 01.75-.75z"})}),k.jsx("span",{className:ve.title,children:i.title})]}),i.description&&k.jsx("p",{className:ve.description,children:i.description}),k.jsxs("div",{className:ve.actions,children:[k.jsx("button",{className:ve.confirm,onClick:()=>t(i.id,i.payload),children:i.confirmLabel??r.proposalConfirm}),k.jsx("button",{className:ve.cancel,onClick:()=>n(i.id),children:i.cancelLabel??r.proposalCancel})]})]})}const cp="_activity_1661l_1",fp="_indicator_1661l_25",pp="_content_1661l_71",hp="_title_1661l_79",dp="_description_1661l_89",Ke={activity:cp,indicator:fp,content:pp,title:hp,description:dp};function Di({part:e}){return k.jsxs("div",{className:Ke.activity,"data-status":e.status,children:[k.jsx("span",{className:Ke.indicator,"aria-hidden":"true"}),k.jsxs("div",{className:Ke.content,children:[k.jsx("div",{className:Ke.title,children:e.title}),e.description&&k.jsx("div",{className:Ke.description,children:e.description})]})]})}const mp="_markdown_97mdk_1",gp="_errorText_97mdk_165",yp="_errorIcon_97mdk_181",qt={markdown:mp,errorText:gp,errorIcon:yp};function ji({part:e,onProposalConfirm:t,onProposalCancel:n}){switch(e.type){case"text":return k.jsx("div",{className:qt.markdown,children:k.jsx(Fu,{remarkPlugins:[Jf],children:e.text})});case"table":return k.jsx(zi,{part:e});case"activity":return k.jsx(Di,{part:e});case"proposal":return k.jsx(Li,{part:e,onConfirm:t,onCancel:n});case"error":return k.jsxs("span",{className:qt.errorText,children:[k.jsx(vl,{className:qt.errorIcon}),e.message]})}}const xp="_wrapper_1jkxo_1",kp="_user_1jkxo_15",bp="_assistant_1jkxo_23",wp="_avatar_1jkxo_31",Cp="_bubble_1jkxo_77",Sp="_empty_1jkxo_121",Te={wrapper:xp,user:kp,assistant:bp,avatar:wp,bubble:Cp,empty:Sp};function Mi({message:e,onProposalConfirm:t,onProposalCancel:n,assistantIcon:r}){const i=je(),o=e.role==="user";return k.jsxs("div",{className:`${Te.wrapper} ${o?Te.user:Te.assistant}`,children:[!o&&k.jsx("div",{className:Te.avatar,"aria-hidden":"true",children:r??k.jsx(vr,{})}),k.jsxs("div",{className:Te.bubble,children:[e.parts.map((l,a)=>k.jsx(ji,{part:l,onProposalConfirm:t,onProposalCancel:n},a)),e.parts.length===0&&k.jsx("span",{className:Te.empty})]}),o&&k.jsx("div",{className:Te.avatar,children:i.userLabel})]})}const vp="_wrapper_1oco7_1",Ap="_dot_1oco7_15",Ip="_connectingLabel_1oco7_37",Ze={wrapper:vp,dot:Ap,connectingLabel:Ip};function Fi({connecting:e=!1}){const t=je();return k.jsxs("div",{className:Ze.wrapper,"aria-label":e?t.connectingMessage:t.typingMessage,children:[k.jsx("span",{className:Ze.dot}),k.jsx("span",{className:Ze.dot}),k.jsx("span",{className:Ze.dot}),e&&k.jsx("span",{className:Ze.connectingLabel,children:t.connectingMessage})]})}const Ep="_list_ixto8_1",_p="_empty_ixto8_21",Tp="_hint_ixto8_47",Pp="_typing_ixto8_61",dt={list:Ep,empty:_p,hint:Tp,typing:Pp};function Ri({messages:e,isLoading:t,isConnecting:n,onProposalConfirm:r,onProposalCancel:i,assistantIcon:o}){const l=je(),a=X.useRef(null);return X.useEffect(()=>{a.current?.scrollIntoView({behavior:"smooth"})},[e,t]),k.jsxs("div",{className:dt.list,children:[e.length===0&&k.jsxs("div",{className:dt.empty,children:[k.jsx("p",{children:l.emptyStateText}),k.jsx("p",{className:dt.hint,children:k.jsx("em",{children:l.emptyStateHint})})]}),e.map(s=>k.jsx(Mi,{message:s,onProposalConfirm:r,onProposalCancel:i,assistantIcon:o},s.id)),t&&k.jsx("div",{className:dt.typing,children:k.jsx(Fi,{connecting:n})}),k.jsx("div",{ref:a})]})}const zp="_wrapper_ehrkb_1",Lp="_textarea_ehrkb_21",Dp="_toolbar_ehrkb_69",jp="_actions_ehrkb_89",Mp="_actionBtn_ehrkb_103",Fp="_sendBtn_ehrkb_169",Rp="_spinnerIcon_ehrkb_231",Np="_stopBtn_ehrkb_251",Op="_stopIcon_ehrkb_297",be={wrapper:zp,textarea:Lp,toolbar:Dp,actions:jp,actionBtn:Mp,sendBtn:Fp,spinnerIcon:Rp,stopBtn:Np,stopIcon:Op};function Ni({value:e,onChange:t,onSend:n,onStop:r,isLoading:i,placeholder:o,actions:l,sendIcon:a}){const s=je(),u=[{icon:k.jsx(yl,{}),label:s.actionAddFile},{icon:k.jsx(xl,{}),label:s.actionQuickActions},{icon:k.jsx(kl,{}),label:s.actionNew},{icon:k.jsx(bl,{}),label:s.actionHistory},{icon:k.jsx(wl,{}),label:s.actionRules}],f=l??u,c=h=>{h.key==="Enter"&&!h.shiftKey&&(h.preventDefault(),n())};return k.jsxs("div",{className:be.wrapper,children:[k.jsx("textarea",{className:be.textarea,value:e,onChange:h=>t(h.target.value),onKeyDown:c,placeholder:o??s.inputPlaceholder,rows:3,disabled:i,"aria-label":s.sendMessage}),k.jsxs("div",{className:be.toolbar,children:[f.length>0&&k.jsx("div",{className:be.actions,children:f.map((h,p)=>k.jsxs("button",{className:be.actionBtn,type:"button",disabled:i,"aria-label":h.label,onClick:h.onClick,children:[h.icon,k.jsx("span",{children:h.label})]},p))}),i&&r?k.jsxs("button",{className:be.stopBtn,onClick:r,"aria-label":s.stopMessage,type:"button",children:[k.jsx("svg",{className:be.stopIcon,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:k.jsx("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"})}),k.jsx("span",{children:s.stopMessage})]}):k.jsxs("button",{className:be.sendBtn,onClick:n,disabled:i||!e.trim(),"aria-label":s.sendMessage,type:"button",children:[i?k.jsx("svg",{className:be.spinnerIcon,viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:k.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeDasharray:"32",strokeDashoffset:"12"})}):a??k.jsx(gl,{}),k.jsx("span",{children:s.sendMessage})]})]})]})}const Bp="_wrapper_1e3w5_1",Hp="_icon_1e3w5_27",$p="_message_1e3w5_39",qp="_dismiss_1e3w5_47",mt={wrapper:Bp,icon:Hp,message:$p,dismiss:qp};function Oi({message:e,onDismiss:t}){const n=je();return k.jsxs("div",{className:mt.wrapper,role:"alert",children:[k.jsx("svg",{className:mt.icon,viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:k.jsx("path",{fillRule:"evenodd",d:"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495zM10 5a.75.75 0 01.75.75v3.5a.75.75 0 01-1.5 0v-3.5A.75.75 0 0110 5zm0 9a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})}),k.jsx("span",{className:mt.message,children:e}),t&&k.jsx("button",{className:mt.dismiss,onClick:t,"aria-label":n.errorDismiss,children:k.jsx("svg",{viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:k.jsx("path",{d:"M3.72 3.72a.75.75 0 011.06 0L8 6.94l3.22-3.22a.75.75 0 111.06 1.06L9.06 8l3.22 3.22a.75.75 0 11-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 01-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 010-1.06z"})})})]})}const Vp="_chat_13051_1",Up={chat:Vp};function Wp({messages:e,input:t,isLoading:n,isConnecting:r,error:i,onInputChange:o,onSend:l,onStop:a,onProposalConfirm:s,onProposalCancel:u,placeholder:f,assistantIcon:c,actions:h,sendIcon:p,className:g,style:b}){return k.jsxs("div",{className:[Up.chat,g].filter(Boolean).join(" "),style:b,children:[k.jsx(Ri,{messages:e,isLoading:n,isConnecting:r,onProposalConfirm:s,onProposalCancel:u,assistantIcon:c}),i&&k.jsx(Oi,{message:i}),k.jsx(Ni,{value:t,onChange:o,onSend:l,onStop:a,isLoading:n,placeholder:f,actions:h,sendIcon:p})]})}const Qp="_header_1saak_1",Yp="_left_1saak_23",Xp="_icon_1saak_35",Jp="_title_1saak_45",Gp="_resetBtn_1saak_57",Kp="_actions_1saak_99",Pe={header:Qp,left:Yp,icon:Xp,title:Jp,resetBtn:Gp,actions:Kp};function Zp({title:e,onMinimize:t,isMinimized:n,icon:r,onReset:i}){const o=je();return k.jsxs("div",{className:Pe.header,children:[k.jsxs("div",{className:Pe.left,children:[k.jsx("span",{className:Pe.icon,"aria-hidden":"true",children:r??k.jsx(vr,{})}),k.jsx("span",{className:Pe.title,children:e??o.sidebarTitle})]}),(t||i)&&k.jsxs("div",{className:Pe.actions,children:[i&&k.jsx("button",{className:Pe.resetBtn,onClick:i,title:o.resetConversation,"aria-label":o.resetConversation,children:"↺"}),t&&k.jsx("button",{className:Pe.resetBtn,onClick:t,title:n?o.expandSidebar:o.minimizeSidebar,"aria-label":n?o.expandSidebar:o.minimizeSidebar,children:n?k.jsx(Sl,{}):k.jsx(Cl,{})})]})]})}const eh="_sidebar_u9ybt_1",th="_minimized_u9ybt_39",yr={sidebar:eh,minimized:th};function nh({title:e,icon:t,actions:n,sendIcon:r,height:i="60vh",className:o,style:l,onReset:a}){const[s,u]=X.useState(!1),{messages:f,input:c,setInput:h,sendMessage:p,stop:g,isLoading:b,isConnecting:S,error:x,reset:I,confirmProposal:v,cancelProposal:j}=Sr(),M=a?()=>{I(),a()}:void 0;return k.jsxs("aside",{className:[yr.sidebar,s?yr.minimized:"",o].filter(Boolean).join(" "),style:{height:s?void 0:i,...l},children:[k.jsx(Zp,{title:e,icon:t,onMinimize:()=>u(w=>!w),isMinimized:s,onReset:M}),!s&&k.jsx(Wp,{messages:f,input:c,isLoading:b,isConnecting:S,error:x,onInputChange:h,onSend:p,onStop:g,onProposalConfirm:v,onProposalCancel:j,assistantIcon:t,actions:n,sendIcon:r})]})}exports.AiActivityPart=Di;exports.AiChatProvider=dl;exports.AiError=Oi;exports.AiInput=Ni;exports.AiMessageBubble=Mi;exports.AiMessageList=Ri;exports.AiMessagePartRenderer=ji;exports.AiProposalCard=Li;exports.AiSidebar=nh;exports.AiTablePart=zi;exports.AiTypingIndicator=Fi;exports.JuneauProvider=pl;exports.consumeStream=Vt;exports.createFetchStreamAdapter=ol;exports.createSseAdapter=rl;exports.delay=G;exports.getMessageText=Xi;exports.juneauCs=ml;exports.juneauEn=nn;exports.mockAdapter=Ji;exports.serializeMessages=xr;exports.useAiChat=br;exports.useAiChatContext=Sr;
|
|
52
52
|
//# sourceMappingURL=index.cjs.map
|