studiograph 1.3.3 → 1.3.4

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 (290) hide show
  1. package/dist/agent/orchestrator.d.ts +10 -0
  2. package/dist/agent/orchestrator.js +26 -7
  3. package/dist/agent/orchestrator.js.map +1 -1
  4. package/dist/agent/skills/sync-configuration.md +4 -29
  5. package/dist/agent/skills/sync-setup.md +2 -4
  6. package/dist/agent/tools/graph-tools.d.ts +5 -1
  7. package/dist/agent/tools/graph-tools.js +161 -9
  8. package/dist/agent/tools/graph-tools.js.map +1 -1
  9. package/dist/agent/tools/ops-tools.js +15 -126
  10. package/dist/agent/tools/ops-tools.js.map +1 -1
  11. package/dist/agent/tools/permission-tools.d.ts +15 -14
  12. package/dist/agent/tools/permission-tools.js +65 -128
  13. package/dist/agent/tools/permission-tools.js.map +1 -1
  14. package/dist/agent/tools/sync-tools.d.ts +7 -6
  15. package/dist/agent/tools/sync-tools.js +205 -178
  16. package/dist/agent/tools/sync-tools.js.map +1 -1
  17. package/dist/cli/commands/about.d.ts +13 -0
  18. package/dist/cli/commands/about.js +97 -0
  19. package/dist/cli/commands/about.js.map +1 -0
  20. package/dist/cli/commands/clone.d.ts +5 -2
  21. package/dist/cli/commands/clone.js +131 -62
  22. package/dist/cli/commands/clone.js.map +1 -1
  23. package/dist/cli/commands/connector.d.ts +2 -16
  24. package/dist/cli/commands/connector.js +32 -109
  25. package/dist/cli/commands/connector.js.map +1 -1
  26. package/dist/cli/commands/deploy.d.ts +0 -1
  27. package/dist/cli/commands/deploy.js +13 -103
  28. package/dist/cli/commands/deploy.js.map +1 -1
  29. package/dist/cli/commands/init.js +6 -93
  30. package/dist/cli/commands/init.js.map +1 -1
  31. package/dist/cli/commands/join.d.ts +3 -2
  32. package/dist/cli/commands/join.js +142 -97
  33. package/dist/cli/commands/join.js.map +1 -1
  34. package/dist/cli/commands/redeploy.js +1 -2
  35. package/dist/cli/commands/redeploy.js.map +1 -1
  36. package/dist/cli/commands/serve.d.ts +1 -3
  37. package/dist/cli/commands/serve.js +29 -109
  38. package/dist/cli/commands/serve.js.map +1 -1
  39. package/dist/cli/commands/start.js +1 -1
  40. package/dist/cli/commands/start.js.map +1 -1
  41. package/dist/cli/commands/sync-collection.d.ts +14 -0
  42. package/dist/cli/commands/sync-collection.js +366 -0
  43. package/dist/cli/commands/sync-collection.js.map +1 -0
  44. package/dist/cli/commands/sync.d.ts +4 -2
  45. package/dist/cli/commands/sync.js +529 -94
  46. package/dist/cli/commands/sync.js.map +1 -1
  47. package/dist/cli/index.js +15 -30
  48. package/dist/cli/index.js.map +1 -1
  49. package/dist/cli/setup-wizard.d.ts +0 -13
  50. package/dist/cli/setup-wizard.js +6 -81
  51. package/dist/cli/setup-wizard.js.map +1 -1
  52. package/dist/core/graph.d.ts +8 -2
  53. package/dist/core/graph.js +11 -7
  54. package/dist/core/graph.js.map +1 -1
  55. package/dist/core/types.d.ts +149 -21
  56. package/dist/core/types.js +16 -4
  57. package/dist/core/types.js.map +1 -1
  58. package/dist/core/workspace-manager.js +1 -5
  59. package/dist/core/workspace-manager.js.map +1 -1
  60. package/dist/core/workspace.d.ts +11 -4
  61. package/dist/core/workspace.js +61 -26
  62. package/dist/core/workspace.js.map +1 -1
  63. package/dist/integrations/asana.d.ts +26 -0
  64. package/dist/integrations/asana.js +77 -0
  65. package/dist/integrations/asana.js.map +1 -0
  66. package/dist/integrations/figma-local.d.ts +16 -0
  67. package/dist/integrations/figma-local.js +10 -0
  68. package/dist/integrations/figma-local.js.map +1 -0
  69. package/dist/integrations/figma.d.ts +17 -0
  70. package/dist/integrations/figma.js +16 -0
  71. package/dist/integrations/figma.js.map +1 -0
  72. package/dist/integrations/granola.d.ts +24 -0
  73. package/dist/integrations/granola.js +59 -0
  74. package/dist/integrations/granola.js.map +1 -0
  75. package/dist/integrations/linear.d.ts +14 -0
  76. package/dist/integrations/linear.js +70 -0
  77. package/dist/integrations/linear.js.map +1 -0
  78. package/dist/integrations/paper-local.d.ts +14 -0
  79. package/dist/integrations/paper-local.js +10 -0
  80. package/dist/integrations/paper-local.js.map +1 -0
  81. package/dist/integrations/paper.d.ts +2 -0
  82. package/dist/integrations/paper.js +10 -0
  83. package/dist/integrations/paper.js.map +1 -0
  84. package/dist/integrations/pipedrive.d.ts +26 -0
  85. package/dist/integrations/pipedrive.js +97 -0
  86. package/dist/integrations/pipedrive.js.map +1 -0
  87. package/dist/integrations/registry.d.ts +15 -0
  88. package/dist/integrations/registry.js +27 -0
  89. package/dist/integrations/registry.js.map +1 -0
  90. package/dist/integrations/types.d.ts +34 -0
  91. package/dist/integrations/types.js +9 -0
  92. package/dist/integrations/types.js.map +1 -0
  93. package/dist/mcp/connector-manager.d.ts +45 -31
  94. package/dist/mcp/connector-manager.js +164 -116
  95. package/dist/mcp/connector-manager.js.map +1 -1
  96. package/dist/mcp/server-oauth-provider.d.ts +56 -0
  97. package/dist/mcp/server-oauth-provider.js +138 -0
  98. package/dist/mcp/server-oauth-provider.js.map +1 -0
  99. package/dist/server/chrome/chrome.css +142 -28
  100. package/dist/server/chrome/chrome.js +46 -220
  101. package/dist/server/collab-authority.d.ts +70 -0
  102. package/dist/server/collab-authority.js +218 -0
  103. package/dist/server/collab-authority.js.map +1 -0
  104. package/dist/server/collab.d.ts +29 -0
  105. package/dist/server/collab.js +195 -0
  106. package/dist/server/collab.js.map +1 -0
  107. package/dist/server/commit-scheduler.d.ts +39 -0
  108. package/dist/server/commit-scheduler.js +113 -0
  109. package/dist/server/commit-scheduler.js.map +1 -0
  110. package/dist/server/index.d.ts +0 -2
  111. package/dist/server/index.js +166 -55
  112. package/dist/server/index.js.map +1 -1
  113. package/dist/server/routes/auth-api.d.ts +6 -0
  114. package/dist/server/routes/auth-api.js +78 -0
  115. package/dist/server/routes/auth-api.js.map +1 -1
  116. package/dist/server/routes/chat.js +4 -0
  117. package/dist/server/routes/chat.js.map +1 -1
  118. package/dist/server/routes/collab.d.ts +6 -0
  119. package/dist/server/routes/collab.js +10 -0
  120. package/dist/server/routes/collab.js.map +1 -0
  121. package/dist/server/routes/git-http.d.ts +23 -0
  122. package/dist/server/routes/git-http.js +251 -0
  123. package/dist/server/routes/git-http.js.map +1 -0
  124. package/dist/server/routes/graph-api.d.ts +6 -2
  125. package/dist/server/routes/graph-api.js +266 -82
  126. package/dist/server/routes/graph-api.js.map +1 -1
  127. package/dist/server/routes/mcp.d.ts +12 -0
  128. package/dist/server/routes/mcp.js +35 -0
  129. package/dist/server/routes/mcp.js.map +1 -0
  130. package/dist/server/routes/permissions-api.d.ts +6 -4
  131. package/dist/server/routes/permissions-api.js +53 -167
  132. package/dist/server/routes/permissions-api.js.map +1 -1
  133. package/dist/server/routes/sync-api.d.ts +26 -0
  134. package/dist/server/routes/sync-api.js +757 -0
  135. package/dist/server/routes/sync-api.js.map +1 -0
  136. package/dist/server/routes/ws.d.ts +9 -0
  137. package/dist/server/routes/ws.js +131 -0
  138. package/dist/server/routes/ws.js.map +1 -0
  139. package/dist/server/session-manager.d.ts +40 -0
  140. package/dist/server/session-manager.js +132 -0
  141. package/dist/server/session-manager.js.map +1 -0
  142. package/dist/server/ws-hub.d.ts +130 -0
  143. package/dist/server/ws-hub.js +250 -0
  144. package/dist/server/ws-hub.js.map +1 -0
  145. package/dist/server/yjs-manager.d.ts +59 -0
  146. package/dist/server/yjs-manager.js +194 -0
  147. package/dist/server/yjs-manager.js.map +1 -0
  148. package/dist/services/auth-service.d.ts +74 -0
  149. package/dist/services/auth-service.js +286 -6
  150. package/dist/services/auth-service.js.map +1 -1
  151. package/dist/services/git.d.ts +6 -0
  152. package/dist/services/git.js +32 -2
  153. package/dist/services/git.js.map +1 -1
  154. package/dist/services/sync/collection-sync.d.ts +73 -0
  155. package/dist/services/sync/collection-sync.js +726 -0
  156. package/dist/services/sync/collection-sync.js.map +1 -0
  157. package/dist/services/sync/commit.js +5 -20
  158. package/dist/services/sync/commit.js.map +1 -1
  159. package/dist/services/sync/data-fetcher.d.ts +31 -0
  160. package/dist/services/sync/data-fetcher.js +12 -0
  161. package/dist/services/sync/data-fetcher.js.map +1 -0
  162. package/dist/services/sync/entity-refresh.d.ts +30 -0
  163. package/dist/services/sync/entity-refresh.js +275 -0
  164. package/dist/services/sync/entity-refresh.js.map +1 -0
  165. package/dist/services/sync/frontmatter-extractor.d.ts +2 -2
  166. package/dist/services/sync/frontmatter-extractor.js +1 -2
  167. package/dist/services/sync/frontmatter-extractor.js.map +1 -1
  168. package/dist/services/sync/graph-match.js +1 -1
  169. package/dist/services/sync/graph-match.js.map +1 -1
  170. package/dist/services/sync/mcp-client.d.ts +16 -4
  171. package/dist/services/sync/mcp-client.js +34 -20
  172. package/dist/services/sync/mcp-client.js.map +1 -1
  173. package/dist/services/sync/prompts.js +1 -1
  174. package/dist/services/sync/reconciler.js +1 -2
  175. package/dist/services/sync/reconciler.js.map +1 -1
  176. package/dist/services/sync/rest-client.d.ts +40 -0
  177. package/dist/services/sync/rest-client.js +100 -0
  178. package/dist/services/sync/rest-client.js.map +1 -0
  179. package/dist/services/sync/source-config.d.ts +23 -1
  180. package/dist/services/sync/source-config.js +112 -16
  181. package/dist/services/sync/source-config.js.map +1 -1
  182. package/dist/services/sync/source-definitions/asana.d.ts +3 -4
  183. package/dist/services/sync/source-definitions/asana.js +7 -13
  184. package/dist/services/sync/source-definitions/asana.js.map +1 -1
  185. package/dist/services/sync/source-definitions/definitions.d.ts +5 -18
  186. package/dist/services/sync/source-definitions/definitions.js +4 -22
  187. package/dist/services/sync/source-definitions/definitions.js.map +1 -1
  188. package/dist/services/sync/source-definitions/granola.d.ts +1 -1
  189. package/dist/services/sync/source-definitions/granola.js +11 -18
  190. package/dist/services/sync/source-definitions/granola.js.map +1 -1
  191. package/dist/services/sync/source-definitions/linear.d.ts +1 -1
  192. package/dist/services/sync/source-definitions/linear.js +17 -15
  193. package/dist/services/sync/source-definitions/linear.js.map +1 -1
  194. package/dist/services/sync/source-definitions/pipedrive.d.ts +1 -1
  195. package/dist/services/sync/source-definitions/pipedrive.js +6 -15
  196. package/dist/services/sync/source-definitions/pipedrive.js.map +1 -1
  197. package/dist/services/sync/staging.js +1 -2
  198. package/dist/services/sync/staging.js.map +1 -1
  199. package/dist/services/sync/structured-extractor.d.ts +8 -2
  200. package/dist/services/sync/structured-extractor.js +243 -35
  201. package/dist/services/sync/structured-extractor.js.map +1 -1
  202. package/dist/services/sync/types.d.ts +192 -23
  203. package/dist/services/sync/unstructured-extractor.d.ts +1 -3
  204. package/dist/services/sync/unstructured-extractor.js +2 -14
  205. package/dist/services/sync/unstructured-extractor.js.map +1 -1
  206. package/dist/utils/git.d.ts +33 -20
  207. package/dist/utils/git.js +119 -62
  208. package/dist/utils/git.js.map +1 -1
  209. package/dist/utils/preflight.d.ts +1 -15
  210. package/dist/utils/preflight.js +1 -35
  211. package/dist/utils/preflight.js.map +1 -1
  212. package/dist/web/_app/immutable/assets/0.CupILLQs.css +1 -0
  213. package/dist/web/_app/immutable/assets/3.CtJi4Cy9.css +1 -0
  214. package/dist/web/_app/immutable/assets/5.CydFyZSu.css +1 -0
  215. package/dist/web/_app/immutable/assets/6.kqeOo0OW.css +1 -0
  216. package/dist/web/_app/immutable/assets/7.CseIx7qQ.css +1 -0
  217. package/dist/web/_app/immutable/assets/8.BYpFDZHK.css +1 -0
  218. package/dist/web/_app/immutable/assets/AppShell.Ch_ef9hJ.css +1 -0
  219. package/dist/web/_app/immutable/assets/ChatPanel.CP-_8txt.css +1 -0
  220. package/dist/web/_app/immutable/chunks/0oxpWEgM.js +1 -0
  221. package/dist/web/_app/immutable/chunks/B1y7Wy5O.js +18 -0
  222. package/dist/web/_app/immutable/chunks/B7eduG_j.js +64 -0
  223. package/dist/web/_app/immutable/chunks/BBLgaWN8.js +1 -0
  224. package/dist/web/_app/immutable/chunks/BCB5cYCz.js +2 -0
  225. package/dist/web/_app/immutable/chunks/{aosHekRC.js → BPUy9_sS.js} +1 -1
  226. package/dist/web/_app/immutable/chunks/BVBRzmeQ.js +7 -0
  227. package/dist/web/_app/immutable/chunks/{CUzqHQY_.js → BXuvR8Ks.js} +2 -1
  228. package/dist/web/_app/immutable/chunks/BeBar3OL.js +1 -0
  229. package/dist/web/_app/immutable/chunks/BuOTIbJu.js +1 -0
  230. package/dist/web/_app/immutable/chunks/CLFba8FK.js +5 -0
  231. package/dist/web/_app/immutable/chunks/CQCkXCml.js +1 -0
  232. package/dist/web/_app/immutable/chunks/CXuhHL4d.js +1 -0
  233. package/dist/web/_app/immutable/chunks/Cg9NOuOl.js +27 -0
  234. package/dist/web/_app/immutable/chunks/Cs5oz2oJ.js +5 -0
  235. package/dist/web/_app/immutable/chunks/Cs_ROD7H.js +2 -0
  236. package/dist/web/_app/immutable/chunks/D2aTbzFm.js +3 -0
  237. package/dist/web/_app/immutable/chunks/D4FXhiC2.js +1 -0
  238. package/dist/web/_app/immutable/chunks/D4VHRYeB.js +1 -0
  239. package/dist/web/_app/immutable/chunks/DCGSm8Hl.js +1 -0
  240. package/dist/web/_app/immutable/chunks/DP09rP34.js +2 -0
  241. package/dist/web/_app/immutable/chunks/DiP47fAp.js +1 -0
  242. package/dist/web/_app/immutable/chunks/DptGlK8O.js +1 -0
  243. package/dist/web/_app/immutable/chunks/O0fx2ss6.js +1 -0
  244. package/dist/web/_app/immutable/chunks/xBRYfpah.js +1 -0
  245. package/dist/web/_app/immutable/entry/app.FgnywZP_.js +2 -0
  246. package/dist/web/_app/immutable/entry/start.Bsa-zlPf.js +1 -0
  247. package/dist/web/_app/immutable/nodes/0.D3SW-LMc.js +10 -0
  248. package/dist/web/_app/immutable/nodes/1.y0c5TQTP.js +1 -0
  249. package/dist/web/_app/immutable/nodes/2.BQfSep9-.js +1 -0
  250. package/dist/web/_app/immutable/nodes/3.CC4Y-xMM.js +11 -0
  251. package/dist/web/_app/immutable/nodes/{5.BBpmYkAu.js → 4.Dp0Z-oPW.js} +2 -2
  252. package/dist/web/_app/immutable/nodes/5.gjZ03DON.js +2 -0
  253. package/dist/web/_app/immutable/nodes/6.dRNIwcJQ.js +1 -0
  254. package/dist/web/_app/immutable/nodes/7.I4Gjes3o.js +2 -0
  255. package/dist/web/_app/immutable/nodes/8.Dj14D7uH.js +1 -0
  256. package/dist/web/_app/version.json +1 -1
  257. package/dist/web/index.html +10 -12
  258. package/package.json +12 -2
  259. package/dist/web/_app/immutable/assets/0.CDbX4Cwz.css +0 -1
  260. package/dist/web/_app/immutable/assets/3.BJy7pVXi.css +0 -1
  261. package/dist/web/_app/immutable/assets/4.Ad16uh9o.css +0 -1
  262. package/dist/web/_app/immutable/assets/6.Bm2i7O0j.css +0 -1
  263. package/dist/web/_app/immutable/assets/AppShell.D0rmbdqF.css +0 -1
  264. package/dist/web/_app/immutable/assets/ChatPanel.RFD5GGYI.css +0 -1
  265. package/dist/web/_app/immutable/assets/editor.CPAf2SRV.css +0 -1
  266. package/dist/web/_app/immutable/chunks/479TgXB4.js +0 -1
  267. package/dist/web/_app/immutable/chunks/4QY4j-jX.js +0 -1
  268. package/dist/web/_app/immutable/chunks/BFb0g4TQ.js +0 -64
  269. package/dist/web/_app/immutable/chunks/Bopa-Ask.js +0 -1
  270. package/dist/web/_app/immutable/chunks/COwytaCP.js +0 -1
  271. package/dist/web/_app/immutable/chunks/DEJSHbC3.js +0 -1
  272. package/dist/web/_app/immutable/chunks/DNywhIex.js +0 -23
  273. package/dist/web/_app/immutable/chunks/DTUXhwEY.js +0 -1
  274. package/dist/web/_app/immutable/chunks/DThXpa0U.js +0 -6
  275. package/dist/web/_app/immutable/chunks/Dh_H7Owr.js +0 -18
  276. package/dist/web/_app/immutable/chunks/Dml-u95b.js +0 -2
  277. package/dist/web/_app/immutable/chunks/DnlgZ_Tk.js +0 -5
  278. package/dist/web/_app/immutable/chunks/DtVH--hH.js +0 -6
  279. package/dist/web/_app/immutable/chunks/DvKVaE7M.js +0 -1
  280. package/dist/web/_app/immutable/chunks/MbiSz-iW.js +0 -2
  281. package/dist/web/_app/immutable/chunks/bSAC733J.js +0 -1
  282. package/dist/web/_app/immutable/entry/app.BvodXQQ0.js +0 -2
  283. package/dist/web/_app/immutable/entry/start.Bkui3Kyw.js +0 -1
  284. package/dist/web/_app/immutable/nodes/0.DfbCOBhn.js +0 -2
  285. package/dist/web/_app/immutable/nodes/1.vtxUGpe6.js +0 -1
  286. package/dist/web/_app/immutable/nodes/2.Cq29oW4h.js +0 -1
  287. package/dist/web/_app/immutable/nodes/3.SquslPZy.js +0 -1
  288. package/dist/web/_app/immutable/nodes/4.COV8FR8b.js +0 -16
  289. package/dist/web/_app/immutable/nodes/6.BBbh6z9I.js +0 -2
  290. /package/dist/web/_app/immutable/assets/{5.BhKgiXd2.css → 4.BhKgiXd2.css} +0 -0
