@gram-ai/elements 1.27.2 → 1.27.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/elements.cjs +1 -1
- package/dist/elements.js +1 -1
- package/dist/{index-dPbw_95D.js → index-DBrhzauj.js} +59 -59
- package/dist/index-DBrhzauj.js.map +1 -0
- package/dist/{index-CZ6AZT6Z.cjs → index-DxfW52oA.cjs} +3 -3
- package/dist/index-DxfW52oA.cjs.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/{profiler-D1ZeY9EE.js → profiler-D6ndqfsd.js} +2 -2
- package/dist/{profiler-D1ZeY9EE.js.map → profiler-D6ndqfsd.js.map} +1 -1
- package/dist/{profiler-iUZI0bb_.cjs → profiler-DhnzZ34c.cjs} +2 -2
- package/dist/{profiler-iUZI0bb_.cjs.map → profiler-DhnzZ34c.cjs.map} +1 -1
- package/dist/{startRecording-RyH9ZWER.js → startRecording-B_9CRZ_P.js} +2 -2
- package/dist/{startRecording-RyH9ZWER.js.map → startRecording-B_9CRZ_P.js.map} +1 -1
- package/dist/{startRecording-BssI1M_6.cjs → startRecording-BwXmdmy1.cjs} +2 -2
- package/dist/{startRecording-BssI1M_6.cjs.map → startRecording-BwXmdmy1.cjs.map} +1 -1
- package/package.json +1 -1
- package/src/hooks/useMCPTools.ts +25 -14
- package/src/index.ts +1 -0
- package/dist/index-CZ6AZT6Z.cjs.map +0 -1
- package/dist/index-dPbw_95D.js.map +0 -1
package/dist/elements.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-DxfW52oA.cjs"),r=require("./index-BpJstUh1.cjs");exports.Calendar=e.Calendar;exports.Chat=e.Chat;exports.ChatHistory=e.ChatHistory;exports.ElementsProvider=e.ElementsProvider;exports.GramElementsProvider=e.ElementsProvider;exports.MODELS=e.MODELS;exports.PRESETS=e.PRESETS;exports.Replay=e.Replay;exports.ShareButton=e.ShareButton;exports.TimeRangePicker=e.TimeRangePicker;exports.defineFrontendTool=e.defineFrontendTool;exports.getPresetRange=e.getPresetRange;exports.trackError=e.trackError;exports.useRecordCassette=e.useRecordCassette;exports.useThreadId=e.useThreadId;exports.useChatId=r.useChatId;exports.useElements=r.useElements;exports.useGramElements=r.useElements;
|
|
2
2
|
//# sourceMappingURL=elements.cjs.map
|
package/dist/elements.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { al as s, aa as r, ab as t, a8 as o, a8 as n, ah as d, ak as m, ad as l, ac as E, ai as i, af as h, aj as u, ag as C, ae as P, a9 as R } from "./index-
|
|
1
|
+
import { al as s, aa as r, ab as t, a8 as o, a8 as n, ah as d, ak as m, ad as l, ac as E, ai as i, af as h, aj as u, ag as C, ae as P, a9 as R } from "./index-DBrhzauj.js";
|
|
2
2
|
import { V as f, H as g, H as S } from "./index-CUitXazZ.js";
|
|
3
3
|
export {
|
|
4
4
|
s as Calendar,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as O from "react";
|
|
2
|
-
import { useRef as De, useEffect as Re, useCallback as Ce, useMemo as
|
|
2
|
+
import { useRef as De, useEffect as Re, useCallback as Ce, useMemo as Ve, useState as se, useContext as bo, createContext as gs, Component as T$, forwardRef as O$, memo as Ru, useSyncExternalStore as N$ } from "react";
|
|
3
3
|
import { c as A$ } from "./compat-shims-BPJ7Q68c.js";
|
|
4
4
|
import { jsx as p, Fragment as Yt, jsxs as C } from "react/jsx-runtime";
|
|
5
5
|
import { RuntimeAdapterProvider as C$, useAssistantApi as Pu, makeAssistantTool as R$, unstable_useRemoteThreadListRuntime as P$, AssistantRuntimeProvider as zu, useAssistantState as Xe, MessagePrimitive as Pr, ComposerPrimitive as or, AttachmentPrimitive as Mc, ThreadPrimitive as St, useScrollLock as z$, useThreadRuntime as Lh, ErrorPrimitive as af, ActionBarPrimitive as Pi, BranchPickerPrimitive as xa, ThreadListPrimitive as Du, ThreadListItemPrimitive as jc } from "@assistant-ui/react";
|
|
@@ -716,10 +716,10 @@ function ET(e) {
|
|
|
716
716
|
const r = Ce(function({
|
|
717
717
|
children: n
|
|
718
718
|
}) {
|
|
719
|
-
const o = IT(t), i =
|
|
719
|
+
const o = IT(t), i = Ve(() => ({ history: o }), [o]);
|
|
720
720
|
return /* @__PURE__ */ p(C$, { adapters: i, children: n });
|
|
721
721
|
}, []);
|
|
722
|
-
return
|
|
722
|
+
return Ve(
|
|
723
723
|
() => ({
|
|
724
724
|
unstable_Provider: r,
|
|
725
725
|
async list() {
|
|
@@ -14913,11 +14913,10 @@ function c2({
|
|
|
14913
14913
|
gramEnvironment: n
|
|
14914
14914
|
}) {
|
|
14915
14915
|
const o = Object.entries(r ?? {}).map(
|
|
14916
|
-
([
|
|
14916
|
+
([u, d]) => `${u}:${d}`
|
|
14917
14917
|
), i = Object.entries(e.headers ?? {}).map(
|
|
14918
|
-
([
|
|
14919
|
-
), s = De({}).current
|
|
14920
|
-
return { ...qx({
|
|
14918
|
+
([u, d]) => `${u}:${d}`
|
|
14919
|
+
), s = De({}).current, l = qx({
|
|
14921
14920
|
queryKey: [
|
|
14922
14921
|
"mcpTools",
|
|
14923
14922
|
t,
|
|
@@ -14925,30 +14924,31 @@ function c2({
|
|
|
14925
14924
|
...o,
|
|
14926
14925
|
...i
|
|
14927
14926
|
],
|
|
14928
|
-
queryFn: async () => {
|
|
14929
|
-
|
|
14930
|
-
|
|
14931
|
-
|
|
14932
|
-
|
|
14933
|
-
|
|
14934
|
-
|
|
14935
|
-
|
|
14936
|
-
|
|
14937
|
-
|
|
14938
|
-
|
|
14939
|
-
|
|
14940
|
-
}
|
|
14941
|
-
})).tools();
|
|
14942
|
-
return a ? Object.fromEntries(
|
|
14943
|
-
Object.entries(u).filter(
|
|
14944
|
-
([d]) => typeof a == "function" ? a({ toolName: d }) : a.includes(d)
|
|
14945
|
-
)
|
|
14946
|
-
) : u;
|
|
14947
|
-
},
|
|
14927
|
+
queryFn: async () => (of(!e.isLoading, "No auth found"), of(t, "No MCP URL found"), Object.keys(s).forEach((d) => delete s[d]), Object.assign(s, {
|
|
14928
|
+
...u2(r ?? {}),
|
|
14929
|
+
...e.headers,
|
|
14930
|
+
...n && { "Gram-Environment": n }
|
|
14931
|
+
}), (await $R({
|
|
14932
|
+
name: "gram-elements-mcp-client",
|
|
14933
|
+
transport: {
|
|
14934
|
+
type: "http",
|
|
14935
|
+
url: t,
|
|
14936
|
+
headers: s
|
|
14937
|
+
}
|
|
14938
|
+
})).tools()),
|
|
14948
14939
|
enabled: !e.isLoading && !!t,
|
|
14949
14940
|
staleTime: 1 / 0,
|
|
14950
14941
|
gcTime: 1 / 0
|
|
14951
|
-
}),
|
|
14942
|
+
}), c = Ve(() => !l.data || !a ? l.data : Object.fromEntries(
|
|
14943
|
+
Object.entries(l.data).filter(
|
|
14944
|
+
([u]) => typeof a == "function" ? a({ toolName: u }) : a.includes(u)
|
|
14945
|
+
)
|
|
14946
|
+
), [l.data, a]);
|
|
14947
|
+
return {
|
|
14948
|
+
...l,
|
|
14949
|
+
data: c,
|
|
14950
|
+
mcpHeaders: s
|
|
14951
|
+
};
|
|
14952
14952
|
}
|
|
14953
14953
|
const Xf = "MCP-";
|
|
14954
14954
|
function u2(e) {
|
|
@@ -21945,20 +21945,20 @@ const u6 = 30 * dt;
|
|
|
21945
21945
|
function qS(e) {
|
|
21946
21946
|
return new Worker(e.workerUrl || URL.createObjectURL(new Blob(['(()=>{function t(t){if(1===t.length)return t[0];const e=t.reduce((t,e)=>t+e.length,0),a=new Uint8Array(e);let n=0;for(const e of t)a.set(e,n),n+=e.length;return a}function e(t){for(var e=t.length;--e>=0;)t[e]=0}var a=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),n=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),r=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),i=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=Array(576);e(s);var h=Array(60);e(h);var l=Array(512);e(l);var _=Array(256);e(_);var o=Array(29);e(o);var d,u,f,c=Array(30);function p(t,e,a,n,r){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=n,this.max_length=r,this.has_stree=t&&t.length}function g(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(c);var v=function(t){return t<256?l[t]:l[256+(t>>>7)]},w=function(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},m=function(t,e,a){t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,w(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},b=function(t,e,a){m(t,a[2*e],a[2*e+1])},y=function(t,e){var a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},z=function(t,e,a){var n,r,i=Array(16),s=0;for(n=1;n<=15;n++)i[n]=s=s+a[n-1]<<1;for(r=0;r<=e;r++){var h=t[2*r+1];0!==h&&(t[2*r]=y(i[h]++,h))}},k=function(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0},x=function(t){t.bi_valid>8?w(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},A=function(t,e,a,n){var r=2*e,i=2*a;return t[r]<t[i]||t[r]===t[i]&&n[e]<=n[a]},U=function(t,e,a){for(var n=t.heap[a],r=a<<1;r<=t.heap_len&&(r<t.heap_len&&A(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!A(e,n,t.heap[r],t.depth));)t.heap[a]=t.heap[r],a=r,r<<=1;t.heap[a]=n},B=function(t,e,r){var i,s,h,l,d=0;if(0!==t.last_lit)do{i=t.pending_buf[t.d_buf+2*d]<<8|t.pending_buf[t.d_buf+2*d+1],s=t.pending_buf[t.l_buf+d],d++,0===i?b(t,s,e):(h=_[s],b(t,h+256+1,e),0!==(l=a[h])&&(s-=o[h],m(t,s,l)),i--,h=v(i),b(t,h,r),0!==(l=n[h])&&(i-=c[h],m(t,i,l)))}while(d<t.last_lit);b(t,256,e)},I=function(t,e){var a,n,r,i=e.dyn_tree,s=e.stat_desc.static_tree,h=e.stat_desc.has_stree,l=e.stat_desc.elems,_=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<l;a++)0!==i[2*a]?(t.heap[++t.heap_len]=_=a,t.depth[a]=0):i[2*a+1]=0;for(;t.heap_len<2;)i[2*(r=t.heap[++t.heap_len]=_<2?++_:0)]=1,t.depth[r]=0,t.opt_len--,h&&(t.static_len-=s[2*r+1]);for(e.max_code=_,a=t.heap_len>>1;a>=1;a--)U(t,i,a);r=l;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],U(t,i,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,i[2*r]=i[2*a]+i[2*n],t.depth[r]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,i[2*a+1]=i[2*n+1]=r,t.heap[1]=r++,U(t,i,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,n,r,i,s,h,l=e.dyn_tree,_=e.max_code,o=e.stat_desc.static_tree,d=e.stat_desc.has_stree,u=e.stat_desc.extra_bits,f=e.stat_desc.extra_base,c=e.stat_desc.max_length,p=0;for(i=0;i<=15;i++)t.bl_count[i]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<573;a++)(i=l[2*l[2*(n=t.heap[a])+1]+1]+1)>c&&(i=c,p++),l[2*n+1]=i,n>_||(t.bl_count[i]++,s=0,n>=f&&(s=u[n-f]),h=l[2*n],t.opt_len+=h*(i+s),d&&(t.static_len+=h*(o[2*n+1]+s)));if(0!==p){do{for(i=c-1;0===t.bl_count[i];)i--;t.bl_count[i]--,t.bl_count[i+1]+=2,t.bl_count[c]--,p-=2}while(p>0);for(i=c;0!==i;i--)for(n=t.bl_count[i];0!==n;)(r=t.heap[--a])>_||(l[2*r+1]!==i&&(t.opt_len+=(i-l[2*r+1])*l[2*r],l[2*r+1]=i),n--)}}(t,e),z(i,_,t.bl_count)},E=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),e[2*(a+1)+1]=65535,n=0;n<=a;n++)r=s,s=e[2*(n+1)+1],++h<l&&r===s||(h<_?t.bl_tree[2*r]+=h:0!==r?(r!==i&&t.bl_tree[2*r]++,t.bl_tree[32]++):h<=10?t.bl_tree[34]++:t.bl_tree[36]++,h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4))},C=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),n=0;n<=a;n++)if(r=s,s=e[2*(n+1)+1],!(++h<l&&r===s)){if(h<_)do{b(t,r,t.bl_tree)}while(0!==--h);else 0!==r?(r!==i&&(b(t,r,t.bl_tree),h--),b(t,16,t.bl_tree),m(t,h-3,2)):h<=10?(b(t,17,t.bl_tree),m(t,h-3,3)):(b(t,18,t.bl_tree),m(t,h-11,7));h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4)}},D=!1,M=function(t,e,a,n){m(t,0+(n?1:0),3),function(t,e,a){x(t),w(t,a),w(t,~a),t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a}(t,e,a)},j=M,L=function(t,e,a,n){for(var r=65535&t,i=t>>>16&65535,s=0;0!==a;){a-=s=a>2e3?2e3:a;do{i=i+(r=r+e[n++]|0)|0}while(--s);r%=65521,i%=65521}return r|i<<16},S=new Uint32Array(function(){for(var t,e=[],a=0;a<256;a++){t=a;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}()),T=function(t,e,a,n){var r=S,i=n+a;t^=-1;for(var s=n;s<i;s++)t=t>>>8^r[255&(t^e[s])];return-1^t},O={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},q=j,F=function(t,e,a){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&a,t.last_lit++,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(_[a]+256+1)]++,t.dyn_dtree[2*v(e)]++),t.last_lit===t.lit_bufsize-1},G=-2,H=258,J=262,K=103,N=113,P=666,Q=function(t,e){return t.msg=O[e],e},R=function(t){return(t<<1)-(t>4?9:0)},V=function(t){for(var e=t.length;--e>=0;)t[e]=0},W=function(t,e,a){return(e<<t.hash_shift^a)&t.hash_mask},X=function(t){var e=t.state,a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},Y=function(t,e){(function(t,e,a,n){var r,l,_=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),I(t,t.l_desc),I(t,t.d_desc),_=function(t){var e;for(E(t,t.dyn_ltree,t.l_desc.max_code),E(t,t.dyn_dtree,t.d_desc.max_code),I(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*i[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),r=t.opt_len+3+7>>>3,(l=t.static_len+3+7>>>3)<=r&&(r=l)):r=l=a+5,a+4<=r&&-1!==e?M(t,e,a,n):4===t.strategy||l===r?(m(t,2+(n?1:0),3),B(t,s,h)):(m(t,4+(n?1:0),3),function(t,e,a,n){var r;for(m(t,e-257,5),m(t,a-1,5),m(t,n-4,4),r=0;r<n;r++)m(t,t.bl_tree[2*i[r]+1],3);C(t,t.dyn_ltree,e-1),C(t,t.dyn_dtree,a-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,_+1),B(t,t.dyn_ltree,t.dyn_dtree)),k(t),n&&x(t)})(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,X(t.strm)},Z=function(t,e){t.pending_buf[t.pending++]=e},$=function(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},tt=function(t,e,a,n){var r=t.avail_in;return r>n&&(r=n),0===r?0:(t.avail_in-=r,e.set(t.input.subarray(t.next_in,t.next_in+r),a),1===t.state.wrap?t.adler=L(t.adler,e,r,a):2===t.state.wrap&&(t.adler=T(t.adler,e,r,a)),t.next_in+=r,t.total_in+=r,r)},et=function(t,e){var a,n,r=t.max_chain_length,i=t.strstart,s=t.prev_length,h=t.nice_match,l=t.strstart>t.w_size-J?t.strstart-(t.w_size-J):0,_=t.window,o=t.w_mask,d=t.prev,u=t.strstart+H,f=_[i+s-1],c=_[i+s];t.prev_length>=t.good_match&&(r>>=2),h>t.lookahead&&(h=t.lookahead);do{if(_[(a=e)+s]===c&&_[a+s-1]===f&&_[a]===_[i]&&_[++a]===_[i+1]){i+=2,a++;do{}while(_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&i<u);if(n=H-(u-i),i=u-H,n>s){if(t.match_start=e,s=n,n>=h)break;f=_[i+s-1],c=_[i+s]}}}while((e=d[e&o])>l&&0!==--r);return s<=t.lookahead?s:t.lookahead},at=function(t){var e,a,n,r,i,s=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=s+(s-J)){t.window.set(t.window.subarray(s,s+s),0),t.match_start-=s,t.strstart-=s,t.block_start-=s,e=a=t.hash_size;do{n=t.head[--e],t.head[e]=n>=s?n-s:0}while(--a);e=a=s;do{n=t.prev[--e],t.prev[e]=n>=s?n-s:0}while(--a);r+=s}if(0===t.strm.avail_in)break;if(a=tt(t.strm,t.window,t.strstart+t.lookahead,r),t.lookahead+=a,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=W(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=W(t,t.ins_h,t.window[i+3-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<J&&0!==t.strm.avail_in)},nt=function(t,e){for(var a,n;;){if(t.lookahead<J){if(at(t),t.lookahead<J&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-J&&(t.match_length=et(t,a)),t.match_length>=3)if(n=F(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!==--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=W(t,t.ins_h,t.window[t.strstart+1]);else n=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2},rt=function(t,e){for(var a,n,r;;){if(t.lookahead<J){if(at(t),t.lookahead<J&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-J&&(t.match_length=et(t,a),t.match_length<=5&&(1===t.strategy||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-3,n=F(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=r&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!==--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(Y(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=F(t,0,t.window[t.strstart-1]))&&Y(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=F(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2};function it(t,e,a,n,r){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=n,this.func=r}var st=[new it(0,0,0,0,function(t,e){var a=65535;for(a>t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(at(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+a;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,Y(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-J&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(Y(t,!1),t.strm.avail_out),1)}),new it(4,4,8,4,nt),new it(4,5,16,8,nt),new it(4,6,32,32,nt),new it(4,4,16,16,rt),new it(8,16,32,32,rt),new it(8,16,128,128,rt),new it(8,32,128,256,rt),new it(32,128,258,1024,rt),new it(32,258,258,4096,rt)];function ht(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),V(this.dyn_ltree),V(this.dyn_dtree),V(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),V(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),V(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}for(var lt=function(t){var e,i=function(t){if(!t||!t.state)return Q(t,G);t.total_in=t.total_out=0,t.data_type=2;var e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:N,t.adler=2===e.wrap?0:1,e.last_flush=0,function(t){D||(function(){var t,e,i,g,v,w=Array(16);for(i=0,g=0;g<28;g++)for(o[g]=i,t=0;t<1<<a[g];t++)_[i++]=g;for(_[i-1]=g,v=0,g=0;g<16;g++)for(c[g]=v,t=0;t<1<<n[g];t++)l[v++]=g;for(v>>=7;g<30;g++)for(c[g]=v<<7,t=0;t<1<<n[g]-7;t++)l[256+v++]=g;for(e=0;e<=15;e++)w[e]=0;for(t=0;t<=143;)s[2*t+1]=8,t++,w[8]++;for(;t<=255;)s[2*t+1]=9,t++,w[9]++;for(;t<=279;)s[2*t+1]=7,t++,w[7]++;for(;t<=287;)s[2*t+1]=8,t++,w[8]++;for(z(s,287,w),t=0;t<30;t++)h[2*t+1]=5,h[2*t]=y(t,5);d=new p(s,a,257,286,15),u=new p(h,n,0,30,15),f=new p([],r,0,19,7)}(),D=!0),t.l_desc=new g(t.dyn_ltree,d),t.d_desc=new g(t.dyn_dtree,u),t.bl_desc=new g(t.bl_tree,f),t.bi_buf=0,t.bi_valid=0,k(t)}(e),0}(t);return 0===i&&((e=t.state).window_size=2*e.w_size,V(e.head),e.max_lazy_match=st[e.level].max_lazy,e.good_match=st[e.level].good_length,e.nice_match=st[e.level].nice_length,e.max_chain_length=st[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),i},_t=function(t,e){var a,n;if(!t||!t.state||e>5||e<0)return t?Q(t,G):G;var r=t.state;if(!t.output||!t.input&&0!==t.avail_in||r.status===P&&4!==e)return Q(t,0===t.avail_out?-5:G);r.strm=t;var i=r.last_flush;if(r.last_flush=e,42===r.status)if(2===r.wrap)t.adler=0,Z(r,31),Z(r,139),Z(r,8),r.gzhead?(Z(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),Z(r,255&r.gzhead.time),Z(r,r.gzhead.time>>8&255),Z(r,r.gzhead.time>>16&255),Z(r,r.gzhead.time>>24&255),Z(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Z(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(Z(r,255&r.gzhead.extra.length),Z(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=T(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(Z(r,0),Z(r,0),Z(r,0),Z(r,0),Z(r,0),Z(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Z(r,3),r.status=N);else{var h=8+(r.w_bits-8<<4)<<8;h|=(r.strategy>=2||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(h|=32),h+=31-h%31,r.status=N,$(r,h),0!==r.strstart&&($(r,t.adler>>>16),$(r,65535&t.adler)),t.adler=1}if(69===r.status)if(r.gzhead.extra){for(a=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending!==r.pending_buf_size));)Z(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,Z(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,Z(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.status=K)}else r.status=K;if(r.status===K&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&X(t),r.pending+2<=r.pending_buf_size&&(Z(r,255&t.adler),Z(r,t.adler>>8&255),t.adler=0,r.status=N)):r.status=N),0!==r.pending){if(X(t),0===t.avail_out)return r.last_flush=-1,0}else if(0===t.avail_in&&R(e)<=R(i)&&4!==e)return Q(t,-5);if(r.status===P&&0!==t.avail_in)return Q(t,-5);if(0!==t.avail_in||0!==r.lookahead||0!==e&&r.status!==P){var l=2===r.strategy?function(t,e){for(var a;;){if(0===t.lookahead&&(at(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,a=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2}(r,e):3===r.strategy?function(t,e){for(var a,n,r,i,s=t.window;;){if(t.lookahead<=H){if(at(t),t.lookahead<=H&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=s[r=t.strstart-1])===s[++r]&&n===s[++r]&&n===s[++r]){i=t.strstart+H;do{}while(n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&r<i);t.match_length=H-(i-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=F(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2}(r,e):st[r.level].func(r,e);if(3!==l&&4!==l||(r.status=P),1===l||3===l)return 0===t.avail_out&&(r.last_flush=-1),0;if(2===l&&(1===e?function(t){m(t,2,3),b(t,256,s),function(t){16===t.bi_valid?(w(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}(r):5!==e&&(q(r,0,0,!1),3===e&&(V(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),X(t),0===t.avail_out))return r.last_flush=-1,0}return 4!==e?0:r.wrap<=0?1:(2===r.wrap?(Z(r,255&t.adler),Z(r,t.adler>>8&255),Z(r,t.adler>>16&255),Z(r,t.adler>>24&255),Z(r,255&t.total_in),Z(r,t.total_in>>8&255),Z(r,t.total_in>>16&255),Z(r,t.total_in>>24&255)):($(r,t.adler>>>16),$(r,65535&t.adler)),X(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?0:1)},ot=function(t){if(!t||!t.state)return G;var e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&e!==K&&e!==N&&e!==P?Q(t,G):(t.state=null,e===N?Q(t,-3):0)},dt=new Uint8Array(256),ut=0;ut<256;ut++)dt[ut]=ut>=252?6:ut>=248?5:ut>=240?4:ut>=224?3:ut>=192?2:1;dt[254]=dt[254]=1;var ft=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},ct=Object.prototype.toString;function pt(){this.options={level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0};var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ft,this.strm.avail_out=0;var e,a,n=function(t,e,a,n,r,i){if(!t)return G;var s=1;if(-1===e&&(e=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),r<1||r>9||8!==a||n<8||n>15||e<0||e>9||i<0||i>4)return Q(t,G);8===n&&(n=9);var h=new ht;return t.state=h,h.strm=t,h.wrap=s,h.gzhead=null,h.w_bits=n,h.w_size=1<<h.w_bits,h.w_mask=h.w_size-1,h.hash_bits=r+7,h.hash_size=1<<h.hash_bits,h.hash_mask=h.hash_size-1,h.hash_shift=~~((h.hash_bits+3-1)/3),h.window=new Uint8Array(2*h.w_size),h.head=new Uint16Array(h.hash_size),h.prev=new Uint16Array(h.w_size),h.lit_bufsize=1<<r+6,h.pending_buf_size=4*h.lit_bufsize,h.pending_buf=new Uint8Array(h.pending_buf_size),h.d_buf=1*h.lit_bufsize,h.l_buf=3*h.lit_bufsize,h.level=e,h.strategy=i,h.method=a,lt(t)}(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==n)throw Error(O[n]);if(t.header&&(e=this.strm,a=t.header,e&&e.state&&(2!==e.state.wrap||(e.state.gzhead=a))),t.dictionary){var r;if(r="[object ArrayBuffer]"===ct.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(n=function(t,e){var a=e.length;if(!t||!t.state)return G;var n=t.state,r=n.wrap;if(2===r||1===r&&42!==n.status||n.lookahead)return G;if(1===r&&(t.adler=L(t.adler,e,a,0)),n.wrap=0,a>=n.w_size){0===r&&(V(n.head),n.strstart=0,n.block_start=0,n.insert=0);var i=new Uint8Array(n.w_size);i.set(e.subarray(a-n.w_size,a),0),e=i,a=n.w_size}var s=t.avail_in,h=t.next_in,l=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,at(n);n.lookahead>=3;){var _=n.strstart,o=n.lookahead-2;do{n.ins_h=W(n,n.ins_h,n.window[_+3-1]),n.prev[_&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=_,_++}while(--o);n.strstart=_,n.lookahead=2,at(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=h,t.input=l,t.avail_in=s,n.wrap=r,0}(this.strm,r)))throw Error(O[n]);this._dict_set=!0}}function gt(t,e,a){try{t.postMessage({type:"errored",error:e,streamId:a})}catch(n){t.postMessage({type:"errored",error:e+"",streamId:a})}}function vt(t){const e=t.strm.adler;return new Uint8Array([3,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e])}pt.prototype.push=function(t,e){var a,n,r=this.strm,i=this.options.chunkSize;if(this.ended)return!1;for(n=e===~~e?e:!0===e?4:0,"[object ArrayBuffer]"===ct.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(i),r.next_out=0,r.avail_out=i),(2===n||3===n)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(1===(a=_t(r,n)))return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),a=ot(this.strm),this.onEnd(a),this.ended=!0,0===a;if(0!==r.avail_out){if(n>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},pt.prototype.onData=function(t){this.chunks.push(t)},pt.prototype.onEnd=function(t){0===t&&(this.result=function(t){for(var e=0,a=0,n=t.length;a<n;a++)e+=t[a].length;for(var r=new Uint8Array(e),i=0,s=0,h=t.length;i<h;i++){var l=t[i];r.set(l,s),s+=l.length}return r}(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},function(e=self){try{const a=new Map;e.addEventListener("message",n=>{try{const r=function(e,a){switch(a.action){case"init":return{type:"initialized",version:"6.24.1"};case"write":{let n=e.get(a.streamId);n||(n=new pt,e.set(a.streamId,n));const r=n.chunks.length,i=function(t){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,a,n,r,i,s=t.length,h=0;for(r=0;r<s;r++)a=t.charCodeAt(r),55296==(64512&a)&&r+1<s&&(n=t.charCodeAt(r+1),56320==(64512&n)&&(a=65536+(a-55296<<10)+(n-56320),r++)),h+=a<128?1:a<2048?2:a<65536?3:4;for(e=new Uint8Array(h),i=0,r=0;i<h;r++)a=t.charCodeAt(r),55296==(64512&a)&&r+1<s&&(n=t.charCodeAt(r+1),56320==(64512&n)&&(a=65536+(a-55296<<10)+(n-56320),r++)),a<128?e[i++]=a:a<2048?(e[i++]=192|a>>>6,e[i++]=128|63&a):a<65536?(e[i++]=224|a>>>12,e[i++]=128|a>>>6&63,e[i++]=128|63&a):(e[i++]=240|a>>>18,e[i++]=128|a>>>12&63,e[i++]=128|a>>>6&63,e[i++]=128|63&a);return e}(a.data);return n.push(i,2),{type:"wrote",id:a.id,streamId:a.streamId,result:t(n.chunks.slice(r)),trailer:vt(n),additionalBytesCount:i.length}}case"reset":e.delete(a.streamId)}}(a,n.data);r&&e.postMessage(r)}catch(t){gt(e,t,n.data&&"streamId"in n.data?n.data.streamId:void 0)}})}catch(t){gt(e,t)}}()})();'])));
|
|
21947
21947
|
}
|
|
21948
|
-
let
|
|
21948
|
+
let Ze = {
|
|
21949
21949
|
status: 0
|
|
21950
21950
|
/* DeflateWorkerStatus.Nil */
|
|
21951
21951
|
};
|
|
21952
21952
|
function BS(e, t, r, a = qS) {
|
|
21953
|
-
switch (
|
|
21953
|
+
switch (Ze.status === 0 && d6(e, t, a), Ze.status) {
|
|
21954
21954
|
case 1:
|
|
21955
|
-
return
|
|
21955
|
+
return Ze.initializationFailureCallbacks.push(r), Ze.worker;
|
|
21956
21956
|
case 3:
|
|
21957
|
-
return
|
|
21957
|
+
return Ze.worker;
|
|
21958
21958
|
}
|
|
21959
21959
|
}
|
|
21960
21960
|
function Mg() {
|
|
21961
|
-
return
|
|
21961
|
+
return Ze.status;
|
|
21962
21962
|
}
|
|
21963
21963
|
function d6(e, t, r = qS) {
|
|
21964
21964
|
try {
|
|
@@ -21967,7 +21967,7 @@ function d6(e, t, r = qS) {
|
|
|
21967
21967
|
}), { stop: o } = Fe(e, a, "message", ({ data: s }) => {
|
|
21968
21968
|
s.type === "errored" ? yc(e, t, s.error, s.streamId) : s.type === "initialized" && p6(s.version);
|
|
21969
21969
|
});
|
|
21970
|
-
a.postMessage({ action: "init" }), st(() => m6(t), u6),
|
|
21970
|
+
a.postMessage({ action: "init" }), st(() => m6(t), u6), Ze = { status: 1, worker: a, stop: () => {
|
|
21971
21971
|
n(), o();
|
|
21972
21972
|
}, initializationFailureCallbacks: [] };
|
|
21973
21973
|
} catch (a) {
|
|
@@ -21975,25 +21975,25 @@ function d6(e, t, r = qS) {
|
|
|
21975
21975
|
}
|
|
21976
21976
|
}
|
|
21977
21977
|
function m6(e) {
|
|
21978
|
-
|
|
21978
|
+
Ze.status === 1 && (Y.error(`${e} failed to start: a timeout occurred while initializing the Worker`), Ze.initializationFailureCallbacks.forEach((t) => t()), Ze = {
|
|
21979
21979
|
status: 2
|
|
21980
21980
|
/* DeflateWorkerStatus.Error */
|
|
21981
21981
|
});
|
|
21982
21982
|
}
|
|
21983
21983
|
function p6(e) {
|
|
21984
|
-
|
|
21984
|
+
Ze.status === 1 && (Ze = { status: 3, worker: Ze.worker, stop: Ze.stop, version: e });
|
|
21985
21985
|
}
|
|
21986
21986
|
function yc(e, t, r, a) {
|
|
21987
|
-
|
|
21987
|
+
Ze.status === 1 || Ze.status === 0 ? (cp({
|
|
21988
21988
|
configuredUrl: e.workerUrl,
|
|
21989
21989
|
error: r,
|
|
21990
21990
|
source: t,
|
|
21991
21991
|
scriptType: "worker"
|
|
21992
|
-
}),
|
|
21992
|
+
}), Ze.status === 1 && Ze.initializationFailureCallbacks.forEach((n) => n()), Ze = {
|
|
21993
21993
|
status: 2
|
|
21994
21994
|
/* DeflateWorkerStatus.Error */
|
|
21995
21995
|
}) : tp(r, {
|
|
21996
|
-
worker_version:
|
|
21996
|
+
worker_version: Ze.status === 3 && Ze.version,
|
|
21997
21997
|
stream_id: a
|
|
21998
21998
|
});
|
|
21999
21999
|
}
|
|
@@ -22230,7 +22230,7 @@ async function S6(e = I6) {
|
|
|
22230
22230
|
async function I6() {
|
|
22231
22231
|
return (await import(
|
|
22232
22232
|
/* webpackChunkName: "recorder" */
|
|
22233
|
-
"./startRecording-
|
|
22233
|
+
"./startRecording-B_9CRZ_P.js"
|
|
22234
22234
|
)).startRecording;
|
|
22235
22235
|
}
|
|
22236
22236
|
function E6() {
|
|
@@ -22266,7 +22266,7 @@ async function T6(e = O6) {
|
|
|
22266
22266
|
async function O6() {
|
|
22267
22267
|
return (await import(
|
|
22268
22268
|
/* webpackChunkName: "profiler" */
|
|
22269
|
-
"./profiler-
|
|
22269
|
+
"./profiler-D6ndqfsd.js"
|
|
22270
22270
|
)).createRumProfiler;
|
|
22271
22271
|
}
|
|
22272
22272
|
function N6() {
|
|
@@ -33100,7 +33100,7 @@ const Ll = ({
|
|
|
33100
33100
|
projectSlug: e,
|
|
33101
33101
|
auth: t
|
|
33102
33102
|
}) => {
|
|
33103
|
-
const a = Up()?.isReplay ?? !1, n = Bm(), o =
|
|
33103
|
+
const a = Up()?.isReplay ?? !1, n = Bm(), o = Ve(() => (t?.url || "" || "https://app.getgram.ai").replace(/\/+$/, ""), [t?.url]), i = Ve(() => a ? null : ZV(t) ? KV(t.dangerousApiKey, o) : XE(t) ? () => Promise.resolve(t.session) : qV(t) ? t.session : QE(t) ? () => Promise.resolve(t.sessionToken) : BV(t) ? t.sessionFn : WV, [t, a, o]), s = JV({
|
|
33104
33104
|
getSession: i,
|
|
33105
33105
|
projectSlug: e
|
|
33106
33106
|
}), l = !GV(t) && !a, c = Ce(async () => {
|
|
@@ -33351,7 +33351,7 @@ const rZ = ({ children: e, config: t }) => {
|
|
|
33351
33351
|
), () => {
|
|
33352
33352
|
U6();
|
|
33353
33353
|
}), [t.tools?.toolsRequiringApproval, S]);
|
|
33354
|
-
const E = De(null), R = De(/* @__PURE__ */ new Map()), F = De(null), B =
|
|
33354
|
+
const E = De(null), R = De(/* @__PURE__ */ new Map()), F = De(null), B = Ve(
|
|
33355
33355
|
() => ({
|
|
33356
33356
|
sendMessages: async ({ messages: ve, abortSignal: Te }) => {
|
|
33357
33357
|
const Be = !!t.languageModel;
|
|
@@ -33438,7 +33438,7 @@ const rZ = ({ children: e, config: t }) => {
|
|
|
33438
33438
|
a.isLoading,
|
|
33439
33439
|
I
|
|
33440
33440
|
]
|
|
33441
|
-
), ue = t.history?.enabled ?? !1, Me =
|
|
33441
|
+
), ue = t.history?.enabled ?? !1, Me = Ve(
|
|
33442
33442
|
() => ({
|
|
33443
33443
|
config: t,
|
|
33444
33444
|
setModel: s,
|
|
@@ -33451,7 +33451,7 @@ const rZ = ({ children: e, config: t }) => {
|
|
|
33451
33451
|
mcpTools: _
|
|
33452
33452
|
}),
|
|
33453
33453
|
[t, i, l, u, m, _]
|
|
33454
|
-
), te = t.tools?.frontendTools ?? {}, G =
|
|
33454
|
+
), te = t.tools?.frontendTools ?? {}, G = Ve(() => {
|
|
33455
33455
|
const ve = XV(
|
|
33456
33456
|
t.tools?.frontendTools
|
|
33457
33457
|
);
|
|
@@ -34317,7 +34317,7 @@ const nt = [0.23, 1, 0.32, 1], FZ = {
|
|
|
34317
34317
|
);
|
|
34318
34318
|
};
|
|
34319
34319
|
function qZ(e) {
|
|
34320
|
-
return
|
|
34320
|
+
return Ve(() => e.reduce((t, r) => (t?.[r.language] && !r.overrideExisting || (t = {
|
|
34321
34321
|
...t,
|
|
34322
34322
|
[r.language]: {
|
|
34323
34323
|
CodeHeader: r.Header ?? (() => null),
|
|
@@ -35796,7 +35796,7 @@ function cG() {
|
|
|
35796
35796
|
}
|
|
35797
35797
|
const Fl = () => {
|
|
35798
35798
|
const { config: e } = at(), t = e.theme ?? {};
|
|
35799
|
-
return
|
|
35799
|
+
return Ve(() => {
|
|
35800
35800
|
const { colorScheme: r = "light" } = t;
|
|
35801
35801
|
return {
|
|
35802
35802
|
className: r === "dark" || r === "system" && typeof window < "u" && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : void 0
|
|
@@ -35807,10 +35807,10 @@ function Aq({
|
|
|
35807
35807
|
tools: e,
|
|
35808
35808
|
enabled: t = !0
|
|
35809
35809
|
}) {
|
|
35810
|
-
const [r, a] = se(0), n = De(null), o = Pu(), i = Xe(({ composer: f }) => f.text), s =
|
|
35810
|
+
const [r, a] = se(0), n = De(null), o = Pu(), i = Xe(({ composer: f }) => f.text), s = Ve(
|
|
35811
35811
|
() => _q(e),
|
|
35812
35812
|
[e]
|
|
35813
|
-
), l =
|
|
35813
|
+
), l = Ve(
|
|
35814
35814
|
() => t ? xq(i, e) : [],
|
|
35815
35815
|
[i, e, t]
|
|
35816
35816
|
), c = Ce(() => {
|
|
@@ -35906,7 +35906,7 @@ const zq = ({ children: e, startIndex: t, endIndex: r }) => {
|
|
|
35906
35906
|
for (let u = t; u <= r; u++)
|
|
35907
35907
|
if (c.parts[u]?.status?.type === "running") return !0;
|
|
35908
35908
|
return !1;
|
|
35909
|
-
}), { config: i } = at(), s = i.tools?.expandToolGroupsByDefault ?? !1, l =
|
|
35909
|
+
}), { config: i } = at(), s = i.tools?.expandToolGroupsByDefault ?? !1, l = Ve(() => a === 0 ? "No tools called" : a === 1 ? n ? `Calling ${Pq(n)}...` : "Calling tool..." : o ? `Calling ${a} tools...` : `Executed ${a} tools`, [a, n, o]);
|
|
35910
35910
|
return n && i.tools?.components?.[n] ? e : a === 1 ? /* @__PURE__ */ p("div", { className: N("my-4 w-full max-w-xl"), children: /* @__PURE__ */ p("div", { className: "border-border bg-card overflow-hidden rounded-lg border", children: e }) }) : /* @__PURE__ */ p("div", { className: "my-4 w-full max-w-xl", children: /* @__PURE__ */ p(
|
|
35911
35911
|
yq,
|
|
35912
35912
|
{
|
|
@@ -36400,7 +36400,7 @@ const zq = ({ children: e, startIndex: t, endIndex: r }) => {
|
|
|
36400
36400
|
) }) })
|
|
36401
36401
|
] });
|
|
36402
36402
|
}, Hq = () => /* @__PURE__ */ p(Pr.Error, { children: /* @__PURE__ */ p(af.Root, { className: "aui-message-error-root border-destructive bg-destructive/10 text-destructive dark:bg-destructive/5 mt-2 rounded-md border p-3 text-sm dark:text-red-200", children: /* @__PURE__ */ p(af.Message, { className: "aui-message-error-message line-clamp-2" }) }) }), Jq = () => Xe(({ message: t }) => t.status?.type !== "running" ? !1 : t.parts[t.parts.length - 1]?.type === "tool-call") ? /* @__PURE__ */ p("div", { className: "aui-md mt-2", "data-status": "running" }) : null, Wq = () => {
|
|
36403
|
-
const { config: e } = at(), t = e.tools ?? {}, r = e.components ?? {}, a =
|
|
36403
|
+
const { config: e } = at(), t = e.tools ?? {}, r = e.components ?? {}, a = Ve(
|
|
36404
36404
|
() => ({
|
|
36405
36405
|
Text: r.Text ?? p$,
|
|
36406
36406
|
Image: r.Image ?? Kq,
|
|
@@ -36619,14 +36619,14 @@ const Hp = ({ className: e }) => {
|
|
|
36619
36619
|
ease: nt
|
|
36620
36620
|
}
|
|
36621
36621
|
}, cB = ({ className: e }) => {
|
|
36622
|
-
const { config: t } = at(), r = Fl(), a = xr(), n = Ft(), [o, i] = se(t.modal?.defaultOpen ?? !1), { expandable: s, isExpanded: l, setIsExpanded: c } = k$(), u = t.modal?.title, d = t.modal?.icon, m = t.history?.enabled && t.history?.showThreadList !== !1, f = t.modal?.position ?? "bottom-right", g = uB(f), h =
|
|
36622
|
+
const { config: t } = at(), r = Fl(), a = xr(), n = Ft(), [o, i] = se(t.modal?.defaultOpen ?? !1), { expandable: s, isExpanded: l, setIsExpanded: c } = k$(), u = t.modal?.title, d = t.modal?.icon, m = t.history?.enabled && t.history?.showThreadList !== !1, f = t.modal?.position ?? "bottom-right", g = uB(f), h = Ve(
|
|
36623
36623
|
() => t.modal?.dimensions?.default ?? {
|
|
36624
36624
|
width: "500px",
|
|
36625
36625
|
height: "600px",
|
|
36626
36626
|
maxHeight: "95vh"
|
|
36627
36627
|
},
|
|
36628
36628
|
[t.modal?.dimensions?.default]
|
|
36629
|
-
), b =
|
|
36629
|
+
), b = Ve(
|
|
36630
36630
|
() => t.modal?.dimensions?.expanded ?? {
|
|
36631
36631
|
width: "70vw",
|
|
36632
36632
|
height: "90vh"
|
|
@@ -36870,7 +36870,7 @@ const zc = `@layer properties{@supports (((-webkit-hyphens:none)) and (not (marg
|
|
|
36870
36870
|
hostClassName: t,
|
|
36871
36871
|
hostStyle: r
|
|
36872
36872
|
}) => {
|
|
36873
|
-
const a = De(null), n = De(null), [o, i] = se(null), { config: s } = at(), l = Fl(), c =
|
|
36873
|
+
const a = De(null), n = De(null), [o, i] = se(null), { config: s } = at(), l = Fl(), c = Ve(
|
|
36874
36874
|
() => N(vs, l.className),
|
|
36875
36875
|
[l.className]
|
|
36876
36876
|
);
|
|
@@ -36986,10 +36986,10 @@ const pB = new Lx(), pG = ({
|
|
|
36986
36986
|
userMessageDelay: n,
|
|
36987
36987
|
assistantStartDelay: o,
|
|
36988
36988
|
onComplete: i
|
|
36989
|
-
}, l =
|
|
36989
|
+
}, l = Ve(
|
|
36990
36990
|
() => Oq(e, s),
|
|
36991
36991
|
[e, a, n, o, i]
|
|
36992
|
-
), c = qu({ transport: l }), u = r?.plugins ?? Kh, d =
|
|
36992
|
+
), c = qu({ transport: l }), u = r?.plugins ?? Kh, d = Ve(
|
|
36993
36993
|
() => ({
|
|
36994
36994
|
projectSlug: r?.projectSlug ?? "replay",
|
|
36995
36995
|
variant: r?.variant,
|
|
@@ -37003,7 +37003,7 @@ const pB = new Lx(), pG = ({
|
|
|
37003
37003
|
sidecar: r?.sidecar
|
|
37004
37004
|
}),
|
|
37005
37005
|
[r, u]
|
|
37006
|
-
), m =
|
|
37006
|
+
), m = Ve(
|
|
37007
37007
|
() => ({
|
|
37008
37008
|
config: d,
|
|
37009
37009
|
setModel: () => {
|
|
@@ -37019,7 +37019,7 @@ const pB = new Lx(), pG = ({
|
|
|
37019
37019
|
mcpTools: void 0
|
|
37020
37020
|
}),
|
|
37021
37021
|
[d, u]
|
|
37022
|
-
), f =
|
|
37022
|
+
), f = Ve(() => ({ isReplay: !0 }), []), g = Ve(() => ({ chatId: "replay" }), []);
|
|
37023
37023
|
return /* @__PURE__ */ p(Vx, { client: pB, children: /* @__PURE__ */ p(zu, { runtime: c, children: /* @__PURE__ */ p(YE.Provider, { value: f, children: /* @__PURE__ */ p(Zu.Provider, { value: m, children: /* @__PURE__ */ p(Vu.Provider, { value: g, children: /* @__PURE__ */ C(n$, { children: [
|
|
37024
37024
|
/* @__PURE__ */ p(
|
|
37025
37025
|
"div",
|
|
@@ -37725,4 +37725,4 @@ export {
|
|
|
37725
37725
|
qe as y,
|
|
37726
37726
|
JB as z
|
|
37727
37727
|
};
|
|
37728
|
-
//# sourceMappingURL=index-
|
|
37728
|
+
//# sourceMappingURL=index-DBrhzauj.js.map
|