@runtypelabs/persona 4.32.2 → 4.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (215) hide show
  1. package/dist/activity-ui.d.cts +3 -15
  2. package/dist/activity-ui.d.ts +3 -15
  3. package/dist/animations/glyph-cycle.d.cts +1 -3
  4. package/dist/animations/glyph-cycle.d.ts +1 -3
  5. package/dist/animations/wipe.d.cts +1 -3
  6. package/dist/animations/wipe.d.ts +1 -3
  7. package/dist/approval-ui.cjs +2 -2
  8. package/dist/approval-ui.d.cts +3 -15
  9. package/dist/approval-ui.d.ts +3 -15
  10. package/dist/approval-ui.js +1 -1
  11. package/dist/artifacts-ui.cjs +1 -1
  12. package/dist/artifacts-ui.d.cts +3 -21
  13. package/dist/artifacts-ui.d.ts +3 -21
  14. package/dist/background-runtime.d.cts +2 -3
  15. package/dist/background-runtime.d.ts +2 -3
  16. package/dist/{chunk-BbXc58OA.js → chunk-6CUrH_jm.js} +1 -1
  17. package/dist/{chunk-B_H0l3u2.js → chunk-BRM3bHcJ.js} +1 -1
  18. package/dist/{chunk-DNdeIFJ6.js → chunk-Brdx4NCz.js} +1 -1
  19. package/dist/chunk-C-rux8Q9.js +1 -0
  20. package/dist/{chunk-Ds_twaZn.js → chunk-C4v-HNhS.js} +1 -1
  21. package/dist/{chunk-Bkma5hIU.js → chunk-CE4seJxF.js} +1 -1
  22. package/dist/chunk-CEPM3FOp.js +1 -0
  23. package/dist/{chunk-BpjtKnGI.js → chunk-CV8EPIhT.js} +1 -1
  24. package/dist/{chunk-DVZ8ri1z.js → chunk-CWzHNuVK.js} +1 -1
  25. package/dist/{chunk-B3l7TOOv.js → chunk-CYpt7PsO.js} +1 -1
  26. package/dist/{chunk-2FnmZ9AA.js → chunk-Csr59G5V.js} +1 -1
  27. package/dist/{chunk-B9Zu-wrk.js → chunk-CxNPSY-b.js} +1 -1
  28. package/dist/{chunk-UWMfWW2a.js → chunk-D1G8tgYc.js} +1 -1
  29. package/dist/{chunk-DTGvDx8o.js → chunk-Dj2a9f9w.js} +1 -1
  30. package/dist/chunk-Dqa_GOcj.js +1 -0
  31. package/dist/chunk-DsWv3EGF.js +1 -0
  32. package/dist/{chunk-C7-m0EmI.js → chunk-NUNdcnAZ.js} +1 -1
  33. package/dist/{chunk-D0tcIZJM.js → chunk-YMkMvAsa.js} +2 -2
  34. package/dist/{chunk-C-EHtpbB.js → chunk-h5aOI_Pa.js} +1 -1
  35. package/dist/chunk-i4qGOJAL.js +1 -0
  36. package/dist/chunk-kizhspe5.js +1 -0
  37. package/dist/client-dispatch.js +1 -1
  38. package/dist/client-history.js +1 -1
  39. package/dist/client-stream.js +1 -1
  40. package/dist/{code-generators-DqauYyfX.d.cts → code-generators-DPAqTcAz.d.cts} +0 -2
  41. package/dist/{code-generators-DqauYyfX.d.ts → code-generators-DPAqTcAz.d.ts} +0 -2
  42. package/dist/codegen.cjs +1 -1
  43. package/dist/codegen.d.cts +1 -1
  44. package/dist/codegen.d.ts +1 -1
  45. package/dist/codegen.js +1 -1
  46. package/dist/composer-actions-runtime.cjs +1 -1
  47. package/dist/composer-actions-runtime.d.cts +4 -20
  48. package/dist/composer-actions-runtime.d.ts +4 -20
  49. package/dist/composer-actions-runtime.js +1 -1
  50. package/dist/{composer-input-dwg_o9Z-.d.ts → composer-input-i_FiUp6J.d.cts} +1 -7
  51. package/dist/{composer-input-dwg_o9Z-.d.cts → composer-input-i_FiUp6J.d.ts} +1 -7
  52. package/dist/{composer-store-Dw7Zbqxr.d.ts → composer-store-DhGNgG7Z.d.cts} +1 -3
  53. package/dist/{composer-store-Dw7Zbqxr.d.cts → composer-store-DhGNgG7Z.d.ts} +1 -3
  54. package/dist/config-diagnostics.d.cts +0 -2
  55. package/dist/config-diagnostics.d.ts +0 -2
  56. package/dist/{context-mention-manager-D2p0-JH-.d.ts → context-mention-manager-DL-xwGfL.d.cts} +2 -6
  57. package/dist/{context-mention-manager-D2p0-JH-.d.cts → context-mention-manager-DL-xwGfL.d.ts} +2 -6
  58. package/dist/context-mentions-inline.cjs +1 -1
  59. package/dist/context-mentions-inline.d.cts +2 -4
  60. package/dist/context-mentions-inline.d.ts +2 -4
  61. package/dist/context-mentions-inline.js +1 -1
  62. package/dist/context-mentions.cjs +1 -1
  63. package/dist/context-mentions.d.cts +3 -9
  64. package/dist/context-mentions.d.ts +3 -9
  65. package/dist/{defaults-CjX0kKzb.d.ts → defaults-Bga2Xrsp.d.cts} +2 -5
  66. package/dist/{defaults-CjX0kKzb.d.cts → defaults-Bga2Xrsp.d.ts} +2 -5
  67. package/dist/dictation-runtime.cjs +1 -1
  68. package/dist/dictation-runtime.d.cts +4 -13
  69. package/dist/dictation-runtime.d.ts +4 -13
  70. package/dist/dictation-runtime.js +1 -1
  71. package/dist/{dom-context-DHTabIn7.d.ts → dom-context-Bw-_9Evh.d.cts} +0 -2
  72. package/dist/{dom-context-DHTabIn7.d.cts → dom-context-Bw-_9Evh.d.ts} +0 -2
  73. package/dist/event-stream-view.cjs +1 -1
  74. package/dist/event-stream-view.d.cts +3 -16
  75. package/dist/event-stream-view.d.ts +3 -16
  76. package/dist/{fallback-speech-engine-DmF7MczI.d.ts → fallback-speech-engine-kLdyPcmk.d.cts} +1 -3
  77. package/dist/{fallback-speech-engine-DmF7MczI.d.cts → fallback-speech-engine-kLdyPcmk.d.ts} +1 -3
  78. package/dist/{feature-preferences-CVFDt9Xf.d.ts → feature-preferences-CmwZGKrf.d.cts} +1 -5
  79. package/dist/{feature-preferences-CVFDt9Xf.d.cts → feature-preferences-CmwZGKrf.d.ts} +1 -5
  80. package/dist/forms-ui.d.cts +2 -4
  81. package/dist/forms-ui.d.ts +2 -4
  82. package/dist/{history-confirm-dialog-DJEXsTyE.d.cts → history-confirm-dialog-i46-lPN_.d.cts} +2 -14
  83. package/dist/{history-confirm-dialog-DJEXsTyE.d.ts → history-confirm-dialog-i46-lPN_.d.ts} +2 -14
  84. package/dist/history-shell.cjs +1 -1
  85. package/dist/history-shell.d.cts +8 -27
  86. package/dist/history-shell.d.ts +8 -27
  87. package/dist/history-shell.js +1 -1
  88. package/dist/history-view.d.cts +1 -1
  89. package/dist/history-view.d.ts +1 -1
  90. package/dist/icons-extra.cjs +1 -1
  91. package/dist/icons-extra.d.cts +0 -2
  92. package/dist/icons-extra.d.ts +0 -2
  93. package/dist/index.cjs +44 -44
  94. package/dist/index.cjs.map +1 -1
  95. package/dist/index.d.cts +11 -11
  96. package/dist/index.d.ts +11 -11
  97. package/dist/index.global.js +1 -1
  98. package/dist/index.global.js.map +1 -1
  99. package/dist/index.js +46 -46
  100. package/dist/index.js.map +1 -1
  101. package/dist/install.global.js +1 -1
  102. package/dist/install.global.js.map +1 -1
  103. package/dist/launcher.global.js +2 -2
  104. package/dist/launcher.global.js.map +1 -1
  105. package/dist/{loading-label-runtime-loader-CPxnoaoi.d.ts → loading-label-runtime-loader-Ccr3ETd3.d.cts} +1 -3
  106. package/dist/{loading-label-runtime-loader-CPxnoaoi.d.cts → loading-label-runtime-loader-Ccr3ETd3.d.ts} +1 -3
  107. package/dist/loading-label-runtime.cjs +1 -1
  108. package/dist/loading-label-runtime.d.cts +1 -1
  109. package/dist/loading-label-runtime.d.ts +1 -1
  110. package/dist/loading-label-runtime.js +1 -1
  111. package/dist/markdown-parsers.js +1 -1
  112. package/dist/{message-bubble-CkZGlCLC.d.ts → message-bubble-C6AVaH7f.d.cts} +21 -4
  113. package/dist/{message-bubble-CkZGlCLC.d.cts → message-bubble-C6AVaH7f.d.ts} +21 -4
  114. package/dist/{plugin-kit-C1mRjLgW.d.cts → plugin-kit-BVggqE3C.d.cts} +0 -2
  115. package/dist/{plugin-kit-C1mRjLgW.d.ts → plugin-kit-BVggqE3C.d.ts} +0 -2
  116. package/dist/plugin-kit.d.cts +1 -1
  117. package/dist/plugin-kit.d.ts +1 -1
  118. package/dist/preferences-runtime.cjs +1 -1
  119. package/dist/preferences-runtime.d.cts +1 -1
  120. package/dist/preferences-runtime.d.ts +1 -1
  121. package/dist/preferences-runtime.js +1 -1
  122. package/dist/{preview-DdUvoLb4.d.cts → preview-BMdRffo4.d.cts} +2 -6
  123. package/dist/{preview-DdUvoLb4.d.ts → preview-BMdRffo4.d.ts} +2 -6
  124. package/dist/{registry-Dz4iHNST.d.ts → registry-B16l8s1b.d.cts} +1 -8
  125. package/dist/{registry-Dz4iHNST.d.cts → registry-B16l8s1b.d.ts} +1 -8
  126. package/dist/{session-Baxp9iRK.d.cts → session-CtZHe7fc.d.cts} +10 -93
  127. package/dist/{session-Baxp9iRK.d.ts → session-CtZHe7fc.d.ts} +10 -93
  128. package/dist/session-reconnect.d.cts +2 -4
  129. package/dist/session-reconnect.d.ts +2 -4
  130. package/dist/smart-dom-reader.d.cts +2 -8
  131. package/dist/smart-dom-reader.d.ts +2 -8
  132. package/dist/testing.d.cts +0 -2
  133. package/dist/testing.d.ts +0 -2
  134. package/dist/theme-editor-preview.cjs +42 -42
  135. package/dist/theme-editor-preview.d.cts +1 -1
  136. package/dist/theme-editor-preview.d.ts +1 -1
  137. package/dist/theme-editor-preview.js +25 -25
  138. package/dist/theme-editor.cjs +25 -5
  139. package/dist/theme-editor.d.cts +2 -22
  140. package/dist/theme-editor.d.ts +2 -22
  141. package/dist/theme-editor.js +1 -1
  142. package/dist/theme-reference.cjs +1 -1
  143. package/dist/theme-reference.d.cts +4 -4
  144. package/dist/theme-reference.d.ts +4 -4
  145. package/dist/theme-reference.js +1 -1
  146. package/dist/{tool-loading-animation-un3kA5Ur.d.ts → tool-loading-animation-D2cyFvmM.d.cts} +1 -7
  147. package/dist/{tool-loading-animation-un3kA5Ur.d.cts → tool-loading-animation-D2cyFvmM.d.ts} +1 -7
  148. package/dist/{tooltip-BkW-8MnD.d.cts → tooltip-DbXkAuJL.d.cts} +0 -2
  149. package/dist/{tooltip-BkW-8MnD.d.ts → tooltip-DbXkAuJL.d.ts} +0 -2
  150. package/dist/{turn-activity-ui-BGNhtMcH.d.cts → turn-activity-ui-Do1Nd-Ow.d.cts} +2 -12
  151. package/dist/{turn-activity-ui-BGNhtMcH.d.ts → turn-activity-ui-Do1Nd-Ow.d.ts} +2 -12
  152. package/dist/turn-activity-ui.d.cts +1 -1
  153. package/dist/turn-activity-ui.d.ts +1 -1
  154. package/dist/{types-BOZHQIk0.d.cts → types-BC7MRxO5.d.cts} +167 -36
  155. package/dist/{types-BOZHQIk0.d.ts → types-BC7MRxO5.d.ts} +167 -36
  156. package/dist/ui-extras.js +3 -3
  157. package/dist/voice-client-tools.d.cts +1 -3
  158. package/dist/voice-client-tools.d.ts +1 -3
  159. package/dist/voice-runtime.cjs +1 -1
  160. package/dist/voice-runtime.d.cts +2 -12
  161. package/dist/voice-runtime.d.ts +2 -12
  162. package/dist/voice-runtime.js +2 -2
  163. package/dist/voice-worklet-player.d.cts +2 -6
  164. package/dist/voice-worklet-player.d.ts +2 -6
  165. package/dist/{webmcp-runtime-entry-DuAG1_yF.d.ts → webmcp-runtime-entry-B8g46vS0.d.cts} +1 -5
  166. package/dist/{webmcp-runtime-entry-DuAG1_yF.d.cts → webmcp-runtime-entry-B8g46vS0.d.ts} +1 -5
  167. package/dist/webmcp-runtime.d.cts +1 -1
  168. package/dist/webmcp-runtime.d.ts +1 -1
  169. package/dist/widget.css +1 -1
  170. package/package.json +4 -4
  171. package/src/client-dispatch.ts +69 -16
  172. package/src/client.operator-role.test.ts +217 -0
  173. package/src/components/event-stream-view.test.ts +5 -0
  174. package/src/components/message-bubble.test.ts +169 -0
  175. package/src/components/message-bubble.ts +123 -34
  176. package/src/components/scroll-to-bottom.test.ts +135 -0
  177. package/src/components/scroll-to-bottom.ts +50 -13
  178. package/src/components/user-message-collapse.ts +117 -0
  179. package/src/defaults-parity.test.ts +14 -0
  180. package/src/defaults.ts +6 -0
  181. package/src/index-core.ts +7 -0
  182. package/src/session.resubmit-from.test.ts +27 -0
  183. package/src/session.test.ts +10 -0
  184. package/src/session.ts +8 -5
  185. package/src/styles/widget.css +79 -1
  186. package/src/theme-reference.ts +5 -3
  187. package/src/types/theme.ts +50 -0
  188. package/src/types.ts +120 -11
  189. package/src/ui.ask-user-question-plugin.test.ts +154 -0
  190. package/src/ui.operator-role.test.ts +336 -0
  191. package/src/ui.scroll-additive.test.ts +219 -117
  192. package/src/ui.scroll.test.ts +176 -13
  193. package/src/ui.ts +267 -119
  194. package/src/ui.turn-activity.test.ts +7 -7
  195. package/src/ui.user-message-collapse.test.ts +540 -0
  196. package/src/utils/__snapshots__/tokens-parity.test.ts.snap +236 -0
  197. package/src/utils/auto-follow.test.ts +0 -38
  198. package/src/utils/auto-follow.ts +0 -35
  199. package/src/utils/brand.test.ts +14 -0
  200. package/src/utils/brand.ts +8 -4
  201. package/src/utils/history-messages.test.ts +30 -0
  202. package/src/utils/history-messages.ts +26 -8
  203. package/src/utils/message-fingerprint.ts +4 -0
  204. package/src/utils/resubmit-turn.test.ts +13 -0
  205. package/src/utils/resubmit-turn.ts +12 -1
  206. package/src/utils/theme.test.ts +23 -0
  207. package/src/utils/tokens.ts +47 -0
  208. package/src/welcome.test.ts +16 -0
  209. package/src/welcome.ts +10 -2
  210. package/dist/chunk-BNE40cEG.js +0 -1
  211. package/dist/chunk-Bz9jAgba.js +0 -1
  212. package/dist/chunk-CVMIncEY.js +0 -1
  213. package/dist/chunk-CdpVP6LZ.js +0 -1
  214. package/dist/chunk-CjkechxR.js +0 -1
  215. package/dist/chunk-DgZZqy14.js +0 -1
