@ibiz-template-plugin/ai-chat 0.0.2 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- !function(){function t(t){return function(t){if(Array.isArray(t))return e(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,n){if(!t)return;if("string"==typeof t)return e(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return e(t,n)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function e(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function n(t,e){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},n(t,e)}function r(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=o(t);if(e){var a=o(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===s(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return i(t)}(this,n)}}function i(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function o(t){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},o(t)}function a(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */a=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},c=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function f(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,n){return t[e]=n}}function h(t,e,n,r){var o=e&&e.prototype instanceof g?e:g,a=Object.create(o.prototype),c=new H(r||[]);return i(a,"_invoke",{value:A(t,n,c)}),a}function _(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var v="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function g(){}function b(){}function w(){}var k={};f(k,c,(function(){return this}));var x=Object.getPrototypeOf,S=x&&x(x(T([])));S&&S!==n&&r.call(S,c)&&(k=S);var E=w.prototype=g.prototype=Object.create(k);function N(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function C(t,e){function n(i,o,a,c){var u=_(t[i],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==s(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,c)}))}c(u.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function A(e,n,r){var i=v;return function(o,a){if(i===d)throw new Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var c=r.delegate;if(c){var u=O(c,r);if(u){if(u===m)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===v)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var s=_(e,n,r);if("normal"===s.type){if(i=r.done?y:p,s.arg===m)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(i=y,r.method="throw",r.arg=s.arg)}}}function O(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,O(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=_(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function H(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function T(e){if(e||""===e){var n=e[c];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(s(e)+" is not iterable")}return b.prototype=w,i(E,"constructor",{value:w,configurable:!0}),i(w,"constructor",{value:b,configurable:!0}),b.displayName=f(w,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,f(t,l,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},N(C.prototype),f(C.prototype,u,(function(){return this})),e.AsyncIterator=C,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new C(h(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},N(E),f(E,l,"Generator"),f(E,c,(function(){return this})),f(E,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=T,H.prototype={constructor:H,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return c.type="throw",c.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],c=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),s=r.call(a,"finallyLoc");if(u&&s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;P(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:T(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function c(t,e,n,r,i,o,a){try{var c=t[o](a),u=c.value}catch(s){return void n(s)}c.done?e(u):Promise.resolve(u).then(r,i)}function u(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){c(o,r,i,a,u,"next",t)}function u(t){c(o,r,i,a,u,"throw",t)}a(void 0)}))}}function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,v(r.key),r)}}function h(t,e,n){return e&&f(t.prototype,e),n&&f(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function _(t,e,n){return(e=v(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function v(t){var e=function(t,e){if("object"!==s(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===s(e)?e:String(e)}System.register(["interactjs","cherry-markdown"],(function(e,o){"use strict";var c,f;return{setters:[function(t){c=t.default},function(t){f=t.default}],execute:function(){var o,v,p,d,y,m,g,b,w={},k=[],x=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,S=Array.isArray;function E(t,e){for(var n in e)t[n]=e[n];return t}function N(t){var e=t.parentNode;e&&e.removeChild(t)}function C(t,e,n){var r,i,a,c={};for(a in e)"key"==a?r=e[a]:"ref"==a?i=e[a]:c[a]=e[a];if(arguments.length>2&&(c.children=arguments.length>3?o.call(arguments,2):n),"function"==typeof t&&null!=t.defaultProps)for(a in t.defaultProps)void 0===c[a]&&(c[a]=t.defaultProps[a]);return A(t,c,r,i,null)}function A(t,e,n,r,i){var o={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==i?++p:i};return null==i&&null!=v.vnode&&v.vnode(o),o}function O(t){return t.children}function L(t,e){this.props=t,this.context=e}function P(t,e){if(null==e)return t.__?P(t.__,t.__.__k.indexOf(t)+1):null;for(var n;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e)return n.__d||n.__e;return"function"==typeof t.type?P(t):null}function H(t){var e,n;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e){t.__e=t.__c.base=n.__e;break}return H(t)}}function T(t){(!t.__d&&(t.__d=!0)&&y.push(t)&&!z.__r++||m!==v.debounceRendering)&&((m=v.debounceRendering)||g)(z)}function z(){var t,e,n,r,i,o,a,c,u;for(y.sort(b);t=y.shift();)t.__d&&(e=y.length,r=void 0,i=void 0,o=void 0,c=(a=(n=t).__v).__e,(u=n.__P)&&(r=[],i=[],(o=E({},a)).__v=a.__v+1,D(u,a,o,n.__n,void 0!==u.ownerSVGElement,null!=a.__h?[c]:null,r,null==c?P(a):c,a.__h,i),I(r,a,i),a.__e!=c&&H(a)),y.length>e&&y.sort(b));z.__r=0}function j(t,e,n,r,i,o,a,c,u,s,l){var f,h,_,v,p,d,y,m,g,b=0,x=r&&r.__k||k,E=x.length,N=E,C=e.length;for(n.__k=[],f=0;f<C;f++)null!=(v=n.__k[f]=null==(v=e[f])||"boolean"==typeof v||"function"==typeof v?null:"string"==typeof v||"number"==typeof v||"bigint"==typeof v?A(null,v,null,null,v):S(v)?A(O,{children:v},null,null,null):v.__b>0?A(v.type,v.props,v.key,v.ref?v.ref:null,v.__v):v)?(v.__=n,v.__b=n.__b+1,-1===(m=U(v,x,y=f+b,N))?_=w:(_=x[m]||w,x[m]=void 0,N--),D(t,v,_,i,o,a,c,u,s,l),p=v.__e,(h=v.ref)&&_.ref!=h&&(_.ref&&G(_.ref,null,v),l.push(h,v.__c||p,v)),null!=p&&(null==d&&(d=p),(g=_===w||null===_.__v)?-1==m&&b--:m!==y&&(m===y+1?b++:m>y?N>C-y?b+=m-y:b--:b=m<y&&m==y-1?m-y:0),y=f+b,"function"!=typeof v.type||m===y&&_.__k!==v.__k?"function"==typeof v.type||m===y&&!g?void 0!==v.__d?(u=v.__d,v.__d=void 0):u=p.nextSibling:u=F(t,p,u):u=M(v,u,t),"function"==typeof n.type&&(n.__d=u))):(_=x[f])&&null==_.key&&_.__e&&(_.__e==u&&(_.__=r,u=P(_)),Y(_,_,!1),x[f]=null);for(n.__e=d,f=E;f--;)null!=x[f]&&("function"==typeof n.type&&null!=x[f].__e&&x[f].__e==n.__d&&(n.__d=x[f].__e.nextSibling),Y(x[f],x[f]))}function M(t,e,n){for(var r,i=t.__k,o=0;i&&o<i.length;o++)(r=i[o])&&(r.__=t,e="function"==typeof r.type?M(r,e,n):F(n,r.__e,e));return e}function R(t,e){return e=e||[],null==t||"boolean"==typeof t||(S(t)?t.some((function(t){R(t,e)})):e.push(t)),e}function F(t,e,n){return null==n||n.parentNode!==t?t.insertBefore(e,null):e==n&&null!=e.parentNode||t.insertBefore(e,n),e.nextSibling}function U(t,e,n,r){var i=t.key,o=t.type,a=n-1,c=n+1,u=e[n];if(null===u||u&&i==u.key&&o===u.type)return n;if(r>(null!=u?1:0))for(;a>=0||c<e.length;){if(a>=0){if((u=e[a])&&i==u.key&&o===u.type)return a;a--}if(c<e.length){if((u=e[c])&&i==u.key&&o===u.type)return c;c++}}return-1}function V(t,e,n){"-"===e[0]?t.setProperty(e,null==n?"":n):t[e]=null==n?"":"number"!=typeof n||x.test(e)?n:n+"px"}function W(t,e,n,r,i){var o;t:if("style"===e)if("string"==typeof n)t.style.cssText=n;else{if("string"==typeof r&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||V(t.style,e,"");if(n)for(e in n)r&&n[e]===r[e]||V(t.style,e,n[e])}else if("o"===e[0]&&"n"===e[1])o=e!==(e=e.replace(/(PointerCapture)$|Capture$/,"$1")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+o]=n,n?r?n.u=r.u:(n.u=Date.now(),t.addEventListener(e,o?$:B,o)):t.removeEventListener(e,o?$:B,o);else if("dangerouslySetInnerHTML"!==e){if(i)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==e&&"height"!==e&&"href"!==e&&"list"!==e&&"form"!==e&&"tabIndex"!==e&&"download"!==e&&"rowSpan"!==e&&"colSpan"!==e&&"role"!==e&&e in t)try{t[e]=null==n?"":n;break t}catch(t){}"function"==typeof n||(null==n||!1===n&&"-"!==e[4]?t.removeAttribute(e):t.setAttribute(e,n))}}function B(t){var e=this.l[t.type+!1];if(t.t){if(t.t<=e.u)return}else t.t=Date.now();return e(v.event?v.event(t):t)}function $(t){return this.l[t.type+!0](v.event?v.event(t):t)}function D(t,e,n,r,i,a,c,u,s,l){var f,h,_,p,d,y,m,g,b,k,x,C,A,H,T,z=e.type;if(void 0!==e.constructor)return null;null!=n.__h&&(s=n.__h,u=e.__e=n.__e,e.__h=null,a=[u]),(f=v.__b)&&f(e);t:if("function"==typeof z)try{if(g=e.props,b=(f=z.contextType)&&r[f.__c],k=f?b?b.props.value:f.__:r,n.__c?m=(h=e.__c=n.__c).__=h.__E:("prototype"in z&&z.prototype.render?e.__c=h=new z(g,k):(e.__c=h=new L(g,k),h.constructor=z,h.render=q),b&&b.sub(h),h.props=g,h.state||(h.state={}),h.context=k,h.__n=r,_=h.__d=!0,h.__h=[],h._sb=[]),null==h.__s&&(h.__s=h.state),null!=z.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=E({},h.__s)),E(h.__s,z.getDerivedStateFromProps(g,h.__s))),p=h.props,d=h.state,h.__v=e,_)null==z.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(null==z.getDerivedStateFromProps&&g!==p&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(g,k),!h.__e&&(null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(g,h.__s,k)||e.__v===n.__v)){for(e.__v!==n.__v&&(h.props=g,h.state=h.__s,h.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.forEach((function(t){t&&(t.__=e)})),x=0;x<h._sb.length;x++)h.__h.push(h._sb[x]);h._sb=[],h.__h.length&&c.push(h);break t}null!=h.componentWillUpdate&&h.componentWillUpdate(g,h.__s,k),null!=h.componentDidUpdate&&h.__h.push((function(){h.componentDidUpdate(p,d,y)}))}if(h.context=k,h.props=g,h.__P=t,h.__e=!1,C=v.__r,A=0,"prototype"in z&&z.prototype.render){for(h.state=h.__s,h.__d=!1,C&&C(e),f=h.render(h.props,h.state,h.context),H=0;H<h._sb.length;H++)h.__h.push(h._sb[H]);h._sb=[]}else do{h.__d=!1,C&&C(e),f=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++A<25);h.state=h.__s,null!=h.getChildContext&&(r=E(E({},r),h.getChildContext())),_||null==h.getSnapshotBeforeUpdate||(y=h.getSnapshotBeforeUpdate(p,d)),j(t,S(T=null!=f&&f.type===O&&null==f.key?f.props.children:f)?T:[T],e,n,r,i,a,c,u,s,l),h.base=e.__e,e.__h=null,h.__h.length&&c.push(h),m&&(h.__E=h.__=null)}catch(t){e.__v=null,(s||null!=a)&&(e.__e=u,e.__h=!!s,a[a.indexOf(u)]=null),v.__e(t,e,n)}else null==a&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=function(t,e,n,r,i,a,c,u,s){var l,f,h,_=n.props,v=e.props,p=e.type,d=0;if("svg"===p&&(i=!0),null!=a)for(;d<a.length;d++)if((l=a[d])&&"setAttribute"in l==!!p&&(p?l.localName===p:3===l.nodeType)){t=l,a[d]=null;break}if(null==t){if(null===p)return document.createTextNode(v);t=i?document.createElementNS("http://www.w3.org/2000/svg",p):document.createElement(p,v.is&&v),a=null,u=!1}if(null===p)_===v||u&&t.data===v||(t.data=v);else{if(a=a&&o.call(t.childNodes),f=(_=n.props||w).dangerouslySetInnerHTML,h=v.dangerouslySetInnerHTML,!u){if(null!=a)for(_={},d=0;d<t.attributes.length;d++)_[t.attributes[d].name]=t.attributes[d].value;(h||f)&&(h&&(f&&h.__html==f.__html||h.__html===t.innerHTML)||(t.innerHTML=h&&h.__html||""))}if(function(t,e,n,r,i){var o;for(o in n)"children"===o||"key"===o||o in e||W(t,o,null,n[o],r);for(o in e)i&&"function"!=typeof e[o]||"children"===o||"key"===o||"value"===o||"checked"===o||n[o]===e[o]||W(t,o,e[o],n[o],r)}(t,v,_,i,u),h)e.__k=[];else if(j(t,S(d=e.props.children)?d:[d],e,n,r,i&&"foreignObject"!==p,a,c,a?a[0]:n.__k&&P(n,0),u,s),null!=a)for(d=a.length;d--;)null!=a[d]&&N(a[d]);u||("value"in v&&void 0!==(d=v.value)&&(d!==t.value||"progress"===p&&!d||"option"===p&&d!==_.value)&&W(t,"value",d,_.value,!1),"checked"in v&&void 0!==(d=v.checked)&&d!==t.checked&&W(t,"checked",d,_.checked,!1))}return t}(n.__e,e,n,r,i,a,c,s,l);(f=v.diffed)&&f(e)}function I(t,e,n){for(var r=0;r<n.length;r++)G(n[r],n[++r],n[++r]);v.__c&&v.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){v.__e(t,e.__v)}}))}function G(t,e,n){try{"function"==typeof t?t(e):t.current=e}catch(t){v.__e(t,n)}}function Y(t,e,n){var r,i;if(v.unmount&&v.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||G(r,null,e)),null!=(r=t.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(t){v.__e(t,e)}r.base=r.__P=null,t.__c=void 0}if(r=t.__k)for(i=0;i<r.length;i++)r[i]&&Y(r[i],e,n||"function"!=typeof t.type);n||null==t.__e||N(t.__e),t.__=t.__e=t.__d=void 0}function q(t,e,n){return this.constructor(t,n)}function J(t,e,n){var r,i,a,c;v.__&&v.__(t,e),i=(r="function"==typeof n)?null:n&&n.__k||e.__k,a=[],c=[],D(e,t=(!r&&n||e).__k=C(O,null,[t]),i||w,w,void 0!==e.ownerSVGElement,!r&&n?[n]:i?null:e.firstChild?o.call(e.childNodes):null,a,!r&&n?n:i?i.__e:e.firstChild,r,c),I(a,t,c)}o=k.slice,v={__e:function(t,e,n,r){for(var i,o,a;e=e.__;)if((i=e.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(t)),a=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(t,r||{}),a=i.__d),a)return i.__E=i}catch(e){t=e}throw t}},p=0,d=function(t){return null!=t&&void 0===t.constructor},L.prototype.setState=function(t,e){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=E({},this.state),"function"==typeof t&&(t=t(E({},n),this.props)),t&&E(n,t),null!=t&&this.__v&&(e&&this._sb.push(e),T(this))},L.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),T(this))},L.prototype.render=O,y=[],g="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,b=function(t,e){return t.__v.__b-e.__v.__b},z.__r=0;function X(t,e,n,r,i){var o="".concat(t,"-").concat(e);return n&&(o+="-".concat(n)),r&&(o+="__".concat(r)),i&&(o+="--".concat(i)),o}var Z=function(){function t(e,n){l(this,t),_(this,"namespace",void 0),this.block=e,this.namespace=n||"ibiz"}return h(t,[{key:"b",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return X(this.namespace,this.block,t,"","")}},{key:"e",value:function(t){return t?X(this.namespace,this.block,"",t,""):""}},{key:"m",value:function(t){return t?X(this.namespace,this.block,"","",t):""}},{key:"be",value:function(t,e){return t&&e?X(this.namespace,this.block,t,e,""):""}},{key:"em",value:function(t,e){return t&&e?X(this.namespace,this.block,"",t,e):""}},{key:"bm",value:function(t,e){return t&&e?X(this.namespace,this.block,t,"",e):""}},{key:"bem",value:function(t,e,n){return t&&e&&n?X(this.namespace,this.block,t,e,n):""}},{key:"is",value:function(t,e){return t&&e?"".concat("is-").concat(t):""}},{key:"cssVar",value:function(t){var e={};for(var n in t)t[n]&&(e[this.cssVarName(n)]=t[n]);return e}},{key:"cssVarBlock",value:function(t){var e={};for(var n in t)t[n]&&(e[this.cssVarBlockName(n)]=t[n]);return e}},{key:"cssVarName",value:function(t){return"--".concat(this.namespace,"-").concat(t)}},{key:"cssVarBlockName",value:function(t){return"--".concat(this.namespace,"-").concat(this.block,"-").concat(t)}}]),t}();function K(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function Q(t,e){for(var n,r="",i=0,o=-1,a=0,c=0;c<=t.length;++c){if(c<t.length)n=t.charCodeAt(c);else{if(47===n)break;n=47}if(47===n){if(o===c-1||1===a);else if(o!==c-1&&2===a){if(r.length<2||2!==i||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2))if(r.length>2){var u=r.lastIndexOf("/");if(u!==r.length-1){-1===u?(r="",i=0):i=(r=r.slice(0,u)).length-1-r.lastIndexOf("/"),o=c,a=0;continue}}else if(2===r.length||1===r.length){r="",i=0,o=c,a=0;continue}e&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+t.slice(o+1,c):r=t.slice(o+1,c),i=c-o-1;o=c,a=0}else 46===n&&-1!==a?++a:a=-1}return r}var tt={resolve:function(){for(var t,e="",n=!1,r=arguments.length-1;r>=-1&&!n;r--){var i;r>=0?i=arguments[r]:(void 0===t&&(t=process.cwd()),i=t),K(i),0!==i.length&&(e=i+"/"+e,n=47===i.charCodeAt(0))}return e=Q(e,!n),n?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(t){if(K(t),0===t.length)return".";var e=47===t.charCodeAt(0),n=47===t.charCodeAt(t.length-1);return 0!==(t=Q(t,!e)).length||e||(t="."),t.length>0&&n&&(t+="/"),e?"/"+t:t},isAbsolute:function(t){return K(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,e=0;e<arguments.length;++e){var n=arguments[e];K(n),n.length>0&&(void 0===t?t=n:t+="/"+n)}return void 0===t?".":tt.normalize(t)},relative:function(t,e){if(K(t),K(e),t===e)return"";if((t=tt.resolve(t))===(e=tt.resolve(e)))return"";for(var n=1;n<t.length&&47===t.charCodeAt(n);++n);for(var r=t.length,i=r-n,o=1;o<e.length&&47===e.charCodeAt(o);++o);for(var a=e.length-o,c=i<a?i:a,u=-1,s=0;s<=c;++s){if(s===c){if(a>c){if(47===e.charCodeAt(o+s))return e.slice(o+s+1);if(0===s)return e.slice(o+s)}else i>c&&(47===t.charCodeAt(n+s)?u=s:0===s&&(u=0));break}var l=t.charCodeAt(n+s);if(l!==e.charCodeAt(o+s))break;47===l&&(u=s)}var f="";for(s=n+u+1;s<=r;++s)s!==r&&47!==t.charCodeAt(s)||(0===f.length?f+="..":f+="/..");return f.length>0?f+e.slice(o+u):(o+=u,47===e.charCodeAt(o)&&++o,e.slice(o))},_makeLong:function(t){return t},dirname:function(t){if(K(t),0===t.length)return".";for(var e=t.charCodeAt(0),n=47===e,r=-1,i=!0,o=t.length-1;o>=1;--o)if(47===(e=t.charCodeAt(o))){if(!i){r=o;break}}else i=!1;return-1===r?n?"/":".":n&&1===r?"//":t.slice(0,r)},basename:function(t,e){if(void 0!==e&&"string"!=typeof e)throw new TypeError('"ext" argument must be a string');K(t);var n,r=0,i=-1,o=!0;if(void 0!==e&&e.length>0&&e.length<=t.length){if(e.length===t.length&&e===t)return"";var a=e.length-1,c=-1;for(n=t.length-1;n>=0;--n){var u=t.charCodeAt(n);if(47===u){if(!o){r=n+1;break}}else-1===c&&(o=!1,c=n+1),a>=0&&(u===e.charCodeAt(a)?-1==--a&&(i=n):(a=-1,i=c))}return r===i?i=c:-1===i&&(i=t.length),t.slice(r,i)}for(n=t.length-1;n>=0;--n)if(47===t.charCodeAt(n)){if(!o){r=n+1;break}}else-1===i&&(o=!1,i=n+1);return-1===i?"":t.slice(r,i)},extname:function(t){K(t);for(var e=-1,n=0,r=-1,i=!0,o=0,a=t.length-1;a>=0;--a){var c=t.charCodeAt(a);if(47!==c)-1===r&&(i=!1,r=a+1),46===c?-1===e?e=a:1!==o&&(o=1):-1!==e&&(o=-1);else if(!i){n=a+1;break}}return-1===e||-1===r||0===o||1===o&&e===r-1&&e===n+1?"":t.slice(e,r)},format:function(t){if(null===t||"object"!==s(t))throw new TypeError('The "pathObject" argument must be of type Object. Received type '+s(t));return function(t,e){var n=e.dir||e.root,r=e.base||(e.name||"")+(e.ext||"");return n?n===e.root?n+r:n+t+r:r}("/",t)},parse:function(t){K(t);var e={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return e;var n,r=t.charCodeAt(0),i=47===r;i?(e.root="/",n=1):n=0;for(var o=-1,a=0,c=-1,u=!0,s=t.length-1,l=0;s>=n;--s)if(47!==(r=t.charCodeAt(s)))-1===c&&(u=!1,c=s+1),46===r?-1===o?o=s:1!==l&&(l=1):-1!==o&&(l=-1);else if(!u){a=s+1;break}return-1===o||-1===c||0===l||1===l&&o===c-1&&o===a+1?-1!==c&&(e.base=e.name=0===a&&i?t.slice(1,c):t.slice(a,c)):(0===a&&i?(e.name=t.slice(1,o),e.base=t.slice(1,c)):(e.name=t.slice(a,o),e.base=t.slice(a,c)),e.ext=t.slice(o,c)),a>0?e.dir=t.slice(0,a-1):i&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};function et(){return(65536*(1+Math.random())|0).toString(16).substring(1)}function nt(){return"".concat(et()+et(),"-").concat(et(),"-").concat(et(),"-").concat(et(),"-").concat(et()).concat(et()).concat(et())}tt.posix=tt;var rt=function(){function t(){l(this,t)}return h(t,null,[{key:"copy",value:function(t){return this.inputElement||(this.inputElement=document.createElement("input"),this.inputElement.style.position="absolute",this.inputElement.style.left="-9999px",document.body.appendChild(this.inputElement)),this.inputElement.value=t,this.inputElement.select(),document.execCommand("copy")}}]),t}();_(rt,"inputElement",null);var it,ot,at,ct,ut=0,st=[],lt=[],ft=v.__b,ht=v.__r,_t=v.diffed,vt=v.__c,pt=v.unmount;function dt(t,e){v.__h&&v.__h(ot,t,ut||e),ut=0;var n=ot.__H||(ot.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({__V:lt}),n.__[t]}function yt(t,e){var n=dt(it++,3);!v.__s&&Nt(n.__H,e)&&(n.__=t,n.i=e,ot.__H.__h.push(n))}function mt(t){return ut=5,gt((function(){return{current:t}}),[])}function gt(t,e){var n=dt(it++,7);return Nt(n.__H,e)?(n.__V=t(),n.i=e,n.__h=t,n.__V):n.__}function bt(t,e){return ut=8,gt((function(){return t}),e)}function wt(){for(var t;t=st.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(St),t.__H.__h.forEach(Et),t.__H.__h=[]}catch(Ke){t.__H.__h=[],v.__e(Ke,t.__v)}}v.__b=function(t){ot=null,ft&&ft(t)},v.__r=function(t){ht&&ht(t),it=0;var e=(ot=t.__c).__H;e&&(at===ot?(e.__h=[],ot.__h=[],e.__.forEach((function(t){t.__N&&(t.__=t.__N),t.__V=lt,t.__N=t.i=void 0}))):(e.__h.forEach(St),e.__h.forEach(Et),e.__h=[],it=0)),at=ot},v.diffed=function(t){_t&&_t(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(1!==st.push(e)&&ct===v.requestAnimationFrame||((ct=v.requestAnimationFrame)||xt)(wt)),e.__H.__.forEach((function(t){t.i&&(t.__H=t.i),t.__V!==lt&&(t.__=t.__V),t.i=void 0,t.__V=lt}))),at=ot=null},v.__c=function(t,e){e.some((function(t){try{t.__h.forEach(St),t.__h=t.__h.filter((function(t){return!t.__||Et(t)}))}catch(Mt){e.some((function(t){t.__h&&(t.__h=[])})),e=[],v.__e(Mt,t.__v)}})),vt&&vt(t,e)},v.unmount=function(t){pt&&pt(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach((function(t){try{St(t)}catch(t){e=t}})),n.__H=void 0,e&&v.__e(e,n.__v))};var kt="function"==typeof requestAnimationFrame;function xt(t){var e,n=function(){clearTimeout(r),kt&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);kt&&(e=requestAnimationFrame(n))}function St(t){var e=ot,n=t.__c;"function"==typeof n&&(t.__c=void 0,n()),ot=e}function Et(t){var e=ot;t.__c=t.__(),ot=e}function Nt(t,e){return!t||t.length!==e.length||e.some((function(e,n){return e!==t[n]}))}function Ct(){throw new Error("Cycle detected")}var At=Symbol.for("preact-signals");function Ot(){if(zt>1)zt--;else{for(var t,e=!1;void 0!==Tt;){var n=Tt;for(Tt=void 0,jt++;void 0!==n;){var r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&Vt(n))try{n.c()}catch(n){e||(t=n,e=!0)}n=r}}if(jt=0,zt--,e)throw t}}var Lt,Pt,Ht=void 0,Tt=void 0,zt=0,jt=0,Mt=0;function Rt(t){if(void 0!==Ht){var e=t.n;if(void 0===e||e.t!==Ht)return e={i:0,S:t,p:Ht.s,n:void 0,t:Ht,e:void 0,x:void 0,r:e},void 0!==Ht.s&&(Ht.s.n=e),Ht.s=e,t.n=e,32&Ht.f&&t.S(e),e;if(-1===e.i)return e.i=0,void 0!==e.n&&(e.n.p=e.p,void 0!==e.p&&(e.p.n=e.n),e.p=Ht.s,e.n=void 0,Ht.s.n=e,Ht.s=e),e}}function Ft(t){this.v=t,this.i=0,this.n=void 0,this.t=void 0}function Ut(t){return new Ft(t)}function Vt(t){for(var e=t.s;void 0!==e;e=e.n)if(e.S.i!==e.i||!e.S.h()||e.S.i!==e.i)return!0;return!1}function Wt(t){for(var e=t.s;void 0!==e;e=e.n){var n=e.S.n;if(void 0!==n&&(e.r=n),e.S.n=e,e.i=-1,void 0===e.n){t.s=e;break}}}function Bt(t){for(var e=t.s,n=void 0;void 0!==e;){var r=e.p;-1===e.i?(e.S.U(e),void 0!==r&&(r.n=e.n),void 0!==e.n&&(e.n.p=r)):n=e,e.S.n=e.r,void 0!==e.r&&(e.r=void 0),e=r}t.s=n}function $t(t){Ft.call(this,void 0),this.x=t,this.s=void 0,this.g=Mt-1,this.f=4}function Dt(t){return new $t(t)}function It(t){var e=t.u;if(t.u=void 0,"function"==typeof e){zt++;var n=Ht;Ht=void 0;try{e()}catch(e){throw t.f&=-2,t.f|=8,Gt(t),e}finally{Ht=n,Ot()}}}function Gt(t){for(var e=t.s;void 0!==e;e=e.n)e.S.U(e);t.x=void 0,t.s=void 0,It(t)}function Yt(t){if(Ht!==this)throw new Error("Out-of-order effect");Bt(this),Ht=t,this.f&=-2,8&this.f&&Gt(this),Ot()}function qt(t){this.x=t,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}function Jt(t){var e=new qt(t);try{e.c()}catch(t){throw e.d(),t}return e.d.bind(e)}function Xt(t,e){v[t]=e.bind(null,v[t]||function(){})}function Zt(t){Pt&&Pt(),Pt=t&&t.S()}function Kt(t){var e=this,n=t.data,r=te(n);r.value=n;var i=gt((function(){for(var t=e.__v;t=t.__;)if(t.__c){t.__c.__$f|=4;break}return e.__$u.c=function(){var t;d(i.peek())||3!==(null==(t=e.base)?void 0:t.nodeType)?(e.__$f|=1,e.setState({})):e.base.data=i.peek()},Dt((function(){var t=r.value.value;return 0===t?0:!0===t?"":t||""}))}),[]);return i.value}function Qt(t,e,n,r){var i=e in t&&void 0===t.ownerSVGElement,o=Ut(n);return{o:function(t,e){o.value=t,r=e},d:Jt((function(){var n=o.value.value;r[e]!==n&&(r[e]=n,i?t[e]=n:n?t.setAttribute(e,n):t.removeAttribute(e))}))}}function te(t){return gt((function(){return Ut(t)}),[])}function ee(t){var e=mt(t);return e.current=t,Lt.__$f|=4,gt((function(){return Dt((function(){return e.current()}))}),[])}Ft.prototype.brand=At,Ft.prototype.h=function(){return!0},Ft.prototype.S=function(t){this.t!==t&&void 0===t.e&&(t.x=this.t,void 0!==this.t&&(this.t.e=t),this.t=t)},Ft.prototype.U=function(t){if(void 0!==this.t){var e=t.e,n=t.x;void 0!==e&&(e.x=n,t.e=void 0),void 0!==n&&(n.e=e,t.x=void 0),t===this.t&&(this.t=n)}},Ft.prototype.subscribe=function(t){var e=this;return Jt((function(){var n=e.value,r=32&this.f;this.f&=-33;try{t(n)}finally{this.f|=r}}))},Ft.prototype.valueOf=function(){return this.value},Ft.prototype.toString=function(){return this.value+""},Ft.prototype.toJSON=function(){return this.value},Ft.prototype.peek=function(){return this.v},Object.defineProperty(Ft.prototype,"value",{get:function(){var t=Rt(this);return void 0!==t&&(t.i=this.i),this.v},set:function(t){if(Ht instanceof $t&&function(){throw new Error("Computed cannot have side-effects")}(),t!==this.v){jt>100&&Ct(),this.v=t,this.i++,Mt++,zt++;try{for(var e=this.t;void 0!==e;e=e.x)e.t.N()}finally{Ot()}}}}),($t.prototype=new Ft).h=function(){if(this.f&=-3,1&this.f)return!1;if(32==(36&this.f))return!0;if(this.f&=-5,this.g===Mt)return!0;if(this.g=Mt,this.f|=1,this.i>0&&!Vt(this))return this.f&=-2,!0;var t=Ht;try{Wt(this),Ht=this;var e=this.x();(16&this.f||this.v!==e||0===this.i)&&(this.v=e,this.f&=-17,this.i++)}catch(t){this.v=t,this.f|=16,this.i++}return Ht=t,Bt(this),this.f&=-2,!0},$t.prototype.S=function(t){if(void 0===this.t){this.f|=36;for(var e=this.s;void 0!==e;e=e.n)e.S.S(e)}Ft.prototype.S.call(this,t)},$t.prototype.U=function(t){if(void 0!==this.t&&(Ft.prototype.U.call(this,t),void 0===this.t)){this.f&=-33;for(var e=this.s;void 0!==e;e=e.n)e.S.U(e)}},$t.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var t=this.t;void 0!==t;t=t.x)t.t.N()}},$t.prototype.peek=function(){if(this.h()||Ct(),16&this.f)throw this.v;return this.v},Object.defineProperty($t.prototype,"value",{get:function(){1&this.f&&Ct();var t=Rt(this);if(this.h(),void 0!==t&&(t.i=this.i),16&this.f)throw this.v;return this.v}}),qt.prototype.c=function(){var t=this.S();try{if(8&this.f)return;if(void 0===this.x)return;var e=this.x();"function"==typeof e&&(this.u=e)}finally{t()}},qt.prototype.S=function(){1&this.f&&Ct(),this.f|=1,this.f&=-9,It(this),Wt(this),zt++;var t=Ht;return Ht=this,Yt.bind(this,t)},qt.prototype.N=function(){2&this.f||(this.f|=2,this.o=Tt,Tt=this)},qt.prototype.d=function(){this.f|=8,1&this.f||Gt(this)},Kt.displayName="_st",Object.defineProperties(Ft.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:Kt},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),Xt("__b",(function(t,e){if("string"==typeof e.type){var n,r=e.props;for(var i in r)if("children"!==i){var o=r[i];o instanceof Ft&&(n||(e.__np=n={}),n[i]=o,r[i]=o.peek())}}t(e)})),Xt("__r",(function(t,e){Zt();var n,r=e.__c;r&&(r.__$f&=-2,void 0===(n=r.__$u)&&(r.__$u=n=function(t){var e;return Jt((function(){e=this})),e.c=function(){r.__$f|=1,r.setState({})},e}())),Lt=r,Zt(n),t(e)})),Xt("__e",(function(t,e,n,r){Zt(),Lt=void 0,t(e,n,r)})),Xt("diffed",(function(t,e){var n;if(Zt(),Lt=void 0,"string"==typeof e.type&&(n=e.__e)){var r=e.__np,i=e.props;if(r){var o=n.U;if(o)for(var a in o){var c=o[a];void 0===c||a in r||(c.d(),o[a]=void 0)}else n.U=o={};for(var u in r){var s=o[u],l=r[u];void 0===s?(s=Qt(n,u,l,i),o[u]=s):s.o(l,i)}}}t(e)})),Xt("unmount",(function(t,e){if("string"==typeof e.type){var n=e.__e;if(n){var r=n.U;if(r)for(var i in n.U=void 0,r){var o=r[i];o&&o.d()}}}else{var a=e.__c;if(a){var c=a.__$u;c&&(a.__$u=void 0,c.d())}}t(e)})),Xt("__h",(function(t,e,n,r){(r<3||9===r)&&(e.__$f|=2),t(e,n,r)})),L.prototype.shouldComponentUpdate=function(t,e){var n=this.__$u;if(!(n&&void 0!==n.s||4&this.__$f))return!0;if(3&this.__$f)return!0;for(var r in e)return!0;for(var i in t)if("__source"!==i&&t[i]!==this.props[i])return!0;for(var o in this.props)if(!(o in t))return!0;return!1};var ne=0;function re(t,e,n,r,i,o){var a,c,u={};for(c in e)"ref"==c?a=e[c]:u[c]=e[c];var s={type:t,props:u,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--ne,__source:i,__self:o};if("function"==typeof t&&(a=t.defaultProps))for(c in a)void 0===u[c]&&(u[c]=a[c]);return v.vnode&&v.vnode(s),s}var ie=function(){return re("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:re("path",{d:"M843.904 783.573333 783.573333 843.904 512.042667 572.373333 240.512 843.904 180.181333 783.573333 451.712 512.042667 180.181333 240.512 240.512 180.181333 512.042667 451.712 783.573333 180.181333 843.904 240.512 572.373333 512.042667 843.904 783.573333Z"})})},oe=function(){return re("svg",{className:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:re("path",{d:"M900.64 379.808l-263.072-256.032c-36.448-35.328-105.76-35.392-142.304 0.096l-327.04 319.904c-56.416 54.72-70.72 76.704-70.72 150.976l0 143.936c0 132.768 26.976 192 186.912 192l131.872 0c81.12 0 128.448-46.656 193.952-111.264l290.016-297.696c18.592-17.984 29.248-43.968 29.248-71.264C929.504 423.36 918.976 397.6 900.64 379.808zM323.008 786.752c-52.928 0-96-43.072-96-96s43.072-96 96-96 96 43.072 96 96S375.936 786.752 323.008 786.752z"})})},ae=function(){return re("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:re("path",{d:"M931.4 498.9L94.9 79.5c-3.4-1.7-7.3-2.1-11-1.2-8.5 2.1-13.8 10.7-11.7 19.3l86.2 352.2c1.3 5.3 5.2 9.6 10.4 11.3l147.7 50.7-147.6 50.7c-5.2 1.8-9.1 6-10.3 11.3L72.2 926.5c-0.9 3.7-0.5 7.6 1.2 10.9 3.9 7.9 13.5 11.1 21.5 7.2l836.5-417c3.1-1.5 5.6-4.1 7.2-7.1 3.9-8 0.7-17.6-7.2-21.6zM170.8 826.3l50.3-205.6 295.2-101.3c2.3-0.8 4.2-2.6 5-5 1.4-4.2-0.8-8.7-5-10.2L221.1 403 171 198.2l628 314.9-628.2 313.2z"})})},ce=function(){return re("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:re("path",{d:"M962 197.61H747v-60c0-55.14-44.86-100-100-100H377c-55.14 0-100 44.86-100 100v60H62c-11.05 0-20 8.95-20 20s8.95 20 20 20h60v630.57c0 66.17 53.83 120 120 120h540c66.17 0 120-53.83 120-120V237.61h60c11.05 0 20-8.95 20-20s-8.95-20-20-20zM637.34 457.66v260c0 12.01-10.72 21.63-23.06 19.77-9.84-1.48-16.94-10.25-16.94-20.2V458.09c0-9.95 7.1-18.72 16.94-20.2 12.34-1.86 23.06 7.76 23.06 19.77z m-210.68 0v260c0 11-9 20-20 20s-20-9-20-20v-260c0-11 9-20 20-20s20 9 20 20zM317 137.61c0-33.08 26.92-60 60-60h270c33.08 0 60 26.92 60 60v60H317v-60z"})})},ue=function(){return re("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:re("path",{d:"M511.582491 63.413262C265.134543 63.413262 64.62588 263.921925 64.62588 510.369873s200.508663 446.957635 446.957635 446.957635 446.957635-200.508663 446.957635-446.957635S758.031463 63.413262 511.582491 63.413262zM509.001713 751.859903c-98.517781 0-182.467775-62.623269-214.771505-150.056598l0.327458-0.134053c-2.007727-4.036943-3.38305-8.422833-3.38305-13.237489 0-16.647145 13.494339-30.142507 30.142507-30.142507 13.389962 0 24.358781 8.877181 28.2893 20.955264l0.422625-0.172939c23.269983 65.442478 85.645612 112.503307 158.972665 112.503307 93.106538 0 168.845523-75.738985 168.845523-168.845523s-75.738985-168.845523-168.845523-168.845523c-20.432355 0-39.874149 3.980661-58.013275 10.66899l21.248953 40.742936c2.486634 2.677992 4.0175 6.2831 4.0175 10.243295 0 8.417717-8.404414 14.921851-15.365966 15.07023-0.102331 0-0.206708 0-0.309038 0-0.220011 0-0.427742 0-0.647753-0.013303l-150.579507-6.463202c-5.372358-0.234337-10.229992-3.310396-12.716626-8.093329-2.486634-4.76963-2.236947-10.509355 0.647753-15.055904l80.890308-127.179564c2.8847-4.533246 8.006348-7.151887 13.365402-6.960529 5.372358 0.234337 10.227945 3.312442 12.71458 8.095375l18.580171 35.625382c26.629497-10.855232 55.683207-16.963347 86.168522-16.963347 126.338407 0 229.130537 102.791108 229.130537 229.130537S635.340119 751.859903 509.001713 751.859903z"})})},se=function(){return re("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:re("path",{d:"M891.072 822.144V167.36a34.432 34.432 0 0 0-34.432-34.432H201.856C201.856 94.848 232.704 64 270.784 64h620.288C929.152 64 960 94.848 960 132.928v620.288c0 38.08-30.848 68.928-68.928 68.928z m-68.928-551.36v620.288c0 38.08-30.848 68.928-68.928 68.928H132.928A68.928 68.928 0 0 1 64 891.072V270.784c0-38.08 30.848-68.928 68.928-68.928h620.288c38.08 0 68.928 30.848 68.928 68.928z m-137.856 137.856H201.856a34.432 34.432 0 0 0 0 68.864h482.432a34.432 34.432 0 0 0 0-68.864z m0 206.72H201.856a34.432 34.432 0 0 0 0 68.864h482.432a34.432 34.432 0 0 0 0-68.864z"})})},le=function(){return re("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:re("path",{d:"M547.4 197.4v46l200.3 0.1L546.1 444l32.4 32.6 201.9-200.7v200.9h46V197.5zM471.4 584.4l-32.6-32.6L243.6 747V547.9h-46v278.7h279v-46H275z"})})},fe=function(){return re("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:re("path",{d:"M544 480V282.944h52.224l0.064 107.968L763.072 224l36.928 36.928-166.976 166.976 108.032-0.128V480H544zM260.928 800l-36.928-36.928 166.912-166.784-107.968-0.064V544H480v197.056h-52.224l0.064-107.968L260.928 800z"})})},he=new Z("markdown-message"),_e=function(t){var e=t.message,n=t.size,r=te(nt()),i=te(null);yt((function(){n>=0&&i.value&&i.value.setMarkdown(e.content)}),[e,n]),yt((function(){i.value=new f({id:r,value:e.content,editor:{defaultModel:"previewOnly"}})}),[]);return re("div",{className:he.b(),children:[re("div",{className:he.b("header"),children:[re("div",{className:he.be("header","caption"),children:"AI "}),re("div",{className:he.b("header-action-wrapper"),children:[re("div",{className:he.be("header","action-item"),title:"回填",onClick:function(){t.controller.backfill(e)},children:re(oe,{})}),re("div",{className:he.be("header","action-item"),title:"刷新",onClick:function(){t.controller.refreshMessage(e)},children:re(ue,{})}),re("div",{className:he.be("header","action-item"),title:"删除",onClick:function(){t.controller.deleteMessage(e)},children:re(ce,{})}),re("div",{className:he.be("header","action-item"),title:"复制",onClick:function(){t.controller.copyMessage(e)},children:re(se,{})})]})]}),re("div",{className:he.b("content"),children:re("div",{id:r})}),re("div",{className:he.b("footer")})]})},ve=new Z("user-message"),pe=function(t){var e=ee((function(){return t.message.content}));return re("div",{className:ve.b(),children:re("span",{className:ve.e("content"),children:e})})},de=new Z("error-message"),ye=function(t){var e=ee((function(){return t.message.content}));return re("div",{className:de.b(),children:re("span",{className:de.e("content"),children:e})})},me=new Z("unknown-message"),ge=function(t){return re("div",{className:me.b(),children:re("span",{className:me.e("content"),children:["暂未支持的消息类型: ",t.message.type]})})},be=new Z("chat-message-item"),we=function(t){var e=t.message,n=t.size,r=null;switch(e.type){case"DEFAULT":r="ASSISTANT"===e.role?_e:pe;break;case"ERROR":r=ye;break;default:r=ge}return re("div",{className:be.b(),children:C(r,{size:n,message:e,controller:t.controller})})},ke=new Z("chat-messages"),xe=function(t){var e=mt(null),n=t.controller.messages;return function(t){var e=mt(t);e.current=t,yt((function(){return Jt((function(){return e.current()}))}),[])}((function(){e.current&&n.value.length>0&&(e.current.scrollTop=e.current.scrollHeight)})),re("div",{ref:e,className:ke.b(),children:n.value.map((function(e){var n,r=(null===(n=e.content)||void 0===n?void 0:n.length)||0;return re(we,{message:e,size:r,controller:t.controller},e.messageid)}))})};function Se(t,e){for(var n in t)if("__source"!==n&&!(n in e))return!0;for(var r in e)if("__source"!==r&&t[r]!==e[r])return!0;return!1}function Ee(t){this.props=t}(Ee.prototype=new L).isPureReactComponent=!0,Ee.prototype.shouldComponentUpdate=function(t,e){return Se(this.props,t)||Se(this.state,e)};var Ne=v.__b;v.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),Ne&&Ne(t)};var Ce=v.__e;v.__e=function(t,e,n,r){if(t.then)for(var i,o=e;o=o.__;)if((i=o.__c)&&i.__c)return null==e.__e&&(e.__e=n.__e,e.__k=n.__k),i.__c(t,e);Ce(t,e,n,r)};var Ae=v.unmount;function Oe(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach((function(t){"function"==typeof t.__c&&t.__c()})),t.__c.__H=null),null!=(t=function(t,e){for(var n in e)t[n]=e[n];return t}({},t)).__c&&(t.__c.__P===n&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map((function(t){return Oe(t,e,n)}))),t}function Le(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map((function(t){return Le(t,e,n)})),t.__c&&t.__c.__P===e&&(t.__e&&n.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=n)),t}function Pe(){this.__u=0,this.t=null,this.__b=null}function He(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function Te(){this.u=null,this.o=null}v.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&!0===t.__h&&(t.type=null),Ae&&Ae(t)},(Pe.prototype=new L).__c=function(t,e){var n=e.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var i=He(r.__v),o=!1,a=function(){o||(o=!0,n.__R=null,i?i(c):c())};n.__R=a;var c=function(){if(! --r.__u){if(r.state.__a){var t=r.state.__a;r.__v.__k[0]=Le(t,t.__c.__P,t.__c.__O)}var e;for(r.setState({__a:r.__b=null});e=r.t.pop();)e.forceUpdate()}},u=!0===e.__h;r.__u++||u||r.setState({__a:r.__b=r.__v.__k[0]}),t.then(a,a)},Pe.prototype.componentWillUnmount=function(){this.t=[]},Pe.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Oe(this.__b,n,r.__O=r.__P)}this.__b=null}var i=e.__a&&C(O,null,t.fallback);return i&&(i.__h=null),[C(O,null,e.__a?null:t.children),i]};var ze=function(t,e,n){if(++n[1]===n[0]&&t.o.delete(e),t.props.revealOrder&&("t"!==t.props.revealOrder[0]||!t.o.size))for(n=t.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.u=n=n[2]}};(Te.prototype=new L).__a=function(t){var e=this,n=He(e.__v),r=e.o.get(t);return r[0]++,function(i){var o=function(){e.props.revealOrder?(r.push(i),ze(e,t,r)):i()};n?n(o):o()}},Te.prototype.render=function(t){this.u=null,this.o=new Map;var e=R(t.children);t.revealOrder&&"b"===t.revealOrder[0]&&e.reverse();for(var n=e.length;n--;)this.o.set(e[n],this.u=[1,0,this.u]);return t.children},Te.prototype.componentDidUpdate=Te.prototype.componentDidMount=function(){var t=this;this.o.forEach((function(e,n){ze(t,n,e)}))};var je="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Me=/^(?: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]/,Re=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Fe=/[A-Z0-9]/g,Ue="undefined"!=typeof document,Ve=function(t){return("undefined"!=typeof Symbol&&"symbol"==s(Symbol())?/fil|che|rad/:/fil|che|ra/).test(t)};L.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(t){Object.defineProperty(L.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}));var We=v.event;function Be(){}function $e(){return this.cancelBubble}function De(){return this.defaultPrevented}v.event=function(t){return We&&(t=We(t)),t.persist=Be,t.isPropagationStopped=$e,t.isDefaultPrevented=De,t.nativeEvent=t};var Ie={enumerable:!1,configurable:!0,get:function(){return this.class}},Ge=v.vnode;v.vnode=function(t){"string"==typeof t.type&&function(t){var e=t.props,n=t.type,r={};for(var i in e){var o=e[i];if(!("value"===i&&"defaultValue"in e&&null==o||Ue&&"children"===i&&"noscript"===n||"class"===i||"className"===i)){var a=i.toLowerCase();"defaultValue"===i&&"value"in e&&null==e.value?i="value":"download"===i&&!0===o?o="":"ondoubleclick"===a?i="ondblclick":"onchange"!==a||"input"!==n&&"textarea"!==n||Ve(e.type)?"onfocus"===a?i="onfocusin":"onblur"===a?i="onfocusout":Re.test(i)?i=a:-1===n.indexOf("-")&&Me.test(i)?i=i.replace(Fe,"-$&").toLowerCase():null===o&&(o=void 0):a=i="oninput","oninput"===a&&r[i=a]&&(i="oninputCapture"),r[i]=o}}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=R(e.children).forEach((function(t){t.props.selected=-1!=r.value.indexOf(t.props.value)}))),"select"==n&&null!=r.defaultValue&&(r.value=R(e.children).forEach((function(t){t.props.selected=r.multiple?-1!=r.defaultValue.indexOf(t.props.value):r.defaultValue==t.props.value}))),e.class&&!e.className?(r.class=e.class,Object.defineProperty(r,"className",Ie)):(e.className&&!e.class||e.class&&e.className)&&(r.class=r.className=e.className),t.props=r}(t),t.$$typeof=je,Ge&&Ge(t)};var Ye=v.__r;v.__r=function(t){Ye&&Ye(t),t.__c};var qe=v.diffed;v.diffed=function(t){qe&&qe(t);var e=t.props,n=t.__e;null!=n&&"textarea"===t.type&&"value"in e&&e.value!==n.value&&(n.value=null==e.value?"":e.value)};var Je=new Map;function Xe(t){var e=Je.get(t);e&&e.destroy()}function Ze(t){var e=Je.get(t);e&&e.update()}var Ke=null;"undefined"==typeof window?((Ke=function(t){return t}).destroy=function(t){return t},Ke.update=function(t){return t}):((Ke=function(t,e){return t&&Array.prototype.forEach.call(t.length?t:[t],(function(t){return function(t){if(t&&t.nodeName&&"TEXTAREA"===t.nodeName&&!Je.has(t)){var e,n=null,r=window.getComputedStyle(t),i=(e=t.value,function(){a({testForHeightReduction:""===e||!t.value.startsWith(e),restoreTextAlign:null}),e=t.value}),o=function(e){t.removeEventListener("autosize:destroy",o),t.removeEventListener("autosize:update",c),t.removeEventListener("input",i),window.removeEventListener("resize",c),Object.keys(e).forEach((function(n){return t.style[n]=e[n]})),Je.delete(t)}.bind(t,{height:t.style.height,resize:t.style.resize,textAlign:t.style.textAlign,overflowY:t.style.overflowY,overflowX:t.style.overflowX,wordWrap:t.style.wordWrap});t.addEventListener("autosize:destroy",o),t.addEventListener("autosize:update",c),t.addEventListener("input",i),window.addEventListener("resize",c),t.style.overflowX="hidden",t.style.wordWrap="break-word",Je.set(t,{destroy:o,update:c}),c()}function a(e){var i,o,c=e.restoreTextAlign,u=void 0===c?null:c,s=e.testForHeightReduction,l=void 0===s||s,f=r.overflowY;if(0!==t.scrollHeight&&("vertical"===r.resize?t.style.resize="none":"both"===r.resize&&(t.style.resize="horizontal"),l&&(i=function(t){for(var e=[];t&&t.parentNode&&t.parentNode instanceof Element;)t.parentNode.scrollTop&&e.push([t.parentNode,t.parentNode.scrollTop]),t=t.parentNode;return function(){return e.forEach((function(t){var e=t[0],n=t[1];e.style.scrollBehavior="auto",e.scrollTop=n,e.style.scrollBehavior=null}))}}(t),t.style.height=""),o="content-box"===r.boxSizing?t.scrollHeight-(parseFloat(r.paddingTop)+parseFloat(r.paddingBottom)):t.scrollHeight+parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth),"none"!==r.maxHeight&&o>parseFloat(r.maxHeight)?("hidden"===r.overflowY&&(t.style.overflow="scroll"),o=parseFloat(r.maxHeight)):"hidden"!==r.overflowY&&(t.style.overflow="hidden"),t.style.height=o+"px",u&&(t.style.textAlign=u),i&&i(),n!==o&&(t.dispatchEvent(new Event("autosize:resized",{bubbles:!0})),n=o),f!==r.overflow&&!u)){var h=r.textAlign;"hidden"===r.overflow&&(t.style.textAlign="start"===h?"end":"start"),a({restoreTextAlign:h,testForHeightReduction:!0})}}function c(){a({testForHeightReduction:!0,restoreTextAlign:null})}}(t)})),t}).destroy=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],Xe),t},Ke.update=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],Ze),t});var Qe=Ke,tn=new Z("chat-input"),en=function(t){var e=mt(null),n=t.controller.input,r=te(!1),i=bt((function(t){n.value=t.target.value}),[n]),o=ee((function(){return n.value.length<=0||!0===r.value}));yt((function(){return e.current&&Qe(e.current),function(){e.current&&Qe.destroy(e.current)}}),[e]);var c=bt(u(a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r.value=!0,e.prev=1,e.next=4,t.controller.question(n.value);case 4:n.value="",e.next=10;break;case 7:e.prev=7,e.t0=e.catch(1),console.error(e.t0);case 10:return e.prev=10,r.value=!1,e.finish(10);case 13:case"end":return e.stop()}}),e,null,[[1,7,10,13]])}))),[n,r]);return re("div",{className:tn.b(),children:[re("textarea",{className:tn.e("textarea"),type:"text",wrap:"off",rows:6,autoCorrect:"off",autoCapitalize:"off",autoComplete:"off",value:n,onInput:i,onKeyDown:function(t){"Enter"===t.code&&(t.stopPropagation(),!1===t.shiftKey&&c())},ref:e,disabled:r}),re("div",{className:tn.b("action-wrapper"),children:re("div",{title:r?"思考中...":"发送消息",className:"".concat(tn.be("action-wrapper","action-item")," ").concat(tn.is("disabled",o.value)," ").concat(tn.is("loading",r.value)),onClick:c,disabled:o,children:re(ae,{})})})]})},nn=function(t){return t.STYLE_CACHE="ai-chat-style-cache",t}(nn||{}),rn=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&n(t,e)}(o,t);var e=r(o);function o(t){var n;return l(this,o),_(i(n=e.call(this,t)),"ns",new Z("chat-container")),_(i(n),"containerRef",{current:null}),_(i(n),"dragHandle",{current:null}),_(i(n),"data",{x:window.innerWidth-600-100,y:100,width:600,height:600,minWidth:300,minHeight:300}),n.state={isFullScreen:!1},n}return h(o,[{key:"calcStyle",value:function(){return{right:"0px",top:"0px",height:"100vh",width:"".concat(this.data.width,"px"),"z-index":"1000"}}},{key:"setStyle",value:function(){Object.assign(this.containerRef.current.style,this.calcStyle())}},{key:"componentDidMount",value:function(){var t=this,e=localStorage.getItem(nn.STYLE_CACHE);e&&(this.data=JSON.parse(e),this.data.x>window.innerWidth&&(this.data.x=window.innerWidth-100),this.data.y>window.innerHeight&&(this.data.y=window.innerHeight-100)),this.setStyle();var n=this.data;c(this.containerRef.current).resizable({edges:{top:!1,right:!0,bottom:!1,left:!0},margin:6,modifiers:[c.modifiers.restrictEdges({outer:document.body}),c.modifiers.restrictSize({min:{width:n.minWidth,height:n.minHeight}})],inertia:!0,listeners:{move:function(e){n.x+=e.deltaRect.left,n.y+=e.deltaRect.top,n.width=e.rect.width,n.height=e.rect.height,t.setStyle()}}})}},{key:"componentWillUnmount",value:function(){localStorage.setItem(nn.STYLE_CACHE,JSON.stringify(this.data))}},{key:"close",value:function(){this.props.close()}},{key:"fullScreen",value:function(){var t=this.containerRef.current;t&&(t.requestFullscreen(),this.setState({isFullScreen:!0}))}},{key:"closeFullScreen",value:function(){var t;this.state.isFullScreen&&(null===(t=document)||void 0===t||t.exitFullscreen(),this.setState({isFullScreen:!1}))}},{key:"render",value:function(){return re("div",{className:"\n ".concat(this.ns.b(),"\n ").concat(this.ns.is("full-screen",this.state.isFullScreen)),ref:this.containerRef,children:[re("div",{ref:this.dragHandle,className:this.ns.b("header"),children:[re("div",{className:this.ns.b("header-caption"),children:"AIChat"}),re("div",{className:this.ns.b("header-action-wrapper"),children:[this.state.isFullScreen?re("div",{className:"".concat(this.ns.be("header-action-wrapper","action-item")," ").concat(this.ns.be("header-action-wrapper","close-full-screen")),onClick:this.closeFullScreen.bind(this),children:re(fe,{})}):re("div",{className:"".concat(this.ns.be("header-action-wrapper","action-item")," ").concat(this.ns.be("header-action-wrapper","full-screen")),onClick:this.fullScreen.bind(this),children:re(le,{})}),re("div",{className:"".concat(this.ns.be("header-action-wrapper","action-item")," ").concat(this.ns.be("header-action-wrapper","action-close")),onClick:this.close.bind(this),children:re(ie,{})})]})]}),re("div",{className:this.ns.b("content"),children:re(xe,{controller:this.props.controller})}),re("div",{className:this.ns.b("footer"),children:re(en,{controller:this.props.controller})})]})}}]),o}(L);e("ChatContainer",rn);var on=function(){function t(e){l(this,t),this.msg=e}return h(t,[{key:"messageid",get:function(){return this.msg.messageid}},{key:"state",get:function(){return this.msg.state}},{key:"role",get:function(){return this.msg.role}},{key:"type",get:function(){return this.msg.type}},{key:"content",get:function(){return this.msg.content}},{key:"_origin",get:function(){return this.msg}},{key:"update",value:function(t){t.content||(t.content=""),this.msg.content+=t.content}}]),t}(),an=function(){function e(t){l(this,e),_(this,"messages",Ut([])),_(this,"input",Ut("")),this.opts=t}var n,r;return h(e,[{key:"setInput",value:function(t){this.input.value=t||""}},{key:"addMessage",value:function(e){var n=this.messages.value.find((function(t){return t.messageid===e.messageid}));n?(n.update(e),this.messages.value=t(this.messages.value)):this.messages.value=[].concat(t(this.messages.value),[new on(e)])}},{key:"replaceMessage",value:function(e){var n=this.messages.value.findIndex((function(t){return t.messageid===e.messageid}));-1!==n?(this.messages.value[n]=new on(e),this.messages.value=t(this.messages.value)):this.messages.value=[].concat(t(this.messages.value),[new on(e)])}},{key:"question",value:(r=u(a().mark((function t(e){return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.addMessage({state:30,messageid:nt(),role:"USER",type:"DEFAULT",content:e}),t.next=3,this.opts.question(this.messages.value.filter((function(t){return"ERROR"!==t.type})).map((function(t){return t._origin})));case 3:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"backfill",value:function(t){this.opts.action&&this.opts.action("backfill",t)}},{key:"deleteMessage",value:function(e){var n=this.messages.value.findIndex((function(t){return t.messageid===e.messageid}));-1!==n&&(this.messages.value.splice(n,1),this.messages.value=t(this.messages.value))}},{key:"refreshMessage",value:(n=u(a().mark((function t(e){return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.deleteMessage(e),t.next=3,this.opts.question(this.messages.value.filter((function(t){return"ERROR"!==t.type})).map((function(t){return t._origin})));case 3:case"end":return t.stop()}}),t,this)}))),function(t){return n.apply(this,arguments)})},{key:"copyMessage",value:function(t){var e=t.content;rt.copy(e)}}]),e}(),cn=function(){function t(){l(this,t),_(this,"container",void 0)}return h(t,[{key:"create",value:function(t){var e=this;this.close(),this.container=document.createElement("div"),this.container.classList.add("ibiz-ai-chat"),document.body.appendChild(this.container);var n=new an(t);return J(C(rn,{controller:n,close:function(){e.close(),t.closed&&t.closed()}}),this.container),n}},{key:"hidden",value:function(){this.container&&(this.container.style.display="none")}},{key:"show",value:function(){this.container&&(this.container.style.display="flex")}},{key:"close",value:function(){this.container&&(J(null,this.container),this.container.remove(),this.container=void 0)}}]),t}();e("chat",new cn)}}}))}();
1
+ !function(){function e(e){return function(e){if(Array.isArray(e))return t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(!e)return;if("string"==typeof e)return t(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return t(e,n)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function n(e,t){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},n(e,t)}function r(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=o(e);if(t){var a=o(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===u(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return i(e)}(this,n)}}function i(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}function a(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */a=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function f(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,n){return e[t]=n}}function h(e,t,n,r){var o=t&&t.prototype instanceof g?t:g,a=Object.create(o.prototype),s=new H(r||[]);return i(a,"_invoke",{value:A(e,n,s)}),a}function _(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=h;var v="suspendedStart",d="suspendedYield",p="executing",y="completed",m={};function g(){}function b(){}function w(){}var k={};f(k,s,(function(){return this}));var x=Object.getPrototypeOf,S=x&&x(x(T([])));S&&S!==n&&r.call(S,s)&&(k=S);var E=w.prototype=g.prototype=Object.create(k);function N(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function n(i,o,a,s){var c=_(e[i],e,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==u(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(f).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,s)}))}s(c.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function A(t,n,r){var i=v;return function(o,a){if(i===p)throw new Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var c=O(s,r);if(c){if(c===m)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===v)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=p;var u=_(t,n,r);if("normal"===u.type){if(i=r.done?y:d,u.arg===m)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(i=y,r.method="throw",r.arg=u.arg)}}}function O(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,O(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=_(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function H(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function T(t){if(t||""===t){var n=t[s];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(u(t)+" is not iterable")}return b.prototype=w,i(E,"constructor",{value:w,configurable:!0}),i(w,"constructor",{value:b,configurable:!0}),b.displayName=f(w,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,f(e,l,"GeneratorFunction")),e.prototype=Object.create(E),e},t.awrap=function(e){return{__await:e}},N(C.prototype),f(C.prototype,c,(function(){return this})),t.AsyncIterator=C,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new C(h(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},N(E),f(E,l,"Generator"),f(E,s,(function(){return this})),f(E,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=T,H.prototype={constructor:H,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),P(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;P(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:T(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function s(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){s(o,r,i,a,c,"next",e)}function c(e){s(o,r,i,a,c,"throw",e)}a(void 0)}))}}function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,v(r.key),r)}}function h(e,t,n){return t&&f(e.prototype,t),n&&f(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _(e,t,n){return(t=v(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(e){var t=function(e,t){if("object"!==u(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===u(t)?t:String(t)}System.register(["interactjs","cherry-markdown"],(function(t,o){"use strict";var s,f;return{setters:[function(e){s=e.default},function(e){f=e.default}],execute:function(){var o,v,d,p,y,m,g,b,w={},k=[],x=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,S=Array.isArray;function E(e,t){for(var n in t)e[n]=t[n];return e}function N(e){var t=e.parentNode;t&&t.removeChild(e)}function C(e,t,n){var r,i,a,s={};for(a in t)"key"==a?r=t[a]:"ref"==a?i=t[a]:s[a]=t[a];if(arguments.length>2&&(s.children=arguments.length>3?o.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===s[a]&&(s[a]=e.defaultProps[a]);return A(e,s,r,i,null)}function A(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==i?++d:i};return null==i&&null!=v.vnode&&v.vnode(o),o}function O(e){return e.children}function L(e,t){this.props=e,this.context=t}function P(e,t){if(null==t)return e.__?P(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__d||n.__e;return"function"==typeof e.type?P(e):null}function H(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return H(e)}}function T(e){(!e.__d&&(e.__d=!0)&&y.push(e)&&!z.__r++||m!==v.debounceRendering)&&((m=v.debounceRendering)||g)(z)}function z(){var e,t,n,r,i,o,a,s,c;for(y.sort(b);e=y.shift();)e.__d&&(t=y.length,r=void 0,i=void 0,o=void 0,s=(a=(n=e).__v).__e,(c=n.__P)&&(r=[],i=[],(o=E({},a)).__v=a.__v+1,$(c,a,o,n.__n,void 0!==c.ownerSVGElement,null!=a.__h?[s]:null,r,null==s?P(a):s,a.__h,i),D(r,a,i),a.__e!=s&&H(a)),y.length>t&&y.sort(b));z.__r=0}function R(e,t,n,r,i,o,a,s,c,u,l){var f,h,_,v,d,p,y,m,g,b=0,x=r&&r.__k||k,E=x.length,N=E,C=t.length;for(n.__k=[],f=0;f<C;f++)null!=(v=n.__k[f]=null==(v=t[f])||"boolean"==typeof v||"function"==typeof v?null:"string"==typeof v||"number"==typeof v||"bigint"==typeof v?A(null,v,null,null,v):S(v)?A(O,{children:v},null,null,null):v.__b>0?A(v.type,v.props,v.key,v.ref?v.ref:null,v.__v):v)?(v.__=n,v.__b=n.__b+1,-1===(m=U(v,x,y=f+b,N))?_=w:(_=x[m]||w,x[m]=void 0,N--),$(e,v,_,i,o,a,s,c,u,l),d=v.__e,(h=v.ref)&&_.ref!=h&&(_.ref&&q(_.ref,null,v),l.push(h,v.__c||d,v)),null!=d&&(null==p&&(p=d),(g=_===w||null===_.__v)?-1==m&&b--:m!==y&&(m===y+1?b++:m>y?N>C-y?b+=m-y:b--:b=m<y&&m==y-1?m-y:0),y=f+b,"function"!=typeof v.type||m===y&&_.__k!==v.__k?"function"==typeof v.type||m===y&&!g?void 0!==v.__d?(c=v.__d,v.__d=void 0):c=d.nextSibling:c=F(e,d,c):c=j(v,c,e),"function"==typeof n.type&&(n.__d=c))):(_=x[f])&&null==_.key&&_.__e&&(_.__e==c&&(_.__=r,c=P(_)),G(_,_,!1),x[f]=null);for(n.__e=p,f=E;f--;)null!=x[f]&&("function"==typeof n.type&&null!=x[f].__e&&x[f].__e==n.__d&&(n.__d=x[f].__e.nextSibling),G(x[f],x[f]))}function j(e,t,n){for(var r,i=e.__k,o=0;i&&o<i.length;o++)(r=i[o])&&(r.__=e,t="function"==typeof r.type?j(r,t,n):F(n,r.__e,t));return t}function M(e,t){return t=t||[],null==e||"boolean"==typeof e||(S(e)?e.some((function(e){M(e,t)})):t.push(e)),t}function F(e,t,n){return null==n||n.parentNode!==e?e.insertBefore(t,null):t==n&&null!=t.parentNode||e.insertBefore(t,n),t.nextSibling}function U(e,t,n,r){var i=e.key,o=e.type,a=n-1,s=n+1,c=t[n];if(null===c||c&&i==c.key&&o===c.type)return n;if(r>(null!=c?1:0))for(;a>=0||s<t.length;){if(a>=0){if((c=t[a])&&i==c.key&&o===c.type)return a;a--}if(s<t.length){if((c=t[s])&&i==c.key&&o===c.type)return s;s++}}return-1}function V(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||x.test(t)?n:n+"px"}function W(e,t,n,r,i){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||V(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||V(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/(PointerCapture)$|Capture$/,"$1")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r?n.u=r.u:(n.u=Date.now(),e.addEventListener(t,o?I:B,o)):e.removeEventListener(t,o?I:B,o);else if("dangerouslySetInnerHTML"!==t){if(i)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&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,n))}}function B(e){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(v.event?v.event(e):e)}function I(e){return this.l[e.type+!0](v.event?v.event(e):e)}function $(e,t,n,r,i,a,s,c,u,l){var f,h,_,d,p,y,m,g,b,k,x,C,A,H,T,z=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(u=n.__h,c=t.__e=n.__e,t.__h=null,a=[c]),(f=v.__b)&&f(t);e:if("function"==typeof z)try{if(g=t.props,b=(f=z.contextType)&&r[f.__c],k=f?b?b.props.value:f.__:r,n.__c?m=(h=t.__c=n.__c).__=h.__E:("prototype"in z&&z.prototype.render?t.__c=h=new z(g,k):(t.__c=h=new L(g,k),h.constructor=z,h.render=Y),b&&b.sub(h),h.props=g,h.state||(h.state={}),h.context=k,h.__n=r,_=h.__d=!0,h.__h=[],h._sb=[]),null==h.__s&&(h.__s=h.state),null!=z.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=E({},h.__s)),E(h.__s,z.getDerivedStateFromProps(g,h.__s))),d=h.props,p=h.state,h.__v=t,_)null==z.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(null==z.getDerivedStateFromProps&&g!==d&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(g,k),!h.__e&&(null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(g,h.__s,k)||t.__v===n.__v)){for(t.__v!==n.__v&&(h.props=g,h.state=h.__s,h.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),x=0;x<h._sb.length;x++)h.__h.push(h._sb[x]);h._sb=[],h.__h.length&&s.push(h);break e}null!=h.componentWillUpdate&&h.componentWillUpdate(g,h.__s,k),null!=h.componentDidUpdate&&h.__h.push((function(){h.componentDidUpdate(d,p,y)}))}if(h.context=k,h.props=g,h.__P=e,h.__e=!1,C=v.__r,A=0,"prototype"in z&&z.prototype.render){for(h.state=h.__s,h.__d=!1,C&&C(t),f=h.render(h.props,h.state,h.context),H=0;H<h._sb.length;H++)h.__h.push(h._sb[H]);h._sb=[]}else do{h.__d=!1,C&&C(t),f=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++A<25);h.state=h.__s,null!=h.getChildContext&&(r=E(E({},r),h.getChildContext())),_||null==h.getSnapshotBeforeUpdate||(y=h.getSnapshotBeforeUpdate(d,p)),R(e,S(T=null!=f&&f.type===O&&null==f.key?f.props.children:f)?T:[T],t,n,r,i,a,s,c,u,l),h.base=t.__e,t.__h=null,h.__h.length&&s.push(h),m&&(h.__E=h.__=null)}catch(e){t.__v=null,(u||null!=a)&&(t.__e=c,t.__h=!!u,a[a.indexOf(c)]=null),v.__e(e,t,n)}else null==a&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=function(e,t,n,r,i,a,s,c,u){var l,f,h,_=n.props,v=t.props,d=t.type,p=0;if("svg"===d&&(i=!0),null!=a)for(;p<a.length;p++)if((l=a[p])&&"setAttribute"in l==!!d&&(d?l.localName===d:3===l.nodeType)){e=l,a[p]=null;break}if(null==e){if(null===d)return document.createTextNode(v);e=i?document.createElementNS("http://www.w3.org/2000/svg",d):document.createElement(d,v.is&&v),a=null,c=!1}if(null===d)_===v||c&&e.data===v||(e.data=v);else{if(a=a&&o.call(e.childNodes),f=(_=n.props||w).dangerouslySetInnerHTML,h=v.dangerouslySetInnerHTML,!c){if(null!=a)for(_={},p=0;p<e.attributes.length;p++)_[e.attributes[p].name]=e.attributes[p].value;(h||f)&&(h&&(f&&h.__html==f.__html||h.__html===e.innerHTML)||(e.innerHTML=h&&h.__html||""))}if(function(e,t,n,r,i){var o;for(o in n)"children"===o||"key"===o||o in t||W(e,o,null,n[o],r);for(o in t)i&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||n[o]===t[o]||W(e,o,t[o],n[o],r)}(e,v,_,i,c),h)t.__k=[];else if(R(e,S(p=t.props.children)?p:[p],t,n,r,i&&"foreignObject"!==d,a,s,a?a[0]:n.__k&&P(n,0),c,u),null!=a)for(p=a.length;p--;)null!=a[p]&&N(a[p]);c||("value"in v&&void 0!==(p=v.value)&&(p!==e.value||"progress"===d&&!p||"option"===d&&p!==_.value)&&W(e,"value",p,_.value,!1),"checked"in v&&void 0!==(p=v.checked)&&p!==e.checked&&W(e,"checked",p,_.checked,!1))}return e}(n.__e,t,n,r,i,a,s,u,l);(f=v.diffed)&&f(t)}function D(e,t,n){for(var r=0;r<n.length;r++)q(n[r],n[++r],n[++r]);v.__c&&v.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){v.__e(e,t.__v)}}))}function q(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){v.__e(e,n)}}function G(e,t,n){var r,i;if(v.unmount&&v.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||q(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){v.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&G(r[i],t,n||"function"!=typeof e.type);n||null==e.__e||N(e.__e),e.__=e.__e=e.__d=void 0}function Y(e,t,n){return this.constructor(e,n)}function J(e,t,n){var r,i,a,s;v.__&&v.__(e,t),i=(r="function"==typeof n)?null:n&&n.__k||t.__k,a=[],s=[],$(t,e=(!r&&n||t).__k=C(O,null,[e]),i||w,w,void 0!==t.ownerSVGElement,!r&&n?[n]:i?null:t.firstChild?o.call(t.childNodes):null,a,!r&&n?n:i?i.__e:t.firstChild,r,s),D(a,e,s)}o=k.slice,v={__e:function(e,t,n,r){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),a=i.__d),a)return i.__E=i}catch(t){e=t}throw e}},d=0,p=function(e){return null!=e&&void 0===e.constructor},L.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=E({},this.state),"function"==typeof e&&(e=e(E({},n),this.props)),e&&E(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),T(this))},L.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),T(this))},L.prototype.render=O,y=[],g="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,b=function(e,t){return e.__v.__b-t.__v.__b},z.__r=0;function X(e,t,n,r,i){var o="".concat(e,"-").concat(t);return n&&(o+="-".concat(n)),r&&(o+="__".concat(r)),i&&(o+="--".concat(i)),o}var Z=function(){function e(t,n){l(this,e),_(this,"namespace",void 0),this.block=t,this.namespace=n||"ibiz"}return h(e,[{key:"b",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return X(this.namespace,this.block,e,"","")}},{key:"e",value:function(e){return e?X(this.namespace,this.block,"",e,""):""}},{key:"m",value:function(e){return e?X(this.namespace,this.block,"","",e):""}},{key:"be",value:function(e,t){return e&&t?X(this.namespace,this.block,e,t,""):""}},{key:"em",value:function(e,t){return e&&t?X(this.namespace,this.block,"",e,t):""}},{key:"bm",value:function(e,t){return e&&t?X(this.namespace,this.block,e,"",t):""}},{key:"bem",value:function(e,t,n){return e&&t&&n?X(this.namespace,this.block,e,t,n):""}},{key:"is",value:function(e,t){return e&&t?"".concat("is-").concat(e):""}},{key:"cssVar",value:function(e){var t={};for(var n in e)e[n]&&(t[this.cssVarName(n)]=e[n]);return t}},{key:"cssVarBlock",value:function(e){var t={};for(var n in e)e[n]&&(t[this.cssVarBlockName(n)]=e[n]);return t}},{key:"cssVarName",value:function(e){return"--".concat(this.namespace,"-").concat(e)}},{key:"cssVarBlockName",value:function(e){return"--".concat(this.namespace,"-").concat(this.block,"-").concat(e)}}]),e}();function K(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function Q(e,t){for(var n,r="",i=0,o=-1,a=0,s=0;s<=e.length;++s){if(s<e.length)n=e.charCodeAt(s);else{if(47===n)break;n=47}if(47===n){if(o===s-1||1===a);else if(o!==s-1&&2===a){if(r.length<2||2!==i||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2))if(r.length>2){var c=r.lastIndexOf("/");if(c!==r.length-1){-1===c?(r="",i=0):i=(r=r.slice(0,c)).length-1-r.lastIndexOf("/"),o=s,a=0;continue}}else if(2===r.length||1===r.length){r="",i=0,o=s,a=0;continue}t&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+e.slice(o+1,s):r=e.slice(o+1,s),i=s-o-1;o=s,a=0}else 46===n&&-1!==a?++a:a=-1}return r}var ee={resolve:function(){for(var e,t="",n=!1,r=arguments.length-1;r>=-1&&!n;r--){var i;r>=0?i=arguments[r]:(void 0===e&&(e=process.cwd()),i=e),K(i),0!==i.length&&(t=i+"/"+t,n=47===i.charCodeAt(0))}return t=Q(t,!n),n?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(e){if(K(e),0===e.length)return".";var t=47===e.charCodeAt(0),n=47===e.charCodeAt(e.length-1);return 0!==(e=Q(e,!t)).length||t||(e="."),e.length>0&&n&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return K(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,t=0;t<arguments.length;++t){var n=arguments[t];K(n),n.length>0&&(void 0===e?e=n:e+="/"+n)}return void 0===e?".":ee.normalize(e)},relative:function(e,t){if(K(e),K(t),e===t)return"";if((e=ee.resolve(e))===(t=ee.resolve(t)))return"";for(var n=1;n<e.length&&47===e.charCodeAt(n);++n);for(var r=e.length,i=r-n,o=1;o<t.length&&47===t.charCodeAt(o);++o);for(var a=t.length-o,s=i<a?i:a,c=-1,u=0;u<=s;++u){if(u===s){if(a>s){if(47===t.charCodeAt(o+u))return t.slice(o+u+1);if(0===u)return t.slice(o+u)}else i>s&&(47===e.charCodeAt(n+u)?c=u:0===u&&(c=0));break}var l=e.charCodeAt(n+u);if(l!==t.charCodeAt(o+u))break;47===l&&(c=u)}var f="";for(u=n+c+1;u<=r;++u)u!==r&&47!==e.charCodeAt(u)||(0===f.length?f+="..":f+="/..");return f.length>0?f+t.slice(o+c):(o+=c,47===t.charCodeAt(o)&&++o,t.slice(o))},_makeLong:function(e){return e},dirname:function(e){if(K(e),0===e.length)return".";for(var t=e.charCodeAt(0),n=47===t,r=-1,i=!0,o=e.length-1;o>=1;--o)if(47===(t=e.charCodeAt(o))){if(!i){r=o;break}}else i=!1;return-1===r?n?"/":".":n&&1===r?"//":e.slice(0,r)},basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');K(e);var n,r=0,i=-1,o=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var a=t.length-1,s=-1;for(n=e.length-1;n>=0;--n){var c=e.charCodeAt(n);if(47===c){if(!o){r=n+1;break}}else-1===s&&(o=!1,s=n+1),a>=0&&(c===t.charCodeAt(a)?-1==--a&&(i=n):(a=-1,i=s))}return r===i?i=s:-1===i&&(i=e.length),e.slice(r,i)}for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!o){r=n+1;break}}else-1===i&&(o=!1,i=n+1);return-1===i?"":e.slice(r,i)},extname:function(e){K(e);for(var t=-1,n=0,r=-1,i=!0,o=0,a=e.length-1;a>=0;--a){var s=e.charCodeAt(a);if(47!==s)-1===r&&(i=!1,r=a+1),46===s?-1===t?t=a:1!==o&&(o=1):-1!==t&&(o=-1);else if(!i){n=a+1;break}}return-1===t||-1===r||0===o||1===o&&t===r-1&&t===n+1?"":e.slice(t,r)},format:function(e){if(null===e||"object"!==u(e))throw new TypeError('The "pathObject" argument must be of type Object. Received type '+u(e));return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+r:n+e+r:r}("/",e)},parse:function(e){K(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var n,r=e.charCodeAt(0),i=47===r;i?(t.root="/",n=1):n=0;for(var o=-1,a=0,s=-1,c=!0,u=e.length-1,l=0;u>=n;--u)if(47!==(r=e.charCodeAt(u)))-1===s&&(c=!1,s=u+1),46===r?-1===o?o=u:1!==l&&(l=1):-1!==o&&(l=-1);else if(!c){a=u+1;break}return-1===o||-1===s||0===l||1===l&&o===s-1&&o===a+1?-1!==s&&(t.base=t.name=0===a&&i?e.slice(1,s):e.slice(a,s)):(0===a&&i?(t.name=e.slice(1,o),t.base=e.slice(1,s)):(t.name=e.slice(a,o),t.base=e.slice(a,s)),t.ext=e.slice(o,s)),a>0?t.dir=e.slice(0,a-1):i&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};function te(){return(65536*(1+Math.random())|0).toString(16).substring(1)}function ne(){return"".concat(te()+te(),"-").concat(te(),"-").concat(te(),"-").concat(te(),"-").concat(te()).concat(te()).concat(te())}ee.posix=ee;var re=function(){function e(){l(this,e)}return h(e,null,[{key:"copy",value:function(e){return this.inputElement||(this.inputElement=document.createElement("input"),this.inputElement.style.position="absolute",this.inputElement.style.left="-9999px",document.body.appendChild(this.inputElement)),this.inputElement.value=e,this.inputElement.select(),document.execCommand("copy")}}]),e}();_(re,"inputElement",null);var ie,oe,ae,se,ce=0,ue=[],le=[],fe=v.__b,he=v.__r,_e=v.diffed,ve=v.__c,de=v.unmount;function pe(e,t){v.__h&&v.__h(oe,e,ce||t),ce=0;var n=oe.__H||(oe.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:le}),n.__[e]}function ye(e,t){var n=pe(ie++,3);!v.__s&&Ne(n.__H,t)&&(n.__=e,n.i=t,oe.__H.__h.push(n))}function me(e){return ce=5,ge((function(){return{current:e}}),[])}function ge(e,t){var n=pe(ie++,7);return Ne(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function be(e,t){return ce=8,ge((function(){return e}),t)}function we(){for(var e;e=ue.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Se),e.__H.__h.forEach(Ee),e.__H.__h=[]}catch(Kt){e.__H.__h=[],v.__e(Kt,e.__v)}}v.__b=function(e){oe=null,fe&&fe(e)},v.__r=function(e){he&&he(e),ie=0;var t=(oe=e.__c).__H;t&&(ae===oe?(t.__h=[],oe.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=le,e.__N=e.i=void 0}))):(t.__h.forEach(Se),t.__h.forEach(Ee),t.__h=[],ie=0)),ae=oe},v.diffed=function(e){_e&&_e(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==ue.push(t)&&se===v.requestAnimationFrame||((se=v.requestAnimationFrame)||xe)(we)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==le&&(e.__=e.__V),e.i=void 0,e.__V=le}))),ae=oe=null},v.__c=function(e,t){t.some((function(e){try{e.__h.forEach(Se),e.__h=e.__h.filter((function(e){return!e.__||Ee(e)}))}catch(je){t.some((function(e){e.__h&&(e.__h=[])})),t=[],v.__e(je,e.__v)}})),ve&&ve(e,t)},v.unmount=function(e){de&&de(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{Se(e)}catch(e){t=e}})),n.__H=void 0,t&&v.__e(t,n.__v))};var ke="function"==typeof requestAnimationFrame;function xe(e){var t,n=function(){clearTimeout(r),ke&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);ke&&(t=requestAnimationFrame(n))}function Se(e){var t=oe,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),oe=t}function Ee(e){var t=oe;e.__c=e.__(),oe=t}function Ne(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function Ce(){throw new Error("Cycle detected")}var Ae=Symbol.for("preact-signals");function Oe(){if(ze>1)ze--;else{for(var e,t=!1;void 0!==Te;){var n=Te;for(Te=void 0,Re++;void 0!==n;){var r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&Ve(n))try{n.c()}catch(n){t||(e=n,t=!0)}n=r}}if(Re=0,ze--,t)throw e}}var Le,Pe,He=void 0,Te=void 0,ze=0,Re=0,je=0;function Me(e){if(void 0!==He){var t=e.n;if(void 0===t||t.t!==He)return t={i:0,S:e,p:He.s,n:void 0,t:He,e:void 0,x:void 0,r:t},void 0!==He.s&&(He.s.n=t),He.s=t,e.n=t,32&He.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=He.s,t.n=void 0,He.s.n=t,He.s=t),t}}function Fe(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}function Ue(e){return new Fe(e)}function Ve(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 We(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 Be(e){for(var t=e.s,n=void 0;void 0!==t;){var r=t.p;-1===t.i?(t.S.U(t),void 0!==r&&(r.n=t.n),void 0!==t.n&&(t.n.p=r)):n=t,t.S.n=t.r,void 0!==t.r&&(t.r=void 0),t=r}e.s=n}function Ie(e){Fe.call(this,void 0),this.x=e,this.s=void 0,this.g=je-1,this.f=4}function $e(e){return new Ie(e)}function De(e){var t=e.u;if(e.u=void 0,"function"==typeof t){ze++;var n=He;He=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,qe(e),t}finally{He=n,Oe()}}}function qe(e){for(var t=e.s;void 0!==t;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,De(e)}function Ge(e){if(He!==this)throw new Error("Out-of-order effect");Be(this),He=e,this.f&=-2,8&this.f&&qe(this),Oe()}function Ye(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}function Je(e){var t=new Ye(e);try{t.c()}catch(e){throw t.d(),e}return t.d.bind(t)}function Xe(e,t){v[e]=t.bind(null,v[e]||function(){})}function Ze(e){Pe&&Pe(),Pe=e&&e.S()}function Ke(e){var t=this,n=e.data,r=et(n);r.value=n;var i=ge((function(){for(var e=t.__v;e=e.__;)if(e.__c){e.__c.__$f|=4;break}return t.__$u.c=function(){var e;p(i.peek())||3!==(null==(e=t.base)?void 0:e.nodeType)?(t.__$f|=1,t.setState({})):t.base.data=i.peek()},$e((function(){var e=r.value.value;return 0===e?0:!0===e?"":e||""}))}),[]);return i.value}function Qe(e,t,n,r){var i=t in e&&void 0===e.ownerSVGElement,o=Ue(n);return{o:function(e,t){o.value=e,r=t},d:Je((function(){var n=o.value.value;r[t]!==n&&(r[t]=n,i?e[t]=n:n?e.setAttribute(t,n):e.removeAttribute(t))}))}}function et(e){return ge((function(){return Ue(e)}),[])}function tt(e){var t=me(e);return t.current=e,Le.__$f|=4,ge((function(){return $e((function(){return t.current()}))}),[])}Fe.prototype.brand=Ae,Fe.prototype.h=function(){return!0},Fe.prototype.S=function(e){this.t!==e&&void 0===e.e&&(e.x=this.t,void 0!==this.t&&(this.t.e=e),this.t=e)},Fe.prototype.U=function(e){if(void 0!==this.t){var t=e.e,n=e.x;void 0!==t&&(t.x=n,e.e=void 0),void 0!==n&&(n.e=t,e.x=void 0),e===this.t&&(this.t=n)}},Fe.prototype.subscribe=function(e){var t=this;return Je((function(){var n=t.value,r=32&this.f;this.f&=-33;try{e(n)}finally{this.f|=r}}))},Fe.prototype.valueOf=function(){return this.value},Fe.prototype.toString=function(){return this.value+""},Fe.prototype.toJSON=function(){return this.value},Fe.prototype.peek=function(){return this.v},Object.defineProperty(Fe.prototype,"value",{get:function(){var e=Me(this);return void 0!==e&&(e.i=this.i),this.v},set:function(e){if(He instanceof Ie&&function(){throw new Error("Computed cannot have side-effects")}(),e!==this.v){Re>100&&Ce(),this.v=e,this.i++,je++,ze++;try{for(var t=this.t;void 0!==t;t=t.x)t.t.N()}finally{Oe()}}}}),(Ie.prototype=new Fe).h=function(){if(this.f&=-3,1&this.f)return!1;if(32==(36&this.f))return!0;if(this.f&=-5,this.g===je)return!0;if(this.g=je,this.f|=1,this.i>0&&!Ve(this))return this.f&=-2,!0;var e=He;try{We(this),He=this;var t=this.x();(16&this.f||this.v!==t||0===this.i)&&(this.v=t,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return He=e,Be(this),this.f&=-2,!0},Ie.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)}Fe.prototype.S.call(this,e)},Ie.prototype.U=function(e){if(void 0!==this.t&&(Fe.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)}},Ie.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;void 0!==e;e=e.x)e.t.N()}},Ie.prototype.peek=function(){if(this.h()||Ce(),16&this.f)throw this.v;return this.v},Object.defineProperty(Ie.prototype,"value",{get:function(){1&this.f&&Ce();var e=Me(this);if(this.h(),void 0!==e&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),Ye.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.u=t)}finally{e()}},Ye.prototype.S=function(){1&this.f&&Ce(),this.f|=1,this.f&=-9,De(this),We(this),ze++;var e=He;return He=this,Ge.bind(this,e)},Ye.prototype.N=function(){2&this.f||(this.f|=2,this.o=Te,Te=this)},Ye.prototype.d=function(){this.f|=8,1&this.f||qe(this)},Ke.displayName="_st",Object.defineProperties(Fe.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:Ke},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),Xe("__b",(function(e,t){if("string"==typeof t.type){var n,r=t.props;for(var i in r)if("children"!==i){var o=r[i];o instanceof Fe&&(n||(t.__np=n={}),n[i]=o,r[i]=o.peek())}}e(t)})),Xe("__r",(function(e,t){Ze();var n,r=t.__c;r&&(r.__$f&=-2,void 0===(n=r.__$u)&&(r.__$u=n=function(e){var t;return Je((function(){t=this})),t.c=function(){r.__$f|=1,r.setState({})},t}())),Le=r,Ze(n),e(t)})),Xe("__e",(function(e,t,n,r){Ze(),Le=void 0,e(t,n,r)})),Xe("diffed",(function(e,t){var n;if(Ze(),Le=void 0,"string"==typeof t.type&&(n=t.__e)){var r=t.__np,i=t.props;if(r){var o=n.U;if(o)for(var a in o){var s=o[a];void 0===s||a in r||(s.d(),o[a]=void 0)}else n.U=o={};for(var c in r){var u=o[c],l=r[c];void 0===u?(u=Qe(n,c,l,i),o[c]=u):u.o(l,i)}}}e(t)})),Xe("unmount",(function(e,t){if("string"==typeof t.type){var n=t.__e;if(n){var r=n.U;if(r)for(var i in n.U=void 0,r){var o=r[i];o&&o.d()}}}else{var a=t.__c;if(a){var s=a.__$u;s&&(a.__$u=void 0,s.d())}}e(t)})),Xe("__h",(function(e,t,n,r){(r<3||9===r)&&(t.__$f|=2),e(t,n,r)})),L.prototype.shouldComponentUpdate=function(e,t){var n=this.__$u;if(!(n&&void 0!==n.s||4&this.__$f))return!0;if(3&this.__$f)return!0;for(var r in t)return!0;for(var i in e)if("__source"!==i&&e[i]!==this.props[i])return!0;for(var o in this.props)if(!(o in e))return!0;return!1};var nt=0;function rt(e,t,n,r,i,o){var a,s,c={};for(s in t)"ref"==s?a=t[s]:c[s]=t[s];var u={type:e,props:c,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--nt,__source:i,__self:o};if("function"==typeof e&&(a=e.defaultProps))for(s in a)void 0===c[s]&&(c[s]=a[s]);return v.vnode&&v.vnode(u),u}var it=function(){return rt("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:rt("path",{d:"M843.904 783.573333 783.573333 843.904 512.042667 572.373333 240.512 843.904 180.181333 783.573333 451.712 512.042667 180.181333 240.512 240.512 180.181333 512.042667 451.712 783.573333 180.181333 843.904 240.512 572.373333 512.042667 843.904 783.573333Z"})})},ot=function(){return rt("svg",{className:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:rt("path",{d:"M900.64 379.808l-263.072-256.032c-36.448-35.328-105.76-35.392-142.304 0.096l-327.04 319.904c-56.416 54.72-70.72 76.704-70.72 150.976l0 143.936c0 132.768 26.976 192 186.912 192l131.872 0c81.12 0 128.448-46.656 193.952-111.264l290.016-297.696c18.592-17.984 29.248-43.968 29.248-71.264C929.504 423.36 918.976 397.6 900.64 379.808zM323.008 786.752c-52.928 0-96-43.072-96-96s43.072-96 96-96 96 43.072 96 96S375.936 786.752 323.008 786.752z"})})},at=function(){return rt("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:rt("path",{d:"M931.4 498.9L94.9 79.5c-3.4-1.7-7.3-2.1-11-1.2-8.5 2.1-13.8 10.7-11.7 19.3l86.2 352.2c1.3 5.3 5.2 9.6 10.4 11.3l147.7 50.7-147.6 50.7c-5.2 1.8-9.1 6-10.3 11.3L72.2 926.5c-0.9 3.7-0.5 7.6 1.2 10.9 3.9 7.9 13.5 11.1 21.5 7.2l836.5-417c3.1-1.5 5.6-4.1 7.2-7.1 3.9-8 0.7-17.6-7.2-21.6zM170.8 826.3l50.3-205.6 295.2-101.3c2.3-0.8 4.2-2.6 5-5 1.4-4.2-0.8-8.7-5-10.2L221.1 403 171 198.2l628 314.9-628.2 313.2z"})})},st=function(){return rt("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:rt("path",{d:"M962 197.61H747v-60c0-55.14-44.86-100-100-100H377c-55.14 0-100 44.86-100 100v60H62c-11.05 0-20 8.95-20 20s8.95 20 20 20h60v630.57c0 66.17 53.83 120 120 120h540c66.17 0 120-53.83 120-120V237.61h60c11.05 0 20-8.95 20-20s-8.95-20-20-20zM637.34 457.66v260c0 12.01-10.72 21.63-23.06 19.77-9.84-1.48-16.94-10.25-16.94-20.2V458.09c0-9.95 7.1-18.72 16.94-20.2 12.34-1.86 23.06 7.76 23.06 19.77z m-210.68 0v260c0 11-9 20-20 20s-20-9-20-20v-260c0-11 9-20 20-20s20 9 20 20zM317 137.61c0-33.08 26.92-60 60-60h270c33.08 0 60 26.92 60 60v60H317v-60z"})})},ct=function(){return rt("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:rt("path",{d:"M511.582491 63.413262C265.134543 63.413262 64.62588 263.921925 64.62588 510.369873s200.508663 446.957635 446.957635 446.957635 446.957635-200.508663 446.957635-446.957635S758.031463 63.413262 511.582491 63.413262zM509.001713 751.859903c-98.517781 0-182.467775-62.623269-214.771505-150.056598l0.327458-0.134053c-2.007727-4.036943-3.38305-8.422833-3.38305-13.237489 0-16.647145 13.494339-30.142507 30.142507-30.142507 13.389962 0 24.358781 8.877181 28.2893 20.955264l0.422625-0.172939c23.269983 65.442478 85.645612 112.503307 158.972665 112.503307 93.106538 0 168.845523-75.738985 168.845523-168.845523s-75.738985-168.845523-168.845523-168.845523c-20.432355 0-39.874149 3.980661-58.013275 10.66899l21.248953 40.742936c2.486634 2.677992 4.0175 6.2831 4.0175 10.243295 0 8.417717-8.404414 14.921851-15.365966 15.07023-0.102331 0-0.206708 0-0.309038 0-0.220011 0-0.427742 0-0.647753-0.013303l-150.579507-6.463202c-5.372358-0.234337-10.229992-3.310396-12.716626-8.093329-2.486634-4.76963-2.236947-10.509355 0.647753-15.055904l80.890308-127.179564c2.8847-4.533246 8.006348-7.151887 13.365402-6.960529 5.372358 0.234337 10.227945 3.312442 12.71458 8.095375l18.580171 35.625382c26.629497-10.855232 55.683207-16.963347 86.168522-16.963347 126.338407 0 229.130537 102.791108 229.130537 229.130537S635.340119 751.859903 509.001713 751.859903z"})})},ut=function(){return rt("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:rt("path",{d:"M891.072 822.144V167.36a34.432 34.432 0 0 0-34.432-34.432H201.856C201.856 94.848 232.704 64 270.784 64h620.288C929.152 64 960 94.848 960 132.928v620.288c0 38.08-30.848 68.928-68.928 68.928z m-68.928-551.36v620.288c0 38.08-30.848 68.928-68.928 68.928H132.928A68.928 68.928 0 0 1 64 891.072V270.784c0-38.08 30.848-68.928 68.928-68.928h620.288c38.08 0 68.928 30.848 68.928 68.928z m-137.856 137.856H201.856a34.432 34.432 0 0 0 0 68.864h482.432a34.432 34.432 0 0 0 0-68.864z m0 206.72H201.856a34.432 34.432 0 0 0 0 68.864h482.432a34.432 34.432 0 0 0 0-68.864z"})})},lt=function(){return rt("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:rt("path",{d:"M547.4 197.4v46l200.3 0.1L546.1 444l32.4 32.6 201.9-200.7v200.9h46V197.5zM471.4 584.4l-32.6-32.6L243.6 747V547.9h-46v278.7h279v-46H275z"})})},ft=function(){return rt("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:rt("path",{d:"M544 480V282.944h52.224l0.064 107.968L763.072 224l36.928 36.928-166.976 166.976 108.032-0.128V480H544zM260.928 800l-36.928-36.928 166.912-166.784-107.968-0.064V544H480v197.056h-52.224l0.064-107.968L260.928 800z"})})},ht=new Z("markdown-message"),_t=function(e){var t=e.message,n=e.size,r=et(ne()),i=et(null);ye((function(){n>=0&&i.value&&i.value.setMarkdown(t.content)}),[t,n]),ye((function(){i.value=new f({id:r,value:t.content,editor:{defaultModel:"previewOnly"}})}),[]);return rt("div",{className:"".concat(ht.b()," ").concat(ht.is("loading",20===t.state)),children:[rt("div",{className:ht.b("header"),children:[rt("div",{className:ht.be("header","caption"),children:"AI "}),rt("div",{className:ht.b("header-action-wrapper"),children:[rt("div",{className:ht.be("header","action-item"),onClick:function(){e.controller.backfill(t)},children:[rt(ot,{}),rt("span",{className:ht.bem("header","action-item","title"),children:"回填"})]}),rt("div",{className:ht.be("header","action-item"),onClick:function(){e.controller.refreshMessage(t)},children:[rt(ct,{}),rt("span",{className:ht.bem("header","action-item","title"),children:"刷新"})]}),rt("div",{className:ht.be("header","action-item"),onClick:function(){e.controller.deleteMessage(t)},children:[rt(st,{}),rt("span",{className:ht.bem("header","action-item","title"),children:"删除"})]}),rt("div",{className:ht.be("header","action-item"),onClick:function(){e.controller.copyMessage(t)},children:[rt(ut,{}),rt("span",{className:ht.bem("header","action-item","title"),children:"复制"})]})]})]}),rt("div",{className:ht.b("content"),children:rt("div",{id:r})}),rt("div",{className:ht.b("footer")})]})},vt=new Z("user-message-question"),dt=function(e){var t=tt((function(){return e.message.content}));return rt("div",{className:vt.b(),children:[rt("div",{className:vt.e("user-header"),children:[rt("div",{className:vt.e("user-action"),onClick:function(){e.controller.refreshMessage(e.message,!0)},children:[rt(ct,{}),rt("span",{className:vt.em("user-action","title"),children:"刷新"})]}),rt("div",{className:vt.e("user"),children:"我"})]}),rt("div",{className:vt.e("content"),children:rt("div",{dir:"auto",className:vt.em("content","body"),children:rt("p",{dir:"auto",children:t})})})]})},pt=new Z("error-message"),yt=function(e){var t=tt((function(){return e.message.content}));return rt("div",{className:pt.b(),children:rt("span",{className:pt.e("content"),children:t})})},mt=new Z("unknown-message"),gt=function(e){return rt("div",{className:mt.b(),children:rt("span",{className:mt.e("content"),children:["暂未支持的消息类型: ",e.message.type]})})},bt=new Z("chat-message-item"),wt=function(e){var t=e.message,n=e.size,r=null;switch(t.type){case"DEFAULT":r="ASSISTANT"===t.role?_t:dt;break;case"ERROR":r=yt;break;default:r=gt}return rt("div",{className:bt.b(),children:C(r,{size:n,message:t,controller:e.controller})})},kt=new Z("chat-messages"),xt=function(e){var t=me(null),n=e.controller.messages;return function(e){var t=me(e);t.current=e,ye((function(){return Je((function(){return t.current()}))}),[])}((function(){t.current&&n.value.length>0&&(t.current.scrollTop=t.current.scrollHeight)})),rt("div",{ref:t,className:kt.b(),children:n.value.map((function(t){var n,r=(null===(n=t.content)||void 0===n?void 0:n.length)||0;return rt(wt,{message:t,size:r,controller:e.controller},t.messageid)}))})};function St(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function Et(e){this.props=e}(Et.prototype=new L).isPureReactComponent=!0,Et.prototype.shouldComponentUpdate=function(e,t){return St(this.props,e)||St(this.state,t)};var Nt=v.__b;v.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Nt&&Nt(e)};var Ct=v.__e;v.__e=function(e,t,n,r){if(e.then)for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t);Ct(e,t,n,r)};var At=v.unmount;function Ot(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=function(e,t){for(var n in t)e[n]=t[n];return e}({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return Ot(e,t,n)}))),e}function Lt(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return Lt(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function Pt(){this.__u=0,this.t=null,this.__b=null}function Ht(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Tt(){this.u=null,this.o=null}v.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),At&&At(e)},(Pt.prototype=new L).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var i=Ht(r.__v),o=!1,a=function(){o||(o=!0,n.__R=null,i?i(s):s())};n.__R=a;var s=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=Lt(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},c=!0===t.__h;r.__u++||c||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(a,a)},Pt.prototype.componentWillUnmount=function(){this.t=[]},Pt.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Ot(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&C(O,null,e.fallback);return i&&(i.__h=null),[C(O,null,t.__a?null:e.children),i]};var zt=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};(Tt.prototype=new L).__a=function(e){var t=this,n=Ht(t.__v),r=t.o.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),zt(t,e,r)):i()};n?n(o):o()}},Tt.prototype.render=function(e){this.u=null,this.o=new Map;var t=M(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},Tt.prototype.componentDidUpdate=Tt.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){zt(e,n,t)}))};var Rt="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,jt=/^(?: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]/,Mt=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Ft=/[A-Z0-9]/g,Ut="undefined"!=typeof document,Vt=function(e){return("undefined"!=typeof Symbol&&"symbol"==u(Symbol())?/fil|che|rad/:/fil|che|ra/).test(e)};L.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(L.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var Wt=v.event;function Bt(){}function It(){return this.cancelBubble}function $t(){return this.defaultPrevented}v.event=function(e){return Wt&&(e=Wt(e)),e.persist=Bt,e.isPropagationStopped=It,e.isDefaultPrevented=$t,e.nativeEvent=e};var Dt={enumerable:!1,configurable:!0,get:function(){return this.class}},qt=v.vnode;v.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,r={};for(var i in t){var o=t[i];if(!("value"===i&&"defaultValue"in t&&null==o||Ut&&"children"===i&&"noscript"===n||"class"===i||"className"===i)){var a=i.toLowerCase();"defaultValue"===i&&"value"in t&&null==t.value?i="value":"download"===i&&!0===o?o="":"ondoubleclick"===a?i="ondblclick":"onchange"!==a||"input"!==n&&"textarea"!==n||Vt(t.type)?"onfocus"===a?i="onfocusin":"onblur"===a?i="onfocusout":Mt.test(i)?i=a:-1===n.indexOf("-")&&jt.test(i)?i=i.replace(Ft,"-$&").toLowerCase():null===o&&(o=void 0):a=i="oninput","oninput"===a&&r[i=a]&&(i="oninputCapture"),r[i]=o}}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=M(t.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==n&&null!=r.defaultValue&&(r.value=M(t.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",Dt)):(t.className&&!t.class||t.class&&t.className)&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=Rt,qt&&qt(e)};var Gt=v.__r;v.__r=function(e){Gt&&Gt(e),e.__c};var Yt=v.diffed;v.diffed=function(e){Yt&&Yt(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value)};var Jt=new Map;function Xt(e){var t=Jt.get(e);t&&t.destroy()}function Zt(e){var t=Jt.get(e);t&&t.update()}var Kt=null;"undefined"==typeof window?((Kt=function(e){return e}).destroy=function(e){return e},Kt.update=function(e){return e}):((Kt=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return function(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!Jt.has(e)){var t,n=null,r=window.getComputedStyle(e),i=(t=e.value,function(){a({testForHeightReduction:""===t||!e.value.startsWith(t),restoreTextAlign:null}),t=e.value}),o=function(t){e.removeEventListener("autosize:destroy",o),e.removeEventListener("autosize:update",s),e.removeEventListener("input",i),window.removeEventListener("resize",s),Object.keys(t).forEach((function(n){return e.style[n]=t[n]})),Jt.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,textAlign:e.style.textAlign,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",o),e.addEventListener("autosize:update",s),e.addEventListener("input",i),window.addEventListener("resize",s),e.style.overflowX="hidden",e.style.wordWrap="break-word",Jt.set(e,{destroy:o,update:s}),s()}function a(t){var i,o,s=t.restoreTextAlign,c=void 0===s?null:s,u=t.testForHeightReduction,l=void 0===u||u,f=r.overflowY;if(0!==e.scrollHeight&&("vertical"===r.resize?e.style.resize="none":"both"===r.resize&&(e.style.resize="horizontal"),l&&(i=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push([e.parentNode,e.parentNode.scrollTop]),e=e.parentNode;return function(){return t.forEach((function(e){var t=e[0],n=e[1];t.style.scrollBehavior="auto",t.scrollTop=n,t.style.scrollBehavior=null}))}}(e),e.style.height=""),o="content-box"===r.boxSizing?e.scrollHeight-(parseFloat(r.paddingTop)+parseFloat(r.paddingBottom)):e.scrollHeight+parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth),"none"!==r.maxHeight&&o>parseFloat(r.maxHeight)?("hidden"===r.overflowY&&(e.style.overflow="scroll"),o=parseFloat(r.maxHeight)):"hidden"!==r.overflowY&&(e.style.overflow="hidden"),e.style.height=o+"px",c&&(e.style.textAlign=c),i&&i(),n!==o&&(e.dispatchEvent(new Event("autosize:resized",{bubbles:!0})),n=o),f!==r.overflow&&!c)){var h=r.textAlign;"hidden"===r.overflow&&(e.style.textAlign="start"===h?"end":"start"),a({restoreTextAlign:h,testForHeightReduction:!0})}}function s(){a({testForHeightReduction:!0,restoreTextAlign:null})}}(e)})),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],Xt),e},Kt.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],Zt),e});var Qt=Kt,en=new Z("chat-input"),tn=function(e){var t=me(null),n=e.controller.input,r=et(!1),i=be((function(e){n.value=e.target.value}),[n]),o=tt((function(){return n.value.length<=0||!0===r.value}));ye((function(){return t.current&&Qt(t.current),function(){t.current&&Qt.destroy(t.current)}}),[t]);var s=be(c(a().mark((function t(){return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r.value=!0,t.prev=1,t.next=4,e.controller.question(n.value);case 4:n.value="",t.next=10;break;case 7:t.prev=7,t.t0=t.catch(1),console.error(t.t0);case 10:return t.prev=10,r.value=!1,t.finish(10);case 13:case"end":return t.stop()}}),t,null,[[1,7,10,13]])}))),[n,r]);return rt("div",{className:en.b(),children:[rt("textarea",{className:en.e("textarea"),type:"text",rows:6,autoCorrect:"off",autoCapitalize:"off",autoComplete:"off",value:n,onInput:i,onKeyDown:function(e){"Enter"===e.code&&(e.stopPropagation(),!1===e.shiftKey&&s())},ref:t,disabled:r}),rt("div",{className:en.b("action-wrapper"),children:rt("div",{title:r?"思考中...":"发送消息",className:"".concat(en.be("action-wrapper","action-item")," ").concat(en.is("disabled",o.value)," ").concat(en.is("loading",r.value)),onClick:s,disabled:o,children:rt(at,{})})})]})},nn=function(e){return e.STYLE_CACHE="ai-chat-style-cache",e}(nn||{}),rn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&n(e,t)}(o,e);var t=r(o);function o(e){var n;return l(this,o),_(i(n=t.call(this,e)),"ns",new Z("chat-container")),_(i(n),"containerRef",{current:null}),_(i(n),"dragHandle",{current:null}),_(i(n),"data",{x:window.innerWidth-600-100,y:100,width:600,height:600,minWidth:300,minHeight:300}),n.state={isFullScreen:!1},n}return h(o,[{key:"calcStyle",value:function(){return{right:"0px",top:"0px",height:"100vh",width:"".concat(this.data.width,"px"),"z-index":"1000"}}},{key:"setStyle",value:function(){Object.assign(this.containerRef.current.style,this.calcStyle())}},{key:"componentDidMount",value:function(){var e=this,t=localStorage.getItem(nn.STYLE_CACHE);t&&(this.data=JSON.parse(t),this.data.x>window.innerWidth&&(this.data.x=window.innerWidth-100),this.data.y>window.innerHeight&&(this.data.y=window.innerHeight-100)),this.setStyle();var n=this.data;s(this.containerRef.current).resizable({edges:{top:!1,right:!0,bottom:!1,left:!0},margin:6,modifiers:[s.modifiers.restrictEdges({outer:document.body}),s.modifiers.restrictSize({min:{width:n.minWidth,height:n.minHeight}})],inertia:!0,listeners:{move:function(t){n.x+=t.deltaRect.left,n.y+=t.deltaRect.top,n.width=t.rect.width,n.height=t.rect.height,e.setStyle()}}})}},{key:"componentWillUnmount",value:function(){localStorage.setItem(nn.STYLE_CACHE,JSON.stringify(this.data))}},{key:"close",value:function(){this.props.close()}},{key:"fullScreen",value:function(){var e=this.containerRef.current;e&&(e.requestFullscreen(),this.setState({isFullScreen:!0}))}},{key:"closeFullScreen",value:function(){var e;this.state.isFullScreen&&(null===(e=document)||void 0===e||e.exitFullscreen(),this.setState({isFullScreen:!1}))}},{key:"render",value:function(){return rt("div",{className:"\n ".concat(this.ns.b(),"\n ").concat(this.ns.is("full-screen",this.state.isFullScreen)),ref:this.containerRef,children:[rt("div",{ref:this.dragHandle,className:this.ns.b("header"),children:[rt("div",{className:this.ns.b("header-caption"),children:"AIChat"}),rt("div",{className:this.ns.b("header-action-wrapper"),children:[this.state.isFullScreen?rt("div",{className:"".concat(this.ns.be("header-action-wrapper","action-item")," ").concat(this.ns.be("header-action-wrapper","close-full-screen")),onClick:this.closeFullScreen.bind(this),children:rt(ft,{})}):rt("div",{className:"".concat(this.ns.be("header-action-wrapper","action-item")," ").concat(this.ns.be("header-action-wrapper","full-screen")),onClick:this.fullScreen.bind(this),children:rt(lt,{})}),rt("div",{className:"".concat(this.ns.be("header-action-wrapper","action-item")," ").concat(this.ns.be("header-action-wrapper","action-close")),onClick:this.close.bind(this),children:rt(it,{})})]})]}),rt("div",{className:this.ns.b("content"),children:rt(xt,{controller:this.props.controller})}),rt("div",{className:this.ns.b("footer"),children:rt(tn,{controller:this.props.controller})})]})}}]),o}(L);t("ChatContainer",rn);var on=function(){function e(t){l(this,e),this.msg=t}return h(e,[{key:"messageid",get:function(){return this.msg.messageid}},{key:"state",get:function(){return this.msg.state}},{key:"role",get:function(){return this.msg.role}},{key:"type",get:function(){return this.msg.type}},{key:"content",get:function(){return this.msg.content}},{key:"_origin",get:function(){return this.msg}},{key:"update",value:function(e){e.content||(e.content=""),this.msg.content+=e.content}}]),e}(),an=function(){function t(e){l(this,t),_(this,"messages",Ue([])),_(this,"input",Ue("")),this.opts=e}var n,r;return h(t,[{key:"setInput",value:function(e){this.input.value=e||""}},{key:"addMessage",value:function(t){var n=this.messages.value.find((function(e){return e.messageid===t.messageid}));n?(n.update(t),this.messages.value=e(this.messages.value)):this.messages.value=[].concat(e(this.messages.value),[new on(t)])}},{key:"replaceMessage",value:function(t){var n=this.messages.value.findIndex((function(e){return e.messageid===t.messageid}));-1!==n?(this.messages.value[n]=new on(t),this.messages.value=e(this.messages.value)):this.messages.value=[].concat(e(this.messages.value),[new on(t)])}},{key:"question",value:(r=c(a().mark((function e(t){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.addMessage({state:30,messageid:ne(),role:"USER",type:"DEFAULT",content:t}),e.next=3,this.opts.question(this.messages.value.filter((function(e){return"ERROR"!==e.type})).map((function(e){return e._origin})));case 3:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"backfill",value:function(e){this.opts.action&&this.opts.action("backfill",e)}},{key:"deleteMessage",value:function(t){var n=this.messages.value.findIndex((function(e){return e.messageid===t.messageid}));-1!==n&&(this.messages.value.splice(n,1),this.messages.value=e(this.messages.value))}},{key:"refreshMessage",value:(n=c(a().mark((function t(n){var r,i,o,s=arguments;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=s.length>1&&void 0!==s[1]&&s[1],i=this.messages.value.findIndex((function(e){return e.messageid===n.messageid})),!r){t.next=9;break}return this.messages.value.splice(i+1,this.messages.value.length-i-1),this.messages.value=e(this.messages.value),t.next=7,this.opts.question(this.messages.value.filter((function(e){return"ERROR"!==e.type})).map((function(e){return e._origin})));case 7:t.next=19;break;case 9:if(i!==this.messages.value.length-1){t.next=16;break}return this.messages.value.pop(),this.messages.value=e(this.messages.value),t.next=14,this.opts.question(this.messages.value.filter((function(e){return"ERROR"!==e.type})).map((function(e){return e._origin})));case 14:t.next=19;break;case 16:o=this.messages.value[i-1].content,this.messages.value.splice(i-1,2),this.question(o);case 19:case"end":return t.stop()}}),t,this)}))),function(e){return n.apply(this,arguments)})},{key:"copyMessage",value:function(e){var t=e.content;re.copy(t)}}]),t}(),sn=function(){function e(){l(this,e),_(this,"container",void 0)}return h(e,[{key:"create",value:function(e){var t=this;this.close(),this.container=document.createElement("div"),this.container.classList.add("ibiz-ai-chat"),document.body.appendChild(this.container);var n=new an(e);return J(C(rn,{controller:n,close:function(){t.close(),e.closed&&e.closed()}}),this.container),n}},{key:"hidden",value:function(){this.container&&(this.container.style.display="none")}},{key:"show",value:function(){this.container&&(this.container.style.display="flex")}},{key:"close",value:function(){this.container&&(J(null,this.container),this.container.remove(),this.container=void 0)}}]),e}();t("chat",new sn)}}}))}();
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- @charset "UTF-8";.ibiz-markdown-message{border-radius:5px}.ibiz-markdown-message .cherry{border-radius:var(--ibiz-ai-chat-border-radius);box-shadow:none}.ibiz-markdown-message .cherry-previewer{padding:8px;border:0}.ibiz-markdown-message .anchor{display:none!important}.ibiz-markdown-message-header{display:flex;margin-bottom:8px}.ibiz-markdown-message-header__caption{flex:0;width:auto;min-width:32px;min-height:32px;padding:6px;margin-right:2px;font-size:14px;font-weight:800;color:var(--ibiz-ai-chat-color)}.ibiz-markdown-message-header__action-item{padding:6px;margin-left:6px;font-size:12px;border:1px solid var(--ibiz-ai-chat-border-color);border-radius:15px}.ibiz-markdown-message-header__action-item:nth-child(1){margin-left:0}.ibiz-markdown-message-header__action-item:hover{color:var(--ibiz-ai-chat-hover-color);cursor:pointer;background-color:var(--ibiz-ai-chat-hover-background-color)}.ibiz-markdown-message-header__action-item.is-disabled{color:var(--ibiz-ai-chat-disabled-color);pointer-events:none}.ibiz-markdown-message-header__action-item.is-loading{pointer-events:none;animation:loading-change .8s infinite}.ibiz-markdown-message-header-action-wrapper{display:flex;align-items:center}.ibiz-user-message{padding:6px 10px;text-align:right}.ibiz-user-message__content{padding:6px;color:#fff;background:linear-gradient(to right,#009fff,#ec2f4b);border-radius:var(--ibiz-ai-chat-border-radius)}.ibiz-error-message{padding:6px 10px;text-align:right}.ibiz-error-message__content{padding:6px;color:#fff;background-color:red;border-radius:var(--ibiz-ai-chat-border-radius)}.ibiz-chat-message-item{padding:6px 0}.ibiz-unknown-message{padding:6px 10px;text-align:right}.ibiz-unknown-message__content{padding:6px;color:#000;background-color:#ccc;border-radius:var(--ibiz-ai-chat-border-radius)}.ibiz-chat-messages{width:100%;height:100%;padding:6px;overflow-x:hidden;overflow-y:auto}.ibiz-chat-messages::-webkit-scrollbar{width:6px}.ibiz-chat-messages::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:var(--ibiz-ai-chat-border-radius)}.ibiz-chat-input{display:flex;align-items:center;border:1px solid var(--ibiz-ai-chat-border-color);border-radius:var(--ibiz-ai-chat-border-radius)}.ibiz-chat-input__textarea{flex-grow:1;max-height:6em;overflow-x:hidden!important;overflow-y:auto;resize:none;background-color:var(--ibiz-ai-chat-background-color);border:none;outline:none}.ibiz-chat-input__textarea::-webkit-scrollbar{width:6px}.ibiz-chat-input__textarea::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:var(--ibiz-ai-chat-border-radius)}@keyframes loading-change{0%{opacity:1}25%{opacity:.5}50%{opacity:.1}75%{opacity:.5}to{opacity:1}}.ibiz-chat-input-action-wrapper{display:flex;gap:6px;align-items:center;padding:6px;color:var(--ibiz-ai-chat-color)}.ibiz-chat-input-action-wrapper__action-item{padding:3px;font-size:12px;border-radius:var(--ibiz-ai-chat-border-radius)}.ibiz-chat-input-action-wrapper__action-item:hover{color:var(--ibiz-ai-chat-hover-color);cursor:pointer;background-color:var(--ibiz-ai-chat-hover-background-color)}.ibiz-chat-input-action-wrapper__action-item.is-disabled{color:var(--ibiz-ai-chat-disabled-color);pointer-events:none}.ibiz-chat-input-action-wrapper__action-item.is-loading{pointer-events:none;animation:loading-change .8s infinite}.ibiz-chat-container{--ibiz-ai-chat-color: #3b3b3b;--ibiz-ai-chat-icon-color: #3b3b3b;--ibiz-ai-chat-border-color: #e5e5e5;--ibiz-ai-chat-background-color: #fff;--ibiz-ai-chat-disabled-color: rgba(59, 59, 59, .6);--ibiz-ai-chat-hover-color: #3b3b3b;--ibiz-ai-chat-hover-background-color: rgba(184, 184, 184, .31);--ibiz-ai-chat-hover-border-color: #e5e5e5;--ibiz-ai-chat-border-radius: 5px;position:absolute;z-index:1000;display:flex;flex-direction:column;background-color:var(--ibiz-ai-chat-background-color);border:1px solid var(--ibiz-ai-chat-border-color);border-radius:var(--ibiz-ai-chat-border-radius)}.ibiz-chat-container *{box-sizing:border-box}.ibiz-chat-container svg{display:inline-block;width:1em;height:1em;font-size:1.5em;vertical-align:middle;fill:currentcolor}.ibiz-chat-container-header{display:flex;flex-shrink:0;align-items:center;justify-content:space-between;height:60px;border-bottom:1px solid var(--ibiz-ai-chat-border-color)}.ibiz-chat-container-header-caption{padding:0 6px;font-size:18px;font-weight:800}.ibiz-chat-container-header-action-wrapper{display:flex;gap:6px;align-items:center;height:100%;padding:0 6px}.ibiz-chat-container-header-action-wrapper__action-item{flex-shrink:0;padding:3px;font-size:12px;color:var(--ibiz-ai-chat-color);border-radius:var(--ibiz-ai-chat-border-radius)}.ibiz-chat-container-header-action-wrapper__action-item:hover{color:var(--ibiz-ai-chat-hover-color);cursor:pointer;background-color:var(--ibiz-ai-chat-hover-background-color)}.ibiz-chat-container-content{flex-grow:1;overflow:hidden}.ibiz-chat-container-footer{flex-shrink:0;padding:3px 6px;border-top:1px solid var(--ibiz-ai-chat-border-color)}
1
+ @charset "UTF-8";.ibiz-markdown-message{border-radius:5px}.ibiz-markdown-message .cherry{border-radius:var(--ibiz-ai-chat-border-radius);box-shadow:none}.ibiz-markdown-message .cherry-previewer{padding:8px;border:0}.ibiz-markdown-message .anchor{display:none!important}.ibiz-markdown-message.is-loading .ibiz-markdown-message-header .ibiz-markdown-message-header__caption{font-size:0}.ibiz-markdown-message.is-loading .ibiz-markdown-message-header .ibiz-markdown-message-header__caption:after{display:block;width:11px;height:11px;content:"";border:3px solid #3b3b3b;border-top-color:transparent;border-radius:100%;animation:circle infinite .75s linear}.ibiz-markdown-message-header{display:flex;margin-bottom:8px}.ibiz-markdown-message-header__caption{flex:0;width:auto;min-width:32px;min-height:32px;padding:6px;margin-right:2px;font-size:14px;font-weight:800;color:var(--ibiz-ai-chat-color)}.ibiz-markdown-message-header__action-item{width:32px;height:32px;padding:6px;margin-left:6px;overflow:hidden;font-size:12px;white-space:nowrap;border:1px solid var(--ibiz-ai-chat-border-color);border-radius:15px;transition:all .3s ease}.ibiz-markdown-message-header__action-item--title{margin-left:8px;font-size:14px;vertical-align:middle}.ibiz-markdown-message-header__action-item svg{vertical-align:baseline}.ibiz-markdown-message-header__action-item:hover{width:68px}.ibiz-markdown-message-header__action-item:nth-child(1){margin-left:0}.ibiz-markdown-message-header__action-item:hover{color:var(--ibiz-ai-chat-hover-color);cursor:pointer;background-color:var(--ibiz-ai-chat-hover-background-color)}.ibiz-markdown-message-header__action-item.is-disabled{color:var(--ibiz-ai-chat-disabled-color);pointer-events:none}.ibiz-markdown-message-header__action-item.is-loading{pointer-events:none;animation:loading-change .8s infinite}.ibiz-markdown-message-header-action-wrapper{display:flex;align-items:center}@keyframes circle{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.ibiz-user-message-question{padding:6px 10px}.ibiz-user-message-question__content{position:relative;box-sizing:border-box;display:flex;justify-content:end;max-width:100%;padding:10px;font-size:14px;text-align:left;word-break:break-word;user-select:text;transition:all .3s ease}.ibiz-user-message-question__content--body{width:fit-content;padding:0 10px;margin:0;font-size:14px;line-height:1.5;color:var(--color-fg-default);word-wrap:break-word;background:#E7F8FF;border-radius:var(--ibiz-ai-chat-border-radius);text-size-adjust:100%}.ibiz-user-message-question__content--body:before{display:table;content:""}.ibiz-user-message-question__content--body:after{display:table;clear:both;content:""}.ibiz-user-message-question__content--body>p{margin:8px}.ibiz-user-message-question__user-header{display:flex;align-items:center;justify-content:end;width:100%;height:32px}.ibiz-user-message-question__user-action{width:32px;height:32px;padding:6px;margin-right:6px;overflow:hidden;font-size:12px;white-space:nowrap;cursor:pointer;border:1px solid var(--ibiz-ai-chat-border-color);border-radius:15px;transition:all .3s ease}.ibiz-user-message-question__user-action:hover{width:68px}.ibiz-user-message-question__user-action--title{margin-left:8px;font-size:14px;vertical-align:middle}.ibiz-user-message-question__user-action svg{vertical-align:baseline}.ibiz-user-message-question__user{padding:6px;font-size:14px;font-weight:800}.ibiz-error-message{padding:6px 10px;text-align:right}.ibiz-error-message__content{padding:6px;color:#fff;background-color:red;border-radius:var(--ibiz-ai-chat-border-radius)}.ibiz-chat-message-item{padding:6px 0}.ibiz-unknown-message{padding:6px 10px;text-align:right}.ibiz-unknown-message__content{padding:6px;color:#000;background-color:#ccc;border-radius:var(--ibiz-ai-chat-border-radius)}.ibiz-chat-messages{width:100%;height:100%;padding:6px;overflow-x:hidden;overflow-y:auto}.ibiz-chat-messages::-webkit-scrollbar{width:6px}.ibiz-chat-messages::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:var(--ibiz-ai-chat-border-radius)}.ibiz-chat-input{display:flex;align-items:center;border:1px solid var(--ibiz-ai-chat-border-color);border-radius:var(--ibiz-ai-chat-border-radius)}.ibiz-chat-input__textarea{flex-grow:1;max-height:6em;overflow-x:hidden!important;overflow-y:auto;resize:none;background-color:var(--ibiz-ai-chat-background-color);border:none;outline:none}.ibiz-chat-input__textarea::-webkit-scrollbar{width:6px}.ibiz-chat-input__textarea::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:var(--ibiz-ai-chat-border-radius)}@keyframes loading-change{0%{opacity:1}25%{opacity:.5}50%{opacity:.1}75%{opacity:.5}to{opacity:1}}.ibiz-chat-input-action-wrapper{display:flex;gap:6px;align-items:center;padding:6px;color:var(--ibiz-ai-chat-color)}.ibiz-chat-input-action-wrapper__action-item{padding:3px;font-size:12px;border-radius:var(--ibiz-ai-chat-border-radius)}.ibiz-chat-input-action-wrapper__action-item:hover{color:var(--ibiz-ai-chat-hover-color);cursor:pointer;background-color:var(--ibiz-ai-chat-hover-background-color)}.ibiz-chat-input-action-wrapper__action-item.is-disabled{color:var(--ibiz-ai-chat-disabled-color);pointer-events:none}.ibiz-chat-input-action-wrapper__action-item.is-loading{pointer-events:none;animation:loading-change .8s infinite}.ibiz-chat-container{--ibiz-ai-chat-color: #3b3b3b;--ibiz-ai-chat-icon-color: #3b3b3b;--ibiz-ai-chat-border-color: #e5e5e5;--ibiz-ai-chat-background-color: #fff;--ibiz-ai-chat-disabled-color: rgba(59, 59, 59, .6);--ibiz-ai-chat-hover-color: #3b3b3b;--ibiz-ai-chat-hover-background-color: rgba(184, 184, 184, .31);--ibiz-ai-chat-hover-border-color: #e5e5e5;--ibiz-ai-chat-border-radius: 5px;position:absolute;z-index:1000;display:flex;flex-direction:column;background-color:var(--ibiz-ai-chat-background-color);border:1px solid var(--ibiz-ai-chat-border-color);border-radius:var(--ibiz-ai-chat-border-radius)}.ibiz-chat-container *{box-sizing:border-box}.ibiz-chat-container svg{display:inline-block;width:1em;height:1em;font-size:1.5em;vertical-align:middle;fill:currentcolor}.ibiz-chat-container-header{display:flex;flex-shrink:0;align-items:center;justify-content:space-between;height:60px;border-bottom:1px solid var(--ibiz-ai-chat-border-color)}.ibiz-chat-container-header-caption{padding:0 6px;font-size:18px;font-weight:800}.ibiz-chat-container-header-action-wrapper{display:flex;gap:6px;align-items:center;height:100%;padding:0 6px}.ibiz-chat-container-header-action-wrapper__action-item{flex-shrink:0;padding:3px;font-size:12px;color:var(--ibiz-ai-chat-color);border-radius:var(--ibiz-ai-chat-border-radius)}.ibiz-chat-container-header-action-wrapper__action-item:hover{color:var(--ibiz-ai-chat-hover-color);cursor:pointer;background-color:var(--ibiz-ai-chat-hover-background-color)}.ibiz-chat-container-content{flex-grow:1;overflow:hidden}.ibiz-chat-container-footer{flex-shrink:0;padding:3px 6px;border-top:1px solid var(--ibiz-ai-chat-border-color)}
@@ -1,5 +1,7 @@
1
1
  import { IChatMessage } from '../../../interface';
2
+ import { AiChatController } from '../../../controller';
2
3
  export interface UserMessageProps {
4
+ controller: AiChatController;
3
5
  message: IChatMessage;
4
6
  /**
5
7
  * 内容大小,用于更新绘制
@@ -76,9 +76,10 @@ export declare class AiChatController {
76
76
  */
77
77
  backfill(message: IChatMessage): void;
78
78
  /**
79
- * 删除指定消息
80
79
  *
80
+ * 删除指定消息,如果是用户提问的刷新调用的删除,则需要删除从问题开始到最后的所有记录
81
81
  * @param {IChatMessage} message
82
+ * @param {boolean} [isuser=false]
82
83
  * @memberof AiChatController
83
84
  */
84
85
  deleteMessage(message: IChatMessage): void;
@@ -87,7 +88,7 @@ export declare class AiChatController {
87
88
  *
88
89
  * @memberof AiChatController
89
90
  */
90
- refreshMessage(message: IChatMessage): Promise<void>;
91
+ refreshMessage(message: IChatMessage, isuser?: boolean): Promise<void>;
91
92
  /**
92
93
  * 复制消息
93
94
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ibiz-template-plugin/ai-chat",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "description": "使用 rollup 编译 vue 组件或者 jsx",
5
5
  "main": "dist/index.es.js",
6
6
  "module": "dist/index.es.js",