vendor: 4,725 bytes, line 1
1var ChatbotWidget=function(){"use strict";var e,t,n,i,r,o,a,l,s,c,u,_,d,f,p,h={},v=[],b=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,m=Array.isArray;function y(e,t){for(var n in t)e[n]=t[n];return e}function w(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function g(t,n,i){var r,o,a,l={};for(a in n)"key"==a?r=n[a]:"ref"==a?o=n[a]:l[a]=n[a];if(arguments.length>2&&(l.children=arguments.length>3?e.call(arguments,2):i),"function"==typeof t&&null!=t.defaultProps)for(a in t.defaultProps)void 0===l[a]&&(l[a]=t.defaultProps[a]);return x(t,l,r,o,null)}function x(e,i,r,o,a){var l={type:e,props:i,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==a?++n:a,__i:-1,__u:0};return null==a&&null!=t.vnode&&t.vnode(l),l}function k(e){return e.children}function S(e,t){this.props=e,this.context=t}function I(e,t){if(null==t)return e.__?I(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?I(e):null}function C(e){if(e.__P&&e.__d){var n=e.__v,i=n.__e,r=[],o=[],a=y({},n);a.__v=n.__v+1,t.vnode&&t.vnode(a),$(e.__P,a,n,e.__n,e.__P.namespaceURI,32&n.__u?[i]:null,r,null==i?I(n):i,!!(32&n.__u),o),a.__v=n.__v,a.__.__k[a.__i]=a,j(r,a,o),n.__e=n.__=null,a.__e!=i&&T(a)}}function T(e){if(null!=(e=e.__)&&null!=e.__c)return e.__e=e.__c.base=null,e.__k.some(function(t){if(null!=t&&null!=t.__e)return e.__e=e.__c.base=t.__e}),T(e)}function E(e){(!e.__d&&(e.__d=!0)&&r.push(e)&&!U.__r++||o!=t.debounceRendering)&&((o=t.debounceRendering)||a)(U)}function U(){try{for(var e,t=1;r.length;)r.length>t&&r.sort(l),e=r.shift(),t=r.length,C(e)}finally{r.length=U.__r=0}}function M(e,t,n,i,r,o,a,l,s,c,u){var _,d,f,p,b,y,w,g=i&&i.__k||v,S=t.length;for(s=function(e,t,n,i,r){var o,a,l,s,c,u=n.length,_=u,d=0;for(e.__k=new Array(r),o=0;o<r;o++)null!=(a=t[o])&&"boolean"!=typeof a&&"function"!=typeof a?("string"==typeof a||"number"==typeof a||"bigint"==typeof a||a.constructor==String?a=e.__k[o]=x(null,a,null,null,null):m(a)?a=e.__k[o]=x(k,{children:a},null,null,null):void 0===a.constructor&&a.__b>0?a=e.__k[o]=x(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):e.__k[o]=a,s=o+d,a.__=e,a.__b=e.__b+1,l=null,-1!=(c=a.__i=P(a,n,s,_))&&(_--,(l=n[c])&&(l.__u|=2)),null==l||null==l.__v?(-1==c&&(r>u?d--:r<u&&d++),"function"!=typeof a.type&&(a.__u|=4)):c!=s&&(c==s-1?d--:c==s+1?d++:(c>s?d--:d++,a.__u|=4))):e.__k[o]=null;if(_)for(o=0;o<u;o++)null!=(l=n[o])&&!(2&l.__u)&&(l.__e==i&&(i=I(l)),F(l,l));return i}(n,t,g,s,S),_=0;_<S;_++)null!=(f=n.__k[_])&&(d=-1!=f.__i&&g[f.__i]||h,f.__i=_,y=$(e,f,d,r,o,a,l,s,c,u),p=f.__e,f.ref&&d.ref!=f.ref&&(d.ref&&W(d.ref,null,f),u.push(f.ref,f.__c||p,f)),null==b&&null!=p&&(b=p),(w=!!(4&f.__u))||d.__k===f.__k?(s=N(f,s,e,w),w&&d.__e&&(d.__e=null)):"function"==typeof f.type&&void 0!==y?s=y:p&&(s=p.nextSibling),f.__u&=-7);return n.__e=b,s}function N(e,t,n,i){var r,o;if("function"==typeof e.type){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=N(r[o],t,n,i));return t}e.__e!=t&&(i&&(t&&e.type&&!t.parentNode&&(t=I(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8==t.nodeType);return t}function P(e,t,n,i){var r,o,a,l=e.key,s=e.type,c=t[n],u=null!=c&&!(2&c.__u);if(null===c&&null==l||u&&l==c.key&&s==c.type)return n;if(i>(u?1:0))for(r=n-1,o=n+1;r>=0||o<t.length;)if(null!=(c=t[a=r>=0?r--:o++])&&!(2&c.__u)&&l==c.key&&s==c.type)return a;return-1}function z(e,t,n){"-"==t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||b.test(t)?n:n+"px"}function H(e,t,n,i,r){var o,a;e:if("style"==t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof i&&(e.style.cssText=i=""),i)for(t in i)n&&t in n||z(e.style,t,"");if(n)for(t in n)i&&n[t]==i[t]||z(e.style,t,n[t])}else if("o"==t[0]&&"n"==t[1])o=t!=(t=t.replace(_,"$1")),a=t.toLowerCase(),t=a in e||"onFocusOut"==t||"onFocusIn"==t?a.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?i?n[u]=i[u]:(n[u]=d,e.addEventListener(t,o?p:f,o)):e.removeEventListener(t,o?p:f,o);else{if("http://www.w3.org/2000/svg"==r)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==n?"":n;break e}catch(l){}"function"==typeof n||(null==n||!1===n&&"-"!=t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==n?"":n))}}function D(e){return function(n){if(this.l){var i=this.l[n.type+e];if(null==n[c])n[c]=d++;else if(n[c]<i[u])return;return i(t.event?t.event(n):n)}}}function $(n,i,r,o,a,l,s,c,u,_){var d,f,p,b,g,x,C,T,E,U,N,P,z,D,$,j=i.type;if(void 0!==i.constructor)return null;128&r.__u&&(u=!!(32&r.__u),l=[c=i.__e=r.__e]),(d=t.__b)&&d(i);
vendor: 4,120 bytes, line 1
1e:if("function"==typeof j)try{if(T=i.props,E=j.prototype&&j.prototype.render,U=(d=j.contextType)&&o[d.__c],N=d?U?U.props.value:d.__:o,r.__c?C=(f=i.__c=r.__c).__=f.__E:(E?i.__c=f=new j(T,N):(i.__c=f=new S(T,N),f.constructor=j,f.render=O),U&&U.sub(f),f.state||(f.state={}),f.__n=o,p=f.__d=!0,f.__h=[],f._sb=[]),E&&null==f.__s&&(f.__s=f.state),E&&null!=j.getDerivedStateFromProps&&(f.__s==f.state&&(f.__s=y({},f.__s)),y(f.__s,j.getDerivedStateFromProps(T,f.__s))),b=f.props,g=f.state,f.__v=i,p)E&&null==j.getDerivedStateFromProps&&null!=f.componentWillMount&&f.componentWillMount(),E&&null!=f.componentDidMount&&f.__h.push(f.componentDidMount);else{if(E&&null==j.getDerivedStateFromProps&&T!==b&&null!=f.componentWillReceiveProps&&f.componentWillReceiveProps(T,N),i.__v==r.__v||!f.__e&&null!=f.shouldComponentUpdate&&!1===f.shouldComponentUpdate(T,f.__s,N)){i.__v!=r.__v&&(f.props=T,f.state=f.__s,f.__d=!1),i.__e=r.__e,i.__k=r.__k,i.__k.some(function(e){e&&(e.__=i)}),v.push.apply(f.__h,f._sb),f._sb=[],f.__h.length&&s.push(f);break e}null!=f.componentWillUpdate&&f.componentWillUpdate(T,f.__s,N),E&&null!=f.componentDidUpdate&&f.__h.push(function(){f.componentDidUpdate(b,g,x)})}if(f.context=N,f.props=T,f.__P=n,f.__e=!1,P=t.__r,z=0,E)f.state=f.__s,f.__d=!1,P&&P(i),d=f.render(f.props,f.state,f.context),v.push.apply(f.__h,f._sb),f._sb=[];else do{f.__d=!1,P&&P(i),d=f.render(f.props,f.state,f.context),f.state=f.__s}while(f.__d&&++z<25);f.state=f.__s,null!=f.getChildContext&&(o=y(y({},o),f.getChildContext())),E&&!p&&null!=f.getSnapshotBeforeUpdate&&(x=f.getSnapshotBeforeUpdate(b,g)),D=null!=d&&d.type===k&&null==d.key?R(d.props.children):d,c=M(n,m(D)?D:[D],i,r,o,a,l,s,c,u,_),f.base=i.__e,i.__u&=-161,f.__h.length&&s.push(f),C&&(f.__E=f.__=null)}catch(W){if(i.__v=null,u||null!=l)if(W.then){for(i.__u|=u?160:128;c&&8==c.nodeType&&c.nextSibling;)c=c.nextSibling;l[l.indexOf(c)]=null,i.__e=c}else{for($=l.length;$--;)w(l[$]);A(i)}else i.__e=r.__e,i.__k=r.__k,W.then||A(i);t.__e(W,i,r)}else null==l&&i.__v==r.__v?(i.__k=r.__k,i.__e=r.__e):c=i.__e=function(n,i,r,o,a,l,s,c,u){var _,d,f,p,v,b,y,g=r.props||h,x=i.props,k=i.type;if("svg"==k?a="http://www.w3.org/2000/svg":"math"==k?a="http://www.w3.org/1998/Math/MathML":a||(a="http://www.w3.org/1999/xhtml"),null!=l)for(_=0;_<l.length;_++)if((v=l[_])&&"setAttribute"in v==!!k&&(k?v.localName==k:3==v.nodeType)){n=v,l[_]=null;break}if(null==n){if(null==k)return document.createTextNode(x);n=document.createElementNS(a,k,x.is&&x),c&&(t.__m&&t.__m(i,l),c=!1),l=null}if(null==k)g===x||c&&n.data==x||(n.data=x);else{if(l="textarea"==k&&null!=x.defaultValue?null:l&&e.call(n.childNodes),!c&&null!=l)for(g={},_=0;_<n.attributes.length;_++)g[(v=n.attributes[_]).name]=v.value;for(_ in g)v=g[_],"dangerouslySetInnerHTML"==_?f=v:"children"==_||_ in x||"value"==_&&"defaultValue"in x||"checked"==_&&"defaultChecked"in x||H(n,_,null,v,a);for(_ in x)v=x[_],"children"==_?p=v:"dangerouslySetInnerHTML"==_?d=v:"value"==_?b=v:"checked"==_?y=v:c&&"function"!=typeof v||g[_]===v||H(n,_,v,g[_],a);if(d)c||f&&(d.__html==f.__html||d.__html==n.innerHTML)||(n.innerHTML=d.__html),i.__k=[];else if(f&&(n.innerHTML=""),M("template"==i.type?n.content:n,m(p)?p:[p],i,r,o,"foreignObject"==k?"http://www.w3.org/1999/xhtml":a,l,s,l?l[0]:r.__k&&I(r,0),c,u),null!=l)for(_=l.length;_--;)w(l[_]);c&&"textarea"!=k||(_="value","progress"==k&&null==b?n.removeAttribute("value"):null!=b&&(b!==n[_]||"progress"==k&&!b||"option"==k&&b!=g[_])&&H(n,_,b,g[_],a),_="checked",null!=y&&y!=n[_]&&H(n,_,y,g[_],a))}return n}(r.__e,i,r,o,a,l,s,u,_);return(d=t.diffed)&&d(i),128&i.__u?void 0:c}function A(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(A))}function j(e,n,i){for(var r=0;r<i.length;r++)W(i[r],i[++r],i[++r]);t.__c&&t.__c(n,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(e){e.call(n)})}catch(i){t.__e(i,n.__v)}})}function R(e){return"object"!=typeof e||null==e||e.__b>0?e:m(e)?e.map(R):void 0!==e.constructor?null:y({},e)}function W(e,n,i){try{if("function"==typeof e){var r="function"==typeof e.__u;r&&e.__u(),r&&null==n||(e.__u=e(n))}else e.current=n}catch(o){t.__e(o,i)}}function F(e,n,i){var r,o;
vendor: 1,352 bytes, line 1
1if(t.unmount&&t.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||W(r,null,n)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(a){t.__e(a,n)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&F(r[o],n,i||"function"!=typeof e.type);i||w(e.__e),e.__c=e.__=e.__e=void 0}function O(e,t,n){return this.constructor(e,n)}function L(n,i,r){var o,a,l;i==document&&(i=document.documentElement),t.__&&t.__(n,i),o=!1?null:i.__k,a=[],l=[],$(i,n=i.__k=g(k,null,[n]),o||h,h,i.namespaceURI,o?null:i.firstChild?e.call(i.childNodes):null,a,o?o.__e:i.firstChild,false,l),j(a,n,l)}e=v.slice,t={__e:function(e,t,n,i){for(var r,o,a;t=t.__;)if((r=t.__c)&&!r.__)try{if((o=r.constructor)&&null!=o.getDerivedStateFromError&&(r.setState(o.getDerivedStateFromError(e)),a=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(e,i||{}),a=r.__d),a)return r.__E=r}catch(l){e=l}throw e}},n=0,i=function(e){return null!=e&&void 0===e.constructor},S.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=y({},this.state),"function"==typeof e&&(e=e(y({},n),this.props)),e&&y(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),E(this))},S.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),E(this))},S.prototype.render=k,r=[],a="function"==typeof Promise?Promise.prototype.then.bind(Prom
1ise.resolve()):setTimeout,l=function(e,t){return e.__v.__b-t.__v.__b},U.__r=0,s=Math.random().toString(8),c="__d"+s,u="__a"+s,_=/(PointerCapture)$|Capture$/i,d=0,f=D(!1),p=D(!0);var K,B,Z,G,q=0,J=[],V=t,X=V.__b,Q=V.__r,Y=V.diffed,ee=V.__c,te=V.unmount,ne=V.__;function ie(e,t){V.__h&&V.__h(B,e,q||t),q=0;var n=B.__H||(B.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function re(e){return q=1,function(e,t){var n=ie(K++,2);if(n.t=e,!n.__c&&(n.__=[pe(void 0,t),function(e){var t=n.__N?n.__N[0]:n.__[0],i=n.t(t,e);t!==i&&(n.__N=[i,n.__[1]],n.__c.setState({}))}],n.__c=B,!B.__f)){var i=function(e,t,i){if(!n.__c.__H)return!0;var o=n.__c.__H.__.filter(function(e){return e.__c});if(o.every(function(e){return!e.__N}))return!r||r.call(this,e,t,i);var a=n.__c.props!==e;return o.some(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(a=!0)}}),r&&r.call(this,e,t,i)||a};B.__f=!0;var r=B.shouldComponentUpdate,o=B.componentWillUpdate;B.componentWillUpdate=function(e,t,n){if(this.__e){var a=r;r=void 0,i(e,t,n),r=a}o&&o.call(this,e,t,n)},B.shouldComponentUpdate=i}return n.__N||n.__}(pe,e)}function oe(e,t){var n=ie(K++,3);!V.__s&&fe(n.__H,t)&&(n.__=e,n.u=t,B.__H.__h.push(n))}function ae(e){return q=5,le(function(){return{current:e}},[])}function le(e,t){var n=ie(K++,7);return fe(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function se(){for(var e;e=J.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(_e),t.__h.some(de),t.__h=[]}catch(n){t.__h=[],V.__e(n,e.__v)}}}V.__b=function(e){B=null,X&&X(e)},V.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),ne&&ne(e,t)},V.__r=function(e){Q&&Q(e),K=0;var t=(B=e.__c).__H;t&&(Z===B?(t.__h=[],B.__h=[],t.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.some(_e),t.__h.some(de),t.__h=[],K=0)),Z=B},V.diffed=function(e){Y&&Y(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==J.push(t)&&G===V.requestAnimationFrame||((G=V.requestAnimationFrame)||ue)(se)),t.__H.__.some(function(e){e.u&&(e.__H=e.u),e.u=void 0})),Z=B=null},V.__c=function(e,t){t.some(function(e){try{e.__h.some(_e),e.__h=e.__h.filter(function(e){return!e.__||de(e)})}catch(n){t.some(function(e){e.__h&&(e.__h=[])}),t=[],V.__e(n,e.__v)}}),ee&&ee(e,t)},V.unmount=function(e){te&&te(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(e){try{_e(e)}catch(n){t=n}}),n.__H=void 0,t&&V.__e(t,n.__v))};var ce="function"==typeof requestAnimationFrame;function ue(e){var t,n=function(){clearTimeout(i),ce&&cancelAnimationFrame(t),setTimeout(e)},i=setTimeout(n,35);ce&&(t=requestAnimationFrame(n))}function _e(e){var t=B,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),B=t}function de(e){var t=B;e.__c=e.__(),B=t}function fe(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function pe(e,t){return"function"==typeof t?t(e):t}var he=Symbol.for("preact-signals");function ve(){if(ge>1)ge--;else{var e,t=!1;for(!function(){var e=ke;for(ke=void 0;void 0!==e;)e.S.v===e.v&&(e.S.i=e.i),e=e.o}();void 0!==we;){var n=we;for(we=void 0,xe++;void 0!==n;){var i=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&Ee(n))try{n.c()}catch(r){t||(e=r,t=!0)}n=i}}if(xe=0,ge--,t)throw e}}var be=void 0;function me(e){var t=be;be=void 0;try{return e()}finally{be=t}}var ye,we=void 0,ge=0,xe=0,ke=void 0,Se=0;function Ie(e){if(void 0!==be){var t=e.n;if(void 0===t||t.t!==be)return t={i:0,S:e,p:be.s,n:void 0,t:be,e:void 0,x:void 0,r:t}
1,void 0!==be.s&&(be.s.n=t),be.s=t,e.n=t,32&be.f&&e.S(t),t;if(-1===t.i)return t.i=0,void 0!==t.n&&(t.n.p=t.p,void 0!==t.p&&(t.p.n=t.n),t.p=be.s,t.n=void 0,be.s.n=t,be.s=t),t}}function Ce(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=null==t?void 0:t.watched,this.Z=null==t?void 0:t.unwatched,this.name=null==t?void 0:t.name}function Te(e,t){return new Ce(e,t)}function Ee(e){for(var t=e.s;void 0!==t;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function Ue(e){for(var t=e.s;void 0!==t;t=t.n){var n=t.S.n;if(void 0!==n&&(t.r=n),t.S.n=t,t.i=-1,void 0===t.n){e.s=t;break}}}function Me(e){for(var t=e.s,n=void 0;void 0!==t;){var i=t.p;-1===t.i?(t.S.U(t),void 0!==i&&(i.n=t.n),void 0!==t.n&&(t.n.p=i)):n=t,t.S.n=t.r,void 0!==t.r&&(t.r=void 0),t=i}e.s=n}function Ne(e,t){Ce.call(this,void 0),this.x=e,this.s=void 0,this.g=Se-1,this.f=4,this.W=null==t?void 0:t.watched,this.Z=null==t?void 0:t.unwatched,this.name=null==t?void 0:t.name}function Pe(e){var t=e.m;if(e.m=void 0,"function"==typeof t){ge++;var n=be;be=void 0;try{t()}catch(i){throw e.f&=-2,e.f|=8,ze(e),i}finally{be=n,ve()}}}function ze(e){for(var t=e.s;void 0!==t;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Pe(e)}function He(e){if(be!==this)throw new Error("Out-of-order effect");Me(this),be=e,this.f&=-2,8&this.f&&ze(this),ve()}function De(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=null==t?void 0:t.name}function $e(e,t){var n=new De(e,t);try{n.c()}catch(r){throw n.d(),r}var i=n.d.bind(n);return i[Symbol.dispose]=i,i}function Ae(e,n){t[e]=n.bind(null,t[e]||function(){})}function je(e){if(ye){var t=ye;ye=void 0,t()}ye=e&&e.S()}function Re(e){var t=this,n=e.data,r=function(e){return le(function(){return Te(e)},[])}(n);r.value=n;var o=le(function(){for(var e=t.__v;e=e.__;)if(e.__c){e.__c.__$f|=4;break}return t.__$u.c=function(){var e,n=t.__$u.S(),r=o.value;n(),i(r)||3!==(null==(e=t.base)?void 0:e.nodeType)?(t.__$f|=1,t.setState({})):t.base.data=r},function(e,t){return new Ne(e,t)}(function(){var e=r.value.value;return 0===e?0:!0===e?"":e||""})},[]);return o.value}function We(e,t,n,i){var r=t in e&&void 0===e.ownerSVGElement,o=Te(n);return{o:function(e,t){o.value=e,i=t},d:$e(function(){var n=o.value.value;i[t]!==n&&(i[t]=n,r?e[t]=n:n?e.setAttribute(t,n):e.removeAttribute(t))})}}Ce.prototype.brand=he,Ce.prototype.h=function(){return!0},Ce.prototype.S=function(e){var t=this,n=this.t;n!==e&&void 0===e.e&&(e.x=n,this.t=e,void 0!==n?n.e=e:me(function(){var e;null==(e=t.W)||e.call(t)}))},Ce.prototype.U=function(e){var t=this;if(void 0!==this.t){var n=e.e,i=e.x;void 0!==n&&(n.x=i,e.e=void 0),void 0!==i&&(i.e=n,e.x=void 0),e===this.t&&(this.t=i,void 0===i&&me(function(){var e;null==(e=t.Z)||e.call(t)}))}},Ce.prototype.subscribe=function(e){var t=this;return $e(function(){var n=t.value,i=be;be=void 0;try{e(n)}finally{be=i}},{name:"sub"})},Ce.prototype.valueOf=function(){return this.value},Ce.prototype.toString=function(){return this.value+""},Ce.prototype.toJSON=function(){return this.value},Ce.prototype.peek=function(){var e=this;return me(function(){return e.value})},Object.defineProperty(Ce.prototype,"value",{get:function(){var e=Ie(this);return void 0!==e&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(xe>100)throw new Error("Cycle detected");n=this,0!==ge&&0===xe&&0!==n.l&&(n.l=0,ke={S:n,v:n.v,i:n.i,o:ke}),this.v=e,this.i++,Se++,ge++;try{for(var t=this.t;void 0!==t;t=t.x)t.t.N()}finally{ve()}}var n}}),Ne.prototype=new Ce,Ne.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if(32==(36&this.f))return!0;if(this.f&=-5,this.g===Se)return!0;if(this.g=Se,this.f|=1,this.i>0&&!Ee(this))return this.f&=-2,!0;var e=be;try{Ue(this),be=this;var t=this.x();(16&this.f||this.v!==t||0===this.i)&&(this.v=t,this.f&=-17,this.i++)}catch(n){this.v=n,this.f|=16,this.i++}return be=e,Me(this),this.f&=-2,!0},Ne.prototype.S=function(e){if(void 0===this.t){this.f|=36;for(var t=this.s;void 0!==t;t=t.n)t.S.S(t)}Ce.prototype.S.call(this,e)},Ne.prototype.U=function(e){if(void 0!==this.t&&(Ce.prototype.U.call(this,e),void 0===this.t)){this.f&=-33;for(var t=this.s;void 0!==t;t=t.n)t.S.U(t)}},Ne.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;void 0!==e;e=e.x)e.t.N()}},Object.defineProperty(Ne.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=Ie(this);if(this.h(),void 0!==e&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),De.prototype.c=function(){var e=this.S();try{if(8&this.f)return;if(void 0===this.x)return;var t=this.x();"function"==typeof t&&(this.m=t)}finally{e()}},De.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Pe(this),Ue(this),ge++;var e=be;return be=this,He.bind(this,e)},De.prototype.N=function(){2&this.f||(this.f|=2,this.u=we,we=this)},De.prototype.d=function(){this.f|=8,1&this.f||ze(this)},De.prototype.dispose=function(){this.d()},Re.displayName="_st",Object.defineProperties(Ce.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:Re},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),Ae("__b",function(e,t){if("string"==typeof t.type){var n,i=t.props;for(var r in i)if("children"!==r){var o=i[r];o instanceof Ce&&(n||(t.__np=n={}),n[r]=o,i[r]=o.peek())}}e(t)}),Ae("__r",function(e,t){e(t),je();var n,i,r=t.__c;r&&(r.__$f&=-2,void 0===(n=r.__$u)&&(r.__$u=($e(function(){i=this}),i.c=function(){r.__$f|=1,r.setState({})},n=i))),je(n)}),Ae("__e",function(e,t,n,i){je(),e(t,n,i)}),Ae("diffed",function(e,t){var n;if(je(),"string"==typeof t.type&&(n=t.__e)){var i=t.__np,r=t.props;if(i){var o=n.U;if(o)for(var a in o){var l=o[a];void 0===l||a in i||(l.d(),o[a]=void 0)}else n.U=o={};for(var s in i){var c=o[s],u=i[s];void 0===c?(c=We(n,s,u,r),o[s]=c):c.o(u,r)}}}e(t)}),Ae("unmount",function(e,t){if("string"==typeof t.type){var n=t.__e;if(n){var i=n.U;if(i)for(var r in n.U=void 0,i){var o=i[r];o&&o.d()}}}else{var a=t.__c;if(a){var l=a.__$u;l&&(a.__$u=void 0,l.d())}}e(t)}),Ae("__h",function(e,t,n,i){(i<3||9===i)&&(t.__$f|=2),e(t,n,i)}),S.prototype.shouldComponentUpdate=function(e,t){if(this.__R)return!0;var n=this.__$u,i=n&&void 0!==n.s;for(var r in t)return!0;
1if(this.__f||"boolean"==typeof this.u&&!0===this.u){if(!(i||2&this.__$f||4&this.__$f))return!0;if(1&this.__$f)return!0}else{if(!(i||4&this.__$f))return!0;if(3&this.__$f)return!0}for(var o in e)if("__source"!==o&&e[o]!==this.props[o])return!0;for(var a in this.props)if(!(a in e))return!0;return!1};var Fe=0;function Oe(e,n,i,r,o,a){n||(n={});var l,s,c=n;if("ref"in c)for(s in c={},n)"ref"==s?l=n[s]:c[s]=n[s];var u={type:e,props:c,key:i,ref:l,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Fe,__i:-1,__u:0,__source:o,__self:a};if("function"==typeof e&&(l=e.defaultProps))for(s in l)void 0===c[s]&&(c[s]=l[s]);return t.vnode&&t.vnode(u),u}class Le extends Error{constructor(e="Network error"){super(e),this.kind="network",this.name="NetworkError"}}class Ke extends Error{constructor(e="Request timed out"){super(e),this.kind="timeout",this.name="TimeoutError"}}class Be extends Error{constructor(){super("Session not found (404)"),this.kind="404",this.name="ApiError404"}}class Ze extends Error{constructor(e="Internal server error"){super(e),this.kind="500",this.name="ApiError500",this.detail=e}}class Ge extends Error{constructor(e="Service unavailable"){super(e),this.kind="503",this.name="ApiError503",this.detail=e}}const qe=25e3;class Je{constructor(e,t,n=25e3){var i;this.baseUrl=e,this.apiKey=t,this.timeoutMs="number"==typeof(i=n)&&Number.isFinite(i)&&i>0?i:qe}async sendMessage(e){var t,n;const i=new AbortController,r=setTimeout(()=>i.abort(),this.timeoutMs);try{const r=await fetch(`${this.baseUrl}/api/chat`,{method:"POST",headers:{"Content-Type":"application/json","X-Api-Key":this.apiKey},body:JSON.stringify(e),signal:i.signal});if(404===r.status)throw new Be;if(503===r.status){const e=await r.json().catch(()=>({}));throw new Ge(null!=(t=null==e?void 0:e.detail)?t:"Service unavailable")}if(r.status>=500){const e=await r.json().catch(()=>({}));throw new Ze(null!=(n=null==e?void 0:e.detail)?n:"Internal server error")}return await r.json()}
1catch(o){if(o instanceof Be||o instanceof Ze||o instanceof Ge)throw o;if(o instanceof Error&&"AbortError"===o.name)throw new Ke(`Request timed out after ${this.timeoutMs}ms`);throw new Le(o instanceof Error?o.message:"Network error")}finally{clearTimeout(r)}}}class Ve{constructor(e){this.storageKey=`chatbot_session_${e}`,this.messagesStorageKey=`chatbot_messages_${e}`}getSessionId(){return localStorage.getItem(this.storageKey)}saveSessionId(e){localStorage.setItem(this.storageKey,e)}clearSessionId(){localStorage.removeItem(this.storageKey)}saveMessages(e){const t=e.slice(-20);localStorage.setItem(this.messagesStorageKey,JSON.stringify(t))}getMessages(){const e=localStorage.getItem(this.messagesStorageKey);if(!e)return[];try{return JSON.parse(e).map(e=>"timestamp"in e?{...e,timestamp:new Date(e.timestamp)}:e)}catch{return[]}}clearMessages(){localStorage.removeItem(this.messagesStorageKey)}}function Xe({isOpen:e,unreadCount:t,chatTitle:n,iconUrl:i,position:r,zIndex:o,onToggle:a}){return oe(()=>{if(e)return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t);function t(e){"Escape"===e.key&&a()}},[e,a]),Oe("div",{class:`cbw-launcher-wrapper cbw-launcher-wrapper--${r}`,style:{zIndex:o},children:Oe("button",{class:`cbw-launcher cbw-launcher--${r}`,onClick:a,"aria-label":e?"Cerrar chat":"Abrir chat","aria-expanded":e,"aria-haspopup":"dialog",title:e?void 0:n,children:[e?Oe("span",{class:"cbw-launcher__close-icon","aria-hidden":"true",children:"â"}):Oe("img",{src:i,alt:n,class:"cbw-launcher__icon",width:"32",height:"32"}),!e&&t>0&&Oe("span",{class:"cbw-badge","aria-label":`${t} mensajes no leÃdos`,children:t})]})})}function Qe({isOpen:e,position:t,zIndex:n,chatTitle:i,children:r}){const o=ae(null);return oe(()=>{if(!e||!o.current)return;const t=o.current,n=t.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),i=n[0],r=n[n.length-1];function a(e){"Tab"===e.key&&(e.shiftKey?document.activeElement===i&&(e.preventDefault(),null==r||r.focus()):document.activeElement===r&&(e.preventDefault(),null==i||i.focus()))}return t.addEventListener("keydown",a),null==i||i.focus(),()=>t.removeEventListener("keydown",a)},[e]),e?Oe("div",{ref:o,class:`cbw-chat-window cbw-chat-window--${t}`,style:{zIndex:n},role:"dialog","aria-label":i,"aria-modal":"true",children:r}):null}function Ye({chatTitle:e,iconUrl:t,onClose:n}){return Oe("header",{class:"cbw-header",children:[Oe("img",{src:t,alt:"",class:"cbw-header__icon",width:"32",height:"32","aria-hidden":"true"}),Oe("span",{class:"cbw-header__title",children:e}),Oe("button",{class:"cbw-header__close",onClick:n,"aria-label":"Cerrar chat",children:"â"})]})}function et({buttons:e,disabled:t,onSelect:n}){return Oe("div",{class:"cbw-button-group",children:e.map(e=>Oe("button",{class:"cbw-option-btn"+(t?" cbw-option-btn--disabled":""),disabled:t,"aria-pressed":t?"true":void 0,onClick:()=>!t&&n(e.id,e.label),children:e.label},e.id))})}const tt=/\[([^\]]+)\]\((https?:\/\/[^\s)]+)\)/g;function nt(e){const t=[];let n,i=0;for(tt.lastIndex=0;null!==(n=tt.exec(e));)n.index>i&&t.push(e.slice(i,n.index)),t.push({label:n[1],url:n[2]}),i=n.index+n[0].length;return i<e.length&&t.push(e.slice(i)),t}function it(e){return"buttons"in e}function rt(e){const t=e.text.split("\n");return Oe("div",{class:"cbw-bubble cbw-bubble--bot",children:[Oe("div",{class:"cbw-bubble__text",children:t.map((e,n)=>Oe("span",{children:[nt(e).map((e,t)=>"string"==typeof e?e:Oe("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",class:"cbw-bubble__link",children:e.label},t)),n<t.length-1&&Oe("br",{})]},n))}),Oe("span",{class:"cbw-bubble__timestamp",children:(n=e.timestamp,n.toLocaleTimeString("es-MX",{hour:"2-digit",minute:"2-digit"}))}),it(e)&&e.buttons.length>0&&Oe(et,{buttons:e.buttons,disabled:e.buttonsDisabled,onSelect:e.onButtonClick})]});var n}function ot({text:e,timestamp:t}){const n=e.split("\n");return Oe("div",{class:"cbw-bubble cbw-bubble--user",children:[n.map((e,t)=>Oe("span",{children:[e,t<n.length-1&&Oe("br",{})]},t)),Oe("span",{class:"cbw-bubble__timestamp",children:(i=t,i.toLocaleTimeString("es-MX",{hour:"2-digit",minute:"2-digit"}))})]});var i}function at({text:e,canRetry:t,onRetry:n}
1){return Oe("div",{class:"cbw-system-msg",children:[Oe("span",{children:e}),t&&n&&Oe("div",{children:Oe("button",{class:"cbw-retry-btn",onClick:n,children:"Reintentar"})})]})}function lt(){return Oe("div",{class:"cbw-typing","aria-label":"Escribiendo...",children:[Oe("span",{class:"cbw-typing__dot"}),Oe("span",{class:"cbw-typing__dot"}),Oe("span",{class:"cbw-typing__dot"})]})}function st({messages:e,isTyping:t,onRetry:n,onButtonClick:i}){const r=ae(null);return oe(()=>{r.current&&(r.current.scrollTop=r.current.scrollHeight)},[e,t]),Oe("div",{class:"cbw-message-list",ref:r,"aria-live":"polite","aria-relevant":"additions",children:[e.map((e,t)=>"bot-text"===e.kind?Oe(rt,{text:e.text,timestamp:e.timestamp},t):"bot-buttons"===e.kind?Oe(rt,{text:e.text,buttons:e.buttons,buttonsDisabled:e.buttonsDisabled,timestamp:e.timestamp,onButtonClick:i},t):"user"===e.kind?Oe(ot,{text:e.text,timestamp:e.timestamp},t):"system"===e.kind?Oe(at,{text:e.text,canRetry:e.canRetry,onRetry:e.retryPayload?()=>n(t,e.retryPayload):void 0},t):null),t&&Oe(lt,{})]})}function ct({disabled:e,onSend:t}){const[n,i]=re(""),r=ae(null);function o(){const e=n.trim();e&&(t(e),i(""),r.current&&(r.current.style.height="auto"))}return Oe("div",{class:"cbw-input-area",children:[Oe("textarea",{ref:r,class:"cbw-input",rows:1,value:n,onInput:function(e){const t=e.target;var n;i(t.value),(n=t)&&(n.style.height="auto",n.style.height=`${n.scrollHeight}px`)},onKeyDown:function(e){"Enter"!==e.key||e.shiftKey||(e.preventDefault(),o())},disabled:e,"aria-label":"Escribe tu mensaje",placeholder:"Escribe tu mensaje..."}),Oe("button",{class:"cbw-send-btn",onClick:o,disabled:e,"aria-label":"Enviar",children:"â¤"})]})}function ut({onNewConversation:e}){return Oe("div",{class:"cbw-finished",children:[Oe("p",{children:"Conversación finalizada"}),Oe("button",{class:"cbw-new-conv-btn",onClick:e,children:"Nueva conversación"})]})}function _t({config:e,externalIsOpen:t}){const{isOpen:n,isTyping:i,messages:r,isFinished:o,unreadCount:a,handleToggle:l,handleClose:s,handleSend:c,handleButtonClick:u,handleRetry:_,handleNewConversation:d}=le(()=>function(e,t){const n=new Je(e.apiUrl,e.apiKey,e.requestTimeoutMs),i=new Ve(e.apiKey),r=null!=t?t:Te(!1),o=Te(!1),a=Te(i.getMessages()),l=Te(!1),s=Te(0),c=Te(null);function u(e){a.value=e,i.saveMessages(e)}async function _(t,d=!0){d&&"start"!==t&&u([...a.value,{kind:"user",text:t,timestamp:new Date}]),o.value=!0,c.value=null;try{const o=await n.sendMessage({session_id:i.getSessionId(),user_id:e.userId,channel:"web",payload:t});i.saveSessionId(o.session_id);const c=o.messages.map(e=>{var t;return"buttons"===e.type?{kind:"bot-buttons",text:e.text,buttons:null!=(t=e.buttons)?t:[],buttonsDisabled:!1,timestamp:new Date}:{kind:"bot-text",text:e.text,timestamp:new Date}});u([...a.value,...c]),o.is_finished&&(l.value=!0),r.value||(s.value+=c.length)}catch(f){if(f instanceof Be)return i.clearSessionId(),i.clearMessages(),u([...a.value,{kind:"system",text:"Tu sesión expiró. Iniciando nueva conversación...",canRetry:!1}]),void(await _("start",!1));c.value=t;const e=f instanceof Error?f.message:"Error desconocido",n=f instanceof Ke?"La operación está tardando más de lo normal. Por favor intenta de nuevo en un momento.":f instanceof Le?"Sin conexión. Revisa tu internet e intenta de nuevo.":`Error del servidor: ${e}`;u([...a.value,{kind:"system",text:n,canRetry:!0,retryPayload:t}])}finally{o.value=!1}}function d(){r.value=!0,s.value=0,0!==a.value.length||l.value||_("start",!1)}function f(){r.value=!1,setTimeout(()=>{const e=document.querySelector(".cbw-launcher");null==e||e.focus()},50)}return{isOpen:r,isTyping:o,messages:a,isFinished:l,unreadCount:s,handleOpen:d,handleClose:f,handleToggle:function(){r.value?f():d()},handleSend:function(e){o.value||_(e)},handleButtonClick:function(e,t){u(a.value.map(e=>"bot-buttons"!==e.kind||e.buttonsDisabled?e:{...e,buttonsDisabled:!0})),_(e,!1)},handleRetry:function(e,t){!o.value&&t&&(u(a.value.map((t,n)=>n===e&&"system"===t.kind?{...t,canRetry:!1}:t)),_(t,!1))},handleNewConversation:function(){i.clearSessionId(),i.clearMessages(),u([]),l.value=!1,_("start",!1)}}}(e,t),[]);
1return Oe("div",{children:[Oe(Xe,{isOpen:n.value,unreadCount:a.value,chatTitle:e.chatTitle,iconUrl:e.iconUrl,position:e.position,zIndex:e.zIndex,onToggle:l}),n.value&&Oe(Qe,{isOpen:n.value,position:e.position,zIndex:e.zIndex,chatTitle:e.chatTitle,children:[Oe(Ye,{chatTitle:e.chatTitle,iconUrl:e.iconUrl,onClose:s}),o.value?Oe(ut,{onNewConversation:d}):Oe(k,{children:[Oe(st,{messages:r.value,isTyping:i.value,onRetry:_,onButtonClick:u}),Oe(ct,{disabled:i.value,onSend:c})]})]})]})}let dt=null;let ft=null;let pt=null;const ht=Te(!1);let vt=null;return{init(e){pt?console.warn("[ChatbotWidget] Already initialized. Call destroy() first."):(vt=function(e){var t,n,i,r,o,a,l,s,c,u,_;return{apiUrl:(null!=(n=null!=(t=e.apiUrl)?t:void 0)?n:"").replace(/\/+$/,""),apiKey:e.apiKey,userId:null!=(i=e.userId)?i:null,chatTitle:null!=(r=e.chatTitle)?r:"Asistente",iconUrl:null!=(o=e.iconUrl)?o:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiI+PGNpcmNsZSBjeD0iMTYiIGN5PSIxNiIgcj0iMTYiIGZpbGw9IiMwMDU3QjgiLz48cmVjdCB4PSI4IiB5PSIxMSIgd2lkdGg9IjE2IiBoZWlnaHQ9IjIiIGZpbGw9IndoaXRlIi8+PHJlY3QgeD0iOCIgeT0iMTUiIHdpZHRoPSIxMiIgaGVpZ2h0PSIyIiBmaWxsPSJ3aGl0ZSIvPjxyZWN0IHg9IjgiIHk9IjE5IiB3aWR0aD0iMTAiIGhlaWdodD0iMiIgZmlsbD0id2hpdGUiLz48L3N2Zz4=",primaryColor:null!=(a=e.primaryColor)?a:"#0066cc",textColor:null!=(l=e.textColor)?l:"#FFFFFF",position:null!=(s=e.position)?s:"bottom-right",theme:null!=(c=e.theme)?c:"auto",zIndex:null!=(u=e.zIndex)?u:9999,requestTimeoutMs:(_=e.requestTimeoutMs,"number"==typeof _&&Number.isFinite(_)&&_>0?_:qe)}}(e),function(e){if("undefined"!=typeof window&&"https:"===window.location.protocol&&e.startsWith("http://"))throw console.error("[ChatbotWidget] Configuration error: apiUrl must use HTTPS when the page is served over HTTPS (mixed content blocked by browser). Widget will not initialize."),new Error("ChatbotWidget: apiUrl must use HTTPS on an HTTPS page")}(vt.apiUrl),pt=document.createElement("div"),pt.id="cbw-root",document.body.appendChild(pt),dt||(dt=document.createElement("style"),dt.id="cbw-styles",dt.textContent="#cbw-root{--cbw-primary: #0066cc;--cbw-text: #ffffff;--cbw-z: 9999;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-size:14px;line-height:1.4;box-sizing:border-box}#cbw-root *,#cbw-root *:before,#cbw-root *:after{box-sizing:inherit}.cbw-launcher{position:fixed;bottom:20px;right:20px;z-index:var(--cbw-z);width:56px;height:56px;border-radius:50%;background-color:var(--cbw-primary);border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 12px #0003;transition:transform .2s}.cbw-launcher:hover{transform:scale(1.05)}.cbw-launcher--left{right:auto;left:20px}.cbw-chat-window{position:fixed;bottom:88px;right:20px;z-index:var(--cbw-z);width:420px;max-width:calc(100vw - 40px);height:680px;max-height:calc(100vh - 108px);display:flex;flex-direction:column;background:#fff;border-radius:16px;box-shadow:0 8px 32px #0000001f;overflow:hidden}.cbw-chat-window[data-open=false]{display:none}.cbw-chat-window--left{right:auto;left:20px}.cbw-header{display:flex;align-items:center;gap:10px;padding:12px 16px;background:var(--cbw-primary);color:var(--cbw-text);flex-shrink:0}.cbw-header__icon{width:32px;height:32px;border-radius:50%}.cbw-header__title{flex:1;font-weight:600;font-size:15px}.cbw-header__close{background:none;border:none;color:var(--cbw-text);cursor:pointer;padding:4px;display:flex;align-items:center;justify-content:center;border-radius:4px;opacity:.8}.cbw-header__close:hover{opacity:1}.cbw-message-list{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:8px}.cbw-bubble{max-width:80%;padding:10px 14px;border-radius:16px;word-break:break-word}.cbw-bubble--bot{background:#f0f2f5;color:#1a1a1a;align-self:flex-start;border-bottom-left-radius:4px}.cbw-bubble--user{background:var(--cbw-primary);color:var(--cbw-text);align-self:flex-end;border-bottom-right-radius:4px}.cbw-bubble__timestamp{font-size:11px;opacity:.6;margin-top:4px;display:block}.cbw-bubble__link{color:var(--cbw-primary);text-decoration:underline}.cbw-bubble__link:hover{text-decoration:none}
1.cbw-button-group{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}.cbw-option-btn{padding:8px 16px;border:2px solid var(--cbw-primary);border-radius:20px;background:#fff;color:var(--cbw-primary);cursor:pointer;font-size:13px;transition:background .15s,color .15s}.cbw-option-btn:hover:not(:disabled){background:var(--cbw-primary);color:var(--cbw-text)}.cbw-option-btn:disabled{opacity:.5;cursor:default}@media(max-width:400px){.cbw-button-group{flex-direction:column}}.cbw-typing{display:flex;gap:4px;align-items:center;padding:10px 14px;align-self:flex-start}.cbw-typing__dot{width:8px;height:8px;border-radius:50%;background:#bbb;animation:cbw-bounce 1.2s infinite}.cbw-typing__dot:nth-child(2){animation-delay:.2s}.cbw-typing__dot:nth-child(3){animation-delay:.4s}@keyframes cbw-bounce{0%,80%,to{transform:scale(.8);opacity:.5}40%{transform:scale(1);opacity:1}}.cbw-system-msg{align-self:center;font-size:12px;color:#666;padding:6px 12px;background:#f9f9f9;border-radius:8px;text-align:center}.cbw-retry-btn{display:inline-block;margin-top:6px;padding:4px 12px;border:1px solid #ddd;border-radius:12px;background:#fff;cursor:pointer;font-size:12px;color:var(--cbw-primary)}.cbw-input-area{display:flex;align-items:center;gap:8px;padding:12px 16px;border-top:1px solid #eee;flex-shrink:0}.cbw-input{flex:1;border:1px solid #ddd;border-radius:20px;padding:8px 16px;font-size:14px;outline:none;resize:none;max-height:80px;overflow-y:auto;font-family:inherit;scrollbar-width:none;-ms-overflow-style:none}.cbw-input::-webkit-scrollbar{display:none;width:0;height:0}.cbw-input:focus{border-color:var(--cbw-primary)}.cbw-send-btn{width:40px;height:40px;border-radius:50%;background:var(--cbw-primary);color:var(--cbw-text);border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0}.cbw-send-btn:disabled{opacity:.5;cursor:default}.cbw-finished{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;padding:24px;text-align:center;color:#444}.cbw-new-conv-btn{padding:10px 24px;border-radius:20px;background:var(--cbw-primary);color:var(--cbw-text);border:none;cursor:pointer;font-size:14px}.cbw-badge{position:absolute;top:-4px;right:-4px;background:#e53e3e;color:#fff;width:18px;height:18px;border-radius:50%;font-size:11px;display:flex;align-items:center;justify-content:center}[data-cbw-theme=dark] #cbw-root{--cbw-bg: #1a1a2e;--cbw-surface: #16213e;--cbw-border: #2a2a4a;--cbw-text-main: #e0e0e0}[data-cbw-theme=dark] .cbw-chat-window{background:var(--cbw-bg, #1a1a2e);color:var(--cbw-text-main, #e0e0e0)}[data-cbw-theme=dark] .cbw-header{background:var(--cbw-primary)}[data-cbw-theme=dark] .cbw-message-list{background:var(--cbw-bg, #1a1a2e)}[data-cbw-theme=dark] .cbw-bubble--bot{background:var(--cbw-surface, #16213e);color:var(--cbw-text-main, #e0e0e0)}[data-cbw-theme=dark] .cbw-input-area{background:var(--cbw-surface, #16213e);border-top-color:var(--cbw-border, #2a2a4a)}[data-cbw-theme=dark] .cbw-input{background:var(--cbw-surface, #16213e);color:var(--cbw-text-main, #e0e0e0);border-color:var(--cbw-border, #2a2a4a)}[data-cbw-theme=dark] .cbw-system-msg{background:var(--cbw-bg, #1a1a2e);color:var(--cbw-text-main, #e0e0e0)}",document.head.appendChild(dt)),function(e,t){e.style.setProperty("--cbw-primary",t.primaryColor),e.style.setProperty("--cbw-text",t.textColor),e.style.setProperty("--cbw-z",String(t.zIndex))}(pt,vt),function(e,t){if(ft&&(ft(),ft=null),"auto"===t){const t=window.matchMedia("(prefers-color-scheme: dark)"),n=t=>{e.setAttribute("data-cbw-theme",t.matches?"dark":"light")};n(t),t.addEventListener("change",n),ft=()=>t.removeEventListener("change",n)}else e.setAttribute("data-cbw-theme",t)}(pt,vt.theme),L(g(_t,{config:vt,externalIsOpen:ht}),pt))},open(){pt&&(ht.value=!0)},close(){pt&&(ht.value=!1)},destroy(){pt&&(ft&&(ft(),ft=null),L(null,pt),pt.remove(),pt=null,null==dt||dt.remove(),dt=null,ht.value=!1,vt=null)}}}();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.