@decocms/mesh 1.0.6 → 1.0.8

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.
Files changed (118) hide show
  1. package/dist/client/assets/{AlertCircle-BpngO4aw.js → AlertCircle-BOdIbqIs.js} +1 -1
  2. package/dist/client/assets/{ArrowLeft-DnNeLtGd.js → ArrowLeft--mrEcY9t.js} +1 -1
  3. package/dist/client/assets/{Calendar-D9128Zt6.js → Calendar-FEvoSB5L.js} +1 -1
  4. package/dist/client/assets/{CheckCircle-pvl06c1v.js → CheckCircle-DCY43SXR.js} +1 -1
  5. package/dist/client/assets/{ChevronDown-DDObtPy0.js → ChevronDown-BQbWxkfW.js} +1 -1
  6. package/dist/client/assets/{Clock-Bhch8Dmk.js → Clock-B2GhwaAI.js} +1 -1
  7. package/dist/client/assets/{Copy01-D0UvfCIS.js → Copy01-CNQxqLRw.js} +1 -1
  8. package/dist/client/assets/{CpuChip02-CHkUken-.js → CpuChip02-BiTasWbD.js} +1 -1
  9. package/dist/client/assets/{DotsVertical-Dx8byzRL.js → DotsVertical-D0xC4MY4.js} +1 -1
  10. package/dist/client/assets/{File06-BhKX70V2.js → File06-CginPRn9.js} +1 -1
  11. package/dist/client/assets/{GitBranch01-B4CzhWKg.js → GitBranch01-GzTSxN9T.js} +1 -1
  12. package/dist/client/assets/{Inbox01-C3XiWYYM.js → Inbox01-D9KmcOy8.js} +1 -1
  13. package/dist/client/assets/{InfoCircle-RxSckwOE.js → InfoCircle-D8mTtKdA.js} +1 -1
  14. package/dist/client/assets/{Key01-Df_FMcod.js → Key01-e6YzBDTD.js} +1 -1
  15. package/dist/client/assets/{LinkExternal01-BKGS1ajv.js → LinkExternal01-NfJeAPv5.js} +1 -1
  16. package/dist/client/assets/{Loading01-BKEuP0BH.js → Loading01-CCRghFAi.js} +1 -1
  17. package/dist/client/assets/{Plus-QVXsH8wr.js → Plus-Bu89Xdvq.js} +1 -1
  18. package/dist/client/assets/{SearchMd-C9aO1pvs.js → SearchMd-9OvHwtrD.js} +1 -1
  19. package/dist/client/assets/Terminal-CS-oYY6X.js +1 -0
  20. package/dist/client/assets/{Trash01-Dz5QBjzt.js → Trash01-D6Jd-C-A.js} +1 -1
  21. package/dist/client/assets/{Upload01-D2Q9ozBI.js → Upload01-p9mtwUJO.js} +1 -1
  22. package/dist/client/assets/{X-B6099MPR.js → X-CPWcGQX-.js} +1 -1
  23. package/dist/client/assets/{XClose-DSJxdHjH.js → XClose-Bg1dQbEQ.js} +1 -1
  24. package/dist/client/assets/{alert-dialog-Bsv_icPD.js → alert-dialog-C5WdCZb7.js} +2 -2
  25. package/dist/client/assets/auth-PBZStuMm.js +26 -0
  26. package/dist/client/assets/{auth-catchall-BBXFE5-p.js → auth-catchall-BXbesUXT.js} +1 -1
  27. package/dist/client/assets/{avatar-DBXvQJLu.js → avatar-_r3OideF.js} +1 -1
  28. package/dist/client/assets/{badge-EdnCME49.js → badge-C0Qf1_P5.js} +1 -1
  29. package/dist/client/assets/{button-BBbnP-v9.js → button-C6Q9i6bB.js} +1 -1
  30. package/dist/client/assets/{card-oQzKnd4e.js → card-CkqxLUmD.js} +1 -1
  31. package/dist/client/assets/{checkbox-AVyYmXWI.js → checkbox-BrNiXyG6.js} +1 -1
  32. package/dist/client/assets/{collection-detail-CnS3NqzF.js → collection-detail-D9-8PQpD.js} +2 -2
  33. package/dist/client/assets/{collection-display-button-DVo3HJTi.js → collection-display-button-CapIICNB.js} +1 -1
  34. package/dist/client/assets/{collection-header-BpXu8Vzd.js → collection-header-xspJxL_F.js} +1 -1
  35. package/dist/client/assets/{collection-page-BDOciB5D.js → collection-page-BcW_e2hi.js} +1 -1
  36. package/dist/client/assets/{collection-search-Clscyxb6.js → collection-search-BP4aaz_a.js} +1 -1
  37. package/dist/client/assets/{collection-table-wrapper-DrJQ8qIR.js → collection-table-wrapper-BqYO84av.js} +1 -1
  38. package/dist/client/assets/{connection-card-DNEpv4P8.js → connection-card-CVvPIgot.js} +1 -1
  39. package/dist/client/assets/connection-detail-JBGxZxkM.js +1 -0
  40. package/dist/client/assets/connections-B74A-ujA.js +1 -0
  41. package/dist/client/assets/{core-B2H4SHem.js → core-CrBooOPa.js} +1 -1
  42. package/dist/client/assets/{create-organization-dialog-BgaQBiov.js → create-organization-dialog-DKjCEIp0.js} +1 -1
  43. package/dist/client/assets/{dialog-zSQgybFt.js → dialog-wqLP6s8y.js} +1 -1
  44. package/dist/client/assets/{dropdown-menu-DjQlOq7B.js → dropdown-menu-Cf1-ucSW.js} +1 -1
  45. package/dist/client/assets/env-vars-editor-Clod5sfm.js +1 -0
  46. package/dist/client/assets/{error-boundary-DnOs9ptq.js → error-boundary-BvHIgIeG.js} +1 -1
  47. package/dist/client/assets/extract-connection-data-CbrawrDX.js +1 -0
  48. package/dist/client/assets/{form-DbXTocCZ.js → form-eTDr0W4q.js} +1 -1
  49. package/dist/client/assets/formatDistanceToNow-BxzU2by2.js +1 -0
  50. package/dist/client/assets/{gateway-detail-D_Eeu8GA.js → gateway-detail-DKkqklk0.js} +1 -1
  51. package/dist/client/assets/{gateways-CpOqHGPf.js → gateways-BhKn-EFm.js} +1 -1
  52. package/dist/client/assets/{home-DH79MOVs.js → home-DI8Z0JFU.js} +1 -1
  53. package/dist/client/assets/index-BWHtrgim.js +1 -0
  54. package/dist/client/assets/index-CZLUv0P3.js +25 -0
  55. package/dist/client/assets/{index-DmnZvHNs.js → index-CZhZ_SKX.js} +1 -1
  56. package/dist/client/assets/{index-DIMg3McT.js → index-Cvm_GyUI.js} +26 -26
  57. package/dist/client/assets/index-Dgn6D_6Q.css +1 -0
  58. package/dist/client/assets/{input-DuLixXzs.js → input-CRJkMCdz.js} +1 -1
  59. package/dist/client/assets/json-CcI2X6AJ.js +1 -0
  60. package/dist/client/assets/{json-syntax-highlighter-DzeQqB3N.js → json-syntax-highlighter-B03842aR.js} +2 -2
  61. package/dist/client/assets/{layout-BXMoCa5p.js → layout-6uTC86JS.js} +1 -1
  62. package/dist/client/assets/{lazy-highlighter-DlCJvY4E.js → lazy-highlighter-BSMDGfqn.js} +1 -1
  63. package/dist/client/assets/{localstorage-keys-DUsAqGtJ.js → localstorage-keys-CcQMsGvY.js} +1 -1
  64. package/dist/client/assets/{login-DzOOW3NK.js → login-DGpMcH9O.js} +1 -1
  65. package/dist/client/assets/mcp-oauth-DQCyGoJw.js +1 -0
  66. package/dist/client/assets/{members-BcgmC3Q2.js → members-F8i7vdZR.js} +1 -1
  67. package/dist/client/assets/{monitoring-Ci-6RfIl.js → monitoring-C2lb19h6.js} +1 -1
  68. package/dist/client/assets/{oauth-callback-D7HKnm8-.js → oauth-callback-DtKkmmTQ.js} +1 -1
  69. package/dist/client/assets/{page-D8EXKf1f.js → page-DIUi9KSN.js} +1 -1
  70. package/dist/client/assets/{popover-CSmu1XQf.js → popover-Un-VhPfR.js} +1 -1
  71. package/dist/client/assets/prism-light-DUBQ6Lm-.js +1 -0
  72. package/dist/client/assets/resizable-Dnzm7-QR.js +99 -0
  73. package/dist/client/assets/{resource-tabs-UHT4jRlB.js → resource-tabs-BYy3Anud.js} +1 -1
  74. package/dist/client/assets/{select-yhQhGgIP.js → select-7BtgByyw.js} +1 -1
  75. package/dist/client/assets/{settings-LFw_pLDl.js → settings-rADjIbaj.js} +1 -1
  76. package/dist/client/assets/{shell-layout-BcDSRee_.js → shell-layout-CvvtwN5U.js} +2 -2
  77. package/dist/client/assets/{spinner-BZx2tm9C.js → spinner-DveBEBL5.js} +1 -1
  78. package/dist/client/assets/{store-QDtOTGzB.js → store-BiC_Wlh-.js} +1 -1
  79. package/dist/client/assets/{store-app-detail-gbykHeE1.js → store-app-detail-D_pvzf3Y.js} +1 -1
  80. package/dist/client/assets/{switch-7ykyI8eT.js → switch-Bbk1L7Rg.js} +1 -1
  81. package/dist/client/assets/{tools-list-Cg7Vdfai.js → tools-list-CUD0lf51.js} +1 -1
  82. package/dist/client/assets/{tooltip-C8Lb1JlD.js → tooltip-CZ2WJBN2.js} +1 -1
  83. package/dist/client/assets/{types-mJaNg2R7.js → types-BqGYxJd7.js} +1 -1
  84. package/dist/client/assets/use-binding-B349nAGS.js +38 -0
  85. package/dist/client/assets/{use-connection-CdhlvEhz.js → use-connection-B9lcLaJ5.js} +1 -1
  86. package/dist/client/assets/{use-connection-resources-DLA7YNHa.js → use-connection-resources-DixC-5o3.js} +1 -1
  87. package/dist/client/assets/{use-gateway-DGSuI4Pr.js → use-gateway-t9P_FOn3.js} +1 -1
  88. package/dist/client/assets/{use-list-state-BCOB_OIi.js → use-list-state-BYLR5Bm8.js} +1 -1
  89. package/dist/client/assets/{use-mcp-i7kSvKqD.js → use-mcp-Bi_aHqdL.js} +1 -1
  90. package/dist/client/assets/{use-members-C4WkWKg7.js → use-members-DaneJZgJ.js} +1 -1
  91. package/dist/client/assets/{use-mobile-DJp6G0-T.js → use-mobile-_A8zw_eW.js} +1 -1
  92. package/dist/client/assets/{use-organization-settings-Dhw1as1Y.js → use-organization-settings-DsAkGjtI.js} +1 -1
  93. package/dist/client/assets/{use-tool-call-ZoYxiLnk.js → use-tool-call-DdkMQUZF.js} +1 -1
  94. package/dist/client/assets/useQuery-DhoA2M5z.js +1 -0
  95. package/dist/client/assets/utils-CYeWJWkG.js +1 -0
  96. package/dist/client/assets/{view-mode-toggle-CgM7sjNw.js → view-mode-toggle-DHnvkOqv.js} +1 -1
  97. package/dist/client/assets/{well-known-mcp-59JQWa69.js → well-known-mcp-C4yFJOry.js} +1 -1
  98. package/dist/client/index.html +2 -2
  99. package/dist/server/cli.js +315 -351
  100. package/dist/server/migrate.js +206 -215
  101. package/dist/server/server.js +329 -365
  102. package/package.json +2 -3
  103. package/dist/client/assets/auth-DRlnk2xb.js +0 -1
  104. package/dist/client/assets/connection-detail-DJQ5DpK4.js +0 -1
  105. package/dist/client/assets/connections-B8KLLrqT.js +0 -1
  106. package/dist/client/assets/extract-connection-data-C4TbfE2g.js +0 -5
  107. package/dist/client/assets/formatDistanceToNow-DXvTo8fz.js +0 -1
  108. package/dist/client/assets/index-Bw8uh6yx.css +0 -1
  109. package/dist/client/assets/index-CGQ5MQzC.js +0 -32
  110. package/dist/client/assets/index-CLqXtDUO.js +0 -1
  111. package/dist/client/assets/json-BR-1n4UW.js +0 -1
  112. package/dist/client/assets/mcp-oauth-u1f9o4pW.js +0 -1
  113. package/dist/client/assets/prism-light-DdlubWED.js +0 -1
  114. package/dist/client/assets/resizable-DaIbtpXr.js +0 -124
  115. package/dist/client/assets/schema-DLujv0-N.js +0 -1
  116. package/dist/client/assets/use-binding-DGE2EQtT.js +0 -27
  117. package/dist/client/assets/useQuery-CMnzSYEG.js +0 -1
  118. package/dist/client/assets/utils-B0Sj2akX.js +0 -1
@@ -1,124 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/lazy-highlighter-DlCJvY4E.js","assets/index-DIMg3McT.js","assets/index-Bw8uh6yx.css","assets/core-B2H4SHem.js","assets/json-BESjz4hO.js"])))=>i.map(i=>d[i]);
2
- import{aE as B,aF as nh,aG as ts,aH as ns,aI as Ir,aJ as rh,aK as _e,aL as ka,aM as tn,aN as ai,aO as si,aP as ih,aQ as ah,aR as il,aS as al,aT as Zn,aU as Aa,aV as sh,aW as uh,aX as sr,aY as br,aZ as oh,a_ as rs,a$ as sl,b0 as lh,b1 as ee,r as D,c as X,j as E,b2 as Ln,a2 as ul,ai as is,aw as ch,f as dh,t as Qr,Y as ol,K as it,p as as,b3 as fh,b4 as hh,b5 as ph,b6 as mh,b7 as gh,b8 as bh,b9 as Eh,ba as Th,bb as xh,bc as _h,bd as yh,be as kh,bf as Ah,bg as ll,bh as Ch,bi as ce,al as Sh}from"./index-DIMg3McT.js";import{c as ue}from"./utils-B0Sj2akX.js";import{B as Yt,u as nn}from"./button-BBbnP-v9.js";import{j as Ih,c as Nh}from"./dropdown-menu-DjQlOq7B.js";import{T as wh}from"./dialog-zSQgybFt.js";import{i as un,u as Dn,c as cl,b as dl,T as fl}from"./tooltip-C8Lb1JlD.js";import{i as ss}from"./CpuChip02-CHkUken-.js";import{i as hl}from"./SearchMd-C9aO1pvs.js";import{I as pl,b as vh,U as Rh,e as Oh,c as Lh,u as Dh}from"./use-connection-CdhlvEhz.js";import{b as Ph,a as Mh,c as Bh,S as Fh,n as zh}from"./select-yhQhGgIP.js";import{u as Uh}from"./use-mobile-DJp6G0-T.js";import{u as Hh}from"./use-gateway-DGSuI4Pr.js";import{t as ml}from"./ChevronDown-DDObtPy0.js";import{a as _i}from"./Copy01-D0UvfCIS.js";import{i as $h}from"./AlertCircle-BpngO4aw.js";import{C as jh}from"./connection-card-DNEpv4P8.js";import{n as Zh}from"./LinkExternal01-BKGS1ajv.js";import{S as Yh}from"./spinner-BZx2tm9C.js";import{i as qh}from"./File06-BhKX70V2.js";import{i as Vh}from"./InfoCircle-RxSckwOE.js";import{u as Wh,E as Gh}from"./use-binding-DGE2EQtT.js";const Qh=/^[cC][^\s-]{8,}$/,Kh=/^[0-9a-z]+$/,Xh=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Jh=/^[0-9a-vA-V]{20}$/,ep=/^[A-Za-z0-9]{27}$/,tp=/^[a-zA-Z0-9_-]{21}$/,np=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,rp=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Vs=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/,ip=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,ap="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function sp(){return new RegExp(ap,"u")}const up=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,op=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/,lp=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,cp=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,dp=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,gl=/^[A-Za-z0-9_-]*$/,fp=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,hp=/^\+(?:[0-9]){6,14}[0-9]$/,bl="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",pp=new RegExp(`^${bl}$`);function El(t){const e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${e}`:t.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${t.precision}}`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}function mp(t){return new RegExp(`^${El(t)}$`)}function gp(t){const e=El({precision:t.precision}),n=["Z"];t.local&&n.push(""),t.offset&&n.push("([+-]\\d{2}:\\d{2})");const r=`${e}(?:${n.join("|")})`;return new RegExp(`^${bl}T(?:${r})$`)}const bp=t=>{const e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},Ep=/^\d+$/,Tp=/^-?\d+(?:\.\d+)?/i,xp=/true|false/i,_p=/null/i,yp=/^[^A-Z]*$/,kp=/^[^a-z]*$/,at=B("$ZodCheck",(t,e)=>{var n;t._zod??(t._zod={}),t._zod.def=e,(n=t._zod).onattach??(n.onattach=[])}),Tl={number:"number",bigint:"bigint",object:"date"},xl=B("$ZodCheckLessThan",(t,e)=>{at.init(t,e);const n=Tl[typeof e.value];t._zod.onattach.push(r=>{const i=r._zod.bag,a=(e.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value<a&&(e.inclusive?i.maximum=e.value:i.exclusiveMaximum=e.value)}),t._zod.check=r=>{(e.inclusive?r.value<=e.value:r.value<e.value)||r.issues.push({origin:n,code:"too_big",maximum:e.value,input:r.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),_l=B("$ZodCheckGreaterThan",(t,e)=>{at.init(t,e);const n=Tl[typeof e.value];t._zod.onattach.push(r=>{const i=r._zod.bag,a=(e.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>a&&(e.inclusive?i.minimum=e.value:i.exclusiveMinimum=e.value)}),t._zod.check=r=>{(e.inclusive?r.value>=e.value:r.value>e.value)||r.issues.push({origin:n,code:"too_small",minimum:e.value,input:r.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),Ap=B("$ZodCheckMultipleOf",(t,e)=>{at.init(t,e),t._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=e.value)}),t._zod.check=n=>{if(typeof n.value!=typeof e.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%e.value===BigInt(0):nh(n.value,e.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:e.value,input:n.value,inst:t,continue:!e.abort})}}),Cp=B("$ZodCheckNumberFormat",(t,e)=>{at.init(t,e),e.format=e.format||"float64";const n=e.format?.includes("int"),r=n?"int":"number",[i,a]=rh[e.format];t._zod.onattach.push(s=>{const u=s._zod.bag;u.format=e.format,u.minimum=i,u.maximum=a,n&&(u.pattern=Ep)}),t._zod.check=s=>{const u=s.value;if(n){if(!Number.isInteger(u)){s.issues.push({expected:r,format:e.format,code:"invalid_type",input:u,inst:t});return}if(!Number.isSafeInteger(u)){u>0?s.issues.push({input:u,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:r,continue:!e.abort}):s.issues.push({input:u,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:r,continue:!e.abort});return}}u<i&&s.issues.push({origin:"number",input:u,code:"too_small",minimum:i,inclusive:!0,inst:t,continue:!e.abort}),u>a&&s.issues.push({origin:"number",input:u,code:"too_big",maximum:a,inst:t})}}),Sp=B("$ZodCheckMaxLength",(t,e)=>{var n;at.init(t,e),(n=t._zod.def).when??(n.when=r=>{const i=r.value;return!ts(i)&&i.length!==void 0}),t._zod.onattach.push(r=>{const i=r._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<i&&(r._zod.bag.maximum=e.maximum)}),t._zod.check=r=>{const i=r.value;if(i.length<=e.maximum)return;const s=ns(i);r.issues.push({origin:s,code:"too_big",maximum:e.maximum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),Ip=B("$ZodCheckMinLength",(t,e)=>{var n;at.init(t,e),(n=t._zod.def).when??(n.when=r=>{const i=r.value;return!ts(i)&&i.length!==void 0}),t._zod.onattach.push(r=>{const i=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>i&&(r._zod.bag.minimum=e.minimum)}),t._zod.check=r=>{const i=r.value;if(i.length>=e.minimum)return;const s=ns(i);r.issues.push({origin:s,code:"too_small",minimum:e.minimum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),Np=B("$ZodCheckLengthEquals",(t,e)=>{var n;at.init(t,e),(n=t._zod.def).when??(n.when=r=>{const i=r.value;return!ts(i)&&i.length!==void 0}),t._zod.onattach.push(r=>{const i=r._zod.bag;i.minimum=e.length,i.maximum=e.length,i.length=e.length}),t._zod.check=r=>{const i=r.value,a=i.length;if(a===e.length)return;const s=ns(i),u=a>e.length;r.issues.push({origin:s,...u?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:r.value,inst:t,continue:!e.abort})}}),yi=B("$ZodCheckStringFormat",(t,e)=>{var n,r;at.init(t,e),t._zod.onattach.push(i=>{const a=i._zod.bag;a.format=e.format,e.pattern&&(a.patterns??(a.patterns=new Set),a.patterns.add(e.pattern))}),e.pattern?(n=t._zod).check??(n.check=i=>{e.pattern.lastIndex=0,!e.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:e.format,input:i.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(r=t._zod).check??(r.check=()=>{})}),wp=B("$ZodCheckRegex",(t,e)=>{yi.init(t,e),t._zod.check=n=>{e.pattern.lastIndex=0,!e.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),vp=B("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=yp),yi.init(t,e)}),Rp=B("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=kp),yi.init(t,e)}),Op=B("$ZodCheckIncludes",(t,e)=>{at.init(t,e);const n=Ir(e.includes),r=new RegExp(typeof e.position=="number"?`^.{${e.position}}${n}`:n);e.pattern=r,t._zod.onattach.push(i=>{const a=i._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(r)}),t._zod.check=i=>{i.value.includes(e.includes,e.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:i.value,inst:t,continue:!e.abort})}}),Lp=B("$ZodCheckStartsWith",(t,e)=>{at.init(t,e);const n=new RegExp(`^${Ir(e.prefix)}.*`);e.pattern??(e.pattern=n),t._zod.onattach.push(r=>{const i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),t._zod.check=r=>{r.value.startsWith(e.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:r.value,inst:t,continue:!e.abort})}}),Dp=B("$ZodCheckEndsWith",(t,e)=>{at.init(t,e);const n=new RegExp(`.*${Ir(e.suffix)}$`);e.pattern??(e.pattern=n),t._zod.onattach.push(r=>{const i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),t._zod.check=r=>{r.value.endsWith(e.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:r.value,inst:t,continue:!e.abort})}}),Pp=B("$ZodCheckOverwrite",(t,e)=>{at.init(t,e),t._zod.check=n=>{n.value=e.tx(n.value)}});class Mp{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}const r=e.split(`
3
- `).filter(s=>s),i=Math.min(...r.map(s=>s.length-s.trimStart().length)),a=r.map(s=>s.slice(i)).map(s=>" ".repeat(this.indent*2)+s);for(const s of a)this.content.push(s)}compile(){const e=Function,n=this?.args,i=[...(this?.content??[""]).map(a=>` ${a}`)];return new e(...n,i.join(`
4
- `))}}const Bp={major:4,minor:0,patch:0},Re=B("$ZodType",(t,e)=>{var n;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=Bp;const r=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&r.unshift(t);for(const i of r)for(const a of i._zod.onattach)a(t);if(r.length===0)(n=t._zod).deferred??(n.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{const i=(a,s,u)=>{let o=sr(a),l;for(const f of s){if(f._zod.def.when){if(!f._zod.def.when(a))continue}else if(o)continue;const c=a.issues.length,p=f._zod.check(a);if(p instanceof Promise&&u?.async===!1)throw new Aa;if(l||p instanceof Promise)l=(l??Promise.resolve()).then(async()=>{await p,a.issues.length!==c&&(o||(o=sr(a,c)))});else{if(a.issues.length===c)continue;o||(o=sr(a,c))}}return l?l.then(()=>a):a};t._zod.run=(a,s)=>{const u=t._zod.parse(a,s);if(u instanceof Promise){if(s.async===!1)throw new Aa;return u.then(o=>i(o,r,s))}return i(u,r,s)}}t["~standard"]={validate:i=>{try{const a=sh(t,i);return a.success?{value:a.data}:{issues:a.error?.issues}}catch{return uh(t,i).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}}),us=B("$ZodString",(t,e)=>{Re.init(t,e),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??bp(t._zod.bag),t._zod.parse=(n,r)=>{if(e.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:t}),n}}),Me=B("$ZodStringFormat",(t,e)=>{yi.init(t,e),us.init(t,e)}),Fp=B("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=rp),Me.init(t,e)}),zp=B("$ZodUUID",(t,e)=>{if(e.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(r===void 0)throw new Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=Vs(r))}else e.pattern??(e.pattern=Vs());Me.init(t,e)}),Up=B("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=ip),Me.init(t,e)}),Hp=B("$ZodURL",(t,e)=>{Me.init(t,e),t._zod.check=n=>{try{const r=n.value,i=new URL(r),a=i.href;e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(i.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:fp.source,input:n.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:n.value,inst:t,continue:!e.abort})),!r.endsWith("/")&&a.endsWith("/")?n.value=a.slice(0,-1):n.value=a;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:t,continue:!e.abort})}}}),$p=B("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=sp()),Me.init(t,e)}),jp=B("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=tp),Me.init(t,e)}),Zp=B("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=Qh),Me.init(t,e)}),Yp=B("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=Kh),Me.init(t,e)}),qp=B("$ZodULID",(t,e)=>{e.pattern??(e.pattern=Xh),Me.init(t,e)}),Vp=B("$ZodXID",(t,e)=>{e.pattern??(e.pattern=Jh),Me.init(t,e)}),Wp=B("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=ep),Me.init(t,e)}),Gp=B("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=gp(e)),Me.init(t,e)}),Qp=B("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=pp),Me.init(t,e)}),Kp=B("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=mp(e)),Me.init(t,e)}),Xp=B("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=np),Me.init(t,e)}),Jp=B("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=up),Me.init(t,e),t._zod.onattach.push(n=>{const r=n._zod.bag;r.format="ipv4"})}),e0=B("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=op),Me.init(t,e),t._zod.onattach.push(n=>{const r=n._zod.bag;r.format="ipv6"}),t._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:t,continue:!e.abort})}}}),t0=B("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=lp),Me.init(t,e)}),n0=B("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=cp),Me.init(t,e),t._zod.check=n=>{const[r,i]=n.value.split("/");try{if(!i)throw new Error;const a=Number(i);if(`${a}`!==i)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${r}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:t,continue:!e.abort})}}});function yl(t){if(t==="")return!0;if(t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}const r0=B("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=dp),Me.init(t,e),t._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64"}),t._zod.check=n=>{yl(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:t,continue:!e.abort})}});function i0(t){if(!gl.test(t))return!1;const e=t.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=e.padEnd(Math.ceil(e.length/4)*4,"=");return yl(n)}const a0=B("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=gl),Me.init(t,e),t._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64url"}),t._zod.check=n=>{i0(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:t,continue:!e.abort})}}),s0=B("$ZodE164",(t,e)=>{e.pattern??(e.pattern=hp),Me.init(t,e)});function u0(t,e=null){try{const n=t.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const i=JSON.parse(atob(r));return!("typ"in i&&i?.typ!=="JWT"||!i.alg||e&&(!("alg"in i)||i.alg!==e))}catch{return!1}}const o0=B("$ZodJWT",(t,e)=>{Me.init(t,e),t._zod.check=n=>{u0(n.value,e.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:t,continue:!e.abort})}}),kl=B("$ZodNumber",(t,e)=>{Re.init(t,e),t._zod.pattern=t._zod.bag.pattern??Tp,t._zod.parse=(n,r)=>{if(e.coerce)try{n.value=Number(n.value)}catch{}const i=n.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return n;const a=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:i,inst:t,...a?{received:a}:{}}),n}}),l0=B("$ZodNumber",(t,e)=>{Cp.init(t,e),kl.init(t,e)}),c0=B("$ZodBoolean",(t,e)=>{Re.init(t,e),t._zod.pattern=xp,t._zod.parse=(n,r)=>{if(e.coerce)try{n.value=!!n.value}catch{}const i=n.value;return typeof i=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:t}),n}}),d0=B("$ZodNull",(t,e)=>{Re.init(t,e),t._zod.pattern=_p,t._zod.values=new Set([null]),t._zod.parse=(n,r)=>{const i=n.value;return i===null||n.issues.push({expected:"null",code:"invalid_type",input:i,inst:t}),n}}),f0=B("$ZodUnknown",(t,e)=>{Re.init(t,e),t._zod.parse=n=>n}),h0=B("$ZodNever",(t,e)=>{Re.init(t,e),t._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:t}),n)});function Ws(t,e,n){t.issues.length&&e.issues.push(...tn(n,t.issues)),e.value[n]=t.value}const p0=B("$ZodArray",(t,e)=>{Re.init(t,e),t._zod.parse=(n,r)=>{const i=n.value;if(!Array.isArray(i))return n.issues.push({expected:"array",code:"invalid_type",input:i,inst:t}),n;n.value=Array(i.length);const a=[];for(let s=0;s<i.length;s++){const u=i[s],o=e.element._zod.run({value:u,issues:[]},r);o instanceof Promise?a.push(o.then(l=>Ws(l,n,s))):Ws(o,n,s)}return a.length?Promise.all(a).then(()=>n):n}});function Ur(t,e,n){t.issues.length&&e.issues.push(...tn(n,t.issues)),e.value[n]=t.value}function Gs(t,e,n,r){t.issues.length?r[n]===void 0?n in r?e.value[n]=void 0:e.value[n]=t.value:e.issues.push(...tn(n,t.issues)):t.value===void 0?n in r&&(e.value[n]=void 0):e.value[n]=t.value}const m0=B("$ZodObject",(t,e)=>{Re.init(t,e);const n=il(()=>{const c=Object.keys(e.shape);for(const h of c)if(!(e.shape[h]instanceof Re))throw new Error(`Invalid element at key "${h}": expected a Zod schema`);const p=oh(e.shape);return{shape:e.shape,keys:c,keySet:new Set(c),numKeys:c.length,optionalKeys:new Set(p)}});_e(t._zod,"propValues",()=>{const c=e.shape,p={};for(const h in c){const m=c[h]._zod;if(m.values){p[h]??(p[h]=new Set);for(const b of m.values)p[h].add(b)}}return p});const r=c=>{const p=new Mp(["shape","payload","ctx"]),h=n.value,m=k=>{const g=Zn(k);return`shape[${g}]._zod.run({ value: input[${g}], issues: [] }, ctx)`};p.write("const input = payload.value;");const b=Object.create(null);let x=0;for(const k of h.keys)b[k]=`key_${x++}`;p.write("const newResult = {}");for(const k of h.keys)if(h.optionalKeys.has(k)){const g=b[k];p.write(`const ${g} = ${m(k)};`);const N=Zn(k);p.write(`
5
- if (${g}.issues.length) {
6
- if (input[${N}] === undefined) {
7
- if (${N} in input) {
8
- newResult[${N}] = undefined;
9
- }
10
- } else {
11
- payload.issues = payload.issues.concat(
12
- ${g}.issues.map((iss) => ({
13
- ...iss,
14
- path: iss.path ? [${N}, ...iss.path] : [${N}],
15
- }))
16
- );
17
- }
18
- } else if (${g}.value === undefined) {
19
- if (${N} in input) newResult[${N}] = undefined;
20
- } else {
21
- newResult[${N}] = ${g}.value;
22
- }
23
- `)}else{const g=b[k];p.write(`const ${g} = ${m(k)};`),p.write(`
24
- if (${g}.issues.length) payload.issues = payload.issues.concat(${g}.issues.map(iss => ({
25
- ...iss,
26
- path: iss.path ? [${Zn(k)}, ...iss.path] : [${Zn(k)}]
27
- })));`),p.write(`newResult[${Zn(k)}] = ${g}.value`)}p.write("payload.value = newResult;"),p.write("return payload;");const T=p.compile();return(k,g)=>T(c,k,g)};let i;const a=al,s=!ih.jitless,o=s&&ah.value,l=e.catchall;let f;t._zod.parse=(c,p)=>{f??(f=n.value);const h=c.value;if(!a(h))return c.issues.push({expected:"object",code:"invalid_type",input:h,inst:t}),c;const m=[];if(s&&o&&p?.async===!1&&p.jitless!==!0)i||(i=r(e.shape)),c=i(c,p);else{c.value={};const g=f.shape;for(const N of f.keys){const v=g[N],C=v._zod.run({value:h[N],issues:[]},p),R=v._zod.optin==="optional"&&v._zod.optout==="optional";C instanceof Promise?m.push(C.then(M=>R?Gs(M,c,N,h):Ur(M,c,N))):R?Gs(C,c,N,h):Ur(C,c,N)}}if(!l)return m.length?Promise.all(m).then(()=>c):c;const b=[],x=f.keySet,T=l._zod,k=T.def.type;for(const g of Object.keys(h)){if(x.has(g))continue;if(k==="never"){b.push(g);continue}const N=T.run({value:h[g],issues:[]},p);N instanceof Promise?m.push(N.then(v=>Ur(v,c,g))):Ur(N,c,g)}return b.length&&c.issues.push({code:"unrecognized_keys",keys:b,input:h,inst:t}),m.length?Promise.all(m).then(()=>c):c}});function Qs(t,e,n,r){for(const i of t)if(i.issues.length===0)return e.value=i.value,e;return e.issues.push({code:"invalid_union",input:e.value,inst:n,errors:t.map(i=>i.issues.map(a=>ai(a,r,si())))}),e}const Al=B("$ZodUnion",(t,e)=>{Re.init(t,e),_e(t._zod,"optin",()=>e.options.some(n=>n._zod.optin==="optional")?"optional":void 0),_e(t._zod,"optout",()=>e.options.some(n=>n._zod.optout==="optional")?"optional":void 0),_e(t._zod,"values",()=>{if(e.options.every(n=>n._zod.values))return new Set(e.options.flatMap(n=>Array.from(n._zod.values)))}),_e(t._zod,"pattern",()=>{if(e.options.every(n=>n._zod.pattern)){const n=e.options.map(r=>r._zod.pattern);return new RegExp(`^(${n.map(r=>rs(r.source)).join("|")})$`)}}),t._zod.parse=(n,r)=>{let i=!1;const a=[];for(const s of e.options){const u=s._zod.run({value:n.value,issues:[]},r);if(u instanceof Promise)a.push(u),i=!0;else{if(u.issues.length===0)return u;a.push(u)}}return i?Promise.all(a).then(s=>Qs(s,n,t,r)):Qs(a,n,t,r)}}),g0=B("$ZodDiscriminatedUnion",(t,e)=>{Al.init(t,e);const n=t._zod.parse;_e(t._zod,"propValues",()=>{const i={};for(const a of e.options){const s=a._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(a)}"`);for(const[u,o]of Object.entries(s)){i[u]||(i[u]=new Set);for(const l of o)i[u].add(l)}}return i});const r=il(()=>{const i=e.options,a=new Map;for(const s of i){const u=s._zod.propValues[e.discriminator];if(!u||u.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(s)}"`);for(const o of u){if(a.has(o))throw new Error(`Duplicate discriminator value "${String(o)}"`);a.set(o,s)}}return a});t._zod.parse=(i,a)=>{const s=i.value;if(!al(s))return i.issues.push({code:"invalid_type",expected:"object",input:s,inst:t}),i;const u=r.value.get(s?.[e.discriminator]);return u?u._zod.run(i,a):e.unionFallback?n(i,a):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",input:s,path:[e.discriminator],inst:t}),i)}}),b0=B("$ZodIntersection",(t,e)=>{Re.init(t,e),t._zod.parse=(n,r)=>{const i=n.value,a=e.left._zod.run({value:i,issues:[]},r),s=e.right._zod.run({value:i,issues:[]},r);return a instanceof Promise||s instanceof Promise?Promise.all([a,s]).then(([o,l])=>Ks(n,o,l)):Ks(n,a,s)}});function Ca(t,e){if(t===e)return{valid:!0,data:t};if(t instanceof Date&&e instanceof Date&&+t==+e)return{valid:!0,data:t};if(ka(t)&&ka(e)){const n=Object.keys(e),r=Object.keys(t).filter(a=>n.indexOf(a)!==-1),i={...t,...e};for(const a of r){const s=Ca(t[a],e[a]);if(!s.valid)return{valid:!1,mergeErrorPath:[a,...s.mergeErrorPath]};i[a]=s.data}return{valid:!0,data:i}}if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<t.length;r++){const i=t[r],a=e[r],s=Ca(i,a);if(!s.valid)return{valid:!1,mergeErrorPath:[r,...s.mergeErrorPath]};n.push(s.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Ks(t,e,n){if(e.issues.length&&t.issues.push(...e.issues),n.issues.length&&t.issues.push(...n.issues),sr(t))return t;const r=Ca(e.value,n.value);if(!r.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return t.value=r.data,t}const E0=B("$ZodRecord",(t,e)=>{Re.init(t,e),t._zod.parse=(n,r)=>{const i=n.value;if(!ka(i))return n.issues.push({expected:"record",code:"invalid_type",input:i,inst:t}),n;const a=[];if(e.keyType._zod.values){const s=e.keyType._zod.values;n.value={};for(const o of s)if(typeof o=="string"||typeof o=="number"||typeof o=="symbol"){const l=e.valueType._zod.run({value:i[o],issues:[]},r);l instanceof Promise?a.push(l.then(f=>{f.issues.length&&n.issues.push(...tn(o,f.issues)),n.value[o]=f.value})):(l.issues.length&&n.issues.push(...tn(o,l.issues)),n.value[o]=l.value)}let u;for(const o in i)s.has(o)||(u=u??[],u.push(o));u&&u.length>0&&n.issues.push({code:"unrecognized_keys",input:i,inst:t,keys:u})}else{n.value={};for(const s of Reflect.ownKeys(i)){if(s==="__proto__")continue;const u=e.keyType._zod.run({value:s,issues:[]},r);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(u.issues.length){n.issues.push({origin:"record",code:"invalid_key",issues:u.issues.map(l=>ai(l,r,si())),input:s,path:[s],inst:t}),n.value[u.value]=u.value;continue}const o=e.valueType._zod.run({value:i[s],issues:[]},r);o instanceof Promise?a.push(o.then(l=>{l.issues.length&&n.issues.push(...tn(s,l.issues)),n.value[u.value]=l.value})):(o.issues.length&&n.issues.push(...tn(s,o.issues)),n.value[u.value]=o.value)}}return a.length?Promise.all(a).then(()=>n):n}}),T0=B("$ZodEnum",(t,e)=>{Re.init(t,e);const n=sl(e.entries);t._zod.values=new Set(n),t._zod.pattern=new RegExp(`^(${n.filter(r=>lh.has(typeof r)).map(r=>typeof r=="string"?Ir(r):r.toString()).join("|")})$`),t._zod.parse=(r,i)=>{const a=r.value;return t._zod.values.has(a)||r.issues.push({code:"invalid_value",values:n,input:a,inst:t}),r}}),x0=B("$ZodLiteral",(t,e)=>{Re.init(t,e),t._zod.values=new Set(e.values),t._zod.pattern=new RegExp(`^(${e.values.map(n=>typeof n=="string"?Ir(n):n?n.toString():String(n)).join("|")})$`),t._zod.parse=(n,r)=>{const i=n.value;return t._zod.values.has(i)||n.issues.push({code:"invalid_value",values:e.values,input:i,inst:t}),n}}),_0=B("$ZodTransform",(t,e)=>{Re.init(t,e),t._zod.parse=(n,r)=>{const i=e.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(s=>(n.value=s,n));if(i instanceof Promise)throw new Aa;return n.value=i,n}}),y0=B("$ZodOptional",(t,e)=>{Re.init(t,e),t._zod.optin="optional",t._zod.optout="optional",_e(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),_e(t._zod,"pattern",()=>{const n=e.innerType._zod.pattern;return n?new RegExp(`^(${rs(n.source)})?$`):void 0}),t._zod.parse=(n,r)=>e.innerType._zod.optin==="optional"?e.innerType._zod.run(n,r):n.value===void 0?n:e.innerType._zod.run(n,r)}),k0=B("$ZodNullable",(t,e)=>{Re.init(t,e),_e(t._zod,"optin",()=>e.innerType._zod.optin),_e(t._zod,"optout",()=>e.innerType._zod.optout),_e(t._zod,"pattern",()=>{const n=e.innerType._zod.pattern;return n?new RegExp(`^(${rs(n.source)}|null)$`):void 0}),_e(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),t._zod.parse=(n,r)=>n.value===null?n:e.innerType._zod.run(n,r)}),A0=B("$ZodDefault",(t,e)=>{Re.init(t,e),t._zod.optin="optional",_e(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(n,r)=>{if(n.value===void 0)return n.value=e.defaultValue,n;const i=e.innerType._zod.run(n,r);return i instanceof Promise?i.then(a=>Xs(a,e)):Xs(i,e)}});function Xs(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}const C0=B("$ZodPrefault",(t,e)=>{Re.init(t,e),t._zod.optin="optional",_e(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(n,r)=>(n.value===void 0&&(n.value=e.defaultValue),e.innerType._zod.run(n,r))}),S0=B("$ZodNonOptional",(t,e)=>{Re.init(t,e),_e(t._zod,"values",()=>{const n=e.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),t._zod.parse=(n,r)=>{const i=e.innerType._zod.run(n,r);return i instanceof Promise?i.then(a=>Js(a,t)):Js(i,t)}});function Js(t,e){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:e}),t}const I0=B("$ZodCatch",(t,e)=>{Re.init(t,e),t._zod.optin="optional",_e(t._zod,"optout",()=>e.innerType._zod.optout),_e(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(n,r)=>{const i=e.innerType._zod.run(n,r);return i instanceof Promise?i.then(a=>(n.value=a.value,a.issues.length&&(n.value=e.catchValue({...n,error:{issues:a.issues.map(s=>ai(s,r,si()))},input:n.value}),n.issues=[]),n)):(n.value=i.value,i.issues.length&&(n.value=e.catchValue({...n,error:{issues:i.issues.map(a=>ai(a,r,si()))},input:n.value}),n.issues=[]),n)}}),N0=B("$ZodPipe",(t,e)=>{Re.init(t,e),_e(t._zod,"values",()=>e.in._zod.values),_e(t._zod,"optin",()=>e.in._zod.optin),_e(t._zod,"optout",()=>e.out._zod.optout),t._zod.parse=(n,r)=>{const i=e.in._zod.run(n,r);return i instanceof Promise?i.then(a=>eu(a,e,r)):eu(i,e,r)}});function eu(t,e,n){return sr(t)?t:e.out._zod.run({value:t.value,issues:t.issues},n)}const w0=B("$ZodReadonly",(t,e)=>{Re.init(t,e),_e(t._zod,"propValues",()=>e.innerType._zod.propValues),_e(t._zod,"values",()=>e.innerType._zod.values),_e(t._zod,"optin",()=>e.innerType._zod.optin),_e(t._zod,"optout",()=>e.innerType._zod.optout),t._zod.parse=(n,r)=>{const i=e.innerType._zod.run(n,r);return i instanceof Promise?i.then(tu):tu(i)}});function tu(t){return t.value=Object.freeze(t.value),t}const v0=B("$ZodLazy",(t,e)=>{Re.init(t,e),_e(t._zod,"innerType",()=>e.getter()),_e(t._zod,"pattern",()=>t._zod.innerType._zod.pattern),_e(t._zod,"propValues",()=>t._zod.innerType._zod.propValues),_e(t._zod,"optin",()=>t._zod.innerType._zod.optin),_e(t._zod,"optout",()=>t._zod.innerType._zod.optout),t._zod.parse=(n,r)=>t._zod.innerType._zod.run(n,r)}),R0=B("$ZodCustom",(t,e)=>{at.init(t,e),Re.init(t,e),t._zod.parse=(n,r)=>n,t._zod.check=n=>{const r=n.value,i=e.fn(r);if(i instanceof Promise)return i.then(a=>nu(a,n,r,t));nu(i,n,r,t)}});function nu(t,e,n,r){if(!t){const i={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(i.params=r._zod.def.params),e.issues.push(br(i))}}class Cl{constructor(){this._map=new Map,this._idmap=new Map}add(e,...n){const r=n[0];if(this._map.set(e,r),r&&typeof r=="object"&&"id"in r){if(this._idmap.has(r.id))throw new Error(`ID ${r.id} already exists in the registry`);this._idmap.set(r.id,e)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(e){const n=this._map.get(e);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(e),this}get(e){const n=e._zod.parent;if(n){const r={...this.get(n)??{}};return delete r.id,{...r,...this._map.get(e)}}return this._map.get(e)}has(e){return this._map.has(e)}}function O0(){return new Cl}const Jn=O0();function L0(t,e){return new t({type:"string",...ee(e)})}function D0(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...ee(e)})}function ru(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...ee(e)})}function P0(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...ee(e)})}function M0(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ee(e)})}function B0(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ee(e)})}function F0(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ee(e)})}function z0(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...ee(e)})}function U0(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...ee(e)})}function H0(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...ee(e)})}function $0(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...ee(e)})}function j0(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...ee(e)})}function Z0(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...ee(e)})}function Y0(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...ee(e)})}function q0(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...ee(e)})}function V0(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...ee(e)})}function W0(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...ee(e)})}function G0(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ee(e)})}function Q0(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ee(e)})}function K0(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...ee(e)})}function X0(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...ee(e)})}function J0(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...ee(e)})}function em(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...ee(e)})}function tm(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ee(e)})}function nm(t,e){return new t({type:"string",format:"date",check:"string_format",...ee(e)})}function rm(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...ee(e)})}function im(t,e){return new t({type:"string",format:"duration",check:"string_format",...ee(e)})}function am(t,e){return new t({type:"number",checks:[],...ee(e)})}function sm(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...ee(e)})}function um(t,e){return new t({type:"boolean",...ee(e)})}function om(t,e){return new t({type:"null",...ee(e)})}function lm(t){return new t({type:"unknown"})}function cm(t,e){return new t({type:"never",...ee(e)})}function iu(t,e){return new xl({check:"less_than",...ee(e),value:t,inclusive:!1})}function Vi(t,e){return new xl({check:"less_than",...ee(e),value:t,inclusive:!0})}function au(t,e){return new _l({check:"greater_than",...ee(e),value:t,inclusive:!1})}function Wi(t,e){return new _l({check:"greater_than",...ee(e),value:t,inclusive:!0})}function su(t,e){return new Ap({check:"multiple_of",...ee(e),value:t})}function Sl(t,e){return new Sp({check:"max_length",...ee(e),maximum:t})}function ui(t,e){return new Ip({check:"min_length",...ee(e),minimum:t})}function Il(t,e){return new Np({check:"length_equals",...ee(e),length:t})}function dm(t,e){return new wp({check:"string_format",format:"regex",...ee(e),pattern:t})}function fm(t){return new vp({check:"string_format",format:"lowercase",...ee(t)})}function hm(t){return new Rp({check:"string_format",format:"uppercase",...ee(t)})}function pm(t,e){return new Op({check:"string_format",format:"includes",...ee(e),includes:t})}function mm(t,e){return new Lp({check:"string_format",format:"starts_with",...ee(e),prefix:t})}function gm(t,e){return new Dp({check:"string_format",format:"ends_with",...ee(e),suffix:t})}function Nr(t){return new Pp({check:"overwrite",tx:t})}function bm(t){return Nr(e=>e.normalize(t))}function Em(){return Nr(t=>t.trim())}function Tm(){return Nr(t=>t.toLowerCase())}function xm(){return Nr(t=>t.toUpperCase())}function _m(t,e,n){return new t({type:"array",element:e,...ee(n)})}function ym(t,e,n){const r=ee(n);return r.abort??(r.abort=!0),new t({type:"custom",check:"custom",fn:e,...r})}function km(t,e,n){return new t({type:"custom",check:"custom",fn:e,...ee(n)})}class uu{constructor(e){this.counter=0,this.metadataRegistry=e?.metadata??Jn,this.target=e?.target??"draft-2020-12",this.unrepresentable=e?.unrepresentable??"throw",this.override=e?.override??(()=>{}),this.io=e?.io??"output",this.seen=new Map}process(e,n={path:[],schemaPath:[]}){var r;const i=e._zod.def,a={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},s=this.seen.get(e);if(s)return s.count++,n.schemaPath.includes(e)&&(s.cycle=n.path),s.schema;const u={schema:{},count:1,cycle:void 0,path:n.path};this.seen.set(e,u);const o=e._zod.toJSONSchema?.();if(o)u.schema=o;else{const c={...n,schemaPath:[...n.schemaPath,e],path:n.path},p=e._zod.parent;if(p)u.ref=p,this.process(p,c),this.seen.get(p).isParent=!0;else{const h=u.schema;switch(i.type){case"string":{const m=h;m.type="string";const{minimum:b,maximum:x,format:T,patterns:k,contentEncoding:g}=e._zod.bag;if(typeof b=="number"&&(m.minLength=b),typeof x=="number"&&(m.maxLength=x),T&&(m.format=a[T]??T,m.format===""&&delete m.format),g&&(m.contentEncoding=g),k&&k.size>0){const N=[...k];N.length===1?m.pattern=N[0].source:N.length>1&&(u.schema.allOf=[...N.map(v=>({...this.target==="draft-7"?{type:"string"}:{},pattern:v.source}))])}break}case"number":{const m=h,{minimum:b,maximum:x,format:T,multipleOf:k,exclusiveMaximum:g,exclusiveMinimum:N}=e._zod.bag;typeof T=="string"&&T.includes("int")?m.type="integer":m.type="number",typeof N=="number"&&(m.exclusiveMinimum=N),typeof b=="number"&&(m.minimum=b,typeof N=="number"&&(N>=b?delete m.minimum:delete m.exclusiveMinimum)),typeof g=="number"&&(m.exclusiveMaximum=g),typeof x=="number"&&(m.maximum=x,typeof g=="number"&&(g<=x?delete m.maximum:delete m.exclusiveMaximum)),typeof k=="number"&&(m.multipleOf=k);break}case"boolean":{const m=h;m.type="boolean";break}case"bigint":{if(this.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema");break}case"symbol":{if(this.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema");break}case"null":{h.type="null";break}case"any":break;case"unknown":break;case"undefined":{if(this.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema");break}case"void":{if(this.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema");break}case"never":{h.not={};break}case"date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case"array":{const m=h,{minimum:b,maximum:x}=e._zod.bag;typeof b=="number"&&(m.minItems=b),typeof x=="number"&&(m.maxItems=x),m.type="array",m.items=this.process(i.element,{...c,path:[...c.path,"items"]});break}case"object":{const m=h;m.type="object",m.properties={};const b=i.shape;for(const k in b)m.properties[k]=this.process(b[k],{...c,path:[...c.path,"properties",k]});const x=new Set(Object.keys(b)),T=new Set([...x].filter(k=>{const g=i.shape[k]._zod;return this.io==="input"?g.optin===void 0:g.optout===void 0}));T.size>0&&(m.required=Array.from(T)),i.catchall?._zod.def.type==="never"?m.additionalProperties=!1:i.catchall?i.catchall&&(m.additionalProperties=this.process(i.catchall,{...c,path:[...c.path,"additionalProperties"]})):this.io==="output"&&(m.additionalProperties=!1);break}case"union":{const m=h;m.anyOf=i.options.map((b,x)=>this.process(b,{...c,path:[...c.path,"anyOf",x]}));break}case"intersection":{const m=h,b=this.process(i.left,{...c,path:[...c.path,"allOf",0]}),x=this.process(i.right,{...c,path:[...c.path,"allOf",1]}),T=g=>"allOf"in g&&Object.keys(g).length===1,k=[...T(b)?b.allOf:[b],...T(x)?x.allOf:[x]];m.allOf=k;break}case"tuple":{const m=h;m.type="array";const b=i.items.map((k,g)=>this.process(k,{...c,path:[...c.path,"prefixItems",g]}));if(this.target==="draft-2020-12"?m.prefixItems=b:m.items=b,i.rest){const k=this.process(i.rest,{...c,path:[...c.path,"items"]});this.target==="draft-2020-12"?m.items=k:m.additionalItems=k}i.rest&&(m.items=this.process(i.rest,{...c,path:[...c.path,"items"]}));const{minimum:x,maximum:T}=e._zod.bag;typeof x=="number"&&(m.minItems=x),typeof T=="number"&&(m.maxItems=T);break}case"record":{const m=h;m.type="object",m.propertyNames=this.process(i.keyType,{...c,path:[...c.path,"propertyNames"]}),m.additionalProperties=this.process(i.valueType,{...c,path:[...c.path,"additionalProperties"]});break}case"map":{if(this.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema");break}case"set":{if(this.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema");break}case"enum":{const m=h,b=sl(i.entries);b.every(x=>typeof x=="number")&&(m.type="number"),b.every(x=>typeof x=="string")&&(m.type="string"),m.enum=b;break}case"literal":{const m=h,b=[];for(const x of i.values)if(x===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof x=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");b.push(Number(x))}else b.push(x);if(b.length!==0)if(b.length===1){const x=b[0];m.type=x===null?"null":typeof x,m.const=x}else b.every(x=>typeof x=="number")&&(m.type="number"),b.every(x=>typeof x=="string")&&(m.type="string"),b.every(x=>typeof x=="boolean")&&(m.type="string"),b.every(x=>x===null)&&(m.type="null"),m.enum=b;break}case"file":{const m=h,b={type:"string",format:"binary",contentEncoding:"binary"},{minimum:x,maximum:T,mime:k}=e._zod.bag;x!==void 0&&(b.minLength=x),T!==void 0&&(b.maxLength=T),k?k.length===1?(b.contentMediaType=k[0],Object.assign(m,b)):m.anyOf=k.map(g=>({...b,contentMediaType:g})):Object.assign(m,b);break}case"transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{const m=this.process(i.innerType,c);h.anyOf=[m,{type:"null"}];break}case"nonoptional":{this.process(i.innerType,c),u.ref=i.innerType;break}case"success":{const m=h;m.type="boolean";break}case"default":{this.process(i.innerType,c),u.ref=i.innerType,h.default=JSON.parse(JSON.stringify(i.defaultValue));break}case"prefault":{this.process(i.innerType,c),u.ref=i.innerType,this.io==="input"&&(h._prefault=JSON.parse(JSON.stringify(i.defaultValue)));break}case"catch":{this.process(i.innerType,c),u.ref=i.innerType;let m;try{m=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}h.default=m;break}case"nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{const m=h,b=e._zod.pattern;if(!b)throw new Error("Pattern not found in template literal");m.type="string",m.pattern=b.source;break}case"pipe":{const m=this.io==="input"?i.in._zod.def.type==="transform"?i.out:i.in:i.out;this.process(m,c),u.ref=m;break}case"readonly":{this.process(i.innerType,c),u.ref=i.innerType,h.readOnly=!0;break}case"promise":{this.process(i.innerType,c),u.ref=i.innerType;break}case"optional":{this.process(i.innerType,c),u.ref=i.innerType;break}case"lazy":{const m=e._zod.innerType;this.process(m,c),u.ref=m;break}case"custom":{if(this.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema");break}}}}const l=this.metadataRegistry.get(e);return l&&Object.assign(u.schema,l),this.io==="input"&&Ze(e)&&(delete u.schema.examples,delete u.schema.default),this.io==="input"&&u.schema._prefault&&((r=u.schema).default??(r.default=u.schema._prefault)),delete u.schema._prefault,this.seen.get(e).schema}emit(e,n){const r={cycles:n?.cycles??"ref",reused:n?.reused??"inline",external:n?.external??void 0},i=this.seen.get(e);if(!i)throw new Error("Unprocessed schema. This is a bug in Zod.");const a=f=>{const c=this.target==="draft-2020-12"?"$defs":"definitions";if(r.external){const b=r.external.registry.get(f[0])?.id,x=r.external.uri??(k=>k);if(b)return{ref:x(b)};const T=f[1].defId??f[1].schema.id??`schema${this.counter++}`;return f[1].defId=T,{defId:T,ref:`${x("__shared")}#/${c}/${T}`}}if(f[1]===i)return{ref:"#"};const h=`#/${c}/`,m=f[1].schema.id??`__schema${this.counter++}`;return{defId:m,ref:h+m}},s=f=>{if(f[1].schema.$ref)return;const c=f[1],{ref:p,defId:h}=a(f);c.def={...c.schema},h&&(c.defId=h);const m=c.schema;for(const b in m)delete m[b];m.$ref=p};if(r.cycles==="throw")for(const f of this.seen.entries()){const c=f[1];if(c.cycle)throw new Error(`Cycle detected: #/${c.cycle?.join("/")}/<root>
28
-
29
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const f of this.seen.entries()){const c=f[1];if(e===f[0]){s(f);continue}if(r.external){const h=r.external.registry.get(f[0])?.id;if(e!==f[0]&&h){s(f);continue}}if(this.metadataRegistry.get(f[0])?.id){s(f);continue}if(c.cycle){s(f);continue}if(c.count>1&&r.reused==="ref"){s(f);continue}}const u=(f,c)=>{const p=this.seen.get(f),h=p.def??p.schema,m={...h};if(p.ref===null)return;const b=p.ref;if(p.ref=null,b){u(b,c);const x=this.seen.get(b).schema;x.$ref&&c.target==="draft-7"?(h.allOf=h.allOf??[],h.allOf.push(x)):(Object.assign(h,x),Object.assign(h,m))}p.isParent||this.override({zodSchema:f,jsonSchema:h,path:p.path??[]})};for(const f of[...this.seen.entries()].reverse())u(f[0],{target:this.target});const o={};if(this.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?o.$schema="http://json-schema.org/draft-07/schema#":console.warn(`Invalid target: ${this.target}`),r.external?.uri){const f=r.external.registry.get(e)?.id;if(!f)throw new Error("Schema is missing an `id` property");o.$id=r.external.uri(f)}Object.assign(o,i.def);const l=r.external?.defs??{};for(const f of this.seen.entries()){const c=f[1];c.def&&c.defId&&(l[c.defId]=c.def)}r.external||Object.keys(l).length>0&&(this.target==="draft-2020-12"?o.$defs=l:o.definitions=l);try{return JSON.parse(JSON.stringify(o))}catch{throw new Error("Error converting schema to JSON.")}}}function Am(t,e){if(t instanceof Cl){const r=new uu(e),i={};for(const u of t._idmap.entries()){const[o,l]=u;r.process(l)}const a={},s={registry:t,uri:e?.uri,defs:i};for(const u of t._idmap.entries()){const[o,l]=u;a[o]=r.emit(l,{...e,external:s})}if(Object.keys(i).length>0){const u=r.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[u]:i}}return{schemas:a}}const n=new uu(e);return n.process(t),n.emit(t,e)}function Ze(t,e){const n=e??{seen:new Set};if(n.seen.has(t))return!1;n.seen.add(t);const i=t._zod.def;switch(i.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":return!1;case"array":return Ze(i.element,n);case"object":{for(const a in i.shape)if(Ze(i.shape[a],n))return!0;return!1}case"union":{for(const a of i.options)if(Ze(a,n))return!0;return!1}case"intersection":return Ze(i.left,n)||Ze(i.right,n);case"tuple":{for(const a of i.items)if(Ze(a,n))return!0;return!!(i.rest&&Ze(i.rest,n))}case"record":return Ze(i.keyType,n)||Ze(i.valueType,n);case"map":return Ze(i.keyType,n)||Ze(i.valueType,n);case"set":return Ze(i.valueType,n);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return Ze(i.innerType,n);case"lazy":return Ze(i.getter(),n);case"default":return Ze(i.innerType,n);case"prefault":return Ze(i.innerType,n);case"custom":return!1;case"transform":return!0;case"pipe":return Ze(i.in,n)||Ze(i.out,n);case"success":return!1;case"catch":return!1}throw new Error(`Unknown schema type: ${i.type}`)}const Nl=({size:t=24,color:e="currentColor",...n})=>D.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},D.createElement("path",{d:"M15.938 15.938A7.001 7.001 0 0 0 15 2a7.001 7.001 0 0 0-6.938 6.062M16 15a7 7 0 1 1-14 0 7 7 0 0 1 14 0Z"}));Nl.displayName="Coins01";const wl=({size:t=24,color:e="currentColor",...n})=>D.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},D.createElement("path",{d:"M6 16a4 4 0 0 0 4 4h4a4 4 0 0 0 0-8h-4a4 4 0 0 1 0-8h4a4 4 0 0 1 4 4m-6-6v20"}));wl.displayName="CurrencyDollar";const vl=({size:t=24,color:e="currentColor",...n})=>D.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},D.createElement("path",{d:"M12 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm7-14a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM5 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"}));vl.displayName="DotsGrid";const Rl=({size:t=24,color:e="currentColor",...n})=>D.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},D.createElement("path",{d:"M16.2 21H6.931c-.605 0-.908 0-1.049-.12a.5.5 0 0 1-.173-.42c.014-.183.228-.397.657-.826l8.503-8.503c.396-.396.594-.594.822-.668a1 1 0 0 1 .618 0c.228.074.426.272.822.668L21 15v1.2M16.2 21c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C21 18.72 21 17.88 21 16.2M16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4M10.5 8.5a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z"}));Rl.displayName="Image01";const Ol=({size:t=24,color:e="currentColor",...n})=>D.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},D.createElement("path",{d:"M15 16.5V19c0 .932 0 1.398-.152 1.765a2 2 0 0 1-1.083 1.083C13.398 22 12.932 22 12 22c-.932 0-1.398 0-1.765-.152a2 2 0 0 1-1.083-1.083C9 20.398 9 19.932 9 19v-2.5m6 0c2.649-1.157 4.5-3.925 4.5-7a7.5 7.5 0 0 0-15 0c0 3.075 1.851 5.843 4.5 7m6 0H9"}));Ol.displayName="Lightbulb01";const Ll=({size:t=24,color:e="currentColor",...n})=>D.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},D.createElement("path",{d:"m18 8 4 4m0 0-4 4m4-4H9m6-7.796A8.383 8.383 0 0 0 10.667 3C5.88 3 2 7.03 2 12s3.88 9 8.667 9A8.384 8.384 0 0 0 15 19.796"}));Ll.displayName="LogOut04";const Dl=({size:t=24,color:e="currentColor",...n})=>D.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},D.createElement("path",{d:"m10 15-3.075 3.114c-.43.434-.644.651-.828.666a.5.5 0 0 1-.421-.172c-.12-.14-.12-.446-.12-1.056v-1.56c0-.548-.449-.944-.99-1.024v0a3 3 0 0 1-2.534-2.533C2 12.219 2 11.96 2 11.445V6.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C4.28 2 5.12 2 6.8 2h7.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C19 4.28 19 5.12 19 6.8V11m0 11-2.176-1.513c-.306-.213-.46-.32-.626-.395a2.002 2.002 0 0 0-.462-.145c-.18-.033-.367-.033-.74-.033H13.2c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C10 18.394 10 17.834 10 16.714V14.2c0-1.12 0-1.68.218-2.108a2 2 0 0 1 .874-.874C11.52 11 12.08 11 13.2 11h5.6c1.12 0 1.68 0 2.108.218a2 2 0 0 1 .874.874C22 12.52 22 13.08 22 14.2v2.714c0 .932 0 1.398-.152 1.766a2 2 0 0 1-1.083 1.082c-.367.152-.833.152-1.765.152V22Z"}));Dl.displayName="MessageChatSquare";const ki=({size:t=24,color:e="currentColor",...n})=>D.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},D.createElement("path",{d:"m6.5 13 .784 1.569c.266.53.399.796.576 1.026a3 3 0 0 0 .545.545c.23.177.495.31 1.026.575L11 17.5l-1.569.785c-.53.265-.796.398-1.026.575a3 3 0 0 0-.545.545c-.177.23-.31.495-.576 1.026L6.5 22l-.784-1.569c-.266-.53-.399-.796-.576-1.026a3 3 0 0 0-.545-.545c-.23-.177-.495-.31-1.026-.575L2 17.5l1.569-.785c.53-.265.796-.398 1.026-.575a3 3 0 0 0 .545-.545c.177-.23.31-.495.576-1.026L6.5 13ZM15 2l1.179 3.064c.282.734.423 1.1.642 1.409a3 3 0 0 0 .706.706c.309.22.675.36 1.409.642L22 9l-3.064 1.179c-.734.282-1.1.423-1.409.642a3 3 0 0 0-.706.706c-.22.309-.36.675-.642 1.409L15 16l-1.179-3.064c-.282-.734-.423-1.1-.642-1.409a3 3 0 0 0-.706-.706c-.309-.22-.675-.36-1.409-.642L8 9l3.064-1.179c.734-.282 1.1-.423 1.409-.642a3 3 0 0 0 .706-.706c.22-.309.36-.675.642-1.409L15 2Z"}));ki.displayName="Stars01";const Pl=({size:t=24,color:e="currentColor",...n})=>D.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},D.createElement("path",{d:"M3 7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8Z"}));Pl.displayName="Stop";const Ml=({size:t=24,color:e="currentColor",...n})=>D.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},D.createElement("path",{d:"M16 8V5l3-3 1 2 2 1-3 3h-3Zm0 0-4 4m10 0c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2m5 10a5 5 0 1 1-5-5"}));Ml.displayName="Target04";const Bl=({size:t=24,color:e="currentColor",...n})=>D.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},D.createElement("path",{d:"m4 17 6-6-6-6m8 14h8"}));Bl.displayName="Terminal";function Cm(t){const e=X.c(5),{children:n,className:r}=t;let i;e[0]!==r?(i=ue("flex flex-col h-full w-full bg-sidebar transform-[translateZ(0)]",r),e[0]=r,e[1]=i):i=e[1];let a;return e[2]!==n||e[3]!==i?(a=E.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=a):a=e[4],a}function Sm(t){const e=X.c(5),{children:n,className:r}=t;let i;e[0]!==r?(i=ue("flex h-12 items-center justify-between border-b border-border px-4 flex-none",r),e[0]=r,e[1]=i):i=e[1];let a;return e[2]!==n||e[3]!==i?(a=E.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=a):a=e[4],a}function Im(t){const e=X.c(5),{children:n,className:r}=t;let i;e[0]!==r?(i=ue("flex-1 min-h-0 overflow-y-auto",r),e[0]=r,e[1]=i):i=e[1];let a;return e[2]!==n||e[3]!==i?(a=E.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=a):a=e[4],a}function Nm(t){const e=X.c(5),{children:n,className:r}=t;let i;e[0]!==r?(i=ue("flex-none w-full mx-auto p-2",r),e[0]=r,e[1]=i):i=e[1];let a;return e[2]!==n||e[3]!==i?(a=E.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=a):a=e[4],a}const Ai=Object.assign(Cm,{Header:Sm,Content:Im,Footer:Nm});function wm(t){const e=X.c(67),{value:n,onChange:r,onSubmit:i,onStop:a,disabled:s,isStreaming:u,placeholder:o,className:l,centered:f,contextContent:c,leftActions:p,rightActions:h,maxTextHeight:m}=t,b=o===void 0?"Ask anything or @ for context":o,x=f===void 0?!1:f,T=m===void 0?"164px":m;let k;e[0]!==s||e[1]!==u||e[2]!==n?(k=!s&&!u&&n.trim().length>0,e[0]=s,e[1]=u,e[2]=n,e[3]=k):k=e[3];const g=k;let N;e[4]!==g||e[5]!==u||e[6]!==a||e[7]!==i?(N=De=>{De.preventDefault(),u&&a?a():g&&i()},e[4]=g,e[5]=u,e[6]=a,e[7]=i,e[8]=N):N=e[8];const v=N;let C;e[9]!==g||e[10]!==i?(C=De=>{De.key==="Enter"&&!De.shiftKey&&(De.preventDefault(),g&&i())},e[9]=g,e[10]=i,e[11]=C):C=e[11];const R=C;let M;e[12]!==l?(M=ue("w-full",l),e[12]=l,e[13]=M):M=e[13];const U=x?"shadow-md":"shadow-sm";let w;e[14]!==U?(w=ue("relative rounded-xl border border-border bg-background w-full min-h-[130px] flex flex-col",U),e[14]=U,e[15]=w):w=e[15];let P;e[16]!==c?(P=c&&E.jsx("div",{className:"mb-1",children:c}),e[16]=c,e[17]=P):P=e[17];let H;e[18]!==T?(H={maxHeight:T},e[18]=T,e[19]=H):H=e[19];let te;e[20]!==r?(te=De=>r(De.target.value),e[20]=r,e[21]=te):te=e[21];const Z=s||u;let z;e[22]===Symbol.for("react.memo_cache_sentinel")?(z=ue("placeholder:text-muted-foreground resize-none focus-visible:ring-0 border-0 p-2 text-sm min-h-[20px] w-full","rounded-none shadow-none"),e[22]=z):z=e[22];let Q;e[23]===Symbol.for("react.memo_cache_sentinel")?(Q={minHeight:"20px",height:"auto",overflow:"hidden"},e[23]=Q):Q=e[23];let ae;e[24]!==R||e[25]!==b||e[26]!==te||e[27]!==Z||e[28]!==n?(ae=E.jsx(wh,{value:n,onChange:te,onKeyDown:R,placeholder:b,disabled:Z,className:z,rows:1,style:Q}),e[24]=R,e[25]=b,e[26]=te,e[27]=Z,e[28]=n,e[29]=ae):ae=e[29];let Ee;e[30]!==H||e[31]!==ae?(Ee=E.jsx("div",{className:"overflow-y-auto relative flex-1",style:H,children:ae}),e[30]=H,e[31]=ae,e[32]=Ee):Ee=e[32];let Se;e[33]!==P||e[34]!==Ee?(Se=E.jsxs("div",{className:"relative flex flex-col gap-2 p-2.5 flex-1",children:[P,Ee]}),e[33]=P,e[34]=Ee,e[35]=Se):Se=e[35];let I;e[36]!==p?(I=E.jsx("div",{className:"flex items-center overflow-hidden",children:p}),e[36]=p,e[37]=I):I=e[37];const xe=u?"button":"submit";let Te;e[38]!==u||e[39]!==a?(Te=De=>{u&&(De.preventDefault(),De.stopPropagation(),a?.())},e[38]=u,e[39]=a,e[40]=Te):Te=e[40];const y=g||u?"default":"ghost",W=!g&&!u,K=!g&&!u&&"bg-muted text-muted-foreground hover:bg-muted hover:text-muted-foreground cursor-not-allowed";let G;e[41]!==K?(G=ue("size-8 rounded-full transition-all",K),e[41]=K,e[42]=G):G=e[42];const J=u?"Stop generating":"Send message (Enter)";let ne;e[43]!==u?(ne=u?E.jsx(Pl,{size:20}):E.jsx(Ih,{size:20}),e[43]=u,e[44]=ne):ne=e[44];let oe;e[45]!==xe||e[46]!==Te||e[47]!==y||e[48]!==W||e[49]!==G||e[50]!==J||e[51]!==ne?(oe=E.jsx(Yt,{type:xe,onClick:Te,variant:y,size:"icon",disabled:W,className:G,title:J,children:ne}),e[45]=xe,e[46]=Te,e[47]=y,e[48]=W,e[49]=G,e[50]=J,e[51]=ne,e[52]=oe):oe=e[52];let me;e[53]!==h||e[54]!==oe?(me=E.jsxs("div",{className:"flex items-center gap-1",children:[h,oe]}),e[53]=h,e[54]=oe,e[55]=me):me=e[55];let ze;e[56]!==I||e[57]!==me?(ze=E.jsxs("div",{className:"flex items-center justify-between px-2.5 pb-2.5",children:[I,me]}),e[56]=I,e[57]=me,e[58]=ze):ze=e[58];let je;e[59]!==Se||e[60]!==ze||e[61]!==w?(je=E.jsxs("div",{className:w,children:[Se,ze]}),e[59]=Se,e[60]=ze,e[61]=w,e[62]=je):je=e[62];let ke;return e[63]!==v||e[64]!==je||e[65]!==M?(ke=E.jsx("form",{onSubmit:v,className:M,children:je}),e[63]=v,e[64]=je,e[65]=M,e[66]=ke):ke=e[66],ke}function vm(t){const e=X.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=E.jsx(Ln.Root,{"data-slot":"drawer",...n}),e[2]=n,e[3]=r):r=e[3],r}function Rm(t){const e=X.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=E.jsx(Ln.Trigger,{"data-slot":"drawer-trigger",...n}),e[2]=n,e[3]=r):r=e[3],r}function Om(t){const e=X.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=E.jsx(Ln.Portal,{"data-slot":"drawer-portal",...n}),e[2]=n,e[3]=r):r=e[3],r}function Lm(t){const e=X.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let i;e[3]!==n?(i=ue("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",n),e[3]=n,e[4]=i):i=e[4];let a;return e[5]!==r||e[6]!==i?(a=E.jsx(Ln.Overlay,{"data-slot":"drawer-overlay",className:i,...r}),e[5]=r,e[6]=i,e[7]=a):a=e[7],a}function Dm(t){const e=X.c(12);let n,r,i;e[0]!==t?({className:r,children:n,...i}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=i):(n=e[1],r=e[2],i=e[3]);let a;e[4]===Symbol.for("react.memo_cache_sentinel")?(a=E.jsx(Lm,{}),e[4]=a):a=e[4];let s;e[5]!==r?(s=ue("group/drawer-content bg-background fixed z-50 flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",r),e[5]=r,e[6]=s):s=e[6];let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=E.jsx("div",{className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),e[7]=u):u=e[7];let o;return e[8]!==n||e[9]!==i||e[10]!==s?(o=E.jsxs(Om,{"data-slot":"drawer-portal",children:[a,E.jsxs(Ln.Content,{"data-slot":"drawer-content",className:s,...i,children:[u,n]})]}),e[8]=n,e[9]=i,e[10]=s,e[11]=o):o=e[11],o}function Pm(t){const e=X.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let i;e[3]!==n?(i=ue("flex flex-col gap-1.5 px-4 py-2",n),e[3]=n,e[4]=i):i=e[4];let a;return e[5]!==r||e[6]!==i?(a=E.jsx("div",{"data-slot":"drawer-header",className:i,...r}),e[5]=r,e[6]=i,e[7]=a):a=e[7],a}function Mm(t){const e=X.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let i;e[3]!==n?(i=ue("text-foreground font-semibold",n),e[3]=n,e[4]=i):i=e[4];let a;return e[5]!==r||e[6]!==i?(a=E.jsx(Ln.Title,{"data-slot":"drawer-title",className:i,...r}),e[5]=r,e[6]=i,e[7]=a):a=e[7],a}function ou({prop:t,defaultProp:e,onChange:n=()=>{}}){const[r,i]=Bm({defaultProp:e,onChange:n}),a=t!==void 0,s=a?t:r,u=ul(n),o=D.useCallback(l=>{if(a){const c=typeof l=="function"?l(t):l;c!==t&&u(c)}else i(l)},[a,t,i,u]);return[s,o]}function Bm({defaultProp:t,onChange:e}){const n=D.useState(t),[r]=n,i=D.useRef(r),a=ul(e);return D.useEffect(()=>{i.current!==r&&(a(r),i.current=r)},[r,i,a]),n}const Fl=D.createContext({isMobile:!1,setValue:()=>{}}),os=()=>D.useContext(Fl),zl=t=>{const e=X.c(37);let n,r,i,a,s,u,o,l;e[0]!==t?({children:n,defaultOpen:r,open:u,onOpenChange:a,defaultValue:i,value:l,onValueChange:s,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=i,e[4]=a,e[5]=s,e[6]=u,e[7]=o,e[8]=l):(n=e[1],r=e[2],i=e[3],a=e[4],s=e[5],u=e[6],o=e[7],l=e[8]);const f=Uh(),c=r??!1;let p;e[9]!==a||e[10]!==u||e[11]!==c?(p={prop:u,defaultProp:c,onChange:a},e[9]=a,e[10]=u,e[11]=c,e[12]=p):p=e[12];const[h,m]=ou(p);let b;e[13]!==i||e[14]!==s||e[15]!==l?(b={prop:l,defaultProp:i,onChange:s},e[13]=i,e[14]=s,e[15]=l,e[16]=b):b=e[16];const[x,T]=ou(b);let k;e[17]!==T?(k=M=>{M&&T(M)},e[17]=T,e[18]=k):k=e[18];const g=k;let N;e[19]!==f||e[20]!==g?(N={isMobile:f,setValue:g},e[19]=f,e[20]=g,e[21]=N):N=e[21];let v;e[22]!==n||e[23]!==h||e[24]!==o||e[25]!==m?(v=E.jsx(vm,{open:h,onOpenChange:m,...o,children:n}),e[22]=n,e[23]=h,e[24]=o,e[25]=m,e[26]=v):v=e[26];let C;e[27]!==h||e[28]!==o||e[29]!==m||e[30]!==g||e[31]!==v||e[32]!==x?(C=E.jsx(Fh,{open:h,onOpenChange:m,value:x,onValueChange:g,...o,children:v}),e[27]=h,e[28]=o,e[29]=m,e[30]=g,e[31]=v,e[32]=x,e[33]=C):C=e[33];let R;return e[34]!==N||e[35]!==C?(R=E.jsx(Fl.Provider,{value:N,children:C}),e[34]=N,e[35]=C,e[36]=R):R=e[36],R},Ul=t=>{const{children:e,title:n,headerActions:r,...i}=t,{isMobile:a}=os(),{className:s,...u}=i;return a?E.jsxs(Dm,{...u,children:[E.jsxs(Pm,{className:ue(r?"flex flex-row items-center justify-between":"hidden"),children:[E.jsx(Mm,{children:n}),r]}),E.jsx("div",{className:ue("flex flex-col gap-2 p-2 py-4",s),children:e})]}):E.jsx(Bh,{...i,children:e})},Hl=t=>{const e=X.c(7);let n,r;e[0]!==t?({children:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);const{isMobile:i}=os();let a;return e[3]!==n||e[4]!==i||e[5]!==r?(a=i?E.jsx(Rm,{asChild:!0,children:E.jsx(Yt,{variant:"outline",...r,children:n})}):E.jsx(Mh,{...r,children:n}),e[3]=n,e[4]=i,e[5]=r,e[6]=a):a=e[6],a},$l=t=>{const e=X.c(7);let n,r;e[0]!==t?({children:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);const{isMobile:i}=os();let a;return e[3]!==n||e[4]!==i||e[5]!==r?(a=i?E.jsx("span",{...r,children:n}):E.jsx(Ph,{...r,children:n}),e[3]=n,e[4]=i,e[5]=r,e[6]=a):a=e[6],a};function Fm(){const t=X.c(4),e=Hh();let n;t[0]!==e?(n=e??[],t[0]=e,t[1]=n):n=t[1];let r;return t[2]!==n?(r=n.map(zm),t[2]=n,t[3]=r):r=t[3],r}function zm(t){return{id:t.id,title:t.title,description:t.description??null,icon:t.icon??null,fallbackIcon:E.jsx(ss,{})}}function Um(t){const e=X.c(24),{gateway:n,isSelected:r}=t,i=r&&"bg-accent";let a;e[0]!==i?(a=ue("flex items-start gap-3 py-3 px-3 hover:bg-accent cursor-pointer rounded-xl",i),e[0]=i,e[1]=a):a=e[1];let s;e[2]!==n.fallbackIcon?(s=n.fallbackIcon??E.jsx(ss,{}),e[2]=n.fallbackIcon,e[3]=s):s=e[3];let u;e[4]!==n.icon||e[5]!==n.title||e[6]!==s?(u=E.jsx(pl,{icon:n.icon,name:n.title,size:"sm",fallbackIcon:s,className:"size-10"}),e[4]=n.icon,e[5]=n.title,e[6]=s,e[7]=u):u=e[7];let o;e[8]!==n.title?(o=E.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:n.title}),e[8]=n.title,e[9]=o):o=e[9];let l;e[10]!==r?(l=r&&E.jsx(un,{size:16,className:"text-foreground shrink-0"}),e[10]=r,e[11]=l):l=e[11];let f;e[12]!==o||e[13]!==l?(f=E.jsxs("div",{className:"flex items-center justify-between",children:[o,l]}),e[12]=o,e[13]=l,e[14]=f):f=e[14];let c;e[15]!==n.description?(c=n.description&&E.jsx("p",{className:"text-xs text-muted-foreground line-clamp-1 leading-relaxed",children:n.description}),e[15]=n.description,e[16]=c):c=e[16];let p;e[17]!==f||e[18]!==c?(p=E.jsxs("div",{className:"flex flex-col flex-1 min-w-0 gap-0.5",children:[f,c]}),e[17]=f,e[18]=c,e[19]=p):p=e[19];let h;return e[20]!==a||e[21]!==u||e[22]!==p?(h=E.jsxs("div",{className:a,children:[u,p]}),e[20]=a,e[21]=u,e[22]=p,e[23]=h):h=e[23],h}function Hm(t){const e=X.c(12),{gateway:n}=t;if(!n){let u;return e[0]===Symbol.for("react.memo_cache_sentinel")?(u=E.jsx("span",{className:"text-sm text-muted-foreground",children:"Select gateway"}),e[0]=u):u=e[0],u}let r;e[1]!==n.fallbackIcon?(r=n.fallbackIcon??E.jsx(ss,{}),e[1]=n.fallbackIcon,e[2]=r):r=e[2];let i;e[3]!==n.icon||e[4]!==n.title||e[5]!==r?(i=E.jsx(pl,{icon:n.icon,name:n.title,size:"xs",fallbackIcon:r,className:"size-5"}),e[3]=n.icon,e[4]=n.title,e[5]=r,e[6]=i):i=e[6];let a;e[7]!==n.title?(a=E.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:n.title}),e[7]=n.title,e[8]=a):a=e[8];let s;return e[9]!==i||e[10]!==a?(s=E.jsxs("div",{className:"flex items-center gap-2",children:[i,a]}),e[9]=i,e[10]=a,e[11]=s):s=e[11],s}function $m(t){const e=X.c(37),{selectedGatewayId:n,onGatewayChange:r,variant:i,className:a,placeholder:s}=t,u=i===void 0?"bordered":i,o=s===void 0?"Select gateway":s,[l,f]=D.useState(!1),c=Fm();let p;if(e[0]!==c||e[1]!==n){let P;e[3]!==n?(P=H=>H.id===n,e[3]=n,e[4]=P):P=e[4],p=c.find(P),e[0]=c,e[1]=n,e[2]=p}else p=e[2];const h=p;let m;e[5]!==r?(m=P=>{r(P),f(!1)},e[5]=r,e[6]=m):m=e[6];const b=m,x=n||"",T=u==="borderless"?"border-0 md:border-none":"border";let k;e[7]!==a||e[8]!==T?(k=ue("h-8! text-sm hover:bg-accent rounded-lg py-1 px-2 gap-1 shadow-none cursor-pointer group focus-visible:ring-0 focus-visible:ring-offset-0",T,a),e[7]=a,e[8]=T,e[9]=k):k=e[9];let g;e[10]!==h?(g=E.jsx(Hm,{gateway:h}),e[10]=h,e[11]=g):g=e[11];let N;e[12]!==o||e[13]!==g?(N=E.jsx($l,{placeholder:o,children:g}),e[12]=o,e[13]=g,e[14]=N):N=e[14];let v;e[15]!==k||e[16]!==N?(v=E.jsx(Hl,{className:k,children:N}),e[15]=k,e[16]=N,e[17]=v):v=e[17];let C;e[18]===Symbol.for("react.memo_cache_sentinel")?(C=E.jsx("div",{className:"border-b px-4 py-3 bg-background/95 backdrop-blur sticky top-0 z-10",children:E.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[E.jsx(hl,{size:16}),E.jsx("span",{className:"text-sm",children:"Search for a gateway..."})]})}),e[18]=C):C=e[18];let R;if(e[19]!==c||e[20]!==b||e[21]!==n){let P;e[23]!==b||e[24]!==n?(P=H=>E.jsx("div",{onClick:()=>b(H.id),className:"outline-none",children:E.jsx(Um,{gateway:H,isSelected:H.id===n})},H.id),e[23]=b,e[24]=n,e[25]=P):P=e[25],R=c.map(P),e[19]=c,e[20]=b,e[21]=n,e[22]=R}else R=e[22];let M;e[26]!==R?(M=E.jsxs("div",{className:"flex flex-col max-h-[400px]",children:[C,E.jsx("div",{className:"overflow-y-auto p-2 flex flex-col gap-1",children:R})]}),e[26]=R,e[27]=M):M=e[27];let U;e[28]!==o||e[29]!==M?(U=E.jsx(Ul,{title:o,className:"w-full md:w-[400px] p-0",children:M}),e[28]=o,e[29]=M,e[30]=U):U=e[30];let w;return e[31]!==b||e[32]!==l||e[33]!==v||e[34]!==U||e[35]!==x?(w=E.jsxs(zl,{open:l,onOpenChange:f,value:x,onValueChange:b,children:[v,U]}),e[31]=b,e[32]=l,e[33]=v,e[34]=U,e[35]=x,e[36]=w):w=e[36],w}function ls(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var hn=ls();function jl(t){hn=t}var ur={exec:()=>null};function ye(t,e=""){let n=typeof t=="string"?t:t.source;const r={replace:(i,a)=>{let s=typeof a=="string"?a:a.source;return s=s.replace(et.caret,"$1"),n=n.replace(i,s),r},getRegex:()=>new RegExp(n,e)};return r}var et={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},jm=/^(?:[ \t]*(?:\n|$))+/,Zm=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Ym=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,wr=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,qm=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,cs=/(?:[*+-]|\d{1,9}[.)])/,Zl=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Yl=ye(Zl).replace(/bull/g,cs).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Vm=ye(Zl).replace(/bull/g,cs).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),ds=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Wm=/^[^\n]+/,fs=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Gm=ye(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",fs).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Qm=ye(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,cs).getRegex(),Ci="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",hs=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Km=ye("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",hs).replace("tag",Ci).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ql=ye(ds).replace("hr",wr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ci).getRegex(),Xm=ye(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ql).getRegex(),ps={blockquote:Xm,code:Zm,def:Gm,fences:Ym,heading:qm,hr:wr,html:Km,lheading:Yl,list:Qm,newline:jm,paragraph:ql,table:ur,text:Wm},lu=ye("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",wr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ci).getRegex(),Jm={...ps,lheading:Vm,table:lu,paragraph:ye(ds).replace("hr",wr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",lu).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ci).getRegex()},e1={...ps,html:ye(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",hs).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ur,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ye(ds).replace("hr",wr).replace("heading",` *#{1,6} *[^
30
- ]`).replace("lheading",Yl).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},t1=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,n1=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Vl=/^( {2,}|\\)\n(?!\s*$)/,r1=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Si=/[\p{P}\p{S}]/u,ms=/[\s\p{P}\p{S}]/u,Wl=/[^\s\p{P}\p{S}]/u,i1=ye(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,ms).getRegex(),Gl=/(?!~)[\p{P}\p{S}]/u,a1=/(?!~)[\s\p{P}\p{S}]/u,s1=/(?:[^\s\p{P}\p{S}]|~)/u,u1=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,Ql=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,o1=ye(Ql,"u").replace(/punct/g,Si).getRegex(),l1=ye(Ql,"u").replace(/punct/g,Gl).getRegex(),Kl="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",c1=ye(Kl,"gu").replace(/notPunctSpace/g,Wl).replace(/punctSpace/g,ms).replace(/punct/g,Si).getRegex(),d1=ye(Kl,"gu").replace(/notPunctSpace/g,s1).replace(/punctSpace/g,a1).replace(/punct/g,Gl).getRegex(),f1=ye("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Wl).replace(/punctSpace/g,ms).replace(/punct/g,Si).getRegex(),h1=ye(/\\(punct)/,"gu").replace(/punct/g,Si).getRegex(),p1=ye(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),m1=ye(hs).replace("(?:-->|$)","-->").getRegex(),g1=ye("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",m1).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),oi=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,b1=ye(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",oi).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Xl=ye(/^!?\[(label)\]\[(ref)\]/).replace("label",oi).replace("ref",fs).getRegex(),Jl=ye(/^!?\[(ref)\](?:\[\])?/).replace("ref",fs).getRegex(),E1=ye("reflink|nolink(?!\\()","g").replace("reflink",Xl).replace("nolink",Jl).getRegex(),gs={_backpedal:ur,anyPunctuation:h1,autolink:p1,blockSkip:u1,br:Vl,code:n1,del:ur,emStrongLDelim:o1,emStrongRDelimAst:c1,emStrongRDelimUnd:f1,escape:t1,link:b1,nolink:Jl,punctuation:i1,reflink:Xl,reflinkSearch:E1,tag:g1,text:r1,url:ur},T1={...gs,link:ye(/^!?\[(label)\]\((.*?)\)/).replace("label",oi).getRegex(),reflink:ye(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",oi).getRegex()},Sa={...gs,emStrongRDelimAst:d1,emStrongLDelim:l1,url:ye(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},x1={...Sa,br:ye(Vl).replace("{2,}","*").getRegex(),text:ye(Sa.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Hr={normal:ps,gfm:Jm,pedantic:e1},Yn={normal:gs,gfm:Sa,breaks:x1,pedantic:T1},_1={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},cu=t=>_1[t];function _t(t,e){if(e){if(et.escapeTest.test(t))return t.replace(et.escapeReplace,cu)}else if(et.escapeTestNoEncode.test(t))return t.replace(et.escapeReplaceNoEncode,cu);return t}function du(t){try{t=encodeURI(t).replace(et.percentDecode,"%")}catch{return null}return t}function fu(t,e){const n=t.replace(et.findPipe,(a,s,u)=>{let o=!1,l=s;for(;--l>=0&&u[l]==="\\";)o=!o;return o?"|":" |"}),r=n.split(et.splitPipe);let i=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(et.slashPipe,"|");return r}function qn(t,e,n){const r=t.length;if(r===0)return"";let i=0;for(;i<r&&t.charAt(r-i-1)===e;)i++;return t.slice(0,r-i)}function y1(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let r=0;r<t.length;r++)if(t[r]==="\\")r++;else if(t[r]===e[0])n++;else if(t[r]===e[1]&&(n--,n<0))return r;return n>0?-2:-1}function hu(t,e,n,r,i){const a=e.href,s=e.title||null,u=t[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;const o={type:t[0].charAt(0)==="!"?"image":"link",raw:n,href:a,title:s,text:u,tokens:r.inlineTokens(u)};return r.state.inLink=!1,o}function k1(t,e,n){const r=t.match(n.other.indentCodeCompensation);if(r===null)return e;const i=r[1];return e.split(`
31
- `).map(a=>{const s=a.match(n.other.beginningSpace);if(s===null)return a;const[u]=s;return u.length>=i.length?a.slice(i.length):a}).join(`
32
- `)}var li=class{options;rules;lexer;constructor(t){this.options=t||hn}space(t){const e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){const e=this.rules.block.code.exec(t);if(e){const n=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?n:qn(n,`
33
- `)}}}fences(t){const e=this.rules.block.fences.exec(t);if(e){const n=e[0],r=k1(n,e[3]||"",this.rules);return{type:"code",raw:n,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:r}}}heading(t){const e=this.rules.block.heading.exec(t);if(e){let n=e[2].trim();if(this.rules.other.endingHash.test(n)){const r=qn(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(n=r.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){const e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:qn(e[0],`
34
- `)}}blockquote(t){const e=this.rules.block.blockquote.exec(t);if(e){let n=qn(e[0],`
35
- `).split(`
36
- `),r="",i="";const a=[];for(;n.length>0;){let s=!1;const u=[];let o;for(o=0;o<n.length;o++)if(this.rules.other.blockquoteStart.test(n[o]))u.push(n[o]),s=!0;else if(!s)u.push(n[o]);else break;n=n.slice(o);const l=u.join(`
37
- `),f=l.replace(this.rules.other.blockquoteSetextReplace,`
38
- $1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
39
- ${l}`:l,i=i?`${i}
40
- ${f}`:f;const c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(f,a,!0),this.lexer.state.top=c,n.length===0)break;const p=a.at(-1);if(p?.type==="code")break;if(p?.type==="blockquote"){const h=p,m=h.raw+`
41
- `+n.join(`
42
- `),b=this.blockquote(m);a[a.length-1]=b,r=r.substring(0,r.length-h.raw.length)+b.raw,i=i.substring(0,i.length-h.text.length)+b.text;break}else if(p?.type==="list"){const h=p,m=h.raw+`
43
- `+n.join(`
44
- `),b=this.list(m);a[a.length-1]=b,r=r.substring(0,r.length-p.raw.length)+b.raw,i=i.substring(0,i.length-h.raw.length)+b.raw,n=m.substring(a.at(-1).raw.length).split(`
45
- `);continue}}return{type:"blockquote",raw:r,tokens:a,text:i}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=e[1].trim();const r=n.length>1,i={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");const a=this.rules.other.listItemRegex(n);let s=!1;for(;t;){let o=!1,l="",f="";if(!(e=a.exec(t))||this.rules.block.hr.test(t))break;l=e[0],t=t.substring(l.length);let c=e[2].split(`
46
- `,1)[0].replace(this.rules.other.listReplaceTabs,T=>" ".repeat(3*T.length)),p=t.split(`
47
- `,1)[0],h=!c.trim(),m=0;if(this.options.pedantic?(m=2,f=c.trimStart()):h?m=e[1].length+1:(m=e[2].search(this.rules.other.nonSpaceChar),m=m>4?1:m,f=c.slice(m),m+=e[1].length),h&&this.rules.other.blankLine.test(p)&&(l+=p+`
48
- `,t=t.substring(p.length+1),o=!0),!o){const T=this.rules.other.nextBulletRegex(m),k=this.rules.other.hrRegex(m),g=this.rules.other.fencesBeginRegex(m),N=this.rules.other.headingBeginRegex(m),v=this.rules.other.htmlBeginRegex(m);for(;t;){const C=t.split(`
49
- `,1)[0];let R;if(p=C,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting," "),R=p):R=p.replace(this.rules.other.tabCharGlobal," "),g.test(p)||N.test(p)||v.test(p)||T.test(p)||k.test(p))break;if(R.search(this.rules.other.nonSpaceChar)>=m||!p.trim())f+=`
50
- `+R.slice(m);else{if(h||c.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||g.test(c)||N.test(c)||k.test(c))break;f+=`
51
- `+p}!h&&!p.trim()&&(h=!0),l+=C+`
52
- `,t=t.substring(C.length+1),c=R.slice(m)}}i.loose||(s?i.loose=!0:this.rules.other.doubleBlankLine.test(l)&&(s=!0));let b=null,x;this.options.gfm&&(b=this.rules.other.listIsTask.exec(f),b&&(x=b[0]!=="[ ] ",f=f.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:l,task:!!b,checked:x,loose:!1,text:f,tokens:[]}),i.raw+=l}const u=i.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let o=0;o<i.items.length;o++)if(this.lexer.state.top=!1,i.items[o].tokens=this.lexer.blockTokens(i.items[o].text,[]),!i.loose){const l=i.items[o].tokens.filter(c=>c.type==="space"),f=l.length>0&&l.some(c=>this.rules.other.anyLine.test(c.raw));i.loose=f}if(i.loose)for(let o=0;o<i.items.length;o++)i.items[o].loose=!0;return i}}html(t){const e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(t){const e=this.rules.block.def.exec(t);if(e){const n=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:n,raw:e[0],href:r,title:i}}}table(t){const e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;const n=fu(e[1]),r=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
53
- `):[],a={type:"table",raw:e[0],header:[],align:[],rows:[]};if(n.length===r.length){for(const s of r)this.rules.other.tableAlignRight.test(s)?a.align.push("right"):this.rules.other.tableAlignCenter.test(s)?a.align.push("center"):this.rules.other.tableAlignLeft.test(s)?a.align.push("left"):a.align.push(null);for(let s=0;s<n.length;s++)a.header.push({text:n[s],tokens:this.lexer.inline(n[s]),header:!0,align:a.align[s]});for(const s of i)a.rows.push(fu(s,a.header.length).map((u,o)=>({text:u,tokens:this.lexer.inline(u),header:!1,align:a.align[o]})));return a}}lheading(t){const e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){const e=this.rules.block.paragraph.exec(t);if(e){const n=e[1].charAt(e[1].length-1)===`
54
- `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:n,tokens:this.lexer.inline(n)}}}text(t){const e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){const e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){const e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){const e=this.rules.inline.link.exec(t);if(e){const n=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;const a=qn(n.slice(0,-1),"\\");if((n.length-a.length)%2===0)return}else{const a=y1(e[2],"()");if(a===-2)return;if(a>-1){const u=(e[0].indexOf("!")===0?5:4)+e[1].length+a;e[2]=e[2].substring(0,a),e[0]=e[0].substring(0,u).trim(),e[3]=""}}let r=e[2],i="";if(this.options.pedantic){const a=this.rules.other.pedanticHrefTitle.exec(r);a&&(r=a[1],i=a[3])}else i=e[3]?e[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?r=r.slice(1):r=r.slice(1,-1)),hu(e,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){const r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=e[r.toLowerCase()];if(!i){const a=n[0].charAt(0);return{type:"text",raw:a,text:a}}return hu(n,i,n[0],this.lexer,this.rules)}}emStrong(t,e,n=""){let r=this.rules.inline.emStrongLDelim.exec(t);if(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))return;if(!(r[1]||r[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const a=[...r[0]].length-1;let s,u,o=a,l=0;const f=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(f.lastIndex=0,e=e.slice(-1*t.length+a);(r=f.exec(e))!=null;){if(s=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!s)continue;if(u=[...s].length,r[3]||r[4]){o+=u;continue}else if((r[5]||r[6])&&a%3&&!((a+u)%3)){l+=u;continue}if(o-=u,o>0)continue;u=Math.min(u,u+o+l);const c=[...r[0]][0].length,p=t.slice(0,a+r.index+c+u);if(Math.min(a,u)%2){const m=p.slice(1,-1);return{type:"em",raw:p,text:m,tokens:this.lexer.inlineTokens(m)}}const h=p.slice(2,-2);return{type:"strong",raw:p,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(t){const e=this.rules.inline.code.exec(t);if(e){let n=e[2].replace(this.rules.other.newLineCharGlobal," ");const r=this.rules.other.nonSpaceChar.test(n),i=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&i&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:e[0],text:n}}}br(t){const e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){const e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){const e=this.rules.inline.autolink.exec(t);if(e){let n,r;return e[2]==="@"?(n=e[1],r="mailto:"+n):(n=e[1],r=n),{type:"link",raw:e[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let n,r;if(e[2]==="@")n=e[0],r="mailto:"+n;else{let i;do i=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(i!==e[0]);n=e[0],e[1]==="www."?r="http://"+e[0]:r=e[0]}return{type:"link",raw:e[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){const e=this.rules.inline.text.exec(t);if(e){const n=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:n}}}},Ot=class Ia{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||hn,this.options.tokenizer=this.options.tokenizer||new li,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={other:et,block:Hr.normal,inline:Yn.normal};this.options.pedantic?(n.block=Hr.pedantic,n.inline=Yn.pedantic):this.options.gfm&&(n.block=Hr.gfm,this.options.breaks?n.inline=Yn.breaks:n.inline=Yn.gfm),this.tokenizer.rules=n}static get rules(){return{block:Hr,inline:Yn}}static lex(e,n){return new Ia(n).lex(e)}static lexInline(e,n){return new Ia(n).inlineTokens(e)}lex(e){e=e.replace(et.carriageReturn,`
55
- `),this.blockTokens(e,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){const r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,n=[],r=!1){for(this.options.pedantic&&(e=e.replace(et.tabCharGlobal," ").replace(et.spaceLine,""));e;){let i;if(this.options.extensions?.block?.some(s=>(i=s.call({lexer:this},e,n))?(e=e.substring(i.raw.length),n.push(i),!0):!1))continue;if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length);const s=n.at(-1);i.raw.length===1&&s!==void 0?s.raw+=`
56
- `:n.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length);const s=n.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=`
57
- `+i.raw,s.text+=`
58
- `+i.text,this.inlineQueue.at(-1).src=s.text):n.push(i);continue}if(i=this.tokenizer.fences(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.heading(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.hr(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.blockquote(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.list(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.html(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.def(e)){e=e.substring(i.raw.length);const s=n.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=`
59
- `+i.raw,s.text+=`
60
- `+i.raw,this.inlineQueue.at(-1).src=s.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title});continue}if(i=this.tokenizer.table(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.lheading(e)){e=e.substring(i.raw.length),n.push(i);continue}let a=e;if(this.options.extensions?.startBlock){let s=1/0;const u=e.slice(1);let o;this.options.extensions.startBlock.forEach(l=>{o=l.call({lexer:this},u),typeof o=="number"&&o>=0&&(s=Math.min(s,o))}),s<1/0&&s>=0&&(a=e.substring(0,s+1))}if(this.state.top&&(i=this.tokenizer.paragraph(a))){const s=n.at(-1);r&&s?.type==="paragraph"?(s.raw+=`
61
- `+i.raw,s.text+=`
62
- `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):n.push(i),r=a.length!==e.length,e=e.substring(i.raw.length);continue}if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length);const s=n.at(-1);s?.type==="text"?(s.raw+=`
63
- `+i.raw,s.text+=`
64
- `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):n.push(i);continue}if(e){const s="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}inlineTokens(e,n=[]){let r=e,i=null;if(this.tokens.links){const u=Object.keys(this.tokens.links);if(u.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)u.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null;)r=r.slice(0,i.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(i=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)r=r.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let a=!1,s="";for(;e;){a||(s=""),a=!1;let u;if(this.options.extensions?.inline?.some(l=>(u=l.call({lexer:this},e,n))?(e=e.substring(u.raw.length),n.push(u),!0):!1))continue;if(u=this.tokenizer.escape(e)){e=e.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.tag(e)){e=e.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.link(e)){e=e.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(u.raw.length);const l=n.at(-1);u.type==="text"&&l?.type==="text"?(l.raw+=u.raw,l.text+=u.text):n.push(u);continue}if(u=this.tokenizer.emStrong(e,r,s)){e=e.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.codespan(e)){e=e.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.br(e)){e=e.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.del(e)){e=e.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.autolink(e)){e=e.substring(u.raw.length),n.push(u);continue}if(!this.state.inLink&&(u=this.tokenizer.url(e))){e=e.substring(u.raw.length),n.push(u);continue}let o=e;if(this.options.extensions?.startInline){let l=1/0;const f=e.slice(1);let c;this.options.extensions.startInline.forEach(p=>{c=p.call({lexer:this},f),typeof c=="number"&&c>=0&&(l=Math.min(l,c))}),l<1/0&&l>=0&&(o=e.substring(0,l+1))}if(u=this.tokenizer.inlineText(o)){e=e.substring(u.raw.length),u.raw.slice(-1)!=="_"&&(s=u.raw.slice(-1)),a=!0;const l=n.at(-1);l?.type==="text"?(l.raw+=u.raw,l.text+=u.text):n.push(u);continue}if(e){const l="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return n}},ci=class{options;parser;constructor(t){this.options=t||hn}space(t){return""}code({text:t,lang:e,escaped:n}){const r=(e||"").match(et.notSpaceStart)?.[0],i=t.replace(et.endingNewline,"")+`
65
- `;return r?'<pre><code class="language-'+_t(r)+'">'+(n?i:_t(i,!0))+`</code></pre>
66
- `:"<pre><code>"+(n?i:_t(i,!0))+`</code></pre>
67
- `}blockquote({tokens:t}){return`<blockquote>
68
- ${this.parser.parse(t)}</blockquote>
69
- `}html({text:t}){return t}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>
70
- `}hr(t){return`<hr>
71
- `}list(t){const e=t.ordered,n=t.start;let r="";for(let s=0;s<t.items.length;s++){const u=t.items[s];r+=this.listitem(u)}const i=e?"ol":"ul",a=e&&n!==1?' start="'+n+'"':"";return"<"+i+a+`>
72
- `+r+"</"+i+`>
73
- `}listitem(t){let e="";if(t.task){const n=this.checkbox({checked:!!t.checked});t.loose?t.tokens[0]?.type==="paragraph"?(t.tokens[0].text=n+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=n+" "+_t(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):e+=n+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`<li>${e}</li>
74
- `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
75
- `}table(t){let e="",n="";for(let i=0;i<t.header.length;i++)n+=this.tablecell(t.header[i]);e+=this.tablerow({text:n});let r="";for(let i=0;i<t.rows.length;i++){const a=t.rows[i];n="";for(let s=0;s<a.length;s++)n+=this.tablecell(a[s]);r+=this.tablerow({text:n})}return r&&(r=`<tbody>${r}</tbody>`),`<table>
76
- <thead>
77
- `+e+`</thead>
78
- `+r+`</table>
79
- `}tablerow({text:t}){return`<tr>
80
- ${t}</tr>
81
- `}tablecell(t){const e=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>
82
- `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${_t(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:n}){const r=this.parser.parseInline(n),i=du(t);if(i===null)return r;t=i;let a='<a href="'+t+'"';return e&&(a+=' title="'+_t(e)+'"'),a+=">"+r+"</a>",a}image({href:t,title:e,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));const i=du(t);if(i===null)return _t(n);t=i;let a=`<img src="${t}" alt="${n}"`;return e&&(a+=` title="${_t(e)}"`),a+=">",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:_t(t.text)}},bs=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},Lt=class Na{options;renderer;textRenderer;constructor(e){this.options=e||hn,this.options.renderer=this.options.renderer||new ci,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new bs}static parse(e,n){return new Na(n).parse(e)}static parseInline(e,n){return new Na(n).parseInline(e)}parse(e,n=!0){let r="";for(let i=0;i<e.length;i++){const a=e[i];if(this.options.extensions?.renderers?.[a.type]){const u=a,o=this.options.extensions.renderers[u.type].call({parser:this},u);if(o!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(u.type)){r+=o||"";continue}}const s=a;switch(s.type){case"space":{r+=this.renderer.space(s);continue}case"hr":{r+=this.renderer.hr(s);continue}case"heading":{r+=this.renderer.heading(s);continue}case"code":{r+=this.renderer.code(s);continue}case"table":{r+=this.renderer.table(s);continue}case"blockquote":{r+=this.renderer.blockquote(s);continue}case"list":{r+=this.renderer.list(s);continue}case"html":{r+=this.renderer.html(s);continue}case"paragraph":{r+=this.renderer.paragraph(s);continue}case"text":{let u=s,o=this.renderer.text(u);for(;i+1<e.length&&e[i+1].type==="text";)u=e[++i],o+=`
83
- `+this.renderer.text(u);n?r+=this.renderer.paragraph({type:"paragraph",raw:o,text:o,tokens:[{type:"text",raw:o,text:o,escaped:!0}]}):r+=o;continue}default:{const u='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return r}parseInline(e,n=this.renderer){let r="";for(let i=0;i<e.length;i++){const a=e[i];if(this.options.extensions?.renderers?.[a.type]){const u=this.options.extensions.renderers[a.type].call({parser:this},a);if(u!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){r+=u||"";continue}}const s=a;switch(s.type){case"escape":{r+=n.text(s);break}case"html":{r+=n.html(s);break}case"link":{r+=n.link(s);break}case"image":{r+=n.image(s);break}case"strong":{r+=n.strong(s);break}case"em":{r+=n.em(s);break}case"codespan":{r+=n.codespan(s);break}case"br":{r+=n.br(s);break}case"del":{r+=n.del(s);break}case"text":{r+=n.text(s);break}default:{const u='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return r}},Kr=class{options;block;constructor(t){this.options=t||hn}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?Ot.lex:Ot.lexInline}provideParser(){return this.block?Lt.parse:Lt.parseInline}},A1=class{defaults=ls();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Lt;Renderer=ci;TextRenderer=bs;Lexer=Ot;Tokenizer=li;Hooks=Kr;constructor(...t){this.use(...t)}walkTokens(t,e){let n=[];for(const r of t)switch(n=n.concat(e.call(this,r)),r.type){case"table":{const i=r;for(const a of i.header)n=n.concat(this.walkTokens(a.tokens,e));for(const a of i.rows)for(const s of a)n=n.concat(this.walkTokens(s.tokens,e));break}case"list":{const i=r;n=n.concat(this.walkTokens(i.items,e));break}default:{const i=r;this.defaults.extensions?.childTokens?.[i.type]?this.defaults.extensions.childTokens[i.type].forEach(a=>{const s=i[a].flat(1/0);n=n.concat(this.walkTokens(s,e))}):i.tokens&&(n=n.concat(this.walkTokens(i.tokens,e)))}}return n}use(...t){const e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{const r={...n};if(r.async=this.defaults.async||r.async||!1,n.extensions&&(n.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){const a=e.renderers[i.name];a?e.renderers[i.name]=function(...s){let u=i.renderer.apply(this,s);return u===!1&&(u=a.apply(this,s)),u}:e.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const a=e[i.level];a?a.unshift(i.tokenizer):e[i.level]=[i.tokenizer],i.start&&(i.level==="block"?e.startBlock?e.startBlock.push(i.start):e.startBlock=[i.start]:i.level==="inline"&&(e.startInline?e.startInline.push(i.start):e.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(e.childTokens[i.name]=i.childTokens)}),r.extensions=e),n.renderer){const i=this.defaults.renderer||new ci(this.defaults);for(const a in n.renderer){if(!(a in i))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;const s=a,u=n.renderer[s],o=i[s];i[s]=(...l)=>{let f=u.apply(i,l);return f===!1&&(f=o.apply(i,l)),f||""}}r.renderer=i}if(n.tokenizer){const i=this.defaults.tokenizer||new li(this.defaults);for(const a in n.tokenizer){if(!(a in i))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;const s=a,u=n.tokenizer[s],o=i[s];i[s]=(...l)=>{let f=u.apply(i,l);return f===!1&&(f=o.apply(i,l)),f}}r.tokenizer=i}if(n.hooks){const i=this.defaults.hooks||new Kr;for(const a in n.hooks){if(!(a in i))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;const s=a,u=n.hooks[s],o=i[s];Kr.passThroughHooks.has(a)?i[s]=l=>{if(this.defaults.async)return Promise.resolve(u.call(i,l)).then(c=>o.call(i,c));const f=u.call(i,l);return o.call(i,f)}:i[s]=(...l)=>{let f=u.apply(i,l);return f===!1&&(f=o.apply(i,l)),f}}r.hooks=i}if(n.walkTokens){const i=this.defaults.walkTokens,a=n.walkTokens;r.walkTokens=function(s){let u=[];return u.push(a.call(this,s)),i&&(u=u.concat(i.call(this,s))),u}}this.defaults={...this.defaults,...r}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return Ot.lex(t,e??this.defaults)}parser(t,e){return Lt.parse(t,e??this.defaults)}parseMarkdown(t){return(n,r)=>{const i={...r},a={...this.defaults,...i},s=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&i.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));a.hooks&&(a.hooks.options=a,a.hooks.block=t);const u=a.hooks?a.hooks.provideLexer():t?Ot.lex:Ot.lexInline,o=a.hooks?a.hooks.provideParser():t?Lt.parse:Lt.parseInline;if(a.async)return Promise.resolve(a.hooks?a.hooks.preprocess(n):n).then(l=>u(l,a)).then(l=>a.hooks?a.hooks.processAllTokens(l):l).then(l=>a.walkTokens?Promise.all(this.walkTokens(l,a.walkTokens)).then(()=>l):l).then(l=>o(l,a)).then(l=>a.hooks?a.hooks.postprocess(l):l).catch(s);try{a.hooks&&(n=a.hooks.preprocess(n));let l=u(n,a);a.hooks&&(l=a.hooks.processAllTokens(l)),a.walkTokens&&this.walkTokens(l,a.walkTokens);let f=o(l,a);return a.hooks&&(f=a.hooks.postprocess(f)),f}catch(l){return s(l)}}}onError(t,e){return n=>{if(n.message+=`
84
- Please report this to https://github.com/markedjs/marked.`,t){const r="<p>An error occurred:</p><pre>"+_t(n.message+"",!0)+"</pre>";return e?Promise.resolve(r):r}if(e)return Promise.reject(n);throw n}}},on=new A1;function Ae(t,e){return on.parse(t,e)}Ae.options=Ae.setOptions=function(t){return on.setOptions(t),Ae.defaults=on.defaults,jl(Ae.defaults),Ae};Ae.getDefaults=ls;Ae.defaults=hn;Ae.use=function(...t){return on.use(...t),Ae.defaults=on.defaults,jl(Ae.defaults),Ae};Ae.walkTokens=function(t,e){return on.walkTokens(t,e)};Ae.parseInline=on.parseInline;Ae.Parser=Lt;Ae.parser=Lt.parse;Ae.Renderer=ci;Ae.TextRenderer=bs;Ae.Lexer=Ot;Ae.lexer=Ot.lex;Ae.Tokenizer=li;Ae.Hooks=Kr;Ae.parse=Ae;Ae.options;Ae.setOptions;Ae.use;Ae.walkTokens;Ae.parseInline;Lt.parse;Ot.lex;function pu(t){const e=[],n=String(t||"");let r=n.indexOf(","),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const s=n.slice(i,r).trim();(s||!a)&&e.push(s),i=r+1,r=n.indexOf(",",i)}return e}function ec(t,e){const n={};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const C1=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,S1=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,I1={};function mu(t,e){return(I1.jsx?S1:C1).test(t)}const N1=/[ \t\n\f\r]/g;function w1(t){return typeof t=="object"?t.type==="text"?gu(t.value):!1:gu(t)}function gu(t){return t.replace(N1,"")===""}class vr{constructor(e,n,r){this.normal=n,this.property=e,r&&(this.space=r)}}vr.prototype.normal={};vr.prototype.property={};vr.prototype.space=void 0;function tc(t,e){const n={},r={};for(const i of t)Object.assign(n,i.property),Object.assign(r,i.normal);return new vr(n,r,e)}function Er(t){return t.toLowerCase()}class st{constructor(e,n){this.attribute=n,this.property=e}}st.prototype.attribute="";st.prototype.booleanish=!1;st.prototype.boolean=!1;st.prototype.commaOrSpaceSeparated=!1;st.prototype.commaSeparated=!1;st.prototype.defined=!1;st.prototype.mustUseProperty=!1;st.prototype.number=!1;st.prototype.overloadedBoolean=!1;st.prototype.property="";st.prototype.spaceSeparated=!1;st.prototype.space=void 0;let v1=0;const le=pn(),$e=pn(),wa=pn(),Y=pn(),ve=pn(),In=pn(),ot=pn();function pn(){return 2**++v1}const va=Object.freeze(Object.defineProperty({__proto__:null,boolean:le,booleanish:$e,commaOrSpaceSeparated:ot,commaSeparated:In,number:Y,overloadedBoolean:wa,spaceSeparated:ve},Symbol.toStringTag,{value:"Module"})),Gi=Object.keys(va);class Es extends st{constructor(e,n,r,i){let a=-1;if(super(e,n),bu(this,"space",i),typeof r=="number")for(;++a<Gi.length;){const s=Gi[a];bu(this,Gi[a],(r&va[s])===va[s])}}}Es.prototype.defined=!0;function bu(t,e,n){n&&(t[e]=n)}function Pn(t){const e={},n={};for(const[r,i]of Object.entries(t.properties)){const a=new Es(r,t.transform(t.attributes||{},r),i,t.space);t.mustUseProperty&&t.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),e[r]=a,n[Er(r)]=r,n[Er(a.attribute)]=r}return new vr(e,n,t.space)}const nc=Pn({properties:{ariaActiveDescendant:null,ariaAtomic:$e,ariaAutoComplete:null,ariaBusy:$e,ariaChecked:$e,ariaColCount:Y,ariaColIndex:Y,ariaColSpan:Y,ariaControls:ve,ariaCurrent:null,ariaDescribedBy:ve,ariaDetails:null,ariaDisabled:$e,ariaDropEffect:ve,ariaErrorMessage:null,ariaExpanded:$e,ariaFlowTo:ve,ariaGrabbed:$e,ariaHasPopup:null,ariaHidden:$e,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ve,ariaLevel:Y,ariaLive:null,ariaModal:$e,ariaMultiLine:$e,ariaMultiSelectable:$e,ariaOrientation:null,ariaOwns:ve,ariaPlaceholder:null,ariaPosInSet:Y,ariaPressed:$e,ariaReadOnly:$e,ariaRelevant:null,ariaRequired:$e,ariaRoleDescription:ve,ariaRowCount:Y,ariaRowIndex:Y,ariaRowSpan:Y,ariaSelected:$e,ariaSetSize:Y,ariaSort:null,ariaValueMax:Y,ariaValueMin:Y,ariaValueNow:Y,ariaValueText:null,role:null},transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function rc(t,e){return e in t?t[e]:e}function ic(t,e){return rc(t,e.toLowerCase())}const R1=Pn({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:In,acceptCharset:ve,accessKey:ve,action:null,allow:null,allowFullScreen:le,allowPaymentRequest:le,allowUserMedia:le,alt:null,as:null,async:le,autoCapitalize:null,autoComplete:ve,autoFocus:le,autoPlay:le,blocking:ve,capture:null,charSet:null,checked:le,cite:null,className:ve,cols:Y,colSpan:null,content:null,contentEditable:$e,controls:le,controlsList:ve,coords:Y|In,crossOrigin:null,data:null,dateTime:null,decoding:null,default:le,defer:le,dir:null,dirName:null,disabled:le,download:wa,draggable:$e,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:le,formTarget:null,headers:ve,height:Y,hidden:wa,high:Y,href:null,hrefLang:null,htmlFor:ve,httpEquiv:ve,id:null,imageSizes:null,imageSrcSet:null,inert:le,inputMode:null,integrity:null,is:null,isMap:le,itemId:null,itemProp:ve,itemRef:ve,itemScope:le,itemType:ve,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:le,low:Y,manifest:null,max:null,maxLength:Y,media:null,method:null,min:null,minLength:Y,multiple:le,muted:le,name:null,nonce:null,noModule:le,noValidate:le,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:le,optimum:Y,pattern:null,ping:ve,placeholder:null,playsInline:le,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:le,referrerPolicy:null,rel:ve,required:le,reversed:le,rows:Y,rowSpan:Y,sandbox:ve,scope:null,scoped:le,seamless:le,selected:le,shadowRootClonable:le,shadowRootDelegatesFocus:le,shadowRootMode:null,shape:null,size:Y,sizes:null,slot:null,span:Y,spellCheck:$e,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Y,step:null,style:null,tabIndex:Y,target:null,title:null,translate:null,type:null,typeMustMatch:le,useMap:null,value:$e,width:Y,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ve,axis:null,background:null,bgColor:null,border:Y,borderColor:null,bottomMargin:Y,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:le,declare:le,event:null,face:null,frame:null,frameBorder:null,hSpace:Y,leftMargin:Y,link:null,longDesc:null,lowSrc:null,marginHeight:Y,marginWidth:Y,noResize:le,noHref:le,noShade:le,noWrap:le,object:null,profile:null,prompt:null,rev:null,rightMargin:Y,rules:null,scheme:null,scrolling:$e,standby:null,summary:null,text:null,topMargin:Y,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Y,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:le,disableRemotePlayback:le,prefix:null,property:null,results:Y,security:null,unselectable:null},space:"html",transform:ic}),O1=Pn({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:ot,accentHeight:Y,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Y,amplitude:Y,arabicForm:null,ascent:Y,attributeName:null,attributeType:null,azimuth:Y,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Y,by:null,calcMode:null,capHeight:Y,className:ve,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:Y,diffuseConstant:Y,direction:null,display:null,dur:null,divisor:Y,dominantBaseline:null,download:le,dx:null,dy:null,edgeMode:null,editable:null,elevation:Y,enableBackground:null,end:null,event:null,exponent:Y,externalResourcesRequired:null,fill:null,fillOpacity:Y,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:In,g2:In,glyphName:In,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Y,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Y,horizOriginX:Y,horizOriginY:Y,id:null,ideographic:Y,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Y,k:Y,k1:Y,k2:Y,k3:Y,k4:Y,kernelMatrix:ot,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Y,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Y,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:Y,overlineThickness:Y,paintOrder:null,panose1:null,path:null,pathLength:Y,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ve,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Y,pointsAtY:Y,pointsAtZ:Y,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ot,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ot,rev:ot,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ot,requiredFeatures:ot,requiredFonts:ot,requiredFormats:ot,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:Y,specularExponent:Y,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Y,strikethroughThickness:Y,string:null,stroke:null,strokeDashArray:ot,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Y,strokeOpacity:Y,strokeWidth:null,style:null,surfaceScale:Y,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ot,tabIndex:Y,tableValues:null,target:null,targetX:Y,targetY:Y,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ot,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Y,underlineThickness:Y,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Y,values:null,vAlphabetic:Y,vMathematical:Y,vectorEffect:null,vHanging:Y,vIdeographic:Y,version:null,vertAdvY:Y,vertOriginX:Y,vertOriginY:Y,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Y,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:rc}),ac=Pn({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,e){return"xlink:"+e.slice(5).toLowerCase()}}),sc=Pn({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:ic}),uc=Pn({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()}}),L1={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"},D1=/[A-Z]/g,Eu=/-[a-z]/g,P1=/^data[-\w.:]+$/i;function Ii(t,e){const n=Er(e);let r=e,i=st;if(n in t.normal)return t.property[t.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&P1.test(e)){if(e.charAt(4)==="-"){const a=e.slice(5).replace(Eu,B1);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=e.slice(4);if(!Eu.test(a)){let s=a.replace(D1,M1);s.charAt(0)!=="-"&&(s="-"+s),e="data"+s}}i=Es}return new i(r,e)}function M1(t){return"-"+t.toLowerCase()}function B1(t){return t.charAt(1).toUpperCase()}const Rr=tc([nc,R1,ac,sc,uc],"html"),qt=tc([nc,O1,ac,sc,uc],"svg");function Tu(t){const e=String(t||"").trim();return e?e.split(/[ \t\n\r\f]+/g):[]}function oc(t){return t.join(" ").trim()}var En={},Qi,xu;function F1(){if(xu)return Qi;xu=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,e=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,u=/^\s+|\s+$/g,o=`
85
- `,l="/",f="*",c="",p="comment",h="declaration";function m(x,T){if(typeof x!="string")throw new TypeError("First argument must be a string");if(!x)return[];T=T||{};var k=1,g=1;function N(Z){var z=Z.match(e);z&&(k+=z.length);var Q=Z.lastIndexOf(o);g=~Q?Z.length-Q:g+Z.length}function v(){var Z={line:k,column:g};return function(z){return z.position=new C(Z),U(),z}}function C(Z){this.start=Z,this.end={line:k,column:g},this.source=T.source}C.prototype.content=x;function R(Z){var z=new Error(T.source+":"+k+":"+g+": "+Z);if(z.reason=Z,z.filename=T.source,z.line=k,z.column=g,z.source=x,!T.silent)throw z}function M(Z){var z=Z.exec(x);if(z){var Q=z[0];return N(Q),x=x.slice(Q.length),z}}function U(){M(n)}function w(Z){var z;for(Z=Z||[];z=P();)z!==!1&&Z.push(z);return Z}function P(){var Z=v();if(!(l!=x.charAt(0)||f!=x.charAt(1))){for(var z=2;c!=x.charAt(z)&&(f!=x.charAt(z)||l!=x.charAt(z+1));)++z;if(z+=2,c===x.charAt(z-1))return R("End of comment missing");var Q=x.slice(2,z-2);return g+=2,N(Q),x=x.slice(z),g+=2,Z({type:p,comment:Q})}}function H(){var Z=v(),z=M(r);if(z){if(P(),!M(i))return R("property missing ':'");var Q=M(a),ae=Z({type:h,property:b(z[0].replace(t,c)),value:Q?b(Q[0].replace(t,c)):c});return M(s),ae}}function te(){var Z=[];w(Z);for(var z;z=H();)z!==!1&&(Z.push(z),w(Z));return Z}return U(),te()}function b(x){return x?x.replace(u,c):c}return Qi=m,Qi}var _u;function z1(){if(_u)return En;_u=1;var t=En&&En.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(En,"__esModule",{value:!0}),En.default=n;const e=t(F1());function n(r,i){let a=null;if(!r||typeof r!="string")return a;const s=(0,e.default)(r),u=typeof i=="function";return s.forEach(o=>{if(o.type!=="declaration")return;const{property:l,value:f}=o;u?i(l,f,o):f&&(a=a||{},a[l]=f)}),a}return En}var Vn={},yu;function U1(){if(yu)return Vn;yu=1,Object.defineProperty(Vn,"__esModule",{value:!0}),Vn.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,e=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,a=function(l){return!l||n.test(l)||t.test(l)},s=function(l,f){return f.toUpperCase()},u=function(l,f){return"".concat(f,"-")},o=function(l,f){return f===void 0&&(f={}),a(l)?l:(l=l.toLowerCase(),f.reactCompat?l=l.replace(i,u):l=l.replace(r,u),l.replace(e,s))};return Vn.camelCase=o,Vn}var Wn,ku;function H1(){if(ku)return Wn;ku=1;var t=Wn&&Wn.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},e=t(z1()),n=U1();function r(i,a){var s={};return!i||typeof i!="string"||(0,e.default)(i,function(u,o){u&&o&&(s[(0,n.camelCase)(u,a)]=o)}),s}return r.default=r,Wn=r,Wn}var $1=H1();const j1=is($1),Ni=lc("end"),St=lc("start");function lc(t){return e;function e(n){const r=n&&n.position&&n.position[t]||{};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 Z1(t){const e=St(t),n=Ni(t);if(e&&n)return{start:e,end:n}}function or(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?Au(t.position):"start"in t||"end"in t?Au(t):"line"in t||"column"in t?Ra(t):""}function Ra(t){return Cu(t&&t.line)+":"+Cu(t&&t.column)}function Au(t){return Ra(t&&t.start)+"-"+Ra(t&&t.end)}function Cu(t){return t&&typeof t=="number"?t:1}class Ge extends Error{constructor(e,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",a={},s=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof e=="string"?i=e:!a.cause&&e&&(s=!0,i=e.message,a.cause=e),!a.ruleId&&!a.source&&typeof r=="string"){const o=r.indexOf(":");o===-1?a.ruleId=r:(a.source=r.slice(0,o),a.ruleId=r.slice(o+1))}if(!a.place&&a.ancestors&&a.ancestors){const o=a.ancestors[a.ancestors.length-1];o&&(a.place=o.position)}const u=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=u?u.line:void 0,this.name=or(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=s&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Ge.prototype.file="";Ge.prototype.name="";Ge.prototype.reason="";Ge.prototype.message="";Ge.prototype.stack="";Ge.prototype.column=void 0;Ge.prototype.line=void 0;Ge.prototype.ancestors=void 0;Ge.prototype.cause=void 0;Ge.prototype.fatal=void 0;Ge.prototype.place=void 0;Ge.prototype.ruleId=void 0;Ge.prototype.source=void 0;const Ts={}.hasOwnProperty,Y1=new Map,q1=/[A-Z]/g,V1=new Set(["table","tbody","thead","tfoot","tr"]),W1=new Set(["td","th"]),cc="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function G1(t,e){if(!e||e.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=e.filePath||void 0;let r;if(e.development){if(typeof e.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=rg(n,e.jsxDEV)}else{if(typeof e.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof e.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=ng(n,e.jsx,e.jsxs)}const i={Fragment:e.Fragment,ancestors:[],components:e.components||{},create:r,elementAttributeNameCase:e.elementAttributeNameCase||"react",evaluater:e.createEvaluater?e.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:e.ignoreInvalidStyle||!1,passKeys:e.passKeys!==!1,passNode:e.passNode||!1,schema:e.space==="svg"?qt:Rr,stylePropertyNameCase:e.stylePropertyNameCase||"dom",tableCellAlignToStyle:e.tableCellAlignToStyle!==!1},a=dc(i,t,void 0);return a&&typeof a!="string"?a:i.create(t,i.Fragment,{children:a||void 0},void 0)}function dc(t,e,n){if(e.type==="element")return Q1(t,e,n);if(e.type==="mdxFlowExpression"||e.type==="mdxTextExpression")return K1(t,e);if(e.type==="mdxJsxFlowElement"||e.type==="mdxJsxTextElement")return J1(t,e,n);if(e.type==="mdxjsEsm")return X1(t,e);if(e.type==="root")return eg(t,e,n);if(e.type==="text")return tg(t,e)}function Q1(t,e,n){const r=t.schema;let i=r;e.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=qt,t.schema=i),t.ancestors.push(e);const a=hc(t,e.tagName,!1),s=ig(t,e);let u=_s(t,e);return V1.has(e.tagName)&&(u=u.filter(function(o){return typeof o=="string"?!w1(o):!0})),fc(t,s,a,e),xs(s,u),t.ancestors.pop(),t.schema=r,t.create(e,a,s,n)}function K1(t,e){if(e.data&&e.data.estree&&t.evaluater){const r=e.data.estree.body[0];return r.type,t.evaluater.evaluateExpression(r.expression)}Tr(t,e.position)}function X1(t,e){if(e.data&&e.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(e.data.estree);Tr(t,e.position)}function J1(t,e,n){const r=t.schema;let i=r;e.name==="svg"&&r.space==="html"&&(i=qt,t.schema=i),t.ancestors.push(e);const a=e.name===null?t.Fragment:hc(t,e.name,!0),s=ag(t,e),u=_s(t,e);return fc(t,s,a,e),xs(s,u),t.ancestors.pop(),t.schema=r,t.create(e,a,s,n)}function eg(t,e,n){const r={};return xs(r,_s(t,e)),t.create(e,t.Fragment,r,n)}function tg(t,e){return e.value}function fc(t,e,n,r){typeof n!="string"&&n!==t.Fragment&&t.passNode&&(e.node=r)}function xs(t,e){if(e.length>0){const n=e.length>1?e:e[0];n&&(t.children=n)}}function ng(t,e,n){return r;function r(i,a,s,u){const l=Array.isArray(s.children)?n:e;return u?l(a,s,u):l(a,s)}}function rg(t,e){return n;function n(r,i,a,s){const u=Array.isArray(a.children),o=St(r);return e(i,a,s,u,{columnNumber:o?o.column-1:void 0,fileName:t,lineNumber:o?o.line:void 0},void 0)}}function ig(t,e){const n={};let r,i;for(i in e.properties)if(i!=="children"&&Ts.call(e.properties,i)){const a=sg(t,i,e.properties[i]);if(a){const[s,u]=a;t.tableCellAlignToStyle&&s==="align"&&typeof u=="string"&&W1.has(e.tagName)?r=u:n[s]=u}}if(r){const a=n.style||(n.style={});a[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function ag(t,e){const n={};for(const r of e.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&t.evaluater){const a=r.data.estree.body[0];a.type;const s=a.expression;s.type;const u=s.properties[0];u.type,Object.assign(n,t.evaluater.evaluateExpression(u.argument))}else Tr(t,e.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&t.evaluater){const u=r.value.data.estree.body[0];u.type,a=t.evaluater.evaluateExpression(u.expression)}else Tr(t,e.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function _s(t,e){const n=[];let r=-1;const i=t.passKeys?new Map:Y1;for(;++r<e.children.length;){const a=e.children[r];let s;if(t.passKeys){const o=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(o){const l=i.get(o)||0;s=o+"-"+l,i.set(o,l+1)}}const u=dc(t,a,s);u!==void 0&&n.push(u)}return n}function sg(t,e,n){const r=Ii(t.schema,e);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?ec(n):oc(n)),r.property==="style"){let i=typeof n=="object"?n:ug(t,String(n));return t.stylePropertyNameCase==="css"&&(i=og(i)),["style",i]}return[t.elementAttributeNameCase==="react"&&r.space?L1[r.property]||r.property:r.attribute,n]}}function ug(t,e){try{return j1(e,{reactCompat:!0})}catch(n){if(t.ignoreInvalidStyle)return{};const r=n,i=new Ge("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=t.filePath||void 0,i.url=cc+"#cannot-parse-style-attribute",i}}function hc(t,e,n){let r;if(!n)r={type:"Literal",value:e};else if(e.includes(".")){const i=e.split(".");let a=-1,s;for(;++a<i.length;){const u=mu(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};s=s?{type:"MemberExpression",object:s,property:u,computed:!!(a&&u.type==="Literal"),optional:!1}:u}r=s}else r=mu(e)&&!/^[a-z]/.test(e)?{type:"Identifier",name:e}:{type:"Literal",value:e};if(r.type==="Literal"){const i=r.value;return Ts.call(t.components,i)?t.components[i]:i}if(t.evaluater)return t.evaluater.evaluateExpression(r);Tr(t)}function Tr(t,e){const n=new Ge("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:e,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=t.filePath||void 0,n.url=cc+"#cannot-handle-mdx-estrees-without-createevaluater",n}function og(t){const e={};let n;for(n in t)Ts.call(t,n)&&(e[lg(n)]=t[n]);return e}function lg(t){let e=t.replace(q1,cg);return e.slice(0,3)==="ms-"&&(e="-"+e),e}function cg(t){return"-"+t.toLowerCase()}const Ki={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"]},dg={};function ys(t,e){const n=dg,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return pc(t,r,i)}function pc(t,e,n){if(fg(t)){if("value"in t)return t.type==="html"&&!n?"":t.value;if(e&&"alt"in t&&t.alt)return t.alt;if("children"in t)return Su(t.children,e,n)}return Array.isArray(t)?Su(t,e,n):""}function Su(t,e,n){const r=[];let i=-1;for(;++i<t.length;)r[i]=pc(t[i],e,n);return r.join("")}function fg(t){return!!(t&&typeof t=="object")}const Iu=document.createElement("i");function ks(t){const e="&"+t+";";Iu.innerHTML=e;const n=Iu.textContent;return n.charCodeAt(n.length-1)===59&&t!=="semi"||n===e?!1:n}function ct(t,e,n,r){const i=t.length;let a=0,s;if(e<0?e=-e>i?0:i+e:e=e>i?i:e,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(e,n),t.splice(...s);else for(n&&t.splice(e,n);a<r.length;)s=r.slice(a,a+1e4),s.unshift(e,0),t.splice(...s),a+=1e4,e+=1e4}function ht(t,e){return t.length>0?(ct(t,t.length,0,e),t):e}const Nu={}.hasOwnProperty;function mc(t){const e={};let n=-1;for(;++n<t.length;)hg(e,t[n]);return e}function hg(t,e){let n;for(n in e){const i=(Nu.call(t,n)?t[n]:void 0)||(t[n]={}),a=e[n];let s;if(a)for(s in a){Nu.call(i,s)||(i[s]=[]);const u=a[s];pg(i[s],Array.isArray(u)?u:u?[u]:[])}}}function pg(t,e){let n=-1;const r=[];for(;++n<e.length;)(e[n].add==="after"?t:r).push(e[n]);ct(t,0,0,r)}function gc(t,e){const n=Number.parseInt(t,e);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 Et(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Je=Vt(/[A-Za-z]/),We=Vt(/[\dA-Za-z]/),mg=Vt(/[#-'*+\--9=?A-Z^-~]/);function di(t){return t!==null&&(t<32||t===127)}const Oa=Vt(/\d/),gg=Vt(/[\dA-Fa-f]/),bg=Vt(/[!-/:-@[-`{-~]/);function re(t){return t!==null&&t<-2}function we(t){return t!==null&&(t<0||t===32)}function he(t){return t===-2||t===-1||t===32}const wi=Vt(new RegExp("\\p{P}|\\p{S}","u")),ln=Vt(/\s/);function Vt(t){return e;function e(n){return n!==null&&n>-1&&t.test(String.fromCharCode(n))}}function Mn(t){const e=[];let n=-1,r=0,i=0;for(;++n<t.length;){const a=t.charCodeAt(n);let s="";if(a===37&&We(t.charCodeAt(n+1))&&We(t.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(s=String.fromCharCode(a));else if(a>55295&&a<57344){const u=t.charCodeAt(n+1);a<56320&&u>56319&&u<57344?(s=String.fromCharCode(a,u),i=1):s="�"}else s=String.fromCharCode(a);s&&(e.push(t.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return e.join("")+t.slice(r)}function be(t,e,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return s;function s(o){return he(o)?(t.enter(n),u(o)):e(o)}function u(o){return he(o)&&a++<i?(t.consume(o),u):(t.exit(n),e(o))}}const Eg={tokenize:Tg};function Tg(t){const e=t.attempt(this.parser.constructs.contentInitial,r,i);let n;return e;function r(u){if(u===null){t.consume(u);return}return t.enter("lineEnding"),t.consume(u),t.exit("lineEnding"),be(t,e,"linePrefix")}function i(u){return t.enter("paragraph"),a(u)}function a(u){const o=t.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=o),n=o,s(u)}function s(u){if(u===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(u);return}return re(u)?(t.consume(u),t.exit("chunkText"),a):(t.consume(u),s)}}const xg={tokenize:_g},wu={tokenize:yg};function _g(t){const e=this,n=[];let r=0,i,a,s;return u;function u(g){if(r<n.length){const N=n[r];return e.containerState=N[1],t.attempt(N[0].continuation,o,l)(g)}return l(g)}function o(g){if(r++,e.containerState._closeFlow){e.containerState._closeFlow=void 0,i&&k();const N=e.events.length;let v=N,C;for(;v--;)if(e.events[v][0]==="exit"&&e.events[v][1].type==="chunkFlow"){C=e.events[v][1].end;break}T(r);let R=N;for(;R<e.events.length;)e.events[R][1].end={...C},R++;return ct(e.events,v+1,0,e.events.slice(N)),e.events.length=R,l(g)}return u(g)}function l(g){if(r===n.length){if(!i)return p(g);if(i.currentConstruct&&i.currentConstruct.concrete)return m(g);e.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return e.containerState={},t.check(wu,f,c)(g)}function f(g){return i&&k(),T(r),p(g)}function c(g){return e.parser.lazy[e.now().line]=r!==n.length,s=e.now().offset,m(g)}function p(g){return e.containerState={},t.attempt(wu,h,m)(g)}function h(g){return r++,n.push([e.currentConstruct,e.containerState]),p(g)}function m(g){if(g===null){i&&k(),T(0),t.consume(g);return}return i=i||e.parser.flow(e.now()),t.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),b(g)}function b(g){if(g===null){x(t.exit("chunkFlow"),!0),T(0),t.consume(g);return}return re(g)?(t.consume(g),x(t.exit("chunkFlow")),r=0,e.interrupt=void 0,u):(t.consume(g),b)}function x(g,N){const v=e.sliceStream(g);if(N&&v.push(null),g.previous=a,a&&(a.next=g),a=g,i.defineSkip(g.start),i.write(v),e.parser.lazy[g.start.line]){let C=i.events.length;for(;C--;)if(i.events[C][1].start.offset<s&&(!i.events[C][1].end||i.events[C][1].end.offset>s))return;const R=e.events.length;let M=R,U,w;for(;M--;)if(e.events[M][0]==="exit"&&e.events[M][1].type==="chunkFlow"){if(U){w=e.events[M][1].end;break}U=!0}for(T(r),C=R;C<e.events.length;)e.events[C][1].end={...w},C++;ct(e.events,M+1,0,e.events.slice(R)),e.events.length=C}}function T(g){let N=n.length;for(;N-- >g;){const v=n[N];e.containerState=v[1],v[0].exit.call(e,t)}n.length=g}function k(){i.write([null]),a=void 0,i=void 0,e.containerState._closeFlow=void 0}}function yg(t,e,n){return be(t,t.attempt(this.parser.constructs.document,e,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function wn(t){if(t===null||we(t)||ln(t))return 1;if(wi(t))return 2}function vi(t,e,n){const r=[];let i=-1;for(;++i<t.length;){const a=t[i].resolveAll;a&&!r.includes(a)&&(e=a(e,n),r.push(a))}return e}const La={name:"attention",resolveAll:kg,tokenize:Ag};function kg(t,e){let n=-1,r,i,a,s,u,o,l,f;for(;++n<t.length;)if(t[n][0]==="enter"&&t[n][1].type==="attentionSequence"&&t[n][1]._close){for(r=n;r--;)if(t[r][0]==="exit"&&t[r][1].type==="attentionSequence"&&t[r][1]._open&&e.sliceSerialize(t[r][1]).charCodeAt(0)===e.sliceSerialize(t[n][1]).charCodeAt(0)){if((t[r][1]._close||t[n][1]._open)&&(t[n][1].end.offset-t[n][1].start.offset)%3&&!((t[r][1].end.offset-t[r][1].start.offset+t[n][1].end.offset-t[n][1].start.offset)%3))continue;o=t[r][1].end.offset-t[r][1].start.offset>1&&t[n][1].end.offset-t[n][1].start.offset>1?2:1;const c={...t[r][1].end},p={...t[n][1].start};vu(c,-o),vu(p,o),s={type:o>1?"strongSequence":"emphasisSequence",start:c,end:{...t[r][1].end}},u={type:o>1?"strongSequence":"emphasisSequence",start:{...t[n][1].start},end:p},a={type:o>1?"strongText":"emphasisText",start:{...t[r][1].end},end:{...t[n][1].start}},i={type:o>1?"strong":"emphasis",start:{...s.start},end:{...u.end}},t[r][1].end={...s.start},t[n][1].start={...u.end},l=[],t[r][1].end.offset-t[r][1].start.offset&&(l=ht(l,[["enter",t[r][1],e],["exit",t[r][1],e]])),l=ht(l,[["enter",i,e],["enter",s,e],["exit",s,e],["enter",a,e]]),l=ht(l,vi(e.parser.constructs.insideSpan.null,t.slice(r+1,n),e)),l=ht(l,[["exit",a,e],["enter",u,e],["exit",u,e],["exit",i,e]]),t[n][1].end.offset-t[n][1].start.offset?(f=2,l=ht(l,[["enter",t[n][1],e],["exit",t[n][1],e]])):f=0,ct(t,r-1,n-r+3,l),n=r+l.length-f-2;break}}for(n=-1;++n<t.length;)t[n][1].type==="attentionSequence"&&(t[n][1].type="data");return t}function Ag(t,e){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=wn(r);let a;return s;function s(o){return a=o,t.enter("attentionSequence"),u(o)}function u(o){if(o===a)return t.consume(o),u;const l=t.exit("attentionSequence"),f=wn(o),c=!f||f===2&&i||n.includes(o),p=!i||i===2&&f||n.includes(r);return l._open=!!(a===42?c:c&&(i||!p)),l._close=!!(a===42?p:p&&(f||!c)),e(o)}}function vu(t,e){t.column+=e,t.offset+=e,t._bufferIndex+=e}const Cg={name:"autolink",tokenize:Sg};function Sg(t,e,n){let r=0;return i;function i(h){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(h),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),a}function a(h){return Je(h)?(t.consume(h),s):h===64?n(h):l(h)}function s(h){return h===43||h===45||h===46||We(h)?(r=1,u(h)):l(h)}function u(h){return h===58?(t.consume(h),r=0,o):(h===43||h===45||h===46||We(h))&&r++<32?(t.consume(h),u):(r=0,l(h))}function o(h){return h===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(h),t.exit("autolinkMarker"),t.exit("autolink"),e):h===null||h===32||h===60||di(h)?n(h):(t.consume(h),o)}function l(h){return h===64?(t.consume(h),f):mg(h)?(t.consume(h),l):n(h)}function f(h){return We(h)?c(h):n(h)}function c(h){return h===46?(t.consume(h),r=0,f):h===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(h),t.exit("autolinkMarker"),t.exit("autolink"),e):p(h)}function p(h){if((h===45||We(h))&&r++<63){const m=h===45?p:c;return t.consume(h),m}return n(h)}}const Or={partial:!0,tokenize:Ig};function Ig(t,e,n){return r;function r(a){return he(a)?be(t,i,"linePrefix")(a):i(a)}function i(a){return a===null||re(a)?e(a):n(a)}}const bc={continuation:{tokenize:wg},exit:vg,name:"blockQuote",tokenize:Ng};function Ng(t,e,n){const r=this;return i;function i(s){if(s===62){const u=r.containerState;return u.open||(t.enter("blockQuote",{_container:!0}),u.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(s),t.exit("blockQuoteMarker"),a}return n(s)}function a(s){return he(s)?(t.enter("blockQuotePrefixWhitespace"),t.consume(s),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),e):(t.exit("blockQuotePrefix"),e(s))}}function wg(t,e,n){const r=this;return i;function i(s){return he(s)?be(t,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):a(s)}function a(s){return t.attempt(bc,e,n)(s)}}function vg(t){t.exit("blockQuote")}const Ec={name:"characterEscape",tokenize:Rg};function Rg(t,e,n){return r;function r(a){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(a),t.exit("escapeMarker"),i}function i(a){return bg(a)?(t.enter("characterEscapeValue"),t.consume(a),t.exit("characterEscapeValue"),t.exit("characterEscape"),e):n(a)}}const Tc={name:"characterReference",tokenize:Og};function Og(t,e,n){const r=this;let i=0,a,s;return u;function u(c){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(c),t.exit("characterReferenceMarker"),o}function o(c){return c===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(c),t.exit("characterReferenceMarkerNumeric"),l):(t.enter("characterReferenceValue"),a=31,s=We,f(c))}function l(c){return c===88||c===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(c),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),a=6,s=gg,f):(t.enter("characterReferenceValue"),a=7,s=Oa,f(c))}function f(c){if(c===59&&i){const p=t.exit("characterReferenceValue");return s===We&&!ks(r.sliceSerialize(p))?n(c):(t.enter("characterReferenceMarker"),t.consume(c),t.exit("characterReferenceMarker"),t.exit("characterReference"),e)}return s(c)&&i++<a?(t.consume(c),f):n(c)}}const Ru={partial:!0,tokenize:Dg},Ou={concrete:!0,name:"codeFenced",tokenize:Lg};function Lg(t,e,n){const r=this,i={partial:!0,tokenize:v};let a=0,s=0,u;return o;function o(C){return l(C)}function l(C){const R=r.events[r.events.length-1];return a=R&&R[1].type==="linePrefix"?R[2].sliceSerialize(R[1],!0).length:0,u=C,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),f(C)}function f(C){return C===u?(s++,t.consume(C),f):s<3?n(C):(t.exit("codeFencedFenceSequence"),he(C)?be(t,c,"whitespace")(C):c(C))}function c(C){return C===null||re(C)?(t.exit("codeFencedFence"),r.interrupt?e(C):t.check(Ru,b,N)(C)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),p(C))}function p(C){return C===null||re(C)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),c(C)):he(C)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),be(t,h,"whitespace")(C)):C===96&&C===u?n(C):(t.consume(C),p)}function h(C){return C===null||re(C)?c(C):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),m(C))}function m(C){return C===null||re(C)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),c(C)):C===96&&C===u?n(C):(t.consume(C),m)}function b(C){return t.attempt(i,N,x)(C)}function x(C){return t.enter("lineEnding"),t.consume(C),t.exit("lineEnding"),T}function T(C){return a>0&&he(C)?be(t,k,"linePrefix",a+1)(C):k(C)}function k(C){return C===null||re(C)?t.check(Ru,b,N)(C):(t.enter("codeFlowValue"),g(C))}function g(C){return C===null||re(C)?(t.exit("codeFlowValue"),k(C)):(t.consume(C),g)}function N(C){return t.exit("codeFenced"),e(C)}function v(C,R,M){let U=0;return w;function w(z){return C.enter("lineEnding"),C.consume(z),C.exit("lineEnding"),P}function P(z){return C.enter("codeFencedFence"),he(z)?be(C,H,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):H(z)}function H(z){return z===u?(C.enter("codeFencedFenceSequence"),te(z)):M(z)}function te(z){return z===u?(U++,C.consume(z),te):U>=s?(C.exit("codeFencedFenceSequence"),he(z)?be(C,Z,"whitespace")(z):Z(z)):M(z)}function Z(z){return z===null||re(z)?(C.exit("codeFencedFence"),R(z)):M(z)}}}function Dg(t,e,n){const r=this;return i;function i(s){return s===null?n(s):(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),a)}function a(s){return r.parser.lazy[r.now().line]?n(s):e(s)}}const Xi={name:"codeIndented",tokenize:Mg},Pg={partial:!0,tokenize:Bg};function Mg(t,e,n){const r=this;return i;function i(l){return t.enter("codeIndented"),be(t,a,"linePrefix",5)(l)}function a(l){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?s(l):n(l)}function s(l){return l===null?o(l):re(l)?t.attempt(Pg,s,o)(l):(t.enter("codeFlowValue"),u(l))}function u(l){return l===null||re(l)?(t.exit("codeFlowValue"),s(l)):(t.consume(l),u)}function o(l){return t.exit("codeIndented"),e(l)}}function Bg(t,e,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):re(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),i):be(t,a,"linePrefix",5)(s)}function a(s){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?e(s):re(s)?i(s):n(s)}}const Fg={name:"codeText",previous:Ug,resolve:zg,tokenize:Hg};function zg(t){let e=t.length-4,n=3,r,i;if((t[n][1].type==="lineEnding"||t[n][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(r=n;++r<e;)if(t[r][1].type==="codeTextData"){t[n][1].type="codeTextPadding",t[e][1].type="codeTextPadding",n+=2,e-=2;break}}for(r=n-1,e++;++r<=e;)i===void 0?r!==e&&t[r][1].type!=="lineEnding"&&(i=r):(r===e||t[r][1].type==="lineEnding")&&(t[i][1].type="codeTextData",r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),e-=r-i-2,r=i+2),i=void 0);return t}function Ug(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Hg(t,e,n){let r=0,i,a;return s;function s(c){return t.enter("codeText"),t.enter("codeTextSequence"),u(c)}function u(c){return c===96?(t.consume(c),r++,u):(t.exit("codeTextSequence"),o(c))}function o(c){return c===null?n(c):c===32?(t.enter("space"),t.consume(c),t.exit("space"),o):c===96?(a=t.enter("codeTextSequence"),i=0,f(c)):re(c)?(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),o):(t.enter("codeTextData"),l(c))}function l(c){return c===null||c===32||c===96||re(c)?(t.exit("codeTextData"),o(c)):(t.consume(c),l)}function f(c){return c===96?(t.consume(c),i++,f):i===r?(t.exit("codeTextSequence"),t.exit("codeText"),e(c)):(a.type="codeTextData",l(c))}}class $g{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(e,r):e>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(e,n,r){const i=n||0;this.setCursor(Math.trunc(e));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Gn(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),Gn(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Gn(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){const n=this.left.splice(e,Number.POSITIVE_INFINITY);Gn(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);Gn(this.left,n.reverse())}}}function Gn(t,e){let n=0;if(e.length<1e4)t.push(...e);else for(;n<e.length;)t.push(...e.slice(n,n+1e4)),n+=1e4}function xc(t){const e={};let n=-1,r,i,a,s,u,o,l;const f=new $g(t);for(;++n<f.length;){for(;n in e;)n=e[n];if(r=f.get(n),n&&r[1].type==="chunkFlow"&&f.get(n-1)[1].type==="listItemPrefix"&&(o=r[1]._tokenizer.events,a=0,a<o.length&&o[a][1].type==="lineEndingBlank"&&(a+=2),a<o.length&&o[a][1].type==="content"))for(;++a<o.length&&o[a][1].type!=="content";)o[a][1].type==="chunkText"&&(o[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(e,jg(f,n)),n=e[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(s=f.get(a),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=a);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},u=f.slice(i,n),u.unshift(r),f.splice(i,n-i+1,u))}}return ct(t,0,Number.POSITIVE_INFINITY,f.slice(0)),!l}function jg(t,e){const n=t.get(e)[1],r=t.get(e)[2];let i=e-1;const a=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const u=s.events,o=[],l={};let f,c,p=-1,h=n,m=0,b=0;const x=[b];for(;h;){for(;t.get(++i)[1]!==h;);a.push(i),h._tokenizer||(f=r.sliceStream(h),h.next||f.push(null),c&&s.defineSkip(h.start),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(f),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),c=h,h=h.next}for(h=n;++p<u.length;)u[p][0]==="exit"&&u[p-1][0]==="enter"&&u[p][1].type===u[p-1][1].type&&u[p][1].start.line!==u[p][1].end.line&&(b=p+1,x.push(b),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(s.events=[],h?(h._tokenizer=void 0,h.previous=void 0):x.pop(),p=x.length;p--;){const T=u.slice(x[p],x[p+1]),k=a.pop();o.push([k,k+T.length-1]),t.splice(k,2,T)}for(o.reverse(),p=-1;++p<o.length;)l[m+o[p][0]]=m+o[p][1],m+=o[p][1]-o[p][0]-1;return l}const Zg={resolve:qg,tokenize:Vg},Yg={partial:!0,tokenize:Wg};function qg(t){return xc(t),t}function Vg(t,e){let n;return r;function r(u){return t.enter("content"),n=t.enter("chunkContent",{contentType:"content"}),i(u)}function i(u){return u===null?a(u):re(u)?t.check(Yg,s,a)(u):(t.consume(u),i)}function a(u){return t.exit("chunkContent"),t.exit("content"),e(u)}function s(u){return t.consume(u),t.exit("chunkContent"),n.next=t.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Wg(t,e,n){const r=this;return i;function i(s){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),be(t,a,"linePrefix")}function a(s){if(s===null||re(s))return n(s);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?e(s):t.interrupt(r.parser.constructs.flow,n,e)(s)}}function _c(t,e,n,r,i,a,s,u,o){const l=o||Number.POSITIVE_INFINITY;let f=0;return c;function c(T){return T===60?(t.enter(r),t.enter(i),t.enter(a),t.consume(T),t.exit(a),p):T===null||T===32||T===41||di(T)?n(T):(t.enter(r),t.enter(s),t.enter(u),t.enter("chunkString",{contentType:"string"}),b(T))}function p(T){return T===62?(t.enter(a),t.consume(T),t.exit(a),t.exit(i),t.exit(r),e):(t.enter(u),t.enter("chunkString",{contentType:"string"}),h(T))}function h(T){return T===62?(t.exit("chunkString"),t.exit(u),p(T)):T===null||T===60||re(T)?n(T):(t.consume(T),T===92?m:h)}function m(T){return T===60||T===62||T===92?(t.consume(T),h):h(T)}function b(T){return!f&&(T===null||T===41||we(T))?(t.exit("chunkString"),t.exit(u),t.exit(s),t.exit(r),e(T)):f<l&&T===40?(t.consume(T),f++,b):T===41?(t.consume(T),f--,b):T===null||T===32||T===40||di(T)?n(T):(t.consume(T),T===92?x:b)}function x(T){return T===40||T===41||T===92?(t.consume(T),b):b(T)}}function yc(t,e,n,r,i,a){const s=this;let u=0,o;return l;function l(h){return t.enter(r),t.enter(i),t.consume(h),t.exit(i),t.enter(a),f}function f(h){return u>999||h===null||h===91||h===93&&!o||h===94&&!u&&"_hiddenFootnoteSupport"in s.parser.constructs?n(h):h===93?(t.exit(a),t.enter(i),t.consume(h),t.exit(i),t.exit(r),e):re(h)?(t.enter("lineEnding"),t.consume(h),t.exit("lineEnding"),f):(t.enter("chunkString",{contentType:"string"}),c(h))}function c(h){return h===null||h===91||h===93||re(h)||u++>999?(t.exit("chunkString"),f(h)):(t.consume(h),o||(o=!he(h)),h===92?p:c)}function p(h){return h===91||h===92||h===93?(t.consume(h),u++,c):c(h)}}function kc(t,e,n,r,i,a){let s;return u;function u(p){return p===34||p===39||p===40?(t.enter(r),t.enter(i),t.consume(p),t.exit(i),s=p===40?41:p,o):n(p)}function o(p){return p===s?(t.enter(i),t.consume(p),t.exit(i),t.exit(r),e):(t.enter(a),l(p))}function l(p){return p===s?(t.exit(a),o(s)):p===null?n(p):re(p)?(t.enter("lineEnding"),t.consume(p),t.exit("lineEnding"),be(t,l,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===s||p===null||re(p)?(t.exit("chunkString"),l(p)):(t.consume(p),p===92?c:f)}function c(p){return p===s||p===92?(t.consume(p),f):f(p)}}function lr(t,e){let n;return r;function r(i){return re(i)?(t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),n=!0,r):he(i)?be(t,r,n?"linePrefix":"lineSuffix")(i):e(i)}}const Gg={name:"definition",tokenize:Kg},Qg={partial:!0,tokenize:Xg};function Kg(t,e,n){const r=this;let i;return a;function a(h){return t.enter("definition"),s(h)}function s(h){return yc.call(r,t,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function u(h){return i=Et(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(t.enter("definitionMarker"),t.consume(h),t.exit("definitionMarker"),o):n(h)}function o(h){return we(h)?lr(t,l)(h):l(h)}function l(h){return _c(t,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function f(h){return t.attempt(Qg,c,c)(h)}function c(h){return he(h)?be(t,p,"whitespace")(h):p(h)}function p(h){return h===null||re(h)?(t.exit("definition"),r.parser.defined.push(i),e(h)):n(h)}}function Xg(t,e,n){return r;function r(u){return we(u)?lr(t,i)(u):n(u)}function i(u){return kc(t,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function a(u){return he(u)?be(t,s,"whitespace")(u):s(u)}function s(u){return u===null||re(u)?e(u):n(u)}}const Jg={name:"hardBreakEscape",tokenize:eb};function eb(t,e,n){return r;function r(a){return t.enter("hardBreakEscape"),t.consume(a),i}function i(a){return re(a)?(t.exit("hardBreakEscape"),e(a)):n(a)}}const tb={name:"headingAtx",resolve:nb,tokenize:rb};function nb(t,e){let n=t.length-2,r=3,i,a;return t[r][1].type==="whitespace"&&(r+=2),n-2>r&&t[n][1].type==="whitespace"&&(n-=2),t[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&t[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:t[r][1].start,end:t[n][1].end},a={type:"chunkText",start:t[r][1].start,end:t[n][1].end,contentType:"text"},ct(t,r,n-r+1,[["enter",i,e],["enter",a,e],["exit",a,e],["exit",i,e]])),t}function rb(t,e,n){let r=0;return i;function i(f){return t.enter("atxHeading"),a(f)}function a(f){return t.enter("atxHeadingSequence"),s(f)}function s(f){return f===35&&r++<6?(t.consume(f),s):f===null||we(f)?(t.exit("atxHeadingSequence"),u(f)):n(f)}function u(f){return f===35?(t.enter("atxHeadingSequence"),o(f)):f===null||re(f)?(t.exit("atxHeading"),e(f)):he(f)?be(t,u,"whitespace")(f):(t.enter("atxHeadingText"),l(f))}function o(f){return f===35?(t.consume(f),o):(t.exit("atxHeadingSequence"),u(f))}function l(f){return f===null||f===35||we(f)?(t.exit("atxHeadingText"),u(f)):(t.consume(f),l)}}const ib=["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"],Lu=["pre","script","style","textarea"],ab={concrete:!0,name:"htmlFlow",resolveTo:ob,tokenize:lb},sb={partial:!0,tokenize:db},ub={partial:!0,tokenize:cb};function ob(t){let e=t.length;for(;e--&&!(t[e][0]==="enter"&&t[e][1].type==="htmlFlow"););return e>1&&t[e-2][1].type==="linePrefix"&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2)),t}function lb(t,e,n){const r=this;let i,a,s,u,o;return l;function l(y){return f(y)}function f(y){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(y),c}function c(y){return y===33?(t.consume(y),p):y===47?(t.consume(y),a=!0,b):y===63?(t.consume(y),i=3,r.interrupt?e:I):Je(y)?(t.consume(y),s=String.fromCharCode(y),x):n(y)}function p(y){return y===45?(t.consume(y),i=2,h):y===91?(t.consume(y),i=5,u=0,m):Je(y)?(t.consume(y),i=4,r.interrupt?e:I):n(y)}function h(y){return y===45?(t.consume(y),r.interrupt?e:I):n(y)}function m(y){const W="CDATA[";return y===W.charCodeAt(u++)?(t.consume(y),u===W.length?r.interrupt?e:H:m):n(y)}function b(y){return Je(y)?(t.consume(y),s=String.fromCharCode(y),x):n(y)}function x(y){if(y===null||y===47||y===62||we(y)){const W=y===47,K=s.toLowerCase();return!W&&!a&&Lu.includes(K)?(i=1,r.interrupt?e(y):H(y)):ib.includes(s.toLowerCase())?(i=6,W?(t.consume(y),T):r.interrupt?e(y):H(y)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(y):a?k(y):g(y))}return y===45||We(y)?(t.consume(y),s+=String.fromCharCode(y),x):n(y)}function T(y){return y===62?(t.consume(y),r.interrupt?e:H):n(y)}function k(y){return he(y)?(t.consume(y),k):w(y)}function g(y){return y===47?(t.consume(y),w):y===58||y===95||Je(y)?(t.consume(y),N):he(y)?(t.consume(y),g):w(y)}function N(y){return y===45||y===46||y===58||y===95||We(y)?(t.consume(y),N):v(y)}function v(y){return y===61?(t.consume(y),C):he(y)?(t.consume(y),v):g(y)}function C(y){return y===null||y===60||y===61||y===62||y===96?n(y):y===34||y===39?(t.consume(y),o=y,R):he(y)?(t.consume(y),C):M(y)}function R(y){return y===o?(t.consume(y),o=null,U):y===null||re(y)?n(y):(t.consume(y),R)}function M(y){return y===null||y===34||y===39||y===47||y===60||y===61||y===62||y===96||we(y)?v(y):(t.consume(y),M)}function U(y){return y===47||y===62||he(y)?g(y):n(y)}function w(y){return y===62?(t.consume(y),P):n(y)}function P(y){return y===null||re(y)?H(y):he(y)?(t.consume(y),P):n(y)}function H(y){return y===45&&i===2?(t.consume(y),Q):y===60&&i===1?(t.consume(y),ae):y===62&&i===4?(t.consume(y),xe):y===63&&i===3?(t.consume(y),I):y===93&&i===5?(t.consume(y),Se):re(y)&&(i===6||i===7)?(t.exit("htmlFlowData"),t.check(sb,Te,te)(y)):y===null||re(y)?(t.exit("htmlFlowData"),te(y)):(t.consume(y),H)}function te(y){return t.check(ub,Z,Te)(y)}function Z(y){return t.enter("lineEnding"),t.consume(y),t.exit("lineEnding"),z}function z(y){return y===null||re(y)?te(y):(t.enter("htmlFlowData"),H(y))}function Q(y){return y===45?(t.consume(y),I):H(y)}function ae(y){return y===47?(t.consume(y),s="",Ee):H(y)}function Ee(y){if(y===62){const W=s.toLowerCase();return Lu.includes(W)?(t.consume(y),xe):H(y)}return Je(y)&&s.length<8?(t.consume(y),s+=String.fromCharCode(y),Ee):H(y)}function Se(y){return y===93?(t.consume(y),I):H(y)}function I(y){return y===62?(t.consume(y),xe):y===45&&i===2?(t.consume(y),I):H(y)}function xe(y){return y===null||re(y)?(t.exit("htmlFlowData"),Te(y)):(t.consume(y),xe)}function Te(y){return t.exit("htmlFlow"),e(y)}}function cb(t,e,n){const r=this;return i;function i(s){return re(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),a):n(s)}function a(s){return r.parser.lazy[r.now().line]?n(s):e(s)}}function db(t,e,n){return r;function r(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),t.attempt(Or,e,n)}}const fb={name:"htmlText",tokenize:hb};function hb(t,e,n){const r=this;let i,a,s;return u;function u(I){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(I),o}function o(I){return I===33?(t.consume(I),l):I===47?(t.consume(I),v):I===63?(t.consume(I),g):Je(I)?(t.consume(I),M):n(I)}function l(I){return I===45?(t.consume(I),f):I===91?(t.consume(I),a=0,m):Je(I)?(t.consume(I),k):n(I)}function f(I){return I===45?(t.consume(I),h):n(I)}function c(I){return I===null?n(I):I===45?(t.consume(I),p):re(I)?(s=c,ae(I)):(t.consume(I),c)}function p(I){return I===45?(t.consume(I),h):c(I)}function h(I){return I===62?Q(I):I===45?p(I):c(I)}function m(I){const xe="CDATA[";return I===xe.charCodeAt(a++)?(t.consume(I),a===xe.length?b:m):n(I)}function b(I){return I===null?n(I):I===93?(t.consume(I),x):re(I)?(s=b,ae(I)):(t.consume(I),b)}function x(I){return I===93?(t.consume(I),T):b(I)}function T(I){return I===62?Q(I):I===93?(t.consume(I),T):b(I)}function k(I){return I===null||I===62?Q(I):re(I)?(s=k,ae(I)):(t.consume(I),k)}function g(I){return I===null?n(I):I===63?(t.consume(I),N):re(I)?(s=g,ae(I)):(t.consume(I),g)}function N(I){return I===62?Q(I):g(I)}function v(I){return Je(I)?(t.consume(I),C):n(I)}function C(I){return I===45||We(I)?(t.consume(I),C):R(I)}function R(I){return re(I)?(s=R,ae(I)):he(I)?(t.consume(I),R):Q(I)}function M(I){return I===45||We(I)?(t.consume(I),M):I===47||I===62||we(I)?U(I):n(I)}function U(I){return I===47?(t.consume(I),Q):I===58||I===95||Je(I)?(t.consume(I),w):re(I)?(s=U,ae(I)):he(I)?(t.consume(I),U):Q(I)}function w(I){return I===45||I===46||I===58||I===95||We(I)?(t.consume(I),w):P(I)}function P(I){return I===61?(t.consume(I),H):re(I)?(s=P,ae(I)):he(I)?(t.consume(I),P):U(I)}function H(I){return I===null||I===60||I===61||I===62||I===96?n(I):I===34||I===39?(t.consume(I),i=I,te):re(I)?(s=H,ae(I)):he(I)?(t.consume(I),H):(t.consume(I),Z)}function te(I){return I===i?(t.consume(I),i=void 0,z):I===null?n(I):re(I)?(s=te,ae(I)):(t.consume(I),te)}function Z(I){return I===null||I===34||I===39||I===60||I===61||I===96?n(I):I===47||I===62||we(I)?U(I):(t.consume(I),Z)}function z(I){return I===47||I===62||we(I)?U(I):n(I)}function Q(I){return I===62?(t.consume(I),t.exit("htmlTextData"),t.exit("htmlText"),e):n(I)}function ae(I){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(I),t.exit("lineEnding"),Ee}function Ee(I){return he(I)?be(t,Se,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):Se(I)}function Se(I){return t.enter("htmlTextData"),s(I)}}const As={name:"labelEnd",resolveAll:bb,resolveTo:Eb,tokenize:Tb},pb={tokenize:xb},mb={tokenize:_b},gb={tokenize:yb};function bb(t){let e=-1;const n=[];for(;++e<t.length;){const r=t[e][1];if(n.push(t[e]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",e+=i}}return t.length!==n.length&&ct(t,0,t.length,n),t}function Eb(t,e){let n=t.length,r=0,i,a,s,u;for(;n--;)if(i=t[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;t[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(t[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const o={type:t[a][1].type==="labelLink"?"link":"image",start:{...t[a][1].start},end:{...t[t.length-1][1].end}},l={type:"label",start:{...t[a][1].start},end:{...t[s][1].end}},f={type:"labelText",start:{...t[a+r+2][1].end},end:{...t[s-2][1].start}};return u=[["enter",o,e],["enter",l,e]],u=ht(u,t.slice(a+1,a+r+3)),u=ht(u,[["enter",f,e]]),u=ht(u,vi(e.parser.constructs.insideSpan.null,t.slice(a+r+4,s-3),e)),u=ht(u,[["exit",f,e],t[s-2],t[s-1],["exit",l,e]]),u=ht(u,t.slice(s+1)),u=ht(u,[["exit",o,e]]),ct(t,a,t.length,u),t}function Tb(t,e,n){const r=this;let i=r.events.length,a,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return u;function u(p){return a?a._inactive?c(p):(s=r.parser.defined.includes(Et(r.sliceSerialize({start:a.end,end:r.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(p),t.exit("labelMarker"),t.exit("labelEnd"),o):n(p)}function o(p){return p===40?t.attempt(pb,f,s?f:c)(p):p===91?t.attempt(mb,f,s?l:c)(p):s?f(p):c(p)}function l(p){return t.attempt(gb,f,c)(p)}function f(p){return e(p)}function c(p){return a._balanced=!0,n(p)}}function xb(t,e,n){return r;function r(c){return t.enter("resource"),t.enter("resourceMarker"),t.consume(c),t.exit("resourceMarker"),i}function i(c){return we(c)?lr(t,a)(c):a(c)}function a(c){return c===41?f(c):_c(t,s,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function s(c){return we(c)?lr(t,o)(c):f(c)}function u(c){return n(c)}function o(c){return c===34||c===39||c===40?kc(t,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):f(c)}function l(c){return we(c)?lr(t,f)(c):f(c)}function f(c){return c===41?(t.enter("resourceMarker"),t.consume(c),t.exit("resourceMarker"),t.exit("resource"),e):n(c)}}function _b(t,e,n){const r=this;return i;function i(u){return yc.call(r,t,a,s,"reference","referenceMarker","referenceString")(u)}function a(u){return r.parser.defined.includes(Et(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?e(u):n(u)}function s(u){return n(u)}}function yb(t,e,n){return r;function r(a){return t.enter("reference"),t.enter("referenceMarker"),t.consume(a),t.exit("referenceMarker"),i}function i(a){return a===93?(t.enter("referenceMarker"),t.consume(a),t.exit("referenceMarker"),t.exit("reference"),e):n(a)}}const kb={name:"labelStartImage",resolveAll:As.resolveAll,tokenize:Ab};function Ab(t,e,n){const r=this;return i;function i(u){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(u),t.exit("labelImageMarker"),a}function a(u){return u===91?(t.enter("labelMarker"),t.consume(u),t.exit("labelMarker"),t.exit("labelImage"),s):n(u)}function s(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):e(u)}}const Cb={name:"labelStartLink",resolveAll:As.resolveAll,tokenize:Sb};function Sb(t,e,n){const r=this;return i;function i(s){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(s),t.exit("labelMarker"),t.exit("labelLink"),a}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):e(s)}}const Ji={name:"lineEnding",tokenize:Ib};function Ib(t,e){return n;function n(r){return t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),be(t,e,"linePrefix")}}const Xr={name:"thematicBreak",tokenize:Nb};function Nb(t,e,n){let r=0,i;return a;function a(l){return t.enter("thematicBreak"),s(l)}function s(l){return i=l,u(l)}function u(l){return l===i?(t.enter("thematicBreakSequence"),o(l)):r>=3&&(l===null||re(l))?(t.exit("thematicBreak"),e(l)):n(l)}function o(l){return l===i?(t.consume(l),r++,o):(t.exit("thematicBreakSequence"),he(l)?be(t,u,"whitespace")(l):u(l))}}const rt={continuation:{tokenize:Ob},exit:Db,name:"list",tokenize:Rb},wb={partial:!0,tokenize:Pb},vb={partial:!0,tokenize:Lb};function Rb(t,e,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return u;function u(h){const m=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:Oa(h)){if(r.containerState.type||(r.containerState.type=m,t.enter(m,{_container:!0})),m==="listUnordered")return t.enter("listItemPrefix"),h===42||h===45?t.check(Xr,n,l)(h):l(h);if(!r.interrupt||h===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),o(h)}return n(h)}function o(h){return Oa(h)&&++s<10?(t.consume(h),o):(!r.interrupt||s<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(t.exit("listItemValue"),l(h)):n(h)}function l(h){return t.enter("listItemMarker"),t.consume(h),t.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,t.check(Or,r.interrupt?n:f,t.attempt(wb,p,c))}function f(h){return r.containerState.initialBlankLine=!0,a++,p(h)}function c(h){return he(h)?(t.enter("listItemPrefixWhitespace"),t.consume(h),t.exit("listItemPrefixWhitespace"),p):n(h)}function p(h){return r.containerState.size=a+r.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(h)}}function Ob(t,e,n){const r=this;return r.containerState._closeFlow=void 0,t.check(Or,i,a);function i(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,be(t,e,"listItemIndent",r.containerState.size+1)(u)}function a(u){return r.containerState.furtherBlankLines||!he(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,t.attempt(vb,e,s)(u))}function s(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,be(t,t.attempt(rt,e,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function Lb(t,e,n){const r=this;return be(t,i,"listItemIndent",r.containerState.size+1);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?e(a):n(a)}}function Db(t){t.exit(this.containerState.type)}function Pb(t,e,n){const r=this;return be(t,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const s=r.events[r.events.length-1];return!he(a)&&s&&s[1].type==="listItemPrefixWhitespace"?e(a):n(a)}}const Du={name:"setextUnderline",resolveTo:Mb,tokenize:Bb};function Mb(t,e){let n=t.length,r,i,a;for(;n--;)if(t[n][0]==="enter"){if(t[n][1].type==="content"){r=n;break}t[n][1].type==="paragraph"&&(i=n)}else t[n][1].type==="content"&&t.splice(n,1),!a&&t[n][1].type==="definition"&&(a=n);const s={type:"setextHeading",start:{...t[r][1].start},end:{...t[t.length-1][1].end}};return t[i][1].type="setextHeadingText",a?(t.splice(i,0,["enter",s,e]),t.splice(a+1,0,["exit",t[r][1],e]),t[r][1].end={...t[a][1].end}):t[r][1]=s,t.push(["exit",s,e]),t}function Bb(t,e,n){const r=this;let i;return a;function a(l){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)?(t.enter("setextHeadingLine"),i=l,s(l)):n(l)}function s(l){return t.enter("setextHeadingLineSequence"),u(l)}function u(l){return l===i?(t.consume(l),u):(t.exit("setextHeadingLineSequence"),he(l)?be(t,o,"lineSuffix")(l):o(l))}function o(l){return l===null||re(l)?(t.exit("setextHeadingLine"),e(l)):n(l)}}const Fb={tokenize:zb};function zb(t){const e=this,n=t.attempt(Or,r,t.attempt(this.parser.constructs.flowInitial,i,be(t,t.attempt(this.parser.constructs.flow,i,t.attempt(Zg,i)),"linePrefix")));return n;function r(a){if(a===null){t.consume(a);return}return t.enter("lineEndingBlank"),t.consume(a),t.exit("lineEndingBlank"),e.currentConstruct=void 0,n}function i(a){if(a===null){t.consume(a);return}return t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),e.currentConstruct=void 0,n}}const Ub={resolveAll:Cc()},Hb=Ac("string"),$b=Ac("text");function Ac(t){return{resolveAll:Cc(t==="text"?jb:void 0),tokenize:e};function e(n){const r=this,i=this.parser.constructs[t],a=n.attempt(i,s,u);return s;function s(f){return l(f)?a(f):u(f)}function u(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),o}function o(f){return l(f)?(n.exit("data"),a(f)):(n.consume(f),o)}function l(f){if(f===null)return!0;const c=i[f];let p=-1;if(c)for(;++p<c.length;){const h=c[p];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function Cc(t){return e;function e(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return t?t(n,r):n}}function jb(t,e){let n=0;for(;++n<=t.length;)if((n===t.length||t[n][1].type==="lineEnding")&&t[n-1][1].type==="data"){const r=t[n-1][1],i=e.sliceStream(r);let a=i.length,s=-1,u=0,o;for(;a--;){const l=i[a];if(typeof l=="string"){for(s=l.length;l.charCodeAt(s-1)===32;)u++,s--;if(s)break;s=-1}else if(l===-2)o=!0,u++;else if(l!==-1){a++;break}}if(e._contentTypeTextTrailing&&n===t.length&&(u=0),u){const l={type:n===t.length||o||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?s:r.start._bufferIndex+s,_index:r.start._index+a,line:r.end.line,column:r.end.column-u,offset:r.end.offset-u},end:{...r.end}};r.end={...l.start},r.start.offset===r.end.offset?Object.assign(r,l):(t.splice(n,0,["enter",l,e],["exit",l,e]),n+=2)}n++}return t}const Zb={42:rt,43:rt,45:rt,48:rt,49:rt,50:rt,51:rt,52:rt,53:rt,54:rt,55:rt,56:rt,57:rt,62:bc},Yb={91:Gg},qb={[-2]:Xi,[-1]:Xi,32:Xi},Vb={35:tb,42:Xr,45:[Du,Xr],60:ab,61:Du,95:Xr,96:Ou,126:Ou},Wb={38:Tc,92:Ec},Gb={[-5]:Ji,[-4]:Ji,[-3]:Ji,33:kb,38:Tc,42:La,60:[Cg,fb],91:Cb,92:[Jg,Ec],93:As,95:La,96:Fg},Qb={null:[La,Ub]},Kb={null:[42,95]},Xb={null:[]},Jb=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Kb,contentInitial:Yb,disable:Xb,document:Zb,flow:Vb,flowInitial:qb,insideSpan:Qb,string:Wb,text:Gb},Symbol.toStringTag,{value:"Module"}));function eE(t,e,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},a=[];let s=[],u=[];const o={attempt:R(v),check:R(C),consume:k,enter:g,exit:N,interrupt:R(C,{interrupt:!0})},l={code:null,containerState:{},defineSkip:b,events:[],now:m,parser:t,previous:null,sliceSerialize:p,sliceStream:h,write:c};let f=e.tokenize.call(l,o);return e.resolveAll&&a.push(e),l;function c(P){return s=ht(s,P),x(),s[s.length-1]!==null?[]:(M(e,0),l.events=vi(a,l.events,l),l.events)}function p(P,H){return nE(h(P),H)}function h(P){return tE(s,P)}function m(){const{_bufferIndex:P,_index:H,line:te,column:Z,offset:z}=r;return{_bufferIndex:P,_index:H,line:te,column:Z,offset:z}}function b(P){i[P.line]=P.column,w()}function x(){let P;for(;r._index<s.length;){const H=s[r._index];if(typeof H=="string")for(P=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===P&&r._bufferIndex<H.length;)T(H.charCodeAt(r._bufferIndex));else T(H)}}function T(P){f=f(P)}function k(P){re(P)?(r.line++,r.column=1,r.offset+=P===-3?2:1,w()):P!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=P}function g(P,H){const te=H||{};return te.type=P,te.start=m(),l.events.push(["enter",te,l]),u.push(te),te}function N(P){const H=u.pop();return H.end=m(),l.events.push(["exit",H,l]),H}function v(P,H){M(P,H.from)}function C(P,H){H.restore()}function R(P,H){return te;function te(Z,z,Q){let ae,Ee,Se,I;return Array.isArray(Z)?Te(Z):"tokenize"in Z?Te([Z]):xe(Z);function xe(G){return J;function J(ne){const oe=ne!==null&&G[ne],me=ne!==null&&G.null,ze=[...Array.isArray(oe)?oe:oe?[oe]:[],...Array.isArray(me)?me:me?[me]:[]];return Te(ze)(ne)}}function Te(G){return ae=G,Ee=0,G.length===0?Q:y(G[Ee])}function y(G){return J;function J(ne){return I=U(),Se=G,G.partial||(l.currentConstruct=G),G.name&&l.parser.constructs.disable.null.includes(G.name)?K():G.tokenize.call(H?Object.assign(Object.create(l),H):l,o,W,K)(ne)}}function W(G){return P(Se,I),z}function K(G){return I.restore(),++Ee<ae.length?y(ae[Ee]):Q}}}function M(P,H){P.resolveAll&&!a.includes(P)&&a.push(P),P.resolve&&ct(l.events,H,l.events.length-H,P.resolve(l.events.slice(H),l)),P.resolveTo&&(l.events=P.resolveTo(l.events,l))}function U(){const P=m(),H=l.previous,te=l.currentConstruct,Z=l.events.length,z=Array.from(u);return{from:Z,restore:Q};function Q(){r=P,l.previous=H,l.currentConstruct=te,l.events.length=Z,u=z,w()}}function w(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function tE(t,e){const n=e.start._index,r=e.start._bufferIndex,i=e.end._index,a=e.end._bufferIndex;let s;if(n===i)s=[t[n].slice(r,a)];else{if(s=t.slice(n,i),r>-1){const u=s[0];typeof u=="string"?s[0]=u.slice(r):s.shift()}a>0&&s.push(t[i].slice(0,a))}return s}function nE(t,e){let n=-1;const r=[];let i;for(;++n<t.length;){const a=t[n];let s;if(typeof a=="string")s=a;else switch(a){case-5:{s="\r";break}case-4:{s=`
86
- `;break}case-3:{s=`\r
87
- `;break}case-2:{s=e?" ":" ";break}case-1:{if(!e&&i)continue;s=" ";break}default:s=String.fromCharCode(a)}i=a===-2,r.push(s)}return r.join("")}function rE(t){const r={constructs:mc([Jb,...(t||{}).extensions||[]]),content:i(Eg),defined:[],document:i(xg),flow:i(Fb),lazy:{},string:i(Hb),text:i($b)};return r;function i(a){return s;function s(u){return eE(r,a,u)}}}function iE(t){for(;!xc(t););return t}const Pu=/[\0\t\n\r]/g;function aE(){let t=1,e="",n=!0,r;return i;function i(a,s,u){const o=[];let l,f,c,p,h;for(a=e+(typeof a=="string"?a.toString():new TextDecoder(s||void 0).decode(a)),c=0,e="",n&&(a.charCodeAt(0)===65279&&c++,n=void 0);c<a.length;){if(Pu.lastIndex=c,l=Pu.exec(a),p=l&&l.index!==void 0?l.index:a.length,h=a.charCodeAt(p),!l){e=a.slice(c);break}if(h===10&&c===p&&r)o.push(-3),r=void 0;else switch(r&&(o.push(-5),r=void 0),c<p&&(o.push(a.slice(c,p)),t+=p-c),h){case 0:{o.push(65533),t++;break}case 9:{for(f=Math.ceil(t/4)*4,o.push(-2);t++<f;)o.push(-1);break}case 10:{o.push(-4),t=1;break}default:r=!0,t=1}c=p+1}return u&&(r&&o.push(-5),e&&o.push(e),o.push(null)),o}}const sE=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function uE(t){return t.replace(sE,oE)}function oE(t,e,n){if(e)return e;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return gc(n.slice(a?2:1),a?16:10)}return ks(n)||t}const Sc={}.hasOwnProperty;function lE(t,e,n){return typeof e!="string"&&(n=e,e=void 0),cE(n)(iE(rE(n).document().write(aE()(t,e,!0))))}function cE(t){const e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Hn),autolinkProtocol:U,autolinkEmail:U,atxHeading:a(Pt),blockQuote:a(me),characterEscape:U,characterReference:U,codeFenced:a(ze),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:a(ze,s),codeText:a(je,s),codeTextData:U,data:U,codeFlowValue:U,definition:a(ke),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:a(De),hardBreakEscape:a(Wt),hardBreakTrailing:a(Wt),htmlFlow:a(gn,s),htmlFlowData:U,htmlText:a(gn,s),htmlTextData:U,image:a(Ve),label:s,link:a(Hn),listItem:a(Gt),listItemValue:p,listOrdered:a(Fr,c),listUnordered:a(Fr),paragraph:a(zr),reference:y,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:a(Pt),strong:a(qi),thematicBreak:a(th)},exit:{atxHeading:o(),atxHeadingSequence:v,autolink:o(),autolinkEmail:oe,autolinkProtocol:ne,blockQuote:o(),characterEscapeValue:w,characterReferenceMarkerHexadecimal:K,characterReferenceMarkerNumeric:K,characterReferenceValue:G,characterReference:J,codeFenced:o(x),codeFencedFence:b,codeFencedFenceInfo:h,codeFencedFenceMeta:m,codeFlowValue:w,codeIndented:o(T),codeText:o(z),codeTextData:w,data:w,definition:o(),definitionDestinationString:N,definitionLabelString:k,definitionTitleString:g,emphasis:o(),hardBreakEscape:o(H),hardBreakTrailing:o(H),htmlFlow:o(te),htmlFlowData:w,htmlText:o(Z),htmlTextData:w,image:o(ae),label:Se,labelText:Ee,lineEnding:P,link:o(Q),listItem:o(),listOrdered:o(),listUnordered:o(),paragraph:o(),referenceString:W,resourceDestinationString:I,resourceTitleString:xe,resource:Te,setextHeading:o(M),setextHeadingLineSequence:R,setextHeadingText:C,strong:o(),thematicBreak:o()}};Ic(e,(t||{}).mdastExtensions||[]);const n={};return r;function r(F){let q={type:"root",children:[]};const se={stack:[q],tokenStack:[],config:e,enter:u,exit:l,buffer:s,resume:f,data:n},pe=[];let Ie=-1;for(;++Ie<F.length;)if(F[Ie][1].type==="listOrdered"||F[Ie][1].type==="listUnordered")if(F[Ie][0]==="enter")pe.push(Ie);else{const mt=pe.pop();Ie=i(F,mt,Ie)}for(Ie=-1;++Ie<F.length;){const mt=e[F[Ie][0]];Sc.call(mt,F[Ie][1].type)&&mt[F[Ie][1].type].call(Object.assign({sliceSerialize:F[Ie][2].sliceSerialize},se),F[Ie][1])}if(se.tokenStack.length>0){const mt=se.tokenStack[se.tokenStack.length-1];(mt[1]||Mu).call(se,void 0,mt[0])}for(q.position={start:Mt(F.length>0?F[0][1].start:{line:1,column:1,offset:0}),end:Mt(F.length>0?F[F.length-2][1].end:{line:1,column:1,offset:0})},Ie=-1;++Ie<e.transforms.length;)q=e.transforms[Ie](q)||q;return q}function i(F,q,se){let pe=q-1,Ie=-1,mt=!1,Qt,Nt,$n,jn;for(;++pe<=se;){const ut=F[pe];switch(ut[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ut[0]==="enter"?Ie++:Ie--,jn=void 0;break}case"lineEndingBlank":{ut[0]==="enter"&&(Qt&&!jn&&!Ie&&!$n&&($n=pe),jn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:jn=void 0}if(!Ie&&ut[0]==="enter"&&ut[1].type==="listItemPrefix"||Ie===-1&&ut[0]==="exit"&&(ut[1].type==="listUnordered"||ut[1].type==="listOrdered")){if(Qt){let bn=pe;for(Nt=void 0;bn--;){const wt=F[bn];if(wt[1].type==="lineEnding"||wt[1].type==="lineEndingBlank"){if(wt[0]==="exit")continue;Nt&&(F[Nt][1].type="lineEndingBlank",mt=!0),wt[1].type="lineEnding",Nt=bn}else if(!(wt[1].type==="linePrefix"||wt[1].type==="blockQuotePrefix"||wt[1].type==="blockQuotePrefixWhitespace"||wt[1].type==="blockQuoteMarker"||wt[1].type==="listItemIndent"))break}$n&&(!Nt||$n<Nt)&&(Qt._spread=!0),Qt.end=Object.assign({},Nt?F[Nt][1].start:ut[1].end),F.splice(Nt||pe,0,["exit",Qt,ut[2]]),pe++,se++}if(ut[1].type==="listItemPrefix"){const bn={type:"listItem",_spread:!1,start:Object.assign({},ut[1].start),end:void 0};Qt=bn,F.splice(pe,0,["enter",bn,ut[2]]),pe++,se++,$n=void 0,jn=!0}}}return F[q][1]._spread=mt,se}function a(F,q){return se;function se(pe){u.call(this,F(pe),pe),q&&q.call(this,pe)}}function s(){this.stack.push({type:"fragment",children:[]})}function u(F,q,se){this.stack[this.stack.length-1].children.push(F),this.stack.push(F),this.tokenStack.push([q,se||void 0]),F.position={start:Mt(q.start),end:void 0}}function o(F){return q;function q(se){F&&F.call(this,se),l.call(this,se)}}function l(F,q){const se=this.stack.pop(),pe=this.tokenStack.pop();if(pe)pe[0].type!==F.type&&(q?q.call(this,F,pe[0]):(pe[1]||Mu).call(this,F,pe[0]));else throw new Error("Cannot close `"+F.type+"` ("+or({start:F.start,end:F.end})+"): it’s not open");se.position.end=Mt(F.end)}function f(){return ys(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function p(F){if(this.data.expectingFirstListItemValue){const q=this.stack[this.stack.length-2];q.start=Number.parseInt(this.sliceSerialize(F),10),this.data.expectingFirstListItemValue=void 0}}function h(){const F=this.resume(),q=this.stack[this.stack.length-1];q.lang=F}function m(){const F=this.resume(),q=this.stack[this.stack.length-1];q.meta=F}function b(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function x(){const F=this.resume(),q=this.stack[this.stack.length-1];q.value=F.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function T(){const F=this.resume(),q=this.stack[this.stack.length-1];q.value=F.replace(/(\r?\n|\r)$/g,"")}function k(F){const q=this.resume(),se=this.stack[this.stack.length-1];se.label=q,se.identifier=Et(this.sliceSerialize(F)).toLowerCase()}function g(){const F=this.resume(),q=this.stack[this.stack.length-1];q.title=F}function N(){const F=this.resume(),q=this.stack[this.stack.length-1];q.url=F}function v(F){const q=this.stack[this.stack.length-1];if(!q.depth){const se=this.sliceSerialize(F).length;q.depth=se}}function C(){this.data.setextHeadingSlurpLineEnding=!0}function R(F){const q=this.stack[this.stack.length-1];q.depth=this.sliceSerialize(F).codePointAt(0)===61?1:2}function M(){this.data.setextHeadingSlurpLineEnding=void 0}function U(F){const se=this.stack[this.stack.length-1].children;let pe=se[se.length-1];(!pe||pe.type!=="text")&&(pe=eh(),pe.position={start:Mt(F.start),end:void 0},se.push(pe)),this.stack.push(pe)}function w(F){const q=this.stack.pop();q.value+=this.sliceSerialize(F),q.position.end=Mt(F.end)}function P(F){const q=this.stack[this.stack.length-1];if(this.data.atHardBreak){const se=q.children[q.children.length-1];se.position.end=Mt(F.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes(q.type)&&(U.call(this,F),w.call(this,F))}function H(){this.data.atHardBreak=!0}function te(){const F=this.resume(),q=this.stack[this.stack.length-1];q.value=F}function Z(){const F=this.resume(),q=this.stack[this.stack.length-1];q.value=F}function z(){const F=this.resume(),q=this.stack[this.stack.length-1];q.value=F}function Q(){const F=this.stack[this.stack.length-1];if(this.data.inReference){const q=this.data.referenceType||"shortcut";F.type+="Reference",F.referenceType=q,delete F.url,delete F.title}else delete F.identifier,delete F.label;this.data.referenceType=void 0}function ae(){const F=this.stack[this.stack.length-1];if(this.data.inReference){const q=this.data.referenceType||"shortcut";F.type+="Reference",F.referenceType=q,delete F.url,delete F.title}else delete F.identifier,delete F.label;this.data.referenceType=void 0}function Ee(F){const q=this.sliceSerialize(F),se=this.stack[this.stack.length-2];se.label=uE(q),se.identifier=Et(q).toLowerCase()}function Se(){const F=this.stack[this.stack.length-1],q=this.resume(),se=this.stack[this.stack.length-1];if(this.data.inReference=!0,se.type==="link"){const pe=F.children;se.children=pe}else se.alt=q}function I(){const F=this.resume(),q=this.stack[this.stack.length-1];q.url=F}function xe(){const F=this.resume(),q=this.stack[this.stack.length-1];q.title=F}function Te(){this.data.inReference=void 0}function y(){this.data.referenceType="collapsed"}function W(F){const q=this.resume(),se=this.stack[this.stack.length-1];se.label=q,se.identifier=Et(this.sliceSerialize(F)).toLowerCase(),this.data.referenceType="full"}function K(F){this.data.characterReferenceType=F.type}function G(F){const q=this.sliceSerialize(F),se=this.data.characterReferenceType;let pe;se?(pe=gc(q,se==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):pe=ks(q);const Ie=this.stack[this.stack.length-1];Ie.value+=pe}function J(F){const q=this.stack.pop();q.position.end=Mt(F.end)}function ne(F){w.call(this,F);const q=this.stack[this.stack.length-1];q.url=this.sliceSerialize(F)}function oe(F){w.call(this,F);const q=this.stack[this.stack.length-1];q.url="mailto:"+this.sliceSerialize(F)}function me(){return{type:"blockquote",children:[]}}function ze(){return{type:"code",lang:null,meta:null,value:""}}function je(){return{type:"inlineCode",value:""}}function ke(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function De(){return{type:"emphasis",children:[]}}function Pt(){return{type:"heading",depth:0,children:[]}}function Wt(){return{type:"break"}}function gn(){return{type:"html",value:""}}function Ve(){return{type:"image",title:null,url:"",alt:null}}function Hn(){return{type:"link",title:null,url:"",children:[]}}function Fr(F){return{type:"list",ordered:F.type==="listOrdered",start:null,spread:F._spread,children:[]}}function Gt(F){return{type:"listItem",spread:F._spread,checked:null,children:[]}}function zr(){return{type:"paragraph",children:[]}}function qi(){return{type:"strong",children:[]}}function eh(){return{type:"text",value:""}}function th(){return{type:"thematicBreak"}}}function Mt(t){return{line:t.line,column:t.column,offset:t.offset}}function Ic(t,e){let n=-1;for(;++n<e.length;){const r=e[n];Array.isArray(r)?Ic(t,r):dE(t,r)}}function dE(t,e){let n;for(n in e)if(Sc.call(e,n))switch(n){case"canContainEols":{const r=e[n];r&&t[n].push(...r);break}case"transforms":{const r=e[n];r&&t[n].push(...r);break}case"enter":case"exit":{const r=e[n];r&&Object.assign(t[n],r);break}}}function Mu(t,e){throw t?new Error("Cannot close `"+t.type+"` ("+or({start:t.start,end:t.end})+"): a different token (`"+e.type+"`, "+or({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+or({start:e.start,end:e.end})+") is still open")}function fE(t){const e=this;e.parser=n;function n(r){return lE(r,{...e.data("settings"),...t,extensions:e.data("micromarkExtensions")||[],mdastExtensions:e.data("fromMarkdownExtensions")||[]})}}function hE(t,e){const n={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(e),!0)};return t.patch(e,n),t.applyData(e,n)}function pE(t,e){const n={type:"element",tagName:"br",properties:{},children:[]};return t.patch(e,n),[t.applyData(e,n),{type:"text",value:`
88
- `}]}function mE(t,e){const n=e.value?e.value+`
89
- `:"",r={},i=e.lang?e.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return e.meta&&(a.data={meta:e.meta}),t.patch(e,a),a=t.applyData(e,a),a={type:"element",tagName:"pre",properties:{},children:[a]},t.patch(e,a),a}function gE(t,e){const n={type:"element",tagName:"del",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function bE(t,e){const n={type:"element",tagName:"em",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function EE(t,e){const n=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",r=String(e.identifier).toUpperCase(),i=Mn(r.toLowerCase()),a=t.footnoteOrder.indexOf(r);let s,u=t.footnoteCounts.get(r);u===void 0?(u=0,t.footnoteOrder.push(r),s=t.footnoteOrder.length):s=a+1,u+=1,t.footnoteCounts.set(r,u);const o={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(u>1?"-"+u:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};t.patch(e,o);const l={type:"element",tagName:"sup",properties:{},children:[o]};return t.patch(e,l),t.applyData(e,l)}function TE(t,e){const n={type:"element",tagName:"h"+e.depth,properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function xE(t,e){if(t.options.allowDangerousHtml){const n={type:"raw",value:e.value};return t.patch(e,n),t.applyData(e,n)}}function Nc(t,e){const n=e.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(e.label||e.identifier)+"]"),e.type==="imageReference")return[{type:"text",value:"!["+e.alt+r}];const i=t.all(e),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function _E(t,e){const n=String(e.identifier).toUpperCase(),r=t.definitionById.get(n);if(!r)return Nc(t,e);const i={src:Mn(r.url||""),alt:e.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return t.patch(e,a),t.applyData(e,a)}function yE(t,e){const n={src:Mn(e.url)};e.alt!==null&&e.alt!==void 0&&(n.alt=e.alt),e.title!==null&&e.title!==void 0&&(n.title=e.title);const r={type:"element",tagName:"img",properties:n,children:[]};return t.patch(e,r),t.applyData(e,r)}function kE(t,e){const n={type:"text",value:e.value.replace(/\r?\n|\r/g," ")};t.patch(e,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return t.patch(e,r),t.applyData(e,r)}function AE(t,e){const n=String(e.identifier).toUpperCase(),r=t.definitionById.get(n);if(!r)return Nc(t,e);const i={href:Mn(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:t.all(e)};return t.patch(e,a),t.applyData(e,a)}function CE(t,e){const n={href:Mn(e.url)};e.title!==null&&e.title!==void 0&&(n.title=e.title);const r={type:"element",tagName:"a",properties:n,children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}function SE(t,e,n){const r=t.all(e),i=n?IE(n):wc(e),a={},s=[];if(typeof e.checked=="boolean"){const f=r[0];let c;f&&f.type==="element"&&f.tagName==="p"?c=f:(c={type:"element",tagName:"p",properties:{},children:[]},r.unshift(c)),c.children.length>0&&c.children.unshift({type:"text",value:" "}),c.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:e.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let u=-1;for(;++u<r.length;){const f=r[u];(i||u!==0||f.type!=="element"||f.tagName!=="p")&&s.push({type:"text",value:`
90
- `}),f.type==="element"&&f.tagName==="p"&&!i?s.push(...f.children):s.push(f)}const o=r[r.length-1];o&&(i||o.type!=="element"||o.tagName!=="p")&&s.push({type:"text",value:`
91
- `});const l={type:"element",tagName:"li",properties:a,children:s};return t.patch(e,l),t.applyData(e,l)}function IE(t){let e=!1;if(t.type==="list"){e=t.spread||!1;const n=t.children;let r=-1;for(;!e&&++r<n.length;)e=wc(n[r])}return e}function wc(t){const e=t.spread;return e??t.children.length>1}function NE(t,e){const n={},r=t.all(e);let i=-1;for(typeof e.start=="number"&&e.start!==1&&(n.start=e.start);++i<r.length;){const s=r[i];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:e.ordered?"ol":"ul",properties:n,children:t.wrap(r,!0)};return t.patch(e,a),t.applyData(e,a)}function wE(t,e){const n={type:"element",tagName:"p",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function vE(t,e){const n={type:"root",children:t.wrap(t.all(e))};return t.patch(e,n),t.applyData(e,n)}function RE(t,e){const n={type:"element",tagName:"strong",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function OE(t,e){const n=t.all(e),r=n.shift(),i=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:t.wrap([r],!0)};t.patch(e.children[0],s),i.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:t.wrap(n,!0)},u=St(e.children[1]),o=Ni(e.children[e.children.length-1]);u&&o&&(s.position={start:u,end:o}),i.push(s)}const a={type:"element",tagName:"table",properties:{},children:t.wrap(i,!0)};return t.patch(e,a),t.applyData(e,a)}function LE(t,e,n){const r=n?n.children:void 0,a=(r?r.indexOf(e):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,u=s?s.length:e.children.length;let o=-1;const l=[];for(;++o<u;){const c=e.children[o],p={},h=s?s[o]:void 0;h&&(p.align=h);let m={type:"element",tagName:a,properties:p,children:[]};c&&(m.children=t.all(c),t.patch(c,m),m=t.applyData(c,m)),l.push(m)}const f={type:"element",tagName:"tr",properties:{},children:t.wrap(l,!0)};return t.patch(e,f),t.applyData(e,f)}function DE(t,e){const n={type:"element",tagName:"td",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}const Bu=9,Fu=32;function PE(t){const e=String(t),n=/\r?\n|\r/g;let r=n.exec(e),i=0;const a=[];for(;r;)a.push(zu(e.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(e);return a.push(zu(e.slice(i),i>0,!1)),a.join("")}function zu(t,e,n){let r=0,i=t.length;if(e){let a=t.codePointAt(r);for(;a===Bu||a===Fu;)r++,a=t.codePointAt(r)}if(n){let a=t.codePointAt(i-1);for(;a===Bu||a===Fu;)i--,a=t.codePointAt(i-1)}return i>r?t.slice(r,i):""}function ME(t,e){const n={type:"text",value:PE(String(e.value))};return t.patch(e,n),t.applyData(e,n)}function BE(t,e){const n={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(e,n),t.applyData(e,n)}const FE={blockquote:hE,break:pE,code:mE,delete:gE,emphasis:bE,footnoteReference:EE,heading:TE,html:xE,imageReference:_E,image:yE,inlineCode:kE,linkReference:AE,link:CE,listItem:SE,list:NE,paragraph:wE,root:vE,strong:RE,table:OE,tableCell:DE,tableRow:LE,text:ME,thematicBreak:BE,toml:$r,yaml:$r,definition:$r,footnoteDefinition:$r};function $r(){}const vc=-1,Ri=0,cr=1,fi=2,Cs=3,Ss=4,Is=5,Ns=6,Rc=7,Oc=8,Uu=typeof self=="object"?self:globalThis,zE=(t,e)=>{const n=(i,a)=>(t.set(a,i),i),r=i=>{if(t.has(i))return t.get(i);const[a,s]=e[i];switch(a){case Ri:case vc:return n(s,i);case cr:{const u=n([],i);for(const o of s)u.push(r(o));return u}case fi:{const u=n({},i);for(const[o,l]of s)u[r(o)]=r(l);return u}case Cs:return n(new Date(s),i);case Ss:{const{source:u,flags:o}=s;return n(new RegExp(u,o),i)}case Is:{const u=n(new Map,i);for(const[o,l]of s)u.set(r(o),r(l));return u}case Ns:{const u=n(new Set,i);for(const o of s)u.add(r(o));return u}case Rc:{const{name:u,message:o}=s;return n(new Uu[u](o),i)}case Oc:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:u}=new Uint8Array(s);return n(new DataView(u),s)}}return n(new Uu[a](s),i)};return r},Hu=t=>zE(new Map,t)(0),Tn="",{toString:UE}={},{keys:HE}=Object,Qn=t=>{const e=typeof t;if(e!=="object"||!t)return[Ri,e];const n=UE.call(t).slice(8,-1);switch(n){case"Array":return[cr,Tn];case"Object":return[fi,Tn];case"Date":return[Cs,Tn];case"RegExp":return[Ss,Tn];case"Map":return[Is,Tn];case"Set":return[Ns,Tn];case"DataView":return[cr,n]}return n.includes("Array")?[cr,n]:n.includes("Error")?[Rc,n]:[fi,n]},jr=([t,e])=>t===Ri&&(e==="function"||e==="symbol"),$E=(t,e,n,r)=>{const i=(s,u)=>{const o=r.push(s)-1;return n.set(u,o),o},a=s=>{if(n.has(s))return n.get(s);let[u,o]=Qn(s);switch(u){case Ri:{let f=s;switch(o){case"bigint":u=Oc,f=s.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+o);f=null;break;case"undefined":return i([vc],s)}return i([u,f],s)}case cr:{if(o){let p=s;return o==="DataView"?p=new Uint8Array(s.buffer):o==="ArrayBuffer"&&(p=new Uint8Array(s)),i([o,[...p]],s)}const f=[],c=i([u,f],s);for(const p of s)f.push(a(p));return c}case fi:{if(o)switch(o){case"BigInt":return i([o,s.toString()],s);case"Boolean":case"Number":case"String":return i([o,s.valueOf()],s)}if(e&&"toJSON"in s)return a(s.toJSON());const f=[],c=i([u,f],s);for(const p of HE(s))(t||!jr(Qn(s[p])))&&f.push([a(p),a(s[p])]);return c}case Cs:return i([u,s.toISOString()],s);case Ss:{const{source:f,flags:c}=s;return i([u,{source:f,flags:c}],s)}case Is:{const f=[],c=i([u,f],s);for(const[p,h]of s)(t||!(jr(Qn(p))||jr(Qn(h))))&&f.push([a(p),a(h)]);return c}case Ns:{const f=[],c=i([u,f],s);for(const p of s)(t||!jr(Qn(p)))&&f.push(a(p));return c}}const{message:l}=s;return i([u,{name:o,message:l}],s)};return a},$u=(t,{json:e,lossy:n}={})=>{const r=[];return $E(!(e||n),!!e,new Map,r)(t),r},vn=typeof structuredClone=="function"?(t,e)=>e&&("json"in e||"lossy"in e)?Hu($u(t,e)):structuredClone(t):(t,e)=>Hu($u(t,e));function jE(t,e){const n=[{type:"text",value:"↩"}];return e>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(e)}]}),n}function ZE(t,e){return"Back to reference "+(t+1)+(e>1?"-"+e:"")}function YE(t){const e=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",n=t.options.footnoteBackContent||jE,r=t.options.footnoteBackLabel||ZE,i=t.options.footnoteLabel||"Footnotes",a=t.options.footnoteLabelTagName||"h2",s=t.options.footnoteLabelProperties||{className:["sr-only"]},u=[];let o=-1;for(;++o<t.footnoteOrder.length;){const l=t.footnoteById.get(t.footnoteOrder[o]);if(!l)continue;const f=t.all(l),c=String(l.identifier).toUpperCase(),p=Mn(c.toLowerCase());let h=0;const m=[],b=t.footnoteCounts.get(c);for(;b!==void 0&&++h<=b;){m.length>0&&m.push({type:"text",value:" "});let k=typeof n=="string"?n:n(o,h);typeof k=="string"&&(k={type:"text",value:k}),m.push({type:"element",tagName:"a",properties:{href:"#"+e+"fnref-"+p+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(o,h),className:["data-footnote-backref"]},children:Array.isArray(k)?k:[k]})}const x=f[f.length-1];if(x&&x.type==="element"&&x.tagName==="p"){const k=x.children[x.children.length-1];k&&k.type==="text"?k.value+=" ":x.children.push({type:"text",value:" "}),x.children.push(...m)}else f.push(...m);const T={type:"element",tagName:"li",properties:{id:e+"fn-"+p},children:t.wrap(f,!0)};t.patch(l,T),u.push(T)}if(u.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...vn(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
92
- `},{type:"element",tagName:"ol",properties:{},children:t.wrap(u,!0)},{type:"text",value:`
93
- `}]}}const Oi=(function(t){if(t==null)return GE;if(typeof t=="function")return Li(t);if(typeof t=="object")return Array.isArray(t)?qE(t):VE(t);if(typeof t=="string")return WE(t);throw new Error("Expected function, string, or object as test")});function qE(t){const e=[];let n=-1;for(;++n<t.length;)e[n]=Oi(t[n]);return Li(r);function r(...i){let a=-1;for(;++a<e.length;)if(e[a].apply(this,i))return!0;return!1}}function VE(t){const e=t;return Li(n);function n(r){const i=r;let a;for(a in t)if(i[a]!==e[a])return!1;return!0}}function WE(t){return Li(e);function e(n){return n&&n.type===t}}function Li(t){return e;function e(n,r,i){return!!(QE(n)&&t.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function GE(){return!0}function QE(t){return t!==null&&typeof t=="object"&&"type"in t}const Lc=[],KE=!0,Da=!1,XE="skip";function Dc(t,e,n,r){let i;typeof e=="function"&&typeof n!="function"?(r=n,n=e):i=e;const a=Oi(i),s=r?-1:1;u(t,void 0,[])();function u(o,l,f){const c=o&&typeof o=="object"?o:{};if(typeof c.type=="string"){const h=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(o.type+(h?"<"+h+">":""))+")"})}return p;function p(){let h=Lc,m,b,x;if((!e||a(o,l,f[f.length-1]||void 0))&&(h=JE(n(o,f)),h[0]===Da))return h;if("children"in o&&o.children){const T=o;if(T.children&&h[0]!==XE)for(b=(r?T.children.length:-1)+s,x=f.concat(T);b>-1&&b<T.children.length;){const k=T.children[b];if(m=u(k,b,x)(),m[0]===Da)return m;b=typeof m[1]=="number"?m[1]:b+s}}return h}}}function JE(t){return Array.isArray(t)?t:typeof t=="number"?[KE,t]:t==null?Lc:[t]}function Di(t,e,n,r){let i,a,s;typeof e=="function"&&typeof n!="function"?(a=void 0,s=e,i=n):(a=e,s=n,i=r),Dc(t,a,u,i);function u(o,l){const f=l[l.length-1],c=f?f.children.indexOf(o):void 0;return s(o,c,f)}}const Pa={}.hasOwnProperty,e2={};function t2(t,e){const n=e||e2,r=new Map,i=new Map,a=new Map,s={...FE,...n.handlers},u={all:l,applyData:r2,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:s,one:o,options:n,patch:n2,wrap:a2};return Di(t,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const c=f.type==="definition"?r:i,p=String(f.identifier).toUpperCase();c.has(p)||c.set(p,f)}}),u;function o(f,c){const p=f.type,h=u.handlers[p];if(Pa.call(u.handlers,p)&&h)return h(u,f,c);if(u.options.passThrough&&u.options.passThrough.includes(p)){if("children"in f){const{children:b,...x}=f,T=vn(x);return T.children=u.all(f),T}return vn(f)}return(u.options.unknownHandler||i2)(u,f,c)}function l(f){const c=[];if("children"in f){const p=f.children;let h=-1;for(;++h<p.length;){const m=u.one(p[h],f);if(m){if(h&&p[h-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=ju(m.value)),!Array.isArray(m)&&m.type==="element")){const b=m.children[0];b&&b.type==="text"&&(b.value=ju(b.value))}Array.isArray(m)?c.push(...m):c.push(m)}}}return c}}function n2(t,e){t.position&&(e.position=Z1(t))}function r2(t,e){let n=e;if(t&&t.data){const r=t.data.hName,i=t.data.hChildren,a=t.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const s="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:s}}n.type==="element"&&a&&Object.assign(n.properties,vn(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function i2(t,e){const n=e.data||{},r="value"in e&&!(Pa.call(n,"hProperties")||Pa.call(n,"hChildren"))?{type:"text",value:e.value}:{type:"element",tagName:"div",properties:{},children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}function a2(t,e){const n=[];let r=-1;for(e&&n.push({type:"text",value:`
94
- `});++r<t.length;)r&&n.push({type:"text",value:`
95
- `}),n.push(t[r]);return e&&t.length>0&&n.push({type:"text",value:`
96
- `}),n}function ju(t){let e=0,n=t.charCodeAt(e);for(;n===9||n===32;)e++,n=t.charCodeAt(e);return t.slice(e)}function Zu(t,e){const n=t2(t,e),r=n.one(t,void 0),i=YE(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
97
- `},i),a}function s2(t,e){return t&&"run"in t?async function(n,r){const i=Zu(n,{file:r,...e});await t.run(i,r)}:function(n,r){return Zu(n,{file:r,...t||e})}}function Yu(t){if(t)throw t}var ea,qu;function u2(){if(qu)return ea;qu=1;var t=Object.prototype.hasOwnProperty,e=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(l){return typeof Array.isArray=="function"?Array.isArray(l):e.call(l)==="[object Array]"},a=function(l){if(!l||e.call(l)!=="[object Object]")return!1;var f=t.call(l,"constructor"),c=l.constructor&&l.constructor.prototype&&t.call(l.constructor.prototype,"isPrototypeOf");if(l.constructor&&!f&&!c)return!1;var p;for(p in l);return typeof p>"u"||t.call(l,p)},s=function(l,f){n&&f.name==="__proto__"?n(l,f.name,{enumerable:!0,configurable:!0,value:f.newValue,writable:!0}):l[f.name]=f.newValue},u=function(l,f){if(f==="__proto__")if(t.call(l,f)){if(r)return r(l,f).value}else return;return l[f]};return ea=function o(){var l,f,c,p,h,m,b=arguments[0],x=1,T=arguments.length,k=!1;for(typeof b=="boolean"&&(k=b,b=arguments[1]||{},x=2),(b==null||typeof b!="object"&&typeof b!="function")&&(b={});x<T;++x)if(l=arguments[x],l!=null)for(f in l)c=u(b,f),p=u(l,f),b!==p&&(k&&p&&(a(p)||(h=i(p)))?(h?(h=!1,m=c&&i(c)?c:[]):m=c&&a(c)?c:{},s(b,{name:f,newValue:o(k,m,p)})):typeof p<"u"&&s(b,{name:f,newValue:p}));return b},ea}var o2=u2();const ta=is(o2);function Ma(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function l2(){const t=[],e={run:n,use:r};return e;function n(...i){let a=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);u(null,...i);function u(o,...l){const f=t[++a];let c=-1;if(o){s(o);return}for(;++c<i.length;)(l[c]===null||l[c]===void 0)&&(l[c]=i[c]);i=l,f?c2(f,u)(...l):s(null,...l)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return t.push(i),e}}function c2(t,e){let n;return r;function r(...s){const u=t.length>s.length;let o;u&&s.push(i);try{o=t.apply(this,s)}catch(l){const f=l;if(u&&n)throw f;return i(f)}u||(o&&o.then&&typeof o.then=="function"?o.then(a,i):o instanceof Error?i(o):a(o))}function i(s,...u){n||(n=!0,e(s,...u))}function a(s){i(null,s)}}const kt={basename:d2,dirname:f2,extname:h2,join:p2,sep:"/"};function d2(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');Lr(t);let n=0,r=-1,i=t.length,a;if(e===void 0||e.length===0||e.length>t.length){for(;i--;)if(t.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":t.slice(n,r)}if(e===t)return"";let s=-1,u=e.length-1;for(;i--;)if(t.codePointAt(i)===47){if(a){n=i+1;break}}else s<0&&(a=!0,s=i+1),u>-1&&(t.codePointAt(i)===e.codePointAt(u--)?u<0&&(r=i):(u=-1,r=s));return n===r?r=s:r<0&&(r=t.length),t.slice(n,r)}function f2(t){if(Lr(t),t.length===0)return".";let e=-1,n=t.length,r;for(;--n;)if(t.codePointAt(n)===47){if(r){e=n;break}}else r||(r=!0);return e<0?t.codePointAt(0)===47?"/":".":e===1&&t.codePointAt(0)===47?"//":t.slice(0,e)}function h2(t){Lr(t);let e=t.length,n=-1,r=0,i=-1,a=0,s;for(;e--;){const u=t.codePointAt(e);if(u===47){if(s){r=e+1;break}continue}n<0&&(s=!0,n=e+1),u===46?i<0?i=e:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?"":t.slice(i,n)}function p2(...t){let e=-1,n;for(;++e<t.length;)Lr(t[e]),t[e]&&(n=n===void 0?t[e]:n+"/"+t[e]);return n===void 0?".":m2(n)}function m2(t){Lr(t);const e=t.codePointAt(0)===47;let n=g2(t,!e);return n.length===0&&!e&&(n="."),n.length>0&&t.codePointAt(t.length-1)===47&&(n+="/"),e?"/"+n:n}function g2(t,e){let n="",r=0,i=-1,a=0,s=-1,u,o;for(;++s<=t.length;){if(s<t.length)u=t.codePointAt(s);else{if(u===47)break;u=47}if(u===47){if(!(i===s-1||a===1))if(i!==s-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(o=n.lastIndexOf("/"),o!==n.length-1){o<0?(n="",r=0):(n=n.slice(0,o),r=n.length-1-n.lastIndexOf("/")),i=s,a=0;continue}}else if(n.length>0){n="",r=0,i=s,a=0;continue}}e&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+t.slice(i+1,s):n=t.slice(i+1,s),r=s-i-1;i=s,a=0}else u===46&&a>-1?a++:a=-1}return n}function Lr(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const b2={cwd:E2};function E2(){return"/"}function Ba(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function T2(t){if(typeof t=="string")t=new URL(t);else if(!Ba(t)){const e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(t.protocol!=="file:"){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return x2(t)}function x2(t){if(t.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const e=t.pathname;let n=-1;for(;++n<e.length;)if(e.codePointAt(n)===37&&e.codePointAt(n+1)===50){const r=e.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(e)}const na=["history","path","basename","stem","extname","dirname"];class Pc{constructor(e){let n;e?Ba(e)?n={path:e}:typeof e=="string"||_2(e)?n={value:e}:n=e:n={},this.cwd="cwd"in n?"":b2.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<na.length;){const a=na[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)na.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?kt.basename(this.path):void 0}set basename(e){ia(e,"basename"),ra(e,"basename"),this.path=kt.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?kt.dirname(this.path):void 0}set dirname(e){Vu(this.basename,"dirname"),this.path=kt.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?kt.extname(this.path):void 0}set extname(e){if(ra(e,"extname"),Vu(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=kt.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Ba(e)&&(e=T2(e)),ia(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?kt.basename(this.path,this.extname):void 0}set stem(e){ia(e,"stem"),ra(e,"stem"),this.path=kt.join(this.dirname||"",e+(this.extname||""))}fail(e,n,r){const i=this.message(e,n,r);throw i.fatal=!0,i}info(e,n,r){const i=this.message(e,n,r);return i.fatal=void 0,i}message(e,n,r){const i=new Ge(e,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}}function ra(t,e){if(t&&t.includes(kt.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+kt.sep+"`")}function ia(t,e){if(!t)throw new Error("`"+e+"` cannot be empty")}function Vu(t,e){if(!t)throw new Error("Setting `"+e+"` requires `path` to be set too")}function _2(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const y2=(function(t){const r=this.constructor.prototype,i=r[t],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),k2={}.hasOwnProperty;class ws extends y2{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=l2()}copy(){const e=new ws;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];e.use(...r)}return e.data(ta(!0,{},this.namespace)),e}data(e,n){return typeof e=="string"?arguments.length===2?(ua("data",this.frozen),this.namespace[e]=n,this):k2.call(this.namespace,e)&&this.namespace[e]||void 0:e?(ua("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(e,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const n=Zr(e),r=this.parser||this.Parser;return aa("parse",r),r(String(n),n)}process(e,n){const r=this;return this.freeze(),aa("process",this.parser||this.Parser),sa("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,s){const u=Zr(e),o=r.parse(u);r.run(o,u,function(f,c,p){if(f||!c||!p)return l(f);const h=c,m=r.stringify(h,p);S2(m)?p.value=m:p.result=m,l(f,p)});function l(f,c){f||!c?s(f):a?a(c):n(void 0,c)}}}processSync(e){let n=!1,r;return this.freeze(),aa("processSync",this.parser||this.Parser),sa("processSync",this.compiler||this.Compiler),this.process(e,i),Gu("processSync","process",n),r;function i(a,s){n=!0,Yu(a),r=s}}run(e,n,r){Wu(e),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(s,u){const o=Zr(n);i.run(e,o,l);function l(f,c,p){const h=c||e;f?u(f):s?s(h):r(void 0,h,p)}}}runSync(e,n){let r=!1,i;return this.run(e,n,a),Gu("runSync","run",r),i;function a(s,u){Yu(s),i=u,r=!0}}stringify(e,n){this.freeze();const r=Zr(n),i=this.compiler||this.Compiler;return sa("stringify",i),Wu(e),i(e,r)}use(e,...n){const r=this.attachers,i=this.namespace;if(ua("use",this.frozen),e!=null)if(typeof e=="function")o(e,n);else if(typeof e=="object")Array.isArray(e)?u(e):s(e);else throw new TypeError("Expected usable value, not `"+e+"`");return this;function a(l){if(typeof l=="function")o(l,[]);else if(typeof l=="object")if(Array.isArray(l)){const[f,...c]=l;o(f,c)}else s(l);else throw new TypeError("Expected usable value, not `"+l+"`")}function s(l){if(!("plugins"in l)&&!("settings"in l))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");u(l.plugins),l.settings&&(i.settings=ta(!0,i.settings,l.settings))}function u(l){let f=-1;if(l!=null)if(Array.isArray(l))for(;++f<l.length;){const c=l[f];a(c)}else throw new TypeError("Expected a list of plugins, not `"+l+"`")}function o(l,f){let c=-1,p=-1;for(;++c<r.length;)if(r[c][0]===l){p=c;break}if(p===-1)r.push([l,...f]);else if(f.length>0){let[h,...m]=f;const b=r[p][1];Ma(b)&&Ma(h)&&(h=ta(!0,b,h)),r[p]=[l,h,...m]}}}}const A2=new ws().freeze();function aa(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function sa(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function ua(t,e){if(e)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Wu(t){if(!Ma(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function Gu(t,e,n){if(!n)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function Zr(t){return C2(t)?t:new Pc(t)}function C2(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function S2(t){return typeof t=="string"||I2(t)}function I2(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const N2="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Qu=[],Ku={allowDangerousHtml:!0},w2=/^(https?|ircs?|mailto|xmpp)$/i,v2=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function R2(t){const e=O2(t),n=L2(t);return D2(e.runSync(e.parse(n),n),t)}function O2(t){const e=t.rehypePlugins||Qu,n=t.remarkPlugins||Qu,r=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...Ku}:Ku;return A2().use(fE).use(n).use(s2,r).use(e)}function L2(t){const e=t.children||"",n=new Pc;return typeof e=="string"&&(n.value=e),n}function D2(t,e){const n=e.allowedElements,r=e.allowElement,i=e.components,a=e.disallowedElements,s=e.skipHtml,u=e.unwrapDisallowed,o=e.urlTransform||P2;for(const f of v2)Object.hasOwn(e,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+N2+f.id,void 0);return e.className&&(t={type:"element",tagName:"div",properties:{className:e.className},children:t.type==="root"?t.children:[t]}),Di(t,l),G1(t,{Fragment:E.Fragment,components:i,ignoreInvalidStyle:!0,jsx:E.jsx,jsxs:E.jsxs,passKeys:!0,passNode:!0});function l(f,c,p){if(f.type==="raw"&&p&&typeof c=="number")return s?p.children.splice(c,1):p.children[c]={type:"text",value:f.value},c;if(f.type==="element"){let h;for(h in Ki)if(Object.hasOwn(Ki,h)&&Object.hasOwn(f.properties,h)){const m=f.properties[h],b=Ki[h];(b===null||b.includes(f.tagName))&&(f.properties[h]=o(String(m||""),h,f))}}if(f.type==="element"){let h=n?!n.includes(f.tagName):a?a.includes(f.tagName):!1;if(!h&&r&&typeof c=="number"&&(h=!r(f,c,p)),h&&p&&typeof c=="number")return u&&f.children?p.children.splice(c,1,...f.children):p.children.splice(c,1),c}}}function P2(t){const e=t.indexOf(":"),n=t.indexOf("?"),r=t.indexOf("#"),i=t.indexOf("/");return e===-1||i!==-1&&e>i||n!==-1&&e>n||r!==-1&&e>r||w2.test(t.slice(0,e))?t:""}const Xu=/[#.]/g;function M2(t,e){const n=t||"",r={};let i=0,a,s;for(;i<n.length;){Xu.lastIndex=i;const u=Xu.exec(n),o=n.slice(i,u?u.index:n.length);o&&(a?a==="#"?r.id=o:Array.isArray(r.className)?r.className.push(o):r.className=[o]:s=o,i+=o.length),u&&(a=u[0],i++)}return{type:"element",tagName:s||e||"div",properties:r,children:[]}}function Mc(t,e,n){const r=n?U2(n):void 0;function i(a,s,...u){let o;if(a==null){o={type:"root",children:[]};const l=s;u.unshift(l)}else{o=M2(a,e);const l=o.tagName.toLowerCase(),f=r?r.get(l):void 0;if(o.tagName=f||l,B2(s))u.unshift(s);else for(const[c,p]of Object.entries(s))F2(t,o.properties,c,p)}for(const l of u)Fa(o.children,l);return o.type==="element"&&o.tagName==="template"&&(o.content={type:"root",children:o.children},o.children=[]),o}return i}function B2(t){if(t===null||typeof t!="object"||Array.isArray(t))return!0;if(typeof t.type!="string")return!1;const e=t,n=Object.keys(t);for(const r of n){const i=e[r];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const a=i;for(const s of a)if(typeof s!="number"&&typeof s!="string")return!0}}return!!("children"in t&&Array.isArray(t.children))}function F2(t,e,n,r){const i=Ii(t,n);let a;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;a=r}else typeof r=="boolean"?a=r:typeof r=="string"?i.spaceSeparated?a=Tu(r):i.commaSeparated?a=pu(r):i.commaOrSpaceSeparated?a=Tu(pu(r).join(" ")):a=Ju(i,i.property,r):Array.isArray(r)?a=[...r]:a=i.property==="style"?z2(r):String(r);if(Array.isArray(a)){const s=[];for(const u of a)s.push(Ju(i,i.property,u));a=s}i.property==="className"&&Array.isArray(e.className)&&(a=e.className.concat(a)),e[i.property]=a}}function Fa(t,e){if(e!=null)if(typeof e=="number"||typeof e=="string")t.push({type:"text",value:String(e)});else if(Array.isArray(e))for(const n of e)Fa(t,n);else if(typeof e=="object"&&"type"in e)e.type==="root"?Fa(t,e.children):t.push(e);else throw new Error("Expected node, nodes, or string, got `"+e+"`")}function Ju(t,e,n){if(typeof n=="string"){if(t.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((t.boolean||t.overloadedBoolean)&&(n===""||Er(n)===Er(e)))return!0}return n}function z2(t){const e=[];for(const[n,r]of Object.entries(t))e.push([n,r].join(": "));return e.join("; ")}function U2(t){const e=new Map;for(const n of t)e.set(n.toLowerCase(),n);return e}const H2=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],$2=Mc(Rr,"div"),j2=Mc(qt,"g",H2);function Z2(t){const e=String(t),n=[];return{toOffset:i,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=e.length){let s=0;for(;;){let u=n[s];if(u===void 0){const o=eo(e,n[s-1]);u=o===-1?e.length+1:o+1,n[s]=u}if(u>a)return{line:s+1,column:a-(s>0?n[s-1]:0)+1,offset:a};s++}}}function i(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const u=n[n.length-1],o=eo(e,u),l=o===-1?e.length+1:o+1;if(u===l)break;n.push(l)}const s=(a.line>1?n[a.line-2]:0)+a.column-1;if(s<n[a.line-1])return s}}}function eo(t,e){const n=t.indexOf("\r",e),r=t.indexOf(`
98
- `,e);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const rn={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Bc={}.hasOwnProperty,Y2=Object.prototype;function q2(t,e){const n=e||{};return vs({file:n.file||void 0,location:!1,schema:n.space==="svg"?qt:Rr,verbose:n.verbose||!1},t)}function vs(t,e){let n;switch(e.nodeName){case"#comment":{const r=e;return n={type:"comment",value:r.data},Jr(t,r,n),n}case"#document":case"#document-fragment":{const r=e,i="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:Fc(t,e.childNodes),data:{quirksMode:i}},t.file&&t.location){const a=String(t.file),s=Z2(a),u=s.toPoint(0),o=s.toPoint(a.length);n.position={start:u,end:o}}return n}case"#documentType":{const r=e;return n={type:"doctype"},Jr(t,r,n),n}case"#text":{const r=e;return n={type:"text",value:r.value},Jr(t,r,n),n}default:return n=V2(t,e),n}}function Fc(t,e){let n=-1;const r=[];for(;++n<e.length;){const i=vs(t,e[n]);r.push(i)}return r}function V2(t,e){const n=t.schema;t.schema=e.namespaceURI===rn.svg?qt:Rr;let r=-1;const i={};for(;++r<e.attrs.length;){const u=e.attrs[r],o=(u.prefix?u.prefix+":":"")+u.name;Bc.call(Y2,o)||(i[o]=u.value)}const s=(t.schema.space==="svg"?j2:$2)(e.tagName,i,Fc(t,e.childNodes));if(Jr(t,e,s),s.tagName==="template"){const u=e,o=u.sourceCodeLocation,l=o&&o.startTag&&Cn(o.startTag),f=o&&o.endTag&&Cn(o.endTag),c=vs(t,u.content);l&&f&&t.file&&(c.position={start:l.end,end:f.start}),s.content=c}return t.schema=n,s}function Jr(t,e,n){if("sourceCodeLocation"in e&&e.sourceCodeLocation&&t.file){const r=W2(t,n,e.sourceCodeLocation);r&&(t.location=!0,n.position=r)}}function W2(t,e,n){const r=Cn(n);if(e.type==="element"){const i=e.children[e.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),t.verbose){const a={};let s;if(n.attrs)for(s in n.attrs)Bc.call(n.attrs,s)&&(a[Ii(t.schema,s).property]=Cn(n.attrs[s]));n.startTag;const u=Cn(n.startTag),o=n.endTag?Cn(n.endTag):void 0,l={opening:u};o&&(l.closing=o),l.properties=a,e.data={position:l}}}return r}function Cn(t){const e=to({line:t.startLine,column:t.startCol,offset:t.startOffset}),n=to({line:t.endLine,column:t.endCol,offset:t.endOffset});return e||n?{start:e,end:n}:void 0}function to(t){return t.line&&t.column?t:void 0}const no={}.hasOwnProperty;function zc(t,e){const n=e||{};function r(i,...a){let s=r.invalid;const u=r.handlers;if(i&&no.call(i,t)){const o=String(i[t]);s=no.call(u,o)?u[o]:r.unknown}if(s)return s.call(this,i,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const G2={},Q2={}.hasOwnProperty,Uc=zc("type",{handlers:{root:X2,element:rT,text:tT,comment:nT,doctype:eT}});function K2(t,e){const r=(e||G2).space;return Uc(t,r==="svg"?qt:Rr)}function X2(t,e){const n={nodeName:"#document",mode:(t.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Rs(t.children,n,e),Bn(t,n),n}function J2(t,e){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Rs(t.children,n,e),Bn(t,n),n}function eT(t){const e={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Bn(t,e),e}function tT(t){const e={nodeName:"#text",value:t.value,parentNode:null};return Bn(t,e),e}function nT(t){const e={nodeName:"#comment",data:t.value,parentNode:null};return Bn(t,e),e}function rT(t,e){const n=e;let r=n;t.type==="element"&&t.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=qt);const i=[];let a;if(t.properties){for(a in t.properties)if(a!=="children"&&Q2.call(t.properties,a)){const o=iT(r,a,t.properties[a]);o&&i.push(o)}}const s=r.space,u={nodeName:t.tagName,tagName:t.tagName,attrs:i,namespaceURI:rn[s],childNodes:[],parentNode:null};return u.childNodes=Rs(t.children,u,r),Bn(t,u),t.tagName==="template"&&t.content&&(u.content=J2(t.content,r)),u}function iT(t,e,n){const r=Ii(t,e);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?ec(n):oc(n));const i={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=i.name.indexOf(":");a<0?i.prefix="":(i.name=i.name.slice(a+1),i.prefix=r.attribute.slice(0,a)),i.namespace=rn[r.space]}return i}function Rs(t,e,n){let r=-1;const i=[];if(t)for(;++r<t.length;){const a=Uc(t[r],n);a.parentNode=e,i.push(a)}return i}function Bn(t,e){const n=t.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,e.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const aT=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],sT=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),Pe="�";var _;(function(t){t[t.EOF=-1]="EOF",t[t.NULL=0]="NULL",t[t.TABULATION=9]="TABULATION",t[t.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",t[t.LINE_FEED=10]="LINE_FEED",t[t.FORM_FEED=12]="FORM_FEED",t[t.SPACE=32]="SPACE",t[t.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",t[t.QUOTATION_MARK=34]="QUOTATION_MARK",t[t.AMPERSAND=38]="AMPERSAND",t[t.APOSTROPHE=39]="APOSTROPHE",t[t.HYPHEN_MINUS=45]="HYPHEN_MINUS",t[t.SOLIDUS=47]="SOLIDUS",t[t.DIGIT_0=48]="DIGIT_0",t[t.DIGIT_9=57]="DIGIT_9",t[t.SEMICOLON=59]="SEMICOLON",t[t.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",t[t.EQUALS_SIGN=61]="EQUALS_SIGN",t[t.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",t[t.QUESTION_MARK=63]="QUESTION_MARK",t[t.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",t[t.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",t[t.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",t[t.GRAVE_ACCENT=96]="GRAVE_ACCENT",t[t.LATIN_SMALL_A=97]="LATIN_SMALL_A",t[t.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(_||(_={}));const nt={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Hc(t){return t>=55296&&t<=57343}function uT(t){return t>=56320&&t<=57343}function oT(t,e){return(t-55296)*1024+9216+e}function $c(t){return t!==32&&t!==10&&t!==13&&t!==9&&t!==12&&t>=1&&t<=31||t>=127&&t<=159}function jc(t){return t>=64976&&t<=65007||sT.has(t)}var L;(function(t){t.controlCharacterInInputStream="control-character-in-input-stream",t.noncharacterInInputStream="noncharacter-in-input-stream",t.surrogateInInputStream="surrogate-in-input-stream",t.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",t.endTagWithAttributes="end-tag-with-attributes",t.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",t.unexpectedSolidusInTag="unexpected-solidus-in-tag",t.unexpectedNullCharacter="unexpected-null-character",t.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",t.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",t.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",t.missingEndTagName="missing-end-tag-name",t.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",t.unknownNamedCharacterReference="unknown-named-character-reference",t.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",t.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",t.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",t.eofBeforeTagName="eof-before-tag-name",t.eofInTag="eof-in-tag",t.missingAttributeValue="missing-attribute-value",t.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",t.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",t.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",t.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",t.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",t.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",t.missingDoctypePublicIdentifier="missing-doctype-public-identifier",t.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",t.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",t.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",t.cdataInHtmlContent="cdata-in-html-content",t.incorrectlyOpenedComment="incorrectly-opened-comment",t.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",t.eofInDoctype="eof-in-doctype",t.nestedComment="nested-comment",t.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",t.eofInComment="eof-in-comment",t.incorrectlyClosedComment="incorrectly-closed-comment",t.eofInCdata="eof-in-cdata",t.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",t.nullCharacterReference="null-character-reference",t.surrogateCharacterReference="surrogate-character-reference",t.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",t.controlCharacterReference="control-character-reference",t.noncharacterCharacterReference="noncharacter-character-reference",t.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",t.missingDoctypeName="missing-doctype-name",t.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",t.duplicateAttribute="duplicate-attribute",t.nonConformingDoctype="non-conforming-doctype",t.missingDoctype="missing-doctype",t.misplacedDoctype="misplaced-doctype",t.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",t.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",t.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",t.openElementsLeftAfterEof="open-elements-left-after-eof",t.abandonedHeadElementChild="abandoned-head-element-child",t.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",t.nestedNoscriptInHead="nested-noscript-in-head",t.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(L||(L={}));const lT=65536;class cT{constructor(e){this.handler=e,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=lT,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,n){const{line:r,col:i,offset:a}=this,s=i+n,u=a+n;return{code:e,startLine:r,endLine:r,startCol:s,endCol:s,startOffset:u,endOffset:u}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(uT(n))return this.pos++,this._addGap(),oT(e,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,_.EOF;return this._err(L.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,n){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,n){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(e,this.pos);for(let r=0;r<e.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==e.charCodeAt(r))return!1;return!0}peek(e){const n=this.pos+e;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,_.EOF;const r=this.html.charCodeAt(n);return r===_.CARRIAGE_RETURN?_.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,_.EOF;let e=this.html.charCodeAt(this.pos);return e===_.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,_.LINE_FEED):e===_.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Hc(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===_.LINE_FEED||e===_.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){$c(e)?this._err(L.controlCharacterInInputStream):jc(e)&&this._err(L.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var fe;(function(t){t[t.CHARACTER=0]="CHARACTER",t[t.NULL_CHARACTER=1]="NULL_CHARACTER",t[t.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",t[t.START_TAG=3]="START_TAG",t[t.END_TAG=4]="END_TAG",t[t.COMMENT=5]="COMMENT",t[t.DOCTYPE=6]="DOCTYPE",t[t.EOF=7]="EOF",t[t.HIBERNATION=8]="HIBERNATION"})(fe||(fe={}));function Zc(t,e){for(let n=t.attrs.length-1;n>=0;n--)if(t.attrs[n].name===e)return t.attrs[n].value;return null}const dT=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(t=>t.charCodeAt(0))),fT=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function hT(t){var e;return t>=55296&&t<=57343||t>1114111?65533:(e=fT.get(t))!==null&&e!==void 0?e:t}var qe;(function(t){t[t.NUM=35]="NUM",t[t.SEMI=59]="SEMI",t[t.EQUALS=61]="EQUALS",t[t.ZERO=48]="ZERO",t[t.NINE=57]="NINE",t[t.LOWER_A=97]="LOWER_A",t[t.LOWER_F=102]="LOWER_F",t[t.LOWER_X=120]="LOWER_X",t[t.LOWER_Z=122]="LOWER_Z",t[t.UPPER_A=65]="UPPER_A",t[t.UPPER_F=70]="UPPER_F",t[t.UPPER_Z=90]="UPPER_Z"})(qe||(qe={}));const pT=32;var $t;(function(t){t[t.VALUE_LENGTH=49152]="VALUE_LENGTH",t[t.BRANCH_LENGTH=16256]="BRANCH_LENGTH",t[t.JUMP_TABLE=127]="JUMP_TABLE"})($t||($t={}));function za(t){return t>=qe.ZERO&&t<=qe.NINE}function mT(t){return t>=qe.UPPER_A&&t<=qe.UPPER_F||t>=qe.LOWER_A&&t<=qe.LOWER_F}function gT(t){return t>=qe.UPPER_A&&t<=qe.UPPER_Z||t>=qe.LOWER_A&&t<=qe.LOWER_Z||za(t)}function bT(t){return t===qe.EQUALS||gT(t)}var Ye;(function(t){t[t.EntityStart=0]="EntityStart",t[t.NumericStart=1]="NumericStart",t[t.NumericDecimal=2]="NumericDecimal",t[t.NumericHex=3]="NumericHex",t[t.NamedEntity=4]="NamedEntity"})(Ye||(Ye={}));var vt;(function(t){t[t.Legacy=0]="Legacy",t[t.Strict=1]="Strict",t[t.Attribute=2]="Attribute"})(vt||(vt={}));class ET{constructor(e,n,r){this.decodeTree=e,this.emitCodePoint=n,this.errors=r,this.state=Ye.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=vt.Strict}startEntity(e){this.decodeMode=e,this.state=Ye.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,n){switch(this.state){case Ye.EntityStart:return e.charCodeAt(n)===qe.NUM?(this.state=Ye.NumericStart,this.consumed+=1,this.stateNumericStart(e,n+1)):(this.state=Ye.NamedEntity,this.stateNamedEntity(e,n));case Ye.NumericStart:return this.stateNumericStart(e,n);case Ye.NumericDecimal:return this.stateNumericDecimal(e,n);case Ye.NumericHex:return this.stateNumericHex(e,n);case Ye.NamedEntity:return this.stateNamedEntity(e,n)}}stateNumericStart(e,n){return n>=e.length?-1:(e.charCodeAt(n)|pT)===qe.LOWER_X?(this.state=Ye.NumericHex,this.consumed+=1,this.stateNumericHex(e,n+1)):(this.state=Ye.NumericDecimal,this.stateNumericDecimal(e,n))}addToNumericResult(e,n,r,i){if(n!==r){const a=r-n;this.result=this.result*Math.pow(i,a)+Number.parseInt(e.substr(n,a),i),this.consumed+=a}}stateNumericHex(e,n){const r=n;for(;n<e.length;){const i=e.charCodeAt(n);if(za(i)||mT(i))n+=1;else return this.addToNumericResult(e,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(e,r,n,16),-1}stateNumericDecimal(e,n){const r=n;for(;n<e.length;){const i=e.charCodeAt(n);if(za(i))n+=1;else return this.addToNumericResult(e,r,n,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(e,r,n,10),-1}emitNumericEntity(e,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===qe.SEMI)this.consumed+=1;else if(this.decodeMode===vt.Strict)return 0;return this.emitCodePoint(hT(this.result),this.consumed),this.errors&&(e!==qe.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,n){const{decodeTree:r}=this;let i=r[this.treeIndex],a=(i&$t.VALUE_LENGTH)>>14;for(;n<e.length;n++,this.excess++){const s=e.charCodeAt(n);if(this.treeIndex=TT(r,i,this.treeIndex+Math.max(1,a),s),this.treeIndex<0)return this.result===0||this.decodeMode===vt.Attribute&&(a===0||bT(s))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],a=(i&$t.VALUE_LENGTH)>>14,a!==0){if(s===qe.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==vt.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:n,decodeTree:r}=this,i=(r[n]&$t.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(e=this.errors)===null||e===void 0||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[e]&~$t.VALUE_LENGTH:i[e+1],r),n===3&&this.emitCodePoint(i[e+2],r),r}end(){var e;switch(this.state){case Ye.NamedEntity:return this.result!==0&&(this.decodeMode!==vt.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Ye.NumericDecimal:return this.emitNumericEntity(0,2);case Ye.NumericHex:return this.emitNumericEntity(0,3);case Ye.NumericStart:return(e=this.errors)===null||e===void 0||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Ye.EntityStart:return 0}}}function TT(t,e,n,r){const i=(e&$t.BRANCH_LENGTH)>>7,a=e&$t.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){const o=r-a;return o<0||o>=i?-1:t[n+o]-1}let s=n,u=s+i-1;for(;s<=u;){const o=s+u>>>1,l=t[o];if(l<r)s=o+1;else if(l>r)u=o-1;else return t[o+i]}return-1}var $;(function(t){t.HTML="http://www.w3.org/1999/xhtml",t.MATHML="http://www.w3.org/1998/Math/MathML",t.SVG="http://www.w3.org/2000/svg",t.XLINK="http://www.w3.org/1999/xlink",t.XML="http://www.w3.org/XML/1998/namespace",t.XMLNS="http://www.w3.org/2000/xmlns/"})($||($={}));var an;(function(t){t.TYPE="type",t.ACTION="action",t.ENCODING="encoding",t.PROMPT="prompt",t.NAME="name",t.COLOR="color",t.FACE="face",t.SIZE="size"})(an||(an={}));var pt;(function(t){t.NO_QUIRKS="no-quirks",t.QUIRKS="quirks",t.LIMITED_QUIRKS="limited-quirks"})(pt||(pt={}));var O;(function(t){t.A="a",t.ADDRESS="address",t.ANNOTATION_XML="annotation-xml",t.APPLET="applet",t.AREA="area",t.ARTICLE="article",t.ASIDE="aside",t.B="b",t.BASE="base",t.BASEFONT="basefont",t.BGSOUND="bgsound",t.BIG="big",t.BLOCKQUOTE="blockquote",t.BODY="body",t.BR="br",t.BUTTON="button",t.CAPTION="caption",t.CENTER="center",t.CODE="code",t.COL="col",t.COLGROUP="colgroup",t.DD="dd",t.DESC="desc",t.DETAILS="details",t.DIALOG="dialog",t.DIR="dir",t.DIV="div",t.DL="dl",t.DT="dt",t.EM="em",t.EMBED="embed",t.FIELDSET="fieldset",t.FIGCAPTION="figcaption",t.FIGURE="figure",t.FONT="font",t.FOOTER="footer",t.FOREIGN_OBJECT="foreignObject",t.FORM="form",t.FRAME="frame",t.FRAMESET="frameset",t.H1="h1",t.H2="h2",t.H3="h3",t.H4="h4",t.H5="h5",t.H6="h6",t.HEAD="head",t.HEADER="header",t.HGROUP="hgroup",t.HR="hr",t.HTML="html",t.I="i",t.IMG="img",t.IMAGE="image",t.INPUT="input",t.IFRAME="iframe",t.KEYGEN="keygen",t.LABEL="label",t.LI="li",t.LINK="link",t.LISTING="listing",t.MAIN="main",t.MALIGNMARK="malignmark",t.MARQUEE="marquee",t.MATH="math",t.MENU="menu",t.META="meta",t.MGLYPH="mglyph",t.MI="mi",t.MO="mo",t.MN="mn",t.MS="ms",t.MTEXT="mtext",t.NAV="nav",t.NOBR="nobr",t.NOFRAMES="noframes",t.NOEMBED="noembed",t.NOSCRIPT="noscript",t.OBJECT="object",t.OL="ol",t.OPTGROUP="optgroup",t.OPTION="option",t.P="p",t.PARAM="param",t.PLAINTEXT="plaintext",t.PRE="pre",t.RB="rb",t.RP="rp",t.RT="rt",t.RTC="rtc",t.RUBY="ruby",t.S="s",t.SCRIPT="script",t.SEARCH="search",t.SECTION="section",t.SELECT="select",t.SOURCE="source",t.SMALL="small",t.SPAN="span",t.STRIKE="strike",t.STRONG="strong",t.STYLE="style",t.SUB="sub",t.SUMMARY="summary",t.SUP="sup",t.TABLE="table",t.TBODY="tbody",t.TEMPLATE="template",t.TEXTAREA="textarea",t.TFOOT="tfoot",t.TD="td",t.TH="th",t.THEAD="thead",t.TITLE="title",t.TR="tr",t.TRACK="track",t.TT="tt",t.U="u",t.UL="ul",t.SVG="svg",t.VAR="var",t.WBR="wbr",t.XMP="xmp"})(O||(O={}));var d;(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.A=1]="A",t[t.ADDRESS=2]="ADDRESS",t[t.ANNOTATION_XML=3]="ANNOTATION_XML",t[t.APPLET=4]="APPLET",t[t.AREA=5]="AREA",t[t.ARTICLE=6]="ARTICLE",t[t.ASIDE=7]="ASIDE",t[t.B=8]="B",t[t.BASE=9]="BASE",t[t.BASEFONT=10]="BASEFONT",t[t.BGSOUND=11]="BGSOUND",t[t.BIG=12]="BIG",t[t.BLOCKQUOTE=13]="BLOCKQUOTE",t[t.BODY=14]="BODY",t[t.BR=15]="BR",t[t.BUTTON=16]="BUTTON",t[t.CAPTION=17]="CAPTION",t[t.CENTER=18]="CENTER",t[t.CODE=19]="CODE",t[t.COL=20]="COL",t[t.COLGROUP=21]="COLGROUP",t[t.DD=22]="DD",t[t.DESC=23]="DESC",t[t.DETAILS=24]="DETAILS",t[t.DIALOG=25]="DIALOG",t[t.DIR=26]="DIR",t[t.DIV=27]="DIV",t[t.DL=28]="DL",t[t.DT=29]="DT",t[t.EM=30]="EM",t[t.EMBED=31]="EMBED",t[t.FIELDSET=32]="FIELDSET",t[t.FIGCAPTION=33]="FIGCAPTION",t[t.FIGURE=34]="FIGURE",t[t.FONT=35]="FONT",t[t.FOOTER=36]="FOOTER",t[t.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",t[t.FORM=38]="FORM",t[t.FRAME=39]="FRAME",t[t.FRAMESET=40]="FRAMESET",t[t.H1=41]="H1",t[t.H2=42]="H2",t[t.H3=43]="H3",t[t.H4=44]="H4",t[t.H5=45]="H5",t[t.H6=46]="H6",t[t.HEAD=47]="HEAD",t[t.HEADER=48]="HEADER",t[t.HGROUP=49]="HGROUP",t[t.HR=50]="HR",t[t.HTML=51]="HTML",t[t.I=52]="I",t[t.IMG=53]="IMG",t[t.IMAGE=54]="IMAGE",t[t.INPUT=55]="INPUT",t[t.IFRAME=56]="IFRAME",t[t.KEYGEN=57]="KEYGEN",t[t.LABEL=58]="LABEL",t[t.LI=59]="LI",t[t.LINK=60]="LINK",t[t.LISTING=61]="LISTING",t[t.MAIN=62]="MAIN",t[t.MALIGNMARK=63]="MALIGNMARK",t[t.MARQUEE=64]="MARQUEE",t[t.MATH=65]="MATH",t[t.MENU=66]="MENU",t[t.META=67]="META",t[t.MGLYPH=68]="MGLYPH",t[t.MI=69]="MI",t[t.MO=70]="MO",t[t.MN=71]="MN",t[t.MS=72]="MS",t[t.MTEXT=73]="MTEXT",t[t.NAV=74]="NAV",t[t.NOBR=75]="NOBR",t[t.NOFRAMES=76]="NOFRAMES",t[t.NOEMBED=77]="NOEMBED",t[t.NOSCRIPT=78]="NOSCRIPT",t[t.OBJECT=79]="OBJECT",t[t.OL=80]="OL",t[t.OPTGROUP=81]="OPTGROUP",t[t.OPTION=82]="OPTION",t[t.P=83]="P",t[t.PARAM=84]="PARAM",t[t.PLAINTEXT=85]="PLAINTEXT",t[t.PRE=86]="PRE",t[t.RB=87]="RB",t[t.RP=88]="RP",t[t.RT=89]="RT",t[t.RTC=90]="RTC",t[t.RUBY=91]="RUBY",t[t.S=92]="S",t[t.SCRIPT=93]="SCRIPT",t[t.SEARCH=94]="SEARCH",t[t.SECTION=95]="SECTION",t[t.SELECT=96]="SELECT",t[t.SOURCE=97]="SOURCE",t[t.SMALL=98]="SMALL",t[t.SPAN=99]="SPAN",t[t.STRIKE=100]="STRIKE",t[t.STRONG=101]="STRONG",t[t.STYLE=102]="STYLE",t[t.SUB=103]="SUB",t[t.SUMMARY=104]="SUMMARY",t[t.SUP=105]="SUP",t[t.TABLE=106]="TABLE",t[t.TBODY=107]="TBODY",t[t.TEMPLATE=108]="TEMPLATE",t[t.TEXTAREA=109]="TEXTAREA",t[t.TFOOT=110]="TFOOT",t[t.TD=111]="TD",t[t.TH=112]="TH",t[t.THEAD=113]="THEAD",t[t.TITLE=114]="TITLE",t[t.TR=115]="TR",t[t.TRACK=116]="TRACK",t[t.TT=117]="TT",t[t.U=118]="U",t[t.UL=119]="UL",t[t.SVG=120]="SVG",t[t.VAR=121]="VAR",t[t.WBR=122]="WBR",t[t.XMP=123]="XMP"})(d||(d={}));const xT=new Map([[O.A,d.A],[O.ADDRESS,d.ADDRESS],[O.ANNOTATION_XML,d.ANNOTATION_XML],[O.APPLET,d.APPLET],[O.AREA,d.AREA],[O.ARTICLE,d.ARTICLE],[O.ASIDE,d.ASIDE],[O.B,d.B],[O.BASE,d.BASE],[O.BASEFONT,d.BASEFONT],[O.BGSOUND,d.BGSOUND],[O.BIG,d.BIG],[O.BLOCKQUOTE,d.BLOCKQUOTE],[O.BODY,d.BODY],[O.BR,d.BR],[O.BUTTON,d.BUTTON],[O.CAPTION,d.CAPTION],[O.CENTER,d.CENTER],[O.CODE,d.CODE],[O.COL,d.COL],[O.COLGROUP,d.COLGROUP],[O.DD,d.DD],[O.DESC,d.DESC],[O.DETAILS,d.DETAILS],[O.DIALOG,d.DIALOG],[O.DIR,d.DIR],[O.DIV,d.DIV],[O.DL,d.DL],[O.DT,d.DT],[O.EM,d.EM],[O.EMBED,d.EMBED],[O.FIELDSET,d.FIELDSET],[O.FIGCAPTION,d.FIGCAPTION],[O.FIGURE,d.FIGURE],[O.FONT,d.FONT],[O.FOOTER,d.FOOTER],[O.FOREIGN_OBJECT,d.FOREIGN_OBJECT],[O.FORM,d.FORM],[O.FRAME,d.FRAME],[O.FRAMESET,d.FRAMESET],[O.H1,d.H1],[O.H2,d.H2],[O.H3,d.H3],[O.H4,d.H4],[O.H5,d.H5],[O.H6,d.H6],[O.HEAD,d.HEAD],[O.HEADER,d.HEADER],[O.HGROUP,d.HGROUP],[O.HR,d.HR],[O.HTML,d.HTML],[O.I,d.I],[O.IMG,d.IMG],[O.IMAGE,d.IMAGE],[O.INPUT,d.INPUT],[O.IFRAME,d.IFRAME],[O.KEYGEN,d.KEYGEN],[O.LABEL,d.LABEL],[O.LI,d.LI],[O.LINK,d.LINK],[O.LISTING,d.LISTING],[O.MAIN,d.MAIN],[O.MALIGNMARK,d.MALIGNMARK],[O.MARQUEE,d.MARQUEE],[O.MATH,d.MATH],[O.MENU,d.MENU],[O.META,d.META],[O.MGLYPH,d.MGLYPH],[O.MI,d.MI],[O.MO,d.MO],[O.MN,d.MN],[O.MS,d.MS],[O.MTEXT,d.MTEXT],[O.NAV,d.NAV],[O.NOBR,d.NOBR],[O.NOFRAMES,d.NOFRAMES],[O.NOEMBED,d.NOEMBED],[O.NOSCRIPT,d.NOSCRIPT],[O.OBJECT,d.OBJECT],[O.OL,d.OL],[O.OPTGROUP,d.OPTGROUP],[O.OPTION,d.OPTION],[O.P,d.P],[O.PARAM,d.PARAM],[O.PLAINTEXT,d.PLAINTEXT],[O.PRE,d.PRE],[O.RB,d.RB],[O.RP,d.RP],[O.RT,d.RT],[O.RTC,d.RTC],[O.RUBY,d.RUBY],[O.S,d.S],[O.SCRIPT,d.SCRIPT],[O.SEARCH,d.SEARCH],[O.SECTION,d.SECTION],[O.SELECT,d.SELECT],[O.SOURCE,d.SOURCE],[O.SMALL,d.SMALL],[O.SPAN,d.SPAN],[O.STRIKE,d.STRIKE],[O.STRONG,d.STRONG],[O.STYLE,d.STYLE],[O.SUB,d.SUB],[O.SUMMARY,d.SUMMARY],[O.SUP,d.SUP],[O.TABLE,d.TABLE],[O.TBODY,d.TBODY],[O.TEMPLATE,d.TEMPLATE],[O.TEXTAREA,d.TEXTAREA],[O.TFOOT,d.TFOOT],[O.TD,d.TD],[O.TH,d.TH],[O.THEAD,d.THEAD],[O.TITLE,d.TITLE],[O.TR,d.TR],[O.TRACK,d.TRACK],[O.TT,d.TT],[O.U,d.U],[O.UL,d.UL],[O.SVG,d.SVG],[O.VAR,d.VAR],[O.WBR,d.WBR],[O.XMP,d.XMP]]);function Fn(t){var e;return(e=xT.get(t))!==null&&e!==void 0?e:d.UNKNOWN}const j=d,_T={[$.HTML]:new Set([j.ADDRESS,j.APPLET,j.AREA,j.ARTICLE,j.ASIDE,j.BASE,j.BASEFONT,j.BGSOUND,j.BLOCKQUOTE,j.BODY,j.BR,j.BUTTON,j.CAPTION,j.CENTER,j.COL,j.COLGROUP,j.DD,j.DETAILS,j.DIR,j.DIV,j.DL,j.DT,j.EMBED,j.FIELDSET,j.FIGCAPTION,j.FIGURE,j.FOOTER,j.FORM,j.FRAME,j.FRAMESET,j.H1,j.H2,j.H3,j.H4,j.H5,j.H6,j.HEAD,j.HEADER,j.HGROUP,j.HR,j.HTML,j.IFRAME,j.IMG,j.INPUT,j.LI,j.LINK,j.LISTING,j.MAIN,j.MARQUEE,j.MENU,j.META,j.NAV,j.NOEMBED,j.NOFRAMES,j.NOSCRIPT,j.OBJECT,j.OL,j.P,j.PARAM,j.PLAINTEXT,j.PRE,j.SCRIPT,j.SECTION,j.SELECT,j.SOURCE,j.STYLE,j.SUMMARY,j.TABLE,j.TBODY,j.TD,j.TEMPLATE,j.TEXTAREA,j.TFOOT,j.TH,j.THEAD,j.TITLE,j.TR,j.TRACK,j.UL,j.WBR,j.XMP]),[$.MATHML]:new Set([j.MI,j.MO,j.MN,j.MS,j.MTEXT,j.ANNOTATION_XML]),[$.SVG]:new Set([j.TITLE,j.FOREIGN_OBJECT,j.DESC]),[$.XLINK]:new Set,[$.XML]:new Set,[$.XMLNS]:new Set},Ua=new Set([j.H1,j.H2,j.H3,j.H4,j.H5,j.H6]);O.STYLE,O.SCRIPT,O.XMP,O.IFRAME,O.NOEMBED,O.NOFRAMES,O.PLAINTEXT;var A;(function(t){t[t.DATA=0]="DATA",t[t.RCDATA=1]="RCDATA",t[t.RAWTEXT=2]="RAWTEXT",t[t.SCRIPT_DATA=3]="SCRIPT_DATA",t[t.PLAINTEXT=4]="PLAINTEXT",t[t.TAG_OPEN=5]="TAG_OPEN",t[t.END_TAG_OPEN=6]="END_TAG_OPEN",t[t.TAG_NAME=7]="TAG_NAME",t[t.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",t[t.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",t[t.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",t[t.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",t[t.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",t[t.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",t[t.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",t[t.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",t[t.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",t[t.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",t[t.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",t[t.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",t[t.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",t[t.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",t[t.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",t[t.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",t[t.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",t[t.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",t[t.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",t[t.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",t[t.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",t[t.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",t[t.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",t[t.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",t[t.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",t[t.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",t[t.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",t[t.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",t[t.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",t[t.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",t[t.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",t[t.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",t[t.BOGUS_COMMENT=40]="BOGUS_COMMENT",t[t.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",t[t.COMMENT_START=42]="COMMENT_START",t[t.COMMENT_START_DASH=43]="COMMENT_START_DASH",t[t.COMMENT=44]="COMMENT",t[t.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",t[t.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",t[t.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",t[t.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",t[t.COMMENT_END_DASH=49]="COMMENT_END_DASH",t[t.COMMENT_END=50]="COMMENT_END",t[t.COMMENT_END_BANG=51]="COMMENT_END_BANG",t[t.DOCTYPE=52]="DOCTYPE",t[t.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",t[t.DOCTYPE_NAME=54]="DOCTYPE_NAME",t[t.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",t[t.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",t[t.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",t[t.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",t[t.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",t[t.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",t[t.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",t[t.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",t[t.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",t[t.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",t[t.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",t[t.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",t[t.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",t[t.CDATA_SECTION=68]="CDATA_SECTION",t[t.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",t[t.CDATA_SECTION_END=70]="CDATA_SECTION_END",t[t.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",t[t.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(A||(A={}));const He={DATA:A.DATA,RCDATA:A.RCDATA,RAWTEXT:A.RAWTEXT,SCRIPT_DATA:A.SCRIPT_DATA,PLAINTEXT:A.PLAINTEXT,CDATA_SECTION:A.CDATA_SECTION};function yT(t){return t>=_.DIGIT_0&&t<=_.DIGIT_9}function er(t){return t>=_.LATIN_CAPITAL_A&&t<=_.LATIN_CAPITAL_Z}function kT(t){return t>=_.LATIN_SMALL_A&&t<=_.LATIN_SMALL_Z}function Bt(t){return kT(t)||er(t)}function ro(t){return Bt(t)||yT(t)}function Yr(t){return t+32}function Yc(t){return t===_.SPACE||t===_.LINE_FEED||t===_.TABULATION||t===_.FORM_FEED}function io(t){return Yc(t)||t===_.SOLIDUS||t===_.GREATER_THAN_SIGN}function AT(t){return t===_.NULL?L.nullCharacterReference:t>1114111?L.characterReferenceOutsideUnicodeRange:Hc(t)?L.surrogateCharacterReference:jc(t)?L.noncharacterCharacterReference:$c(t)||t===_.CARRIAGE_RETURN?L.controlCharacterReference:null}class CT{constructor(e,n){this.options=e,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=A.DATA,this.returnState=A.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new cT(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new ET(dT,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(L.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(L.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=AT(r);i&&this._err(i,1)}}:void 0)}_err(e,n=0){var r,i;(i=(r=this.handler).onParseError)===null||i===void 0||i.call(r,this.preprocessor.getError(e,n))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||e?.())}write(e,n,r){this.active=!0,this.preprocessor.write(e,n),this._runParsingLoop(),this.paused||r?.()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let n=0;n<e;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,n){return this.preprocessor.startsWith(e,n)?(this._advanceBy(e.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:fe.START_TAG,tagName:"",tagID:d.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:fe.END_TAG,tagName:"",tagID:d.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:fe.COMMENT,data:"",location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:fe.DOCTYPE,name:e,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(e,n){this.currentCharacterToken={type:e,chars:n,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e,n;const r=this.currentToken;if(Zc(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const i=(e=(n=r.location).attrs)!==null&&e!==void 0?e:n.attrs=Object.create(null);i[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(L.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(e){this._emitCurrentCharacterToken(e.location),this.currentToken=null,e.location&&(e.location.endLine=this.preprocessor.line,e.location.endCol=this.preprocessor.col+1,e.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const e=this.currentToken;this.prepareToken(e),e.tagID=Fn(e.tagName),e.type===fe.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(L.endTagWithAttributes),e.selfClosing&&this._err(L.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case fe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case fe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case fe.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:fe.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===e){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(e,n)}_emitCodePoint(e){const n=Yc(e)?fe.WHITESPACE_CHARACTER:e===_.NULL?fe.NULL_CHARACTER:fe.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(fe.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=A.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?vt.Attribute:vt.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===A.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===A.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===A.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case A.DATA:{this._stateData(e);break}case A.RCDATA:{this._stateRcdata(e);break}case A.RAWTEXT:{this._stateRawtext(e);break}case A.SCRIPT_DATA:{this._stateScriptData(e);break}case A.PLAINTEXT:{this._statePlaintext(e);break}case A.TAG_OPEN:{this._stateTagOpen(e);break}case A.END_TAG_OPEN:{this._stateEndTagOpen(e);break}case A.TAG_NAME:{this._stateTagName(e);break}case A.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(e);break}case A.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(e);break}case A.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(e);break}case A.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(e);break}case A.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(e);break}case A.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(e);break}case A.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(e);break}case A.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(e);break}case A.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(e);break}case A.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(e);break}case A.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(e);break}case A.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(e);break}case A.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(e);break}case A.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(e);break}case A.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(e);break}case A.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(e);break}case A.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(e);break}case A.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(e);break}case A.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(e);break}case A.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(e);break}case A.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(e);break}case A.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(e);break}case A.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(e);break}case A.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(e);break}case A.ATTRIBUTE_NAME:{this._stateAttributeName(e);break}case A.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(e);break}case A.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(e);break}case A.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(e);break}case A.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(e);break}case A.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(e);break}case A.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(e);break}case A.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(e);break}case A.BOGUS_COMMENT:{this._stateBogusComment(e);break}case A.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(e);break}case A.COMMENT_START:{this._stateCommentStart(e);break}case A.COMMENT_START_DASH:{this._stateCommentStartDash(e);break}case A.COMMENT:{this._stateComment(e);break}case A.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(e);break}case A.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(e);break}case A.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(e);break}case A.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(e);break}case A.COMMENT_END_DASH:{this._stateCommentEndDash(e);break}case A.COMMENT_END:{this._stateCommentEnd(e);break}case A.COMMENT_END_BANG:{this._stateCommentEndBang(e);break}case A.DOCTYPE:{this._stateDoctype(e);break}case A.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(e);break}case A.DOCTYPE_NAME:{this._stateDoctypeName(e);break}case A.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(e);break}case A.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(e);break}case A.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(e);break}case A.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(e);break}case A.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(e);break}case A.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(e);break}case A.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break}case A.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(e);break}case A.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(e);break}case A.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(e);break}case A.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(e);break}case A.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(e);break}case A.BOGUS_DOCTYPE:{this._stateBogusDoctype(e);break}case A.CDATA_SECTION:{this._stateCdataSection(e);break}case A.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(e);break}case A.CDATA_SECTION_END:{this._stateCdataSectionEnd(e);break}case A.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case A.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(e);break}default:throw new Error("Unknown state")}}_stateData(e){switch(e){case _.LESS_THAN_SIGN:{this.state=A.TAG_OPEN;break}case _.AMPERSAND:{this._startCharacterReference();break}case _.NULL:{this._err(L.unexpectedNullCharacter),this._emitCodePoint(e);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case _.AMPERSAND:{this._startCharacterReference();break}case _.LESS_THAN_SIGN:{this.state=A.RCDATA_LESS_THAN_SIGN;break}case _.NULL:{this._err(L.unexpectedNullCharacter),this._emitChars(Pe);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case _.LESS_THAN_SIGN:{this.state=A.RAWTEXT_LESS_THAN_SIGN;break}case _.NULL:{this._err(L.unexpectedNullCharacter),this._emitChars(Pe);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case _.LESS_THAN_SIGN:{this.state=A.SCRIPT_DATA_LESS_THAN_SIGN;break}case _.NULL:{this._err(L.unexpectedNullCharacter),this._emitChars(Pe);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case _.NULL:{this._err(L.unexpectedNullCharacter),this._emitChars(Pe);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateTagOpen(e){if(Bt(e))this._createStartTagToken(),this.state=A.TAG_NAME,this._stateTagName(e);else switch(e){case _.EXCLAMATION_MARK:{this.state=A.MARKUP_DECLARATION_OPEN;break}case _.SOLIDUS:{this.state=A.END_TAG_OPEN;break}case _.QUESTION_MARK:{this._err(L.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=A.BOGUS_COMMENT,this._stateBogusComment(e);break}case _.EOF:{this._err(L.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(L.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=A.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(Bt(e))this._createEndTagToken(),this.state=A.TAG_NAME,this._stateTagName(e);else switch(e){case _.GREATER_THAN_SIGN:{this._err(L.missingEndTagName),this.state=A.DATA;break}case _.EOF:{this._err(L.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(L.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=A.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){const n=this.currentToken;switch(e){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=A.BEFORE_ATTRIBUTE_NAME;break}case _.SOLIDUS:{this.state=A.SELF_CLOSING_START_TAG;break}case _.GREATER_THAN_SIGN:{this.state=A.DATA,this.emitCurrentTagToken();break}case _.NULL:{this._err(L.unexpectedNullCharacter),n.tagName+=Pe;break}case _.EOF:{this._err(L.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(er(e)?Yr(e):e)}}_stateRcdataLessThanSign(e){e===_.SOLIDUS?this.state=A.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=A.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){Bt(e)?(this.state=A.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars("</"),this.state=A.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=A.BEFORE_ATTRIBUTE_NAME,!1;case _.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=A.SELF_CLOSING_START_TAG,!1;case _.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=A.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=A.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===_.SOLIDUS?this.state=A.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=A.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){Bt(e)?(this.state=A.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars("</"),this.state=A.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=A.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case _.SOLIDUS:{this.state=A.SCRIPT_DATA_END_TAG_OPEN;break}case _.EXCLAMATION_MARK:{this.state=A.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=A.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){Bt(e)?(this.state=A.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars("</"),this.state=A.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=A.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===_.HYPHEN_MINUS?(this.state=A.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=A.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===_.HYPHEN_MINUS?(this.state=A.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=A.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case _.HYPHEN_MINUS:{this.state=A.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=A.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case _.NULL:{this._err(L.unexpectedNullCharacter),this._emitChars(Pe);break}case _.EOF:{this._err(L.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case _.HYPHEN_MINUS:{this.state=A.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=A.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case _.NULL:{this._err(L.unexpectedNullCharacter),this.state=A.SCRIPT_DATA_ESCAPED,this._emitChars(Pe);break}case _.EOF:{this._err(L.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=A.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case _.HYPHEN_MINUS:{this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=A.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case _.GREATER_THAN_SIGN:{this.state=A.SCRIPT_DATA,this._emitChars(">");break}case _.NULL:{this._err(L.unexpectedNullCharacter),this.state=A.SCRIPT_DATA_ESCAPED,this._emitChars(Pe);break}case _.EOF:{this._err(L.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=A.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===_.SOLIDUS?this.state=A.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Bt(e)?(this._emitChars("<"),this.state=A.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars("<"),this.state=A.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){Bt(e)?(this.state=A.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars("</"),this.state=A.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=A.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(nt.SCRIPT,!1)&&io(this.preprocessor.peek(nt.SCRIPT.length))){this._emitCodePoint(e);for(let n=0;n<nt.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=A.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case _.HYPHEN_MINUS:{this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case _.NULL:{this._err(L.unexpectedNullCharacter),this._emitChars(Pe);break}case _.EOF:{this._err(L.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case _.HYPHEN_MINUS:{this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case _.NULL:{this._err(L.unexpectedNullCharacter),this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Pe);break}case _.EOF:{this._err(L.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case _.HYPHEN_MINUS:{this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case _.GREATER_THAN_SIGN:{this.state=A.SCRIPT_DATA,this._emitChars(">");break}case _.NULL:{this._err(L.unexpectedNullCharacter),this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Pe);break}case _.EOF:{this._err(L.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===_.SOLIDUS?(this.state=A.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(nt.SCRIPT,!1)&&io(this.preprocessor.peek(nt.SCRIPT.length))){this._emitCodePoint(e);for(let n=0;n<nt.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=A.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.SOLIDUS:case _.GREATER_THAN_SIGN:case _.EOF:{this.state=A.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break}case _.EQUALS_SIGN:{this._err(L.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=A.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=A.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:case _.SOLIDUS:case _.GREATER_THAN_SIGN:case _.EOF:{this._leaveAttrName(),this.state=A.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break}case _.EQUALS_SIGN:{this._leaveAttrName(),this.state=A.BEFORE_ATTRIBUTE_VALUE;break}case _.QUOTATION_MARK:case _.APOSTROPHE:case _.LESS_THAN_SIGN:{this._err(L.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break}case _.NULL:{this._err(L.unexpectedNullCharacter),this.currentAttr.name+=Pe;break}default:this.currentAttr.name+=String.fromCodePoint(er(e)?Yr(e):e)}}_stateAfterAttributeName(e){switch(e){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.SOLIDUS:{this.state=A.SELF_CLOSING_START_TAG;break}case _.EQUALS_SIGN:{this.state=A.BEFORE_ATTRIBUTE_VALUE;break}case _.GREATER_THAN_SIGN:{this.state=A.DATA,this.emitCurrentTagToken();break}case _.EOF:{this._err(L.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=A.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.QUOTATION_MARK:{this.state=A.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case _.APOSTROPHE:{this.state=A.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case _.GREATER_THAN_SIGN:{this._err(L.missingAttributeValue),this.state=A.DATA,this.emitCurrentTagToken();break}default:this.state=A.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case _.QUOTATION_MARK:{this.state=A.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case _.AMPERSAND:{this._startCharacterReference();break}case _.NULL:{this._err(L.unexpectedNullCharacter),this.currentAttr.value+=Pe;break}case _.EOF:{this._err(L.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case _.APOSTROPHE:{this.state=A.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case _.AMPERSAND:{this._startCharacterReference();break}case _.NULL:{this._err(L.unexpectedNullCharacter),this.currentAttr.value+=Pe;break}case _.EOF:{this._err(L.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this._leaveAttrValue(),this.state=A.BEFORE_ATTRIBUTE_NAME;break}case _.AMPERSAND:{this._startCharacterReference();break}case _.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=A.DATA,this.emitCurrentTagToken();break}case _.NULL:{this._err(L.unexpectedNullCharacter),this.currentAttr.value+=Pe;break}case _.QUOTATION_MARK:case _.APOSTROPHE:case _.LESS_THAN_SIGN:case _.EQUALS_SIGN:case _.GRAVE_ACCENT:{this._err(L.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break}case _.EOF:{this._err(L.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this._leaveAttrValue(),this.state=A.BEFORE_ATTRIBUTE_NAME;break}case _.SOLIDUS:{this._leaveAttrValue(),this.state=A.SELF_CLOSING_START_TAG;break}case _.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=A.DATA,this.emitCurrentTagToken();break}case _.EOF:{this._err(L.eofInTag),this._emitEOFToken();break}default:this._err(L.missingWhitespaceBetweenAttributes),this.state=A.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case _.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=A.DATA,this.emitCurrentTagToken();break}case _.EOF:{this._err(L.eofInTag),this._emitEOFToken();break}default:this._err(L.unexpectedSolidusInTag),this.state=A.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){const n=this.currentToken;switch(e){case _.GREATER_THAN_SIGN:{this.state=A.DATA,this.emitCurrentComment(n);break}case _.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case _.NULL:{this._err(L.unexpectedNullCharacter),n.data+=Pe;break}default:n.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(nt.DASH_DASH,!0)?(this._createCommentToken(nt.DASH_DASH.length+1),this.state=A.COMMENT_START):this._consumeSequenceIfMatch(nt.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(nt.DOCTYPE.length+1),this.state=A.DOCTYPE):this._consumeSequenceIfMatch(nt.CDATA_START,!0)?this.inForeignNode?this.state=A.CDATA_SECTION:(this._err(L.cdataInHtmlContent),this._createCommentToken(nt.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=A.BOGUS_COMMENT):this._ensureHibernation()||(this._err(L.incorrectlyOpenedComment),this._createCommentToken(2),this.state=A.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case _.HYPHEN_MINUS:{this.state=A.COMMENT_START_DASH;break}case _.GREATER_THAN_SIGN:{this._err(L.abruptClosingOfEmptyComment),this.state=A.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=A.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){const n=this.currentToken;switch(e){case _.HYPHEN_MINUS:{this.state=A.COMMENT_END;break}case _.GREATER_THAN_SIGN:{this._err(L.abruptClosingOfEmptyComment),this.state=A.DATA,this.emitCurrentComment(n);break}case _.EOF:{this._err(L.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=A.COMMENT,this._stateComment(e)}}_stateComment(e){const n=this.currentToken;switch(e){case _.HYPHEN_MINUS:{this.state=A.COMMENT_END_DASH;break}case _.LESS_THAN_SIGN:{n.data+="<",this.state=A.COMMENT_LESS_THAN_SIGN;break}case _.NULL:{this._err(L.unexpectedNullCharacter),n.data+=Pe;break}case _.EOF:{this._err(L.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){const n=this.currentToken;switch(e){case _.EXCLAMATION_MARK:{n.data+="!",this.state=A.COMMENT_LESS_THAN_SIGN_BANG;break}case _.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=A.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===_.HYPHEN_MINUS?this.state=A.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=A.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===_.HYPHEN_MINUS?this.state=A.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=A.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==_.GREATER_THAN_SIGN&&e!==_.EOF&&this._err(L.nestedComment),this.state=A.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){const n=this.currentToken;switch(e){case _.HYPHEN_MINUS:{this.state=A.COMMENT_END;break}case _.EOF:{this._err(L.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=A.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){const n=this.currentToken;switch(e){case _.GREATER_THAN_SIGN:{this.state=A.DATA,this.emitCurrentComment(n);break}case _.EXCLAMATION_MARK:{this.state=A.COMMENT_END_BANG;break}case _.HYPHEN_MINUS:{n.data+="-";break}case _.EOF:{this._err(L.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=A.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){const n=this.currentToken;switch(e){case _.HYPHEN_MINUS:{n.data+="--!",this.state=A.COMMENT_END_DASH;break}case _.GREATER_THAN_SIGN:{this._err(L.incorrectlyClosedComment),this.state=A.DATA,this.emitCurrentComment(n);break}case _.EOF:{this._err(L.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=A.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=A.BEFORE_DOCTYPE_NAME;break}case _.GREATER_THAN_SIGN:{this.state=A.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break}case _.EOF:{this._err(L.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(L.missingWhitespaceBeforeDoctypeName),this.state=A.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(er(e))this._createDoctypeToken(String.fromCharCode(Yr(e))),this.state=A.DOCTYPE_NAME;else switch(e){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.NULL:{this._err(L.unexpectedNullCharacter),this._createDoctypeToken(Pe),this.state=A.DOCTYPE_NAME;break}case _.GREATER_THAN_SIGN:{this._err(L.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=A.DATA;break}case _.EOF:{this._err(L.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=A.DOCTYPE_NAME}}_stateDoctypeName(e){const n=this.currentToken;switch(e){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=A.AFTER_DOCTYPE_NAME;break}case _.GREATER_THAN_SIGN:{this.state=A.DATA,this.emitCurrentDoctype(n);break}case _.NULL:{this._err(L.unexpectedNullCharacter),n.name+=Pe;break}case _.EOF:{this._err(L.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(er(e)?Yr(e):e)}}_stateAfterDoctypeName(e){const n=this.currentToken;switch(e){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.GREATER_THAN_SIGN:{this.state=A.DATA,this.emitCurrentDoctype(n);break}case _.EOF:{this._err(L.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(nt.PUBLIC,!1)?this.state=A.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(nt.SYSTEM,!1)?this.state=A.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(L.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=A.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){const n=this.currentToken;switch(e){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=A.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case _.QUOTATION_MARK:{this._err(L.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=A.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{this._err(L.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=A.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case _.GREATER_THAN_SIGN:{this._err(L.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=A.DATA,this.emitCurrentDoctype(n);break}case _.EOF:{this._err(L.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(L.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=A.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){const n=this.currentToken;switch(e){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.QUOTATION_MARK:{n.publicId="",this.state=A.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{n.publicId="",this.state=A.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case _.GREATER_THAN_SIGN:{this._err(L.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=A.DATA,this.emitCurrentDoctype(n);break}case _.EOF:{this._err(L.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(L.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=A.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){const n=this.currentToken;switch(e){case _.QUOTATION_MARK:{this.state=A.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case _.NULL:{this._err(L.unexpectedNullCharacter),n.publicId+=Pe;break}case _.GREATER_THAN_SIGN:{this._err(L.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=A.DATA;break}case _.EOF:{this._err(L.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){const n=this.currentToken;switch(e){case _.APOSTROPHE:{this.state=A.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case _.NULL:{this._err(L.unexpectedNullCharacter),n.publicId+=Pe;break}case _.GREATER_THAN_SIGN:{this._err(L.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=A.DATA;break}case _.EOF:{this._err(L.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){const n=this.currentToken;switch(e){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=A.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case _.GREATER_THAN_SIGN:{this.state=A.DATA,this.emitCurrentDoctype(n);break}case _.QUOTATION_MARK:{this._err(L.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=A.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{this._err(L.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=A.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case _.EOF:{this._err(L.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(L.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=A.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){const n=this.currentToken;switch(e){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=A.DATA;break}case _.QUOTATION_MARK:{n.systemId="",this.state=A.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{n.systemId="",this.state=A.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case _.EOF:{this._err(L.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(L.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=A.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){const n=this.currentToken;switch(e){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=A.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case _.QUOTATION_MARK:{this._err(L.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=A.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{this._err(L.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=A.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case _.GREATER_THAN_SIGN:{this._err(L.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=A.DATA,this.emitCurrentDoctype(n);break}case _.EOF:{this._err(L.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(L.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=A.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){const n=this.currentToken;switch(e){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.QUOTATION_MARK:{n.systemId="",this.state=A.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{n.systemId="",this.state=A.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case _.GREATER_THAN_SIGN:{this._err(L.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=A.DATA,this.emitCurrentDoctype(n);break}case _.EOF:{this._err(L.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(L.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=A.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){const n=this.currentToken;switch(e){case _.QUOTATION_MARK:{this.state=A.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case _.NULL:{this._err(L.unexpectedNullCharacter),n.systemId+=Pe;break}case _.GREATER_THAN_SIGN:{this._err(L.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=A.DATA;break}case _.EOF:{this._err(L.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){const n=this.currentToken;switch(e){case _.APOSTROPHE:{this.state=A.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case _.NULL:{this._err(L.unexpectedNullCharacter),n.systemId+=Pe;break}case _.GREATER_THAN_SIGN:{this._err(L.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=A.DATA;break}case _.EOF:{this._err(L.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){const n=this.currentToken;switch(e){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=A.DATA;break}case _.EOF:{this._err(L.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(L.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=A.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){const n=this.currentToken;switch(e){case _.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=A.DATA;break}case _.NULL:{this._err(L.unexpectedNullCharacter);break}case _.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(e){switch(e){case _.RIGHT_SQUARE_BRACKET:{this.state=A.CDATA_SECTION_BRACKET;break}case _.EOF:{this._err(L.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===_.RIGHT_SQUARE_BRACKET?this.state=A.CDATA_SECTION_END:(this._emitChars("]"),this.state=A.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case _.GREATER_THAN_SIGN:{this.state=A.DATA;break}case _.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=A.CDATA_SECTION,this._stateCdataSection(e)}}_stateCharacterReference(){let e=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(e<0)if(this.preprocessor.lastChunkWritten)e=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}e===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(_.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&ro(this.preprocessor.peek(1))?A.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){ro(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===_.SEMICOLON&&this._err(L.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}}const qc=new Set([d.DD,d.DT,d.LI,d.OPTGROUP,d.OPTION,d.P,d.RB,d.RP,d.RT,d.RTC]),ao=new Set([...qc,d.CAPTION,d.COLGROUP,d.TBODY,d.TD,d.TFOOT,d.TH,d.THEAD,d.TR]),hi=new Set([d.APPLET,d.CAPTION,d.HTML,d.MARQUEE,d.OBJECT,d.TABLE,d.TD,d.TEMPLATE,d.TH]),ST=new Set([...hi,d.OL,d.UL]),IT=new Set([...hi,d.BUTTON]),so=new Set([d.ANNOTATION_XML,d.MI,d.MN,d.MO,d.MS,d.MTEXT]),uo=new Set([d.DESC,d.FOREIGN_OBJECT,d.TITLE]),NT=new Set([d.TR,d.TEMPLATE,d.HTML]),wT=new Set([d.TBODY,d.TFOOT,d.THEAD,d.TEMPLATE,d.HTML]),vT=new Set([d.TABLE,d.TEMPLATE,d.HTML]),RT=new Set([d.TD,d.TH]);class OT{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=d.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===d.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===$.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,n){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,n,!0)}pop(){const e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,n){const r=this._indexOf(e);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(e,n,r){const i=this._indexOf(e)+1;this.items.splice(i,0,n),this.tagIDs.splice(i,0,r),this.stackTop++,i===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,i===this.stackTop)}popUntilTagNamePopped(e){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(e,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==$.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(e){for(;this.stackTop>=e;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<e)}}popUntilElementPopped(e){const n=this._indexOf(e);this.shortenToLength(Math.max(n,0))}popUntilPopped(e,n){const r=this._indexOfTagNames(e,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Ua,$.HTML)}popUntilTableCellPopped(){this.popUntilPopped(RT,$.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,n){for(let r=this.stackTop;r>=0;r--)if(e.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(e,n){const r=this._indexOfTagNames(e,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(vT,$.HTML)}clearBackToTableBodyContext(){this.clearBackTo(wT,$.HTML)}clearBackToTableRowContext(){this.clearBackTo(NT,$.HTML)}remove(e){const n=this._indexOf(e);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===d.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){const n=this._indexOf(e)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===d.HTML}hasInDynamicScope(e,n){for(let r=this.stackTop;r>=0;r--){const i=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case $.HTML:{if(i===e)return!0;if(n.has(i))return!1;break}case $.SVG:{if(uo.has(i))return!1;break}case $.MATHML:{if(so.has(i))return!1;break}}}return!0}hasInScope(e){return this.hasInDynamicScope(e,hi)}hasInListItemScope(e){return this.hasInDynamicScope(e,ST)}hasInButtonScope(e){return this.hasInDynamicScope(e,IT)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){const n=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case $.HTML:{if(Ua.has(n))return!0;if(hi.has(n))return!1;break}case $.SVG:{if(uo.has(n))return!1;break}case $.MATHML:{if(so.has(n))return!1;break}}}return!0}hasInTableScope(e){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===$.HTML)switch(this.tagIDs[n]){case e:return!0;case d.TABLE:case d.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===$.HTML)switch(this.tagIDs[e]){case d.TBODY:case d.THEAD:case d.TFOOT:return!0;case d.TABLE:case d.HTML:return!1}return!0}hasInSelectScope(e){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===$.HTML)switch(this.tagIDs[n]){case e:return!0;case d.OPTION:case d.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&qc.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&ao.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&ao.has(this.currentTagId);)this.pop()}}const oa=3;var Ct;(function(t){t[t.Marker=0]="Marker",t[t.Element=1]="Element"})(Ct||(Ct={}));const oo={type:Ct.Marker};class LT{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,n){const r=[],i=n.length,a=this.treeAdapter.getTagName(e),s=this.treeAdapter.getNamespaceURI(e);for(let u=0;u<this.entries.length;u++){const o=this.entries[u];if(o.type===Ct.Marker)break;const{element:l}=o;if(this.treeAdapter.getTagName(l)===a&&this.treeAdapter.getNamespaceURI(l)===s){const f=this.treeAdapter.getAttrList(l);f.length===i&&r.push({idx:u,attrs:f})}}return r}_ensureNoahArkCondition(e){if(this.entries.length<oa)return;const n=this.treeAdapter.getAttrList(e),r=this._getNoahArkConditionCandidates(e,n);if(r.length<oa)return;const i=new Map(n.map(s=>[s.name,s.value]));let a=0;for(let s=0;s<r.length;s++){const u=r[s];u.attrs.every(o=>i.get(o.name)===o.value)&&(a+=1,a>=oa&&this.entries.splice(u.idx,1))}}insertMarker(){this.entries.unshift(oo)}pushElement(e,n){this._ensureNoahArkCondition(e),this.entries.unshift({type:Ct.Element,element:e,token:n})}insertElementAfterBookmark(e,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Ct.Element,element:e,token:n})}removeEntry(e){const n=this.entries.indexOf(e);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const e=this.entries.indexOf(oo);e===-1?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){const n=this.entries.find(r=>r.type===Ct.Marker||this.treeAdapter.getTagName(r.element)===e);return n&&n.type===Ct.Element?n:null}getElementEntry(e){return this.entries.find(n=>n.type===Ct.Element&&n.element===e)}}const Ft={createDocument(){return{nodeName:"#document",mode:pt.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(t,e,n){return{nodeName:t,tagName:t,attrs:n,namespaceURI:e,childNodes:[],parentNode:null}},createCommentNode(t){return{nodeName:"#comment",data:t,parentNode:null}},createTextNode(t){return{nodeName:"#text",value:t,parentNode:null}},appendChild(t,e){t.childNodes.push(e),e.parentNode=t},insertBefore(t,e,n){const r=t.childNodes.indexOf(n);t.childNodes.splice(r,0,e),e.parentNode=t},setTemplateContent(t,e){t.content=e},getTemplateContent(t){return t.content},setDocumentType(t,e,n,r){const i=t.childNodes.find(a=>a.nodeName==="#documentType");if(i)i.name=e,i.publicId=n,i.systemId=r;else{const a={nodeName:"#documentType",name:e,publicId:n,systemId:r,parentNode:null};Ft.appendChild(t,a)}},setDocumentMode(t,e){t.mode=e},getDocumentMode(t){return t.mode},detachNode(t){if(t.parentNode){const e=t.parentNode.childNodes.indexOf(t);t.parentNode.childNodes.splice(e,1),t.parentNode=null}},insertText(t,e){if(t.childNodes.length>0){const n=t.childNodes[t.childNodes.length-1];if(Ft.isTextNode(n)){n.value+=e;return}}Ft.appendChild(t,Ft.createTextNode(e))},insertTextBefore(t,e,n){const r=t.childNodes[t.childNodes.indexOf(n)-1];r&&Ft.isTextNode(r)?r.value+=e:Ft.insertBefore(t,Ft.createTextNode(e),n)},adoptAttributes(t,e){const n=new Set(t.attrs.map(r=>r.name));for(let r=0;r<e.length;r++)n.has(e[r].name)||t.attrs.push(e[r])},getFirstChild(t){return t.childNodes[0]},getChildNodes(t){return t.childNodes},getParentNode(t){return t.parentNode},getAttrList(t){return t.attrs},getTagName(t){return t.tagName},getNamespaceURI(t){return t.namespaceURI},getTextNodeContent(t){return t.value},getCommentNodeContent(t){return t.data},getDocumentTypeNodeName(t){return t.name},getDocumentTypeNodePublicId(t){return t.publicId},getDocumentTypeNodeSystemId(t){return t.systemId},isTextNode(t){return t.nodeName==="#text"},isCommentNode(t){return t.nodeName==="#comment"},isDocumentTypeNode(t){return t.nodeName==="#documentType"},isElementNode(t){return Object.prototype.hasOwnProperty.call(t,"tagName")},setNodeSourceCodeLocation(t,e){t.sourceCodeLocation=e},getNodeSourceCodeLocation(t){return t.sourceCodeLocation},updateNodeSourceCodeLocation(t,e){t.sourceCodeLocation={...t.sourceCodeLocation,...e}}},Vc="html",DT="about:legacy-compat",PT="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Wc=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],MT=[...Wc,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],BT=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Gc=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],FT=[...Gc,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function lo(t,e){return e.some(n=>t.startsWith(n))}function zT(t){return t.name===Vc&&t.publicId===null&&(t.systemId===null||t.systemId===DT)}function UT(t){if(t.name!==Vc)return pt.QUIRKS;const{systemId:e}=t;if(e&&e.toLowerCase()===PT)return pt.QUIRKS;let{publicId:n}=t;if(n!==null){if(n=n.toLowerCase(),BT.has(n))return pt.QUIRKS;let r=e===null?MT:Wc;if(lo(n,r))return pt.QUIRKS;if(r=e===null?Gc:FT,lo(n,r))return pt.LIMITED_QUIRKS}return pt.NO_QUIRKS}const co={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},HT="definitionurl",$T="definitionURL",jT=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(t=>[t.toLowerCase(),t])),ZT=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:$.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:$.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:$.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:$.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:$.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:$.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:$.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:$.XML}],["xml:space",{prefix:"xml",name:"space",namespace:$.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:$.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:$.XMLNS}]]),YT=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(t=>[t.toLowerCase(),t])),qT=new Set([d.B,d.BIG,d.BLOCKQUOTE,d.BODY,d.BR,d.CENTER,d.CODE,d.DD,d.DIV,d.DL,d.DT,d.EM,d.EMBED,d.H1,d.H2,d.H3,d.H4,d.H5,d.H6,d.HEAD,d.HR,d.I,d.IMG,d.LI,d.LISTING,d.MENU,d.META,d.NOBR,d.OL,d.P,d.PRE,d.RUBY,d.S,d.SMALL,d.SPAN,d.STRONG,d.STRIKE,d.SUB,d.SUP,d.TABLE,d.TT,d.U,d.UL,d.VAR]);function VT(t){const e=t.tagID;return e===d.FONT&&t.attrs.some(({name:r})=>r===an.COLOR||r===an.SIZE||r===an.FACE)||qT.has(e)}function Qc(t){for(let e=0;e<t.attrs.length;e++)if(t.attrs[e].name===HT){t.attrs[e].name=$T;break}}function Kc(t){for(let e=0;e<t.attrs.length;e++){const n=jT.get(t.attrs[e].name);n!=null&&(t.attrs[e].name=n)}}function Os(t){for(let e=0;e<t.attrs.length;e++){const n=ZT.get(t.attrs[e].name);n&&(t.attrs[e].prefix=n.prefix,t.attrs[e].name=n.name,t.attrs[e].namespace=n.namespace)}}function WT(t){const e=YT.get(t.tagName);e!=null&&(t.tagName=e,t.tagID=Fn(t.tagName))}function GT(t,e){return e===$.MATHML&&(t===d.MI||t===d.MO||t===d.MN||t===d.MS||t===d.MTEXT)}function QT(t,e,n){if(e===$.MATHML&&t===d.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===an.ENCODING){const i=n[r].value.toLowerCase();return i===co.TEXT_HTML||i===co.APPLICATION_XML}}return e===$.SVG&&(t===d.FOREIGN_OBJECT||t===d.DESC||t===d.TITLE)}function KT(t,e,n,r){return(!r||r===$.HTML)&&QT(t,e,n)||(!r||r===$.MATHML)&&GT(t,e)}const XT="hidden",JT=8,ex=3;var S;(function(t){t[t.INITIAL=0]="INITIAL",t[t.BEFORE_HTML=1]="BEFORE_HTML",t[t.BEFORE_HEAD=2]="BEFORE_HEAD",t[t.IN_HEAD=3]="IN_HEAD",t[t.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",t[t.AFTER_HEAD=5]="AFTER_HEAD",t[t.IN_BODY=6]="IN_BODY",t[t.TEXT=7]="TEXT",t[t.IN_TABLE=8]="IN_TABLE",t[t.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",t[t.IN_CAPTION=10]="IN_CAPTION",t[t.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",t[t.IN_TABLE_BODY=12]="IN_TABLE_BODY",t[t.IN_ROW=13]="IN_ROW",t[t.IN_CELL=14]="IN_CELL",t[t.IN_SELECT=15]="IN_SELECT",t[t.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",t[t.IN_TEMPLATE=17]="IN_TEMPLATE",t[t.AFTER_BODY=18]="AFTER_BODY",t[t.IN_FRAMESET=19]="IN_FRAMESET",t[t.AFTER_FRAMESET=20]="AFTER_FRAMESET",t[t.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",t[t.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(S||(S={}));const tx={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Xc=new Set([d.TABLE,d.TBODY,d.TFOOT,d.THEAD,d.TR]),fo={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Ft,onParseError:null};class ho{constructor(e,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=S.INITIAL,this.originalInsertionMode=S.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...fo,...e},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new CT(this.options,this),this.activeFormattingElements=new LT(this.treeAdapter),this.fragmentContextID=r?Fn(this.treeAdapter.getTagName(r)):d.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new OT(this.document,this.treeAdapter,this)}static parse(e,n){const r=new this(n);return r.tokenizer.write(e,!0),r.document}static getFragmentParser(e,n){const r={...fo,...n};e??(e=r.treeAdapter.createElement(O.TEMPLATE,$.HTML,[]));const i=r.treeAdapter.createElement("documentmock",$.HTML,[]),a=new this(r,i,e);return a.fragmentContextID===d.TEMPLATE&&a.tmplInsertionModeStack.unshift(S.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const e=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,n),n}_err(e,n,r){var i;if(!this.onParseError)return;const a=(i=e.location)!==null&&i!==void 0?i:tx,s={code:n,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:r?a.startLine:a.endLine,endCol:r?a.startCol:a.endCol,endOffset:r?a.startOffset:a.endOffset};this.onParseError(s)}onItemPush(e,n,r){var i,a;(a=(i=this.treeAdapter).onItemPush)===null||a===void 0||a.call(i,e),r&&this.openElements.stackTop>0&&this._setContextModes(e,n)}onItemPop(e,n){var r,i;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(i=(r=this.treeAdapter).onItemPop)===null||i===void 0||i.call(r,e,this.openElements.current),n){let a,s;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,s=this.fragmentContextID):{current:a,currentTagId:s}=this.openElements,this._setContextModes(a,s)}}_setContextModes(e,n){const r=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===$.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&e!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,e)}_switchToTextParsing(e,n){this._insertElement(e,$.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=S.TEXT}switchToPlaintextParsing(){this.insertionMode=S.TEXT,this.originalInsertionMode=S.IN_BODY,this.tokenizer.state=He.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===O.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==$.HTML))switch(this.fragmentContextID){case d.TITLE:case d.TEXTAREA:{this.tokenizer.state=He.RCDATA;break}case d.STYLE:case d.XMP:case d.IFRAME:case d.NOEMBED:case d.NOFRAMES:case d.NOSCRIPT:{this.tokenizer.state=He.RAWTEXT;break}case d.SCRIPT:{this.tokenizer.state=He.SCRIPT_DATA;break}case d.PLAINTEXT:{this.tokenizer.state=He.PLAINTEXT;break}}}_setDocumentType(e){const n=e.name||"",r=e.publicId||"",i=e.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,i),e.location){const s=this.treeAdapter.getChildNodes(this.document).find(u=>this.treeAdapter.isDocumentTypeNode(u));s&&this.treeAdapter.setNodeSourceCodeLocation(s,e.location)}}_attachElementToTree(e,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(e,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,e)}}_appendElement(e,n){const r=this.treeAdapter.createElement(e.tagName,n,e.attrs);this._attachElementToTree(r,e.location)}_insertElement(e,n){const r=this.treeAdapter.createElement(e.tagName,n,e.attrs);this._attachElementToTree(r,e.location),this.openElements.push(r,e.tagID)}_insertFakeElement(e,n){const r=this.treeAdapter.createElement(e,$.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(e){const n=this.treeAdapter.createElement(e.tagName,$.HTML,e.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const e=this.treeAdapter.createElement(O.HTML,$.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,d.HTML)}_appendCommentNode(e,n){const r=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,e.location)}_insertCharacters(e){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,e.chars,r):this.treeAdapter.insertText(n,e.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,e.chars)),!e.location)return;const i=this.treeAdapter.getChildNodes(n),a=r?i.lastIndexOf(r):i.length,s=i[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(s)){const{endLine:o,endCol:l,endOffset:f}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:o,endCol:l,endOffset:f})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,e.location)}_adoptNodes(e,n){for(let r=this.treeAdapter.getFirstChild(e);r;r=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(e,n){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&n.location){const r=n.location,i=this.treeAdapter.getTagName(e),a=n.type===fe.END_TAG&&i===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,a)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,e.tagID===d.SVG&&this.treeAdapter.getTagName(n)===O.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===$.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===d.MGLYPH||e.tagID===d.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,$.HTML)}_processToken(e){switch(e.type){case fe.CHARACTER:{this.onCharacter(e);break}case fe.NULL_CHARACTER:{this.onNullCharacter(e);break}case fe.COMMENT:{this.onComment(e);break}case fe.DOCTYPE:{this.onDoctype(e);break}case fe.START_TAG:{this._processStartTag(e);break}case fe.END_TAG:{this.onEndTag(e);break}case fe.EOF:{this.onEof(e);break}case fe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(e);break}}}_isIntegrationPoint(e,n,r){const i=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return KT(e,i,a,r)}_reconstructActiveFormattingElements(){const e=this.activeFormattingElements.entries.length;if(e){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===Ct.Marker||this.openElements.contains(i.element)),r=n===-1?e-1:n-1;for(let i=r;i>=0;i--){const a=this.activeFormattingElements.entries[i];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=S.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(d.P),this.openElements.popUntilTagNamePopped(d.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case d.TR:{this.insertionMode=S.IN_ROW;return}case d.TBODY:case d.THEAD:case d.TFOOT:{this.insertionMode=S.IN_TABLE_BODY;return}case d.CAPTION:{this.insertionMode=S.IN_CAPTION;return}case d.COLGROUP:{this.insertionMode=S.IN_COLUMN_GROUP;return}case d.TABLE:{this.insertionMode=S.IN_TABLE;return}case d.BODY:{this.insertionMode=S.IN_BODY;return}case d.FRAMESET:{this.insertionMode=S.IN_FRAMESET;return}case d.SELECT:{this._resetInsertionModeForSelect(e);return}case d.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case d.HTML:{this.insertionMode=this.headElement?S.AFTER_HEAD:S.BEFORE_HEAD;return}case d.TD:case d.TH:{if(e>0){this.insertionMode=S.IN_CELL;return}break}case d.HEAD:{if(e>0){this.insertionMode=S.IN_HEAD;return}break}}this.insertionMode=S.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let n=e-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===d.TEMPLATE)break;if(r===d.TABLE){this.insertionMode=S.IN_SELECT_IN_TABLE;return}}this.insertionMode=S.IN_SELECT}_isElementCausesFosterParenting(e){return Xc.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){const n=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case d.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===$.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case d.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[e-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,e,n.beforeElement):this.treeAdapter.appendChild(n.parent,e)}_isSpecialElement(e,n){const r=this.treeAdapter.getNamespaceURI(e);return _T[r].has(n)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){R_(this,e);return}switch(this.insertionMode){case S.INITIAL:{Kn(this,e);break}case S.BEFORE_HTML:{dr(this,e);break}case S.BEFORE_HEAD:{fr(this,e);break}case S.IN_HEAD:{hr(this,e);break}case S.IN_HEAD_NO_SCRIPT:{pr(this,e);break}case S.AFTER_HEAD:{mr(this,e);break}case S.IN_BODY:case S.IN_CAPTION:case S.IN_CELL:case S.IN_TEMPLATE:{ed(this,e);break}case S.TEXT:case S.IN_SELECT:case S.IN_SELECT_IN_TABLE:{this._insertCharacters(e);break}case S.IN_TABLE:case S.IN_TABLE_BODY:case S.IN_ROW:{la(this,e);break}case S.IN_TABLE_TEXT:{sd(this,e);break}case S.IN_COLUMN_GROUP:{pi(this,e);break}case S.AFTER_BODY:{mi(this,e);break}case S.AFTER_AFTER_BODY:{ei(this,e);break}}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){v_(this,e);return}switch(this.insertionMode){case S.INITIAL:{Kn(this,e);break}case S.BEFORE_HTML:{dr(this,e);break}case S.BEFORE_HEAD:{fr(this,e);break}case S.IN_HEAD:{hr(this,e);break}case S.IN_HEAD_NO_SCRIPT:{pr(this,e);break}case S.AFTER_HEAD:{mr(this,e);break}case S.TEXT:{this._insertCharacters(e);break}case S.IN_TABLE:case S.IN_TABLE_BODY:case S.IN_ROW:{la(this,e);break}case S.IN_COLUMN_GROUP:{pi(this,e);break}case S.AFTER_BODY:{mi(this,e);break}case S.AFTER_AFTER_BODY:{ei(this,e);break}}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){Ha(this,e);return}switch(this.insertionMode){case S.INITIAL:case S.BEFORE_HTML:case S.BEFORE_HEAD:case S.IN_HEAD:case S.IN_HEAD_NO_SCRIPT:case S.AFTER_HEAD:case S.IN_BODY:case S.IN_TABLE:case S.IN_CAPTION:case S.IN_COLUMN_GROUP:case S.IN_TABLE_BODY:case S.IN_ROW:case S.IN_CELL:case S.IN_SELECT:case S.IN_SELECT_IN_TABLE:case S.IN_TEMPLATE:case S.IN_FRAMESET:case S.AFTER_FRAMESET:{Ha(this,e);break}case S.IN_TABLE_TEXT:{Xn(this,e);break}case S.AFTER_BODY:{ox(this,e);break}case S.AFTER_AFTER_BODY:case S.AFTER_AFTER_FRAMESET:{lx(this,e);break}}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case S.INITIAL:{cx(this,e);break}case S.BEFORE_HEAD:case S.IN_HEAD:case S.IN_HEAD_NO_SCRIPT:case S.AFTER_HEAD:{this._err(e,L.misplacedDoctype);break}case S.IN_TABLE_TEXT:{Xn(this,e);break}}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,L.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?O_(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case S.INITIAL:{Kn(this,e);break}case S.BEFORE_HTML:{dx(this,e);break}case S.BEFORE_HEAD:{hx(this,e);break}case S.IN_HEAD:{xt(this,e);break}case S.IN_HEAD_NO_SCRIPT:{gx(this,e);break}case S.AFTER_HEAD:{Ex(this,e);break}case S.IN_BODY:{Qe(this,e);break}case S.IN_TABLE:{Rn(this,e);break}case S.IN_TABLE_TEXT:{Xn(this,e);break}case S.IN_CAPTION:{p_(this,e);break}case S.IN_COLUMN_GROUP:{Ps(this,e);break}case S.IN_TABLE_BODY:{Bi(this,e);break}case S.IN_ROW:{Fi(this,e);break}case S.IN_CELL:{b_(this,e);break}case S.IN_SELECT:{ld(this,e);break}case S.IN_SELECT_IN_TABLE:{T_(this,e);break}case S.IN_TEMPLATE:{__(this,e);break}case S.AFTER_BODY:{k_(this,e);break}case S.IN_FRAMESET:{A_(this,e);break}case S.AFTER_FRAMESET:{S_(this,e);break}case S.AFTER_AFTER_BODY:{N_(this,e);break}case S.AFTER_AFTER_FRAMESET:{w_(this,e);break}}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?L_(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case S.INITIAL:{Kn(this,e);break}case S.BEFORE_HTML:{fx(this,e);break}case S.BEFORE_HEAD:{px(this,e);break}case S.IN_HEAD:{mx(this,e);break}case S.IN_HEAD_NO_SCRIPT:{bx(this,e);break}case S.AFTER_HEAD:{Tx(this,e);break}case S.IN_BODY:{Mi(this,e);break}case S.TEXT:{i_(this,e);break}case S.IN_TABLE:{xr(this,e);break}case S.IN_TABLE_TEXT:{Xn(this,e);break}case S.IN_CAPTION:{m_(this,e);break}case S.IN_COLUMN_GROUP:{g_(this,e);break}case S.IN_TABLE_BODY:{$a(this,e);break}case S.IN_ROW:{od(this,e);break}case S.IN_CELL:{E_(this,e);break}case S.IN_SELECT:{cd(this,e);break}case S.IN_SELECT_IN_TABLE:{x_(this,e);break}case S.IN_TEMPLATE:{y_(this,e);break}case S.AFTER_BODY:{fd(this,e);break}case S.IN_FRAMESET:{C_(this,e);break}case S.AFTER_FRAMESET:{I_(this,e);break}case S.AFTER_AFTER_BODY:{ei(this,e);break}}}onEof(e){switch(this.insertionMode){case S.INITIAL:{Kn(this,e);break}case S.BEFORE_HTML:{dr(this,e);break}case S.BEFORE_HEAD:{fr(this,e);break}case S.IN_HEAD:{hr(this,e);break}case S.IN_HEAD_NO_SCRIPT:{pr(this,e);break}case S.AFTER_HEAD:{mr(this,e);break}case S.IN_BODY:case S.IN_TABLE:case S.IN_CAPTION:case S.IN_COLUMN_GROUP:case S.IN_TABLE_BODY:case S.IN_ROW:case S.IN_CELL:case S.IN_SELECT:case S.IN_SELECT_IN_TABLE:{id(this,e);break}case S.TEXT:{a_(this,e);break}case S.IN_TABLE_TEXT:{Xn(this,e);break}case S.IN_TEMPLATE:{dd(this,e);break}case S.AFTER_BODY:case S.IN_FRAMESET:case S.AFTER_FRAMESET:case S.AFTER_AFTER_BODY:case S.AFTER_AFTER_FRAMESET:{Ds(this,e);break}}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===_.LINE_FEED)){if(e.chars.length===1)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(e);return}switch(this.insertionMode){case S.IN_HEAD:case S.IN_HEAD_NO_SCRIPT:case S.AFTER_HEAD:case S.TEXT:case S.IN_COLUMN_GROUP:case S.IN_SELECT:case S.IN_SELECT_IN_TABLE:case S.IN_FRAMESET:case S.AFTER_FRAMESET:{this._insertCharacters(e);break}case S.IN_BODY:case S.IN_CAPTION:case S.IN_CELL:case S.IN_TEMPLATE:case S.AFTER_BODY:case S.AFTER_AFTER_BODY:case S.AFTER_AFTER_FRAMESET:{Jc(this,e);break}case S.IN_TABLE:case S.IN_TABLE_BODY:case S.IN_ROW:{la(this,e);break}case S.IN_TABLE_TEXT:{ad(this,e);break}}}}function nx(t,e){let n=t.activeFormattingElements.getElementEntryInScopeWithTagName(e.tagName);return n?t.openElements.contains(n.element)?t.openElements.hasInScope(e.tagID)||(n=null):(t.activeFormattingElements.removeEntry(n),n=null):rd(t,e),n}function rx(t,e){let n=null,r=t.openElements.stackTop;for(;r>=0;r--){const i=t.openElements.items[r];if(i===e.element)break;t._isSpecialElement(i,t.openElements.tagIDs[r])&&(n=i)}return n||(t.openElements.shortenToLength(Math.max(r,0)),t.activeFormattingElements.removeEntry(e)),n}function ix(t,e,n){let r=e,i=t.openElements.getCommonAncestor(e);for(let a=0,s=i;s!==n;a++,s=i){i=t.openElements.getCommonAncestor(s);const u=t.activeFormattingElements.getElementEntry(s),o=u&&a>=ex;!u||o?(o&&t.activeFormattingElements.removeEntry(u),t.openElements.remove(s)):(s=ax(t,u),r===e&&(t.activeFormattingElements.bookmark=u),t.treeAdapter.detachNode(r),t.treeAdapter.appendChild(s,r),r=s)}return r}function ax(t,e){const n=t.treeAdapter.getNamespaceURI(e.element),r=t.treeAdapter.createElement(e.token.tagName,n,e.token.attrs);return t.openElements.replace(e.element,r),e.element=r,r}function sx(t,e,n){const r=t.treeAdapter.getTagName(e),i=Fn(r);if(t._isElementCausesFosterParenting(i))t._fosterParentElement(n);else{const a=t.treeAdapter.getNamespaceURI(e);i===d.TEMPLATE&&a===$.HTML&&(e=t.treeAdapter.getTemplateContent(e)),t.treeAdapter.appendChild(e,n)}}function ux(t,e,n){const r=t.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=t.treeAdapter.createElement(i.tagName,r,i.attrs);t._adoptNodes(e,a),t.treeAdapter.appendChild(e,a),t.activeFormattingElements.insertElementAfterBookmark(a,i),t.activeFormattingElements.removeEntry(n),t.openElements.remove(n.element),t.openElements.insertAfter(e,a,i.tagID)}function Ls(t,e){for(let n=0;n<JT;n++){const r=nx(t,e);if(!r)break;const i=rx(t,r);if(!i)break;t.activeFormattingElements.bookmark=r;const a=ix(t,i,r.element),s=t.openElements.getCommonAncestor(r.element);t.treeAdapter.detachNode(a),s&&sx(t,s,a),ux(t,i,r)}}function Ha(t,e){t._appendCommentNode(e,t.openElements.currentTmplContentOrNode)}function ox(t,e){t._appendCommentNode(e,t.openElements.items[0])}function lx(t,e){t._appendCommentNode(e,t.document)}function Ds(t,e){if(t.stopped=!0,e.location){const n=t.fragmentContext?0:2;for(let r=t.openElements.stackTop;r>=n;r--)t._setEndLocation(t.openElements.items[r],e);if(!t.fragmentContext&&t.openElements.stackTop>=0){const r=t.openElements.items[0],i=t.treeAdapter.getNodeSourceCodeLocation(r);if(i&&!i.endTag&&(t._setEndLocation(r,e),t.openElements.stackTop>=1)){const a=t.openElements.items[1],s=t.treeAdapter.getNodeSourceCodeLocation(a);s&&!s.endTag&&t._setEndLocation(a,e)}}}}function cx(t,e){t._setDocumentType(e);const n=e.forceQuirks?pt.QUIRKS:UT(e);zT(e)||t._err(e,L.nonConformingDoctype),t.treeAdapter.setDocumentMode(t.document,n),t.insertionMode=S.BEFORE_HTML}function Kn(t,e){t._err(e,L.missingDoctype,!0),t.treeAdapter.setDocumentMode(t.document,pt.QUIRKS),t.insertionMode=S.BEFORE_HTML,t._processToken(e)}function dx(t,e){e.tagID===d.HTML?(t._insertElement(e,$.HTML),t.insertionMode=S.BEFORE_HEAD):dr(t,e)}function fx(t,e){const n=e.tagID;(n===d.HTML||n===d.HEAD||n===d.BODY||n===d.BR)&&dr(t,e)}function dr(t,e){t._insertFakeRootElement(),t.insertionMode=S.BEFORE_HEAD,t._processToken(e)}function hx(t,e){switch(e.tagID){case d.HTML:{Qe(t,e);break}case d.HEAD:{t._insertElement(e,$.HTML),t.headElement=t.openElements.current,t.insertionMode=S.IN_HEAD;break}default:fr(t,e)}}function px(t,e){const n=e.tagID;n===d.HEAD||n===d.BODY||n===d.HTML||n===d.BR?fr(t,e):t._err(e,L.endTagWithoutMatchingOpenElement)}function fr(t,e){t._insertFakeElement(O.HEAD,d.HEAD),t.headElement=t.openElements.current,t.insertionMode=S.IN_HEAD,t._processToken(e)}function xt(t,e){switch(e.tagID){case d.HTML:{Qe(t,e);break}case d.BASE:case d.BASEFONT:case d.BGSOUND:case d.LINK:case d.META:{t._appendElement(e,$.HTML),e.ackSelfClosing=!0;break}case d.TITLE:{t._switchToTextParsing(e,He.RCDATA);break}case d.NOSCRIPT:{t.options.scriptingEnabled?t._switchToTextParsing(e,He.RAWTEXT):(t._insertElement(e,$.HTML),t.insertionMode=S.IN_HEAD_NO_SCRIPT);break}case d.NOFRAMES:case d.STYLE:{t._switchToTextParsing(e,He.RAWTEXT);break}case d.SCRIPT:{t._switchToTextParsing(e,He.SCRIPT_DATA);break}case d.TEMPLATE:{t._insertTemplate(e),t.activeFormattingElements.insertMarker(),t.framesetOk=!1,t.insertionMode=S.IN_TEMPLATE,t.tmplInsertionModeStack.unshift(S.IN_TEMPLATE);break}case d.HEAD:{t._err(e,L.misplacedStartTagForHeadElement);break}default:hr(t,e)}}function mx(t,e){switch(e.tagID){case d.HEAD:{t.openElements.pop(),t.insertionMode=S.AFTER_HEAD;break}case d.BODY:case d.BR:case d.HTML:{hr(t,e);break}case d.TEMPLATE:{mn(t,e);break}default:t._err(e,L.endTagWithoutMatchingOpenElement)}}function mn(t,e){t.openElements.tmplCount>0?(t.openElements.generateImpliedEndTagsThoroughly(),t.openElements.currentTagId!==d.TEMPLATE&&t._err(e,L.closingOfElementWithOpenChildElements),t.openElements.popUntilTagNamePopped(d.TEMPLATE),t.activeFormattingElements.clearToLastMarker(),t.tmplInsertionModeStack.shift(),t._resetInsertionMode()):t._err(e,L.endTagWithoutMatchingOpenElement)}function hr(t,e){t.openElements.pop(),t.insertionMode=S.AFTER_HEAD,t._processToken(e)}function gx(t,e){switch(e.tagID){case d.HTML:{Qe(t,e);break}case d.BASEFONT:case d.BGSOUND:case d.HEAD:case d.LINK:case d.META:case d.NOFRAMES:case d.STYLE:{xt(t,e);break}case d.NOSCRIPT:{t._err(e,L.nestedNoscriptInHead);break}default:pr(t,e)}}function bx(t,e){switch(e.tagID){case d.NOSCRIPT:{t.openElements.pop(),t.insertionMode=S.IN_HEAD;break}case d.BR:{pr(t,e);break}default:t._err(e,L.endTagWithoutMatchingOpenElement)}}function pr(t,e){const n=e.type===fe.EOF?L.openElementsLeftAfterEof:L.disallowedContentInNoscriptInHead;t._err(e,n),t.openElements.pop(),t.insertionMode=S.IN_HEAD,t._processToken(e)}function Ex(t,e){switch(e.tagID){case d.HTML:{Qe(t,e);break}case d.BODY:{t._insertElement(e,$.HTML),t.framesetOk=!1,t.insertionMode=S.IN_BODY;break}case d.FRAMESET:{t._insertElement(e,$.HTML),t.insertionMode=S.IN_FRAMESET;break}case d.BASE:case d.BASEFONT:case d.BGSOUND:case d.LINK:case d.META:case d.NOFRAMES:case d.SCRIPT:case d.STYLE:case d.TEMPLATE:case d.TITLE:{t._err(e,L.abandonedHeadElementChild),t.openElements.push(t.headElement,d.HEAD),xt(t,e),t.openElements.remove(t.headElement);break}case d.HEAD:{t._err(e,L.misplacedStartTagForHeadElement);break}default:mr(t,e)}}function Tx(t,e){switch(e.tagID){case d.BODY:case d.HTML:case d.BR:{mr(t,e);break}case d.TEMPLATE:{mn(t,e);break}default:t._err(e,L.endTagWithoutMatchingOpenElement)}}function mr(t,e){t._insertFakeElement(O.BODY,d.BODY),t.insertionMode=S.IN_BODY,Pi(t,e)}function Pi(t,e){switch(e.type){case fe.CHARACTER:{ed(t,e);break}case fe.WHITESPACE_CHARACTER:{Jc(t,e);break}case fe.COMMENT:{Ha(t,e);break}case fe.START_TAG:{Qe(t,e);break}case fe.END_TAG:{Mi(t,e);break}case fe.EOF:{id(t,e);break}}}function Jc(t,e){t._reconstructActiveFormattingElements(),t._insertCharacters(e)}function ed(t,e){t._reconstructActiveFormattingElements(),t._insertCharacters(e),t.framesetOk=!1}function xx(t,e){t.openElements.tmplCount===0&&t.treeAdapter.adoptAttributes(t.openElements.items[0],e.attrs)}function _x(t,e){const n=t.openElements.tryPeekProperlyNestedBodyElement();n&&t.openElements.tmplCount===0&&(t.framesetOk=!1,t.treeAdapter.adoptAttributes(n,e.attrs))}function yx(t,e){const n=t.openElements.tryPeekProperlyNestedBodyElement();t.framesetOk&&n&&(t.treeAdapter.detachNode(n),t.openElements.popAllUpToHtmlElement(),t._insertElement(e,$.HTML),t.insertionMode=S.IN_FRAMESET)}function kx(t,e){t.openElements.hasInButtonScope(d.P)&&t._closePElement(),t._insertElement(e,$.HTML)}function Ax(t,e){t.openElements.hasInButtonScope(d.P)&&t._closePElement(),t.openElements.currentTagId!==void 0&&Ua.has(t.openElements.currentTagId)&&t.openElements.pop(),t._insertElement(e,$.HTML)}function Cx(t,e){t.openElements.hasInButtonScope(d.P)&&t._closePElement(),t._insertElement(e,$.HTML),t.skipNextNewLine=!0,t.framesetOk=!1}function Sx(t,e){const n=t.openElements.tmplCount>0;(!t.formElement||n)&&(t.openElements.hasInButtonScope(d.P)&&t._closePElement(),t._insertElement(e,$.HTML),n||(t.formElement=t.openElements.current))}function Ix(t,e){t.framesetOk=!1;const n=e.tagID;for(let r=t.openElements.stackTop;r>=0;r--){const i=t.openElements.tagIDs[r];if(n===d.LI&&i===d.LI||(n===d.DD||n===d.DT)&&(i===d.DD||i===d.DT)){t.openElements.generateImpliedEndTagsWithExclusion(i),t.openElements.popUntilTagNamePopped(i);break}if(i!==d.ADDRESS&&i!==d.DIV&&i!==d.P&&t._isSpecialElement(t.openElements.items[r],i))break}t.openElements.hasInButtonScope(d.P)&&t._closePElement(),t._insertElement(e,$.HTML)}function Nx(t,e){t.openElements.hasInButtonScope(d.P)&&t._closePElement(),t._insertElement(e,$.HTML),t.tokenizer.state=He.PLAINTEXT}function wx(t,e){t.openElements.hasInScope(d.BUTTON)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(d.BUTTON)),t._reconstructActiveFormattingElements(),t._insertElement(e,$.HTML),t.framesetOk=!1}function vx(t,e){const n=t.activeFormattingElements.getElementEntryInScopeWithTagName(O.A);n&&(Ls(t,e),t.openElements.remove(n.element),t.activeFormattingElements.removeEntry(n)),t._reconstructActiveFormattingElements(),t._insertElement(e,$.HTML),t.activeFormattingElements.pushElement(t.openElements.current,e)}function Rx(t,e){t._reconstructActiveFormattingElements(),t._insertElement(e,$.HTML),t.activeFormattingElements.pushElement(t.openElements.current,e)}function Ox(t,e){t._reconstructActiveFormattingElements(),t.openElements.hasInScope(d.NOBR)&&(Ls(t,e),t._reconstructActiveFormattingElements()),t._insertElement(e,$.HTML),t.activeFormattingElements.pushElement(t.openElements.current,e)}function Lx(t,e){t._reconstructActiveFormattingElements(),t._insertElement(e,$.HTML),t.activeFormattingElements.insertMarker(),t.framesetOk=!1}function Dx(t,e){t.treeAdapter.getDocumentMode(t.document)!==pt.QUIRKS&&t.openElements.hasInButtonScope(d.P)&&t._closePElement(),t._insertElement(e,$.HTML),t.framesetOk=!1,t.insertionMode=S.IN_TABLE}function td(t,e){t._reconstructActiveFormattingElements(),t._appendElement(e,$.HTML),t.framesetOk=!1,e.ackSelfClosing=!0}function nd(t){const e=Zc(t,an.TYPE);return e!=null&&e.toLowerCase()===XT}function Px(t,e){t._reconstructActiveFormattingElements(),t._appendElement(e,$.HTML),nd(e)||(t.framesetOk=!1),e.ackSelfClosing=!0}function Mx(t,e){t._appendElement(e,$.HTML),e.ackSelfClosing=!0}function Bx(t,e){t.openElements.hasInButtonScope(d.P)&&t._closePElement(),t._appendElement(e,$.HTML),t.framesetOk=!1,e.ackSelfClosing=!0}function Fx(t,e){e.tagName=O.IMG,e.tagID=d.IMG,td(t,e)}function zx(t,e){t._insertElement(e,$.HTML),t.skipNextNewLine=!0,t.tokenizer.state=He.RCDATA,t.originalInsertionMode=t.insertionMode,t.framesetOk=!1,t.insertionMode=S.TEXT}function Ux(t,e){t.openElements.hasInButtonScope(d.P)&&t._closePElement(),t._reconstructActiveFormattingElements(),t.framesetOk=!1,t._switchToTextParsing(e,He.RAWTEXT)}function Hx(t,e){t.framesetOk=!1,t._switchToTextParsing(e,He.RAWTEXT)}function po(t,e){t._switchToTextParsing(e,He.RAWTEXT)}function $x(t,e){t._reconstructActiveFormattingElements(),t._insertElement(e,$.HTML),t.framesetOk=!1,t.insertionMode=t.insertionMode===S.IN_TABLE||t.insertionMode===S.IN_CAPTION||t.insertionMode===S.IN_TABLE_BODY||t.insertionMode===S.IN_ROW||t.insertionMode===S.IN_CELL?S.IN_SELECT_IN_TABLE:S.IN_SELECT}function jx(t,e){t.openElements.currentTagId===d.OPTION&&t.openElements.pop(),t._reconstructActiveFormattingElements(),t._insertElement(e,$.HTML)}function Zx(t,e){t.openElements.hasInScope(d.RUBY)&&t.openElements.generateImpliedEndTags(),t._insertElement(e,$.HTML)}function Yx(t,e){t.openElements.hasInScope(d.RUBY)&&t.openElements.generateImpliedEndTagsWithExclusion(d.RTC),t._insertElement(e,$.HTML)}function qx(t,e){t._reconstructActiveFormattingElements(),Qc(e),Os(e),e.selfClosing?t._appendElement(e,$.MATHML):t._insertElement(e,$.MATHML),e.ackSelfClosing=!0}function Vx(t,e){t._reconstructActiveFormattingElements(),Kc(e),Os(e),e.selfClosing?t._appendElement(e,$.SVG):t._insertElement(e,$.SVG),e.ackSelfClosing=!0}function mo(t,e){t._reconstructActiveFormattingElements(),t._insertElement(e,$.HTML)}function Qe(t,e){switch(e.tagID){case d.I:case d.S:case d.B:case d.U:case d.EM:case d.TT:case d.BIG:case d.CODE:case d.FONT:case d.SMALL:case d.STRIKE:case d.STRONG:{Rx(t,e);break}case d.A:{vx(t,e);break}case d.H1:case d.H2:case d.H3:case d.H4:case d.H5:case d.H6:{Ax(t,e);break}case d.P:case d.DL:case d.OL:case d.UL:case d.DIV:case d.DIR:case d.NAV:case d.MAIN:case d.MENU:case d.ASIDE:case d.CENTER:case d.FIGURE:case d.FOOTER:case d.HEADER:case d.HGROUP:case d.DIALOG:case d.DETAILS:case d.ADDRESS:case d.ARTICLE:case d.SEARCH:case d.SECTION:case d.SUMMARY:case d.FIELDSET:case d.BLOCKQUOTE:case d.FIGCAPTION:{kx(t,e);break}case d.LI:case d.DD:case d.DT:{Ix(t,e);break}case d.BR:case d.IMG:case d.WBR:case d.AREA:case d.EMBED:case d.KEYGEN:{td(t,e);break}case d.HR:{Bx(t,e);break}case d.RB:case d.RTC:{Zx(t,e);break}case d.RT:case d.RP:{Yx(t,e);break}case d.PRE:case d.LISTING:{Cx(t,e);break}case d.XMP:{Ux(t,e);break}case d.SVG:{Vx(t,e);break}case d.HTML:{xx(t,e);break}case d.BASE:case d.LINK:case d.META:case d.STYLE:case d.TITLE:case d.SCRIPT:case d.BGSOUND:case d.BASEFONT:case d.TEMPLATE:{xt(t,e);break}case d.BODY:{_x(t,e);break}case d.FORM:{Sx(t,e);break}case d.NOBR:{Ox(t,e);break}case d.MATH:{qx(t,e);break}case d.TABLE:{Dx(t,e);break}case d.INPUT:{Px(t,e);break}case d.PARAM:case d.TRACK:case d.SOURCE:{Mx(t,e);break}case d.IMAGE:{Fx(t,e);break}case d.BUTTON:{wx(t,e);break}case d.APPLET:case d.OBJECT:case d.MARQUEE:{Lx(t,e);break}case d.IFRAME:{Hx(t,e);break}case d.SELECT:{$x(t,e);break}case d.OPTION:case d.OPTGROUP:{jx(t,e);break}case d.NOEMBED:case d.NOFRAMES:{po(t,e);break}case d.FRAMESET:{yx(t,e);break}case d.TEXTAREA:{zx(t,e);break}case d.NOSCRIPT:{t.options.scriptingEnabled?po(t,e):mo(t,e);break}case d.PLAINTEXT:{Nx(t,e);break}case d.COL:case d.TH:case d.TD:case d.TR:case d.HEAD:case d.FRAME:case d.TBODY:case d.TFOOT:case d.THEAD:case d.CAPTION:case d.COLGROUP:break;default:mo(t,e)}}function Wx(t,e){if(t.openElements.hasInScope(d.BODY)&&(t.insertionMode=S.AFTER_BODY,t.options.sourceCodeLocationInfo)){const n=t.openElements.tryPeekProperlyNestedBodyElement();n&&t._setEndLocation(n,e)}}function Gx(t,e){t.openElements.hasInScope(d.BODY)&&(t.insertionMode=S.AFTER_BODY,fd(t,e))}function Qx(t,e){const n=e.tagID;t.openElements.hasInScope(n)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(n))}function Kx(t){const e=t.openElements.tmplCount>0,{formElement:n}=t;e||(t.formElement=null),(n||e)&&t.openElements.hasInScope(d.FORM)&&(t.openElements.generateImpliedEndTags(),e?t.openElements.popUntilTagNamePopped(d.FORM):n&&t.openElements.remove(n))}function Xx(t){t.openElements.hasInButtonScope(d.P)||t._insertFakeElement(O.P,d.P),t._closePElement()}function Jx(t){t.openElements.hasInListItemScope(d.LI)&&(t.openElements.generateImpliedEndTagsWithExclusion(d.LI),t.openElements.popUntilTagNamePopped(d.LI))}function e_(t,e){const n=e.tagID;t.openElements.hasInScope(n)&&(t.openElements.generateImpliedEndTagsWithExclusion(n),t.openElements.popUntilTagNamePopped(n))}function t_(t){t.openElements.hasNumberedHeaderInScope()&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilNumberedHeaderPopped())}function n_(t,e){const n=e.tagID;t.openElements.hasInScope(n)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(n),t.activeFormattingElements.clearToLastMarker())}function r_(t){t._reconstructActiveFormattingElements(),t._insertFakeElement(O.BR,d.BR),t.openElements.pop(),t.framesetOk=!1}function rd(t,e){const n=e.tagName,r=e.tagID;for(let i=t.openElements.stackTop;i>0;i--){const a=t.openElements.items[i],s=t.openElements.tagIDs[i];if(r===s&&(r!==d.UNKNOWN||t.treeAdapter.getTagName(a)===n)){t.openElements.generateImpliedEndTagsWithExclusion(r),t.openElements.stackTop>=i&&t.openElements.shortenToLength(i);break}if(t._isSpecialElement(a,s))break}}function Mi(t,e){switch(e.tagID){case d.A:case d.B:case d.I:case d.S:case d.U:case d.EM:case d.TT:case d.BIG:case d.CODE:case d.FONT:case d.NOBR:case d.SMALL:case d.STRIKE:case d.STRONG:{Ls(t,e);break}case d.P:{Xx(t);break}case d.DL:case d.UL:case d.OL:case d.DIR:case d.DIV:case d.NAV:case d.PRE:case d.MAIN:case d.MENU:case d.ASIDE:case d.BUTTON:case d.CENTER:case d.FIGURE:case d.FOOTER:case d.HEADER:case d.HGROUP:case d.DIALOG:case d.ADDRESS:case d.ARTICLE:case d.DETAILS:case d.SEARCH:case d.SECTION:case d.SUMMARY:case d.LISTING:case d.FIELDSET:case d.BLOCKQUOTE:case d.FIGCAPTION:{Qx(t,e);break}case d.LI:{Jx(t);break}case d.DD:case d.DT:{e_(t,e);break}case d.H1:case d.H2:case d.H3:case d.H4:case d.H5:case d.H6:{t_(t);break}case d.BR:{r_(t);break}case d.BODY:{Wx(t,e);break}case d.HTML:{Gx(t,e);break}case d.FORM:{Kx(t);break}case d.APPLET:case d.OBJECT:case d.MARQUEE:{n_(t,e);break}case d.TEMPLATE:{mn(t,e);break}default:rd(t,e)}}function id(t,e){t.tmplInsertionModeStack.length>0?dd(t,e):Ds(t,e)}function i_(t,e){var n;e.tagID===d.SCRIPT&&((n=t.scriptHandler)===null||n===void 0||n.call(t,t.openElements.current)),t.openElements.pop(),t.insertionMode=t.originalInsertionMode}function a_(t,e){t._err(e,L.eofInElementThatCanContainOnlyText),t.openElements.pop(),t.insertionMode=t.originalInsertionMode,t.onEof(e)}function la(t,e){if(t.openElements.currentTagId!==void 0&&Xc.has(t.openElements.currentTagId))switch(t.pendingCharacterTokens.length=0,t.hasNonWhitespacePendingCharacterToken=!1,t.originalInsertionMode=t.insertionMode,t.insertionMode=S.IN_TABLE_TEXT,e.type){case fe.CHARACTER:{sd(t,e);break}case fe.WHITESPACE_CHARACTER:{ad(t,e);break}}else Dr(t,e)}function s_(t,e){t.openElements.clearBackToTableContext(),t.activeFormattingElements.insertMarker(),t._insertElement(e,$.HTML),t.insertionMode=S.IN_CAPTION}function u_(t,e){t.openElements.clearBackToTableContext(),t._insertElement(e,$.HTML),t.insertionMode=S.IN_COLUMN_GROUP}function o_(t,e){t.openElements.clearBackToTableContext(),t._insertFakeElement(O.COLGROUP,d.COLGROUP),t.insertionMode=S.IN_COLUMN_GROUP,Ps(t,e)}function l_(t,e){t.openElements.clearBackToTableContext(),t._insertElement(e,$.HTML),t.insertionMode=S.IN_TABLE_BODY}function c_(t,e){t.openElements.clearBackToTableContext(),t._insertFakeElement(O.TBODY,d.TBODY),t.insertionMode=S.IN_TABLE_BODY,Bi(t,e)}function d_(t,e){t.openElements.hasInTableScope(d.TABLE)&&(t.openElements.popUntilTagNamePopped(d.TABLE),t._resetInsertionMode(),t._processStartTag(e))}function f_(t,e){nd(e)?t._appendElement(e,$.HTML):Dr(t,e),e.ackSelfClosing=!0}function h_(t,e){!t.formElement&&t.openElements.tmplCount===0&&(t._insertElement(e,$.HTML),t.formElement=t.openElements.current,t.openElements.pop())}function Rn(t,e){switch(e.tagID){case d.TD:case d.TH:case d.TR:{c_(t,e);break}case d.STYLE:case d.SCRIPT:case d.TEMPLATE:{xt(t,e);break}case d.COL:{o_(t,e);break}case d.FORM:{h_(t,e);break}case d.TABLE:{d_(t,e);break}case d.TBODY:case d.TFOOT:case d.THEAD:{l_(t,e);break}case d.INPUT:{f_(t,e);break}case d.CAPTION:{s_(t,e);break}case d.COLGROUP:{u_(t,e);break}default:Dr(t,e)}}function xr(t,e){switch(e.tagID){case d.TABLE:{t.openElements.hasInTableScope(d.TABLE)&&(t.openElements.popUntilTagNamePopped(d.TABLE),t._resetInsertionMode());break}case d.TEMPLATE:{mn(t,e);break}case d.BODY:case d.CAPTION:case d.COL:case d.COLGROUP:case d.HTML:case d.TBODY:case d.TD:case d.TFOOT:case d.TH:case d.THEAD:case d.TR:break;default:Dr(t,e)}}function Dr(t,e){const n=t.fosterParentingEnabled;t.fosterParentingEnabled=!0,Pi(t,e),t.fosterParentingEnabled=n}function ad(t,e){t.pendingCharacterTokens.push(e)}function sd(t,e){t.pendingCharacterTokens.push(e),t.hasNonWhitespacePendingCharacterToken=!0}function Xn(t,e){let n=0;if(t.hasNonWhitespacePendingCharacterToken)for(;n<t.pendingCharacterTokens.length;n++)Dr(t,t.pendingCharacterTokens[n]);else for(;n<t.pendingCharacterTokens.length;n++)t._insertCharacters(t.pendingCharacterTokens[n]);t.insertionMode=t.originalInsertionMode,t._processToken(e)}const ud=new Set([d.CAPTION,d.COL,d.COLGROUP,d.TBODY,d.TD,d.TFOOT,d.TH,d.THEAD,d.TR]);function p_(t,e){const n=e.tagID;ud.has(n)?t.openElements.hasInTableScope(d.CAPTION)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(d.CAPTION),t.activeFormattingElements.clearToLastMarker(),t.insertionMode=S.IN_TABLE,Rn(t,e)):Qe(t,e)}function m_(t,e){const n=e.tagID;switch(n){case d.CAPTION:case d.TABLE:{t.openElements.hasInTableScope(d.CAPTION)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(d.CAPTION),t.activeFormattingElements.clearToLastMarker(),t.insertionMode=S.IN_TABLE,n===d.TABLE&&xr(t,e));break}case d.BODY:case d.COL:case d.COLGROUP:case d.HTML:case d.TBODY:case d.TD:case d.TFOOT:case d.TH:case d.THEAD:case d.TR:break;default:Mi(t,e)}}function Ps(t,e){switch(e.tagID){case d.HTML:{Qe(t,e);break}case d.COL:{t._appendElement(e,$.HTML),e.ackSelfClosing=!0;break}case d.TEMPLATE:{xt(t,e);break}default:pi(t,e)}}function g_(t,e){switch(e.tagID){case d.COLGROUP:{t.openElements.currentTagId===d.COLGROUP&&(t.openElements.pop(),t.insertionMode=S.IN_TABLE);break}case d.TEMPLATE:{mn(t,e);break}case d.COL:break;default:pi(t,e)}}function pi(t,e){t.openElements.currentTagId===d.COLGROUP&&(t.openElements.pop(),t.insertionMode=S.IN_TABLE,t._processToken(e))}function Bi(t,e){switch(e.tagID){case d.TR:{t.openElements.clearBackToTableBodyContext(),t._insertElement(e,$.HTML),t.insertionMode=S.IN_ROW;break}case d.TH:case d.TD:{t.openElements.clearBackToTableBodyContext(),t._insertFakeElement(O.TR,d.TR),t.insertionMode=S.IN_ROW,Fi(t,e);break}case d.CAPTION:case d.COL:case d.COLGROUP:case d.TBODY:case d.TFOOT:case d.THEAD:{t.openElements.hasTableBodyContextInTableScope()&&(t.openElements.clearBackToTableBodyContext(),t.openElements.pop(),t.insertionMode=S.IN_TABLE,Rn(t,e));break}default:Rn(t,e)}}function $a(t,e){const n=e.tagID;switch(e.tagID){case d.TBODY:case d.TFOOT:case d.THEAD:{t.openElements.hasInTableScope(n)&&(t.openElements.clearBackToTableBodyContext(),t.openElements.pop(),t.insertionMode=S.IN_TABLE);break}case d.TABLE:{t.openElements.hasTableBodyContextInTableScope()&&(t.openElements.clearBackToTableBodyContext(),t.openElements.pop(),t.insertionMode=S.IN_TABLE,xr(t,e));break}case d.BODY:case d.CAPTION:case d.COL:case d.COLGROUP:case d.HTML:case d.TD:case d.TH:case d.TR:break;default:xr(t,e)}}function Fi(t,e){switch(e.tagID){case d.TH:case d.TD:{t.openElements.clearBackToTableRowContext(),t._insertElement(e,$.HTML),t.insertionMode=S.IN_CELL,t.activeFormattingElements.insertMarker();break}case d.CAPTION:case d.COL:case d.COLGROUP:case d.TBODY:case d.TFOOT:case d.THEAD:case d.TR:{t.openElements.hasInTableScope(d.TR)&&(t.openElements.clearBackToTableRowContext(),t.openElements.pop(),t.insertionMode=S.IN_TABLE_BODY,Bi(t,e));break}default:Rn(t,e)}}function od(t,e){switch(e.tagID){case d.TR:{t.openElements.hasInTableScope(d.TR)&&(t.openElements.clearBackToTableRowContext(),t.openElements.pop(),t.insertionMode=S.IN_TABLE_BODY);break}case d.TABLE:{t.openElements.hasInTableScope(d.TR)&&(t.openElements.clearBackToTableRowContext(),t.openElements.pop(),t.insertionMode=S.IN_TABLE_BODY,$a(t,e));break}case d.TBODY:case d.TFOOT:case d.THEAD:{(t.openElements.hasInTableScope(e.tagID)||t.openElements.hasInTableScope(d.TR))&&(t.openElements.clearBackToTableRowContext(),t.openElements.pop(),t.insertionMode=S.IN_TABLE_BODY,$a(t,e));break}case d.BODY:case d.CAPTION:case d.COL:case d.COLGROUP:case d.HTML:case d.TD:case d.TH:break;default:xr(t,e)}}function b_(t,e){const n=e.tagID;ud.has(n)?(t.openElements.hasInTableScope(d.TD)||t.openElements.hasInTableScope(d.TH))&&(t._closeTableCell(),Fi(t,e)):Qe(t,e)}function E_(t,e){const n=e.tagID;switch(n){case d.TD:case d.TH:{t.openElements.hasInTableScope(n)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(n),t.activeFormattingElements.clearToLastMarker(),t.insertionMode=S.IN_ROW);break}case d.TABLE:case d.TBODY:case d.TFOOT:case d.THEAD:case d.TR:{t.openElements.hasInTableScope(n)&&(t._closeTableCell(),od(t,e));break}case d.BODY:case d.CAPTION:case d.COL:case d.COLGROUP:case d.HTML:break;default:Mi(t,e)}}function ld(t,e){switch(e.tagID){case d.HTML:{Qe(t,e);break}case d.OPTION:{t.openElements.currentTagId===d.OPTION&&t.openElements.pop(),t._insertElement(e,$.HTML);break}case d.OPTGROUP:{t.openElements.currentTagId===d.OPTION&&t.openElements.pop(),t.openElements.currentTagId===d.OPTGROUP&&t.openElements.pop(),t._insertElement(e,$.HTML);break}case d.HR:{t.openElements.currentTagId===d.OPTION&&t.openElements.pop(),t.openElements.currentTagId===d.OPTGROUP&&t.openElements.pop(),t._appendElement(e,$.HTML),e.ackSelfClosing=!0;break}case d.INPUT:case d.KEYGEN:case d.TEXTAREA:case d.SELECT:{t.openElements.hasInSelectScope(d.SELECT)&&(t.openElements.popUntilTagNamePopped(d.SELECT),t._resetInsertionMode(),e.tagID!==d.SELECT&&t._processStartTag(e));break}case d.SCRIPT:case d.TEMPLATE:{xt(t,e);break}}}function cd(t,e){switch(e.tagID){case d.OPTGROUP:{t.openElements.stackTop>0&&t.openElements.currentTagId===d.OPTION&&t.openElements.tagIDs[t.openElements.stackTop-1]===d.OPTGROUP&&t.openElements.pop(),t.openElements.currentTagId===d.OPTGROUP&&t.openElements.pop();break}case d.OPTION:{t.openElements.currentTagId===d.OPTION&&t.openElements.pop();break}case d.SELECT:{t.openElements.hasInSelectScope(d.SELECT)&&(t.openElements.popUntilTagNamePopped(d.SELECT),t._resetInsertionMode());break}case d.TEMPLATE:{mn(t,e);break}}}function T_(t,e){const n=e.tagID;n===d.CAPTION||n===d.TABLE||n===d.TBODY||n===d.TFOOT||n===d.THEAD||n===d.TR||n===d.TD||n===d.TH?(t.openElements.popUntilTagNamePopped(d.SELECT),t._resetInsertionMode(),t._processStartTag(e)):ld(t,e)}function x_(t,e){const n=e.tagID;n===d.CAPTION||n===d.TABLE||n===d.TBODY||n===d.TFOOT||n===d.THEAD||n===d.TR||n===d.TD||n===d.TH?t.openElements.hasInTableScope(n)&&(t.openElements.popUntilTagNamePopped(d.SELECT),t._resetInsertionMode(),t.onEndTag(e)):cd(t,e)}function __(t,e){switch(e.tagID){case d.BASE:case d.BASEFONT:case d.BGSOUND:case d.LINK:case d.META:case d.NOFRAMES:case d.SCRIPT:case d.STYLE:case d.TEMPLATE:case d.TITLE:{xt(t,e);break}case d.CAPTION:case d.COLGROUP:case d.TBODY:case d.TFOOT:case d.THEAD:{t.tmplInsertionModeStack[0]=S.IN_TABLE,t.insertionMode=S.IN_TABLE,Rn(t,e);break}case d.COL:{t.tmplInsertionModeStack[0]=S.IN_COLUMN_GROUP,t.insertionMode=S.IN_COLUMN_GROUP,Ps(t,e);break}case d.TR:{t.tmplInsertionModeStack[0]=S.IN_TABLE_BODY,t.insertionMode=S.IN_TABLE_BODY,Bi(t,e);break}case d.TD:case d.TH:{t.tmplInsertionModeStack[0]=S.IN_ROW,t.insertionMode=S.IN_ROW,Fi(t,e);break}default:t.tmplInsertionModeStack[0]=S.IN_BODY,t.insertionMode=S.IN_BODY,Qe(t,e)}}function y_(t,e){e.tagID===d.TEMPLATE&&mn(t,e)}function dd(t,e){t.openElements.tmplCount>0?(t.openElements.popUntilTagNamePopped(d.TEMPLATE),t.activeFormattingElements.clearToLastMarker(),t.tmplInsertionModeStack.shift(),t._resetInsertionMode(),t.onEof(e)):Ds(t,e)}function k_(t,e){e.tagID===d.HTML?Qe(t,e):mi(t,e)}function fd(t,e){var n;if(e.tagID===d.HTML){if(t.fragmentContext||(t.insertionMode=S.AFTER_AFTER_BODY),t.options.sourceCodeLocationInfo&&t.openElements.tagIDs[0]===d.HTML){t._setEndLocation(t.openElements.items[0],e);const r=t.openElements.items[1];r&&!(!((n=t.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&t._setEndLocation(r,e)}}else mi(t,e)}function mi(t,e){t.insertionMode=S.IN_BODY,Pi(t,e)}function A_(t,e){switch(e.tagID){case d.HTML:{Qe(t,e);break}case d.FRAMESET:{t._insertElement(e,$.HTML);break}case d.FRAME:{t._appendElement(e,$.HTML),e.ackSelfClosing=!0;break}case d.NOFRAMES:{xt(t,e);break}}}function C_(t,e){e.tagID===d.FRAMESET&&!t.openElements.isRootHtmlElementCurrent()&&(t.openElements.pop(),!t.fragmentContext&&t.openElements.currentTagId!==d.FRAMESET&&(t.insertionMode=S.AFTER_FRAMESET))}function S_(t,e){switch(e.tagID){case d.HTML:{Qe(t,e);break}case d.NOFRAMES:{xt(t,e);break}}}function I_(t,e){e.tagID===d.HTML&&(t.insertionMode=S.AFTER_AFTER_FRAMESET)}function N_(t,e){e.tagID===d.HTML?Qe(t,e):ei(t,e)}function ei(t,e){t.insertionMode=S.IN_BODY,Pi(t,e)}function w_(t,e){switch(e.tagID){case d.HTML:{Qe(t,e);break}case d.NOFRAMES:{xt(t,e);break}}}function v_(t,e){e.chars=Pe,t._insertCharacters(e)}function R_(t,e){t._insertCharacters(e),t.framesetOk=!1}function hd(t){for(;t.treeAdapter.getNamespaceURI(t.openElements.current)!==$.HTML&&t.openElements.currentTagId!==void 0&&!t._isIntegrationPoint(t.openElements.currentTagId,t.openElements.current);)t.openElements.pop()}function O_(t,e){if(VT(e))hd(t),t._startTagOutsideForeignContent(e);else{const n=t._getAdjustedCurrentElement(),r=t.treeAdapter.getNamespaceURI(n);r===$.MATHML?Qc(e):r===$.SVG&&(WT(e),Kc(e)),Os(e),e.selfClosing?t._appendElement(e,r):t._insertElement(e,r),e.ackSelfClosing=!0}}function L_(t,e){if(e.tagID===d.P||e.tagID===d.BR){hd(t),t._endTagOutsideForeignContent(e);return}for(let n=t.openElements.stackTop;n>0;n--){const r=t.openElements.items[n];if(t.treeAdapter.getNamespaceURI(r)===$.HTML){t._endTagOutsideForeignContent(e);break}const i=t.treeAdapter.getTagName(r);if(i.toLowerCase()===e.tagName){e.tagName=i,t.openElements.shortenToLength(n);break}}}O.AREA,O.BASE,O.BASEFONT,O.BGSOUND,O.BR,O.COL,O.EMBED,O.FRAME,O.HR,O.IMG,O.INPUT,O.KEYGEN,O.LINK,O.META,O.PARAM,O.SOURCE,O.TRACK,O.WBR;const D_=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,P_=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),go={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function pd(t,e){const n=Y_(t),r=zc("type",{handlers:{root:M_,element:B_,text:F_,comment:gd,doctype:z_,raw:H_},unknown:$_}),i={parser:n?new ho(go):ho.getFragmentParser(void 0,go),handle(u){r(u,i)},stitches:!1,options:e||{}};r(t,i),zn(i,St());const a=n?i.parser.document:i.parser.getFragment(),s=q2(a,{file:i.options.file});return i.stitches&&Di(s,"comment",function(u,o,l){const f=u;if(f.value.stitch&&l&&o!==void 0){const c=l.children;return c[o]=f.value.stitch,o}}),s.type==="root"&&s.children.length===1&&s.children[0].type===t.type?s.children[0]:s}function md(t,e){let n=-1;if(t)for(;++n<t.length;)e.handle(t[n])}function M_(t,e){md(t.children,e)}function B_(t,e){j_(t,e),md(t.children,e),Z_(t,e)}function F_(t,e){e.parser.tokenizer.state>4&&(e.parser.tokenizer.state=0);const n={type:fe.CHARACTER,chars:t.value,location:Pr(t)};zn(e,St(t)),e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)}function z_(t,e){const n={type:fe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Pr(t)};zn(e,St(t)),e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)}function U_(t,e){e.stitches=!0;const n=q_(t);if("children"in t&&"children"in n){const r=pd({type:"root",children:t.children},e.options);n.children=r.children}gd({type:"comment",value:{stitch:n}},e)}function gd(t,e){const n=t.value,r={type:fe.COMMENT,data:n,location:Pr(t)};zn(e,St(t)),e.parser.currentToken=r,e.parser._processToken(e.parser.currentToken)}function H_(t,e){if(e.parser.tokenizer.preprocessor.html="",e.parser.tokenizer.preprocessor.pos=-1,e.parser.tokenizer.preprocessor.lastGapPos=-2,e.parser.tokenizer.preprocessor.gapStack=[],e.parser.tokenizer.preprocessor.skipNextNewLine=!1,e.parser.tokenizer.preprocessor.lastChunkWritten=!1,e.parser.tokenizer.preprocessor.endOfChunkHit=!1,e.parser.tokenizer.preprocessor.isEol=!1,bd(e,St(t)),e.parser.tokenizer.write(e.options.tagfilter?t.value.replace(D_,"&lt;$1$2"):t.value,!1),e.parser.tokenizer._runParsingLoop(),e.parser.tokenizer.state===72||e.parser.tokenizer.state===78){e.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=e.parser.tokenizer._consume();e.parser.tokenizer._callState(n)}}function $_(t,e){const n=t;if(e.options.passThrough&&e.options.passThrough.includes(n.type))U_(n,e);else{let r="";throw P_.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function zn(t,e){bd(t,e);const n=t.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=t.parser.tokenizer.preprocessor.line,n.location.endCol=t.parser.tokenizer.preprocessor.col+1,n.location.endOffset=t.parser.tokenizer.preprocessor.offset+1,t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)),t.parser.tokenizer.paused=!1,t.parser.tokenizer.inLoop=!1,t.parser.tokenizer.active=!1,t.parser.tokenizer.returnState=He.DATA,t.parser.tokenizer.charRefCode=-1,t.parser.tokenizer.consumedAfterSnapshot=-1,t.parser.tokenizer.currentLocation=null,t.parser.tokenizer.currentCharacterToken=null,t.parser.tokenizer.currentToken=null,t.parser.tokenizer.currentAttr={name:"",value:""}}function bd(t,e){if(e&&e.offset!==void 0){const n={startLine:e.line,startCol:e.column,startOffset:e.offset,endLine:-1,endCol:-1,endOffset:-1};t.parser.tokenizer.preprocessor.lineStartPos=-e.column+1,t.parser.tokenizer.preprocessor.droppedBufferSize=e.offset,t.parser.tokenizer.preprocessor.line=e.line,t.parser.tokenizer.currentLocation=n}}function j_(t,e){const n=t.tagName.toLowerCase();if(e.parser.tokenizer.state===He.PLAINTEXT)return;zn(e,St(t));const r=e.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:rn.html;i===rn.html&&n==="svg"&&(i=rn.svg);const a=K2({...t,children:[]},{space:i===rn.svg?"svg":"html"}),s={type:fe.START_TAG,tagName:n,tagID:Fn(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Pr(t)};e.parser.currentToken=s,e.parser._processToken(e.parser.currentToken),e.parser.tokenizer.lastStartTagName=n}function Z_(t,e){const n=t.tagName.toLowerCase();if(!e.parser.tokenizer.inForeignNode&&aT.includes(n)||e.parser.tokenizer.state===He.PLAINTEXT)return;zn(e,Ni(t));const r={type:fe.END_TAG,tagName:n,tagID:Fn(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Pr(t)};e.parser.currentToken=r,e.parser._processToken(e.parser.currentToken),n===e.parser.tokenizer.lastStartTagName&&(e.parser.tokenizer.state===He.RCDATA||e.parser.tokenizer.state===He.RAWTEXT||e.parser.tokenizer.state===He.SCRIPT_DATA)&&(e.parser.tokenizer.state=He.DATA)}function Y_(t){const e=t.type==="root"?t.children[0]:t;return!!(e&&(e.type==="doctype"||e.type==="element"&&e.tagName.toLowerCase()==="html"))}function Pr(t){const e=St(t)||{line:void 0,column:void 0,offset:void 0},n=Ni(t)||{line:void 0,column:void 0,offset:void 0};return{startLine:e.line,startCol:e.column,startOffset:e.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function q_(t){return"children"in t?vn({...t,children:[]}):vn(t)}function V_(t){return function(e,n){return pd(e,{...t,file:n})}}function bo(t,e){const n=String(t);if(typeof e!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(e);for(;i!==-1;)r++,i=n.indexOf(e,i+e.length);return r}function W_(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function G_(t,e,n){const i=Oi((n||{}).ignore||[]),a=Q_(e);let s=-1;for(;++s<a.length;)Dc(t,"text",u);function u(l,f){let c=-1,p;for(;++c<f.length;){const h=f[c],m=p?p.children:void 0;if(i(h,m?m.indexOf(h):void 0,p))return;p=h}if(p)return o(l,f)}function o(l,f){const c=f[f.length-1],p=a[s][0],h=a[s][1];let m=0;const x=c.children.indexOf(l);let T=!1,k=[];p.lastIndex=0;let g=p.exec(l.value);for(;g;){const N=g.index,v={index:g.index,input:g.input,stack:[...f,l]};let C=h(...g,v);if(typeof C=="string"&&(C=C.length>0?{type:"text",value:C}:void 0),C===!1?p.lastIndex=N+1:(m!==N&&k.push({type:"text",value:l.value.slice(m,N)}),Array.isArray(C)?k.push(...C):C&&k.push(C),m=N+g[0].length,T=!0),!p.global)break;g=p.exec(l.value)}return T?(m<l.value.length&&k.push({type:"text",value:l.value.slice(m)}),c.children.splice(x,1,...k)):k=[l],x+k.length}}function Q_(t){const e=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!t[0]||Array.isArray(t[0])?t:[t];let r=-1;for(;++r<n.length;){const i=n[r];e.push([K_(i[0]),X_(i[1])])}return e}function K_(t){return typeof t=="string"?new RegExp(W_(t),"g"):t}function X_(t){return typeof t=="function"?t:function(){return t}}const ca="phrasing",da=["autolink","link","image","label"];function J_(){return{transforms:[s3],enter:{literalAutolink:t3,literalAutolinkEmail:fa,literalAutolinkHttp:fa,literalAutolinkWww:fa},exit:{literalAutolink:a3,literalAutolinkEmail:i3,literalAutolinkHttp:n3,literalAutolinkWww:r3}}}function e3(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ca,notInConstruct:da},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ca,notInConstruct:da},{character:":",before:"[ps]",after:"\\/",inConstruct:ca,notInConstruct:da}]}}function t3(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function fa(t){this.config.enter.autolinkProtocol.call(this,t)}function n3(t){this.config.exit.autolinkProtocol.call(this,t)}function r3(t){this.config.exit.data.call(this,t);const e=this.stack[this.stack.length-1];e.type,e.url="http://"+this.sliceSerialize(t)}function i3(t){this.config.exit.autolinkEmail.call(this,t)}function a3(t){this.exit(t)}function s3(t){G_(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,u3],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),o3]],{ignore:["link","linkReference"]})}function u3(t,e,n,r,i){let a="";if(!Ed(i)||(/^w/i.test(e)&&(n=e+n,e="",a="http://"),!l3(n)))return!1;const s=c3(n+r);if(!s[0])return!1;const u={type:"link",title:null,url:a+e+s[0],children:[{type:"text",value:e+s[0]}]};return s[1]?[u,{type:"text",value:s[1]}]:u}function o3(t,e,n,r){return!Ed(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+e+"@"+n,children:[{type:"text",value:e+"@"+n}]}}function l3(t){const e=t.split(".");return!(e.length<2||e[e.length-1]&&(/_/.test(e[e.length-1])||!/[a-zA-Z\d]/.test(e[e.length-1]))||e[e.length-2]&&(/_/.test(e[e.length-2])||!/[a-zA-Z\d]/.test(e[e.length-2])))}function c3(t){const e=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!e)return[t,void 0];t=t.slice(0,e.index);let n=e[0],r=n.indexOf(")");const i=bo(t,"(");let a=bo(t,")");for(;r!==-1&&i>a;)t+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[t,n]}function Ed(t,e){const n=t.input.charCodeAt(t.index-1);return(t.index===0||ln(n)||wi(n))&&(!e||n!==47)}Td.peek=T3;function d3(){this.buffer()}function f3(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function h3(){this.buffer()}function p3(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function m3(t){const e=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Et(this.sliceSerialize(t)).toLowerCase(),n.label=e}function g3(t){this.exit(t)}function b3(t){const e=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Et(this.sliceSerialize(t)).toLowerCase(),n.label=e}function E3(t){this.exit(t)}function T3(){return"["}function Td(t,e,n,r){const i=n.createTracker(r);let a=i.move("[^");const s=n.enter("footnoteReference"),u=n.enter("reference");return a+=i.move(n.safe(n.associationId(t),{after:"]",before:a})),u(),s(),a+=i.move("]"),a}function x3(){return{enter:{gfmFootnoteCallString:d3,gfmFootnoteCall:f3,gfmFootnoteDefinitionLabelString:h3,gfmFootnoteDefinition:p3},exit:{gfmFootnoteCallString:m3,gfmFootnoteCall:g3,gfmFootnoteDefinitionLabelString:b3,gfmFootnoteDefinition:E3}}}function _3(t){let e=!1;return t&&t.firstLineBlank&&(e=!0),{handlers:{footnoteDefinition:n,footnoteReference:Td},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,a,s){const u=a.createTracker(s);let o=u.move("[^");const l=a.enter("footnoteDefinition"),f=a.enter("label");return o+=u.move(a.safe(a.associationId(r),{before:o,after:"]"})),f(),o+=u.move("]:"),r.children&&r.children.length>0&&(u.shift(4),o+=u.move((e?`
99
- `:" ")+a.indentLines(a.containerFlow(r,u.current()),e?xd:y3))),l(),o}}function y3(t,e,n){return e===0?t:xd(t,e,n)}function xd(t,e,n){return(n?"":" ")+t}const k3=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];_d.peek=N3;function A3(){return{canContainEols:["delete"],enter:{strikethrough:S3},exit:{strikethrough:I3}}}function C3(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:k3}],handlers:{delete:_d}}}function S3(t){this.enter({type:"delete",children:[]},t)}function I3(t){this.exit(t)}function _d(t,e,n,r){const i=n.createTracker(r),a=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(t,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),a(),s}function N3(){return"~"}function w3(t){return t.length}function v3(t,e){const n=e||{},r=(n.align||[]).concat(),i=n.stringLength||w3,a=[],s=[],u=[],o=[];let l=0,f=-1;for(;++f<t.length;){const b=[],x=[];let T=-1;for(t[f].length>l&&(l=t[f].length);++T<t[f].length;){const k=R3(t[f][T]);if(n.alignDelimiters!==!1){const g=i(k);x[T]=g,(o[T]===void 0||g>o[T])&&(o[T]=g)}b.push(k)}s[f]=b,u[f]=x}let c=-1;if(typeof r=="object"&&"length"in r)for(;++c<l;)a[c]=Eo(r[c]);else{const b=Eo(r);for(;++c<l;)a[c]=b}c=-1;const p=[],h=[];for(;++c<l;){const b=a[c];let x="",T="";b===99?(x=":",T=":"):b===108?x=":":b===114&&(T=":");let k=n.alignDelimiters===!1?1:Math.max(1,o[c]-x.length-T.length);const g=x+"-".repeat(k)+T;n.alignDelimiters!==!1&&(k=x.length+k+T.length,k>o[c]&&(o[c]=k),h[c]=k),p[c]=g}s.splice(1,0,p),u.splice(1,0,h),f=-1;const m=[];for(;++f<s.length;){const b=s[f],x=u[f];c=-1;const T=[];for(;++c<l;){const k=b[c]||"";let g="",N="";if(n.alignDelimiters!==!1){const v=o[c]-(x[c]||0),C=a[c];C===114?g=" ".repeat(v):C===99?v%2?(g=" ".repeat(v/2+.5),N=" ".repeat(v/2-.5)):(g=" ".repeat(v/2),N=g):N=" ".repeat(v)}n.delimiterStart!==!1&&!c&&T.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&k==="")&&(n.delimiterStart!==!1||c)&&T.push(" "),n.alignDelimiters!==!1&&T.push(g),T.push(k),n.alignDelimiters!==!1&&T.push(N),n.padding!==!1&&T.push(" "),(n.delimiterEnd!==!1||c!==l-1)&&T.push("|")}m.push(n.delimiterEnd===!1?T.join("").replace(/ +$/,""):T.join(""))}return m.join(`
100
- `)}function R3(t){return t==null?"":String(t)}function Eo(t){const e=typeof t=="string"?t.codePointAt(0):0;return e===67||e===99?99:e===76||e===108?108:e===82||e===114?114:0}function O3(t,e,n,r){const i=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const s=n.indentLines(n.containerFlow(t,a.current()),L3);return i(),s}function L3(t,e,n){return">"+(n?"":" ")+t}function D3(t,e){return To(t,e.inConstruct,!0)&&!To(t,e.notInConstruct,!1)}function To(t,e,n){if(typeof e=="string"&&(e=[e]),!e||e.length===0)return n;let r=-1;for(;++r<e.length;)if(t.includes(e[r]))return!0;return!1}function xo(t,e,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
101
- `&&D3(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
102
- `}function P3(t,e){const n=String(t);let r=n.indexOf(e),i=r,a=0,s=0;if(typeof e!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++a>s&&(s=a):a=1,i=r+e.length,r=n.indexOf(e,i);return s}function M3(t,e){return!!(e.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function B3(t){const e=t.options.fence||"`";if(e!=="`"&&e!=="~")throw new Error("Cannot serialize code with `"+e+"` for `options.fence`, expected `` ` `` or `~`");return e}function F3(t,e,n,r){const i=B3(n),a=t.value||"",s=i==="`"?"GraveAccent":"Tilde";if(M3(t,n)){const c=n.enter("codeIndented"),p=n.indentLines(a,z3);return c(),p}const u=n.createTracker(r),o=i.repeat(Math.max(P3(a,i)+1,3)),l=n.enter("codeFenced");let f=u.move(o);if(t.lang){const c=n.enter(`codeFencedLang${s}`);f+=u.move(n.safe(t.lang,{before:f,after:" ",encode:["`"],...u.current()})),c()}if(t.lang&&t.meta){const c=n.enter(`codeFencedMeta${s}`);f+=u.move(" "),f+=u.move(n.safe(t.meta,{before:f,after:`
103
- `,encode:["`"],...u.current()})),c()}return f+=u.move(`
104
- `),a&&(f+=u.move(a+`
105
- `)),f+=u.move(o),l(),f}function z3(t,e,n){return(n?"":" ")+t}function Ms(t){const e=t.options.quote||'"';if(e!=='"'&&e!=="'")throw new Error("Cannot serialize title with `"+e+"` for `options.quote`, expected `\"`, or `'`");return e}function U3(t,e,n,r){const i=Ms(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let u=n.enter("label");const o=n.createTracker(r);let l=o.move("[");return l+=o.move(n.safe(n.associationId(t),{before:l,after:"]",...o.current()})),l+=o.move("]: "),u(),!t.url||/[\0- \u007F]/.test(t.url)?(u=n.enter("destinationLiteral"),l+=o.move("<"),l+=o.move(n.safe(t.url,{before:l,after:">",...o.current()})),l+=o.move(">")):(u=n.enter("destinationRaw"),l+=o.move(n.safe(t.url,{before:l,after:t.title?" ":`
106
- `,...o.current()}))),u(),t.title&&(u=n.enter(`title${a}`),l+=o.move(" "+i),l+=o.move(n.safe(t.title,{before:l,after:i,...o.current()})),l+=o.move(i),u()),s(),l}function H3(t){const e=t.options.emphasis||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize emphasis with `"+e+"` for `options.emphasis`, expected `*`, or `_`");return e}function _r(t){return"&#x"+t.toString(16).toUpperCase()+";"}function gi(t,e,n){const r=wn(t),i=wn(e);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}yd.peek=$3;function yd(t,e,n,r){const i=H3(n),a=n.enter("emphasis"),s=n.createTracker(r),u=s.move(i);let o=s.move(n.containerPhrasing(t,{after:i,before:u,...s.current()}));const l=o.charCodeAt(0),f=gi(r.before.charCodeAt(r.before.length-1),l,i);f.inside&&(o=_r(l)+o.slice(1));const c=o.charCodeAt(o.length-1),p=gi(r.after.charCodeAt(0),c,i);p.inside&&(o=o.slice(0,-1)+_r(c));const h=s.move(i);return a(),n.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},u+o+h}function $3(t,e,n){return n.options.emphasis||"*"}function j3(t,e){let n=!1;return Di(t,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Da}),!!((!t.depth||t.depth<3)&&ys(t)&&(e.options.setext||n))}function Z3(t,e,n,r){const i=Math.max(Math.min(6,t.depth||1),1),a=n.createTracker(r);if(j3(t,n)){const f=n.enter("headingSetext"),c=n.enter("phrasing"),p=n.containerPhrasing(t,{...a.current(),before:`
107
- `,after:`
108
- `});return c(),f(),p+`
109
- `+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
110
- `))+1))}const s="#".repeat(i),u=n.enter("headingAtx"),o=n.enter("phrasing");a.move(s+" ");let l=n.containerPhrasing(t,{before:"# ",after:`
111
- `,...a.current()});return/^[\t ]/.test(l)&&(l=_r(l.charCodeAt(0))+l.slice(1)),l=l?s+" "+l:s,n.options.closeAtx&&(l+=" "+s),o(),u(),l}kd.peek=Y3;function kd(t){return t.value||""}function Y3(){return"<"}Ad.peek=q3;function Ad(t,e,n,r){const i=Ms(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let u=n.enter("label");const o=n.createTracker(r);let l=o.move("![");return l+=o.move(n.safe(t.alt,{before:l,after:"]",...o.current()})),l+=o.move("]("),u(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(u=n.enter("destinationLiteral"),l+=o.move("<"),l+=o.move(n.safe(t.url,{before:l,after:">",...o.current()})),l+=o.move(">")):(u=n.enter("destinationRaw"),l+=o.move(n.safe(t.url,{before:l,after:t.title?" ":")",...o.current()}))),u(),t.title&&(u=n.enter(`title${a}`),l+=o.move(" "+i),l+=o.move(n.safe(t.title,{before:l,after:i,...o.current()})),l+=o.move(i),u()),l+=o.move(")"),s(),l}function q3(){return"!"}Cd.peek=V3;function Cd(t,e,n,r){const i=t.referenceType,a=n.enter("imageReference");let s=n.enter("label");const u=n.createTracker(r);let o=u.move("![");const l=n.safe(t.alt,{before:o,after:"]",...u.current()});o+=u.move(l+"]["),s();const f=n.stack;n.stack=[],s=n.enter("reference");const c=n.safe(n.associationId(t),{before:o,after:"]",...u.current()});return s(),n.stack=f,a(),i==="full"||!l||l!==c?o+=u.move(c+"]"):i==="shortcut"?o=o.slice(0,-1):o+=u.move("]"),o}function V3(){return"!"}Sd.peek=W3;function Sd(t,e,n){let r=t.value||"",i="`",a=-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+" ");++a<n.unsafe.length;){const s=n.unsafe[a],u=n.compilePattern(s);let o;if(s.atBreak)for(;o=u.exec(r);){let l=o.index;r.charCodeAt(l)===10&&r.charCodeAt(l-1)===13&&l--,r=r.slice(0,l)+" "+r.slice(o.index+1)}}return i+r+i}function W3(){return"`"}function Id(t,e){const n=ys(t);return!!(!e.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(n===t.url||"mailto:"+n===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}Nd.peek=G3;function Nd(t,e,n,r){const i=Ms(n),a=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let u,o;if(Id(t,n)){const f=n.stack;n.stack=[],u=n.enter("autolink");let c=s.move("<");return c+=s.move(n.containerPhrasing(t,{before:c,after:">",...s.current()})),c+=s.move(">"),u(),n.stack=f,c}u=n.enter("link"),o=n.enter("label");let l=s.move("[");return l+=s.move(n.containerPhrasing(t,{before:l,after:"](",...s.current()})),l+=s.move("]("),o(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(o=n.enter("destinationLiteral"),l+=s.move("<"),l+=s.move(n.safe(t.url,{before:l,after:">",...s.current()})),l+=s.move(">")):(o=n.enter("destinationRaw"),l+=s.move(n.safe(t.url,{before:l,after:t.title?" ":")",...s.current()}))),o(),t.title&&(o=n.enter(`title${a}`),l+=s.move(" "+i),l+=s.move(n.safe(t.title,{before:l,after:i,...s.current()})),l+=s.move(i),o()),l+=s.move(")"),u(),l}function G3(t,e,n){return Id(t,n)?"<":"["}wd.peek=Q3;function wd(t,e,n,r){const i=t.referenceType,a=n.enter("linkReference");let s=n.enter("label");const u=n.createTracker(r);let o=u.move("[");const l=n.containerPhrasing(t,{before:o,after:"]",...u.current()});o+=u.move(l+"]["),s();const f=n.stack;n.stack=[],s=n.enter("reference");const c=n.safe(n.associationId(t),{before:o,after:"]",...u.current()});return s(),n.stack=f,a(),i==="full"||!l||l!==c?o+=u.move(c+"]"):i==="shortcut"?o=o.slice(0,-1):o+=u.move("]"),o}function Q3(){return"["}function Bs(t){const e=t.options.bullet||"*";if(e!=="*"&&e!=="+"&&e!=="-")throw new Error("Cannot serialize items with `"+e+"` for `options.bullet`, expected `*`, `+`, or `-`");return e}function K3(t){const e=Bs(t),n=t.options.bulletOther;if(!n)return e==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===e)throw new Error("Expected `bullet` (`"+e+"`) and `bulletOther` (`"+n+"`) to be different");return n}function X3(t){const e=t.options.bulletOrdered||".";if(e!=="."&&e!==")")throw new Error("Cannot serialize items with `"+e+"` for `options.bulletOrdered`, expected `.` or `)`");return e}function vd(t){const e=t.options.rule||"*";if(e!=="*"&&e!=="-"&&e!=="_")throw new Error("Cannot serialize rules with `"+e+"` for `options.rule`, expected `*`, `-`, or `_`");return e}function J3(t,e,n,r){const i=n.enter("list"),a=n.bulletCurrent;let s=t.ordered?X3(n):Bs(n);const u=t.ordered?s==="."?")":".":K3(n);let o=e&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!t.ordered){const f=t.children?t.children[0]:void 0;if((s==="*"||s==="-")&&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&&(o=!0),vd(n)===s&&f){let c=-1;for(;++c<t.children.length;){const p=t.children[c];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){o=!0;break}}}}o&&(s=u),n.bulletCurrent=s;const l=n.containerFlow(t,r);return n.bulletLastUsed=s,n.bulletCurrent=a,i(),l}function ey(t){const e=t.options.listItemIndent||"one";if(e!=="tab"&&e!=="one"&&e!=="mixed")throw new Error("Cannot serialize items with `"+e+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return e}function ty(t,e,n,r){const i=ey(n);let a=n.bulletCurrent||Bs(n);e&&e.type==="list"&&e.ordered&&(a=(typeof e.start=="number"&&e.start>-1?e.start:1)+(n.options.incrementListMarker===!1?0:e.children.indexOf(t))+a);let s=a.length+1;(i==="tab"||i==="mixed"&&(e&&e.type==="list"&&e.spread||t.spread))&&(s=Math.ceil(s/4)*4);const u=n.createTracker(r);u.move(a+" ".repeat(s-a.length)),u.shift(s);const o=n.enter("listItem"),l=n.indentLines(n.containerFlow(t,u.current()),f);return o(),l;function f(c,p,h){return p?(h?"":" ".repeat(s))+c:(h?a:a+" ".repeat(s-a.length))+c}}function ny(t,e,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),s=n.containerPhrasing(t,r);return a(),i(),s}const ry=Oi(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function iy(t,e,n,r){return(t.children.some(function(s){return ry(s)})?n.containerPhrasing:n.containerFlow).call(n,t,r)}function ay(t){const e=t.options.strong||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize strong with `"+e+"` for `options.strong`, expected `*`, or `_`");return e}Rd.peek=sy;function Rd(t,e,n,r){const i=ay(n),a=n.enter("strong"),s=n.createTracker(r),u=s.move(i+i);let o=s.move(n.containerPhrasing(t,{after:i,before:u,...s.current()}));const l=o.charCodeAt(0),f=gi(r.before.charCodeAt(r.before.length-1),l,i);f.inside&&(o=_r(l)+o.slice(1));const c=o.charCodeAt(o.length-1),p=gi(r.after.charCodeAt(0),c,i);p.inside&&(o=o.slice(0,-1)+_r(c));const h=s.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},u+o+h}function sy(t,e,n){return n.options.strong||"*"}function uy(t,e,n,r){return n.safe(t.value,r)}function oy(t){const e=t.options.ruleRepetition||3;if(e<3)throw new Error("Cannot serialize rules with repetition `"+e+"` for `options.ruleRepetition`, expected `3` or more");return e}function ly(t,e,n){const r=(vd(n)+(n.options.ruleSpaces?" ":"")).repeat(oy(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Od={blockquote:O3,break:xo,code:F3,definition:U3,emphasis:yd,hardBreak:xo,heading:Z3,html:kd,image:Ad,imageReference:Cd,inlineCode:Sd,link:Nd,linkReference:wd,list:J3,listItem:ty,paragraph:ny,root:iy,strong:Rd,text:uy,thematicBreak:ly};function cy(){return{enter:{table:dy,tableData:_o,tableHeader:_o,tableRow:hy},exit:{codeText:py,table:fy,tableData:ha,tableHeader:ha,tableRow:ha}}}function dy(t){const e=t._align;this.enter({type:"table",align:e.map(function(n){return n==="none"?null:n}),children:[]},t),this.data.inTable=!0}function fy(t){this.exit(t),this.data.inTable=void 0}function hy(t){this.enter({type:"tableRow",children:[]},t)}function ha(t){this.exit(t)}function _o(t){this.enter({type:"tableCell",children:[]},t)}function py(t){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,my));const n=this.stack[this.stack.length-1];n.type,n.value=e,this.exit(t)}function my(t,e){return e==="|"?e:t}function gy(t){const e=t||{},n=e.tableCellPadding,r=e.tablePipeAlign,i=e.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
112
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:s,tableCell:o,tableRow:u}};function s(h,m,b,x){return l(f(h,b,x),h.align)}function u(h,m,b,x){const T=c(h,b,x),k=l([T]);return k.slice(0,k.indexOf(`
113
- `))}function o(h,m,b,x){const T=b.enter("tableCell"),k=b.enter("phrasing"),g=b.containerPhrasing(h,{...x,before:a,after:a});return k(),T(),g}function l(h,m){return v3(h,{align:m,alignDelimiters:r,padding:n,stringLength:i})}function f(h,m,b){const x=h.children;let T=-1;const k=[],g=m.enter("table");for(;++T<x.length;)k[T]=c(x[T],m,b);return g(),k}function c(h,m,b){const x=h.children;let T=-1;const k=[],g=m.enter("tableRow");for(;++T<x.length;)k[T]=o(x[T],h,m,b);return g(),k}function p(h,m,b){let x=Od.inlineCode(h,m,b);return b.stack.includes("tableCell")&&(x=x.replace(/\|/g,"\\$&")),x}}function by(){return{exit:{taskListCheckValueChecked:yo,taskListCheckValueUnchecked:yo,paragraph:Ty}}}function Ey(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:xy}}}function yo(t){const e=this.stack[this.stack.length-2];e.type,e.checked=t.type==="taskListCheckValueChecked"}function Ty(t){const e=this.stack[this.stack.length-2];if(e&&e.type==="listItem"&&typeof e.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=e.children;let a=-1,s;for(;++a<i.length;){const u=i[a];if(u.type==="paragraph"){s=u;break}}s===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(t)}function xy(t,e,n,r){const i=t.children[0],a=typeof t.checked=="boolean"&&i&&i.type==="paragraph",s="["+(t.checked?"x":" ")+"] ",u=n.createTracker(r);a&&u.move(s);let o=Od.listItem(t,e,n,{...r,...u.current()});return a&&(o=o.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),o;function l(f){return f+s}}function _y(){return[J_(),x3(),A3(),cy(),by()]}function yy(t){return{extensions:[e3(),_3(t),C3(),gy(t),Ey()]}}const ky={tokenize:wy,partial:!0},Ld={tokenize:vy,partial:!0},Dd={tokenize:Ry,partial:!0},Pd={tokenize:Oy,partial:!0},Ay={tokenize:Ly,partial:!0},Md={name:"wwwAutolink",tokenize:Iy,previous:Fd},Bd={name:"protocolAutolink",tokenize:Ny,previous:zd},Dt={name:"emailAutolink",tokenize:Sy,previous:Ud},It={};function Cy(){return{text:It}}let Kt=48;for(;Kt<123;)It[Kt]=Dt,Kt++,Kt===58?Kt=65:Kt===91&&(Kt=97);It[43]=Dt;It[45]=Dt;It[46]=Dt;It[95]=Dt;It[72]=[Dt,Bd];It[104]=[Dt,Bd];It[87]=[Dt,Md];It[119]=[Dt,Md];function Sy(t,e,n){const r=this;let i,a;return s;function s(c){return!ja(c)||!Ud.call(r,r.previous)||Fs(r.events)?n(c):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),u(c))}function u(c){return ja(c)?(t.consume(c),u):c===64?(t.consume(c),o):n(c)}function o(c){return c===46?t.check(Ay,f,l)(c):c===45||c===95||We(c)?(a=!0,t.consume(c),o):f(c)}function l(c){return t.consume(c),i=!0,o}function f(c){return a&&i&&Je(r.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),e(c)):n(c)}}function Iy(t,e,n){const r=this;return i;function i(s){return s!==87&&s!==119||!Fd.call(r,r.previous)||Fs(r.events)?n(s):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(ky,t.attempt(Ld,t.attempt(Dd,a),n),n)(s))}function a(s){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),e(s)}}function Ny(t,e,n){const r=this;let i="",a=!1;return s;function s(c){return(c===72||c===104)&&zd.call(r,r.previous)&&!Fs(r.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),i+=String.fromCodePoint(c),t.consume(c),u):n(c)}function u(c){if(Je(c)&&i.length<5)return i+=String.fromCodePoint(c),t.consume(c),u;if(c===58){const p=i.toLowerCase();if(p==="http"||p==="https")return t.consume(c),o}return n(c)}function o(c){return c===47?(t.consume(c),a?l:(a=!0,o)):n(c)}function l(c){return c===null||di(c)||we(c)||ln(c)||wi(c)?n(c):t.attempt(Ld,t.attempt(Dd,f),n)(c)}function f(c){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),e(c)}}function wy(t,e,n){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,t.consume(s),i):s===46&&r===3?(t.consume(s),a):n(s)}function a(s){return s===null?n(s):e(s)}}function vy(t,e,n){let r,i,a;return s;function s(l){return l===46||l===95?t.check(Pd,o,u)(l):l===null||we(l)||ln(l)||l!==45&&wi(l)?o(l):(a=!0,t.consume(l),s)}function u(l){return l===95?r=!0:(i=r,r=void 0),t.consume(l),s}function o(l){return i||r||!a?n(l):e(l)}}function Ry(t,e){let n=0,r=0;return i;function i(s){return s===40?(n++,t.consume(s),i):s===41&&r<n?a(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?t.check(Pd,e,a)(s):s===null||we(s)||ln(s)?e(s):(t.consume(s),i)}function a(s){return s===41&&r++,t.consume(s),i}}function Oy(t,e,n){return r;function r(u){return u===33||u===34||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===63||u===95||u===126?(t.consume(u),r):u===38?(t.consume(u),a):u===93?(t.consume(u),i):u===60||u===null||we(u)||ln(u)?e(u):n(u)}function i(u){return u===null||u===40||u===91||we(u)||ln(u)?e(u):r(u)}function a(u){return Je(u)?s(u):n(u)}function s(u){return u===59?(t.consume(u),r):Je(u)?(t.consume(u),s):n(u)}}function Ly(t,e,n){return r;function r(a){return t.consume(a),i}function i(a){return We(a)?n(a):e(a)}}function Fd(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||we(t)}function zd(t){return!Je(t)}function Ud(t){return!(t===47||ja(t))}function ja(t){return t===43||t===45||t===46||t===95||We(t)}function Fs(t){let e=t.length,n=!1;for(;e--;){const r=t[e][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return t.length>0&&!n&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const Dy={tokenize:$y,partial:!0};function Py(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:zy,continuation:{tokenize:Uy},exit:Hy}},text:{91:{name:"gfmFootnoteCall",tokenize:Fy},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:My,resolveTo:By}}}}function My(t,e,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const o=r.events[i][1];if(o.type==="labelImage"){s=o;break}if(o.type==="gfmFootnoteCall"||o.type==="labelLink"||o.type==="label"||o.type==="image"||o.type==="link")break}return u;function u(o){if(!s||!s._balanced)return n(o);const l=Et(r.sliceSerialize({start:s.end,end:r.now()}));return l.codePointAt(0)!==94||!a.includes(l.slice(1))?n(o):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(o),t.exit("gfmFootnoteCallLabelMarker"),e(o))}}function By(t,e){let n=t.length;for(;n--;)if(t[n][1].type==="labelImage"&&t[n][0]==="enter"){t[n][1];break}t[n+1][1].type="data",t[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},t[n+3][1].start),end:Object.assign({},t[t.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},t[n+3][1].end),end:Object.assign({},t[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},t[t.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},u=[t[n+1],t[n+2],["enter",r,e],t[n+3],t[n+4],["enter",i,e],["exit",i,e],["enter",a,e],["enter",s,e],["exit",s,e],["exit",a,e],t[t.length-2],t[t.length-1],["exit",r,e]];return t.splice(n,t.length-n+1,...u),t}function Fy(t,e,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,s;return u;function u(c){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(c),t.exit("gfmFootnoteCallLabelMarker"),o}function o(c){return c!==94?n(c):(t.enter("gfmFootnoteCallMarker"),t.consume(c),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",l)}function l(c){if(a>999||c===93&&!s||c===null||c===91||we(c))return n(c);if(c===93){t.exit("chunkString");const p=t.exit("gfmFootnoteCallString");return i.includes(Et(r.sliceSerialize(p)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(c),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e):n(c)}return we(c)||(s=!0),a++,t.consume(c),c===92?f:l}function f(c){return c===91||c===92||c===93?(t.consume(c),a++,l):l(c)}}function zy(t,e,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,s=0,u;return o;function o(m){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(m),t.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(m){return m===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(m),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",f):n(m)}function f(m){if(s>999||m===93&&!u||m===null||m===91||we(m))return n(m);if(m===93){t.exit("chunkString");const b=t.exit("gfmFootnoteDefinitionLabelString");return a=Et(r.sliceSerialize(b)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(m),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),p}return we(m)||(u=!0),s++,t.consume(m),m===92?c:f}function c(m){return m===91||m===92||m===93?(t.consume(m),s++,f):f(m)}function p(m){return m===58?(t.enter("definitionMarker"),t.consume(m),t.exit("definitionMarker"),i.includes(a)||i.push(a),be(t,h,"gfmFootnoteDefinitionWhitespace")):n(m)}function h(m){return e(m)}}function Uy(t,e,n){return t.check(Or,e,t.attempt(Dy,e,n))}function Hy(t){t.exit("gfmFootnoteDefinition")}function $y(t,e,n){const r=this;return be(t,i,"gfmFootnoteDefinitionIndent",5);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?e(a):n(a)}}function jy(t){let n=(t||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,u){let o=-1;for(;++o<s.length;)if(s[o][0]==="enter"&&s[o][1].type==="strikethroughSequenceTemporary"&&s[o][1]._close){let l=o;for(;l--;)if(s[l][0]==="exit"&&s[l][1].type==="strikethroughSequenceTemporary"&&s[l][1]._open&&s[o][1].end.offset-s[o][1].start.offset===s[l][1].end.offset-s[l][1].start.offset){s[o][1].type="strikethroughSequence",s[l][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},s[l][1].start),end:Object.assign({},s[o][1].end)},c={type:"strikethroughText",start:Object.assign({},s[l][1].end),end:Object.assign({},s[o][1].start)},p=[["enter",f,u],["enter",s[l][1],u],["exit",s[l][1],u],["enter",c,u]],h=u.parser.constructs.insideSpan.null;h&&ct(p,p.length,0,vi(h,s.slice(l+1,o),u)),ct(p,p.length,0,[["exit",c,u],["enter",s[o][1],u],["exit",s[o][1],u],["exit",f,u]]),ct(s,l-1,o-l+3,p),o=l+p.length-2;break}}for(o=-1;++o<s.length;)s[o][1].type==="strikethroughSequenceTemporary"&&(s[o][1].type="data");return s}function a(s,u,o){const l=this.previous,f=this.events;let c=0;return p;function p(m){return l===126&&f[f.length-1][1].type!=="characterEscape"?o(m):(s.enter("strikethroughSequenceTemporary"),h(m))}function h(m){const b=wn(l);if(m===126)return c>1?o(m):(s.consume(m),c++,h);if(c<2&&!n)return o(m);const x=s.exit("strikethroughSequenceTemporary"),T=wn(m);return x._open=!T||T===2&&!!b,x._close=!b||b===2&&!!T,u(m)}}}class Zy{constructor(){this.map=[]}add(e,n,r){Yy(this,e,n,r)}consume(e){if(this.map.sort(function(a,s){return a[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(e.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),e.length=this.map[n][0];r.push(e.slice()),e.length=0;let i=r.pop();for(;i;){for(const a of i)e.push(a);i=r.pop()}this.map.length=0}}function Yy(t,e,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<t.map.length;){if(t.map[i][0]===e){t.map[i][1]+=n,t.map[i][2].push(...r);return}i+=1}t.map.push([e,n,r])}}function qy(t,e){let n=!1;const r=[];for(;e<t.length;){const i=t[e];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(t[e+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(t[e-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);e+=1}return r}function Vy(){return{flow:{null:{name:"table",tokenize:Wy,resolveAll:Gy}}}}function Wy(t,e,n){const r=this;let i=0,a=0,s;return u;function u(w){let P=r.events.length-1;for(;P>-1;){const Z=r.events[P][1].type;if(Z==="lineEnding"||Z==="linePrefix")P--;else break}const H=P>-1?r.events[P][1].type:null,te=H==="tableHead"||H==="tableRow"?C:o;return te===C&&r.parser.lazy[r.now().line]?n(w):te(w)}function o(w){return t.enter("tableHead"),t.enter("tableRow"),l(w)}function l(w){return w===124||(s=!0,a+=1),f(w)}function f(w){return w===null?n(w):re(w)?a>1?(a=0,r.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(w),t.exit("lineEnding"),h):n(w):he(w)?be(t,f,"whitespace")(w):(a+=1,s&&(s=!1,i+=1),w===124?(t.enter("tableCellDivider"),t.consume(w),t.exit("tableCellDivider"),s=!0,f):(t.enter("data"),c(w)))}function c(w){return w===null||w===124||we(w)?(t.exit("data"),f(w)):(t.consume(w),w===92?p:c)}function p(w){return w===92||w===124?(t.consume(w),c):c(w)}function h(w){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(w):(t.enter("tableDelimiterRow"),s=!1,he(w)?be(t,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):m(w))}function m(w){return w===45||w===58?x(w):w===124?(s=!0,t.enter("tableCellDivider"),t.consume(w),t.exit("tableCellDivider"),b):v(w)}function b(w){return he(w)?be(t,x,"whitespace")(w):x(w)}function x(w){return w===58?(a+=1,s=!0,t.enter("tableDelimiterMarker"),t.consume(w),t.exit("tableDelimiterMarker"),T):w===45?(a+=1,T(w)):w===null||re(w)?N(w):v(w)}function T(w){return w===45?(t.enter("tableDelimiterFiller"),k(w)):v(w)}function k(w){return w===45?(t.consume(w),k):w===58?(s=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(w),t.exit("tableDelimiterMarker"),g):(t.exit("tableDelimiterFiller"),g(w))}function g(w){return he(w)?be(t,N,"whitespace")(w):N(w)}function N(w){return w===124?m(w):w===null||re(w)?!s||i!==a?v(w):(t.exit("tableDelimiterRow"),t.exit("tableHead"),e(w)):v(w)}function v(w){return n(w)}function C(w){return t.enter("tableRow"),R(w)}function R(w){return w===124?(t.enter("tableCellDivider"),t.consume(w),t.exit("tableCellDivider"),R):w===null||re(w)?(t.exit("tableRow"),e(w)):he(w)?be(t,R,"whitespace")(w):(t.enter("data"),M(w))}function M(w){return w===null||w===124||we(w)?(t.exit("data"),R(w)):(t.consume(w),w===92?U:M)}function U(w){return w===92||w===124?(t.consume(w),M):M(w)}}function Gy(t,e){let n=-1,r=!0,i=0,a=[0,0,0,0],s=[0,0,0,0],u=!1,o=0,l,f,c;const p=new Zy;for(;++n<t.length;){const h=t[n],m=h[1];h[0]==="enter"?m.type==="tableHead"?(u=!1,o!==0&&(ko(p,e,o,l,f),f=void 0,o=0),l={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},p.add(n,0,[["enter",l,e]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,c=void 0,a=[0,0,0,0],s=[0,n+1,0,0],u&&(u=!1,f={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},p.add(n,0,[["enter",f,e]])),i=m.type==="tableDelimiterRow"?2:f?3:1):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(a[1]!==0&&(s[0]=s[1],c=qr(p,e,a,i,void 0,c),a=[0,0,0,0]),s[2]=n)):m.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(s[0]=s[1],c=qr(p,e,a,i,void 0,c)),a=s,s=[a[1],n,0,0])):m.type==="tableHead"?(u=!0,o=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(o=n,a[1]!==0?(s[0]=s[1],c=qr(p,e,a,i,n,c)):s[1]!==0&&(c=qr(p,e,s,i,n,c)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(s[3]=n)}for(o!==0&&ko(p,e,o,l,f),p.consume(e.events),n=-1;++n<e.events.length;){const h=e.events[n];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=qy(e.events,n))}return t}function qr(t,e,n,r,i,a){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(a.end=Object.assign({},_n(e.events,n[0])),t.add(n[0],0,[["exit",a,e]]));const o=_n(e.events,n[1]);if(a={type:s,start:Object.assign({},o),end:Object.assign({},o)},t.add(n[1],0,[["enter",a,e]]),n[2]!==0){const l=_n(e.events,n[2]),f=_n(e.events,n[3]),c={type:u,start:Object.assign({},l),end:Object.assign({},f)};if(t.add(n[2],0,[["enter",c,e]]),r!==2){const p=e.events[n[2]],h=e.events[n[3]];if(p[1].end=Object.assign({},h[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const m=n[2]+1,b=n[3]-n[2]-1;t.add(m,b,[])}}t.add(n[3]+1,0,[["exit",c,e]])}return i!==void 0&&(a.end=Object.assign({},_n(e.events,i)),t.add(i,0,[["exit",a,e]]),a=void 0),a}function ko(t,e,n,r,i){const a=[],s=_n(e.events,n);i&&(i.end=Object.assign({},s),a.push(["exit",i,e])),r.end=Object.assign({},s),a.push(["exit",r,e]),t.add(n+1,0,a)}function _n(t,e){const n=t[e],r=n[0]==="enter"?"start":"end";return n[1][r]}const Qy={name:"tasklistCheck",tokenize:Xy};function Ky(){return{text:{91:Qy}}}function Xy(t,e,n){const r=this;return i;function i(o){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(o):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(o),t.exit("taskListCheckMarker"),a)}function a(o){return we(o)?(t.enter("taskListCheckValueUnchecked"),t.consume(o),t.exit("taskListCheckValueUnchecked"),s):o===88||o===120?(t.enter("taskListCheckValueChecked"),t.consume(o),t.exit("taskListCheckValueChecked"),s):n(o)}function s(o){return o===93?(t.enter("taskListCheckMarker"),t.consume(o),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),u):n(o)}function u(o){return re(o)?e(o):he(o)?t.check({tokenize:Jy},e,n)(o):n(o)}}function Jy(t,e,n){return be(t,r,"whitespace");function r(i){return i===null?n(i):e(i)}}function ek(t){return mc([Cy(),Py(),jy(t),Vy(),Ky()])}const tk={};function nk(t){const e=this,n=t||tk,r=e.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(ek(n)),a.push(_y()),s.push(yy(n))}const rk=D.lazy(()=>ch(()=>import("./lazy-highlighter-DlCJvY4E.js"),__vite__mapDeps([0,1,2,3,4])));function Hd(){const t=X.c(3),[e,n]=D.useState(!1);let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=async s=>{await navigator.clipboard.writeText(s),n(!0),setTimeout(()=>n(!1),2e3)},t[0]=r):r=t[0];const i=r;let a;return t[1]!==e?(a={handleCopy:i,copied:e},t[1]=e,t[2]=a):a=t[2],a}function ik(){const t=X.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=[85,70],t[0]=e):e=t[0];const n=e;let r;return t[1]===Symbol.for("react.memo_cache_sentinel")?(r=E.jsx("div",{className:"p-4 font-mono text-sm",style:{background:"#2d2d2d",borderRadius:"0 0 0.5rem 0.5rem",overflow:"auto",minHeight:"4rem"},children:n.map(ak)}),t[1]=r):r=t[1],r}function ak(t,e){return E.jsxs("div",{className:"flex gap-2 items-center my-1",children:[e>2&&e<7&&E.jsx("div",{className:"w-4 h-4 rounded-sm opacity-40 animate-pulse",style:{background:"rgba(128, 128, 128, 0.3)",animationDelay:`${e*.1}s`}}),e%4===0&&E.jsx("div",{className:"h-4 rounded animate-pulse",style:{width:"3rem",background:"rgba(128, 128, 128, 0.3)",animationDelay:`${e*.12}s`}}),e%3===1&&E.jsx("div",{className:"h-4 rounded animate-pulse",style:{width:"2.5rem",background:"rgba(128, 128, 128, 0.3)",animationDelay:`${e*.14}s`}}),E.jsx("div",{className:"h-4 rounded animate-pulse",style:{width:`${t}%`,background:"rgba(255, 255, 255, 0.1)",animationDelay:`${e*.1}s`}}),e%5===2&&E.jsx("div",{className:"h-4 rounded animate-pulse",style:{width:"4rem",background:"rgba(128, 128, 128, 0.3)",animationDelay:`${e*.16}s`}})]},e)}function sk(t){const e=X.c(12),n=D.useRef(null),{handleCopy:r,copied:i}=Hd(),a=uk;let s;e[0]!==r?(s=async()=>{const p=a(n.current);await r(p)},e[0]=r,e[1]=s):s=e[1];const u=s;let o;e[2]!==i?(o=i?E.jsx(un,{size:12}):E.jsx(_i,{size:12}),e[2]=i,e[3]=o):o=e[3];let l;e[4]!==u||e[5]!==o?(l=E.jsx("div",{className:"flex justify-end items-center",children:E.jsxs(Yt,{variant:"ghost",onClick:u,"aria-label":"Copy as CSV",className:"text-muted-foreground hover:text-foreground h-6 text-[10px]",type:"button",children:["Copy as CSV",o]})}),e[4]=u,e[5]=o,e[6]=l):l=e[6];let f;e[7]!==t?(f=E.jsx("div",{className:"overflow-x-auto mb-4 rounded-lg border border-border",children:E.jsx("table",{ref:n,...t,className:"min-w-full border-collapse text-sm",children:t.children})}),e[7]=t,e[8]=f):f=e[8];let c;return e[9]!==l||e[10]!==f?(c=E.jsxs(E.Fragment,{children:[l,f]}),e[9]=l,e[10]=f,e[11]=c):c=e[11],c}function uk(t){return t?Array.from(t.querySelectorAll("tr")).map(ok).join(`
114
- `):""}function ok(t){return Array.from(t.querySelectorAll("th,td")).map(lk).join(",")}function lk(t){let e=t.textContent||"";return e=e.replace(/"/g,'""'),e.search(/([",\n])/g)>=0&&(e=`"${e}"`),e}const ck=[nk],dk=[V_],fk={p:t=>E.jsx("p",{...t,className:"leading-relaxed text-sm"}),strong:t=>E.jsx("strong",{...t,className:"font-bold"}),em:t=>E.jsx("em",{...t,className:"italic"}),a:t=>E.jsx("a",{...t,target:"_blank",rel:"noopener noreferrer",className:"text-primary-dark hover:underline break-all font-medium"}),ul:t=>E.jsx("ul",{...t,className:"list-disc ml-6 my-4 space-y-2"}),ol:t=>E.jsx("ol",{...t,className:"list-decimal ml-6 my-4 space-y-2"}),li:t=>E.jsx("li",{...t,className:"leading-relaxed text-sm"}),code:t=>E.jsx("code",{...t,className:"px-1 py-0.5 bg-muted rounded text-sm font-mono break-all"}),pre:t=>E.jsx("pre",{...t,className:"flex w-full min-w-0 my-4 bg-muted rounded overflow-hidden",children:E.jsx("code",{className:"flex-1 min-w-0 p-4 text-sm font-mono whitespace-pre overflow-x-auto",children:t.children})}),table:t=>E.jsx(sk,{...t}),thead:t=>E.jsx("thead",{...t,className:"bg-muted",children:t.children}),tr:t=>E.jsx("tr",{...t,className:"even:bg-muted/50 border-b border-border last:border-0"}),th:t=>E.jsx("th",{...t,className:"px-4 py-2 text-left font-semibold text-muted-foreground border-b border-border"}),td:t=>E.jsx("td",{...t,className:"px-4 py-2 border-b border-border"})},$d=D.memo(t=>{const e=X.c(2),{content:n}=t;let r;return e[0]!==n?(r=E.jsx(R2,{remarkPlugins:ck,rehypePlugins:dk,components:fk,children:n}),e[0]=n,e[1]=r):r=e[1],r},(t,e)=>t.content===e.content);function hk(t){const e=X.c(20),{language:n,content:r}=t,{handleCopy:i,copied:a}=Hd(),s=n||"text";let u;e[0]!==s?(u=E.jsx("span",{className:"text-xs font-mono uppercase text-muted-foreground tracking-widest select-none",children:s}),e[0]=s,e[1]=u):u=e[1];let o;e[2]!==r||e[3]!==i?(o=()=>i(r),e[2]=r,e[3]=i,e[4]=o):o=e[4];let l;e[5]!==a?(l=a?E.jsx(un,{size:14}):E.jsx(_i,{size:14}),e[5]=a,e[6]=l):l=e[6];let f;e[7]!==o||e[8]!==l?(f=E.jsx(Yt,{size:"icon",variant:"ghost",onClick:o,"aria-label":"Copy code",className:"text-muted-foreground hover:text-foreground rounded-lg h-8 w-8",children:l}),e[7]=o,e[8]=l,e[9]=f):f=e[9];let c;e[10]!==u||e[11]!==f?(c=E.jsxs("div",{className:"flex items-center justify-between p-1 pl-4 bg-muted border-b border-border",children:[u,f]}),e[10]=u,e[11]=f,e[12]=c):c=e[12];let p;e[13]===Symbol.for("react.memo_cache_sentinel")?(p=E.jsx(ik,{}),e[13]=p):p=e[13];let h;e[14]!==r||e[15]!==n?(h=E.jsx(D.Suspense,{fallback:p,children:E.jsx(rk,{language:n,content:r})}),e[14]=r,e[15]=n,e[16]=h):h=e[16];let m;return e[17]!==c||e[18]!==h?(m=E.jsxs("div",{className:"my-4 rounded-lg bg-muted overflow-hidden border border-border grid min-w-0",children:[c,h]}),e[17]=c,e[18]=h,e[19]=m):m=e[19],m}$d.displayName="MemoizedMarkdownBlock";const zs=t=>{const e=X.c(7),{id:n,text:r}=t;let i;e[0]!==r?(i=Ae.lexer(r),e[0]=r,e[1]=i):i=e[1];const a=i;let s;if(e[2]!==a||e[3]!==n){let u;e[5]!==n?(u=(o,l)=>o.type==="code"?E.jsx(hk,{language:o.lang,content:o.text},`${n}-block_${l}`):E.jsx($d,{content:o.raw},`${n}-block_${l}`),e[5]=n,e[6]=u):u=e[6],s=a.map(u),e[2]=a,e[3]=n,e[4]=s}else s=e[4];return s};zs.displayName="MemoizedMarkdown";function pk(t,e){switch(e.type){case"TOGGLE":return{isExpanded:!t.isExpanded,wasManuallyToggled:!0};case"SET_EXPANDED":return t.wasManuallyToggled?t:{...t,isExpanded:e.payload};default:return t}}function mk(t){const e=X.c(38),{part:n,id:r}=t,{state:i}=n,a=i==="streaming";let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={isExpanded:!1,wasManuallyToggled:!1},e[0]=s):s=e[0];const[u,o]=D.useReducer(pk,s),{isExpanded:l}=u;let f,c;e[1]!==a?(f=()=>{o({type:"SET_EXPANDED",payload:a})},c=[a],e[1]=a,e[2]=f,e[3]=c):(f=e[2],c=e[3]),D.useEffect(f,c);let p;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=()=>{o({type:"TOGGLE"})},e[4]=p):p=e[4];const h=p,m=a&&"animate-pulse";let b;e[5]!==m?(b=ue("text-muted-foreground transition-opacity",m),e[5]=m,e[6]=b):b=e[6];let x;e[7]!==b?(x=E.jsx(ki,{className:b}),e[7]=b,e[8]=x):x=e[8];const T=a&&"text-shimmer";let k;e[9]!==T?(k=ue("text-sm font-medium text-muted-foreground",T),e[9]=T,e[10]=k):k=e[10];let g;e[11]!==k?(g=E.jsx("span",{className:k,children:"Agent thinking"}),e[11]=k,e[12]=g):g=e[12];const N=l?"rotate-180":"";let v;e[13]!==N?(v=ue("text-muted-foreground transition-transform duration-200",N),e[13]=N,e[14]=v):v=e[14];let C;e[15]!==v?(C=E.jsx(ml,{className:v}),e[15]=v,e[16]=C):C=e[16];let R;e[17]!==g||e[18]!==C||e[19]!==x?(R=E.jsxs("button",{type:"button",onClick:h,className:"flex items-center gap-2 py-2 transition-colors cursor-pointer",children:[x,g,C]}),e[17]=g,e[18]=C,e[19]=x,e[20]=R):R=e[20];const M=l?a?"max-h-[400px] opacity-100":"max-h-[200px] opacity-80":"max-h-0 opacity-0 overflow-hidden";let U;e[21]!==M?(U=ue("transition-all duration-200 ease-in-out",M),e[21]=M,e[22]=U):U=e[22];const w=a?"max-h-[400px]":"max-h-[200px]";let P;e[23]!==w?(P=ue("border-l-2 pl-4 overflow-y-auto",w),e[23]=w,e[24]=P):P=e[24];let H;e[25]===Symbol.for("react.memo_cache_sentinel")?(H=ue("text-muted-foreground markdown-sm pb-2"),e[25]=H):H=e[25];let te;e[26]!==r||e[27]!==n.text?(te=E.jsx("div",{className:H,children:E.jsx(zs,{id:r,text:n.text})}),e[26]=r,e[27]=n.text,e[28]=te):te=e[28];let Z;e[29]!==P||e[30]!==te?(Z=E.jsx("div",{className:P,children:te}),e[29]=P,e[30]=te,e[31]=Z):Z=e[31];let z;e[32]!==U||e[33]!==Z?(z=E.jsx("div",{className:U,children:Z}),e[32]=U,e[33]=Z,e[34]=z):z=e[34];let Q;return e[35]!==R||e[36]!==z?(Q=E.jsxs("div",{className:"flex flex-col",children:[R,z]}),e[35]=R,e[36]=z,e[37]=Q):Q=e[37],Q}function gk(){const t=X.c(3),[e,n]=D.useState(!1);let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=async s=>{await navigator.clipboard.writeText(s),n(!0),setTimeout(()=>n(!1),2e3)},t[0]=r):r=t[0];const i=r;let a;return t[1]!==e?(a={handleCopy:i,copied:e},t[1]=e,t[2]=a):a=t[2],a}function jd(t){const e=X.c(15),{id:n,text:r,copyable:i,extraActions:a}=t,s=i===void 0?!1:i,{handleCopy:u}=gk(),[o,l]=D.useState(!1);let f;e[0]!==u||e[1]!==r?(f=async()=>{await u(r),l(!0),setTimeout(()=>l(!1),2e3)},e[0]=u,e[1]=r,e[2]=f):f=e[2];const c=f,p=s||a;let h;e[3]!==n||e[4]!==r?(h=E.jsx(zs,{id:n,text:r}),e[3]=n,e[4]=r,e[5]=h):h=e[5];let m;e[6]!==s||e[7]!==a||e[8]!==c||e[9]!==o||e[10]!==p?(m=p&&E.jsx("div",{className:"flex w-full items-center text-xs text-muted-foreground opacity-0 pointer-events-none transition-all duration-200 group-hover/part:opacity-100 group-hover/part:pointer-events-auto mt-2",children:E.jsxs("div",{className:"flex items-center gap-1",children:[s&&E.jsx(Yt,{onClick:c,variant:"ghost",size:"sm",className:"text-muted-foreground hover:text-foreground size-6 whitespace-nowrap",children:o?E.jsx(un,{size:12}):E.jsx(_i,{size:12})}),a]})}),e[6]=s,e[7]=a,e[8]=c,e[9]=o,e[10]=p,e[11]=m):m=e[11];let b;return e[12]!==h||e[13]!==m?(b=E.jsxs("div",{className:"group/part relative",children:[h,m]}),e[12]=h,e[13]=m,e[14]=b):b=e[14],b}function bk(t){const e=X.c(28),{toolName:n,input:r,output:i,isError:a}=t;let s;if(e[0]!==i){const l=JSON.stringify(i,null,2);s=l.length>2e3?l.slice(0,2e3)+"...[TRUNCATED]":l,e[0]=i,e[1]=s}else s=e[1];const u=s;if(n==="READ_MCP_TOOLS"){const l=r?.id;if(l){let f;return e[2]!==l?(f=E.jsx(Ao,{connectionId:l}),e[2]=l,e[3]=f):f=e[3],f}}if(n==="CALL_MCP_TOOL"){const l=r?.connectionId;let f;e[4]!==l?(f=l&&E.jsx(Ao,{connectionId:l,compact:!0}),e[4]=l,e[5]=f):f=e[5];let c;e[6]!==i?(c=JSON.stringify(i,null,2),e[6]=i,e[7]=c):c=e[7];let p;e[8]!==c?(p=E.jsx("div",{className:"absolute top-1 right-1 z-10",children:E.jsx(Ek,{text:c})}),e[8]=c,e[9]=p):p=e[9];let h;e[10]===Symbol.for("react.memo_cache_sentinel")?(h=E.jsx("div",{className:"font-semibold text-muted-foreground mb-0.5 text-[10px] uppercase tracking-wider",children:"Input"}),e[10]=h):h=e[10];let m;e[11]!==r?(m=JSON.stringify(r,null,2),e[11]=r,e[12]=m):m=e[12];let b;e[13]!==m?(b=E.jsx("pre",{className:"whitespace-pre-wrap break-all text-muted-foreground mb-2",children:m}),e[13]=m,e[14]=b):b=e[14];let x;e[15]===Symbol.for("react.memo_cache_sentinel")?(x=E.jsx("div",{className:"font-semibold text-muted-foreground mb-0.5 text-[10px] uppercase tracking-wider",children:"Output"}),e[15]=x):x=e[15];const T=`whitespace-pre-wrap break-all ${a?"text-destructive":"text-foreground"}`;let k;e[16]!==u||e[17]!==T?(k=E.jsx("pre",{className:T,children:u}),e[16]=u,e[17]=T,e[18]=k):k=e[18];let g;e[19]!==k||e[20]!==p||e[21]!==b?(g=E.jsxs("div",{className:"relative bg-muted rounded-md p-2 text-xs font-mono overflow-auto max-h-[200px]",children:[p,h,b,x,k]}),e[19]=k,e[20]=p,e[21]=b,e[22]=g):g=e[22];let N;return e[23]!==g||e[24]!==f?(N=E.jsxs("div",{className:"flex flex-col gap-2",children:[f,g]}),e[23]=g,e[24]=f,e[25]=N):N=e[25],N}let o;return e[26]!==u?(o=E.jsx("div",{className:"bg-muted rounded-md p-2 text-xs font-mono overflow-auto max-h-[200px]",children:E.jsx("pre",{className:"whitespace-pre-wrap break-all",children:u})}),e[26]=u,e[27]=o):o=e[27],o}function Ao(t){const e=X.c(15),{connectionId:n,compact:r}=t,i=vh(n),{org:a}=Dn(),{slug:s}=a,u=dh();if(!i)return null;let o;e[0]!==i.id||e[1]!==u||e[2]!==s?(o=()=>{u({to:"/$org/mcps/$connectionId",params:{org:s,connectionId:i.id}})},e[0]=i.id,e[1]=u,e[2]=s,e[3]=o):o=e[3];const l=o;if(r){let c;e[4]!==i.title?(c=E.jsx("span",{className:"font-medium text-foreground",children:i.title}),e[4]=i.title,e[5]=c):c=e[5];let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p=E.jsx(Zh,{size:12}),e[6]=p):p=e[6];let h;e[7]!==l?(h=E.jsx("button",{type:"button",onClick:l,className:"hover:text-foreground transition-colors",title:"Open connection",children:p}),e[7]=l,e[8]=h):h=e[8];let m;return e[9]!==c||e[10]!==h?(m=E.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground bg-muted/50 px-2 py-1 rounded-md w-fit",children:[c,h]}),e[9]=c,e[10]=h,e[11]=m):m=e[11],m}let f;return e[12]!==i||e[13]!==l?(f=E.jsx(jh,{connection:i,onClick:l}),e[12]=i,e[13]=l,e[14]=f):f=e[14],f}function Ek({text:t}){const e=async()=>{try{if(navigator.clipboard)await navigator.clipboard.writeText(t),Qr.success("Copied to clipboard");else throw new Error("Clipboard API unavailable")}catch(n){try{const r=document.createElement("textarea");r.value=t,r.style.position="fixed",r.style.left="-9999px",r.style.top="0",document.body.appendChild(r),r.focus(),r.select();const i=document.execCommand("copy");if(document.body.removeChild(r),i)Qr.success("Copied to clipboard");else throw new Error("Fallback copy failed")}catch(r){console.error("Copy failed",n,r),Qr.error("Failed to copy to clipboard")}}};return E.jsx(Yt,{size:"icon",variant:"ghost",className:"h-5 w-5 hover:bg-background/50",onClick:e,children:E.jsx(_i,{size:12})})}function Tk(t){const e=X.c(39),{part:n}=t,{state:r}=n;let i;e[0]!==n?(i="toolName"in n?n.toolName:n.type.replace("tool-",""),e[0]=n,e[1]=i):i=e[1];const a=i;let s;e[2]!==r?(s=r==="output-error"?E.jsx($h,{className:"h-3.5 w-3.5 text-destructive"}):E.jsx(Bl,{className:"h-3.5 w-3.5"}),e[2]=r,e[3]=s):s=e[3];const u=r==="output-error"&&"text-destructive/90";let o;e[4]!==u?(o=ue(u),e[4]=u,e[5]=o):o=e[5];const l=r==="input-streaming"&&`Streaming ${a} arguments`,f=r==="input-available"&&`Calling ${a}`,c=r==="output-available"&&`Called ${a}`,p=r==="output-error"&&`Error calling ${a}`;let h;e[6]!==o||e[7]!==l||e[8]!==f||e[9]!==c||e[10]!==p?(h=E.jsxs("span",{className:o,children:[l,f,c,p]}),e[6]=o,e[7]=l,e[8]=f,e[9]=c,e[10]=p,e[11]=h):h=e[11];let m;e[12]!==r?(m=(r==="input-streaming"||r==="input-available")&&E.jsx("span",{className:"animate-spin",children:E.jsx(Yh,{size:"xs"})}),e[12]=r,e[13]=m):m=e[13];let b;e[14]!==m||e[15]!==s||e[16]!==h?(b=E.jsxs("div",{className:"flex items-center gap-2 text-xs font-medium text-muted-foreground",children:[s,h,m]}),e[14]=m,e[15]=s,e[16]=h,e[17]=b):b=e[17];const x=r==="output-error"?"border-destructive/50":"border-border";let T;e[18]!==x?(T=ue("transition-all duration-200 ease-in-out","border-l-2 pl-3",x),e[18]=x,e[19]=T):T=e[19];let k;e[20]!==n.input||e[21]!==r?(k=(r==="input-streaming"||r==="input-available")&&!!n.input&&E.jsx("div",{className:"text-xs font-mono text-muted-foreground bg-muted/30 p-2 rounded",children:JSON.stringify(n.input,null,2)}),e[20]=n.input,e[21]=r,e[22]=k):k=e[22];let g;e[23]!==n.input||e[24]!==n.output||e[25]!==r||e[26]!==a?(g=r==="output-available"&&E.jsx(bk,{toolName:a,input:n.input,output:n.output}),e[23]=n.input,e[24]=n.output,e[25]=r,e[26]=a,e[27]=g):g=e[27];let N;e[28]!==n||e[29]!==r?(N=r==="output-error"&&E.jsx("div",{className:"text-xs font-mono bg-destructive/10 text-destructive p-2 rounded border border-destructive/20",children:"errorText"in n&&typeof n.errorText=="string"?n.errorText:"An unknown error occurred"}),e[28]=n,e[29]=r,e[30]=N):N=e[30];let v;e[31]!==T||e[32]!==k||e[33]!==g||e[34]!==N?(v=E.jsxs("div",{className:T,children:[k,g,N]}),e[31]=T,e[32]=k,e[33]=g,e[34]=N,e[35]=v):v=e[35];let C;return e[36]!==b||e[37]!==v?(C=E.jsxs("div",{className:"flex flex-col gap-1.5 py-1",children:[b,v]}),e[36]=b,e[37]=v,e[38]=C):C=e[38],C}const xk={openrouter:t=>{const e=t?.openrouter;return typeof e=="object"&&e!==null&&"usage"in e&&typeof e.usage=="object"&&e.usage!==null&&"cost"in e.usage&&typeof e.usage.cost=="number"?e.usage.cost:null}};function _k(t){if(!t?.providerMetadata)return null;for(const e of Object.values(xk)){const n=e(t.providerMetadata);if(n!==null)return n}return null}function yk(t){return t.reduce((e,n)=>{const r=n.metadata?.usage;return r?{inputTokens:e.inputTokens+(r.inputTokens??0),outputTokens:e.outputTokens+(r.outputTokens??0),totalTokens:e.totalTokens+(r.totalTokens??0),cost:e.cost+(_k(r)??0)}:e},{inputTokens:0,outputTokens:0,totalTokens:0,cost:0})}function Zd(t){const e=X.c(38),{messages:n}=t;let r,i,a,s,u,o,l,f,c,p,h,m;if(e[0]!==n){m=Symbol.for("react.early_return_sentinel");e:{const N=yk(n);if(!N){m=null;break e}const{totalTokens:v,inputTokens:C,outputTokens:R,cost:M}=N;if(a=M,!v&&!C&&!R){m=null;break e}i=cl;let U;e[13]===Symbol.for("react.memo_cache_sentinel")?(U=E.jsx(Nl,{size:12}),e[13]=U):U=e[13];const w=E.jsxs(Yt,{variant:"ghost",size:"sm",className:"text-muted-foreground hover:text-foreground pl-1! h-6 gap-1 whitespace-nowrap",children:[U,E.jsx("span",{className:"text-[10px] font-mono tabular-nums",children:v.toLocaleString()})]});e[14]!==w?(h=E.jsx(dl,{asChild:!0,children:w}),e[14]=w,e[15]=h):h=e[15],r=fl,c="top",p="font-mono text-[11px]",u="grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5",e[16]===Symbol.for("react.memo_cache_sentinel")?(o=E.jsx("span",{className:"text-muted",children:"in"}),e[16]=o):o=e[16],l=E.jsx("span",{children:C.toLocaleString()}),e[17]===Symbol.for("react.memo_cache_sentinel")?(f=E.jsx("span",{className:"text-muted",children:"out"}),e[17]=f):f=e[17],s=R.toLocaleString()}e[0]=n,e[1]=r,e[2]=i,e[3]=a,e[4]=s,e[5]=u,e[6]=o,e[7]=l,e[8]=f,e[9]=c,e[10]=p,e[11]=h,e[12]=m}else r=e[1],i=e[2],a=e[3],s=e[4],u=e[5],o=e[6],l=e[7],f=e[8],c=e[9],p=e[10],h=e[11],m=e[12];if(m!==Symbol.for("react.early_return_sentinel"))return m;let b;e[18]!==s?(b=E.jsx("span",{children:s}),e[18]=s,e[19]=b):b=e[19];let x;e[20]!==a?(x=a>0&&E.jsxs(E.Fragment,{children:[E.jsx("span",{className:"text-muted",children:"cost"}),E.jsxs("span",{children:["$",a.toFixed(4)]})]}),e[20]=a,e[21]=x):x=e[21];let T;e[22]!==b||e[23]!==x||e[24]!==u||e[25]!==o||e[26]!==l||e[27]!==f?(T=E.jsxs("div",{className:u,children:[o,l,f,b,x]}),e[22]=b,e[23]=x,e[24]=u,e[25]=o,e[26]=l,e[27]=f,e[28]=T):T=e[28];let k;e[29]!==r||e[30]!==T||e[31]!==c||e[32]!==p?(k=E.jsx(r,{side:c,className:p,children:T}),e[29]=r,e[30]=T,e[31]=c,e[32]=p,e[33]=k):k=e[33];let g;return e[34]!==i||e[35]!==k||e[36]!==h?(g=E.jsxs(i,{children:[h,k]}),e[34]=i,e[35]=k,e[36]=h,e[37]=g):g=e[37],g}const kk={planning:{icon:E.jsx(Ml,{className:"text-muted-foreground animate-pulse",size:20}),label:"Planning next moves"},thinking:{icon:E.jsx(ki,{className:"text-muted-foreground animate-pulse",size:20}),label:"Thinking"}},Ak=1200;function Ck(){const t=X.c(7),[e,n]=D.useState("planning");let r,i;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=()=>{const o=setTimeout(()=>{n("thinking")},Ak);return()=>{clearTimeout(o)}},i=[],t[0]=r,t[1]=i):(r=t[0],i=t[1]),D.useEffect(r,i);const a=kk[e];let s;t[2]!==a.label?(s=E.jsxs("span",{className:"text-sm font-medium text-muted-foreground text-shimmer",children:[a.label,"..."]}),t[2]=a.label,t[3]=s):s=t[3];let u;return t[4]!==a.icon||t[5]!==s?(u=E.jsxs("div",{className:"flex items-center gap-2 py-2",children:[a.icon,s]}),t[4]=a.icon,t[5]=s,t[6]=u):u=t[6],u}function Sk(t){const e=X.c(5),{duration:n}=t,r=n/1e3;let i;e[0]!==r?(i=r.toFixed(1),e[0]=r,e[1]=i):i=e[1];const a=i;let s;e[2]===Symbol.for("react.memo_cache_sentinel")?(s=E.jsx(Ol,{className:"text-muted-foreground",size:16}),e[2]=s):s=e[2];let u;return e[3]!==a?(u=E.jsxs("div",{className:"flex items-center gap-2 py-2 opacity-60",children:[s,E.jsxs("span",{className:"text-xs text-muted-foreground",children:["Thought · ",a,"s"]})]}),e[3]=a,e[4]=u):u=e[4],u}function Ik(t,e,n,r){const i=t.type.startsWith("tool-")||t.type==="dynamic-tool";if(t.type==="step-start"||t.type==="file"||t.type==="source-url"||t.type==="source-document")return null;if(i)return E.jsx(Tk,{part:t,id:e},`${e}-${n}`);switch(t.type){case"text":return E.jsx(jd,{id:e,text:t.text,copyable:!0,extraActions:r},`${e}-${n}`);case"reasoning":return E.jsx(mk,{part:t,id:e},`${e}-${n}`)}throw new Error(`Unknown part type: ${t.type}`)}function Nk(t){const e=X.c(27),{message:n,status:r,className:i}=t,{id:a,parts:s}=n,l=r==="streaming"||r==="submitted",f=D.useRef(null);let c;e[0]!==a?(c=()=>{const w=localStorage.getItem(`msg-duration-${a}`);return w?Number(w):null},e[0]=a,e[1]=c):c=e[1];const[p,h]=D.useState(c);let m,b;e[2]!==l?(m=()=>{l&&f.current===null&&(f.current=Date.now())},b=[l],e[2]=l,e[3]=m,e[4]=b):(m=e[3],b=e[4]),D.useEffect(m,b);let x,T;e[5]!==p||e[6]!==a||e[7]!==s.length?(x=()=>{if(s.length>0&&p===null&&f.current!==null){const w=Date.now()-f.current;h(w),localStorage.setItem(`msg-duration-${a}`,w.toString())}},T=[s.length,p,a],e[5]=p,e[6]=a,e[7]=s.length,e[8]=x,e[9]=T):(x=e[8],T=e[9]),D.useEffect(x,T);const k=s.length>0,g=k&&!l&&p!==null;let N;e[10]!==n?(N=E.jsx(Zd,{messages:[n]}),e[10]=n,e[11]=N):N=e[11];const v=N;let C;e[12]!==i?(C=ue("w-full min-w-0 group relative flex items-start gap-4 px-4 z-20 text-foreground flex-row",i),e[12]=i,e[13]=C):C=e[13];let R;e[14]!==p||e[15]!==k||e[16]!==a||e[17]!==l||e[18]!==s||e[19]!==g||e[20]!==v?(R=k?E.jsxs(E.Fragment,{children:[g&&E.jsx(Sk,{duration:p}),s.map((w,P)=>Ik(w,a,P,P===s.length-1?v:void 0))]}):l?E.jsx(Ck,{}):null,e[14]=p,e[15]=k,e[16]=a,e[17]=l,e[18]=s,e[19]=g,e[20]=v,e[21]=R):R=e[21];let M;e[22]!==R?(M=E.jsx("div",{className:"flex flex-col gap-2 min-w-0 w-full items-start",children:E.jsx("div",{className:"w-full min-w-0 not-only:rounded-2xl text-sm wrap-break-word overflow-wrap-anywhere bg-transparent",children:R})}),e[22]=R,e[23]=M):M=e[23];let U;return e[24]!==C||e[25]!==M?(U=E.jsx("div",{className:C,children:M}),e[24]=C,e[25]=M,e[26]=U):U=e[26],U}const Yd=D.createContext(null);function qd(t){const e=X.c(2),{children:n}=t;let r;return e[0]!==n?(r=E.jsx(E.Fragment,{children:n}),e[0]=n,e[1]=r):r=e[1],r}function wk(t){const e=[];for(let n=0;n<t.length;n++){const r=t[n];if(!D.isValidElement(r))continue;if(r.props?.message?.role==="assistant"){const a=t[n-1],s=D.isValidElement(a)&&a.props?.message?.role,u=a&&D.isValidElement(a)&&s==="user"?a:null;e.push({user:u,assistant:r})}}return e}function vk(t){const e=X.c(27),{children:n,className:r,minHeightOffset:i}=t,a=D.useRef(null);let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=[],e[0]=s):s=e[0];const u=D.useRef(s);let o,l,f,c,p,h,m;if(e[1]!==n||e[2]!==r||e[3]!==i){const k=D.Children.toArray(n),g=k[k.length-1];l=g&&D.isValidElement(g)&&g.type===qd?g:null;const N=l?k.slice(0,-1):k,v=wk(N);let C;e[11]===Symbol.for("react.memo_cache_sentinel")?(C=M=>{const U=u.current[M];if(U&&a.current){const w=a.current.offsetTop,P=U.offsetTop;a.current.scrollTo({top:P-w,behavior:"smooth"})}},e[11]=C):C=e[11];const R=C;o=Yd.Provider,e[12]===Symbol.for("react.memo_cache_sentinel")?(m={scrollToPair:R},e[12]=m):m=e[12],p=a,e[13]!==r?(h=ue("w-full min-w-0 max-w-full overflow-y-auto h-full overflow-x-hidden",r),e[13]=r,e[14]=h):h=e[14],f="flex flex-col min-w-0 max-w-2xl mx-auto w-full",c=v.map((M,U)=>{const w=U===v.length-1;return E.jsxs("div",{ref:P=>{u.current[U]=P},className:"flex flex-col gap-2 pb-2",style:w&&i?{minHeight:`calc(100vh - ${i}px)`}:void 0,children:[E.jsx("div",{className:"sticky top-0 z-50 bg-background w-full h-4"}),E.jsx("div",{className:"sticky top-4 z-50",children:M.user&&D.isValidElement(M.user)?D.cloneElement(M.user,{pairIndex:U}):M.user}),M.assistant]},U)}),e[1]=n,e[2]=r,e[3]=i,e[4]=o,e[5]=l,e[6]=f,e[7]=c,e[8]=p,e[9]=h,e[10]=m}else o=e[4],l=e[5],f=e[6],c=e[7],p=e[8],h=e[9],m=e[10];let b;e[15]!==l||e[16]!==f||e[17]!==c?(b=E.jsxs("div",{className:f,children:[c,l]}),e[15]=l,e[16]=f,e[17]=c,e[18]=b):b=e[18];let x;e[19]!==p||e[20]!==h||e[21]!==b?(x=E.jsx("div",{ref:p,className:h,children:b}),e[19]=p,e[20]=h,e[21]=b,e[22]=x):x=e[22];let T;return e[23]!==o||e[24]!==m||e[25]!==x?(T=E.jsx(o,{value:m,children:x}),e[23]=o,e[24]=m,e[25]=x,e[26]=T):T=e[26],T}function Rk(t){const e=X.c(29),{message:n,className:r,pairIndex:i}=t,{id:a,parts:s}=n,u=D.useRef(null),o=D.useContext(Yd),[l,f]=D.useState(!1);if(!s||s.length===0)return null;const p=s.reduce(Ok,0)>60;let h;e[0]!==o||e[1]!==i?(h=()=>{i!==void 0&&o?.scrollToPair(i)},e[0]=o,e[1]=i,e[2]=h):h=e[2];const m=h;let b;e[3]!==r?(b=ue("message-block w-full min-w-0 group relative flex items-start gap-4 px-2 text-foreground flex-row-reverse",r),e[3]=r,e[4]=b):b=e[4];const x=p&&!l&&"overflow-hidden relative max-h-[60px]";let T;e[5]!==x?(T=ue(x),e[5]=x,e[6]=T):T=e[6];let k;if(e[7]!==a||e[8]!==s){let M;e[10]!==a?(M=(U,w)=>U.type==="text"?E.jsx(jd,{id:a,text:U.text},`${a}-${w}`):null,e[10]=a,e[11]=M):M=e[11],k=s.map(M),e[7]=a,e[8]=s,e[9]=k}else k=e[9];let g;e[12]!==l||e[13]!==p?(g=p&&!l&&E.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-12 bg-gradient-to-t from-muted to-transparent pointer-events-none"}),e[12]=l,e[13]=p,e[14]=g):g=e[14];let N;e[15]!==T||e[16]!==k||e[17]!==g?(N=E.jsxs("div",{className:T,children:[k,g]}),e[15]=T,e[16]=k,e[17]=g,e[18]=N):N=e[18];let v;e[19]!==l||e[20]!==p?(v=p&&E.jsx("div",{className:"flex justify-center",children:E.jsx(Yt,{onClick:M=>{M.stopPropagation(),f(!l)},variant:"ghost",size:"xs",className:"text-xs w-full text-muted-foreground hover:text-foreground",children:l?E.jsx(zh,{className:"text-sm"}):E.jsx(ml,{className:"text-sm"})})}),e[19]=l,e[20]=p,e[21]=v):v=e[21];let C;e[22]!==m||e[23]!==N||e[24]!==v?(C=E.jsxs("div",{onClick:m,className:"w-full border min-w-0 shadow-[0_3px_6px_-1px_rgba(0,0,0,0.1)] rounded-lg text-[0.9375rem] break-words overflow-wrap-anywhere bg-muted px-4 py-2 cursor-pointer transition-colors",children:[N,v]}),e[22]=m,e[23]=N,e[24]=v,e[25]=C):C=e[25];let R;return e[26]!==b||e[27]!==C?(R=E.jsxs("div",{ref:u,className:b,children:[" ",C]}),e[26]=b,e[27]=C,e[28]=R):R=e[28],R}function Ok(t,e){return e.type==="text"?t+e.text.length:t}function Lk(t,e){const n=X.c(4);let r;n[0]!==e?(r={},n[0]=e,n[1]=r):r=n[1];const i=r,a=t??Rh;let s;return n[2]!==a?(s=Lh(a),n[2]=a,n[3]=s):s=n[3],Oh(a,"LLM",s,i)}function Dk(){const t=X.c(8),e=Dh();let n;t[0]!==e?(n={connections:e,binding:"LLMS"},t[0]=e,t[1]=n):n=t[1];const[r]=Wh(n),i=Lk(r?.id);if(!i||!r){let s;return t[2]===Symbol.for("react.memo_cache_sentinel")?(s=[],t[2]=s):s=t[2],s}let a;if(t[3]!==r||t[4]!==i){let s;t[6]!==r?(s=u=>({...u,name:u.title,contextWindow:u.limits?.contextWindow,outputLimit:u.limits?.maxOutputTokens,inputCost:u.costs?.input,outputCost:u.costs?.output,provider:u.provider,connectionId:r.id,connectionName:r.title}),t[6]=r,t[7]=s):s=t[7],a=i.map(s).sort(Pk),t[3]=r,t[4]=i,t[5]=a}else a=t[5];return a}function Pk(t,e){return t.name.localeCompare(e.name)}const Mk={reasoning:{icon:E.jsx(ki,{className:"size-4"}),bg:"bg-purple-100",text:"text-purple-700",label:"Reasoning"},"image-upload":{icon:E.jsx(Rl,{className:"size-4"}),bg:"bg-teal-100",text:"text-teal-700",label:"Can analyze images"},"file-upload":{icon:E.jsx(qh,{className:"size-4"}),bg:"bg-blue-100",text:"text-blue-700",label:"Can analyze files"},"web-search":{icon:E.jsx(hl,{className:"size-4"}),bg:"bg-amber-100",text:"text-amber-700",label:"Can search the web to answer questions"}},Vd=D.memo(function(e){const n=X.c(11),{capability:r}=e,i=Mk[r];let a;n[0]!==r||n[1]!==i?(a=i||{icon:E.jsx(un,{className:"size-4"}),bg:"bg-slate-200",text:"text-slate-700",label:r},n[0]=r,n[1]=i,n[2]=a):a=n[2];const s=a,u=`flex items-center justify-center h-6 w-6 rounded-sm ${s.bg} ${s.text}`;let o;n[3]!==s.icon||n[4]!==u?(o=E.jsx(dl,{asChild:!0,children:E.jsx("div",{className:u,children:s.icon})}),n[3]=s.icon,n[4]=u,n[5]=o):o=n[5];let l;n[6]!==s.label?(l=E.jsx(fl,{children:E.jsx("p",{children:s.label})}),n[6]=s.label,n[7]=l):l=n[7];let f;return n[8]!==o||n[9]!==l?(f=E.jsxs(cl,{children:[o,l]}),n[8]=o,n[9]=l,n[10]=f):f=n[10],f}),Co=D.memo(function(e){const n=X.c(54),{model:r,compact:i}=e,a=i===void 0?!1:i;if(!r){let T;return n[0]===Symbol.for("react.memo_cache_sentinel")?(T=E.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground text-sm",children:"Hover to preview"}),n[0]=T):T=n[0],T}const s=r.contextWindow||r.inputCost||r.outputCost||r.outputLimit;if(!s&&!a){let T;n[1]!==r.logo||n[2]!==r.name?(T=r.logo&&E.jsx("img",{src:r.logo,className:"w-6 h-6",alt:r.name}),n[1]=r.logo,n[2]=r.name,n[3]=T):T=n[3];let k;n[4]!==r.name?(k=E.jsx("p",{className:"text-lg font-medium leading-7",children:r.name}),n[4]=r.name,n[5]=k):k=n[5];let g;n[6]!==T||n[7]!==k?(g=E.jsxs("div",{className:"flex items-center gap-3 py-2 px-0",children:[T,k]}),n[6]=T,n[7]=k,n[8]=g):g=n[8];let N;n[9]!==r.description?(N=r.description&&E.jsx("p",{className:"text-sm text-muted-foreground",children:r.description}),n[9]=r.description,n[10]=N):N=n[10];let v;return n[11]!==g||n[12]!==N?(v=E.jsxs("div",{className:"flex flex-col gap-3 py-1 px-1.5",children:[g,N]}),n[11]=g,n[12]=N,n[13]=v):v=n[13],v}if(!s&&a)return null;if(a){let T;n[14]!==r.contextWindow?(T=r.contextWindow&&E.jsxs("div",{className:"flex items-center justify-between",children:[E.jsx("span",{className:"text-muted-foreground",children:"Context"}),E.jsxs("span",{className:"text-foreground font-medium",children:[r.contextWindow.toLocaleString()," tokens"]})]}),n[14]=r.contextWindow,n[15]=T):T=n[15];let k;n[16]!==r.inputCost?(k=r.inputCost&&E.jsxs("div",{className:"flex items-center justify-between",children:[E.jsx("span",{className:"text-muted-foreground",children:"Input cost"}),E.jsxs("span",{className:"text-foreground font-medium",children:["$",r.inputCost.toFixed(2)," / 1M"]})]}),n[16]=r.inputCost,n[17]=k):k=n[17];let g;n[18]!==r.outputCost?(g=r.outputCost&&E.jsxs("div",{className:"flex items-center justify-between",children:[E.jsx("span",{className:"text-muted-foreground",children:"Output cost"}),E.jsxs("span",{className:"text-foreground font-medium",children:["$",r.outputCost.toFixed(2)," / 1M"]})]}),n[18]=r.outputCost,n[19]=g):g=n[19];let N;n[20]!==r.outputLimit?(N=r.outputLimit&&E.jsxs("div",{className:"flex items-center justify-between",children:[E.jsx("span",{className:"text-muted-foreground",children:"Output limit"}),E.jsxs("span",{className:"text-foreground font-medium",children:[r.outputLimit.toLocaleString()," tokens"]})]}),n[20]=r.outputLimit,n[21]=N):N=n[21];let v;return n[22]!==T||n[23]!==k||n[24]!==g||n[25]!==N?(v=E.jsxs("div",{className:"flex flex-col gap-2.5 pt-3 pb-3 px-3 rounded-b-xl text-xs",children:[T,k,g,N]}),n[22]=T,n[23]=k,n[24]=g,n[25]=N,n[26]=v):v=n[26],v}let u;n[27]!==r.logo||n[28]!==r.name?(u=r.logo&&E.jsx("img",{src:r.logo,className:"w-6 h-6",alt:r.name}),n[27]=r.logo,n[28]=r.name,n[29]=u):u=n[29];let o;n[30]!==r.name?(o=E.jsx("p",{className:"text-lg font-medium leading-7",children:r.name}),n[30]=r.name,n[31]=o):o=n[31];let l;n[32]!==u||n[33]!==o?(l=E.jsxs("div",{className:"flex items-center gap-3",children:[u,o]}),n[32]=u,n[33]=o,n[34]=l):l=n[34];let f;n[35]!==r.capabilities?(f=r.capabilities&&r.capabilities.length>0&&E.jsx("div",{className:"flex items-center gap-2",children:r.capabilities.map(Uk)}),n[35]=r.capabilities,n[36]=f):f=n[36];let c;n[37]!==l||n[38]!==f?(c=E.jsxs("div",{className:"flex flex-col gap-3 py-2 px-0",children:[l,f]}),n[37]=l,n[38]=f,n[39]=c):c=n[39];let p;n[40]!==r.contextWindow?(p=r.contextWindow&&E.jsxs("div",{className:"flex flex-col gap-1.5",children:[E.jsxs("div",{className:"flex items-center gap-1.5",children:[E.jsx(Nh,{className:"w-3.5 h-3.5 text-muted-foreground"}),E.jsx("p",{className:"text-sm text-foreground",children:"Context window"})]}),E.jsxs("p",{className:"text-sm text-muted-foreground",children:[r.contextWindow.toLocaleString()," tokens"]})]}),n[40]=r.contextWindow,n[41]=p):p=n[41];let h;n[42]!==r.inputCost||n[43]!==r.outputCost?(h=(r.inputCost||r.outputCost)&&E.jsxs("div",{className:"flex flex-col gap-1.5",children:[E.jsxs("div",{className:"flex items-center gap-1.5",children:[E.jsx(wl,{className:"w-3.5 h-3.5 text-muted-foreground"}),E.jsx("p",{className:"text-sm text-foreground",children:"Costs"})]}),E.jsxs("div",{className:"flex flex-col gap-0.5",children:[r.inputCost!==null&&r.inputCost!==void 0&&E.jsxs("p",{className:"text-sm text-muted-foreground",children:["$",r.inputCost.toFixed(2)," / 1M tokens (input)"]}),r.outputCost!==null&&r.outputCost!==void 0&&E.jsxs("p",{className:"text-sm text-muted-foreground",children:["$",r.outputCost.toFixed(2)," / 1M tokens (output)"]})]})]}),n[42]=r.inputCost,n[43]=r.outputCost,n[44]=h):h=n[44];let m;n[45]!==r.outputLimit?(m=r.outputLimit&&E.jsxs("div",{className:"flex flex-col gap-1.5",children:[E.jsxs("div",{className:"flex items-center gap-1.5",children:[E.jsx(Ll,{className:"w-4.5 h-4.5 text-muted-foreground/70"}),E.jsx("p",{className:"text-sm text-foreground",children:"Output limit"})]}),E.jsxs("p",{className:"text-sm text-muted-foreground",children:[r.outputLimit.toLocaleString()," token limit"]})]}),n[45]=r.outputLimit,n[46]=m):m=n[46];let b;n[47]!==p||n[48]!==h||n[49]!==m?(b=E.jsxs("div",{className:"flex flex-col gap-4",children:[p,h,m]}),n[47]=p,n[48]=h,n[49]=m,n[50]=b):b=n[50];let x;return n[51]!==b||n[52]!==c?(x=E.jsxs("div",{className:"flex flex-col gap-3 py-1 px-1.5",children:[c,b]}),n[51]=b,n[52]=c,n[53]=x):x=n[53],x}),Bk=D.memo(function(e){const n=X.c(27),{model:r,onHover:i,isSelected:a,hasExpandedInfo:s}=e,u=s?"rounded-t-xl":"rounded-xl";let o;n[0]!==u?(o=ue("flex items-center gap-2 h-10 py-4 px-3 hover:bg-accent cursor-pointer",u),n[0]=u,n[1]=o):o=n[1];let l;n[2]!==r||n[3]!==i?(l=()=>i(r),n[2]=r,n[3]=i,n[4]=l):l=n[4];let f;n[5]!==r.logo||n[6]!==r.name?(f=r.logo&&E.jsx("img",{src:r.logo,className:"w-5 h-5 shrink-0",alt:r.name}),n[5]=r.logo,n[6]=r.name,n[7]=f):f=n[7];let c;n[8]!==r.name?(c=E.jsx("span",{className:"text-sm text-foreground",children:r.name}),n[8]=r.name,n[9]=c):c=n[9];let p;n[10]!==s||n[11]!==r.capabilities?(p=s&&r.capabilities&&r.capabilities.length>0&&E.jsx("div",{className:"md:hidden flex items-center gap-1.5 ml-auto",children:r.capabilities.map(Hk)}),n[10]=s,n[11]=r.capabilities,n[12]=p):p=n[12];let h;n[13]!==s||n[14]!==a?(h=a&&!s&&E.jsx(un,{className:"w-4 h-4 text-foreground ml-auto"}),n[13]=s,n[14]=a,n[15]=h):h=n[15];let m;n[16]!==s||n[17]!==a?(m=a&&s&&E.jsx(un,{className:"w-4 h-4 text-foreground ml-2 shrink-0"}),n[16]=s,n[17]=a,n[18]=m):m=n[18];let b;return n[19]!==o||n[20]!==l||n[21]!==f||n[22]!==c||n[23]!==p||n[24]!==h||n[25]!==m?(b=E.jsxs("div",{className:o,onMouseEnter:l,children:[f,c,p,h,m]}),n[19]=o,n[20]=l,n[21]=f,n[22]=c,n[23]=p,n[24]=h,n[25]=m,n[26]=b):b=n[26],b});function Fk(t){const e=X.c(9),{model:n}=t;if(!n){let s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(s=E.jsx("span",{className:"text-sm text-muted-foreground",children:"Select model"}),e[0]=s):s=e[0],s}let r;e[1]!==n.logo||e[2]!==n.name?(r=n.logo&&E.jsx("img",{src:n.logo,className:"w-4 h-4",alt:n.name}),e[1]=n.logo,e[2]=n.name,e[3]=r):r=e[3];let i;e[4]!==n.name?(i=E.jsx("span",{className:"text-sm text-muted-foreground group-hover:text-foreground transition-colors",children:n.name}),e[4]=n.name,e[5]=i):i=e[5];let a;return e[6]!==r||e[7]!==i?(a=E.jsxs("div",{className:"flex items-center gap-2",children:[r,i]}),e[6]=r,e[7]=i,e[8]=a):a=e[8],a}function zk(t){const e=X.c(57),{selectedModel:n,onModelChange:r,variant:i,className:a,placeholder:s}=t,u=i===void 0?"borderless":i,o=s===void 0?"Select model":s,[l,f]=D.useState(!1),[c,p]=D.useState(null),[h,m]=D.useState(!1),b=Dk();let x;e[0]!==b||e[1]!==n?(x=n?b.find(W=>W.id===n.id&&W.connectionId===n.connectionId)?.id:void 0,e[0]=b,e[1]=n,e[2]=x):x=e[2];const T=x;let k;if(e[3]!==b||e[4]!==T){let W;e[6]!==T?(W=K=>K.id===T,e[6]=T,e[7]=W):W=e[7],k=b.find(W),e[3]=b,e[4]=T,e[5]=k}else k=e[5];const g=k;let N;e[8]!==b||e[9]!==r?(N=W=>{const K=b.find(G=>G.id===W);K&&(r({id:K.id,connectionId:K.connectionId,provider:K.provider??void 0}),f(!1))},e[8]=b,e[9]=r,e[10]=N):N=e[10];const v=N;if(b.length===0)return null;const C=T||"",R=u==="borderless"&&"md:border-none";let M;e[11]!==a||e[12]!==R?(M=ue("h-8! text-sm hover:bg-accent rounded-lg py-1 px-2 gap-1 shadow-none cursor-pointer border-0 group focus-visible:ring-0 focus-visible:ring-offset-0",R,a),e[11]=a,e[12]=R,e[13]=M):M=e[13];let U;e[14]!==g?(U=E.jsx(Fk,{model:g}),e[14]=g,e[15]=U):U=e[15];let w;e[16]!==o||e[17]!==U?(w=E.jsx($l,{placeholder:o,children:U}),e[16]=o,e[17]=U,e[18]=w):w=e[18];let P;e[19]!==w||e[20]!==M?(P=E.jsx(Hl,{className:M,children:w}),e[19]=w,e[20]=M,e[21]=P):P=e[21];let H;e[22]!==h?(H=()=>m(!h),e[22]=h,e[23]=H):H=e[23];const te=h?"text-foreground":"text-muted-foreground";let Z;e[24]!==te?(Z=ue("w-5 h-5 transition-colors",te),e[24]=te,e[25]=Z):Z=e[25];let z;e[26]!==Z?(z=E.jsx(Vh,{className:Z}),e[26]=Z,e[27]=z):z=e[27];let Q;e[28]!==H||e[29]!==z?(Q=E.jsx("button",{type:"button",onClick:H,className:"md:hidden flex items-center justify-center h-8 w-8 rounded-lg hover:bg-accent transition-colors","aria-label":"Toggle model info",children:z}),e[28]=H,e[29]=z,e[30]=Q):Q=e[30];let ae;if(e[31]!==v||e[32]!==b||e[33]!==T||e[34]!==h){let W;e[36]!==v||e[37]!==T||e[38]!==h?(W=K=>E.jsxs("div",{onClick:()=>v(K.id),className:ue("rounded-xl mb-1",K.id===T&&"bg-accent"),children:[E.jsx(Bk,{model:K,onHover:p,isSelected:K.id===T,hasExpandedInfo:h}),h&&E.jsx("div",{className:"md:hidden",children:E.jsx(Co,{model:K,compact:!0})})]},K.id),e[36]=v,e[37]=T,e[38]=h,e[39]=W):W=e[39],ae=b.map(W),e[31]=v,e[32]=b,e[33]=T,e[34]=h,e[35]=ae}else ae=e[35];let Ee;e[40]!==ae?(Ee=E.jsx("div",{className:"flex-1 overflow-y-auto px-0.5 md:border-r",children:ae}),e[40]=ae,e[41]=Ee):Ee=e[41];const Se=c||g||null;let I;e[42]!==Se?(I=E.jsx("div",{className:"hidden md:block md:w-[300px] p-3",children:E.jsx(Co,{model:Se})}),e[42]=Se,e[43]=I):I=e[43];let xe;e[44]!==Ee||e[45]!==I?(xe=E.jsxs("div",{className:"flex flex-col md:flex-row h-[350px]",children:[Ee,I]}),e[44]=Ee,e[45]=I,e[46]=xe):xe=e[46];let Te;e[47]!==o||e[48]!==Q||e[49]!==xe?(Te=E.jsx(Ul,{title:o,className:"w-full md:w-auto md:min-w-[600px] [&_button[aria-label='Scroll down']]:!hidden [&_button[aria-label='Scroll up']]:!hidden",headerActions:Q,children:xe}),e[47]=o,e[48]=Q,e[49]=xe,e[50]=Te):Te=e[50];let y;return e[51]!==v||e[52]!==l||e[53]!==P||e[54]!==Te||e[55]!==C?(y=E.jsxs(zl,{open:l,onOpenChange:f,value:C,onValueChange:v,children:[P,Te]}),e[51]=v,e[52]=l,e[53]=P,e[54]=Te,e[55]=C,e[56]=y):y=e[56],y}function Uk(t){return E.jsx(Vd,{capability:t},t)}function Hk(t){return E.jsx(Vd,{capability:t},t)}function $k({messageCount:t,sentinelRef:e}){const n=D.useRef(t),r=D.useRef(0);t>n.current&&r.current!==t&&queueMicrotask(()=>{e.current?.scrollIntoView({behavior:"smooth",block:"start"}),r.current=t}),n.current=t}function bi(t,e){const n=D.Children.toArray(t);for(const r of n)if(D.isValidElement(r)&&r.type===e)return r;return null}function jk(t,e){return D.Children.toArray(t).filter(n=>D.isValidElement(n)?!e.includes(n.type):!0)}function Zk(t){const e=X.c(5),{className:n,children:r}=t;let i;e[0]!==n?(i=ue("h-full",n),e[0]=n,e[1]=i):i=e[1];let a;return e[2]!==r||e[3]!==i?(a=E.jsx(Ai,{className:i,children:r}),e[2]=r,e[3]=i,e[4]=a):a=e[4],a}function Yk(t){const e=X.c(11),{children:n}=t;let r;e[0]!==n?(r=bi(n,Wd),e[0]=n,e[1]=r):r=e[1];const i=r;let a;e[2]!==n?(a=bi(n,Gd),e[2]=n,e[3]=a):a=e[3];const s=a,u=i?.props.children;let o;e[4]!==u?(o=E.jsx("div",{className:"flex items-center gap-2",children:u}),e[4]=u,e[5]=o):o=e[5];const l=s?.props.children;let f;e[6]!==l?(f=E.jsx("div",{className:"flex items-center gap-1",children:l}),e[6]=l,e[7]=f):f=e[7];let c;return e[8]!==o||e[9]!==f?(c=E.jsxs(Ai.Header,{children:[o,f]}),e[8]=o,e[9]=f,e[10]=c):c=e[10],c}function Wd(t){const e=X.c(2),{children:n}=t;let r;return e[0]!==n?(r=E.jsx(E.Fragment,{children:n}),e[0]=n,e[1]=r):r=e[1],r}function Gd(t){const e=X.c(2),{children:n}=t;let r;return e[0]!==n?(r=E.jsx(E.Fragment,{children:n}),e[0]=n,e[1]=r):r=e[1],r}function qk(t){const e=X.c(3),{children:n,className:r}=t;let i;return e[0]!==n||e[1]!==r?(i=E.jsx(Ai.Content,{className:r,children:n}),e[0]=n,e[1]=r,e[2]=i):i=e[2],i}function Vk(t){const e=X.c(2),{children:n}=t;let r;return e[0]!==n?(r=E.jsx("div",{className:"h-full w-full flex items-center justify-center max-w-2xl mx-auto",children:n}),e[0]=n,e[1]=r):r=e[1],r}function Wk(t){const e=X.c(12),{messages:n,status:r,minHeightOffset:i}=t,a=i===void 0?240:i,s=D.useRef(null);let u;e[0]!==n.length?(u={messageCount:n.length,sentinelRef:s},e[0]=n.length,e[1]=u):u=e[1],$k(u);let o;if(e[2]!==n||e[3]!==r){let c;e[5]!==n.length||e[6]!==r?(c=(p,h)=>p.role==="user"?E.jsx(Rk,{message:p},p.id):p.role==="assistant"?E.jsx(Nk,{message:p,status:h===n.length-1?r:void 0},p.id):null,e[5]=n.length,e[6]=r,e[7]=c):c=e[7],o=n.map(c),e[2]=n,e[3]=r,e[4]=o}else o=e[4];let l;e[8]===Symbol.for("react.memo_cache_sentinel")?(l=E.jsx(qd,{children:E.jsx("div",{ref:s,className:"h-0"})}),e[8]=l):l=e[8];let f;return e[9]!==a||e[10]!==o?(f=E.jsxs(vk,{minHeightOffset:a,children:[o,l]}),e[9]=a,e[10]=o,e[11]=f):f=e[11],f}function Gk(t){const e=X.c(2),{children:n}=t;let r;return e[0]!==n?(r=E.jsx(Ai.Footer,{className:"max-w-2xl mx-auto w-full min-w-0",children:n}),e[0]=n,e[1]=r):r=e[1],r}function Za(t){return null}function Ya(t){return null}function Qk(t){const e=X.c(31),{onSubmit:n,onStop:r,disabled:i,isStreaming:a,placeholder:s,usageMessages:u,children:o}=t,[l,f]=D.useState("");let c,p,h,m,b;if(e[0]!==o||e[1]!==l||e[2]!==a||e[3]!==n){const N=bi(o,Za),v=bi(o,Ya);let C;e[9]!==o?(C=jk(o,[Za,Ya]),e[9]=o,e[10]=C):C=e[10],p=C;let R;e[11]!==l||e[12]!==a||e[13]!==n?(R=async M=>{if(M?.preventDefault(),!l?.trim()||a)return;const U=l.trim();try{await n(U),f("")}catch(w){const P=w;console.error("Failed to send message:",P);const H=P instanceof Error?P.message:"Failed to send message";Qr.error(H)}},e[11]=l,e[12]=a,e[13]=n,e[14]=R):R=e[14],c=R,h="flex items-center gap-2 min-w-0",m=v?E.jsx("div",{className:ue("flex items-center gap-2 flex-wrap min-w-0",v.props.disabled&&"pointer-events-none opacity-60"),children:E.jsx($m,{selectedGatewayId:v.props.selectedGatewayId,onGatewayChange:v.props.onGatewayChange,placeholder:"Gateway",variant:"bordered",className:v.props.className})}):null,b=N?E.jsx("div",{className:ue("flex items-center gap-2 flex-wrap min-w-0",N.props.disabled&&"pointer-events-none opacity-60"),children:E.jsx(zk,{selectedModel:N.props.selectedModel,onModelChange:N.props.onModelChange,placeholder:"Model",variant:"borderless",className:N.props.className})}):null,e[0]=o,e[1]=l,e[2]=a,e[3]=n,e[4]=c,e[5]=p,e[6]=h,e[7]=m,e[8]=b}else c=e[4],p=e[5],h=e[6],m=e[7],b=e[8];let x;e[15]!==u?(x=u?E.jsx(Zd,{messages:u}):null,e[15]=u,e[16]=x):x=e[16];let T;e[17]!==p||e[18]!==h||e[19]!==m||e[20]!==b||e[21]!==x?(T=E.jsxs("div",{className:h,children:[m,b,p,x]}),e[17]=p,e[18]=h,e[19]=m,e[20]=b,e[21]=x,e[22]=T):T=e[22];const k=T;let g;return e[23]!==i||e[24]!==c||e[25]!==l||e[26]!==a||e[27]!==k||e[28]!==r||e[29]!==s?(g=E.jsx(wm,{value:l,onChange:f,onSubmit:c,onStop:r,disabled:i,isStreaming:a,placeholder:s,leftActions:k}),e[23]=i,e[24]=c,e[25]=l,e[26]=a,e[27]=k,e[28]=r,e[29]=s,e[30]=g):g=e[30],g}const XI=Object.assign(Zk,{Header:Object.assign(Yk,{Left:Wd,Right:Gd}),Main:qk,Messages:Wk,EmptyState:Vk,Footer:Gk,Input:Object.assign(Qk,{ModelSelector:Za,GatewaySelector:Ya})});function cn(t){return new Promise((e,n)=>{t.oncomplete=t.onsuccess=()=>e(t.result),t.onabort=t.onerror=()=>n(t.error)})}function Kk(t,e){let n;const r=()=>{if(n)return n;const i=indexedDB.open(t);return i.onupgradeneeded=()=>i.result.createObjectStore(e),n=cn(i),n.then(a=>{a.onclose=()=>n=void 0},()=>{}),n};return(i,a)=>r().then(s=>a(s.transaction(e,i).objectStore(e)))}let pa;function zi(){return pa||(pa=Kk("keyval-store","keyval")),pa}function Us(t,e=zi()){return e("readonly",n=>cn(n.get(t)))}function gr(t,e,n=zi()){return n("readwrite",r=>(r.put(e,t),cn(r.transaction)))}function Qd(t,e=zi()){return e("readwrite",n=>(n.delete(t),cn(n.transaction)))}function Xk(t,e){return t.openCursor().onsuccess=function(){this.result&&(e(this.result),this.result.continue())},cn(t.transaction)}function Kd(t=zi()){return t("readonly",e=>{if(e.getAll&&e.getAllKeys)return Promise.all([cn(e.getAllKeys()),cn(e.getAll())]).then(([r,i])=>r.map((a,s)=>[a,i[s]]));const n=[];return t("readonly",r=>Xk(r,i=>n.push([i.key,i.value])).then(()=>n))})}async function Jk(t,e){const n=`${t}:threads:${e}`;return await Us(n)??null}async function eA(t){const e=`${t}:threads:`;return(await Kd()).filter(([i])=>typeof i=="string"&&i.startsWith(e)).map(([,i])=>i).filter(i=>!i.hidden).sort((i,a)=>String(a.updated_at).localeCompare(String(i.updated_at)))}function tA(t,e){const n=`${t}:messages:`;return Kd().then(r=>r.filter(([a])=>typeof a=="string"&&a.startsWith(n)).map(([,a])=>a).filter(a=>a.metadata?.thread_id===e||a.threadId===e).sort((a,s)=>{const u=a.metadata?.created_at||a.createdAt||"",o=s.metadata?.created_at||s.createdAt||"";return String(u).localeCompare(String(o))}))}function JI(){const t=X.c(12),{locator:e}=Dn();let n;t[0]!==e?(n=it.threads(e),t[0]=e,t[1]=n):n=t[1];let r;t[2]!==e?(r=()=>eA(e),t[2]=e,t[3]=r):r=t[3];let i;t[4]!==n||t[5]!==r?(i={queryKey:n,queryFn:r,staleTime:3e4},t[4]=n,t[5]=r,t[6]=i):i=t[6];const{data:a,refetch:s}=as(i);let u;t[7]!==a?(u=a??[],t[7]=a,t[8]=u):u=t[8];let o;return t[9]!==s||t[10]!==u?(o={threads:u,refetch:s},t[9]=s,t[10]=u,t[11]=o):o=t[11],o}function nA(t){const e=X.c(11),{locator:n}=Dn();let r;e[0]!==n||e[1]!==t?(r=it.threadMessages(n,t),e[0]=n,e[1]=t,e[2]=r):r=e[2];let i;e[3]!==n||e[4]!==t?(i=()=>tA(n,t),e[3]=n,e[4]=t,e[5]=i):i=e[5];let a;e[6]!==r||e[7]!==i?(a={queryKey:r,queryFn:i,staleTime:3e4},e[6]=r,e[7]=i,e[8]=a):a=e[8];const{data:s}=as(a);let u;return e[9]!==s?(u=s??[],e[9]=s,e[10]=u):u=e[10],u}function rA(){const t=X.c(28),{locator:e}=Dn(),n=ol();let r;t[0]!==e?(r=async x=>{const T=`${e}:threads:${x.id}`;return await gr(T,x),x},t[0]=e,t[1]=r):r=t[1];let i;t[2]!==e||t[3]!==n?(i=()=>{n.invalidateQueries({queryKey:it.threads(e)})},t[2]=e,t[3]=n,t[4]=i):i=t[4];let a;t[5]!==r||t[6]!==i?(a={mutationFn:r,onSuccess:i},t[5]=r,t[6]=i,t[7]=a):a=t[7];const s=nn(a);let u;t[8]!==e?(u=async x=>{const{id:T,updates:k}=x,g=`${e}:threads:${T}`,N=await Us(g);if(!N)throw new Error(`Thread ${T} not found`);const v={...N,...k};return await gr(g,v),v},t[8]=e,t[9]=u):u=t[9];let o;t[10]!==e||t[11]!==n?(o=x=>{n.invalidateQueries({queryKey:it.threads(e)}),n.invalidateQueries({queryKey:it.thread(e,x.id)})},t[10]=e,t[11]=n,t[12]=o):o=t[12];let l;t[13]!==u||t[14]!==o?(l={mutationFn:u,onSuccess:o},t[13]=u,t[14]=o,t[15]=l):l=t[15];const f=nn(l);let c;t[16]!==e?(c=async x=>{const T=`${e}:threads:${x}`;return await Qd(T),x},t[16]=e,t[17]=c):c=t[17];let p;t[18]!==e||t[19]!==n?(p=()=>{n.invalidateQueries({queryKey:it.threads(e)})},t[18]=e,t[19]=n,t[20]=p):p=t[20];let h;t[21]!==c||t[22]!==p?(h={mutationFn:c,onSuccess:p},t[21]=c,t[22]=p,t[23]=h):h=t[23];const m=nn(h);let b;return t[24]!==m||t[25]!==s||t[26]!==f?(b={insert:s,update:f,delete:m},t[24]=m,t[25]=s,t[26]=f,t[27]=b):b=t[27],b}function iA(){const t=X.c(37),{locator:e}=Dn(),n=ol();let r;t[0]!==e?(r=async N=>{const v=`${e}:messages:${N.id}`;return await gr(v,N),N},t[0]=e,t[1]=r):r=t[1];let i;t[2]!==e||t[3]!==n?(i=N=>{const v=N.metadata?.thread_id||N.threadId;v&&n.invalidateQueries({queryKey:it.threadMessages(e,v)}),n.invalidateQueries({queryKey:it.messages(e)})},t[2]=e,t[3]=n,t[4]=i):i=t[4];let a;t[5]!==r||t[6]!==i?(a={mutationFn:r,onSuccess:i},t[5]=r,t[6]=i,t[7]=a):a=t[7];const s=nn(a);let u;t[8]!==e?(u=async N=>(await Promise.all(N.map(v=>{const C=`${e}:messages:${v.id}`;return gr(C,v)})),N),t[8]=e,t[9]=u):u=t[9];let o;t[10]!==e||t[11]!==n?(o=N=>{const v=new Set;for(const C of N){const R=C.metadata?.thread_id||C.threadId;R&&v.add(R)}for(const C of v)n.invalidateQueries({queryKey:it.threadMessages(e,C)});n.invalidateQueries({queryKey:it.messages(e)})},t[10]=e,t[11]=n,t[12]=o):o=t[12];let l;t[13]!==u||t[14]!==o?(l={mutationFn:u,onSuccess:o},t[13]=u,t[14]=o,t[15]=l):l=t[15];const f=nn(l);let c;t[16]!==e?(c=async N=>{const{id:v,updates:C}=N,R=`${e}:messages:${v}`,M=await Us(R);if(!M)throw new Error(`Message ${v} not found`);const U={...M,...C};return await gr(R,U),U},t[16]=e,t[17]=c):c=t[17];let p;t[18]!==e||t[19]!==n?(p=N=>{const v=N.metadata?.thread_id||N.threadId;v&&n.invalidateQueries({queryKey:it.threadMessages(e,v)}),n.invalidateQueries({queryKey:it.messages(e)})},t[18]=e,t[19]=n,t[20]=p):p=t[20];let h;t[21]!==c||t[22]!==p?(h={mutationFn:c,onSuccess:p},t[21]=c,t[22]=p,t[23]=h):h=t[23];const m=nn(h);let b;t[24]!==e?(b=async N=>{const v=`${e}:messages:${N}`;return await Qd(v),N},t[24]=e,t[25]=b):b=t[25];let x;t[26]!==e||t[27]!==n?(x=()=>{n.invalidateQueries({queryKey:it.messages(e)})},t[26]=e,t[27]=n,t[28]=x):x=t[28];let T;t[29]!==x||t[30]!==b?(T={mutationFn:b,onSuccess:x},t[29]=x,t[30]=b,t[31]=T):T=t[31];const k=nn(T);let g;return t[32]!==k||t[33]!==s||t[34]!==f||t[35]!==m?(g={insert:s,insertMany:f,update:m,delete:k},t[32]=k,t[33]=s,t[34]=f,t[35]=m,t[36]=g):g=t[36],g}var Xd="vercel.ai.error",aA=Symbol.for(Xd),So,Io,Zt=class Jd extends(Io=Error,So=aA,Io){constructor({name:e,message:n,cause:r}){super(n),this[So]=!0,this.name=e,this.cause=r}static isInstance(e){return Jd.hasMarker(e,Xd)}static hasMarker(e,n){const r=Symbol.for(n);return e!=null&&typeof e=="object"&&r in e&&typeof e[r]=="boolean"&&e[r]===!0}};function ef(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var tf="AI_InvalidArgumentError",nf=`vercel.ai.error.${tf}`,sA=Symbol.for(nf),No,wo,uA=class extends(wo=Zt,No=sA,wo){constructor({message:t,cause:e,argument:n}){super({name:tf,message:t,cause:e}),this[No]=!0,this.argument=n}static isInstance(t){return Zt.hasMarker(t,nf)}},rf="AI_JSONParseError",af=`vercel.ai.error.${rf}`,oA=Symbol.for(af),vo,Ro,Oo=class extends(Ro=Zt,vo=oA,Ro){constructor({text:t,cause:e}){super({name:rf,message:`JSON parsing failed: Text: ${t}.
115
- Error message: ${ef(e)}`,cause:e}),this[vo]=!0,this.text=t}static isInstance(t){return Zt.hasMarker(t,af)}},sf="AI_TypeValidationError",uf=`vercel.ai.error.${sf}`,lA=Symbol.for(uf),Lo,Do,On=class qa extends(Do=Zt,Lo=lA,Do){constructor({value:e,cause:n}){super({name:sf,message:`Type validation failed: Value: ${JSON.stringify(e)}.
116
- Error message: ${ef(n)}`,cause:n}),this[Lo]=!0,this.value=e}static isInstance(e){return Zt.hasMarker(e,uf)}static wrap({value:e,cause:n}){return qa.isInstance(n)&&n.value===e?n:new qa({value:e,cause:n})}};const cA=B("ZodISODateTime",(t,e)=>{Gp.init(t,e),Fe.init(t,e)});function dA(t){return tm(cA,t)}const fA=B("ZodISODate",(t,e)=>{Qp.init(t,e),Fe.init(t,e)});function hA(t){return nm(fA,t)}const pA=B("ZodISOTime",(t,e)=>{Kp.init(t,e),Fe.init(t,e)});function mA(t){return rm(pA,t)}const gA=B("ZodISODuration",(t,e)=>{Xp.init(t,e),Fe.init(t,e)});function bA(t){return im(gA,t)}const EA=(t,e)=>{fh.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:n=>ph(t,n)},flatten:{value:n=>hh(t,n)},addIssue:{value:n=>t.issues.push(n)},addIssues:{value:n=>t.issues.push(...n)},isEmpty:{get(){return t.issues.length===0}}})},Ui=B("ZodError",EA,{Parent:Error}),TA=gh(Ui),xA=Eh(Ui),_A=bh(Ui),of=mh(Ui),Be=B("ZodType",(t,e)=>(Re.init(t,e),t.def=e,Object.defineProperty(t,"_def",{value:e}),t.check=(...n)=>t.clone({...e,checks:[...e.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),t.clone=(n,r)=>Ch(t,n,r),t.brand=()=>t,t.register=((n,r)=>(n.add(t,r),t)),t.parse=(n,r)=>TA(t,n,r,{callee:t.parse}),t.safeParse=(n,r)=>_A(t,n,r),t.parseAsync=async(n,r)=>xA(t,n,r,{callee:t.parseAsync}),t.safeParseAsync=async(n,r)=>of(t,n,r),t.spa=t.safeParseAsync,t.refine=(n,r)=>t.check(gC(n,r)),t.superRefine=n=>t.check(bC(n)),t.overwrite=n=>t.check(Nr(n)),t.optional=()=>Bo(t),t.nullable=()=>Fo(t),t.nullish=()=>Bo(Fo(t)),t.nonoptional=n=>uC(t,n),t.array=()=>Un(t),t.or=n=>tt([t,n]),t.and=n=>KA(t,n),t.transform=n=>zo(t,tC(n)),t.default=n=>iC(t,n),t.prefault=n=>sC(t,n),t.catch=n=>lC(t,n),t.pipe=n=>zo(t,n),t.readonly=()=>fC(t),t.describe=n=>{const r=t.clone();return Jn.add(r,{description:n}),r},Object.defineProperty(t,"description",{get(){return Jn.get(t)?.description},configurable:!0}),t.meta=(...n)=>{if(n.length===0)return Jn.get(t);const r=t.clone();return Jn.add(r,n[0]),r},t.isOptional=()=>t.safeParse(void 0).success,t.isNullable=()=>t.safeParse(null).success,t)),lf=B("_ZodString",(t,e)=>{us.init(t,e),Be.init(t,e);const n=t._zod.bag;t.format=n.format??null,t.minLength=n.minimum??null,t.maxLength=n.maximum??null,t.regex=(...r)=>t.check(dm(...r)),t.includes=(...r)=>t.check(pm(...r)),t.startsWith=(...r)=>t.check(mm(...r)),t.endsWith=(...r)=>t.check(gm(...r)),t.min=(...r)=>t.check(ui(...r)),t.max=(...r)=>t.check(Sl(...r)),t.length=(...r)=>t.check(Il(...r)),t.nonempty=(...r)=>t.check(ui(1,...r)),t.lowercase=r=>t.check(fm(r)),t.uppercase=r=>t.check(hm(r)),t.trim=()=>t.check(Em()),t.normalize=(...r)=>t.check(bm(...r)),t.toLowerCase=()=>t.check(Tm()),t.toUpperCase=()=>t.check(xm())}),yA=B("ZodString",(t,e)=>{us.init(t,e),lf.init(t,e),t.email=n=>t.check(D0(kA,n)),t.url=n=>t.check(z0(AA,n)),t.jwt=n=>t.check(em(zA,n)),t.emoji=n=>t.check(U0(CA,n)),t.guid=n=>t.check(ru(Po,n)),t.uuid=n=>t.check(P0(Vr,n)),t.uuidv4=n=>t.check(M0(Vr,n)),t.uuidv6=n=>t.check(B0(Vr,n)),t.uuidv7=n=>t.check(F0(Vr,n)),t.nanoid=n=>t.check(H0(SA,n)),t.guid=n=>t.check(ru(Po,n)),t.cuid=n=>t.check($0(IA,n)),t.cuid2=n=>t.check(j0(NA,n)),t.ulid=n=>t.check(Z0(wA,n)),t.base64=n=>t.check(K0(MA,n)),t.base64url=n=>t.check(X0(BA,n)),t.xid=n=>t.check(Y0(vA,n)),t.ksuid=n=>t.check(q0(RA,n)),t.ipv4=n=>t.check(V0(OA,n)),t.ipv6=n=>t.check(W0(LA,n)),t.cidrv4=n=>t.check(G0(DA,n)),t.cidrv6=n=>t.check(Q0(PA,n)),t.e164=n=>t.check(J0(FA,n)),t.datetime=n=>t.check(dA(n)),t.date=n=>t.check(hA(n)),t.time=n=>t.check(mA(n)),t.duration=n=>t.check(bA(n))});function V(t){return L0(yA,t)}const Fe=B("ZodStringFormat",(t,e)=>{Me.init(t,e),lf.init(t,e)}),kA=B("ZodEmail",(t,e)=>{Up.init(t,e),Fe.init(t,e)}),Po=B("ZodGUID",(t,e)=>{Fp.init(t,e),Fe.init(t,e)}),Vr=B("ZodUUID",(t,e)=>{zp.init(t,e),Fe.init(t,e)}),AA=B("ZodURL",(t,e)=>{Hp.init(t,e),Fe.init(t,e)}),CA=B("ZodEmoji",(t,e)=>{$p.init(t,e),Fe.init(t,e)}),SA=B("ZodNanoID",(t,e)=>{jp.init(t,e),Fe.init(t,e)}),IA=B("ZodCUID",(t,e)=>{Zp.init(t,e),Fe.init(t,e)}),NA=B("ZodCUID2",(t,e)=>{Yp.init(t,e),Fe.init(t,e)}),wA=B("ZodULID",(t,e)=>{qp.init(t,e),Fe.init(t,e)}),vA=B("ZodXID",(t,e)=>{Vp.init(t,e),Fe.init(t,e)}),RA=B("ZodKSUID",(t,e)=>{Wp.init(t,e),Fe.init(t,e)}),OA=B("ZodIPv4",(t,e)=>{Jp.init(t,e),Fe.init(t,e)}),LA=B("ZodIPv6",(t,e)=>{e0.init(t,e),Fe.init(t,e)}),DA=B("ZodCIDRv4",(t,e)=>{t0.init(t,e),Fe.init(t,e)}),PA=B("ZodCIDRv6",(t,e)=>{n0.init(t,e),Fe.init(t,e)}),MA=B("ZodBase64",(t,e)=>{r0.init(t,e),Fe.init(t,e)}),BA=B("ZodBase64URL",(t,e)=>{a0.init(t,e),Fe.init(t,e)}),FA=B("ZodE164",(t,e)=>{s0.init(t,e),Fe.init(t,e)}),zA=B("ZodJWT",(t,e)=>{o0.init(t,e),Fe.init(t,e)}),cf=B("ZodNumber",(t,e)=>{kl.init(t,e),Be.init(t,e),t.gt=(r,i)=>t.check(au(r,i)),t.gte=(r,i)=>t.check(Wi(r,i)),t.min=(r,i)=>t.check(Wi(r,i)),t.lt=(r,i)=>t.check(iu(r,i)),t.lte=(r,i)=>t.check(Vi(r,i)),t.max=(r,i)=>t.check(Vi(r,i)),t.int=r=>t.check(Mo(r)),t.safe=r=>t.check(Mo(r)),t.positive=r=>t.check(au(0,r)),t.nonnegative=r=>t.check(Wi(0,r)),t.negative=r=>t.check(iu(0,r)),t.nonpositive=r=>t.check(Vi(0,r)),t.multipleOf=(r,i)=>t.check(su(r,i)),t.step=(r,i)=>t.check(su(r,i)),t.finite=()=>t;const n=t._zod.bag;t.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,t.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,t.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),t.isFinite=!0,t.format=n.format??null});function UA(t){return am(cf,t)}const HA=B("ZodNumberFormat",(t,e)=>{l0.init(t,e),cf.init(t,e)});function Mo(t){return sm(HA,t)}const $A=B("ZodBoolean",(t,e)=>{c0.init(t,e),Be.init(t,e)});function Xe(t){return um($A,t)}const jA=B("ZodNull",(t,e)=>{d0.init(t,e),Be.init(t,e)});function ZA(t){return om(jA,t)}const YA=B("ZodUnknown",(t,e)=>{f0.init(t,e),Be.init(t,e)});function At(){return lm(YA)}const qA=B("ZodNever",(t,e)=>{h0.init(t,e),Be.init(t,e)});function df(t){return cm(qA,t)}const VA=B("ZodArray",(t,e)=>{p0.init(t,e),Be.init(t,e),t.element=e.element,t.min=(n,r)=>t.check(ui(n,r)),t.nonempty=n=>t.check(ui(1,n)),t.max=(n,r)=>t.check(Sl(n,r)),t.length=(n,r)=>t.check(Il(n,r)),t.unwrap=()=>t.element});function Un(t,e){return _m(VA,t,e)}const ff=B("ZodObject",(t,e)=>{m0.init(t,e),Be.init(t,e),_e(t,"shape",()=>e.shape),t.keyof=()=>pf(Object.keys(t._zod.def.shape)),t.catchall=n=>t.clone({...t._zod.def,catchall:n}),t.passthrough=()=>t.clone({...t._zod.def,catchall:At()}),t.loose=()=>t.clone({...t._zod.def,catchall:At()}),t.strict=()=>t.clone({...t._zod.def,catchall:df()}),t.strip=()=>t.clone({...t._zod.def,catchall:void 0}),t.extend=n=>Th(t,n),t.merge=n=>xh(t,n),t.pick=n=>_h(t,n),t.omit=n=>yh(t,n),t.partial=(...n)=>kh(mf,t,n[0]),t.required=(...n)=>Ah(gf,t,n[0])});function Ne(t,e){const n={type:"object",get shape(){return ll(this,"shape",{...t}),this.shape},...ee(e)};return new ff(n)}function Oe(t,e){return new ff({type:"object",get shape(){return ll(this,"shape",{...t}),this.shape},catchall:df(),...ee(e)})}const hf=B("ZodUnion",(t,e)=>{Al.init(t,e),Be.init(t,e),t.options=e.options});function tt(t,e){return new hf({type:"union",options:t,...ee(e)})}const WA=B("ZodDiscriminatedUnion",(t,e)=>{hf.init(t,e),g0.init(t,e)});function GA(t,e,n){return new WA({type:"union",options:e,discriminator:t,...ee(n)})}const QA=B("ZodIntersection",(t,e)=>{b0.init(t,e),Be.init(t,e)});function KA(t,e){return new QA({type:"intersection",left:t,right:e})}const XA=B("ZodRecord",(t,e)=>{E0.init(t,e),Be.init(t,e),t.keyType=e.keyType,t.valueType=e.valueType});function yr(t,e,n){return new XA({type:"record",keyType:t,valueType:e,...ee(n)})}const Va=B("ZodEnum",(t,e)=>{T0.init(t,e),Be.init(t,e),t.enum=e.entries,t.options=Object.values(e.entries);const n=new Set(Object.keys(e.entries));t.extract=(r,i)=>{const a={};for(const s of r)if(n.has(s))a[s]=e.entries[s];else throw new Error(`Key ${s} not found in enum`);return new Va({...e,checks:[],...ee(i),entries:a})},t.exclude=(r,i)=>{const a={...e.entries};for(const s of r)if(n.has(s))delete a[s];else throw new Error(`Key ${s} not found in enum`);return new Va({...e,checks:[],...ee(i),entries:a})}});function pf(t,e){const n=Array.isArray(t)?Object.fromEntries(t.map(r=>[r,r])):t;return new Va({type:"enum",entries:n,...ee(e)})}const JA=B("ZodLiteral",(t,e)=>{x0.init(t,e),Be.init(t,e),t.values=new Set(e.values),Object.defineProperty(t,"value",{get(){if(e.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return e.values[0]}})});function ie(t,e){return new JA({type:"literal",values:Array.isArray(t)?t:[t],...ee(e)})}const eC=B("ZodTransform",(t,e)=>{_0.init(t,e),Be.init(t,e),t._zod.parse=(n,r)=>{n.addIssue=a=>{if(typeof a=="string")n.issues.push(br(a,n.value,e));else{const s=a;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=t),s.continue??(s.continue=!0),n.issues.push(br(s))}};const i=e.transform(n.value,n);return i instanceof Promise?i.then(a=>(n.value=a,n)):(n.value=i,n)}});function tC(t){return new eC({type:"transform",transform:t})}const mf=B("ZodOptional",(t,e)=>{y0.init(t,e),Be.init(t,e),t.unwrap=()=>t._zod.def.innerType});function Bo(t){return new mf({type:"optional",innerType:t})}const nC=B("ZodNullable",(t,e)=>{k0.init(t,e),Be.init(t,e),t.unwrap=()=>t._zod.def.innerType});function Fo(t){return new nC({type:"nullable",innerType:t})}const rC=B("ZodDefault",(t,e)=>{A0.init(t,e),Be.init(t,e),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function iC(t,e){return new rC({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():e}})}const aC=B("ZodPrefault",(t,e)=>{C0.init(t,e),Be.init(t,e),t.unwrap=()=>t._zod.def.innerType});function sC(t,e){return new aC({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():e}})}const gf=B("ZodNonOptional",(t,e)=>{S0.init(t,e),Be.init(t,e),t.unwrap=()=>t._zod.def.innerType});function uC(t,e){return new gf({type:"nonoptional",innerType:t,...ee(e)})}const oC=B("ZodCatch",(t,e)=>{I0.init(t,e),Be.init(t,e),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function lC(t,e){return new oC({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}const cC=B("ZodPipe",(t,e)=>{N0.init(t,e),Be.init(t,e),t.in=e.in,t.out=e.out});function zo(t,e){return new cC({type:"pipe",in:t,out:e})}const dC=B("ZodReadonly",(t,e)=>{w0.init(t,e),Be.init(t,e)});function fC(t){return new dC({type:"readonly",innerType:t})}const hC=B("ZodLazy",(t,e)=>{v0.init(t,e),Be.init(t,e),t.unwrap=()=>t._zod.def.getter()});function pC(t){return new hC({type:"lazy",getter:t})}const Hs=B("ZodCustom",(t,e)=>{R0.init(t,e),Be.init(t,e)});function mC(t){const e=new at({check:"custom"});return e._zod.check=t,e}function bf(t,e){return ym(Hs,t??(()=>!0),e)}function gC(t,e={}){return km(Hs,t,e)}function bC(t){const e=mC(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(br(r,n.value,e._zod.def));else{const i=r;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=n.value),i.inst??(i.inst=e),i.continue??(i.continue=!e._zod.def.abort),n.issues.push(br(i))}},t(n.value,n)));return e}function Ei(t,e={error:`Input not instance of ${t.name}`}){const n=new Hs({type:"custom",check:"custom",fn:r=>r instanceof t,abort:!0,...ee(e)});return n._zod.bag.Class=t,n}var Mr=({prefix:t,size:e=16,alphabet:n="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:r="-"}={})=>{const i=()=>{const a=n.length,s=new Array(e);for(let u=0;u<e;u++)s[u]=n[Math.random()*a|0];return s.join("")};if(t==null)return i;if(n.includes(r))throw new uA({argument:"separator",message:`The separator "${r}" must not be part of the alphabet "${n}".`});return()=>`${t}${r}${i()}`},EC=Mr();function Uo(t=globalThis){var e,n,r;return t.window?"runtime/browser":(e=t.navigator)!=null&&e.userAgent?`runtime/${t.navigator.userAgent.toLowerCase()}`:(r=(n=t.process)==null?void 0:n.versions)!=null&&r.node?`runtime/node.js/${t.process.version.substring(0)}`:t.EdgeRuntime?"runtime/vercel-edge":"runtime/unknown"}function Jt(t){if(t==null)return{};const e={};if(t instanceof Headers)t.forEach((n,r)=>{e[r.toLowerCase()]=n});else{Array.isArray(t)||(t=Object.entries(t));for(const[n,r]of t)r!=null&&(e[n.toLowerCase()]=r)}return e}function Ho(t,...e){const n=new Headers(Jt(t)),r=n.get("user-agent")||"";return n.set("user-agent",[r,...e].filter(Boolean).join(" ")),Object.fromEntries(n.entries())}var TC=/"__proto__"\s*:/,xC=/"constructor"\s*:/;function $o(t){const e=JSON.parse(t);return e===null||typeof e!="object"||TC.test(t)===!1&&xC.test(t)===!1?e:_C(e)}function _C(t){let e=[t];for(;e.length;){const n=e;e=[];for(const r of n){if(Object.prototype.hasOwnProperty.call(r,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(r,"constructor")&&Object.prototype.hasOwnProperty.call(r.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const i in r){const a=r[i];a&&typeof a=="object"&&e.push(a)}}}return t}function yC(t){const{stackTraceLimit:e}=Error;try{Error.stackTraceLimit=0}catch{return $o(t)}try{return $o(t)}finally{Error.stackTraceLimit=e}}function ti(t){if(t.type==="object"){t.additionalProperties=!1;const e=t.properties;if(e!=null)for(const n in e)e[n]=ti(e[n])}return t.type==="array"&&t.items!=null&&(Array.isArray(t.items)?t.items=t.items.map(e=>ti(e)):t.items=ti(t.items)),t}var kC=Symbol("Let zodToJsonSchema decide on which parser to use"),jo={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},AC=t=>typeof t=="string"?{...jo,name:t}:{...jo,...t};function dt(){return{}}function CC(t,e){var n,r,i;const a={type:"array"};return(n=t.type)!=null&&n._def&&((i=(r=t.type)==null?void 0:r._def)==null?void 0:i.typeName)!==ce.ZodAny&&(a.items=Ce(t.type._def,{...e,currentPath:[...e.currentPath,"items"]})),t.minLength&&(a.minItems=t.minLength.value),t.maxLength&&(a.maxItems=t.maxLength.value),t.exactLength&&(a.minItems=t.exactLength.value,a.maxItems=t.exactLength.value),a}function SC(t){const e={type:"integer",format:"int64"};if(!t.checks)return e;for(const n of t.checks)switch(n.kind){case"min":n.inclusive?e.minimum=n.value:e.exclusiveMinimum=n.value;break;case"max":n.inclusive?e.maximum=n.value:e.exclusiveMaximum=n.value;break;case"multipleOf":e.multipleOf=n.value;break}return e}function IC(){return{type:"boolean"}}function Ef(t,e){return Ce(t.type._def,e)}var NC=(t,e)=>Ce(t.innerType._def,e);function Tf(t,e,n){const r=n??e.dateStrategy;if(Array.isArray(r))return{anyOf:r.map((i,a)=>Tf(t,e,i))};switch(r){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return wC(t)}}var wC=t=>{const e={type:"integer",format:"unix-time"};for(const n of t.checks)switch(n.kind){case"min":e.minimum=n.value;break;case"max":e.maximum=n.value;break}return e};function vC(t,e){return{...Ce(t.innerType._def,e),default:t.defaultValue()}}function RC(t,e){return e.effectStrategy==="input"?Ce(t.schema._def,e):dt()}function OC(t){return{type:"string",enum:Array.from(t.values)}}var LC=t=>"type"in t&&t.type==="string"?!1:"allOf"in t;function DC(t,e){const n=[Ce(t.left._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),Ce(t.right._def,{...e,currentPath:[...e.currentPath,"allOf","1"]})].filter(i=>!!i),r=[];return n.forEach(i=>{if(LC(i))r.push(...i.allOf);else{let a=i;if("additionalProperties"in i&&i.additionalProperties===!1){const{additionalProperties:s,...u}=i;a=u}r.push(a)}}),r.length?{allOf:r}:void 0}function PC(t){const e=typeof t.value;return e!=="bigint"&&e!=="number"&&e!=="boolean"&&e!=="string"?{type:Array.isArray(t.value)?"array":"object"}:{type:e==="bigint"?"integer":e,const:t.value}}var ma=void 0,gt={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(ma===void 0&&(ma=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),ma),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function xf(t,e){const n={type:"string"};if(t.checks)for(const r of t.checks)switch(r.kind){case"min":n.minLength=typeof n.minLength=="number"?Math.max(n.minLength,r.value):r.value;break;case"max":n.maxLength=typeof n.maxLength=="number"?Math.min(n.maxLength,r.value):r.value;break;case"email":switch(e.emailStrategy){case"format:email":bt(n,"email",r.message,e);break;case"format:idn-email":bt(n,"idn-email",r.message,e);break;case"pattern:zod":Ke(n,gt.email,r.message,e);break}break;case"url":bt(n,"uri",r.message,e);break;case"uuid":bt(n,"uuid",r.message,e);break;case"regex":Ke(n,r.regex,r.message,e);break;case"cuid":Ke(n,gt.cuid,r.message,e);break;case"cuid2":Ke(n,gt.cuid2,r.message,e);break;case"startsWith":Ke(n,RegExp(`^${ga(r.value,e)}`),r.message,e);break;case"endsWith":Ke(n,RegExp(`${ga(r.value,e)}$`),r.message,e);break;case"datetime":bt(n,"date-time",r.message,e);break;case"date":bt(n,"date",r.message,e);break;case"time":bt(n,"time",r.message,e);break;case"duration":bt(n,"duration",r.message,e);break;case"length":n.minLength=typeof n.minLength=="number"?Math.max(n.minLength,r.value):r.value,n.maxLength=typeof n.maxLength=="number"?Math.min(n.maxLength,r.value):r.value;break;case"includes":{Ke(n,RegExp(ga(r.value,e)),r.message,e);break}case"ip":{r.version!=="v6"&&bt(n,"ipv4",r.message,e),r.version!=="v4"&&bt(n,"ipv6",r.message,e);break}case"base64url":Ke(n,gt.base64url,r.message,e);break;case"jwt":Ke(n,gt.jwt,r.message,e);break;case"cidr":{r.version!=="v6"&&Ke(n,gt.ipv4Cidr,r.message,e),r.version!=="v4"&&Ke(n,gt.ipv6Cidr,r.message,e);break}case"emoji":Ke(n,gt.emoji(),r.message,e);break;case"ulid":{Ke(n,gt.ulid,r.message,e);break}case"base64":{switch(e.base64Strategy){case"format:binary":{bt(n,"binary",r.message,e);break}case"contentEncoding:base64":{n.contentEncoding="base64";break}case"pattern:zod":{Ke(n,gt.base64,r.message,e);break}}break}case"nanoid":Ke(n,gt.nanoid,r.message,e)}return n}function ga(t,e){return e.patternStrategy==="escape"?BC(t):t}var MC=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function BC(t){let e="";for(let n=0;n<t.length;n++)MC.has(t[n])||(e+="\\"),e+=t[n];return e}function bt(t,e,n,r){var i;t.format||(i=t.anyOf)!=null&&i.some(a=>a.format)?(t.anyOf||(t.anyOf=[]),t.format&&(t.anyOf.push({format:t.format}),delete t.format),t.anyOf.push({format:e,...n&&r.errorMessages&&{errorMessage:{format:n}}})):t.format=e}function Ke(t,e,n,r){var i;t.pattern||(i=t.allOf)!=null&&i.some(a=>a.pattern)?(t.allOf||(t.allOf=[]),t.pattern&&(t.allOf.push({pattern:t.pattern}),delete t.pattern),t.allOf.push({pattern:Zo(e,r),...n&&r.errorMessages&&{errorMessage:{pattern:n}}})):t.pattern=Zo(e,r)}function Zo(t,e){var n;if(!e.applyRegexFlags||!t.flags)return t.source;const r={i:t.flags.includes("i"),m:t.flags.includes("m"),s:t.flags.includes("s")},i=r.i?t.source.toLowerCase():t.source;let a="",s=!1,u=!1,o=!1;for(let l=0;l<i.length;l++){if(s){a+=i[l],s=!1;continue}if(r.i){if(u){if(i[l].match(/[a-z]/)){o?(a+=i[l],a+=`${i[l-2]}-${i[l]}`.toUpperCase(),o=!1):i[l+1]==="-"&&((n=i[l+2])!=null&&n.match(/[a-z]/))?(a+=i[l],o=!0):a+=`${i[l]}${i[l].toUpperCase()}`;continue}}else if(i[l].match(/[a-z]/)){a+=`[${i[l]}${i[l].toUpperCase()}]`;continue}}if(r.m){if(i[l]==="^"){a+=`(^|(?<=[\r
117
- ]))`;continue}else if(i[l]==="$"){a+=`($|(?=[\r
118
- ]))`;continue}}if(r.s&&i[l]==="."){a+=u?`${i[l]}\r
119
- `:`[${i[l]}\r
120
- ]`;continue}a+=i[l],i[l]==="\\"?s=!0:u&&i[l]==="]"?u=!1:!u&&i[l]==="["&&(u=!0)}try{new RegExp(a)}catch{return console.warn(`Could not convert regex pattern at ${e.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),t.source}return a}function _f(t,e){var n,r,i,a,s,u;const o={type:"object",additionalProperties:(n=Ce(t.valueType._def,{...e,currentPath:[...e.currentPath,"additionalProperties"]}))!=null?n:e.allowedAdditionalProperties};if(((r=t.keyType)==null?void 0:r._def.typeName)===ce.ZodString&&((i=t.keyType._def.checks)!=null&&i.length)){const{type:l,...f}=xf(t.keyType._def,e);return{...o,propertyNames:f}}else{if(((a=t.keyType)==null?void 0:a._def.typeName)===ce.ZodEnum)return{...o,propertyNames:{enum:t.keyType._def.values}};if(((s=t.keyType)==null?void 0:s._def.typeName)===ce.ZodBranded&&t.keyType._def.type._def.typeName===ce.ZodString&&((u=t.keyType._def.type._def.checks)!=null&&u.length)){const{type:l,...f}=Ef(t.keyType._def,e);return{...o,propertyNames:f}}}return o}function FC(t,e){if(e.mapStrategy==="record")return _f(t,e);const n=Ce(t.keyType._def,{...e,currentPath:[...e.currentPath,"items","items","0"]})||dt(),r=Ce(t.valueType._def,{...e,currentPath:[...e.currentPath,"items","items","1"]})||dt();return{type:"array",maxItems:125,items:{type:"array",items:[n,r],minItems:2,maxItems:2}}}function zC(t){const e=t.values,r=Object.keys(t.values).filter(a=>typeof e[e[a]]!="number").map(a=>e[a]),i=Array.from(new Set(r.map(a=>typeof a)));return{type:i.length===1?i[0]==="string"?"string":"number":["string","number"],enum:r}}function UC(){return{not:dt()}}function HC(){return{type:"null"}}var Wa={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function $C(t,e){const n=t.options instanceof Map?Array.from(t.options.values()):t.options;if(n.every(r=>r._def.typeName in Wa&&(!r._def.checks||!r._def.checks.length))){const r=n.reduce((i,a)=>{const s=Wa[a._def.typeName];return s&&!i.includes(s)?[...i,s]:i},[]);return{type:r.length>1?r:r[0]}}else if(n.every(r=>r._def.typeName==="ZodLiteral"&&!r.description)){const r=n.reduce((i,a)=>{const s=typeof a._def.value;switch(s){case"string":case"number":case"boolean":return[...i,s];case"bigint":return[...i,"integer"];case"object":if(a._def.value===null)return[...i,"null"];default:return i}},[]);if(r.length===n.length){const i=r.filter((a,s,u)=>u.indexOf(a)===s);return{type:i.length>1?i:i[0],enum:n.reduce((a,s)=>a.includes(s._def.value)?a:[...a,s._def.value],[])}}}else if(n.every(r=>r._def.typeName==="ZodEnum"))return{type:"string",enum:n.reduce((r,i)=>[...r,...i._def.values.filter(a=>!r.includes(a))],[])};return jC(t,e)}var jC=(t,e)=>{const n=(t.options instanceof Map?Array.from(t.options.values()):t.options).map((r,i)=>Ce(r._def,{...e,currentPath:[...e.currentPath,"anyOf",`${i}`]})).filter(r=>!!r&&(!e.strictUnions||typeof r=="object"&&Object.keys(r).length>0));return n.length?{anyOf:n}:void 0};function ZC(t,e){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(t.innerType._def.typeName)&&(!t.innerType._def.checks||!t.innerType._def.checks.length))return{type:[Wa[t.innerType._def.typeName],"null"]};const n=Ce(t.innerType._def,{...e,currentPath:[...e.currentPath,"anyOf","0"]});return n&&{anyOf:[n,{type:"null"}]}}function YC(t){const e={type:"number"};if(!t.checks)return e;for(const n of t.checks)switch(n.kind){case"int":e.type="integer";break;case"min":n.inclusive?e.minimum=n.value:e.exclusiveMinimum=n.value;break;case"max":n.inclusive?e.maximum=n.value:e.exclusiveMaximum=n.value;break;case"multipleOf":e.multipleOf=n.value;break}return e}function qC(t,e){const n={type:"object",properties:{}},r=[],i=t.shape();for(const s in i){let u=i[s];if(u===void 0||u._def===void 0)continue;const o=WC(u),l=Ce(u._def,{...e,currentPath:[...e.currentPath,"properties",s],propertyPath:[...e.currentPath,"properties",s]});l!==void 0&&(n.properties[s]=l,o||r.push(s))}r.length&&(n.required=r);const a=VC(t,e);return a!==void 0&&(n.additionalProperties=a),n}function VC(t,e){if(t.catchall._def.typeName!=="ZodNever")return Ce(t.catchall._def,{...e,currentPath:[...e.currentPath,"additionalProperties"]});switch(t.unknownKeys){case"passthrough":return e.allowedAdditionalProperties;case"strict":return e.rejectedAdditionalProperties;case"strip":return e.removeAdditionalStrategy==="strict"?e.allowedAdditionalProperties:e.rejectedAdditionalProperties}}function WC(t){try{return t.isOptional()}catch{return!0}}var GC=(t,e)=>{var n;if(e.currentPath.toString()===((n=e.propertyPath)==null?void 0:n.toString()))return Ce(t.innerType._def,e);const r=Ce(t.innerType._def,{...e,currentPath:[...e.currentPath,"anyOf","1"]});return r?{anyOf:[{not:dt()},r]}:dt()},QC=(t,e)=>{if(e.pipeStrategy==="input")return Ce(t.in._def,e);if(e.pipeStrategy==="output")return Ce(t.out._def,e);const n=Ce(t.in._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),r=Ce(t.out._def,{...e,currentPath:[...e.currentPath,"allOf",n?"1":"0"]});return{allOf:[n,r].filter(i=>i!==void 0)}};function KC(t,e){return Ce(t.type._def,e)}function XC(t,e){const r={type:"array",uniqueItems:!0,items:Ce(t.valueType._def,{...e,currentPath:[...e.currentPath,"items"]})};return t.minSize&&(r.minItems=t.minSize.value),t.maxSize&&(r.maxItems=t.maxSize.value),r}function JC(t,e){return t.rest?{type:"array",minItems:t.items.length,items:t.items.map((n,r)=>Ce(n._def,{...e,currentPath:[...e.currentPath,"items",`${r}`]})).reduce((n,r)=>r===void 0?n:[...n,r],[]),additionalItems:Ce(t.rest._def,{...e,currentPath:[...e.currentPath,"additionalItems"]})}:{type:"array",minItems:t.items.length,maxItems:t.items.length,items:t.items.map((n,r)=>Ce(n._def,{...e,currentPath:[...e.currentPath,"items",`${r}`]})).reduce((n,r)=>r===void 0?n:[...n,r],[])}}function eS(){return{not:dt()}}function tS(){return dt()}var nS=(t,e)=>Ce(t.innerType._def,e),rS=(t,e,n)=>{switch(e){case ce.ZodString:return xf(t,n);case ce.ZodNumber:return YC(t);case ce.ZodObject:return qC(t,n);case ce.ZodBigInt:return SC(t);case ce.ZodBoolean:return IC();case ce.ZodDate:return Tf(t,n);case ce.ZodUndefined:return eS();case ce.ZodNull:return HC();case ce.ZodArray:return CC(t,n);case ce.ZodUnion:case ce.ZodDiscriminatedUnion:return $C(t,n);case ce.ZodIntersection:return DC(t,n);case ce.ZodTuple:return JC(t,n);case ce.ZodRecord:return _f(t,n);case ce.ZodLiteral:return PC(t);case ce.ZodEnum:return OC(t);case ce.ZodNativeEnum:return zC(t);case ce.ZodNullable:return ZC(t,n);case ce.ZodOptional:return GC(t,n);case ce.ZodMap:return FC(t,n);case ce.ZodSet:return XC(t,n);case ce.ZodLazy:return()=>t.getter()._def;case ce.ZodPromise:return KC(t,n);case ce.ZodNaN:case ce.ZodNever:return UC();case ce.ZodEffects:return RC(t,n);case ce.ZodAny:return dt();case ce.ZodUnknown:return tS();case ce.ZodDefault:return vC(t,n);case ce.ZodBranded:return Ef(t,n);case ce.ZodReadonly:return nS(t,n);case ce.ZodCatch:return NC(t,n);case ce.ZodPipeline:return QC(t,n);case ce.ZodFunction:case ce.ZodVoid:case ce.ZodSymbol:return;default:return(r=>{})()}},iS=(t,e)=>{let n=0;for(;n<t.length&&n<e.length&&t[n]===e[n];n++);return[(t.length-n).toString(),...e.slice(n)].join("/")};function Ce(t,e,n=!1){var r;const i=e.seen.get(t);if(e.override){const o=(r=e.override)==null?void 0:r.call(e,t,e,i,n);if(o!==kC)return o}if(i&&!n){const o=aS(i,e);if(o!==void 0)return o}const a={def:t,path:e.currentPath,jsonSchema:void 0};e.seen.set(t,a);const s=rS(t,t.typeName,e),u=typeof s=="function"?Ce(s(),e):s;if(u&&sS(t,e,u),e.postProcess){const o=e.postProcess(u,t,e);return a.jsonSchema=u,o}return a.jsonSchema=u,u}var aS=(t,e)=>{switch(e.$refStrategy){case"root":return{$ref:t.path.join("/")};case"relative":return{$ref:iS(e.currentPath,t.path)};case"none":case"seen":return t.path.length<e.currentPath.length&&t.path.every((n,r)=>e.currentPath[r]===n)?(console.warn(`Recursive reference detected at ${e.currentPath.join("/")}! Defaulting to any`),dt()):e.$refStrategy==="seen"?dt():void 0}},sS=(t,e,n)=>(t.description&&(n.description=t.description),n),uS=t=>{const e=AC(t),n=e.name!==void 0?[...e.basePath,e.definitionPath,e.name]:e.basePath;return{...e,currentPath:n,propertyPath:void 0,seen:new Map(Object.entries(e.definitions).map(([r,i])=>[i._def,{def:i._def,path:[...e.basePath,e.definitionPath,r],jsonSchema:void 0}]))}},oS=(t,e)=>{var n;const r=uS(e);let i=typeof e=="object"&&e.definitions?Object.entries(e.definitions).reduce((l,[f,c])=>{var p;return{...l,[f]:(p=Ce(c._def,{...r,currentPath:[...r.basePath,r.definitionPath,f]},!0))!=null?p:dt()}},{}):void 0;const a=typeof e=="string"?e:e?.nameStrategy==="title"?void 0:e?.name,s=(n=Ce(t._def,a===void 0?r:{...r,currentPath:[...r.basePath,r.definitionPath,a]},!1))!=null?n:dt(),u=typeof e=="object"&&e.name!==void 0&&e.nameStrategy==="title"?e.name:void 0;u!==void 0&&(s.title=u);const o=a===void 0?i?{...s,[r.definitionPath]:i}:s:{$ref:[...r.$refStrategy==="relative"?[]:r.basePath,r.definitionPath,a].join("/"),[r.definitionPath]:{...i,[a]:s}};return o.$schema="http://json-schema.org/draft-07/schema#",o},Ga=Symbol.for("vercel.ai.schema");function lS(t){let e;return()=>(e==null&&(e=t()),e)}function Hi(t,{validate:e}={}){return{[Ga]:!0,_type:void 0,get jsonSchema(){return typeof t=="function"&&(t=t()),t},validate:e}}function cS(t){return typeof t=="object"&&t!==null&&Ga in t&&t[Ga]===!0&&"jsonSchema"in t&&"validate"in t}function $s(t){return t==null?Hi({properties:{},additionalProperties:!1}):cS(t)?t:"~standard"in t?t["~standard"].vendor==="zod"?yf(t):dS(t):t()}function dS(t){return Hi(()=>t["~standard"].jsonSchema.input({target:"draft-07"}),{validate:async e=>{const n=await t["~standard"].validate(e);return"value"in n?{success:!0,value:n.value}:{success:!1,error:new On({value:e,cause:n.issues})}}})}function fS(t,e){var n;const r=(n=void 0)!=null?n:!1;return Hi(()=>oS(t,{$refStrategy:r?"root":"none"}),{validate:async i=>{const a=await t.safeParseAsync(i);return a.success?{success:!0,value:a.data}:{success:!1,error:a.error}}})}function hS(t,e){var n;const r=(n=void 0)!=null?n:!1;return Hi(()=>ti(Am(t,{target:"draft-7",io:"input",reused:r?"ref":"inline"})),{validate:async i=>{const a=await of(t,i);return a.success?{success:!0,value:a.data}:{success:!1,error:a.error}}})}function pS(t){return"_zod"in t}function yf(t,e){return pS(t)?hS(t):fS(t)}async function Yo({value:t,schema:e}){const n=await kr({value:t,schema:e});if(!n.success)throw On.wrap({value:t,cause:n.error});return n.value}async function kr({value:t,schema:e}){const n=$s(e);try{if(n.validate==null)return{success:!0,value:t,rawValue:t};const r=await n.validate(t);return r.success?{success:!0,value:r.value,rawValue:t}:{success:!1,error:On.wrap({value:t,cause:r.error}),rawValue:t}}catch(r){return{success:!1,error:On.wrap({value:t,cause:r}),rawValue:t}}}async function dn({text:t,schema:e}){try{const n=yC(t);return e==null?{success:!0,value:n,rawValue:n}:await kr({value:n,schema:e})}catch(n){return{success:!1,error:Oo.isInstance(n)?n:new Oo({text:t,cause:n}),rawValue:void 0}}}function mS({stream:t,schema:e}){return t.pipeThrough(new TextDecoderStream).pipeThrough(new Gh).pipeThrough(new TransformStream({async transform({data:n},r){n!=="[DONE]"&&r.enqueue(await dn({text:n,schema:e}))}}))}async function Ut(t){return typeof t=="function"&&(t=t()),Promise.resolve(t)}var gS=Object.defineProperty,bS=(t,e)=>{for(var n in e)gS(t,n,{get:e[n],enumerable:!0})},kf="AI_NoObjectGeneratedError",Af=`vercel.ai.error.${kf}`,ES=Symbol.for(Af),Cf,jt=class extends Zt{constructor({message:t="No object generated.",cause:e,text:n,response:r,usage:i,finishReason:a}){super({name:kf,message:t,cause:e}),this[Cf]=!0,this.text=n,this.response=r,this.usage=i,this.finishReason=a}static isInstance(t){return Zt.hasMarker(t,Af)}};Cf=ES;var qo="6.0.4",Sf=tt([V(),Ei(Uint8Array),Ei(ArrayBuffer),bf(t=>{var e,n;return(n=(e=globalThis.Buffer)==null?void 0:e.isBuffer(t))!=null?n:!1},{message:"Must be a Buffer"})]),Ar=pC(()=>tt([ZA(),V(),UA(),Xe(),yr(V(),Ar.optional()),Un(Ar)])),ge=yr(V(),yr(V(),Ar.optional())),If=Ne({type:ie("text"),text:V(),providerOptions:ge.optional()}),TS=Ne({type:ie("image"),image:tt([Sf,Ei(URL)]),mediaType:V().optional(),providerOptions:ge.optional()}),Nf=Ne({type:ie("file"),data:tt([Sf,Ei(URL)]),filename:V().optional(),mediaType:V(),providerOptions:ge.optional()}),xS=Ne({type:ie("reasoning"),text:V(),providerOptions:ge.optional()}),_S=Ne({type:ie("tool-call"),toolCallId:V(),toolName:V(),input:At(),providerOptions:ge.optional(),providerExecuted:Xe().optional()}),yS=GA("type",[Ne({type:ie("text"),value:V(),providerOptions:ge.optional()}),Ne({type:ie("json"),value:Ar,providerOptions:ge.optional()}),Ne({type:ie("execution-denied"),reason:V().optional(),providerOptions:ge.optional()}),Ne({type:ie("error-text"),value:V(),providerOptions:ge.optional()}),Ne({type:ie("error-json"),value:Ar,providerOptions:ge.optional()}),Ne({type:ie("content"),value:Un(tt([Ne({type:ie("text"),text:V(),providerOptions:ge.optional()}),Ne({type:ie("media"),data:V(),mediaType:V()}),Ne({type:ie("file-data"),data:V(),mediaType:V(),filename:V().optional(),providerOptions:ge.optional()}),Ne({type:ie("file-url"),url:V(),providerOptions:ge.optional()}),Ne({type:ie("file-id"),fileId:tt([V(),yr(V(),V())]),providerOptions:ge.optional()}),Ne({type:ie("image-data"),data:V(),mediaType:V(),providerOptions:ge.optional()}),Ne({type:ie("image-url"),url:V(),providerOptions:ge.optional()}),Ne({type:ie("image-file-id"),fileId:tt([V(),yr(V(),V())]),providerOptions:ge.optional()}),Ne({type:ie("custom"),providerOptions:ge.optional()})]))})]),wf=Ne({type:ie("tool-result"),toolCallId:V(),toolName:V(),output:yS,providerOptions:ge.optional()}),kS=Ne({type:ie("tool-approval-request"),approvalId:V(),toolCallId:V()}),AS=Ne({type:ie("tool-approval-response"),approvalId:V(),approved:Xe(),reason:V().optional()}),CS=Ne({role:ie("system"),content:V(),providerOptions:ge.optional()}),SS=Ne({role:ie("user"),content:tt([V(),Un(tt([If,TS,Nf]))]),providerOptions:ge.optional()}),IS=Ne({role:ie("assistant"),content:tt([V(),Un(tt([If,Nf,xS,_S,wf,kS]))]),providerOptions:ge.optional()}),NS=Ne({role:ie("tool"),content:Un(tt([wf,AS])),providerOptions:ge.optional()});tt([CS,SS,IS,NS]);function vf(t,e){if(t===void 0&&e===void 0)return;if(t===void 0)return e;if(e===void 0)return t;const n={...t};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const i=e[r];if(i===void 0)continue;const a=r in t?t[r]:void 0,s=i!==null&&typeof i=="object"&&!Array.isArray(i)&&!(i instanceof Date)&&!(i instanceof RegExp),u=a!=null&&typeof a=="object"&&!Array.isArray(a)&&!(a instanceof Date)&&!(a instanceof RegExp);s&&u?n[r]=vf(a,i):n[r]=i}return n}var wS={};bS(wS,{array:()=>LS,choice:()=>DS,json:()=>PS,object:()=>OS,text:()=>RS});function vS(t){const e=["ROOT"];let n=-1,r=null;function i(o,l,f){switch(o){case'"':{n=l,e.pop(),e.push(f),e.push("INSIDE_STRING");break}case"f":case"t":case"n":{n=l,r=l,e.pop(),e.push(f),e.push("INSIDE_LITERAL");break}case"-":{e.pop(),e.push(f),e.push("INSIDE_NUMBER");break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{n=l,e.pop(),e.push(f),e.push("INSIDE_NUMBER");break}case"{":{n=l,e.pop(),e.push(f),e.push("INSIDE_OBJECT_START");break}case"[":{n=l,e.pop(),e.push(f),e.push("INSIDE_ARRAY_START");break}}}function a(o,l){switch(o){case",":{e.pop(),e.push("INSIDE_OBJECT_AFTER_COMMA");break}case"}":{n=l,e.pop();break}}}function s(o,l){switch(o){case",":{e.pop(),e.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{n=l,e.pop();break}}}for(let o=0;o<t.length;o++){const l=t[o];switch(e[e.length-1]){case"ROOT":i(l,o,"FINISH");break;case"INSIDE_OBJECT_START":{switch(l){case'"':{e.pop(),e.push("INSIDE_OBJECT_KEY");break}case"}":{n=o,e.pop();break}}break}case"INSIDE_OBJECT_AFTER_COMMA":{l==='"'&&(e.pop(),e.push("INSIDE_OBJECT_KEY"));break}case"INSIDE_OBJECT_KEY":{l==='"'&&(e.pop(),e.push("INSIDE_OBJECT_AFTER_KEY"));break}case"INSIDE_OBJECT_AFTER_KEY":{l===":"&&(e.pop(),e.push("INSIDE_OBJECT_BEFORE_VALUE"));break}case"INSIDE_OBJECT_BEFORE_VALUE":{i(l,o,"INSIDE_OBJECT_AFTER_VALUE");break}case"INSIDE_OBJECT_AFTER_VALUE":{a(l,o);break}case"INSIDE_STRING":{switch(l){case'"':{e.pop(),n=o;break}case"\\":{e.push("INSIDE_STRING_ESCAPE");break}default:n=o}break}case"INSIDE_ARRAY_START":{l==="]"?(n=o,e.pop()):(n=o,i(l,o,"INSIDE_ARRAY_AFTER_VALUE"));break}case"INSIDE_ARRAY_AFTER_VALUE":{switch(l){case",":{e.pop(),e.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{n=o,e.pop();break}default:{n=o;break}}break}case"INSIDE_ARRAY_AFTER_COMMA":{i(l,o,"INSIDE_ARRAY_AFTER_VALUE");break}case"INSIDE_STRING_ESCAPE":{e.pop(),n=o;break}case"INSIDE_NUMBER":{switch(l){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{n=o;break}case"e":case"E":case"-":case".":break;case",":{e.pop(),e[e.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&s(l,o),e[e.length-1]==="INSIDE_OBJECT_AFTER_VALUE"&&a(l,o);break}case"}":{e.pop(),e[e.length-1]==="INSIDE_OBJECT_AFTER_VALUE"&&a(l,o);break}case"]":{e.pop(),e[e.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&s(l,o);break}default:{e.pop();break}}break}case"INSIDE_LITERAL":{const c=t.substring(r,o+1);!"false".startsWith(c)&&!"true".startsWith(c)&&!"null".startsWith(c)?(e.pop(),e[e.length-1]==="INSIDE_OBJECT_AFTER_VALUE"?a(l,o):e[e.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&s(l,o)):n=o;break}}}let u=t.slice(0,n+1);for(let o=e.length-1;o>=0;o--)switch(e[o]){case"INSIDE_STRING":{u+='"';break}case"INSIDE_OBJECT_KEY":case"INSIDE_OBJECT_AFTER_KEY":case"INSIDE_OBJECT_AFTER_COMMA":case"INSIDE_OBJECT_START":case"INSIDE_OBJECT_BEFORE_VALUE":case"INSIDE_OBJECT_AFTER_VALUE":{u+="}";break}case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":{u+="]";break}case"INSIDE_LITERAL":{const f=t.substring(r,t.length);"true".startsWith(f)?u+="true".slice(f.length):"false".startsWith(f)?u+="false".slice(f.length):"null".startsWith(f)&&(u+="null".slice(f.length))}}return u}async function Br(t){if(t===void 0)return{value:void 0,state:"undefined-input"};let e=await dn({text:t});return e.success?{value:e.value,state:"successful-parse"}:(e=await dn({text:vS(t)}),e.success?{value:e.value,state:"repaired-parse"}:{value:void 0,state:"failed-parse"})}var RS=()=>({responseFormat:Promise.resolve({type:"text"}),async parseCompleteOutput({text:t}){return t},async parsePartialOutput({text:t}){return{partial:t}}}),OS=({schema:t,name:e,description:n})=>{const r=$s(t);return{responseFormat:Ut(r.jsonSchema).then(i=>({type:"json",schema:i,...e!=null&&{name:e},...n!=null&&{description:n}})),async parseCompleteOutput({text:i},a){const s=await dn({text:i});if(!s.success)throw new jt({message:"No object generated: could not parse the response.",cause:s.error,text:i,response:a.response,usage:a.usage,finishReason:a.finishReason});const u=await kr({value:s.value,schema:r});if(!u.success)throw new jt({message:"No object generated: response did not match schema.",cause:u.error,text:i,response:a.response,usage:a.usage,finishReason:a.finishReason});return u.value},async parsePartialOutput({text:i}){const a=await Br(i);switch(a.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return{partial:a.value}}}}},LS=({element:t,name:e,description:n})=>{const r=$s(t);return{responseFormat:Ut(r.jsonSchema).then(i=>{const{$schema:a,...s}=i;return{type:"json",schema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{elements:{type:"array",items:s}},required:["elements"],additionalProperties:!1},...e!=null&&{name:e},...n!=null&&{description:n}}}),async parseCompleteOutput({text:i},a){const s=await dn({text:i});if(!s.success)throw new jt({message:"No object generated: could not parse the response.",cause:s.error,text:i,response:a.response,usage:a.usage,finishReason:a.finishReason});const u=s.value;if(u==null||typeof u!="object"||!("elements"in u)||!Array.isArray(u.elements))throw new jt({message:"No object generated: response did not match schema.",cause:new On({value:u,cause:"response must be an object with an elements array"}),text:i,response:a.response,usage:a.usage,finishReason:a.finishReason});for(const o of u.elements){const l=await kr({value:o,schema:r});if(!l.success)throw new jt({message:"No object generated: response did not match schema.",cause:l.error,text:i,response:a.response,usage:a.usage,finishReason:a.finishReason})}return u.elements},async parsePartialOutput({text:i}){const a=await Br(i);switch(a.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":{const s=a.value;if(s==null||typeof s!="object"||!("elements"in s)||!Array.isArray(s.elements))return;const u=a.state==="repaired-parse"&&s.elements.length>0?s.elements.slice(0,-1):s.elements,o=[];for(const l of u){const f=await kr({value:l,schema:r});f.success&&o.push(f.value)}return{partial:o}}}}}},DS=({options:t,name:e,description:n})=>({responseFormat:Promise.resolve({type:"json",schema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{result:{type:"string",enum:t}},required:["result"],additionalProperties:!1},...e!=null&&{name:e},...n!=null&&{description:n}}),async parseCompleteOutput({text:r},i){const a=await dn({text:r});if(!a.success)throw new jt({message:"No object generated: could not parse the response.",cause:a.error,text:r,response:i.response,usage:i.usage,finishReason:i.finishReason});const s=a.value;if(s==null||typeof s!="object"||!("result"in s)||typeof s.result!="string"||!t.includes(s.result))throw new jt({message:"No object generated: response did not match schema.",cause:new On({value:s,cause:"response must be an object that contains a choice value."}),text:r,response:i.response,usage:i.usage,finishReason:i.finishReason});return s.result},async parsePartialOutput({text:r}){const i=await Br(r);switch(i.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":{const a=i.value;if(a==null||typeof a!="object"||!("result"in a)||typeof a.result!="string")return;const s=t.filter(u=>u.startsWith(a.result));return i.state==="successful-parse"?s.includes(a.result)?{partial:a.result}:void 0:s.length===1?{partial:s[0]}:void 0}}}}),PS=({name:t,description:e}={})=>({responseFormat:Promise.resolve({type:"json",...t!=null&&{name:t},...e!=null&&{description:e}}),async parseCompleteOutput({text:n},r){const i=await dn({text:n});if(!i.success)throw new jt({message:"No object generated: could not parse the response.",cause:i.error,text:n,response:r.response,usage:r.usage,finishReason:r.finishReason});return i.value},async parsePartialOutput({text:n}){const r=await Br(n);switch(r.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return r.value===void 0?void 0:{partial:r.value}}}});Mr({prefix:"aitxt",size:24});(class extends TransformStream{constructor(){super({transform(t,e){e.enqueue(`data: ${JSON.stringify(t)}
121
-
122
- `)},flush(t){t.enqueue(`data: [DONE]
123
-
124
- `)}})}});var MS=lS(()=>yf(tt([Oe({type:ie("text-start"),id:V(),providerMetadata:ge.optional()}),Oe({type:ie("text-delta"),id:V(),delta:V(),providerMetadata:ge.optional()}),Oe({type:ie("text-end"),id:V(),providerMetadata:ge.optional()}),Oe({type:ie("error"),errorText:V()}),Oe({type:ie("tool-input-start"),toolCallId:V(),toolName:V(),providerExecuted:Xe().optional(),dynamic:Xe().optional(),title:V().optional()}),Oe({type:ie("tool-input-delta"),toolCallId:V(),inputTextDelta:V()}),Oe({type:ie("tool-input-available"),toolCallId:V(),toolName:V(),input:At(),providerExecuted:Xe().optional(),providerMetadata:ge.optional(),dynamic:Xe().optional(),title:V().optional()}),Oe({type:ie("tool-input-error"),toolCallId:V(),toolName:V(),input:At(),providerExecuted:Xe().optional(),providerMetadata:ge.optional(),dynamic:Xe().optional(),errorText:V(),title:V().optional()}),Oe({type:ie("tool-approval-request"),approvalId:V(),toolCallId:V()}),Oe({type:ie("tool-output-available"),toolCallId:V(),output:At(),providerExecuted:Xe().optional(),dynamic:Xe().optional(),preliminary:Xe().optional()}),Oe({type:ie("tool-output-error"),toolCallId:V(),errorText:V(),providerExecuted:Xe().optional(),dynamic:Xe().optional()}),Oe({type:ie("tool-output-denied"),toolCallId:V()}),Oe({type:ie("reasoning-start"),id:V(),providerMetadata:ge.optional()}),Oe({type:ie("reasoning-delta"),id:V(),delta:V(),providerMetadata:ge.optional()}),Oe({type:ie("reasoning-end"),id:V(),providerMetadata:ge.optional()}),Oe({type:ie("source-url"),sourceId:V(),url:V(),title:V().optional(),providerMetadata:ge.optional()}),Oe({type:ie("source-document"),sourceId:V(),mediaType:V(),title:V(),filename:V().optional(),providerMetadata:ge.optional()}),Oe({type:ie("file"),url:V(),mediaType:V(),providerMetadata:ge.optional()}),Oe({type:bf(t=>typeof t=="string"&&t.startsWith("data-"),{message:'Type must start with "data-"'}),id:V().optional(),data:At(),transient:Xe().optional()}),Oe({type:ie("start-step")}),Oe({type:ie("finish-step")}),Oe({type:ie("start"),messageId:V().optional(),messageMetadata:At().optional()}),Oe({type:ie("finish"),finishReason:pf(["stop","length","content-filter","tool-calls","error","other"]).optional(),messageMetadata:At().optional()}),Oe({type:ie("abort")}),Oe({type:ie("message-metadata"),messageMetadata:At()})])));function BS(t){return t.type.startsWith("data-")}function Qa(t){return t.type.startsWith("tool-")}function FS(t){return t.type==="dynamic-tool"}function Ka(t){return Qa(t)||FS(t)}function Vo(t){return t.type.split("-").slice(1).join("-")}function zS({lastMessage:t,messageId:e}){return{message:t?.role==="assistant"?t:{id:e,metadata:void 0,role:"assistant",parts:[]},activeTextParts:{},activeReasoningParts:{},partialToolCalls:{}}}function US({stream:t,messageMetadataSchema:e,dataPartSchemas:n,runUpdateMessageJob:r,onError:i,onToolCall:a,onData:s}){return t.pipeThrough(new TransformStream({async transform(u,o){await r(async({state:l,write:f})=>{var c,p,h,m;function b(g){const v=l.message.parts.filter(Ka).find(C=>C.toolCallId===g);if(v==null)throw new Error(`no tool invocation found for tool call ${g}`);return v}function x(g){var N;const v=l.message.parts.find(M=>Qa(M)&&M.toolCallId===g.toolCallId),C=g,R=v;v!=null?(v.state=g.state,R.input=C.input,R.output=C.output,R.errorText=C.errorText,R.rawInput=C.rawInput,R.preliminary=C.preliminary,g.title!==void 0&&(R.title=g.title),R.providerExecuted=(N=C.providerExecuted)!=null?N:v.providerExecuted,C.providerMetadata!=null&&v.state==="input-available"&&(v.callProviderMetadata=C.providerMetadata)):l.message.parts.push({type:`tool-${g.toolName}`,toolCallId:g.toolCallId,state:g.state,title:g.title,input:C.input,output:C.output,rawInput:C.rawInput,errorText:C.errorText,providerExecuted:C.providerExecuted,preliminary:C.preliminary,...C.providerMetadata!=null?{callProviderMetadata:C.providerMetadata}:{}})}function T(g){var N,v;const C=l.message.parts.find(U=>U.type==="dynamic-tool"&&U.toolCallId===g.toolCallId),R=g,M=C;C!=null?(C.state=g.state,M.toolName=g.toolName,M.input=R.input,M.output=R.output,M.errorText=R.errorText,M.rawInput=(N=R.rawInput)!=null?N:M.rawInput,M.preliminary=R.preliminary,g.title!==void 0&&(M.title=g.title),M.providerExecuted=(v=R.providerExecuted)!=null?v:C.providerExecuted,R.providerMetadata!=null&&C.state==="input-available"&&(C.callProviderMetadata=R.providerMetadata)):l.message.parts.push({type:"dynamic-tool",toolName:g.toolName,toolCallId:g.toolCallId,state:g.state,input:R.input,output:R.output,errorText:R.errorText,preliminary:R.preliminary,providerExecuted:R.providerExecuted,title:g.title,...R.providerMetadata!=null?{callProviderMetadata:R.providerMetadata}:{}})}async function k(g){if(g!=null){const N=l.message.metadata!=null?vf(l.message.metadata,g):g;e!=null&&await Yo({value:N,schema:e}),l.message.metadata=N}}switch(u.type){case"text-start":{const g={type:"text",text:"",providerMetadata:u.providerMetadata,state:"streaming"};l.activeTextParts[u.id]=g,l.message.parts.push(g),f();break}case"text-delta":{const g=l.activeTextParts[u.id];g.text+=u.delta,g.providerMetadata=(c=u.providerMetadata)!=null?c:g.providerMetadata,f();break}case"text-end":{const g=l.activeTextParts[u.id];g.state="done",g.providerMetadata=(p=u.providerMetadata)!=null?p:g.providerMetadata,delete l.activeTextParts[u.id],f();break}case"reasoning-start":{const g={type:"reasoning",text:"",providerMetadata:u.providerMetadata,state:"streaming"};l.activeReasoningParts[u.id]=g,l.message.parts.push(g),f();break}case"reasoning-delta":{const g=l.activeReasoningParts[u.id];g.text+=u.delta,g.providerMetadata=(h=u.providerMetadata)!=null?h:g.providerMetadata,f();break}case"reasoning-end":{const g=l.activeReasoningParts[u.id];g.providerMetadata=(m=u.providerMetadata)!=null?m:g.providerMetadata,g.state="done",delete l.activeReasoningParts[u.id],f();break}case"file":{l.message.parts.push({type:"file",mediaType:u.mediaType,url:u.url}),f();break}case"source-url":{l.message.parts.push({type:"source-url",sourceId:u.sourceId,url:u.url,title:u.title,providerMetadata:u.providerMetadata}),f();break}case"source-document":{l.message.parts.push({type:"source-document",sourceId:u.sourceId,mediaType:u.mediaType,title:u.title,filename:u.filename,providerMetadata:u.providerMetadata}),f();break}case"tool-input-start":{const g=l.message.parts.filter(Qa);l.partialToolCalls[u.toolCallId]={text:"",toolName:u.toolName,index:g.length,dynamic:u.dynamic,title:u.title},u.dynamic?T({toolCallId:u.toolCallId,toolName:u.toolName,state:"input-streaming",input:void 0,providerExecuted:u.providerExecuted,title:u.title}):x({toolCallId:u.toolCallId,toolName:u.toolName,state:"input-streaming",input:void 0,providerExecuted:u.providerExecuted,title:u.title}),f();break}case"tool-input-delta":{const g=l.partialToolCalls[u.toolCallId];g.text+=u.inputTextDelta;const{value:N}=await Br(g.text);g.dynamic?T({toolCallId:u.toolCallId,toolName:g.toolName,state:"input-streaming",input:N,title:g.title}):x({toolCallId:u.toolCallId,toolName:g.toolName,state:"input-streaming",input:N,title:g.title}),f();break}case"tool-input-available":{u.dynamic?T({toolCallId:u.toolCallId,toolName:u.toolName,state:"input-available",input:u.input,providerExecuted:u.providerExecuted,providerMetadata:u.providerMetadata,title:u.title}):x({toolCallId:u.toolCallId,toolName:u.toolName,state:"input-available",input:u.input,providerExecuted:u.providerExecuted,providerMetadata:u.providerMetadata,title:u.title}),f(),a&&!u.providerExecuted&&await a({toolCall:u});break}case"tool-input-error":{u.dynamic?T({toolCallId:u.toolCallId,toolName:u.toolName,state:"output-error",input:u.input,errorText:u.errorText,providerExecuted:u.providerExecuted,providerMetadata:u.providerMetadata}):x({toolCallId:u.toolCallId,toolName:u.toolName,state:"output-error",input:void 0,rawInput:u.input,errorText:u.errorText,providerExecuted:u.providerExecuted,providerMetadata:u.providerMetadata}),f();break}case"tool-approval-request":{const g=b(u.toolCallId);g.state="approval-requested",g.approval={id:u.approvalId},f();break}case"tool-output-denied":{const g=b(u.toolCallId);g.state="output-denied",f();break}case"tool-output-available":{const g=b(u.toolCallId);g.type==="dynamic-tool"?T({toolCallId:u.toolCallId,toolName:g.toolName,state:"output-available",input:g.input,output:u.output,preliminary:u.preliminary,providerExecuted:u.providerExecuted,title:g.title}):x({toolCallId:u.toolCallId,toolName:Vo(g),state:"output-available",input:g.input,output:u.output,providerExecuted:u.providerExecuted,preliminary:u.preliminary,title:g.title}),f();break}case"tool-output-error":{const g=b(u.toolCallId);g.type==="dynamic-tool"?T({toolCallId:u.toolCallId,toolName:g.toolName,state:"output-error",input:g.input,errorText:u.errorText,providerExecuted:u.providerExecuted,title:g.title}):x({toolCallId:u.toolCallId,toolName:Vo(g),state:"output-error",input:g.input,rawInput:g.rawInput,errorText:u.errorText,providerExecuted:u.providerExecuted,title:g.title}),f();break}case"start-step":{l.message.parts.push({type:"step-start"});break}case"finish-step":{l.activeTextParts={},l.activeReasoningParts={};break}case"start":{u.messageId!=null&&(l.message.id=u.messageId),await k(u.messageMetadata),(u.messageId!=null||u.messageMetadata!=null)&&f();break}case"finish":{u.finishReason!=null&&(l.finishReason=u.finishReason),await k(u.messageMetadata),u.messageMetadata!=null&&f();break}case"message-metadata":{await k(u.messageMetadata),u.messageMetadata!=null&&f();break}case"error":{i?.(new Error(u.errorText));break}default:if(BS(u)){n?.[u.type]!=null&&await Yo({value:u.data,schema:n[u.type]});const g=u;if(g.transient){s?.(g);break}const N=g.id!=null?l.message.parts.find(v=>g.type===v.type&&g.id===v.id):void 0;N!=null?N.data=g.data:l.message.parts.push(g),s?.(g),f()}}o.enqueue(u)})}}))}async function HS({stream:t,onError:e}){const n=t.getReader();try{for(;;){const{done:r}=await n.read();if(r)break}}catch(r){e?.(r)}finally{n.releaseLock()}}Mr({prefix:"aitxt",size:24});Mr({prefix:"aiobj",size:24});var $S=class{constructor(){this.queue=[],this.isProcessing=!1}async processQueue(){if(!this.isProcessing){for(this.isProcessing=!0;this.queue.length>0;)await this.queue[0](),this.queue.shift();this.isProcessing=!1}}async run(t){return new Promise((e,n)=>{this.queue.push(async()=>{try{await t(),e()}catch(r){n(r)}}),this.processQueue()})}};Mr({prefix:"aiobj",size:24});async function jS(t){if(t==null)return[];if(!globalThis.FileList||!(t instanceof globalThis.FileList))throw new Error("FileList is not supported in the current environment");return Promise.all(Array.from(t).map(async e=>{const{name:n,type:r}=e,i=await new Promise((a,s)=>{const u=new FileReader;u.onload=o=>{var l;a((l=o.target)==null?void 0:l.result)},u.onerror=o=>s(o),u.readAsDataURL(e)});return{type:"file",mediaType:r,filename:n,url:i}}))}var ZS=class{constructor({api:t="/api/chat",credentials:e,headers:n,body:r,fetch:i,prepareSendMessagesRequest:a,prepareReconnectToStreamRequest:s}){this.api=t,this.credentials=e,this.headers=n,this.body=r,this.fetch=i,this.prepareSendMessagesRequest=a,this.prepareReconnectToStreamRequest=s}async sendMessages({abortSignal:t,...e}){var n,r,i,a,s;const u=await Ut(this.body),o=await Ut(this.headers),l=await Ut(this.credentials),f={...Jt(o),...Jt(e.headers)},c=await((n=this.prepareSendMessagesRequest)==null?void 0:n.call(this,{api:this.api,id:e.chatId,messages:e.messages,body:{...u,...e.body},headers:f,credentials:l,requestMetadata:e.metadata,trigger:e.trigger,messageId:e.messageId})),p=(r=c?.api)!=null?r:this.api,h=c?.headers!==void 0?Jt(c.headers):f,m=c?.body!==void 0?c.body:{...u,...e.body,id:e.chatId,messages:e.messages,trigger:e.trigger,messageId:e.messageId},b=(i=c?.credentials)!=null?i:l,T=await((a=this.fetch)!=null?a:globalThis.fetch)(p,{method:"POST",headers:Ho({"Content-Type":"application/json",...h},`ai-sdk/${qo}`,Uo()),body:JSON.stringify(m),credentials:b,signal:t});if(!T.ok)throw new Error((s=await T.text())!=null?s:"Failed to fetch the chat response.");if(!T.body)throw new Error("The response body is empty.");return this.processResponseStream(T.body)}async reconnectToStream(t){var e,n,r,i,a;const s=await Ut(this.body),u=await Ut(this.headers),o=await Ut(this.credentials),l={...Jt(u),...Jt(t.headers)},f=await((e=this.prepareReconnectToStreamRequest)==null?void 0:e.call(this,{api:this.api,id:t.chatId,body:{...s,...t.body},headers:l,credentials:o,requestMetadata:t.metadata})),c=(n=f?.api)!=null?n:`${this.api}/${t.chatId}/stream`,p=f?.headers!==void 0?Jt(f.headers):l,h=(r=f?.credentials)!=null?r:o,b=await((i=this.fetch)!=null?i:globalThis.fetch)(c,{method:"GET",headers:Ho(p,`ai-sdk/${qo}`,Uo()),credentials:h});if(b.status===204)return null;if(!b.ok)throw new Error((a=await b.text())!=null?a:"Failed to fetch the chat response.");if(!b.body)throw new Error("The response body is empty.");return this.processResponseStream(b.body)}},Rf=class extends ZS{constructor(t={}){super(t)}processResponseStream(t){return mS({stream:t,schema:MS}).pipeThrough(new TransformStream({async transform(e,n){if(!e.success)throw e.error;n.enqueue(e.value)}}))}},YS=class{constructor({generateId:t=EC,id:e=t(),transport:n=new Rf,messageMetadataSchema:r,dataPartSchemas:i,state:a,onError:s,onToolCall:u,onFinish:o,onData:l,sendAutomaticallyWhen:f}){this.activeResponse=void 0,this.jobExecutor=new $S,this.sendMessage=async(c,p)=>{var h,m,b,x;if(c==null){await this.makeRequest({trigger:"submit-message",messageId:(h=this.lastMessage)==null?void 0:h.id,...p});return}let T;if("text"in c||"files"in c?T={parts:[...Array.isArray(c.files)?c.files:await jS(c.files),..."text"in c&&c.text!=null?[{type:"text",text:c.text}]:[]]}:T=c,c.messageId!=null){const k=this.state.messages.findIndex(g=>g.id===c.messageId);if(k===-1)throw new Error(`message with id ${c.messageId} not found`);if(this.state.messages[k].role!=="user")throw new Error(`message with id ${c.messageId} is not a user message`);this.state.messages=this.state.messages.slice(0,k+1),this.state.replaceMessage(k,{...T,id:c.messageId,role:(m=T.role)!=null?m:"user",metadata:c.metadata})}else this.state.pushMessage({...T,id:(b=T.id)!=null?b:this.generateId(),role:(x=T.role)!=null?x:"user",metadata:c.metadata});await this.makeRequest({trigger:"submit-message",messageId:c.messageId,...p})},this.regenerate=async({messageId:c,...p}={})=>{const h=c==null?this.state.messages.length-1:this.state.messages.findIndex(m=>m.id===c);if(h===-1)throw new Error(`message ${c} not found`);this.state.messages=this.state.messages.slice(0,this.messages[h].role==="assistant"?h:h+1),await this.makeRequest({trigger:"regenerate-message",messageId:c,...p})},this.resumeStream=async(c={})=>{await this.makeRequest({trigger:"resume-stream",...c})},this.clearError=()=>{this.status==="error"&&(this.state.error=void 0,this.setStatus({status:"ready"}))},this.addToolApprovalResponse=async({id:c,approved:p,reason:h})=>this.jobExecutor.run(async()=>{var m,b;const x=this.state.messages,T=x[x.length-1],k=g=>Ka(g)&&g.state==="approval-requested"&&g.approval.id===c?{...g,state:"approval-responded",approval:{id:c,approved:p,reason:h}}:g;this.state.replaceMessage(x.length-1,{...T,parts:T.parts.map(k)}),this.activeResponse&&(this.activeResponse.state.message.parts=this.activeResponse.state.message.parts.map(k)),this.status!=="streaming"&&this.status!=="submitted"&&((m=this.sendAutomaticallyWhen)!=null&&m.call(this,{messages:this.state.messages}))&&this.makeRequest({trigger:"submit-message",messageId:(b=this.lastMessage)==null?void 0:b.id})}),this.addToolOutput=async({state:c="output-available",tool:p,toolCallId:h,output:m,errorText:b})=>this.jobExecutor.run(async()=>{var x,T;const k=this.state.messages,g=k[k.length-1],N=v=>Ka(v)&&v.toolCallId===h?{...v,state:c,output:m,errorText:b}:v;this.state.replaceMessage(k.length-1,{...g,parts:g.parts.map(N)}),this.activeResponse&&(this.activeResponse.state.message.parts=this.activeResponse.state.message.parts.map(N)),this.status!=="streaming"&&this.status!=="submitted"&&((x=this.sendAutomaticallyWhen)!=null&&x.call(this,{messages:this.state.messages}))&&this.makeRequest({trigger:"submit-message",messageId:(T=this.lastMessage)==null?void 0:T.id})}),this.addToolResult=this.addToolOutput,this.stop=async()=>{var c;this.status!=="streaming"&&this.status!=="submitted"||(c=this.activeResponse)!=null&&c.abortController&&this.activeResponse.abortController.abort()},this.id=e,this.transport=n,this.generateId=t,this.messageMetadataSchema=r,this.dataPartSchemas=i,this.state=a,this.onError=s,this.onToolCall=u,this.onFinish=o,this.onData=l,this.sendAutomaticallyWhen=f}get status(){return this.state.status}setStatus({status:t,error:e}){this.status!==t&&(this.state.status=t,this.state.error=e)}get error(){return this.state.error}get messages(){return this.state.messages}get lastMessage(){return this.state.messages[this.state.messages.length-1]}set messages(t){this.state.messages=t}async makeRequest({trigger:t,metadata:e,headers:n,body:r,messageId:i}){var a,s,u,o;this.setStatus({status:"submitted",error:void 0});const l=this.lastMessage;let f=!1,c=!1,p=!1;try{const h={state:zS({lastMessage:this.state.snapshot(l),messageId:this.generateId()}),abortController:new AbortController};h.abortController.signal.addEventListener("abort",()=>{f=!0}),this.activeResponse=h;let m;if(t==="resume-stream"){const x=await this.transport.reconnectToStream({chatId:this.id,metadata:e,headers:n,body:r});if(x==null){this.setStatus({status:"ready"});return}m=x}else m=await this.transport.sendMessages({chatId:this.id,messages:this.state.messages,abortSignal:h.abortController.signal,metadata:e,headers:n,body:r,trigger:t,messageId:i});const b=x=>this.jobExecutor.run(()=>x({state:h.state,write:()=>{var T;this.setStatus({status:"streaming"}),h.state.message.id===((T=this.lastMessage)==null?void 0:T.id)?this.state.replaceMessage(this.state.messages.length-1,h.state.message):this.state.pushMessage(h.state.message)}}));await HS({stream:US({stream:m,onToolCall:this.onToolCall,onData:this.onData,messageMetadataSchema:this.messageMetadataSchema,dataPartSchemas:this.dataPartSchemas,runUpdateMessageJob:b,onError:x=>{throw x}}),onError:x=>{throw x}}),this.setStatus({status:"ready"})}catch(h){if(f||h.name==="AbortError")return f=!0,this.setStatus({status:"ready"}),null;p=!0,h instanceof TypeError&&(h.message.toLowerCase().includes("fetch")||h.message.toLowerCase().includes("network"))&&(c=!0),this.onError&&h instanceof Error&&this.onError(h),this.setStatus({status:"error",error:h})}finally{try{(s=this.onFinish)==null||s.call(this,{message:this.activeResponse.state.message,messages:this.state.messages,isAbort:f,isDisconnect:c,isError:p,finishReason:(a=this.activeResponse)==null?void 0:a.state.finishReason})}catch(h){console.error(h)}this.activeResponse=void 0}(u=this.sendAutomaticallyWhen)!=null&&u.call(this,{messages:this.state.messages})&&!p&&await this.makeRequest({trigger:"submit-message",messageId:(o=this.lastMessage)==null?void 0:o.id,metadata:e,headers:n,body:r})}},ba,Wo;function qS(){if(Wo)return ba;Wo=1;function t(e,n){if(typeof e!="function")throw new TypeError(`Expected the first argument to be a \`function\`, got \`${typeof e}\`.`);let r,i=0;return function(...s){clearTimeout(r);const u=Date.now(),o=u-i,l=n-o;l<=0?(i=u,e.apply(this,s)):r=setTimeout(()=>{i=Date.now(),e.apply(this,s)},l)}}return ba=t,ba}var VS=qS();const WS=is(VS);var Of=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Le=(t,e,n)=>(Of(t,e,"read from private field"),n?n.call(t):e.get(t)),yt=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},zt=(t,e,n,r)=>(Of(t,e,"write to private field"),e.set(t,n),n);function GS(t,e){return e!=null?WS(t,e):t}var ft,ni,ri,tr,nr,rr,yn,Xa,Ja,QS=class{constructor(t=[]){yt(this,ft,void 0),yt(this,ni,"ready"),yt(this,ri,void 0),yt(this,tr,new Set),yt(this,nr,new Set),yt(this,rr,new Set),this.pushMessage=e=>{zt(this,ft,Le(this,ft).concat(e)),Le(this,yn).call(this)},this.popMessage=()=>{zt(this,ft,Le(this,ft).slice(0,-1)),Le(this,yn).call(this)},this.replaceMessage=(e,n)=>{zt(this,ft,[...Le(this,ft).slice(0,e),this.snapshot(n),...Le(this,ft).slice(e+1)]),Le(this,yn).call(this)},this.snapshot=e=>structuredClone(e),this["~registerMessagesCallback"]=(e,n)=>{const r=n?GS(e,n):e;return Le(this,tr).add(r),()=>{Le(this,tr).delete(r)}},this["~registerStatusCallback"]=e=>(Le(this,nr).add(e),()=>{Le(this,nr).delete(e)}),this["~registerErrorCallback"]=e=>(Le(this,rr).add(e),()=>{Le(this,rr).delete(e)}),yt(this,yn,()=>{Le(this,tr).forEach(e=>e())}),yt(this,Xa,()=>{Le(this,nr).forEach(e=>e())}),yt(this,Ja,()=>{Le(this,rr).forEach(e=>e())}),zt(this,ft,t)}get status(){return Le(this,ni)}set status(t){zt(this,ni,t),Le(this,Xa).call(this)}get error(){return Le(this,ri)}set error(t){zt(this,ri,t),Le(this,Ja).call(this)}get messages(){return Le(this,ft)}set messages(t){zt(this,ft,[...t]),Le(this,yn).call(this)}};ft=new WeakMap;ni=new WeakMap;ri=new WeakMap;tr=new WeakMap;nr=new WeakMap;rr=new WeakMap;yn=new WeakMap;Xa=new WeakMap;Ja=new WeakMap;var kn,Go=class extends YS{constructor({messages:t,...e}){const n=new QS(t);super({...e,state:n}),yt(this,kn,void 0),this["~registerMessagesCallback"]=(r,i)=>Le(this,kn)["~registerMessagesCallback"](r,i),this["~registerStatusCallback"]=r=>Le(this,kn)["~registerStatusCallback"](r),this["~registerErrorCallback"]=r=>Le(this,kn)["~registerErrorCallback"](r),zt(this,kn,n)}};kn=new WeakMap;function KS({experimental_throttle:t,resume:e=!1,...n}={}){const r=D.useRef("chat"in n?n.chat:new Go(n));("chat"in n&&n.chat!==r.current||"id"in n&&r.current.id!==n.id)&&(r.current="chat"in n?n.chat:new Go(n));const a=D.useCallback(f=>r.current["~registerMessagesCallback"](f,t),[t,r.current.id]),s=D.useSyncExternalStore(a,()=>r.current.messages,()=>r.current.messages),u=D.useSyncExternalStore(r.current["~registerStatusCallback"],()=>r.current.status,()=>r.current.status),o=D.useSyncExternalStore(r.current["~registerErrorCallback"],()=>r.current.error,()=>r.current.error),l=D.useCallback(f=>{typeof f=="function"&&(f=f(r.current.messages)),r.current.messages=f},[r]);return D.useEffect(()=>{e&&r.current.resumeStream()},[e,r]),{id:r.current.id,messages:s,setMessages:l,sendMessage:r.current.sendMessage,regenerate:r.current.regenerate,clearError:r.current.clearError,stop:r.current.stop,error:o,resumeStream:r.current.resumeStream,status:u,addToolResult:r.current.addToolOutput,addToolOutput:r.current.addToolOutput,addToolApprovalResponse:r.current.addToolApprovalResponse}}const XS="You are a helpful assistant.",JS=t=>new Rf({api:`/api/${t}/models/stream`,credentials:"include",prepareSendMessagesRequest:({messages:e,requestMetadata:n})=>({body:{messages:e,stream:!0,...n}})});function e6(t){const e=X.c(30),{threadId:n,systemPrompt:r,onCreateThread:i,onError:a}=t,{org:s,locator:u}=Dn(),{slug:o}=s,l=rA(),f=iA(),c=nA(n),p=r||XS;let h;e[0]!==p?(h={id:"system",role:"system",parts:[{type:"text",text:p}]},e[0]=p,e[1]=h):h=e[1];const b=h;let x;e[2]!==c||e[3]!==b?(x=[b,...c],e[2]=c,e[3]=b,e[4]=x):x=e[4];const T=x,k=`${n}:${p}`;let g;e[5]!==o?(g=JS(o),e[5]=o,e[6]=g):g=e[6];const N=g;let v;e[7]!==u||e[8]!==f||e[9]!==i||e[10]!==l||e[11]!==n?(v=async Q=>{const{finishReason:ae,messages:Ee,isAbort:Se,isDisconnect:I,isError:xe}=Q;if(ae!=="stop"||Se||I||xe)return;const Te=Ee.slice(-2).filter(Boolean);if(Te.length!==2)return;f.insertMany.mutate(Te);const y=Te.find(tI)?.parts?.find(eI)?.text.slice(0,100)||"",W=await Jk(u,n);if(!W){if(i)i({id:n,title:y});else{const K=new Date().toISOString(),G={id:n,title:y,created_at:K,updated_at:K,hidden:!1};l.insert.mutate(G)}return}l.update.mutate({id:n,updates:{title:W.title||y,updated_at:new Date().toISOString()}})},e[7]=u,e[8]=f,e[9]=i,e[10]=l,e[11]=n,e[12]=v):v=e[12];const C=v;let R;e[13]!==a?(R=Q=>{console.error("[chat] Chat error:",Q),a?.(Q)},e[13]=a,e[14]=R):R=e[14];let M;e[15]!==T||e[16]!==k||e[17]!==C||e[18]!==R||e[19]!==N?(M={id:k,messages:T,transport:N,onFinish:C,onError:R},e[15]=T,e[16]=k,e[17]=C,e[18]=R,e[19]=N,e[20]=M):M=e[20];const U=KS(M);let w;e[21]!==U?(w=async(Q,ae)=>{!Q?.trim()||U.status==="submitted"||U.status==="streaming"||await U.sendMessage({id:crypto.randomUUID(),role:"user",parts:[{type:"text",text:Q}],metadata:ae},{metadata:ae})},e[21]=U,e[22]=w):w=e[22];const P=w,H=U.messages,te=U.status;let Z;e[23]!==U?(Z=U.stop.bind(U),e[23]=U,e[24]=Z):Z=e[24];let z;return e[25]!==U.messages||e[26]!==U.status||e[27]!==P||e[28]!==Z?(z={messages:H,status:te,sendMessage:P,stop:Z},e[25]=U.messages,e[26]=U.status,e[27]=P,e[28]=Z,e[29]=z):z=e[29],z}function eI(t){return t.type==="text"}function tI(t){return t.parts?.find(nI)}function nI(t){return t.type==="text"}async function rI(t){const e=`/mcp/gateway/${t}`,n={"Content-Type":"application/json",Accept:"application/json, text/event-stream"};try{const r=await fetch(e,{method:"POST",headers:n,body:JSON.stringify({jsonrpc:"2.0",id:1,method:"initialize",params:{protocolVersion:"2025-06-18",capabilities:{},clientInfo:{name:"mesh-chat",version:"1.0.0"}}})});if(!r.ok)return[];if((await r.json()).error)return[];const a=await fetch(e,{method:"POST",headers:n,body:JSON.stringify({jsonrpc:"2.0",id:2,method:"prompts/list",params:{}})});if(!a.ok)return[];const s=await a.json();return s.error?[]:s.result?.prompts||[]}catch{return[]}}function t6(t){const e=X.c(7);let n;e[0]!==t?(n=it.gatewayPrompts(t),e[0]=t,e[1]=n):n=e[1];let r;e[2]!==t?(r=()=>rI(t),e[2]=t,e[3]=r):r=e[3];let i;return e[4]!==n||e[5]!==r?(i={queryKey:n,queryFn:r,staleTime:6e4,retry:!1},e[4]=n,e[5]=r,e[6]=i):i=e[6],as(i)}function n6(t){const e=X.c(19),{prompts:n,onSelect:r,className:i}=t;if(n.length===0)return null;let a,s,u,o;if(e[0]!==i||e[1]!==r||e[2]!==n){const c=n.slice(0,4);e[7]!==i?(u=ue("flex flex-col gap-3 flex-1",i),e[7]=i,e[8]=u):u=e[8],e[9]===Symbol.for("react.memo_cache_sentinel")?(o=E.jsx("p",{className:"text-xs text-muted-foreground text-center",children:"Try asking"}),e[9]=o):o=e[9],a="grid grid-cols-1 sm:grid-cols-2 gap-2";let p;e[10]!==r?(p=h=>E.jsxs("button",{type:"button",onClick:()=>r(h),className:ue("flex items-start gap-3 p-3 rounded-xl","bg-muted/50 hover:bg-muted transition-colors","text-left cursor-pointer group","border border-transparent hover:border-border"),children:[E.jsx("div",{className:"shrink-0 mt-0.5",children:E.jsx(Dl,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"})}),E.jsxs("div",{className:"flex flex-col gap-0.5 min-w-0 flex-1",children:[E.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:(h.title??h.name).replace(/_/g," ")}),h.description&&E.jsx("span",{className:"text-xs text-muted-foreground line-clamp-2",children:h.description})]})]},h.name),e[10]=r,e[11]=p):p=e[11],s=c.map(p),e[0]=i,e[1]=r,e[2]=n,e[3]=a,e[4]=s,e[5]=u,e[6]=o}else a=e[3],s=e[4],u=e[5],o=e[6];let l;e[12]!==a||e[13]!==s?(l=E.jsx("div",{className:a,children:s}),e[12]=a,e[13]=s,e[14]=l):l=e[14];let f;return e[15]!==u||e[16]!==o||e[17]!==l?(f=E.jsxs("div",{className:u,children:[o,l]}),e[15]=u,e[16]=o,e[17]=l,e[18]=f):f=e[18],f}function r6(){const t=X.c(7);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=E.jsx("div",{className:"size-6 rounded-lg bg-muted animate-pulse"}),t[0]=e):e=t[0];let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=E.jsxs("div",{className:"flex items-center gap-3",children:[e,E.jsxs("div",{className:"flex flex-col gap-2",children:[E.jsx("div",{className:"h-3.5 w-28 rounded bg-muted animate-pulse"}),E.jsx("div",{className:"h-3 w-40 rounded bg-muted/60 animate-pulse"})]})]}),t[1]=n):n=t[1];let r;t[2]===Symbol.for("react.memo_cache_sentinel")?(r=E.jsx("div",{className:"flex items-center h-12 flex-none border-b border-border/80 px-4",children:E.jsxs("div",{className:"flex items-center justify-between gap-3 w-full",children:[n,E.jsxs("div",{className:"flex items-end gap-2",children:[E.jsx("div",{className:"h-6 w-6 rounded-full bg-muted animate-pulse"}),E.jsx("div",{className:"h-6 w-6 rounded-lg bg-muted animate-pulse"})]})]})}),t[2]=r):r=t[2];let i;t[3]===Symbol.for("react.memo_cache_sentinel")?(i=E.jsx("div",{className:"flex-1 overflow-hidden px-4 py-4",children:E.jsxs("div",{className:"mx-auto flex w-full max-w-2xl flex-col gap-4",children:[E.jsx(Wr,{align:"right",width:"w-3/4"}),E.jsx(Wr,{align:"left",width:"w-full",lines:3}),E.jsx(Wr,{align:"right",width:"w-2/3"}),E.jsx(Wr,{align:"left",width:"w-5/6",lines:2})]})}),t[3]=i):i=t[3];let a;t[4]===Symbol.for("react.memo_cache_sentinel")?(a=E.jsx("div",{className:"relative flex flex-1 flex-col gap-2 p-2.5",children:E.jsx("div",{className:"relative flex-1",children:E.jsxs("div",{className:"space-y-2 p-2",children:[E.jsx("div",{className:"h-3 w-full rounded bg-muted/40 animate-pulse"}),E.jsx("div",{className:"h-3 w-4/5 rounded bg-muted/40 animate-pulse"})]})})}),t[4]=a):a=t[4];let s;t[5]===Symbol.for("react.memo_cache_sentinel")?(s=E.jsx("div",{className:"flex items-center gap-1",children:E.jsx("div",{className:"size-8 rounded-full bg-muted/60 animate-pulse"})}),t[5]=s):s=t[5];let u;return t[6]===Symbol.for("react.memo_cache_sentinel")?(u=E.jsxs("div",{className:"flex h-full w-full flex-col bg-sidebar",children:[r,i,E.jsx("div",{className:"px-4 py-4",children:E.jsx("div",{className:"mx-auto w-full max-w-2xl",children:E.jsxs("div",{className:"relative flex min-h-[130px] flex-col rounded-xl border border-border bg-background shadow-sm",children:[a,E.jsxs("div",{className:"flex items-center justify-between px-2.5 pb-2.5",children:[s,E.jsxs("div",{className:"flex items-center gap-1",children:[E.jsx("div",{className:"h-8 w-32 rounded-lg bg-muted/60 animate-pulse"}),E.jsx("div",{className:"size-8 rounded-full bg-muted animate-pulse"})]})]})]})})})]}),t[6]=u):u=t[6],u}function Wr(t){const e=X.c(22),{align:n,width:r,lines:i}=t,a=r===void 0?"w-full":r,s=i===void 0?1:i,u=n==="right"?"flex-row-reverse":"flex-row";let o;e[0]!==u?(o=ue("flex w-full gap-4 px-4 py-2",u),e[0]=u,e[1]=o):o=e[1];const l=n==="right"?"ml-auto max-w-3/4 items-end":"w-full items-start";let f;e[2]!==l?(f=ue("flex min-w-0 flex-col gap-2",l),e[2]=l,e[3]=f):f=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=E.jsx("div",{className:"h-3 w-16 rounded bg-muted/40 animate-pulse"}),e[4]=c):c=e[4];const p=n==="right"?"bg-muted":"bg-transparent border border-border/40";let h;e[5]!==p||e[6]!==a?(h=ue("min-w-0 rounded-2xl p-4",p,a),e[5]=p,e[6]=a,e[7]=h):h=e[7];let m;e[8]!==s?(m=Array.from({length:s}),e[8]=s,e[9]=m):m=e[9];let b;e[10]!==s||e[11]!==m?(b=E.jsx("div",{className:"space-y-2",children:m.map((g,N)=>E.jsx("div",{className:ue("h-3 rounded bg-muted-foreground/20 animate-pulse",N===s-1?"w-3/4":"w-full"),style:{animationDelay:`${N*.1}s`}},N))}),e[10]=s,e[11]=m,e[12]=b):b=e[12];let x;e[13]!==b||e[14]!==h?(x=E.jsx("div",{className:h,children:b}),e[13]=b,e[14]=h,e[15]=x):x=e[15];let T;e[16]!==x||e[17]!==f?(T=E.jsxs("div",{className:f,children:[c,x]}),e[16]=x,e[17]=f,e[18]=T):T=e[18];let k;return e[19]!==T||e[20]!==o?(k=E.jsx("div",{className:o,children:T}),e[19]=T,e[20]=o,e[21]=k):k=e[21],k}const $i=D.createContext(null);$i.displayName="PanelGroupContext";const Ue={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},js=10,sn=D.useLayoutEffect,Qo=Sh.useId,iI=typeof Qo=="function"?Qo:()=>null;let aI=0;function Zs(t=null){const e=iI(),n=D.useRef(t||e||null);return n.current===null&&(n.current=""+aI++),t??n.current}function Lf({children:t,className:e="",collapsedSize:n,collapsible:r,defaultSize:i,forwardedRef:a,id:s,maxSize:u,minSize:o,onCollapse:l,onExpand:f,onResize:c,order:p,style:h,tagName:m="div",...b}){const x=D.useContext($i);if(x===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:T,expandPanel:k,getPanelSize:g,getPanelStyle:N,groupId:v,isPanelCollapsed:C,reevaluatePanelConstraints:R,registerPanel:M,resizePanel:U,unregisterPanel:w}=x,P=Zs(s),H=D.useRef({callbacks:{onCollapse:l,onExpand:f,onResize:c},constraints:{collapsedSize:n,collapsible:r,defaultSize:i,maxSize:u,minSize:o},id:P,idIsFromProps:s!==void 0,order:p});D.useRef({didLogMissingDefaultSizeWarning:!1}),sn(()=>{const{callbacks:Z,constraints:z}=H.current,Q={...z};H.current.id=P,H.current.idIsFromProps=s!==void 0,H.current.order=p,Z.onCollapse=l,Z.onExpand=f,Z.onResize=c,z.collapsedSize=n,z.collapsible=r,z.defaultSize=i,z.maxSize=u,z.minSize=o,(Q.collapsedSize!==z.collapsedSize||Q.collapsible!==z.collapsible||Q.maxSize!==z.maxSize||Q.minSize!==z.minSize)&&R(H.current,Q)}),sn(()=>{const Z=H.current;return M(Z),()=>{w(Z)}},[p,P,M,w]),D.useImperativeHandle(a,()=>({collapse:()=>{T(H.current)},expand:Z=>{k(H.current,Z)},getId(){return P},getSize(){return g(H.current)},isCollapsed(){return C(H.current)},isExpanded(){return!C(H.current)},resize:Z=>{U(H.current,Z)}}),[T,k,g,C,P,U]);const te=N(H.current,i);return D.createElement(m,{...b,children:t,className:e,id:P,style:{...te,...h},[Ue.groupId]:v,[Ue.panel]:"",[Ue.panelCollapsible]:r||void 0,[Ue.panelId]:P,[Ue.panelSize]:parseFloat(""+te.flexGrow).toFixed(1)})}const Df=D.forwardRef((t,e)=>D.createElement(Lf,{...t,forwardedRef:e}));Lf.displayName="Panel";Df.displayName="forwardRef(Panel)";let es=null,ii=-1,Ht=null;function sI(t,e){if(e){const n=(e&zf)!==0,r=(e&Uf)!==0,i=(e&Hf)!==0,a=(e&$f)!==0;if(n)return i?"se-resize":a?"ne-resize":"e-resize";if(r)return i?"sw-resize":a?"nw-resize":"w-resize";if(i)return"s-resize";if(a)return"n-resize"}switch(t){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function uI(){Ht!==null&&(document.head.removeChild(Ht),es=null,Ht=null,ii=-1)}function Ea(t,e){var n,r;const i=sI(t,e);if(es!==i){if(es=i,Ht===null&&(Ht=document.createElement("style"),document.head.appendChild(Ht)),ii>=0){var a;(a=Ht.sheet)===null||a===void 0||a.removeRule(ii)}ii=(n=(r=Ht.sheet)===null||r===void 0?void 0:r.insertRule(`*{cursor: ${i} !important;}`))!==null&&n!==void 0?n:-1}}function Pf(t){return t.type==="keydown"}function Mf(t){return t.type.startsWith("pointer")}function Bf(t){return t.type.startsWith("mouse")}function ji(t){if(Mf(t)){if(t.isPrimary)return{x:t.clientX,y:t.clientY}}else if(Bf(t))return{x:t.clientX,y:t.clientY};return{x:1/0,y:1/0}}function oI(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function lI(t,e,n){return t.x<e.x+e.width&&t.x+t.width>e.x&&t.y<e.y+e.height&&t.y+t.height>e.y}function cI(t,e){if(t===e)throw new Error("Cannot compare node with itself");const n={a:Jo(t),b:Jo(e)};let r;for(;n.a.at(-1)===n.b.at(-1);)t=n.a.pop(),e=n.b.pop(),r=t;de(r,"Stacking order can only be calculated for elements with a common ancestor");const i={a:Xo(Ko(n.a)),b:Xo(Ko(n.b))};if(i.a===i.b){const a=r.childNodes,s={a:n.a.at(-1),b:n.b.at(-1)};let u=a.length;for(;u--;){const o=a[u];if(o===s.a)return 1;if(o===s.b)return-1}}return Math.sign(i.a-i.b)}const dI=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function fI(t){var e;const n=getComputedStyle((e=Ff(t))!==null&&e!==void 0?e:t).display;return n==="flex"||n==="inline-flex"}function hI(t){const e=getComputedStyle(t);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||fI(t))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||dI.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function Ko(t){let e=t.length;for(;e--;){const n=t[e];if(de(n,"Missing node"),hI(n))return n}return null}function Xo(t){return t&&Number(getComputedStyle(t).zIndex)||0}function Jo(t){const e=[];for(;t;)e.push(t),t=Ff(t);return e}function Ff(t){const{parentNode:e}=t;return e&&e instanceof ShadowRoot?e.host:e}const zf=1,Uf=2,Hf=4,$f=8,pI=oI()==="coarse";let Tt=[],Nn=!1,en=new Map,Zi=new Map;const Cr=new Set;function mI(t,e,n,r,i){var a;const{ownerDocument:s}=e,u={direction:n,element:e,hitAreaMargins:r,setResizeHandlerState:i},o=(a=en.get(s))!==null&&a!==void 0?a:0;return en.set(s,o+1),Cr.add(u),Ti(),function(){var f;Zi.delete(t),Cr.delete(u);const c=(f=en.get(s))!==null&&f!==void 0?f:1;if(en.set(s,c-1),Ti(),c===1&&en.delete(s),Tt.includes(u)){const p=Tt.indexOf(u);p>=0&&Tt.splice(p,1),qs(),i("up",!0,null)}}}function gI(t){const{target:e}=t,{x:n,y:r}=ji(t);Nn=!0,Ys({target:e,x:n,y:r}),Ti(),Tt.length>0&&(xi("down",t),t.preventDefault(),jf(e)||t.stopImmediatePropagation())}function Ta(t){const{x:e,y:n}=ji(t);if(Nn&&t.buttons===0&&(Nn=!1,xi("up",t)),!Nn){const{target:r}=t;Ys({target:r,x:e,y:n})}xi("move",t),qs(),Tt.length>0&&t.preventDefault()}function xa(t){const{target:e}=t,{x:n,y:r}=ji(t);Zi.clear(),Nn=!1,Tt.length>0&&(t.preventDefault(),jf(e)||t.stopImmediatePropagation()),xi("up",t),Ys({target:e,x:n,y:r}),qs(),Ti()}function jf(t){let e=t;for(;e;){if(e.hasAttribute(Ue.resizeHandle))return!0;e=e.parentElement}return!1}function Ys({target:t,x:e,y:n}){Tt.splice(0);let r=null;(t instanceof HTMLElement||t instanceof SVGElement)&&(r=t),Cr.forEach(i=>{const{element:a,hitAreaMargins:s}=i,u=a.getBoundingClientRect(),{bottom:o,left:l,right:f,top:c}=u,p=pI?s.coarse:s.fine;if(e>=l-p&&e<=f+p&&n>=c-p&&n<=o+p){if(r!==null&&document.contains(r)&&a!==r&&!a.contains(r)&&!r.contains(a)&&cI(r,a)>0){let m=r,b=!1;for(;m&&!m.contains(a);){if(lI(m.getBoundingClientRect(),u)){b=!0;break}m=m.parentElement}if(b)return}Tt.push(i)}})}function _a(t,e){Zi.set(t,e)}function qs(){let t=!1,e=!1;Tt.forEach(r=>{const{direction:i}=r;i==="horizontal"?t=!0:e=!0});let n=0;Zi.forEach(r=>{n|=r}),t&&e?Ea("intersection",n):t?Ea("horizontal",n):e?Ea("vertical",n):uI()}let ya=new AbortController;function Ti(){ya.abort(),ya=new AbortController;const t={capture:!0,signal:ya.signal};Cr.size&&(Nn?(Tt.length>0&&en.forEach((e,n)=>{const{body:r}=n;e>0&&(r.addEventListener("contextmenu",xa,t),r.addEventListener("pointerleave",Ta,t),r.addEventListener("pointermove",Ta,t))}),window.addEventListener("pointerup",xa,t),window.addEventListener("pointercancel",xa,t)):en.forEach((e,n)=>{const{body:r}=n;e>0&&(r.addEventListener("pointerdown",gI,t),r.addEventListener("pointermove",Ta,t))}))}function xi(t,e){Cr.forEach(n=>{const{setResizeHandlerState:r}=n,i=Tt.includes(n);r(t,i,e)})}function bI(){const[t,e]=D.useState(0);return D.useCallback(()=>e(n=>n+1),[])}function de(t,e){if(!t)throw console.error(e),Error(e)}function fn(t,e,n=js){return t.toFixed(n)===e.toFixed(n)?0:t>e?1:-1}function Rt(t,e,n=js){return fn(t,e,n)===0}function lt(t,e,n){return fn(t,e,n)===0}function EI(t,e,n){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++){const i=t[r],a=e[r];if(!lt(i,a,n))return!1}return!0}function Sn({panelConstraints:t,panelIndex:e,size:n}){const r=t[e];de(r!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:i=0,collapsible:a,maxSize:s=100,minSize:u=0}=r;if(fn(n,u)<0)if(a){const o=(i+u)/2;fn(n,o)<0?n=i:n=u}else n=u;return n=Math.min(s,n),n=parseFloat(n.toFixed(js)),n}function ir({delta:t,initialLayout:e,panelConstraints:n,pivotIndices:r,prevLayout:i,trigger:a}){if(lt(t,0))return e;const s=[...e],[u,o]=r;de(u!=null,"Invalid first pivot index"),de(o!=null,"Invalid second pivot index");let l=0;if(a==="keyboard"){{const c=t<0?o:u,p=n[c];de(p,`Panel constraints not found for index ${c}`);const{collapsedSize:h=0,collapsible:m,minSize:b=0}=p;if(m){const x=e[c];if(de(x!=null,`Previous layout not found for panel index ${c}`),lt(x,h)){const T=b-x;fn(T,Math.abs(t))>0&&(t=t<0?0-T:T)}}}{const c=t<0?u:o,p=n[c];de(p,`No panel constraints found for index ${c}`);const{collapsedSize:h=0,collapsible:m,minSize:b=0}=p;if(m){const x=e[c];if(de(x!=null,`Previous layout not found for panel index ${c}`),lt(x,b)){const T=x-h;fn(T,Math.abs(t))>0&&(t=t<0?0-T:T)}}}}{const c=t<0?1:-1;let p=t<0?o:u,h=0;for(;;){const b=e[p];de(b!=null,`Previous layout not found for panel index ${p}`);const T=Sn({panelConstraints:n,panelIndex:p,size:100})-b;if(h+=T,p+=c,p<0||p>=n.length)break}const m=Math.min(Math.abs(t),Math.abs(h));t=t<0?0-m:m}{let p=t<0?u:o;for(;p>=0&&p<n.length;){const h=Math.abs(t)-Math.abs(l),m=e[p];de(m!=null,`Previous layout not found for panel index ${p}`);const b=m-h,x=Sn({panelConstraints:n,panelIndex:p,size:b});if(!lt(m,x)&&(l+=m-x,s[p]=x,l.toPrecision(3).localeCompare(Math.abs(t).toPrecision(3),void 0,{numeric:!0})>=0))break;t<0?p--:p++}}if(EI(i,s))return i;{const c=t<0?o:u,p=e[c];de(p!=null,`Previous layout not found for panel index ${c}`);const h=p+l,m=Sn({panelConstraints:n,panelIndex:c,size:h});if(s[c]=m,!lt(m,h)){let b=h-m,T=t<0?o:u;for(;T>=0&&T<n.length;){const k=s[T];de(k!=null,`Previous layout not found for panel index ${T}`);const g=k+b,N=Sn({panelConstraints:n,panelIndex:T,size:g});if(lt(k,N)||(b-=N-k,s[T]=N),lt(b,0))break;t>0?T--:T++}}}const f=s.reduce((c,p)=>p+c,0);return lt(f,100)?s:i}function TI({layout:t,panelsArray:e,pivotIndices:n}){let r=0,i=100,a=0,s=0;const u=n[0];de(u!=null,"No pivot index found"),e.forEach((c,p)=>{const{constraints:h}=c,{maxSize:m=100,minSize:b=0}=h;p===u?(r=b,i=m):(a+=b,s+=m)});const o=Math.min(i,100-a),l=Math.max(r,100-s),f=t[u];return{valueMax:o,valueMin:l,valueNow:f}}function Sr(t,e=document){return Array.from(e.querySelectorAll(`[${Ue.resizeHandleId}][data-panel-group-id="${t}"]`))}function Zf(t,e,n=document){const i=Sr(t,n).findIndex(a=>a.getAttribute(Ue.resizeHandleId)===e);return i??null}function Yf(t,e,n){const r=Zf(t,e,n);return r!=null?[r,r+1]:[-1,-1]}function qf(t,e=document){var n;if(e instanceof HTMLElement&&(e==null||(n=e.dataset)===null||n===void 0?void 0:n.panelGroupId)==t)return e;const r=e.querySelector(`[data-panel-group][data-panel-group-id="${t}"]`);return r||null}function Yi(t,e=document){const n=e.querySelector(`[${Ue.resizeHandleId}="${t}"]`);return n||null}function xI(t,e,n,r=document){var i,a,s,u;const o=Yi(e,r),l=Sr(t,r),f=o?l.indexOf(o):-1,c=(i=(a=n[f])===null||a===void 0?void 0:a.id)!==null&&i!==void 0?i:null,p=(s=(u=n[f+1])===null||u===void 0?void 0:u.id)!==null&&s!==void 0?s:null;return[c,p]}function _I({committedValuesRef:t,eagerValuesRef:e,groupId:n,layout:r,panelDataArray:i,panelGroupElement:a,setLayout:s}){D.useRef({didWarnAboutMissingResizeHandle:!1}),sn(()=>{if(!a)return;const u=Sr(n,a);for(let o=0;o<i.length-1;o++){const{valueMax:l,valueMin:f,valueNow:c}=TI({layout:r,panelsArray:i,pivotIndices:[o,o+1]}),p=u[o];if(p!=null){const h=i[o];de(h,`No panel data found for index "${o}"`),p.setAttribute("aria-controls",h.id),p.setAttribute("aria-valuemax",""+Math.round(l)),p.setAttribute("aria-valuemin",""+Math.round(f)),p.setAttribute("aria-valuenow",c!=null?""+Math.round(c):"")}}return()=>{u.forEach((o,l)=>{o.removeAttribute("aria-controls"),o.removeAttribute("aria-valuemax"),o.removeAttribute("aria-valuemin"),o.removeAttribute("aria-valuenow")})}},[n,r,i,a]),D.useEffect(()=>{if(!a)return;const u=e.current;de(u,"Eager values not found");const{panelDataArray:o}=u,l=qf(n,a);de(l!=null,`No group found for id "${n}"`);const f=Sr(n,a);de(f,`No resize handles found for group id "${n}"`);const c=f.map(p=>{const h=p.getAttribute(Ue.resizeHandleId);de(h,"Resize handle element has no handle id attribute");const[m,b]=xI(n,h,o,a);if(m==null||b==null)return()=>{};const x=T=>{if(!T.defaultPrevented)switch(T.key){case"Enter":{T.preventDefault();const k=o.findIndex(g=>g.id===m);if(k>=0){const g=o[k];de(g,`No panel data found for index ${k}`);const N=r[k],{collapsedSize:v=0,collapsible:C,minSize:R=0}=g.constraints;if(N!=null&&C){const M=ir({delta:lt(N,v)?R-v:v-N,initialLayout:r,panelConstraints:o.map(U=>U.constraints),pivotIndices:Yf(n,h,a),prevLayout:r,trigger:"keyboard"});r!==M&&s(M)}}break}}};return p.addEventListener("keydown",x),()=>{p.removeEventListener("keydown",x)}});return()=>{c.forEach(p=>p())}},[a,t,e,n,r,i,s])}function el(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function Vf(t,e){const n=t==="horizontal",{x:r,y:i}=ji(e);return n?r:i}function yI(t,e,n,r,i){const a=n==="horizontal",s=Yi(e,i);de(s,`No resize handle element found for id "${e}"`);const u=s.getAttribute(Ue.groupId);de(u,"Resize handle element has no group id attribute");let{initialCursorPosition:o}=r;const l=Vf(n,t),f=qf(u,i);de(f,`No group element found for id "${u}"`);const c=f.getBoundingClientRect(),p=a?c.width:c.height;return(l-o)/p*100}function kI(t,e,n,r,i,a){if(Pf(t)){const s=n==="horizontal";let u=0;t.shiftKey?u=100:i!=null?u=i:u=10;let o=0;switch(t.key){case"ArrowDown":o=s?0:u;break;case"ArrowLeft":o=s?-u:0;break;case"ArrowRight":o=s?u:0;break;case"ArrowUp":o=s?0:-u;break;case"End":o=100;break;case"Home":o=-100;break}return o}else return r==null?0:yI(t,e,n,r,a)}function AI({panelDataArray:t}){const e=Array(t.length),n=t.map(a=>a.constraints);let r=0,i=100;for(let a=0;a<t.length;a++){const s=n[a];de(s,`Panel constraints not found for index ${a}`);const{defaultSize:u}=s;u!=null&&(r++,e[a]=u,i-=u)}for(let a=0;a<t.length;a++){const s=n[a];de(s,`Panel constraints not found for index ${a}`);const{defaultSize:u}=s;if(u!=null)continue;const o=t.length-r,l=i/o;r++,e[a]=l,i-=l}return e}function xn(t,e,n){e.forEach((r,i)=>{const a=t[i];de(a,`Panel data not found for index ${i}`);const{callbacks:s,constraints:u,id:o}=a,{collapsedSize:l=0,collapsible:f}=u,c=n[o];if(c==null||r!==c){n[o]=r;const{onCollapse:p,onExpand:h,onResize:m}=s;m&&m(r,c),f&&(p||h)&&(h&&(c==null||Rt(c,l))&&!Rt(r,l)&&h(),p&&(c==null||!Rt(c,l))&&Rt(r,l)&&p())}})}function Gr(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n])return!1;return!0}function CI({defaultSize:t,dragState:e,layout:n,panelData:r,panelIndex:i,precision:a=3}){const s=n[i];let u;return s==null?u=t!=null?t.toPrecision(a):"1":r.length===1?u="1":u=s.toPrecision(a),{flexBasis:0,flexGrow:u,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function SI(t,e=10){let n=null;return(...i)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{t(...i)},e)}}function tl(t){try{if(typeof localStorage<"u")t.getItem=e=>localStorage.getItem(e),t.setItem=(e,n)=>{localStorage.setItem(e,n)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),t.getItem=()=>null,t.setItem=()=>{}}}function Wf(t){return`react-resizable-panels:${t}`}function Gf(t){return t.map(e=>{const{constraints:n,id:r,idIsFromProps:i,order:a}=e;return i?r:a?`${a}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((e,n)=>e.localeCompare(n)).join(",")}function Qf(t,e){try{const n=Wf(t),r=e.getItem(n);if(r){const i=JSON.parse(r);if(typeof i=="object"&&i!=null)return i}}catch{}return null}function II(t,e,n){var r,i;const a=(r=Qf(t,n))!==null&&r!==void 0?r:{},s=Gf(e);return(i=a[s])!==null&&i!==void 0?i:null}function NI(t,e,n,r,i){var a;const s=Wf(t),u=Gf(e),o=(a=Qf(t,i))!==null&&a!==void 0?a:{};o[u]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{i.setItem(s,JSON.stringify(o))}catch(l){console.error(l)}}function nl({layout:t,panelConstraints:e}){const n=[...t],r=n.reduce((a,s)=>a+s,0);if(n.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${n.map(a=>`${a}%`).join(", ")}`);if(!lt(r,100)&&n.length>0)for(let a=0;a<e.length;a++){const s=n[a];de(s!=null,`No layout data found for index ${a}`);const u=100/r*s;n[a]=u}let i=0;for(let a=0;a<e.length;a++){const s=n[a];de(s!=null,`No layout data found for index ${a}`);const u=Sn({panelConstraints:e,panelIndex:a,size:s});s!=u&&(i+=s-u,n[a]=u)}if(!lt(i,0))for(let a=0;a<e.length;a++){const s=n[a];de(s!=null,`No layout data found for index ${a}`);const u=s+i,o=Sn({panelConstraints:e,panelIndex:a,size:u});if(s!==o&&(i-=o-s,n[a]=o,lt(i,0)))break}return n}const wI=100,ar={getItem:t=>(tl(ar),ar.getItem(t)),setItem:(t,e)=>{tl(ar),ar.setItem(t,e)}},rl={};function Kf({autoSaveId:t=null,children:e,className:n="",direction:r,forwardedRef:i,id:a=null,onLayout:s=null,keyboardResizeBy:u=null,storage:o=ar,style:l,tagName:f="div",...c}){const p=Zs(a),h=D.useRef(null),[m,b]=D.useState(null),[x,T]=D.useState([]),k=bI(),g=D.useRef({}),N=D.useRef(new Map),v=D.useRef(0),C=D.useRef({autoSaveId:t,direction:r,dragState:m,id:p,keyboardResizeBy:u,onLayout:s,storage:o}),R=D.useRef({layout:x,panelDataArray:[],panelDataArrayChanged:!1});D.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),D.useImperativeHandle(i,()=>({getId:()=>C.current.id,getLayout:()=>{const{layout:y}=R.current;return y},setLayout:y=>{const{onLayout:W}=C.current,{layout:K,panelDataArray:G}=R.current,J=nl({layout:y,panelConstraints:G.map(ne=>ne.constraints)});el(K,J)||(T(J),R.current.layout=J,W&&W(J),xn(G,J,g.current))}}),[]),sn(()=>{C.current.autoSaveId=t,C.current.direction=r,C.current.dragState=m,C.current.id=p,C.current.onLayout=s,C.current.storage=o}),_I({committedValuesRef:C,eagerValuesRef:R,groupId:p,layout:x,panelDataArray:R.current.panelDataArray,setLayout:T,panelGroupElement:h.current}),D.useEffect(()=>{const{panelDataArray:y}=R.current;if(t){if(x.length===0||x.length!==y.length)return;let W=rl[t];W==null&&(W=SI(NI,wI),rl[t]=W);const K=[...y],G=new Map(N.current);W(t,K,G,x,o)}},[t,x,o]),D.useEffect(()=>{});const M=D.useCallback(y=>{const{onLayout:W}=C.current,{layout:K,panelDataArray:G}=R.current;if(y.constraints.collapsible){const J=G.map(ze=>ze.constraints),{collapsedSize:ne=0,panelSize:oe,pivotIndices:me}=Xt(G,y,K);if(de(oe!=null,`Panel size not found for panel "${y.id}"`),!Rt(oe,ne)){N.current.set(y.id,oe);const je=An(G,y)===G.length-1?oe-ne:ne-oe,ke=ir({delta:je,initialLayout:K,panelConstraints:J,pivotIndices:me,prevLayout:K,trigger:"imperative-api"});Gr(K,ke)||(T(ke),R.current.layout=ke,W&&W(ke),xn(G,ke,g.current))}}},[]),U=D.useCallback((y,W)=>{const{onLayout:K}=C.current,{layout:G,panelDataArray:J}=R.current;if(y.constraints.collapsible){const ne=J.map(De=>De.constraints),{collapsedSize:oe=0,panelSize:me=0,minSize:ze=0,pivotIndices:je}=Xt(J,y,G),ke=W??ze;if(Rt(me,oe)){const De=N.current.get(y.id),Pt=De!=null&&De>=ke?De:ke,gn=An(J,y)===J.length-1?me-Pt:Pt-me,Ve=ir({delta:gn,initialLayout:G,panelConstraints:ne,pivotIndices:je,prevLayout:G,trigger:"imperative-api"});Gr(G,Ve)||(T(Ve),R.current.layout=Ve,K&&K(Ve),xn(J,Ve,g.current))}}},[]),w=D.useCallback(y=>{const{layout:W,panelDataArray:K}=R.current,{panelSize:G}=Xt(K,y,W);return de(G!=null,`Panel size not found for panel "${y.id}"`),G},[]),P=D.useCallback((y,W)=>{const{panelDataArray:K}=R.current,G=An(K,y);return CI({defaultSize:W,dragState:m,layout:x,panelData:K,panelIndex:G})},[m,x]),H=D.useCallback(y=>{const{layout:W,panelDataArray:K}=R.current,{collapsedSize:G=0,collapsible:J,panelSize:ne}=Xt(K,y,W);return de(ne!=null,`Panel size not found for panel "${y.id}"`),J===!0&&Rt(ne,G)},[]),te=D.useCallback(y=>{const{layout:W,panelDataArray:K}=R.current,{collapsedSize:G=0,collapsible:J,panelSize:ne}=Xt(K,y,W);return de(ne!=null,`Panel size not found for panel "${y.id}"`),!J||fn(ne,G)>0},[]),Z=D.useCallback(y=>{const{panelDataArray:W}=R.current;W.push(y),W.sort((K,G)=>{const J=K.order,ne=G.order;return J==null&&ne==null?0:J==null?-1:ne==null?1:J-ne}),R.current.panelDataArrayChanged=!0,k()},[k]);sn(()=>{if(R.current.panelDataArrayChanged){R.current.panelDataArrayChanged=!1;const{autoSaveId:y,onLayout:W,storage:K}=C.current,{layout:G,panelDataArray:J}=R.current;let ne=null;if(y){const me=II(y,J,K);me&&(N.current=new Map(Object.entries(me.expandToSizes)),ne=me.layout)}ne==null&&(ne=AI({panelDataArray:J}));const oe=nl({layout:ne,panelConstraints:J.map(me=>me.constraints)});el(G,oe)||(T(oe),R.current.layout=oe,W&&W(oe),xn(J,oe,g.current))}}),sn(()=>{const y=R.current;return()=>{y.layout=[]}},[]);const z=D.useCallback(y=>{let W=!1;const K=h.current;return K&&window.getComputedStyle(K,null).getPropertyValue("direction")==="rtl"&&(W=!0),function(J){J.preventDefault();const ne=h.current;if(!ne)return()=>null;const{direction:oe,dragState:me,id:ze,keyboardResizeBy:je,onLayout:ke}=C.current,{layout:De,panelDataArray:Pt}=R.current,{initialLayout:Wt}=me??{},gn=Yf(ze,y,ne);let Ve=kI(J,y,oe,me,je,ne);const Hn=oe==="horizontal";Hn&&W&&(Ve=-Ve);const Fr=Pt.map(qi=>qi.constraints),Gt=ir({delta:Ve,initialLayout:Wt??De,panelConstraints:Fr,pivotIndices:gn,prevLayout:De,trigger:Pf(J)?"keyboard":"mouse-or-touch"}),zr=!Gr(De,Gt);(Mf(J)||Bf(J))&&v.current!=Ve&&(v.current=Ve,!zr&&Ve!==0?Hn?_a(y,Ve<0?zf:Uf):_a(y,Ve<0?Hf:$f):_a(y,0)),zr&&(T(Gt),R.current.layout=Gt,ke&&ke(Gt),xn(Pt,Gt,g.current))}},[]),Q=D.useCallback((y,W)=>{const{onLayout:K}=C.current,{layout:G,panelDataArray:J}=R.current,ne=J.map(De=>De.constraints),{panelSize:oe,pivotIndices:me}=Xt(J,y,G);de(oe!=null,`Panel size not found for panel "${y.id}"`);const je=An(J,y)===J.length-1?oe-W:W-oe,ke=ir({delta:je,initialLayout:G,panelConstraints:ne,pivotIndices:me,prevLayout:G,trigger:"imperative-api"});Gr(G,ke)||(T(ke),R.current.layout=ke,K&&K(ke),xn(J,ke,g.current))},[]),ae=D.useCallback((y,W)=>{const{layout:K,panelDataArray:G}=R.current,{collapsedSize:J=0,collapsible:ne}=W,{collapsedSize:oe=0,collapsible:me,maxSize:ze=100,minSize:je=0}=y.constraints,{panelSize:ke}=Xt(G,y,K);ke!=null&&(ne&&me&&Rt(ke,J)?Rt(J,oe)||Q(y,oe):ke<je?Q(y,je):ke>ze&&Q(y,ze))},[Q]),Ee=D.useCallback((y,W)=>{const{direction:K}=C.current,{layout:G}=R.current;if(!h.current)return;const J=Yi(y,h.current);de(J,`Drag handle element not found for id "${y}"`);const ne=Vf(K,W);b({dragHandleId:y,dragHandleRect:J.getBoundingClientRect(),initialCursorPosition:ne,initialLayout:G})},[]),Se=D.useCallback(()=>{b(null)},[]),I=D.useCallback(y=>{const{panelDataArray:W}=R.current,K=An(W,y);K>=0&&(W.splice(K,1),delete g.current[y.id],R.current.panelDataArrayChanged=!0,k())},[k]),xe=D.useMemo(()=>({collapsePanel:M,direction:r,dragState:m,expandPanel:U,getPanelSize:w,getPanelStyle:P,groupId:p,isPanelCollapsed:H,isPanelExpanded:te,reevaluatePanelConstraints:ae,registerPanel:Z,registerResizeHandle:z,resizePanel:Q,startDragging:Ee,stopDragging:Se,unregisterPanel:I,panelGroupElement:h.current}),[M,m,r,U,w,P,p,H,te,ae,Z,z,Q,Ee,Se,I]),Te={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return D.createElement($i.Provider,{value:xe},D.createElement(f,{...c,children:e,className:n,id:a,ref:h,style:{...Te,...l},[Ue.group]:"",[Ue.groupDirection]:r,[Ue.groupId]:p}))}const Xf=D.forwardRef((t,e)=>D.createElement(Kf,{...t,forwardedRef:e}));Kf.displayName="PanelGroup";Xf.displayName="forwardRef(PanelGroup)";function An(t,e){return t.findIndex(n=>n===e||n.id===e.id)}function Xt(t,e,n){const r=An(t,e),a=r===t.length-1?[r-1,r]:[r,r+1],s=n[r];return{...e.constraints,panelSize:s,pivotIndices:a}}function vI({disabled:t,handleId:e,resizeHandler:n,panelGroupElement:r}){D.useEffect(()=>{if(t||n==null||r==null)return;const i=Yi(e,r);if(i==null)return;const a=s=>{if(!s.defaultPrevented)switch(s.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{s.preventDefault(),n(s);break}case"F6":{s.preventDefault();const u=i.getAttribute(Ue.groupId);de(u,`No group element found for id "${u}"`);const o=Sr(u,r),l=Zf(u,e,r);de(l!==null,`No resize element found for id "${e}"`);const f=s.shiftKey?l>0?l-1:o.length-1:l+1<o.length?l+1:0;o[f].focus();break}}};return i.addEventListener("keydown",a),()=>{i.removeEventListener("keydown",a)}},[r,t,e,n])}function Jf({children:t=null,className:e="",disabled:n=!1,hitAreaMargins:r,id:i,onBlur:a,onClick:s,onDragging:u,onFocus:o,onPointerDown:l,onPointerUp:f,style:c={},tabIndex:p=0,tagName:h="div",...m}){var b,x;const T=D.useRef(null),k=D.useRef({onClick:s,onDragging:u,onPointerDown:l,onPointerUp:f});D.useEffect(()=>{k.current.onClick=s,k.current.onDragging=u,k.current.onPointerDown=l,k.current.onPointerUp=f});const g=D.useContext($i);if(g===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:N,groupId:v,registerResizeHandle:C,startDragging:R,stopDragging:M,panelGroupElement:U}=g,w=Zs(i),[P,H]=D.useState("inactive"),[te,Z]=D.useState(!1),[z,Q]=D.useState(null),ae=D.useRef({state:P});sn(()=>{ae.current.state=P}),D.useEffect(()=>{if(n)Q(null);else{const xe=C(w);Q(()=>xe)}},[n,w,C]);const Ee=(b=r?.coarse)!==null&&b!==void 0?b:15,Se=(x=r?.fine)!==null&&x!==void 0?x:5;D.useEffect(()=>{if(n||z==null)return;const xe=T.current;de(xe,"Element ref not attached");let Te=!1;return mI(w,xe,N,{coarse:Ee,fine:Se},(W,K,G)=>{if(!K){H("inactive");return}switch(W){case"down":{H("drag"),Te=!1,de(G,'Expected event to be defined for "down" action'),R(w,G);const{onDragging:J,onPointerDown:ne}=k.current;J?.(!0),ne?.();break}case"move":{const{state:J}=ae.current;Te=!0,J!=="drag"&&H("hover"),de(G,'Expected event to be defined for "move" action'),z(G);break}case"up":{H("hover"),M();const{onClick:J,onDragging:ne,onPointerUp:oe}=k.current;ne?.(!1),oe?.(),Te||J?.();break}}})},[Ee,N,n,Se,C,w,z,R,M]),vI({disabled:n,handleId:w,resizeHandler:z,panelGroupElement:U});const I={touchAction:"none",userSelect:"none"};return D.createElement(h,{...m,children:t,className:e,id:i,onBlur:()=>{Z(!1),a?.()},onFocus:()=>{Z(!0),o?.()},ref:T,role:"separator",style:{...I,...c},tabIndex:p,[Ue.groupDirection]:N,[Ue.groupId]:v,[Ue.resizeHandle]:"",[Ue.resizeHandleActive]:P==="drag"?"pointer":te?"keyboard":void 0,[Ue.resizeHandleEnabled]:!n,[Ue.resizeHandleId]:w,[Ue.resizeHandleState]:P})}Jf.displayName="PanelResizeHandle";function i6(t){const e=X.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let i;e[3]!==n?(i=ue("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",n),e[3]=n,e[4]=i):i=e[4];let a;return e[5]!==r||e[6]!==i?(a=E.jsx(Xf,{"data-slot":"resizable-panel-group",className:i,...r}),e[5]=r,e[6]=i,e[7]=a):a=e[7],a}function a6(t){const e=X.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=E.jsx(Df,{"data-slot":"resizable-panel",...n}),e[2]=n,e[3]=r):r=e[3],r}function s6(t){const e=X.c(12);let n,r,i;e[0]!==t?({withHandle:i,className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=i):(n=e[1],r=e[2],i=e[3]);let a;e[4]!==n?(a=ue("bg-border focus-visible:ring-ring relative flex w-[0.5px] items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",n),e[4]=n,e[5]=a):a=e[5];let s;e[6]!==i?(s=i&&E.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:E.jsx(vl,{className:"size-2.5"})}),e[6]=i,e[7]=s):s=e[7];let u;return e[8]!==r||e[9]!==a||e[10]!==s?(u=E.jsx(Jf,{"data-slot":"resizable-handle",className:a,...r,children:s}),e[8]=r,e[9]=a,e[10]=s,e[11]=u):u=e[11],u}export{XI as C,Rm as D,$m as G,n6 as I,zk as M,a6 as R,JI as a,Fm as b,Dk as c,e6 as d,t6 as e,Dm as f,Pm as g,Mm as h,ou as i,vm as j,s6 as k,r6 as l,i6 as m,rA as u};