@inkeep/open-knowledge 0.64.0 → 0.64.1

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 (140) hide show
  1. package/dist/{acp-harness-probe-DodNWez3.mjs → acp-harness-probe-BS2KKWDg.mjs} +2 -2
  2. package/dist/cli.mjs +51 -51
  3. package/dist/constants-VMvduCQu.mjs +2 -0
  4. package/dist/{git-handle-3QlrPfzF.mjs → git-handle-29BNYqgw.mjs} +2 -2
  5. package/dist/git-handle-DfQBBy3_.mjs +1 -0
  6. package/dist/index.mjs +105 -105
  7. package/dist/{init-DeSBToha.mjs → init-CB9b8ABp.mjs} +5 -5
  8. package/dist/init-C_7xLv5L.mjs +1 -0
  9. package/dist/{launch-json-removal-Db1ziD-H.mjs → launch-json-removal-lmoBoEPZ.mjs} +2 -2
  10. package/dist/loader-CqMTrIZH.mjs +1 -0
  11. package/dist/{loader-anKuU0KS.mjs → loader-DyT98uPM.mjs} +2 -2
  12. package/dist/md-manager-CZcRasmz.mjs +2 -0
  13. package/dist/{open-browser-W5CxYsJ4.mjs → open-browser-aU_PSdrG.mjs} +2 -2
  14. package/dist/parse-worker.mjs +1 -1
  15. package/dist/{preview-C1REvdOf.mjs → preview-B0PMP9Tc.mjs} +2 -2
  16. package/dist/preview-BnhlaGQl.mjs +1 -0
  17. package/dist/public/assets/{ActivityModeContent-Ckg5Pq_4.js → ActivityModeContent-rGNWFHTn.js} +1 -1
  18. package/dist/public/assets/{AddPropertiesButton-gQRcjJmF.js → AddPropertiesButton-2JRBAQEf.js} +1 -1
  19. package/dist/public/assets/{AgentDiffPane-D-ZLGFAR.js → AgentDiffPane-DaORQqpS.js} +1 -1
  20. package/dist/public/assets/{AgentThreadClientBinder-D4jxeqvH.js → AgentThreadClientBinder-CJYGMIr6.js} +1 -1
  21. package/dist/public/assets/{BugReportHistory-DihyFd3f.js → BugReportHistory-Cuh__mug.js} +1 -1
  22. package/dist/public/assets/{BugReportHistoryDialog-CSNrPEOi.js → BugReportHistoryDialog-C_9BqWro.js} +1 -1
  23. package/dist/public/assets/{CodeMirrorPropInput-DjB69jRg.js → CodeMirrorPropInput-B8JfraRG.js} +1 -1
  24. package/dist/public/assets/{ConsentDialogBody-DQ8IUXhF.js → ConsentDialogBody-CK9RceLc.js} +1 -1
  25. package/dist/public/assets/{DocumentContext-iKEZSiB2.js → DocumentContext-DyBKMWUQ.js} +1 -1
  26. package/dist/public/assets/{EditorModeToggle-DEPlArB5.js → EditorModeToggle-CTMAAr-X.js} +1 -1
  27. package/dist/public/assets/{EnableSyncConfirmDialog-CwJc4GMj.js → EnableSyncConfirmDialog-D80Aucr3.js} +1 -1
  28. package/dist/public/assets/{ExcalidrawDocEditor-BCYrkDNU.js → ExcalidrawDocEditor-CMeQn_u0.js} +1 -1
  29. package/dist/public/assets/FeedbackForm-SUXnCd9B.js +1 -0
  30. package/dist/public/assets/{GraphPanel-DHmyVvBK.js → GraphPanel-CnxzWV5D.js} +1 -1
  31. package/dist/public/assets/{ImportSkillDialog-BKP46Eid.js → ImportSkillDialog-DUdFUw6e.js} +1 -1
  32. package/dist/public/assets/{LintConfigEditor-HYgFdkkR.js → LintConfigEditor-BC8TYjz-.js} +1 -1
  33. package/dist/public/assets/{ManagedArtifactProperties-VBkp3E3_.js → ManagedArtifactProperties-Cr21JXmD.js} +1 -1
  34. package/dist/public/assets/ManagedArtifactProperties-DVT7r-wR.js +1 -0
  35. package/dist/public/assets/{MermaidDocEditor-CLbFOZa8.js → MermaidDocEditor-CCEt4Opw.js} +1 -1
  36. package/dist/public/assets/{PropertyDisplayRow-D7ELTVgR.js → PropertyDisplayRow-CTVCclTK.js} +1 -1
  37. package/dist/public/assets/{ReportBugDialogBody-C1oy3fl2.js → ReportBugDialogBody-VIeqRFre.js} +1 -1
  38. package/dist/public/assets/{SchemaConfigEditor-B7rMT9lS.js → SchemaConfigEditor-UcCzcUIa.js} +1 -1
  39. package/dist/public/assets/{SessionsHost-BxDNMNVk.js → SessionsHost-gxeaEpjc.js} +2 -2
  40. package/dist/public/assets/{SettingsDialogBody-Cg-2MbSs.js → SettingsDialogBody-CxoXcrrW.js} +1 -1
  41. package/dist/public/assets/{ShareBranchSwitchDialog-COPm8JOC.js → ShareBranchSwitchDialog-Cee3pwDa.js} +1 -1
  42. package/dist/public/assets/{ShareReceiveDialog-qD-iDy_7.js → ShareReceiveDialog-blTr_HPx.js} +1 -1
  43. package/dist/public/assets/{ShareReceiveMissDialog-BkGSRaoZ.js → ShareReceiveMissDialog-DJ9DvFJq.js} +1 -1
  44. package/dist/public/assets/{SkillCostValue-DgVDZJg4.js → SkillCostValue-DEly99Yk.js} +1 -1
  45. package/dist/public/assets/{SkillEditBanner-CVlq-SCL.js → SkillEditBanner-bd1zvQfx.js} +1 -1
  46. package/dist/public/assets/{SkillInstallMenu-CP0nLWRp.js → SkillInstallMenu-sneUc7PA.js} +1 -1
  47. package/dist/public/assets/{SkillOriginInline-6IYNkHCE.js → SkillOriginInline-BQIo2jSh.js} +1 -1
  48. package/dist/public/assets/{SkillToolbarControls-DQAXaxz9.js → SkillToolbarControls-A3BqTaVC.js} +1 -1
  49. package/dist/public/assets/{SlidesToolbarControls-Caq-eS5D.js → SlidesToolbarControls-DpcrHeKz.js} +1 -1
  50. package/dist/public/assets/{SourceEditor-iZTT-gls.js → SourceEditor-yCp7AOuC.js} +1 -1
  51. package/dist/public/assets/{TerminalPanel-hYpLMc82.js → TerminalPanel-DitPHk-i.js} +1 -1
  52. package/dist/public/assets/{TerminalWindowApp-CqhdtLqo.js → TerminalWindowApp-CEMvQfmt.js} +1 -1
  53. package/dist/public/assets/{TextDocEditor-lp_L8pQg.js → TextDocEditor-Ckd918Mb.js} +1 -1
  54. package/dist/public/assets/{ThreadView-B0bXdy0X.js → ThreadView-DGR1KByM.js} +1 -1
  55. package/dist/public/assets/{TimelineDiffPane-jTy3D_Yh.js → TimelineDiffPane-CpgSHJGN.js} +1 -1
  56. package/dist/public/assets/{agent-diff-store-B7QUf8gQ.js → agent-diff-store-DzZwPUH2.js} +1 -1
  57. package/dist/public/assets/{auth-state-cache-CcdfpjLM.js → auth-state-cache-CEf8XB-q.js} +1 -1
  58. package/dist/public/assets/{bug-report-send-manager-Buxf0r5c.js → bug-report-send-manager-D19JO93p.js} +1 -1
  59. package/dist/public/assets/{chunk-BO2N2NFS-BVKS5mdX.js → chunk-BO2N2NFS-aa_rQr8f.js} +31 -31
  60. package/dist/public/assets/client-version-ow2B_U-6.js +1 -0
  61. package/dist/public/assets/{comment-chips-z8F67ebz.js → comment-chips-C076-HNt.js} +1 -1
  62. package/dist/public/assets/{config-provider-DcdQLVo-.js → config-provider-JYp7fF6x.js} +1 -1
  63. package/dist/public/assets/{dist-DSS3ixln2.js → dist-CWxNQtC52.js} +41 -41
  64. package/dist/public/assets/{doc-paths-oMq41Y7d.js → doc-paths-DgbGdxZ1.js} +1 -1
  65. package/dist/public/assets/{documents-events-DCcMe0wm.js → documents-events-DViu97ho.js} +1 -1
  66. package/dist/public/assets/{file-tree-adapter-X5fV07Z_.js → file-tree-adapter-B2J82X4l.js} +1 -1
  67. package/dist/public/assets/{file-tree-utils-DL6Pvgvd.js → file-tree-utils-MiagXf7l.js} +1 -1
  68. package/dist/public/assets/{folder-config-api-Ca2OxXT-.js → folder-config-api-CNXuE5zD.js} +1 -1
  69. package/dist/public/assets/{highlighted-body-OFNGDK62-R5erL3S3.js → highlighted-body-OFNGDK62-eLakIx_-.js} +1 -1
  70. package/dist/public/assets/i18n-CqDKlhNm.js +1 -0
  71. package/dist/public/assets/{index-Cx0Su1s3.js → index-CVIfHBfN.js} +7 -7
  72. package/dist/public/assets/lib-DH_OjOEF.js +29 -0
  73. package/dist/public/assets/{lint-config-client-CumTSl-t.js → lint-config-client-RzlDcfLl.js} +1 -1
  74. package/dist/public/assets/{markdownlint-rule-browser-BYdFk19L.js → markdownlint-rule-browser-Bmk3lsoP.js} +1 -1
  75. package/dist/public/assets/mermaid-GHXKKRXX-ChsT7WMf.js +1 -0
  76. package/dist/public/assets/{page-list-cache-NegxJAbd.js → page-list-cache-CEyxAohw.js} +1 -1
  77. package/dist/public/assets/{pending-receive-nav-store-kFxMX_hs.js → pending-receive-nav-store-CTqjXsBl.js} +1 -1
  78. package/dist/public/assets/{progress-BOWBNgYM.js → progress-OoUVKpXn.js} +1 -1
  79. package/dist/public/assets/{project-paths-C-SkuTbI.js → project-paths-BdGjLtxT.js} +1 -1
  80. package/dist/public/assets/{prop-types-nOgQFiCi.js → prop-types-CU7HQl68.js} +1 -1
  81. package/dist/public/assets/{receive-store-D9Px8yTN.js → receive-store-CJtiTNp3.js} +1 -1
  82. package/dist/public/assets/{selection-context-CYahjTQ5.js → selection-context-DR7ab7yE.js} +1 -1
  83. package/dist/public/assets/{skill-scope-DWsJ838z.js → skill-scope-BAozv3yS.js} +1 -1
  84. package/dist/public/assets/{skills-api-BLXzXEC-.js → skills-api-DY2ILAVx.js} +1 -1
  85. package/dist/public/assets/{src-DMJQ5Vxd.js → src-CGTpf8aj.js} +1 -1
  86. package/dist/public/assets/{tag-pill-input-DwIQ-TmP.js → tag-pill-input-llQtM5Z_.js} +1 -1
  87. package/dist/public/assets/{target-navigation-intent-CJUCqJBv.js → target-navigation-intent-HQou_X-w.js} +1 -1
  88. package/dist/public/assets/{telemetry-impl-Bbh5su9o.js → telemetry-impl-BIepj08G.js} +1 -1
  89. package/dist/public/assets/{telemetry-startup-DVLjCMTC.js → telemetry-startup-B7OSl-z5.js} +1 -1
  90. package/dist/public/assets/{terminal-cli-display-C-s_gqLX.js → terminal-cli-display-DTFiZBBc.js} +1 -1
  91. package/dist/public/assets/{terminal-launch-events-CwapFFW5.js → terminal-launch-events-Bfi4m2vK.js} +1 -1
  92. package/dist/public/assets/{terminal-telemetry-B16z13Uq.js → terminal-telemetry-CboX_HNN.js} +1 -1
  93. package/dist/public/assets/{typing-burst-detector-DOfSmyLX.js → typing-burst-detector-C4y2fKpb.js} +1 -1
  94. package/dist/public/assets/{uninstall-3RuzHXuR.js → uninstall-Bf9OgFpb.js} +1 -1
  95. package/dist/public/assets/{use-activity-panel-ewhIckJf.js → use-activity-panel-D_OG3gXD.js} +1 -1
  96. package/dist/public/assets/{use-apply-config-color-theme-BEWFuTWv.js → use-apply-config-color-theme-H1zX9cBU.js} +1 -1
  97. package/dist/public/assets/{use-collab-url-CwkAA1lj.js → use-collab-url-Dk-3M_go.js} +1 -1
  98. package/dist/public/assets/{use-live-xterm-theme-C2sLeh-e.js → use-live-xterm-theme-ChdQbgac.js} +1 -1
  99. package/dist/public/assets/{use-open-skill-Bwm3tOLL.js → use-open-skill-BeZcrVWu.js} +1 -1
  100. package/dist/public/assets/{use-settings-route-DOVNFDSn.js → use-settings-route-CHUO6Vb3.js} +1 -1
  101. package/dist/public/assets/{use-skill-origin-Cyn5juIp.js → use-skill-origin-CLzO6XeG.js} +1 -1
  102. package/dist/public/assets/{use-skills-szHEgJLb.js → use-skills-B1r84pEp.js} +1 -1
  103. package/dist/public/assets/{use-terminal-enabled-Chvkm0XM.js → use-terminal-enabled-BCESHfrF.js} +1 -1
  104. package/dist/public/assets/{use-timeline-entry-diff-BN_8QKGi.js → use-timeline-entry-diff-Bs-prtib.js} +1 -1
  105. package/dist/public/assets/{use-workspace-DriKk3ci.js → use-workspace-DigIBtSV.js} +1 -1
  106. package/dist/public/index.html +47 -47
  107. package/dist/public/uninstall.html +4 -4
  108. package/dist/{repair-launch-json-Bh0ZbSGM.mjs → repair-launch-json-DGu77VVa.mjs} +2 -2
  109. package/dist/{repair-mcp-configs-C4QkDSa4.mjs → repair-mcp-configs-BKUZ3NzW.mjs} +2 -2
  110. package/dist/repair-skills-BABpOhB_.mjs +1 -0
  111. package/dist/{repair-skills-DquHsHSZ.mjs → repair-skills-CRG-r1Xh.mjs} +2 -2
  112. package/dist/{resolve-project-root-TgFFxl73.mjs → resolve-project-root-urAKqvDX.mjs} +4 -4
  113. package/dist/server-lock-C_5VGPQF.mjs +1 -0
  114. package/dist/{server-lock-DW446_ti.mjs → server-lock-_JWkU2Mh.mjs} +2 -2
  115. package/dist/{skill-teardown-DLbNuqvC.mjs → skill-teardown-CVMrfSeZ.mjs} +2 -2
  116. package/dist/{src-nJP2O0vw.mjs → src-BRlSw7bk.mjs} +1 -1
  117. package/dist/src-CjFV1e1Z.mjs +2039 -0
  118. package/dist/src-D6Ou79Ng.mjs +1 -0
  119. package/dist/{src-BSyYJ3UA.mjs → src-DBh4BCS2.mjs} +4 -4
  120. package/dist/{src-Cjs2mjwW.mjs → src-DhKkOAcb.mjs} +128 -128
  121. package/dist/start-CGzXGtnH.mjs +1 -0
  122. package/dist/{start-DXw9a2ML.mjs → start-DaYtIHPj.mjs} +3 -3
  123. package/package.json +4 -4
  124. package/dist/constants-DfUFKoK2.mjs +0 -2
  125. package/dist/git-handle-ACPhpYTy.mjs +0 -1
  126. package/dist/init-sHqvUFdz.mjs +0 -1
  127. package/dist/loader-BdMPNOLm.mjs +0 -1
  128. package/dist/md-manager-CTy1swXK.mjs +0 -2
  129. package/dist/preview-CY1N1FhZ.mjs +0 -1
  130. package/dist/public/assets/FeedbackForm-Bmmb6Lzs.js +0 -1
  131. package/dist/public/assets/ManagedArtifactProperties-CluUiwa8.js +0 -1
  132. package/dist/public/assets/client-version-B9jWAX8Y.js +0 -1
  133. package/dist/public/assets/i18n-CwbBw0OU.js +0 -1
  134. package/dist/public/assets/lib-CQqy20Z3.js +0 -29
  135. package/dist/public/assets/mermaid-GHXKKRXX-D2pBG5L4.js +0 -1
  136. package/dist/repair-skills-CiWDpMXb.mjs +0 -1
  137. package/dist/server-lock-CKYMJfzI.mjs +0 -1
  138. package/dist/src-2igu-66q.mjs +0 -2039
  139. package/dist/src-D5jc9qKa.mjs +0 -1
  140. package/dist/start-NSSGTzDh.mjs +0 -1
