@exulu/frontend 1.9.0 → 1.10.0
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/.next/BUILD_ID +1 -1
- package/dist/.next/app-build-manifest.json +140 -140
- package/dist/.next/app-path-routes-manifest.json +1 -1
- package/dist/.next/build-manifest.json +2 -2
- package/dist/.next/prerender-manifest.json +1 -1
- package/dist/.next/server/app/(application)/agents/edit/[id]/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/agents/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/chat/[agent]/[session]/page.js +7 -7
- package/dist/.next/server/app/(application)/chat/[agent]/[session]/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/chat/[agent]/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/chat/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/configuration/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/dashboard/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/data/[[...query]]/page.js +3 -3
- package/dist/.next/server/app/(application)/data/[[...query]]/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/evals/[id]/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/evals/cases/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/evals/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/explorer/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/keys/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/projects/[project]/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/projects/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/prompts/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/roles/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/token/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/users/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/variables/create/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/variables/edit/[variable_id]/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/variables/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/variables/usage/[variable_id]/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/workflows/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(authentication)/login/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/_not-found.html +1 -1
- package/dist/.next/server/app/_not-found.rsc +1 -1
- package/dist/.next/server/app-paths-manifest.json +6 -6
- package/dist/.next/server/chunks/2270.js +17 -6
- package/dist/.next/server/chunks/5485.js +1 -1
- package/dist/.next/server/chunks/5974.js +1 -1
- package/dist/.next/server/middleware-manifest.json +5 -5
- package/dist/.next/server/pages/404.html +1 -1
- package/dist/.next/server/pages/500.html +1 -1
- package/dist/.next/server/server-reference-manifest.json +1 -1
- package/dist/.next/static/chunks/3750-e3d1b2cccd265190.js +2 -0
- package/dist/.next/static/chunks/3750-e3d1b2cccd265190.js.map +1 -0
- package/dist/.next/static/chunks/{3832-417a5eeee712a793.js → 3832-d7782d6a2771ae6c.js} +1 -1
- package/dist/.next/static/chunks/{3832-417a5eeee712a793.js.map → 3832-d7782d6a2771ae6c.js.map} +1 -1
- package/dist/.next/static/chunks/6280-50b751f993f2fe4f.js +2 -0
- package/dist/.next/static/chunks/6280-50b751f993f2fe4f.js.map +1 -0
- package/dist/.next/static/chunks/{6373-601400fab8a3bb55.js → 6373-aef582adc575d3ca.js} +2 -2
- package/dist/.next/static/chunks/6373-aef582adc575d3ca.js.map +1 -0
- package/dist/.next/static/chunks/{8293-0e69d89d2dac7111.js → 8293-ba5cd36594e6fde1.js} +3 -3
- package/dist/.next/static/chunks/8293-ba5cd36594e6fde1.js.map +1 -0
- package/dist/.next/static/chunks/9105-d8ff41060f7ffc85.js +2 -0
- package/dist/.next/static/chunks/9105-d8ff41060f7ffc85.js.map +1 -0
- package/dist/.next/static/chunks/app/(application)/chat/[agent]/[session]/{page-7edb1c7c850f982c.js → page-d59534ca19eee51f.js} +1 -1
- package/dist/.next/static/chunks/app/(application)/chat/[agent]/[session]/{page-7edb1c7c850f982c.js.map → page-d59534ca19eee51f.js.map} +1 -1
- package/dist/.next/static/chunks/app/(application)/data/[[...query]]/layout-0c7c1b0e1713bf60.js +2 -0
- package/dist/.next/static/chunks/app/(application)/data/[[...query]]/layout-0c7c1b0e1713bf60.js.map +1 -0
- package/dist/.next/static/chunks/app/(application)/data/[[...query]]/page-7db6bfbf02606136.js +2 -0
- package/dist/.next/static/chunks/app/(application)/data/[[...query]]/page-7db6bfbf02606136.js.map +1 -0
- package/dist/.next/static/chunks/app/(application)/explorer/{page-1d676c9dfe3ed58b.js → page-e6b1c034c07776e2.js} +1 -1
- package/dist/.next/static/chunks/app/(application)/explorer/{page-1d676c9dfe3ed58b.js.map → page-e6b1c034c07776e2.js.map} +1 -1
- package/dist/.next/static/chunks/app/(application)/token/{page-3f74f711f3d04fce.js → page-3acc39cb8a718331.js} +1 -1
- package/dist/.next/static/chunks/app/(application)/token/{page-3f74f711f3d04fce.js.map → page-3acc39cb8a718331.js.map} +1 -1
- package/dist/.next/static/chunks/ba12c10f-85ed008ce7746dbe.js +2 -0
- package/dist/.next/static/chunks/ba12c10f-85ed008ce7746dbe.js.map +1 -0
- package/dist/.next/static/css/9c08ae5d990a6b14.css +4 -0
- package/dist/.next/static/css/9c08ae5d990a6b14.css.map +1 -0
- package/dist/.next/static/css/e3f2a16ab7676b05.css.map +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
- package/dist/.next/static/chunks/3750-f45c59ef1cc79417.js +0 -2
- package/dist/.next/static/chunks/3750-f45c59ef1cc79417.js.map +0 -1
- package/dist/.next/static/chunks/572-2940a399da1e3a3b.js +0 -2
- package/dist/.next/static/chunks/572-2940a399da1e3a3b.js.map +0 -1
- package/dist/.next/static/chunks/6373-601400fab8a3bb55.js.map +0 -1
- package/dist/.next/static/chunks/8293-0e69d89d2dac7111.js.map +0 -1
- package/dist/.next/static/chunks/9105-dfbce1bad8e3e8dd.js +0 -2
- package/dist/.next/static/chunks/9105-dfbce1bad8e3e8dd.js.map +0 -1
- package/dist/.next/static/chunks/app/(application)/data/[[...query]]/layout-2d47be0ee80dd89d.js +0 -2
- package/dist/.next/static/chunks/app/(application)/data/[[...query]]/layout-2d47be0ee80dd89d.js.map +0 -1
- package/dist/.next/static/chunks/app/(application)/data/[[...query]]/page-8d2b3995cacfd832.js +0 -2
- package/dist/.next/static/chunks/app/(application)/data/[[...query]]/page-8d2b3995cacfd832.js.map +0 -1
- package/dist/.next/static/chunks/ba12c10f-aaafcb074f608624.js +0 -2
- package/dist/.next/static/chunks/ba12c10f-aaafcb074f608624.js.map +0 -1
- package/dist/.next/static/css/6f8c5212af8ef284.css +0 -4
- package/dist/.next/static/css/6f8c5212af8ef284.css.map +0 -1
- /package/dist/.next/static/{ls-syPkq9-MWp-VWWDEZJ → 3j63p6b3zZZB_v1Hn8Mxp}/_buildManifest.js +0 -0
- /package/dist/.next/static/{ls-syPkq9-MWp-VWWDEZJ → 3j63p6b3zZZB_v1Hn8Mxp}/_ssgManifest.js +0 -0
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
5:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"}
|
|
5
5
|
6:{"display":"inline-block"}
|
|
6
6
|
7:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0}
|
|
7
|
-
0:["
|
|
7
|
+
0:["3j63p6b3zZZB_v1Hn8Mxp",[[["",{"children":["/_not-found",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["/_not-found",{"children":["__PAGE__",{},[["$L1",[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],null],null],null]},[null,["$","$L2",null,{"parallelRouterKey":"children","segmentPath":["children","/_not-found","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","html",null,{"children":["$","body",null,{"children":["$","$L2",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$4","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$5","children":"404"}],["$","div",null,{"style":"$6","children":["$","h2",null,{"style":"$7","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]],null],null],["$L8",["$","meta",null,{"name":"robots","content":"noindex"}]]]]]
|
|
8
8
|
8:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","meta","2",{"name":"next-size-adjust"}]]
|
|
9
9
|
1:null
|
|
@@ -4,23 +4,23 @@
|
|
|
4
4
|
"/api/config/route": "app/api/config/route.js",
|
|
5
5
|
"/(application)/configuration/page": "app/(application)/configuration/page.js",
|
|
6
6
|
"/(application)/keys/page": "app/(application)/keys/page.js",
|
|
7
|
-
"/(application)/token/page": "app/(application)/token/page.js",
|
|
8
7
|
"/(application)/roles/page": "app/(application)/roles/page.js",
|
|
8
|
+
"/(application)/token/page": "app/(application)/token/page.js",
|
|
9
9
|
"/(application)/agents/edit/[id]/page": "app/(application)/agents/edit/[id]/page.js",
|
|
10
10
|
"/(application)/agents/page": "app/(application)/agents/page.js",
|
|
11
|
-
"/(application)/evals/page": "app/(application)/evals/page.js",
|
|
12
11
|
"/(application)/evals/cases/page": "app/(application)/evals/cases/page.js",
|
|
13
|
-
"/(application)/explorer/page": "app/(application)/explorer/page.js",
|
|
14
12
|
"/(application)/dashboard/page": "app/(application)/dashboard/page.js",
|
|
13
|
+
"/(application)/explorer/page": "app/(application)/explorer/page.js",
|
|
15
14
|
"/(application)/page": "app/(application)/page.js",
|
|
16
|
-
"/(application)/
|
|
15
|
+
"/(application)/evals/page": "app/(application)/evals/page.js",
|
|
17
16
|
"/(application)/users/page": "app/(application)/users/page.js",
|
|
18
|
-
"/(application)/
|
|
17
|
+
"/(application)/prompts/page": "app/(application)/prompts/page.js",
|
|
19
18
|
"/(application)/variables/create/page": "app/(application)/variables/create/page.js",
|
|
19
|
+
"/(application)/evals/[id]/page": "app/(application)/evals/[id]/page.js",
|
|
20
20
|
"/(application)/variables/page": "app/(application)/variables/page.js",
|
|
21
|
-
"/(application)/variables/edit/[variable_id]/page": "app/(application)/variables/edit/[variable_id]/page.js",
|
|
22
21
|
"/(application)/workflows/page": "app/(application)/workflows/page.js",
|
|
23
22
|
"/(authentication)/login/page": "app/(authentication)/login/page.js",
|
|
23
|
+
"/(application)/variables/edit/[variable_id]/page": "app/(application)/variables/edit/[variable_id]/page.js",
|
|
24
24
|
"/(application)/variables/usage/[variable_id]/page": "app/(application)/variables/usage/[variable_id]/page.js",
|
|
25
25
|
"/(application)/chat/page": "app/(application)/chat/page.js",
|
|
26
26
|
"/(application)/data/[[...query]]/page": "app/(application)/data/[[...query]]/page.js",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";exports.id=2270,exports.ids=[2270],exports.modules={42270:(e,t,i)=>{i.d(t,{$6:()=>ed,$W:()=>eE,A1:()=>_,Ak:()=>ev,Au:()=>e_,Az:()=>Z,B4:()=>eH,BK:()=>es,B_:()=>en,C3:()=>I,CN:()=>eP,Dt:()=>F,E3:()=>W,Ep:()=>e0,Eq:()=>f,GJ:()=>m,Hk:()=>el,Iv:()=>e4,JL:()=>b,JM:()=>L,Jq:()=>eV,L5:()=>ea,Ll:()=>e5,MU:()=>C,Md:()=>s,Mh:()=>eO,Mp:()=>ei,N:()=>h,Nl:()=>tt,Nu:()=>eY,OP:()=>eX,P3:()=>l,Pe:()=>O,QW:()=>eZ,Qf:()=>H,RV:()=>ej,S9:()=>K,Tj:()=>em,Tp:()=>E,Ts:()=>eG,UK:()=>e8,Ul:()=>N,W6:()=>eu,W9:()=>j,Wc:()=>r,Wr:()=>eL,X0:()=>e7,YH:()=>ef,Yr:()=>eb,ZA:()=>ey,ZX:()=>w,Zy:()=>er,_J:()=>eo,as:()=>R,b2:()=>eh,bI:()=>B,c2:()=>X,ci:()=>Y,d5:()=>eC,dc:()=>c,eY:()=>V,fA:()=>e1,fB:()=>x,fG:()=>M,fM:()=>eS,fV:()=>
|
|
1
|
+
"use strict";exports.id=2270,exports.ids=[2270],exports.modules={42270:(e,t,i)=>{i.d(t,{$6:()=>ed,$W:()=>eE,A1:()=>_,Ak:()=>ev,Au:()=>e_,Az:()=>Z,B4:()=>eH,BK:()=>es,B_:()=>en,C3:()=>I,CN:()=>eP,Dt:()=>F,E3:()=>W,Ep:()=>e0,Eq:()=>f,GJ:()=>m,Hk:()=>el,Iv:()=>e4,JL:()=>b,JM:()=>L,Jq:()=>eV,L5:()=>ea,Ll:()=>e5,MU:()=>C,Md:()=>s,Mh:()=>eO,Mp:()=>ei,N:()=>h,Nl:()=>tt,Nu:()=>eY,OP:()=>eX,P3:()=>l,Pe:()=>O,QW:()=>eZ,Qf:()=>H,RV:()=>ej,S9:()=>K,Tj:()=>em,Tp:()=>E,Ts:()=>eG,UK:()=>e8,Ul:()=>N,W6:()=>eu,W9:()=>j,Wc:()=>r,Wr:()=>eL,X0:()=>e7,YH:()=>ef,Yr:()=>eb,ZA:()=>ey,ZX:()=>w,Zy:()=>er,_J:()=>eo,as:()=>R,b2:()=>eh,bI:()=>B,c2:()=>X,ci:()=>Y,d5:()=>eC,dc:()=>c,eY:()=>V,fA:()=>e1,fB:()=>x,fG:()=>M,fM:()=>eS,fV:()=>p,fc:()=>eM,fo:()=>q,hx:()=>ek,i9:()=>eT,iA:()=>eN,iC:()=>eK,j9:()=>ec,jA:()=>e3,jL:()=>eA,jm:()=>ew,k9:()=>eW,kH:()=>J,kZ:()=>eg,kk:()=>e$,kp:()=>eB,l1:()=>D,lU:()=>et,lW:()=>eU,lk:()=>k,m8:()=>ti,mN:()=>v,oo:()=>eQ,ps:()=>P,qK:()=>T,r1:()=>A,rR:()=>G,re:()=>e6,s5:()=>eJ,s7:()=>z,tK:()=>ep,tO:()=>y,ty:()=>S,ui:()=>Q,uw:()=>g,vP:()=>eF,ve:()=>U,xR:()=>ee,xx:()=>e9,ym:()=>u});var a=i(74904);let s="_itemsPagination",r="_itemsCreateOne",n=`
|
|
2
2
|
id
|
|
3
3
|
name
|
|
4
4
|
description
|
|
@@ -16,6 +16,14 @@
|
|
|
16
16
|
active
|
|
17
17
|
fields
|
|
18
18
|
configuration
|
|
19
|
+
processors {
|
|
20
|
+
field
|
|
21
|
+
description
|
|
22
|
+
queue
|
|
23
|
+
trigger
|
|
24
|
+
timeoutInSeconds
|
|
25
|
+
generateEmbeddings
|
|
26
|
+
}
|
|
19
27
|
sources {
|
|
20
28
|
id
|
|
21
29
|
name
|
|
@@ -184,7 +192,7 @@ updatedAt
|
|
|
184
192
|
}
|
|
185
193
|
}
|
|
186
194
|
}
|
|
187
|
-
`,
|
|
195
|
+
`,g=(0,a.Ps)`
|
|
188
196
|
query GetContexts {
|
|
189
197
|
contexts {
|
|
190
198
|
items {
|
|
@@ -192,7 +200,7 @@ updatedAt
|
|
|
192
200
|
}
|
|
193
201
|
}
|
|
194
202
|
}
|
|
195
|
-
`,
|
|
203
|
+
`,p=(0,a.Ps)`
|
|
196
204
|
query GetContextById($id: ID!) {
|
|
197
205
|
contextById(id: $id) {
|
|
198
206
|
${n}
|
|
@@ -1163,7 +1171,7 @@ updatedAt
|
|
|
1163
1171
|
count
|
|
1164
1172
|
}
|
|
1165
1173
|
}
|
|
1166
|
-
`;let
|
|
1174
|
+
`;let eg=(0,a.Ps)`
|
|
1167
1175
|
query FunctionCallsStatistics($from: Date!, $to: Date!) {
|
|
1168
1176
|
trackingStatistics(filters: {
|
|
1169
1177
|
type: { eq: TOOL_CALL }
|
|
@@ -1173,7 +1181,7 @@ updatedAt
|
|
|
1173
1181
|
count
|
|
1174
1182
|
}
|
|
1175
1183
|
}
|
|
1176
|
-
`,
|
|
1184
|
+
`,ep=(0,a.Ps)`
|
|
1177
1185
|
query AgentCallsStatistics($from: Date!, $to: Date!) {
|
|
1178
1186
|
trackingStatistics(filters: {
|
|
1179
1187
|
type: { eq: AGENT_RUN }
|
|
@@ -1559,7 +1567,10 @@ query AgentStatistics($from: Date!, $to: Date!, $names: [String!]) {
|
|
|
1559
1567
|
query GetQueue($queue: QueueEnum!) {
|
|
1560
1568
|
queue(queue: $queue) {
|
|
1561
1569
|
name
|
|
1562
|
-
concurrency
|
|
1570
|
+
concurrency {
|
|
1571
|
+
worker
|
|
1572
|
+
queue
|
|
1573
|
+
}
|
|
1563
1574
|
ratelimit
|
|
1564
1575
|
isMaxed
|
|
1565
1576
|
isPaused
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.id=5485,exports.ids=[5485],exports.modules={19753:(e,s,a)=>{a.d(s,{R:()=>S});var t=a(10326),l=a(17577),i=a(39167),r=a(18753),n=a(42270),d=a(90772),c=a(33071),o=a(53313),x=a(15940),m=a(79210),u=a(99440),h=a(567),j=a(75290),p=a(94893),g=a(71059),f=a(56762),b=a(98091),N=a(91468),v=a(11890),y=a(39183),w=a(34789),C=a(98181),k=a(18615),R=a(76812);function S({queueName:e,nameGenerator:s,retryJob:a}){let{toast:S}=(0,w.pm)(),[P,z]=(0,l.useState)(!1),[T,Z]=(0,l.useState)(!1),[q,D]=(0,l.useState)(!1),[$,A]=(0,l.useState)([]),[I,O]=(0,l.useState)(null),[L,Q]=(0,l.useState)("completed"),[J,M]=(0,l.useState)(1),[Y,F]=(0,l.useState)(20),[_,V]=(0,l.useState)(new Set),{data:E,loading:H,refetch:G}=(0,i.aM)(n.k9,{variables:{queue:e},pollInterval:5e3}),{data:W,loading:B,refetch:U,networkStatus:X}=(0,i.aM)(n.Jq,{variables:{queue:e,statusses:L,page:J,limit:Y},pollInterval:5e3}),[K,{loading:ee}]=(0,r.D)(n.Wr,{onError:e=>{S({title:"Failed to delete job",description:e.message,variant:"destructive"})}}),[es,{loading:ea}]=(0,r.D)(n.fc,{onCompleted:()=>{S({title:"Queue paused",description:`The ${e} queue has been paused.`}),G(),z(!1)},onError:e=>{S({title:"Failed to pause queue",description:e.message,variant:"destructive"})}}),[et,{loading:el}]=(0,r.D)(n.iC,{onCompleted:()=>{S({title:"Queue resumed",description:`The ${e} queue has been resumed.`}),G(),D(!1)},onError:e=>{S({title:"Failed to resume queue",description:e.message,variant:"destructive"})}}),[ei,{loading:er}]=(0,r.D)(n.QW,{onCompleted:()=>{S({title:"Queue drained",description:"All waiting and delayed jobs have been removed from the queue."}),G(),U(),Z(!1)},onError:e=>{S({title:"Failed to drain queue",description:e.message,variant:"destructive"})}}),en=e=>{A([e])},ed=e=>{O(e)},ec=e=>{let s=new Set(_);s.has(e)?s.delete(e):s.add(e),V(s)},eo=async()=>{if($.filter(e=>!e.id).length>0){S({title:"Failed to delete jobs",description:"Some jobs have no ID.",variant:"destructive"});return}try{await Promise.all($.map(s=>K({variables:{queue:e,id:s.id}}))),S({title:1===$.length?"Job deleted":"Jobs deleted",description:`Successfully deleted ${$.length} job${1===$.length?"":"s"}.`}),U(),G(),A([]),V(new Set)}catch(e){}},ex=E?.queue,em=W?.jobs||{items:[],pageInfo:{pageCount:0,itemCount:0,currentPage:1,hasPreviousPage:!1,hasNextPage:!1}},eu=e=>t.jsx(h.C,{variant:"outline",className:{active:"bg-blue-100 text-blue-800 border-blue-200",waiting:"bg-yellow-100 text-yellow-800 border-yellow-200",completed:"bg-green-100 text-green-800 border-green-200",failed:"bg-red-100 text-red-800 border-red-200",delayed:"bg-orange-100 text-orange-800 border-orange-200",paused:"bg-gray-100 text-gray-800 border-gray-200"}[e]||"bg-gray-100 text-gray-800",children:e});return H&&B?t.jsx("div",{className:"space-y-4",children:t.jsx(c.Zb,{children:t.jsx(c.aY,{className:"pt-6",children:t.jsx("div",{className:"flex items-center justify-center py-8",children:t.jsx(j.Z,{className:"h-6 w-6 animate-spin"})})})})}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(c.Zb,{children:[t.jsx(c.Ol,{children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[t.jsx("div",{className:"flex items-center gap-3",children:(0,t.jsxs)("div",{children:[(0,t.jsxs)(c.ll,{children:["Queue: ",e]}),(0,t.jsxs)(c.SZ,{children:["Manage the ",e," job queue and view all jobs."]})]})}),ex&&(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)(d.z,{variant:"outline",size:"sm",onClick:()=>ex?.isPaused?D(!0):z(!0),disabled:ea||el,children:[ex?.isPaused?t.jsx(p.Z,{className:"mr-2 h-4 w-4"}):t.jsx(g.Z,{className:"mr-2 h-4 w-4"}),ex?.isPaused?"Resume queue":"Pause queue"]}),(0,t.jsxs)(d.z,{variant:"outline",size:"sm",onClick:()=>Z(!0),disabled:er,children:[t.jsx(f.Z,{className:"mr-2 h-4 w-4"}),"Drain queue"]})]})]})}),(0,t.jsxs)(c.aY,{className:"space-y-6",children:[ex&&(0,t.jsxs)("div",{className:"flex items-center gap-8 p-4 bg-muted/50 rounded-lg",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[t.jsx("div",{className:"text-sm text-muted-foreground",children:"Status:"}),t.jsx("div",{children:ex.isPaused?t.jsx(h.C,{variant:"outline",className:"bg-gray-100 text-gray-800",children:"Paused"}):ex.isMaxed?t.jsx(h.C,{variant:"outline",className:"bg-red-100 text-red-800",children:"Maxed"}):t.jsx(h.C,{variant:"outline",className:"bg-green-100 text-green-800",children:"Active"})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[t.jsx("div",{className:"text-sm text-muted-foreground",children:"Concurrency:"}),t.jsx("div",{className:"font-semibold",children:ex.concurrency})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[t.jsx("div",{className:"text-sm text-muted-foreground",children:"Rate Limit:"}),t.jsx("div",{className:"font-semibold",children:ex.ratelimit||"None"})]}),t.jsx(m.mQ,{value:L,onValueChange:e=>Q(e),className:"w-auto",children:(0,t.jsxs)(m.dr,{children:[(0,t.jsxs)(m.SP,{value:"active",className:"gap-1.5",children:[t.jsx("span",{children:"Active"}),t.jsx(h.C,{variant:"secondary",className:"ml-1 bg-blue-100 text-blue-600 border-blue-200",children:ex.jobs?.active||0})]}),(0,t.jsxs)(m.SP,{value:"waiting",className:"gap-1.5",children:[t.jsx("span",{children:"Waiting"}),t.jsx(h.C,{variant:"secondary",className:"ml-1 bg-yellow-100 text-yellow-600 border-yellow-200",children:ex.jobs?.waiting||0})]}),(0,t.jsxs)(m.SP,{value:"failed",className:"gap-1.5",children:[t.jsx("span",{children:"Failed"}),t.jsx(h.C,{variant:"secondary",className:"ml-1 bg-red-100 text-red-600 border-red-200",children:ex.jobs?.failed||0})]}),(0,t.jsxs)(m.SP,{value:"completed",className:"gap-1.5",children:[t.jsx("span",{children:"Completed"}),t.jsx(h.C,{variant:"secondary",className:"ml-1 bg-green-100 text-green-600 border-green-200",children:ex.jobs?.completed||0})]})]})})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"mb-3 flex items-center justify-between gap-2",children:[(0,t.jsxs)("div",{children:[t.jsx("h3",{className:"text-sm font-semibold",children:"Queue Jobs"}),(0,t.jsxs)("p",{className:"text-xs text-muted-foreground",children:["All jobs currently in the ",e," queue"]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[_.size>0&&(0,t.jsxs)(d.z,{variant:"destructive",size:"sm",onClick:()=>{A(em.items.filter(e=>_.has(e.id)))},disabled:ee,children:[t.jsx(b.Z,{className:"mr-2 h-4 w-4"}),"Delete ",_.size," job",1===_.size?"":"s"]}),(0,t.jsxs)(h.C,{variant:"outline",children:["Auto Refresh: ",t.jsx(j.Z,{className:"h-4 w-4 animate-spin text-muted-foreground ml-1"})]})]})]}),(0,t.jsxs)("div",{className:"border rounded-lg",children:[B?t.jsx("div",{className:"flex items-center justify-center py-8",children:t.jsx(j.Z,{className:"h-6 w-6 animate-spin"})}):em.items?.length===0?t.jsx("div",{className:"text-center pt-8 text-muted-foreground",children:"No jobs in queue"}):(0,t.jsxs)(x.iA,{children:[t.jsx(x.xD,{children:(0,t.jsxs)(x.SC,{children:[t.jsx(x.ss,{className:"w-12",children:t.jsx(o.X,{checked:em.items.filter(e=>"active"!==e.state).length>0&&_.size===em.items.filter(e=>"active"!==e.state).length,onCheckedChange:()=>{let e=em.items.filter(e=>"active"!==e.state);_.size===e.length&&e.length>0?V(new Set):V(new Set(e.map(e=>e.id)))},"aria-label":"Select all jobs"})}),t.jsx(x.ss,{children:"Name"}),t.jsx(x.ss,{children:"State"}),t.jsx(x.ss,{children:"Timestamp"}),t.jsx(x.ss,{children:"Inputs"}),t.jsx(x.ss,{children:"Outputs"}),t.jsx(x.ss,{className:"text-right",children:"Actions"})]})}),t.jsx(x.RM,{children:em.items?.map((e,a)=>t.jsxs(x.SC,{children:[t.jsx(x.pj,{children:t.jsx(o.X,{checked:_.has(e.id),onCheckedChange:()=>ec(e.id),disabled:"active"===e.state,"aria-label":`Select job ${s(e)}`})}),t.jsx(x.pj,{className:"font-medium max-w-[200px] truncate",children:s(e)}),t.jsx(x.pj,{children:eu(e.state)}),t.jsx(x.pj,{children:e.timestamp?C.WU(new Date(e.timestamp),"MMM d, yyyy HH:mm:ss"):"N/A"}),t.jsx(x.pj,{children:e.data?t.jsx("div",{className:"text-xs max-w-[200px] truncate",children:t.jsx(k.J,{text:JSON.stringify(e.data)})}):null}),t.jsx(x.pj,{children:e.failedReason?t.jsx("div",{className:"text-xs text-red-600 max-w-[200px] truncate",children:t.jsx(k.J,{text:"Error: "+e.failedReason})}):t.jsx("div",{className:"text-xs text-muted-foreground max-w-[200px] truncate",children:t.jsx(k.J,{text:JSON.stringify(e.returnvalue)})})}),t.jsxs(x.pj,{className:"text-right",children:["active"!==e.state&&t.jsx(d.z,{variant:"ghost",size:"sm",onClick:()=>en(e),disabled:ee,children:t.jsx(b.Z,{className:"h-4 w-4 text-red-600"})}),"failed"===e.state&&t.jsxs(d.z,{variant:"ghost",size:"sm",onClick:()=>ed(e),children:[t.jsx(N.Z,{className:"h-4 w-4 text-blue-600"}),"Retry"]})]})]},a))})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between px-2 pb-2",children:[(0,t.jsxs)("div",{className:"flex-1 text-sm text-muted-foreground",children:["(",em?.pageInfo?.itemCount||0," total"," ","items)."]}),t.jsx("div",{className:"flex items-center space-x-6 lg:space-x-8",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsxs)(d.z,{variant:"outline",className:"hidden size-8 p-0 lg:flex",onClick:()=>{M(1),U()},disabled:!em?.pageInfo?.hasPreviousPage,children:[t.jsx("span",{className:"sr-only",children:"Go to first page"}),t.jsx(R.kRt,{className:"size-4"})]}),(0,t.jsxs)(d.z,{variant:"outline",className:"size-8 p-0",onClick:()=>{console.log("itemsData.data?.pageInfo.hasPreviousPage",em?.pageInfo?.hasPreviousPage),M(em?.pageInfo?.hasPreviousPage?em?.pageInfo?.currentPage-1:1),U()},disabled:!em?.pageInfo?.hasPreviousPage,children:[t.jsx("span",{className:"sr-only",children:"Go to previous page"}),t.jsx(v.Z,{className:"size-4"})]}),(0,t.jsxs)(d.z,{variant:"outline",className:"size-8 p-0",onClick:()=>{M(em?.pageInfo?.hasNextPage?em?.pageInfo?.currentPage+1:1),U()},disabled:!em?.pageInfo.hasNextPage,children:[t.jsx("span",{className:"sr-only",children:"Go to next page"}),t.jsx(y.Z,{className:"size-4"})]})]})})]})]})]})]})]}),t.jsx(u.aR,{open:$.length>0,onOpenChange:e=>!e&&A([]),children:(0,t.jsxs)(u._T,{children:[(0,t.jsxs)(u.fY,{children:[t.jsx(u.f$,{children:1===$.length?"Delete Job?":`Delete ${$.length} Jobs?`}),t.jsx(u.yT,{children:1===$.length?`Are you sure you want to delete the job "${$[0]?.name}"? This action cannot be undone.`:`Are you sure you want to delete ${$.length} jobs? This action cannot be undone.`})]}),(0,t.jsxs)(u.xo,{children:[t.jsx(u.le,{children:"Cancel"}),(0,t.jsxs)(u.OL,{onClick:eo,disabled:ee,children:[ee&&t.jsx(j.Z,{className:"mr-2 h-4 w-4 animate-spin"}),"Delete"]})]})]})}),t.jsx(u.aR,{open:!!I,onOpenChange:e=>!e&&O(null),children:(0,t.jsxs)(u._T,{children:[(0,t.jsxs)(u.fY,{children:[t.jsx(u.f$,{children:"Retry Job?"}),(0,t.jsxs)(u.yT,{children:['Are you sure you want to retry the job "',I?.name,'"? This will schedule a new job with the same data.']})]}),(0,t.jsxs)(u.xo,{children:[t.jsx(u.le,{children:"Cancel"}),t.jsx(u.OL,{onClick:()=>{I&&a(I)},disabled:ee,children:"Retry"})]})]})}),t.jsx(u.aR,{open:P,onOpenChange:z,children:(0,t.jsxs)(u._T,{children:[(0,t.jsxs)(u.fY,{children:[t.jsx(u.f$,{children:"Pause Queue?"}),(0,t.jsxs)(u.yT,{children:["Are you sure you want to pause the ",e," queue? No jobs will be processed until the queue is resumed."]})]}),(0,t.jsxs)(u.xo,{children:[t.jsx(u.le,{children:"Cancel"}),(0,t.jsxs)(u.OL,{onClick:()=>{es({variables:{queue:e}})},disabled:ea,children:[ea&&t.jsx(j.Z,{className:"mr-2 h-4 w-4 animate-spin"}),"Pause Queue"]})]})]})}),t.jsx(u.aR,{open:q,onOpenChange:D,children:(0,t.jsxs)(u._T,{children:[(0,t.jsxs)(u.fY,{children:[t.jsx(u.f$,{children:"Resume Queue?"}),(0,t.jsxs)(u.yT,{children:["Are you sure you want to resume the ",e," queue?."]})]}),(0,t.jsxs)(u.xo,{children:[t.jsx(u.le,{children:"Cancel"}),(0,t.jsxs)(u.OL,{onClick:()=>{et({variables:{queue:e}})},disabled:el,children:[el&&t.jsx(j.Z,{className:"mr-2 h-4 w-4 animate-spin"}),"Resume Queue"]})]})]})}),t.jsx(u.aR,{open:T,onOpenChange:Z,children:(0,t.jsxs)(u._T,{children:[(0,t.jsxs)(u.fY,{children:[t.jsx(u.f$,{children:"Drain Queue?"}),(0,t.jsxs)(u.yT,{children:["Are you sure you want to drain the ",e," queue? This will remove all jobs that are waiting or delayed, but not active, waiting-children, completed or failed. This action cannot be undone."]})]}),(0,t.jsxs)(u.xo,{children:[t.jsx(u.le,{children:"Cancel"}),(0,t.jsxs)(u.OL,{onClick:()=>{ei({variables:{queue:e}})},disabled:er,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:[er&&t.jsx(j.Z,{className:"mr-2 h-4 w-4 animate-spin"}),"Drain Queue"]})]})]})})]})}},57004:(e,s,a)=>{a.a(e,async(e,t)=>{try{a.d(s,{G:()=>g});var l=a(10326),i=a(48644),r=a(93801),n=a(45747),d=a(17577),c=a(94966),o=a(12533),x=a(12428),m=a(47355),u=a(62288),h=a(34789),j=a(77863),p=e([i,r,n]);function g({className:e=null,code:s,language:a,slice:t=200}){let{toast:i}=(0,h.pm)(),[r,n]=(0,d.useState)(null);return(0,l.jsxs)(u.Vq,{children:[l.jsx(u.hg,{asChild:!0,children:r?.length&&l.jsx(c.Z,{className:(0,j.cn)("cursor-pointer",e),showLineNumbers:!0,wrapLines:!0,lineProps:{style:{wordBreak:"break-all",whiteSpace:"pre-wrap"}},language:a||"plaintext",style:m.Z,children:`${r?.slice(0,t||200)} ${r?.length>(t||200)?"...":""}`})}),l.jsx(u.cZ,{className:"sm:max-w-[800px] overflow-hidden max-h-[500px] overflow-y-scroll",children:(0,l.jsxs)(u.fK,{children:[l.jsx(u.$N,{children:"Code"}),l.jsx("div",{className:"cursor-copy",onClick:async()=>{await navigator.clipboard.writeText(r??""),i({title:"Copied to clipboard"})},children:l.jsx(c.Z,{className:(0,j.cn)(e),showLineNumbers:!0,wrapLines:!0,lineProps:{style:{wordBreak:"break-all",whiteSpace:"pre-wrap"}},language:a||"plaintext",style:m.Z,children:r??""})})]})})]})}[i,r,n]=p.then?(await p)():p,c.Z.registerLanguage("json",x.Z),c.Z.registerLanguage("javascript",o.Z),t()}catch(e){t(e)}})},99440:(e,s,a)=>{a.d(s,{OL:()=>p,_T:()=>x,aR:()=>d,f$:()=>h,fY:()=>m,le:()=>g,xo:()=>u,yT:()=>j});var t=a(10326),l=a(12194),i=a(17577),r=a(90772),n=a(77863);let d=l.fC;l.xz;let c=l.h_,o=i.forwardRef(({className:e,...s},a)=>t.jsx(l.aV,{className:(0,n.cn)("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...s,ref:a}));o.displayName=l.aV.displayName;let x=i.forwardRef(({className:e,...s},a)=>(0,t.jsxs)(c,{children:[t.jsx(o,{}),t.jsx(l.VY,{ref:a,className:(0,n.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...s})]}));x.displayName=l.VY.displayName;let m=({className:e,...s})=>t.jsx("div",{className:(0,n.cn)("flex flex-col space-y-2 text-center sm:text-left",e),...s});m.displayName="AlertDialogHeader";let u=({className:e,...s})=>t.jsx("div",{className:(0,n.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...s});u.displayName="AlertDialogFooter";let h=i.forwardRef(({className:e,...s},a)=>t.jsx(l.Dx,{ref:a,className:(0,n.cn)("text-lg font-semibold",e),...s}));h.displayName=l.Dx.displayName;let j=i.forwardRef(({className:e,...s},a)=>t.jsx(l.dk,{ref:a,className:(0,n.cn)("text-sm text-muted-foreground",e),...s}));j.displayName=l.dk.displayName;let p=i.forwardRef(({className:e,...s},a)=>t.jsx(l.aU,{ref:a,className:(0,n.cn)((0,r.d)(),e),...s}));p.displayName=l.aU.displayName;let g=i.forwardRef(({className:e,...s},a)=>t.jsx(l.$j,{ref:a,className:(0,n.cn)((0,r.d)({variant:"outline"}),"mt-2 sm:mt-0",e),...s}));g.displayName=l.$j.displayName},53313:(e,s,a)=>{a.d(s,{X:()=>d});var t=a(10326),l=a(13635),i=a(32933),r=a(17577),n=a(77863);let d=r.forwardRef(({className:e,...s},a)=>t.jsx(l.fC,{ref:a,className:(0,n.cn)("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...s,children:t.jsx(l.z$,{className:(0,n.cn)("flex items-center justify-center text-current"),children:t.jsx(i.Z,{className:"size-4"})})}));d.displayName=l.fC.displayName},15940:(e,s,a)=>{a.d(s,{RM:()=>d,Rn:()=>m,SC:()=>c,iA:()=>r,pj:()=>x,ss:()=>o,xD:()=>n});var t=a(10326),l=a(17577),i=a(77863);let r=l.forwardRef(({className:e,...s},a)=>t.jsx("div",{className:"relative w-full overflow-auto",children:t.jsx("table",{ref:a,className:(0,i.cn)("w-full caption-bottom text-sm",e),...s})}));r.displayName="Table";let n=l.forwardRef(({className:e,...s},a)=>t.jsx("thead",{ref:a,className:(0,i.cn)("[&_tr]:border-b",e),...s}));n.displayName="TableHeader";let d=l.forwardRef(({className:e,...s},a)=>t.jsx("tbody",{ref:a,className:(0,i.cn)("[&_tr:last-child]:border-0",e),...s}));d.displayName="TableBody",l.forwardRef(({className:e,...s},a)=>t.jsx("tfoot",{ref:a,className:(0,i.cn)("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...s})).displayName="TableFooter";let c=l.forwardRef(({className:e,...s},a)=>t.jsx("tr",{ref:a,className:(0,i.cn)("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...s}));c.displayName="TableRow";let o=l.forwardRef(({className:e,...s},a)=>t.jsx("th",{ref:a,className:(0,i.cn)("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&:has([role=checkbox])]:w-[40px]",e),...s}));o.displayName="TableHead";let x=l.forwardRef(({className:e,...s},a)=>t.jsx("td",{ref:a,className:(0,i.cn)("p-4 align-middle [&:has([role=checkbox])]:pr-0 [&:has([role=checkbox])]:w-[40px]",e),...s}));x.displayName="TableCell";let m=l.forwardRef(({className:e,...s},a)=>t.jsx("caption",{ref:a,className:(0,i.cn)("mt-4 text-sm text-muted-foreground",e),...s}));m.displayName="TableCaption"}};
|
|
1
|
+
"use strict";exports.id=5485,exports.ids=[5485],exports.modules={19753:(e,s,a)=>{a.d(s,{R:()=>P});var t=a(10326),l=a(17577),i=a(39167),r=a(18753),n=a(42270),d=a(90772),c=a(33071),o=a(53313),x=a(15940),m=a(79210),u=a(99440),h=a(567),j=a(75290),p=a(94893),g=a(71059),f=a(56762),b=a(98091),N=a(91468),v=a(11890),y=a(39183),w=a(34789),C=a(98181),k=a(18615),R=a(76812);function P({queueName:e,nameGenerator:s,retryJob:a}){let{toast:P}=(0,w.pm)(),[S,z]=(0,l.useState)(!1),[T,Z]=(0,l.useState)(!1),[q,D]=(0,l.useState)(!1),[$,A]=(0,l.useState)([]),[I,O]=(0,l.useState)(null),[L,Q]=(0,l.useState)("completed"),[J,M]=(0,l.useState)(1),[Y,F]=(0,l.useState)(20),[_,V]=(0,l.useState)(new Set),{data:E,loading:H,refetch:G}=(0,i.aM)(n.k9,{variables:{queue:e},pollInterval:5e3}),{data:W,loading:B,refetch:U,networkStatus:X}=(0,i.aM)(n.Jq,{variables:{queue:e,statusses:L,page:J,limit:Y},pollInterval:5e3}),[K,{loading:ee}]=(0,r.D)(n.Wr,{onError:e=>{P({title:"Failed to delete job",description:e.message,variant:"destructive"})}}),[es,{loading:ea}]=(0,r.D)(n.fc,{onCompleted:()=>{P({title:"Queue paused",description:`The ${e} queue has been paused.`}),G(),z(!1)},onError:e=>{P({title:"Failed to pause queue",description:e.message,variant:"destructive"})}}),[et,{loading:el}]=(0,r.D)(n.iC,{onCompleted:()=>{P({title:"Queue resumed",description:`The ${e} queue has been resumed.`}),G(),D(!1)},onError:e=>{P({title:"Failed to resume queue",description:e.message,variant:"destructive"})}}),[ei,{loading:er}]=(0,r.D)(n.QW,{onCompleted:()=>{P({title:"Queue drained",description:"All waiting and delayed jobs have been removed from the queue."}),G(),U(),Z(!1)},onError:e=>{P({title:"Failed to drain queue",description:e.message,variant:"destructive"})}}),en=e=>{A([e])},ed=e=>{O(e)},ec=e=>{let s=new Set(_);s.has(e)?s.delete(e):s.add(e),V(s)},eo=async()=>{if($.filter(e=>!e.id).length>0){P({title:"Failed to delete jobs",description:"Some jobs have no ID.",variant:"destructive"});return}try{await Promise.all($.map(s=>K({variables:{queue:e,id:s.id}}))),P({title:1===$.length?"Job deleted":"Jobs deleted",description:`Successfully deleted ${$.length} job${1===$.length?"":"s"}.`}),U(),G(),A([]),V(new Set)}catch(e){}},ex=E?.queue,em=W?.jobs||{items:[],pageInfo:{pageCount:0,itemCount:0,currentPage:1,hasPreviousPage:!1,hasNextPage:!1}},eu=e=>t.jsx(h.C,{variant:"outline",className:{active:"bg-blue-100 text-blue-800 border-blue-200",waiting:"bg-yellow-100 text-yellow-800 border-yellow-200",completed:"bg-green-100 text-green-800 border-green-200",failed:"bg-red-100 text-red-800 border-red-200",delayed:"bg-orange-100 text-orange-800 border-orange-200",paused:"bg-gray-100 text-gray-800 border-gray-200"}[e]||"bg-gray-100 text-gray-800",children:e});return H&&B?t.jsx("div",{className:"space-y-4",children:t.jsx(c.Zb,{children:t.jsx(c.aY,{className:"pt-6",children:t.jsx("div",{className:"flex items-center justify-center py-8",children:t.jsx(j.Z,{className:"h-6 w-6 animate-spin"})})})})}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(c.Zb,{children:[t.jsx(c.Ol,{children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[t.jsx("div",{className:"flex items-center gap-3",children:(0,t.jsxs)("div",{children:[(0,t.jsxs)(c.ll,{children:["Queue: ",e]}),(0,t.jsxs)(c.SZ,{children:["Manage the ",e," job queue and view all jobs."]})]})}),ex&&(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)(d.z,{variant:"outline",size:"sm",onClick:()=>ex?.isPaused?D(!0):z(!0),disabled:ea||el,children:[ex?.isPaused?t.jsx(p.Z,{className:"mr-2 h-4 w-4"}):t.jsx(g.Z,{className:"mr-2 h-4 w-4"}),ex?.isPaused?"Resume queue":"Pause queue"]}),(0,t.jsxs)(d.z,{variant:"outline",size:"sm",onClick:()=>Z(!0),disabled:er,children:[t.jsx(f.Z,{className:"mr-2 h-4 w-4"}),"Drain queue"]})]})]})}),(0,t.jsxs)(c.aY,{className:"space-y-6",children:[ex&&(0,t.jsxs)("div",{className:"flex items-center gap-8 p-4 bg-muted/50 rounded-lg",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[t.jsx("div",{className:"text-sm text-muted-foreground",children:"Status:"}),t.jsx("div",{children:ex.isPaused?t.jsx(h.C,{variant:"outline",className:"bg-gray-100 text-gray-800",children:"Paused"}):ex.isMaxed?t.jsx(h.C,{variant:"outline",className:"bg-red-100 text-red-800",children:"Maxed"}):t.jsx(h.C,{variant:"outline",className:"bg-green-100 text-green-800",children:"Active"})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[t.jsx("div",{className:"text-sm text-muted-foreground",children:"Concurrency:"}),(0,t.jsxs)("div",{className:"font-semibold",children:["Per queue global concurrency: ",ex.concurrency?.queue||"None","Per worker concurrency: ",ex.concurrency?.worker||"None","."]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[t.jsx("div",{className:"text-sm text-muted-foreground",children:"Rate Limit:"}),t.jsx("div",{className:"font-semibold",children:ex.ratelimit||"None"})]}),t.jsx(m.mQ,{value:L,onValueChange:e=>Q(e),className:"w-auto",children:(0,t.jsxs)(m.dr,{children:[(0,t.jsxs)(m.SP,{value:"active",className:"gap-1.5",children:[t.jsx("span",{children:"Active"}),t.jsx(h.C,{variant:"secondary",className:"ml-1 bg-blue-100 text-blue-600 border-blue-200",children:ex.jobs?.active||0})]}),(0,t.jsxs)(m.SP,{value:"waiting",className:"gap-1.5",children:[t.jsx("span",{children:"Waiting"}),t.jsx(h.C,{variant:"secondary",className:"ml-1 bg-yellow-100 text-yellow-600 border-yellow-200",children:ex.jobs?.waiting||0})]}),(0,t.jsxs)(m.SP,{value:"failed",className:"gap-1.5",children:[t.jsx("span",{children:"Failed"}),t.jsx(h.C,{variant:"secondary",className:"ml-1 bg-red-100 text-red-600 border-red-200",children:ex.jobs?.failed||0})]}),(0,t.jsxs)(m.SP,{value:"completed",className:"gap-1.5",children:[t.jsx("span",{children:"Completed"}),t.jsx(h.C,{variant:"secondary",className:"ml-1 bg-green-100 text-green-600 border-green-200",children:ex.jobs?.completed||0})]})]})})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"mb-3 flex items-center justify-between gap-2",children:[(0,t.jsxs)("div",{children:[t.jsx("h3",{className:"text-sm font-semibold",children:"Queue Jobs"}),(0,t.jsxs)("p",{className:"text-xs text-muted-foreground",children:["All jobs currently in the ",e," queue"]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[_.size>0&&(0,t.jsxs)(d.z,{variant:"destructive",size:"sm",onClick:()=>{A(em.items.filter(e=>_.has(e.id)))},disabled:ee,children:[t.jsx(b.Z,{className:"mr-2 h-4 w-4"}),"Delete ",_.size," job",1===_.size?"":"s"]}),(0,t.jsxs)(h.C,{variant:"outline",children:["Auto Refresh: ",t.jsx(j.Z,{className:"h-4 w-4 animate-spin text-muted-foreground ml-1"})]})]})]}),(0,t.jsxs)("div",{className:"border rounded-lg",children:[B?t.jsx("div",{className:"flex items-center justify-center py-8",children:t.jsx(j.Z,{className:"h-6 w-6 animate-spin"})}):em.items?.length===0?t.jsx("div",{className:"text-center pt-8 text-muted-foreground",children:"No jobs in queue"}):(0,t.jsxs)(x.iA,{children:[t.jsx(x.xD,{children:(0,t.jsxs)(x.SC,{children:[t.jsx(x.ss,{className:"w-12",children:t.jsx(o.X,{checked:em.items.filter(e=>"active"!==e.state).length>0&&_.size===em.items.filter(e=>"active"!==e.state).length,onCheckedChange:()=>{let e=em.items.filter(e=>"active"!==e.state);_.size===e.length&&e.length>0?V(new Set):V(new Set(e.map(e=>e.id)))},"aria-label":"Select all jobs"})}),t.jsx(x.ss,{children:"Name"}),t.jsx(x.ss,{children:"ID"}),t.jsx(x.ss,{children:"State"}),t.jsx(x.ss,{children:"Timestamp"}),t.jsx(x.ss,{children:"Inputs"}),t.jsx(x.ss,{children:"Outputs"}),t.jsx(x.ss,{className:"text-right",children:"Actions"})]})}),t.jsx(x.RM,{children:em.items?.map((e,a)=>t.jsxs(x.SC,{children:[t.jsx(x.pj,{children:t.jsx(o.X,{checked:_.has(e.id),onCheckedChange:()=>ec(e.id),disabled:"active"===e.state,"aria-label":`Select job ${s(e)}`})}),t.jsx(x.pj,{className:"font-medium max-w-[200px] truncate",children:s(e)}),t.jsx(x.pj,{children:e.id}),t.jsx(x.pj,{children:eu(e.state)}),t.jsx(x.pj,{children:e.timestamp?C.WU(new Date(e.timestamp),"MMM d, yyyy HH:mm:ss"):"N/A"}),t.jsx(x.pj,{children:e.data?t.jsx("div",{className:"text-xs max-w-[200px] truncate",children:t.jsx(k.J,{text:JSON.stringify(e.data)})}):null}),t.jsx(x.pj,{children:e.failedReason?t.jsx("div",{className:"text-xs text-red-600 max-w-[200px] truncate",children:t.jsx(k.J,{text:"Error: "+e.failedReason})}):t.jsx("div",{className:"text-xs text-muted-foreground max-w-[200px] truncate",children:t.jsx(k.J,{text:JSON.stringify(e.returnvalue)})})}),t.jsxs(x.pj,{className:"text-right",children:["active"!==e.state&&t.jsx(d.z,{variant:"ghost",size:"sm",onClick:()=>en(e),disabled:ee,children:t.jsx(b.Z,{className:"h-4 w-4 text-red-600"})}),"failed"===e.state&&t.jsxs(d.z,{variant:"ghost",size:"sm",onClick:()=>ed(e),children:[t.jsx(N.Z,{className:"h-4 w-4 text-blue-600"}),"Retry"]})]})]},a))})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between px-2 pb-2",children:[(0,t.jsxs)("div",{className:"flex-1 text-sm text-muted-foreground",children:["(",em?.pageInfo?.itemCount||0," total"," ","items)."]}),t.jsx("div",{className:"flex items-center space-x-6 lg:space-x-8",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsxs)(d.z,{variant:"outline",className:"hidden size-8 p-0 lg:flex",onClick:()=>{M(1),U()},disabled:!em?.pageInfo?.hasPreviousPage,children:[t.jsx("span",{className:"sr-only",children:"Go to first page"}),t.jsx(R.kRt,{className:"size-4"})]}),(0,t.jsxs)(d.z,{variant:"outline",className:"size-8 p-0",onClick:()=>{console.log("itemsData.data?.pageInfo.hasPreviousPage",em?.pageInfo?.hasPreviousPage),M(em?.pageInfo?.hasPreviousPage?em?.pageInfo?.currentPage-1:1),U()},disabled:!em?.pageInfo?.hasPreviousPage,children:[t.jsx("span",{className:"sr-only",children:"Go to previous page"}),t.jsx(v.Z,{className:"size-4"})]}),(0,t.jsxs)(d.z,{variant:"outline",className:"size-8 p-0",onClick:()=>{M(em?.pageInfo?.hasNextPage?em?.pageInfo?.currentPage+1:1),U()},disabled:!em?.pageInfo.hasNextPage,children:[t.jsx("span",{className:"sr-only",children:"Go to next page"}),t.jsx(y.Z,{className:"size-4"})]})]})})]})]})]})]})]}),t.jsx(u.aR,{open:$.length>0,onOpenChange:e=>!e&&A([]),children:(0,t.jsxs)(u._T,{children:[(0,t.jsxs)(u.fY,{children:[t.jsx(u.f$,{children:1===$.length?"Delete Job?":`Delete ${$.length} Jobs?`}),t.jsx(u.yT,{children:1===$.length?`Are you sure you want to delete the job "${$[0]?.name}"? This action cannot be undone.`:`Are you sure you want to delete ${$.length} jobs? This action cannot be undone.`})]}),(0,t.jsxs)(u.xo,{children:[t.jsx(u.le,{children:"Cancel"}),(0,t.jsxs)(u.OL,{onClick:eo,disabled:ee,children:[ee&&t.jsx(j.Z,{className:"mr-2 h-4 w-4 animate-spin"}),"Delete"]})]})]})}),t.jsx(u.aR,{open:!!I,onOpenChange:e=>!e&&O(null),children:(0,t.jsxs)(u._T,{children:[(0,t.jsxs)(u.fY,{children:[t.jsx(u.f$,{children:"Retry Job?"}),(0,t.jsxs)(u.yT,{children:['Are you sure you want to retry the job "',I?.name,'"? This will schedule a new job with the same data.']})]}),(0,t.jsxs)(u.xo,{children:[t.jsx(u.le,{children:"Cancel"}),t.jsx(u.OL,{onClick:()=>{I&&a(I)},disabled:ee,children:"Retry"})]})]})}),t.jsx(u.aR,{open:S,onOpenChange:z,children:(0,t.jsxs)(u._T,{children:[(0,t.jsxs)(u.fY,{children:[t.jsx(u.f$,{children:"Pause Queue?"}),(0,t.jsxs)(u.yT,{children:["Are you sure you want to pause the ",e," queue? No jobs will be processed until the queue is resumed."]})]}),(0,t.jsxs)(u.xo,{children:[t.jsx(u.le,{children:"Cancel"}),(0,t.jsxs)(u.OL,{onClick:()=>{es({variables:{queue:e}})},disabled:ea,children:[ea&&t.jsx(j.Z,{className:"mr-2 h-4 w-4 animate-spin"}),"Pause Queue"]})]})]})}),t.jsx(u.aR,{open:q,onOpenChange:D,children:(0,t.jsxs)(u._T,{children:[(0,t.jsxs)(u.fY,{children:[t.jsx(u.f$,{children:"Resume Queue?"}),(0,t.jsxs)(u.yT,{children:["Are you sure you want to resume the ",e," queue?."]})]}),(0,t.jsxs)(u.xo,{children:[t.jsx(u.le,{children:"Cancel"}),(0,t.jsxs)(u.OL,{onClick:()=>{et({variables:{queue:e}})},disabled:el,children:[el&&t.jsx(j.Z,{className:"mr-2 h-4 w-4 animate-spin"}),"Resume Queue"]})]})]})}),t.jsx(u.aR,{open:T,onOpenChange:Z,children:(0,t.jsxs)(u._T,{children:[(0,t.jsxs)(u.fY,{children:[t.jsx(u.f$,{children:"Drain Queue?"}),(0,t.jsxs)(u.yT,{children:["Are you sure you want to drain the ",e," queue? This will remove all jobs that are waiting or delayed, but not active, waiting-children, completed or failed. This action cannot be undone."]})]}),(0,t.jsxs)(u.xo,{children:[t.jsx(u.le,{children:"Cancel"}),(0,t.jsxs)(u.OL,{onClick:()=>{ei({variables:{queue:e}})},disabled:er,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:[er&&t.jsx(j.Z,{className:"mr-2 h-4 w-4 animate-spin"}),"Drain Queue"]})]})]})})]})}},57004:(e,s,a)=>{a.a(e,async(e,t)=>{try{a.d(s,{G:()=>g});var l=a(10326),i=a(48644),r=a(93801),n=a(45747),d=a(17577),c=a(94966),o=a(12533),x=a(12428),m=a(47355),u=a(62288),h=a(34789),j=a(77863),p=e([i,r,n]);function g({className:e=null,code:s,language:a,slice:t=200}){let{toast:i}=(0,h.pm)(),[r,n]=(0,d.useState)(null);return(0,l.jsxs)(u.Vq,{children:[l.jsx(u.hg,{asChild:!0,children:r?.length&&l.jsx(c.Z,{className:(0,j.cn)("cursor-pointer",e),showLineNumbers:!0,wrapLines:!0,lineProps:{style:{wordBreak:"break-all",whiteSpace:"pre-wrap"}},language:a||"plaintext",style:m.Z,children:`${r?.slice(0,t||200)} ${r?.length>(t||200)?"...":""}`})}),l.jsx(u.cZ,{className:"sm:max-w-[800px] overflow-hidden max-h-[500px] overflow-y-scroll",children:(0,l.jsxs)(u.fK,{children:[l.jsx(u.$N,{children:"Code"}),l.jsx("div",{className:"cursor-copy",onClick:async()=>{await navigator.clipboard.writeText(r??""),i({title:"Copied to clipboard"})},children:l.jsx(c.Z,{className:(0,j.cn)(e),showLineNumbers:!0,wrapLines:!0,lineProps:{style:{wordBreak:"break-all",whiteSpace:"pre-wrap"}},language:a||"plaintext",style:m.Z,children:r??""})})]})})]})}[i,r,n]=p.then?(await p)():p,c.Z.registerLanguage("json",x.Z),c.Z.registerLanguage("javascript",o.Z),t()}catch(e){t(e)}})},99440:(e,s,a)=>{a.d(s,{OL:()=>p,_T:()=>x,aR:()=>d,f$:()=>h,fY:()=>m,le:()=>g,xo:()=>u,yT:()=>j});var t=a(10326),l=a(12194),i=a(17577),r=a(90772),n=a(77863);let d=l.fC;l.xz;let c=l.h_,o=i.forwardRef(({className:e,...s},a)=>t.jsx(l.aV,{className:(0,n.cn)("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...s,ref:a}));o.displayName=l.aV.displayName;let x=i.forwardRef(({className:e,...s},a)=>(0,t.jsxs)(c,{children:[t.jsx(o,{}),t.jsx(l.VY,{ref:a,className:(0,n.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...s})]}));x.displayName=l.VY.displayName;let m=({className:e,...s})=>t.jsx("div",{className:(0,n.cn)("flex flex-col space-y-2 text-center sm:text-left",e),...s});m.displayName="AlertDialogHeader";let u=({className:e,...s})=>t.jsx("div",{className:(0,n.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...s});u.displayName="AlertDialogFooter";let h=i.forwardRef(({className:e,...s},a)=>t.jsx(l.Dx,{ref:a,className:(0,n.cn)("text-lg font-semibold",e),...s}));h.displayName=l.Dx.displayName;let j=i.forwardRef(({className:e,...s},a)=>t.jsx(l.dk,{ref:a,className:(0,n.cn)("text-sm text-muted-foreground",e),...s}));j.displayName=l.dk.displayName;let p=i.forwardRef(({className:e,...s},a)=>t.jsx(l.aU,{ref:a,className:(0,n.cn)((0,r.d)(),e),...s}));p.displayName=l.aU.displayName;let g=i.forwardRef(({className:e,...s},a)=>t.jsx(l.$j,{ref:a,className:(0,n.cn)((0,r.d)({variant:"outline"}),"mt-2 sm:mt-0",e),...s}));g.displayName=l.$j.displayName},53313:(e,s,a)=>{a.d(s,{X:()=>d});var t=a(10326),l=a(13635),i=a(32933),r=a(17577),n=a(77863);let d=r.forwardRef(({className:e,...s},a)=>t.jsx(l.fC,{ref:a,className:(0,n.cn)("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...s,children:t.jsx(l.z$,{className:(0,n.cn)("flex items-center justify-center text-current"),children:t.jsx(i.Z,{className:"size-4"})})}));d.displayName=l.fC.displayName},15940:(e,s,a)=>{a.d(s,{RM:()=>d,Rn:()=>m,SC:()=>c,iA:()=>r,pj:()=>x,ss:()=>o,xD:()=>n});var t=a(10326),l=a(17577),i=a(77863);let r=l.forwardRef(({className:e,...s},a)=>t.jsx("div",{className:"relative w-full overflow-auto",children:t.jsx("table",{ref:a,className:(0,i.cn)("w-full caption-bottom text-sm",e),...s})}));r.displayName="Table";let n=l.forwardRef(({className:e,...s},a)=>t.jsx("thead",{ref:a,className:(0,i.cn)("[&_tr]:border-b",e),...s}));n.displayName="TableHeader";let d=l.forwardRef(({className:e,...s},a)=>t.jsx("tbody",{ref:a,className:(0,i.cn)("[&_tr:last-child]:border-0",e),...s}));d.displayName="TableBody",l.forwardRef(({className:e,...s},a)=>t.jsx("tfoot",{ref:a,className:(0,i.cn)("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...s})).displayName="TableFooter";let c=l.forwardRef(({className:e,...s},a)=>t.jsx("tr",{ref:a,className:(0,i.cn)("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...s}));c.displayName="TableRow";let o=l.forwardRef(({className:e,...s},a)=>t.jsx("th",{ref:a,className:(0,i.cn)("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&:has([role=checkbox])]:w-[40px]",e),...s}));o.displayName="TableHead";let x=l.forwardRef(({className:e,...s},a)=>t.jsx("td",{ref:a,className:(0,i.cn)("p-4 align-middle [&:has([role=checkbox])]:pr-0 [&:has([role=checkbox])]:w-[40px]",e),...s}));x.displayName="TableCell";let m=l.forwardRef(({className:e,...s},a)=>t.jsx("caption",{ref:a,className:(0,i.cn)("mt-4 text-sm text-muted-foreground",e),...s}));m.displayName="TableCaption"}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.id=5974,exports.ids=[5974],exports.modules={51602:(e,s,t)=>{t.d(s,{d:()=>u,f:()=>h});var l=t(10326),a=t(90772),n=t(77863),r=t(32933),i=t(43810),o=t(17577),d=t(54390),c=t(35057),m=t(48818);let x=(0,o.createContext)({code:""}),u=({code:e,language:s,showLineNumbers:t=!1,className:a,children:r,...i})=>l.jsx(x.Provider,{value:{code:e},children:l.jsx("div",{className:(0,n.cn)("relative w-full overflow-hidden rounded-md border bg-background text-foreground",a),...i,children:(0,l.jsxs)("div",{className:"relative",children:[l.jsx(d.Z,{className:"overflow-hidden dark:hidden",codeTagProps:{className:"font-mono text-sm"},customStyle:{margin:0,padding:"1rem",fontSize:"0.875rem",background:"hsl(var(--background))",color:"hsl(var(--foreground))"},language:s,lineNumberStyle:{color:"hsl(var(--muted-foreground))",paddingRight:"1rem",minWidth:"2.5rem"},showLineNumbers:t,style:c.Z,children:e}),l.jsx(d.Z,{className:"hidden overflow-hidden dark:block",codeTagProps:{className:"font-mono text-sm"},customStyle:{margin:0,padding:"1rem",fontSize:"0.875rem",background:"hsl(var(--background))",color:"hsl(var(--foreground))"},language:s,lineNumberStyle:{color:"hsl(var(--muted-foreground))",paddingRight:"1rem",minWidth:"2.5rem"},showLineNumbers:t,style:m.Z,children:e}),r&&l.jsx("div",{className:"absolute top-2 right-2 flex items-center gap-2",children:r})]})})}),h=({onCopy:e,onError:s,timeout:t=2e3,children:d,className:c,...m})=>{let[u,h]=(0,o.useState)(!1),{code:p}=(0,o.useContext)(x),g=async()=>{s?.(Error("Clipboard API not available"))},f=u?r.Z:i.Z;return l.jsx(a.z,{className:(0,n.cn)("shrink-0",c),onClick:g,size:"icon",variant:"ghost",...m,children:d??l.jsx(f,{size:14})})}},36931:(e,s,t)=>{t.d(s,{H:()=>u});var l=t(10326),a=t(77863),n=t(17577),r=t(16476),i=t(79283),o=t(70285),d=t(7833),c=t(51602);t(32289);let m=(0,t(39499).Z)(r.UG),x={ol:({node:e,children:s,className:t,...n})=>l.jsx("ol",{className:(0,a.cn)("ml-4 list-outside list-decimal",t),...n,children:s}),li:({node:e,children:s,className:t,...n})=>l.jsx("li",{className:(0,a.cn)("py-1",t),...n,children:s}),ul:({node:e,children:s,className:t,...n})=>l.jsx("ul",{className:(0,a.cn)("ml-4 list-outside list-disc",t),...n,children:s}),hr:({node:e,className:s,...t})=>l.jsx("hr",{className:(0,a.cn)("my-6 border-border",s),...t}),strong:({node:e,children:s,className:t,...n})=>l.jsx("span",{className:(0,a.cn)("font-semibold",t),...n,children:s}),a:({node:e,children:s,className:t,...n})=>l.jsx("a",{className:(0,a.cn)("font-medium text-primary underline",t),rel:"noreferrer",target:"_blank",...n,children:s}),h1:({node:e,children:s,className:t,...n})=>l.jsx("h1",{className:(0,a.cn)("mt-6 mb-2 font-semibold text-3xl",t),...n,children:s}),h2:({node:e,children:s,className:t,...n})=>l.jsx("h2",{className:(0,a.cn)("mt-6 mb-2 font-semibold text-2xl",t),...n,children:s}),h3:({node:e,children:s,className:t,...n})=>l.jsx("h3",{className:(0,a.cn)("mt-6 mb-2 font-semibold text-xl",t),...n,children:s}),h4:({node:e,children:s,className:t,...n})=>l.jsx("h4",{className:(0,a.cn)("mt-6 mb-2 font-semibold text-lg",t),...n,children:s}),h5:({node:e,children:s,className:t,...n})=>l.jsx("h5",{className:(0,a.cn)("mt-6 mb-2 font-semibold text-base",t),...n,children:s}),h6:({node:e,children:s,className:t,...n})=>l.jsx("h6",{className:(0,a.cn)("mt-6 mb-2 font-semibold text-sm",t),...n,children:s}),table:({node:e,children:s,className:t,...n})=>l.jsx("div",{className:"my-4 overflow-x-auto",children:l.jsx("table",{className:(0,a.cn)("w-full border-collapse border border-border",t),...n,children:s})}),thead:({node:e,children:s,className:t,...n})=>l.jsx("thead",{className:(0,a.cn)("bg-muted/50",t),...n,children:s}),tbody:({node:e,children:s,className:t,...n})=>l.jsx("tbody",{className:(0,a.cn)("divide-y divide-border",t),...n,children:s}),tr:({node:e,children:s,className:t,...n})=>l.jsx("tr",{className:(0,a.cn)("border-border border-b",t),...n,children:s}),th:({node:e,children:s,className:t,...n})=>l.jsx("th",{className:(0,a.cn)("px-4 py-2 text-left font-semibold text-sm",t),...n,children:s}),td:({node:e,children:s,className:t,...n})=>l.jsx("td",{className:(0,a.cn)("px-4 py-2 text-sm",t),...n,children:s}),blockquote:({node:e,children:s,className:t,...n})=>l.jsx("blockquote",{className:(0,a.cn)("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),...n,children:s}),code:({node:e,className:s,...t})=>e?.position?.start.line!==e?.position?.end.line?l.jsx("code",{className:s,...t}):l.jsx("code",{className:(0,a.cn)("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",s),...t}),pre:({node:e,className:s,children:t})=>{let r="javascript";"string"==typeof e?.properties?.className&&(r=e.properties.className.replace("language-",""));let i="";return(0,n.isValidElement)(t)&&t.props&&"string"==typeof t.props.children?i=t.props.children:"string"==typeof t&&(i=t),l.jsx(c.d,{className:(0,a.cn)("my-4 h-auto",s),code:i,language:r,children:l.jsx(c.f,{onCopy:()=>console.log("Copied code to clipboard"),onError:()=>console.error("Failed to copy code to clipboard")})})}},u=(0,n.memo)(({className:e,options:s,children:t,allowedImagePrefixes:n,allowedLinkPrefixes:r,defaultOrigin:c,parseIncompleteMarkdown:u=!0,...h})=>{let p="string"==typeof t&&u?function(e){if(!e||"string"!=typeof e)return e;let s=e,t=s.match(/(!?\[)([^\]]*?)$/);if(t){let e=s.lastIndexOf(t[1]);s=s.substring(0,e)}if(s.match(/(\*\*)([^*]*?)$/)&&(s.match(/\*\*/g)||[]).length%2==1&&(s=`${s}**`),s.match(/(__)([^_]*?)$/)&&(s.match(/__/g)||[]).length%2==1&&(s=`${s}__`),s.match(/(\*)([^*]*?)$/)&&s.split("").reduce((e,t,l)=>{if("*"===t){let t=s[l-1],a=s[l+1];if("*"!==t&&"*"!==a)return e+1}return e},0)%2==1&&(s=`${s}*`),s.match(/(_)([^_]*?)$/)&&s.split("").reduce((e,t,l)=>{if("_"===t){let t=s[l-1],a=s[l+1];if("_"!==t&&"_"!==a)return e+1}return e},0)%2==1&&(s=`${s}_`),s.match(/(`)([^`]*?)$/)&&(s.includes("```"),(s.match(/```[\s\S]*?```/g)||[]).length,(s.match(/```/g)||[]).length%2!=1)){let e=0;for(let t=0;t<s.length;t++)if("`"===s[t]){let l="```"===s.substring(t,t+3),a=t>0&&"```"===s.substring(t-1,t+2),n=t>1&&"```"===s.substring(t-2,t+1);!(l||a||n)&&e++}e%2==1&&(s=`${s}\``)}return s.match(/(~~)([^~]*?)$/)&&(s.match(/~~/g)||[]).length%2==1&&(s=`${s}~~`),s}(t):t;return l.jsx("div",{className:(0,a.cn)("size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",e),...h,children:l.jsx(m,{allowedImagePrefixes:n??["*"],allowedLinkPrefixes:r??["*"],components:x,defaultOrigin:c,rehypePlugins:[i.Z],remarkPlugins:[o.Z,d.Z],...s,children:p})})},(e,s)=>e.children===s.children);u.displayName="Response"},43273:(e,s,t)=>{t.d(s,{Cd:()=>d,X:()=>c,bZ:()=>o});var l=t(10326),a=t(79360),n=t(17577),r=t(77863);let i=(0,a.j)("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive",info:"border-info/50 text-info dark:border-info [&>svg]:text-info"}},defaultVariants:{variant:"default"}}),o=n.forwardRef(({className:e,variant:s,...t},a)=>l.jsx("div",{ref:a,role:"alert",className:(0,r.cn)(i({variant:s}),e),...t}));o.displayName="Alert";let d=n.forwardRef(({className:e,...s},t)=>l.jsx("h5",{ref:t,className:(0,r.cn)("mb-1 font-medium leading-none tracking-tight",e),...s}));d.displayName="AlertTitle";let c=n.forwardRef(({className:e,...s},t)=>l.jsx("div",{ref:t,className:(0,r.cn)("text-sm [&_p]:leading-relaxed",e),...s}));c.displayName="AlertDescription"},24295:(e,s,t)=>{t.d(s,{Fw:()=>r,wy:()=>n,zF:()=>a});var l=t(35663);let a=l.fC,n=l.wy,r=l.Fw},79210:(e,s,t)=>{t.d(s,{SP:()=>d,dr:()=>o,mQ:()=>i,nU:()=>c});var l=t(10326),a=t(28407),n=t(17577),r=t(77863);let i=a.fC,o=n.forwardRef(({className:e,...s},t)=>l.jsx(a.aV,{ref:t,className:(0,r.cn)("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...s}));o.displayName=a.aV.displayName;let d=n.forwardRef(({className:e,...s},t)=>l.jsx(a.xz,{ref:t,className:(0,r.cn)("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...s}));d.displayName=a.xz.displayName;let c=n.forwardRef(({className:e,...s},t)=>l.jsx(a.VY,{ref:t,className:(0,r.cn)("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...s}));c.displayName=a.VY.displayName},77961:(e,s,t)=>{t.d(s,{jF:()=>S,jU:()=>W,ZP:()=>F,NF:()=>U});var l=t(10326),a=t(17577);t(32964),t(59946),t(27221);var n=t(59161),r=t(30463);let i=function(e,s=[]){(0,a.useContext)(r.E);let[t,l]=(0,a.useState)(void 0);return t};var o=t(84714),d=t(31540),c=t(15557),m=t(61086),x=t(11890),u=t(39183),h=t(36283),p=t(71709),g=t(39572),f=t(83855),j=t(94019),b=t(3240),N=t(90772),v=t(62288),y=t(65685),w=t(3574),k=t(20108),C=t(10119),Z=t(54432),z=t(76812),_=t(33071),L=t(65304);function S({s3key:e,children:s}){let{data:t,isLoading:a,error:r,refetch:i}=(0,k.a)({queryKey:["fileObject",e],queryFn:async()=>e?await n.QZ.object(e):null,enabled:null!=e});if(!e)return l.jsx(_.Zb,{children:(0,l.jsxs)(_.aY,{className:"p-3 flex",children:[l.jsx("p",{className:"text-sm text-muted-foreground m-auto",children:"No file selected"}),s]})});let o=e,c="";return e.includes("[bucket:")&&(c=e.split("[bucket:")[1]?.split("]")[0]||"",o=e.split("[bucket:")[1]?.split("]")[0]||"",o?.length&&(o=e.split("]")[1]||"")),o=o.split("_EXULU_").pop()||"",(0,l.jsxs)(_.Zb,{children:[l.jsx(_.Ol,{className:"pb-3",children:l.jsx(_.ll,{className:"text-sm max-w-[500px] truncate",children:o})}),(0,l.jsxs)(_.aY,{className:"pt-0",children:[a&&(0,l.jsxs)("div",{className:"space-y-2",children:[l.jsx(L.O,{className:"h-4 w-full"}),l.jsx(L.O,{className:"h-4 w-2/3"})]}),!a&&t&&(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[(0,l.jsxs)("span",{className:"capitalize",children:[t?.ContentType.split("/").pop(),c&&` [Bucket: ${c}]`]}),(0,l.jsxs)("span",{children:[(t?.ContentLength/1024/1024).toFixed(2)," MB"]})]}),(0,l.jsxs)("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[(0,l.jsxs)("span",{children:["Last modified: ",new Date(t?.LastModified).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})]}),(0,l.jsxs)(N.z,{variant:"secondary",size:"sm",type:"button",className:"h-7 px-2",onClick:()=>{n.QZ.download(e).then(async e=>{console.log("res",e);let s=await e.json();console.log("res",s);let t=s.url;window.open(t,"_blank")})},children:[l.jsx("span",{className:"mr-1 text-xs",children:"View"}),l.jsx(d.Z,{className:"h-3 w-3"})]})]})]}),!a&&r&&l.jsx("p",{className:"text-xs text-muted-foreground",children:r.message}),s]})]})}function F({id:e,allowedFileTypes:s,dependencies:t,onConfirm:n,selectionLimit:r,buttonText:i}){let[o,d]=(0,a.useState)(!1);return(0,l.jsxs)(v.Vq,{open:o,onOpenChange:d,children:[l.jsx(v.hg,{asChild:!0,children:(0,l.jsxs)(N.z,{variant:"outline",children:[i&&l.jsx("span",{className:"mr-2",children:i}),l.jsx(c.Z,{className:"h-4 w-4"})]})}),(0,l.jsxs)(v.cZ,{className:"sm:max-w-[900px]",children:[(0,l.jsxs)(v.fK,{children:[l.jsx(v.$N,{children:"File Gallery"}),l.jsx(v.Be,{children:"Browse your previously uploaded files or upload new ones."})]}),l.jsx(O,{id:e,allowedFileTypes:s,dependencies:t,selectionLimit:r,onConfirm:e=>{n(e),d(!1)}})]})]})}let O=({id:e,allowedFileTypes:s,dependencies:t,onConfirm:d,selectionLimit:c})=>{s||(s=[".png",".jpg",".jpeg",".gif",".webp",".pdf",".docx",".xlsx",".xls",".csv",".pptx",".ppt",".mp3",".wav",".m4a",".mp4",".mpeg",".mp4",".m4a",".mp3",".mpeg",".wav"]);let[h,p]=(0,a.useState)(void 0),[g,f]=(0,a.useState)(void 0),[j,b]=(0,a.useState)(void 0),v=(0,a.useContext)(r.E),[_,S]=(0,a.useState)([]),F=e=>{if(_.includes(e)){S(_.filter(s=>s!==e));return}if(1===c){S([e]);return}_.length>=c||S([..._,e])},O=(0,C.D)({mutationFn:async({key:e})=>{await n.QZ.delete(e),R()}}),{data:$,isLoading:U,error:P,refetch:R}=(0,k.a)({queryKey:["filesQuery",h,j],staleTime:3e4,queryFn:async()=>n.QZ.list({search:h,continuationToken:j})});console.log("!! data !!",$);let{theme:q}=(0,w.F)(),K=i({backend:v?.backend||"",uppyOptions:{id:e,allowedFileTypes:s},callbacks:{uploadSuccess:async e=>{console.log("data",e)}},maxNumberOfFiles:10},t);return((0,a.useEffect)(()=>{R()},[h,j]),K)?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mt-4",children:[(0,l.jsxs)("div",{className:"border rounded-lg p-4",children:[l.jsx("h3",{className:"text-sm font-medium mb-3",children:"Previously Uploaded Files"}),l.jsx(Z.I,{placeholder:"Search files...",value:h,onChange:e=>p(e.target.value),className:"mb-3"}),(0,l.jsxs)("div",{className:"flex items-center justify-between text-xs text-muted-foreground pb-2",children:[(0,l.jsxs)("span",{children:[_.length," / ",c," files selected"]}),(0,l.jsxs)("span",{children:["Allowed file types: ",s?.map(e=>e).join(", ")]})]}),(0,l.jsxs)(y.x,{children:[U&&(0,l.jsxs)("div",{className:"flex items-center justify-center h-full w-full grid grid-cols-2 sm:grid-cols-3 gap-3",children:[l.jsx(L.O,{className:"h-[120px] w-full"}),l.jsx(L.O,{className:"h-[120px] w-full"}),l.jsx(L.O,{className:"h-[120px] w-full"}),l.jsx(L.O,{className:"h-[120px] w-full"}),l.jsx(L.O,{className:"h-[120px] w-full"}),l.jsx(L.O,{className:"h-[120px] w-full"}),l.jsx(L.O,{className:"h-[120px] w-full"}),l.jsx(L.O,{className:"h-[120px] w-full"}),l.jsx(L.O,{className:"h-[120px] w-full"})]}),(0,l.jsxs)("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-3",children:[!U&&!$?.Contents?.length&&(0,l.jsxs)("div",{className:"col-span-full flex flex-col items-center justify-center py-12 text-center",children:[l.jsx(m.Z,{className:"h-12 w-12 text-muted-foreground/50 mb-3"}),l.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Nothing to see here... yet!"}),l.jsx("p",{className:"text-xs text-muted-foreground/75 mt-1",children:"Upload some files to get started"})]}),$?.Contents?.map(e=>l.jsx(W,{s3Key:e.Key,onSelect:F,active:_.some(s=>s===e.Key),onRemove:()=>{O.mutate({key:e.Key})},disabled:!!s&&!s?.some(s=>e.Key.endsWith(s))}))]}),l.jsx("div",{className:"flex items-center space-x-6 lg:space-x-8 pt-3",children:(0,l.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,l.jsxs)(N.z,{variant:"outline",className:"hidden size-8 p-0 lg:flex",onClick:()=>{b(void 0)},disabled:!j||U,children:[l.jsx("span",{className:"sr-only",children:"Go to first page"}),l.jsx(z.kRt,{className:"size-4"})]}),(0,l.jsxs)(N.z,{variant:"outline",className:"size-8 p-0",onClick:()=>{b(g)},disabled:!j||U,children:[l.jsx("span",{className:"sr-only",children:"Go to previous page"}),l.jsx(x.Z,{className:"size-4"})]}),(0,l.jsxs)(N.z,{variant:"outline",className:"size-8 p-0",onClick:()=>{f(j),b($?.NextContinuationToken)},disabled:!$?.NextContinuationToken||U,children:[l.jsx("span",{className:"sr-only",children:"Go to next page"}),l.jsx(u.Z,{className:"size-4"})]})]})})]})]}),(0,l.jsxs)("div",{className:"border rounded-lg p-4",children:[l.jsx("h3",{className:"text-sm font-medium mb-3",children:"Upload New Files"}),l.jsx(o.A,{uppy:K,theme:"dark"===q?"dark":"light"})]})]}),l.jsx("div",{className:"flex justify-end",children:l.jsx(N.z,{variant:"outline",onClick:()=>{d(_),S([])},children:"Confirm"})})]}):null},W=({s3Key:e,onSelect:s,onRemove:t,active:a,disabled:r,addToContext:i})=>{let o;return(0,l.jsxs)("div",{className:`${r?"opacity-50":""} group relative rounded-lg p-2 hover:bg-muted transition-colors cursor-pointer ${a?"border border-purple-500":"border"}`,onClick:()=>{!r&&s&&s(e)},children:[l.jsx("div",{className:"aspect-square relative mb-2 bg-muted/50 rounded-md overflow-hidden flex items-center justify-center",children:e&&(e.toLowerCase().endsWith("jpg")||e.toLowerCase().endsWith("jpeg")||e.toLowerCase().endsWith("png")||e.toLowerCase().endsWith("svg"))?l.jsx(P,{fileKey:e}):(0,l.jsxs)("div",{className:"flex flex-col items-center justify-center h-full",children:[(o=e)?o.toLowerCase().endsWith("jpg")||o.toLowerCase().endsWith("jpeg")||o.toLowerCase().endsWith("png")||o.toLowerCase().endsWith("svg")?l.jsx(p.Z,{className:"h-6 w-6 text-blue-500"}):o.endsWith("pdf")?l.jsx(g.Z,{className:"h-6 w-6 text-red-500"}):o.endsWith("xls")||o.endsWith("xlsx")||o.endsWith("csv")?l.jsx(h.Z,{className:"h-6 w-6 text-green-500"}):o.endsWith("ppt")||o.endsWith("pptx")?l.jsx(h.Z,{className:"h-6 w-6 text-orange-500"}):l.jsx(h.Z,{className:"h-6 w-6 text-gray-500"}):l.jsx(h.Z,{className:"h-6 w-6 text-gray-500"}),l.jsx("span",{className:"text-xs text-muted-foreground mt-1 text-center",children:e?e.split("_EXULU_").pop():e})]})}),l.jsx("p",{className:"text-xs truncate",children:e?e.split("_EXULU_").pop():e}),(0,l.jsxs)("div",{className:"opacity-0 group-hover:opacity-100 flex absolute top-1 right-1",children:[i&&(0,l.jsxs)(N.z,{variant:"ghost",size:"icon",type:"button",className:"h-6 w-6 bg-background/80 hover:bg-background",onClick:()=>{i(e)},children:[l.jsx(f.Z,{className:"h-3 w-3"}),l.jsx("span",{className:"sr-only",children:"Add"})]}),(0,l.jsxs)(N.z,{variant:"ghost",size:"icon",type:"button",className:"h-6 w-6 bg-background/80 hover:bg-background",onClick:()=>{n.QZ.download(e).then(async e=>{console.log("res",e);let s=await e.json();console.log("res",s);let t=s.url;window.open(t,"_blank")})},children:[l.jsx(d.Z,{className:"h-3 w-3"}),l.jsx("span",{className:"sr-only",children:"View"})]}),t&&(0,l.jsxs)(N.z,{onClick:s=>{s.stopPropagation(),t(e)},variant:"ghost",type:"button",size:"icon",className:"h-6 w-6 opacity-0 group-hover:opacity-100 bg-background/80 hover:bg-background ml-1",children:[l.jsx(j.Z,{className:"h-3 w-3"}),l.jsx("span",{className:"sr-only",children:"Remove"})]})]})]},e)},$={},U=async e=>{if($[e]){if(!($[e].expiresAt<Date.now()))return $[e].url;delete $[e]}let s=await n.QZ.download(e),t=await s.json();return console.log("json",t),$[e]={url:t.url,expiresAt:Date.now()+6e4},t.url},P=({fileKey:e})=>{console.log("key",e);let s=(0,k.a)({queryKey:["imageQuery",e],staleTime:3e4,queryFn:async()=>U(e)});return s.isLoading?l.jsx("div",{children:l.jsx(b.Z,{})}):s.isLoading||s.data?l.jsx("img",{src:s.data,alt:e,className:"object-cover w-full h-full"}):l.jsx("div",{children:l.jsx(m.Z,{})})}}};
|
|
1
|
+
"use strict";exports.id=5974,exports.ids=[5974],exports.modules={51602:(e,s,t)=>{t.d(s,{d:()=>u,f:()=>h});var l=t(10326),a=t(90772),n=t(77863),r=t(32933),i=t(43810),o=t(17577),d=t(54390),c=t(35057),m=t(48818);let x=(0,o.createContext)({code:""}),u=({code:e,language:s,showLineNumbers:t=!1,className:a,children:r,...i})=>l.jsx(x.Provider,{value:{code:e},children:l.jsx("div",{className:(0,n.cn)("relative w-full overflow-hidden rounded-md border bg-background text-foreground",a),...i,children:(0,l.jsxs)("div",{className:"relative",children:[l.jsx(d.Z,{className:"overflow-hidden dark:hidden",codeTagProps:{className:"font-mono text-sm"},customStyle:{margin:0,padding:"1rem",fontSize:"0.875rem",background:"hsl(var(--background))",color:"hsl(var(--foreground))"},language:s,lineNumberStyle:{color:"hsl(var(--muted-foreground))",paddingRight:"1rem",minWidth:"2.5rem"},showLineNumbers:t,style:c.Z,children:e}),l.jsx(d.Z,{className:"hidden overflow-hidden dark:block",codeTagProps:{className:"font-mono text-sm"},customStyle:{margin:0,padding:"1rem",fontSize:"0.875rem",background:"hsl(var(--background))",color:"hsl(var(--foreground))"},language:s,lineNumberStyle:{color:"hsl(var(--muted-foreground))",paddingRight:"1rem",minWidth:"2.5rem"},showLineNumbers:t,style:m.Z,children:e}),r&&l.jsx("div",{className:"absolute top-2 right-2 flex items-center gap-2",children:r})]})})}),h=({onCopy:e,onError:s,timeout:t=2e3,children:d,className:c,...m})=>{let[u,h]=(0,o.useState)(!1),{code:p}=(0,o.useContext)(x),g=async()=>{s?.(Error("Clipboard API not available"))},f=u?r.Z:i.Z;return l.jsx(a.z,{className:(0,n.cn)("shrink-0",c),onClick:g,size:"icon",variant:"ghost",...m,children:d??l.jsx(f,{size:14})})}},36931:(e,s,t)=>{t.d(s,{H:()=>u});var l=t(10326),a=t(77863),n=t(17577),r=t(16476),i=t(79283),o=t(70285),d=t(7833),c=t(51602);t(32289);let m=(0,t(39499).Z)(r.UG),x={ol:({node:e,children:s,className:t,...n})=>l.jsx("ol",{className:(0,a.cn)("ml-4 list-outside list-decimal",t),...n,children:s}),li:({node:e,children:s,className:t,...n})=>l.jsx("li",{className:(0,a.cn)("py-1",t),...n,children:s}),ul:({node:e,children:s,className:t,...n})=>l.jsx("ul",{className:(0,a.cn)("ml-4 list-outside list-disc",t),...n,children:s}),hr:({node:e,className:s,...t})=>l.jsx("hr",{className:(0,a.cn)("my-6 border-border",s),...t}),strong:({node:e,children:s,className:t,...n})=>l.jsx("span",{className:(0,a.cn)("font-semibold",t),...n,children:s}),a:({node:e,children:s,className:t,...n})=>l.jsx("a",{className:(0,a.cn)("font-medium text-primary underline",t),rel:"noreferrer",target:"_blank",...n,children:s}),h1:({node:e,children:s,className:t,...n})=>l.jsx("h1",{className:(0,a.cn)("mt-6 mb-2 font-semibold text-3xl",t),...n,children:s}),h2:({node:e,children:s,className:t,...n})=>l.jsx("h2",{className:(0,a.cn)("mt-6 mb-2 font-semibold text-2xl",t),...n,children:s}),h3:({node:e,children:s,className:t,...n})=>l.jsx("h3",{className:(0,a.cn)("mt-6 mb-2 font-semibold text-xl",t),...n,children:s}),h4:({node:e,children:s,className:t,...n})=>l.jsx("h4",{className:(0,a.cn)("mt-6 mb-2 font-semibold text-lg",t),...n,children:s}),h5:({node:e,children:s,className:t,...n})=>l.jsx("h5",{className:(0,a.cn)("mt-6 mb-2 font-semibold text-base",t),...n,children:s}),h6:({node:e,children:s,className:t,...n})=>l.jsx("h6",{className:(0,a.cn)("mt-6 mb-2 font-semibold text-sm",t),...n,children:s}),table:({node:e,children:s,className:t,...n})=>l.jsx("div",{className:"my-4 overflow-x-auto",children:l.jsx("table",{className:(0,a.cn)("w-full border-collapse border border-border",t),...n,children:s})}),thead:({node:e,children:s,className:t,...n})=>l.jsx("thead",{className:(0,a.cn)("bg-muted/50",t),...n,children:s}),tbody:({node:e,children:s,className:t,...n})=>l.jsx("tbody",{className:(0,a.cn)("divide-y divide-border",t),...n,children:s}),tr:({node:e,children:s,className:t,...n})=>l.jsx("tr",{className:(0,a.cn)("border-border border-b",t),...n,children:s}),th:({node:e,children:s,className:t,...n})=>l.jsx("th",{className:(0,a.cn)("px-4 py-2 text-left font-semibold text-sm",t),...n,children:s}),td:({node:e,children:s,className:t,...n})=>l.jsx("td",{className:(0,a.cn)("px-4 py-2 text-sm",t),...n,children:s}),blockquote:({node:e,children:s,className:t,...n})=>l.jsx("blockquote",{className:(0,a.cn)("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),...n,children:s}),code:({node:e,className:s,...t})=>e?.position?.start.line!==e?.position?.end.line?l.jsx("code",{className:s,...t}):l.jsx("code",{className:(0,a.cn)("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",s),...t}),pre:({node:e,className:s,children:t})=>{let r="javascript";"string"==typeof e?.properties?.className&&(r=e.properties.className.replace("language-",""));let i="";return(0,n.isValidElement)(t)&&t.props&&"string"==typeof t.props.children?i=t.props.children:"string"==typeof t&&(i=t),l.jsx(c.d,{className:(0,a.cn)("my-4 h-auto",s),code:i,language:r,children:l.jsx(c.f,{onCopy:()=>console.log("Copied code to clipboard"),onError:()=>console.error("Failed to copy code to clipboard")})})}},u=(0,n.memo)(({className:e,options:s,children:t,allowedImagePrefixes:n,allowedLinkPrefixes:r,defaultOrigin:c,parseIncompleteMarkdown:u=!0,...h})=>{let p="string"==typeof t&&u?function(e){if(!e||"string"!=typeof e)return e;let s=e,t=s.match(/(!?\[)([^\]]*?)$/);if(t){let e=s.lastIndexOf(t[1]);s=s.substring(0,e)}if(s.match(/(\*\*)([^*]*?)$/)&&(s.match(/\*\*/g)||[]).length%2==1&&(s=`${s}**`),s.match(/(__)([^_]*?)$/)&&(s.match(/__/g)||[]).length%2==1&&(s=`${s}__`),s.match(/(\*)([^*]*?)$/)&&s.split("").reduce((e,t,l)=>{if("*"===t){let t=s[l-1],a=s[l+1];if("*"!==t&&"*"!==a)return e+1}return e},0)%2==1&&(s=`${s}*`),s.match(/(_)([^_]*?)$/)&&s.split("").reduce((e,t,l)=>{if("_"===t){let t=s[l-1],a=s[l+1];if("_"!==t&&"_"!==a)return e+1}return e},0)%2==1&&(s=`${s}_`),s.match(/(`)([^`]*?)$/)&&(s.includes("```"),(s.match(/```[\s\S]*?```/g)||[]).length,(s.match(/```/g)||[]).length%2!=1)){let e=0;for(let t=0;t<s.length;t++)if("`"===s[t]){let l="```"===s.substring(t,t+3),a=t>0&&"```"===s.substring(t-1,t+2),n=t>1&&"```"===s.substring(t-2,t+1);!(l||a||n)&&e++}e%2==1&&(s=`${s}\``)}return s.match(/(~~)([^~]*?)$/)&&(s.match(/~~/g)||[]).length%2==1&&(s=`${s}~~`),s}(t):t;return l.jsx("div",{className:(0,a.cn)("size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",e),...h,children:l.jsx(m,{allowedImagePrefixes:n??["*"],allowedLinkPrefixes:r??["*"],components:x,defaultOrigin:c,rehypePlugins:[i.Z],remarkPlugins:[o.Z,d.Z],...s,children:p})})},(e,s)=>e.children===s.children);u.displayName="Response"},43273:(e,s,t)=>{t.d(s,{Cd:()=>d,X:()=>c,bZ:()=>o});var l=t(10326),a=t(79360),n=t(17577),r=t(77863);let i=(0,a.j)("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive",info:"border-info/50 text-info dark:border-info [&>svg]:text-info"}},defaultVariants:{variant:"default"}}),o=n.forwardRef(({className:e,variant:s,...t},a)=>l.jsx("div",{ref:a,role:"alert",className:(0,r.cn)(i({variant:s}),e),...t}));o.displayName="Alert";let d=n.forwardRef(({className:e,...s},t)=>l.jsx("h5",{ref:t,className:(0,r.cn)("mb-1 font-medium leading-none tracking-tight",e),...s}));d.displayName="AlertTitle";let c=n.forwardRef(({className:e,...s},t)=>l.jsx("div",{ref:t,className:(0,r.cn)("text-sm [&_p]:leading-relaxed",e),...s}));c.displayName="AlertDescription"},24295:(e,s,t)=>{t.d(s,{Fw:()=>r,wy:()=>n,zF:()=>a});var l=t(35663);let a=l.fC,n=l.wy,r=l.Fw},79210:(e,s,t)=>{t.d(s,{SP:()=>d,dr:()=>o,mQ:()=>i,nU:()=>c});var l=t(10326),a=t(28407),n=t(17577),r=t(77863);let i=a.fC,o=n.forwardRef(({className:e,...s},t)=>l.jsx(a.aV,{ref:t,className:(0,r.cn)("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...s}));o.displayName=a.aV.displayName;let d=n.forwardRef(({className:e,...s},t)=>l.jsx(a.xz,{ref:t,className:(0,r.cn)("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...s}));d.displayName=a.xz.displayName;let c=n.forwardRef(({className:e,...s},t)=>l.jsx(a.VY,{ref:t,className:(0,r.cn)("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...s}));c.displayName=a.VY.displayName},77961:(e,s,t)=>{t.d(s,{jF:()=>S,jU:()=>W,ZP:()=>F,NF:()=>U});var l=t(10326),a=t(17577);t(32964),t(59946),t(27221);var n=t(59161),r=t(30463);let i=function(e,s=[]){(0,a.useContext)(r.E);let[t,l]=(0,a.useState)(void 0);return t};var o=t(84714),d=t(31540),c=t(15557),m=t(61086),x=t(11890),u=t(39183),h=t(36283),p=t(71709),g=t(39572),f=t(83855),j=t(94019),N=t(3240),b=t(90772),v=t(62288),y=t(65685),w=t(3574),k=t(20108),C=t(10119),Z=t(54432),z=t(76812),_=t(33071),L=t(65304);function S({s3key:e,children:s}){let{data:t,isLoading:a,error:r,refetch:i}=(0,k.a)({queryKey:["fileObject",e],queryFn:async()=>e?await n.QZ.object(e):null,enabled:null!=e});if(!e)return l.jsx(_.Zb,{children:(0,l.jsxs)(_.aY,{className:"p-3 flex",children:[l.jsx("p",{className:"text-sm text-muted-foreground m-auto",children:"No file selected"}),s]})});let o=e,c=e.split("/")[0];return o=(o=e.split("/").slice(1).join("/")).split("_EXULU_").pop()||"",(0,l.jsxs)(_.Zb,{children:[l.jsx(_.Ol,{className:"pb-3",children:l.jsx(_.ll,{className:"text-sm max-w-[500px] truncate",children:o})}),(0,l.jsxs)(_.aY,{className:"pt-0",children:[a&&(0,l.jsxs)("div",{className:"space-y-2",children:[l.jsx(L.O,{className:"h-4 w-full"}),l.jsx(L.O,{className:"h-4 w-2/3"})]}),!a&&t&&(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[(0,l.jsxs)("span",{className:"capitalize",children:[t?.ContentType.split("/").pop(),c&&` Bucket: ${c}`]}),(0,l.jsxs)("span",{children:[(t?.ContentLength/1024/1024).toFixed(2)," MB"]})]}),(0,l.jsxs)("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[(0,l.jsxs)("span",{children:["Last modified: ",new Date(t?.LastModified).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})]}),(0,l.jsxs)(b.z,{variant:"secondary",size:"sm",type:"button",className:"h-7 px-2",onClick:()=>{n.QZ.download(e).then(async e=>{console.log("res",e);let s=await e.json();console.log("res",s);let t=s.url;window.open(t,"_blank")})},children:[l.jsx("span",{className:"mr-1 text-xs",children:"View"}),l.jsx(d.Z,{className:"h-3 w-3"})]})]})]}),!a&&r&&l.jsx("p",{className:"text-xs text-muted-foreground",children:r.message}),s]})]})}function F({id:e,allowedFileTypes:s,dependencies:t,onConfirm:n,selectionLimit:r,buttonText:i}){let[o,d]=(0,a.useState)(!1);return(0,l.jsxs)(v.Vq,{open:o,onOpenChange:d,children:[l.jsx(v.hg,{asChild:!0,children:(0,l.jsxs)(b.z,{variant:"outline",children:[i&&l.jsx("span",{className:"mr-2",children:i}),l.jsx(c.Z,{className:"h-4 w-4"})]})}),(0,l.jsxs)(v.cZ,{className:"sm:max-w-[900px]",children:[(0,l.jsxs)(v.fK,{children:[l.jsx(v.$N,{children:"File Gallery"}),l.jsx(v.Be,{children:"Browse your previously uploaded files or upload new ones."})]}),l.jsx(O,{id:e,allowedFileTypes:s,dependencies:t,selectionLimit:r,onConfirm:e=>{n(e),d(!1)}})]})]})}let O=({id:e,allowedFileTypes:s,dependencies:t,onConfirm:d,selectionLimit:c})=>{s||(s=[".png",".jpg",".jpeg",".gif",".webp",".pdf",".docx",".xlsx",".xls",".csv",".pptx",".ppt",".mp3",".wav",".m4a",".mp4",".mpeg",".mp4",".m4a",".mp3",".mpeg",".wav"]);let[h,p]=(0,a.useState)(void 0),[g,f]=(0,a.useState)(void 0),[j,N]=(0,a.useState)(void 0),v=(0,a.useContext)(r.E),[_,S]=(0,a.useState)([]),F=e=>{if(_.includes(e)){S(_.filter(s=>s!==e));return}if(1===c){S([e]);return}_.length>=c||S([..._,e])},O=(0,C.D)({mutationFn:async({key:e})=>{await n.QZ.delete(e),R()}}),{data:$,isLoading:U,error:P,refetch:R}=(0,k.a)({queryKey:["filesQuery",h,j],staleTime:3e4,queryFn:async()=>n.QZ.list({search:h,continuationToken:j})});console.log("!! data !!",$);let{theme:q}=(0,w.F)(),K=i({backend:v?.backend||"",uppyOptions:{id:e,allowedFileTypes:s},callbacks:{uploadSuccess:async e=>{console.log("data",e)}},maxNumberOfFiles:10},t);return((0,a.useEffect)(()=>{R()},[h,j]),K)?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mt-4",children:[(0,l.jsxs)("div",{className:"border rounded-lg p-4",children:[l.jsx("h3",{className:"text-sm font-medium mb-3",children:"Previously Uploaded Files"}),l.jsx(Z.I,{placeholder:"Search files...",value:h,onChange:e=>p(e.target.value),className:"mb-3"}),(0,l.jsxs)("div",{className:"flex items-center justify-between text-xs text-muted-foreground pb-2",children:[(0,l.jsxs)("span",{children:[_.length," / ",c," files selected"]}),(0,l.jsxs)("span",{children:["Allowed file types: ",s?.map(e=>e).join(", ")]})]}),(0,l.jsxs)(y.x,{children:[U&&(0,l.jsxs)("div",{className:"flex items-center justify-center h-full w-full grid grid-cols-2 sm:grid-cols-3 gap-3",children:[l.jsx(L.O,{className:"h-[120px] w-full"}),l.jsx(L.O,{className:"h-[120px] w-full"}),l.jsx(L.O,{className:"h-[120px] w-full"}),l.jsx(L.O,{className:"h-[120px] w-full"}),l.jsx(L.O,{className:"h-[120px] w-full"}),l.jsx(L.O,{className:"h-[120px] w-full"}),l.jsx(L.O,{className:"h-[120px] w-full"}),l.jsx(L.O,{className:"h-[120px] w-full"}),l.jsx(L.O,{className:"h-[120px] w-full"})]}),(0,l.jsxs)("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-3",children:[!U&&!$?.Contents?.length&&(0,l.jsxs)("div",{className:"col-span-full flex flex-col items-center justify-center py-12 text-center",children:[l.jsx(m.Z,{className:"h-12 w-12 text-muted-foreground/50 mb-3"}),l.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Nothing to see here... yet!"}),l.jsx("p",{className:"text-xs text-muted-foreground/75 mt-1",children:"Upload some files to get started"})]}),$?.Contents?.map(e=>l.jsx(W,{s3Key:e.Key,onSelect:F,active:_.some(s=>s===e.Key),onRemove:()=>{O.mutate({key:e.Key})},disabled:!!s&&!s?.some(s=>e.Key.endsWith(s))}))]}),l.jsx("div",{className:"flex items-center space-x-6 lg:space-x-8 pt-3",children:(0,l.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,l.jsxs)(b.z,{variant:"outline",className:"hidden size-8 p-0 lg:flex",onClick:()=>{N(void 0)},disabled:!j||U,children:[l.jsx("span",{className:"sr-only",children:"Go to first page"}),l.jsx(z.kRt,{className:"size-4"})]}),(0,l.jsxs)(b.z,{variant:"outline",className:"size-8 p-0",onClick:()=>{N(g)},disabled:!j||U,children:[l.jsx("span",{className:"sr-only",children:"Go to previous page"}),l.jsx(x.Z,{className:"size-4"})]}),(0,l.jsxs)(b.z,{variant:"outline",className:"size-8 p-0",onClick:()=>{f(j),N($?.NextContinuationToken)},disabled:!$?.NextContinuationToken||U,children:[l.jsx("span",{className:"sr-only",children:"Go to next page"}),l.jsx(u.Z,{className:"size-4"})]})]})})]})]}),(0,l.jsxs)("div",{className:"border rounded-lg p-4",children:[l.jsx("h3",{className:"text-sm font-medium mb-3",children:"Upload New Files"}),l.jsx(o.A,{uppy:K,theme:"dark"===q?"dark":"light"})]})]}),l.jsx("div",{className:"flex justify-end",children:l.jsx(b.z,{variant:"outline",onClick:()=>{d(_),S([])},children:"Confirm"})})]}):null},W=({s3Key:e,onSelect:s,onRemove:t,active:a,disabled:r,addToContext:i})=>{let o;return(0,l.jsxs)("div",{className:`${r?"opacity-50":""} group relative rounded-lg p-2 hover:bg-muted transition-colors cursor-pointer ${a?"border border-purple-500":"border"}`,onClick:()=>{!r&&s&&s(e)},children:[l.jsx("div",{className:"aspect-square relative mb-2 bg-muted/50 rounded-md overflow-hidden flex items-center justify-center",children:e&&(e.toLowerCase().endsWith("jpg")||e.toLowerCase().endsWith("jpeg")||e.toLowerCase().endsWith("png")||e.toLowerCase().endsWith("svg"))?l.jsx(P,{fileKey:e}):(0,l.jsxs)("div",{className:"flex flex-col items-center justify-center h-full",children:[(o=e)?o.toLowerCase().endsWith("jpg")||o.toLowerCase().endsWith("jpeg")||o.toLowerCase().endsWith("png")||o.toLowerCase().endsWith("svg")?l.jsx(p.Z,{className:"h-6 w-6 text-blue-500"}):o.endsWith("pdf")?l.jsx(g.Z,{className:"h-6 w-6 text-red-500"}):o.endsWith("xls")||o.endsWith("xlsx")||o.endsWith("csv")?l.jsx(h.Z,{className:"h-6 w-6 text-green-500"}):o.endsWith("ppt")||o.endsWith("pptx")?l.jsx(h.Z,{className:"h-6 w-6 text-orange-500"}):l.jsx(h.Z,{className:"h-6 w-6 text-gray-500"}):l.jsx(h.Z,{className:"h-6 w-6 text-gray-500"}),l.jsx("span",{className:"text-xs text-muted-foreground mt-1 text-center",children:e?e.split("_EXULU_").pop():e})]})}),l.jsx("p",{className:"text-xs truncate",children:e?e.split("_EXULU_").pop():e}),(0,l.jsxs)("div",{className:"opacity-0 group-hover:opacity-100 flex absolute top-1 right-1",children:[i&&(0,l.jsxs)(b.z,{variant:"ghost",size:"icon",type:"button",className:"h-6 w-6 bg-background/80 hover:bg-background",onClick:()=>{i(e)},children:[l.jsx(f.Z,{className:"h-3 w-3"}),l.jsx("span",{className:"sr-only",children:"Add"})]}),(0,l.jsxs)(b.z,{variant:"ghost",size:"icon",type:"button",className:"h-6 w-6 bg-background/80 hover:bg-background",onClick:()=>{n.QZ.download(e).then(async e=>{console.log("res",e);let s=await e.json();console.log("res",s);let t=s.url;window.open(t,"_blank")})},children:[l.jsx(d.Z,{className:"h-3 w-3"}),l.jsx("span",{className:"sr-only",children:"View"})]}),t&&(0,l.jsxs)(b.z,{onClick:s=>{s.stopPropagation(),t(e)},variant:"ghost",type:"button",size:"icon",className:"h-6 w-6 opacity-0 group-hover:opacity-100 bg-background/80 hover:bg-background ml-1",children:[l.jsx(j.Z,{className:"h-3 w-3"}),l.jsx("span",{className:"sr-only",children:"Remove"})]})]})]},e)},$={},U=async e=>{if($[e]){if(!($[e].expiresAt<Date.now()))return $[e].url;delete $[e]}let s=await n.QZ.download(e),t=await s.json();return console.log("json",t),$[e]={url:t.url,expiresAt:Date.now()+6e4},t.url},P=({fileKey:e})=>{console.log("key",e);let s=(0,k.a)({queryKey:["imageQuery",e],staleTime:3e4,queryFn:async()=>U(e)});return s.isLoading?l.jsx("div",{children:l.jsx(N.Z,{})}):s.isLoading||s.data?l.jsx("img",{src:s.data,alt:e,className:"object-cover w-full h-full"}):l.jsx("div",{children:l.jsx(m.Z,{})})}}};
|
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
"wasm": [],
|
|
18
18
|
"assets": [],
|
|
19
19
|
"env": {
|
|
20
|
-
"__NEXT_BUILD_ID": "
|
|
21
|
-
"NEXT_SERVER_ACTIONS_ENCRYPTION_KEY": "+
|
|
22
|
-
"__NEXT_PREVIEW_MODE_ID": "
|
|
23
|
-
"__NEXT_PREVIEW_MODE_ENCRYPTION_KEY": "
|
|
24
|
-
"__NEXT_PREVIEW_MODE_SIGNING_KEY": "
|
|
20
|
+
"__NEXT_BUILD_ID": "3j63p6b3zZZB_v1Hn8Mxp",
|
|
21
|
+
"NEXT_SERVER_ACTIONS_ENCRYPTION_KEY": "H48W7qNL6f/lx+L+NdGT6EVB4OWDgY3n4/YQ6fpGSUs=",
|
|
22
|
+
"__NEXT_PREVIEW_MODE_ID": "d7d0b460dfed5e7e4b5e576e0a6ee605",
|
|
23
|
+
"__NEXT_PREVIEW_MODE_ENCRYPTION_KEY": "76ae49289d48c14a7616965066656e2fad6c0ab9e727daa1ed83f060ac3dbfe0",
|
|
24
|
+
"__NEXT_PREVIEW_MODE_SIGNING_KEY": "cfc935404ee909abba4e2a0245b483bacebbc3071e6f55ba92d854e8d9c2acd0"
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-480cfeb2c2aa3f7e.js"/><script src="/_next/static/chunks/fd9d1056-f20120f69c10766e.js" async=""></script><script src="/_next/static/chunks/2117-7e0e97ffa5867cf9.js" async=""></script><script src="/_next/static/chunks/main-app-da1df2757744a2ea.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><meta name="next-size-adjust"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><script src="/_next/static/chunks/webpack-480cfeb2c2aa3f7e.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:I[12846,[],\"\"]\n3:I[4707,[],\"\"]\n4:I[36423,[],\"\"]\na:I[61060,[],\"\"]\n5:{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"}\n6:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\n7:{\"display\":\"inline-block\"}\n8:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\nb:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L1\",null,{\"buildId\":\"
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-480cfeb2c2aa3f7e.js"/><script src="/_next/static/chunks/fd9d1056-f20120f69c10766e.js" async=""></script><script src="/_next/static/chunks/2117-7e0e97ffa5867cf9.js" async=""></script><script src="/_next/static/chunks/main-app-da1df2757744a2ea.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><meta name="next-size-adjust"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><script src="/_next/static/chunks/webpack-480cfeb2c2aa3f7e.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:I[12846,[],\"\"]\n3:I[4707,[],\"\"]\n4:I[36423,[],\"\"]\na:I[61060,[],\"\"]\n5:{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"}\n6:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\n7:{\"display\":\"inline-block\"}\n8:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\nb:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L1\",null,{\"buildId\":\"3j63p6b3zZZB_v1Hn8Mxp\",\"assetPrefix\":\"\",\"urlParts\":[\"\",\"_not-found\"],\"initialTree\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},[[\"$L2\",[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null],null],null]},[null,[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[null,[\"$\",\"html\",null,{\"children\":[\"$\",\"body\",null,{\"children\":[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$5\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$6\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$7\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$8\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}]}]}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],\"$L9\"],\"globalErrorComponent\":\"$a\",\"missingSlots\":\"$Wb\"}]\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"2\",{\"name\":\"next-size-adjust\"}]]\n2:null\n"])</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>500: Internal Server Error</title><meta name="next-head-count" content="3"/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-480cfeb2c2aa3f7e.js" defer=""></script><script src="/_next/static/chunks/framework-9317b1ce0f036b87.js" defer=""></script><script src="/_next/static/chunks/main-bf608235d4e99320.js" defer=""></script><script src="/_next/static/chunks/pages/_app-9f5760457b3fbb4c.js" defer=""></script><script src="/_next/static/chunks/pages/_error-daa80f5b4d0fe27d.js" defer=""></script><script src="/_next/static/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>500: Internal Server Error</title><meta name="next-head-count" content="3"/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-480cfeb2c2aa3f7e.js" defer=""></script><script src="/_next/static/chunks/framework-9317b1ce0f036b87.js" defer=""></script><script src="/_next/static/chunks/main-bf608235d4e99320.js" defer=""></script><script src="/_next/static/chunks/pages/_app-9f5760457b3fbb4c.js" defer=""></script><script src="/_next/static/chunks/pages/_error-daa80f5b4d0fe27d.js" defer=""></script><script src="/_next/static/3j63p6b3zZZB_v1Hn8Mxp/_buildManifest.js" defer=""></script><script src="/_next/static/3j63p6b3zZZB_v1Hn8Mxp/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":500}},"page":"/_error","query":{},"buildId":"3j63p6b3zZZB_v1Hn8Mxp","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"node":{},"edge":{},"encryptionKey":"+
|
|
1
|
+
{"node":{},"edge":{},"encryptionKey":"H48W7qNL6f/lx+L+NdGT6EVB4OWDgY3n4/YQ6fpGSUs="}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3750],{53245:function(e,s,t){t.d(s,{d:function(){return x},f:function(){return h}});var n=t(57437),l=t(62869),r=t(94508),a=t(30401),i=t(78867),o=t(2265),c=t(34996),d=t(1479),u=t(9880);let m=(0,o.createContext)({code:""}),x=e=>{let{code:s,language:t,showLineNumbers:l=!1,className:a,children:i,...o}=e;return(0,n.jsx)(m.Provider,{value:{code:s},children:(0,n.jsx)("div",{className:(0,r.cn)("relative w-full overflow-hidden rounded-md border bg-background text-foreground",a),...o,children:(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsx)(c.Z,{className:"overflow-hidden dark:hidden",codeTagProps:{className:"font-mono text-sm"},customStyle:{margin:0,padding:"1rem",fontSize:"0.875rem",background:"hsl(var(--background))",color:"hsl(var(--foreground))"},language:t,lineNumberStyle:{color:"hsl(var(--muted-foreground))",paddingRight:"1rem",minWidth:"2.5rem"},showLineNumbers:l,style:d.Z,children:s}),(0,n.jsx)(c.Z,{className:"hidden overflow-hidden dark:block",codeTagProps:{className:"font-mono text-sm"},customStyle:{margin:0,padding:"1rem",fontSize:"0.875rem",background:"hsl(var(--background))",color:"hsl(var(--foreground))"},language:t,lineNumberStyle:{color:"hsl(var(--muted-foreground))",paddingRight:"1rem",minWidth:"2.5rem"},showLineNumbers:l,style:u.Z,children:s}),i&&(0,n.jsx)("div",{className:"absolute top-2 right-2 flex items-center gap-2",children:i})]})})})},h=e=>{let{onCopy:s,onError:t,timeout:c=2e3,children:d,className:u,...x}=e,[h,p]=(0,o.useState)(!1),{code:f}=(0,o.useContext)(m),g=async()=>{if(!navigator.clipboard.writeText){null==t||t(Error("Clipboard API not available"));return}try{await navigator.clipboard.writeText(f),p(!0),null==s||s(),setTimeout(()=>p(!1),c)}catch(e){null==t||t(e)}},j=h?a.Z:i.Z;return(0,n.jsx)(l.z,{className:(0,r.cn)("shrink-0",u),onClick:g,size:"icon",variant:"ghost",...x,children:null!=d?d:(0,n.jsx)(j,{size:14})})}},35629:function(e,s,t){t.d(s,{H:function(){return x}});var n=t(57437),l=t(94508),r=t(2265),a=t(86816),i=t(67245),o=t(58146),c=t(85020),d=t(53245);t(2446);let u=(0,t(86589).Z)(a.UG),m={ol:e=>{let{node:s,children:t,className:r,...a}=e;return(0,n.jsx)("ol",{className:(0,l.cn)("ml-4 list-outside list-decimal",r),...a,children:t})},li:e=>{let{node:s,children:t,className:r,...a}=e;return(0,n.jsx)("li",{className:(0,l.cn)("py-1",r),...a,children:t})},ul:e=>{let{node:s,children:t,className:r,...a}=e;return(0,n.jsx)("ul",{className:(0,l.cn)("ml-4 list-outside list-disc",r),...a,children:t})},hr:e=>{let{node:s,className:t,...r}=e;return(0,n.jsx)("hr",{className:(0,l.cn)("my-6 border-border",t),...r})},strong:e=>{let{node:s,children:t,className:r,...a}=e;return(0,n.jsx)("span",{className:(0,l.cn)("font-semibold",r),...a,children:t})},a:e=>{let{node:s,children:t,className:r,...a}=e;return(0,n.jsx)("a",{className:(0,l.cn)("font-medium text-primary underline",r),rel:"noreferrer",target:"_blank",...a,children:t})},h1:e=>{let{node:s,children:t,className:r,...a}=e;return(0,n.jsx)("h1",{className:(0,l.cn)("mt-6 mb-2 font-semibold text-3xl",r),...a,children:t})},h2:e=>{let{node:s,children:t,className:r,...a}=e;return(0,n.jsx)("h2",{className:(0,l.cn)("mt-6 mb-2 font-semibold text-2xl",r),...a,children:t})},h3:e=>{let{node:s,children:t,className:r,...a}=e;return(0,n.jsx)("h3",{className:(0,l.cn)("mt-6 mb-2 font-semibold text-xl",r),...a,children:t})},h4:e=>{let{node:s,children:t,className:r,...a}=e;return(0,n.jsx)("h4",{className:(0,l.cn)("mt-6 mb-2 font-semibold text-lg",r),...a,children:t})},h5:e=>{let{node:s,children:t,className:r,...a}=e;return(0,n.jsx)("h5",{className:(0,l.cn)("mt-6 mb-2 font-semibold text-base",r),...a,children:t})},h6:e=>{let{node:s,children:t,className:r,...a}=e;return(0,n.jsx)("h6",{className:(0,l.cn)("mt-6 mb-2 font-semibold text-sm",r),...a,children:t})},table:e=>{let{node:s,children:t,className:r,...a}=e;return(0,n.jsx)("div",{className:"my-4 overflow-x-auto",children:(0,n.jsx)("table",{className:(0,l.cn)("w-full border-collapse border border-border",r),...a,children:t})})},thead:e=>{let{node:s,children:t,className:r,...a}=e;return(0,n.jsx)("thead",{className:(0,l.cn)("bg-muted/50",r),...a,children:t})},tbody:e=>{let{node:s,children:t,className:r,...a}=e;return(0,n.jsx)("tbody",{className:(0,l.cn)("divide-y divide-border",r),...a,children:t})},tr:e=>{let{node:s,children:t,className:r,...a}=e;return(0,n.jsx)("tr",{className:(0,l.cn)("border-border border-b",r),...a,children:t})},th:e=>{let{node:s,children:t,className:r,...a}=e;return(0,n.jsx)("th",{className:(0,l.cn)("px-4 py-2 text-left font-semibold text-sm",r),...a,children:t})},td:e=>{let{node:s,children:t,className:r,...a}=e;return(0,n.jsx)("td",{className:(0,l.cn)("px-4 py-2 text-sm",r),...a,children:t})},blockquote:e=>{let{node:s,children:t,className:r,...a}=e;return(0,n.jsx)("blockquote",{className:(0,l.cn)("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",r),...a,children:t})},code:e=>{var s,t;let{node:r,className:a,...i}=e;return(null==r?void 0:null===(s=r.position)||void 0===s?void 0:s.start.line)!==(null==r?void 0:null===(t=r.position)||void 0===t?void 0:t.end.line)?(0,n.jsx)("code",{className:a,...i}):(0,n.jsx)("code",{className:(0,l.cn)("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",a),...i})},pre:e=>{var s;let{node:t,className:a,children:i}=e,o="javascript";"string"==typeof(null==t?void 0:null===(s=t.properties)||void 0===s?void 0:s.className)&&(o=t.properties.className.replace("language-",""));let c="";return(0,r.isValidElement)(i)&&i.props&&"string"==typeof i.props.children?c=i.props.children:"string"==typeof i&&(c=i),(0,n.jsx)(d.d,{className:(0,l.cn)("my-4 h-auto",a),code:c,language:o,children:(0,n.jsx)(d.f,{onCopy:()=>console.log("Copied code to clipboard"),onError:()=>console.error("Failed to copy code to clipboard")})})}},x=(0,r.memo)(e=>{let{className:s,options:t,children:r,allowedImagePrefixes:a,allowedLinkPrefixes:d,defaultOrigin:x,parseIncompleteMarkdown:h=!0,...p}=e,f="string"==typeof r&&h?function(e){if(!e||"string"!=typeof e)return e;let s=e,t=s.match(/(!?\[)([^\]]*?)$/);if(t){let e=s.lastIndexOf(t[1]);s=s.substring(0,e)}if(s.match(/(\*\*)([^*]*?)$/)&&(s.match(/\*\*/g)||[]).length%2==1&&(s="".concat(s,"**")),s.match(/(__)([^_]*?)$/)&&(s.match(/__/g)||[]).length%2==1&&(s="".concat(s,"__")),s.match(/(\*)([^*]*?)$/)&&s.split("").reduce((e,t,n)=>{if("*"===t){let t=s[n-1],l=s[n+1];if("*"!==t&&"*"!==l)return e+1}return e},0)%2==1&&(s="".concat(s,"*")),s.match(/(_)([^_]*?)$/)&&s.split("").reduce((e,t,n)=>{if("_"===t){let t=s[n-1],l=s[n+1];if("_"!==t&&"_"!==l)return e+1}return e},0)%2==1&&(s="".concat(s,"_")),s.match(/(`)([^`]*?)$/)&&(s.includes("```"),(s.match(/```[\s\S]*?```/g)||[]).length,(s.match(/```/g)||[]).length%2!=1)){let e=0;for(let t=0;t<s.length;t++)if("`"===s[t]){let n="```"===s.substring(t,t+3),l=t>0&&"```"===s.substring(t-1,t+2),r=t>1&&"```"===s.substring(t-2,t+1);!(n||l||r)&&e++}e%2==1&&(s="".concat(s,"`"))}return s.match(/(~~)([^~]*?)$/)&&(s.match(/~~/g)||[]).length%2==1&&(s="".concat(s,"~~")),s}(r):r;return(0,n.jsx)("div",{className:(0,l.cn)("size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",s),...p,children:(0,n.jsx)(u,{allowedImagePrefixes:null!=a?a:["*"],allowedLinkPrefixes:null!=d?d:["*"],components:m,defaultOrigin:x,rehypePlugins:[i.Z],remarkPlugins:[o.Z,c.Z],...t,children:f})})},(e,s)=>e.children===s.children);x.displayName="Response"},65613:function(e,s,t){t.d(s,{Cd:function(){return c},X:function(){return d},bZ:function(){return o}});var n=t(57437),l=t(90535),r=t(2265),a=t(94508);let i=(0,l.j)("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive",info:"border-info/50 text-info dark:border-info [&>svg]:text-info"}},defaultVariants:{variant:"default"}}),o=r.forwardRef((e,s)=>{let{className:t,variant:l,...r}=e;return(0,n.jsx)("div",{ref:s,role:"alert",className:(0,a.cn)(i({variant:l}),t),...r})});o.displayName="Alert";let c=r.forwardRef((e,s)=>{let{className:t,...l}=e;return(0,n.jsx)("h5",{ref:s,className:(0,a.cn)("mb-1 font-medium leading-none tracking-tight",t),...l})});c.displayName="AlertTitle";let d=r.forwardRef((e,s)=>{let{className:t,...l}=e;return(0,n.jsx)("div",{ref:s,className:(0,a.cn)("text-sm [&_p]:leading-relaxed",t),...l})});d.displayName="AlertDescription"},74928:function(e,s,t){t.d(s,{Fw:function(){return a},wy:function(){return r},zF:function(){return l}});var n=t(88985);let l=n.fC,r=n.wy,a=n.Fw},12339:function(e,s,t){t.d(s,{SP:function(){return c},dr:function(){return o},mQ:function(){return i},nU:function(){return d}});var n=t(57437),l=t(20271),r=t(2265),a=t(94508);let i=l.fC,o=r.forwardRef((e,s)=>{let{className:t,...r}=e;return(0,n.jsx)(l.aV,{ref:s,className:(0,a.cn)("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",t),...r})});o.displayName=l.aV.displayName;let c=r.forwardRef((e,s)=>{let{className:t,...r}=e;return(0,n.jsx)(l.xz,{ref:s,className:(0,a.cn)("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",t),...r})});c.displayName=l.xz.displayName;let d=r.forwardRef((e,s)=>{let{className:t,...r}=e;return(0,n.jsx)(l.VY,{ref:s,className:(0,a.cn)("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t),...r})});d.displayName=l.VY.displayName},77992:function(e,s,t){t.d(s,{Am:function(){return u},pm:function(){return m}});var n=t(2265);let l=0,r=new Map,a=e=>{if(r.has(e))return;let s=setTimeout(()=>{r.delete(e),d({type:"REMOVE_TOAST",toastId:e})},1e6);r.set(e,s)},i=(e,s)=>{switch(s.type){case"ADD_TOAST":return{...e,toasts:[s.toast,...e.toasts].slice(0,1)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(e=>e.id===s.toast.id?{...e,...s.toast}:e)};case"DISMISS_TOAST":{let{toastId:t}=s;return t?a(t):e.toasts.forEach(e=>{a(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===t||void 0===t?{...e,open:!1}:e)}}case"REMOVE_TOAST":if(void 0===s.toastId)return{...e,toasts:[]};return{...e,toasts:e.toasts.filter(e=>e.id!==s.toastId)}}},o=[],c={toasts:[]};function d(e){c=i(c,e),o.forEach(e=>{e(c)})}function u(e){let{...s}=e,t=(l=(l+1)%Number.MAX_SAFE_INTEGER).toString(),n=()=>d({type:"DISMISS_TOAST",toastId:t});return d({type:"ADD_TOAST",toast:{...s,id:t,open:!0,onOpenChange:e=>{e||n()}}}),{id:t,dismiss:n,update:e=>d({type:"UPDATE_TOAST",toast:{...e,id:t}})}}function m(){let[e,s]=n.useState(c);return n.useEffect(()=>(o.push(s),()=>{let e=o.indexOf(s);e>-1&&o.splice(e,1)}),[e]),{...e,toast:u,dismiss:e=>d({type:"DISMISS_TOAST",toastId:e})}}},78361:function(e,s,t){t.d(s,{jF:function(){return A},jU:function(){return R},ZP:function(){return L},NF:function(){return I}});var n=t(57437),l=t(2265),r=t(47632),a=t(1109);t(46693),t(51832);var i=t(6374),o=t(44045);let c=async e=>{var s;if(!e.backend)throw Error("No backend set.");let{callbacks:t,maxNumberOfFiles:n,uppyOptions:l}=e||{},{uploadSuccess:o}=t||{},{allowedFileTypes:c,id:d}=l||{},u=await (0,i.LP)(),m=new r.Z({autoProceed:!0,debug:!1,id:d||"uppy",restrictions:{maxNumberOfFiles:n||5,allowedFileTypes:c||[".heic",".jpg",".jpeg",".png",".webp",".svg"]}}).use(a.Z,{id:"Exulu",endpoint:e.backend,headers:{Authorization:"Bearer ".concat(u),Session:null!==(s=localStorage.getItem("session"))&&void 0!==s?s:""}}).on("file-added",async e=>{console.debug("added",e)}).on("upload-error",(e,s)=>{(null==e?void 0:e.id)&&(m.removeFile(null==e?void 0:e.id),console.error("error",s))}).on("upload-success",(e,s)=>{s.uploadURL&&o&&(console.log("response",s),o({file:e,key:s.uploadURL.split("/").pop()||"",url:s.uploadURL}))});return m};var d=function(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],t=(0,l.useContext)(o.E),[n,r]=(0,l.useState)(void 0);return(0,l.useEffect)(()=>((async()=>{r(await c({...e,backend:(null==t?void 0:t.backend)||""}))})(),()=>{n&&(n.destroy(),r(void 0))}),[...s]),n},u=t(80007),m=t(92735),x=t(88964),h=t(30044),p=t(92451),f=t(10407),g=t(48736),j=t(53113),v=t(69658),b=t(99397),N=t(32489),y=t(15001),w=t(62869),k=t(26110),S=t(19378),C=t(78298),Z=t(11713),_=t(21770),T=t(95186),O=t(20653),z=t(66070),E=t(93022);function A(e){let{s3key:s,children:t}=e,{data:r,isLoading:a,error:o,refetch:c}=(0,Z.a)({queryKey:["fileObject",s],queryFn:async()=>s?await i.QZ.object(s):null,enabled:null!=s});if((0,l.useEffect)(()=>{s&&c()},[s]),!s)return(0,n.jsx)(z.Zb,{children:(0,n.jsxs)(z.aY,{className:"p-3 flex",children:[(0,n.jsx)("p",{className:"text-sm text-muted-foreground m-auto",children:"No file selected"}),t]})});let d=s,u=s.split("/")[0];return d=(d=s.split("/").slice(1).join("/")).split("_EXULU_").pop()||"",(0,n.jsxs)(z.Zb,{children:[(0,n.jsx)(z.Ol,{className:"pb-3",children:(0,n.jsx)(z.ll,{className:"text-sm max-w-[500px] truncate",children:d})}),(0,n.jsxs)(z.aY,{className:"pt-0",children:[a&&(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)(E.O,{className:"h-4 w-full"}),(0,n.jsx)(E.O,{className:"h-4 w-2/3"})]}),!a&&r&&(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[(0,n.jsxs)("span",{className:"capitalize",children:[null==r?void 0:r.ContentType.split("/").pop(),u&&" Bucket: ".concat(u)]}),(0,n.jsxs)("span",{children:[((null==r?void 0:r.ContentLength)/1024/1024).toFixed(2)," MB"]})]}),(0,n.jsxs)("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[(0,n.jsxs)("span",{children:["Last modified: ",new Date(null==r?void 0:r.LastModified).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})]}),(0,n.jsxs)(w.z,{variant:"secondary",size:"sm",type:"button",className:"h-7 px-2",onClick:()=>{i.QZ.download(s).then(async e=>{console.log("res",e);let s=await e.json();console.log("res",s);let t=s.url;window.open(t,"_blank")})},children:[(0,n.jsx)("span",{className:"mr-1 text-xs",children:"View"}),(0,n.jsx)(m.Z,{className:"h-3 w-3"})]})]})]}),!a&&o&&(0,n.jsx)("p",{className:"text-xs text-muted-foreground",children:o.message}),t]})]})}function L(e){let{id:s,allowedFileTypes:t,dependencies:r,onConfirm:a,selectionLimit:i,buttonText:o}=e,[c,d]=(0,l.useState)(!1);return(0,n.jsxs)(k.Vq,{open:c,onOpenChange:d,children:[(0,n.jsx)(k.hg,{asChild:!0,children:(0,n.jsxs)(w.z,{variant:"outline",children:[o&&(0,n.jsx)("span",{className:"mr-2",children:o}),(0,n.jsx)(x.Z,{className:"h-4 w-4"})]})}),(0,n.jsxs)(k.cZ,{className:"sm:max-w-[900px]",children:[(0,n.jsxs)(k.fK,{children:[(0,n.jsx)(k.$N,{children:"File Gallery"}),(0,n.jsx)(k.Be,{children:"Browse your previously uploaded files or upload new ones."})]}),(0,n.jsx)(F,{id:s,allowedFileTypes:t,dependencies:r,selectionLimit:i,onConfirm:e=>{a(e),d(!1)}})]})]})}let F=e=>{var s,t;let{id:r,allowedFileTypes:a,dependencies:c,onConfirm:m,selectionLimit:x}=e;a||(a=[".png",".jpg",".jpeg",".gif",".webp",".pdf",".docx",".xlsx",".xls",".csv",".pptx",".ppt",".mp3",".wav",".m4a",".mp4",".mpeg",".mp4",".m4a",".mp3",".mpeg",".wav"]);let[g,j]=(0,l.useState)(void 0),[v,b]=(0,l.useState)(void 0),[N,y]=(0,l.useState)(void 0),k=(0,l.useContext)(o.E),[z,A]=(0,l.useState)([]),L=e=>{if(z.includes(e)){A(z.filter(s=>s!==e));return}if(1===x){A([e]);return}z.length>=x||A([...z,e])},F=(0,_.D)({mutationFn:async e=>{let{key:s}=e;await i.QZ.delete(s),P()}}),{data:U,isLoading:I,error:W,refetch:P}=(0,Z.a)({queryKey:["filesQuery",g,N],staleTime:3e4,queryFn:async()=>i.QZ.list({search:g,continuationToken:N})});console.log("!! data !!",U);let{theme:D}=(0,C.F)(),V=d({backend:(null==k?void 0:k.backend)||"",uppyOptions:{id:r,allowedFileTypes:a},callbacks:{uploadSuccess:async e=>{console.log("data",e)}},maxNumberOfFiles:10},c);return((0,l.useEffect)(()=>{P()},[g,N]),V)?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mt-4",children:[(0,n.jsxs)("div",{className:"border rounded-lg p-4",children:[(0,n.jsx)("h3",{className:"text-sm font-medium mb-3",children:"Previously Uploaded Files"}),(0,n.jsx)(T.I,{placeholder:"Search files...",value:g,onChange:e=>j(e.target.value),className:"mb-3"}),(0,n.jsxs)("div",{className:"flex items-center justify-between text-xs text-muted-foreground pb-2",children:[(0,n.jsxs)("span",{children:[z.length," / ",x," files selected"]}),(0,n.jsxs)("span",{children:["Allowed file types: ",null==a?void 0:a.map(e=>e).join(", ")]})]}),(0,n.jsxs)(S.x,{children:[I&&(0,n.jsxs)("div",{className:"flex items-center justify-center h-full w-full grid grid-cols-2 sm:grid-cols-3 gap-3",children:[(0,n.jsx)(E.O,{className:"h-[120px] w-full"}),(0,n.jsx)(E.O,{className:"h-[120px] w-full"}),(0,n.jsx)(E.O,{className:"h-[120px] w-full"}),(0,n.jsx)(E.O,{className:"h-[120px] w-full"}),(0,n.jsx)(E.O,{className:"h-[120px] w-full"}),(0,n.jsx)(E.O,{className:"h-[120px] w-full"}),(0,n.jsx)(E.O,{className:"h-[120px] w-full"}),(0,n.jsx)(E.O,{className:"h-[120px] w-full"}),(0,n.jsx)(E.O,{className:"h-[120px] w-full"})]}),(0,n.jsxs)("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-3",children:[!I&&!(null==U?void 0:null===(s=U.Contents)||void 0===s?void 0:s.length)&&(0,n.jsxs)("div",{className:"col-span-full flex flex-col items-center justify-center py-12 text-center",children:[(0,n.jsx)(h.Z,{className:"h-12 w-12 text-muted-foreground/50 mb-3"}),(0,n.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:"Nothing to see here... yet!"}),(0,n.jsx)("p",{className:"text-xs text-muted-foreground/75 mt-1",children:"Upload some files to get started"})]}),null==U?void 0:null===(t=U.Contents)||void 0===t?void 0:t.map(e=>(0,n.jsx)(R,{s3Key:e.Key,onSelect:L,active:z.some(s=>s===e.Key),onRemove:()=>{F.mutate({key:e.Key})},disabled:!!a&&!(null==a?void 0:a.some(s=>e.Key.endsWith(s)))}))]}),(0,n.jsx)("div",{className:"flex items-center space-x-6 lg:space-x-8 pt-3",children:(0,n.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,n.jsxs)(w.z,{variant:"outline",className:"hidden size-8 p-0 lg:flex",onClick:()=>{y(void 0)},disabled:!N||I,children:[(0,n.jsx)("span",{className:"sr-only",children:"Go to first page"}),(0,n.jsx)(O.kRt,{className:"size-4"})]}),(0,n.jsxs)(w.z,{variant:"outline",className:"size-8 p-0",onClick:()=>{y(v)},disabled:!N||I,children:[(0,n.jsx)("span",{className:"sr-only",children:"Go to previous page"}),(0,n.jsx)(p.Z,{className:"size-4"})]}),(0,n.jsxs)(w.z,{variant:"outline",className:"size-8 p-0",onClick:()=>{b(N),y(null==U?void 0:U.NextContinuationToken)},disabled:!(null==U?void 0:U.NextContinuationToken)||I,children:[(0,n.jsx)("span",{className:"sr-only",children:"Go to next page"}),(0,n.jsx)(f.Z,{className:"size-4"})]})]})})]})]}),(0,n.jsxs)("div",{className:"border rounded-lg p-4",children:[(0,n.jsx)("h3",{className:"text-sm font-medium mb-3",children:"Upload New Files"}),(0,n.jsx)(u.A,{uppy:V,theme:"dark"===D?"dark":"light"})]})]}),(0,n.jsx)("div",{className:"flex justify-end",children:(0,n.jsx)(w.z,{variant:"outline",onClick:()=>{m(z),A([])},children:"Confirm"})})]}):null},R=e=>{let{s3Key:s,onSelect:t,onRemove:l,active:r,disabled:a,addToContext:o}=e;return(0,n.jsxs)("div",{className:"".concat(a?"opacity-50":""," group relative rounded-lg p-2 hover:bg-muted transition-colors cursor-pointer ").concat(r?"border border-purple-500":"border"),onClick:()=>{!a&&t&&t(s)},children:[(0,n.jsx)("div",{className:"aspect-square relative mb-2 bg-muted/50 rounded-md overflow-hidden flex items-center justify-center",children:s&&(s.toLowerCase().endsWith("jpg")||s.toLowerCase().endsWith("jpeg")||s.toLowerCase().endsWith("png")||s.toLowerCase().endsWith("svg"))?(0,n.jsx)(W,{fileKey:s}):(0,n.jsxs)("div",{className:"flex flex-col items-center justify-center h-full",children:[s?s.toLowerCase().endsWith("jpg")||s.toLowerCase().endsWith("jpeg")||s.toLowerCase().endsWith("png")||s.toLowerCase().endsWith("svg")?(0,n.jsx)(j.Z,{className:"h-6 w-6 text-blue-500"}):s.endsWith("pdf")?(0,n.jsx)(v.Z,{className:"h-6 w-6 text-red-500"}):s.endsWith("xls")||s.endsWith("xlsx")||s.endsWith("csv")?(0,n.jsx)(g.Z,{className:"h-6 w-6 text-green-500"}):s.endsWith("ppt")||s.endsWith("pptx")?(0,n.jsx)(g.Z,{className:"h-6 w-6 text-orange-500"}):(0,n.jsx)(g.Z,{className:"h-6 w-6 text-gray-500"}):(0,n.jsx)(g.Z,{className:"h-6 w-6 text-gray-500"}),(0,n.jsx)("span",{className:"text-xs text-muted-foreground mt-1 text-center",children:s?s.split("_EXULU_").pop():s})]})}),(0,n.jsx)("p",{className:"text-xs truncate",children:s?s.split("_EXULU_").pop():s}),(0,n.jsxs)("div",{className:"opacity-0 group-hover:opacity-100 flex absolute top-1 right-1",children:[o&&(0,n.jsxs)(w.z,{variant:"ghost",size:"icon",type:"button",className:"h-6 w-6 bg-background/80 hover:bg-background",onClick:()=>{o(s)},children:[(0,n.jsx)(b.Z,{className:"h-3 w-3"}),(0,n.jsx)("span",{className:"sr-only",children:"Add"})]}),(0,n.jsxs)(w.z,{variant:"ghost",size:"icon",type:"button",className:"h-6 w-6 bg-background/80 hover:bg-background",onClick:()=>{i.QZ.download(s).then(async e=>{console.log("res",e);let s=await e.json();console.log("res",s);let t=s.url;window.open(t,"_blank")})},children:[(0,n.jsx)(m.Z,{className:"h-3 w-3"}),(0,n.jsx)("span",{className:"sr-only",children:"View"})]}),l&&(0,n.jsxs)(w.z,{onClick:e=>{e.stopPropagation(),l(s)},variant:"ghost",type:"button",size:"icon",className:"h-6 w-6 opacity-0 group-hover:opacity-100 bg-background/80 hover:bg-background ml-1",children:[(0,n.jsx)(N.Z,{className:"h-3 w-3"}),(0,n.jsx)("span",{className:"sr-only",children:"Remove"})]})]})]},s)},U={},I=async e=>{if(U[e]){if(!(U[e].expiresAt<Date.now()))return U[e].url;delete U[e]}let s=await i.QZ.download(e),t=await s.json();return console.log("json",t),U[e]={url:t.url,expiresAt:Date.now()+6e4},t.url},W=e=>{let{fileKey:s}=e;console.log("key",s);let t=(0,Z.a)({queryKey:["imageQuery",s],staleTime:3e4,queryFn:async()=>I(s)});return t.isLoading?(0,n.jsx)("div",{children:(0,n.jsx)(y.Z,{})}):t.isLoading||t.data?(0,n.jsx)("img",{src:t.data,alt:s,className:"object-cover w-full h-full"}):(0,n.jsx)("div",{children:(0,n.jsx)(h.Z,{})})}}}]);
|
|
2
|
+
//# sourceMappingURL=3750-e3d1b2cccd265190.js.map
|