@helpai/elements 1.3.11 → 1.3.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/elements-web-component.esm.js +2 -2
- package/elements-web-component.esm.js.map +3 -3
- package/elements.cjs.js +2 -2
- package/elements.cjs.js.map +3 -3
- package/elements.esm.js +2 -2
- package/elements.esm.js.map +3 -3
- package/elements.js +2 -2
- package/elements.js.map +3 -3
- package/index.mjs +2 -2
- package/package.json +1 -1
- package/web-component.mjs +2 -2
package/elements.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Xu=Object.defineProperty;var Yu=(e,t,n)=>t in e?Xu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ce=(e,t,n)=>Yu(e,typeof t!="symbol"?t+"":t,n);var $o,J,ji,ca,Gt,Vi,Qi,Xi,ia,Mo,Qn,Yi,da,sa,la,Ju,Oo={},No=[],Zu=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Xn=Array.isArray;function Ot(e,t){for(var n in t)e[n]=t[n];return e}function ua(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Nt(e,t,n){var o,r,a,s={};for(a in t)a=="key"?o=t[a]:a=="ref"?r=t[a]:s[a]=t[a];if(arguments.length>2&&(s.children=arguments.length>3?$o.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)s[a]===void 0&&(s[a]=e.defaultProps[a]);return Lo(e,s,o,r,null)}function Lo(e,t,n,o,r){var a={type:e,props:t,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:r??++ji,__i:-1,__u:0};return r==null&&J.vnode!=null&&J.vnode(a),a}function fe(e){return e.children}function _t(e,t){this.props=e,this.context=t}function nn(e,t){if(t==null)return e.__?nn(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?nn(e):null}function e_(e){if(e.__P&&e.__d){var t=e.__v,n=t.__e,o=[],r=[],a=Ot({},t);a.__v=t.__v+1,J.vnode&&J.vnode(a),_a(e.__P,a,t,e.__n,e.__P.namespaceURI,32&t.__u?[n]:null,o,n??nn(t),!!(32&t.__u),r),a.__v=t.__v,a.__.__k[a.__i]=a,ns(o,a,r),t.__e=t.__=null,a.__e!=n&&Ji(a)}}function Ji(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),Ji(e)}function Wi(e){(!e.__d&&(e.__d=!0)&&Gt.push(e)&&!Do.__r++||Vi!=J.debounceRendering)&&((Vi=J.debounceRendering)||Qi)(Do)}function Do(){try{for(var e,t=1;Gt.length;)Gt.length>t&&Gt.sort(Xi),e=Gt.shift(),t=Gt.length,e_(e)}finally{Gt.length=Do.__r=0}}function Zi(e,t,n,o,r,a,s,l,c,d,_){var p,u,m,g,P,y,w=o&&o.__k||No,S=t.length;for(c=t_(n,t,w,c,S),p=0;p<S;p++)(m=n.__k[p])!=null&&(u=m.__i!=-1&&w[m.__i]||Oo,m.__i=p,y=_a(e,m,u,r,a,s,l,c,d,_),g=m.__e,m.ref&&u.ref!=m.ref&&(u.ref&&pa(u.ref,null,m),_.push(m.ref,m.__c||g,m)),P==null&&g!=null&&(P=g),4&m.__u?(c=es(m,c,e),u.__e&&(u.__e=null)):typeof m.type=="function"&&y!==void 0?c=y:g&&(c=g.nextSibling),m.__u&=-7);return n.__e=P,c}function t_(e,t,n,o,r){var a,s,l,c,d,_=n.length,p=_,u=0;for(e.__k=new Array(r),a=0;a<r;a++)(s=t[a])!=null&&typeof s!="boolean"&&typeof s!="function"?(typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?s=e.__k[a]=Lo(null,s,null,null,null):Xn(s)?s=e.__k[a]=Lo(fe,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=e.__k[a]=Lo(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):e.__k[a]=s,c=a+u,s.__=e,s.__b=e.__b+1,l=null,(d=s.__i=n_(s,n,c,p))!=-1&&(p--,(l=n[d])&&(l.__u|=2)),l==null||l.__v==null?(d==-1&&(r>_?u--:r<_&&u++),typeof s.type!="function"&&(s.__u|=4)):d!=c&&(d==c-1?u--:d==c+1?u++:(d>c?u--:u++,s.__u|=4))):e.__k[a]=null;if(p)for(a=0;a<_;a++)(l=n[a])!=null&&(2&l.__u)==0&&(l.__e==o&&(o=nn(l)),rs(l,l));return o}function es(e,t,n){var o,r;if(typeof e.type=="function"){for(o=e.__k,r=0;o&&r<o.length;r++)o[r]&&(o[r].__=e,t=es(o[r],t,n));return t}e.__e!=t&&(t&&e.type&&!t.parentNode&&(t=nn(e)),t=n.insertBefore(e.__e,t||null));do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Yn(e,t){return t=t||[],e==null||typeof e=="boolean"||(Xn(e)?e.some(function(n){Yn(n,t)}):t.push(e)),t}function n_(e,t,n,o){var r,a,s,l=e.key,c=e.type,d=t[n],_=d!=null&&(2&d.__u)==0;if(d===null&&l==null||_&&l==d.key&&c==d.type)return n;if(o>(_?1:0)){for(r=n-1,a=n+1;r>=0||a<t.length;)if((d=t[s=r>=0?r--:a++])!=null&&(2&d.__u)==0&&l==d.key&&c==d.type)return s}return-1}function Ki(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||Zu.test(t)?n:n+"px"}function Ao(e,t,n,o,r){var a,s;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof o=="string"&&(e.style.cssText=o=""),o)for(t in o)n&&t in n||Ki(e.style,t,"");if(n)for(t in n)o&&n[t]==o[t]||Ki(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")a=t!=(t=t.replace(Yi,"$1")),s=t.toLowerCase(),t=s in e||t=="onFocusOut"||t=="onFocusIn"?s.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=n,n?o?n[Qn]=o[Qn]:(n[Qn]=da,e.addEventListener(t,a?la:sa,a)):e.removeEventListener(t,a?la:sa,a);else{if(r=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function Gi(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t[Mo]==null)t[Mo]=da++;else if(t[Mo]<n[Qn])return;return n(J.event?J.event(t):t)}}}function _a(e,t,n,o,r,a,s,l,c,d){var _,p,u,m,g,P,y,w,S,h,b,x,k,E,G,H,A=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),a=[l=t.__e=n.__e]),(_=J.__b)&&_(t);e:if(typeof A=="function"){p=s.length;try{if(S=t.props,h=A.prototype&&A.prototype.render,b=(_=A.contextType)&&o[_.__c],x=_?b?b.props.value:_.__:o,n.__c?w=(u=t.__c=n.__c).__=u.__E:(h?t.__c=u=new A(S,x):(t.__c=u=new _t(S,x),u.constructor=A,u.render=r_),b&&b.sub(u),u.state||(u.state={}),u.__n=o,m=u.__d=!0,u.__h=[],u._sb=[]),h&&u.__s==null&&(u.__s=u.state),h&&A.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=Ot({},u.__s)),Ot(u.__s,A.getDerivedStateFromProps(S,u.__s))),g=u.props,P=u.state,u.__v=t,m)h&&A.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),h&&u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(h&&A.getDerivedStateFromProps==null&&S!==g&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(S,x),t.__v==n.__v||!u.__e&&u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(S,u.__s,x)===!1){t.__v!=n.__v&&(u.props=S,u.state=u.__s,u.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(D){D&&(D.__=t)}),No.push.apply(u.__h,u._sb),u._sb=[],u.__h.length&&s.push(u),l=nn(n);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(S,u.__s,x),h&&u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(g,P,y)})}if(u.context=x,u.props=S,u.__P=e,u.__e=!1,k=J.__r,E=0,h)u.state=u.__s,u.__d=!1,k&&k(t),_=u.render(u.props,u.state,u.context),No.push.apply(u.__h,u._sb),u._sb=[];else do u.__d=!1,k&&k(t),_=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++E<25);u.state=u.__s,u.getChildContext!=null&&(o=Ot(Ot({},o),u.getChildContext())),h&&!m&&u.getSnapshotBeforeUpdate!=null&&(y=u.getSnapshotBeforeUpdate(g,P)),G=_!=null&&_.type===fe&&_.key==null?os(_.props.children):_,l=Zi(e,Xn(G)?G:[G],t,n,o,r,a,s,l,c,d),u.base=t.__e,t.__u&=-161,u.__h.length&&s.push(u),w&&(u.__E=u.__=null)}catch(D){if(s.length=p,t.__v=null,c||a!=null){if(D.then){for(t.__u|=c?160:128;l&&l.nodeType==8&&l.nextSibling;)l=l.nextSibling;a!=null&&(a[a.indexOf(l)]=null),t.__e=l}else if(a!=null)for(H=a.length;H--;)ua(a[H])}else t.__e=n.__e;t.__k==null&&(t.__k=n.__k||[]),D.then||ts(t),J.__e(D,t,n)}}else a==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):l=t.__e=o_(n.__e,t,n,o,r,a,s,c,d);return(_=J.diffed)&&_(t),128&t.__u?void 0:l}function ts(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(ts))}function ns(e,t,n){for(var o=0;o<n.length;o++)pa(n[o],n[++o],n[++o]);J.__c&&J.__c(t,e),e.some(function(r){try{e=r.__h,r.__h=[],e.some(function(a){a.call(r)})}catch(a){J.__e(a,r.__v)}})}function os(e){return typeof e!="object"||e==null||e.__b>0?e:Xn(e)?e.map(os):e.constructor!==void 0?null:Ot({},e)}function o_(e,t,n,o,r,a,s,l,c){var d,_,p,u,m,g,P,y=n.props||Oo,w=t.props,S=t.type;if(S=="svg"?r="http://www.w3.org/2000/svg":S=="math"?r="http://www.w3.org/1998/Math/MathML":r||(r="http://www.w3.org/1999/xhtml"),a!=null){for(d=0;d<a.length;d++)if((m=a[d])&&"setAttribute"in m==!!S&&(S?m.localName==S:m.nodeType==3)){e=m,a[d]=null;break}}if(e==null){if(S==null)return document.createTextNode(w);e=document.createElementNS(r,S,w.is&&w),l&&(J.__m&&J.__m(t,a),l=!1),a=null}if(S==null)y===w||l&&e.data==w||(e.data=w);else{if(a=S=="textarea"&&w.defaultValue!=null?null:a&&$o.call(e.childNodes),!l&&a!=null)for(y={},d=0;d<e.attributes.length;d++)y[(m=e.attributes[d]).name]=m.value;for(d in y)m=y[d],d=="dangerouslySetInnerHTML"?p=m:d=="children"||d in w||d=="value"&&"defaultValue"in w||d=="checked"&&"defaultChecked"in w||Ao(e,d,null,m,r);for(d in w)m=w[d],d=="children"?u=m:d=="dangerouslySetInnerHTML"?_=m:d=="value"?g=m:d=="checked"?P=m:l&&typeof m!="function"||y[d]===m||Ao(e,d,m,y[d],r);if(_)l||p&&(_.__html==p.__html||_.__html==e.innerHTML)||(e.innerHTML=_.__html),t.__k=[];else if(p&&(e.innerHTML=""),Zi(t.type=="template"?e.content:e,Xn(u)?u:[u],t,n,o,S=="foreignObject"?"http://www.w3.org/1999/xhtml":r,a,s,a?a[0]:n.__k&&nn(n,0),l,c),a!=null)for(d=a.length;d--;)ua(a[d]);l&&S!="textarea"||(d="value",S=="progress"&&g==null?e.removeAttribute("value"):g!=null&&(g!==e[d]||S=="progress"&&!g||S=="option"&&g!=y[d])&&Ao(e,d,g,y[d],r),d="checked",P!=null&&P!=e[d]&&Ao(e,d,P,y[d],r))}return e}function pa(e,t,n){try{if(typeof e=="function"){var o=typeof e.__u=="function";o&&e.__u(),o&&t==null||(e.__u=e(t))}else e.current=t}catch(r){J.__e(r,n)}}function rs(e,t,n){var o,r;if(J.unmount&&J.unmount(e),(o=e.ref)&&(o.current&&o.current!=e.__e||pa(o,null,t)),(o=e.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(a){J.__e(a,t)}o.base=o.__P=o.__n=null}if(o=e.__k)for(r=0;r<o.length;r++)o[r]&&rs(o[r],t,n||typeof e.type!="function");n||ua(e.__e),e.__c=e.__=e.__e=void 0}function r_(e,t,n){return this.constructor(e,n)}function Jn(e,t,n){var o,r,a,s;t==document&&(t=document.documentElement),J.__&&J.__(e,t),r=(o=typeof n=="function")?null:n&&n.__k||t.__k,a=[],s=[],_a(t,e=(!o&&n||t).__k=Nt(fe,null,[e]),r||Oo,Oo,t.namespaceURI,!o&&n?[n]:r?null:t.firstChild?$o.call(t.childNodes):null,a,!o&&n?n:r?r.__e:t.firstChild,o,s),ns(a,e,s),e.props.children=null}$o=No.slice,J={__e:function(e,t,n,o){for(var r,a,s;t=t.__;)if((r=t.__c)&&!r.__)try{if((a=r.constructor)&&a.getDerivedStateFromError!=null&&(r.setState(a.getDerivedStateFromError(e)),s=r.__d),r.componentDidCatch!=null&&(r.componentDidCatch(e,o||{}),s=r.__d),s)return r.__E=r}catch(l){e=l}throw e}},ji=0,ca=function(e){return e!=null&&e.constructor===void 0},_t.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Ot({},this.state),typeof e=="function"&&(e=e(Ot({},n),this.props)),e&&Ot(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Wi(this))},_t.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Wi(this))},_t.prototype.render=fe,Gt=[],Qi=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Xi=function(e,t){return e.__v.__b-t.__v.__b},Do.__r=0,ia=Math.random().toString(8),Mo="__d"+ia,Qn="__a"+ia,Yi=/(PointerCapture)$|Capture$/i,da=0,sa=Gi(!1),la=Gi(!0),Ju=0;var T={id:"help-ai",name:"@helpai/elements",global:"HelpAI",tagName:"web-ai-chat",cssPrefix:"helpai",defaultBaseUrl:"https://help.ai",displayName:"Help AI",domain:"help.ai",siteUrl:"https://help.ai"};var xn="1.3.11";var as={attach:"Attach files",attachmentMimeRejected:"File type not supported",attachmentTooLarge:"File is too large",attachmentTooMany:"Attachment limit reached",conversationClosed:"This chat is closed",conversationLoading:"Loading chat\u2026",loadPreviousMessages:"Load previous messages",close:"Close",collapse:"Collapse",collapseSidebar:"Collapse sidebar",composerPlaceholder:"Type a message\u2026",dateLastWeek:"Last 7 days",dateOlder:"Older",dateToday:"Today",dateYesterday:"Yesterday",dropZone:"Drop files to attach",errorGeneric:"Something went wrong",errorRateLimited:"Too many requests \u2014 please try again in a moment.",errorRetry:"Retry",expand:"Expand",expandSidebar:"Expand sidebar",exitFullscreen:"Exit fullscreen",fullscreen:"Fullscreen",history:"History",historyBack:"Back to chat",historyEmpty:"No previous chats yet",historyLoading:"Loading your chats\u2026",historyContinue:"Continue the chat",historyTitle:"Chat history",loadMoreConversations:"Load more conversations",language:"Language",launcherOpen:"Open chat",launcherLabel:"Chat with us",micStart:"Start voice input",micStop:"Stop voice input",micUnsupported:"Voice input is not supported in this browser",moreActions:"More actions",newConversation:"New chat",panelTitle:"Chat",popOut:"Open in new tab",resizeHandle:"Drag to resize",scrollToBottom:"Scroll to latest",send:"Send",queueMessage:"Queue message",removeQueuedMessage:"Remove queued message",compactingContext:"Optimizing conversation context\u2026",soundOff:"Sound off",soundOn:"Sound on",startNewConversation:"Start a new chat",talkToOperator:"Talk to an operator",connectingOperator:"Connecting you to an operator\u2026",noOperatorAvailable:"No one's available right now \u2014 leave your details and we'll follow up.",chattingWithOperator:"You're chatting with {operator}",cancelOperatorRequest:"Keep chatting with the AI",stop:"Stop",theme:"Theme",themeAuto:"Auto",themeDark:"Dark",themeLight:"Light",textSize:"Text size",textSizeSmall:"Small",textSizeNormal:"Normal",textSizeLarge:"Large",loading:"Loading\u2026",thinking:"Thinking\u2026",thoughts:"Thoughts",toolResult:"Result",sources:"Sources",feedbackUp:"Good response",feedbackDown:"Bad response",feedbackThanks:"Thanks for your feedback",copy:"Copy",copied:"Copied",tabHome:"Home",tabConversations:"Chats",tabHelp:"Help",tabNews:"News",modulesEmpty:"Nothing here yet",moduleBack:"Back",contentLoading:"Loading\u2026",homeGreeting:"How can we help?",homeGreetingNamed:"Hi {name} \u{1F44B}",homeGreetingLead:"How can we help?",homeSearchPlaceholder:"Search for help",homeContentTitle:"Popular articles",homeStatus:"Status",helpTitle:"Help",helpSearchPlaceholder:"Search for help",helpEmpty:"No help articles yet",helpLoading:"Loading help\u2026",helpSearchEmpty:"No results found",newsTitle:"News",newsEmpty:"No news yet",newsLoading:"Loading news\u2026",newsBack:"Back to news",newsPublishedAt:"Published {date}",formSubmit:"Submit",formSkip:"Maybe later",formSubmitted:"Completed",formSkipped:"Maybe later",formFillOut:"Fill out",formRequired:"This field is required",formInvalidEmail:"Enter a valid email address",formInvalidTel:"Enter a valid phone number",formInvalidUrl:"Enter a valid URL",formInvalidNumber:"Enter a valid number",formTooShort:"Too short (min {min} characters)",formTooLong:"Too long (max {max} characters)",formNumberTooSmall:"Must be at least {min}",formNumberTooLarge:"Must be at most {max}",formPatternMismatch:"Please match the requested format",formChooseAtLeast:"Choose at least {min}",formChooseAtMost:"Choose at most {max}",formOther:"Other",formOtherPlaceholder:"Type your answer\u2026",inputRequired:"Questions for you",inputBadge:"Questions",inputAnswered:"Answered",inputSkipped:"Skipped",showOptions:"Show options",hideOptions:"Hide options",qtypeText:"Your answer",qtypeEmail:"Email address",qtypePhone:"Phone number",qtypeNumber:"Number",qtypeDate:"Date",qtypeChooseOne:"Pick one",qtypeChooseAny:"Pick any",qtypeBoolean:"Yes / No",inputSubmit:"Submit answers",inputSubmitHint:"Enter to send \xB7 Shift+Enter = new line",inputSkip:"Skip",confirmYes:"Yes",confirmNo:"No",approve:"Approve",reject:"Reject",approvalPrompt:"{tool} requires your approval to execute.",approvalBody:"Review the tool input above and decide whether to allow this action.",approvalYourResponse:"Your response: {decision}",approvalEditHint:"You can edit this response until this step continues.",approvalSubmitting:"Response submitted. Request in progress\u2026",edit:"Edit",toolParameters:"Parameters",statusAwaiting:"Awaiting Approval",statusResponded:"Submitted",statusRunning:"Running",statusCompleted:"Completed",statusDenied:"Denied",statusError:"Error",statusSuperseded:"Skipped"},a_={attach:"Joindre des fichiers",attachmentMimeRejected:"Type de fichier non pris en charge",attachmentTooLarge:"Le fichier est trop volumineux",attachmentTooMany:"Limite de pi\xE8ces jointes atteinte",conversationClosed:"Ce chat est ferm\xE9",conversationLoading:"Chargement du chat\u2026",loadPreviousMessages:"Charger les messages pr\xE9c\xE9dents",close:"Fermer",collapse:"R\xE9duire",collapseSidebar:"R\xE9duire la barre lat\xE9rale",composerPlaceholder:"\xC9crivez un message\u2026",dateLastWeek:"7 derniers jours",dateOlder:"Plus ancien",dateToday:"Aujourd'hui",dateYesterday:"Hier",dropZone:"D\xE9posez les fichiers \xE0 joindre",errorGeneric:"Une erreur s'est produite",errorRateLimited:"Trop de requ\xEAtes \u2014 veuillez r\xE9essayer dans un instant.",errorRetry:"R\xE9essayer",expand:"Agrandir",expandSidebar:"D\xE9velopper la barre lat\xE9rale",exitFullscreen:"Quitter le plein \xE9cran",fullscreen:"Plein \xE9cran",history:"Historique",historyBack:"Retour au chat",historyEmpty:"Aucun chat pour le moment",historyContinue:"Poursuivre le chat",historyLoading:"Chargement de vos chats\u2026",historyTitle:"Historique des chats",loadMoreConversations:"Charger plus de conversations",language:"Langue",launcherOpen:"Ouvrir le chat",launcherLabel:"Discuter avec nous",micStart:"D\xE9marrer la saisie vocale",micStop:"Arr\xEAter la saisie vocale",micUnsupported:"La saisie vocale n'est pas prise en charge par ce navigateur",moreActions:"Plus d'actions",newConversation:"Nouveau chat",panelTitle:"Chat",popOut:"Ouvrir dans un nouvel onglet",resizeHandle:"Glisser pour redimensionner",scrollToBottom:"Aller au plus r\xE9cent",send:"Envoyer",queueMessage:"Mettre le message en attente",removeQueuedMessage:"Retirer le message en attente",compactingContext:"Optimisation du contexte de la conversation\u2026",soundOff:"Son d\xE9sactiv\xE9",soundOn:"Son activ\xE9",startNewConversation:"D\xE9marrer un nouveau chat",talkToOperator:"Parler \xE0 un op\xE9rateur",connectingOperator:"Mise en relation avec un op\xE9rateur\u2026",noOperatorAvailable:"Personne n'est disponible pour le moment \u2014 laissez vos coordonn\xE9es et nous reviendrons vers vous.",chattingWithOperator:"Vous discutez avec {operator}",cancelOperatorRequest:"Continuer avec l'IA",stop:"Arr\xEAter",theme:"Th\xE8me",themeAuto:"Auto",themeDark:"Sombre",themeLight:"Clair",textSize:"Taille du texte",textSizeSmall:"Petite",textSizeNormal:"Normale",textSizeLarge:"Grande",loading:"Chargement\u2026",thinking:"R\xE9flexion\u2026",thoughts:"R\xE9flexions",toolResult:"R\xE9sultat",sources:"Sources",feedbackUp:"Bonne r\xE9ponse",feedbackDown:"Mauvaise r\xE9ponse",feedbackThanks:"Merci pour votre retour",copy:"Copier",copied:"Copi\xE9",tabHome:"Accueil",tabConversations:"Chats",tabHelp:"Aide",tabNews:"Actualit\xE9s",modulesEmpty:"Rien pour le moment",moduleBack:"Retour",contentLoading:"Chargement\u2026",homeGreeting:"Comment pouvons-nous vous aider ?",homeGreetingNamed:"Bonjour {name} \u{1F44B}",homeGreetingLead:"Comment pouvons-nous vous aider ?",homeSearchPlaceholder:"Rechercher de l'aide",homeContentTitle:"Articles populaires",homeStatus:"Statut",helpTitle:"Aide",helpSearchPlaceholder:"Rechercher de l'aide",helpEmpty:"Aucun article d'aide pour le moment",helpLoading:"Chargement de l'aide\u2026",helpSearchEmpty:"Aucun r\xE9sultat trouv\xE9",newsTitle:"Actualit\xE9s",newsEmpty:"Aucune actualit\xE9 pour le moment",newsLoading:"Chargement des actualit\xE9s\u2026",newsBack:"Retour aux actualit\xE9s",newsPublishedAt:"Publi\xE9 le {date}",formSubmit:"Envoyer",formSkip:"Plus tard",formSubmitted:"Termin\xE9",formSkipped:"Plus tard",formFillOut:"Remplir",formRequired:"Ce champ est obligatoire",formInvalidEmail:"Saisissez une adresse e-mail valide",formInvalidTel:"Saisissez un num\xE9ro de t\xE9l\xE9phone valide",formInvalidUrl:"Saisissez une URL valide",formInvalidNumber:"Saisissez un nombre valide",formTooShort:"Trop court (min. {min} caract\xE8res)",formTooLong:"Trop long (max. {max} caract\xE8res)",formNumberTooSmall:"Doit \xEAtre au moins {min}",formNumberTooLarge:"Doit \xEAtre au plus {max}",formPatternMismatch:"Veuillez respecter le format demand\xE9",formChooseAtLeast:"Choisissez au moins {min}",formChooseAtMost:"Choisissez au plus {max}",formOther:"Autre",formOtherPlaceholder:"Saisissez votre r\xE9ponse\u2026",inputRequired:"Questions pour vous",inputBadge:"Questions",inputAnswered:"R\xE9pondu",inputSkipped:"Ignor\xE9",showOptions:"Afficher les options",hideOptions:"Masquer les options",qtypeText:"Votre r\xE9ponse",qtypeEmail:"Adresse e-mail",qtypePhone:"Num\xE9ro de t\xE9l\xE9phone",qtypeNumber:"Nombre",qtypeDate:"Date",qtypeChooseOne:"Choisir une",qtypeChooseAny:"Choisir plusieurs",qtypeBoolean:"Oui / Non",inputSubmit:"Envoyer les r\xE9ponses",inputSubmitHint:"Entr\xE9e pour envoyer \xB7 Maj+Entr\xE9e = saut de ligne",inputSkip:"Ignorer",confirmYes:"Oui",confirmNo:"Non",approve:"Approuver",reject:"Refuser",approvalPrompt:"{tool} n\xE9cessite votre approbation pour s'ex\xE9cuter.",approvalBody:"V\xE9rifiez les param\xE8tres ci-dessus et d\xE9cidez d'autoriser ou non cette action.",approvalYourResponse:"Votre r\xE9ponse : {decision}",approvalEditHint:"Vous pouvez modifier votre r\xE9ponse jusqu'\xE0 la reprise de cette \xE9tape.",approvalSubmitting:"R\xE9ponse envoy\xE9e. Traitement en cours\u2026",edit:"Modifier",toolParameters:"Param\xE8tres",statusAwaiting:"En attente d'approbation",statusResponded:"Envoy\xE9",statusRunning:"En cours",statusCompleted:"Termin\xE9",statusDenied:"Refus\xE9",statusError:"Erreur",statusSuperseded:"Ignor\xE9"},i_={attach:"\u0625\u0631\u0641\u0627\u0642 \u0645\u0644\u0641\u0627\u062A",attachmentMimeRejected:"\u0646\u0648\u0639 \u0627\u0644\u0645\u0644\u0641 \u063A\u064A\u0631 \u0645\u062F\u0639\u0648\u0645",attachmentTooLarge:"\u062D\u062C\u0645 \u0627\u0644\u0645\u0644\u0641 \u0643\u0628\u064A\u0631 \u062C\u062F\u064B\u0627",attachmentTooMany:"\u062A\u0645 \u0628\u0644\u0648\u063A \u0627\u0644\u062D\u062F \u0627\u0644\u0623\u0642\u0635\u0649 \u0644\u0644\u0645\u0631\u0641\u0642\u0627\u062A",conversationClosed:"\u062A\u0645 \u0625\u063A\u0644\u0627\u0642 \u0647\u0630\u0647 \u0627\u0644\u062F\u0631\u062F\u0634\u0629",conversationLoading:"\u062C\u0627\u0631\u064D \u062A\u062D\u0645\u064A\u0644 \u0627\u0644\u062F\u0631\u062F\u0634\u0629\u2026",loadPreviousMessages:"\u062A\u062D\u0645\u064A\u0644 \u0627\u0644\u0631\u0633\u0627\u0626\u0644 \u0627\u0644\u0633\u0627\u0628\u0642\u0629",close:"\u0625\u063A\u0644\u0627\u0642",collapse:"\u0637\u064A\u0651",collapseSidebar:"\u0637\u064A\u0651 \u0627\u0644\u0634\u0631\u064A\u0637 \u0627\u0644\u062C\u0627\u0646\u0628\u064A",composerPlaceholder:"\u0627\u0643\u062A\u0628 \u0631\u0633\u0627\u0644\u0629\u2026",dateLastWeek:"\u0622\u062E\u0631 \u0667 \u0623\u064A\u0627\u0645",dateOlder:"\u0623\u0642\u062F\u0645",dateToday:"\u0627\u0644\u064A\u0648\u0645",dateYesterday:"\u0623\u0645\u0633",dropZone:"\u0623\u0641\u0644\u062A \u0627\u0644\u0645\u0644\u0641\u0627\u062A \u0644\u0625\u0631\u0641\u0627\u0642\u0647\u0627",errorGeneric:"\u062D\u062F\u062B \u062E\u0637\u0623 \u0645\u0627",errorRateLimited:"\u0637\u0644\u0628\u0627\u062A \u0643\u062B\u064A\u0631\u0629 \u062C\u062F\u064B\u0627 \u2014 \u064A\u0631\u062C\u0649 \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629 \u0628\u0639\u062F \u0644\u062D\u0638\u0629.",errorRetry:"\u0625\u0639\u0627\u062F\u0629 \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629",expand:"\u062A\u0648\u0633\u064A\u0639",expandSidebar:"\u062A\u0648\u0633\u064A\u0639 \u0627\u0644\u0634\u0631\u064A\u0637 \u0627\u0644\u062C\u0627\u0646\u0628\u064A",exitFullscreen:"\u0625\u0646\u0647\u0627\u0621 \u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629",fullscreen:"\u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629",history:"\u0627\u0644\u0633\u062C\u0644",historyBack:"\u0627\u0644\u0639\u0648\u062F\u0629 \u0625\u0644\u0649 \u0627\u0644\u062F\u0631\u062F\u0634\u0629",historyEmpty:"\u0644\u0627 \u062A\u0648\u062C\u062F \u062F\u0631\u062F\u0634\u0627\u062A \u0633\u0627\u0628\u0642\u0629 \u0628\u0639\u062F",historyContinue:"\u0645\u062A\u0627\u0628\u0639\u0629 \u0627\u0644\u062F\u0631\u062F\u0634\u0629",historyLoading:"\u062C\u0627\u0631\u064D \u062A\u062D\u0645\u064A\u0644 \u062F\u0631\u062F\u0634\u0627\u062A\u0643\u2026",historyTitle:"\u0633\u062C\u0644 \u0627\u0644\u062F\u0631\u062F\u0634\u0627\u062A",loadMoreConversations:"\u062A\u062D\u0645\u064A\u0644 \u0627\u0644\u0645\u0632\u064A\u062F \u0645\u0646 \u0627\u0644\u0645\u062D\u0627\u062F\u062B\u0627\u062A",language:"\u0627\u0644\u0644\u063A\u0629",launcherOpen:"\u0641\u062A\u062D \u0627\u0644\u062F\u0631\u062F\u0634\u0629",launcherLabel:"\u062A\u062D\u062F\u062B \u0645\u0639\u0646\u0627",micStart:"\u0628\u062F\u0621 \u0627\u0644\u0625\u062F\u062E\u0627\u0644 \u0627\u0644\u0635\u0648\u062A\u064A",micStop:"\u0625\u064A\u0642\u0627\u0641 \u0627\u0644\u0625\u062F\u062E\u0627\u0644 \u0627\u0644\u0635\u0648\u062A\u064A",micUnsupported:"\u0627\u0644\u0625\u062F\u062E\u0627\u0644 \u0627\u0644\u0635\u0648\u062A\u064A \u063A\u064A\u0631 \u0645\u062F\u0639\u0648\u0645 \u0641\u064A \u0647\u0630\u0627 \u0627\u0644\u0645\u062A\u0635\u0641\u062D",moreActions:"\u0625\u062C\u0631\u0627\u0621\u0627\u062A \u0625\u0636\u0627\u0641\u064A\u0629",newConversation:"\u062F\u0631\u062F\u0634\u0629 \u062C\u062F\u064A\u062F\u0629",panelTitle:"\u0627\u0644\u062F\u0631\u062F\u0634\u0629",popOut:"\u0641\u062A\u062D \u0641\u064A \u0639\u0644\u0627\u0645\u0629 \u062A\u0628\u0648\u064A\u0628 \u062C\u062F\u064A\u062F\u0629",resizeHandle:"\u0627\u0633\u062D\u0628 \u0644\u062A\u063A\u064A\u064A\u0631 \u0627\u0644\u062D\u062C\u0645",scrollToBottom:"\u0627\u0644\u0627\u0646\u062A\u0642\u0627\u0644 \u0625\u0644\u0649 \u0627\u0644\u0623\u062D\u062F\u062B",send:"\u0625\u0631\u0633\u0627\u0644",queueMessage:"\u0625\u0636\u0627\u0641\u0629 \u0627\u0644\u0631\u0633\u0627\u0644\u0629 \u0625\u0644\u0649 \u0642\u0627\u0626\u0645\u0629 \u0627\u0644\u0627\u0646\u062A\u0638\u0627\u0631",removeQueuedMessage:"\u0625\u0632\u0627\u0644\u0629 \u0627\u0644\u0631\u0633\u0627\u0644\u0629 \u0645\u0646 \u0642\u0627\u0626\u0645\u0629 \u0627\u0644\u0627\u0646\u062A\u0638\u0627\u0631",compactingContext:"\u062C\u0627\u0631\u064D \u062A\u062D\u0633\u064A\u0646 \u0633\u064A\u0627\u0642 \u0627\u0644\u0645\u062D\u0627\u062F\u062B\u0629\u2026",soundOff:"\u0643\u062A\u0645 \u0627\u0644\u0635\u0648\u062A",soundOn:"\u062A\u0634\u063A\u064A\u0644 \u0627\u0644\u0635\u0648\u062A",startNewConversation:"\u0628\u062F\u0621 \u062F\u0631\u062F\u0634\u0629 \u062C\u062F\u064A\u062F\u0629",talkToOperator:"\u0627\u0644\u062A\u062D\u062F\u062B \u0625\u0644\u0649 \u0645\u0648\u0638\u0641",connectingOperator:"\u062C\u0627\u0631\u064A \u062A\u0648\u0635\u064A\u0644\u0643 \u0628\u0623\u062D\u062F \u0627\u0644\u0645\u0648\u0638\u0641\u064A\u0646\u2026",noOperatorAvailable:"\u0644\u0627 \u064A\u0648\u062C\u062F \u0645\u0648\u0638\u0641\u0648\u0646 \u0645\u062A\u0627\u062D\u0648\u0646 \u0627\u0644\u0622\u0646 \u2014 \u0627\u062A\u0631\u0643 \u0628\u064A\u0627\u0646\u0627\u062A\u0643 \u0648\u0633\u0646\u062A\u0648\u0627\u0635\u0644 \u0645\u0639\u0643.",chattingWithOperator:"\u0623\u0646\u062A \u062A\u062A\u062D\u062F\u062B \u0645\u0639 {operator}",cancelOperatorRequest:"\u0645\u062A\u0627\u0628\u0639\u0629 \u0627\u0644\u0645\u062D\u0627\u062F\u062B\u0629 \u0645\u0639 \u0627\u0644\u0630\u0643\u0627\u0621 \u0627\u0644\u0627\u0635\u0637\u0646\u0627\u0639\u064A",stop:"\u0625\u064A\u0642\u0627\u0641",theme:"\u0627\u0644\u0645\u0638\u0647\u0631",themeAuto:"\u062A\u0644\u0642\u0627\u0626\u064A",themeDark:"\u062F\u0627\u0643\u0646",themeLight:"\u0641\u0627\u062A\u062D",textSize:"\u062D\u062C\u0645 \u0627\u0644\u0646\u0635",textSizeSmall:"\u0635\u063A\u064A\u0631",textSizeNormal:"\u0639\u0627\u062F\u064A",textSizeLarge:"\u0643\u0628\u064A\u0631",loading:"\u062C\u0627\u0631\u064D \u0627\u0644\u062A\u062D\u0645\u064A\u0644\u2026",thinking:"\u064A\u0641\u0643\u0651\u0631\u2026",thoughts:"\u0627\u0644\u0623\u0641\u0643\u0627\u0631",toolResult:"\u0627\u0644\u0646\u062A\u064A\u062C\u0629",sources:"\u0627\u0644\u0645\u0635\u0627\u062F\u0631",feedbackUp:"\u0631\u062F \u062C\u064A\u062F",feedbackDown:"\u0631\u062F \u0633\u064A\u0626",feedbackThanks:"\u0634\u0643\u0631\u064B\u0627 \u0639\u0644\u0649 \u0645\u0644\u0627\u062D\u0638\u0627\u062A\u0643",copy:"\u0646\u0633\u062E",copied:"\u062A\u0645 \u0627\u0644\u0646\u0633\u062E",tabHome:"\u0627\u0644\u0631\u0626\u064A\u0633\u064A\u0629",tabConversations:"\u0627\u0644\u062F\u0631\u062F\u0634\u0627\u062A",tabHelp:"\u0627\u0644\u0645\u0633\u0627\u0639\u062F\u0629",tabNews:"\u0627\u0644\u0623\u062E\u0628\u0627\u0631",modulesEmpty:"\u0644\u0627 \u0634\u064A\u0621 \u0647\u0646\u0627 \u0628\u0639\u062F",moduleBack:"\u0631\u062C\u0648\u0639",contentLoading:"\u062C\u0627\u0631\u064D \u0627\u0644\u062A\u062D\u0645\u064A\u0644\u2026",homeGreeting:"\u0643\u064A\u0641 \u064A\u0645\u0643\u0646\u0646\u0627 \u0645\u0633\u0627\u0639\u062F\u062A\u0643\u061F",homeGreetingNamed:"\u0645\u0631\u062D\u0628\u064B\u0627 {name} \u{1F44B}",homeGreetingLead:"\u0643\u064A\u0641 \u064A\u0645\u0643\u0646\u0646\u0627 \u0645\u0633\u0627\u0639\u062F\u062A\u0643\u061F",homeSearchPlaceholder:"\u0627\u0628\u062D\u062B \u0639\u0646 \u0645\u0633\u0627\u0639\u062F\u0629",homeContentTitle:"\u0645\u0642\u0627\u0644\u0627\u062A \u0634\u0627\u0626\u0639\u0629",homeStatus:"\u0627\u0644\u062D\u0627\u0644\u0629",helpTitle:"\u0627\u0644\u0645\u0633\u0627\u0639\u062F\u0629",helpSearchPlaceholder:"\u0627\u0628\u062D\u062B \u0639\u0646 \u0645\u0633\u0627\u0639\u062F\u0629",helpEmpty:"\u0644\u0627 \u062A\u0648\u062C\u062F \u0645\u0642\u0627\u0644\u0627\u062A \u0645\u0633\u0627\u0639\u062F\u0629 \u0628\u0639\u062F",helpLoading:"\u062C\u0627\u0631\u064D \u062A\u062D\u0645\u064A\u0644 \u0627\u0644\u0645\u0633\u0627\u0639\u062F\u0629\u2026",helpSearchEmpty:"\u0644\u0627 \u062A\u0648\u062C\u062F \u0646\u062A\u0627\u0626\u062C",newsTitle:"\u0627\u0644\u0623\u062E\u0628\u0627\u0631",newsEmpty:"\u0644\u0627 \u062A\u0648\u062C\u062F \u0623\u062E\u0628\u0627\u0631 \u0628\u0639\u062F",newsLoading:"\u062C\u0627\u0631\u064D \u062A\u062D\u0645\u064A\u0644 \u0627\u0644\u0623\u062E\u0628\u0627\u0631\u2026",newsBack:"\u0627\u0644\u0639\u0648\u062F\u0629 \u0625\u0644\u0649 \u0627\u0644\u0623\u062E\u0628\u0627\u0631",newsPublishedAt:"\u0646\u064F\u0634\u0631 \u0641\u064A {date}",formSubmit:"\u0625\u0631\u0633\u0627\u0644",formSkip:"\u0644\u0627\u062D\u0642\u064B\u0627",formSubmitted:"\u062A\u0645",formSkipped:"\u0644\u0627\u062D\u0642\u064B\u0627",formFillOut:"\u062A\u0639\u0628\u0626\u0629",formRequired:"\u0647\u0630\u0627 \u0627\u0644\u062D\u0642\u0644 \u0645\u0637\u0644\u0648\u0628",formInvalidEmail:"\u0623\u062F\u062E\u0644 \u0628\u0631\u064A\u062F\u064B\u0627 \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A\u064B\u0627 \u0635\u062D\u064A\u062D\u064B\u0627",formInvalidTel:"\u0623\u062F\u062E\u0644 \u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0635\u062D\u064A\u062D\u064B\u0627",formInvalidUrl:"\u0623\u062F\u062E\u0644 \u0631\u0627\u0628\u0637\u064B\u0627 \u0635\u062D\u064A\u062D\u064B\u0627",formInvalidNumber:"\u0623\u062F\u062E\u0644 \u0631\u0642\u0645\u064B\u0627 \u0635\u062D\u064A\u062D\u064B\u0627",formTooShort:"\u0642\u0635\u064A\u0631 \u062C\u062F\u064B\u0627 (\u0627\u0644\u062D\u062F \u0627\u0644\u0623\u062F\u0646\u0649 {min} \u062D\u0631\u0641\u064B\u0627)",formTooLong:"\u0637\u0648\u064A\u0644 \u062C\u062F\u064B\u0627 (\u0627\u0644\u062D\u062F \u0627\u0644\u0623\u0642\u0635\u0649 {max} \u062D\u0631\u0641\u064B\u0627)",formNumberTooSmall:"\u064A\u062C\u0628 \u0623\u0644\u0627 \u064A\u0642\u0644 \u0639\u0646 {min}",formNumberTooLarge:"\u064A\u062C\u0628 \u0623\u0644\u0627 \u064A\u0632\u064A\u062F \u0639\u0646 {max}",formPatternMismatch:"\u064A\u0631\u062C\u0649 \u0645\u0637\u0627\u0628\u0642\u0629 \u0627\u0644\u0635\u064A\u063A\u0629 \u0627\u0644\u0645\u0637\u0644\u0648\u0628\u0629",formChooseAtLeast:"\u0627\u062E\u062A\u0631 {min} \u0639\u0644\u0649 \u0627\u0644\u0623\u0642\u0644",formChooseAtMost:"\u0627\u062E\u062A\u0631 {max} \u0639\u0644\u0649 \u0627\u0644\u0623\u0643\u062B\u0631",formOther:"\u0623\u062E\u0631\u0649",formOtherPlaceholder:"\u0627\u0643\u062A\u0628 \u0625\u062C\u0627\u0628\u062A\u0643\u2026",inputRequired:"\u0623\u0633\u0626\u0644\u0629 \u0644\u0643",inputBadge:"\u0623\u0633\u0626\u0644\u0629",inputAnswered:"\u062A\u0645\u062A \u0627\u0644\u0625\u062C\u0627\u0628\u0629",inputSkipped:"\u062A\u0645 \u0627\u0644\u062A\u062E\u0637\u064A",showOptions:"\u0625\u0638\u0647\u0627\u0631 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A",hideOptions:"\u0625\u062E\u0641\u0627\u0621 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A",qtypeText:"\u0625\u062C\u0627\u0628\u062A\u0643",qtypeEmail:"\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0628\u0631\u064A\u062F \u0627\u0644\u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",qtypePhone:"\u0631\u0642\u0645 \u0627\u0644\u0647\u0627\u062A\u0641",qtypeNumber:"\u0631\u0642\u0645",qtypeDate:"\u062A\u0627\u0631\u064A\u062E",qtypeChooseOne:"\u0627\u062E\u062A\u0631 \u0648\u0627\u062D\u062F\u064B\u0627",qtypeChooseAny:"\u0627\u062E\u062A\u0631 \u0623\u064A\u064B\u0627",qtypeBoolean:"\u0646\u0639\u0645 / \u0644\u0627",inputSubmit:"\u0625\u0631\u0633\u0627\u0644 \u0627\u0644\u0625\u062C\u0627\u0628\u0627\u062A",inputSubmitHint:"Enter \u0644\u0644\u0625\u0631\u0633\u0627\u0644 \xB7 Shift+Enter = \u0633\u0637\u0631 \u062C\u062F\u064A\u062F",inputSkip:"\u062A\u062E\u0637\u064D\u0651",confirmYes:"\u0646\u0639\u0645",confirmNo:"\u0644\u0627",approve:"\u0645\u0648\u0627\u0641\u0642\u0629",reject:"\u0631\u0641\u0636",approvalPrompt:"\u062A\u062A\u0637\u0644\u0628 {tool} \u0645\u0648\u0627\u0641\u0642\u062A\u0643 \u0644\u0644\u062A\u0646\u0641\u064A\u0630.",approvalBody:"\u0631\u0627\u062C\u0639 \u0645\u064F\u0639\u0637\u064A\u0627\u062A \u0627\u0644\u0623\u062F\u0627\u0629 \u0623\u0639\u0644\u0627\u0647 \u0648\u0642\u0631\u0651\u0631 \u0627\u0644\u0633\u0645\u0627\u062D \u0628\u0647\u0630\u0627 \u0627\u0644\u0625\u062C\u0631\u0627\u0621 \u0623\u0648 \u0631\u0641\u0636\u0647.",approvalYourResponse:"\u0631\u062F\u0651\u0643: {decision}",approvalEditHint:"\u064A\u0645\u0643\u0646\u0643 \u062A\u0639\u062F\u064A\u0644 \u0631\u062F\u0651\u0643 \u062D\u062A\u0649 \u062A\u0633\u062A\u0623\u0646\u0641 \u0647\u0630\u0647 \u0627\u0644\u062E\u0637\u0648\u0629.",approvalSubmitting:"\u062A\u0645 \u0625\u0631\u0633\u0627\u0644 \u0627\u0644\u0631\u062F. \u062C\u0627\u0631\u064D \u0627\u0644\u062A\u0646\u0641\u064A\u0630\u2026",edit:"\u062A\u0639\u062F\u064A\u0644",toolParameters:"\u0627\u0644\u0645\u0639\u0637\u064A\u0627\u062A",statusAwaiting:"\u0628\u0627\u0646\u062A\u0638\u0627\u0631 \u0627\u0644\u0645\u0648\u0627\u0641\u0642\u0629",statusResponded:"\u062A\u0645 \u0627\u0644\u0625\u0631\u0633\u0627\u0644",statusRunning:"\u0642\u064A\u062F \u0627\u0644\u062A\u0646\u0641\u064A\u0630",statusCompleted:"\u0645\u0643\u062A\u0645\u0644",statusDenied:"\u0645\u0631\u0641\u0648\u0636",statusError:"\u062E\u0637\u0623",statusSuperseded:"\u062A\u0645 \u0627\u0644\u062A\u062E\u0637\u064A"},s_={attach:"Adjuntar archivos",attachmentMimeRejected:"Tipo de archivo no admitido",attachmentTooLarge:"El archivo es demasiado grande",attachmentTooMany:"Se alcanz\xF3 el l\xEDmite de adjuntos",conversationClosed:"Este chat est\xE1 cerrado",conversationLoading:"Cargando chat\u2026",loadPreviousMessages:"Cargar mensajes anteriores",close:"Cerrar",collapse:"Contraer",collapseSidebar:"Contraer la barra lateral",composerPlaceholder:"Escribe un mensaje\u2026",dateLastWeek:"\xDAltimos 7 d\xEDas",dateOlder:"Anteriores",dateToday:"Hoy",dateYesterday:"Ayer",dropZone:"Suelta los archivos para adjuntarlos",errorGeneric:"Algo sali\xF3 mal",errorRateLimited:"Demasiadas solicitudes: int\xE9ntalo de nuevo en un momento.",errorRetry:"Reintentar",expand:"Ampliar",expandSidebar:"Expandir la barra lateral",exitFullscreen:"Salir de pantalla completa",fullscreen:"Pantalla completa",history:"Historial",historyBack:"Volver al chat",historyEmpty:"A\xFAn no tienes chats",historyContinue:"Continuar el chat",historyLoading:"Cargando tus chats\u2026",historyTitle:"Historial de chats",loadMoreConversations:"Cargar m\xE1s conversaciones",language:"Idioma",launcherOpen:"Abrir el chat",launcherLabel:"Chatea con nosotros",micStart:"Iniciar entrada de voz",micStop:"Detener entrada de voz",micUnsupported:"Este navegador no admite la entrada de voz",moreActions:"M\xE1s acciones",newConversation:"Nuevo chat",panelTitle:"Chat",popOut:"Abrir en una pesta\xF1a nueva",resizeHandle:"Arrastra para cambiar el tama\xF1o",scrollToBottom:"Ir a lo m\xE1s reciente",send:"Enviar",queueMessage:"Poner mensaje en cola",removeQueuedMessage:"Quitar mensaje de la cola",compactingContext:"Optimizando el contexto de la conversaci\xF3n\u2026",soundOff:"Sonido desactivado",soundOn:"Sonido activado",startNewConversation:"Iniciar un chat nuevo",talkToOperator:"Hablar con un operador",connectingOperator:"Conect\xE1ndote con un operador\u2026",noOperatorAvailable:"Nadie est\xE1 disponible ahora \u2014 deja tus datos y te contactaremos.",chattingWithOperator:"Est\xE1s chateando con {operator}",cancelOperatorRequest:"Seguir con la IA",stop:"Detener",theme:"Tema",themeAuto:"Autom\xE1tico",themeDark:"Oscuro",themeLight:"Claro",textSize:"Tama\xF1o del texto",textSizeSmall:"Peque\xF1o",textSizeNormal:"Normal",textSizeLarge:"Grande",loading:"Cargando\u2026",thinking:"Pensando\u2026",thoughts:"Razonamiento",toolResult:"Resultado",sources:"Fuentes",feedbackUp:"Buena respuesta",feedbackDown:"Mala respuesta",feedbackThanks:"Gracias por tu opini\xF3n",copy:"Copiar",copied:"Copiado",tabHome:"Inicio",tabConversations:"Chats",tabHelp:"Ayuda",tabNews:"Novedades",modulesEmpty:"A\xFAn no hay nada aqu\xED",moduleBack:"Atr\xE1s",contentLoading:"Cargando\u2026",homeGreeting:"\xBFC\xF3mo podemos ayudarte?",homeGreetingNamed:"Hola, {name} \u{1F44B}",homeGreetingLead:"\xBFC\xF3mo podemos ayudarte?",homeSearchPlaceholder:"Buscar ayuda",homeContentTitle:"Art\xEDculos populares",homeStatus:"Estado",helpTitle:"Ayuda",helpSearchPlaceholder:"Buscar ayuda",helpEmpty:"A\xFAn no hay art\xEDculos de ayuda",helpLoading:"Cargando la ayuda\u2026",helpSearchEmpty:"No se encontraron resultados",newsTitle:"Novedades",newsEmpty:"A\xFAn no hay novedades",newsLoading:"Cargando novedades\u2026",newsBack:"Volver a novedades",newsPublishedAt:"Publicado el {date}",formSubmit:"Enviar",formSkip:"Quiz\xE1 m\xE1s tarde",formSubmitted:"Completado",formSkipped:"Quiz\xE1 m\xE1s tarde",formFillOut:"Completar",formRequired:"Este campo es obligatorio",formInvalidEmail:"Introduce un correo electr\xF3nico v\xE1lido",formInvalidTel:"Introduce un n\xFAmero de tel\xE9fono v\xE1lido",formInvalidUrl:"Introduce una URL v\xE1lida",formInvalidNumber:"Introduce un n\xFAmero v\xE1lido",formTooShort:"Demasiado corto (m\xEDn. {min} caracteres)",formTooLong:"Demasiado largo (m\xE1x. {max} caracteres)",formNumberTooSmall:"Debe ser al menos {min}",formNumberTooLarge:"Debe ser como m\xE1ximo {max}",formPatternMismatch:"Respeta el formato solicitado",formChooseAtLeast:"Elige al menos {min}",formChooseAtMost:"Elige como m\xE1ximo {max}",formOther:"Otro",formOtherPlaceholder:"Escribe tu respuesta\u2026",inputRequired:"Preguntas para ti",inputBadge:"Preguntas",inputAnswered:"Respondido",inputSkipped:"Omitido",showOptions:"Mostrar opciones",hideOptions:"Ocultar opciones",qtypeText:"Tu respuesta",qtypeEmail:"Correo electr\xF3nico",qtypePhone:"N\xFAmero de tel\xE9fono",qtypeNumber:"N\xFAmero",qtypeDate:"Fecha",qtypeChooseOne:"Elige una",qtypeChooseAny:"Elige varias",qtypeBoolean:"S\xED / No",inputSubmit:"Enviar respuestas",inputSubmitHint:"Enter para enviar \xB7 May\xFAs+Enter = nueva l\xEDnea",inputSkip:"Omitir",confirmYes:"S\xED",confirmNo:"No",approve:"Aprobar",reject:"Rechazar",approvalPrompt:"{tool} requiere tu aprobaci\xF3n para ejecutarse.",approvalBody:"Revisa los par\xE1metros de arriba y decide si permites esta acci\xF3n.",approvalYourResponse:"Tu respuesta: {decision}",approvalEditHint:"Puedes cambiar tu respuesta hasta que este paso contin\xFAe.",approvalSubmitting:"Respuesta enviada. Procesando\u2026",edit:"Editar",toolParameters:"Par\xE1metros",statusAwaiting:"Esperando aprobaci\xF3n",statusResponded:"Enviado",statusRunning:"En curso",statusCompleted:"Completado",statusDenied:"Denegado",statusError:"Error",statusSuperseded:"Omitido"},l_={attach:"\u05E6\u05D9\u05E8\u05D5\u05E3 \u05E7\u05D1\u05E6\u05D9\u05DD",attachmentMimeRejected:"\u05E1\u05D5\u05D2 \u05D4\u05E7\u05D5\u05D1\u05E5 \u05D0\u05D9\u05E0\u05D5 \u05E0\u05EA\u05DE\u05DA",attachmentTooLarge:"\u05D4\u05E7\u05D5\u05D1\u05E5 \u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9",attachmentTooMany:"\u05D4\u05D2\u05E2\u05EA \u05DC\u05DE\u05E1\u05E4\u05E8 \u05D4\u05DE\u05E8\u05D1\u05D9 \u05E9\u05DC \u05E7\u05D1\u05E6\u05D9\u05DD \u05DE\u05E6\u05D5\u05E8\u05E4\u05D9\u05DD",conversationClosed:"\u05D4\u05E6\u05F3\u05D0\u05D8 \u05D4\u05D6\u05D4 \u05E0\u05E1\u05D2\u05E8",conversationLoading:"\u05D8\u05D5\u05E2\u05DF \u05E6\u05F3\u05D0\u05D8\u2026",loadPreviousMessages:"\u05D8\u05E2\u05D9\u05E0\u05EA \u05D4\u05D5\u05D3\u05E2\u05D5\u05EA \u05E7\u05D5\u05D3\u05DE\u05D5\u05EA",close:"\u05E1\u05D2\u05D9\u05E8\u05D4",collapse:"\u05DB\u05D9\u05D5\u05D5\u05E5",collapseSidebar:"\u05DB\u05D9\u05D5\u05D5\u05E5 \u05E1\u05E8\u05D2\u05DC \u05D4\u05E6\u05D3",composerPlaceholder:"\u05DB\u05EA\u05D5\u05D1 \u05D4\u05D5\u05D3\u05E2\u05D4\u2026",dateLastWeek:"7 \u05D4\u05D9\u05DE\u05D9\u05DD \u05D4\u05D0\u05D7\u05E8\u05D5\u05E0\u05D9\u05DD",dateOlder:"\u05D9\u05E9\u05DF \u05D9\u05D5\u05EA\u05E8",dateToday:"\u05D4\u05D9\u05D5\u05DD",dateYesterday:"\u05D0\u05EA\u05DE\u05D5\u05DC",dropZone:"\u05E9\u05D7\u05E8\u05E8 \u05E7\u05D1\u05E6\u05D9\u05DD \u05DB\u05D3\u05D9 \u05DC\u05E6\u05E8\u05E3",errorGeneric:"\u05DE\u05E9\u05D4\u05D5 \u05D4\u05E9\u05EA\u05D1\u05E9",errorRateLimited:"\u05D9\u05D5\u05EA\u05E8 \u05DE\u05D3\u05D9 \u05D1\u05E7\u05E9\u05D5\u05EA \u2014 \u05E0\u05E1\u05D4 \u05E9\u05D5\u05D1 \u05D1\u05E2\u05D5\u05D3 \u05E8\u05D2\u05E2.",errorRetry:"\u05E0\u05E1\u05D4 \u05E9\u05D5\u05D1",expand:"\u05D4\u05E8\u05D7\u05D1\u05D4",expandSidebar:"\u05D4\u05E8\u05D7\u05D1\u05EA \u05E1\u05E8\u05D2\u05DC \u05D4\u05E6\u05D3",exitFullscreen:"\u05D9\u05E6\u05D9\u05D0\u05D4 \u05DE\u05DE\u05E1\u05DA \u05DE\u05DC\u05D0",fullscreen:"\u05DE\u05E1\u05DA \u05DE\u05DC\u05D0",history:"\u05D4\u05D9\u05E1\u05D8\u05D5\u05E8\u05D9\u05D4",historyBack:"\u05D7\u05D6\u05E8\u05D4 \u05DC\u05E6\u05F3\u05D0\u05D8",historyEmpty:"\u05D0\u05D9\u05DF \u05E2\u05D3\u05D9\u05D9\u05DF \u05E6\u05F3\u05D0\u05D8\u05D9\u05DD \u05E7\u05D5\u05D3\u05DE\u05D9\u05DD",historyContinue:"\u05D4\u05DE\u05E9\u05DA \u05E6\u05F3\u05D0\u05D8",historyLoading:"\u05D8\u05D5\u05E2\u05DF \u05D0\u05EA \u05D4\u05E6\u05F3\u05D0\u05D8\u05D9\u05DD \u05E9\u05DC\u05DA\u2026",historyTitle:"\u05D4\u05D9\u05E1\u05D8\u05D5\u05E8\u05D9\u05D9\u05EA \u05E6\u05F3\u05D0\u05D8\u05D9\u05DD",loadMoreConversations:"\u05D8\u05E2\u05D9\u05E0\u05EA \u05E9\u05D9\u05D7\u05D5\u05EA \u05E0\u05D5\u05E1\u05E4\u05D5\u05EA",language:"\u05E9\u05E4\u05D4",launcherOpen:"\u05E4\u05EA\u05D9\u05D7\u05EA \u05E6\u05F3\u05D0\u05D8",launcherLabel:"\u05D3\u05D1\u05E8\u05D5 \u05D0\u05D9\u05EA\u05E0\u05D5",micStart:"\u05D4\u05EA\u05D7\u05DC\u05EA \u05E7\u05DC\u05D8 \u05E7\u05D5\u05DC\u05D9",micStop:"\u05E2\u05E6\u05D9\u05E8\u05EA \u05E7\u05DC\u05D8 \u05E7\u05D5\u05DC\u05D9",micUnsupported:"\u05E7\u05DC\u05D8 \u05E7\u05D5\u05DC\u05D9 \u05D0\u05D9\u05E0\u05D5 \u05E0\u05EA\u05DE\u05DA \u05D1\u05D3\u05E4\u05D3\u05E4\u05DF \u05D6\u05D4",moreActions:"\u05E4\u05E2\u05D5\u05DC\u05D5\u05EA \u05E0\u05D5\u05E1\u05E4\u05D5\u05EA",newConversation:"\u05E6\u05F3\u05D0\u05D8 \u05D7\u05D3\u05E9",panelTitle:"\u05E6\u05F3\u05D0\u05D8",popOut:"\u05E4\u05EA\u05D9\u05D7\u05D4 \u05D1\u05DB\u05E8\u05D8\u05D9\u05E1\u05D9\u05D9\u05D4 \u05D7\u05D3\u05E9\u05D4",resizeHandle:"\u05D2\u05E8\u05D5\u05E8 \u05DC\u05E9\u05D9\u05E0\u05D5\u05D9 \u05D4\u05D2\u05D5\u05D3\u05DC",scrollToBottom:"\u05DE\u05E2\u05D1\u05E8 \u05DC\u05D7\u05D3\u05E9 \u05D1\u05D9\u05D5\u05EA\u05E8",send:"\u05E9\u05DC\u05D9\u05D7\u05D4",queueMessage:"\u05D4\u05D5\u05E1\u05E4\u05EA \u05D4\u05D4\u05D5\u05D3\u05E2\u05D4 \u05DC\u05EA\u05D5\u05E8",removeQueuedMessage:"\u05D4\u05E1\u05E8\u05EA \u05D4\u05D4\u05D5\u05D3\u05E2\u05D4 \u05DE\u05D4\u05EA\u05D5\u05E8",compactingContext:"\u05DE\u05D1\u05E6\u05E2 \u05D0\u05D5\u05E4\u05D8\u05D9\u05DE\u05D9\u05D6\u05E6\u05D9\u05D4 \u05DC\u05D4\u05E7\u05E9\u05E8 \u05D4\u05E9\u05D9\u05D7\u05D4\u2026",soundOff:"\u05D4\u05E9\u05EA\u05E7\u05EA \u05D4\u05E6\u05DC\u05D9\u05DC",soundOn:"\u05D4\u05E4\u05E2\u05DC\u05EA \u05D4\u05E6\u05DC\u05D9\u05DC",startNewConversation:"\u05D4\u05EA\u05D7\u05DC\u05EA \u05E6\u05F3\u05D0\u05D8 \u05D7\u05D3\u05E9",talkToOperator:"\u05D3\u05D1\u05E8 \u05E2\u05DD \u05E0\u05E6\u05D9\u05D2",connectingOperator:"\u05DE\u05D7\u05D1\u05E8 \u05D0\u05D5\u05EA\u05DA \u05DC\u05E0\u05E6\u05D9\u05D2\u2026",noOperatorAvailable:"\u05D0\u05D9\u05DF \u05E0\u05E6\u05D9\u05D2\u05D9\u05DD \u05D6\u05DE\u05D9\u05E0\u05D9\u05DD \u05DB\u05E2\u05EA \u2014 \u05D4\u05E9\u05D0\u05E8 \u05D0\u05EA \u05D4\u05E4\u05E8\u05D8\u05D9\u05DD \u05E9\u05DC\u05DA \u05D5\u05E0\u05D7\u05D6\u05D5\u05E8 \u05D0\u05DC\u05D9\u05DA.",chattingWithOperator:"\u05D0\u05EA\u05D4 \u05DE\u05E6\u05F3\u05D5\u05D8\u05D8 \u05E2\u05DD {operator}",cancelOperatorRequest:"\u05D4\u05DE\u05E9\u05DA \u05DC\u05E9\u05D5\u05D7\u05D7 \u05E2\u05DD \u05D4-AI",stop:"\u05E2\u05E6\u05D9\u05E8\u05D4",theme:"\u05E2\u05E8\u05DB\u05EA \u05E0\u05D5\u05E9\u05D0",themeAuto:"\u05D0\u05D5\u05D8\u05D5\u05DE\u05D8\u05D9",themeDark:"\u05DB\u05D4\u05D4",themeLight:"\u05D1\u05D4\u05D9\u05E8",textSize:"\u05D2\u05D5\u05D3\u05DC \u05D8\u05E7\u05E1\u05D8",textSizeSmall:"\u05E7\u05D8\u05DF",textSizeNormal:"\u05E8\u05D2\u05D9\u05DC",textSizeLarge:"\u05D2\u05D3\u05D5\u05DC",loading:"\u05D8\u05D5\u05E2\u05DF\u2026",thinking:"\u05D7\u05D5\u05E9\u05D1\u2026",thoughts:"\u05DE\u05D7\u05E9\u05D1\u05D5\u05EA",toolResult:"\u05EA\u05D5\u05E6\u05D0\u05D4",sources:"\u05DE\u05E7\u05D5\u05E8\u05D5\u05EA",feedbackUp:"\u05EA\u05E9\u05D5\u05D1\u05D4 \u05D8\u05D5\u05D1\u05D4",feedbackDown:"\u05EA\u05E9\u05D5\u05D1\u05D4 \u05D2\u05E8\u05D5\u05E2\u05D4",feedbackThanks:"\u05EA\u05D5\u05D3\u05D4 \u05E2\u05DC \u05D4\u05DE\u05E9\u05D5\u05D1",copy:"\u05D4\u05E2\u05EA\u05E7",copied:"\u05D4\u05D5\u05E2\u05EA\u05E7",tabHome:"\u05D1\u05D9\u05EA",tabConversations:"\u05E6\u05F3\u05D0\u05D8\u05D9\u05DD",tabHelp:"\u05E2\u05D6\u05E8\u05D4",tabNews:"\u05D7\u05D3\u05E9\u05D5\u05EA",modulesEmpty:"\u05D0\u05D9\u05DF \u05DB\u05D0\u05DF \u05E2\u05D3\u05D9\u05D9\u05DF \u05DB\u05DC\u05D5\u05DD",moduleBack:"\u05D7\u05D6\u05E8\u05D4",contentLoading:"\u05D8\u05D5\u05E2\u05DF\u2026",homeGreeting:"\u05DB\u05D9\u05E6\u05D3 \u05E0\u05D5\u05DB\u05DC \u05DC\u05E2\u05D6\u05D5\u05E8?",homeGreetingNamed:"\u05E9\u05DC\u05D5\u05DD {name} \u{1F44B}",homeGreetingLead:"\u05DB\u05D9\u05E6\u05D3 \u05E0\u05D5\u05DB\u05DC \u05DC\u05E2\u05D6\u05D5\u05E8?",homeSearchPlaceholder:"\u05D7\u05D9\u05E4\u05D5\u05E9 \u05E2\u05D6\u05E8\u05D4",homeContentTitle:"\u05DE\u05D0\u05DE\u05E8\u05D9\u05DD \u05E4\u05D5\u05E4\u05D5\u05DC\u05E8\u05D9\u05D9\u05DD",homeStatus:"\u05E1\u05D8\u05D8\u05D5\u05E1",helpTitle:"\u05E2\u05D6\u05E8\u05D4",helpSearchPlaceholder:"\u05D7\u05D9\u05E4\u05D5\u05E9 \u05E2\u05D6\u05E8\u05D4",helpEmpty:"\u05D0\u05D9\u05DF \u05E2\u05D3\u05D9\u05D9\u05DF \u05DE\u05D0\u05DE\u05E8\u05D9 \u05E2\u05D6\u05E8\u05D4",helpLoading:"\u05D8\u05D5\u05E2\u05DF \u05E2\u05D6\u05E8\u05D4\u2026",helpSearchEmpty:"\u05DC\u05D0 \u05E0\u05DE\u05E6\u05D0\u05D5 \u05EA\u05D5\u05E6\u05D0\u05D5\u05EA",newsTitle:"\u05D7\u05D3\u05E9\u05D5\u05EA",newsEmpty:"\u05D0\u05D9\u05DF \u05E2\u05D3\u05D9\u05D9\u05DF \u05D7\u05D3\u05E9\u05D5\u05EA",newsLoading:"\u05D8\u05D5\u05E2\u05DF \u05D7\u05D3\u05E9\u05D5\u05EA\u2026",newsBack:"\u05D7\u05D6\u05E8\u05D4 \u05DC\u05D7\u05D3\u05E9\u05D5\u05EA",newsPublishedAt:"\u05E4\u05D5\u05E8\u05E1\u05DD \u05D1-{date}",formSubmit:"\u05E9\u05DC\u05D9\u05D7\u05D4",formSkip:"\u05D0\u05D7\u05E8 \u05DB\u05DA",formSubmitted:"\u05E0\u05E9\u05DC\u05D7",formSkipped:"\u05D3\u05D5\u05DC\u05D2",formFillOut:"\u05DE\u05D9\u05DC\u05D5\u05D9",formRequired:"\u05E9\u05D3\u05D4 \u05D7\u05D5\u05D1\u05D4",formInvalidEmail:"\u05D4\u05D6\u05DF \u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC \u05EA\u05E7\u05D9\u05E0\u05D4",formInvalidTel:"\u05D4\u05D6\u05DF \u05DE\u05E1\u05E4\u05E8 \u05D8\u05DC\u05E4\u05D5\u05DF \u05EA\u05E7\u05D9\u05DF",formInvalidUrl:"\u05D4\u05D6\u05DF \u05DB\u05EA\u05D5\u05D1\u05EA URL \u05EA\u05E7\u05D9\u05E0\u05D4",formInvalidNumber:"\u05D4\u05D6\u05DF \u05DE\u05E1\u05E4\u05E8 \u05EA\u05E7\u05D9\u05DF",formTooShort:"\u05E7\u05E6\u05E8 \u05DE\u05D3\u05D9 (\u05DC\u05E4\u05D7\u05D5\u05EA {min} \u05EA\u05D5\u05D5\u05D9\u05DD)",formTooLong:"\u05D0\u05E8\u05D5\u05DA \u05DE\u05D3\u05D9 (\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8 {max} \u05EA\u05D5\u05D5\u05D9\u05DD)",formNumberTooSmall:"\u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DC\u05E4\u05D7\u05D5\u05EA {min}",formNumberTooLarge:"\u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8 {max}",formPatternMismatch:"\u05D4\u05EA\u05D0\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA \u05D4\u05E0\u05D3\u05E8\u05E9\u05EA",formChooseAtLeast:"\u05D1\u05D7\u05E8 \u05DC\u05E4\u05D7\u05D5\u05EA {min}",formChooseAtMost:"\u05D1\u05D7\u05E8 \u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8 {max}",formOther:"\u05D0\u05D7\u05E8",formOtherPlaceholder:"\u05DB\u05EA\u05D5\u05D1 \u05D0\u05EA \u05EA\u05E9\u05D5\u05D1\u05EA\u05DA\u2026",inputRequired:"\u05E9\u05D0\u05DC\u05D5\u05EA \u05E2\u05D1\u05D5\u05E8\u05DA",inputBadge:"\u05E9\u05D0\u05DC\u05D5\u05EA",inputAnswered:"\u05E0\u05E2\u05E0\u05D4",inputSkipped:"\u05D3\u05D5\u05DC\u05D2",showOptions:"\u05D4\u05E6\u05D2 \u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA",hideOptions:"\u05D4\u05E1\u05EA\u05E8 \u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA",qtypeText:"\u05D4\u05EA\u05E9\u05D5\u05D1\u05D4 \u05E9\u05DC\u05DA",qtypeEmail:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",qtypePhone:"\u05DE\u05E1\u05E4\u05E8 \u05D8\u05DC\u05E4\u05D5\u05DF",qtypeNumber:"\u05DE\u05E1\u05E4\u05E8",qtypeDate:"\u05EA\u05D0\u05E8\u05D9\u05DA",qtypeChooseOne:"\u05D1\u05D7\u05E8 \u05D0\u05D7\u05EA",qtypeChooseAny:"\u05D1\u05D7\u05E8 \u05DB\u05DE\u05D4",qtypeBoolean:"\u05DB\u05DF / \u05DC\u05D0",inputSubmit:"\u05E9\u05DC\u05D9\u05D7\u05EA \u05EA\u05E9\u05D5\u05D1\u05D5\u05EA",inputSubmitHint:"Enter \u05DC\u05E9\u05DC\u05D9\u05D7\u05D4 \xB7 Shift+Enter = \u05E9\u05D5\u05E8\u05D4 \u05D7\u05D3\u05E9\u05D4",inputSkip:"\u05D3\u05D9\u05DC\u05D5\u05D2",confirmYes:"\u05DB\u05DF",confirmNo:"\u05DC\u05D0",approve:"\u05D0\u05D9\u05E9\u05D5\u05E8",reject:"\u05D3\u05D7\u05D9\u05D9\u05D4",approvalPrompt:"\u05D4\u05DB\u05DC\u05D9 {tool} \u05D3\u05D5\u05E8\u05E9 \u05D0\u05EA \u05D0\u05D9\u05E9\u05D5\u05E8\u05DA \u05DB\u05D3\u05D9 \u05DC\u05E4\u05E2\u05D5\u05DC.",approvalBody:"\u05D1\u05D3\u05D5\u05E7 \u05D0\u05EA \u05E4\u05E8\u05DE\u05D8\u05E8\u05D9 \u05D4\u05DB\u05DC\u05D9 \u05E9\u05DC\u05DE\u05E2\u05DC\u05D4 \u05D5\u05D4\u05D7\u05DC\u05D8 \u05D0\u05DD \u05DC\u05D0\u05E9\u05E8 \u05E4\u05E2\u05D5\u05DC\u05D4 \u05D6\u05D5.",approvalYourResponse:"\u05D4\u05EA\u05D2\u05D5\u05D1\u05D4 \u05E9\u05DC\u05DA: {decision}",approvalEditHint:"\u05E0\u05D9\u05EA\u05DF \u05DC\u05E2\u05E8\u05D5\u05DA \u05D0\u05EA \u05EA\u05D2\u05D5\u05D1\u05EA\u05DA \u05E2\u05D3 \u05E9\u05D4\u05E9\u05DC\u05D1 \u05D4\u05D6\u05D4 \u05D9\u05EA\u05D7\u05D3\u05E9.",approvalSubmitting:"\u05D4\u05EA\u05D2\u05D5\u05D1\u05D4 \u05E0\u05E9\u05DC\u05D7\u05D4. \u05DE\u05D1\u05E6\u05E2\u2026",edit:"\u05E2\u05E8\u05D9\u05DB\u05D4",toolParameters:"\u05E4\u05E8\u05DE\u05D8\u05E8\u05D9\u05DD",statusAwaiting:"\u05DE\u05DE\u05EA\u05D9\u05DF \u05DC\u05D0\u05D9\u05E9\u05D5\u05E8",statusResponded:"\u05E0\u05E9\u05DC\u05D7",statusRunning:"\u05E4\u05D5\u05E2\u05DC",statusCompleted:"\u05D4\u05D5\u05E9\u05DC\u05DD",statusDenied:"\u05E0\u05D3\u05D7\u05D4",statusError:"\u05E9\u05D2\u05D9\u05D0\u05D4",statusSuperseded:"\u05D3\u05D5\u05DC\u05D2"},c_={en:as,fr:a_,ar:i_,es:s_,he:l_};function Fo(e,t){let n=is(e),o=Bo(t),r=n==="en"?{}:c_[n]??{},a=o?t[n]??{}:t??{},s=o?t.en??{}:{};return{...as,...r,...s,...a}}function is(e){return(e.split("-")[0]??"en").toLowerCase()}var d_=new Set(["ar","he","iw","fa","ur","ps","sd","ug","yi","dv","ckb","ks","nqo","prs","syr"]);function ss(e){return d_.has(is(e))}function lt(e,t){return e[t]??t}function Bo(e){if(!e)return!1;for(let t of Object.values(e))if(t&&typeof t=="object")return!0;return!1}function ls(e,t){if(!(!e?.length||!t))return e.find(n=>n.locale===t)}function cs(e,t){let{translations:n,defaultLocale:o,...r}=e,a=ls(n,t);return a?{...r,title:a.title??r.title,description:a.description??r.description,content:a.content??r.content}:r}function ds(e,t){let{translations:n,defaultLocale:o,...r}=e,a=ls(n,t);if(!a)return r;let s=new Map((a.fields??[]).map(c=>[c.name,c])),l=r.fields.map(c=>{let d=s.get(c.name);if(!d)return c;let _=new Map((d.options??[]).map(p=>[p.value,p]));return{...c,label:d.label??c.label,placeholder:d.placeholder??c.placeholder,validationHint:d.validationHint??c.validationHint,options:c.options?.map(p=>{let u=_.get(p.value);return u?{...p,label:u.label??p.label,description:u.description??p.description}:p})}});return{...r,title:a.title??r.title,description:a.description??r.description,submitLabel:a.submitLabel??r.submitLabel,fields:l}}var fa=class{get(t){try{return localStorage.getItem(t)}catch{return null}}set(t,n){try{localStorage.setItem(t,n)}catch{}}remove(t){try{localStorage.removeItem(t)}catch{}}},Uo=new fa;var va=["off","error","warn","info","debug","trace"],ha=T.cssPrefix,us=`${ha}.debug`,u_=`__${T.global}_DEBUG__`,__=`${ha}-debug`,Ho=2,ma=null;function p_(){if(typeof window>"u")return 2;try{let e=new URLSearchParams(window.location.search).get(__);if(e!==null){let t=ga(e);if(t>=0)return t}}catch{}try{let e=window.localStorage?.getItem(us);if(e){let t=ga(e);if(t>=0)return t}}catch{}return Reflect.get(window,u_)?4:2}function ga(e){if(e===!0||e==="1"||e==="true")return 4;if(e===!1||e==="0"||e==="false"||e==="off")return 0;if(typeof e=="number")return Math.max(0,Math.min(5,Math.floor(e)));if(typeof e=="string"){let t=va.findIndex(n=>n===e);if(t>=0)return t}return-1}function zo(e){let t=ga(e);if(!(t<0)){Ho=t;try{window.localStorage?.setItem(us,va[t]??"off")}catch{}}}function ba(){return va[Ho]??"warn"}Ho=p_();function _s(e){let t=`[${ha}:${e}]`,n=(o,r,a)=>(s,l)=>{if(!(Ho<o)&&(l===void 0?console[r](t,s):console[r](t,s,l),ma))try{ma({level:a,scope:e,message:s,payload:l})}catch{}};return{error:n(1,"error","error"),warn:n(2,"warn","warn"),info:n(3,"info","info"),debug:n(4,"debug","debug"),trace:n(5,"debug","trace"),scope:o=>_s(`${e}:${o}`)}}var Z=_s("core");function ps(e){ma=e}var on=Z.scope("context"),f_=new Set(["visitorId","conversationId","jwt","token","authorization","password"]),fs=50,ya=1024,m_=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;function Pa(e){return ms(e,"userContext",!0)}function xa(e){return ms(e,"pageContext",!1)}function ms(e,t,n){if(e==null)return;if(typeof e!="object"||Array.isArray(e)){on.warn(`ignored ${t} \u2014 expected an object`,{type:Array.isArray(e)?"array":typeof e});return}let o={},r=0;for(let[a,s]of Object.entries(e)){if(f_.has(a)){on.warn(`dropped reserved ${t} key "${a}" \u2014 managed by the widget, not host-settable`);continue}if(s==null)continue;if(r>=fs){on.warn(`${t} truncated at ${fs} keys \u2014 dropped "${a}"`);continue}let l=g_(t,a,s);l!==void 0&&(o[a]=l,r++)}return n&&typeof o.email=="string"&&!m_.test(o.email)&&(on.warn("dropped malformed context field",{field:`${t}.email`,reason:"invalid format"}),delete o.email),Object.keys(o).length>0?o:void 0}function g_(e,t,n){if(typeof n=="boolean")return n;if(typeof n=="number"){if(!Number.isFinite(n)){on.warn(`dropped non-finite ${e}.${t}`);return}return n}if(typeof n=="string"){let o=n.trim();return o===""?void 0:o.length>ya?(on.warn(`truncated ${e}.${t} to ${ya} chars`),o.slice(0,ya)):o}on.warn(`dropped ${e}.${t} \u2014 only string/number/boolean values are allowed`,{type:typeof n})}var qo={maxBytes:10485760,maxCount:10,accept:"*/*"},gs={voice:"local"},vs={list:[],byTrigger:{}},Sa={enabled:!0,sampleRate:1},Vo={upload:"/pai/upload-file",transcribe:"/pai/transcribe-audio",submitForm:"/pai/submit-form"},Sn={variant:"circle",size:"md",label:void 0,icon:"chat",hidden:!1},hs={floating:["theme","textSize","history","close","clear","expand","fullscreen","popOut","sound","language"],inline:["theme","textSize","history","close","clear","fullscreen","popOut","sound","language"],standalone:["theme","textSize","history","clear","sound","language"],page:["theme","textSize","history","clear","sound","language"],modal:["theme","textSize","history","close","clear","fullscreen","popOut","sound","language"],drawer:["theme","textSize","history","close","clear","fullscreen","popOut","sound","language"]},ka={enabled:!0,volume:.3,events:void 0},bs={enabled:!0,events:void 0},ys=[{label:"tabConversations",layout:"chat"}];function kn(e){let t=e!==null&&typeof e=="object"?e:{},n=t.presentation??{},o=t.behavior??{},r=t.i18n??{},a=t.feedback??{},s=t.footer??{},l=t.header??{},{themeMode:c,themeOverrides:d}=v_(t.theme),_=n.mode??"floating",p=h_(r.defaultLocale),u=r.availableLocales??[r.locale??p],m=wn(r.locale??p,u,p),g=(t.baseUrl??T.defaultBaseUrl).replace(/\/$/,""),P=(t.agentApiBaseUrl??`${g}/api/agent`).replace(/\/$/,""),y=(t.dataApiBaseUrl??`${g}/api/data`).replace(/\/$/,"");return{widgetId:t.widgetId??"default",publicKey:t.publicKey,aiAgentDeploymentId:t.aiAgentDeploymentId,baseUrl:g,agentApiBaseUrl:P,dataApiBaseUrl:y,userContext:Pa(t.userContext),pageContext:xa(t.pageContext),position:n.position??"bottom-right",themeMode:c,textSize:"normal",themeOverrides:d,mode:_,iframe:n.iframe??!1,responseMode:o.responseMode??"streaming",showReasoning:o.showReasoning??!1,showToolCalls:o.showToolCalls??!1,showSources:o.showSources??!1,enableMessageFeedback:!(o.disableMessageFeedback??!1),autoSendSuggestions:o.autoSendSuggestions??!1,popOutUrl:o.popOutUrl,features:{voice:t.features?.voice??gs.voice,fileUpload:!(t.features?.disableFileUpload??!1),humanInLoop:!(t.features?.disableHumanInLoop??!1),operatorRequest:t.features?.enableOperatorRequest===!0},forms:Zn(t.forms,m),endpoints:{upload:t.endpoints?.upload??Vo.upload,transcribe:t.endpoints?.transcribe??Vo.transcribe,submitForm:t.endpoints?.submitForm??Vo.submitForm},attachments:{accept:t.composer?.attachments?.accept??qo.accept,maxBytes:t.composer?.attachments?.maxBytes??qo.maxBytes,maxCount:t.composer?.attachments?.maxCount??qo.maxCount},locale:m,defaultLocale:p,availableLocales:u,startMinimized:o.startMinimized??!0,actions:b_(_,l.actions),size:n.size??{},launcher:R_(t.launcher),sound:y_(a.sound),haptics:P_(a.haptics),strings:Fo(m,r.strings),stringsOverride:r.strings,composerDisclaimer:s.composerDisclaimer??"",poweredBy:S_(s.poweredBy),composer:k_(t.composer),modules:w_(t.modules),tracking:x_(t.tracking,y),storage:t.storage??Uo,onMessage:t.onMessage,onOpen:t.onOpen,onClose:t.onClose,onError:t.onError}}function v_(e){return typeof e=="string"?{themeMode:e,themeOverrides:{}}:e&&typeof e=="object"?{themeMode:"auto",themeOverrides:e}:{themeMode:"auto",themeOverrides:{}}}function h_(e){return e&&e!=="auto"?e:globalThis.navigator?.language||"en"}function wn(e,t,n){return t.length<=1||t.includes(e)?e:t.includes(n)?n:t[0]??e}function b_(e,t){return t??hs[e]}function y_(e){return{enabled:e?.enabled??ka.enabled,volume:e?.volume??ka.volume,events:e?.events}}function P_(e){return{enabled:e?.enabled??bs.enabled,events:e?.events}}function x_(e,t){let n=e?.sampleRate??Sa.sampleRate;return{enabled:e?.enabled??Sa.enabled,endpoint:e?.endpoint??`${t}/pai/elements-px.gif`,sampleRate:Math.min(1,Math.max(0,Number.isFinite(n)?n:1)),token:e?.token}}function S_(e){let n={...{text:`Powered by ${T.displayName}`,href:T.siteUrl},...e};return!!(n.text||n.logoUrl)?n:null}function k_(e){let t=e?.sendButton;return{sendButton:{shape:t?.shape??"circle",icon:t?.icon??"arrowUp",variant:t?.variant??"filled"}}}function w_(e){let t=e??ys,n=new Set,o=[];for(let a of t.slice(0,4)){if(!a?.label||!a?.layout)continue;let s=a.contentTags?.filter(Boolean),l=a.id??s?.[0]??a.layout;for(;n.has(l);)l=`${l}-${o.length}`;n.add(l);let c={id:l,label:a.label,layout:a.layout};s?.length&&(c.contentTags=s),a.layout==="home"&&(c.brandName=a.brandName,c.greetingText=a.greetingText,c.showGreeting=!(a.hideGreeting??!1),c.showSearchBar=!(a.hideSearchBar??!1),c.showRecentConversations=!(a.hideRecentConversations??!1),a.userAvatars?.length&&(c.userAvatars=a.userAvatars),a.status&&(c.status=a.status),c.contentBlockTitle=a.contentBlockTitle),o.push(c)}let r=Object.fromEntries(o.map(a=>[a.id,a]));return{list:o,byId:r}}function Zn(e,t){var a;if(!e?.length)return vs;let n=[],o=new Set;for(let s of e){if(!s?.id||o.has(s.id))continue;let l=ds(s,t),c=(l.fields??[]).filter(_=>!!(_?.name&&_.label&&_.type)),d=(Array.isArray(l.on)?l.on:[l.on]).map(C_).filter(_=>_!==null);c.length===0||d.length===0||(o.add(l.id),n.push({id:l.id,triggers:d,when:l.when,fields:c,title:l.title,description:l.description,submitLabel:l.submitLabel,skippable:l.skippable??!1,frequency:l.frequency??"once",mirrorToContext:l.mirrorToContext??!0,reopenable:l.reopenable??!0,reviewable:l.reviewable??!0}))}let r={};for(let s of n)for(let l of s.triggers)(r[a=l.kind]??(r[a]=[])).push(s);return{list:n,byTrigger:r}}function C_(e){if(typeof e!="string")return null;if(e==="pre-chat"||e==="conversation-closed"||e==="panel-close"||e==="manual")return{kind:e};let[t,n]=e.split(":",2);if(t==="after-messages"){let o=Number(n);return Number.isFinite(o)&&o>0?{kind:"after-messages",param:o}:null}if(t==="idle"){let o=Number(n);return Number.isFinite(o)&&o>0?{kind:"idle",param:o}:null}return t==="page-area"&&n?{kind:"page-area",param:n}:null}function R_(e){let t=e?.callout?.text?{shape:"pill",position:"auto",delayMs:1200,autoDismissMs:0,animated:!0,persistent:!0,...e.callout}:null;return{variant:e?.variant??Sn.variant,size:e?.size??Sn.size,label:e?.label??Sn.label,icon:e?.icon??Sn.icon,hidden:e?.hidden??Sn.hidden,callout:t}}function wa(e,t,n,o){let r=wn(t,e.availableLocales,e.defaultLocale);if(r===e.locale&&n===e.themeMode&&o===e.textSize)return e;let a={...e};return r!==e.locale&&(a.locale=r,a.strings=Fo(r,e.stringsOverride)),n!==e.themeMode&&(a.themeMode=n),o!==e.textSize&&(a.textSize=o),a}var T_=["presentation","behavior","theme","launcher","header","composer","feedback","i18n","footer","features","tracking","endpoints"];function Ca(e,t){if(!t)return e;let n={...e};for(let a of T_){let s=t[a];if(s===void 0)continue;let l=e[a];if(a==="theme"){l===void 0&&(n[a]=s);continue}a!=="i18n"&&(n[a]=Ps(s,l))}t.modules!==void 0&&e.modules===void 0&&(n.modules=t.modules),t.dataApiBaseUrl!==void 0&&e.dataApiBaseUrl===void 0&&(n.dataApiBaseUrl=t.dataApiBaseUrl);let o=e.i18n,r=t.i18n;if(o||r){let a=Ps(r??{},o);r?.availableLocales!==void 0&&(a.availableLocales=r.availableLocales),r?.defaultLocale!==void 0&&(a.defaultLocale=r.defaultLocale);let s=o?.strings,l=r?.strings;(s||l)&&(a.strings=I_(l,s)),n.i18n=a}return n}function Ps(e,t){if(!t)return e;let n={...e};for(let[o,r]of Object.entries(t))r!==void 0&&(n[o]=r);return n}function I_(e,t){if(!e)return t;if(!t)return e;let n=Bo(e),o=Bo(t);if(!n&&!o)return{...e,...t};let r={},a=n?e:{en:e},s=o?t:{en:t};for(let[l,c]of Object.entries(a))r[l]={...c};for(let[l,c]of Object.entries(s))r[l]={...r[l],...c};return r}var E_=["clear","expand","fullscreen","popOut","sound","history","language","theme","textSize","close"],Dt=e=>e!=="false";var A_=[["public-key","publicKey"],["ai-agent-deployment-id","aiAgentDeploymentId"],["base-url","baseUrl"],["agent-api-base-url","agentApiBaseUrl"],["data-api-base-url","dataApiBaseUrl"],["theme","theme",e=>e]],M_=[["mode","mode",e=>e],["position","position",e=>e],["iframe","iframe",Dt]],L_=[["width","width"],["height","height"]],O_=[["response-mode","responseMode",e=>e],["start-minimized","startMinimized",Dt],["show-reasoning","showReasoning",Dt],["show-tool-calls","showToolCalls",Dt],["show-sources","showSources",Dt],["disable-message-feedback","disableMessageFeedback",Dt],["auto-send-suggestions","autoSendSuggestions",Dt],["pop-out-url","popOutUrl"]],N_=[["locale","locale"]],kv=new Set(E_);var D_=[["launcher-variant","variant",e=>e],["launcher-size","size",e=>e],["launcher-icon","icon"],["launcher-hidden","hidden",Dt]],$_=[["features-disable-file-upload","disableFileUpload",Dt],["features-voice","voice",e=>e]],F_=[["endpoint-upload","upload"],["endpoint-transcribe","transcribe"]],B_=[["user-id","id"],["user-email","email"],["user-name","name"]],U_=[["page-area","area"],["page-url","url"],["page-path","path"],["page-title","title"]],H_=["launcher-label","callout-text","callout-delay","actions","user-context","page-context"],z_=[A_,M_,L_,O_,N_,D_,$_,F_,B_,U_],q_=new Set(["iframe","start-minimized"]),V_=[...z_.flatMap(e=>e.map(([t])=>t).filter(t=>!q_.has(t))),...H_];function xs(e){return`${T.cssPrefix}:${e}`}function eo(e,t,n){e.dispatchEvent(new CustomEvent(xs(t),{detail:n}))}function Ss(e,t){let o=Object.entries(t).map(([r,a])=>{let s=xs(r),l=c=>a(c.detail);return e.addEventListener(s,l),[s,l]});return()=>{for(let[r,a]of o)e.removeEventListener(r,a)}}function pt(){let e=Date.now(),t=new Uint8Array(16);t[0]=Math.floor(e/2**40)&255,t[1]=Math.floor(e/2**32)&255,t[2]=e>>>24&255,t[3]=e>>>16&255,t[4]=e>>>8&255,t[5]=e&255,W_(t.subarray(6)),t[6]=t[6]&15|112,t[8]=t[8]&63|128;let n=Array.from(t,o=>o.toString(16).padStart(2,"0")).join("");return`${n.slice(0,8)}-${n.slice(8,12)}-${n.slice(12,16)}-${n.slice(16,20)}-${n.slice(20)}`}function W_(e){if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"){crypto.getRandomValues(e);return}for(let t=0;t<e.length;t++)e[t]=Math.floor(Math.random()*256)}var jt=Z.scope("persistence");function Cn(e,t=Uo,n){let o=n?`${e}.${n}`:e,r=`${T.cssPrefix}.storageVersion`,a=t.get(r)??void 0,s=a?`.v${a}`:"",l=`${T.cssPrefix}.${o}${s}`,c=`${T.cssPrefix}${s}.visitorId`,d=`${l}.conversationId`,_=`${l}.userPrefs`,p=`${l}.panelOpen`,u=`${l}.panelSize`,m=`${l}.calloutDismissed`,g=`${l}.sidebarCollapsed`,P=`${l}.activeModule`,y=`${l}.historyCount`,w=`${l}.formsDone`,S={getVisitorId(){let h=t.get(c);if(h)return h;let b=pt();return t.set(c,b),b},loadConversationId(){return t.get(d)??void 0},saveConversationId(h){jt.trace("saveConversationId",{id:h,scope:o}),h?t.set(d,h):t.remove(d)},loadDraft(h){return t.get(`${l}.draft.${h}`)??""},saveDraft(h,b){let x=`${l}.draft.${h}`;b?t.set(x,b):t.remove(x)},loadMessageQueue(h){let b=t.get(`${l}.messageQueue.${h}`);if(!b)return[];try{let x=JSON.parse(b);return!Array.isArray(x)||!x.every(K_)?[]:x}catch(x){return jt.warn("loadMessageQueue parse failed",{error:x}),[]}},saveMessageQueue(h,b){let x=`${l}.messageQueue.${h}`;if(b.length===0){t.remove(x);return}try{t.set(x,JSON.stringify(b))}catch(k){jt.warn("saveMessageQueue serialise failed",{error:k})}},loadUserPrefs(){let h=t.get(_);if(!h)return{};try{return Ra(JSON.parse(h))}catch(b){return jt.warn("loadUserPrefs parse failed",{error:b}),{}}},saveUserPrefs(h){try{t.set(_,JSON.stringify(h))}catch(b){jt.warn("saveUserPrefs serialise failed",{error:b})}},patchUserPrefs(h){let b=S.loadUserPrefs();S.saveUserPrefs({...b,...h})},loadPanelOpen(){let h=t.get(p);return h==="1"?!0:h==="0"?!1:null},savePanelOpen(h){t.set(p,h?"1":"0")},loadPanelSize(){let h=t.get(u);return h==="normal"||h==="expanded"||h==="fullscreen"?h:null},savePanelSize(h){t.set(u,h)},loadCalloutDismissed(h){if(!h)return!1;let b=t.get(m);return!!b&&b===h},saveCalloutDismissed(h){h?t.set(m,h):t.remove(m)},loadSidebarCollapsed(){let h=t.get(g);return h==="1"?!0:h==="0"?!1:null},saveSidebarCollapsed(h){t.set(g,h?"1":"0")},loadActiveModule(){return t.get(P)||null},saveActiveModule(h){t.set(P,h)},loadHistoryCount(){let h=t.get(y);if(!h)return null;let b=Number.parseInt(h,10);return Number.isFinite(b)&&b>=0?b:null},saveHistoryCount(h){t.set(y,String(h))},loadFormsDone(){let h=t.get(w);if(!h)return{};try{let b=JSON.parse(h);return Wo(b)?Object.fromEntries(Object.entries(b).filter(x=>typeof x[1]=="number")):{}}catch(b){return jt.warn("loadFormsDone parse failed",{error:b}),{}}},saveFormDone(h){try{let b=S.loadFormsDone();b[h]=Date.now(),t.set(w,JSON.stringify(b))}catch(b){jt.warn("saveFormDone serialise failed",{error:b})}},rememberStorageVersion(h){h&&h!==t.get(r)&&(jt.debug("rememberStorageVersion (force-reset on next load)",{version:h}),t.set(r,h))},clearConversation(){t.remove(d)}};return S}function Wo(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function K_(e){return Wo(e)&&typeof e.id=="string"&&e.id.length>0&&typeof e.text=="string"}function Ra(e){if(!Wo(e))return{};let t={};return typeof e.locale=="string"&&(t.locale=e.locale),typeof e.soundMuted=="boolean"&&(t.soundMuted=e.soundMuted),(e.themeMode==="auto"||e.themeMode==="light"||e.themeMode==="dark")&&(t.themeMode=e.themeMode),(e.textSize==="small"||e.textSize==="normal"||e.textSize==="large")&&(t.textSize=e.textSize),Wo(e.widgetSize)&&typeof e.widgetSize.width=="number"&&typeof e.widgetSize.height=="number"&&(t.widgetSize={width:e.widgetSize.width,height:e.widgetSize.height}),t}var ks=`:host{--__P__-accent-user: __BRAND_ACCENT__;--__P__-accent: var(--__P__-accent-user);--__P__-accent-text-user: __BRAND_ACCENT_TEXT__;--__P__-accent-text: var(--__P__-accent-text-user);--__P__-accent-fg: var(--__P__-accent);--__P__-radius: __BRAND_RADIUS__;--__P__-radius-sm: 8px;--__P__-radius-md: 10px;--__P__-radius-lg: 16px;--__P__-font: __BRAND_FONT__;--__P__-font-display: var(--__P__-font);--__P__-font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;--__P__-bg: oklch(1 0 0);--__P__-bg-elevated: oklch(.9789 .0029 278.3);--__P__-surface: var(--__P__-bg-elevated);--__P__-muted: var(--__P__-fg-muted);--__P__-hover: oklch(.1686 .011 278.3 / .06);--__P__-fg: oklch(.1686 .011 278.3);--__P__-fg-muted: oklch(.4932 .0301 278.3);--__P__-border: oklch(.9312 .0084 278.3);--__P__-border-strong: oklch(.8757 .0131 278.3);--__P__-bubble-user: var(--__P__-accent);--__P__-bubble-user-text: var(--__P__-accent-text);--__P__-bubble-assistant: oklch(.9638 .0058 278.3);--__P__-bubble-assistant-text: var(--__P__-fg);--__P__-on-accent: var(--__P__-accent-text);--__P__-success: oklch(.6456 .1654 151.53);--__P__-warning: oklch(.7135 .1494 74.05);--__P__-danger: oklch(.5966 .1818 24.51);--__P__-danger-text: oklch(.5054 .1905 27.52);--__P__-danger-bg: oklch(.5966 .1818 24.51 / .1);--__P__-neutral: oklch(.7137 .0192 278.3);--__P__-pill-l-min: .3;--__P__-pill-l-max: .46;--__P__-focus: var(--__P__-accent);--__P__-shadow-panel: 0 8px 24px -8px rgba(13, 15, 20, .18), 0 24px 64px -24px rgba(13, 15, 20, .24);--__P__-shadow-card: 0 1px 2px rgba(13, 15, 20, .06), 0 4px 12px -6px rgba(13, 15, 20, .12);--__P__-backdrop: oklch(.1686 .011 278.3 / .55);--__P__-shadow-fab: 0 6px 16px -4px color-mix(in oklch, var(--__P__-accent) 45%, transparent), 0 12px 32px -12px rgba(13, 15, 20, .25);--__P__-z-fab: 2147483600;--__P__-z-panel: 2147483601;--__P__-panel-w: 380px;--__P__-panel-h: 600px;--__P__-fab-size: 56px;--__P__-conversation-max: 768px;--__P__-space-1: 4px;--__P__-space-2: 8px;--__P__-space-3: 12px;--__P__-space-4: 16px;--__P__-space-5: 20px;--__P__-space-6: 24px;--__P__-space-8: 32px;--__P__-text-scale: 1;--__P__-text-xs: calc(12px * var(--__P__-text-scale));--__P__-text-sm: calc(13px * var(--__P__-text-scale));--__P__-text-base: calc(15px * var(--__P__-text-scale));--__P__-text-md: calc(16px * var(--__P__-text-scale));--__P__-text-lg: calc(18px * var(--__P__-text-scale));--__P__-text-xl: calc(22px * var(--__P__-text-scale));--__P__-text-2xl: calc(30px * var(--__P__-text-scale))}:host([data-mode="modal"]),:host([data-mode="drawer"]){--__P__-conversation-max: 100%}:host([data-text-size="small"]){--__P__-text-scale: .9}:host([data-text-size="large"]){--__P__-text-scale: 1.15}:host{--__P__-ease: cubic-bezier(.2, .7, .2, 1);--__P__-ease-out: cubic-bezier(.2, .7, .2, 1);--__P__-ease-in: cubic-bezier(.4, 0, 1, 1);--__P__-ease-in-out: cubic-bezier(.65, 0, .35, 1);--__P__-dur-quick: .12s;--__P__-dur-base: .22s;--__P__-dur-slow: .32s;font-family:var(--__P__-font);color:var(--__P__-fg);color-scheme:light;--__P__-color-scheme: light}:host([data-theme="dark"]){--__P__-bg: oklch(.1783 .0128 278.3);--__P__-bg-elevated: oklch(.2232 .0182 278.3);--__P__-fg: oklch(.9368 .01 278.3);--__P__-fg-muted: oklch(.7048 .0296 278.3);--__P__-border: oklch(.2752 .0266 278.3);--__P__-border-strong: oklch(.335 .0291 278.3);--__P__-hover: oklch(.9368 .01 278.3 / .08);--__P__-bubble-assistant: oklch(.2474 .0311 278.3);--__P__-bubble-assistant-text: var(--__P__-fg);--__P__-danger-text: oklch(.8077 .1035 19.57);--__P__-danger-bg: oklch(.5966 .1818 24.51 / .18);--__P__-shadow-panel: 0 8px 24px -8px rgba(0, 0, 0, .6), 0 24px 64px -24px rgba(0, 0, 0, .7);--__P__-shadow-card: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 12px -6px rgba(0, 0, 0, .5);--__P__-backdrop: rgba(0, 0, 0, .65);--__P__-pill-l-min: .75;--__P__-pill-l-max: .92;color-scheme:dark;--__P__-color-scheme: dark}@media(prefers-color-scheme:dark){:host([data-theme="auto"]){--__P__-bg: oklch(.1783 .0128 278.3);--__P__-bg-elevated: oklch(.2232 .0182 278.3);--__P__-fg: oklch(.9368 .01 278.3);--__P__-fg-muted: oklch(.7048 .0296 278.3);--__P__-border: oklch(.2752 .0266 278.3);--__P__-border-strong: oklch(.335 .0291 278.3);--__P__-hover: oklch(.9368 .01 278.3 / .08);--__P__-bubble-assistant: oklch(.2474 .0311 278.3);--__P__-bubble-assistant-text: var(--__P__-fg);--__P__-pill-l-min: .75;--__P__-pill-l-max: .92;--__P__-shadow-panel: 0 8px 24px -8px rgba(0, 0, 0, .6), 0 24px 64px -24px rgba(0, 0, 0, .7);color-scheme:dark;--__P__-color-scheme: dark}}@supports (color: oklch(from red l c h)){:host{--__P__-accent: oklch(from var(--__P__-accent-user) clamp(.3, l, .62) c h);--__P__-accent-text: oklch(from var(--__P__-accent) clamp(0, (l / .623 - 1) * -infinity, 1) 0 h);--__P__-accent-fg: oklch(from var(--__P__-accent-user) clamp(.3, l, .46) c h)}:host([data-theme="dark"]){--__P__-accent: oklch(from var(--__P__-accent-user) clamp(.65, l, .85) c h);--__P__-accent-fg: var(--__P__-accent)}@media(prefers-color-scheme:dark){:host([data-theme="auto"]){--__P__-accent: oklch(from var(--__P__-accent-user) clamp(.65, l, .85) c h);--__P__-accent-fg: var(--__P__-accent)}}}@media(prefers-reduced-motion:reduce){:host{--__P__-dur-quick: 1ms;--__P__-dur-base: 1ms;--__P__-dur-slow: 1ms}}
|
|
1
|
+
var Xu=Object.defineProperty;var Yu=(e,t,n)=>t in e?Xu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ce=(e,t,n)=>Yu(e,typeof t!="symbol"?t+"":t,n);var $o,J,ji,ca,Gt,Vi,Qi,Xi,ia,Mo,Qn,Yi,da,sa,la,Ju,Oo={},No=[],Zu=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Xn=Array.isArray;function Ot(e,t){for(var n in t)e[n]=t[n];return e}function ua(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Nt(e,t,n){var o,r,a,s={};for(a in t)a=="key"?o=t[a]:a=="ref"?r=t[a]:s[a]=t[a];if(arguments.length>2&&(s.children=arguments.length>3?$o.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)s[a]===void 0&&(s[a]=e.defaultProps[a]);return Lo(e,s,o,r,null)}function Lo(e,t,n,o,r){var a={type:e,props:t,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:r??++ji,__i:-1,__u:0};return r==null&&J.vnode!=null&&J.vnode(a),a}function fe(e){return e.children}function _t(e,t){this.props=e,this.context=t}function nn(e,t){if(t==null)return e.__?nn(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?nn(e):null}function e_(e){if(e.__P&&e.__d){var t=e.__v,n=t.__e,o=[],r=[],a=Ot({},t);a.__v=t.__v+1,J.vnode&&J.vnode(a),_a(e.__P,a,t,e.__n,e.__P.namespaceURI,32&t.__u?[n]:null,o,n??nn(t),!!(32&t.__u),r),a.__v=t.__v,a.__.__k[a.__i]=a,ns(o,a,r),t.__e=t.__=null,a.__e!=n&&Ji(a)}}function Ji(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),Ji(e)}function Wi(e){(!e.__d&&(e.__d=!0)&&Gt.push(e)&&!Do.__r++||Vi!=J.debounceRendering)&&((Vi=J.debounceRendering)||Qi)(Do)}function Do(){try{for(var e,t=1;Gt.length;)Gt.length>t&&Gt.sort(Xi),e=Gt.shift(),t=Gt.length,e_(e)}finally{Gt.length=Do.__r=0}}function Zi(e,t,n,o,r,a,s,l,c,d,_){var p,u,m,g,P,y,w=o&&o.__k||No,S=t.length;for(c=t_(n,t,w,c,S),p=0;p<S;p++)(m=n.__k[p])!=null&&(u=m.__i!=-1&&w[m.__i]||Oo,m.__i=p,y=_a(e,m,u,r,a,s,l,c,d,_),g=m.__e,m.ref&&u.ref!=m.ref&&(u.ref&&pa(u.ref,null,m),_.push(m.ref,m.__c||g,m)),P==null&&g!=null&&(P=g),4&m.__u?(c=es(m,c,e),u.__e&&(u.__e=null)):typeof m.type=="function"&&y!==void 0?c=y:g&&(c=g.nextSibling),m.__u&=-7);return n.__e=P,c}function t_(e,t,n,o,r){var a,s,l,c,d,_=n.length,p=_,u=0;for(e.__k=new Array(r),a=0;a<r;a++)(s=t[a])!=null&&typeof s!="boolean"&&typeof s!="function"?(typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?s=e.__k[a]=Lo(null,s,null,null,null):Xn(s)?s=e.__k[a]=Lo(fe,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=e.__k[a]=Lo(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):e.__k[a]=s,c=a+u,s.__=e,s.__b=e.__b+1,l=null,(d=s.__i=n_(s,n,c,p))!=-1&&(p--,(l=n[d])&&(l.__u|=2)),l==null||l.__v==null?(d==-1&&(r>_?u--:r<_&&u++),typeof s.type!="function"&&(s.__u|=4)):d!=c&&(d==c-1?u--:d==c+1?u++:(d>c?u--:u++,s.__u|=4))):e.__k[a]=null;if(p)for(a=0;a<_;a++)(l=n[a])!=null&&(2&l.__u)==0&&(l.__e==o&&(o=nn(l)),rs(l,l));return o}function es(e,t,n){var o,r;if(typeof e.type=="function"){for(o=e.__k,r=0;o&&r<o.length;r++)o[r]&&(o[r].__=e,t=es(o[r],t,n));return t}e.__e!=t&&(t&&e.type&&!t.parentNode&&(t=nn(e)),t=n.insertBefore(e.__e,t||null));do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Yn(e,t){return t=t||[],e==null||typeof e=="boolean"||(Xn(e)?e.some(function(n){Yn(n,t)}):t.push(e)),t}function n_(e,t,n,o){var r,a,s,l=e.key,c=e.type,d=t[n],_=d!=null&&(2&d.__u)==0;if(d===null&&l==null||_&&l==d.key&&c==d.type)return n;if(o>(_?1:0)){for(r=n-1,a=n+1;r>=0||a<t.length;)if((d=t[s=r>=0?r--:a++])!=null&&(2&d.__u)==0&&l==d.key&&c==d.type)return s}return-1}function Ki(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||Zu.test(t)?n:n+"px"}function Ao(e,t,n,o,r){var a,s;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof o=="string"&&(e.style.cssText=o=""),o)for(t in o)n&&t in n||Ki(e.style,t,"");if(n)for(t in n)o&&n[t]==o[t]||Ki(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")a=t!=(t=t.replace(Yi,"$1")),s=t.toLowerCase(),t=s in e||t=="onFocusOut"||t=="onFocusIn"?s.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=n,n?o?n[Qn]=o[Qn]:(n[Qn]=da,e.addEventListener(t,a?la:sa,a)):e.removeEventListener(t,a?la:sa,a);else{if(r=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function Gi(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t[Mo]==null)t[Mo]=da++;else if(t[Mo]<n[Qn])return;return n(J.event?J.event(t):t)}}}function _a(e,t,n,o,r,a,s,l,c,d){var _,p,u,m,g,P,y,w,S,h,b,x,k,E,G,H,A=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),a=[l=t.__e=n.__e]),(_=J.__b)&&_(t);e:if(typeof A=="function"){p=s.length;try{if(S=t.props,h=A.prototype&&A.prototype.render,b=(_=A.contextType)&&o[_.__c],x=_?b?b.props.value:_.__:o,n.__c?w=(u=t.__c=n.__c).__=u.__E:(h?t.__c=u=new A(S,x):(t.__c=u=new _t(S,x),u.constructor=A,u.render=r_),b&&b.sub(u),u.state||(u.state={}),u.__n=o,m=u.__d=!0,u.__h=[],u._sb=[]),h&&u.__s==null&&(u.__s=u.state),h&&A.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=Ot({},u.__s)),Ot(u.__s,A.getDerivedStateFromProps(S,u.__s))),g=u.props,P=u.state,u.__v=t,m)h&&A.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),h&&u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(h&&A.getDerivedStateFromProps==null&&S!==g&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(S,x),t.__v==n.__v||!u.__e&&u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(S,u.__s,x)===!1){t.__v!=n.__v&&(u.props=S,u.state=u.__s,u.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(D){D&&(D.__=t)}),No.push.apply(u.__h,u._sb),u._sb=[],u.__h.length&&s.push(u),l=nn(n);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(S,u.__s,x),h&&u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(g,P,y)})}if(u.context=x,u.props=S,u.__P=e,u.__e=!1,k=J.__r,E=0,h)u.state=u.__s,u.__d=!1,k&&k(t),_=u.render(u.props,u.state,u.context),No.push.apply(u.__h,u._sb),u._sb=[];else do u.__d=!1,k&&k(t),_=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++E<25);u.state=u.__s,u.getChildContext!=null&&(o=Ot(Ot({},o),u.getChildContext())),h&&!m&&u.getSnapshotBeforeUpdate!=null&&(y=u.getSnapshotBeforeUpdate(g,P)),G=_!=null&&_.type===fe&&_.key==null?os(_.props.children):_,l=Zi(e,Xn(G)?G:[G],t,n,o,r,a,s,l,c,d),u.base=t.__e,t.__u&=-161,u.__h.length&&s.push(u),w&&(u.__E=u.__=null)}catch(D){if(s.length=p,t.__v=null,c||a!=null){if(D.then){for(t.__u|=c?160:128;l&&l.nodeType==8&&l.nextSibling;)l=l.nextSibling;a!=null&&(a[a.indexOf(l)]=null),t.__e=l}else if(a!=null)for(H=a.length;H--;)ua(a[H])}else t.__e=n.__e;t.__k==null&&(t.__k=n.__k||[]),D.then||ts(t),J.__e(D,t,n)}}else a==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):l=t.__e=o_(n.__e,t,n,o,r,a,s,c,d);return(_=J.diffed)&&_(t),128&t.__u?void 0:l}function ts(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(ts))}function ns(e,t,n){for(var o=0;o<n.length;o++)pa(n[o],n[++o],n[++o]);J.__c&&J.__c(t,e),e.some(function(r){try{e=r.__h,r.__h=[],e.some(function(a){a.call(r)})}catch(a){J.__e(a,r.__v)}})}function os(e){return typeof e!="object"||e==null||e.__b>0?e:Xn(e)?e.map(os):e.constructor!==void 0?null:Ot({},e)}function o_(e,t,n,o,r,a,s,l,c){var d,_,p,u,m,g,P,y=n.props||Oo,w=t.props,S=t.type;if(S=="svg"?r="http://www.w3.org/2000/svg":S=="math"?r="http://www.w3.org/1998/Math/MathML":r||(r="http://www.w3.org/1999/xhtml"),a!=null){for(d=0;d<a.length;d++)if((m=a[d])&&"setAttribute"in m==!!S&&(S?m.localName==S:m.nodeType==3)){e=m,a[d]=null;break}}if(e==null){if(S==null)return document.createTextNode(w);e=document.createElementNS(r,S,w.is&&w),l&&(J.__m&&J.__m(t,a),l=!1),a=null}if(S==null)y===w||l&&e.data==w||(e.data=w);else{if(a=S=="textarea"&&w.defaultValue!=null?null:a&&$o.call(e.childNodes),!l&&a!=null)for(y={},d=0;d<e.attributes.length;d++)y[(m=e.attributes[d]).name]=m.value;for(d in y)m=y[d],d=="dangerouslySetInnerHTML"?p=m:d=="children"||d in w||d=="value"&&"defaultValue"in w||d=="checked"&&"defaultChecked"in w||Ao(e,d,null,m,r);for(d in w)m=w[d],d=="children"?u=m:d=="dangerouslySetInnerHTML"?_=m:d=="value"?g=m:d=="checked"?P=m:l&&typeof m!="function"||y[d]===m||Ao(e,d,m,y[d],r);if(_)l||p&&(_.__html==p.__html||_.__html==e.innerHTML)||(e.innerHTML=_.__html),t.__k=[];else if(p&&(e.innerHTML=""),Zi(t.type=="template"?e.content:e,Xn(u)?u:[u],t,n,o,S=="foreignObject"?"http://www.w3.org/1999/xhtml":r,a,s,a?a[0]:n.__k&&nn(n,0),l,c),a!=null)for(d=a.length;d--;)ua(a[d]);l&&S!="textarea"||(d="value",S=="progress"&&g==null?e.removeAttribute("value"):g!=null&&(g!==e[d]||S=="progress"&&!g||S=="option"&&g!=y[d])&&Ao(e,d,g,y[d],r),d="checked",P!=null&&P!=e[d]&&Ao(e,d,P,y[d],r))}return e}function pa(e,t,n){try{if(typeof e=="function"){var o=typeof e.__u=="function";o&&e.__u(),o&&t==null||(e.__u=e(t))}else e.current=t}catch(r){J.__e(r,n)}}function rs(e,t,n){var o,r;if(J.unmount&&J.unmount(e),(o=e.ref)&&(o.current&&o.current!=e.__e||pa(o,null,t)),(o=e.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(a){J.__e(a,t)}o.base=o.__P=o.__n=null}if(o=e.__k)for(r=0;r<o.length;r++)o[r]&&rs(o[r],t,n||typeof e.type!="function");n||ua(e.__e),e.__c=e.__=e.__e=void 0}function r_(e,t,n){return this.constructor(e,n)}function Jn(e,t,n){var o,r,a,s;t==document&&(t=document.documentElement),J.__&&J.__(e,t),r=(o=typeof n=="function")?null:n&&n.__k||t.__k,a=[],s=[],_a(t,e=(!o&&n||t).__k=Nt(fe,null,[e]),r||Oo,Oo,t.namespaceURI,!o&&n?[n]:r?null:t.firstChild?$o.call(t.childNodes):null,a,!o&&n?n:r?r.__e:t.firstChild,o,s),ns(a,e,s),e.props.children=null}$o=No.slice,J={__e:function(e,t,n,o){for(var r,a,s;t=t.__;)if((r=t.__c)&&!r.__)try{if((a=r.constructor)&&a.getDerivedStateFromError!=null&&(r.setState(a.getDerivedStateFromError(e)),s=r.__d),r.componentDidCatch!=null&&(r.componentDidCatch(e,o||{}),s=r.__d),s)return r.__E=r}catch(l){e=l}throw e}},ji=0,ca=function(e){return e!=null&&e.constructor===void 0},_t.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Ot({},this.state),typeof e=="function"&&(e=e(Ot({},n),this.props)),e&&Ot(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Wi(this))},_t.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Wi(this))},_t.prototype.render=fe,Gt=[],Qi=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Xi=function(e,t){return e.__v.__b-t.__v.__b},Do.__r=0,ia=Math.random().toString(8),Mo="__d"+ia,Qn="__a"+ia,Yi=/(PointerCapture)$|Capture$/i,da=0,sa=Gi(!1),la=Gi(!0),Ju=0;var T={id:"help-ai",name:"@helpai/elements",global:"HelpAI",tagName:"web-ai-chat",cssPrefix:"helpai",defaultBaseUrl:"https://help.ai",displayName:"Help AI",domain:"help.ai",siteUrl:"https://help.ai"};var xn="1.3.16";var as={attach:"Attach files",attachmentMimeRejected:"File type not supported",attachmentTooLarge:"File is too large",attachmentTooMany:"Attachment limit reached",conversationClosed:"This chat is closed",conversationLoading:"Loading chat\u2026",loadPreviousMessages:"Load previous messages",close:"Close",collapse:"Collapse",collapseSidebar:"Collapse sidebar",composerPlaceholder:"Type a message\u2026",dateLastWeek:"Last 7 days",dateOlder:"Older",dateToday:"Today",dateYesterday:"Yesterday",dropZone:"Drop files to attach",errorGeneric:"Something went wrong",errorRateLimited:"Too many requests \u2014 please try again in a moment.",errorRetry:"Retry",expand:"Expand",expandSidebar:"Expand sidebar",exitFullscreen:"Exit fullscreen",fullscreen:"Fullscreen",history:"History",historyBack:"Back to chat",historyEmpty:"No previous chats yet",historyLoading:"Loading your chats\u2026",historyContinue:"Continue the chat",historyTitle:"Chat history",loadMoreConversations:"Load more conversations",language:"Language",launcherOpen:"Open chat",launcherLabel:"Chat with us",micStart:"Start voice input",micStop:"Stop voice input",micUnsupported:"Voice input is not supported in this browser",moreActions:"More actions",newConversation:"New chat",panelTitle:"Chat",popOut:"Open in new tab",resizeHandle:"Drag to resize",scrollToBottom:"Scroll to latest",send:"Send",queueMessage:"Queue message",removeQueuedMessage:"Remove queued message",compactingContext:"Optimizing conversation context\u2026",soundOff:"Sound off",soundOn:"Sound on",startNewConversation:"Start a new chat",talkToOperator:"Talk to an operator",connectingOperator:"Connecting you to an operator\u2026",noOperatorAvailable:"No one's available right now \u2014 leave your details and we'll follow up.",chattingWithOperator:"You're chatting with {operator}",cancelOperatorRequest:"Keep chatting with the AI",stop:"Stop",theme:"Theme",themeAuto:"Auto",themeDark:"Dark",themeLight:"Light",textSize:"Text size",textSizeSmall:"Small",textSizeNormal:"Normal",textSizeLarge:"Large",loading:"Loading\u2026",thinking:"Thinking\u2026",thoughts:"Thoughts",toolResult:"Result",sources:"Sources",feedbackUp:"Good response",feedbackDown:"Bad response",feedbackThanks:"Thanks for your feedback",copy:"Copy",copied:"Copied",tabHome:"Home",tabConversations:"Chats",tabHelp:"Help",tabNews:"News",modulesEmpty:"Nothing here yet",moduleBack:"Back",contentLoading:"Loading\u2026",homeGreeting:"How can we help?",homeGreetingNamed:"Hi {name} \u{1F44B}",homeGreetingLead:"How can we help?",homeSearchPlaceholder:"Search for help",homeContentTitle:"Popular articles",homeStatus:"Status",helpTitle:"Help",helpSearchPlaceholder:"Search for help",helpEmpty:"No help articles yet",helpLoading:"Loading help\u2026",helpSearchEmpty:"No results found",newsTitle:"News",newsEmpty:"No news yet",newsLoading:"Loading news\u2026",newsBack:"Back to news",newsPublishedAt:"Published {date}",formSubmit:"Submit",formSkip:"Maybe later",formSubmitted:"Completed",formSkipped:"Maybe later",formFillOut:"Fill out",formRequired:"This field is required",formInvalidEmail:"Enter a valid email address",formInvalidTel:"Enter a valid phone number",formInvalidUrl:"Enter a valid URL",formInvalidNumber:"Enter a valid number",formTooShort:"Too short (min {min} characters)",formTooLong:"Too long (max {max} characters)",formNumberTooSmall:"Must be at least {min}",formNumberTooLarge:"Must be at most {max}",formPatternMismatch:"Please match the requested format",formChooseAtLeast:"Choose at least {min}",formChooseAtMost:"Choose at most {max}",formOther:"Other",formOtherPlaceholder:"Type your answer\u2026",inputRequired:"Questions for you",inputBadge:"Questions",inputAnswered:"Answered",inputSkipped:"Skipped",showOptions:"Show options",hideOptions:"Hide options",qtypeText:"Your answer",qtypeEmail:"Email address",qtypePhone:"Phone number",qtypeNumber:"Number",qtypeDate:"Date",qtypeChooseOne:"Pick one",qtypeChooseAny:"Pick any",qtypeBoolean:"Yes / No",inputSubmit:"Submit answers",inputSubmitHint:"Enter to send \xB7 Shift+Enter = new line",inputSkip:"Skip",confirmYes:"Yes",confirmNo:"No",approve:"Approve",reject:"Reject",approvalPrompt:"{tool} requires your approval to execute.",approvalBody:"Review the tool input above and decide whether to allow this action.",approvalYourResponse:"Your response: {decision}",approvalEditHint:"You can edit this response until this step continues.",approvalSubmitting:"Response submitted. Request in progress\u2026",edit:"Edit",toolParameters:"Parameters",statusAwaiting:"Awaiting Approval",statusResponded:"Submitted",statusRunning:"Running",statusCompleted:"Completed",statusDenied:"Denied",statusError:"Error",statusSuperseded:"Skipped"},a_={attach:"Joindre des fichiers",attachmentMimeRejected:"Type de fichier non pris en charge",attachmentTooLarge:"Le fichier est trop volumineux",attachmentTooMany:"Limite de pi\xE8ces jointes atteinte",conversationClosed:"Ce chat est ferm\xE9",conversationLoading:"Chargement du chat\u2026",loadPreviousMessages:"Charger les messages pr\xE9c\xE9dents",close:"Fermer",collapse:"R\xE9duire",collapseSidebar:"R\xE9duire la barre lat\xE9rale",composerPlaceholder:"\xC9crivez un message\u2026",dateLastWeek:"7 derniers jours",dateOlder:"Plus ancien",dateToday:"Aujourd'hui",dateYesterday:"Hier",dropZone:"D\xE9posez les fichiers \xE0 joindre",errorGeneric:"Une erreur s'est produite",errorRateLimited:"Trop de requ\xEAtes \u2014 veuillez r\xE9essayer dans un instant.",errorRetry:"R\xE9essayer",expand:"Agrandir",expandSidebar:"D\xE9velopper la barre lat\xE9rale",exitFullscreen:"Quitter le plein \xE9cran",fullscreen:"Plein \xE9cran",history:"Historique",historyBack:"Retour au chat",historyEmpty:"Aucun chat pour le moment",historyContinue:"Poursuivre le chat",historyLoading:"Chargement de vos chats\u2026",historyTitle:"Historique des chats",loadMoreConversations:"Charger plus de conversations",language:"Langue",launcherOpen:"Ouvrir le chat",launcherLabel:"Discuter avec nous",micStart:"D\xE9marrer la saisie vocale",micStop:"Arr\xEAter la saisie vocale",micUnsupported:"La saisie vocale n'est pas prise en charge par ce navigateur",moreActions:"Plus d'actions",newConversation:"Nouveau chat",panelTitle:"Chat",popOut:"Ouvrir dans un nouvel onglet",resizeHandle:"Glisser pour redimensionner",scrollToBottom:"Aller au plus r\xE9cent",send:"Envoyer",queueMessage:"Mettre le message en attente",removeQueuedMessage:"Retirer le message en attente",compactingContext:"Optimisation du contexte de la conversation\u2026",soundOff:"Son d\xE9sactiv\xE9",soundOn:"Son activ\xE9",startNewConversation:"D\xE9marrer un nouveau chat",talkToOperator:"Parler \xE0 un op\xE9rateur",connectingOperator:"Mise en relation avec un op\xE9rateur\u2026",noOperatorAvailable:"Personne n'est disponible pour le moment \u2014 laissez vos coordonn\xE9es et nous reviendrons vers vous.",chattingWithOperator:"Vous discutez avec {operator}",cancelOperatorRequest:"Continuer avec l'IA",stop:"Arr\xEAter",theme:"Th\xE8me",themeAuto:"Auto",themeDark:"Sombre",themeLight:"Clair",textSize:"Taille du texte",textSizeSmall:"Petite",textSizeNormal:"Normale",textSizeLarge:"Grande",loading:"Chargement\u2026",thinking:"R\xE9flexion\u2026",thoughts:"R\xE9flexions",toolResult:"R\xE9sultat",sources:"Sources",feedbackUp:"Bonne r\xE9ponse",feedbackDown:"Mauvaise r\xE9ponse",feedbackThanks:"Merci pour votre retour",copy:"Copier",copied:"Copi\xE9",tabHome:"Accueil",tabConversations:"Chats",tabHelp:"Aide",tabNews:"Actualit\xE9s",modulesEmpty:"Rien pour le moment",moduleBack:"Retour",contentLoading:"Chargement\u2026",homeGreeting:"Comment pouvons-nous vous aider ?",homeGreetingNamed:"Bonjour {name} \u{1F44B}",homeGreetingLead:"Comment pouvons-nous vous aider ?",homeSearchPlaceholder:"Rechercher de l'aide",homeContentTitle:"Articles populaires",homeStatus:"Statut",helpTitle:"Aide",helpSearchPlaceholder:"Rechercher de l'aide",helpEmpty:"Aucun article d'aide pour le moment",helpLoading:"Chargement de l'aide\u2026",helpSearchEmpty:"Aucun r\xE9sultat trouv\xE9",newsTitle:"Actualit\xE9s",newsEmpty:"Aucune actualit\xE9 pour le moment",newsLoading:"Chargement des actualit\xE9s\u2026",newsBack:"Retour aux actualit\xE9s",newsPublishedAt:"Publi\xE9 le {date}",formSubmit:"Envoyer",formSkip:"Plus tard",formSubmitted:"Termin\xE9",formSkipped:"Plus tard",formFillOut:"Remplir",formRequired:"Ce champ est obligatoire",formInvalidEmail:"Saisissez une adresse e-mail valide",formInvalidTel:"Saisissez un num\xE9ro de t\xE9l\xE9phone valide",formInvalidUrl:"Saisissez une URL valide",formInvalidNumber:"Saisissez un nombre valide",formTooShort:"Trop court (min. {min} caract\xE8res)",formTooLong:"Trop long (max. {max} caract\xE8res)",formNumberTooSmall:"Doit \xEAtre au moins {min}",formNumberTooLarge:"Doit \xEAtre au plus {max}",formPatternMismatch:"Veuillez respecter le format demand\xE9",formChooseAtLeast:"Choisissez au moins {min}",formChooseAtMost:"Choisissez au plus {max}",formOther:"Autre",formOtherPlaceholder:"Saisissez votre r\xE9ponse\u2026",inputRequired:"Questions pour vous",inputBadge:"Questions",inputAnswered:"R\xE9pondu",inputSkipped:"Ignor\xE9",showOptions:"Afficher les options",hideOptions:"Masquer les options",qtypeText:"Votre r\xE9ponse",qtypeEmail:"Adresse e-mail",qtypePhone:"Num\xE9ro de t\xE9l\xE9phone",qtypeNumber:"Nombre",qtypeDate:"Date",qtypeChooseOne:"Choisir une",qtypeChooseAny:"Choisir plusieurs",qtypeBoolean:"Oui / Non",inputSubmit:"Envoyer les r\xE9ponses",inputSubmitHint:"Entr\xE9e pour envoyer \xB7 Maj+Entr\xE9e = saut de ligne",inputSkip:"Ignorer",confirmYes:"Oui",confirmNo:"Non",approve:"Approuver",reject:"Refuser",approvalPrompt:"{tool} n\xE9cessite votre approbation pour s'ex\xE9cuter.",approvalBody:"V\xE9rifiez les param\xE8tres ci-dessus et d\xE9cidez d'autoriser ou non cette action.",approvalYourResponse:"Votre r\xE9ponse : {decision}",approvalEditHint:"Vous pouvez modifier votre r\xE9ponse jusqu'\xE0 la reprise de cette \xE9tape.",approvalSubmitting:"R\xE9ponse envoy\xE9e. Traitement en cours\u2026",edit:"Modifier",toolParameters:"Param\xE8tres",statusAwaiting:"En attente d'approbation",statusResponded:"Envoy\xE9",statusRunning:"En cours",statusCompleted:"Termin\xE9",statusDenied:"Refus\xE9",statusError:"Erreur",statusSuperseded:"Ignor\xE9"},i_={attach:"\u0625\u0631\u0641\u0627\u0642 \u0645\u0644\u0641\u0627\u062A",attachmentMimeRejected:"\u0646\u0648\u0639 \u0627\u0644\u0645\u0644\u0641 \u063A\u064A\u0631 \u0645\u062F\u0639\u0648\u0645",attachmentTooLarge:"\u062D\u062C\u0645 \u0627\u0644\u0645\u0644\u0641 \u0643\u0628\u064A\u0631 \u062C\u062F\u064B\u0627",attachmentTooMany:"\u062A\u0645 \u0628\u0644\u0648\u063A \u0627\u0644\u062D\u062F \u0627\u0644\u0623\u0642\u0635\u0649 \u0644\u0644\u0645\u0631\u0641\u0642\u0627\u062A",conversationClosed:"\u062A\u0645 \u0625\u063A\u0644\u0627\u0642 \u0647\u0630\u0647 \u0627\u0644\u062F\u0631\u062F\u0634\u0629",conversationLoading:"\u062C\u0627\u0631\u064D \u062A\u062D\u0645\u064A\u0644 \u0627\u0644\u062F\u0631\u062F\u0634\u0629\u2026",loadPreviousMessages:"\u062A\u062D\u0645\u064A\u0644 \u0627\u0644\u0631\u0633\u0627\u0626\u0644 \u0627\u0644\u0633\u0627\u0628\u0642\u0629",close:"\u0625\u063A\u0644\u0627\u0642",collapse:"\u0637\u064A\u0651",collapseSidebar:"\u0637\u064A\u0651 \u0627\u0644\u0634\u0631\u064A\u0637 \u0627\u0644\u062C\u0627\u0646\u0628\u064A",composerPlaceholder:"\u0627\u0643\u062A\u0628 \u0631\u0633\u0627\u0644\u0629\u2026",dateLastWeek:"\u0622\u062E\u0631 \u0667 \u0623\u064A\u0627\u0645",dateOlder:"\u0623\u0642\u062F\u0645",dateToday:"\u0627\u0644\u064A\u0648\u0645",dateYesterday:"\u0623\u0645\u0633",dropZone:"\u0623\u0641\u0644\u062A \u0627\u0644\u0645\u0644\u0641\u0627\u062A \u0644\u0625\u0631\u0641\u0627\u0642\u0647\u0627",errorGeneric:"\u062D\u062F\u062B \u062E\u0637\u0623 \u0645\u0627",errorRateLimited:"\u0637\u0644\u0628\u0627\u062A \u0643\u062B\u064A\u0631\u0629 \u062C\u062F\u064B\u0627 \u2014 \u064A\u0631\u062C\u0649 \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629 \u0628\u0639\u062F \u0644\u062D\u0638\u0629.",errorRetry:"\u0625\u0639\u0627\u062F\u0629 \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629",expand:"\u062A\u0648\u0633\u064A\u0639",expandSidebar:"\u062A\u0648\u0633\u064A\u0639 \u0627\u0644\u0634\u0631\u064A\u0637 \u0627\u0644\u062C\u0627\u0646\u0628\u064A",exitFullscreen:"\u0625\u0646\u0647\u0627\u0621 \u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629",fullscreen:"\u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629",history:"\u0627\u0644\u0633\u062C\u0644",historyBack:"\u0627\u0644\u0639\u0648\u062F\u0629 \u0625\u0644\u0649 \u0627\u0644\u062F\u0631\u062F\u0634\u0629",historyEmpty:"\u0644\u0627 \u062A\u0648\u062C\u062F \u062F\u0631\u062F\u0634\u0627\u062A \u0633\u0627\u0628\u0642\u0629 \u0628\u0639\u062F",historyContinue:"\u0645\u062A\u0627\u0628\u0639\u0629 \u0627\u0644\u062F\u0631\u062F\u0634\u0629",historyLoading:"\u062C\u0627\u0631\u064D \u062A\u062D\u0645\u064A\u0644 \u062F\u0631\u062F\u0634\u0627\u062A\u0643\u2026",historyTitle:"\u0633\u062C\u0644 \u0627\u0644\u062F\u0631\u062F\u0634\u0627\u062A",loadMoreConversations:"\u062A\u062D\u0645\u064A\u0644 \u0627\u0644\u0645\u0632\u064A\u062F \u0645\u0646 \u0627\u0644\u0645\u062D\u0627\u062F\u062B\u0627\u062A",language:"\u0627\u0644\u0644\u063A\u0629",launcherOpen:"\u0641\u062A\u062D \u0627\u0644\u062F\u0631\u062F\u0634\u0629",launcherLabel:"\u062A\u062D\u062F\u062B \u0645\u0639\u0646\u0627",micStart:"\u0628\u062F\u0621 \u0627\u0644\u0625\u062F\u062E\u0627\u0644 \u0627\u0644\u0635\u0648\u062A\u064A",micStop:"\u0625\u064A\u0642\u0627\u0641 \u0627\u0644\u0625\u062F\u062E\u0627\u0644 \u0627\u0644\u0635\u0648\u062A\u064A",micUnsupported:"\u0627\u0644\u0625\u062F\u062E\u0627\u0644 \u0627\u0644\u0635\u0648\u062A\u064A \u063A\u064A\u0631 \u0645\u062F\u0639\u0648\u0645 \u0641\u064A \u0647\u0630\u0627 \u0627\u0644\u0645\u062A\u0635\u0641\u062D",moreActions:"\u0625\u062C\u0631\u0627\u0621\u0627\u062A \u0625\u0636\u0627\u0641\u064A\u0629",newConversation:"\u062F\u0631\u062F\u0634\u0629 \u062C\u062F\u064A\u062F\u0629",panelTitle:"\u0627\u0644\u062F\u0631\u062F\u0634\u0629",popOut:"\u0641\u062A\u062D \u0641\u064A \u0639\u0644\u0627\u0645\u0629 \u062A\u0628\u0648\u064A\u0628 \u062C\u062F\u064A\u062F\u0629",resizeHandle:"\u0627\u0633\u062D\u0628 \u0644\u062A\u063A\u064A\u064A\u0631 \u0627\u0644\u062D\u062C\u0645",scrollToBottom:"\u0627\u0644\u0627\u0646\u062A\u0642\u0627\u0644 \u0625\u0644\u0649 \u0627\u0644\u0623\u062D\u062F\u062B",send:"\u0625\u0631\u0633\u0627\u0644",queueMessage:"\u0625\u0636\u0627\u0641\u0629 \u0627\u0644\u0631\u0633\u0627\u0644\u0629 \u0625\u0644\u0649 \u0642\u0627\u0626\u0645\u0629 \u0627\u0644\u0627\u0646\u062A\u0638\u0627\u0631",removeQueuedMessage:"\u0625\u0632\u0627\u0644\u0629 \u0627\u0644\u0631\u0633\u0627\u0644\u0629 \u0645\u0646 \u0642\u0627\u0626\u0645\u0629 \u0627\u0644\u0627\u0646\u062A\u0638\u0627\u0631",compactingContext:"\u062C\u0627\u0631\u064D \u062A\u062D\u0633\u064A\u0646 \u0633\u064A\u0627\u0642 \u0627\u0644\u0645\u062D\u0627\u062F\u062B\u0629\u2026",soundOff:"\u0643\u062A\u0645 \u0627\u0644\u0635\u0648\u062A",soundOn:"\u062A\u0634\u063A\u064A\u0644 \u0627\u0644\u0635\u0648\u062A",startNewConversation:"\u0628\u062F\u0621 \u062F\u0631\u062F\u0634\u0629 \u062C\u062F\u064A\u062F\u0629",talkToOperator:"\u0627\u0644\u062A\u062D\u062F\u062B \u0625\u0644\u0649 \u0645\u0648\u0638\u0641",connectingOperator:"\u062C\u0627\u0631\u064A \u062A\u0648\u0635\u064A\u0644\u0643 \u0628\u0623\u062D\u062F \u0627\u0644\u0645\u0648\u0638\u0641\u064A\u0646\u2026",noOperatorAvailable:"\u0644\u0627 \u064A\u0648\u062C\u062F \u0645\u0648\u0638\u0641\u0648\u0646 \u0645\u062A\u0627\u062D\u0648\u0646 \u0627\u0644\u0622\u0646 \u2014 \u0627\u062A\u0631\u0643 \u0628\u064A\u0627\u0646\u0627\u062A\u0643 \u0648\u0633\u0646\u062A\u0648\u0627\u0635\u0644 \u0645\u0639\u0643.",chattingWithOperator:"\u0623\u0646\u062A \u062A\u062A\u062D\u062F\u062B \u0645\u0639 {operator}",cancelOperatorRequest:"\u0645\u062A\u0627\u0628\u0639\u0629 \u0627\u0644\u0645\u062D\u0627\u062F\u062B\u0629 \u0645\u0639 \u0627\u0644\u0630\u0643\u0627\u0621 \u0627\u0644\u0627\u0635\u0637\u0646\u0627\u0639\u064A",stop:"\u0625\u064A\u0642\u0627\u0641",theme:"\u0627\u0644\u0645\u0638\u0647\u0631",themeAuto:"\u062A\u0644\u0642\u0627\u0626\u064A",themeDark:"\u062F\u0627\u0643\u0646",themeLight:"\u0641\u0627\u062A\u062D",textSize:"\u062D\u062C\u0645 \u0627\u0644\u0646\u0635",textSizeSmall:"\u0635\u063A\u064A\u0631",textSizeNormal:"\u0639\u0627\u062F\u064A",textSizeLarge:"\u0643\u0628\u064A\u0631",loading:"\u062C\u0627\u0631\u064D \u0627\u0644\u062A\u062D\u0645\u064A\u0644\u2026",thinking:"\u064A\u0641\u0643\u0651\u0631\u2026",thoughts:"\u0627\u0644\u0623\u0641\u0643\u0627\u0631",toolResult:"\u0627\u0644\u0646\u062A\u064A\u062C\u0629",sources:"\u0627\u0644\u0645\u0635\u0627\u062F\u0631",feedbackUp:"\u0631\u062F \u062C\u064A\u062F",feedbackDown:"\u0631\u062F \u0633\u064A\u0626",feedbackThanks:"\u0634\u0643\u0631\u064B\u0627 \u0639\u0644\u0649 \u0645\u0644\u0627\u062D\u0638\u0627\u062A\u0643",copy:"\u0646\u0633\u062E",copied:"\u062A\u0645 \u0627\u0644\u0646\u0633\u062E",tabHome:"\u0627\u0644\u0631\u0626\u064A\u0633\u064A\u0629",tabConversations:"\u0627\u0644\u062F\u0631\u062F\u0634\u0627\u062A",tabHelp:"\u0627\u0644\u0645\u0633\u0627\u0639\u062F\u0629",tabNews:"\u0627\u0644\u0623\u062E\u0628\u0627\u0631",modulesEmpty:"\u0644\u0627 \u0634\u064A\u0621 \u0647\u0646\u0627 \u0628\u0639\u062F",moduleBack:"\u0631\u062C\u0648\u0639",contentLoading:"\u062C\u0627\u0631\u064D \u0627\u0644\u062A\u062D\u0645\u064A\u0644\u2026",homeGreeting:"\u0643\u064A\u0641 \u064A\u0645\u0643\u0646\u0646\u0627 \u0645\u0633\u0627\u0639\u062F\u062A\u0643\u061F",homeGreetingNamed:"\u0645\u0631\u062D\u0628\u064B\u0627 {name} \u{1F44B}",homeGreetingLead:"\u0643\u064A\u0641 \u064A\u0645\u0643\u0646\u0646\u0627 \u0645\u0633\u0627\u0639\u062F\u062A\u0643\u061F",homeSearchPlaceholder:"\u0627\u0628\u062D\u062B \u0639\u0646 \u0645\u0633\u0627\u0639\u062F\u0629",homeContentTitle:"\u0645\u0642\u0627\u0644\u0627\u062A \u0634\u0627\u0626\u0639\u0629",homeStatus:"\u0627\u0644\u062D\u0627\u0644\u0629",helpTitle:"\u0627\u0644\u0645\u0633\u0627\u0639\u062F\u0629",helpSearchPlaceholder:"\u0627\u0628\u062D\u062B \u0639\u0646 \u0645\u0633\u0627\u0639\u062F\u0629",helpEmpty:"\u0644\u0627 \u062A\u0648\u062C\u062F \u0645\u0642\u0627\u0644\u0627\u062A \u0645\u0633\u0627\u0639\u062F\u0629 \u0628\u0639\u062F",helpLoading:"\u062C\u0627\u0631\u064D \u062A\u062D\u0645\u064A\u0644 \u0627\u0644\u0645\u0633\u0627\u0639\u062F\u0629\u2026",helpSearchEmpty:"\u0644\u0627 \u062A\u0648\u062C\u062F \u0646\u062A\u0627\u0626\u062C",newsTitle:"\u0627\u0644\u0623\u062E\u0628\u0627\u0631",newsEmpty:"\u0644\u0627 \u062A\u0648\u062C\u062F \u0623\u062E\u0628\u0627\u0631 \u0628\u0639\u062F",newsLoading:"\u062C\u0627\u0631\u064D \u062A\u062D\u0645\u064A\u0644 \u0627\u0644\u0623\u062E\u0628\u0627\u0631\u2026",newsBack:"\u0627\u0644\u0639\u0648\u062F\u0629 \u0625\u0644\u0649 \u0627\u0644\u0623\u062E\u0628\u0627\u0631",newsPublishedAt:"\u0646\u064F\u0634\u0631 \u0641\u064A {date}",formSubmit:"\u0625\u0631\u0633\u0627\u0644",formSkip:"\u0644\u0627\u062D\u0642\u064B\u0627",formSubmitted:"\u062A\u0645",formSkipped:"\u0644\u0627\u062D\u0642\u064B\u0627",formFillOut:"\u062A\u0639\u0628\u0626\u0629",formRequired:"\u0647\u0630\u0627 \u0627\u0644\u062D\u0642\u0644 \u0645\u0637\u0644\u0648\u0628",formInvalidEmail:"\u0623\u062F\u062E\u0644 \u0628\u0631\u064A\u062F\u064B\u0627 \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A\u064B\u0627 \u0635\u062D\u064A\u062D\u064B\u0627",formInvalidTel:"\u0623\u062F\u062E\u0644 \u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0635\u062D\u064A\u062D\u064B\u0627",formInvalidUrl:"\u0623\u062F\u062E\u0644 \u0631\u0627\u0628\u0637\u064B\u0627 \u0635\u062D\u064A\u062D\u064B\u0627",formInvalidNumber:"\u0623\u062F\u062E\u0644 \u0631\u0642\u0645\u064B\u0627 \u0635\u062D\u064A\u062D\u064B\u0627",formTooShort:"\u0642\u0635\u064A\u0631 \u062C\u062F\u064B\u0627 (\u0627\u0644\u062D\u062F \u0627\u0644\u0623\u062F\u0646\u0649 {min} \u062D\u0631\u0641\u064B\u0627)",formTooLong:"\u0637\u0648\u064A\u0644 \u062C\u062F\u064B\u0627 (\u0627\u0644\u062D\u062F \u0627\u0644\u0623\u0642\u0635\u0649 {max} \u062D\u0631\u0641\u064B\u0627)",formNumberTooSmall:"\u064A\u062C\u0628 \u0623\u0644\u0627 \u064A\u0642\u0644 \u0639\u0646 {min}",formNumberTooLarge:"\u064A\u062C\u0628 \u0623\u0644\u0627 \u064A\u0632\u064A\u062F \u0639\u0646 {max}",formPatternMismatch:"\u064A\u0631\u062C\u0649 \u0645\u0637\u0627\u0628\u0642\u0629 \u0627\u0644\u0635\u064A\u063A\u0629 \u0627\u0644\u0645\u0637\u0644\u0648\u0628\u0629",formChooseAtLeast:"\u0627\u062E\u062A\u0631 {min} \u0639\u0644\u0649 \u0627\u0644\u0623\u0642\u0644",formChooseAtMost:"\u0627\u062E\u062A\u0631 {max} \u0639\u0644\u0649 \u0627\u0644\u0623\u0643\u062B\u0631",formOther:"\u0623\u062E\u0631\u0649",formOtherPlaceholder:"\u0627\u0643\u062A\u0628 \u0625\u062C\u0627\u0628\u062A\u0643\u2026",inputRequired:"\u0623\u0633\u0626\u0644\u0629 \u0644\u0643",inputBadge:"\u0623\u0633\u0626\u0644\u0629",inputAnswered:"\u062A\u0645\u062A \u0627\u0644\u0625\u062C\u0627\u0628\u0629",inputSkipped:"\u062A\u0645 \u0627\u0644\u062A\u062E\u0637\u064A",showOptions:"\u0625\u0638\u0647\u0627\u0631 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A",hideOptions:"\u0625\u062E\u0641\u0627\u0621 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A",qtypeText:"\u0625\u062C\u0627\u0628\u062A\u0643",qtypeEmail:"\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0628\u0631\u064A\u062F \u0627\u0644\u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",qtypePhone:"\u0631\u0642\u0645 \u0627\u0644\u0647\u0627\u062A\u0641",qtypeNumber:"\u0631\u0642\u0645",qtypeDate:"\u062A\u0627\u0631\u064A\u062E",qtypeChooseOne:"\u0627\u062E\u062A\u0631 \u0648\u0627\u062D\u062F\u064B\u0627",qtypeChooseAny:"\u0627\u062E\u062A\u0631 \u0623\u064A\u064B\u0627",qtypeBoolean:"\u0646\u0639\u0645 / \u0644\u0627",inputSubmit:"\u0625\u0631\u0633\u0627\u0644 \u0627\u0644\u0625\u062C\u0627\u0628\u0627\u062A",inputSubmitHint:"Enter \u0644\u0644\u0625\u0631\u0633\u0627\u0644 \xB7 Shift+Enter = \u0633\u0637\u0631 \u062C\u062F\u064A\u062F",inputSkip:"\u062A\u062E\u0637\u064D\u0651",confirmYes:"\u0646\u0639\u0645",confirmNo:"\u0644\u0627",approve:"\u0645\u0648\u0627\u0641\u0642\u0629",reject:"\u0631\u0641\u0636",approvalPrompt:"\u062A\u062A\u0637\u0644\u0628 {tool} \u0645\u0648\u0627\u0641\u0642\u062A\u0643 \u0644\u0644\u062A\u0646\u0641\u064A\u0630.",approvalBody:"\u0631\u0627\u062C\u0639 \u0645\u064F\u0639\u0637\u064A\u0627\u062A \u0627\u0644\u0623\u062F\u0627\u0629 \u0623\u0639\u0644\u0627\u0647 \u0648\u0642\u0631\u0651\u0631 \u0627\u0644\u0633\u0645\u0627\u062D \u0628\u0647\u0630\u0627 \u0627\u0644\u0625\u062C\u0631\u0627\u0621 \u0623\u0648 \u0631\u0641\u0636\u0647.",approvalYourResponse:"\u0631\u062F\u0651\u0643: {decision}",approvalEditHint:"\u064A\u0645\u0643\u0646\u0643 \u062A\u0639\u062F\u064A\u0644 \u0631\u062F\u0651\u0643 \u062D\u062A\u0649 \u062A\u0633\u062A\u0623\u0646\u0641 \u0647\u0630\u0647 \u0627\u0644\u062E\u0637\u0648\u0629.",approvalSubmitting:"\u062A\u0645 \u0625\u0631\u0633\u0627\u0644 \u0627\u0644\u0631\u062F. \u062C\u0627\u0631\u064D \u0627\u0644\u062A\u0646\u0641\u064A\u0630\u2026",edit:"\u062A\u0639\u062F\u064A\u0644",toolParameters:"\u0627\u0644\u0645\u0639\u0637\u064A\u0627\u062A",statusAwaiting:"\u0628\u0627\u0646\u062A\u0638\u0627\u0631 \u0627\u0644\u0645\u0648\u0627\u0641\u0642\u0629",statusResponded:"\u062A\u0645 \u0627\u0644\u0625\u0631\u0633\u0627\u0644",statusRunning:"\u0642\u064A\u062F \u0627\u0644\u062A\u0646\u0641\u064A\u0630",statusCompleted:"\u0645\u0643\u062A\u0645\u0644",statusDenied:"\u0645\u0631\u0641\u0648\u0636",statusError:"\u062E\u0637\u0623",statusSuperseded:"\u062A\u0645 \u0627\u0644\u062A\u062E\u0637\u064A"},s_={attach:"Adjuntar archivos",attachmentMimeRejected:"Tipo de archivo no admitido",attachmentTooLarge:"El archivo es demasiado grande",attachmentTooMany:"Se alcanz\xF3 el l\xEDmite de adjuntos",conversationClosed:"Este chat est\xE1 cerrado",conversationLoading:"Cargando chat\u2026",loadPreviousMessages:"Cargar mensajes anteriores",close:"Cerrar",collapse:"Contraer",collapseSidebar:"Contraer la barra lateral",composerPlaceholder:"Escribe un mensaje\u2026",dateLastWeek:"\xDAltimos 7 d\xEDas",dateOlder:"Anteriores",dateToday:"Hoy",dateYesterday:"Ayer",dropZone:"Suelta los archivos para adjuntarlos",errorGeneric:"Algo sali\xF3 mal",errorRateLimited:"Demasiadas solicitudes: int\xE9ntalo de nuevo en un momento.",errorRetry:"Reintentar",expand:"Ampliar",expandSidebar:"Expandir la barra lateral",exitFullscreen:"Salir de pantalla completa",fullscreen:"Pantalla completa",history:"Historial",historyBack:"Volver al chat",historyEmpty:"A\xFAn no tienes chats",historyContinue:"Continuar el chat",historyLoading:"Cargando tus chats\u2026",historyTitle:"Historial de chats",loadMoreConversations:"Cargar m\xE1s conversaciones",language:"Idioma",launcherOpen:"Abrir el chat",launcherLabel:"Chatea con nosotros",micStart:"Iniciar entrada de voz",micStop:"Detener entrada de voz",micUnsupported:"Este navegador no admite la entrada de voz",moreActions:"M\xE1s acciones",newConversation:"Nuevo chat",panelTitle:"Chat",popOut:"Abrir en una pesta\xF1a nueva",resizeHandle:"Arrastra para cambiar el tama\xF1o",scrollToBottom:"Ir a lo m\xE1s reciente",send:"Enviar",queueMessage:"Poner mensaje en cola",removeQueuedMessage:"Quitar mensaje de la cola",compactingContext:"Optimizando el contexto de la conversaci\xF3n\u2026",soundOff:"Sonido desactivado",soundOn:"Sonido activado",startNewConversation:"Iniciar un chat nuevo",talkToOperator:"Hablar con un operador",connectingOperator:"Conect\xE1ndote con un operador\u2026",noOperatorAvailable:"Nadie est\xE1 disponible ahora \u2014 deja tus datos y te contactaremos.",chattingWithOperator:"Est\xE1s chateando con {operator}",cancelOperatorRequest:"Seguir con la IA",stop:"Detener",theme:"Tema",themeAuto:"Autom\xE1tico",themeDark:"Oscuro",themeLight:"Claro",textSize:"Tama\xF1o del texto",textSizeSmall:"Peque\xF1o",textSizeNormal:"Normal",textSizeLarge:"Grande",loading:"Cargando\u2026",thinking:"Pensando\u2026",thoughts:"Razonamiento",toolResult:"Resultado",sources:"Fuentes",feedbackUp:"Buena respuesta",feedbackDown:"Mala respuesta",feedbackThanks:"Gracias por tu opini\xF3n",copy:"Copiar",copied:"Copiado",tabHome:"Inicio",tabConversations:"Chats",tabHelp:"Ayuda",tabNews:"Novedades",modulesEmpty:"A\xFAn no hay nada aqu\xED",moduleBack:"Atr\xE1s",contentLoading:"Cargando\u2026",homeGreeting:"\xBFC\xF3mo podemos ayudarte?",homeGreetingNamed:"Hola, {name} \u{1F44B}",homeGreetingLead:"\xBFC\xF3mo podemos ayudarte?",homeSearchPlaceholder:"Buscar ayuda",homeContentTitle:"Art\xEDculos populares",homeStatus:"Estado",helpTitle:"Ayuda",helpSearchPlaceholder:"Buscar ayuda",helpEmpty:"A\xFAn no hay art\xEDculos de ayuda",helpLoading:"Cargando la ayuda\u2026",helpSearchEmpty:"No se encontraron resultados",newsTitle:"Novedades",newsEmpty:"A\xFAn no hay novedades",newsLoading:"Cargando novedades\u2026",newsBack:"Volver a novedades",newsPublishedAt:"Publicado el {date}",formSubmit:"Enviar",formSkip:"Quiz\xE1 m\xE1s tarde",formSubmitted:"Completado",formSkipped:"Quiz\xE1 m\xE1s tarde",formFillOut:"Completar",formRequired:"Este campo es obligatorio",formInvalidEmail:"Introduce un correo electr\xF3nico v\xE1lido",formInvalidTel:"Introduce un n\xFAmero de tel\xE9fono v\xE1lido",formInvalidUrl:"Introduce una URL v\xE1lida",formInvalidNumber:"Introduce un n\xFAmero v\xE1lido",formTooShort:"Demasiado corto (m\xEDn. {min} caracteres)",formTooLong:"Demasiado largo (m\xE1x. {max} caracteres)",formNumberTooSmall:"Debe ser al menos {min}",formNumberTooLarge:"Debe ser como m\xE1ximo {max}",formPatternMismatch:"Respeta el formato solicitado",formChooseAtLeast:"Elige al menos {min}",formChooseAtMost:"Elige como m\xE1ximo {max}",formOther:"Otro",formOtherPlaceholder:"Escribe tu respuesta\u2026",inputRequired:"Preguntas para ti",inputBadge:"Preguntas",inputAnswered:"Respondido",inputSkipped:"Omitido",showOptions:"Mostrar opciones",hideOptions:"Ocultar opciones",qtypeText:"Tu respuesta",qtypeEmail:"Correo electr\xF3nico",qtypePhone:"N\xFAmero de tel\xE9fono",qtypeNumber:"N\xFAmero",qtypeDate:"Fecha",qtypeChooseOne:"Elige una",qtypeChooseAny:"Elige varias",qtypeBoolean:"S\xED / No",inputSubmit:"Enviar respuestas",inputSubmitHint:"Enter para enviar \xB7 May\xFAs+Enter = nueva l\xEDnea",inputSkip:"Omitir",confirmYes:"S\xED",confirmNo:"No",approve:"Aprobar",reject:"Rechazar",approvalPrompt:"{tool} requiere tu aprobaci\xF3n para ejecutarse.",approvalBody:"Revisa los par\xE1metros de arriba y decide si permites esta acci\xF3n.",approvalYourResponse:"Tu respuesta: {decision}",approvalEditHint:"Puedes cambiar tu respuesta hasta que este paso contin\xFAe.",approvalSubmitting:"Respuesta enviada. Procesando\u2026",edit:"Editar",toolParameters:"Par\xE1metros",statusAwaiting:"Esperando aprobaci\xF3n",statusResponded:"Enviado",statusRunning:"En curso",statusCompleted:"Completado",statusDenied:"Denegado",statusError:"Error",statusSuperseded:"Omitido"},l_={attach:"\u05E6\u05D9\u05E8\u05D5\u05E3 \u05E7\u05D1\u05E6\u05D9\u05DD",attachmentMimeRejected:"\u05E1\u05D5\u05D2 \u05D4\u05E7\u05D5\u05D1\u05E5 \u05D0\u05D9\u05E0\u05D5 \u05E0\u05EA\u05DE\u05DA",attachmentTooLarge:"\u05D4\u05E7\u05D5\u05D1\u05E5 \u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9",attachmentTooMany:"\u05D4\u05D2\u05E2\u05EA \u05DC\u05DE\u05E1\u05E4\u05E8 \u05D4\u05DE\u05E8\u05D1\u05D9 \u05E9\u05DC \u05E7\u05D1\u05E6\u05D9\u05DD \u05DE\u05E6\u05D5\u05E8\u05E4\u05D9\u05DD",conversationClosed:"\u05D4\u05E6\u05F3\u05D0\u05D8 \u05D4\u05D6\u05D4 \u05E0\u05E1\u05D2\u05E8",conversationLoading:"\u05D8\u05D5\u05E2\u05DF \u05E6\u05F3\u05D0\u05D8\u2026",loadPreviousMessages:"\u05D8\u05E2\u05D9\u05E0\u05EA \u05D4\u05D5\u05D3\u05E2\u05D5\u05EA \u05E7\u05D5\u05D3\u05DE\u05D5\u05EA",close:"\u05E1\u05D2\u05D9\u05E8\u05D4",collapse:"\u05DB\u05D9\u05D5\u05D5\u05E5",collapseSidebar:"\u05DB\u05D9\u05D5\u05D5\u05E5 \u05E1\u05E8\u05D2\u05DC \u05D4\u05E6\u05D3",composerPlaceholder:"\u05DB\u05EA\u05D5\u05D1 \u05D4\u05D5\u05D3\u05E2\u05D4\u2026",dateLastWeek:"7 \u05D4\u05D9\u05DE\u05D9\u05DD \u05D4\u05D0\u05D7\u05E8\u05D5\u05E0\u05D9\u05DD",dateOlder:"\u05D9\u05E9\u05DF \u05D9\u05D5\u05EA\u05E8",dateToday:"\u05D4\u05D9\u05D5\u05DD",dateYesterday:"\u05D0\u05EA\u05DE\u05D5\u05DC",dropZone:"\u05E9\u05D7\u05E8\u05E8 \u05E7\u05D1\u05E6\u05D9\u05DD \u05DB\u05D3\u05D9 \u05DC\u05E6\u05E8\u05E3",errorGeneric:"\u05DE\u05E9\u05D4\u05D5 \u05D4\u05E9\u05EA\u05D1\u05E9",errorRateLimited:"\u05D9\u05D5\u05EA\u05E8 \u05DE\u05D3\u05D9 \u05D1\u05E7\u05E9\u05D5\u05EA \u2014 \u05E0\u05E1\u05D4 \u05E9\u05D5\u05D1 \u05D1\u05E2\u05D5\u05D3 \u05E8\u05D2\u05E2.",errorRetry:"\u05E0\u05E1\u05D4 \u05E9\u05D5\u05D1",expand:"\u05D4\u05E8\u05D7\u05D1\u05D4",expandSidebar:"\u05D4\u05E8\u05D7\u05D1\u05EA \u05E1\u05E8\u05D2\u05DC \u05D4\u05E6\u05D3",exitFullscreen:"\u05D9\u05E6\u05D9\u05D0\u05D4 \u05DE\u05DE\u05E1\u05DA \u05DE\u05DC\u05D0",fullscreen:"\u05DE\u05E1\u05DA \u05DE\u05DC\u05D0",history:"\u05D4\u05D9\u05E1\u05D8\u05D5\u05E8\u05D9\u05D4",historyBack:"\u05D7\u05D6\u05E8\u05D4 \u05DC\u05E6\u05F3\u05D0\u05D8",historyEmpty:"\u05D0\u05D9\u05DF \u05E2\u05D3\u05D9\u05D9\u05DF \u05E6\u05F3\u05D0\u05D8\u05D9\u05DD \u05E7\u05D5\u05D3\u05DE\u05D9\u05DD",historyContinue:"\u05D4\u05DE\u05E9\u05DA \u05E6\u05F3\u05D0\u05D8",historyLoading:"\u05D8\u05D5\u05E2\u05DF \u05D0\u05EA \u05D4\u05E6\u05F3\u05D0\u05D8\u05D9\u05DD \u05E9\u05DC\u05DA\u2026",historyTitle:"\u05D4\u05D9\u05E1\u05D8\u05D5\u05E8\u05D9\u05D9\u05EA \u05E6\u05F3\u05D0\u05D8\u05D9\u05DD",loadMoreConversations:"\u05D8\u05E2\u05D9\u05E0\u05EA \u05E9\u05D9\u05D7\u05D5\u05EA \u05E0\u05D5\u05E1\u05E4\u05D5\u05EA",language:"\u05E9\u05E4\u05D4",launcherOpen:"\u05E4\u05EA\u05D9\u05D7\u05EA \u05E6\u05F3\u05D0\u05D8",launcherLabel:"\u05D3\u05D1\u05E8\u05D5 \u05D0\u05D9\u05EA\u05E0\u05D5",micStart:"\u05D4\u05EA\u05D7\u05DC\u05EA \u05E7\u05DC\u05D8 \u05E7\u05D5\u05DC\u05D9",micStop:"\u05E2\u05E6\u05D9\u05E8\u05EA \u05E7\u05DC\u05D8 \u05E7\u05D5\u05DC\u05D9",micUnsupported:"\u05E7\u05DC\u05D8 \u05E7\u05D5\u05DC\u05D9 \u05D0\u05D9\u05E0\u05D5 \u05E0\u05EA\u05DE\u05DA \u05D1\u05D3\u05E4\u05D3\u05E4\u05DF \u05D6\u05D4",moreActions:"\u05E4\u05E2\u05D5\u05DC\u05D5\u05EA \u05E0\u05D5\u05E1\u05E4\u05D5\u05EA",newConversation:"\u05E6\u05F3\u05D0\u05D8 \u05D7\u05D3\u05E9",panelTitle:"\u05E6\u05F3\u05D0\u05D8",popOut:"\u05E4\u05EA\u05D9\u05D7\u05D4 \u05D1\u05DB\u05E8\u05D8\u05D9\u05E1\u05D9\u05D9\u05D4 \u05D7\u05D3\u05E9\u05D4",resizeHandle:"\u05D2\u05E8\u05D5\u05E8 \u05DC\u05E9\u05D9\u05E0\u05D5\u05D9 \u05D4\u05D2\u05D5\u05D3\u05DC",scrollToBottom:"\u05DE\u05E2\u05D1\u05E8 \u05DC\u05D7\u05D3\u05E9 \u05D1\u05D9\u05D5\u05EA\u05E8",send:"\u05E9\u05DC\u05D9\u05D7\u05D4",queueMessage:"\u05D4\u05D5\u05E1\u05E4\u05EA \u05D4\u05D4\u05D5\u05D3\u05E2\u05D4 \u05DC\u05EA\u05D5\u05E8",removeQueuedMessage:"\u05D4\u05E1\u05E8\u05EA \u05D4\u05D4\u05D5\u05D3\u05E2\u05D4 \u05DE\u05D4\u05EA\u05D5\u05E8",compactingContext:"\u05DE\u05D1\u05E6\u05E2 \u05D0\u05D5\u05E4\u05D8\u05D9\u05DE\u05D9\u05D6\u05E6\u05D9\u05D4 \u05DC\u05D4\u05E7\u05E9\u05E8 \u05D4\u05E9\u05D9\u05D7\u05D4\u2026",soundOff:"\u05D4\u05E9\u05EA\u05E7\u05EA \u05D4\u05E6\u05DC\u05D9\u05DC",soundOn:"\u05D4\u05E4\u05E2\u05DC\u05EA \u05D4\u05E6\u05DC\u05D9\u05DC",startNewConversation:"\u05D4\u05EA\u05D7\u05DC\u05EA \u05E6\u05F3\u05D0\u05D8 \u05D7\u05D3\u05E9",talkToOperator:"\u05D3\u05D1\u05E8 \u05E2\u05DD \u05E0\u05E6\u05D9\u05D2",connectingOperator:"\u05DE\u05D7\u05D1\u05E8 \u05D0\u05D5\u05EA\u05DA \u05DC\u05E0\u05E6\u05D9\u05D2\u2026",noOperatorAvailable:"\u05D0\u05D9\u05DF \u05E0\u05E6\u05D9\u05D2\u05D9\u05DD \u05D6\u05DE\u05D9\u05E0\u05D9\u05DD \u05DB\u05E2\u05EA \u2014 \u05D4\u05E9\u05D0\u05E8 \u05D0\u05EA \u05D4\u05E4\u05E8\u05D8\u05D9\u05DD \u05E9\u05DC\u05DA \u05D5\u05E0\u05D7\u05D6\u05D5\u05E8 \u05D0\u05DC\u05D9\u05DA.",chattingWithOperator:"\u05D0\u05EA\u05D4 \u05DE\u05E6\u05F3\u05D5\u05D8\u05D8 \u05E2\u05DD {operator}",cancelOperatorRequest:"\u05D4\u05DE\u05E9\u05DA \u05DC\u05E9\u05D5\u05D7\u05D7 \u05E2\u05DD \u05D4-AI",stop:"\u05E2\u05E6\u05D9\u05E8\u05D4",theme:"\u05E2\u05E8\u05DB\u05EA \u05E0\u05D5\u05E9\u05D0",themeAuto:"\u05D0\u05D5\u05D8\u05D5\u05DE\u05D8\u05D9",themeDark:"\u05DB\u05D4\u05D4",themeLight:"\u05D1\u05D4\u05D9\u05E8",textSize:"\u05D2\u05D5\u05D3\u05DC \u05D8\u05E7\u05E1\u05D8",textSizeSmall:"\u05E7\u05D8\u05DF",textSizeNormal:"\u05E8\u05D2\u05D9\u05DC",textSizeLarge:"\u05D2\u05D3\u05D5\u05DC",loading:"\u05D8\u05D5\u05E2\u05DF\u2026",thinking:"\u05D7\u05D5\u05E9\u05D1\u2026",thoughts:"\u05DE\u05D7\u05E9\u05D1\u05D5\u05EA",toolResult:"\u05EA\u05D5\u05E6\u05D0\u05D4",sources:"\u05DE\u05E7\u05D5\u05E8\u05D5\u05EA",feedbackUp:"\u05EA\u05E9\u05D5\u05D1\u05D4 \u05D8\u05D5\u05D1\u05D4",feedbackDown:"\u05EA\u05E9\u05D5\u05D1\u05D4 \u05D2\u05E8\u05D5\u05E2\u05D4",feedbackThanks:"\u05EA\u05D5\u05D3\u05D4 \u05E2\u05DC \u05D4\u05DE\u05E9\u05D5\u05D1",copy:"\u05D4\u05E2\u05EA\u05E7",copied:"\u05D4\u05D5\u05E2\u05EA\u05E7",tabHome:"\u05D1\u05D9\u05EA",tabConversations:"\u05E6\u05F3\u05D0\u05D8\u05D9\u05DD",tabHelp:"\u05E2\u05D6\u05E8\u05D4",tabNews:"\u05D7\u05D3\u05E9\u05D5\u05EA",modulesEmpty:"\u05D0\u05D9\u05DF \u05DB\u05D0\u05DF \u05E2\u05D3\u05D9\u05D9\u05DF \u05DB\u05DC\u05D5\u05DD",moduleBack:"\u05D7\u05D6\u05E8\u05D4",contentLoading:"\u05D8\u05D5\u05E2\u05DF\u2026",homeGreeting:"\u05DB\u05D9\u05E6\u05D3 \u05E0\u05D5\u05DB\u05DC \u05DC\u05E2\u05D6\u05D5\u05E8?",homeGreetingNamed:"\u05E9\u05DC\u05D5\u05DD {name} \u{1F44B}",homeGreetingLead:"\u05DB\u05D9\u05E6\u05D3 \u05E0\u05D5\u05DB\u05DC \u05DC\u05E2\u05D6\u05D5\u05E8?",homeSearchPlaceholder:"\u05D7\u05D9\u05E4\u05D5\u05E9 \u05E2\u05D6\u05E8\u05D4",homeContentTitle:"\u05DE\u05D0\u05DE\u05E8\u05D9\u05DD \u05E4\u05D5\u05E4\u05D5\u05DC\u05E8\u05D9\u05D9\u05DD",homeStatus:"\u05E1\u05D8\u05D8\u05D5\u05E1",helpTitle:"\u05E2\u05D6\u05E8\u05D4",helpSearchPlaceholder:"\u05D7\u05D9\u05E4\u05D5\u05E9 \u05E2\u05D6\u05E8\u05D4",helpEmpty:"\u05D0\u05D9\u05DF \u05E2\u05D3\u05D9\u05D9\u05DF \u05DE\u05D0\u05DE\u05E8\u05D9 \u05E2\u05D6\u05E8\u05D4",helpLoading:"\u05D8\u05D5\u05E2\u05DF \u05E2\u05D6\u05E8\u05D4\u2026",helpSearchEmpty:"\u05DC\u05D0 \u05E0\u05DE\u05E6\u05D0\u05D5 \u05EA\u05D5\u05E6\u05D0\u05D5\u05EA",newsTitle:"\u05D7\u05D3\u05E9\u05D5\u05EA",newsEmpty:"\u05D0\u05D9\u05DF \u05E2\u05D3\u05D9\u05D9\u05DF \u05D7\u05D3\u05E9\u05D5\u05EA",newsLoading:"\u05D8\u05D5\u05E2\u05DF \u05D7\u05D3\u05E9\u05D5\u05EA\u2026",newsBack:"\u05D7\u05D6\u05E8\u05D4 \u05DC\u05D7\u05D3\u05E9\u05D5\u05EA",newsPublishedAt:"\u05E4\u05D5\u05E8\u05E1\u05DD \u05D1-{date}",formSubmit:"\u05E9\u05DC\u05D9\u05D7\u05D4",formSkip:"\u05D0\u05D7\u05E8 \u05DB\u05DA",formSubmitted:"\u05E0\u05E9\u05DC\u05D7",formSkipped:"\u05D3\u05D5\u05DC\u05D2",formFillOut:"\u05DE\u05D9\u05DC\u05D5\u05D9",formRequired:"\u05E9\u05D3\u05D4 \u05D7\u05D5\u05D1\u05D4",formInvalidEmail:"\u05D4\u05D6\u05DF \u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC \u05EA\u05E7\u05D9\u05E0\u05D4",formInvalidTel:"\u05D4\u05D6\u05DF \u05DE\u05E1\u05E4\u05E8 \u05D8\u05DC\u05E4\u05D5\u05DF \u05EA\u05E7\u05D9\u05DF",formInvalidUrl:"\u05D4\u05D6\u05DF \u05DB\u05EA\u05D5\u05D1\u05EA URL \u05EA\u05E7\u05D9\u05E0\u05D4",formInvalidNumber:"\u05D4\u05D6\u05DF \u05DE\u05E1\u05E4\u05E8 \u05EA\u05E7\u05D9\u05DF",formTooShort:"\u05E7\u05E6\u05E8 \u05DE\u05D3\u05D9 (\u05DC\u05E4\u05D7\u05D5\u05EA {min} \u05EA\u05D5\u05D5\u05D9\u05DD)",formTooLong:"\u05D0\u05E8\u05D5\u05DA \u05DE\u05D3\u05D9 (\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8 {max} \u05EA\u05D5\u05D5\u05D9\u05DD)",formNumberTooSmall:"\u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DC\u05E4\u05D7\u05D5\u05EA {min}",formNumberTooLarge:"\u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8 {max}",formPatternMismatch:"\u05D4\u05EA\u05D0\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA \u05D4\u05E0\u05D3\u05E8\u05E9\u05EA",formChooseAtLeast:"\u05D1\u05D7\u05E8 \u05DC\u05E4\u05D7\u05D5\u05EA {min}",formChooseAtMost:"\u05D1\u05D7\u05E8 \u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8 {max}",formOther:"\u05D0\u05D7\u05E8",formOtherPlaceholder:"\u05DB\u05EA\u05D5\u05D1 \u05D0\u05EA \u05EA\u05E9\u05D5\u05D1\u05EA\u05DA\u2026",inputRequired:"\u05E9\u05D0\u05DC\u05D5\u05EA \u05E2\u05D1\u05D5\u05E8\u05DA",inputBadge:"\u05E9\u05D0\u05DC\u05D5\u05EA",inputAnswered:"\u05E0\u05E2\u05E0\u05D4",inputSkipped:"\u05D3\u05D5\u05DC\u05D2",showOptions:"\u05D4\u05E6\u05D2 \u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA",hideOptions:"\u05D4\u05E1\u05EA\u05E8 \u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA",qtypeText:"\u05D4\u05EA\u05E9\u05D5\u05D1\u05D4 \u05E9\u05DC\u05DA",qtypeEmail:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",qtypePhone:"\u05DE\u05E1\u05E4\u05E8 \u05D8\u05DC\u05E4\u05D5\u05DF",qtypeNumber:"\u05DE\u05E1\u05E4\u05E8",qtypeDate:"\u05EA\u05D0\u05E8\u05D9\u05DA",qtypeChooseOne:"\u05D1\u05D7\u05E8 \u05D0\u05D7\u05EA",qtypeChooseAny:"\u05D1\u05D7\u05E8 \u05DB\u05DE\u05D4",qtypeBoolean:"\u05DB\u05DF / \u05DC\u05D0",inputSubmit:"\u05E9\u05DC\u05D9\u05D7\u05EA \u05EA\u05E9\u05D5\u05D1\u05D5\u05EA",inputSubmitHint:"Enter \u05DC\u05E9\u05DC\u05D9\u05D7\u05D4 \xB7 Shift+Enter = \u05E9\u05D5\u05E8\u05D4 \u05D7\u05D3\u05E9\u05D4",inputSkip:"\u05D3\u05D9\u05DC\u05D5\u05D2",confirmYes:"\u05DB\u05DF",confirmNo:"\u05DC\u05D0",approve:"\u05D0\u05D9\u05E9\u05D5\u05E8",reject:"\u05D3\u05D7\u05D9\u05D9\u05D4",approvalPrompt:"\u05D4\u05DB\u05DC\u05D9 {tool} \u05D3\u05D5\u05E8\u05E9 \u05D0\u05EA \u05D0\u05D9\u05E9\u05D5\u05E8\u05DA \u05DB\u05D3\u05D9 \u05DC\u05E4\u05E2\u05D5\u05DC.",approvalBody:"\u05D1\u05D3\u05D5\u05E7 \u05D0\u05EA \u05E4\u05E8\u05DE\u05D8\u05E8\u05D9 \u05D4\u05DB\u05DC\u05D9 \u05E9\u05DC\u05DE\u05E2\u05DC\u05D4 \u05D5\u05D4\u05D7\u05DC\u05D8 \u05D0\u05DD \u05DC\u05D0\u05E9\u05E8 \u05E4\u05E2\u05D5\u05DC\u05D4 \u05D6\u05D5.",approvalYourResponse:"\u05D4\u05EA\u05D2\u05D5\u05D1\u05D4 \u05E9\u05DC\u05DA: {decision}",approvalEditHint:"\u05E0\u05D9\u05EA\u05DF \u05DC\u05E2\u05E8\u05D5\u05DA \u05D0\u05EA \u05EA\u05D2\u05D5\u05D1\u05EA\u05DA \u05E2\u05D3 \u05E9\u05D4\u05E9\u05DC\u05D1 \u05D4\u05D6\u05D4 \u05D9\u05EA\u05D7\u05D3\u05E9.",approvalSubmitting:"\u05D4\u05EA\u05D2\u05D5\u05D1\u05D4 \u05E0\u05E9\u05DC\u05D7\u05D4. \u05DE\u05D1\u05E6\u05E2\u2026",edit:"\u05E2\u05E8\u05D9\u05DB\u05D4",toolParameters:"\u05E4\u05E8\u05DE\u05D8\u05E8\u05D9\u05DD",statusAwaiting:"\u05DE\u05DE\u05EA\u05D9\u05DF \u05DC\u05D0\u05D9\u05E9\u05D5\u05E8",statusResponded:"\u05E0\u05E9\u05DC\u05D7",statusRunning:"\u05E4\u05D5\u05E2\u05DC",statusCompleted:"\u05D4\u05D5\u05E9\u05DC\u05DD",statusDenied:"\u05E0\u05D3\u05D7\u05D4",statusError:"\u05E9\u05D2\u05D9\u05D0\u05D4",statusSuperseded:"\u05D3\u05D5\u05DC\u05D2"},c_={en:as,fr:a_,ar:i_,es:s_,he:l_};function Fo(e,t){let n=is(e),o=Bo(t),r=n==="en"?{}:c_[n]??{},a=o?t[n]??{}:t??{},s=o?t.en??{}:{};return{...as,...r,...s,...a}}function is(e){return(e.split("-")[0]??"en").toLowerCase()}var d_=new Set(["ar","he","iw","fa","ur","ps","sd","ug","yi","dv","ckb","ks","nqo","prs","syr"]);function ss(e){return d_.has(is(e))}function lt(e,t){return e[t]??t}function Bo(e){if(!e)return!1;for(let t of Object.values(e))if(t&&typeof t=="object")return!0;return!1}function ls(e,t){if(!(!e?.length||!t))return e.find(n=>n.locale===t)}function cs(e,t){let{translations:n,defaultLocale:o,...r}=e,a=ls(n,t);return a?{...r,title:a.title??r.title,description:a.description??r.description,content:a.content??r.content}:r}function ds(e,t){let{translations:n,defaultLocale:o,...r}=e,a=ls(n,t);if(!a)return r;let s=new Map((a.fields??[]).map(c=>[c.name,c])),l=r.fields.map(c=>{let d=s.get(c.name);if(!d)return c;let _=new Map((d.options??[]).map(p=>[p.value,p]));return{...c,label:d.label??c.label,placeholder:d.placeholder??c.placeholder,validationHint:d.validationHint??c.validationHint,options:c.options?.map(p=>{let u=_.get(p.value);return u?{...p,label:u.label??p.label,description:u.description??p.description}:p})}});return{...r,title:a.title??r.title,description:a.description??r.description,submitLabel:a.submitLabel??r.submitLabel,fields:l}}var fa=class{get(t){try{return localStorage.getItem(t)}catch{return null}}set(t,n){try{localStorage.setItem(t,n)}catch{}}remove(t){try{localStorage.removeItem(t)}catch{}}},Uo=new fa;var va=["off","error","warn","info","debug","trace"],ha=T.cssPrefix,us=`${ha}.debug`,u_=`__${T.global}_DEBUG__`,__=`${ha}-debug`,Ho=2,ma=null;function p_(){if(typeof window>"u")return 2;try{let e=new URLSearchParams(window.location.search).get(__);if(e!==null){let t=ga(e);if(t>=0)return t}}catch{}try{let e=window.localStorage?.getItem(us);if(e){let t=ga(e);if(t>=0)return t}}catch{}return Reflect.get(window,u_)?4:2}function ga(e){if(e===!0||e==="1"||e==="true")return 4;if(e===!1||e==="0"||e==="false"||e==="off")return 0;if(typeof e=="number")return Math.max(0,Math.min(5,Math.floor(e)));if(typeof e=="string"){let t=va.findIndex(n=>n===e);if(t>=0)return t}return-1}function zo(e){let t=ga(e);if(!(t<0)){Ho=t;try{window.localStorage?.setItem(us,va[t]??"off")}catch{}}}function ba(){return va[Ho]??"warn"}Ho=p_();function _s(e){let t=`[${ha}:${e}]`,n=(o,r,a)=>(s,l)=>{if(!(Ho<o)&&(l===void 0?console[r](t,s):console[r](t,s,l),ma))try{ma({level:a,scope:e,message:s,payload:l})}catch{}};return{error:n(1,"error","error"),warn:n(2,"warn","warn"),info:n(3,"info","info"),debug:n(4,"debug","debug"),trace:n(5,"debug","trace"),scope:o=>_s(`${e}:${o}`)}}var Z=_s("core");function ps(e){ma=e}var on=Z.scope("context"),f_=new Set(["visitorId","conversationId","jwt","token","authorization","password"]),fs=50,ya=1024,m_=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;function Pa(e){return ms(e,"userContext",!0)}function xa(e){return ms(e,"pageContext",!1)}function ms(e,t,n){if(e==null)return;if(typeof e!="object"||Array.isArray(e)){on.warn(`ignored ${t} \u2014 expected an object`,{type:Array.isArray(e)?"array":typeof e});return}let o={},r=0;for(let[a,s]of Object.entries(e)){if(f_.has(a)){on.warn(`dropped reserved ${t} key "${a}" \u2014 managed by the widget, not host-settable`);continue}if(s==null)continue;if(r>=fs){on.warn(`${t} truncated at ${fs} keys \u2014 dropped "${a}"`);continue}let l=g_(t,a,s);l!==void 0&&(o[a]=l,r++)}return n&&typeof o.email=="string"&&!m_.test(o.email)&&(on.warn("dropped malformed context field",{field:`${t}.email`,reason:"invalid format"}),delete o.email),Object.keys(o).length>0?o:void 0}function g_(e,t,n){if(typeof n=="boolean")return n;if(typeof n=="number"){if(!Number.isFinite(n)){on.warn(`dropped non-finite ${e}.${t}`);return}return n}if(typeof n=="string"){let o=n.trim();return o===""?void 0:o.length>ya?(on.warn(`truncated ${e}.${t} to ${ya} chars`),o.slice(0,ya)):o}on.warn(`dropped ${e}.${t} \u2014 only string/number/boolean values are allowed`,{type:typeof n})}var qo={maxBytes:10485760,maxCount:10,accept:"*/*"},gs={voice:"local"},vs={list:[],byTrigger:{}},Sa={enabled:!0,sampleRate:1},Vo={upload:"/pai/upload-file",transcribe:"/pai/transcribe-audio",submitForm:"/pai/submit-form"},Sn={variant:"circle",size:"md",label:void 0,icon:"chat",hidden:!1},hs={floating:["theme","textSize","history","close","clear","expand","fullscreen","popOut","sound","language"],inline:["theme","textSize","history","close","clear","fullscreen","popOut","sound","language"],standalone:["theme","textSize","history","clear","sound","language"],page:["theme","textSize","history","clear","sound","language"],modal:["theme","textSize","history","close","clear","fullscreen","popOut","sound","language"],drawer:["theme","textSize","history","close","clear","fullscreen","popOut","sound","language"]},ka={enabled:!0,volume:.3,events:void 0},bs={enabled:!0,events:void 0},ys=[{label:"tabConversations",layout:"chat"}];function kn(e){let t=e!==null&&typeof e=="object"?e:{},n=t.presentation??{},o=t.behavior??{},r=t.i18n??{},a=t.feedback??{},s=t.footer??{},l=t.header??{},{themeMode:c,themeOverrides:d}=v_(t.theme),_=n.mode??"floating",p=h_(r.defaultLocale),u=r.availableLocales??[r.locale??p],m=wn(r.locale??p,u,p),g=(t.baseUrl??T.defaultBaseUrl).replace(/\/$/,""),P=(t.agentApiBaseUrl??`${g}/api/agent`).replace(/\/$/,""),y=(t.dataApiBaseUrl??`${g}/api/data`).replace(/\/$/,"");return{widgetId:t.widgetId??"default",publicKey:t.publicKey,aiAgentDeploymentId:t.aiAgentDeploymentId,baseUrl:g,agentApiBaseUrl:P,dataApiBaseUrl:y,userContext:Pa(t.userContext),pageContext:xa(t.pageContext),position:n.position??"bottom-right",themeMode:c,textSize:"normal",themeOverrides:d,mode:_,iframe:n.iframe??!1,responseMode:o.responseMode??"streaming",showReasoning:o.showReasoning??!1,showToolCalls:o.showToolCalls??!1,showSources:o.showSources??!1,enableMessageFeedback:!(o.disableMessageFeedback??!1),autoSendSuggestions:o.autoSendSuggestions??!1,popOutUrl:o.popOutUrl,features:{voice:t.features?.voice??gs.voice,fileUpload:!(t.features?.disableFileUpload??!1),humanInLoop:!(t.features?.disableHumanInLoop??!1),operatorRequest:t.features?.enableOperatorRequest===!0},forms:Zn(t.forms,m),endpoints:{upload:t.endpoints?.upload??Vo.upload,transcribe:t.endpoints?.transcribe??Vo.transcribe,submitForm:t.endpoints?.submitForm??Vo.submitForm},attachments:{accept:t.composer?.attachments?.accept??qo.accept,maxBytes:t.composer?.attachments?.maxBytes??qo.maxBytes,maxCount:t.composer?.attachments?.maxCount??qo.maxCount},locale:m,defaultLocale:p,availableLocales:u,startMinimized:o.startMinimized??!0,actions:b_(_,l.actions),size:n.size??{},launcher:R_(t.launcher),sound:y_(a.sound),haptics:P_(a.haptics),strings:Fo(m,r.strings),stringsOverride:r.strings,composerDisclaimer:s.composerDisclaimer??"",poweredBy:S_(s.poweredBy),composer:k_(t.composer),modules:w_(t.modules),tracking:x_(t.tracking,y),storage:t.storage??Uo,onMessage:t.onMessage,onOpen:t.onOpen,onClose:t.onClose,onError:t.onError}}function v_(e){return typeof e=="string"?{themeMode:e,themeOverrides:{}}:e&&typeof e=="object"?{themeMode:"auto",themeOverrides:e}:{themeMode:"auto",themeOverrides:{}}}function h_(e){return e&&e!=="auto"?e:globalThis.navigator?.language||"en"}function wn(e,t,n){return t.length<=1||t.includes(e)?e:t.includes(n)?n:t[0]??e}function b_(e,t){return t??hs[e]}function y_(e){return{enabled:e?.enabled??ka.enabled,volume:e?.volume??ka.volume,events:e?.events}}function P_(e){return{enabled:e?.enabled??bs.enabled,events:e?.events}}function x_(e,t){let n=e?.sampleRate??Sa.sampleRate;return{enabled:e?.enabled??Sa.enabled,endpoint:e?.endpoint??`${t}/pai/elements-px.gif`,sampleRate:Math.min(1,Math.max(0,Number.isFinite(n)?n:1)),token:e?.token}}function S_(e){let n={...{text:`Powered by ${T.displayName}`,href:T.siteUrl},...e};return!!(n.text||n.logoUrl)?n:null}function k_(e){let t=e?.sendButton;return{sendButton:{shape:t?.shape??"circle",icon:t?.icon??"arrowUp",variant:t?.variant??"filled"}}}function w_(e){let t=e??ys,n=new Set,o=[];for(let a of t.slice(0,4)){if(!a?.label||!a?.layout)continue;let s=a.contentTags?.filter(Boolean),l=a.id??s?.[0]??a.layout;for(;n.has(l);)l=`${l}-${o.length}`;n.add(l);let c={id:l,label:a.label,layout:a.layout};s?.length&&(c.contentTags=s),a.layout==="home"&&(c.brandName=a.brandName,c.greetingText=a.greetingText,c.showGreeting=!(a.hideGreeting??!1),c.showSearchBar=!(a.hideSearchBar??!1),c.showRecentConversations=!(a.hideRecentConversations??!1),a.userAvatars?.length&&(c.userAvatars=a.userAvatars),a.status&&(c.status=a.status),c.contentBlockTitle=a.contentBlockTitle),o.push(c)}let r=Object.fromEntries(o.map(a=>[a.id,a]));return{list:o,byId:r}}function Zn(e,t){var a;if(!e?.length)return vs;let n=[],o=new Set;for(let s of e){if(!s?.id||o.has(s.id))continue;let l=ds(s,t),c=(l.fields??[]).filter(_=>!!(_?.name&&_.label&&_.type)),d=(Array.isArray(l.on)?l.on:[l.on]).map(C_).filter(_=>_!==null);c.length===0||d.length===0||(o.add(l.id),n.push({id:l.id,triggers:d,when:l.when,fields:c,title:l.title,description:l.description,submitLabel:l.submitLabel,skippable:l.skippable??!1,frequency:l.frequency??"once",mirrorToContext:l.mirrorToContext??!0,reopenable:l.reopenable??!0,reviewable:l.reviewable??!0}))}let r={};for(let s of n)for(let l of s.triggers)(r[a=l.kind]??(r[a]=[])).push(s);return{list:n,byTrigger:r}}function C_(e){if(typeof e!="string")return null;if(e==="pre-chat"||e==="conversation-closed"||e==="panel-close"||e==="manual")return{kind:e};let[t,n]=e.split(":",2);if(t==="after-messages"){let o=Number(n);return Number.isFinite(o)&&o>0?{kind:"after-messages",param:o}:null}if(t==="idle"){let o=Number(n);return Number.isFinite(o)&&o>0?{kind:"idle",param:o}:null}return t==="page-area"&&n?{kind:"page-area",param:n}:null}function R_(e){let t=e?.callout?.text?{shape:"pill",position:"auto",delayMs:1200,autoDismissMs:0,animated:!0,persistent:!0,...e.callout}:null;return{variant:e?.variant??Sn.variant,size:e?.size??Sn.size,label:e?.label??Sn.label,icon:e?.icon??Sn.icon,hidden:e?.hidden??Sn.hidden,callout:t}}function wa(e,t,n,o){let r=wn(t,e.availableLocales,e.defaultLocale);if(r===e.locale&&n===e.themeMode&&o===e.textSize)return e;let a={...e};return r!==e.locale&&(a.locale=r,a.strings=Fo(r,e.stringsOverride)),n!==e.themeMode&&(a.themeMode=n),o!==e.textSize&&(a.textSize=o),a}var T_=["presentation","behavior","theme","launcher","header","composer","feedback","i18n","footer","features","tracking","endpoints"];function Ca(e,t){if(!t)return e;let n={...e};for(let a of T_){let s=t[a];if(s===void 0)continue;let l=e[a];if(a==="theme"){l===void 0&&(n[a]=s);continue}a!=="i18n"&&(n[a]=Ps(s,l))}t.modules!==void 0&&e.modules===void 0&&(n.modules=t.modules),t.dataApiBaseUrl!==void 0&&e.dataApiBaseUrl===void 0&&(n.dataApiBaseUrl=t.dataApiBaseUrl);let o=e.i18n,r=t.i18n;if(o||r){let a=Ps(r??{},o);r?.availableLocales!==void 0&&(a.availableLocales=r.availableLocales),r?.defaultLocale!==void 0&&(a.defaultLocale=r.defaultLocale);let s=o?.strings,l=r?.strings;(s||l)&&(a.strings=I_(l,s)),n.i18n=a}return n}function Ps(e,t){if(!t)return e;let n={...e};for(let[o,r]of Object.entries(t))r!==void 0&&(n[o]=r);return n}function I_(e,t){if(!e)return t;if(!t)return e;let n=Bo(e),o=Bo(t);if(!n&&!o)return{...e,...t};let r={},a=n?e:{en:e},s=o?t:{en:t};for(let[l,c]of Object.entries(a))r[l]={...c};for(let[l,c]of Object.entries(s))r[l]={...r[l],...c};return r}var E_=["clear","expand","fullscreen","popOut","sound","history","language","theme","textSize","close"],Dt=e=>e!=="false";var A_=[["public-key","publicKey"],["ai-agent-deployment-id","aiAgentDeploymentId"],["base-url","baseUrl"],["agent-api-base-url","agentApiBaseUrl"],["data-api-base-url","dataApiBaseUrl"],["theme","theme",e=>e]],M_=[["mode","mode",e=>e],["position","position",e=>e],["iframe","iframe",Dt]],L_=[["width","width"],["height","height"]],O_=[["response-mode","responseMode",e=>e],["start-minimized","startMinimized",Dt],["show-reasoning","showReasoning",Dt],["show-tool-calls","showToolCalls",Dt],["show-sources","showSources",Dt],["disable-message-feedback","disableMessageFeedback",Dt],["auto-send-suggestions","autoSendSuggestions",Dt],["pop-out-url","popOutUrl"]],N_=[["locale","locale"]],kv=new Set(E_);var D_=[["launcher-variant","variant",e=>e],["launcher-size","size",e=>e],["launcher-icon","icon"],["launcher-hidden","hidden",Dt]],$_=[["features-disable-file-upload","disableFileUpload",Dt],["features-voice","voice",e=>e]],F_=[["endpoint-upload","upload"],["endpoint-transcribe","transcribe"]],B_=[["user-id","id"],["user-email","email"],["user-name","name"]],U_=[["page-area","area"],["page-url","url"],["page-path","path"],["page-title","title"]],H_=["launcher-label","callout-text","callout-delay","actions","user-context","page-context"],z_=[A_,M_,L_,O_,N_,D_,$_,F_,B_,U_],q_=new Set(["iframe","start-minimized"]),V_=[...z_.flatMap(e=>e.map(([t])=>t).filter(t=>!q_.has(t))),...H_];function xs(e){return`${T.cssPrefix}:${e}`}function eo(e,t,n){e.dispatchEvent(new CustomEvent(xs(t),{detail:n}))}function Ss(e,t){let o=Object.entries(t).map(([r,a])=>{let s=xs(r),l=c=>a(c.detail);return e.addEventListener(s,l),[s,l]});return()=>{for(let[r,a]of o)e.removeEventListener(r,a)}}function pt(){let e=Date.now(),t=new Uint8Array(16);t[0]=Math.floor(e/2**40)&255,t[1]=Math.floor(e/2**32)&255,t[2]=e>>>24&255,t[3]=e>>>16&255,t[4]=e>>>8&255,t[5]=e&255,W_(t.subarray(6)),t[6]=t[6]&15|112,t[8]=t[8]&63|128;let n=Array.from(t,o=>o.toString(16).padStart(2,"0")).join("");return`${n.slice(0,8)}-${n.slice(8,12)}-${n.slice(12,16)}-${n.slice(16,20)}-${n.slice(20)}`}function W_(e){if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"){crypto.getRandomValues(e);return}for(let t=0;t<e.length;t++)e[t]=Math.floor(Math.random()*256)}var jt=Z.scope("persistence");function Cn(e,t=Uo,n){let o=n?`${e}.${n}`:e,r=`${T.cssPrefix}.storageVersion`,a=t.get(r)??void 0,s=a?`.v${a}`:"",l=`${T.cssPrefix}.${o}${s}`,c=`${T.cssPrefix}${s}.visitorId`,d=`${l}.conversationId`,_=`${l}.userPrefs`,p=`${l}.panelOpen`,u=`${l}.panelSize`,m=`${l}.calloutDismissed`,g=`${l}.sidebarCollapsed`,P=`${l}.activeModule`,y=`${l}.historyCount`,w=`${l}.formsDone`,S={getVisitorId(){let h=t.get(c);if(h)return h;let b=pt();return t.set(c,b),b},loadConversationId(){return t.get(d)??void 0},saveConversationId(h){jt.trace("saveConversationId",{id:h,scope:o}),h?t.set(d,h):t.remove(d)},loadDraft(h){return t.get(`${l}.draft.${h}`)??""},saveDraft(h,b){let x=`${l}.draft.${h}`;b?t.set(x,b):t.remove(x)},loadMessageQueue(h){let b=t.get(`${l}.messageQueue.${h}`);if(!b)return[];try{let x=JSON.parse(b);return!Array.isArray(x)||!x.every(K_)?[]:x}catch(x){return jt.warn("loadMessageQueue parse failed",{error:x}),[]}},saveMessageQueue(h,b){let x=`${l}.messageQueue.${h}`;if(b.length===0){t.remove(x);return}try{t.set(x,JSON.stringify(b))}catch(k){jt.warn("saveMessageQueue serialise failed",{error:k})}},loadUserPrefs(){let h=t.get(_);if(!h)return{};try{return Ra(JSON.parse(h))}catch(b){return jt.warn("loadUserPrefs parse failed",{error:b}),{}}},saveUserPrefs(h){try{t.set(_,JSON.stringify(h))}catch(b){jt.warn("saveUserPrefs serialise failed",{error:b})}},patchUserPrefs(h){let b=S.loadUserPrefs();S.saveUserPrefs({...b,...h})},loadPanelOpen(){let h=t.get(p);return h==="1"?!0:h==="0"?!1:null},savePanelOpen(h){t.set(p,h?"1":"0")},loadPanelSize(){let h=t.get(u);return h==="normal"||h==="expanded"||h==="fullscreen"?h:null},savePanelSize(h){t.set(u,h)},loadCalloutDismissed(h){if(!h)return!1;let b=t.get(m);return!!b&&b===h},saveCalloutDismissed(h){h?t.set(m,h):t.remove(m)},loadSidebarCollapsed(){let h=t.get(g);return h==="1"?!0:h==="0"?!1:null},saveSidebarCollapsed(h){t.set(g,h?"1":"0")},loadActiveModule(){return t.get(P)||null},saveActiveModule(h){t.set(P,h)},loadHistoryCount(){let h=t.get(y);if(!h)return null;let b=Number.parseInt(h,10);return Number.isFinite(b)&&b>=0?b:null},saveHistoryCount(h){t.set(y,String(h))},loadFormsDone(){let h=t.get(w);if(!h)return{};try{let b=JSON.parse(h);return Wo(b)?Object.fromEntries(Object.entries(b).filter(x=>typeof x[1]=="number")):{}}catch(b){return jt.warn("loadFormsDone parse failed",{error:b}),{}}},saveFormDone(h){try{let b=S.loadFormsDone();b[h]=Date.now(),t.set(w,JSON.stringify(b))}catch(b){jt.warn("saveFormDone serialise failed",{error:b})}},rememberStorageVersion(h){h&&h!==t.get(r)&&(jt.debug("rememberStorageVersion (force-reset on next load)",{version:h}),t.set(r,h))},clearConversation(){t.remove(d)}};return S}function Wo(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function K_(e){return Wo(e)&&typeof e.id=="string"&&e.id.length>0&&typeof e.text=="string"}function Ra(e){if(!Wo(e))return{};let t={};return typeof e.locale=="string"&&(t.locale=e.locale),typeof e.soundMuted=="boolean"&&(t.soundMuted=e.soundMuted),(e.themeMode==="auto"||e.themeMode==="light"||e.themeMode==="dark")&&(t.themeMode=e.themeMode),(e.textSize==="small"||e.textSize==="normal"||e.textSize==="large")&&(t.textSize=e.textSize),Wo(e.widgetSize)&&typeof e.widgetSize.width=="number"&&typeof e.widgetSize.height=="number"&&(t.widgetSize={width:e.widgetSize.width,height:e.widgetSize.height}),t}var ks=`:host{--__P__-accent-user: __BRAND_ACCENT__;--__P__-accent: var(--__P__-accent-user);--__P__-accent-text-user: __BRAND_ACCENT_TEXT__;--__P__-accent-text: var(--__P__-accent-text-user);--__P__-accent-fg: var(--__P__-accent);--__P__-radius: __BRAND_RADIUS__;--__P__-radius-sm: 8px;--__P__-radius-md: 10px;--__P__-radius-lg: 16px;--__P__-font: __BRAND_FONT__;--__P__-font-display: var(--__P__-font);--__P__-font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;--__P__-bg: oklch(1 0 0);--__P__-bg-elevated: oklch(.9789 .0029 278.3);--__P__-surface: var(--__P__-bg-elevated);--__P__-muted: var(--__P__-fg-muted);--__P__-hover: oklch(.1686 .011 278.3 / .06);--__P__-fg: oklch(.1686 .011 278.3);--__P__-fg-muted: oklch(.4932 .0301 278.3);--__P__-border: oklch(.9312 .0084 278.3);--__P__-border-strong: oklch(.8757 .0131 278.3);--__P__-bubble-user: var(--__P__-accent);--__P__-bubble-user-text: var(--__P__-accent-text);--__P__-bubble-assistant: oklch(.9638 .0058 278.3);--__P__-bubble-assistant-text: var(--__P__-fg);--__P__-on-accent: var(--__P__-accent-text);--__P__-success: oklch(.6456 .1654 151.53);--__P__-warning: oklch(.7135 .1494 74.05);--__P__-danger: oklch(.5966 .1818 24.51);--__P__-danger-text: oklch(.5054 .1905 27.52);--__P__-danger-bg: oklch(.5966 .1818 24.51 / .1);--__P__-neutral: oklch(.7137 .0192 278.3);--__P__-pill-l-min: .3;--__P__-pill-l-max: .46;--__P__-focus: var(--__P__-accent);--__P__-shadow-panel: 0 8px 24px -8px rgba(13, 15, 20, .18), 0 24px 64px -24px rgba(13, 15, 20, .24);--__P__-shadow-card: 0 1px 2px rgba(13, 15, 20, .06), 0 4px 12px -6px rgba(13, 15, 20, .12);--__P__-backdrop: oklch(.1686 .011 278.3 / .55);--__P__-shadow-fab: 0 6px 16px -4px color-mix(in oklch, var(--__P__-accent) 45%, transparent), 0 12px 32px -12px rgba(13, 15, 20, .25);--__P__-z-fab: 2147483600;--__P__-z-panel: 2147483601;--__P__-panel-w: 380px;--__P__-panel-h: 600px;--__P__-fab-size: 56px;--__P__-conversation-max: 768px;--__P__-space-1: 4px;--__P__-space-2: 8px;--__P__-space-3: 12px;--__P__-space-4: 16px;--__P__-space-5: 20px;--__P__-space-6: 24px;--__P__-space-8: 32px;--__P__-text-scale: 1;--__P__-text-xs: calc(12px * var(--__P__-text-scale));--__P__-text-sm: calc(13px * var(--__P__-text-scale));--__P__-text-base: calc(15px * var(--__P__-text-scale));--__P__-text-md: calc(16px * var(--__P__-text-scale));--__P__-text-lg: calc(18px * var(--__P__-text-scale));--__P__-text-xl: calc(22px * var(--__P__-text-scale));--__P__-text-2xl: calc(30px * var(--__P__-text-scale))}:host([data-mode="modal"]),:host([data-mode="drawer"]){--__P__-conversation-max: 100%}:host([data-text-size="small"]){--__P__-text-scale: .9}:host([data-text-size="large"]){--__P__-text-scale: 1.15}:host{--__P__-ease: cubic-bezier(.2, .7, .2, 1);--__P__-ease-out: cubic-bezier(.2, .7, .2, 1);--__P__-ease-in: cubic-bezier(.4, 0, 1, 1);--__P__-ease-in-out: cubic-bezier(.65, 0, .35, 1);--__P__-dur-quick: .12s;--__P__-dur-base: .22s;--__P__-dur-slow: .32s;font-family:var(--__P__-font);color:var(--__P__-fg);color-scheme:light;--__P__-color-scheme: light}:host([data-theme="dark"]){--__P__-bg: oklch(.1783 .0128 278.3);--__P__-bg-elevated: oklch(.2232 .0182 278.3);--__P__-fg: oklch(.9368 .01 278.3);--__P__-fg-muted: oklch(.7048 .0296 278.3);--__P__-border: oklch(.2752 .0266 278.3);--__P__-border-strong: oklch(.335 .0291 278.3);--__P__-hover: oklch(.9368 .01 278.3 / .08);--__P__-bubble-assistant: oklch(.2474 .0311 278.3);--__P__-bubble-assistant-text: var(--__P__-fg);--__P__-danger-text: oklch(.8077 .1035 19.57);--__P__-danger-bg: oklch(.5966 .1818 24.51 / .18);--__P__-shadow-panel: 0 8px 24px -8px rgba(0, 0, 0, .6), 0 24px 64px -24px rgba(0, 0, 0, .7);--__P__-shadow-card: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 12px -6px rgba(0, 0, 0, .5);--__P__-backdrop: rgba(0, 0, 0, .65);--__P__-pill-l-min: .75;--__P__-pill-l-max: .92;color-scheme:dark;--__P__-color-scheme: dark}@media(prefers-color-scheme:dark){:host([data-theme="auto"]){--__P__-bg: oklch(.1783 .0128 278.3);--__P__-bg-elevated: oklch(.2232 .0182 278.3);--__P__-fg: oklch(.9368 .01 278.3);--__P__-fg-muted: oklch(.7048 .0296 278.3);--__P__-border: oklch(.2752 .0266 278.3);--__P__-border-strong: oklch(.335 .0291 278.3);--__P__-hover: oklch(.9368 .01 278.3 / .08);--__P__-bubble-assistant: oklch(.2474 .0311 278.3);--__P__-bubble-assistant-text: var(--__P__-fg);--__P__-pill-l-min: .75;--__P__-pill-l-max: .92;--__P__-shadow-panel: 0 8px 24px -8px rgba(0, 0, 0, .6), 0 24px 64px -24px rgba(0, 0, 0, .7);color-scheme:dark;--__P__-color-scheme: dark}}@supports (color: oklch(from red l c h)){:host{--__P__-accent: oklch(from var(--__P__-accent-user) clamp(.3, l, .62) c h);--__P__-accent-text: oklch(from var(--__P__-accent) clamp(0, (l / .623 - 1) * -infinity, 1) 0 h);--__P__-accent-fg: oklch(from var(--__P__-accent-user) clamp(.3, l, .46) c h)}:host([data-theme="dark"]){--__P__-accent: oklch(from var(--__P__-accent-user) clamp(.65, l, .85) c h);--__P__-accent-fg: var(--__P__-accent)}@media(prefers-color-scheme:dark){:host([data-theme="auto"]){--__P__-accent: oklch(from var(--__P__-accent-user) clamp(.65, l, .85) c h);--__P__-accent-fg: var(--__P__-accent)}}}@media(prefers-reduced-motion:reduce){:host{--__P__-dur-quick: 1ms;--__P__-dur-base: 1ms;--__P__-dur-slow: 1ms}}
|
|
2
2
|
`;var ws=`*,*:before,*:after{box-sizing:border-box;margin:0;padding:0;border:0}button{font:inherit;color:inherit;background:none;cursor:pointer;-webkit-appearance:none;appearance:none;line-height:1}button:focus-visible,[tabindex]:focus-visible,textarea:focus-visible,input:focus-visible{outline:2px solid var(--__P__-accent);outline-offset:2px}textarea,input{font:inherit;color:inherit;background:none;border:0;outline:0;resize:none}a{color:var(--__P__-accent-fg);text-decoration:underline;text-underline-offset:2px}img,svg{display:block;max-width:100%}ul,ol{list-style:none}.__P__-app{display:block;width:100%;height:100%;font-family:var(--__P__-font);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-feature-settings:"cv11","ss01","ss03"}.__P__-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
|
|
3
3
|
`;var Cs=`.__P__-anchor{color-scheme:var(--__P__-color-scheme, light);right:16px;bottom:16px}.__P__-surface{display:contents}.__P__-surface[hidden]{display:none}:host([data-position="bottom-left"]) .__P__-anchor,:host([data-position="top-left"]) .__P__-anchor{right:auto;left:16px}:host([data-position="top-right"]) .__P__-anchor,:host([data-position="top-left"]) .__P__-anchor{bottom:auto;top:16px}.__P__-anchor{position:fixed;display:flex;flex-direction:column;align-items:flex-end;gap:var(--__P__-space-3);pointer-events:none}.__P__-anchor{--__P__-fab-size: 56px}.__P__-anchor[data-launcher-size=sm]{--__P__-fab-size: 44px}.__P__-anchor[data-launcher-size=md]{--__P__-fab-size: 56px}.__P__-anchor[data-launcher-size=lg]{--__P__-fab-size: 68px}.__P__-anchor>*{pointer-events:auto}.__P__-fab[data-size=sm]{--__P__-fab-size: 44px;font-size:var(--__P__-text-sm)}.__P__-fab[data-size=md]{--__P__-fab-size: 56px;font-size:calc(14px * var(--__P__-text-scale))}.__P__-fab[data-size=lg]{--__P__-fab-size: 68px;font-size:var(--__P__-text-base)}.__P__-fab{display:inline-flex;align-items:center;justify-content:center;gap:var(--__P__-space-2);color:var(--__P__-accent-text);background:var(--__P__-accent);box-shadow:var(--__P__-shadow-fab);font-weight:600;line-height:1;transform-origin:bottom right;animation:__P__-fab-in var(--__P__-dur-base) var(--__P__-ease) both;transition:transform var(--__P__-dur-base) var(--__P__-ease),opacity var(--__P__-dur-base) var(--__P__-ease),box-shadow var(--__P__-dur-base) var(--__P__-ease)}.__P__-fab:hover{transform:translateY(-2px)}.__P__-fab:active{transform:translateY(0)}.__P__-fab:focus-visible{outline:2px solid var(--__P__-on-accent);outline-offset:3px}.__P__-fab svg{width:24px;height:24px;flex-shrink:0}@keyframes __P__-fab-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:none}}.__P__-fab[data-leaving]{position:absolute;right:0;bottom:0;animation:__P__-fab-out var(--__P__-dur-quick) var(--__P__-ease) forwards;pointer-events:none}:host([data-position^="top-"]) .__P__-fab[data-leaving]{bottom:auto;top:0}:host([data-position$="-left"]) .__P__-fab[data-leaving]{right:auto;left:0}@keyframes __P__-fab-out{0%{opacity:1;transform:none}to{opacity:0;transform:scale(.85)}}.__P__-fab[data-variant=circle]{width:var(--__P__-fab-size);height:var(--__P__-fab-size);border-radius:999px}.__P__-fab[data-variant=circle] .__P__-fab-label{display:none}.__P__-fab[data-variant=pill]{height:var(--__P__-fab-size);padding:0 18px 0 16px;border-radius:999px}.__P__-fab[data-variant=bar]{height:var(--__P__-fab-size);padding:0 22px;border-radius:var(--__P__-radius)}.__P__-fab[data-variant=minimal]{height:var(--__P__-fab-size);padding:0 var(--__P__-space-4);border-radius:999px;background:transparent;color:var(--__P__-accent-fg);box-shadow:none;border:1px solid currentColor}.__P__-fab[data-variant=minimal]:hover{background:color-mix(in srgb,var(--__P__-accent) 12%,transparent)}.__P__-callout{--__P__-callout-fab-h: var(--__P__-fab-size, 56px);--__P__-callout-gap: clamp(12px, calc(var(--__P__-callout-fab-h) * .25), 22px);--__P__-callout-nudge-direction: -1;position:absolute;display:inline-flex;align-items:center;gap:var(--__P__-space-2);padding:10px 14px;background:var(--__P__-fg);color:var(--__P__-bg);border-radius:999px;font-size:var(--__P__-text-sm);font-weight:600;line-height:1.2;box-shadow:0 10px 30px -8px #00000059;pointer-events:auto;animation:__P__-callout-in var(--__P__-dur-slow) var(--__P__-ease);z-index:1;max-width:240px;white-space:nowrap}.__P__-callout[data-position=left]{right:calc(100% + var(--__P__-callout-gap));bottom:calc(var(--__P__-callout-fab-h) / 2);transform:translateY(50%)}.__P__-callout[data-position=right]{left:calc(100% + var(--__P__-callout-gap));bottom:calc(var(--__P__-callout-fab-h) / 2);transform:translateY(50%);--__P__-callout-nudge-direction: 1}.__P__-callout[data-position=top]{bottom:calc(100% + var(--__P__-callout-gap));right:0;max-width:min(280px,calc(100vw - 32px))}.__P__-callout[data-position=bottom]{top:calc(100% + var(--__P__-callout-gap));right:0;max-width:min(280px,calc(100vw - 32px))}:host([data-position$="-left"]) .__P__-callout[data-position=top],:host([data-position$="-left"]) .__P__-callout[data-position=bottom]{right:auto;left:0}.__P__-callout[data-shape=bubble]{border-radius:var(--__P__-radius-md);white-space:normal;width:max-content;max-width:min(280px,calc(100vw - 32px))}.__P__-callout[data-shape=callout]{padding:12px 18px;font-size:calc(14px * var(--__P__-text-scale));background:var(--__P__-accent);color:var(--__P__-accent-text)}.__P__-callout:after{content:"";position:absolute;width:12px;height:12px;background:inherit;border-radius:2px;transform:rotate(45deg)}.__P__-callout[data-position=left]:after{right:-5px;top:50%;margin-top:-6px}.__P__-callout[data-position=right]:after{left:-5px;top:50%;margin-top:-6px}.__P__-callout[data-position=top]:after{bottom:-5px;right:calc(var(--__P__-fab-size, 56px) / 2 - 6px)}.__P__-callout[data-position=bottom]:after{top:-5px;right:calc(var(--__P__-fab-size, 56px) / 2 - 6px)}:host([data-position$="-left"]) .__P__-callout[data-position=top]:after,:host([data-position$="-left"]) .__P__-callout[data-position=bottom]:after{right:auto;left:calc(var(--__P__-fab-size, 56px) / 2 - 6px)}.__P__-callout[data-animated]{animation:__P__-callout-in var(--__P__-dur-slow) var(--__P__-ease),__P__-callout-nudge 1.6s var(--__P__-ease-in-out) var(--__P__-dur-slow) infinite}@keyframes __P__-callout-in{0%{opacity:0}to{opacity:1}}@keyframes __P__-callout-nudge{0%,to{margin-left:0;margin-right:0}50%{margin-left:calc(6px * var(--__P__-callout-nudge-direction));margin-right:calc(-6px * var(--__P__-callout-nudge-direction))}}@media(prefers-reduced-motion:reduce){.__P__-callout[data-animated]{animation:__P__-callout-in 1ms var(--__P__-ease)}.__P__-icon-btn[data-recording=true],.__P__-typing span{animation:none}}.__P__-callout-close{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:999px;color:inherit;opacity:.7;cursor:pointer}.__P__-callout-close:hover{opacity:1;background:color-mix(in srgb,currentColor 15%,transparent)}.__P__-callout-close:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-callout-close svg{width:12px;height:12px}.__P__-panel{width:var(--__P__-panel-w);height:var(--__P__-panel-h);max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);background:var(--__P__-bg);color:var(--__P__-fg);border-radius:var(--__P__-radius-lg);box-shadow:var(--__P__-shadow-panel);display:flex;flex-direction:column;overflow:hidden;overscroll-behavior:none;transform-origin:bottom right;animation:__P__-panel-in var(--__P__-dur-slow) var(--__P__-ease);border:1px solid var(--__P__-border)}@media(prefers-reduced-motion:no-preference){.__P__-panel{transition:width var(--__P__-dur-base) var(--__P__-ease),height var(--__P__-dur-base) var(--__P__-ease),max-width var(--__P__-dur-base) var(--__P__-ease),max-height var(--__P__-dur-base) var(--__P__-ease)}.__P__-panel[data-resizing]{transition:none}}:host([data-mode="open"]) .__P__-panel{width:var(--__P__-widget-w, var(--__P__-panel-w));height:var(--__P__-widget-h, var(--__P__-panel-h));min-width:var(--__P__-resize-min-w, auto);min-height:var(--__P__-resize-min-h, auto);max-width:var(--__P__-resize-max-w, calc(100vw - 32px) );max-height:var(--__P__-resize-max-h, calc(100dvh - 32px) )}@keyframes __P__-panel-in{0%{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:none}}:host([data-mode="expanded"]) .__P__-panel{width:var(--__P__-expanded-w, 640px);height:var(--__P__-expanded-h, 820px);max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px)}:host([data-mode="fullscreen"]){z-index:var(--__P__-z-panel)!important}:host([data-mode="fullscreen"]) .__P__-anchor{inset:var(--__P__-visual-viewport-top, 0px) 0 auto;height:var(--__P__-visual-viewport-height, 100dvh);padding:0;justify-content:flex-end;align-items:flex-end}:host([data-mode="fullscreen"][data-position*="top"]) .__P__-anchor{justify-content:flex-start}:host([data-mode="fullscreen"][data-position*="left"]) .__P__-anchor{align-items:flex-start}:host([data-mode="fullscreen"]) .__P__-panel{width:100vw;height:100%;max-width:none;max-height:none;border-radius:0;border:0}:host([data-mode="fullscreen"]) .__P__-fab{display:none}@media(max-width:640px){:host([data-mode="open"]) .__P__-anchor,:host([data-mode="expanded"]) .__P__-anchor{inset:var(--__P__-visual-viewport-top, 0px) 0 auto;align-items:stretch;height:var(--__P__-visual-viewport-height, 100dvh);padding:0}:host([data-mode="open"]) .__P__-panel,:host([data-mode="expanded"]) .__P__-panel{width:100vw;height:100%;max-width:none;max-height:none;border-radius:0;border:0}}:host([data-mode="inline"]) .__P__-anchor,:host([data-mode="standalone"]) .__P__-anchor{position:static;inset:auto;padding:0;align-items:stretch;width:100%;height:100%;min-height:0}:host([data-mode="inline"]) .__P__-panel,:host([data-mode="standalone"]) .__P__-panel{width:100%;height:100%;min-width:0;min-height:0;max-width:none;max-height:none;animation:none}:host([data-mode="inline"]) .__P__-fab,:host([data-mode="standalone"]) .__P__-fab{display:none}:host([data-mode="inline"]){min-height:320px}:host([data-mode="inline"]) .__P__-panel{border-radius:var(--__P__-radius)}:host([data-mode="standalone"]) .__P__-panel{border-radius:0;border:0;box-shadow:none}:host([data-mode="modal"]){position:fixed!important;inset:0!important;z-index:var(--__P__-z-panel)!important;display:block!important;width:100vw;height:100dvh;background:var(--__P__-modal-backdrop, var(--__P__-backdrop));animation:__P__-backdrop-in var(--__P__-dur-base) var(--__P__-ease) both;--__P__-panel-w: min(960px, 92vw);--__P__-panel-h: min(720px, 88dvh)}:host([data-mode="modal"]) .__P__-anchor{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:var(--__P__-space-6);pointer-events:none}:host([data-mode="modal"]) .__P__-panel{pointer-events:auto;width:var(--__P__-widget-w, var(--__P__-panel-w));height:var(--__P__-widget-h, var(--__P__-panel-h));max-width:calc(100vw - 48px);max-height:calc(100dvh - 48px);min-width:0;min-height:0;border-radius:var(--__P__-radius);box-shadow:var(--__P__-shadow-panel);animation:__P__-modal-in var(--__P__-dur-base) var(--__P__-ease);translate:var(--__P__-modal-dx, 0px) var(--__P__-modal-dy, 0px)}:host([data-mode="modal"]) .__P__-header,:host([data-mode="modal"]) .__P__-back-header,:host([data-mode="modal"]) .__P__-home-hero{cursor:grab;touch-action:none}:host([data-mode="modal"]) .__P__-panel[data-dragging]{cursor:grabbing;user-select:none}:host([data-mode="modal"]) .__P__-panel[data-dragging] *{cursor:grabbing}:host([data-mode="modal"]) .__P__-fab{display:none}@keyframes __P__-backdrop-in{0%{background:#0000}to{background:var(--__P__-modal-backdrop, var(--__P__-backdrop))}}@keyframes __P__-modal-in{0%{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}:host([data-mode="drawer"]){--__P__-panel-w: min(440px, calc(100vw - 32px) );--__P__-panel-h: 100dvh}:host([data-mode="drawer"]) .__P__-anchor{position:fixed;--__P__-inset-x: var(--__P__-panel-inset, 12px);--__P__-inset-y: var(--__P__-panel-inset, 3dvh);top:var(--__P__-inset-y);bottom:auto;right:var(--__P__-inset-x);left:auto;width:min(var(--__P__-widget-w, var(--__P__-panel-w)),calc(100vw - var(--__P__-inset-x) * 2));height:min(var(--__P__-widget-h, var(--__P__-panel-h)),calc(100dvh - var(--__P__-inset-y) * 2));padding:0;display:block;pointer-events:auto}:host([data-mode="drawer"][data-position$="-left"]) .__P__-anchor{right:auto;left:var(--__P__-inset-x)}:host([data-mode="drawer"][data-position^="bottom-"]) .__P__-anchor{top:auto;bottom:var(--__P__-inset-y)}:host([data-mode="drawer"]) .__P__-panel{width:100%;height:100%;max-width:none;max-height:none;min-width:0;min-height:0;border-radius:var(--__P__-radius, 12px);border:1px solid var(--__P__-border);box-shadow:-8px 16px 32px -12px #00000038;animation:__P__-drawer-in var(--__P__-dur-base) var(--__P__-ease)}:host([data-mode="drawer"][data-position$="-left"]) .__P__-panel{box-shadow:8px 16px 32px -12px #00000038;animation:__P__-drawer-in-left var(--__P__-dur-base) var(--__P__-ease)}.__P__-fab[data-edge-tab]{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--__P__-space-2);position:fixed;top:50%;height:140px;width:auto;min-width:0;padding:10px 8px;writing-mode:vertical-rl;text-orientation:mixed;transform:translateY(-50%);transform-origin:center;animation:__P__-edge-tab-in var(--__P__-dur-base) var(--__P__-ease) both}.__P__-fab[data-edge-tab] svg{writing-mode:horizontal-tb}.__P__-fab[data-edge-tab]:hover{transform:translateY(-50%) scale(1.03)}.__P__-fab[data-edge-tab]:active{transform:translateY(-50%) scale(.97)}:host([data-position$="-right"]) .__P__-fab[data-edge-tab]{right:0;left:auto;border-radius:12px 0 0 12px;box-shadow:-6px 0 18px -8px #0000004d}:host([data-position$="-left"]) .__P__-fab[data-edge-tab]{left:0;right:auto;border-radius:0 12px 12px 0;box-shadow:6px 0 18px -8px #0000004d}.__P__-fab[data-edge-tab][data-leaving]{position:fixed;top:50%;bottom:auto;animation:__P__-edge-tab-out var(--__P__-dur-quick) var(--__P__-ease) forwards}@keyframes __P__-edge-tab-in{0%{opacity:0;transform:translateY(-50%) scale(.9)}to{opacity:1;transform:translateY(-50%) scale(1)}}@keyframes __P__-edge-tab-out{0%{opacity:1;transform:translateY(-50%) scale(1)}to{opacity:0;transform:translateY(-50%) scale(.85)}}@keyframes __P__-drawer-in{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes __P__-drawer-in-left{0%{transform:translate(-100%)}to{transform:translate(0)}}@media(prefers-reduced-motion:reduce){:host([data-mode="drawer"]) .__P__-panel,.__P__-fab[data-edge-tab]{animation:none}}.__P__-header{display:flex;align-items:center;gap:var(--__P__-space-2);padding:10px 12px;border-bottom:1px solid var(--__P__-border);background:var(--__P__-bg)}.__P__-header h1{font-size:calc(14px * var(--__P__-text-scale));font-weight:600;flex:1;letter-spacing:-.01em}.__P__-header-actions{margin-inline-start:auto;display:flex;align-items:center;gap:var(--__P__-space-1);flex-shrink:0}.__P__-agent{flex:1;display:inline-flex;align-items:center;gap:10px;min-width:0}.__P__-agent-avatar{position:relative;width:32px;height:32px;border-radius:999px;background:var(--__P__-bg-elevated);color:var(--__P__-fg-muted);display:inline-flex;align-items:center;justify-content:center;font-weight:700;font-size:var(--__P__-text-xs);overflow:hidden;flex-shrink:0}.__P__-agent-avatar img{width:100%;height:100%;object-fit:cover}.__P__-agent-avatar:after{content:"";position:absolute;right:-1px;bottom:-1px;width:10px;height:10px;border-radius:999px;border:2px solid var(--__P__-bg);background:var(--__P__-neutral)}.__P__-agent-avatar[data-status=online]:after{background:var(--__P__-success)}.__P__-agent-avatar[data-status=away]:after{background:var(--__P__-warning)}.__P__-agent-avatar[data-status=offline]:after{background:var(--__P__-neutral)}.__P__-agent-meta{display:flex;flex-direction:column;line-height:1.15;min-width:0}.__P__-agent-meta strong{font-size:calc(14px * var(--__P__-text-scale));font-weight:600;letter-spacing:-.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-agent-meta span{font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-suggestions{display:flex;flex-wrap:nowrap;gap:var(--__P__-space-2);padding:6px 14px 10px;overflow-x:auto;overflow-y:hidden;scroll-behavior:smooth;scroll-snap-type:x proximity;scrollbar-width:none;-ms-overflow-style:none;min-width:0}.__P__-suggestions::-webkit-scrollbar{display:none}.__P__-suggestions:before,.__P__-suggestions:after{content:"";flex:1 1 0;min-width:0}.__P__-suggestion{flex:0 0 auto;scroll-snap-align:center;padding:7px 14px;border-radius:999px;background:var(--__P__-bg-elevated);border:1px solid var(--__P__-border);color:var(--__P__-fg);font-size:var(--__P__-text-sm);font-weight:500;white-space:nowrap;transition:background var(--__P__-dur-quick) var(--__P__-ease),border-color var(--__P__-dur-quick) var(--__P__-ease),transform var(--__P__-dur-quick) var(--__P__-ease)}.__P__-suggestion:hover{border-color:var(--__P__-accent);color:var(--__P__-accent-fg);transform:translateY(-1px)}.__P__-suggestion:focus-visible{outline:2px solid var(--__P__-accent);outline-offset:2px;border-color:var(--__P__-accent)}.__P__-suggestion:active{transform:translateY(0)}.__P__-icon-btn{width:32px;height:32px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;color:var(--__P__-fg-muted);transition:background var(--__P__-dur-quick) var(--__P__-ease),color var(--__P__-dur-quick) var(--__P__-ease)}.__P__-icon-btn:hover{background:var(--__P__-bg-elevated);color:var(--__P__-fg)}.__P__-icon-btn:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-icon-btn:active{background:var(--__P__-border)}.__P__-icon-btn:disabled{opacity:.45;cursor:not-allowed}.__P__-icon-btn:before{content:"";position:absolute;inset:-6px}.__P__-icon-btn{position:relative}.__P__-icon-btn svg{width:18px;height:18px}.__P__-icon-btn[data-recording=true]{color:var(--__P__-accent-fg);background:color-mix(in srgb,var(--__P__-accent) 12%,transparent);animation:__P__-pulse 1.2s var(--__P__-ease) infinite}@keyframes __P__-pulse{0%,to{box-shadow:0 0 color-mix(in srgb,var(--__P__-accent) 40%,transparent)}50%{box-shadow:0 0 0 6px color-mix(in srgb,var(--__P__-accent) 0%,transparent)}}.__P__-list,.__P__-history,.__P__-module-scroll,.__P__-home-scroll,.__P__-help-list,.__P__-toolui-code,.__P__-sidebar-conversations{scrollbar-width:thin;scrollbar-color:var(--__P__-border-strong) transparent;overscroll-behavior:contain;scrollbar-gutter:stable}.__P__-list::-webkit-scrollbar,.__P__-history::-webkit-scrollbar,.__P__-module-scroll::-webkit-scrollbar,.__P__-home-scroll::-webkit-scrollbar,.__P__-help-list::-webkit-scrollbar,.__P__-toolui-code::-webkit-scrollbar,.__P__-sidebar-conversations::-webkit-scrollbar{width:8px}.__P__-list::-webkit-scrollbar-thumb,.__P__-history::-webkit-scrollbar-thumb,.__P__-module-scroll::-webkit-scrollbar-thumb,.__P__-home-scroll::-webkit-scrollbar-thumb,.__P__-help-list::-webkit-scrollbar-thumb,.__P__-toolui-code::-webkit-scrollbar-thumb,.__P__-sidebar-conversations::-webkit-scrollbar-thumb{background:var(--__P__-border-strong);border-radius:8px}.__P__-list-wrap{position:relative;flex:1;min-height:0;display:flex;flex-direction:column}.__P__-jump{position:absolute;inset-inline-end:14px;bottom:14px;z-index:2;display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:999px;border:1px solid var(--__P__-border);background:var(--__P__-bg-elevated);color:var(--__P__-fg);box-shadow:var(--__P__-shadow-panel);cursor:pointer;opacity:.85;transition:opacity var(--__P__-dur-quick) var(--__P__-ease),transform var(--__P__-dur-quick) var(--__P__-ease);animation:__P__-bubble-in var(--__P__-dur-base) var(--__P__-ease)}.__P__-jump:hover{opacity:1}.__P__-jump:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px;opacity:1}.__P__-jump:active{transform:translateY(1px)}.__P__-jump svg{width:18px;height:18px}.__P__-list{flex:1;min-height:0;overflow-y:auto;padding:var(--__P__-space-4);padding-bottom:var(--__P__-space-8);display:flex;flex-direction:column;gap:14px}.__P__-list--fade{--__P__-fade-size: 20px;--__P__-fade-top: 0px;--__P__-fade-bottom: 0px;-webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 var(--__P__-fade-top),#000 calc(100% - var(--__P__-fade-bottom)),transparent 100%);mask-image:linear-gradient(to bottom,transparent 0,#000 var(--__P__-fade-top),#000 calc(100% - var(--__P__-fade-bottom)),transparent 100%)}.__P__-list--fade[data-fade-top=true]{--__P__-fade-top: var(--__P__-fade-size)}.__P__-list--fade[data-fade-bottom=true]{--__P__-fade-bottom: var(--__P__-fade-size)}.__P__-list>*{width:100%;max-width:var(--__P__-conversation-max, 768px);margin-inline:auto}.__P__-load-previous,.__P__-history-more{display:flex;justify-content:center}.__P__-load-previous button,.__P__-history-more button{border:0;padding:4px 8px;background:transparent;color:var(--__P__-accent);font:inherit;font-size:var(--__P__-text-sm);font-weight:600;cursor:pointer}.__P__-load-previous button:hover,.__P__-history-more button:hover{text-decoration:underline}.__P__-load-previous button:focus-visible,.__P__-history-more button:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px;border-radius:var(--__P__-radius-sm)}.__P__-load-previous button:disabled,.__P__-history-more button:disabled{cursor:wait;opacity:.6}.__P__-date-divider{display:flex;justify-content:center;margin-block:var(--__P__-space-3)}.__P__-date-pill{padding:3px 10px;border-radius:999px;font-size:calc(11px * var(--__P__-text-scale));font-weight:600;color:var(--__P__-fg-muted);background:var(--__P__-bg-elevated);border:1px solid var(--__P__-border);box-shadow:var(--__P__-shadow-card)}.__P__-bubble-row{display:flex}.__P__-bubble-row[data-role=user]{justify-content:flex-end}.__P__-bubble-row[data-role=assistant]{justify-content:flex-start}.__P__-bubble{max-width:100%;min-width:0;padding:var(--__P__-space-3) var(--__P__-space-4);border-radius:var(--__P__-radius);line-height:1.6;font-size:calc(14px * var(--__P__-text-scale));word-wrap:break-word;overflow-wrap:break-word;box-shadow:0 1px 2px #0000000a,0 1px 8px -4px #0000000f;animation:__P__-bubble-in var(--__P__-dur-base) var(--__P__-ease)}.__P__-bubble ::selection{background:color-mix(in srgb,var(--__P__-accent) 30%,transparent)}.__P__-bubble-row[data-role=user] .__P__-bubble ::selection{background:#fff6;color:var(--__P__-bubble-user-text)}@keyframes __P__-bubble-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}.__P__-bubble-row[data-role=user] .__P__-bubble{background:var(--__P__-bubble-user);color:var(--__P__-bubble-user-text);border-end-end-radius:5px}.__P__-bubble-row[data-role=assistant] .__P__-bubble{background:var(--__P__-bubble-assistant);color:var(--__P__-bubble-assistant-text);border:1px solid var(--__P__-border);border-end-start-radius:5px}.__P__-bubble-row[data-role=operator] .__P__-bubble{display:flex;align-items:stretch;padding:0;overflow:hidden;background:var(--__P__-bubble-assistant);color:var(--__P__-bubble-assistant-text);border-end-start-radius:5px}.__P__-bubble-row[data-role=operator] .__P__-bubble-col{align-items:flex-start}.__P__-bubble-author{display:flex;flex:0 0 auto;align-items:center;padding:0 .875rem;border-inline-end:1px solid color-mix(in oklab,var(--__P__-accent),transparent 60%);color:var(--__P__-accent);font-size:calc(13px * var(--__P__-text-scale));font-weight:600;letter-spacing:.025em;user-select:none}.__P__-bubble-row[data-role=operator] .__P__-bubble-body{flex:1 1 auto;min-width:0;padding:var(--__P__-space-3) var(--__P__-space-4)}.__P__-bubble-col{display:flex;flex-direction:column;max-width:85%;min-width:0}.__P__-bubble-row[data-role=user] .__P__-bubble-col{align-items:flex-end}.__P__-bubble-row[data-role=assistant] .__P__-bubble-col{align-items:flex-start}.__P__-bubble-row[data-role=assistant] .__P__-bubble-col:has(.__P__-toolui){width:100%}.__P__-bubble-row[data-role=assistant] .__P__-bubble-col:has(.__P__-toolui) .__P__-bubble{width:100%}@media(max-width:640px){.__P__-bubble-col{max-width:92%}.__P__-toolui:not(.__P__-toolui-collapsible){padding:var(--__P__-space-3);gap:var(--__P__-space-2)}details.__P__-toolui-collapsible>summary{padding:var(--__P__-space-2) var(--__P__-space-3)}details.__P__-toolui-collapsible>.__P__-toolui-section{margin:var(--__P__-space-3)}.__P__-toolui-section,.__P__-toolui-desc{padding:var(--__P__-space-2) var(--__P__-space-3)}}.__P__-bubble-meta{display:flex;align-items:center;gap:8px;margin-top:2px;padding:0 2px;min-height:24px}.__P__-bubble-actions{display:flex;align-items:center;gap:2px}.__P__-bubble-time{font-size:calc(11px * var(--__P__-text-scale));line-height:1;color:var(--__P__-fg-muted);user-select:none}.__P__-feedback{display:flex;align-items:center;gap:2px}.__P__-msg-action{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border:0;border-radius:var(--__P__-radius-sm);background:transparent;color:var(--__P__-fg-muted);cursor:pointer;opacity:.65;transition:opacity var(--__P__-dur-quick) var(--__P__-ease),background var(--__P__-dur-quick) var(--__P__-ease),color var(--__P__-dur-quick) var(--__P__-ease)}.__P__-msg-action:hover{opacity:1;background:var(--__P__-bg-elevated);color:var(--__P__-fg)}.__P__-msg-action:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px;opacity:1}.__P__-msg-action[data-active=true]{opacity:1;color:var(--__P__-accent-fg)}.__P__-msg-action svg{width:15px;height:15px}.__P__-md>*:first-child{margin-top:0}.__P__-md>*:last-child{margin-bottom:0}.__P__-md p{margin:10px 0}.__P__-md h1,.__P__-md h2,.__P__-md h3,.__P__-md h4,.__P__-md h5,.__P__-md h6{margin:18px 0 8px;line-height:1.3;letter-spacing:-.01em;font-weight:700}.__P__-md h1{font-size:1.4em}.__P__-md h2{font-size:1.22em}.__P__-md h3{font-size:1.08em}.__P__-md h4,.__P__-md h5,.__P__-md h6{font-size:1em}.__P__-md>h1:first-child,.__P__-md>h2:first-child,.__P__-md>h3:first-child,.__P__-md>h4:first-child,.__P__-md>h5:first-child,.__P__-md>h6:first-child{margin-top:0}.__P__-md ul,.__P__-md ol{padding-inline-start:1.5em;margin:10px 0}.__P__-md ul{list-style:disc}.__P__-md ol{list-style:decimal}.__P__-md li{margin:6px 0;padding-inline-start:2px}.__P__-md li::marker{color:var(--__P__-fg-muted)}.__P__-md li>p{margin:6px 0}.__P__-md li>ul,.__P__-md li>ol{margin:6px 0}.__P__-md strong,.__P__-md b{font-weight:650;letter-spacing:-.005em}.__P__-md em,.__P__-md i{font-style:italic}.__P__-md code{font-family:var(--__P__-font-mono);font-size:.86em;padding:1px 6px;border-radius:5px;background:color-mix(in srgb,var(--__P__-accent) 10%,transparent);color:var(--__P__-fg);border:1px solid color-mix(in srgb,var(--__P__-accent) 16%,transparent)}.__P__-md pre{font-family:var(--__P__-font-mono);font-size:calc(12.5px * var(--__P__-text-scale));padding:12px 14px;border-radius:var(--__P__-radius-sm);background:#7f7f7f1f;overflow-x:auto;margin:var(--__P__-space-3) 0;line-height:1.5}.__P__-md pre code{padding:0;background:none}.__P__-md a{color:inherit;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px}.__P__-md a:hover{text-decoration-thickness:2px}.__P__-md blockquote{margin:14px 0;padding:6px 14px;border-inline-start:3px solid color-mix(in srgb,var(--__P__-accent) 50%,transparent);background:color-mix(in srgb,var(--__P__-accent) 5%,transparent);border-start-end-radius:var(--__P__-radius-sm);border-end-end-radius:var(--__P__-radius-sm);color:var(--__P__-fg-muted)}.__P__-md blockquote>:first-child{margin-top:0}.__P__-md blockquote>:last-child{margin-bottom:0}.__P__-md hr{border:0;height:1px;background:color-mix(in srgb,currentColor 18%,transparent);margin:var(--__P__-space-4) 0}.__P__-md table{border-collapse:collapse;margin:var(--__P__-space-3) 0;font-size:.95em;display:block;overflow-x:auto;max-width:100%;font-variant-numeric:tabular-nums}.__P__-md th,.__P__-md td{padding:6px 10px;border-bottom:1px solid color-mix(in srgb,currentColor 12%,transparent);text-align:start}.__P__-md th{font-weight:700;background:color-mix(in srgb,currentColor 6%,transparent)}.__P__-md h1+ul,.__P__-md h1+ol,.__P__-md h2+ul,.__P__-md h2+ol,.__P__-md h3+ul,.__P__-md h3+ol,.__P__-md h4+ul,.__P__-md h4+ol{margin-top:var(--__P__-space-1)}.__P__-loading{display:inline-flex;align-items:center;gap:var(--__P__-space-2);color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm)}.__P__-loading-spinner{width:14px;height:14px;border-radius:999px;border:2px solid currentColor;border-top-color:transparent;animation:__P__-spin .8s linear infinite}@keyframes __P__-spin{to{transform:rotate(1turn)}}.__P__-typing{display:inline-flex;gap:var(--__P__-space-1);padding:var(--__P__-space-1) 0}.__P__-typing span{width:5px;height:5px;border-radius:999px;background:currentColor;opacity:.4;animation:__P__-blink 1.2s var(--__P__-ease) infinite}.__P__-typing span:nth-child(2){animation-delay:.2s}.__P__-typing span:nth-child(3){animation-delay:.4s}@keyframes __P__-blink{0%,80%,to{opacity:.3;transform:translateY(0)}40%{opacity:1;transform:translateY(-2px)}}.__P__-reasoning{margin:var(--__P__-space-1) 0 var(--__P__-space-2);padding-inline-start:var(--__P__-space-3);border-inline-start:2px solid var(--__P__-border-strong)}.__P__-reasoning-summary{display:inline-flex;align-items:center;gap:var(--__P__-space-1);cursor:pointer;list-style:none;user-select:none;color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);font-weight:600}.__P__-reasoning-summary:hover{color:var(--__P__-fg)}.__P__-reasoning-summary:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px;border-radius:var(--__P__-radius-sm)}.__P__-reasoning-summary::-webkit-details-marker{display:none}.__P__-reasoning-summary:before{content:"";width:5px;height:5px;border-inline-end:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(-45deg);opacity:.7;transition:transform var(--__P__-dur-quick) var(--__P__-ease)}.__P__-reasoning[open] .__P__-reasoning-summary:before{transform:rotate(45deg)}.__P__-reasoning[data-active=true] .__P__-reasoning-label{animation:__P__-reasoning-pulse 1.4s var(--__P__-ease) infinite}@keyframes __P__-reasoning-pulse{0%,to{opacity:.5}50%{opacity:1}}@media(prefers-reduced-motion:reduce){.__P__-reasoning[data-active=true] .__P__-reasoning-label{animation:none}}.__P__-reasoning-body{margin-top:var(--__P__-space-1);color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm)}.__P__-reasoning-body>:first-child{margin-top:0}.__P__-reasoning-body>:last-child{margin-bottom:0}.__P__-source{display:inline-flex;align-items:center;gap:6px;max-width:100%;margin-top:6px;margin-inline-end:6px;padding:var(--__P__-space-1) var(--__P__-space-2);border-radius:999px;background:var(--__P__-bg-elevated);border:1px solid var(--__P__-border);color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);text-decoration:none}a.__P__-source:hover{color:var(--__P__-fg);border-color:var(--__P__-accent)}.__P__-source-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-composer{border-top:1px solid var(--__P__-border);padding:10px 12px;background:var(--__P__-bg);display:flex;flex-direction:column;gap:var(--__P__-space-2)}.__P__-composer>*{width:100%;max-width:var(--__P__-conversation-max, 768px);margin-inline:auto}.__P__-compaction-status{width:100%;padding:10px 14px;justify-content:center;font-size:var(--__P__-text-xs)}.__P__-message-queue{display:flex;max-height:112px;flex-direction:column;gap:var(--__P__-space-1);overflow-y:auto}.__P__-attachment-chip.__P__-queued-message{width:100%;max-width:none}.__P__-queued-text{min-width:0;flex:1}.__P__-composer-row{display:flex;align-items:flex-end;gap:6px}.__P__-textarea{flex:1;--__P__-textarea-base-height: 40px;height:var(--__P__-textarea-base-height);max-height:160px;padding:10px 12px;border-radius:var(--__P__-radius);background:var(--__P__-bg-elevated);border:1px solid transparent;font-size:calc(14px * var(--__P__-text-scale));line-height:1.4;transition:height var(--__P__-dur-quick) var(--__P__-ease),border-color var(--__P__-dur-quick) var(--__P__-ease)}.__P__-textarea:focus-visible{outline:none;border-color:var(--__P__-focus)}@media(pointer:coarse){.__P__-textarea{--__P__-textarea-base-height: 44px}}.__P__-send{width:40px;height:40px;display:inline-flex;align-items:center;justify-content:center;border:1px solid transparent;transition:opacity var(--__P__-dur-quick) var(--__P__-ease),transform var(--__P__-dur-quick) var(--__P__-ease),background var(--__P__-dur-quick) var(--__P__-ease)}.__P__-send[data-shape=circle]{border-radius:999px}.__P__-send[data-shape=square]{border-radius:var(--__P__-radius-sm)}.__P__-send[data-shape=pill]{width:auto;padding:0 18px;border-radius:999px}.__P__-send[data-variant=filled]{background:var(--__P__-accent);color:var(--__P__-accent-text)}.__P__-send[data-variant=outline]{background:transparent;color:var(--__P__-accent-fg);border-color:var(--__P__-accent)}.__P__-send[data-variant=outline]:not(:disabled):hover{background:color-mix(in srgb,var(--__P__-accent) 10%,transparent)}.__P__-send[data-variant=ghost]{background:transparent;color:var(--__P__-accent-fg)}.__P__-send[data-variant=ghost]:not(:disabled):hover{background:color-mix(in srgb,var(--__P__-accent) 8%,transparent)}.__P__-send:disabled{opacity:.4;cursor:not-allowed}.__P__-send:not(:disabled):hover{transform:translateY(-1px)}.__P__-send:not(:disabled):active{transform:translateY(0)}.__P__-send:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-send svg{width:18px;height:18px}.__P__-composer-actions{display:flex;gap:var(--__P__-space-1);flex-wrap:wrap}.__P__-attachments{display:flex;flex-wrap:wrap;gap:6px}.__P__-attachment-chip{display:inline-flex;align-items:center;gap:6px;padding:var(--__P__-space-1) var(--__P__-space-2) var(--__P__-space-1) var(--__P__-space-1);border-radius:999px;background:var(--__P__-bg-elevated);border:1px solid var(--__P__-border);font-size:var(--__P__-text-xs);max-width:200px}.__P__-attachment-thumb{width:24px;height:24px;border-radius:999px;object-fit:cover;background:var(--__P__-border)}.__P__-attachment-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.__P__-attachment-remove{width:18px;height:18px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;color:var(--__P__-fg-muted)}.__P__-attachment-remove:hover{background:var(--__P__-border);color:var(--__P__-fg)}.__P__-dropzone{position:absolute;inset:8px;border:2px dashed var(--__P__-accent);border-radius:var(--__P__-radius);background:color-mix(in srgb,var(--__P__-accent) 8%,transparent);display:flex;align-items:center;justify-content:center;font-weight:600;color:var(--__P__-accent-fg);pointer-events:none;z-index:10;animation:__P__-fade-in var(--__P__-dur-quick) var(--__P__-ease)}@keyframes __P__-fade-in{0%{opacity:0}to{opacity:1}}.__P__-error{margin-top:var(--__P__-space-1);padding:8px 12px;border-radius:var(--__P__-radius-sm);background:color-mix(in oklab,var(--__P__-danger) 8%,var(--__P__-bg-elevated));border:1px solid color-mix(in oklab,var(--__P__-danger) 20%,transparent);color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm);display:flex;align-items:center;gap:var(--__P__-space-2)}.__P__-error span{min-width:0}.__P__-error button{margin-inline-start:auto;flex-shrink:0;border:0;background:none;padding:0;color:var(--__P__-accent-fg);font:inherit;font-size:var(--__P__-text-sm);font-weight:600;text-decoration:underline;white-space:nowrap;cursor:pointer}.__P__-history{flex:1;overflow-y:auto;padding:var(--__P__-space-2) var(--__P__-space-1) var(--__P__-space-3)}.__P__-history-footer{flex:none;padding:var(--__P__-space-2) var(--__P__-space-3) var(--__P__-space-3);border-top:1px solid var(--__P__-border);background:var(--__P__-surface)}.__P__-history-new{width:100%;display:flex;align-items:center;justify-content:center;gap:var(--__P__-space-2);padding:var(--__P__-space-2) var(--__P__-space-3);border:none;border-radius:var(--__P__-radius-md);background:var(--__P__-accent);color:var(--__P__-on-accent);cursor:pointer;font-size:var(--__P__-text-sm);font-weight:600;transition:filter var(--__P__-dur-quick) var(--__P__-ease-out),transform var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-history-new svg{width:16px;height:16px}.__P__-history-new:hover{filter:brightness(1.08)}.__P__-history-new:active{transform:translateY(1px)}.__P__-history-new:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-history-empty{flex:1;display:flex;align-items:center;justify-content:center;padding:40px 16px;color:var(--__P__-fg-muted);font-size:calc(14px * var(--__P__-text-scale));text-align:center}.__P__-history-group{display:flex;flex-direction:column;padding:0 var(--__P__-space-3)}.__P__-history-heading{font-size:var(--__P__-text-xs);font-weight:600;color:var(--__P__-fg-muted);padding:14px 4px 8px;text-transform:uppercase;letter-spacing:.04em}.__P__-history-card{display:flex;flex-direction:column;background:var(--__P__-surface);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-lg, 14px);overflow:hidden}.__P__-history-item{all:unset;display:flex;align-items:center;gap:var(--__P__-space-3);padding:12px var(--__P__-space-3);cursor:pointer;transition:background var(--__P__-dur-base) var(--__P__-ease)}.__P__-history-item+.__P__-history-item{border-top:1px solid var(--__P__-border)}.__P__-history-item:hover{background:var(--__P__-bg-elevated)}.__P__-history-item:focus-visible{background:var(--__P__-bg-elevated);outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-history-avatar{flex:none;display:grid;place-items:center;width:36px;height:36px;border-radius:50%;background:color-mix(in oklab,var(--__P__-accent) 12%,transparent);color:var(--__P__-accent-fg)}.__P__-history-avatar svg{width:18px;height:18px}.__P__-history-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.__P__-history-row{display:flex;align-items:center;justify-content:space-between;gap:var(--__P__-space-2)}.__P__-history-title{flex:1;min-width:0;font-size:calc(14px * var(--__P__-text-scale));font-weight:500;color:var(--__P__-fg);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-history-time{flex:none;font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted)}.__P__-history-preview{flex:1;min-width:0;font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-history-dot{flex:none;width:8px;height:8px;border-radius:50%;background:var(--__P__-accent)}.__P__-history-item[data-unread=true] .__P__-history-title{font-weight:600}.__P__-history-item[data-closed=true] .__P__-history-title{color:var(--__P__-fg-muted)}.__P__-history-item-skeleton{cursor:default;pointer-events:none}.__P__-skeleton{display:block;border-radius:4px;background:linear-gradient(90deg,color-mix(in oklab,var(--__P__-fg) 9%,transparent) 30%,color-mix(in oklab,var(--__P__-fg) 17%,transparent),color-mix(in oklab,var(--__P__-fg) 9%,transparent) 70%);background-size:200% 100%;animation:__P__-skeleton-shimmer 1.8s ease-in-out infinite}.__P__-history-avatar.__P__-skeleton{border-radius:50%}.__P__-skeleton-heading{width:52px;height:8px}.__P__-skeleton-title{width:55%;height:12px}.__P__-skeleton-time{width:34px;height:10px}.__P__-skeleton-preview{width:80%;height:10px}@keyframes __P__-skeleton-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@media(prefers-reduced-motion:reduce){.__P__-skeleton{animation:none}}.__P__-list-loading{margin:auto;padding:var(--__P__-space-6) var(--__P__-space-4);color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm);text-align:center}.__P__-readonly-banner{display:flex;flex-direction:column;align-items:center;gap:10px;padding:14px 12px;margin:0 var(--__P__-space-3) var(--__P__-space-3);border-radius:var(--__P__-radius-md);background:var(--__P__-bg-elevated);color:var(--__P__-fg-muted);text-align:center;font-size:var(--__P__-text-sm)}.__P__-readonly-label{line-height:1.4}.__P__-readonly-cta{appearance:none;border:0;cursor:pointer;padding:var(--__P__-space-2) var(--__P__-space-4);border-radius:999px;background:var(--__P__-accent);color:var(--__P__-accent-text, #fff);font:inherit;font-weight:600;font-size:var(--__P__-text-sm);transition:filter var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-readonly-cta:hover,.__P__-readonly-cta:focus-visible{filter:brightness(1.1)}.__P__-operator-banner{display:flex;align-items:center;justify-content:center;gap:8px;margin:0 var(--__P__-space-3) var(--__P__-space-1);padding:8px 12px;border-radius:var(--__P__-radius-md);background:color-mix(in oklab,var(--__P__-bg-elevated),var(--__P__-accent) 6%);color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm);line-height:1.3;text-align:center}.__P__-operator-pulse{flex:0 0 auto;width:8px;height:8px;border-radius:50%;background:var(--__P__-accent)}.__P__-operator-banner[data-mode=awaiting-operator] .__P__-operator-pulse{animation:__P__-operator-pulse 1.4s var(--__P__-ease-out) infinite}.__P__-cancel-operator-request{flex:0 0 auto;padding:0;border:0;background:none;color:var(--__P__-accent);font:inherit;font-weight:600;text-decoration:underline;text-underline-offset:2px;cursor:pointer}.__P__-cancel-operator-request:hover{opacity:.8}.__P__-cancel-operator-request:focus-visible{outline:2px solid var(--__P__-accent);outline-offset:2px;border-radius:var(--__P__-radius-sm)}@keyframes __P__-operator-pulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.4;transform:scale(.7)}}.__P__-readonly-cta:focus-visible{outline:2px solid var(--__P__-accent);outline-offset:2px}.__P__-composer-footer{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:10px 16px;margin:0 var(--__P__-space-3);border-top:1px solid var(--__P__-border);text-align:center;font-size:calc(11px * var(--__P__-text-scale));line-height:1.4;color:var(--__P__-fg-muted)}.__P__-disclaimer{max-width:320px;margin:0 auto;opacity:.9;letter-spacing:.01em}.__P__-poweredby{display:inline-flex;align-items:center;justify-content:center;gap:6px;color:inherit;text-decoration:none;opacity:.7;transition:opacity var(--__P__-dur-base) var(--__P__-ease);font-size:calc(11px * var(--__P__-text-scale));letter-spacing:.02em}.__P__-poweredby:hover{opacity:1}.__P__-poweredby-logo{height:12px;width:auto;display:inline-block;vertical-align:middle}.__P__-poweredby-bar{flex:none;display:flex;align-items:center;justify-content:center;padding:6px 16px;border-top:1px solid var(--__P__-border);background:var(--__P__-bg-elevated)}.__P__-menu-wrap{position:relative;display:inline-flex}.__P__-menu{position:absolute;top:100%;inset-inline-end:0;margin-top:6px;min-width:200px;padding:6px;background:var(--__P__-bg);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);box-shadow:var(--__P__-shadow-panel);z-index:10;display:flex;flex-direction:column;gap:2px;animation:__P__-menu-in var(--__P__-dur-base) var(--__P__-ease)}@media(prefers-reduced-motion:reduce){.__P__-menu{animation:none}}@keyframes __P__-menu-in{0%{opacity:0;transform:translateY(-4px) scale(.98);transform-origin:top right}to{opacity:1;transform:none}}.__P__-menu-item{all:unset;display:flex;align-items:center;gap:10px;padding:8px 10px;font-size:var(--__P__-text-sm);color:var(--__P__-fg);border-radius:var(--__P__-radius-sm);cursor:pointer;user-select:none}.__P__-menu-item:hover{background:var(--__P__-bg-elevated)}.__P__-menu-item:focus-visible{background:var(--__P__-bg-elevated);outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-menu-item[disabled]{opacity:.45;cursor:not-allowed}.__P__-menu-icon{display:inline-flex;width:16px;height:16px;color:var(--__P__-fg-muted)}.__P__-menu-icon svg{width:16px;height:16px}.__P__-menu-label{flex:1}.__P__-menu-check{display:inline-flex;color:var(--__P__-accent-fg)}.__P__-menu-check svg{width:14px;height:14px}.__P__-menu-item-segmented{cursor:default}.__P__-menu-item-segmented:hover{background:transparent}.__P__-segmented{display:inline-flex;gap:2px;padding:2px;background:var(--__P__-bg-elevated);border-radius:var(--__P__-radius-sm)}.__P__-segment{all:unset;min-width:26px;padding:3px 8px;font-size:var(--__P__-text-xs);font-weight:600;letter-spacing:.02em;text-align:center;color:var(--__P__-fg-muted);border-radius:calc(var(--__P__-radius-sm) - 2px);cursor:pointer;transition:color .12s ease,background .12s ease}.__P__-segment:hover{color:var(--__P__-fg)}.__P__-segment[data-on=true]{background:var(--__P__-bg);color:var(--__P__-accent-fg);box-shadow:var(--__P__-shadow-card)}.__P__-segment:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-resize-grip{position:absolute;width:18px;height:18px;display:flex;align-items:center;justify-content:center;color:var(--__P__-fg-muted);opacity:.45;transition:opacity var(--__P__-dur-base) var(--__P__-ease);z-index:2;touch-action:none;user-select:none}.__P__-resize-grip:hover,.__P__-resize-grip:focus-visible{opacity:1}.__P__-resize-grip svg{width:10px;height:10px}.__P__-resize-grip--bottom-left{bottom:2px;left:2px;cursor:nesw-resize;transform:scaleX(-1)}.__P__-resize-grip--bottom-right{bottom:2px;right:2px;cursor:nwse-resize}.__P__-resize-grip--top-left{top:2px;left:2px;cursor:nwse-resize;transform:rotate(180deg)}.__P__-resize-grip--top-right{top:2px;right:2px;cursor:nesw-resize;transform:scaleY(-1)}:host(:not([data-mode="open"])) .__P__-resize-grip{display:none}.__P__-messenger{display:flex;flex-direction:column;overflow:hidden}.__P__-messenger-body,.__P__-messenger-pane{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}.__P__-messenger-pane[hidden]{display:none}@keyframes __P__-view-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}.__P__-module{display:flex;flex-direction:column;height:100%;min-height:0}@media(prefers-reduced-motion:no-preference){.__P__-module,.__P__-history{animation:__P__-view-in .18s var(--__P__-ease-out)}}.__P__-module-scroll{flex:1;min-height:0;overflow-y:auto;padding:var(--__P__-space-3);display:flex;flex-direction:column;gap:var(--__P__-space-3)}.__P__-home{container-type:inline-size;background:radial-gradient(125% 65% at 88% 0%,color-mix(in srgb,#fff 16%,transparent),transparent 55%),linear-gradient(180deg,var(--__P__-accent) 0%,var(--__P__-accent) 22%,color-mix(in srgb,var(--__P__-accent) 28%,var(--__P__-surface)) 44%,var(--__P__-surface) 70%);border-radius:var(--__P__-radius-lg) var(--__P__-radius-lg) 0 0}.__P__-home-scroll{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;background:transparent}.__P__-home-cards{display:flex;flex-direction:column;gap:var(--__P__-space-3);padding:4px 14px 16px}.__P__-module-pad{padding:var(--__P__-space-3) var(--__P__-space-3) 0}.__P__-module-empty{display:flex;flex-direction:column;align-items:center;gap:var(--__P__-space-3);padding:var(--__P__-space-8) var(--__P__-space-4);text-align:center;color:var(--__P__-fg-muted);font-size:var(--__P__-text-base)}.__P__-module-retry{padding:var(--__P__-space-2) var(--__P__-space-4);border:1px solid var(--__P__-border-strong);border-radius:var(--__P__-radius-sm);color:var(--__P__-fg);font-weight:600;cursor:pointer;transition:background var(--__P__-dur-quick) var(--__P__-ease-out),border-color var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-module-retry:hover{background:var(--__P__-hover);border-color:var(--__P__-accent)}.__P__-module-retry:active{background:var(--__P__-border)}.__P__-module-retry:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-help-list{flex:1;min-height:0;overflow-y:auto;padding-bottom:var(--__P__-space-3)}.__P__-help-group{display:flex;flex-direction:column}.__P__-help-section-title{position:sticky;top:0;z-index:1;margin:0;padding:var(--__P__-space-3) var(--__P__-space-5) var(--__P__-space-2);font-size:var(--__P__-text-xs);font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--__P__-fg-muted);background:var(--__P__-bg)}.__P__-help-card{margin:0 var(--__P__-space-3) var(--__P__-space-3);background:var(--__P__-surface);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius);overflow:hidden}.__P__-help-card .__P__-list-row{border-bottom:0;border-radius:0}.__P__-help-card .__P__-list-row+.__P__-list-row{border-top:1px solid var(--__P__-border)}.__P__-tabbar{display:flex;border-top:1px solid var(--__P__-border);background:var(--__P__-bg-elevated);flex-shrink:0}.__P__-tab{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--__P__-space-1);min-height:48px;padding:var(--__P__-space-2) var(--__P__-space-1);color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);font-weight:600;transition:color var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-tab:hover{color:var(--__P__-fg)}.__P__-tab[aria-selected=true]{color:var(--__P__-accent-fg)}.__P__-tab:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-tab:active{background:var(--__P__-hover)}.__P__-tab-icon{position:relative;display:inline-flex}.__P__-tab-icon svg{width:22px;height:22px}.__P__-tab-badge{position:absolute;top:-2px;left:calc(50% + 6px);width:8px;height:8px;border-radius:50%;background:var(--__P__-accent);box-shadow:0 0 0 2px var(--__P__-bg-elevated)}.__P__-home-hero{flex-shrink:0;padding:var(--__P__-space-5) var(--__P__-space-5) var(--__P__-space-3);color:var(--__P__-on-accent);--__P__-focus: var(--__P__-on-accent)}.__P__-home-hero-top{display:flex;align-items:center;justify-content:space-between;gap:var(--__P__-space-3);min-height:32px}.__P__-home-brand{font-size:clamp(calc(12px * var(--__P__-text-scale)),calc(3.2cqi * var(--__P__-text-scale)),calc(14px * var(--__P__-text-scale)));font-weight:600;letter-spacing:.01em;color:color-mix(in srgb,#fff 82%,transparent);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.__P__-home-brand-spacer{flex:1}.__P__-home-hero-actions{display:flex;align-items:center;gap:var(--__P__-space-2);flex-shrink:0}.__P__-home-hero-actions .__P__-icon-btn{color:#fff}.__P__-home-hero-actions .__P__-icon-btn:hover{background:color-mix(in srgb,#fff 18%,transparent);color:#fff}.__P__-home-hero-actions .__P__-icon-btn:active{background:color-mix(in srgb,#fff 26%,transparent)}.__P__-home-greeting{margin:28px 0 0;font-family:var(--__P__-font-display);font-size:clamp(calc(19px * var(--__P__-text-scale)),calc(5.5cqi * var(--__P__-text-scale)),var(--__P__-text-2xl));font-weight:800;line-height:1.18;letter-spacing:-.01em;overflow-wrap:anywhere}.__P__-home-lead{margin:10px 0 0;font-family:var(--__P__-font-display);font-size:clamp(calc(15px * var(--__P__-text-scale)),calc(4.2cqi * var(--__P__-text-scale)),var(--__P__-text-xl));font-weight:600;line-height:1.25;letter-spacing:-.005em;color:color-mix(in srgb,var(--__P__-on-accent) 78%,transparent);overflow-wrap:anywhere}.__P__-home-avatars{display:flex}.__P__-home-avatar{width:30px;height:30px;border-radius:999px;overflow:hidden;margin-inline-start:-10px;border:2px solid color-mix(in srgb,#fff 92%,transparent);box-shadow:0 1px 3px #0000002e;background:var(--__P__-surface);display:inline-flex;align-items:center;justify-content:center;font-size:var(--__P__-text-xs);font-weight:700;color:var(--__P__-fg)}.__P__-home-avatar:first-child{margin-inline-start:0}.__P__-home-avatar img{width:100%;height:100%;object-fit:cover}.__P__-home-content{background:var(--__P__-surface);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius);box-shadow:var(--__P__-shadow-card);overflow:hidden}.__P__-home-content-title{padding:var(--__P__-space-4) var(--__P__-space-4) var(--__P__-space-3);font-size:var(--__P__-text-sm);font-weight:700}.__P__-home-content-list{display:flex;flex-direction:column;padding:0 var(--__P__-space-2) var(--__P__-space-2)}.__P__-home-content-list .__P__-list-row+.__P__-list-row{border-top:1px solid var(--__P__-border)}.__P__-home-card{display:block;width:100%;text-align:start;background:var(--__P__-surface);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius);padding:var(--__P__-space-4);box-shadow:var(--__P__-shadow-card)}.__P__-home-card[data-interactive=true]{cursor:pointer;transition:background var(--__P__-dur-quick) var(--__P__-ease-out),transform var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-home-card[data-interactive=true]:hover{background:var(--__P__-bg-elevated)}.__P__-home-card[data-interactive=true]:active{transform:translateY(1px)}.__P__-home-card[data-interactive=true]:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-home-recent-row{display:flex;align-items:center;gap:var(--__P__-space-3)}.__P__-home-recent-avatar{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;flex-shrink:0;border-radius:999px;background:color-mix(in oklch,var(--__P__-accent) 14%,transparent);color:var(--__P__-accent-fg)}.__P__-home-recent-avatar svg{width:20px;height:20px}.__P__-home-recent-body{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}.__P__-home-recent-title{font-weight:600;font-size:calc(14px * var(--__P__-text-scale))}.__P__-home-recent-preview{color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.__P__-home-recent-dot{width:8px;height:8px;border-radius:999px;background:var(--__P__-accent);flex-shrink:0}.__P__-home-recent-row[data-unread=true] .__P__-home-recent-title{font-weight:700}.__P__-home-status{display:flex;align-items:center;gap:var(--__P__-space-3)}.__P__-home-status-icon svg{width:22px;height:22px;color:var(--__P__-success)}.__P__-home-status[data-level=degraded] .__P__-home-status-icon svg{color:var(--__P__-warning)}.__P__-home-status[data-level=down] .__P__-home-status-icon svg{color:var(--__P__-danger)}.__P__-home-status-text{font-weight:600;font-size:calc(14px * var(--__P__-text-scale))}.__P__-home-search{display:flex;align-items:center;gap:var(--__P__-space-2);width:100%;padding:var(--__P__-space-3) var(--__P__-space-4);border-radius:var(--__P__-radius);border:1px solid var(--__P__-border);background:var(--__P__-surface);text-align:start}.__P__-home-search[data-input=true]{background:var(--__P__-bg-elevated)}.__P__-home-search:hover{border-color:var(--__P__-border-strong)}.__P__-home-search:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-home-search[data-input=true]:focus-within{outline:none;border-color:var(--__P__-focus)}.__P__-home-search-text{flex:1;color:var(--__P__-fg-muted);font-size:calc(14px * var(--__P__-text-scale))}.__P__-home-search-input{flex:1;border:0;background:transparent;font-size:calc(14px * var(--__P__-text-scale));color:var(--__P__-fg);outline:none}.__P__-home-search-input:focus-visible{outline:none}.__P__-home-search-icon svg{width:18px;height:18px;color:var(--__P__-accent-fg)}.__P__-list-row{display:flex;align-items:center;gap:var(--__P__-space-3);width:100%;min-height:44px;text-align:start;padding:var(--__P__-space-3) var(--__P__-space-2);border-radius:var(--__P__-radius-sm)}.__P__-list-row:hover{background:var(--__P__-hover)}.__P__-list-row:active{background:var(--__P__-border)}.__P__-list-row:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-list-row-body{display:flex;flex-direction:column;min-width:0;flex:1}.__P__-list-row-title{font-weight:600;font-size:var(--__P__-text-md);line-height:1.35}.__P__-list-row-sub{color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm);margin-top:var(--__P__-space-1);line-height:1.45;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.__P__-list-row-chevron svg{width:18px;height:18px;color:var(--__P__-accent-fg);flex-shrink:0}.__P__-back-header{display:flex;align-items:center;gap:var(--__P__-space-2);padding:10px 12px;border-bottom:1px solid var(--__P__-border);flex-shrink:0}.__P__-back-title{flex:1;text-align:center;font-size:var(--__P__-text-md);font-weight:700;margin:0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-back-spacer{width:32px;height:1px}.__P__-history>*,.__P__-home-scroll>*,.__P__-module-scroll>*,.__P__-help-list>*,.__P__-history-footer>*,.__P__-module-pad{width:100%;max-width:var(--__P__-conversation-max, 768px);margin-inline:auto}.__P__-header,.__P__-back-header{padding-inline:max(12px,calc((100% - var(--__P__-conversation-max, 768px)) / 2))}.__P__-tabbar{padding-inline:max(0px,calc((100% - var(--__P__-conversation-max, 768px)) / 2))}.__P__-content{display:flex;flex-direction:column;gap:14px;width:100%;max-width:68ch;margin:0 auto}.__P__-content-hero{width:100%;border-radius:var(--__P__-radius)}.__P__-content-subtitle{color:var(--__P__-fg-muted);margin:0}.__P__-content-frame{flex:1;min-height:0;width:100%;border:0;background:#fff}.__P__-news-list{display:flex;flex-direction:column;gap:var(--__P__-space-3)}.__P__-news-card{display:block;width:100%;text-align:start;border:1px solid var(--__P__-border);border-radius:var(--__P__-radius);overflow:hidden;background:var(--__P__-surface)}.__P__-news-card{transition:background var(--__P__-dur-quick) var(--__P__-ease-out),transform var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-news-card:hover{background:var(--__P__-bg-elevated)}.__P__-news-card:active{transform:translateY(1px)}.__P__-news-card:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-news-hero{width:100%;display:block}.__P__-news-body{display:flex;flex-direction:column;gap:6px;padding:14px 16px}.__P__-news-title{font-weight:700;font-size:var(--__P__-text-md)}.__P__-news-summary{color:var(--__P__-fg-muted);font-size:calc(14px * var(--__P__-text-scale));display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.__P__-modules-empty{display:flex;align-items:center;justify-content:center;position:relative}.__P__-modules-empty-close{position:absolute;top:12px;inset-inline-end:12px}.__P__-modules-empty-text{color:var(--__P__-fg-muted);font-size:var(--__P__-text-base)}.__P__-form{display:flex;flex-direction:column;gap:var(--__P__-space-4)}.__P__-field{display:flex;flex-direction:column;gap:6px}.__P__-field-head{display:flex;flex-wrap:wrap;align-items:baseline;gap:var(--__P__-space-2)}.__P__-field-label{font-size:var(--__P__-text-sm);font-weight:600;color:var(--__P__-fg)}.__P__-field-req{color:var(--__P__-danger)}.__P__-field-type{flex-shrink:0;align-self:center;margin-inline-start:auto;border:1px solid var(--__P__-border);border-radius:5px;background:color-mix(in oklab,var(--__P__-fg-muted) 9%,transparent);padding:1px 7px;font-size:var(--__P__-text-xs);font-weight:600;color:var(--__P__-fg-muted);white-space:nowrap}.__P__-field-input{width:100%;min-width:0;max-width:100%;box-sizing:border-box;padding:10px var(--__P__-space-3);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);background:var(--__P__-bg);color:var(--__P__-fg);font:inherit;font-size:var(--__P__-text-sm);resize:vertical;transition:border-color var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-field-input:focus-visible{outline:none;border-color:var(--__P__-accent)}.__P__-field[data-invalid=true] .__P__-field-input{border-color:var(--__P__-danger)}.__P__-field-input[type=date],.__P__-field-input[type=time]{appearance:none;-webkit-appearance:none}@media(pointer:coarse){.__P__-textarea,.__P__-home-search-input,.__P__-field-input{font-size:max(16px,calc(16px * var(--__P__-text-scale)))}}.__P__-field-hint{font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted)}.__P__-field-error{font-size:var(--__P__-text-xs);color:var(--__P__-danger)}.__P__-field-choices{display:flex;flex-direction:column;gap:10px;padding-top:2px}.__P__-choice{display:flex;align-items:flex-start;gap:10px;font-size:var(--__P__-text-sm);color:var(--__P__-fg);cursor:pointer}.__P__-choice input{margin-top:2px;accent-color:var(--__P__-accent)}.__P__-form-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:var(--__P__-space-2);margin-top:var(--__P__-space-2)}.__P__-form-hint{flex:1 1 auto;min-width:6rem;margin-inline-end:auto;font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted)}.__P__-form-submit{padding:var(--__P__-space-2) var(--__P__-space-4);border:none;border-radius:var(--__P__-radius-md);background:var(--__P__-accent);color:var(--__P__-accent-text, #fff);font:inherit;font-weight:600;font-size:var(--__P__-text-sm);white-space:nowrap;flex-shrink:0;cursor:pointer;transition:filter var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-form-submit:hover:not(:disabled){filter:brightness(1.06)}.__P__-form-submit:disabled{opacity:.6;cursor:default}.__P__-form-skip{padding:var(--__P__-space-2) var(--__P__-space-4);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);background:transparent;color:var(--__P__-fg-muted);font:inherit;font-size:var(--__P__-text-sm);white-space:nowrap;flex-shrink:0;cursor:pointer;transition:background var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-form-skip:hover:not(:disabled){background:var(--__P__-bg-elevated)}@media(max-width:640px){.__P__-form-hint{flex-basis:100%;margin-inline-end:0;font-size:var(--__P__-text-xs)}.__P__-form-submit,.__P__-form-skip{flex:1 1 0;text-align:center}}.__P__-form-gate{display:flex;flex-direction:column;gap:var(--__P__-space-3);padding:var(--__P__-space-4);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);background:var(--__P__-bg-elevated)}.__P__-form-gate-title{margin:0;font-size:var(--__P__-text-base);font-weight:700;color:var(--__P__-fg)}.__P__-form-gate-desc{margin:0 0 var(--__P__-space-1);font-size:var(--__P__-text-sm);color:var(--__P__-fg-muted)}.__P__-form-done{display:flex;align-items:center;justify-content:center;gap:6px;padding:6px 12px;border:1px dashed var(--__P__-border);border-radius:999px;align-self:center;font-size:var(--__P__-text-xs);font-weight:600;color:var(--__P__-fg-muted)}.__P__-form-done svg{width:14px;height:14px;color:var(--__P__-success, #22c55e)}.__P__-form-done[data-outcome=skipped] svg{color:var(--__P__-fg-muted)}.__P__-form-done-fill{border:0;background:none;padding:0 2px;cursor:pointer;font:inherit;font-weight:600;color:var(--__P__-accent-fg)}.__P__-form-done-fill:hover{text-decoration:underline}details.__P__-form-done{display:block;padding:0;border-radius:var(--__P__-radius-md)}details[open].__P__-form-done{width:min(100%,420px);background:var(--__P__-surface)}.__P__-form-done-summary{display:flex;align-items:center;justify-content:center;gap:6px;padding:8px 12px;cursor:pointer;list-style:none}.__P__-form-done-summary::-webkit-details-marker{display:none}.__P__-form-done-summary>svg:last-child{color:var(--__P__-fg-muted);transition:transform .15s var(--__P__-ease)}details[open]>.__P__-form-done-summary>svg:last-child{transform:rotate(90deg)}.__P__-form-answers{margin:0;padding:var(--__P__-space-2) var(--__P__-space-3) var(--__P__-space-3);display:grid;gap:var(--__P__-space-3);text-align:start}.__P__-form-answer{display:grid;gap:6px}.__P__-form-answer dt{font-size:var(--__P__-text-sm);font-weight:600;color:var(--__P__-fg)}.__P__-form-answer dd{margin:0;padding:10px var(--__P__-space-3);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);background:var(--__P__-bg);font-size:var(--__P__-text-sm);font-weight:400;color:var(--__P__-fg);overflow-wrap:anywhere}.__P__-toolui{margin-block:var(--__P__-space-3);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-lg, 14px);background:var(--__P__-bg-elevated);font-size:var(--__P__-text-sm)}.__P__-toolui:not(.__P__-toolui-collapsible){display:flex;flex-direction:column;gap:var(--__P__-space-3);padding:var(--__P__-space-4)}.__P__-toolui-group{display:flex;flex-direction:column;gap:var(--__P__-space-3);margin-block:var(--__P__-space-3)}.__P__-toolui-group>.__P__-toolui{margin-block:0}.__P__-toolui-stale{opacity:.7}details.__P__-toolui-collapsible>summary{display:flex;align-items:center;gap:var(--__P__-space-2);padding:var(--__P__-space-3) var(--__P__-space-4);cursor:pointer;list-style:none;-webkit-tap-highlight-color:transparent;user-select:none}details.__P__-toolui-collapsible>summary::-webkit-details-marker{display:none}details.__P__-toolui-collapsible[open]>summary{border-bottom:1px solid var(--__P__-border)}details.__P__-toolui-collapsible>.__P__-toolui-section{margin:var(--__P__-space-4)}details.__P__-toolui-collapsible>.__P__-toolui-section~.__P__-toolui-section{margin-top:calc(-1 * var(--__P__-space-2))}.__P__-toolui-name-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-toolui-chevron{display:inline-flex;color:var(--__P__-fg-muted);transition:transform var(--__P__-dur-quick) var(--__P__-ease-out)}details.__P__-toolui-collapsible>summary .__P__-toolui-status{margin-inline-start:auto}.__P__-toolui-chevron svg{width:16px;height:16px}details.__P__-toolui-collapsible[open]>summary .__P__-toolui-chevron{transform:rotate(180deg)}.__P__-toolui-badge,.__P__-toolui-name-pill,.__P__-toolui-q-pill{--__P__-pill: var(--__P__-fg-muted);display:inline-flex;min-width:0;align-items:center;gap:5px;padding:3px 7px;border-radius:5px;border:1px solid var(--__P__-border);background:color-mix(in oklab,var(--__P__-fg-muted) 9%,transparent);color:var(--__P__-pill);font-size:var(--__P__-text-xs);font-weight:600;white-space:nowrap}.__P__-toolui-badge svg,.__P__-toolui-name-pill svg,.__P__-toolui-q-pill svg{flex-shrink:0;width:14px;height:14px}.__P__-toolui-status-icon{display:inline-flex}.__P__-toolui-name-pill{--__P__-pill: oklch(.68 .13 233)}.__P__-toolui-q-pill{--__P__-pill: oklch(.66 .12 195)}.__P__-toolui-status[data-status=completed]{--__P__-pill: var(--__P__-success, #16a34a)}.__P__-toolui-status[data-status=responded]{--__P__-pill: oklch(.62 .15 255)}.__P__-toolui-status[data-status=awaiting]{--__P__-pill: var(--__P__-warning, #f59e0b)}.__P__-toolui-status[data-status=denied]{--__P__-pill: oklch(.66 .16 45)}.__P__-toolui-status[data-status=error]{--__P__-pill: var(--__P__-danger, #dc2626)}.__P__-toolui-status[data-status=superseded]{--__P__-pill: var(--__P__-fg-muted)}@supports (color: oklch(from red l c h)){.__P__-toolui-badge,.__P__-toolui-name-pill,.__P__-toolui-q-pill{color:oklch(from var(--__P__-pill) clamp(var(--__P__-pill-l-min),l,var(--__P__-pill-l-max)) c h)}}.__P__-toolui-head{display:flex;align-items:center;flex-wrap:wrap;gap:var(--__P__-space-2)}.__P__-toolui-head-end{display:inline-flex;align-items:center;gap:var(--__P__-space-2);margin-inline-start:auto}.__P__-toolui-collapse-body{display:flex;flex-direction:column;gap:var(--__P__-space-3);padding:var(--__P__-space-4)}.__P__-toolui-summary{display:flex;flex-direction:column;gap:var(--__P__-space-3)}.__P__-toolui-collapse-body>.__P__-form{gap:var(--__P__-space-3)}.__P__-toolui-collapse-body>.__P__-form>.__P__-field,.__P__-toolui-summary>.__P__-field{padding:10px var(--__P__-space-3);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);background:color-mix(in oklab,var(--__P__-bg) 80%,transparent);line-height:1.5}.__P__-toolui-collapse-body>.__P__-form>.__P__-field{gap:var(--__P__-space-2)}.__P__-toolui-summary>.__P__-field{gap:var(--__P__-space-1)}.__P__-toolui-summary .__P__-field-label{color:var(--__P__-fg-muted)}.__P__-toolui-answer{margin:0;font-size:var(--__P__-text-sm);color:var(--__P__-fg-muted);overflow-wrap:anywhere;white-space:pre-wrap}.__P__-toolui-footer{display:flex;align-items:center;justify-content:space-between;gap:var(--__P__-space-3);margin-inline:calc(-1 * var(--__P__-space-4));padding:var(--__P__-space-3) var(--__P__-space-4) 0;border-top:1px solid var(--__P__-border)}.__P__-toolui-options-toggle{display:inline-flex;align-items:center;gap:4px;border:0;background:transparent;padding:0;cursor:pointer;font-size:var(--__P__-text-xs);font-weight:600;color:var(--__P__-fg-muted);transition:color var(--__P__-dur-quick) var(--__P__-ease)}.__P__-toolui-options-toggle:hover{color:var(--__P__-fg)}.__P__-toolui-options-chevron{display:inline-flex;transition:transform var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-toolui-options-chevron svg{width:14px;height:14px}.__P__-toolui-options-chevron.__P__-open{transform:rotate(180deg)}.__P__-toolui-desc{margin:0;padding:var(--__P__-space-3);border-radius:var(--__P__-radius-md);background:var(--__P__-bg);border:1px solid var(--__P__-border);color:var(--__P__-fg-muted);line-height:1.5}.__P__-toolui-section{display:flex;flex-direction:column;gap:8px;padding:var(--__P__-space-3);border-radius:var(--__P__-radius-md);background:var(--__P__-bg);border:1px solid var(--__P__-border)}.__P__-toolui:not(.__P__-toolui-collapsible) .__P__-toolui-section,.__P__-toolui:not(.__P__-toolui-collapsible) .__P__-toolui-desc{padding:0;background:none;border:0;border-radius:0}.__P__-toolui-label{font-size:var(--__P__-text-xs);font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--__P__-fg-muted)}.__P__-toolui-code{margin:0;max-height:240px;overflow:auto;color:var(--__P__-fg);font-family:var(--__P__-font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);font-size:var(--__P__-text-xs);line-height:1.5;white-space:pre-wrap;word-break:break-word}.__P__-toolui-code[data-error=true]{color:var(--__P__-danger, #dc2626)}.__P__-toolui-body{gap:6px}.__P__-toolui-prompt{margin:0;font-weight:600;color:var(--__P__-fg);overflow-wrap:anywhere}.__P__-toolui-subtle{margin:0;font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted);line-height:1.5}.__P__-toolui-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:var(--__P__-space-2);margin-top:var(--__P__-space-2)}:host([dir="rtl"]) .__P__-icon-dir{transform:scaleX(-1)}:host([dir="rtl"]) .__P__-field-input[type=date],:host([dir="rtl"]) .__P__-field-input[type=time]{position:relative;text-align:right;padding-left:34px}:host([dir="rtl"]) .__P__-field-input[type=date]::-webkit-datetime-edit,:host([dir="rtl"]) .__P__-field-input[type=time]::-webkit-datetime-edit{text-align:right}:host([dir="rtl"]) .__P__-field-input[type=date]::-webkit-calendar-picker-indicator,:host([dir="rtl"]) .__P__-field-input[type=time]::-webkit-calendar-picker-indicator{position:absolute;left:var(--__P__-space-3);margin:0}
|
|
4
4
|
`;var Rs=`.__P__-standalone-page{margin:0;height:100vh;background:var(--__P__-bg, #fff);display:grid;place-items:stretch}
|
|
@@ -8,7 +8,7 @@ var Xu=Object.defineProperty;var Yu=(e,t,n)=>t in e?Xu(e,t,{enumerable:!0,config
|
|
|
8
8
|
|
|
9
9
|
`))!==-1;){let l=o.slice(0,s);o=o.slice(s+2),yield l}}}finally{n.releaseLock()}}function wp(e,t){let n="",o;for(let r of e.split(`
|
|
10
10
|
`))if(r!==""){if(r.startsWith(":")){t?.(r.slice(1).trim());continue}if(r.startsWith("data:")){let a=r.slice(5).replace(/^ /,"");n=n?`${n}
|
|
11
|
-
${a}`:a;continue}r.startsWith("id:")&&(o=r.slice(3).trim())}if(n==="[DONE]")return"done";if(!n)return null;try{let r=JSON.parse(n);return il.trace("chunk",{type:r.type,eventId:o}),{chunk:r,eventId:o}}catch(r){throw il.trace("frame parse failed",{errorType:r instanceof Error?r.name:typeof r,payloadLength:n.length}),new Xe("invalid SSE frame","network",void 0,r)}}function Cp(e){let t=new TextEncoder().encode(e),n="";for(let o of t)n+=String.fromCharCode(o);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}var ll=e=>e&&Object.keys(e).length>0?e:void 0;function cl(e,t){let n=ll(e),o=ll(t);if(!n&&!o)return;let r={};return n&&(r.user=n),o&&(r.page=o),Cp(JSON.stringify(r))}function dl(e){if(!e)return;let t=Date.parse(e);return Number.isFinite(t)?t:void 0}function Rp(e){return`tool-${e.startsWith("tool:")?e.slice(5):e}`}function ul(e){return e.startsWith("tool-")?e.slice(5):e}var mt={handshake:"/pai/handshake",streamMessage:"/pai/stream-message",streamResume:"/pai/stream-resume",cancelStream:"/pai/cancel-stream",listConversations:"/pai/list-conversations",listMessages:"/pai/list-messages",updateSettings:"/pai/update-settings",markRead:"/pai/mark-read",messageFeedback:"/pai/message-feedback",requestOperator:"/pai/request-operator",cancelOperatorRequest:"/pai/cancel-request-operator",bootstrap:"/pai/bootstrap",content:"/pai/content",submitForm:"/pai/submit-form"},_l="context";function ir(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function pl(e){if(!ir(e))return;let t=e,n=t.controlMode,o=t.controlRevision;if(!(n!=="ai-agent"&&n!=="awaiting-operator"&&n!=="operator"||typeof o!="number"||!Number.isSafeInteger(o)||o<0))return{controlMode:n,controlRevision:o,assignedOperatorInitials:typeof t.assignedOperatorInitials=="string"&&t.assignedOperatorInitials?t.assignedOperatorInitials:void 0,operatorAvailable:typeof t.operatorAvailable=="boolean"?t.operatorAvailable:void 0}}function fl(e){if(!ir(e))return;let t=e.status,n=e.postFinishSequence;if(!(t!=="compacting"&&t!=="ready"||typeof n!="number"||!Number.isSafeInteger(n)||n<0))return{status:t,postFinishSequence:n}}function sr(e){let t=ir(e)?e.suggestions:void 0;if(!Array.isArray(t))return[];let n=[];for(let o of t){if(!ir(o))continue;let{id:r,label:a,text:s}=o;typeof a!="string"||!a||n.push({id:typeof r=="string"&&r?r:`s${n.length}`,label:a,text:typeof s=="string"&&s?s:a})}return n}function Na(e){let n={messages:e.messages.map(o=>({id:o.serverMessageId??o.id,parts:Ip(o),role:o.role})),conversationId:e.conversationId,responseType:"ack"};return e.visitorId&&(n.visitorId=e.visitorId),e.userPrefs&&(n.userPrefs=e.userPrefs),n}function Tp(e){return e.state==="output-available"||e.state==="output-error"||e.state==="output-denied"||e.approval?.approved!==void 0}function Ip(e){let t=[];for(let n of e.parts)if(n.kind==="step-start"&&t.push({type:"step-start"}),n.kind==="reasoning"&&n.text&&t.push({type:"reasoning",text:n.text,state:n.done?"done":"streaming"}),n.kind==="text"&&n.text&&t.push({text:n.text,type:"text"}),n.kind==="file"&&n.url&&t.push({mediaType:n.mediaType,type:"file",url:n.url}),n.kind==="tool"&&Tp(n)){let o=n.dynamic?{type:"dynamic-tool",toolName:n.toolName,toolCallId:n.toolCallId,state:n.state}:{type:Rp(n.toolName),toolCallId:n.toolCallId,state:n.state};n.input!==void 0&&(o.input=n.input),n.output!==void 0&&(o.output=n.output),n.error!==void 0&&(o.errorText=n.error),n.approval?.approved!==void 0&&(o.approval=n.approval),t.push(o)}for(let n of e.attachments??[])n.url&&t.push({type:"file",url:n.url,mediaType:n.mediaType,filename:n.name,fileId:n.id,fileSize:n.size});return t}var Me=Z.scope("transport"),Ep=6e4,Ap=1e4,$a=50,bl=new WeakMap;function An(e){return bl.get(e)}function lo(e,t){return bl.set(e,t),e}function ml(e){return Math.max(e?.upsertRevision??0,e?.read?.revision??0)}function Mp(e,t){return e.conversationId===t.conversationId&&e.title===t.title&&e.lastMessageAt===t.lastMessageAt&&e.preview===t.preview&&e.canContinue===t.canContinue&&e.hasUnread===t.hasUnread&&e.controlState===t.controlState}function Bt(e,t,n=!0){switch(t.type){case"snapshot":{let o=new Map(e.map(s=>[s.conversationId,s])),r=e.filter(s=>(An(s)?.activityRevision??0)>t.requestedRevision).toSorted((s,l)=>An(l).activityRevision-An(s).activityRevision),a=new Set(r.map(s=>s.conversationId));return[...r,...t.result.conversations.filter(s=>!a.has(s.conversationId)).map(s=>{let l=o.get(s.conversationId);if(!l)return s;let c=An(l);return(c?.upsertRevision??0)>t.requestedRevision?l:c?.read&&!l.hasUnread&&c.read.lastMessageAt===s.lastMessageAt?lo({...s,hasUnread:!1},{upsertRevision:0,read:c.read}):s})]}case"read":{let o=e.findIndex(c=>c.conversationId===t.conversationId&&(t.lastMessageAt===void 0||c.lastMessageAt===t.lastMessageAt));if(o<0)return e;let r=e[o],a=An(r);if(ml(a)>t.revision)return e;let s=t.lastMessageAt??r.lastMessageAt,l={upsertRevision:a?.upsertRevision??0,...a?.activityRevision===void 0?{}:{activityRevision:a.activityRevision},read:{revision:t.revision,...s?{lastMessageAt:s}:{}}};return r.hasUnread?e.map((c,d)=>d===o?lo({...c,hasUnread:!1},l):c):(lo(r,l),e)}case"upsert":{let o=e.findIndex(d=>d.conversationId===t.conversation.conversationId);if(o<0&&!n)return e;let r=o<0?void 0:e[o],a=r?An(r):void 0;if(ml(a)>t.revision)return e;let s=t.activity?t.revision:a?.activityRevision,l={upsertRevision:t.revision,...s===void 0?{}:{activityRevision:s},...!t.conversation.hasUnread&&a?.read?{read:a.read}:{}},c=r?{...r,...t.conversation,title:r.title}:{...t.conversation};return r&&Mp(r,c)?(lo(r,l),e):(lo(c,l),t.activity?[c,...e.filter(d=>d.conversationId!==c.conversationId)]:r?e.map((d,_)=>_===o?c:d):[...e,c])}default:return t}}var gl=3,Lp=400,Op=3e4,Np=1e4,Dp=6e4,$p=15e3,Fp=1024*1024,vl=new Set([408,425,429,500,502,503,504]);function hl(e){return Lp*2**e+Math.floor(Math.random()*250)}function Bp(e){return Dp+Math.ceil(e/Fp)*$p}function Up(e){let t=e.get("retry-after");if(!t)return null;let n=Number(t),o=Number.isFinite(n)?n*1e3:Date.parse(t)-Date.now();return Number.isFinite(o)&&o>=0?Math.min(o,3e4):null}var lr=class{constructor(t){ce(this,"ttlMs",t);ce(this,"map",new Map)}getOrFetch(t,n){let o=this.map.get(t);if(o&&performance.now()-o.at<this.ttlMs)return o.result;let r={at:performance.now(),result:n().then(a=>(r.value=a,a)).catch(a=>{throw this.map.get(t)===r&&this.map.delete(t),a})};return this.map.set(t,r),r.result}peek(t){let n=this.map.get(t);if(n?.value!==void 0&&performance.now()-n.at<this.ttlMs)return n.value}update(t){for(let n of this.map.values()){if(n.value!==void 0){let o=t(n.value);n.value=o,n.result=Promise.resolve(o);continue}n.result=n.result.then(o=>{let r=t(o);return n.value=r,r})}}delete(t){this.map.delete(t)}},cr=class{constructor(t){ce(this,"opts",t);ce(this,"conversationListeners",new Set);ce(this,"conversationRevision",0);ce(this,"visitorId");ce(this,"conversationId");ce(this,"userContext");ce(this,"pageContext");ce(this,"locale");ce(this,"conversationsCache",new lr(Ap));ce(this,"contentCache",new lr(Ep))}setContext(t,n){this.userContext=t,this.pageContext=n}setLocale(t){this.locale=t}primeIdentity(t,n){t&&(this.visitorId=t),n&&(this.conversationId=n)}envelope(){let t={_ev:xn};this.visitorId&&(t.visitorId=this.visitorId),this.conversationId&&(t.conversationId=this.conversationId),this.locale&&(t.locale=this.locale);let n=cl(this.userContext,this.pageContext);return n&&(t[_l]=n),t}withEnvelope(t){return{...this.envelope(),...t}}appendEnvelope(t){for(let[n,o]of Object.entries(this.envelope()))t.append(n,o);return t}withEnvelopeQuery(t){let n=new URL(this.url(t));for(let[o,r]of Object.entries(this.envelope()))n.searchParams.has(o)||n.searchParams.set(o,r);return n.toString()}async handshake(t){Me.debug("handshake \u2192",{visitorId:t.visitorId,conversationId:t.conversationId,locale:t.locale});let n=await this.postJson(mt.handshake,t,"handshake");return Me.debug("handshake \u2190",{visitorId:n.visitorId,conversationId:n.conversationId,hasWelcome:!!n.welcome,hasConfig:!!n.config,rebind:n.rebind}),this.visitorId=t.visitorId,this.conversationId=n.conversationId,n}async uploadFile(t,n){Me.debug("uploadFile \u2192",{name:t.name,size:t.size,type:t.type});let o=new FormData;o.append("file",t,t.name);let r=await this.postForm(this.uploadPath,o,"upload",n,Bp(t.size));return Me.debug("uploadFile \u2190",{id:r.id,url:r.url}),r}async transcribe(t,n="audio/webm"){Me.debug("transcribe \u2192",{size:t.size,mimeType:n});let o=new FormData;o.append("audio",t,`voice.${Hp(n)}`),o.append("mimeType",n);let r=await this.postForm(this.transcribePath,o,"transcribe");return Me.debug("transcribe \u2190",{textLen:r.text.length}),r}subscribeConversationChanges(t){return this.conversationListeners.add(t),()=>this.conversationListeners.delete(t)}publishConversation(t,n=!1){let o={type:"upsert",conversation:t,revision:++this.conversationRevision,...n?{activity:!0}:{}};this.conversationsCache.update(r=>{let a=r.pagination.page===1,s=r.conversations.some(p=>p.conversationId===t.conversationId),l=Bt(r.conversations,o,a&&n),c=a&&l.length>r.pagination.limit?l.slice(0,r.pagination.limit):l;if(!a||!n||s||r.pagination.hasNext)return c===r.conversations?r:{...r,conversations:c};let d=Math.max(r.pagination.total,r.conversations.length)+1,_=Math.ceil(d/r.pagination.limit);return{...r,conversations:c,pagination:{...r.pagination,total:d,totalPages:_,hasNext:r.pagination.page<_}}});for(let r of this.conversationListeners)r(o)}localeCacheKey(t){return`${this.locale??""}|${JSON.stringify(t,Object.keys(t).toSorted())}`}peekConversations(t={}){return this.conversationsCache.peek(this.localeCacheKey(t))}listConversations(t={},n=!1){if((t.page??1)>1)return this.fetchConversations(t);let o=this.localeCacheKey(t),r=this.conversationRevision;n&&this.conversationsCache.delete(o);let a=this.conversationsCache.getOrFetch(o,()=>this.fetchConversations(t));return n?a.then(s=>{let l={type:"snapshot",result:s,requestedRevision:r};for(let c of this.conversationListeners)c(l);return s}):a}async fetchConversations(t){let n=new URL(this.url(mt.listConversations));return t.visitorId&&n.searchParams.set("visitorId",t.visitorId),t.page&&n.searchParams.set("page",String(t.page)),t.limit&&n.searchParams.set("limit",String(t.limit)),t.ids?.length&&n.searchParams.set("ids",t.ids.join(",")),this.getJson(n.toString(),"listConversations")}async loadConversation(t,{ids:n=[],beforeId:o,beforeCreatedAt:r}={}){let a=new URL(this.url(mt.listMessages));a.searchParams.set("conversationId",t),a.searchParams.set("limit",String($a)),n.length>0&&a.searchParams.set("ids",n.join(",")),o&&a.searchParams.set("beforeId",o),r&&a.searchParams.set("beforeCreatedAt",r);let s=await this.getJson(a.toString(),"loadConversation");return{...s,messages:s.messages.toReversed()}}async markRead(t,n){if(!this.visitorId||!t)return;let o={type:"read",conversationId:t,...n===void 0?{}:{lastMessageAt:n},revision:++this.conversationRevision};this.conversationsCache.update(r=>{let a=Bt(r.conversations,o);return a===r.conversations?r:{...r,conversations:a}});for(let r of this.conversationListeners)r(o);try{await this.postJson(mt.markRead,{conversationId:t},"markRead",!0)}catch(r){Me.debug("markRead failed (non-fatal)",{err:r})}}async requestOperator(){if(!(!this.visitorId||!this.conversationId))try{return(await this.postJson(mt.requestOperator,{},"requestOperator")).controlState}catch(t){Me.debug("requestOperator failed (non-fatal)",{err:t});return}}async cancelOperatorRequest(){if(!(!this.visitorId||!this.conversationId))try{return(await this.postJson(mt.cancelOperatorRequest,{},"cancelOperatorRequest")).controlState}catch(t){Me.debug("cancelOperatorRequest failed (non-fatal)",{err:t});return}}listContent(t={}){return this.contentCache.getOrFetch(this.localeCacheKey(t),()=>this.fetchContent(t))}async fetchContent(t){let n=new URL(this.dataUrl(mt.content));for(let[a,s]of Object.entries(t))s!==void 0&&n.searchParams.set(a,Array.isArray(s)?s.join(","):String(s));let o=await this.getJson(n.toString(),"listContent"),r=(o.items??[]).map(a=>cs(a,this.locale));return{...o,items:r}}async bootstrap(t){let n=new URL(this.dataUrl(mt.bootstrap));t&&n.searchParams.set("conversationId",t);let o=await this.getJson(n.toString(),"bootstrap"),r=o.forms??[],a=o.formSubmissions??[];return{forms:r,formSubmissions:a}}async saveUserPrefs(t){return this.postJson(mt.updateSettings,{userPrefs:t},"saveUserPrefs")}get uploadPath(){return this.opts.endpoints?.upload??"/pai/upload-file"}get transcribePath(){return this.opts.endpoints?.transcribe??"/pai/transcribe-audio"}get submitFormPath(){return this.opts.endpoints?.submitForm??mt.submitForm}async submitForm(t){Me.debug("submitForm \u2192",{formId:t.formId,trigger:t.trigger,fields:Object.keys(t.values).length});try{await this.postJson(this.dataUrl(this.submitFormPath),t,"submitForm")}catch(n){Me.debug("submitForm failed (non-fatal)",{err:n})}}async submitFeedback(t){Me.debug("submitFeedback \u2192",{messageId:t.messageId,value:t.value});try{await this.postJson(mt.messageFeedback,{messageId:t.messageId,set:{feedback:t.value}},"submitFeedback")}catch(n){Me.debug("submitFeedback failed (non-fatal)",{err:n})}}async sendTurn(t){Me.debug("message \u2192",{conversationId:t.conversationId,visitorId:t.visitorId,messageCount:t.messages.length});try{return await this.runWithAbort(async n=>{let o=await this.fetchImpl(this.url(mt.streamMessage),{method:"POST",credentials:"omit",headers:{accept:"application/json","content-type":"application/json",...this.opts.auth.headers()},body:JSON.stringify(this.withEnvelope(t)),signal:n});if(o.status!==202)throw new Xe(`sendTurn failed: expected 202, received ${o.status}`,"server",o.status);let r;try{r=await o.json()}catch(a){throw n?.aborted?a:new Xe("sendTurn failed: invalid acknowledgement","server",o.status,a)}if(!zp(r))throw new Xe("sendTurn failed: invalid acknowledgement","server",o.status);return r},void 0,Op)}catch(n){throw n instanceof Xe?n:new Xe("sendTurn failed: network error","network",void 0,n)}}cancelTurn(t,n){!this.visitorId||!t||!n||(Me.debug("cancel stream",{conversationId:t,runId:n,visitorId:this.visitorId}),this.fetchImpl(this.url(mt.cancelStream),{method:"POST",credentials:"omit",headers:{"content-type":"application/json",...this.opts.auth.headers()},body:JSON.stringify(this.withEnvelope({conversationId:t,runId:n})),keepalive:!0}).catch(o=>Me.debug("cancel POST failed (non-fatal)",{err:o})))}async connectResumeStream(t){let n=new AbortController,o=()=>n.abort(t.signal.reason);t.signal.aborted?o():t.signal.addEventListener("abort",o,{once:!0});let r=setTimeout(()=>n.abort(),Np),a=()=>{clearTimeout(r),t.signal.removeEventListener("abort",o)},s;try{s=await this.fetchImpl(this.resumeUrl(),{method:"GET",credentials:"omit",headers:{accept:"text/event-stream",...this.opts.auth.headers()},signal:n.signal})}catch(c){return a(),t.signal.aborted||Me.debug("resume-stream fetch failed \u2014 reconnecting",{err:c}),"held"}if(!s.ok)return a(),s.status===409||vl.has(s.status)?(Me.debug("resume-stream \u2192 transient response; reconnecting",{status:s.status}),"held"):(Me.debug("resume-stream \u2192 endpoint unavailable",{status:s.status}),"unavailable");if(!s.body)return a(),Me.debug("resume-stream \u2192 bodyless response; stopping",{status:s.status}),"unavailable";if(!(s.headers.get("content-type")??"").includes("text/event-stream"))return a(),Me.debug("resume-stream \u2192 non-SSE response; stopping"),"unavailable";let l=!1;try{for await(let{chunk:c}of sl(s,n.signal,d=>{l||d!=="connected"||(l=!0,clearTimeout(r),t.onConnected())})){if(t.signal.aborted)return"held";t.onChunk(c)}}catch(c){if(t.signal.aborted)return"held";Me.debug("resume-stream segment dropped \u2014 reconnecting",{err:c})}finally{a()}return"held"}resumeUrl(){return this.withEnvelopeQuery(mt.streamResume)}async postJson(t,n,o,r=!1){let a=await this.fetchWithRetry(()=>[this.url(t),{method:"POST",credentials:"omit",headers:{"content-type":"application/json",...this.opts.auth.headers()},body:JSON.stringify(this.withEnvelope(n)),...r?{keepalive:!0}:{}}],o);return this.assertOk(a,o)}async postForm(t,n,o,r,a){return this.runWithAbort(async s=>{let l=await this.fetchImpl(this.url(t),{method:"POST",credentials:"omit",headers:this.opts.auth.headers(),body:this.appendEnvelope(n),signal:s});return this.assertOk(l,o)},r,a)}async runWithAbort(t,n,o){if(!n&&o===void 0)return t();let r=new AbortController,a=()=>r.abort(n?.reason);n?.aborted?a():n?.addEventListener("abort",a,{once:!0});let s=o===void 0?void 0:setTimeout(()=>r.abort(),o);try{return await t(r.signal)}finally{s!==void 0&&clearTimeout(s),n?.removeEventListener("abort",a)}}async getJson(t,n){let o=await this.fetchWithRetry(()=>[this.withEnvelopeQuery(t),{method:"GET",credentials:"omit",headers:{accept:"application/json",...this.opts.auth.headers()}}],n);return this.assertOk(o,n)}async fetchWithRetry(t,n){for(let o=0;;o++){let[r,a]=t(),s;try{s=await this.fetchImpl(r,a)}catch(c){if(o>=gl)throw new Xe(`${n} failed: network error`,"network",void 0,c);Me.debug("request network error \u2014 retrying",{label:n,attempt:o}),await so(hl(o));continue}if(s.ok||!vl.has(s.status)||o>=gl)return s;let l=Up(s.headers)??hl(o);Me.debug("request retryable status \u2014 retrying",{label:n,status:s.status,attempt:o,wait:l}),await so(l)}}async assertOk(t,n){if(!t.ok)throw new Xe(`${n} failed: ${t.status}`,"server",t.status);return await t.json()}url(t){return/^https?:\/\//i.test(t)?t:`${this.opts.agentApiBaseUrl}${t}`}dataUrl(t){return/^https?:\/\//i.test(t)?t:`${this.opts.dataApiBaseUrl}${t}`}get fetchImpl(){return this.opts.fetchImpl??globalThis.fetch.bind(globalThis)}};function Hp(e){return e.includes("webm")?"webm":e.includes("ogg")?"ogg":e.includes("mp4")||e.includes("m4a")?"m4a":e.includes("mpeg")?"mp3":e.includes("wav")?"wav":"bin"}function zp(e){if(typeof e!="object"||e===null)return!1;let t=Reflect.get(e,"status"),n=Reflect.get(e,"conversationId"),o=Reflect.get(e,"runId");return t==="accepted"&&typeof n=="string"&&n.length>0&&(o===void 0||typeof o=="string"&&o.length>0)}function Ba(e,t,n=pt()){let o=e?[{kind:"text",id:"t0",textSig:te(e),doneSig:te(!0)}]:[];return{id:n,role:"user",createdAt:Date.now(),status:"complete",attachments:t,partsSig:te(o)}}function Ut(){return{id:pt(),role:"assistant",createdAt:Date.now(),status:"streaming",partsSig:te([])}}function Pl(e){let t=pt();return qp({id:t,role:e.role,createdAt:Date.now(),status:"complete",ephemeral:!0,parts:[{kind:"text",id:`${t}-t0`,text:e.text,done:!0}]})}function qp(e){return{id:e.id,role:e.role,createdAt:e.createdAt,status:e.status,canceled:e.canceled,errorText:e.errorText,finishReason:e.finishReason,serverMessageId:e.serverMessageId,ephemeral:e.ephemeral,attachments:e.attachments,feedback:e.feedback,partsSig:te(e.parts.map(Xp))}}function Vp(e){return e.status==="failed"?"error":e.role==="assistant"&&e.status==="streaming"?"streaming":"complete"}function Ua(e){let t=new Set,n=e.parts.map((r,a)=>r.type==="text"?{kind:"text",id:`${e.id}-t${a}`,textSig:te(r.text),doneSig:te(!0)}:r.type==="reasoning"?{kind:"reasoning",id:`${e.id}-r${a}`,textSig:te(r.text),doneSig:te(r.state!=="streaming")}:r.type==="step-start"?{kind:"step-start",id:`${e.id}-ss${a}`}:r.type==="file"?{kind:"file",url:r.url,mediaType:r.mediaType}:r.type==="source-url"?{kind:"source",sourceId:r.sourceId,url:r.url,title:r.title}:r.type==="source-document"?{kind:"source",sourceId:r.sourceId,title:r.title,filename:r.filename,mediaType:r.mediaType}:r.type==="data-suggestions"?null:r.type==="dynamic-tool"||r.type.startsWith("tool-")?{kind:"tool",toolCallId:r.toolCallId,toolName:r.type==="dynamic-tool"?r.toolName:ul(r.type),dynamic:r.type==="dynamic-tool"?!0:void 0,inputPartialSig:te(""),inputSig:te(r.input),outputSig:te(r.output),errorSig:te(r.errorText),stateSig:te(r.state),approvalSig:te(r.approval)}:null).filter(r=>r!==null).filter(r=>r.kind!=="source"?!0:t.has(r.sourceId)?!1:(t.add(r.sourceId),!0)),o=e.parts.find(r=>r.type==="data-suggestions");return{id:e.id,role:e.role,operatorInitials:e.operatorInitials,suggestions:o?.type==="data-suggestions"?sr(o.data):void 0,serverMessageId:e.id,createdAt:Date.parse(e.createdAt),status:Vp(e),canceled:e.status==="canceled",feedback:e.feedback??null,partsSig:te(n)}}function Wp(e){return!e.parts.some(t=>t.type==="text"&&t.text.trim()!==""||t.type==="dynamic-tool"||t.type.startsWith("tool-")||t.type==="file"||t.type==="source-url"||t.type==="source-document")}function Kp(e){return e.role==="assistant"&&e.status==="streaming"&&Wp(e)}function Qt(e){let t=e.length-1;return e.filter((n,o)=>o===t||!Kp(n)).map(Ua)}function xl(e,t){let n=!t&&e.at(-1)?.role==="assistant"?-2:-1,o=e.at(n);return!o||o.ephemeral?[]:[o]}function Ha(e){return{id:e.id,role:e.role,createdAt:e.createdAt,status:e.status,canceled:e.canceled,errorText:e.errorText,finishReason:e.finishReason,serverMessageId:e.serverMessageId,ephemeral:e.ephemeral,attachments:e.attachments,parts:e.partsSig.value.map(Yp)}}function Ue(e){let t="";for(let n of e.partsSig.value)n.kind==="text"&&(t+=n.textSig.value);return t}function dr(e,t,n,o,r,a=t.createdAt){let s=e.find(_=>_.role==="user"&&!_.ephemeral),l=(_,p)=>Ue(_).replace(/\s+/g," ").trim().slice(0,p),c=s?l(s,80):"",d=l(t,120);return{conversationId:n,title:c||o,lastMessageAt:new Date(a).toISOString(),preview:d||void 0,canContinue:r}}function Rt(e){return Ue(e).trim()!==""?!0:e.partsSig.value.some(t=>t.kind==="tool"||t.kind==="file"||t.kind==="source")}function Gp(e){return Ue(e).trim()!==""?!0:e.partsSig.value.some(t=>t.kind==="tool"||t.kind==="file")}function za(e){return e==="approval-responded"||e==="output-available"||e==="output-denied"||e==="output-error"}var Mn=e=>e.kind==="tool",Sl=e=>e.kind==="text"&&e.textSig.value.trim()!==""||e.kind==="file";function co(e){let t=e.partsSig.value,n=t.findLastIndex(o=>o.kind==="tool");return t.slice(n+1).some(Sl)}function ln(e){if(e.role!=="assistant")return!1;let t=e.partsSig.value.filter(Mn);return t.length>0&&t.every(n=>za(n.stateSig.value))}function cn(e){return e.role!=="assistant"?!1:e.partsSig.value.some(t=>t.kind==="tool")&&!co(e)}function ur(e,t){return!e.partsSig.value.slice(t+1).some(n=>n.kind==="step-start"||Sl(n))}function _r(e){return e.partsSig.value.some(t=>Mn(t)&&!za(t.stateSig.value))}function kl(e,t){if(t.length===0)return e;let n=new Set;for(let s of e)n.add(s.id),s.serverMessageId&&n.add(s.serverMessageId);let o=t.filter(s=>{let l=[s.id,s.serverMessageId].filter(c=>c!==void 0);return l.some(c=>n.has(c))?!1:(l.forEach(c=>n.add(c)),!0)});if(o.length===0)return e;let r=e.findIndex(s=>!s.ephemeral),a=r<0?e.length:r;return[...e.slice(0,a),...o,...e.slice(a)]}function an(e,t){return t.id=e.id,e.canceled&&(t.canceled=!0),e.feedback!==void 0&&(t.feedback=e.feedback),t.suggestions??(t.suggestions=e.suggestions),t}function wl(e,t,n,o){if(!qa(e))return;if(t.length===0){let s=Math.max(...o.values());return n.find(l=>l.role==="assistant"&&o.get(l.serverMessageId??l.id)===s&&Ue(l).length>=Ue(e).length)}let r=t.at(-1);if(r?.role!=="user")return;let a=o.get(r.serverMessageId??r.id);if(a!==void 0)return n.find(s=>s.role==="assistant"&&o.get(s.serverMessageId??s.id)===a+1&&Ue(s).length>=Ue(e).length)}function qa(e){return e?.role==="assistant"&&e.status==="streaming"&&e.serverMessageId===void 0}function jp(e,t){let n=new Map(t.partsSig.value.filter(Mn).filter(a=>za(a.stateSig.value)).map(a=>[a.toolCallId,a]));if(n.size===0)return;let o=!1,r=e.partsSig.value.map(a=>{if(!Mn(a))return a;let s=n.get(a.toolCallId);if(!s)return a;let l=a.approvalSig.value,c=s.approvalSig.value,d=l===void 0||l.approved===void 0&&c?.approved!==void 0?s.approvalSig:a.approvalSig,_=a.inputSig.value===void 0?s.inputSig:a.inputSig,p=a.toolName==="tool"?s.toolName:a.toolName,u=a.dynamic??s.dynamic;return d===a.approvalSig&&_===a.inputSig&&p===a.toolName&&u===a.dynamic?a:(o=!0,{...a,toolName:p,dynamic:u,inputSig:_,approvalSig:d})});o&&(e.partsSig.value=r)}function Va(e,t){let n=t.filter(p=>!p.ephemeral&&(p.status==="streaming"||p.status==="pending"||p.status==="error"||p.retryAction!==void 0||(p.attachments?.length??0)>0||Rt(p))),o=new Map;for(let p of n)o.set(p.id,p),p.serverMessageId!==void 0&&o.set(p.serverMessageId,p);let r=new Set,a=[],s=e.map(p=>{let u=(p.serverMessageId!==void 0?o.get(p.serverMessageId):void 0)??o.get(p.id);return u===void 0?(a.push(p),p):(r.add(u),u.role!==p.role?p:u.role==="user"&&u.serverMessageId===void 0&&(u.status==="pending"||u.status==="error")?an(u,p):u.status==="streaming"||Ue(u).length>=Ue(p).length?(jp(u,p),u.suggestions??(u.suggestions=p.suggestions),u.feedback===void 0&&(u.feedback=p.feedback),p.canceled&&(u.canceled=!0),u):an(u,p))}),l=n.filter(p=>!r.has(p)),c=l.findLast(qa),d=new Map;e.forEach((p,u)=>{d.set(p.id,u),p.serverMessageId!==void 0&&d.set(p.serverMessageId,u)});let _=wl(c,c?n.slice(0,n.indexOf(c)):[],a,d);if(c&&_){let p=s.indexOf(_);p>=0&&(s[p]=an(c,_)),l=l.filter(u=>u!==c)}return[...s,...l]}function uo(e,t){let n=new Map(t.filter(p=>p.serverMessageId!==void 0).map(p=>[p.serverMessageId,p])),o=new Map;t.forEach((p,u)=>{o.set(p.id,u),p.serverMessageId!==void 0&&o.set(p.serverMessageId,u)});let r=new Set(e.flatMap(p=>[p.serverMessageId,p.id].filter(u=>u!==void 0))),a=!1,s=e.map(p=>{let u=n.get(p.serverMessageId??p.id);if(u===void 0||u.role!==p.role)return p;if(p.role==="user"&&p.serverMessageId===void 0)return a=!0,an(p,u);if(p.serverMessageId===void 0)return p;let m=Ue(u),g=Ue(p),P=u.status!=="streaming"&&m.length>=g.length&&Fa(p,u);if(m.length>g.length||m===g&&u.partsSig.value.length>p.partsSig.value.length||P)return a=!0,an(p,u);if(p.status==="streaming"&&u.status!=="streaming"&&Qp(p,u)){if(p.continuationStreaming&&_r(u))return p;if(!Fa(u,p))return a=!0,an(p,u)}return p}),l=[...n.values()].filter(p=>!r.has(p.serverMessageId)),c=s.findLastIndex(qa),d=s[c],_=wl(d,s.slice(0,c),l,o);if(d!==void 0&&_!==void 0&&Ue(_).length>=Ue(d).length&&(an(d,_),s[c]=_,l.splice(l.indexOf(_),1),a=!0),l.length===0)return{messages:a?s:e,changed:a};for(let p of l){let u=o.get(p.serverMessageId??p.id),m=!1,g=s.findIndex(P=>{let y=o.get(P.serverMessageId??P.id);return u===void 0?!1:y===void 0?m:y>u?!0:(m=!0,!1)});g===-1?s.push(p):s.splice(g,0,p)}return{messages:s,changed:!0}}function Cl(e,t){if(e.role!==t.role)return!1;let n=Ue(t),o=Ue(e);return n.length>o.length||t.partsSig.value.length>e.partsSig.value.length||Fa(e,t)}function Qp(e,t){let n=e.partsSig.value,o=t.partsSig.value;return n.length!==o.length?!1:n.every((r,a)=>{let s=o[a];switch(r.kind){case"text":return s?.kind==="text"&&s.textSig.value===r.textSig.value;case"reasoning":return s?.kind==="reasoning"&&s.textSig.value===r.textSig.value;case"step-start":return s?.kind==="step-start";case"tool":return s?.kind==="tool"&&s.toolCallId===r.toolCallId&&pr(s.toolName,r.toolName);case"file":return s?.kind==="file"&&s.url===r.url&&s.mediaType===r.mediaType;case"source":return s?.kind==="source"&&s.sourceId===r.sourceId&&s.url===r.url&&s.title===r.title&&s.filename===r.filename&&s.mediaType===r.mediaType;default:return r}})}function pr(e,t){let n=e.startsWith("tool:")?e.slice(5):e,o=t.startsWith("tool:")?t.slice(5):t;return n===o}var yl={"input-streaming":0,"input-available":1,"approval-requested":2,"approval-responded":3,"output-available":4,"output-denied":4,"output-error":4};function Fa(e,t){let n=new Map(e.partsSig.value.filter(Mn).map(o=>[o.toolCallId,o]));return t.partsSig.value.filter(Mn).some(o=>{let r=n.get(o.toolCallId);if(!r||yl[o.stateSig.value]>yl[r.stateSig.value])return!0;let a=o.approvalSig.value?.approved;return a!==void 0&&a!==r.approvalSig.value?.approved})}function sn(e){return e.role==="assistant"&&e.status!=="streaming"&&!Rt(e)}function fr(e,t){if(!e.includes(t)||t.retryAction===null)return;if(t.retryAction)return t.retryAction;if(t!==e.at(-1)||t.role!=="assistant"||t.serverMessageId===void 0||t.status!=="error"&&!sn(t))return;let n=e.indexOf(t);for(let o=n-1;o>=0;o--){let r=e[o];if(r?.role==="user"&&!r.ephemeral)return{kind:"repeat-user",messageId:r.id}}}function Rl(e){return e.canceled===!0&&e.role==="assistant"&&e.status!=="streaming"&&!Gp(e)}function Tl(e,t){return e.operatorRoutedTurn?sn(e)?"drop":"complete-operator-routed":t||sn(e)?"error":"complete"}function Xp(e){return e.kind==="text"||e.kind==="reasoning"?{kind:e.kind,id:e.id,textSig:te(e.text),doneSig:te(e.done)}:e.kind==="tool"?{kind:"tool",toolCallId:e.toolCallId,toolName:e.toolName,dynamic:e.dynamic,inputPartialSig:te(e.inputPartial),inputSig:te(e.input),outputSig:te(e.output),errorSig:te(e.error),stateSig:te(e.state),approvalSig:te(e.approval)}:e}function Yp(e){return e.kind==="text"||e.kind==="reasoning"?{kind:e.kind,id:e.id,text:e.textSig.value,done:e.doneSig.value}:e.kind==="tool"?{kind:"tool",toolCallId:e.toolCallId,toolName:e.toolName,dynamic:e.dynamic,inputPartial:e.inputPartialSig.value,input:e.inputSig.value,output:e.outputSig.value,error:e.errorSig.value,state:e.stateSig.value,approval:e.approvalSig.value}:e}var Il=Z.scope("feedback:audio"),mr=class{constructor(){ce(this,"ctx",null);ce(this,"master",null);ce(this,"buffers",new Map)}unlock(){if(this.ctx){this.ctx.state==="suspended"&&this.ctx.resume();return}let t=globalThis.AudioContext??globalThis.webkitAudioContext;if(t)try{this.ctx=new t,this.master=this.ctx.createGain(),this.master.gain.value=1,this.master.connect(this.ctx.destination)}catch(n){Il.warn("AudioContext init failed",{err:n})}}setVolume(t){if(!this.master||!this.ctx)return;let n=Math.max(0,Math.min(1,t));this.master.gain.setTargetAtTime(n,this.ctx.currentTime,.01)}playTone(t){let n=this.ctx,o=this.master;if(!n||!o||n.state!=="running")return;let r=n.currentTime,a=t.noteMs/1e3;t.notes.forEach((s,l)=>{let c=n.createOscillator();c.type=t.type,c.frequency.value=s;let d=n.createGain(),_=r+l*a;d.gain.setValueAtTime(1e-4,_),d.gain.exponentialRampToValueAtTime(t.peakGain,_+.005),d.gain.exponentialRampToValueAtTime(1e-4,_+a),c.connect(d).connect(o),c.start(_),c.stop(_+a+.01)})}async playUrl(t){let n=this.ctx,o=this.master;if(!n||!o||n.state!=="running")return;let r=await this.getBuffer(t);if(!r)return;let a=n.createBufferSource();a.buffer=r,a.connect(o),a.start()}destroy(){this.ctx&&this.ctx.close().catch(()=>{}),this.ctx=null,this.master=null,this.buffers.clear()}async getBuffer(t){if(!this.ctx)return null;let n=this.buffers.get(t);if(n)return n instanceof Promise,n;let o=this.ctx,r=fetch(t).then(a=>a.ok?a.arrayBuffer():Promise.reject(new Error(`fetch ${a.status}`))).then(a=>o.decodeAudioData(a)).then(a=>(this.buffers.set(t,a),a)).catch(a=>(Il.warn("audio fetch/decode failed",{url:t,err:a}),this.buffers.delete(t),null));return this.buffers.set(t,r),r}};var El={messageReceived:10,messageSent:0,error:[20,40,20],voiceStart:10,voiceStop:0},Al={messageReceived:{notes:[880,1318.51],noteMs:90,type:"sine",peakGain:.45},messageSent:{notes:[1568],noteMs:60,type:"sine",peakGain:.25},error:{notes:[523.25,392],noteMs:120,type:"triangle",peakGain:.55},voiceStart:{notes:[1318.51],noteMs:50,type:"sine",peakGain:.3},voiceStop:{notes:[880],noteMs:50,type:"sine",peakGain:.3}};var Xt=null,gr=0;function Jp(){return typeof navigator<"u"&&typeof navigator.vibrate=="function"}function Zp(){if(typeof document>"u")return null;let e=document.createElement("input");e.type="checkbox",e.setAttribute("switch",""),e.setAttribute("aria-hidden","true"),e.tabIndex=-1,e.id=`__${T.cssPrefix}_haptic_${Math.random().toString(36).slice(2)}`;let t=document.createElement("label");t.htmlFor=e.id,t.setAttribute("aria-hidden","true");let n="position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;opacity:0!important;pointer-events:none!important;";return e.style.cssText=n,t.style.cssText=n,document.body.append(e,t),{input:e,label:t}}function Ml(e){if(!(e===0||Array.isArray(e)&&e.every(t=>t===0))){if(Jp())try{navigator.vibrate(e);return}catch{}if(Xt??(Xt=Zp()),!!Xt)try{Xt.label.click()}catch{}}}function Ll(){gr++;let e=!1;return()=>{e||(e=!0,gr=Math.max(0,gr-1),gr===0&&Xt&&(Xt.input.remove(),Xt.label.remove(),Xt=null))}}var ef=Z.scope("feedback"),tf=100,vr=class{constructor(t,n){ce(this,"mutedSig",te(!1));ce(this,"audio",new mr);ce(this,"releaseHaptics");ce(this,"sound");ce(this,"haptics");ce(this,"lastPlayed",new Map);ce(this,"reducedMotionMq",null);this.sound=t,this.haptics=n,this.releaseHaptics=Ll(),this.audio.setVolume(this.effectiveVolume()),typeof matchMedia<"u"&&(this.reducedMotionMq=matchMedia("(prefers-reduced-motion: reduce)"))}unlock(){this.audio.unlock(),this.audio.setVolume(this.effectiveVolume())}update(t,n){this.sound=t,this.haptics=n,this.audio.setVolume(this.effectiveVolume())}setMuted(t){this.mutedSig.value!==t&&(this.mutedSig.value=t)}toggleMuted(){this.mutedSig.value=!this.mutedSig.value}play(t){this.mutedSig.value||this.isDeduped(t)||(this.lastPlayed.set(t,performance.now()),this.sound.enabled&&this.playSound(t),this.haptics.enabled&&this.isTouchDevice()&&this.playHaptic(t))}destroy(){this.audio.destroy(),this.releaseHaptics()}isDeduped(t){let n=this.lastPlayed.get(t);return n===void 0?!1:performance.now()-n<tf}playSound(t){let n=this.sound.events?.[t];if(n===!1)return;if(typeof n=="string"){this.audio.playUrl(n).catch(r=>ef.warn("audio play failed",{err:r,url:n}));return}let o=Al[t];o&&this.audio.playTone(o)}playHaptic(t){if(this.reducedMotionMq?.matches)return;let n=this.haptics.events?.[t];if(n===!1)return;let o=n===!0||n===void 0?El[t]:n;Ml(o)}effectiveVolume(){let t=this.sound.volume??.3;return this.reducedMotionMq?.matches?t*.5:t}isTouchDevice(){return typeof window>"u"?!1:matchMedia("(hover: none) and (pointer: coarse)").matches}};var nf=0;function i(e,t,n,o,r,a){t||(t={});var s,l,c=t;if("ref"in c)for(l in c={},t)l=="ref"?s=t[l]:c[l]=t[l];var d={type:e,props:c,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--nf,__i:-1,__u:0,__source:r,__self:a};if(typeof e=="function"&&(s=e.defaultProps))for(l in s)c[l]===void 0&&(c[l]=s[l]);return J.vnode&&J.vnode(d),d}var Y={fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24"},_o=`${T.cssPrefix}-icon-dir`,Wa=()=>i("svg",{...Y,"aria-hidden":"true",children:i("path",{d:"M21 12a8 8 0 0 1-12 6.93L3 21l1.65-5.16A8 8 0 1 1 21 12Z"})}),St=()=>i("svg",{...Y,"aria-hidden":"true",children:i("path",{d:"M18 6 6 18M6 6l12 12"})}),Ol=()=>i("svg",{...Y,"aria-hidden":"true",children:i("path",{d:"M12 5v14M5 12h14"})}),Nl=()=>i("svg",{...Y,class:_o,"aria-hidden":"true",children:[i("path",{d:"m22 2-7 20-4-9-9-4Z"}),i("path",{d:"M22 2 11 13"})]}),Dl=()=>i("svg",{...Y,"aria-hidden":"true",children:i("path",{d:"M12 19V5M5 12l7-7 7 7"})}),$l=()=>i("svg",{...Y,class:_o,"aria-hidden":"true",children:i("path",{d:"M3 20V4l18 8-18 8Z"})}),Ln=()=>i("svg",{...Y,class:_o,"aria-hidden":"true",children:i("path",{d:"m9 18 6-6-6-6"})}),Fl=()=>i("svg",{...Y,"aria-hidden":"true",children:i("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"})}),Bl=()=>i("svg",{...Y,"aria-hidden":"true",children:i("path",{d:"m21 11-9 9a5.5 5.5 0 0 1-7.78-7.78l8.49-8.49a3.67 3.67 0 0 1 5.19 5.19l-8.49 8.49a1.83 1.83 0 0 1-2.6-2.6l7.78-7.78"})}),Ul=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("rect",{x:"9",y:"2",width:"6",height:"12",rx:"3"}),i("path",{d:"M5 10a7 7 0 0 0 14 0M12 19v3"})]}),Hl=()=>i("svg",{...Y,"aria-hidden":"true",children:i("path",{d:"M3 8V3h5M21 8V3h-5M3 16v5h5M21 16v5h-5"})}),zl=()=>i("svg",{...Y,"aria-hidden":"true",children:i("path",{d:"M8 3v5H3M16 3v5h5M8 21v-5H3M16 21v-5h5"})}),ql=()=>i("svg",{...Y,"aria-hidden":"true",children:i("path",{d:"M3 3h7v2H5v5H3zM21 3h-7v2h5v5h2zM3 21h7v-2H5v-5H3zM21 21h-7v-2h5v-5h2z"})}),Vl=()=>i("svg",{...Y,"aria-hidden":"true",children:i("path",{d:"M10 3v5H3M14 3v5h7M10 21v-5H3M14 21v-5h7"})}),Wl=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("path",{d:"M14 3h7v7M21 3l-9 9"}),i("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"})]}),Kl=()=>i("svg",{...Y,"aria-hidden":"true",viewBox:"0 0 10 10",children:i("path",{d:"M9 1L1 9M9 5L5 9M9 9H9",strokeWidth:"1.5"})}),Gl=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("circle",{cx:"12",cy:"5",r:"1.5",fill:"currentColor",stroke:"none"}),i("circle",{cx:"12",cy:"12",r:"1.5",fill:"currentColor",stroke:"none"}),i("circle",{cx:"12",cy:"19",r:"1.5",fill:"currentColor",stroke:"none"})]}),jl=()=>i("svg",{...Y,"aria-hidden":"true",children:i("path",{d:"M11 5 6 9H2v6h4l5 4zM15 9a5 5 0 0 1 0 6M18 7a9 9 0 0 1 0 10"})}),Ql=()=>i("svg",{...Y,"aria-hidden":"true",children:i("path",{d:"M11 5 6 9H2v6h4l5 4zM22 9l-6 6M16 9l6 6"})}),Xl=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("path",{d:"M3 18 8 6l5 12M4.7 14h6.6"}),i("path",{d:"M14.5 18l3.2-7 3.2 7M15.6 15.8h4.2"})]}),Yl=()=>i("svg",{...Y,class:_o,"aria-hidden":"true",children:i("path",{d:"m5 6 6 6-6 6M13 6l6 6-6 6"})}),dn=()=>i("svg",{...Y,"aria-hidden":"true",children:i("path",{d:"M20 6 9 17l-5-5"})}),Jl=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("path",{d:"M3 3v6h6"}),i("path",{d:"M3.05 13A9 9 0 1 0 6 5.3L3 9"}),i("path",{d:"M12 7v5l3 2"})]}),Zl=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("circle",{cx:"12",cy:"12",r:"10"}),i("path",{d:"M2 12h20"}),i("path",{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"})]}),po=()=>i("svg",{...Y,class:_o,"aria-hidden":"true",children:i("path",{d:"M19 12H5M12 19l-7-7 7-7"})}),ec=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("path",{d:"M12 20h9"}),i("path",{d:"M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z"})]}),un=()=>i("svg",{...Y,"aria-hidden":"true",children:i("path",{d:"m6 9 6 6 6-6"})}),tc=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8Z"}),i("path",{d:"M14 2v6h6"})]}),of=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("path",{d:"m12 3-1.5 4.5L6 9l4.5 1.5L12 15l1.5-4.5L18 9l-4.5-1.5Z"}),i("path",{d:"M19 15v4M17 17h4M5 3v2M4 4h2"})]}),Ka=()=>i("svg",{...Y,"aria-hidden":"true",children:i("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2Z"})}),fo=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("circle",{cx:"12",cy:"12",r:"10"}),i("path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"}),i("path",{d:"M12 17h.01"})]}),rf=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("path",{d:"m15 4 3 3-9 9-3-3z"}),i("path",{d:"M18 2v2M20 4h2M3 20l3-3M3 16h2M5 14v2"})]}),af=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("rect",{x:"4",y:"8",width:"16",height:"12",rx:"2"}),i("path",{d:"M12 8V4"}),i("circle",{cx:"12",cy:"3",r:"1"}),i("path",{d:"M2 14h2M20 14h2M9 13h.01M15 13h.01M9.5 17h5"})]}),Ga=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("path",{d:"M4 14v-2a8 8 0 0 1 16 0v2"}),i("rect",{x:"2",y:"14",width:"4",height:"6",rx:"1.5"}),i("rect",{x:"18",y:"14",width:"4",height:"6",rx:"1.5"}),i("path",{d:"M20 20v1a3 3 0 0 1-3 3h-5"})]}),sf=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("circle",{cx:"12",cy:"12",r:"10"}),i("circle",{cx:"12",cy:"12",r:"4"}),i("path",{d:"m4.93 4.93 4.24 4.24M14.83 14.83l4.24 4.24M14.83 9.17l4.24-4.24M4.93 19.07l4.24-4.24"})]}),ja=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("circle",{cx:"11",cy:"11",r:"7"}),i("path",{d:"m21 21-4.3-4.3"})]}),nc=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("circle",{cx:"12",cy:"12",r:"9"}),i("path",{d:"m8.5 12 2.5 2.5 4.5-5"})]}),oc=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("path",{d:"M3 9.5 12 3l9 6.5"}),i("path",{d:"M5 9v11a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V9"})]}),rc=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("path",{d:"m3 11 15-5v12L3 13z"}),i("path",{d:"M3 11v2a2 2 0 0 0 2 2h1V9H5a2 2 0 0 0-2 2z"}),i("path",{d:"M7 15v3a2 2 0 0 0 4 0v-2"}),i("path",{d:"M21 10a3 3 0 0 1 0 4"})]}),mo=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("path",{d:"M14 9a2 2 0 0 1-2 2H6l-4 4V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2z"}),i("path",{d:"M18 9h2a2 2 0 0 1 2 2v11l-4-4h-6a2 2 0 0 1-2-2v-1"})]}),ac=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("circle",{cx:"12",cy:"12",r:"4"}),i("path",{d:"M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41"})]}),ic=()=>i("svg",{...Y,"aria-hidden":"true",children:i("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})}),sc=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("circle",{cx:"12",cy:"12",r:"9"}),i("path",{d:"M12 3v18"}),i("path",{d:"M12 3a9 9 0 0 1 0 18z",fill:"currentColor",stroke:"none"})]}),lf=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("circle",{cx:"10.5",cy:"10.5",r:"6.5"}),i("path",{d:"M8 11a2.5 2.5 0 0 0 5 0"}),i("path",{d:"m20 20-4.4-4.4"})]}),cf=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("path",{d:"M12 3.5 13.6 9 19 10.5 13.6 12 12 17.5 10.4 12 5 10.5 10.4 9z"}),i("path",{d:"M18.5 4v3M20 5.5h-3M5.5 16v2.5M6.75 17.25h-2.5"})]}),df=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("path",{d:"M4 18h16"}),i("path",{d:"M5 18a7 7 0 0 1 14 0"}),i("path",{d:"M12 8V6"}),i("path",{d:"M10 6h4"})]}),uf=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("path",{d:"M7 11V6.5a1.5 1.5 0 0 1 3 0V10"}),i("path",{d:"M10 10V5.5a1.5 1.5 0 0 1 3 0V10"}),i("path",{d:"M13 10V6.5a1.5 1.5 0 0 1 3 0V12"}),i("path",{d:"M16 9.5a1.5 1.5 0 0 1 3 0v2.5a7 7 0 0 1-7 7 7 7 0 0 1-6.4-4.2L4 12.5a1.5 1.5 0 0 1 2.6-1.5L7 11"})]}),lc=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("rect",{x:"9",y:"9",width:"11",height:"11",rx:"2"}),i("path",{d:"M5 15a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2"})]}),cc=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("path",{d:"M7 10v11H4a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1z"}),i("path",{d:"M7 10l4-7a2.5 2.5 0 0 1 2.5 2.5V8h5a2 2 0 0 1 2 2.3l-1.2 8A2 2 0 0 1 17.3 20H7"})]}),dc=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("path",{d:"M17 14V3h3a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1z"}),i("path",{d:"M17 14l-4 7a2.5 2.5 0 0 1-2.5-2.5V16h-5a2 2 0 0 1-2-2.3l1.2-8A2 2 0 0 1 6.7 4H17"})]}),uc=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("circle",{cx:"12",cy:"12",r:"3.5"}),i("path",{d:"M12 2v3M12 19v3M2 12h3M19 12h3M4.9 4.9l2.1 2.1M17 17l2.1 2.1M19.1 4.9l-2.1 2.1M7 17l-2.1 2.1"})]}),_c=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("circle",{cx:"12",cy:"12",r:"9"}),i("path",{d:"M12 7v5l3 2"})]}),hr=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("circle",{cx:"12",cy:"12",r:"9"}),i("path",{d:"m8.5 12 2.5 2.5 4.5-5"})]}),br=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("circle",{cx:"12",cy:"12",r:"9"}),i("path",{d:"m15 9-6 6M9 9l6 6"})]}),pc={chat:Wa,message:Ka,bubbles:mo,spark:of,wand:rf,bot:af,help:fo,lifebuoy:sf,headset:Ga,search:lf,sparkles:cf,concierge:df,wave:uf};var F=T.cssPrefix,R={launcher:`${F}-launcher`,callout:`${F}-callout`,calloutDismiss:`${F}-callout-dismiss`,panel:`${F}-panel`,panelHeader:`${F}-panel-header`,resizeGrip:`${F}-resize-grip`,scrollToBottom:`${F}-scroll-to-bottom`,loadPreviousMessages:`${F}-load-previous-messages`,actionHistory:`${F}-action-history`,actionClose:`${F}-action-close`,langSegment:`${F}-lang-segment`,composer:`${F}-composer`,composerInput:`${F}-composer-input`,composerSend:`${F}-composer-send`,composerStop:`${F}-composer-stop`,compactionStatus:`${F}-compaction-status`,messageQueue:`${F}-message-queue`,queuedMessage:`${F}-queued-message`,queuedMessageRemove:`${F}-queued-message-remove`,composerAttach:`${F}-composer-attach`,composerFileInput:`${F}-composer-file-input`,composerVoice:`${F}-composer-voice`,attachmentChip:`${F}-attachment-chip`,attachmentRemove:`${F}-attachment-remove`,suggestion:`${F}-suggestion`,messageBubble:`${F}-message`,messageRetry:`${F}-message-retry`,messageFeedback:`${F}-message-feedback`,feedbackUp:`${F}-feedback-up`,feedbackDown:`${F}-feedback-down`,messageCopy:`${F}-message-copy`,historyPane:`${F}-history-pane`,historyBack:`${F}-history-back`,historyItem:`${F}-history-item`,historyLoadMore:`${F}-history-load-more`,sidebar:`${F}-sidebar`,sidebarToggle:`${F}-sidebar-toggle`,sidebarNewConversation:`${F}-sidebar-new-conversation`,sidebarItem:`${F}-sidebar-item`,messengerHome:`${F}-messenger-home`,modulesEmpty:`${F}-modules-empty`,tab:`${F}-tab`,tabBadge:`${F}-tab-badge`,homeView:`${F}-home-view`,homeGreeting:`${F}-home-greeting`,homeBrand:`${F}-home-brand`,backHeader:`${F}-back-header`,contentView:`${F}-content-view`,contentScroll:`${F}-content-scroll`,homeSearch:`${F}-home-search`,helpSearch:`${F}-help-search`,homeRecent:`${F}-home-recent`,homeContentRow:`${F}-home-content-row`,helpArticle:`${F}-help-article`,newsItem:`${F}-news-item`,formGate:`${F}-form-gate`,formDone:`${F}-form-done`,formDoneToggle:`${F}-form-done-toggle`,formAnswers:`${F}-form-answers`,formFill:`${F}-form-fill`,formSubmit:`${F}-form-submit`,formSkip:`${F}-form-skip`,formField:`${F}-form-field`,toolAskQuestions:`${F}-tool-ask-questions`,toolInputSubmit:`${F}-tool-input-submit`,toolInputSkip:`${F}-tool-input-skip`,toolApproval:`${F}-tool-approval`,toolApprove:`${F}-tool-approve`,toolReject:`${F}-tool-reject`,toolEdit:`${F}-tool-edit`,toolDecision:`${F}-tool-decision`,typingDots:`${F}-typing-dots`,reasoning:`${F}-reasoning`,toolAskSummary:`${F}-ask-questions-summary`,toolAskOptions:`${F}-ask-questions-options-toggle`,toolCall:`${F}-tool-call`,source:`${F}-source`,operatorRequest:`${F}-operator-request`,operatorBanner:`${F}-operator-banner`,cancelOperatorRequest:`${F}-cancel-operator-request`};function Ye(e,t){return`${e}-${t}`}var yr=T.cssPrefix;function fc({onToggle:e,launcher:t,strings:n,leaving:o,edgeTab:r}){let a=t.variant!=="circle"&&!!t.label;return i("button",{type:"button",class:`${yr}-fab`,"data-variant":t.variant,"data-size":t.size,"data-edge-tab":r?"true":void 0,"data-leaving":o?"true":void 0,"data-testid":R.launcher,onClick:e,"aria-label":n.launcherOpen,children:[_f(t.icon),a?i("span",{class:`${yr}-fab-label`,children:lt(n,t.label??"")}):null]})}function _f(e){let t=pc[e];return t?i(t,{}):i(pf,{source:e})}function pf({source:e}){return i("span",{ref:t=>{t&&ff(t,e)},"aria-hidden":"true"})}function ff(e,t){if(e.dataset.svgMounted!==t)try{let o=new DOMParser().parseFromString(t,"image/svg+xml").documentElement;o.tagName.toLowerCase()==="svg"&&(e.replaceChildren(document.importNode(o,!0)),e.dataset.svgMounted=t)}catch{}}function mc({callout:e,launcherPosition:t,strings:n,closeLabel:o,onDismiss:r}){let[a,s]=$(!1);return M(()=>{let l=setTimeout(()=>s(!0),e.delayMs);return()=>clearTimeout(l)},[e.delayMs]),M(()=>{if(!a||e.autoDismissMs<=0)return;let l=setTimeout(r,e.autoDismissMs);return()=>clearTimeout(l)},[a,e.autoDismissMs,r]),a?i("div",{class:`${yr}-callout`,role:"status","data-shape":e.shape,"data-position":mf(e.position,t),"data-animated":e.animated?"true":void 0,"data-testid":R.callout,children:[i("span",{children:lt(n,e.text)}),i("button",{type:"button",class:`${yr}-callout-close`,onClick:r,"aria-label":o,title:o,"data-testid":R.calloutDismiss,children:i(St,{})})]}):null}function mf(e,t){let n=t.endsWith("-right"),o=t.startsWith("bottom-");return e==="vertical"?o?"top":"bottom":n?"left":"right"}function Pr({panelEl:e,resize:t,position:n,initialSize:o,onSizeChange:r,strings:a}){let s=T.cssPrefix,l=O(null);if(M(()=>{if(!e)return;let g=e.style;t.minWidth&&g.setProperty(`--${s}-resize-min-w`,t.minWidth),t.maxWidth&&g.setProperty(`--${s}-resize-max-w`,t.maxWidth),t.minHeight&&g.setProperty(`--${s}-resize-min-h`,t.minHeight),t.maxHeight&&g.setProperty(`--${s}-resize-max-h`,t.maxHeight),o&&(g.setProperty(`--${s}-widget-w`,`${o.width}px`),g.setProperty(`--${s}-widget-h`,`${o.height}px`))},[e,t.minWidth,t.maxWidth,t.minHeight,t.maxHeight,s,o]),!e)return null;let c=n.startsWith("top-"),d=n.endsWith("-right"),_=`${s}-resize-grip ${s}-resize-grip--${c?"bottom":"top"}-${d?"left":"right"}`,p=g=>{if(!e)return;let P=g.currentTarget,y=e.getBoundingClientRect();l.current={pointerId:g.pointerId,startX:g.clientX,startY:g.clientY,startW:y.width,startH:y.height,dirX:d?-1:1,dirY:c?1:-1},P.setPointerCapture(g.pointerId),e.setAttribute("data-resizing",""),g.preventDefault()},u=g=>{let P=l.current;if(!P||g.pointerId!==P.pointerId||!e)return;let y=(g.clientX-P.startX)*P.dirX,w=(g.clientY-P.startY)*P.dirY;e.style.setProperty(`--${s}-widget-w`,`${P.startW+y}px`),e.style.setProperty(`--${s}-widget-h`,`${P.startH+w}px`)},m=g=>{let P=l.current;if(!P||g.pointerId!==P.pointerId||!e)return;g.currentTarget.releasePointerCapture(g.pointerId),e.removeAttribute("data-resizing");let y=e.getBoundingClientRect();r({width:Math.round(y.width),height:Math.round(y.height)}),l.current=null};return i("div",{class:_,role:"separator","aria-orientation":"vertical","aria-label":a.resizeHandle,title:a.resizeHandle,onPointerDown:p,onPointerMove:u,onPointerUp:m,onPointerCancel:m,"data-testid":R.resizeGrip,children:i(Kl,{})})}var _n=T.cssPrefix,gf=`.${_n}-header, .${_n}-back-header, .${_n}-home-hero`,vf='button, a, input, textarea, select, [role="tab"], [contenteditable]',gc=56;function xr(e,t){M(()=>{if(!t||!e)return;let n=c=>Number.parseFloat(c)||0,o=(c,d)=>Math.min(d,Math.max(-d,c)),r=null,a=c=>{let d=c.target;if(!(d instanceof Element)||!d.closest(gf)||d.closest(vf))return;let _=e.getBoundingClientRect();r={id:c.pointerId,x:c.clientX,y:c.clientY,dx:n(e.style.getPropertyValue(`--${_n}-modal-dx`)),dy:n(e.style.getPropertyValue(`--${_n}-modal-dy`)),maxX:(window.innerWidth+_.width)/2-gc,maxY:(window.innerHeight+_.height)/2-gc},e.dataset.dragging="true",c.preventDefault()},s=c=>{if(!r||c.pointerId!==r.id)return;let d=o(r.dx+c.clientX-r.x,r.maxX),_=o(r.dy+c.clientY-r.y,r.maxY);e.style.setProperty(`--${_n}-modal-dx`,`${d}px`),e.style.setProperty(`--${_n}-modal-dy`,`${_}px`)},l=c=>{!r||c.pointerId!==r.id||(r=null,delete e.dataset.dragging)};return e.addEventListener("pointerdown",a),window.addEventListener("pointermove",s),window.addEventListener("pointerup",l),window.addEventListener("pointercancel",l),()=>{e.removeEventListener("pointerdown",a),window.removeEventListener("pointermove",s),window.removeEventListener("pointerup",l),window.removeEventListener("pointercancel",l)}},[e,t])}function On(e,t,n){switch(e){case"clear":case"sound":case"history":case"language":case"theme":case"textSize":return!0;case"popOut":return t!=="standalone"&&t!=="page";case"expand":return t==="floating";case"fullscreen":return t!=="standalone";case"close":return t==="standalone"||t==="page"?!1:t==="inline"?n==="fullscreen":!0}}function Sr(e,t,n){return On("close",e,t)?n.includes("close"):!1}function vc(e,t){return e==="inline"&&t==="fullscreen"?"exit-fullscreen":"close"}var hf='a[href],button:not([disabled]),textarea:not([disabled]),input:not([disabled]):not([type="hidden"]),select:not([disabled]),[tabindex]:not([tabindex="-1"])';function kr(e){let t=n=>{if(n.key!=="Tab")return;let o=[...e.querySelectorAll(hf)].filter(l=>l.offsetParent!==null||l===document.activeElement);if(o.length===0){n.preventDefault();return}let r=o[0],a=o[o.length-1];if(!r||!a)return;let s=e.getRootNode().activeElement;n.shiftKey&&s===r?(n.preventDefault(),a.focus()):!n.shiftKey&&s===a&&(n.preventDefault(),r.focus())};return e.addEventListener("keydown",t),()=>e.removeEventListener("keydown",t)}function wr(e){return e.trim().split(/\s+/).slice(0,2).map(t=>t.charAt(0).toUpperCase()).join("")}var Qa=T.cssPrefix;function hc({agent:e,strings:t}){let n=e.status??"online",o=lt(t,e.name),r=e.title?lt(t,e.title):null;return i("div",{class:`${Qa}-agent`,children:[i("div",{class:`${Qa}-agent-avatar`,"data-status":n,children:e.avatar?i("img",{src:e.avatar,alt:""}):i("span",{children:wr(o)})}),i("div",{class:`${Qa}-agent-meta`,children:[i("strong",{children:o}),r?i("span",{children:r}):null]})]})}var bc=Z.scope("attachments");function Cr(e,t,n){let o=yf(e),r=[],a=[],s=Sf(n.accept),l=t.reduce((d,_)=>d+_.size,0),c=t.length;for(let d of o){let _=bf(d,c,l,n,s);if(_){a.push({file:d,reason:_});continue}r.push(xf(d)),l+=d.size,c+=1}return(r.length||a.length)&&bc.debug("ingest",{accepted:r.length,rejected:a.map(d=>({name:d.file.name,reason:d.reason}))}),{accepted:r,rejected:a}}function Nn(e){try{URL.revokeObjectURL(e.previewUrl)}catch(t){bc.debug("revokeObjectURL failed",{error:t})}}function bf(e,t,n,o,r){return t>=o.maxCount?"count":n+e.size>o.maxBytes?"bytes":kf(e,r)?null:"mime"}function yf(e){return e?Array.isArray(e)?e.filter(t=>t instanceof File):[...e].map(t=>t instanceof File?t:Pf(t)).filter(t=>t!==null):[]}function Pf(e){let t=e;return!t?.getAsFile||t.kind!=="file"?null:t.getAsFile()}function xf(e){return{file:e,id:pt(),mediaType:e.type||"application/octet-stream",name:e.name||"pasted-file",previewUrl:URL.createObjectURL(e),size:e.size}}function Sf(e){return e.split(",").map(t=>t.trim().toLowerCase()).filter(Boolean).map(t=>{if(t.startsWith("."))return{kind:"ext",ext:t};let[n="*",o="*"]=t.split("/");return{kind:"mime",type:n,subtype:o}})}function kf(e,t){if(t.length===0)return!0;let[n="*",o="*"]=(e.type||"").toLowerCase().split("/"),r=(e.name||"").toLowerCase();return t.some(a=>a.kind==="ext"?r.endsWith(a.ext):(a.type==="*"||a.type===n)&&(a.subtype==="*"||a.subtype===o))}var go=T.cssPrefix;function yc({attachment:e,onRemove:t,disabled:n=!1}){let o=e.mediaType.startsWith("image/");return i("span",{class:`${go}-attachment-chip`,title:e.name,"data-testid":Ye(R.attachmentChip,e.id),children:[o?i("img",{class:`${go}-attachment-thumb`,src:e.previewUrl,alt:""}):i("span",{class:`${go}-attachment-thumb`,"aria-hidden":"true",children:i(tc,{})}),i("span",{class:`${go}-attachment-name`,children:e.name}),i("button",{type:"button",class:`${go}-attachment-remove`,onClick:t,disabled:n,"aria-label":`Remove ${e.name}`,"data-testid":Ye(R.attachmentRemove,e.id),children:i(St,{})})]})}var Xa={isSupported:!1,start:()=>{},stop:()=>{},cancel:()=>{}};function Ya(e,t,n){return e==="disabled"?Xa:e==="server"?Tf(n):wf(t)}function wf(e){let t=Cf();if(!t)return Xa;let n=null,o=0;return{isSupported:!0,start(r,a){let s=n,l=++o;n=null,s?.abort();let c=new t;n=c,c.continuous=!0,c.interimResults=!0,c.lang=e;let d=!1;c.addEventListener("result",p=>{if(o!==l||n!==c)return;let u=p,m="",g=!1;for(let P=u.resultIndex;P<u.results.length;P++){let y=u.results[P];y&&(m+=y[0].transcript,y.isFinal&&(g=!0))}r(m,g)});let _=()=>{d||o!==l||n!==c||(d=!0,n=null,a())};c.addEventListener("end",_),c.addEventListener("error",_);try{c.start()}catch{_()}},stop(){n?.stop()},cancel(){o++;let r=n;n=null,r?.abort()}}}function Cf(){return window.SpeechRecognition??window.webkitSpeechRecognition}var Rf=["audio/webm;codecs=opus","audio/webm","audio/ogg;codecs=opus","audio/mp4"];function Tf(e){if(typeof MediaRecorder>"u"||!navigator?.mediaDevices?.getUserMedia)return Xa;let t=0,n=null,o=s=>{for(let l of s.stream?.getTracks()??[])l.stop();s.stream=null},r=()=>{t++;let s=n;n=null,s&&(o(s),s.recorder?.state!=="inactive"&&s.recorder?.stop())},a=async s=>{if(s.finishing)return;s.finishing=!0;let l=s.recorder?.mimeType??"audio/webm";o(s);let c=new Blob(s.chunks,{type:l});s.chunks=[];try{let{text:d}=await e(c,l);n===s&&t===s.generation&&d&&s.onText(d,!0)}catch{}finally{n===s&&t===s.generation&&(n=null,s.onEnd())}};return{isSupported:!0,async start(s,l){r();let c={generation:t,recorder:null,stream:null,chunks:[],onText:s,onEnd:l,finishing:!1};n=c;try{let d=await navigator.mediaDevices.getUserMedia({audio:!0});if(n!==c||t!==c.generation){for(let u of d.getTracks())u.stop();return}c.stream=d;let _=If(),p=new MediaRecorder(d,_?{mimeType:_}:void 0);c.recorder=p,p.addEventListener("dataavailable",u=>{n===c&&t===c.generation&&u.data.size>0&&c.chunks.push(u.data)}),p.addEventListener("stop",()=>{n===c&&t===c.generation&&a(c)}),p.start()}catch{o(c),n===c&&t===c.generation&&(n=null,l())}},stop(){let s=n;if(s){if(!s.recorder){r();return}s.recorder.state!=="inactive"&&s.recorder.stop()}},cancel(){r()}}}function If(){for(let e of Rf)if(MediaRecorder.isTypeSupported(e))return e}var He=T.cssPrefix,Dn=Z.scope("composer");function $n(e){return e.reduce((t,n)=>t+n.size,0)}var Ef={arrowUp:Dl,paperPlane:Nl,send:$l,chevron:Ln};function Pc(e){return"activeElement"in e}function Af(e){return"host"in e&&"activeElement"in e}function xc({options:e,transport:t,feedback:n,bus:o,persistence:r,conversationId:a,isStreaming:s,isMemoryCompacting:l=!1,canReleaseQueuedMessages:c=!0,queueManualMessages:d=!1,active:_=!0,isPreparing:p=!1,operatorRequestEnabled:u,canRequestOperator:m=!1,controlMode:g="ai-agent",onRequestOperator:P,onSend:y,onStop:w,apiRef:S}){let h=e.strings,[b,x]=$(()=>r.loadDraft(a)),[k,E]=$([]),[G,H]=$(()=>r.loadMessageQueue(a).map(I=>({id:I.id,text:I.text,attachments:[]}))),A=O(G),D=O(!1),[K,B]=$(!1),[ne,q]=$(!1),de=O(!1),re=O(null),qe=O(null),_e=O(null),Se=O(0),Ze=O(a);Ze.current=a;let Te=O(_);Te.current=_;let Ve=O(p);Ve.current=p;let Fe=ne||p||!_,rt=s&&g==="ai-agent",We=rt||l&&g==="ai-agent",tt=g==="ai-agent"&&(We||d||G.length>0),ct=L(I=>{H(W=>{let j=I(W);return r.saveMessageQueue(Ze.current,j.filter(le=>le.attachments.length===0).map(({id:le,text:je})=>({id:le,text:je}))),A.current=j,j})},[r]),we=L(I=>{ct(W=>(W.find(j=>j.id===I)?.attachments.forEach(Nn),W.filter(j=>j.id!==I)))},[ct]),Ie=L(I=>{x(W=>{let j=typeof I=="function"?I(W):I;return j===W?W:(r.saveDraft(Ze.current,j),j)})},[r]),dt=e.features.fileUpload,me=e.features.voice,[Le,Ke]=$(()=>Ya(me,e.locale,(I,W)=>t.transcribe(I,W))),Ee=O(Le);Ee.current=Le;let at=O({mode:me,locale:e.locale,transport:t});M(()=>{let I=at.current;I.mode===me&&I.locale===e.locale&&I.transport===t||(at.current={mode:me,locale:e.locale,transport:t},Se.current++,Ee.current.cancel(),_e.current=null,B(!1),Ke(Ya(me,e.locale,(W,j)=>t.transcribe(W,j))))},[e.locale,me,t]),M(()=>()=>{Se.current++,Le.cancel()},[Le]);let bt=L(I=>{let W=_e.current;if(W===null)return!1;let j=Math.round(performance.now()-W);return Dn[I]("voiceStop",{durationMs:j}),o.emit("voiceStop",{durationMs:j}),_e.current=null,!0},[o]),f=L(()=>{_e.current!==null&&(Le.stop(),B(!1),bt("info")&&n.play("voiceStop"))},[bt,n,Le]),N=L(()=>{Se.current++,Le.cancel(),B(!1),bt("info")&&n.play("voiceStop")},[bt,n,Le]);M(()=>{(p||!_)&&N()},[_,N,p]),M(()=>{let I=re.current;if(!I)return;let W=I.getRootNode(),j=Pc(W)?W.activeElement:null;j&&I.closest(`.${He}-panel`)?.contains(j)||I.focus({preventScroll:!0})},[]),M(()=>{let I=re.current;if(!I)return;if(b.length===0){I.style.height="";return}I.style.height="auto";let W=getComputedStyle(I),j=Number.parseFloat(W.getPropertyValue(`--${He}-textarea-base-height`)),le=Number.parseFloat(W.borderTopWidth)+Number.parseFloat(W.borderBottomWidth),je=Math.min(I.scrollHeight+le,Number.parseFloat(W.maxHeight)),yt=Number.parseFloat(W.fontSize)*.7;I.style.height=`${je<j+yt?j:je}px`},[b]);let V=O(k);V.current=k,M(()=>()=>{V.current.forEach(Nn);for(let I of A.current)I.attachments.forEach(Nn)},[]),M(()=>{if(S)return S.current={attachFromDrop:I=>{if(!dt||!Te.current||de.current||Ve.current)return;let W=Cr(I,V.current,e.attachments);W.accepted.length!==0&&(Dn.info("attach (drop)",{count:W.accepted.length,totalBytes:$n(W.accepted)}),o.emit("attach",{count:W.accepted.length,totalBytes:$n(W.accepted)}),E(j=>[...j,...W.accepted]))},fill:I=>{if(!Te.current||de.current||Ve.current)return;Ie(I);let W=re.current;W&&(W.focus({preventScroll:!0}),requestAnimationFrame(()=>W.setSelectionRange(W.value.length,W.value.length)))},acceptQueuedMessage:we},()=>{S.current&&(S.current=null)}},[S,dt,p,e.attachments,we,Ie]),M(()=>{let I=re.current;if(!I)return;let W=I.closest(`.${He}-panel`);if(!W)return;let j=le=>{if(!Te.current||de.current||Ve.current)return;let je=le.clipboardData;if(!je)return;let yt=le.target?.closest?.("input, textarea, [contenteditable]:not([contenteditable='false'])");if(yt&&yt!==I)return;if(dt){let it=Cr(je.items,V.current,e.attachments);if(it.accepted.length>0){le.preventDefault(),Dn.info("attach (paste)",{count:it.accepted.length,totalBytes:$n(it.accepted)}),o.emit("attach",{count:it.accepted.length,totalBytes:$n(it.accepted)}),E(tn=>[...tn,...it.accepted]);return}}if(yt===I)return;let Tt=je.getData("text/plain");Tt&&(le.preventDefault(),Ie(it=>it+Tt),I.focus())};return W.addEventListener("paste",j),()=>W.removeEventListener("paste",j)},[dt,e.attachments,Ie]);let Q=async()=>{let I=b.trim();if(!I&&k.length===0||!_||rt||de.current||p)return;N(),de.current=!0,q(!0);let W=b,j=k;try{await y(I,j)&&(Ie(le=>le===W?"":le),E(le=>le!==j?le:(j.forEach(Nn),V.current=[],[])))}finally{de.current=!1,q(!1),requestAnimationFrame(()=>{let le=re.current;if(!le||le.disabled||!Te.current)return;let je=le.getRootNode(),yt=Pc(je)?je.activeElement:null,Tt=yt?.getAttribute("data-testid");if(!(yt&&yt!==le&&Tt!==R.composerSend&&Tt!==R.composerStop)){if(Af(je)){let it=je.host.ownerDocument;if(!it.hasFocus())return;let tn=it.activeElement;if(tn&&tn!==je.host&&tn!==it.body)return}le.focus({preventScroll:!0})}})}},ie=()=>{let I=b.trim();if(!I&&k.length===0||!_||!tt||de.current||p)return;N();let W=k;ct(j=>[...j,{id:pt(),text:I,attachments:W}]),Ie(""),E(j=>j!==W?j:(V.current=[],[])),re.current?.focus({preventScroll:!0})};M(()=>{We&&(D.current=!1)},[We]),M(()=>{let I=G[0];if(!I||!c||We||D.current||ne||p||!_)return;let W=setTimeout(()=>{D.current=!0,y(I.text,I.attachments,I.id).then(j=>{if(j){we(I.id);return}D.current=!1})},300);return()=>clearTimeout(W)},[_,c,p,y,We,G,we,ne]);let be=I=>{I.key!=="Enter"||I.shiftKey||I.isComposing||(I.preventDefault(),tt&&(b.trim()||k.length>0)?ie():rt?w():Q())},ye=I=>{let W=I.target;if(!_||de.current||p){W.value="";return}let j=Cr(W.files,k,e.attachments);j.accepted.length>0&&(Dn.info("attach (file picker)",{count:j.accepted.length,totalBytes:$n(j.accepted)}),o.emit("attach",{count:j.accepted.length,totalBytes:$n(j.accepted)}),E(le=>[...le,...j.accepted])),W.value=""},pe=I=>{!_||de.current||p||(Dn.info("removeAttachment",{id:I}),o.emit("removeAttachment",{id:I}),E(W=>{let j=W.find(le=>le.id===I);return j&&Nn(j),W.filter(le=>le.id!==I)}))},Ge=()=>{if(K){f();return}if(!_||!Le.isSupported||de.current||p)return;let I=++Se.current;_e.current=performance.now(),Dn.info("voiceStart"),o.emit("voiceStart",void 0),B(!0),n.play("voiceStart"),Le.start((W,j)=>{Se.current!==I||!Te.current||Ve.current||de.current||!j||Ie(le=>`${le}${W} `)},()=>{Se.current!==I||!Te.current||(B(!1),bt("debug"))})},se=Ef[e.composer.sendButton.icon],nt=!!(b.trim()||k.length>0);return i("div",{class:`${He}-composer`,"data-testid":R.composer,children:[G.length>0?i("div",{class:`${He}-message-queue`,"aria-label":h.queueMessage,"data-testid":R.messageQueue,children:G.map(I=>i("div",{class:`${He}-attachment-chip ${He}-queued-message`,"data-testid":`${R.queuedMessage}-${I.id}`,children:[i("span",{class:`${He}-attachment-name ${He}-queued-text`,children:I.text||I.attachments.map(W=>W.name).join(", ")}),i("button",{type:"button",class:`${He}-attachment-remove`,onClick:()=>we(I.id),"aria-label":h.removeQueuedMessage,title:h.removeQueuedMessage,"data-testid":`${R.queuedMessageRemove}-${I.id}`,children:i(St,{})})]},I.id))}):null,k.length>0?i("div",{class:`${He}-attachments`,children:k.map(I=>i(yc,{attachment:I,onRemove:()=>pe(I.id),disabled:Fe},I.id))}):null,i("div",{class:`${He}-composer-row`,children:[i("div",{class:`${He}-composer-actions`,children:[dt?i("button",{type:"button",class:`${He}-icon-btn`,onClick:()=>qe.current?.click(),disabled:Fe,"aria-label":h.attach,"data-testid":R.composerAttach,children:i(Bl,{})}):null,Le.isSupported?i("button",{type:"button",class:`${He}-icon-btn`,onClick:Ge,disabled:Fe,"aria-label":K?h.micStop:h.micStart,"aria-pressed":K,"data-recording":K?"true":void 0,"data-testid":R.composerVoice,children:i(Ul,{})}):null]}),i("textarea",{ref:re,name:"message",class:`${He}-textarea`,rows:1,value:b,placeholder:h.composerPlaceholder,onInput:I=>Ie(I.currentTarget.value),onKeyDown:be,disabled:Fe,"aria-label":h.composerPlaceholder,"data-testid":R.composerInput}),tt&&nt?i("button",{type:"button",class:`${He}-send`,"data-shape":e.composer.sendButton.shape,"data-variant":e.composer.sendButton.variant,onClick:ie,disabled:Fe,"aria-label":h.queueMessage,title:h.queueMessage,"data-testid":R.composerSend,children:i(se,{})}):null,rt?i("button",{type:"button",class:`${He}-send`,onClick:w,disabled:Fe,"aria-label":h.stop,"data-testid":R.composerStop,children:i(Fl,{})}):null,!rt&&(!tt||!nt)?i("button",{type:"button",class:`${He}-send`,"data-shape":e.composer.sendButton.shape,"data-variant":e.composer.sendButton.variant,onClick:()=>{Q()},disabled:Fe||!b.trim()&&k.length===0,"aria-label":h.send,"data-testid":R.composerSend,children:i(se,{})}):null,u&&g==="ai-agent"&&P?i("button",{type:"button",class:`${He}-icon-btn`,onClick:P,disabled:Fe||!m,"aria-label":h.talkToOperator,title:h.talkToOperator,"data-testid":R.operatorRequest,children:i(Ga,{})}):null]}),i("input",{ref:qe,name:"attachments",type:"file",multiple:!0,accept:e.attachments.accept,onChange:ye,disabled:Fe,class:`${He}-sr-only`,"data-testid":R.composerFileInput})]})}var Mf=T.cssPrefix;function Sc({visible:e,strings:t}){return e?i("div",{class:`${Mf}-dropzone`,role:"status","aria-live":"polite",children:t.dropZone}):null}function Rr({containerRef:e,onDrop:t,disabled:n=!1}){let[o,r]=$(!1);return M(()=>{if(n){r(!1);return}let a=e.current;if(!a)return;let s=0,l=p=>{s+=1,p.dataTransfer?.types.includes("Files")&&(p.preventDefault(),r(!0))},c=()=>{s-=1,!(s>0)&&(s=0,r(!1))},d=p=>{p.dataTransfer?.types.includes("Files")&&p.preventDefault()},_=p=>{s=0,r(!1),p.dataTransfer&&(p.preventDefault(),t(p.dataTransfer.items))};return a.addEventListener("dragenter",l),a.addEventListener("dragleave",c),a.addEventListener("dragover",d),a.addEventListener("drop",_),()=>{a.removeEventListener("dragenter",l),a.removeEventListener("dragleave",c),a.removeEventListener("dragover",d),a.removeEventListener("drop",_)}},[e,n,t]),{visible:n?!1:o}}function kc({itemCount:e,initialFocusIndex:t}){let[n,o]=$(!1),r=O(null),a=O(null),[s,l]=$(-1),c=L(()=>{o(!1),l(-1),r.current?.focus()},[]),d=L(()=>o(u=>!u),[]);M(()=>{if(!n)return;let u=m=>{let g=a.current,P=r.current;if(!g||!P)return;let y=m.composedPath();y.includes(g)||y.includes(P)||(o(!1),l(-1))};return document.addEventListener("click",u,!0),()=>document.removeEventListener("click",u,!0)},[n]),M(()=>{if(!n||e===0)return;let u=t?.()??0,m=u<0||u>=e?0:u;l(m)},[n,e,t]),M(()=>{if(!n||s<0)return;a.current?.querySelectorAll("[role='menuitem']")?.[s]?.focus()},[n,s]);let _=L(u=>{(u.key==="ArrowDown"||u.key==="Enter"||u.key===" ")&&(u.preventDefault(),o(!0))},[]),p=L(u=>{if(e!==0)switch(u.key){case"Escape":u.preventDefault(),c();return;case"ArrowDown":u.preventDefault(),l(m=>(m+1)%e);return;case"ArrowUp":u.preventDefault(),l(m=>(m-1+e)%e);return;case"Home":u.preventDefault(),l(0);return;case"End":u.preventDefault(),l(e-1)}},[e,c]);return{open:n,focusIndex:s,triggerRef:r,menuRef:a,toggle:d,close:c,onTriggerKey:_,onMenuKey:p}}function wc({items:e,triggerLabel:t}){let n=T.cssPrefix,o=kc({itemCount:e.length}),r=l=>{l.disabled||(l.onSelect?.(),l.keepOpen||o.close())},a=(l,c)=>l.onSelectValue?.(c),s=(l,c)=>{let d=c.segments;if(!d?.length)return;let _=Math.max(0,d.findIndex(u=>u.value===c.value)),p=-1;if(l.key==="ArrowRight"||l.key==="Enter"||l.key===" ")p=(_+1)%d.length;else if(l.key==="ArrowLeft")p=(_-1+d.length)%d.length;else return;l.preventDefault(),l.stopPropagation(),a(c,d[p].value)};return i("div",{class:`${n}-menu-wrap`,children:[i("button",{ref:o.triggerRef,type:"button",class:`${n}-icon-btn`,"aria-label":t,"aria-haspopup":"menu","aria-expanded":o.open,title:t,onClick:o.toggle,onKeyDown:o.onTriggerKey,children:i(Gl,{})}),o.open?i("div",{ref:o.menuRef,class:`${n}-menu`,role:"menu","aria-label":t,onKeyDown:o.onMenuKey,tabIndex:-1,children:e.map(l=>l.segments?i("div",{role:"menuitem",class:`${n}-menu-item ${n}-menu-item-segmented`,"aria-label":l.label,tabIndex:-1,onKeyDown:c=>s(c,l),children:[l.icon?i("span",{class:`${n}-menu-icon`,children:l.icon}):null,i("span",{class:`${n}-menu-label`,children:l.label}),i("span",{class:`${n}-segmented`,role:"group","aria-label":l.label,children:l.segments.map(c=>{let d=c.value===l.value;return i("button",{type:"button",role:"menuitemradio","aria-checked":d,class:`${n}-segment`,"data-on":d?"true":void 0,lang:c.lang,title:c.value,tabIndex:-1,"data-testid":`${R.langSegment}-${c.value}`,onClick:()=>a(l,c.value),children:c.label},c.value)})})]},l.id):i("button",{type:"button",role:"menuitem",class:`${n}-menu-item`,"aria-pressed":l.type==="switch"?l.on:void 0,disabled:l.disabled,onClick:()=>r(l),children:[l.icon?i("span",{class:`${n}-menu-icon`,children:l.icon}):null,i("span",{class:`${n}-menu-label`,children:l.label}),l.type==="switch"&&l.on?i("span",{class:`${n}-menu-check`,"aria-hidden":"true",children:i(dn,{})}):null]},l.id))}):null]})}var Ja=T.cssPrefix;function Lf(e){let t=typeof matchMedia=="function"?matchMedia("(prefers-color-scheme: dark)").matches:!0;return e==="auto"?t?"light":"dark":t?e==="light"?"dark":"auto":e==="dark"?"light":"auto"}var Of={normal:"large",large:"small",small:"normal"};function Nf(e){return e==="light"?i(ac,{}):e==="dark"?i(ic,{}):i(sc,{})}function Df(e){return(e.split("-")[0]??e).toUpperCase()}function $f(e,t){let n;try{n=new URL(e,window.location.href)}catch{return}if(!(n.protocol!=="http:"&&n.protocol!=="https:"))return t.conversationId&&n.searchParams.set("chat",t.conversationId),n.searchParams.set("widgetId",t.widgetId),t.publicKey&&n.searchParams.set("public_key",t.publicKey),n.searchParams.set("ai_agent_deployment_id",t.aiAgentDeploymentId),n.href}function Et({panelProps:e,variant:t}){let{options:n,panelSize:o,feedback:r,onClose:a,onClear:s,onExpand:l,onFullscreen:c,onSoundToggle:d}=e,{onToggleHistory:_,onLocaleChange:p,onThemeChange:u,onTextSizeChange:m}=e,g=n.strings,P=n.mode,y=t==="chat",w=ft(()=>r.mutedSig.value).value,S=new Set(n.actions),h=q=>S.has(q),b=typeof matchMedia=="function"&&matchMedia("(max-width: 640px)").matches,x=q=>b?!1:On(q,P,o),k=n.themeMode,E={auto:g.themeAuto,light:g.themeLight,dark:g.themeDark},G=n.textSize,H={small:g.textSizeSmall,normal:g.textSizeNormal,large:g.textSizeLarge},A=[];if(y&&h("clear")&&A.push({id:"clear",icon:i(ec,{}),label:g.newConversation,onSelect:s}),h("expand")&&x("expand")){let q=o==="expanded";A.push({id:"expand",icon:q?i(zl,{}):i(Hl,{}),label:q?g.collapse:g.expand,type:"switch",on:q,onSelect:l})}if(h("fullscreen")&&x("fullscreen")){let q=o==="fullscreen";A.push({id:"fullscreen",icon:q?i(Vl,{}):i(ql,{}),label:q?g.exitFullscreen:g.fullscreen,type:"switch",on:q,onSelect:c})}let D=n.popOutUrl,K=n.aiAgentDeploymentId;h("popOut")&&D&&K&&On("popOut",P,o)&&A.push({id:"popOut",icon:i(Wl,{}),label:g.popOut,onSelect:()=>{let q=$f(D,{conversationId:e.conversationId,widgetId:n.widgetId,publicKey:n.publicKey,aiAgentDeploymentId:K});q&&window.open(q,"_blank","noopener,noreferrer")}}),y&&h("sound")&&A.push({id:"sound",icon:w?i(Ql,{}):i(jl,{}),label:w?g.soundOff:g.soundOn,type:"switch",on:!w,onSelect:d}),h("theme")&&A.push({id:"theme",icon:Nf(k),label:`${g.theme}: ${E[k]}`,onSelect:()=>u(Lf(k)),keepOpen:!0}),h("textSize")&&A.push({id:"textSize",icon:i(Xl,{}),label:`${g.textSize}: ${H[G]}`,onSelect:()=>m(Of[G]),keepOpen:!0}),h("language")&&n.availableLocales.length>1&&A.push({id:"language",icon:i(Zl,{}),label:g.language,segments:n.availableLocales.map(q=>({value:q,label:Df(q),lang:q})),value:n.locale,onSelectValue:p});let B=!!a&&Sr(P,o,n.actions),ne=y&&h("history");return i("div",{class:`${Ja}-header-actions`,children:[ne?i("button",{type:"button",class:`${Ja}-icon-btn`,onClick:_,"aria-label":g.history,title:g.history,"data-testid":R.actionHistory,children:i(Jl,{})}):null,A.length>0?i(wc,{items:A,triggerLabel:g.moreActions}):null,B?i("button",{type:"button",class:`${Ja}-icon-btn`,onClick:a,"aria-label":g.close,title:g.close,"data-testid":R.actionClose,children:i(St,{})}):null]})}var Ff=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,Bf=/^https?:\/\/[^\s.]+\.[^\s]+$/i,Uf=/^[+]?[\d\s().-]{6,}$/;function Fn(e,t){return e.replace(/\{(\w+)\}/g,(n,o)=>String(t[o]??`{${o}}`))}function Hf(e){return Array.isArray(e)?e.length:e?.trim()?1:0}function zf(e,t,n){let o=e.required??!0,r=e.validation;if(e.type==="multiselect"){let s=Hf(t);return o&&s===0?n.formRequired:s===0?void 0:r?.minSelections!=null&&s<r.minSelections?Fn(n.formChooseAtLeast,{min:r.minSelections}):r?.maxSelections!=null&&s>r.maxSelections?Fn(n.formChooseAtMost,{max:r.maxSelections}):void 0}let a=typeof t=="string"?t.trim():"";if(!a)return o?n.formRequired:void 0;switch(e.type){case"email":if(!Ff.test(a))return n.formInvalidEmail;break;case"url":if(!Bf.test(a))return n.formInvalidUrl;break;case"tel":if(!Uf.test(a))return n.formInvalidTel;break;case"number":{let s=Number(a);if(!Number.isFinite(s))return n.formInvalidNumber;if(r?.min!=null&&s<r.min)return Fn(n.formNumberTooSmall,{min:r.min});if(r?.max!=null&&s>r.max)return Fn(n.formNumberTooLarge,{max:r.max});break}default:break}if(r?.minLength!=null&&a.length<r.minLength)return Fn(n.formTooShort,{min:r.minLength});if(r?.maxLength!=null&&a.length>r.maxLength)return Fn(n.formTooLong,{max:r.maxLength});if(r?.pattern)try{if(!new RegExp(r.pattern).test(a))return n.formPatternMismatch}catch{}}function Cc(e,t,n){let o={};for(let r of e){let a=zf(r,t[r.name],n);a&&(o[r.name]=a)}return o}function Rc(e){let t={};for(let[n,o]of Object.entries(e)){let r=Array.isArray(o)?o.join(", "):o;r.trim()&&(t[n]=r.trim())}return t}var Ce=T.cssPrefix,Tr="__other__";function vo({fields:e,strings:t,submitLabel:n,onSubmit:o,skipLabel:r,onSkip:a,footerHint:s,submitOnEnter:l,disabled:c,initialValues:d,hideActions:_,fieldTypeLabels:p,rootTestId:u,submitTestId:m,skipTestId:g}){let[P,y]=$(()=>({...Kf(e),...d})),[w,S]=$({}),[h,b]=$({}),x=A=>{h[A]&&b(D=>({...D,[A]:""}))},k=(A,D)=>{y(K=>({...K,[A]:D})),x(A)},E=(A,D)=>{S(K=>({...K,[A]:D})),x(A)},G=A=>{if(A.preventDefault(),c)return;let D=Gf(e,P,w),K=Cc(e,D,t);if(Object.keys(K).length>0){b(K);return}o(Rc(D))},H=A=>{!l||A.key!=="Enter"||A.shiftKey||A.isComposing||A.target?.tagName==="TEXTAREA"&&G(A)};return i("form",{class:`${Ce}-form`,onSubmit:G,onKeyDown:H,"data-testid":u,noValidate:!0,children:[e.map(A=>i(qf,{field:A,value:P[A.name],otherText:w[A.name]??"",error:h[A.name],disabled:c,typeLabel:p?.[A.name],strings:t,onChange:D=>k(A.name,D),onOtherChange:D=>E(A.name,D)},A.name)),_?null:i("div",{class:`${Ce}-form-actions`,children:[s?i("span",{class:`${Ce}-form-hint`,children:s}):null,r&&a?i("button",{type:"button",class:`${Ce}-form-skip`,onClick:a,disabled:c,"data-testid":g,children:r}):null,i("button",{type:"submit",class:`${Ce}-form-submit`,disabled:c,"data-testid":m,children:n})]})]})}function qf({field:e,value:t,otherText:n,error:o,disabled:r,typeLabel:a,strings:s,onChange:l,onOtherChange:c}){let d=Ye(R.formField,e.name),_=Vf({field:e,value:t,otherText:n,disabled:r,strings:s,onChange:l,onOtherChange:c,fieldTid:d});return i("label",{class:`${Ce}-field`,"data-field":e.name,"data-invalid":o?"true":void 0,children:[i("span",{class:`${Ce}-field-head`,children:[i("span",{class:`${Ce}-field-label`,children:[e.label,e.required??!0?i("span",{class:`${Ce}-field-req`,"aria-hidden":"true",children:" *"}):null]}),a?i("span",{class:`${Ce}-field-type`,children:a}):null]}),_,e.validationHint&&!o?i("span",{class:`${Ce}-field-hint`,children:e.validationHint}):null,o?i("span",{class:`${Ce}-field-error`,role:"alert",children:o}):null]})}function Vf(e){let{field:t,value:n,otherText:o,disabled:r,strings:a,onChange:s,onOtherChange:l,fieldTid:c}=e,d=typeof n=="string"?n:"";switch(t.type){case"textarea":return i("textarea",{class:`${Ce}-field-input`,rows:3,value:d,placeholder:t.placeholder,disabled:r,onInput:_=>s(_.target.value),"data-testid":c});case"select":return i("select",{class:`${Ce}-field-input`,value:d,disabled:r,onChange:_=>s(_.target.value),"data-testid":c,children:[i("option",{value:"",children:t.placeholder??"\u2014"}),(t.options??[]).map(_=>i("option",{value:_.value,children:_.label??_.value},_.value))]});case"radio":{let _=t.allowOther&&d===Tr;return i("div",{class:`${Ce}-field-choices`,role:"radiogroup","data-testid":c,children:[(t.options??[]).map(p=>i("label",{class:`${Ce}-choice`,children:[i("input",{type:"radio",name:`${Ce}-${t.name}`,checked:d===p.value,disabled:r,onChange:()=>s(p.value)}),i("span",{children:p.label??p.value})]},p.value)),t.allowOther?i("label",{class:`${Ce}-choice`,children:[i("input",{type:"radio",name:`${Ce}-${t.name}`,checked:d===Tr,disabled:r,onChange:()=>s(Tr)}),i("span",{children:a.formOther})]}):null,_?i("input",{class:`${Ce}-field-input`,value:o,placeholder:t.placeholder??a.formOtherPlaceholder,disabled:r,onInput:p=>l(p.target.value)}):null]})}case"checkbox":return i("label",{class:`${Ce}-choice`,children:[i("input",{type:"checkbox",checked:d==="true",disabled:r,onChange:_=>s(_.target.checked?"true":""),"data-testid":c}),i("span",{children:t.placeholder??t.label})]});case"multiselect":{let _=Array.isArray(n)?n:[],p=(u,m)=>s(m?[..._,u]:_.filter(g=>g!==u));return i("div",{class:`${Ce}-field-choices`,"data-testid":c,children:[(t.options??[]).map(u=>i("label",{class:`${Ce}-choice`,children:[i("input",{type:"checkbox",checked:_.includes(u.value),disabled:r,onChange:m=>p(u.value,m.target.checked)}),i("span",{children:u.label??u.value})]},u.value)),t.allowOther||(t.options??[]).length===0?i("textarea",{class:`${Ce}-field-input`,rows:2,value:o,placeholder:t.placeholder??a.formOtherPlaceholder,disabled:r,onInput:u=>l(u.target.value)}):null]})}default:return i("input",{class:`${Ce}-field-input`,type:Wf(t.type),value:d,placeholder:t.placeholder,disabled:r,onInput:_=>s(_.target.value),"data-testid":c})}}function Wf(e){switch(e){case"number":case"email":case"tel":case"url":case"date":case"time":return e;default:return"text"}}function Kf(e){let t={};for(let n of e)n.defaultValue!=null&&(t[n.name]=n.type==="multiselect"?n.defaultValue.split(",").map(o=>o.trim()).filter(Boolean):n.defaultValue);return t}function Gf(e,t,n){let o={...t};for(let r of e){let a=n[r.name]?.trim();if(r.type==="radio"&&r.allowOther&&t[r.name]===Tr)o[r.name]=a??"";else if(r.type==="multiselect"&&a){let s=a.split(/[,\n;]+/).map(c=>c.trim()).filter(Boolean),l=Array.isArray(t[r.name])?t[r.name]:[];o[r.name]=[...l,...s]}}return o}var At=T.cssPrefix;function Za({form:e,strings:t,onSubmit:n,onSkip:o}){return i("div",{class:`${At}-form-gate`,"data-testid":R.formGate,children:[e.title?i("h3",{class:`${At}-form-gate-title`,children:e.title}):null,e.description?i("p",{class:`${At}-form-gate-desc`,children:e.description}):null,i(vo,{fields:e.fields,strings:t,submitLabel:e.submitLabel??t.formSubmit,onSubmit:n,skipLabel:e.skippable?t.formSkip:void 0,onSkip:e.skippable?o:void 0,submitTestId:R.formSubmit,skipTestId:R.formSkip})]})}function Tc({marker:e,strings:t,onFill:n}){let o=e.outcome==="skipped",r=o?t.formSkipped:t.formSubmitted,a=e.title?i(fe,{children:[i("span",{children:e.title}),i("span",{class:`${At}-sr-only`,children:r})]}):i("span",{children:r}),s=e.form?.reviewable??!1,l=!o&&s&&e.values&&Object.keys(e.values).length>0?e.values:null;if(l){let c=d=>e.form?.fields.find(_=>_.name===d)?.label??d;return i("details",{class:`${At}-form-done`,"data-outcome":e.outcome,"data-testid":R.formDone,children:[i("summary",{class:`${At}-form-done-summary`,"data-testid":R.formDoneToggle,children:[i(dn,{}),a,i(Ln,{})]}),i("dl",{class:`${At}-form-answers`,"data-testid":R.formAnswers,children:Object.entries(l).map(([d,_])=>i("div",{class:`${At}-form-answer`,children:[i("dt",{children:c(d)}),i("dd",{children:_})]},d))})]})}return i("div",{class:`${At}-form-done`,"data-outcome":e.outcome,"data-testid":R.formDone,role:"status",children:[o?i(Yl,{}):i(dn,{}),a,o&&e.form?.reopenable&&n?i("button",{type:"button",class:`${At}-form-done-fill`,"data-testid":R.formFill,onClick:n,children:t.formFillOut}):null]})}function Xf(e,t){for(var n in t)e[n]=t[n];return e}function ti(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var o in t)if(o!=="__source"&&e[o]!==t[o])return!0;return!1}function Ic(e,t){this.props=e,this.context=t}function $c(e,t){function n(r){var a=this.props.ref;return a!=r.ref&&a&&(typeof a=="function"?a(null):a.current=null),t?!t(this.props,r)||a!=r.ref:ti(this.props,r)}function o(r){return this.shouldComponentUpdate=n,Nt(e,r)}return o.displayName="Memo("+(e.displayName||e.name)+")",o.__f=o.prototype.isReactComponent=!0,o.type=e,o}(Ic.prototype=new _t).isPureReactComponent=!0,Ic.prototype.shouldComponentUpdate=function(e,t){return ti(this.props,e)||ti(this.state,t)};var Ec=J.__b;J.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Ec&&Ec(e)};var Vy=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;var Yf=J.__e;J.__e=function(e,t,n,o){if(e.then){for(var r,a=t;a=a.__;)if((r=a.__c)&&r.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k||[]),r.__c(e,t)}Yf(e,t,n,o)};var Ac=J.unmount;function Fc(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(o){typeof o.__c=="function"&&o.__c()}),e.__c.__H=null),(e=Xf({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(o){return Fc(o,t,n)})),e}function Bc(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(o){return Bc(o,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function ei(){this.__u=0,this.o=null,this.__b=null}function Uc(e){var t=e.__&&e.__.__c;return t&&t.__a&&t.__a(e)}function Ir(){this.i=null,this.l=null}J.unmount=function(e){var t=e.__c;t&&(t.__z=!0),t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Ac&&Ac(e)},(ei.prototype=new _t).__c=function(e,t){var n=t.__c,o=this;o.o==null&&(o.o=[]),o.o.push(n);var r=Uc(o.__v),a=!1,s=function(){a||o.__z||(a=!0,n.__R=null,r?r(c):c())};n.__R=s;var l=n.__P;n.__P=null;var c=function(){if(!--o.__u){if(o.state.__a){var d=o.state.__a;o.__v.__k[0]=Bc(d,d.__c.__P,d.__c.__O)}var _;for(o.setState({__a:o.__b=null});_=o.o.pop();)_.__P=l,_.forceUpdate()}};o.__u++||32&t.__u||o.setState({__a:o.__b=o.__v.__k[0]}),e.then(s,s)},ei.prototype.componentWillUnmount=function(){this.o=[]},ei.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=Fc(this.__b,n,o.__O=o.__P)}this.__b=null}var r=t.__a&&Nt(fe,null,e.fallback);return r&&(r.__u&=-33),[Nt(fe,null,t.__a?null:e.children),r]};var Mc=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};(Ir.prototype=new _t).__a=function(e){var t=this,n=Uc(t.__v),o=t.l.get(e);return o[0]++,function(r){var a=function(){t.props.revealOrder?(o.push(r),Mc(t,e,o)):r()};n?n(a):a()}},Ir.prototype.render=function(e){this.i=null,this.l=new Map;var t=Yn(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},Ir.prototype.componentDidUpdate=Ir.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){Mc(e,n,t)})};var Jf=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Zf=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,em=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,tm=/[A-Z0-9]/g,nm=typeof document<"u",om=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};_t.prototype.isReactComponent=!0,["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(_t.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Lc=J.event;J.event=function(e){return Lc&&(e=Lc(e)),e.persist=function(){},e.isPropagationStopped=function(){return this.cancelBubble},e.isDefaultPrevented=function(){return this.defaultPrevented},e.nativeEvent=e};var Hc,rm={configurable:!0,get:function(){return this.class}},Oc=J.vnode;J.vnode=function(e){typeof e.type=="string"&&(function(t){var n=t.props,o=t.type,r={},a=o.indexOf("-")==-1;for(var s in n){var l=n[s];if(!(s==="value"&&"defaultValue"in n&&l==null||nm&&s==="children"&&o==="noscript"||s==="class"||s==="className")){var c=s.toLowerCase();s==="defaultValue"&&"value"in n&&n.value==null?s="value":s==="download"&&l===!0?l="":c==="translate"&&l==="no"?l=!1:c[0]==="o"&&c[1]==="n"?c==="ondoubleclick"?s="ondblclick":c!=="onchange"||o!=="input"&&o!=="textarea"||om(n.type)?c==="onfocus"?s="onfocusin":c==="onblur"?s="onfocusout":em.test(s)&&(s=c):c=s="oninput":a&&Zf.test(s)?s=s.replace(tm,"-$&").toLowerCase():l===null&&(l=void 0),c==="oninput"&&r[s=c]&&(s="oninputCapture"),r[s]=l}}o=="select"&&(r.multiple&&Array.isArray(r.value)&&(r.value=Yn(n.children).forEach(function(d){d.props.selected=r.value.indexOf(d.props.value)!=-1})),r.defaultValue!=null&&(r.value=Yn(n.children).forEach(function(d){d.props.selected=r.multiple?r.defaultValue.indexOf(d.props.value)!=-1:r.defaultValue==d.props.value}))),n.class&&!n.className?(r.class=n.class,Object.defineProperty(r,"className",rm)):n.className&&(r.class=r.className=n.className),t.props=r})(e),e.$$typeof=Jf,Oc&&Oc(e)};var Nc=J.__r;J.__r=function(e){Nc&&Nc(e),Hc=e.__c};var Dc=J.diffed;J.diffed=function(e){Dc&&Dc(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value),Hc=null};function Er(e){if(!e)return!1;let t=e.startsWith("tool:")?e.slice(5):e;return t==="ask-user-questions"||t==="ask_user_questions"}var kt=T.cssPrefix;function oi(e){return e.startsWith("tool:")||e.startsWith("tool-")?e.slice(5):e}function Ar(e,t){let n=e==="output-available"||e==="output-error"||e==="output-denied",o=e==="approval-responded"||t?.approved!==void 0;return{terminal:n,responded:o,decided:n||o}}function ri({status:e,icon:t,label:n}){return i("span",{class:`${kt}-toolui-badge ${kt}-toolui-status`,"data-status":e,children:[i("span",{class:`${kt}-toolui-status-icon`,children:t}),n]})}function am(e,t){return e==="output-error"?"error":e==="output-denied"||t?.approved===!1?"denied":e==="output-available"?"completed":e==="approval-responded"||t?.approved===!0?"responded":e==="approval-requested"?"awaiting":"running"}function ai(e,t,n={}){return n.submitted?"responded":lm(am(e,t),n.superseded,n.live??!0)}function im({status:e}){return e==="denied"||e==="error"||e==="superseded"?i(br,{}):e==="completed"||e==="responded"?i(hr,{}):i(_c,{})}function sm(e,t){switch(e){case"awaiting":return t.statusAwaiting;case"responded":return t.statusResponded;case"completed":return t.statusCompleted;case"denied":return t.statusDenied;case"error":return t.statusError;case"superseded":return t.statusSuperseded;default:return t.statusRunning}}function lm(e,t,n){return t&&(e==="awaiting"||e==="running")?"superseded":!n&&e==="running"?"error":e}function cm({state:e,approval:t,strings:n,superseded:o,live:r=!0,submitted:a=!1}){let s=ai(e,t,{superseded:o,live:r,submitted:a});return i(ri,{status:s,icon:i(im,{status:s}),label:sm(s,n)})}function dm({name:e,state:t,approval:n,strings:o,superseded:r,live:a,submitted:s}){return i(fe,{children:[i("span",{class:`${kt}-toolui-name-pill`,children:[i(uc,{}),i("span",{class:`${kt}-toolui-name-text`,children:e})]}),i(cm,{state:t,approval:n,strings:o,superseded:r,live:a,submitted:s}),i("span",{class:`${kt}-toolui-chevron`,children:i(un,{})})]})}function Mr({part:e,strings:t,testid:n,superseded:o,live:r,submitted:a}){let s=oe(()=>ge(()=>e.inputSig.value),[e]),l=oe(()=>ge(()=>e.outputSig.value),[e]),c=oe(()=>ge(()=>e.errorSig.value),[e]),d=oe(()=>ge(()=>e.stateSig.value),[e]),_=oe(()=>ge(()=>e.approvalSig.value),[e]);return i("details",{class:`${kt}-toolui ${kt}-toolui-collapsible`,"data-testid":n,children:[i("summary",{class:`${kt}-toolui-head`,children:i(dm,{name:oi(e.toolName),state:d.value,approval:_.value,strings:t,superseded:o,live:r,submitted:a})}),i(ni,{label:t.toolParameters,value:s.value}),l.value!==void 0?i(ni,{label:t.toolResult,value:l.value}):null,c.value?i(ni,{label:t.statusError,value:c.value,error:!0}):null]})}function ni({label:e,value:t,error:n}){let o=n?typeof t=="string"?t:"":Lr(ii(t));return o?i("div",{class:`${kt}-toolui-section`,children:[i("span",{class:`${kt}-toolui-label`,children:e}),i("pre",{class:`${kt}-toolui-code`,"data-error":n?"true":void 0,children:o})]}):null}function ii(e){if(e&&typeof e=="object"){let t=e;if(t.storage==="tool-result-ref"&&"summary"in t)return t.summary}return e}function Lr(e){if(e==null)return"";try{let t=typeof e=="string"?e:JSON.stringify(e,null,2);return!t||t==="{}"||t==="[]"||t==='""'?"":t.length>800?`${t.slice(0,800)}\u2026`:t}catch{return""}}function zc(e){return e.partsSig.value.some(t=>t.kind==="text"&&t.textSig.value.length>0)}function qc(e){return e.partsSig.value.some(t=>t.kind==="reasoning")}function um(e){return e.streaming&&!e.bufferedHold&&!(e.reasoningVisible&&e.working)}function Vc(e){let{streaming:t,reasoningVisible:n,emptyReply:o,hidden:r}=e,a=e.responseMode==="buffered"&&t,s=t&&!e.hasAnswerText;return{streaming:t,bufferedHold:a,reasoningVisible:n,working:s,showStreamDots:um({streaming:t,bufferedHold:a,reasoningVisible:n,working:s}),emptyReply:o,hidden:r}}function Wc(e,t){let n=e.stateSig.value,o=e.approvalSig.value,{terminal:r,responded:a,decided:s}=Ar(n,o),l=t.continuationStreaming===!0&&!s,c=t.superseded&&!s&&!l;return{pill:ai(n,o,{superseded:c,live:t.live,submitted:l}),state:n,terminal:r,decided:s||l,showApproveReject:!s&&!t.superseded&&!l,showAnswered:a&&!r&&!c,showSubmitted:l,showEdit:a&&t.active&&!r,skipped:c,answeredApproved:o?.approved}}var ci=1,Gc=2,jc=4,Qc=8,Xc=16;function _m(e){switch(e){case ci:return"href";case Gc:return"src";case jc:return"class";case Qc:return"checked";case Xc:return"start"}}var pm=e=>{switch(e){case 1:return 3;case 2:return 4;case 3:return 5;case 4:return 6;case 5:return 7;default:return 8}},fm=pm;var Kc=24;function ui(e){let t=new Uint32Array(Kc);return t[0]=1,{renderer:e,text:"",pending:"",tokens:t,len:0,token:1,fence_end:0,blockquote_idx:0,hr_char:"",hr_chars:0,fence_start:0,spaces:new Uint8Array(Kc),indent:"",indent_len:0,table_state:0}}function Yc(e){e.pending.length>0&&et(e,`
|
|
11
|
+
${a}`:a;continue}r.startsWith("id:")&&(o=r.slice(3).trim())}if(n==="[DONE]")return"done";if(!n)return null;try{let r=JSON.parse(n);return il.trace("chunk",{type:r.type,eventId:o}),{chunk:r,eventId:o}}catch(r){throw il.trace("frame parse failed",{errorType:r instanceof Error?r.name:typeof r,payloadLength:n.length}),new Xe("invalid SSE frame","network",void 0,r)}}function Cp(e){let t=new TextEncoder().encode(e),n="";for(let o of t)n+=String.fromCharCode(o);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}var ll=e=>e&&Object.keys(e).length>0?e:void 0;function cl(e,t){let n=ll(e),o=ll(t);if(!n&&!o)return;let r={};return n&&(r.user=n),o&&(r.page=o),Cp(JSON.stringify(r))}function dl(e){if(!e)return;let t=Date.parse(e);return Number.isFinite(t)?t:void 0}function Rp(e){return`tool-${e.startsWith("tool:")?e.slice(5):e}`}function ul(e){return e.startsWith("tool-")?e.slice(5):e}var mt={handshake:"/pai/handshake",streamMessage:"/pai/stream-message",streamResume:"/pai/stream-resume",cancelStream:"/pai/cancel-stream",listConversations:"/pai/list-conversations",listMessages:"/pai/list-messages",updateSettings:"/pai/update-settings",markRead:"/pai/mark-read",messageFeedback:"/pai/message-feedback",requestOperator:"/pai/request-operator",cancelOperatorRequest:"/pai/cancel-request-operator",bootstrap:"/pai/bootstrap",content:"/pai/content",submitForm:"/pai/submit-form"},_l="context";function ir(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function pl(e){if(!ir(e))return;let t=e,n=t.controlMode,o=t.controlRevision;if(!(n!=="ai-agent"&&n!=="awaiting-operator"&&n!=="operator"||typeof o!="number"||!Number.isSafeInteger(o)||o<0))return{controlMode:n,controlRevision:o,assignedOperatorInitials:typeof t.assignedOperatorInitials=="string"&&t.assignedOperatorInitials?t.assignedOperatorInitials:void 0,operatorAvailable:typeof t.operatorAvailable=="boolean"?t.operatorAvailable:void 0}}function fl(e){if(!ir(e))return;let t=e.status,n=e.postFinishSequence;if(!(t!=="compacting"&&t!=="ready"||typeof n!="number"||!Number.isSafeInteger(n)||n<0))return{status:t,postFinishSequence:n}}function sr(e){let t=ir(e)?e.suggestions:void 0;if(!Array.isArray(t))return[];let n=[];for(let o of t){if(!ir(o))continue;let{id:r,label:a,text:s}=o;typeof a!="string"||!a||n.push({id:typeof r=="string"&&r?r:`s${n.length}`,label:a,text:typeof s=="string"&&s?s:a})}return n}function Na(e){let n={messages:e.messages.map(o=>({id:o.serverMessageId??o.id,parts:Ip(o),role:o.role})),conversationId:e.conversationId,responseType:"ack"};return e.visitorId&&(n.visitorId=e.visitorId),e.userPrefs&&(n.userPrefs=e.userPrefs),n}function Tp(e){return e.state==="output-available"||e.state==="output-error"||e.state==="output-denied"||e.approval?.approved!==void 0}function Ip(e){let t=[];for(let n of e.parts)if(n.kind==="step-start"&&t.push({type:"step-start"}),n.kind==="reasoning"&&n.text&&t.push({type:"reasoning",text:n.text,state:n.done?"done":"streaming"}),n.kind==="text"&&n.text&&t.push({text:n.text,type:"text"}),n.kind==="file"&&n.url&&t.push({mediaType:n.mediaType,type:"file",url:n.url}),n.kind==="tool"&&Tp(n)){let o=n.dynamic?{type:"dynamic-tool",toolName:n.toolName,toolCallId:n.toolCallId,state:n.state}:{type:Rp(n.toolName),toolCallId:n.toolCallId,state:n.state};n.input!==void 0&&(o.input=n.input),n.output!==void 0&&(o.output=n.output),n.error!==void 0&&(o.errorText=n.error),n.approval?.approved!==void 0&&(o.approval=n.approval),t.push(o)}for(let n of e.attachments??[])n.url&&t.push({type:"file",url:n.url,mediaType:n.mediaType,filename:n.name,fileId:n.id,fileSize:n.size});return t}var Me=Z.scope("transport"),Ep=6e4,Ap=1e4,$a=50,bl=new WeakMap;function An(e){return bl.get(e)}function lo(e,t){return bl.set(e,t),e}function ml(e){return Math.max(e?.upsertRevision??0,e?.read?.revision??0)}function Mp(e,t){return e.conversationId===t.conversationId&&e.title===t.title&&e.lastMessageAt===t.lastMessageAt&&e.preview===t.preview&&e.canContinue===t.canContinue&&e.hasUnread===t.hasUnread&&e.controlState===t.controlState}function Bt(e,t,n=!0){switch(t.type){case"snapshot":{let o=new Map(e.map(s=>[s.conversationId,s])),r=e.filter(s=>(An(s)?.activityRevision??0)>t.requestedRevision).toSorted((s,l)=>An(l).activityRevision-An(s).activityRevision),a=new Set(r.map(s=>s.conversationId));return[...r,...t.result.conversations.filter(s=>!a.has(s.conversationId)).map(s=>{let l=o.get(s.conversationId);if(!l)return s;let c=An(l);return(c?.upsertRevision??0)>t.requestedRevision?l:c?.read&&!l.hasUnread&&c.read.lastMessageAt===s.lastMessageAt?lo({...s,hasUnread:!1},{upsertRevision:0,read:c.read}):s})]}case"read":{let o=e.findIndex(c=>c.conversationId===t.conversationId&&(t.lastMessageAt===void 0||c.lastMessageAt===t.lastMessageAt));if(o<0)return e;let r=e[o],a=An(r);if(ml(a)>t.revision)return e;let s=t.lastMessageAt??r.lastMessageAt,l={upsertRevision:a?.upsertRevision??0,...a?.activityRevision===void 0?{}:{activityRevision:a.activityRevision},read:{revision:t.revision,...s?{lastMessageAt:s}:{}}};return r.hasUnread?e.map((c,d)=>d===o?lo({...c,hasUnread:!1},l):c):(lo(r,l),e)}case"upsert":{let o=e.findIndex(d=>d.conversationId===t.conversation.conversationId);if(o<0&&!n)return e;let r=o<0?void 0:e[o],a=r?An(r):void 0;if(ml(a)>t.revision)return e;let s=t.activity?t.revision:a?.activityRevision,l={upsertRevision:t.revision,...s===void 0?{}:{activityRevision:s},...!t.conversation.hasUnread&&a?.read?{read:a.read}:{}},c=r?{...r,...t.conversation,title:r.title}:{...t.conversation};return r&&Mp(r,c)?(lo(r,l),e):(lo(c,l),t.activity?[c,...e.filter(d=>d.conversationId!==c.conversationId)]:r?e.map((d,_)=>_===o?c:d):[...e,c])}default:return t}}var gl=3,Lp=400,Op=3e4,Np=1e4,Dp=6e4,$p=15e3,Fp=1024*1024,vl=new Set([408,425,429,500,502,503,504]);function hl(e){return Lp*2**e+Math.floor(Math.random()*250)}function Bp(e){return Dp+Math.ceil(e/Fp)*$p}function Up(e){let t=e.get("retry-after");if(!t)return null;let n=Number(t),o=Number.isFinite(n)?n*1e3:Date.parse(t)-Date.now();return Number.isFinite(o)&&o>=0?Math.min(o,3e4):null}var lr=class{constructor(t){ce(this,"ttlMs",t);ce(this,"map",new Map)}getOrFetch(t,n){let o=this.map.get(t);if(o&&performance.now()-o.at<this.ttlMs)return o.result;let r={at:performance.now(),result:n().then(a=>(r.value=a,a)).catch(a=>{throw this.map.get(t)===r&&this.map.delete(t),a})};return this.map.set(t,r),r.result}peek(t){let n=this.map.get(t);if(n?.value!==void 0&&performance.now()-n.at<this.ttlMs)return n.value}update(t){for(let n of this.map.values()){if(n.value!==void 0){let o=t(n.value);n.value=o,n.result=Promise.resolve(o);continue}n.result=n.result.then(o=>{let r=t(o);return n.value=r,r})}}delete(t){this.map.delete(t)}},cr=class{constructor(t){ce(this,"opts",t);ce(this,"conversationListeners",new Set);ce(this,"conversationRevision",0);ce(this,"visitorId");ce(this,"conversationId");ce(this,"userContext");ce(this,"pageContext");ce(this,"locale");ce(this,"conversationsCache",new lr(Ap));ce(this,"contentCache",new lr(Ep))}setContext(t,n){this.userContext=t,this.pageContext=n}setLocale(t){this.locale=t}primeIdentity(t,n){t&&(this.visitorId=t),n&&(this.conversationId=n)}envelope(){let t={_ev:xn};this.visitorId&&(t.visitorId=this.visitorId),this.conversationId&&(t.conversationId=this.conversationId),this.locale&&(t.locale=this.locale);let n=cl(this.userContext,this.pageContext);return n&&(t[_l]=n),t}withEnvelope(t){return{...this.envelope(),...t}}appendEnvelope(t){for(let[n,o]of Object.entries(this.envelope()))t.append(n,o);return t}withEnvelopeQuery(t){let n=new URL(this.url(t));for(let[o,r]of Object.entries(this.envelope()))n.searchParams.has(o)||n.searchParams.set(o,r);return n.toString()}async handshake(t){Me.debug("handshake \u2192",{visitorId:t.visitorId,conversationId:t.conversationId,locale:t.locale});let n=await this.postJson(mt.handshake,t,"handshake");return Me.debug("handshake \u2190",{visitorId:n.visitorId,conversationId:n.conversationId,hasWelcome:!!n.welcome,hasConfig:!!n.config,rebind:n.rebind}),this.visitorId=t.visitorId,this.conversationId=n.conversationId,n}async uploadFile(t,n){Me.debug("uploadFile \u2192",{name:t.name,size:t.size,type:t.type});let o=new FormData;o.append("file",t,t.name);let r=await this.postForm(this.uploadPath,o,"upload",n,Bp(t.size));return Me.debug("uploadFile \u2190",{id:r.id,url:r.url}),r}async transcribe(t,n="audio/webm"){Me.debug("transcribe \u2192",{size:t.size,mimeType:n});let o=new FormData;o.append("audio",t,`voice.${Hp(n)}`),o.append("mimeType",n);let r=await this.postForm(this.transcribePath,o,"transcribe");return Me.debug("transcribe \u2190",{textLen:r.text.length}),r}subscribeConversationChanges(t){return this.conversationListeners.add(t),()=>this.conversationListeners.delete(t)}publishConversation(t,n=!1){let o={type:"upsert",conversation:t,revision:++this.conversationRevision,...n?{activity:!0}:{}};this.conversationsCache.update(r=>{let a=r.pagination.page===1,s=r.conversations.some(p=>p.conversationId===t.conversationId),l=Bt(r.conversations,o,a&&n),c=a&&l.length>r.pagination.limit?l.slice(0,r.pagination.limit):l;if(!a||!n||s||r.pagination.hasNext)return c===r.conversations?r:{...r,conversations:c};let d=Math.max(r.pagination.total,r.conversations.length)+1,_=Math.ceil(d/r.pagination.limit);return{...r,conversations:c,pagination:{...r.pagination,total:d,totalPages:_,hasNext:r.pagination.page<_}}});for(let r of this.conversationListeners)r(o)}localeCacheKey(t){return`${this.locale??""}|${JSON.stringify(t,Object.keys(t).toSorted())}`}peekConversations(t={}){return this.conversationsCache.peek(this.localeCacheKey(t))}listConversations(t={},n=!1){if((t.page??1)>1)return this.fetchConversations(t);let o=this.localeCacheKey(t),r=this.conversationRevision;n&&this.conversationsCache.delete(o);let a=this.conversationsCache.getOrFetch(o,()=>this.fetchConversations(t));return n?a.then(s=>{let l={type:"snapshot",result:s,requestedRevision:r};for(let c of this.conversationListeners)c(l);return s}):a}async fetchConversations(t){let n=new URL(this.url(mt.listConversations));return t.visitorId&&n.searchParams.set("visitorId",t.visitorId),t.page&&n.searchParams.set("page",String(t.page)),t.limit&&n.searchParams.set("limit",String(t.limit)),t.ids?.length&&n.searchParams.set("ids",t.ids.join(",")),this.getJson(n.toString(),"listConversations")}async loadConversation(t,{ids:n=[],beforeId:o,beforeCreatedAt:r}={}){let a=new URL(this.url(mt.listMessages));a.searchParams.set("conversationId",t),a.searchParams.set("limit",String($a)),n.length>0&&a.searchParams.set("ids",n.join(",")),o&&a.searchParams.set("beforeId",o),r&&a.searchParams.set("beforeCreatedAt",r);let s=await this.getJson(a.toString(),"loadConversation");return{...s,messages:s.messages.toReversed()}}async markRead(t,n){if(!this.visitorId||!t)return;let o={type:"read",conversationId:t,...n===void 0?{}:{lastMessageAt:n},revision:++this.conversationRevision};this.conversationsCache.update(r=>{let a=Bt(r.conversations,o);return a===r.conversations?r:{...r,conversations:a}});for(let r of this.conversationListeners)r(o);try{await this.postJson(mt.markRead,{conversationId:t},"markRead",!0)}catch(r){Me.debug("markRead failed (non-fatal)",{err:r})}}async requestOperator(){if(!(!this.visitorId||!this.conversationId))try{return(await this.postJson(mt.requestOperator,{},"requestOperator")).controlState}catch(t){Me.debug("requestOperator failed (non-fatal)",{err:t});return}}async cancelOperatorRequest(){if(!(!this.visitorId||!this.conversationId))try{return(await this.postJson(mt.cancelOperatorRequest,{},"cancelOperatorRequest")).controlState}catch(t){Me.debug("cancelOperatorRequest failed (non-fatal)",{err:t});return}}listContent(t={}){return this.contentCache.getOrFetch(this.localeCacheKey(t),()=>this.fetchContent(t))}async fetchContent(t){let n=new URL(this.dataUrl(mt.content));for(let[a,s]of Object.entries(t))s!==void 0&&n.searchParams.set(a,Array.isArray(s)?s.join(","):String(s));let o=await this.getJson(n.toString(),"listContent"),r=(o.items??[]).map(a=>cs(a,this.locale));return{...o,items:r}}async bootstrap(t){let n=new URL(this.dataUrl(mt.bootstrap));t&&n.searchParams.set("conversationId",t);let o=await this.getJson(n.toString(),"bootstrap"),r=o.forms??[],a=o.formSubmissions??[];return{forms:r,formSubmissions:a}}async saveUserPrefs(t){return this.postJson(mt.updateSettings,{userPrefs:t},"saveUserPrefs")}get uploadPath(){return this.opts.endpoints?.upload??"/pai/upload-file"}get transcribePath(){return this.opts.endpoints?.transcribe??"/pai/transcribe-audio"}get submitFormPath(){return this.opts.endpoints?.submitForm??mt.submitForm}async submitForm(t){Me.debug("submitForm \u2192",{formId:t.formId,trigger:t.trigger,fields:Object.keys(t.values).length});try{await this.postJson(this.dataUrl(this.submitFormPath),t,"submitForm")}catch(n){Me.debug("submitForm failed (non-fatal)",{err:n})}}async submitFeedback(t){Me.debug("submitFeedback \u2192",{messageId:t.messageId,value:t.value});try{await this.postJson(mt.messageFeedback,{messageId:t.messageId,set:{feedback:t.value}},"submitFeedback")}catch(n){Me.debug("submitFeedback failed (non-fatal)",{err:n})}}async sendTurn(t){Me.debug("message \u2192",{conversationId:t.conversationId,visitorId:t.visitorId,messageCount:t.messages.length});try{return await this.runWithAbort(async n=>{let o=await this.fetchImpl(this.url(mt.streamMessage),{method:"POST",credentials:"omit",headers:{accept:"application/json","content-type":"application/json",...this.opts.auth.headers()},body:JSON.stringify(this.withEnvelope(t)),signal:n});if(o.status!==202)throw new Xe(`sendTurn failed: expected 202, received ${o.status}`,"server",o.status);let r;try{r=await o.json()}catch(a){throw n?.aborted?a:new Xe("sendTurn failed: invalid acknowledgement","server",o.status,a)}if(!zp(r))throw new Xe("sendTurn failed: invalid acknowledgement","server",o.status);return r},void 0,Op)}catch(n){throw n instanceof Xe?n:new Xe("sendTurn failed: network error","network",void 0,n)}}cancelTurn(t,n){!this.visitorId||!t||!n||(Me.debug("cancel stream",{conversationId:t,runId:n,visitorId:this.visitorId}),this.fetchImpl(this.url(mt.cancelStream),{method:"POST",credentials:"omit",headers:{"content-type":"application/json",...this.opts.auth.headers()},body:JSON.stringify(this.withEnvelope({conversationId:t,runId:n})),keepalive:!0}).catch(o=>Me.debug("cancel POST failed (non-fatal)",{err:o})))}async connectResumeStream(t){let n=new AbortController,o=()=>n.abort(t.signal.reason);t.signal.aborted?o():t.signal.addEventListener("abort",o,{once:!0});let r=setTimeout(()=>n.abort(),Np),a=()=>{clearTimeout(r),t.signal.removeEventListener("abort",o)},s;try{s=await this.fetchImpl(this.resumeUrl(),{method:"GET",credentials:"omit",headers:{accept:"text/event-stream",...this.opts.auth.headers()},signal:n.signal})}catch(c){return a(),t.signal.aborted||Me.debug("resume-stream fetch failed \u2014 reconnecting",{err:c}),"held"}if(!s.ok)return a(),s.status===409||vl.has(s.status)?(Me.debug("resume-stream \u2192 transient response; reconnecting",{status:s.status}),"held"):(Me.debug("resume-stream \u2192 endpoint unavailable",{status:s.status}),"unavailable");if(!s.body)return a(),Me.debug("resume-stream \u2192 bodyless response; stopping",{status:s.status}),"unavailable";if(!(s.headers.get("content-type")??"").includes("text/event-stream"))return a(),Me.debug("resume-stream \u2192 non-SSE response; stopping"),"unavailable";let l=!1;try{for await(let{chunk:c}of sl(s,n.signal,d=>{l||d!=="connected"||(l=!0,clearTimeout(r),t.onConnected())})){if(t.signal.aborted)return"held";t.onChunk(c)}}catch(c){if(t.signal.aborted)return"held";Me.debug("resume-stream segment dropped \u2014 reconnecting",{err:c})}finally{a()}return"held"}resumeUrl(){return this.withEnvelopeQuery(mt.streamResume)}async postJson(t,n,o,r=!1){let a=await this.fetchWithRetry(()=>[this.url(t),{method:"POST",credentials:"omit",headers:{"content-type":"application/json",...this.opts.auth.headers()},body:JSON.stringify(this.withEnvelope(n)),...r?{keepalive:!0}:{}}],o);return this.assertOk(a,o)}async postForm(t,n,o,r,a){return this.runWithAbort(async s=>{let l=await this.fetchImpl(this.url(t),{method:"POST",credentials:"omit",headers:this.opts.auth.headers(),body:this.appendEnvelope(n),signal:s});return this.assertOk(l,o)},r,a)}async runWithAbort(t,n,o){if(!n&&o===void 0)return t();let r=new AbortController,a=()=>r.abort(n?.reason);n?.aborted?a():n?.addEventListener("abort",a,{once:!0});let s=o===void 0?void 0:setTimeout(()=>r.abort(),o);try{return await t(r.signal)}finally{s!==void 0&&clearTimeout(s),n?.removeEventListener("abort",a)}}async getJson(t,n){let o=await this.fetchWithRetry(()=>[this.withEnvelopeQuery(t),{method:"GET",credentials:"omit",headers:{accept:"application/json",...this.opts.auth.headers()}}],n);return this.assertOk(o,n)}async fetchWithRetry(t,n){for(let o=0;;o++){let[r,a]=t(),s;try{s=await this.fetchImpl(r,a)}catch(c){if(o>=gl)throw new Xe(`${n} failed: network error`,"network",void 0,c);Me.debug("request network error \u2014 retrying",{label:n,attempt:o}),await so(hl(o));continue}if(s.ok||!vl.has(s.status)||o>=gl)return s;let l=Up(s.headers)??hl(o);Me.debug("request retryable status \u2014 retrying",{label:n,status:s.status,attempt:o,wait:l}),await so(l)}}async assertOk(t,n){if(!t.ok)throw new Xe(`${n} failed: ${t.status}`,"server",t.status);return await t.json()}url(t){return/^https?:\/\//i.test(t)?t:`${this.opts.agentApiBaseUrl}${t}`}dataUrl(t){return/^https?:\/\//i.test(t)?t:`${this.opts.dataApiBaseUrl}${t}`}get fetchImpl(){return this.opts.fetchImpl??globalThis.fetch.bind(globalThis)}};function Hp(e){return e.includes("webm")?"webm":e.includes("ogg")?"ogg":e.includes("mp4")||e.includes("m4a")?"m4a":e.includes("mpeg")?"mp3":e.includes("wav")?"wav":"bin"}function zp(e){if(typeof e!="object"||e===null)return!1;let t=Reflect.get(e,"status"),n=Reflect.get(e,"conversationId"),o=Reflect.get(e,"runId");return t==="accepted"&&typeof n=="string"&&n.length>0&&(o===void 0||typeof o=="string"&&o.length>0)}function Ba(e,t,n=pt()){let o=e?[{kind:"text",id:"t0",textSig:te(e),doneSig:te(!0)}]:[];return{id:n,role:"user",createdAt:Date.now(),status:"complete",attachments:t,partsSig:te(o)}}function Ut(){return{id:pt(),role:"assistant",createdAt:Date.now(),status:"streaming",partsSig:te([])}}function Pl(e){let t=pt();return qp({id:t,role:e.role,createdAt:Date.now(),status:"complete",ephemeral:!0,parts:[{kind:"text",id:`${t}-t0`,text:e.text,done:!0}]})}function qp(e){return{id:e.id,role:e.role,createdAt:e.createdAt,status:e.status,canceled:e.canceled,errorText:e.errorText,finishReason:e.finishReason,serverMessageId:e.serverMessageId,ephemeral:e.ephemeral,attachments:e.attachments,feedback:e.feedback,partsSig:te(e.parts.map(Xp))}}function Vp(e){return e.status==="failed"?"error":e.role==="assistant"&&e.status==="streaming"?"streaming":"complete"}function Ua(e){let t=new Set,n=e.parts.map((r,a)=>r.type==="text"?{kind:"text",id:`${e.id}-t${a}`,textSig:te(r.text),doneSig:te(!0)}:r.type==="reasoning"?{kind:"reasoning",id:`${e.id}-r${a}`,textSig:te(r.text),doneSig:te(r.state!=="streaming")}:r.type==="step-start"?{kind:"step-start",id:`${e.id}-ss${a}`}:r.type==="file"?{kind:"file",url:r.url,mediaType:r.mediaType}:r.type==="source-url"?{kind:"source",sourceId:r.sourceId,url:r.url,title:r.title}:r.type==="source-document"?{kind:"source",sourceId:r.sourceId,title:r.title,filename:r.filename,mediaType:r.mediaType}:r.type==="data-suggestions"?null:r.type==="dynamic-tool"||r.type.startsWith("tool-")?{kind:"tool",toolCallId:r.toolCallId,toolName:r.type==="dynamic-tool"?r.toolName:ul(r.type),dynamic:r.type==="dynamic-tool"?!0:void 0,inputPartialSig:te(""),inputSig:te(r.input),outputSig:te(r.output),errorSig:te(r.errorText),stateSig:te(r.state),approvalSig:te(r.approval)}:null).filter(r=>r!==null).filter(r=>r.kind!=="source"?!0:t.has(r.sourceId)?!1:(t.add(r.sourceId),!0)),o=e.parts.find(r=>r.type==="data-suggestions");return{id:e.id,role:e.role,operatorInitials:e.operatorInitials,suggestions:o?.type==="data-suggestions"?sr(o.data):void 0,serverMessageId:e.id,createdAt:Date.parse(e.createdAt),status:Vp(e),canceled:e.status==="canceled",feedback:e.feedback??null,partsSig:te(n)}}function Wp(e){return!e.parts.some(t=>t.type==="text"&&t.text.trim()!==""||t.type==="dynamic-tool"||t.type.startsWith("tool-")||t.type==="file"||t.type==="source-url"||t.type==="source-document")}function Kp(e){return e.role==="assistant"&&e.status==="streaming"&&Wp(e)}function Qt(e){let t=e.length-1;return e.filter((n,o)=>o===t||!Kp(n)).map(Ua)}function xl(e,t){let n=!t&&e.at(-1)?.role==="assistant"?-2:-1,o=e.at(n);return!o||o.ephemeral?[]:[o]}function Ha(e){return{id:e.id,role:e.role,createdAt:e.createdAt,status:e.status,canceled:e.canceled,errorText:e.errorText,finishReason:e.finishReason,serverMessageId:e.serverMessageId,ephemeral:e.ephemeral,attachments:e.attachments,parts:e.partsSig.value.map(Yp)}}function Ue(e){let t="";for(let n of e.partsSig.value)n.kind==="text"&&(t+=n.textSig.value);return t}function dr(e,t,n,o,r,a=t.createdAt){let s=e.find(_=>_.role==="user"&&!_.ephemeral),l=(_,p)=>Ue(_).replace(/\s+/g," ").trim().slice(0,p),c=s?l(s,80):"",d=l(t,120);return{conversationId:n,title:c||o,lastMessageAt:new Date(a).toISOString(),preview:d||void 0,canContinue:r}}function Rt(e){return Ue(e).trim()!==""?!0:e.partsSig.value.some(t=>t.kind==="tool"||t.kind==="file"||t.kind==="source")}function Gp(e){return Ue(e).trim()!==""?!0:e.partsSig.value.some(t=>t.kind==="tool"||t.kind==="file")}function za(e){return e==="approval-responded"||e==="output-available"||e==="output-denied"||e==="output-error"}var Mn=e=>e.kind==="tool",Sl=e=>e.kind==="text"&&e.textSig.value.trim()!==""||e.kind==="file";function co(e){let t=e.partsSig.value,n=t.findLastIndex(o=>o.kind==="tool");return t.slice(n+1).some(Sl)}function ln(e){if(e.role!=="assistant")return!1;let t=e.partsSig.value.filter(Mn);return t.length>0&&t.every(n=>za(n.stateSig.value))}function cn(e){return e.role!=="assistant"?!1:e.partsSig.value.some(t=>t.kind==="tool")&&!co(e)}function ur(e,t){return!e.partsSig.value.slice(t+1).some(n=>n.kind==="step-start"||Sl(n))}function _r(e){return e.partsSig.value.some(t=>Mn(t)&&!za(t.stateSig.value))}function kl(e,t){if(t.length===0)return e;let n=new Set;for(let s of e)n.add(s.id),s.serverMessageId&&n.add(s.serverMessageId);let o=t.filter(s=>{let l=[s.id,s.serverMessageId].filter(c=>c!==void 0);return l.some(c=>n.has(c))?!1:(l.forEach(c=>n.add(c)),!0)});if(o.length===0)return e;let r=e.findIndex(s=>!s.ephemeral),a=r<0?e.length:r;return[...e.slice(0,a),...o,...e.slice(a)]}function an(e,t){return t.id=e.id,e.canceled&&(t.canceled=!0),e.feedback!==void 0&&(t.feedback=e.feedback),t.suggestions??(t.suggestions=e.suggestions),t}function wl(e,t,n,o){if(!qa(e))return;if(t.length===0){let s=Math.max(...o.values());return n.find(l=>l.role==="assistant"&&o.get(l.serverMessageId??l.id)===s&&Ue(l).length>=Ue(e).length)}let r=t.at(-1);if(r?.role!=="user")return;let a=o.get(r.serverMessageId??r.id);if(a!==void 0)return n.find(s=>s.role==="assistant"&&o.get(s.serverMessageId??s.id)===a+1&&Ue(s).length>=Ue(e).length)}function qa(e){return e?.role==="assistant"&&e.status==="streaming"&&e.serverMessageId===void 0}function jp(e,t){let n=new Map(t.partsSig.value.filter(Mn).filter(a=>za(a.stateSig.value)).map(a=>[a.toolCallId,a]));if(n.size===0)return;let o=!1,r=e.partsSig.value.map(a=>{if(!Mn(a))return a;let s=n.get(a.toolCallId);if(!s)return a;let l=a.approvalSig.value,c=s.approvalSig.value,d=l===void 0||l.approved===void 0&&c?.approved!==void 0?s.approvalSig:a.approvalSig,_=a.inputSig.value===void 0?s.inputSig:a.inputSig,p=a.toolName==="tool"?s.toolName:a.toolName,u=a.dynamic??s.dynamic;return d===a.approvalSig&&_===a.inputSig&&p===a.toolName&&u===a.dynamic?a:(o=!0,{...a,toolName:p,dynamic:u,inputSig:_,approvalSig:d})});o&&(e.partsSig.value=r)}function Va(e,t){let n=t.filter(p=>!p.ephemeral&&(p.status==="streaming"||p.status==="pending"||p.status==="error"||p.retryAction!==void 0||(p.attachments?.length??0)>0||Rt(p))),o=new Map;for(let p of n)o.set(p.id,p),p.serverMessageId!==void 0&&o.set(p.serverMessageId,p);let r=new Set,a=[],s=e.map(p=>{let u=(p.serverMessageId!==void 0?o.get(p.serverMessageId):void 0)??o.get(p.id);return u===void 0?(a.push(p),p):(r.add(u),u.role!==p.role?p:u.role==="user"&&u.serverMessageId===void 0&&(u.status==="pending"||u.status==="error")?an(u,p):u.status==="streaming"||Ue(u).length>=Ue(p).length?(jp(u,p),u.suggestions??(u.suggestions=p.suggestions),u.feedback===void 0&&(u.feedback=p.feedback),p.canceled&&(u.canceled=!0),u):an(u,p))}),l=n.filter(p=>!r.has(p)),c=l.findLast(qa),d=new Map;e.forEach((p,u)=>{d.set(p.id,u),p.serverMessageId!==void 0&&d.set(p.serverMessageId,u)});let _=wl(c,c?n.slice(0,n.indexOf(c)):[],a,d);if(c&&_){let p=s.indexOf(_);p>=0&&(s[p]=an(c,_)),l=l.filter(u=>u!==c)}return[...s,...l]}function uo(e,t){let n=new Map(t.filter(p=>p.serverMessageId!==void 0).map(p=>[p.serverMessageId,p])),o=new Map;t.forEach((p,u)=>{o.set(p.id,u),p.serverMessageId!==void 0&&o.set(p.serverMessageId,u)});let r=new Set(e.flatMap(p=>[p.serverMessageId,p.id].filter(u=>u!==void 0))),a=!1,s=e.map(p=>{let u=n.get(p.serverMessageId??p.id);if(u===void 0||u.role!==p.role)return p;if(p.role==="user"&&p.serverMessageId===void 0)return a=!0,an(p,u);if(p.serverMessageId===void 0)return p;let m=Ue(u),g=Ue(p),P=u.status!=="streaming"&&m.length>=g.length&&Fa(p,u);if(m.length>g.length||m===g&&u.partsSig.value.length>p.partsSig.value.length||P)return a=!0,an(p,u);if(p.status==="streaming"&&u.status!=="streaming"&&Qp(p,u)){if(p.continuationStreaming&&_r(u))return p;if(!Fa(u,p))return a=!0,an(p,u)}return p}),l=[...n.values()].filter(p=>!r.has(p.serverMessageId)),c=s.findLastIndex(qa),d=s[c],_=wl(d,s.slice(0,c),l,o);if(d!==void 0&&_!==void 0&&Ue(_).length>=Ue(d).length&&(an(d,_),s[c]=_,l.splice(l.indexOf(_),1),a=!0),l.length===0)return{messages:a?s:e,changed:a};for(let p of l){let u=o.get(p.serverMessageId??p.id),m=!1,g=s.findIndex(P=>{let y=o.get(P.serverMessageId??P.id);return u===void 0?!1:y===void 0?m:y>u?!0:(m=!0,!1)});g===-1?s.push(p):s.splice(g,0,p)}return{messages:s,changed:!0}}function Cl(e,t){if(e.role!==t.role)return!1;let n=Ue(t),o=Ue(e);return n.length>o.length||t.partsSig.value.length>e.partsSig.value.length||Fa(e,t)}function Qp(e,t){let n=e.partsSig.value,o=t.partsSig.value;return n.length!==o.length?!1:n.every((r,a)=>{let s=o[a];switch(r.kind){case"text":return s?.kind==="text"&&s.textSig.value===r.textSig.value;case"reasoning":return s?.kind==="reasoning"&&s.textSig.value===r.textSig.value;case"step-start":return s?.kind==="step-start";case"tool":return s?.kind==="tool"&&s.toolCallId===r.toolCallId&&pr(s.toolName,r.toolName);case"file":return s?.kind==="file"&&s.url===r.url&&s.mediaType===r.mediaType;case"source":return s?.kind==="source"&&s.sourceId===r.sourceId&&s.url===r.url&&s.title===r.title&&s.filename===r.filename&&s.mediaType===r.mediaType;default:return r}})}function pr(e,t){let n=e.startsWith("tool:")?e.slice(5):e,o=t.startsWith("tool:")?t.slice(5):t;return n===o}var yl={"input-streaming":0,"input-available":1,"approval-requested":2,"approval-responded":3,"output-available":4,"output-denied":4,"output-error":4};function Fa(e,t){let n=new Map(e.partsSig.value.filter(Mn).map(o=>[o.toolCallId,o]));return t.partsSig.value.filter(Mn).some(o=>{let r=n.get(o.toolCallId);if(!r||yl[o.stateSig.value]>yl[r.stateSig.value])return!0;let a=o.approvalSig.value?.approved;return a!==void 0&&a!==r.approvalSig.value?.approved})}function sn(e){return e.role==="assistant"&&e.status!=="streaming"&&!Rt(e)}function fr(e,t){if(!e.includes(t)||t.retryAction===null)return;if(t.retryAction)return t.retryAction;if(t!==e.at(-1)||t.role!=="assistant"||t.serverMessageId===void 0||t.status!=="error"&&!sn(t))return;let n=e.indexOf(t);for(let o=n-1;o>=0;o--){let r=e[o];if(r?.role==="user"&&!r.ephemeral)return{kind:"repeat-user",messageId:r.id}}}function Rl(e){return e.canceled===!0&&e.role==="assistant"&&e.status!=="streaming"&&!Gp(e)}function Tl(e,t){return e.operatorRoutedTurn?sn(e)?"drop":"complete-operator-routed":t||sn(e)?"error":"complete"}function Xp(e){return e.kind==="text"||e.kind==="reasoning"?{kind:e.kind,id:e.id,textSig:te(e.text),doneSig:te(e.done)}:e.kind==="tool"?{kind:"tool",toolCallId:e.toolCallId,toolName:e.toolName,dynamic:e.dynamic,inputPartialSig:te(e.inputPartial),inputSig:te(e.input),outputSig:te(e.output),errorSig:te(e.error),stateSig:te(e.state),approvalSig:te(e.approval)}:e}function Yp(e){return e.kind==="text"||e.kind==="reasoning"?{kind:e.kind,id:e.id,text:e.textSig.value,done:e.doneSig.value}:e.kind==="tool"?{kind:"tool",toolCallId:e.toolCallId,toolName:e.toolName,dynamic:e.dynamic,inputPartial:e.inputPartialSig.value,input:e.inputSig.value,output:e.outputSig.value,error:e.errorSig.value,state:e.stateSig.value,approval:e.approvalSig.value}:e}var Il=Z.scope("feedback:audio"),mr=class{constructor(){ce(this,"ctx",null);ce(this,"master",null);ce(this,"buffers",new Map)}unlock(){if(this.ctx){this.ctx.state==="suspended"&&this.ctx.resume();return}let t=globalThis.AudioContext??globalThis.webkitAudioContext;if(t)try{this.ctx=new t,this.master=this.ctx.createGain(),this.master.gain.value=1,this.master.connect(this.ctx.destination)}catch(n){Il.warn("AudioContext init failed",{err:n})}}setVolume(t){if(!this.master||!this.ctx)return;let n=Math.max(0,Math.min(1,t));this.master.gain.setTargetAtTime(n,this.ctx.currentTime,.01)}playTone(t){let n=this.ctx,o=this.master;if(!n||!o||n.state!=="running")return;let r=n.currentTime,a=t.noteMs/1e3;t.notes.forEach((s,l)=>{let c=n.createOscillator();c.type=t.type,c.frequency.value=s;let d=n.createGain(),_=r+l*a;d.gain.setValueAtTime(1e-4,_),d.gain.exponentialRampToValueAtTime(t.peakGain,_+.005),d.gain.exponentialRampToValueAtTime(1e-4,_+a),c.connect(d).connect(o),c.start(_),c.stop(_+a+.01)})}async playUrl(t){let n=this.ctx,o=this.master;if(!n||!o||n.state!=="running")return;let r=await this.getBuffer(t);if(!r)return;let a=n.createBufferSource();a.buffer=r,a.connect(o),a.start()}destroy(){this.ctx&&this.ctx.close().catch(()=>{}),this.ctx=null,this.master=null,this.buffers.clear()}async getBuffer(t){if(!this.ctx)return null;let n=this.buffers.get(t);if(n)return n instanceof Promise,n;let o=this.ctx,r=fetch(t).then(a=>a.ok?a.arrayBuffer():Promise.reject(new Error(`fetch ${a.status}`))).then(a=>o.decodeAudioData(a)).then(a=>(this.buffers.set(t,a),a)).catch(a=>(Il.warn("audio fetch/decode failed",{url:t,err:a}),this.buffers.delete(t),null));return this.buffers.set(t,r),r}};var El={messageReceived:10,messageSent:0,error:[20,40,20],voiceStart:10,voiceStop:0},Al={messageReceived:{notes:[880,1318.51],noteMs:90,type:"sine",peakGain:.45},messageSent:{notes:[1568],noteMs:60,type:"sine",peakGain:.25},error:{notes:[523.25,392],noteMs:120,type:"triangle",peakGain:.55},voiceStart:{notes:[1318.51],noteMs:50,type:"sine",peakGain:.3},voiceStop:{notes:[880],noteMs:50,type:"sine",peakGain:.3}};var Xt=null,gr=0;function Jp(){return typeof navigator<"u"&&typeof navigator.vibrate=="function"}function Zp(){if(typeof document>"u")return null;let e=document.createElement("input");e.type="checkbox",e.setAttribute("switch",""),e.setAttribute("aria-hidden","true"),e.tabIndex=-1,e.id=`__${T.cssPrefix}_haptic_${Math.random().toString(36).slice(2)}`;let t=document.createElement("label");t.htmlFor=e.id,t.setAttribute("aria-hidden","true");let n="position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;opacity:0!important;pointer-events:none!important;";return e.style.cssText=n,t.style.cssText=n,document.body.append(e,t),{input:e,label:t}}function Ml(e){if(!(e===0||Array.isArray(e)&&e.every(t=>t===0))){if(Jp())try{navigator.vibrate(e);return}catch{}if(Xt??(Xt=Zp()),!!Xt)try{Xt.label.click()}catch{}}}function Ll(){gr++;let e=!1;return()=>{e||(e=!0,gr=Math.max(0,gr-1),gr===0&&Xt&&(Xt.input.remove(),Xt.label.remove(),Xt=null))}}var ef=Z.scope("feedback"),tf=100,vr=class{constructor(t,n){ce(this,"mutedSig",te(!1));ce(this,"audio",new mr);ce(this,"releaseHaptics");ce(this,"sound");ce(this,"haptics");ce(this,"lastPlayed",new Map);ce(this,"reducedMotionMq",null);this.sound=t,this.haptics=n,this.releaseHaptics=Ll(),this.audio.setVolume(this.effectiveVolume()),typeof matchMedia<"u"&&(this.reducedMotionMq=matchMedia("(prefers-reduced-motion: reduce)"))}unlock(){this.audio.unlock(),this.audio.setVolume(this.effectiveVolume())}update(t,n){this.sound=t,this.haptics=n,this.audio.setVolume(this.effectiveVolume())}setMuted(t){this.mutedSig.value!==t&&(this.mutedSig.value=t)}toggleMuted(){this.mutedSig.value=!this.mutedSig.value}play(t){this.mutedSig.value||this.isDeduped(t)||(this.lastPlayed.set(t,performance.now()),this.sound.enabled&&this.playSound(t),this.haptics.enabled&&this.isTouchDevice()&&this.playHaptic(t))}destroy(){this.audio.destroy(),this.releaseHaptics()}isDeduped(t){let n=this.lastPlayed.get(t);return n===void 0?!1:performance.now()-n<tf}playSound(t){let n=this.sound.events?.[t];if(n===!1)return;if(typeof n=="string"){this.audio.playUrl(n).catch(r=>ef.warn("audio play failed",{err:r,url:n}));return}let o=Al[t];o&&this.audio.playTone(o)}playHaptic(t){if(this.reducedMotionMq?.matches)return;let n=this.haptics.events?.[t];if(n===!1)return;let o=n===!0||n===void 0?El[t]:n;Ml(o)}effectiveVolume(){let t=this.sound.volume??.3;return this.reducedMotionMq?.matches?t*.5:t}isTouchDevice(){return typeof window>"u"?!1:matchMedia("(hover: none) and (pointer: coarse)").matches}};var nf=0;function i(e,t,n,o,r,a){t||(t={});var s,l,c=t;if("ref"in c)for(l in c={},t)l=="ref"?s=t[l]:c[l]=t[l];var d={type:e,props:c,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--nf,__i:-1,__u:0,__source:r,__self:a};if(typeof e=="function"&&(s=e.defaultProps))for(l in s)c[l]===void 0&&(c[l]=s[l]);return J.vnode&&J.vnode(d),d}var Y={fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24"},_o=`${T.cssPrefix}-icon-dir`,Wa=()=>i("svg",{...Y,"aria-hidden":"true",children:i("path",{d:"M21 12a8 8 0 0 1-12 6.93L3 21l1.65-5.16A8 8 0 1 1 21 12Z"})}),St=()=>i("svg",{...Y,"aria-hidden":"true",children:i("path",{d:"M18 6 6 18M6 6l12 12"})}),Ol=()=>i("svg",{...Y,"aria-hidden":"true",children:i("path",{d:"M12 5v14M5 12h14"})}),Nl=()=>i("svg",{...Y,class:_o,"aria-hidden":"true",children:[i("path",{d:"m22 2-7 20-4-9-9-4Z"}),i("path",{d:"M22 2 11 13"})]}),Dl=()=>i("svg",{...Y,"aria-hidden":"true",children:i("path",{d:"M12 19V5M5 12l7-7 7 7"})}),$l=()=>i("svg",{...Y,class:_o,"aria-hidden":"true",children:i("path",{d:"M3 20V4l18 8-18 8Z"})}),Ln=()=>i("svg",{...Y,class:_o,"aria-hidden":"true",children:i("path",{d:"m9 18 6-6-6-6"})}),Fl=()=>i("svg",{...Y,"aria-hidden":"true",children:i("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"})}),Bl=()=>i("svg",{...Y,"aria-hidden":"true",children:i("path",{d:"m21 11-9 9a5.5 5.5 0 0 1-7.78-7.78l8.49-8.49a3.67 3.67 0 0 1 5.19 5.19l-8.49 8.49a1.83 1.83 0 0 1-2.6-2.6l7.78-7.78"})}),Ul=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("rect",{x:"9",y:"2",width:"6",height:"12",rx:"3"}),i("path",{d:"M5 10a7 7 0 0 0 14 0M12 19v3"})]}),Hl=()=>i("svg",{...Y,"aria-hidden":"true",children:i("path",{d:"M3 8V3h5M21 8V3h-5M3 16v5h5M21 16v5h-5"})}),zl=()=>i("svg",{...Y,"aria-hidden":"true",children:i("path",{d:"M8 3v5H3M16 3v5h5M8 21v-5H3M16 21v-5h5"})}),ql=()=>i("svg",{...Y,"aria-hidden":"true",children:i("path",{d:"M3 3h7v2H5v5H3zM21 3h-7v2h5v5h2zM3 21h7v-2H5v-5H3zM21 21h-7v-2h5v-5h2z"})}),Vl=()=>i("svg",{...Y,"aria-hidden":"true",children:i("path",{d:"M10 3v5H3M14 3v5h7M10 21v-5H3M14 21v-5h7"})}),Wl=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("path",{d:"M14 3h7v7M21 3l-9 9"}),i("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"})]}),Kl=()=>i("svg",{...Y,"aria-hidden":"true",viewBox:"0 0 10 10",children:i("path",{d:"M9 1L1 9M9 5L5 9M9 9H9",strokeWidth:"1.5"})}),Gl=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("circle",{cx:"12",cy:"5",r:"1.5",fill:"currentColor",stroke:"none"}),i("circle",{cx:"12",cy:"12",r:"1.5",fill:"currentColor",stroke:"none"}),i("circle",{cx:"12",cy:"19",r:"1.5",fill:"currentColor",stroke:"none"})]}),jl=()=>i("svg",{...Y,"aria-hidden":"true",children:i("path",{d:"M11 5 6 9H2v6h4l5 4zM15 9a5 5 0 0 1 0 6M18 7a9 9 0 0 1 0 10"})}),Ql=()=>i("svg",{...Y,"aria-hidden":"true",children:i("path",{d:"M11 5 6 9H2v6h4l5 4zM22 9l-6 6M16 9l6 6"})}),Xl=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("path",{d:"M3 18 8 6l5 12M4.7 14h6.6"}),i("path",{d:"M14.5 18l3.2-7 3.2 7M15.6 15.8h4.2"})]}),Yl=()=>i("svg",{...Y,class:_o,"aria-hidden":"true",children:i("path",{d:"m5 6 6 6-6 6M13 6l6 6-6 6"})}),dn=()=>i("svg",{...Y,"aria-hidden":"true",children:i("path",{d:"M20 6 9 17l-5-5"})}),Jl=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("path",{d:"M3 3v6h6"}),i("path",{d:"M3.05 13A9 9 0 1 0 6 5.3L3 9"}),i("path",{d:"M12 7v5l3 2"})]}),Zl=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("circle",{cx:"12",cy:"12",r:"10"}),i("path",{d:"M2 12h20"}),i("path",{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"})]}),po=()=>i("svg",{...Y,class:_o,"aria-hidden":"true",children:i("path",{d:"M19 12H5M12 19l-7-7 7-7"})}),ec=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("path",{d:"M12 20h9"}),i("path",{d:"M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z"})]}),un=()=>i("svg",{...Y,"aria-hidden":"true",children:i("path",{d:"m6 9 6 6 6-6"})}),tc=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8Z"}),i("path",{d:"M14 2v6h6"})]}),of=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("path",{d:"m12 3-1.5 4.5L6 9l4.5 1.5L12 15l1.5-4.5L18 9l-4.5-1.5Z"}),i("path",{d:"M19 15v4M17 17h4M5 3v2M4 4h2"})]}),Ka=()=>i("svg",{...Y,"aria-hidden":"true",children:i("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2Z"})}),fo=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("circle",{cx:"12",cy:"12",r:"10"}),i("path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"}),i("path",{d:"M12 17h.01"})]}),rf=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("path",{d:"m15 4 3 3-9 9-3-3z"}),i("path",{d:"M18 2v2M20 4h2M3 20l3-3M3 16h2M5 14v2"})]}),af=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("rect",{x:"4",y:"8",width:"16",height:"12",rx:"2"}),i("path",{d:"M12 8V4"}),i("circle",{cx:"12",cy:"3",r:"1"}),i("path",{d:"M2 14h2M20 14h2M9 13h.01M15 13h.01M9.5 17h5"})]}),Ga=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("path",{d:"M4 14v-2a8 8 0 0 1 16 0v2"}),i("rect",{x:"2",y:"14",width:"4",height:"6",rx:"1.5"}),i("rect",{x:"18",y:"14",width:"4",height:"6",rx:"1.5"}),i("path",{d:"M20 20v1a3 3 0 0 1-3 3h-5"})]}),sf=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("circle",{cx:"12",cy:"12",r:"10"}),i("circle",{cx:"12",cy:"12",r:"4"}),i("path",{d:"m4.93 4.93 4.24 4.24M14.83 14.83l4.24 4.24M14.83 9.17l4.24-4.24M4.93 19.07l4.24-4.24"})]}),ja=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("circle",{cx:"11",cy:"11",r:"7"}),i("path",{d:"m21 21-4.3-4.3"})]}),nc=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("circle",{cx:"12",cy:"12",r:"9"}),i("path",{d:"m8.5 12 2.5 2.5 4.5-5"})]}),oc=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("path",{d:"M3 9.5 12 3l9 6.5"}),i("path",{d:"M5 9v11a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V9"})]}),rc=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("path",{d:"m3 11 15-5v12L3 13z"}),i("path",{d:"M3 11v2a2 2 0 0 0 2 2h1V9H5a2 2 0 0 0-2 2z"}),i("path",{d:"M7 15v3a2 2 0 0 0 4 0v-2"}),i("path",{d:"M21 10a3 3 0 0 1 0 4"})]}),mo=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("path",{d:"M14 9a2 2 0 0 1-2 2H6l-4 4V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2z"}),i("path",{d:"M18 9h2a2 2 0 0 1 2 2v11l-4-4h-6a2 2 0 0 1-2-2v-1"})]}),ac=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("circle",{cx:"12",cy:"12",r:"4"}),i("path",{d:"M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41"})]}),ic=()=>i("svg",{...Y,"aria-hidden":"true",children:i("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})}),sc=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("circle",{cx:"12",cy:"12",r:"9"}),i("path",{d:"M12 3v18"}),i("path",{d:"M12 3a9 9 0 0 1 0 18z",fill:"currentColor",stroke:"none"})]}),lf=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("circle",{cx:"10.5",cy:"10.5",r:"6.5"}),i("path",{d:"M8 11a2.5 2.5 0 0 0 5 0"}),i("path",{d:"m20 20-4.4-4.4"})]}),cf=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("path",{d:"M12 3.5 13.6 9 19 10.5 13.6 12 12 17.5 10.4 12 5 10.5 10.4 9z"}),i("path",{d:"M18.5 4v3M20 5.5h-3M5.5 16v2.5M6.75 17.25h-2.5"})]}),df=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("path",{d:"M4 18h16"}),i("path",{d:"M5 18a7 7 0 0 1 14 0"}),i("path",{d:"M12 8V6"}),i("path",{d:"M10 6h4"})]}),uf=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("path",{d:"M7 11V6.5a1.5 1.5 0 0 1 3 0V10"}),i("path",{d:"M10 10V5.5a1.5 1.5 0 0 1 3 0V10"}),i("path",{d:"M13 10V6.5a1.5 1.5 0 0 1 3 0V12"}),i("path",{d:"M16 9.5a1.5 1.5 0 0 1 3 0v2.5a7 7 0 0 1-7 7 7 7 0 0 1-6.4-4.2L4 12.5a1.5 1.5 0 0 1 2.6-1.5L7 11"})]}),lc=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("rect",{x:"9",y:"9",width:"11",height:"11",rx:"2"}),i("path",{d:"M5 15a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2"})]}),cc=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("path",{d:"M7 10v11H4a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1z"}),i("path",{d:"M7 10l4-7a2.5 2.5 0 0 1 2.5 2.5V8h5a2 2 0 0 1 2 2.3l-1.2 8A2 2 0 0 1 17.3 20H7"})]}),dc=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("path",{d:"M17 14V3h3a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1z"}),i("path",{d:"M17 14l-4 7a2.5 2.5 0 0 1-2.5-2.5V16h-5a2 2 0 0 1-2-2.3l1.2-8A2 2 0 0 1 6.7 4H17"})]}),uc=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("circle",{cx:"12",cy:"12",r:"3.5"}),i("path",{d:"M12 2v3M12 19v3M2 12h3M19 12h3M4.9 4.9l2.1 2.1M17 17l2.1 2.1M19.1 4.9l-2.1 2.1M7 17l-2.1 2.1"})]}),_c=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("circle",{cx:"12",cy:"12",r:"9"}),i("path",{d:"M12 7v5l3 2"})]}),hr=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("circle",{cx:"12",cy:"12",r:"9"}),i("path",{d:"m8.5 12 2.5 2.5 4.5-5"})]}),br=()=>i("svg",{...Y,"aria-hidden":"true",children:[i("circle",{cx:"12",cy:"12",r:"9"}),i("path",{d:"m15 9-6 6M9 9l6 6"})]}),pc={chat:Wa,message:Ka,bubbles:mo,spark:of,wand:rf,bot:af,help:fo,lifebuoy:sf,headset:Ga,search:lf,sparkles:cf,concierge:df,wave:uf};var F=T.cssPrefix,R={launcher:`${F}-launcher`,callout:`${F}-callout`,calloutDismiss:`${F}-callout-dismiss`,panel:`${F}-panel`,panelHeader:`${F}-panel-header`,resizeGrip:`${F}-resize-grip`,scrollToBottom:`${F}-scroll-to-bottom`,loadPreviousMessages:`${F}-load-previous-messages`,actionHistory:`${F}-action-history`,actionClose:`${F}-action-close`,langSegment:`${F}-lang-segment`,composer:`${F}-composer`,composerInput:`${F}-composer-input`,composerSend:`${F}-composer-send`,composerStop:`${F}-composer-stop`,compactionStatus:`${F}-compaction-status`,messageQueue:`${F}-message-queue`,queuedMessage:`${F}-queued-message`,queuedMessageRemove:`${F}-queued-message-remove`,composerAttach:`${F}-composer-attach`,composerFileInput:`${F}-composer-file-input`,composerVoice:`${F}-composer-voice`,attachmentChip:`${F}-attachment-chip`,attachmentRemove:`${F}-attachment-remove`,suggestion:`${F}-suggestion`,messageBubble:`${F}-message`,messageRetry:`${F}-message-retry`,messageFeedback:`${F}-message-feedback`,feedbackUp:`${F}-feedback-up`,feedbackDown:`${F}-feedback-down`,messageCopy:`${F}-message-copy`,historyPane:`${F}-history-pane`,historyBack:`${F}-history-back`,historyItem:`${F}-history-item`,historyLoadMore:`${F}-history-load-more`,sidebar:`${F}-sidebar`,sidebarToggle:`${F}-sidebar-toggle`,sidebarNewConversation:`${F}-sidebar-new-conversation`,sidebarItem:`${F}-sidebar-item`,messengerHome:`${F}-messenger-home`,modulesEmpty:`${F}-modules-empty`,tab:`${F}-tab`,tabBadge:`${F}-tab-badge`,homeView:`${F}-home-view`,homeGreeting:`${F}-home-greeting`,homeBrand:`${F}-home-brand`,backHeader:`${F}-back-header`,contentView:`${F}-content-view`,contentScroll:`${F}-content-scroll`,homeSearch:`${F}-home-search`,helpSearch:`${F}-help-search`,homeRecent:`${F}-home-recent`,homeContentRow:`${F}-home-content-row`,helpArticle:`${F}-help-article`,newsItem:`${F}-news-item`,formGate:`${F}-form-gate`,formDone:`${F}-form-done`,formDoneToggle:`${F}-form-done-toggle`,formAnswers:`${F}-form-answers`,formFill:`${F}-form-fill`,formSubmit:`${F}-form-submit`,formSkip:`${F}-form-skip`,formField:`${F}-form-field`,toolAskQuestions:`${F}-tool-ask-questions`,toolInputSubmit:`${F}-tool-input-submit`,toolInputSkip:`${F}-tool-input-skip`,toolApproval:`${F}-tool-approval`,toolApprove:`${F}-tool-approve`,toolReject:`${F}-tool-reject`,toolEdit:`${F}-tool-edit`,toolDecision:`${F}-tool-decision`,typingDots:`${F}-typing-dots`,reasoning:`${F}-reasoning`,toolAskSummary:`${F}-ask-questions-summary`,toolAskOptions:`${F}-ask-questions-options-toggle`,toolCall:`${F}-tool-call`,source:`${F}-source`,operatorRequest:`${F}-operator-request`,operatorBanner:`${F}-operator-banner`,cancelOperatorRequest:`${F}-cancel-operator-request`};function Ye(e,t){return`${e}-${t}`}var yr=T.cssPrefix;function fc({onToggle:e,launcher:t,strings:n,leaving:o,edgeTab:r}){let a=t.variant!=="circle"&&!!t.label;return i("button",{type:"button",class:`${yr}-fab`,"data-variant":t.variant,"data-size":t.size,"data-edge-tab":r?"true":void 0,"data-leaving":o?"true":void 0,"data-testid":R.launcher,onClick:e,"aria-label":n.launcherOpen,children:[_f(t.icon),a?i("span",{class:`${yr}-fab-label`,children:lt(n,t.label??"")}):null]})}function _f(e){let t=pc[e];return t?i(t,{}):i(pf,{source:e})}function pf({source:e}){return i("span",{ref:t=>{t&&ff(t,e)},"aria-hidden":"true"})}function ff(e,t){if(e.dataset.svgMounted!==t)try{let o=new DOMParser().parseFromString(t,"image/svg+xml").documentElement;o.tagName.toLowerCase()==="svg"&&(e.replaceChildren(document.importNode(o,!0)),e.dataset.svgMounted=t)}catch{}}function mc({callout:e,launcherPosition:t,strings:n,closeLabel:o,onDismiss:r}){let[a,s]=$(!1);return M(()=>{let l=setTimeout(()=>s(!0),e.delayMs);return()=>clearTimeout(l)},[e.delayMs]),M(()=>{if(!a||e.autoDismissMs<=0)return;let l=setTimeout(r,e.autoDismissMs);return()=>clearTimeout(l)},[a,e.autoDismissMs,r]),a?i("div",{class:`${yr}-callout`,role:"status","data-shape":e.shape,"data-position":mf(e.position,t),"data-animated":e.animated?"true":void 0,"data-testid":R.callout,children:[i("span",{children:lt(n,e.text)}),i("button",{type:"button",class:`${yr}-callout-close`,onClick:r,"aria-label":o,title:o,"data-testid":R.calloutDismiss,children:i(St,{})})]}):null}function mf(e,t){let n=t.endsWith("-right"),o=t.startsWith("bottom-");return e==="vertical"?o?"top":"bottom":n?"left":"right"}function Pr({panelEl:e,resize:t,position:n,initialSize:o,onSizeChange:r,strings:a}){let s=T.cssPrefix,l=O(null);if(M(()=>{if(!e)return;let g=e.style;t.minWidth&&g.setProperty(`--${s}-resize-min-w`,t.minWidth),t.maxWidth&&g.setProperty(`--${s}-resize-max-w`,t.maxWidth),t.minHeight&&g.setProperty(`--${s}-resize-min-h`,t.minHeight),t.maxHeight&&g.setProperty(`--${s}-resize-max-h`,t.maxHeight),o&&(g.setProperty(`--${s}-widget-w`,`${o.width}px`),g.setProperty(`--${s}-widget-h`,`${o.height}px`))},[e,t.minWidth,t.maxWidth,t.minHeight,t.maxHeight,s,o]),!e)return null;let c=n.startsWith("top-"),d=n.endsWith("-right"),_=`${s}-resize-grip ${s}-resize-grip--${c?"bottom":"top"}-${d?"left":"right"}`,p=g=>{if(!e)return;let P=g.currentTarget,y=e.getBoundingClientRect();l.current={pointerId:g.pointerId,startX:g.clientX,startY:g.clientY,startW:y.width,startH:y.height,dirX:d?-1:1,dirY:c?1:-1},P.setPointerCapture(g.pointerId),e.setAttribute("data-resizing",""),g.preventDefault()},u=g=>{let P=l.current;if(!P||g.pointerId!==P.pointerId||!e)return;let y=(g.clientX-P.startX)*P.dirX,w=(g.clientY-P.startY)*P.dirY;e.style.setProperty(`--${s}-widget-w`,`${P.startW+y}px`),e.style.setProperty(`--${s}-widget-h`,`${P.startH+w}px`)},m=g=>{let P=l.current;if(!P||g.pointerId!==P.pointerId||!e)return;g.currentTarget.releasePointerCapture(g.pointerId),e.removeAttribute("data-resizing");let y=e.getBoundingClientRect();r({width:Math.round(y.width),height:Math.round(y.height)}),l.current=null};return i("div",{class:_,role:"separator","aria-orientation":"vertical","aria-label":a.resizeHandle,title:a.resizeHandle,onPointerDown:p,onPointerMove:u,onPointerUp:m,onPointerCancel:m,"data-testid":R.resizeGrip,children:i(Kl,{})})}var _n=T.cssPrefix,gf=`.${_n}-header, .${_n}-back-header, .${_n}-home-hero`,vf='button, a, input, textarea, select, [role="tab"], [contenteditable]',gc=56;function xr(e,t){M(()=>{if(!t||!e)return;let n=c=>Number.parseFloat(c)||0,o=(c,d)=>Math.min(d,Math.max(-d,c)),r=null,a=c=>{let d=c.target;if(!(d instanceof Element)||!d.closest(gf)||d.closest(vf))return;let _=e.getBoundingClientRect();r={id:c.pointerId,x:c.clientX,y:c.clientY,dx:n(e.style.getPropertyValue(`--${_n}-modal-dx`)),dy:n(e.style.getPropertyValue(`--${_n}-modal-dy`)),maxX:(window.innerWidth+_.width)/2-gc,maxY:(window.innerHeight+_.height)/2-gc},e.dataset.dragging="true",c.preventDefault()},s=c=>{if(!r||c.pointerId!==r.id)return;let d=o(r.dx+c.clientX-r.x,r.maxX),_=o(r.dy+c.clientY-r.y,r.maxY);e.style.setProperty(`--${_n}-modal-dx`,`${d}px`),e.style.setProperty(`--${_n}-modal-dy`,`${_}px`)},l=c=>{!r||c.pointerId!==r.id||(r=null,delete e.dataset.dragging)};return e.addEventListener("pointerdown",a),window.addEventListener("pointermove",s),window.addEventListener("pointerup",l),window.addEventListener("pointercancel",l),()=>{e.removeEventListener("pointerdown",a),window.removeEventListener("pointermove",s),window.removeEventListener("pointerup",l),window.removeEventListener("pointercancel",l)}},[e,t])}function On(e,t,n){switch(e){case"clear":case"sound":case"history":case"language":case"theme":case"textSize":return!0;case"popOut":return t!=="standalone"&&t!=="page";case"expand":return t==="floating";case"fullscreen":return t!=="standalone";case"close":return t==="standalone"||t==="page"?!1:t==="inline"?n==="fullscreen":!0}}function Sr(e,t,n){return On("close",e,t)?n.includes("close"):!1}function vc(e,t){return e==="inline"&&t==="fullscreen"?"exit-fullscreen":"close"}var hf='a[href],button:not([disabled]),textarea:not([disabled]),input:not([disabled]):not([type="hidden"]),select:not([disabled]),[tabindex]:not([tabindex="-1"])';function kr(e){let t=n=>{if(n.key!=="Tab")return;let o=[...e.querySelectorAll(hf)].filter(l=>l.offsetParent!==null||l===document.activeElement);if(o.length===0){n.preventDefault();return}let r=o[0],a=o[o.length-1];if(!r||!a)return;let s=e.getRootNode().activeElement;n.shiftKey&&s===r?(n.preventDefault(),a.focus()):!n.shiftKey&&s===a&&(n.preventDefault(),r.focus())};return e.addEventListener("keydown",t),()=>e.removeEventListener("keydown",t)}function wr(e){return e.trim().split(/\s+/).slice(0,2).map(t=>t.charAt(0).toUpperCase()).join("")}var Qa=T.cssPrefix;function hc({agent:e,strings:t}){let n=e.status??"online",o=lt(t,e.name),r=e.title?lt(t,e.title):null;return i("div",{class:`${Qa}-agent`,children:[i("div",{class:`${Qa}-agent-avatar`,"data-status":n,children:e.avatar?i("img",{src:e.avatar,alt:""}):i("span",{children:wr(o)})}),i("div",{class:`${Qa}-agent-meta`,children:[i("strong",{children:o}),r?i("span",{children:r}):null]})]})}var bc=Z.scope("attachments");function Cr(e,t,n){let o=yf(e),r=[],a=[],s=Sf(n.accept),l=t.reduce((d,_)=>d+_.size,0),c=t.length;for(let d of o){let _=bf(d,c,l,n,s);if(_){a.push({file:d,reason:_});continue}r.push(xf(d)),l+=d.size,c+=1}return(r.length||a.length)&&bc.debug("ingest",{accepted:r.length,rejected:a.map(d=>({name:d.file.name,reason:d.reason}))}),{accepted:r,rejected:a}}function Nn(e){try{URL.revokeObjectURL(e.previewUrl)}catch(t){bc.debug("revokeObjectURL failed",{error:t})}}function bf(e,t,n,o,r){return t>=o.maxCount?"count":n+e.size>o.maxBytes?"bytes":kf(e,r)?null:"mime"}function yf(e){return e?Array.isArray(e)?e.filter(t=>t instanceof File):[...e].map(t=>t instanceof File?t:Pf(t)).filter(t=>t!==null):[]}function Pf(e){let t=e;return!t?.getAsFile||t.kind!=="file"?null:t.getAsFile()}function xf(e){return{file:e,id:pt(),mediaType:e.type||"application/octet-stream",name:e.name||"pasted-file",previewUrl:URL.createObjectURL(e),size:e.size}}function Sf(e){return e.split(",").map(t=>t.trim().toLowerCase()).filter(Boolean).map(t=>{if(t.startsWith("."))return{kind:"ext",ext:t};let[n="*",o="*"]=t.split("/");return{kind:"mime",type:n,subtype:o}})}function kf(e,t){if(t.length===0)return!0;let[n="*",o="*"]=(e.type||"").toLowerCase().split("/"),r=(e.name||"").toLowerCase();return t.some(a=>a.kind==="ext"?r.endsWith(a.ext):(a.type==="*"||a.type===n)&&(a.subtype==="*"||a.subtype===o))}var go=T.cssPrefix;function yc({attachment:e,onRemove:t,disabled:n=!1}){let o=e.mediaType.startsWith("image/");return i("span",{class:`${go}-attachment-chip`,title:e.name,"data-testid":Ye(R.attachmentChip,e.id),children:[o?i("img",{class:`${go}-attachment-thumb`,src:e.previewUrl,alt:""}):i("span",{class:`${go}-attachment-thumb`,"aria-hidden":"true",children:i(tc,{})}),i("span",{class:`${go}-attachment-name`,children:e.name}),i("button",{type:"button",class:`${go}-attachment-remove`,onClick:t,disabled:n,"aria-label":`Remove ${e.name}`,"data-testid":Ye(R.attachmentRemove,e.id),children:i(St,{})})]})}var Xa={isSupported:!1,start:()=>{},stop:()=>{},cancel:()=>{}};function Ya(e,t,n){return e==="disabled"?Xa:e==="server"?Tf(n):wf(t)}function wf(e){let t=Cf();if(!t)return Xa;let n=null,o=0;return{isSupported:!0,start(r,a){let s=n,l=++o;n=null,s?.abort();let c=new t;n=c,c.continuous=!0,c.interimResults=!0,c.lang=e;let d=!1;c.addEventListener("result",p=>{if(o!==l||n!==c)return;let u=p,m="",g=!1;for(let P=u.resultIndex;P<u.results.length;P++){let y=u.results[P];y&&(m+=y[0].transcript,y.isFinal&&(g=!0))}r(m,g)});let _=()=>{d||o!==l||n!==c||(d=!0,n=null,a())};c.addEventListener("end",_),c.addEventListener("error",_);try{c.start()}catch{_()}},stop(){n?.stop()},cancel(){o++;let r=n;n=null,r?.abort()}}}function Cf(){return window.SpeechRecognition??window.webkitSpeechRecognition}var Rf=["audio/webm;codecs=opus","audio/webm","audio/ogg;codecs=opus","audio/mp4"];function Tf(e){if(typeof MediaRecorder>"u"||!navigator?.mediaDevices?.getUserMedia)return Xa;let t=0,n=null,o=s=>{for(let l of s.stream?.getTracks()??[])l.stop();s.stream=null},r=()=>{t++;let s=n;n=null,s&&(o(s),s.recorder?.state!=="inactive"&&s.recorder?.stop())},a=async s=>{if(s.finishing)return;s.finishing=!0;let l=s.recorder?.mimeType??"audio/webm";o(s);let c=new Blob(s.chunks,{type:l});s.chunks=[];try{let{text:d}=await e(c,l);n===s&&t===s.generation&&d&&s.onText(d,!0)}catch{}finally{n===s&&t===s.generation&&(n=null,s.onEnd())}};return{isSupported:!0,async start(s,l){r();let c={generation:t,recorder:null,stream:null,chunks:[],onText:s,onEnd:l,finishing:!1};n=c;try{let d=await navigator.mediaDevices.getUserMedia({audio:!0});if(n!==c||t!==c.generation){for(let u of d.getTracks())u.stop();return}c.stream=d;let _=If(),p=new MediaRecorder(d,_?{mimeType:_}:void 0);c.recorder=p,p.addEventListener("dataavailable",u=>{n===c&&t===c.generation&&u.data.size>0&&c.chunks.push(u.data)}),p.addEventListener("stop",()=>{n===c&&t===c.generation&&a(c)}),p.start()}catch{o(c),n===c&&t===c.generation&&(n=null,l())}},stop(){let s=n;if(s){if(!s.recorder){r();return}s.recorder.state!=="inactive"&&s.recorder.stop()}},cancel(){r()}}}function If(){for(let e of Rf)if(MediaRecorder.isTypeSupported(e))return e}var He=T.cssPrefix,Dn=Z.scope("composer");function $n(e){return e.reduce((t,n)=>t+n.size,0)}var Ef={arrowUp:Dl,paperPlane:Nl,send:$l,chevron:Ln};function Pc(e){return"activeElement"in e}function Af(e){return"host"in e&&"activeElement"in e}function xc({options:e,transport:t,feedback:n,bus:o,persistence:r,conversationId:a,isStreaming:s,isMemoryCompacting:l=!1,canReleaseQueuedMessages:c=!0,queueManualMessages:d=!1,active:_=!0,isPreparing:p=!1,operatorRequestEnabled:u,canRequestOperator:m=!1,controlMode:g="ai-agent",onRequestOperator:P,onSend:y,onStop:w,apiRef:S}){let h=e.strings,[b,x]=$(()=>r.loadDraft(a)),[k,E]=$([]),[G,H]=$(()=>r.loadMessageQueue(a).map(I=>({id:I.id,text:I.text,attachments:[]}))),A=O(G),D=O(!1),[K,B]=$(!1),[ne,q]=$(!1),de=O(!1),re=O(null),qe=O(null),_e=O(null),Se=O(0),Ze=O(a);Ze.current=a;let Te=O(_);Te.current=_;let Ve=O(p);Ve.current=p;let Fe=ne||p||!_,rt=s&&g==="ai-agent",We=rt||l&&g==="ai-agent",tt=g==="ai-agent"&&(We||d||G.length>0),ct=L(I=>{H(W=>{let j=I(W);return r.saveMessageQueue(Ze.current,j.filter(le=>le.attachments.length===0).map(({id:le,text:je})=>({id:le,text:je}))),A.current=j,j})},[r]),we=L(I=>{ct(W=>(W.find(j=>j.id===I)?.attachments.forEach(Nn),W.filter(j=>j.id!==I)))},[ct]),Ie=L(I=>{x(W=>{let j=typeof I=="function"?I(W):I;return j===W?W:(r.saveDraft(Ze.current,j),j)})},[r]),dt=e.features.fileUpload,me=e.features.voice,[Le,Ke]=$(()=>Ya(me,e.locale,(I,W)=>t.transcribe(I,W))),Ee=O(Le);Ee.current=Le;let at=O({mode:me,locale:e.locale,transport:t});M(()=>{let I=at.current;I.mode===me&&I.locale===e.locale&&I.transport===t||(at.current={mode:me,locale:e.locale,transport:t},Se.current++,Ee.current.cancel(),_e.current=null,B(!1),Ke(Ya(me,e.locale,(W,j)=>t.transcribe(W,j))))},[e.locale,me,t]),M(()=>()=>{Se.current++,Le.cancel()},[Le]);let bt=L(I=>{let W=_e.current;if(W===null)return!1;let j=Math.round(performance.now()-W);return Dn[I]("voiceStop",{durationMs:j}),o.emit("voiceStop",{durationMs:j}),_e.current=null,!0},[o]),f=L(()=>{_e.current!==null&&(Le.stop(),B(!1),bt("info")&&n.play("voiceStop"))},[bt,n,Le]),N=L(()=>{Se.current++,Le.cancel(),B(!1),bt("info")&&n.play("voiceStop")},[bt,n,Le]);M(()=>{(p||!_)&&N()},[_,N,p]),M(()=>{let I=re.current;if(!I)return;let W=I.getRootNode(),j=Pc(W)?W.activeElement:null;j&&I.closest(`.${He}-panel`)?.contains(j)||I.focus({preventScroll:!0})},[]),M(()=>{let I=re.current;if(!I)return;if(b.length===0){I.style.height="";return}I.style.height="auto";let W=getComputedStyle(I),j=Number.parseFloat(W.getPropertyValue(`--${He}-textarea-base-height`)),le=Number.parseFloat(W.borderTopWidth)+Number.parseFloat(W.borderBottomWidth),je=Math.min(I.scrollHeight+le,Number.parseFloat(W.maxHeight)),yt=Number.parseFloat(W.fontSize)*.7;I.style.height=`${je<j+yt?j:je}px`},[b]);let V=O(k);V.current=k,M(()=>()=>{V.current.forEach(Nn);for(let I of A.current)I.attachments.forEach(Nn)},[]),M(()=>{if(S)return S.current={attachFromDrop:I=>{if(!dt||!Te.current||de.current||Ve.current)return;let W=Cr(I,V.current,e.attachments);W.accepted.length!==0&&(Dn.info("attach (drop)",{count:W.accepted.length,totalBytes:$n(W.accepted)}),o.emit("attach",{count:W.accepted.length,totalBytes:$n(W.accepted)}),E(j=>[...j,...W.accepted]))},fill:I=>{if(!Te.current||de.current||Ve.current)return;Ie(I);let W=re.current;W&&(W.focus({preventScroll:!0}),requestAnimationFrame(()=>W.setSelectionRange(W.value.length,W.value.length)))},acceptQueuedMessage:we},()=>{S.current&&(S.current=null)}},[S,dt,p,e.attachments,we,Ie]),M(()=>{let I=re.current;if(!I)return;let W=I.closest(`.${He}-panel`);if(!W)return;let j=le=>{if(!Te.current||de.current||Ve.current)return;let je=le.clipboardData;if(!je)return;let yt=le.target?.closest?.("input, textarea, [contenteditable]:not([contenteditable='false'])");if(yt&&yt!==I)return;if(dt){let it=Cr(je.items,V.current,e.attachments);if(it.accepted.length>0){le.preventDefault(),Dn.info("attach (paste)",{count:it.accepted.length,totalBytes:$n(it.accepted)}),o.emit("attach",{count:it.accepted.length,totalBytes:$n(it.accepted)}),E(tn=>[...tn,...it.accepted]);return}}if(yt===I)return;let Tt=je.getData("text/plain");Tt&&(le.preventDefault(),Ie(it=>it+Tt),I.focus())};return W.addEventListener("paste",j),()=>W.removeEventListener("paste",j)},[dt,e.attachments,Ie]);let Q=async()=>{let I=b.trim();if(!I&&k.length===0||!_||rt||de.current||p)return;N(),de.current=!0,q(!0);let W=b,j=k;try{await y(I,j)&&(Ie(le=>le===W?"":le),E(le=>le!==j?le:(j.forEach(Nn),V.current=[],[])))}finally{de.current=!1,q(!1),requestAnimationFrame(()=>{let le=re.current;if(!le||le.disabled||!Te.current)return;let je=le.getRootNode(),yt=Pc(je)?je.activeElement:null,Tt=yt?.getAttribute("data-testid");if(!(yt&&yt!==le&&Tt!==R.composerSend&&Tt!==R.composerStop)){if(Af(je)){let it=je.host.ownerDocument;if(!it.hasFocus())return;let tn=it.activeElement;if(tn&&tn!==je.host&&tn!==it.body)return}le.focus({preventScroll:!0})}})}},ie=()=>{let I=b.trim();if(!I&&k.length===0||!_||!tt||de.current||p)return;N();let W=k;ct(j=>[...j,{id:pt(),text:I,attachments:W}]),Ie(""),E(j=>j!==W?j:(V.current=[],[])),re.current?.focus({preventScroll:!0})};M(()=>{We&&(D.current=!1)},[We]),M(()=>{let I=G[0];if(!I||!c||We||D.current||ne||p||!_)return;let W=setTimeout(()=>{D.current=!0,y(I.text,I.attachments,I.id).then(j=>{if(j){we(I.id);return}D.current=!1})},300);return()=>clearTimeout(W)},[_,c,p,y,We,G,we,ne]);let be=I=>{I.key!=="Enter"||I.shiftKey||I.isComposing||(I.preventDefault(),tt&&(b.trim()||k.length>0)?ie():rt?w():Q())},ye=I=>{let W=I.target;if(!_||de.current||p){W.value="";return}let j=Cr(W.files,k,e.attachments);j.accepted.length>0&&(Dn.info("attach (file picker)",{count:j.accepted.length,totalBytes:$n(j.accepted)}),o.emit("attach",{count:j.accepted.length,totalBytes:$n(j.accepted)}),E(le=>[...le,...j.accepted])),W.value=""},pe=I=>{!_||de.current||p||(Dn.info("removeAttachment",{id:I}),o.emit("removeAttachment",{id:I}),E(W=>{let j=W.find(le=>le.id===I);return j&&Nn(j),W.filter(le=>le.id!==I)}))},Ge=()=>{if(K){f();return}if(!_||!Le.isSupported||de.current||p)return;let I=++Se.current;_e.current=performance.now(),Dn.info("voiceStart"),o.emit("voiceStart",void 0),B(!0),n.play("voiceStart"),Le.start((W,j)=>{Se.current!==I||!Te.current||Ve.current||de.current||!j||Ie(le=>`${le}${W} `)},()=>{Se.current!==I||!Te.current||(B(!1),bt("debug"))})},se=Ef[e.composer.sendButton.icon],nt=!!(b.trim()||k.length>0);return i("div",{class:`${He}-composer`,"data-testid":R.composer,children:[G.length>0?i("div",{class:`${He}-message-queue`,"aria-label":h.queueMessage,"data-testid":R.messageQueue,children:G.map(I=>i("div",{class:`${He}-attachment-chip ${He}-queued-message`,"data-testid":`${R.queuedMessage}-${I.id}`,children:[i("span",{class:`${He}-attachment-name ${He}-queued-text`,children:I.text||I.attachments.map(W=>W.name).join(", ")}),i("button",{type:"button",class:`${He}-attachment-remove`,onClick:()=>we(I.id),"aria-label":h.removeQueuedMessage,title:h.removeQueuedMessage,"data-testid":`${R.queuedMessageRemove}-${I.id}`,children:i(St,{})})]},I.id))}):null,k.length>0?i("div",{class:`${He}-attachments`,children:k.map(I=>i(yc,{attachment:I,onRemove:()=>pe(I.id),disabled:Fe},I.id))}):null,i("div",{class:`${He}-composer-row`,children:[i("div",{class:`${He}-composer-actions`,children:[dt?i("button",{type:"button",class:`${He}-icon-btn`,onClick:()=>qe.current?.click(),disabled:Fe,"aria-label":h.attach,"data-testid":R.composerAttach,children:i(Bl,{})}):null,Le.isSupported?i("button",{type:"button",class:`${He}-icon-btn`,onClick:Ge,disabled:Fe,"aria-label":K?h.micStop:h.micStart,"aria-pressed":K,"data-recording":K?"true":void 0,"data-testid":R.composerVoice,children:i(Ul,{})}):null]}),i("textarea",{ref:re,name:"message",class:`${He}-textarea`,rows:1,value:b,placeholder:h.composerPlaceholder,onInput:I=>Ie(I.currentTarget.value),onKeyDown:be,disabled:Fe,"aria-label":h.composerPlaceholder,"data-testid":R.composerInput}),tt&&nt?i("button",{type:"button",class:`${He}-send`,"data-shape":e.composer.sendButton.shape,"data-variant":e.composer.sendButton.variant,onClick:ie,disabled:Fe,"aria-label":h.queueMessage,title:h.queueMessage,"data-testid":R.composerSend,children:i(se,{})}):null,rt?i("button",{type:"button",class:`${He}-send`,onClick:w,disabled:Fe,"aria-label":h.stop,"data-testid":R.composerStop,children:i(Fl,{})}):null,!rt&&(!tt||!nt)?i("button",{type:"button",class:`${He}-send`,"data-shape":e.composer.sendButton.shape,"data-variant":e.composer.sendButton.variant,onClick:()=>{Q()},disabled:Fe||!b.trim()&&k.length===0,"aria-label":h.send,"data-testid":R.composerSend,children:i(se,{})}):null,u&&g==="ai-agent"&&P?i("button",{type:"button",class:`${He}-icon-btn`,onClick:P,disabled:Fe||!m,"aria-label":h.talkToOperator,title:h.talkToOperator,"data-testid":R.operatorRequest,children:i(Ga,{})}):null]}),i("input",{ref:qe,name:"attachments",type:"file",multiple:!0,accept:e.attachments.accept,onChange:ye,disabled:Fe,class:`${He}-sr-only`,"data-testid":R.composerFileInput})]})}var Mf=T.cssPrefix;function Sc({visible:e,strings:t}){return e?i("div",{class:`${Mf}-dropzone`,role:"status","aria-live":"polite",children:t.dropZone}):null}function Rr({containerRef:e,onDrop:t,disabled:n=!1}){let[o,r]=$(!1);return M(()=>{if(n){r(!1);return}let a=e.current;if(!a)return;let s=0,l=p=>{s+=1,p.dataTransfer?.types.includes("Files")&&(p.preventDefault(),r(!0))},c=()=>{s-=1,!(s>0)&&(s=0,r(!1))},d=p=>{p.dataTransfer?.types.includes("Files")&&p.preventDefault()},_=p=>{s=0,r(!1),p.dataTransfer&&(p.preventDefault(),t(p.dataTransfer.items))};return a.addEventListener("dragenter",l),a.addEventListener("dragleave",c),a.addEventListener("dragover",d),a.addEventListener("drop",_),()=>{a.removeEventListener("dragenter",l),a.removeEventListener("dragleave",c),a.removeEventListener("dragover",d),a.removeEventListener("drop",_)}},[e,n,t]),{visible:n?!1:o}}function kc({itemCount:e,initialFocusIndex:t}){let[n,o]=$(!1),r=O(null),a=O(null),[s,l]=$(-1),c=L(()=>{o(!1),l(-1),r.current?.focus()},[]),d=L(()=>o(u=>!u),[]);M(()=>{if(!n)return;let u=m=>{let g=a.current,P=r.current;if(!g||!P)return;let y=m.composedPath();y.includes(g)||y.includes(P)||(o(!1),l(-1))};return document.addEventListener("click",u,!0),()=>document.removeEventListener("click",u,!0)},[n]),M(()=>{if(!n||e===0)return;let u=t?.()??0,m=u<0||u>=e?0:u;l(m)},[n,e,t]),M(()=>{if(!n||s<0)return;a.current?.querySelectorAll("[role='menuitem']")?.[s]?.focus()},[n,s]);let _=L(u=>{(u.key==="ArrowDown"||u.key==="Enter"||u.key===" ")&&(u.preventDefault(),o(!0))},[]),p=L(u=>{if(e!==0)switch(u.key){case"Escape":u.preventDefault(),c();return;case"ArrowDown":u.preventDefault(),l(m=>(m+1)%e);return;case"ArrowUp":u.preventDefault(),l(m=>(m-1+e)%e);return;case"Home":u.preventDefault(),l(0);return;case"End":u.preventDefault(),l(e-1)}},[e,c]);return{open:n,focusIndex:s,triggerRef:r,menuRef:a,toggle:d,close:c,onTriggerKey:_,onMenuKey:p}}function wc({items:e,triggerLabel:t}){let n=T.cssPrefix,o=kc({itemCount:e.length}),r=l=>{l.disabled||(l.onSelect?.(),l.keepOpen||o.close())},a=(l,c)=>l.onSelectValue?.(c),s=(l,c)=>{let d=c.segments;if(!d?.length)return;let _=Math.max(0,d.findIndex(u=>u.value===c.value)),p=-1;if(l.key==="ArrowRight"||l.key==="Enter"||l.key===" ")p=(_+1)%d.length;else if(l.key==="ArrowLeft")p=(_-1+d.length)%d.length;else return;l.preventDefault(),l.stopPropagation(),a(c,d[p].value)};return i("div",{class:`${n}-menu-wrap`,children:[i("button",{ref:o.triggerRef,type:"button",class:`${n}-icon-btn`,"aria-label":t,"aria-haspopup":"menu","aria-expanded":o.open,title:t,onClick:o.toggle,onKeyDown:o.onTriggerKey,children:i(Gl,{})}),o.open?i("div",{ref:o.menuRef,class:`${n}-menu`,role:"menu","aria-label":t,onKeyDown:o.onMenuKey,tabIndex:-1,children:e.map(l=>l.segments?i("div",{role:"menuitem",class:`${n}-menu-item ${n}-menu-item-segmented`,"aria-label":l.label,tabIndex:-1,onKeyDown:c=>s(c,l),children:[l.icon?i("span",{class:`${n}-menu-icon`,children:l.icon}):null,i("span",{class:`${n}-menu-label`,children:l.label}),i("span",{class:`${n}-segmented`,role:"group","aria-label":l.label,children:l.segments.map(c=>{let d=c.value===l.value;return i("button",{type:"button",role:"menuitemradio","aria-checked":d,class:`${n}-segment`,"data-on":d?"true":void 0,lang:c.lang,title:c.value,tabIndex:-1,"data-testid":`${R.langSegment}-${c.value}`,onClick:()=>a(l,c.value),children:c.label},c.value)})})]},l.id):i("button",{type:"button",role:"menuitem",class:`${n}-menu-item`,"aria-pressed":l.type==="switch"?l.on:void 0,disabled:l.disabled,onClick:()=>r(l),children:[l.icon?i("span",{class:`${n}-menu-icon`,children:l.icon}):null,i("span",{class:`${n}-menu-label`,children:l.label}),l.type==="switch"&&l.on?i("span",{class:`${n}-menu-check`,"aria-hidden":"true",children:i(dn,{})}):null]},l.id))}):null]})}var Ja=T.cssPrefix;function Lf(e){let t=typeof matchMedia=="function"?matchMedia("(prefers-color-scheme: dark)").matches:!0;return e==="auto"?t?"light":"dark":t?e==="light"?"dark":"auto":e==="dark"?"light":"auto"}var Of={normal:"large",large:"small",small:"normal"};function Nf(e){return e==="light"?i(ac,{}):e==="dark"?i(ic,{}):i(sc,{})}function Df(e){return(e.split("-")[0]??e).toUpperCase()}function $f(e,t){let n;try{n=new URL(e,window.location.href)}catch{return}if(!(n.protocol!=="http:"&&n.protocol!=="https:"))return t.conversationId&&n.searchParams.set("chat",t.conversationId),n.searchParams.set("widgetId",t.widgetId),t.publicKey&&n.searchParams.set("public_key",t.publicKey),n.searchParams.set("ai_agent_deployment_id",t.aiAgentDeploymentId),n.href}function Et({panelProps:e,variant:t}){let{options:n,panelSize:o,feedback:r,onClose:a,onClear:s,onExpand:l,onFullscreen:c,onSoundToggle:d}=e,{onToggleHistory:_,onLocaleChange:p,onThemeChange:u,onTextSizeChange:m}=e,g=n.strings,P=n.mode,y=t==="chat",w=ft(()=>r.mutedSig.value).value,S=new Set(n.actions),h=q=>S.has(q),b=typeof matchMedia=="function"&&matchMedia("(max-width: 640px)").matches,x=q=>b?!1:On(q,P,o),k=n.themeMode,E={auto:g.themeAuto,light:g.themeLight,dark:g.themeDark},G=n.textSize,H={small:g.textSizeSmall,normal:g.textSizeNormal,large:g.textSizeLarge},A=[];if(y&&h("clear")&&A.push({id:"clear",icon:i(ec,{}),label:g.newConversation,onSelect:s}),h("expand")&&x("expand")){let q=o==="expanded";A.push({id:"expand",icon:q?i(zl,{}):i(Hl,{}),label:q?g.collapse:g.expand,type:"switch",on:q,onSelect:l})}if(h("fullscreen")&&x("fullscreen")){let q=o==="fullscreen";A.push({id:"fullscreen",icon:q?i(Vl,{}):i(ql,{}),label:q?g.exitFullscreen:g.fullscreen,type:"switch",on:q,onSelect:c})}let D=n.popOutUrl,K=n.aiAgentDeploymentId;h("popOut")&&D&&K&&On("popOut",P,o)&&A.push({id:"popOut",icon:i(Wl,{}),label:g.popOut,onSelect:()=>{let q=$f(D,{conversationId:e.conversationId,widgetId:n.widgetId,publicKey:n.publicKey,aiAgentDeploymentId:K});q&&window.open(q,"_blank","noopener,noreferrer")}}),y&&h("sound")&&A.push({id:"sound",icon:w?i(Ql,{}):i(jl,{}),label:w?g.soundOff:g.soundOn,type:"switch",on:!w,onSelect:d}),h("theme")&&A.push({id:"theme",icon:Nf(k),label:`${g.theme}: ${E[k]}`,onSelect:()=>u(Lf(k)),keepOpen:!0}),h("textSize")&&A.push({id:"textSize",icon:i(Xl,{}),label:`${g.textSize}: ${H[G]}`,onSelect:()=>m(Of[G]),keepOpen:!0}),h("language")&&n.availableLocales.length>1&&A.push({id:"language",icon:i(Zl,{}),label:g.language,segments:n.availableLocales.map(q=>({value:q,label:Df(q),lang:q})),value:n.locale,onSelectValue:p});let B=!!a&&Sr(P,o,n.actions),ne=y&&h("history");return i("div",{class:`${Ja}-header-actions`,children:[ne?i("button",{type:"button",class:`${Ja}-icon-btn`,onClick:_,"aria-label":g.history,title:g.history,"data-testid":R.actionHistory,children:i(Jl,{})}):null,A.length>0?i(wc,{items:A,triggerLabel:g.moreActions}):null,B?i("button",{type:"button",class:`${Ja}-icon-btn`,onClick:a,"aria-label":g.close,title:g.close,"data-testid":R.actionClose,children:i(St,{})}):null]})}var Ff=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,Bf=/^https?:\/\/[^\s.]+\.[^\s]+$/i,Uf=/^[+]?[\d\s().-]{6,}$/;function Fn(e,t){return e.replace(/\{(\w+)\}/g,(n,o)=>String(t[o]??`{${o}}`))}function Hf(e){return Array.isArray(e)?e.length:e?.trim()?1:0}function zf(e,t,n){let o=e.required??!0,r=e.validation;if(e.type==="multiselect"){let s=Hf(t);return o&&s===0?n.formRequired:s===0?void 0:r?.minSelections!=null&&s<r.minSelections?Fn(n.formChooseAtLeast,{min:r.minSelections}):r?.maxSelections!=null&&s>r.maxSelections?Fn(n.formChooseAtMost,{max:r.maxSelections}):void 0}let a=typeof t=="string"?t.trim():"";if(!a)return o?n.formRequired:void 0;switch(e.type){case"email":if(!Ff.test(a))return n.formInvalidEmail;break;case"url":if(!Bf.test(a))return n.formInvalidUrl;break;case"tel":if(!Uf.test(a))return n.formInvalidTel;break;case"number":{let s=Number(a);if(!Number.isFinite(s))return n.formInvalidNumber;if(r?.min!=null&&s<r.min)return Fn(n.formNumberTooSmall,{min:r.min});if(r?.max!=null&&s>r.max)return Fn(n.formNumberTooLarge,{max:r.max});break}default:break}if(r?.minLength!=null&&a.length<r.minLength)return Fn(n.formTooShort,{min:r.minLength});if(r?.maxLength!=null&&a.length>r.maxLength)return Fn(n.formTooLong,{max:r.maxLength});if(r?.pattern)try{if(!new RegExp(r.pattern).test(a))return n.formPatternMismatch}catch{}}function Cc(e,t,n){let o={};for(let r of e){let a=zf(r,t[r.name],n);a&&(o[r.name]=a)}return o}function Rc(e){let t={};for(let[n,o]of Object.entries(e)){let r=Array.isArray(o)?o.join(", "):o;r.trim()&&(t[n]=r.trim())}return t}var Ce=T.cssPrefix,Tr="__other__";function vo({fields:e,strings:t,submitLabel:n,onSubmit:o,skipLabel:r,onSkip:a,footerHint:s,submitOnEnter:l,disabled:c,initialValues:d,hideActions:_,fieldTypeLabels:p,rootTestId:u,submitTestId:m,skipTestId:g}){let[P,y]=$(()=>({...Kf(e),...d})),[w,S]=$({}),[h,b]=$({}),x=A=>{h[A]&&b(D=>({...D,[A]:""}))},k=(A,D)=>{y(K=>({...K,[A]:D})),x(A)},E=(A,D)=>{S(K=>({...K,[A]:D})),x(A)},G=A=>{if(A.preventDefault(),c)return;let D=Gf(e,P,w),K=Cc(e,D,t);if(Object.keys(K).length>0){b(K);return}o(Rc(D))},H=A=>{!l||A.key!=="Enter"||A.shiftKey||A.isComposing||A.target?.tagName==="TEXTAREA"&&G(A)};return i("form",{class:`${Ce}-form`,onSubmit:G,onKeyDown:H,"data-testid":u,noValidate:!0,children:[e.map(A=>i(qf,{field:A,value:P[A.name],otherText:w[A.name]??"",error:h[A.name],disabled:c,typeLabel:p?.[A.name],strings:t,onChange:D=>k(A.name,D),onOtherChange:D=>E(A.name,D)},A.name)),_?null:i("div",{class:`${Ce}-form-actions`,children:[s?i("span",{class:`${Ce}-form-hint`,children:s}):null,r&&a?i("button",{type:"button",class:`${Ce}-form-skip`,onClick:a,disabled:c,"data-testid":g,children:r}):null,i("button",{type:"submit",class:`${Ce}-form-submit`,disabled:c,"data-testid":m,children:n})]})]})}function qf({field:e,value:t,otherText:n,error:o,disabled:r,typeLabel:a,strings:s,onChange:l,onOtherChange:c}){let d=Ye(R.formField,e.name),_=Vf({field:e,value:t,otherText:n,disabled:r,strings:s,onChange:l,onOtherChange:c,fieldTid:d});return i("label",{class:`${Ce}-field`,"data-field":e.name,"data-invalid":o?"true":void 0,children:[i("span",{class:`${Ce}-field-head`,children:[i("span",{class:`${Ce}-field-label`,children:[e.label,e.required??!0?i("span",{class:`${Ce}-field-req`,"aria-hidden":"true",children:" *"}):null]}),a?i("span",{class:`${Ce}-field-type`,children:a}):null]}),_,e.validationHint&&!o?i("span",{class:`${Ce}-field-hint`,children:e.validationHint}):null,o?i("span",{class:`${Ce}-field-error`,role:"alert",children:o}):null]})}function Vf(e){let{field:t,value:n,otherText:o,disabled:r,strings:a,onChange:s,onOtherChange:l,fieldTid:c}=e,d=typeof n=="string"?n:"";switch(t.type){case"textarea":return i("textarea",{class:`${Ce}-field-input`,rows:3,value:d,placeholder:t.placeholder,disabled:r,onInput:_=>s(_.target.value),"data-testid":c});case"select":return i("select",{class:`${Ce}-field-input`,value:d,disabled:r,onChange:_=>s(_.target.value),"data-testid":c,children:[i("option",{value:"",children:t.placeholder??"\u2014"}),(t.options??[]).map(_=>i("option",{value:_.value,children:_.label??_.value},_.value))]});case"radio":{let _=t.allowOther&&d===Tr;return i("div",{class:`${Ce}-field-choices`,role:"radiogroup","data-testid":c,children:[(t.options??[]).map(p=>i("label",{class:`${Ce}-choice`,children:[i("input",{type:"radio",name:`${Ce}-${t.name}`,checked:d===p.value,disabled:r,onChange:()=>s(p.value)}),i("span",{children:p.label??p.value})]},p.value)),t.allowOther?i("label",{class:`${Ce}-choice`,children:[i("input",{type:"radio",name:`${Ce}-${t.name}`,checked:d===Tr,disabled:r,onChange:()=>s(Tr)}),i("span",{children:a.formOther})]}):null,_?i("input",{class:`${Ce}-field-input`,value:o,placeholder:t.placeholder??a.formOtherPlaceholder,disabled:r,onInput:p=>l(p.target.value)}):null]})}case"checkbox":return i("label",{class:`${Ce}-choice`,children:[i("input",{type:"checkbox",checked:d==="true",disabled:r,onChange:_=>s(_.target.checked?"true":""),"data-testid":c}),i("span",{children:t.placeholder??t.label})]});case"multiselect":{let _=Array.isArray(n)?n:[],p=(u,m)=>s(m?[..._,u]:_.filter(g=>g!==u));return i("div",{class:`${Ce}-field-choices`,"data-testid":c,children:[(t.options??[]).map(u=>i("label",{class:`${Ce}-choice`,children:[i("input",{type:"checkbox",checked:_.includes(u.value),disabled:r,onChange:m=>p(u.value,m.target.checked)}),i("span",{children:u.label??u.value})]},u.value)),t.allowOther||(t.options??[]).length===0?i("textarea",{class:`${Ce}-field-input`,rows:2,value:o,placeholder:t.placeholder??a.formOtherPlaceholder,disabled:r,onInput:u=>l(u.target.value)}):null]})}default:return i("input",{class:`${Ce}-field-input`,type:Wf(t.type),value:d,placeholder:t.placeholder,disabled:r,onInput:_=>s(_.target.value),"data-testid":c})}}function Wf(e){switch(e){case"number":case"email":case"tel":case"url":case"date":case"time":return e;default:return"text"}}function Kf(e){let t={};for(let n of e)n.defaultValue!=null&&(t[n.name]=n.type==="multiselect"?n.defaultValue.split(",").map(o=>o.trim()).filter(Boolean):n.defaultValue);return t}function Gf(e,t,n){let o={...t};for(let r of e){let a=n[r.name]?.trim();if(r.type==="radio"&&r.allowOther&&t[r.name]===Tr)o[r.name]=a??"";else if(r.type==="multiselect"&&a){let s=a.split(/[,\n;]+/).map(c=>c.trim()).filter(Boolean),l=Array.isArray(t[r.name])?t[r.name]:[];o[r.name]=[...l,...s]}}return o}var At=T.cssPrefix;function Za({form:e,strings:t,onSubmit:n,onSkip:o}){return i("div",{class:`${At}-form-gate`,"data-testid":R.formGate,children:[e.title?i("h3",{class:`${At}-form-gate-title`,children:e.title}):null,e.description?i("p",{class:`${At}-form-gate-desc`,children:e.description}):null,i(vo,{fields:e.fields,strings:t,submitLabel:e.submitLabel??t.formSubmit,onSubmit:n,skipLabel:e.skippable?t.formSkip:void 0,onSkip:e.skippable?o:void 0,submitTestId:R.formSubmit,skipTestId:R.formSkip})]})}function Tc({marker:e,strings:t,onFill:n}){let o=e.outcome==="skipped",r=o?t.formSkipped:t.formSubmitted,a=e.title?i(fe,{children:[i("span",{children:e.title}),i("span",{class:`${At}-sr-only`,children:r})]}):i("span",{children:r}),s=e.form?.reviewable??!1,l=!o&&s&&e.values&&Object.keys(e.values).length>0?e.values:null;if(l){let c=d=>e.form?.fields.find(_=>_.name===d)?.label??d;return i("details",{class:`${At}-form-done`,"data-outcome":e.outcome,"data-testid":R.formDone,children:[i("summary",{class:`${At}-form-done-summary`,"data-testid":R.formDoneToggle,children:[i(dn,{}),a,i(Ln,{})]}),i("dl",{class:`${At}-form-answers`,"data-testid":R.formAnswers,children:Object.entries(l).map(([d,_])=>i("div",{class:`${At}-form-answer`,children:[i("dt",{children:c(d)}),i("dd",{children:_})]},d))})]})}return i("div",{class:`${At}-form-done`,"data-outcome":e.outcome,"data-testid":R.formDone,role:"status",children:[o?i(Yl,{}):i(dn,{}),a,o&&e.form?.reopenable&&n?i("button",{type:"button",class:`${At}-form-done-fill`,"data-testid":R.formFill,onClick:n,children:t.formFillOut}):null]})}function Xf(e,t){for(var n in t)e[n]=t[n];return e}function ti(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var o in t)if(o!=="__source"&&e[o]!==t[o])return!0;return!1}function Ic(e,t){this.props=e,this.context=t}function $c(e,t){function n(r){var a=this.props.ref;return a!=r.ref&&a&&(typeof a=="function"?a(null):a.current=null),t?!t(this.props,r)||a!=r.ref:ti(this.props,r)}function o(r){return this.shouldComponentUpdate=n,Nt(e,r)}return o.displayName="Memo("+(e.displayName||e.name)+")",o.__f=o.prototype.isReactComponent=!0,o.type=e,o}(Ic.prototype=new _t).isPureReactComponent=!0,Ic.prototype.shouldComponentUpdate=function(e,t){return ti(this.props,e)||ti(this.state,t)};var Ec=J.__b;J.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Ec&&Ec(e)};var Vy=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;var Yf=J.__e;J.__e=function(e,t,n,o){if(e.then){for(var r,a=t;a=a.__;)if((r=a.__c)&&r.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k||[]),r.__c(e,t)}Yf(e,t,n,o)};var Ac=J.unmount;function Fc(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(o){typeof o.__c=="function"&&o.__c()}),e.__c.__H=null),(e=Xf({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(o){return Fc(o,t,n)})),e}function Bc(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(o){return Bc(o,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function ei(){this.__u=0,this.o=null,this.__b=null}function Uc(e){var t=e.__&&e.__.__c;return t&&t.__a&&t.__a(e)}function Ir(){this.i=null,this.l=null}J.unmount=function(e){var t=e.__c;t&&(t.__z=!0),t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Ac&&Ac(e)},(ei.prototype=new _t).__c=function(e,t){var n=t.__c,o=this;o.o==null&&(o.o=[]),o.o.push(n);var r=Uc(o.__v),a=!1,s=function(){a||o.__z||(a=!0,n.__R=null,r?r(c):c())};n.__R=s;var l=n.__P;n.__P=null;var c=function(){if(!--o.__u){if(o.state.__a){var d=o.state.__a;o.__v.__k[0]=Bc(d,d.__c.__P,d.__c.__O)}var _;for(o.setState({__a:o.__b=null});_=o.o.pop();)_.__P=l,_.forceUpdate()}};o.__u++||32&t.__u||o.setState({__a:o.__b=o.__v.__k[0]}),e.then(s,s)},ei.prototype.componentWillUnmount=function(){this.o=[]},ei.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=Fc(this.__b,n,o.__O=o.__P)}this.__b=null}var r=t.__a&&Nt(fe,null,e.fallback);return r&&(r.__u&=-33),[Nt(fe,null,t.__a?null:e.children),r]};var Mc=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};(Ir.prototype=new _t).__a=function(e){var t=this,n=Uc(t.__v),o=t.l.get(e);return o[0]++,function(r){var a=function(){t.props.revealOrder?(o.push(r),Mc(t,e,o)):r()};n?n(a):a()}},Ir.prototype.render=function(e){this.i=null,this.l=new Map;var t=Yn(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},Ir.prototype.componentDidUpdate=Ir.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){Mc(e,n,t)})};var Jf=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Zf=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,em=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,tm=/[A-Z0-9]/g,nm=typeof document<"u",om=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};_t.prototype.isReactComponent=!0,["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(_t.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Lc=J.event;J.event=function(e){return Lc&&(e=Lc(e)),e.persist=function(){},e.isPropagationStopped=function(){return this.cancelBubble},e.isDefaultPrevented=function(){return this.defaultPrevented},e.nativeEvent=e};var Hc,rm={configurable:!0,get:function(){return this.class}},Oc=J.vnode;J.vnode=function(e){typeof e.type=="string"&&(function(t){var n=t.props,o=t.type,r={},a=o.indexOf("-")==-1;for(var s in n){var l=n[s];if(!(s==="value"&&"defaultValue"in n&&l==null||nm&&s==="children"&&o==="noscript"||s==="class"||s==="className")){var c=s.toLowerCase();s==="defaultValue"&&"value"in n&&n.value==null?s="value":s==="download"&&l===!0?l="":c==="translate"&&l==="no"?l=!1:c[0]==="o"&&c[1]==="n"?c==="ondoubleclick"?s="ondblclick":c!=="onchange"||o!=="input"&&o!=="textarea"||om(n.type)?c==="onfocus"?s="onfocusin":c==="onblur"?s="onfocusout":em.test(s)&&(s=c):c=s="oninput":a&&Zf.test(s)?s=s.replace(tm,"-$&").toLowerCase():l===null&&(l=void 0),c==="oninput"&&r[s=c]&&(s="oninputCapture"),r[s]=l}}o=="select"&&(r.multiple&&Array.isArray(r.value)&&(r.value=Yn(n.children).forEach(function(d){d.props.selected=r.value.indexOf(d.props.value)!=-1})),r.defaultValue!=null&&(r.value=Yn(n.children).forEach(function(d){d.props.selected=r.multiple?r.defaultValue.indexOf(d.props.value)!=-1:r.defaultValue==d.props.value}))),n.class&&!n.className?(r.class=n.class,Object.defineProperty(r,"className",rm)):n.className&&(r.class=r.className=n.className),t.props=r})(e),e.$$typeof=Jf,Oc&&Oc(e)};var Nc=J.__r;J.__r=function(e){Nc&&Nc(e),Hc=e.__c};var Dc=J.diffed;J.diffed=function(e){Dc&&Dc(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value),Hc=null};function Er(e){return e?(e.startsWith("tool:")?e.slice(5):e)==="ask-user-questions":!1}var kt=T.cssPrefix;function oi(e){return e.startsWith("tool:")||e.startsWith("tool-")?e.slice(5):e}function Ar(e,t){let n=e==="output-available"||e==="output-error"||e==="output-denied",o=e==="approval-responded"||t?.approved!==void 0;return{terminal:n,responded:o,decided:n||o}}function ri({status:e,icon:t,label:n}){return i("span",{class:`${kt}-toolui-badge ${kt}-toolui-status`,"data-status":e,children:[i("span",{class:`${kt}-toolui-status-icon`,children:t}),n]})}function am(e,t){return e==="output-error"?"error":e==="output-denied"||t?.approved===!1?"denied":e==="output-available"?"completed":e==="approval-responded"||t?.approved===!0?"responded":e==="approval-requested"?"awaiting":"running"}function ai(e,t,n={}){return n.submitted?"responded":lm(am(e,t),n.superseded,n.live??!0)}function im({status:e}){return e==="denied"||e==="error"||e==="superseded"?i(br,{}):e==="completed"||e==="responded"?i(hr,{}):i(_c,{})}function sm(e,t){switch(e){case"awaiting":return t.statusAwaiting;case"responded":return t.statusResponded;case"completed":return t.statusCompleted;case"denied":return t.statusDenied;case"error":return t.statusError;case"superseded":return t.statusSuperseded;default:return t.statusRunning}}function lm(e,t,n){return t&&(e==="awaiting"||e==="running")?"superseded":!n&&e==="running"?"error":e}function cm({state:e,approval:t,strings:n,superseded:o,live:r=!0,submitted:a=!1}){let s=ai(e,t,{superseded:o,live:r,submitted:a});return i(ri,{status:s,icon:i(im,{status:s}),label:sm(s,n)})}function dm({name:e,state:t,approval:n,strings:o,superseded:r,live:a,submitted:s}){return i(fe,{children:[i("span",{class:`${kt}-toolui-name-pill`,children:[i(uc,{}),i("span",{class:`${kt}-toolui-name-text`,children:e})]}),i(cm,{state:t,approval:n,strings:o,superseded:r,live:a,submitted:s}),i("span",{class:`${kt}-toolui-chevron`,children:i(un,{})})]})}function Mr({part:e,strings:t,testid:n,superseded:o,live:r,submitted:a}){let s=oe(()=>ge(()=>e.inputSig.value),[e]),l=oe(()=>ge(()=>e.outputSig.value),[e]),c=oe(()=>ge(()=>e.errorSig.value),[e]),d=oe(()=>ge(()=>e.stateSig.value),[e]),_=oe(()=>ge(()=>e.approvalSig.value),[e]);return i("details",{class:`${kt}-toolui ${kt}-toolui-collapsible`,"data-testid":n,children:[i("summary",{class:`${kt}-toolui-head`,children:i(dm,{name:oi(e.toolName),state:d.value,approval:_.value,strings:t,superseded:o,live:r,submitted:a})}),i(ni,{label:t.toolParameters,value:s.value}),l.value!==void 0?i(ni,{label:t.toolResult,value:l.value}):null,c.value?i(ni,{label:t.statusError,value:c.value,error:!0}):null]})}function ni({label:e,value:t,error:n}){let o=n?typeof t=="string"?t:"":Lr(ii(t));return o?i("div",{class:`${kt}-toolui-section`,children:[i("span",{class:`${kt}-toolui-label`,children:e}),i("pre",{class:`${kt}-toolui-code`,"data-error":n?"true":void 0,children:o})]}):null}function ii(e){if(e&&typeof e=="object"){let t=e;if(t.storage==="tool-result-ref"&&"summary"in t)return t.summary}return e}function Lr(e){if(e==null)return"";try{let t=typeof e=="string"?e:JSON.stringify(e,null,2);return!t||t==="{}"||t==="[]"||t==='""'?"":t.length>800?`${t.slice(0,800)}\u2026`:t}catch{return""}}function zc(e){return e.partsSig.value.some(t=>t.kind==="text"&&t.textSig.value.length>0)}function qc(e){return e.partsSig.value.some(t=>t.kind==="reasoning")}function um(e){return e.streaming&&!e.bufferedHold&&!(e.reasoningVisible&&e.working)}function Vc(e){let{streaming:t,reasoningVisible:n,emptyReply:o,hidden:r}=e,a=e.responseMode==="buffered"&&t,s=t&&!e.hasAnswerText;return{streaming:t,bufferedHold:a,reasoningVisible:n,working:s,showStreamDots:um({streaming:t,bufferedHold:a,reasoningVisible:n,working:s}),emptyReply:o,hidden:r}}function Wc(e,t){let n=e.stateSig.value,o=e.approvalSig.value,{terminal:r,responded:a,decided:s}=Ar(n,o),l=t.continuationStreaming===!0&&!s,c=t.superseded&&!s&&!l;return{pill:ai(n,o,{superseded:c,live:t.live,submitted:l}),state:n,terminal:r,decided:s||l,showApproveReject:!s&&!t.superseded&&!l,showAnswered:a&&!r&&!c,showSubmitted:l,showEdit:a&&t.active&&!r,skipped:c,answeredApproved:o?.approved}}var ci=1,Gc=2,jc=4,Qc=8,Xc=16;function _m(e){switch(e){case ci:return"href";case Gc:return"src";case jc:return"class";case Qc:return"checked";case Xc:return"start"}}var pm=e=>{switch(e){case 1:return 3;case 2:return 4;case 3:return 5;case 4:return 6;case 5:return 7;default:return 8}},fm=pm;var Kc=24;function ui(e){let t=new Uint32Array(Kc);return t[0]=1,{renderer:e,text:"",pending:"",tokens:t,len:0,token:1,fence_end:0,blockquote_idx:0,hr_char:"",hr_chars:0,fence_start:0,spaces:new Uint8Array(Kc),indent:"",indent_len:0,table_state:0}}function Yc(e){e.pending.length>0&&et(e,`
|
|
12
12
|
`)}function ve(e){e.text.length!==0&&(console.assert(e.len>0,"Never adding text to root"),e.renderer.add_text(e.renderer.data,e.text),e.text="")}function De(e){console.assert(e.len>0,"No nodes to end"),e.len-=1,e.token=e.tokens[e.len],e.renderer.end_token(e.renderer.data)}function he(e,t){(e.tokens[e.len]===24||e.tokens[e.len]===23)&&t!==25&&De(e),e.len+=1,e.tokens[e.len]=t,e.token=t,e.renderer.add_token(e.renderer.data,t)}function mm(e,t,n){for(;n<=e.len;){if(e.tokens[n]===t)return n;n+=1}return-1}function pn(e,t){for(e.fence_start=0;e.len>t;)De(e)}function Or(e,t){let n=0;for(let o=0;o<=e.len&&(t-=e.spaces[o],!(t<0));o+=1)switch(e.tokens[o]){case 9:case 10:case 20:case 25:n=o;break}for(;e.len>n;)De(e);return t}function si(e,t){let n=-1,o=-1;for(let r=e.blockquote_idx+1;r<=e.len;r+=1)if(e.tokens[r]===25){if(e.indent_len<e.spaces[r]){o=-1;break}o=r}else e.tokens[r]===t&&(n=r);return o===-1?n===-1?(pn(e,e.blockquote_idx),he(e,t),!0):(pn(e,n),!1):(pn(e,o),he(e,t),!0)}function li(e,t){he(e,25),e.spaces[e.len]=e.indent_len+t,Ht(e),e.token=103}function Ht(e){e.indent="",e.indent_len=0,e.pending=""}function di(e){switch(e){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return!0;default:return!1}}function gm(e){switch(e){case 32:case 58:case 59:case 41:case 44:case 33:case 46:case 63:case 93:case 10:return!0;default:return!1}}function vm(e){return di(e)||gm(e)}function et(e,t){for(let n of t){if(e.token===101){switch(n){case" ":e.indent_len+=1;continue;case" ":e.indent_len+=4;continue}let r=Or(e,e.indent_len);e.indent_len=0,e.token=e.tokens[e.len],r>0&&et(e," ".repeat(r))}let o=e.pending+n;switch(e.token){case 21:case 1:case 20:case 24:case 23:switch(console.assert(e.text.length===0,"Root should not have any text"),e.pending[0]){case void 0:e.pending=n;continue;case" ":console.assert(e.pending.length===1),e.pending=n,e.indent+=" ",e.indent_len+=1;continue;case" ":console.assert(e.pending.length===1),e.pending=n,e.indent+=" ",e.indent_len+=4;continue;case`
|
|
13
13
|
`:if(console.assert(e.pending.length===1),e.tokens[e.len]===25&&e.token===21){De(e),Ht(e),e.pending=n;continue}pn(e,e.blockquote_idx),Ht(e),e.blockquote_idx=0,e.fence_start=0,e.pending=n;continue;case"#":switch(n){case"#":if(e.pending.length<6){e.pending=o;continue}break;case" ":Or(e,e.indent_len),he(e,fm(e.pending.length)),Ht(e);continue}break;case">":{let a=mm(e,20,e.blockquote_idx+1);a===-1?(pn(e,e.blockquote_idx),e.blockquote_idx+=1,e.fence_start=0,he(e,20)):e.blockquote_idx=a,Ht(e),e.pending=n;continue}case"-":case"*":case"_":if(e.hr_chars===0&&(console.assert(e.pending.length===1,"Pending should be one character"),e.hr_chars=1,e.hr_char=e.pending),e.hr_chars>0){switch(n){case e.hr_char:e.hr_chars+=1,e.pending=o;continue;case" ":e.pending=o;continue;case`
|
|
14
14
|
`:if(e.hr_chars<3)break;Or(e,e.indent_len),e.renderer.add_token(e.renderer.data,22),e.renderer.end_token(e.renderer.data),Ht(e),e.hr_chars=0;continue}e.hr_chars=0}if(e.pending[0]!=="_"&&e.pending[1]===" "){si(e,23),li(e,2),et(e,o.slice(2));continue}break;case"`":if(e.pending.length<3){if(n==="`"){e.pending=o,e.fence_start=o.length;continue}e.fence_start=0;break}switch(n){case"`":e.pending.length===e.fence_start?(e.pending=o,e.fence_start=o.length):(he(e,2),Ht(e),e.fence_start=0,et(e,o));continue;case`
|