@inkeep/open-knowledge 0.87.0-beta.2 → 0.87.0-beta.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 (281) hide show
  1. package/dist/cli.mjs +6 -6
  2. package/dist/constants-DbuQSZES.mjs +1 -0
  3. package/dist/{dist-0gI1oLbO.mjs → dist-Nf304EbD.mjs} +1 -1
  4. package/dist/{dist-_mI3Jjf-.mjs → dist-WUkQ-0NU.mjs} +1 -1
  5. package/dist/index.mjs +1 -1
  6. package/dist/init-BSfWKxH3.mjs +1 -0
  7. package/dist/{init-DIAKdBV0.mjs → init-DVV2IPlH.mjs} +2 -2
  8. package/dist/{launch-json-removal-DJC4Yapa.mjs → launch-json-removal-Cgp1LTaQ.mjs} +1 -1
  9. package/dist/loader-B24TIi2v.mjs +1 -0
  10. package/dist/{loader-CnGe_Flu.mjs → loader-DigAueDc.mjs} +1 -1
  11. package/dist/{open-browser-3bURxjbo.mjs → open-browser-DpCYxQUn.mjs} +1 -1
  12. package/dist/{preview-c3qAKdkh.mjs → preview-B6BTCdRM.mjs} +1 -1
  13. package/dist/preview-DuSjB2Jf.mjs +1 -0
  14. package/dist/public/assets/{AccountSection-Bo4dPyFQ.js → AccountSection-Db0Y5FdS.js} +1 -1
  15. package/dist/public/assets/{ActivityModeContent-CfexCY5K.js → ActivityModeContent-mBOOx8UW.js} +1 -1
  16. package/dist/public/assets/{ActivityPanelDiffView-BTB4On_E.js → ActivityPanelDiffView-CCS0Nkum.js} +1 -1
  17. package/dist/public/assets/{AddPropertiesButton-DhN1KHUi.js → AddPropertiesButton-BfMkFaFN.js} +2 -2
  18. package/dist/public/assets/{AgentConnectionsSection-BBrTu_Hd.js → AgentConnectionsSection-CFTMQXUz.js} +1 -1
  19. package/dist/public/assets/{AgentDiffPane-B4ONrFEX.js → AgentDiffPane-ePRfks7Y.js} +2 -2
  20. package/dist/public/assets/{AgentThreadClientBinder-BKZL1FEK.js → AgentThreadClientBinder-BoMnnONc.js} +1 -1
  21. package/dist/public/assets/{AppMenubar-vPHVy2jk.js → AppMenubar-Lz_2ECvw.js} +1 -1
  22. package/dist/public/assets/{AttachmentsSection-CCkTnF8H.js → AttachmentsSection-uNdpfwu0.js} +1 -1
  23. package/dist/public/assets/{BugReportHistory-DCPpzbO5.js → BugReportHistory-Cn1uopFw.js} +1 -1
  24. package/dist/public/assets/{BugReportHistoryDialog-D-QZYqdF.js → BugReportHistoryDialog-DOJthShd.js} +1 -1
  25. package/dist/public/assets/{CodeMirrorEditor-UCMRAMCV-gMzc3glM.js → CodeMirrorEditor-UCMRAMCV-NL0u-orr.js} +1 -1
  26. package/dist/public/assets/{CodeMirrorPropInput-C14KgbUB.js → CodeMirrorPropInput-BOdSzKYW.js} +3 -3
  27. package/dist/public/assets/{ConsentDialogBody-k0k7metW.js → ConsentDialogBody-XNb2G3na.js} +1 -1
  28. package/dist/public/assets/{ContentRulesSection-B9osiZ5e.js → ContentRulesSection-CHzdTm6j.js} +1 -1
  29. package/dist/public/assets/{DiffViewBoundary-DFNHnF7f.js → DiffViewBoundary-DS5sFg8l.js} +1 -1
  30. package/dist/public/assets/DocumentContext-BaFslp3W.js +108 -0
  31. package/dist/public/assets/{EditorModeToggle-lBQIZux4.js → EditorModeToggle-GDU_POcr.js} +1 -1
  32. package/dist/public/assets/{ExcalidrawDocEditor-DiwiWo-5.js → ExcalidrawDocEditor-DMwb_yqY.js} +1 -1
  33. package/dist/public/assets/FeedbackForm-h3WitRlc.js +1 -0
  34. package/dist/public/assets/{GraphPanel-4ARXQVWm.js → GraphPanel-BqNuC1PH.js} +1 -1
  35. package/dist/public/assets/{ImageAttachments-BDh-av0V.js → ImageAttachments-oSzqgO9z.js} +1 -1
  36. package/dist/public/assets/ImportSkillDialog-BSqbU7Ae.js +1 -0
  37. package/dist/public/assets/{LinkPreviewsSection-BCYSzx82.js → LinkPreviewsSection-Dq5WtXx_.js} +1 -1
  38. package/dist/public/assets/{LintConfigEditor-d7iNbkFu.js → LintConfigEditor-Q35D1bSH.js} +1 -1
  39. package/dist/public/assets/{LintingSection-BfQJhSqK.js → LintingSection-DQ0PGPlO.js} +1 -1
  40. package/dist/public/assets/{ManagedArtifactProperties-CgYx_raS.js → ManagedArtifactProperties-MA9oBq-2.js} +1 -1
  41. package/dist/public/assets/ManagedArtifactProperties-X-CbCRJf.js +1 -0
  42. package/dist/public/assets/{McpConsentDialogBody-9u-ImAfw.js → McpConsentDialogBody-xbsziJ8M.js} +1 -1
  43. package/dist/public/assets/{Mermaid-DqNhHNi1.js → Mermaid-CSQrzsa-.js} +2 -2
  44. package/dist/public/assets/{MermaidDocEditor-hIN30U4A.js → MermaidDocEditor-DLxjxh6u.js} +1 -1
  45. package/dist/public/assets/{MultiFileDiff-BFbTHRMN.js → MultiFileDiff-BPqKFglt.js} +1 -1
  46. package/dist/public/assets/{NetworkAccessSection-Bc1mBEpU.js → NetworkAccessSection-DX9o-uvH.js} +1 -1
  47. package/dist/public/assets/{OkCliPathRow-CIrEL7IY.js → OkCliPathRow-qha7ViCN.js} +1 -1
  48. package/dist/public/assets/{OkignoreSection-DplnnxQb.js → OkignoreSection-CQywQkmc.js} +1 -1
  49. package/dist/public/assets/{PageListContext-CbzXXblg.js → PageListContext-Bsok6Dkc.js} +1 -1
  50. package/dist/public/assets/{ProjectTemplatesSection-DYj1MFJG.js → ProjectTemplatesSection-BtUwaSYs.js} +1 -1
  51. package/dist/public/assets/{PropertyDisplayRow-DYZRoIHn.js → PropertyDisplayRow-DJsnpgG8.js} +1 -1
  52. package/dist/public/assets/{PublishToGitHubDialog-CWgik3XO.js → PublishToGitHubDialog-5MHJQrpq.js} +1 -1
  53. package/dist/public/assets/{ReportBugDialogBody-Bbd3DGIB.js → ReportBugDialogBody-Dx_LVm22.js} +1 -1
  54. package/dist/public/assets/{ReportBugMenuTrigger-DFg5tOG8.js → ReportBugMenuTrigger-xHppTUcT.js} +1 -1
  55. package/dist/public/assets/{SchemaConfigEditor-kryiWiDK.js → SchemaConfigEditor-BzQH91rB.js} +1 -1
  56. package/dist/public/assets/{SearchSection-Cj7FdFQQ.js → SearchSection-D-Pr_9-R.js} +1 -1
  57. package/dist/public/assets/{SessionsHost-B9gM79-g.js → SessionsHost-Bc4cskDH.js} +2 -2
  58. package/dist/public/assets/{SettingsDialogBody-CdmGZmCh.js → SettingsDialogBody-BIa5_zwI.js} +2 -2
  59. package/dist/public/assets/{ShareReceiveMissDialog-BydqiR7F.js → ShareReceiveMissDialog-CFVAh9nW.js} +1 -1
  60. package/dist/public/assets/{SharingSection-C-9tTPow.js → SharingSection-HnLTw3fT.js} +1 -1
  61. package/dist/public/assets/{SkillEditBanner-FV1XZks2.js → SkillEditBanner-BYQhRIjd.js} +1 -1
  62. package/dist/public/assets/{SkillForkDialog-BHqkO5bK.js → SkillForkDialog-Cp2VfBKT.js} +1 -1
  63. package/dist/public/assets/{SkillInstallMenu-DtXyIqB8.js → SkillInstallMenu-CsSIF4d7.js} +1 -1
  64. package/dist/public/assets/{SkillOriginInline-Z5JCe0T2.js → SkillOriginInline-DXmcEqEw.js} +2 -2
  65. package/dist/public/assets/{SkillPluginBundleDialog-XB1fO90e.js → SkillPluginBundleDialog-D8f_Pygy.js} +1 -1
  66. package/dist/public/assets/{SkillToolbarControls-KYUxZQNe.js → SkillToolbarControls-CTk9ooVZ.js} +1 -1
  67. package/dist/public/assets/{SkillUpdateConflictDialog-D_oqmK3K.js → SkillUpdateConflictDialog-BbujrDOD.js} +1 -1
  68. package/dist/public/assets/{SkillsManagerSection-DCJlhnvy.js → SkillsManagerSection-BQ6eCTsP.js} +1 -1
  69. package/dist/public/assets/{SlidesPluginSection-BhUKklqb.js → SlidesPluginSection-dXy1hGNp.js} +1 -1
  70. package/dist/public/assets/{SourceEditor-BIPGmkaK.js → SourceEditor-BUnCs6rW.js} +1 -1
  71. package/dist/public/assets/{SpellingSettings-DhyHqpT4.js → SpellingSettings-Bqz9pslj.js} +1 -1
  72. package/dist/public/assets/{SyncSection-CPLGR0K4.js → SyncSection-KBplRgYc.js} +1 -1
  73. package/dist/public/assets/{SyncStatusBadge-Co74i3q_.js → SyncStatusBadge-jRLOv6OZ.js} +1 -1
  74. package/dist/public/assets/{TerminalPanel-Bj0ZrCsM.js → TerminalPanel-DYxs61YB.js} +1 -1
  75. package/dist/public/assets/{TerminalSection-DEVYY41F.js → TerminalSection-C3kz8ltC.js} +1 -1
  76. package/dist/public/assets/{TerminalWindowApp-XRrhf3K3.js → TerminalWindowApp-v86NLljc.js} +1 -1
  77. package/dist/public/assets/{TextDocEditor-Eqrxtsiw.js → TextDocEditor-1q9gEeRK.js} +1 -1
  78. package/dist/public/assets/{ThemePluginSection-DvtPYcRy.js → ThemePluginSection-DyuaEmFe.js} +1 -1
  79. package/dist/public/assets/{ThreadView-CDE0BRUz.js → ThreadView-DFt4WifR.js} +10 -10
  80. package/dist/public/assets/{TimelineDiffPane-CLScmppv.js → TimelineDiffPane-DNZGTsLz.js} +2 -2
  81. package/dist/public/assets/{abnfDiagram-N423BO3Z-DxZ-Koze.js → abnfDiagram-N423BO3Z-DtxRG9UX.js} +1 -1
  82. package/dist/public/assets/{architectureDiagram-T3A2C74G-kC-V7IMi.js → architectureDiagram-T3A2C74G-wLxYdHFB.js} +1 -1
  83. package/dist/public/assets/{blockDiagram-VBNYF7ZC-BKEhT33t.js → blockDiagram-VBNYF7ZC-Pjeu3MNP.js} +1 -1
  84. package/dist/public/assets/{bug-report-send-manager-DWzqdFH7.js → bug-report-send-manager-BAnvVPby.js} +1 -1
  85. package/dist/public/assets/{c4Diagram-5PPSVZJV-Do2HOyes.js → c4Diagram-5PPSVZJV-DE3wsCgr.js} +1 -1
  86. package/dist/public/assets/channel-C3dKvFV5.js +1 -0
  87. package/dist/public/assets/{chunk-2GRJ4B5K-S_oJ0t4y.js → chunk-2GRJ4B5K-ClzGKqzp.js} +1 -1
  88. package/dist/public/assets/{chunk-3NCLNEKW-D5wa2WAP.js → chunk-3NCLNEKW-jfRpWNZt.js} +1 -1
  89. package/dist/public/assets/{chunk-4I5QYGJK-Dp669PmE.js → chunk-4I5QYGJK-BvE0r05N.js} +1 -1
  90. package/dist/public/assets/{chunk-5RXB4S5H-DRiK0ixI.js → chunk-5RXB4S5H-gTApSFEx.js} +1 -1
  91. package/dist/public/assets/{chunk-6Q2QTUOP-CDDzU8ni.js → chunk-6Q2QTUOP-qvPNNDVk.js} +1 -1
  92. package/dist/public/assets/{chunk-7Z6QIM7H-riu23jJK.js → chunk-7Z6QIM7H-rwCNkfVu.js} +1 -1
  93. package/dist/public/assets/{chunk-BO2N2NFS-D_QMFEED.js → chunk-BO2N2NFS-De4FWds-.js} +4 -4
  94. package/dist/public/assets/{chunk-GF5L2VYU-CcvARaXd.js → chunk-GF5L2VYU-BBflv717.js} +1 -1
  95. package/dist/public/assets/{chunk-I66GZJ75-Mkx0wAj8.js → chunk-I66GZJ75-CJhve8_m.js} +1 -1
  96. package/dist/public/assets/{chunk-J7OUQ5F2-B_dGIV0c.js → chunk-J7OUQ5F2-DS7HkZLi.js} +2 -2
  97. package/dist/public/assets/{chunk-JQJVKLGR-DzOLtgmE.js → chunk-JQJVKLGR-CHVgYkog.js} +1 -1
  98. package/dist/public/assets/{chunk-KBJHAD2P-ByDw6A4K.js → chunk-KBJHAD2P-DK3QrMpY.js} +1 -1
  99. package/dist/public/assets/{chunk-NSK5VX7P-BytRcAia.js → chunk-NSK5VX7P-CcEZtfre.js} +1 -1
  100. package/dist/public/assets/{chunk-QR6OTTB3-D8za8qsa.js → chunk-QR6OTTB3-qF4HoiE9.js} +1 -1
  101. package/dist/public/assets/{chunk-UBXNYLIW-BikKpxC2.js → chunk-UBXNYLIW-CGvZjPjz.js} +1 -1
  102. package/dist/public/assets/{chunk-W5SLKNZC-D_CrJ8tI.js → chunk-W5SLKNZC-Dw_hS9zr.js} +1 -1
  103. package/dist/public/assets/{chunk-WRU74C26-D5Y_Dzwm.js → chunk-WRU74C26-Ct6yd0-T.js} +1 -1
  104. package/dist/public/assets/classDiagram-JCYQIIEL-BuTWccfh.js +1 -0
  105. package/dist/public/assets/classDiagram-v2-OCEON4UE-xIsJuttE.js +1 -0
  106. package/dist/public/assets/{client-version-V5JX2_9H.js → client-version-BIIcXp-F.js} +1 -1
  107. package/dist/public/assets/{cm-theme-Dml6DrPs.js → cm-theme-DY245iRg.js} +1 -1
  108. package/dist/public/assets/{code-highlighter-impl-y1C6ECDp.js → code-highlighter-impl-CrzNiVvD.js} +1 -1
  109. package/dist/public/assets/{comment-chips-B6PiUF0P.js → comment-chips-DMkDjrn6.js} +1 -1
  110. package/dist/public/assets/{config-provider-CY8rv6VT.js → config-provider-B7giKNZc.js} +1 -1
  111. package/dist/public/assets/{cynefinDiagram-MW4NZA55-C5F835a_.js → cynefinDiagram-MW4NZA55-BlRVUElT.js} +1 -1
  112. package/dist/public/assets/{dagre-VZM6K2ZE-Bhk3ecW_.js → dagre-VZM6K2ZE-DFuv-cK6.js} +1 -1
  113. package/dist/public/assets/{diagram-7IWD3JNH-DvWl2aZ9.js → diagram-7IWD3JNH-BM0WTGbx.js} +1 -1
  114. package/dist/public/assets/{diagram-B4RE2ZJO-DvkMsKBc.js → diagram-B4RE2ZJO-CKPW7n8V.js} +1 -1
  115. package/dist/public/assets/{diagram-LBJQPF4R-BU8SmhWa.js → diagram-LBJQPF4R-BGJO2kEk.js} +1 -1
  116. package/dist/public/assets/{diagram-Q27KOJAE-BLJoDpTp.js → diagram-Q27KOJAE-s8QuJeNx.js} +1 -1
  117. package/dist/public/assets/{diagram-UB23O5K3-BEJov894.js → diagram-UB23O5K3-B0i1xg24.js} +1 -1
  118. package/dist/public/assets/{dist-Bw3EnfRK.js → dist-8cadZTcN.js} +1 -1
  119. package/dist/public/assets/{dist-CRnJUJYV.js → dist-B1oPuPz8.js} +1 -1
  120. package/dist/public/assets/{dist-DL4JUOn7.js → dist-B3DJFAAc.js} +1 -1
  121. package/dist/public/assets/{dist-DxN51Ana2.js → dist-BIq0_yiu2.js} +1 -1
  122. package/dist/public/assets/{dist-BxVTbkVl.js → dist-C3P7yzPg.js} +1 -1
  123. package/dist/public/assets/{dist-urhiDaCp.js → dist-CwnKas8E.js} +1 -1
  124. package/dist/public/assets/{dist-nSDmHl8c.js → dist-D0egXYuQ.js} +1 -1
  125. package/dist/public/assets/{dist-CtBRIMC4.js → dist-DNUUqdDe.js} +1 -1
  126. package/dist/public/assets/{dist-Jw9rDwKW.js → dist-DchonWFB.js} +1 -1
  127. package/dist/public/assets/{dist-LjMlqXYz.js → dist-DhRS7v2X.js} +1 -1
  128. package/dist/public/assets/{dist-CBBf5U_8.js → dist-Dn7hbatR.js} +1 -1
  129. package/dist/public/assets/{dist-D2c3re7d.js → dist-MW_4cYgC.js} +1 -1
  130. package/dist/public/assets/dist-ei2QQdZM.js +1 -0
  131. package/dist/public/assets/{dist-DTvyxWzB.js → dist-pOXH7Izb.js} +1 -1
  132. package/dist/public/assets/{dist-BjL32yBS.js → dist-rrfJUNqT.js} +1 -1
  133. package/dist/public/assets/{doc-undo-manager-BgNKZ6KQ.js → doc-undo-manager-PHzC2AmJ.js} +1 -1
  134. package/dist/public/assets/{ebnfDiagram-BXEA7PRR-CCNI1OBw.js → ebnfDiagram-BXEA7PRR-BMJ-QLYi.js} +1 -1
  135. package/dist/public/assets/{engine-compile-DCFDOxYT.js → engine-compile-D75sBEQx.js} +1 -1
  136. package/dist/public/assets/{erDiagram-JOGREHBK-s9FPNXy0.js → erDiagram-JOGREHBK-B7RLRxay.js} +1 -1
  137. package/dist/public/assets/field-controls-BpWrodXJ.js +1 -0
  138. package/dist/public/assets/{field-controls-DtQ6Aw_j.js → field-controls-D31F23S8.js} +1 -1
  139. package/dist/public/assets/{file-tree-adapter-DC-yGI9s.js → file-tree-adapter-B_KOESNY.js} +1 -1
  140. package/dist/public/assets/flowDiagram-UKHOOZJN-DATdWVJi.js +1 -0
  141. package/dist/public/assets/{ganttDiagram-PKOTCBZU-tQng7xZg.js → ganttDiagram-PKOTCBZU-CmzX9pwR.js} +1 -1
  142. package/dist/public/assets/{gitGraphDiagram-DS77QQ5N-0oGaI7oi.js → gitGraphDiagram-DS77QQ5N-Dkk025kT.js} +1 -1
  143. package/dist/public/assets/globals-Bwyn_Aih.css +1 -0
  144. package/dist/public/assets/{highlighted-body-OFNGDK62-BwM9yU73.js → highlighted-body-OFNGDK62-CNZlBSJb.js} +1 -1
  145. package/dist/public/assets/{image-attachment-CkuQ83TY.js → image-attachment-BPChXLGL.js} +1 -1
  146. package/dist/public/assets/{ime-composition-DSJh5ynW.js → ime-composition-B56Lnl92.js} +1 -1
  147. package/dist/public/assets/{index-zyBtEQ0N.js → index-D9p_dx5H.js} +16 -16
  148. package/dist/public/assets/{infoDiagram-6WML65LV-DQIEucLv.js → infoDiagram-6WML65LV-Ba5SAnnJ.js} +1 -1
  149. package/dist/public/assets/{ishikawaDiagram-WSZJBQD7-Qb2IAMef.js → ishikawaDiagram-WSZJBQD7-DPN71z8-.js} +1 -1
  150. package/dist/public/assets/{journeyDiagram-NVQOT4AX-8_jX-C8a.js → journeyDiagram-NVQOT4AX-DqPWIdSs.js} +1 -1
  151. package/dist/public/assets/{kanban-definition-27J2QSJJ-CEEYwllg.js → kanban-definition-27J2QSJJ-Yb-w6MLu.js} +1 -1
  152. package/dist/public/assets/{lib-CHTgVmKZ.js → lib-B4aE3tlX.js} +1 -1
  153. package/dist/public/assets/{lib-BiDTxxNs.js → lib-BZo-U1ex.js} +1 -1
  154. package/dist/public/assets/{lib-DggJrklf.js → lib-CUUpVIaO.js} +1 -1
  155. package/dist/public/assets/{line-BsarArEL.js → line-DSgqlaou.js} +1 -1
  156. package/dist/public/assets/{lint-config-client-DZxh6x0d.js → lint-config-client-CLttd-hM.js} +1 -1
  157. package/dist/public/assets/{lint-plugins-D1JSXJl8.js → lint-plugins-CFqN0r2X.js} +1 -1
  158. package/dist/public/assets/{markdown-lint-CYB8LZHY.js → markdown-lint-wCP_bSbs.js} +3 -3
  159. package/dist/public/assets/{markdownlint-rule-browser-BHLBJ88w.js → markdownlint-rule-browser-nIryvJXe.js} +1 -1
  160. package/dist/public/assets/mermaid-GHXKKRXX-BmxFNCbl.js +1 -0
  161. package/dist/public/assets/{mermaid.core-CyLGJzps.js → mermaid.core-kyxAVtOe.js} +3 -3
  162. package/dist/public/assets/mermaid.core-vijUbFeL.js +1 -0
  163. package/dist/public/assets/{mindmap-definition-FAOFIHXS-CtH6yYX-.js → mindmap-definition-FAOFIHXS-WaeBxEI3.js} +1 -1
  164. package/dist/public/assets/{navigation-targets-DSSJ_2xi.js → navigation-targets-wIVrXum1.js} +1 -1
  165. package/dist/public/assets/{page-list-cache-p7dO1d0k.js → page-list-cache-DjTjuoEq.js} +1 -1
  166. package/dist/public/assets/{pegDiagram-VL7TDLO6-DlYnsUKl.js → pegDiagram-VL7TDLO6-CtHls9u3.js} +1 -1
  167. package/dist/public/assets/{pending-receive-nav-store-DDsjXMmg.js → pending-receive-nav-store-CEqPw9Ws.js} +1 -1
  168. package/dist/public/assets/{pieDiagram-7S7Q4E2Y-BDatfRsc.js → pieDiagram-7S7Q4E2Y-DExDDy1k.js} +1 -1
  169. package/dist/public/assets/{pierre-theme-DzTcpkj5.js → pierre-theme-BcjBYmHp.js} +1 -1
  170. package/dist/public/assets/{preferred-session-events-YlTzEpA1.js → preferred-session-events-CIXvQFyG.js} +1 -1
  171. package/dist/public/assets/{prod-CN58f7_5.js → prod-TDqup_vF.js} +5 -5
  172. package/dist/public/assets/{progress-fe7kZ4GR.js → progress-gj6w_kTR.js} +1 -1
  173. package/dist/public/assets/{project-paths-BFzGZn4G.js → project-paths-DtCPeXsO.js} +1 -1
  174. package/dist/public/assets/{quadrantDiagram-CIZ2JOQS-DqK8f_ul.js → quadrantDiagram-CIZ2JOQS-jtaC898v.js} +1 -1
  175. package/dist/public/assets/{railroadDiagram-AXF67PYL-BRhbMHP6.js → railroadDiagram-AXF67PYL-Cu9VIEoH.js} +1 -1
  176. package/dist/public/assets/{requirementDiagram-LRYGKXZP-vdezDb9X.js → requirementDiagram-LRYGKXZP-Ai-HpF_c.js} +1 -1
  177. package/dist/public/assets/{restart-collab-server-D_8KLQoA.js → restart-collab-server-CHlRP7RK.js} +1 -1
  178. package/dist/public/assets/{sankeyDiagram-W5VNT64P-C57JgB9L.js → sankeyDiagram-W5VNT64P-CMNt1Rab.js} +1 -1
  179. package/dist/public/assets/{schema-section-DUv4SBzP.js → schema-section-Ceiv9_HZ.js} +1 -1
  180. package/dist/public/assets/{selection-context-CJj4QU9m.js → selection-context-DRmEMsEZ.js} +1 -1
  181. package/dist/public/assets/{sequenceDiagram-SI44F4Z6-BuLkAztr.js → sequenceDiagram-SI44F4Z6-CBkryIPb.js} +1 -1
  182. package/dist/public/assets/{sign-in-terminal-events-BjvOWBuh.js → sign-in-terminal-events-D1Wi4Xw6.js} +1 -1
  183. package/dist/public/assets/{single-file-mode-_W9sHrBm.js → single-file-mode-BxiPl4Ah.js} +1 -1
  184. package/dist/public/assets/{skeleton-CrbF9ppq.js → skeleton-izVZCkjV.js} +1 -1
  185. package/dist/public/assets/{src-DHA7yznt.js → src-CVi-8D7H.js} +1 -1
  186. package/dist/public/assets/{stateDiagram-OKZ733FA-DXk5EfyR.js → stateDiagram-OKZ733FA-DEf6Fks3.js} +1 -1
  187. package/dist/public/assets/stateDiagram-v2-UEYNNEHI-ZjpHqFIy.js +1 -0
  188. package/dist/public/assets/{swimlanes-SLNWSIFB-CMmm9y1W.js → swimlanes-SLNWSIFB-BgtzsnGU.js} +1 -1
  189. package/dist/public/assets/swimlanesDiagram-ULZ7WXOC-BvPT90kO.js +8 -0
  190. package/dist/public/assets/{syntax-YjkwC8Y2.js → syntax-DSW4pYwe.js} +1 -1
  191. package/dist/public/assets/{tag-pill-input-qgfgpKpV.js → tag-pill-input-D_fe_Zbo.js} +1 -1
  192. package/dist/public/assets/{target-navigation-intent-D1w61eVY.js → target-navigation-intent-Bh2lFZbu.js} +1 -1
  193. package/dist/public/assets/{telemetry-impl-BoQfVHFh.js → telemetry-impl-62LVdmmL.js} +1 -1
  194. package/dist/public/assets/{telemetry-startup-BePJfd1G.js → telemetry-startup-CbVoQQGP.js} +1 -1
  195. package/dist/public/assets/{text-viewer-languages-BpNCtJFb.js → text-viewer-languages-CKtwqOI2.js} +2 -2
  196. package/dist/public/assets/{thread-client-CySNJ-9g.js → thread-client-BCtL-FWj.js} +1 -1
  197. package/dist/public/assets/{timeline-definition-Z64GVDOM-Bu9qjWc1.js → timeline-definition-Z64GVDOM-fW0Ws4bU.js} +1 -1
  198. package/dist/public/assets/{trim-lines-6NHDbF9s.js → trim-lines-BXDvYbHZ.js} +1 -1
  199. package/dist/public/assets/{typing-burst-detector-DEB_IQXO.js → typing-burst-detector-WWwAiWAb.js} +3 -3
  200. package/dist/public/assets/{uninstall-DnITG12q.js → uninstall-DyYmGM9i.js} +1 -1
  201. package/dist/public/assets/{use-activity-panel-DmN2jwm1.js → use-activity-panel-B5VoL2zJ.js} +1 -1
  202. package/dist/public/assets/{use-collab-url-BWFGjvvU.js → use-collab-url-BDpItMkY.js} +1 -1
  203. package/dist/public/assets/{use-installed-clis-IB8iDaEn.js → use-installed-clis-D3LjLTuG.js} +2 -2
  204. package/dist/public/assets/{use-open-skill-D8ppWfzv.js → use-open-skill-BztMkDbq.js} +1 -1
  205. package/dist/public/assets/{use-skill-origin-B9YRoKsz.js → use-skill-origin-CiJpOXFq.js} +1 -1
  206. package/dist/public/assets/{use-skill-targets-DZmqRDS7.js → use-skill-targets-EVebu2kh.js} +1 -1
  207. package/dist/public/assets/{use-skills-CkvdjORj.js → use-skills-BWAh3dDS.js} +1 -1
  208. package/dist/public/assets/{use-terminal-enabled-CnYgBQu6.js → use-terminal-enabled-CfpnEp8D.js} +1 -1
  209. package/dist/public/assets/{use-timeline-entry-diff-Bj9IKZ0j.js → use-timeline-entry-diff-CLuh0nLL.js} +1 -1
  210. package/dist/public/assets/{vennDiagram-T6HMQDX7-DZCyigDG.js → vennDiagram-T6HMQDX7-Q3FtvMIj.js} +1 -1
  211. package/dist/public/assets/{wardleyDiagram-T6FBY63Y-BabyWrgB.js → wardleyDiagram-T6FBY63Y-C5C7LOLR.js} +1 -1
  212. package/dist/public/assets/{xychartDiagram-ELKLHX3M-8objR63x.js → xychartDiagram-ELKLHX3M-WBJDnI7r.js} +1 -1
  213. package/dist/public/index.html +98 -98
  214. package/dist/public/uninstall.html +3 -3
  215. package/dist/{registry-probes-DjoTkaRp.mjs → registry-probes-BbWNGKfd.mjs} +1 -1
  216. package/dist/{removal-file-path-C3qKjXP1.mjs → removal-file-path-Cvsoz35t.mjs} +1 -1
  217. package/dist/{repair-launch-json-BLLbBwuS.mjs → repair-launch-json-C4WV8ng6.mjs} +1 -1
  218. package/dist/{repair-mcp-configs-Du599MHw.mjs → repair-mcp-configs-BBPwpkkl.mjs} +1 -1
  219. package/dist/src-DQ9BvUF9.mjs +1 -0
  220. package/dist/{src-CV7s8o8N.mjs → src-DtfcZBsp.mjs} +1 -1
  221. package/dist/{start-WZZeXyQg.mjs → start-D-wMeTj8.mjs} +3 -3
  222. package/dist/start-DWFGBNZm.mjs +1 -0
  223. package/package.json +4 -4
  224. package/dist/constants-BHRHFiiA.mjs +0 -1
  225. package/dist/init-D8PiEGEU.mjs +0 -1
  226. package/dist/loader-CjDr4LBh.mjs +0 -1
  227. package/dist/preview-Bb3fqNig.mjs +0 -1
  228. package/dist/public/assets/DocumentContext-B534Taw0.js +0 -108
  229. package/dist/public/assets/FeedbackForm-DN-7wKfh.js +0 -1
  230. package/dist/public/assets/ImportSkillDialog-gWGVsUXL.js +0 -1
  231. package/dist/public/assets/ManagedArtifactProperties-D0kvL_kU.js +0 -1
  232. package/dist/public/assets/channel-pAazZ6IO.js +0 -1
  233. package/dist/public/assets/classDiagram-JCYQIIEL-DkFvSY54.js +0 -1
  234. package/dist/public/assets/classDiagram-v2-OCEON4UE-CDzbe5RX.js +0 -1
  235. package/dist/public/assets/dist-B5Lgn--k.js +0 -1
  236. package/dist/public/assets/field-controls-DShsojhy.js +0 -1
  237. package/dist/public/assets/flowDiagram-UKHOOZJN-B24oe-HH.js +0 -1
  238. package/dist/public/assets/globals-kLKgmkBv.css +0 -1
  239. package/dist/public/assets/mermaid-GHXKKRXX-C2B7_ENC.js +0 -1
  240. package/dist/public/assets/mermaid.core-B351QNJ8.js +0 -1
  241. package/dist/public/assets/stateDiagram-v2-UEYNNEHI-DbQ9-zRG.js +0 -1
  242. package/dist/public/assets/swimlanesDiagram-ULZ7WXOC-p2VXN9vA.js +0 -8
  243. package/dist/src-C3wvr_Qn.mjs +0 -1
  244. package/dist/start-B6ETYSpw.mjs +0 -1
  245. /package/dist/public/assets/{AuthModal-YZGpNH__.js → AuthModal-CDv9Ka9d.js} +0 -0
  246. /package/dist/public/assets/{ConfigSharingInfoTooltip-DSloJmkE.js → ConfigSharingInfoTooltip-DySl2X4f.js} +0 -0
  247. /package/dist/public/assets/{CopyButton-BTy3joJd.js → CopyButton-BQkeo9bl.js} +0 -0
  248. /package/dist/public/assets/{RowDisclosure-Bj2sD4-N.js → RowDisclosure-BIxlyswE.js} +0 -0
  249. /package/dist/public/assets/{TemplateRow-B04s7sdl.js → TemplateRow-CQTK4uJX.js} +0 -0
  250. /package/dist/public/assets/{acp-thread-protocol-DEJR583g.js → acp-thread-protocol-CWbl02Jp.js} +0 -0
  251. /package/dist/public/assets/{agent-diff-store-Bxx1cLWW.js → agent-diff-store-B_PHpjoM.js} +0 -0
  252. /package/dist/public/assets/{agent-launcher-labels-CKZLww6j.js → agent-launcher-labels-WHKiZE2H.js} +0 -0
  253. /package/dist/public/assets/{agent-presence-BB8MLPTF.js → agent-presence-DttIZzMw.js} +0 -0
  254. /package/dist/public/assets/{api-config-BeqD_2Y2.js → api-config-DY0IQM13.js} +0 -0
  255. /package/dist/public/assets/{ccount-DGTHxXcy.js → ccount-D2axTgHX.js} +0 -0
  256. /package/dist/public/assets/{channel-cli-copy-DOAEiMde.js → channel-cli-copy-BySq87hR.js} +0 -0
  257. /package/dist/public/assets/{clipboard-adapter-C8gKg_7K.js → clipboard-adapter-BzEuR0hT.js} +0 -0
  258. /package/dist/public/assets/{contact-email-store-Cr7VN6uy.js → contact-email-store-K5cpIvvi.js} +0 -0
  259. /package/dist/public/assets/{context-menu-B5MxEep2.js → context-menu-DSlq1GYo.js} +0 -0
  260. /package/dist/public/assets/{desktop-bridge-p6CFXLIz.js → desktop-bridge-BJzXwZwD.js} +0 -0
  261. /package/dist/public/assets/{dist-BosZaL03.js → dist-B8KZUrr_.js} +0 -0
  262. /package/dist/public/assets/{doc-paths-DiEZR__C.js → doc-paths-5ibOUcTo.js} +0 -0
  263. /package/dist/public/assets/{documents-fetch-BPNWNaEf.js → documents-fetch-C22H7c-g.js} +0 -0
  264. /package/dist/public/assets/{excalidraw-scene-7qRUVF00.js → excalidraw-scene-DKlZeb8o.js} +0 -0
  265. /package/dist/public/assets/{file-tree-rename-validation-DAMy4Ak1.js → file-tree-rename-validation-Cpa_Vek-.js} +0 -0
  266. /package/dist/public/assets/{globals-CcgTjZMO.js → globals-DcxxoWPt.js} +0 -0
  267. /package/dist/public/assets/{katex-Diqujmde.js → katex-DUOilEXW.js} +0 -0
  268. /package/dist/public/assets/{known-skill-dirs-WpNGuhvr.js → known-skill-dirs-DNpdjBsx.js} +0 -0
  269. /package/dist/public/assets/{lazy-with-preload-D9fROG5C.js → lazy-with-preload-Ct49YkMK.js} +0 -0
  270. /package/dist/public/assets/{lib-DjmHwbg0.js → lib-CYXogIvt.js} +0 -0
  271. /package/dist/public/assets/{lib-qLdVx2Nx.js → lib-DlCf5-vZ.js} +0 -0
  272. /package/dist/public/assets/{markdownit-BNu6K0Lc.js → markdownit-Ck6NoOTM.js} +0 -0
  273. /package/dist/public/assets/{open-managed-artifact-tab-Bgndx1BG.js → open-managed-artifact-tab-Bt4fZblC.js} +0 -0
  274. /package/dist/public/assets/{panel-4D0jDR6z.js → panel-dxdTyKXc.js} +0 -0
  275. /package/dist/public/assets/{skill-scope-DOTLd4gL.js → skill-scope-DlzReYLC.js} +0 -0
  276. /package/dist/public/assets/{skills-api-CCijBzjo.js → skills-api-DjykKWn7.js} +0 -0
  277. /package/dist/public/assets/{space-separated-tokens-BMeAno6f.js → space-separated-tokens-DnBNyEmh.js} +0 -0
  278. /package/dist/public/assets/{startup-marks-Cb3e8PuI.js → startup-marks-DLk8fGL-.js} +0 -0
  279. /package/dist/public/assets/{stex-BAMK64Qm.js → stex-C0vEAtfn.js} +0 -0
  280. /package/dist/public/assets/{terminal-cli-display-Irv_lU4O.js → terminal-cli-display-nVuidfOl.js} +0 -0
  281. /package/dist/public/assets/{use-semantic-search-status-7_z6UOU1.js → use-semantic-search-status-D9HCPCCa.js} +0 -0
@@ -1,3 +1,3 @@
1
- import{o as e,t}from"./chunk-CYidjpOJ.js";import{A as n,E as r,O as i,w as a}from"./lib-CHTgVmKZ.js";var o=e(t(((e,t)=>{(function(){var e=t===void 0?function(){return this||(0,eval)(`this`)}():t.exports=i;e.format=i,e.vsprintf=r,typeof console<`u`&&typeof console.log==`function`&&(e.printf=n);function n(){console.log(i.apply(null,arguments))}function r(e,t){return i.apply(null,[e].concat(t))}function i(e){for(var t=1,n=[].slice.call(arguments),r=0,i=e.length,a=``,o,s=!1,c,l,u=!1,d,f=function(){return n[t++]},p=function(){for(var t=``;/\d/.test(e[r]);)t+=e[r++],o=e[r];return t.length>0?parseInt(t):null};r<i;++r)if(o=e[r],s)switch(s=!1,o==`.`?(u=!1,o=e[++r]):o==`0`&&e[r+1]==`.`?(u=!0,r+=2,o=e[r]):u=!0,d=p(),o){case`b`:a+=parseInt(f(),10).toString(2);break;case`c`:c=f(),typeof c==`string`||c instanceof String?a+=c:a+=String.fromCharCode(parseInt(c,10));break;case`d`:a+=parseInt(f(),10);break;case`f`:l=String(parseFloat(f()).toFixed(d||6)),a+=u?l:l.replace(/^0/,``);break;case`j`:a+=JSON.stringify(f());break;case`o`:a+=`0`+parseInt(f(),10).toString(8);break;case`s`:a+=f();break;case`x`:a+=`0x`+parseInt(f(),10).toString(16);break;case`X`:a+=`0x`+parseInt(f(),10).toString(16).toUpperCase();break;default:a+=o;break}else o===`%`?s=!0:a+=o;return a}})()}))(),1),s=Object.assign(c(Error),{eval:c(EvalError),range:c(RangeError),reference:c(ReferenceError),syntax:c(SyntaxError),type:c(TypeError),uri:c(URIError)});function c(e){return t.displayName=e.displayName||e.name,t;function t(t,...n){return new e(t&&(0,o.default)(t,...n))}}var l={}.hasOwnProperty,u={yaml:`-`,toml:`+`};function d(e){let t=[],n=-1,r=Array.isArray(e)?e:e?[e]:[`yaml`];for(;++n<r.length;)t[n]=f(r[n]);return t}function f(e){let t=e;if(typeof t==`string`){if(!l.call(u,t))throw s("Missing matter definition for `%s`",t);t={type:t,marker:u[t]}}else if(typeof t!=`object`)throw s("Expected matter to be an object, not `%j`",t);if(!l.call(t,`type`))throw s("Missing `type` in matter `%j`",t);if(!l.call(t,`fence`)&&!l.call(t,`marker`))throw s("Missing `marker` or `fence` in matter `%j`",t);return t}function p(e){let t=d(e),n={},r=-1;for(;++r<t.length;){let e=t[r],i=h(e,`open`).charCodeAt(0),a=m(e),o=n[i];Array.isArray(o)?o.push(a):n[i]=[a]}return{flow:n}}function m(e){let t=e.anywhere,r=e.type,a=r+`Fence`,o=a+`Sequence`,s=r+`Value`,c={tokenize:f,partial:!0},l,u=0;return{tokenize:d,concrete:!0};function d(d,f,p){let m=this;return g;function g(n){let i=m.now();return i.column===1&&(i.line===1||t)&&(l=h(e,`open`),u=0,n===l.charCodeAt(u))?(d.enter(r),d.enter(a),d.enter(o),_(n)):p(n)}function _(e){return u===l.length?(d.exit(o),n(e)?(d.enter(`whitespace`),v(e)):y(e)):e===l.charCodeAt(u++)?(d.consume(e),_):p(e)}function v(e){return n(e)?(d.consume(e),v):(d.exit(`whitespace`),y(e))}function y(t){return i(t)?(d.exit(a),d.enter(`lineEnding`),d.consume(t),d.exit(`lineEnding`),l=h(e,`close`),u=0,d.attempt(c,C,b)):p(t)}function b(e){return e===null||i(e)?S(e):(d.enter(s),x(e))}function x(e){return e===null||i(e)?(d.exit(s),S(e)):(d.consume(e),x)}function S(e){return e===null?p(e):(d.enter(`lineEnding`),d.consume(e),d.exit(`lineEnding`),d.attempt(c,C,b))}function C(e){return d.exit(r),f(e)}}function f(e,t,r){let s=0;return c;function c(t){return t===l.charCodeAt(s)?(e.enter(a),e.enter(o),u(t)):r(t)}function u(t){return s===l.length?(e.exit(o),n(t)?(e.enter(`whitespace`),d(t)):f(t)):t===l.charCodeAt(s++)?(e.consume(t),u):r(t)}function d(t){return n(t)?(e.consume(t),d):(e.exit(`whitespace`),f(t))}function f(n){return n===null||i(n)?(e.exit(a),t(n)):r(n)}}}function h(e,t){return e.marker?g(e.marker,t).repeat(3):g(e.fence,t)}function g(e,t){return typeof e==`string`?e:e[t]}function _(e){let t=d(e),n={},r={},i=-1;for(;++i<t.length;){let e=t[i];n[e.type]=v(e),r[e.type]=y,r[e.type+`Value`]=b}return{enter:n,exit:r}}function v(e){return t;function t(t){this.enter({type:e.type,value:``},t),this.buffer()}}function y(e){let t=this.resume(),n=this.stack[this.stack.length-1];`value`in n,this.exit(e),n.value=t.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``)}function b(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function x(e){let t=[],n={},r=d(e),i=-1;for(;++i<r.length;){let e=r[i];n[e.type]=S(e);let o=C(e,`open`);t.push({atBreak:!0,character:o.charAt(0),after:a(o.charAt(1))})}return{unsafe:t,handlers:n}}function S(e){let t=C(e,`open`),n=C(e,`close`);return r;function r(e){return t+(e.value?`
1
+ import{o as e,t}from"./chunk-CYidjpOJ.js";import{A as n,E as r,O as i,w as a}from"./lib-B4aE3tlX.js";var o=e(t(((e,t)=>{(function(){var e=t===void 0?function(){return this||(0,eval)(`this`)}():t.exports=i;e.format=i,e.vsprintf=r,typeof console<`u`&&typeof console.log==`function`&&(e.printf=n);function n(){console.log(i.apply(null,arguments))}function r(e,t){return i.apply(null,[e].concat(t))}function i(e){for(var t=1,n=[].slice.call(arguments),r=0,i=e.length,a=``,o,s=!1,c,l,u=!1,d,f=function(){return n[t++]},p=function(){for(var t=``;/\d/.test(e[r]);)t+=e[r++],o=e[r];return t.length>0?parseInt(t):null};r<i;++r)if(o=e[r],s)switch(s=!1,o==`.`?(u=!1,o=e[++r]):o==`0`&&e[r+1]==`.`?(u=!0,r+=2,o=e[r]):u=!0,d=p(),o){case`b`:a+=parseInt(f(),10).toString(2);break;case`c`:c=f(),typeof c==`string`||c instanceof String?a+=c:a+=String.fromCharCode(parseInt(c,10));break;case`d`:a+=parseInt(f(),10);break;case`f`:l=String(parseFloat(f()).toFixed(d||6)),a+=u?l:l.replace(/^0/,``);break;case`j`:a+=JSON.stringify(f());break;case`o`:a+=`0`+parseInt(f(),10).toString(8);break;case`s`:a+=f();break;case`x`:a+=`0x`+parseInt(f(),10).toString(16);break;case`X`:a+=`0x`+parseInt(f(),10).toString(16).toUpperCase();break;default:a+=o;break}else o===`%`?s=!0:a+=o;return a}})()}))(),1),s=Object.assign(c(Error),{eval:c(EvalError),range:c(RangeError),reference:c(ReferenceError),syntax:c(SyntaxError),type:c(TypeError),uri:c(URIError)});function c(e){return t.displayName=e.displayName||e.name,t;function t(t,...n){return new e(t&&(0,o.default)(t,...n))}}var l={}.hasOwnProperty,u={yaml:`-`,toml:`+`};function d(e){let t=[],n=-1,r=Array.isArray(e)?e:e?[e]:[`yaml`];for(;++n<r.length;)t[n]=f(r[n]);return t}function f(e){let t=e;if(typeof t==`string`){if(!l.call(u,t))throw s("Missing matter definition for `%s`",t);t={type:t,marker:u[t]}}else if(typeof t!=`object`)throw s("Expected matter to be an object, not `%j`",t);if(!l.call(t,`type`))throw s("Missing `type` in matter `%j`",t);if(!l.call(t,`fence`)&&!l.call(t,`marker`))throw s("Missing `marker` or `fence` in matter `%j`",t);return t}function p(e){let t=d(e),n={},r=-1;for(;++r<t.length;){let e=t[r],i=h(e,`open`).charCodeAt(0),a=m(e),o=n[i];Array.isArray(o)?o.push(a):n[i]=[a]}return{flow:n}}function m(e){let t=e.anywhere,r=e.type,a=r+`Fence`,o=a+`Sequence`,s=r+`Value`,c={tokenize:f,partial:!0},l,u=0;return{tokenize:d,concrete:!0};function d(d,f,p){let m=this;return g;function g(n){let i=m.now();return i.column===1&&(i.line===1||t)&&(l=h(e,`open`),u=0,n===l.charCodeAt(u))?(d.enter(r),d.enter(a),d.enter(o),_(n)):p(n)}function _(e){return u===l.length?(d.exit(o),n(e)?(d.enter(`whitespace`),v(e)):y(e)):e===l.charCodeAt(u++)?(d.consume(e),_):p(e)}function v(e){return n(e)?(d.consume(e),v):(d.exit(`whitespace`),y(e))}function y(t){return i(t)?(d.exit(a),d.enter(`lineEnding`),d.consume(t),d.exit(`lineEnding`),l=h(e,`close`),u=0,d.attempt(c,C,b)):p(t)}function b(e){return e===null||i(e)?S(e):(d.enter(s),x(e))}function x(e){return e===null||i(e)?(d.exit(s),S(e)):(d.consume(e),x)}function S(e){return e===null?p(e):(d.enter(`lineEnding`),d.consume(e),d.exit(`lineEnding`),d.attempt(c,C,b))}function C(e){return d.exit(r),f(e)}}function f(e,t,r){let s=0;return c;function c(t){return t===l.charCodeAt(s)?(e.enter(a),e.enter(o),u(t)):r(t)}function u(t){return s===l.length?(e.exit(o),n(t)?(e.enter(`whitespace`),d(t)):f(t)):t===l.charCodeAt(s++)?(e.consume(t),u):r(t)}function d(t){return n(t)?(e.consume(t),d):(e.exit(`whitespace`),f(t))}function f(n){return n===null||i(n)?(e.exit(a),t(n)):r(n)}}}function h(e,t){return e.marker?g(e.marker,t).repeat(3):g(e.fence,t)}function g(e,t){return typeof e==`string`?e:e[t]}function _(e){let t=d(e),n={},r={},i=-1;for(;++i<t.length;){let e=t[i];n[e.type]=v(e),r[e.type]=y,r[e.type+`Value`]=b}return{enter:n,exit:r}}function v(e){return t;function t(t){this.enter({type:e.type,value:``},t),this.buffer()}}function y(e){let t=this.resume(),n=this.stack[this.stack.length-1];`value`in n,this.exit(e),n.value=t.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``)}function b(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function x(e){let t=[],n={},r=d(e),i=-1;for(;++i<r.length;){let e=r[i];n[e.type]=S(e);let o=C(e,`open`);t.push({atBreak:!0,character:o.charAt(0),after:a(o.charAt(1))})}return{unsafe:t,handlers:n}}function S(e){let t=C(e,`open`),n=C(e,`close`);return r;function r(e){return t+(e.value?`
2
2
  `+e.value:``)+`
3
3
  `+n}}function C(e,t){return e.marker?w(e.marker,t).repeat(3):w(e.fence,t)}function w(e,t){return typeof e==`string`?e:e[t]}var T=`yaml`;function E(e){let t=this,n=e||T,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(p(n)),a.push(_(n)),o.push(x(n))}var D={tokenize:k,concrete:!0,name:`mathFlow`},O={tokenize:A,partial:!0};function k(e,t,n){let a=this,o=a.events[a.events.length-1],s=o&&o[1].type===`linePrefix`?o[2].sliceSerialize(o[1],!0).length:0,c=0;return l;function l(t){return e.enter(`mathFlow`),e.enter(`mathFlowFence`),e.enter(`mathFlowFenceSequence`),u(t)}function u(t){return t===36?(e.consume(t),c++,u):c<2?n(t):(e.exit(`mathFlowFenceSequence`),r(e,d,`whitespace`)(t))}function d(t){return t===null||i(t)?p(t):(e.enter(`mathFlowFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),f(t))}function f(t){return t===null||i(t)?(e.exit(`chunkString`),e.exit(`mathFlowFenceMeta`),p(t)):t===36?n(t):(e.consume(t),f)}function p(n){return e.exit(`mathFlowFence`),a.interrupt?t(n):e.attempt(O,m,v)(n)}function m(t){return e.attempt({tokenize:y,partial:!0},v,h)(t)}function h(t){return(s?r(e,g,`linePrefix`,s+1):g)(t)}function g(t){return t===null?v(t):i(t)?e.attempt(O,m,v)(t):(e.enter(`mathFlowValue`),_(t))}function _(t){return t===null||i(t)?(e.exit(`mathFlowValue`),g(t)):(e.consume(t),_)}function v(n){return e.exit(`mathFlow`),t(n)}function y(e,t,n){let o=0;return r(e,s,`linePrefix`,a.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4);function s(t){return e.enter(`mathFlowFence`),e.enter(`mathFlowFenceSequence`),l(t)}function l(t){return t===36?(o++,e.consume(t),l):o<c?n(t):(e.exit(`mathFlowFenceSequence`),r(e,u,`whitespace`)(t))}function u(r){return r===null||i(r)?(e.exit(`mathFlowFence`),t(r)):n(r)}}}function A(e,t,n){let r=this;return i;function i(n){return n===null?t(n):(e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function j(e){let t=(e||{}).singleDollarTextMath;return t??=!0,{tokenize:n,resolve:M,previous:N,name:`mathText`};function n(e,n,r){let a=0,o,s;return c;function c(t){return e.enter(`mathText`),e.enter(`mathTextSequence`),l(t)}function l(n){return n===36?(e.consume(n),a++,l):a<2&&!t?r(n):(e.exit(`mathTextSequence`),u(n))}function u(t){return t===null?r(t):t===36?(s=e.enter(`mathTextSequence`),o=0,f(t)):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),u):i(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),u):(e.enter(`mathTextData`),d(t))}function d(t){return t===null||t===32||t===36||i(t)?(e.exit(`mathTextData`),u(t)):(e.consume(t),d)}function f(t){return t===36?(e.consume(t),o++,f):o===a?(e.exit(`mathTextSequence`),e.exit(`mathText`),n(t)):(s.type=`mathTextData`,d(t))}}}function M(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`mathTextData`){e[t][1].type=`mathTextPadding`,e[n][1].type=`mathTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`mathTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function N(e){return e!==36||this.events[this.events.length-1][1].type===`characterEscape`}function P(e){return{flow:{36:D},text:{36:j(e)}}}export{E as n,P as t};
@@ -1 +1 @@
1
- import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{r}from"./dist-Nvb76hAm.js";import{t as i}from"./compiler-runtime-BfE3aGVn.js";import{t as a}from"./utils-CPqDy6Hr.js";import{i as o,n as ee,t as te}from"./tooltip-Bz6z4_se.js";import{a as ne,t as s}from"./ime-composition-DSJh5ynW.js";import{t as re}from"./x-DM2drskU.js";import{t as ie}from"./badge-BIamhtRR.js";var c=i(),l=e(n(),1),u=t();function d(e){let t=(0,c.c)(96),{value:n,onChange:i,onBlur:d,placeholder:ae,id:f,disabled:p,grammar:oe,entryProblems:m,"aria-describedby":se,"aria-invalid":ce,ref:h}=e,le=oe===void 0?`frontmatter-tag`:oe,{_:g}=r(),[_,ue]=(0,l.useState)(``),[v,de]=(0,l.useState)(null),[y,b]=(0,l.useState)(null),fe=(0,l.useRef)(null),x;t[0]===h?x=t[1]:(x=e=>{fe.current=e,typeof h==`function`?h(e):h&&(h.current=e)},t[0]=h,t[1]=x);let pe=x,[S,C]=(0,l.useState)(!1),me=(0,l.useId)(),w=`${f??me}-grammar-hint`,T=`${f??me}-pill`,E;t[2]!==g||t[3]!==ae?(E=ae??g({id:`M5mfAe`}),t[2]=g,t[3]=ae,t[4]=E):E=t[4];let he=E,D=le===`frontmatter-tag`,O;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(O=()=>{ue(``),C(!1),de(null)},t[5]=O):O=t[5];let k=O,A;t[6]!==v||t[7]!==i||t[8]!==D||t[9]!==n?(A=e=>{let t=e.trim(),r=v===null?-1:n.indexOf(v);if(!t)return r!==-1&&i(n.filter((e,t)=>t!==r)),v!==null&&k(),!0;if(D&&!ne(t))return C(!0),!1;let a=D&&t.startsWith(`#`)?t.slice(1):t,o=n.indexOf(a);if(r===-1)return o===-1&&i([...n,a]),k(),!0;let ee=n.map((e,t)=>t===r?a:e);return i(o===-1||o===r?ee:ee.filter((e,t)=>t!==r)),k(),!0},t[6]=v,t[7]=i,t[8]=D,t[9]=n,t[10]=A):A=t[10];let j=A,M;t[11]!==i||t[12]!==n?(M=e=>{i(n.filter((t,n)=>n!==e))},t[11]=i,t[12]=n,t[13]=M):M=t[13];let N=M,P;t[14]!==j||t[15]!==p||t[16]!==_?(P=e=>{p||(_.trim()!==``&&j(_),ue(e),C(!1),b(null),de(e))},t[14]=j,t[15]=p,t[16]=_,t[17]=P):P=t[17];let F=P,I;t[18]!==y||t[19]!==n?(I=y===null?-1:n.indexOf(y),t[18]=y,t[19]=n,t[20]=I):I=t[20];let L=I,R;t[21]===n?R=t[22]:(R=e=>{b(e===null?null:n[e]??null)},t[21]=n,t[22]=R);let z=R,B,V;t[23]===v?(B=t[24],V=t[25]):(B=()=>{v!==null&&(fe.current?.focus(),fe.current?.select())},V=[v],t[23]=v,t[24]=B,t[25]=V),(0,l.useEffect)(B,V);let H=S?`true`:ce,ge=p&&`pointer-events-none opacity-60`,U;t[26]===ge?U=t[27]:(U=a(`flex min-h-8 w-full flex-wrap items-center gap-1.5 rounded-lg border border-input bg-transparent px-2 py-1 text-sm transition-colors`,`focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50`,`aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20`,`dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,ge),t[26]=ge,t[27]=U);let W;if(t[28]!==g||t[29]!==F||t[30]!==p||t[31]!==v||t[32]!==m||t[33]!==y||t[34]!==T||t[35]!==N||t[36]!==D||t[37]!==n){let e;t[39]!==g||t[40]!==F||t[41]!==p||t[42]!==v||t[43]!==m||t[44]!==y||t[45]!==T||t[46]!==N||t[47]!==D?(e=(e,t)=>{if(e===v)return null;let n=D&&!ne(e),r=m?.get(e),i=n||r!==void 0,s=r??(n?`Tags must start with a letter or digit and contain only letters, digits, underscores, dashes, and slashes.`:void 0),c=e===y,l=(0,u.jsxs)(ie,{id:`${T}-${t}`,variant:i?`destructive`:`secondary`,"data-tag-invalid":n?`true`:void 0,"data-tag-problem":r===void 0?void 0:`true`,"data-highlighted":c?`true`:void 0,className:a(`gap-1 pl-2 pr-1 normal-case`,i&&`ring-1 ring-destructive/40`,c&&`ring-2 ring-ring/70`),children:[(0,u.jsx)(`button`,{type:`button`,tabIndex:-1,className:`cursor-pointer rounded-sm font-mono`,onDoubleClick:()=>F(e),disabled:p,"aria-label":g({id:`NkNfSr`,values:{tag:e}}),title:s===void 0?g({id:`vHlhDc`}):void 0,children:e}),(0,u.jsx)(`button`,{type:`button`,onClick:()=>N(t),"aria-label":g({id:`D4H2N6`,values:{tag:e}}),className:`rounded-sm p-0.5 hover:bg-background/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50`,disabled:p,children:(0,u.jsx)(re,{className:`size-3`,"aria-hidden":`true`})})]},e);return s===void 0?l:(0,u.jsxs)(te,{children:[(0,u.jsx)(o,{asChild:!0,children:l}),(0,u.jsx)(ee,{children:s})]},e)},t[39]=g,t[40]=F,t[41]=p,t[42]=v,t[43]=m,t[44]=y,t[45]=T,t[46]=N,t[47]=D,t[48]=e):e=t[48],W=n.map(e),t[28]=g,t[29]=F,t[30]=p,t[31]=v,t[32]=m,t[33]=y,t[34]=T,t[35]=N,t[36]=D,t[37]=n,t[38]=W}else W=t[38];let G;t[49]!==S||t[50]!==y?(G=e=>{ue(e.target.value),S&&C(!1),y!==null&&b(null)},t[49]=S,t[50]=y,t[51]=G):G=t[51];let K;t[52]!==j||t[53]!==F||t[54]!==_||t[55]!==S||t[56]!==v||t[57]!==z||t[58]!==L||t[59]!==N||t[60]!==n?(K=e=>{if(s(e))return;let t=e.currentTarget,r=t.selectionStart===0&&t.selectionEnd===0;if(v===null&&n.length>0){if(e.key===`ArrowLeft`&&(L!==-1||r)){e.preventDefault(),z(L===-1?n.length-1:Math.max(0,L-1));return}if(e.key===`ArrowRight`&&L!==-1){e.preventDefault(),z(L===n.length-1?null:L+1);return}if((e.key===`Home`||e.key===`End`)&&L!==-1){e.preventDefault(),z(e.key===`Home`?0:n.length-1);return}}if(L!==-1&&v===null){if(e.key===`Enter`||e.key===` `){e.preventDefault();let t=n[L];t!==void 0&&F(t);return}if(e.key===`Backspace`||e.key===`Delete`){e.preventDefault();let t=n[L-1]??null,r=n[L+1]??null;N(L),b(e.key===`Backspace`?t??r:r??t);return}}e.key===`Enter`?(_.trim()||v!==null)&&(e.preventDefault(),j(_)):e.key===`,`?(e.preventDefault(),_.trim()&&j(_)):e.key===`Tab`?_.trim()&&(e.preventDefault(),j(_)):e.key===`Backspace`&&_===``&&n.length>0&&v===null?(e.preventDefault(),N(n.length-1)):e.key===`Escape`&&(v!==null||S?(e.preventDefault(),k(),b(null)):L!==-1&&(e.preventDefault(),b(null)))},t[52]=j,t[53]=F,t[54]=_,t[55]=S,t[56]=v,t[57]=z,t[58]=L,t[59]=N,t[60]=n,t[61]=K):K=t[61];let q;t[62]!==j||t[63]!==_||t[64]!==v||t[65]!==d?(q=()=>{(_.trim()||v!==null)&&!j(_)&&v!==null&&k(),b(null),d?.()},t[62]=j,t[63]=_,t[64]=v,t[65]=d,t[66]=q):q=t[66];let J=n.length===0?he:``,_e=S?`true`:void 0,Y;t[67]!==se||t[68]!==S||t[69]!==w?(Y=[S?w:void 0,se].filter(Boolean).join(` `)||void 0,t[67]=se,t[68]=S,t[69]=w,t[70]=Y):Y=t[70];let ve=S?`true`:ce,ye=L===-1?void 0:`${T}-${L}`,be=S&&`text-destructive placeholder:text-destructive/60`,X;t[71]===be?X=t[72]:(X=a(`min-w-[8ch] flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed`,be),t[71]=be,t[72]=X);let Z;t[73]!==pe||t[74]!==p||t[75]!==_||t[76]!==f||t[77]!==G||t[78]!==K||t[79]!==q||t[80]!==J||t[81]!==_e||t[82]!==Y||t[83]!==ve||t[84]!==ye||t[85]!==X?(Z=(0,u.jsx)(`input`,{id:f,ref:pe,type:`text`,value:_,onChange:G,onKeyDown:K,onBlur:q,placeholder:J,"data-tag-invalid":_e,"aria-describedby":Y,"aria-invalid":ve,"aria-activedescendant":ye,disabled:p,className:X}),t[73]=pe,t[74]=p,t[75]=_,t[76]=f,t[77]=G,t[78]=K,t[79]=q,t[80]=J,t[81]=_e,t[82]=Y,t[83]=ve,t[84]=ye,t[85]=X,t[86]=Z):Z=t[86];let Q;t[87]!==S||t[88]!==w?(Q=S&&(0,u.jsx)(`span`,{id:w,role:`alert`,"data-testid":`tag-pill-input-error`,className:`w-full px-1 pt-0.5 text-xs text-destructive`,children:`Tags must start with a letter or digit and contain only letters, digits, underscores, dashes, and slashes.`}),t[87]=S,t[88]=w,t[89]=Q):Q=t[89];let $;return t[90]!==H||t[91]!==U||t[92]!==W||t[93]!==Z||t[94]!==Q?($=(0,u.jsxs)(`div`,{"data-slot":`tag-pill-input`,"aria-invalid":H,className:U,children:[W,Z,Q]}),t[90]=H,t[91]=U,t[92]=W,t[93]=Z,t[94]=Q,t[95]=$):$=t[95],$}export{d as t};
1
+ import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{r}from"./dist-Nvb76hAm.js";import{t as i}from"./compiler-runtime-BfE3aGVn.js";import{t as a}from"./utils-CPqDy6Hr.js";import{i as o,n as ee,t as te}from"./tooltip-Bz6z4_se.js";import{a as ne,t as s}from"./ime-composition-B56Lnl92.js";import{t as re}from"./x-DM2drskU.js";import{t as ie}from"./badge-BIamhtRR.js";var c=i(),l=e(n(),1),u=t();function d(e){let t=(0,c.c)(96),{value:n,onChange:i,onBlur:d,placeholder:ae,id:f,disabled:p,grammar:oe,entryProblems:m,"aria-describedby":se,"aria-invalid":ce,ref:h}=e,le=oe===void 0?`frontmatter-tag`:oe,{_:g}=r(),[_,ue]=(0,l.useState)(``),[v,de]=(0,l.useState)(null),[y,b]=(0,l.useState)(null),fe=(0,l.useRef)(null),x;t[0]===h?x=t[1]:(x=e=>{fe.current=e,typeof h==`function`?h(e):h&&(h.current=e)},t[0]=h,t[1]=x);let pe=x,[S,C]=(0,l.useState)(!1),me=(0,l.useId)(),w=`${f??me}-grammar-hint`,T=`${f??me}-pill`,E;t[2]!==g||t[3]!==ae?(E=ae??g({id:`M5mfAe`}),t[2]=g,t[3]=ae,t[4]=E):E=t[4];let he=E,D=le===`frontmatter-tag`,O;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(O=()=>{ue(``),C(!1),de(null)},t[5]=O):O=t[5];let k=O,A;t[6]!==v||t[7]!==i||t[8]!==D||t[9]!==n?(A=e=>{let t=e.trim(),r=v===null?-1:n.indexOf(v);if(!t)return r!==-1&&i(n.filter((e,t)=>t!==r)),v!==null&&k(),!0;if(D&&!ne(t))return C(!0),!1;let a=D&&t.startsWith(`#`)?t.slice(1):t,o=n.indexOf(a);if(r===-1)return o===-1&&i([...n,a]),k(),!0;let ee=n.map((e,t)=>t===r?a:e);return i(o===-1||o===r?ee:ee.filter((e,t)=>t!==r)),k(),!0},t[6]=v,t[7]=i,t[8]=D,t[9]=n,t[10]=A):A=t[10];let j=A,M;t[11]!==i||t[12]!==n?(M=e=>{i(n.filter((t,n)=>n!==e))},t[11]=i,t[12]=n,t[13]=M):M=t[13];let N=M,P;t[14]!==j||t[15]!==p||t[16]!==_?(P=e=>{p||(_.trim()!==``&&j(_),ue(e),C(!1),b(null),de(e))},t[14]=j,t[15]=p,t[16]=_,t[17]=P):P=t[17];let F=P,I;t[18]!==y||t[19]!==n?(I=y===null?-1:n.indexOf(y),t[18]=y,t[19]=n,t[20]=I):I=t[20];let L=I,R;t[21]===n?R=t[22]:(R=e=>{b(e===null?null:n[e]??null)},t[21]=n,t[22]=R);let z=R,B,V;t[23]===v?(B=t[24],V=t[25]):(B=()=>{v!==null&&(fe.current?.focus(),fe.current?.select())},V=[v],t[23]=v,t[24]=B,t[25]=V),(0,l.useEffect)(B,V);let H=S?`true`:ce,ge=p&&`pointer-events-none opacity-60`,U;t[26]===ge?U=t[27]:(U=a(`flex min-h-8 w-full flex-wrap items-center gap-1.5 rounded-lg border border-input bg-transparent px-2 py-1 text-sm transition-colors`,`focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50`,`aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20`,`dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,ge),t[26]=ge,t[27]=U);let W;if(t[28]!==g||t[29]!==F||t[30]!==p||t[31]!==v||t[32]!==m||t[33]!==y||t[34]!==T||t[35]!==N||t[36]!==D||t[37]!==n){let e;t[39]!==g||t[40]!==F||t[41]!==p||t[42]!==v||t[43]!==m||t[44]!==y||t[45]!==T||t[46]!==N||t[47]!==D?(e=(e,t)=>{if(e===v)return null;let n=D&&!ne(e),r=m?.get(e),i=n||r!==void 0,s=r??(n?`Tags must start with a letter or digit and contain only letters, digits, underscores, dashes, and slashes.`:void 0),c=e===y,l=(0,u.jsxs)(ie,{id:`${T}-${t}`,variant:i?`destructive`:`secondary`,"data-tag-invalid":n?`true`:void 0,"data-tag-problem":r===void 0?void 0:`true`,"data-highlighted":c?`true`:void 0,className:a(`gap-1 pl-2 pr-1 normal-case`,i&&`ring-1 ring-destructive/40`,c&&`ring-2 ring-ring/70`),children:[(0,u.jsx)(`button`,{type:`button`,tabIndex:-1,className:`cursor-pointer rounded-sm font-mono`,onDoubleClick:()=>F(e),disabled:p,"aria-label":g({id:`NkNfSr`,values:{tag:e}}),title:s===void 0?g({id:`vHlhDc`}):void 0,children:e}),(0,u.jsx)(`button`,{type:`button`,onClick:()=>N(t),"aria-label":g({id:`D4H2N6`,values:{tag:e}}),className:`rounded-sm p-0.5 hover:bg-background/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50`,disabled:p,children:(0,u.jsx)(re,{className:`size-3`,"aria-hidden":`true`})})]},e);return s===void 0?l:(0,u.jsxs)(te,{children:[(0,u.jsx)(o,{asChild:!0,children:l}),(0,u.jsx)(ee,{children:s})]},e)},t[39]=g,t[40]=F,t[41]=p,t[42]=v,t[43]=m,t[44]=y,t[45]=T,t[46]=N,t[47]=D,t[48]=e):e=t[48],W=n.map(e),t[28]=g,t[29]=F,t[30]=p,t[31]=v,t[32]=m,t[33]=y,t[34]=T,t[35]=N,t[36]=D,t[37]=n,t[38]=W}else W=t[38];let G;t[49]!==S||t[50]!==y?(G=e=>{ue(e.target.value),S&&C(!1),y!==null&&b(null)},t[49]=S,t[50]=y,t[51]=G):G=t[51];let K;t[52]!==j||t[53]!==F||t[54]!==_||t[55]!==S||t[56]!==v||t[57]!==z||t[58]!==L||t[59]!==N||t[60]!==n?(K=e=>{if(s(e))return;let t=e.currentTarget,r=t.selectionStart===0&&t.selectionEnd===0;if(v===null&&n.length>0){if(e.key===`ArrowLeft`&&(L!==-1||r)){e.preventDefault(),z(L===-1?n.length-1:Math.max(0,L-1));return}if(e.key===`ArrowRight`&&L!==-1){e.preventDefault(),z(L===n.length-1?null:L+1);return}if((e.key===`Home`||e.key===`End`)&&L!==-1){e.preventDefault(),z(e.key===`Home`?0:n.length-1);return}}if(L!==-1&&v===null){if(e.key===`Enter`||e.key===` `){e.preventDefault();let t=n[L];t!==void 0&&F(t);return}if(e.key===`Backspace`||e.key===`Delete`){e.preventDefault();let t=n[L-1]??null,r=n[L+1]??null;N(L),b(e.key===`Backspace`?t??r:r??t);return}}e.key===`Enter`?(_.trim()||v!==null)&&(e.preventDefault(),j(_)):e.key===`,`?(e.preventDefault(),_.trim()&&j(_)):e.key===`Tab`?_.trim()&&(e.preventDefault(),j(_)):e.key===`Backspace`&&_===``&&n.length>0&&v===null?(e.preventDefault(),N(n.length-1)):e.key===`Escape`&&(v!==null||S?(e.preventDefault(),k(),b(null)):L!==-1&&(e.preventDefault(),b(null)))},t[52]=j,t[53]=F,t[54]=_,t[55]=S,t[56]=v,t[57]=z,t[58]=L,t[59]=N,t[60]=n,t[61]=K):K=t[61];let q;t[62]!==j||t[63]!==_||t[64]!==v||t[65]!==d?(q=()=>{(_.trim()||v!==null)&&!j(_)&&v!==null&&k(),b(null),d?.()},t[62]=j,t[63]=_,t[64]=v,t[65]=d,t[66]=q):q=t[66];let J=n.length===0?he:``,_e=S?`true`:void 0,Y;t[67]!==se||t[68]!==S||t[69]!==w?(Y=[S?w:void 0,se].filter(Boolean).join(` `)||void 0,t[67]=se,t[68]=S,t[69]=w,t[70]=Y):Y=t[70];let ve=S?`true`:ce,ye=L===-1?void 0:`${T}-${L}`,be=S&&`text-destructive placeholder:text-destructive/60`,X;t[71]===be?X=t[72]:(X=a(`min-w-[8ch] flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed`,be),t[71]=be,t[72]=X);let Z;t[73]!==pe||t[74]!==p||t[75]!==_||t[76]!==f||t[77]!==G||t[78]!==K||t[79]!==q||t[80]!==J||t[81]!==_e||t[82]!==Y||t[83]!==ve||t[84]!==ye||t[85]!==X?(Z=(0,u.jsx)(`input`,{id:f,ref:pe,type:`text`,value:_,onChange:G,onKeyDown:K,onBlur:q,placeholder:J,"data-tag-invalid":_e,"aria-describedby":Y,"aria-invalid":ve,"aria-activedescendant":ye,disabled:p,className:X}),t[73]=pe,t[74]=p,t[75]=_,t[76]=f,t[77]=G,t[78]=K,t[79]=q,t[80]=J,t[81]=_e,t[82]=Y,t[83]=ve,t[84]=ye,t[85]=X,t[86]=Z):Z=t[86];let Q;t[87]!==S||t[88]!==w?(Q=S&&(0,u.jsx)(`span`,{id:w,role:`alert`,"data-testid":`tag-pill-input-error`,className:`w-full px-1 pt-0.5 text-xs text-destructive`,children:`Tags must start with a letter or digit and contain only letters, digits, underscores, dashes, and slashes.`}),t[87]=S,t[88]=w,t[89]=Q):Q=t[89];let $;return t[90]!==H||t[91]!==U||t[92]!==W||t[93]!==Z||t[94]!==Q?($=(0,u.jsxs)(`div`,{"data-slot":`tag-pill-input`,"aria-invalid":H,className:U,children:[W,Z,Q]}),t[90]=H,t[91]=U,t[92]=W,t[93]=Z,t[94]=Q,t[95]=$):$=t[95],$}export{d as t};
@@ -1 +1 @@
1
- import{t as e}from"./createLucideIcon-DdBzwsHe.js";import{d as t}from"./doc-hash-BJkweiX9.js";import{o as n}from"./navigation-targets-DSSJ_2xi.js";var r=e(`hexagon`,[[`path`,{d:`M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z`,key:`yt0hxn`}]]);function i(e){switch(e.kind){case`doc`:case`large-file`:return`doc`;case`skill-file`:return`doc`;case`folder`:case`folder-index`:return`folder`;case`missing`:case`asset`:return`missing`}}function a(e,r){let a=n(e,r);return{resolvedTarget:a,hashDocName:a.target,hash:a.kind===`skill-file`?t({scope:a.scope,name:a.name,path:a.path,...a.host?{host:a.host}:{}}):null,displayState:i(a)}}export{r as n,a as t};
1
+ import{t as e}from"./createLucideIcon-DdBzwsHe.js";import{d as t}from"./doc-hash-BJkweiX9.js";import{o as n}from"./navigation-targets-wIVrXum1.js";var r=e(`hexagon`,[[`path`,{d:`M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z`,key:`yt0hxn`}]]);function i(e){switch(e.kind){case`doc`:case`large-file`:return`doc`;case`skill-file`:return`doc`;case`folder`:case`folder-index`:return`folder`;case`missing`:case`asset`:return`missing`}}function a(e,r){let a=n(e,r);return{resolvedTarget:a,hashDocName:a.target,hash:a.kind===`skill-file`?t({scope:a.scope,name:a.name,path:a.path,...a.host?{host:a.host}:{}}):null,displayState:i(a)}}export{r as n,a as t};
@@ -1,2 +1,2 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./__vite-browser-external-B35O8xpx.js","./chunk-CYidjpOJ.js"])))=>i.map(i=>d[i]);
2
- import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./preload-helper-Chd9yIcd.js";import{a as n,c as r,d as i,f as a,i as o,l as s,n as c,r as l,s as u,t as d,u as f}from"./trace-api-BSvaJNnr.js";import{n as ee,t as p}from"./propagation-api-B1IlUKzT.js";import{t as m}from"./status-BNivpG-Q.js";import{t as h}from"./context-api-B9rp0hJb.js";import{n as te,o as ne}from"./client-version-V5JX2_9H.js";var re=class{constructor(){}createGauge(e,t){return me}createHistogram(e,t){return he}createCounter(e,t){return pe}createUpDownCounter(e,t){return ge}createObservableGauge(e,t){return ve}createObservableCounter(e,t){return _e}createObservableUpDownCounter(e,t){return ye}addBatchObservableCallback(e,t){}removeBatchObservableCallback(e){}},g=class{},ie=class extends g{add(e,t){}},ae=class extends g{add(e,t){}},oe=class extends g{record(e,t){}},se=class extends g{record(e,t){}},ce=class{addCallback(e){}removeCallback(e){}},le=class extends ce{},ue=class extends ce{},de=class extends ce{},fe=new re,pe=new ie,me=new oe,he=new se,ge=new ae,_e=new le,ve=new ue,ye=new de;function be(){return fe}var xe;(function(e){e[e.NOT_RECORD=0]=`NOT_RECORD`,e[e.RECORD=1]=`RECORD`,e[e.RECORD_AND_SAMPLED=2]=`RECORD_AND_SAMPLED`})(xe||={});var Se;(function(e){e[e.INTERNAL=0]=`INTERNAL`,e[e.SERVER=1]=`SERVER`,e[e.CLIENT=2]=`CLIENT`,e[e.PRODUCER=3]=`PRODUCER`,e[e.CONSUMER=4]=`CONSUMER`})(Se||={});var _=s.instance(),Ce=new class{getMeter(e,t,n){return fe}},we=`metrics`,Te=class e{constructor(){}static getInstance(){return this._instance||=new e,this._instance}setGlobalMeterProvider(e){return i(we,e,s.instance())}getMeterProvider(){return f(we)||Ce}getMeter(e,t,n){return this.getMeterProvider().getMeter(e,t,n)}disable(){a(we,s.instance())}}.getInstance(),Ee=class{_delegate;constructor(e){this._delegate=e}export(e,t){this._delegate.export(e,t)}forceFlush(){return this._delegate.forceFlush()}shutdown(){return this._delegate.shutdown()}},De=class extends Error{code;name=`OTLPExporterError`;data;constructor(e,t,n){super(e),this.data=n,this.code=t}};function Oe(e){if(Number.isFinite(e)&&e>0)return e;throw Error(`Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '${e}')`)}function ke(e){if(e!=null)return()=>e}function Ae(e,t,n){return{timeoutMillis:Oe(e.timeoutMillis??t.timeoutMillis??n.timeoutMillis),concurrencyLimit:e.concurrencyLimit??t.concurrencyLimit??n.concurrencyLimit,compression:e.compression??t.compression??n.compression}}function je(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:`none`}}var Me=class{_concurrencyLimit;_sendingPromises=[];constructor(e){this._concurrencyLimit=e}pushPromise(e){if(this.hasReachedLimit())throw Error(`Concurrency Limit reached`);this._sendingPromises.push(e);let t=()=>{let t=this._sendingPromises.indexOf(e);this._sendingPromises.splice(t,1)};e.then(t,t)}hasReachedLimit(){return this._sendingPromises.length>=this._concurrencyLimit}async awaitAll(){await Promise.all(this._sendingPromises)}};function Ne(e){return new Me(e.concurrencyLimit)}var Pe=r(`OpenTelemetry SDK Context Key SUPPRESS_TRACING`);function Fe(e){return e.setValue(Pe,!0)}function Ie(e){return e.getValue(Pe)===!0}var Le=`baggage`,Re=4096;function ze(e){return e.reduce((e,t)=>{let n=`${e}${e===``?``:`,`}${t}`;return n.length>8192?e:n},``)}function Be(e){return e.getAllEntries().map(([e,t])=>{let n=`${encodeURIComponent(e)}=${encodeURIComponent(t.value)}`;return t.metadata!==void 0&&(n+=`;`+t.metadata.toString()),n})}function Ve(e){if(!e)return;let t=e.indexOf(`;`),n=t===-1?e:e.substring(0,t),r=n.indexOf(`=`);if(r<=0)return;let i=n.substring(0,r).trim(),a=n.substring(r+1).trim();if(!i||!a)return;let o,s;try{o=decodeURIComponent(i),s=decodeURIComponent(a)}catch{return}let c;return t!==-1&&t<e.length-1&&(c=ee(e.substring(t+1))),{key:o,value:s,metadata:c}}function He(e,t,n,r){let i=0;for(;i<e.length&&n<180;){let a=e.indexOf(`,`,i),o=a===-1?e.length:a,s=o-i;if(s<=4096){let a=Ve(e.substring(i,o));if(a){let e=(n===0?0:1)+s;if(r+e>8192)break;t[a.key]=a.metadata?{value:a.value,metadata:a.metadata}:{value:a.value},n++,r+=e}}if(a===-1)break;i=a+1}return[n,r]}var Ue=class{inject(e,t,n){let r=p.getBaggage(e);if(!r||Ie(e))return;let i=ze(Be(r).filter(e=>e.length<=Re).slice(0,180));i.length>0&&n.set(t,Le,i)}extract(e,t,n){let r=n.get(t,Le);if(!r)return e;let i={},a=0,o=0;if(Array.isArray(r))for(let e=0;e<r.length;e++)[a,o]=He(r[e],i,a,o);else [a]=He(r,i,a,o);return a===0?e:p.setBaggage(e,p.createBaggage(i))}fields(){return[Le]}};function v(e){let t={};if(typeof e!=`object`||!e)return t;for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;if(!We(n)){_.warn(`Invalid attribute key: ${n}`);continue}let r=e[n];if(!Ge(r)){_.warn(`Invalid attribute value set for key: ${n}`);continue}Array.isArray(r)?t[n]=r.slice():t[n]=r}return t}function We(e){return typeof e==`string`&&e!==``}function Ge(e){return e==null?!0:Array.isArray(e)?Ke(e):qe(typeof e)}function Ke(e){let t;for(let n of e){if(n==null)continue;let e=typeof n;if(e!==t){if(!t){if(qe(e)){t=e;continue}return!1}return!1}}return!0}function qe(e){switch(e){case`number`:case`boolean`:case`string`:return!0}return!1}function Je(){return e=>{_.error(Ye(e))}}function Ye(e){return typeof e==`string`?e:JSON.stringify(Xe(e))}function Xe(e){let t={},n=e;for(;n!==null;)Object.getOwnPropertyNames(n).forEach(e=>{if(t[e])return;let r=n[e];r&&(t[e]=String(r))}),n=Object.getPrototypeOf(n);return t}var Ze=Je();function y(e){try{Ze(e)}catch{}}var Qe=globalThis,$e=`2.8.0`,et=`http.url`,tt=`http.user_agent`,nt=et,rt=tt,it=`deployment.environment.name`,at=`error.type`,ot=`exception.message`,st=`exception.stacktrace`,ct=`exception.type`,lt=`http.request.method`,ut=`http.request.method_original`,dt=`http.response.status_code`,ft=`server.address`,pt=`server.port`,mt=`service.name`,ht=`service.version`,gt=`telemetry.sdk.language`,_t=`webjs`,vt=`telemetry.sdk.name`,yt=`telemetry.sdk.version`,bt=`url.full`,xt=`process.runtime.name`,St={[vt]:`opentelemetry`,[xt]:`browser`,[gt]:_t,[yt]:$e},b=performance,Ct=9,wt=10**6,x=10**Ct;function S(e){let t=e/1e3;return[Math.trunc(t),Math.round(e%1e3*wt)]}function C(e){return Ot(S(b.timeOrigin),S(typeof e==`number`?e:b.now()))}function w(e){if(Et(e))return e;if(typeof e==`number`)return e<b.timeOrigin?C(e):S(e);if(e instanceof Date)return S(e.getTime());throw TypeError(`Invalid input type`)}function Tt(e,t){let n=t[0]-e[0],r=t[1]-e[1];return r<0&&(--n,r+=x),[n,r]}function T(e){return e[0]*x+e[1]}function Et(e){return Array.isArray(e)&&e.length===2&&typeof e[0]==`number`&&typeof e[1]==`number`}function Dt(e){return Et(e)||typeof e==`number`||e instanceof Date}function Ot(e,t){let n=[e[0]+t[0],e[1]+t[1]];return n[1]>=x&&(n[1]-=x,n[0]+=1),n}var E;(function(e){e[e.SUCCESS=0]=`SUCCESS`,e[e.FAILED=1]=`FAILED`})(E||={});var kt=class{_propagators;_fields;constructor(e={}){this._propagators=e.propagators??[];let t=new Set;for(let e of this._propagators){let n=typeof e.fields==`function`?e.fields():[];for(let e of n)t.add(e)}this._fields=Array.from(t)}inject(e,t,n){for(let r of this._propagators)try{r.inject(e,t,n)}catch(e){_.warn(`Failed to inject with ${r.constructor.name}. Err: ${e.message}`)}}extract(e,t,n){return this._propagators.reduce((e,r)=>{try{return r.extract(e,t,n)}catch(e){_.warn(`Failed to extract with ${r.constructor.name}. Err: ${e.message}`)}return e},e)}fields(){return this._fields.slice()}},At=`[_0-9a-z-*/]`,jt=`[a-z]${At}{0,255}`,Mt=`[a-z0-9]${At}{0,240}@[a-z]${At}{0,13}`,Nt=RegExp(`^(?:${jt}|${Mt})$`),Pt=/^[ -~]{0,255}[!-~]$/,Ft=/,|=/;function It(e){return Nt.test(e)}function Lt(e){return Pt.test(e)&&!Ft.test(e)}var Rt=32,zt=512,Bt=`,`,Vt=`=`,Ht=class e{_length;_rawTraceState;_internalState;constructor(e){this._rawTraceState=typeof e==`string`?e:``,this._length=this._rawTraceState.length}set(e,t){if(!It(e)||!Lt(t))return this;let n=this._getState(),r=n.get(e),i=this._length;if(typeof r==`string`?i+=t.length-r.length:i+=e.length+t.length+(n.size>0?2:1),i>zt)return this;let a=new Map(n);return a.delete(e),a.set(e,t),this._fromState(a,i)}unset(e){let t=this._getState(),n=t.get(e);if(typeof n!=`string`)return this;let r=this._length-(e.length+n.length+1);t.size>1&&--r;let i=new Map(t);return i.delete(e),this._fromState(i,r)}get(e){return this._getState().get(e)}serialize(){let e=``,t=0;for(let n of this._getState())t>0&&(e=Bt+e),e=`${n[0]}${Vt}${n[1]}`+e,t++;return e}_getState(){if(this._internalState)return this._internalState;let e=this._rawTraceState.split(Bt),t=new Map,n=0;for(let r of e){let e=r.trim(),i=e.indexOf(Vt);if(i===-1)continue;let a=e.slice(0,i),o=e.slice(i+1);if(!It(a)||!Lt(o))continue;let s=n+e.length+ +(t.size>0);if(!(s>zt)&&(t.set(a,o),n=s,t.size>=Rt))break}return this._length=n,this._internalState=new Map(Array.from(t.entries()).reverse()),this._internalState}_fromState(t,n){let r=Object.create(e.prototype);return r._internalState=t,r._length=n,r}},D=`traceparent`,Ut=`tracestate`,Wt=`00`,Gt=RegExp(`^\\s?((?!ff)[\\da-f]{2})-((?![0]{32})[\\da-f]{32})-((?![0]{16})[\\da-f]{16})-([\\da-f]{2})(-.*)?\\s?$`);function Kt(e){let t=Gt.exec(e);return!t||t[1]===`00`&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}var qt=class{inject(e,t,r){let i=d.getSpanContext(e);if(!i||Ie(e)||!c(i))return;let a=`${Wt}-${i.traceId}-${i.spanId}-0${Number(i.traceFlags||n.NONE).toString(16)}`;r.set(t,D,a),i.traceState&&r.set(t,Ut,i.traceState.serialize())}extract(e,t,n){let r=n.get(t,D);if(!r)return e;let i=Array.isArray(r)?r[0]:r;if(typeof i!=`string`)return e;let a=Kt(i);if(!a)return e;a.isRemote=!0;let o=n.get(t,Ut);if(o){let e=Array.isArray(o)?o.join(`,`):o;a.traceState=new Ht(typeof e==`string`?e:void 0)}return d.setSpanContext(e,a)}fields(){return[D,Ut]}},Jt=`[object Object]`,Yt=`[object Null]`,Xt=`[object Undefined]`,Zt=Function.prototype.toString,Qt=Zt.call(Object),$t=Object.getPrototypeOf,en=Object.prototype,tn=en.hasOwnProperty,O=Symbol?Symbol.toStringTag:void 0,nn=en.toString;function rn(e){if(!an(e)||on(e)!==Jt)return!1;let t=$t(e);if(t===null)return!0;let n=tn.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&Zt.call(n)===Qt}function an(e){return typeof e==`object`&&!!e}function on(e){return e==null?e===void 0?Xt:Yt:O&&O in Object(e)?sn(e):cn(e)}function sn(e){let t=tn.call(e,O),n=e[O],r=!1;try{e[O]=void 0,r=!0}catch{}let i=nn.call(e);return r&&(t?e[O]=n:delete e[O]),i}function cn(e){return nn.call(e)}var ln=20;function un(...e){let t=e.shift(),n=new WeakMap;for(;e.length>0;)t=fn(t,e.shift(),0,n);return t}function dn(e){return k(e)?e.slice():e}function fn(e,t,n=0,r){let i;if(!(n>ln)){if(n++,j(e)||j(t)||mn(t))i=dn(t);else if(k(e)){if(i=e.slice(),k(t))for(let e=0,n=t.length;e<n;e++)i.push(dn(t[e]));else if(A(t)){let e=Object.keys(t);for(let n=0,r=e.length;n<r;n++){let r=e[n];r===`__proto__`||r===`constructor`||r===`prototype`||(i[r]=dn(t[r]))}}}else if(A(e))if(A(t)){if(!hn(e,t))return t;i=Object.assign({},e);let a=Object.keys(t);for(let o=0,s=a.length;o<s;o++){let s=a[o];if(s===`__proto__`||s===`constructor`||s===`prototype`)continue;let c=t[s];if(j(c))c===void 0?delete i[s]:i[s]=c;else{let a=i[s],o=c;if(pn(e,s,r)||pn(t,s,r))delete i[s];else{if(A(a)&&A(o)){let n=r.get(a)||[],i=r.get(o)||[];n.push({obj:e,key:s}),i.push({obj:t,key:s}),r.set(a,n),r.set(o,i)}i[s]=fn(i[s],c,n,r)}}}}else i=t;return i}}function pn(e,t,n){let r=n.get(e[t])||[];for(let n=0,i=r.length;n<i;n++){let i=r[n];if(i.key===t&&i.obj===e)return!0}return!1}function k(e){return Array.isArray(e)}function mn(e){return typeof e==`function`}function A(e){return!j(e)&&!k(e)&&!mn(e)&&typeof e==`object`}function j(e){return typeof e==`string`||typeof e==`number`||typeof e==`boolean`||e===void 0||e instanceof Date||e instanceof RegExp||e===null}function hn(e,t){return!(!rn(e)||!rn(t))}function gn(e,t){return typeof t==`string`?e===t:!!e.match(t)}function _n(e,t){if(!t)return!1;for(let n of t)if(gn(e,n))return!0;return!1}var vn=class{_promise;_resolve;_reject;constructor(){this._promise=new Promise((e,t)=>{this._resolve=e,this._reject=t})}get promise(){return this._promise}resolve(e){this._resolve(e)}reject(e){this._reject(e)}},yn=class{_isCalled=!1;_deferred=new vn;_callback;_that;constructor(e,t){this._callback=e,this._that=t}get isCalled(){return this._isCalled}get promise(){return this._deferred.promise}call(...e){if(!this._isCalled){this._isCalled=!0;try{Promise.resolve(this._callback.call(this._that,...e)).then(e=>this._deferred.resolve(e),e=>this._deferred.reject(e))}catch(e){this._deferred.reject(e)}}return this._deferred.promise}};function bn(e){return Object.prototype.hasOwnProperty.call(e,`partialSuccess`)}function xn(){return{handleResponse(e){e==null||!bn(e)||e.partialSuccess==null||Object.keys(e.partialSuccess).length===0||_.warn(`Received Partial Success response:`,JSON.stringify(e.partialSuccess))}}}var Sn=class{_transport;_serializer;_responseHandler;_promiseQueue;_timeout;_diagLogger;constructor(e,t,n,r,i){this._transport=e,this._serializer=t,this._responseHandler=n,this._promiseQueue=r,this._timeout=i,this._diagLogger=_.createComponentLogger({namespace:`OTLPExportDelegate`})}export(e,t){if(this._diagLogger.debug(`items to be sent`,e),this._promiseQueue.hasReachedLimit()){t({code:E.FAILED,error:Error(`Concurrent export limit reached`)});return}let n=this._serializer.serializeRequest(e);if(n==null){t({code:E.FAILED,error:Error(`Nothing to send`)});return}this._promiseQueue.pushPromise(this._transport.send(n,this._timeout).then(e=>{if(e.status===`success`){if(e.data!=null)try{this._responseHandler.handleResponse(this._serializer.deserializeResponse(e.data))}catch(t){this._diagLogger.warn(`Export succeeded but could not deserialize response - is the response specification compliant?`,t,e.data)}t({code:E.SUCCESS});return}else if(e.status===`failure`&&e.error){t({code:E.FAILED,error:e.error});return}else e.status===`retryable`?t({code:E.FAILED,error:new De(`Export failed with retryable status`)}):t({code:E.FAILED,error:new De(`Export failed with unknown error`)})},e=>t({code:E.FAILED,error:e})))}forceFlush(){return this._promiseQueue.awaitAll()}async shutdown(){this._diagLogger.debug(`shutdown started`),await this.forceFlush(),this._transport.shutdown()}};function Cn(e,t){return new Sn(e.transport,e.serializer,xn(),e.promiseHandler,t.timeout)}function wn(e,t,n){return Cn({transport:n,serializer:t,promiseHandler:Ne(e)},{timeout:e.timeoutMillis})}function Tn(e){return e>=48&&e<=57?e-48:e>=97&&e<=102?e-87:e-55}function En(e){let t=new Uint8Array(e.length/2),n=0;for(let r=0;r<e.length;r+=2){let i=Tn(e.charCodeAt(r)),a=Tn(e.charCodeAt(r+1));t[n++]=i<<4|a}return t}function Dn(e){let t=BigInt(1e9);return BigInt(e[0])*t+BigInt(e[1])}function On(e){return{low:Number(BigInt.asUintN(32,e)),high:Number(BigInt.asUintN(32,e>>BigInt(32)))}}function kn(e){return On(Dn(e))}function An(e){return Dn(e).toString()}var jn=typeof BigInt<`u`?An:T;function Mn(e){return e}function Nn(e){if(e!==void 0)return En(e)}var Pn={encodeHrTime:kn,encodeSpanContext:En,encodeOptionalSpanContext:Nn};function Fn(e){if(e===void 0)return Pn;let t=e.useLongBits??!0,n=e.useHex??!1;return{encodeHrTime:t?kn:jn,encodeSpanContext:n?Mn:En,encodeOptionalSpanContext:n?Mn:Nn}}function In(e){let t={attributes:M(e.attributes),droppedAttributesCount:0},n=e.schemaUrl;return n&&n!==``&&(t.schemaUrl=n),t}function Ln(e){return{name:e.name,version:e.version}}function M(e){return Object.keys(e).map(t=>Rn(t,e[t]))}function Rn(e,t){return{key:e,value:zn(t)}}function zn(e){let t=typeof e;return t===`string`?{stringValue:e}:t===`number`?Number.isInteger(e)?{intValue:e}:{doubleValue:e}:t===`boolean`?{boolValue:e}:e instanceof Uint8Array?{bytesValue:e}:Array.isArray(e)?{arrayValue:{values:e.map(zn)}}:t===`object`&&e!=null?{kvlistValue:{values:Object.entries(e).map(([e,t])=>Rn(e,t))}}:{}}function Bn(e,t){let n=e.spanContext(),r=e.status,i=e.parentSpanContext?.spanId?t.encodeSpanContext(e.parentSpanContext?.spanId):void 0;return{traceId:t.encodeSpanContext(n.traceId),spanId:t.encodeSpanContext(n.spanId),parentSpanId:i,traceState:n.traceState?.serialize(),name:e.name,kind:e.kind==null?0:e.kind+1,startTimeUnixNano:t.encodeHrTime(e.startTime),endTimeUnixNano:t.encodeHrTime(e.endTime),attributes:M(e.attributes),droppedAttributesCount:e.droppedAttributesCount,events:e.events.map(e=>Hn(e,t)),droppedEventsCount:e.droppedEventsCount,status:{code:r.code,message:r.message},links:e.links.map(e=>Vn(e,t)),droppedLinksCount:e.droppedLinksCount}}function Vn(e,t){return{attributes:e.attributes?M(e.attributes):[],spanId:t.encodeSpanContext(e.context.spanId),traceId:t.encodeSpanContext(e.context.traceId),traceState:e.context.traceState?.serialize(),droppedAttributesCount:e.droppedAttributesCount||0}}function Hn(e,t){return{attributes:e.attributes?M(e.attributes):[],name:e.name,timeUnixNano:t.encodeHrTime(e.time),droppedAttributesCount:e.droppedAttributesCount||0}}function Un(e,t){return{resourceSpans:Gn(e,Fn(t))}}function Wn(e){let t=new Map;for(let n of e){let e=t.get(n.resource);e||(e=new Map,t.set(n.resource,e));let r=`${n.instrumentationScope.name}@${n.instrumentationScope.version||``}:${n.instrumentationScope.schemaUrl||``}`,i=e.get(r);i||(i=[],e.set(r,i)),i.push(n)}return t}function Gn(e,t){let n=Wn(e),r=[],i=n.entries(),a=i.next();for(;!a.done;){let[e,n]=a.value,o=[],s=n.values(),c=s.next();for(;!c.done;){let e=c.value;if(e.length>0){let n=e.map(e=>Bn(e,t));o.push({scope:Ln(e[0].instrumentationScope),spans:n,schemaUrl:e[0].instrumentationScope.schemaUrl})}c=s.next()}let l=In(e),u={resource:l,scopeSpans:o,schemaUrl:l.schemaUrl};r.push(u),a=i.next()}return r}var Kn={serializeRequest:e=>{let t=Un(e,{useHex:!0,useLongBits:!1});return new TextEncoder().encode(JSON.stringify(t))},deserializeResponse:e=>{if(e.length===0)return{};let t=new TextDecoder;return JSON.parse(t.decode(e))}},qn=5,Jn=1e3,Yn=5e3,Xn=1.5,Zn=.2;function Qn(){return 2*Zn*Math.random()-Zn}var $n=class{_transport;constructor(e){this._transport=e}retry(e,t,n){return new Promise((r,i)=>{setTimeout(()=>{this._transport.send(e,t).then(r,i)},n)})}async send(e,t){let n=Date.now()+t,r=await this._transport.send(e,t),i=qn,a=Jn;for(;r.status===`retryable`&&i>0;){i--;let t=Math.max(Math.min(a,Yn)+Qn(),0);a*=Xn;let o=r.retryInMillis??t,s=n-Date.now();if(o>s)return r;r=await this.retry(e,s,o)}return r}shutdown(){return this._transport.shutdown()}};function er(e){return new $n(e.transport)}function tr(e){return[429,502,503,504].includes(e)}function nr(e){if(e==null)return;let t=Number.parseInt(e,10);if(Number.isInteger(t))return t>0?t*1e3:-1;let n=new Date(e).getTime()-Date.now();return n>=0?n:0}var rr=class{_parameters;constructor(e){this._parameters=e}send(e,t){return new Promise(n=>{let r=new XMLHttpRequest;r.timeout=t,r.open(`POST`,this._parameters.url);let i=this._parameters.headers();Object.entries(i).forEach(([e,t])=>{r.setRequestHeader(e,t)}),r.ontimeout=e=>{n({status:`failure`,error:Error(`XHR request timed out`)})},r.onreadystatechange=()=>{r.status>=200&&r.status<=299?(_.debug(`XHR success`),n({status:`success`})):r.status&&tr(r.status)?n({status:`retryable`,retryInMillis:nr(r.getResponseHeader(`Retry-After`))}):r.status!==0&&n({status:`failure`,error:Error(`XHR request failed with non-retryable status`)})},r.onabort=()=>{n({status:`failure`,error:Error(`XHR request aborted`)})},r.onerror=()=>{n({status:`failure`,error:Error(`XHR request errored`)})},r.send(e)})}shutdown(){}};function ir(e){return new rr(e)}var ar=class{_params;constructor(e){this._params=e}send(e){return new Promise(t=>{navigator.sendBeacon(this._params.url,new Blob([e],{type:this._params.blobType}))?(_.debug(`SendBeacon success`),t({status:`success`})):t({status:`failure`,error:Error(`SendBeacon failed`)})})}shutdown(){}};function or(e){return new ar(e)}var sr=class{_parameters;constructor(e){this._parameters=e}async send(e,t){let n=new AbortController,r=setTimeout(()=>n.abort(),t);try{let t=!!globalThis.location,r=new URL(this._parameters.url),i=await fetch(r.href,{method:`POST`,headers:this._parameters.headers(),body:e,signal:n.signal,keepalive:t,mode:t?globalThis.location?.origin===r.origin?`same-origin`:`cors`:`no-cors`});return i.status>=200&&i.status<=299?(_.debug(`response success`),{status:`success`}):tr(i.status)?{status:`retryable`,retryInMillis:nr(i.headers.get(`Retry-After`))}:{status:`failure`,error:Error(`Fetch request failed with non-retryable status`)}}catch(e){return e?.name===`AbortError`?{status:`failure`,error:Error(`Fetch request timed out`,{cause:e})}:{status:`failure`,error:Error(`Fetch request errored`,{cause:e})}}finally{clearTimeout(r)}}shutdown(){}};function cr(e){return new sr(e)}function lr(e,t){return wn(e,t,er({transport:ir(e)}))}function ur(e,t){return wn(e,t,er({transport:cr(e)}))}function dr(e,t){return wn(e,t,er({transport:or({url:e.url,blobType:e.headers()[`Content-Type`]})}))}function fr(e){return()=>{let t={};return Object.entries(e?.()??{}).forEach(([e,n])=>{n===void 0?_.warn(`Header "${e}" has invalid value (${n}) and will be ignored`):t[e]=String(n)}),t}}function pr(e,t,n){let r={...n()},i={};return()=>(t!=null&&Object.assign(i,t()),e!=null&&Object.assign(i,e()),Object.assign(i,r))}function mr(e){if(e!=null)try{let t=globalThis.location?.href;return new URL(e,t).href}catch{throw Error(`Configuration: Could not parse user-provided export URL: '${e}'`)}}function hr(n){return async r=>{let{Agent:i}=await t(()=>import(`./__vite-browser-external-B35O8xpx.js`).then(t=>e(t.default)),__vite__mapDeps([0,1]),import.meta.url);return new i(n)}}function gr(e,t,n){return{...Ae(e,t,n),headers:pr(fr(e.headers),t.headers,n.headers),url:mr(e.url)??t.url??n.url,agentFactory:e.agentFactory??t.agentFactory??n.agentFactory}}function _r(e,t){return{...je(),headers:()=>e,url:`http://localhost:4318/`+t,agentFactory:hr({keepAlive:!0})}}function vr(e,t,n){return gr({url:e.url,timeoutMillis:e.timeoutMillis,headers:ke(e.headers),concurrencyLimit:e.concurrencyLimit},{},_r(n,t))}function yr(e,t,n,r){return br(e.headers)(vr(e,n,r),t)}function br(e){return!e&&typeof navigator.sendBeacon==`function`?dr:globalThis.fetch===void 0?lr:ur}var xr=class extends Ee{constructor(e={}){super(yr(e,Kn,`v1/traces`,{"Content-Type":`application/json`}))}},Sr=class{emit(e){}},Cr=new Sr,wr=new class{getLogger(e,t,n){return new Sr}},Tr=class{constructor(e,t,n,r){this._provider=e,this.name=t,this.version=n,this.options=r}emit(e){this._getLogger().emit(e)}_getLogger(){if(this._delegate)return this._delegate;let e=this._provider._getDelegateLogger(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):Cr}},Er=class{getLogger(e,t,n){return this._getDelegateLogger(e,t,n)??new Tr(this,e,t,n)}_getDelegate(){return this._delegate??wr}_setDelegate(e){this._delegate=e}_getDelegateLogger(e,t,n){return this._delegate?.getLogger(e,t,n)}},Dr=typeof globalThis==`object`?globalThis:typeof self==`object`?self:typeof window==`object`?window:typeof global==`object`?global:{},N=Symbol.for(`io.opentelemetry.js.api.logs`),P=Dr;function Or(e,t,n){return r=>r===e?t:n}var kr=class e{constructor(){this._proxyLoggerProvider=new Er}static getInstance(){return this._instance||=new e,this._instance}setGlobalLoggerProvider(e){return P[N]?this.getLoggerProvider():(P[N]=Or(1,e,wr),this._proxyLoggerProvider._setDelegate(e),e)}getLoggerProvider(){return P[N]?.call(P,1)??this._proxyLoggerProvider}getLogger(e,t,n){return this.getLoggerProvider().getLogger(e,t,n)}disable(){delete P[N],this._proxyLoggerProvider=new Er}}.getInstance();function Ar(e,t,n,r){for(let i=0,a=e.length;i<a;i++){let a=e[i];t&&a.setTracerProvider(t),n&&a.setMeterProvider(n),r&&a.setLoggerProvider&&a.setLoggerProvider(r),a.getConfig().enabled||a.enable()}}function jr(e){e.forEach(e=>e.disable())}function Mr(e){let t=e.tracerProvider||d.getTracerProvider(),n=e.meterProvider||Te.getMeterProvider(),r=e.loggerProvider||kr.getLoggerProvider(),i=e.instrumentations?.flat()??[];return Ar(i,t,n,r),()=>{jr(i)}}var F=console.error.bind(console);function I(e,t,n){let r=!!e[t]&&Object.prototype.propertyIsEnumerable.call(e,t);Object.defineProperty(e,t,{configurable:!0,enumerable:r,writable:!0,value:n})}var Nr=(e,t,n)=>{if(!e||!e[t]){F(`no original function `+String(t)+` to wrap`);return}if(!n){F(`no wrapper function`),F(Error().stack);return}let r=e[t];if(typeof r!=`function`||typeof n!=`function`){F(`original object and wrapper must be functions`);return}let i=n(r,t);return I(i,`__original`,r),I(i,`__unwrap`,()=>{e[t]===i&&I(e,t,r)}),I(i,`__wrapped`,!0),I(e,t,i),i},Pr=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{F(`must provide one or more modules to patch`),F(Error().stack);return}if(!(t&&Array.isArray(t))){F(`must provide one or more functions to wrap on modules`);return}e.forEach(e=>{t.forEach(t=>{Nr(e,t,n)})})},Fr=(e,t)=>{if(!e||!e[t]){F(`no function to unwrap.`),F(Error().stack);return}let n=e[t];if(!n.__unwrap)F(`no original to unwrap to -- has `+String(t)+` already been unwrapped?`);else{n.__unwrap();return}},Ir=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{F(`must provide one or more modules to patch`),F(Error().stack);return}if(!(t&&Array.isArray(t))){F(`must provide one or more functions to unwrap on modules`);return}e.forEach(e=>{t.forEach(t=>{Fr(e,t)})})};function L(e){e&&e.logger&&(typeof e.logger==`function`?F=e.logger:F(`new logger isn't a function, not replacing`))}L.wrap=Nr,L.massWrap=Pr,L.unwrap=Fr,L.massUnwrap=Ir;var Lr=class{instrumentationName;instrumentationVersion;_config={};_tracer;_meter;_logger;_diag;constructor(e,t,n){this.instrumentationName=e,this.instrumentationVersion=t,this.setConfig(n),this._diag=_.createComponentLogger({namespace:e}),this._tracer=d.getTracer(e,t),this._meter=Te.getMeter(e,t),this._logger=kr.getLogger(e,t),this._updateMetricInstruments()}_wrap=Nr;_unwrap=Fr;_massWrap=Pr;_massUnwrap=Ir;get meter(){return this._meter}setMeterProvider(e){this._meter=e.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()}get logger(){return this._logger}setLoggerProvider(e){this._logger=e.getLogger(this.instrumentationName,this.instrumentationVersion)}getModuleDefinitions(){let e=this.init()??[];return Array.isArray(e)?e:[e]}_updateMetricInstruments(){}getConfig(){return this._config}setConfig(e){this._config={enabled:!0,...e}}setTracerProvider(e){this._tracer=e.getTracer(this.instrumentationName,this.instrumentationVersion)}get tracer(){return this._tracer}_runSpanCustomizationHook(e,t,n,r){if(e)try{e(n,r)}catch(e){this._diag.error(`Error running span customization hook due to exception in handler`,{triggerName:t},e)}}},Rr=class extends Lr{constructor(e,t,n){super(e,t,n),this._config.enabled&&this.enable()}};function R(e,t,n){let r,i;try{i=e()}catch(e){r=e}finally{if(t(r,i),r&&!n)throw r;return i}}function z(e){return typeof e==`function`&&typeof e.__original==`function`&&typeof e.__unwrap==`function`&&e.__wrapped===!0}var B;(function(e){e[e.STABLE=1]=`STABLE`,e[e.OLD=2]=`OLD`,e[e.DUPLICATE=3]=`DUPLICATE`})(B||={});function zr(e,t){let n=B.OLD,r=t?.split(`,`).map(e=>e.trim()).filter(e=>e!==``);for(let t of r??[])if(t.toLowerCase()===e+`/dup`){n=B.DUPLICATE;break}else t.toLowerCase()===e&&(n=B.STABLE);return n}var V;function Br(){if(V===void 0)try{let e=globalThis.process.argv0;V=e?`unknown_service:${e}`:`unknown_service`}catch{V=`unknown_service`}return V}var H=e=>typeof e==`object`&&!!e&&typeof e.then==`function`,Vr=class e{_rawAttributes;_asyncAttributesPending=!1;_schemaUrl;_memoizedAttributes;static FromAttributeList(t,n){let r=new e({},n);return r._rawAttributes=Wr(t),r._asyncAttributesPending=t.filter(([e,t])=>H(t)).length>0,r}constructor(e,t){let n=e.attributes??{};this._rawAttributes=Object.entries(n).map(([e,t])=>(H(t)&&(this._asyncAttributesPending=!0),[e,t])),this._rawAttributes=Wr(this._rawAttributes),this._schemaUrl=Gr(t?.schemaUrl)}get asyncAttributesPending(){return this._asyncAttributesPending}async waitForAsyncAttributes(){if(this.asyncAttributesPending){for(let e=0;e<this._rawAttributes.length;e++){let[t,n]=this._rawAttributes[e];this._rawAttributes[e]=[t,H(n)?await n:n]}this._asyncAttributesPending=!1}}get attributes(){if(this.asyncAttributesPending&&_.error(`Accessing resource attributes before async attributes settled`),this._memoizedAttributes)return this._memoizedAttributes;let e={};for(let[t,n]of this._rawAttributes){if(H(n)){_.debug(`Unsettled resource attribute ${t} skipped`);continue}n!=null&&(e[t]??=n)}return this._asyncAttributesPending||(this._memoizedAttributes=e),e}getRawAttributes(){return this._rawAttributes}get schemaUrl(){return this._schemaUrl}merge(t){if(t==null)return this;let n=Kr(this,t),r=n?{schemaUrl:n}:void 0;return e.FromAttributeList([...t.getRawAttributes(),...this.getRawAttributes()],r)}};function Hr(e,t){return Vr.FromAttributeList(Object.entries(e),t)}function Ur(){return Hr({[mt]:Br(),[gt]:St[gt],[vt]:St[vt],[yt]:St[yt]})}function Wr(e){return e.map(([e,t])=>H(t)?[e,t.catch(t=>{_.debug(`promise rejection for resource attribute: %s - %s`,e,t)})]:[e,t])}function Gr(e){if(typeof e==`string`||e===void 0)return e;_.warn(`Schema URL must be string or undefined, got %s. Schema URL will be ignored.`,e)}function Kr(e,t){let n=e?.schemaUrl,r=t?.schemaUrl,i=n===void 0||n===``,a=r===void 0||r===``;if(i)return r;if(a||n===r)return n;_.warn(`Schema URL merge conflict: old resource has "%s", updating resource has "%s". Resulting resource will have undefined Schema URL.`,n,r)}var qr=`exception`,Jr=Symbol.for(`nodejs.util.inspect.custom`);function Yr(e){let t={};for(let[n,r]of e.getRawAttributes())typeof r?.then!=`function`&&r!=null&&(t[n]??=r);return t}function Xr(e,t,n,r,i){if(typeof n==`number`&&n<0){let t=`[${e}]`;return r?.stylize?r.stylize(t,`special`):t}return typeof i!=`function`||!r?t:`${e} ${i(t,{...r,depth:r.depth==null?r.depth:r.depth-1})}`}var Zr=class{_spanContext;kind;parentSpanContext;attributes={};links=[];events=[];startTime;resource;instrumentationScope;_droppedAttributesCount=0;_droppedEventsCount=0;_droppedLinksCount=0;_attributesCount=0;name;status={code:m.UNSET};endTime=[0,0];_ended=!1;_duration=[-1,-1];_spanProcessor;_spanLimits;_attributeValueLengthLimit;_recordEndMetrics;_performanceStartTime;_performanceOffset;_startTimeProvided;constructor(e){let t=Date.now();if(this._spanContext=e.spanContext,this._performanceStartTime=b.now(),this._performanceOffset=t-(this._performanceStartTime+b.timeOrigin),this._startTimeProvided=e.startTime!=null,this._spanLimits=e.spanLimits,this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit??0,this._spanProcessor=e.spanProcessor,this.name=e.name,this.parentSpanContext=e.parentSpanContext,this.kind=e.kind,e.links)for(let t of e.links)this.addLink(t);this.startTime=this._getTime(e.startTime??t),this.resource=e.resource,this.instrumentationScope=e.scope,this._recordEndMetrics=e.recordEndMetrics,e.attributes!=null&&this.setAttributes(e.attributes),this._spanProcessor.onStart(this,e.context)}spanContext(){return this._spanContext}setAttribute(e,t){if(t==null||this._isSpanEnded())return this;if(e.length===0)return _.warn(`Invalid attribute key: ${e}`),this;if(!Ge(t))return _.warn(`Invalid attribute value set for key: ${e}`),this;let{attributeCountLimit:n}=this._spanLimits,r=!Object.prototype.hasOwnProperty.call(this.attributes,e);return n!==void 0&&this._attributesCount>=n&&r?(this._droppedAttributesCount++,this):(this.attributes[e]=this._truncateToSize(t),r&&this._attributesCount++,this)}setAttributes(e){for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&this.setAttribute(t,e[t]);return this}addEvent(e,t,n){if(this._isSpanEnded())return this;let{eventCountLimit:r}=this._spanLimits;if(r===0)return _.warn(`No events allowed.`),this._droppedEventsCount++,this;r!==void 0&&this.events.length>=r&&(this._droppedEventsCount===0&&_.debug(`Dropping extra events.`),this.events.shift(),this._droppedEventsCount++),Dt(t)&&(Dt(n)||(n=t),t=void 0);let i=v(t),{attributePerEventCountLimit:a}=this._spanLimits,o={},s=0,c=0;for(let e in i){if(!Object.prototype.hasOwnProperty.call(i,e))continue;let t=i[e];if(a!==void 0&&c>=a){s++;continue}o[e]=this._truncateToSize(t),c++}return this.events.push({name:e,attributes:o,time:this._getTime(n),droppedAttributesCount:s}),this}addLink(e){if(this._isSpanEnded())return this;let{linkCountLimit:t}=this._spanLimits;if(t===0)return this._droppedLinksCount++,this;t!==void 0&&this.links.length>=t&&(this._droppedLinksCount===0&&_.debug(`Dropping extra links.`),this.links.shift(),this._droppedLinksCount++);let{attributePerLinkCountLimit:n}=this._spanLimits,r=v(e.attributes),i={},a=0,o=0;for(let e in r){if(!Object.prototype.hasOwnProperty.call(r,e))continue;let t=r[e];if(n!==void 0&&o>=n){a++;continue}i[e]=this._truncateToSize(t),o++}let s={context:e.context};return o>0&&(s.attributes=i),a>0&&(s.droppedAttributesCount=a),this.links.push(s),this}addLinks(e){for(let t of e)this.addLink(t);return this}setStatus(e){if(this._isSpanEnded()||e.code===m.UNSET||this.status.code===m.OK)return this;let t={code:e.code};return e.code===m.ERROR&&(typeof e.message==`string`?t.message=e.message:e.message!=null&&_.warn(`Dropping invalid status.message of type '${typeof e.message}', expected 'string'`)),this.status=t,this}updateName(e){return this._isSpanEnded()||(this.name=e),this}end(e){if(this._isSpanEnded()){_.error(`${this.name} ${this._spanContext.traceId}-${this._spanContext.spanId} - You can only call end() on a span once.`);return}this.endTime=this._getTime(e),this._duration=Tt(this.startTime,this.endTime),this._duration[0]<0&&(_.warn(`Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.`,this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0]),this._droppedEventsCount>0&&_.warn(`Dropped ${this._droppedEventsCount} events because eventCountLimit reached`),this._droppedLinksCount>0&&_.warn(`Dropped ${this._droppedLinksCount} links because linkCountLimit reached`),this._spanProcessor.onEnding&&this._spanProcessor.onEnding(this),this._recordEndMetrics?.(),this._ended=!0,this._spanProcessor.onEnd(this)}_getTime(e){if(typeof e==`number`&&e<=b.now())return C(e+this._performanceOffset);if(typeof e==`number`)return S(e);if(e instanceof Date)return S(e.getTime());if(Et(e))return e;if(this._startTimeProvided)return S(Date.now());let t=b.now()-this._performanceStartTime;return Ot(this.startTime,S(t))}isRecording(){return this._ended===!1}recordException(e,t){let n={};typeof e==`string`?n[ot]=e:e&&(e.code?n[ct]=e.code.toString():e.name&&(n[ct]=e.name),e.message&&(n[ot]=e.message),e.stack&&(n[st]=e.stack)),n[`exception.type`]||n[`exception.message`]?this.addEvent(qr,n,t):_.warn(`Failed to record an exception ${e}`)}get duration(){return this._duration}get ended(){return this._ended}get droppedAttributesCount(){return this._droppedAttributesCount}get droppedEventsCount(){return this._droppedEventsCount}get droppedLinksCount(){return this._droppedLinksCount}_isSpanEnded(){if(this._ended){let e=Error(`Operation attempted on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`);_.warn(`Cannot execute the operation on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`,e)}return this._ended}_truncateToLimitUtil(e,t){return e.length<=t?e:e.substring(0,t)}_truncateToSize(e){let t=this._attributeValueLengthLimit;return t<=0?(_.warn(`Attribute value limit must be positive, got ${t}`),e):typeof e==`string`?this._truncateToLimitUtil(e,t):Array.isArray(e)?e.map(e=>typeof e==`string`?this._truncateToLimitUtil(e,t):e):e}[Jr](e,t,n){return Xr(`SpanImpl`,{name:this.name,kind:this.kind,spanContext:this._spanContext,parentSpanContext:this.parentSpanContext,status:this.status,startTime:this.startTime,endTime:this.endTime,duration:this._duration,ended:this._ended,attributes:this.attributes,events:this.events,links:this.links,droppedAttributesCount:this._droppedAttributesCount,droppedEventsCount:this._droppedEventsCount,droppedLinksCount:this._droppedLinksCount,instrumentationScope:this.instrumentationScope,resource:{attributes:Yr(this.resource)}},e,t,n)}},U;(function(e){e[e.NOT_RECORD=0]=`NOT_RECORD`,e[e.RECORD=1]=`RECORD`,e[e.RECORD_AND_SAMPLED=2]=`RECORD_AND_SAMPLED`})(U||={});var Qr=`otel.component.name`,$r=`otel.component.type`,ei=`otel.span.parent.origin`,ti=`otel.span.sampling_result`,ni=`otel.sdk.processor.span.processed`,ri=`otel.sdk.processor.span.queue.capacity`,ii=`otel.sdk.processor.span.queue.size`,ai=`otel.sdk.span.live`,oi=`otel.sdk.span.started`,si=`batching_span_processor`,ci=class{startedSpans;liveSpans;constructor(e){this.startedSpans=e.createCounter(oi,{unit:`{span}`,description:`The number of created spans.`}),this.liveSpans=e.createUpDownCounter(ai,{unit:`{span}`,description:`The number of currently live spans.`})}startSpan(e,t){let n=ui(t);if(this.startedSpans.add(1,{[ei]:li(e),[ti]:n}),t===U.NOT_RECORD)return()=>{};let r={[ti]:n};return this.liveSpans.add(1,r),()=>{this.liveSpans.add(-1,r)}}};function li(e){return e?e.isRemote?`remote`:`local`:`none`}function ui(e){switch(e){case U.RECORD_AND_SAMPLED:return`RECORD_AND_SAMPLE`;case U.RECORD:return`RECORD_ONLY`;case U.NOT_RECORD:return`DROP`}}var di=`2.9.0`,fi=class{_sampler;_spanLimits;_idGenerator;instrumentationScope;_resource;_spanProcessor;_tracerMetrics;constructor(e,t){this.instrumentationScope=e,this._sampler=t.sampler,this._spanLimits=t.spanLimits,this._resource=t.resource,this._idGenerator=t.idGenerator,this._spanProcessor=t.spanProcessor,this._tracerMetrics=new ci(t.meterProvider.getMeter(`@opentelemetry/sdk-trace`,di))}startSpan(e,t={},r=h.active()){t.root&&(r=d.deleteSpan(r));let i=d.getSpan(r);if(Ie(r))return _.debug(`Instrumentation suppressed, returning Noop Span`),d.wrapSpanContext(o);let a=i?.spanContext(),s=this._idGenerator.generateSpanId(),c,l,u;!a||!d.isSpanContextValid(a)?l=this._idGenerator.generateTraceId():(l=a.traceId,u=a.traceState,c=a);let f=t.kind??Se.INTERNAL,ee=(t.links??[]).map(e=>({context:e.context,attributes:v(e.attributes)})),p=v(t.attributes),m=this._sampler.shouldSample(r,l,e,f,p,ee),te=this._tracerMetrics.startSpan(a,m.decision);u=m.traceState??u;let ne=m.decision===xe.RECORD_AND_SAMPLED?n.SAMPLED:n.NONE,re={traceId:l,spanId:s,traceFlags:ne,traceState:u};if(m.decision===xe.NOT_RECORD)return _.debug(`Recording is off, propagating context in a non-recording span`),d.wrapSpanContext(re);let g=v(Object.assign(p,m.attributes));return new Zr({resource:this._resource,scope:this.instrumentationScope,context:r,spanContext:re,name:e,kind:f,links:ee,parentSpanContext:c,attributes:g,startTime:t.startTime,spanProcessor:this._spanProcessor,spanLimits:this._spanLimits,recordEndMetrics:te})}startActiveSpan(e,t,n,r){let i,a,o;if(arguments.length<2)return;arguments.length===2?o=t:arguments.length===3?(i=t,o=n):(i=t,a=n,o=r);let s=a??h.active(),c=this.startSpan(e,i,s),l=d.setSpan(s,c);return h.with(l,o,void 0,c)}[Jr](e,t,n){return Xr(`Tracer`,{instrumentationScope:this.instrumentationScope,resource:{attributes:Yr(this._resource)},spanLimits:this._spanLimits},e,t,n)}},pi=class{_spanProcessors;constructor(e){this._spanProcessors=e}forceFlush(){let e=[];for(let t of this._spanProcessors)e.push(t.forceFlush());return new Promise(t=>{Promise.all(e).then(()=>{t()}).catch(e=>{y(e||Error(`MultiSpanProcessor: forceFlush failed`)),t()})})}onStart(e,t){for(let n of this._spanProcessors)n.onStart(e,t)}onEnding(e){for(let t of this._spanProcessors)t.onEnding&&t.onEnding(e)}onEnd(e){for(let t of this._spanProcessors)t.onEnd(e)}shutdown(){let e=[];for(let t of this._spanProcessors)e.push(t.shutdown());return new Promise((t,n)=>{Promise.all(e).then(()=>{t()},n)})}},mi=class{shouldSample(){return{decision:U.NOT_RECORD}}toString(){return`AlwaysOffSampler`}},W=class{shouldSample(){return{decision:U.RECORD_AND_SAMPLED}}toString(){return`AlwaysOnSampler`}},G=class{_root;_remoteParentSampled;_remoteParentNotSampled;_localParentSampled;_localParentNotSampled;constructor(e){this._root=e.root,this._root||=(y(Error(`ParentBasedSampler must have a root sampler configured`)),new W),this._remoteParentSampled=e.remoteParentSampled??new W,this._remoteParentNotSampled=e.remoteParentNotSampled??new mi,this._localParentSampled=e.localParentSampled??new W,this._localParentNotSampled=e.localParentNotSampled??new mi}shouldSample(e,t,r,i,a,o){let s=d.getSpanContext(e);return!s||!c(s)?this._root.shouldSample(e,t,r,i,a,o):s.isRemote?s.traceFlags&n.SAMPLED?this._remoteParentSampled.shouldSample(e,t,r,i,a,o):this._remoteParentNotSampled.shouldSample(e,t,r,i,a,o):s.traceFlags&n.SAMPLED?this._localParentSampled.shouldSample(e,t,r,i,a,o):this._localParentNotSampled.shouldSample(e,t,r,i,a,o)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}},hi=new Map,gi=class{processedSpans;queueSize;queueSizeCallback;standardAttrs;droppedAttrs;constructor(e,t,n){let r=hi.get(e)??0;if(hi.set(e,r+1),this.standardAttrs={[$r]:e,[Qr]:`${e}/${r}`},this.droppedAttrs={...this.standardAttrs,[at]:`queue_full`},this.processedSpans=t.createCounter(ni,{unit:`{span}`,description:`The number of spans for which the processing has finished, either successful or failed.`}),n){let{capacity:e,getQueueSize:r}=n;t.createUpDownCounter(ri,{unit:`{span}`,description:`The maximum number of spans the queue of a given instance of an SDK span processor can hold.`}).add(e,this.standardAttrs),this.queueSize=t.createObservableUpDownCounter(ii,{unit:`{span}`,description:`The number of spans in the queue of a given instance of an SDK span processor.`}),this.queueSizeCallback=e=>e.observe(r(),this.standardAttrs),this.queueSize.addCallback(this.queueSizeCallback)}}dropSpans(e){this.processedSpans.add(e,this.droppedAttrs)}finishSpans(e,t){if(!t){this.processedSpans.add(e,this.standardAttrs);return}let n={...this.standardAttrs,[at]:t.name};this.processedSpans.add(e,n)}shutdown(){this.queueSize&&this.queueSizeCallback&&this.queueSize.removeCallback(this.queueSizeCallback)}},_i=class{_maxExportBatchSize;_maxQueueSize;_scheduledDelayMillis;_exportTimeoutMillis;_exporter;_metrics;_isExporting=!1;_finishedSpans=[];_timer;_shutdownOnce;_droppedSpansCount=0;constructor(e){this._exporter=e.exporter,this._maxExportBatchSize=e.maxExportBatchSize??512,this._maxQueueSize=e.maxQueueSize??2048,this._scheduledDelayMillis=e.scheduledDelayMillis??5e3,this._exportTimeoutMillis=e.exportTimeoutMillis??3e4,this._shutdownOnce=new yn(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(_.warn(`BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize`),this._maxExportBatchSize=this._maxQueueSize),this._metrics=new gi(si,e.selfObsMeterProvider?e.selfObsMeterProvider.getMeter(`@opentelemetry/sdk-trace`):be(),{capacity:this._maxQueueSize,getQueueSize:()=>this._finishedSpans.length})}forceFlush(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()}onStart(e,t){}onEnd(e){this._shutdownOnce.isCalled||(e.spanContext().traceFlags&n.SAMPLED)!==0&&this._addToBuffer(e)}shutdown(){return this._shutdownOnce.call()}_shutdown(){return Promise.resolve().then(()=>this.onShutdown()).then(()=>this._flushAll()).then(()=>(this._metrics.shutdown(),this._exporter.shutdown()))}_addToBuffer(e){if(this._finishedSpans.length>=this._maxQueueSize){this._droppedSpansCount===0&&_.debug(`maxQueueSize reached, dropping spans`),this._droppedSpansCount++,this._metrics.dropSpans(1);return}this._droppedSpansCount>0&&(_.warn(`Dropped ${this._droppedSpansCount} spans because maxQueueSize reached`),this._droppedSpansCount=0),this._finishedSpans.push(e),this._maybeStartTimer()}_flushAll(){return new Promise((e,t)=>{let n=[],r=Math.ceil(this._finishedSpans.length/this._maxExportBatchSize);for(let e=0,t=r;e<t;e++)n.push(this._flushOneBatch());Promise.all(n).then(()=>{e()}).catch(t)})}_flushOneBatch(){return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise((e,t)=>{let n=setTimeout(()=>{t(Error(`Timeout`))},this._exportTimeoutMillis);h.with(Fe(h.active()),()=>{let r;this._finishedSpans.length<=this._maxExportBatchSize?(r=this._finishedSpans,this._finishedSpans=[]):r=this._finishedSpans.splice(0,this._maxExportBatchSize);let i=()=>this._exporter.export(r,i=>{clearTimeout(n),this._metrics.finishSpans(r.length,i.error),i.code===E.SUCCESS?e():t(i.error??Error(`BatchSpanProcessor: span export failed`))}),a=null;for(let e=0,t=r.length;e<t;e++){let t=r[e];t.resource.asyncAttributesPending&&t.resource.waitForAsyncAttributes&&(a??=[],a.push(t.resource.waitForAsyncAttributes()))}a===null?i():Promise.all(a).then(i,e=>{y(e),t(e)})})})}_maybeStartTimer(){if(this._isExporting)return;let e=()=>{this._isExporting=!0,this._flushOneBatch().finally(()=>{this._isExporting=!1,this._finishedSpans.length>0&&(this._clearTimer(),this._maybeStartTimer())}).catch(e=>{this._isExporting=!1,y(e)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return e();this._timer===void 0&&(this._timer=setTimeout(()=>e(),this._scheduledDelayMillis),typeof this._timer!=`number`&&this._timer.unref())}_clearTimer(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)}},vi=class extends _i{_visibilityChangeListener;_pageHideListener;constructor(e){super(e),this.onInit(e)}onInit(e){e.disableAutoFlushOnDocumentHide!==!0&&typeof document<`u`&&(this._visibilityChangeListener=()=>{document.visibilityState===`hidden`&&this.forceFlush().catch(e=>{y(e)})},this._pageHideListener=()=>{this.forceFlush().catch(e=>{y(e)})},document.addEventListener(`visibilitychange`,this._visibilityChangeListener),document.addEventListener(`pagehide`,this._pageHideListener))}onShutdown(){typeof document<`u`&&(this._visibilityChangeListener&&document.removeEventListener(`visibilitychange`,this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener(`pagehide`,this._pageHideListener))}},yi=16,bi=8,xi=new Uint8Array(yi),Si=new Uint8Array(bi),Ci=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,`0`));function wi(e){for(let t=0;t<e.length;t++)e[t]=Math.random()*256>>>0;for(let t=0;t<e.length;t++)if(e[t]>0)return;e[e.length-1]=1}function Ti(e){let t=``;for(let n=0;n<e.length;n++)t+=Ci[e[n]];return t}var Ei=class{generateTraceId(){return wi(xi),Ti(xi)}generateSpanId(){return wi(Si),Ti(Si)}},K;(function(e){e[e.resolved=0]=`resolved`,e[e.timeout=1]=`timeout`,e[e.error=2]=`error`,e[e.unresolved=3]=`unresolved`})(K||={});var Di=class{_resource;_activeSpanProcessor;_forceFlushTimeoutMillis;_tracerOptions;_tracers=new Map;constructor(e={}){this._forceFlushTimeoutMillis=e.forceFlushTimeoutMillis??3e4,this._resource=e.resource??Ur(),this._activeSpanProcessor=new pi(e.spanProcessors??[]),this._tracerOptions={resource:this._resource,sampler:e.sampler??new G({root:new W}),spanLimits:{attributeCountLimit:e.spanLimits?.attributeCountLimit??128,attributeValueLengthLimit:e.spanLimits?.attributeValueLengthLimit??1/0,eventCountLimit:e.spanLimits?.eventCountLimit??128,linkCountLimit:e.spanLimits?.linkCountLimit??128,attributePerEventCountLimit:e.spanLimits?.attributePerEventCountLimit??128,attributePerLinkCountLimit:e.spanLimits?.attributePerLinkCountLimit??128},idGenerator:e.idGenerator||new Ei,spanProcessor:this._activeSpanProcessor,meterProvider:e.meterProvider??{getMeter(){return be()}}}}getTracer(e,t,n){let r=`${e}@${t||``}:${n?.schemaUrl||``}`;return this._tracers.has(r)||this._tracers.set(r,new fi({name:e,version:t,schemaUrl:n?.schemaUrl},this._tracerOptions)),this._tracers.get(r)}forceFlush(){let e=this._forceFlushTimeoutMillis,t=this._activeSpanProcessor._spanProcessors.map(t=>new Promise(n=>{let r,i=setTimeout(()=>{n(Error(`Span processor did not completed within timeout period of ${e} ms`)),r=K.timeout},e);t.forceFlush().then(()=>{clearTimeout(i),r!==K.timeout&&(r=K.resolved,n(r))}).catch(e=>{clearTimeout(i),r=K.error,n(e)})}));return new Promise((e,n)=>{Promise.all(t).then(t=>{let r=t.filter(e=>e!==K.resolved);r.length>0?n(r):e()}).catch(e=>n([e]))})}shutdown(){return this._activeSpanProcessor.shutdown()}[Jr](e,t,n){let r=this._activeSpanProcessor._spanProcessors;return Xr(`TracerProvider`,{resource:{attributes:Yr(this._resource)},tracers:Array.from(this._tracers.keys()),spanProcessors:r.map(e=>e.constructor?.name??`SpanProcessor`)},e,t,n)}},Oi=class{_ratio;_upperBound;constructor(e=0){this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*4294967295)}shouldSample(e,t){return{decision:l(t)&&this._accumulate(t)<this._upperBound?U.RECORD_AND_SAMPLED:U.NOT_RECORD}}toString(){return`TraceIdRatioBased{${this._ratio}}`}_normalize(e){return typeof e!=`number`||isNaN(e)?0:e>=1?1:e<=0?0:e}_accumulate(e){let t=0;for(let n=0;n<32;n+=8){let r=0;for(let t=0;t<8;t++){let i=e.charCodeAt(n+t),a=i<58?i-48:i<71?i-55:i-87;r=r<<4|a}t=(t^r)>>>0}return t}},q;(function(e){e.AlwaysOff=`always_off`,e.AlwaysOn=`always_on`,e.ParentBasedAlwaysOff=`parentbased_always_off`,e.ParentBasedAlwaysOn=`parentbased_always_on`,e.ParentBasedTraceIdRatio=`parentbased_traceidratio`,e.TraceIdRatio=`traceidratio`})(q||={});var ki=1;function Ai(){return{sampler:ji(),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:1/0,attributeCountLimit:128},spanLimits:{attributeValueLengthLimit:1/0,attributeCountLimit:128,linkCountLimit:128,eventCountLimit:128,attributePerEventCountLimit:128,attributePerLinkCountLimit:128}}}function ji(){let e=q.ParentBasedAlwaysOn;switch(e){case q.AlwaysOn:return new W;case q.AlwaysOff:return new mi;case q.ParentBasedAlwaysOn:return new G({root:new W});case q.ParentBasedAlwaysOff:return new G({root:new mi});case q.TraceIdRatio:return new Oi(Mi());case q.ParentBasedTraceIdRatio:return new G({root:new Oi(Mi())});default:return _.error(`OTEL_TRACES_SAMPLER value "${e}" invalid, defaulting to "${q.ParentBasedAlwaysOn}".`),new G({root:new W})}}function Mi(){return _.error(`OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${ki}.`),ki}function Ni(e){let t=Object.assign({},e.spanLimits);return t.attributeCountLimit=e.spanLimits?.attributeCountLimit??e.generalLimits?.attributeCountLimit??void 0??void 0??128,t.attributeValueLengthLimit=e.spanLimits?.attributeValueLengthLimit??e.generalLimits?.attributeValueLengthLimit??void 0??void 0??1/0,Object.assign({},e,{spanLimits:t})}var Pi=class extends Di{constructor(e={}){let t=un({},Ai(),Ni(e));delete t.generalLimits,super(t)}},Fi=class extends vi{constructor(e,t){t||={};for(let[e,n]of[[`maxExportBatchSize`,`OTEL_BSP_MAX_EXPORT_BATCH_SIZE`],[`maxQueueSize`,`OTEL_BSP_MAX_QUEUE_SIZE`],[`scheduledDelayMillis`,`OTEL_BSP_SCHEDULE_DELAY`],[`exportTimeoutMillis`,`OTEL_BSP_EXPORT_TIMEOUT`]])t[e];super({exporter:e,...t})}},Ii=class{_enabled=!1;_currentContext=u;_bindFunction(e=u,t){let n=this,r=function(...r){return n.with(e,()=>t.apply(this,r))};return Object.defineProperty(r,`length`,{enumerable:!1,configurable:!0,writable:!1,value:t.length}),r}active(){return this._currentContext}bind(e,t){return e===void 0&&(e=this.active()),typeof t==`function`?this._bindFunction(e,t):t}disable(){return this._currentContext=u,this._enabled=!1,this}enable(){return this._enabled?this:(this._enabled=!0,this._currentContext=u,this)}with(e,t,n,...r){let i=this._currentContext;this._currentContext=e||u;try{return t.call(n,...r)}finally{this._currentContext=i}}};function Li(e){if(e!==null){if(e===void 0){let e=new Ii;e.enable(),h.setGlobalContextManager(e);return}e.enable(),h.setGlobalContextManager(e)}}function Ri(e){if(e!==null){if(e===void 0){p.setGlobalPropagator(new kt({propagators:[new qt,new Ue]}));return}p.setGlobalPropagator(e)}}var zi=class extends Pi{constructor(e={}){super(e)}register(e={}){d.setGlobalTracerProvider(this),Ri(e.propagator),Li(e.contextManager)}},J;(function(e){e.CONNECT_END=`connectEnd`,e.CONNECT_START=`connectStart`,e.DECODED_BODY_SIZE=`decodedBodySize`,e.DOM_COMPLETE=`domComplete`,e.DOM_CONTENT_LOADED_EVENT_END=`domContentLoadedEventEnd`,e.DOM_CONTENT_LOADED_EVENT_START=`domContentLoadedEventStart`,e.DOM_INTERACTIVE=`domInteractive`,e.DOMAIN_LOOKUP_END=`domainLookupEnd`,e.DOMAIN_LOOKUP_START=`domainLookupStart`,e.ENCODED_BODY_SIZE=`encodedBodySize`,e.FETCH_START=`fetchStart`,e.LOAD_EVENT_END=`loadEventEnd`,e.LOAD_EVENT_START=`loadEventStart`,e.NAVIGATION_START=`navigationStart`,e.REDIRECT_END=`redirectEnd`,e.REDIRECT_START=`redirectStart`,e.REQUEST_START=`requestStart`,e.RESPONSE_END=`responseEnd`,e.RESPONSE_START=`responseStart`,e.SECURE_CONNECTION_START=`secureConnectionStart`,e.START_TIME=`startTime`,e.UNLOAD_EVENT_END=`unloadEventEnd`,e.UNLOAD_EVENT_START=`unloadEventStart`})(J||={});var Bi=`http.response_content_length`,Vi=`http.response_content_length_uncompressed`;function Y(e,t){return t in e}function X(e,t,n,r=!0){if(Y(n,t)&&typeof n[t]==`number`&&!(r&&n[t]===0))return e.addEvent(t,n[t])}function Hi(e,t,n=!1,r,i){if(r===void 0&&(r=t[J.START_TIME]!==0),n||(X(e,J.FETCH_START,t,r),X(e,J.DOMAIN_LOOKUP_START,t,r),X(e,J.DOMAIN_LOOKUP_END,t,r),X(e,J.CONNECT_START,t,r),X(e,J.SECURE_CONNECTION_START,t,r),X(e,J.CONNECT_END,t,r),X(e,J.REQUEST_START,t,r),X(e,J.RESPONSE_START,t,r),X(e,J.RESPONSE_END,t,r)),!i){let n=t[J.ENCODED_BODY_SIZE];n!==void 0&&e.setAttribute(Bi,n);let r=t[J.DECODED_BODY_SIZE];r!==void 0&&n!==r&&e.setAttribute(Vi,r)}}function Ui(e,t){if(e.nodeType===Node.DOCUMENT_NODE)return`/`;let n=Gi(e,t);if(t&&n.indexOf(`@id`)>0)return n;let r=``;return e.parentNode&&(r+=Ui(e.parentNode,t)),r+=n,r}function Wi(e){if(!e.parentNode)return 0;let t=[e.nodeType];e.nodeType===Node.CDATA_SECTION_NODE&&t.push(Node.TEXT_NODE);let n=Array.from(e.parentNode.childNodes);return n=n.filter(n=>{let r=n.localName;return t.indexOf(n.nodeType)>=0&&r===e.localName}),n.length>=1?n.indexOf(e)+1:0}function Gi(e,t){let n=e.nodeType,r=Wi(e),i;if(n===Node.ELEMENT_NODE){let n=e.getAttribute(`id`);if(t&&n)return`//*[@id="${n}"]`;i=e.localName}else if(n===Node.TEXT_NODE||n===Node.CDATA_SECTION_NODE)i=`text()`;else if(n===Node.COMMENT_NODE)i=`comment()`;else return``;return i&&r>1?`/${i}[${r}]`:`/${i}`}var Ki;(function(e){e.DOCUMENT_LOAD=`documentLoad`,e.DOCUMENT_FETCH=`documentFetch`,e.RESOURCE_FETCH=`resourceFetch`})(Ki||={});var qi=`0.49.0`,Ji=`@opentelemetry/instrumentation-document-load`,Yi;(function(e){e.FIRST_PAINT=`firstPaint`,e.FIRST_CONTENTFUL_PAINT=`firstContentfulPaint`})(Yi||={});var Xi=()=>{let e={},t=b.getEntriesByType?.(`navigation`)[0];if(t)Object.values(J).forEach(n=>{if(Y(t,n)){let r=t[n];typeof r==`number`&&(e[n]=r)}});else{let t=b.timing;t&&Object.values(J).forEach(n=>{if(Y(t,n)){let r=t[n];typeof r==`number`&&(e[n]=r)}})}return e},Zi={"first-paint":Yi.FIRST_PAINT,"first-contentful-paint":Yi.FIRST_CONTENTFUL_PAINT},Qi=e=>{let t=b.getEntriesByType?.(`paint`);t&&t.forEach(({name:t,startTime:n})=>{Y(Zi,t)&&e.addEvent(Zi[t],n)})},$i=class extends Rr{component=`document-load`;version=`1`;moduleName=this.component;constructor(e={}){super(Ji,qi,e)}init(){}_onDocumentLoaded(){window.setTimeout(()=>{this._collectPerformance()})}_addResourcesSpans(e){let t=b.getEntriesByType?.(`resource`);t&&t.forEach(t=>{this._initResourceSpan(t,e)})}_collectPerformance(){let e=Array.from(document.getElementsByTagName(`meta`)).find(e=>e.getAttribute(`name`)===D),t=Xi(),n=e&&e.content||``;h.with(p.extract(u,{traceparent:n}),()=>{let e=this._startSpan(Ki.DOCUMENT_LOAD,J.FETCH_START,t);e&&(h.with(d.setSpan(h.active(),e),()=>{let e=this._startSpan(Ki.DOCUMENT_FETCH,J.FETCH_START,t);e&&(e.setAttribute(nt,location.href),h.with(d.setSpan(h.active(),e),()=>{Hi(e,t,this.getConfig().ignoreNetworkEvents),this._addCustomAttributesOnSpan(e,this.getConfig().applyCustomAttributesOnSpan?.documentFetch),this._endSpan(e,J.RESPONSE_END,t)}))}),e.setAttribute(nt,location.href),e.setAttribute(rt,navigator.userAgent),this._addResourcesSpans(e),this.getConfig().ignoreNetworkEvents||(X(e,J.FETCH_START,t),X(e,J.UNLOAD_EVENT_START,t),X(e,J.UNLOAD_EVENT_END,t),X(e,J.DOM_INTERACTIVE,t),X(e,J.DOM_CONTENT_LOADED_EVENT_START,t),X(e,J.DOM_CONTENT_LOADED_EVENT_END,t),X(e,J.DOM_COMPLETE,t),X(e,J.LOAD_EVENT_START,t),X(e,J.LOAD_EVENT_END,t)),this.getConfig().ignorePerformancePaintEvents||Qi(e),this._addCustomAttributesOnSpan(e,this.getConfig().applyCustomAttributesOnSpan?.documentLoad),this._endSpan(e,J.LOAD_EVENT_END,t))})}_endSpan(e,t,n){e&&(Y(n,t)?e.end(n[t]):e.end())}_initResourceSpan(e,t){let n=this._startSpan(Ki.RESOURCE_FETCH,J.FETCH_START,e,t);n&&(n.setAttribute(nt,e.name),Hi(n,e,this.getConfig().ignoreNetworkEvents),this._addCustomAttributesOnResourceSpan(n,e,this.getConfig().applyCustomAttributesOnSpan?.resourceFetch),this._endSpan(n,J.RESPONSE_END,e))}_startSpan(e,t,n,r){if(Y(n,t)&&typeof n[t]==`number`)return this.tracer.startSpan(e,{startTime:n[t]},r?d.setSpan(h.active(),r):void 0)}_waitForPageLoad(){window.document.readyState===`complete`?this._onDocumentLoaded():(this._onDocumentLoaded=this._onDocumentLoaded.bind(this),window.addEventListener(`load`,this._onDocumentLoaded))}_addCustomAttributesOnSpan(e,t){t&&R(()=>t(e),e=>{e&&this._diag.error(`addCustomAttributesOnSpan`,e)},!0)}_addCustomAttributesOnResourceSpan(e,t,n){n&&R(()=>n(e,t),e=>{e&&this._diag.error(`addCustomAttributesOnResourceSpan`,e)},!0)}enable(){window.removeEventListener(`load`,this._onDocumentLoaded),this._waitForPageLoad()}disable(){window.removeEventListener(`load`,this._onDocumentLoaded)}},Z;(function(e){e.CONNECT_END=`connectEnd`,e.CONNECT_START=`connectStart`,e.DECODED_BODY_SIZE=`decodedBodySize`,e.DOM_COMPLETE=`domComplete`,e.DOM_CONTENT_LOADED_EVENT_END=`domContentLoadedEventEnd`,e.DOM_CONTENT_LOADED_EVENT_START=`domContentLoadedEventStart`,e.DOM_INTERACTIVE=`domInteractive`,e.DOMAIN_LOOKUP_END=`domainLookupEnd`,e.DOMAIN_LOOKUP_START=`domainLookupStart`,e.ENCODED_BODY_SIZE=`encodedBodySize`,e.FETCH_START=`fetchStart`,e.LOAD_EVENT_END=`loadEventEnd`,e.LOAD_EVENT_START=`loadEventStart`,e.NAVIGATION_START=`navigationStart`,e.REDIRECT_END=`redirectEnd`,e.REDIRECT_START=`redirectStart`,e.REQUEST_START=`requestStart`,e.RESPONSE_END=`responseEnd`,e.RESPONSE_START=`responseStart`,e.SECURE_CONNECTION_START=`secureConnectionStart`,e.START_TIME=`startTime`,e.UNLOAD_EVENT_END=`unloadEventEnd`,e.UNLOAD_EVENT_START=`unloadEventStart`})(Z||={});var ea=`http.response_content_length`,ta=`http.response_content_length_uncompressed`,na;function ra(){return na||=document.createElement(`a`),na}function ia(e,t){return t in e}function Q(e,t,n,r=!0){if(ia(n,t)&&typeof n[t]==`number`&&!(r&&n[t]===0))return e.addEvent(t,n[t])}function aa(e,t,n=!1,r,i){if(r===void 0&&(r=t[Z.START_TIME]!==0),n||(Q(e,Z.FETCH_START,t,r),Q(e,Z.DOMAIN_LOOKUP_START,t,r),Q(e,Z.DOMAIN_LOOKUP_END,t,r),Q(e,Z.CONNECT_START,t,r),Q(e,Z.SECURE_CONNECTION_START,t,r),Q(e,Z.CONNECT_END,t,r),Q(e,Z.REQUEST_START,t,r),Q(e,Z.RESPONSE_START,t,r),Q(e,Z.RESPONSE_END,t,r)),!i){let n=t[Z.ENCODED_BODY_SIZE];n!==void 0&&e.setAttribute(ea,n);let r=t[Z.DECODED_BODY_SIZE];r!==void 0&&n!==r&&e.setAttribute(ta,r)}}function oa(e){return e.slice().sort((e,t)=>{let n=e[Z.FETCH_START],r=t[Z.FETCH_START];return n>r?1:n<r?-1:0})}function sa(){return typeof location<`u`?location.origin:void 0}function ca(e,t,n,r,i=new WeakSet,a){let o=da(e);e=o.toString();let s=ua(e,t,n,r,i,a);if(s.length===0)return{mainRequest:void 0};if(s.length===1)return{mainRequest:s[0]};let c=oa(s);if(o.origin!==sa()&&c.length>1){let e=c[0],t=la(c,e[Z.RESPONSE_END],n),r=e[Z.RESPONSE_END];return t[Z.FETCH_START]<r&&(t=e,e=void 0),{corsPreFlightRequest:e,mainRequest:t}}else return{mainRequest:s[0]}}function la(e,t,n){let r=T(n),i=T(w(t)),a=e[1],o,s=e.length;for(let t=1;t<s;t++){let n=e[t],s=T(w(n[Z.FETCH_START])),c=r-T(w(n[Z.RESPONSE_END]));s>=i&&(!o||c<o)&&(o=c,a=n)}return a}function ua(e,t,n,r,i,a){let o=T(t),s=T(n),c=r.filter(t=>{let n=T(w(t[Z.FETCH_START])),r=T(w(t[Z.RESPONSE_END]));return t.initiatorType.toLowerCase()===(a||`xmlhttprequest`)&&t.name===e&&n>=o&&r<=s});return c.length>0&&(c=c.filter(e=>!i.has(e))),c}function da(e){if(typeof URL==`function`)return new URL(e,typeof document<`u`?document.baseURI:typeof location<`u`?location.href:void 0);let t=ra();return t.href=e,t}function fa(e,t){let n=t||[];return(typeof n==`string`||n instanceof RegExp)&&(n=[n]),da(e).origin===sa()?!0:n.some(t=>gn(e,t))}var pa;(function(e){e.COMPONENT=`component`,e.HTTP_STATUS_TEXT=`http.status_text`})(pa||={});var ma=`http.host`,ha=`http.method`,ga=`http.request.body.size`,_a=`http.request_content_length_uncompressed`,va=`http.scheme`,ya=`http.status_code`,ba=`http.url`,xa=`http.user_agent`,Sa=_.createComponentLogger({namespace:`@opentelemetry/opentelemetry-instrumentation-fetch/utils`});function Ca(...e){if(e[0]instanceof URL||typeof e[0]==`string`){let t=e[1];if(!t?.body)return Promise.resolve();if(t.body instanceof ReadableStream){let{body:e,length:n}=wa(t.body);return t.body=e,n}else return Promise.resolve(Ea(t.body))}else{let t=e[0];return t?.body?t.clone().text().then(e=>Oa(e)):Promise.resolve()}}function wa(e){if(!e.pipeThrough)return Sa.warn(`Platform has ReadableStream but not pipeThrough!`),{body:e,length:Promise.resolve(void 0)};let t=0,n,r=new Promise(e=>{n=e}),i=new TransformStream({start(){},async transform(e,n){let r=await e;t+=r.byteLength,n.enqueue(e)},flush(){n(t)}});return{body:e.pipeThrough(i),length:r}}function Ta(e){return typeof Document<`u`&&e instanceof Document}function Ea(e){if(Ta(e))return new XMLSerializer().serializeToString(document).length;if(typeof e==`string`)return Oa(e);if(e instanceof Blob)return e.size;if(e instanceof FormData)return ka(e);if(e instanceof URLSearchParams)return Oa(e.toString());if(e.byteLength!==void 0)return e.byteLength;Sa.warn(`unknown body type`)}var Da=new TextEncoder;function Oa(e){return Da.encode(e).byteLength}function ka(e){let t=0;for(let[n,r]of e.entries())t+=n.length,r instanceof Blob?t+=r.size:t+=r.length;return t}function Aa(e){let t=Na(),n=e.toUpperCase();return n in t?n:`_OTHER`}var ja={CONNECT:!0,DELETE:!0,GET:!0,HEAD:!0,OPTIONS:!0,PATCH:!0,POST:!0,PUT:!0,TRACE:!0},Ma;function Na(){return Ma===void 0&&(Ma=ja),Ma}var Pa={"https:":`443`,"http:":`80`};function Fa(e){let t=Number(e.port||Pa[e.protocol]);if(t&&!isNaN(t))return t}var Ia=`0.204.0`,La=300,Ra=typeof process==`object`&&process.release?.name===`node`,za=class extends Rr{component=`fetch`;version=Ia;moduleName=this.component;_usedResources=new WeakSet;_tasksCount=0;_semconvStability;constructor(e={}){super(`@opentelemetry/instrumentation-fetch`,Ia,e),this._semconvStability=zr(`http`,e?.semconvStabilityOptIn)}init(){}_addChildSpan(e,t){let n=this.tracer.startSpan(`CORS Preflight`,{startTime:t[Z.FETCH_START]},d.setSpan(h.active(),e)),r=!(this._semconvStability&B.OLD);aa(n,t,this.getConfig().ignoreNetworkEvents,void 0,r),n.end(t[Z.RESPONSE_END])}_addFinalSpanAttributes(e,t){let n=da(t.url);if(this._semconvStability&B.OLD&&(e.setAttribute(ya,t.status),t.statusText!=null&&e.setAttribute(pa.HTTP_STATUS_TEXT,t.statusText),e.setAttribute(ma,n.host),e.setAttribute(va,n.protocol.replace(`:`,``)),typeof navigator<`u`&&e.setAttribute(xa,navigator.userAgent)),this._semconvStability&B.STABLE){e.setAttribute(dt,t.status),e.setAttribute(ft,n.hostname);let r=Fa(n);r&&e.setAttribute(pt,r)}}_addHeaders(e,t){if(!fa(t,this.getConfig().propagateTraceHeaderCorsUrls)){let e={};p.inject(h.active(),e),Object.keys(e).length>0&&this._diag.debug(`headers inject skipped due to CORS policy`);return}if(e instanceof Request)p.inject(h.active(),e.headers,{set:(e,t,n)=>e.set(t,typeof n==`string`?n:String(n))});else if(e.headers instanceof Headers)p.inject(h.active(),e.headers,{set:(e,t,n)=>e.set(t,typeof n==`string`?n:String(n))});else if(e.headers instanceof Map)p.inject(h.active(),e.headers,{set:(e,t,n)=>e.set(t,typeof n==`string`?n:String(n))});else{let t={};p.inject(h.active(),t),e.headers=Object.assign({},t,e.headers||{})}}_clearResources(){this._tasksCount===0&&this.getConfig().clearTimingResources&&(performance.clearResourceTimings(),this._usedResources=new WeakSet)}_createSpan(e,t={}){if(_n(e,this.getConfig().ignoreUrls)){this._diag.debug(`ignoring span as url matches ignored url`);return}let n=``,r={};if(this._semconvStability&B.OLD){let i=(t.method||`GET`).toUpperCase();n=`HTTP ${i}`,r[pa.COMPONENT]=this.moduleName,r[ha]=i,r[ba]=e}if(this._semconvStability&B.STABLE){let i=t.method,a=Aa(t.method||`GET`);n||=a,r[lt]=a,a!==i&&(r[ut]=i),r[bt]=e}return this.tracer.startSpan(n,{kind:Se.CLIENT,attributes:r})}_findResourceAndAddNetworkEvents(e,t,n){let r=t.entries;if(!r.length){if(!performance.getEntriesByType)return;r=performance.getEntriesByType(`resource`)}let i=ca(t.spanUrl,t.startTime,n,r,this._usedResources,`fetch`);if(i.mainRequest){let t=i.mainRequest;this._markResourceAsUsed(t);let n=i.corsPreFlightRequest;n&&(this._addChildSpan(e,n),this._markResourceAsUsed(n));let r=!(this._semconvStability&B.OLD);aa(e,t,this.getConfig().ignoreNetworkEvents,void 0,r)}}_markResourceAsUsed(e){this._usedResources.add(e)}_endSpan(e,t,n){let r=S(Date.now()),i=C();this._addFinalSpanAttributes(e,n),this._semconvStability&B.STABLE&&n.status>=400&&(e.setStatus({code:m.ERROR}),e.setAttribute(at,String(n.status))),setTimeout(()=>{t.observer?.disconnect(),this._findResourceAndAddNetworkEvents(e,t,i),this._tasksCount--,this._clearResources(),e.end(r)},La)}_patchConstructor(){return e=>{let t=this;return function(...n){let r=this,i=da(n[0]instanceof Request?n[0].url:String(n[0])).href,a=n[0]instanceof Request?n[0]:n[1]||{},o=t._createSpan(i,a);if(!o)return e.apply(this,n);let s=t._prepareSpanData(i);t.getConfig().measureRequestSize&&Ca(...n).then(e=>{e&&(t._semconvStability&B.OLD&&o.setAttribute(_a,e),t._semconvStability&B.STABLE&&o.setAttribute(ga,e))}).catch(e=>{t._diag.warn(`getFetchBodyLength`,e)});function c(e,n){t._applyAttributesAfterFetch(e,a,n),t._endSpan(e,s,{status:n.status||0,statusText:n.message,url:i})}function l(e,n){t._applyAttributesAfterFetch(e,a,n),n.status>=200&&n.status<400?t._endSpan(e,s,n):t._endSpan(e,s,{status:n.status,statusText:n.statusText,url:i})}function u(e,t,n){try{let t=n.clone().body;if(t){let r=t.getReader(),i=()=>{r.read().then(({done:t})=>{t?l(e,n):i()},t=>{c(e,t)})};i()}else l(e,n)}finally{t(n)}}function f(e,t,n){try{c(e,n)}finally{t(n)}}return new Promise((n,s)=>h.with(d.setSpan(h.active(),o),()=>(t._addHeaders(a,i),t._callRequestHook(o,a),t._tasksCount++,e.apply(r,a instanceof Request?[a]:[i,a]).then(u.bind(r,o,n),f.bind(r,o,s)))))}}}_applyAttributesAfterFetch(e,t,n){let r=this.getConfig().applyCustomAttributesOnSpan;r&&R(()=>r(e,t,n),e=>{e&&this._diag.error(`applyCustomAttributesOnSpan`,e)},!0)}_callRequestHook(e,t){let n=this.getConfig().requestHook;n&&R(()=>n(e,t),e=>{e&&this._diag.error(`requestHook`,e)},!0)}_prepareSpanData(e){let t=C(),n=[];if(typeof PerformanceObserver!=`function`)return{entries:n,startTime:t,spanUrl:e};let r=new PerformanceObserver(t=>{t.getEntries().forEach(t=>{t.initiatorType===`fetch`&&t.name===e&&n.push(t)})});return r.observe({entryTypes:[`resource`]}),{entries:n,observer:r,startTime:t,spanUrl:e}}enable(){if(Ra){this._diag.warn(`this instrumentation is intended for web usage only, it does not instrument Node.js's fetch()`);return}z(fetch)&&(this._unwrap(Qe,`fetch`),this._diag.debug(`removing previous patch for constructor`)),this._wrap(Qe,`fetch`,this._patchConstructor())}disable(){Ra||(this._unwrap(Qe,`fetch`),this._usedResources=new WeakSet)}},$;(function(e){e.EVENT_TYPE=`event_type`,e.TARGET_ELEMENT=`target_element`,e.TARGET_XPATH=`target_xpath`,e.HTTP_URL=`http.url`})($||={});var Ba=`0.49.0`,Va=`@opentelemetry/instrumentation-user-interaction`,Ha=`OT_ZONE_CONTEXT`,Ua=`Navigation:`,Wa=[`click`];function Ga(){return!1}var Ka=class extends Rr{version=Ba;moduleName=`user-interaction`;_spansData=new WeakMap;_wrappedListeners=new WeakMap;_eventsSpanMap=new WeakMap;_eventNames;_shouldPreventSpanCreation;constructor(e={}){super(Va,Ba,e),this._eventNames=new Set(e?.eventNames??Wa),this._shouldPreventSpanCreation=typeof e?.shouldPreventSpanCreation==`function`?e.shouldPreventSpanCreation:Ga}init(){}_checkForTimeout(e,t){let n=this._spansData.get(t);n&&(e.source===`setTimeout`?n.hrTimeLastTimeout=C():e.source!==`Promise.then`&&e.source!==`setTimeout`&&(n.hrTimeLastTimeout=void 0))}_allowEventName(e){return this._eventNames.has(e)}_createSpan(e,t,n){if(!(e instanceof HTMLElement)||!e.getAttribute||e.hasAttribute(`disabled`)||!this._allowEventName(t))return;let r=Ui(e,!0);try{let i=this.tracer.startSpan(t,{attributes:{[$.EVENT_TYPE]:t,[$.TARGET_ELEMENT]:e.tagName,[$.TARGET_XPATH]:r,[$.HTTP_URL]:window.location.href}},n?d.setSpan(h.active(),n):void 0);return this._shouldPreventSpanCreation(t,e,i)===!0?void 0:(this._spansData.set(i,{taskCount:0}),i)}catch(e){this._diag.error(`failed to start create new user interaction span`,e)}}_decrementTask(e){let t=this._spansData.get(e);t&&(t.taskCount--,t.taskCount===0&&this._tryToEndSpan(e,t.hrTimeLastTimeout))}_getCurrentSpan(e){let t=e.get(Ha);return t&&d.getSpan(t)}_incrementTask(e){let t=this._spansData.get(e);t&&t.taskCount++}addPatchedListener(e,t,n,r){let i=this._wrappedListeners.get(n);i||(i=new Map,this._wrappedListeners.set(n,i));let a=i.get(t);return a||(a=new Map,i.set(t,a)),a.has(e)?!1:(a.set(e,r),!0)}removePatchedListener(e,t,n){let r=this._wrappedListeners.get(n);if(!r)return;let i=r.get(t);if(!i)return;let a=i.get(e);return a&&(i.delete(e),i.size===0&&(r.delete(t),r.size===0&&this._wrappedListeners.delete(n))),a}_invokeListener(e,t,n){return typeof e==`function`?e.apply(t,n):e.handleEvent(n[0])}_patchAddEventListener(){let e=this;return t=>function(n,r,i){if(!r)return t.call(this,n,r,i);let a=i&&typeof i==`object`&&i.once,o=function(...t){let i,o=t[0],s=o?.target;o&&(i=e._eventsSpanMap.get(o)),a&&e.removePatchedListener(this,n,r);let c=e._createSpan(s,n,i);return c?(o&&e._eventsSpanMap.set(o,c),h.with(d.setSpan(h.active(),c),()=>{let n=e._invokeListener(r,this,t);return c.end(),n})):e._invokeListener(r,this,t)};if(e.addPatchedListener(this,n,r,o))return t.call(this,n,o,i)}}_patchRemoveEventListener(){let e=this;return t=>function(n,r,i){let a=e.removePatchedListener(this,n,r);return a?t.call(this,n,a,i):t.call(this,n,r,i)}}_getPatchableEventTargets(){return window.EventTarget?[EventTarget.prototype]:[Node.prototype,Window.prototype]}_patchHistoryApi(){this._unpatchHistoryApi(),this._wrap(history,`replaceState`,this._patchHistoryMethod()),this._wrap(history,`pushState`,this._patchHistoryMethod()),this._wrap(history,`back`,this._patchHistoryMethod()),this._wrap(history,`forward`,this._patchHistoryMethod()),this._wrap(history,`go`,this._patchHistoryMethod())}_patchHistoryMethod(){let e=this;return t=>function(...n){let r=`${location.pathname}${location.hash}${location.search}`,i=t.apply(this,n),a=`${location.pathname}${location.hash}${location.search}`;return r!==a&&e._updateInteractionName(a),i}}_unpatchHistoryApi(){z(history.replaceState)&&this._unwrap(history,`replaceState`),z(history.pushState)&&this._unwrap(history,`pushState`),z(history.back)&&this._unwrap(history,`back`),z(history.forward)&&this._unwrap(history,`forward`),z(history.go)&&this._unwrap(history,`go`)}_updateInteractionName(e){let t=d.getSpan(h.active());t&&typeof t.updateName==`function`&&t.updateName(`${Ua} ${e}`)}_patchZoneCancelTask(){let e=this;return t=>function(n){let r=Zone.current,i=e._getCurrentSpan(r);return i&&e._shouldCountTask(n,r)&&e._decrementTask(i),t.call(this,n)}}_patchZoneScheduleTask(){let e=this;return t=>function(n){let r=Zone.current,i=e._getCurrentSpan(r);return i&&e._shouldCountTask(n,r)&&(e._incrementTask(i),e._checkForTimeout(n,i)),t.call(this,n)}}_patchZoneRunTask(){let e=this;return t=>function(n,r,i){let a=(Array.isArray(i)&&i[0]instanceof Event?i[0]:void 0)?.target,o,s=this;if(a){if(o=e._createSpan(a,n.eventName),o)return e._incrementTask(o),s.run(()=>{try{return h.with(d.setSpan(h.active(),o),()=>{let e=Zone.current;return n._zone=e,t.call(e,n,r,i)})}finally{e._decrementTask(o)}})}else o=e._getCurrentSpan(s);try{return t.call(s,n,r,i)}finally{o&&e._shouldCountTask(n,s)&&e._decrementTask(o)}}}_shouldCountTask(e,t){if(e._zone&&(t=e._zone),!t||!e.data||e.data.isPeriodic)return!1;let n=this._getCurrentSpan(t);return!n||!this._spansData.get(n)?!1:e.type===`macroTask`||e.type===`microTask`}_tryToEndSpan(e,t){e&&this._spansData.get(e)&&(e.end(t),this._spansData.delete(e))}enable(){let e=this._getZoneWithPrototype();this._diag.debug(`applying patch to`,this.moduleName,this.version,`zone:`,!!e),e?(z(e.prototype.runTask)&&(this._unwrap(e.prototype,`runTask`),this._diag.debug(`removing previous patch from method runTask`)),z(e.prototype.scheduleTask)&&(this._unwrap(e.prototype,`scheduleTask`),this._diag.debug(`removing previous patch from method scheduleTask`)),z(e.prototype.cancelTask)&&(this._unwrap(e.prototype,`cancelTask`),this._diag.debug(`removing previous patch from method cancelTask`)),this._zonePatched=!0,this._wrap(e.prototype,`runTask`,this._patchZoneRunTask()),this._wrap(e.prototype,`scheduleTask`,this._patchZoneScheduleTask()),this._wrap(e.prototype,`cancelTask`,this._patchZoneCancelTask())):(this._zonePatched=!1,this._getPatchableEventTargets().forEach(e=>{z(e.addEventListener)&&(this._unwrap(e,`addEventListener`),this._diag.debug(`removing previous patch from method addEventListener`)),z(e.removeEventListener)&&(this._unwrap(e,`removeEventListener`),this._diag.debug(`removing previous patch from method removeEventListener`)),this._wrap(e,`addEventListener`,this._patchAddEventListener()),this._wrap(e,`removeEventListener`,this._patchRemoveEventListener())})),this._patchHistoryApi()}disable(){let e=this._getZoneWithPrototype();this._diag.debug(`removing patch from`,this.moduleName,this.version,`zone:`,!!e),e&&this._zonePatched?(z(e.prototype.runTask)&&this._unwrap(e.prototype,`runTask`),z(e.prototype.scheduleTask)&&this._unwrap(e.prototype,`scheduleTask`),z(e.prototype.cancelTask)&&this._unwrap(e.prototype,`cancelTask`)):this._getPatchableEventTargets().forEach(e=>{z(e.addEventListener)&&this._unwrap(e,`addEventListener`),z(e.removeEventListener)&&this._unwrap(e,`removeEventListener`)}),this._unpatchHistoryApi()}_getZoneWithPrototype(){return window.Zone}},qa=`open-knowledge-app`,Ja=!1;function Ya(){return{BASE_URL:`./`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_APP_VERSION:`0.87.0-beta.2`}?.VITE_OTEL_COLLECTOR_URL??`http://localhost:14318`}function Xa(){if(Ja)return;Ja=!0;let e=null,t=!1;try{let n=Ya(),r={BASE_URL:`./`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_APP_VERSION:`0.87.0-beta.2`};e=new zi({resource:Hr({[mt]:`open-knowledge-app`,[ht]:r?.VITE_APP_VERSION??`dev`,[it]:r?.MODE??`dev`,[ne]:te}),spanProcessors:[new Fi(new xr({url:`${n}/v1/traces`}),{maxExportBatchSize:50,scheduledDelayMillis:2e3})]}),e.register(),t=!0,Mr({instrumentations:[new $i,new Ka({eventNames:[`click`,`submit`]}),new za({propagateTraceHeaderCorsUrls:[/^https?:\/\/localhost(:\d+)?\/api\//,/^https?:\/\/127\.0\.0\.1(:\d+)?\/api\//,/^\/api\//],clearTimingResources:!0})]}),console.info(`[otel] frontend telemetry initialized — OTLP/HTTP → ${n}/v1/traces`)}catch(n){console.warn(`[otel] frontend telemetry init failed — continuing without`,n),t&&e&&e.shutdown().catch(()=>{}),Ja=!1}}function Za(){return d.getTracer(qa)}export{Za as getAppTracer,Xa as install};
2
+ import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./preload-helper-Chd9yIcd.js";import{a as n,c as r,d as i,f as a,i as o,l as s,n as c,r as l,s as u,t as d,u as f}from"./trace-api-BSvaJNnr.js";import{n as ee,t as p}from"./propagation-api-B1IlUKzT.js";import{t as m}from"./status-BNivpG-Q.js";import{t as h}from"./context-api-B9rp0hJb.js";import{n as te,o as ne}from"./client-version-BIIcXp-F.js";var re=class{constructor(){}createGauge(e,t){return me}createHistogram(e,t){return he}createCounter(e,t){return pe}createUpDownCounter(e,t){return ge}createObservableGauge(e,t){return ve}createObservableCounter(e,t){return _e}createObservableUpDownCounter(e,t){return ye}addBatchObservableCallback(e,t){}removeBatchObservableCallback(e){}},g=class{},ie=class extends g{add(e,t){}},ae=class extends g{add(e,t){}},oe=class extends g{record(e,t){}},se=class extends g{record(e,t){}},ce=class{addCallback(e){}removeCallback(e){}},le=class extends ce{},ue=class extends ce{},de=class extends ce{},fe=new re,pe=new ie,me=new oe,he=new se,ge=new ae,_e=new le,ve=new ue,ye=new de;function be(){return fe}var xe;(function(e){e[e.NOT_RECORD=0]=`NOT_RECORD`,e[e.RECORD=1]=`RECORD`,e[e.RECORD_AND_SAMPLED=2]=`RECORD_AND_SAMPLED`})(xe||={});var Se;(function(e){e[e.INTERNAL=0]=`INTERNAL`,e[e.SERVER=1]=`SERVER`,e[e.CLIENT=2]=`CLIENT`,e[e.PRODUCER=3]=`PRODUCER`,e[e.CONSUMER=4]=`CONSUMER`})(Se||={});var _=s.instance(),Ce=new class{getMeter(e,t,n){return fe}},we=`metrics`,Te=class e{constructor(){}static getInstance(){return this._instance||=new e,this._instance}setGlobalMeterProvider(e){return i(we,e,s.instance())}getMeterProvider(){return f(we)||Ce}getMeter(e,t,n){return this.getMeterProvider().getMeter(e,t,n)}disable(){a(we,s.instance())}}.getInstance(),Ee=class{_delegate;constructor(e){this._delegate=e}export(e,t){this._delegate.export(e,t)}forceFlush(){return this._delegate.forceFlush()}shutdown(){return this._delegate.shutdown()}},De=class extends Error{code;name=`OTLPExporterError`;data;constructor(e,t,n){super(e),this.data=n,this.code=t}};function Oe(e){if(Number.isFinite(e)&&e>0)return e;throw Error(`Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '${e}')`)}function ke(e){if(e!=null)return()=>e}function Ae(e,t,n){return{timeoutMillis:Oe(e.timeoutMillis??t.timeoutMillis??n.timeoutMillis),concurrencyLimit:e.concurrencyLimit??t.concurrencyLimit??n.concurrencyLimit,compression:e.compression??t.compression??n.compression}}function je(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:`none`}}var Me=class{_concurrencyLimit;_sendingPromises=[];constructor(e){this._concurrencyLimit=e}pushPromise(e){if(this.hasReachedLimit())throw Error(`Concurrency Limit reached`);this._sendingPromises.push(e);let t=()=>{let t=this._sendingPromises.indexOf(e);this._sendingPromises.splice(t,1)};e.then(t,t)}hasReachedLimit(){return this._sendingPromises.length>=this._concurrencyLimit}async awaitAll(){await Promise.all(this._sendingPromises)}};function Ne(e){return new Me(e.concurrencyLimit)}var Pe=r(`OpenTelemetry SDK Context Key SUPPRESS_TRACING`);function Fe(e){return e.setValue(Pe,!0)}function Ie(e){return e.getValue(Pe)===!0}var Le=`baggage`,Re=4096;function ze(e){return e.reduce((e,t)=>{let n=`${e}${e===``?``:`,`}${t}`;return n.length>8192?e:n},``)}function Be(e){return e.getAllEntries().map(([e,t])=>{let n=`${encodeURIComponent(e)}=${encodeURIComponent(t.value)}`;return t.metadata!==void 0&&(n+=`;`+t.metadata.toString()),n})}function Ve(e){if(!e)return;let t=e.indexOf(`;`),n=t===-1?e:e.substring(0,t),r=n.indexOf(`=`);if(r<=0)return;let i=n.substring(0,r).trim(),a=n.substring(r+1).trim();if(!i||!a)return;let o,s;try{o=decodeURIComponent(i),s=decodeURIComponent(a)}catch{return}let c;return t!==-1&&t<e.length-1&&(c=ee(e.substring(t+1))),{key:o,value:s,metadata:c}}function He(e,t,n,r){let i=0;for(;i<e.length&&n<180;){let a=e.indexOf(`,`,i),o=a===-1?e.length:a,s=o-i;if(s<=4096){let a=Ve(e.substring(i,o));if(a){let e=(n===0?0:1)+s;if(r+e>8192)break;t[a.key]=a.metadata?{value:a.value,metadata:a.metadata}:{value:a.value},n++,r+=e}}if(a===-1)break;i=a+1}return[n,r]}var Ue=class{inject(e,t,n){let r=p.getBaggage(e);if(!r||Ie(e))return;let i=ze(Be(r).filter(e=>e.length<=Re).slice(0,180));i.length>0&&n.set(t,Le,i)}extract(e,t,n){let r=n.get(t,Le);if(!r)return e;let i={},a=0,o=0;if(Array.isArray(r))for(let e=0;e<r.length;e++)[a,o]=He(r[e],i,a,o);else [a]=He(r,i,a,o);return a===0?e:p.setBaggage(e,p.createBaggage(i))}fields(){return[Le]}};function v(e){let t={};if(typeof e!=`object`||!e)return t;for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;if(!We(n)){_.warn(`Invalid attribute key: ${n}`);continue}let r=e[n];if(!Ge(r)){_.warn(`Invalid attribute value set for key: ${n}`);continue}Array.isArray(r)?t[n]=r.slice():t[n]=r}return t}function We(e){return typeof e==`string`&&e!==``}function Ge(e){return e==null?!0:Array.isArray(e)?Ke(e):qe(typeof e)}function Ke(e){let t;for(let n of e){if(n==null)continue;let e=typeof n;if(e!==t){if(!t){if(qe(e)){t=e;continue}return!1}return!1}}return!0}function qe(e){switch(e){case`number`:case`boolean`:case`string`:return!0}return!1}function Je(){return e=>{_.error(Ye(e))}}function Ye(e){return typeof e==`string`?e:JSON.stringify(Xe(e))}function Xe(e){let t={},n=e;for(;n!==null;)Object.getOwnPropertyNames(n).forEach(e=>{if(t[e])return;let r=n[e];r&&(t[e]=String(r))}),n=Object.getPrototypeOf(n);return t}var Ze=Je();function y(e){try{Ze(e)}catch{}}var Qe=globalThis,$e=`2.8.0`,et=`http.url`,tt=`http.user_agent`,nt=et,rt=tt,it=`deployment.environment.name`,at=`error.type`,ot=`exception.message`,st=`exception.stacktrace`,ct=`exception.type`,lt=`http.request.method`,ut=`http.request.method_original`,dt=`http.response.status_code`,ft=`server.address`,pt=`server.port`,mt=`service.name`,ht=`service.version`,gt=`telemetry.sdk.language`,_t=`webjs`,vt=`telemetry.sdk.name`,yt=`telemetry.sdk.version`,bt=`url.full`,xt=`process.runtime.name`,St={[vt]:`opentelemetry`,[xt]:`browser`,[gt]:_t,[yt]:$e},b=performance,Ct=9,wt=10**6,x=10**Ct;function S(e){let t=e/1e3;return[Math.trunc(t),Math.round(e%1e3*wt)]}function C(e){return Ot(S(b.timeOrigin),S(typeof e==`number`?e:b.now()))}function w(e){if(Et(e))return e;if(typeof e==`number`)return e<b.timeOrigin?C(e):S(e);if(e instanceof Date)return S(e.getTime());throw TypeError(`Invalid input type`)}function Tt(e,t){let n=t[0]-e[0],r=t[1]-e[1];return r<0&&(--n,r+=x),[n,r]}function T(e){return e[0]*x+e[1]}function Et(e){return Array.isArray(e)&&e.length===2&&typeof e[0]==`number`&&typeof e[1]==`number`}function Dt(e){return Et(e)||typeof e==`number`||e instanceof Date}function Ot(e,t){let n=[e[0]+t[0],e[1]+t[1]];return n[1]>=x&&(n[1]-=x,n[0]+=1),n}var E;(function(e){e[e.SUCCESS=0]=`SUCCESS`,e[e.FAILED=1]=`FAILED`})(E||={});var kt=class{_propagators;_fields;constructor(e={}){this._propagators=e.propagators??[];let t=new Set;for(let e of this._propagators){let n=typeof e.fields==`function`?e.fields():[];for(let e of n)t.add(e)}this._fields=Array.from(t)}inject(e,t,n){for(let r of this._propagators)try{r.inject(e,t,n)}catch(e){_.warn(`Failed to inject with ${r.constructor.name}. Err: ${e.message}`)}}extract(e,t,n){return this._propagators.reduce((e,r)=>{try{return r.extract(e,t,n)}catch(e){_.warn(`Failed to extract with ${r.constructor.name}. Err: ${e.message}`)}return e},e)}fields(){return this._fields.slice()}},At=`[_0-9a-z-*/]`,jt=`[a-z]${At}{0,255}`,Mt=`[a-z0-9]${At}{0,240}@[a-z]${At}{0,13}`,Nt=RegExp(`^(?:${jt}|${Mt})$`),Pt=/^[ -~]{0,255}[!-~]$/,Ft=/,|=/;function It(e){return Nt.test(e)}function Lt(e){return Pt.test(e)&&!Ft.test(e)}var Rt=32,zt=512,Bt=`,`,Vt=`=`,Ht=class e{_length;_rawTraceState;_internalState;constructor(e){this._rawTraceState=typeof e==`string`?e:``,this._length=this._rawTraceState.length}set(e,t){if(!It(e)||!Lt(t))return this;let n=this._getState(),r=n.get(e),i=this._length;if(typeof r==`string`?i+=t.length-r.length:i+=e.length+t.length+(n.size>0?2:1),i>zt)return this;let a=new Map(n);return a.delete(e),a.set(e,t),this._fromState(a,i)}unset(e){let t=this._getState(),n=t.get(e);if(typeof n!=`string`)return this;let r=this._length-(e.length+n.length+1);t.size>1&&--r;let i=new Map(t);return i.delete(e),this._fromState(i,r)}get(e){return this._getState().get(e)}serialize(){let e=``,t=0;for(let n of this._getState())t>0&&(e=Bt+e),e=`${n[0]}${Vt}${n[1]}`+e,t++;return e}_getState(){if(this._internalState)return this._internalState;let e=this._rawTraceState.split(Bt),t=new Map,n=0;for(let r of e){let e=r.trim(),i=e.indexOf(Vt);if(i===-1)continue;let a=e.slice(0,i),o=e.slice(i+1);if(!It(a)||!Lt(o))continue;let s=n+e.length+ +(t.size>0);if(!(s>zt)&&(t.set(a,o),n=s,t.size>=Rt))break}return this._length=n,this._internalState=new Map(Array.from(t.entries()).reverse()),this._internalState}_fromState(t,n){let r=Object.create(e.prototype);return r._internalState=t,r._length=n,r}},D=`traceparent`,Ut=`tracestate`,Wt=`00`,Gt=RegExp(`^\\s?((?!ff)[\\da-f]{2})-((?![0]{32})[\\da-f]{32})-((?![0]{16})[\\da-f]{16})-([\\da-f]{2})(-.*)?\\s?$`);function Kt(e){let t=Gt.exec(e);return!t||t[1]===`00`&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}var qt=class{inject(e,t,r){let i=d.getSpanContext(e);if(!i||Ie(e)||!c(i))return;let a=`${Wt}-${i.traceId}-${i.spanId}-0${Number(i.traceFlags||n.NONE).toString(16)}`;r.set(t,D,a),i.traceState&&r.set(t,Ut,i.traceState.serialize())}extract(e,t,n){let r=n.get(t,D);if(!r)return e;let i=Array.isArray(r)?r[0]:r;if(typeof i!=`string`)return e;let a=Kt(i);if(!a)return e;a.isRemote=!0;let o=n.get(t,Ut);if(o){let e=Array.isArray(o)?o.join(`,`):o;a.traceState=new Ht(typeof e==`string`?e:void 0)}return d.setSpanContext(e,a)}fields(){return[D,Ut]}},Jt=`[object Object]`,Yt=`[object Null]`,Xt=`[object Undefined]`,Zt=Function.prototype.toString,Qt=Zt.call(Object),$t=Object.getPrototypeOf,en=Object.prototype,tn=en.hasOwnProperty,O=Symbol?Symbol.toStringTag:void 0,nn=en.toString;function rn(e){if(!an(e)||on(e)!==Jt)return!1;let t=$t(e);if(t===null)return!0;let n=tn.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&Zt.call(n)===Qt}function an(e){return typeof e==`object`&&!!e}function on(e){return e==null?e===void 0?Xt:Yt:O&&O in Object(e)?sn(e):cn(e)}function sn(e){let t=tn.call(e,O),n=e[O],r=!1;try{e[O]=void 0,r=!0}catch{}let i=nn.call(e);return r&&(t?e[O]=n:delete e[O]),i}function cn(e){return nn.call(e)}var ln=20;function un(...e){let t=e.shift(),n=new WeakMap;for(;e.length>0;)t=fn(t,e.shift(),0,n);return t}function dn(e){return k(e)?e.slice():e}function fn(e,t,n=0,r){let i;if(!(n>ln)){if(n++,j(e)||j(t)||mn(t))i=dn(t);else if(k(e)){if(i=e.slice(),k(t))for(let e=0,n=t.length;e<n;e++)i.push(dn(t[e]));else if(A(t)){let e=Object.keys(t);for(let n=0,r=e.length;n<r;n++){let r=e[n];r===`__proto__`||r===`constructor`||r===`prototype`||(i[r]=dn(t[r]))}}}else if(A(e))if(A(t)){if(!hn(e,t))return t;i=Object.assign({},e);let a=Object.keys(t);for(let o=0,s=a.length;o<s;o++){let s=a[o];if(s===`__proto__`||s===`constructor`||s===`prototype`)continue;let c=t[s];if(j(c))c===void 0?delete i[s]:i[s]=c;else{let a=i[s],o=c;if(pn(e,s,r)||pn(t,s,r))delete i[s];else{if(A(a)&&A(o)){let n=r.get(a)||[],i=r.get(o)||[];n.push({obj:e,key:s}),i.push({obj:t,key:s}),r.set(a,n),r.set(o,i)}i[s]=fn(i[s],c,n,r)}}}}else i=t;return i}}function pn(e,t,n){let r=n.get(e[t])||[];for(let n=0,i=r.length;n<i;n++){let i=r[n];if(i.key===t&&i.obj===e)return!0}return!1}function k(e){return Array.isArray(e)}function mn(e){return typeof e==`function`}function A(e){return!j(e)&&!k(e)&&!mn(e)&&typeof e==`object`}function j(e){return typeof e==`string`||typeof e==`number`||typeof e==`boolean`||e===void 0||e instanceof Date||e instanceof RegExp||e===null}function hn(e,t){return!(!rn(e)||!rn(t))}function gn(e,t){return typeof t==`string`?e===t:!!e.match(t)}function _n(e,t){if(!t)return!1;for(let n of t)if(gn(e,n))return!0;return!1}var vn=class{_promise;_resolve;_reject;constructor(){this._promise=new Promise((e,t)=>{this._resolve=e,this._reject=t})}get promise(){return this._promise}resolve(e){this._resolve(e)}reject(e){this._reject(e)}},yn=class{_isCalled=!1;_deferred=new vn;_callback;_that;constructor(e,t){this._callback=e,this._that=t}get isCalled(){return this._isCalled}get promise(){return this._deferred.promise}call(...e){if(!this._isCalled){this._isCalled=!0;try{Promise.resolve(this._callback.call(this._that,...e)).then(e=>this._deferred.resolve(e),e=>this._deferred.reject(e))}catch(e){this._deferred.reject(e)}}return this._deferred.promise}};function bn(e){return Object.prototype.hasOwnProperty.call(e,`partialSuccess`)}function xn(){return{handleResponse(e){e==null||!bn(e)||e.partialSuccess==null||Object.keys(e.partialSuccess).length===0||_.warn(`Received Partial Success response:`,JSON.stringify(e.partialSuccess))}}}var Sn=class{_transport;_serializer;_responseHandler;_promiseQueue;_timeout;_diagLogger;constructor(e,t,n,r,i){this._transport=e,this._serializer=t,this._responseHandler=n,this._promiseQueue=r,this._timeout=i,this._diagLogger=_.createComponentLogger({namespace:`OTLPExportDelegate`})}export(e,t){if(this._diagLogger.debug(`items to be sent`,e),this._promiseQueue.hasReachedLimit()){t({code:E.FAILED,error:Error(`Concurrent export limit reached`)});return}let n=this._serializer.serializeRequest(e);if(n==null){t({code:E.FAILED,error:Error(`Nothing to send`)});return}this._promiseQueue.pushPromise(this._transport.send(n,this._timeout).then(e=>{if(e.status===`success`){if(e.data!=null)try{this._responseHandler.handleResponse(this._serializer.deserializeResponse(e.data))}catch(t){this._diagLogger.warn(`Export succeeded but could not deserialize response - is the response specification compliant?`,t,e.data)}t({code:E.SUCCESS});return}else if(e.status===`failure`&&e.error){t({code:E.FAILED,error:e.error});return}else e.status===`retryable`?t({code:E.FAILED,error:new De(`Export failed with retryable status`)}):t({code:E.FAILED,error:new De(`Export failed with unknown error`)})},e=>t({code:E.FAILED,error:e})))}forceFlush(){return this._promiseQueue.awaitAll()}async shutdown(){this._diagLogger.debug(`shutdown started`),await this.forceFlush(),this._transport.shutdown()}};function Cn(e,t){return new Sn(e.transport,e.serializer,xn(),e.promiseHandler,t.timeout)}function wn(e,t,n){return Cn({transport:n,serializer:t,promiseHandler:Ne(e)},{timeout:e.timeoutMillis})}function Tn(e){return e>=48&&e<=57?e-48:e>=97&&e<=102?e-87:e-55}function En(e){let t=new Uint8Array(e.length/2),n=0;for(let r=0;r<e.length;r+=2){let i=Tn(e.charCodeAt(r)),a=Tn(e.charCodeAt(r+1));t[n++]=i<<4|a}return t}function Dn(e){let t=BigInt(1e9);return BigInt(e[0])*t+BigInt(e[1])}function On(e){return{low:Number(BigInt.asUintN(32,e)),high:Number(BigInt.asUintN(32,e>>BigInt(32)))}}function kn(e){return On(Dn(e))}function An(e){return Dn(e).toString()}var jn=typeof BigInt<`u`?An:T;function Mn(e){return e}function Nn(e){if(e!==void 0)return En(e)}var Pn={encodeHrTime:kn,encodeSpanContext:En,encodeOptionalSpanContext:Nn};function Fn(e){if(e===void 0)return Pn;let t=e.useLongBits??!0,n=e.useHex??!1;return{encodeHrTime:t?kn:jn,encodeSpanContext:n?Mn:En,encodeOptionalSpanContext:n?Mn:Nn}}function In(e){let t={attributes:M(e.attributes),droppedAttributesCount:0},n=e.schemaUrl;return n&&n!==``&&(t.schemaUrl=n),t}function Ln(e){return{name:e.name,version:e.version}}function M(e){return Object.keys(e).map(t=>Rn(t,e[t]))}function Rn(e,t){return{key:e,value:zn(t)}}function zn(e){let t=typeof e;return t===`string`?{stringValue:e}:t===`number`?Number.isInteger(e)?{intValue:e}:{doubleValue:e}:t===`boolean`?{boolValue:e}:e instanceof Uint8Array?{bytesValue:e}:Array.isArray(e)?{arrayValue:{values:e.map(zn)}}:t===`object`&&e!=null?{kvlistValue:{values:Object.entries(e).map(([e,t])=>Rn(e,t))}}:{}}function Bn(e,t){let n=e.spanContext(),r=e.status,i=e.parentSpanContext?.spanId?t.encodeSpanContext(e.parentSpanContext?.spanId):void 0;return{traceId:t.encodeSpanContext(n.traceId),spanId:t.encodeSpanContext(n.spanId),parentSpanId:i,traceState:n.traceState?.serialize(),name:e.name,kind:e.kind==null?0:e.kind+1,startTimeUnixNano:t.encodeHrTime(e.startTime),endTimeUnixNano:t.encodeHrTime(e.endTime),attributes:M(e.attributes),droppedAttributesCount:e.droppedAttributesCount,events:e.events.map(e=>Hn(e,t)),droppedEventsCount:e.droppedEventsCount,status:{code:r.code,message:r.message},links:e.links.map(e=>Vn(e,t)),droppedLinksCount:e.droppedLinksCount}}function Vn(e,t){return{attributes:e.attributes?M(e.attributes):[],spanId:t.encodeSpanContext(e.context.spanId),traceId:t.encodeSpanContext(e.context.traceId),traceState:e.context.traceState?.serialize(),droppedAttributesCount:e.droppedAttributesCount||0}}function Hn(e,t){return{attributes:e.attributes?M(e.attributes):[],name:e.name,timeUnixNano:t.encodeHrTime(e.time),droppedAttributesCount:e.droppedAttributesCount||0}}function Un(e,t){return{resourceSpans:Gn(e,Fn(t))}}function Wn(e){let t=new Map;for(let n of e){let e=t.get(n.resource);e||(e=new Map,t.set(n.resource,e));let r=`${n.instrumentationScope.name}@${n.instrumentationScope.version||``}:${n.instrumentationScope.schemaUrl||``}`,i=e.get(r);i||(i=[],e.set(r,i)),i.push(n)}return t}function Gn(e,t){let n=Wn(e),r=[],i=n.entries(),a=i.next();for(;!a.done;){let[e,n]=a.value,o=[],s=n.values(),c=s.next();for(;!c.done;){let e=c.value;if(e.length>0){let n=e.map(e=>Bn(e,t));o.push({scope:Ln(e[0].instrumentationScope),spans:n,schemaUrl:e[0].instrumentationScope.schemaUrl})}c=s.next()}let l=In(e),u={resource:l,scopeSpans:o,schemaUrl:l.schemaUrl};r.push(u),a=i.next()}return r}var Kn={serializeRequest:e=>{let t=Un(e,{useHex:!0,useLongBits:!1});return new TextEncoder().encode(JSON.stringify(t))},deserializeResponse:e=>{if(e.length===0)return{};let t=new TextDecoder;return JSON.parse(t.decode(e))}},qn=5,Jn=1e3,Yn=5e3,Xn=1.5,Zn=.2;function Qn(){return 2*Zn*Math.random()-Zn}var $n=class{_transport;constructor(e){this._transport=e}retry(e,t,n){return new Promise((r,i)=>{setTimeout(()=>{this._transport.send(e,t).then(r,i)},n)})}async send(e,t){let n=Date.now()+t,r=await this._transport.send(e,t),i=qn,a=Jn;for(;r.status===`retryable`&&i>0;){i--;let t=Math.max(Math.min(a,Yn)+Qn(),0);a*=Xn;let o=r.retryInMillis??t,s=n-Date.now();if(o>s)return r;r=await this.retry(e,s,o)}return r}shutdown(){return this._transport.shutdown()}};function er(e){return new $n(e.transport)}function tr(e){return[429,502,503,504].includes(e)}function nr(e){if(e==null)return;let t=Number.parseInt(e,10);if(Number.isInteger(t))return t>0?t*1e3:-1;let n=new Date(e).getTime()-Date.now();return n>=0?n:0}var rr=class{_parameters;constructor(e){this._parameters=e}send(e,t){return new Promise(n=>{let r=new XMLHttpRequest;r.timeout=t,r.open(`POST`,this._parameters.url);let i=this._parameters.headers();Object.entries(i).forEach(([e,t])=>{r.setRequestHeader(e,t)}),r.ontimeout=e=>{n({status:`failure`,error:Error(`XHR request timed out`)})},r.onreadystatechange=()=>{r.status>=200&&r.status<=299?(_.debug(`XHR success`),n({status:`success`})):r.status&&tr(r.status)?n({status:`retryable`,retryInMillis:nr(r.getResponseHeader(`Retry-After`))}):r.status!==0&&n({status:`failure`,error:Error(`XHR request failed with non-retryable status`)})},r.onabort=()=>{n({status:`failure`,error:Error(`XHR request aborted`)})},r.onerror=()=>{n({status:`failure`,error:Error(`XHR request errored`)})},r.send(e)})}shutdown(){}};function ir(e){return new rr(e)}var ar=class{_params;constructor(e){this._params=e}send(e){return new Promise(t=>{navigator.sendBeacon(this._params.url,new Blob([e],{type:this._params.blobType}))?(_.debug(`SendBeacon success`),t({status:`success`})):t({status:`failure`,error:Error(`SendBeacon failed`)})})}shutdown(){}};function or(e){return new ar(e)}var sr=class{_parameters;constructor(e){this._parameters=e}async send(e,t){let n=new AbortController,r=setTimeout(()=>n.abort(),t);try{let t=!!globalThis.location,r=new URL(this._parameters.url),i=await fetch(r.href,{method:`POST`,headers:this._parameters.headers(),body:e,signal:n.signal,keepalive:t,mode:t?globalThis.location?.origin===r.origin?`same-origin`:`cors`:`no-cors`});return i.status>=200&&i.status<=299?(_.debug(`response success`),{status:`success`}):tr(i.status)?{status:`retryable`,retryInMillis:nr(i.headers.get(`Retry-After`))}:{status:`failure`,error:Error(`Fetch request failed with non-retryable status`)}}catch(e){return e?.name===`AbortError`?{status:`failure`,error:Error(`Fetch request timed out`,{cause:e})}:{status:`failure`,error:Error(`Fetch request errored`,{cause:e})}}finally{clearTimeout(r)}}shutdown(){}};function cr(e){return new sr(e)}function lr(e,t){return wn(e,t,er({transport:ir(e)}))}function ur(e,t){return wn(e,t,er({transport:cr(e)}))}function dr(e,t){return wn(e,t,er({transport:or({url:e.url,blobType:e.headers()[`Content-Type`]})}))}function fr(e){return()=>{let t={};return Object.entries(e?.()??{}).forEach(([e,n])=>{n===void 0?_.warn(`Header "${e}" has invalid value (${n}) and will be ignored`):t[e]=String(n)}),t}}function pr(e,t,n){let r={...n()},i={};return()=>(t!=null&&Object.assign(i,t()),e!=null&&Object.assign(i,e()),Object.assign(i,r))}function mr(e){if(e!=null)try{let t=globalThis.location?.href;return new URL(e,t).href}catch{throw Error(`Configuration: Could not parse user-provided export URL: '${e}'`)}}function hr(n){return async r=>{let{Agent:i}=await t(()=>import(`./__vite-browser-external-B35O8xpx.js`).then(t=>e(t.default)),__vite__mapDeps([0,1]),import.meta.url);return new i(n)}}function gr(e,t,n){return{...Ae(e,t,n),headers:pr(fr(e.headers),t.headers,n.headers),url:mr(e.url)??t.url??n.url,agentFactory:e.agentFactory??t.agentFactory??n.agentFactory}}function _r(e,t){return{...je(),headers:()=>e,url:`http://localhost:4318/`+t,agentFactory:hr({keepAlive:!0})}}function vr(e,t,n){return gr({url:e.url,timeoutMillis:e.timeoutMillis,headers:ke(e.headers),concurrencyLimit:e.concurrencyLimit},{},_r(n,t))}function yr(e,t,n,r){return br(e.headers)(vr(e,n,r),t)}function br(e){return!e&&typeof navigator.sendBeacon==`function`?dr:globalThis.fetch===void 0?lr:ur}var xr=class extends Ee{constructor(e={}){super(yr(e,Kn,`v1/traces`,{"Content-Type":`application/json`}))}},Sr=class{emit(e){}},Cr=new Sr,wr=new class{getLogger(e,t,n){return new Sr}},Tr=class{constructor(e,t,n,r){this._provider=e,this.name=t,this.version=n,this.options=r}emit(e){this._getLogger().emit(e)}_getLogger(){if(this._delegate)return this._delegate;let e=this._provider._getDelegateLogger(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):Cr}},Er=class{getLogger(e,t,n){return this._getDelegateLogger(e,t,n)??new Tr(this,e,t,n)}_getDelegate(){return this._delegate??wr}_setDelegate(e){this._delegate=e}_getDelegateLogger(e,t,n){return this._delegate?.getLogger(e,t,n)}},Dr=typeof globalThis==`object`?globalThis:typeof self==`object`?self:typeof window==`object`?window:typeof global==`object`?global:{},N=Symbol.for(`io.opentelemetry.js.api.logs`),P=Dr;function Or(e,t,n){return r=>r===e?t:n}var kr=class e{constructor(){this._proxyLoggerProvider=new Er}static getInstance(){return this._instance||=new e,this._instance}setGlobalLoggerProvider(e){return P[N]?this.getLoggerProvider():(P[N]=Or(1,e,wr),this._proxyLoggerProvider._setDelegate(e),e)}getLoggerProvider(){return P[N]?.call(P,1)??this._proxyLoggerProvider}getLogger(e,t,n){return this.getLoggerProvider().getLogger(e,t,n)}disable(){delete P[N],this._proxyLoggerProvider=new Er}}.getInstance();function Ar(e,t,n,r){for(let i=0,a=e.length;i<a;i++){let a=e[i];t&&a.setTracerProvider(t),n&&a.setMeterProvider(n),r&&a.setLoggerProvider&&a.setLoggerProvider(r),a.getConfig().enabled||a.enable()}}function jr(e){e.forEach(e=>e.disable())}function Mr(e){let t=e.tracerProvider||d.getTracerProvider(),n=e.meterProvider||Te.getMeterProvider(),r=e.loggerProvider||kr.getLoggerProvider(),i=e.instrumentations?.flat()??[];return Ar(i,t,n,r),()=>{jr(i)}}var F=console.error.bind(console);function I(e,t,n){let r=!!e[t]&&Object.prototype.propertyIsEnumerable.call(e,t);Object.defineProperty(e,t,{configurable:!0,enumerable:r,writable:!0,value:n})}var Nr=(e,t,n)=>{if(!e||!e[t]){F(`no original function `+String(t)+` to wrap`);return}if(!n){F(`no wrapper function`),F(Error().stack);return}let r=e[t];if(typeof r!=`function`||typeof n!=`function`){F(`original object and wrapper must be functions`);return}let i=n(r,t);return I(i,`__original`,r),I(i,`__unwrap`,()=>{e[t]===i&&I(e,t,r)}),I(i,`__wrapped`,!0),I(e,t,i),i},Pr=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{F(`must provide one or more modules to patch`),F(Error().stack);return}if(!(t&&Array.isArray(t))){F(`must provide one or more functions to wrap on modules`);return}e.forEach(e=>{t.forEach(t=>{Nr(e,t,n)})})},Fr=(e,t)=>{if(!e||!e[t]){F(`no function to unwrap.`),F(Error().stack);return}let n=e[t];if(!n.__unwrap)F(`no original to unwrap to -- has `+String(t)+` already been unwrapped?`);else{n.__unwrap();return}},Ir=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{F(`must provide one or more modules to patch`),F(Error().stack);return}if(!(t&&Array.isArray(t))){F(`must provide one or more functions to unwrap on modules`);return}e.forEach(e=>{t.forEach(t=>{Fr(e,t)})})};function L(e){e&&e.logger&&(typeof e.logger==`function`?F=e.logger:F(`new logger isn't a function, not replacing`))}L.wrap=Nr,L.massWrap=Pr,L.unwrap=Fr,L.massUnwrap=Ir;var Lr=class{instrumentationName;instrumentationVersion;_config={};_tracer;_meter;_logger;_diag;constructor(e,t,n){this.instrumentationName=e,this.instrumentationVersion=t,this.setConfig(n),this._diag=_.createComponentLogger({namespace:e}),this._tracer=d.getTracer(e,t),this._meter=Te.getMeter(e,t),this._logger=kr.getLogger(e,t),this._updateMetricInstruments()}_wrap=Nr;_unwrap=Fr;_massWrap=Pr;_massUnwrap=Ir;get meter(){return this._meter}setMeterProvider(e){this._meter=e.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()}get logger(){return this._logger}setLoggerProvider(e){this._logger=e.getLogger(this.instrumentationName,this.instrumentationVersion)}getModuleDefinitions(){let e=this.init()??[];return Array.isArray(e)?e:[e]}_updateMetricInstruments(){}getConfig(){return this._config}setConfig(e){this._config={enabled:!0,...e}}setTracerProvider(e){this._tracer=e.getTracer(this.instrumentationName,this.instrumentationVersion)}get tracer(){return this._tracer}_runSpanCustomizationHook(e,t,n,r){if(e)try{e(n,r)}catch(e){this._diag.error(`Error running span customization hook due to exception in handler`,{triggerName:t},e)}}},Rr=class extends Lr{constructor(e,t,n){super(e,t,n),this._config.enabled&&this.enable()}};function R(e,t,n){let r,i;try{i=e()}catch(e){r=e}finally{if(t(r,i),r&&!n)throw r;return i}}function z(e){return typeof e==`function`&&typeof e.__original==`function`&&typeof e.__unwrap==`function`&&e.__wrapped===!0}var B;(function(e){e[e.STABLE=1]=`STABLE`,e[e.OLD=2]=`OLD`,e[e.DUPLICATE=3]=`DUPLICATE`})(B||={});function zr(e,t){let n=B.OLD,r=t?.split(`,`).map(e=>e.trim()).filter(e=>e!==``);for(let t of r??[])if(t.toLowerCase()===e+`/dup`){n=B.DUPLICATE;break}else t.toLowerCase()===e&&(n=B.STABLE);return n}var V;function Br(){if(V===void 0)try{let e=globalThis.process.argv0;V=e?`unknown_service:${e}`:`unknown_service`}catch{V=`unknown_service`}return V}var H=e=>typeof e==`object`&&!!e&&typeof e.then==`function`,Vr=class e{_rawAttributes;_asyncAttributesPending=!1;_schemaUrl;_memoizedAttributes;static FromAttributeList(t,n){let r=new e({},n);return r._rawAttributes=Wr(t),r._asyncAttributesPending=t.filter(([e,t])=>H(t)).length>0,r}constructor(e,t){let n=e.attributes??{};this._rawAttributes=Object.entries(n).map(([e,t])=>(H(t)&&(this._asyncAttributesPending=!0),[e,t])),this._rawAttributes=Wr(this._rawAttributes),this._schemaUrl=Gr(t?.schemaUrl)}get asyncAttributesPending(){return this._asyncAttributesPending}async waitForAsyncAttributes(){if(this.asyncAttributesPending){for(let e=0;e<this._rawAttributes.length;e++){let[t,n]=this._rawAttributes[e];this._rawAttributes[e]=[t,H(n)?await n:n]}this._asyncAttributesPending=!1}}get attributes(){if(this.asyncAttributesPending&&_.error(`Accessing resource attributes before async attributes settled`),this._memoizedAttributes)return this._memoizedAttributes;let e={};for(let[t,n]of this._rawAttributes){if(H(n)){_.debug(`Unsettled resource attribute ${t} skipped`);continue}n!=null&&(e[t]??=n)}return this._asyncAttributesPending||(this._memoizedAttributes=e),e}getRawAttributes(){return this._rawAttributes}get schemaUrl(){return this._schemaUrl}merge(t){if(t==null)return this;let n=Kr(this,t),r=n?{schemaUrl:n}:void 0;return e.FromAttributeList([...t.getRawAttributes(),...this.getRawAttributes()],r)}};function Hr(e,t){return Vr.FromAttributeList(Object.entries(e),t)}function Ur(){return Hr({[mt]:Br(),[gt]:St[gt],[vt]:St[vt],[yt]:St[yt]})}function Wr(e){return e.map(([e,t])=>H(t)?[e,t.catch(t=>{_.debug(`promise rejection for resource attribute: %s - %s`,e,t)})]:[e,t])}function Gr(e){if(typeof e==`string`||e===void 0)return e;_.warn(`Schema URL must be string or undefined, got %s. Schema URL will be ignored.`,e)}function Kr(e,t){let n=e?.schemaUrl,r=t?.schemaUrl,i=n===void 0||n===``,a=r===void 0||r===``;if(i)return r;if(a||n===r)return n;_.warn(`Schema URL merge conflict: old resource has "%s", updating resource has "%s". Resulting resource will have undefined Schema URL.`,n,r)}var qr=`exception`,Jr=Symbol.for(`nodejs.util.inspect.custom`);function Yr(e){let t={};for(let[n,r]of e.getRawAttributes())typeof r?.then!=`function`&&r!=null&&(t[n]??=r);return t}function Xr(e,t,n,r,i){if(typeof n==`number`&&n<0){let t=`[${e}]`;return r?.stylize?r.stylize(t,`special`):t}return typeof i!=`function`||!r?t:`${e} ${i(t,{...r,depth:r.depth==null?r.depth:r.depth-1})}`}var Zr=class{_spanContext;kind;parentSpanContext;attributes={};links=[];events=[];startTime;resource;instrumentationScope;_droppedAttributesCount=0;_droppedEventsCount=0;_droppedLinksCount=0;_attributesCount=0;name;status={code:m.UNSET};endTime=[0,0];_ended=!1;_duration=[-1,-1];_spanProcessor;_spanLimits;_attributeValueLengthLimit;_recordEndMetrics;_performanceStartTime;_performanceOffset;_startTimeProvided;constructor(e){let t=Date.now();if(this._spanContext=e.spanContext,this._performanceStartTime=b.now(),this._performanceOffset=t-(this._performanceStartTime+b.timeOrigin),this._startTimeProvided=e.startTime!=null,this._spanLimits=e.spanLimits,this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit??0,this._spanProcessor=e.spanProcessor,this.name=e.name,this.parentSpanContext=e.parentSpanContext,this.kind=e.kind,e.links)for(let t of e.links)this.addLink(t);this.startTime=this._getTime(e.startTime??t),this.resource=e.resource,this.instrumentationScope=e.scope,this._recordEndMetrics=e.recordEndMetrics,e.attributes!=null&&this.setAttributes(e.attributes),this._spanProcessor.onStart(this,e.context)}spanContext(){return this._spanContext}setAttribute(e,t){if(t==null||this._isSpanEnded())return this;if(e.length===0)return _.warn(`Invalid attribute key: ${e}`),this;if(!Ge(t))return _.warn(`Invalid attribute value set for key: ${e}`),this;let{attributeCountLimit:n}=this._spanLimits,r=!Object.prototype.hasOwnProperty.call(this.attributes,e);return n!==void 0&&this._attributesCount>=n&&r?(this._droppedAttributesCount++,this):(this.attributes[e]=this._truncateToSize(t),r&&this._attributesCount++,this)}setAttributes(e){for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&this.setAttribute(t,e[t]);return this}addEvent(e,t,n){if(this._isSpanEnded())return this;let{eventCountLimit:r}=this._spanLimits;if(r===0)return _.warn(`No events allowed.`),this._droppedEventsCount++,this;r!==void 0&&this.events.length>=r&&(this._droppedEventsCount===0&&_.debug(`Dropping extra events.`),this.events.shift(),this._droppedEventsCount++),Dt(t)&&(Dt(n)||(n=t),t=void 0);let i=v(t),{attributePerEventCountLimit:a}=this._spanLimits,o={},s=0,c=0;for(let e in i){if(!Object.prototype.hasOwnProperty.call(i,e))continue;let t=i[e];if(a!==void 0&&c>=a){s++;continue}o[e]=this._truncateToSize(t),c++}return this.events.push({name:e,attributes:o,time:this._getTime(n),droppedAttributesCount:s}),this}addLink(e){if(this._isSpanEnded())return this;let{linkCountLimit:t}=this._spanLimits;if(t===0)return this._droppedLinksCount++,this;t!==void 0&&this.links.length>=t&&(this._droppedLinksCount===0&&_.debug(`Dropping extra links.`),this.links.shift(),this._droppedLinksCount++);let{attributePerLinkCountLimit:n}=this._spanLimits,r=v(e.attributes),i={},a=0,o=0;for(let e in r){if(!Object.prototype.hasOwnProperty.call(r,e))continue;let t=r[e];if(n!==void 0&&o>=n){a++;continue}i[e]=this._truncateToSize(t),o++}let s={context:e.context};return o>0&&(s.attributes=i),a>0&&(s.droppedAttributesCount=a),this.links.push(s),this}addLinks(e){for(let t of e)this.addLink(t);return this}setStatus(e){if(this._isSpanEnded()||e.code===m.UNSET||this.status.code===m.OK)return this;let t={code:e.code};return e.code===m.ERROR&&(typeof e.message==`string`?t.message=e.message:e.message!=null&&_.warn(`Dropping invalid status.message of type '${typeof e.message}', expected 'string'`)),this.status=t,this}updateName(e){return this._isSpanEnded()||(this.name=e),this}end(e){if(this._isSpanEnded()){_.error(`${this.name} ${this._spanContext.traceId}-${this._spanContext.spanId} - You can only call end() on a span once.`);return}this.endTime=this._getTime(e),this._duration=Tt(this.startTime,this.endTime),this._duration[0]<0&&(_.warn(`Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.`,this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0]),this._droppedEventsCount>0&&_.warn(`Dropped ${this._droppedEventsCount} events because eventCountLimit reached`),this._droppedLinksCount>0&&_.warn(`Dropped ${this._droppedLinksCount} links because linkCountLimit reached`),this._spanProcessor.onEnding&&this._spanProcessor.onEnding(this),this._recordEndMetrics?.(),this._ended=!0,this._spanProcessor.onEnd(this)}_getTime(e){if(typeof e==`number`&&e<=b.now())return C(e+this._performanceOffset);if(typeof e==`number`)return S(e);if(e instanceof Date)return S(e.getTime());if(Et(e))return e;if(this._startTimeProvided)return S(Date.now());let t=b.now()-this._performanceStartTime;return Ot(this.startTime,S(t))}isRecording(){return this._ended===!1}recordException(e,t){let n={};typeof e==`string`?n[ot]=e:e&&(e.code?n[ct]=e.code.toString():e.name&&(n[ct]=e.name),e.message&&(n[ot]=e.message),e.stack&&(n[st]=e.stack)),n[`exception.type`]||n[`exception.message`]?this.addEvent(qr,n,t):_.warn(`Failed to record an exception ${e}`)}get duration(){return this._duration}get ended(){return this._ended}get droppedAttributesCount(){return this._droppedAttributesCount}get droppedEventsCount(){return this._droppedEventsCount}get droppedLinksCount(){return this._droppedLinksCount}_isSpanEnded(){if(this._ended){let e=Error(`Operation attempted on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`);_.warn(`Cannot execute the operation on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`,e)}return this._ended}_truncateToLimitUtil(e,t){return e.length<=t?e:e.substring(0,t)}_truncateToSize(e){let t=this._attributeValueLengthLimit;return t<=0?(_.warn(`Attribute value limit must be positive, got ${t}`),e):typeof e==`string`?this._truncateToLimitUtil(e,t):Array.isArray(e)?e.map(e=>typeof e==`string`?this._truncateToLimitUtil(e,t):e):e}[Jr](e,t,n){return Xr(`SpanImpl`,{name:this.name,kind:this.kind,spanContext:this._spanContext,parentSpanContext:this.parentSpanContext,status:this.status,startTime:this.startTime,endTime:this.endTime,duration:this._duration,ended:this._ended,attributes:this.attributes,events:this.events,links:this.links,droppedAttributesCount:this._droppedAttributesCount,droppedEventsCount:this._droppedEventsCount,droppedLinksCount:this._droppedLinksCount,instrumentationScope:this.instrumentationScope,resource:{attributes:Yr(this.resource)}},e,t,n)}},U;(function(e){e[e.NOT_RECORD=0]=`NOT_RECORD`,e[e.RECORD=1]=`RECORD`,e[e.RECORD_AND_SAMPLED=2]=`RECORD_AND_SAMPLED`})(U||={});var Qr=`otel.component.name`,$r=`otel.component.type`,ei=`otel.span.parent.origin`,ti=`otel.span.sampling_result`,ni=`otel.sdk.processor.span.processed`,ri=`otel.sdk.processor.span.queue.capacity`,ii=`otel.sdk.processor.span.queue.size`,ai=`otel.sdk.span.live`,oi=`otel.sdk.span.started`,si=`batching_span_processor`,ci=class{startedSpans;liveSpans;constructor(e){this.startedSpans=e.createCounter(oi,{unit:`{span}`,description:`The number of created spans.`}),this.liveSpans=e.createUpDownCounter(ai,{unit:`{span}`,description:`The number of currently live spans.`})}startSpan(e,t){let n=ui(t);if(this.startedSpans.add(1,{[ei]:li(e),[ti]:n}),t===U.NOT_RECORD)return()=>{};let r={[ti]:n};return this.liveSpans.add(1,r),()=>{this.liveSpans.add(-1,r)}}};function li(e){return e?e.isRemote?`remote`:`local`:`none`}function ui(e){switch(e){case U.RECORD_AND_SAMPLED:return`RECORD_AND_SAMPLE`;case U.RECORD:return`RECORD_ONLY`;case U.NOT_RECORD:return`DROP`}}var di=`2.9.0`,fi=class{_sampler;_spanLimits;_idGenerator;instrumentationScope;_resource;_spanProcessor;_tracerMetrics;constructor(e,t){this.instrumentationScope=e,this._sampler=t.sampler,this._spanLimits=t.spanLimits,this._resource=t.resource,this._idGenerator=t.idGenerator,this._spanProcessor=t.spanProcessor,this._tracerMetrics=new ci(t.meterProvider.getMeter(`@opentelemetry/sdk-trace`,di))}startSpan(e,t={},r=h.active()){t.root&&(r=d.deleteSpan(r));let i=d.getSpan(r);if(Ie(r))return _.debug(`Instrumentation suppressed, returning Noop Span`),d.wrapSpanContext(o);let a=i?.spanContext(),s=this._idGenerator.generateSpanId(),c,l,u;!a||!d.isSpanContextValid(a)?l=this._idGenerator.generateTraceId():(l=a.traceId,u=a.traceState,c=a);let f=t.kind??Se.INTERNAL,ee=(t.links??[]).map(e=>({context:e.context,attributes:v(e.attributes)})),p=v(t.attributes),m=this._sampler.shouldSample(r,l,e,f,p,ee),te=this._tracerMetrics.startSpan(a,m.decision);u=m.traceState??u;let ne=m.decision===xe.RECORD_AND_SAMPLED?n.SAMPLED:n.NONE,re={traceId:l,spanId:s,traceFlags:ne,traceState:u};if(m.decision===xe.NOT_RECORD)return _.debug(`Recording is off, propagating context in a non-recording span`),d.wrapSpanContext(re);let g=v(Object.assign(p,m.attributes));return new Zr({resource:this._resource,scope:this.instrumentationScope,context:r,spanContext:re,name:e,kind:f,links:ee,parentSpanContext:c,attributes:g,startTime:t.startTime,spanProcessor:this._spanProcessor,spanLimits:this._spanLimits,recordEndMetrics:te})}startActiveSpan(e,t,n,r){let i,a,o;if(arguments.length<2)return;arguments.length===2?o=t:arguments.length===3?(i=t,o=n):(i=t,a=n,o=r);let s=a??h.active(),c=this.startSpan(e,i,s),l=d.setSpan(s,c);return h.with(l,o,void 0,c)}[Jr](e,t,n){return Xr(`Tracer`,{instrumentationScope:this.instrumentationScope,resource:{attributes:Yr(this._resource)},spanLimits:this._spanLimits},e,t,n)}},pi=class{_spanProcessors;constructor(e){this._spanProcessors=e}forceFlush(){let e=[];for(let t of this._spanProcessors)e.push(t.forceFlush());return new Promise(t=>{Promise.all(e).then(()=>{t()}).catch(e=>{y(e||Error(`MultiSpanProcessor: forceFlush failed`)),t()})})}onStart(e,t){for(let n of this._spanProcessors)n.onStart(e,t)}onEnding(e){for(let t of this._spanProcessors)t.onEnding&&t.onEnding(e)}onEnd(e){for(let t of this._spanProcessors)t.onEnd(e)}shutdown(){let e=[];for(let t of this._spanProcessors)e.push(t.shutdown());return new Promise((t,n)=>{Promise.all(e).then(()=>{t()},n)})}},mi=class{shouldSample(){return{decision:U.NOT_RECORD}}toString(){return`AlwaysOffSampler`}},W=class{shouldSample(){return{decision:U.RECORD_AND_SAMPLED}}toString(){return`AlwaysOnSampler`}},G=class{_root;_remoteParentSampled;_remoteParentNotSampled;_localParentSampled;_localParentNotSampled;constructor(e){this._root=e.root,this._root||=(y(Error(`ParentBasedSampler must have a root sampler configured`)),new W),this._remoteParentSampled=e.remoteParentSampled??new W,this._remoteParentNotSampled=e.remoteParentNotSampled??new mi,this._localParentSampled=e.localParentSampled??new W,this._localParentNotSampled=e.localParentNotSampled??new mi}shouldSample(e,t,r,i,a,o){let s=d.getSpanContext(e);return!s||!c(s)?this._root.shouldSample(e,t,r,i,a,o):s.isRemote?s.traceFlags&n.SAMPLED?this._remoteParentSampled.shouldSample(e,t,r,i,a,o):this._remoteParentNotSampled.shouldSample(e,t,r,i,a,o):s.traceFlags&n.SAMPLED?this._localParentSampled.shouldSample(e,t,r,i,a,o):this._localParentNotSampled.shouldSample(e,t,r,i,a,o)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}},hi=new Map,gi=class{processedSpans;queueSize;queueSizeCallback;standardAttrs;droppedAttrs;constructor(e,t,n){let r=hi.get(e)??0;if(hi.set(e,r+1),this.standardAttrs={[$r]:e,[Qr]:`${e}/${r}`},this.droppedAttrs={...this.standardAttrs,[at]:`queue_full`},this.processedSpans=t.createCounter(ni,{unit:`{span}`,description:`The number of spans for which the processing has finished, either successful or failed.`}),n){let{capacity:e,getQueueSize:r}=n;t.createUpDownCounter(ri,{unit:`{span}`,description:`The maximum number of spans the queue of a given instance of an SDK span processor can hold.`}).add(e,this.standardAttrs),this.queueSize=t.createObservableUpDownCounter(ii,{unit:`{span}`,description:`The number of spans in the queue of a given instance of an SDK span processor.`}),this.queueSizeCallback=e=>e.observe(r(),this.standardAttrs),this.queueSize.addCallback(this.queueSizeCallback)}}dropSpans(e){this.processedSpans.add(e,this.droppedAttrs)}finishSpans(e,t){if(!t){this.processedSpans.add(e,this.standardAttrs);return}let n={...this.standardAttrs,[at]:t.name};this.processedSpans.add(e,n)}shutdown(){this.queueSize&&this.queueSizeCallback&&this.queueSize.removeCallback(this.queueSizeCallback)}},_i=class{_maxExportBatchSize;_maxQueueSize;_scheduledDelayMillis;_exportTimeoutMillis;_exporter;_metrics;_isExporting=!1;_finishedSpans=[];_timer;_shutdownOnce;_droppedSpansCount=0;constructor(e){this._exporter=e.exporter,this._maxExportBatchSize=e.maxExportBatchSize??512,this._maxQueueSize=e.maxQueueSize??2048,this._scheduledDelayMillis=e.scheduledDelayMillis??5e3,this._exportTimeoutMillis=e.exportTimeoutMillis??3e4,this._shutdownOnce=new yn(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(_.warn(`BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize`),this._maxExportBatchSize=this._maxQueueSize),this._metrics=new gi(si,e.selfObsMeterProvider?e.selfObsMeterProvider.getMeter(`@opentelemetry/sdk-trace`):be(),{capacity:this._maxQueueSize,getQueueSize:()=>this._finishedSpans.length})}forceFlush(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()}onStart(e,t){}onEnd(e){this._shutdownOnce.isCalled||(e.spanContext().traceFlags&n.SAMPLED)!==0&&this._addToBuffer(e)}shutdown(){return this._shutdownOnce.call()}_shutdown(){return Promise.resolve().then(()=>this.onShutdown()).then(()=>this._flushAll()).then(()=>(this._metrics.shutdown(),this._exporter.shutdown()))}_addToBuffer(e){if(this._finishedSpans.length>=this._maxQueueSize){this._droppedSpansCount===0&&_.debug(`maxQueueSize reached, dropping spans`),this._droppedSpansCount++,this._metrics.dropSpans(1);return}this._droppedSpansCount>0&&(_.warn(`Dropped ${this._droppedSpansCount} spans because maxQueueSize reached`),this._droppedSpansCount=0),this._finishedSpans.push(e),this._maybeStartTimer()}_flushAll(){return new Promise((e,t)=>{let n=[],r=Math.ceil(this._finishedSpans.length/this._maxExportBatchSize);for(let e=0,t=r;e<t;e++)n.push(this._flushOneBatch());Promise.all(n).then(()=>{e()}).catch(t)})}_flushOneBatch(){return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise((e,t)=>{let n=setTimeout(()=>{t(Error(`Timeout`))},this._exportTimeoutMillis);h.with(Fe(h.active()),()=>{let r;this._finishedSpans.length<=this._maxExportBatchSize?(r=this._finishedSpans,this._finishedSpans=[]):r=this._finishedSpans.splice(0,this._maxExportBatchSize);let i=()=>this._exporter.export(r,i=>{clearTimeout(n),this._metrics.finishSpans(r.length,i.error),i.code===E.SUCCESS?e():t(i.error??Error(`BatchSpanProcessor: span export failed`))}),a=null;for(let e=0,t=r.length;e<t;e++){let t=r[e];t.resource.asyncAttributesPending&&t.resource.waitForAsyncAttributes&&(a??=[],a.push(t.resource.waitForAsyncAttributes()))}a===null?i():Promise.all(a).then(i,e=>{y(e),t(e)})})})}_maybeStartTimer(){if(this._isExporting)return;let e=()=>{this._isExporting=!0,this._flushOneBatch().finally(()=>{this._isExporting=!1,this._finishedSpans.length>0&&(this._clearTimer(),this._maybeStartTimer())}).catch(e=>{this._isExporting=!1,y(e)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return e();this._timer===void 0&&(this._timer=setTimeout(()=>e(),this._scheduledDelayMillis),typeof this._timer!=`number`&&this._timer.unref())}_clearTimer(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)}},vi=class extends _i{_visibilityChangeListener;_pageHideListener;constructor(e){super(e),this.onInit(e)}onInit(e){e.disableAutoFlushOnDocumentHide!==!0&&typeof document<`u`&&(this._visibilityChangeListener=()=>{document.visibilityState===`hidden`&&this.forceFlush().catch(e=>{y(e)})},this._pageHideListener=()=>{this.forceFlush().catch(e=>{y(e)})},document.addEventListener(`visibilitychange`,this._visibilityChangeListener),document.addEventListener(`pagehide`,this._pageHideListener))}onShutdown(){typeof document<`u`&&(this._visibilityChangeListener&&document.removeEventListener(`visibilitychange`,this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener(`pagehide`,this._pageHideListener))}},yi=16,bi=8,xi=new Uint8Array(yi),Si=new Uint8Array(bi),Ci=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,`0`));function wi(e){for(let t=0;t<e.length;t++)e[t]=Math.random()*256>>>0;for(let t=0;t<e.length;t++)if(e[t]>0)return;e[e.length-1]=1}function Ti(e){let t=``;for(let n=0;n<e.length;n++)t+=Ci[e[n]];return t}var Ei=class{generateTraceId(){return wi(xi),Ti(xi)}generateSpanId(){return wi(Si),Ti(Si)}},K;(function(e){e[e.resolved=0]=`resolved`,e[e.timeout=1]=`timeout`,e[e.error=2]=`error`,e[e.unresolved=3]=`unresolved`})(K||={});var Di=class{_resource;_activeSpanProcessor;_forceFlushTimeoutMillis;_tracerOptions;_tracers=new Map;constructor(e={}){this._forceFlushTimeoutMillis=e.forceFlushTimeoutMillis??3e4,this._resource=e.resource??Ur(),this._activeSpanProcessor=new pi(e.spanProcessors??[]),this._tracerOptions={resource:this._resource,sampler:e.sampler??new G({root:new W}),spanLimits:{attributeCountLimit:e.spanLimits?.attributeCountLimit??128,attributeValueLengthLimit:e.spanLimits?.attributeValueLengthLimit??1/0,eventCountLimit:e.spanLimits?.eventCountLimit??128,linkCountLimit:e.spanLimits?.linkCountLimit??128,attributePerEventCountLimit:e.spanLimits?.attributePerEventCountLimit??128,attributePerLinkCountLimit:e.spanLimits?.attributePerLinkCountLimit??128},idGenerator:e.idGenerator||new Ei,spanProcessor:this._activeSpanProcessor,meterProvider:e.meterProvider??{getMeter(){return be()}}}}getTracer(e,t,n){let r=`${e}@${t||``}:${n?.schemaUrl||``}`;return this._tracers.has(r)||this._tracers.set(r,new fi({name:e,version:t,schemaUrl:n?.schemaUrl},this._tracerOptions)),this._tracers.get(r)}forceFlush(){let e=this._forceFlushTimeoutMillis,t=this._activeSpanProcessor._spanProcessors.map(t=>new Promise(n=>{let r,i=setTimeout(()=>{n(Error(`Span processor did not completed within timeout period of ${e} ms`)),r=K.timeout},e);t.forceFlush().then(()=>{clearTimeout(i),r!==K.timeout&&(r=K.resolved,n(r))}).catch(e=>{clearTimeout(i),r=K.error,n(e)})}));return new Promise((e,n)=>{Promise.all(t).then(t=>{let r=t.filter(e=>e!==K.resolved);r.length>0?n(r):e()}).catch(e=>n([e]))})}shutdown(){return this._activeSpanProcessor.shutdown()}[Jr](e,t,n){let r=this._activeSpanProcessor._spanProcessors;return Xr(`TracerProvider`,{resource:{attributes:Yr(this._resource)},tracers:Array.from(this._tracers.keys()),spanProcessors:r.map(e=>e.constructor?.name??`SpanProcessor`)},e,t,n)}},Oi=class{_ratio;_upperBound;constructor(e=0){this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*4294967295)}shouldSample(e,t){return{decision:l(t)&&this._accumulate(t)<this._upperBound?U.RECORD_AND_SAMPLED:U.NOT_RECORD}}toString(){return`TraceIdRatioBased{${this._ratio}}`}_normalize(e){return typeof e!=`number`||isNaN(e)?0:e>=1?1:e<=0?0:e}_accumulate(e){let t=0;for(let n=0;n<32;n+=8){let r=0;for(let t=0;t<8;t++){let i=e.charCodeAt(n+t),a=i<58?i-48:i<71?i-55:i-87;r=r<<4|a}t=(t^r)>>>0}return t}},q;(function(e){e.AlwaysOff=`always_off`,e.AlwaysOn=`always_on`,e.ParentBasedAlwaysOff=`parentbased_always_off`,e.ParentBasedAlwaysOn=`parentbased_always_on`,e.ParentBasedTraceIdRatio=`parentbased_traceidratio`,e.TraceIdRatio=`traceidratio`})(q||={});var ki=1;function Ai(){return{sampler:ji(),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:1/0,attributeCountLimit:128},spanLimits:{attributeValueLengthLimit:1/0,attributeCountLimit:128,linkCountLimit:128,eventCountLimit:128,attributePerEventCountLimit:128,attributePerLinkCountLimit:128}}}function ji(){let e=q.ParentBasedAlwaysOn;switch(e){case q.AlwaysOn:return new W;case q.AlwaysOff:return new mi;case q.ParentBasedAlwaysOn:return new G({root:new W});case q.ParentBasedAlwaysOff:return new G({root:new mi});case q.TraceIdRatio:return new Oi(Mi());case q.ParentBasedTraceIdRatio:return new G({root:new Oi(Mi())});default:return _.error(`OTEL_TRACES_SAMPLER value "${e}" invalid, defaulting to "${q.ParentBasedAlwaysOn}".`),new G({root:new W})}}function Mi(){return _.error(`OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${ki}.`),ki}function Ni(e){let t=Object.assign({},e.spanLimits);return t.attributeCountLimit=e.spanLimits?.attributeCountLimit??e.generalLimits?.attributeCountLimit??void 0??void 0??128,t.attributeValueLengthLimit=e.spanLimits?.attributeValueLengthLimit??e.generalLimits?.attributeValueLengthLimit??void 0??void 0??1/0,Object.assign({},e,{spanLimits:t})}var Pi=class extends Di{constructor(e={}){let t=un({},Ai(),Ni(e));delete t.generalLimits,super(t)}},Fi=class extends vi{constructor(e,t){t||={};for(let[e,n]of[[`maxExportBatchSize`,`OTEL_BSP_MAX_EXPORT_BATCH_SIZE`],[`maxQueueSize`,`OTEL_BSP_MAX_QUEUE_SIZE`],[`scheduledDelayMillis`,`OTEL_BSP_SCHEDULE_DELAY`],[`exportTimeoutMillis`,`OTEL_BSP_EXPORT_TIMEOUT`]])t[e];super({exporter:e,...t})}},Ii=class{_enabled=!1;_currentContext=u;_bindFunction(e=u,t){let n=this,r=function(...r){return n.with(e,()=>t.apply(this,r))};return Object.defineProperty(r,`length`,{enumerable:!1,configurable:!0,writable:!1,value:t.length}),r}active(){return this._currentContext}bind(e,t){return e===void 0&&(e=this.active()),typeof t==`function`?this._bindFunction(e,t):t}disable(){return this._currentContext=u,this._enabled=!1,this}enable(){return this._enabled?this:(this._enabled=!0,this._currentContext=u,this)}with(e,t,n,...r){let i=this._currentContext;this._currentContext=e||u;try{return t.call(n,...r)}finally{this._currentContext=i}}};function Li(e){if(e!==null){if(e===void 0){let e=new Ii;e.enable(),h.setGlobalContextManager(e);return}e.enable(),h.setGlobalContextManager(e)}}function Ri(e){if(e!==null){if(e===void 0){p.setGlobalPropagator(new kt({propagators:[new qt,new Ue]}));return}p.setGlobalPropagator(e)}}var zi=class extends Pi{constructor(e={}){super(e)}register(e={}){d.setGlobalTracerProvider(this),Ri(e.propagator),Li(e.contextManager)}},J;(function(e){e.CONNECT_END=`connectEnd`,e.CONNECT_START=`connectStart`,e.DECODED_BODY_SIZE=`decodedBodySize`,e.DOM_COMPLETE=`domComplete`,e.DOM_CONTENT_LOADED_EVENT_END=`domContentLoadedEventEnd`,e.DOM_CONTENT_LOADED_EVENT_START=`domContentLoadedEventStart`,e.DOM_INTERACTIVE=`domInteractive`,e.DOMAIN_LOOKUP_END=`domainLookupEnd`,e.DOMAIN_LOOKUP_START=`domainLookupStart`,e.ENCODED_BODY_SIZE=`encodedBodySize`,e.FETCH_START=`fetchStart`,e.LOAD_EVENT_END=`loadEventEnd`,e.LOAD_EVENT_START=`loadEventStart`,e.NAVIGATION_START=`navigationStart`,e.REDIRECT_END=`redirectEnd`,e.REDIRECT_START=`redirectStart`,e.REQUEST_START=`requestStart`,e.RESPONSE_END=`responseEnd`,e.RESPONSE_START=`responseStart`,e.SECURE_CONNECTION_START=`secureConnectionStart`,e.START_TIME=`startTime`,e.UNLOAD_EVENT_END=`unloadEventEnd`,e.UNLOAD_EVENT_START=`unloadEventStart`})(J||={});var Bi=`http.response_content_length`,Vi=`http.response_content_length_uncompressed`;function Y(e,t){return t in e}function X(e,t,n,r=!0){if(Y(n,t)&&typeof n[t]==`number`&&!(r&&n[t]===0))return e.addEvent(t,n[t])}function Hi(e,t,n=!1,r,i){if(r===void 0&&(r=t[J.START_TIME]!==0),n||(X(e,J.FETCH_START,t,r),X(e,J.DOMAIN_LOOKUP_START,t,r),X(e,J.DOMAIN_LOOKUP_END,t,r),X(e,J.CONNECT_START,t,r),X(e,J.SECURE_CONNECTION_START,t,r),X(e,J.CONNECT_END,t,r),X(e,J.REQUEST_START,t,r),X(e,J.RESPONSE_START,t,r),X(e,J.RESPONSE_END,t,r)),!i){let n=t[J.ENCODED_BODY_SIZE];n!==void 0&&e.setAttribute(Bi,n);let r=t[J.DECODED_BODY_SIZE];r!==void 0&&n!==r&&e.setAttribute(Vi,r)}}function Ui(e,t){if(e.nodeType===Node.DOCUMENT_NODE)return`/`;let n=Gi(e,t);if(t&&n.indexOf(`@id`)>0)return n;let r=``;return e.parentNode&&(r+=Ui(e.parentNode,t)),r+=n,r}function Wi(e){if(!e.parentNode)return 0;let t=[e.nodeType];e.nodeType===Node.CDATA_SECTION_NODE&&t.push(Node.TEXT_NODE);let n=Array.from(e.parentNode.childNodes);return n=n.filter(n=>{let r=n.localName;return t.indexOf(n.nodeType)>=0&&r===e.localName}),n.length>=1?n.indexOf(e)+1:0}function Gi(e,t){let n=e.nodeType,r=Wi(e),i;if(n===Node.ELEMENT_NODE){let n=e.getAttribute(`id`);if(t&&n)return`//*[@id="${n}"]`;i=e.localName}else if(n===Node.TEXT_NODE||n===Node.CDATA_SECTION_NODE)i=`text()`;else if(n===Node.COMMENT_NODE)i=`comment()`;else return``;return i&&r>1?`/${i}[${r}]`:`/${i}`}var Ki;(function(e){e.DOCUMENT_LOAD=`documentLoad`,e.DOCUMENT_FETCH=`documentFetch`,e.RESOURCE_FETCH=`resourceFetch`})(Ki||={});var qi=`0.49.0`,Ji=`@opentelemetry/instrumentation-document-load`,Yi;(function(e){e.FIRST_PAINT=`firstPaint`,e.FIRST_CONTENTFUL_PAINT=`firstContentfulPaint`})(Yi||={});var Xi=()=>{let e={},t=b.getEntriesByType?.(`navigation`)[0];if(t)Object.values(J).forEach(n=>{if(Y(t,n)){let r=t[n];typeof r==`number`&&(e[n]=r)}});else{let t=b.timing;t&&Object.values(J).forEach(n=>{if(Y(t,n)){let r=t[n];typeof r==`number`&&(e[n]=r)}})}return e},Zi={"first-paint":Yi.FIRST_PAINT,"first-contentful-paint":Yi.FIRST_CONTENTFUL_PAINT},Qi=e=>{let t=b.getEntriesByType?.(`paint`);t&&t.forEach(({name:t,startTime:n})=>{Y(Zi,t)&&e.addEvent(Zi[t],n)})},$i=class extends Rr{component=`document-load`;version=`1`;moduleName=this.component;constructor(e={}){super(Ji,qi,e)}init(){}_onDocumentLoaded(){window.setTimeout(()=>{this._collectPerformance()})}_addResourcesSpans(e){let t=b.getEntriesByType?.(`resource`);t&&t.forEach(t=>{this._initResourceSpan(t,e)})}_collectPerformance(){let e=Array.from(document.getElementsByTagName(`meta`)).find(e=>e.getAttribute(`name`)===D),t=Xi(),n=e&&e.content||``;h.with(p.extract(u,{traceparent:n}),()=>{let e=this._startSpan(Ki.DOCUMENT_LOAD,J.FETCH_START,t);e&&(h.with(d.setSpan(h.active(),e),()=>{let e=this._startSpan(Ki.DOCUMENT_FETCH,J.FETCH_START,t);e&&(e.setAttribute(nt,location.href),h.with(d.setSpan(h.active(),e),()=>{Hi(e,t,this.getConfig().ignoreNetworkEvents),this._addCustomAttributesOnSpan(e,this.getConfig().applyCustomAttributesOnSpan?.documentFetch),this._endSpan(e,J.RESPONSE_END,t)}))}),e.setAttribute(nt,location.href),e.setAttribute(rt,navigator.userAgent),this._addResourcesSpans(e),this.getConfig().ignoreNetworkEvents||(X(e,J.FETCH_START,t),X(e,J.UNLOAD_EVENT_START,t),X(e,J.UNLOAD_EVENT_END,t),X(e,J.DOM_INTERACTIVE,t),X(e,J.DOM_CONTENT_LOADED_EVENT_START,t),X(e,J.DOM_CONTENT_LOADED_EVENT_END,t),X(e,J.DOM_COMPLETE,t),X(e,J.LOAD_EVENT_START,t),X(e,J.LOAD_EVENT_END,t)),this.getConfig().ignorePerformancePaintEvents||Qi(e),this._addCustomAttributesOnSpan(e,this.getConfig().applyCustomAttributesOnSpan?.documentLoad),this._endSpan(e,J.LOAD_EVENT_END,t))})}_endSpan(e,t,n){e&&(Y(n,t)?e.end(n[t]):e.end())}_initResourceSpan(e,t){let n=this._startSpan(Ki.RESOURCE_FETCH,J.FETCH_START,e,t);n&&(n.setAttribute(nt,e.name),Hi(n,e,this.getConfig().ignoreNetworkEvents),this._addCustomAttributesOnResourceSpan(n,e,this.getConfig().applyCustomAttributesOnSpan?.resourceFetch),this._endSpan(n,J.RESPONSE_END,e))}_startSpan(e,t,n,r){if(Y(n,t)&&typeof n[t]==`number`)return this.tracer.startSpan(e,{startTime:n[t]},r?d.setSpan(h.active(),r):void 0)}_waitForPageLoad(){window.document.readyState===`complete`?this._onDocumentLoaded():(this._onDocumentLoaded=this._onDocumentLoaded.bind(this),window.addEventListener(`load`,this._onDocumentLoaded))}_addCustomAttributesOnSpan(e,t){t&&R(()=>t(e),e=>{e&&this._diag.error(`addCustomAttributesOnSpan`,e)},!0)}_addCustomAttributesOnResourceSpan(e,t,n){n&&R(()=>n(e,t),e=>{e&&this._diag.error(`addCustomAttributesOnResourceSpan`,e)},!0)}enable(){window.removeEventListener(`load`,this._onDocumentLoaded),this._waitForPageLoad()}disable(){window.removeEventListener(`load`,this._onDocumentLoaded)}},Z;(function(e){e.CONNECT_END=`connectEnd`,e.CONNECT_START=`connectStart`,e.DECODED_BODY_SIZE=`decodedBodySize`,e.DOM_COMPLETE=`domComplete`,e.DOM_CONTENT_LOADED_EVENT_END=`domContentLoadedEventEnd`,e.DOM_CONTENT_LOADED_EVENT_START=`domContentLoadedEventStart`,e.DOM_INTERACTIVE=`domInteractive`,e.DOMAIN_LOOKUP_END=`domainLookupEnd`,e.DOMAIN_LOOKUP_START=`domainLookupStart`,e.ENCODED_BODY_SIZE=`encodedBodySize`,e.FETCH_START=`fetchStart`,e.LOAD_EVENT_END=`loadEventEnd`,e.LOAD_EVENT_START=`loadEventStart`,e.NAVIGATION_START=`navigationStart`,e.REDIRECT_END=`redirectEnd`,e.REDIRECT_START=`redirectStart`,e.REQUEST_START=`requestStart`,e.RESPONSE_END=`responseEnd`,e.RESPONSE_START=`responseStart`,e.SECURE_CONNECTION_START=`secureConnectionStart`,e.START_TIME=`startTime`,e.UNLOAD_EVENT_END=`unloadEventEnd`,e.UNLOAD_EVENT_START=`unloadEventStart`})(Z||={});var ea=`http.response_content_length`,ta=`http.response_content_length_uncompressed`,na;function ra(){return na||=document.createElement(`a`),na}function ia(e,t){return t in e}function Q(e,t,n,r=!0){if(ia(n,t)&&typeof n[t]==`number`&&!(r&&n[t]===0))return e.addEvent(t,n[t])}function aa(e,t,n=!1,r,i){if(r===void 0&&(r=t[Z.START_TIME]!==0),n||(Q(e,Z.FETCH_START,t,r),Q(e,Z.DOMAIN_LOOKUP_START,t,r),Q(e,Z.DOMAIN_LOOKUP_END,t,r),Q(e,Z.CONNECT_START,t,r),Q(e,Z.SECURE_CONNECTION_START,t,r),Q(e,Z.CONNECT_END,t,r),Q(e,Z.REQUEST_START,t,r),Q(e,Z.RESPONSE_START,t,r),Q(e,Z.RESPONSE_END,t,r)),!i){let n=t[Z.ENCODED_BODY_SIZE];n!==void 0&&e.setAttribute(ea,n);let r=t[Z.DECODED_BODY_SIZE];r!==void 0&&n!==r&&e.setAttribute(ta,r)}}function oa(e){return e.slice().sort((e,t)=>{let n=e[Z.FETCH_START],r=t[Z.FETCH_START];return n>r?1:n<r?-1:0})}function sa(){return typeof location<`u`?location.origin:void 0}function ca(e,t,n,r,i=new WeakSet,a){let o=da(e);e=o.toString();let s=ua(e,t,n,r,i,a);if(s.length===0)return{mainRequest:void 0};if(s.length===1)return{mainRequest:s[0]};let c=oa(s);if(o.origin!==sa()&&c.length>1){let e=c[0],t=la(c,e[Z.RESPONSE_END],n),r=e[Z.RESPONSE_END];return t[Z.FETCH_START]<r&&(t=e,e=void 0),{corsPreFlightRequest:e,mainRequest:t}}else return{mainRequest:s[0]}}function la(e,t,n){let r=T(n),i=T(w(t)),a=e[1],o,s=e.length;for(let t=1;t<s;t++){let n=e[t],s=T(w(n[Z.FETCH_START])),c=r-T(w(n[Z.RESPONSE_END]));s>=i&&(!o||c<o)&&(o=c,a=n)}return a}function ua(e,t,n,r,i,a){let o=T(t),s=T(n),c=r.filter(t=>{let n=T(w(t[Z.FETCH_START])),r=T(w(t[Z.RESPONSE_END]));return t.initiatorType.toLowerCase()===(a||`xmlhttprequest`)&&t.name===e&&n>=o&&r<=s});return c.length>0&&(c=c.filter(e=>!i.has(e))),c}function da(e){if(typeof URL==`function`)return new URL(e,typeof document<`u`?document.baseURI:typeof location<`u`?location.href:void 0);let t=ra();return t.href=e,t}function fa(e,t){let n=t||[];return(typeof n==`string`||n instanceof RegExp)&&(n=[n]),da(e).origin===sa()?!0:n.some(t=>gn(e,t))}var pa;(function(e){e.COMPONENT=`component`,e.HTTP_STATUS_TEXT=`http.status_text`})(pa||={});var ma=`http.host`,ha=`http.method`,ga=`http.request.body.size`,_a=`http.request_content_length_uncompressed`,va=`http.scheme`,ya=`http.status_code`,ba=`http.url`,xa=`http.user_agent`,Sa=_.createComponentLogger({namespace:`@opentelemetry/opentelemetry-instrumentation-fetch/utils`});function Ca(...e){if(e[0]instanceof URL||typeof e[0]==`string`){let t=e[1];if(!t?.body)return Promise.resolve();if(t.body instanceof ReadableStream){let{body:e,length:n}=wa(t.body);return t.body=e,n}else return Promise.resolve(Ea(t.body))}else{let t=e[0];return t?.body?t.clone().text().then(e=>Oa(e)):Promise.resolve()}}function wa(e){if(!e.pipeThrough)return Sa.warn(`Platform has ReadableStream but not pipeThrough!`),{body:e,length:Promise.resolve(void 0)};let t=0,n,r=new Promise(e=>{n=e}),i=new TransformStream({start(){},async transform(e,n){let r=await e;t+=r.byteLength,n.enqueue(e)},flush(){n(t)}});return{body:e.pipeThrough(i),length:r}}function Ta(e){return typeof Document<`u`&&e instanceof Document}function Ea(e){if(Ta(e))return new XMLSerializer().serializeToString(document).length;if(typeof e==`string`)return Oa(e);if(e instanceof Blob)return e.size;if(e instanceof FormData)return ka(e);if(e instanceof URLSearchParams)return Oa(e.toString());if(e.byteLength!==void 0)return e.byteLength;Sa.warn(`unknown body type`)}var Da=new TextEncoder;function Oa(e){return Da.encode(e).byteLength}function ka(e){let t=0;for(let[n,r]of e.entries())t+=n.length,r instanceof Blob?t+=r.size:t+=r.length;return t}function Aa(e){let t=Na(),n=e.toUpperCase();return n in t?n:`_OTHER`}var ja={CONNECT:!0,DELETE:!0,GET:!0,HEAD:!0,OPTIONS:!0,PATCH:!0,POST:!0,PUT:!0,TRACE:!0},Ma;function Na(){return Ma===void 0&&(Ma=ja),Ma}var Pa={"https:":`443`,"http:":`80`};function Fa(e){let t=Number(e.port||Pa[e.protocol]);if(t&&!isNaN(t))return t}var Ia=`0.204.0`,La=300,Ra=typeof process==`object`&&process.release?.name===`node`,za=class extends Rr{component=`fetch`;version=Ia;moduleName=this.component;_usedResources=new WeakSet;_tasksCount=0;_semconvStability;constructor(e={}){super(`@opentelemetry/instrumentation-fetch`,Ia,e),this._semconvStability=zr(`http`,e?.semconvStabilityOptIn)}init(){}_addChildSpan(e,t){let n=this.tracer.startSpan(`CORS Preflight`,{startTime:t[Z.FETCH_START]},d.setSpan(h.active(),e)),r=!(this._semconvStability&B.OLD);aa(n,t,this.getConfig().ignoreNetworkEvents,void 0,r),n.end(t[Z.RESPONSE_END])}_addFinalSpanAttributes(e,t){let n=da(t.url);if(this._semconvStability&B.OLD&&(e.setAttribute(ya,t.status),t.statusText!=null&&e.setAttribute(pa.HTTP_STATUS_TEXT,t.statusText),e.setAttribute(ma,n.host),e.setAttribute(va,n.protocol.replace(`:`,``)),typeof navigator<`u`&&e.setAttribute(xa,navigator.userAgent)),this._semconvStability&B.STABLE){e.setAttribute(dt,t.status),e.setAttribute(ft,n.hostname);let r=Fa(n);r&&e.setAttribute(pt,r)}}_addHeaders(e,t){if(!fa(t,this.getConfig().propagateTraceHeaderCorsUrls)){let e={};p.inject(h.active(),e),Object.keys(e).length>0&&this._diag.debug(`headers inject skipped due to CORS policy`);return}if(e instanceof Request)p.inject(h.active(),e.headers,{set:(e,t,n)=>e.set(t,typeof n==`string`?n:String(n))});else if(e.headers instanceof Headers)p.inject(h.active(),e.headers,{set:(e,t,n)=>e.set(t,typeof n==`string`?n:String(n))});else if(e.headers instanceof Map)p.inject(h.active(),e.headers,{set:(e,t,n)=>e.set(t,typeof n==`string`?n:String(n))});else{let t={};p.inject(h.active(),t),e.headers=Object.assign({},t,e.headers||{})}}_clearResources(){this._tasksCount===0&&this.getConfig().clearTimingResources&&(performance.clearResourceTimings(),this._usedResources=new WeakSet)}_createSpan(e,t={}){if(_n(e,this.getConfig().ignoreUrls)){this._diag.debug(`ignoring span as url matches ignored url`);return}let n=``,r={};if(this._semconvStability&B.OLD){let i=(t.method||`GET`).toUpperCase();n=`HTTP ${i}`,r[pa.COMPONENT]=this.moduleName,r[ha]=i,r[ba]=e}if(this._semconvStability&B.STABLE){let i=t.method,a=Aa(t.method||`GET`);n||=a,r[lt]=a,a!==i&&(r[ut]=i),r[bt]=e}return this.tracer.startSpan(n,{kind:Se.CLIENT,attributes:r})}_findResourceAndAddNetworkEvents(e,t,n){let r=t.entries;if(!r.length){if(!performance.getEntriesByType)return;r=performance.getEntriesByType(`resource`)}let i=ca(t.spanUrl,t.startTime,n,r,this._usedResources,`fetch`);if(i.mainRequest){let t=i.mainRequest;this._markResourceAsUsed(t);let n=i.corsPreFlightRequest;n&&(this._addChildSpan(e,n),this._markResourceAsUsed(n));let r=!(this._semconvStability&B.OLD);aa(e,t,this.getConfig().ignoreNetworkEvents,void 0,r)}}_markResourceAsUsed(e){this._usedResources.add(e)}_endSpan(e,t,n){let r=S(Date.now()),i=C();this._addFinalSpanAttributes(e,n),this._semconvStability&B.STABLE&&n.status>=400&&(e.setStatus({code:m.ERROR}),e.setAttribute(at,String(n.status))),setTimeout(()=>{t.observer?.disconnect(),this._findResourceAndAddNetworkEvents(e,t,i),this._tasksCount--,this._clearResources(),e.end(r)},La)}_patchConstructor(){return e=>{let t=this;return function(...n){let r=this,i=da(n[0]instanceof Request?n[0].url:String(n[0])).href,a=n[0]instanceof Request?n[0]:n[1]||{},o=t._createSpan(i,a);if(!o)return e.apply(this,n);let s=t._prepareSpanData(i);t.getConfig().measureRequestSize&&Ca(...n).then(e=>{e&&(t._semconvStability&B.OLD&&o.setAttribute(_a,e),t._semconvStability&B.STABLE&&o.setAttribute(ga,e))}).catch(e=>{t._diag.warn(`getFetchBodyLength`,e)});function c(e,n){t._applyAttributesAfterFetch(e,a,n),t._endSpan(e,s,{status:n.status||0,statusText:n.message,url:i})}function l(e,n){t._applyAttributesAfterFetch(e,a,n),n.status>=200&&n.status<400?t._endSpan(e,s,n):t._endSpan(e,s,{status:n.status,statusText:n.statusText,url:i})}function u(e,t,n){try{let t=n.clone().body;if(t){let r=t.getReader(),i=()=>{r.read().then(({done:t})=>{t?l(e,n):i()},t=>{c(e,t)})};i()}else l(e,n)}finally{t(n)}}function f(e,t,n){try{c(e,n)}finally{t(n)}}return new Promise((n,s)=>h.with(d.setSpan(h.active(),o),()=>(t._addHeaders(a,i),t._callRequestHook(o,a),t._tasksCount++,e.apply(r,a instanceof Request?[a]:[i,a]).then(u.bind(r,o,n),f.bind(r,o,s)))))}}}_applyAttributesAfterFetch(e,t,n){let r=this.getConfig().applyCustomAttributesOnSpan;r&&R(()=>r(e,t,n),e=>{e&&this._diag.error(`applyCustomAttributesOnSpan`,e)},!0)}_callRequestHook(e,t){let n=this.getConfig().requestHook;n&&R(()=>n(e,t),e=>{e&&this._diag.error(`requestHook`,e)},!0)}_prepareSpanData(e){let t=C(),n=[];if(typeof PerformanceObserver!=`function`)return{entries:n,startTime:t,spanUrl:e};let r=new PerformanceObserver(t=>{t.getEntries().forEach(t=>{t.initiatorType===`fetch`&&t.name===e&&n.push(t)})});return r.observe({entryTypes:[`resource`]}),{entries:n,observer:r,startTime:t,spanUrl:e}}enable(){if(Ra){this._diag.warn(`this instrumentation is intended for web usage only, it does not instrument Node.js's fetch()`);return}z(fetch)&&(this._unwrap(Qe,`fetch`),this._diag.debug(`removing previous patch for constructor`)),this._wrap(Qe,`fetch`,this._patchConstructor())}disable(){Ra||(this._unwrap(Qe,`fetch`),this._usedResources=new WeakSet)}},$;(function(e){e.EVENT_TYPE=`event_type`,e.TARGET_ELEMENT=`target_element`,e.TARGET_XPATH=`target_xpath`,e.HTTP_URL=`http.url`})($||={});var Ba=`0.49.0`,Va=`@opentelemetry/instrumentation-user-interaction`,Ha=`OT_ZONE_CONTEXT`,Ua=`Navigation:`,Wa=[`click`];function Ga(){return!1}var Ka=class extends Rr{version=Ba;moduleName=`user-interaction`;_spansData=new WeakMap;_wrappedListeners=new WeakMap;_eventsSpanMap=new WeakMap;_eventNames;_shouldPreventSpanCreation;constructor(e={}){super(Va,Ba,e),this._eventNames=new Set(e?.eventNames??Wa),this._shouldPreventSpanCreation=typeof e?.shouldPreventSpanCreation==`function`?e.shouldPreventSpanCreation:Ga}init(){}_checkForTimeout(e,t){let n=this._spansData.get(t);n&&(e.source===`setTimeout`?n.hrTimeLastTimeout=C():e.source!==`Promise.then`&&e.source!==`setTimeout`&&(n.hrTimeLastTimeout=void 0))}_allowEventName(e){return this._eventNames.has(e)}_createSpan(e,t,n){if(!(e instanceof HTMLElement)||!e.getAttribute||e.hasAttribute(`disabled`)||!this._allowEventName(t))return;let r=Ui(e,!0);try{let i=this.tracer.startSpan(t,{attributes:{[$.EVENT_TYPE]:t,[$.TARGET_ELEMENT]:e.tagName,[$.TARGET_XPATH]:r,[$.HTTP_URL]:window.location.href}},n?d.setSpan(h.active(),n):void 0);return this._shouldPreventSpanCreation(t,e,i)===!0?void 0:(this._spansData.set(i,{taskCount:0}),i)}catch(e){this._diag.error(`failed to start create new user interaction span`,e)}}_decrementTask(e){let t=this._spansData.get(e);t&&(t.taskCount--,t.taskCount===0&&this._tryToEndSpan(e,t.hrTimeLastTimeout))}_getCurrentSpan(e){let t=e.get(Ha);return t&&d.getSpan(t)}_incrementTask(e){let t=this._spansData.get(e);t&&t.taskCount++}addPatchedListener(e,t,n,r){let i=this._wrappedListeners.get(n);i||(i=new Map,this._wrappedListeners.set(n,i));let a=i.get(t);return a||(a=new Map,i.set(t,a)),a.has(e)?!1:(a.set(e,r),!0)}removePatchedListener(e,t,n){let r=this._wrappedListeners.get(n);if(!r)return;let i=r.get(t);if(!i)return;let a=i.get(e);return a&&(i.delete(e),i.size===0&&(r.delete(t),r.size===0&&this._wrappedListeners.delete(n))),a}_invokeListener(e,t,n){return typeof e==`function`?e.apply(t,n):e.handleEvent(n[0])}_patchAddEventListener(){let e=this;return t=>function(n,r,i){if(!r)return t.call(this,n,r,i);let a=i&&typeof i==`object`&&i.once,o=function(...t){let i,o=t[0],s=o?.target;o&&(i=e._eventsSpanMap.get(o)),a&&e.removePatchedListener(this,n,r);let c=e._createSpan(s,n,i);return c?(o&&e._eventsSpanMap.set(o,c),h.with(d.setSpan(h.active(),c),()=>{let n=e._invokeListener(r,this,t);return c.end(),n})):e._invokeListener(r,this,t)};if(e.addPatchedListener(this,n,r,o))return t.call(this,n,o,i)}}_patchRemoveEventListener(){let e=this;return t=>function(n,r,i){let a=e.removePatchedListener(this,n,r);return a?t.call(this,n,a,i):t.call(this,n,r,i)}}_getPatchableEventTargets(){return window.EventTarget?[EventTarget.prototype]:[Node.prototype,Window.prototype]}_patchHistoryApi(){this._unpatchHistoryApi(),this._wrap(history,`replaceState`,this._patchHistoryMethod()),this._wrap(history,`pushState`,this._patchHistoryMethod()),this._wrap(history,`back`,this._patchHistoryMethod()),this._wrap(history,`forward`,this._patchHistoryMethod()),this._wrap(history,`go`,this._patchHistoryMethod())}_patchHistoryMethod(){let e=this;return t=>function(...n){let r=`${location.pathname}${location.hash}${location.search}`,i=t.apply(this,n),a=`${location.pathname}${location.hash}${location.search}`;return r!==a&&e._updateInteractionName(a),i}}_unpatchHistoryApi(){z(history.replaceState)&&this._unwrap(history,`replaceState`),z(history.pushState)&&this._unwrap(history,`pushState`),z(history.back)&&this._unwrap(history,`back`),z(history.forward)&&this._unwrap(history,`forward`),z(history.go)&&this._unwrap(history,`go`)}_updateInteractionName(e){let t=d.getSpan(h.active());t&&typeof t.updateName==`function`&&t.updateName(`${Ua} ${e}`)}_patchZoneCancelTask(){let e=this;return t=>function(n){let r=Zone.current,i=e._getCurrentSpan(r);return i&&e._shouldCountTask(n,r)&&e._decrementTask(i),t.call(this,n)}}_patchZoneScheduleTask(){let e=this;return t=>function(n){let r=Zone.current,i=e._getCurrentSpan(r);return i&&e._shouldCountTask(n,r)&&(e._incrementTask(i),e._checkForTimeout(n,i)),t.call(this,n)}}_patchZoneRunTask(){let e=this;return t=>function(n,r,i){let a=(Array.isArray(i)&&i[0]instanceof Event?i[0]:void 0)?.target,o,s=this;if(a){if(o=e._createSpan(a,n.eventName),o)return e._incrementTask(o),s.run(()=>{try{return h.with(d.setSpan(h.active(),o),()=>{let e=Zone.current;return n._zone=e,t.call(e,n,r,i)})}finally{e._decrementTask(o)}})}else o=e._getCurrentSpan(s);try{return t.call(s,n,r,i)}finally{o&&e._shouldCountTask(n,s)&&e._decrementTask(o)}}}_shouldCountTask(e,t){if(e._zone&&(t=e._zone),!t||!e.data||e.data.isPeriodic)return!1;let n=this._getCurrentSpan(t);return!n||!this._spansData.get(n)?!1:e.type===`macroTask`||e.type===`microTask`}_tryToEndSpan(e,t){e&&this._spansData.get(e)&&(e.end(t),this._spansData.delete(e))}enable(){let e=this._getZoneWithPrototype();this._diag.debug(`applying patch to`,this.moduleName,this.version,`zone:`,!!e),e?(z(e.prototype.runTask)&&(this._unwrap(e.prototype,`runTask`),this._diag.debug(`removing previous patch from method runTask`)),z(e.prototype.scheduleTask)&&(this._unwrap(e.prototype,`scheduleTask`),this._diag.debug(`removing previous patch from method scheduleTask`)),z(e.prototype.cancelTask)&&(this._unwrap(e.prototype,`cancelTask`),this._diag.debug(`removing previous patch from method cancelTask`)),this._zonePatched=!0,this._wrap(e.prototype,`runTask`,this._patchZoneRunTask()),this._wrap(e.prototype,`scheduleTask`,this._patchZoneScheduleTask()),this._wrap(e.prototype,`cancelTask`,this._patchZoneCancelTask())):(this._zonePatched=!1,this._getPatchableEventTargets().forEach(e=>{z(e.addEventListener)&&(this._unwrap(e,`addEventListener`),this._diag.debug(`removing previous patch from method addEventListener`)),z(e.removeEventListener)&&(this._unwrap(e,`removeEventListener`),this._diag.debug(`removing previous patch from method removeEventListener`)),this._wrap(e,`addEventListener`,this._patchAddEventListener()),this._wrap(e,`removeEventListener`,this._patchRemoveEventListener())})),this._patchHistoryApi()}disable(){let e=this._getZoneWithPrototype();this._diag.debug(`removing patch from`,this.moduleName,this.version,`zone:`,!!e),e&&this._zonePatched?(z(e.prototype.runTask)&&this._unwrap(e.prototype,`runTask`),z(e.prototype.scheduleTask)&&this._unwrap(e.prototype,`scheduleTask`),z(e.prototype.cancelTask)&&this._unwrap(e.prototype,`cancelTask`)):this._getPatchableEventTargets().forEach(e=>{z(e.addEventListener)&&this._unwrap(e,`addEventListener`),z(e.removeEventListener)&&this._unwrap(e,`removeEventListener`)}),this._unpatchHistoryApi()}_getZoneWithPrototype(){return window.Zone}},qa=`open-knowledge-app`,Ja=!1;function Ya(){return{BASE_URL:`./`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_APP_VERSION:`0.87.0-beta.4`}?.VITE_OTEL_COLLECTOR_URL??`http://localhost:14318`}function Xa(){if(Ja)return;Ja=!0;let e=null,t=!1;try{let n=Ya(),r={BASE_URL:`./`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_APP_VERSION:`0.87.0-beta.4`};e=new zi({resource:Hr({[mt]:`open-knowledge-app`,[ht]:r?.VITE_APP_VERSION??`dev`,[it]:r?.MODE??`dev`,[ne]:te}),spanProcessors:[new Fi(new xr({url:`${n}/v1/traces`}),{maxExportBatchSize:50,scheduledDelayMillis:2e3})]}),e.register(),t=!0,Mr({instrumentations:[new $i,new Ka({eventNames:[`click`,`submit`]}),new za({propagateTraceHeaderCorsUrls:[/^https?:\/\/localhost(:\d+)?\/api\//,/^https?:\/\/127\.0\.0\.1(:\d+)?\/api\//,/^\/api\//],clearTimingResources:!0})]}),console.info(`[otel] frontend telemetry initialized — OTLP/HTTP → ${n}/v1/traces`)}catch(n){console.warn(`[otel] frontend telemetry init failed — continuing without`,n),t&&e&&e.shutdown().catch(()=>{}),Ja=!1}}function Za(){return d.getTracer(qa)}export{Za as getAppTracer,Xa as install};
@@ -1 +1 @@
1
- import{t as e}from"./propagation-api-B1IlUKzT.js";import{t}from"./context-api-B9rp0hJb.js";import{n}from"./startup-marks-Cb3e8PuI.js";import{getAppTracer as r}from"./telemetry-impl-BoQfVHFh.js";var i;function a(){if(!i)try{let a=typeof window<`u`?window.okDesktop?.config.startupTraceparent:void 0;if(!a)return;let o=e.extract(t.active(),{traceparent:a}),s=r().startSpan(`ok.app-startup`,void 0,o);i=s,n(e=>{try{s.end(e)}catch{}i=void 0})}catch{}}export{a as initStartupTrace};
1
+ import{t as e}from"./propagation-api-B1IlUKzT.js";import{t}from"./context-api-B9rp0hJb.js";import{n}from"./startup-marks-DLk8fGL-.js";import{getAppTracer as r}from"./telemetry-impl-62LVdmmL.js";var i;function a(){if(!i)try{let a=typeof window<`u`?window.okDesktop?.config.startupTraceparent:void 0;if(!a)return;let o=e.extract(t.active(),{traceparent:a}),s=r().startSpan(`ok.app-startup`,void 0,o);i=s,n(e=>{try{s.end(e)}catch{}i=void 0})}catch{}}export{a as initStartupTrace};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./dist-BosZaL03.js","./chunk-CYidjpOJ.js","./w3c-keyname-C7Rznu6R.js","./dist-CBBf5U_8.js","./dist-nSDmHl8c.js","./dist-urhiDaCp.js","./dist-D2c3re7d.js","./dist-BjL32yBS.js","./dist-Jw9rDwKW.js","./dist-DL4JUOn7.js","./dist-BxVTbkVl.js","./dist-CtBRIMC4.js","./dist-DxN51Ana2.js"])))=>i.map(i=>d[i]);
2
- import{t as e}from"./preload-helper-Chd9yIcd.js";var t=new Map;function n(e){let n=t.get(e);if(n)return n;let i=r(e);return t.set(e,i),i}async function r(t){switch(t){case`bash`:case`shell`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-BosZaL03.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{shell:e}=await import(`./shell-yCnF1Ih-.js`);return{shell:e}},[],import.meta.url)).shell);case`c`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-BosZaL03.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{c:e}=await import(`./clike-1wG3bW8r.js`);return{c:e}},[],import.meta.url)).c);case`cpp`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-BosZaL03.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{cpp:e}=await import(`./clike-1wG3bW8r.js`);return{cpp:e}},[],import.meta.url)).cpp);case`csharp`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-BosZaL03.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{csharp:e}=await import(`./clike-1wG3bW8r.js`);return{csharp:e}},[],import.meta.url)).csharp);case`css`:case`less`:case`scss`:return(await e(async()=>{let{css:e}=await import(`./dist-CBBf5U_8.js`).then(e=>e.r);return{css:e}},__vite__mapDeps([3,1,0,2,4]),import.meta.url)).css().language;case`diff`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-BosZaL03.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{diff:e}=await import(`./diff-ZtE_I48P.js`);return{diff:e}},[],import.meta.url)).diff);case`gherkin`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-BosZaL03.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{gherkin:e}=await import(`./gherkin-D-wgqAUq.js`);return{gherkin:e}},[],import.meta.url)).gherkin);case`go`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-BosZaL03.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{go:e}=await import(`./go-Ce0XY6QP.js`);return{go:e}},[],import.meta.url)).go);case`ini`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-BosZaL03.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{properties:e}=await import(`./properties-DTJpXPSK.js`);return{properties:e}},[],import.meta.url)).properties);case`java`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-BosZaL03.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{java:e}=await import(`./clike-1wG3bW8r.js`);return{java:e}},[],import.meta.url)).java);case`javascript`:return(await e(async()=>{let{javascript:e}=await import(`./dist-urhiDaCp.js`).then(e=>e.t);return{javascript:e}},__vite__mapDeps([5,1,6,0,2,4]),import.meta.url)).javascript().language;case`json`:return(await e(async()=>{let{json:e}=await import(`./dist-BjL32yBS.js`).then(e=>e.t);return{json:e}},__vite__mapDeps([7,1,0,2,4]),import.meta.url)).json().language;case`kotlin`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-BosZaL03.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{kotlin:e}=await import(`./clike-1wG3bW8r.js`);return{kotlin:e}},[],import.meta.url)).kotlin);case`lua`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-BosZaL03.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{lua:e}=await import(`./lua-DjbyjXs-.js`);return{lua:e}},[],import.meta.url)).lua);case`markdown`:return(await e(async()=>{let{markdown:e}=await import(`./dist-Jw9rDwKW.js`).then(e=>e.t);return{markdown:e}},__vite__mapDeps([8,1,6,0,2,9,3,4,5]),import.meta.url)).markdown().language;case`objectivec`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-BosZaL03.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{objectiveC:e}=await import(`./clike-1wG3bW8r.js`);return{objectiveC:e}},[],import.meta.url)).objectiveC);case`perl`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-BosZaL03.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{perl:e}=await import(`./perl-CiUDwLXy.js`);return{perl:e}},[],import.meta.url)).perl);case`python`:return(await e(async()=>{let{python:e}=await import(`./dist-BxVTbkVl.js`);return{python:e}},__vite__mapDeps([10,6,0,1,2,4]),import.meta.url)).python().language;case`r`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-BosZaL03.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{r:e}=await import(`./r-ZT8GKk7p.js`);return{r:e}},[],import.meta.url)).r);case`ruby`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-BosZaL03.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{ruby:e}=await import(`./ruby-CcZ92BJa.js`);return{ruby:e}},[],import.meta.url)).ruby);case`rust`:return(await e(async()=>{let{rust:e}=await import(`./dist-CtBRIMC4.js`);return{rust:e}},__vite__mapDeps([11,0,1,2,4]),import.meta.url)).rust().language;case`sql`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-BosZaL03.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{standardSQL:e}=await import(`./sql-CAWP-rW7.js`);return{standardSQL:e}},[],import.meta.url)).standardSQL);case`swift`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-BosZaL03.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{swift:e}=await import(`./swift-B1817IYj.js`);return{swift:e}},[],import.meta.url)).swift);case`typescript`:return(await e(async()=>{let{javascript:e}=await import(`./dist-urhiDaCp.js`).then(e=>e.t);return{javascript:e}},__vite__mapDeps([5,1,6,0,2,4]),import.meta.url)).javascript({typescript:!0,jsx:!0}).language;case`html`:case`xml`:return(await e(async()=>{let{html:e}=await import(`./dist-DL4JUOn7.js`).then(e=>e.t);return{html:e}},__vite__mapDeps([9,1,3,0,2,4,5,6]),import.meta.url)).html().language;case`yaml`:return(await e(async()=>{let{yaml:e}=await import(`./dist-DxN51Ana2.js`).then(e=>e.t);return{yaml:e}},__vite__mapDeps([12,1,0,2,4]),import.meta.url)).yaml().language;default:return null}}async function i(t,r){if(t===`canvas`)return(await e(async()=>{let{json:e}=await import(`./dist-BjL32yBS.js`).then(e=>e.t);return{json:e}},__vite__mapDeps([7,1,0,2,4]),import.meta.url)).json().language;if(r){let e=await n(r);if(e)return e}return t===`toml`?(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-BosZaL03.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{toml:e}=await import(`./toml-DvDWi_J3.js`);return{toml:e}},[],import.meta.url)).toml):null}export{i as t};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./dist-B8KZUrr_.js","./chunk-CYidjpOJ.js","./w3c-keyname-C7Rznu6R.js","./dist-Dn7hbatR.js","./dist-D0egXYuQ.js","./dist-CwnKas8E.js","./dist-MW_4cYgC.js","./dist-rrfJUNqT.js","./dist-DchonWFB.js","./dist-B3DJFAAc.js","./dist-C3P7yzPg.js","./dist-DNUUqdDe.js","./dist-BIq0_yiu2.js"])))=>i.map(i=>d[i]);
2
+ import{t as e}from"./preload-helper-Chd9yIcd.js";var t=new Map;function n(e){let n=t.get(e);if(n)return n;let i=r(e);return t.set(e,i),i}async function r(t){switch(t){case`bash`:case`shell`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-B8KZUrr_.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{shell:e}=await import(`./shell-yCnF1Ih-.js`);return{shell:e}},[],import.meta.url)).shell);case`c`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-B8KZUrr_.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{c:e}=await import(`./clike-1wG3bW8r.js`);return{c:e}},[],import.meta.url)).c);case`cpp`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-B8KZUrr_.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{cpp:e}=await import(`./clike-1wG3bW8r.js`);return{cpp:e}},[],import.meta.url)).cpp);case`csharp`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-B8KZUrr_.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{csharp:e}=await import(`./clike-1wG3bW8r.js`);return{csharp:e}},[],import.meta.url)).csharp);case`css`:case`less`:case`scss`:return(await e(async()=>{let{css:e}=await import(`./dist-Dn7hbatR.js`).then(e=>e.r);return{css:e}},__vite__mapDeps([3,1,0,2,4]),import.meta.url)).css().language;case`diff`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-B8KZUrr_.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{diff:e}=await import(`./diff-ZtE_I48P.js`);return{diff:e}},[],import.meta.url)).diff);case`gherkin`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-B8KZUrr_.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{gherkin:e}=await import(`./gherkin-D-wgqAUq.js`);return{gherkin:e}},[],import.meta.url)).gherkin);case`go`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-B8KZUrr_.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{go:e}=await import(`./go-Ce0XY6QP.js`);return{go:e}},[],import.meta.url)).go);case`ini`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-B8KZUrr_.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{properties:e}=await import(`./properties-DTJpXPSK.js`);return{properties:e}},[],import.meta.url)).properties);case`java`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-B8KZUrr_.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{java:e}=await import(`./clike-1wG3bW8r.js`);return{java:e}},[],import.meta.url)).java);case`javascript`:return(await e(async()=>{let{javascript:e}=await import(`./dist-CwnKas8E.js`).then(e=>e.t);return{javascript:e}},__vite__mapDeps([5,1,6,0,2,4]),import.meta.url)).javascript().language;case`json`:return(await e(async()=>{let{json:e}=await import(`./dist-rrfJUNqT.js`).then(e=>e.t);return{json:e}},__vite__mapDeps([7,1,0,2,4]),import.meta.url)).json().language;case`kotlin`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-B8KZUrr_.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{kotlin:e}=await import(`./clike-1wG3bW8r.js`);return{kotlin:e}},[],import.meta.url)).kotlin);case`lua`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-B8KZUrr_.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{lua:e}=await import(`./lua-DjbyjXs-.js`);return{lua:e}},[],import.meta.url)).lua);case`markdown`:return(await e(async()=>{let{markdown:e}=await import(`./dist-DchonWFB.js`).then(e=>e.t);return{markdown:e}},__vite__mapDeps([8,1,6,0,2,9,3,4,5]),import.meta.url)).markdown().language;case`objectivec`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-B8KZUrr_.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{objectiveC:e}=await import(`./clike-1wG3bW8r.js`);return{objectiveC:e}},[],import.meta.url)).objectiveC);case`perl`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-B8KZUrr_.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{perl:e}=await import(`./perl-CiUDwLXy.js`);return{perl:e}},[],import.meta.url)).perl);case`python`:return(await e(async()=>{let{python:e}=await import(`./dist-C3P7yzPg.js`);return{python:e}},__vite__mapDeps([10,6,0,1,2,4]),import.meta.url)).python().language;case`r`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-B8KZUrr_.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{r:e}=await import(`./r-ZT8GKk7p.js`);return{r:e}},[],import.meta.url)).r);case`ruby`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-B8KZUrr_.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{ruby:e}=await import(`./ruby-CcZ92BJa.js`);return{ruby:e}},[],import.meta.url)).ruby);case`rust`:return(await e(async()=>{let{rust:e}=await import(`./dist-DNUUqdDe.js`);return{rust:e}},__vite__mapDeps([11,0,1,2,4]),import.meta.url)).rust().language;case`sql`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-B8KZUrr_.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{standardSQL:e}=await import(`./sql-CAWP-rW7.js`);return{standardSQL:e}},[],import.meta.url)).standardSQL);case`swift`:return(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-B8KZUrr_.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{swift:e}=await import(`./swift-B1817IYj.js`);return{swift:e}},[],import.meta.url)).swift);case`typescript`:return(await e(async()=>{let{javascript:e}=await import(`./dist-CwnKas8E.js`).then(e=>e.t);return{javascript:e}},__vite__mapDeps([5,1,6,0,2,4]),import.meta.url)).javascript({typescript:!0,jsx:!0}).language;case`html`:case`xml`:return(await e(async()=>{let{html:e}=await import(`./dist-B3DJFAAc.js`).then(e=>e.t);return{html:e}},__vite__mapDeps([9,1,3,0,2,4,5,6]),import.meta.url)).html().language;case`yaml`:return(await e(async()=>{let{yaml:e}=await import(`./dist-BIq0_yiu2.js`).then(e=>e.t);return{yaml:e}},__vite__mapDeps([12,1,0,2,4]),import.meta.url)).yaml().language;default:return null}}async function i(t,r){if(t===`canvas`)return(await e(async()=>{let{json:e}=await import(`./dist-rrfJUNqT.js`).then(e=>e.t);return{json:e}},__vite__mapDeps([7,1,0,2,4]),import.meta.url)).json().language;if(r){let e=await n(r);if(e)return e}return t===`toml`?(await e(async()=>{let{StreamLanguage:e}=await import(`./dist-B8KZUrr_.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([0,1,2]),import.meta.url)).StreamLanguage.define((await e(async()=>{let{toml:e}=await import(`./toml-DvDWi_J3.js`);return{toml:e}},[],import.meta.url)).toml):null}export{i as t};
@@ -1,3 +1,3 @@
1
- import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./react-f2sANaYj.js";import{t as n}from"./compiler-runtime-BfE3aGVn.js";import{n as r}from"./dist-BGzUo_18.js";import{t as i}from"./dist-C_FzPxEX2.js";import{t as a}from"./acp-thread-protocol-DEJR583g.js";import{i as o}from"./acp-tool-call-input-BvswXDFl.js";var s=e(t(),1),c=n(),l=`ok-acp-agent-settings-v1`;function u(e){return`${e.source}:${e.id}`}function d(){try{let e=localStorage.getItem(l);if(e===null)return{};let t=JSON.parse(e);return typeof t==`object`&&t?t:{}}catch{return{}}}function f(e){try{localStorage.setItem(l,JSON.stringify(e))}catch(e){console.warn(`[acp-settings] could not persist agent settings`,e)}}function p(e,t,n){let r=d(),i=r[e]??{};r[e]={...i,config:{...i.config,[t]:n}},f(r)}function m(e){let t=d()[e]?.config;if(typeof t!=`object`||!t)return;let n={};for(let[e,r]of Object.entries(t))(typeof r==`string`||typeof r==`boolean`)&&(n[e]=r);return Object.keys(n).length>0?n:void 0}function h(e,t){if(t===``)return;let n=d();n[e]={...n[e]??{},modeId:t},f(n)}function g(e){let t=d()[e]?.modeId;return typeof t==`string`&&t!==``?t:void 0}function _(e,t){let n=d(),r=n[e]??{};if(t===null||!Number.isFinite(t)||t<=0){let{contextWindow:t,...i}=r;n[e]=i}else n[e]={...r,contextWindow:Math.floor(t)};f(n)}function v(e){let t=d()[e]?.contextWindow;return typeof t==`number`&&Number.isFinite(t)&&t>0?t:void 0}var y=`codex-acp`,b=[`Warning: `,`Config warning: `],x=`
1
+ import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./react-f2sANaYj.js";import{t as n}from"./compiler-runtime-BfE3aGVn.js";import{n as r}from"./dist-BGzUo_18.js";import{t as i}from"./dist-C_FzPxEX2.js";import{t as a}from"./acp-thread-protocol-CWbl02Jp.js";import{i as o}from"./acp-tool-call-input-BvswXDFl.js";var s=e(t(),1),c=n(),l=`ok-acp-agent-settings-v1`;function u(e){return`${e.source}:${e.id}`}function d(){try{let e=localStorage.getItem(l);if(e===null)return{};let t=JSON.parse(e);return typeof t==`object`&&t?t:{}}catch{return{}}}function f(e){try{localStorage.setItem(l,JSON.stringify(e))}catch(e){console.warn(`[acp-settings] could not persist agent settings`,e)}}function p(e,t,n){let r=d(),i=r[e]??{};r[e]={...i,config:{...i.config,[t]:n}},f(r)}function m(e){let t=d()[e]?.config;if(typeof t!=`object`||!t)return;let n={};for(let[e,r]of Object.entries(t))(typeof r==`string`||typeof r==`boolean`)&&(n[e]=r);return Object.keys(n).length>0?n:void 0}function h(e,t){if(t===``)return;let n=d();n[e]={...n[e]??{},modeId:t},f(n)}function g(e){let t=d()[e]?.modeId;return typeof t==`string`&&t!==``?t:void 0}function _(e,t){let n=d(),r=n[e]??{};if(t===null||!Number.isFinite(t)||t<=0){let{contextWindow:t,...i}=r;n[e]=i}else n[e]={...r,contextWindow:Math.floor(t)};f(n)}function v(e){let t=d()[e]?.contextWindow;return typeof t==`number`&&Number.isFinite(t)&&t>0?t:void 0}var y=`codex-acp`,b=[`Warning: `,`Config warning: `],x=`
2
2
 
3
3
  `;function S(e,t){if(t==null||t.source!==`registry`||t.id!==y||typeof e!=`object`||!e)return!1;let n=e;if(n.sessionUpdate!==`agent_message_chunk`||n.messageId!==void 0)return!1;let r=n.content;if(typeof r!=`object`||!r)return!1;let i=r;if(i.type!==`text`||typeof i.text!=`string`)return!1;let a=i.text;return a.endsWith(x)?b.some(e=>a.startsWith(e)):!1}var C=64e3;function w(e){if(typeof e!=`object`||!e)return null;let t=e;return t.type===`text`&&typeof t.text==`string`?t.text:null}function T(e,t){return e===`execute`?o(t):null}function E(e){return e!==null&&(e.reason===`connect`||e.reason===`session-setup`||e.reason===`auth-required`||e.reason===`exited`)}var D=class{agent;constructor(e){this.agent=e}items=[];plan=[];turnActive=!1;tokenUsage=null;terminals={};toolCallIndex=new Map;permissionIndex=new Map;permissionByToolCall=new Map;permissionsByToolCall={};messageIndex=new Map;runtimeConsentIndex=new Map;piBridgeIndex=new Map;lastConsentIndex=null;appliedCount=0;dirty=!1;snapshot={items:[],plan:[],turnActive:!1,tokenUsage:null,terminals:{},permissionsByToolCall:{}};sync(e){e.length<this.appliedCount&&this.reset();for(let t=this.appliedCount;t<e.length;t++)this.applyEvent(e[t],t);return this.appliedCount=e.length,this.dirty&&=(this.snapshot={items:[...this.items],plan:this.plan,turnActive:this.turnActive,tokenUsage:this.tokenUsage,terminals:{...this.terminals},permissionsByToolCall:{...this.permissionsByToolCall}},!1),this.snapshot}reset(){this.items=[],this.plan=[],this.turnActive=!1,this.tokenUsage=null,this.terminals={},this.toolCallIndex=new Map,this.permissionIndex=new Map,this.permissionByToolCall=new Map,this.permissionsByToolCall={},this.messageIndex=new Map,this.runtimeConsentIndex=new Map,this.piBridgeIndex=new Map,this.lastConsentIndex=null,this.appliedCount=0,this.dirty=!0}applyEvent(e,t){switch(this.dirty=!0,e.kind){case`user_message`:{let t={kind:`message`,role:`user`,text:e.content,messageId:`user-${this.items.length}`,sentAt:e.ts};e.attachments!==void 0&&e.attachments.length>0&&(t.attachments=e.attachments),this.items.push(t),this.messageIndex.clear();break}case`turn_started`:this.turnActive=!0;break;case`browser_unavailable`:this.items.push({kind:`browser_unavailable`,reason:e.reason,seq:t});break;case`turn_ended`:this.turnActive=!1,this.messageIndex.clear();break;case`status`:if(e.status===`exited`&&(this.turnActive=!1),this.lastConsentIndex!==null){let t=this.items[this.lastConsentIndex];t?.kind===`runtime_consent`&&t.install===`running`&&(e.status===`spawning`||e.status===`ready`||e.status===`running`?this.items[this.lastConsentIndex]={...t,install:`done`}:(e.status===`error`||e.status===`exited`)&&(this.items[this.lastConsentIndex]={...t,install:`failed`}))}if(e.status===`ready`)for(let e=0;e<this.items.length;e+=1){let t=this.items[e];t?.kind===`notice`&&t.superseded!==!0&&E(t.failure)&&(this.items[e]={...t,superseded:!0})}if((e.status===`error`||e.status===`auth_required`||e.status===`exited`&&e.failure?.reason===`exited`)&&(e.failure!==void 0||(e.detail??``)!==``)){let t={kind:`notice`,text:e.detail??``,tone:e.status===`auth_required`?`info`:`error`,failure:e.failure??null,attempts:1},n=this.items[this.items.length-1];n?.kind===`notice`&&n.superseded!==!0&&j(n,t)?this.items[this.items.length-1]={...n,attempts:n.attempts+1}:this.items.push(t)}break;case`permission_request`:{let t=e.toolCall.toolCallId??null,n=t===null?void 0:this.toolCallIndex.get(t),r=n===void 0?void 0:this.items[n],a=r?.kind===`tool_call`?r.toolKind:void 0,o=e.toolCall.kind??a??`other`,s={kind:`permission`,requestId:e.requestId,title:e.toolCall.title??i._({id:`Ya3PlJ`}),toolKind:o,command:T(o,e.toolCall.rawInput)??T(o,r?.kind===`tool_call`?r.rawInput:void 0),options:e.options,readOnlyShell:e.readOnlyShell===!0,resolved:null,toolCallId:t,mergedIntoToolCall:n!==void 0};this.permissionIndex.set(e.requestId,this.items.length),t!==null&&(this.permissionByToolCall.set(t,this.items.length),this.permissionsByToolCall[t]=s),this.items.push(s);break}case`permission_resolved`:{let t=this.permissionIndex.get(e.requestId);if(t===void 0)break;let n=this.items[t];if(n.kind!==`permission`)break;let r={...n,resolved:{optionId:e.optionId,auto:e.auto}};this.items[t]=r,r.toolCallId!==null&&(this.permissionsByToolCall[r.toolCallId]=r);break}case`runtime_consent_request`:this.runtimeConsentIndex.set(e.requestId,this.items.length),this.lastConsentIndex=this.items.length,this.items.push({kind:`runtime_consent`,requestId:e.requestId,runtime:e.runtime,displayName:e.displayName,provides:e.provides,version:e.version,approxSizeMB:e.approxSizeMB,sourceHost:e.sourceHost,agentName:e.agentName,reason:e.reason??`missing`,resolved:null,install:null,progress:null});break;case`runtime_consent_resolved`:{let t=this.runtimeConsentIndex.get(e.requestId);if(t===void 0)break;let n=this.items[t];if(n.kind!==`runtime_consent`)break;this.items[t]={...n,resolved:e.decision,install:e.decision===`granted`?`running`:null};break}case`pi_bridge_consent_request`:this.piBridgeIndex.set(e.requestId,this.items.length),this.items.push({kind:`pi_bridge`,row:`prompted`,prompt:{requestId:e.requestId,agentName:e.agentName,cwd:e.cwd,otherExtensions:e.otherExtensions??[]},bridgePath:e.bridgePath,decision:null,outcome:null});break;case`pi_bridge_consent_resolved`:{let t=this.piBridgeIndex.get(e.requestId);if(t===void 0)break;let n=this.items[t];if(n.kind!==`pi_bridge`)break;this.items[t]={...n,decision:e.decision};break}case`pi_bridge_status`:{let t={state:e.state,detail:e.detail??null},n=e.requestId===void 0?void 0:this.piBridgeIndex.get(e.requestId),r=n===void 0?void 0:this.items[n];if(n!==void 0&&r?.kind===`pi_bridge`){this.items[n]={...r,outcome:t};break}this.items.push({kind:`pi_bridge`,row:`notice`,prompt:null,bridgePath:e.bridgePath,decision:null,outcome:t});break}case`runtime_install_progress`:{if(this.lastConsentIndex===null)break;let t=this.items[this.lastConsentIndex];if(t===void 0||t.kind!==`runtime_consent`)break;this.items[this.lastConsentIndex]={...t,progress:{receivedBytes:e.receivedBytes??0,totalBytes:e.totalBytes??null}};break}case`terminal_created`:this.terminals[e.terminalId]={terminalId:e.terminalId,command:e.command,args:e.args,output:``,truncated:!1,exit:null};break;case`terminal_output`:{let t=this.terminals[e.terminalId];if(t===void 0)break;let n=t.output+e.chunk,r=t.truncated;n.length>C&&(n=n.slice(-C),r=!0),this.terminals[e.terminalId]={...t,output:n,truncated:r};break}case`terminal_exit`:{let t=this.terminals[e.terminalId];if(t===void 0)break;this.terminals[e.terminalId]={...t,exit:{exitCode:e.exitCode,signal:e.signal}};break}case`session_update`:this.applyUpdate(e.update,t);break;default:break}}mergePermissionInto(e){let t=this.permissionByToolCall.get(e);if(t===void 0)return;let n=this.items[t];if(n===void 0||n.kind!==`permission`||n.mergedIntoToolCall)return;let r={...n,mergedIntoToolCall:!0};this.items[t]=r,this.permissionsByToolCall[e]=r}fillPermissionCommand(e,t,n){let r=this.permissionByToolCall.get(e);if(r===void 0)return;let i=this.items[r];if(i?.kind!==`permission`||i.command!==null)return;let a=T(i.toolKind===`other`?t:i.toolKind,n);if(a===null)return;let o={...i,command:a};this.items[r]=o,this.permissionsByToolCall[e]=o}pushMessageChunk(e,t,n){let r=`${e}:${t}`,i=this.messageIndex.get(r);if(i!==void 0&&i===this.items.length-1){let e=this.items[i];this.items[i]={...e,text:e.text+n};return}this.messageIndex.set(r,this.items.length),this.items.push({kind:`message`,role:e,text:n,messageId:t})}applyUpdate(e,t){switch(e.sessionUpdate){case`agent_message_chunk`:{let n=w(e.content);if(n===null)break;if(S(e,this.agent)){this.items.push({kind:`agent_notice`,source:`codex_legacy`,severity:`warning`,text:n,seq:t});break}this.pushMessageChunk(`agent`,k(e),n);break}case`agent_thought_chunk`:{let t=w(e.content);t!==null&&this.pushMessageChunk(`thought`,k(e),t);break}case`user_message_chunk`:{let t=w(e.content);t!==null&&this.pushMessageChunk(`user`,k(e),t);break}case`tool_call`:{let t={kind:`tool_call`,toolCallId:e.toolCallId,title:e.title??i._({id:`EvIJVD`}),toolKind:e.kind??`other`,status:e.status??`pending`,diffs:[],terminalIds:[],content:[],locations:A(e.locations),rawInput:e.rawInput};N(t,e.content),this.toolCallIndex.set(e.toolCallId,this.items.length),this.items.push(t),this.mergePermissionInto(e.toolCallId),this.fillPermissionCommand(e.toolCallId,t.toolKind,t.rawInput);break}case`tool_call_update`:{let t=this.toolCallIndex.get(e.toolCallId);if(t===void 0)break;let n=this.items[t];if(n.kind!==`tool_call`)break;let r={...n,diffs:[...n.diffs],terminalIds:[...n.terminalIds],content:[...n.content]};e.status&&(r.status=e.status),e.title&&(r.title=e.title),e.locations&&(r.locations=A(e.locations));let i=e.rawInput;i!==void 0&&(r.rawInput=i,this.fillPermissionCommand(e.toolCallId,r.toolKind,i)),N(r,e.content),this.items[t]=r;break}case`plan`:{let t=e.entries;Array.isArray(t)&&(this.plan=t.map(e=>e).filter(e=>typeof e.content==`string`).map(e=>({content:e.content,priority:typeof e.priority==`string`?e.priority:void 0,status:typeof e.status==`string`?e.status:void 0})));break}case`usage_update`:{let t=e;this.tokenUsage={used:typeof t.used==`number`?t.used:void 0,size:typeof t.size==`number`?t.size:void 0};break}default:{let t=e.usage;t!==void 0&&(this.tokenUsage={used:t.used,size:t.size});break}}}};function ee(e){return e.items.some(e=>e.kind===`message`&&e.role===`user`)}function O(e){let t=e.resolved;if(t===null)return null;if(t.optionId===null)return t.auto?{kind:`dismissed`}:{kind:`denied`,auto:!1,optionName:null};let n=e.options.find(e=>e.optionId===t.optionId);if(n===void 0)return{kind:`dismissed`};let r=n.kind.startsWith(`reject`),i=n.kind.startsWith(`allow`);return!r&&!i?{kind:`dismissed`}:{kind:r?`denied`:`approved`,auto:t.auto,optionName:n.name}}function k(e){let t=e.messageId;return typeof t==`string`?t:`default`}function A(e){return Array.isArray(e)?e.map(e=>e).filter(e=>typeof e.path==`string`).map(e=>({path:e.path,line:typeof e.line==`number`?e.line:void 0})):[]}function j(e,t){return!(e.tone!==t.tone||e.text!==t.text||e.failure===null!=(t.failure===null)||e.failure!==null&&t.failure!==null&&(e.failure.reason!==t.failure.reason||(e.failure.agentMessage??``)!==(t.failure.agentMessage??``)||(e.failure.machineDetail??``)!==(t.failure.machineDetail??``)||!M(e.failure.exit,t.failure.exit)))}function M(e,t){return e===void 0||t===void 0?e===t:e.cause===t.cause&&e.exitCode===t.exitCode&&e.signal===t.signal}function N(e,t){if(Array.isArray(t))for(let n of t){let t=n;if(t.type===`diff`&&typeof t.path==`string`&&typeof t.newText==`string`)e.diffs.push({path:t.path,oldText:typeof t.oldText==`string`?t.oldText:null,newText:t.newText});else if(t.type===`terminal`&&typeof t.terminalId==`string`)e.terminalIds.includes(t.terminalId)||e.terminalIds.push(t.terminalId);else if(t.type===`content`){let n=w(t.content);n!==null&&e.content.push(n)}else{let n=w(t);n!==null&&e.content.push(n)}}}function P(e){if(typeof e!=`object`||!e)return`info`;let t=e;if(typeof t.threadId!=`string`||t.threadId.length===0)return`threadId`;let n=t.agent;return typeof n!=`object`||!n?`agent`:typeof n.id==`string`?typeof n.name==`string`?n.source!==`custom`&&n.source!==`registry`?`agent.source`:typeof t.title==`string`?typeof t.status==`string`?typeof t.createdAt==`number`?typeof t.lastActivityAt==`number`?typeof t.lastSeq==`number`?null:`lastSeq`:`lastActivityAt`:`createdAt`:`status`:`title`:`agent.name`:`agent.id`}function F(e){return typeof e!=`object`||!e||!(`threadId`in e)?null:typeof e.threadId==`string`?e.threadId:null}var I=Object.freeze({kind:`agent_stderr`,line:`[missing log entry]`,ts:0}),L=500,R=15e3,z=3e4,B=a,V=a,H=33e4,U=8e3,te=1e4,W=class extends Error{code;constructor(e,t){super(t),this.name=`ThreadContextWindowError`,this.code=e}},G=class extends Error{code;constructor(e,t){super(t),this.name=`ThreadResumeError`,this.code=e}},K=class extends Error{code;constructor(e,t){super(t),this.name=`ThreadRetryError`,this.code=e}},q=class extends Error{code;constructor(e,t){super(t),this.name=`ThreadAuthenticateError`,this.code=e}},J=class extends Error{constructor(){super(`agent-thread channel is not connected`),this.name=`ThreadChannelUnavailableError`}},Y=class{url=null;ws=null;reconnectDelay=L;reconnectTimer=null;threads=new Map;listeners=new Set;pendingCreates=new Map;pendingResumes=new Map;pendingRetries=new Map;pendingTerminalAuthLaunches=new Map;pendingContextWindows=new Map;pendingAuths=new Map;pendingQueueEdits=new Map;openedArchived=new Set;lastViewedByThread=new Map;resumingThreads=new Set;reqCounter=0;connectionGeneration=0;status=`idle`;version=0;initialRosterIds=null;markThreadViewed=e=>{let t=this.threads.get(e);if(t===void 0||t.info.status!==`ready`)return;let n=t.info.lastActivityAt;this.lastViewedByThread.get(e)!==n&&(this.lastViewedByThread.set(e,n),this.bump())};getThreadUnread=e=>{let t=this.threads.get(e);if(t===void 0||t.info.status!==`ready`)return!1;let n=this.lastViewedByThread.get(e);return n===void 0?!1:t.info.lastActivityAt>n};setUrl(e){e!==this.url&&(this.teardownSocket(),this.url=e,this.initialRosterIds=null,this.threads.clear(),this.modelBuilders.clear(),this.openedArchived.clear(),this.bump(),e===null?this.setStatus(`idle`):this.connect())}subscribe=e=>(this.listeners.add(e),()=>this.listeners.delete(e));threadsSnapshot=[];threadsSnapshotVersion=-1;getThreads=()=>(this.threadsSnapshotVersion!==this.version&&(this.threadsSnapshot=[...this.threads.values()].map(e=>e.info).sort((e,t)=>e.createdAt-t.createdAt),this.threadsSnapshotVersion=this.version),this.threadsSnapshot);openTabsSnapshot=[];openTabsSnapshotVersion=-1;getOpenTabs=()=>(this.openTabsSnapshotVersion!==this.version&&(this.openTabsSnapshot=[...this.threads.values()].map(e=>e.info).filter(e=>e.archived!==!0||this.openedArchived.has(e.threadId)).sort((e,t)=>e.createdAt-t.createdAt),this.openTabsSnapshotVersion=this.version),this.openTabsSnapshot);getThread=e=>this.threads.get(e)??null;getInitialRosterThreadIds=()=>this.initialRosterIds;modelBuilders=new Map;getThreadModel=e=>{let t=this.threads.get(e);if(t===void 0)return null;let n=this.modelBuilders.get(e);return n===void 0&&(n=new D(t.info.agent),this.modelBuilders.set(e,n)),n.sync(t.events)};getConnectionStatus=()=>this.status;getConnectionGeneration=()=>this.connectionGeneration;getThreadScope=()=>this.url;async createThread(e,t){this.connectNow(),await this.waitForOpen(U),this.reqCounter+=1;let n=`create-${this.reqCounter}`,r=new Promise((e,r)=>{let i=setTimeout(()=>{this.pendingCreates.delete(n),r(Error(`thread creation timed out`))},z);this.pendingCreates.set(n,{resolve:e,reject:r,timer:i,onCreated:t})}),i=u(e.agent),a=m(i),o=g(i),s=v(i),c=a!==void 0||o!==void 0||s!==void 0?{...a===void 0?{}:{config:a},...o===void 0?{}:{modeId:o},...s===void 0?{}:{contextWindow:s}}:void 0;return this.send({op:`create`,reqId:n,...e,...c===void 0?{}:{settings:c}}),r}prompt(e,t,n){let r=t.trim(),i=n!==void 0&&n.length>0;r===``&&!i||(this.reqCounter+=1,this.send({op:`prompt`,threadId:e,reqId:`prompt-${this.reqCounter}`,content:r,...i?{attachments:n}:{}}))}steer(e,t,n){let r=t.trim(),i=n!==void 0&&n.length>0;r===``&&!i||(this.reqCounter+=1,this.send({op:`steer`,threadId:e,reqId:`steer-${this.reqCounter}`,content:r,...i?{attachments:n}:{}}))}editQueued(e,t,n){let r=n.trim();if(r===``)return Promise.resolve();this.reqCounter+=1;let i=`queue-edit-${this.reqCounter}`,a=new Promise((e,t)=>{let n=setTimeout(()=>{this.pendingQueueEdits.delete(i),e()},te);this.pendingQueueEdits.set(i,{resolve:e,reject:t,timer:n})});return this.send({op:`queue_edit`,threadId:e,id:t,content:r,reqId:i}),a}holdQueued(e,t,n){this.send({op:`queue_hold`,threadId:e,id:t,held:n})}removeQueued(e,t){this.send({op:`queue_remove`,threadId:e,id:t})}sendQueuedNow(e,t){this.send({op:`queue_send_now`,threadId:e,id:t})}setChatGrant(e,t,n){this.send({op:`set_chat_grant`,threadId:e,grant:t,enabled:n})}respondPermission(e,t,n){this.send({op:`permission_response`,threadId:e,requestId:t,outcome:n})}respondRuntimeConsent(e,t,n){this.send({op:`runtime_consent_response`,threadId:e,requestId:t,outcome:n})}respondPiBridgeConsent(e,t,n){this.send({op:`pi_bridge_consent_response`,threadId:e,requestId:t,outcome:n})}cancel(e){this.send({op:`cancel`,threadId:e})}setMode(e,t){this.send({op:`set_mode`,threadId:e,modeId:t})}renameThread(e,t){let n=t.trim();n!==``&&this.send({op:`rename`,threadId:e,title:n})}setConfigOption(e,t,n){this.send({op:`set_config_option`,threadId:e,configId:t,value:n})}async setContextWindow(e,t){this.connectNow(),await this.waitForOpen(U),this.reqCounter+=1;let n=`context-window-${this.reqCounter}`,r=new Promise((e,t)=>{let r=setTimeout(()=>{this.pendingContextWindows.delete(n),t(new W(`timeout`,`the context window change timed out`))},V);this.pendingContextWindows.set(n,{resolve:e,reject:t,timer:r})});return this.send({op:`set_context_window`,threadId:e,reqId:n,tokens:t}),r}closeThread(e){let t=this.threads.get(e);if(t?.info.archived===!0){this.send({op:`unsubscribe`,threadId:e}),this.openedArchived.delete(e),this.modelBuilders.delete(e),this.threads.set(e,{info:t.info,events:[],lastSeq:-1,replayThroughSeq:1/0}),this.bump();return}this.send({op:`close`,threadId:e}),this.openedArchived.delete(e),this.modelBuilders.delete(e),this.threads.delete(e)&&this.bump()}openArchivedThread(e){let t=this.threads.get(e);t===void 0||t.info.archived!==!0||this.openedArchived.has(e)||(this.openedArchived.add(e),this.send({op:`subscribe`,threadId:e,sinceSeq:t.lastSeq+1}),this.bump())}deleteThread(e){this.send({op:`delete`,threadId:e}),this.openedArchived.delete(e),this.resumingThreads.delete(e),this.modelBuilders.delete(e),this.lastViewedByThread.delete(e),this.threads.delete(e)&&this.bump()}async resumeThread(e,t,n){this.connectNow(),await this.waitForOpen(U),this.reqCounter+=1;let r=`resume-${this.reqCounter}`,i=new Promise((e,t)=>{let n=setTimeout(()=>{this.pendingResumes.delete(r),t(new G(`timeout`,`resume timed out`))},B);this.pendingResumes.set(r,{resolve:e,reject:t,timer:n})});return this.resumingThreads.add(e),this.send({op:`resume`,threadId:e,reqId:r,prompt:t,...n!==void 0&&n.length>0?{attachments:n}:{}}),i}async retryThread(e){this.connectNow(),await this.waitForOpen(U),this.reqCounter+=1;let t=`retry-${this.reqCounter}`,n=new Promise((e,n)=>{let r=setTimeout(()=>{this.pendingRetries.delete(t),n(new K(`timeout`,`retry timed out`))},V);this.pendingRetries.set(t,{resolve:e,reject:n,timer:r})});return this.send({op:`retry`,threadId:e,reqId:t}),n}async terminalAuthLaunch(e,t){this.connectNow(),await this.waitForOpen(U),this.reqCounter+=1;let n=`terminal-auth-${this.reqCounter}`,r=new Promise((e,t)=>{let r=setTimeout(()=>{this.pendingTerminalAuthLaunches.delete(n),t(Error(`the sign-in terminal request timed out`))},V);this.pendingTerminalAuthLaunches.set(n,{resolve:e,reject:t,timer:r})});return this.send({op:`terminal_auth_launch`,threadId:e,reqId:n,methodId:t}),r}async authenticateThread(e,t){this.connectNow(),await this.waitForOpen(U),this.reqCounter+=1;let n=`authenticate-${this.reqCounter}`,r=new Promise((e,t)=>{let r=setTimeout(()=>{this.pendingAuths.delete(n),t(new q(`timeout`,`sign-in timed out`))},H);this.pendingAuths.set(n,{resolve:e,reject:t,timer:r})});return this.send({op:`authenticate`,threadId:e,reqId:n,methodId:t}),r}connectNow(){this.url===null||this.ws!==null||(this.reconnectTimer!==null&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.reconnectDelay=L,this.connect())}waitForOpen(e){return this.ws!==null&&this.ws.readyState===WebSocket.OPEN?Promise.resolve():new Promise((t,n)=>{let r=e=>{clearTimeout(a),i(),e?t():n(new J)},i=this.subscribe(()=>{this.ws!==null&&this.ws.readyState===WebSocket.OPEN&&r(!0)}),a=setTimeout(()=>r(!1),e)})}connect(){if(this.url===null)return;this.setStatus(`connecting`);let e;try{e=new WebSocket(this.url)}catch{this.scheduleReconnect();return}this.connectionGeneration+=1,this.ws=e,e.onopen=()=>{if(this.ws===e){this.reconnectDelay=L,this.setStatus(`open`),this.send({op:`list`});for(let[e,t]of this.threads)t.info.archived===!0&&!this.openedArchived.has(e)||this.send({op:`subscribe`,threadId:e,sinceSeq:t.lastSeq+1})}},e.onmessage=t=>{this.ws===e&&typeof t.data==`string`&&this.receiveServerFrame(t.data)},e.onclose=()=>{this.ws===e&&(this.ws=null,this.setStatus(`closed`),this.scheduleReconnect())},e.onerror=()=>{}}teardownSocket(){this.reconnectTimer!==null&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null);for(let e of this.pendingCreates.values())clearTimeout(e.timer),e.reject(new J);this.pendingCreates.clear();for(let e of this.pendingResumes.values())clearTimeout(e.timer),e.reject(new J);this.pendingResumes.clear(),this.resumingThreads.clear();for(let e of this.pendingRetries.values())clearTimeout(e.timer),e.reject(new J);this.pendingRetries.clear();for(let e of this.pendingTerminalAuthLaunches.values())clearTimeout(e.timer),e.reject(new J);this.pendingTerminalAuthLaunches.clear();for(let e of this.pendingContextWindows.values())clearTimeout(e.timer),e.reject(new J);this.pendingContextWindows.clear();for(let e of this.pendingAuths.values())clearTimeout(e.timer),e.reject(new J);this.pendingAuths.clear();for(let e of this.pendingQueueEdits.values())clearTimeout(e.timer),e.resolve();this.pendingQueueEdits.clear();let e=this.ws;if(this.ws=null,e!==null)try{e.close()}catch{}}scheduleReconnect(){if(this.url===null||this.reconnectTimer!==null)return;let e=this.reconnectDelay;this.reconnectDelay=Math.min(this.reconnectDelay*2,R),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},e)}send(e){let t=this.ws;if(!(t===null||t.readyState!==WebSocket.OPEN))try{t.send(JSON.stringify(e))}catch{}}receiveServerFrame(e){let t;try{t=JSON.parse(e)}catch{return}this.handleFrame(t)}handleFrame(e){switch(e.op){case`created`:{let t=this.pendingCreates.get(e.reqId),n=P(e.info);if(n!==null){console.warn(`[agent-threads] invalid created thread info`,{field:n,threadId:F(e.info),reqId:e.reqId}),t!==void 0&&(this.pendingCreates.delete(e.reqId),clearTimeout(t.timer),t.reject(Error(`invalid created thread info: ${n}`)));return}if(t!==void 0){this.pendingCreates.delete(e.reqId),clearTimeout(t.timer);try{t.onCreated?.(e.info)}catch(t){console.error(`[agent-threads] created-thread callback failed for`,e.info.threadId,t)}t.resolve(e.info)}this.upsertInfo(e.info);return}case`threads`:{this.initialRosterIds===null&&(this.initialRosterIds=new Set(e.threads.filter(e=>e.archived!==!0).map(e=>e.threadId)),this.bump());let t=new Set;for(let n of e.threads){t.add(n.threadId);let e=this.threads.has(n.threadId);this.upsertInfo(n),!e&&n.archived!==!0&&this.send({op:`subscribe`,threadId:n.threadId,sinceSeq:0})}let n=!1;for(let e of Array.from(this.threads.keys()))t.has(e)||(this.threads.delete(e),this.modelBuilders.delete(e),this.openedArchived.delete(e),this.resumingThreads.delete(e),this.lastViewedByThread.delete(e),n=!0);n&&this.bump();return}case`resumed`:{this.resumingThreads.delete(e.info.threadId);let t=this.pendingResumes.get(e.reqId);t!==void 0&&(this.pendingResumes.delete(e.reqId),clearTimeout(t.timer),t.resolve(e.info)),this.upsertInfo(e.info);return}case`retried`:{let t=this.pendingRetries.get(e.reqId);t!==void 0&&(this.pendingRetries.delete(e.reqId),clearTimeout(t.timer),t.resolve(e.info)),this.upsertInfo(e.info);return}case`terminal_auth_launch_ready`:{let t=this.pendingTerminalAuthLaunches.get(e.reqId);t!==void 0&&(this.pendingTerminalAuthLaunches.delete(e.reqId),clearTimeout(t.timer),t.resolve(e.launch));return}case`context_window_set`:{let t=this.pendingContextWindows.get(e.reqId);t!==void 0&&(this.pendingContextWindows.delete(e.reqId),clearTimeout(t.timer),t.resolve(e.info)),this.upsertInfo(e.info);return}case`authenticated`:{let t=this.pendingAuths.get(e.reqId);t!==void 0&&(this.pendingAuths.delete(e.reqId),clearTimeout(t.timer),t.resolve(e.info)),this.upsertInfo(e.info);return}case`subscribed`:{this.upsertInfo(e.info);let t=this.threads.get(e.threadId);t!==void 0&&(this.threads.set(e.threadId,{...t,replayThroughSeq:e.info.lastSeq}),this.bump());return}case`queue_edited`:{let t=this.pendingQueueEdits.get(e.reqId);t!==void 0&&(this.pendingQueueEdits.delete(e.reqId),clearTimeout(t.timer),t.resolve());return}case`info`:this.upsertInfo(e.info);return;case`event`:this.appendEvents(e.threadId,e.seq,[e.event]);return;case`events`:this.appendEvents(e.threadId,e.fromSeq,e.events);return;case`error`:if(e.reqId!==void 0){e.reqId.startsWith(`resume-`)&&e.threadId!==void 0&&this.resumingThreads.delete(e.threadId);let t=this.pendingCreates.get(e.reqId);if(t!==void 0){this.pendingCreates.delete(e.reqId),clearTimeout(t.timer),t.reject(Error(e.message));return}let n=this.pendingResumes.get(e.reqId);if(n!==void 0){this.pendingResumes.delete(e.reqId),clearTimeout(n.timer),n.reject(new G(e.code,e.message));return}let a=this.pendingRetries.get(e.reqId);if(a!==void 0){this.pendingRetries.delete(e.reqId),clearTimeout(a.timer),a.reject(new K(e.code,e.message));return}let o=this.pendingTerminalAuthLaunches.get(e.reqId);if(o!==void 0){this.pendingTerminalAuthLaunches.delete(e.reqId),clearTimeout(o.timer),o.reject(Error(e.message));return}let s=this.pendingContextWindows.get(e.reqId);if(s!==void 0){this.pendingContextWindows.delete(e.reqId),clearTimeout(s.timer),s.reject(new W(e.code,e.message));return}let c=this.pendingAuths.get(e.reqId);if(c!==void 0){this.pendingAuths.delete(e.reqId),clearTimeout(c.timer),c.reject(new q(e.code,e.message));return}let l=this.pendingQueueEdits.get(e.reqId);if(l!==void 0){this.pendingQueueEdits.delete(e.reqId),clearTimeout(l.timer),l.reject(Error(e.message));return}if(e.reqId.startsWith(`prompt-`)||e.reqId.startsWith(`steer-`)){r.error(i._({id:`XNBGZw`,values:{0:e.message}}));return}}console.warn(`[agent-threads] server error frame:`,e.code,e.message);return;default:return}}appendEvents(e,t,n){let r=this.threads.get(e);if(r===void 0||n.length===0)return;let i=Math.max(r.lastSeq+1-t,0);if(i>=n.length)return;let a=i===0?n:n.slice(i),o=Math.max(t-(r.lastSeq+1),0);o>0&&console.warn(`[agent-threads] replay opened above the transcript tail`,{threadId:e,fromSeq:t,have:r.lastSeq});let s=r.info;for(let e of a)s=X(s,e);this.threads.set(e,{info:s,events:[...r.events,...o>0?Array(o).fill(I):[],...a],lastSeq:t+n.length-1,replayThroughSeq:r.replayThroughSeq}),this.bump()}upsertInfo(e){let t=this.threads.get(e.threadId);t===void 0?(this.threads.set(e.threadId,{info:e,events:[],lastSeq:-1,replayThroughSeq:1/0}),this.lastViewedByThread.has(e.threadId)||this.lastViewedByThread.set(e.threadId,e.lastActivityAt)):e.archived===!0&&t.info.archived!==!0&&!this.resumingThreads.has(e.threadId)?(this.openedArchived.delete(e.threadId),this.modelBuilders.delete(e.threadId),this.threads.set(e.threadId,{info:e,events:[],lastSeq:-1,replayThroughSeq:1/0})):this.threads.set(e.threadId,{...t,info:e}),this.bump()}setStatus(e){this.status!==e&&(this.status=e,this.bump())}bump(){this.version+=1;for(let e of this.listeners)e()}};function X(e,t){switch(t.kind){case`status`:return{...e,status:t.status,lastActivityAt:t.ts};case`title_changed`:return{...e,title:t.title};default:return{...e,lastActivityAt:t.ts}}}var Z=new Y;function Q(){return Z}function ne(){return(0,s.useSyncExternalStore)(Z.subscribe,Z.getThreads,Z.getThreads)}function re(){return(0,s.useSyncExternalStore)(Z.subscribe,Z.getOpenTabs,Z.getOpenTabs)}function ie(){return(0,s.useSyncExternalStore)(Z.subscribe,Z.getInitialRosterThreadIds,Z.getInitialRosterThreadIds)}function ae(e){let t=(0,c.c)(2),n;t[0]===e?n=t[1]:(n=()=>Z.getThread(e),t[0]=e,t[1]=n);let r=n;return(0,s.useSyncExternalStore)(Z.subscribe,r,r)}function oe(e){let t=(0,c.c)(2),n;t[0]===e?n=t[1]:(n=()=>Z.getThreadModel(e),t[0]=e,t[1]=n);let r=n;return(0,s.useSyncExternalStore)(Z.subscribe,r,r)}function $(e){let t=(0,c.c)(2),n;t[0]===e?n=t[1]:(n=()=>Z.getThreadUnread(e),t[0]=e,t[1]=n);let r=n;return(0,s.useSyncExternalStore)(Z.subscribe,r,r)}function se(){return(0,s.useSyncExternalStore)(Z.subscribe,Z.getConnectionStatus,Z.getConnectionStatus)}function ce(){return(0,s.useSyncExternalStore)(Z.subscribe,Z.getThreadScope,Z.getThreadScope)}function le(e){if(e===null)return null;try{let t=new URL(e);return t.pathname=`/collab/thread`,t.search=``,t.toString()}catch{return null}}export{u as _,Q as a,h as b,se as c,$ as d,ne as f,ee as g,O as h,K as i,oe as l,re as m,W as n,le as o,ie as p,G as r,ae as s,J as t,ce as u,p as v,_ as y};