@@ -1 +1 @@
1
- var e=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}};const t=e=>e?.layout?.embedded===!0&&e.launcher?.enabled===!1&&!e.launcher.sidebarMode&&(e.launcher.mountMode??`floating`)===`floating`,n=e=>e?.layout?.showHeader??!t(e);function r(e){if(!e)return a;let t={...a};for(let n of i){let r=e[n];typeof r==`string`&&r.length>0&&(t[n]=r)}return t}var i,a;e((()=>{i=/* @__PURE__ */ `viewTitle.openHistoryLabel.openHistoryBusyLabel.newConversationLabel.expandLabel.collapseLabel.resizeLabel.showEarlierMessagesLabel.openConversationLoadingLabel.openConversationErrorTitle.openConversationRetryLabel.openConversationBackLabel.confirmCancelLabel.deleteConversationConfirmTitle.deleteConversationConfirm.deleteConversationConfirmLabel.clearHistoryConfirmTitle.clearHistoryConfirm.clearHistoryVerifiedConfirm.clearHistoryConfirmLabel.resetIdentityConfirmTitle.resetIdentityConfirm.resetIdentityConfirmLabel.conversationDeletedNotice.identityResetNotice.identityResetUnconfirmedNotice`.split(`.`),a={viewTitle:`Messages`,openHistoryLabel:`Messages`,openHistoryBusyLabel:`Messages, available once the reply finishes`,newConversationLabel:`New conversation`,expandLabel:`Expand conversation list`,collapseLabel:`Collapse conversation list`,resizeLabel:`Resize conversation list`,showEarlierMessagesLabel:`Show earlier messages`,openConversationLoadingLabel:`Loading conversation`,openConversationErrorTitle:`Could not open the conversation.`,openConversationRetryLabel:`Try again`,openConversationBackLabel:`Back to messages`,confirmCancelLabel:`Cancel`,deleteConversationConfirmTitle:`Delete conversation`,deleteConversationConfirm:`Delete this conversation? This cannot be undone.`,deleteConversationConfirmLabel:`Delete`,clearHistoryConfirmTitle:`Delete all conversations`,clearHistoryConfirm:`Delete all conversations for this assistant on this browser? This cannot be undone.`,clearHistoryVerifiedConfirm:`Delete all conversations for this assistant and signed-in user? This cannot be undone.`,clearHistoryConfirmLabel:`Delete all`,resetIdentityConfirmTitle:`Forget this device`,resetIdentityConfirm:`Forget this device? All Persona data stored in this browser is cleared. Records are not deleted elsewhere.`,resetIdentityConfirmLabel:`Forget this device`,conversationDeletedNotice:`That conversation was deleted. You are now in a new conversation.`,identityResetNotice:`This device was forgotten.`,identityResetUnconfirmedNotice:`This device was cleared here, but the server could not confirm it.`}}))();const o=(e,t)=>{console.warn(`[persona] ${e} threw`,t)},s=e=>Object.freeze({...e}),c=e=>Object.freeze({id:e.id,title:e.title,targetId:e.targetId,preview:e.preview,messageCount:e.messageCount,createdAt:e.createdAt,updatedAt:e.updatedAt}),l=e=>e?s(e):null;function u(e){let{plugins:t,config:n}=e,r=!1,i=!1,a=!1,u=!1,d=null,f=[],p=()=>{for(let e of f.splice(0))try{e()}catch(e){o(`renderHistoryView cleanup`,e)}},m=(e,n)=>{for(let r of t){let t=r[e];if(t)try{let e=t(n);if(e)return e}catch(t){o(e,t)}}return null},h=()=>({presentation:e.getPresentation(),config:n}),g={header:t=>u?m(`renderHistoryHeader`,Object.freeze({...h(),returnSurface:e.getReturnSurface(),identityStatus:s(t.identityStatus),pendingAction:l(t.pendingAction),copy:s(t.copy),actions:Object.freeze({close:y.close,startNewConversation:y.startNewConversation}),defaultRenderer:t.defaultRenderer})):null,conversation:e=>u?m(`renderHistoryConversation`,Object.freeze({...h(),conversation:c(e.conversation),active:e.active,pending:e.pending,open:e.open,requestDelete:e.requestDelete,defaultRenderer:e.defaultRenderer})):null,state:e=>u?m(`renderHistoryState`,Object.freeze({...h(),state:s(e.state),identityStatus:s(e.identityStatus),copy:s(e.copy),...e.retry?{retry:e.retry}:{},...e.startNewConversation?{startNewConversation:e.startNewConversation}:{},defaultRenderer:e.defaultRenderer})):null},_=t.flatMap(t=>(t.railSections??[]).map(t=>({...t,placement:t.placement??`above-conversations`,items:[],render:n=>t.render(Object.freeze({collapsed:n,presentation:e.getPresentation(),actions:y}))}))),v=e.createView({slots:g,renderDom:!1,onModelChange:()=>C(),railSections:_}),y=Object.freeze({...v.operations,close:e.close}),b=()=>(u=!0,v.setDomRenderEnabled(!0),v.element),x=t=>Object.freeze({conversations:Object.freeze(t.conversations.map(c)),activeConversationId:t.activeConversationId,state:s(t.state),pendingAction:l(t.pendingAction),identityStatus:s(t.identityStatus),nextCursor:t.nextCursor,presentation:e.getPresentation(),returnSurface:e.getReturnSurface(),config:n,copy:s(v.copy),actions:y,defaultRenderer:b,requestRender:()=>C(),onCleanup:e=>{f.push(e)}}),S=()=>{u=!1;let e=null;for(let n of t)if(n.renderHistoryView){try{e=n.renderHistoryView(x(v.getModel()))}catch(t){o(`renderHistoryView`,t),e=null}if(e)break}let n=!e||e.contains(v.element);return u=n,v.setDomRenderEnabled(n),e??v.element};function C(){if(!(!a||r||i)){i=!0;try{p();let t=S();if(t===d)return;let n=d;d=t,e.onElementChanged(t,n)}finally{i=!1}}}return a=!0,C(),{view:v,get element(){return d??v.element},requestRender:C,dispose:()=>{r=!0,p()}}}var d,f,p,m=e((()=>{d=(e,t)=>{let n=document.createElement(e);return t&&(n.className=t),n},f=(e,t={},...n)=>{let r=document.createElement(e);if(t.className&&(r.className=t.className),t.text!==void 0&&(r.textContent=t.text),t.attrs)for(let[e,n]of Object.entries(t.attrs))r.setAttribute(e,n);if(t.style){let e=r.style,n=t.style;for(let t of Object.keys(n)){let r=n[t];r!=null&&(e[t]=r)}}let i=n.filter(e=>e!=null);return i.length>0&&r.append(...i),r},p=(...e)=>e.filter(Boolean).join(` `)})),h,g=e((()=>{h=100001}));function _(e){return typeof e==`string`?e:e.filter(e=>e.type===`text`).map(e=>e.text).join(``)}function v(e){return typeof e!=`string`&&e.some(e=>e.type===`image`)}function y(e){return{type:`text`,text:e}}function b(e,t){return{type:`image`,image:e,...t?.mimeType&&{mimeType:t.mimeType},...t?.alt&&{alt:t.alt}}}function x(e,t,n){return{type:`file`,data:e,mimeType:t,filename:n}}var S,C,ee=e((()=>{S=[`image/png`,`image/jpeg`,`image/gif`,`image/webp`,`image/svg+xml`,`image/bmp`],C=[`application/pdf`,`text/plain`,`text/markdown`,`text/csv`,`application/msword`,`application/vnd.openxmlformats-officedocument.wordprocessingml.document`,`application/vnd.ms-excel`,`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`,`application/json`],[...S,...C]}));function w(e){if(typeof e!=`string`||e===``)return null;let t=Date.parse(e);return Number.isNaN(t)?null:t}function T(e){return typeof e==`string`?e:void 0}function te(e){if(typeof e!=`object`||!e)return null;let t=e;switch(t.type){case`text`:return typeof t.text==`string`?y(t.text):null;case`image`:return typeof t.image==`string`?b(t.image,{mimeType:T(t.mimeType),alt:T(t.alt)}):null;case`file`:return typeof t.data==`string`&&typeof t.mimeType==`string`&&typeof t.filename==`string`?x(t.data,t.mimeType,t.filename):null;case`audio`:return typeof t.audio==`string`?{type:`audio`,audio:t.audio,...T(t.mimeType)!==void 0&&{mimeType:t.mimeType}}:null;case`video`:return typeof t.video==`string`?{type:`video`,video:t.video,...T(t.mimeType)!==void 0&&{mimeType:t.mimeType}}:null;default:return null}}function ne(e,t){let n=w(t),r=e.map(e=>w(e.timestamp)),i=Array(e.length),a=0;for(;a<r.length;){let e=r[a];if(e!==null){i[a]=e,a+=1;continue}let t=a;for(;t+1<r.length&&r[t+1]===null;)t+=1;let o=t-a+1,s=a>0?i[a-1]:null,c=t+1<r.length?r[t+1]:null,l=c!==null&&n!==null?Math.min(c,n):c??n;for(let e=0;e<o;e+=1)i[a+e]=l===null?s===null?oe+e:s+e+1:l-(o-e);a=t+1}return i.map(e=>new Date(e).toISOString())}function re(e,t){let n=ne(e,t?.beforeCreatedAt),r=[];return e.forEach((e,t)=>{if(typeof e?.id!=`string`||e.id===``||!ae.includes(e.role))return;let i=e.role,a=n[t];if(e.displayAvailable===!1)r.push({id:e.id,role:i,content:``,createdAt:a,agentMetadata:{historyDisplayUnavailable:!0}});else if(typeof e.displayContent==`string`)r.push({id:e.id,role:i,content:e.displayContent,createdAt:a});else if(typeof e.content==`string`)r.push({id:e.id,role:i,content:e.content,createdAt:a});else if(Array.isArray(e.content)){let t=e.content.map(te).filter(e=>e!==null),n=_(t);r.push({id:e.id,role:i,content:n||(v(t)?`[Image]`:``),createdAt:a,...t.length>0&&{contentParts:t}})}else r.push({id:e.id,role:i,content:``,createdAt:a})}),r}function ie(e,t){let n=/* @__PURE__ */ new Map;for(let t of e)n.set(t.id,t);for(let e of t)n.set(e.id,e);return[...n.values()].sort((e,t)=>{let n=new Date(e.createdAt).getTime(),r=new Date(t.createdAt).getTime();if(!Number.isNaN(n)&&!Number.isNaN(r)&&n!==r)return n-r;let i=e.sequence??0,a=t.sequence??0;return i===a?e.id.localeCompare(t.id):i-a})}var ae,oe,se=e((()=>{ee(),ae=[`user`,`assistant`,`system`],oe=0}));m(),g(),se();const ce=/* @__PURE__ */ new Map([[`not_found`,`not_found`],[`conversation_deleted`,`not_found`],[`rate_limited`,`rate_limited`],[`authentication_required`,`authentication_required`],[`invalid_identity_proof`,`authentication_required`],[`visitor_identity_mismatch`,`authentication_required`],[`visitor_required`,`authentication_required`],[`identity_provider_failed`,`identity_provider_failed`],[`proof_not_admitted`,`proof_not_admitted`],[`identity_contract_violation`,`proof_not_admitted`],[`unauthorized`,`authentication_failed`],[`visitor_token_missing`,`authentication_failed`],[`conversation_credential_missing`,`authentication_failed`]]),E=/* @__PURE__ */ new Map([[`not_found`,`That conversation is no longer available.`],[`rate_limited`,`Too many history requests.`],[`authentication_failed`,`History access was not authorized.`],[`authentication_required`,`Sign in again to view account history.`],[`identity_provider_failed`,`The identity provider did not respond.`],[`proof_not_admitted`,`Account history is not available for this configuration.`],[`unsupported_scope`,`This history scope is not supported.`],[`unavailable`,`Conversation history is unavailable right now.`]]),D=e=>E.get(e)??`Conversation history is unavailable right now.`;function O(e,{HistoryClientError:t,HistoryProviderError:n}){if(e instanceof n)return e;if(e instanceof t){let t=ce.get(e.code)??`unavailable`;return new n(t,D(t),{...e.retryAfterSeconds===void 0?{}:{retryAfterSeconds:e.retryAfterSeconds}})}return new n(`unavailable`,D(`unavailable`))}function le(e){let{HistoryProviderError:t}=e.errors,n=()=>e.getClient?.()??e.client,r=e.getIdentityProofConfigured()?[`browser`,`verified-user`]:[`browser`],i={scopes:r},a=e=>{if(!r.includes(e))throw new t(`unsupported_scope`,D(`unsupported_scope`))},o=async(t,n)=>{a(t);try{return await n()}catch(t){throw O(t,e.errors)}},s=t=>{let n=!1;return{conversationId:t.session.conversationId??``,conversationRevision:t.session.conversationRevision??``,async commit(){n||(n=!0,t.commit(),await e.onActivationCommitted(t.session))},discard(){n||(n=!0,t.discard())}}};return{capabilities:i,getIdentityStatus(){return n().getHistoryIdentityStatus()},subscribeIdentityStatus(e){return n().subscribeHistoryIdentityStatus(e)},subscribeAvailability(e){return n().subscribeHistoryAvailability(e)},async list(e){return o(e.context.scope,async()=>{let t=await n().listConversations({...e.cursor?{cursor:e.cursor}:{},...e.limit===void 0?{}:{limit:e.limit},...e.targetId?{targetId:e.targetId}:{},scope:e.context.scope});return{items:t.data,nextCursor:t.nextCursor}})},async getPage(e,t){return o(t.context.scope,async()=>{let r=await n().getConversation(e,{...t.cursor?{messageCursor:t.cursor}:{},scope:t.context.scope}),i=re(r.messages,{...t.beforeCreatedAt?{beforeCreatedAt:t.beforeCreatedAt}:{}});return{summary:r.summary,messages:ie([],i),conversationRevision:r.conversationRevision??``,nextCursor:r.nextMessageCursor}})},async prepareOpen(e,t){return o(t.context.scope,async()=>s(await n().prepareConversationSession(e)))},async prepareStartNew(e){return o(e.context.scope,async()=>s(await n().prepareNewConversationSession()))},async delete(e,t){await o(t.context.scope,()=>n().deleteConversation(e,{scope:t.context.scope}))},async deleteAll(e){return o(e.context.scope,()=>n().deleteAllConversations({...e.targetId===void 0?{}:{targetId:e.targetId},scope:e.context.scope}))},async resetDevice(){try{return await n().resetVisitor(),{remoteRevocationConfirmed:!0}}catch{return{remoteRevocationConfirmed:!1}}}}}const k=e=>{let t=r(e.config.features?.history?.copy),i=null,a=!1,o=null,s=null,c=`conversation`,l=null,m=null,g=null,_=null,v=0,y=null,b=null,x=null,S=`persona-history-${Math.random().toString(36).slice(2,8)}`,C=()=>e.historyFeatureEnabled()&&!!i&&!a,ee=()=>{let t=e.session.getStatus();return e.isStreaming||t===`paused`||t===`resuming`},w=()=>{let t=e.config.features?.history?.scope;if(t)return t;let n=e.config.getIdentityProof?`verified-user`:`browser`,r=i?.capabilities.scopes;return!r||r.includes(n)?n:r[0]??n},T=()=>s?.scope??w(),te=()=>e.session.getClientSession()?.targetId??null,ne=e=>`${e.state}:${`reason`in e?e.reason:``}`,re=t=>{let n=ne(t);n!==_&&(_=n,e.eventBus.emit(`history:identityStatusChanged`,{status:t,timestamp:Date.now()}))},ie=null,ae=null,oe=()=>{if(!e.historyFeatureEnabled())return null;let t=e.getHistoryProviderFactory();if(t)return t();let n=e.config.features?.history?.provider;return n?typeof n==`function`?(ie!==n&&(ie=n,ae=n()),ae):n:e.session.isClientTokenMode()?le({errors:e.historyErrors,client:e.session.getClient(),getIdentityProofConfigured:()=>typeof e.config.getIdentityProof==`function`,onActivationCommitted:t=>e.session.bindActivatedSession(t),getClient:()=>e.session.getClient()}):null},se=()=>{b?.(),b=null,x?.(),x=null,a=!1;let t=i;i=oe(),t&&t!==i&&e.discardConversationContinuity();let n={...e.historyInternals};i?n.historyProvider=i:delete n.historyProvider,e.historyInternals=n,e.session.setHistoryInternals(e.historyInternals),i&&(b=i.subscribeAvailability?.(e=>{a=!e,e||q({restoreFocus:!1}),$()})??null,x=i.subscribeIdentityStatus(e=>re(e)),_=ne(i.getIdentityStatus()))},ce=()=>{let t=e.config.features?.history?.presentation??`panel`;if(t===`panel`||t===`auto`&&e.launcherEnabled&&!e.isDockedMountMode(e.config))return`panel`;let n=e.artifactSplitRoot??e.container;return(n.getBoundingClientRect().width||n.clientWidth)>=720?`rail`:`panel`},E=(e,t)=>{t?(e.setAttribute(`aria-hidden`,`true`),e.setAttribute(`inert`,``)):(e.removeAttribute(`aria-hidden`),e.removeAttribute(`inert`))},D=`data-persona-history-suppressed`,O=null,k=null,A=null,ue=null,de=null,fe=``,pe=()=>e.header===de?fe:n(e.config)?``:`none`,me=()=>e.historyPresentation===`panel`&&!!A&&ue===A.element&&n(e.config)&&pe()!==`none`,he=()=>{for(let t of Array.from(e.header.children))t!==O&&t.setAttribute(D,``)},ge=()=>{for(let t of Array.from(e.container.querySelectorAll(`[${D}]`)))t.removeAttribute(D)},_e=()=>{let t=A;if(!t)return;if(Array.from(e.header.children).some(e=>e!==O&&!e.hasAttribute(D))){k&&k!==e.header&&(k.style.removeProperty(`min-height`),k=null);let t=e.header.offsetHeight;t>0&&(e.header.style.minHeight=`${t}px`,k=e.header)}O||=d(`div`,`persona-history-header-host`),t.setHeaderPlacement(`external`);let n=t.getHeaderElement();n.parentNode!==O&&O.replaceChildren(n),O.parentNode!==e.header&&e.header.appendChild(O),he()},ve=()=>{k&&=(k.style.removeProperty(`min-height`),null),O&&(A?.setHeaderPlacement(`inline`),O.remove(),O=null,ge())},ye=null,be=()=>{ye&&(e.body.style.display=`none`,E(e.body,!0),e.footer.hidden=!0,E(e.footer,!0),e.panelSuggestions.style.display=`none`,E(e.panelSuggestions,!0),e.panelSuggestionsFade.style.display=`none`,me()?(_e(),e.header.style.display=pe(),E(e.header,!1)):(ve(),e.header.style.display=`none`,E(e.header,!0)))};e.reapplyHistoryHostChrome=be;let xe=t=>{let r=e.body.style.display,i=e.footer.hidden,a=e.panelSuggestions.style.display,o=e.panelSuggestionsFade.style.display,s=e.footer,c=e.header,l=e.header.style.display;de=c,fe=l,ye=()=>{ye=null,ve(),de=null,e.body.style.display=r,E(e.body,!1),e.panelSuggestions.style.display=a,E(e.panelSuggestions,!1),e.panelSuggestionsFade.style.display=o,s.hidden=i,E(s,!1),e.footer!==s&&(e.footer.hidden=!1,E(e.footer,!1)),c.style.display=l,E(c,!1),e.header!==c&&(e.header.style.display=n(e.config)?``:`none`,E(e.header,!1))},e.container.insertBefore(t,e.footer.parentNode===e.container?e.footer:e.panelSuggestions),be()},j=null,M=null,Se=null,N=null,Ce=()=>[e.header,e.panelElements.closeButtonWrapper,e.panelElements.clearChatButtonWrapper,e.body,e.footer,e.scrollToBottomButton],we=()=>e.config.features?.history?.rail?.collapsible!==!1,P=()=>e.config.features?.history?.rail?.side===`right`?`right`:`left`,Te=e=>Math.min(400,Math.max(200,Math.round(e))),Ee=()=>e.config.features?.history?.rail?.resizable===!0,F,De=()=>{if(F===void 0&&(F=null,e.config.persistState!==!1))try{let t=Number(window.localStorage.getItem(`${e.currentKeyPrefix()}rail-width`));t&&(F=t)}catch{}return F},I=()=>Te(De()??e.config.features?.history?.rail?.width??260),Oe=t=>{if(F=t,e.config.persistState!==!1)try{window.localStorage.setItem(`${e.currentKeyPrefix()}rail-width`,String(t))}catch{}},ke=()=>we()&&e.config.features?.history?.rail?.collapsedBehavior===`overlay`,L=!1,Ae=e=>{let t=d(`img`);return t.src=e,t.alt=``,t.setAttribute(`aria-hidden`,`true`),t},je=()=>{let t=e.config.features?.history?.rail?.brand;if(!t)return;let n=!1,r;return i=>{if(t.render)try{return t.render({collapsed:i})??null}catch(e){return n||(n=!0,console.warn(`[persona] history rail brand threw`,e)),null}return r===void 0&&(r=t.iconUrl?Ae(t.iconUrl):t.icon?e.renderLucideIcon(t.icon,20):null),r?r.cloneNode(!0):null}},Me=()=>e.config.features?.history?.rail?.sections?.map(t=>{let n=!1,r=e=>{n||(n=!0,console.warn(`[persona] history rail section threw`,t.id,e))};return{id:t.id,title:t.title,placement:t.placement??`above-conversations`,items:t.items.map(t=>{let n;return{id:t.id,label:t.label,badge:t.badge,iconNode:()=>{if(n!==void 0)return n;try{n=t.renderIcon?t.renderIcon()??null:t.iconUrl?Ae(t.iconUrl):t.icon?e.renderLucideIcon(t.icon,20):null}catch(e){r(e),n=null}return n},onSelect:()=>{try{t.onSelect()}catch(e){r(e)}}}})}})??[],Ne=e=>{let t=Me();for(let n of e)t.some(e=>e.id===n.id)?console.warn(`[persona] duplicate history rail section id`,n.id):t.push(n);return t.length?t:void 0},R=null,Pe=()=>`${e.currentKeyPrefix()}rail-collapsed`,Fe=()=>{if(R===null&&(R=e.config.features?.history?.rail?.defaultCollapsed===!0,e.config.persistState!==!1))try{let e=window.localStorage.getItem(Pe());e&&(R=e===`1`)}catch{}return R},Ie=t=>{if(R=t,e.config.persistState!==!1)try{window.localStorage.setItem(Pe(),t?`1`:`0`)}catch{}},z=()=>e.historyPresentation===`rail`&&we()&&!ke()&&Fe(),Le=()=>{},Re=()=>{ke()?Le():(Ie(!Fe()),o?.view.setCollapsed(z()),e.applyRailChrome(),e.repinAnchoredMessage())},ze=()=>{let t=e.config.features?.history?.rail?.collapseShortcut;return!t||!e.parseCombo(t)?null:{combo:t,hint:e.formatCombo(t),aria:e.ariaCombo(t)}},Be=`var(--persona-history-overlay-margin,8px)`,B=null,V=null,Ve=0,H=null,U=null,W=!1,He=0,Ue=()=>window.matchMedia?.(`(pointer: coarse)`).matches===!0,G=()=>C()&&ke()&&(e.historyPresentation??ce())===`rail`,We=()=>e.historyVisible&&!L,Ge=()=>{U!==null&&clearTimeout(U),U=null},Ke=()=>{e.loadHistoryView().catch(()=>{})},qe=()=>{Ge(),L&&(U=setTimeout(()=>{U=null,!W&&L&&(H?.contains(document.activeElement)||q({restoreFocus:!1}))},300))},Je=(e,t)=>{let n=H?.getBoundingClientRect();if(!n)return!1;let r=B?.getBoundingClientRect(),i=r?Math.min(r.top,n.top):n.top;return e>=n.left&&e<=n.right&&t>=i&&t<=n.bottom||!!r&&e>=r.left&&e<=r.right&&t>=r.top&&t<=r.bottom},Ye=e=>{L&&(W=Je(e.clientX,e.clientY),W?Ge():U===null&&qe())},Xe=t=>{!e.historyVisible&&G()&&(L=!0,_t({invoker:B,keyboard:t?.keyboard===!0}).then(()=>{e.historyVisible?!W&&document.activeElement!==B&&q():L=!1}))},Ze=()=>{let e=ue?.querySelector(`[data-persona-history-focus="collapse"]`);e&&(e.setAttribute(`aria-label`,L?t.expandLabel:t.collapseLabel),e.setAttribute(`aria-expanded`,L?`false`:`true`))},Qe=()=>{Ie(!1);let t=o;if(!L||!t){_t({invoker:B});return}let n=document.activeElement===B;L=!1,dt(),t.element.remove(),pt(t.element),Ze(),n&&gt(),e.repinAnchoredMessage(),$()},$e=()=>{Ie(!0),q()};Le=()=>{!e.historyVisible||L?Qe():$e()};let et=()=>{let n=ze(),r=e.createHeaderIconButton({ariaLabel:t.expandLabel,iconName:`panel-left`,wrapperClassName:`persona-relative persona-inline-flex persona-items-center persona-justify-center`,extraClassName:`persona-rail-trigger`,tooltip:!1,attrs:{"data-persona-rail-trigger":``,"aria-controls":S,...n?{"aria-keyshortcuts":n.aria}:{}}}),i=r.button;i.addEventListener(`mouseenter`,()=>{W=!0,Ge(),!(Ue()||Date.now()<He)&&Xe()}),i.addEventListener(`mouseleave`,()=>{W=!1,He=0,qe()}),i.addEventListener(`focus`,()=>{e.historyVisible||Ke()}),i.addEventListener(`click`,t=>{C()&&(t.detail!==0&&Ue()&&!e.historyVisible?Xe():Qe())}),B=i,V=r.wrapper},tt=()=>{if(V&&!V.isConnected&&(V=null,B=null),!G()){V?.remove(),V=null,B=null;return}B||et();let n=V,r=B;if(!n||!r)return;let i=P()===`right`?null:e.header.firstChild;(i??e.header.lastChild)!==n&&e.header.insertBefore(n,i),n.style.display=We()||Ve>0?`none`:``,r.setAttribute(`aria-label`,t.expandLabel),r.setAttribute(`aria-expanded`,e.historyVisible?`true`:`false`),H&&e.applyRailChrome()},nt=e=>{if(!L)return;let t=e.target;t instanceof Node&&(H?.contains(t)||V?.contains(t)||t instanceof Element&&t.closest(`.persona-dropdown-menu,[role="alertdialog"]`)||q({restoreFocus:!1}))};document.addEventListener(`pointerdown`,nt,!0),e.destroyCallbacks.push(()=>{document.removeEventListener(`pointerdown`,nt,!0),document.removeEventListener(`pointermove`,Ye),K?.(),Ge()});let rt=null,K=null,it=t=>{Oe(Te(t)),e.applyRailChrome(),e.repinAnchoredMessage()},at=()=>{let t=d(`div`,`persona-rail-resizer`);return t.tabIndex=0,t.setAttribute(`role`,`separator`),t.setAttribute(`aria-orientation`,`vertical`),t.setAttribute(`aria-valuemin`,`200`),t.setAttribute(`aria-valuemax`,`400`),t.addEventListener(`pointerdown`,n=>{let r=M;if(!r||n.button!==0)return;n.preventDefault(),K?.();let i=n.clientX,a=r.getBoundingClientRect().width||I(),o=P()===`right`?-1:1,s=a,c=e.mount.ownerDocument;r.style.transition=`none`;let l=e=>{s=Te(a+o*(e.clientX-i)),r.style.flex=`0 0 ${s}px`,t.setAttribute(`aria-valuenow`,String(s))},u=()=>{K=null,c.removeEventListener(`pointermove`,l),c.removeEventListener(`pointerup`,u),c.removeEventListener(`pointercancel`,u),r.style.removeProperty(`transition`);try{t.releasePointerCapture(n.pointerId)}catch{}it(s)};K=u,c.addEventListener(`pointermove`,l),c.addEventListener(`pointerup`,u),c.addEventListener(`pointercancel`,u);try{t.setPointerCapture(n.pointerId)}catch{}}),t.addEventListener(`keydown`,e=>{let t=P()===`right`?-16:16,n=I(),r=e.key===`ArrowRight`?n+t:e.key===`ArrowLeft`?n-t:e.key===`Home`?200:e.key===`End`?400:null;r!==null&&(e.preventDefault(),it(r))}),t},ot=(e,n)=>{if(!Ee()||z()){K?.(),rt?.remove();return}let r=rt??at();rt=r,r.setAttribute(`aria-label`,t.resizeLabel),r.setAttribute(`aria-valuenow`,String(I())),r.nextElementSibling!==n&&e.insertBefore(r,n)};e.applyRailChrome=()=>{o?.view.setRailSide(P());let t=P()===`right`,n=H;if(n){let r=B?B.getBoundingClientRect().bottom-e.container.getBoundingClientRect().top:0;n.style.top=`calc(${Math.max(0,Math.round(r))}px + ${Be})`,n.style.width=`${I()}px`,n.style.left=t?``:Be,n.style.right=t?Be:``}let r=M,i=j,a=Se;if(!r||!i||!a)return;r.style.flex=`0 0 ${z()?52:I()}px`;let s=`1px solid var(--persona-divider,#e5e7eb)`;r.style.borderRight=t?``:s,r.style.borderLeft=t?s:``;let c=t?a:r;i.firstElementChild!==c&&i.append(c,t?r:a),ot(i,t?r:a)};let st=t=>{if(N&&M){N.replaceWith(t),N=null,e.applyRailChrome();return}let n=d(`div`,`persona-history-rail-shell`);n.style.cssText=`display:flex;flex-direction:row;flex:1 1 auto;min-height:0`;let r=d(`div`,`persona-history-rail-conversation`);r.style.cssText=`display:flex;flex-direction:column;flex:1 1 auto;min-width:0;min-height:0;position:relative`;let i=d(`div`,`persona-history-rail-host`);i.style.cssText=`display:flex;min-height:0;overflow:hidden`,e.container.insertBefore(n,e.header.parentNode===e.container?e.header:e.body);for(let t of Ce())t?.parentNode===e.container&&r.appendChild(t);n.append(i,r),i.appendChild(t),j=n,M=i,Se=r,e.applyRailChrome()},ct=()=>{if(j)return;let t=d(`div`,`persona-history-rail-placeholder`);t.style.cssText=`flex:1 1 auto;min-height:0`,N=t,st(t),e.repinAnchoredMessage()},lt=()=>{N&&(dt(),e.repinAnchoredMessage())},ut=t=>{let n=d(`div`,`persona-history-rail-overlay`);n.style.cssText=`position:absolute;bottom:${Be};display:flex;overflow:hidden;z-index:${h-1};border-radius:var(--persona-history-overlay-radius,16px);background:var(--persona-history-overlay-bg,var(--persona-container,#f7f7f8));box-shadow:var(--persona-history-overlay-shadow,0 12px 40px rgba(0,0,0,0.25))`,e.container.style.position=`relative`,e.container.appendChild(n),n.appendChild(t),document.addEventListener(`pointermove`,Ye),H=n,e.applyRailChrome(),Ze()},dt=()=>{ye?.(),H&&=(W&&(He=Date.now()+150),document.removeEventListener(`pointermove`,Ye),H.remove(),null);let t=j;if(t){K?.();for(let n of Ce())if(n&&t.contains(n)){let r=n===e.scrollToBottomButton?e.panelSuggestions:t;e.container.insertBefore(n,r)}t.remove(),j=null,M=null,Se=null,N=null}},ft=e=>{ue=e,e.id=S,e.style.flex=`1 1 auto`,e.style.minHeight=`0`},pt=t=>{ft(t),(e.historyPresentation!==`rail`||L)&&lt(),e.historyPresentation===`rail`?L?ut(t):st(t):xe(t)},mt=()=>{if(tt(),Ht(),!e.historyVisible||!o)return;let t=ce();if(t===e.historyPresentation)return;let n=document.activeElement,r=n instanceof HTMLElement&&(o.element.contains(n)||O?.contains(n)===!0)?n:null;dt(),o.element.remove(),o.view.setHeaderPlacement(`inline`),e.historyPresentation=t,o.view.setPresentation(t),o.view.setCollapsed(z()),o.requestRender(),o.element.isConnected||pt(o.element),r?.isConnected?r.focus():gt(),e.syncScrollToBottomButton(),e.repinAnchoredMessage(),$()},ht=(e,t)=>O?.querySelector(t)??e.querySelector(t),gt=()=>{let e=o?.element??ue;if(!e)return;let t=ht(e,`[data-persona-history-focus="close"],[data-persona-history-focus="collapse"]`);if(t){t.focus();return}let n=ht(e,`.persona-history-title`)??e;n.tabIndex=-1,n.focus()},_t=async r=>{if(!C()||e.historyVisible)return;let a=i;if(!a)return;if(!L&&G()&&Fe()){tt();return}vt();let d=++v;c=r?.returnSurface??`conversation`,l=r?.invoker??m;let f=G()&&!L;f&&(Ve+=1,tt(),ct());let p;try{p=await e.loadHistoryView()}catch{e.announceHistory(t.openHistoryLabel),f&&(--Ve,d===v&&(lt(),tt()));return}if(f&&--Ve,d!==v||e.historyVisible)return;s={scope:w()},e.historyPresentation=ce(),e.historyVisible=!0;let h=e.historyPresentation===`panel`&&n(e.config)&&e.header.style.display!==`none`?`external`:`inline`,g=e.config.features?.history?.rowAvatar,_=ze(),y=_?{hint:_.hint,aria:_.aria}:null,b={provider:a,context:s,targetId:te(),presentation:e.historyPresentation,collapsible:we(),collapsed:z(),railSide:P(),renderRailHeader:e.config.features?.history?.rail?.renderHeader,railBrand:je(),onToggleCollapse:Re,...y?{collapseShortcut:y}:{},headerPlacement:h,showScopeStatus:e.config.features?.history?.showScopeStatus!==!1,showDelete:e.config.features?.history?.showDelete!==!1,showDeleteAll:e.config.features?.history?.showDeleteAll!==!1,...e.config.features?.history?.listActions?.length?{listActions:e.config.features.history.listActions}:{},rowAvatar:g===!1?!1:typeof g==`string`?g:e.config.launcher?.iconUrl,activeConversationId:e.session.getActiveConversationId(),...e.config.features?.history?.grouping?{grouping:e.config.features.history.grouping}:{},...e.config.features?.history?.copy?{copy:e.config.features.history.copy}:{},...e.config.features?.history?.pageSize===void 0?{}:{pageSize:e.config.features.history.pageSize},onSelect:e=>At(e,{focusComposer:!0}).catch(()=>{}),onActiveConversationChange:t=>e.setActiveConversationSummary(t),attachTooltip:e.attachTooltip,onStartNew:()=>jt({focusComposer:!0}),onClose:()=>q(),onRequestDeleteConversation:e=>Rt(e),onRequestClearHistory:()=>zt(),...a.resetDevice?{onRequestResetIdentity:()=>Bt()}:{}};o=u({plugins:e.plugins,config:e.config,getPresentation:()=>e.historyPresentation??`panel`,getReturnSurface:()=>c,close:()=>q(),createView:({slots:t,renderDom:n,onModelChange:r,railSections:i})=>(A=p.createHistoryView({...b,railSections:Ne(i),slots:t,renderDom:n,onModelChange:r,onAnnounce:e.announceHistory}),A),onElementChanged:(e,t)=>{if(!t?.isConnected)return pt(e);ft(e),t.replaceWith(e),be()}}),o.view.setNewConversationRequired(e.historySessionState.recovery===`new_conversation_required`),r?.focus!==!1&&(e.historyPresentation!==`rail`||r?.keyboard===!0)&&gt(),e.syncScrollToBottomButton(),e.repinAnchoredMessage(),$(),e.eventBus.emit(`history:opened`,{presentation:e.historyPresentation,returnSurface:c,timestamp:Date.now()})},vt=()=>{},q=t=>{if(!e.historyVisible)return;v+=1;let n=c,r=l,i=o,a=t?.restoreFocus!==!1;e.historyVisible=!1;let u=!1,d=null,f=()=>{if(!u){if(u=!0,vt=()=>{},d!==null&&clearTimeout(d),L=!1,Ge(),dt(),i?.dispose(),i?.view.destroy(),i?.element.remove(),o===i&&(o=null,A=null,ue=null,e.historyPresentation=null,s=null,l=null),e.syncScrollToBottomButton(),e.repinAnchoredMessage(),$(),a){let t=r??m;t?.isConnected?t.focus():e.maybeFocusInput()}e.eventBus.emit(`history:closed`,{returnSurface:n,timestamp:Date.now()})}},p=i&&i.element===i.view.element?i.view.playExit():null;p?(vt=f,d=setTimeout(f,250),p.then(f)):f()},yt=t=>{if(t.key===`Escape`&&e.historyVisible&&o){if(e.historyPresentation===`rail`){let e=t.target;if(!(e instanceof Node)||!(o.element.contains(e)||L&&V?.contains(e)===!0))return}t.preventDefault(),t.stopPropagation(),q()}};e.container.addEventListener(`keydown`,yt),e.destroyCallbacks.push(()=>e.container.removeEventListener(`keydown`,yt));let bt=0,J=null,xt=null,Y=()=>{xt&&clearTimeout(xt),xt=null};e.destroyCallbacks.push(Y);let St=()=>{Y();let t=e.conversationOpenPendingEl;t&&(e.conversationOpenTakeover=!0,t.hidden=!1,e.messagesWrapper.style.display=`none`,e.updateWelcome())},X=()=>{bt+=1,Y(),J?.remove(),J=null,e.conversationOpenPendingEl&&(e.conversationOpenPendingEl.remove(),e.conversationOpenPendingEl=null,e.conversationOpenTakeover=!1,e.messagesWrapper.style.removeProperty(`display`),E(e.footer,!1),e.updateWelcome())},Ct=()=>{try{if(window.matchMedia?.(`(prefers-reduced-motion: reduce)`)?.matches)return;e.messagesWrapper.animate([{opacity:0},{opacity:1}],{duration:150,easing:`ease-out`})}catch{}},wt=t=>{let n=e.config.layout?.messages?.layout??`bubble`,r=f(`div`,{className:`persona-flex`,attrs:{"aria-hidden":`true`}});e.applyMessageRowLayout(r,t);let i=f(`div`,{className:p(e.getBubbleClasses(t,n).join(` `),`persona-conversation-loading-bubble`),attrs:{"data-persona-theme-zone":`${t}-message`},style:{width:t===`user`?`64%`:`100%`,backgroundColor:n===`flat`?`transparent`:`var(--persona-message-${t}-bg, var(--persona-${t===`user`?`accent`:`container`}))`,color:`var(--persona-message-${t}-text, ${t===`user`&&n!==`flat`?`white`:`var(--persona-text)`})`}},...[`94%`,...t===`assistant`?[`86%`]:[],`62%`].map(e=>f(`div`,{className:`persona-conversation-loading-line`,style:{width:e}})));return e.applyBubbleGeometry(i,t,n,{...e.resolveThemeDefaults(e.config.future).components.message[t],...e.config.theme?.components?.message?.[t],...e.config.darkTheme?.components?.message?.[t]}),r.appendChild(i),r},Tt=()=>f(`div`,{className:`persona-conversation-loading-body`,style:{gap:e.messagesWrapper.style.gap}},wt(`user`),wt(`assistant`),wt(`user`),wt(`assistant`)),Et=()=>e.config.loadingIndicator?.conversationOpenVariant===`skeleton`?Tt():f(`div`,{className:`persona-conversation-loading-spinner`,attrs:{"aria-hidden":`true`}},f(`span`,{className:`persona-conversation-loading-ring`})),Dt=t=>{e.conversationOpenPendingEl?.remove(),e.conversationOpenPendingEl=t,t.hidden=!e.conversationOpenTakeover,e.body.insertBefore(t,e.messagesWrapper),Y(),e.conversationOpenTakeover||(xt=setTimeout(St,250)),E(e.footer,!0)},Ot=()=>{let n={config:e.config,streaming:!1,location:`conversation-open`,defaultRenderer:Et},r=null,i=e.plugins.find(e=>e.renderLoadingIndicator);i?.renderLoadingIndicator&&(r=i.renderLoadingIndicator(n)),r===null&&e.config.loadingIndicator?.render&&(r=e.config.loadingIndicator.render(n));let a=r??Et();Dt(f(`div`,{className:p(`persona-conversation-loading`,a.classList.contains(`persona-conversation-loading-spinner`)&&`persona-conversation-loading--centered`),attrs:{role:`status`,"aria-label":t.openConversationLoadingLabel},style:{maxWidth:e.messagesWrapper.style.maxWidth||`none`}},a))},kt=n=>{let r=()=>{At(n,{focusComposer:!0}).catch(()=>{})},i=C()?()=>{X(),_t()}:void 0,a=(e,t)=>{let n=f(`button`,{className:`persona-conversation-loading-error-action`,attrs:{type:`button`},text:e});return n.addEventListener(`click`,t),n},o=()=>f(`div`,{className:`persona-conversation-loading-error-body`},f(`p`,{className:`persona-conversation-loading-error-title`,text:t.openConversationErrorTitle}),f(`div`,{className:`persona-conversation-loading-error-actions`},a(t.openConversationRetryLabel,r),i?a(t.openConversationBackLabel,i):null)),s=Object.freeze({conversationId:n,config:e.config,copy:Object.freeze({title:t.openConversationErrorTitle,retryLabel:t.openConversationRetryLabel,backLabel:t.openConversationBackLabel}),retry:r,...i?{back:i}:{},defaultRenderer:o}),c=null;for(let t of e.plugins)if(t.renderHistoryOpenError){try{c=t.renderHistoryOpenError(s)}catch(e){console.warn(`[persona] renderHistoryOpenError threw`,e),c=null}if(c)break}if(J?.remove(),J=f(`div`,{className:`persona-conversation-loading-error`,attrs:{role:`alert`}},c??o()),!e.session.getActiveConversationId()&&e.session.getMessages().length===0&&!e.composerStore.getState().text&&!e.attachmentManager?.hasAttachments()){let e=J;J=null,Dt(e),St()}else e.body.insertBefore(J,e.messagesWrapper);e.announceHistory(t.openConversationErrorTitle)};e.eventBus.on(`history:closed`,()=>{e.conversationOpenPendingEl&&E(e.footer,!0)});let At=async(t,{focusComposer:n=!1,busy:r=`reject`}={})=>{let i=T();if(r===`background`&&(e.session.assertBackgroundSwitchable(),e.composerStore.getState().phase===`preparing`))throw new e.SessionHistoryError(`conversation_busy`,`Finish preparing this turn before switching conversations`);if(r===`reject`&&(e.session.isStreaming()||[`paused`,`resuming`].includes(e.session.getStatus())||e.composerStore.getState().phase===`preparing`))throw new e.SessionHistoryError(`conversation_busy`,`Finish or stop the current turn before switching conversations`);r===`stop`&&(++e.composerConversationGeneration,e.submissionAbort?.abort(),e.submissionAbort=null,e.composerStore.setPreparing(!1),e.session.cancel());let a=e.conversationStateKey();(!e.conversationOpenPendingEl||e.pendingConversationReading?.key!==a)&&(e.pendingConversationReading={key:a,reading:e.captureConversationReading()});let s=null,c=!!o;o?.view.setActiveConversationId(t),X();let l=bt;Ot(),e.historyVisible&&(e.historyPresentation===`panel`||L)&&q({restoreFocus:!1}),e.suppressScrollSend=!0;try{await e.session.openConversation(t,{scope:i,busy:r,onBeforeCommit:()=>{e.saveConversationContinuity(),s=e.composerConversationGeneration,e.conversationPersistenceOwner=s},onCommitted:()=>{e.restoreConversationContinuity(),e.conversationPersistenceOwner===s&&(e.conversationPersistenceOwner=null),e.usesSessionVoiceForConfig(e.config)&&e.session.setupVoice(),e.persistState()}})}catch(n){if(e.conversationPersistenceOwner===s&&(e.conversationPersistenceOwner=null),s===e.composerConversationGeneration&&e.usesSessionVoiceForConfig(e.config)&&e.session.setupVoice(),l===bt){let n=e.pendingConversationReading?.reading;X(),n&&e.restoreConversationReading(n),e.pendingConversationReading=null,o?.view.setActiveConversationId(e.session.getActiveConversationId()),kt(t),e.suppressScrollSend=!1}throw n}finally{(l===bt||!e.conversationOpenPendingEl)&&(e.suppressScrollSend=!1)}l===bt&&(X(),e.pendingConversationReading=null,e.messageCache.clear(),Ct(),Q(),c||e.setActiveConversationSummary(null),e.eventBus.emit(`history:conversationOpened`,{conversationId:t,title:e.activeConversationTitle,scope:i,timestamp:Date.now()}),n&&e.maybeFocusInput())},jt=async({focusComposer:t=!1}={})=>{X();let n=null;try{await e.session.startNewConversation({scope:T(),onBeforeCommit:()=>{e.saveConversationContinuity(),n=e.composerConversationGeneration,e.conversationPersistenceOwner=n},onCommitted:()=>{e.restoreConversationContinuity(!0),e.conversationPersistenceOwner===n&&(e.conversationPersistenceOwner=null),e.usesSessionVoiceForConfig(e.config)&&e.session.setupVoice(),e.persistState(),e.pendingConversationReading=null}})}catch(t){throw e.conversationPersistenceOwner===n&&(e.conversationPersistenceOwner=null),n===e.composerConversationGeneration&&e.usesSessionVoiceForConfig(e.config)&&e.session.setupVoice(),t}e.setActiveConversationSummary(null),e.messageCache.clear(),e.resetAnchorState(),e.resumeAutoScroll(),e.jumpToBottomInstant(),Q();let r=e.session.getActiveConversationId();o?.view.setActiveConversationId(r),e.eventBus.emit(`history:conversationStarted`,{conversationId:r,timestamp:Date.now()}),e.historyVisible&&(e.historyPresentation===`panel`||L)&&q({restoreFocus:!1}),t&&e.maybeFocusInput()},Mt=async(t,n)=>{let r=await e.session.updateConversation(t,{...n,...n.title===void 0?{}:{title:n.title.trim()}});return o?.view.applyConversationSummary(r),!o&&t===e.session.getActiveConversationId()&&e.setActiveConversationSummary(r),r},Nt=async t=>{let n=T(),r=e.session.getActiveConversationId()===t;await e.session.deleteConversation(t,{scope:n}),e.discardConversationContinuity(t),r&&(e.attachmentManager?.destroy({release:!0}),e.attachmentManager=null,e.restoreConversationContinuity(!0)),o?.view.removeConversationSummary(t),r&&(e.setActiveConversationSummary(null),e.messageCache.clear(),e.resetAnchorState(),e.resumeAutoScroll(),Q()),e.eventBus.emit(`history:conversationDeleted`,{conversationId:t,scope:n,wasActive:r,timestamp:Date.now()})},Pt=async t=>{let n=t?.scope??T(),r=t?.allTargets?null:t?.targetId??te(),i=await e.session.clearConversationHistory({...r?{targetId:r}:{},scope:n});return e.discardConversationContinuity(),e.setActiveConversationSummary(null),e.messageCache.clear(),e.resetAnchorState(),e.resumeAutoScroll(),Q(),e.eventBus.emit(`history:cleared`,{deleted:i.deleted,scope:n,targetId:r,timestamp:Date.now()}),i},Ft=async()=>{if(!i?.resetDevice)throw Error(`[Persona] resetHistoryIdentity() requires a history provider that can reset this device`);let n=!1;try{n=(await e.session.resetHistoryDevice()).remoteRevocationConfirmed}finally{e.discardConversationContinuity(),X(),e.setActiveConversationSummary(null),e.session.clearArtifacts(),e.messageCache.clear(),e.lastAppliedMessages=null,e.config.clearStoredSessionId?.(),e.config.clearStoredConversationId?.(),e.persistentMetadata={},e.actionManager.syncFromMetadata(),e.clearPersistedDraft();let t=e.storageAdapter;t?.clear&&e.runStorageMutation(()=>t.clear(),`[AgentWidget] Failed to clear storage adapter:`),e.resetAnchorState(),e.resumeAutoScroll(),Q(),q({restoreFocus:!1}),e.maybeFocusInput(),e.open||e.launcherSurfaceInstance?.launcher.element.focus()}return e.announceHistory(n?t.identityResetNotice:t.identityResetUnconfirmedNotice),e.eventBus.emit(`history:identityReset`,{remoteRevocationConfirmed:n,timestamp:Date.now()}),{remoteRevocationConfirmed:n}},It=()=>e.artifactSplitRoot?e.panel:e.container,Lt=async t=>{let n=await e.loadHistoryView().catch(()=>null);return typeof n?.showHistoryConfirm==`function`?n.showHistoryConfirm(t):window.confirm(`${t.title}\n\n${t.description}`)},Rt=async e=>await Lt({host:It(),title:t.deleteConversationConfirmTitle,description:t.deleteConversationConfirm,confirmLabel:t.deleteConversationConfirmLabel,cancelLabel:t.confirmCancelLabel})?(await Nt(e),`deleted`):`cancelled`,zt=async()=>{let e=T()===`verified-user`;return await Lt({host:It(),title:t.clearHistoryConfirmTitle,description:e?t.clearHistoryVerifiedConfirm:t.clearHistoryConfirm,confirmLabel:t.clearHistoryConfirmLabel,cancelLabel:t.confirmCancelLabel})?(await Pt(),`cleared`):`cancelled`},Bt=async()=>{if(!await Lt({host:It(),title:t.resetIdentityConfirmTitle,description:t.resetIdentityConfirm,confirmLabel:t.resetIdentityConfirmLabel,cancelLabel:t.confirmCancelLabel}))return{outcome:`cancelled`};let{remoteRevocationConfirmed:e}=await Ft();return{outcome:`reset`,remoteRevocationConfirmed:e}},Z=d(`button`,`persona-history-earlier`);Z.type=`button`,Z.textContent=t.showEarlierMessagesLabel,Z.setAttribute(`data-persona-history-earlier`,``),Object.assign(Z.style,{alignSelf:`center`,minHeight:`44px`,padding:`0 16px`,borderRadius:`999px`,border:`1px solid var(--persona-border, rgba(0,0,0,0.12))`,background:`transparent`,color:`inherit`,font:`inherit`,cursor:`pointer`,flexShrink:`0`});let Q=()=>{C()&&e.historySessionState.nextMessageCursor&&e.session.getActiveConversationId()?(Z.textContent=t.showEarlierMessagesLabel,Z.parentNode!==e.body&&e.body.insertBefore(Z,e.body.firstChild)):Z.remove()};Z.addEventListener(`click`,()=>{let t=e.session.getActiveConversationId(),n=e.historySessionState.nextMessageCursor;if(!t||!n||Z.disabled)return;Z.disabled=!0;let r=e.body.scrollHeight,i=e.body.scrollTop;e.session.loadOlderMessages(t,n,{scope:T()}).then(()=>{e.body.scrollTop=i+(e.body.scrollHeight-r),e.repinAnchoredMessage()}).catch(()=>{}).finally(()=>{Z.disabled=!1,Q()})});let Vt=()=>{let n=e.createHeaderIconButton({ariaLabel:t.openHistoryLabel,iconName:`history`,wrapperClassName:`persona-relative persona-inline-flex persona-items-center persona-justify-center`,extraClassName:`persona-history-toggle`,attrs:{"data-persona-history-toggle":``}});return n.button.addEventListener(`click`,t=>{C()&&!ee()&&(e.historyVisible?q():_t({invoker:n.button,keyboard:t.detail===0}))}),n},Ht=()=>{if(!C()){g?.remove(),m=null,g=null;return}if(g&&!g.isConnected&&(m=null,g=null),!m&&e.header){let t=Vt();m=t.button,g=t.wrapper;let n=e.panelElements.clearChatButtonWrapper||e.panelElements.closeButtonWrapper;n?.parentNode&&e.header.contains(n)?n.parentNode.insertBefore(g,n):e.header.appendChild(g)}if(!m||!g)return;let n=G()||e.historyVisible&&e.historyPresentation===`rail`;if(g.style.display=n?`none`:``,n){document.activeElement===m&&gt();return}let r=ee();m.disabled=r,m.setAttribute(`aria-disabled`,r?`true`:`false`);let i=r?t.openHistoryBusyLabel:t.openHistoryLabel;m.setAttribute(`aria-label`,i),(e.config.features?.history?.presentation??`panel`)===`panel`?(m.removeAttribute(`aria-expanded`),m.removeAttribute(`aria-controls`)):(m.setAttribute(`aria-expanded`,e.historyVisible?`true`:`false`),m.setAttribute(`aria-controls`,S))},Ut=!1,Wt=()=>{let n=e.panelElements.clearChatButton;n&&(C()?(Ut||=(y=n.getAttribute(`aria-label`)??``,!0),n.setAttribute(`aria-label`,t.newConversationLabel),n.removeAttribute(`title`)):Ut&&(Ut=!1,y&&n.setAttribute(`aria-label`,y)))},$=()=>{t=r(e.config.features?.history?.copy),Ht(),tt(),Wt(),Q()};return e.historyChromeSync=$,se(),$(),e.destroyCallbacks.push(()=>{b?.(),x?.(),v+=1,vt(),o?.dispose(),o?.view.destroy(),o=null}),{clearConversationOpenPending:X,cancelConversationOpenTakeover:Y,historyOperationScope:T,discardConversationContinuity:e.discardConversationContinuity,historyAvailable:C,historyScope:w,installHistoryProvider:se,syncHistoryChromeImpl:$,syncHistoryPresentation:mt,syncEarlierMessagesPill:Q,openHistory:_t,closeHistory:q,openHistoryConversation:At,startNewConversation:jt,updateHistoryConversation:Mt,deleteHistoryConversation:Nt,requestDeleteConversation:Rt,clearConversationHistory:Pt,resetHistoryIdentity:Ft,railCollapseShortcut:ze,railCollapsible:we,railTriggerApplies:G,railOverlayMode:ke,toggleRailCollapsed:Re,toggleRailPinned:()=>Le(),get historyProvider(){return i},get historySurface(){return o},get railShell(){return j},get railHost(){return M},get railColumn(){return Se}}};export{k as createHistoryShell};
1
+ var e=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}};const t=e=>e?.layout?.embedded===!0&&e.launcher?.enabled===!1&&!e.launcher.sidebarMode&&(e.launcher.mountMode??`floating`)===`floating`,n=e=>e?.layout?.showHeader??!t(e);function r(e){if(!e)return a;let t={...a};for(let n of i){let r=e[n];typeof r==`string`&&r.length>0&&(t[n]=r)}return t}var i,a;e((()=>{i=/* @__PURE__ */ `viewTitle.openHistoryLabel.openHistoryBusyLabel.newConversationLabel.expandLabel.collapseLabel.resizeLabel.showEarlierMessagesLabel.openConversationLoadingLabel.openConversationErrorTitle.openConversationRetryLabel.openConversationBackLabel.confirmCancelLabel.deleteConversationConfirmTitle.deleteConversationConfirm.deleteConversationConfirmLabel.clearHistoryConfirmTitle.clearHistoryConfirm.clearHistoryVerifiedConfirm.clearHistoryConfirmLabel.resetIdentityConfirmTitle.resetIdentityConfirm.resetIdentityConfirmLabel.conversationDeletedNotice.identityResetNotice.identityResetUnconfirmedNotice`.split(`.`),a={viewTitle:`Messages`,openHistoryLabel:`Messages`,openHistoryBusyLabel:`Messages, available once the reply finishes`,newConversationLabel:`New conversation`,expandLabel:`Expand conversation list`,collapseLabel:`Collapse conversation list`,resizeLabel:`Resize conversation list`,showEarlierMessagesLabel:`Show earlier messages`,openConversationLoadingLabel:`Loading conversation`,openConversationErrorTitle:`Could not open the conversation.`,openConversationRetryLabel:`Try again`,openConversationBackLabel:`Back to messages`,confirmCancelLabel:`Cancel`,deleteConversationConfirmTitle:`Delete conversation`,deleteConversationConfirm:`Delete this conversation? This cannot be undone.`,deleteConversationConfirmLabel:`Delete`,clearHistoryConfirmTitle:`Delete all conversations`,clearHistoryConfirm:`Delete all conversations for this assistant on this browser? This cannot be undone.`,clearHistoryVerifiedConfirm:`Delete all conversations for this assistant and signed-in user? This cannot be undone.`,clearHistoryConfirmLabel:`Delete all`,resetIdentityConfirmTitle:`Forget this device`,resetIdentityConfirm:`Forget this device? All Persona data stored in this browser is cleared. Records are not deleted elsewhere.`,resetIdentityConfirmLabel:`Forget this device`,conversationDeletedNotice:`That conversation was deleted. You are now in a new conversation.`,identityResetNotice:`This device was forgotten.`,identityResetUnconfirmedNotice:`This device was cleared here, but the server could not confirm it.`}}))();const o=(e,t)=>{console.warn(`[persona] ${e} threw`,t)},s=e=>Object.freeze({...e}),c=e=>Object.freeze({id:e.id,title:e.title,targetId:e.targetId,preview:e.preview,messageCount:e.messageCount,createdAt:e.createdAt,updatedAt:e.updatedAt}),l=e=>e?s(e):null;function u(e){let{plugins:t,config:n}=e,r=!1,i=!1,a=!1,u=!1,d=null,f=[],p=()=>{for(let e of f.splice(0))try{e()}catch(e){o(`renderHistoryView cleanup`,e)}},m=(e,n)=>{for(let r of t){let t=r[e];if(t)try{let e=t(n);if(e)return e}catch(t){o(e,t)}}return null},h=()=>({presentation:e.getPresentation(),config:n}),g={header:t=>u?m(`renderHistoryHeader`,Object.freeze({...h(),returnSurface:e.getReturnSurface(),identityStatus:s(t.identityStatus),pendingAction:l(t.pendingAction),copy:s(t.copy),actions:Object.freeze({close:y.close,startNewConversation:y.startNewConversation}),defaultRenderer:t.defaultRenderer})):null,conversation:e=>u?m(`renderHistoryConversation`,Object.freeze({...h(),conversation:c(e.conversation),active:e.active,pending:e.pending,open:e.open,requestDelete:e.requestDelete,defaultRenderer:e.defaultRenderer})):null,state:e=>u?m(`renderHistoryState`,Object.freeze({...h(),state:s(e.state),identityStatus:s(e.identityStatus),copy:s(e.copy),...e.retry?{retry:e.retry}:{},...e.startNewConversation?{startNewConversation:e.startNewConversation}:{},defaultRenderer:e.defaultRenderer})):null},_=t.flatMap(t=>(t.railSections??[]).map(t=>({...t,placement:t.placement??`above-conversations`,items:[],render:n=>t.render(Object.freeze({collapsed:n,presentation:e.getPresentation(),actions:y}))}))),v=e.createView({slots:g,renderDom:!1,onModelChange:()=>C(),railSections:_}),y=Object.freeze({...v.operations,close:e.close}),b=()=>(u=!0,v.setDomRenderEnabled(!0),v.element),x=t=>Object.freeze({conversations:Object.freeze(t.conversations.map(c)),activeConversationId:t.activeConversationId,state:s(t.state),pendingAction:l(t.pendingAction),identityStatus:s(t.identityStatus),nextCursor:t.nextCursor,presentation:e.getPresentation(),returnSurface:e.getReturnSurface(),config:n,copy:s(v.copy),actions:y,defaultRenderer:b,requestRender:()=>C(),onCleanup:e=>{f.push(e)}}),S=()=>{u=!1;let e=null;for(let n of t)if(n.renderHistoryView){try{e=n.renderHistoryView(x(v.getModel()))}catch(t){o(`renderHistoryView`,t),e=null}if(e)break}let n=!e||e.contains(v.element);return u=n,v.setDomRenderEnabled(n),e??v.element};function C(){if(!(!a||r||i)){i=!0;try{p();let t=S();if(t===d)return;let n=d;d=t,e.onElementChanged(t,n)}finally{i=!1}}}return a=!0,C(),{view:v,get element(){return d??v.element},requestRender:C,dispose:()=>{r=!0,p()}}}var d,f,p,m=e((()=>{d=(e,t)=>{let n=document.createElement(e);return t&&(n.className=t),n},f=(e,t={},...n)=>{let r=document.createElement(e);if(t.className&&(r.className=t.className),t.text!==void 0&&(r.textContent=t.text),t.attrs)for(let[e,n]of Object.entries(t.attrs))r.setAttribute(e,n);if(t.style){let e=r.style,n=t.style;for(let t of Object.keys(n)){let r=n[t];r!=null&&(e[t]=r)}}let i=n.filter(e=>e!=null);return i.length>0&&r.append(...i),r},p=(...e)=>e.filter(Boolean).join(` `)})),h,g=e((()=>{h=100001}));function _(e){return typeof e==`string`?e:e.filter(e=>e.type===`text`).map(e=>e.text).join(``)}function v(e){return typeof e!=`string`&&e.some(e=>e.type===`image`)}function y(e){return{type:`text`,text:e}}function b(e,t){return{type:`image`,image:e,...t?.mimeType&&{mimeType:t.mimeType},...t?.alt&&{alt:t.alt}}}function x(e,t,n){return{type:`file`,data:e,mimeType:t,filename:n}}var S,C,ee=e((()=>{S=[`image/png`,`image/jpeg`,`image/gif`,`image/webp`,`image/svg+xml`,`image/bmp`],C=[`application/pdf`,`text/plain`,`text/markdown`,`text/csv`,`application/msword`,`application/vnd.openxmlformats-officedocument.wordprocessingml.document`,`application/vnd.ms-excel`,`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`,`application/json`],[...S,...C]}));function w(e){if(typeof e!=`string`||e===``)return null;let t=Date.parse(e);return Number.isNaN(t)?null:t}function T(e){return typeof e==`string`?e:void 0}function te(e){if(typeof e!=`object`||!e)return null;let t=e;switch(t.type){case`text`:return typeof t.text==`string`?y(t.text):null;case`image`:return typeof t.image==`string`?b(t.image,{mimeType:T(t.mimeType),alt:T(t.alt)}):null;case`file`:return typeof t.data==`string`&&typeof t.mimeType==`string`&&typeof t.filename==`string`?x(t.data,t.mimeType,t.filename):null;case`audio`:return typeof t.audio==`string`?{type:`audio`,audio:t.audio,...T(t.mimeType)!==void 0&&{mimeType:t.mimeType}}:null;case`video`:return typeof t.video==`string`?{type:`video`,video:t.video,...T(t.mimeType)!==void 0&&{mimeType:t.mimeType}}:null;default:return null}}function ne(e,t){let n=w(t),r=e.map(e=>w(e.timestamp)),i=Array(e.length),a=0;for(;a<r.length;){let e=r[a];if(e!==null){i[a]=e,a+=1;continue}let t=a;for(;t+1<r.length&&r[t+1]===null;)t+=1;let o=t-a+1,s=a>0?i[a-1]:null,c=t+1<r.length?r[t+1]:null,l=c!==null&&n!==null?Math.min(c,n):c??n;for(let e=0;e<o;e+=1)i[a+e]=l===null?s===null?oe+e:s+e+1:l-(o-e);a=t+1}return i.map(e=>new Date(e).toISOString())}function re(e,t){let n=ne(e,t?.beforeCreatedAt),r=[];return e.forEach((e,t)=>{if(typeof e?.id!=`string`||e.id===``||!ae.includes(e.role))return;let i=e.role,a=n[t],o=e.author,s=o&&typeof o==`object`?{...typeof o.id==`string`&&{id:o.id},...typeof o.displayName==`string`&&{displayName:o.displayName},...[`human`,`ai`,`system`].includes(o.kind??``)&&{kind:o.kind}}:void 0;if(e.displayAvailable===!1){let t={historyDisplayUnavailable:!0};r.push({id:e.id,role:i,...s&&{author:s},content:``,createdAt:a,agentMetadata:t})}else if(typeof e.displayContent==`string`)r.push({id:e.id,role:i,...s&&{author:s},content:e.displayContent,createdAt:a});else if(typeof e.content==`string`)r.push({id:e.id,role:i,...s&&{author:s},content:e.content,createdAt:a});else if(Array.isArray(e.content)){let t=e.content.map(te).filter(e=>e!==null),n=_(t);r.push({id:e.id,role:i,...s&&{author:s},content:n||(v(t)?`[Image]`:``),createdAt:a,...t.length>0&&{contentParts:t}})}else r.push({id:e.id,role:i,...s&&{author:s},content:``,createdAt:a})}),r}function ie(e,t){let n=/* @__PURE__ */ new Map;for(let t of e)n.set(t.id,t);for(let e of t)n.set(e.id,e);return[...n.values()].sort((e,t)=>{let n=new Date(e.createdAt).getTime(),r=new Date(t.createdAt).getTime();if(!Number.isNaN(n)&&!Number.isNaN(r)&&n!==r)return n-r;let i=e.sequence??0,a=t.sequence??0;return i===a?e.id.localeCompare(t.id):i-a})}var ae,oe,se=e((()=>{ee(),ae=[`user`,`assistant`,`system`,`operator`],oe=0}));m(),g(),se();const ce=/* @__PURE__ */ new Map([[`not_found`,`not_found`],[`conversation_deleted`,`not_found`],[`rate_limited`,`rate_limited`],[`authentication_required`,`authentication_required`],[`invalid_identity_proof`,`authentication_required`],[`visitor_identity_mismatch`,`authentication_required`],[`visitor_required`,`authentication_required`],[`identity_provider_failed`,`identity_provider_failed`],[`proof_not_admitted`,`proof_not_admitted`],[`identity_contract_violation`,`proof_not_admitted`],[`unauthorized`,`authentication_failed`],[`visitor_token_missing`,`authentication_failed`],[`conversation_credential_missing`,`authentication_failed`]]),E=/* @__PURE__ */ new Map([[`not_found`,`That conversation is no longer available.`],[`rate_limited`,`Too many history requests.`],[`authentication_failed`,`History access was not authorized.`],[`authentication_required`,`Sign in again to view account history.`],[`identity_provider_failed`,`The identity provider did not respond.`],[`proof_not_admitted`,`Account history is not available for this configuration.`],[`unsupported_scope`,`This history scope is not supported.`],[`unavailable`,`Conversation history is unavailable right now.`]]),D=e=>E.get(e)??`Conversation history is unavailable right now.`;function O(e,{HistoryClientError:t,HistoryProviderError:n}){if(e instanceof n)return e;if(e instanceof t){let t=ce.get(e.code)??`unavailable`;return new n(t,D(t),{...e.retryAfterSeconds===void 0?{}:{retryAfterSeconds:e.retryAfterSeconds}})}return new n(`unavailable`,D(`unavailable`))}function le(e){let{HistoryProviderError:t}=e.errors,n=()=>e.getClient?.()??e.client,r=e.getIdentityProofConfigured()?[`browser`,`verified-user`]:[`browser`],i={scopes:r},a=e=>{if(!r.includes(e))throw new t(`unsupported_scope`,D(`unsupported_scope`))},o=async(t,n)=>{a(t);try{return await n()}catch(t){throw O(t,e.errors)}},s=t=>{let n=!1;return{conversationId:t.session.conversationId??``,conversationRevision:t.session.conversationRevision??``,async commit(){n||(n=!0,t.commit(),await e.onActivationCommitted(t.session))},discard(){n||(n=!0,t.discard())}}};return{capabilities:i,getIdentityStatus(){return n().getHistoryIdentityStatus()},subscribeIdentityStatus(e){return n().subscribeHistoryIdentityStatus(e)},subscribeAvailability(e){return n().subscribeHistoryAvailability(e)},async list(e){return o(e.context.scope,async()=>{let t=await n().listConversations({...e.cursor?{cursor:e.cursor}:{},...e.limit===void 0?{}:{limit:e.limit},...e.targetId?{targetId:e.targetId}:{},scope:e.context.scope});return{items:t.data,nextCursor:t.nextCursor}})},async getPage(e,t){return o(t.context.scope,async()=>{let r=await n().getConversation(e,{...t.cursor?{messageCursor:t.cursor}:{},scope:t.context.scope}),i=re(r.messages,{...t.beforeCreatedAt?{beforeCreatedAt:t.beforeCreatedAt}:{}});return{summary:r.summary,messages:ie([],i),conversationRevision:r.conversationRevision??``,nextCursor:r.nextMessageCursor}})},async prepareOpen(e,t){return o(t.context.scope,async()=>s(await n().prepareConversationSession(e)))},async prepareStartNew(e){return o(e.context.scope,async()=>s(await n().prepareNewConversationSession()))},async delete(e,t){await o(t.context.scope,()=>n().deleteConversation(e,{scope:t.context.scope}))},async deleteAll(e){return o(e.context.scope,()=>n().deleteAllConversations({...e.targetId===void 0?{}:{targetId:e.targetId},scope:e.context.scope}))},async resetDevice(){try{return await n().resetVisitor(),{remoteRevocationConfirmed:!0}}catch{return{remoteRevocationConfirmed:!1}}}}}const k=e=>{let t=r(e.config.features?.history?.copy),i=null,a=!1,o=null,s=null,c=`conversation`,l=null,m=null,g=null,_=null,v=0,y=null,b=null,x=null,S=`persona-history-${Math.random().toString(36).slice(2,8)}`,C=()=>e.historyFeatureEnabled()&&!!i&&!a,ee=()=>{let t=e.session.getStatus();return e.isStreaming||t===`paused`||t===`resuming`},w=()=>{let t=e.config.features?.history?.scope;if(t)return t;let n=e.config.getIdentityProof?`verified-user`:`browser`,r=i?.capabilities.scopes;return!r||r.includes(n)?n:r[0]??n},T=()=>s?.scope??w(),te=()=>e.session.getClientSession()?.targetId??null,ne=e=>`${e.state}:${`reason`in e?e.reason:``}`,re=t=>{let n=ne(t);n!==_&&(_=n,e.eventBus.emit(`history:identityStatusChanged`,{status:t,timestamp:Date.now()}))},ie=null,ae=null,oe=()=>{if(!e.historyFeatureEnabled())return null;let t=e.getHistoryProviderFactory();if(t)return t();let n=e.config.features?.history?.provider;return n?typeof n==`function`?(ie!==n&&(ie=n,ae=n()),ae):n:e.session.isClientTokenMode()?le({errors:e.historyErrors,client:e.session.getClient(),getIdentityProofConfigured:()=>typeof e.config.getIdentityProof==`function`,onActivationCommitted:t=>e.session.bindActivatedSession(t),getClient:()=>e.session.getClient()}):null},se=()=>{b?.(),b=null,x?.(),x=null,a=!1;let t=i;i=oe(),t&&t!==i&&e.discardConversationContinuity();let n={...e.historyInternals};i?n.historyProvider=i:delete n.historyProvider,e.historyInternals=n,e.session.setHistoryInternals(e.historyInternals),i&&(b=i.subscribeAvailability?.(e=>{a=!e,e||q({restoreFocus:!1}),$()})??null,x=i.subscribeIdentityStatus(e=>re(e)),_=ne(i.getIdentityStatus()))},ce=()=>{let t=e.config.features?.history?.presentation??`panel`;if(t===`panel`||t===`auto`&&e.launcherEnabled&&!e.isDockedMountMode(e.config))return`panel`;let n=e.artifactSplitRoot??e.container;return(n.getBoundingClientRect().width||n.clientWidth)>=720?`rail`:`panel`},E=(e,t)=>{t?(e.setAttribute(`aria-hidden`,`true`),e.setAttribute(`inert`,``)):(e.removeAttribute(`aria-hidden`),e.removeAttribute(`inert`))},D=`data-persona-history-suppressed`,O=null,k=null,A=null,ue=null,de=null,fe=``,pe=()=>e.header===de?fe:n(e.config)?``:`none`,me=()=>e.historyPresentation===`panel`&&!!A&&ue===A.element&&n(e.config)&&pe()!==`none`,he=()=>{for(let t of Array.from(e.header.children))t!==O&&t.setAttribute(D,``)},ge=()=>{for(let t of Array.from(e.container.querySelectorAll(`[${D}]`)))t.removeAttribute(D)},_e=()=>{let t=A;if(!t)return;if(Array.from(e.header.children).some(e=>e!==O&&!e.hasAttribute(D))){k&&k!==e.header&&(k.style.removeProperty(`min-height`),k=null);let t=e.header.offsetHeight;t>0&&(e.header.style.minHeight=`${t}px`,k=e.header)}O||=d(`div`,`persona-history-header-host`),t.setHeaderPlacement(`external`);let n=t.getHeaderElement();n.parentNode!==O&&O.replaceChildren(n),O.parentNode!==e.header&&e.header.appendChild(O),he()},ve=()=>{k&&=(k.style.removeProperty(`min-height`),null),O&&(A?.setHeaderPlacement(`inline`),O.remove(),O=null,ge())},ye=null,be=()=>{ye&&(e.body.style.display=`none`,E(e.body,!0),e.footer.hidden=!0,E(e.footer,!0),e.panelSuggestions.style.display=`none`,E(e.panelSuggestions,!0),e.panelSuggestionsFade.style.display=`none`,me()?(_e(),e.header.style.display=pe(),E(e.header,!1)):(ve(),e.header.style.display=`none`,E(e.header,!0)))};e.reapplyHistoryHostChrome=be;let xe=t=>{let r=e.body.style.display,i=e.footer.hidden,a=e.panelSuggestions.style.display,o=e.panelSuggestionsFade.style.display,s=e.footer,c=e.header,l=e.header.style.display;de=c,fe=l,ye=()=>{ye=null,ve(),de=null,e.body.style.display=r,E(e.body,!1),e.panelSuggestions.style.display=a,E(e.panelSuggestions,!1),e.panelSuggestionsFade.style.display=o,s.hidden=i,E(s,!1),e.footer!==s&&(e.footer.hidden=!1,E(e.footer,!1)),c.style.display=l,E(c,!1),e.header!==c&&(e.header.style.display=n(e.config)?``:`none`,E(e.header,!1))},e.container.insertBefore(t,e.footer.parentNode===e.container?e.footer:e.panelSuggestions),be()},j=null,M=null,Se=null,N=null,Ce=()=>[e.header,e.panelElements.closeButtonWrapper,e.panelElements.clearChatButtonWrapper,e.body,e.footer,e.scrollToBottomButton],we=()=>e.config.features?.history?.rail?.collapsible!==!1,P=()=>e.config.features?.history?.rail?.side===`right`?`right`:`left`,Te=e=>Math.min(400,Math.max(200,Math.round(e))),Ee=()=>e.config.features?.history?.rail?.resizable===!0,F,De=()=>{if(F===void 0&&(F=null,e.config.persistState!==!1))try{let t=Number(window.localStorage.getItem(`${e.currentKeyPrefix()}rail-width`));t&&(F=t)}catch{}return F},I=()=>Te(De()??e.config.features?.history?.rail?.width??260),Oe=t=>{if(F=t,e.config.persistState!==!1)try{window.localStorage.setItem(`${e.currentKeyPrefix()}rail-width`,String(t))}catch{}},ke=()=>we()&&e.config.features?.history?.rail?.collapsedBehavior===`overlay`,L=!1,Ae=e=>{let t=d(`img`);return t.src=e,t.alt=``,t.setAttribute(`aria-hidden`,`true`),t},je=()=>{let t=e.config.features?.history?.rail?.brand;if(!t)return;let n=!1,r;return i=>{if(t.render)try{return t.render({collapsed:i})??null}catch(e){return n||(n=!0,console.warn(`[persona] history rail brand threw`,e)),null}return r===void 0&&(r=t.iconUrl?Ae(t.iconUrl):t.icon?e.renderLucideIcon(t.icon,20):null),r?r.cloneNode(!0):null}},Me=()=>e.config.features?.history?.rail?.sections?.map(t=>{let n=!1,r=e=>{n||(n=!0,console.warn(`[persona] history rail section threw`,t.id,e))};return{id:t.id,title:t.title,placement:t.placement??`above-conversations`,items:t.items.map(t=>{let n;return{id:t.id,label:t.label,badge:t.badge,iconNode:()=>{if(n!==void 0)return n;try{n=t.renderIcon?t.renderIcon()??null:t.iconUrl?Ae(t.iconUrl):t.icon?e.renderLucideIcon(t.icon,20):null}catch(e){r(e),n=null}return n},onSelect:()=>{try{t.onSelect()}catch(e){r(e)}}}})}})??[],Ne=e=>{let t=Me();for(let n of e)t.some(e=>e.id===n.id)?console.warn(`[persona] duplicate history rail section id`,n.id):t.push(n);return t.length?t:void 0},R=null,Pe=()=>`${e.currentKeyPrefix()}rail-collapsed`,Fe=()=>{if(R===null&&(R=e.config.features?.history?.rail?.defaultCollapsed===!0,e.config.persistState!==!1))try{let e=window.localStorage.getItem(Pe());e&&(R=e===`1`)}catch{}return R},Ie=t=>{if(R=t,e.config.persistState!==!1)try{window.localStorage.setItem(Pe(),t?`1`:`0`)}catch{}},z=()=>e.historyPresentation===`rail`&&we()&&!ke()&&Fe(),Le=()=>{},Re=()=>{ke()?Le():(Ie(!Fe()),o?.view.setCollapsed(z()),e.applyRailChrome(),e.repinAnchoredMessage())},ze=()=>{let t=e.config.features?.history?.rail?.collapseShortcut;return!t||!e.parseCombo(t)?null:{combo:t,hint:e.formatCombo(t),aria:e.ariaCombo(t)}},Be=`var(--persona-history-overlay-margin,8px)`,B=null,V=null,Ve=0,H=null,U=null,W=!1,He=0,Ue=()=>window.matchMedia?.(`(pointer: coarse)`).matches===!0,G=()=>C()&&ke()&&(e.historyPresentation??ce())===`rail`,We=()=>e.historyVisible&&!L,Ge=()=>{U!==null&&clearTimeout(U),U=null},Ke=()=>{e.loadHistoryView().catch(()=>{})},qe=()=>{Ge(),L&&(U=setTimeout(()=>{U=null,!W&&L&&(H?.contains(document.activeElement)||q({restoreFocus:!1}))},300))},Je=(e,t)=>{let n=H?.getBoundingClientRect();if(!n)return!1;let r=B?.getBoundingClientRect(),i=r?Math.min(r.top,n.top):n.top;return e>=n.left&&e<=n.right&&t>=i&&t<=n.bottom||!!r&&e>=r.left&&e<=r.right&&t>=r.top&&t<=r.bottom},Ye=e=>{L&&(W=Je(e.clientX,e.clientY),W?Ge():U===null&&qe())},Xe=t=>{!e.historyVisible&&G()&&(L=!0,_t({invoker:B,keyboard:t?.keyboard===!0}).then(()=>{e.historyVisible?!W&&document.activeElement!==B&&q():L=!1}))},Ze=()=>{let e=ue?.querySelector(`[data-persona-history-focus="collapse"]`);e&&(e.setAttribute(`aria-label`,L?t.expandLabel:t.collapseLabel),e.setAttribute(`aria-expanded`,L?`false`:`true`))},Qe=()=>{Ie(!1);let t=o;if(!L||!t){_t({invoker:B});return}let n=document.activeElement===B;L=!1,dt(),t.element.remove(),pt(t.element),Ze(),n&&gt(),e.repinAnchoredMessage(),$()},$e=()=>{Ie(!0),q()};Le=()=>{!e.historyVisible||L?Qe():$e()};let et=()=>{let n=ze(),r=e.createHeaderIconButton({ariaLabel:t.expandLabel,iconName:`panel-left`,wrapperClassName:`persona-relative persona-inline-flex persona-items-center persona-justify-center`,extraClassName:`persona-rail-trigger`,tooltip:!1,attrs:{"data-persona-rail-trigger":``,"aria-controls":S,...n?{"aria-keyshortcuts":n.aria}:{}}}),i=r.button;i.addEventListener(`mouseenter`,()=>{W=!0,Ge(),!(Ue()||Date.now()<He)&&Xe()}),i.addEventListener(`mouseleave`,()=>{W=!1,He=0,qe()}),i.addEventListener(`focus`,()=>{e.historyVisible||Ke()}),i.addEventListener(`click`,t=>{C()&&(t.detail!==0&&Ue()&&!e.historyVisible?Xe():Qe())}),B=i,V=r.wrapper},tt=()=>{if(V&&!V.isConnected&&(V=null,B=null),!G()){V?.remove(),V=null,B=null;return}B||et();let n=V,r=B;if(!n||!r)return;let i=P()===`right`?null:e.header.firstChild;(i??e.header.lastChild)!==n&&e.header.insertBefore(n,i),n.style.display=We()||Ve>0?`none`:``,r.setAttribute(`aria-label`,t.expandLabel),r.setAttribute(`aria-expanded`,e.historyVisible?`true`:`false`),H&&e.applyRailChrome()},nt=e=>{if(!L)return;let t=e.target;t instanceof Node&&(H?.contains(t)||V?.contains(t)||t instanceof Element&&t.closest(`.persona-dropdown-menu,[role="alertdialog"]`)||q({restoreFocus:!1}))};document.addEventListener(`pointerdown`,nt,!0),e.destroyCallbacks.push(()=>{document.removeEventListener(`pointerdown`,nt,!0),document.removeEventListener(`pointermove`,Ye),K?.(),Ge()});let rt=null,K=null,it=t=>{Oe(Te(t)),e.applyRailChrome(),e.repinAnchoredMessage()},at=()=>{let t=d(`div`,`persona-rail-resizer`);return t.tabIndex=0,t.setAttribute(`role`,`separator`),t.setAttribute(`aria-orientation`,`vertical`),t.setAttribute(`aria-valuemin`,`200`),t.setAttribute(`aria-valuemax`,`400`),t.addEventListener(`pointerdown`,n=>{let r=M;if(!r||n.button!==0)return;n.preventDefault(),K?.();let i=n.clientX,a=r.getBoundingClientRect().width||I(),o=P()===`right`?-1:1,s=a,c=e.mount.ownerDocument;r.style.transition=`none`;let l=e=>{s=Te(a+o*(e.clientX-i)),r.style.flex=`0 0 ${s}px`,t.setAttribute(`aria-valuenow`,String(s))},u=()=>{K=null,c.removeEventListener(`pointermove`,l),c.removeEventListener(`pointerup`,u),c.removeEventListener(`pointercancel`,u),r.style.removeProperty(`transition`);try{t.releasePointerCapture(n.pointerId)}catch{}it(s)};K=u,c.addEventListener(`pointermove`,l),c.addEventListener(`pointerup`,u),c.addEventListener(`pointercancel`,u);try{t.setPointerCapture(n.pointerId)}catch{}}),t.addEventListener(`keydown`,e=>{let t=P()===`right`?-16:16,n=I(),r=e.key===`ArrowRight`?n+t:e.key===`ArrowLeft`?n-t:e.key===`Home`?200:e.key===`End`?400:null;r!==null&&(e.preventDefault(),it(r))}),t},ot=(e,n)=>{if(!Ee()||z()){K?.(),rt?.remove();return}let r=rt??at();rt=r,r.setAttribute(`aria-label`,t.resizeLabel),r.setAttribute(`aria-valuenow`,String(I())),r.nextElementSibling!==n&&e.insertBefore(r,n)};e.applyRailChrome=()=>{o?.view.setRailSide(P());let t=P()===`right`,n=H;if(n){let r=B?B.getBoundingClientRect().bottom-e.container.getBoundingClientRect().top:0;n.style.top=`calc(${Math.max(0,Math.round(r))}px + ${Be})`,n.style.width=`${I()}px`,n.style.left=t?``:Be,n.style.right=t?Be:``}let r=M,i=j,a=Se;if(!r||!i||!a)return;r.style.flex=`0 0 ${z()?52:I()}px`;let s=`1px solid var(--persona-divider,#e5e7eb)`;r.style.borderRight=t?``:s,r.style.borderLeft=t?s:``;let c=t?a:r;i.firstElementChild!==c&&i.append(c,t?r:a),ot(i,t?r:a)};let st=t=>{if(N&&M){N.replaceWith(t),N=null,e.applyRailChrome();return}let n=d(`div`,`persona-history-rail-shell`);n.style.cssText=`display:flex;flex-direction:row;flex:1 1 auto;min-height:0`;let r=d(`div`,`persona-history-rail-conversation`);r.style.cssText=`display:flex;flex-direction:column;flex:1 1 auto;min-width:0;min-height:0;position:relative`;let i=d(`div`,`persona-history-rail-host`);i.style.cssText=`display:flex;min-height:0;overflow:hidden`,e.container.insertBefore(n,e.header.parentNode===e.container?e.header:e.body);for(let t of Ce())t?.parentNode===e.container&&r.appendChild(t);n.append(i,r),i.appendChild(t),j=n,M=i,Se=r,e.applyRailChrome()},ct=()=>{if(j)return;let t=d(`div`,`persona-history-rail-placeholder`);t.style.cssText=`flex:1 1 auto;min-height:0`,N=t,st(t),e.repinAnchoredMessage()},lt=()=>{N&&(dt(),e.repinAnchoredMessage())},ut=t=>{let n=d(`div`,`persona-history-rail-overlay`);n.style.cssText=`position:absolute;bottom:${Be};display:flex;overflow:hidden;z-index:${h-1};border-radius:var(--persona-history-overlay-radius,16px);background:var(--persona-history-overlay-bg,var(--persona-container,#f7f7f8));box-shadow:var(--persona-history-overlay-shadow,0 12px 40px rgba(0,0,0,0.25))`,e.container.style.position=`relative`,e.container.appendChild(n),n.appendChild(t),document.addEventListener(`pointermove`,Ye),H=n,e.applyRailChrome(),Ze()},dt=()=>{ye?.(),H&&=(W&&(He=Date.now()+150),document.removeEventListener(`pointermove`,Ye),H.remove(),null);let t=j;if(t){K?.();for(let n of Ce())if(n&&t.contains(n)){let r=n===e.scrollToBottomButton?e.panelSuggestions:t;e.container.insertBefore(n,r)}t.remove(),j=null,M=null,Se=null,N=null}},ft=e=>{ue=e,e.id=S,e.style.flex=`1 1 auto`,e.style.minHeight=`0`},pt=t=>{ft(t),(e.historyPresentation!==`rail`||L)&&lt(),e.historyPresentation===`rail`?L?ut(t):st(t):xe(t)},mt=()=>{if(tt(),Ht(),!e.historyVisible||!o)return;let t=ce();if(t===e.historyPresentation)return;let n=document.activeElement,r=n instanceof HTMLElement&&(o.element.contains(n)||O?.contains(n)===!0)?n:null;dt(),o.element.remove(),o.view.setHeaderPlacement(`inline`),e.historyPresentation=t,o.view.setPresentation(t),o.view.setCollapsed(z()),o.requestRender(),o.element.isConnected||pt(o.element),r?.isConnected?r.focus():gt(),e.syncScrollToBottomButton(),e.repinAnchoredMessage(),$()},ht=(e,t)=>O?.querySelector(t)??e.querySelector(t),gt=()=>{let e=o?.element??ue;if(!e)return;let t=ht(e,`[data-persona-history-focus="close"],[data-persona-history-focus="collapse"]`);if(t){t.focus();return}let n=ht(e,`.persona-history-title`)??e;n.tabIndex=-1,n.focus()},_t=async r=>{if(!C()||e.historyVisible)return;let a=i;if(!a)return;if(!L&&G()&&Fe()){tt();return}vt();let d=++v;c=r?.returnSurface??`conversation`,l=r?.invoker??m;let f=G()&&!L;f&&(Ve+=1,tt(),ct());let p;try{p=await e.loadHistoryView()}catch{e.announceHistory(t.openHistoryLabel),f&&(--Ve,d===v&&(lt(),tt()));return}if(f&&--Ve,d!==v||e.historyVisible)return;s={scope:w()},e.historyPresentation=ce(),e.historyVisible=!0;let h=e.historyPresentation===`panel`&&n(e.config)&&e.header.style.display!==`none`?`external`:`inline`,g=e.config.features?.history?.rowAvatar,_=ze(),y=_?{hint:_.hint,aria:_.aria}:null,b={provider:a,context:s,targetId:te(),presentation:e.historyPresentation,collapsible:we(),collapsed:z(),railSide:P(),renderRailHeader:e.config.features?.history?.rail?.renderHeader,railBrand:je(),onToggleCollapse:Re,...y?{collapseShortcut:y}:{},headerPlacement:h,showScopeStatus:e.config.features?.history?.showScopeStatus!==!1,showDelete:e.config.features?.history?.showDelete!==!1,showDeleteAll:e.config.features?.history?.showDeleteAll!==!1,...e.config.features?.history?.listActions?.length?{listActions:e.config.features.history.listActions}:{},rowAvatar:g===!1?!1:typeof g==`string`?g:e.config.launcher?.iconUrl,activeConversationId:e.session.getActiveConversationId(),...e.config.features?.history?.grouping?{grouping:e.config.features.history.grouping}:{},...e.config.features?.history?.copy?{copy:e.config.features.history.copy}:{},...e.config.features?.history?.pageSize===void 0?{}:{pageSize:e.config.features.history.pageSize},onSelect:e=>At(e,{focusComposer:!0}).catch(()=>{}),onActiveConversationChange:t=>e.setActiveConversationSummary(t),attachTooltip:e.attachTooltip,onStartNew:()=>jt({focusComposer:!0}),onClose:()=>q(),onRequestDeleteConversation:e=>Rt(e),onRequestClearHistory:()=>zt(),...a.resetDevice?{onRequestResetIdentity:()=>Bt()}:{}};o=u({plugins:e.plugins,config:e.config,getPresentation:()=>e.historyPresentation??`panel`,getReturnSurface:()=>c,close:()=>q(),createView:({slots:t,renderDom:n,onModelChange:r,railSections:i})=>(A=p.createHistoryView({...b,railSections:Ne(i),slots:t,renderDom:n,onModelChange:r,onAnnounce:e.announceHistory}),A),onElementChanged:(e,t)=>{if(!t?.isConnected)return pt(e);ft(e),t.replaceWith(e),be()}}),o.view.setNewConversationRequired(e.historySessionState.recovery===`new_conversation_required`),r?.focus!==!1&&(e.historyPresentation!==`rail`||r?.keyboard===!0)&&gt(),e.syncScrollToBottomButton(),e.repinAnchoredMessage(),$(),e.eventBus.emit(`history:opened`,{presentation:e.historyPresentation,returnSurface:c,timestamp:Date.now()})},vt=()=>{},q=t=>{if(!e.historyVisible)return;v+=1;let n=c,r=l,i=o,a=t?.restoreFocus!==!1;e.historyVisible=!1;let u=!1,d=null,f=()=>{if(!u){if(u=!0,vt=()=>{},d!==null&&clearTimeout(d),L=!1,Ge(),dt(),i?.dispose(),i?.view.destroy(),i?.element.remove(),o===i&&(o=null,A=null,ue=null,e.historyPresentation=null,s=null,l=null),e.syncScrollToBottomButton(),e.repinAnchoredMessage(),$(),a){let t=r??m;t?.isConnected?t.focus():e.maybeFocusInput()}e.eventBus.emit(`history:closed`,{returnSurface:n,timestamp:Date.now()})}},p=i&&i.element===i.view.element?i.view.playExit():null;p?(vt=f,d=setTimeout(f,250),p.then(f)):f()},yt=t=>{if(t.key===`Escape`&&e.historyVisible&&o){if(e.historyPresentation===`rail`){let e=t.target;if(!(e instanceof Node)||!(o.element.contains(e)||L&&V?.contains(e)===!0))return}t.preventDefault(),t.stopPropagation(),q()}};e.container.addEventListener(`keydown`,yt),e.destroyCallbacks.push(()=>e.container.removeEventListener(`keydown`,yt));let bt=0,J=null,xt=null,Y=()=>{xt&&clearTimeout(xt),xt=null};e.destroyCallbacks.push(Y);let St=()=>{Y();let t=e.conversationOpenPendingEl;t&&(e.conversationOpenTakeover=!0,t.hidden=!1,e.messagesWrapper.style.display=`none`,e.updateWelcome())},X=()=>{bt+=1,Y(),J?.remove(),J=null,e.conversationOpenPendingEl&&(e.conversationOpenPendingEl.remove(),e.conversationOpenPendingEl=null,e.conversationOpenTakeover=!1,e.messagesWrapper.style.removeProperty(`display`),E(e.footer,!1),e.updateWelcome())},Ct=()=>{try{if(window.matchMedia?.(`(prefers-reduced-motion: reduce)`)?.matches)return;e.messagesWrapper.animate([{opacity:0},{opacity:1}],{duration:150,easing:`ease-out`})}catch{}},wt=t=>{let n=e.config.layout?.messages?.layout??`bubble`,r=f(`div`,{className:`persona-flex`,attrs:{"aria-hidden":`true`}});e.applyMessageRowLayout(r,t);let i=f(`div`,{className:p(e.getBubbleClasses(t,n).join(` `),`persona-conversation-loading-bubble`),attrs:{"data-persona-theme-zone":`${t}-message`},style:{width:t===`user`?`64%`:`100%`,backgroundColor:n===`flat`?`transparent`:`var(--persona-message-${t}-bg, var(--persona-${t===`user`?`accent`:`container`}))`,color:`var(--persona-message-${t}-text, ${t===`user`&&n!==`flat`?`white`:`var(--persona-text)`})`}},...[`94%`,...t===`assistant`?[`86%`]:[],`62%`].map(e=>f(`div`,{className:`persona-conversation-loading-line`,style:{width:e}})));return e.applyBubbleGeometry(i,t,n,{...e.resolveThemeDefaults(e.config.future).components.message[t],...e.config.theme?.components?.message?.[t],...e.config.darkTheme?.components?.message?.[t]}),r.appendChild(i),r},Tt=()=>f(`div`,{className:`persona-conversation-loading-body`,style:{gap:e.messagesWrapper.style.gap}},wt(`user`),wt(`assistant`),wt(`user`),wt(`assistant`)),Et=()=>e.config.loadingIndicator?.conversationOpenVariant===`skeleton`?Tt():f(`div`,{className:`persona-conversation-loading-spinner`,attrs:{"aria-hidden":`true`}},f(`span`,{className:`persona-conversation-loading-ring`})),Dt=t=>{e.conversationOpenPendingEl?.remove(),e.conversationOpenPendingEl=t,t.hidden=!e.conversationOpenTakeover,e.body.insertBefore(t,e.messagesWrapper),Y(),e.conversationOpenTakeover||(xt=setTimeout(St,250)),E(e.footer,!0)},Ot=()=>{let n={config:e.config,streaming:!1,location:`conversation-open`,defaultRenderer:Et},r=null,i=e.plugins.find(e=>e.renderLoadingIndicator);i?.renderLoadingIndicator&&(r=i.renderLoadingIndicator(n)),r===null&&e.config.loadingIndicator?.render&&(r=e.config.loadingIndicator.render(n));let a=r??Et();Dt(f(`div`,{className:p(`persona-conversation-loading`,a.classList.contains(`persona-conversation-loading-spinner`)&&`persona-conversation-loading--centered`),attrs:{role:`status`,"aria-label":t.openConversationLoadingLabel},style:{maxWidth:e.messagesWrapper.style.maxWidth||`none`}},a))},kt=n=>{let r=()=>{At(n,{focusComposer:!0}).catch(()=>{})},i=C()?()=>{X(),_t()}:void 0,a=(e,t)=>{let n=f(`button`,{className:`persona-conversation-loading-error-action`,attrs:{type:`button`},text:e});return n.addEventListener(`click`,t),n},o=()=>f(`div`,{className:`persona-conversation-loading-error-body`},f(`p`,{className:`persona-conversation-loading-error-title`,text:t.openConversationErrorTitle}),f(`div`,{className:`persona-conversation-loading-error-actions`},a(t.openConversationRetryLabel,r),i?a(t.openConversationBackLabel,i):null)),s=Object.freeze({conversationId:n,config:e.config,copy:Object.freeze({title:t.openConversationErrorTitle,retryLabel:t.openConversationRetryLabel,backLabel:t.openConversationBackLabel}),retry:r,...i?{back:i}:{},defaultRenderer:o}),c=null;for(let t of e.plugins)if(t.renderHistoryOpenError){try{c=t.renderHistoryOpenError(s)}catch(e){console.warn(`[persona] renderHistoryOpenError threw`,e),c=null}if(c)break}if(J?.remove(),J=f(`div`,{className:`persona-conversation-loading-error`,attrs:{role:`alert`}},c??o()),!e.session.getActiveConversationId()&&e.session.getMessages().length===0&&!e.composerStore.getState().text&&!e.attachmentManager?.hasAttachments()){let e=J;J=null,Dt(e),St()}else e.body.insertBefore(J,e.messagesWrapper);e.announceHistory(t.openConversationErrorTitle)};e.eventBus.on(`history:closed`,()=>{e.conversationOpenPendingEl&&E(e.footer,!0)});let At=async(t,{focusComposer:n=!1,busy:r=`reject`}={})=>{let i=T();if(r===`background`&&(e.session.assertBackgroundSwitchable(),e.composerStore.getState().phase===`preparing`))throw new e.SessionHistoryError(`conversation_busy`,`Finish preparing this turn before switching conversations`);if(r===`reject`&&(e.session.isStreaming()||[`paused`,`resuming`].includes(e.session.getStatus())||e.composerStore.getState().phase===`preparing`))throw new e.SessionHistoryError(`conversation_busy`,`Finish or stop the current turn before switching conversations`);r===`stop`&&(++e.composerConversationGeneration,e.submissionAbort?.abort(),e.submissionAbort=null,e.composerStore.setPreparing(!1),e.session.cancel());let a=e.conversationStateKey();e.conversationOpenPendingEl&&e.pendingConversationReading?.key===a||(e.pendingConversationReading={key:a,reading:e.captureConversationReading()});let s=null,c=!!o;o?.view.setActiveConversationId(t),X();let l=bt;Ot(),e.historyVisible&&(e.historyPresentation===`panel`||L)&&q({restoreFocus:!1}),e.suppressScrollSend=!0;try{await e.session.openConversation(t,{scope:i,busy:r,onBeforeCommit:()=>{e.saveConversationContinuity(),s=e.composerConversationGeneration,e.conversationPersistenceOwner=s},onCommitted:()=>{e.restoreConversationContinuity(),e.conversationPersistenceOwner===s&&(e.conversationPersistenceOwner=null),e.usesSessionVoiceForConfig(e.config)&&e.session.setupVoice(),e.persistState()}})}catch(n){if(e.conversationPersistenceOwner===s&&(e.conversationPersistenceOwner=null),s===e.composerConversationGeneration&&e.usesSessionVoiceForConfig(e.config)&&e.session.setupVoice(),l===bt){let n=e.pendingConversationReading?.reading;X(),n&&e.restoreConversationReading(n),e.pendingConversationReading=null,o?.view.setActiveConversationId(e.session.getActiveConversationId()),kt(t),e.suppressScrollSend=!1}throw n}finally{l!==bt&&e.conversationOpenPendingEl||(e.suppressScrollSend=!1)}l===bt&&(X(),e.pendingConversationReading=null,e.messageCache.clear(),Ct(),Q(),c||e.setActiveConversationSummary(null),e.eventBus.emit(`history:conversationOpened`,{conversationId:t,title:e.activeConversationTitle,scope:i,timestamp:Date.now()}),n&&e.maybeFocusInput())},jt=async({focusComposer:t=!1}={})=>{X();let n=null;try{await e.session.startNewConversation({scope:T(),onBeforeCommit:()=>{e.saveConversationContinuity(),n=e.composerConversationGeneration,e.conversationPersistenceOwner=n},onCommitted:()=>{e.restoreConversationContinuity(!0),e.conversationPersistenceOwner===n&&(e.conversationPersistenceOwner=null),e.usesSessionVoiceForConfig(e.config)&&e.session.setupVoice(),e.persistState(),e.pendingConversationReading=null}})}catch(t){throw e.conversationPersistenceOwner===n&&(e.conversationPersistenceOwner=null),n===e.composerConversationGeneration&&e.usesSessionVoiceForConfig(e.config)&&e.session.setupVoice(),t}e.setActiveConversationSummary(null),e.messageCache.clear(),e.resetAnchorState(),e.resumeAutoScroll(),e.jumpToBottomInstant(),Q();let r=e.session.getActiveConversationId();o?.view.setActiveConversationId(r),e.eventBus.emit(`history:conversationStarted`,{conversationId:r,timestamp:Date.now()}),e.historyVisible&&(e.historyPresentation===`panel`||L)&&q({restoreFocus:!1}),t&&e.maybeFocusInput()},Mt=async(t,n)=>{let r=await e.session.updateConversation(t,{...n,...n.title===void 0?{}:{title:n.title.trim()}});return o?.view.applyConversationSummary(r),!o&&t===e.session.getActiveConversationId()&&e.setActiveConversationSummary(r),r},Nt=async t=>{let n=T(),r=e.session.getActiveConversationId()===t;await e.session.deleteConversation(t,{scope:n}),e.discardConversationContinuity(t),r&&(e.attachmentManager?.destroy({release:!0}),e.attachmentManager=null,e.restoreConversationContinuity(!0)),o?.view.removeConversationSummary(t),r&&(e.setActiveConversationSummary(null),e.messageCache.clear(),e.resetAnchorState(),e.resumeAutoScroll(),Q()),e.eventBus.emit(`history:conversationDeleted`,{conversationId:t,scope:n,wasActive:r,timestamp:Date.now()})},Pt=async t=>{let n=t?.scope??T(),r=t?.allTargets?null:t?.targetId??te(),i=await e.session.clearConversationHistory({...r?{targetId:r}:{},scope:n});return e.discardConversationContinuity(),e.setActiveConversationSummary(null),e.messageCache.clear(),e.resetAnchorState(),e.resumeAutoScroll(),Q(),e.eventBus.emit(`history:cleared`,{deleted:i.deleted,scope:n,targetId:r,timestamp:Date.now()}),i},Ft=async()=>{if(!i?.resetDevice)throw Error(`[Persona] resetHistoryIdentity() requires a history provider that can reset this device`);let n=!1;try{n=(await e.session.resetHistoryDevice()).remoteRevocationConfirmed}finally{e.discardConversationContinuity(),X(),e.setActiveConversationSummary(null),e.session.clearArtifacts(),e.messageCache.clear(),e.lastAppliedMessages=null,e.config.clearStoredSessionId?.(),e.config.clearStoredConversationId?.(),e.persistentMetadata={},e.actionManager.syncFromMetadata(),e.clearPersistedDraft();let t=e.storageAdapter;t?.clear&&e.runStorageMutation(()=>t.clear(),`[AgentWidget] Failed to clear storage adapter:`),e.resetAnchorState(),e.resumeAutoScroll(),Q(),q({restoreFocus:!1}),e.maybeFocusInput(),e.open||e.launcherSurfaceInstance?.launcher.element.focus()}return e.announceHistory(n?t.identityResetNotice:t.identityResetUnconfirmedNotice),e.eventBus.emit(`history:identityReset`,{remoteRevocationConfirmed:n,timestamp:Date.now()}),{remoteRevocationConfirmed:n}},It=()=>e.artifactSplitRoot?e.panel:e.container,Lt=async t=>{let n=await e.loadHistoryView().catch(()=>null);return typeof n?.showHistoryConfirm==`function`?n.showHistoryConfirm(t):window.confirm(`${t.title}\n\n${t.description}`)},Rt=async e=>await Lt({host:It(),title:t.deleteConversationConfirmTitle,description:t.deleteConversationConfirm,confirmLabel:t.deleteConversationConfirmLabel,cancelLabel:t.confirmCancelLabel})?(await Nt(e),`deleted`):`cancelled`,zt=async()=>{let e=T()===`verified-user`;return await Lt({host:It(),title:t.clearHistoryConfirmTitle,description:e?t.clearHistoryVerifiedConfirm:t.clearHistoryConfirm,confirmLabel:t.clearHistoryConfirmLabel,cancelLabel:t.confirmCancelLabel})?(await Pt(),`cleared`):`cancelled`},Bt=async()=>{if(!await Lt({host:It(),title:t.resetIdentityConfirmTitle,description:t.resetIdentityConfirm,confirmLabel:t.resetIdentityConfirmLabel,cancelLabel:t.confirmCancelLabel}))return{outcome:`cancelled`};let{remoteRevocationConfirmed:e}=await Ft();return{outcome:`reset`,remoteRevocationConfirmed:e}},Z=d(`button`,`persona-history-earlier`);Z.type=`button`,Z.textContent=t.showEarlierMessagesLabel,Z.setAttribute(`data-persona-history-earlier`,``),Object.assign(Z.style,{alignSelf:`center`,minHeight:`44px`,padding:`0 16px`,borderRadius:`999px`,border:`1px solid var(--persona-border, rgba(0,0,0,0.12))`,background:`transparent`,color:`inherit`,font:`inherit`,cursor:`pointer`,flexShrink:`0`});let Q=()=>{C()&&e.historySessionState.nextMessageCursor&&e.session.getActiveConversationId()?(Z.textContent=t.showEarlierMessagesLabel,Z.parentNode!==e.body&&e.body.insertBefore(Z,e.body.firstChild)):Z.remove()};Z.addEventListener(`click`,()=>{let t=e.session.getActiveConversationId(),n=e.historySessionState.nextMessageCursor;if(!t||!n||Z.disabled)return;Z.disabled=!0;let r=e.body.scrollHeight,i=e.body.scrollTop;e.session.loadOlderMessages(t,n,{scope:T()}).then(()=>{e.body.scrollTop=i+(e.body.scrollHeight-r),e.repinAnchoredMessage()}).catch(()=>{}).finally(()=>{Z.disabled=!1,Q()})});let Vt=()=>{let n=e.createHeaderIconButton({ariaLabel:t.openHistoryLabel,iconName:`history`,wrapperClassName:`persona-relative persona-inline-flex persona-items-center persona-justify-center`,extraClassName:`persona-history-toggle`,attrs:{"data-persona-history-toggle":``}});return n.button.addEventListener(`click`,t=>{C()&&!ee()&&(e.historyVisible?q():_t({invoker:n.button,keyboard:t.detail===0}))}),n},Ht=()=>{if(!C()){g?.remove(),m=null,g=null;return}if(g&&!g.isConnected&&(m=null,g=null),!m&&e.header){let t=Vt();m=t.button,g=t.wrapper;let n=e.panelElements.clearChatButtonWrapper||e.panelElements.closeButtonWrapper;n?.parentNode&&e.header.contains(n)?n.parentNode.insertBefore(g,n):e.header.appendChild(g)}if(!m||!g)return;let n=G()||e.historyVisible&&e.historyPresentation===`rail`;if(g.style.display=n?`none`:``,n){document.activeElement===m&&gt();return}let r=ee();m.disabled=r,m.setAttribute(`aria-disabled`,r?`true`:`false`);let i=r?t.openHistoryBusyLabel:t.openHistoryLabel;m.setAttribute(`aria-label`,i),(e.config.features?.history?.presentation??`panel`)===`panel`?(m.removeAttribute(`aria-expanded`),m.removeAttribute(`aria-controls`)):(m.setAttribute(`aria-expanded`,e.historyVisible?`true`:`false`),m.setAttribute(`aria-controls`,S))},Ut=!1,Wt=()=>{let n=e.panelElements.clearChatButton;n&&(C()?(Ut||=(y=n.getAttribute(`aria-label`)??``,!0),n.setAttribute(`aria-label`,t.newConversationLabel),n.removeAttribute(`title`)):Ut&&(Ut=!1,y&&n.setAttribute(`aria-label`,y)))},$=()=>{t=r(e.config.features?.history?.copy),Ht(),tt(),Wt(),Q()};return e.historyChromeSync=$,se(),$(),e.destroyCallbacks.push(()=>{b?.(),x?.(),v+=1,vt(),o?.dispose(),o?.view.destroy(),o=null}),{clearConversationOpenPending:X,cancelConversationOpenTakeover:Y,historyOperationScope:T,discardConversationContinuity:e.discardConversationContinuity,historyAvailable:C,historyScope:w,installHistoryProvider:se,syncHistoryChromeImpl:$,syncHistoryPresentation:mt,syncEarlierMessagesPill:Q,openHistory:_t,closeHistory:q,openHistoryConversation:At,startNewConversation:jt,updateHistoryConversation:Mt,deleteHistoryConversation:Nt,requestDeleteConversation:Rt,clearConversationHistory:Pt,resetHistoryIdentity:Ft,railCollapseShortcut:ze,railCollapsible:we,railTriggerApplies:G,railOverlayMode:ke,toggleRailCollapsed:Re,toggleRailPinned:()=>Le(),get historyProvider(){return i},get historySurface(){return o},get railShell(){return j},get railHost(){return M},get railColumn(){return Se}}};export{k as createHistoryShell};
@@ -1,3 +1,3 @@
1
- import { a as HistoryViewPresentation, c as HistoryListState, d as ResolvedHistoryViewCopy, f as resolveHistoryViewCopy, i as HistoryViewPendingAction, l as HISTORY_VIEW_COPY_DEFAULTS, n as HistoryViewHandle, o as createHistoryView, r as HistoryViewOptions, s as HistoryListErrorReason, t as showHistoryConfirm, u as HistoryViewCopyInput } from "./history-confirm-dialog-DJEXsTyE.cjs";
1
+ import { a as HistoryViewPresentation, c as HistoryListState, d as ResolvedHistoryViewCopy, f as resolveHistoryViewCopy, i as HistoryViewPendingAction, l as HISTORY_VIEW_COPY_DEFAULTS, n as HistoryViewHandle, o as createHistoryView, r as HistoryViewOptions, s as HistoryListErrorReason, t as showHistoryConfirm, u as HistoryViewCopyInput } from "./history-confirm-dialog-i46-lPN_.cjs";
2
2
  export { HISTORY_VIEW_COPY_DEFAULTS, type HistoryListErrorReason, type HistoryListState, type HistoryViewCopyInput, type HistoryViewHandle, type HistoryViewOptions, type HistoryViewPendingAction, type HistoryViewPresentation, type ResolvedHistoryViewCopy, createHistoryView, resolveHistoryViewCopy, showHistoryConfirm };