@@ -1 +1,2 @@
1
- const ut=1024;let qe=0;class L{constructor(e,t){this.from=e,this.to=t}}class A{constructor(e={}){this.id=qe++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")}),this.combine=e.combine||null}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=W.match(e)),t=>{let r=e(t);return r===void 0?null:[this,r]}}}A.closedBy=new A({deserialize:l=>l.split(" ")});A.openedBy=new A({deserialize:l=>l.split(" ")});A.group=new A({deserialize:l=>l.split(" ")});A.isolate=new A({deserialize:l=>{if(l&&l!="rtl"&&l!="ltr"&&l!="auto")throw new RangeError("Invalid value for isolate: "+l);return l||"auto"}});A.contextHash=new A({perNode:!0});A.lookAhead=new A({perNode:!0});A.mounted=new A({perNode:!0});class re{constructor(e,t,r,i=!1){this.tree=e,this.overlay=t,this.parser=r,this.bracketed=i}static get(e){return e&&e.props&&e.props[A.mounted.id]}}const Je=Object.create(null);class W{constructor(e,t,r,i=0){this.name=e,this.props=t,this.id=r,this.flags=i}static define(e){let t=e.props&&e.props.length?Object.create(null):Je,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new W(e.name||"",t,e.id,r);if(e.props){for(let n of e.props)if(Array.isArray(n)||(n=n(i)),n){if(n[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[n[0].id]=n[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(A.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let r in e)for(let i of r.split(" "))t[i]=e[r];return r=>{for(let i=r.prop(A.group),n=-1;n<(i?i.length:0);n++){let s=t[n<0?r.name:i[n]];if(s)return s}}}}W.none=new W("",Object.create(null),0,8);class je{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let t=[];for(let r of this.types){let i=null;for(let n of e){let s=n(r);if(s){i||(i=Object.assign({},r.props));let o=s[1],a=s[0];a.combine&&a.id in i&&(o=a.combine(i[a.id],o)),i[a.id]=o}}t.push(i?new W(r.name,i,r.id,r.flags):r)}return new je(t)}}const he=new WeakMap,Ne=new WeakMap;var v;(function(l){l[l.ExcludeBuffers=1]="ExcludeBuffers",l[l.IncludeAnonymous=2]="IncludeAnonymous",l[l.IgnoreMounts=4]="IgnoreMounts",l[l.IgnoreOverlays=8]="IgnoreOverlays",l[l.EnterBracketed=16]="EnterBracketed"})(v||(v={}));class R{constructor(e,t,r,i,n){if(this.type=e,this.children=t,this.positions=r,this.length=i,this.props=null,n&&n.length){this.props=Object.create(null);for(let[s,o]of n)this.props[typeof s=="number"?s:s.id]=o}}toString(){let e=re.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let r of this.children){let i=r.toString();i&&(t&&(t+=","),t+=i)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":""):t}cursor(e=0){return new ge(this.topNode,e)}cursorAt(e,t=0,r=0){let i=he.get(this)||this.topNode,n=new ge(i);return n.moveTo(e,t),he.set(this,n._tree),n}get topNode(){return new T(this,0,0,null)}resolve(e,t=0){let r=se(he.get(this)||this.topNode,e,t,!1);return he.set(this,r),r}resolveInner(e,t=0){let r=se(Ne.get(this)||this.topNode,e,t,!0);return Ne.set(this,r),r}resolveStack(e,t=0){return $e(this,e,t)}iterate(e){let{enter:t,leave:r,from:i=0,to:n=this.length}=e,s=e.mode||0,o=(s&v.IncludeAnonymous)>0;for(let a=this.cursor(s|v.IncludeAnonymous);;){let u=!1;if(a.from<=n&&a.to>=i&&(!o&&a.type.isAnonymous||t(a)!==!1)){if(a.firstChild())continue;u=!0}for(;u&&r&&(o||!a.type.isAnonymous)&&r(a),!a.nextSibling();){if(!a.parent())return;u=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:Ae(W.none,this.children,this.positions,0,this.children.length,0,this.length,(t,r,i)=>new R(this.type,t,r,i,this.propValues),e.makeTree||((t,r,i)=>new R(W.none,t,r,i)))}static build(e){return Ge(e)}}R.empty=new R(W.none,[],[],0);class ke{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new ke(this.buffer,this.index)}}class X{constructor(e,t,r){this.buffer=e,this.length=t,this.set=r}get type(){return W.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(",")}childString(e){let t=this.buffer[e],r=this.buffer[e+3],i=this.set.types[t],n=i.name;if(/\W/.test(n)&&!i.isError&&(n=JSON.stringify(n)),e+=4,r==e)return n;let s=[];for(;e<r;)s.push(this.childString(e)),e=this.buffer[e+3];return n+"("+s.join(",")+")"}findChild(e,t,r,i,n){let{buffer:s}=this,o=-1;for(let a=e;a!=t&&!(Fe(n,i,s[a+1],s[a+2])&&(o=a,r>0));a=s[a+3]);return o}slice(e,t,r){let i=this.buffer,n=new Uint16Array(t-e),s=0;for(let o=e,a=0;o<t;){n[a++]=i[o++],n[a++]=i[o++]-r;let u=n[a++]=i[o++]-r;n[a++]=i[o++]-e,s=Math.max(s,u)}return new X(n,s,this.set)}}function Fe(l,e,t,r){switch(l){case-2:return t<e;case-1:return r>=e&&t<e;case 0:return t<e&&r>e;case 1:return t<=e&&r>e;case 2:return r>e;case 4:return!0}}function se(l,e,t,r){for(var i;l.from==l.to||(t<1?l.from>=e:l.from>e)||(t>-1?l.to<=e:l.to<e);){let s=!r&&l instanceof T&&l.index<0?null:l.parent;if(!s)return l;l=s}let n=r?0:v.IgnoreOverlays;if(r)for(let s=l,o=s.parent;o;s=o,o=s.parent)s instanceof T&&s.index<0&&((i=o.enter(e,t,n))===null||i===void 0?void 0:i.from)!=s.from&&(l=o);for(;;){let s=l.enter(e,t,n);if(!s)return l;l=s}}class De{cursor(e=0){return new ge(this,e)}getChild(e,t=null,r=null){let i=_e(this,e,t,r);return i.length?i[0]:null}getChildren(e,t=null,r=null){return _e(this,e,t,r)}resolve(e,t=0){return se(this,e,t,!1)}resolveInner(e,t=0){return se(this,e,t,!0)}matchContext(e){return be(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),r=this;for(;t;){let i=t.lastChild;if(!i||i.to!=t.to)break;i.type.isError&&i.from==i.to?(r=t,t=i.prevSibling):t=i}return r}get node(){return this}get next(){return this.parent}}class T extends De{constructor(e,t,r,i){super(),this._tree=e,this.from=t,this.index=r,this._parent=i}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,t,r,i,n=0){for(let s=this;;){for(let{children:o,positions:a}=s._tree,u=t>0?o.length:-1;e!=u;e+=t){let h=o[e],p=a[e]+s.from,c;if(!(!(n&v.EnterBracketed&&h instanceof R&&(c=re.get(h))&&!c.overlay&&c.bracketed&&r>=p&&r<=p+h.length)&&!Fe(i,r,p,p+h.length))){if(h instanceof X){if(n&v.ExcludeBuffers)continue;let y=h.findChild(0,h.buffer.length,t,r-p,i);if(y>-1)return new K(new Ke(s,h,e,p),null,y)}else if(n&v.IncludeAnonymous||!h.type.isAnonymous||ve(h)){let y;if(!(n&v.IgnoreMounts)&&(y=re.get(h))&&!y.overlay)return new T(y.tree,p,e,s);let w=new T(h,p,e,s);return n&v.IncludeAnonymous||!w.type.isAnonymous?w:w.nextChild(t<0?h.children.length-1:0,t,r,i,n)}}}if(n&v.IncludeAnonymous||!s.type.isAnonymous||(s.index>=0?e=s.index+t:e=t<0?-1:s._parent._tree.children.length,s=s._parent,!s))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}prop(e){return this._tree.prop(e)}enter(e,t,r=0){let i;if(!(r&v.IgnoreOverlays)&&(i=re.get(this._tree))&&i.overlay){let n=e-this.from,s=r&v.EnterBracketed&&i.bracketed;for(let{from:o,to:a}of i.overlay)if((t>0||s?o<=n:o<n)&&(t<0||s?a>=n:a>n))return new T(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function _e(l,e,t,r){let i=l.cursor(),n=[];if(!i.firstChild())return n;if(t!=null){for(let s=!1;!s;)if(s=i.type.is(t),!i.nextSibling())return n}for(;;){if(r!=null&&i.type.is(r))return n;if(i.type.is(e)&&n.push(i.node),!i.nextSibling())return r==null?n:[]}}function be(l,e,t=e.length-1){for(let r=l;t>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[t]&&e[t]!=r.name)return!1;t--}}return!0}class Ke{constructor(e,t,r,i){this.parent=e,this.buffer=t,this.index=r,this.start=i}}class K extends De{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,r){super(),this.context=e,this._parent=t,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,t,r){let{buffer:i}=this.context,n=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.context.start,r);return n<0?null:new K(this.context,this,n)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}prop(e){return this.type.prop(e)}enter(e,t,r=0){if(r&v.ExcludeBuffers)return null;let{buffer:i}=this.context,n=i.findChild(this.index+4,i.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return n<0?null:new K(this.context,this,n)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new K(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new K(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:r}=this.context,i=this.index+4,n=r.buffer[this.index+3];if(n>i){let s=r.buffer[this.index+1];e.push(r.slice(i,n,s)),t.push(0)}return new R(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function Le(l){if(!l.length)return null;let e=0,t=l[0];for(let n=1;n<l.length;n++){let s=l[n];(s.from>t.from||s.to<t.to)&&(t=s,e=n)}let r=t instanceof T&&t.index<0?null:t.parent,i=l.slice();return r?i[e]=r:i.splice(e,1),new Ve(i,t)}class Ve{constructor(e,t){this.heads=e,this.node=t}get next(){return Le(this.heads)}}function $e(l,e,t){let r=l.resolveInner(e,t),i=null;for(let n=r instanceof T?r:r.context.parent;n;n=n.parent)if(n.index<0){let s=n.parent;(i||(i=[r])).push(s.resolve(e,t)),n=s}else{let s=re.get(n.tree);if(s&&s.overlay&&s.overlay[0].from<=e&&s.overlay[s.overlay.length-1].to>=e){let o=new T(s.tree,s.overlay[0].from+n.from,-1,n);(i||(i=[r])).push(se(o,e,t,!1))}}return i?Le(i):r}class ge{get name(){return this.type.name}constructor(e,t=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=t&~v.EnterBracketed,e instanceof T)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let r=e._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:r,buffer:i}=this.buffer;return this.type=t||i.set.types[i.buffer[e]],this.from=r+i.buffer[e+1],this.to=r+i.buffer[e+2],!0}yield(e){return e?e instanceof T?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,r,this.mode));let{buffer:i}=this.buffer,n=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.buffer.start,r);return n<0?!1:(this.stack.push(this.index),this.yieldBuf(n))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,r=this.mode){return this.buffer?r&v.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&v.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&v.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,r=this.stack.length-1;if(e<0){let i=r<0?0:this.stack[r]+4;if(this.index!=i)return this.yieldBuf(t.findChild(i,this.index,-1,0,4))}else{let i=t.buffer[this.index+3];if(i<(r<0?t.buffer.length:t.buffer[this.stack[r]+3]))return this.yieldBuf(i)}return r<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,r,{buffer:i}=this;if(i){if(e>0){if(this.index<i.buffer.buffer.length)return!1}else for(let n=0;n<this.index;n++)if(i.buffer.buffer[n+3]<this.index)return!1;({index:t,parent:r}=i)}else({index:t,_parent:r}=this._tree);for(;r;{index:t,_parent:r}=r)if(t>-1)for(let n=t+e,s=e<0?-1:r._tree.children.length;n!=s;n+=e){let o=r._tree.children[n];if(this.mode&v.IncludeAnonymous||o instanceof X||!o.type.isAnonymous||ve(o))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,r=0;if(e&&e.context==this.buffer)e:for(let i=this.index,n=this.stack.length;n>=0;){for(let s=e;s;s=s._parent)if(s.index==i){if(i==this.index)return s;t=s,r=n+1;break e}i=this.stack[--n]}for(let i=r;i<this.stack.length;i++)t=new K(this.buffer,t,this.stack[i]);return this.bufferNode=new K(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let r=0;;){let i=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){r++;continue}this.type.isAnonymous||(i=!0)}for(;;){if(i&&t&&t(this),i=this.type.isAnonymous,!r)return;if(this.nextSibling())break;this.parent(),r--,i=!0}}}matchContext(e){if(!this.buffer)return be(this.node.parent,e);let{buffer:t}=this.buffer,{types:r}=t.set;for(let i=e.length-1,n=this.stack.length-1;i>=0;n--){if(n<0)return be(this._tree,e,i);let s=r[t.buffer[this.stack[n]]];if(!s.isAnonymous){if(e[i]&&e[i]!=s.name)return!1;i--}}return!0}}function ve(l){return l.children.some(e=>e instanceof X||!e.type.isAnonymous||ve(e))}function Ge(l){var e;let{buffer:t,nodeSet:r,maxBufferLength:i=1024,reused:n=[],minRepeatType:s=r.types.length}=l,o=Array.isArray(t)?new ke(t,t.length):t,a=r.types,u=0,h=0;function p(x,N,d,B,k,I){let{id:b,start:g,end:C,size:_}=o,O=h,$=u;if(_<0)if(o.next(),_==-1){let V=n[b];d.push(V),B.push(g-x);return}else if(_==-3){u=b;return}else if(_==-4){h=b;return}else throw new RangeError(`Unrecognized record size: ${_}`);let ie=a[b],ae,Y,Se=g-x;if(C-g<=i&&(Y=M(o.pos-N,k))){let V=new Uint16Array(Y.size-Y.skip),D=o.pos-Y.size,H=V.length;for(;o.pos>D;)H=E(Y.start,V,H);ae=new X(V,C-Y.start,r),Se=Y.start-x}else{let V=o.pos-_;o.next();let D=[],H=[],Z=b>=s?b:-1,te=0,fe=C;for(;o.pos>V;)Z>=0&&o.id==Z&&o.size>=0?(o.end<=fe-i&&(w(D,H,g,te,o.end,fe,Z,O,$),te=D.length,fe=o.end),o.next()):I>2500?c(g,V,D,H):p(g,V,D,H,Z,I+1);if(Z>=0&&te>0&&te<D.length&&w(D,H,g,te,g,fe,Z,O,$),D.reverse(),H.reverse(),Z>-1&&te>0){let Ce=y(ie,$);ae=Ae(ie,D,H,0,D.length,0,C-g,Ce,Ce)}else ae=P(ie,D,H,C-g,O-C,$)}d.push(ae),B.push(Se)}function c(x,N,d,B){let k=[],I=0,b=-1;for(;o.pos>N;){let{id:g,start:C,end:_,size:O}=o;if(O>4)o.next();else{if(b>-1&&C<b)break;b<0&&(b=_-i),k.push(g,C,_),I++,o.next()}}if(I){let g=new Uint16Array(I*4),C=k[k.length-2];for(let _=k.length-3,O=0;_>=0;_-=3)g[O++]=k[_],g[O++]=k[_+1]-C,g[O++]=k[_+2]-C,g[O++]=O;d.push(new X(g,k[2]-C,r)),B.push(C-x)}}function y(x,N){return(d,B,k)=>{let I=0,b=d.length-1,g,C;if(b>=0&&(g=d[b])instanceof R){if(!b&&g.type==x&&g.length==k)return g;(C=g.prop(A.lookAhead))&&(I=B[b]+g.length+C)}return P(x,d,B,k,I,N)}}function w(x,N,d,B,k,I,b,g,C){let _=[],O=[];for(;x.length>B;)_.push(x.pop()),O.push(N.pop()+d-k);x.push(P(r.types[b],_,O,I-k,g-I,C)),N.push(k-d)}function P(x,N,d,B,k,I,b){if(I){let g=[A.contextHash,I];b=b?[g].concat(b):[g]}if(k>25){let g=[A.lookAhead,k];b=b?[g].concat(b):[g]}return new R(x,N,d,B,b)}function M(x,N){let d=o.fork(),B=0,k=0,I=0,b=d.end-i,g={size:0,start:0,skip:0};e:for(let C=d.pos-x;d.pos>C;){let _=d.size;if(d.id==N&&_>=0){g.size=B,g.start=k,g.skip=I,I+=4,B+=4,d.next();continue}let O=d.pos-_;if(_<0||O<C||d.start<b)break;let $=d.id>=s?4:0,ie=d.start;for(d.next();d.pos>O;){if(d.size<0)if(d.size==-3||d.size==-4)$+=4;else break e;else d.id>=s&&($+=4);d.next()}k=ie,B+=_,I+=$}return(N<0||B==x)&&(g.size=B,g.start=k,g.skip=I),g.size>4?g:void 0}function E(x,N,d){let{id:B,start:k,end:I,size:b}=o;if(o.next(),b>=0&&B<s){let g=d;if(b>4){let C=o.pos-(b-4);for(;o.pos>C;)d=E(x,N,d)}N[--d]=g,N[--d]=I-x,N[--d]=k-x,N[--d]=B}else b==-3?u=B:b==-4&&(h=B);return d}let z=[],S=[];for(;o.pos>0;)p(l.start||0,l.bufferStart||0,z,S,-1,0);let F=(e=l.length)!==null&&e!==void 0?e:z.length?S[0]+z[0].length:0;return new R(a[l.topID],z.reverse(),S.reverse(),F)}const Be=new WeakMap;function de(l,e){if(!l.isAnonymous||e instanceof X||e.type!=l)return 1;let t=Be.get(e);if(t==null){t=1;for(let r of e.children){if(r.type!=l||!(r instanceof R)){t=1;break}t+=de(l,r)}Be.set(e,t)}return t}function Ae(l,e,t,r,i,n,s,o,a){let u=0;for(let w=r;w<i;w++)u+=de(l,e[w]);let h=Math.ceil(u*1.5/8),p=[],c=[];function y(w,P,M,E,z){for(let S=M;S<E;){let F=S,x=P[S],N=de(l,w[S]);for(S++;S<E;S++){let d=de(l,w[S]);if(N+d>=h)break;N+=d}if(S==F+1){if(N>h){let d=w[F];y(d.children,d.positions,0,d.children.length,P[F]+z);continue}p.push(w[F])}else{let d=P[S-1]+w[S-1].length-x;p.push(Ae(l,w,P,F,S,x,d,null,a))}c.push(x+z-n)}}return y(e,t,r,i,0),(o||a)(p,c,s)}class pt{constructor(){this.map=new WeakMap}setBuffer(e,t,r){let i=this.map.get(e);i||this.map.set(e,i=new Map),i.set(t,r)}getBuffer(e,t){let r=this.map.get(e);return r&&r.get(t)}set(e,t){e instanceof K?this.setBuffer(e.context.buffer,e.index,t):e instanceof T&&this.map.set(e.tree,t)}get(e){return e instanceof K?this.getBuffer(e.context.buffer,e.index):e instanceof T?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class le{constructor(e,t,r,i,n=!1,s=!1){this.from=e,this.to=t,this.tree=r,this.offset=i,this.open=(n?1:0)|(s?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],r=!1){let i=[new le(0,e.length,e,0,!1,r)];for(let n of t)n.to>e.length&&i.push(n);return i}static applyChanges(e,t,r=128){if(!t.length)return e;let i=[],n=1,s=e.length?e[0]:null;for(let o=0,a=0,u=0;;o++){let h=o<t.length?t[o]:null,p=h?h.fromA:1e9;if(p-a>=r)for(;s&&s.from<p;){let c=s;if(a>=c.from||p<=c.to||u){let y=Math.max(c.from,a)-u,w=Math.min(c.to,p)-u;c=y>=w?null:new le(y,w,c.tree,c.offset+u,o>0,!!h)}if(c&&i.push(c),s.to>p)break;s=n<e.length?e[n++]:null}if(!h)break;a=h.toA,u=h.toA-h.toB}return i}}class ct{startParse(e,t,r){return typeof e=="string"&&(e=new Qe(e)),r=r?r.length?r.map(i=>new L(i.from,i.to)):[new L(0,0)]:[new L(0,e.length)],this.createParse(e,t||[],r)}parse(e,t,r){let i=this.startParse(e,t,r);for(;;){let n=i.advance();if(n)return n}}}class Qe{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}function dt(l){return(e,t,r,i)=>new Ye(e,l,t,r,i)}class Ie{constructor(e,t,r,i,n,s){this.parser=e,this.parse=t,this.overlay=r,this.bracketed=i,this.target=n,this.from=s}}function Pe(l){if(!l.length||l.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(l))}class Xe{constructor(e,t,r,i,n,s,o,a){this.parser=e,this.predicate=t,this.mounts=r,this.index=i,this.start=n,this.bracketed=s,this.target=o,this.prev=a,this.depth=0,this.ranges=[]}}const xe=new A({perNode:!0});class Ye{constructor(e,t,r,i,n){this.nest=t,this.input=r,this.fragments=i,this.ranges=n,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let r=this.baseParse.advance();if(!r)return null;if(this.baseParse=null,this.baseTree=r,this.startInner(),this.stoppedAt!=null)for(let i of this.inner)i.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let r=this.baseTree;return this.stoppedAt!=null&&(r=new R(r.type,r.children,r.positions,r.length,r.propValues.concat([[xe,this.stoppedAt]]))),r}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let r=Object.assign(Object.create(null),e.target.props);r[A.mounted.id]=new re(t,e.overlay,e.parser,e.bracketed),e.target.props=r}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].from<e&&(e=Math.min(e,this.inner[t].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].parse.stopAt(e)}startInner(){let e=new tt(this.fragments),t=null,r=null,i=new ge(new T(this.baseTree,this.ranges[0].from,0,null),v.IncludeAnonymous|v.IgnoreMounts);e:for(let n,s;;){let o=!0,a;if(this.stoppedAt!=null&&i.from>=this.stoppedAt)o=!1;else if(e.hasNode(i)){if(t){let u=t.mounts.find(h=>h.frag.from<=i.from&&h.frag.to>=i.to&&h.mount.overlay);if(u)for(let h of u.mount.overlay){let p=h.from+u.pos,c=h.to+u.pos;p>=i.from&&c<=i.to&&!t.ranges.some(y=>y.from<c&&y.to>p)&&t.ranges.push({from:p,to:c})}}o=!1}else if(r&&(s=Ze(r.ranges,i.from,i.to)))o=s!=2;else if(!i.type.isAnonymous&&(n=this.nest(i,this.input))&&(i.from<i.to||!n.overlay)){i.tree||(et(i),t&&t.depth++,r&&r.depth++);let u=e.findMounts(i.from,n.parser);if(typeof n.overlay=="function")t=new Xe(n.parser,n.overlay,u,this.inner.length,i.from,!!n.bracketed,i.tree,t);else{let h=Ee(this.ranges,n.overlay||(i.from<i.to?[new L(i.from,i.to)]:[]));h.length&&Pe(h),(h.length||!n.overlay)&&this.inner.push(new Ie(n.parser,h.length?n.parser.startParse(this.input,Oe(u,h),h):n.parser.startParse(""),n.overlay?n.overlay.map(p=>new L(p.from-i.from,p.to-i.from)):null,!!n.bracketed,i.tree,h.length?h[0].from:i.from)),n.overlay?h.length&&(r={ranges:h,depth:0,prev:r}):o=!1}}else if(t&&(a=t.predicate(i))&&(a===!0&&(a=new L(i.from,i.to)),a.from<a.to)){let u=t.ranges.length-1;u>=0&&t.ranges[u].to==a.from?t.ranges[u]={from:t.ranges[u].from,to:a.to}:t.ranges.push(a)}if(o&&i.firstChild())t&&t.depth++,r&&r.depth++;else for(;!i.nextSibling();){if(!i.parent())break e;if(t&&!--t.depth){let u=Ee(this.ranges,t.ranges);u.length&&(Pe(u),this.inner.splice(t.index,0,new Ie(t.parser,t.parser.startParse(this.input,Oe(t.mounts,u),u),t.ranges.map(h=>new L(h.from-t.start,h.to-t.start)),t.bracketed,t.target,u[0].from))),t=t.prev}r&&!--r.depth&&(r=r.prev)}}}}function Ze(l,e,t){for(let r of l){if(r.from>=t)break;if(r.to>e)return r.from<=e&&r.to>=t?2:1}return 0}function Me(l,e,t,r,i,n){if(e<t){let s=l.buffer[e+1];r.push(l.slice(e,t,s)),i.push(s-n)}}function et(l){let{node:e}=l,t=[],r=e.context.buffer;do t.push(l.index),l.parent();while(!l.tree);let i=l.tree,n=i.children.indexOf(r),s=i.children[n],o=s.buffer,a=[n];function u(h,p,c,y,w,P){let M=t[P],E=[],z=[];Me(s,h,M,E,z,y);let S=o[M+1],F=o[M+2];a.push(E.length);let x=P?u(M+4,o[M+3],s.set.types[o[M]],S,F-S,P-1):e.toTree();return E.push(x),z.push(S-y),Me(s,o[M+3],p,E,z,y),new R(c,E,z,w)}i.children[n]=u(0,o.length,W.none,0,s.length,t.length-1);for(let h of a){let p=l.tree.children[h],c=l.tree.positions[h];l.yield(new T(p,c+l.from,h,l._tree))}}class ze{constructor(e,t){this.offset=t,this.done=!1,this.cursor=e.cursor(v.IncludeAnonymous|v.IgnoreMounts)}moveTo(e){let{cursor:t}=this,r=e-this.offset;for(;!this.done&&t.from<r;)t.to>=e&&t.enter(r,1,v.IgnoreOverlays|v.ExcludeBuffers)||t.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(t.children.length&&t.positions[0]==0&&t.children[0]instanceof R)t=t.children[0];else break}return!1}}class tt{constructor(e){var t;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let r=this.curFrag=e[0];this.curTo=(t=r.tree.prop(xe))!==null&&t!==void 0?t:r.to,this.inner=new ze(r.tree,-r.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let t=this.curFrag=this.fragments[this.fragI];this.curTo=(e=t.tree.prop(xe))!==null&&e!==void 0?e:t.to,this.inner=new ze(t.tree,-t.offset)}}findMounts(e,t){var r;let i=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let n=this.inner.cursor.node;n;n=n.parent){let s=(r=n.tree)===null||r===void 0?void 0:r.prop(A.mounted);if(s&&s.parser==t)for(let o=this.fragI;o<this.fragments.length;o++){let a=this.fragments[o];if(a.from>=n.to)break;a.tree==this.curFrag.tree&&i.push({frag:a,pos:n.from-a.offset,mount:s})}}}return i}}function Ee(l,e){let t=null,r=e;for(let i=1,n=0;i<l.length;i++){let s=l[i-1].to,o=l[i].from;for(;n<r.length;n++){let a=r[n];if(a.from>=o)break;a.to<=s||(t||(r=t=e.slice()),a.from<s?(t[n]=new L(a.from,s),a.to>o&&t.splice(n+1,0,new L(o,a.to))):a.to>o?t[n--]=new L(o,a.to):t.splice(n--,1))}}return r}function rt(l,e,t,r){let i=0,n=0,s=!1,o=!1,a=-1e9,u=[];for(;;){let h=i==l.length?1e9:s?l[i].to:l[i].from,p=n==e.length?1e9:o?e[n].to:e[n].from;if(s!=o){let c=Math.max(a,t),y=Math.min(h,p,r);c<y&&u.push(new L(c,y))}if(a=Math.min(h,p),a==1e9)break;h==a&&(s?(s=!1,i++):s=!0),p==a&&(o?(o=!1,n++):o=!0)}return u}function Oe(l,e){let t=[];for(let{pos:r,mount:i,frag:n}of l){let s=r+(i.overlay?i.overlay[0].from:0),o=s+i.tree.length,a=Math.max(n.from,s),u=Math.min(n.to,o);if(i.overlay){let h=i.overlay.map(c=>new L(c.from+r,c.to+r)),p=rt(e,h,a,u);for(let c=0,y=a;;c++){let w=c==p.length,P=w?u:p[c].from;if(P>y&&t.push(new le(y,P,i.tree,-s,n.from>=y||n.openStart,n.to<=P||n.openEnd)),w)break;y=p[c].to}}else t.push(new le(a,u,i.tree,-s,n.from>=s||n.openStart,n.to<=o||n.openEnd))}return t}let it=0;class j{constructor(e,t,r,i){this.name=e,this.set=t,this.base=r,this.modified=i,this.id=it++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){let r=typeof e=="string"?e:"?";if(e instanceof j&&(t=e),t?.base)throw new Error("Can not derive from a modified tag");let i=new j(r,[],null,[]);if(i.set.push(i),t)for(let n of t.set)i.set.push(n);return i}static defineModifier(e){let t=new me(e);return r=>r.modified.indexOf(t)>-1?r:me.get(r.base||r,r.modified.concat(t).sort((i,n)=>i.id-n.id))}}let nt=0;class me{constructor(e){this.name=e,this.instances=[],this.id=nt++}static get(e,t){if(!t.length)return e;let r=t[0].instances.find(o=>o.base==e&&st(t,o.modified));if(r)return r;let i=[],n=new j(e.name,i,e,t);for(let o of t)o.instances.push(n);let s=lt(t);for(let o of e.set)if(!o.modified.length)for(let a of s)i.push(me.get(o,a));return n}}function st(l,e){return l.length==e.length&&l.every((t,r)=>t==e[r])}function lt(l){let e=[[]];for(let t=0;t<l.length;t++)for(let r=0,i=e.length;r<i;r++)e.push(e[r].concat(l[t]));return e.sort((t,r)=>r.length-t.length)}function ot(l){let e=Object.create(null);for(let t in l){let r=l[t];Array.isArray(r)||(r=[r]);for(let i of t.split(" "))if(i){let n=[],s=2,o=i;for(let p=0;;){if(o=="..."&&p>0&&p+3==i.length){s=1;break}let c=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(o);if(!c)throw new RangeError("Invalid path: "+i);if(n.push(c[0]=="*"?"":c[0][0]=='"'?JSON.parse(c[0]):c[0]),p+=c[0].length,p==i.length)break;let y=i[p++];if(p==i.length&&y=="!"){s=0;break}if(y!="/")throw new RangeError("Invalid path: "+i);o=i.slice(p)}let a=n.length-1,u=n[a];if(!u)throw new RangeError("Invalid path: "+i);let h=new oe(r,s,a>0?n.slice(0,a):null);e[u]=h.sort(e[u])}}return We.add(e)}const We=new A({combine(l,e){let t,r,i;for(;l||e;){if(!l||e&&l.depth>=e.depth?(i=e,e=e.next):(i=l,l=l.next),t&&t.mode==i.mode&&!i.context&&!t.context)continue;let n=new oe(i.tags,i.mode,i.context);t?t.next=n:r=n,t=n}return r}});class oe{constructor(e,t,r,i){this.tags=e,this.mode=t,this.context=r,this.next=i}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}oe.empty=new oe([],2,null);function He(l,e){let t=Object.create(null);for(let n of l)if(!Array.isArray(n.tag))t[n.tag.id]=n.class;else for(let s of n.tag)t[s.id]=n.class;let{scope:r,all:i=null}=e||{};return{style:n=>{let s=i;for(let o of n)for(let a of o.set){let u=t[a.id];if(u){s=s?s+" "+u:u;break}}return s},scope:r}}function at(l,e){let t=null;for(let r of l){let i=r.style(e);i&&(t=t?t+" "+i:i)}return t}function ft(l,e,t,r=0,i=l.length){let n=new ht(r,Array.isArray(e)?e:[e],t);n.highlightRange(l.cursor(),r,i,"",n.highlighters),n.flush(i)}class ht{constructor(e,t,r){this.at=e,this.highlighters=t,this.span=r,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,r,i,n){let{type:s,from:o,to:a}=e;if(o>=r||a<=t)return;s.isTop&&(n=this.highlighters.filter(y=>!y.scope||y.scope(s)));let u=i,h=Ue(e)||oe.empty,p=at(n,h.tags);if(p&&(u&&(u+=" "),u+=p,h.mode==1&&(i+=(i?" ":"")+p)),this.startSpan(Math.max(t,o),u),h.opaque)return;let c=e.tree&&e.tree.prop(A.mounted);if(c&&c.overlay){let y=e.node.enter(c.overlay[0].from+o,1),w=this.highlighters.filter(M=>!M.scope||M.scope(c.tree.type)),P=e.firstChild();for(let M=0,E=o;;M++){let z=M<c.overlay.length?c.overlay[M]:null,S=z?z.from+o:a,F=Math.max(t,E),x=Math.min(r,S);if(F<x&&P)for(;e.from<x&&(this.highlightRange(e,F,x,i,n),this.startSpan(Math.min(x,e.to),u),!(e.to>=S||!e.nextSibling())););if(!z||S>r)break;E=z.to+o,E>t&&(this.highlightRange(y.cursor(),Math.max(t,z.from+o),Math.min(r,E),"",w),this.startSpan(Math.min(r,E),u))}P&&e.parent()}else if(e.firstChild()){c&&(i="");do if(!(e.to<=t)){if(e.from>=r)break;this.highlightRange(e,t,r,i,n),this.startSpan(Math.min(r,e.to),u)}while(e.nextSibling());e.parent()}}}function Ue(l){let e=l.type.prop(We);for(;e&&e.context&&!l.matchContext(e.context);)e=e.next;return e||null}const f=j.define,ue=f(),G=f(),Te=f(G),Re=f(G),Q=f(),pe=f(Q),ye=f(Q),J=f(),ee=f(J),U=f(),q=f(),we=f(),ne=f(we),ce=f(),m={comment:ue,lineComment:f(ue),blockComment:f(ue),docComment:f(ue),name:G,variableName:f(G),typeName:Te,tagName:f(Te),propertyName:Re,attributeName:f(Re),className:f(G),labelName:f(G),namespace:f(G),macroName:f(G),literal:Q,string:pe,docString:f(pe),character:f(pe),attributeValue:f(pe),number:ye,integer:f(ye),float:f(ye),bool:f(Q),regexp:f(Q),escape:f(Q),color:f(Q),url:f(Q),keyword:U,self:f(U),null:f(U),atom:f(U),unit:f(U),modifier:f(U),operatorKeyword:f(U),controlKeyword:f(U),definitionKeyword:f(U),moduleKeyword:f(U),operator:q,derefOperator:f(q),arithmeticOperator:f(q),logicOperator:f(q),bitwiseOperator:f(q),compareOperator:f(q),updateOperator:f(q),definitionOperator:f(q),typeOperator:f(q),controlOperator:f(q),punctuation:we,separator:f(we),bracket:ne,angleBracket:f(ne),squareBracket:f(ne),paren:f(ne),brace:f(ne),content:J,heading:ee,heading1:f(ee),heading2:f(ee),heading3:f(ee),heading4:f(ee),heading5:f(ee),heading6:f(ee),contentSeparator:f(J),list:f(J),quote:f(J),emphasis:f(J),strong:f(J),link:f(J),monospace:f(J),strikethrough:f(J),inserted:f(),deleted:f(),changed:f(),invalid:f(),meta:ce,documentMeta:f(ce),annotation:f(ce),processingInstruction:f(ce),definition:j.defineModifier("definition"),constant:j.defineModifier("constant"),function:j.defineModifier("function"),standard:j.defineModifier("standard"),local:j.defineModifier("local"),special:j.defineModifier("special")};for(let l in m){let e=m[l];e instanceof j&&(e.name=l)}He([{tag:m.link,class:"tok-link"},{tag:m.heading,class:"tok-heading"},{tag:m.emphasis,class:"tok-emphasis"},{tag:m.strong,class:"tok-strong"},{tag:m.keyword,class:"tok-keyword"},{tag:m.atom,class:"tok-atom"},{tag:m.bool,class:"tok-bool"},{tag:m.url,class:"tok-url"},{tag:m.labelName,class:"tok-labelName"},{tag:m.inserted,class:"tok-inserted"},{tag:m.deleted,class:"tok-deleted"},{tag:m.literal,class:"tok-literal"},{tag:m.string,class:"tok-string"},{tag:m.number,class:"tok-number"},{tag:[m.regexp,m.escape,m.special(m.string)],class:"tok-string2"},{tag:m.variableName,class:"tok-variableName"},{tag:m.local(m.variableName),class:"tok-variableName tok-local"},{tag:m.definition(m.variableName),class:"tok-variableName tok-definition"},{tag:m.special(m.variableName),class:"tok-variableName2"},{tag:m.definition(m.propertyName),class:"tok-propertyName tok-definition"},{tag:m.typeName,class:"tok-typeName"},{tag:m.namespace,class:"tok-namespace"},{tag:m.className,class:"tok-className"},{tag:m.macroName,class:"tok-macroName"},{tag:m.propertyName,class:"tok-propertyName"},{tag:m.operator,class:"tok-operator"},{tag:m.comment,class:"tok-comment"},{tag:m.meta,class:"tok-meta"},{tag:m.invalid,class:"tok-invalid"},{tag:m.punctuation,class:"tok-punctuation"}]);const gt=Object.freeze(Object.defineProperty({__proto__:null,Tag:j,getStyleTags:Ue,highlightTree:ft,styleTags:ot,tagHighlighter:He,tags:m},Symbol.toStringTag,{value:"Module"}));export{ut as D,v as I,A as N,ct as P,R as T,le as a,W as b,m as c,j as d,je as e,pt as f,ft as h,gt as i,dt as p,ot as s,He as t};
1
+ const ct=1024;let Je=0;class H{constructor(e,t){this.from=e,this.to=t}}class A{constructor(e={}){this.id=Je++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")}),this.combine=e.combine||null}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=L.match(e)),t=>{let r=e(t);return r===void 0?null:[this,r]}}}A.closedBy=new A({deserialize:l=>l.split(" ")});A.openedBy=new A({deserialize:l=>l.split(" ")});A.group=new A({deserialize:l=>l.split(" ")});A.isolate=new A({deserialize:l=>{if(l&&l!="rtl"&&l!="ltr"&&l!="auto")throw new RangeError("Invalid value for isolate: "+l);return l||"auto"}});A.contextHash=new A({perNode:!0});A.lookAhead=new A({perNode:!0});A.mounted=new A({perNode:!0});class re{constructor(e,t,r,i=!1){this.tree=e,this.overlay=t,this.parser=r,this.bracketed=i}static get(e){return e&&e.props&&e.props[A.mounted.id]}}const Ke=Object.create(null);class L{constructor(e,t,r,i=0){this.name=e,this.props=t,this.id=r,this.flags=i}static define(e){let t=e.props&&e.props.length?Object.create(null):Ke,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new L(e.name||"",t,e.id,r);if(e.props){for(let n of e.props)if(Array.isArray(n)||(n=n(i)),n){if(n[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[n[0].id]=n[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(A.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let r in e)for(let i of r.split(" "))t[i]=e[r];return r=>{for(let i=r.prop(A.group),n=-1;n<(i?i.length:0);n++){let s=t[n<0?r.name:i[n]];if(s)return s}}}}L.none=new L("",Object.create(null),0,8);class je{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let t=[];for(let r of this.types){let i=null;for(let n of e){let s=n(r);if(s){i||(i=Object.assign({},r.props));let o=s[1],a=s[0];a.combine&&a.id in i&&(o=a.combine(i[a.id],o)),i[a.id]=o}}t.push(i?new L(r.name,i,r.id,r.flags):r)}return new je(t)}}const he=new WeakMap,Ne=new WeakMap;var v;(function(l){l[l.ExcludeBuffers=1]="ExcludeBuffers",l[l.IncludeAnonymous=2]="IncludeAnonymous",l[l.IgnoreMounts=4]="IgnoreMounts",l[l.IgnoreOverlays=8]="IgnoreOverlays",l[l.EnterBracketed=16]="EnterBracketed"})(v||(v={}));class R{constructor(e,t,r,i,n){if(this.type=e,this.children=t,this.positions=r,this.length=i,this.props=null,n&&n.length){this.props=Object.create(null);for(let[s,o]of n)this.props[typeof s=="number"?s:s.id]=o}}toString(){let e=re.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let r of this.children){let i=r.toString();i&&(t&&(t+=","),t+=i)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":""):t}cursor(e=0){return new ge(this.topNode,e)}cursorAt(e,t=0,r=0){let i=he.get(this)||this.topNode,n=new ge(i);return n.moveTo(e,t),he.set(this,n._tree),n}get topNode(){return new T(this,0,0,null)}resolve(e,t=0){let r=se(he.get(this)||this.topNode,e,t,!1);return he.set(this,r),r}resolveInner(e,t=0){let r=se(Ne.get(this)||this.topNode,e,t,!0);return Ne.set(this,r),r}resolveStack(e,t=0){return Ge(this,e,t)}iterate(e){let{enter:t,leave:r,from:i=0,to:n=this.length}=e,s=e.mode||0,o=(s&v.IncludeAnonymous)>0;for(let a=this.cursor(s|v.IncludeAnonymous);;){let h=!1;if(a.from<=n&&a.to>=i&&(!o&&a.type.isAnonymous||t(a)!==!1)){if(a.firstChild())continue;h=!0}for(;h&&r&&(o||!a.type.isAnonymous)&&r(a),!a.nextSibling();){if(!a.parent())return;h=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:Ae(L.none,this.children,this.positions,0,this.children.length,0,this.length,(t,r,i)=>new R(this.type,t,r,i,this.propValues),e.makeTree||((t,r,i)=>new R(L.none,t,r,i)))}static build(e){return Qe(e)}}R.empty=new R(L.none,[],[],0);class ke{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new ke(this.buffer,this.index)}}class X{constructor(e,t,r){this.buffer=e,this.length=t,this.set=r}get type(){return L.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(",")}childString(e){let t=this.buffer[e],r=this.buffer[e+3],i=this.set.types[t],n=i.name;if(/\W/.test(n)&&!i.isError&&(n=JSON.stringify(n)),e+=4,r==e)return n;let s=[];for(;e<r;)s.push(this.childString(e)),e=this.buffer[e+3];return n+"("+s.join(",")+")"}findChild(e,t,r,i,n){let{buffer:s}=this,o=-1;for(let a=e;a!=t&&!(Fe(n,i,s[a+1],s[a+2])&&(o=a,r>0));a=s[a+3]);return o}slice(e,t,r){let i=this.buffer,n=new Uint16Array(t-e),s=0;for(let o=e,a=0;o<t;){n[a++]=i[o++],n[a++]=i[o++]-r;let h=n[a++]=i[o++]-r;n[a++]=i[o++]-e,s=Math.max(s,h)}return new X(n,s,this.set)}}function Fe(l,e,t,r){switch(l){case-2:return t<e;case-1:return r>=e&&t<e;case 0:return t<e&&r>e;case 1:return t<=e&&r>e;case 2:return r>e;case 4:return!0}}function se(l,e,t,r){for(var i;l.from==l.to||(t<1?l.from>=e:l.from>e)||(t>-1?l.to<=e:l.to<e);){let s=!r&&l instanceof T&&l.index<0?null:l.parent;if(!s)return l;l=s}let n=r?0:v.IgnoreOverlays;if(r)for(let s=l,o=s.parent;o;s=o,o=s.parent)s instanceof T&&s.index<0&&((i=o.enter(e,t,n))===null||i===void 0?void 0:i.from)!=s.from&&(l=o);for(;;){let s=l.enter(e,t,n);if(!s)return l;l=s}}class De{cursor(e=0){return new ge(this,e)}getChild(e,t=null,r=null){let i=_e(this,e,t,r);return i.length?i[0]:null}getChildren(e,t=null,r=null){return _e(this,e,t,r)}resolve(e,t=0){return se(this,e,t,!1)}resolveInner(e,t=0){return se(this,e,t,!0)}matchContext(e){return be(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),r=this;for(;t;){let i=t.lastChild;if(!i||i.to!=t.to)break;i.type.isError&&i.from==i.to?(r=t,t=i.prevSibling):t=i}return r}get node(){return this}get next(){return this.parent}}class T extends De{constructor(e,t,r,i){super(),this._tree=e,this.from=t,this.index=r,this._parent=i}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,t,r,i,n=0){for(let s=this;;){for(let{children:o,positions:a}=s._tree,h=t>0?o.length:-1;e!=h;e+=t){let u=o[e],p=a[e]+s.from,c;if(!(!(n&v.EnterBracketed&&u instanceof R&&(c=re.get(u))&&!c.overlay&&c.bracketed&&r>=p&&r<=p+u.length)&&!Fe(i,r,p,p+u.length))){if(u instanceof X){if(n&v.ExcludeBuffers)continue;let m=u.findChild(0,u.buffer.length,t,r-p,i);if(m>-1)return new K(new Ve(s,u,e,p),null,m)}else if(n&v.IncludeAnonymous||!u.type.isAnonymous||ve(u)){let m;if(!(n&v.IgnoreMounts)&&(m=re.get(u))&&!m.overlay)return new T(m.tree,p,e,s);let w=new T(u,p,e,s);return n&v.IncludeAnonymous||!w.type.isAnonymous?w:w.nextChild(t<0?u.children.length-1:0,t,r,i,n)}}}if(n&v.IncludeAnonymous||!s.type.isAnonymous||(s.index>=0?e=s.index+t:e=t<0?-1:s._parent._tree.children.length,s=s._parent,!s))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}prop(e){return this._tree.prop(e)}enter(e,t,r=0){let i;if(!(r&v.IgnoreOverlays)&&(i=re.get(this._tree))&&i.overlay){let n=e-this.from,s=r&v.EnterBracketed&&i.bracketed;for(let{from:o,to:a}of i.overlay)if((t>0||s?o<=n:o<n)&&(t<0||s?a>=n:a>n))return new T(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function _e(l,e,t,r){let i=l.cursor(),n=[];if(!i.firstChild())return n;if(t!=null){for(let s=!1;!s;)if(s=i.type.is(t),!i.nextSibling())return n}for(;;){if(r!=null&&i.type.is(r))return n;if(i.type.is(e)&&n.push(i.node),!i.nextSibling())return r==null?n:[]}}function be(l,e,t=e.length-1){for(let r=l;t>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[t]&&e[t]!=r.name)return!1;t--}}return!0}class Ve{constructor(e,t,r,i){this.parent=e,this.buffer=t,this.index=r,this.start=i}}class K extends De{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,r){super(),this.context=e,this._parent=t,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,t,r){let{buffer:i}=this.context,n=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.context.start,r);return n<0?null:new K(this.context,this,n)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}prop(e){return this.type.prop(e)}enter(e,t,r=0){if(r&v.ExcludeBuffers)return null;let{buffer:i}=this.context,n=i.findChild(this.index+4,i.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return n<0?null:new K(this.context,this,n)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new K(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new K(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:r}=this.context,i=this.index+4,n=r.buffer[this.index+3];if(n>i){let s=r.buffer[this.index+1];e.push(r.slice(i,n,s)),t.push(0)}return new R(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function He(l){if(!l.length)return null;let e=0,t=l[0];for(let n=1;n<l.length;n++){let s=l[n];(s.from>t.from||s.to<t.to)&&(t=s,e=n)}let r=t instanceof T&&t.index<0?null:t.parent,i=l.slice();return r?i[e]=r:i.splice(e,1),new $e(i,t)}class $e{constructor(e,t){this.heads=e,this.node=t}get next(){return He(this.heads)}}function Ge(l,e,t){let r=l.resolveInner(e,t),i=null;for(let n=r instanceof T?r:r.context.parent;n;n=n.parent)if(n.index<0){let s=n.parent;(i||(i=[r])).push(s.resolve(e,t)),n=s}else{let s=re.get(n.tree);if(s&&s.overlay&&s.overlay[0].from<=e&&s.overlay[s.overlay.length-1].to>=e){let o=new T(s.tree,s.overlay[0].from+n.from,-1,n);(i||(i=[r])).push(se(o,e,t,!1))}}return i?He(i):r}class ge{get name(){return this.type.name}constructor(e,t=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=t&~v.EnterBracketed,e instanceof T)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let r=e._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:r,buffer:i}=this.buffer;return this.type=t||i.set.types[i.buffer[e]],this.from=r+i.buffer[e+1],this.to=r+i.buffer[e+2],!0}yield(e){return e?e instanceof T?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,r,this.mode));let{buffer:i}=this.buffer,n=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.buffer.start,r);return n<0?!1:(this.stack.push(this.index),this.yieldBuf(n))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,r=this.mode){return this.buffer?r&v.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&v.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&v.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,r=this.stack.length-1;if(e<0){let i=r<0?0:this.stack[r]+4;if(this.index!=i)return this.yieldBuf(t.findChild(i,this.index,-1,0,4))}else{let i=t.buffer[this.index+3];if(i<(r<0?t.buffer.length:t.buffer[this.stack[r]+3]))return this.yieldBuf(i)}return r<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,r,{buffer:i}=this;if(i){if(e>0){if(this.index<i.buffer.buffer.length)return!1}else for(let n=0;n<this.index;n++)if(i.buffer.buffer[n+3]<this.index)return!1;({index:t,parent:r}=i)}else({index:t,_parent:r}=this._tree);for(;r;{index:t,_parent:r}=r)if(t>-1)for(let n=t+e,s=e<0?-1:r._tree.children.length;n!=s;n+=e){let o=r._tree.children[n];if(this.mode&v.IncludeAnonymous||o instanceof X||!o.type.isAnonymous||ve(o))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,r=0;if(e&&e.context==this.buffer)e:for(let i=this.index,n=this.stack.length;n>=0;){for(let s=e;s;s=s._parent)if(s.index==i){if(i==this.index)return s;t=s,r=n+1;break e}i=this.stack[--n]}for(let i=r;i<this.stack.length;i++)t=new K(this.buffer,t,this.stack[i]);return this.bufferNode=new K(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let r=0;;){let i=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){r++;continue}this.type.isAnonymous||(i=!0)}for(;;){if(i&&t&&t(this),i=this.type.isAnonymous,!r)return;if(this.nextSibling())break;this.parent(),r--,i=!0}}}matchContext(e){if(!this.buffer)return be(this.node.parent,e);let{buffer:t}=this.buffer,{types:r}=t.set;for(let i=e.length-1,n=this.stack.length-1;i>=0;n--){if(n<0)return be(this._tree,e,i);let s=r[t.buffer[this.stack[n]]];if(!s.isAnonymous){if(e[i]&&e[i]!=s.name)return!1;i--}}return!0}}function ve(l){return l.children.some(e=>e instanceof X||!e.type.isAnonymous||ve(e))}function Qe(l){var e;let{buffer:t,nodeSet:r,maxBufferLength:i=1024,reused:n=[],minRepeatType:s=r.types.length}=l,o=Array.isArray(t)?new ke(t,t.length):t,a=r.types,h=0,u=0;function p(x,N,d,B,k,I){let{id:b,start:g,end:S,size:_}=o,O=u,$=h;if(_<0)if(o.next(),_==-1){let V=n[b];d.push(V),B.push(g-x);return}else if(_==-3){h=b;return}else if(_==-4){u=b;return}else throw new RangeError(`Unrecognized record size: ${_}`);let ie=a[b],ae,Y,Ce=g-x;if(S-g<=i&&(Y=M(o.pos-N,k))){let V=new Uint16Array(Y.size-Y.skip),D=o.pos-Y.size,W=V.length;for(;o.pos>D;)W=E(Y.start,V,W);ae=new X(V,S-Y.start,r),Ce=Y.start-x}else{let V=o.pos-_;o.next();let D=[],W=[],Z=b>=s?b:-1,te=0,fe=S;for(;o.pos>V;)Z>=0&&o.id==Z&&o.size>=0?(o.end<=fe-i&&(w(D,W,g,te,o.end,fe,Z,O,$),te=D.length,fe=o.end),o.next()):I>2500?c(g,V,D,W):p(g,V,D,W,Z,I+1);if(Z>=0&&te>0&&te<D.length&&w(D,W,g,te,g,fe,Z,O,$),D.reverse(),W.reverse(),Z>-1&&te>0){let Se=m(ie,$);ae=Ae(ie,D,W,0,D.length,0,S-g,Se,Se)}else ae=P(ie,D,W,S-g,O-S,$)}d.push(ae),B.push(Ce)}function c(x,N,d,B){let k=[],I=0,b=-1;for(;o.pos>N;){let{id:g,start:S,end:_,size:O}=o;if(O>4)o.next();else{if(b>-1&&S<b)break;b<0&&(b=_-i),k.push(g,S,_),I++,o.next()}}if(I){let g=new Uint16Array(I*4),S=k[k.length-2];for(let _=k.length-3,O=0;_>=0;_-=3)g[O++]=k[_],g[O++]=k[_+1]-S,g[O++]=k[_+2]-S,g[O++]=O;d.push(new X(g,k[2]-S,r)),B.push(S-x)}}function m(x,N){return(d,B,k)=>{let I=0,b=d.length-1,g,S;if(b>=0&&(g=d[b])instanceof R){if(!b&&g.type==x&&g.length==k)return g;(S=g.prop(A.lookAhead))&&(I=B[b]+g.length+S)}return P(x,d,B,k,I,N)}}function w(x,N,d,B,k,I,b,g,S){let _=[],O=[];for(;x.length>B;)_.push(x.pop()),O.push(N.pop()+d-k);x.push(P(r.types[b],_,O,I-k,g-I,S)),N.push(k-d)}function P(x,N,d,B,k,I,b){if(I){let g=[A.contextHash,I];b=b?[g].concat(b):[g]}if(k>25){let g=[A.lookAhead,k];b=b?[g].concat(b):[g]}return new R(x,N,d,B,b)}function M(x,N){let d=o.fork(),B=0,k=0,I=0,b=d.end-i,g={size:0,start:0,skip:0};e:for(let S=d.pos-x;d.pos>S;){let _=d.size;if(d.id==N&&_>=0){g.size=B,g.start=k,g.skip=I,I+=4,B+=4,d.next();continue}let O=d.pos-_;if(_<0||O<S||d.start<b)break;let $=d.id>=s?4:0,ie=d.start;for(d.next();d.pos>O;){if(d.size<0)if(d.size==-3||d.size==-4)$+=4;else break e;else d.id>=s&&($+=4);d.next()}k=ie,B+=_,I+=$}return(N<0||B==x)&&(g.size=B,g.start=k,g.skip=I),g.size>4?g:void 0}function E(x,N,d){let{id:B,start:k,end:I,size:b}=o;if(o.next(),b>=0&&B<s){let g=d;if(b>4){let S=o.pos-(b-4);for(;o.pos>S;)d=E(x,N,d)}N[--d]=g,N[--d]=I-x,N[--d]=k-x,N[--d]=B}else b==-3?h=B:b==-4&&(u=B);return d}let z=[],C=[];for(;o.pos>0;)p(l.start||0,l.bufferStart||0,z,C,-1,0);let F=(e=l.length)!==null&&e!==void 0?e:z.length?C[0]+z[0].length:0;return new R(a[l.topID],z.reverse(),C.reverse(),F)}const Be=new WeakMap;function de(l,e){if(!l.isAnonymous||e instanceof X||e.type!=l)return 1;let t=Be.get(e);if(t==null){t=1;for(let r of e.children){if(r.type!=l||!(r instanceof R)){t=1;break}t+=de(l,r)}Be.set(e,t)}return t}function Ae(l,e,t,r,i,n,s,o,a){let h=0;for(let w=r;w<i;w++)h+=de(l,e[w]);let u=Math.ceil(h*1.5/8),p=[],c=[];function m(w,P,M,E,z){for(let C=M;C<E;){let F=C,x=P[C],N=de(l,w[C]);for(C++;C<E;C++){let d=de(l,w[C]);if(N+d>=u)break;N+=d}if(C==F+1){if(N>u){let d=w[F];m(d.children,d.positions,0,d.children.length,P[F]+z);continue}p.push(w[F])}else{let d=P[C-1]+w[C-1].length-x;p.push(Ae(l,w,P,F,C,x,d,null,a))}c.push(x+z-n)}}return m(e,t,r,i,0),(o||a)(p,c,s)}class dt{constructor(){this.map=new WeakMap}setBuffer(e,t,r){let i=this.map.get(e);i||this.map.set(e,i=new Map),i.set(t,r)}getBuffer(e,t){let r=this.map.get(e);return r&&r.get(t)}set(e,t){e instanceof K?this.setBuffer(e.context.buffer,e.index,t):e instanceof T&&this.map.set(e.tree,t)}get(e){return e instanceof K?this.getBuffer(e.context.buffer,e.index):e instanceof T?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class le{constructor(e,t,r,i,n=!1,s=!1){this.from=e,this.to=t,this.tree=r,this.offset=i,this.open=(n?1:0)|(s?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],r=!1){let i=[new le(0,e.length,e,0,!1,r)];for(let n of t)n.to>e.length&&i.push(n);return i}static applyChanges(e,t,r=128){if(!t.length)return e;let i=[],n=1,s=e.length?e[0]:null;for(let o=0,a=0,h=0;;o++){let u=o<t.length?t[o]:null,p=u?u.fromA:1e9;if(p-a>=r)for(;s&&s.from<p;){let c=s;if(a>=c.from||p<=c.to||h){let m=Math.max(c.from,a)-h,w=Math.min(c.to,p)-h;c=m>=w?null:new le(m,w,c.tree,c.offset+h,o>0,!!u)}if(c&&i.push(c),s.to>p)break;s=n<e.length?e[n++]:null}if(!u)break;a=u.toA,h=u.toA-u.toB}return i}}class gt{startParse(e,t,r){return typeof e=="string"&&(e=new Xe(e)),r=r?r.length?r.map(i=>new H(i.from,i.to)):[new H(0,0)]:[new H(0,e.length)],this.createParse(e,t||[],r)}parse(e,t,r){let i=this.startParse(e,t,r);for(;;){let n=i.advance();if(n)return n}}}class Xe{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}function mt(l){return(e,t,r,i)=>new Ze(e,l,t,r,i)}class Ie{constructor(e,t,r,i,n,s){this.parser=e,this.parse=t,this.overlay=r,this.bracketed=i,this.target=n,this.from=s}}function Pe(l){if(!l.length||l.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(l))}class Ye{constructor(e,t,r,i,n,s,o,a){this.parser=e,this.predicate=t,this.mounts=r,this.index=i,this.start=n,this.bracketed=s,this.target=o,this.prev=a,this.depth=0,this.ranges=[]}}const xe=new A({perNode:!0});class Ze{constructor(e,t,r,i,n){this.nest=t,this.input=r,this.fragments=i,this.ranges=n,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let r=this.baseParse.advance();if(!r)return null;if(this.baseParse=null,this.baseTree=r,this.startInner(),this.stoppedAt!=null)for(let i of this.inner)i.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let r=this.baseTree;return this.stoppedAt!=null&&(r=new R(r.type,r.children,r.positions,r.length,r.propValues.concat([[xe,this.stoppedAt]]))),r}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let r=Object.assign(Object.create(null),e.target.props);r[A.mounted.id]=new re(t,e.overlay,e.parser,e.bracketed),e.target.props=r}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].from<e&&(e=Math.min(e,this.inner[t].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].parse.stopAt(e)}startInner(){let e=new rt(this.fragments),t=null,r=null,i=new ge(new T(this.baseTree,this.ranges[0].from,0,null),v.IncludeAnonymous|v.IgnoreMounts);e:for(let n,s;;){let o=!0,a;if(this.stoppedAt!=null&&i.from>=this.stoppedAt)o=!1;else if(e.hasNode(i)){if(t){let h=t.mounts.find(u=>u.frag.from<=i.from&&u.frag.to>=i.to&&u.mount.overlay);if(h)for(let u of h.mount.overlay){let p=u.from+h.pos,c=u.to+h.pos;p>=i.from&&c<=i.to&&!t.ranges.some(m=>m.from<c&&m.to>p)&&t.ranges.push({from:p,to:c})}}o=!1}else if(r&&(s=et(r.ranges,i.from,i.to)))o=s!=2;else if(!i.type.isAnonymous&&(n=this.nest(i,this.input))&&(i.from<i.to||!n.overlay)){i.tree||(tt(i),t&&t.depth++,r&&r.depth++);let h=e.findMounts(i.from,n.parser);if(typeof n.overlay=="function")t=new Ye(n.parser,n.overlay,h,this.inner.length,i.from,!!n.bracketed,i.tree,t);else{let u=Ee(this.ranges,n.overlay||(i.from<i.to?[new H(i.from,i.to)]:[]));u.length&&Pe(u),(u.length||!n.overlay)&&this.inner.push(new Ie(n.parser,u.length?n.parser.startParse(this.input,Oe(h,u),u):n.parser.startParse(""),n.overlay?n.overlay.map(p=>new H(p.from-i.from,p.to-i.from)):null,!!n.bracketed,i.tree,u.length?u[0].from:i.from)),n.overlay?u.length&&(r={ranges:u,depth:0,prev:r}):o=!1}}else if(t&&(a=t.predicate(i))&&(a===!0&&(a=new H(i.from,i.to)),a.from<a.to)){let h=t.ranges.length-1;h>=0&&t.ranges[h].to==a.from?t.ranges[h]={from:t.ranges[h].from,to:a.to}:t.ranges.push(a)}if(o&&i.firstChild())t&&t.depth++,r&&r.depth++;else for(;!i.nextSibling();){if(!i.parent())break e;if(t&&!--t.depth){let h=Ee(this.ranges,t.ranges);h.length&&(Pe(h),this.inner.splice(t.index,0,new Ie(t.parser,t.parser.startParse(this.input,Oe(t.mounts,h),h),t.ranges.map(u=>new H(u.from-t.start,u.to-t.start)),t.bracketed,t.target,h[0].from))),t=t.prev}r&&!--r.depth&&(r=r.prev)}}}}function et(l,e,t){for(let r of l){if(r.from>=t)break;if(r.to>e)return r.from<=e&&r.to>=t?2:1}return 0}function Me(l,e,t,r,i,n){if(e<t){let s=l.buffer[e+1];r.push(l.slice(e,t,s)),i.push(s-n)}}function tt(l){let{node:e}=l,t=[],r=e.context.buffer;do t.push(l.index),l.parent();while(!l.tree);let i=l.tree,n=i.children.indexOf(r),s=i.children[n],o=s.buffer,a=[n];function h(u,p,c,m,w,P){let M=t[P],E=[],z=[];Me(s,u,M,E,z,m);let C=o[M+1],F=o[M+2];a.push(E.length);let x=P?h(M+4,o[M+3],s.set.types[o[M]],C,F-C,P-1):e.toTree();return E.push(x),z.push(C-m),Me(s,o[M+3],p,E,z,m),new R(c,E,z,w)}i.children[n]=h(0,o.length,L.none,0,s.length,t.length-1);for(let u of a){let p=l.tree.children[u],c=l.tree.positions[u];l.yield(new T(p,c+l.from,u,l._tree))}}class ze{constructor(e,t){this.offset=t,this.done=!1,this.cursor=e.cursor(v.IncludeAnonymous|v.IgnoreMounts)}moveTo(e){let{cursor:t}=this,r=e-this.offset;for(;!this.done&&t.from<r;)t.to>=e&&t.enter(r,1,v.IgnoreOverlays|v.ExcludeBuffers)||t.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(t.children.length&&t.positions[0]==0&&t.children[0]instanceof R)t=t.children[0];else break}return!1}}class rt{constructor(e){var t;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let r=this.curFrag=e[0];this.curTo=(t=r.tree.prop(xe))!==null&&t!==void 0?t:r.to,this.inner=new ze(r.tree,-r.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let t=this.curFrag=this.fragments[this.fragI];this.curTo=(e=t.tree.prop(xe))!==null&&e!==void 0?e:t.to,this.inner=new ze(t.tree,-t.offset)}}findMounts(e,t){var r;let i=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let n=this.inner.cursor.node;n;n=n.parent){let s=(r=n.tree)===null||r===void 0?void 0:r.prop(A.mounted);if(s&&s.parser==t)for(let o=this.fragI;o<this.fragments.length;o++){let a=this.fragments[o];if(a.from>=n.to)break;a.tree==this.curFrag.tree&&i.push({frag:a,pos:n.from-a.offset,mount:s})}}}return i}}function Ee(l,e){let t=null,r=e;for(let i=1,n=0;i<l.length;i++){let s=l[i-1].to,o=l[i].from;for(;n<r.length;n++){let a=r[n];if(a.from>=o)break;a.to<=s||(t||(r=t=e.slice()),a.from<s?(t[n]=new H(a.from,s),a.to>o&&t.splice(n+1,0,new H(o,a.to))):a.to>o?t[n--]=new H(o,a.to):t.splice(n--,1))}}return r}function it(l,e,t,r){let i=0,n=0,s=!1,o=!1,a=-1e9,h=[];for(;;){let u=i==l.length?1e9:s?l[i].to:l[i].from,p=n==e.length?1e9:o?e[n].to:e[n].from;if(s!=o){let c=Math.max(a,t),m=Math.min(u,p,r);c<m&&h.push(new H(c,m))}if(a=Math.min(u,p),a==1e9)break;u==a&&(s?(s=!1,i++):s=!0),p==a&&(o?(o=!1,n++):o=!0)}return h}function Oe(l,e){let t=[];for(let{pos:r,mount:i,frag:n}of l){let s=r+(i.overlay?i.overlay[0].from:0),o=s+i.tree.length,a=Math.max(n.from,s),h=Math.min(n.to,o);if(i.overlay){let u=i.overlay.map(c=>new H(c.from+r,c.to+r)),p=it(e,u,a,h);for(let c=0,m=a;;c++){let w=c==p.length,P=w?h:p[c].from;if(P>m&&t.push(new le(m,P,i.tree,-s,n.from>=m||n.openStart,n.to<=P||n.openEnd)),w)break;m=p[c].to}}else t.push(new le(a,h,i.tree,-s,n.from>=s||n.openStart,n.to<=o||n.openEnd))}return t}let nt=0;class j{constructor(e,t,r,i){this.name=e,this.set=t,this.base=r,this.modified=i,this.id=nt++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){let r=typeof e=="string"?e:"?";if(e instanceof j&&(t=e),t?.base)throw new Error("Can not derive from a modified tag");let i=new j(r,[],null,[]);if(i.set.push(i),t)for(let n of t.set)i.set.push(n);return i}static defineModifier(e){let t=new me(e);return r=>r.modified.indexOf(t)>-1?r:me.get(r.base||r,r.modified.concat(t).sort((i,n)=>i.id-n.id))}}let st=0;class me{constructor(e){this.name=e,this.instances=[],this.id=st++}static get(e,t){if(!t.length)return e;let r=t[0].instances.find(o=>o.base==e&&lt(t,o.modified));if(r)return r;let i=[],n=new j(e.name,i,e,t);for(let o of t)o.instances.push(n);let s=ot(t);for(let o of e.set)if(!o.modified.length)for(let a of s)i.push(me.get(o,a));return n}}function lt(l,e){return l.length==e.length&&l.every((t,r)=>t==e[r])}function ot(l){let e=[[]];for(let t=0;t<l.length;t++)for(let r=0,i=e.length;r<i;r++)e.push(e[r].concat(l[t]));return e.sort((t,r)=>r.length-t.length)}function at(l){let e=Object.create(null);for(let t in l){let r=l[t];Array.isArray(r)||(r=[r]);for(let i of t.split(" "))if(i){let n=[],s=2,o=i;for(let p=0;;){if(o=="..."&&p>0&&p+3==i.length){s=1;break}let c=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(o);if(!c)throw new RangeError("Invalid path: "+i);if(n.push(c[0]=="*"?"":c[0][0]=='"'?JSON.parse(c[0]):c[0]),p+=c[0].length,p==i.length)break;let m=i[p++];if(p==i.length&&m=="!"){s=0;break}if(m!="/")throw new RangeError("Invalid path: "+i);o=i.slice(p)}let a=n.length-1,h=n[a];if(!h)throw new RangeError("Invalid path: "+i);let u=new oe(r,s,a>0?n.slice(0,a):null);e[h]=u.sort(e[h])}}return Le.add(e)}const Le=new A({combine(l,e){let t,r,i;for(;l||e;){if(!l||e&&l.depth>=e.depth?(i=e,e=e.next):(i=l,l=l.next),t&&t.mode==i.mode&&!i.context&&!t.context)continue;let n=new oe(i.tags,i.mode,i.context);t?t.next=n:r=n,t=n}return r}});class oe{constructor(e,t,r,i){this.tags=e,this.mode=t,this.context=r,this.next=i}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}oe.empty=new oe([],2,null);function We(l,e){let t=Object.create(null);for(let n of l)if(!Array.isArray(n.tag))t[n.tag.id]=n.class;else for(let s of n.tag)t[s.id]=n.class;let{scope:r,all:i=null}=e||{};return{style:n=>{let s=i;for(let o of n)for(let a of o.set){let h=t[a.id];if(h){s=s?s+" "+h:h;break}}return s},scope:r}}function ft(l,e){let t=null;for(let r of l){let i=r.style(e);i&&(t=t?t+" "+i:i)}return t}function Ue(l,e,t,r=0,i=l.length){let n=new ut(r,Array.isArray(e)?e:[e],t);n.highlightRange(l.cursor(),r,i,"",n.highlighters),n.flush(i)}function ht(l,e,t,r,i,n=0,s=l.length){let o=n;function a(h,u){if(!(h<=o)){for(let p=l.slice(o,h),c=0;;){let m=p.indexOf(`
2
+ `,c),w=m<0?p.length:m;if(w>c&&r(p.slice(c,w),u),m<0)break;i(),c=m+1}o=h}}Ue(e,t,(h,u,p)=>{a(h,""),a(u,p)},n,s),a(s,"")}class ut{constructor(e,t,r){this.at=e,this.highlighters=t,this.span=r,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,r,i,n){let{type:s,from:o,to:a}=e;if(o>=r||a<=t)return;s.isTop&&(n=this.highlighters.filter(m=>!m.scope||m.scope(s)));let h=i,u=qe(e)||oe.empty,p=ft(n,u.tags);if(p&&(h&&(h+=" "),h+=p,u.mode==1&&(i+=(i?" ":"")+p)),this.startSpan(Math.max(t,o),h),u.opaque)return;let c=e.tree&&e.tree.prop(A.mounted);if(c&&c.overlay){let m=e.node.enter(c.overlay[0].from+o,1),w=this.highlighters.filter(M=>!M.scope||M.scope(c.tree.type)),P=e.firstChild();for(let M=0,E=o;;M++){let z=M<c.overlay.length?c.overlay[M]:null,C=z?z.from+o:a,F=Math.max(t,E),x=Math.min(r,C);if(F<x&&P)for(;e.from<x&&(this.highlightRange(e,F,x,i,n),this.startSpan(Math.min(x,e.to),h),!(e.to>=C||!e.nextSibling())););if(!z||C>r)break;E=z.to+o,E>t&&(this.highlightRange(m.cursor(),Math.max(t,z.from+o),Math.min(r,E),"",w),this.startSpan(Math.min(r,E),h))}P&&e.parent()}else if(e.firstChild()){c&&(i="");do if(!(e.to<=t)){if(e.from>=r)break;this.highlightRange(e,t,r,i,n),this.startSpan(Math.min(r,e.to),h)}while(e.nextSibling());e.parent()}}}function qe(l){let e=l.type.prop(Le);for(;e&&e.context&&!l.matchContext(e.context);)e=e.next;return e||null}const f=j.define,ue=f(),G=f(),Te=f(G),Re=f(G),Q=f(),pe=f(Q),ye=f(Q),J=f(),ee=f(J),U=f(),q=f(),we=f(),ne=f(we),ce=f(),y={comment:ue,lineComment:f(ue),blockComment:f(ue),docComment:f(ue),name:G,variableName:f(G),typeName:Te,tagName:f(Te),propertyName:Re,attributeName:f(Re),className:f(G),labelName:f(G),namespace:f(G),macroName:f(G),literal:Q,string:pe,docString:f(pe),character:f(pe),attributeValue:f(pe),number:ye,integer:f(ye),float:f(ye),bool:f(Q),regexp:f(Q),escape:f(Q),color:f(Q),url:f(Q),keyword:U,self:f(U),null:f(U),atom:f(U),unit:f(U),modifier:f(U),operatorKeyword:f(U),controlKeyword:f(U),definitionKeyword:f(U),moduleKeyword:f(U),operator:q,derefOperator:f(q),arithmeticOperator:f(q),logicOperator:f(q),bitwiseOperator:f(q),compareOperator:f(q),updateOperator:f(q),definitionOperator:f(q),typeOperator:f(q),controlOperator:f(q),punctuation:we,separator:f(we),bracket:ne,angleBracket:f(ne),squareBracket:f(ne),paren:f(ne),brace:f(ne),content:J,heading:ee,heading1:f(ee),heading2:f(ee),heading3:f(ee),heading4:f(ee),heading5:f(ee),heading6:f(ee),contentSeparator:f(J),list:f(J),quote:f(J),emphasis:f(J),strong:f(J),link:f(J),monospace:f(J),strikethrough:f(J),inserted:f(),deleted:f(),changed:f(),invalid:f(),meta:ce,documentMeta:f(ce),annotation:f(ce),processingInstruction:f(ce),definition:j.defineModifier("definition"),constant:j.defineModifier("constant"),function:j.defineModifier("function"),standard:j.defineModifier("standard"),local:j.defineModifier("local"),special:j.defineModifier("special")};for(let l in y){let e=y[l];e instanceof j&&(e.name=l)}const pt=We([{tag:y.link,class:"tok-link"},{tag:y.heading,class:"tok-heading"},{tag:y.emphasis,class:"tok-emphasis"},{tag:y.strong,class:"tok-strong"},{tag:y.keyword,class:"tok-keyword"},{tag:y.atom,class:"tok-atom"},{tag:y.bool,class:"tok-bool"},{tag:y.url,class:"tok-url"},{tag:y.labelName,class:"tok-labelName"},{tag:y.inserted,class:"tok-inserted"},{tag:y.deleted,class:"tok-deleted"},{tag:y.literal,class:"tok-literal"},{tag:y.string,class:"tok-string"},{tag:y.number,class:"tok-number"},{tag:[y.regexp,y.escape,y.special(y.string)],class:"tok-string2"},{tag:y.variableName,class:"tok-variableName"},{tag:y.local(y.variableName),class:"tok-variableName tok-local"},{tag:y.definition(y.variableName),class:"tok-variableName tok-definition"},{tag:y.special(y.variableName),class:"tok-variableName2"},{tag:y.definition(y.propertyName),class:"tok-propertyName tok-definition"},{tag:y.typeName,class:"tok-typeName"},{tag:y.namespace,class:"tok-namespace"},{tag:y.className,class:"tok-className"},{tag:y.macroName,class:"tok-macroName"},{tag:y.propertyName,class:"tok-propertyName"},{tag:y.operator,class:"tok-operator"},{tag:y.comment,class:"tok-comment"},{tag:y.meta,class:"tok-meta"},{tag:y.invalid,class:"tok-invalid"},{tag:y.punctuation,class:"tok-punctuation"}]),yt=Object.freeze(Object.defineProperty({__proto__:null,Tag:j,classHighlighter:pt,getStyleTags:qe,highlightCode:ht,highlightTree:Ue,styleTags:at,tagHighlighter:We,tags:y},Symbol.toStringTag,{value:"Module"}));export{ct as D,v as I,je as N,gt as P,R as T,L as a,A as b,le as c,y as d,j as e,dt as f,Ue as h,yt as i,mt as p,at as s,We as t};
@@ -0,0 +1 @@
1
+ var Bt=Array.isArray,Gt=Array.prototype.indexOf,ie=Array.prototype.includes,Vn=Array.from,Un=Object.defineProperty,pe=Object.getOwnPropertyDescriptor,Kt=Object.getOwnPropertyDescriptors,zt=Object.prototype,$t=Array.prototype,ot=Object.getPrototypeOf,et=Object.isExtensible;function Bn(e){return typeof e=="function"}const Xt=()=>{};function Gn(e){return e()}function Zt(e){for(var t=0;t<e.length;t++)e[t]()}function ut(){var e,t,n=new Promise((r,s)=>{e=r,t=s});return{promise:n,resolve:e,reject:t}}function Kn(e,t){if(Array.isArray(e))return e;if(!(Symbol.iterator in e))return Array.from(e);const n=[];for(const r of e)if(n.push(r),n.length===t)break;return n}const m=2,ae=4,le=8,He=1<<24,$=16,L=32,X=64,Wt=128,O=512,E=1024,T=2048,F=4096,P=8192,V=16384,ve=32768,Ae=65536,tt=1<<17,Jt=1<<18,de=1<<19,ct=1<<20,zn=1<<25,re=65536,Me=1<<21,qe=1<<22,U=1<<23,te=Symbol("$state"),$n=Symbol("legacy props"),Xn=Symbol(""),W=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Wn=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml"),Jn=1,ke=3,_t=8;function Ve(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Qt(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Qn(e,t,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function en(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function tn(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function nn(e){throw new Error("https://svelte.dev/e/effect_orphan")}function rn(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function er(){throw new Error("https://svelte.dev/e/hydration_failed")}function tr(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function sn(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function an(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function fn(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function nr(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const rr=1,sr=2,ar=4,fr=8,ir=16,lr=1,or=2,ur=4,cr=8,_r=16,vr=1,dr=2,ln="[",on="[!",hr="[?",un="]",Ue={},b=Symbol(),cn="http://www.w3.org/1999/xhtml",pr="http://www.w3.org/2000/svg",wr="http://www.w3.org/1998/Math/MathML",yr="@attach";function Be(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function Er(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function br(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let G=!1;function mr(e){G=e}let S;function oe(e){if(e===null)throw Be(),Ue;return S=e}function gr(){return oe(Z(S))}function Tr(e){if(G){if(Z(S)!==null)throw Be(),Ue;S=e}}function Ar(e=1){if(G){for(var t=e,n=S;t--;)n=Z(n);S=n}}function xr(e=!0){for(var t=0,n=S;;){if(n.nodeType===_t){var r=n.data;if(r===un){if(t===0)return n;t-=1}else(r===ln||r===on||r[0]==="["&&!isNaN(Number(r.slice(1))))&&(t+=1)}var s=Z(n);e&&n.remove(),n=s}}function Sr(e){if(!e||e.nodeType!==_t)throw Be(),Ue;return e.data}function vt(e){return e===this.v}function _n(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function dt(e){return!_n(e,this.v)}let Ee=!1;function Rr(){Ee=!0}let p=null;function xe(e){p=e}function Nr(e){return Oe().get(e)}function kr(e,t){return Oe().set(e,t),t}function Or(e){return Oe().has(e)}function Dr(){return Oe()}function Cr(e,t=!1,n){p={p,i:!1,c:null,e:null,s:e,x:null,l:Ee&&!t?{s:null,u:null,$:[]}:null}}function Ir(e){var t=p,n=t.e;if(n!==null){t.e=null;for(var r of n)Dt(r)}return e!==void 0&&(t.x=e),t.i=!0,p=t.p,e??{}}function be(){return!Ee||p!==null&&p.l===null}function Oe(e){return p===null&&Ve(),p.c??=new Map(vn(p)||void 0)}function vn(e){let t=e.p;for(;t!==null;){const n=t.c;if(n!==null)return n;t=t.p}return null}let J=[];function ht(){var e=J;J=[],Zt(e)}function Pe(e){if(J.length===0&&!we){var t=J;queueMicrotask(()=>{t===J&&ht()})}J.push(e)}function dn(){for(;J.length>0;)ht()}function hn(e){var t=d;if(t===null)return v.f|=U,e;if((t.f&ve)===0&&(t.f&ae)===0)throw e;Se(e,t)}function Se(e,t){for(;t!==null;){if((t.f&Wt)!==0){if((t.f&ve)===0)throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}const pn=-7169;function y(e,t){e.f=e.f&pn|t}function Ge(e){(e.f&O)!==0||e.deps===null?y(e,E):y(e,F)}function pt(e){if(e!==null)for(const t of e)(t.f&m)===0||(t.f&re)===0||(t.f^=re,pt(t.deps))}function wn(e,t,n){(e.f&T)!==0?t.add(e):(e.f&F)!==0&&n.add(e),pt(e.deps),y(e,E)}const ge=new Set;let w=null,nt=null,I=null,A=[],De=null,we=!1,ue=null;class fe{current=new Map;previous=new Map;#t=new Set;#s=new Set;#r=0;#a=0;#f=null;#i=new Set;#n=new Set;#e=new Map;is_fork=!1;#l=!1;#o(){return this.is_fork||this.#a>0}skip_effect(t){this.#e.has(t)||this.#e.set(t,{d:[],m:[]})}unskip_effect(t){var n=this.#e.get(t);if(n){this.#e.delete(t);for(var r of n.d)y(r,T),Y(r);for(r of n.m)y(r,F),Y(r)}}process(t){A=[],this.apply();var n=ue=[],r=[];for(const s of t)this.#u(s,n,r);if(ue=null,this.#o()){this.#c(r),this.#c(n);for(const[s,a]of this.#e)bt(s,a)}else{nt=this,w=null;for(const s of this.#t)s(this);this.#t.clear(),this.#r===0&&this.#_(),rt(r),rt(n),this.#i.clear(),this.#n.clear(),nt=null,this.#f?.resolve()}I=null}#u(t,n,r){t.f^=E;for(var s=t.first;s!==null;){var a=s.f,l=(a&(L|X))!==0,o=l&&(a&E)!==0,f=o||(a&P)!==0||this.#e.has(s);if(!f&&s.fn!==null){l?s.f^=E:(a&ae)!==0?n.push(s):me(s)&&((a&$)!==0&&this.#n.add(s),_e(s));var i=s.first;if(i!==null){s=i;continue}}for(;s!==null;){var u=s.next;if(u!==null){s=u;break}s=s.parent}}}#c(t){for(var n=0;n<t.length;n+=1)wn(t[n],this.#i,this.#n)}capture(t,n){n!==b&&!this.previous.has(t)&&this.previous.set(t,n),(t.f&U)===0&&(this.current.set(t,t.v),I?.set(t,t.v))}activate(){w=this,this.apply()}deactivate(){w===this&&(w=null,I=null)}flush(){if(A.length>0)w=this,wt();else if(this.#r===0&&!this.is_fork){for(const t of this.#t)t(this);this.#t.clear(),this.#_(),this.#f?.resolve()}this.deactivate()}discard(){for(const t of this.#s)t(this);this.#s.clear()}#_(){if(ge.size>1){this.previous.clear();var t=w,n=I,r=!0;for(const a of ge){if(a===this){r=!1;continue}const l=[];for(const[f,i]of this.current){if(a.current.has(f))if(r&&i!==a.current.get(f))a.current.set(f,i);else continue;l.push(f)}if(l.length===0)continue;const o=[...a.current.keys()].filter(f=>!this.current.has(f));if(o.length>0){var s=A;A=[];const f=new Set,i=new Map;for(const u of l)yt(u,o,f,i);if(A.length>0){w=a,a.apply();for(const u of A)a.#u(u,[],[]);a.deactivate()}A=s}}w=t,I=n}this.#e.clear(),ge.delete(this)}increment(t){this.#r+=1,t&&(this.#a+=1)}decrement(t){this.#r-=1,t&&(this.#a-=1),!this.#l&&(this.#l=!0,Pe(()=>{this.#l=!1,this.#o()?A.length>0&&this.flush():this.revive()}))}revive(){for(const t of this.#i)this.#n.delete(t),y(t,T),Y(t);for(const t of this.#n)y(t,F),Y(t);this.flush()}oncommit(t){this.#t.add(t)}ondiscard(t){this.#s.add(t)}settled(){return(this.#f??=ut()).promise}static ensure(){if(w===null){const t=w=new fe;ge.add(w),we||Pe(()=>{w===t&&t.flush()})}return w}apply(){}}function yn(e){var t=we;we=!0;try{for(var n;;){if(dn(),A.length===0&&(w?.flush(),A.length===0))return De=null,n;wt()}}finally{we=t}}function wt(){var e=null;try{for(var t=0;A.length>0;){var n=fe.ensure();if(t++>1e3){var r,s;En()}n.process(A),B.clear()}}finally{A=[],De=null,ue=null}}function En(){try{rn()}catch(e){Se(e,De)}}let j=null;function rt(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(V|P))===0&&me(r)&&(j=new Set,_e(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&It(r),j?.size>0)){B.clear();for(const s of j){if((s.f&(V|P))!==0)continue;const a=[s];let l=s.parent;for(;l!==null;)j.has(l)&&(j.delete(l),a.push(l)),l=l.parent;for(let o=a.length-1;o>=0;o--){const f=a[o];(f.f&(V|P))===0&&_e(f)}}j.clear()}}j=null}}function yt(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const s of e.reactions){const a=s.f;(a&m)!==0?yt(s,t,n,r):(a&(qe|$))!==0&&(a&T)===0&&Et(s,t,r)&&(y(s,T),Y(s))}}function Et(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const s of e.deps){if(ie.call(t,s))return!0;if((s.f&m)!==0&&Et(s,t,n))return n.set(s,!0),!0}return n.set(e,!1),!1}function Y(e){var t=De=e,n=t.b;if(n?.is_pending&&(e.f&(ae|le|He))!==0&&(e.f&ve)===0){n.defer_effect(e);return}for(;t.parent!==null;){t=t.parent;var r=t.f;if(ue!==null&&t===d&&(e.f&le)===0)return;if((r&(X|L))!==0){if((r&E)===0)return;t.f^=E}}A.push(t)}function bt(e,t){if(!((e.f&L)!==0&&(e.f&E)!==0)){(e.f&T)!==0?t.d.push(e):(e.f&F)!==0&&t.m.push(e),y(e,E);for(var n=e.first;n!==null;)bt(n,t),n=n.next}}function mt(e,t,n,r){const s=be()?Ke:gn;var a=e.filter(c=>!c.settled);if(n.length===0&&a.length===0){r(t.map(s));return}var l=d,o=bn(),f=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(c=>c.promise)):null;function i(c){o();try{r(c)}catch(_){(l.f&V)===0&&Se(_,l)}Fe()}if(n.length===0){f.then(()=>i(t.map(s)));return}function u(){o(),Promise.all(n.map(c=>mn(c))).then(c=>i([...t.map(s),...c])).catch(c=>Se(c,l))}f?f.then(u):u()}function bn(){var e=d,t=v,n=p,r=w;return function(a=!0){ce(e),z(t),xe(n),a&&r?.activate()}}function Fe(e=!0){ce(null),z(null),xe(null),e&&w?.deactivate()}function gt(){var e=d.b,t=w,n=e.is_rendered();return e.update_pending_count(1),t.increment(n),()=>{e.update_pending_count(-1),t.decrement(n)}}function Ke(e){var t=m|T,n=v!==null&&(v.f&m)!==0?v:null;return d!==null&&(d.f|=de),{ctx:p,deps:null,effects:null,equals:vt,f:t,fn:e,reactions:null,rv:0,v:b,wv:0,parent:n??d,ac:null}}function mn(e,t,n){d===null&&Qt();var s=void 0,a=$e(b),l=!v,o=new Map;return Mn(()=>{var f=ut();s=f.promise;try{Promise.resolve(e()).then(f.resolve,f.reject).finally(Fe)}catch(_){f.reject(_),Fe()}var i=w;if(l){var u=gt();o.get(i)?.reject(W),o.delete(i),o.set(i,f)}const c=(_,g=void 0)=>{if(i.activate(),g)g!==W&&(a.f|=U,je(a,g));else{(a.f&U)!==0&&(a.f^=U),je(a,_);for(const[h,C]of o){if(o.delete(h),h===i)break;C.reject(W)}}u&&u()};f.promise.then(c,_=>c(null,_||"unknown"))}),Cn(()=>{for(const f of o.values())f.reject(W)}),new Promise(f=>{function i(u){function c(){u===s?f(a):i(s)}u.then(c,c)}i(s)})}function Mr(e){const t=Ke(e);return Ft(t),t}function gn(e){const t=Ke(e);return t.equals=dt,t}function Tn(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)K(t[n])}}function An(e){for(var t=e.parent;t!==null;){if((t.f&m)===0)return(t.f&V)===0?t:null;t=t.parent}return null}function ze(e){var t,n=d;ce(An(e));try{e.f&=~re,Tn(e),t=Ht(e)}finally{ce(n)}return t}function Tt(e){var t=ze(e);if(!e.equals(t)&&(e.wv=jt(),(!w?.is_fork||e.deps===null)&&(e.v=t,e.deps===null))){y(e,E);return}se||(I!==null?(Ot()||w?.is_fork)&&I.set(e,t):Ge(e))}function xn(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(W),t.teardown=Xt,t.ac=null,ye(t,0),We(t))}function At(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&_e(t)}let Le=new Set;const B=new Map;let xt=!1;function $e(e,t){var n={f:0,v:e,reactions:null,equals:vt,rv:0,wv:0};return n}function H(e,t){const n=$e(e);return Ft(n),n}function Pr(e,t=!1,n=!0){const r=$e(e);return t||(r.equals=dt),Ee&&n&&p!==null&&p.l!==null&&(p.l.s??=[]).push(r),r}function q(e,t,n=!1){v!==null&&(!M||(v.f&tt)!==0)&&be()&&(v.f&(m|$|qe|tt))!==0&&(D===null||!ie.call(D,e))&&fn();let r=n?he(t):t;return je(e,r)}function je(e,t){if(!e.equals(t)){var n=e.v;se?B.set(e,t):B.set(e,n),e.v=t;var r=fe.ensure();if(r.capture(e,n),(e.f&m)!==0){const s=e;(e.f&T)!==0&&ze(s),Ge(s)}e.wv=jt(),St(e,T),be()&&d!==null&&(d.f&E)!==0&&(d.f&(L|X))===0&&(k===null?jn([e]):k.push(e)),!r.is_fork&&Le.size>0&&!xt&&Sn()}return t}function Sn(){xt=!1;for(const e of Le)(e.f&E)!==0&&y(e,F),me(e)&&_e(e);Le.clear()}function Fr(e,t=1){var n=ee(e),r=t===1?n++:n--;return q(e,n),r}function Ie(e){q(e,e.v+1)}function St(e,t){var n=e.reactions;if(n!==null)for(var r=be(),s=n.length,a=0;a<s;a++){var l=n[a],o=l.f;if(!(!r&&l===d)){var f=(o&T)===0;if(f&&y(l,t),(o&m)!==0){var i=l;I?.delete(i),(o&re)===0&&(o&O&&(l.f|=re),St(i,F))}else f&&((o&$)!==0&&j!==null&&j.add(l),Y(l))}}}function he(e){if(typeof e!="object"||e===null||te in e)return e;const t=ot(e);if(t!==zt&&t!==$t)return e;var n=new Map,r=Bt(e),s=H(0),a=ne,l=o=>{if(ne===a)return o();var f=v,i=ne;z(null),lt(a);var u=o();return z(f),lt(i),u};return r&&n.set("length",H(e.length)),new Proxy(e,{defineProperty(o,f,i){(!("value"in i)||i.configurable===!1||i.enumerable===!1||i.writable===!1)&&sn();var u=n.get(f);return u===void 0?l(()=>{var c=H(i.value);return n.set(f,c),c}):q(u,i.value,!0),!0},deleteProperty(o,f){var i=n.get(f);if(i===void 0){if(f in o){const u=l(()=>H(b));n.set(f,u),Ie(s)}}else q(i,b),Ie(s);return!0},get(o,f,i){if(f===te)return e;var u=n.get(f),c=f in o;if(u===void 0&&(!c||pe(o,f)?.writable)&&(u=l(()=>{var g=he(c?o[f]:b),h=H(g);return h}),n.set(f,u)),u!==void 0){var _=ee(u);return _===b?void 0:_}return Reflect.get(o,f,i)},getOwnPropertyDescriptor(o,f){var i=Reflect.getOwnPropertyDescriptor(o,f);if(i&&"value"in i){var u=n.get(f);u&&(i.value=ee(u))}else if(i===void 0){var c=n.get(f),_=c?.v;if(c!==void 0&&_!==b)return{enumerable:!0,configurable:!0,value:_,writable:!0}}return i},has(o,f){if(f===te)return!0;var i=n.get(f),u=i!==void 0&&i.v!==b||Reflect.has(o,f);if(i!==void 0||d!==null&&(!u||pe(o,f)?.writable)){i===void 0&&(i=l(()=>{var _=u?he(o[f]):b,g=H(_);return g}),n.set(f,i));var c=ee(i);if(c===b)return!1}return u},set(o,f,i,u){var c=n.get(f),_=f in o;if(r&&f==="length")for(var g=i;g<c.v;g+=1){var h=n.get(g+"");h!==void 0?q(h,b):g in o&&(h=l(()=>H(b)),n.set(g+"",h))}if(c===void 0)(!_||pe(o,f)?.writable)&&(c=l(()=>H(void 0)),q(c,he(i)),n.set(f,c));else{_=c.v!==b;var C=l(()=>he(i));q(c,C)}var Je=Reflect.getOwnPropertyDescriptor(o,f);if(Je?.set&&Je.set.call(u,i),!_){if(r&&typeof f=="string"){var Qe=n.get("length"),Ce=Number(f);Number.isInteger(Ce)&&Ce>=Qe.v&&q(Qe,Ce+1)}Ie(s)}return!0},ownKeys(o){ee(s);var f=Reflect.ownKeys(o).filter(c=>{var _=n.get(c);return _===void 0||_.v!==b});for(var[i,u]of n)u.v!==b&&!(i in o)&&f.push(i);return f},setPrototypeOf(){an()}})}function st(e){try{if(e!==null&&typeof e=="object"&&te in e)return e[te]}catch{}return e}function Lr(e,t){return Object.is(st(e),st(t))}var at,Rn,Nn,Rt,Nt;function jr(){if(at===void 0){at=window,Rn=document,Nn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Rt=pe(t,"firstChild").get,Nt=pe(t,"nextSibling").get,et(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),et(n)&&(n.__t=void 0)}}function Re(e=""){return document.createTextNode(e)}function Ne(e){return Rt.call(e)}function Z(e){return Nt.call(e)}function Yr(e,t){if(!G)return Ne(e);var n=Ne(S);if(n===null)n=S.appendChild(Re());else if(t&&n.nodeType!==ke){var r=Re();return n?.before(r),oe(r),r}return t&&Xe(n),oe(n),n}function Hr(e,t=!1){if(!G){var n=Ne(e);return n instanceof Comment&&n.data===""?Z(n):n}if(t){if(S?.nodeType!==ke){var r=Re();return S?.before(r),oe(r),r}Xe(S)}return S}function qr(e,t=1,n=!1){let r=G?S:e;for(var s;t--;)s=r,r=Z(r);if(!G)return r;if(n){if(r?.nodeType!==ke){var a=Re();return r===null?s?.after(a):r.before(a),oe(a),a}Xe(r)}return oe(r),r}function kn(e){e.textContent=""}function Vr(){return!1}function Ur(e,t,n){return document.createElementNS(t??cn,e,void 0)}function Xe(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===ke;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function Br(e,t){if(t){const n=document.body;e.autofocus=!0,Pe(()=>{document.activeElement===n&&e.focus()})}}function Gr(e){G&&Ne(e)!==null&&kn(e)}let ft=!1;function On(){ft||(ft=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t.__on_r?.()})},{capture:!0}))}function Ze(e){var t=v,n=d;z(null),ce(null);try{return e()}finally{z(t),ce(n)}}function Kr(e,t,n,r=n){e.addEventListener(t,()=>Ze(n));const s=e.__on_r;s?e.__on_r=()=>{s(),r(!0)}:e.__on_r=()=>r(!0),On()}function kt(e){d===null&&(v===null&&nn(),tn()),se&&en()}function Dn(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function N(e,t){var n=d;n!==null&&(n.f&P)!==0&&(e|=P);var r={ctx:p,deps:null,nodes:null,f:e|T|O,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null},s=r;if((e&ae)!==0)ue!==null?ue.push(r):Y(r);else if(t!==null){try{_e(r)}catch(l){throw K(r),l}s.deps===null&&s.teardown===null&&s.nodes===null&&s.first===s.last&&(s.f&de)===0&&(s=s.first,(e&$)!==0&&(e&Ae)!==0&&s!==null&&(s.f|=Ae))}if(s!==null&&(s.parent=n,n!==null&&Dn(s,n),v!==null&&(v.f&m)!==0&&(e&X)===0)){var a=v;(a.effects??=[]).push(s)}return r}function Ot(){return v!==null&&!M}function Cn(e){const t=N(le,null);return y(t,E),t.teardown=e,t}function In(e){kt();var t=d.f,n=!v&&(t&L)!==0&&(t&ve)===0;if(n){var r=p;(r.e??=[]).push(e)}else return Dt(e)}function Dt(e){return N(ae|ct,e)}function zr(e){return kt(),N(le|ct,e)}function $r(e){fe.ensure();const t=N(X|de,e);return()=>{K(t)}}function Xr(e){fe.ensure();const t=N(X|de,e);return(n={})=>new Promise(r=>{n.outro?Ln(t,()=>{K(t),r(void 0)}):(K(t),r(void 0))})}function Zr(e){return N(ae,e)}function Mn(e){return N(qe|de,e)}function Wr(e,t=0){return N(le|t,e)}function Jr(e,t=[],n=[],r=[]){mt(r,t,n,s=>{N(le,()=>e(...s.map(ee)))})}function Qr(e,t=[],n=[],r=[]){if(n.length>0||r.length>0)var s=gt();mt(r,t,n,a=>{N(ae,()=>e(...a.map(ee))),s&&s()})}function es(e,t=0){var n=N($|t,e);return n}function ts(e,t=0){var n=N(He|t,e);return n}function ns(e){return N(L|de,e)}function Ct(e){var t=e.teardown;if(t!==null){const n=se,r=v;it(!0),z(null);try{t.call(null)}finally{it(n),z(r)}}}function We(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const s=n.ac;s!==null&&Ze(()=>{s.abort(W)});var r=n.next;(n.f&X)!==0?n.parent=null:K(n,t),n=r}}function Pn(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&L)===0&&K(t),t=n}}function K(e,t=!0){var n=!1;(t||(e.f&Jt)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Fn(e.nodes.start,e.nodes.end),n=!0),We(e,t&&!n),ye(e,0),y(e,V);var r=e.nodes&&e.nodes.t;if(r!==null)for(const a of r)a.stop();Ct(e);var s=e.parent;s!==null&&s.first!==null&&It(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function Fn(e,t){for(;e!==null;){var n=e===t?null:Z(e);e.remove(),e=n}}function It(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function Ln(e,t,n=!0){var r=[];Mt(e,r,!0);var s=()=>{n&&K(e),t&&t()},a=r.length;if(a>0){var l=()=>--a||s();for(var o of r)o.out(l)}else s()}function Mt(e,t,n){if((e.f&P)===0){e.f^=P;var r=e.nodes&&e.nodes.t;if(r!==null)for(const o of r)(o.is_global||n)&&t.push(o);for(var s=e.first;s!==null;){var a=s.next,l=(s.f&Ae)!==0||(s.f&L)!==0&&(e.f&$)!==0;Mt(s,t,l?n:!1),s=a}}}function rs(e){Pt(e,!0)}function Pt(e,t){if((e.f&P)!==0){e.f^=P,(e.f&E)===0&&(y(e,T),Y(e));for(var n=e.first;n!==null;){var r=n.next,s=(n.f&Ae)!==0||(n.f&L)!==0;Pt(n,s?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(const l of a)(l.is_global||t)&&l.in()}}function ss(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var s=n===r?null:Z(n);t.append(n),n=s}}let Te=!1,se=!1;function it(e){se=e}let v=null,M=!1;function z(e){v=e}let d=null;function ce(e){d=e}let D=null;function Ft(e){v!==null&&(D===null?D=[e]:D.push(e))}let x=null,R=0,k=null;function jn(e){k=e}let Lt=1,Q=0,ne=Q;function lt(e){ne=e}function jt(){return++Lt}function me(e){var t=e.f;if((t&T)!==0)return!0;if(t&m&&(e.f&=~re),(t&F)!==0){for(var n=e.deps,r=n.length,s=0;s<r;s++){var a=n[s];if(me(a)&&Tt(a),a.wv>e.wv)return!0}(t&O)!==0&&I===null&&y(e,E)}return!1}function Yt(e,t,n=!0){var r=e.reactions;if(r!==null&&!(D!==null&&ie.call(D,e)))for(var s=0;s<r.length;s++){var a=r[s];(a.f&m)!==0?Yt(a,t,!1):t===a&&(n?y(a,T):(a.f&E)!==0&&y(a,F),Y(a))}}function Ht(e){var t=x,n=R,r=k,s=v,a=D,l=p,o=M,f=ne,i=e.f;x=null,R=0,k=null,v=(i&(L|X))===0?e:null,D=null,xe(e.ctx),M=!1,ne=++Q,e.ac!==null&&(Ze(()=>{e.ac.abort(W)}),e.ac=null);try{e.f|=Me;var u=e.fn,c=u();e.f|=ve;var _=e.deps,g=w?.is_fork;if(x!==null){var h;if(g||ye(e,R),_!==null&&R>0)for(_.length=R+x.length,h=0;h<x.length;h++)_[R+h]=x[h];else e.deps=_=x;if(Ot()&&(e.f&O)!==0)for(h=R;h<_.length;h++)(_[h].reactions??=[]).push(e)}else!g&&_!==null&&R<_.length&&(ye(e,R),_.length=R);if(be()&&k!==null&&!M&&_!==null&&(e.f&(m|F|T))===0)for(h=0;h<k.length;h++)Yt(k[h],e);if(s!==null&&s!==e){if(Q++,s.deps!==null)for(let C=0;C<n;C+=1)s.deps[C].rv=Q;if(t!==null)for(const C of t)C.rv=Q;k!==null&&(r===null?r=k:r.push(...k))}return(e.f&U)!==0&&(e.f^=U),c}catch(C){return hn(C)}finally{e.f^=Me,x=t,R=n,k=r,v=s,D=a,xe(l),M=o,ne=f}}function Yn(e,t){let n=t.reactions;if(n!==null){var r=Gt.call(n,e);if(r!==-1){var s=n.length-1;s===0?n=t.reactions=null:(n[r]=n[s],n.pop())}}if(n===null&&(t.f&m)!==0&&(x===null||!ie.call(x,t))){var a=t;(a.f&O)!==0&&(a.f^=O,a.f&=~re),Ge(a),xn(a),ye(a,0)}}function ye(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Yn(e,n[r])}function _e(e){var t=e.f;if((t&V)===0){y(e,E);var n=d,r=Te;d=e,Te=!0;try{(t&($|He))!==0?Pn(e):We(e),Ct(e);var s=Ht(e);e.teardown=typeof s=="function"?s:null,e.wv=Lt;var a}finally{Te=r,d=n}}}async function as(){await Promise.resolve(),yn()}function fs(){return fe.ensure().settled()}function ee(e){var t=e.f,n=(t&m)!==0;if(v!==null&&!M){var r=d!==null&&(d.f&V)!==0;if(!r&&(D===null||!ie.call(D,e))){var s=v.deps;if((v.f&Me)!==0)e.rv<Q&&(e.rv=Q,x===null&&s!==null&&s[R]===e?R++:x===null?x=[e]:x.push(e));else{(v.deps??=[]).push(e);var a=e.reactions;a===null?e.reactions=[v]:ie.call(a,v)||a.push(v)}}}if(se&&B.has(e))return B.get(e);if(n){var l=e;if(se){var o=l.v;return((l.f&E)===0&&l.reactions!==null||Vt(l))&&(o=ze(l)),B.set(l,o),o}var f=(l.f&O)===0&&!M&&v!==null&&(Te||(v.f&O)!==0),i=(l.f&ve)===0;me(l)&&(f&&(l.f|=O),Tt(l)),f&&!i&&(At(l),qt(l))}if(I?.has(e))return I.get(e);if((e.f&U)!==0)throw e.v;return e.v}function qt(e){if(e.f|=O,e.deps!==null)for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&m)!==0&&(t.f&O)===0&&(At(t),qt(t))}function Vt(e){if(e.v===b)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(B.has(t)||(t.f&m)!==0&&Vt(t))return!0;return!1}function Ut(e){var t=M;try{return M=!0,e()}finally{M=t}}function is(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(te in e)Ye(e);else if(!Array.isArray(e))for(let t in e){const n=e[t];typeof n=="object"&&n&&te in n&&Ye(n)}}}function Ye(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let r in e)try{Ye(e[r],t)}catch{}const n=ot(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){const r=Kt(n);for(let s in r){const a=r[s].get;if(a)try{a.call(e)}catch{}}}}}function Hn(e){p===null&&Ve(),Ee&&p.l!==null?qn(p).m.push(e):In(()=>{const t=Ut(e);if(typeof t=="function")return t})}function ls(e){p===null&&Ve(),Hn(()=>()=>Ut(e))}function qn(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}export{Rn as $,Ir as A,Yr as B,_t as C,qr as D,Ae as E,Ar as F,Tr as G,ln as H,Jr as I,Qr as J,q as K,H as L,Zr as M,$n as N,yn as O,Un as P,Pr as Q,Hn as R,as as S,Mr as T,rs as U,K as V,Ln as W,ns as X,w as Y,ss as Z,Vr as _,gr as a,ke as a$,on as a0,Wr as a1,Pe as a2,te as a3,pe as a4,tr as a5,ur as a6,he as a7,se as a8,d as a9,Ur as aA,pr as aB,Cn as aC,Kr as aD,nt as aE,Xt as aF,Ot as aG,Ie as aH,Wt as aI,hr as aJ,fe as aK,y as aL,T as aM,Y as aN,F as aO,wn as aP,z as aQ,xe as aR,hn as aS,v as aT,Se as aU,nr as aV,br as aW,Ze as aX,Nn as aY,vr as aZ,dr as a_,V as aa,cr as ab,Ee as ac,or as ad,lr as ae,gn as af,Bn as ag,_r as ah,$e as ai,Fr as aj,ce as ak,je as al,Qn as am,sr as an,rr as ao,ir as ap,Bt as aq,Vn as ar,un as as,zn as at,P as au,L as av,kn as aw,ar as ax,fr as ay,Jn as az,es as b,Xe as b0,ve as b1,jr as b2,Ue as b3,er as b4,Xr as b5,Be as b6,ts as b7,Er as b8,Lr as b9,mt as ba,cn as bb,ot as bc,yr as bd,Kt as be,Wn as bf,Br as bg,b as bh,On as bi,Xn as bj,Fn as bk,wr as bl,Gr as bm,at as bn,ls as bo,Kn as bp,Or as bq,kr as br,$r as bs,zt as bt,be as bu,ne as bv,Dr as bw,_n as bx,fs as by,oe as c,mr as d,S as e,Hr as f,p as g,G as h,Zt as i,In as j,Ut as k,Gn as l,ee as m,is as n,Ke as o,Rr as p,Re as q,Sr as r,xr as s,Jt as t,zr as u,de as v,Z as w,Ne as x,Cr as y,Nr as z};
@@ -0,0 +1 @@
1
+ import{c as fr,a as pe,f as Ve}from"./Cs_ROD7H.js";import{aD as mr,Y as te,S as pr,k as br,a1 as gr,aE as hr,h as vr,y as Ye,f as yr,A as Ke,B as _e,aF as Ie,G as Ne}from"./BeBar3OL.js";import{c as xr,d as we,e as Ee}from"./DP09rP34.js";import{p as Q,i as wr,b as ke,r as qe}from"./xBRYfpah.js";function kr(e,r,o=r){var t=new WeakSet;mr(e,"input",async n=>{var s=n?e.defaultValue:e.value;if(s=ve(e)?ye(s):s,o(s),te!==null&&t.add(te),await pr(),s!==(s=r())){var a=e.selectionStart,f=e.selectionEnd,d=e.value.length;if(e.value=s??"",f!==null){var m=e.value.length;a===f&&f===d&&m>d?(e.selectionStart=m,e.selectionEnd=m):(e.selectionStart=a,e.selectionEnd=Math.min(f,m))}}}),(vr&&e.defaultValue!==e.value||br(r)==null&&e.value)&&(o(ve(e)?ye(e.value):e.value),te!==null&&t.add(te)),gr(()=>{var n=r();if(e===document.activeElement){var s=hr??te;if(t.has(s))return}ve(e)&&n===ye(e.value)||e.type==="date"&&!n&&!e.value||n!==e.value&&(e.value=n??"")})}function ve(e){var r=e.type;return r==="number"||r==="range"}function ye(e){return e===""?null:+e}const Cr=(e,r)=>{const o=new Array(e.length+r.length);for(let t=0;t<e.length;t++)o[t]=e[t];for(let t=0;t<r.length;t++)o[e.length+t]=r[t];return o},zr=(e,r)=>({classGroupId:e,validator:r}),Xe=(e=new Map,r=null,o)=>({nextPart:e,validators:r,classGroupId:o}),be="-",Oe=[],Sr="arbitrary..",Ar=e=>{const r=Vr(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:t}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return Mr(a);const f=a.split(be),d=f[0]===""&&f.length>1?1:0;return Je(f,d,r)},getConflictingClassGroupIds:(a,f)=>{if(f){const d=t[a],m=o[a];return d?m?Cr(m,d):d:m||Oe}return o[a]||Oe}}},Je=(e,r,o)=>{if(e.length-r===0)return o.classGroupId;const n=e[r],s=o.nextPart.get(n);if(s){const m=Je(e,r+1,s);if(m)return m}const a=o.validators;if(a===null)return;const f=r===0?e.join(be):e.slice(r).join(be),d=a.length;for(let m=0;m<d;m++){const z=a[m];if(z.validator(f))return z.classGroupId}},Mr=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const r=e.slice(1,-1),o=r.indexOf(":"),t=r.slice(0,o);return t?Sr+t:void 0})(),Vr=e=>{const{theme:r,classGroups:o}=e;return Tr(o,r)},Tr=(e,r)=>{const o=Xe();for(const t in e){const n=e[t];Te(n,o,t,r)}return o},Te=(e,r,o,t)=>{const n=e.length;for(let s=0;s<n;s++){const a=e[s];Gr(a,r,o,t)}},Gr=(e,r,o,t)=>{if(typeof e=="string"){Pr(e,r,o);return}if(typeof e=="function"){Rr(e,r,o,t);return}_r(e,r,o,t)},Pr=(e,r,o)=>{const t=e===""?r:He(r,e);t.classGroupId=o},Rr=(e,r,o,t)=>{if(Ir(e)){Te(e(t),r,o,t);return}r.validators===null&&(r.validators=[]),r.validators.push(zr(o,e))},_r=(e,r,o,t)=>{const n=Object.entries(e),s=n.length;for(let a=0;a<s;a++){const[f,d]=n[a];Te(d,He(r,f),o,t)}},He=(e,r)=>{let o=e;const t=r.split(be),n=t.length;for(let s=0;s<n;s++){const a=t[s];let f=o.nextPart.get(a);f||(f=Xe(),o.nextPart.set(a,f)),o=f}return o},Ir=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Nr=e=>{if(e<1)return{get:()=>{},set:()=>{}};let r=0,o=Object.create(null),t=Object.create(null);const n=(s,a)=>{o[s]=a,r++,r>e&&(r=0,t=o,o=Object.create(null))};return{get(s){let a=o[s];if(a!==void 0)return a;if((a=t[s])!==void 0)return n(s,a),a},set(s,a){s in o?o[s]=a:n(s,a)}}},Ce="!",Le=":",Er=[],je=(e,r,o,t,n)=>({modifiers:e,hasImportantModifier:r,baseClassName:o,maybePostfixModifierPosition:t,isExternal:n}),Or=e=>{const{prefix:r,experimentalParseClassName:o}=e;let t=n=>{const s=[];let a=0,f=0,d=0,m;const z=n.length;for(let k=0;k<z;k++){const G=n[k];if(a===0&&f===0){if(G===Le){s.push(n.slice(d,k)),d=k+1;continue}if(G==="/"){m=k;continue}}G==="["?a++:G==="]"?a--:G==="("?f++:G===")"&&f--}const S=s.length===0?n:n.slice(d);let A=S,g=!1;S.endsWith(Ce)?(A=S.slice(0,-1),g=!0):S.startsWith(Ce)&&(A=S.slice(1),g=!0);const _=m&&m>d?m-d:void 0;return je(s,g,A,_)};if(r){const n=r+Le,s=t;t=a=>a.startsWith(n)?s(a.slice(n.length)):je(Er,!1,a,void 0,!0)}if(o){const n=t;t=s=>o({className:s,parseClassName:n})}return t},Lr=e=>{const r=new Map;return e.orderSensitiveModifiers.forEach((o,t)=>{r.set(o,1e6+t)}),o=>{const t=[];let n=[];for(let s=0;s<o.length;s++){const a=o[s],f=a[0]==="[",d=r.has(a);f||d?(n.length>0&&(n.sort(),t.push(...n),n=[]),t.push(a)):n.push(a)}return n.length>0&&(n.sort(),t.push(...n)),t}},jr=e=>({cache:Nr(e.cacheSize),parseClassName:Or(e),sortModifiers:Lr(e),...Ar(e)}),Fr=/\s+/,Br=(e,r)=>{const{parseClassName:o,getClassGroupId:t,getConflictingClassGroupIds:n,sortModifiers:s}=r,a=[],f=e.trim().split(Fr);let d="";for(let m=f.length-1;m>=0;m-=1){const z=f[m],{isExternal:S,modifiers:A,hasImportantModifier:g,baseClassName:_,maybePostfixModifierPosition:k}=o(z);if(S){d=z+(d.length>0?" "+d:d);continue}let G=!!k,O=t(G?_.substring(0,k):_);if(!O){if(!G){d=z+(d.length>0?" "+d:d);continue}if(O=t(_),!O){d=z+(d.length>0?" "+d:d);continue}G=!1}const j=A.length===0?"":A.length===1?A[0]:s(A).join(":"),I=g?j+Ce:j,Y=I+O;if(a.indexOf(Y)>-1)continue;a.push(Y);const P=n(O,G);for(let B=0;B<P.length;++B){const J=P[B];a.push(I+J)}d=z+(d.length>0?" "+d:d)}return d},Wr=(...e)=>{let r=0,o,t,n="";for(;r<e.length;)(o=e[r++])&&(t=Qe(o))&&(n&&(n+=" "),n+=t);return n},Qe=e=>{if(typeof e=="string")return e;let r,o="";for(let t=0;t<e.length;t++)e[t]&&(r=Qe(e[t]))&&(o&&(o+=" "),o+=r);return o},ze=(e,...r)=>{let o,t,n,s;const a=d=>{const m=r.reduce((z,S)=>S(z),e());return o=jr(m),t=o.cache.get,n=o.cache.set,s=f,f(d)},f=d=>{const m=t(d);if(m)return m;const z=Br(d,o);return n(d,z),z};return s=a,(...d)=>s(Wr(...d))},Ur=[],V=e=>{const r=o=>o[e]||Ur;return r.isThemeGetter=!0,r},Ze=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,$e=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Dr=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Yr=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Kr=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,qr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Xr=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Jr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,K=e=>Dr.test(e),b=e=>!!e&&!Number.isNaN(Number(e)),q=e=>!!e&&Number.isInteger(Number(e)),xe=e=>e.endsWith("%")&&b(e.slice(0,-1)),U=e=>Yr.test(e),er=()=>!0,Hr=e=>Kr.test(e)&&!qr.test(e),Ge=()=>!1,Qr=e=>Xr.test(e),Zr=e=>Jr.test(e),$r=e=>!l(e)&&!i(e),et=e=>X(e,or,Ge),l=e=>Ze.test(e),H=e=>X(e,sr,Hr),Fe=e=>X(e,it,b),rt=e=>X(e,ar,er),tt=e=>X(e,nr,Ge),Be=e=>X(e,rr,Ge),ot=e=>X(e,tr,Zr),de=e=>X(e,lr,Qr),i=e=>$e.test(e),oe=e=>Z(e,sr),st=e=>Z(e,nr),We=e=>Z(e,rr),nt=e=>Z(e,or),at=e=>Z(e,tr),ue=e=>Z(e,lr,!0),lt=e=>Z(e,ar,!0),X=(e,r,o)=>{const t=Ze.exec(e);return t?t[1]?r(t[1]):o(t[2]):!1},Z=(e,r,o=!1)=>{const t=$e.exec(e);return t?t[1]?r(t[1]):o:!1},rr=e=>e==="position"||e==="percentage",tr=e=>e==="image"||e==="url",or=e=>e==="length"||e==="size"||e==="bg-size",sr=e=>e==="length",it=e=>e==="number",nr=e=>e==="family-name",ar=e=>e==="number"||e==="weight",lr=e=>e==="shadow",Se=()=>{const e=V("color"),r=V("font"),o=V("text"),t=V("font-weight"),n=V("tracking"),s=V("leading"),a=V("breakpoint"),f=V("container"),d=V("spacing"),m=V("radius"),z=V("shadow"),S=V("inset-shadow"),A=V("text-shadow"),g=V("drop-shadow"),_=V("blur"),k=V("perspective"),G=V("aspect"),O=V("ease"),j=V("animate"),I=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Y=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],P=()=>[...Y(),i,l],B=()=>["auto","hidden","clip","visible","scroll"],J=()=>["auto","contain","none"],u=()=>[i,l,d],R=()=>[K,"full","auto",...u()],ee=()=>[q,"none","subgrid",i,l],re=()=>["auto",{span:["full",q,i,l]},q,i,l],$=()=>[q,"auto",i,l],ne=()=>["auto","min","max","fr",i,l],h=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],v=()=>["start","end","center","stretch","center-safe","end-safe"],p=()=>["auto",...u()],y=()=>[K,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...u()],x=()=>[K,"screen","full","dvw","lvw","svw","min","max","fit",...u()],C=()=>[K,"screen","full","lh","dvh","lvh","svh","min","max","fit",...u()],c=()=>[e,i,l],F=()=>[...Y(),We,Be,{position:[i,l]}],N=()=>["no-repeat",{repeat:["","x","y","space","round"]}],L=()=>["auto","cover","contain",nt,et,{size:[i,l]}],W=()=>[xe,oe,H],w=()=>["","none","full",m,i,l],M=()=>["",b,oe,H],ae=()=>["solid","dashed","dotted","double"],Pe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],T=()=>[b,xe,We,Be],Re=()=>["","none",_,i,l],le=()=>["none",b,i,l],ie=()=>["none",b,i,l],he=()=>[b,i,l],ce=()=>[K,"full",...u()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[U],breakpoint:[U],color:[er],container:[U],"drop-shadow":[U],ease:["in","out","in-out"],font:[$r],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[U],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[U],shadow:[U],spacing:["px",b],text:[U],"text-shadow":[U],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",K,l,i,G]}],container:["container"],columns:[{columns:[b,l,i,f]}],"break-after":[{"break-after":I()}],"break-before":[{"break-before":I()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:P()}],overflow:[{overflow:B()}],"overflow-x":[{"overflow-x":B()}],"overflow-y":[{"overflow-y":B()}],overscroll:[{overscroll:J()}],"overscroll-x":[{"overscroll-x":J()}],"overscroll-y":[{"overscroll-y":J()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:R()}],"inset-x":[{"inset-x":R()}],"inset-y":[{"inset-y":R()}],start:[{"inset-s":R(),start:R()}],end:[{"inset-e":R(),end:R()}],"inset-bs":[{"inset-bs":R()}],"inset-be":[{"inset-be":R()}],top:[{top:R()}],right:[{right:R()}],bottom:[{bottom:R()}],left:[{left:R()}],visibility:["visible","invisible","collapse"],z:[{z:[q,"auto",i,l]}],basis:[{basis:[K,"full","auto",f,...u()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[b,K,"auto","initial","none",l]}],grow:[{grow:["",b,i,l]}],shrink:[{shrink:["",b,i,l]}],order:[{order:[q,"first","last","none",i,l]}],"grid-cols":[{"grid-cols":ee()}],"col-start-end":[{col:re()}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":ee()}],"row-start-end":[{row:re()}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ne()}],"auto-rows":[{"auto-rows":ne()}],gap:[{gap:u()}],"gap-x":[{"gap-x":u()}],"gap-y":[{"gap-y":u()}],"justify-content":[{justify:[...h(),"normal"]}],"justify-items":[{"justify-items":[...v(),"normal"]}],"justify-self":[{"justify-self":["auto",...v()]}],"align-content":[{content:["normal",...h()]}],"align-items":[{items:[...v(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...v(),{baseline:["","last"]}]}],"place-content":[{"place-content":h()}],"place-items":[{"place-items":[...v(),"baseline"]}],"place-self":[{"place-self":["auto",...v()]}],p:[{p:u()}],px:[{px:u()}],py:[{py:u()}],ps:[{ps:u()}],pe:[{pe:u()}],pbs:[{pbs:u()}],pbe:[{pbe:u()}],pt:[{pt:u()}],pr:[{pr:u()}],pb:[{pb:u()}],pl:[{pl:u()}],m:[{m:p()}],mx:[{mx:p()}],my:[{my:p()}],ms:[{ms:p()}],me:[{me:p()}],mbs:[{mbs:p()}],mbe:[{mbe:p()}],mt:[{mt:p()}],mr:[{mr:p()}],mb:[{mb:p()}],ml:[{ml:p()}],"space-x":[{"space-x":u()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":u()}],"space-y-reverse":["space-y-reverse"],size:[{size:y()}],"inline-size":[{inline:["auto",...x()]}],"min-inline-size":[{"min-inline":["auto",...x()]}],"max-inline-size":[{"max-inline":["none",...x()]}],"block-size":[{block:["auto",...C()]}],"min-block-size":[{"min-block":["auto",...C()]}],"max-block-size":[{"max-block":["none",...C()]}],w:[{w:[f,"screen",...y()]}],"min-w":[{"min-w":[f,"screen","none",...y()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[a]},...y()]}],h:[{h:["screen","lh",...y()]}],"min-h":[{"min-h":["screen","lh","none",...y()]}],"max-h":[{"max-h":["screen","lh",...y()]}],"font-size":[{text:["base",o,oe,H]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[t,lt,rt]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",xe,l]}],"font-family":[{font:[st,tt,r]}],"font-features":[{"font-features":[l]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[n,i,l]}],"line-clamp":[{"line-clamp":[b,"none",i,Fe]}],leading:[{leading:[s,...u()]}],"list-image":[{"list-image":["none",i,l]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",i,l]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:c()}],"text-color":[{text:c()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ae(),"wavy"]}],"text-decoration-thickness":[{decoration:[b,"from-font","auto",i,H]}],"text-decoration-color":[{decoration:c()}],"underline-offset":[{"underline-offset":[b,"auto",i,l]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:u()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",i,l]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",i,l]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:F()}],"bg-repeat":[{bg:N()}],"bg-size":[{bg:L()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},q,i,l],radial:["",i,l],conic:[q,i,l]},at,ot]}],"bg-color":[{bg:c()}],"gradient-from-pos":[{from:W()}],"gradient-via-pos":[{via:W()}],"gradient-to-pos":[{to:W()}],"gradient-from":[{from:c()}],"gradient-via":[{via:c()}],"gradient-to":[{to:c()}],rounded:[{rounded:w()}],"rounded-s":[{"rounded-s":w()}],"rounded-e":[{"rounded-e":w()}],"rounded-t":[{"rounded-t":w()}],"rounded-r":[{"rounded-r":w()}],"rounded-b":[{"rounded-b":w()}],"rounded-l":[{"rounded-l":w()}],"rounded-ss":[{"rounded-ss":w()}],"rounded-se":[{"rounded-se":w()}],"rounded-ee":[{"rounded-ee":w()}],"rounded-es":[{"rounded-es":w()}],"rounded-tl":[{"rounded-tl":w()}],"rounded-tr":[{"rounded-tr":w()}],"rounded-br":[{"rounded-br":w()}],"rounded-bl":[{"rounded-bl":w()}],"border-w":[{border:M()}],"border-w-x":[{"border-x":M()}],"border-w-y":[{"border-y":M()}],"border-w-s":[{"border-s":M()}],"border-w-e":[{"border-e":M()}],"border-w-bs":[{"border-bs":M()}],"border-w-be":[{"border-be":M()}],"border-w-t":[{"border-t":M()}],"border-w-r":[{"border-r":M()}],"border-w-b":[{"border-b":M()}],"border-w-l":[{"border-l":M()}],"divide-x":[{"divide-x":M()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":M()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ae(),"hidden","none"]}],"divide-style":[{divide:[...ae(),"hidden","none"]}],"border-color":[{border:c()}],"border-color-x":[{"border-x":c()}],"border-color-y":[{"border-y":c()}],"border-color-s":[{"border-s":c()}],"border-color-e":[{"border-e":c()}],"border-color-bs":[{"border-bs":c()}],"border-color-be":[{"border-be":c()}],"border-color-t":[{"border-t":c()}],"border-color-r":[{"border-r":c()}],"border-color-b":[{"border-b":c()}],"border-color-l":[{"border-l":c()}],"divide-color":[{divide:c()}],"outline-style":[{outline:[...ae(),"none","hidden"]}],"outline-offset":[{"outline-offset":[b,i,l]}],"outline-w":[{outline:["",b,oe,H]}],"outline-color":[{outline:c()}],shadow:[{shadow:["","none",z,ue,de]}],"shadow-color":[{shadow:c()}],"inset-shadow":[{"inset-shadow":["none",S,ue,de]}],"inset-shadow-color":[{"inset-shadow":c()}],"ring-w":[{ring:M()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:c()}],"ring-offset-w":[{"ring-offset":[b,H]}],"ring-offset-color":[{"ring-offset":c()}],"inset-ring-w":[{"inset-ring":M()}],"inset-ring-color":[{"inset-ring":c()}],"text-shadow":[{"text-shadow":["none",A,ue,de]}],"text-shadow-color":[{"text-shadow":c()}],opacity:[{opacity:[b,i,l]}],"mix-blend":[{"mix-blend":[...Pe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Pe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[b]}],"mask-image-linear-from-pos":[{"mask-linear-from":T()}],"mask-image-linear-to-pos":[{"mask-linear-to":T()}],"mask-image-linear-from-color":[{"mask-linear-from":c()}],"mask-image-linear-to-color":[{"mask-linear-to":c()}],"mask-image-t-from-pos":[{"mask-t-from":T()}],"mask-image-t-to-pos":[{"mask-t-to":T()}],"mask-image-t-from-color":[{"mask-t-from":c()}],"mask-image-t-to-color":[{"mask-t-to":c()}],"mask-image-r-from-pos":[{"mask-r-from":T()}],"mask-image-r-to-pos":[{"mask-r-to":T()}],"mask-image-r-from-color":[{"mask-r-from":c()}],"mask-image-r-to-color":[{"mask-r-to":c()}],"mask-image-b-from-pos":[{"mask-b-from":T()}],"mask-image-b-to-pos":[{"mask-b-to":T()}],"mask-image-b-from-color":[{"mask-b-from":c()}],"mask-image-b-to-color":[{"mask-b-to":c()}],"mask-image-l-from-pos":[{"mask-l-from":T()}],"mask-image-l-to-pos":[{"mask-l-to":T()}],"mask-image-l-from-color":[{"mask-l-from":c()}],"mask-image-l-to-color":[{"mask-l-to":c()}],"mask-image-x-from-pos":[{"mask-x-from":T()}],"mask-image-x-to-pos":[{"mask-x-to":T()}],"mask-image-x-from-color":[{"mask-x-from":c()}],"mask-image-x-to-color":[{"mask-x-to":c()}],"mask-image-y-from-pos":[{"mask-y-from":T()}],"mask-image-y-to-pos":[{"mask-y-to":T()}],"mask-image-y-from-color":[{"mask-y-from":c()}],"mask-image-y-to-color":[{"mask-y-to":c()}],"mask-image-radial":[{"mask-radial":[i,l]}],"mask-image-radial-from-pos":[{"mask-radial-from":T()}],"mask-image-radial-to-pos":[{"mask-radial-to":T()}],"mask-image-radial-from-color":[{"mask-radial-from":c()}],"mask-image-radial-to-color":[{"mask-radial-to":c()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":Y()}],"mask-image-conic-pos":[{"mask-conic":[b]}],"mask-image-conic-from-pos":[{"mask-conic-from":T()}],"mask-image-conic-to-pos":[{"mask-conic-to":T()}],"mask-image-conic-from-color":[{"mask-conic-from":c()}],"mask-image-conic-to-color":[{"mask-conic-to":c()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:F()}],"mask-repeat":[{mask:N()}],"mask-size":[{mask:L()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",i,l]}],filter:[{filter:["","none",i,l]}],blur:[{blur:Re()}],brightness:[{brightness:[b,i,l]}],contrast:[{contrast:[b,i,l]}],"drop-shadow":[{"drop-shadow":["","none",g,ue,de]}],"drop-shadow-color":[{"drop-shadow":c()}],grayscale:[{grayscale:["",b,i,l]}],"hue-rotate":[{"hue-rotate":[b,i,l]}],invert:[{invert:["",b,i,l]}],saturate:[{saturate:[b,i,l]}],sepia:[{sepia:["",b,i,l]}],"backdrop-filter":[{"backdrop-filter":["","none",i,l]}],"backdrop-blur":[{"backdrop-blur":Re()}],"backdrop-brightness":[{"backdrop-brightness":[b,i,l]}],"backdrop-contrast":[{"backdrop-contrast":[b,i,l]}],"backdrop-grayscale":[{"backdrop-grayscale":["",b,i,l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[b,i,l]}],"backdrop-invert":[{"backdrop-invert":["",b,i,l]}],"backdrop-opacity":[{"backdrop-opacity":[b,i,l]}],"backdrop-saturate":[{"backdrop-saturate":[b,i,l]}],"backdrop-sepia":[{"backdrop-sepia":["",b,i,l]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":u()}],"border-spacing-x":[{"border-spacing-x":u()}],"border-spacing-y":[{"border-spacing-y":u()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",i,l]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[b,"initial",i,l]}],ease:[{ease:["linear","initial",O,i,l]}],delay:[{delay:[b,i,l]}],animate:[{animate:["none",j,i,l]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,i,l]}],"perspective-origin":[{"perspective-origin":P()}],rotate:[{rotate:le()}],"rotate-x":[{"rotate-x":le()}],"rotate-y":[{"rotate-y":le()}],"rotate-z":[{"rotate-z":le()}],scale:[{scale:ie()}],"scale-x":[{"scale-x":ie()}],"scale-y":[{"scale-y":ie()}],"scale-z":[{"scale-z":ie()}],"scale-3d":["scale-3d"],skew:[{skew:he()}],"skew-x":[{"skew-x":he()}],"skew-y":[{"skew-y":he()}],transform:[{transform:[i,l,"","none","gpu","cpu"]}],"transform-origin":[{origin:P()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ce()}],"translate-x":[{"translate-x":ce()}],"translate-y":[{"translate-y":ce()}],"translate-z":[{"translate-z":ce()}],"translate-none":["translate-none"],accent:[{accent:c()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:c()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",i,l]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":u()}],"scroll-mx":[{"scroll-mx":u()}],"scroll-my":[{"scroll-my":u()}],"scroll-ms":[{"scroll-ms":u()}],"scroll-me":[{"scroll-me":u()}],"scroll-mbs":[{"scroll-mbs":u()}],"scroll-mbe":[{"scroll-mbe":u()}],"scroll-mt":[{"scroll-mt":u()}],"scroll-mr":[{"scroll-mr":u()}],"scroll-mb":[{"scroll-mb":u()}],"scroll-ml":[{"scroll-ml":u()}],"scroll-p":[{"scroll-p":u()}],"scroll-px":[{"scroll-px":u()}],"scroll-py":[{"scroll-py":u()}],"scroll-ps":[{"scroll-ps":u()}],"scroll-pe":[{"scroll-pe":u()}],"scroll-pbs":[{"scroll-pbs":u()}],"scroll-pbe":[{"scroll-pbe":u()}],"scroll-pt":[{"scroll-pt":u()}],"scroll-pr":[{"scroll-pr":u()}],"scroll-pb":[{"scroll-pb":u()}],"scroll-pl":[{"scroll-pl":u()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",i,l]}],fill:[{fill:["none",...c()]}],"stroke-w":[{stroke:[b,oe,H,Fe]}],stroke:[{stroke:["none",...c()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},ct=(e,{cacheSize:r,prefix:o,experimentalParseClassName:t,extend:n={},override:s={}})=>(se(e,"cacheSize",r),se(e,"prefix",o),se(e,"experimentalParseClassName",t),fe(e.theme,s.theme),fe(e.classGroups,s.classGroups),fe(e.conflictingClassGroups,s.conflictingClassGroups),fe(e.conflictingClassGroupModifiers,s.conflictingClassGroupModifiers),se(e,"orderSensitiveModifiers",s.orderSensitiveModifiers),me(e.theme,n.theme),me(e.classGroups,n.classGroups),me(e.conflictingClassGroups,n.conflictingClassGroups),me(e.conflictingClassGroupModifiers,n.conflictingClassGroupModifiers),ir(e,n,"orderSensitiveModifiers"),e),se=(e,r,o)=>{o!==void 0&&(e[r]=o)},fe=(e,r)=>{if(r)for(const o in r)se(e,o,r[o])},me=(e,r)=>{if(r)for(const o in r)ir(e,r,o)},ir=(e,r,o)=>{const t=r[o];t!==void 0&&(e[o]=e[o]?e[o].concat(t):t)},dt=(e,...r)=>typeof e=="function"?ze(Se,e,...r):ze(()=>ct(Se(),e),...r),cr=ze(Se);function Ae(...e){return cr(xr(e))}var ut=/\s+/g,ft=e=>typeof e!="string"||!e?e:e.replace(ut," ").trim(),ge=(...e)=>{const r=[],o=t=>{if(!t&&t!==0&&t!==0n)return;if(Array.isArray(t)){for(let s=0,a=t.length;s<a;s++)o(t[s]);return}const n=typeof t;if(n==="string"||n==="number"||n==="bigint"){if(n==="number"&&t!==t)return;r.push(String(t))}else if(n==="object"){const s=Object.keys(t);for(let a=0,f=s.length;a<f;a++){const d=s[a];t[d]&&r.push(d)}}};for(let t=0,n=e.length;t<n;t++){const s=e[t];s!=null&&o(s)}return r.length>0?ft(r.join(" ")):void 0},Ue=e=>e===!1?"false":e===!0?"true":e===0?"0":e,E=e=>{if(!e||typeof e!="object")return!0;for(const r in e)return!1;return!0},mt=(e,r)=>{if(e===r)return!0;if(!e||!r)return!1;const o=Object.keys(e),t=Object.keys(r);if(o.length!==t.length)return!1;for(let n=0;n<o.length;n++){const s=o[n];if(!t.includes(s)||e[s]!==r[s])return!1}return!0},pt=(e,r)=>{for(const o in r)if(Object.prototype.hasOwnProperty.call(r,o)){const t=r[o];o in e?e[o]=ge(e[o],t):e[o]=t}return e},dr=(e,r)=>{for(let o=0;o<e.length;o++){const t=e[o];Array.isArray(t)?dr(t,r):t&&r.push(t)}},ur=(...e)=>{const r=[];dr(e,r);const o=[];for(let t=0;t<r.length;t++)r[t]&&o.push(r[t]);return o},Me=(e,r)=>{const o={};for(const t in e){const n=e[t];if(t in r){const s=r[t];Array.isArray(n)||Array.isArray(s)?o[t]=ur(s,n):typeof n=="object"&&typeof s=="object"&&n&&s?o[t]=Me(n,s):o[t]=s+" "+n}else o[t]=n}for(const t in r)t in e||(o[t]=r[t]);return o},bt={twMerge:!0,twMergeConfig:{}};function gt(){let e=null,r={},o=!1;return{get cachedTwMerge(){return e},set cachedTwMerge(t){e=t},get cachedTwMergeConfig(){return r},set cachedTwMergeConfig(t){r=t},get didTwMergeConfigChange(){return o},set didTwMergeConfigChange(t){o=t},reset(){e=null,r={},o=!1}}}var D=gt(),ht=e=>{const r=(t,n)=>{const{extend:s=null,slots:a={},variants:f={},compoundVariants:d=[],compoundSlots:m=[],defaultVariants:z={}}=t,S={...bt,...n},A=s?.base?ge(s.base,t?.base):t?.base,g=s?.variants&&!E(s.variants)?Me(f,s.variants):f,_=s?.defaultVariants&&!E(s.defaultVariants)?{...s.defaultVariants,...z}:z;!E(S.twMergeConfig)&&!mt(S.twMergeConfig,D.cachedTwMergeConfig)&&(D.didTwMergeConfigChange=!0,D.cachedTwMergeConfig=S.twMergeConfig);const k=E(s?.slots),G=E(a)?{}:{base:ge(t?.base,k&&s?.base),...a},O=k?G:pt({...s?.slots},E(G)?{base:t?.base}:G),j=E(s?.compoundVariants)?d:ur(s?.compoundVariants,d),I=P=>{if(E(g)&&E(a)&&k)return e(A,P?.class,P?.className)(S);if(j&&!Array.isArray(j))throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof j}`);if(m&&!Array.isArray(m))throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof m}`);const B=(h,v=g,p=null,y=null)=>{const x=v[h];if(!x||E(x))return null;const C=y?.[h]??P?.[h];if(C===null)return null;const c=Ue(C);if(typeof c=="object")return null;const F=_?.[h],N=c??Ue(F);return x[N||"false"]},J=()=>{if(!g)return null;const h=Object.keys(g),v=[];for(let p=0;p<h.length;p++){const y=B(h[p],g);y&&v.push(y)}return v},u=(h,v)=>{if(!g||typeof g!="object")return null;const p=[];for(const y in g){const x=B(y,g,h,v),C=h==="base"&&typeof x=="string"?x:x&&x[h];C&&p.push(C)}return p},R={};for(const h in P){const v=P[h];v!==void 0&&(R[h]=v)}const ee=(h,v)=>{const p=typeof P?.[h]=="object"?{[h]:P[h]?.initial}:{};return{..._,...R,...p,...v}},re=(h=[],v)=>{const p=[],y=h.length;for(let x=0;x<y;x++){const{class:C,className:c,...F}=h[x];let N=!0;const L=ee(null,v);for(const W in F){const w=F[W],M=L[W];if(Array.isArray(w)){if(!w.includes(M)){N=!1;break}}else{if((w==null||w===!1)&&(M==null||M===!1))continue;if(M!==w){N=!1;break}}}N&&(C&&p.push(C),c&&p.push(c))}return p},$=h=>{const v=re(j,h);if(!Array.isArray(v))return v;const p={},y=e;for(let x=0;x<v.length;x++){const C=v[x];if(typeof C=="string")p.base=y(p.base,C)(S);else if(typeof C=="object")for(const c in C)p[c]=y(p[c],C[c])(S)}return p},ne=h=>{if(m.length<1)return null;const v={},p=ee(null,h);for(let y=0;y<m.length;y++){const{slots:x=[],class:C,className:c,...F}=m[y];if(!E(F)){let N=!0;for(const L in F){const W=p[L],w=F[L];if(W===void 0||(Array.isArray(w)?!w.includes(W):w!==W)){N=!1;break}}if(!N)continue}for(let N=0;N<x.length;N++){const L=x[N];v[L]||(v[L]=[]),v[L].push([C,c])}}return v};if(!E(a)||!k){const h={};if(typeof O=="object"&&!E(O)){const v=e;for(const p in O)h[p]=y=>{const x=$(y),C=ne(y);return v(O[p],u(p,y),x?x[p]:void 0,C?C[p]:void 0,y?.class,y?.className)(S)}}return h}return e(A,J(),re(j),P?.class,P?.className)(S)},Y=()=>{if(!(!g||typeof g!="object"))return Object.keys(g)};return I.variantKeys=Y(),I.extend=s,I.base=A,I.slots=O,I.variants=g,I.defaultVariants=_,I.compoundSlots=m,I.compoundVariants=j,I};return{tv:r,createTV:t=>(n,s)=>r(n,s?Me(t,s):t)}},vt=e=>E(e)?cr:dt({...e,extend:{theme:e.theme,classGroups:e.classGroups,conflictingClassGroupModifiers:e.conflictingClassGroupModifiers,conflictingClassGroups:e.conflictingClassGroups,...e.extend}}),yt=(e,r)=>{const o=ge(e);return!o||!(r?.twMerge??!0)?o:((!D.cachedTwMerge||D.didTwMergeConfigChange)&&(D.didTwMergeConfigChange=!1,D.cachedTwMerge=vt(D.cachedTwMergeConfig)),D.cachedTwMerge(o)||void 0)},xt=(...e)=>r=>yt(e,r),{tv:wt}=ht(xt);const De=wt({base:"inline-flex shrink-0 items-center justify-center gap-1.5 rounded-[4px] font-normal whitespace-nowrap transition-[color,background] duration-150 cursor-pointer disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",variants:{variant:{default:"bg-[var(--color-bg-surface)] text-[var(--color-text-primary)] border border-[var(--color-border)] hover:bg-[var(--color-bg-hover)]",ghost:"bg-transparent text-[var(--color-text-tertiary)] hover:text-[var(--color-text-secondary)] hover:bg-[var(--color-bg-hover)]",outline:"bg-transparent text-[var(--color-text-secondary)] border border-[var(--color-border)] hover:bg-[var(--color-bg-hover)]",accent:"bg-[var(--color-accent)] text-white hover:bg-[var(--color-accent-hover)] border border-transparent",destructive:"bg-[var(--color-destructive)] text-white hover:bg-[var(--color-destructive-hover)]",link:"text-[var(--color-accent)] underline-offset-4 hover:underline"},size:{default:"h-7 px-3 text-xs",sm:"h-6 px-2 text-[11px]",lg:"h-8 px-4 text-sm",icon:"size-7 p-0"}},defaultVariants:{variant:"default",size:"default"}});var kt=Ve("<a><!></a>"),Ct=Ve("<button><!></button>");function Tt(e,r){Ye(r,!0);let o=Q(r,"variant",3,"default"),t=Q(r,"size",3,"default"),n=Q(r,"ref",15,null),s=Q(r,"href",3,void 0),a=Q(r,"type",3,"button"),f=qe(r,["$$slots","$$events","$$legacy","class","variant","size","ref","href","type","disabled","children"]);var d=fr(),m=yr(d);{var z=A=>{var g=kt();we(g,k=>({class:k,href:r.disabled?void 0:s(),"aria-disabled":r.disabled,role:r.disabled?"link":void 0,tabindex:r.disabled?-1:void 0,...f}),[()=>Ae(De({variant:o(),size:t()}),r.class)]);var _=_e(g);Ee(_,()=>r.children??Ie),Ne(g),ke(g,k=>n(k),()=>n()),pe(A,g)},S=A=>{var g=Ct();we(g,k=>({class:k,type:a(),disabled:r.disabled,...f}),[()=>Ae(De({variant:o(),size:t()}),r.class)]);var _=_e(g);Ee(_,()=>r.children??Ie),Ne(g),ke(g,k=>n(k),()=>n()),pe(A,g)};wr(m,A=>{s()?A(z):A(S,!1)})}pe(e,d),Ke()}var zt=Ve("<input/>");function Gt(e,r){Ye(r,!0);let o=Q(r,"ref",15,null),t=Q(r,"value",15),n=qe(r,["$$slots","$$events","$$legacy","class","ref","value"]);var s=zt();we(s,a=>({class:a,...n}),[()=>Ae("h-8 w-full rounded-md border border-[var(--color-border)] bg-[var(--color-bg)] px-2.5 text-[13px] text-[var(--color-text-primary)] font-[inherit] outline-none transition-colors placeholder:text-[var(--color-text-tertiary)] focus:border-[var(--color-accent,#6e6ee8)] disabled:cursor-not-allowed disabled:opacity-50",r.class)],void 0,void 0,void 0,!0),ke(s,a=>o(a),()=>o()),kr(s,t),pe(e,s),Ke()}export{Tt as B,Gt as I,De as a,kr as b,Ae as c,wt as t};