@inkeep/open-knowledge 0.85.0-beta.2 → 0.85.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +6 -6
- package/dist/constants-D5w683OR.mjs +1 -0
- package/dist/{dist-CqZISrZN.mjs → dist-BCYVWHsR.mjs} +318 -318
- package/dist/{dist-DjEZX3vG.mjs → dist-NhLRGMzw.mjs} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/init-CzUtIxs8.mjs +1 -0
- package/dist/{init-BontxrPQ.mjs → init-iH-arA2G.mjs} +2 -2
- package/dist/{launch-json-removal-CDHWF-ku.mjs → launch-json-removal-7EPfW1gR.mjs} +1 -1
- package/dist/{loader-DMoA9Hv1.mjs → loader-BPBqgr-2.mjs} +1 -1
- package/dist/loader-C15d7cmm.mjs +1 -0
- package/dist/{open-browser-CbRl45f4.mjs → open-browser-BA4x7USG.mjs} +1 -1
- package/dist/{preview-vc6NgNe_.mjs → preview-C8nGyFNQ.mjs} +1 -1
- package/dist/preview-CVz9i5jg.mjs +1 -0
- package/dist/public/assets/{AccountSection-adN2rwhj.js → AccountSection-uEZl_mju.js} +1 -1
- package/dist/public/assets/{ActivityModeContent-Bdl6OmHI.js → ActivityModeContent-D6bm4kJT.js} +1 -1
- package/dist/public/assets/AddPropertiesButton-BbxqMedS.js +2 -0
- package/dist/public/assets/{AgentDiffPane-Cecw3Mrv.js → AgentDiffPane-DxqfS7to.js} +1 -1
- package/dist/public/assets/{AttachmentsSection-NIZW2veu.js → AttachmentsSection-D4gD9K5F.js} +1 -1
- package/dist/public/assets/{CodeMirrorPropInput-Doo-cuhn.js → CodeMirrorPropInput-Buv5WUqJ.js} +1 -1
- package/dist/public/assets/{ContentRulesSection-Bxk1NLVc.js → ContentRulesSection-Br-l422Z.js} +1 -1
- package/dist/public/assets/{DocumentContext-raAZ6wU_.js → DocumentContext-CorZvYgo.js} +14 -14
- package/dist/public/assets/{EditorModeToggle-Codw9OqM.js → EditorModeToggle-CRzHwk_c.js} +1 -1
- package/dist/public/assets/{ExcalidrawDocEditor-U8ndHRsw.js → ExcalidrawDocEditor-EQVCkgpX.js} +1 -1
- package/dist/public/assets/FeedbackForm-B3LCnaN-.js +1 -0
- package/dist/public/assets/{ImportSkillDialog-3MZYBShq.js → ImportSkillDialog-DuG9JEye.js} +1 -1
- package/dist/public/assets/{LinkPreviewsSection-BoSX9Y5f.js → LinkPreviewsSection--PnKeBLD.js} +1 -1
- package/dist/public/assets/{LintConfigEditor-CS35dOCn.js → LintConfigEditor-jcGxgQwc.js} +1 -1
- package/dist/public/assets/{LintingSection-Bw-7lE63.js → LintingSection-Dvgj5Ttf.js} +1 -1
- package/dist/public/assets/{ManagedArtifactProperties-DuJcCo7W.js → ManagedArtifactProperties-Bsvat-ju.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-DQGljSd5.js +1 -0
- package/dist/public/assets/{MermaidDocEditor-CdTiKD4M.js → MermaidDocEditor-VR7GsjSm.js} +1 -1
- package/dist/public/assets/{NetworkAccessSection-BtuXAqBC.js → NetworkAccessSection-D43WDwx9.js} +1 -1
- package/dist/public/assets/{PropertyDisplayRow-iK21Zw0T.js → PropertyDisplayRow-CWrQAKBl.js} +1 -1
- package/dist/public/assets/{PublishToGitHubDialog-DGTwvn4-.js → PublishToGitHubDialog-C3wLeehy.js} +1 -1
- package/dist/public/assets/ReportBugMenuTrigger-B7ha_vzT.js +1 -0
- package/dist/public/assets/{SchemaConfigEditor-GopsnCZi.js → SchemaConfigEditor-CGaJB0xn.js} +1 -1
- package/dist/public/assets/{SearchSection-k_3iYUVu.js → SearchSection-a8lszdwH.js} +1 -1
- package/dist/public/assets/SessionsHost-BjkYqOzo.js +2 -0
- package/dist/public/assets/{SettingsDialogBody-B4Xc27xN.js → SettingsDialogBody-Cg5j6OJH.js} +2 -2
- package/dist/public/assets/{ShareReceiveMissDialog-EQZ57mKG.js → ShareReceiveMissDialog-DRGvyccq.js} +1 -1
- package/dist/public/assets/{SkillToolbarControls-Cm-CL6Lw.js → SkillToolbarControls-uJO_ykPP.js} +1 -1
- package/dist/public/assets/{SourceEditor-DGT7q2vJ.js → SourceEditor-D0RSGDUt.js} +1 -1
- package/dist/public/assets/{SyncSection-Ba_tWnaD.js → SyncSection-CRG2LkSG.js} +1 -1
- package/dist/public/assets/{SyncStatusBadge-DsP-NJ9v.js → SyncStatusBadge-DoYJzvIT.js} +1 -1
- package/dist/public/assets/{TerminalSection-DqzX_FyW.js → TerminalSection-6ExXD5z5.js} +1 -1
- package/dist/public/assets/{TerminalWindowApp-D6dgChoj.js → TerminalWindowApp-B2mnEA0Z.js} +1 -1
- package/dist/public/assets/{TextDocEditor-hRlsB7CJ.js → TextDocEditor-CzwNYI5Q.js} +1 -1
- package/dist/public/assets/{ThreadView-nZLg8IBy.js → ThreadView-CAfBkY-n.js} +1 -1
- package/dist/public/assets/{TimelineDiffPane-B6pKH3m8.js → TimelineDiffPane-Oj5zOvzN.js} +1 -1
- package/dist/public/assets/client-version-DDIvS8RB.js +1 -0
- package/dist/public/assets/{comment-chips-Od0yEqg-.js → comment-chips-DNwQbxLO.js} +1 -1
- package/dist/public/assets/{config-provider-D7tAjHlA.js → config-provider-2W1hFFiT.js} +1 -1
- package/dist/public/assets/{doc-undo-manager-CpjaremK.js → doc-undo-manager-1o5q5gwi.js} +1 -1
- package/dist/public/assets/index-ClMapCCf.js +2205 -0
- package/dist/public/assets/{lint-plugins-Cxhn9QhZ.js → lint-plugins-BTxsaGaY.js} +1 -1
- package/dist/public/assets/{constants-embedded-host-Cc7UiZn-.js → local-menu-action-bus-Dyh2UJJF.js} +1 -1
- package/dist/public/assets/{pending-receive-nav-store-DdinvxKF.js → pending-receive-nav-store-CsnZS_Ro.js} +1 -1
- package/dist/public/assets/preferred-session-events-DhdzT8Vr.js +1 -0
- package/dist/public/assets/{progress-Bt6heYrW.js → progress-CLlmYVN5.js} +1 -1
- package/dist/public/assets/{selection-context--RG_zbL1.js → selection-context-BiUjqAKb.js} +1 -1
- package/dist/public/assets/{src-DFrY4htS.js → src-DGY0VXnv.js} +1 -1
- package/dist/public/assets/telemetry-impl-C_SzfD38.js +2 -0
- package/dist/public/assets/{telemetry-startup-D2JgukUW.js → telemetry-startup-CrBJFhWz.js} +1 -1
- package/dist/public/assets/terminal-launch-events-BCKO9apj.js +1 -0
- package/dist/public/assets/{typing-burst-detector-NbMMCwJS.js → typing-burst-detector-BvJppmhO.js} +1 -1
- package/dist/public/assets/{use-activity-panel-BKll2Lbb.js → use-activity-panel-vwUB_0Q4.js} +1 -1
- package/dist/public/assets/{use-open-skill-DhCIdizW.js → use-open-skill-D0ybF2gq.js} +1 -1
- package/dist/public/assets/{use-terminal-enabled-BpmUhMxt.js → use-terminal-enabled-BAfmRgEk.js} +1 -1
- package/dist/public/assets/{use-timeline-entry-diff-Crd78V2q.js → use-timeline-entry-diff-CFyLJSDJ.js} +1 -1
- package/dist/public/index.html +21 -21
- package/dist/{registry-probes-Cwx6O6kv.mjs → registry-probes-CM3GVnGY.mjs} +1 -1
- package/dist/{removal-file-path-D0LbC71-.mjs → removal-file-path-oz6iBHDK.mjs} +1 -1
- package/dist/{repair-launch-json-sysIcyZL.mjs → repair-launch-json-DNSuSUsH.mjs} +1 -1
- package/dist/{repair-mcp-configs-mZrdQ93t.mjs → repair-mcp-configs-Bahn7_bp.mjs} +1 -1
- package/dist/{src-BKnvpIkn.mjs → src-BqzHUD_W.mjs} +1 -1
- package/dist/src-DKF_fAWB.mjs +1 -0
- package/dist/start-BueKHDx7.mjs +1 -0
- package/dist/{start-lQOFYtsk.mjs → start-CEEWMHcQ.mjs} +3 -3
- package/package.json +4 -4
- package/dist/constants-CEWqiFCf.mjs +0 -1
- package/dist/init-BtiXJkEo.mjs +0 -1
- package/dist/loader-CkxCQRBx.mjs +0 -1
- package/dist/preview-Cf5VnxW_.mjs +0 -1
- package/dist/public/assets/AddPropertiesButton-DK0-byQh.js +0 -2
- package/dist/public/assets/FeedbackForm-CUfwmv_p.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-yEbsB8JQ.js +0 -1
- package/dist/public/assets/ReportBugMenuTrigger-D6HmlS6i.js +0 -1
- package/dist/public/assets/SessionsHost-yRLL-gt6.js +0 -2
- package/dist/public/assets/client-version-BJKWodjV.js +0 -1
- package/dist/public/assets/index-CfvFSmB5.js +0 -2205
- package/dist/public/assets/preferred-session-events-6GbGlu8P.js +0 -1
- package/dist/public/assets/telemetry-impl-BXY-sj8p.js +0 -2
- package/dist/public/assets/terminal-launch-events-C-sad7ou.js +0 -1
- package/dist/src-DWEbxzXJ.mjs +0 -1
- package/dist/start-Dh1mqp4M.mjs +0 -1
|
@@ -1 +0,0 @@
|
|
|
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,r as i}from"./dist-Nvb76hAm.js";import{t as a}from"./compiler-runtime-BfE3aGVn.js";import{t as o}from"./utils-CPqDy6Hr.js";import{t as s}from"./overlay-layers-CKMAjef3.js";import{t as c}from"./dist-BsJYDohW.js";import{t as l}from"./dist-CSCUSbQc.js";import{i as u,n as d,t as f}from"./tooltip-DBqLYfio.js";import"./separator-D7s_9ZwH.js";import{t as p}from"./button-DzgjsZzC.js";import{t as m}from"./RegisteredAgentIcon-DjlAkIlP.js";import{s as h,u as g}from"./keyboard-shortcuts-FtScAm_I.js";import{a as _,i as v,o as y,t as b}from"./constants-embedded-host-Cc7UiZn-.js";import{g as x}from"./terminal-launch-events-C-sad7ou.js";import{t as S}from"./OpenInAgentMenuItem-Bd9Zl2ks.js";import{t as C}from"./createLucideIcon-DdBzwsHe.js";import{t as w}from"./arrow-up-right-nJaICi16.js";import{t as T}from"./check-B2OLRY33.js";import{t as E}from"./chevron-down-CEv6N8LG.js";import{a as D,h as ee,i as O,o as k,r as A,t as j,u as M}from"./dropdown-menu-DtLu9NwU.js";import"./input-C-Qm8YDT.js";import{n as te}from"./agent-launcher-labels-BtrP7a_g.js";import{n as ne}from"./terminal-cli-display-BbrhD8t2.js";import"./skeleton-BPb29aFG.js";import{_ as N,f as P,l as F}from"./sortable.esm-BdFZmZc5.js";var I=e(n(),1),L=new Map,R=null,z=new Set;function B(){return L.get(`agents`)??L.get(`terminal`)??null}function V(e,t){return e===null||t===null?e===t:e.id!==t.id||e.kind!==t.kind||e.label!==t.label?!1:e.kind===`thread`&&t.kind===`thread`?e.agentId===t.agentId&&e.iconUrl===t.iconUrl:e.kind===`terminal`&&t.kind===`terminal`?e.cli===t.cli:!1}function H(e,t){if(L.has(e)&&V(L.get(e)??null,t))return;L.set(e,t);let n=B();if(!V(R,n)){R=n;for(let e of z)e()}}function U(){return R}function W(e){return z.add(e),()=>{z.delete(e)}}function G(){return(0,I.useSyncExternalStore)(W,U,K)}function K(){return null}var q=C(`panel-left-open`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m14 9 3 3-3 3`,key:`8010ee`}]]),J=C(`panel-right`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}]]),re=C(`square-terminal`,[[`path`,{d:`m7 11 2-2-2-2`,key:`1lz0vl`}],[`path`,{d:`M11 13h4`,key:`1p7l4v`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}]]),ie={},Y=new Set;function X(){return ie}function ae(e){ie={...ie,...e};for(let e of Y)e()}function oe(e){return Y.add(e),()=>{Y.delete(e)}}function se(){return(0,I.useSyncExternalStore)(oe,X,X)}var Z={terminal:`ok-dock-session-order-v1`,agents:`ok-agent-session-order-v1`};function ce(e){let t=Array.isArray(e.order)?e.order.filter(e=>typeof e==`string`):[],n=typeof e.activeKey==`string`?e.activeKey:null,r=typeof e.agentPanelVisible==`boolean`?e.agentPanelVisible:void 0;return r===void 0?{order:t,activeKey:n}:{order:t,activeKey:n,agentPanelVisible:r}}function le(e){if(typeof window>`u`)return{status:`absent`};let t;try{t=window.localStorage.getItem(Z[e])}catch(t){return console.warn(`[dock-session-persistence] reading ${Z[e]} failed: ${String(t)}`),{status:`blocked`}}if(t===null)return{status:`absent`};try{return{status:`parsed`,record:ce(JSON.parse(t))}}catch(t){return console.warn(`[dock-session-persistence] stored ${Z[e]} record was not valid JSON; ignoring it: ${String(t)}`),{status:`corrupt`}}}function ue(e){let t=le(`agents`);if(t.status===`blocked`)return console.warn(`[dock-session-persistence] ${Z.agents} could not be read; withholding this write rather than overwriting the unread record`),null;let n=t.status===`parsed`?t.record:null,r=[...e.order??n?.order??[]],i=e.activeKey===void 0?n?.activeKey??null:e.activeKey,a=e.agentPanelVisible??n?.agentPanelVisible;return a===void 0?{order:r,activeKey:i}:{order:r,activeKey:i,agentPanelVisible:a}}function de(e){let t=le(e);return t.status===`parsed`?t.record:null}function fe(e,t){if(!(typeof window>`u`))try{window.localStorage.setItem(Z[e],JSON.stringify(t))}catch(t){console.warn(`[dock-session-persistence] writing ${Z[e]} failed: ${String(t)}`)}}function pe(e,t){if(e?.terminal!=null)return;let n=ue({agentPanelVisible:t});n!==null&&fe(`agents`,n)}async function me(e,t){if(typeof e?.terminal?.getDockState==`function`)try{let n=await e.terminal.getDockState(),r=n[t];if(r==null)return{sessionOrder:null,terminalSnapshot:n.terminalSnapshot,failed:!1};let{order:i,activeKey:a}=ce(r);return{sessionOrder:i.length===0&&a===null?null:{order:i,activeKey:a},terminalSnapshot:n.terminalSnapshot,failed:!1}}catch(e){return console.warn(`[dock-session-persistence] getDockState failed; cold-starting: ${String(e)}`),{sessionOrder:null,terminalSnapshot:void 0,failed:!0}}return{sessionOrder:e?.terminal==null?de(t):null,terminalSnapshot:void 0,failed:!1}}function he(e,t,n,r={tabs:[],activeOrdinal:null}){if(typeof e?.terminal?.setDockState==`function`){let i={order:[...n.order],activeKey:n.activeKey},a=t===`terminal`?e.terminal.setDockState({surface:`terminal`,...i,terminalSnapshot:r}):e.terminal.setDockState({surface:`agents`,...i});Promise.resolve(a).then(e=>{e?.ok===!1&&(e.reason===`ipc-unavailable`?console.warn(`[dock-session-persistence] setDockState skipped during window teardown`):console.error(`[dock-session-persistence] setDockState failed: ${e.reason}`))}).catch(e=>{console.error(`[dock-session-persistence] setDockState rejected: ${e instanceof Error?e.stack??e.message:String(e)}`)});return}if(e?.terminal==null){if(t===`agents`){let e=ue({order:n.order,activeKey:n.activeKey});if(e===null)return;fe(`agents`,e);return}fe(t,n)}}var ge=5e3,Q=a(),$=t();function _e(e){let t=(0,Q.c)(65),{primary:n,onPrimary:a,primaryDisabled:s,enabledTargets:c,selectedTargetId:l,onSelectTarget:u,threadAgents:d,onOpenSettings:f,terminal:h,terminals:g,menuEmptyState:_,menuLeading:y,onMenuOpenChange:b,menuAlign:C,menuAttributes:N,className:P,primaryClassName:F,primaryAriaLabel:I,threadAgentsFooter:L,triggerAriaLabel:R,testIds:z}=e,B=s===void 0?!1:s,V=C===void 0?`end`:C,{_:H}=i(),U=c.length>0,W=g&&g.length>0?g:null,G=W!=null||h!=null,K=U||G,q=d!==void 0&&d.length>0,J;t[0]===z?J=t[1]:(J=e=>typeof z.terminal==`function`?z.terminal(e):z.terminal,t[0]=z,t[1]=J);let re=J,ie=z.group,Y;t[2]===F?Y=t[3]:(Y=o(`gap-1.5`,F),t[2]=F,t[3]=Y);let X;t[4]!==a||t[5]!==n||t[6]!==I||t[7]!==B||t[8]!==Y||t[9]!==z.primary?(X=(0,$.jsx)(p,{type:`button`,variant:`outline`,className:Y,disabled:B,"aria-label":I,onClick:a,"data-testid":z.primary,children:n}),t[4]=a,t[5]=n,t[6]=I,t[7]=B,t[8]=Y,t[9]=z.primary,t[10]=X):X=t[10];let ae;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(ae=(0,$.jsx)(E,{"aria-hidden":`true`,className:`size-3.5 text-muted-foreground`}),t[11]=ae):ae=t[11];let oe;t[12]!==z.trigger||t[13]!==R?(oe=(0,$.jsx)(ee,{asChild:!0,children:(0,$.jsx)(p,{type:`button`,variant:`outline`,size:`icon`,"aria-label":R,"data-testid":z.trigger,children:ae})}),t[12]=z.trigger,t[13]=R,t[14]=oe):oe=t[14];let se;t[15]!==K||t[16]!==y||t[17]!==q?(se=y?(0,$.jsxs)($.Fragment,{children:[y,q||K?(0,$.jsx)(M,{}):null]}):null,t[15]=K,t[16]=y,t[17]=q,t[18]=se):se=t[18];let Z;t[19]!==H||t[20]!==K||t[21]!==q||t[22]!==z||t[23]!==d||t[24]!==L?(Z=q?(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(O,{"aria-label":H({id:`RXEbZy`}),children:[(0,$.jsx)(k,{children:(0,$.jsx)(r,{id:`RXEbZy`})}),d?.map(e=>(0,$.jsxs)(D,{onSelect:e.onSelect,disabled:e.disabled,"data-testid":z.threadAgent?.(e.key),"aria-current":e.selected?`true`:void 0,children:[(0,$.jsx)(m,{agentId:e.id,iconUrl:e.iconUrl,className:`size-4`}),(0,$.jsx)(`span`,{className:`flex-1 truncate`,children:e.name}),e.selected?(0,$.jsx)(T,{"aria-hidden":`true`,className:`size-4 text-muted-foreground`}):null]},e.key)),L]}),K?(0,$.jsx)(M,{}):null]}):null,t[19]=H,t[20]=K,t[21]=q,t[22]=z,t[23]=d,t[24]=L,t[25]=Z):Z=t[25];let ce;t[26]!==H||t[27]!==W||t[28]!==c||t[29]!==K||t[30]!==u||t[31]!==l||t[32]!==U||t[33]!==G||t[34]!==h||t[35]!==re||t[36]!==z?(ce=K?(0,$.jsxs)($.Fragment,{children:[G?(0,$.jsxs)(O,{"aria-label":H({id:`ALhMYW`}),children:[(0,$.jsx)(k,{children:(0,$.jsx)(r,{id:`ALhMYW`})}),W?.map(e=>(0,$.jsxs)(D,{onSelect:e.onSelect,"data-testid":re(e.cli),"aria-label":e.ariaLabel,children:[(0,$.jsx)(S,{id:ne(e.cli),className:`size-4`,"aria-hidden":`true`}),(0,$.jsx)(`span`,{className:`flex-1`,children:e.label}),e.selected?(0,$.jsx)(T,{"aria-hidden":`true`,className:`size-4 text-muted-foreground`}):null]},e.cli)),h?(0,$.jsxs)(D,{onSelect:h.onSelect,"data-testid":h.testId??re(`claude`),"aria-label":h.ariaLabel??H({id:`AcK_r0`}),children:[h.icon??(0,$.jsx)(S,{id:ne(`claude`),className:`size-4`,"aria-hidden":`true`}),(0,$.jsx)(`span`,{className:`flex-1`,children:h.label??(0,$.jsx)(r,{id:`fcgvCA`})}),h.selected?(0,$.jsx)(T,{"aria-hidden":`true`,className:`size-4 text-muted-foreground`}):null]}):null]}):null,U?(0,$.jsxs)($.Fragment,{children:[G?(0,$.jsx)(M,{}):null,(0,$.jsxs)(O,{"aria-label":H({id:`BwKH4d`}),children:[(0,$.jsxs)(k,{className:`flex items-center gap-1.5`,children:[(0,$.jsx)(r,{id:`BwKH4d`}),(0,$.jsx)(w,{"aria-hidden":`true`,className:`size-3`})]}),c.map(e=>(0,$.jsxs)(D,{onSelect:()=>u(e),"data-testid":z.option(e.id),children:[(0,$.jsx)(S,{id:e.id,"aria-hidden":`true`,className:`size-4`}),(0,$.jsx)(`span`,{className:`flex-1`,children:(0,$.jsx)(te,{displayName:e.displayName})}),l===e.id?(0,$.jsx)(T,{"aria-hidden":`true`,className:`size-4 text-muted-foreground`}):null]},e.id))]})]}):null]}):null,t[26]=H,t[27]=W,t[28]=c,t[29]=K,t[30]=u,t[31]=l,t[32]=U,t[33]=G,t[34]=h,t[35]=re,t[36]=z,t[37]=ce):ce=t[37];let le=!q&&!K?_:null,ue;t[38]!==K||t[39]!==q?(ue=q||K?(0,$.jsx)(M,{}):null,t[38]=K,t[39]=q,t[40]=ue):ue=t[40];let de;t[41]===Symbol.for(`react.memo_cache_sentinel`)?(de=(0,$.jsx)(v,{"aria-hidden":`true`,className:`size-4 text-muted-foreground`}),t[41]=de):de=t[41];let fe;t[42]===Symbol.for(`react.memo_cache_sentinel`)?(fe=(0,$.jsx)(`span`,{className:`flex-1`,children:(0,$.jsx)(r,{id:`jRAGrQ`})}),t[42]=fe):fe=t[42];let pe;t[43]!==f||t[44]!==z.settings?(pe=(0,$.jsxs)(D,{onSelect:f,"data-testid":z.settings,children:[de,fe]}),t[43]=f,t[44]=z.settings,t[45]=pe):pe=t[45];let me;t[46]!==V||t[47]!==N||t[48]!==Z||t[49]!==ce||t[50]!==le||t[51]!==ue||t[52]!==pe||t[53]!==se||t[54]!==z.menu?(me=(0,$.jsxs)(A,{align:V,className:`max-h-80 min-w-[200px]`,"data-testid":z.menu,...N,children:[se,Z,ce,le,ue,pe]}),t[46]=V,t[47]=N,t[48]=Z,t[49]=ce,t[50]=le,t[51]=ue,t[52]=pe,t[53]=se,t[54]=z.menu,t[55]=me):me=t[55];let he;t[56]!==b||t[57]!==me||t[58]!==oe?(he=(0,$.jsxs)(j,{modal:!1,onOpenChange:b,children:[oe,me]}),t[56]=b,t[57]=me,t[58]=oe,t[59]=he):he=t[59];let ge;return t[60]!==P||t[61]!==he||t[62]!==X||t[63]!==z.group?(ge=(0,$.jsxs)(x,{className:P,"data-testid":ie,children:[X,he]}),t[60]=P,t[61]=he,t[62]=X,t[63]=z.group,t[64]=ge):ge=t[64],ge}var ve=`open-knowledge:active-terminal-input`;function ye(e,t,n=typeof window>`u`?new EventTarget:window){let r={text:e,newTab:t?.newTab===!0,submit:t?.submit===!0,...t?.target===`agents`?{target:`agents`}:{}};y({kind:`active-input`,...r},n)||n.dispatchEvent(new CustomEvent(ve,{detail:r}))}function be(e,t=typeof window>`u`?new EventTarget:window){let n=t=>{let n=t instanceof CustomEvent?t.detail:void 0;n!==void 0&&typeof n.text==`string`&&e({text:n.text,newTab:n.newTab===!0,submit:n.submit===!0,...n.target===`agents`?{target:`agents`}:{}})};return t.addEventListener(ve,n),()=>t.removeEventListener(ve,n)}function xe(e){let t=(0,Q.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=o(`flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,$.jsx)(`div`,{"data-slot":`empty`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Se(e){let t=(0,Q.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=o(`flex max-w-sm flex-col items-center gap-2`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,$.jsx)(`div`,{"data-slot":`empty-header`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var Ce=c(`mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0`,{variants:{variant:{default:`bg-transparent`,icon:`flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4`}},defaultVariants:{variant:`default`}});function we(e){let t=(0,Q.c)(11),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,variant:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0?`default`:i,s;t[4]!==n||t[5]!==a?(s=o(Ce({variant:a,className:n})),t[4]=n,t[5]=a,t[6]=s):s=t[6];let c;return t[7]!==r||t[8]!==s||t[9]!==a?(c=(0,$.jsx)(`div`,{"data-slot":`empty-icon`,"data-variant":a,className:s,...r}),t[7]=r,t[8]=s,t[9]=a,t[10]=c):c=t[10],c}function Te(e){let t=(0,Q.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,asChild:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i!==void 0&&i?l:`div`,s;t[4]===n?s=t[5]:(s=o(`font-heading text-sm font-medium tracking-tight`,n),t[4]=n,t[5]=s);let c;return t[6]!==a||t[7]!==r||t[8]!==s?(c=(0,$.jsx)(a,{"data-slot":`empty-title`,className:s,...r}),t[6]=a,t[7]=r,t[8]=s,t[9]=c):c=t[9],c}function Ee(e){let t=(0,Q.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=o(`text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,$.jsx)(`div`,{"data-slot":`empty-description`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function De(e){let t=(0,Q.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=o(`flex w-full max-w-sm min-w-0 flex-col items-center gap-2.5 text-sm text-balance`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,$.jsx)(`div`,{"data-slot":`empty-content`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var Oe=1024,ke=1280,Ae={left:Oe,right:ke};function je(e,t,n){return e==null?t>=Ae[n]?`above`:`below`:`embedded`}function Me(e){return e===`above`?`open`:`collapsed`}var Ne=`ok-sidebar-pins-v2`;function Pe(e){return e===`open`||e===`collapsed`}function Fe(e){return e===`above`||e===`below`||e===`embedded`}function Ie(e){if(typeof e!=`object`||!e)return!1;let t=e;for(let e of Object.keys(t))if(!Fe(e)||!Pe(t[e]))return!1;return!0}function Le(e){let t=JSON.parse(e);if(typeof t!=`object`||!t)return{};let n=t,r={};return Ie(n.left)&&(r.left=n.left),Ie(n.right)&&(r.right=n.right),r}function Re(e){try{let t=(e??localStorage).getItem(Ne);return t==null?{}:Le(t)}catch{return{}}}function ze(e,t){try{t.setItem(Ne,JSON.stringify(e))}catch{}}function Be(e,t,n){return n[e]?.[t]??Me(t)}function Ve(e,t,n,r){let i=r??localStorage,a=Re(i);return a[e]={...a[e],[t]:n},ze(a,i),a}function He(e){let t=e.endsWith(`rem`)?`rem`:`px`;return{value:Number.parseFloat(e),unit:t}}function Ue(e){let{value:t,unit:n}=He(e);return n===`rem`?t*16:t}function We(e,t){return`${t===`rem`?e.toFixed(1):Math.round(e)}${t}`}var Ge=3600*24*7;function Ke(e){let t=(0,Q.c)(28),{direction:n,currentWidth:r,onResize:i,onToggle:a,isCollapsed:o,minResizeWidth:s,maxResizeWidth:c,enableToggle:l,enableAutoCollapse:u,autoCollapseThreshold:d,expandThreshold:f,enableDrag:p,setIsDraggingRail:m,widthCookieName:h,widthCookieMaxAge:g,isNested:_}=e,v=n===void 0?`right`:n,y=o===void 0?!1:o,b=s===void 0?`14rem`:s,x=c===void 0?`24rem`:c,S=l===void 0?!0:l,C=u===void 0?!0:u,w=d===void 0?1.5:d,T=f===void 0?.2:f,E=p===void 0?!0:p,D=m===void 0?qe:m,ee=g===void 0?Ge:g,O=_===void 0?!1:_,k=(0,I.useRef)(null),A=(0,I.useRef)(0),j=(0,I.useRef)(0),M=(0,I.useRef)(!1),te=(0,I.useRef)(!1),ne=(0,I.useRef)(null),N=(0,I.useRef)(0),P=(0,I.useRef)(!1),F=(0,I.useRef)(0),L=(0,I.useRef)(0),R=(0,I.useRef)(null),z=(0,I.useRef)(r),B=(0,I.useRef)(y),V,H;t[0]===r?(V=t[1],H=t[2]):(V=()=>{z.current=r},H=[r],t[0]=r,t[1]=V,t[2]=H),(0,I.useEffect)(V,H);let U,W;t[3]===y?(U=t[4],W=t[5]):(U=()=>{B.current=y},W=[y],t[3]=y,t[4]=U,t[5]=W),(0,I.useEffect)(U,W);let G=Ue(b),K;t[6]===x?K=t[7]:(K=Ue(x),t[6]=x,t[7]=K);let q=K,J;t[8]!==E||t[9]!==O?(J=function(e){E&&(te.current=!0,A.current=B.current?0:Ue(z.current),j.current=e.clientX,N.current=e.clientX,ne.current=null,P.current=!1,F.current=0,L.current=0,R.current=O&&k.current?k.current.getBoundingClientRect():null,e.preventDefault())},t[8]=E,t[9]=O,t[10]=J):J=t[10];let re=J,ie,Y;t[11]!==w||t[12]!==v||t[13]!==C||t[14]!==S||t[15]!==T||t[16]!==O||t[17]!==q||t[18]!==G||t[19]!==i||t[20]!==a||t[21]!==D||t[22]!==ee||t[23]!==h?(ie=()=>{let e=function(e){h&&(document.cookie=`${h}=${e}; path=/; max-age=${ee}`)},t=function(e,t){return v===`left`?e<t:e>t},n=function(e,t,n,r){if(O&&r){let r=e.clientX-t;return v===`left`?n-r:n+r}return v===`left`?window.innerWidth-e.clientX:e.clientX},r=function(r){if(!te.current)return;let o=Math.abs(r.clientX-j.current);if(!M.current&&o>5&&(M.current=!0,D(!0)),M.current){let{unit:o}=He(z.current),s=R.current;O&&k.current&&(s=k.current.getBoundingClientRect());let c=t(r.clientX,N.current)?`expand`:`collapse`;ne.current!==c&&(ne.current=c),L.current=Math.abs(r.clientX-N.current);let l=Date.now();if(P.current&&l-F.current>200&&(P.current=!1),!P.current){if(C&&a&&!B.current){let e=n(r,j.current,A.current,s),t=!1;if(w<=1)t=e<=G*w;else if(e<=G){let n=G*(w-1);t=G-e>=n}if(c===`collapse`&&t){a(),N.current=r.clientX,P.current=!0,F.current=l;return}}if(a&&B.current&&c===`expand`&&L.current>G*T){a();let t=n(r,j.current,A.current,s),c=Math.max(G,Math.min(q,t)),u=We(o===`rem`?c/16:c,o);i(u),e(u),N.current=r.clientX,P.current=!0,F.current=l;return}}if(B.current)return;let u=n(r,j.current,A.current,s),d=Math.max(G,Math.min(q,u)),f=We(o===`rem`?d/16:d,o);i(f),e(f)}},o=function(){te.current&&(!M.current&&a&&S&&a(),M.current=!1,te.current=!1,ne.current=null,N.current=0,P.current=!1,F.current=0,L.current=0,R.current=null,D(!1))};return document.addEventListener(`mousemove`,r),document.addEventListener(`mouseup`,o),()=>{document.removeEventListener(`mousemove`,r),document.removeEventListener(`mouseup`,o)}},Y=[i,a,D,G,q,O,C,w,T,S,h,ee,v],t[11]=w,t[12]=v,t[13]=C,t[14]=S,t[15]=T,t[16]=O,t[17]=q,t[18]=G,t[19]=i,t[20]=a,t[21]=D,t[22]=ee,t[23]=h,t[24]=ie,t[25]=Y):(ie=t[24],Y=t[25]),(0,I.useEffect)(ie,Y);let X;return t[26]===re?X=t[27]:(X={dragRef:k,isDragging:M,handleMouseDown:re},t[26]=re,t[27]=X),X}function qe(){}var Je=3600*24*7,Ye=`18rem`,Xe=`3rem`,Ze=`app-file-sidebar`,Qe=`14.625rem`,$e=`32rem`,et=`sidebar_width`,tt=/^\d+(?:\.\d+)?(?:rem|px)$/,nt=I.createContext(null);function rt(e){if(typeof document>`u`)return e;let t=document.cookie.split(`; `).find(e=>e.startsWith(`${et}=`))?.split(`=`)[1];if(!t)return e;let n;try{n=decodeURIComponent(t)}catch{return e}return tt.test(n)?n:e}function it(){let e=I.use(nt);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function at(e){let t=(0,Q.c)(57),n,r,i,a,c,l,u;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],c=t[5],l=t[6],u=t[7]):({open:i,onOpenChange:c,className:r,style:l,children:n,defaultWidth:u,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=c,t[6]=l,t[7]=u);let d=u===void 0?Ye:u,[f]=I.useState(st),p;t[8]===f?p=t[9]:(p=()=>je(f,window.innerWidth,`left`),t[8]=f,t[9]=p);let[m,h]=I.useState(p),_;t[10]===d?_=t[11]:(_=()=>rt(d),t[10]=d,t[11]=_);let[v,y]=I.useState(_),[b,x]=I.useState(!1),[S,C]=I.useState(!1),w;t[12]===f?w=t[13]:(w=()=>{let e=Re();return Be(`left`,je(f,window.innerWidth,`left`),e)===`open`},t[12]=f,t[13]=w);let[T,E]=I.useState(w),D=i??T,ee;t[14]!==m||t[15]!==c?(ee=e=>{let t=typeof e==`function`?e(j.current):e;c?c(t):E(t),Ve(`left`,m,t?`open`:`collapsed`)},t[14]=m,t[15]=c,t[16]=ee):ee=t[16];let O=ee,k;t[17]===O?k=t[18]:(k=function(){O(ot)},t[17]=O,t[18]=k);let A=k,j=I.useRef(D),M;t[19]===D?M=t[20]:(M=()=>{j.current=D},t[19]=D,t[20]=M),I.useLayoutEffect(M);let te;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(te=function(){window.innerWidth>=1024||j.current&&(window.matchMedia(`(prefers-reduced-motion: reduce)`).matches||C(!0))},t[21]=te):te=t[21];let ne=te,N,P;t[22]===f?(N=t[23],P=t[24]):(P=()=>{let e=window.matchMedia(`(min-width: ${Oe}px)`),t=()=>{let e=je(f,window.innerWidth,`left`);h(e),E(Be(`left`,e,Re())===`open`)};return e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},N=[f],t[22]=f,t[23]=N,t[24]=P),I.useEffect(P,N);let F,L;t[25]===D?(F=t[26],L=t[27]):(F=()=>{D||document.getElementById(Ze)?.contains(document.activeElement)&&document.querySelector(`[data-sidebar="trigger"]`)?.focus()},L=[D],t[25]=D,t[26]=F,t[27]=L),I.useLayoutEffect(F,L);let R,z;t[28]!==D||t[29]!==m||t[30]!==O?(R=()=>{if(m===`above`||!D)return;let e=e=>{if(e.key!==`Escape`||s())return;let t=e.target;t&&(t.tagName===`INPUT`||t.tagName===`TEXTAREA`)||O(!1)};return window.addEventListener(`keydown`,e,{capture:!0}),()=>window.removeEventListener(`keydown`,e,{capture:!0})},z=[m,D,O],t[28]=D,t[29]=m,t[30]=O,t[31]=R,t[32]=z):(R=t[31],z=t[32]),I.useEffect(R,z);let B,V;t[33]===A?(B=t[34],V=t[35]):(B=()=>{if(typeof window<`u`&&window.okDesktop!=null)return;let e=e=>{g(e,`toggle-files-sidebar`)&&(s()||(e.preventDefault(),A()))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},V=[A],t[33]=A,t[34]=B,t[35]=V),I.useEffect(B,V);let H=D?`expanded`:`collapsed`,U;t[36]!==b||t[37]!==D||t[38]!==O||t[39]!==S||t[40]!==H||t[41]!==A||t[42]!==v?(U={state:H,open:D,setOpen:O,toggleSidebar:A,width:v,setWidth:y,isDraggingRail:b,setIsDraggingRail:x,showPushPulse:S,setShowPushPulse:C,notifySidebarFileSelected:ne},t[36]=b,t[37]=D,t[38]=O,t[39]=S,t[40]=H,t[41]=A,t[42]=v,t[43]=U):U=t[43];let W;t[44]!==l||t[45]!==v?(W={"--sidebar-width":v,"--sidebar-width-icon":Xe,...l},t[44]=l,t[45]=v,t[46]=W):W=t[46];let G=W,K;t[47]===r?K=t[48]:(K=o(`group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar`,r),t[47]=r,t[48]=K);let q;t[49]!==n||t[50]!==a||t[51]!==G||t[52]!==K?(q=(0,$.jsx)(`div`,{"data-slot":`sidebar-wrapper`,style:G,className:K,...a,children:n}),t[49]=n,t[50]=a,t[51]=G,t[52]=K,t[53]=q):q=t[53];let J;return t[54]!==U||t[55]!==q?(J=(0,$.jsx)(nt.Provider,{value:U,children:q}),t[54]=U,t[55]=q,t[56]=J):J=t[56],J}function ot(e){return!e}function st(){return b()}function ct(e){let t=(0,Q.c)(39),n,r,a,s,c,l;t[0]===e?(n=t[1],r=t[2],a=t[3],s=t[4],c=t[5],l=t[6]):({side:s,variant:c,collapsible:l,className:r,children:n,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=a,t[4]=s,t[5]=c,t[6]=l);let u=s===void 0?`left`:s,d=c===void 0?`sidebar`:c,f=l===void 0?`offcanvas`:l,{_:p}=i(),{state:m,isDraggingRail:h}=it();if(f===`none`){let e;t[7]===r?e=t[8]:(e=o(`flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground`,r),t[7]=r,t[8]=e);let i;return t[9]!==n||t[10]!==a||t[11]!==e||t[12]!==d?(i=(0,$.jsx)(`div`,{"data-slot":`sidebar`,"data-variant":d,className:e,...a,children:n}),t[9]=n,t[10]=a,t[11]=e,t[12]=d,t[13]=i):i=t[13],i}let g=m===`collapsed`?f:``,_=d===`floating`||d===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`,v;t[14]===_?v=t[15]:(v=o(`relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear`,`group-data-[collapsible=offcanvas]:w-0`,`group-data-[side=right]:rotate-180`,_,`group-data-[dragging=true]:duration-0! group-data-[dragging=true]_*:!duration-0`),t[14]=_,t[15]=v);let y;t[16]===v?y=t[17]:(y=(0,$.jsx)(`div`,{"data-slot":`sidebar-gap`,className:v}),t[16]=v,t[17]=y);let b;t[18]===p?b=t[19]:(b=p({id:`07q4Qk`}),t[18]=p,t[19]=b);let x=d===`floating`||d===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l`,S;t[20]!==r||t[21]!==x?(S=o(`fixed inset-y-0 z-10 flex h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear motion-reduce:transition-none motion-reduce:duration-0 data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]`,x,`group-data-[dragging=true]:duration-0! group-data-[dragging=true]_*:!duration-0`,r),t[20]=r,t[21]=x,t[22]=S):S=t[22];let C;t[23]===n?C=t[24]:(C=(0,$.jsx)(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:`flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border`,children:n}),t[23]=n,t[24]=C);let w;t[25]!==a||t[26]!==u||t[27]!==S||t[28]!==C||t[29]!==b?(w=(0,$.jsx)(`nav`,{id:Ze,"aria-label":b,"data-slot":`sidebar-container`,"data-side":u,className:S,...a,children:C}),t[25]=a,t[26]=u,t[27]=S,t[28]=C,t[29]=b,t[30]=w):w=t[30];let T;return t[31]!==h||t[32]!==u||t[33]!==m||t[34]!==w||t[35]!==g||t[36]!==y||t[37]!==d?(T=(0,$.jsxs)(`div`,{className:`group peer text-sidebar-foreground`,"data-state":m,"data-collapsible":g,"data-variant":d,"data-side":u,"data-slot":`sidebar`,"data-dragging":h,children:[y,w]}),t[31]=h,t[32]=u,t[33]=m,t[34]=w,t[35]=g,t[36]=y,t[37]=d,t[38]=T):T=t[38],T}function lt(e){let t=(0,Q.c)(34),n,r,a;t[0]===e?(n=t[1],r=t[2],a=t[3]):({className:n,onClick:r,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=a);let{_:s}=i(),{toggleSidebar:c,state:l}=it(),u,d,f,m,g,v,y,b;if(t[4]!==s||t[5]!==l){let e=h(`toggle-files-sidebar`);u=p,d=`trigger`,f=`sidebar-trigger`,m=`ghost`,g=`icon-sm`,v=l===`expanded`,y=Ze,b=s(l===`expanded`?{id:`4PYsOz`,values:{sidebarShortcutLabel:e}}:{id:`jbSG8V`,values:{sidebarShortcutLabel:e}}),t[4]=s,t[5]=l,t[6]=u,t[7]=d,t[8]=f,t[9]=m,t[10]=g,t[11]=v,t[12]=y,t[13]=b}else u=t[6],d=t[7],f=t[8],m=t[9],g=t[10],v=t[11],y=t[12],b=t[13];let x;t[14]===n?x=t[15]:(x=o(n),t[14]=n,t[15]=x);let S;t[16]!==r||t[17]!==c?(S=e=>{r?.(e),c()},t[16]=r,t[17]=c,t[18]=S):S=t[18];let C;t[19]===l?C=t[20]:(C=l===`expanded`?(0,$.jsx)(_,{}):(0,$.jsx)(q,{}),t[19]=l,t[20]=C);let w;return t[21]!==u||t[22]!==a||t[23]!==d||t[24]!==C||t[25]!==f||t[26]!==m||t[27]!==g||t[28]!==v||t[29]!==y||t[30]!==b||t[31]!==x||t[32]!==S?(w=(0,$.jsx)(u,{"data-sidebar":d,"data-slot":f,variant:m,size:g,"aria-expanded":v,"aria-controls":y,"aria-label":b,className:x,onClick:S,...a,children:C}),t[21]=u,t[22]=a,t[23]=d,t[24]=C,t[25]=f,t[26]=m,t[27]=g,t[28]=v,t[29]=y,t[30]=b,t[31]=x,t[32]=S,t[33]=w):w=t[33],w}function ut(e){let t=(0,Q.c)(32),n,r,a,s,c;t[0]===e?(n=t[1],r=t[2],a=t[3],s=t[4],c=t[5]):({className:n,enableDrag:s,enableToggle:c,onMouseDown:r,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=a,t[4]=s,t[5]=c);let l=s===void 0?!0:s,u=c===void 0?!0:c,{_:d}=i(),{toggleSidebar:f,setWidth:p,state:m,width:h,setIsDraggingRail:g}=it(),_=m===`collapsed`,v;t[6]!==l||t[7]!==u||t[8]!==g||t[9]!==p||t[10]!==_||t[11]!==f||t[12]!==h?(v={direction:`right`,enableDrag:l,enableToggle:u,onResize:p,onToggle:f,currentWidth:h,isCollapsed:_,minResizeWidth:Qe,maxResizeWidth:$e,setIsDraggingRail:g,widthCookieName:et,widthCookieMaxAge:Je},t[6]=l,t[7]=u,t[8]=g,t[9]=p,t[10]=_,t[11]=f,t[12]=h,t[13]=v):v=t[13];let{dragRef:y,handleMouseDown:b}=Ke(v),x;t[14]!==d||t[15]!==m?(x=d(m===`expanded`?{id:`w3vFfL`}:{id:`e8zRrb`}),t[14]=d,t[15]=m,t[16]=x):x=t[16];let S;t[17]!==b||t[18]!==r?(S=e=>{r?.(e),e.defaultPrevented||b(e)},t[17]=b,t[18]=r,t[19]=S):S=t[19];let C;t[20]!==d||t[21]!==m?(C=d(m===`expanded`?{id:`w3vFfL`}:{id:`e8zRrb`}),t[20]=d,t[21]=m,t[22]=C):C=t[22];let w;t[23]===n?w=t[24]:(w=o(`absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:start-1/2 after:w-[2px] hover:after:bg-sidebar-border sm:flex ltr:-translate-x-1/2 rtl:-translate-x-1/2`,`in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize`,`[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize`,`group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar`,`[[data-side=left][data-collapsible=offcanvas]_&]:-right-2`,`[[data-side=right][data-collapsible=offcanvas]_&]:-left-2`,`md:group-data-[variant=inset]:after:inset-y-5`,n),t[23]=n,t[24]=w);let T;return t[25]!==y||t[26]!==a||t[27]!==x||t[28]!==S||t[29]!==C||t[30]!==w?(T=(0,$.jsx)(`button`,{ref:y,"data-sidebar":`rail`,"data-slot":`sidebar-rail`,"aria-label":x,tabIndex:-1,onMouseDown:S,title:C,className:w,...a}),t[25]=y,t[26]=a,t[27]=x,t[28]=S,t[29]=C,t[30]=w,t[31]=T):T=t[31],T}function dt(e){let t=(0,Q.c)(14),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,onAnimationEnd:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let{showPushPulse:a,setShowPushPulse:s}=it(),c;t[4]!==r||t[5]!==s?(c=e=>{r?.(e),e.animationName===`sidebar-push-pulse`&&s(!1)},t[4]=r,t[5]=s,t[6]=c):c=t[6];let l=c,u=a?``:void 0,d;t[7]===n?d=t[8]:(d=o(`relative flex w-full flex-1 flex-col bg-background peer-data-[variant=inset]:m-2 peer-data-[variant=inset]:ml-0 peer-data-[variant=inset]:rounded-xl peer-data-[variant=inset]:shadow-sm peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2`,n),t[7]=n,t[8]=d);let f;return t[9]!==l||t[10]!==i||t[11]!==u||t[12]!==d?(f=(0,$.jsx)(`main`,{"data-slot":`sidebar-inset`,"data-push-pulse":u,onAnimationEnd:l,className:d,...i}),t[9]=l,t[10]=i,t[11]=u,t[12]=d,t[13]=f):f=t[13],f}function ft(e){let t=(0,Q.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=o(`flex flex-col gap-2 p-2`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,$.jsx)(`div`,{"data-slot":`sidebar-header`,"data-sidebar":`header`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function pt(e){let t=(0,Q.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=o(`flex flex-col gap-2 p-2`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,$.jsx)(`div`,{"data-slot":`sidebar-footer`,"data-sidebar":`footer`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function mt(e){let t=(0,Q.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=o(`no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,$.jsx)(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function ht(e){let t=(0,Q.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=o(`relative flex w-full min-w-0 flex-col p-2`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,$.jsx)(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function gt(e){let t=(0,Q.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,asChild:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i!==void 0&&i?l:`div`,s;t[4]===n?s=t[5]:(s=o(`flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0`,n),t[4]=n,t[5]=s);let c;return t[6]!==a||t[7]!==r||t[8]!==s?(c=(0,$.jsx)(a,{"data-slot":`sidebar-group-label`,"data-sidebar":`group-label`,className:s,...r}),t[6]=a,t[7]=r,t[8]=s,t[9]=c):c=t[9],c}function _t(e){let t=(0,Q.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=o(`w-full text-sm`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,$.jsx)(`div`,{"data-slot":`sidebar-group-content`,"data-sidebar":`group-content`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function vt(e){let t=(0,Q.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=o(`flex w-full min-w-0 flex-col gap-0`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,$.jsx)(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function yt(e){let t=(0,Q.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=o(`group/menu-item relative`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,$.jsx)(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var bt=c(`peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-hover hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-hover active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-hover data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground data-active:hover:bg-sidebar-accent [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate`,{variants:{variant:{default:`hover:bg-sidebar-hover hover:text-sidebar-accent-foreground`,outline:`bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-hover hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]`},size:{default:`h-8 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}});function xt(e){let t=(0,Q.c)(28),n,r,i,a,s,c,p;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],s=t[5],c=t[6],p=t[7]):({asChild:i,isActive:a,variant:s,size:c,tooltip:p,className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=s,t[6]=c,t[7]=p);let m=i===void 0?!1:i,h=a===void 0?!1:a,g=s===void 0?`default`:s,_=c===void 0?`default`:c,v=m?l:`button`,y=I.use(nt),b;t[8]!==n||t[9]!==_||t[10]!==g?(b=o(bt({variant:g,size:_}),n),t[8]=n,t[9]=_,t[10]=g,t[11]=b):b=t[11];let x;t[12]!==v||t[13]!==h||t[14]!==r||t[15]!==_||t[16]!==b?(x=(0,$.jsx)(v,{"data-slot":`sidebar-menu-button`,"data-sidebar":`menu-button`,"data-size":_,"data-active":h,className:b,...r}),t[12]=v,t[13]=h,t[14]=r,t[15]=_,t[16]=b,t[17]=x):x=t[17];let S=x;if(!p)return S;if(!y)throw Error(`SidebarMenuButton tooltip requires a SidebarProvider.`);if(typeof p==`string`){let e;t[18]===p?e=t[19]:(e={children:p},t[18]=p,t[19]=e),p=e}let C;t[20]===S?C=t[21]:(C=(0,$.jsx)(u,{asChild:!0,children:S}),t[20]=S,t[21]=C);let w=y.state!==`collapsed`,T;t[22]!==w||t[23]!==p?(T=(0,$.jsx)(d,{side:`right`,align:`center`,hidden:w,...p}),t[22]=w,t[23]=p,t[24]=T):T=t[24];let E;return t[25]!==C||t[26]!==T?(E=(0,$.jsxs)(f,{children:[C,T]}),t[25]=C,t[26]=T,t[27]=E):E=t[27],E}function St(e){let t=(0,Q.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,asChild:i,showOnHover:a,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let s=i===void 0?!1:i,c=a===void 0?!1:a,u=s?l:`button`,d=c&&`group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-active/menu-button:text-sidebar-accent-foreground aria-expanded:opacity-100 md:opacity-0`,f;t[5]!==n||t[6]!==d?(f=o(`absolute top-1.5 end-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0`,d,n),t[5]=n,t[6]=d,t[7]=f):f=t[7];let p;return t[8]!==u||t[9]!==r||t[10]!==f?(p=(0,$.jsx)(u,{"data-slot":`sidebar-menu-action`,"data-sidebar":`menu-action`,className:f,...r}),t[8]=u,t[9]=r,t[10]=f,t[11]=p):p=t[11],p}var Ct=`flex size-5 shrink-0 cursor-pointer items-center justify-center rounded-sm text-muted-foreground outline-none hover:bg-muted-foreground/20 hover:text-foreground hover:opacity-100 focus-visible:ring-2 focus-visible:ring-ring/50`,wt=`bg-sidebar-selected text-sidebar-selected-foreground`,Tt=`bg-sidebar-selected! text-sidebar-selected-foreground!`,Et=`bg-sidebar-hover! text-sidebar-hover-foreground!`,Dt=`${wt} hover:bg-sidebar-selected focus-visible:bg-sidebar-selected`,Ot={start:[F.Space],cancel:[F.Esc],end:[F.Space,F.Enter]};function kt(e){return o(Ct,e?`mr-1 opacity-100`:`pointer-events-none absolute right-1 opacity-0 group-hover:pointer-events-auto group-hover:opacity-100`)}var At=`overflow-hidden whitespace-nowrap mask-r-from-[calc(100%-1.5rem)] mask-r-to-[100%]`;function jt(e){return e?At:`truncate group-hover:text-clip group-hover:mask-r-from-[calc(100%-3rem)] group-hover:mask-r-to-[calc(100%-1.5rem)]`}function Mt(e){return e?void 0:-1}function Nt({className:e,isDragging:t}){return o(e,t&&Dt)}function Pt(e){return e.code===F.Enter&&e.target===e.currentTarget}function Ft(e){return e.key===`ContextMenu`||e.shiftKey&&e.key===`F10`}function It(e,t,n){for(let r of e.querySelectorAll(`[data-editor-tab-id]`))if(r.dataset.editorPaneId===t&&r.dataset.editorTabId===n)return r;return null}function Lt({event:e,hasKeyboardActivation:t,isDragging:n}){return e.defaultPrevented?`ignore`:!n&&t&&Pt(e)?`activate-tab`:`delegate-sortable`}function Rt({activeWidth:e,disableMovement:t=!1,isDragging:n,outerStyle:r,transform:i,transition:a}){let o=n&&e?e:void 0;return{...r,transform:t?void 0:N.Transform.toString(i?{...i,scaleX:1,scaleY:1}:null),transition:t?void 0:a,flexBasis:o??r?.flexBasis,maxWidth:o??r?.maxWidth,minWidth:o??r?.minWidth,opacity:r?.opacity,width:o??r?.width,zIndex:n?20:r?.zIndex}}function zt(e,t){let n=e?.querySelectorAll(t)??[],r=1/0,i=-1/0;for(let e of n){let t=e.getBoundingClientRect();r=Math.min(r,t.left),i=Math.max(i,t.right)}return Number.isFinite(r)&&Number.isFinite(i)?{left:r,right:i}:null}function Bt(e){return({activeNodeRect:t,transform:n})=>{let r={...n,y:0};if(!e||!t)return r;let i=e.left-t.left,a=e.right-t.right;return r.x=Math.min(Math.max(r.x,i),a),r}}function Vt(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.kind===`editor-tab`&&typeof t.paneId==`string`&&typeof t.tabId==`string`&&typeof t.splittable==`boolean`&&typeof t.label==`string`}function Ht(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.kind===`pane-edge`?typeof t.paneId==`string`&&(t.side===`left`||t.side===`right`):t.kind===`pane-strip`&&typeof t.paneId==`string`&&typeof t.index==`number`&&Number.isInteger(t.index)}function Ut(e,t){return e.x>=t.left&&e.x<=t.right&&e.y>=t.top&&e.y<=t.bottom}function Wt(e,t){return e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top}var Gt=e=>{let t=e.droppableContainers.filter(e=>e.data.current?.kind===`pane-edge`),n=e.droppableContainers.filter(e=>e.data.current?.kind!==`pane-edge`),r=e.active.data.current,i=e.pointerCoordinates;if(i&&Vt(r)&&r.splittable){let n=t.find(t=>{let n=e.droppableRects.get(t.id);return n?Ut(i,n):!1});if(n)return[{id:n.id,data:{droppableContainer:n,value:0}}]}if(i){let t=n.filter(t=>{let n=e.droppableRects.get(t.id);return n?Ut(i,n):!1});if(t.length>0){let n=t.filter(e=>Vt(e.data.current));return P({...e,droppableContainers:n.length>0?n:t})}let r=n.filter(t=>{let n=t.data.current,r=e.droppableRects.get(t.id);return n?.kind!==`pane-strip`||!r?!1:Wt(e.collisionRect,r)});if(r.length===0)return[];let a=new Set(r.map(e=>e.data.current?.paneId)),o=n.filter(t=>{let n=t.data.current,r=e.droppableRects.get(t.id);return!Vt(n)||!a.has(n.paneId)||!r?!1:Wt(e.collisionRect,r)});return P({...e,droppableContainers:o.length>0?o:r})}return P({...e,droppableContainers:n})},Kt=e=>{let{droppableContainers:t,droppableRects:n,pointerCoordinates:r}=e;if(r){let e=1/0,i=-1/0,a=null,o=null;for(let r of t){let t=n.get(r.id);t&&(t.left<e&&(e=t.left,a=r),t.right>i&&(i=t.right,o=r))}if(!Number.isFinite(e)||!Number.isFinite(i))return[];let s=r.x<e?a:r.x>i?o:null;if(s)return[{id:s.id,data:{droppableContainer:s,value:0}}]}return P(e)};function qt(e){Math.abs(e.deltaX)>=Math.abs(e.deltaY)||e.currentTarget.scrollWidth<=e.currentTarget.clientWidth||(e.preventDefault(),e.currentTarget.scrollLeft+=e.deltaY)}var Jt=`open-knowledge:new-preferred-session`;function Yt(e=typeof window>`u`?new EventTarget:window){e.dispatchEvent(new CustomEvent(Jt))}function Xt(e,t=typeof window>`u`?new EventTarget:window){let n=()=>e();return t.addEventListener(Jt,n),()=>t.removeEventListener(Jt,n)}export{_e as $,ft as A,Ve as B,Kt as C,ht as D,pt as E,yt as F,xe as G,Be as H,at as I,Se as J,De as K,ut as L,vt as M,St as N,_t as O,xt as P,be as Q,lt as R,Ft as S,mt as T,ke as U,Re as V,je as W,Te as X,we as Y,ye as Z,Mt as _,Et as a,ae as at,Ht as b,Tt as c,J as ct,Gt as d,ge as et,It as f,kt as g,Rt as h,Ct as i,he as it,dt as j,gt as k,At as l,H as lt,Lt as m,Xt as n,de as nt,Ot as o,se as ot,Nt as p,Ee as q,qt as r,pe as rt,wt as s,re as st,Yt as t,me as tt,Bt as u,G as ut,jt as v,ct as w,zt as x,Vt as y,it as z};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./__vite-browser-external-pK7FQf_r.js","./chunk-CYidjpOJ.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./preload-helper-Chd9yIcd.js";import{a as n,c as r,d as i,f as a,i as o,l as s,n as c,r as l,s as u,t as d,u as f}from"./trace-api-BjgnT4Mc.js";import{n as ee,t as p}from"./propagation-api-BP58TooP.js";import{t as m}from"./status-SIkheD7g.js";import{t as h}from"./context-api-D2PVlCLE.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 _=s.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 i(Se,e,s.instance())}getMeterProvider(){return f(Se)||xe}getMeter(e,t,n){return this.getMeterProvider().getMeter(e,t,n)}disable(){a(Se,s.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=r(`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=p.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:p.setBaggage(e,p.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,Ct=10**xt;function x(e){let t=e/1e3;return[Math.trunc(t),Math.round(e%1e3*St)]}function S(e){return Dt(x(b.timeOrigin),x(typeof e==`number`?e:b.now()))}function C(e){if(Tt(e))return e;if(typeof e==`number`)return e<b.timeOrigin?S(e):x(e);if(e instanceof Date)return x(e.getTime());throw TypeError(`Invalid input type`)}function wt(e,t){let n=t[0]-e[0],r=t[1]-e[1];return r<0&&(--n,r+=Ct),[n,r]}function w(e){return e[0]*Ct+e[1]}function Tt(e){return Array.isArray(e)&&e.length===2&&typeof e[0]==`number`&&typeof e[1]==`number`}function Et(e){return Tt(e)||typeof e==`number`||e instanceof Date}function Dt(e,t){let n=[e[0]+t[0],e[1]+t[1]];return n[1]>=Ct&&(n[1]-=Ct,n[0]+=1),n}var T;(function(e){e[e.SUCCESS=0]=`SUCCESS`,e[e.FAILED=1]=`FAILED`})(T||={});var Ot=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()}},kt=`[_0-9a-z-*/]`,At=`[a-z]${kt}{0,255}`,jt=`[a-z0-9]${kt}{0,240}@[a-z]${kt}{0,13}`,Mt=RegExp(`^(?:${At}|${jt})$`),Nt=/^[ -~]{0,255}[!-~]$/,Pt=/,|=/;function Ft(e){return Mt.test(e)}function It(e){return Nt.test(e)&&!Pt.test(e)}var Lt=32,Rt=512,zt=`,`,Bt=`=`,Vt=class e{_length;_rawTraceState;_internalState;constructor(e){this._rawTraceState=typeof e==`string`?e:``,this._length=this._rawTraceState.length}set(e,t){if(!Ft(e)||!It(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>Rt)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=zt+e),e=`${n[0]}${Bt}${n[1]}`+e,t++;return e}_getState(){if(this._internalState)return this._internalState;let e=this._rawTraceState.split(zt),t=new Map,n=0;for(let r of e){let e=r.trim(),i=e.indexOf(Bt);if(i===-1)continue;let a=e.slice(0,i),o=e.slice(i+1);if(!Ft(a)||!It(o))continue;let s=n+e.length+ +(t.size>0);if(!(s>Rt)&&(t.set(a,o),n=s,t.size>=Lt))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}},E=`traceparent`,Ht=`tracestate`,Ut=`00`,Wt=RegExp(`^\\s?((?!ff)[\\da-f]{2})-((?![0]{32})[\\da-f]{32})-((?![0]{16})[\\da-f]{16})-([\\da-f]{2})(-.*)?\\s?$`);function Gt(e){let t=Wt.exec(e);return!t||t[1]===`00`&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}var Kt=class{inject(e,t,r){let i=d.getSpanContext(e);if(!i||Pe(e)||!c(i))return;let a=`${Ut}-${i.traceId}-${i.spanId}-0${Number(i.traceFlags||n.NONE).toString(16)}`;r.set(t,E,a),i.traceState&&r.set(t,Ht,i.traceState.serialize())}extract(e,t,n){let r=n.get(t,E);if(!r)return e;let i=Array.isArray(r)?r[0]:r;if(typeof i!=`string`)return e;let a=Gt(i);if(!a)return e;a.isRemote=!0;let o=n.get(t,Ht);if(o){let e=Array.isArray(o)?o.join(`,`):o;a.traceState=new Vt(typeof e==`string`?e:void 0)}return d.setSpanContext(e,a)}fields(){return[E,Ht]}},qt=`[object Object]`,Jt=`[object Null]`,Yt=`[object Undefined]`,Xt=Function.prototype.toString,Zt=Xt.call(Object),Qt=Object.getPrototypeOf,$t=Object.prototype,en=$t.hasOwnProperty,D=Symbol?Symbol.toStringTag:void 0,tn=$t.toString;function nn(e){if(!rn(e)||an(e)!==qt)return!1;let t=Qt(e);if(t===null)return!0;let n=en.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&Xt.call(n)===Zt}function rn(e){return typeof e==`object`&&!!e}function an(e){return e==null?e===void 0?Yt:Jt:D&&D in Object(e)?on(e):sn(e)}function on(e){let t=en.call(e,D),n=e[D],r=!1;try{e[D]=void 0,r=!0}catch{}let i=tn.call(e);return r&&(t?e[D]=n:delete e[D]),i}function sn(e){return tn.call(e)}var cn=20;function ln(...e){let t=e.shift(),n=new WeakMap;for(;e.length>0;)t=dn(t,e.shift(),0,n);return t}function un(e){return O(e)?e.slice():e}function dn(e,t,n=0,r){let i;if(!(n>cn)){if(n++,A(e)||A(t)||pn(t))i=un(t);else if(O(e)){if(i=e.slice(),O(t))for(let e=0,n=t.length;e<n;e++)i.push(un(t[e]));else if(k(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]=un(t[r]))}}}else if(k(e))if(k(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(A(c))c===void 0?delete i[s]:i[s]=c;else{let a=i[s],o=c;if(fn(e,s,r)||fn(t,s,r))delete i[s];else{if(k(a)&&k(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]=dn(i[s],c,n,r)}}}}else i=t;return i}}function fn(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 O(e){return Array.isArray(e)}function pn(e){return typeof e==`function`}function k(e){return!A(e)&&!O(e)&&!pn(e)&&typeof e==`object`}function A(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!(!nn(e)||!nn(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:T.FAILED,error:Error(`Concurrent export limit reached`)});return}let n=this._serializer.serializeRequest(e);if(n==null){t({code:T.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:T.SUCCESS});return}else if(e.status===`failure`&&e.error){t({code:T.FAILED,error:e.error});return}else e.status===`retryable`?t({code:T.FAILED,error:new Te(`Export failed with retryable status`)}):t({code:T.FAILED,error:new Te(`Export failed with unknown error`)})},e=>t({code:T.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:w;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-pK7FQf_r.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||d.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=d.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:m.UNSET};endTime=[0,0];_ended=!1;_duration=[-1,-1];_spanProcessor;_spanLimits;_attributeValueLengthLimit;_recordEndMetrics;_performanceStartTime;_performanceOffset;_startTimeProvided;constructor(e){let t=Date.now();if(this._spanContext=e.spanContext,this._performanceStartTime=b.now(),this._performanceOffset=t-(this._performanceStartTime+b.timeOrigin),this._startTimeProvided=e.startTime!=null,this._spanLimits=e.spanLimits,this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit??0,this._spanProcessor=e.spanProcessor,this.name=e.name,this.parentSpanContext=e.parentSpanContext,this.kind=e.kind,e.links)for(let t of e.links)this.addLink(t);this.startTime=this._getTime(e.startTime??t),this.resource=e.resource,this.instrumentationScope=e.scope,this._recordEndMetrics=e.recordEndMetrics,e.attributes!=null&&this.setAttributes(e.attributes),this._spanProcessor.onStart(this,e.context)}spanContext(){return this._spanContext}setAttribute(e,t){if(t==null||this._isSpanEnded())return this;if(e.length===0)return _.warn(`Invalid attribute key: ${e}`),this;if(!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++),Et(t)&&(Et(n)||(n=t),t=void 0);let i=v(t),{attributePerEventCountLimit:a}=this._spanLimits,o={},s=0,c=0;for(let e in i){if(!Object.prototype.hasOwnProperty.call(i,e))continue;let t=i[e];if(a!==void 0&&c>=a){s++;continue}o[e]=this._truncateToSize(t),c++}return this.events.push({name:e,attributes:o,time:this._getTime(n),droppedAttributesCount:s}),this}addLink(e){if(this._isSpanEnded())return this;let{linkCountLimit:t}=this._spanLimits;if(t===0)return this._droppedLinksCount++,this;t!==void 0&&this.links.length>=t&&(this._droppedLinksCount===0&&_.debug(`Dropping extra links.`),this.links.shift(),this._droppedLinksCount++);let{attributePerLinkCountLimit:n}=this._spanLimits,r=v(e.attributes),i={},a=0,o=0;for(let e in r){if(!Object.prototype.hasOwnProperty.call(r,e))continue;let t=r[e];if(n!==void 0&&o>=n){a++;continue}i[e]=this._truncateToSize(t),o++}let s={context:e.context};return o>0&&(s.attributes=i),a>0&&(s.droppedAttributesCount=a),this.links.push(s),this}addLinks(e){for(let t of e)this.addLink(t);return this}setStatus(e){if(this._isSpanEnded()||e.code===m.UNSET||this.status.code===m.OK)return this;let t={code:e.code};return e.code===m.ERROR&&(typeof e.message==`string`?t.message=e.message:e.message!=null&&_.warn(`Dropping invalid status.message of type '${typeof e.message}', expected 'string'`)),this.status=t,this}updateName(e){return this._isSpanEnded()||(this.name=e),this}end(e){if(this._isSpanEnded()){_.error(`${this.name} ${this._spanContext.traceId}-${this._spanContext.spanId} - You can only call end() on a span once.`);return}this.endTime=this._getTime(e),this._duration=wt(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 S(e+this._performanceOffset);if(typeof e==`number`)return x(e);if(e instanceof Date)return x(e.getTime());if(Tt(e))return e;if(this._startTimeProvided)return x(Date.now());let t=b.now()-this._performanceStartTime;return Dt(this.startTime,x(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=d.deleteSpan(r));let i=d.getSpan(r);if(Pe(r))return _.debug(`Instrumentation suppressed, returning Noop Span`),d.wrapSpanContext(o);let a=i?.spanContext(),s=this._idGenerator.generateSpanId(),c,l,u;!a||!d.isSpanContextValid(a)?l=this._idGenerator.generateTraceId():(l=a.traceId,u=a.traceState,c=a);let f=t.kind??be.INTERNAL,ee=(t.links??[]).map(e=>({context:e.context,attributes:v(e.attributes)})),p=v(t.attributes),m=this._sampler.shouldSample(r,l,e,f,p,ee),te=this._tracerMetrics.startSpan(a,m.decision);u=m.traceState??u;let g=m.decision===ye.RECORD_AND_SAMPLED?n.SAMPLED:n.NONE,ne={traceId:l,spanId:s,traceFlags:g,traceState:u};if(m.decision===ye.NOT_RECORD)return _.debug(`Recording is off, propagating context in a non-recording span`),d.wrapSpanContext(ne);let re=v(Object.assign(p,m.attributes));return new Zr({resource:this._resource,scope:this.instrumentationScope,context:r,spanContext:ne,name:e,kind:f,links:ee,parentSpanContext:c,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=d.setSpan(s,c);return h.with(l,o,void 0,c)}[Jr](e,t,n){return Xr(`Tracer`,{instrumentationScope:this.instrumentationScope,resource:{attributes:Yr(this._resource)},spanLimits:this._spanLimits},e,t,n)}},pi=class{_spanProcessors;constructor(e){this._spanProcessors=e}forceFlush(){let e=[];for(let t of this._spanProcessors)e.push(t.forceFlush());return new Promise(t=>{Promise.all(e).then(()=>{t()}).catch(e=>{y(e||Error(`MultiSpanProcessor: forceFlush failed`)),t()})})}onStart(e,t){for(let n of this._spanProcessors)n.onStart(e,t)}onEnding(e){for(let t of this._spanProcessors)t.onEnding&&t.onEnding(e)}onEnd(e){for(let t of this._spanProcessors)t.onEnd(e)}shutdown(){let e=[];for(let t of this._spanProcessors)e.push(t.shutdown());return new Promise((t,n)=>{Promise.all(e).then(()=>{t()},n)})}},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,r,i,a,o){let s=d.getSpanContext(e);return!s||!c(s)?this._root.shouldSample(e,t,r,i,a,o):s.isRemote?s.traceFlags&n.SAMPLED?this._remoteParentSampled.shouldSample(e,t,r,i,a,o):this._remoteParentNotSampled.shouldSample(e,t,r,i,a,o):s.traceFlags&n.SAMPLED?this._localParentSampled.shouldSample(e,t,r,i,a,o):this._localParentNotSampled.shouldSample(e,t,r,i,a,o)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}},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&n.SAMPLED)!==0&&this._addToBuffer(e)}shutdown(){return this._shutdownOnce.call()}_shutdown(){return Promise.resolve().then(()=>this.onShutdown()).then(()=>this._flushAll()).then(()=>(this._metrics.shutdown(),this._exporter.shutdown()))}_addToBuffer(e){if(this._finishedSpans.length>=this._maxQueueSize){this._droppedSpansCount===0&&_.debug(`maxQueueSize reached, dropping spans`),this._droppedSpansCount++,this._metrics.dropSpans(1);return}this._droppedSpansCount>0&&(_.warn(`Dropped ${this._droppedSpansCount} spans because maxQueueSize reached`),this._droppedSpansCount=0),this._finishedSpans.push(e),this._maybeStartTimer()}_flushAll(){return new Promise((e,t)=>{let n=[],r=Math.ceil(this._finishedSpans.length/this._maxExportBatchSize);for(let e=0,t=r;e<t;e++)n.push(this._flushOneBatch());Promise.all(n).then(()=>{e()}).catch(t)})}_flushOneBatch(){return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise((e,t)=>{let n=setTimeout(()=>{t(Error(`Timeout`))},this._exportTimeoutMillis);h.with(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===T.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:l(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=ln({},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=u;_bindFunction(e=u,t){let n=this,r=function(...r){return n.with(e,()=>t.apply(this,r))};return Object.defineProperty(r,`length`,{enumerable:!1,configurable:!0,writable:!1,value:t.length}),r}active(){return this._currentContext}bind(e,t){return e===void 0&&(e=this.active()),typeof t==`function`?this._bindFunction(e,t):t}disable(){return this._currentContext=u,this._enabled=!1,this}enable(){return this._enabled?this:(this._enabled=!0,this._currentContext=u,this)}with(e,t,n,...r){let i=this._currentContext;this._currentContext=e||u;try{return t.call(n,...r)}finally{this._currentContext=i}}};function 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){p.setGlobalPropagator(new Ot({propagators:[new Kt,new Ve]}));return}p.setGlobalPropagator(e)}}var Ri=class extends Ni{constructor(e={}){super(e)}register(e={}){d.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`)===E),t=Ji(),n=e&&e.content||``;h.with(p.extract(u,{traceparent:n}),()=>{let e=this._startSpan(X.DOCUMENT_LOAD,q.FETCH_START,t);e&&(h.with(d.setSpan(h.active(),e),()=>{let e=this._startSpan(X.DOCUMENT_FETCH,q.FETCH_START,t);e&&(e.setAttribute(et,location.href),h.with(d.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?d.setSpan(h.active(),r):void 0)}_waitForPageLoad(){window.document.readyState===`complete`?this._onDocumentLoaded():(this._onDocumentLoaded=this._onDocumentLoaded.bind(this),window.addEventListener(`load`,this._onDocumentLoaded))}_addCustomAttributesOnSpan(e,t){t&&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=w(n),i=w(C(t)),a=e[1],o,s=e.length;for(let t=1;t<s;t++){let n=e[t],s=w(C(n[Z.FETCH_START])),c=r-w(C(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=w(t),s=w(n),c=r.filter(t=>{let n=w(C(t[Z.FETCH_START])),r=w(C(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]},d.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={};p.inject(h.active(),e),Object.keys(e).length>0&&this._diag.debug(`headers inject skipped due to CORS policy`);return}if(e instanceof Request)p.inject(h.active(),e.headers,{set:(e,t,n)=>e.set(t,typeof n==`string`?n:String(n))});else if(e.headers instanceof Headers)p.inject(h.active(),e.headers,{set:(e,t,n)=>e.set(t,typeof n==`string`?n:String(n))});else if(e.headers instanceof Map)p.inject(h.active(),e.headers,{set:(e,t,n)=>e.set(t,typeof n==`string`?n:String(n))});else{let t={};p.inject(h.active(),t),e.headers=Object.assign({},t,e.headers||{})}}_clearResources(){this._tasksCount===0&&this.getConfig().clearTimingResources&&(performance.clearResourceTimings(),this._usedResources=new WeakSet)}_createSpan(e,t={}){if(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=x(Date.now()),i=S();this._addFinalSpanAttributes(e,n),this._semconvStability&R.STABLE&&n.status>=400&&(e.setStatus({code:m.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 f(e,t,n){try{c(e,n)}finally{t(n)}}return new Promise((n,s)=>h.with(d.setSpan(h.active(),o),()=>(t._addHeaders(a,i),t._callRequestHook(o,a),t._tasksCount++,e.apply(r,a instanceof Request?[a]:[i,a]).then(u.bind(r,o,n),f.bind(r,o,s)))))}}}_applyAttributesAfterFetch(e,t,n){let r=this.getConfig().applyCustomAttributesOnSpan;r&&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=S(),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=S():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?d.setSpan(h.active(),n):void 0);return this._shouldPreventSpanCreation(t,e,i)===!0?void 0:(this._spansData.set(i,{taskCount:0}),i)}catch(e){this._diag.error(`failed to start create new user interaction span`,e)}}_decrementTask(e){let t=this._spansData.get(e);t&&(t.taskCount--,t.taskCount===0&&this._tryToEndSpan(e,t.hrTimeLastTimeout))}_getCurrentSpan(e){let t=e.get(Ba);return t&&d.getSpan(t)}_incrementTask(e){let t=this._spansData.get(e);t&&t.taskCount++}addPatchedListener(e,t,n,r){let i=this._wrappedListeners.get(n);i||(i=new Map,this._wrappedListeners.set(n,i));let a=i.get(t);return a||(a=new Map,i.set(t,a)),a.has(e)?!1:(a.set(e,r),!0)}removePatchedListener(e,t,n){let r=this._wrappedListeners.get(n);if(!r)return;let i=r.get(t);if(!i)return;let a=i.get(e);return a&&(i.delete(e),i.size===0&&(r.delete(t),r.size===0&&this._wrappedListeners.delete(n))),a}_invokeListener(e,t,n){return typeof e==`function`?e.apply(t,n):e.handleEvent(n[0])}_patchAddEventListener(){let e=this;return t=>function(n,r,i){if(!r)return t.call(this,n,r,i);let a=i&&typeof i==`object`&&i.once,o=function(...t){let i,o=t[0],s=o?.target;o&&(i=e._eventsSpanMap.get(o)),a&&e.removePatchedListener(this,n,r);let c=e._createSpan(s,n,i);return c?(o&&e._eventsSpanMap.set(o,c),h.with(d.setSpan(h.active(),c),()=>{let n=e._invokeListener(r,this,t);return c.end(),n})):e._invokeListener(r,this,t)};if(e.addPatchedListener(this,n,r,o))return t.call(this,n,o,i)}}_patchRemoveEventListener(){let e=this;return t=>function(n,r,i){let a=e.removePatchedListener(this,n,r);return a?t.call(this,n,a,i):t.call(this,n,r,i)}}_getPatchableEventTargets(){return window.EventTarget?[EventTarget.prototype]:[Node.prototype,Window.prototype]}_patchHistoryApi(){this._unpatchHistoryApi(),this._wrap(history,`replaceState`,this._patchHistoryMethod()),this._wrap(history,`pushState`,this._patchHistoryMethod()),this._wrap(history,`back`,this._patchHistoryMethod()),this._wrap(history,`forward`,this._patchHistoryMethod()),this._wrap(history,`go`,this._patchHistoryMethod())}_patchHistoryMethod(){let e=this;return t=>function(...n){let r=`${location.pathname}${location.hash}${location.search}`,i=t.apply(this,n),a=`${location.pathname}${location.hash}${location.search}`;return r!==a&&e._updateInteractionName(a),i}}_unpatchHistoryApi(){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=d.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(d.setSpan(h.active(),o),()=>{let e=Zone.current;return n._zone=e,t.call(e,n,r,i)})}finally{e._decrementTask(o)}})}else o=e._getCurrentSpan(s);try{return t.call(s,n,r,i)}finally{o&&e._shouldCountTask(n,s)&&e._decrementTask(o)}}}_shouldCountTask(e,t){if(e._zone&&(t=e._zone),!t||!e.data||e.data.isPeriodic)return!1;let n=this._getCurrentSpan(t);return!n||!this._spansData.get(n)?!1:e.type===`macroTask`||e.type===`microTask`}_tryToEndSpan(e,t){e&&this._spansData.get(e)&&(e.end(t),this._spansData.delete(e))}enable(){let e=this._getZoneWithPrototype();this._diag.debug(`applying patch to`,this.moduleName,this.version,`zone:`,!!e),e?(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.84.0`}?.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.84.0`};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 d.getTracer(Ga)}export{Ya as getAppTracer,Ja as install};
|
|
@@ -1 +0,0 @@
|
|
|
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{t as r}from"./compiler-runtime-BfE3aGVn.js";import{t as i}from"./utils-CPqDy6Hr.js";import{t as a}from"./dist-BsJYDohW.js";import"./separator-D7s_9ZwH.js";import{i as o,n as s,o as c,r as l}from"./RegisteredAgentIcon-DjlAkIlP.js";import{o as u}from"./constants-embedded-host-Cc7UiZn-.js";import{b as d}from"./handoff-ClTYrgLm.js";import{u as f}from"./agent-registry-B4dxoiaL.js";import{t as p}from"./createLucideIcon-DdBzwsHe.js";var m=`open-knowledge:comments-send-to-open-chat`,h=`open-knowledge:comments-send-in-thread`,g=typeof window>`u`?new EventTarget:window;function _(e){g.dispatchEvent(new CustomEvent(m,{detail:{threadIds:e}}))}function v(e){let t=t=>{e(t instanceof CustomEvent?t.detail??{}:{})};return g.addEventListener(m,t),()=>g.removeEventListener(m,t)}function y(e,t){g.dispatchEvent(new CustomEvent(h,{detail:{threadId:e,threadIds:t}}))}function b(e){let t=t=>{let n=t instanceof CustomEvent?t.detail:null;n==null||typeof n.threadId!=`string`||n.threadId===``||e(n.threadId,n.threadIds)};return g.addEventListener(h,t),()=>g.removeEventListener(h,t)}var x=p(`history`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]]),S=r(),C=t(),w=a(`group/button-group flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-lg [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1`,{variants:{orientation:{horizontal:`[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-r-lg!`,vertical:`flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-b-lg!`}},defaultVariants:{orientation:`horizontal`}});function T(e){let t=(0,S.c)(11),n,r,a;t[0]===e?(n=t[1],r=t[2],a=t[3]):({className:n,orientation:r,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=a);let o;t[4]!==n||t[5]!==r?(o=i(w({orientation:r}),n),t[4]=n,t[5]=r,t[6]=o):o=t[6];let s;return t[7]!==r||t[8]!==a||t[9]!==o?(s=(0,C.jsx)(`div`,{role:`group`,"data-slot":`button-group`,"data-orientation":r,className:o,...a}),t[7]=r,t[8]=a,t[9]=o,t[10]=s):s=t[10],s}var E=e(n(),1),D=`ok-ask-ai-agent-v2`,O=`ok-ask-ai-default-agent-v1`,k=`ok-preferred-agent-v1`,A=`terminal-cli`;function j(e){return`${A}:${e}`}var M=`in-app-thread`;function N(e){return`${M}:${e.source}:${e.id}`}function P(e){if(e===null)return null;if(e===`in-app-thread`)return{kind:`default`};let t=`${M}:`;if(!e.startsWith(t))return null;let n=e.slice(t.length),r=n.indexOf(`:`);if(r<=0)return null;let i=n.slice(0,r),a=n.slice(r+1);return i!==`registry`&&i!==`custom`||a===``?null:{kind:`concrete`,source:i,id:a}}function F(e){return e===null?null:e===`terminal-cli`?`claude`:d.find(t=>e===j(t))??null}function I(e){if(e)return e;if(typeof window>`u`)return null;try{return window.localStorage}catch{return null}}function L(e){let t=I(e);if(!t)return null;try{let e=t.getItem(D);return e===null?t.getItem(O)??t.getItem(k):e}catch{return null}}function R(e,t){let n=I(t);if(n)try{n.setItem(D,e)}catch(e){console.warn(`[ask-ai] Failed to persist default agent:`,e)}for(let e of z)e()}var z=new Set;function B(){return L()}function V(){for(let e of z)e()}typeof window<`u`&&typeof window.addEventListener==`function`&&window.addEventListener(`storage`,e=>{(e.key===`ok-ask-ai-agent-v2`||e.key===null)&&V()});function H(e){return z.add(e),()=>z.delete(e)}function U(){return(0,E.useSyncExternalStore)(H,B,B)}function W(e,t){return e.filter(e=>l(t,e.source,e.id,!0,e.supported))}function G(e,t){return d.filter(n=>o(e,n,t))}function K(e,t){return f.filter(n=>s(e,n.id,t[n.id]?.installed)).map(e=>e.id)}function q(e,t){return f.filter(n=>e[c(n.id)]===void 0&&t[n.id]?.installed==null).map(e=>e.id)}function J(e){let{sticky:t,effectiveThreadAgent:n,enabledClis:r,enabledDesktopTargets:i,unresolvedDesktopTargets:a=[],installedClis:o,terminalAvailable:s,threadsAvailable:c,desktopSelectable:l,preferBareTerminal:u,bareTerminalFallback:d}=e;if(u&&s)return{kind:`terminal`};if(c&&P(t)!==null&&n!==null)return{kind:`thread`,agent:n};if(s){let e=F(t);if(e!==null&&r.includes(e))return{kind:`cli`,cli:e}}return l&&t!==null&&(i.includes(t)||a.includes(t))?{kind:`desktop`,target:t}:c&&n!==null?{kind:`thread`,agent:n}:s&&r.length>0?{kind:`cli`,cli:r.find(e=>o[e]===!0)??r[0]}:l&&i.length>0?{kind:`desktop`,target:i[0]}:d&&s?{kind:`terminal`}:{kind:`none`}}var Y=`open-knowledge:terminal-launch`;function X(){return typeof window>`u`?new EventTarget:window}function Z(e,t){e.dispatchEvent(new CustomEvent(Y,{detail:t}))}function Q(e,t,n,r=X()){let i=n?.stage===!0;u({kind:`terminal-launch`,prompt:e,cli:t,stage:i},r)||Z(r,{kind:`cli`,prompt:e,cli:t,stage:i,...n?.signInThreadId===void 0?{}:{signInThreadId:n.signInThreadId}})}function $(e,t=X()){Z(t,{kind:`command`,...e})}function ee(e,t=typeof window>`u`?new EventTarget:window){let n=t=>{let n=t instanceof CustomEvent&&typeof t.detail==`object`&&t.detail!==null?t.detail:void 0;if(n===void 0)return;let r=typeof n.signInThreadId==`string`?{signInThreadId:n.signInThreadId}:{};if(n.kind===`command`){let t=n.command;typeof t==`object`&&t&&typeof t.executable==`string`&&Array.isArray(t.args)&&typeof n.label==`string`&&e({kind:`command`,command:t,label:n.label,...r});return}n.kind!==void 0&&n.kind!==`cli`||typeof n.prompt!=`string`||typeof n.cli!=`string`||e({kind:`cli`,prompt:n.prompt,cli:n.cli,stage:n.stage===!0,...r})};return t.addEventListener(Y,n),()=>t.removeEventListener(Y,n)}export{x as _,G as a,b,q as c,F as d,R as f,T as g,U as h,K as i,M as l,N as m,Q as n,W as o,j as p,ee as r,J as s,$ as t,L as u,_ as v,v as x,y};
|
package/dist/src-DWEbxzXJ.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./md-manager-BGnqyqi1-dBGkA2rR.mjs";import"./src-BKnvpIkn.mjs";import"./init-BontxrPQ.mjs";import"./registry-probes-Cwx6O6kv.mjs";import"./start-lQOFYtsk.mjs";import{n as e}from"./loader-DMoA9Hv1.mjs";import"./preview-vc6NgNe_.mjs";import"./repair-mcp-configs-mZrdQ93t.mjs";export{e as loadConfig};
|
package/dist/start-Dh1mqp4M.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{S as e,m as t,p as n,r}from"./start-lQOFYtsk.mjs";export{r as bootStartServer,n as resolveBundledReactShellDir,t as resolveHost,e as startCommand};
|