3
3
  export {}
@@ -1,3 +1,3 @@
1
- import { a as HistoryViewPresentation, c as HistoryListState, d as ResolvedHistoryViewCopy, f as resolveHistoryViewCopy, i as HistoryViewPendingAction, l as HISTORY_VIEW_COPY_DEFAULTS, n as HistoryViewHandle, o as createHistoryView, r as HistoryViewOptions, s as HistoryListErrorReason, t as showHistoryConfirm, u as HistoryViewCopyInput } from "./history-confirm-dialog-DJEXsTyE.js";
1
+ import { a as HistoryViewPresentation, c as HistoryListState, d as ResolvedHistoryViewCopy, f as resolveHistoryViewCopy, i as HistoryViewPendingAction, l as HISTORY_VIEW_COPY_DEFAULTS, n as HistoryViewHandle, o as createHistoryView, r as HistoryViewOptions, s as HistoryListErrorReason, t as showHistoryConfirm, u as HistoryViewCopyInput } from "./history-confirm-dialog-i46-lPN_.js";
2
2
  export { HISTORY_VIEW_COPY_DEFAULTS, type HistoryListErrorReason, type HistoryListState, type HistoryViewCopyInput, type HistoryViewHandle, type HistoryViewOptions, type HistoryViewPendingAction, type HistoryViewPresentation, type ResolvedHistoryViewCopy, createHistoryView, resolveHistoryViewCopy, showHistoryConfirm };