@@ -1,2 +1,2 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./__vite-browser-external-Ci1NQTFf.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,o as l,p as u,r as d,t as f,u as p}from"./trace-api-BslS_6CM.js";import{n as ee,t as m}from"./propagation-api-B1_qxPZb.js";import{t as h}from"./context-api-CW3A_QP4.js";var te=class{constructor(){}createGauge(e,t){return fe}createHistogram(e,t){return pe}createCounter(e,t){return de}createUpDownCounter(e,t){return me}createObservableGauge(e,t){return ge}createObservableCounter(e,t){return he}createObservableUpDownCounter(e,t){return _e}addBatchObservableCallback(e,t){}removeBatchObservableCallback(e){}},g=class{},ne=class extends g{add(e,t){}},re=class extends g{add(e,t){}},ie=class extends g{record(e,t){}},ae=class extends g{record(e,t){}},oe=class{addCallback(e){}removeCallback(e){}},se=class extends oe{},ce=class extends oe{},le=class extends oe{},ue=new te,de=new ne,fe=new ie,pe=new ae,me=new re,he=new se,ge=new ce,_e=new le;function ve(){return ue}var ye;(function(e){e[e.NOT_RECORD=0]=`NOT_RECORD`,e[e.RECORD=1]=`RECORD`,e[e.RECORD_AND_SAMPLED=2]=`RECORD_AND_SAMPLED`})(ye||={});var be;(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`})(be||={});var _=p.instance(),xe=new class{getMeter(e,t,n){return ue}},Se=`metrics`,Ce=class e{constructor(){}static getInstance(){return this._instance||=new e,this._instance}setGlobalMeterProvider(e){return a(Se,e,p.instance())}getMeterProvider(){return i(Se)||xe}getMeter(e,t,n){return this.getMeterProvider().getMeter(e,t,n)}disable(){u(Se,p.instance())}}.getInstance(),we=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()}},Te=class extends Error{code;name=`OTLPExporterError`;data;constructor(e,t,n){super(e),this.data=n,this.code=t}};function Ee(e){if(Number.isFinite(e)&&e>0)return e;throw Error(`Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '${e}')`)}function De(e){if(e!=null)return()=>e}function Oe(e,t,n){return{timeoutMillis:Ee(e.timeoutMillis??t.timeoutMillis??n.timeoutMillis),concurrencyLimit:e.concurrencyLimit??t.concurrencyLimit??n.concurrencyLimit,compression:e.compression??t.compression??n.compression}}function ke(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:`none`}}var Ae=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 je(e){return new Ae(e.concurrencyLimit)}var Me=s(`OpenTelemetry SDK Context Key SUPPRESS_TRACING`);function Ne(e){return e.setValue(Me,!0)}function Pe(e){return e.getValue(Me)===!0}var Fe=`baggage`,Ie=4096;function Le(e){return e.reduce((e,t)=>{let n=`${e}${e===``?``:`,`}${t}`;return n.length>8192?e:n},``)}function Re(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 ze(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 Be(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=ze(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 Ve=class{inject(e,t,n){let r=m.getBaggage(e);if(!r||Pe(e))return;let i=Le(Re(r).filter(e=>e.length<=Ie).slice(0,180));i.length>0&&n.set(t,Fe,i)}extract(e,t,n){let r=n.get(t,Fe);if(!r)return e;let i={},a=0,o=0;if(Array.isArray(r))for(let e=0;e<r.length;e++)[a,o]=Be(r[e],i,a,o);else [a]=Be(r,i,a,o);return a===0?e:m.setBaggage(e,m.createBaggage(i))}fields(){return[Fe]}};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(!He(n)){_.warn(`Invalid attribute key: ${n}`);continue}let r=e[n];if(!Ue(r)){_.warn(`Invalid attribute value set for key: ${n}`);continue}Array.isArray(r)?t[n]=r.slice():t[n]=r}return t}function He(e){return typeof e==`string`&&e!==``}function Ue(e){return e==null?!0:Array.isArray(e)?We(e):Ge(typeof e)}function We(e){let t;for(let n of e){if(n==null)continue;let e=typeof n;if(e!==t){if(!t){if(Ge(e)){t=e;continue}return!1}return!1}}return!0}function Ge(e){switch(e){case`number`:case`boolean`:case`string`:return!0}return!1}function Ke(){return e=>{_.error(qe(e))}}function qe(e){return typeof e==`string`?e:JSON.stringify(Je(e))}function Je(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 Ye=Ke();function y(e){try{Ye(e)}catch{}}var Xe=globalThis,Ze=`2.8.0`,Qe=`http.url`,$e=`http.user_agent`,et=Qe,tt=$e,nt=`deployment.environment.name`,rt=`error.type`,it=`exception.message`,at=`exception.stacktrace`,ot=`exception.type`,st=`http.request.method`,ct=`http.request.method_original`,lt=`http.response.status_code`,ut=`server.address`,dt=`server.port`,ft=`service.name`,pt=`service.version`,mt=`telemetry.sdk.language`,ht=`webjs`,gt=`telemetry.sdk.name`,_t=`telemetry.sdk.version`,vt=`url.full`,yt=`process.runtime.name`,bt={[gt]:`opentelemetry`,[yt]:`browser`,[mt]:ht,[_t]:Ze},b=performance,xt=9,St=10**6,x=10**xt;function S(e){let t=e/1e3;return[Math.trunc(t),Math.round(e%1e3*St)]}function C(e){return Et(S(b.timeOrigin),S(typeof e==`number`?e:b.now()))}function w(e){if(wt(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 Ct(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 wt(e){return Array.isArray(e)&&e.length===2&&typeof e[0]==`number`&&typeof e[1]==`number`}function Tt(e){return wt(e)||typeof e==`number`||e instanceof Date}function Et(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 Dt=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()}},Ot=`[_0-9a-z-*/]`,kt=`[a-z]${Ot}{0,255}`,At=`[a-z0-9]${Ot}{0,240}@[a-z]${Ot}{0,13}`,jt=RegExp(`^(?:${kt}|${At})$`),Mt=/^[ -~]{0,255}[!-~]$/,Nt=/,|=/;function Pt(e){return jt.test(e)}function Ft(e){return Mt.test(e)&&!Nt.test(e)}var It=32,Lt=512,Rt=`,`,zt=`=`,Bt=class e{_length;_rawTraceState;_internalState;constructor(e){this._rawTraceState=typeof e==`string`?e:``,this._length=this._rawTraceState.length}set(e,t){if(!Pt(e)||!Ft(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>Lt)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=Rt+e),e=`${n[0]}${zt}${n[1]}`+e,t++;return e}_getState(){if(this._internalState)return this._internalState;let e=this._rawTraceState.split(Rt),t=new Map,n=0;for(let r of e){let e=r.trim(),i=e.indexOf(zt);if(i===-1)continue;let a=e.slice(0,i),o=e.slice(i+1);if(!Pt(a)||!Ft(o))continue;let s=n+e.length+ +(t.size>0);if(!(s>Lt)&&(t.set(a,o),n=s,t.size>=It))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`,Vt=`tracestate`,Ht=`00`,Ut=RegExp(`^\\s?((?!ff)[\\da-f]{2})-((?![0]{32})[\\da-f]{32})-((?![0]{16})[\\da-f]{16})-([\\da-f]{2})(-.*)?\\s?$`);function Wt(e){let t=Ut.exec(e);return!t||t[1]===`00`&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}var Gt=class{inject(e,t,n){let r=f.getSpanContext(e);if(!r||Pe(e)||!d(r))return;let i=`${Ht}-${r.traceId}-${r.spanId}-0${Number(r.traceFlags||l.NONE).toString(16)}`;n.set(t,D,i),r.traceState&&n.set(t,Vt,r.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=Wt(i);if(!a)return e;a.isRemote=!0;let o=n.get(t,Vt);if(o){let e=Array.isArray(o)?o.join(`,`):o;a.traceState=new Bt(typeof e==`string`?e:void 0)}return f.setSpanContext(e,a)}fields(){return[D,Vt]}},Kt=`[object Object]`,qt=`[object Null]`,Jt=`[object Undefined]`,Yt=Function.prototype.toString,Xt=Yt.call(Object),Zt=Object.getPrototypeOf,Qt=Object.prototype,$t=Qt.hasOwnProperty,O=Symbol?Symbol.toStringTag:void 0,en=Qt.toString;function tn(e){if(!nn(e)||rn(e)!==Kt)return!1;let t=Zt(e);if(t===null)return!0;let n=$t.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&Yt.call(n)===Xt}function nn(e){return typeof e==`object`&&!!e}function rn(e){return e==null?e===void 0?Jt:qt:O&&O in Object(e)?an(e):on(e)}function an(e){let t=$t.call(e,O),n=e[O],r=!1;try{e[O]=void 0,r=!0}catch{}let i=en.call(e);return r&&(t?e[O]=n:delete e[O]),i}function on(e){return en.call(e)}var sn=20;function cn(...e){let t=e.shift(),n=new WeakMap;for(;e.length>0;)t=un(t,e.shift(),0,n);return t}function ln(e){return k(e)?e.slice():e}function un(e,t,n=0,r){let i;if(!(n>sn)){if(n++,pn(e)||pn(t)||fn(t))i=ln(t);else if(k(e)){if(i=e.slice(),k(t))for(let e=0,n=t.length;e<n;e++)i.push(ln(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]=ln(t[r]))}}}else if(A(e))if(A(t)){if(!mn(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(pn(c))c===void 0?delete i[s]:i[s]=c;else{let a=i[s],o=c;if(dn(e,s,r)||dn(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]=un(i[s],c,n,r)}}}}else i=t;return i}}function dn(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 fn(e){return typeof e==`function`}function A(e){return!pn(e)&&!k(e)&&!fn(e)&&typeof e==`object`}function pn(e){return typeof e==`string`||typeof e==`number`||typeof e==`boolean`||e===void 0||e instanceof Date||e instanceof RegExp||e===null}function mn(e,t){return!(!tn(e)||!tn(t))}function hn(e,t){return typeof t==`string`?e===t:!!e.match(t)}function gn(e,t){if(!t)return!1;for(let n of t)if(hn(e,n))return!0;return!1}var _n=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)}},vn=class{_isCalled=!1;_deferred=new _n;_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 yn(e){return Object.prototype.hasOwnProperty.call(e,`partialSuccess`)}function bn(){return{handleResponse(e){e==null||!yn(e)||e.partialSuccess==null||Object.keys(e.partialSuccess).length===0||_.warn(`Received Partial Success response:`,JSON.stringify(e.partialSuccess))}}}var xn=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 Te(`Export failed with retryable status`)}):t({code:E.FAILED,error:new Te(`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 Sn(e,t){return new xn(e.transport,e.serializer,bn(),e.promiseHandler,t.timeout)}function Cn(e,t,n){return Sn({transport:n,serializer:t,promiseHandler:je(e)},{timeout:e.timeoutMillis})}function wn(e){return e>=48&&e<=57?e-48:e>=97&&e<=102?e-87:e-55}function Tn(e){let t=new Uint8Array(e.length/2),n=0;for(let r=0;r<e.length;r+=2){let i=wn(e.charCodeAt(r)),a=wn(e.charCodeAt(r+1));t[n++]=i<<4|a}return t}function En(e){let t=BigInt(1e9);return BigInt(e[0])*t+BigInt(e[1])}function Dn(e){return{low:Number(BigInt.asUintN(32,e)),high:Number(BigInt.asUintN(32,e>>BigInt(32)))}}function On(e){return Dn(En(e))}function kn(e){return En(e).toString()}var An=typeof BigInt<`u`?kn:T;function jn(e){return e}function Mn(e){if(e!==void 0)return Tn(e)}var Nn={encodeHrTime:On,encodeSpanContext:Tn,encodeOptionalSpanContext:Mn};function Pn(e){if(e===void 0)return Nn;let t=e.useLongBits??!0,n=e.useHex??!1;return{encodeHrTime:t?On:An,encodeSpanContext:n?jn:Tn,encodeOptionalSpanContext:n?jn:Mn}}function Fn(e){let t={attributes:Ln(e.attributes),droppedAttributesCount:0},n=e.schemaUrl;return n&&n!==``&&(t.schemaUrl=n),t}function In(e){return{name:e.name,version:e.version}}function Ln(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:Ln(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?Ln(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?Ln(e.attributes):[],name:e.name,timeUnixNano:t.encodeHrTime(e.time),droppedAttributesCount:e.droppedAttributesCount||0}}function Un(e,t){return{resourceSpans:Gn(e,Pn(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:In(e[0].instrumentationScope),spans:n,schemaUrl:e[0].instrumentationScope.schemaUrl})}c=s.next()}let l=Fn(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 Cn(e,t,er({transport:ir(e)}))}function ur(e,t){return Cn(e,t,er({transport:cr(e)}))}function dr(e,t){return Cn(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-Ci1NQTFf.js`).then(t=>e(t.default)),__vite__mapDeps([0,1]),import.meta.url);return new i(n)}}function gr(e,t,n){return{...Oe(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{...ke(),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:De(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 we{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:{},j=Symbol.for(`io.opentelemetry.js.api.logs`),M=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 M[j]?this.getLoggerProvider():(M[j]=Or(1,e,wr),this._proxyLoggerProvider._setDelegate(e),e)}getLoggerProvider(){return M[j]?.call(M,1)??this._proxyLoggerProvider}getLogger(e,t,n){return this.getLoggerProvider().getLogger(e,t,n)}disable(){delete M[j],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||f.getTracerProvider(),n=e.meterProvider||Ce.getMeterProvider(),r=e.loggerProvider||kr.getLoggerProvider(),i=e.instrumentations?.flat()??[];return Ar(i,t,n,r),()=>{jr(i)}}var N=console.error.bind(console);function P(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]){N(`no original function `+String(t)+` to wrap`);return}if(!n){N(`no wrapper function`),N(Error().stack);return}let r=e[t];if(typeof r!=`function`||typeof n!=`function`){N(`original object and wrapper must be functions`);return}let i=n(r,t);return P(i,`__original`,r),P(i,`__unwrap`,()=>{e[t]===i&&P(e,t,r)}),P(i,`__wrapped`,!0),P(e,t,i),i},Pr=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{N(`must provide one or more modules to patch`),N(Error().stack);return}if(!(t&&Array.isArray(t))){N(`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]){N(`no function to unwrap.`),N(Error().stack);return}let n=e[t];if(!n.__unwrap)N(`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{N(`must provide one or more modules to patch`),N(Error().stack);return}if(!(t&&Array.isArray(t))){N(`must provide one or more functions to unwrap on modules`);return}e.forEach(e=>{t.forEach(t=>{Fr(e,t)})})};function F(e){e&&e.logger&&(typeof e.logger==`function`?N=e.logger:N(`new logger isn't a function, not replacing`))}F.wrap=Nr,F.massWrap=Pr,F.unwrap=Fr,F.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=f.getTracer(e,t),this._meter=Ce.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 I(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 L(e){return typeof e==`function`&&typeof e.__original==`function`&&typeof e.__unwrap==`function`&&e.__wrapped===!0}var R;(function(e){e[e.STABLE=1]=`STABLE`,e[e.OLD=2]=`OLD`,e[e.DUPLICATE=3]=`DUPLICATE`})(R||={});function zr(e,t){let n=R.OLD,r=t?.split(`,`).map(e=>e.trim()).filter(e=>e!==``);for(let t of r??[])if(t.toLowerCase()===e+`/dup`){n=R.DUPLICATE;break}else t.toLowerCase()===e&&(n=R.STABLE);return n}var z;function Br(){if(z===void 0)try{let e=globalThis.process.argv0;z=e?`unknown_service:${e}`:`unknown_service`}catch{z=`unknown_service`}return z}var B=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])=>B(t)).length>0,r}constructor(e,t){let n=e.attributes??{};this._rawAttributes=Object.entries(n).map(([e,t])=>(B(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,B(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(B(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({[ft]:Br(),[mt]:bt[mt],[gt]:bt[gt],[_t]:bt[_t]})}function Wr(e){return e.map(([e,t])=>B(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:c.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(!Ue(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++),Tt(t)&&(Tt(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===c.UNSET||this.status.code===c.OK)return this;let t={code:e.code};return e.code===c.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=Ct(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(wt(e))return e;if(this._startTimeProvided)return S(Date.now());let t=b.now()-this._performanceStartTime;return Et(this.startTime,S(t))}isRecording(){return this._ended===!1}recordException(e,t){let n={};typeof e==`string`?n[it]=e:e&&(e.code?n[ot]=e.code.toString():e.name&&(n[ot]=e.name),e.message&&(n[it]=e.message),e.stack&&(n[at]=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)}},V;(function(e){e[e.NOT_RECORD=0]=`NOT_RECORD`,e[e.RECORD=1]=`RECORD`,e[e.RECORD_AND_SAMPLED=2]=`RECORD_AND_SAMPLED`})(V||={});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===V.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 V.RECORD_AND_SAMPLED:return`RECORD_AND_SAMPLE`;case V.RECORD:return`RECORD_ONLY`;case V.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=f.deleteSpan(r));let i=f.getSpan(r);if(Pe(r))return _.debug(`Instrumentation suppressed, returning Noop Span`),f.wrapSpanContext(n);let a=i?.spanContext(),o=this._idGenerator.generateSpanId(),s,c,u;!a||!f.isSpanContextValid(a)?c=this._idGenerator.generateTraceId():(c=a.traceId,u=a.traceState,s=a);let d=t.kind??be.INTERNAL,p=(t.links??[]).map(e=>({context:e.context,attributes:v(e.attributes)})),ee=v(t.attributes),m=this._sampler.shouldSample(r,c,e,d,ee,p),te=this._tracerMetrics.startSpan(a,m.decision);u=m.traceState??u;let g=m.decision===ye.RECORD_AND_SAMPLED?l.SAMPLED:l.NONE,ne={traceId:c,spanId:o,traceFlags:g,traceState:u};if(m.decision===ye.NOT_RECORD)return _.debug(`Recording is off, propagating context in a non-recording span`),f.wrapSpanContext(ne);let re=v(Object.assign(ee,m.attributes));return new Zr({resource:this._resource,scope:this.instrumentationScope,context:r,spanContext:ne,name:e,kind:d,links:p,parentSpanContext:s,attributes:re,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=f.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)})}},H=class{shouldSample(){return{decision:V.NOT_RECORD}}toString(){return`AlwaysOffSampler`}},U=class{shouldSample(){return{decision:V.RECORD_AND_SAMPLED}}toString(){return`AlwaysOnSampler`}},W=class{_root;_remoteParentSampled;_remoteParentNotSampled;_localParentSampled;_localParentNotSampled;constructor(e){this._root=e.root,this._root||=(y(Error(`ParentBasedSampler must have a root sampler configured`)),new U),this._remoteParentSampled=e.remoteParentSampled??new U,this._remoteParentNotSampled=e.remoteParentNotSampled??new H,this._localParentSampled=e.localParentSampled??new U,this._localParentNotSampled=e.localParentNotSampled??new H}shouldSample(e,t,n,r,i,a){let o=f.getSpanContext(e);return!o||!d(o)?this._root.shouldSample(e,t,n,r,i,a):o.isRemote?o.traceFlags&l.SAMPLED?this._remoteParentSampled.shouldSample(e,t,n,r,i,a):this._remoteParentNotSampled.shouldSample(e,t,n,r,i,a):o.traceFlags&l.SAMPLED?this._localParentSampled.shouldSample(e,t,n,r,i,a):this._localParentNotSampled.shouldSample(e,t,n,r,i,a)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}},mi=new Map,hi=class{processedSpans;queueSize;queueSizeCallback;standardAttrs;droppedAttrs;constructor(e,t,n){let r=mi.get(e)??0;if(mi.set(e,r+1),this.standardAttrs={[$r]:e,[Qr]:`${e}/${r}`},this.droppedAttrs={...this.standardAttrs,[rt]:`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,[rt]:t.name};this.processedSpans.add(e,n)}shutdown(){this.queueSize&&this.queueSizeCallback&&this.queueSize.removeCallback(this.queueSizeCallback)}},gi=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 vn(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 hi(si,e.selfObsMeterProvider?e.selfObsMeterProvider.getMeter(`@opentelemetry/sdk-trace`):ve(),{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&l.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(Ne(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)}},_i=class extends gi{_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))}},vi=16,yi=8,bi=new Uint8Array(vi),xi=new Uint8Array(yi),Si=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,`0`));function Ci(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 wi(e){let t=``;for(let n=0;n<e.length;n++)t+=Si[e[n]];return t}var Ti=class{generateTraceId(){return Ci(bi),wi(bi)}generateSpanId(){return Ci(xi),wi(xi)}},G;(function(e){e[e.resolved=0]=`resolved`,e[e.timeout=1]=`timeout`,e[e.error=2]=`error`,e[e.unresolved=3]=`unresolved`})(G||={});var Ei=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 W({root:new U}),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 Ti,spanProcessor:this._activeSpanProcessor,meterProvider:e.meterProvider??{getMeter(){return ve()}}}}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=G.timeout},e);t.forceFlush().then(()=>{clearTimeout(i),r!==G.timeout&&(r=G.resolved,n(r))}).catch(e=>{clearTimeout(i),r=G.error,n(e)})}));return new Promise((e,n)=>{Promise.all(t).then(t=>{let r=t.filter(e=>e!==G.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)}},Di=class{_ratio;_upperBound;constructor(e=0){this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*4294967295)}shouldSample(e,t){return{decision:o(t)&&this._accumulate(t)<this._upperBound?V.RECORD_AND_SAMPLED:V.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}},K;(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`})(K||={});var Oi=1;function ki(){return{sampler:Ai(),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:1/0,attributeCountLimit:128},spanLimits:{attributeValueLengthLimit:1/0,attributeCountLimit:128,linkCountLimit:128,eventCountLimit:128,attributePerEventCountLimit:128,attributePerLinkCountLimit:128}}}function Ai(){let e=K.ParentBasedAlwaysOn;switch(e){case K.AlwaysOn:return new U;case K.AlwaysOff:return new H;case K.ParentBasedAlwaysOn:return new W({root:new U});case K.ParentBasedAlwaysOff:return new W({root:new H});case K.TraceIdRatio:return new Di(ji());case K.ParentBasedTraceIdRatio:return new W({root:new Di(ji())});default:return _.error(`OTEL_TRACES_SAMPLER value "${e}" invalid, defaulting to "${K.ParentBasedAlwaysOn}".`),new W({root:new U})}}function ji(){return _.error(`OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${Oi}.`),Oi}function Mi(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 Ni=class extends Ei{constructor(e={}){let t=cn({},ki(),Mi(e));delete t.generalLimits,super(t)}},Pi=class extends _i{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})}},Fi=class{_enabled=!1;_currentContext=r;_bindFunction(e=r,t){let n=this,i=function(...r){return n.with(e,()=>t.apply(this,r))};return Object.defineProperty(i,`length`,{enumerable:!1,configurable:!0,writable:!1,value:t.length}),i}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=r,this._enabled=!1,this}enable(){return this._enabled?this:(this._enabled=!0,this._currentContext=r,this)}with(e,t,n,...i){let a=this._currentContext;this._currentContext=e||r;try{return t.call(n,...i)}finally{this._currentContext=a}}};function Ii(e){if(e!==null){if(e===void 0){let e=new Fi;e.enable(),h.setGlobalContextManager(e);return}e.enable(),h.setGlobalContextManager(e)}}function Li(e){if(e!==null){if(e===void 0){m.setGlobalPropagator(new Dt({propagators:[new Gt,new Ve]}));return}m.setGlobalPropagator(e)}}var Ri=class extends Ni{constructor(e={}){super(e)}register(e={}){f.setGlobalTracerProvider(this),Li(e.propagator),Ii(e.contextManager)}},q;(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`})(q||={});var zi=`http.response_content_length`,Bi=`http.response_content_length_uncompressed`;function J(e,t){return t in e}function Y(e,t,n,r=!0){if(J(n,t)&&typeof n[t]==`number`&&!(r&&n[t]===0))return e.addEvent(t,n[t])}function Vi(e,t,n=!1,r,i){if(r===void 0&&(r=t[q.START_TIME]!==0),n||(Y(e,q.FETCH_START,t,r),Y(e,q.DOMAIN_LOOKUP_START,t,r),Y(e,q.DOMAIN_LOOKUP_END,t,r),Y(e,q.CONNECT_START,t,r),Y(e,q.SECURE_CONNECTION_START,t,r),Y(e,q.CONNECT_END,t,r),Y(e,q.REQUEST_START,t,r),Y(e,q.RESPONSE_START,t,r),Y(e,q.RESPONSE_END,t,r)),!i){let n=t[q.ENCODED_BODY_SIZE];n!==void 0&&e.setAttribute(zi,n);let r=t[q.DECODED_BODY_SIZE];r!==void 0&&n!==r&&e.setAttribute(Bi,r)}}function Hi(e,t){if(e.nodeType===Node.DOCUMENT_NODE)return`/`;let n=Wi(e,t);if(t&&n.indexOf(`@id`)>0)return n;let r=``;return e.parentNode&&(r+=Hi(e.parentNode,t)),r+=n,r}function Ui(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 Wi(e,t){let n=e.nodeType,r=Ui(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 X;(function(e){e.DOCUMENT_LOAD=`documentLoad`,e.DOCUMENT_FETCH=`documentFetch`,e.RESOURCE_FETCH=`resourceFetch`})(X||={});var Gi=`0.49.0`,Ki=`@opentelemetry/instrumentation-document-load`,qi;(function(e){e.FIRST_PAINT=`firstPaint`,e.FIRST_CONTENTFUL_PAINT=`firstContentfulPaint`})(qi||={});var Ji=()=>{let e={},t=b.getEntriesByType?.(`navigation`)[0];if(t)Object.values(q).forEach(n=>{if(J(t,n)){let r=t[n];typeof r==`number`&&(e[n]=r)}});else{let t=b.timing;t&&Object.values(q).forEach(n=>{if(J(t,n)){let r=t[n];typeof r==`number`&&(e[n]=r)}})}return e},Yi={"first-paint":qi.FIRST_PAINT,"first-contentful-paint":qi.FIRST_CONTENTFUL_PAINT},Xi=e=>{let t=b.getEntriesByType?.(`paint`);t&&t.forEach(({name:t,startTime:n})=>{J(Yi,t)&&e.addEvent(Yi[t],n)})},Zi=class extends Rr{component=`document-load`;version=`1`;moduleName=this.component;constructor(e={}){super(Ki,Gi,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=Ji(),n=e&&e.content||``;h.with(m.extract(r,{traceparent:n}),()=>{let e=this._startSpan(X.DOCUMENT_LOAD,q.FETCH_START,t);e&&(h.with(f.setSpan(h.active(),e),()=>{let e=this._startSpan(X.DOCUMENT_FETCH,q.FETCH_START,t);e&&(e.setAttribute(et,location.href),h.with(f.setSpan(h.active(),e),()=>{Vi(e,t,this.getConfig().ignoreNetworkEvents),this._addCustomAttributesOnSpan(e,this.getConfig().applyCustomAttributesOnSpan?.documentFetch),this._endSpan(e,q.RESPONSE_END,t)}))}),e.setAttribute(et,location.href),e.setAttribute(tt,navigator.userAgent),this._addResourcesSpans(e),this.getConfig().ignoreNetworkEvents||(Y(e,q.FETCH_START,t),Y(e,q.UNLOAD_EVENT_START,t),Y(e,q.UNLOAD_EVENT_END,t),Y(e,q.DOM_INTERACTIVE,t),Y(e,q.DOM_CONTENT_LOADED_EVENT_START,t),Y(e,q.DOM_CONTENT_LOADED_EVENT_END,t),Y(e,q.DOM_COMPLETE,t),Y(e,q.LOAD_EVENT_START,t),Y(e,q.LOAD_EVENT_END,t)),this.getConfig().ignorePerformancePaintEvents||Xi(e),this._addCustomAttributesOnSpan(e,this.getConfig().applyCustomAttributesOnSpan?.documentLoad),this._endSpan(e,q.LOAD_EVENT_END,t))})}_endSpan(e,t,n){e&&(J(n,t)?e.end(n[t]):e.end())}_initResourceSpan(e,t){let n=this._startSpan(X.RESOURCE_FETCH,q.FETCH_START,e,t);n&&(n.setAttribute(et,e.name),Vi(n,e,this.getConfig().ignoreNetworkEvents),this._addCustomAttributesOnResourceSpan(n,e,this.getConfig().applyCustomAttributesOnSpan?.resourceFetch),this._endSpan(n,q.RESPONSE_END,e))}_startSpan(e,t,n,r){if(J(n,t)&&typeof n[t]==`number`)return this.tracer.startSpan(e,{startTime:n[t]},r?f.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&&I(()=>t(e),e=>{e&&this._diag.error(`addCustomAttributesOnSpan`,e)},!0)}_addCustomAttributesOnResourceSpan(e,t,n){n&&I(()=>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 Qi=`http.response_content_length`,$i=`http.response_content_length_uncompressed`,ea;function ta(){return ea||=document.createElement(`a`),ea}function na(e,t){return t in e}function Q(e,t,n,r=!0){if(na(n,t)&&typeof n[t]==`number`&&!(r&&n[t]===0))return e.addEvent(t,n[t])}function ra(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(Qi,n);let r=t[Z.DECODED_BODY_SIZE];r!==void 0&&n!==r&&e.setAttribute($i,r)}}function ia(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 aa(){return typeof location<`u`?location.origin:void 0}function oa(e,t,n,r,i=new WeakSet,a){let o=la(e);e=o.toString();let s=ca(e,t,n,r,i,a);if(s.length===0)return{mainRequest:void 0};if(s.length===1)return{mainRequest:s[0]};let c=ia(s);if(o.origin!==aa()&&c.length>1){let e=c[0],t=sa(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 sa(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 ca(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 la(e){if(typeof URL==`function`)return new URL(e,typeof document<`u`?document.baseURI:typeof location<`u`?location.href:void 0);let t=ta();return t.href=e,t}function ua(e,t){let n=t||[];return(typeof n==`string`||n instanceof RegExp)&&(n=[n]),la(e).origin===aa()?!0:n.some(t=>hn(e,t))}var da;(function(e){e.COMPONENT=`component`,e.HTTP_STATUS_TEXT=`http.status_text`})(da||={});var fa=`http.host`,pa=`http.method`,ma=`http.request.body.size`,ha=`http.request_content_length_uncompressed`,ga=`http.scheme`,_a=`http.status_code`,va=`http.url`,ya=`http.user_agent`,ba=_.createComponentLogger({namespace:`@opentelemetry/opentelemetry-instrumentation-fetch/utils`});function xa(...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}=Sa(t.body);return t.body=e,n}else return Promise.resolve(wa(t.body))}else{let t=e[0];return t?.body?t.clone().text().then(e=>Ea(e)):Promise.resolve()}}function Sa(e){if(!e.pipeThrough)return ba.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 Ca(e){return typeof Document<`u`&&e instanceof Document}function wa(e){if(Ca(e))return new XMLSerializer().serializeToString(document).length;if(typeof e==`string`)return Ea(e);if(e instanceof Blob)return e.size;if(e instanceof FormData)return Da(e);if(e instanceof URLSearchParams)return Ea(e.toString());if(e.byteLength!==void 0)return e.byteLength;ba.warn(`unknown body type`)}var Ta=new TextEncoder;function Ea(e){return Ta.encode(e).byteLength}function Da(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 Oa(e){let t=ja(),n=e.toUpperCase();return n in t?n:`_OTHER`}var ka={CONNECT:!0,DELETE:!0,GET:!0,HEAD:!0,OPTIONS:!0,PATCH:!0,POST:!0,PUT:!0,TRACE:!0},Aa;function ja(){return Aa===void 0&&(Aa=ka),Aa}var Ma={"https:":`443`,"http:":`80`};function Na(e){let t=Number(e.port||Ma[e.protocol]);if(t&&!isNaN(t))return t}var Pa=`0.204.0`,Fa=300,Ia=typeof process==`object`&&process.release?.name===`node`,La=class extends Rr{component=`fetch`;version=Pa;moduleName=this.component;_usedResources=new WeakSet;_tasksCount=0;_semconvStability;constructor(e={}){super(`@opentelemetry/instrumentation-fetch`,Pa,e),this._semconvStability=zr(`http`,e?.semconvStabilityOptIn)}init(){}_addChildSpan(e,t){let n=this.tracer.startSpan(`CORS Preflight`,{startTime:t[Z.FETCH_START]},f.setSpan(h.active(),e)),r=!(this._semconvStability&R.OLD);ra(n,t,this.getConfig().ignoreNetworkEvents,void 0,r),n.end(t[Z.RESPONSE_END])}_addFinalSpanAttributes(e,t){let n=la(t.url);if(this._semconvStability&R.OLD&&(e.setAttribute(_a,t.status),t.statusText!=null&&e.setAttribute(da.HTTP_STATUS_TEXT,t.statusText),e.setAttribute(fa,n.host),e.setAttribute(ga,n.protocol.replace(`:`,``)),typeof navigator<`u`&&e.setAttribute(ya,navigator.userAgent)),this._semconvStability&R.STABLE){e.setAttribute(lt,t.status),e.setAttribute(ut,n.hostname);let r=Na(n);r&&e.setAttribute(dt,r)}}_addHeaders(e,t){if(!ua(t,this.getConfig().propagateTraceHeaderCorsUrls)){let e={};m.inject(h.active(),e),Object.keys(e).length>0&&this._diag.debug(`headers inject skipped due to CORS policy`);return}if(e instanceof Request)m.inject(h.active(),e.headers,{set:(e,t,n)=>e.set(t,typeof n==`string`?n:String(n))});else if(e.headers instanceof Headers)m.inject(h.active(),e.headers,{set:(e,t,n)=>e.set(t,typeof n==`string`?n:String(n))});else if(e.headers instanceof Map)m.inject(h.active(),e.headers,{set:(e,t,n)=>e.set(t,typeof n==`string`?n:String(n))});else{let t={};m.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(gn(e,this.getConfig().ignoreUrls)){this._diag.debug(`ignoring span as url matches ignored url`);return}let n=``,r={};if(this._semconvStability&R.OLD){let i=(t.method||`GET`).toUpperCase();n=`HTTP ${i}`,r[da.COMPONENT]=this.moduleName,r[pa]=i,r[va]=e}if(this._semconvStability&R.STABLE){let i=t.method,a=Oa(t.method||`GET`);n||=a,r[st]=a,a!==i&&(r[ct]=i),r[vt]=e}return this.tracer.startSpan(n,{kind:be.CLIENT,attributes:r})}_findResourceAndAddNetworkEvents(e,t,n){let r=t.entries;if(!r.length){if(!performance.getEntriesByType)return;r=performance.getEntriesByType(`resource`)}let i=oa(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&R.OLD);ra(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&R.STABLE&&n.status>=400&&(e.setStatus({code:c.ERROR}),e.setAttribute(rt,String(n.status))),setTimeout(()=>{t.observer?.disconnect(),this._findResourceAndAddNetworkEvents(e,t,i),this._tasksCount--,this._clearResources(),e.end(r)},Fa)}_patchConstructor(){return e=>{let t=this;return function(...n){let r=this,i=la(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&&xa(...n).then(e=>{e&&(t._semconvStability&R.OLD&&o.setAttribute(ha,e),t._semconvStability&R.STABLE&&o.setAttribute(ma,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 d(e,t,n){try{c(e,n)}finally{t(n)}}return new Promise((n,s)=>h.with(f.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),d.bind(r,o,s)))))}}}_applyAttributesAfterFetch(e,t,n){let r=this.getConfig().applyCustomAttributesOnSpan;r&&I(()=>r(e,t,n),e=>{e&&this._diag.error(`applyCustomAttributesOnSpan`,e)},!0)}_callRequestHook(e,t){let n=this.getConfig().requestHook;n&&I(()=>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(Ia){this._diag.warn(`this instrumentation is intended for web usage only, it does not instrument Node.js's fetch()`);return}L(fetch)&&(this._unwrap(Xe,`fetch`),this._diag.debug(`removing previous patch for constructor`)),this._wrap(Xe,`fetch`,this._patchConstructor())}disable(){Ia||(this._unwrap(Xe,`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 Ra=`0.49.0`,za=`@opentelemetry/instrumentation-user-interaction`,Ba=`OT_ZONE_CONTEXT`,Va=`Navigation:`,Ha=[`click`];function Ua(){return!1}var Wa=class extends Rr{version=Ra;moduleName=`user-interaction`;_spansData=new WeakMap;_wrappedListeners=new WeakMap;_eventsSpanMap=new WeakMap;_eventNames;_shouldPreventSpanCreation;constructor(e={}){super(za,Ra,e),this._eventNames=new Set(e?.eventNames??Ha),this._shouldPreventSpanCreation=typeof e?.shouldPreventSpanCreation==`function`?e.shouldPreventSpanCreation:Ua}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=Hi(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?f.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(Ba);return t&&f.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(f.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(){L(history.replaceState)&&this._unwrap(history,`replaceState`),L(history.pushState)&&this._unwrap(history,`pushState`),L(history.back)&&this._unwrap(history,`back`),L(history.forward)&&this._unwrap(history,`forward`),L(history.go)&&this._unwrap(history,`go`)}_updateInteractionName(e){let t=f.getSpan(h.active());t&&typeof t.updateName==`function`&&t.updateName(`${Va} ${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(f.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?(L(e.prototype.runTask)&&(this._unwrap(e.prototype,`runTask`),this._diag.debug(`removing previous patch from method runTask`)),L(e.prototype.scheduleTask)&&(this._unwrap(e.prototype,`scheduleTask`),this._diag.debug(`removing previous patch from method scheduleTask`)),L(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=>{L(e.addEventListener)&&(this._unwrap(e,`addEventListener`),this._diag.debug(`removing previous patch from method addEventListener`)),L(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?(L(e.prototype.runTask)&&this._unwrap(e.prototype,`runTask`),L(e.prototype.scheduleTask)&&this._unwrap(e.prototype,`scheduleTask`),L(e.prototype.cancelTask)&&this._unwrap(e.prototype,`cancelTask`)):this._getPatchableEventTargets().forEach(e=>{L(e.addEventListener)&&this._unwrap(e,`addEventListener`),L(e.removeEventListener)&&this._unwrap(e,`removeEventListener`)}),this._unpatchHistoryApi()}_getZoneWithPrototype(){return window.Zone}},Ga=`open-knowledge-app`,Ka=!1;function qa(){return{BASE_URL:`./`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_APP_VERSION:`0.63.8`}?.VITE_OTEL_COLLECTOR_URL??`http://localhost:14318`}function Ja(){if(Ka)return;Ka=!0;let e=null,t=!1;try{let n=qa(),r={BASE_URL:`./`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_APP_VERSION:`0.63.8`};e=new Ri({resource:Hr({[ft]:`open-knowledge-app`,[pt]:r?.VITE_APP_VERSION??`dev`,[nt]:r?.MODE??`dev`}),spanProcessors:[new Pi(new xr({url:`${n}/v1/traces`}),{maxExportBatchSize:50,scheduledDelayMillis:2e3})]}),e.register(),t=!0,Mr({instrumentations:[new Zi,new Wa({eventNames:[`click`,`submit`]}),new La({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(()=>{}),Ka=!1}}function Ya(){return f.getTracer(Ga)}export{Ya as getAppTracer,Ja 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,o as l,p as u,r as d,t as f,u as p}from"./trace-api-BslS_6CM.js";import{n as ee,t as m}from"./propagation-api-B1_qxPZb.js";import{t as h}from"./context-api-CW3A_QP4.js";var te=class{constructor(){}createGauge(e,t){return fe}createHistogram(e,t){return pe}createCounter(e,t){return de}createUpDownCounter(e,t){return me}createObservableGauge(e,t){return ge}createObservableCounter(e,t){return he}createObservableUpDownCounter(e,t){return _e}addBatchObservableCallback(e,t){}removeBatchObservableCallback(e){}},g=class{},ne=class extends g{add(e,t){}},re=class extends g{add(e,t){}},ie=class extends g{record(e,t){}},ae=class extends g{record(e,t){}},oe=class{addCallback(e){}removeCallback(e){}},se=class extends oe{},ce=class extends oe{},le=class extends oe{},ue=new te,de=new ne,fe=new ie,pe=new ae,me=new re,he=new se,ge=new ce,_e=new le;function ve(){return ue}var ye;(function(e){e[e.NOT_RECORD=0]=`NOT_RECORD`,e[e.RECORD=1]=`RECORD`,e[e.RECORD_AND_SAMPLED=2]=`RECORD_AND_SAMPLED`})(ye||={});var be;(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`})(be||={});var _=p.instance(),xe=new class{getMeter(e,t,n){return ue}},Se=`metrics`,Ce=class e{constructor(){}static getInstance(){return this._instance||=new e,this._instance}setGlobalMeterProvider(e){return a(Se,e,p.instance())}getMeterProvider(){return i(Se)||xe}getMeter(e,t,n){return this.getMeterProvider().getMeter(e,t,n)}disable(){u(Se,p.instance())}}.getInstance(),we=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()}},Te=class extends Error{code;name=`OTLPExporterError`;data;constructor(e,t,n){super(e),this.data=n,this.code=t}};function Ee(e){if(Number.isFinite(e)&&e>0)return e;throw Error(`Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '${e}')`)}function De(e){if(e!=null)return()=>e}function Oe(e,t,n){return{timeoutMillis:Ee(e.timeoutMillis??t.timeoutMillis??n.timeoutMillis),concurrencyLimit:e.concurrencyLimit??t.concurrencyLimit??n.concurrencyLimit,compression:e.compression??t.compression??n.compression}}function ke(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:`none`}}var Ae=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 je(e){return new Ae(e.concurrencyLimit)}var Me=s(`OpenTelemetry SDK Context Key SUPPRESS_TRACING`);function Ne(e){return e.setValue(Me,!0)}function Pe(e){return e.getValue(Me)===!0}var Fe=`baggage`,Ie=4096;function Le(e){return e.reduce((e,t)=>{let n=`${e}${e===``?``:`,`}${t}`;return n.length>8192?e:n},``)}function Re(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 ze(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 Be(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=ze(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 Ve=class{inject(e,t,n){let r=m.getBaggage(e);if(!r||Pe(e))return;let i=Le(Re(r).filter(e=>e.length<=Ie).slice(0,180));i.length>0&&n.set(t,Fe,i)}extract(e,t,n){let r=n.get(t,Fe);if(!r)return e;let i={},a=0,o=0;if(Array.isArray(r))for(let e=0;e<r.length;e++)[a,o]=Be(r[e],i,a,o);else [a]=Be(r,i,a,o);return a===0?e:m.setBaggage(e,m.createBaggage(i))}fields(){return[Fe]}};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(!He(n)){_.warn(`Invalid attribute key: ${n}`);continue}let r=e[n];if(!Ue(r)){_.warn(`Invalid attribute value set for key: ${n}`);continue}Array.isArray(r)?t[n]=r.slice():t[n]=r}return t}function He(e){return typeof e==`string`&&e!==``}function Ue(e){return e==null?!0:Array.isArray(e)?We(e):Ge(typeof e)}function We(e){let t;for(let n of e){if(n==null)continue;let e=typeof n;if(e!==t){if(!t){if(Ge(e)){t=e;continue}return!1}return!1}}return!0}function Ge(e){switch(e){case`number`:case`boolean`:case`string`:return!0}return!1}function Ke(){return e=>{_.error(qe(e))}}function qe(e){return typeof e==`string`?e:JSON.stringify(Je(e))}function Je(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 Ye=Ke();function y(e){try{Ye(e)}catch{}}var Xe=globalThis,Ze=`2.8.0`,Qe=`http.url`,$e=`http.user_agent`,et=Qe,tt=$e,nt=`deployment.environment.name`,rt=`error.type`,it=`exception.message`,at=`exception.stacktrace`,ot=`exception.type`,st=`http.request.method`,ct=`http.request.method_original`,lt=`http.response.status_code`,ut=`server.address`,dt=`server.port`,ft=`service.name`,pt=`service.version`,mt=`telemetry.sdk.language`,ht=`webjs`,gt=`telemetry.sdk.name`,_t=`telemetry.sdk.version`,vt=`url.full`,yt=`process.runtime.name`,bt={[gt]:`opentelemetry`,[yt]:`browser`,[mt]:ht,[_t]:Ze},b=performance,xt=9,St=10**6,x=10**xt;function S(e){let t=e/1e3;return[Math.trunc(t),Math.round(e%1e3*St)]}function C(e){return Et(S(b.timeOrigin),S(typeof e==`number`?e:b.now()))}function w(e){if(wt(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 Ct(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 wt(e){return Array.isArray(e)&&e.length===2&&typeof e[0]==`number`&&typeof e[1]==`number`}function Tt(e){return wt(e)||typeof e==`number`||e instanceof Date}function Et(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 Dt=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()}},Ot=`[_0-9a-z-*/]`,kt=`[a-z]${Ot}{0,255}`,At=`[a-z0-9]${Ot}{0,240}@[a-z]${Ot}{0,13}`,jt=RegExp(`^(?:${kt}|${At})$`),Mt=/^[ -~]{0,255}[!-~]$/,Nt=/,|=/;function Pt(e){return jt.test(e)}function Ft(e){return Mt.test(e)&&!Nt.test(e)}var It=32,Lt=512,Rt=`,`,zt=`=`,Bt=class e{_length;_rawTraceState;_internalState;constructor(e){this._rawTraceState=typeof e==`string`?e:``,this._length=this._rawTraceState.length}set(e,t){if(!Pt(e)||!Ft(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>Lt)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=Rt+e),e=`${n[0]}${zt}${n[1]}`+e,t++;return e}_getState(){if(this._internalState)return this._internalState;let e=this._rawTraceState.split(Rt),t=new Map,n=0;for(let r of e){let e=r.trim(),i=e.indexOf(zt);if(i===-1)continue;let a=e.slice(0,i),o=e.slice(i+1);if(!Pt(a)||!Ft(o))continue;let s=n+e.length+ +(t.size>0);if(!(s>Lt)&&(t.set(a,o),n=s,t.size>=It))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`,Vt=`tracestate`,Ht=`00`,Ut=RegExp(`^\\s?((?!ff)[\\da-f]{2})-((?![0]{32})[\\da-f]{32})-((?![0]{16})[\\da-f]{16})-([\\da-f]{2})(-.*)?\\s?$`);function Wt(e){let t=Ut.exec(e);return!t||t[1]===`00`&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}var Gt=class{inject(e,t,n){let r=f.getSpanContext(e);if(!r||Pe(e)||!d(r))return;let i=`${Ht}-${r.traceId}-${r.spanId}-0${Number(r.traceFlags||l.NONE).toString(16)}`;n.set(t,D,i),r.traceState&&n.set(t,Vt,r.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=Wt(i);if(!a)return e;a.isRemote=!0;let o=n.get(t,Vt);if(o){let e=Array.isArray(o)?o.join(`,`):o;a.traceState=new Bt(typeof e==`string`?e:void 0)}return f.setSpanContext(e,a)}fields(){return[D,Vt]}},Kt=`[object Object]`,qt=`[object Null]`,Jt=`[object Undefined]`,Yt=Function.prototype.toString,Xt=Yt.call(Object),Zt=Object.getPrototypeOf,Qt=Object.prototype,$t=Qt.hasOwnProperty,O=Symbol?Symbol.toStringTag:void 0,en=Qt.toString;function tn(e){if(!nn(e)||rn(e)!==Kt)return!1;let t=Zt(e);if(t===null)return!0;let n=$t.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&Yt.call(n)===Xt}function nn(e){return typeof e==`object`&&!!e}function rn(e){return e==null?e===void 0?Jt:qt:O&&O in Object(e)?an(e):on(e)}function an(e){let t=$t.call(e,O),n=e[O],r=!1;try{e[O]=void 0,r=!0}catch{}let i=en.call(e);return r&&(t?e[O]=n:delete e[O]),i}function on(e){return en.call(e)}var sn=20;function cn(...e){let t=e.shift(),n=new WeakMap;for(;e.length>0;)t=un(t,e.shift(),0,n);return t}function ln(e){return k(e)?e.slice():e}function un(e,t,n=0,r){let i;if(!(n>sn)){if(n++,pn(e)||pn(t)||fn(t))i=ln(t);else if(k(e)){if(i=e.slice(),k(t))for(let e=0,n=t.length;e<n;e++)i.push(ln(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]=ln(t[r]))}}}else if(A(e))if(A(t)){if(!mn(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(pn(c))c===void 0?delete i[s]:i[s]=c;else{let a=i[s],o=c;if(dn(e,s,r)||dn(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]=un(i[s],c,n,r)}}}}else i=t;return i}}function dn(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 fn(e){return typeof e==`function`}function A(e){return!pn(e)&&!k(e)&&!fn(e)&&typeof e==`object`}function pn(e){return typeof e==`string`||typeof e==`number`||typeof e==`boolean`||e===void 0||e instanceof Date||e instanceof RegExp||e===null}function mn(e,t){return!(!tn(e)||!tn(t))}function hn(e,t){return typeof t==`string`?e===t:!!e.match(t)}function gn(e,t){if(!t)return!1;for(let n of t)if(hn(e,n))return!0;return!1}var _n=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)}},vn=class{_isCalled=!1;_deferred=new _n;_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 yn(e){return Object.prototype.hasOwnProperty.call(e,`partialSuccess`)}function bn(){return{handleResponse(e){e==null||!yn(e)||e.partialSuccess==null||Object.keys(e.partialSuccess).length===0||_.warn(`Received Partial Success response:`,JSON.stringify(e.partialSuccess))}}}var xn=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 Te(`Export failed with retryable status`)}):t({code:E.FAILED,error:new Te(`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 Sn(e,t){return new xn(e.transport,e.serializer,bn(),e.promiseHandler,t.timeout)}function Cn(e,t,n){return Sn({transport:n,serializer:t,promiseHandler:je(e)},{timeout:e.timeoutMillis})}function wn(e){return e>=48&&e<=57?e-48:e>=97&&e<=102?e-87:e-55}function Tn(e){let t=new Uint8Array(e.length/2),n=0;for(let r=0;r<e.length;r+=2){let i=wn(e.charCodeAt(r)),a=wn(e.charCodeAt(r+1));t[n++]=i<<4|a}return t}function En(e){let t=BigInt(1e9);return BigInt(e[0])*t+BigInt(e[1])}function Dn(e){return{low:Number(BigInt.asUintN(32,e)),high:Number(BigInt.asUintN(32,e>>BigInt(32)))}}function On(e){return Dn(En(e))}function kn(e){return En(e).toString()}var An=typeof BigInt<`u`?kn:T;function jn(e){return e}function Mn(e){if(e!==void 0)return Tn(e)}var Nn={encodeHrTime:On,encodeSpanContext:Tn,encodeOptionalSpanContext:Mn};function Pn(e){if(e===void 0)return Nn;let t=e.useLongBits??!0,n=e.useHex??!1;return{encodeHrTime:t?On:An,encodeSpanContext:n?jn:Tn,encodeOptionalSpanContext:n?jn:Mn}}function Fn(e){let t={attributes:Ln(e.attributes),droppedAttributesCount:0},n=e.schemaUrl;return n&&n!==``&&(t.schemaUrl=n),t}function In(e){return{name:e.name,version:e.version}}function Ln(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:Ln(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?Ln(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?Ln(e.attributes):[],name:e.name,timeUnixNano:t.encodeHrTime(e.time),droppedAttributesCount:e.droppedAttributesCount||0}}function Un(e,t){return{resourceSpans:Gn(e,Pn(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:In(e[0].instrumentationScope),spans:n,schemaUrl:e[0].instrumentationScope.schemaUrl})}c=s.next()}let l=Fn(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 Cn(e,t,er({transport:ir(e)}))}function ur(e,t){return Cn(e,t,er({transport:cr(e)}))}function dr(e,t){return Cn(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-Ci1NQTFf.js`).then(t=>e(t.default)),__vite__mapDeps([0,1]),import.meta.url);return new i(n)}}function gr(e,t,n){return{...Oe(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{...ke(),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:De(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 we{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:{},j=Symbol.for(`io.opentelemetry.js.api.logs`),M=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 M[j]?this.getLoggerProvider():(M[j]=Or(1,e,wr),this._proxyLoggerProvider._setDelegate(e),e)}getLoggerProvider(){return M[j]?.call(M,1)??this._proxyLoggerProvider}getLogger(e,t,n){return this.getLoggerProvider().getLogger(e,t,n)}disable(){delete M[j],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||f.getTracerProvider(),n=e.meterProvider||Ce.getMeterProvider(),r=e.loggerProvider||kr.getLoggerProvider(),i=e.instrumentations?.flat()??[];return Ar(i,t,n,r),()=>{jr(i)}}var N=console.error.bind(console);function P(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]){N(`no original function `+String(t)+` to wrap`);return}if(!n){N(`no wrapper function`),N(Error().stack);return}let r=e[t];if(typeof r!=`function`||typeof n!=`function`){N(`original object and wrapper must be functions`);return}let i=n(r,t);return P(i,`__original`,r),P(i,`__unwrap`,()=>{e[t]===i&&P(e,t,r)}),P(i,`__wrapped`,!0),P(e,t,i),i},Pr=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{N(`must provide one or more modules to patch`),N(Error().stack);return}if(!(t&&Array.isArray(t))){N(`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]){N(`no function to unwrap.`),N(Error().stack);return}let n=e[t];if(!n.__unwrap)N(`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{N(`must provide one or more modules to patch`),N(Error().stack);return}if(!(t&&Array.isArray(t))){N(`must provide one or more functions to unwrap on modules`);return}e.forEach(e=>{t.forEach(t=>{Fr(e,t)})})};function F(e){e&&e.logger&&(typeof e.logger==`function`?N=e.logger:N(`new logger isn't a function, not replacing`))}F.wrap=Nr,F.massWrap=Pr,F.unwrap=Fr,F.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=f.getTracer(e,t),this._meter=Ce.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 I(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 L(e){return typeof e==`function`&&typeof e.__original==`function`&&typeof e.__unwrap==`function`&&e.__wrapped===!0}var R;(function(e){e[e.STABLE=1]=`STABLE`,e[e.OLD=2]=`OLD`,e[e.DUPLICATE=3]=`DUPLICATE`})(R||={});function zr(e,t){let n=R.OLD,r=t?.split(`,`).map(e=>e.trim()).filter(e=>e!==``);for(let t of r??[])if(t.toLowerCase()===e+`/dup`){n=R.DUPLICATE;break}else t.toLowerCase()===e&&(n=R.STABLE);return n}var z;function Br(){if(z===void 0)try{let e=globalThis.process.argv0;z=e?`unknown_service:${e}`:`unknown_service`}catch{z=`unknown_service`}return z}var B=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])=>B(t)).length>0,r}constructor(e,t){let n=e.attributes??{};this._rawAttributes=Object.entries(n).map(([e,t])=>(B(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,B(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(B(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({[ft]:Br(),[mt]:bt[mt],[gt]:bt[gt],[_t]:bt[_t]})}function Wr(e){return e.map(([e,t])=>B(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:c.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(!Ue(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++),Tt(t)&&(Tt(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===c.UNSET||this.status.code===c.OK)return this;let t={code:e.code};return e.code===c.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=Ct(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(wt(e))return e;if(this._startTimeProvided)return S(Date.now());let t=b.now()-this._performanceStartTime;return Et(this.startTime,S(t))}isRecording(){return this._ended===!1}recordException(e,t){let n={};typeof e==`string`?n[it]=e:e&&(e.code?n[ot]=e.code.toString():e.name&&(n[ot]=e.name),e.message&&(n[it]=e.message),e.stack&&(n[at]=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)}},V;(function(e){e[e.NOT_RECORD=0]=`NOT_RECORD`,e[e.RECORD=1]=`RECORD`,e[e.RECORD_AND_SAMPLED=2]=`RECORD_AND_SAMPLED`})(V||={});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===V.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 V.RECORD_AND_SAMPLED:return`RECORD_AND_SAMPLE`;case V.RECORD:return`RECORD_ONLY`;case V.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=f.deleteSpan(r));let i=f.getSpan(r);if(Pe(r))return _.debug(`Instrumentation suppressed, returning Noop Span`),f.wrapSpanContext(n);let a=i?.spanContext(),o=this._idGenerator.generateSpanId(),s,c,u;!a||!f.isSpanContextValid(a)?c=this._idGenerator.generateTraceId():(c=a.traceId,u=a.traceState,s=a);let d=t.kind??be.INTERNAL,p=(t.links??[]).map(e=>({context:e.context,attributes:v(e.attributes)})),ee=v(t.attributes),m=this._sampler.shouldSample(r,c,e,d,ee,p),te=this._tracerMetrics.startSpan(a,m.decision);u=m.traceState??u;let g=m.decision===ye.RECORD_AND_SAMPLED?l.SAMPLED:l.NONE,ne={traceId:c,spanId:o,traceFlags:g,traceState:u};if(m.decision===ye.NOT_RECORD)return _.debug(`Recording is off, propagating context in a non-recording span`),f.wrapSpanContext(ne);let re=v(Object.assign(ee,m.attributes));return new Zr({resource:this._resource,scope:this.instrumentationScope,context:r,spanContext:ne,name:e,kind:d,links:p,parentSpanContext:s,attributes:re,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=f.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)})}},H=class{shouldSample(){return{decision:V.NOT_RECORD}}toString(){return`AlwaysOffSampler`}},U=class{shouldSample(){return{decision:V.RECORD_AND_SAMPLED}}toString(){return`AlwaysOnSampler`}},W=class{_root;_remoteParentSampled;_remoteParentNotSampled;_localParentSampled;_localParentNotSampled;constructor(e){this._root=e.root,this._root||=(y(Error(`ParentBasedSampler must have a root sampler configured`)),new U),this._remoteParentSampled=e.remoteParentSampled??new U,this._remoteParentNotSampled=e.remoteParentNotSampled??new H,this._localParentSampled=e.localParentSampled??new U,this._localParentNotSampled=e.localParentNotSampled??new H}shouldSample(e,t,n,r,i,a){let o=f.getSpanContext(e);return!o||!d(o)?this._root.shouldSample(e,t,n,r,i,a):o.isRemote?o.traceFlags&l.SAMPLED?this._remoteParentSampled.shouldSample(e,t,n,r,i,a):this._remoteParentNotSampled.shouldSample(e,t,n,r,i,a):o.traceFlags&l.SAMPLED?this._localParentSampled.shouldSample(e,t,n,r,i,a):this._localParentNotSampled.shouldSample(e,t,n,r,i,a)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}},mi=new Map,hi=class{processedSpans;queueSize;queueSizeCallback;standardAttrs;droppedAttrs;constructor(e,t,n){let r=mi.get(e)??0;if(mi.set(e,r+1),this.standardAttrs={[$r]:e,[Qr]:`${e}/${r}`},this.droppedAttrs={...this.standardAttrs,[rt]:`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,[rt]:t.name};this.processedSpans.add(e,n)}shutdown(){this.queueSize&&this.queueSizeCallback&&this.queueSize.removeCallback(this.queueSizeCallback)}},gi=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 vn(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 hi(si,e.selfObsMeterProvider?e.selfObsMeterProvider.getMeter(`@opentelemetry/sdk-trace`):ve(),{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&l.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(Ne(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)}},_i=class extends gi{_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))}},vi=16,yi=8,bi=new Uint8Array(vi),xi=new Uint8Array(yi),Si=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,`0`));function Ci(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 wi(e){let t=``;for(let n=0;n<e.length;n++)t+=Si[e[n]];return t}var Ti=class{generateTraceId(){return Ci(bi),wi(bi)}generateSpanId(){return Ci(xi),wi(xi)}},G;(function(e){e[e.resolved=0]=`resolved`,e[e.timeout=1]=`timeout`,e[e.error=2]=`error`,e[e.unresolved=3]=`unresolved`})(G||={});var Ei=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 W({root:new U}),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 Ti,spanProcessor:this._activeSpanProcessor,meterProvider:e.meterProvider??{getMeter(){return ve()}}}}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=G.timeout},e);t.forceFlush().then(()=>{clearTimeout(i),r!==G.timeout&&(r=G.resolved,n(r))}).catch(e=>{clearTimeout(i),r=G.error,n(e)})}));return new Promise((e,n)=>{Promise.all(t).then(t=>{let r=t.filter(e=>e!==G.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)}},Di=class{_ratio;_upperBound;constructor(e=0){this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*4294967295)}shouldSample(e,t){return{decision:o(t)&&this._accumulate(t)<this._upperBound?V.RECORD_AND_SAMPLED:V.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}},K;(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`})(K||={});var Oi=1;function ki(){return{sampler:Ai(),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:1/0,attributeCountLimit:128},spanLimits:{attributeValueLengthLimit:1/0,attributeCountLimit:128,linkCountLimit:128,eventCountLimit:128,attributePerEventCountLimit:128,attributePerLinkCountLimit:128}}}function Ai(){let e=K.ParentBasedAlwaysOn;switch(e){case K.AlwaysOn:return new U;case K.AlwaysOff:return new H;case K.ParentBasedAlwaysOn:return new W({root:new U});case K.ParentBasedAlwaysOff:return new W({root:new H});case K.TraceIdRatio:return new Di(ji());case K.ParentBasedTraceIdRatio:return new W({root:new Di(ji())});default:return _.error(`OTEL_TRACES_SAMPLER value "${e}" invalid, defaulting to "${K.ParentBasedAlwaysOn}".`),new W({root:new U})}}function ji(){return _.error(`OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${Oi}.`),Oi}function Mi(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 Ni=class extends Ei{constructor(e={}){let t=cn({},ki(),Mi(e));delete t.generalLimits,super(t)}},Pi=class extends _i{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})}},Fi=class{_enabled=!1;_currentContext=r;_bindFunction(e=r,t){let n=this,i=function(...r){return n.with(e,()=>t.apply(this,r))};return Object.defineProperty(i,`length`,{enumerable:!1,configurable:!0,writable:!1,value:t.length}),i}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=r,this._enabled=!1,this}enable(){return this._enabled?this:(this._enabled=!0,this._currentContext=r,this)}with(e,t,n,...i){let a=this._currentContext;this._currentContext=e||r;try{return t.call(n,...i)}finally{this._currentContext=a}}};function Ii(e){if(e!==null){if(e===void 0){let e=new Fi;e.enable(),h.setGlobalContextManager(e);return}e.enable(),h.setGlobalContextManager(e)}}function Li(e){if(e!==null){if(e===void 0){m.setGlobalPropagator(new Dt({propagators:[new Gt,new Ve]}));return}m.setGlobalPropagator(e)}}var Ri=class extends Ni{constructor(e={}){super(e)}register(e={}){f.setGlobalTracerProvider(this),Li(e.propagator),Ii(e.contextManager)}},q;(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`})(q||={});var zi=`http.response_content_length`,Bi=`http.response_content_length_uncompressed`;function J(e,t){return t in e}function Y(e,t,n,r=!0){if(J(n,t)&&typeof n[t]==`number`&&!(r&&n[t]===0))return e.addEvent(t,n[t])}function Vi(e,t,n=!1,r,i){if(r===void 0&&(r=t[q.START_TIME]!==0),n||(Y(e,q.FETCH_START,t,r),Y(e,q.DOMAIN_LOOKUP_START,t,r),Y(e,q.DOMAIN_LOOKUP_END,t,r),Y(e,q.CONNECT_START,t,r),Y(e,q.SECURE_CONNECTION_START,t,r),Y(e,q.CONNECT_END,t,r),Y(e,q.REQUEST_START,t,r),Y(e,q.RESPONSE_START,t,r),Y(e,q.RESPONSE_END,t,r)),!i){let n=t[q.ENCODED_BODY_SIZE];n!==void 0&&e.setAttribute(zi,n);let r=t[q.DECODED_BODY_SIZE];r!==void 0&&n!==r&&e.setAttribute(Bi,r)}}function Hi(e,t){if(e.nodeType===Node.DOCUMENT_NODE)return`/`;let n=Wi(e,t);if(t&&n.indexOf(`@id`)>0)return n;let r=``;return e.parentNode&&(r+=Hi(e.parentNode,t)),r+=n,r}function Ui(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 Wi(e,t){let n=e.nodeType,r=Ui(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 X;(function(e){e.DOCUMENT_LOAD=`documentLoad`,e.DOCUMENT_FETCH=`documentFetch`,e.RESOURCE_FETCH=`resourceFetch`})(X||={});var Gi=`0.49.0`,Ki=`@opentelemetry/instrumentation-document-load`,qi;(function(e){e.FIRST_PAINT=`firstPaint`,e.FIRST_CONTENTFUL_PAINT=`firstContentfulPaint`})(qi||={});var Ji=()=>{let e={},t=b.getEntriesByType?.(`navigation`)[0];if(t)Object.values(q).forEach(n=>{if(J(t,n)){let r=t[n];typeof r==`number`&&(e[n]=r)}});else{let t=b.timing;t&&Object.values(q).forEach(n=>{if(J(t,n)){let r=t[n];typeof r==`number`&&(e[n]=r)}})}return e},Yi={"first-paint":qi.FIRST_PAINT,"first-contentful-paint":qi.FIRST_CONTENTFUL_PAINT},Xi=e=>{let t=b.getEntriesByType?.(`paint`);t&&t.forEach(({name:t,startTime:n})=>{J(Yi,t)&&e.addEvent(Yi[t],n)})},Zi=class extends Rr{component=`document-load`;version=`1`;moduleName=this.component;constructor(e={}){super(Ki,Gi,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=Ji(),n=e&&e.content||``;h.with(m.extract(r,{traceparent:n}),()=>{let e=this._startSpan(X.DOCUMENT_LOAD,q.FETCH_START,t);e&&(h.with(f.setSpan(h.active(),e),()=>{let e=this._startSpan(X.DOCUMENT_FETCH,q.FETCH_START,t);e&&(e.setAttribute(et,location.href),h.with(f.setSpan(h.active(),e),()=>{Vi(e,t,this.getConfig().ignoreNetworkEvents),this._addCustomAttributesOnSpan(e,this.getConfig().applyCustomAttributesOnSpan?.documentFetch),this._endSpan(e,q.RESPONSE_END,t)}))}),e.setAttribute(et,location.href),e.setAttribute(tt,navigator.userAgent),this._addResourcesSpans(e),this.getConfig().ignoreNetworkEvents||(Y(e,q.FETCH_START,t),Y(e,q.UNLOAD_EVENT_START,t),Y(e,q.UNLOAD_EVENT_END,t),Y(e,q.DOM_INTERACTIVE,t),Y(e,q.DOM_CONTENT_LOADED_EVENT_START,t),Y(e,q.DOM_CONTENT_LOADED_EVENT_END,t),Y(e,q.DOM_COMPLETE,t),Y(e,q.LOAD_EVENT_START,t),Y(e,q.LOAD_EVENT_END,t)),this.getConfig().ignorePerformancePaintEvents||Xi(e),this._addCustomAttributesOnSpan(e,this.getConfig().applyCustomAttributesOnSpan?.documentLoad),this._endSpan(e,q.LOAD_EVENT_END,t))})}_endSpan(e,t,n){e&&(J(n,t)?e.end(n[t]):e.end())}_initResourceSpan(e,t){let n=this._startSpan(X.RESOURCE_FETCH,q.FETCH_START,e,t);n&&(n.setAttribute(et,e.name),Vi(n,e,this.getConfig().ignoreNetworkEvents),this._addCustomAttributesOnResourceSpan(n,e,this.getConfig().applyCustomAttributesOnSpan?.resourceFetch),this._endSpan(n,q.RESPONSE_END,e))}_startSpan(e,t,n,r){if(J(n,t)&&typeof n[t]==`number`)return this.tracer.startSpan(e,{startTime:n[t]},r?f.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&&I(()=>t(e),e=>{e&&this._diag.error(`addCustomAttributesOnSpan`,e)},!0)}_addCustomAttributesOnResourceSpan(e,t,n){n&&I(()=>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 Qi=`http.response_content_length`,$i=`http.response_content_length_uncompressed`,ea;function ta(){return ea||=document.createElement(`a`),ea}function na(e,t){return t in e}function Q(e,t,n,r=!0){if(na(n,t)&&typeof n[t]==`number`&&!(r&&n[t]===0))return e.addEvent(t,n[t])}function ra(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(Qi,n);let r=t[Z.DECODED_BODY_SIZE];r!==void 0&&n!==r&&e.setAttribute($i,r)}}function ia(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 aa(){return typeof location<`u`?location.origin:void 0}function oa(e,t,n,r,i=new WeakSet,a){let o=la(e);e=o.toString();let s=ca(e,t,n,r,i,a);if(s.length===0)return{mainRequest:void 0};if(s.length===1)return{mainRequest:s[0]};let c=ia(s);if(o.origin!==aa()&&c.length>1){let e=c[0],t=sa(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 sa(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 ca(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 la(e){if(typeof URL==`function`)return new URL(e,typeof document<`u`?document.baseURI:typeof location<`u`?location.href:void 0);let t=ta();return t.href=e,t}function ua(e,t){let n=t||[];return(typeof n==`string`||n instanceof RegExp)&&(n=[n]),la(e).origin===aa()?!0:n.some(t=>hn(e,t))}var da;(function(e){e.COMPONENT=`component`,e.HTTP_STATUS_TEXT=`http.status_text`})(da||={});var fa=`http.host`,pa=`http.method`,ma=`http.request.body.size`,ha=`http.request_content_length_uncompressed`,ga=`http.scheme`,_a=`http.status_code`,va=`http.url`,ya=`http.user_agent`,ba=_.createComponentLogger({namespace:`@opentelemetry/opentelemetry-instrumentation-fetch/utils`});function xa(...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}=Sa(t.body);return t.body=e,n}else return Promise.resolve(wa(t.body))}else{let t=e[0];return t?.body?t.clone().text().then(e=>Ea(e)):Promise.resolve()}}function Sa(e){if(!e.pipeThrough)return ba.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 Ca(e){return typeof Document<`u`&&e instanceof Document}function wa(e){if(Ca(e))return new XMLSerializer().serializeToString(document).length;if(typeof e==`string`)return Ea(e);if(e instanceof Blob)return e.size;if(e instanceof FormData)return Da(e);if(e instanceof URLSearchParams)return Ea(e.toString());if(e.byteLength!==void 0)return e.byteLength;ba.warn(`unknown body type`)}var Ta=new TextEncoder;function Ea(e){return Ta.encode(e).byteLength}function Da(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 Oa(e){let t=ja(),n=e.toUpperCase();return n in t?n:`_OTHER`}var ka={CONNECT:!0,DELETE:!0,GET:!0,HEAD:!0,OPTIONS:!0,PATCH:!0,POST:!0,PUT:!0,TRACE:!0},Aa;function ja(){return Aa===void 0&&(Aa=ka),Aa}var Ma={"https:":`443`,"http:":`80`};function Na(e){let t=Number(e.port||Ma[e.protocol]);if(t&&!isNaN(t))return t}var Pa=`0.204.0`,Fa=300,Ia=typeof process==`object`&&process.release?.name===`node`,La=class extends Rr{component=`fetch`;version=Pa;moduleName=this.component;_usedResources=new WeakSet;_tasksCount=0;_semconvStability;constructor(e={}){super(`@opentelemetry/instrumentation-fetch`,Pa,e),this._semconvStability=zr(`http`,e?.semconvStabilityOptIn)}init(){}_addChildSpan(e,t){let n=this.tracer.startSpan(`CORS Preflight`,{startTime:t[Z.FETCH_START]},f.setSpan(h.active(),e)),r=!(this._semconvStability&R.OLD);ra(n,t,this.getConfig().ignoreNetworkEvents,void 0,r),n.end(t[Z.RESPONSE_END])}_addFinalSpanAttributes(e,t){let n=la(t.url);if(this._semconvStability&R.OLD&&(e.setAttribute(_a,t.status),t.statusText!=null&&e.setAttribute(da.HTTP_STATUS_TEXT,t.statusText),e.setAttribute(fa,n.host),e.setAttribute(ga,n.protocol.replace(`:`,``)),typeof navigator<`u`&&e.setAttribute(ya,navigator.userAgent)),this._semconvStability&R.STABLE){e.setAttribute(lt,t.status),e.setAttribute(ut,n.hostname);let r=Na(n);r&&e.setAttribute(dt,r)}}_addHeaders(e,t){if(!ua(t,this.getConfig().propagateTraceHeaderCorsUrls)){let e={};m.inject(h.active(),e),Object.keys(e).length>0&&this._diag.debug(`headers inject skipped due to CORS policy`);return}if(e instanceof Request)m.inject(h.active(),e.headers,{set:(e,t,n)=>e.set(t,typeof n==`string`?n:String(n))});else if(e.headers instanceof Headers)m.inject(h.active(),e.headers,{set:(e,t,n)=>e.set(t,typeof n==`string`?n:String(n))});else if(e.headers instanceof Map)m.inject(h.active(),e.headers,{set:(e,t,n)=>e.set(t,typeof n==`string`?n:String(n))});else{let t={};m.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(gn(e,this.getConfig().ignoreUrls)){this._diag.debug(`ignoring span as url matches ignored url`);return}let n=``,r={};if(this._semconvStability&R.OLD){let i=(t.method||`GET`).toUpperCase();n=`HTTP ${i}`,r[da.COMPONENT]=this.moduleName,r[pa]=i,r[va]=e}if(this._semconvStability&R.STABLE){let i=t.method,a=Oa(t.method||`GET`);n||=a,r[st]=a,a!==i&&(r[ct]=i),r[vt]=e}return this.tracer.startSpan(n,{kind:be.CLIENT,attributes:r})}_findResourceAndAddNetworkEvents(e,t,n){let r=t.entries;if(!r.length){if(!performance.getEntriesByType)return;r=performance.getEntriesByType(`resource`)}let i=oa(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&R.OLD);ra(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&R.STABLE&&n.status>=400&&(e.setStatus({code:c.ERROR}),e.setAttribute(rt,String(n.status))),setTimeout(()=>{t.observer?.disconnect(),this._findResourceAndAddNetworkEvents(e,t,i),this._tasksCount--,this._clearResources(),e.end(r)},Fa)}_patchConstructor(){return e=>{let t=this;return function(...n){let r=this,i=la(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&&xa(...n).then(e=>{e&&(t._semconvStability&R.OLD&&o.setAttribute(ha,e),t._semconvStability&R.STABLE&&o.setAttribute(ma,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 d(e,t,n){try{c(e,n)}finally{t(n)}}return new Promise((n,s)=>h.with(f.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),d.bind(r,o,s)))))}}}_applyAttributesAfterFetch(e,t,n){let r=this.getConfig().applyCustomAttributesOnSpan;r&&I(()=>r(e,t,n),e=>{e&&this._diag.error(`applyCustomAttributesOnSpan`,e)},!0)}_callRequestHook(e,t){let n=this.getConfig().requestHook;n&&I(()=>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(Ia){this._diag.warn(`this instrumentation is intended for web usage only, it does not instrument Node.js's fetch()`);return}L(fetch)&&(this._unwrap(Xe,`fetch`),this._diag.debug(`removing previous patch for constructor`)),this._wrap(Xe,`fetch`,this._patchConstructor())}disable(){Ia||(this._unwrap(Xe,`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 Ra=`0.49.0`,za=`@opentelemetry/instrumentation-user-interaction`,Ba=`OT_ZONE_CONTEXT`,Va=`Navigation:`,Ha=[`click`];function Ua(){return!1}var Wa=class extends Rr{version=Ra;moduleName=`user-interaction`;_spansData=new WeakMap;_wrappedListeners=new WeakMap;_eventsSpanMap=new WeakMap;_eventNames;_shouldPreventSpanCreation;constructor(e={}){super(za,Ra,e),this._eventNames=new Set(e?.eventNames??Ha),this._shouldPreventSpanCreation=typeof e?.shouldPreventSpanCreation==`function`?e.shouldPreventSpanCreation:Ua}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=Hi(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?f.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(Ba);return t&&f.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(f.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(){L(history.replaceState)&&this._unwrap(history,`replaceState`),L(history.pushState)&&this._unwrap(history,`pushState`),L(history.back)&&this._unwrap(history,`back`),L(history.forward)&&this._unwrap(history,`forward`),L(history.go)&&this._unwrap(history,`go`)}_updateInteractionName(e){let t=f.getSpan(h.active());t&&typeof t.updateName==`function`&&t.updateName(`${Va} ${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(f.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?(L(e.prototype.runTask)&&(this._unwrap(e.prototype,`runTask`),this._diag.debug(`removing previous patch from method runTask`)),L(e.prototype.scheduleTask)&&(this._unwrap(e.prototype,`scheduleTask`),this._diag.debug(`removing previous patch from method scheduleTask`)),L(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=>{L(e.addEventListener)&&(this._unwrap(e,`addEventListener`),this._diag.debug(`removing previous patch from method addEventListener`)),L(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?(L(e.prototype.runTask)&&this._unwrap(e.prototype,`runTask`),L(e.prototype.scheduleTask)&&this._unwrap(e.prototype,`scheduleTask`),L(e.prototype.cancelTask)&&this._unwrap(e.prototype,`cancelTask`)):this._getPatchableEventTargets().forEach(e=>{L(e.addEventListener)&&this._unwrap(e,`addEventListener`),L(e.removeEventListener)&&this._unwrap(e,`removeEventListener`)}),this._unpatchHistoryApi()}_getZoneWithPrototype(){return window.Zone}},Ga=`open-knowledge-app`,Ka=!1;function qa(){return{BASE_URL:`./`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_APP_VERSION:`0.63.9`}?.VITE_OTEL_COLLECTOR_URL??`http://localhost:14318`}function Ja(){if(Ka)return;Ka=!0;let e=null,t=!1;try{let n=qa(),r={BASE_URL:`./`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_APP_VERSION:`0.63.9`};e=new Ri({resource:Hr({[ft]:`open-knowledge-app`,[pt]:r?.VITE_APP_VERSION??`dev`,[nt]:r?.MODE??`dev`}),spanProcessors:[new Pi(new xr({url:`${n}/v1/traces`}),{maxExportBatchSize:50,scheduledDelayMillis:2e3})]}),e.register(),t=!0,Mr({instrumentations:[new Zi,new Wa({eventNames:[`click`,`submit`]}),new La({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(()=>{}),Ka=!1}}function Ya(){return f.getTracer(Ga)}export{Ya as getAppTracer,Ja as install};
@@ -1 +1 @@
1
- import{t as e}from"./propagation-api-B1_qxPZb.js";import{t}from"./context-api-CW3A_QP4.js";import{n}from"./startup-marks-BYurBbnW.js";import{getAppTracer as r}from"./telemetry-impl-Bbh5su9o.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-B1_qxPZb.js";import{t}from"./context-api-CW3A_QP4.js";import{n}from"./startup-marks-BYurBbnW.js";import{getAppTracer as r}from"./telemetry-impl-BIepj08G.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 +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{n as r}from"./dist-PQ5KMVDh.js";import{t as i}from"./compiler-runtime-BfE3aGVn.js";import{t as a}from"./utils-CPqDy6Hr.js";import{c as o,i as s,l as c,o as l,t as u}from"./dist-DsLZcVyZ.js";import{_ as d,a as f,c as p,d as m,f as h,g as ee,h as te,i as ne,l as re,m as ie,n as ae,o as oe,p as se,r as ce,s as le,t as ue,u as de}from"./dist-Be8lWZxP2.js";import"./dropdown-menu-BpLbh79a.js";import{$t as fe,Qt as pe,n as me,t as he}from"./dist-DSS3ixln2.js";import{t as ge}from"./check-Bzwwm-o4.js";import{t as _e}from"./chevron-right-BVvjaUfh.js";import{i as ve,n as ye,t as be}from"./cursor-Dy0g2caC.js";import{t as xe}from"./copilot-BvcrBiQu.js";var g=e(n(),1),_=t(),v=`ContextMenu`,[Se,Ce]=o(v,[d]),y=d(),[we,b]=Se(v),x=e=>{let{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:a=!0}=e,[o,s]=g.useState(!1),c=y(t),l=u(r),d=g.useCallback(e=>{s(e),l(e)},[l]);return(0,_.jsx)(we,{scope:t,open:o,onOpenChange:d,modal:a,children:(0,_.jsx)(h,{...c,dir:i,open:o,onOpenChange:d,modal:a,children:n})})};x.displayName=v;var S=`ContextMenuTrigger`,C=g.forwardRef((e,t)=>{let{__scopeContextMenu:n,disabled:r=!1,...i}=e,a=b(S,n),o=y(n),s=g.useRef({x:0,y:0}),u=g.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...s.current})}),d=g.useRef(0),f=g.useCallback(()=>window.clearTimeout(d.current),[]),p=e=>{s.current={x:e.clientX,y:e.clientY},a.onOpenChange(!0)};return g.useEffect(()=>f,[f]),g.useEffect(()=>void(r&&f()),[r,f]),(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(ue,{...o,virtualRef:u}),(0,_.jsx)(c.span,{"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,...i,ref:t,style:{WebkitTouchCallout:`none`,...e.style},onContextMenu:r?e.onContextMenu:l(e.onContextMenu,e=>{f(),p(e),e.preventDefault()}),onPointerDown:r?e.onPointerDown:l(e.onPointerDown,j(e=>{f(),d.current=window.setTimeout(()=>p(e),700)})),onPointerMove:r?e.onPointerMove:l(e.onPointerMove,j(f)),onPointerCancel:r?e.onPointerCancel:l(e.onPointerCancel,j(f)),onPointerUp:r?e.onPointerUp:l(e.onPointerUp,j(f))})]})});C.displayName=S;var Te=`ContextMenuPortal`,Ee=e=>{let{__scopeContextMenu:t,...n}=e,r=y(t);return(0,_.jsx)(re,{...r,...n})};Ee.displayName=Te;var De=`ContextMenuContent`,Oe=g.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=b(De,n),a=y(n),o=g.useRef(!1);return(0,_.jsx)(ne,{...a,...r,ref:t,side:`right`,sideOffset:2,align:`start`,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),!t.defaultPrevented&&o.current&&t.preventDefault(),o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),!t.defaultPrevented&&!i.modal&&(o.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-context-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-context-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-context-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-context-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});Oe.displayName=De;var ke=`ContextMenuGroup`,w=g.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=y(n);return(0,_.jsx)(f,{...i,...r,ref:t})});w.displayName=ke;var Ae=`ContextMenuLabel`,je=g.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=y(n);return(0,_.jsx)(p,{...i,...r,ref:t})});je.displayName=Ae;var Me=`ContextMenuItem`,T=g.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=y(n);return(0,_.jsx)(oe,{...i,...r,ref:t})});T.displayName=Me;var Ne=`ContextMenuCheckboxItem`,E=g.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=y(n);return(0,_.jsx)(ce,{...i,...r,ref:t})});E.displayName=Ne;var Pe=`ContextMenuRadioGroup`,Fe=g.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=y(n);return(0,_.jsx)(de,{...i,...r,ref:t})});Fe.displayName=Pe;var Ie=`ContextMenuRadioItem`,Le=g.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=y(n);return(0,_.jsx)(m,{...i,...r,ref:t})});Le.displayName=Ie;var Re=`ContextMenuItemIndicator`,D=g.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=y(n);return(0,_.jsx)(le,{...i,...r,ref:t})});D.displayName=Re;var ze=`ContextMenuSeparator`,O=g.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=y(n);return(0,_.jsx)(se,{...i,...r,ref:t})});O.displayName=ze;var Be=`ContextMenuArrow`,Ve=g.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=y(n);return(0,_.jsx)(ae,{...i,...r,ref:t})});Ve.displayName=Be;var He=`ContextMenuSub`,k=e=>{let{__scopeContextMenu:t,children:n,onOpenChange:r,open:i,defaultOpen:a}=e,o=y(t),[c,l]=s({prop:i,defaultProp:a??!1,onChange:r,caller:He});return(0,_.jsx)(ie,{...o,open:c,onOpenChange:l,children:n})};k.displayName=He;var Ue=`ContextMenuSubTrigger`,A=g.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=y(n);return(0,_.jsx)(ee,{...i,...r,ref:t})});A.displayName=Ue;var We=`ContextMenuSubContent`,Ge=g.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=y(n);return(0,_.jsx)(te,{...i,...r,ref:t,style:{...e.style,"--radix-context-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-context-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-context-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-context-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-context-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});Ge.displayName=We;function j(e){return t=>t.pointerType===`mouse`?void 0:e(t)}var Ke=x,qe=C,Je=Ee,Ye=Oe,Xe=w,Ze=je,Qe=T,$e=E,et=D,tt=O,nt=k,rt=A,it=Ge,M=`ok-acp-registered-agents-v1`,N={agents:[],defaultKey:null};function P(e){return`${e.source}:${e.id}`}function at(e){if(typeof e!=`object`||!e)return!1;let t=e;return(t.source===`registry`||t.source===`custom`)&&typeof t.id==`string`&&t.id!==``&&typeof t.name==`string`&&t.name!==``&&(t.iconUrl===void 0||typeof t.iconUrl==`string`)&&(t.lastUsedAt===void 0||typeof t.lastUsedAt==`number`)&&(t.featured===void 0||typeof t.featured==`boolean`)}function ot(){let e;try{e=localStorage.getItem(M)}catch{return N}if(e===null)return N;try{let t=JSON.parse(e),n=Array.isArray(t.agents)?t.agents.filter(at):[];return{agents:n,defaultKey:typeof t.defaultKey==`string`&&n.some(e=>P(e)===t.defaultKey)?t.defaultKey:null}}catch(e){return console.warn(`[registered-agents] discarding corrupt localStorage payload`,e),N}}function F(e){try{localStorage.setItem(M,JSON.stringify(e))}catch(e){console.warn(`[registered-agents] failed to persist registration`,e)}}var I=null,L=[],R=null,z=new Set;function B(){return I===null&&(I=ot()),I}function V(e){I=e,R=G(e.agents,L);for(let e of z)e()}function st(){V(ot())}typeof window<`u`&&typeof window.addEventListener==`function`&&window.addEventListener(`storage`,e=>{(e.key===M||e.key===null)&&st()});function H(e){return z.add(e),()=>z.delete(e)}var U=()=>(R===null&&(R=G(B().agents,L)),R),W=()=>{let{agents:e,defaultKey:t}=B();return t===null?null:e.find(e=>P(e)===t)??null};function ct(e,t={}){let{makeDefault:n=!0}=t,r=P(e),i=B();if(!n){let t={agents:i.agents.some(e=>P(e)===r)?i.agents.map(t=>P(t)===r?{...e,...t.lastUsedAt===void 0?{}:{lastUsedAt:t.lastUsedAt}}:t):[...i.agents,e],defaultKey:i.defaultKey};F(t),V(t);return}let a=i.agents.filter(e=>P(e)!==r),o={agents:[{...e,lastUsedAt:Date.now()},...a],defaultKey:r};F(o),V(o)}function lt(e,t){let n=e.lastUsedAt??0,r=t.lastUsedAt??0;if(n!==r)return r-n;let i=e.featured===!0?0:1,a=t.featured===!0?0:1;return i===a?e.name.localeCompare(t.name,void 0,{numeric:!0,sensitivity:`base`}):i-a}function G(e,t){let n=new Set(e.map(P));return[...e,...t.filter(e=>!n.has(P(e)))].sort(lt)}function ut(e){L=[...e],R=G(B().agents,L);for(let e of z)e()}function dt(e,t){let n=B();if(n.defaultKey!==e)return;let r=n.agents.find(n=>P(n)!==e&&t(n))??null,i={agents:n.agents,defaultKey:r?P(r):null};F(i),V(i)}function ft(e,t){return t!==null&&e.some(e=>e.source===t.source&&e.id===t.id)?t:e[0]??null}function pt(e){let t=new Map(e.map(e=>[P(e),e])),n=B(),r=!1,i=n.agents.map(e=>{let n=t.get(P(e));if(n===void 0)return e;let i=n.name??e.name,a=n.iconUrl??e.iconUrl,o=n.supported??e.supported,s=n.featured??e.featured;return i===e.name&&a===e.iconUrl&&o===e.supported&&s===e.featured?e:(r=!0,{...e,name:i,...a===void 0?{}:{iconUrl:a},...o===void 0?{}:{supported:o},...s===void 0?{}:{featured:s}})});if(!r)return;let a={agents:i,defaultKey:n.defaultKey};F(a),V(a)}function mt(){return(0,g.useSyncExternalStore)(H,U,U)}function ht(){return(0,g.useSyncExternalStore)(H,W,W)}var K=i();async function gt(e,t={}){let n=t.okDesktop??(typeof window<`u`?window.okDesktop:void 0);if(n?.shell?.openExternal)try{return await n.shell.openExternal(e),{ok:!0}}catch(e){return{ok:!1,reason:`dispatch-error`,detail:q(e)}}let r=t.doc??(typeof document<`u`?document:void 0);if(!r)return{ok:!1,reason:`dispatch-error`,detail:`no DOM available`};try{let t=r.createElement(`a`);return t.href=e,t.rel=`noopener noreferrer`,/^https?:/i.test(e)&&(t.target=`_blank`),r.body.appendChild(t),t.click(),t.remove(),{ok:!0}}catch(e){return{ok:!1,reason:`dispatch-error`,detail:q(e)}}}function q(e){if(e instanceof Error)return e.message;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}var _t=[{id:`claude-cowork`,displayName:`Claude Cowork`,appBrandName:`Claude Desktop`,schemes:[`claude:`],installUrl:`https://claude.com/download`,tagline:`Conversational pairing in Claude Desktop's Cowork tab.`},{id:`claude-code`,displayName:`Claude`,appBrandName:`Claude Desktop`,schemes:[`claude:`],installUrl:`https://claude.com/download`,tagline:`Agentic coding in Claude Desktop's Code tab.`},{id:`codex`,displayName:`ChatGPT`,appBrandName:`ChatGPT Desktop`,schemes:[`codex:`],installUrl:`https://developers.openai.com/codex/app`,tagline:`OpenAI's ChatGPT desktop app, home of the Codex agent.`},{id:`cursor`,displayName:`Cursor`,schemes:[`cursor:`],installUrl:`https://cursor.com/`,tagline:`AI-first VS Code fork with multi-file edits.`},{id:`copilot`,displayName:`GitHub Copilot`,schemes:[],installUrl:`https://docs.github.com/en/copilot/how-tos/copilot-cli/cli-getting-started`,tagline:`GitHub's terminal-native coding agent.`},{id:`opencode`,displayName:`OpenCode`,schemes:[],installUrl:`https://opencode.ai`,tagline:`Open-source terminal coding agent; bring any local model.`},{id:`pi`,displayName:`Pi`,schemes:[],installUrl:`https://pi.dev`,tagline:`Minimal open-source terminal coding agent, extensible in TypeScript.`},{id:`antigravity`,displayName:`Antigravity`,schemes:[],installUrl:`https://antigravity.google`,tagline:"Google's agentic IDE + `agy` terminal agent."},{id:`openclaw`,displayName:`OpenClaw`,schemes:[],installUrl:`https://openclaw.ai`,tagline:`Open-source agent gateway; runs agents against your MCP servers.`},{id:`hermes`,displayName:`Hermes`,schemes:[],installUrl:`https://hermes-agent.nousresearch.com`,tagline:`Nous Research's terminal coding agent.`}],vt=_t.filter(e=>e.id!==`claude-cowork`&&e.id!==`copilot`&&e.id!==`opencode`&&e.id!==`pi`&&e.id!==`antigravity`&&e.id!==`openclaw`&&e.id!==`hermes`),J=`ok-acp-enabled-agents-v1`,Y={};function yt(e,t){return`in-app:${e}:${t}`}function bt(e){return`terminal:${e}`}function xt(e){return`desktop:${e}`}function X(e,t){return e??t}function St(){let e;try{e=localStorage.getItem(J)}catch(e){return console.warn(`[enabled-agents] localStorage unavailable; treating overrides as empty`,e),Y}if(e===null)return Y;try{let t=JSON.parse(e);if(typeof t!=`object`||!t)return Y;let n={};for(let[e,r]of Object.entries(t))typeof r==`boolean`&&(n[e]=r);return n}catch(e){return console.warn(`[enabled-agents] discarding corrupt localStorage payload`,e),Y}}function Ct(e){try{localStorage.setItem(J,JSON.stringify(e))}catch(e){console.warn(`[enabled-agents] failed to persist override`,e)}}var Z=null,Q=new Set;function wt(){return Z===null&&(Z=St()),Z}function $(e){Z=e;for(let e of Q)e()}function Tt(){$(St())}typeof window<`u`&&typeof window.addEventListener==`function`&&window.addEventListener(`storage`,e=>{(e.key===J||e.key===null)&&Tt()});function Et(e){return Q.add(e),()=>Q.delete(e)}var Dt=()=>wt();function Ot(e,t){let n=wt();if(t===void 0){if(!(e in n))return;let{[e]:t,...r}=n;Ct(r),$(r);return}if(n[e]===t)return;let r={...n,[e]:t};Ct(r),$(r)}function kt(){return(0,g.useSyncExternalStore)(Et,Dt,Dt)}function At(e,t,n,r,i){return i===!1?!1:X(e[yt(t,n)],r)}function jt(e,t,n){return X(e[bt(t)],n[t]!==!1)}function Mt(e,t,n){return X(e[xt(t)],n===!0)}function Nt(e){let t=(0,K.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,_.jsx)(Ke,{"data-slot":`context-menu`,...n}),t[2]=n,t[3]=r),r}function Pt(e){let t=(0,K.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=a(`select-none`,n),t[3]=n,t[4]=i);let o;return t[5]!==r||t[6]!==i?(o=(0,_.jsx)(qe,{"data-slot":`context-menu-trigger`,className:i,...r}),t[5]=r,t[6]=i,t[7]=o):o=t[7],o}function Ft(e){let t=(0,K.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,_.jsx)(Xe,{"data-slot":`context-menu-group`,...n}),t[2]=n,t[3]=r),r}function It(e){let t=(0,K.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,_.jsx)(nt,{"data-slot":`context-menu-sub`,...n}),t[2]=n,t[3]=r),r}function Lt(e){let t=(0,K.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=a(`z-50 max-h-(--radix-context-menu-content-available-height) min-w-36 origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 motion-reduce:data-open:animate-none motion-reduce:data-closed:animate-none motion-reduce:duration-0`,n),t[3]=n,t[4]=i);let o;return t[5]!==r||t[6]!==i?(o=(0,_.jsx)(Je,{children:(0,_.jsx)(Ye,{"data-slot":`context-menu-content`,className:i,...r})}),t[5]=r,t[6]=i,t[7]=o):o=t[7],o}function Rt(e){let t=(0,K.c)(12),n,r,i,o;t[0]===e?(n=t[1],r=t[2],i=t[3],o=t[4]):({className:n,inset:r,variant:o,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o);let s=o===void 0?`default`:o,c;t[5]===n?c=t[6]:(c=a(`group/context-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 focus:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive`,n),t[5]=n,t[6]=c);let l;return t[7]!==r||t[8]!==i||t[9]!==c||t[10]!==s?(l=(0,_.jsx)(Qe,{"data-slot":`context-menu-item`,"data-inset":r,"data-variant":s,className:c,...i}),t[7]=r,t[8]=i,t[9]=c,t[10]=s,t[11]=l):l=t[11],l}function zt(e){let t=(0,K.c)(13),n,r,i,o;t[0]===e?(n=t[1],r=t[2],i=t[3],o=t[4]):({className:r,inset:i,children:n,...o}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o);let s;t[5]===r?s=t[6]:(s=a(`flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,r),t[5]=r,t[6]=s);let c;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,_.jsx)(_e,{className:`ml-auto`}),t[7]=c):c=t[7];let l;return t[8]!==n||t[9]!==i||t[10]!==o||t[11]!==s?(l=(0,_.jsxs)(rt,{"data-slot":`context-menu-sub-trigger`,"data-inset":i,className:s,...o,children:[n,c]}),t[8]=n,t[9]=i,t[10]=o,t[11]=s,t[12]=l):l=t[12],l}function Bt(e){let t=(0,K.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=a(`z-50 max-h-(--radix-context-menu-content-available-height) min-w-32 origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border bg-popover p-1 text-popover-foreground shadow-lg data-[state=closed]:overflow-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 motion-reduce:data-open:animate-none motion-reduce:data-closed:animate-none motion-reduce:duration-0 subtle-scrollbar`,n),t[3]=n,t[4]=i);let o;return t[5]!==r||t[6]!==i?(o=(0,_.jsx)(it,{"data-slot":`context-menu-sub-content`,className:i,...r}),t[5]=r,t[6]=i,t[7]=o):o=t[7],o}function Vt(e){let t=(0,K.c)(15),n,r,i,o,s;t[0]===e?(n=t[1],r=t[2],i=t[3],o=t[4],s=t[5]):({className:i,children:r,checked:n,inset:o,...s}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=s);let c;t[6]===i?c=t[7]:(c=a(`relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,i),t[6]=i,t[7]=c);let l;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,_.jsx)(`span`,{className:`pointer-events-none absolute right-2`,children:(0,_.jsx)(et,{children:(0,_.jsx)(ge,{})})}),t[8]=l):l=t[8];let u;return t[9]!==n||t[10]!==r||t[11]!==o||t[12]!==s||t[13]!==c?(u=(0,_.jsxs)($e,{"data-slot":`context-menu-checkbox-item`,"data-inset":o,className:c,checked:n,...s,children:[l,r]}),t[9]=n,t[10]=r,t[11]=o,t[12]=s,t[13]=c,t[14]=u):u=t[14],u}function Ht(e){let t=(0,K.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,inset:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let o;t[4]===n?o=t[5]:(o=a(`px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7`,n),t[4]=n,t[5]=o);let s;return t[6]!==r||t[7]!==i||t[8]!==o?(s=(0,_.jsx)(Ze,{"data-slot":`context-menu-label`,"data-inset":r,className:o,...i}),t[6]=r,t[7]=i,t[8]=o,t[9]=s):s=t[9],s}function Ut(e){let t=(0,K.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=a(`-mx-1 my-1 h-px bg-border`,n),t[3]=n,t[4]=i);let o;return t[5]!==r||t[6]!==i?(o=(0,_.jsx)(tt,{"data-slot":`context-menu-separator`,className:i,...r}),t[5]=r,t[6]=i,t[7]=o):o=t[7],o}function Wt(e){let t=(0,K.c)(5),n,r,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,_.jsx)(`title`,{children:`Antigravity icon`}),r=(0,_.jsx)(`path`,{fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`,d:`M12 2.5a1.5 1.5 0 0 1 1.28.72l8.5 14A1.5 1.5 0 0 1 20.5 19.5h-17a1.5 1.5 0 0 1-1.28-2.28l8.5-14A1.5 1.5 0 0 1 12 2.5Zm0 4.42L5.83 17h12.34L12 6.92Z`}),i=(0,_.jsx)(`path`,{fill:`currentColor`,d:`M12 9.6 15.6 17h-7.2L12 9.6Z`}),t[0]=n,t[1]=r,t[2]=i):(n=t[0],r=t[1],i=t[2]);let a;return t[3]===e?a=t[4]:(a=(0,_.jsxs)(`svg`,{role:`img`,"aria-label":`Antigravity icon`,xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,fill:`none`,viewBox:`0 0 24 24`,...e,children:[n,r,i]}),t[3]=e,t[4]=a),a}function Gt(e){let t=(0,K.c)(6),n,r,i,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,_.jsx)(`title`,{children:`Hermes icon`}),r=(0,_.jsx)(`path`,{d:`M5.938 12.835c.127-.039.285.02.373.143.028.038.036.092.046.14.003.014-.02.033-.04.05-.124-.098-.24-.194-.354-.291-.011-.01-.016-.027-.025-.042zM8.396 9.412c.195-.032.39-.06.588-.05a.54.54 0 01.148.026c.202.071.402.147.601.224.028.01.05.036.075.055l-.013.027a9.203 9.203 0 01-.26-.089c-.115-.038-.213-.077-.315-.098-.25-.05-.25-.046-.292-.014l.574.144c.275.139.55.276.823.417.042.022.09.057.107.098.026.06.063.076.117.072.066-.006.132-.017.213-.027l-.04.086c.051.08.142.02.216.064-.074.13-.247.09-.334.199l.061.074-.12.087c0 .106-.038.168-.306.243l.026.085-.196.042.07.124h-.25l-.007.137c-.081-.01-.161-.018-.244-.027l-.053.123c-.027-.008-.052-.011-.073-.023-.067-.038-.128-.056-.195.006-.019.017-.063.014-.093.008-.026-.006-.05-.029-.07-.042-.11.095-.11.095-.208.003-.057.046-.12.074-.186.011-.063.027-.123-.02-.178-.014-.07.007-.097-.035-.133-.07l-.13.033c-.013-.236-.194-.19-.34-.203.005-.072.05-.092.095-.094a.474.474 0 01.159.022c.164.05.32.12.496.138.203.021.405.029.601-.015.265-.059.52-.149.707-.365.049-.056.083-.127.117-.195.019-.038.02-.084-.02-.116a1.397 1.397 0 00-.382-.217c.024.12-.031.182-.115.221 0 .014-.004.025 0 .03.08.115.084.16-.007.267a1.39 1.39 0 01-.218.211.477.477 0 01-.641-.05 1.36 1.36 0 01-.133-.152c-.078-.107-.076-.108-.033-.236-.165-.08-.128-.226-.104-.364.008-.05.028-.096.049-.163-.04.014-.067.017-.087.032a.897.897 0 00-.316.357c-.007.016-.01.034-.02.047-.012.015-.034.038-.045.035-.02-.006-.037-.027-.05-.045-.008-.012-.007-.032-.012-.057h-.126l.053-.172a14.82 14.82 0 00-.039-.049l.11-.284c-.06.026-.091.044-.124.051-.03.007-.064 0-.095 0 0-.031-.01-.07.004-.092.149-.22.305-.428.593-.476z`}),i=(0,_.jsx)(`path`,{d:`M8.06 10.788c-.003-.038-.004-.075.037-.062.016.006.034.048.028.067-.01.04-.038.032-.064-.005z`}),a=(0,_.jsx)(`path`,{clipRule:`evenodd`,d:`M11.981.009c.226-.012.453-.011.679 0 .247.01.495.024.74.062.401.064.798.157 1.19.273.463.138.92.299 1.356.511a7.31 7.31 0 012.948 2.642c.292.469.536.963.739 1.479.219.556.446 1.11.623 1.683.204.654.329 1.326.458 1.997.097.504.182 1.01.29 1.511.156.722.329 1.44.494 2.16.186.812.4 1.615.63 2.415.102.355.193.713.282 1.072.11.436.202.876.254 1.323.031.278.066.557.073.837a7.56 7.56 0 01-.017.88c-.037.413-.1.818-.226 1.212a5.017 5.017 0 01-.915 1.649l-.13.156.018.023c.043-.023.088-.041.127-.068.2-.138.373-.307.531-.49.4-.46.721-.973.975-1.529a3.59 3.59 0 00.325-1.72c-.024-.424-.097-.834-.3-1.213-.013-.027-.015-.06-.03-.121.05.035.082.048.101.072.107.13.22.258.315.398.33.494.46 1.052.486 1.64a3.75 3.75 0 01-.47 1.97c-.36.655-.887 1.14-1.526 1.506-.193.111-.394.21-.595.308-.157.078-.248.211-.318.365a.522.522 0 00-.033.406.359.359 0 01.013.139c-.005.077-.077.155-.14.162-.054.006-.125-.043-.15-.116a1.206 1.206 0 01-.06-.233c-.04-.314-.155-.6-.308-.87a3.906 3.906 0 00-.73-.91 2.129 2.129 0 00-.897-.524 4.093 4.093 0 00-.692-.131c-.075-.008-.15-.04-.22.01.18.06.363.11.538.18.434.173.82.43 1.18.728.308.255.58.543.794.884.098.155.186.315.227.496.027.123.042.25.067.375.013.062-.002.109-.053.144-.047.033-.122.034-.163-.01a.455.455 0 01-.08-.14c-.03-.073-.038-.159-.078-.225a7.314 7.314 0 00-1.423-1.664c-.16-.137-.329-.26-.537-.323-.376-.114-.753-.203-1.15-.154-.213.025-.427.032-.64.053a1.6 1.6 0 00-.736.278 5.14 5.14 0 00-.834.72c-.329.342-.642.699-.955 1.055-.136.155-.264.319-.314.531a5.227 5.227 0 00-.012.051.096.096 0 01-.09.076h-.31c-.046 0-.082-.048-.072-.094.023-.108.045-.216.07-.324.075-.325.19-.635.368-.917.024-.039.04-.088.104-.08l.01.049.027.077c.28-.435.571-.834.996-1.135.283-.204.584-.378.89-.55a.196.196 0 00-.098-.002c-.162.043-.325.084-.485.134-.402.124-.764.33-1.11.566-.147.1-.298.193-.414.333a7.314 7.314 0 00-1.07 1.767.845.845 0 00-.04.12.075.075 0 01-.072.056h-.494c-.04 0-.062-.051-.036-.082.123-.14.246-.282.377-.415.275-.281.58-.532.777-.884.027-.048.063-.09.095-.135.238-.333.54-.607.818-.902.082-.086.175-.16.26-.24.029-.027.053-.057.079-.085l-.018-.025-.135.041c-.034.017-.07.031-.102.05-.248.144-.494.292-.743.433-.408.23-.825.439-1.209.711-.281.2-.591.358-.889.533-.02.012-.044.015-.08.028-.015-.135.143-.201.108-.336-.033.014-.064.02-.085.038-.111.096-.227.19-.328.296-.148.157-.284.325-.425.488-.125.143-.25.286-.373.431A.153.153 0 019.89 24H8.762a.316.316 0 00.016-.042c.028-.09.085-.172.083-.28-.091-.018-.162.001-.212.077a4.45 4.45 0 00-.136.215c-.01.016-.024.03-.042.03h-.093c-.019 0-.029-.022-.017-.037.071-.088.14-.178.209-.268.001-.002-.006-.012-.012-.024-.014.004-.03.006-.045.013-.176.09-.352.181-.527.274a.363.363 0 01-.168.042H5.202c-.026 0-.039-.036-.019-.053.21-.178.402-.374.558-.605.335-.496.538-1.047.667-1.629.004-.02-.003-.043-.006-.091-.037.048-.059.072-.076.1a1.943 1.943 0 01-.334.415c-.28.258-.59.448-.983.464-.297.012-.588 0-.865-.127-.46-.21-.722-.57-.794-1.072-.025-.17-.017-.171-.182-.219A3.513 3.513 0 011.97 20.6a2.286 2.286 0 01-.808-1.13 3.569 3.569 0 01-.16-1.245c.002-.034.016-.067.024-.1.032.023.046.043.05.066.033.153.059.308.096.46.086.355.257.664.516.92.258.256.571.419.91.532.358.118.717.138 1.07-.016a1.89 1.89 0 00.621-.452c.328-.348.533-.76.648-1.223.009-.034.005-.071.007-.11-.015.006-.026.006-.03.011-.031.05-.064.1-.093.152-.284.502-.679.887-1.196 1.135-.351.17-.718.255-1.11.159a1.607 1.607 0 01-.971-.64 2.006 2.006 0 01-.368-.924 2.903 2.903 0 01.02-.886c.05-.439.466-1.17.742-1.271-.02.063-.035.112-.053.16-.043.116-.097.227-.13.345a1.901 1.901 0 00-.05.82c.033.212.09.416.204.6.147.236.346.407.62.465.11.023.225.014.338.018a.576.576 0 00.386-.131c.164-.128.282-.292.366-.481.168-.375.24-.777.309-1.179.05-.296.093-.594.133-.893.039-.281.071-.563.104-.845.026-.232.048-.464.074-.696.024-.228.052-.455.076-.683.024-.227.047-.455.069-.683.013-.14.022-.28.034-.42l.037-.417c.022-.25.041-.5.065-.748.008-.082-.02-.132-.09-.177a2.46 2.46 0 01-.492-.418c-.1-.109-.188-.228-.282-.342-.035-.042-.056-.097-.116-.118a2.084 2.084 0 00.275.597c.06.092.131.176.196.265.063.086.182.115.234.226-.028.003-.046.01-.06.006a4.74 4.74 0 01-.22-.057 2.71 2.71 0 01-1.287-.819c-.435-.487-.656-1.076-.71-1.723a5.206 5.206 0 01.014-1.06c.072-.602.22-1.186.45-1.745.155-.376.338-.741.526-1.102.205-.393.466-.75.765-1.076.512-.559 1.104-1.024 1.726-1.448.717-.49 1.478-.898 2.277-1.233C8.244.828 8.767.632 9.31.494c.655-.166 1.31-.33 1.982-.415.229-.03.458-.058.688-.07zm-1.847 22.82c-.07.06-.147.111-.207.18-.238.27-.464.549-.668.869l-.044.108a.177.177 0 00.093-.057c.174-.19.351-.378.519-.574.104-.122.195-.255.288-.386.024-.034.03-.08.046-.12l-.027-.02zm1.65-3.695a5.51 5.51 0 00-.653.593l-.37.386a.963.963 0 01-.377.25 1.372 1.372 0 01-.467.09c-.044 0-.087.006-.151.012.028.058.043.097.064.131.15.242.301.482.45.724.136.22.276.438.399.666.068.125.105.267.156.404.077.027.14-.018.202-.048.29-.135.579-.274.867-.412.213-.101.437-.186.636-.31.347-.215.68-.455 1.018-.685.015-.01.026-.028.042-.046-.023-.019-.038-.037-.056-.044-.287-.111-.527-.3-.77-.482a5.319 5.319 0 01-.506-.42 1.757 1.757 0 01-.41-.653c-.019-.049-.045-.095-.075-.156zm-5.847.264c-.06.096-.097.194-.132.293a3.38 3.38 0 01-.555 1.01c-.2.25-.455.412-.762.493-.23.06-.464.076-.7.07-.048-.002-.097.002-.158.005.016.04.021.066.035.085.1.145.23.246.4.295.157.046.316.034.498.023.181-.037.343-.115.485-.234.238-.199.402-.454.536-.732.175-.363.264-.751.342-1.144.01-.053.008-.11.011-.164zm14.945-4.586c.008.029.016.057.027.107.024.155.051.31.072.464.03.219.067.437.078.657.017.344.027.689-.014 1.033-.037.315-.063.633-.116.946a6.153 6.153 0 01-.46 1.518c-.008.018-.01.039-.02.082.047-.03.077-.042.098-.064.085-.083.17-.167.248-.255.271-.305.458-.66.596-1.043.18-.498.228-1.011.145-1.531-.103-.65-.33-1.263-.597-1.881a9.055 9.055 0 00-.024-.055l-.033.022zM5.797 8.29a.26.26 0 00.018.153c.124.251.25.501.379.75.025.049.066.09.03.163-.284.06-.578.119-.88.255.059.038.097.06.132.087.042.032.112.058.09.12-.01.033-.075.048-.117.072.017.01.043.021.067.036.166.102.33.207.447.368.138.192.229.404.188.644-.079.469-.306.85-.69 1.132-.054.04-.106.083-.161.122a.243.243 0 00-.103.245.77.77 0 00.055.195c.083.196.22.35.375.492.083.076.159.164.222.257a.37.37 0 01.025.377c-.023.05-.05.099-.076.148-.03.06-.028.111.022.162.041.042.08.089.112.138.038.058.078.079.147.05a.486.486 0 01.333-.006c.16.046.302.126.444.21.13.077.264.149.4.219.067.035.14.05.219.026.071-.022.124.01.145.076.02.064-.003.108-.074.139-.07.03-.137.063-.209.088-.1.035-.201.073-.314.077-.013-.107.11-.088.127-.159-.206-.126-.643-.145-.801-.034.063.112.035.21-.096.313-.13-.1-.025-.202.002-.3a.209.209 0 00-.249.17c-.015.101.067.216.178.224.108.007.218-.005.326-.012.06-.005.12-.027.199 0-.103.123-.248.127-.357.19.002.05.07.086.019.131-.053.048-.095-.001-.132-.03-.08-.063-.16-.126-.231-.197a.474.474 0 01-.157-.311.52.52 0 00-.043-.172c-.032-.074-.032-.137.033-.19-.018-.03-.028-.053-.045-.072a1.222 1.222 0 01-.196-.369c-.053-.137-.046-.264.048-.381.024-.03.05-.06.064-.095a.664.664 0 00.047-.168c.017-.165-.064-.287-.182-.387-.186-.156-.36-.322-.46-.551-.005-.011-.024-.017-.037-.026-.011.017-.024.027-.025.038-.019.185-.045.37-.052.557-.014.377.058.743.162 1.104.118.41.289.798.488 1.173.267.502.537 1.002.812 1.5.055.098.13.189.208.27.198.202.452.272.724.273.202 0 .404-.006.605-.026.295-.03.59-.073.884-.113.183-.025.365-.057.548-.08.21-.026.38.073.522.21.16.156.305.327.447.5.22.265.397.56.554.867.05.098.07.1.147.03.13-.121.26-.242.394-.36.067-.059.088-.12.067-.213a3.535 3.535 0 01-.085-.796c.002-.157.006-.314.018-.471.015-.224.03-.45.06-.672a59.114 59.114 0 01.362-2.298c.087-.493.182-.984.268-1.477.06-.347.118-.694.162-1.043.034-.273.055-.55.063-.825.011-.332.003-.665.002-.998 0-.077.004-.155-.01-.23-.028-.142-.01-.155-.162-.19a5.826 5.826 0 00-.607-.107c-.146-.018-.207-.053-.221-.19-.006-.049-.025-.098-.041-.146-.009-.025-.024-.048-.046-.09l-.025.264c-.009.096-.029.116-.127.115-.055 0-.11-.008-.164-.008-.476 0-.952-.008-1.426.032-.095.008-.173-.015-.226-.103-.04-.066-.088-.126-.134-.186-.063-.084-.086-.093-.182-.06-.195.068-.388.138-.582.21a2.71 2.71 0 00-.675.394.986.986 0 01-.323.168c-.033.01-.07.008-.127.013.02-.066.024-.114.047-.15.064-.105.135-.205.205-.306.023-.033.049-.063.073-.095l-.015-.023-.201.037c-.146.04-.296.07-.437.122-.148.053-.266.023-.386-.072a3.623 3.623 0 01-.733-.786l-.093-.132zm8.592 8.963l-.147.09c-.22.134-.44.266-.659.402-.093.058-.184.12-.27.188-.085.07-.124.161-.072.272.047.1.093.2.147.294.047.08.124.138.213.147.11.01.228.012.336-.012.217-.05.372-.205.528-.357a.291.291 0 00.087-.308c-.046-.18-.079-.365-.118-.547-.011-.052-.027-.103-.045-.169zm-.257-2.409c-.12.291-.205.597-.325.91-.151.433-.294.87-.435 1.323.036-.01.054-.01.067-.018.261-.16.522-.324.785-.484.054-.033.071-.078.065-.138-.012-.13-.024-.262-.034-.393l-.068-.886c-.008-.103-.02-.206-.029-.31-.009 0-.017-.002-.026-.004zm3.081-8.13l.099.285c.08.231.159.463.24.714l.58 1.952c.187.63.372 1.262.558 1.893.114.382.235.762.343 1.146.072.257.126.519.186.799.044.206.087.413.127.64.034.106.023.226.077.325l.025-.006-.068-.362c-.038-.206-.077-.412-.113-.638-.015-.07-.029-.141-.046-.211-.095-.396-.177-.796-.29-1.187-.196-.685-.413-1.364-.618-2.046-.165-.549-.322-1.1-.488-1.648-.069-.227-.15-.45-.226-.695l-.117-.336c-.037-.107-.075-.216-.115-.322-.04-.106-.084-.21-.127-.314a7.558 7.558 0 01-.027.01zM6.225 14.304c-.063-.001-.115.014-.134.083a.35.35 0 00.41.012 4.533 4.533 0 00-.276-.095zM5.23 11.98c-.026-.027-.057-.048-.075.002-.012.032-.007.07-.01.113.082-.037.082-.037.085-.115zm.062-1.189a.135.135 0 00-.088.056.197.197 0 00-.025.11c.005.152.01.306.026.457a.751.751 0 00.066.218c.061.136.157.167.288.101.055-.027.06-.054.025-.11a4.52 4.52 0 01-.129-.211c-.015-.068-.066-.131-.033-.207.04-.09-.076-.116-.074-.19V10.874c-.003-.038-.006-.087-.056-.083zm-.017-.968a.867.867 0 00-.467.127c-.076.045-.084.07-.05.158.034.087.07.173.115.254.064.117.09.125.21.077a.657.657 0 01.336-.053c.202.022.357.136.504.264l.092.077c.007-.006.014-.013.022-.018-.019-.105-.035-.226-.149-.264-.157-.053-.324-.075-.508-.117l-.24-.005c.24-.169.452-.044.687.009-.063-.115-.153-.147-.23-.193-.082-.05-.17-.092-.25-.144-.06-.037-.12-.08-.072-.172zm10.233.325c-.23-.01-.427.08-.608.211-.034.026-.06.065-.105.117.087.026.15.046.232.065.044-.015.088-.03.13-.046.306-.114.61-.115.904.031.126.063.237.04.366-.005-.02-.031-.03-.054-.045-.071a.986.986 0 00-.448-.273c-.14-.044-.284-.024-.426-.03zM7.99 6.483a.308.308 0 00.002.133c.08.321.156.643.242.962.104.387.27.75.456 1.103.02.037.061.08.098.087a.404.404 0 00.253-.051l-.472-.84c-.23-.448-.405-.92-.579-1.394zM10.397.497c-.2-.008-.405.004-.603.034-.236.035-.47.087-.7.152-.287.08-.569.18-.852.273-.04.013-.074.038-.11.058.028.014.05.018.07.014.287-.068.58-.085.873-.09.134-.002.269.009.402.025.19.024.382.048.57.09.456.104.874.3 1.265.556.464.306.888.66 1.257 1.078.205.232.395.475.56.739.17.274.315.561.449.856.273.601.456 1.232.6 1.876.04.173.07.348.1.524.017.104.065.167.17.19.122.028.2.105.22.251-.003.102-.06.174-.129.24a1.065 1.065 0 00-.268.358.164.164 0 00.083-.039c.08-.086.162-.172.235-.265a.56.56 0 00.13-.333c.009-.05.022-.1.024-.15.007-.124-.017-.15-.143-.168-.025-.004-.049-.014-.073-.015-.082-.007-.125-.063-.137-.131-.033-.198-.004-.355.247-.408.086-.018.174-.03.26-.042.158-.023.315-.053.473-.067.14-.012.19.033.226.167.008.029.018.057.021.087.019.179-.008.225-.141.288-.027.013-.055.024-.078.042a.148.148 0 00-.051.067c-.039.144.073.382.206.445l.673.32c.023.011.05.015.075.023l.018-.026c-.015-.008-.032-.013-.044-.024a2.27 2.27 0 00-.544-.32 4.898 4.898 0 00-.173-.075.203.203 0 01-.126-.191c-.003-.085.045-.154.128-.187l.059-.025c.099-.044.118-.076.112-.187a.384.384 0 00-.008-.063c-.067-.294-.123-.59-.205-.88a9.478 9.478 0 00-.826-2.036 7.465 7.465 0 00-1.39-1.805 4.536 4.536 0 00-1.177-.824 3.656 3.656 0 00-1.016-.328 6.155 6.155 0 00-.712-.074zm6.719 5.955c.01.014.018.028.038.034l-.022-.044-.016.01zM4.103 3.917a.062.062 0 01-.03.012.455.455 0 01-.04.039c-.01.01-.02.02-.045.04l-.363.354c-.088.085-.17.178-.266.253-.284.22-.425.53-.544.855a.132.132 0 00-.007.071c.013.055.033.108.052.168l.074.026c-.017.056-.03.105-.047.152-.058.164-.118.327-.175.491-.005.015.008.036.019.077.08-.175.158-.33.225-.489.228-.544.484-1.074.819-1.561.09-.133.182-.266.283-.401.004-.006.007-.013.022-.03.001-.016.003-.032.015-.04l.008-.017zm12.976 2.408a.023.023 0 01.009.019.073.073 0 00-.006.01.188.188 0 00.007.02l.018.022c.002-.007.007-.016.005-.021-.003-.01-.012-.018-.02-.038a1.331 1.331 0 01-.013-.012zM4.199 4.48c-.003.004-.008.008-.027.014-.005.013-.011.025-.031.047a2.085 2.085 0 01-.124.167c-.048.07-.116.055-.181.041-.134-.028-.228.016-.287.143-.089.187-.187.37-.273.56-.049.108-.11.216-.118.36.081.003.154.007.228.008h.228a2.563 2.563 0 01-.079.264c-.01.052-.022.103-.033.155l.02.004c.018-.046.037-.092.067-.153.066-.142.13-.285.2-.426.02-.04.034-.1.116-.092 0 .043.004.084 0 .124-.005.045-.017.09-.028.143.141.043.086.174.115.269.102-.022.104-.195.248-.144v.205l.017.002.439-1.059c-.13 0-.246-.02-.358.033-.024.011-.058-.001-.108-.004.075-.15.139-.278.211-.417a.128.128 0 01.025-.036c0-.015-.001-.03.008-.038l.006-.02c-.005.006-.01.011-.028.017-.004.012-.009.024-.026.045a.085.085 0 01-.032.033c-.123.157-.09.164-.258.106-.079-.027-.078-.028-.047-.144.028-.046.056-.093.098-.15 0-.016-.001-.032.007-.042L4.2 4.48zm2.073-.67c-.003.006-.007.011-.027.016-.094.125-.194.246-.28.377-.155.238-.301.481-.451.723-.14.224-.345.368-.575.481-.017.008-.04.006-.079.011.012-.059.016-.109.033-.153a6.076 6.076 0 01.229-.518l-.007-.02a.138.138 0 01-.035.025c-.028.05-.055.1-.093.164-.26.424-.443.817-.442.95.024.004.048.011.073.013.177.013.188.007.26-.165.03-.07.077-.12.147-.15l.175-.07c.044-.018.085-.057.146-.032.003.05-.01.11.014.145.042.062.044.125.047.193.002.049.017.098.026.147.029-.034.039-.065.05-.097.142-.39.277-.782.428-1.17.1-.256.22-.504.33-.756.013-.03.013-.067.03-.092V3.81zm3.987-.34c0 .045.01.084.021.123.042.16.094.318.124.48.024.133.023.27.028.406 0 .033-.019.067-.032.11-.094-.058-.047-.158-.106-.215h-.125c-.015.072-.01.152-.046.2-.066.085-.155.154-.236.227-.043.038-.078.018-.103-.025l-.046-.087c-.065.035-.117.069-.172.093-.116.051-.235.095-.35.147-.085.038-.09.053-.07.147.014.075.034.148.047.223.013.072.05.109.123.124.233.05.462.115.657.265.058-.102.058-.102.168-.151.03-.014.06-.03.092-.042.08-.03.115-.017.15.06.023.048.041.098.066.158.06-.14-.042-.267.017-.416.157.18.24.39.375.567a.235.235 0 00.022-.098c.002-.124 0-.247.002-.371 0-.034.013-.067.02-.1l.032-.003c.11.155.13.354.226.52a3.036 3.036 0 00-.01-.392c-.004-.045 0-.074.05-.088.08.036.116.14.215.158-.03-.275-.423-1.137-.798-1.635-.114-.127-.2-.28-.34-.386zm-2.667.696c-.019.034-.03.05-.037.067-.061.185-.125.37-.18.556-.031.105-.087.169-.195.19-.09.019-.178.052-.268.073-.038.009-.089.015-.118-.003-.024-.016-.025-.069-.036-.106-.064.076-.082.087-.17.047-.133-.062-.262-.135-.393-.201-.048-.025-.093-.063-.17-.03-.043.12-.091.25-.137.382-.099.28-.087.242.095.453.046.048.102.03.154.023.054-.009.106-.03.16-.036.13-.013.26-.08.367-.015.204-.064.387-.122.571-.178.05-.015.089.005.114.054.022.042.034.093.082.121.038-.056-.013-.128.063-.178l.14.241-.042-1.46zm.278.358c-.096-.01-.107.01-.11.108-.002.038-.003.078.002.115.03.2.099.386.174.57.002.006.012.01.022.015l.078-.05c.052.036.081.088.153.088.205-.002.41.014.616.012.099-.001.158.042.205.12.018.03.024.077.088.066l-.08-.394c-.05-.195-.085-.395-.172-.589-.057.057-.114.068-.18.046a.72.72 0 00-.135-.028c-.22-.028-.44-.059-.66-.08zm10.254-1.727c.089.163.155.316.139.491-.016.168.026.342-.044.516-.047-.033-.088-.082-.112-.075-.117.035-.164-.057-.227-.115a4.772 4.772 0 01-.286-.29l-.104-.113a4.856 4.856 0 01-.023.019c.035.046.07.093.11.156.04.064.084.127.122.193.034.058.065.118.031.205-.082-.01-.164-.019-.246-.032-.06-.01-.101 0-.124.07-.031.098-.037.096-.15.09.02.042.036.08.057.116.041.074.03.138-.03.196-.06.06-.118.122-.178.181a.175.175 0 01-.185.046c-.222-.061-.447-.113-.67-.174-.032-.009-.063-.04-.086-.068-.03-.04-.052-.087-.08-.13-.044-.07-.09-.138-.136-.207a.18.18 0 00-.014.105c.012.127.03.253.035.38.005.1-.024.12-.121.104-.104-.017-.206-.04-.31-.058-.064-.012-.131-.028-.202.03l.081.208c.09 0 .166-.01.237.002a.819.819 0 01.458.251c.078.083.154.168.241.26l.018-.005c-.004-.006-.008-.013-.01-.04.014-.056-.062-.118.018-.178.031.03.064.057.088.09.058.078.111.159.169.257l.089.141.024-.013a2093.819 2093.819 0 01-.427-.934c.055.007.083.007.108.016.193.07.385.142.577.216.074.028.147.06.219.094.062.028.112.018.157-.033.05-.056.102-.112.154-.167.05-.051.095-.046.132.014.016.025.026.053.04.08.071.138.143.277.217.433l.159.308.025-.011c-.044-.106-.07-.218-.138-.334-.057-.182-.168-.346-.206-.545.136.034.362.326.567.732l.057.074.018-.011a1.563 1.563 0 01-.052-.127c-.046-.145-.097-.29-.136-.436-.022-.083-.036-.173.022-.26l.109.058-.026-.207.027-.016c.022.02.05.036.065.06.073.108.143.22.215.33.01.016.029.029.043.043-.036-.217-.2-.38-.229-.626l.155.112c.014-.166.012-.319.042-.465.032-.158-.023-.297-.063-.445.024.004.036.006.055.025.092.124.183.249.277.371.02.027.05.047.069.087l.04.063.019-.015a.293.293 0 01-.053-.082 27.922 27.922 0 01-.332-.49c-.221-.311-.363-.467-.485-.521zm-6.57.327c-.003.161.092.275.069.415l-.368.087c.09.139.032.237-.052.331-.05.057-.092.122-.143.178-.037.04-.046.078-.018.126l.16.275c.029.048.072.066.128.064.076-.003.152 0 .228-.001.116-.003.216.022.275.137.006.014.02.024.044.052.004-.059-.003-.098.01-.13.016-.04.04-.099.072-.108.084-.023.173-.024.26-.03.013-.001.027.018.04.029l.071.065c.019-.11-.082-.198-.024-.31l.126.04c-.026-.123-.07-.245-.071-.366 0-.123.051-.243.115-.36.107.062.16.156.234.253.183.265.36.533.494.834.165-.078.27.068.407.088-.003-.106-.133-.441-.197-.492a.142.142 0 00-.102-.028c-.06.011-.119.039-.191.063-.025-.039-.056-.078-.077-.122a3.936 3.936 0 00-.473-.783c-.076-.094-.16-.182-.228-.26l-.391.285c-.049.035-.094.03-.132-.017l-.169-.207c-.025-.03-.053-.059-.097-.108z`}),t[0]=n,t[1]=r,t[2]=i,t[3]=a):(n=t[0],r=t[1],i=t[2],a=t[3]);let o;return t[4]===e?o=t[5]:(o=(0,_.jsxs)(`svg`,{role:`img`,"aria-label":`Hermes icon`,xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,fill:`currentColor`,fillRule:`evenodd`,viewBox:`0 0 24 24`,...e,children:[n,r,i,a]}),t[4]=e,t[5]=o),o}function Kt(e){let t=(0,K.c)(7),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,_.jsx)(`title`,{children:`OpenClaw icon`}),t[0]=n):n=t[0];let r;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,_.jsxs)(`mask`,{id:`openclaw-eyes`,maskUnits:`userSpaceOnUse`,x:0,y:0,width:120,height:120,children:[(0,_.jsx)(`rect`,{width:120,height:120,fill:`white`}),(0,_.jsx)(`circle`,{cx:45,cy:35,r:6,fill:`black`}),(0,_.jsx)(`circle`,{cx:75,cy:35,r:6,fill:`black`})]}),t[1]=r):r=t[1];let i,a,o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,_.jsxs)(`g`,{fill:`currentColor`,mask:`url(#openclaw-eyes)`,children:[(0,_.jsx)(`path`,{d:`M60 10 C30 10 15 35 15 55 C15 75 30 95 45 100 L45 110 L55 110 L55 100 C55 100 60 102 65 100 L65 110 L75 110 L75 100 C90 95 105 75 105 55 C105 35 90 10 60 10Z`}),(0,_.jsx)(`path`,{d:`M20 45 C5 40 0 50 5 60 C10 70 20 65 25 55 C28 48 25 45 20 45Z`}),(0,_.jsx)(`path`,{d:`M100 45 C115 40 120 50 115 60 C110 70 100 65 95 55 C92 48 95 45 100 45Z`})]}),a=(0,_.jsx)(`path`,{d:`M45 15 Q35 5 30 8`,fill:`none`,stroke:`currentColor`,strokeWidth:3,strokeLinecap:`round`}),o=(0,_.jsx)(`path`,{d:`M75 15 Q85 5 90 8`,fill:`none`,stroke:`currentColor`,strokeWidth:3,strokeLinecap:`round`}),t[2]=i,t[3]=a,t[4]=o):(i=t[2],a=t[3],o=t[4]);let s;return t[5]===e?s=t[6]:(s=(0,_.jsxs)(`svg`,{role:`img`,"aria-label":`OpenClaw icon`,xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,fill:`none`,viewBox:`0 0 120 120`,...e,children:[n,r,i,a,o]}),t[5]=e,t[6]=s),s}function qt(e){let t=(0,K.c)(5),n,r,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,_.jsx)(`title`,{children:`OpenCode icon`}),r=(0,_.jsx)(`path`,{fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`,d:`M384 416H128V96H384V416ZM320 160H192V352H320V160Z`}),i=(0,_.jsx)(`path`,{fill:`currentColor`,fillOpacity:.55,d:`M320 224V352H192V224H320Z`}),t[0]=n,t[1]=r,t[2]=i):(n=t[0],r=t[1],i=t[2]);let a;return t[3]===e?a=t[4]:(a=(0,_.jsxs)(`svg`,{role:`img`,"aria-label":`OpenCode icon`,xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,fill:`none`,viewBox:`0 0 512 512`,...e,children:[n,r,i]}),t[3]=e,t[4]=a),a}function Jt(e){let t=(0,K.c)(5),n,r,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,_.jsx)(`title`,{children:`Pi icon`}),r=(0,_.jsx)(`path`,{fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`,d:`M165.29 165.29H517.36V400H400V517.36H282.65V634.72H165.29ZM282.65 282.65V400H400V282.65Z`}),i=(0,_.jsx)(`path`,{fill:`currentColor`,d:`M517.36 400H634.72V634.72H517.36Z`}),t[0]=n,t[1]=r,t[2]=i):(n=t[0],r=t[1],i=t[2]);let a;return t[3]===e?a=t[4]:(a=(0,_.jsxs)(`svg`,{role:`img`,"aria-label":`Pi icon`,xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,fill:`none`,viewBox:`0 0 800 800`,...e,children:[n,r,i]}),t[3]=e,t[4]=a),a}var Yt={"claude-cowork":`claude`,"claude-code":`claude`,codex:`openai`,cursor:`cursor`,copilot:`github`,opencode:`opencode`,pi:`pi`,antigravity:`antigravity`,openclaw:`openclaw`,hermes:`hermes`};function Xt(e){let t=(0,K.c)(47),n,i,o,s;t[0]===e?(n=t[1],i=t[2],o=t[3],s=t[4]):({id:i,style:s,className:n,...o}=e,t[0]=e,t[1]=n,t[2]=i,t[3]=o,t[4]=s);let{resolvedTheme:c}=r(),l=Yt[i],u=l?(c===`dark`?me[l]:void 0)??he[l]:void 0,d;t[5]!==u||t[6]!==s?(d=u?{...s,"--ok-brand-color":u}:s,t[5]=u,t[6]=s,t[7]=d):d=t[7];let f=d,p=u&&`[&_*]:![color:var(--ok-brand-color)]`,m;t[8]!==n||t[9]!==p?(m=a(p,n),t[8]=n,t[9]=p,t[10]=m):m=t[10];let h=m;if(i===`claude-cowork`||i===`claude-code`){let e;return t[11]!==h||t[12]!==f||t[13]!==o?(e=(0,_.jsx)(ve,{style:f,className:h,...o}),t[11]=h,t[12]=f,t[13]=o,t[14]=e):e=t[14],e}if(i===`codex`){let e;return t[15]!==h||t[16]!==f||t[17]!==o?(e=(0,_.jsx)(ye,{style:f,className:h,...o}),t[15]=h,t[16]=f,t[17]=o,t[18]=e):e=t[18],e}if(i===`cursor`){let e;return t[19]!==h||t[20]!==f||t[21]!==o?(e=(0,_.jsx)(be,{style:f,className:h,...o}),t[19]=h,t[20]=f,t[21]=o,t[22]=e):e=t[22],e}if(i===`copilot`){let e;return t[23]!==h||t[24]!==f||t[25]!==o?(e=(0,_.jsx)(xe,{style:f,className:h,...o}),t[23]=h,t[24]=f,t[25]=o,t[26]=e):e=t[26],e}if(i===`opencode`){let e;return t[27]!==h||t[28]!==f||t[29]!==o?(e=(0,_.jsx)(qt,{style:f,className:h,...o}),t[27]=h,t[28]=f,t[29]=o,t[30]=e):e=t[30],e}if(i===`pi`){let e;return t[31]!==h||t[32]!==f||t[33]!==o?(e=(0,_.jsx)(Jt,{style:f,className:h,...o}),t[31]=h,t[32]=f,t[33]=o,t[34]=e):e=t[34],e}if(i===`antigravity`){let e;return t[35]!==h||t[36]!==f||t[37]!==o?(e=(0,_.jsx)(Wt,{style:f,className:h,...o}),t[35]=h,t[36]=f,t[37]=o,t[38]=e):e=t[38],e}if(i===`openclaw`){let e;return t[39]!==h||t[40]!==f||t[41]!==o?(e=(0,_.jsx)(Kt,{style:f,className:h,...o}),t[39]=h,t[40]=f,t[41]=o,t[42]=e):e=t[42],e}if(i===`hermes`){let e;return t[43]!==h||t[44]!==f||t[45]!==o?(e=(0,_.jsx)(Gt,{style:f,className:h,...o}),t[43]=h,t[44]=f,t[45]=o,t[46]=e):e=t[46],e}return null}var Zt=fe;function Qt(e){return pe[e].handoffTarget}export{ut as A,_t as C,ft as D,pt as E,mt as M,dt as O,kt as S,gt as T,jt as _,Vt as a,Ot as b,Rt as c,It as d,Bt as f,At as g,Mt as h,Nt as i,ht as j,ct as k,Ht as l,Pt as m,Qt as n,Lt as o,zt as p,Xt as r,Ft as s,Zt as t,Ut as u,xt as v,vt as w,bt as x,yt as y};
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{n as r}from"./dist-PQ5KMVDh.js";import{t as i}from"./compiler-runtime-BfE3aGVn.js";import{t as a}from"./utils-CPqDy6Hr.js";import{c as o,i as s,l as c,o as l,t as u}from"./dist-DsLZcVyZ.js";import{_ as d,a as f,c as p,d as m,f as h,g as ee,h as te,i as ne,l as re,m as ie,n as ae,o as oe,p as se,r as ce,s as le,t as ue,u as de}from"./dist-Be8lWZxP2.js";import"./dropdown-menu-BpLbh79a.js";import{$t as fe,Qt as pe,n as me,t as he}from"./dist-CWxNQtC52.js";import{t as ge}from"./check-Bzwwm-o4.js";import{t as _e}from"./chevron-right-BVvjaUfh.js";import{i as ve,n as ye,t as be}from"./cursor-Dy0g2caC.js";import{t as xe}from"./copilot-BvcrBiQu.js";var g=e(n(),1),_=t(),v=`ContextMenu`,[Se,Ce]=o(v,[d]),y=d(),[we,b]=Se(v),x=e=>{let{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:a=!0}=e,[o,s]=g.useState(!1),c=y(t),l=u(r),d=g.useCallback(e=>{s(e),l(e)},[l]);return(0,_.jsx)(we,{scope:t,open:o,onOpenChange:d,modal:a,children:(0,_.jsx)(h,{...c,dir:i,open:o,onOpenChange:d,modal:a,children:n})})};x.displayName=v;var S=`ContextMenuTrigger`,C=g.forwardRef((e,t)=>{let{__scopeContextMenu:n,disabled:r=!1,...i}=e,a=b(S,n),o=y(n),s=g.useRef({x:0,y:0}),u=g.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...s.current})}),d=g.useRef(0),f=g.useCallback(()=>window.clearTimeout(d.current),[]),p=e=>{s.current={x:e.clientX,y:e.clientY},a.onOpenChange(!0)};return g.useEffect(()=>f,[f]),g.useEffect(()=>void(r&&f()),[r,f]),(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(ue,{...o,virtualRef:u}),(0,_.jsx)(c.span,{"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,...i,ref:t,style:{WebkitTouchCallout:`none`,...e.style},onContextMenu:r?e.onContextMenu:l(e.onContextMenu,e=>{f(),p(e),e.preventDefault()}),onPointerDown:r?e.onPointerDown:l(e.onPointerDown,j(e=>{f(),d.current=window.setTimeout(()=>p(e),700)})),onPointerMove:r?e.onPointerMove:l(e.onPointerMove,j(f)),onPointerCancel:r?e.onPointerCancel:l(e.onPointerCancel,j(f)),onPointerUp:r?e.onPointerUp:l(e.onPointerUp,j(f))})]})});C.displayName=S;var Te=`ContextMenuPortal`,Ee=e=>{let{__scopeContextMenu:t,...n}=e,r=y(t);return(0,_.jsx)(re,{...r,...n})};Ee.displayName=Te;var De=`ContextMenuContent`,Oe=g.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=b(De,n),a=y(n),o=g.useRef(!1);return(0,_.jsx)(ne,{...a,...r,ref:t,side:`right`,sideOffset:2,align:`start`,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),!t.defaultPrevented&&o.current&&t.preventDefault(),o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),!t.defaultPrevented&&!i.modal&&(o.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-context-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-context-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-context-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-context-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});Oe.displayName=De;var ke=`ContextMenuGroup`,w=g.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=y(n);return(0,_.jsx)(f,{...i,...r,ref:t})});w.displayName=ke;var Ae=`ContextMenuLabel`,je=g.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=y(n);return(0,_.jsx)(p,{...i,...r,ref:t})});je.displayName=Ae;var Me=`ContextMenuItem`,T=g.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=y(n);return(0,_.jsx)(oe,{...i,...r,ref:t})});T.displayName=Me;var Ne=`ContextMenuCheckboxItem`,E=g.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=y(n);return(0,_.jsx)(ce,{...i,...r,ref:t})});E.displayName=Ne;var Pe=`ContextMenuRadioGroup`,Fe=g.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=y(n);return(0,_.jsx)(de,{...i,...r,ref:t})});Fe.displayName=Pe;var Ie=`ContextMenuRadioItem`,Le=g.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=y(n);return(0,_.jsx)(m,{...i,...r,ref:t})});Le.displayName=Ie;var Re=`ContextMenuItemIndicator`,D=g.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=y(n);return(0,_.jsx)(le,{...i,...r,ref:t})});D.displayName=Re;var ze=`ContextMenuSeparator`,O=g.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=y(n);return(0,_.jsx)(se,{...i,...r,ref:t})});O.displayName=ze;var Be=`ContextMenuArrow`,Ve=g.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=y(n);return(0,_.jsx)(ae,{...i,...r,ref:t})});Ve.displayName=Be;var He=`ContextMenuSub`,k=e=>{let{__scopeContextMenu:t,children:n,onOpenChange:r,open:i,defaultOpen:a}=e,o=y(t),[c,l]=s({prop:i,defaultProp:a??!1,onChange:r,caller:He});return(0,_.jsx)(ie,{...o,open:c,onOpenChange:l,children:n})};k.displayName=He;var Ue=`ContextMenuSubTrigger`,A=g.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=y(n);return(0,_.jsx)(ee,{...i,...r,ref:t})});A.displayName=Ue;var We=`ContextMenuSubContent`,Ge=g.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=y(n);return(0,_.jsx)(te,{...i,...r,ref:t,style:{...e.style,"--radix-context-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-context-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-context-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-context-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-context-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});Ge.displayName=We;function j(e){return t=>t.pointerType===`mouse`?void 0:e(t)}var Ke=x,qe=C,Je=Ee,Ye=Oe,Xe=w,Ze=je,Qe=T,$e=E,et=D,tt=O,nt=k,rt=A,it=Ge,M=`ok-acp-registered-agents-v1`,N={agents:[],defaultKey:null};function P(e){return`${e.source}:${e.id}`}function at(e){if(typeof e!=`object`||!e)return!1;let t=e;return(t.source===`registry`||t.source===`custom`)&&typeof t.id==`string`&&t.id!==``&&typeof t.name==`string`&&t.name!==``&&(t.iconUrl===void 0||typeof t.iconUrl==`string`)&&(t.lastUsedAt===void 0||typeof t.lastUsedAt==`number`)&&(t.featured===void 0||typeof t.featured==`boolean`)}function ot(){let e;try{e=localStorage.getItem(M)}catch{return N}if(e===null)return N;try{let t=JSON.parse(e),n=Array.isArray(t.agents)?t.agents.filter(at):[];return{agents:n,defaultKey:typeof t.defaultKey==`string`&&n.some(e=>P(e)===t.defaultKey)?t.defaultKey:null}}catch(e){return console.warn(`[registered-agents] discarding corrupt localStorage payload`,e),N}}function F(e){try{localStorage.setItem(M,JSON.stringify(e))}catch(e){console.warn(`[registered-agents] failed to persist registration`,e)}}var I=null,L=[],R=null,z=new Set;function B(){return I===null&&(I=ot()),I}function V(e){I=e,R=G(e.agents,L);for(let e of z)e()}function st(){V(ot())}typeof window<`u`&&typeof window.addEventListener==`function`&&window.addEventListener(`storage`,e=>{(e.key===M||e.key===null)&&st()});function H(e){return z.add(e),()=>z.delete(e)}var U=()=>(R===null&&(R=G(B().agents,L)),R),W=()=>{let{agents:e,defaultKey:t}=B();return t===null?null:e.find(e=>P(e)===t)??null};function ct(e,t={}){let{makeDefault:n=!0}=t,r=P(e),i=B();if(!n){let t={agents:i.agents.some(e=>P(e)===r)?i.agents.map(t=>P(t)===r?{...e,...t.lastUsedAt===void 0?{}:{lastUsedAt:t.lastUsedAt}}:t):[...i.agents,e],defaultKey:i.defaultKey};F(t),V(t);return}let a=i.agents.filter(e=>P(e)!==r),o={agents:[{...e,lastUsedAt:Date.now()},...a],defaultKey:r};F(o),V(o)}function lt(e,t){let n=e.lastUsedAt??0,r=t.lastUsedAt??0;if(n!==r)return r-n;let i=e.featured===!0?0:1,a=t.featured===!0?0:1;return i===a?e.name.localeCompare(t.name,void 0,{numeric:!0,sensitivity:`base`}):i-a}function G(e,t){let n=new Set(e.map(P));return[...e,...t.filter(e=>!n.has(P(e)))].sort(lt)}function ut(e){L=[...e],R=G(B().agents,L);for(let e of z)e()}function dt(e,t){let n=B();if(n.defaultKey!==e)return;let r=n.agents.find(n=>P(n)!==e&&t(n))??null,i={agents:n.agents,defaultKey:r?P(r):null};F(i),V(i)}function ft(e,t){return t!==null&&e.some(e=>e.source===t.source&&e.id===t.id)?t:e[0]??null}function pt(e){let t=new Map(e.map(e=>[P(e),e])),n=B(),r=!1,i=n.agents.map(e=>{let n=t.get(P(e));if(n===void 0)return e;let i=n.name??e.name,a=n.iconUrl??e.iconUrl,o=n.supported??e.supported,s=n.featured??e.featured;return i===e.name&&a===e.iconUrl&&o===e.supported&&s===e.featured?e:(r=!0,{...e,name:i,...a===void 0?{}:{iconUrl:a},...o===void 0?{}:{supported:o},...s===void 0?{}:{featured:s}})});if(!r)return;let a={agents:i,defaultKey:n.defaultKey};F(a),V(a)}function mt(){return(0,g.useSyncExternalStore)(H,U,U)}function ht(){return(0,g.useSyncExternalStore)(H,W,W)}var K=i();async function gt(e,t={}){let n=t.okDesktop??(typeof window<`u`?window.okDesktop:void 0);if(n?.shell?.openExternal)try{return await n.shell.openExternal(e),{ok:!0}}catch(e){return{ok:!1,reason:`dispatch-error`,detail:q(e)}}let r=t.doc??(typeof document<`u`?document:void 0);if(!r)return{ok:!1,reason:`dispatch-error`,detail:`no DOM available`};try{let t=r.createElement(`a`);return t.href=e,t.rel=`noopener noreferrer`,/^https?:/i.test(e)&&(t.target=`_blank`),r.body.appendChild(t),t.click(),t.remove(),{ok:!0}}catch(e){return{ok:!1,reason:`dispatch-error`,detail:q(e)}}}function q(e){if(e instanceof Error)return e.message;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}var _t=[{id:`claude-cowork`,displayName:`Claude Cowork`,appBrandName:`Claude Desktop`,schemes:[`claude:`],installUrl:`https://claude.com/download`,tagline:`Conversational pairing in Claude Desktop's Cowork tab.`},{id:`claude-code`,displayName:`Claude`,appBrandName:`Claude Desktop`,schemes:[`claude:`],installUrl:`https://claude.com/download`,tagline:`Agentic coding in Claude Desktop's Code tab.`},{id:`codex`,displayName:`ChatGPT`,appBrandName:`ChatGPT Desktop`,schemes:[`codex:`],installUrl:`https://developers.openai.com/codex/app`,tagline:`OpenAI's ChatGPT desktop app, home of the Codex agent.`},{id:`cursor`,displayName:`Cursor`,schemes:[`cursor:`],installUrl:`https://cursor.com/`,tagline:`AI-first VS Code fork with multi-file edits.`},{id:`copilot`,displayName:`GitHub Copilot`,schemes:[],installUrl:`https://docs.github.com/en/copilot/how-tos/copilot-cli/cli-getting-started`,tagline:`GitHub's terminal-native coding agent.`},{id:`opencode`,displayName:`OpenCode`,schemes:[],installUrl:`https://opencode.ai`,tagline:`Open-source terminal coding agent; bring any local model.`},{id:`pi`,displayName:`Pi`,schemes:[],installUrl:`https://pi.dev`,tagline:`Minimal open-source terminal coding agent, extensible in TypeScript.`},{id:`antigravity`,displayName:`Antigravity`,schemes:[],installUrl:`https://antigravity.google`,tagline:"Google's agentic IDE + `agy` terminal agent."},{id:`openclaw`,displayName:`OpenClaw`,schemes:[],installUrl:`https://openclaw.ai`,tagline:`Open-source agent gateway; runs agents against your MCP servers.`},{id:`hermes`,displayName:`Hermes`,schemes:[],installUrl:`https://hermes-agent.nousresearch.com`,tagline:`Nous Research's terminal coding agent.`}],vt=_t.filter(e=>e.id!==`claude-cowork`&&e.id!==`copilot`&&e.id!==`opencode`&&e.id!==`pi`&&e.id!==`antigravity`&&e.id!==`openclaw`&&e.id!==`hermes`),J=`ok-acp-enabled-agents-v1`,Y={};function yt(e,t){return`in-app:${e}:${t}`}function bt(e){return`terminal:${e}`}function xt(e){return`desktop:${e}`}function X(e,t){return e??t}function St(){let e;try{e=localStorage.getItem(J)}catch(e){return console.warn(`[enabled-agents] localStorage unavailable; treating overrides as empty`,e),Y}if(e===null)return Y;try{let t=JSON.parse(e);if(typeof t!=`object`||!t)return Y;let n={};for(let[e,r]of Object.entries(t))typeof r==`boolean`&&(n[e]=r);return n}catch(e){return console.warn(`[enabled-agents] discarding corrupt localStorage payload`,e),Y}}function Ct(e){try{localStorage.setItem(J,JSON.stringify(e))}catch(e){console.warn(`[enabled-agents] failed to persist override`,e)}}var Z=null,Q=new Set;function wt(){return Z===null&&(Z=St()),Z}function $(e){Z=e;for(let e of Q)e()}function Tt(){$(St())}typeof window<`u`&&typeof window.addEventListener==`function`&&window.addEventListener(`storage`,e=>{(e.key===J||e.key===null)&&Tt()});function Et(e){return Q.add(e),()=>Q.delete(e)}var Dt=()=>wt();function Ot(e,t){let n=wt();if(t===void 0){if(!(e in n))return;let{[e]:t,...r}=n;Ct(r),$(r);return}if(n[e]===t)return;let r={...n,[e]:t};Ct(r),$(r)}function kt(){return(0,g.useSyncExternalStore)(Et,Dt,Dt)}function At(e,t,n,r,i){return i===!1?!1:X(e[yt(t,n)],r)}function jt(e,t,n){return X(e[bt(t)],n[t]!==!1)}function Mt(e,t,n){return X(e[xt(t)],n===!0)}function Nt(e){let t=(0,K.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,_.jsx)(Ke,{"data-slot":`context-menu`,...n}),t[2]=n,t[3]=r),r}function Pt(e){let t=(0,K.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=a(`select-none`,n),t[3]=n,t[4]=i);let o;return t[5]!==r||t[6]!==i?(o=(0,_.jsx)(qe,{"data-slot":`context-menu-trigger`,className:i,...r}),t[5]=r,t[6]=i,t[7]=o):o=t[7],o}function Ft(e){let t=(0,K.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,_.jsx)(Xe,{"data-slot":`context-menu-group`,...n}),t[2]=n,t[3]=r),r}function It(e){let t=(0,K.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,_.jsx)(nt,{"data-slot":`context-menu-sub`,...n}),t[2]=n,t[3]=r),r}function Lt(e){let t=(0,K.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=a(`z-50 max-h-(--radix-context-menu-content-available-height) min-w-36 origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 motion-reduce:data-open:animate-none motion-reduce:data-closed:animate-none motion-reduce:duration-0`,n),t[3]=n,t[4]=i);let o;return t[5]!==r||t[6]!==i?(o=(0,_.jsx)(Je,{children:(0,_.jsx)(Ye,{"data-slot":`context-menu-content`,className:i,...r})}),t[5]=r,t[6]=i,t[7]=o):o=t[7],o}function Rt(e){let t=(0,K.c)(12),n,r,i,o;t[0]===e?(n=t[1],r=t[2],i=t[3],o=t[4]):({className:n,inset:r,variant:o,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o);let s=o===void 0?`default`:o,c;t[5]===n?c=t[6]:(c=a(`group/context-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 focus:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive`,n),t[5]=n,t[6]=c);let l;return t[7]!==r||t[8]!==i||t[9]!==c||t[10]!==s?(l=(0,_.jsx)(Qe,{"data-slot":`context-menu-item`,"data-inset":r,"data-variant":s,className:c,...i}),t[7]=r,t[8]=i,t[9]=c,t[10]=s,t[11]=l):l=t[11],l}function zt(e){let t=(0,K.c)(13),n,r,i,o;t[0]===e?(n=t[1],r=t[2],i=t[3],o=t[4]):({className:r,inset:i,children:n,...o}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o);let s;t[5]===r?s=t[6]:(s=a(`flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,r),t[5]=r,t[6]=s);let c;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,_.jsx)(_e,{className:`ml-auto`}),t[7]=c):c=t[7];let l;return t[8]!==n||t[9]!==i||t[10]!==o||t[11]!==s?(l=(0,_.jsxs)(rt,{"data-slot":`context-menu-sub-trigger`,"data-inset":i,className:s,...o,children:[n,c]}),t[8]=n,t[9]=i,t[10]=o,t[11]=s,t[12]=l):l=t[12],l}function Bt(e){let t=(0,K.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=a(`z-50 max-h-(--radix-context-menu-content-available-height) min-w-32 origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border bg-popover p-1 text-popover-foreground shadow-lg data-[state=closed]:overflow-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 motion-reduce:data-open:animate-none motion-reduce:data-closed:animate-none motion-reduce:duration-0 subtle-scrollbar`,n),t[3]=n,t[4]=i);let o;return t[5]!==r||t[6]!==i?(o=(0,_.jsx)(it,{"data-slot":`context-menu-sub-content`,className:i,...r}),t[5]=r,t[6]=i,t[7]=o):o=t[7],o}function Vt(e){let t=(0,K.c)(15),n,r,i,o,s;t[0]===e?(n=t[1],r=t[2],i=t[3],o=t[4],s=t[5]):({className:i,children:r,checked:n,inset:o,...s}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=s);let c;t[6]===i?c=t[7]:(c=a(`relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,i),t[6]=i,t[7]=c);let l;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,_.jsx)(`span`,{className:`pointer-events-none absolute right-2`,children:(0,_.jsx)(et,{children:(0,_.jsx)(ge,{})})}),t[8]=l):l=t[8];let u;return t[9]!==n||t[10]!==r||t[11]!==o||t[12]!==s||t[13]!==c?(u=(0,_.jsxs)($e,{"data-slot":`context-menu-checkbox-item`,"data-inset":o,className:c,checked:n,...s,children:[l,r]}),t[9]=n,t[10]=r,t[11]=o,t[12]=s,t[13]=c,t[14]=u):u=t[14],u}function Ht(e){let t=(0,K.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,inset:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let o;t[4]===n?o=t[5]:(o=a(`px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7`,n),t[4]=n,t[5]=o);let s;return t[6]!==r||t[7]!==i||t[8]!==o?(s=(0,_.jsx)(Ze,{"data-slot":`context-menu-label`,"data-inset":r,className:o,...i}),t[6]=r,t[7]=i,t[8]=o,t[9]=s):s=t[9],s}function Ut(e){let t=(0,K.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=a(`-mx-1 my-1 h-px bg-border`,n),t[3]=n,t[4]=i);let o;return t[5]!==r||t[6]!==i?(o=(0,_.jsx)(tt,{"data-slot":`context-menu-separator`,className:i,...r}),t[5]=r,t[6]=i,t[7]=o):o=t[7],o}function Wt(e){let t=(0,K.c)(5),n,r,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,_.jsx)(`title`,{children:`Antigravity icon`}),r=(0,_.jsx)(`path`,{fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`,d:`M12 2.5a1.5 1.5 0 0 1 1.28.72l8.5 14A1.5 1.5 0 0 1 20.5 19.5h-17a1.5 1.5 0 0 1-1.28-2.28l8.5-14A1.5 1.5 0 0 1 12 2.5Zm0 4.42L5.83 17h12.34L12 6.92Z`}),i=(0,_.jsx)(`path`,{fill:`currentColor`,d:`M12 9.6 15.6 17h-7.2L12 9.6Z`}),t[0]=n,t[1]=r,t[2]=i):(n=t[0],r=t[1],i=t[2]);let a;return t[3]===e?a=t[4]:(a=(0,_.jsxs)(`svg`,{role:`img`,"aria-label":`Antigravity icon`,xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,fill:`none`,viewBox:`0 0 24 24`,...e,children:[n,r,i]}),t[3]=e,t[4]=a),a}function Gt(e){let t=(0,K.c)(6),n,r,i,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,_.jsx)(`title`,{children:`Hermes icon`}),r=(0,_.jsx)(`path`,{d:`M5.938 12.835c.127-.039.285.02.373.143.028.038.036.092.046.14.003.014-.02.033-.04.05-.124-.098-.24-.194-.354-.291-.011-.01-.016-.027-.025-.042zM8.396 9.412c.195-.032.39-.06.588-.05a.54.54 0 01.148.026c.202.071.402.147.601.224.028.01.05.036.075.055l-.013.027a9.203 9.203 0 01-.26-.089c-.115-.038-.213-.077-.315-.098-.25-.05-.25-.046-.292-.014l.574.144c.275.139.55.276.823.417.042.022.09.057.107.098.026.06.063.076.117.072.066-.006.132-.017.213-.027l-.04.086c.051.08.142.02.216.064-.074.13-.247.09-.334.199l.061.074-.12.087c0 .106-.038.168-.306.243l.026.085-.196.042.07.124h-.25l-.007.137c-.081-.01-.161-.018-.244-.027l-.053.123c-.027-.008-.052-.011-.073-.023-.067-.038-.128-.056-.195.006-.019.017-.063.014-.093.008-.026-.006-.05-.029-.07-.042-.11.095-.11.095-.208.003-.057.046-.12.074-.186.011-.063.027-.123-.02-.178-.014-.07.007-.097-.035-.133-.07l-.13.033c-.013-.236-.194-.19-.34-.203.005-.072.05-.092.095-.094a.474.474 0 01.159.022c.164.05.32.12.496.138.203.021.405.029.601-.015.265-.059.52-.149.707-.365.049-.056.083-.127.117-.195.019-.038.02-.084-.02-.116a1.397 1.397 0 00-.382-.217c.024.12-.031.182-.115.221 0 .014-.004.025 0 .03.08.115.084.16-.007.267a1.39 1.39 0 01-.218.211.477.477 0 01-.641-.05 1.36 1.36 0 01-.133-.152c-.078-.107-.076-.108-.033-.236-.165-.08-.128-.226-.104-.364.008-.05.028-.096.049-.163-.04.014-.067.017-.087.032a.897.897 0 00-.316.357c-.007.016-.01.034-.02.047-.012.015-.034.038-.045.035-.02-.006-.037-.027-.05-.045-.008-.012-.007-.032-.012-.057h-.126l.053-.172a14.82 14.82 0 00-.039-.049l.11-.284c-.06.026-.091.044-.124.051-.03.007-.064 0-.095 0 0-.031-.01-.07.004-.092.149-.22.305-.428.593-.476z`}),i=(0,_.jsx)(`path`,{d:`M8.06 10.788c-.003-.038-.004-.075.037-.062.016.006.034.048.028.067-.01.04-.038.032-.064-.005z`}),a=(0,_.jsx)(`path`,{clipRule:`evenodd`,d:`M11.981.009c.226-.012.453-.011.679 0 .247.01.495.024.74.062.401.064.798.157 1.19.273.463.138.92.299 1.356.511a7.31 7.31 0 012.948 2.642c.292.469.536.963.739 1.479.219.556.446 1.11.623 1.683.204.654.329 1.326.458 1.997.097.504.182 1.01.29 1.511.156.722.329 1.44.494 2.16.186.812.4 1.615.63 2.415.102.355.193.713.282 1.072.11.436.202.876.254 1.323.031.278.066.557.073.837a7.56 7.56 0 01-.017.88c-.037.413-.1.818-.226 1.212a5.017 5.017 0 01-.915 1.649l-.13.156.018.023c.043-.023.088-.041.127-.068.2-.138.373-.307.531-.49.4-.46.721-.973.975-1.529a3.59 3.59 0 00.325-1.72c-.024-.424-.097-.834-.3-1.213-.013-.027-.015-.06-.03-.121.05.035.082.048.101.072.107.13.22.258.315.398.33.494.46 1.052.486 1.64a3.75 3.75 0 01-.47 1.97c-.36.655-.887 1.14-1.526 1.506-.193.111-.394.21-.595.308-.157.078-.248.211-.318.365a.522.522 0 00-.033.406.359.359 0 01.013.139c-.005.077-.077.155-.14.162-.054.006-.125-.043-.15-.116a1.206 1.206 0 01-.06-.233c-.04-.314-.155-.6-.308-.87a3.906 3.906 0 00-.73-.91 2.129 2.129 0 00-.897-.524 4.093 4.093 0 00-.692-.131c-.075-.008-.15-.04-.22.01.18.06.363.11.538.18.434.173.82.43 1.18.728.308.255.58.543.794.884.098.155.186.315.227.496.027.123.042.25.067.375.013.062-.002.109-.053.144-.047.033-.122.034-.163-.01a.455.455 0 01-.08-.14c-.03-.073-.038-.159-.078-.225a7.314 7.314 0 00-1.423-1.664c-.16-.137-.329-.26-.537-.323-.376-.114-.753-.203-1.15-.154-.213.025-.427.032-.64.053a1.6 1.6 0 00-.736.278 5.14 5.14 0 00-.834.72c-.329.342-.642.699-.955 1.055-.136.155-.264.319-.314.531a5.227 5.227 0 00-.012.051.096.096 0 01-.09.076h-.31c-.046 0-.082-.048-.072-.094.023-.108.045-.216.07-.324.075-.325.19-.635.368-.917.024-.039.04-.088.104-.08l.01.049.027.077c.28-.435.571-.834.996-1.135.283-.204.584-.378.89-.55a.196.196 0 00-.098-.002c-.162.043-.325.084-.485.134-.402.124-.764.33-1.11.566-.147.1-.298.193-.414.333a7.314 7.314 0 00-1.07 1.767.845.845 0 00-.04.12.075.075 0 01-.072.056h-.494c-.04 0-.062-.051-.036-.082.123-.14.246-.282.377-.415.275-.281.58-.532.777-.884.027-.048.063-.09.095-.135.238-.333.54-.607.818-.902.082-.086.175-.16.26-.24.029-.027.053-.057.079-.085l-.018-.025-.135.041c-.034.017-.07.031-.102.05-.248.144-.494.292-.743.433-.408.23-.825.439-1.209.711-.281.2-.591.358-.889.533-.02.012-.044.015-.08.028-.015-.135.143-.201.108-.336-.033.014-.064.02-.085.038-.111.096-.227.19-.328.296-.148.157-.284.325-.425.488-.125.143-.25.286-.373.431A.153.153 0 019.89 24H8.762a.316.316 0 00.016-.042c.028-.09.085-.172.083-.28-.091-.018-.162.001-.212.077a4.45 4.45 0 00-.136.215c-.01.016-.024.03-.042.03h-.093c-.019 0-.029-.022-.017-.037.071-.088.14-.178.209-.268.001-.002-.006-.012-.012-.024-.014.004-.03.006-.045.013-.176.09-.352.181-.527.274a.363.363 0 01-.168.042H5.202c-.026 0-.039-.036-.019-.053.21-.178.402-.374.558-.605.335-.496.538-1.047.667-1.629.004-.02-.003-.043-.006-.091-.037.048-.059.072-.076.1a1.943 1.943 0 01-.334.415c-.28.258-.59.448-.983.464-.297.012-.588 0-.865-.127-.46-.21-.722-.57-.794-1.072-.025-.17-.017-.171-.182-.219A3.513 3.513 0 011.97 20.6a2.286 2.286 0 01-.808-1.13 3.569 3.569 0 01-.16-1.245c.002-.034.016-.067.024-.1.032.023.046.043.05.066.033.153.059.308.096.46.086.355.257.664.516.92.258.256.571.419.91.532.358.118.717.138 1.07-.016a1.89 1.89 0 00.621-.452c.328-.348.533-.76.648-1.223.009-.034.005-.071.007-.11-.015.006-.026.006-.03.011-.031.05-.064.1-.093.152-.284.502-.679.887-1.196 1.135-.351.17-.718.255-1.11.159a1.607 1.607 0 01-.971-.64 2.006 2.006 0 01-.368-.924 2.903 2.903 0 01.02-.886c.05-.439.466-1.17.742-1.271-.02.063-.035.112-.053.16-.043.116-.097.227-.13.345a1.901 1.901 0 00-.05.82c.033.212.09.416.204.6.147.236.346.407.62.465.11.023.225.014.338.018a.576.576 0 00.386-.131c.164-.128.282-.292.366-.481.168-.375.24-.777.309-1.179.05-.296.093-.594.133-.893.039-.281.071-.563.104-.845.026-.232.048-.464.074-.696.024-.228.052-.455.076-.683.024-.227.047-.455.069-.683.013-.14.022-.28.034-.42l.037-.417c.022-.25.041-.5.065-.748.008-.082-.02-.132-.09-.177a2.46 2.46 0 01-.492-.418c-.1-.109-.188-.228-.282-.342-.035-.042-.056-.097-.116-.118a2.084 2.084 0 00.275.597c.06.092.131.176.196.265.063.086.182.115.234.226-.028.003-.046.01-.06.006a4.74 4.74 0 01-.22-.057 2.71 2.71 0 01-1.287-.819c-.435-.487-.656-1.076-.71-1.723a5.206 5.206 0 01.014-1.06c.072-.602.22-1.186.45-1.745.155-.376.338-.741.526-1.102.205-.393.466-.75.765-1.076.512-.559 1.104-1.024 1.726-1.448.717-.49 1.478-.898 2.277-1.233C8.244.828 8.767.632 9.31.494c.655-.166 1.31-.33 1.982-.415.229-.03.458-.058.688-.07zm-1.847 22.82c-.07.06-.147.111-.207.18-.238.27-.464.549-.668.869l-.044.108a.177.177 0 00.093-.057c.174-.19.351-.378.519-.574.104-.122.195-.255.288-.386.024-.034.03-.08.046-.12l-.027-.02zm1.65-3.695a5.51 5.51 0 00-.653.593l-.37.386a.963.963 0 01-.377.25 1.372 1.372 0 01-.467.09c-.044 0-.087.006-.151.012.028.058.043.097.064.131.15.242.301.482.45.724.136.22.276.438.399.666.068.125.105.267.156.404.077.027.14-.018.202-.048.29-.135.579-.274.867-.412.213-.101.437-.186.636-.31.347-.215.68-.455 1.018-.685.015-.01.026-.028.042-.046-.023-.019-.038-.037-.056-.044-.287-.111-.527-.3-.77-.482a5.319 5.319 0 01-.506-.42 1.757 1.757 0 01-.41-.653c-.019-.049-.045-.095-.075-.156zm-5.847.264c-.06.096-.097.194-.132.293a3.38 3.38 0 01-.555 1.01c-.2.25-.455.412-.762.493-.23.06-.464.076-.7.07-.048-.002-.097.002-.158.005.016.04.021.066.035.085.1.145.23.246.4.295.157.046.316.034.498.023.181-.037.343-.115.485-.234.238-.199.402-.454.536-.732.175-.363.264-.751.342-1.144.01-.053.008-.11.011-.164zm14.945-4.586c.008.029.016.057.027.107.024.155.051.31.072.464.03.219.067.437.078.657.017.344.027.689-.014 1.033-.037.315-.063.633-.116.946a6.153 6.153 0 01-.46 1.518c-.008.018-.01.039-.02.082.047-.03.077-.042.098-.064.085-.083.17-.167.248-.255.271-.305.458-.66.596-1.043.18-.498.228-1.011.145-1.531-.103-.65-.33-1.263-.597-1.881a9.055 9.055 0 00-.024-.055l-.033.022zM5.797 8.29a.26.26 0 00.018.153c.124.251.25.501.379.75.025.049.066.09.03.163-.284.06-.578.119-.88.255.059.038.097.06.132.087.042.032.112.058.09.12-.01.033-.075.048-.117.072.017.01.043.021.067.036.166.102.33.207.447.368.138.192.229.404.188.644-.079.469-.306.85-.69 1.132-.054.04-.106.083-.161.122a.243.243 0 00-.103.245.77.77 0 00.055.195c.083.196.22.35.375.492.083.076.159.164.222.257a.37.37 0 01.025.377c-.023.05-.05.099-.076.148-.03.06-.028.111.022.162.041.042.08.089.112.138.038.058.078.079.147.05a.486.486 0 01.333-.006c.16.046.302.126.444.21.13.077.264.149.4.219.067.035.14.05.219.026.071-.022.124.01.145.076.02.064-.003.108-.074.139-.07.03-.137.063-.209.088-.1.035-.201.073-.314.077-.013-.107.11-.088.127-.159-.206-.126-.643-.145-.801-.034.063.112.035.21-.096.313-.13-.1-.025-.202.002-.3a.209.209 0 00-.249.17c-.015.101.067.216.178.224.108.007.218-.005.326-.012.06-.005.12-.027.199 0-.103.123-.248.127-.357.19.002.05.07.086.019.131-.053.048-.095-.001-.132-.03-.08-.063-.16-.126-.231-.197a.474.474 0 01-.157-.311.52.52 0 00-.043-.172c-.032-.074-.032-.137.033-.19-.018-.03-.028-.053-.045-.072a1.222 1.222 0 01-.196-.369c-.053-.137-.046-.264.048-.381.024-.03.05-.06.064-.095a.664.664 0 00.047-.168c.017-.165-.064-.287-.182-.387-.186-.156-.36-.322-.46-.551-.005-.011-.024-.017-.037-.026-.011.017-.024.027-.025.038-.019.185-.045.37-.052.557-.014.377.058.743.162 1.104.118.41.289.798.488 1.173.267.502.537 1.002.812 1.5.055.098.13.189.208.27.198.202.452.272.724.273.202 0 .404-.006.605-.026.295-.03.59-.073.884-.113.183-.025.365-.057.548-.08.21-.026.38.073.522.21.16.156.305.327.447.5.22.265.397.56.554.867.05.098.07.1.147.03.13-.121.26-.242.394-.36.067-.059.088-.12.067-.213a3.535 3.535 0 01-.085-.796c.002-.157.006-.314.018-.471.015-.224.03-.45.06-.672a59.114 59.114 0 01.362-2.298c.087-.493.182-.984.268-1.477.06-.347.118-.694.162-1.043.034-.273.055-.55.063-.825.011-.332.003-.665.002-.998 0-.077.004-.155-.01-.23-.028-.142-.01-.155-.162-.19a5.826 5.826 0 00-.607-.107c-.146-.018-.207-.053-.221-.19-.006-.049-.025-.098-.041-.146-.009-.025-.024-.048-.046-.09l-.025.264c-.009.096-.029.116-.127.115-.055 0-.11-.008-.164-.008-.476 0-.952-.008-1.426.032-.095.008-.173-.015-.226-.103-.04-.066-.088-.126-.134-.186-.063-.084-.086-.093-.182-.06-.195.068-.388.138-.582.21a2.71 2.71 0 00-.675.394.986.986 0 01-.323.168c-.033.01-.07.008-.127.013.02-.066.024-.114.047-.15.064-.105.135-.205.205-.306.023-.033.049-.063.073-.095l-.015-.023-.201.037c-.146.04-.296.07-.437.122-.148.053-.266.023-.386-.072a3.623 3.623 0 01-.733-.786l-.093-.132zm8.592 8.963l-.147.09c-.22.134-.44.266-.659.402-.093.058-.184.12-.27.188-.085.07-.124.161-.072.272.047.1.093.2.147.294.047.08.124.138.213.147.11.01.228.012.336-.012.217-.05.372-.205.528-.357a.291.291 0 00.087-.308c-.046-.18-.079-.365-.118-.547-.011-.052-.027-.103-.045-.169zm-.257-2.409c-.12.291-.205.597-.325.91-.151.433-.294.87-.435 1.323.036-.01.054-.01.067-.018.261-.16.522-.324.785-.484.054-.033.071-.078.065-.138-.012-.13-.024-.262-.034-.393l-.068-.886c-.008-.103-.02-.206-.029-.31-.009 0-.017-.002-.026-.004zm3.081-8.13l.099.285c.08.231.159.463.24.714l.58 1.952c.187.63.372 1.262.558 1.893.114.382.235.762.343 1.146.072.257.126.519.186.799.044.206.087.413.127.64.034.106.023.226.077.325l.025-.006-.068-.362c-.038-.206-.077-.412-.113-.638-.015-.07-.029-.141-.046-.211-.095-.396-.177-.796-.29-1.187-.196-.685-.413-1.364-.618-2.046-.165-.549-.322-1.1-.488-1.648-.069-.227-.15-.45-.226-.695l-.117-.336c-.037-.107-.075-.216-.115-.322-.04-.106-.084-.21-.127-.314a7.558 7.558 0 01-.027.01zM6.225 14.304c-.063-.001-.115.014-.134.083a.35.35 0 00.41.012 4.533 4.533 0 00-.276-.095zM5.23 11.98c-.026-.027-.057-.048-.075.002-.012.032-.007.07-.01.113.082-.037.082-.037.085-.115zm.062-1.189a.135.135 0 00-.088.056.197.197 0 00-.025.11c.005.152.01.306.026.457a.751.751 0 00.066.218c.061.136.157.167.288.101.055-.027.06-.054.025-.11a4.52 4.52 0 01-.129-.211c-.015-.068-.066-.131-.033-.207.04-.09-.076-.116-.074-.19V10.874c-.003-.038-.006-.087-.056-.083zm-.017-.968a.867.867 0 00-.467.127c-.076.045-.084.07-.05.158.034.087.07.173.115.254.064.117.09.125.21.077a.657.657 0 01.336-.053c.202.022.357.136.504.264l.092.077c.007-.006.014-.013.022-.018-.019-.105-.035-.226-.149-.264-.157-.053-.324-.075-.508-.117l-.24-.005c.24-.169.452-.044.687.009-.063-.115-.153-.147-.23-.193-.082-.05-.17-.092-.25-.144-.06-.037-.12-.08-.072-.172zm10.233.325c-.23-.01-.427.08-.608.211-.034.026-.06.065-.105.117.087.026.15.046.232.065.044-.015.088-.03.13-.046.306-.114.61-.115.904.031.126.063.237.04.366-.005-.02-.031-.03-.054-.045-.071a.986.986 0 00-.448-.273c-.14-.044-.284-.024-.426-.03zM7.99 6.483a.308.308 0 00.002.133c.08.321.156.643.242.962.104.387.27.75.456 1.103.02.037.061.08.098.087a.404.404 0 00.253-.051l-.472-.84c-.23-.448-.405-.92-.579-1.394zM10.397.497c-.2-.008-.405.004-.603.034-.236.035-.47.087-.7.152-.287.08-.569.18-.852.273-.04.013-.074.038-.11.058.028.014.05.018.07.014.287-.068.58-.085.873-.09.134-.002.269.009.402.025.19.024.382.048.57.09.456.104.874.3 1.265.556.464.306.888.66 1.257 1.078.205.232.395.475.56.739.17.274.315.561.449.856.273.601.456 1.232.6 1.876.04.173.07.348.1.524.017.104.065.167.17.19.122.028.2.105.22.251-.003.102-.06.174-.129.24a1.065 1.065 0 00-.268.358.164.164 0 00.083-.039c.08-.086.162-.172.235-.265a.56.56 0 00.13-.333c.009-.05.022-.1.024-.15.007-.124-.017-.15-.143-.168-.025-.004-.049-.014-.073-.015-.082-.007-.125-.063-.137-.131-.033-.198-.004-.355.247-.408.086-.018.174-.03.26-.042.158-.023.315-.053.473-.067.14-.012.19.033.226.167.008.029.018.057.021.087.019.179-.008.225-.141.288-.027.013-.055.024-.078.042a.148.148 0 00-.051.067c-.039.144.073.382.206.445l.673.32c.023.011.05.015.075.023l.018-.026c-.015-.008-.032-.013-.044-.024a2.27 2.27 0 00-.544-.32 4.898 4.898 0 00-.173-.075.203.203 0 01-.126-.191c-.003-.085.045-.154.128-.187l.059-.025c.099-.044.118-.076.112-.187a.384.384 0 00-.008-.063c-.067-.294-.123-.59-.205-.88a9.478 9.478 0 00-.826-2.036 7.465 7.465 0 00-1.39-1.805 4.536 4.536 0 00-1.177-.824 3.656 3.656 0 00-1.016-.328 6.155 6.155 0 00-.712-.074zm6.719 5.955c.01.014.018.028.038.034l-.022-.044-.016.01zM4.103 3.917a.062.062 0 01-.03.012.455.455 0 01-.04.039c-.01.01-.02.02-.045.04l-.363.354c-.088.085-.17.178-.266.253-.284.22-.425.53-.544.855a.132.132 0 00-.007.071c.013.055.033.108.052.168l.074.026c-.017.056-.03.105-.047.152-.058.164-.118.327-.175.491-.005.015.008.036.019.077.08-.175.158-.33.225-.489.228-.544.484-1.074.819-1.561.09-.133.182-.266.283-.401.004-.006.007-.013.022-.03.001-.016.003-.032.015-.04l.008-.017zm12.976 2.408a.023.023 0 01.009.019.073.073 0 00-.006.01.188.188 0 00.007.02l.018.022c.002-.007.007-.016.005-.021-.003-.01-.012-.018-.02-.038a1.331 1.331 0 01-.013-.012zM4.199 4.48c-.003.004-.008.008-.027.014-.005.013-.011.025-.031.047a2.085 2.085 0 01-.124.167c-.048.07-.116.055-.181.041-.134-.028-.228.016-.287.143-.089.187-.187.37-.273.56-.049.108-.11.216-.118.36.081.003.154.007.228.008h.228a2.563 2.563 0 01-.079.264c-.01.052-.022.103-.033.155l.02.004c.018-.046.037-.092.067-.153.066-.142.13-.285.2-.426.02-.04.034-.1.116-.092 0 .043.004.084 0 .124-.005.045-.017.09-.028.143.141.043.086.174.115.269.102-.022.104-.195.248-.144v.205l.017.002.439-1.059c-.13 0-.246-.02-.358.033-.024.011-.058-.001-.108-.004.075-.15.139-.278.211-.417a.128.128 0 01.025-.036c0-.015-.001-.03.008-.038l.006-.02c-.005.006-.01.011-.028.017-.004.012-.009.024-.026.045a.085.085 0 01-.032.033c-.123.157-.09.164-.258.106-.079-.027-.078-.028-.047-.144.028-.046.056-.093.098-.15 0-.016-.001-.032.007-.042L4.2 4.48zm2.073-.67c-.003.006-.007.011-.027.016-.094.125-.194.246-.28.377-.155.238-.301.481-.451.723-.14.224-.345.368-.575.481-.017.008-.04.006-.079.011.012-.059.016-.109.033-.153a6.076 6.076 0 01.229-.518l-.007-.02a.138.138 0 01-.035.025c-.028.05-.055.1-.093.164-.26.424-.443.817-.442.95.024.004.048.011.073.013.177.013.188.007.26-.165.03-.07.077-.12.147-.15l.175-.07c.044-.018.085-.057.146-.032.003.05-.01.11.014.145.042.062.044.125.047.193.002.049.017.098.026.147.029-.034.039-.065.05-.097.142-.39.277-.782.428-1.17.1-.256.22-.504.33-.756.013-.03.013-.067.03-.092V3.81zm3.987-.34c0 .045.01.084.021.123.042.16.094.318.124.48.024.133.023.27.028.406 0 .033-.019.067-.032.11-.094-.058-.047-.158-.106-.215h-.125c-.015.072-.01.152-.046.2-.066.085-.155.154-.236.227-.043.038-.078.018-.103-.025l-.046-.087c-.065.035-.117.069-.172.093-.116.051-.235.095-.35.147-.085.038-.09.053-.07.147.014.075.034.148.047.223.013.072.05.109.123.124.233.05.462.115.657.265.058-.102.058-.102.168-.151.03-.014.06-.03.092-.042.08-.03.115-.017.15.06.023.048.041.098.066.158.06-.14-.042-.267.017-.416.157.18.24.39.375.567a.235.235 0 00.022-.098c.002-.124 0-.247.002-.371 0-.034.013-.067.02-.1l.032-.003c.11.155.13.354.226.52a3.036 3.036 0 00-.01-.392c-.004-.045 0-.074.05-.088.08.036.116.14.215.158-.03-.275-.423-1.137-.798-1.635-.114-.127-.2-.28-.34-.386zm-2.667.696c-.019.034-.03.05-.037.067-.061.185-.125.37-.18.556-.031.105-.087.169-.195.19-.09.019-.178.052-.268.073-.038.009-.089.015-.118-.003-.024-.016-.025-.069-.036-.106-.064.076-.082.087-.17.047-.133-.062-.262-.135-.393-.201-.048-.025-.093-.063-.17-.03-.043.12-.091.25-.137.382-.099.28-.087.242.095.453.046.048.102.03.154.023.054-.009.106-.03.16-.036.13-.013.26-.08.367-.015.204-.064.387-.122.571-.178.05-.015.089.005.114.054.022.042.034.093.082.121.038-.056-.013-.128.063-.178l.14.241-.042-1.46zm.278.358c-.096-.01-.107.01-.11.108-.002.038-.003.078.002.115.03.2.099.386.174.57.002.006.012.01.022.015l.078-.05c.052.036.081.088.153.088.205-.002.41.014.616.012.099-.001.158.042.205.12.018.03.024.077.088.066l-.08-.394c-.05-.195-.085-.395-.172-.589-.057.057-.114.068-.18.046a.72.72 0 00-.135-.028c-.22-.028-.44-.059-.66-.08zm10.254-1.727c.089.163.155.316.139.491-.016.168.026.342-.044.516-.047-.033-.088-.082-.112-.075-.117.035-.164-.057-.227-.115a4.772 4.772 0 01-.286-.29l-.104-.113a4.856 4.856 0 01-.023.019c.035.046.07.093.11.156.04.064.084.127.122.193.034.058.065.118.031.205-.082-.01-.164-.019-.246-.032-.06-.01-.101 0-.124.07-.031.098-.037.096-.15.09.02.042.036.08.057.116.041.074.03.138-.03.196-.06.06-.118.122-.178.181a.175.175 0 01-.185.046c-.222-.061-.447-.113-.67-.174-.032-.009-.063-.04-.086-.068-.03-.04-.052-.087-.08-.13-.044-.07-.09-.138-.136-.207a.18.18 0 00-.014.105c.012.127.03.253.035.38.005.1-.024.12-.121.104-.104-.017-.206-.04-.31-.058-.064-.012-.131-.028-.202.03l.081.208c.09 0 .166-.01.237.002a.819.819 0 01.458.251c.078.083.154.168.241.26l.018-.005c-.004-.006-.008-.013-.01-.04.014-.056-.062-.118.018-.178.031.03.064.057.088.09.058.078.111.159.169.257l.089.141.024-.013a2093.819 2093.819 0 01-.427-.934c.055.007.083.007.108.016.193.07.385.142.577.216.074.028.147.06.219.094.062.028.112.018.157-.033.05-.056.102-.112.154-.167.05-.051.095-.046.132.014.016.025.026.053.04.08.071.138.143.277.217.433l.159.308.025-.011c-.044-.106-.07-.218-.138-.334-.057-.182-.168-.346-.206-.545.136.034.362.326.567.732l.057.074.018-.011a1.563 1.563 0 01-.052-.127c-.046-.145-.097-.29-.136-.436-.022-.083-.036-.173.022-.26l.109.058-.026-.207.027-.016c.022.02.05.036.065.06.073.108.143.22.215.33.01.016.029.029.043.043-.036-.217-.2-.38-.229-.626l.155.112c.014-.166.012-.319.042-.465.032-.158-.023-.297-.063-.445.024.004.036.006.055.025.092.124.183.249.277.371.02.027.05.047.069.087l.04.063.019-.015a.293.293 0 01-.053-.082 27.922 27.922 0 01-.332-.49c-.221-.311-.363-.467-.485-.521zm-6.57.327c-.003.161.092.275.069.415l-.368.087c.09.139.032.237-.052.331-.05.057-.092.122-.143.178-.037.04-.046.078-.018.126l.16.275c.029.048.072.066.128.064.076-.003.152 0 .228-.001.116-.003.216.022.275.137.006.014.02.024.044.052.004-.059-.003-.098.01-.13.016-.04.04-.099.072-.108.084-.023.173-.024.26-.03.013-.001.027.018.04.029l.071.065c.019-.11-.082-.198-.024-.31l.126.04c-.026-.123-.07-.245-.071-.366 0-.123.051-.243.115-.36.107.062.16.156.234.253.183.265.36.533.494.834.165-.078.27.068.407.088-.003-.106-.133-.441-.197-.492a.142.142 0 00-.102-.028c-.06.011-.119.039-.191.063-.025-.039-.056-.078-.077-.122a3.936 3.936 0 00-.473-.783c-.076-.094-.16-.182-.228-.26l-.391.285c-.049.035-.094.03-.132-.017l-.169-.207c-.025-.03-.053-.059-.097-.108z`}),t[0]=n,t[1]=r,t[2]=i,t[3]=a):(n=t[0],r=t[1],i=t[2],a=t[3]);let o;return t[4]===e?o=t[5]:(o=(0,_.jsxs)(`svg`,{role:`img`,"aria-label":`Hermes icon`,xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,fill:`currentColor`,fillRule:`evenodd`,viewBox:`0 0 24 24`,...e,children:[n,r,i,a]}),t[4]=e,t[5]=o),o}function Kt(e){let t=(0,K.c)(7),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,_.jsx)(`title`,{children:`OpenClaw icon`}),t[0]=n):n=t[0];let r;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,_.jsxs)(`mask`,{id:`openclaw-eyes`,maskUnits:`userSpaceOnUse`,x:0,y:0,width:120,height:120,children:[(0,_.jsx)(`rect`,{width:120,height:120,fill:`white`}),(0,_.jsx)(`circle`,{cx:45,cy:35,r:6,fill:`black`}),(0,_.jsx)(`circle`,{cx:75,cy:35,r:6,fill:`black`})]}),t[1]=r):r=t[1];let i,a,o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,_.jsxs)(`g`,{fill:`currentColor`,mask:`url(#openclaw-eyes)`,children:[(0,_.jsx)(`path`,{d:`M60 10 C30 10 15 35 15 55 C15 75 30 95 45 100 L45 110 L55 110 L55 100 C55 100 60 102 65 100 L65 110 L75 110 L75 100 C90 95 105 75 105 55 C105 35 90 10 60 10Z`}),(0,_.jsx)(`path`,{d:`M20 45 C5 40 0 50 5 60 C10 70 20 65 25 55 C28 48 25 45 20 45Z`}),(0,_.jsx)(`path`,{d:`M100 45 C115 40 120 50 115 60 C110 70 100 65 95 55 C92 48 95 45 100 45Z`})]}),a=(0,_.jsx)(`path`,{d:`M45 15 Q35 5 30 8`,fill:`none`,stroke:`currentColor`,strokeWidth:3,strokeLinecap:`round`}),o=(0,_.jsx)(`path`,{d:`M75 15 Q85 5 90 8`,fill:`none`,stroke:`currentColor`,strokeWidth:3,strokeLinecap:`round`}),t[2]=i,t[3]=a,t[4]=o):(i=t[2],a=t[3],o=t[4]);let s;return t[5]===e?s=t[6]:(s=(0,_.jsxs)(`svg`,{role:`img`,"aria-label":`OpenClaw icon`,xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,fill:`none`,viewBox:`0 0 120 120`,...e,children:[n,r,i,a,o]}),t[5]=e,t[6]=s),s}function qt(e){let t=(0,K.c)(5),n,r,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,_.jsx)(`title`,{children:`OpenCode icon`}),r=(0,_.jsx)(`path`,{fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`,d:`M384 416H128V96H384V416ZM320 160H192V352H320V160Z`}),i=(0,_.jsx)(`path`,{fill:`currentColor`,fillOpacity:.55,d:`M320 224V352H192V224H320Z`}),t[0]=n,t[1]=r,t[2]=i):(n=t[0],r=t[1],i=t[2]);let a;return t[3]===e?a=t[4]:(a=(0,_.jsxs)(`svg`,{role:`img`,"aria-label":`OpenCode icon`,xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,fill:`none`,viewBox:`0 0 512 512`,...e,children:[n,r,i]}),t[3]=e,t[4]=a),a}function Jt(e){let t=(0,K.c)(5),n,r,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,_.jsx)(`title`,{children:`Pi icon`}),r=(0,_.jsx)(`path`,{fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`,d:`M165.29 165.29H517.36V400H400V517.36H282.65V634.72H165.29ZM282.65 282.65V400H400V282.65Z`}),i=(0,_.jsx)(`path`,{fill:`currentColor`,d:`M517.36 400H634.72V634.72H517.36Z`}),t[0]=n,t[1]=r,t[2]=i):(n=t[0],r=t[1],i=t[2]);let a;return t[3]===e?a=t[4]:(a=(0,_.jsxs)(`svg`,{role:`img`,"aria-label":`Pi icon`,xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,fill:`none`,viewBox:`0 0 800 800`,...e,children:[n,r,i]}),t[3]=e,t[4]=a),a}var Yt={"claude-cowork":`claude`,"claude-code":`claude`,codex:`openai`,cursor:`cursor`,copilot:`github`,opencode:`opencode`,pi:`pi`,antigravity:`antigravity`,openclaw:`openclaw`,hermes:`hermes`};function Xt(e){let t=(0,K.c)(47),n,i,o,s;t[0]===e?(n=t[1],i=t[2],o=t[3],s=t[4]):({id:i,style:s,className:n,...o}=e,t[0]=e,t[1]=n,t[2]=i,t[3]=o,t[4]=s);let{resolvedTheme:c}=r(),l=Yt[i],u=l?(c===`dark`?me[l]:void 0)??he[l]:void 0,d;t[5]!==u||t[6]!==s?(d=u?{...s,"--ok-brand-color":u}:s,t[5]=u,t[6]=s,t[7]=d):d=t[7];let f=d,p=u&&`[&_*]:![color:var(--ok-brand-color)]`,m;t[8]!==n||t[9]!==p?(m=a(p,n),t[8]=n,t[9]=p,t[10]=m):m=t[10];let h=m;if(i===`claude-cowork`||i===`claude-code`){let e;return t[11]!==h||t[12]!==f||t[13]!==o?(e=(0,_.jsx)(ve,{style:f,className:h,...o}),t[11]=h,t[12]=f,t[13]=o,t[14]=e):e=t[14],e}if(i===`codex`){let e;return t[15]!==h||t[16]!==f||t[17]!==o?(e=(0,_.jsx)(ye,{style:f,className:h,...o}),t[15]=h,t[16]=f,t[17]=o,t[18]=e):e=t[18],e}if(i===`cursor`){let e;return t[19]!==h||t[20]!==f||t[21]!==o?(e=(0,_.jsx)(be,{style:f,className:h,...o}),t[19]=h,t[20]=f,t[21]=o,t[22]=e):e=t[22],e}if(i===`copilot`){let e;return t[23]!==h||t[24]!==f||t[25]!==o?(e=(0,_.jsx)(xe,{style:f,className:h,...o}),t[23]=h,t[24]=f,t[25]=o,t[26]=e):e=t[26],e}if(i===`opencode`){let e;return t[27]!==h||t[28]!==f||t[29]!==o?(e=(0,_.jsx)(qt,{style:f,className:h,...o}),t[27]=h,t[28]=f,t[29]=o,t[30]=e):e=t[30],e}if(i===`pi`){let e;return t[31]!==h||t[32]!==f||t[33]!==o?(e=(0,_.jsx)(Jt,{style:f,className:h,...o}),t[31]=h,t[32]=f,t[33]=o,t[34]=e):e=t[34],e}if(i===`antigravity`){let e;return t[35]!==h||t[36]!==f||t[37]!==o?(e=(0,_.jsx)(Wt,{style:f,className:h,...o}),t[35]=h,t[36]=f,t[37]=o,t[38]=e):e=t[38],e}if(i===`openclaw`){let e;return t[39]!==h||t[40]!==f||t[41]!==o?(e=(0,_.jsx)(Kt,{style:f,className:h,...o}),t[39]=h,t[40]=f,t[41]=o,t[42]=e):e=t[42],e}if(i===`hermes`){let e;return t[43]!==h||t[44]!==f||t[45]!==o?(e=(0,_.jsx)(Gt,{style:f,className:h,...o}),t[43]=h,t[44]=f,t[45]=o,t[46]=e):e=t[46],e}return null}var Zt=fe;function Qt(e){return pe[e].handoffTarget}export{ut as A,_t as C,ft as D,pt as E,mt as M,dt as O,kt as S,gt as T,jt as _,Vt as a,Ot as b,Rt as c,It as d,Bt as f,At as g,Mt as h,Nt as i,ht as j,ct as k,Ht as l,Pt as m,Qt as n,Lt as o,zt as p,Xt as r,Ft as s,Zt as t,Ut as u,xt as v,vt as w,bt as x,yt as y};