@abtnode/blocklet-services 1.16.38-beta-20250127-040231-5b436d9b → 1.16.38-beta-20250204-120121-1a6a1e63
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/assets/add-component-core-DZPE4BRe.js +1 -1
- package/dist/assets/add-resource-CYNZTaOG.js +1 -1
- package/dist/assets/analytics-0lVXNyXs.js +1 -1
- package/dist/assets/complete-CPnz5QUF.js +1 -1
- package/dist/assets/component-Srk2_SVH.js +1 -1
- package/dist/assets/config-navigation-a3GJWM1m.js +1 -1
- package/dist/assets/connect-BZUv1d-6.js +1 -1
- package/dist/assets/dashboard-B_hsqmQK.js +2 -2
- package/dist/assets/email-5azpRba_.js +1 -1
- package/dist/assets/exchange-passport-Cus1rYsJ.js +1 -1
- package/dist/assets/index-6oQLUjq6.js +1 -1
- package/dist/assets/index-BWKYj-2X.js +1 -1
- package/dist/assets/index-CXVY5UoP.js +1 -1
- package/dist/assets/index-DpNGP1ih.js +1 -1
- package/dist/assets/index-fel1gHRy.js +1 -1
- package/dist/assets/index-kk2gduJr.js +1 -1
- package/dist/assets/index-uosYiNLl.js +1 -1
- package/dist/assets/invite-DmpCzOPN.js +1 -1
- package/dist/assets/issue-passport--83QQUn2.js +1 -1
- package/dist/assets/item-7Z8_UB5K.js +1 -1
- package/dist/assets/login-DWrSz67b.js +1 -1
- package/dist/assets/lost-passport-DFh2B6Gl.js +1 -1
- package/dist/assets/open-window-BvyLumiN.js +1 -1
- package/dist/assets/overview-DNQZ-tgj.js +1 -1
- package/dist/assets/publish-resource-B_OOg2Om.js +1 -1
- package/dist/assets/setup-lHrzljce.js +2 -2
- package/dist/assets/start-DNIWxyMi.js +1 -1
- package/package.json +21 -21
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as E,g as Ir,a as he,u as Ro}from"./vendor-react-D-afvo_7.js";import{a1 as U,j as e,E as D,aa as ht,P as To,bZ as tn,bL as So,M as G,a3 as P,A as la,I as de,a2 as Ke,bM as ca,T as mt,aN as J,bJ as ft,br as Oo,ad as wo,ah as Kt,bN as Me,aO as Pe,bD as Z,x as fe,ac as Le,b_ as Io,e as gt,Z as ua,a4 as le,K as ko,b$ as qo,c0 as Lo,c1 as Do,c2 as ge,bS as Re,c3 as da,c4 as kr,c5 as qr,c6 as Ao,c7 as fa,c8 as Mo,c9 as Eo,aw as qe,ca as Bo,cb as $o,cc as Wo,cd as No,ce as Ho,cf as Fo,cg as zo,ch as Uo,ci as Vo,cj as Ko,ck as Go,cl as tr,am as Yo,C as Zo,ao as Jo,bx as pa,by as ma}from"./vendor-mui-core-CCMNKHtm.js";import{I as Xo}from"./iframe-Cn--d9nR.js";import{G as Be,w as Qo,x as Gt,Z as ei,c as rn,A as pt,n as me,an as ti,y as ri,N as rr,ao as ni,ap as nn,L as ha,F as Ee,K as ga}from"./vendor-utils-5TjOM6td.js";import{_ as vt,aE as an,e as ie,a1 as ee,j as z,b as Q,Y as va,an as ai,a5 as Ge,a0 as Te,bf as xt,aq as xa,af as Lr,bk as oi,bl as ii,am as Xt,ax as te,bm as si,bn as li,bo as ci,bp as ui,bq as di,a8 as on,aV as fi,br as Pr,bs as pi,bt as mi,aR as nr,X as hi,bu as Rr,aS as sn}from"./vendor-arcblock-Bf7AGBSd.js";import{a as je,u as k,d as $e,c as gi,n as Yt,k as ya}from"./vendor-hooks-BKxTDk_P.js";import{A as ba,d as ln}from"./config-kJZsVZD6.js";import{F as ja,d as vi}from"./form-text-input-Cf1j6PeI.js";import{d as cn}from"./ChevronRight-DORpkdoL.js";import{y as oe,B as ue,au as xi,f as _a,av as yi,m as bi,h as ae,L as ji,M as _i}from"./index-uosYiNLl.js";import{B as Ci}from"./bundle-avatar-TEUPlhi2.js";import{u as Pi,B as Ri}from"./index-CSkA6M4K.js";import{d as Ti}from"./Loop-gZ2g1v3i.js";import{d as Si}from"./Done-Bsd0QwkQ.js";import{F as Oi,R as wi,L as et}from"./logo-uploader-DZm2nb0s.js";import{w as Ca,P as Ii}from"./permission-B0xKCybj.js";import{C as Dr}from"./confirm-D7n9Rzfx.js";import{f as Ar}from"./format-error-C0Ke3VXF.js";import{_ as ki}from"./useSetState-Crt4S51m.js";import{u as qi}from"./session-DutPZhUI.js";import{C as Li}from"./click-to-copy-Ck4RKrL7.js";import{u as Mr,a as Di}from"./dashboard-B_hsqmQK.js";import{u as Ie,C as H,a as un,S as cr}from"./simple-select-CAyDBkK6.js";import{a as Pa,b as Ai,c as Mi,m as Ei,i as dn}from"./isEmail-BWNRBSAy.js";import{S as ar}from"./switch-control-B8wYzo2_.js";import{K as Bi}from"./keyboard-arrow-down-rounded-DadBVmpO.js";import{d as fn}from"./Add-0_yO_NcD.js";import{I as $i}from"./index-DTzPwoh8.js";import{b as Wi}from"./base32-Bl4ek2bl.js";import"./EditIcon-D6Lk4OxD.js";import"./ArrowDropDown-CSe7vdhu.js";import"./index-DoZ2YM4T.js";import"./useLocalStorage-tmIJr51I.js";import"./PlayArrow-C6dXJHO6.js";import"./get-safe-url-
|
|
1
|
+
import{r as E,g as Ir,a as he,u as Ro}from"./vendor-react-D-afvo_7.js";import{a1 as U,j as e,E as D,aa as ht,P as To,bZ as tn,bL as So,M as G,a3 as P,A as la,I as de,a2 as Ke,bM as ca,T as mt,aN as J,bJ as ft,br as Oo,ad as wo,ah as Kt,bN as Me,aO as Pe,bD as Z,x as fe,ac as Le,b_ as Io,e as gt,Z as ua,a4 as le,K as ko,b$ as qo,c0 as Lo,c1 as Do,c2 as ge,bS as Re,c3 as da,c4 as kr,c5 as qr,c6 as Ao,c7 as fa,c8 as Mo,c9 as Eo,aw as qe,ca as Bo,cb as $o,cc as Wo,cd as No,ce as Ho,cf as Fo,cg as zo,ch as Uo,ci as Vo,cj as Ko,ck as Go,cl as tr,am as Yo,C as Zo,ao as Jo,bx as pa,by as ma}from"./vendor-mui-core-CCMNKHtm.js";import{I as Xo}from"./iframe-Cn--d9nR.js";import{G as Be,w as Qo,x as Gt,Z as ei,c as rn,A as pt,n as me,an as ti,y as ri,N as rr,ao as ni,ap as nn,L as ha,F as Ee,K as ga}from"./vendor-utils-5TjOM6td.js";import{_ as vt,aE as an,e as ie,a1 as ee,j as z,b as Q,Y as va,an as ai,a5 as Ge,a0 as Te,bf as xt,aq as xa,af as Lr,bk as oi,bl as ii,am as Xt,ax as te,bm as si,bn as li,bo as ci,bp as ui,bq as di,a8 as on,aV as fi,br as Pr,bs as pi,bt as mi,aR as nr,X as hi,bu as Rr,aS as sn}from"./vendor-arcblock-Bf7AGBSd.js";import{a as je,u as k,d as $e,c as gi,n as Yt,k as ya}from"./vendor-hooks-BKxTDk_P.js";import{A as ba,d as ln}from"./config-kJZsVZD6.js";import{F as ja,d as vi}from"./form-text-input-Cf1j6PeI.js";import{d as cn}from"./ChevronRight-DORpkdoL.js";import{y as oe,B as ue,au as xi,f as _a,av as yi,m as bi,h as ae,L as ji,M as _i}from"./index-uosYiNLl.js";import{B as Ci}from"./bundle-avatar-TEUPlhi2.js";import{u as Pi,B as Ri}from"./index-CSkA6M4K.js";import{d as Ti}from"./Loop-gZ2g1v3i.js";import{d as Si}from"./Done-Bsd0QwkQ.js";import{F as Oi,R as wi,L as et}from"./logo-uploader-DZm2nb0s.js";import{w as Ca,P as Ii}from"./permission-B0xKCybj.js";import{C as Dr}from"./confirm-D7n9Rzfx.js";import{f as Ar}from"./format-error-C0Ke3VXF.js";import{_ as ki}from"./useSetState-Crt4S51m.js";import{u as qi}from"./session-DutPZhUI.js";import{C as Li}from"./click-to-copy-Ck4RKrL7.js";import{u as Mr,a as Di}from"./dashboard-B_hsqmQK.js";import{u as Ie,C as H,a as un,S as cr}from"./simple-select-CAyDBkK6.js";import{a as Pa,b as Ai,c as Mi,m as Ei,i as dn}from"./isEmail-BWNRBSAy.js";import{S as ar}from"./switch-control-B8wYzo2_.js";import{K as Bi}from"./keyboard-arrow-down-rounded-DadBVmpO.js";import{d as fn}from"./Add-0_yO_NcD.js";import{I as $i}from"./index-DTzPwoh8.js";import{b as Wi}from"./base32-Bl4ek2bl.js";import"./EditIcon-D6Lk4OxD.js";import"./ArrowDropDown-CSe7vdhu.js";import"./index-DoZ2YM4T.js";import"./useLocalStorage-tmIJr51I.js";import"./PlayArrow-C6dXJHO6.js";import"./get-safe-url-BF9qL1PD.js";import"./useAsyncRetry-EMRT9Ldq.js";import"./useAsync-Ua5iss51.js";var Er={},Ni=U;Object.defineProperty(Er,"__esModule",{value:!0});var Ra=Er.default=void 0,Hi=Ni(vt()),Fi=e;Ra=Er.default=(0,Hi.default)((0,Fi.jsx)("path",{d:"M3 18c0 .55.45 1 1 1h5v-2H4c-.55 0-1 .45-1 1M3 6c0 .55.45 1 1 1h9V5H4c-.55 0-1 .45-1 1m10 14v-1h7c.55 0 1-.45 1-1s-.45-1-1-1h-7v-1c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1s1-.45 1-1M7 10v1H4c-.55 0-1 .45-1 1s.45 1 1 1h3v1c0 .55.45 1 1 1s1-.45 1-1v-4c0-.55-.45-1-1-1s-1 .45-1 1m14 2c0-.55-.45-1-1-1h-9v2h9c.55 0 1-.45 1-1m-5-3c.55 0 1-.45 1-1V7h3c.55 0 1-.45 1-1s-.45-1-1-1h-3V4c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1"}),"TuneRounded");var Br={},zi=U;Object.defineProperty(Br,"__esModule",{value:!0});var Ta=Br.default=void 0,Ui=zi(vt()),Vi=e;Ta=Br.default=(0,Ui.default)((0,Vi.jsx)("path",{d:"M21 10h-8.35C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H13l2 2 2-2 2 2 4-4.04zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3"}),"Key");var $r={},Ki=U;Object.defineProperty($r,"__esModule",{value:!0});var Sa=$r.default=void 0,Gi=Ki(vt()),Yi=e;Sa=$r.default=(0,Gi.default)((0,Yi.jsx)("path",{d:"M11 7 9.6 8.4l2.6 2.6H2v2h10.2l-2.6 2.6L11 17l5-5zm9 12h-8v2h8c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-8v2h8z"}),"Login");var Wr={},Zi=U;Object.defineProperty(Wr,"__esModule",{value:!0});var Oa=Wr.default=void 0,Ji=Zi(vt()),Xi=e;Oa=Wr.default=(0,Ji.default)((0,Xi.jsx)("path",{d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2m6-6v-5c0-3.07-1.63-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.64 5.36 6 7.92 6 11v5l-2 2v1h16v-1zm-2 1H8v-6c0-2.48 1.51-4.5 4-4.5s4 2.02 4 4.5z"}),"NotificationsNone");const Qi={width:24,height:24,body:'<path fill="currentColor" d="M4.975 15q-.425 0-.7-.288T4 14q0-.425.288-.713T5 13h14.025q.425 0 .7.288T20 14q0 .425-.288.713T19 15H4.975Zm0 4q-.425 0-.7-.288T4 18q0-.425.288-.713T5 17h14.025q.425 0 .7.288T20 18q0 .425-.288.713T19 19H4.975Zm0-8q-.425 0-.7-.288T4 10q0-.425.288-.713T5 9h14.025q.425 0 .7.288T20 10q0 .425-.288.713T19 11H4.975Zm0-4q-.425 0-.7-.288T4 6q0-.425.288-.713T5 5h14.025q.425 0 .7.288T20 6q0 .425-.288.713T19 7H4.975Z"/>'},es=Qi;function Nr({label:t,disabled:l,required:r,initialValue:o,onChange:u,style:i,onSubmit:m,triggers:n,options:a,formatterBeforeSubmit:s,helperText:d,placeholder:C,renderImage:y,renderLabel:j,filterKeys:S,noEmpty:O,...I}){const[T,c]=E.useState(!1),[p,v]=E.useState(!1),[f,b]=E.useState(""),_=E.useRef(null),[x,g]=E.useState(o),[h,R]=E.useState(x),q=E.useMemo(()=>{if(!a)return{};const L={};return a.forEach($=>{L[$.code]=$}),L},[a]),M=()=>{if(!a)return[];if(!f)return a.map($=>$.code);const L=new RegExp(f.toLowerCase());return a.filter($=>{var V;for(let Y=0;Y<S.length;Y++){const re=S[Y];if(L.test((V=$[re])==null?void 0:V.toLowerCase()))return!0}return!1}).map($=>$.code)},W=async()=>{v(!0);try{await m(typeof s=="function"?s(h):h)===!1?R(x):O&&!h.length?(R(o),g(o)):(R(h),g(h))}catch{R(x)}finally{v(!1),c(!1)}},A=(L,$)=>{if(!Array.isArray($)){R([]),u([]);return}const V=$.filter(Y=>q[Y]);if(!V.length){R([]),u([]);return}R(V),u(V)},w=L=>{L.stopPropagation(),c(!0),setTimeout(()=>{if(_.current){const $=_.current.querySelector("input");$&&$.focus()}},500)},B=T?e.jsx(So,{ref:_,options:a,value:h,onChange:A,inputValue:f,onInputChange:(L,$)=>{b($)},PopperComponent:rs,fullWidth:!0,multiple:!0,variant:"outlined",margin:"dense",filterOptions:M,getOptionLabel:L=>{var $;return($=q[L])==null?void 0:$.name},renderInput:L=>e.jsx(G,{...L,label:"",placeholder:C}),renderOption:(L,$)=>{var Y;const V=h.indexOf($)!==-1;return E.createElement(ts,{component:"li",...L,key:$},y(q[$]||{}),e.jsx(P,{sx:{"& > img":{mr:2,flexShrink:0}},style:{flex:1,fontWeight:V?"700":"normal"},children:j($,q[$])||((Y=q[$])==null?void 0:Y.name)}),e.jsx(P,{component:an,sx:{opacity:.5,width:18,height:18},style:{visibility:V?"visible":"hidden"}}))},...I}):e.jsx(P,{px:1,className:"form-item-input slot",onClick:w,style:{whiteSpace:"pre-wrap",cursor:"text"},children:h.filter(L=>a.some($=>$.code===L)).map(L=>e.jsx(la,{label:a.find($=>$.code===L).name,style:{marginRight:8},size:"small"},L))});return e.jsx(Oi,{className:"form",style:i,children:e.jsxs(P,{className:"form-item",children:[e.jsxs(P,{className:"form-item-label",children:[t,r&&e.jsx(wi,{})]}),e.jsxs(P,{className:"form-item-body",children:[e.jsx(P,{className:"form-item-input",children:B}),e.jsx(P,{className:"form-item-action",children:T?e.jsxs(e.Fragment,{children:[e.jsx(de,{"data-cy":"schema-form-item-confirm",onClick:W,disabled:l||p,size:"large",children:p?e.jsx(Ke,{size:24}):e.jsx(Si,{})}),e.jsx(de,{"data-cy":"schema-form-item-cancel",onClick:()=>{R(x),c(!1)},disabled:l||p,size:"large",children:e.jsx(an,{})})]}):null})]}),T&&d&&e.jsx(ca,{children:d})]})})}Nr.propTypes={style:D.object,onSubmit:D.func,onChange:D.func,label:D.string,initialValue:D.string,required:D.bool,disabled:D.bool,triggers:D.array,options:D.array,helperText:D.string,formatterBeforeSubmit:D.func,placeholder:D.string,renderImage:D.func,filterKeys:D.arrayOf(D.string),noEmpty:D.bool,renderLabel:D.func};Nr.defaultProps={style:{},onSubmit:()=>{},onChange:()=>{},label:"",initialValue:"",required:!1,disabled:!1,triggers:[],options:[],helperText:"",formatterBeforeSubmit:t=>t.join(","),placeholder:"",filterKeys:["name"],renderImage:()=>null,renderLabel:(t,l)=>"",noEmpty:!1};const ts=ht.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
justify-content: space-between;
|
|
4
4
|
align-items: center;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-BDfZ8xEV.js","assets/vendor-arcblock-Bf7AGBSd.js","assets/vendor-react-D-afvo_7.js","assets/vendor-utils-5TjOM6td.js","assets/vendor-mui-core-CCMNKHtm.js","assets/vendor-hooks-BKxTDk_P.js","assets/vendor-arcblock-DhgPdlEj.css","assets/index-C2fPoxDR.js","assets/index-uosYiNLl.js","assets/index-DoZ2YM4T.js","assets/index-AgKpYdvC.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{r as R,k as Dt,l as lt,L as le,f as Hn,h as Gn,i as pt}from"./vendor-react-D-afvo_7.js";import{a1 as me,j as t,t as ze,a3 as u,aM as Wo,E as d,a4 as ue,I as oe,T as E,bT as Uo,aa as ae,aE as Xn,bJ as Ge,ad as Fo,aN as Xe,bq as jt,x as Q,a2 as et,P as Ho,G as Go,v as Tt,$ as Xo,ar as Jo,al as pe,ah as Jn,D as _t,ab as Qo,r as Yo,bG as Qn,K as Be,y as Zo,M as Y,ac as ke,aL as Yn,L as Zn,z as Kn,bn as es,aA as Ko,az as tt,bt as ts,bu as os,bU as ns,bV as ss,aP as en,bD as rs,bM as is,bx as ls,by as ft}from"./vendor-mui-core-CCMNKHtm.js";import{y as be,B as De,h as re,a5 as cs,f as mo,_ as tn,ad as bo}from"./index-uosYiNLl.js";import{_ as xe,b as H,e as J,a1 as ot,aa as on,aQ as nn,a8 as sn,Y as as,aR as Pt,j as V,n as ds,aS as us,aT as ps,X as fs,ax as se,aU as hs,ah as ms,aI as Se,a5 as Lt,aV as ye,ap as bs,af as xs}from"./vendor-arcblock-Bf7AGBSd.js";import{d as qt}from"./Add-0_yO_NcD.js";import{d as gs}from"./Error-CmnuwZkD.js";import{C as $t}from"./confirm-D7n9Rzfx.js";import{u as ct}from"./session-DutPZhUI.js";import{W as xo}from"./did-address-CLeqbWiu.js";import{E as Ve,D as go,C as jo,P as ko}from"./react-beautiful-dnd.esm-DY38RjFx.js";import{B as Nt}from"./bundle-avatar-TEUPlhi2.js";import{S as fe}from"./shorten-label-CYJeMT7h.js";import{T as js,x as ce,G as At,C as Je}from"./vendor-utils-5TjOM6td.js";import{d as ks}from"./Download-BF8ec3kS.js";import{d as ys}from"./QuestionMarkCircle-SCPzvU7T.js";import{u as vs}from"./vendor-hooks-BKxTDk_P.js";import{_ as Ce}from"./useSetState-Crt4S51m.js";import{c as Et}from"./index-DoZ2YM4T.js";import{E as Mt}from"./index-DE_r-gh_.js";import{p as nt}from"./index-DpOEjWGx.js";import"./api-K65cLqol.js";import{d as ws}from"./ChevronRight-DORpkdoL.js";import{T as Cs,a as Ss}from"./vendor-mui-x-DmPVvZFJ.js";import{d as yo}from"./DeleteOutline-BaOxCgo3.js";import{c as Rs,A as rn,u as Is,S as Ds,U as Ts,a as ht,b as ln,n as _s,e as Ps,f as vo,g as Ls}from"./item-7Z8_UB5K.js";import{d as qs}from"./ArrowDropDown-CSe7vdhu.js";import{f as Re}from"./format-error-C0Ke3VXF.js";import{C as $s}from"./click-to-copy-Ck4RKrL7.js";import{d as Ns}from"./Launch-DNY7Ut_B.js";import{M as As}from"./index-BvLMNAG0.js";import{r as Es}from"./index-C0uUrAqS.js";import{d as Ms}from"./Done-Bsd0QwkQ.js";import"./raf-schd.esm-Cxhj8umC.js";import"./get-safe-url-BsKINLVF.js";var Ot={},Os=me;Object.defineProperty(Ot,"__esModule",{value:!0});var cn=Ot.default=void 0,zs=Os(xe()),Bs=t;cn=Ot.default=(0,zs.default)((0,Bs.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-2 10h-4v4h-2v-4H7v-2h4V7h2v4h4z"}),"AddBox");var zt={},Vs=me;Object.defineProperty(zt,"__esModule",{value:!0});var an=zt.default=void 0,Ws=Vs(xe()),Us=t;an=zt.default=(0,Ws.default)((0,Us.jsx)("path",{d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H15v-8h5V8zm-1 7V3.5L18.5 9zm4 12.66V16h5.66v2h-2.24l2.95 2.95-1.41 1.41L19 19.41v2.24h-2z"}),"FileOpen");var Bt={},Fs=me;Object.defineProperty(Bt,"__esModule",{value:!0});var dn=Bt.default=void 0,Hs=Fs(xe()),Gs=t;dn=Bt.default=(0,Hs.default)((0,Gs.jsx)("path",{d:"M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"}),"HelpOutlineOutlined");function Vt({did:e,projectId:o,title:n,logo:r,describe:s}){const i=`${`${H.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${e}/${o}/logo/upload`}/${r}`,[a,c]=R.useState(!1),f=ze(h=>h.breakpoints.down("md"));return t.jsxs(u,{sx:{display:"flex",flexDirection:"row",color:a?"primary.main":"grey.900",gap:1},onPointerEnter:()=>c(!0),onPointerLeave:()=>c(!1),children:[t.jsx(Wo,{sx:{borderRadius:1},src:i}),t.jsxs(u,{children:[t.jsx(fe,{hiddenTip:!0,maxLength:"24",sx:{fontSize:"14px",fontWeight:"500",color:f?"primary.main":""},children:n||"/"}),t.jsx(fe,{hiddenTip:!0,maxLength:"58",sx:{fontSize:"12px",color:f||a?"primary.main":"grey.700"},children:s||"/"})]})]})}Vt.propTypes={projectId:d.string.isRequired,did:d.string.isRequired,title:d.string.isRequired,logo:d.string.isRequired,describe:d.string.isRequired};function Wt({initUrl:e}){const o=Dt(),n=(e==null?void 0:e.searchParams.get("tenantScope"))||"",{t:r,locale:s}=J(),{api:l}=be(),{api:i}=ct(),[a,c]=R.useState(!0),{blocklet:f}=De(),[h,x]=R.useState(null),[b,p]=R.useState(!1),v=ze(g=>g.breakpoints.down("xl")),{componentDid:C=""}=lt(),[D,j]=R.useState(null),m=()=>{l.getProjects({input:{did:f.meta.did,componentDid:C,tenantScope:n}}).then(g=>{const P=(g==null?void 0:g.projects)||[];c(!1),j(P)}).catch(g=>{c(!1),V.error(g.message)})},T=()=>{o(`${H.UNOWNED_DID}/create/none`,{replace:!0})},L=g=>{x(g)},I=()=>{c(!1),p(!0)},y=()=>{p(!1),x(null)},_=g=>{V.error(g.message),p(!1),x(null)},A=g=>{if(!(g!=null&&g.deleted)){V.error("Delete project failed");return}m(),p(!1),x(null)},W=(g,P,O)=>{let F=g==null?void 0:g.trim();return F?(F=ds.toAddress(F).toLocaleLowerCase(),O.some((w,$)=>{const q=P[$];return q&&w.searchable&&w.display!=="excluded"&&w.display!=="false"&&q.toLocaleLowerCase().includes(F)})):!0};if(R.useEffect(()=>{m()},[]),!D&&a)return t.jsx(u,{sx:{display:"flex",justifyContent:"center",alignItems:"center",marginTop:"40px"},children:t.jsx(Ve,{})});if(!D)return null;if(!D.length)return t.jsxs(u,{display:"flex",flexDirection:"column",alignItems:"center",pt:10,children:[t.jsx(u,{sx:{fontSize:20,fontWeight:"bold",mb:3},children:r("blocklet.publish.blockletEmptyTip")}),t.jsx(u,{sx:{fontSize:14,color:"text.secondary",mb:3},children:r("blocklet.publish.createBlockletTip")}),t.jsx(ot,{onClick:T,variant:"contained",children:r("blocklet.publish.createBlocklet")})]});const k=[{label:"Blocklet",name:"blockletTitle",minWidth:160,options:{customBodyRenderLite:g=>{const P=D[g];return t.jsx(le,{to:`${P.id}`,children:t.jsx(Vt,{did:f.meta.did,projectId:P.id,logo:P.blockletLogo,title:P.blockletTitle,describe:P.blockletDescription})})}}},{label:"Version",name:"blockletVersion",options:{searchable:!1,customBodyRender:g=>g?t.jsx(on,{type:"success",children:g}):""}},{label:"DID",name:"blockletDid",options:{customBodyRender:g=>g?t.jsx(xo,{size:14,compact:!0,responsive:!1,did:g}):null}},v||C?null:{label:r("common.createdBy"),name:"createdBy",options:{customBodyRender:g=>g?t.jsx(xo,{onClick:()=>{o(`/.well-known/service/admin/members?did=${g}`)},style:{cursor:"pointer"},size:14,compact:!0,copyable:!1,showQrcode:!1,responsive:!1,did:g}):null}},v||C?null:{label:r("common.scope"),name:"componentDid",options:{customBodyRender:g=>{const P=(f.children||[]).find(O=>O.meta.did===g);return P?t.jsxs(u,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[t.jsx(Nt,{size:14,blocklet:P,ancestors:[f]}),t.jsx(u,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:P.meta.title})]},g):""}}},v||n?null:{label:r("blocklet.publish.tenantScope"),name:"tenantScope",options:{customBodyRender:g=>t.jsx(u,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:t.jsx(fe,{children:g})})}},{label:r("common.updatedAt"),name:"updatedAt",options:{searchable:!1,customBodyRender:g=>t.jsx(nn,{value:Number(g),locale:s})}},{label:r("common.actions"),name:"actions",options:{searchable:!1,customBodyRenderLite:g=>{const P=D[g];return t.jsxs(u,{display:"flex",children:[t.jsx(le,{to:`${P.id}/new-release/${P.lastReleaseId}`,children:t.jsx(ue,{title:r("blocklet.publish.createRelease"),placement:"top",children:t.jsx(oe,{color:"primary","aria-label":"create",children:t.jsx(cn,{style:{fontSize:18}})})})}),!!P.lastReleaseId&&t.jsx(ue,{title:r("blocklet.publish.viewLastRelease",{name:P.blockletTitle}),placement:"top",children:t.jsx(oe,{color:"secondary","aria-label":"create",children:t.jsx(le,{style:{display:"flex"},to:`${P.id}/view/${P.lastReleaseId}`,children:t.jsx(an,{sx:{fontSize:18}})})})}),t.jsx(ue,{title:r("blocklet.publish.delete",{name:P.blockletTitle}),placement:"top",children:t.jsx(oe,{color:"primary","aria-label":"delete",onClick:()=>L(P),children:t.jsx(sn,{sx:{fontSize:18}})})})]})}}}].filter(Boolean),S=b?t.jsx(as,{open:!0,popup:!0,onClose:y,action:"check-has-project-id",locale:s,checkFn:i.get,saveConnect:!1,forceConnected:!1,checkTimeout:5*60*1e3,onSuccess:A,onError:_,extraParams:{projectId:h.id,did:f.meta.did,name:h.blockletTitle},messages:{title:r("blocklet.publish.deleteProject.title",{name:h.blockletTitle}),scan:r("blocklet.publish.deleteProject.scan",{name:h.blockletTitle}),confirm:r("blocklet.publish.deleteProject.confirm"),success:r("blocklet.publish.deleteProject.success")}}):null;return t.jsxs(u,{children:[t.jsxs(u,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[t.jsxs(u,{display:"flex",flexDirection:"row",alignItems:"center",children:[t.jsx(u,{sx:{fontSize:"1.2rem",fontWeight:"bold"},children:r("common.blockletStudio")}),t.jsx(ue,{title:r("blocklet.publish.createBlockletTip"),arrow:!0,placement:"right",children:t.jsx(dn,{sx:{opacity:.6,fontSize:"1.1em",ml:1}})})]}),t.jsxs(ot,{onClick:T,variant:"contained",children:[t.jsx(qt,{style:{fontSize:"1.3em",marginRight:4}}),r("blocklet.publish.createBlocklet")]})]}),t.jsx(Pt,{className:"main-table",locale:s,data:D,columns:k,options:{sort:!1,download:!1,filter:!1,print:!1,search:!0,viewColumns:!1,searchAlwaysOpen:!0,rowsPerPageOptions:[10,20,50,100],searchPlaceholder:r("blocklet.list.searchPlaceholder"),searchDebounceTime:400,customSearch:W}}),h&&t.jsx($t,{title:`${r("common.delete")} ${h.blockletTitle}`,description:r("blocklet.publish.deleteProject.description"),confirm:r("common.confirm"),onConfirm:I,onCancel:()=>x(null),children:t.jsx(u,{sx:{marginTop:2},children:[r("blocklet.publish.deleteProject.tip1"),r("blocklet.publish.deleteProject.tip2"),r("blocklet.publish.deleteProject.tip3")].map(g=>t.jsxs(u,{sx:{display:"flex",marginTop:1,flexDirection:"row",alignItems:"flex-start"},children:[t.jsx(gs,{color:"warning",sx:{marginRight:1,fontSize:20,marginTop:"2px"}}),t.jsx(E,{component:"span",variant:"inherit",color:"text.secondary",children:g})]}))})}),S]})}Wt.propTypes={initUrl:d.object};Wt.defaultProps={initUrl:null};var Ut={},Xs=me;Object.defineProperty(Ut,"__esModule",{value:!0});var un=Ut.default=void 0,Js=Xs(xe()),wo=t;un=Ut.default=(0,Js.default)([(0,wo.jsx)("path",{d:"M20 17H4V5h8V3H4c-1.11 0-2 .89-2 2v12c0 1.1.89 2 2 2h4v2h8v-2h4c1.1 0 2-.9 2-2v-3h-2z"},"0"),(0,wo.jsx)("path",{d:"m17 14 5-5-1.41-1.41L18 10.17V3h-2v7.17l-2.59-2.58L12 9z"},"1")],"InstallDesktop");function Qs(){var I;const{t:e,locale:o}=J(),{projectId:n}=lt(),{api:r}=be(),[s,l]=R.useState(!0),{blocklet:i}=De(),a=ze(y=>y.breakpoints.down("md")),[c,f]=R.useState(null),[h,x]=R.useState(null),[b,p]=R.useState(null),v=(I=window.env)==null?void 0:I.serverEndpoint,C=()=>{r.getReleases({input:{did:i.meta.did,projectId:n}}).then(y=>{const _=(y==null?void 0:y.releases)||[];l(!1),f(_)}).catch(y=>{l(!1),V.error(y.message)})},D=()=>{r.doBatchQuery({getProject:{input:{did:i.meta.did,projectId:n}},getReleases:{input:{did:i.meta.did,projectId:n}}}).then(y=>{x(y.getProject.project||{}),f(y.getReleases.releases||[]),l(!1)}).catch(y=>{l(!1),V.error(y.message)})};R.useEffect(()=>{D()},[]);const j=()=>{l(!1);const y=b.id;r.deleteRelease({input:{did:i.meta.did,projectId:n,releaseId:y}}).then(()=>{l(!1),C(),V.success(e("common.removeSuccess")),p(null)}).catch(_=>{l(!1),V.error(_.message)})},m=y=>{p(y)};if(!c&&s)return t.jsx(u,{sx:{display:"flex",justifyContent:"center",alignItems:"center",marginTop:"40px"},children:t.jsx(Ve,{})});if(!c)return null;const T=t.jsxs(Uo,{className:"breadcrumbs","aria-label":"breadcrumb",children:[t.jsx(le,{to:"..",children:e("common.blockletStudio")}),t.jsx(E,{color:"text.primary",children:t.jsx(fe,{maxLength:a?6:30,children:h.blockletTitle})})]});if(!c.length)return t.jsxs(t.Fragment,{children:[T,t.jsxs(u,{display:"flex",flexDirection:"column",alignItems:"center",pt:10,children:[t.jsx(u,{sx:{fontSize:20,fontWeight:"bold",mb:3},children:e("blocklet.publish.releaseEmptyTip")}),t.jsx(u,{sx:{fontSize:14,color:"text.secondary",mb:3},children:e("blocklet.publish.createReleaseTip")}),t.jsx(le,{to:"create/none",children:t.jsx(ot,{variant:"contained",children:e("blocklet.publish.createRelease")})})]})]});const L=[{label:e("common.version"),name:"blockletVersion",minWidth:160,options:{customBodyRenderLite:y=>{const _=c[y];return t.jsx(le,{to:`view/${_.id}`,children:t.jsx(Vt,{did:i.meta.did,projectId:h.id,logo:_.blockletLogo,title:_.blockletVersion,describe:_.blockletTitle})})}}},{label:e("blocklet.publish.releaseNote"),name:"note",options:{customBodyRenderLite:y=>{const _=c[y];return t.jsx(E,{className:"note",children:_.note||""})}}},{label:e("common.status"),name:"status",options:{customBodyRender:y=>t.jsx(on,{type:y==="published"?"success":"warning",children:y==="published"?"Released":js(y)})}},{label:e("common.lastPublishedAt"),name:"updatedAt",options:{customBodyRenderLite:y=>{const _=c[y];return _.status!==re.PROJECT.RELEASE_STATUS.published?"":t.jsx(nn,{value:Number(_.updatedAt),locale:o})}}},{label:e("common.actions"),name:"actions",options:{customBodyRenderLite:y=>{var g;const _=c[y];let A="",W="";const k=_.status==="published";if(k){const P=ce(v,`/api/project/${i.meta.did}/${h.id}/${h.lastReleaseId}/release/blocklet.json`),O=new URL(v);O.pathname=ce(O.pathname,"/launch-blocklet/agreement"),O.searchParams.set("blocklet_meta_url",P),A=O.href,W=ce(`${H.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${i.meta.did}/${h.id}/${h.lastReleaseId}/download/${(h.lastReleaseFiles||[])[0]}`)}const S=(g=h.blockletComponents)!=null&&g.some(P=>P.included)||_.uploadedResource?"pack":"resource";return t.jsxs(u,{display:"flex",alignItems:"center",children:[k&&S==="pack"&&t.jsx(ue,{title:e("blocklet.publish.install",{name:h.blockletTitle}),placement:"top",children:t.jsx(oe,{color:"secondary","aria-label":"create",children:t.jsx("a",{style:{display:"flex"},href:A,target:"_blank",rel:"noreferrer",children:t.jsx(un,{sx:{fontSize:18}})})})}),k&&t.jsx(ue,{title:e("blocklet.publish.download",{name:h.blockletTitle}),placement:"top",children:t.jsx(oe,{color:"primary","aria-label":"download",children:t.jsx("a",{style:{display:"flex"},href:W,children:t.jsx(ks,{sx:{fontSize:18}})})})}),t.jsx(ue,{title:e("blocklet.publish.delete",{name:h.blockletTitle}),placement:"top",children:t.jsx(oe,{color:"primary","aria-label":"delete",onClick:()=>m(_),children:t.jsx(sn,{sx:{fontSize:18}})})})]})}}}];return t.jsxs(Ys,{children:[t.jsxs(u,{className:"header",children:[T,t.jsx(le,{to:"new-release/none",children:t.jsxs(ot,{variant:"contained",children:[t.jsx(qt,{style:{fontSize:"1.3em",marginRight:4}}),e("blocklet.publish.createRelease")]})})]}),t.jsx(Pt,{className:"main-table",verticalKeyWidth:100,locale:o,data:c,columns:L,options:{sort:!1,download:!1,filter:!1,print:!1,search:!1}}),b&&t.jsx($t,{title:e(`${e("common.delete")} ${b.blockletVersion}`),description:e("blocklet.publish.deleteReleaseTip"),confirm:e("common.confirm"),onConfirm:j,onCancel:()=>p(null)})]})}const Ys=ae(u)`
|
|
2
|
+
import{r as R,k as Dt,l as lt,L as le,f as Hn,h as Gn,i as pt}from"./vendor-react-D-afvo_7.js";import{a1 as me,j as t,t as ze,a3 as u,aM as Wo,E as d,a4 as ue,I as oe,T as E,bT as Uo,aa as ae,aE as Xn,bJ as Ge,ad as Fo,aN as Xe,bq as jt,x as Q,a2 as et,P as Ho,G as Go,v as Tt,$ as Xo,ar as Jo,al as pe,ah as Jn,D as _t,ab as Qo,r as Yo,bG as Qn,K as Be,y as Zo,M as Y,ac as ke,aL as Yn,L as Zn,z as Kn,bn as es,aA as Ko,az as tt,bt as ts,bu as os,bU as ns,bV as ss,aP as en,bD as rs,bM as is,bx as ls,by as ft}from"./vendor-mui-core-CCMNKHtm.js";import{y as be,B as De,h as re,a5 as cs,f as mo,_ as tn,ad as bo}from"./index-uosYiNLl.js";import{_ as xe,b as H,e as J,a1 as ot,aa as on,aQ as nn,a8 as sn,Y as as,aR as Pt,j as V,n as ds,aS as us,aT as ps,X as fs,ax as se,aU as hs,ah as ms,aI as Se,a5 as Lt,aV as ye,ap as bs,af as xs}from"./vendor-arcblock-Bf7AGBSd.js";import{d as qt}from"./Add-0_yO_NcD.js";import{d as gs}from"./Error-CmnuwZkD.js";import{C as $t}from"./confirm-D7n9Rzfx.js";import{u as ct}from"./session-DutPZhUI.js";import{W as xo}from"./did-address-CLeqbWiu.js";import{E as Ve,D as go,C as jo,P as ko}from"./react-beautiful-dnd.esm-DY38RjFx.js";import{B as Nt}from"./bundle-avatar-TEUPlhi2.js";import{S as fe}from"./shorten-label-CYJeMT7h.js";import{T as js,x as ce,G as At,C as Je}from"./vendor-utils-5TjOM6td.js";import{d as ks}from"./Download-BF8ec3kS.js";import{d as ys}from"./QuestionMarkCircle-SCPzvU7T.js";import{u as vs}from"./vendor-hooks-BKxTDk_P.js";import{_ as Ce}from"./useSetState-Crt4S51m.js";import{c as Et}from"./index-DoZ2YM4T.js";import{E as Mt}from"./index-DE_r-gh_.js";import{p as nt}from"./index-DpOEjWGx.js";import"./api-K65cLqol.js";import{d as ws}from"./ChevronRight-DORpkdoL.js";import{T as Cs,a as Ss}from"./vendor-mui-x-DmPVvZFJ.js";import{d as yo}from"./DeleteOutline-BaOxCgo3.js";import{c as Rs,A as rn,u as Is,S as Ds,U as Ts,a as ht,b as ln,n as _s,e as Ps,f as vo,g as Ls}from"./item-7Z8_UB5K.js";import{d as qs}from"./ArrowDropDown-CSe7vdhu.js";import{f as Re}from"./format-error-C0Ke3VXF.js";import{C as $s}from"./click-to-copy-Ck4RKrL7.js";import{d as Ns}from"./Launch-DNY7Ut_B.js";import{M as As}from"./index-BvLMNAG0.js";import{r as Es}from"./index-C0uUrAqS.js";import{d as Ms}from"./Done-Bsd0QwkQ.js";import"./raf-schd.esm-Cxhj8umC.js";import"./get-safe-url-BF9qL1PD.js";var Ot={},Os=me;Object.defineProperty(Ot,"__esModule",{value:!0});var cn=Ot.default=void 0,zs=Os(xe()),Bs=t;cn=Ot.default=(0,zs.default)((0,Bs.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-2 10h-4v4h-2v-4H7v-2h4V7h2v4h4z"}),"AddBox");var zt={},Vs=me;Object.defineProperty(zt,"__esModule",{value:!0});var an=zt.default=void 0,Ws=Vs(xe()),Us=t;an=zt.default=(0,Ws.default)((0,Us.jsx)("path",{d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H15v-8h5V8zm-1 7V3.5L18.5 9zm4 12.66V16h5.66v2h-2.24l2.95 2.95-1.41 1.41L19 19.41v2.24h-2z"}),"FileOpen");var Bt={},Fs=me;Object.defineProperty(Bt,"__esModule",{value:!0});var dn=Bt.default=void 0,Hs=Fs(xe()),Gs=t;dn=Bt.default=(0,Hs.default)((0,Gs.jsx)("path",{d:"M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"}),"HelpOutlineOutlined");function Vt({did:e,projectId:o,title:n,logo:r,describe:s}){const i=`${`${H.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${e}/${o}/logo/upload`}/${r}`,[a,c]=R.useState(!1),f=ze(h=>h.breakpoints.down("md"));return t.jsxs(u,{sx:{display:"flex",flexDirection:"row",color:a?"primary.main":"grey.900",gap:1},onPointerEnter:()=>c(!0),onPointerLeave:()=>c(!1),children:[t.jsx(Wo,{sx:{borderRadius:1},src:i}),t.jsxs(u,{children:[t.jsx(fe,{hiddenTip:!0,maxLength:"24",sx:{fontSize:"14px",fontWeight:"500",color:f?"primary.main":""},children:n||"/"}),t.jsx(fe,{hiddenTip:!0,maxLength:"58",sx:{fontSize:"12px",color:f||a?"primary.main":"grey.700"},children:s||"/"})]})]})}Vt.propTypes={projectId:d.string.isRequired,did:d.string.isRequired,title:d.string.isRequired,logo:d.string.isRequired,describe:d.string.isRequired};function Wt({initUrl:e}){const o=Dt(),n=(e==null?void 0:e.searchParams.get("tenantScope"))||"",{t:r,locale:s}=J(),{api:l}=be(),{api:i}=ct(),[a,c]=R.useState(!0),{blocklet:f}=De(),[h,x]=R.useState(null),[b,p]=R.useState(!1),v=ze(g=>g.breakpoints.down("xl")),{componentDid:C=""}=lt(),[D,j]=R.useState(null),m=()=>{l.getProjects({input:{did:f.meta.did,componentDid:C,tenantScope:n}}).then(g=>{const P=(g==null?void 0:g.projects)||[];c(!1),j(P)}).catch(g=>{c(!1),V.error(g.message)})},T=()=>{o(`${H.UNOWNED_DID}/create/none`,{replace:!0})},L=g=>{x(g)},I=()=>{c(!1),p(!0)},y=()=>{p(!1),x(null)},_=g=>{V.error(g.message),p(!1),x(null)},A=g=>{if(!(g!=null&&g.deleted)){V.error("Delete project failed");return}m(),p(!1),x(null)},W=(g,P,O)=>{let F=g==null?void 0:g.trim();return F?(F=ds.toAddress(F).toLocaleLowerCase(),O.some((w,$)=>{const q=P[$];return q&&w.searchable&&w.display!=="excluded"&&w.display!=="false"&&q.toLocaleLowerCase().includes(F)})):!0};if(R.useEffect(()=>{m()},[]),!D&&a)return t.jsx(u,{sx:{display:"flex",justifyContent:"center",alignItems:"center",marginTop:"40px"},children:t.jsx(Ve,{})});if(!D)return null;if(!D.length)return t.jsxs(u,{display:"flex",flexDirection:"column",alignItems:"center",pt:10,children:[t.jsx(u,{sx:{fontSize:20,fontWeight:"bold",mb:3},children:r("blocklet.publish.blockletEmptyTip")}),t.jsx(u,{sx:{fontSize:14,color:"text.secondary",mb:3},children:r("blocklet.publish.createBlockletTip")}),t.jsx(ot,{onClick:T,variant:"contained",children:r("blocklet.publish.createBlocklet")})]});const k=[{label:"Blocklet",name:"blockletTitle",minWidth:160,options:{customBodyRenderLite:g=>{const P=D[g];return t.jsx(le,{to:`${P.id}`,children:t.jsx(Vt,{did:f.meta.did,projectId:P.id,logo:P.blockletLogo,title:P.blockletTitle,describe:P.blockletDescription})})}}},{label:"Version",name:"blockletVersion",options:{searchable:!1,customBodyRender:g=>g?t.jsx(on,{type:"success",children:g}):""}},{label:"DID",name:"blockletDid",options:{customBodyRender:g=>g?t.jsx(xo,{size:14,compact:!0,responsive:!1,did:g}):null}},v||C?null:{label:r("common.createdBy"),name:"createdBy",options:{customBodyRender:g=>g?t.jsx(xo,{onClick:()=>{o(`/.well-known/service/admin/members?did=${g}`)},style:{cursor:"pointer"},size:14,compact:!0,copyable:!1,showQrcode:!1,responsive:!1,did:g}):null}},v||C?null:{label:r("common.scope"),name:"componentDid",options:{customBodyRender:g=>{const P=(f.children||[]).find(O=>O.meta.did===g);return P?t.jsxs(u,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[t.jsx(Nt,{size:14,blocklet:P,ancestors:[f]}),t.jsx(u,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:P.meta.title})]},g):""}}},v||n?null:{label:r("blocklet.publish.tenantScope"),name:"tenantScope",options:{customBodyRender:g=>t.jsx(u,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:t.jsx(fe,{children:g})})}},{label:r("common.updatedAt"),name:"updatedAt",options:{searchable:!1,customBodyRender:g=>t.jsx(nn,{value:Number(g),locale:s})}},{label:r("common.actions"),name:"actions",options:{searchable:!1,customBodyRenderLite:g=>{const P=D[g];return t.jsxs(u,{display:"flex",children:[t.jsx(le,{to:`${P.id}/new-release/${P.lastReleaseId}`,children:t.jsx(ue,{title:r("blocklet.publish.createRelease"),placement:"top",children:t.jsx(oe,{color:"primary","aria-label":"create",children:t.jsx(cn,{style:{fontSize:18}})})})}),!!P.lastReleaseId&&t.jsx(ue,{title:r("blocklet.publish.viewLastRelease",{name:P.blockletTitle}),placement:"top",children:t.jsx(oe,{color:"secondary","aria-label":"create",children:t.jsx(le,{style:{display:"flex"},to:`${P.id}/view/${P.lastReleaseId}`,children:t.jsx(an,{sx:{fontSize:18}})})})}),t.jsx(ue,{title:r("blocklet.publish.delete",{name:P.blockletTitle}),placement:"top",children:t.jsx(oe,{color:"primary","aria-label":"delete",onClick:()=>L(P),children:t.jsx(sn,{sx:{fontSize:18}})})})]})}}}].filter(Boolean),S=b?t.jsx(as,{open:!0,popup:!0,onClose:y,action:"check-has-project-id",locale:s,checkFn:i.get,saveConnect:!1,forceConnected:!1,checkTimeout:5*60*1e3,onSuccess:A,onError:_,extraParams:{projectId:h.id,did:f.meta.did,name:h.blockletTitle},messages:{title:r("blocklet.publish.deleteProject.title",{name:h.blockletTitle}),scan:r("blocklet.publish.deleteProject.scan",{name:h.blockletTitle}),confirm:r("blocklet.publish.deleteProject.confirm"),success:r("blocklet.publish.deleteProject.success")}}):null;return t.jsxs(u,{children:[t.jsxs(u,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[t.jsxs(u,{display:"flex",flexDirection:"row",alignItems:"center",children:[t.jsx(u,{sx:{fontSize:"1.2rem",fontWeight:"bold"},children:r("common.blockletStudio")}),t.jsx(ue,{title:r("blocklet.publish.createBlockletTip"),arrow:!0,placement:"right",children:t.jsx(dn,{sx:{opacity:.6,fontSize:"1.1em",ml:1}})})]}),t.jsxs(ot,{onClick:T,variant:"contained",children:[t.jsx(qt,{style:{fontSize:"1.3em",marginRight:4}}),r("blocklet.publish.createBlocklet")]})]}),t.jsx(Pt,{className:"main-table",locale:s,data:D,columns:k,options:{sort:!1,download:!1,filter:!1,print:!1,search:!0,viewColumns:!1,searchAlwaysOpen:!0,rowsPerPageOptions:[10,20,50,100],searchPlaceholder:r("blocklet.list.searchPlaceholder"),searchDebounceTime:400,customSearch:W}}),h&&t.jsx($t,{title:`${r("common.delete")} ${h.blockletTitle}`,description:r("blocklet.publish.deleteProject.description"),confirm:r("common.confirm"),onConfirm:I,onCancel:()=>x(null),children:t.jsx(u,{sx:{marginTop:2},children:[r("blocklet.publish.deleteProject.tip1"),r("blocklet.publish.deleteProject.tip2"),r("blocklet.publish.deleteProject.tip3")].map(g=>t.jsxs(u,{sx:{display:"flex",marginTop:1,flexDirection:"row",alignItems:"flex-start"},children:[t.jsx(gs,{color:"warning",sx:{marginRight:1,fontSize:20,marginTop:"2px"}}),t.jsx(E,{component:"span",variant:"inherit",color:"text.secondary",children:g})]}))})}),S]})}Wt.propTypes={initUrl:d.object};Wt.defaultProps={initUrl:null};var Ut={},Xs=me;Object.defineProperty(Ut,"__esModule",{value:!0});var un=Ut.default=void 0,Js=Xs(xe()),wo=t;un=Ut.default=(0,Js.default)([(0,wo.jsx)("path",{d:"M20 17H4V5h8V3H4c-1.11 0-2 .89-2 2v12c0 1.1.89 2 2 2h4v2h8v-2h4c1.1 0 2-.9 2-2v-3h-2z"},"0"),(0,wo.jsx)("path",{d:"m17 14 5-5-1.41-1.41L18 10.17V3h-2v7.17l-2.59-2.58L12 9z"},"1")],"InstallDesktop");function Qs(){var I;const{t:e,locale:o}=J(),{projectId:n}=lt(),{api:r}=be(),[s,l]=R.useState(!0),{blocklet:i}=De(),a=ze(y=>y.breakpoints.down("md")),[c,f]=R.useState(null),[h,x]=R.useState(null),[b,p]=R.useState(null),v=(I=window.env)==null?void 0:I.serverEndpoint,C=()=>{r.getReleases({input:{did:i.meta.did,projectId:n}}).then(y=>{const _=(y==null?void 0:y.releases)||[];l(!1),f(_)}).catch(y=>{l(!1),V.error(y.message)})},D=()=>{r.doBatchQuery({getProject:{input:{did:i.meta.did,projectId:n}},getReleases:{input:{did:i.meta.did,projectId:n}}}).then(y=>{x(y.getProject.project||{}),f(y.getReleases.releases||[]),l(!1)}).catch(y=>{l(!1),V.error(y.message)})};R.useEffect(()=>{D()},[]);const j=()=>{l(!1);const y=b.id;r.deleteRelease({input:{did:i.meta.did,projectId:n,releaseId:y}}).then(()=>{l(!1),C(),V.success(e("common.removeSuccess")),p(null)}).catch(_=>{l(!1),V.error(_.message)})},m=y=>{p(y)};if(!c&&s)return t.jsx(u,{sx:{display:"flex",justifyContent:"center",alignItems:"center",marginTop:"40px"},children:t.jsx(Ve,{})});if(!c)return null;const T=t.jsxs(Uo,{className:"breadcrumbs","aria-label":"breadcrumb",children:[t.jsx(le,{to:"..",children:e("common.blockletStudio")}),t.jsx(E,{color:"text.primary",children:t.jsx(fe,{maxLength:a?6:30,children:h.blockletTitle})})]});if(!c.length)return t.jsxs(t.Fragment,{children:[T,t.jsxs(u,{display:"flex",flexDirection:"column",alignItems:"center",pt:10,children:[t.jsx(u,{sx:{fontSize:20,fontWeight:"bold",mb:3},children:e("blocklet.publish.releaseEmptyTip")}),t.jsx(u,{sx:{fontSize:14,color:"text.secondary",mb:3},children:e("blocklet.publish.createReleaseTip")}),t.jsx(le,{to:"create/none",children:t.jsx(ot,{variant:"contained",children:e("blocklet.publish.createRelease")})})]})]});const L=[{label:e("common.version"),name:"blockletVersion",minWidth:160,options:{customBodyRenderLite:y=>{const _=c[y];return t.jsx(le,{to:`view/${_.id}`,children:t.jsx(Vt,{did:i.meta.did,projectId:h.id,logo:_.blockletLogo,title:_.blockletVersion,describe:_.blockletTitle})})}}},{label:e("blocklet.publish.releaseNote"),name:"note",options:{customBodyRenderLite:y=>{const _=c[y];return t.jsx(E,{className:"note",children:_.note||""})}}},{label:e("common.status"),name:"status",options:{customBodyRender:y=>t.jsx(on,{type:y==="published"?"success":"warning",children:y==="published"?"Released":js(y)})}},{label:e("common.lastPublishedAt"),name:"updatedAt",options:{customBodyRenderLite:y=>{const _=c[y];return _.status!==re.PROJECT.RELEASE_STATUS.published?"":t.jsx(nn,{value:Number(_.updatedAt),locale:o})}}},{label:e("common.actions"),name:"actions",options:{customBodyRenderLite:y=>{var g;const _=c[y];let A="",W="";const k=_.status==="published";if(k){const P=ce(v,`/api/project/${i.meta.did}/${h.id}/${h.lastReleaseId}/release/blocklet.json`),O=new URL(v);O.pathname=ce(O.pathname,"/launch-blocklet/agreement"),O.searchParams.set("blocklet_meta_url",P),A=O.href,W=ce(`${H.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${i.meta.did}/${h.id}/${h.lastReleaseId}/download/${(h.lastReleaseFiles||[])[0]}`)}const S=(g=h.blockletComponents)!=null&&g.some(P=>P.included)||_.uploadedResource?"pack":"resource";return t.jsxs(u,{display:"flex",alignItems:"center",children:[k&&S==="pack"&&t.jsx(ue,{title:e("blocklet.publish.install",{name:h.blockletTitle}),placement:"top",children:t.jsx(oe,{color:"secondary","aria-label":"create",children:t.jsx("a",{style:{display:"flex"},href:A,target:"_blank",rel:"noreferrer",children:t.jsx(un,{sx:{fontSize:18}})})})}),k&&t.jsx(ue,{title:e("blocklet.publish.download",{name:h.blockletTitle}),placement:"top",children:t.jsx(oe,{color:"primary","aria-label":"download",children:t.jsx("a",{style:{display:"flex"},href:W,children:t.jsx(ks,{sx:{fontSize:18}})})})}),t.jsx(ue,{title:e("blocklet.publish.delete",{name:h.blockletTitle}),placement:"top",children:t.jsx(oe,{color:"primary","aria-label":"delete",onClick:()=>m(_),children:t.jsx(sn,{sx:{fontSize:18}})})})]})}}}];return t.jsxs(Ys,{children:[t.jsxs(u,{className:"header",children:[T,t.jsx(le,{to:"new-release/none",children:t.jsxs(ot,{variant:"contained",children:[t.jsx(qt,{style:{fontSize:"1.3em",marginRight:4}}),e("blocklet.publish.createRelease")]})})]}),t.jsx(Pt,{className:"main-table",verticalKeyWidth:100,locale:o,data:c,columns:L,options:{sort:!1,download:!1,filter:!1,print:!1,search:!1}}),b&&t.jsx($t,{title:e(`${e("common.delete")} ${b.blockletVersion}`),description:e("blocklet.publish.deleteReleaseTip"),confirm:e("common.confirm"),onConfirm:j,onCancel:()=>p(null)})]})}const Ys=ae(u)`
|
|
3
3
|
.header {
|
|
4
4
|
display: flex;
|
|
5
5
|
align-items: center;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as b,g as qe}from"./vendor-react-D-afvo_7.js";import{j as e,T as O,M as R,bE as ke,bX as Le,bY as Z,bG as Ae,bM as Ne,a2 as E,br as Ge,ad as Ve,E as w,aa as $,aN as Ue,bJ as Ke,I as z,a3 as y,a1 as Ze,al as _e,K as Ye,a4 as ee,t as Je}from"./vendor-mui-core-CCMNKHtm.js";import{d as ce}from"./Add-0_yO_NcD.js";import{e as q,a5 as G,a1 as A,j as N,w as Xe,_ as Qe,b as de,aq as ue,n as et,aa as tt,a0 as Be,bi as Q,bj as be,aX as st}from"./vendor-arcblock-Bf7AGBSd.js";import{d as te}from"./EditIcon-D6Lk4OxD.js";import{d as rt}from"./LockIcon-BITD3hjp.js";import{L as pe,S as me,d as nt}from"./list-header-CfBPZZEw.js";import{L as V,am as Se,H as at}from"./vendor-utils-5TjOM6td.js";import{y as B,L as U,as as Re,B as ot,aa as it,f as lt,h as ct,b as J,at as dt}from"./index-uosYiNLl.js";import{u as K}from"./dashboard-B_hsqmQK.js";import{w as M,P as we}from"./permission-B0xKCybj.js";import{C as fe}from"./confirm-D7n9Rzfx.js";import{f as Y}from"./format-error-C0Ke3VXF.js";import{C as ut}from"./Google-F1HiAjHW.js";import{W as ze}from"./did-address-CLeqbWiu.js";import{_ as pt}from"./useSetState-Crt4S51m.js";import"./vendor-hooks-BKxTDk_P.js";import"./useLocalStorage-tmIJr51I.js";import"./PlayArrow-C6dXJHO6.js";import"./get-safe-url-
|
|
1
|
+
import{r as b,g as qe}from"./vendor-react-D-afvo_7.js";import{j as e,T as O,M as R,bE as ke,bX as Le,bY as Z,bG as Ae,bM as Ne,a2 as E,br as Ge,ad as Ve,E as w,aa as $,aN as Ue,bJ as Ke,I as z,a3 as y,a1 as Ze,al as _e,K as Ye,a4 as ee,t as Je}from"./vendor-mui-core-CCMNKHtm.js";import{d as ce}from"./Add-0_yO_NcD.js";import{e as q,a5 as G,a1 as A,j as N,w as Xe,_ as Qe,b as de,aq as ue,n as et,aa as tt,a0 as Be,bi as Q,bj as be,aX as st}from"./vendor-arcblock-Bf7AGBSd.js";import{d as te}from"./EditIcon-D6Lk4OxD.js";import{d as rt}from"./LockIcon-BITD3hjp.js";import{L as pe,S as me,d as nt}from"./list-header-CfBPZZEw.js";import{L as V,am as Se,H as at}from"./vendor-utils-5TjOM6td.js";import{y as B,L as U,as as Re,B as ot,aa as it,f as lt,h as ct,b as J,at as dt}from"./index-uosYiNLl.js";import{u as K}from"./dashboard-B_hsqmQK.js";import{w as M,P as we}from"./permission-B0xKCybj.js";import{C as fe}from"./confirm-D7n9Rzfx.js";import{f as Y}from"./format-error-C0Ke3VXF.js";import{C as ut}from"./Google-F1HiAjHW.js";import{W as ze}from"./did-address-CLeqbWiu.js";import{_ as pt}from"./useSetState-Crt4S51m.js";import"./vendor-hooks-BKxTDk_P.js";import"./useLocalStorage-tmIJr51I.js";import"./PlayArrow-C6dXJHO6.js";import"./get-safe-url-BF9qL1PD.js";import"./index-CSkA6M4K.js";import"./session-DutPZhUI.js";import"./useAsyncRetry-EMRT9Ldq.js";import"./useAsync-Ua5iss51.js";import"./cloneDeep-BRiLvZjr.js";var he={};Object.defineProperty(he,"__esModule",{value:!0});var X=he.default=void 0;mt(b);var Te=e;function mt(o){return o&&o.__esModule?o:{default:o}}function Pe(o,u){var i=Object.keys(o);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(o);u&&(d=d.filter(function(m){return Object.getOwnPropertyDescriptor(o,m).enumerable})),i.push.apply(i,d)}return i}function Ie(o){for(var u=1;u<arguments.length;u++){var i=arguments[u]!=null?arguments[u]:{};u%2?Pe(Object(i),!0).forEach(function(d){ft(o,d,i[d])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(i)):Pe(Object(i)).forEach(function(d){Object.defineProperty(o,d,Object.getOwnPropertyDescriptor(i,d))})}return o}function ft(o,u,i){return(u=ht(u))in o?Object.defineProperty(o,u,{value:i,enumerable:!0,configurable:!0,writable:!0}):o[u]=i,o}function ht(o){var u=xt(o,"string");return typeof u=="symbol"?u:u+""}function xt(o,u){if(typeof o!="object"||!o)return o;var i=o[Symbol.toPrimitive];if(i!==void 0){var d=i.call(o,u||"default");if(typeof d!="object")return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return(u==="string"?String:Number)(o)}var xe=function(u){return(0,Te.jsx)("svg",Ie(Ie({},u),{},{children:(0,Te.jsx)("path",{d:"M8.4375 4.3125H8.25C8.35313 4.3125 8.4375 4.22812 8.4375 4.125V4.3125H15.5625V4.125C15.5625 4.22812 15.6469 4.3125 15.75 4.3125H15.5625V6H17.25V4.125C17.25 3.29766 16.5773 2.625 15.75 2.625H8.25C7.42266 2.625 6.75 3.29766 6.75 4.125V6H8.4375V4.3125ZM20.25 6H3.75C3.33516 6 3 6.33516 3 6.75V7.5C3 7.60313 3.08437 7.6875 3.1875 7.6875H4.60312L5.18203 19.9453C5.21953 20.7445 5.88047 21.375 6.67969 21.375H17.3203C18.1219 21.375 18.7805 20.7469 18.818 19.9453L19.3969 7.6875H20.8125C20.9156 7.6875 21 7.60313 21 7.5V6.75C21 6.33516 20.6648 6 20.25 6ZM17.1398 19.6875H6.86016L6.29297 7.6875H17.707L17.1398 19.6875Z"})}))};xe.defaultProps={width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"};xe.displayName="delete";X=he.default=xe;var Oe={exports:{}},Ee={exports:{}};(function(){var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u={rotl:function(i,d){return i<<d|i>>>32-d},rotr:function(i,d){return i<<32-d|i>>>d},endian:function(i){if(i.constructor==Number)return u.rotl(i,8)&16711935|u.rotl(i,24)&4278255360;for(var d=0;d<i.length;d++)i[d]=u.endian(i[d]);return i},randomBytes:function(i){for(var d=[];i>0;i--)d.push(Math.floor(Math.random()*256));return d},bytesToWords:function(i){for(var d=[],m=0,c=0;m<i.length;m++,c+=8)d[c>>>5]|=i[m]<<24-c%32;return d},wordsToBytes:function(i){for(var d=[],m=0;m<i.length*32;m+=8)d.push(i[m>>>5]>>>24-m%32&255);return d},bytesToHex:function(i){for(var d=[],m=0;m<i.length;m++)d.push((i[m]>>>4).toString(16)),d.push((i[m]&15).toString(16));return d.join("")},hexToBytes:function(i){for(var d=[],m=0;m<i.length;m+=2)d.push(parseInt(i.substr(m,2),16));return d},bytesToBase64:function(i){for(var d=[],m=0;m<i.length;m+=3)for(var c=i[m]<<16|i[m+1]<<8|i[m+2],h=0;h<4;h++)m*8+h*6<=i.length*8?d.push(o.charAt(c>>>6*(3-h)&63)):d.push("=");return d.join("")},base64ToBytes:function(i){i=i.replace(/[^A-Z0-9+\/]/ig,"");for(var d=[],m=0,c=0;m<i.length;c=++m%4)c!=0&&d.push((o.indexOf(i.charAt(m-1))&Math.pow(2,-2*c+8)-1)<<c*2|o.indexOf(i.charAt(m))>>>6-c*2);return d}};Ee.exports=u})();var gt=Ee.exports,le={utf8:{stringToBytes:function(o){return le.bin.stringToBytes(unescape(encodeURIComponent(o)))},bytesToString:function(o){return decodeURIComponent(escape(le.bin.bytesToString(o)))}},bin:{stringToBytes:function(o){for(var u=[],i=0;i<o.length;i++)u.push(o.charCodeAt(i)&255);return u},bytesToString:function(o){for(var u=[],i=0;i<o.length;i++)u.push(String.fromCharCode(o[i]));return u.join("")}}},Fe=le;/*!
|
|
2
2
|
* Determine if an object is a Buffer
|
|
3
3
|
*
|
|
4
4
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as H,t as Zn,g as Qn,e as Dr,a as Jn}from"./vendor-react-D-afvo_7.js";import{j as i,a3 as se,bD as Xt,bE as er,aP as tr,al as jt,T as qe,M as Et,a2 as nt,br as sr,ad as rt,E as B,aa as Te,a4 as ut,v as Xn,x as mn,aM as ei,a1 as ti,bm as ri,bn as ni,I as ii,aK as oi,aN as ai,bJ as si}from"./vendor-mui-core-CCMNKHtm.js";import{p as Ie,B as rr,b as nr,T as ci,al as li,n as Ur,x as ui,y as fi}from"./vendor-utils-5TjOM6td.js";import{c as di}from"./index-DoZ2YM4T.js";import{a_ as ft,a$ as pi,b0 as mi,b1 as hn,b2 as hi,b3 as gi,b4 as yi,b5 as gn,b6 as bi,b7 as cr,b8 as vi,b9 as xi,ba as wi,bb as ji,o as lr,bc as yn,m as Ei,n as Si,e as _e,B as bn,D as Pi,a5 as Ge,a1 as je,an as Ci,Y as Oi,aE as Ai,a0 as dt,j as Ke,$ as Ii,bd as vn,b as Ye,aq as xn,be as Ri,ax as Ni,af as Ti,aB as _i,aQ as wn,a8 as Di,aR as jn,_ as Ui,bf as En,bg as qi,bh as ki}from"./vendor-arcblock-Bf7AGBSd.js";import{d as St}from"./Add-0_yO_NcD.js";import{d as Li}from"./Loop-gZ2g1v3i.js";import{d as Bi}from"./ViewList-DfGpYdZ-.js";import{L as Ki,S as Fi,d as Sn}from"./list-header-CfBPZZEw.js";import{$ as $i,f as Mi,y as Ce,ap as ur,m as Qe,a0 as Wi,L as Je,aq as zi,h as Ze,B as Pn,ar as Cn,b as Vi}from"./index-uosYiNLl.js";import{x as Hi,u as fr,a as On,k as Gi}from"./vendor-hooks-BKxTDk_P.js";import{u as De,d as qr,W as An}from"./dashboard-B_hsqmQK.js";import{W as Pt}from"./did-address-CLeqbWiu.js";import{P as Be}from"./permission-B0xKCybj.js";import{C as Rt}from"./click-to-copy-Ck4RKrL7.js";import{f as Fe}from"./format-error-C0Ke3VXF.js";import{_ as Yi}from"./useAsync-Ua5iss51.js";import{I as Pe}from"./index-DTzPwoh8.js";import{d as Zi}from"./DeleteOutline-BaOxCgo3.js";import{C as pt}from"./confirm-D7n9Rzfx.js";import{u as mt}from"./session-DutPZhUI.js";import{i as In,a as Ct,p as Rn}from"./util-BY6uUuCk.js";import{b as Qi}from"./sdk-VtyRZZVE.js";import{p as Ji}from"./index-DpOEjWGx.js";import{A as Xi}from"./actions-BvtS-2sJ.js";import{S as eo}from"./shorten-label-CYJeMT7h.js";import"./useLocalStorage-tmIJr51I.js";import"./PlayArrow-C6dXJHO6.js";import"./get-safe-url-BsKINLVF.js";import"./index-CSkA6M4K.js";import"./useAsyncRetry-EMRT9Ldq.js";import"./useSetState-Crt4S51m.js";import"./MoreHoriz-CwoKs0Gg.js";var dr={};Object.defineProperty(dr,"__esModule",{value:!0});var Nn=dr.default=void 0;to(H);var et=i;function to(e){return e&&e.__esModule?e:{default:e}}function kr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Lr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kr(Object(r),!0).forEach(function(n){ro(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kr(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ro(e,t,r){return(t=no(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function no(e){var t=io(e,"string");return typeof t=="symbol"?t:t+""}function io(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var pr=function(t){return(0,et.jsxs)("svg",Lr(Lr({},t),{},{children:[(0,et.jsx)("g",{clipPath:"url(#clip0)",children:(0,et.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.99997 1.59778C8.19071 1.59778 7.39961 1.83775 6.72673 2.28736C6.05385 2.73697 5.5294 3.37601 5.21971 4.12367C4.91001 4.87134 4.82898 5.69405 4.98686 6.48777C5.14474 7.28149 5.53444 8.01056 6.10668 8.5828C6.67892 9.15504 7.408 9.54474 8.20172 9.70262C8.99544 9.8605 9.81815 9.77947 10.5658 9.46978C11.3135 9.16009 11.9525 8.63564 12.4021 7.96276C12.8517 7.28987 13.0917 6.49878 13.0917 5.68951C13.0917 4.60432 12.6606 3.56357 11.8933 2.79622C11.1259 2.02887 10.0852 1.59778 8.99997 1.59778ZM7.27426 3.9638C7.73195 3.50611 8.35271 3.24899 8.99997 3.24899C9.48266 3.24899 9.95452 3.39212 10.3559 3.66029C10.7572 3.92846 11.07 4.30962 11.2547 4.75556C11.4394 5.20151 11.4878 5.69222 11.3936 6.16563C11.2994 6.63905 11.067 7.07391 10.7257 7.41522C10.3844 7.75654 9.94951 7.98897 9.4761 8.08314C9.00268 8.17731 8.51197 8.12898 8.06603 7.94426C7.62008 7.75954 7.23892 7.44674 6.97075 7.04539C6.70258 6.64405 6.55945 6.1722 6.55945 5.68951C6.55945 5.04224 6.81658 4.42149 7.27426 3.9638ZM7.36691 10.3075C6.28172 10.3075 5.24097 10.7385 4.47362 11.5059C3.70627 12.2732 3.27518 13.314 3.27518 14.3992V17.121C3.27518 17.2763 3.4011 17.4022 3.55643 17.4022H4.64514C4.80047 17.4022 4.92639 17.2763 4.92639 17.121V14.3992C4.92639 13.7519 5.18351 13.1312 5.6412 12.6735C6.09889 12.2158 6.71964 11.9587 7.36691 11.9587H10.633C10.9535 11.9587 11.2709 12.0218 11.567 12.1444C11.8631 12.2671 12.1321 12.4469 12.3588 12.6735C12.5854 12.9001 12.7651 13.1691 12.8878 13.4652C13.0104 13.7613 13.0736 14.0787 13.0736 14.3992V17.121C13.0736 17.2763 13.1995 17.4022 13.3548 17.4022H14.4435C14.5989 17.4022 14.7248 17.2763 14.7248 17.121V14.3992C14.7248 13.314 14.2937 12.2732 13.5263 11.5059C12.759 10.7385 11.7182 10.3075 10.633 10.3075H7.36691Z"})}),(0,et.jsx)("defs",{children:(0,et.jsx)("clipPath",{id:"clip0",children:(0,et.jsx)("rect",{width:"18",height:"18",transform:"translate(0 0.5)"})})})]}))};pr.defaultProps={width:"18",height:"19",viewBox:"0 0 18 19",xmlns:"http://www.w3.org/2000/svg"};pr.displayName="person";Nn=dr.default=pr;var xt={},oo=e=>encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),Tn="%[a-f0-9]{2}",Br=new RegExp("("+Tn+")|([^%]+?)","gi"),Kr=new RegExp("("+Tn+")+","gi");function ir(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],ir(r),ir(n))}function ao(e){try{return decodeURIComponent(e)}catch{for(var t=e.match(Br)||[],r=1;r<t.length;r++)e=ir(t,r).join(""),t=e.match(Br)||[];return e}}function so(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},r=Kr.exec(e);r;){try{t[r[0]]=decodeURIComponent(r[0])}catch{var n=ao(r[0]);n!==r[0]&&(t[r[0]]=n)}r=Kr.exec(e)}t["%C2"]="�";for(var s=Object.keys(t),l=0;l<s.length;l++){var h=s[l];e=e.replace(new RegExp(h,"g"),t[h])}return e}var co=function(e){if(typeof e!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch{return so(e)}},lo=(e,t)=>{if(!(typeof e=="string"&&typeof t=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(t==="")return[e];const r=e.indexOf(t);return r===-1?[e]:[e.slice(0,r),e.slice(r+t.length)]},uo=function(e,t){for(var r={},n=Object.keys(e),s=Array.isArray(t),l=0;l<n.length;l++){var h=n[l],C=e[h];(s?t.indexOf(h)!==-1:t(h,C,e))&&(r[h]=C)}return r};(function(e){const t=oo,r=co,n=lo,s=uo,l=a=>a==null;function h(a){switch(a.arrayFormat){case"index":return o=>(u,f)=>{const g=u.length;return f===void 0||a.skipNull&&f===null||a.skipEmptyString&&f===""?u:f===null?[...u,[x(o,a),"[",g,"]"].join("")]:[...u,[x(o,a),"[",x(g,a),"]=",x(f,a)].join("")]};case"bracket":return o=>(u,f)=>f===void 0||a.skipNull&&f===null||a.skipEmptyString&&f===""?u:f===null?[...u,[x(o,a),"[]"].join("")]:[...u,[x(o,a),"[]=",x(f,a)].join("")];case"comma":case"separator":return o=>(u,f)=>f==null||f.length===0?u:u.length===0?[[x(o,a),"=",x(f,a)].join("")]:[[u,x(f,a)].join(a.arrayFormatSeparator)];default:return o=>(u,f)=>f===void 0||a.skipNull&&f===null||a.skipEmptyString&&f===""?u:f===null?[...u,x(o,a)]:[...u,[x(o,a),"=",x(f,a)].join("")]}}function C(a){let o;switch(a.arrayFormat){case"index":return(u,f,g)=>{if(o=/\[(\d*)\]$/.exec(u),u=u.replace(/\[\d*\]$/,""),!o){g[u]=f;return}g[u]===void 0&&(g[u]={}),g[u][o[1]]=f};case"bracket":return(u,f,g)=>{if(o=/(\[\])$/.exec(u),u=u.replace(/\[\]$/,""),!o){g[u]=f;return}if(g[u]===void 0){g[u]=[f];return}g[u]=[].concat(g[u],f)};case"comma":case"separator":return(u,f,g)=>{const T=typeof f=="string"&&f.includes(a.arrayFormatSeparator),S=typeof f=="string"&&!T&&b(f,a).includes(a.arrayFormatSeparator);f=S?b(f,a):f;const J=T||S?f.split(a.arrayFormatSeparator).map(Z=>b(Z,a)):f===null?f:b(f,a);g[u]=J};default:return(u,f,g)=>{if(g[u]===void 0){g[u]=f;return}g[u]=[].concat(g[u],f)}}}function j(a){if(typeof a!="string"||a.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function x(a,o){return o.encode?o.strict?t(a):encodeURIComponent(a):a}function b(a,o){return o.decode?r(a):a}function _(a){return Array.isArray(a)?a.sort():typeof a=="object"?_(Object.keys(a)).sort((o,u)=>Number(o)-Number(u)).map(o=>a[o]):a}function E(a){const o=a.indexOf("#");return o!==-1&&(a=a.slice(0,o)),a}function P(a){let o="";const u=a.indexOf("#");return u!==-1&&(o=a.slice(u)),o}function d(a){a=E(a);const o=a.indexOf("?");return o===-1?"":a.slice(o+1)}function L(a,o){return o.parseNumbers&&!Number.isNaN(Number(a))&&typeof a=="string"&&a.trim()!==""?a=Number(a):o.parseBooleans&&a!==null&&(a.toLowerCase()==="true"||a.toLowerCase()==="false")&&(a=a.toLowerCase()==="true"),a}function w(a,o){o=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},o),j(o.arrayFormatSeparator);const u=C(o),f=Object.create(null);if(typeof a!="string"||(a=a.trim().replace(/^[?#&]/,""),!a))return f;for(const g of a.split("&")){if(g==="")continue;let[T,S]=n(o.decode?g.replace(/\+/g," "):g,"=");S=S===void 0?null:["comma","separator"].includes(o.arrayFormat)?S:b(S,o),u(b(T,o),S,f)}for(const g of Object.keys(f)){const T=f[g];if(typeof T=="object"&&T!==null)for(const S of Object.keys(T))T[S]=L(T[S],o);else f[g]=L(T,o)}return o.sort===!1?f:(o.sort===!0?Object.keys(f).sort():Object.keys(f).sort(o.sort)).reduce((g,T)=>{const S=f[T];return S&&typeof S=="object"&&!Array.isArray(S)?g[T]=_(S):g[T]=S,g},Object.create(null))}e.extract=d,e.parse=w,e.stringify=(a,o)=>{if(!a)return"";o=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},o),j(o.arrayFormatSeparator);const u=S=>o.skipNull&&l(a[S])||o.skipEmptyString&&a[S]==="",f=h(o),g={};for(const S of Object.keys(a))u(S)||(g[S]=a[S]);const T=Object.keys(g);return o.sort!==!1&&T.sort(o.sort),T.map(S=>{const J=a[S];return J===void 0?"":J===null?x(S,o):Array.isArray(J)?J.reduce(f(S),[]).join("&"):x(S,o)+"="+x(J,o)}).filter(S=>S.length>0).join("&")},e.parseUrl=(a,o)=>{o=Object.assign({decode:!0},o);const[u,f]=n(a,"#");return Object.assign({url:u.split("?")[0]||"",query:w(d(a),o)},o&&o.parseFragmentIdentifier&&f?{fragmentIdentifier:b(f,o)}:{})},e.stringifyUrl=(a,o)=>{o=Object.assign({encode:!0,strict:!0},o);const u=E(a.url).split("?")[0]||"",f=e.extract(a.url),g=e.parse(f,{sort:!1}),T=Object.assign(g,a.query);let S=e.stringify(T,o);S&&(S=`?${S}`);let J=P(a.url);return a.fragmentIdentifier&&(J=`#${x(a.fragmentIdentifier,o)}`),`${u}${S}${J}`},e.pick=(a,o,u)=>{u=Object.assign({parseFragmentIdentifier:!0},u);const{url:f,query:g,fragmentIdentifier:T}=e.parseUrl(a,u);return e.stringifyUrl({url:f,query:s(g,o),fragmentIdentifier:T},u)},e.exclude=(a,o,u)=>{const f=Array.isArray(o)?g=>!o.includes(g):(g,T)=>!o(g,T);return e.pick(a,f,u)}})(xt);const st=Zn,fo={parseNumbers:!1,parseBooleans:!1},po={skipNull:!1,skipEmptyString:!1},mo=(e,t)=>{var r,n;const{navigateMode:s="push",parseOptions:l,stringifyOptions:h}={},C=Object.assign(Object.assign({},fo),l),j=Object.assign(Object.assign({},po),h),x=st.useLocation(),b=(r=st.useHistory)===null||r===void 0?void 0:r.call(st),_=(n=st.useNavigate)===null||n===void 0?void 0:n.call(st),E=Hi(),P=H.useRef(typeof e=="function"?e():e||{}),d=H.useMemo(()=>xt.parse(x.search,C),[x.search]),L=H.useMemo(()=>Object.assign(Object.assign({},P.current),d),[d]);return[L,fr(a=>{const o=typeof a=="function"?a(L):a;E(),b&&b[s]({hash:x.hash,search:xt.stringify(Object.assign(Object.assign({},d),o),j)||"?"},x.state),_&&_({hash:x.hash,search:xt.stringify(Object.assign(Object.assign({},d),o),j)||"?"},{replace:s==="replace",state:x.state})})]},ho=mo;var qt={exports:{}},kt={},Fr;function _n(){if(Fr)return kt;Fr=1;function e(o){"@babel/helpers - typeof";return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},e(o)}function t(o,u,f){return Object.defineProperty(o,"prototype",{writable:!1}),o}function r(o,u){if(!(o instanceof u))throw new TypeError("Cannot call a class as a function")}function n(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),u&&s(o,u)}function s(o,u){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(g,T){return g.__proto__=T,g},s(o,u)}function l(o){var u=j();return function(){var g=x(o),T;if(u){var S=x(this).constructor;T=Reflect.construct(g,arguments,S)}else T=g.apply(this,arguments);return h(this,T)}}function h(o,u){if(u&&(e(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return C(o)}function C(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}function j(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function x(o){return x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(f){return f.__proto__||Object.getPrototypeOf(f)},x(o)}var b={},_,E;function P(o,u,f){f||(f=Error);function g(S,J,Z){return typeof u=="string"?u:u(S,J,Z)}var T=function(S){n(Z,S);var J=l(Z);function Z(G,Y,F){var z;return r(this,Z),z=J.call(this,g(G,Y,F)),z.code=o,z}return t(Z)}(f);b[o]=T}function d(o,u){if(Array.isArray(o)){var f=o.length;return o=o.map(function(g){return String(g)}),f>2?"one of ".concat(u," ").concat(o.slice(0,f-1).join(", "),", or ")+o[f-1]:f===2?"one of ".concat(u," ").concat(o[0]," or ").concat(o[1]):"of ".concat(u," ").concat(o[0])}else return"of ".concat(u," ").concat(String(o))}function L(o,u,f){return o.substr(0,u.length)===u}function w(o,u,f){return(f===void 0||f>o.length)&&(f=o.length),o.substring(f-u.length,f)===u}function a(o,u,f){return typeof f!="number"&&(f=0),f+u.length>o.length?!1:o.indexOf(u,f)!==-1}return P("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),P("ERR_INVALID_ARG_TYPE",function(o,u,f){_===void 0&&(_=or()),_(typeof o=="string","'name' must be a string");var g;typeof u=="string"&&L(u,"not ")?(g="must not be",u=u.replace(/^not /,"")):g="must be";var T;if(w(o," argument"))T="The ".concat(o," ").concat(g," ").concat(d(u,"type"));else{var S=a(o,".")?"property":"argument";T='The "'.concat(o,'" ').concat(S," ").concat(g," ").concat(d(u,"type"))}return T+=". Received type ".concat(e(f)),T},TypeError),P("ERR_INVALID_ARG_VALUE",function(o,u){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";E===void 0&&(E=ft);var g=E.inspect(u);return g.length>128&&(g="".concat(g.slice(0,128),"...")),"The argument '".concat(o,"' ").concat(f,". Received ").concat(g)},TypeError),P("ERR_INVALID_RETURN_VALUE",function(o,u,f){var g;return f&&f.constructor&&f.constructor.name?g="instance of ".concat(f.constructor.name):g="type ".concat(e(f)),"Expected ".concat(o,' to be returned from the "').concat(u,'"')+" function but got ".concat(g,".")},TypeError),P("ERR_MISSING_ARGS",function(){for(var o=arguments.length,u=new Array(o),f=0;f<o;f++)u[f]=arguments[f];_===void 0&&(_=or()),_(u.length>0,"At least one arg needs to be specified");var g="The ",T=u.length;switch(u=u.map(function(S){return'"'.concat(S,'"')}),T){case 1:g+="".concat(u[0]," argument");break;case 2:g+="".concat(u[0]," and ").concat(u[1]," arguments");break;default:g+=u.slice(0,T-1).join(", "),g+=", and ".concat(u[T-1]," arguments");break}return"".concat(g," must be specified")},TypeError),kt.codes=b,kt}var Lt,$r;function go(){if($r)return Lt;$r=1;function e(O,A){var K=Object.keys(O);if(Object.getOwnPropertySymbols){var R=Object.getOwnPropertySymbols(O);A&&(R=R.filter(function(V){return Object.getOwnPropertyDescriptor(O,V).enumerable})),K.push.apply(K,R)}return K}function t(O){for(var A=1;A<arguments.length;A++){var K=arguments[A]!=null?arguments[A]:{};A%2?e(Object(K),!0).forEach(function(R){r(O,R,K[R])}):Object.getOwnPropertyDescriptors?Object.defineProperties(O,Object.getOwnPropertyDescriptors(K)):e(Object(K)).forEach(function(R){Object.defineProperty(O,R,Object.getOwnPropertyDescriptor(K,R))})}return O}function r(O,A,K){return A=h(A),A in O?Object.defineProperty(O,A,{value:K,enumerable:!0,configurable:!0,writable:!0}):O[A]=K,O}function n(O,A){if(!(O instanceof A))throw new TypeError("Cannot call a class as a function")}function s(O,A){for(var K=0;K<A.length;K++){var R=A[K];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(O,h(R.key),R)}}function l(O,A,K){return A&&s(O.prototype,A),Object.defineProperty(O,"prototype",{writable:!1}),O}function h(O){var A=C(O,"string");return o(A)==="symbol"?A:String(A)}function C(O,A){if(o(O)!=="object"||O===null)return O;var K=O[Symbol.toPrimitive];if(K!==void 0){var R=K.call(O,A||"default");if(o(R)!=="object")return R;throw new TypeError("@@toPrimitive must return a primitive value.")}return(A==="string"?String:Number)(O)}function j(O,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function");O.prototype=Object.create(A&&A.prototype,{constructor:{value:O,writable:!0,configurable:!0}}),Object.defineProperty(O,"prototype",{writable:!1}),A&&w(O,A)}function x(O){var A=d();return function(){var R=a(O),V;if(A){var y=a(this).constructor;V=Reflect.construct(R,arguments,y)}else V=R.apply(this,arguments);return b(this,V)}}function b(O,A){if(A&&(o(A)==="object"||typeof A=="function"))return A;if(A!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _(O)}function _(O){if(O===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O}function E(O){var A=typeof Map=="function"?new Map:void 0;return E=function(R){if(R===null||!L(R))return R;if(typeof R!="function")throw new TypeError("Super expression must either be null or a function");if(typeof A<"u"){if(A.has(R))return A.get(R);A.set(R,V)}function V(){return P(R,arguments,a(this).constructor)}return V.prototype=Object.create(R.prototype,{constructor:{value:V,enumerable:!1,writable:!0,configurable:!0}}),w(V,R)},E(O)}function P(O,A,K){return d()?P=Reflect.construct.bind():P=function(V,y,p){var v=[null];v.push.apply(v,y);var D=Function.bind.apply(V,v),N=new D;return p&&w(N,p.prototype),N},P.apply(null,arguments)}function d(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function L(O){return Function.toString.call(O).indexOf("[native code]")!==-1}function w(O,A){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(R,V){return R.__proto__=V,R},w(O,A)}function a(O){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(K){return K.__proto__||Object.getPrototypeOf(K)},a(O)}function o(O){"@babel/helpers - typeof";return o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(A){return typeof A}:function(A){return A&&typeof Symbol=="function"&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A},o(O)}var u=ft,f=u.inspect,g=_n(),T=g.codes.ERR_INVALID_ARG_TYPE;function S(O,A,K){return(K===void 0||K>O.length)&&(K=O.length),O.substring(K-A.length,K)===A}function J(O,A){if(A=Math.floor(A),O.length==0||A==0)return"";var K=O.length*A;for(A=Math.floor(Math.log(A)/Math.log(2));A;)O+=O,A--;return O+=O.substring(0,K-O.length),O}var Z="",G="",Y="",F="",z={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},be=10;function Q(O){var A=Object.keys(O),K=Object.create(Object.getPrototypeOf(O));return A.forEach(function(R){K[R]=O[R]}),Object.defineProperty(K,"message",{value:O.message}),K}function de(O){return f(O,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function xe(O,A,K){var R="",V="",y=0,p="",v=!1,D=de(O),N=D.split(`
|
|
1
|
+
import{r as H,t as Zn,g as Qn,e as Dr,a as Jn}from"./vendor-react-D-afvo_7.js";import{j as i,a3 as se,bD as Xt,bE as er,aP as tr,al as jt,T as qe,M as Et,a2 as nt,br as sr,ad as rt,E as B,aa as Te,a4 as ut,v as Xn,x as mn,aM as ei,a1 as ti,bm as ri,bn as ni,I as ii,aK as oi,aN as ai,bJ as si}from"./vendor-mui-core-CCMNKHtm.js";import{p as Ie,B as rr,b as nr,T as ci,al as li,n as Ur,x as ui,y as fi}from"./vendor-utils-5TjOM6td.js";import{c as di}from"./index-DoZ2YM4T.js";import{a_ as ft,a$ as pi,b0 as mi,b1 as hn,b2 as hi,b3 as gi,b4 as yi,b5 as gn,b6 as bi,b7 as cr,b8 as vi,b9 as xi,ba as wi,bb as ji,o as lr,bc as yn,m as Ei,n as Si,e as _e,B as bn,D as Pi,a5 as Ge,a1 as je,an as Ci,Y as Oi,aE as Ai,a0 as dt,j as Ke,$ as Ii,bd as vn,b as Ye,aq as xn,be as Ri,ax as Ni,af as Ti,aB as _i,aQ as wn,a8 as Di,aR as jn,_ as Ui,bf as En,bg as qi,bh as ki}from"./vendor-arcblock-Bf7AGBSd.js";import{d as St}from"./Add-0_yO_NcD.js";import{d as Li}from"./Loop-gZ2g1v3i.js";import{d as Bi}from"./ViewList-DfGpYdZ-.js";import{L as Ki,S as Fi,d as Sn}from"./list-header-CfBPZZEw.js";import{$ as $i,f as Mi,y as Ce,ap as ur,m as Qe,a0 as Wi,L as Je,aq as zi,h as Ze,B as Pn,ar as Cn,b as Vi}from"./index-uosYiNLl.js";import{x as Hi,u as fr,a as On,k as Gi}from"./vendor-hooks-BKxTDk_P.js";import{u as De,d as qr,W as An}from"./dashboard-B_hsqmQK.js";import{W as Pt}from"./did-address-CLeqbWiu.js";import{P as Be}from"./permission-B0xKCybj.js";import{C as Rt}from"./click-to-copy-Ck4RKrL7.js";import{f as Fe}from"./format-error-C0Ke3VXF.js";import{_ as Yi}from"./useAsync-Ua5iss51.js";import{I as Pe}from"./index-DTzPwoh8.js";import{d as Zi}from"./DeleteOutline-BaOxCgo3.js";import{C as pt}from"./confirm-D7n9Rzfx.js";import{u as mt}from"./session-DutPZhUI.js";import{i as In,a as Ct,p as Rn}from"./util-BY6uUuCk.js";import{b as Qi}from"./sdk-VtyRZZVE.js";import{p as Ji}from"./index-DpOEjWGx.js";import{A as Xi}from"./actions-BvtS-2sJ.js";import{S as eo}from"./shorten-label-CYJeMT7h.js";import"./useLocalStorage-tmIJr51I.js";import"./PlayArrow-C6dXJHO6.js";import"./get-safe-url-BF9qL1PD.js";import"./index-CSkA6M4K.js";import"./useAsyncRetry-EMRT9Ldq.js";import"./useSetState-Crt4S51m.js";import"./MoreHoriz-CwoKs0Gg.js";var dr={};Object.defineProperty(dr,"__esModule",{value:!0});var Nn=dr.default=void 0;to(H);var et=i;function to(e){return e&&e.__esModule?e:{default:e}}function kr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Lr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kr(Object(r),!0).forEach(function(n){ro(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kr(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ro(e,t,r){return(t=no(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function no(e){var t=io(e,"string");return typeof t=="symbol"?t:t+""}function io(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var pr=function(t){return(0,et.jsxs)("svg",Lr(Lr({},t),{},{children:[(0,et.jsx)("g",{clipPath:"url(#clip0)",children:(0,et.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.99997 1.59778C8.19071 1.59778 7.39961 1.83775 6.72673 2.28736C6.05385 2.73697 5.5294 3.37601 5.21971 4.12367C4.91001 4.87134 4.82898 5.69405 4.98686 6.48777C5.14474 7.28149 5.53444 8.01056 6.10668 8.5828C6.67892 9.15504 7.408 9.54474 8.20172 9.70262C8.99544 9.8605 9.81815 9.77947 10.5658 9.46978C11.3135 9.16009 11.9525 8.63564 12.4021 7.96276C12.8517 7.28987 13.0917 6.49878 13.0917 5.68951C13.0917 4.60432 12.6606 3.56357 11.8933 2.79622C11.1259 2.02887 10.0852 1.59778 8.99997 1.59778ZM7.27426 3.9638C7.73195 3.50611 8.35271 3.24899 8.99997 3.24899C9.48266 3.24899 9.95452 3.39212 10.3559 3.66029C10.7572 3.92846 11.07 4.30962 11.2547 4.75556C11.4394 5.20151 11.4878 5.69222 11.3936 6.16563C11.2994 6.63905 11.067 7.07391 10.7257 7.41522C10.3844 7.75654 9.94951 7.98897 9.4761 8.08314C9.00268 8.17731 8.51197 8.12898 8.06603 7.94426C7.62008 7.75954 7.23892 7.44674 6.97075 7.04539C6.70258 6.64405 6.55945 6.1722 6.55945 5.68951C6.55945 5.04224 6.81658 4.42149 7.27426 3.9638ZM7.36691 10.3075C6.28172 10.3075 5.24097 10.7385 4.47362 11.5059C3.70627 12.2732 3.27518 13.314 3.27518 14.3992V17.121C3.27518 17.2763 3.4011 17.4022 3.55643 17.4022H4.64514C4.80047 17.4022 4.92639 17.2763 4.92639 17.121V14.3992C4.92639 13.7519 5.18351 13.1312 5.6412 12.6735C6.09889 12.2158 6.71964 11.9587 7.36691 11.9587H10.633C10.9535 11.9587 11.2709 12.0218 11.567 12.1444C11.8631 12.2671 12.1321 12.4469 12.3588 12.6735C12.5854 12.9001 12.7651 13.1691 12.8878 13.4652C13.0104 13.7613 13.0736 14.0787 13.0736 14.3992V17.121C13.0736 17.2763 13.1995 17.4022 13.3548 17.4022H14.4435C14.5989 17.4022 14.7248 17.2763 14.7248 17.121V14.3992C14.7248 13.314 14.2937 12.2732 13.5263 11.5059C12.759 10.7385 11.7182 10.3075 10.633 10.3075H7.36691Z"})}),(0,et.jsx)("defs",{children:(0,et.jsx)("clipPath",{id:"clip0",children:(0,et.jsx)("rect",{width:"18",height:"18",transform:"translate(0 0.5)"})})})]}))};pr.defaultProps={width:"18",height:"19",viewBox:"0 0 18 19",xmlns:"http://www.w3.org/2000/svg"};pr.displayName="person";Nn=dr.default=pr;var xt={},oo=e=>encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),Tn="%[a-f0-9]{2}",Br=new RegExp("("+Tn+")|([^%]+?)","gi"),Kr=new RegExp("("+Tn+")+","gi");function ir(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],ir(r),ir(n))}function ao(e){try{return decodeURIComponent(e)}catch{for(var t=e.match(Br)||[],r=1;r<t.length;r++)e=ir(t,r).join(""),t=e.match(Br)||[];return e}}function so(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},r=Kr.exec(e);r;){try{t[r[0]]=decodeURIComponent(r[0])}catch{var n=ao(r[0]);n!==r[0]&&(t[r[0]]=n)}r=Kr.exec(e)}t["%C2"]="�";for(var s=Object.keys(t),l=0;l<s.length;l++){var h=s[l];e=e.replace(new RegExp(h,"g"),t[h])}return e}var co=function(e){if(typeof e!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch{return so(e)}},lo=(e,t)=>{if(!(typeof e=="string"&&typeof t=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(t==="")return[e];const r=e.indexOf(t);return r===-1?[e]:[e.slice(0,r),e.slice(r+t.length)]},uo=function(e,t){for(var r={},n=Object.keys(e),s=Array.isArray(t),l=0;l<n.length;l++){var h=n[l],C=e[h];(s?t.indexOf(h)!==-1:t(h,C,e))&&(r[h]=C)}return r};(function(e){const t=oo,r=co,n=lo,s=uo,l=a=>a==null;function h(a){switch(a.arrayFormat){case"index":return o=>(u,f)=>{const g=u.length;return f===void 0||a.skipNull&&f===null||a.skipEmptyString&&f===""?u:f===null?[...u,[x(o,a),"[",g,"]"].join("")]:[...u,[x(o,a),"[",x(g,a),"]=",x(f,a)].join("")]};case"bracket":return o=>(u,f)=>f===void 0||a.skipNull&&f===null||a.skipEmptyString&&f===""?u:f===null?[...u,[x(o,a),"[]"].join("")]:[...u,[x(o,a),"[]=",x(f,a)].join("")];case"comma":case"separator":return o=>(u,f)=>f==null||f.length===0?u:u.length===0?[[x(o,a),"=",x(f,a)].join("")]:[[u,x(f,a)].join(a.arrayFormatSeparator)];default:return o=>(u,f)=>f===void 0||a.skipNull&&f===null||a.skipEmptyString&&f===""?u:f===null?[...u,x(o,a)]:[...u,[x(o,a),"=",x(f,a)].join("")]}}function C(a){let o;switch(a.arrayFormat){case"index":return(u,f,g)=>{if(o=/\[(\d*)\]$/.exec(u),u=u.replace(/\[\d*\]$/,""),!o){g[u]=f;return}g[u]===void 0&&(g[u]={}),g[u][o[1]]=f};case"bracket":return(u,f,g)=>{if(o=/(\[\])$/.exec(u),u=u.replace(/\[\]$/,""),!o){g[u]=f;return}if(g[u]===void 0){g[u]=[f];return}g[u]=[].concat(g[u],f)};case"comma":case"separator":return(u,f,g)=>{const T=typeof f=="string"&&f.includes(a.arrayFormatSeparator),S=typeof f=="string"&&!T&&b(f,a).includes(a.arrayFormatSeparator);f=S?b(f,a):f;const J=T||S?f.split(a.arrayFormatSeparator).map(Z=>b(Z,a)):f===null?f:b(f,a);g[u]=J};default:return(u,f,g)=>{if(g[u]===void 0){g[u]=f;return}g[u]=[].concat(g[u],f)}}}function j(a){if(typeof a!="string"||a.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function x(a,o){return o.encode?o.strict?t(a):encodeURIComponent(a):a}function b(a,o){return o.decode?r(a):a}function _(a){return Array.isArray(a)?a.sort():typeof a=="object"?_(Object.keys(a)).sort((o,u)=>Number(o)-Number(u)).map(o=>a[o]):a}function E(a){const o=a.indexOf("#");return o!==-1&&(a=a.slice(0,o)),a}function P(a){let o="";const u=a.indexOf("#");return u!==-1&&(o=a.slice(u)),o}function d(a){a=E(a);const o=a.indexOf("?");return o===-1?"":a.slice(o+1)}function L(a,o){return o.parseNumbers&&!Number.isNaN(Number(a))&&typeof a=="string"&&a.trim()!==""?a=Number(a):o.parseBooleans&&a!==null&&(a.toLowerCase()==="true"||a.toLowerCase()==="false")&&(a=a.toLowerCase()==="true"),a}function w(a,o){o=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},o),j(o.arrayFormatSeparator);const u=C(o),f=Object.create(null);if(typeof a!="string"||(a=a.trim().replace(/^[?#&]/,""),!a))return f;for(const g of a.split("&")){if(g==="")continue;let[T,S]=n(o.decode?g.replace(/\+/g," "):g,"=");S=S===void 0?null:["comma","separator"].includes(o.arrayFormat)?S:b(S,o),u(b(T,o),S,f)}for(const g of Object.keys(f)){const T=f[g];if(typeof T=="object"&&T!==null)for(const S of Object.keys(T))T[S]=L(T[S],o);else f[g]=L(T,o)}return o.sort===!1?f:(o.sort===!0?Object.keys(f).sort():Object.keys(f).sort(o.sort)).reduce((g,T)=>{const S=f[T];return S&&typeof S=="object"&&!Array.isArray(S)?g[T]=_(S):g[T]=S,g},Object.create(null))}e.extract=d,e.parse=w,e.stringify=(a,o)=>{if(!a)return"";o=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},o),j(o.arrayFormatSeparator);const u=S=>o.skipNull&&l(a[S])||o.skipEmptyString&&a[S]==="",f=h(o),g={};for(const S of Object.keys(a))u(S)||(g[S]=a[S]);const T=Object.keys(g);return o.sort!==!1&&T.sort(o.sort),T.map(S=>{const J=a[S];return J===void 0?"":J===null?x(S,o):Array.isArray(J)?J.reduce(f(S),[]).join("&"):x(S,o)+"="+x(J,o)}).filter(S=>S.length>0).join("&")},e.parseUrl=(a,o)=>{o=Object.assign({decode:!0},o);const[u,f]=n(a,"#");return Object.assign({url:u.split("?")[0]||"",query:w(d(a),o)},o&&o.parseFragmentIdentifier&&f?{fragmentIdentifier:b(f,o)}:{})},e.stringifyUrl=(a,o)=>{o=Object.assign({encode:!0,strict:!0},o);const u=E(a.url).split("?")[0]||"",f=e.extract(a.url),g=e.parse(f,{sort:!1}),T=Object.assign(g,a.query);let S=e.stringify(T,o);S&&(S=`?${S}`);let J=P(a.url);return a.fragmentIdentifier&&(J=`#${x(a.fragmentIdentifier,o)}`),`${u}${S}${J}`},e.pick=(a,o,u)=>{u=Object.assign({parseFragmentIdentifier:!0},u);const{url:f,query:g,fragmentIdentifier:T}=e.parseUrl(a,u);return e.stringifyUrl({url:f,query:s(g,o),fragmentIdentifier:T},u)},e.exclude=(a,o,u)=>{const f=Array.isArray(o)?g=>!o.includes(g):(g,T)=>!o(g,T);return e.pick(a,f,u)}})(xt);const st=Zn,fo={parseNumbers:!1,parseBooleans:!1},po={skipNull:!1,skipEmptyString:!1},mo=(e,t)=>{var r,n;const{navigateMode:s="push",parseOptions:l,stringifyOptions:h}={},C=Object.assign(Object.assign({},fo),l),j=Object.assign(Object.assign({},po),h),x=st.useLocation(),b=(r=st.useHistory)===null||r===void 0?void 0:r.call(st),_=(n=st.useNavigate)===null||n===void 0?void 0:n.call(st),E=Hi(),P=H.useRef(typeof e=="function"?e():e||{}),d=H.useMemo(()=>xt.parse(x.search,C),[x.search]),L=H.useMemo(()=>Object.assign(Object.assign({},P.current),d),[d]);return[L,fr(a=>{const o=typeof a=="function"?a(L):a;E(),b&&b[s]({hash:x.hash,search:xt.stringify(Object.assign(Object.assign({},d),o),j)||"?"},x.state),_&&_({hash:x.hash,search:xt.stringify(Object.assign(Object.assign({},d),o),j)||"?"},{replace:s==="replace",state:x.state})})]},ho=mo;var qt={exports:{}},kt={},Fr;function _n(){if(Fr)return kt;Fr=1;function e(o){"@babel/helpers - typeof";return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},e(o)}function t(o,u,f){return Object.defineProperty(o,"prototype",{writable:!1}),o}function r(o,u){if(!(o instanceof u))throw new TypeError("Cannot call a class as a function")}function n(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),u&&s(o,u)}function s(o,u){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(g,T){return g.__proto__=T,g},s(o,u)}function l(o){var u=j();return function(){var g=x(o),T;if(u){var S=x(this).constructor;T=Reflect.construct(g,arguments,S)}else T=g.apply(this,arguments);return h(this,T)}}function h(o,u){if(u&&(e(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return C(o)}function C(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}function j(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function x(o){return x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(f){return f.__proto__||Object.getPrototypeOf(f)},x(o)}var b={},_,E;function P(o,u,f){f||(f=Error);function g(S,J,Z){return typeof u=="string"?u:u(S,J,Z)}var T=function(S){n(Z,S);var J=l(Z);function Z(G,Y,F){var z;return r(this,Z),z=J.call(this,g(G,Y,F)),z.code=o,z}return t(Z)}(f);b[o]=T}function d(o,u){if(Array.isArray(o)){var f=o.length;return o=o.map(function(g){return String(g)}),f>2?"one of ".concat(u," ").concat(o.slice(0,f-1).join(", "),", or ")+o[f-1]:f===2?"one of ".concat(u," ").concat(o[0]," or ").concat(o[1]):"of ".concat(u," ").concat(o[0])}else return"of ".concat(u," ").concat(String(o))}function L(o,u,f){return o.substr(0,u.length)===u}function w(o,u,f){return(f===void 0||f>o.length)&&(f=o.length),o.substring(f-u.length,f)===u}function a(o,u,f){return typeof f!="number"&&(f=0),f+u.length>o.length?!1:o.indexOf(u,f)!==-1}return P("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),P("ERR_INVALID_ARG_TYPE",function(o,u,f){_===void 0&&(_=or()),_(typeof o=="string","'name' must be a string");var g;typeof u=="string"&&L(u,"not ")?(g="must not be",u=u.replace(/^not /,"")):g="must be";var T;if(w(o," argument"))T="The ".concat(o," ").concat(g," ").concat(d(u,"type"));else{var S=a(o,".")?"property":"argument";T='The "'.concat(o,'" ').concat(S," ").concat(g," ").concat(d(u,"type"))}return T+=". Received type ".concat(e(f)),T},TypeError),P("ERR_INVALID_ARG_VALUE",function(o,u){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";E===void 0&&(E=ft);var g=E.inspect(u);return g.length>128&&(g="".concat(g.slice(0,128),"...")),"The argument '".concat(o,"' ").concat(f,". Received ").concat(g)},TypeError),P("ERR_INVALID_RETURN_VALUE",function(o,u,f){var g;return f&&f.constructor&&f.constructor.name?g="instance of ".concat(f.constructor.name):g="type ".concat(e(f)),"Expected ".concat(o,' to be returned from the "').concat(u,'"')+" function but got ".concat(g,".")},TypeError),P("ERR_MISSING_ARGS",function(){for(var o=arguments.length,u=new Array(o),f=0;f<o;f++)u[f]=arguments[f];_===void 0&&(_=or()),_(u.length>0,"At least one arg needs to be specified");var g="The ",T=u.length;switch(u=u.map(function(S){return'"'.concat(S,'"')}),T){case 1:g+="".concat(u[0]," argument");break;case 2:g+="".concat(u[0]," and ").concat(u[1]," arguments");break;default:g+=u.slice(0,T-1).join(", "),g+=", and ".concat(u[T-1]," arguments");break}return"".concat(g," must be specified")},TypeError),kt.codes=b,kt}var Lt,$r;function go(){if($r)return Lt;$r=1;function e(O,A){var K=Object.keys(O);if(Object.getOwnPropertySymbols){var R=Object.getOwnPropertySymbols(O);A&&(R=R.filter(function(V){return Object.getOwnPropertyDescriptor(O,V).enumerable})),K.push.apply(K,R)}return K}function t(O){for(var A=1;A<arguments.length;A++){var K=arguments[A]!=null?arguments[A]:{};A%2?e(Object(K),!0).forEach(function(R){r(O,R,K[R])}):Object.getOwnPropertyDescriptors?Object.defineProperties(O,Object.getOwnPropertyDescriptors(K)):e(Object(K)).forEach(function(R){Object.defineProperty(O,R,Object.getOwnPropertyDescriptor(K,R))})}return O}function r(O,A,K){return A=h(A),A in O?Object.defineProperty(O,A,{value:K,enumerable:!0,configurable:!0,writable:!0}):O[A]=K,O}function n(O,A){if(!(O instanceof A))throw new TypeError("Cannot call a class as a function")}function s(O,A){for(var K=0;K<A.length;K++){var R=A[K];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(O,h(R.key),R)}}function l(O,A,K){return A&&s(O.prototype,A),Object.defineProperty(O,"prototype",{writable:!1}),O}function h(O){var A=C(O,"string");return o(A)==="symbol"?A:String(A)}function C(O,A){if(o(O)!=="object"||O===null)return O;var K=O[Symbol.toPrimitive];if(K!==void 0){var R=K.call(O,A||"default");if(o(R)!=="object")return R;throw new TypeError("@@toPrimitive must return a primitive value.")}return(A==="string"?String:Number)(O)}function j(O,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function");O.prototype=Object.create(A&&A.prototype,{constructor:{value:O,writable:!0,configurable:!0}}),Object.defineProperty(O,"prototype",{writable:!1}),A&&w(O,A)}function x(O){var A=d();return function(){var R=a(O),V;if(A){var y=a(this).constructor;V=Reflect.construct(R,arguments,y)}else V=R.apply(this,arguments);return b(this,V)}}function b(O,A){if(A&&(o(A)==="object"||typeof A=="function"))return A;if(A!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _(O)}function _(O){if(O===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O}function E(O){var A=typeof Map=="function"?new Map:void 0;return E=function(R){if(R===null||!L(R))return R;if(typeof R!="function")throw new TypeError("Super expression must either be null or a function");if(typeof A<"u"){if(A.has(R))return A.get(R);A.set(R,V)}function V(){return P(R,arguments,a(this).constructor)}return V.prototype=Object.create(R.prototype,{constructor:{value:V,enumerable:!1,writable:!0,configurable:!0}}),w(V,R)},E(O)}function P(O,A,K){return d()?P=Reflect.construct.bind():P=function(V,y,p){var v=[null];v.push.apply(v,y);var D=Function.bind.apply(V,v),N=new D;return p&&w(N,p.prototype),N},P.apply(null,arguments)}function d(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function L(O){return Function.toString.call(O).indexOf("[native code]")!==-1}function w(O,A){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(R,V){return R.__proto__=V,R},w(O,A)}function a(O){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(K){return K.__proto__||Object.getPrototypeOf(K)},a(O)}function o(O){"@babel/helpers - typeof";return o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(A){return typeof A}:function(A){return A&&typeof Symbol=="function"&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A},o(O)}var u=ft,f=u.inspect,g=_n(),T=g.codes.ERR_INVALID_ARG_TYPE;function S(O,A,K){return(K===void 0||K>O.length)&&(K=O.length),O.substring(K-A.length,K)===A}function J(O,A){if(A=Math.floor(A),O.length==0||A==0)return"";var K=O.length*A;for(A=Math.floor(Math.log(A)/Math.log(2));A;)O+=O,A--;return O+=O.substring(0,K-O.length),O}var Z="",G="",Y="",F="",z={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},be=10;function Q(O){var A=Object.keys(O),K=Object.create(Object.getPrototypeOf(O));return A.forEach(function(R){K[R]=O[R]}),Object.defineProperty(K,"message",{value:O.message}),K}function de(O){return f(O,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function xe(O,A,K){var R="",V="",y=0,p="",v=!1,D=de(O),N=D.split(`
|
|
2
2
|
`),q=de(A).split(`
|
|
3
3
|
`),$=0,ne="";if(K==="strictEqual"&&o(O)==="object"&&o(A)==="object"&&O!==null&&A!==null&&(K="strictEqualObject"),N.length===1&&q.length===1&&N[0]!==q[0]){var ue=N[0].length+q[0].length;if(ue<=be){if((o(O)!=="object"||O===null)&&(o(A)!=="object"||A===null)&&(O!==0||A!==0))return"".concat(z[K],`
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as f}from"./vendor-react-D-afvo_7.js";import{j as e,a1 as xe,E as x,a4 as Te,T as k,a3 as y,aa as ce,A as ue,a2 as ne,ah as De,aj as be,x as Se,R as Ae,V as Ee,bD as Ie,cn as Le,cl as ke,aN as Oe,bJ as Pe}from"./vendor-mui-core-CCMNKHtm.js";import{b as M,z as Fe,A as ze,ap as ae}from"./vendor-utils-5TjOM6td.js";import{b as z,j as q,_ as ye,ay as W,e as V,a5 as _e,bg as Be,B as Ke,aR as We,bv as qe}from"./vendor-arcblock-Bf7AGBSd.js";import{y as Ue,E as L,m as $e,G as fe}from"./index-uosYiNLl.js";import{b as re}from"./dashboard-B_hsqmQK.js";import{d as Q}from"./vendor-hooks-BKxTDk_P.js";import{p as Me}from"./util-BY6uUuCk.js";import{W as Ve}from"./did-address-CLeqbWiu.js";import{S as X}from"./shorten-label-CYJeMT7h.js";import{c as me}from"./index-DoZ2YM4T.js";import{a as He}from"./list-yjVo8vxH.js";import{D as Ge,g as Je}from"./traffic-1TtyUzFO.js";import{R as Qe}from"./relative-time-C36uWHLw.js";import{B as Xe}from"./bundle-avatar-TEUPlhi2.js";import{B as Ye}from"./index-CSkA6M4K.js";import"./useLocalStorage-tmIJr51I.js";import"./confirm-D7n9Rzfx.js";import"./format-error-C0Ke3VXF.js";import"./PlayArrow-C6dXJHO6.js";import"./get-safe-url-BsKINLVF.js";import"./session-DutPZhUI.js";import"./useAsyncRetry-EMRT9Ldq.js";import"./useAsync-Ua5iss51.js";import"./useSetState-Crt4S51m.js";import"./index-DE_r-gh_.js";import"./InfoOutlined-DZAeG3v-.js";import"./iframe-Cn--d9nR.js";import"./LaunchOutlined-BUOyH9Rv.js";import"./ChevronLeft-CYpg5M_K.js";import"./ChevronRight-DORpkdoL.js";import"./index-D5mFr1eo.js";import"./vendor-mui-x-DmPVvZFJ.js";const je=f.createContext({}),{Provider:Ze,Consumer:ss}=je;function et({children:t,blocklet:i=""}){const{api:o,inService:u,ws:{useSubscription:d}}=Ue(),[c,p]=f.useState([]),[S,w]=f.useState({total:0,pageSize:20,pageCount:0,page:1}),[b,E]=f.useState(!1),T=Q(()=>{var C;return(C=i.meta)==null?void 0:C.did},[i]),[_,D]=f.useState({}),B=async({page:C=1,pageSize:h=20,...v}={})=>{if(!(b||!T))try{E(!0);const R={paging:{page:C,pageSize:h},...v,userName:v.searchText||"",teamDid:T,dateRange:v.dateRange?[L(v.dateRange[0]).toISOString(),L(v.dateRange[1]).toISOString()]:void 0},P=await o.getNotificationSendLog({input:R});D(R);const F=P.list.map(K=>({...K,receiverUser:{...K.receiverUser,avatar:Me(K.receiverUser.avatar,T,u)}}));p(F),w(P.paging),E(!1)}catch(R){q.error(R.message),E(!1)}},O=f.useCallback(C=>{const h=i.children.find(v=>{var R;return((R=v.meta)==null?void 0:R.did)===C});if(h)return h.ancestors=[i],h},[i]),m=async({notificationReceiverIds:C,channels:h,...v})=>{await o.resendNotification({input:{teamDid:T,notificationReceiverIds:C,channels:h.map(R=>R==="wallet"?z.NOTIFICATION_SEND_CHANNEL.WALLET:R==="pushKit"?z.NOTIFICATION_SEND_CHANNEL.PUSH:R),...v}})},j=f.useCallback(async C=>(await o.getUser({input:{teamDid:T,user:{did:C}}})).user,[o,T]);d(`${z.EVENTS.NOTIFICATION_BLOCKLET_CREATE}`,C=>{C&&B(_)},[_]);const N={loading:b,fetch:B,data:c,paging:S,blocklet:i,getComponent:O,resendNotification:m,getUser:j};return e.jsx(Ze,{value:{notificationRecords:N},children:t})}function Re(){const{notificationRecords:t}=f.useContext(je);return t}var de={},tt=xe;Object.defineProperty(de,"__esModule",{value:!0});var Ce=de.default=void 0,st=tt(ye()),nt=e;Ce=de.default=(0,st.default)((0,nt.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2M4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12m8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8"}),"Block");var pe={},at=xe;Object.defineProperty(pe,"__esModule",{value:!0});var we=pe.default=void 0,it=at(ye()),ot=e;we=pe.default=(0,it.default)((0,ot.jsx)("path",{d:"M16.59 7.58 10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"CheckCircleOutline");const rt=(t,i,o="")=>{if(!o||!i)return"";switch(o){case z.NOTIFICATION_SEND_FAILED_REASON.USER_DISABLED:return t("notification.sendStatus.reason.disabled",{channel:i});case z.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_UNAVAILABLE:return t("notification.sendStatus.reason.unavailable",{channel:i});case z.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_DISABLED:return t("notification.sendStatus.reason.notSent",{channel:i});case z.NOTIFICATION_SEND_FAILED_REASON.NOT_ONLINE:return t("notification.sendStatus.reason.offline");default:return o}};function ee(t,i,o={}){const{status:u,updatedAt:d,reason:c="",channel:p="wallet"}=o,S=d?t("notification.sendStatus.sentTime",{date:$e(d,i)}):"",w=rt(t,p,c);return u===z.NOTIFICATION_SEND_STATUS.FAILED?{status:"failed",title:t("notification.sendStatus.failed"),sentTime:S,reason:w}:u===z.NOTIFICATION_SEND_STATUS.SENT?{status:"success",title:t("notification.sendStatus.success"),sentTime:S}:{status:"unsent",title:t("notification.sendStatus.unsent"),reason:w,sentTime:S}}const he={unsent:"#aaaaaa",success:"#34BE74",failed:"#D0021B"},le=["wallet","pushKit","email"],lt=(t,i)=>{var d,c;const{settings:o}=t,u=M(i,"extra.notifications.email",!0);return{available:(c=(d=o==null?void 0:o.notification)==null?void 0:d.email)==null?void 0:c.enabled,enabled:u}},ct=(t,i)=>{var d,c;const{settings:o}=t,u=M(i,"extra.notifications.push",!0);return{available:(c=(d=o==null?void 0:o.notification)==null?void 0:d.pushKit)==null?void 0:c.enabled,enabled:u}},ut=t=>({enabled:M(t,"extra.notifications.wallet",!0)}),dt=t=>({enabled:M(t,"extra.webhooks",[]).length>0}),ge=(t=3e3)=>new Promise(i=>{setTimeout(()=>{i()},t)}),pt=(t,i)=>i==="wallet"||i==="webhook"?[{channel:i,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:i}),fail:t("notification.sendStatus.reason.disabled",{channel:i})}]:i==="pushKit"||i==="email"?[{channel:i,type:"available",pass:t("notification.sendStatus.reason.available",{channel:i}),fail:t("notification.sendStatus.reason.unavailable",{channel:i})},{channel:i,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:i}),fail:t("notification.sendStatus.reason.disabled",{channel:i})}]:[],ft=t=>{const i={},o=L().startOf("day");le.forEach(c=>{const p=`${c}SendRecord`,w=M(t,p,[]).filter(b=>L(b.sendAt).isSame(o,"day")).length;i[c]=w});const u=M(t,"webhook",{}),d=Object.keys(u??{})??[];return d.length>0&&d.forEach(c=>{const S=(u[c]??[]).filter(w=>L(w.sendAt).isSame(o,"day")).length;i[c]=S}),i};function U({config:t,enableTooltip:i=!0}){const{status:o,title:u="",sentTime:d="",reason:c=""}=t,p=[u,c].filter(Boolean).join(", ");return e.jsx(Te,{title:i?e.jsxs(e.Fragment,{children:[e.jsx(k,{color:"inherit",sx:{fontSize:12},children:p}),e.jsx("span",{children:d})]}):null,arrow:!0,placement:"top",children:e.jsxs(y,{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center",children:[e.jsx(y,{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:he[o],style:{opacity:.15}}),e.jsx(y,{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:he[o]})]})})}U.propTypes={config:x.object.isRequired,enableTooltip:x.bool};U.defaultProps={enableTooltip:!0};ve.propTypes={notification:x.object.isRequired,onCancel:x.func,blocklet:x.object.isRequired,resendChannel:x.array,refresh:x.func};function ve({notification:t,onCancel:i=()=>{},blocklet:o,resendChannel:u="",refresh:d=()=>{}}){const{t:c,locale:p}=V(),{getComponent:S,resendNotification:w,getUser:b}=Re(),[E,T]=f.useState([]),[_,D]=f.useState([]),[B,O]=f.useState(null),[m,j]=f.useState(null),N=f.useRef({}),C=Q(()=>S(t.componentId)||o,[o,t.componentId]),h=Q(()=>{var r;return(r=t==null?void 0:t.receivers)==null?void 0:r[0]},[t.receivers]),v=Q(()=>ft(h),[h]),R=f.useCallback(async r=>{const{receiver:s}=h??{};if(!s)return!1;const n=await b(s);return n?r==="wallet"?ut(n):r==="email"?lt(o,n):r==="pushKit"?ct(o,n):r==="webhook"?dt(n):!0:!1},[h,b,o]);f.useEffect(()=>{if(!h)T([]);else{const r=le.map(n=>{const a=h[`${n}SendStatus`],l=h[`${n}SendAt`],g=h[`${n}SendFailedReason`],A=ee(c,p,{status:a,updatedAt:l,reason:g,channel:n});return{type:n,extra:A}});T(r);const s=(h==null?void 0:h.webhook)||{};D(Object.entries(s))}},[h,p,c]);const P=f.useCallback(async(r,s="")=>{const{id:n}=h??{};if(n)try{await w({notificationReceiverIds:[n],channels:[r],...r==="webhook"&&s?{webhookUrls:[s]}:{}}),q.success("Message has been sent!"),r!=="webhook"&&(await ge(1e3),O(null))}catch(a){console.error("handleResend error",{error:a}),q.error(a.response?a.response.statusText:a.message)}},[w,h]),F=async(r,s)=>{if(s==null||s.stopPropagation(),v[r.type]>=4){q.warning(c("notification.resendLimit"));return}if(s&&O(s==null?void 0:s.currentTarget),j({channel:r.type}),!(!r||r.checking)){T(a=>a.map(l=>r.type===l.type?{...l,checking:!0}:l));try{const a=await R(r.type);await ge(),j({channel:r.type,result:a}),(typeof a=="boolean"&&a||Fe(a)&&Object.values(a).every(l=>!!l))&&(await P(r.type),d()),T(l=>l.map(g=>r.type===g.type?{...g,checking:!1}:g))}catch(a){console.error("handleResend error",{error:a})}}},K=async(r,s=null)=>{if(s==null||s.stopPropagation(),v[r]>=4){q.warning(c("notification.resendLimit"));return}D(a=>a.map(l=>r===l[0]?[...l.slice(0,2),!0]:l));try{await P("webhook",r),D(a=>a.map(l=>r===l[0]?[...l.slice(0,2),!0]:l)),d()}catch(a){console.error("handleResend error",{error:a})}};f.useEffect(()=>{u&&setTimeout(()=>{const r=N.current[u];r&&(le.includes(u)?(O(r),F({type:u})):K(u))},500)},[u]);const te=()=>{O(null)},$=f.useCallback(r=>pt(c,r),[c]),G=!!B,se=G?"check-resend-popover":void 0;return e.jsx(_e,{title:c("notification.notificationDetails"),onClose:i,open:!0,PaperProps:{style:{maxWidth:832,maxHeight:"80vh"}},fullWidth:!0,actionsPosition:"left",children:e.jsxs(mt,{children:[e.jsx(He,{notification:t,blocklet:C}),E.length>0&&e.jsx(y,{className:"notification-resend-section",display:"flex",flexDirection:"column",gap:1,children:E.map(r=>e.jsxs(y,{className:"channel-item",children:[e.jsx(ue,{size:"small",label:e.jsxs(y,{color:"inherit",sx:{fontSize:12,display:"flex",alignItems:"center"},children:[e.jsxs(k,{component:"span",style:{display:"inline-block",fontSize:12,textTransform:"capitalize",fontWeight:500,marginRight:4},children:[r.type,":"," "]}),e.jsxs(y,{display:"flex",alignItems:"center",sx:{gap:"4px"},children:[e.jsx(U,{config:r.extra}),e.jsx("span",{children:r.extra.title})]})]})},r.type),r.extra.status!=="success"&&e.jsxs(k,{ref:s=>{N.current[r.type]=s},component:"span",sx:{color:W.primary.main},className:me("resend-btn",{disabled:r.checking||v[r.type]>=4}),onClick:s=>F(r,s),children:[r.checking?e.jsx(ne,{size:12,sx:{color:W.primary.main}}):e.jsx(re,{}),e.jsx("span",{style:{marginLeft:4},children:c("notification.resend")})]})]},r.type))}),_.length>0&&e.jsxs(y,{className:"webhook-section",sx:{paddingLeft:"56px"},children:[e.jsx(De,{textAlign:"left",sx:{mt:1,mb:1},children:"Webhook"}),e.jsx(y,{className:"notification-resend-section",display:"flex",flexDirection:"column",gap:1,style:{paddingLeft:0},children:_.map(([r,s,n])=>{const a=s[0],l=ee(c,p,{...a,updatedAt:a.sendAt,reason:a.failedReason,channel:"webhook"});return e.jsxs(y,{className:"channel-item",display:"flex",alignItems:"center",sx:{gap:"4px",fontSize:12},children:[e.jsx(X,{maxLength:30,children:r}),e.jsxs(y,{display:"flex",alignItems:"center",sx:{gap:"4px"},children:[e.jsx(U,{config:l}),e.jsx("span",{children:l.title})]}),l.status!=="success"&&e.jsxs(k,{ref:g=>{N.current[r]=g},component:"span",sx:{color:W.primary.main},className:me("resend-btn",{disabled:n||v[r]>=4}),onClick:g=>K(r,g),children:[n?e.jsx(ne,{size:12,sx:{color:W.primary.main}}):e.jsx(re,{}),e.jsx("span",{style:{marginLeft:4},children:c("notification.resend")})]})]},r)})})]}),e.jsx(be,{id:se,open:G,anchorEl:B,onClose:te,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsxs(ht,{children:[e.jsxs(k,{variant:"body1",component:"div",className:"check-title",children:[m==null?void 0:m.channel," Checking"]}),e.jsx(y,{display:"flex",flexDirection:"column",sx:{gap:"4px"},children:$(m==null?void 0:m.channel).map(r=>{var l,g;const{type:s,pass:n,fail:a}=r;return!(m!=null&&m.result)||(l=m==null?void 0:m.result)!=null&&l[s]?e.jsxs(k,{variant:"body1",component:"div",className:"check-item",display:"flex",alignItems:"center",sx:{gap:"4px",color:(g=m==null?void 0:m.result)!=null&&g[s]?W.success.main:"inherit"},children:[m!=null&&m.result?e.jsx(we,{}):e.jsx(ne,{size:12,sx:{color:W.primary.main}}),e.jsx("span",{children:n})]},s):e.jsxs(k,{variant:"body1",component:"div",display:"flex",alignItems:"center",className:"check-item",sx:{gap:"4px",color:W.error.main},children:[e.jsx(Ce,{}),e.jsx("span",{children:a})]},s)})})]})})]})})}const mt=ce.div`
|
|
1
|
+
import{r as f}from"./vendor-react-D-afvo_7.js";import{j as e,a1 as xe,E as x,a4 as Te,T as k,a3 as y,aa as ce,A as ue,a2 as ne,ah as De,aj as be,x as Se,R as Ae,V as Ee,bD as Ie,cn as Le,cl as ke,aN as Oe,bJ as Pe}from"./vendor-mui-core-CCMNKHtm.js";import{b as M,z as Fe,A as ze,ap as ae}from"./vendor-utils-5TjOM6td.js";import{b as z,j as q,_ as ye,ay as W,e as V,a5 as _e,bg as Be,B as Ke,aR as We,bv as qe}from"./vendor-arcblock-Bf7AGBSd.js";import{y as Ue,E as L,m as $e,G as fe}from"./index-uosYiNLl.js";import{b as re}from"./dashboard-B_hsqmQK.js";import{d as Q}from"./vendor-hooks-BKxTDk_P.js";import{p as Me}from"./util-BY6uUuCk.js";import{W as Ve}from"./did-address-CLeqbWiu.js";import{S as X}from"./shorten-label-CYJeMT7h.js";import{c as me}from"./index-DoZ2YM4T.js";import{a as He}from"./list-yjVo8vxH.js";import{D as Ge,g as Je}from"./traffic-1TtyUzFO.js";import{R as Qe}from"./relative-time-C36uWHLw.js";import{B as Xe}from"./bundle-avatar-TEUPlhi2.js";import{B as Ye}from"./index-CSkA6M4K.js";import"./useLocalStorage-tmIJr51I.js";import"./confirm-D7n9Rzfx.js";import"./format-error-C0Ke3VXF.js";import"./PlayArrow-C6dXJHO6.js";import"./get-safe-url-BF9qL1PD.js";import"./session-DutPZhUI.js";import"./useAsyncRetry-EMRT9Ldq.js";import"./useAsync-Ua5iss51.js";import"./useSetState-Crt4S51m.js";import"./index-DE_r-gh_.js";import"./InfoOutlined-DZAeG3v-.js";import"./iframe-Cn--d9nR.js";import"./LaunchOutlined-BUOyH9Rv.js";import"./ChevronLeft-CYpg5M_K.js";import"./ChevronRight-DORpkdoL.js";import"./index-D5mFr1eo.js";import"./vendor-mui-x-DmPVvZFJ.js";const je=f.createContext({}),{Provider:Ze,Consumer:ss}=je;function et({children:t,blocklet:i=""}){const{api:o,inService:u,ws:{useSubscription:d}}=Ue(),[c,p]=f.useState([]),[S,w]=f.useState({total:0,pageSize:20,pageCount:0,page:1}),[b,E]=f.useState(!1),T=Q(()=>{var C;return(C=i.meta)==null?void 0:C.did},[i]),[_,D]=f.useState({}),B=async({page:C=1,pageSize:h=20,...v}={})=>{if(!(b||!T))try{E(!0);const R={paging:{page:C,pageSize:h},...v,userName:v.searchText||"",teamDid:T,dateRange:v.dateRange?[L(v.dateRange[0]).toISOString(),L(v.dateRange[1]).toISOString()]:void 0},P=await o.getNotificationSendLog({input:R});D(R);const F=P.list.map(K=>({...K,receiverUser:{...K.receiverUser,avatar:Me(K.receiverUser.avatar,T,u)}}));p(F),w(P.paging),E(!1)}catch(R){q.error(R.message),E(!1)}},O=f.useCallback(C=>{const h=i.children.find(v=>{var R;return((R=v.meta)==null?void 0:R.did)===C});if(h)return h.ancestors=[i],h},[i]),m=async({notificationReceiverIds:C,channels:h,...v})=>{await o.resendNotification({input:{teamDid:T,notificationReceiverIds:C,channels:h.map(R=>R==="wallet"?z.NOTIFICATION_SEND_CHANNEL.WALLET:R==="pushKit"?z.NOTIFICATION_SEND_CHANNEL.PUSH:R),...v}})},j=f.useCallback(async C=>(await o.getUser({input:{teamDid:T,user:{did:C}}})).user,[o,T]);d(`${z.EVENTS.NOTIFICATION_BLOCKLET_CREATE}`,C=>{C&&B(_)},[_]);const N={loading:b,fetch:B,data:c,paging:S,blocklet:i,getComponent:O,resendNotification:m,getUser:j};return e.jsx(Ze,{value:{notificationRecords:N},children:t})}function Re(){const{notificationRecords:t}=f.useContext(je);return t}var de={},tt=xe;Object.defineProperty(de,"__esModule",{value:!0});var Ce=de.default=void 0,st=tt(ye()),nt=e;Ce=de.default=(0,st.default)((0,nt.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2M4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12m8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8"}),"Block");var pe={},at=xe;Object.defineProperty(pe,"__esModule",{value:!0});var we=pe.default=void 0,it=at(ye()),ot=e;we=pe.default=(0,it.default)((0,ot.jsx)("path",{d:"M16.59 7.58 10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"CheckCircleOutline");const rt=(t,i,o="")=>{if(!o||!i)return"";switch(o){case z.NOTIFICATION_SEND_FAILED_REASON.USER_DISABLED:return t("notification.sendStatus.reason.disabled",{channel:i});case z.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_UNAVAILABLE:return t("notification.sendStatus.reason.unavailable",{channel:i});case z.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_DISABLED:return t("notification.sendStatus.reason.notSent",{channel:i});case z.NOTIFICATION_SEND_FAILED_REASON.NOT_ONLINE:return t("notification.sendStatus.reason.offline");default:return o}};function ee(t,i,o={}){const{status:u,updatedAt:d,reason:c="",channel:p="wallet"}=o,S=d?t("notification.sendStatus.sentTime",{date:$e(d,i)}):"",w=rt(t,p,c);return u===z.NOTIFICATION_SEND_STATUS.FAILED?{status:"failed",title:t("notification.sendStatus.failed"),sentTime:S,reason:w}:u===z.NOTIFICATION_SEND_STATUS.SENT?{status:"success",title:t("notification.sendStatus.success"),sentTime:S}:{status:"unsent",title:t("notification.sendStatus.unsent"),reason:w,sentTime:S}}const he={unsent:"#aaaaaa",success:"#34BE74",failed:"#D0021B"},le=["wallet","pushKit","email"],lt=(t,i)=>{var d,c;const{settings:o}=t,u=M(i,"extra.notifications.email",!0);return{available:(c=(d=o==null?void 0:o.notification)==null?void 0:d.email)==null?void 0:c.enabled,enabled:u}},ct=(t,i)=>{var d,c;const{settings:o}=t,u=M(i,"extra.notifications.push",!0);return{available:(c=(d=o==null?void 0:o.notification)==null?void 0:d.pushKit)==null?void 0:c.enabled,enabled:u}},ut=t=>({enabled:M(t,"extra.notifications.wallet",!0)}),dt=t=>({enabled:M(t,"extra.webhooks",[]).length>0}),ge=(t=3e3)=>new Promise(i=>{setTimeout(()=>{i()},t)}),pt=(t,i)=>i==="wallet"||i==="webhook"?[{channel:i,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:i}),fail:t("notification.sendStatus.reason.disabled",{channel:i})}]:i==="pushKit"||i==="email"?[{channel:i,type:"available",pass:t("notification.sendStatus.reason.available",{channel:i}),fail:t("notification.sendStatus.reason.unavailable",{channel:i})},{channel:i,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:i}),fail:t("notification.sendStatus.reason.disabled",{channel:i})}]:[],ft=t=>{const i={},o=L().startOf("day");le.forEach(c=>{const p=`${c}SendRecord`,w=M(t,p,[]).filter(b=>L(b.sendAt).isSame(o,"day")).length;i[c]=w});const u=M(t,"webhook",{}),d=Object.keys(u??{})??[];return d.length>0&&d.forEach(c=>{const S=(u[c]??[]).filter(w=>L(w.sendAt).isSame(o,"day")).length;i[c]=S}),i};function U({config:t,enableTooltip:i=!0}){const{status:o,title:u="",sentTime:d="",reason:c=""}=t,p=[u,c].filter(Boolean).join(", ");return e.jsx(Te,{title:i?e.jsxs(e.Fragment,{children:[e.jsx(k,{color:"inherit",sx:{fontSize:12},children:p}),e.jsx("span",{children:d})]}):null,arrow:!0,placement:"top",children:e.jsxs(y,{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center",children:[e.jsx(y,{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:he[o],style:{opacity:.15}}),e.jsx(y,{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:he[o]})]})})}U.propTypes={config:x.object.isRequired,enableTooltip:x.bool};U.defaultProps={enableTooltip:!0};ve.propTypes={notification:x.object.isRequired,onCancel:x.func,blocklet:x.object.isRequired,resendChannel:x.array,refresh:x.func};function ve({notification:t,onCancel:i=()=>{},blocklet:o,resendChannel:u="",refresh:d=()=>{}}){const{t:c,locale:p}=V(),{getComponent:S,resendNotification:w,getUser:b}=Re(),[E,T]=f.useState([]),[_,D]=f.useState([]),[B,O]=f.useState(null),[m,j]=f.useState(null),N=f.useRef({}),C=Q(()=>S(t.componentId)||o,[o,t.componentId]),h=Q(()=>{var r;return(r=t==null?void 0:t.receivers)==null?void 0:r[0]},[t.receivers]),v=Q(()=>ft(h),[h]),R=f.useCallback(async r=>{const{receiver:s}=h??{};if(!s)return!1;const n=await b(s);return n?r==="wallet"?ut(n):r==="email"?lt(o,n):r==="pushKit"?ct(o,n):r==="webhook"?dt(n):!0:!1},[h,b,o]);f.useEffect(()=>{if(!h)T([]);else{const r=le.map(n=>{const a=h[`${n}SendStatus`],l=h[`${n}SendAt`],g=h[`${n}SendFailedReason`],A=ee(c,p,{status:a,updatedAt:l,reason:g,channel:n});return{type:n,extra:A}});T(r);const s=(h==null?void 0:h.webhook)||{};D(Object.entries(s))}},[h,p,c]);const P=f.useCallback(async(r,s="")=>{const{id:n}=h??{};if(n)try{await w({notificationReceiverIds:[n],channels:[r],...r==="webhook"&&s?{webhookUrls:[s]}:{}}),q.success("Message has been sent!"),r!=="webhook"&&(await ge(1e3),O(null))}catch(a){console.error("handleResend error",{error:a}),q.error(a.response?a.response.statusText:a.message)}},[w,h]),F=async(r,s)=>{if(s==null||s.stopPropagation(),v[r.type]>=4){q.warning(c("notification.resendLimit"));return}if(s&&O(s==null?void 0:s.currentTarget),j({channel:r.type}),!(!r||r.checking)){T(a=>a.map(l=>r.type===l.type?{...l,checking:!0}:l));try{const a=await R(r.type);await ge(),j({channel:r.type,result:a}),(typeof a=="boolean"&&a||Fe(a)&&Object.values(a).every(l=>!!l))&&(await P(r.type),d()),T(l=>l.map(g=>r.type===g.type?{...g,checking:!1}:g))}catch(a){console.error("handleResend error",{error:a})}}},K=async(r,s=null)=>{if(s==null||s.stopPropagation(),v[r]>=4){q.warning(c("notification.resendLimit"));return}D(a=>a.map(l=>r===l[0]?[...l.slice(0,2),!0]:l));try{await P("webhook",r),D(a=>a.map(l=>r===l[0]?[...l.slice(0,2),!0]:l)),d()}catch(a){console.error("handleResend error",{error:a})}};f.useEffect(()=>{u&&setTimeout(()=>{const r=N.current[u];r&&(le.includes(u)?(O(r),F({type:u})):K(u))},500)},[u]);const te=()=>{O(null)},$=f.useCallback(r=>pt(c,r),[c]),G=!!B,se=G?"check-resend-popover":void 0;return e.jsx(_e,{title:c("notification.notificationDetails"),onClose:i,open:!0,PaperProps:{style:{maxWidth:832,maxHeight:"80vh"}},fullWidth:!0,actionsPosition:"left",children:e.jsxs(mt,{children:[e.jsx(He,{notification:t,blocklet:C}),E.length>0&&e.jsx(y,{className:"notification-resend-section",display:"flex",flexDirection:"column",gap:1,children:E.map(r=>e.jsxs(y,{className:"channel-item",children:[e.jsx(ue,{size:"small",label:e.jsxs(y,{color:"inherit",sx:{fontSize:12,display:"flex",alignItems:"center"},children:[e.jsxs(k,{component:"span",style:{display:"inline-block",fontSize:12,textTransform:"capitalize",fontWeight:500,marginRight:4},children:[r.type,":"," "]}),e.jsxs(y,{display:"flex",alignItems:"center",sx:{gap:"4px"},children:[e.jsx(U,{config:r.extra}),e.jsx("span",{children:r.extra.title})]})]})},r.type),r.extra.status!=="success"&&e.jsxs(k,{ref:s=>{N.current[r.type]=s},component:"span",sx:{color:W.primary.main},className:me("resend-btn",{disabled:r.checking||v[r.type]>=4}),onClick:s=>F(r,s),children:[r.checking?e.jsx(ne,{size:12,sx:{color:W.primary.main}}):e.jsx(re,{}),e.jsx("span",{style:{marginLeft:4},children:c("notification.resend")})]})]},r.type))}),_.length>0&&e.jsxs(y,{className:"webhook-section",sx:{paddingLeft:"56px"},children:[e.jsx(De,{textAlign:"left",sx:{mt:1,mb:1},children:"Webhook"}),e.jsx(y,{className:"notification-resend-section",display:"flex",flexDirection:"column",gap:1,style:{paddingLeft:0},children:_.map(([r,s,n])=>{const a=s[0],l=ee(c,p,{...a,updatedAt:a.sendAt,reason:a.failedReason,channel:"webhook"});return e.jsxs(y,{className:"channel-item",display:"flex",alignItems:"center",sx:{gap:"4px",fontSize:12},children:[e.jsx(X,{maxLength:30,children:r}),e.jsxs(y,{display:"flex",alignItems:"center",sx:{gap:"4px"},children:[e.jsx(U,{config:l}),e.jsx("span",{children:l.title})]}),l.status!=="success"&&e.jsxs(k,{ref:g=>{N.current[r]=g},component:"span",sx:{color:W.primary.main},className:me("resend-btn",{disabled:n||v[r]>=4}),onClick:g=>K(r,g),children:[n?e.jsx(ne,{size:12,sx:{color:W.primary.main}}):e.jsx(re,{}),e.jsx("span",{style:{marginLeft:4},children:c("notification.resend")})]})]},r)})})]}),e.jsx(be,{id:se,open:G,anchorEl:B,onClose:te,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsxs(ht,{children:[e.jsxs(k,{variant:"body1",component:"div",className:"check-title",children:[m==null?void 0:m.channel," Checking"]}),e.jsx(y,{display:"flex",flexDirection:"column",sx:{gap:"4px"},children:$(m==null?void 0:m.channel).map(r=>{var l,g;const{type:s,pass:n,fail:a}=r;return!(m!=null&&m.result)||(l=m==null?void 0:m.result)!=null&&l[s]?e.jsxs(k,{variant:"body1",component:"div",className:"check-item",display:"flex",alignItems:"center",sx:{gap:"4px",color:(g=m==null?void 0:m.result)!=null&&g[s]?W.success.main:"inherit"},children:[m!=null&&m.result?e.jsx(we,{}):e.jsx(ne,{size:12,sx:{color:W.primary.main}}),e.jsx("span",{children:n})]},s):e.jsxs(k,{variant:"body1",component:"div",display:"flex",alignItems:"center",className:"check-item",sx:{gap:"4px",color:W.error.main},children:[e.jsx(Ce,{}),e.jsx("span",{children:a})]},s)})})]})})]})})}const mt=ce.div`
|
|
2
2
|
& > .notification-row {
|
|
3
3
|
padding: 0;
|
|
4
4
|
}
|