3
3
  export {}
@@ -5,4 +5,4 @@ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`})
5
5
  * This source code is licensed under the ISC license.
6
6
  * See the LICENSE file in the root directory of this source tree.
7
7
  */
8
- ;var e=(/* @__PURE__ */ ((e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports))((e=>{e.Ban=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M4.929 4.929 19.07 19.071`}]],e.Bell=[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`}]],e.Bookmark=[[`path`,{d:`M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z`}]],e.Brain=[[`path`,{d:`M12 18V5`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`}]],e.Building=[[`path`,{d:`M12 10h.01`}],[`path`,{d:`M12 14h.01`}],[`path`,{d:`M12 6h.01`}],[`path`,{d:`M16 10h.01`}],[`path`,{d:`M16 14h.01`}],[`path`,{d:`M16 6h.01`}],[`path`,{d:`M8 10h.01`}],[`path`,{d:`M8 14h.01`}],[`path`,{d:`M8 6h.01`}],[`path`,{d:`M9 22v-3a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3`}],[`rect`,{x:`4`,y:`2`,width:`16`,height:`20`,rx:`2`}]],e.Calendar=[[`path`,{d:`M8 2v4`}],[`path`,{d:`M16 2v4`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`}],[`path`,{d:`M3 10h18`}]],e.CalendarDays=[[`path`,{d:`M8 2v4`}],[`path`,{d:`M16 2v4`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`}],[`path`,{d:`M3 10h18`}],[`path`,{d:`M8 14h.01`}],[`path`,{d:`M12 14h.01`}],[`path`,{d:`M16 14h.01`}],[`path`,{d:`M8 18h.01`}],[`path`,{d:`M12 18h.01`}],[`path`,{d:`M16 18h.01`}]],e.Camera=[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`}],[`circle`,{cx:`12`,cy:`13`,r:`3`}]],e.ChartColumn=[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`}],[`path`,{d:`M18 17V9`}],[`path`,{d:`M13 17V5`}],[`path`,{d:`M8 17v-3`}]],e.Circle=[[`circle`,{cx:`12`,cy:`12`,r:`10`}]],e.CircleCheck=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`m9 12 2 2 4-4`}]],e.CircleX=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`m15 9-6 6`}],[`path`,{d:`m9 9 6 6`}]],e.Clock=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M12 6v6l4 2`}]],e.CreditCard=[[`rect`,{width:`20`,height:`14`,x:`2`,y:`5`,rx:`2`}],[`line`,{x1:`2`,x2:`22`,y1:`10`,y2:`10`}]],e.Database=[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`}]],e.DollarSign=[[`line`,{x1:`12`,x2:`12`,y1:`2`,y2:`22`}],[`path`,{d:`M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6`}]],e.EllipsisVertical=[[`circle`,{cx:`12`,cy:`12`,r:`1`}],[`circle`,{cx:`12`,cy:`5`,r:`1`}],[`circle`,{cx:`12`,cy:`19`,r:`1`}]],e.EyeOff=[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`}],[`path`,{d:`m2 2 20 20`}]],e.Files=[[`path`,{d:`M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8`}],[`path`,{d:`M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706z`}],[`path`,{d:`M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1`}]],e.Film=[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M7 3v18`}],[`path`,{d:`M3 7.5h4`}],[`path`,{d:`M3 12h18`}],[`path`,{d:`M3 16.5h4`}],[`path`,{d:`M17 3v18`}],[`path`,{d:`M17 7.5h4`}],[`path`,{d:`M17 16.5h4`}]],e.Flag=[[`path`,{d:`M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528`}]],e.Folder=[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`}]],e.FolderOpen=[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`}]],e.Funnel=[[`path`,{d:`M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z`}]],e.Gift=[[`path`,{d:`M12 7v14`}],[`path`,{d:`M20 11v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8`}],[`path`,{d:`M7.5 7a1 1 0 0 1 0-5A4.8 8 0 0 1 12 7a4.8 8 0 0 1 4.5-5 1 1 0 0 1 0 5`}],[`rect`,{x:`3`,y:`7`,width:`18`,height:`4`,rx:`1`}]],e.Globe=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`}],[`path`,{d:`M2 12h20`}]],e.Hash=[[`line`,{x1:`4`,x2:`20`,y1:`9`,y2:`9`}],[`line`,{x1:`4`,x2:`20`,y1:`15`,y2:`15`}],[`line`,{x1:`10`,x2:`8`,y1:`3`,y2:`21`}],[`line`,{x1:`16`,x2:`14`,y1:`3`,y2:`21`}]],e.Headphones=[[`path`,{d:`M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3`}]],e.Heart=[[`path`,{d:`M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5`}]],e.House=[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`}]],e.Image=[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`}],[`circle`,{cx:`9`,cy:`9`,r:`2`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`}]],e.Info=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M12 16v-4`}],[`path`,{d:`M12 8h.01`}]],e.Key=[[`path`,{d:`m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4`}],[`path`,{d:`m21 2-9.6 9.6`}],[`circle`,{cx:`7.5`,cy:`15.5`,r:`5.5`}]],e.Lightbulb=[[`path`,{d:`M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5`}],[`path`,{d:`M9 18h6`}],[`path`,{d:`M10 22h4`}]],e.Link=[[`path`,{d:`M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71`}],[`path`,{d:`M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71`}]],e.Lock=[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`}]],e.Mail=[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`}]],e.MapPin=[[`path`,{d:`M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0`}],[`circle`,{cx:`12`,cy:`10`,r:`3`}]],e.MessageCircle=[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`}]],e.Monitor=[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`}]],e.Moon=[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`}]],e.Package=[[`path`,{d:`M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z`}],[`path`,{d:`M12 22V12`}],[`polyline`,{points:`3.29 7 12 12 20.71 7`}],[`path`,{d:`m7.5 4.27 9 5.15`}]],e.Pause=[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`}]],e.PenLine=[[`path`,{d:`M13 21h8`}],[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`}]],e.Percent=[[`line`,{x1:`19`,x2:`5`,y1:`5`,y2:`19`}],[`circle`,{cx:`6.5`,cy:`6.5`,r:`2.5`}],[`circle`,{cx:`17.5`,cy:`17.5`,r:`2.5`}]],e.Phone=[[`path`,{d:`M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384`}]],e.Play=[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`}]],e.Receipt=[[`path`,{d:`M12 17V7`}],[`path`,{d:`M16 8h-6a2 2 0 0 0 0 4h4a2 2 0 0 1 0 4H8`}],[`path`,{d:`M4 3a1 1 0 0 1 1-1 1.3 1.3 0 0 1 .7.2l.933.6a1.3 1.3 0 0 0 1.4 0l.934-.6a1.3 1.3 0 0 1 1.4 0l.933.6a1.3 1.3 0 0 0 1.4 0l.933-.6a1.3 1.3 0 0 1 1.4 0l.934.6a1.3 1.3 0 0 0 1.4 0l.933-.6A1.3 1.3 0 0 1 19 2a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1 1.3 1.3 0 0 1-.7-.2l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.934.6a1.3 1.3 0 0 1-1.4 0l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-1.4 0l-.934-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-.7.2 1 1 0 0 1-1-1z`}]],e.RotateCw=[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`}],[`path`,{d:`M21 3v5h-5`}]],e.Save=[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`}]],e.Settings=[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`}],[`circle`,{cx:`12`,cy:`12`,r:`3`}]],e.Share=[[`path`,{d:`M12 2v13`}],[`path`,{d:`m16 6-4-4-4 4`}],[`path`,{d:`M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8`}]],e.Shield=[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`}]],e.ShoppingBag=[[`path`,{d:`M16 10a4 4 0 0 1-8 0`}],[`path`,{d:`M3.103 6.034h17.794`}],[`path`,{d:`M3.4 5.467a2 2 0 0 0-.4 1.2V20a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6.667a2 2 0 0 0-.4-1.2l-2-2.667A2 2 0 0 0 17 2H7a2 2 0 0 0-1.6.8z`}]],e.ShoppingCart=[[`circle`,{cx:`8`,cy:`21`,r:`1`}],[`circle`,{cx:`19`,cy:`21`,r:`1`}],[`path`,{d:`M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12`}]],e.Smartphone=[[`rect`,{width:`14`,height:`20`,x:`5`,y:`2`,rx:`2`,ry:`2`}],[`path`,{d:`M12 18h.01`}]],e.Sparkles=[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`}],[`path`,{d:`M20 2v4`}],[`path`,{d:`M22 4h-4`}],[`circle`,{cx:`4`,cy:`20`,r:`2`}]],e.Store=[[`path`,{d:`M15 21v-5a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v5`}],[`path`,{d:`M17.774 10.31a1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.451 0 1.12 1.12 0 0 0-1.548 0 2.5 2.5 0 0 1-3.452 0 1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.77-3.248l2.889-4.184A2 2 0 0 1 7 2h10a2 2 0 0 1 1.653.873l2.895 4.192a2.5 2.5 0 0 1-3.774 3.244`}],[`path`,{d:`M4 10.95V19a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8.05`}]],e.Sun=[[`circle`,{cx:`12`,cy:`12`,r:`4`}],[`path`,{d:`M12 2v2`}],[`path`,{d:`M12 20v2`}],[`path`,{d:`m4.93 4.93 1.41 1.41`}],[`path`,{d:`m17.66 17.66 1.41 1.41`}],[`path`,{d:`M2 12h2`}],[`path`,{d:`M20 12h2`}],[`path`,{d:`m6.34 17.66-1.41 1.41`}],[`path`,{d:`m19.07 4.93-1.41 1.41`}]],e.Tag=[[`path`,{d:`M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z`}],[`circle`,{cx:`7.5`,cy:`7.5`,r:`.5`,fill:`currentColor`}]],e.Terminal=[[`path`,{d:`M12 19h8`}],[`path`,{d:`m4 17 6-6-6-6`}]],e.Timer=[[`line`,{x1:`10`,x2:`14`,y1:`2`,y2:`2`}],[`line`,{x1:`12`,x2:`15`,y1:`14`,y2:`11`}],[`circle`,{cx:`12`,cy:`14`,r:`8`}]],e.Toolbox=[[`path`,{d:`M16 12v4`}],[`path`,{d:`M16 6a2 2 0 0 1 1.414.586l4 4A2 2 0 0 1 22 12v7a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 .586-1.414l4-4A2 2 0 0 1 8 6z`}],[`path`,{d:`M16 6V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v2`}],[`path`,{d:`M2 14h20`}],[`path`,{d:`M8 12v4`}]],e.TriangleAlert=[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`}],[`path`,{d:`M12 9v4`}],[`path`,{d:`M12 17h.01`}]],e.Truck=[[`path`,{d:`M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2`}],[`path`,{d:`M15 18H9`}],[`path`,{d:`M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14`}],[`circle`,{cx:`17`,cy:`18`,r:`2`}],[`circle`,{cx:`7`,cy:`18`,r:`2`}]],e.User=[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`}],[`circle`,{cx:`12`,cy:`7`,r:`4`}]],e.VolumeX=[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`}],[`line`,{x1:`22`,x2:`16`,y1:`9`,y2:`15`}],[`line`,{x1:`16`,x2:`22`,y1:`9`,y2:`15`}]],e.Wallet=[[`path`,{d:`M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1`}],[`path`,{d:`M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4`}]],e.Wrench=[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`}]],e.Zap=[[`path`,{d:`M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z`}]]})))();const t={"ellipsis-vertical":e.EllipsisVertical,brain:e.Brain,toolbox:e.Toolbox,wrench:e.Wrench,circle:e.Circle,database:e.Database,terminal:e.Terminal,user:e.User,mail:e.Mail,phone:e.Phone,calendar:e.Calendar,clock:e.Clock,building:e.Building,"map-pin":e.MapPin,lock:e.Lock,key:e.Key,"credit-card":e.CreditCard,hash:e.Hash,globe:e.Globe,link:e.Link,"circle-check":e.CircleCheck,"circle-x":e.CircleX,"triangle-alert":e.TriangleAlert,info:e.Info,ban:e.Ban,shield:e.Shield,house:e.House,"pen-line":e.PenLine,save:e.Save,share:e.Share,funnel:e.Funnel,settings:e.Settings,"rotate-cw":e.RotateCw,"shopping-cart":e.ShoppingCart,"shopping-bag":e.ShoppingBag,package:e.Package,truck:e.Truck,tag:e.Tag,gift:e.Gift,receipt:e.Receipt,wallet:e.Wallet,store:e.Store,"dollar-sign":e.DollarSign,percent:e.Percent,play:e.Play,pause:e.Pause,"volume-x":e.VolumeX,camera:e.Camera,image:e.Image,film:e.Film,headphones:e.Headphones,"message-circle":e.MessageCircle,bell:e.Bell,heart:e.Heart,"eye-off":e.EyeOff,bookmark:e.Bookmark,"calendar-days":e.CalendarDays,timer:e.Timer,folder:e.Folder,"folder-open":e.FolderOpen,files:e.Files,"chart-column":e.ChartColumn,sparkles:e.Sparkles,zap:e.Zap,sun:e.Sun,moon:e.Moon,flag:e.Flag,lightbulb:e.Lightbulb,monitor:e.Monitor,smartphone:e.Smartphone};exports.EXTRA_LUCIDE_ICONS=t;
8
+ ;var e=(/* @__PURE__ */ ((e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports))((e=>{e.Ban=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M4.929 4.929 19.07 19.071`}]],e.Bell=[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`}]],e.Bookmark=[[`path`,{d:`M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z`}]],e.Brain=[[`path`,{d:`M12 18V5`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`}]],e.Building=[[`path`,{d:`M12 10h.01`}],[`path`,{d:`M12 14h.01`}],[`path`,{d:`M12 6h.01`}],[`path`,{d:`M16 10h.01`}],[`path`,{d:`M16 14h.01`}],[`path`,{d:`M16 6h.01`}],[`path`,{d:`M8 10h.01`}],[`path`,{d:`M8 14h.01`}],[`path`,{d:`M8 6h.01`}],[`path`,{d:`M9 22v-3a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3`}],[`rect`,{x:`4`,y:`2`,width:`16`,height:`20`,rx:`2`}]],e.Calendar=[[`path`,{d:`M8 2v4`}],[`path`,{d:`M16 2v4`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`}],[`path`,{d:`M3 10h18`}]],e.CalendarDays=[[`path`,{d:`M8 2v4`}],[`path`,{d:`M16 2v4`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`}],[`path`,{d:`M3 10h18`}],[`path`,{d:`M8 14h.01`}],[`path`,{d:`M12 14h.01`}],[`path`,{d:`M16 14h.01`}],[`path`,{d:`M8 18h.01`}],[`path`,{d:`M12 18h.01`}],[`path`,{d:`M16 18h.01`}]],e.Camera=[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`}],[`circle`,{cx:`12`,cy:`13`,r:`3`}]],e.ChartColumn=[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`}],[`path`,{d:`M18 17V9`}],[`path`,{d:`M13 17V5`}],[`path`,{d:`M8 17v-3`}]],e.Circle=[[`circle`,{cx:`12`,cy:`12`,r:`10`}]],e.CircleCheck=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`m9 12 2 2 4-4`}]],e.CircleX=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`m15 9-6 6`}],[`path`,{d:`m9 9 6 6`}]],e.Clock=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M12 6v6l4 2`}]],e.CreditCard=[[`rect`,{width:`20`,height:`14`,x:`2`,y:`5`,rx:`2`}],[`line`,{x1:`2`,x2:`22`,y1:`10`,y2:`10`}]],e.Database=[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`}]],e.DollarSign=[[`line`,{x1:`12`,x2:`12`,y1:`2`,y2:`22`}],[`path`,{d:`M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6`}]],e.EllipsisVertical=[[`circle`,{cx:`12`,cy:`12`,r:`1`}],[`circle`,{cx:`12`,cy:`5`,r:`1`}],[`circle`,{cx:`12`,cy:`19`,r:`1`}]],e.EyeOff=[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`}],[`path`,{d:`m2 2 20 20`}]],e.Files=[[`path`,{d:`M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8`}],[`path`,{d:`M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706z`}],[`path`,{d:`M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1`}]],e.Film=[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M7 3v18`}],[`path`,{d:`M3 7.5h4`}],[`path`,{d:`M3 12h18`}],[`path`,{d:`M3 16.5h4`}],[`path`,{d:`M17 3v18`}],[`path`,{d:`M17 7.5h4`}],[`path`,{d:`M17 16.5h4`}]],e.Flag=[[`path`,{d:`M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528`}]],e.Folder=[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`}]],e.FolderOpen=[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`}]],e.Funnel=[[`path`,{d:`M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z`}]],e.Gift=[[`path`,{d:`M12 7v14`}],[`path`,{d:`M20 11v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8`}],[`path`,{d:`M7.5 7a1 1 0 0 1 0-5A4.8 8 0 0 1 12 7a4.8 8 0 0 1 4.5-5 1 1 0 0 1 0 5`}],[`rect`,{x:`3`,y:`7`,width:`18`,height:`4`,rx:`1`}]],e.Globe=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`}],[`path`,{d:`M2 12h20`}]],e.Hash=[[`line`,{x1:`4`,x2:`20`,y1:`9`,y2:`9`}],[`line`,{x1:`4`,x2:`20`,y1:`15`,y2:`15`}],[`line`,{x1:`10`,x2:`8`,y1:`3`,y2:`21`}],[`line`,{x1:`16`,x2:`14`,y1:`3`,y2:`21`}]],e.Headphones=[[`path`,{d:`M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3`}]],e.Heart=[[`path`,{d:`M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5`}]],e.House=[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`}]],e.Image=[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`}],[`circle`,{cx:`9`,cy:`9`,r:`2`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`}]],e.Info=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M12 16v-4`}],[`path`,{d:`M12 8h.01`}]],e.Key=[[`path`,{d:`m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4`}],[`path`,{d:`m21 2-9.6 9.6`}],[`circle`,{cx:`7.5`,cy:`15.5`,r:`5.5`}]],e.Lightbulb=[[`path`,{d:`M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5`}],[`path`,{d:`M9 18h6`}],[`path`,{d:`M10 22h4`}]],e.Link=[[`path`,{d:`M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71`}],[`path`,{d:`M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71`}]],e.Lock=[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`}]],e.Mail=[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`}]],e.MapPin=[[`path`,{d:`M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0`}],[`circle`,{cx:`12`,cy:`10`,r:`3`}]],e.MessageCircle=[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`}]],e.Monitor=[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`}]],e.Moon=[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`}]],e.Package=[[`path`,{d:`M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z`}],[`path`,{d:`M12 22V12`}],[`polyline`,{points:`3.29 7 12 12 20.71 7`}],[`path`,{d:`m7.5 4.27 9 5.15`}]],e.Pause=[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`}]],e.PenLine=[[`path`,{d:`M13 21h8`}],[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`}]],e.Percent=[[`line`,{x1:`19`,x2:`5`,y1:`5`,y2:`19`}],[`circle`,{cx:`6.5`,cy:`6.5`,r:`2.5`}],[`circle`,{cx:`17.5`,cy:`17.5`,r:`2.5`}]],e.Phone=[[`path`,{d:`M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384`}]],e.Play=[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`}]],e.Receipt=[[`path`,{d:`M12 17V7`}],[`path`,{d:`M16 8h-6a2 2 0 0 0 0 4h4a2 2 0 0 1 0 4H8`}],[`path`,{d:`M4 3a1 1 0 0 1 1-1 1.3 1.3 0 0 1 .7.2l.933.6a1.3 1.3 0 0 0 1.4 0l.934-.6a1.3 1.3 0 0 1 1.4 0l.933.6a1.3 1.3 0 0 0 1.4 0l.933-.6a1.3 1.3 0 0 1 1.4 0l.934.6a1.3 1.3 0 0 0 1.4 0l.933-.6A1.3 1.3 0 0 1 19 2a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1 1.3 1.3 0 0 1-.7-.2l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.934.6a1.3 1.3 0 0 1-1.4 0l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-1.4 0l-.934-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-.7.2 1 1 0 0 1-1-1z`}]],e.RotateCw=[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`}],[`path`,{d:`M21 3v5h-5`}]],e.Save=[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`}]],e.Settings=[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`}],[`circle`,{cx:`12`,cy:`12`,r:`3`}]],e.Share=[[`path`,{d:`M12 2v13`}],[`path`,{d:`m16 6-4-4-4 4`}],[`path`,{d:`M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8`}]],e.Shield=[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`}]],e.ShoppingBag=[[`path`,{d:`M16 10a4 4 0 0 1-8 0`}],[`path`,{d:`M3.103 6.034h17.794`}],[`path`,{d:`M3.4 5.467a2 2 0 0 0-.4 1.2V20a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6.667a2 2 0 0 0-.4-1.2l-2-2.667A2 2 0 0 0 17 2H7a2 2 0 0 0-1.6.8z`}]],e.ShoppingCart=[[`circle`,{cx:`8`,cy:`21`,r:`1`}],[`circle`,{cx:`19`,cy:`21`,r:`1`}],[`path`,{d:`M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12`}]],e.Smartphone=[[`rect`,{width:`14`,height:`20`,x:`5`,y:`2`,rx:`2`,ry:`2`}],[`path`,{d:`M12 18h.01`}]],e.Sparkles=[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`}],[`path`,{d:`M20 2v4`}],[`path`,{d:`M22 4h-4`}],[`circle`,{cx:`4`,cy:`20`,r:`2`}]],e.Store=[[`path`,{d:`M15 21v-5a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v5`}],[`path`,{d:`M17.774 10.31a1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.451 0 1.12 1.12 0 0 0-1.548 0 2.5 2.5 0 0 1-3.452 0 1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.77-3.248l2.889-4.184A2 2 0 0 1 7 2h10a2 2 0 0 1 1.653.873l2.895 4.192a2.5 2.5 0 0 1-3.774 3.244`}],[`path`,{d:`M4 10.95V19a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8.05`}]],e.Sun=[[`circle`,{cx:`12`,cy:`12`,r:`4`}],[`path`,{d:`M12 2v2`}],[`path`,{d:`M12 20v2`}],[`path`,{d:`m4.93 4.93 1.41 1.41`}],[`path`,{d:`m17.66 17.66 1.41 1.41`}],[`path`,{d:`M2 12h2`}],[`path`,{d:`M20 12h2`}],[`path`,{d:`m6.34 17.66-1.41 1.41`}],[`path`,{d:`m19.07 4.93-1.41 1.41`}]],e.Tag=[[`path`,{d:`M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z`}],[`circle`,{cx:`7.5`,cy:`7.5`,r:`.5`,fill:`currentColor`}]],e.Terminal=[[`path`,{d:`M12 19h8`}],[`path`,{d:`m4 17 6-6-6-6`}]],e.Timer=[[`line`,{x1:`10`,x2:`14`,y1:`2`,y2:`2`}],[`line`,{x1:`12`,x2:`15`,y1:`14`,y2:`11`}],[`circle`,{cx:`12`,cy:`14`,r:`8`}]],e.Toolbox=[[`path`,{d:`M16 12v4`}],[`path`,{d:`M16 6a2 2 0 0 1 1.414.586l4 4A2 2 0 0 1 22 12v7a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 .586-1.414l4-4A2 2 0 0 1 8 6z`}],[`path`,{d:`M16 6V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v2`}],[`path`,{d:`M2 14h20`}],[`path`,{d:`M8 12v4`}]],e.TriangleAlert=[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`}],[`path`,{d:`M12 9v4`}],[`path`,{d:`M12 17h.01`}]],e.Truck=[[`path`,{d:`M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2`}],[`path`,{d:`M15 18H9`}],[`path`,{d:`M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14`}],[`circle`,{cx:`17`,cy:`18`,r:`2`}],[`circle`,{cx:`7`,cy:`18`,r:`2`}]],e.User=[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`}],[`circle`,{cx:`12`,cy:`7`,r:`4`}]],e.VolumeX=[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`}],[`line`,{x1:`22`,x2:`16`,y1:`9`,y2:`15`}],[`line`,{x1:`16`,x2:`22`,y1:`9`,y2:`15`}]],e.Wallet=[[`path`,{d:`M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1`}],[`path`,{d:`M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4`}]],e.Wrench=[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`}]],e.Zap=[[`path`,{d:`M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z`}]]})))();const t={"ellipsis-vertical":e.EllipsisVertical,brain:e.Brain,toolbox:e.Toolbox,wrench:e.Wrench,circle:e.Circle,database:e.Database,terminal:e.Terminal,user:e.User,mail:e.Mail,phone:e.Phone,calendar:e.Calendar,clock:e.Clock,building:e.Building,"map-pin":e.MapPin,lock:e.Lock,key:e.Key,"credit-card":e.CreditCard,hash:e.Hash,globe:e.Globe,link:e.Link,"circle-check":e.CircleCheck,"circle-x":e.CircleX,"triangle-alert":e.TriangleAlert,info:e.Info,ban:e.Ban,shield:e.Shield,house:e.House,"pen-line":e.PenLine,save:e.Save,share:e.Share,funnel:e.Funnel,settings:e.Settings,"rotate-cw":e.RotateCw,"shopping-cart":e.ShoppingCart,"shopping-bag":e.ShoppingBag,package:e.Package,truck:e.Truck,tag:e.Tag,gift:e.Gift,receipt:e.Receipt,wallet:e.Wallet,store:e.Store,"dollar-sign":e.DollarSign,percent:e.Percent,play:e.Play,pause:e.Pause,"volume-x":e.VolumeX,camera:e.Camera,image:e.Image,film:e.Film,headphones:e.Headphones,"message-circle":e.MessageCircle,bell:e.Bell,heart:e.Heart,"eye-off":e.EyeOff,bookmark:e.Bookmark,"calendar-days":e.CalendarDays,timer:e.Timer,folder:e.Folder,"folder-open":e.FolderOpen,files:e.Files,"chart-column":e.ChartColumn,sparkles:e.Sparkles,zap:e.Zap,sun:e.Sun,moon:e.Moon,flag:e.Flag,lightbulb:e.Lightbulb,monitor:e.Monitor,smartphone:e.Smartphone};exports.EXTRA_LUCIDE_ICONS=t;
@@ -1,5 +1,4 @@
1
1
  import { IconNode } from "lucide";
2
- //#region src/icons-extra.d.ts
3
2
  export declare const EXTRA_LUCIDE_ICONS: {
4
3
  readonly "ellipsis-vertical": IconNode;
5
4
  readonly brain: IconNode;
@@ -72,5 +71,4 @@ export declare const EXTRA_LUCIDE_ICONS: {
72
71
  readonly monitor: IconNode;
73
72
  readonly smartphone: IconNode;
74
73
  };
75
- //#endregion
76
74
  export {}
@@ -1,5 +1,4 @@
1
1
  import { IconNode } from "lucide";
2
- //#region src/icons-extra.d.ts
3
2
  export declare const EXTRA_LUCIDE_ICONS: {
4
3
  readonly "ellipsis-vertical": IconNode;
5
4
  readonly brain: IconNode;
@@ -72,5 +71,4 @@ export declare const EXTRA_LUCIDE_ICONS: {
72
71
  readonly monitor: IconNode;
73
72
  readonly smartphone: IconNode;
74
73
  };
75
- //#endregion
76
74
  export {}