@abtnode/webapp 1.16.25-beta-be3a37f4 → 1.16.25-beta-cfcab4af
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/blocklet.js +1 -1
- package/blocklet.yml +1 -1
- package/build/asset-manifest.json +53 -54
- package/build/index.html +1 -1
- package/build/service-worker.js +1 -1
- package/build/static/css/2677.bceba133.chunk.css +1 -0
- package/build/static/js/{1059.6e162d98.chunk.js → 1059.ca2cbdc1.chunk.js} +1 -1
- package/build/static/js/{1575.aa6c5f63.chunk.js → 1575.898bc099.chunk.js} +1 -1
- package/build/static/js/{1685.79e259fc.chunk.js → 1685.8aa7ded2.chunk.js} +2 -2
- package/build/static/js/{1846.b13a01b8.chunk.js → 1846.8091d9b8.chunk.js} +1 -1
- package/build/static/js/{2019.2558fef7.chunk.js → 2019.17ea2088.chunk.js} +1 -1
- package/build/static/js/2098.6c45c749.chunk.js +1 -0
- package/build/static/js/2168.af9a9b9f.chunk.js +1 -0
- package/build/static/js/{233.87becf3a.chunk.js → 233.3215dc68.chunk.js} +1 -1
- package/build/static/js/2362.5f9c8ab2.chunk.js +1 -0
- package/build/static/js/2677.491ccc30.chunk.js +2 -0
- package/build/static/js/{2746.6d8ac071.chunk.js → 2746.b74c83cd.chunk.js} +1 -1
- package/build/static/js/{3389.52e7ac5c.chunk.js → 3389.83a58684.chunk.js} +1 -1
- package/build/static/js/{3803.15148b1f.chunk.js → 3803.fb647887.chunk.js} +1 -1
- package/build/static/js/{3930.787c608b.chunk.js → 3930.6b76ec36.chunk.js} +1 -1
- package/build/static/js/406.e384bf0e.chunk.js +1 -0
- package/build/static/js/{4423.da2620a9.chunk.js → 4423.2dd278be.chunk.js} +1 -1
- package/build/static/js/{4465.0cc40dce.chunk.js → 4465.05c1536b.chunk.js} +1 -1
- package/build/static/js/{4509.f22f0238.chunk.js → 4509.391ff49f.chunk.js} +2 -2
- package/build/static/js/4549.59d35b13.chunk.js +1 -0
- package/build/static/js/{4550.af6850d6.chunk.js → 4550.6398038b.chunk.js} +1 -1
- package/build/static/js/4775.bc1f9bc3.chunk.js +1 -0
- package/build/static/js/4852.5661d7a7.chunk.js +1 -0
- package/build/static/js/{4906.999b88c8.chunk.js → 4906.0bf02a4f.chunk.js} +1 -1
- package/build/static/js/506.7795a2df.chunk.js +1 -0
- package/build/static/js/{5526.6683805e.chunk.js → 5526.2e5b0dfe.chunk.js} +2 -2
- package/build/static/js/5672.6b3a406d.chunk.js +1 -0
- package/build/static/js/{5748.a89331a1.chunk.js → 5748.07d72ea2.chunk.js} +1 -1
- package/build/static/js/5973.219778da.chunk.js +1 -0
- package/build/static/js/6230.f51ec934.chunk.js +1 -0
- package/build/static/js/{6472.2c5056ae.chunk.js → 6472.b1c703d4.chunk.js} +2 -2
- package/build/static/js/6511.6b799f59.chunk.js +1 -0
- package/build/static/js/6743.9db2d48f.chunk.js +2 -0
- package/build/static/js/{6906.73c16873.chunk.js → 6906.8e78a1d1.chunk.js} +1 -1
- package/build/static/js/6931.f7a04871.chunk.js +1 -0
- package/build/static/js/{6944.50b5e54e.chunk.js → 6944.9098ce0d.chunk.js} +1 -1
- package/build/static/js/7020.b16a6be6.chunk.js +1 -0
- package/build/static/js/7022.32cbb1ae.chunk.js +1 -0
- package/build/static/js/7718.b9fb672b.chunk.js +1 -0
- package/build/static/js/7913.f687f9d2.chunk.js +1 -0
- package/build/static/js/{8170.7d39c62a.chunk.js → 8170.a05bcf8e.chunk.js} +1 -1
- package/build/static/js/8427.4eeb503c.chunk.js +2 -0
- package/build/static/js/8537.a2ae5cb3.chunk.js +1 -0
- package/build/static/js/{8590.fcb1c27a.chunk.js → 8590.871b6ecb.chunk.js} +1 -1
- package/build/static/js/{8986.2f7c6ea5.chunk.js → 8986.bf90d91b.chunk.js} +1 -1
- package/build/static/js/9085.2eba86ab.chunk.js +1 -0
- package/build/static/js/{9586.dab3f0ad.chunk.js → 9586.a2caaa51.chunk.js} +1 -1
- package/build/static/js/9590.3c9e0821.chunk.js +2 -0
- package/build/static/js/{9662.2281f1d0.chunk.js → 9662.604d1362.chunk.js} +1 -1
- package/build/static/js/9818.66fa52f8.chunk.js +2 -0
- package/build/static/js/main.42e55f0d.js +2 -0
- package/package.json +1 -1
- package/build/static/css/7657.cc1ab277.chunk.css +0 -1
- package/build/static/js/2098.6efa542b.chunk.js +0 -1
- package/build/static/js/2168.4aa1c106.chunk.js +0 -1
- package/build/static/js/2362.5f1e7e82.chunk.js +0 -1
- package/build/static/js/318.ecb043b8.chunk.js +0 -2
- package/build/static/js/406.9e49d99c.chunk.js +0 -1
- package/build/static/js/4296.b3d15061.chunk.js +0 -1
- package/build/static/js/4549.06c2fd1f.chunk.js +0 -1
- package/build/static/js/4775.eecb94db.chunk.js +0 -1
- package/build/static/js/4852.5da43bce.chunk.js +0 -1
- package/build/static/js/506.e1874511.chunk.js +0 -1
- package/build/static/js/5973.b1923a12.chunk.js +0 -1
- package/build/static/js/6230.16addc8e.chunk.js +0 -1
- package/build/static/js/6511.7c767ea5.chunk.js +0 -1
- package/build/static/js/6706.134ef362.chunk.js +0 -2
- package/build/static/js/6743.e0b3dc71.chunk.js +0 -2
- package/build/static/js/6931.61297d93.chunk.js +0 -1
- package/build/static/js/7020.b9df1e44.chunk.js +0 -1
- package/build/static/js/7022.242a07f7.chunk.js +0 -1
- package/build/static/js/7657.aed23f30.chunk.js +0 -2
- package/build/static/js/7718.301ab3f8.chunk.js +0 -1
- package/build/static/js/7913.3940464c.chunk.js +0 -1
- package/build/static/js/8537.dc816763.chunk.js +0 -1
- package/build/static/js/9085.970be618.chunk.js +0 -1
- package/build/static/js/9132.43a3ec2a.chunk.js +0 -1
- package/build/static/js/9590.3877fd54.chunk.js +0 -2
- package/build/static/js/main.e2907b63.js +0 -2
- /package/build/static/js/{1685.79e259fc.chunk.js.LICENSE.txt → 1685.8aa7ded2.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{7657.aed23f30.chunk.js.LICENSE.txt → 2677.491ccc30.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{318.ecb043b8.chunk.js.LICENSE.txt → 4509.391ff49f.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{5526.6683805e.chunk.js.LICENSE.txt → 5526.2e5b0dfe.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{6472.2c5056ae.chunk.js.LICENSE.txt → 6472.b1c703d4.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{6743.e0b3dc71.chunk.js.LICENSE.txt → 6743.9db2d48f.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{4509.f22f0238.chunk.js.LICENSE.txt → 8427.4eeb503c.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{9590.3877fd54.chunk.js.LICENSE.txt → 9590.3c9e0821.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{6706.134ef362.chunk.js.LICENSE.txt → 9818.66fa52f8.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{main.e2907b63.js.LICENSE.txt → main.42e55f0d.js.LICENSE.txt} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[6230],{80378:(e,n,t)=>{t.d(n,{Z:()=>u});var i=t(55898),o=t.n(i),a=t(62681),l=t(72333),r=t(6352),s=t.n(r),c=t(35432),d=t(58238),m=t(14491);var p=t(96266);function u(e){let{blocklet:n,style:t,size:i,ancestors:o,...r}=e;const u=(0,d.h6)(),{logoUrl:f,inService:h}=function(e){var n;let{blocklet:t,ancestors:i=[]}=e;const o=(0,d.h6)(),{inService:a}=o,l="?v=".concat(null===t||void 0===t||null===(n=t.meta)||void 0===n?void 0:n.version).concat((0,m.XN)(null===t||void 0===t?void 0:t.status)?"~":"");let r=a?s()(m.zn,c.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo-bundle",l):s()(o.imgPrefix,"blocklet.png");if("registry"===t.source&&t.deployedFrom&&t.meta.logo)r=s()(t.deployedFrom,(0,m.lk)(t.meta.bundleDid,t.meta.logo),l);else{const e=window.env.apiPrefix||"/",n=i.concat(t),o=a?n.slice(1):n;r=s()(e,"/blocklet/logo-bundle".concat(o.map((e=>"/".concat(e.meta.did))).join("")),l)}return{logoUrl:r,inService:a}}({blocklet:n,ancestors:o}),{variant:g}=r,x=h?()=>{}:e=>{e.target.src="".concat(u.imgPrefix,"/blocklet.png")};let b=(0,p.jsx)("img",{src:f,onError:x,alt:n.meta.name,style:{width:i}});return n.meta.logo||(b=(0,p.jsx)(l.Z,{did:n.meta.did||"",responsive:!0})),(0,p.jsx)(a.Z,{variant:g||"square",style:Object.assign({backgroundColor:"transparent",width:i,height:i,borderRadius:10},t),...r,children:b})}u.propTypes={blocklet:o().object.isRequired,style:o().object,size:o().oneOfType([o().number,o().string]),ancestors:o().array},u.defaultProps={style:{},size:40,ancestors:[]}},74286:(e,n,t)=>{t.d(n,{Z:()=>r});var i=t(55898),o=t.n(i),a=t(39948),l=t(96266);function r(e){let{depth:n,className:t}=e;return(0,l.jsx)(a.Z,{ml:Math.max(2*(n-1),0),className:t,sx:{borderBottom:1,borderColor:"rgba(0,0,0,0.12)"}},"group-collapse-box")}r.propTypes={depth:o().number,className:o().string},r.defaultProps={depth:1,className:""}},44784:(e,n,t)=>{t.d(n,{Z:()=>d});var i,o=t(71171),a=t(33518),l=t(82790),r=t(96266);function s(e){let{labelProps:n,className:t,style:i,...o}=e;const a={...n,labelPlacement:(null===n||void 0===n?void 0:n.labelPlacement)||"start"};return(0,r.jsx)(c,{className:t,style:i,children:(0,r.jsx)(l.Z,{labelProps:a,...o})})}s.propTypes=l.Z.propTypes,s.defaultProps=l.Z.defaultProps;const c=a.Z.div(i||(i=(0,o.Z)(["\n max-width: 300px;\n > label {\n display: flex;\n justify-content: space-between;\n width: 100%;\n margin-left: 0;\n margin-right: 0;\n }\n "," {\n max-width: 100%;\n }\n"])),(e=>{let{theme:n}=e;return n.breakpoints.down("sm")})),d=s},59375:(e,n,t)=>{t.d(n,{Z:()=>Z});var i,o=t(71171),a=t(5057),l=t(55898),r=t.n(l),s=t(6352),c=t.n(s),d=t(33518),m=t(92706),p=t.n(m),u=t(39948),f=t(52277),h=t.n(f),g=t(68420),x=t(96266);const b=(0,a.lazy)((()=>Promise.all([t.e(6547),t.e(5760),t.e(6743),t.e(6706),t.e(1294),t.e(6472),t.e(9132)]).then(t.bind(t,84804)).then((e=>({default:e.Uploader}))))),v="/blocklet/logo/upload";function Z(e){let{url:n,height:t,width:i,enabled:o,type:l,did:r,prefix:s,headers:d,onUploaded:m}=e;const{t:p}=(0,g.PE)(),f=(0,a.useRef)(null),Z={cursor:o?"pointer":"default","&::after":{content:'"'.concat(p("common.switch"),'"')}};return(0,x.jsxs)(j,{id:"uploader-".concat(r,"-").concat(l),children:[(0,x.jsx)(b,{ref:f,popup:!0,onUploadFinish:()=>{var e;m(),null===(e=f.current)||void 0===e||e.close()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:c()(s,v,l,r),disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileTypes:["image/*",".jpg",".jpeg",".png",".gif",".svg"],maxFileSize:10485760,maxNumberOfFiles:1}},tusProps:{headers:d}}),(0,x.jsx)(u.Z,{className:h()("uploader-wrapper",o&&"enabled"),sx:Z,onClick:()=>{var e;null===(e=f.current)||void 0===e||e.open()},children:(0,x.jsx)("img",{alt:"Logo",src:n,style:{height:t,width:i}})})]},"uploader-".concat(r,"-").concat(l))}Z.propTypes={url:r().string.isRequired,type:r().oneOf(["square","rect","favicon"]).isRequired,did:r().string.isRequired,prefix:r().string.isRequired,headers:r().func,onUploaded:r().func,height:r().number,width:r().any,enabled:r().bool},Z.defaultProps={height:80,width:"auto",enabled:!0,headers:()=>({}),onUploaded:p()};const j=d.Z.div(i||(i=(0,o.Z)(["\n .uploader-wrapper {\n display: inline-flex;\n position: relative;\n font-size: 0px;\n &.enabled {\n cursor: pointer;\n }\n &::after {\n display: none;\n }\n &.enabled::after {\n display: block;\n opacity: 0;\n position: absolute;\n bottom: 0;\n background: rgba(0, 0, 0, 0.2);\n left: 0;\n right: 0;\n height: 2.2em;\n color: white;\n text-align: center;\n font-size: 12px;\n line-height: 2em;\n transition: opacity 0.3s ease;\n }\n &:hover::after {\n opacity: 1;\n }\n }\n"])))},64558:(e,n,t)=>{t.r(n),t.d(n,{default:()=>mt});var i,o=t(71171),a=t(5057),l=t(33518),r=t(55898),s=t.n(r),c=t(96181),d=t(6352),m=t.n(d),p=t(35432),u=t(39948),f=t(55402),h=t(82275),g=t(96399),x=t(65688),b=t(37633),v=t(48037),Z=t(92273),j=t(76720),y=t(15849),C=t(68420),k=t(94464),w=t(38242),S=t(80378),E=t(1722),L=t(43681),P=t.n(L),R=t(50482),A=t.n(R),T=t(16147),_=t(29034),N=t(28726),O=t(80578),I=t(77277),F=t(86229),B=t(28641),z=t(44846),U=t(13727),D=t(56184),K=t(67680),W=t(19654),q=t(90067),G=t(39646),V=t(43897),H=t(47020),M=t(49020),Y=t(35406),J=t(11875),Q=t(95890),X=t(96266);function $(e){let{label:n,disabled:t,required:i,initialValue:o,onChange:l,style:r,onSubmit:s,triggers:c,options:d,formatterBeforeSubmit:m,helperText:p,placeholder:f,renderImage:h,renderLabel:g,filterKeys:x,noEmpty:b,...v}=e;const[Z,j]=(0,a.useState)(!1),[y,C]=(0,a.useState)(!1),[k,w]=a.useState(""),[S,E]=(0,a.useState)(o),[L,P]=(0,a.useState)(S),R=(0,a.useMemo)((()=>{if(!d)return{};const e={};return d.forEach((n=>{e[n.code]=n})),e}),[d]),A=Z?(0,X.jsx)(G.Z,{options:d,value:L,onChange:(e,n)=>{if(!Array.isArray(n))return P([]),void l([]);const t=n.filter((e=>R[e]));if(!t.length)return P([]),void l([]);P(t),l(t)},inputValue:k,onInputChange:(e,n)=>{w(n)},PopperComponent:ne,fullWidth:!0,multiple:!0,variant:"outlined",margin:"dense",filterOptions:()=>{if(!d)return[];if(!k)return d.map((e=>e.code));const e=new RegExp(k.toLowerCase());return d.filter((n=>{for(let i=0;i<x.length;i++){var t;const o=x[i];if(e.test(null===(t=n[o])||void 0===t?void 0:t.toLowerCase()))return!0}return!1})).map((e=>e.code))},getOptionLabel:e=>{var n;return null===(n=R[e])||void 0===n?void 0:n.name},renderInput:e=>(0,X.jsx)(H.Z,{...e,label:"",placeholder:f}),renderOption:(e,n)=>{var t;const i=-1!==L.indexOf(n);return(0,a.createElement)(ee,{component:"li",...e,key:n},h(R[n]||{}),(0,X.jsx)(u.Z,{sx:{"& > img":{mr:2,flexShrink:0}},style:{flex:1,fontWeight:i?"700":"normal"},children:g(n,R[n])||(null===(t=R[n])||void 0===t?void 0:t.name)}),(0,X.jsx)(u.Z,{component:U.default,sx:{opacity:.5,width:18,height:18},style:{visibility:i?"visible":"hidden"}}))},...v}):(0,X.jsx)(u.Z,{px:1,className:"form-item-input slot",style:{whiteSpace:"pre-wrap"},children:L.filter((e=>d.some((n=>n.code===e)))).map((e=>(0,X.jsx)(W.Z,{label:d.find((n=>n.code===e)).name,style:{marginRight:8},size:"small"},e)))});return(0,X.jsx)(J.Z,{className:"form",style:r,children:(0,X.jsxs)(u.Z,{className:"form-item",children:[(0,X.jsxs)(u.Z,{className:"form-item-label",children:[n,i&&(0,X.jsx)(Y.Z,{})]}),(0,X.jsxs)(u.Z,{className:"form-item-body",children:[(0,X.jsx)(u.Z,{className:"form-item-input",children:A}),(0,X.jsx)(u.Z,{className:"form-item-action",children:Z?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(K.Z,{"data-cy":"schema-form-item-confirm",onClick:async()=>{C(!0);try{!1===await s("function"===typeof m?m(L):L)?P(S):b&&!L.length?(P(o),E(o)):(P(L),E(L))}catch(e){P(S)}finally{C(!1),j(!1)}},disabled:t||y,size:"large",children:y?(0,X.jsx)(z.Z,{size:24}):(0,X.jsx)(D.Z,{})}),(0,X.jsx)(K.Z,{"data-cy":"schema-form-item-cancel",onClick:()=>{P(S),j(!1)},disabled:t||y,size:"large",children:(0,X.jsx)(U.default,{})})]}):(0,X.jsx)(Q.Z,{triggers:c,onEnterEdit:()=>j(!0),disabled:t})})]}),Z&&p&&(0,X.jsx)(q.Z,{children:p})]})})}$.propTypes={style:s().object,onSubmit:s().func,onChange:s().func,label:s().string,initialValue:s().string,required:s().bool,disabled:s().bool,triggers:s().array,options:s().array,helperText:s().string,formatterBeforeSubmit:s().func,placeholder:s().string,renderImage:s().func,filterKeys:s().arrayOf(s().string),noEmpty:s().bool,renderLabel:s().func},$.defaultProps={style:{},onSubmit:()=>{},onChange:()=>{},label:"",initialValue:"",required:!1,disabled:!1,triggers:[],options:[],helperText:"",formatterBeforeSubmit:e=>e.join(","),placeholder:"",filterKeys:["name"],renderImage:()=>null,renderLabel:(e,n)=>"",noEmpty:!1};const ee=l.Z.div(i||(i=(0,o.Z)(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n height: 48px;\n border-bottom: 1px solid rgba(0, 0, 0, 0.08);\n font-size: 1.1em;\n"]))),ne=(0,l.Z)(M.Z)((()=>({["& .".concat(V.Z.paper)]:{boxShadow:"0px 8px 12px rgba(92, 92, 92, 0.04), 0px -10px 12px rgba(92, 92, 92, 0.04)",borderRadius:"6px",width:"100%",border:"1px solid rgba(0, 0, 0, 0.12)",color:"inherit",fontSize:13,position:"absolute",left:0,top:0},["& .".concat(V.Z.listbox)]:{padding:0}})));var te,ie=t(58238),oe=t(14491),ae=t(54063),le=t(63406),re=t(78410),se=t(31853),ce=t(22425),de=t(70461),me=t(73545),pe=t(29054);function ue(e){let{initialValue:n,onChange:t,disabled:i,loading:o}=e;const{t:a}=(0,C.PE)(),{api:l}=(0,me.T)(),{blocklet:r}=(0,pe.y0)(),[s,c]=(0,se.Z)({newAppSk:"",isConnectOpen:!1}),d=()=>c({isConnectOpen:!1}),m=r.structVersion===p.APP_STRUCT_VERSION?[{key:"rotate-with-did-wallet",title:"Migrate with DID Wallet",handler:()=>{(0,oe.An)(r.status)?F.Z.error(a("blocklet.error.isRunning")):(0,w.isInProgress)(r.status)?F.Z.error(a("blocklet.error.isInProgress")):c({isConnectOpen:!0})}}]:[];return[(0,X.jsx)(B.Z,{disabled:i,loading:o,initialValue:n,onSubmit:e=>(c({newAppSk:e}),!1),triggers:m,secure:!0}),s.newAppSk&&(0,X.jsx)(de.Z,{title:a("blocklet.config.appSkTitle"),description:(0,X.jsxs)(u.Z,{children:[(0,X.jsx)(u.Z,{children:a("blocklet.config.appSkChangeTip")}),(0,X.jsx)(u.Z,{fontWeight:"bold",mt:2,children:a("blocklet.config.appDidChangeTip")}),(0,X.jsxs)(fe,{children:[(0,X.jsx)("li",{children:a("blocklet.config.appDidChangeTipL1")}),(0,X.jsx)("li",{children:a("blocklet.config.appDidChangeTipL2")})]})]}),confirm:a("confirm"),cancel:a("cancel"),onConfirm:()=>(async e=>{try{await t(e)}finally{c({newAppSk:""})}})(s.newAppSk),onCancel:()=>c({newAppSk:""})}),(0,X.jsx)(ce.Z,{popup:!0,open:s.isConnectOpen,forceConnected:!1,saveConnect:!1,action:"rotate-key-pair",checkFn:l.get,checkTimeout:3e5,onSuccess:d,extraParams:{appDid:r.appDid},messages:{title:a("setup.keyPair.title"),scan:a("setup.keyPair.scan"),confirm:a("setup.keyPair.confirm"),success:a("setup.keyPair.success")},onClose:d})]}ue.propTypes={initialValue:s().string,onChange:s().func,disabled:s().bool,loading:s().bool},ue.defaultProps={initialValue:"default",onChange:()=>{},disabled:!1,loading:!1};const fe=(0,l.Z)("ul")(te||(te=(0,o.Z)(["\n padding-left: 16px;\n li {\n margin-top: 8px;\n list-style: disk;\n font-weight: bold;\n }\n"])));var he,ge=t(13128),xe=t(55372),be=t(11750),ve=t(88574),Ze=t(26174),je=t(88092),ye=t(50185),Ce=t(17425);function ke(e){let{onCancel:n,onSuccess:t,onError:i}=e;const{api:o}=(0,a.useContext)(me.B),[l,r]=(0,a.useState)(!1),{t:s,locale:c}=(0,C.PE)(),[d,m]=(0,a.useState)(""),[p,f]=(0,a.useState)(!1),[h,g]=(0,a.useState)(0),[x,b]=(0,a.useState)(""),{endpoint:v}=(0,Ce.DJ)(),[Z,j]=(0,a.useState)(!1),y=e=>{m(null),r(!0);try{b(e.result),g(w.length-1)}catch(n){const e=(0,oe.Z)(n);m(e),i(n)}finally{r(!1)}},k=()=>{f(!1),g(0)},w=[{body:(0,X.jsxs)(u.Z,{children:[(0,X.jsx)(be.Z,{children:s("team.transferApp.transferDialog.tips.progress")}),(0,X.jsx)(be.Z,{mt:3,mb:2,children:s("team.transferApp.transferDialog.tips.newOwnerPermissions")})]}),cancel:s("common.cancel"),confirm:s("team.transferApp.transferDialog.createTransferLink"),onCancel:n,onConfirm:()=>{f(!0),g(1)}},{body:()=>(0,X.jsx)(ce.Z,{action:"transfer-app-owner",open:p,locale:c,checkFn:o.get,onClose:k,onSuccess:y,checkTimeout:3e5,extraParams:{},messages:{title:s("team.transferApp.connectDialog.title"),scan:s("team.transferApp.connectDialog.scan"),confirm:s("team.transferApp.connectDialog.confirm"),success:s("team.transferApp.connectDialog.success")},popup:!0})},{body:()=>{const e=(0,oe.VP)({transferId:x.transferId,endpoint:v});return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(u.Z,{component:we,dangerouslySetInnerHTML:{__html:s("team.transferApp.transferDialog.createSuccessTip1")}}),(0,X.jsx)(u.Z,{component:we,mt:2,children:(0,X.jsx)(we,{children:s("team.transferApp.transferDialog.createSuccessTip3")})}),(0,X.jsxs)(u.Z,{children:[(0,X.jsx)(u.Z,{component:we,mt:2,children:(0,X.jsx)(we,{children:s("team.transferApp.transferDialog.createSuccessTip2",{expireDate:(0,oe.B2)(x.expireDate,c)})})}),(0,X.jsx)(u.Z,{my:1,children:(0,X.jsx)(ye.Z,{children:e})})]}),(0,X.jsx)("div",{children:(0,X.jsx)(Ze.Z,{value:"end",control:(0,X.jsx)(je.Z,{checked:Z,onChange:e=>j(e.target.checked)}),label:s("team.transferApp.transferDialog.iKnow"),labelPlacement:"end"})})]})},confirm:s("common.confirm"),onConfirm:t}],S=w[h];return(0,X.jsxs)(ge.ZP,{title:(0,X.jsx)(we,{className:"title",children:s("team.transferApp.transferDialog.title")}),fullWidth:!0,open:!0,showCloseButton:!1,actions:(0,X.jsxs)(X.Fragment,{children:[S.cancel&&(0,X.jsx)(N.Z,{onClick:S.onCancel,color:"inherit",children:S.cancel}),(0,X.jsxs)(N.Z,{onClick:S.onConfirm,color:"error",disabled:l||h===w.length-1&&!Z,variant:"contained",autoFocus:!0,children:[l&&(0,X.jsx)(z.Z,{size:16}),S.confirm]})]}),children:[(0,X.jsx)(xe.Z,{component:"div",children:"function"===typeof S.body?S.body():S.body}),!!d&&(0,X.jsx)(ve.Z,{type:"error",variant:"icon",children:d})]})}ke.propTypes={onCancel:s().func.isRequired,onSuccess:s().func.isRequired,onError:s().func},ke.defaultProps={onError:()=>{}};const we=l.Z.div(he||(he=(0,o.Z)(["\n font-size: 16px;\n font-weight: bold;\n &.title {\n font-size: 20px;\n }\n"])));var Se,Ee=t(49522),Le=t(59375);const Pe=Object.keys(I.SUPPORTED_LANGUAGES).map((e=>({code:e,name:I.SUPPORTED_LANGUAGES[e].nativeName,enName:I.SUPPORTED_LANGUAGES[e].name}))),Re=["name","enName","code"];function Ae(e){var n;let{blocklet:t,onUpdate:i,hasPermission:o,...l}=e;const{api:r,inService:s,prefix:c,getSessionInHeader:d,ws:{useSubscription:m}}=(0,ie.h6)(),{t:f}=(0,a.useContext)(C.RD),[h,g]=(0,a.useState)(""),[x,b]=(0,a.useState)(""),[v,Z]=(0,a.useState)(!1),j=(0,w.getWhoCanAccess)(t),y=null===t||void 0===t||null===(n=t.settings)||void 0===n?void 0:n.publicToStore,k=x||!o,{logoUrl:S,rectLogoUrl:E,faviconUrl:L}=(0,Ee.Z)({blocklet:t}),{did:R}=t.meta,{site:z}=t,U=P()(t.meta,"capabilities.clusterMode",!1);if(m(p.EVENTS.NODE_RUNTIME_INFO,(e=>{U&&g(P()(e,"cpu.physicalCores",""))})),(0,oe.wS)(t.status))return null;const D=t.environments.find((e=>e.key===I.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_DELETABLE)),K=!D||"yes"===D.value,W=t.environments.find((e=>e.key===I.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LANGUAGES)),q=t.environments.find((e=>e.key===I.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL)),G=t.environments.find((e=>e.key===I.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_OWNER)),V=t.environments.find((e=>e.key===I.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_YEAR)),H=[{key:I.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_NAME,description:f("blocklet.config.name"),value:t.environments.find((e=>"BLOCKLET_APP_NAME"===e.key)).value},{key:I.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_DESCRIPTION,description:f("blocklet.config.description"),value:t.environments.find((e=>"BLOCKLET_APP_DESCRIPTION"===e.key)).value},{key:I.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL,description:f("blocklet.config.appUrl"),value:q?q.value:""},{key:I.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_OWNER,description:f("blocklet.config.copyrightOwner"),value:G?G.value:""},{key:I.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_YEAR,description:f("blocklet.config.copyrightYear"),value:V?V.value:""}];if(U){const e=t.configs.find((e=>e.key===I.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE)),n=e?e.value:h;H.push({key:I.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE,description:f("blocklet.config.clusterSize"),value:n,cpuCores:h})}const M=async(e,n)=>{if(e===I.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE){const e=(0,oe.I)({value:n,cpuCores:h});if(e)return void F.Z.error(e)}const o=[{key:e,value:n}];try{b(!0);const{blocklet:e}=await r.configBlocklet({input:{did:t.meta.did,configs:o}});i(e)}catch(a){F.Z.error(a.message)}finally{b(!1)}};return(0,X.jsxs)(Oe,{...l,children:[H.map((e=>(0,X.jsxs)(u.Z,{className:"config-form",mt:2,children:[(0,X.jsx)(u.Z,{className:"config-label",fontSize:14,mb:0,children:e.description}),(0,X.jsx)(B.Z,{style:{marginTop:0},disabled:x||k,loading:x,initialValue:e.value,onSubmit:n=>M(e.key,n)})]}))),(0,X.jsx)(u.Z,{className:"config-form",component:_.Z,my:3}),(0,X.jsx)(u.Z,{className:"config-label",fontSize:14,mb:1,sx:{flexGrow:0,width:"auto"},children:f("blocklet.config.logoSquare")}),(0,X.jsx)(Le.Z,{did:t.meta.did,height:80,width:80,type:"square",prefix:c,url:S,enabled:o,headers:d}),(0,X.jsx)(u.Z,{className:"config-label",fontSize:14,mt:4,children:f("blocklet.config.logoRect")}),(0,X.jsx)(u.Z,{mb:1.5,className:"config-desc",children:f("blocklet.config.logoRectDesc")}),(0,X.jsx)(Le.Z,{did:t.meta.did,height:80,type:"rect",prefix:c,url:E,enabled:o,headers:d}),(0,X.jsx)(u.Z,{className:"config-label",fontSize:14,mt:4,children:f("blocklet.config.logoFavicon")}),(0,X.jsx)(u.Z,{mb:1.5,className:"config-desc",children:f("blocklet.config.logoFaviconDesc")}),(0,X.jsx)(Le.Z,{did:t.meta.did,height:25,width:25,type:"favicon",prefix:c,url:L,enabled:o,headers:d}),(0,X.jsx)(u.Z,{className:"config-form",children:"all"===j&&"registry"===t.source&&(0,X.jsxs)(u.Z,{className:"config-item",children:[(0,X.jsxs)(u.Z,{className:"config-label",children:[f("blocklet.config.access.publicToStore"),(0,X.jsx)(u.Z,{className:"config-desc",children:f("blocklet.config.access.publicInstanceTip")})]}),(0,X.jsx)(T.Z,{disabled:k,checked:y,defaultChecked:!0,onChange:async e=>{if(!x){b(!0);try{const{checked:n}=e.target,{blocklet:o}=await r.configPublicToStore({input:{did:t.meta.did,publicToStore:n}});i(o)}catch(n){F.Z.error(n.message)}finally{b(!1)}}}})]})}),(0,X.jsx)(u.Z,{className:"config-form",component:_.Z,my:3}),(0,X.jsxs)(u.Z,{className:"config-form",mt:2,children:[(0,X.jsx)(u.Z,{className:"config-label",fontSize:14,mb:0,children:f("blocklet.config.languages")}),(0,X.jsx)($,{style:{marginTop:0},disabled:x||k,loading:x,options:Pe,noEmpty:!0,initialValue:W?W.value.split(","):["en","zh"],onSubmit:e=>M("BLOCKLET_APP_LANGUAGES",e),helperText:f("blocklet.config.selectLanguagesTip"),placeholder:f("blocklet.config.languagesSearch"),filterKeys:Re,renderLabel:(e,n)=>n.name===n.enName?"".concat(n.name," (").concat(e.toUpperCase(),")"):"".concat(n.name,", ").concat(n.enName," (").concat(e.toUpperCase(),")")})]}),(0,X.jsx)(u.Z,{className:"config-form",component:_.Z,my:3}),(0,X.jsx)(u.Z,{className:"config-form",mt:2,children:(0,X.jsx)(u.Z,{className:"config-label",mb:0,children:f("common.security")})}),(0,X.jsxs)(u.Z,{className:"config-form",mt:2,children:[(0,X.jsx)(u.Z,{className:"config-label",fontSize:14,mb:0,children:f("router.domainSecurity.cors.title")}),(0,X.jsx)(u.Z,{mb:1.5,className:"config-desc",children:f("router.domainSecurity.cors.description",{name:"the blocklet"})}),(0,X.jsx)(B.Z,{style:{marginTop:0},disabled:x||k,loading:x,initialValue:(z.corsAllowedOrigins||[]).join(", "),onSubmit:async e=>{const n=z.corsAllowedOrigins||[],i=e.split(",").map((e=>e.trim())).filter(Boolean);if(A()(n,i))return!1;try{b(!0);const e=i.length?i:["__none__"];await r.updateRoutingSite({input:{id:z.id,corsAllowedOrigins:e,teamDid:t.meta.did}}),b(!1)}catch(o){return F.Z.error(o.message),b(!1),!1}return!0}})]}),(0,X.jsx)(u.Z,{className:"config-form",component:_.Z,my:3}),(0,X.jsx)(u.Z,{mb:2,className:"config-label",fontSize:20,children:f("blocklet.config.dangerZone")}),(0,X.jsxs)(u.Z,{px:2,py:1,sx:{border:"1px solid red",borderRadius:2},children:[(0,X.jsx)(u.Z,{className:"config-form",mt:2,children:!s&&(0,X.jsxs)(u.Z,{className:"config-item",children:[(0,X.jsxs)(u.Z,{className:"config-label",children:[f("blocklet.config.deletable.name"),(0,X.jsx)(u.Z,{className:"config-desc",children:f(K?"blocklet.config.deletable.disable":"blocklet.config.deletable.enable")})]}),(0,X.jsx)(T.Z,{disabled:k,checked:!K,defaultChecked:!0,onChange:async e=>{if(!x){b(!0);try{const{checked:n}=e.target,{blocklet:o}=await r.configBlocklet({input:{did:t.meta.did,configs:[{key:I.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_DELETABLE,value:n?"no":"yes"}]}});i(o)}catch(n){F.Z.error(n.message)}finally{b(!1)}}}})]})}),(0,X.jsxs)(u.Z,{className:"config-form",mt:2,children:[(0,X.jsx)(u.Z,{className:"config-label",fontSize:14,mb:0,children:f("blocklet.config.sk")}),(0,X.jsx)(ue,{disabled:x||k,loading:x,initialValue:t.environments.find((e=>"BLOCKLET_APP_SK"===e.key)).value,onChange:async e=>{if(!x){b(!0);try{const{blocklet:n}=await r.configBlocklet({input:{did:t.meta.did,configs:[{key:I.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SK,value:e}]}});i(n)}catch(n){F.Z.error(n.message)}finally{b(!1)}}}})]}),s&&(0,X.jsx)(le.Z,{role:"owner",children:e=>(e||ae.C)&&(0,X.jsxs)(u.Z,{className:"config-form",mt:2,children:[(0,X.jsxs)(u.Z,{className:"config-item",children:[(0,X.jsx)(u.Z,{className:"config-label",mb:0,children:f("team.transferApp.name")}),(0,X.jsxs)(N.Z,{style:{flexShrink:0},variant:"contained",edge:"end",color:"error",size:"small","data-cy":"transfer-app",onClick:()=>Z(!0),children:[(0,X.jsx)(O.Z,{style:{fontSize:"1.3em",marginRight:4}}),f("team.transferApp.name")]})]}),v&&(0,X.jsx)(ke,{onCancel:()=>Z(!1),onSuccess:()=>Z(!1)})]})}),(0,X.jsx)(u.Z,{className:"config-form",mt:2,children:(0,X.jsxs)(u.Z,{className:"config-item",children:[(0,X.jsxs)(u.Z,{className:"config-label",children:[f("blocklet.config.clearCache.name"),(0,X.jsx)(u.Z,{className:"config-desc",children:f("blocklet.config.clearCache.purpose")})]}),(0,X.jsx)(re.Z,{teamDid:R})]})})]})]})}const Te=(0,le.V)(Ae,"mutate_blocklets"),_e=(0,le.V)(Ae,"",oe.Wf);function Ne(e){const{inService:n}=(0,ie.h6)();return n?(0,X.jsx)(_e,{...e}):(0,X.jsx)(Te,{...e})}Ae.propTypes={blocklet:s().object.isRequired,onUpdate:s().func,hasPermission:s().bool},Ae.defaultProps={onUpdate:()=>{},hasPermission:!1};const Oe=l.Z.div(Se||(Se=(0,o.Z)(["\n padding-top: 24px;\n .config-form {\n flex-grow: 1;\n overflow-y: auto;\n "," {\n width: 100%;\n flex-shrink: 0;\n padding: 0 24px;\n transform: translate(0, 0);\n }\n }\n\n .config-item {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin: 16px 0;\n }\n\n .config-label {\n font-weight: bold;\n }\n\n .config-desc {\n font-weight: normal;\n font-size: 12px;\n color: #666;\n }\n\n .form-item {\n margin-top: 0;\n }\n"])),(e=>e.theme.breakpoints.down("md")));var Ie=t(25710),Fe=t(93066),Be=t(80576),ze=t(8708),Ue=t.n(ze),De=t(12673),Ke=t(99360),We=t(80506),qe=t(766),Ge=t.n(qe),Ve=t(24529),He=t.n(Ve),Me=t(16727),Ye=t.n(Me),Je=t(92706),Qe=t.n(Je);const Xe=(0,a.forwardRef)(((e,n)=>{const{t:t}=(0,a.useContext)(C.RD),i=(0,De.Z)({show:!1,title:"",content:"",onConfirm:Qe(),onCancel:Qe(),loading:!1}),o=(0,Ke.Z)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i.show=!0,i.title=e.title,i.content=e.content,i.onConfirm=e.onConfirm||Qe(),i.onCancel=e.onCancel||Qe(),i.loading=!1})),l=(0,Ke.Z)((()=>{i.title="",i.content="",i.onConfirm=Qe(),i.onCancel=Qe()})),r=(0,Ke.Z)((()=>{i.show=!1,setTimeout((()=>{l()}),300)})),s=(0,Ke.Z)((()=>{r(),null===i||void 0===i||i.onCancel()}),[]),c=(0,Ke.Z)((async()=>{i.loading=!0;try{await(null===i||void 0===i?void 0:i.onConfirm(r))}finally{i.loading=!1}}),[]);return(0,a.useImperativeHandle)(n,(()=>({open:o,close:r})),[o,r]),(0,X.jsx)(ge.I4,{open:i.show,title:i.title,onConfirm:c,onCancel:s,confirmButton:{text:t("common.confirm"),props:{variant:"contained",color:"primary",loading:i.loading}},cancelButton:{text:t("common.cancel"),props:{variant:"outlined",color:"primary"}},children:i.content instanceof Function?i.content():i.content})}));function $e(){const e=(0,a.useRef)(null),n=(0,Ke.Z)((function(){for(var n,t=arguments.length,i=new Array(t),o=0;o<t;o++)i[o]=arguments[o];null===(n=e.current)||void 0===n||n.open(...i)})),t=(0,Ke.Z)((function(){for(var n,t=arguments.length,i=new Array(t),o=0;o<t;o++)i[o]=arguments[o];null===(n=e.current)||void 0===n||n.close(...i)})),i={open:n,close:t};return{confirmHolder:(0,X.jsx)(Xe,{ref:e}),confirmApi:i}}const en={enabled:!1,secure:!1,from:"",host:"",port:"",user:"",password:""};const nn=function(){var e,n,t;const{api:i}=(0,ie.h6)(),{blocklet:o}=(0,pe.y0)(),{t:a}=(0,C.PE)(),{confirmApi:l,confirmHolder:r}=$e(),s=null===o||void 0===o||null===(e=o.meta)||void 0===e?void 0:e.did,c=Object.assign({...en},(null===o||void 0===o||null===(n=o.settings)||void 0===n||null===(t=n.notification)||void 0===t?void 0:t.email)||{}),{handleSubmit:d,control:m,formState:p,watch:f,reset:h}=(0,We.cI)({defaultValues:Ue()(c,Object.keys(en))}),g=(0,De.Z)({testReceiver:"",testReceiverError:""}),x=f("enabled"),b=(0,Ke.Z)((async function(e,n){let t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];try{var o,l;const{blocklet:n}=await i.configNotification({input:{did:s,notification:JSON.stringify({email:e})}}),r=Object.assign({...en},(null===n||void 0===n||null===(o=n.settings)||void 0===o||null===(l=o.notification)||void 0===l?void 0:l.email)||{});h(r),t&&F.Z.success(a("oauth.saveSuccess"))}catch(r){if(!t)throw r;F.Z.error(r.message||a("oauth.saveFailed"))}})),v=(0,Ke.Z)((async(e,n,t)=>{try{p.isDirty&&await b(e,n,!1),await i.sendEmail({input:{did:s,receiver:t,email:JSON.stringify({body:"Your SMTP configuration is correct!",title:"Test email",type:"notification"})}}),F.Z.success(a("notification.email.testSuccess"))}catch(o){F.Z.error(o.message||a("notification.email.testfailed"))}})),Z=(0,Ke.Z)(((e,n)=>{g.testReceiver="",g.testReceiverError="",l.open({title:a("notification.email.testSendEmail"),content:()=>(0,X.jsx)(u.Z,{sx:{width:"300px"},children:(0,X.jsx)(H.Z,{fullWidth:!0,name:"testReceiver",label:a("notification.email.inputTestReceiver"),value:g.testReceiver,onChange:e=>{g.testReceiver=e.target.value},error:!!g.testReceiverError,helperText:g.testReceiverError||"\u3000"})}),async onConfirm(t){var i;const o=null===(i=g.testReceiver)||void 0===i?void 0:i.trim();o?Ge()(o)?(g.testReceiverError="",await v(e,n,o),t()):g.testReceiverError=a("notification.email.receiverInvalid"):g.testReceiverError=a("notification.email.receiverRequired")}})})),j=(0,Ke.Z)((e=>{const n=null===e||void 0===e?void 0:e.trim();return n?!!Ge()(n)||a("notification.email.fromInvalid"):a("notification.email.fromRequired")})),y=(0,Ke.Z)((e=>{const n=null===e||void 0===e?void 0:e.trim();return n?!!He()(n,{require_host:!1,protocols:[]})||a("notification.email.hostInvalid"):a("notification.email.hostRequired")})),k=(0,Ke.Z)((e=>e?!!Ye()(e)||a("notification.email.portInvalid"):a("notification.email.portRequired"))),w=(0,Ke.Z)((e=>!(null===e||void 0===e||!e.trim())||a("notification.email.userRequired"))),S=(0,Ke.Z)((e=>!(null===e||void 0===e||!e.trim())||a("notification.email.passwordRequired"))),E=(0,Ke.Z)((()=>!0));return(0,X.jsxs)(u.Z,{children:[(0,X.jsxs)("form",{onSubmit:d(b),disabled:!0,children:[(0,X.jsx)(We.Qr,{name:"enabled",control:m,render:e=>{let{field:n}=e;return(0,X.jsx)(Ze.Z,{control:(0,X.jsx)(T.Z,{checked:n.value,...n}),label:a("notification.email.enable"),sx:{marginBottom:"8px"}})}}),(0,X.jsx)(We.Qr,{name:"from",control:m,rules:{validate:x?j:E},render:e=>{var n;let{field:t}=e;return(0,X.jsx)(Be.Z,{fullWidth:!0,children:(0,X.jsx)(H.Z,{...t,label:a("notification.email.from"),error:!!p.errors[t.name],helperText:(null===(n=p.errors[t.name])||void 0===n?void 0:n.message)||"\u3000",disabled:!x})})}}),(0,X.jsx)(We.Qr,{name:"host",control:m,rules:{validate:x?y:E},render:e=>{var n;let{field:t}=e;return(0,X.jsx)(Be.Z,{fullWidth:!0,children:(0,X.jsx)(H.Z,{...t,error:!!p.errors[t.name],label:a("notification.email.host"),helperText:(null===(n=p.errors[t.name])||void 0===n?void 0:n.message)||"\u3000",disabled:!x})})}}),(0,X.jsx)(We.Qr,{name:"port",control:m,rules:{validate:x?k:E},render:e=>{var n;let{field:t}=e;return(0,X.jsx)(Be.Z,{fullWidth:!0,children:(0,X.jsx)(H.Z,{...t,type:"number",error:!!p.errors[t.name],label:a("notification.email.port"),helperText:(null===(n=p.errors[t.name])||void 0===n?void 0:n.message)||"\u3000",disabled:!x})})}}),(0,X.jsx)(We.Qr,{name:"user",control:m,rules:{validate:x?w:E},render:e=>{var n;let{field:t}=e;return(0,X.jsx)(Be.Z,{fullWidth:!0,children:(0,X.jsx)(H.Z,{...t,error:!!p.errors[t.name],label:a("notification.email.user"),helperText:(null===(n=p.errors[t.name])||void 0===n?void 0:n.message)||"\u3000",disabled:!x})})}}),(0,X.jsx)(We.Qr,{name:"password",control:m,rules:{validate:x?S:E},render:e=>{var n;let{field:t}=e;return(0,X.jsx)(Be.Z,{fullWidth:!0,children:(0,X.jsx)(H.Z,{...t,type:"password",error:!!p.errors[t.name],label:a("notification.email.password"),helperText:(null===(n=p.errors[t.name])||void 0===n?void 0:n.message)||"\u3000",disabled:!x})})}}),(0,X.jsx)(We.Qr,{name:"secure",control:m,rules:{validate:E},render:e=>{let{field:n}=e;return(0,X.jsx)(Be.Z,{fullWidth:!0,children:(0,X.jsx)(Ze.Z,{control:(0,X.jsx)(T.Z,{checked:n.value,...n,disabled:!x}),label:a("notification.email.secure"),style:{marginBottom:16}})})}}),(0,X.jsx)(N.Z,{variant:"outlined",color:"warning",onClick:d(Z),sx:{mr:2},disabled:!x,children:a("oauth.runTest")}),(0,X.jsx)(N.Z,{type:"submit",variant:"contained",disabled:!p.isDirty,children:a("oauth.save")})]}),r]})},tn=[{label:(0,X.jsx)(u.Z,{textAlign:"center",width:"100%",children:"Email"}),value:"email"},{label:(0,X.jsx)(u.Z,{textAlign:"center",width:"100%",children:"More"}),value:"more"}];const on=function(){const[e,n]=(0,a.useState)(tn[0].value),{t:t}=(0,a.useContext)(C.RD),i=(0,Fe.Z)((()=>({email:(0,X.jsx)(nn,{}),more:(0,X.jsx)(u.Z,{children:(0,X.jsx)(Ie.Z,{children:t("notification.comingSoon")})})})),[t]);return(0,X.jsxs)(u.Z,{children:[(0,X.jsx)(k.Z,{tabs:tn,current:e,onChange:n}),(0,X.jsx)(u.Z,{marginTop:"10px",children:i[e]})]})};var an=t(96366),ln=t(75239),rn=t(48342),sn=t(94552),cn=t(24558),dn=t(74286),mn=t(74490),pn=t(76667),un=t(70648),fn=t(44067),hn=t(7664),gn=t(44123),xn=t(53906);const bn=[{value:p.WHO_CAN_ACCESS.ALL,icon:xn.Z,title:{zh:"\u6240\u6709\u4eba\u53ef\u8bbf\u95ee",en:"Accessible to all"},description:{zh:"\u5411\u6240\u6709\u4eba\u5f00\u653e\uff0c\u65e0\u9700\u901a\u884c\u8bc1\u5373\u53ef\u8bbf\u95ee\u5e94\u7528",en:"Open to the world anyone can access without passport"}},{value:p.WHO_CAN_ACCESS.INVITED,icon:gn.Z,title:{zh:"\u53ea\u6709\u88ab\u9080\u8bf7\u7684\u4eba\u53ef\u4ee5\u8bbf\u95ee",en:"Only invited people can access"},description:{zh:"\u7a0d\u540e\u60a8\u53ef\u4ee5\u5728\u7ba1\u7406\u9875\u9762\u4e2d\u9080\u8bf7\u6210\u5458",en:"You can invite members later in the admin page"}},{value:p.WHO_CAN_ACCESS.OWNER,icon:hn.Z,title:{zh:"\u53ea\u6709\u5e94\u7528\u6240\u6709\u8005\u53ef\u4ee5\u8bbf\u95ee",en:"Only Owner of the blocklet can access"},description:{zh:"\u5fc5\u987b\u63d0\u4f9b\u6240\u6709\u8005\u901a\u884c\u8bc1\u624d\u80fd\u8bbf\u95ee\u5e94\u7528",en:"You must provide owner passport to access this application"}}];var vn,Zn;const jn="roles",yn=[...bn,{value:jn,icon:un.Z,title:{zh:"\u6307\u5b9a\u901a\u884c\u8bc1\u53ef\u8bbf\u95ee",en:"Accessible to selected passports"},description:{zh:"\u53ea\u6709\u6307\u5b9a\u7684\u901a\u884c\u8bc1\u53ef\u4ee5\u8bbf\u95ee",en:"Only specified passports can access"}}],Cn=(e,n)=>{if(e&&e.startsWith(p.WHO_CAN_ACCESS_PREFIX_ROLES)){const t=(0,w.getRolesFromAuthConfig)({whoCanAccess:e}),i=n.filter((e=>t.includes(e.name)));return{access:jn,roles:i}}return{access:e,roles:[]}},kn=function(e,n){let{roles:t=[]}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=(e.configs||[]).find((e=>e.key===I.BLOCKLET_CONFIGURABLE_KEY.COMPONENT_ACCESS_WHO));if(i)return Cn(i.value,t);if(n&&P()(n,"settings.whoCanAccess")&&P()(n,"settings.whoCanAccess")!==p.WHO_CAN_ACCESS.ALL)return Cn(P()(n,"settings.whoCanAccess"),t);const o=(0,w.findServiceFromMeta)(e.meta,p.NODE_SERVICES.AUTH);return P()(o,"config.whoCanAccess")?Cn(o.config.whoCanAccess,t):{access:p.WHO_CAN_ACCESS.ALL,roles:[]}};function wn(e){let{blocklet:n,ancestors:t,children:i}=e;const o=(0,an.Z)(),[l,r]=(0,a.useState)(""),{t:s,locale:c}=(0,C.PE)(),{api:d}=(0,ie.h6)(),{roles:m}=(0,Ce.DJ)(),[f,h]=(0,a.useState)(""),g=t[0]||n,{access:x,roles:b}=kn(n,g,{roles:m}),[v,Z]=(0,a.useState)(x),[j,y]=(0,a.useState)(b),k=[...t.map((e=>e.meta.did)),n.meta.did],S={marginRight:4,fontSize:18,verticalAlign:"text-bottom",color:o.palette.text.secondary},E=t.concat(n).map((e=>(0,w.getDisplayName)(e,!0))).join(" / ");if((0,oe.wS)(n.status))return null;if("unknown"===n.status&&(0,oe.wS)(n.status))return null;const L=()=>{r(!1)},P=e=>{e.stopPropagation(),r(!0)},R=f||v===jn&&!j.length;return["function"===typeof i?i({open:P}):(0,X.jsx)(K.Z,{onClick:P,"data-cy":"action-config-component",children:(0,X.jsx)(pn.default,{})}),l&&(0,X.jsxs)(Sn,{open:!0,fullWidth:!0,title:E,onClose:L,PaperProps:{style:{minHeight:"auto"}},actions:(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(N.Z,{onClick:L,color:"inherit","data-cy":"config-access-cancel",children:s("common.cancel")}),(0,X.jsxs)(N.Z,{onClick:async()=>{if(!f){h(!0);try{let e=v;e===jn&&(e="".concat(p.WHO_CAN_ACCESS_PREFIX_ROLES).concat(j.map((e=>e.name)).join(","))),await d.updateWhoCanAccess({input:{did:k,whoCanAccess:e}}),F.Z.success(s("blocklet.config.access.updatedTip")),L(),h(!1)}catch(e){h(!1),F.Z.error((0,oe.Z)(e))}}},color:"primary",disabled:R,variant:"contained",autoFocus:!0,"data-cy":"config-access-confirm",children:[f&&(0,X.jsx)(z.Z,{size:16}),s("common.confirm")]})]}),children:[(0,X.jsx)(u.Z,{mt:4,mb:3,children:(0,X.jsx)(H.Z,{label:s("blocklet.config.access.description"),select:!0,fullWidth:!0,value:v,onChange:e=>{const{value:n}=e.target;Z(n)},"data-cy":"config-access-select",SelectProps:{renderValue:e=>{const n=yn.find((n=>n.value===e));return n?(0,X.jsxs)(u.Z,{children:[(0,X.jsx)(n.icon,{style:S}),n.title[c]]}):null}},children:yn.map((e=>(0,X.jsxs)(En,{value:e.value,sx:{display:"block"},"data-cy":"config-access-opt-".concat(e.value),children:[(0,X.jsxs)(u.Z,{display:"flex",alignItems:"center",children:[(0,X.jsx)(e.icon,{style:S}),(0,X.jsx)(u.Z,{children:e.title[c]})]}),(0,X.jsx)(u.Z,{children:(0,X.jsx)(u.Z,{className:"tip",children:e.description[c]})})]})))})}),v===jn&&(0,X.jsx)(u.Z,{mt:4,mb:3,children:(0,X.jsx)(H.Z,{label:s("blocklet.config.access.description"),select:!0,fullWidth:!0,value:j.map((e=>e.name)),onChange:e=>{y(m.filter((n=>(e.target.value||[]).includes(n.name))))},SelectProps:{multiple:!0,renderValue:e=>(0,X.jsx)(u.Z,{sx:{display:"flex",flexWrap:"wrap",gap:.5},children:e.map((e=>{const n=m.find((n=>n.name===e));return(0,X.jsx)(W.Z,{label:n.title},n.text)}))})},children:m.map((e=>{let{name:n,title:t}=e;return(0,X.jsxs)(mn.Z,{value:n,children:[(0,X.jsx)(je.Z,{checked:j.some((e=>e.name===n))}),(0,X.jsx)(fn.Z,{primary:t})]},n)}))})})]})]}wn.propTypes={blocklet:s().object.isRequired,ancestors:s().array,children:s().any},wn.defaultProps={ancestors:[],children:null};const Sn=(0,l.Z)(ge.ZP)(vn||(vn=(0,o.Z)(["\n .MuiDialogContent-root {\n padding-top: 0;\n margin-top: -32px;\n }\n .MuiToolbar-root {\n padding-right: 12px;\n }\n .ux-dialog_right {\n padding-right: 20px;\n }\n"]))),En=(0,l.Z)(mn.Z)(Zn||(Zn=(0,o.Z)(["\n .tip {\n font-size: 12px;\n color: ",";\n }\n"])),(e=>e.theme.palette.text.secondary));var Ln;function Pn(e){var n;let{blocklet:t,ancestors:i,depth:o}=e;const l=(0,an.Z)(),{t:r,locale:s}=(0,C.PE)(),{roles:c}=(0,Ce.DJ)(),[d,m]=(0,a.useState)(!0),{recommendedDomain:p}=(0,pe.y0)(),f=i[0]||t,h="/".concat(i.map((e=>e.mountPoint||"/")).join("/"),"/").concat(t.mountPoint||"/").replace(/\/+/g,"/"),g=(0,oe.vH)({blocklet:f,domain:{value:p},mountPoint:h,params:(0,oe.f0)(f,s)}),x={fill:l.palette.text.secondary},b=o>0&&t.children.length>0,v=(0,X.jsx)(K.Z,{size:"small",children:d?(0,X.jsx)(j.Z,{fontSize:"inherit"}):(0,X.jsx)(Z.default,{fontSize:"inherit"})}),{access:y,roles:k}=kn(t,f,{roles:c});let E;if("roles"!==y)E=bn.find((e=>e.value===y))||bn[2];else{const e=k.map((e=>e.title)).join("/");E={title:{zh:"\u53ea\u6709 ".concat(e," \u53ef\u4ee5\u8bbf\u95ee"),en:"Only ".concat(e," can access")}}}return[(o>0||"gateway"!==t.meta.group)&&(0,X.jsxs)(u.Z,{display:"flex",py:2,className:"component-item",justifyContent:"space-between",alignItems:"center",children:[(0,X.jsxs)(u.Z,{pl:Math.max(2*(o-1),0),width:{xs:300,md:400},display:"flex",alignItems:"center",style:{cursor:b?"pointer":"cursor"},onClick:()=>b&&m(!d),children:[b?v:(0,X.jsx)(u.Z,{width:28}),(0,X.jsx)(S.Z,{blocklet:t,ancestors:i}),(0,X.jsxs)(u.Z,{ml:"16px",children:[(0,X.jsx)(u.Z,{style:{color:"#222",fontSize:18},children:(0,w.getDisplayName)(t,!0)}),(0,X.jsx)(u.Z,{display:"flex",alignItems:"center",children:(0,X.jsx)(u.Z,{color:"text.secondary",children:E.title[s]})})]})]},t),(0,X.jsxs)(u.Z,{children:[(0,X.jsx)(ln.Z,{title:r("common.visit"),children:(0,X.jsx)("a",{target:"_blank",href:g,rel:"noopener noreferrer",title:g,children:(0,X.jsx)(K.Z,{children:(0,X.jsx)(sn.Z,{})})})}),(0,X.jsx)(wn,{blocklet:t,ancestors:i,children:e=>{let{open:n}=e;return(0,X.jsx)(ln.Z,{title:r("common.edit"),children:(0,X.jsx)(K.Z,{onClick:n,"data-cy":"btn-edit-".concat(t.meta.did),children:(0,X.jsx)(cn.Z,{style:x})})})}})]},"actions")]},"group-not-gateway-box"),(0,X.jsx)(dn.Z,{depth:o},"line"),null!==(n=t.children)&&void 0!==n&&n.length?(0,X.jsx)(rn.Z,{in:d,children:t.children.map((e=>(0,X.jsx)(Pn,{blocklet:e,ancestors:[...i,t],depth:o+1},"".concat(o+1,"-").concat(e.meta.did))))},"blocklet-collapse"):null]}function Rn(){const{t:e}=(0,C.PE)(),{blocklet:n}=(0,pe.y0)(),t=[...n.children]||[];return"gateway"!==n.meta.group&&t.unshift(n),(0,X.jsx)(An,{component:"div",children:t&&t.length?[(0,X.jsx)(u.Z,{mt:2,ml:{xs:"-12px",md:"-24px"},style:{maxWidth:1080},children:(0,X.jsx)(Pn,{blocklet:n},"0-".concat(n.meta.did))},"top-blocklet-".concat(n.meta.did))]:(0,X.jsx)(u.Z,{mt:8,children:(0,X.jsx)(Ie.Z,{children:e("blocklet.component.noComponent")})})})}Pn.propTypes={blocklet:s().object.isRequired,ancestors:s().array,depth:s().number},Pn.defaultProps={ancestors:[],depth:0},Rn.propTypes={};const An=(0,l.Z)(u.Z)(Ln||(Ln=(0,o.Z)(["\n .title {\n font-size: 1.2rem;\n font-weight: bold;\n margin-top: ",";\n margin-bottom: ",";\n &.first {\n margin-top: 0;\n }\n }\n"])),(e=>e.theme.spacing(5)),(e=>e.theme.spacing(3)));var Tn=t(56556),_n=t(44784);const Nn=function(){var e,n,t;const{api:i}=(0,ie.h6)(),{blocklet:o}=(0,pe.y0)(),{t:a}=(0,C.PE)(),l=null===o||void 0===o||null===(e=o.meta)||void 0===e?void 0:e.did,r=Object.assign({enabled:!1,domain:"",clientId:""},(null===o||void 0===o||null===(n=o.settings)||void 0===n||null===(t=n.oauth)||void 0===t?void 0:t.auth0)||{}),{handleSubmit:s,control:c,formState:d,watch:m,reset:p}=(0,We.cI)({defaultValues:Ue()(r,["domain","clientId","enabled"])}),f=m("enabled"),h=(0,Ke.Z)((async e=>{try{var n,t;const{blocklet:o}=await i.configOAuth({input:{did:l,oauth:JSON.stringify({auth0:e})}}),r=Object.assign({enabled:!1,domain:"",clientId:""},(null===o||void 0===o||null===(n=o.settings)||void 0===n||null===(t=n.oauth)||void 0===t?void 0:t.auth0)||{});p(r),F.Z.success(a("oauth.saveSuccess"))}catch(o){F.Z.error(o.message||a("oauth.saveFailed"))}})),g=(0,Ke.Z)((e=>!(null===e||void 0===e||!e.trim())||a("oauth.auth0.domainDescribe"))),x=(0,Ke.Z)((e=>!(null===e||void 0===e||!e.trim())||a("oauth.auth0.clientIdDescribe"))),b=(0,Ke.Z)((()=>!0));return(0,X.jsx)(u.Z,{children:(0,X.jsxs)("form",{onSubmit:s(h),disabled:!0,children:[(0,X.jsx)(We.Qr,{name:"enabled",control:c,render:e=>{let{field:n}=e;return(0,X.jsx)(Ze.Z,{control:(0,X.jsx)(_n.Z,{checked:n.value,style:{marginRight:"6px"},...n}),label:a("oauth.auth0.enable"),sx:{marginBottom:2,ml:1}})}}),(0,X.jsx)(We.Qr,{name:"domain",control:c,rules:{validate:f?g:b},render:e=>{var n;let{field:t}=e;return(0,X.jsx)(Be.Z,{fullWidth:!0,children:(0,X.jsx)(H.Z,{...t,label:a("oauth.auth0.domain"),error:!!d.errors[t.name],helperText:(null===(n=d.errors[t.name])||void 0===n?void 0:n.message)||"\u3000",disabled:!f})})}}),(0,X.jsx)(We.Qr,{name:"clientId",control:c,rules:{validate:f?x:b},render:e=>{var n;let{field:t}=e;return(0,X.jsx)(Be.Z,{fullWidth:!0,children:(0,X.jsx)(H.Z,{...t,error:!!d.errors[t.name],label:a("oauth.auth0.clientId"),helperText:(null===(n=d.errors[t.name])||void 0===n?void 0:n.message)||"\u3000",disabled:!f})})}}),(0,X.jsx)(Tn.Z,{type:"submit",variant:"contained",onSubmit:s(h),disabled:!d.isDirty,children:a("oauth.save")})]})})};var On=t(62362),In=t(24103);const Fn={ttl:604800};function Bn(e){const n=arguments.length>1&&void 0!==arguments[1]&&arguments[1]?86400*e.ttl:e.ttl/86400;return{...e,ttl:n}}function zn(){var e,n;const{api:t}=(0,ie.h6)(),{blocklet:i}=(0,pe.y0)(),o=null===i||void 0===i||null===(e=i.meta)||void 0===e?void 0:e.did,a=Object.assign({},Fn,(null===i||void 0===i||null===(n=i.settings)||void 0===n?void 0:n.session)||{}),{handleSubmit:l,control:r,formState:s,reset:c}=(0,We.cI)({defaultValues:Ue()(Bn(a),["ttl"])}),{t:d}=(0,C.PE)(),m=(0,Ke.Z)((async e=>{try{var n;const{blocklet:i}=await t.updateAppSessionConfig({input:{did:o,config:Bn(e,!0)}}),a=Object.assign({},Fn,Ue()((null===i||void 0===i||null===(n=i.settings)||void 0===n?void 0:n.session)||{},["ttl"]));c(Bn(a)),F.Z.success(d("common.configSuccess"))}catch(i){F.Z.error(i.message)}}));return(0,X.jsx)(u.Z,{children:(0,X.jsxs)("form",{onSubmit:l(m),disabled:!0,children:[(0,X.jsx)(We.Qr,{name:"ttl",control:r,render:e=>{let{field:n}=e;return(0,X.jsx)(Be.Z,{fullWidth:!0,sx:{mb:2},children:(0,X.jsxs)(In.Z,{px:3,children:[(0,X.jsx)(u.Z,{mx:-3,my:.5,children:d("blocklet.config.session.ttl",{day:n.value})}),(0,X.jsx)(On.ZP,{...n,defaultValue:7,step:1,marks:[{value:1,label:d("blocklet.config.session.day",{day:1})},{value:7,label:d("blocklet.config.session.days",{day:7})},{value:14,label:d("blocklet.config.session.days",{day:14})},{value:21,label:d("blocklet.config.session.days",{day:21})},{value:30,label:d("blocklet.config.session.days",{day:30})}],min:1,max:30,valueLabelDisplay:"auto",style:{maxWidth:"360px"}})]})})}}),(0,X.jsx)(Tn.Z,{type:"submit",variant:"contained",onSubmit:l(m),disabled:!s.isDirty,children:d("oauth.save")})]})})}var Un=t(82555),Dn=t(30333),Kn=t(75760),Wn=t(97038),qn=t(64886),Gn=t(42080),Vn=t.n(Gn),Hn=t(75506),Mn=t.n(Hn),Yn=t(47685),Jn=t(13260),Qn=t(82434),Xn=t.n(Qn);const $n=(0,a.forwardRef)(((e,n)=>{var t,i;const{t:o}=(0,a.useContext)(C.RD),{blocklet:l}=(0,pe.y0)(),{api:r}=(0,ie.h6)(),s=(0,De.Z)({mode:"view",show:!1,data:{},callback:Qe()}),c=(0,Yn.Fg)(),d=(null===c||void 0===c||null===(t=c.transitions)||void 0===t||null===(i=t.duration)||void 0===i?void 0:i.leavingScreen)||300,p=(0,Ke.Z)((()=>{s.mode="view",s.data={},s.callback=Qe()}),[]),f=(0,Ke.Z)((()=>{s.show=!1,setTimeout((()=>{p()}),d)}),[]),h=(0,Ke.Z)((e=>{s.mode="view",s.show=!0,s.data=e}),[]),g=(0,Ke.Z)((function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Qe();s.mode="approve",s.show=!0,s.data=e,s.callback=n}),[]);(0,a.useImperativeHandle)(n,(()=>({open:h,close:f,approve:g})),[h,f,g]);const x=(0,Fe.Z)((()=>{if(!s.show)return[];s.data.migratedFrom=[s.data.appId,s.data.appPid];const e=["appName","appLogo","appId","appPid","migratedFrom","appDescription","appUrl","version","appliedAt","status","serverId","serverVersion"];return!1!==s.data.isMaster&&Vn()(e,"appliedAt","status"),e.map((e=>{const n=o("federated.info.".concat(e));let t=s.data[e];if("appName"===e&&s.data.isMaster&&(t=(0,X.jsxs)(u.Z,{children:[(0,X.jsx)(Un.Z,{component:Dn.Z}),t]})),["appId","appPid","serverId"].includes(e)&&(t=(0,X.jsx)(Jn.kL,{children:t})),["appUrl"].includes(e)&&(t=(0,X.jsx)(u.Z,{component:"a",href:t,target:"_blank",children:t})),["appLogo"].includes(e)){const e=Xn()(t)?t:m()(s.data.appUrl||"",t||"");try{const n=new URL(e);n.searchParams.set("imageFilter","resize"),n.searchParams.set("w","80"),n.searchParams.set("h","80"),t=(0,X.jsx)("img",{src:n.href,width:"60",height:"60",alt:s.data.appName})}catch{t=(0,X.jsx)("img",{src:e,width:"60",height:"60",alt:s.data.appName})}}if("status"===e&&(t=t&&o("federated.status.".concat(t))),"migratedFrom"===e){t=(s.data.migratedFrom||[]).filter((e=>![s.data.appId,s.data.appPid].includes(e))).map((e=>(0,X.jsx)(Jn.kL,{children:e})))}return Mn()(t)&&(t="-"),{name:n,value:t}}))}),[s.data]),b="approve"===s.mode,v=(0,Ke.Z)((async()=>{await r.auditFederatedLogin({input:{memberPid:s.data.appPid,did:l.appPid,status:"rejected"}}),f(),null===s||void 0===s||s.callback(!1)})),Z=(0,Ke.Z)((async()=>{await r.auditFederatedLogin({input:{memberPid:s.data.appPid,did:l.appPid,status:"approved"}}),f(),null===s||void 0===s||s.callback(!0)}));return(0,X.jsx)(ge.ZP,{open:s.show,title:o(b?"federated.approveToJoinLogin":"federated.siteDetail"),onClose:f,actions:b?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(Tn.Z,{color:"error",variant:"contained",onClick:v,children:o("common.reject")}),(0,X.jsx)(Tn.Z,{variant:"contained",onClick:Z,children:o("common.approve")})]}):(0,X.jsx)(Tn.Z,{variant:"outlined",onClick:f,children:o("common.close")}),children:x.map((e=>(0,X.jsx)(qn.Z,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:180,name:e.name,children:e.value},e.name)))})}));var et=t(79842),nt=t(85408),tt=t.n(nt);const it=(0,a.forwardRef)(((e,n)=>{var t,i;const o=(0,Yn.Fg)(),l=(null===o||void 0===o||null===(t=o.transitions)||void 0===t||null===(i=t.duration)||void 0===i?void 0:i.leavingScreen)||300,{t:r}=(0,a.useContext)(C.RD),s=(0,De.Z)({show:!1,data:{link:""}}),c=(0,Ke.Z)((()=>{s.data.link=""}),[]),d=(0,Ke.Z)((()=>{s.show=!1,setTimeout((()=>{c()}),l)}),[]),m=(0,Ke.Z)((e=>{let{link:n}=e;s.show=!0,s.data.link=n}),[]);(0,a.useImperativeHandle)(n,(()=>({open:m,close:d})),[m,d]);const p=(0,Ke.Z)((()=>{tt()(s.data.link),d()}),[d]);return(0,X.jsxs)(ge.ZP,{open:s.show,title:r("federated.joinFederatedLogin"),onClose:d,PaperProps:{style:{minHeight:"unset"}},actions:(0,X.jsx)(N.Z,{color:"primary",autoFocus:!0,variant:"contained",onClick:p,children:r("common.copyAndClose")}),children:[(0,X.jsx)(u.Z,{mb:1,children:r("federated.inviteJoinFederatedLoginDescription")}),(0,X.jsx)(u.Z,{sx:{"& .copy-button":{display:"none !important"}},children:(0,X.jsx)(et.Z,{language:"shell",style:{marginBottom:0},children:s.data.link})})]})}));function ot(e){var n,t,i,o,l;let{mode:r}=e;const s=(0,a.useRef)(null),c=(0,a.useRef)(null),{t:d,locale:m}=(0,a.useContext)(C.RD),{blocklet:p,actions:{refreshBlocklet:f}}=(0,pe.y0)(),{confirmApi:h,confirmHolder:g}=$e(),{api:x}=(0,ie.h6)(),b=(null===(n=p.settings.federated)||void 0===n?void 0:n.sites)||[],v=(null===(t=p.settings.federated)||void 0===t?void 0:t.config)||{},Z=!1!==v.isMaster,j=(0,Ke.Z)((e=>{var n;null===(n=c.current)||void 0===n||n.open(e)})),y=(0,Ke.Z)((e=>{var n;null===(n=c.current)||void 0===n||n.approve(e,f)})),k=(0,Ke.Z)((e=>{h.open({title:d("federated.disableFederatedLogin"),content:d("federated.disableFederatedLoginDescription"),async onConfirm(n){await x.auditFederatedLogin({input:{memberPid:e.appPid,did:p.appPid,status:"revoked"}}),n()}})})),w=(0,Ke.Z)((e=>{h.open({title:d("federated.enableFederatedLogin"),content:d("federated.enableFederatedLoginDescription"),async onConfirm(n){await x.auditFederatedLogin({input:{memberPid:e.appPid,did:p.appPid,status:"approved"}}),n()}})})),S=(0,Fe.Z)((()=>{const e=[{label:d("common.name"),name:"appName",options:{customBodyRenderLite:e=>{const n=b[e],t=!1!==n.isMaster;return(0,X.jsx)(u.Z,{display:"inline-block",children:(0,X.jsxs)(u.Z,{component:"a",display:"flex",alignItems:"center",href:n.appUrl,target:"_blank",onClick:e=>{e.stopPropagation()},children:[t&&(0,X.jsx)(Un.Z,{component:Dn.Z,style:{marginRight:"4px"}}),n.appName]})})}}},{label:d("common.did"),name:"appId",options:{customBodyRenderLite:e=>{const n=b[e];return(0,X.jsx)(Wn.Z,{children:n.appId})}}},{label:d("common.status"),name:"status",options:{customBodyRenderLite:e=>{const n=b[e],t=!1!==n.isMaster;return(0,X.jsx)(u.Z,{children:t?"-":d("federated.status.".concat(n.status))})}}}];return Z&&e.push({label:d("common.actions"),name:"actions",options:{customBodyRenderLite:e=>{const n=b[e],t=!1!==n.isMaster;return(0,X.jsx)(u.Z,{display:"flex",gap:1,children:t?(0,X.jsxs)(X.Fragment,{children:["rejected"===n.status&&(0,X.jsx)(N.Z,{variant:"contained",color:"error",size:"small",onClick:e=>{e.stopPropagation()},children:d("federated.status.rejected")}),"revoked"===n.status&&(0,X.jsx)(N.Z,{variant:"contained",color:"secondary",size:"small",onClick:e=>{e.stopPropagation()},children:d("federated.status.revoked")})]}):(0,X.jsxs)(X.Fragment,{children:["pending"===n.status&&(0,X.jsx)(N.Z,{variant:"contained",color:"primary",size:"small",onClick:e=>{e.stopPropagation(),y(n)},children:d("federated.status.pending")}),"approved"===n.status&&(0,X.jsx)(N.Z,{variant:"contained",color:"error",size:"small",onClick:e=>{e.stopPropagation(),k(n)},style:{whiteSpace:"nowrap"},children:d("federated.revoke")}),"revoked"===n.status&&(0,X.jsx)(N.Z,{variant:"contained",color:"warning",size:"small",onClick:e=>{e.stopPropagation(),w(n)},style:{whiteSpace:"nowrap"},children:d("federated.approve")})]})})}}}),e}),[v.appId,b,Z,d]),E=(0,Fe.Z)((()=>({sort:!0,download:!1,filter:!1,print:!1,expandableRowsOnClick:!0,onRowClick(e,n){let{dataIndex:t}=n;const i=b[t];j(i)}})),[]),L=(0,Ke.Z)((()=>{const e=p.environments.find((e=>e.key===I.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL));var n;null!==e&&void 0!==e&&e.value?null===(n=s.current)||void 0===n||n.open({link:e.value}):F.Z.error(d("federated.failedToGetFederatedLoginLink"))}),[null===(i=p.site)||void 0===i||null===(o=i.domainAliases)||void 0===o||null===(l=o[0])||void 0===l?void 0:l.href]),P=(0,Ke.Z)((()=>{h.open({title:d("federated.quitFederatedLogin"),content:d("federated.quitFederatedLoginDescription"),async onConfirm(e){await x.quitFederatedLogin({input:{did:p.appPid}}),e()}})})),R=(0,Ke.Z)((()=>{h.open({title:d("federated.disbandFederatedLogin"),content:d("federated.disbandFederatedLoginDescription"),async onConfirm(e){await x.disbandFederatedLogin({input:{did:p.appPid}}),e()}})})),A=[];return"master"!==r?A.push((0,X.jsx)(N.Z,{size:"small",variant:"contained",color:"error",onClick:P,sx:{ml:1},children:d("federated.quitFederatedLogin")},"quitFederatedLogin")):(A.push((0,X.jsx)(N.Z,{size:"small",variant:"contained",onClick:L,sx:{ml:1},children:d("federated.inviteJoinFederatedLogin")},"inviteJoinFederatedLogin")),A.push((0,X.jsx)(N.Z,{color:"error",size:"small",variant:"contained",onClick:R,sx:{ml:1},children:d("federated.disbandFederatedLogin")},"disbandFederatedLogin"))),(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(Kn.Z,{className:"main-table",locale:m,data:b,columns:S,customButtons:A,title:(0,X.jsx)(u.Z,{className:"table-toolbar-left",children:d("oauth.federated")}),options:E}),g,(0,X.jsx)(it,{ref:s}),(0,X.jsx)($n,{ref:c})]})}ot.propTypes={mode:s().oneOf(["member","master"])},ot.defaultProps={mode:"member"};const at=ot,lt=(0,a.forwardRef)(((e,n)=>{var t,i;const{t:o}=(0,a.useContext)(C.RD),{api:l}=(0,ie.h6)(),{blocklet:r}=(0,pe.y0)(),s=null===r||void 0===r?void 0:r.appPid,c=(0,Yn.Fg)(),d=(null===c||void 0===c||null===(t=c.transitions)||void 0===t||null===(i=t.duration)||void 0===i?void 0:i.leavingScreen)||300,m=(0,De.Z)({show:!1,appUrl:"",appUrlError:"",callback:Qe()}),p=(0,Ke.Z)((()=>{m.appUrl="",m.appUrlError="",m.callback=Qe()}),[]),f=(0,Ke.Z)((()=>{m.show=!1,setTimeout((()=>{p()}),d)}),[]),h=(0,Ke.Z)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Qe();m.show=!0,m.callback=e}),[]);(0,a.useImperativeHandle)(n,(()=>({open:h,close:f})),[h,f]);const g=(0,Ke.Z)((e=>{if(!e)throw new Error(o("federated.federatedJoinAppUrlRequired"));if(!Xn()(e))throw new Error(o("federated.federatedJoinAppUrlInvalid"))})),x=(0,Ke.Z)((async()=>{try{g(m.appUrl);const e=await l.joinFederatedLogin({input:{did:s,appUrl:m.appUrl}});m.show=!1,f(),null===m||void 0===m||m.callback(e)}catch(e){m.appUrlError=e.message}}),[f,s]);return(0,X.jsxs)(ge.ZP,{open:m.show,title:o("federated.joinFederatedLogin"),onClose:f,PaperProps:{style:{minHeight:"unset"}},actions:(0,X.jsx)(N.Z,{color:"primary",autoFocus:!0,variant:"contained",onClick:x,children:o("common.confirm")}),children:[(0,X.jsx)(u.Z,{mb:1,children:o("federated.joinFederatedLoginDescription")}),(0,X.jsx)(H.Z,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:o("federated.federatedJoinAppUrl"),label:o("federated.federatedJoinAppUrl"),value:m.appUrl,error:!!m.appUrlError,helperText:m.appUrlError||"eg: https://www.arcblock.io",onChange:e=>{m.appUrl=e.target.value}})]})}));function rt(){var e,n,t,i;const o=(0,a.useRef)(null),l=(0,a.useRef)(null),{t:r}=(0,a.useContext)(C.RD),{blocklet:s,actions:{refreshBlocklet:c}}=(0,pe.y0)(),d=(0,Ke.Z)((()=>{var e,n,t;const i=null===(e=s.site)||void 0===e||null===(n=e.domainAliases)||void 0===n||null===(t=n[0])||void 0===t?void 0:t.href;if(i)try{var a;const e=new URL(i);null===(a=o.current)||void 0===a||a.open({link:e.origin})}catch{F.Z.error(r("federated.failedToGetFederatedLoginLink"))}}),[null===(e=s.site)||void 0===e||null===(n=e.domainAliases)||void 0===n||null===(t=n[0])||void 0===t?void 0:t.href]),m=(0,Ke.Z)((()=>{var e;null===(e=l.current)||void 0===e||e.open((()=>{c()}))}),[c]);if((null===(i=s.settings.federated)||void 0===i?void 0:i.sites.length)>0){var p;const e=!1!==(null===(p=s.settings.federated)||void 0===p?void 0:p.config.isMaster);return(0,X.jsx)(at,{mode:e?"master":"member"})}return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(u.Z,{display:"flex",flexDirection:"column",gap:2,justifyContent:"center",alignItems:"center",minHeight:"200px",children:[(0,X.jsx)(N.Z,{variant:"contained",onClick:d,children:r("federated.inviteJoinFederatedLogin")}),(0,X.jsx)(_.Z,{sx:{width:"150px",color:"rgba(0, 0, 0, 0.3)"},children:"OR"}),(0,X.jsx)(N.Z,{variant:"outlined",onClick:m,children:r("federated.joinFederatedLogin")})]}),(0,X.jsx)(it,{ref:o}),(0,X.jsx)(lt,{ref:l})]})}const st=function(){const{t:e}=(0,a.useContext)(C.RD),n=[{label:(0,X.jsx)(u.Z,{textAlign:"center",width:"100%",children:e("oauth.commonSettings")}),value:"settings"},{label:(0,X.jsx)(u.Z,{textAlign:"center",width:"100%",children:e("oauth.federated")}),value:"federated"},{label:(0,X.jsx)(u.Z,{textAlign:"center",width:"100%",children:"Auth0"}),value:"auth0"},{label:(0,X.jsx)(u.Z,{textAlign:"center",width:"100%",children:e("oauth.moreLogin")}),value:"more"}],[t,i]=(0,a.useState)(n[0].value),o=(0,Fe.Z)((()=>({auth0:(0,X.jsx)(Nn,{}),federated:(0,X.jsx)(rt,{}),more:(0,X.jsx)(u.Z,{children:(0,X.jsx)(Ie.Z,{children:e("oauth.comingSoon")})}),settings:(0,X.jsx)(u.Z,{children:(0,X.jsx)(zn,{})})})),[e]);return(0,X.jsxs)(u.Z,{children:[(0,X.jsx)(k.Z,{tabs:n,current:t,onChange:i}),(0,X.jsx)(u.Z,{marginTop:"10px",children:o[t]})]})};var ct;const dt=e=>{let{tabs:n,blocklet:t,ancestors:i=[],depth:o=1,t:a}=e;const l=[...i.map((e=>e.meta.did)),t.meta.did].join("/"),r=!(null!==i&&void 0!==i&&i.length);n.push({label:(0,X.jsxs)(u.Z,{pl:2*Math.max(1,o-1),display:"flex",alignItems:"center",justifyContent:"flex-start",children:[r?(0,X.jsx)(E.Z,{size:24,blocklet:t}):(0,X.jsx)(S.Z,{size:24,blocklet:t,ancestors:i}),(0,X.jsx)(u.Z,{ml:"16px",children:(0,X.jsx)(u.Z,{style:{color:"#222"},children:r?a("blocklet.component.container"):(0,w.getDisplayName)(t,!0)})})]},l),value:l}),t.children.length>0&&t.children.forEach((e=>{dt({tabs:n,blocklet:e,ancestors:[...i,t],depth:o+1,t:a})}))};function mt(e){let{blocklet:n,onUpdate:t,...i}=e;const{t:o}=(0,a.useContext)(C.RD),{info:l,inService:r}=(0,ie.h6)(),[s,d]=(0,a.useState)(!0),[w,S]=(0,y.useSearchParams)(),E=w.get("tab")||"general",L=[{label:(0,X.jsxs)(u.Z,{display:"flex",alignItems:"center","data-cy":"configuration-tab-general",children:[(0,X.jsx)(h.Z,{sx:{fontSize:24}}),(0,X.jsx)(u.Z,{ml:"16px",children:(0,X.jsx)(u.Z,{style:{color:"#222"},children:o("common.general")})})]},"general"),value:"general"},{label:(0,X.jsxs)(u.Z,{display:"flex",alignItems:"center","data-cy":"configuration-tab-access",children:[(0,X.jsx)(g.Z,{sx:{fontSize:24}}),(0,X.jsx)(u.Z,{ml:"16px",children:(0,X.jsx)(u.Z,{style:{color:"#222"},children:o("common.access")})})]},"access"),value:"access"},{label:(0,X.jsxs)(u.Z,{display:"flex",alignItems:"center","data-cy":"configuration-tab-oauth",children:[(0,X.jsx)(x.Z,{sx:{fontSize:24}}),(0,X.jsx)(u.Z,{ml:"16px",children:(0,X.jsx)(u.Z,{style:{color:"#222"},children:o("common.login")})})]},"oauth"),value:"oauth"},{label:(0,X.jsxs)(u.Z,{display:"flex",alignItems:"center","data-cy":"configuration-tab-notification",children:[(0,X.jsx)(b.Z,{sx:{fontSize:24}}),(0,X.jsx)(u.Z,{ml:"16px",children:(0,X.jsx)(u.Z,{style:{color:"#222"},children:o("common.notification")})})]},"notification"),value:"notification"},{label:(0,X.jsxs)(u.Z,{display:"flex",alignItems:"center","data-cy":"configuration-tab-preference",children:[(0,X.jsx)(u.Z,{ml:-2,style:{transform:"translateY(2px)"},children:s?(0,X.jsx)(j.Z,{fontSize:"inherit"}):(0,X.jsx)(Z.default,{fontSize:"inherit"})}),(0,X.jsx)(v.Z,{sx:{fontSize:24}}),(0,X.jsx)(u.Z,{ml:"16px",children:(0,X.jsx)(u.Z,{style:{color:"#222"},children:o("common.preferences")})})]},"preference"),value:"preference"}];s&&dt({tabs:L,blocklet:n,t:o});let P=null;if("general"===E)P=(0,X.jsx)(Ne,{blocklet:n,onUpdate:t});else if("access"===E)P=(0,X.jsx)(Rn,{});else if("oauth"===E)P=(0,X.jsx)(st,{});else if("notification"===E)P=(0,X.jsx)(on,{});else{const e=r?p.WELLKNOWN_SERVICE_PATH_PREFIX:l.routing.adminPath,n=new URLSearchParams;r||n.set("authKey","__sst"),n.set("schemaKey",m()(window.location.origin,e,"/api/preferences?id=".concat(encodeURIComponent(E)))),P=(0,X.jsx)(c.Z,{url:"".concat(m()(window.location.origin,e,"/hosted/form-collector/"),"?").concat(n.toString()),width:"100%",height:"100%",frameBorder:0,styles:{border:0}})}return(0,X.jsx)(pt,{...i,children:(0,X.jsxs)(f.ZP,{container:!0,spacing:4,columns:24,children:[(0,X.jsx)(f.ZP,{item:!0,sm:7,md:5,children:(0,X.jsx)(k.Z,{tabs:L,current:E,orientation:"vertical",onChange:e=>{"preference"===e?d(!s):S((n=>("general"===e?n.delete("tab"):n.set("tab",e),n)))},sx:{borderRight:1,height:"100%",borderColor:"divider"}})}),(0,X.jsx)(f.ZP,{item:!0,sm:17,md:19,children:(0,X.jsx)(u.Z,{style:{minHeight:"66vh",height:"100%",position:"relative",overflow:"hidden"},children:P})})]})})}mt.propTypes={blocklet:s().object.isRequired,onUpdate:s().func},mt.defaultProps={onUpdate:()=>{}};const pt=l.Z.div(ct||(ct=(0,o.Z)(["\n .MuiTab-root {\n text-align: left;\n align-items: flex-start;\n font-weight: normal;\n }\n .Mui-selected {\n font-weight: bold;\n }\n"])))},78410:(e,n,t)=>{t.d(n,{Z:()=>p});var i=t(5057),o=t(86229),a=t(28726),l=t(44846),r=t(68420),s=t(14491),c=t(58238),d=t(70461),m=t(96266);function p(e){let{teamDid:n,size:t="small",...p}=e;const{t:u}=(0,r.PE)(),{api:f}=(0,c.h6)(),[h,g]=(0,i.useState)(!1),[x,b]=(0,i.useState)(null),v={title:u("blocklet.config.clearCache.title"),description:u("blocklet.config.clearCache.description"),confirm:u("common.confirm"),cancel:u("common.cancel"),onConfirm:async()=>{try{var e;g(!0);const t=await f.clearCache({input:{teamDid:n}});o.Z.success(u("blocklet.config.clearCache.success",{count:(null===(e=t.removed)||void 0===e?void 0:e.length)||0}))}catch(t){o.Z.error((0,s.Z)(t))}finally{g(!1),b(null)}},onCancel:()=>{g(!1),b(null)}};return(0,m.jsxs)("div",{...p,children:[(0,m.jsxs)(a.Z,{onClick:()=>b(v),color:"error",variant:"outlined",size:t,children:[h?(0,m.jsx)(l.Z,{size:16,style:{marginRight:5}}):null,u("blocklet.config.clearCache.action")]}),x&&(0,m.jsx)(d.Z,{title:x.title,description:x.description,confirm:x.confirm,cancel:x.cancel,onConfirm:x.onConfirm,onCancel:x.onCancel})]})}},50185:(e,n,t)=>{t.d(n,{Z:()=>c});var i=t(5057),o=t(55898),a=t.n(o),l=t(12937),r=t(68420),s=t(96266);function c(e){let{children:n,...t}=e;const{t:o}=(0,i.useContext)(r.RD);return(0,s.jsx)(l.Z,{tip:o("common.copyTip"),copiedTip:o("common.copiedTip"),...t,children:n})}c.propTypes={children:a().any.isRequired}},28641:(e,n,t)=>{t.d(n,{Z:()=>x});var i=t(5057),o=t(55898),a=t.n(o),l=t(39948),r=t(47020),s=t(44846),c=t(13727),d=t(56184),m=t(67680),p=t(35406),u=t(11875),f=t(95890),h=t(96266);const g=(e,n,t)=>null===e&&n&&t?"******":e?n?"******":e:"";function x(e){let{label:n,disabled:t,required:o,initialValue:a,onChange:x,placeholder:b,style:v,onSubmit:Z,secure:j,triggers:y,formatterBeforeSubmit:C,...k}=e;const[w,S]=(0,i.useState)(!1),[E,L]=(0,i.useState)(!1),[P,R]=(0,i.useState)(j&&"__encrypted__"===a?null:a),[A,T]=(0,i.useState)(P),_=async()=>{L(!0);try{if(!1===await Z(A))T(P);else{let e=A;"function"===typeof C&&(e=C(A)),T(e),R(e)}}catch(e){T(P)}finally{L(!1),S(!1)}},N=w?(0,h.jsx)(r.Z,{style:{flex:1},fullWidth:!0,value:A,onChange:e=>{var n;n=e.target.value,T(n),x(n)},autoFocus:!0,size:"small",variant:"outlined",placeholder:b,onKeyDown:e=>{"Enter"===e.key&&_()},disabled:t,type:j?"password":"text",...k}):(0,h.jsx)(l.Z,{px:1,className:"form-item-input slot",style:{whiteSpace:"pre-wrap"},children:g(A,j,a)});return(0,h.jsx)(u.Z,{className:"form",style:v,children:(0,h.jsxs)(l.Z,{className:"form-item",children:[(0,h.jsxs)(l.Z,{className:"form-item-label",children:[n,o&&(0,h.jsx)(p.Z,{})]}),(0,h.jsxs)(l.Z,{className:"form-item-body",children:[(0,h.jsx)(l.Z,{className:"form-item-input",children:N}),(0,h.jsx)(l.Z,{className:"form-item-action",children:w?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(m.Z,{"data-cy":"schema-form-item-confirm",onClick:_,disabled:t||E,size:"large",children:E?(0,h.jsx)(s.Z,{size:24}):(0,h.jsx)(d.Z,{})}),(0,h.jsx)(m.Z,{"data-cy":"schema-form-item-cancel",onClick:()=>{T(P),S(!1)},disabled:t||E,size:"large",children:(0,h.jsx)(c.default,{})})]}):(0,h.jsx)(f.Z,{triggers:y,onEnterEdit:()=>S(!0),disabled:t})})]})]})})}x.propTypes={style:a().object,onSubmit:a().func,onChange:a().func,label:a().string,initialValue:a().string,placeholder:a().string,required:a().bool,disabled:a().bool,secure:a().bool,triggers:a().array,formatterBeforeSubmit:a().func},x.defaultProps={style:{},onSubmit:()=>{},onChange:()=>{},label:"",initialValue:"",placeholder:"",required:!1,disabled:!1,secure:!1,triggers:[],formatterBeforeSubmit:null}},11875:(e,n,t)=>{t.d(n,{Z:()=>r});var i,o=t(71171),a=t(33518),l=t(39948);const r=(0,a.Z)(l.Z)(i||(i=(0,o.Z)(["\n width: 100%;\n flex-grow: 1;\n overflow-y: auto;\n "," {\n width: 100%;\n flex-shrink: 0;\n padding: 0 24px;\n transform: translate(0, 0);\n /* max-height: 60vh; */\n }\n\n .form-item {\n width: 100%;\n margin-bottom: 24px;\n position: relative;\n "," {\n flex-wrap: wrap;\n justify-content: space-between;\n width: 100%;\n flex-shrink: 0;\n }\n }\n\n .form-item-body {\n display: flex;\n align-items: center;\n width: 100%;\n margin-top: 4px;\n }\n\n .form-item-label {\n line-height: 1.2;\n font-size: 14px;\n color: #888;\n font-weight: bold;\n\n "," {\n text-align: left;\n width: auto;\n flex-grow: 1;\n }\n }\n\n .form-item-input {\n flex-grow: 1;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n\n &.slot {\n height: 40px;\n line-height: 40px;\n background: #f8f8f8;\n font-size: 16px;\n\n .MuiChip-root {\n margin-top: -4px;\n }\n }\n\n .MuiSelect-select {\n padding: 8px;\n }\n }\n\n .form-item-action {\n // width: 100px;\n text-align: left;\n margin-left: 12px;\n flex-shrink: 0;\n "," {\n width: auto;\n margin-left: 0px;\n }\n .MuiIconButton-root {\n padding: 8px;\n svg {\n fill: #888;\n }\n &.Mui-disabled {\n opacity: 0.4;\n }\n }\n }\n"])),(e=>e.theme.breakpoints.down("md")),(e=>e.theme.breakpoints.down("md")),(e=>e.theme.breakpoints.down("md")),(e=>e.theme.breakpoints.down("md")))},95890:(e,n,t)=>{t.d(n,{Z:()=>x});var i=t(5057),o=t(55898),a=t.n(o),l=t(24558),r=t(67680),s=t(56556),c=t(80633),d=t(49390),m=t(72113),p=t(25228),u=t(49020),f=t(74490),h=t(1733),g=t(96266);function x(e){let{triggers:n,onEnterEdit:t,disabled:o}=e;const a=i.useRef(null),[x,b]=i.useState(!1);return 0===n.length?(0,g.jsx)(r.Z,{"data-cy":"schema-form-item-edit",onClick:t,disabled:o,size:"large",children:(0,g.jsx)(l.Z,{})}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(c.Z,{variant:"outlined",ref:a,"aria-label":"split button",children:[(0,g.jsx)(s.Z,{"data-cy":"schema-form-item-edit",onClick:t,disabled:o,size:"large",children:(0,g.jsx)(l.Z,{})}),(0,g.jsx)(s.Z,{size:"small","aria-controls":x?"split-button-menu":void 0,"aria-expanded":x?"true":void 0,onClick:()=>{b((e=>!e))},children:(0,g.jsx)(d.Z,{})})]}),(0,g.jsx)(u.Z,{sx:{zIndex:9999},open:x,anchorEl:a.current,role:void 0,placement:"bottom-end",children:(0,g.jsx)(p.Z,{children:(0,g.jsx)(m.d,{onClickAway:e=>{a.current&&a.current.contains(e.target)||b(!1)},children:(0,g.jsx)(h.Z,{id:"split-button-menu",autoFocusItem:!0,children:n.map((e=>(0,g.jsx)(f.Z,{onClick:()=>{return n=e.handler,b(!1),void n();var n},children:e.title},e.key)))})})})})]})}x.propTypes={triggers:a().arrayOf(a().shape({key:a().string.isRequired,title:a().string.isRequired,handler:a().func.isRequired})),onEnterEdit:a().func.isRequired,disabled:a().bool.isRequired},x.defaultProps={triggers:[]}},35406:(e,n,t)=>{t.d(n,{Z:()=>a});var i,o=t(71171);const a=t(33518).Z.span(i||(i=(0,o.Z)(["\n color: ",";\n &::before {\n content: '*';\n }\n"])),(e=>e.theme.palette.error.main))},54063:(e,n,t)=>{t.d(n,{C:()=>i});const i="true"===localStorage.getItem("enableDebug")}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[6511],{86511:(e,t,n)=>{n.r(t),n.d(t,{default:()=>ne});var a=n(71171),i=n(5057),o=n(33518),l=n(85493),s=n(15849),c=n(68420),r=n(11750),d=n(39434),u=n(39948),p=n(1340),m=n(94464),v=n(88574),h=n(28726),g=n(38242),b=n(81010),f=n(87363),y=(n(5892),n(86229)),k=n(1722),x=n(35432),w=n(22425),P=n(58238),j=n(29054),S=n(73545),B=n(14491),Z=n(4651),C=n(96266);const E=e=>{const t={};let n=null;return(0,g.forEachBlockletSync)(e,(e=>{t[e.meta.bundleDid]?n=(0,g.getDisplayName)(e,!0):e.meta.bundleDid&&(t[e.meta.bundleDid]=!0)})),n},L=(e,t,n)=>{const{hostname:a,href:i}=e;if(!t)return i;if(n){var o;const e=/\d+[-.]\d+[-.]\d+[-.]\d+/.exec(a);if(!e)return i;const n=e[0],l=(((null===(o=t.site)||void 0===o?void 0:o.domainAliases)||[]).map((e=>e.value)).filter(Boolean).find((e=>e.endsWith(x.DEFAULT_DID_DOMAIN)))||"").replace(".".concat(x.DEFAULT_DID_DOMAIN),"");return l?i.replace(a,"".concat(l,"-").concat(n,".").concat(x.DEFAULT_IP_DOMAIN_SUFFIX)):i}return i.replace(t.meta.bundleDid,t.appPid)};function _(){const{t:e}=(0,c.PE)(),{api:t}=(0,S.T)(),{blocklet:n}=(0,j.y0)(),{inService:a}=(0,P.h6)(),[o,l]=(0,i.useState)(!1),[s,r]=(0,i.useState)(5),d=n&&n.structVersion!==x.APP_STRUCT_VERSION;return[d&&(0,C.jsxs)(v.Z,{type:"warning",style:{margin:"12px 0"},children:[(0,C.jsxs)(u.Z,{display:"flex",alignItems:"center",children:[(0,C.jsx)(h.Z,{variant:"contained",size:"small",color:"primary",onClick:()=>(()=>{try{if("running"===n.status)return void y.Z.error(e("blocklet.migrate.tip.running"));const t=E(n);if(t)return void y.Z.error(e("blocklet.migrate.tip.duplicate",{name:t}));l(!0)}catch(t){y.Z.error((0,B.Z)(t))}})(),style:{marginRight:8},children:e("blocklet.migrate.intro.l1")}),(0,C.jsx)("span",{children:e("blocklet.migrate.intro.l2")})]}),["l3","l4","l5","l6"].map((t=>(0,C.jsx)(u.Z,{display:"flex",alignItems:"center",children:e("blocklet.migrate.intro.".concat(t))},t)))]},"alert"),n&&(0,C.jsx)(w.Z,{popup:!0,open:o,saveConnect:!1,forceConnected:!1,action:"migrate-app-to-struct-v2",checkFn:t.get,checkTimeout:3e5,onSuccess:()=>{const e=L(window.location,n,a);setTimeout((()=>{window.location.href=e}),5e3),r(5),setInterval((()=>{r((e=>e-1))}),1e3)},extraParams:{appDid:n.appDid,did:n.meta.did,wt:(0,Z.iK)(n,!0),title:(0,g.getDisplayName)(n)},messages:{title:e("blocklet.migrate.title"),scan:e("blocklet.migrate.scan"),confirm:e("blocklet.migrate.confirm"),success:s>=0?e("blocklet.migrate.success",{sec:s}):"Redirecting..."},onClose:()=>l(!1)},"connect")]}_.propTypes={};var D,A=n(35966),N=n(85531),G=n(44846),U=n(78123),T=n(75793),I=n(17022),O=n(21289),K=n(74094),z=n(7199);const R=(0,i.lazy)((()=>Promise.all([n.e(7718),n.e(7020),n.e(4549)]).then(n.bind(n,64549)))),F=(0,i.lazy)((()=>Promise.all([n.e(7718),n.e(7020),n.e(8537),n.e(4631),n.e(2294),n.e(6547),n.e(9085),n.e(5760),n.e(506),n.e(2362),n.e(4852),n.e(4509),n.e(6230)]).then(n.bind(n,64558)))),M=(0,i.lazy)((()=>Promise.all([n.e(7718),n.e(7020),n.e(4631),n.e(6547),n.e(6743),n.e(506),n.e(4852),n.e(1294),n.e(3555),n.e(4775)]).then(n.bind(n,14775)))),V=(0,i.lazy)((()=>Promise.all([n.e(7718),n.e(442),n.e(9662),n.e(7676),n.e(8986)]).then(n.bind(n,13239)))),Y=(0,i.lazy)((()=>Promise.all([n.e(7718),n.e(7020),n.e(5745),n.e(9725),n.e(5374),n.e(592),n.e(5979),n.e(2537)]).then(n.bind(n,75979)))),$=(0,i.lazy)((()=>Promise.all([n.e(7718),n.e(7020),n.e(8537),n.e(4631),n.e(2294),n.e(6547),n.e(9085),n.e(5760),n.e(6743),n.e(6706),n.e(9590),n.e(4296),n.e(3216)]).then(n.bind(n,75672)))),W=(0,i.lazy)((()=>Promise.all([n.e(7718),n.e(7020),n.e(8537),n.e(4631),n.e(2294),n.e(9085),n.e(4901),n.e(1685),n.e(5015)]).then(n.bind(n,85555)))),X=(0,i.lazy)((()=>Promise.all([n.e(7718),n.e(7020),n.e(8537),n.e(4631),n.e(2294),n.e(9085),n.e(2911),n.e(4901),n.e(5745),n.e(442),n.e(5526),n.e(9725),n.e(7638),n.e(1685),n.e(7657),n.e(3135),n.e(406),n.e(1846),n.e(318)]).then(n.bind(n,20318)))),J=(0,i.lazy)((()=>Promise.all([n.e(7718),n.e(9327),n.e(8219)]).then(n.bind(n,92379)))),Q=(0,i.lazy)((()=>Promise.all([n.e(7718),n.e(7020),n.e(8537),n.e(4631),n.e(2294),n.e(6547),n.e(9085),n.e(5760),n.e(7534)]).then(n.bind(n,87534)))),q=(0,i.lazy)((()=>Promise.all([n.e(7718),n.e(7020),n.e(4901),n.e(4232),n.e(2611)]).then(n.bind(n,42611)))),H=(0,i.lazy)((()=>Promise.all([n.e(7718),n.e(7020),n.e(8537),n.e(4631),n.e(2294),n.e(6547),n.e(9085),n.e(5760),n.e(406),n.e(1846),n.e(9552)]).then(n.bind(n,39552)))),ee=e=>{let{children:t}=e;return t};function te(){var e;const t=(0,l.useNavigate)(),{tab:n="overview"}=(0,l.useParams)(),{did:a,blocklet:o,error:w,client:P,actions:{setBlocklet:j,refreshBlocklet:S}}=(0,O.y0)(),{refresh:B}=(0,T.h6)(),{t:Z}=(0,c.PE)(),E=(0,i.useCallback)((()=>(0,C.jsx)(V,{scope:a})),[a]),L=(null===o||void 0===o||null===(e=o.environments.find((e=>"BLOCKLET_APP_URL"===e.key)))||void 0===e?void 0:e.value)||window.location.origin,D=e=>(0,K.bV)(e,L),N=e=>{t("/blocklets/".concat(a,"/").concat(e))},te=e=>{e&&j(e),S()},ne=!o||(0,K.wS)(o.status)?[]:(0,g.getAppMissingConfigs)(o);let ie=null;const oe=[{label:Z("common.overview"),value:"overview"},{breadcrumbsLabel:Z("common.components"),label:(0,C.jsx)(p.Z,{color:"error",variant:"dot",invisible:!ne.length,children:Z("common.components")}),value:"components"}];if(w)ie=(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(v.Z,{type:"error",variant:"icon",children:(0,K.Z)(w)}),(0,C.jsx)(h.Z,{onClick:()=>S(),children:(0,C.jsx)("span",{style:{textDecoration:"underline"},children:Z("common.retry")})})]});else if(o){var le;const e={overview:(0,C.jsx)(R,{}),configuration:F,navigation:M,services:W,members:(0,C.jsx)($,{type:"blocklet",createPassportSvg:D}),passports:Y,components:X,"audit-logs":E,logs:J,runtime:(0,C.jsx)(Q,{}),traffic:(0,C.jsx)(q,{client:P,did:a}),storage:(0,C.jsx)(H,{})};"configuration"===n&&(0,K.wS)(o.status)&&N("overview"),(0,K.wS)(o.status)||(oe.push({label:Z("common.members"),value:"members"}),oe.push({label:Z("common.passport"),value:"passports"}),oe.push({label:Z("common.configuration"),value:"configuration"})),oe.push({label:Z("common.auditLogs"),value:"audit-logs"}),o&&null!==(le=o.children)&&void 0!==le&&le.length&&o.structVersion===x.APP_STRUCT_VERSION&&oe.push({label:Z("common.logs"),value:"logs"}),oe.push({label:Z("common.configNavigation"),value:"navigation"}),oe.push({label:Z("common.runtime"),value:"runtime"}),oe.push({label:Z("common.traffic"),value:"traffic"}),oe.push({label:Z("common.storage"),value:"storage"});(0,g.getBlockletServices)(o).length&&oe.splice(2,0,{label:Z("blocklet.services"),value:"services"});const t=e[n]||e.overview;ie=(0,C.jsxs)(f.g,{type:"components",children:[!(0,g.isExternalBlocklet)(o)&&(0,C.jsx)(m.Z,{tabs:oe,current:n,onChange:N,scrollButtons:"auto"}),(0,C.jsx)("div",{className:"page-content",children:(0,C.jsx)(i.Suspense,{fallback:(0,C.jsx)(A.Z,{relative:"parent",children:(0,C.jsx)(G.Z,{})}),children:(0,i.isValidElement)(t)?t:(0,C.jsx)(t,{blocklet:o,onUpdate:te,createPassportSvg:D})})})]})}else ie=(0,C.jsx)(A.Z,{relative:"parent",children:(0,C.jsx)(G.Z,{})});const se=oe.find((e=>e.value===n)),ce=o?I.G6:ee;return(0,C.jsx)(ce,{teamDid:a,children:(0,C.jsxs)(ae,{children:[(0,C.jsxs)(d.Z,{separator:"\u203a","aria-label":"breadcrumb",className:"page-breadcrumb",children:[(0,C.jsx)(s.Link,{color:"textSecondary",to:"/blocklets",children:Z("common.blocklets")}),(0,C.jsx)(s.NavLink,{to:"/blocklets/".concat(a,"/overview"),style:e=>e?{color:"inherit"}:{},children:Z("common.detail")}),(0,C.jsx)(r.Z,{color:"textSecondary",children:se?se.breadcrumbsLabel||se.label:""})]}),(0,C.jsxs)(r.Z,{component:"div",className:"page-header",children:[(0,C.jsxs)(r.Z,{component:"h2",variant:"h4",className:"page-title",color:"textPrimary",children:[o?(0,C.jsx)(k.Z,{blocklet:o,style:{marginRight:16}}):null,o?(0,C.jsxs)(u.Z,{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,children:[(0,C.jsx)(u.Z,{children:(0,g.getDisplayName)(o)}),"unknown"!==(null===o||void 0===o?void 0:o.status)&&(0,C.jsx)(b.Z,{size:"12px",status:o.status,source:o.source,progress:o.progress})]}):"".concat(Z("common.blocklet")," ").concat(Z("common.detail"))]}),(0,C.jsx)(z.Z,{permission:"mutate_blocklets",children:!!o&&!(0,g.isExternalBlocklet)(o)&&(0,C.jsx)(U.Z,{className:"page-actions",blocklet:o,onStart:()=>{},onComplete:e=>{let{action:n,error:a}=e;a?y.Z.error(a.message):"remove"===n?(B(),t("/blocklets")):S()},variant:"group"})})]}),(0,C.jsx)(_,{}),ie]})})}function ne(){const{did:e}=(0,l.useParams)();return e?(0,C.jsx)(O.$8,{did:e,children:(0,C.jsx)(N.wV,{children:(0,C.jsx)(te,{})})}):null}const ae=o.Z.main(D||(D=(0,a.Z)(["\n .page-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex-wrap: wrap;\n gap: 16px;\n }\n\n .page-title {\n display: flex;\n align-items: center;\n\n .page-link {\n font-size: 15px;\n margin-top: 8px;\n margin-left: 8px;\n }\n }\n\n .page-content {\n margin-top: 16px;\n }\n\n @media (max-width: ","px) {\n .page-header {\n flex-direction: column;\n align-items: flex-start;\n .page-actions,\n .MuiButtonGroup-root {\n width: 100%;\n }\n .MuiButtonGroup-root {\n .MuiButtonBase-root {\n flex: 1;\n }\n .blocklet-action-text {\n display: none;\n }\n }\n }\n\n .page-title {\n margin-bottom: 15px;\n }\n }\n"])),(e=>e.theme.breakpoints.values.md))},85531:(e,t,n)=>{n.d(t,{wV:()=>w,XN:()=>P});var a=n(5057),i=n(55898),o=n.n(i),l=n(86229),s=n(68420),c=n(77277),r=n(29054),d=n(84584),u=n(41899),p=n(58238),m=n(65873);var v=n(14491);function h(){var e;let{setLoading:t,refresh:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{blocklet:i,actions:{refreshBlocklet:o}}=(0,r.y0)(),s=null===i||void 0===i||null===(e=i.meta)||void 0===e?void 0:e.did,[c,h]=(0,a.useState)([]),{api:g}=(0,p.h6)();return(0,u.Z)((async()=>{try{if(!s)return void h([]);null===t||void 0===t||t(!0);const{spaceGateways:e}=await g.getBlockletSpaceGateways({input:{did:s}}),n=await async function(e){let{blockletDid:t,nodeApi:n,spaceGateways:a}=e,i=!1;const o=await Promise.all(a.map((async e=>{let{name:t}=e;const n=await(0,d.nU)(e.endpoint);return(0,m.isEmpty)(n)||n===t||(t=n,i=!0),{...e,name:t}})));return i&&await Promise.all(o.filter((e=>e.did)).map((e=>n.updateBlockletSpaceGateway({input:{did:t,where:{did:e.did},spaceGateway:{...e}}})))),o}({blockletDid:s,nodeApi:g,spaceGateways:e});h(null!==n&&void 0!==n?n:[])}catch(e){console.error(e),l.Z.error((0,v.Z)(e))}finally{null===t||void 0===t||t(!1)}}),[s,o,n]),{spaceGateways:c}}function g(){var e;let{deps:t,setLoading:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{deps:[],setLoading:()=>{}};const{blocklet:i}=(0,r.y0)(),[o,s]=(0,a.useState)([]),{api:c}=(0,p.h6)(),d=(0,m.debounce)((async()=>{try{if(n(!0),!i)return void s([]);const{backups:e}=await c.getBlockletBackups({input:{did:i.meta.did}});s(null!==e&&void 0!==e?e:[])}catch(e){console.error(e),l.Z.error((0,v.Z)(e))}finally{n(!1)}}),2e3);return(0,u.Z)((async()=>{d()}),[null===i||void 0===i||null===(e=i.meta)||void 0===e?void 0:e.did].concat(t)),{backups:o}}const b=function(e){let{appDid:t}=e;const{backups:n}=g(),[i,o]=(0,a.useState)({message:"",progress:0,completed:!1}),l=(0,p.h6)(),{ws:{useSubscription:s}}=l;return s(c.BlockletEvents.backupProgress,(e=>{t===(null===e||void 0===e?void 0:e.appDid)&&o((()=>({...e})))}),[t]),(0,a.useEffect)((()=>{var e;if(null!==n&&void 0!==n&&n.length&&(0,m.isNull)(null===(e=n[0])||void 0===e?void 0:e.status)){const[e]=n;o((()=>({message:e.message,progress:e.progress,completed:Boolean(e.progress>=100)})))}}),[n]),i};var f=n(96266);const y=(0,a.createContext)({}),{Provider:k,Consumer:x}=y;function w(e){let{children:t}=e;const{t:n}=(0,s.PE)(),{api:i}=(0,p.h6)(),{blocklet:o}=(0,r.y0)(),[m,v]=(0,a.useState)(!1),[y,x]=(0,a.useState)(!1),{spaceGateways:w}=h({refresh:y,setLoading:v}),P=b({appDid:null===o||void 0===o?void 0:o.appDid}),[j,S]=(0,a.useState)(!1),B=(0,a.useMemo)((()=>(0,d.mo)(null===o||void 0===o?void 0:o.environments)),[o,y,j]),[Z,C]=(0,a.useState)(!1),{backups:E}=g({deps:[P],setLoading:C}),[L,_]=(0,a.useState)(null===w||void 0===w?void 0:w.find((e=>e.endpoint===B))),[D,A]=(0,a.useState)(!1),N=function(){var e;let{deps:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{deps:[]};const{blocklet:n}=(0,r.y0)(),{api:i}=(0,p.h6)(),[o,l]=(0,a.useState)(null);return(0,u.Z)((async()=>{var e;if(null!==n&&void 0!==n&&null!==(e=n.meta)&&void 0!==e&&e.did){const{autoBackup:e}=await i.getAutoBackup({input:{did:n.meta.did}});l(e)}}),[null===n||void 0===n||null===(e=n.meta)||void 0===e?void 0:e.did].concat(t)),o}({deps:[D]}),[G,U]=(0,a.useState)(!1),T=function(){var e;let{deps:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{deps:[]};const{blocklet:n}=(0,r.y0)(),{api:i}=(0,p.h6)(),[o,l]=(0,a.useState)(null);return(0,u.Z)((async()=>{var e;if(null!==n&&void 0!==n&&null!==(e=n.meta)&&void 0!==e&&e.did){const{autoCheckUpdate:e}=await i.getAutoCheckUpdate({input:{did:n.meta.did}});l(e)}}),[null===n||void 0===n||null===(e=n.meta)||void 0===e?void 0:e.did].concat(t)),o}({deps:[G]}),I=()=>{x((e=>!e))};return(0,f.jsx)(k,{value:{spaceGateways:w,selectedSpaceGateway:L,addSpaceGateway:async(e,t)=>{w.push({...e,loading:!0}),await i.addBlockletSpaceGateway({input:{did:o.meta.did,spaceGateway:e}}),B!==t&&await i.configBlocklet({input:{did:[o.meta.did],configs:[{key:c.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:t}]}}),I(),_(e)},deleteSpaceGateway:async e=>{e&&(e.endpoint!==B?(await i.deleteBlockletSpaceGateway({input:{did:o.meta.did,spaceGatewayDid:null===e||void 0===e?void 0:e.did}}),I(),_(e)):l.Z.warning(n("storage.spaces.gateway.delete.failedForConnected")))},updateSpaceGateway:async e=>{var t;await i.updateBlockletSpaceGateway({input:{did:o.meta.did,where:{did:e.did},spaceGateway:e}}),B!==e.endpoint&&await i.configBlocklet({input:{did:[o.meta.did],configs:[{key:c.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:e.endpoint}]}}),l.Z.success(n("storage.spaces.connectedWithName",{name:null!==(t=null===e||void 0===e?void 0:e.name)&&void 0!==t?t:"DID Spaces"})),I()},refreshSpaceGateways:I,spaceGatewaysLoading:m,spaceGatewayIsSelected:e=>(null===e||void 0===e?void 0:e.endpoint)===B,updateAutoBackup:async e=>{await i.updateAutoBackup({input:{did:o.meta.did,autoBackup:e}}),A((e=>!e))},updateAutoCheckUpdate:async e=>{await i.updateAutoCheckUpdate({input:{did:o.meta.did,autoCheckUpdate:e}}),U((e=>!e))},autoCheckUpdate:T,backupEndpoint:B,backupProgress:P,backups:E,backupsLoading:Z,refreshBackupEndpoint:()=>{S((e=>!e))},autoBackup:N},children:t})}function P(){return(0,a.useContext)(y)}w.propTypes={children:o().any.isRequired},w.defaultProps={}},60344:(e,t,n)=>{n.d(t,{hi:()=>o,od:()=>i.a});var a=n(10458),i=n.n(a);i().defaults.timeout=1e4;const o=i().create()},84584:(e,t,n)=>{n.d(t,{EJ:()=>f,Jf:()=>b,LQ:()=>u,Nb:()=>p,UV:()=>y,Xv:()=>r,Z3:()=>k,ag:()=>v,mo:()=>m,nD:()=>d,nU:()=>g,w2:()=>h});var a=n(82434),i=n.n(a),o=n(77277),l=n(65873),s=n(2842),c=n(60344);function r(e){const t=e.replace(/\/api\/space\/.+/,""),n=e.replace(/\/$/,"").split("/"),a=n.at(-4),i=n.at(-2);return(0,s.xn)(t,"space",a,"apps",i,"explorer?key=/apps/".concat(i,"/.did-objects/").concat(i,"/"))}function d(e){const t=e.replace(/\/api\/space\/.+/,""),n=e.replace(/\/$/,"").split("/").at(-4);return(0,s.xn)(t,"space",n)}function u(e){return e.replace(/\/$/,"").split("/").at(-4)}async function p(e){try{if(!i()(e))return!1;const{headers:t}=await c.hi.head(e,{timeout:5e3});return"true"===t["x-listable"]&&"true"===t["x-readable"]&&"true"===t["x-writeable"]}catch(t){return console.error(t),!1}}function m(e){var t;return(null===e||void 0===e||null===(t=e.find((e=>e.key===o.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT)))||void 0===t?void 0:t.value)||""}function v(e){const t=new URL(e);return(0,s.xn)(t.origin,t.pathname)}async function h(e){try{if(!i()(e))return!1;const t=v(e),n=(0,s.xn)(t,"space/api/did/one-click-authorization/token"),{status:a,data:o}=await c.hi.get(n,{timeout:5e3});return 200===a&&(0,l.isObject)(o)}catch(t){return console.error(t),!1}}async function g(e){let{timeout:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{timeout:3e3};try{if(!i()(e))return"";const{headers:n}=await c.hi.head(e,{timeout:t}),a=n["x-space-name"];return a?decodeURIComponent(a):""}catch(n){return console.error(n),""}}function b(e){const t=e.replace(/\/api\/space\/.+/,""),n=e.replace(/\/$/,"").split("/").at(-4);return(0,s.xn)(t,"/api/space/nft/display?spaceDid=".concat(n))}const f=e=>{var t,n;return(null===e||void 0===e||null===(t=e.configs)||void 0===t||null===(n=t.find((e=>e.key===o.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT)))||void 0===n?void 0:n.value)||null};async function y(e){const t={};return t.did=u(e),t.name=await g(e),t.url=function(e){return null===e||void 0===e?void 0:e.replace(/\/api\/space\/.+/,"")}(e),t.endpoint=e,t}async function k(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{timeout:3e4,withSearchParams:!0};if(!(0,l.isString)(e))throw new Error("url(".concat(e,") must be a string"));const a=e.startsWith("http")?e:"https://".concat(e),i=new URL(a),{data:o}=await c.hi.get((0,s.xn)(i.origin,"/__blocklet__.js?type=json"),{timeout:n.timeout}),r=null===(t=o.componentMountPoints.findLast((e=>"z8iZnaYxnkMD5AKRjTKiCb8pQr1ut8UantAcf"===e.did)))||void 0===t?void 0:t.mountPoint;if(!r)throw new Error("MountPoint(".concat(r,") not found"));const d=(0,s.xn)(i.origin,r);return n.withSearchParams&&i.searchParams.get("spaceDid")?(0,s.xn)(d,"?spaceDid=".concat(i.searchParams.get("spaceDid"))):d}}}]);
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 6706.134ef362.chunk.js.LICENSE.txt */
|
|
2
|
-
(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[6706],{87806:(e,i,t)=>{"use strict";i.Z=void 0;(n=t(5057))&&n.__esModule;var n,o=t(96266);function r(e,i){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);i&&(n=n.filter((function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable}))),t.push.apply(t,n)}return t}function s(e){for(var i=1;i<arguments.length;i++){var t=null!=arguments[i]?arguments[i]:{};i%2?r(Object(t),!0).forEach((function(i){a(e,i,t[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):r(Object(t)).forEach((function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))}))}return e}function a(e,i,t){return(i=function(e){var i=function(e,i){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,i||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===i?String:Number)(e)}(e,"string");return"symbol"==typeof i?i:String(i)}(i))in e?Object.defineProperty(e,i,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[i]=t,e}var l=function(e){return(0,o.jsx)("svg",s(s({},e),{},{children:(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.25 10a6.75 6.75 0 1 1 13.5 0 6.75 6.75 0 0 1-13.5 0zM10 1.75a8.25 8.25 0 1 0 0 16.5 8.25 8.25 0 0 0 0-16.5zM8.03 6.97a.75.75 0 0 0-1.06 1.06l5 5a.75.75 0 1 0 1.06-1.06l-5-5z"})}))};l.defaultProps={width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},l.displayName="revoke";i.Z=l},12049:(e,i,t)=>{"use strict";t.d(i,{qY:()=>_,YZ:()=>be});t(1192),t(2484),t(5873),t(79787);var n=t(96266),o=t(47220),r=t(76223),s=t(68420),a=t(11337),l=t(43907),c=t(55498),d=t(13727),u=t(72113),p=t(7469),m=t(25228),f=t(39948),b=t(67680),w=t(99360),h=t(55898),g=t.n(h),v=t(5057),x=t(56556);function y(e){let{optionalComponent:i,index:t,installStatus:o,hasPermission:s,t:a}=e;const l="stopped"===o||"running"===o;return(0,n.jsxs)(f.Z,{children:[0===t?null:(0,n.jsx)(f.Z,{sx:{width:"100%",height:"1px",backgroundColor:r.E.gray6}}),(0,n.jsxs)(f.Z,{sx:{padding:"20px 24px",paddingTop:.5,marginTop:2,display:"flex",flexDirection:"row",justifyContent:"start",alignItems:"flex-start"},children:[(0,n.jsx)("img",{style:{width:60,height:60,minWidth:60,minHeight:60},src:i.logoUrl,alt:i.meta.title}),(0,n.jsxs)(f.Z,{sx:{display:"flex",flexDirection:"column",justifyContent:"start",alignItems:"start",marginLeft:2},children:[(0,n.jsxs)(f.Z,{sx:{fontSize:"16px",fontWeight:"bold",cursor:"pointer",".link-icon":{opacity:0},":hover .link-icon":{opacity:1}},onClick:()=>{var e;return null===(e=i.meta)||void 0===e||e.did,void window.open(null===i||void 0===i?void 0:i.storeUrl,"_blank")},children:[i.meta.title,(0,n.jsxs)(f.Z,{sx:{paddingLeft:1,fontSize:"13px",fontWeight:"400"},component:"span",children:[i.meta.version,(0,n.jsx)(c.JO,{className:"link-icon",icon:"fluent:open-20-filled",style:{color:r.E.primaryBase,fontSize:16,transform:"translate(6px, 3px)",transition:"all 0.3s"}})]})]}),(0,n.jsx)(f.Z,{sx:{marginTop:0,opacity:.7},children:i.meta.description}),(0,n.jsx)(f.Z,{sx:{display:s?"flex":"none",flexDirection:"row",gap:1},children:o?(0,n.jsx)(f.Z,{sx:{marginTop:2,opacity:.7},children:l?(0,n.jsx)(x.Z,{variant:"contained",onClick:()=>{window.location.reload()},children:a("componentInstallerRefresh")},"refresh"):(0,n.jsx)(x.Z,{disabled:!0,sx:{color:"#333"},startIcon:(0,n.jsx)(c.JO,{icon:"line-md:loading-loop",style:{color:"#333",fontSize:16}}),variant:"contained",children:o},"status")}):(0,n.jsx)(x.Z,{sx:{marginTop:2},variant:"contained",className:"button",onClick:()=>{var e;return null===(e=i.meta)||void 0===e||e.did,void window.open(null===i||void 0===i?void 0:i.installUrl,"_blank")},children:a("componentInstallerInstall")},"install")}),l?(0,n.jsx)(f.Z,{sx:{marginTop:2,opacity:.7},children:a("componentInstallerSuccessInstalled")}):null]})]})]})}y.propTypes={t:g().func.isRequired,optionalComponent:g().object.isRequired,index:g().number.isRequired,installStatus:g().string,hasPermission:g().bool.isRequired},y.defaultProps={installStatus:""};const k={zh:{componentInstallerTitle:"\u7f3a\u5c11\u7ec4\u4ef6",componentInstallerInstall:"\u5b89\u88c5",componentInstallerClose:"\u5173\u95ed",componentInstallerRefresh:"\u91cd\u8f7d\u9875\u9762",componentInstallerSuccessInstalled:"\u5b89\u88c5\u6210\u529f\uff0c\u8bf7\u91cd\u8f7d\u9875\u9762\u67e5\u770b\u53d8\u5316\u3002",componentInstallerSuggestions:"\u8bf7\u8054\u7cfb\u7cfb\u7edf\u7ba1\u7406\u5458\u5b89\u88c5\u8be5\u7ec4\u4ef6\u3002",componentInstallerNoDefinedInBlockletYML:"\u7ec4\u4ef6\u672a\u5728 blocklet.yml \u4e2d\u5b9a\u4e49"},en:{componentInstallerTitle:"Missing component",componentInstallerInstall:"Install",componentInstallerClose:"Close",componentInstallerRefresh:"Refresh",componentInstallerSuccessInstalled:"Successfully installed, please refresh the page to see the changes.",componentInstallerSuggestions:"Please contact the system administrator to install the component.",componentInstallerNoDefinedInBlockletYML:"The component is not defined in blocklet.yml"}};var j=t(74958),S=t(6352),I=t.n(S);const O=e=>"string"===typeof e?new Set(e.split(";;")):new Set(e);const C=function(e){let{did:i,onInstalled:t,onError:n}=e;const o=Array.isArray(i)?i.join(";;"):i,[r,s]=(0,v.useState)({}),a=(0,v.useRef)({onInstalled:t,onError:n});a.current={onInstalled:t,onError:n};const{optionalComponents:l,componentMountPoints:c}=window.blocklet,d=(0,v.useMemo)((()=>{var e;if(!l||!l.length)return[];const i=O(o),t=l.filter((e=>i.has(e.meta.did)));return null===(e=t?a.current.onError:a.current.onInstalled)||void 0===e||e(t),t}),[o,l]),u=(0,v.useMemo)((()=>{if(d.length)return!0;const e=O(o);return(c||[]).find((i=>e.has(i.did)))}),[d,c,o]);return d.forEach((e=>{e.storeUrl=I()(e.meta.homepage,"blocklets",e.meta.did),e.installUrl=I()(window.blocklet.appUrl,j.Bu,"/admin/components?install-component=".concat(e.meta.did))})),(0,v.useEffect)((()=>{const e=e=>{var i,t,n;if(e.origin===window.blocklet.appUrl&&"component-installer"===(null===(i=e.data)||void 0===i?void 0:i.kind)&&null!==(t=e.data)&&void 0!==t&&null!==(n=t.blocklet)&&void 0!==n&&n.children){var r,a;let i=!1;const t=O(o);null===(r=e.data)||void 0===r||null===(a=r.blocklet)||void 0===a||a.children.forEach((e=>{var n;t.has(null===(n=e.meta)||void 0===n?void 0:n.did)&&(i=!0,s((i=>{var t;return{...i,[null===(t=e.meta)||void 0===t?void 0:t.did]:e.status||"waiting"}})))})),i||s({})}};return window.addEventListener("message",e),()=>{window.removeEventListener("message",e)}}),[o]),{optComponents:d,installed:!d.length&&u,installStatus:r,setInstallStatus:s,definedInBlockletYML:u}};function T(e){let{warnIcon:i,did:t,noPermissionMute:h,onInstalled:g,onError:x,children:j,closeByOutSize:S,onClose:I,fallback:O,disabled:T,roles:_=["owner","admin"]}=e;const{locale:Z}=(0,s.PE)(),E=(0,w.Z)((function(e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,a.I)(k,e,Z,"en",i)})),{installed:N,optComponents:R,installStatus:P,definedInBlockletYML:A}=C({did:t,onInstalled:g,onError:x}),z=(0,v.useContext)(o.B3),B=()=>{null===I||void 0===I||I(!1)};return T?j:(0,n.jsx)(l.Z,{session:null===z||void 0===z?void 0:z.session,roles:_,children:e=>{let{hasPermission:o}=e;return N?j:h&&!o?O||null:"function"===typeof j?(0,n.jsxs)(n.Fragment,{children:[O,j({hasPermission:o,optComponents:R,installStatus:P})]}):(0,n.jsxs)(n.Fragment,{children:[O,(0,n.jsx)(u.d,{onClickAway:e=>{e.preventDefault(),e.stopPropagation(),S&&B()},children:(0,n.jsx)(p.Z,{in:!0,timeout:350,children:(0,n.jsx)(m.Z,{variant:"outlined",sx:{position:"fixed",top:20,right:20,zIndex:3e3,borderRadius:3,width:400,maxWidth:"90vw",borderColor:r.E.lineStep,border:"0 !important",fontSize:"14px",textAlign:"left",boxShadow:"0px 8px 16px 0px ".concat(r.E.gray6,", 0px 0px 0px 1px ").concat(r.E.gray6)},children:A?(0,n.jsxs)(f.Z,{sx:{display:"flex",flexDirection:"column"},children:[(0,n.jsxs)(f.Z,{sx:{padding:"20px 24px",marginLeft:0,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start"},children:[i||(0,n.jsx)(c.JO,{icon:"mdi:warning-box",style:{color:"yellowgreen",fontSize:24}}),(0,n.jsx)(f.Z,{sx:{marginLeft:1,fontSize:"16px",fontWeight:"bold"},children:E("componentInstallerTitle")}),(0,n.jsx)(f.Z,{sx:{flex:1}}),I?(0,n.jsx)(b.Z,{variant:"outlined",className:"button",onClick:B,children:(0,n.jsx)(d.default,{})}):null]}),(0,n.jsx)(f.Z,{sx:{width:"100%",height:"1px",backgroundColor:r.E.gray6}}),(0,n.jsx)(f.Z,{sx:{maxHeight:"70vh",overflowY:"auto"},children:R.map(((e,i)=>{var t,r;return(0,n.jsx)(y,{t:E,hasPermission:o,index:i,optionalComponent:e,installStatus:P[null===(t=e.meta)||void 0===t?void 0:t.did]},(null===(r=e.meta)||void 0===r?void 0:r.did)||i)}))}),o?null:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(f.Z,{sx:{width:"100%",height:"1px",backgroundColor:r.E.gray6}}),(0,n.jsx)(f.Z,{sx:{padding:"20px 24px"},children:(0,n.jsx)(f.Z,{sx:{opacity:1},children:E("componentInstallerSuggestions")})})]})]}):(0,n.jsxs)(f.Z,{sx:{display:"flex",flexDirection:"column"},children:[(0,n.jsxs)(f.Z,{sx:{padding:"20px 24px",marginLeft:0,display:"flex",alignItems:"center",flexDirection:"row",justifyContent:"flex-start"},children:[i||(0,n.jsx)(c.JO,{icon:"mdi:warning-box",style:{color:"yellowgreen",fontSize:24}}),(0,n.jsx)(f.Z,{sx:{marginLeft:1,fontSize:"16px",fontWeight:"bold"},children:E("componentInstallerTitle")}),(0,n.jsx)(f.Z,{sx:{flex:1}}),I?(0,n.jsx)(b.Z,{variant:"outlined",className:"button",onClick:B,children:(0,n.jsx)(d.default,{})}):null]}),(0,n.jsx)(f.Z,{sx:{width:"100%",height:"1px",backgroundColor:r.E.gray6}}),(0,n.jsxs)(f.Z,{sx:{padding:"20px 24px",marginTop:0},children:[E("componentInstallerNoDefinedInBlockletYML"),": ",t]})]})})})})]})}})}function _(e){return window.blocklet?(0,n.jsx)(T,{...e}):e.children}T.propTypes={disabled:g().bool,warnIcon:g().node,did:g().oneOfType([g().string,g().arrayOf(g().string)]).isRequired,noPermissionMute:g().bool,onInstalled:g().func,onError:g().func,children:g().any.isRequired,closeByOutSize:g().bool,onClose:g().func,fallback:g().node,roles:g().array},T.defaultProps={disabled:!1,warnIcon:null,noPermissionMute:!1,onInstalled:null,onError:null,closeByOutSize:!1,onClose:null,fallback:null,roles:["owner","admin"]},_.propTypes={...T.propTypes,children:g().any.isRequired},_.defaultProps={...T.defaultProps};t(28018),t(94464),t(25710),t(28726);var Z=t(13128);t(71569),t(25842);t(23939);var E=t(49384);t(60251);var N=t(95712);t(47685),t(72966),t(92706);t(94457);var R=t(26538),P=t.n(R),A=t(87806);function z(e){let{passport:i,user:t,color:o,width:r,icon:a,children:l,createPassportSvg:c,...d}=e;const{t:u}=(0,s.PE)();return(0,n.jsxs)(f.Z,{...d,sx:{display:"flex",alignItems:"center",...null===d||void 0===d?void 0:d.sx},children:[(0,n.jsx)(f.Z,{className:"passport-item__display",dangerouslySetInnerHTML:{__html:c({title:i.title||i.name,issuer:i.issuer&&i.issuer.name,issuerDid:i.issuer&&i.issuer.id,ownerName:t.fullName,ownerDid:t.did,ownerAvatarUrl:t.avatar,revoked:i.revoked,preferredColor:o,width:r})}}),(0,n.jsxs)(f.Z,{className:"passport-item__body",sx:{p:0,ml:3,mt:0},children:[(0,n.jsxs)(f.Z,{className:"passport-item__title",sx:{display:"flex",alignItems:"center",fontWeight:400,fontSize:"16px",lineHeight:1.1875,color:"#222222"},children:[P()(i.title),(0,n.jsxs)(f.Z,{className:"passport-item__status-icon",sx:{svg:{fill:"#bfbfbf",height:"1.2em",marginLeft:"0.4em"}},children:[a,i.revoked&&(0,n.jsx)(A.Z,{})]})]}),i.expirationDate&&(0,n.jsx)(f.Z,{className:"passport-item__title",sx:{display:"flex",alignItems:"center",fontWeight:400,fontSize:"16px",lineHeight:1.1875,color:"#222222"},children:u("team.passport.validUntil",{date:i.expirationDate})}),l]})]})}z.propTypes={passport:g().any.isRequired,user:g().any.isRequired,color:g().string.isRequired,createPassportSvg:g().func.isRequired,icon:g().any,children:g().any,width:g().number},z.defaultProps={icon:null,children:null,width:150};t(35432),t(30278),t(76818);const B=(0,v.createContext)({}),{Provider:L,Consumer:M}=B;t(82790),t(86229),t(82434),t(14506),t(16967);const D=new(t(99132).x);var U=t(71171),q=(t(35966),t(33518)),W=(t(22425),t(75506),t(10458)),F=t.n(W);F().defaults.timeout=1e4;F().create();t.p;t(22256);t.p;var H;(0,q.Z)(f.Z)(H||(H=(0,U.Z)(["\n .selected-container {\n position: absolute;\n right: 0px;\n bottom: 0px;\n display: flex;\n -webkit-box-pack: end;\n justify-content: flex-end;\n align-items: flex-end;\n width: 32px;\n height: 32px;\n border-radius: 0px 0px 8px;\n color: rgb(255, 255, 255);\n overflow: hidden;\n transition: all 0.4s ease 0s;\n\n &::after {\n position: absolute;\n z-index: 0;\n left: 60px;\n top: 60px;\n display: block;\n width: 0px;\n height: 0px;\n border-width: 16px;\n border-style: solid;\n border-color: transparent #1dc1c7 #1dc1c7 transparent;\n transition: all 0.1s ease 0s;\n content: '';\n }\n\n .selected-icon {\n visibility: hidden;\n width: 60%;\n height: 60%;\n position: relative;\n z-index: 2;\n margin: 0px 1px 1px 0px;\n font-size: 16px;\n transition: all 0.2s ease 0s;\n }\n }\n\n .selected-container.selected {\n &::after {\n left: 0px;\n top: 0px;\n }\n\n .selected-icon {\n visibility: visible;\n }\n }\n"])));var V;(0,q.Z)(f.Z)(V||(V=(0,U.Z)(["\n height: 100%;\n overflow-y: auto;\n"])));var Y=t(75760),G=t(79366),J=t(93066),$=t(62219),X=t.n($),K=t(35833),Q=t.n(K),ee=t(14520);class ie extends Error{constructor(e){super(),this.name="AbortError",this.message=e}}const te=e=>void 0===globalThis.DOMException?new ie(e):new DOMException(e),ne=e=>{const i=void 0===e.reason?te("This operation was aborted."):e.reason;return i instanceof Error?i:te(i)};const oe=Symbol("skip");async function re(e,i){return async function(e,i){let{concurrency:t=Number.POSITIVE_INFINITY,stopOnError:n=!0,signal:o}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new Promise(((r,s)=>{if(void 0===e[Symbol.iterator]&&void 0===e[Symbol.asyncIterator])throw new TypeError("Expected `input` to be either an `Iterable` or `AsyncIterable`, got (".concat(typeof e,")"));if("function"!==typeof i)throw new TypeError("Mapper function is required");if(!Number.isSafeInteger(t)&&t!==Number.POSITIVE_INFINITY||!(t>=1))throw new TypeError("Expected `concurrency` to be an integer from 1 and up or `Infinity`, got `".concat(t,"` (").concat(typeof t,")"));const a=[],l=[],c=new Map;let d=!1,u=!1,p=!1,m=0,f=0;const b=void 0===e[Symbol.iterator]?e[Symbol.asyncIterator]():e[Symbol.iterator](),w=e=>{d=!0,u=!0,s(e)};o&&(o.aborted&&w(ne(o)),o.addEventListener("abort",(()=>{w(ne(o))})));const h=async()=>{if(u)return;const e=await b.next(),t=f;if(f++,e.done){if(p=!0,0===m&&!u){if(!n&&l.length>0)return void w(new AggregateError(l));if(u=!0,0===c.size)return void r(a);const e=[];for(const[i,t]of a.entries())c.get(i)!==oe&&e.push(t);r(e)}}else m++,(async()=>{try{const n=await e.value;if(u)return;const o=await i(n,t);o===oe&&c.set(t,o),a[t]=o,m--,await h()}catch(o){if(n)w(o);else{l.push(o),m--;try{await h()}catch(o){w(o)}}}})()};(async()=>{for(let i=0;i<t;i++){try{await h()}catch(e){w(e);break}if(p||d)break}})()}))}(e,(e=>e()),i)}var se=t(75239),ae=t(11750),le=t(19654);function ce(e){let{user:i,sessionUser:t}=e;const o=(0,J.Z)((()=>{var e;return null===(e=(null===i||void 0===i?void 0:i.passports)||[])||void 0===e?void 0:e.find((e=>e.name===t.role))}),[null===i||void 0===i?void 0:i.passports,null===t||void 0===t?void 0:t.role]);return(0,n.jsxs)(f.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,n.jsx)(N.Z,{size:40,variant:"circle",shape:"circle",src:t.avatar,did:t.did}),(0,n.jsxs)(f.Z,{children:[(0,n.jsxs)(f.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,n.jsx)(ae.Z,{sx:{whiteSpace:"normal",wordBreak:"break-all"},children:t.fullName}),(0,n.jsx)(le.Z,{label:(null===o||void 0===o?void 0:o.title)||(null===o||void 0===o?void 0:o.name)||"Guest",size:"small",variant:"outlined",sx:{flexShrink:0,fontWeight:"bold",fontSize:"12px",color:r.E.textBase,borderColor:r.E.strokeBorderStrong,backgroundColor:"transparent",textTransform:"capitalize",pr:1,pl:.5}})]}),(0,n.jsx)(ae.Z,{variant:"body2",color:"grey",children:t.email})]})]})}const de={zh:{confirm:"\u786e\u8ba4",cancel:"\u53d6\u6d88",visitorId:"\u8bbe\u5907\u6807\u8bc6",deviceType:"\u8bbe\u5907\u7c7b\u578b",platform:"\u64cd\u4f5c\u7cfb\u7edf",walletOS:"\u94b1\u5305\u7c7b\u578b",role:"\u89d2\u8272",fullname:"\u59d3\u540d",email:"\u90ae\u7bb1",avatar:"\u5934\u50cf",user:"\u7528\u6237",updatedAt:"\u6700\u8fd1\u6d3b\u52a8\u65f6\u95f4",lastLoginIp:"\u6700\u8fd1\u6d3b\u52a8\u5730\u5740",actions:"\u64cd\u4f5c",logoutAll:"\u6ce8\u9500\u6240\u6709\u4f1a\u8bdd",logoutAllTips:"\u4e0d\u4f1a\u6ce8\u9500\u5f53\u524d\u4f1a\u8bdd",logout:"\u6ce8\u9500",currentSession:"\u5f53\u524d\u4f1a\u8bdd",unknown:"\u672a\u77e5",logoutThisSession:"\u6ce8\u9500\u6307\u5b9a\u4f1a\u8bdd",logoutThisSessionConfirm:"\u786e\u5b9a\u8981\u6ce8\u9500\u6b64\u4f1a\u8bdd\u5417?",logoutAllSession:"\u6ce8\u9500\u6240\u6709\u4f1a\u8bdd",logoutAllSessionConfirm:"\u786e\u5b9a\u8981\u6ce8\u9500\u6240\u6709\u4f1a\u8bdd\u5417?"},en:{confirm:"Confirm",cancel:"Cancel",visitorId:"Device ID",deviceType:"Device Type",platform:"Platform",walletOS:"Wallet OS",role:"Role",fullname:"Fullname",email:"Email",avatar:"Avatar",user:"User",updatedAt:"Last Active Time",actions:"Actions",lastLoginIp:"Last Login IP",logoutAll:"Logout all",logoutAllTips:"Will not logout current session",logout:"Logout",currentSession:"Current Session",unknown:"Unknown",logoutThisSession:"Logout this session",logoutThisSessionConfirm:"Are you sure to logout this session?",logoutAllSession:"Logout all sessions",logoutAllSessionConfirm:"Are you sure to logout all sessions?"}},ue="Reserved IP",pe="ip-region-cache";async function me(e){let i="",t={};try{const e=localStorage.getItem(pe);e&&(t=JSON.parse(e))}catch{t={}}if(t[e])i=t[e];else{try{i=await async function(e){const i="https://api.ip.sb/geoip/".concat(e),t=await fetch(i),n=await t.json();let o="";return n.error?n.reserved&&(o=ue):o=[n.country,n.region,n.city].filter(Boolean).join("/"),o}(e)}catch{console.warn("Fail to get ip region from ip.sb")}if(!i)try{i=await async function(e){const i="https://ipapi.co/".concat(e,"/json/"),t=await fetch(i),n=await t.json();let o="";return n.error?n.reserved&&(o=ue):o=[n.country_name,n.region,n.city].filter(Boolean).join("/"),o}(e)}catch{console.warn("Fail to get ip region from ip-api.co")}}if(i){const n=Object.keys(t);n.length>100&&delete t[n[0]],t[e]&&delete t[e],t[e]=i,localStorage.setItem(pe,JSON.stringify(t))}return i}const fe=e=>new(Q())(e,{browser:[[/(ArcWallet)\/([\w\.]+)/i],[Q().BROWSER.NAME,Q().BROWSER.VERSION]]}).getResult();function be(e){let{user:i,showAction:t=!0,showUser:o=!0}=e;const r=(0,ee.OP)(),{locale:l}=(0,s.PE)(),{confirmApi:c,confirmHolder:d}=(0,Z.N4)(),u=(0,w.Z)((function(e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,a.I)(de,e,l,"en",i)})),p=(0,w.Z)((async()=>{let e=null===i||void 0===i?void 0:i.userSessions;e||(e=await D.userSession.getUserSessions({did:i.did}));try{var t;const i=null===(t=e)||void 0===t?void 0:t.map(((e,i)=>[i,e.lastLoginIp])).filter((e=>!!e[1])),n=null===i||void 0===i?void 0:i.map((e=>e[1])),o=await async function(e){return Promise.all(e.map((e=>me(e))))}(n);for(let t=0;t<o.length;t++){const n=o[t],r=i[t];e[r[0]].ipRegion=n}}catch(o){console.warn("Failed to convert ip to region"),console.error(o)}const n=(new Date).getTime();return X()(e,(e=>e.visitorId===r?-1:n-new Date(e.updatedAt).getTime()))})),m=(0,G.Z)(p),b=(0,J.Z)((()=>m.data||[]),[m.data]),h=(0,J.Z)((()=>b.reduce(((e,i)=>(e[i.lastLoginIp]=i.ipRegion,e)),{})),[b]),g=(0,w.Z)((e=>{let{visitorId:i}=e;c.open({title:u("logoutThisSession"),content:u("logoutThisSessionConfirm"),confirmButtonText:u("confirm"),cancelButtonText:u("cancel"),onConfirm:async()=>{await D.user.logout({visitorId:i}),m.refresh(),c.close()}})})),v=(0,J.Z)((()=>b.filter((e=>e.visitorId!==r))),[b]),y=(0,w.Z)((()=>{c.open({title:u("logoutAllSession"),content:u("logoutAllSessionConfirm"),confirmButtonText:u("confirm"),cancelButtonText:u("cancel"),onConfirm:async()=>{const e=v.map((e=>()=>D.user.logout({visitorId:e.visitorId})));await re(e,{concurrency:3,stopOnError:!1}),m.refresh(),c.close()}})})),k=[];t&&k.push((0,n.jsx)(se.Z,{title:u("logoutAllTips"),children:(0,n.jsx)(x.Z,{sx:{ml:.5},size:"small",variant:"contained",color:"error",onClick:y,disabled:0===v.length,children:u("logoutAll")})},"logoutAll"));const j=(0,J.Z)((()=>({search:!1,sort:!1,download:!1,filter:!1,print:!1,expandableRowsOnClick:!1,searchDebounceTime:600})),[]),S=[{label:u("platform"),name:"platform",options:{customBodyRenderLite:e=>{var i,t;const o=b[e],r=fe(o.ua);return(0,n.jsx)(f.Z,{children:[null===(i=r.os)||void 0===i?void 0:i.name,null===(t=r.os)||void 0===t?void 0:t.version].filter(Boolean).join("/")||u("unknown")})}}},{label:u("deviceType"),name:"deviceType",options:{customBodyRenderLite:e=>{var i,t;const o=b[e],r=fe(o.ua);return(0,n.jsx)(f.Z,{children:[null===(i=r.browser)||void 0===i?void 0:i.name,null===(t=r.browser)||void 0===t?void 0:t.version].filter(Boolean).join("/")||u("unknown")})}}},{label:u("walletOS"),name:"walletOS",options:{customBodyRenderLite:e=>{var i;const t=b[e];return(0,n.jsx)(f.Z,{children:(null===(i=t.extra)||void 0===i?void 0:i.walletOS)||u("unknown")})}}},o&&{label:u("user"),name:"user",options:{customBodyRenderLite:e=>{const t=b[e];return(0,n.jsx)(ce,{sessionUser:t.user,user:i})}}},{label:u("updatedAt"),name:"updatedAt",options:{customBodyRenderLite:e=>{const i=b[e];return(0,n.jsx)(E.Z,{value:i.updatedAt,relativeRange:2592e5,locale:l})}}},{label:u("lastLoginIp"),name:"lastLoginIp",options:{customBodyRenderLite:e=>{const i=b[e];return(0,n.jsx)(f.Z,{children:h[i.lastLoginIp]?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ae.Z,{variant:"body2",children:h[i.lastLoginIp]}),(0,n.jsx)(ae.Z,{variant:"body2",color:"grey",children:i.lastLoginIp||u("unknown")})]}):(0,n.jsx)(ae.Z,{children:i.lastLoginIp||u("unknown")})})}}},t&&{label:u("actions"),name:"actions",options:{customBodyRenderLite:e=>{const i=b[e];return(0,n.jsx)(f.Z,{children:(0,n.jsx)(x.Z,{sx:{whiteSpace:"nowrap",fontSize:"12px",px:1},disabled:r===i.visitorId,variant:"outlined",size:"small",color:"error",onClick:()=>g({visitorId:i.visitorId}),children:r===i.visitorId?u("currentSession"):u("logout")})})}}}].filter(Boolean);return(0,n.jsxs)(f.Z,{sx:{".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"}},children:[d,(0,n.jsx)(Y.Z,{locale:l,data:b,columns:S,customButtons:k,options:j,loading:m.loading})]})}},30278:(e,i,t)=>{var n=t(31104),o=t(43676);e.exports=function(e,i){return e&&e.length?o(e,n(i,2)):[]}},94166:function(e,i,t){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var i,t=1,n=arguments.length;t<n;t++)for(var o in i=arguments[t])Object.prototype.hasOwnProperty.call(i,o)&&(e[o]=i[o]);return e},n.apply(this,arguments)},o=this&&this.__rest||function(e,i){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&i.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)i.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(t[n[o]]=e[n[o]])}return t};i.__esModule=!0;var r=t(5057),s=t(18294),a=t(49266);i.default=function(e){var i=e.delay,t=void 0===i?0:i,l=e.type,c=void 0===l?"text":l,d=e.color,u=void 0===d?"#CDCDCD":d,p=e.rows,m=void 0===p?3:p,f=e.ready,b=e.firstLaunchOnly,w=e.children,h=e.className,g=e.showLoadingAnimation,v=e.customPlaceholder,x=o(e,["delay","type","color","rows","ready","firstLaunchOnly","children","className","showLoadingAnimation","customPlaceholder"]),y=r.useState(f),k=y[0],j=y[1],S=r.useRef(null);return r.useEffect((function(){b||!k||f?f&&(S.current&&window.clearTimeout(S.current),k||j(!0)):t&&t>0?S.current=window.setTimeout((function(){j(!1)}),t):j(!1)}),[b,k,f,t]),r.useEffect((function(){return function(){S.current&&window.clearTimeout(S.current)}}),[]),k?w:function(){var e=g?a.joinClassNames("show-loading-animation",h):h;if(v&&r.isValidElement(v)){var i=a.joinClassNames(v.props.className,e);return r.cloneElement(v,{className:i})}if(v)return v;var t=s[c];return r.createElement(t,n({},x,{color:u,rows:m,className:e}))}()}},22256:(e,i,t)=>{"use strict";var n=t(94166);i.Z=n.default},98392:function(e,i,t){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var i,t=1,n=arguments.length;t<n;t++)for(var o in i=arguments[t])Object.prototype.hasOwnProperty.call(i,o)&&(e[o]=i[o]);return e},n.apply(this,arguments)};i.__esModule=!0;var o=t(5057),r=t(49354),s=t(12208),a=t(49266),l={display:"flex"};i.default=function(e){var i=e.className,t=e.style,c=e.color,d=e.rows;return o.createElement("div",{className:a.joinClassNames("media-block",i),style:n(n({},l),t)},o.createElement(s.default,{color:c,style:{minHeight:55,width:55,minWidth:55,marginRight:10}}),o.createElement(r.default,{color:c,rows:d}))}},16102:function(e,i,t){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var i,t=1,n=arguments.length;t<n;t++)for(var o in i=arguments[t])Object.prototype.hasOwnProperty.call(i,o)&&(e[o]=i[o]);return e},n.apply(this,arguments)};i.__esModule=!0;var o=t(5057),r=t(49266);i.default=function(e){var i=e.className,t=e.style,s={backgroundColor:e.color,width:"100%",height:"100%",marginRight:10};return o.createElement("div",{className:r.joinClassNames("rect-shape",i),style:n(n({},s),t)})}},12208:function(e,i,t){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var i,t=1,n=arguments.length;t<n;t++)for(var o in i=arguments[t])Object.prototype.hasOwnProperty.call(i,o)&&(e[o]=i[o]);return e},n.apply(this,arguments)};i.__esModule=!0;var o=t(5057),r=t(49266);i.default=function(e){var i=e.className,t=e.style,s={backgroundColor:e.color,borderRadius:"500rem",width:"100%",height:"100%"};return o.createElement("div",{className:r.joinClassNames("round-shape",i),style:n(n({},s),t)})}},49354:function(e,i,t){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var i,t=1,n=arguments.length;t<n;t++)for(var o in i=arguments[t])Object.prototype.hasOwnProperty.call(i,o)&&(e[o]=i[o]);return e},n.apply(this,arguments)};i.__esModule=!0;var o=t(5057),r=t(13672),s=t(49266),a={width:"100%"},l=[97,100,94,90,98,95,98,40];i.default=function(e){var i=e.rows,t=e.lineSpacing,c=e.color,d=e.style,u=e.className,p=e.widths,m=void 0===p?l:p,f=function(e){return{maxHeight:100/(2*i-1)+"%",width:m[(e+m.length)%m.length]+"%"}};return o.createElement("div",{className:s.joinClassNames("text-block",u),style:n(n({},a),d)},Array.apply(null,Array(i)).map((function(e,i){return o.createElement(r.default,{color:c,style:f(i),lineSpacing:0!==i?t:0,key:i})})))}},13672:function(e,i,t){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var i,t=1,n=arguments.length;t<n;t++)for(var o in i=arguments[t])Object.prototype.hasOwnProperty.call(i,o)&&(e[o]=i[o]);return e},n.apply(this,arguments)};i.__esModule=!0;var o=t(5057),r=t(49266);i.default=function(e){var i=e.className,t=e.maxHeight,s=e.color,a=e.lineSpacing,l=void 0===a?"0.7em":a,c=e.style,d={maxHeight:t,width:"100%",height:"1em",backgroundColor:s,marginTop:l};return o.createElement("div",{className:r.joinClassNames("text-row",i),style:n(n({},d),c)})}},18294:(e,i,t)=>{"use strict";i.__esModule=!0,i.media=i.text=i.rect=i.round=i.textRow=i.MediaBlock=i.TextBlock=i.RectShape=i.RoundShape=i.TextRow=void 0;var n=t(13672);i.TextRow=n.default;var o=t(12208);i.RoundShape=o.default;var r=t(16102);i.RectShape=r.default;var s=t(49354);i.TextBlock=s.default;var a=t(98392);i.MediaBlock=a.default,i.textRow=n.default,i.round=o.default,i.rect=r.default,i.text=s.default,i.media=a.default},49266:(e,i)=>{"use strict";i.__esModule=!0,i.joinClassNames=void 0,i.joinClassNames=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return e.filter((function(e){return e})).join(" ")}},35833:function(e,i,t){var n;!function(o,r){"use strict";var s="function",a="undefined",l="object",c="string",d="major",u="model",p="name",m="type",f="vendor",b="version",w="architecture",h="console",g="mobile",v="tablet",x="smarttv",y="wearable",k="embedded",j="Amazon",S="Apple",I="ASUS",O="BlackBerry",C="Browser",T="Chrome",_="Firefox",Z="Google",E="Huawei",N="LG",R="Microsoft",P="Motorola",A="Opera",z="Samsung",B="Sharp",L="Sony",M="Xiaomi",D="Zebra",U="Facebook",q="Chromium OS",W="Mac OS",F=function(e){for(var i={},t=0;t<e.length;t++)i[e[t].toUpperCase()]=e[t];return i},H=function(e,i){return typeof e===c&&-1!==V(i).indexOf(V(e))},V=function(e){return e.toLowerCase()},Y=function(e,i){if(typeof e===c)return e=e.replace(/^\s\s*/,""),typeof i===a?e:e.substring(0,500)},G=function(e,i){for(var t,n,o,a,c,d,u=0;u<i.length&&!c;){var p=i[u],m=i[u+1];for(t=n=0;t<p.length&&!c&&p[t];)if(c=p[t++].exec(e))for(o=0;o<m.length;o++)d=c[++n],typeof(a=m[o])===l&&a.length>0?2===a.length?typeof a[1]==s?this[a[0]]=a[1].call(this,d):this[a[0]]=a[1]:3===a.length?typeof a[1]!==s||a[1].exec&&a[1].test?this[a[0]]=d?d.replace(a[1],a[2]):r:this[a[0]]=d?a[1].call(this,d,a[2]):r:4===a.length&&(this[a[0]]=d?a[3].call(this,d.replace(a[1],a[2])):r):this[a]=d||r;u+=2}},J=function(e,i){for(var t in i)if(typeof i[t]===l&&i[t].length>0){for(var n=0;n<i[t].length;n++)if(H(i[t][n],e))return"?"===t?r:t}else if(H(i[t],e))return"?"===t?r:t;return e},$={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},X={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[b,[p,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[b,[p,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[p,b],[/opios[\/ ]+([\w\.]+)/i],[b,[p,A+" Mini"]],[/\bopr\/([\w\.]+)/i],[b,[p,A]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[b,[p,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[p,b],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[b,[p,"UC"+C]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[b,[p,"WeChat"]],[/konqueror\/([\w\.]+)/i],[b,[p,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[b,[p,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[b,[p,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[b,[p,"Smart Lenovo "+C]],[/(avast|avg)\/([\w\.]+)/i],[[p,/(.+)/,"$1 Secure "+C],b],[/\bfocus\/([\w\.]+)/i],[b,[p,_+" Focus"]],[/\bopt\/([\w\.]+)/i],[b,[p,A+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[b,[p,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[b,[p,"Dolphin"]],[/coast\/([\w\.]+)/i],[b,[p,A+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[b,[p,"MIUI "+C]],[/fxios\/([-\w\.]+)/i],[b,[p,_]],[/\bqihu|(qi?ho?o?|360)browser/i],[[p,"360 "+C]],[/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i],[[p,/(.+)/,"$1 "+C],b],[/samsungbrowser\/([\w\.]+)/i],[b,[p,z+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[p,/_/g," "],b],[/metasr[\/ ]?([\d\.]+)/i],[b,[p,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[p,"Sogou Mobile"],b],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[p,b],[/(lbbrowser)/i,/\[(linkedin)app\]/i],[p],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[p,U],b],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[p,b],[/\bgsa\/([\w\.]+) .*safari\//i],[b,[p,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[b,[p,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[b,[p,T+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[p,T+" WebView"],b],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[b,[p,"Android "+C]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[p,b],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[b,[p,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[b,p],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[p,[b,J,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[p,b],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[p,"Netscape"],b],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[b,[p,_+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[p,b],[/(cobalt)\/([\w\.]+)/i],[p,[b,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[w,"amd64"]],[/(ia32(?=;))/i],[[w,V]],[/((?:i[346]|x)86)[;\)]/i],[[w,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[w,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[w,"armhf"]],[/windows (ce|mobile); ppc;/i],[[w,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[w,/ower/,"",V]],[/(sun4\w)[;\)]/i],[[w,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[w,V]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[u,[f,z],[m,v]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[u,[f,z],[m,g]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[u,[f,S],[m,g]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[u,[f,S],[m,v]],[/(macintosh);/i],[u,[f,S]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[f,B],[m,g]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[u,[f,E],[m,v]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[u,[f,E],[m,g]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[u,/_/g," "],[f,M],[m,g]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[u,/_/g," "],[f,M],[m,v]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[u,[f,"OPPO"],[m,g]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[f,"Vivo"],[m,g]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[u,[f,"Realme"],[m,g]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[u,[f,P],[m,g]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[f,P],[m,v]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[f,N],[m,v]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[u,[f,N],[m,g]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[u,[f,"Lenovo"],[m,v]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[u,/_/g," "],[f,"Nokia"],[m,g]],[/(pixel c)\b/i],[u,[f,Z],[m,v]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[f,Z],[m,g]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[u,[f,L],[m,g]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[f,L],[m,v]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[u,[f,"OnePlus"],[m,g]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[f,j],[m,v]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[f,j],[m,g]],[/(playbook);[-\w\),; ]+(rim)/i],[u,f,[m,v]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[f,O],[m,g]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[f,I],[m,v]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[f,I],[m,g]],[/(nexus 9)/i],[u,[f,"HTC"],[m,v]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[f,[u,/_/g," "],[m,g]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[u,[f,"Acer"],[m,v]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[u,[f,"Meizu"],[m,g]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[u,[f,"Ulefone"],[m,g]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[f,u,[m,g]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[f,u,[m,v]],[/(surface duo)/i],[u,[f,R],[m,v]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[f,"Fairphone"],[m,g]],[/(u304aa)/i],[u,[f,"AT&T"],[m,g]],[/\bsie-(\w*)/i],[u,[f,"Siemens"],[m,g]],[/\b(rct\w+) b/i],[u,[f,"RCA"],[m,v]],[/\b(venue[\d ]{2,7}) b/i],[u,[f,"Dell"],[m,v]],[/\b(q(?:mv|ta)\w+) b/i],[u,[f,"Verizon"],[m,v]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[u,[f,"Barnes & Noble"],[m,v]],[/\b(tm\d{3}\w+) b/i],[u,[f,"NuVision"],[m,v]],[/\b(k88) b/i],[u,[f,"ZTE"],[m,v]],[/\b(nx\d{3}j) b/i],[u,[f,"ZTE"],[m,g]],[/\b(gen\d{3}) b.+49h/i],[u,[f,"Swiss"],[m,g]],[/\b(zur\d{3}) b/i],[u,[f,"Swiss"],[m,v]],[/\b((zeki)?tb.*\b) b/i],[u,[f,"Zeki"],[m,v]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[f,"Dragon Touch"],u,[m,v]],[/\b(ns-?\w{0,9}) b/i],[u,[f,"Insignia"],[m,v]],[/\b((nxa|next)-?\w{0,9}) b/i],[u,[f,"NextBook"],[m,v]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[f,"Voice"],u,[m,g]],[/\b(lvtel\-)?(v1[12]) b/i],[[f,"LvTel"],u,[m,g]],[/\b(ph-1) /i],[u,[f,"Essential"],[m,g]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[u,[f,"Envizen"],[m,v]],[/\b(trio[-\w\. ]+) b/i],[u,[f,"MachSpeed"],[m,v]],[/\btu_(1491) b/i],[u,[f,"Rotor"],[m,v]],[/(shield[\w ]+) b/i],[u,[f,"Nvidia"],[m,v]],[/(sprint) (\w+)/i],[f,u,[m,g]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[f,R],[m,g]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[f,D],[m,v]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[f,D],[m,g]],[/smart-tv.+(samsung)/i],[f,[m,x]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[f,z],[m,x]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[f,N],[m,x]],[/(apple) ?tv/i],[f,[u,S+" TV"],[m,x]],[/crkey/i],[[u,T+"cast"],[f,Z],[m,x]],[/droid.+aft(\w+)( bui|\))/i],[u,[f,j],[m,x]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[u,[f,B],[m,x]],[/(bravia[\w ]+)( bui|\))/i],[u,[f,L],[m,x]],[/(mitv-\w{5}) bui/i],[u,[f,M],[m,x]],[/Hbbtv.*(technisat) (.*);/i],[f,u,[m,x]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[f,Y],[u,Y],[m,x]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[m,x]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[f,u,[m,h]],[/droid.+; (shield) bui/i],[u,[f,"Nvidia"],[m,h]],[/(playstation [345portablevi]+)/i],[u,[f,L],[m,h]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[f,R],[m,h]],[/((pebble))app/i],[f,u,[m,y]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[u,[f,S],[m,y]],[/droid.+; (glass) \d/i],[u,[f,Z],[m,y]],[/droid.+; (wt63?0{2,3})\)/i],[u,[f,D],[m,y]],[/(quest( 2| pro)?)/i],[u,[f,U],[m,y]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[f,[m,k]],[/(aeobc)\b/i],[u,[f,j],[m,k]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[u,[m,g]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[u,[m,v]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[m,v]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[m,g]],[/(android[-\w\. ]{0,9});.+buil/i],[u,[f,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[b,[p,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[b,[p,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[p,b],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[b,p]],os:[[/microsoft (windows) (vista|xp)/i],[p,b],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[p,[b,J,$]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[b,J,$],[p,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[b,/_/g,"."],[p,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[p,W],[b,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[b,p],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[p,b],[/\(bb(10);/i],[b,[p,O]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[b,[p,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[b,[p,_+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[b,[p,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[b,[p,"watchOS"]],[/crkey\/([\d\.]+)/i],[b,[p,T+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[p,q],b],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[p,b],[/(sunos) ?([\w\.\d]*)/i],[[p,"Solaris"],b],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[p,b]]},K=function(e,i){if(typeof e===l&&(i=e,e=r),!(this instanceof K))return new K(e,i).getResult();var t=typeof o!==a&&o.navigator?o.navigator:r,n=e||(t&&t.userAgent?t.userAgent:""),h=t&&t.userAgentData?t.userAgentData:r,x=i?function(e,i){var t={};for(var n in e)i[n]&&i[n].length%2===0?t[n]=i[n].concat(e[n]):t[n]=e[n];return t}(X,i):X,y=t&&t.userAgent==n;return this.getBrowser=function(){var e,i={};return i[p]=r,i[b]=r,G.call(i,n,x.browser),i[d]=typeof(e=i[b])===c?e.replace(/[^\d\.]/g,"").split(".")[0]:r,y&&t&&t.brave&&typeof t.brave.isBrave==s&&(i[p]="Brave"),i},this.getCPU=function(){var e={};return e[w]=r,G.call(e,n,x.cpu),e},this.getDevice=function(){var e={};return e[f]=r,e[u]=r,e[m]=r,G.call(e,n,x.device),y&&!e[m]&&h&&h.mobile&&(e[m]=g),y&&"Macintosh"==e[u]&&t&&typeof t.standalone!==a&&t.maxTouchPoints&&t.maxTouchPoints>2&&(e[u]="iPad",e[m]=v),e},this.getEngine=function(){var e={};return e[p]=r,e[b]=r,G.call(e,n,x.engine),e},this.getOS=function(){var e={};return e[p]=r,e[b]=r,G.call(e,n,x.os),y&&!e[p]&&h&&"Unknown"!=h.platform&&(e[p]=h.platform.replace(/chrome os/i,q).replace(/macos/i,W)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return n},this.setUA=function(e){return n=typeof e===c&&e.length>500?Y(e,500):e,this},this.setUA(n),this};K.VERSION="1.0.37",K.BROWSER=F([p,b,d]),K.CPU=F([w]),K.DEVICE=F([u,f,m,h,g,x,v,y,k]),K.ENGINE=K.OS=F([p,b]),typeof i!==a?(e.exports&&(i=e.exports=K),i.UAParser=K):t.amdO?(n=function(){return K}.call(i,t,i,e))===r||(e.exports=n):typeof o!==a&&(o.UAParser=K);var Q=typeof o!==a&&(o.jQuery||o.Zepto);if(Q&&!Q.ua){var ee=new K;Q.ua=ee.getResult(),Q.ua.get=function(){return ee.getUA()},Q.ua.set=function(e){ee.setUA(e);var i=ee.getResult();for(var t in i)Q.ua[t]=i[t]}}}("object"===typeof window?window:this)},81534:(e,i,t)=>{"use strict";function n(e){for(var i=1;i<arguments.length;i++){var t=arguments[i];for(var n in t)e[n]=t[n]}return e}t.d(i,{Z:()=>o});var o=function e(i,t){function o(e,o,r){if("undefined"!==typeof document){"number"===typeof(r=n({},t,r)).expires&&(r.expires=new Date(Date.now()+864e5*r.expires)),r.expires&&(r.expires=r.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var s="";for(var a in r)r[a]&&(s+="; "+a,!0!==r[a]&&(s+="="+r[a].split(";")[0]));return document.cookie=e+"="+i.write(o,e)+s}}return Object.create({set:o,get:function(e){if("undefined"!==typeof document&&(!arguments.length||e)){for(var t=document.cookie?document.cookie.split("; "):[],n={},o=0;o<t.length;o++){var r=t[o].split("="),s=r.slice(1).join("=");try{var a=decodeURIComponent(r[0]);if(n[a]=i.read(s,a),e===a)break}catch(l){}}return e?n[e]:n}},remove:function(e,i){o(e,"",n({},i,{expires:-1}))},withAttributes:function(i){return e(this.converter,n({},this.attributes,i))},withConverter:function(i){return e(n({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(i)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"})}}]);
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 6743.e0b3dc71.chunk.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[6743],{5873:(e,n,t)=>{t.d(n,{Z:()=>m});var o=t(96266),i=(t(49631),t(5057)),r=t(55898),s=t.n(r),l=t(47220),a=t(68420),c=t(1033),d=t(615),u=t(6504),f=t(94457),p=t(59763),h=t(25162);function g(e){var n;let{meta:t,fallbackUrl:r,invalidPathFallback:s,headerAddons:d,sessionManagerProps:g,links:m,...v}=e;(0,h.x)();const b=(0,i.useContext)(l.B3),x=null===b||void 0===b||null===(n=b.session)||void 0===n?void 0:n.user,y=null===x||void 0===x?void 0:x.role,{locale:k}=(0,a.PE)()||{},w=(0,i.useMemo)((()=>{const e=Object.assign({},window.blocklet,t);try{return(0,f.RX)(e)}catch(n){return console.error("Failed to format blocklet info",n,e),e}}),[t]),{localizedNav:j,flattened:T,matchedIndex:M}=(0,i.useMemo)((()=>{var e;let n=(0,f.KN)(null===w||void 0===w||null===(e=w.navigation)||void 0===e?void 0:e.dashboard,k)||[];n=(0,f.Kb)(n,y),n=(0,u._J)(n,(e=>({title:e.title,url:e.link,icon:e.icon?(0,o.jsx)("iconify-icon",{height:"100%",width:"100%",icon:e.icon}):null,external:!0,children:e.items})),"items");const t=(0,u.Ik)(n).filter((e=>!!e.url)),i=(0,u.RX)(t.map((e=>e.url)));return-1!==i&&(t[i].active=!0),{localizedNav:n,flattened:t,matchedIndex:i}}),[w,k,y]),C="function"===typeof m?m(j):[...j,...m];if((0,i.useLayoutEffect)((()=>{!x||null!==T&&void 0!==T&&T.length||!r||(window.location.href=r)}),[r]),(0,i.useLayoutEffect)((()=>{var e;x&&null!==T&&void 0!==T&&T.length&&-1===M&&(s?s():window.location.href=(null===(e=T[0])||void 0===e?void 0:e.url)||f.iU)}),[s,T,M]),!w.appName)return null;const{appLogo:A,appLogoRect:Z,appName:P}=w,E=(0,o.jsx)(p.Z,{formattedBlocklet:w,addons:d,sessionManagerProps:g});return(0,o.jsx)(c.Z,{title:P,fullWidth:!0,sidebarWidth:128,legacy:!1,links:C,...v,headerProps:{homeLink:f.iU,logo:(0,o.jsx)("img",{src:Z||A,alt:"logo"}),addons:E,...v.headerProps}})}g.propTypes={meta:d.u,fallbackUrl:s().string,invalidPathFallback:s().func,headerAddons:s().oneOfType([s().func,s().node]),sessionManagerProps:d.r,links:s().oneOfType([s().array,s().func])},g.defaultProps={meta:{},fallbackUrl:f.iU,invalidPathFallback:null,headerAddons:void 0,sessionManagerProps:{showRole:!0,onLogout:()=>{window.location.href=f.iU}},links:[]};const m=g},2484:(e,n,t)=>{t.d(n,{Z:()=>Y});var o,i=t(71171),r=t(96266),s=t(5057),l=t(55898),a=t.n(l),c=t(47685),d=t(52439),u=t(68420),f=t(71569),p=t(76223),h=t(24914),g=t.n(h),m=t(9498),v=t(39948);function b(e){let{name:n,logo:t,description:o,...i}=e;if(!n&&!t&&!o)return null;const l=(0,s.isValidElement)(t)?t:(0,r.jsx)("img",{src:t,alt:n});return(0,r.jsxs)(x,{...i,children:[(0,r.jsxs)("div",{children:[t&&(0,r.jsx)("div",{className:"footer-brand-logo",children:l}),n&&(0,r.jsx)("div",{className:"footer-brand-name",children:n})]}),o&&(0,r.jsx)("div",{className:"footer-brand-desc",children:o})]})}b.propTypes={name:a().node,logo:a().node,description:a().string},b.defaultProps={name:"",logo:"",description:""};const x=(0,c.zo)("div")(o||(o=(0,i.Z)(["\n display: flex;\n flex-direction: column;\n font-size: 14px;\n a {\n text-decoration: none;\n color: inherit;\n }\n > div:first-of-type {\n display: flex;\n align-items: center;\n }\n .footer-brand-logo {\n display: flex;\n align-items: center;\n margin-right: 16px;\n line-height: 1;\n img,\n svg {\n width: auto;\n height: 44px;\n max-height: 44px;\n }\n }\n .footer-brand-name {\n font-size: 16px;\n font-weight: bold;\n }\n .footer-brand-desc {\n margin-top: 16px;\n }\n\n "," {\n width: auto;\n }\n\n "," {\n .footer-brand-logo {\n img,\n svg {\n height: 32px;\n max-height: 32px;\n }\n }\n }\n"])),(e=>e.theme.breakpoints.down("sm")),(e=>e.theme.breakpoints.down("md")));var y,k=t(9978),w=t(76720),j=t(79787);function T(e){let{links:n,flowLayout:t,...o}=e;const[i,l]=(0,s.useState)(-1);if(null===n||void 0===n||!n.length)return null;const a=n.some((e=>{var n;return null===(n=e.items)||void 0===n?void 0:n.length})),c=e=>{let{label:n,link:t,icon:o,render:i,props:s}=e,l=n;return i?l=i({label:n,link:t,props:s}):t&&(l=(0,r.jsx)("a",{href:t,"aria-label":"Footer link for ".concat(n),...s,children:n})),(0,r.jsxs)(r.Fragment,{children:[o&&(0,r.jsx)(j.Z,{icon:o,size:20,sx:{mr:.5}}),l]})};return(0,r.jsx)(M,{...o,className:(0,k.Z)(o.className,{"footer-links--grouped":a,"footer-links--flow":t}),children:(0,r.jsxs)("div",{className:"footer-links-inner",children:[t&&n.map(((e,n)=>(0,r.jsx)("span",{className:"footer-links-item",children:c(e)},n))),!t&&n.map(((e,n)=>{const{items:t}=e,o=n===i;return(0,r.jsxs)("div",{className:(0,k.Z)("footer-links-group",{"footer-links-group--active":o}),onClick:()=>l(i===n?-1:n),children:[(0,r.jsxs)("span",{className:"footer-links-item",children:[c(e),!(null===t||void 0===t||!t.length)&&(0,r.jsx)("span",{className:"footer-links-group-expand-icon",children:(0,r.jsx)(w.Z,{style:{transform:"rotate(".concat(o?180:0,"deg)")}})})]}),!(null===t||void 0===t||!t.length)&&(0,r.jsx)("div",{className:"footer-links-sub",children:t.map(((e,n)=>(0,r.jsx)("span",{className:"footer-links-item",children:c(e)},n)))})]},n)}))]})})}T.propTypes={links:a().arrayOf(a().shape({label:a().string,link:a().string,render:a().func,props:a().object})),flowLayout:a().bool},T.defaultProps={links:[],flowLayout:!1};const M=(0,c.zo)("div")(y||(y=(0,i.Z)(["\n overflow: hidden;\n color: ",";\n .footer-links-inner {\n display: flex;\n justify-content: space-between;\n margin: 0 -8px;\n }\n .footer-links-group,\n .footer-links-sub {\n display: flex;\n flex-direction: column;\n }\n .footer-links-sub .footer-links-item {\n color: ",";\n }\n .footer-links-group-expand-icon {\n display: none;\n position: absolute;\n right: 16px;\n top: 50%;\n transform: translate(0, -50%);\n line-height: 1;\n svg {\n width: auto;\n height: 0.75em;\n }\n }\n .footer-links-item {\n display: inline-flex;\n align-items: center;\n position: relative;\n padding: 4px 8px;\n font-size: 14px;\n }\n &.footer-links--grouped {\n .footer-links-group {\n > .footer-links-item {\n font-weight: bold;\n }\n .footer-links-sub {\n margin-top: 8px;\n }\n }\n }\n a {\n display: inline-block;\n max-width: 150px;\n color: inherit;\n text-decoration: none;\n &:hover {\n text-decoration: underline;\n }\n }\n\n &.footer-links--flow {\n display: inline-flex;\n .footer-links-inner {\n justify-content: center;\n flex-wrap: wrap;\n margin: 0 -8px;\n .footer-links-item {\n padding: 0 8px;\n }\n .footer-links-item + .footer-links-item::before {\n content: '';\n position: absolute;\n left: 0;\n top: 50%;\n transform: translate(0, -50%);\n height: 1em;\n border-left: 1px solid ",";\n }\n }\n }\n\n "," {\n .footer-links-inner {\n flex-direction: column;\n margin: 0;\n }\n .footer-links-sub {\n display: none;\n }\n .footer-links-group {\n position: relative;\n padding: 12px 0;\n .footer-links-item .footer-links-group-expand-icon {\n display: inline-block;\n }\n }\n .footer-links-group + .footer-links-group {\n border-top: 1px solid ",";\n }\n .footer-links-group--active {\n .footer-links-sub {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n .footer-links-item {\n flex: 0 0 50%;\n }\n }\n }\n .footer-links-item {\n padding-left: 0;\n padding-right: 0;\n font-size: 13px;\n }\n &.footer-links--grouped {\n .footer-links-group {\n > .footer-links-item {\n font-size: 14px;\n }\n }\n }\n\n &.footer-links--flow {\n .footer-links-inner {\n flex-direction: row;\n }\n }\n }\n"])),(e=>e.theme.palette.grey[600]),(e=>e.theme.palette.grey[900]),(e=>e.theme.palette.grey[400]),(e=>e.theme.breakpoints.down("md")),(e=>e.theme.palette.grey[200]));var C;function A(e){let{items:n,...t}=e;const o=(0,c.Fg)();return null!==n&&void 0!==n&&n.length?(0,r.jsx)(Z,{...t,children:n.map(((e,n)=>(0,r.jsx)("a",{href:e.link,target:"_blank","aria-label":"Social media icon".concat(e.title?" for ".concat(e.title):""),rel:"noreferrer",children:(0,r.jsx)(j.Z,{icon:e.icon||e.title,sx:{bgcolor:o.palette.grey[600],color:"#fff"},size:24,component:"span"})},n)))}):null}A.propTypes={items:a().arrayOf(a().shape({icon:a().string,link:a().string}))},A.defaultProps={items:null};const Z=(0,c.zo)("div")(C||(C=(0,i.Z)(["\n display: inline-flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: center;\n gap: 20px;\n a {\n color: ",";\n text-decoration: none;\n &:hover {\n color: ",";\n }\n }\n "," {\n gap: 12px;\n }\n"])),(e=>e.theme.palette.grey[400]),(e=>e.theme.palette.primary.light),(e=>e.theme.breakpoints.down("md")));var P;function E(e){let{owner:n,year:t,...o}=e;return(0,r.jsxs)(S,{...o,children:["Copyright \xa9 ",t," ",n]})}E.propTypes={owner:a().string,year:a().string},E.defaultProps={owner:"ArcBlock",year:"".concat((new Date).getFullYear())};const S=(0,c.zo)("p")(P||(P=(0,i.Z)(["\n display: flex;\n align-items: center;\n margin: 0;\n font-size: 13px;\n"])));var I,O=t(22139);function N(e){let{children:n,autoCenter:t,...o}=e;return n?(0,r.jsx)(z,{...o,className:(0,k.Z)(o.className,{"footer-row-auto-center":t}),children:n}):null}N.propTypes={children:a().any,autoCenter:a().bool},N.defaultProps={children:null,autoCenter:!1};const z=(0,c.zo)(v.Z)(I||(I=(0,i.Z)(["\n display: flex;\n justify-content: space-between;\n & + & {\n margin-top: 24px;\n }\n &.footer-row-auto-center > *:only-child {\n margin: 0 auto;\n }\n\n "," {\n align-items: stretch;\n flex-direction: column;\n gap: 16px;\n > * {\n flex: 1 0 100%;\n }\n &.footer-row-auto-center > * {\n margin: 0 auto;\n }\n }\n"])),(e=>e.theme.breakpoints.down("md")));var R;function _(e){var n;let{elements:t,data:o,...i}=e;return(0,r.jsx)(L,{...i,children:(0,r.jsxs)(O.Z,{children:[(0,r.jsxs)(v.Z,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},justifyContent:"space-between",alignItems:{xs:"center",md:"space-between"},gap:2,pb:3},children:[(0,r.jsx)(v.Z,{children:t.brand}),(0,r.jsx)(v.Z,{lineHeight:1,children:t.socialMedia})]}),!(null===(n=o.navigation)||void 0===n||!n.length)&&(0,r.jsx)(v.Z,{sx:{mb:6,pt:3,borderTop:1,borderColor:"grey.200"},children:t.navigation}),(0,r.jsxs)(N,{sx:{pt:3,borderTop:1,borderColor:"grey.200"},autoCenter:!0,children:[t.copyright,t.links]})]})})}_.propTypes={elements:a().shape({brand:a().element,navigation:a().element,socialMedia:a().element,copyright:a().element,links:a().element}).isRequired,data:a().object.isRequired};const L=(0,c.zo)("div")(R||(R=(0,i.Z)(["\n padding: 32px 0 24px 0;\n .footer-brand-name,\n .footer-brand-desc {\n display: none;\n }\n && .footer-brand-logo {\n margin-right: 0;\n }\n"]))),q=_;var F;function H(e){let{elements:n,data:t,...o}=e;return(0,r.jsx)(U,{...o,children:(0,r.jsxs)(O.Z,{className:"plain-layout-container",children:[!!t.links&&(0,r.jsxs)(N,{sx:{width:1},autoCenter:!0,children:[n.copyright,n.links]}),!t.links&&(0,r.jsxs)(r.Fragment,{children:[(0,s.cloneElement)(n.brand,{name:null,description:null}),n.copyright]})]})})}H.propTypes={elements:a().shape({brand:a().element,navigation:a().element,socialMedia:a().element,copyright:a().element,links:a().element}).isRequired,data:a().object.isRequired};const U=(0,c.zo)("div")(F||(F=(0,i.Z)(["\n padding: 24px 0;\n .plain-layout-container {\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex-wrap: wrap;\n gap: 8px;\n }\n"]))),B=[{name:"plain",support:(e,n)=>{var t,o;return!(null!==(t=n.navigation)&&void 0!==t&&t.length)&&!(null!==(o=n.socialMedia)&&void 0!==o&&o.length)},component:H},{name:"standard",support:()=>!0,component:q}],D=B.reduce(((e,n)=>({...e,[n.name]:n})),{});function J(e){var n,t;const{brand:o,navigation:i,socialMedia:s,copyright:l,links:a,layout:c,...d}=e,u={brand:o?(0,r.jsx)(b,{...o}):null,navigation:null!==i&&void 0!==i&&i.length?(0,r.jsx)(T,{links:i}):null,socialMedia:null!==s&&void 0!==s&&s.length?(0,r.jsx)(A,{items:s}):null,copyright:(()=>{const e=(null===l||void 0===l?void 0:l.owner)||(null===o||void 0===o?void 0:o.name);return e?(0,r.jsx)(E,{owner:e,year:(null===l||void 0===l?void 0:l.year)||void 0}):null})(),links:null!==a&&void 0!==a&&a.length?(0,r.jsx)(T,{flowLayout:!0,links:a}):null};let f=null;var p;"auto"===c?f=B.find((n=>n.support(u,e))).component:f=null===(p=D[c])||void 0===p?void 0:p.component;if(!f)throw new Error("layout ".concat(c," is not supported."));return(0,r.jsxs)(v.Z,{position:"relative",...d,children:[(0,r.jsx)(f,{elements:u,data:e}),(0,r.jsx)(v.Z,{position:"absolute",right:16,bottom:0,fontSize:12,sx:{color:"transparent","::selection":{background:"#000",color:"#fff"}},children:null===(n=window)||void 0===n||null===(t=n.blocklet)||void 0===t?void 0:t.version})]})}J.propTypes={brand:a().shape({name:a().node,description:a().string,logo:a().node}),navigation:a().arrayOf(a().shape({label:a().node,link:a().string})),socialMedia:a().arrayOf(a().shape({icon:a().node,link:a().string})),copyright:a().shape({owner:a().string,year:a().oneOfType([a().string,a().number])}),links:a().arrayOf(a().shape({label:a().node,link:a().string})),layout:a().oneOf(["auto","standard","plain"])},J.defaultProps={brand:null,navigation:null,copyright:null,socialMedia:null,links:null,layout:"auto"};const $=J;var K,Q=t(6504),W=t(94457),X=t(615);function V(e){var n,t,o,i;let{meta:l,theme:a,...c}=e;const{locale:d}=(0,u.PE)()||{},f=(0,s.useMemo)((()=>{const e=Object.assign({},window.blocklet,l);try{return(0,W.RX)(e)}catch(n){return console.error("Failed to format blocklet info",n,e),e}}),[l]);if(!f.appName)return null;const{appLogo:p,appLogoRect:h,appName:v,appDescription:b,description:x,theme:y,copyright:k}=f,w={footerNav:(0,W.KN)(null===f||void 0===f||null===(n=f.navigation)||void 0===n?void 0:n.footer,d)||[],socialMedia:(0,W.KN)(null===f||void 0===f||null===(t=f.navigation)||void 0===t?void 0:t.social,d)||[],links:(0,W.KN)(null===f||void 0===f||null===(o=f.navigation)||void 0===o?void 0:o.bottom,d)||[]},j={brand:{name:v,description:b||x,logo:h||p},navigation:(0,Q._J)(w.footerNav,(e=>({...e,label:e.title,link:e.link})),"items"),copyright:k,socialMedia:w.socialMedia,links:w.links.map((e=>({...e,label:e.title})))};return(0,r.jsx)(m.Z,{theme:a,children:(0,r.jsx)(G,{...j,...g()(c,["bordered"]),$bordered:null===c||void 0===c?void 0:c.bordered,$bgcolor:null===y||void 0===y||null===(i=y.background)||void 0===i?void 0:i.footer})})}V.propTypes={meta:X.u,theme:a().object},V.defaultProps={meta:{},theme:null};const G=(0,c.zo)($)(K||(K=(0,i.Z)(["\n ","\n color: ",";\n ","\n font-family: Inter, Avenir, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif,\n 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';\n"])),(e=>{let{$bordered:n}=e;return"border-top: 1px solid ".concat(n?p.E.strokeSep:"#eee",";")}),(e=>e.theme.palette.grey[600]),(e=>{let{$bgcolor:n}=e;return n&&"background-color: ".concat(n,";")})),Y=(0,d.withErrorBoundary)(V,{FallbackComponent:f.H})},1192:(e,n,t)=>{t.d(n,{Z:()=>A});var o,i=t(71171),r=t(96266),s=t(5057),l=t(55898),a=t.n(l),c=t(52439),d=t(71569),u=t(47685),f=t(60391),p=t(48250),h=t(68420),g=t(76223),m=t(24914),v=t.n(m),b=t(79787),x=t(9498),y=t(615),k=t(6504),w=t(94457),j=t(59763),T=t(25162);function M(e){var n,t;let{meta:o,addons:i,sessionManagerProps:l,homeLink:a,theme:c,hideNavMenu:d,...u}=e;(0,T.x)();const{locale:f}=(0,h.PE)()||{},g=(0,s.useMemo)((()=>{const e=Object.assign({},window.blocklet,o);try{return(0,w.RX)(e)}catch(n){return console.error("Failed to format blocklet info",n,e),e}}),[o]);if(!g.appName)return null;const{appLogo:m,appLogoRect:y,theme:M}=g,A=(e=>{if(null===e||void 0===e||!e.length)return{navItems:[],activeId:null};let n=1;const t=(0,k._J)(e,(e=>{var t,o;const i=e.icon?(0,r.jsx)(b.Z,{icon:e.icon}):null;if(e.items)return{id:"".concat(n++),label:e.title,icon:i,children:e.items};let s={};return(null!==(t=e.link)&&void 0!==t&&t.startsWith("http://")||null!==(o=e.link)&&void 0!==o&&o.startsWith("https://"))&&(s={target:"_blank",rel:"noreferrer"}),{id:"".concat(n++),label:(0,r.jsx)("a",{href:e.link,...s,children:e.title}),icon:i,link:e.link}}),"items"),o=(0,k.Ik)(t),i=(0,k.RX)(o.map((e=>e.link)));return{navItems:t,activeId:i>=0?o[i].id:null}})((0,w.KN)(null===g||void 0===g||null===(n=g.navigation)||void 0===n?void 0:n.header,f)),{navItems:Z,activeId:P}=A,E="function"===typeof i?e=>i(e,{navigation:A}):i,S=(0,r.jsx)(j.Z,{formattedBlocklet:g,addons:E,sessionManagerProps:l});return(0,r.jsx)(x.Z,{theme:c,children:(0,r.jsx)(C,{homeLink:a,logo:(0,r.jsx)("img",{src:y||m,alt:"logo"}),addons:S,...v()(u,["bordered"]),$bordered:null===u||void 0===u?void 0:u.bordered,$bgcolor:null===M||void 0===M||null===(t=M.background)||void 0===t?void 0:t.header,children:d||null===Z||void 0===Z||!Z.length?null:e=>{let{isMobile:n}=e;return(0,r.jsx)(p.Z,{mode:n?"inline":"horizontal",activeId:P,items:Z,className:"header-nav",bgColor:"transparent",textColor:"#777"})}})})}M.propTypes={meta:y.u,addons:a().oneOfType([a().func,a().node]),sessionManagerProps:y.r,homeLink:a().string,theme:a().object,hideNavMenu:a().bool},M.defaultProps={meta:{},addons:null,sessionManagerProps:{showRole:!0},homeLink:w.iU,theme:null,hideNavMenu:!1};const C=(0,u.zo)(f.z)(o||(o=(0,i.Z)(["\n ","\n font-family: Inter, Avenir, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif,\n 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';\n .header-logo {\n min-width: 44px;\n }\n ","\n "," {\n .header-logo {\n min-width: 32px;\n }\n }\n .header-nav {\n .navmenu-sub .navmenu-item {\n min-width: 80px;\n }\n }\n .header-nav.navmenu--horizontal {\n .navmenu-root > .navmenu-sub,\n .navmenu-root > .navmenu-item {\n padding: 16px 4px;\n\n .navmenu-sub-container {\n padding-top: 0;\n }\n }\n .navmenu-item-icon > .MuiAvatar-root,\n .navmenu-sub-icon > .MuiAvatar-root {\n width: 20px;\n height: 20px;\n }\n }\n"])),(e=>{let{$bgcolor:n}=e;return"background-color: ".concat(n||"#fff",";")}),(e=>{let{$bordered:n}=e;return n?"border-bottom: 1px solid ".concat(g.E.strokeSep,";"):""}),(e=>e.theme.breakpoints.down("md"))),A=(0,c.withErrorBoundary)(M,{FallbackComponent:d.H})},79787:(e,n,t)=>{t.d(n,{Z:()=>a});var o=t(96266),i=(t(49631),t(55898)),r=t.n(i),s=t(62681),l=t(6504);function a(e){let{icon:n,size:t,sx:i,...r}=e;const a=[...Array.isArray(i)?i:[i]];if(t&&a.push({width:t,height:t}),r.variant||a.push({"&.MuiAvatar-root":{color:"inherit",fontWeight:"bold",backgroundColor:"transparent",borderRadius:0},"&.MuiAvatar-root svg":{width:"100%",height:"100%"}}),(0,l.CB)(n))return(0,o.jsx)(s.Z,{as:"span",...r,src:n,sx:a});if((0,l.Xk)(n)){const e=t?.6*t+4:0;return(0,o.jsx)(s.Z,{as:"span",...r,sx:a,children:(0,o.jsx)("iconify-icon",{icon:n,height:e||void 0})})}return n&&"string"===typeof n?(a.push({"&.MuiAvatar-root":{display:"inline-flex",...t&&{fontSize:t-2}}}),(0,o.jsx)(s.Z,{as:"span",...r,sx:a,children:Array.from(n)[0]})):null}a.propTypes={icon:r().string.isRequired,size:r().number,sx:r().oneOfType([r().array,r().func,r().object])},a.defaultProps={size:null,sx:null}},94457:(e,n,t)=>{t.d(n,{KN:()=>c,Kb:()=>p,RX:()=>u,iU:()=>a});var o,i,r,s,l=t(6504);const a=(null===(o=window)||void 0===o||null===(i=o.blocklet)||void 0===i?void 0:i.groupPrefix)||(null===(r=window)||void 0===r||null===(s=r.blocklet)||void 0===s?void 0:s.prefix)||"/",c=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en";if(null===e||void 0===e||!e.length)return e;const t=(e,n)=>{if("string"===typeof e){if((0,l.CB)(e)){const t=new URL(e);return t.searchParams.set("locale",n),t.href}const t=new URL(e,window.location.origin);return t.searchParams.set("locale",n),t.pathname+t.search}return"object"===typeof e?e[n]||(null===e||void 0===e?void 0:e.en)||(null===e||void 0===e?void 0:e.zh):e};return(0,l._J)(e,(e=>{var o,i,r;return{...e,title:(i=e.title,r=n,"string"===typeof i?i:"object"===typeof i?i[r]||(null===i||void 0===i?void 0:i.en)||(null===i||void 0===i?void 0:i.zh):i),link:null!==(o=e.items)&&void 0!==o&&o.length?e.link:t(e.link,n),_rawLink:e.link}}),"items")},d=e=>{if(null===e||void 0===e||!e.length)return null;const n=(e=>(0,l._J)(e,(e=>e.role?{...e,role:Array.isArray(e.role)?e.role:[e.role]}:e),"items"))(e),t={header:[],footer:[],social:[],bottom:[],dashboard:[],sessionManager:[],userCenter:[]};return n.forEach((e=>{if(e.section){if(Array.isArray(e.section))e.section.forEach((n=>{var o;null===(o=t[n])||void 0===o||o.push(e)}));else if("string"===typeof e.section){var n;null===(n=t[e.section])||void 0===n||n.push(e)}}else t.header.push(e)})),t},u=e=>{if(!e)return null;const n={...e};return n.theme=(e=>{const n={...e},t=null===e||void 0===e?void 0:e.background;return"string"===typeof t?n.background={header:t,footer:t,default:t}:t&&"object"===typeof t&&(n.background={header:t.header||t.default,footer:t.footer||t.default,default:t.default}),n})(n.theme),n.navigation=d(f(n.navigation)),n},f=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return(0,l.fA)(e,((e,n)=>{var t;return!!e.link||(null===(t=n.filteredChildren)||void 0===t?void 0:t.length)}),"items")},p=(e,n)=>(0,l.fA)(e,((e,t)=>{const o=!e.role||n&&e.role.includes(n);var i;return t.isLeaf?o:o&&(null===(i=t.filteredChildren)||void 0===i?void 0:i.length)}),"items")},59763:(e,n,t)=>{t.d(n,{Z:()=>O});var o=t(96266),i=(t(49631),t(5057)),r=t(55898),s=t.n(r),l=t(47220),a=t(51724),c=t(67680),d=t(49020),u=t(72113),f=t(7469),p=t(25228),h=t(19577),g=t(2478),m=t(79278),v=t(39948),b=t(11750),x=t(55498);const y={top:-960,width:960,height:960,body:'<path fill="currentColor" d="M510-600v-210q0-12.75 8.625-21.375T540-840h270q12.75 0 21.375 8.625T840-810v210q0 12.75-8.625 21.375T810-570H540q-12.75 0-21.375-8.625T510-600M120-480v-330q0-12.75 8.625-21.375T150-840h270q12.75 0 21.375 8.625T450-810v330q0 12.75-8.625 21.375T420-450H150q-12.75 0-21.375-8.625T120-480m390 330v-330q0-12.75 8.625-21.375T540-510h270q12.75 0 21.375 8.625T840-480v330q0 12.75-8.625 21.375T810-120H540q-12.75 0-21.375-8.625T510-150m-390 0v-210q0-12.75 8.625-21.375T150-390h270q12.75 0 21.375 8.625T450-360v210q0 12.75-8.625 21.375T420-120H150q-12.75 0-21.375-8.625T120-150m60-360h210v-270H180zm390 330h210v-270H570zm0-450h210v-150H570zM180-180h210v-150H180zm210-150"/>'},k={width:24,height:24,body:'<path fill="currentColor" d="M15.95 12.3L11.7 8.05q-.15-.15-.212-.325t-.063-.375q0-.2.063-.375t.212-.325l4.25-4.25q.15-.15.325-.212t.375-.063q.2 0 .375.063t.325.212l4.25 4.25q.15.15.213.325t.062.375q0 .2-.063.375t-.212.325l-4.25 4.25q-.15.15-.325.213t-.375.062q-.2 0-.375-.062t-.325-.213ZM3 10V4q0-.425.288-.713T4 3h6q.425 0 .713.288T11 4v6q0 .425-.288.713T10 11H4q-.425 0-.713-.288T3 10Zm10 10v-6q0-.425.288-.713T14 13h6q.425 0 .713.288T21 14v6q0 .425-.288.713T20 21h-6q-.425 0-.713-.288T13 20ZM3 20v-6q0-.425.288-.713T4 13h6q.425 0 .713.288T11 14v6q0 .425-.288.713T10 21H4q-.425 0-.713-.288T3 20ZM5 9h4V5H5v4Zm11.675 1.2L19.5 7.375L16.675 4.55L13.85 7.375l2.825 2.825ZM15 19h4v-4h-4v4ZM5 19h4v-4H5v4ZM9 9Zm4.85-1.625ZM9 15Zm6 0Z"/>'};var w=t(12673),j=t(99360),T=t(28726),M=t(76223),C=t(21998),A=t(43907);function Z(e){var n;let{session:t,locale:r,size:s}=e;const l=(null===(n=window)||void 0===n?void 0:n.blocklet)||{},a=(l.navigation||[]).filter((e=>"sessionManager"===e.section&&!["/sessionManager"].includes(e.id))).filter((e=>{var n;return!!((null===e||void 0===e?void 0:e.role)||[]).includes((null===t||void 0===t||null===(n=t.user)||void 0===n?void 0:n.role)||"guest")})).map((e=>{const n=((null===l||void 0===l?void 0:l.componentMountPoints)||[]).find((n=>e.component===n.name));return{...e,component:n}})),Z=(0,i.useRef)(null),P=(0,w.Z)({open:!1}),E=(0,j.Z)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:!P.open;P.open=e}));return 0!==a.length&&null!==t&&void 0!==t&&t.user?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(c.Z,{size:"medium",ref:Z,onClick:()=>E(),children:(0,o.jsx)(x.JO,{icon:y,fontSize:s,style:{transform:"scale(1.08)"}})}),(0,o.jsx)(d.Z,{open:P.open,onClose:()=>E(!1),anchorEl:Z.current,transition:!0,placement:"bottom-end",sx:{zIndex:1600},children:e=>{let{TransitionProps:n}=e;return(0,o.jsx)(u.d,{onClickAway:e=>{e.preventDefault(),e.stopPropagation(),E(!1)},children:(0,o.jsx)(f.Z,{...n,timeout:350,children:(0,o.jsxs)(p.Z,{variant:"outlined",sx:{borderRadius:3,width:350,maxWidth:"90vw",borderColor:M.E.lineStep,p:2,border:"0 !important",boxShadow:"0px 8px 16px 0px ".concat(M.E.gray6,", 0px 0px 0px 1px ").concat(M.E.gray6)},children:[(0,o.jsx)(h.Z,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, 100px)",gridAutoRows:"minmax(100px, max-content)",justifyContent:"space-between",maxHeight:350,overflowY:"auto",p:0},children:a.map((e=>{var n,t;return(0,o.jsx)(g.ZP,{disablePadding:!0,children:(0,o.jsxs)(m.Z,{href:e.link,sx:{p:1,display:"flex",flexDirection:"column",alignItems:"center",gap:1,width:"100%",height:"100%",borderRadius:2,"&:hover":{backgroundColor:M.E.surfacePrimarySubtitle}},children:[null!==e&&void 0!==e&&null!==(n=e.component)&&void 0!==n&&n.did?(0,o.jsx)(v.Z,{component:"img",src:"".concat(C.Bu,"/blocklet/logo-bundle/").concat(e.component.did),sx:{borderRadius:2,width:50,height:50,objectFit:"contain"}}):(0,o.jsx)(x.JO,{fontSize:50,icon:e.icon||k,color:M.E.textSubtitle}),(0,o.jsx)(b.Z,{sx:{fontSize:"12px",color:M.E.textBase,textAlign:"center",lineHeight:"normal"},children:(null===(t=e.title)||void 0===t?void 0:t[r])||e.title})]})},e.id)}))}),(0,o.jsx)(A.Z,{session:t,children:(0,o.jsx)(T.Z,{variant:"outlined",fullWidth:!0,href:C.Rt,sx:{mt:1,borderRadius:2,color:M.E.textBase,borderColor:M.E.lineBorderStrong,"&:hover":{color:M.E.primaryBase,borderColor:M.E.primaryBase}},children:"zh"===r?"\u7ba1\u7406":"Manage"})})]})})})}})]}):null}Z.propTypes={session:s().object.isRequired,locale:s().string,size:s().number},Z.defaultProps={locale:"en",size:24};var P=t(30296),E=t(68420),S=t(615),I=t(94457);function O(e){var n,t,r,s;let{formattedBlocklet:c,addons:d,sessionManagerProps:u}=e;const f=(0,i.useContext)(l.B3),{locale:p}=(0,E.PE)()||{},{enableConnect:h=!0,enableLocale:g=!0}=c,m=!(null===f||void 0===f||null===(n=f.session)||void 0===n||!n.user);let v=(0,I.KN)(null===c||void 0===c||null===(t=c.navigation)||void 0===t?void 0:t.sessionManager,p)||[];v=(0,I.Kb)(v,null===f||void 0===f||null===(r=f.session)||void 0===r||null===(s=r.user)||void 0===s?void 0:s.role);const b=(()=>{if(d&&"function"!==typeof d)return Array.isArray(d)?d:[d];let e=[];if(g&&p&&e.push((0,o.jsx)(P.Z,{showText:!1},"locale-selector")),h&&f){const n=[];if(m){(v?v.slice(0,5):[]).forEach((e=>{n.push({label:e.title,icon:e.icon?(0,o.jsx)("iconify-icon",{icon:e.icon,height:24,style:{marginRight:8}}):null,component:"a",href:e.link,key:e.link})}))}e.push((0,o.jsx)(Z,{session:f.session,locale:p},"session-blocklet")),e.push((0,o.jsx)(a.Z,{session:f.session,locale:p,menu:n,showRole:!0,...u},"session-user"))}return"function"===typeof d&&(e=d(e)||[]),e})();return(0,i.createElement)(o.Fragment,null,...Array.isArray(b)?b:[b])}O.propTypes={formattedBlocklet:s().object.isRequired,addons:s().oneOfType([s().func,s().node]),sessionManagerProps:S.r},O.defaultProps={addons:null,sessionManagerProps:{showRole:!0}}},9498:(e,n,t)=>{t.d(n,{Z:()=>a});var o=t(96266),i=t(55898),r=t.n(i),s=t(47685);const l=(0,s.jG)();function a(e){let{theme:n,children:t}=e;const i=n?(0,s.jG)(n):l;return(0,o.jsx)(s.f6,{theme:i,children:t})}a.propTypes={children:r().any.isRequired,theme:r().object},a.defaultProps={theme:null}},25162:(e,n,t)=>{t.d(n,{x:()=>r});var o=t(5057),i=t(60829);const r=()=>{const e=(0,i.Z)();(0,o.useEffect)((()=>{e.wallet&&t.e(2365).then(t.t.bind(t,72365,23)).then((e=>{e.call||(e=e.default),e.call("arcHideTopBar","{}")})).catch((e=>{console.error("load dsbridge error",e)}))}),[e])}},615:(e,n,t)=>{t.d(n,{r:()=>s,u:()=>r});var o=t(55898),i=t.n(o);const r=i().shape({appLogo:i().node,appName:i().string,theme:i().shape({background:i().string}),enableConnect:i().bool,enableLocale:i().bool,navigation:i().arrayOf(i().shape({title:i().oneOfType([i().string,i().object]),link:i().oneOfType([i().string,i().object]),icon:i().string,items:i().arrayOf(i().shape({title:i().oneOfType([i().string,i().object]),link:i().oneOfType([i().string,i().object])}))}))}),s=i().shape({showText:i().bool,showRole:i().bool,switchDid:i().bool,switchProfile:i().bool,switchPassport:i().bool,disableLogout:i().bool,onLogin:i().func,onLogout:i().func,onSwitchDid:i().func,onSwitchProfile:i().func,onSwitchPassport:i().func,menu:i().array,menuRender:i().func,dark:i().bool,size:i().number})},6504:(e,n,t)=>{t.d(n,{CB:()=>s,Ik:()=>i,RX:()=>a,Xk:()=>l,_J:()=>o,fA:()=>r});const o=function(e,n){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"children";return e.map((e=>Array.isArray(e[t])?n({...e,[t]:o(e[t],n,t)}):n(e)))},i=function(e){const n=[];return o(e,(e=>n.push(e)),arguments.length>1&&void 0!==arguments[1]?arguments[1]:"children"),n},r=function(e,n){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"children";return e.map((e=>({...e}))).filter((e=>{const o=e[t];if(Array.isArray(o)){const i=r(o,n,t);e[t]=null!==i&&void 0!==i&&i.length?i:void 0}const i={filteredChildren:e[t],isLeaf:!(null!==o&&void 0!==o&&o.length)};return n(e,i)}))},s=e=>/^https?:\/\//.test(e),l=e=>/^[\w-]+:[\w-]+$/.test(e),a=function(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(((e,n)=>({path:e,index:n}))).filter((e=>(e=>{if(!e||null===e||void 0===e||!e.startsWith("/"))return!1;const n=e=>e.endsWith("/")?e:"".concat(e,"/"),t=n(window.location.pathname),o=n(new URL(e,window.location.origin).pathname);return t.startsWith(o)})(e.path)));if(null===e||void 0===e||!e.length)return-1;return e.slice(1).reduce(((e,n)=>e.path.length>=n.path.length?e:n),e[0]).index}},49631:(e,n,t)=>{var o=t(56666);const i=Object.freeze({left:0,top:0,width:16,height:16}),r=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),s=Object.freeze({...i,...r}),l=Object.freeze({...s,body:"",hidden:!1}),a=Object.freeze({width:null,height:null}),c=Object.freeze({...a,...r});const d=/[\s,]+/;const u={...c,preserveAspectRatio:""};function f(e){const n={...u},t=(n,t)=>e.getAttribute(n)||t;var o;return n.width=t("width",null),n.height=t("height",null),n.rotate=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const t=e.replace(/^-?[0-9.]*/,"");function o(e){for(;e<0;)e+=4;return e%4}if(""===t){const n=parseInt(e);return isNaN(n)?0:o(n)}if(t!==e){let n=0;switch(t){case"%":n=25;break;case"deg":n=90}if(n){let i=parseFloat(e.slice(0,e.length-t.length));return isNaN(i)?0:(i/=n,i%1===0?o(i):0)}}return n}(t("rotate","")),o=n,t("flip","").split(d).forEach((e=>{switch(e.trim()){case"horizontal":o.hFlip=!0;break;case"vertical":o.vFlip=!0}})),n.preserveAspectRatio=t("preserveAspectRatio",t("preserveaspectratio","")),n}const p=/^[a-z0-9]+(-[a-z0-9]+)*$/,h=function(e,n,t){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";const i=e.split(":");if("@"===e.slice(0,1)){if(i.length<2||i.length>3)return null;o=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const e=i.pop(),t=i.pop(),r={provider:i.length>0?i[0]:o,prefix:t,name:e};return n&&!g(r)?null:r}const r=i[0],s=r.split("-");if(s.length>1){const e={provider:o,prefix:s.shift(),name:s.join("-")};return n&&!g(e)?null:e}if(t&&""===o){const e={provider:o,prefix:"",name:r};return n&&!g(e,t)?null:e}return null},g=(e,n)=>!!e&&!(""!==e.provider&&!e.provider.match(p)||!(n&&""===e.prefix||e.prefix.match(p))||!e.name.match(p));function m(e,n){const t=function(e,n){const t={};!e.hFlip!==!n.hFlip&&(t.hFlip=!0),!e.vFlip!==!n.vFlip&&(t.vFlip=!0);const o=((e.rotate||0)+(n.rotate||0))%4;return o&&(t.rotate=o),t}(e,n);for(const o in l)o in r?o in e&&!(o in t)&&(t[o]=r[o]):o in n?t[o]=n[o]:o in e&&(t[o]=e[o]);return t}function v(e,n,t){const o=e.icons,i=e.aliases||Object.create(null);let r={};function s(e){r=m(o[e]||i[e],r)}return s(n),t.forEach(s),m(e,r)}function b(e,n){const t=[];if("object"!==typeof e||"object"!==typeof e.icons)return t;e.not_found instanceof Array&&e.not_found.forEach((e=>{n(e,null),t.push(e)}));const o=function(e,n){const t=e.icons,o=e.aliases||Object.create(null),i=Object.create(null);return(n||Object.keys(t).concat(Object.keys(o))).forEach((function e(n){if(t[n])return i[n]=[];if(!(n in i)){i[n]=null;const t=o[n]&&o[n].parent,r=t&&e(t);r&&(i[n]=[t].concat(r))}return i[n]})),i}(e);for(const i in o){const r=o[i];r&&(n(i,v(e,i,r)),t.push(i))}return t}const x={provider:"",aliases:{},not_found:{},...i};function y(e,n){for(const t in n)if(t in e&&typeof e[t]!==typeof n[t])return!1;return!0}function k(e){if("object"!==typeof e||null===e)return null;const n=e;if("string"!==typeof n.prefix||!e.icons||"object"!==typeof e.icons)return null;if(!y(e,x))return null;const t=n.icons;for(const i in t){const e=t[i];if(!i.match(p)||"string"!==typeof e.body||!y(e,l))return null}const o=n.aliases||Object.create(null);for(const i in o){const e=o[i],n=e.parent;if(!i.match(p)||"string"!==typeof n||!t[n]&&!o[n]||!y(e,l))return null}return n}const w=Object.create(null);function j(e,n){const t=w[e]||(w[e]=Object.create(null));return t[n]||(t[n]=function(e,n){return{provider:e,prefix:n,icons:Object.create(null),missing:new Set}}(e,n))}function T(e,n){return k(n)?b(n,((n,t)=>{t?e.icons[n]=t:e.missing.add(n)})):[]}function M(e,n){let t=[];return("string"===typeof e?[e]:Object.keys(w)).forEach((e=>{("string"===typeof e&&"string"===typeof n?[n]:Object.keys(w[e]||{})).forEach((n=>{const o=j(e,n);t=t.concat(Object.keys(o.icons).map((t=>(""!==e?"@"+e+":":"")+n+":"+t)))}))})),t}let C=!1;function A(e){return"boolean"===typeof e&&(C=e),C}function Z(e){const n="string"===typeof e?h(e,!0,C):e;if(n){const e=j(n.provider,n.prefix),t=n.name;return e.icons[t]||(e.missing.has(t)?null:void 0)}}function P(e,n){const t=h(e,!0,C);if(!t)return!1;return function(e,n,t){try{if("string"===typeof t.body)return e.icons[n]={...t},!0}catch(o){}return!1}(j(t.provider,t.prefix),t.name,n)}function E(e,n){if("object"!==typeof e)return!1;if("string"!==typeof n&&(n=e.provider||""),C&&!n&&!e.prefix){let n=!1;return k(e)&&(e.prefix="",b(e,((e,t)=>{t&&P(e,t)&&(n=!0)}))),n}const t=e.prefix;if(!g({provider:n,prefix:t,name:"a"}))return!1;return!!T(j(n,t),e)}function S(e){return!!Z(e)}function I(e){const n=Z(e);return n?{...s,...n}:null}function O(e,n){e.forEach((e=>{const t=e.loaderCallbacks;t&&(e.loaderCallbacks=t.filter((e=>e.id!==n)))}))}let N=0;const z=Object.create(null);function R(e,n){z[e]=n}function _(e){return z[e]||z[""]}var L={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function q(e,n,t,o){const i=e.resources.length,r=e.random?Math.floor(Math.random()*i):e.index;let s;if(e.random){let n=e.resources.slice(0);for(s=[];n.length>1;){const e=Math.floor(Math.random()*n.length);s.push(n[e]),n=n.slice(0,e).concat(n.slice(e+1))}s=s.concat(n)}else s=e.resources.slice(r).concat(e.resources.slice(0,r));const l=Date.now();let a,c="pending",d=0,u=null,f=[],p=[];function h(){u&&(clearTimeout(u),u=null)}function g(){"pending"===c&&(c="aborted"),h(),f.forEach((e=>{"pending"===e.status&&(e.status="aborted")})),f=[]}function m(e,n){n&&(p=[]),"function"===typeof e&&p.push(e)}function v(){c="failed",p.forEach((e=>{e(void 0,a)}))}function b(){f.forEach((e=>{"pending"===e.status&&(e.status="aborted")})),f=[]}function x(){if("pending"!==c)return;h();const o=s.shift();if(void 0===o)return f.length?void(u=setTimeout((()=>{h(),"pending"===c&&(b(),v())}),e.timeout)):void v();const i={status:"pending",resource:o,callback:(n,t)=>{!function(n,t,o){const i="success"!==t;switch(f=f.filter((e=>e!==n)),c){case"pending":break;case"failed":if(i||!e.dataAfterTimeout)return;break;default:return}if("abort"===t)return a=o,void v();if(i)return a=o,void(f.length||(s.length?x():v()));if(h(),b(),!e.random){const t=e.resources.indexOf(n.resource);-1!==t&&t!==e.index&&(e.index=t)}c="completed",p.forEach((e=>{e(o)}))}(i,n,t)}};f.push(i),d++,u=setTimeout(x,e.rotate),t(o,n,i.callback)}return"function"===typeof o&&p.push(o),setTimeout(x),function(){return{startTime:l,payload:n,status:c,queriesSent:d,queriesPending:f.length,subscribe:m,abort:g}}}function F(e){const n={...L,...e};let t=[];function o(){t=t.filter((e=>"pending"===e().status))}return{query:function(e,i,r){const s=q(n,e,i,((e,n)=>{o(),r&&r(e,n)}));return t.push(s),s},find:function(e){return t.find((n=>e(n)))||null},setIndex:e=>{n.index=e},getIndex:()=>n.index,cleanup:o}}function H(e){let n;if("string"===typeof e.resources)n=[e.resources];else if(n=e.resources,!(n instanceof Array)||!n.length)return null;return{resources:n,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:!0===e.random,index:e.index||0,dataAfterTimeout:!1!==e.dataAfterTimeout}}const U=Object.create(null),B=["https://api.simplesvg.com","https://api.unisvg.com"],D=[];for(;B.length>0;)1===B.length||Math.random()>.5?D.push(B.shift()):D.push(B.pop());function J(e,n){const t=H(n);return null!==t&&(U[e]=t,!0)}function $(e){return U[e]}function K(){return Object.keys(U)}function Q(){}U[""]=H({resources:["https://api.iconify.design"].concat(D)});const W=Object.create(null);function X(e,n,t){let o,i;if("string"===typeof e){const n=_(e);if(!n)return t(void 0,424),Q;i=n.send;const r=function(e){if(!W[e]){const n=$(e);if(!n)return;const t={config:n,redundancy:F(n)};W[e]=t}return W[e]}(e);r&&(o=r.redundancy)}else{const n=H(e);if(n){o=F(n);const t=_(e.resources?e.resources[0]:"");t&&(i=t.send)}}return o&&i?o.query(n,i,t)().abort:(t(void 0,424),Q)}const V="iconify2",G="iconify",Y=G+"-count",ee=G+"-version",ne=36e5,te=168;function oe(e,n){try{return e.getItem(n)}catch(t){}}function ie(e,n,t){try{return e.setItem(n,t),!0}catch(o){}}function re(e,n){try{e.removeItem(n)}catch(t){}}function se(e,n){return ie(e,Y,n.toString())}function le(e){return parseInt(oe(e,Y))||0}const ae={local:!0,session:!0},ce={local:new Set,session:new Set};let de=!1;let ue="undefined"===typeof window?{}:window;function fe(e){const n=e+"Storage";try{if(ue&&ue[n]&&"number"===typeof ue[n].length)return ue[n]}catch(t){}ae[e]=!1}function pe(e,n){const t=fe(e);if(!t)return;const o=oe(t,ee);if(o!==V){if(o){const e=le(t);for(let n=0;n<e;n++)re(t,G+n.toString())}return ie(t,ee,V),void se(t,0)}const i=Math.floor(Date.now()/ne)-te,r=e=>{const o=G+e.toString(),r=oe(t,o);if("string"===typeof r){try{const t=JSON.parse(r);if("object"===typeof t&&"number"===typeof t.cached&&t.cached>i&&"string"===typeof t.provider&&"object"===typeof t.data&&"string"===typeof t.data.prefix&&n(t,e))return!0}catch(s){}re(t,o)}};let s=le(t);for(let l=s-1;l>=0;l--)r(l)||(l===s-1?(s--,se(t,s)):ce[e].add(l))}function he(){if(!de){de=!0;for(const e in ae)pe(e,(e=>{const n=e.data,t=j(e.provider,n.prefix);if(!T(t,n).length)return!1;const o=n.lastModified||-1;return t.lastModifiedCached=t.lastModifiedCached?Math.min(t.lastModifiedCached,o):o,!0}))}}function ge(e,n){function t(t){let o;if(!ae[t]||!(o=fe(t)))return;const i=ce[t];let r;if(i.size)i.delete(r=Array.from(i).shift());else if(r=le(o),!se(o,r+1))return;const s={cached:Math.floor(Date.now()/ne),provider:e.provider,data:n};return ie(o,G+r.toString(),JSON.stringify(s))}de||he(),n.lastModified&&!function(e,n){const t=e.lastModifiedCached;if(t&&t>=n)return t===n;if(e.lastModifiedCached=n,t)for(const o in ae)pe(o,(t=>{const o=t.data;return t.provider!==e.provider||o.prefix!==e.prefix||o.lastModified===n}));return!0}(e,n.lastModified)||Object.keys(n.icons).length&&(n.not_found&&delete(n=Object.assign({},n)).not_found,t("local")||t("session"))}function me(){}function ve(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout((()=>{e.iconsLoaderFlag=!1,function(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout((()=>{e.pendingCallbacksFlag=!1;const n=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!n.length)return;let t=!1;const o=e.provider,i=e.prefix;n.forEach((n=>{const r=n.icons,s=r.pending.length;r.pending=r.pending.filter((n=>{if(n.prefix!==i)return!0;const s=n.name;if(e.icons[s])r.loaded.push({provider:o,prefix:i,name:s});else{if(!e.missing.has(s))return t=!0,!0;r.missing.push({provider:o,prefix:i,name:s})}return!1})),r.pending.length!==s&&(t||O([e],n.id),n.callback(r.loaded.slice(0),r.missing.slice(0),r.pending.slice(0),n.abort))}))})))}(e)})))}const be=(e,n)=>{const t=function(e){let n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],t=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const o=[];return e.forEach((e=>{const i="string"===typeof e?h(e,n,t):e;i&&o.push(i)})),o}(e,!0,A()),o=function(e){const n={loaded:[],missing:[],pending:[]},t=Object.create(null);e.sort(((e,n)=>e.provider!==n.provider?e.provider.localeCompare(n.provider):e.prefix!==n.prefix?e.prefix.localeCompare(n.prefix):e.name.localeCompare(n.name)));let o={provider:"",prefix:"",name:""};return e.forEach((e=>{if(o.name===e.name&&o.prefix===e.prefix&&o.provider===e.provider)return;o=e;const i=e.provider,r=e.prefix,s=e.name,l=t[i]||(t[i]=Object.create(null)),a=l[r]||(l[r]=j(i,r));let c;c=s in a.icons?n.loaded:""===r||a.missing.has(s)?n.missing:n.pending;const d={provider:i,prefix:r,name:s};c.push(d)})),n}(t);if(!o.pending.length){let e=!0;return n&&setTimeout((()=>{e&&n(o.loaded,o.missing,o.pending,me)})),()=>{e=!1}}const i=Object.create(null),r=[];let s,l;return o.pending.forEach((e=>{const{provider:n,prefix:t}=e;if(t===l&&n===s)return;s=n,l=t,r.push(j(n,t));const o=i[n]||(i[n]=Object.create(null));o[t]||(o[t]=[])})),o.pending.forEach((e=>{const{provider:n,prefix:t,name:o}=e,r=j(n,t),s=r.pendingIcons||(r.pendingIcons=new Set);s.has(o)||(s.add(o),i[n][t].push(o))})),r.forEach((e=>{const{provider:n,prefix:t}=e;i[n][t].length&&function(e,n){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(n).sort():e.iconsToLoad=n,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout((()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:t}=e,o=e.iconsToLoad;let i;delete e.iconsToLoad,o&&(i=_(n))&&i.prepare(n,t,o).forEach((t=>{X(n,t,(n=>{if("object"!==typeof n)t.icons.forEach((n=>{e.missing.add(n)}));else try{const t=T(e,n);if(!t.length)return;const o=e.pendingIcons;o&&t.forEach((e=>{o.delete(e)})),ge(e,n)}catch(o){console.error(o)}ve(e)}))}))})))}(e,i[n][t])})),n?function(e,n,t){const o=N++,i=O.bind(null,t,o);if(!n.pending.length)return i;const r={id:o,icons:n,callback:e,abort:i};return t.forEach((e=>{(e.loaderCallbacks||(e.loaderCallbacks=[])).push(r)})),i}(n,o,r):me},xe=e=>new Promise(((n,t)=>{const o="string"===typeof e?h(e,!0):e;o?be([o||e],(i=>{if(i.length&&o){const e=Z(o);if(e)return void n({...s,...e})}t(e)})):t(e)}));function ye(e,n){const t="string"===typeof e?h(e,!0,!0):null;if(!t){const n=function(e){try{const n="string"===typeof e?JSON.parse(e):e;if("string"===typeof n.body)return{...n}}catch(n){}}(e);return{value:e,data:n}}const o=Z(t);if(void 0!==o||!t.prefix)return{value:e,name:t,data:o};const i=be([t],(()=>n(e,t,Z(t))));return{value:e,name:t,loading:i}}function ke(e){return e.hasAttribute("inline")}let we=!1;try{we=0===navigator.vendor.indexOf("Apple")}catch(cn){}const je=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Te=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Me(e,n,t){if(1===n)return e;if(t=t||100,"number"===typeof e)return Math.ceil(e*n*t)/t;if("string"!==typeof e)return e;const o=e.split(je);if(null===o||!o.length)return e;const i=[];let r=o.shift(),s=Te.test(r);for(;;){if(s){const e=parseFloat(r);isNaN(e)?i.push(r):i.push(Math.ceil(e*n*t)/t)}else i.push(r);if(r=o.shift(),void 0===r)return i.join("");s=!s}}const Ce=e=>"unset"===e||"undefined"===e||"none"===e;function Ae(e,n){const t={...s,...e},o={...c,...n},i={left:t.left,top:t.top,width:t.width,height:t.height};let r=t.body;[t,o].forEach((e=>{const n=[],t=e.hFlip,o=e.vFlip;let s,l=e.rotate;switch(t?o?l+=2:(n.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),n.push("scale(-1 1)"),i.top=i.left=0):o&&(n.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),n.push("scale(1 -1)"),i.top=i.left=0),l<0&&(l-=4*Math.floor(l/4)),l%=4,l){case 1:s=i.height/2+i.top,n.unshift("rotate(90 "+s.toString()+" "+s.toString()+")");break;case 2:n.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:s=i.width/2+i.left,n.unshift("rotate(-90 "+s.toString()+" "+s.toString()+")")}l%2===1&&(i.left!==i.top&&(s=i.left,i.left=i.top,i.top=s),i.width!==i.height&&(s=i.width,i.width=i.height,i.height=s)),n.length&&(r='<g transform="'+n.join(" ")+'">'+r+"</g>")}));const l=o.width,a=o.height,d=i.width,u=i.height;let f,p;null===l?(p=null===a?"1em":"auto"===a?u:a,f=Me(p,d/u)):(f="auto"===l?d:l,p=null===a?Me(f,u/d):"auto"===a?u:a);const h={},g=(e,n)=>{Ce(n)||(h[e]=n.toString())};return g("width",f),g("height",p),h.viewBox=i.left.toString()+" "+i.top.toString()+" "+d.toString()+" "+u.toString(),{attributes:h,body:r}}let Ze=(()=>{let e;try{if(e=fetch,"function"===typeof e)return e}catch(cn){}})();function Pe(e){Ze=e}function Ee(){return Ze}const Se={prepare:(e,n,t)=>{const o=[],i=function(e,n){const t=$(e);if(!t)return 0;let o;if(t.maxURL){let e=0;t.resources.forEach((n=>{const t=n;e=Math.max(e,t.length)}));const i=n+".json?icons=";o=t.maxURL-e-t.path.length-i.length}else o=0;return o}(e,n),r="icons";let s={type:r,provider:e,prefix:n,icons:[]},l=0;return t.forEach(((t,a)=>{l+=t.length+1,l>=i&&a>0&&(o.push(s),s={type:r,provider:e,prefix:n,icons:[]},l=t.length),s.icons.push(t)})),o.push(s),o},send:(e,n,t)=>{if(!Ze)return void t("abort",424);let o=function(e){if("string"===typeof e){const n=$(e);if(n)return n.path}return"/"}(n.provider);switch(n.type){case"icons":{const e=n.prefix,t=n.icons.join(",");o+=e+".json?"+new URLSearchParams({icons:t}).toString();break}case"custom":{const e=n.uri;o+="/"===e.slice(0,1)?e.slice(1):e;break}default:return void t("abort",400)}let i=503;Ze(e+o).then((e=>{const n=e.status;if(200===n)return i=501,e.json();setTimeout((()=>{t(function(e){return 404===e}(n)?"abort":"next",n)}))})).then((e=>{"object"===typeof e&&null!==e?setTimeout((()=>{t("success",e)})):setTimeout((()=>{404===e?t("abort",e):t("next",i)}))})).catch((()=>{t("next",i)}))}};function Ie(e,n){switch(e){case"local":case"session":ae[e]=n;break;case"all":for(const e in ae)ae[e]=n}}const Oe="data-style";let Ne="";function ze(e){Ne=e}function Re(e,n){let t=Array.from(e.childNodes).find((e=>e.hasAttribute&&e.hasAttribute(Oe)));t||(t=document.createElement("style"),t.setAttribute(Oe,Oe),e.appendChild(t)),t.textContent=":host{display:inline-block;vertical-align:"+(n?"-0.125em":"0")+"}span,svg{display:block}"+Ne}function _e(){let e;R("",Se),A(!0);try{e=window}catch(cn){}if(e){if(he(),void 0!==e.IconifyPreload){const n=e.IconifyPreload,t="Invalid IconifyPreload syntax.";"object"===typeof n&&null!==n&&(n instanceof Array?n:[n]).forEach((e=>{try{("object"!==typeof e||null===e||e instanceof Array||"object"!==typeof e.icons||"string"!==typeof e.prefix||!E(e))&&console.error(t)}catch(n){console.error(t)}}))}if(void 0!==e.IconifyProviders){const t=e.IconifyProviders;if("object"===typeof t&&null!==t)for(const e in t){const o="IconifyProviders["+e+"] is invalid.";try{const n=t[e];if("object"!==typeof n||!n||void 0===n.resources)continue;J(e,n)||console.error(o)}catch(n){console.error(o)}}}}return{enableCache:e=>Ie(e,!0),disableCache:e=>Ie(e,!1),iconExists:S,getIcon:I,listIcons:M,addIcon:P,addCollection:E,calculateSize:Me,buildIcon:Ae,loadIcons:be,loadIcon:xe,addAPIProvider:J,appendCustomStyle:ze,_api:{getAPIConfig:$,setAPIModule:R,sendAPIQuery:X,setFetch:Pe,getFetch:Ee,listAPIProviders:K}}}function Le(e,n){let t=-1===e.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const o in n)t+=" "+o+'="'+n[o]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+t+">"+e+"</svg>"}const qe={"background-color":"currentColor"},Fe={"background-color":"transparent"},He={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},Ue={"-webkit-mask":qe,mask:qe,background:Fe};for(const dn in Ue){const e=Ue[dn];for(const n in He)e[dn+"-"+n]=He[n]}function Be(e){return e?e+(e.match(/^[-0-9.]+$/)?"px":""):"inherit"}let De;function Je(e){return void 0===De&&function(){try{De=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch(cn){De=null}}(),De?De.createHTML(e):e}function $e(e,n){const t=n.icon.data,o=n.customisations,i=Ae(t,o);o.preserveAspectRatio&&(i.attributes.preserveAspectRatio=o.preserveAspectRatio);const r=n.renderedMode;let l;if("svg"===r)l=function(e){const n=document.createElement("span"),t=e.attributes;let o="";t.width||(o="width: inherit;"),t.height||(o+="height: inherit;"),o&&(t.style=o);const i=Le(e.body,t);return n.innerHTML=Je(i),n.firstChild}(i);else l=function(e,n,t){const o=document.createElement("span");let i=e.body;-1!==i.indexOf("<a")&&(i+="\x3c!-- "+Date.now()+" --\x3e");const r=e.attributes,s='url("'+(c=Le(i,{...r,width:n.width+"",height:n.height+""}),"data:image/svg+xml,"+function(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}(c)+'")'),l=o.style,a={"--svg":s,width:Be(r.width),height:Be(r.height),...t?qe:Fe};var c;for(const d in a)l.setProperty(d,a[d]);return o}(i,{...s,...t},"mask"===r);const a=Array.from(e.childNodes).find((e=>{const n=e.tagName&&e.tagName.toUpperCase();return"SPAN"===n||"SVG"===n}));a?"SPAN"===l.tagName&&a.tagName===l.tagName?a.setAttribute("style",l.getAttribute("style")):e.replaceChild(l,a):e.appendChild(l)}function Ke(e,n,t){return{rendered:!1,inline:n,icon:e,lastRender:t&&(t.rendered?t:t.lastRender)}}const Qe=function(){let e,n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"iconify-icon";try{e=window.customElements,n=window.HTMLElement}catch(cn){return}if(!e||!n)return;const i=e.get(t);if(i)return i;const r=["icon","mode","inline","width","height","rotate","flip"],s=class extends n{constructor(){super(),(0,o.Z)(this,"_shadowRoot",void 0),(0,o.Z)(this,"_state",void 0),(0,o.Z)(this,"_checkQueued",!1);const e=this._shadowRoot=this.attachShadow({mode:"open"}),n=ke(this);Re(e,n),this._state=Ke({value:""},n),this._queueCheck()}static get observedAttributes(){return r.slice(0)}attributeChangedCallback(e){if("inline"===e){const e=ke(this),n=this._state;e!==n.inline&&(n.inline=e,Re(this._shadowRoot,e))}else this._queueCheck()}get icon(){const e=this.getAttribute("icon");if(e&&"{"===e.slice(0,1))try{return JSON.parse(e)}catch(cn){}return e}set icon(e){"object"===typeof e&&(e=JSON.stringify(e)),this.setAttribute("icon",e)}get inline(){return ke(this)}set inline(e){e?this.setAttribute("inline","true"):this.removeAttribute("inline")}restartAnimation(){const e=this._state;if(e.rendered){const n=this._shadowRoot;if("svg"===e.renderedMode)try{return void n.lastChild.setCurrentTime(0)}catch(cn){}$e(n,e)}}get status(){const e=this._state;return e.rendered?"rendered":null===e.icon.data?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout((()=>{this._check()})))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const e=this._state,n=this.getAttribute("icon");if(n!==e.icon.value)return void this._iconChanged(n);if(!e.rendered)return;const t=this.getAttribute("mode"),o=f(this);(e.attrMode!==t||function(e,n){for(const t in u)if(e[t]!==n[t])return!0;return!1}(e.customisations,o))&&this._renderIcon(e.icon,o,t)}_iconChanged(e){const n=ye(e,((e,n,t)=>{const o=this._state;if(o.rendered||this.getAttribute("icon")!==e)return;const i={value:e,name:n,data:t};i.data?this._gotIconData(i):o.icon=i}));n.data?this._gotIconData(n):this._state=Ke(n,this._state.inline,this._state)}_gotIconData(e){this._checkQueued=!1,this._renderIcon(e,f(this),this.getAttribute("mode"))}_renderIcon(e,n,t){const o=function(e,n){switch(n){case"svg":case"bg":case"mask":return n}return"style"===n||!we&&-1!==e.indexOf("<a")?-1===e.indexOf("currentColor")?"bg":"mask":"svg"}(e.data.body,t),i=this._state.inline;$e(this._shadowRoot,this._state={rendered:!0,icon:e,inline:i,customisations:n,attrMode:t,renderedMode:o})}};r.forEach((e=>{e in s.prototype||Object.defineProperty(s.prototype,e,{get:function(){return this.getAttribute(e)},set:function(n){null!==n?this.setAttribute(e,n):this.removeAttribute(e)}})}));const l=_e();for(const o in l)s[o]=s.prototype[o]=l[o];return e.define(t,s),s}()||_e(),{enableCache:We,disableCache:Xe,iconExists:Ve,getIcon:Ge,listIcons:Ye,addIcon:en,addCollection:nn,calculateSize:tn,buildIcon:on,loadIcons:rn,loadIcon:sn,addAPIProvider:ln,_api:an}=Qe}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[6931],{78123:(e,n,t)=>{t.d(n,{Z:()=>z});var o,l=t(71171),i=t(5057),a=t(55898),r=t.n(a),c=t(33518),s=t(85493),d=t(15849),u=t(67654),m=t(67680),p=t(61533),v=t(29034),g=t(80633),f=t(44846),b=t(74490),h=t(83294),k=t(46954),y=t(44067),x=t(11750),Z=t(65140),w=t(87916),C=t(26174),E=t(93938),L=t(28726),j=t(38242),R=t(68420),B=t(77277),D=t(86229),O=t(14491),S=t(4651),P=t(58238),U=t(70461),_=t(55419),T=t(29054),A=t(96266);function N(e){var n,t,o,l;let{blocklet:a,onStart:r,onComplete:c,variant:N,hasPermission:I,useBlockletUrlEvaluation:M,...z}=e;const G=(0,s.useNavigate)(),F=(0,P.h6)(),[q,X]=(0,i.useState)(null),[V,W]=(0,i.useState)(null),[Y,Q]=(0,i.useState)(!1),[H,J]=(0,i.useState)(null),{t:$}=(0,i.useContext)(R.RD),[ee]=(0,u.Z)("skip-blocklet-setup",!1),{loading:ne,recommendedUrl:te}=M(a),{nftState:oe}=(0,T.y0)(),le=(0,j.isInProgress)(a.status);let ie=(null===a||void 0===a||null===(n=a.controller)||void 0===n||null===(t=n.status)||void 0===t?void 0:t.value)===B.BLOCKLET_CONTROLLER_STATUS.suspended;null!==oe&&void 0!==oe&&oe.expired||(null===a||void 0===a||null===(o=a.controller)||void 0===o||null===(l=o.status)||void 0===l?void 0:l.reason)!==B.SUSPENDED_REASON.expired||(ie=!1);const{inService:ae}=F,re=function(e,n){let t=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return async()=>{const o=async t=>{r({action:e,blocklet:a}),Q(!0),W(e);let o=!1;try{if("remove"===e)await n(t);else if("start"===e){var l;if(!(0,j.hasRunnableComponent)(a))return void D.Z.error($("blocklet.noComponent"));if(!ae&&!ee&&(null===(l=a.settings)||void 0===l||!l.initialized)&&a.mode!==B.BLOCKLET_MODES.DEVELOPMENT){const n=(0,S.RU)(F.info),t=new URL(te);return t.searchParams.set("serverUrl",n),window.open(t.href),void c({action:e,blocklet:a})}const t=a.children.filter((e=>!(0,j.isInProgress)(e.status)&&"running"!==e.status)).map((e=>e.meta.did)),o={did:a.meta.did,componentDids:t};await n({input:o})}else if(["stop","restart","reload"].includes(e)){const e=a.children.filter((e=>"running"===e.status)).map((e=>e.meta.did)),t={did:a.meta.did,componentDids:e};await n({input:t})}else{const e={did:a.meta.did};await n({input:e})}"remove"===e?o=!0:await(0,O._v)(1e3),"reload"===e&&D.Z.success($("blocklet.reloadSuccess")),J(null),c({action:e,blocklet:a})}catch(i){const n="Blocklet ".concat(e," failed: ").concat((0,O.Z)(i));throw c({action:e,blocklet:a,error:new Error(n)}),new Error(n)}finally{o||Q(!1)}},l=()=>{Q(!1),J(null)},i=(0,j.getDisplayName)(a,!0),s=a.mode===B.BLOCKLET_MODES.DEVELOPMENT?{description:()=>(0,A.jsx)(x.Z,{component:"div",children:(0,A.jsx)(x.Z,{gutterBottom:!0,children:$("blocklet.action.removeApplicationDescription")})}),params:{removeType:"complete"}}:{description:(e,n)=>(0,A.jsxs)(x.Z,{component:"div",children:[(0,A.jsx)(x.Z,{gutterBottom:!0,children:$("blocklet.action.removeApplicationDescription")}),(0,A.jsxs)(w.Z,{name:"removeType",value:e.removeType,onChange:t=>n({...e,removeType:t.target.value}),children:[(0,A.jsx)(C.Z,{value:"backup",control:(0,A.jsx)(Z.Z,{}),label:$("blocklet.action.removeApplicationAfterBackup")}),(0,A.jsx)(C.Z,{value:"complete",control:(0,A.jsx)(Z.Z,{}),label:$("blocklet.action.removeApplicationComplete")})]})]}),params:{removeType:"backup"}},d={stop:{title:"".concat($("common.stop")," ").concat(i),description:$("blocklet.action.stopDescription"),confirm:$("blocklet.action.confirmStop"),cancel:$("common.cancel"),onConfirm:o,onCancel:l},restart:{title:"".concat($("common.restart")," ").concat(i),description:$("blocklet.action.restartDescription"),confirm:$("blocklet.action.confirmRestart"),cancel:$("common.cancel"),onConfirm:o,onCancel:l},remove:{title:"".concat($("common.remove")," ").concat(i),confirm:$("blocklet.action.confirmRemove"),cancel:$("common.cancel"),onConfirm:o,onCancel:l,...s},cancelDownload:{title:"".concat($("common.cancel")),description:$("blocklet.action.cancelDownloadDescription",{name:i}),confirm:$("common.confirm"),cancel:$("common.cancel"),onConfirm:o,onCancel:l}};t?J(d[e]):await o()}},ce=Boolean(q),se=e=>{try{e.stopPropagation(),e.preventDefault()}catch{}X(e.currentTarget)},de=e=>{try{e.stopPropagation(),e.preventDefault()}catch{}X(null)},ue=async(e,n)=>{try{n.stopPropagation(),n.preventDefault()}catch{}if("function"===typeof e.handler)try{Q(!0),W(e.action),await e.handler()}catch(t){console.error("Blocklet ".concat(e.name," failed: "),t)}finally{Q(!1),X(null)}else X(null)},me=!ae&&(0,j.isDeletableBlocklet)(a)?{action:"remove",icon:_.Z.Remove,name:$("common.remove"),handler:re("remove",(async e=>{let{removeType:n}=e;"backup"===n&&await F.api.backupBlocklet({input:{appDid:a.appDid,to:"disk"}}),await F.api.deleteBlocklet({input:{did:a.meta.did,keepData:!1}})}),!0),disabled:le}:null,pe={action:"remove",icon:_.Z.Remove,name:$("common.cancel"),handler:re("cancelDownload",F.api.cancelDownloadBlocklet,!0)},ve=(0,j.getAppMissingConfigs)(a),ge=[{action:"start",icon:_.Z.Start,name:$("common.start"),handler:re("start",F.api.startBlocklet),disabled:ie||a.children.every((e=>"running"===e.status))||(0,O.XN)(a.status)||ne||le},{action:"stop",icon:_.Z.Stop,name:$("common.stop"),handler:re("stop",F.api.stopBlocklet,!0),disabled:!["running","starting"].includes(a.status)},{action:"restart",icon:_.Z.Restart,name:$("common.restart"),handler:re("restart",F.api.restartBlocklet,!0),disabled:ie||"running"!==a.status},(0,O.XN)(a.status)?pe:me,{separator:!0},{onlyInMenu:!0,action:"config",icon:_.Z.Config,name:$("common.config"),handler:()=>{G("/blocklets/".concat(a.meta.did,"/configuration"))},disabled:(0,O.XN)(a.status)},{onlyInMenu:!0,action:"team",icon:_.Z.Group,name:$("common.manageTeam"),handler:()=>{G("/blocklets/".concat(a.meta.did,"/members"))},disabled:(0,O.XN)(a.status)},{onlyInMenu:!0,action:"log",icon:_.Z.Log,name:$("common.log"),handler:()=>{G("/logs/blocklet-".concat(a.meta.did))},disabled:(0,O.XN)(a.status)}].filter(Boolean);return"menu"===N?(0,A.jsxs)(K,{"data-cy":"blocklet-actions",children:[(0,A.jsx)(m.Z,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions","actions-blocklet-did":a.meta.did,onClick:se,size:"small",disabled:!I||!(0,O.XN)(a.status)&&Y,children:(0,A.jsx)(h.Z,{})}),(0,A.jsxs)(p.Z,{id:"actions-menu",anchorEl:q,keepMounted:!0,open:ce,onClose:de,PaperProps:{},children:[ve.length>0&&(0,A.jsxs)(E.Z,{style:{maxWidth:"400px"},severity:"error",children:[$("blocklet.config.missingRequired"),(0,A.jsx)("br",{}),(0,A.jsx)(d.Link,{to:"/blocklets/".concat(a.meta.did,"/components"),children:$("blocklet.config.gotoFix")})]}),ge.map(((e,n)=>e.separator?(0,A.jsx)(v.Z,{},"separator-".concat(n)):(0,A.jsxs)(b.Z,{dense:!0,onClick:n=>ue(e,n),disabled:Y||e.disabled,"data-cy":"".concat(e.action,"-blocklet"),children:[(0,A.jsx)(k.Z,{style:{minWidth:24},children:V===e.action&&Y?(0,A.jsx)(f.Z,{size:16,sx:{marginRight:1}}):(0,A.jsx)(e.icon,{fontSize:"small"})}),(0,A.jsx)(y.Z,{primary:e.name})]},e.name)))]}),H&&(0,A.jsx)(U.Z,{title:H.title,description:H.description,confirm:H.confirm,cancel:H.cancel,params:H.params,onConfirm:H.onConfirm,onCancel:H.onCancel})]}):(0,A.jsxs)(K,{"data-cy":"blocklet-actions",...z,children:[(0,A.jsx)(g.Z,{children:ge.filter((e=>!e.separator&&!e.onlyInMenu)).map((e=>(0,A.jsxs)(L.Z,{title:e.name,"data-cy":"".concat(e.action,"-blocklet"),onClick:()=>ue(e),disabled:Boolean(e.disabled)||Y,children:[V===e.action&&Y?(0,A.jsx)(f.Z,{size:16,sx:{marginRight:1}}):(0,A.jsx)(e.icon,{}),(0,A.jsx)("span",{className:"blocklet-action-text",children:e.name})]},e.name)))}),H&&(0,A.jsx)(U.Z,{title:H.title,description:H.description,confirm:H.confirm,cancel:H.cancel,params:H.params,onConfirm:H.onConfirm,onCancel:H.onCancel})]})}N.propTypes={blocklet:r().object.isRequired,onStart:r().func.isRequired,onComplete:r().func.isRequired,variant:r().oneOf(["menu","group"]),hasPermission:r().bool,useBlockletUrlEvaluation:r().func},N.defaultProps={variant:"menu",hasPermission:!1,useBlockletUrlEvaluation:()=>{var e,n;return{loading:!1,recommendedUrl:null===(e=window)||void 0===e||null===(n=e.location)||void 0===n?void 0:n.href}}};const K=c.Z.div(o||(o=(0,l.Z)(["\n display: flex;\n align-items: center;\n\n @media (max-width: ","px) {\n .MuiButton-root {\n padding: 4px;\n font-size: 10px;\n }\n }\n"])),(e=>e.theme.breakpoints.values.sm));var I=t(7199),M=t(24138);function z(e){let{...n}=e;const t=(0,I.V)(N,"mutate_blocklets");return(0,A.jsx)(t,{...n,useBlockletUrlEvaluation:M.BZ})}},7199:(e,n,t)=>{t.d(n,{V:()=>o.V,Z:()=>o.Z});var o=t(63406)},24138:(e,n,t)=>{t.d(n,{BZ:()=>b,ZN:()=>h});var o=t(5057),l=t(6352),i=t.n(l),a=t(35432),r=t(49714),c=t(41365),s=t.n(c),d=t(32243),u=t.n(d),m=t(68420),p=t(14491);const v=u()((e=>s()(i()(new URL(e).origin,a.WELLKNOWN_PING_PREFIX)))),g={};function f(e){let{urls:n,checkAccessible:t=s(),disableCache:l=!1}=e;const i=(0,o.useRef)(n.filter((e=>g[e])).map((e=>g[e]))),a=i.current.length===n.length,[c,d]=(0,o.useState)(a?i.current:[]),[u,m]=(0,o.useState)(!a),p=(0,o.useMemo)((()=>!u&&c.length?c[0]:null),[c,u]);return(0,o.useEffect)((()=>{if((null===n||void 0===n?void 0:n.length)>0&&!a){(async()=>{let e;if(m(!0),l)e=await(0,r.evaluateURLs)(n,{checkAccessible:t}),e.forEach((e=>{g[e.url]=e}));else{(await(0,r.evaluateURLs)(n.filter((e=>!g[e])),{checkAccessible:t})).forEach((e=>{g[e.url]=e})),e=n.map((e=>g[e])).sort(((e,n)=>n.score-e.score))}d(e),m(!1)})()}}),[n,l,a]),{urlsState:c,loading:u,recommendedUrlState:p,recommendedUrl:null===p||void 0===p?void 0:p.url}}function b(e){const{locale:n}=(0,o.useContext)(m.RD),t=(0,o.useMemo)((()=>e?(0,p.A6)({blocklet:e,params:(0,p.f0)(e,n)}):[]),[e,n]),{loading:l,recommendedUrlState:i,recommendedUrl:a}=f({urls:t,checkAccessible:v});return{urls:t,loading:l,recommendedUrlState:i,recommendedUrl:a}}function h(e){const n=(0,o.useMemo)((()=>e.map((e=>(0,p.Sk)(e)))),[e]),{urlsState:t,loading:l,recommendedUrl:i}=f({urls:n,checkAccessible:v});let a;if(l)a={domainsAccessibility:e.reduce(((e,n)=>({...e,[n]:{loading:!0}})),{}),recommendedDomain:null};else{var r;const e=t.reduce(((e,n)=>{const t=new URL(n.url).hostname;return e[t]={...n,domain:t},e}),{}),n=(null===(r=t.find((e=>e.accessible)))||void 0===r?void 0:r.url)||i;a={domainsAccessibility:e,recommendedDomain:n?new URL(n).hostname:null}}return a}},1722:(e,n,t)=>{t.d(n,{Z:()=>d});var o=t(55898),l=t.n(o),i=t(62681),a=t(72333),r=t(77277),c=t(49522),s=t(96266);function d(e){let{blocklet:n,style:t,size:o,...l}=e;const{logoUrl:d}=(0,c.Z)({blocklet:n}),{variant:u}=l;let m=(0,s.jsx)("img",{src:d,alt:"",style:{width:o}});if(!n.meta.logo){var p;(null===(p=(n.configs||[]).find((e=>e.key===r.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_SQUARE)))||void 0===p?void 0:p.value)||(m=(0,s.jsx)(a.Z,{did:n.meta.did||"",responsive:!0}))}return(0,s.jsx)(i.Z,{variant:u||"square",style:Object.assign({backgroundColor:"transparent",width:o,height:o,borderRadius:10},t),...l,children:m})}d.propTypes={blocklet:l().object.isRequired,style:l().object,size:l().oneOfType([l().number,l().string])},d.defaultProps={style:{},size:40}},55419:(e,n,t)=>{t.d(n,{Z:()=>u});var o=t(27773),l=t(22754),i=t(98451),a=t(32207),r=t(35258),c=t(17545),s=t(49647),d=t(70648);const u={Start:l.Z,Stop:i.Z,Restart:a.default,Reload:r.Z,Remove:o.default,Config:c.Z,Log:s.Z,Group:d.Z}},81010:(e,n,t)=>{t.d(n,{Z:()=>v});var o=t(5057),l=t(55898),i=t.n(l),a=t(44846),r=t(75239),c=t(68420),s=t(38242),d=t(69569),u=t(22228),m=t(96266);const p={yellow:"#FFCF71",grey:"#888888"};function v(e){let{status:n,variant:t,source:l,progress:i,...v}=e;const{t:g}=(0,o.useContext)(c.RD),f={added:p.grey,waiting:p.yellow,downloading:p.yellow,extracting:p.yellow,downloaded:p.grey,installing:p.yellow,installed:p.grey,starting:p.yellow,running:"success",stopping:p.yellow,stopped:p.grey,error:"error",upgrading:p.yellow,restarting:p.yellow,corrupted:"error",deleting:p.yellow},b=(0,s.isInProgress)(n),h=g("blocklet.status.".concat(n));return"dot"===t?(0,m.jsx)(r.Z,{title:g("blocklet.statusTip",{status:h}),children:(0,m.jsx)(d.Z,{color:f[n],...v})}):(0,m.jsxs)(u.Z,{type:{added:"primary",waiting:"warning",downloading:"warning",extracting:"warning",downloaded:"primary",installing:"warning",installed:"primary",starting:"warning",running:"success",stopping:"warning",stopped:"reverse",error:"error",upgrading:"warning",restarting:"warning",corrupted:"error",deleting:"warning"}[n],...v,children:[b&&(0,m.jsx)(a.Z,{size:12,color:"inherit",style:{marginRight:5}}),h,"downloading"===n&&i?(0,m.jsx)("div",{style:{marginLeft:5},children:"".concat(i," %")}):null]})}v.propTypes={status:i().string.isRequired,variant:i().oneOf(["dot","tag"]),source:i().string,progress:i().number},v.defaultProps={variant:"tag",source:"",progress:0}},29054:(e,n,t)=>{t.d(n,{BlockletContext:()=>l,y0:()=>r});var o=t(5057);const l=(0,o.createContext)({}),{Provider:i,Consumer:a}=l;function r(){return(0,o.useContext)(l)}},87363:(e,n,t)=>{t.d(n,{K:()=>u,g:()=>d});var o=t(5057),l=t(55898),i=t.n(l),a=t(69163),r=t.n(a),c=t(96266);const s=(0,o.createContext)({});function d(e){let{children:n,type:t}=e;const[l,i]=(0,o.useState)([]),a=(0,o.useRef)([]),d=e=>{if(a.current.includes(e)){const n=a.current.filter((n=>n!==e));i(n),a.current=n}};return(0,c.jsx)(s.Provider,{value:{type:t,deletingBlocklets:l,addDeletingDid:e=>{if(!a.current.includes(e)){const n=[...a.current,e];i(n),a.current=n}},removeDeletingDid:d,matchDeletingDid:e=>{const n=l.filter((n=>e.find((e=>e===n))));r()(n,l).forEach((e=>d(e)))}},children:n})}function u(){return(0,o.useContext)(s)}d.propTypes={type:i().string,children:i().node.isRequired},d.defaultProps={type:"blocklets"}},69569:(e,n,t)=>{t.d(n,{Z:()=>c});var o,l=t(71171),i=t(33518);const a={success:"#3ab39d",error:"#D0021B"},r="10px",c=i.Z.div(o||(o=(0,l.Z)(["\n display: inline-block;\n min-width: ",";\n min-height: ",";\n background: ",";\n border-radius: 100%;\n"])),(e=>e.size||r),(e=>e.size||r),(e=>a[e.color]||e.color||a.success))},49522:(e,n,t)=>{t.d(n,{Z:()=>s});var o=t(6352),l=t.n(o),i=t(77277),a=t(58238),r=t(14491);const c=(e,n)=>{let t="?v=";var o;n?t+=(0,r.Qi)(n):t+="".concat(null===e||void 0===e||null===(o=e.meta)||void 0===o?void 0:o.version).concat((0,r.wS)(null===e||void 0===e?void 0:e.status)?"~":"");return t};function s(e){var n,t,o,r;let{blocklet:s}=e;const{inService:d}=(0,a.h6)(),u=null===(n=((null===s||void 0===s?void 0:s.environments)||[]).find((e=>e.key===i.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_SQUARE)))||void 0===n?void 0:n.value,m=null===(t=((null===s||void 0===s?void 0:s.environments)||[]).find((e=>e.key===i.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_RECT)))||void 0===t?void 0:t.value,p=null===(o=((null===s||void 0===s?void 0:s.environments)||[]).find((e=>e.key===i.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_FAVICON)))||void 0===o?void 0:o.value,v=(null===(r=window.env)||void 0===r?void 0:r.apiPrefix)||"/";return{logoUrl:l()(v,"/blocklet/logo/".concat(d?"":s.meta.did),c(s,u)),rectLogoUrl:l()(v,"/blocklet/logo-rect/".concat(d?"":s.meta.did),c(s,m)),faviconUrl:l()(v,"/blocklet/logo-favicon/".concat(d?"":s.meta.did),c(s,p))}}},22228:(e,n,t)=>{t.d(n,{Z:()=>r});var o=t(55898),l=t.n(o),i=t(19778),a=t(96266);function r(e){let{children:n,style:t,...o}=e;return(0,a.jsx)(i.Z,{style:t,...o,children:n})}r.propTypes={children:l().any.isRequired,style:l().object},r.defaultProps={style:{}}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[7020],{90067:(e,r,o)=>{o.d(r,{Z:()=>x});var t,a=o(31461),s=o(7896),n=o(5057),i=o(9978),l=o(82261),d=o(43070),c=o(38038),u=o(62773),m=o(6285),p=o(44029),f=o(42908),Z=o(96266);const h=["children","className","component","disabled","error","filled","focused","margin","required","variant"],b=(0,u.ZP)("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:o}=e;return[r.root,o.size&&r["size".concat((0,m.Z)(o.size))],o.contained&&r.contained,o.filled&&r.filled]}})((e=>{let{theme:r,ownerState:o}=e;return(0,s.Z)({color:(r.vars||r).palette.text.secondary},r.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,["&.".concat(p.Z.disabled)]:{color:(r.vars||r).palette.text.disabled},["&.".concat(p.Z.error)]:{color:(r.vars||r).palette.error.main}},"small"===o.size&&{marginTop:4},o.contained&&{marginLeft:14,marginRight:14})})),x=n.forwardRef((function(e,r){const o=(0,f.Z)({props:e,name:"MuiFormHelperText"}),{children:n,className:u,component:x="p"}=o,v=(0,a.Z)(o,h),w=(0,c.Z)(),k=(0,d.Z)({props:o,muiFormControl:w,states:["variant","size","disabled","error","filled","focused","required"]}),F=(0,s.Z)({},o,{component:x,contained:"filled"===k.variant||"outlined"===k.variant,variant:k.variant,size:k.size,disabled:k.disabled,error:k.error,filled:k.filled,focused:k.focused,required:k.required}),z=(e=>{const{classes:r,contained:o,size:t,disabled:a,error:s,filled:n,focused:i,required:d}=e,c={root:["root",a&&"disabled",s&&"error",t&&"size".concat((0,m.Z)(t)),o&&"contained",i&&"focused",n&&"filled",d&&"required"]};return(0,l.Z)(c,p.E,r)})(F);return(0,Z.jsx)(b,(0,s.Z)({as:x,ownerState:F,className:(0,i.Z)(z.root,u),ref:r},v,{children:" "===n?t||(t=(0,Z.jsx)("span",{className:"notranslate",children:"\u200b"})):n}))}))},44029:(e,r,o)=>{o.d(r,{E:()=>s,Z:()=>n});var t=o(46849),a=o(96036);function s(e){return(0,a.ZP)("MuiFormHelperText",e)}const n=(0,t.Z)("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"])},6041:(e,r,o)=>{o.d(r,{Z:()=>R});var t=o(31461),a=o(7896),s=o(5057),n=o(82261),i=o(9978),l=o(43070),d=o(38038),c=o(6285),u=o(42908),m=o(62773),p=o(46849),f=o(96036);function Z(e){return(0,f.ZP)("MuiFormLabel",e)}const h=(0,p.Z)("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]);var b=o(96266);const x=["children","className","color","component","disabled","error","filled","focused","required"],v=(0,m.ZP)("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,r)=>{let{ownerState:o}=e;return(0,a.Z)({},r.root,"secondary"===o.color&&r.colorSecondary,o.filled&&r.filled)}})((e=>{let{theme:r,ownerState:o}=e;return(0,a.Z)({color:(r.vars||r).palette.text.secondary},r.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",["&.".concat(h.focused)]:{color:(r.vars||r).palette[o.color].main},["&.".concat(h.disabled)]:{color:(r.vars||r).palette.text.disabled},["&.".concat(h.error)]:{color:(r.vars||r).palette.error.main}})})),w=(0,m.ZP)("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,r)=>r.asterisk})((e=>{let{theme:r}=e;return{["&.".concat(h.error)]:{color:(r.vars||r).palette.error.main}}})),k=s.forwardRef((function(e,r){const o=(0,u.Z)({props:e,name:"MuiFormLabel"}),{children:s,className:m,component:p="label"}=o,f=(0,t.Z)(o,x),h=(0,d.Z)(),k=(0,l.Z)({props:o,muiFormControl:h,states:["color","required","focused","disabled","error","filled"]}),F=(0,a.Z)({},o,{color:k.color||"primary",component:p,disabled:k.disabled,error:k.error,filled:k.filled,focused:k.focused,required:k.required}),z=(e=>{const{classes:r,color:o,focused:t,disabled:a,error:s,filled:i,required:l}=e,d={root:["root","color".concat((0,c.Z)(o)),a&&"disabled",s&&"error",i&&"filled",t&&"focused",l&&"required"],asterisk:["asterisk",s&&"error"]};return(0,n.Z)(d,Z,r)})(F);return(0,b.jsxs)(v,(0,a.Z)({as:p,ownerState:F,className:(0,i.Z)(z.root,m),ref:r},f,{children:[s,k.required&&(0,b.jsxs)(w,{ownerState:F,"aria-hidden":!0,className:z.asterisk,children:["\u2009","*"]})]}))}));var F=o(12823);const z=["disableAnimation","margin","shrink","variant","className"],q=(0,m.ZP)(k,{shouldForwardProp:e=>(0,m.FO)(e)||"classes"===e,name:"MuiInputLabel",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:o}=e;return[{["& .".concat(h.asterisk)]:r.asterisk},r.root,o.formControl&&r.formControl,"small"===o.size&&r.sizeSmall,o.shrink&&r.shrink,!o.disableAnimation&&r.animated,o.focused&&r.focused,r[o.variant]]}})((e=>{let{theme:r,ownerState:o}=e;return(0,a.Z)({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},o.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},"small"===o.size&&{transform:"translate(0, 17px) scale(1)"},o.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!o.disableAnimation&&{transition:r.transitions.create(["color","transform","max-width"],{duration:r.transitions.duration.shorter,easing:r.transitions.easing.easeOut})},"filled"===o.variant&&(0,a.Z)({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===o.size&&{transform:"translate(12px, 13px) scale(1)"},o.shrink&&(0,a.Z)({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},"small"===o.size&&{transform:"translate(12px, 4px) scale(0.75)"})),"outlined"===o.variant&&(0,a.Z)({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===o.size&&{transform:"translate(14px, 9px) scale(1)"},o.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))})),R=s.forwardRef((function(e,r){const o=(0,u.Z)({name:"MuiInputLabel",props:e}),{disableAnimation:s=!1,shrink:m,className:p}=o,f=(0,t.Z)(o,z),Z=(0,d.Z)();let h=m;"undefined"===typeof h&&Z&&(h=Z.filled||Z.focused||Z.adornedStart);const x=(0,l.Z)({props:o,muiFormControl:Z,states:["size","variant","required","focused"]}),v=(0,a.Z)({},o,{disableAnimation:s,formControl:Z,shrink:h,size:x.size,variant:x.variant,required:x.required,focused:x.focused}),w=(e=>{const{classes:r,formControl:o,size:t,shrink:s,disableAnimation:i,variant:l,required:d}=e,u={root:["root",o&&"formControl",!i&&"animated",s&&"shrink",t&&"normal"!==t&&"size".concat((0,c.Z)(t)),l],asterisk:[d&&"asterisk"]},m=(0,n.Z)(u,F.Y,r);return(0,a.Z)({},r,m)})(v);return(0,b.jsx)(q,(0,a.Z)({"data-shrink":h,ownerState:v,ref:r,className:(0,i.Z)(w.root,p)},f,{classes:w}))}))},12823:(e,r,o)=>{o.d(r,{Y:()=>s,Z:()=>n});var t=o(46849),a=o(96036);function s(e){return(0,a.ZP)("MuiInputLabel",e)}const n=(0,t.Z)("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"])},47020:(e,r,o)=>{o.d(r,{Z:()=>z});var t=o(7896),a=o(31461),s=o(5057),n=o(9978),i=o(82261),l=o(41366),d=o(62773),c=o(42908),u=o(49083),m=o(91877),p=o(12594),f=o(6041),Z=o(80576),h=o(90067),b=o(51177),x=o(13421),v=o(96266);const w=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],k={standard:u.Z,filled:m.Z,outlined:p.Z},F=(0,d.ZP)(Z.Z,{name:"MuiTextField",slot:"Root",overridesResolver:(e,r)=>r.root})({}),z=s.forwardRef((function(e,r){const o=(0,c.Z)({props:e,name:"MuiTextField"}),{autoComplete:s,autoFocus:d=!1,children:u,className:m,color:p="primary",defaultValue:Z,disabled:z=!1,error:q=!1,FormHelperTextProps:R,fullWidth:g=!1,helperText:S,id:y,InputLabelProps:P,inputProps:C,InputProps:M,inputRef:N,label:T,maxRows:I,minRows:L,multiline:W=!1,name:j,onBlur:A,onChange:H,onFocus:E,placeholder:O,required:B=!1,rows:_,select:V=!1,SelectProps:Y,type:D,value:G,variant:J="outlined"}=o,K=(0,a.Z)(o,w),Q=(0,t.Z)({},o,{autoFocus:d,color:p,disabled:z,error:q,fullWidth:g,multiline:W,required:B,select:V,variant:J}),U=(e=>{const{classes:r}=e;return(0,i.Z)({root:["root"]},x.I,r)})(Q);const X={};"outlined"===J&&(P&&"undefined"!==typeof P.shrink&&(X.notched=P.shrink),X.label=T),V&&(Y&&Y.native||(X.id=void 0),X["aria-describedby"]=void 0);const $=(0,l.Z)(y),ee=S&&$?"".concat($,"-helper-text"):void 0,re=T&&$?"".concat($,"-label"):void 0,oe=k[J],te=(0,v.jsx)(oe,(0,t.Z)({"aria-describedby":ee,autoComplete:s,autoFocus:d,defaultValue:Z,fullWidth:g,multiline:W,name:j,rows:_,maxRows:I,minRows:L,type:D,value:G,id:$,inputRef:N,onBlur:A,onChange:H,onFocus:E,placeholder:O,inputProps:C},X,M));return(0,v.jsxs)(F,(0,t.Z)({className:(0,n.Z)(U.root,m),disabled:z,error:q,fullWidth:g,ref:r,required:B,color:p,variant:J,ownerState:Q},K,{children:[null!=T&&""!==T&&(0,v.jsx)(f.Z,(0,t.Z)({htmlFor:$,id:re},P,{children:T})),V?(0,v.jsx)(b.Z,(0,t.Z)({"aria-describedby":ee,id:$,labelId:re,value:G,input:te},Y,{children:u})):te,S&&(0,v.jsx)(h.Z,(0,t.Z)({id:ee},R,{children:S}))]}))}))},13421:(e,r,o)=>{o.d(r,{I:()=>s,Z:()=>n});var t=o(46849),a=o(96036);function s(e){return(0,a.ZP)("MuiTextField",e)}const n=(0,t.Z)("MuiTextField",["root"])}}]);
|