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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,6 +1,6 @@
1
1
  var Rt = Object.defineProperty;
2
2
  var Ft = (t, e, n) => e in t ? Rt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
- var A = (t, e, n) => (Ft(t, typeof e != "symbol" ? e + "" : e, n), n);
3
+ var H = (t, e, n) => (Ft(t, typeof e != "symbol" ? e + "" : e, n), n);
4
4
  import we from "interactjs";
5
5
  import Ut from "cherry-markdown";
6
6
  var ve, f, _t, ft, V, Re, ht, xe, W = {}, dt = [], Dt = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, pe = Array.isArray;
@@ -32,7 +32,7 @@ function Fe() {
32
32
  function I(t) {
33
33
  return t.children;
34
34
  }
35
- function N(t, e) {
35
+ function A(t, e) {
36
36
  this.props = t, this.context = e;
37
37
  }
38
38
  function G(t, e) {
@@ -160,7 +160,7 @@ function Me(t, e, n, r, o, i, s, l, c, p) {
160
160
  e:
161
161
  if (typeof E == "function")
162
162
  try {
163
- if (m = e.props, b = (h = E.contextType) && r[h.__c], S = h ? b ? b.props.value : h.__ : r, n.__c ? z = (a = e.__c = n.__c).__ = a.__E : ("prototype" in E && E.prototype.render ? e.__c = a = new E(m, S) : (e.__c = a = new N(m, S), a.constructor = E, a.render = Bt), b && b.sub(a), a.props = m, a.state || (a.state = {}), a.context = S, a.__n = r, g = a.__d = !0, a.__h = [], a._sb = []), a.__s == null && (a.__s = a.state), E.getDerivedStateFromProps != null && (a.__s == a.state && (a.__s = R({}, a.__s)), R(a.__s, E.getDerivedStateFromProps(m, a.__s))), d = a.props, u = a.state, a.__v = e, g)
163
+ if (m = e.props, b = (h = E.contextType) && r[h.__c], S = h ? b ? b.props.value : h.__ : r, n.__c ? z = (a = e.__c = n.__c).__ = a.__E : ("prototype" in E && E.prototype.render ? e.__c = a = new E(m, S) : (e.__c = a = new A(m, S), a.constructor = E, a.render = Bt), b && b.sub(a), a.props = m, a.state || (a.state = {}), a.context = S, a.__n = r, g = a.__d = !0, a.__h = [], a._sb = []), a.__s == null && (a.__s = a.state), E.getDerivedStateFromProps != null && (a.__s == a.state && (a.__s = R({}, a.__s)), R(a.__s, E.getDerivedStateFromProps(m, a.__s))), d = a.props, u = a.state, a.__v = e, g)
164
164
  E.getDerivedStateFromProps == null && a.componentWillMount != null && a.componentWillMount(), a.componentDidMount != null && a.__h.push(a.componentDidMount);
165
165
  else {
166
166
  if (E.getDerivedStateFromProps == null && m !== d && a.componentWillReceiveProps != null && a.componentWillReceiveProps(m, S), !a.__e && (a.shouldComponentUpdate != null && a.shouldComponentUpdate(m, a.__s, S) === !1 || e.__v === n.__v)) {
@@ -278,12 +278,12 @@ ve = dt.slice, f = { __e: function(t, e, n, r) {
278
278
  throw t;
279
279
  } }, _t = 0, ft = function(t) {
280
280
  return t != null && t.constructor === void 0;
281
- }, N.prototype.setState = function(t, e) {
281
+ }, A.prototype.setState = function(t, e) {
282
282
  var n;
283
283
  n = this.__s != null && this.__s !== this.state ? this.__s : this.__s = R({}, this.state), typeof t == "function" && (t = t(R({}, n), this.props)), t && R(n, t), t != null && this.__v && (e && this._sb.push(e), Ue(this));
284
- }, N.prototype.forceUpdate = function(t) {
284
+ }, A.prototype.forceUpdate = function(t) {
285
285
  this.__v && (this.__e = !0, t && this.__h.push(t), Ue(this));
286
- }, N.prototype.render = I, V = [], ht = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, xe = function(t, e) {
286
+ }, A.prototype.render = I, V = [], ht = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, xe = function(t, e) {
287
287
  return t.__v.__b - e.__v.__b;
288
288
  }, oe.__r = 0;
289
289
  const It = "ibiz", qt = "is-";
@@ -308,7 +308,7 @@ class F {
308
308
  * @date 2023-11-03 10:11:31
309
309
  * @type {string}
310
310
  */
311
- A(this, "namespace");
311
+ H(this, "namespace");
312
312
  this.block = e, this.namespace = n || It;
313
313
  }
314
314
  /**
@@ -460,7 +460,7 @@ class F {
460
460
  return "--".concat(this.namespace, "-").concat(this.block, "-").concat(e);
461
461
  }
462
462
  }
463
- function H(t) {
463
+ function M(t) {
464
464
  if (typeof t != "string")
465
465
  throw new TypeError("Path must be a string. Received " + JSON.stringify(t));
466
466
  }
@@ -506,30 +506,30 @@ var j = {
506
506
  resolve: function() {
507
507
  for (var e = "", n = !1, r, o = arguments.length - 1; o >= -1 && !n; o--) {
508
508
  var i;
509
- o >= 0 ? i = arguments[o] : (r === void 0 && (r = process.cwd()), i = r), H(i), i.length !== 0 && (e = i + "/" + e, n = i.charCodeAt(0) === 47);
509
+ o >= 0 ? i = arguments[o] : (r === void 0 && (r = process.cwd()), i = r), M(i), i.length !== 0 && (e = i + "/" + e, n = i.charCodeAt(0) === 47);
510
510
  }
511
511
  return e = Be(e, !n), n ? e.length > 0 ? "/" + e : "/" : e.length > 0 ? e : ".";
512
512
  },
513
513
  normalize: function(e) {
514
- if (H(e), e.length === 0)
514
+ if (M(e), e.length === 0)
515
515
  return ".";
516
516
  var n = e.charCodeAt(0) === 47, r = e.charCodeAt(e.length - 1) === 47;
517
517
  return e = Be(e, !n), e.length === 0 && !n && (e = "."), e.length > 0 && r && (e += "/"), n ? "/" + e : e;
518
518
  },
519
519
  isAbsolute: function(e) {
520
- return H(e), e.length > 0 && e.charCodeAt(0) === 47;
520
+ return M(e), e.length > 0 && e.charCodeAt(0) === 47;
521
521
  },
522
522
  join: function() {
523
523
  if (arguments.length === 0)
524
524
  return ".";
525
525
  for (var e, n = 0; n < arguments.length; ++n) {
526
526
  var r = arguments[n];
527
- H(r), r.length > 0 && (e === void 0 ? e = r : e += "/" + r);
527
+ M(r), r.length > 0 && (e === void 0 ? e = r : e += "/" + r);
528
528
  }
529
529
  return e === void 0 ? "." : j.normalize(e);
530
530
  },
531
531
  relative: function(e, n) {
532
- if (H(e), H(n), e === n || (e = j.resolve(e), n = j.resolve(n), e === n))
532
+ if (M(e), M(n), e === n || (e = j.resolve(e), n = j.resolve(n), e === n))
533
533
  return "";
534
534
  for (var r = 1; r < e.length && e.charCodeAt(r) === 47; ++r)
535
535
  ;
@@ -560,7 +560,7 @@ var j = {
560
560
  return e;
561
561
  },
562
562
  dirname: function(e) {
563
- if (H(e), e.length === 0)
563
+ if (M(e), e.length === 0)
564
564
  return ".";
565
565
  for (var n = e.charCodeAt(0), r = n === 47, o = -1, i = !0, s = e.length - 1; s >= 1; --s)
566
566
  if (n = e.charCodeAt(s), n === 47) {
@@ -575,7 +575,7 @@ var j = {
575
575
  basename: function(e, n) {
576
576
  if (n !== void 0 && typeof n != "string")
577
577
  throw new TypeError('"ext" argument must be a string');
578
- H(e);
578
+ M(e);
579
579
  var r = 0, o = -1, i = !0, s;
580
580
  if (n !== void 0 && n.length > 0 && n.length <= e.length) {
581
581
  if (n.length === e.length && n === e)
@@ -605,7 +605,7 @@ var j = {
605
605
  }
606
606
  },
607
607
  extname: function(e) {
608
- H(e);
608
+ M(e);
609
609
  for (var n = -1, r = 0, o = -1, i = !0, s = 0, l = e.length - 1; l >= 0; --l) {
610
610
  var c = e.charCodeAt(l);
611
611
  if (c === 47) {
@@ -627,7 +627,7 @@ var j = {
627
627
  return Yt("/", e);
628
628
  },
629
629
  parse: function(e) {
630
- H(e);
630
+ M(e);
631
631
  var n = { root: "", dir: "", base: "", ext: "", name: "" };
632
632
  if (e.length === 0)
633
633
  return n;
@@ -680,7 +680,7 @@ class $t {
680
680
  * @private
681
681
  * @type {(HTMLInputElement | null)}
682
682
  */
683
- A($t, "inputElement", null);
683
+ H($t, "inputElement", null);
684
684
  var le, C, $e, Ie, ce = 0, kt = [], re = [], qe = f.__b, Ye = f.__r, je = f.diffed, Xe = f.__c, Je = f.unmount;
685
685
  function St(t, e) {
686
686
  f.__h && f.__h(C, t, ce || e), ce = 0;
@@ -1116,7 +1116,7 @@ q("unmount", function(t, e) {
1116
1116
  q("__h", function(t, e, n, r) {
1117
1117
  (r < 3 || r === 9) && (e.__$f |= 2), t(e, n, r);
1118
1118
  });
1119
- N.prototype.shouldComponentUpdate = function(t, e) {
1119
+ A.prototype.shouldComponentUpdate = function(t, e) {
1120
1120
  var n = this.__$u;
1121
1121
  if (!(n && n.s !== void 0 || 4 & this.__$f) || 3 & this.__$f)
1122
1122
  return !0;
@@ -1220,7 +1220,7 @@ const en = () => _("svg", {
1220
1220
  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"
1221
1221
  })
1222
1222
  });
1223
- const M = new F("markdown-message"), cn = (t) => {
1223
+ const N = new F("markdown-message"), cn = (t) => {
1224
1224
  const {
1225
1225
  message: e,
1226
1226
  size: n
@@ -1246,43 +1246,43 @@ const M = new F("markdown-message"), cn = (t) => {
1246
1246
  t.controller.copyMessage(e);
1247
1247
  };
1248
1248
  return _("div", {
1249
- className: M.b(),
1249
+ className: "".concat(N.b(), " ").concat(N.is("loading", e.state === 20)),
1250
1250
  children: [_("div", {
1251
- className: M.b("header"),
1251
+ className: N.b("header"),
1252
1252
  children: [_("div", {
1253
- className: M.be("header", "caption"),
1253
+ className: N.be("header", "caption"),
1254
1254
  children: "AI "
1255
1255
  }), _("div", {
1256
- className: M.b("header-action-wrapper"),
1256
+ className: N.b("header-action-wrapper"),
1257
1257
  children: [_("div", {
1258
- className: M.be("header", "action-item"),
1258
+ className: N.be("header", "action-item"),
1259
1259
  title: "回填",
1260
1260
  onClick: i,
1261
1261
  children: _(tn, {})
1262
1262
  }), _("div", {
1263
- className: M.be("header", "action-item"),
1263
+ className: N.be("header", "action-item"),
1264
1264
  title: "刷新",
1265
1265
  onClick: l,
1266
1266
  children: _(on, {})
1267
1267
  }), _("div", {
1268
- className: M.be("header", "action-item"),
1268
+ className: N.be("header", "action-item"),
1269
1269
  title: "删除",
1270
1270
  onClick: s,
1271
1271
  children: _(rn, {})
1272
1272
  }), _("div", {
1273
- className: M.be("header", "action-item"),
1273
+ className: N.be("header", "action-item"),
1274
1274
  title: "复制",
1275
1275
  onClick: c,
1276
1276
  children: _(sn, {})
1277
1277
  })]
1278
1278
  })]
1279
1279
  }), _("div", {
1280
- className: M.b("content"),
1280
+ className: N.b("content"),
1281
1281
  children: _("div", {
1282
1282
  id: r
1283
1283
  })
1284
1284
  }), _("div", {
1285
- className: M.b("footer")
1285
+ className: N.b("footer")
1286
1286
  })]
1287
1287
  });
1288
1288
  };
@@ -1372,7 +1372,7 @@ function tt(t, e) {
1372
1372
  function nt(t) {
1373
1373
  this.props = t;
1374
1374
  }
1375
- (nt.prototype = new N()).isPureReactComponent = !0, nt.prototype.shouldComponentUpdate = function(t, e) {
1375
+ (nt.prototype = new A()).isPureReactComponent = !0, nt.prototype.shouldComponentUpdate = function(t, e) {
1376
1376
  return tt(this.props, t) || tt(this.state, e);
1377
1377
  };
1378
1378
  var rt = f.__b;
@@ -1414,7 +1414,7 @@ function te() {
1414
1414
  f.unmount = function(t) {
1415
1415
  var e = t.__c;
1416
1416
  e && e.__R && e.__R(), e && t.__h === !0 && (t.type = null), it && it(t);
1417
- }, (Se.prototype = new N()).__c = function(t, e) {
1417
+ }, (Se.prototype = new A()).__c = function(t, e) {
1418
1418
  var n = e.__c, r = this;
1419
1419
  r.t == null && (r.t = []), r.t.push(n);
1420
1420
  var o = Lt(r.__v), i = !1, s = function() {
@@ -1456,7 +1456,7 @@ var ot = function(t, e, n) {
1456
1456
  t.u = n = n[2];
1457
1457
  }
1458
1458
  };
1459
- (te.prototype = new N()).__a = function(t) {
1459
+ (te.prototype = new A()).__a = function(t) {
1460
1460
  var e = this, n = Lt(e.__v), r = e.o.get(t);
1461
1461
  return r[0]++, function(o) {
1462
1462
  var i = function() {
@@ -1480,8 +1480,8 @@ var ot = function(t, e, n) {
1480
1480
  var yn = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, bn = /^(?: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]/, wn = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, $n = /[A-Z0-9]/g, kn = typeof document < "u", Sn = function(t) {
1481
1481
  return (typeof Symbol < "u" && typeof Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(t);
1482
1482
  };
1483
- N.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(t) {
1484
- Object.defineProperty(N.prototype, t, { configurable: !0, get: function() {
1483
+ A.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(t) {
1484
+ Object.defineProperty(A.prototype, t, { configurable: !0, get: function() {
1485
1485
  return this["UNSAFE_" + t];
1486
1486
  }, set: function(e) {
1487
1487
  Object.defineProperty(this, t, { configurable: !0, writable: !0, value: e });
@@ -1632,13 +1632,13 @@ const O = new F("chat-input"), Mn = (t) => {
1632
1632
  });
1633
1633
  };
1634
1634
  var He = /* @__PURE__ */ ((t) => (t.STYLE_CACHE = "ai-chat-style-cache", t))(He || {});
1635
- class zn extends N {
1635
+ class zn extends A {
1636
1636
  constructor(n) {
1637
1637
  super(n);
1638
- A(this, "ns", new F("chat-container"));
1639
- A(this, "containerRef", Fe());
1640
- A(this, "dragHandle", Fe());
1641
- A(this, "data", {
1638
+ H(this, "ns", new F("chat-container"));
1639
+ H(this, "containerRef", Fe());
1640
+ H(this, "dragHandle", Fe());
1641
+ H(this, "data", {
1642
1642
  x: window.innerWidth - 600 - 100,
1643
1643
  y: 100,
1644
1644
  width: 600,
@@ -1820,7 +1820,7 @@ class Pn {
1820
1820
  * @date 2023-10-16 16:10:29
1821
1821
  * @type {Signal<ChatMessage[]>}
1822
1822
  */
1823
- A(this, "messages", fe([]));
1823
+ H(this, "messages", fe([]));
1824
1824
  /**
1825
1825
  * 聊天框输入值
1826
1826
  *
@@ -1828,7 +1828,7 @@ class Pn {
1828
1828
  * @date 2023-10-16 15:10:43
1829
1829
  * @type {Signal<string>}
1830
1830
  */
1831
- A(this, "input", fe(""));
1831
+ H(this, "input", fe(""));
1832
1832
  this.opts = e;
1833
1833
  }
1834
1834
  /**
@@ -1928,7 +1928,7 @@ class Tn {
1928
1928
  * @protected
1929
1929
  * @type {HTMLDivElement}
1930
1930
  */
1931
- A(this, "container");
1931
+ H(this, "container");
1932
1932
  }
1933
1933
  /**
1934
1934
  * 创建聊天窗口(会同时显示出来)
@@ -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 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:"".concat(he.b()," ").concat(he.is("loading",20===e.state)),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)}}}))}();
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{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}@keyframes circle{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.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)}
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.3",
4
4
  "description": "使用 rollup 编译 vue 组件或者 jsx",
5
5
  "main": "dist/index.es.js",
6
6
  "module": "dist/index.es.js",