@abtnode/blocklet-services 1.16.19 → 1.16.20-beta-cf6dfce1
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/api/libs/connect/shared.js +50 -21
- package/api/libs/connect/v1.js +2 -1
- package/api/routes/user.js +7 -3
- package/build/asset-manifest.json +25 -25
- package/build/index.html +1 -1
- package/build/service-worker.js +1 -1
- package/build/static/js/356.0210d3f8.chunk.js +2 -0
- package/build/static/js/{3979.f9a5aa48.chunk.js → 3979.2e0c92ff.chunk.js} +3 -3
- package/build/static/js/{4461.e1e5cd09.chunk.js → 4461.a64e7486.chunk.js} +2 -2
- package/build/static/js/5070.be5019aa.chunk.js +2 -0
- package/build/static/js/5403.56417480.chunk.js +3 -0
- package/build/static/js/5547.7468ef6a.chunk.js +3 -0
- package/build/static/js/{5683.b87f7ca2.chunk.js → 5683.cb2ab151.chunk.js} +2 -2
- package/build/static/js/6733.80a6ecbd.chunk.js +2 -0
- package/build/static/js/{6771.920fa5b6.chunk.js → 6771.c9706b0b.chunk.js} +3 -3
- package/build/static/js/7006.9a659b1f.chunk.js +2 -0
- package/build/static/js/{8944.f4f91564.chunk.js → 8944.6d336f28.chunk.js} +2 -2
- package/build/static/js/main.606a579e.js +3 -0
- package/build/static/js/{main.cca60152.js.LICENSE.txt → main.606a579e.js.LICENSE.txt} +1 -1
- package/package.json +34 -34
- package/build/static/js/356.df75c406.chunk.js +0 -2
- package/build/static/js/5047.2f665ae5.chunk.js +0 -2
- package/build/static/js/5070.5979037b.chunk.js +0 -2
- package/build/static/js/5403.1ee6610b.chunk.js +0 -3
- package/build/static/js/5547.2b981673.chunk.js +0 -3
- package/build/static/js/7006.bb90b167.chunk.js +0 -2
- package/build/static/js/main.cca60152.js +0 -3
- /package/build/static/js/{3979.f9a5aa48.chunk.js.LICENSE.txt → 3979.2e0c92ff.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{5403.1ee6610b.chunk.js.LICENSE.txt → 5403.56417480.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{5547.2b981673.chunk.js.LICENSE.txt → 5547.7468ef6a.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{6771.920fa5b6.chunk.js.LICENSE.txt → 6771.c9706b0b.chunk.js.LICENSE.txt} +0 -0
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.16.
|
|
6
|
+
"version": "1.16.20-beta-cf6dfce1",
|
|
7
7
|
"description": "Provide unified services for every blocklet",
|
|
8
8
|
"main": "api/index.js",
|
|
9
9
|
"files": [
|
|
@@ -33,34 +33,34 @@
|
|
|
33
33
|
"author": "wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)",
|
|
34
34
|
"license": "Apache-2.0",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@abtnode/analytics": "1.16.
|
|
37
|
-
"@abtnode/auth": "1.16.
|
|
38
|
-
"@abtnode/client": "1.16.
|
|
39
|
-
"@abtnode/connect-storage": "1.16.
|
|
40
|
-
"@abtnode/constant": "1.16.
|
|
41
|
-
"@abtnode/core": "1.16.
|
|
42
|
-
"@abtnode/cron": "1.16.
|
|
43
|
-
"@abtnode/logger": "1.16.
|
|
44
|
-
"@abtnode/models": "1.16.
|
|
45
|
-
"@abtnode/router-templates": "1.16.
|
|
46
|
-
"@abtnode/util": "1.16.
|
|
47
|
-
"@arcblock/did": "^1.18.
|
|
48
|
-
"@arcblock/did-auth": "1.18.
|
|
49
|
-
"@arcblock/did-ext": "^1.18.
|
|
50
|
-
"@arcblock/event-hub": "1.18.
|
|
36
|
+
"@abtnode/analytics": "1.16.20-beta-cf6dfce1",
|
|
37
|
+
"@abtnode/auth": "1.16.20-beta-cf6dfce1",
|
|
38
|
+
"@abtnode/client": "1.16.20-beta-cf6dfce1",
|
|
39
|
+
"@abtnode/connect-storage": "1.16.20-beta-cf6dfce1",
|
|
40
|
+
"@abtnode/constant": "1.16.20-beta-cf6dfce1",
|
|
41
|
+
"@abtnode/core": "1.16.20-beta-cf6dfce1",
|
|
42
|
+
"@abtnode/cron": "1.16.20-beta-cf6dfce1",
|
|
43
|
+
"@abtnode/logger": "1.16.20-beta-cf6dfce1",
|
|
44
|
+
"@abtnode/models": "1.16.20-beta-cf6dfce1",
|
|
45
|
+
"@abtnode/router-templates": "1.16.20-beta-cf6dfce1",
|
|
46
|
+
"@abtnode/util": "1.16.20-beta-cf6dfce1",
|
|
47
|
+
"@arcblock/did": "^1.18.103",
|
|
48
|
+
"@arcblock/did-auth": "1.18.103",
|
|
49
|
+
"@arcblock/did-ext": "^1.18.103",
|
|
50
|
+
"@arcblock/event-hub": "1.18.103",
|
|
51
51
|
"@arcblock/http-proxy": "^1.19.1",
|
|
52
|
-
"@arcblock/jwt": "1.18.
|
|
53
|
-
"@arcblock/validator": "^1.18.
|
|
54
|
-
"@arcblock/ws": "1.18.
|
|
55
|
-
"@blocklet/constant": "1.16.
|
|
52
|
+
"@arcblock/jwt": "1.18.103",
|
|
53
|
+
"@arcblock/validator": "^1.18.103",
|
|
54
|
+
"@arcblock/ws": "1.18.103",
|
|
55
|
+
"@blocklet/constant": "1.16.20-beta-cf6dfce1",
|
|
56
56
|
"@blocklet/form-builder": "^0.1.11",
|
|
57
57
|
"@blocklet/form-collector": "^0.1.6",
|
|
58
|
-
"@blocklet/meta": "1.16.
|
|
59
|
-
"@blocklet/sdk": "1.16.
|
|
58
|
+
"@blocklet/meta": "1.16.20-beta-cf6dfce1",
|
|
59
|
+
"@blocklet/sdk": "1.16.20-beta-cf6dfce1",
|
|
60
60
|
"@did-connect/authenticator": "^2.2.1",
|
|
61
61
|
"@did-connect/relay-adapter-express": "^2.2.1",
|
|
62
|
-
"@ocap/client": "1.18.
|
|
63
|
-
"@ocap/util": "1.18.
|
|
62
|
+
"@ocap/client": "1.18.103",
|
|
63
|
+
"@ocap/util": "1.18.103",
|
|
64
64
|
"@react-email/components": "^0.0.6",
|
|
65
65
|
"auth0": "^3.3.0",
|
|
66
66
|
"body-parser": "^1.20.1",
|
|
@@ -96,21 +96,21 @@
|
|
|
96
96
|
},
|
|
97
97
|
"resolutions": {},
|
|
98
98
|
"devDependencies": {
|
|
99
|
-
"@abtnode/ux": "1.16.
|
|
100
|
-
"@arcblock/did-connect": "^2.8.
|
|
101
|
-
"@arcblock/icons": "^2.8.
|
|
102
|
-
"@arcblock/ux": "^2.8.
|
|
103
|
-
"@blocklet/launcher-layout": "2.2.
|
|
104
|
-
"@blocklet/tracker": "1.16.
|
|
105
|
-
"@blocklet/ui-react": "^2.8.
|
|
99
|
+
"@abtnode/ux": "1.16.20-beta-cf6dfce1",
|
|
100
|
+
"@arcblock/did-connect": "^2.8.20",
|
|
101
|
+
"@arcblock/icons": "^2.8.20",
|
|
102
|
+
"@arcblock/ux": "^2.8.20",
|
|
103
|
+
"@blocklet/launcher-layout": "2.2.46",
|
|
104
|
+
"@blocklet/tracker": "1.16.20-beta-cf6dfce1",
|
|
105
|
+
"@blocklet/ui-react": "^2.8.20",
|
|
106
106
|
"@emotion/react": "^11.10.4",
|
|
107
107
|
"@emotion/styled": "^11.10.4",
|
|
108
108
|
"@iconify/iconify": "^2.2.1",
|
|
109
109
|
"@mui/icons-material": "^5.14.9",
|
|
110
110
|
"@mui/material": "^5.14.10",
|
|
111
111
|
"@mui/styles": "^5.14.10",
|
|
112
|
-
"@ocap/mcrypto": "1.18.
|
|
113
|
-
"@ocap/wallet": "1.18.
|
|
112
|
+
"@ocap/mcrypto": "1.18.103",
|
|
113
|
+
"@ocap/wallet": "1.18.103",
|
|
114
114
|
"ahooks": "^3.7.1",
|
|
115
115
|
"axios": "^0.27.2",
|
|
116
116
|
"copy-webpack-plugin": "^11.0.0",
|
|
@@ -172,5 +172,5 @@
|
|
|
172
172
|
"url": "https://github.com/ArcBlock/blocklet-server/issues",
|
|
173
173
|
"email": "shijun@arcblock.io"
|
|
174
174
|
},
|
|
175
|
-
"gitHead": "
|
|
175
|
+
"gitHead": "bc2f0c9c5a39b124c7a7b64ec907527b3e8ccdf1"
|
|
176
176
|
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_abtnode_blocklet_services=self.webpackChunk_abtnode_blocklet_services||[]).push([[356],{70998:function(e,n,t){t.d(n,{Z:function(){return x}});var o=t(33028),l=t(59740),r=t(24974),i=t.n(r),c=t(59467),a=t(62399),s=t(19611),d=t.n(s),u=t(20244),p=t(41395),m=t(24891);var h=t(37574),f=["blocklet","style","size","ancestors"];function x(e){var n=e.blocklet,t=e.style,r=e.size,i=e.ancestors,s=(0,l.Z)(e,f),x=(0,p.h6)(),b=function(e){var n,t=e.blocklet,o=e.ancestors,l=void 0===o?[]:o,r=(0,p.h6)(),i=r.inService,c="?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)?"~":""),a=i?d()(m.zn,u.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo-bundle",c):d()(r.imgPrefix,"blocklet.png");if("registry"===t.source&&t.deployedFrom&&t.meta.logo)a=d()(t.deployedFrom,(0,m.lk)(t.meta.bundleDid,t.meta.logo),c);else{var s=window.env.apiPrefix||"/",h=l.concat(t),f=i?h.slice(1):h;a=d()(s,"/blocklet/logo-bundle".concat(f.map((function(e){return"/".concat(e.meta.did)})).join("")),c)}return{logoUrl:a,inService:i}}({blocklet:n,ancestors:i}),v=b.logoUrl,Z=b.inService,j=s.variant,g=Z?function(){}:function(e){e.target.src="".concat(x.imgPrefix,"/blocklet.png")},k=(0,h.jsx)("img",{src:v,onError:g,alt:n.meta.name,style:{width:r}});return n.meta.logo||(k=(0,h.jsx)(a.Z,{did:n.meta.did||"",responsive:!0})),(0,h.jsx)(c.Z,(0,o.Z)((0,o.Z)({variant:j||"square",style:Object.assign({backgroundColor:"transparent",width:r,height:r,borderRadius:10},t)},s),{},{children:k}))}x.propTypes={blocklet:i().object.isRequired,style:i().object,size:i().oneOfType([i().number,i().string]),ancestors:i().array},x.defaultProps={style:{},size:40,ancestors:[]}},60356:function(e,n,t){t.r(n),t.d(n,{default:function(){return Ye}});var o=t(71171),l=t(30969),r=t(24974),i=t.n(r),c=t(30734),a=t(16380),s=t(38361),d=t(45008),u=t(96234),p=t(86822),m=t(26022),h=t(94551),f=t(10814),x=t(2291),b=t(29996),v=t(1986),Z=t(9715),j=t(16438),g=t(41395),k=t(33028),y=t(59740),T=t(94308),I=t(37574),E=["size"];function P(e){var n=e.size,t=(0,y.Z)(e,E);return(0,I.jsx)(s.Z,(0,k.Z)((0,k.Z)({display:"flex",mt:4},t),{},{children:(0,I.jsx)(T.Z,{size:n})}))}P.propTypes={size:i().number},P.defaultProps={size:24};var S,R=t(36558),C=t(8479),N=t(70998);function w(){var e=(0,m.PE)(),n=e.t,t=e.locale,o=(0,g.h6)().api,r=(0,l.useState)(!0),i=(0,u.Z)(r,2),a=i[0],k=i[1],y=(0,d.y0)().blocklet,T=(0,l.useState)(null),E=(0,u.Z)(T,2),S=E[0],w=E[1],z=(0,c.useParams)().componentDid,B=void 0===z?"":z,A=(0,l.useState)(null),L=(0,u.Z)(A,2),O=L[0],D=L[1],V=function(){o.getProjects({input:{did:y.meta.did,componentDid:B}}).then((function(e){var n=(null===e||void 0===e?void 0:e.projects)||[];k(!1),D(n)})).catch((function(e){k(!1),v.Z.error(e.message)}))};if((0,l.useEffect)((function(){V()}),[]),!O&&a)return(0,I.jsx)(P,{});if(!O)return null;if(!O.length)return(0,I.jsxs)(s.Z,{display:"flex",flexDirection:"column",alignItems:"center",pt:10,children:[(0,I.jsx)(s.Z,{sx:{fontSize:20,fontWeight:"bold",mb:3},children:n("blocklet.publish.blockletEmptyTip")}),(0,I.jsx)(s.Z,{sx:{fontSize:14,color:"text.secondary",mb:3},children:n("blocklet.publish.createBlockletTip")}),(0,I.jsx)(p.rU,{to:"create",children:(0,I.jsx)(b.Z,{variant:"contained",children:n("blocklet.publish.createBlocklet")})})]});var W=[{label:"Blocklet",name:"blockletTitle",options:{customBodyRenderLite:function(e){var n=O[e];return(0,I.jsx)(p.rU,{to:"".concat(n.id),children:n.blockletTitle||"/"})}}},{label:"DID",name:"blockletDid",options:{customBodyRender:function(e){return(0,I.jsx)(R.Z,{size:14,responsive:!0,did:e})}}},{label:"Version",name:"blockletVersion",options:{customBodyRender:function(e){return e?(0,I.jsx)(Z.Z,{type:"success",children:e}):""}}},B?null:{label:n("common.scope"),name:"componentDid",options:{customBodyRender:function(e){var n=(y.children||[]).find((function(n){return n.meta.did===e}));return n?(0,I.jsxs)(s.Z,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[(0,I.jsx)(N.Z,{size:14,blocklet:n,ancestors:[y]}),(0,I.jsx)(s.Z,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:n.meta.title})]},e):""}}},{label:n("common.updatedAt"),name:"updatedAt",options:{customBodyRender:function(e){return(0,I.jsx)(j.Z,{value:Number(e),locale:t})}}},{label:n("common.actions"),name:"actions",options:{customBodyRenderLite:function(e){var n=O[e];return(0,I.jsx)(s.Z,{display:"flex",children:(0,I.jsx)(h.Z,{color:"error","aria-label":"delete",onClick:function(){return function(e){w(e)}(n)},children:(0,I.jsx)(f.default,{sx:{fontSize:18}})})})}}}].filter(Boolean);return(0,I.jsxs)(_,{children:[(0,I.jsx)(s.Z,{sx:{textAlign:"right"},children:(0,I.jsx)(p.rU,{to:"create",children:(0,I.jsx)(b.Z,{variant:"contained",children:n("blocklet.publish.createBlocklet")})})}),(0,I.jsx)(x.Z,{className:"main-table",locale:t,data:O,columns:W,options:{sort:!1,download:!1,filter:!1,print:!1,search:!1}}),S&&(0,I.jsx)(C.Z,{title:"".concat(n("common.delete")," ").concat(S.blockletTitle),description:n("blocklet.publish.deleteBlockletTip"),confirm:n("common.confirm"),onConfirm:function(){k(!1);var e=S.id;o.deleteProject({input:{did:y.meta.did,projectId:e}}).then((function(){k(!1),V(),v.Z.success(n("common.removeSuccess")),w(null)})).catch((function(e){k(!1),v.Z.error(e.message)}))},onCancel:function(){return w(null)}})]})}w.propTypes={};var z,_=(0,a.Z)(s.Z)(S||(S=(0,o.Z)(["\n .main-table > div:first-child {\n display: none;\n }\n"]))),B=t(33665),A=t(2689),L=t(87006),O=t(33359),D=t(15012),V=t(4953),W=t(26328),U=t(77370),M=[{label:{en:"Resource",zh:"\u8d44\u6e90"},value:"resource"},{label:{en:"Application",zh:"\u5e94\u7528"},value:"pack",disabled:!0}];function F(e){var n=Object.assign({},((0,B.Z)(e),e)),t=(0,c.useNavigate)(),o=(0,m.PE)(),r=o.t,i=o.locale,a=(0,d.y0)().blocklet,h=(0,l.useState)(""),f=(0,u.Z)(h,2),x=f[0],Z=f[1],j=(0,l.useState)(!1),y=(0,u.Z)(j,2),T=y[0],E=y[1],P=(0,l.useState)("resource"),S=(0,u.Z)(P,2),R=S[0],C=S[1],N=(0,U.T)().api,w=(0,g.h6)().api,z=(0,l.useState)(),_=(0,u.Z)(z,2),F=_[0],q=_[1],X=(0,l.useState)(!1),H=(0,u.Z)(X,2),K=H[0],G=H[1],Q=(0,c.useParams)().componentDid,Y=void 0===Q?"":Q;return(0,I.jsxs)(J,(0,k.Z)((0,k.Z)({},n),{},{children:[(0,I.jsxs)(D.Z,{className:"breadcrumbs","aria-label":"breadcrumb",children:[(0,I.jsx)(p.rU,{to:"..",children:r("common.publish")}),(0,I.jsxs)(O.Z,{color:"text.primary",children:[r("common.create")," Blocklet"]})]}),(0,I.jsxs)(s.Z,{style:{maxWidth:500},children:[(0,I.jsx)(L.Z,{required:!0,sx:{mb:4},label:"Blocklet DID",fullWidth:!0,readonly:!0,autoComplete:"off",variant:"outlined",onClick:function(){return!F&&G(!0)},InputProps:{"data-cy":"export-blocklet-did",endAdornment:(0,I.jsx)(V.Z,{position:"end",children:(0,I.jsx)(b.Z,{onClick:function(){return G(!0)},children:r(F?"common.update":"common.create")})})},helperText:"",value:F||""}),K&&(0,I.jsx)(W.Z,{open:!0,popup:!0,onClose:function(){return G(!1)},action:"gen-blocklet-key-pair",locale:i,checkFn:N.get,saveConnect:!1,forceConnected:!1,checkTimeout:3e5,onSuccess:function(e){var n,t=null===e||void 0===e||null===(n=e.blockletWallet)||void 0===n?void 0:n.address;t?q(t):v.Z.error("Empty Blocklet DID"),G(!1)},onError:function(e){v.Z.error(e.message),G(!1)},extraParams:{did:a.meta.did},messages:{title:r("blocklet.publish.connect.title"),scan:r("blocklet.publish.connect.scan"),confirm:r("blocklet.publish.connect.confirm"),success:r("blocklet.publish.connect.success")}}),(0,I.jsx)(L.Z,{required:!0,label:"Blocklet ".concat(r("common.title")),autoComplete:"off",variant:"outlined",InputProps:{"data-cy":"export-blocklet-title"},fullWidth:!0,helperText:"",value:x||"",onChange:function(e){Z(e.target.value)}}),(0,I.jsx)(L.Z,{sx:{my:4},id:"blocklet-type",select:!0,label:"Blocklet ".concat(r("common.type")),helperText:"",fullWidth:!0,value:R,onChange:function(e){return C(e.target.value)},children:M.map((function(e){return(0,I.jsx)(A.Z,{value:e.value,disabled:e.disabled,children:e.label[i]||e.label.en},e.value)}))})]}),(0,I.jsx)(b.Z,{variant:"contained",disabled:T,onClick:function(){F?x?(E(!0),w.createProject({input:{did:a.meta.did,blockletTitle:x||"",blockletDid:F,type:R,componentDid:Y}}).then((function(){E(!1),t("../",{replace:!0})})).catch((function(e){E(!1),v.Z.error(e.message)}))):v.Z.error(r("blocklet.publish.errorTip.noTitle")):v.Z.error(r("blocklet.publish.errorTip.noDid"))},children:r("common.create")})]}))}F.propTypes={},F.defaultProps={};var q,J=a.Z.div(z||(z=(0,o.Z)(["\n .breadcrumbs {\n margin-bottom: 24px;\n }\n"]))),X=t(19611),H=t.n(X),K=t(70093),G=t.n(K),Q=t(32677),Y=t(20244),$=t(59505);function ee(){var e=(0,m.PE)(),n=e.t,t=e.locale,o=(0,c.useParams)().projectId,r=(0,g.h6)().api,i=(0,l.useState)(!0),a=(0,u.Z)(i,2),k=a[0],y=a[1],T=(0,d.y0)().blocklet,E=(0,l.useState)(null),S=(0,u.Z)(E,2),R=S[0],N=S[1],w=(0,l.useState)(null),z=(0,u.Z)(w,2),_=z[0],B=z[1],A=(0,l.useState)(null),L=(0,u.Z)(A,2),V=L[0],W=L[1];(0,l.useEffect)((function(){r.doBatchQuery({getProject:{input:{did:T.meta.did,projectId:o}},getReleases:{input:{did:T.meta.did,projectId:o}}}).then((function(e){B(e.getProject.project||{}),N(e.getReleases.releases||[]),y(!1)})).catch((function(e){y(!1),v.Z.error(e.message)}))}),[]);if(!R&&k)return(0,I.jsx)(P,{});if(!R)return null;var U=(0,I.jsxs)(D.Z,{className:"breadcrumbs","aria-label":"breadcrumb",children:[(0,I.jsx)(p.rU,{to:"..",children:n("common.publish")}),(0,I.jsx)(O.Z,{color:"text.primary",children:_.blockletTitle})]});if(!R.length)return(0,I.jsxs)(I.Fragment,{children:[U,(0,I.jsxs)(s.Z,{display:"flex",flexDirection:"column",alignItems:"center",pt:10,children:[(0,I.jsx)(s.Z,{sx:{fontSize:20,fontWeight:"bold",mb:3},children:n("blocklet.publish.releaseEmptyTip")}),(0,I.jsx)(s.Z,{sx:{fontSize:14,color:"text.secondary",mb:3},children:n("blocklet.publish.createReleaseTip")}),(0,I.jsx)(p.rU,{to:"create",children:(0,I.jsx)(b.Z,{variant:"contained",children:n("blocklet.publish.createRelease")})})]})]});var M=[{label:n("common.version"),name:"blockletVersion",options:{customBodyRenderLite:function(e){var n=R[e];return(0,I.jsx)(p.rU,{to:"".concat(n.id),children:n.blockletVersion||"/"})}}},{label:n("blocklet.publish.releaseNote"),name:"note",options:{customBodyRenderLite:function(e){var n=R[e];return(0,I.jsx)(O.Z,{className:"note",children:n.note||""})}}},{label:n("common.status"),name:"status",options:{customBodyRender:function(e){return(0,I.jsx)(Z.Z,{type:"published"===e?"success":"warning",children:G()(e)})}}},{label:n("common.lastPublishedAt"),name:"updatedAt",options:{customBodyRenderLite:function(e){var n=R[e];return n.status!==$.PROJECT.RELEASE_STATUS.published?"":(0,I.jsx)(j.Z,{value:Number(n.updatedAt),locale:t})}}},{label:n("common.actions"),name:"actions",options:{customBodyRenderLite:function(e){var n=R[e];return(0,I.jsxs)(s.Z,{display:"flex",alignItems:"center",children:[(0,I.jsx)(h.Z,{color:"primary","aria-label":"download",disabled:"published"!==n.status,children:"published"===n.status?(0,I.jsx)("a",{style:{display:"flex"},href:H()("".concat(Y.WELLKNOWN_SERVICE_PATH_PREFIX,"/api/project/").concat(T.meta.did,"/").concat(_.id,"/").concat(n.id,"/download/").concat((n.files||[])[0])),children:(0,I.jsx)(Q.Z,{sx:{fontSize:18}})}):(0,I.jsx)(Q.Z,{sx:{fontSize:18}})}),(0,I.jsx)(h.Z,{color:"error","aria-label":"delete",onClick:function(){return function(e){W(e)}(n)},children:(0,I.jsx)(f.default,{sx:{fontSize:18}})})]})}}}];return(0,I.jsxs)(te,{children:[(0,I.jsxs)(s.Z,{className:"header",children:[U,(0,I.jsx)(p.rU,{to:"create",children:(0,I.jsx)(b.Z,{variant:"contained",children:n("blocklet.publish.createRelease")})})]}),(0,I.jsx)(x.Z,{className:"main-table",verticalKeyWidth:100,locale:t,data:R,columns:M,options:{sort:!1,download:!1,filter:!1,print:!1,search:!1}}),V&&(0,I.jsx)(C.Z,{title:n("".concat(n("common.delete")," ").concat(V.blockletVersion)),description:n("blocklet.publish.deleteReleaseTip"),confirm:n("common.confirm"),onConfirm:function(){y(!1);var e=V.id;r.deleteRelease({input:{did:T.meta.did,projectId:o,releaseId:e}}).then((function(){y(!1),r.getReleases({input:{did:T.meta.did,projectId:o}}).then((function(e){var n=(null===e||void 0===e?void 0:e.releases)||[];y(!1),N(n)})).catch((function(e){y(!1),v.Z.error(e.message)})),v.Z.success(n("common.removeSuccess")),W(null)})).catch((function(e){y(!1),v.Z.error(e.message)}))},onCancel:function(){return W(null)}})]})}ee.propTypes={};var ne,te=(0,a.Z)(s.Z)(q||(q=(0,o.Z)(["\n .header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n }\n .main-table > div:first-child {\n display: none;\n }\n .note {\n word-break: break-all;\n white-space: pre-line;\n }\n"]))),oe=t(68079),le=t(56666),re=t(43178),ie=t(49735),ce=t.n(ie),ae=t(60451),se=t.n(ae),de=t(59467),ue=t(30291),pe=t(78789),me=t(19865),he=t(24891),fe=t(32723),xe=t(34795),be=t(65667),ve=t.n(be),Ze=t(92522),je=t.n(Ze),ge=t(49884),ke=t(24837),ye=t(7418),Te=t(88876),Ie=t(23038),Ee=t(52838),Pe=t(16374),Se=t(96628),Re=["data"];function Ce(e){var n=e.data,t=(0,y.Z)(e,Re);return n&&n.length?(0,I.jsx)(we,(0,k.Z)((0,k.Z)({},t),{},{children:n.map((function(e){return(0,I.jsx)("a",{href:e.url,target:"_blank",rel:"noreferrer",children:(0,I.jsx)("img",{src:e.url,alt:e.alt||""})},e.url)}))})):null}Ce.propTypes={data:i().arrayOf(i().shape({url:i().string,alt:i().string}))},Ce.defaultProps={data:[]};var Ne,we=(0,a.Z)(s.Z)(ne||(ne=(0,o.Z)(["\n display: flex;\n justify-content: flex-start;\n flex-wrap: wrap;\n margin-bottom: -12px;\n a {\n display: flex;\n }\n img {\n height: 128px;\n cursor: pointer;\n margin-right: 12px;\n margin-bottom: 12px;\n }\n"]))),ze=function(e,n){for(var t=(0,oe.Z)(e);t.length>0;){var o=t.shift();if(o.id===n)return o;o.children&&t.push.apply(t,(0,oe.Z)(o.children))}return[]};function _e(e){var n=e.icon;return n?je()(n)?(0,I.jsx)("img",{className:"resource-icon",src:n,alt:"icon"}):(0,I.jsx)(Se.JO,{className:"resource-icon",icon:n}):null}function Be(e){var n=e.disabled,t=e.data,o=e.onChange,l=e.value;function r(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return n.push(e.id),e.children&&e.children.forEach((function(e){return r(e,n)})),n}var i=function(e){return r(ze(t,e))},c=function e(n){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],l=ze(t,n);return l.parent?(o.push(l.parent),e(l.parent,o)):o};function a(e,n){var t=i(e.id),o=t.indexOf(e.id);return t.splice(o,1),t.every((function(e){return l.concat(n).includes(e)}))}var d=function(e,n){e.stopPropagation();var r=i(n),s=c(n);if(l.includes(n)){var d=l.filter((function(e){return!r.concat(s).includes(e)}));o(d)}else{for(var u=r,p=0;p<s.length;++p)a(ze(t,s[p]),u)&&u.push(s[p]);o((0,oe.Z)(l).concat(u))}},u=function(e){e.stopPropagation()},p=t.some((function(e){var n;return(null===(n=e.children)||void 0===n?void 0:n.length)>0})),m=function e(t){var o;return(0,I.jsx)(ye.Z,{nodeId:t.id,label:(0,I.jsx)(ge.Z,{onClick:u,control:(0,I.jsx)(Te.Z,{size:"small",checked:-1!==l.indexOf(t.id),tabIndex:-1,disableRipple:!0,onClick:function(e){return d(e,t.id)},disabled:n}),label:(0,I.jsxs)(s.Z,{className:"content",children:[(0,I.jsxs)(s.Z,{display:"flex",alignItems:"center",children:[t.icon&&(0,I.jsx)(_e,{icon:t.icon}),(0,I.jsx)(s.Z,{className:"name",children:t.name}),t.url&&(0,I.jsx)("a",{href:t.url,target:"_blank",rel:"noreferrer",className:"link",children:(0,I.jsx)(Pe.Z,{className:"link-icon"})})]}),!!t.description&&(0,I.jsx)(s.Z,{className:"description",children:t.description}),!(null===(o=t.images)||void 0===o||!o.length)&&(0,I.jsx)(Ce,{className:"images",data:t.images})]})}),children:Array.isArray(t.children)?t.children.map(e):null},t.id)};return(0,I.jsx)(Le,{className:ve()(!p&&"no-children"),multiSelect:!0,defaultCollapseIcon:(0,I.jsx)(Ie.Z,{}),defaultExpandIcon:(0,I.jsx)(Ee.default,{}),selected:l,children:t.map((function(e){return m(e)}))})}_e.propTypes={icon:i().string},_e.defaultProps={icon:""},Be.propTypes={data:i().array,value:i().array,onChange:i().func,disabled:i().bool},Be.defaultProps={data:[],value:[],onChange:function(){},disabled:!1};var Ae,Le=(0,a.Z)(ke.Z)(Ne||(Ne=(0,o.Z)(["\n &.no-children {\n .MuiTreeItem-content {\n padding: 0;\n .MuiTreeItem-iconContainer {\n display: none;\n }\n .MuiTreeItem-label {\n padding-left: 0;\n }\n }\n }\n .MuiTreeItem-content {\n align-items: flex-start;\n .MuiTreeItem-iconContainer {\n transform: translateY(10px);\n }\n &.Mui-selected {\n background-color: transparent;\n }\n }\n .MuiTreeItem-label {\n cursor: default;\n }\n .MuiFormControlLabel-root {\n align-items: flex-start;\n }\n .content {\n padding-top: 6px;\n }\n .name {\n font-size: 16px;\n font-weight: 700;\n }\n .resource-icon {\n margin-right: 2px;\n font-size: 16px;\n }\n img.resource-icon {\n width: 1rem;\n height: 1rem;\n }\n .link {\n margin-left: 8px;\n font-size: 16px;\n color: ",";\n display: flex;\n }\n .link-icon {\n font-size: inherit;\n }\n .description {\n font-size: 14px;\n color: ",";\n }\n"])),(function(e){return e.theme.palette.primary.main}),(function(e){return e.theme.palette.text.secondary})),Oe=t(54559),De=function e(n,t){return n.forEach((function(n){t&&(n.parent=t),(n.children||[]).forEach((function(t){t.parent=n.id,e(t.children||[],t.id)}))})),n};function Ve(e){var n=e.app,t=e.component,o=e.projectId,r=e.release,i=(0,m.PE)(),c=i.t,a=i.locale,d=(0,g.h6)().api,p=(0,l.useState)([]),h=(0,u.Z)(p,2),f=h[0],x=h[1],Z=(0,l.useState)([]),j=(0,u.Z)(Z,2),k=j[0],y=j[1],T=(0,l.useState)(!1),E=(0,u.Z)(T,2),P=E[0],S=E[1],R=r.id,C="published"===r.status,N=((null===t||void 0===t?void 0:t.meta.capabilities)||{}).resourceExportApi,w=void 0===N?"/":N,z=new URL(H()("http://127.0.0.1",t.mountPoint,w||"/").replace(/\/+/g,"/"));z.searchParams.set("projectId",o),z.searchParams.set("releaseId",R),z.searchParams.set("local",a);var _="".concat(z.pathname).concat(z.search),B=function(){var e=(0,xe.Z)((0,fe.Z)().mark((function e(l){return(0,fe.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,d.updateSelectedResources({input:{did:n.meta.did,projectId:o,releaseId:R,componentDid:t.meta.did,resources:l}});case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),v.Z.error(e.t0.message);case 8:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(n){return e.apply(this,arguments)}}(),A=function(){var e=(0,xe.Z)((0,fe.Z)().mark((function e(){var n;return(0,fe.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=k,e.prev=1,S(!0),e.next=5,Oe.od.post(_,{resources:n,projectId:o,releaseId:R,locale:a});case 5:v.Z.success(c("common.saveSuccess")),S(!1),B(k),e.next=14;break;case 10:e.prev=10,e.t0=e.catch(1),S(!1),v.Z.error(e.t0.message);case 14:case"end":return e.stop()}}),e,null,[[1,10]])})));return function(){return e.apply(this,arguments)}}();return(0,l.useEffect)((function(){Oe.od.get(_).then((function(e){var n,t=De((null===(n=e.data)||void 0===n?void 0:n.resources)||[]);x(t)})).catch((function(e){v.Z.error(e.message)})),d.getSelectedResources({input:{did:n.meta.did,projectId:o,releaseId:R,componentDid:t.meta.did}}).then((function(e){var n=(null===e||void 0===e?void 0:e.resources)||[];y(n)})).catch((function(e){v.Z.error(e.message)}))}),[_]),"running"!==t.status?(0,I.jsx)(Ue,{children:(0,I.jsx)(s.Z,{pt:6,children:c("blocklet.publish.componentNotRunning",{name:t.meta.title})})}):(0,I.jsx)(Ue,{children:(0,I.jsxs)(s.Z,{children:[(0,I.jsx)(Be,{data:f,value:k,onChange:function(e){y(e)},disabled:P||C}),!C&&(0,I.jsx)(s.Z,{className:"footer",children:(0,I.jsx)(b.Z,{variant:"contained",disabled:P,onClick:function(){return A()},children:c("common.save")})})]})})}Ve.propTypes={component:i().object.isRequired,app:i().object.isRequired,projectId:i().string.isRequired,release:i().shape({id:i().string.isRequired,status:i().string})},Ve.defaultProps={release:{id:""}};var We,Ue=(0,a.Z)(s.Z)(Ae||(Ae=(0,o.Z)(["\n border: 1px solid #ccc;\n border-radius: 4px;\n padding: 16px;\n padding-bottom: 0px;\n max-height: 600px;\n overflow-y: auto;\n .footer {\n border-top: 1px solid #ddd;\n display: flex;\n padding: 12px 0;\n margin-top: 12px;\n position: sticky;\n bottom: 0;\n background: #fff;\n }\n"]))),Me=["image/*",".jpg",".jpeg",".png",".gif",".svg"],Fe=10485760,qe=(0,l.lazy)((function(){return Promise.all([t.e(4917),t.e(5547)]).then(t.bind(t,25547)).then((function(e){return{default:e.Uploader}}))})),Je=function(e,n,t){var o=[];return e.blockletTitle||o.push({param:"blockletTitle",message:t("blocklet.publish.errorTip.noTitle")}),e.blockletVersion?se().valid(e.blockletVersion)||o.push({param:"blockletVersion",message:"Invalid Blocklet Version"}):o.push({param:"blockletVersion",message:t("blocklet.publish.errorTip.noVersion")}),n===$.PROJECT.RELEASE_STATUS.published&&(e.blockletDescription||o.push({param:"blockletDescription",message:t("blocklet.publish.errorTip.noDescription")}),e.note||o.push({param:"note",message:t("blocklet.publish.errorTip.noNote")})),o.length?o:null},Xe=function(e){var n=e.tabs,t=e.blocklet,o=e.ancestors,l=void 0===o?[]:o,r=t.meta.did;n.push({label:(0,I.jsxs)(s.Z,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[(0,I.jsx)(N.Z,{size:24,blocklet:t,ancestors:l}),(0,I.jsx)(s.Z,{ml:"4px",className:"text",children:(0,I.jsx)(s.Z,{children:t.meta.title})})]},r),value:r})},He=function(e){var n=ce()(e,["blockletVersion","blockletTitle","blockletDescription","blockletLogo","blockletIntroduction","blockletScreenshots","note"]);return n.blockletScreenshots||(n.blockletScreenshots=[]),n};function Ke(e){var n,t,o,r=Object.assign({},((0,B.Z)(e),e)),i=(0,c.useNavigate)(),a=(0,c.useParams)(),f=a.projectId,x=a.releaseId,Z=a.componentDid,j=(0,m.PE)().t,y=(0,d.y0)().blocklet,E=(0,re.Z)(null),S=(0,u.Z)(E,2),R=S[0],C=S[1],N=(0,l.useState)({}),w=(0,u.Z)(N,2),z=w[0],_=w[1],A=(0,l.useState)(!1),W=(0,u.Z)(A,2),U=W[0],M=W[1],F=(0,l.useState)(!1),q=(0,u.Z)(F,2),J=q[0],X=q[1],K=(0,l.useState)(null),G=(0,u.Z)(K,2),Q=G[0],ee=G[1],ne=(0,g.h6)().api,te=(0,l.useRef)(null),ie=(0,l.useRef)(null),ce="create"===x?"":x,ae="create"===x?"create":"edit",fe=[],xe=((null===y||void 0===y?void 0:y.children)||[]).filter((function(e){return e.meta.capabilities.resourceExportApi})).filter((function(e){return!Z||e.meta.did===Z}));xe.forEach((function(e){Xe({tabs:fe,blocklet:e,t:j,ancestors:[y]})}));var be=(0,l.useState)(null===(n=fe[0])||void 0===n?void 0:n.value),ve=(0,u.Z)(be,2),Ze=ve[0],je=ve[1],ge="published"===(null===Q||void 0===Q?void 0:Q.status),ke=ge,ye=function(){ne.getRelease({input:{did:y.meta.did,projectId:f,releaseId:ce}}).then((function(e){M(!1),C(He(null===e||void 0===e?void 0:e.release)),ee(null===e||void 0===e?void 0:e.release)})).catch((function(e){M(!1),v.Z.error((0,he.Z)(e))}))},Te=(0,l.useCallback)((function(){if("edit"===ae){if(!ce)return void v.Z.error("Empty release id");ye()}"create"===ae&&ne.getProject({input:{did:y.meta.did,projectId:f}}).then((function(e){M(!1);var n=e.project||{};n.blockletVersion?se().valid(n.blockletVersion)&&(n.blockletVersion=se().inc(n.blockletVersion,"patch")):n.blockletVersion="1.0.0",C(He(n))})).catch((function(e){M(!1),v.Z.error((0,he.Z)(e))}))}),[ae,ce]);(0,l.useEffect)((function(){Te()}),[Te]);var Ie=function(e){var n=Je(R,e,j);if(n)return v.Z.error(n.map((function(e){return e.message})).join("; ")),void _(n.reduce((function(e,n){return(0,k.Z)((0,k.Z)({},e),{},(0,le.Z)({},n.param,n.message))}),{}));var t=(0,k.Z)({},R);if(t.blockletVersion=se().valid(t.blockletVersion),!t.blockletVersion)return v.Z.error("Invalid Blocklet Version"),void _({blockletVersion:"Invalid Blocklet Version"});t.blockletTitle=(t.blockletTitle||"").trim(),t.blockletDescription=(t.blockletDescription||"").trim(),t.blockletIntroduction=(t.blockletIntroduction||"").trim(),t.note=(t.note||"").trim(),X(e),M(!0),ne.createRelease({input:(0,k.Z)((0,k.Z)({},t),{},{did:y.meta.did,projectId:f,releaseId:ce,status:e})}).then((function(n){if(X(!1),M(!1),"draft"===e?v.Z.success(j("blocklet.publish.saveDraftSuccess")):v.Z.success(j("blocklet.publish.createReleaseSuccess")),"create"===ae){var t,o=null===n||void 0===n||null===(t=n.release)||void 0===t?void 0:t.id;i("../".concat(f,"/").concat(o),{replace:!0})}else ye()})).catch((function(e){X(!1),M(!1),v.Z.error((0,he.Z)(e))}))};if(!R&&U)return(0,I.jsx)(P,{});if(!R)return null;var Ee="".concat(Y.WELLKNOWN_SERVICE_PATH_PREFIX,"/api/project/").concat(y.meta.did,"/").concat(f,"/logo/upload"),Pe="".concat(Y.WELLKNOWN_SERVICE_PATH_PREFIX,"/api/project/").concat(y.meta.did,"/").concat(f,"/screenshot/upload"),Se=null!==R&&void 0!==R&&R.blockletLogo?"".concat(Ee,"/").concat(R.blockletLogo):"".concat(Y.WELLKNOWN_SERVICE_PATH_PREFIX,"/static/images/logo.png"),Re=((null===R||void 0===R?void 0:R.blockletScreenshots)||[]).filter(Boolean).map((function(e){return"".concat(Pe,"/").concat(e)})),Ce=xe.find((function(e){return e.meta.did===Ze})),Ne=Ce?(0,I.jsx)(s.Z,{children:(0,I.jsx)(Ve,{app:y,component:Ce,projectId:f,release:(0,k.Z)((0,k.Z)({},Q),{},{id:ce})})}):(0,I.jsx)(s.Z,{display:"flex",mt:-3,children:(0,I.jsx)(pe.Z,{children:j("common.empty")})});return(0,I.jsxs)(Qe,(0,k.Z)((0,k.Z)({},r),{},{children:[(0,I.jsxs)(s.Z,{className:"sticky-header",children:[(0,I.jsxs)(D.Z,{className:"breadcrumbs","aria-label":"breadcrumb",children:[(0,I.jsx)(p.rU,{to:"../",children:j("common.publish")}),(0,I.jsx)(p.rU,{to:"../".concat(f),children:(null===R||void 0===R?void 0:R.blockletTitle)||"Blocklet"}),(0,I.jsx)(O.Z,{color:"text.primary",children:"create"===ae?j("common.create"):(null===R||void 0===R?void 0:R.blockletVersion)||j("common.edit")})]}),(0,I.jsxs)(s.Z,{display:"flex",children:[!ge&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(b.Z,{variant:"outlined",disabled:U||J,onClick:function(){return Ie($.PROJECT.RELEASE_STATUS.draft)},style:{marginRight:12},children:[J===$.PROJECT.RELEASE_STATUS.draft&&(0,I.jsx)(T.Z,{size:14,sx:{mr:.5}}),j("blocklet.publish.saveDraft")]}),(0,I.jsxs)(b.Z,{variant:"contained",disabled:U||J,onClick:function(){return Ie($.PROJECT.RELEASE_STATUS.published)},children:[J===$.PROJECT.RELEASE_STATUS.published&&(0,I.jsx)(T.Z,{size:14,sx:{mr:.5},color:"inherit"}),j("common.release")]})]}),ge&&(0,I.jsx)(b.Z,{variant:"contained",children:(0,I.jsx)("a",{href:H()("".concat(Y.WELLKNOWN_SERVICE_PATH_PREFIX,"/api/project/").concat(y.meta.did,"/").concat(f,"/").concat(ce,"/download/").concat((Q.files||[])[0])),children:j("common.download")})})]})]}),(0,I.jsxs)(s.Z,{pt:3,children:[(0,I.jsxs)(s.Z,{display:"flex",className:"section",children:[(0,I.jsx)(O.Z,{variant:"h3",className:"left",children:j("blocklet.publish.productTitle")}),(0,I.jsxs)(s.Z,{sx:{flex:1},children:[(0,I.jsx)(L.Z,{label:"Blocklet ".concat(j("common.title")),placeholder:"Blocklet ".concat(j("common.title")),InputProps:{"data-cy":"blocklet-title",readOnly:ke},autoComplete:"off",variant:"outlined",fullWidth:!0,required:!0,value:R.blockletTitle||"",onChange:function(e){_({blockletTitle:""}),C({blockletTitle:e.target.value})},error:!!z.blockletTitle,helperText:z.blockletTitle||""}),(0,I.jsx)(L.Z,{label:"Blocklet ".concat(j("common.description")),placeholder:"Blocklet ".concat(j("common.description")),InputProps:{"data-cy":"blocklet-description",readOnly:ke},required:!0,autoComplete:"off",variant:"outlined",fullWidth:!0,value:R.blockletDescription||"",onChange:function(e){_({blockletDescription:""}),C({blockletDescription:e.target.value})},error:!!z.blockletDescription,helperText:z.blockletDescription||"",sx:{mt:3}}),(0,I.jsx)(L.Z,{label:"Blocklet ".concat(j("common.introduction")),placeholder:"Blocklet ".concat(j("common.introduction")),InputProps:{"data-cy":"export-blocklet-introduction",readOnly:ke,endAdornment:(0,I.jsxs)(V.Z,{position:"end",children:[(null===R||void 0===R||null===(t=R.blockletIntroduction)||void 0===t?void 0:t.length)||0," / ",$.PROJECT.MAX_INTRO_LENGTH]})},autoComplete:"off",variant:"outlined",fullWidth:!0,multiline:!0,minRows:4,value:R.blockletIntroduction||"",onChange:function(e){_({blockletIntroduction:""}),C({blockletIntroduction:e.target.value.slice(0,$.PROJECT.MAX_INTRO_LENGTH)})},error:!!z.blockletIntroduction,helperText:z.blockletIntroduction||"",sx:{mt:3}})]})]}),(0,I.jsxs)(s.Z,{display:"flex",mt:3,className:"section",children:[(0,I.jsx)(O.Z,{variant:"h3",className:"left",children:j("blocklet.publish.versionTitle")}),(0,I.jsxs)(s.Z,{sx:{flex:1},children:[(0,I.jsx)(L.Z,{required:!0,label:"Blocklet ".concat(j("common.version")),placeholder:"Blocklet ".concat(j("common.version")),InputProps:{"data-cy":"blocklet-version",readOnly:ke},autoComplete:"off",variant:"outlined",fullWidth:!0,value:R.blockletVersion,onChange:function(e){_({blockletVersion:""}),C({blockletVersion:e.target.value})},error:!!z.blockletVersion,helperText:z.blockletVersion||""}),(0,I.jsx)(L.Z,{label:j("blocklet.publish.releaseNote"),autoComplete:"off",variant:"outlined",InputProps:{"data-cy":"release-note",readOnly:ke,endAdornment:(0,I.jsxs)(V.Z,{position:"end",children:[(null===R||void 0===R||null===(o=R.note)||void 0===o?void 0:o.length)||0," / ",$.PROJECT.MAX_NOTE_LENGTH]})},fullWidth:!0,multiline:!0,minRows:4,required:!0,value:R.note,onChange:function(e){_({note:""}),C({note:e.target.value.slice(0,$.PROJECT.MAX_NOTE_LENGTH)})},error:!!z.note,helperText:z.note||"",sx:{mt:3}})]})]}),(0,I.jsxs)(s.Z,{display:"flex",mt:3,className:"section full-width",children:[(0,I.jsx)(O.Z,{variant:"h3",className:"left",children:j("blocklet.publish.imgTitle")}),(0,I.jsxs)(s.Z,{sx:{flex:1},children:[(0,I.jsxs)(s.Z,{display:"flex",children:[(0,I.jsx)(O.Z,{variant:"subtitle1",sx:{mr:2},children:j("common.logo")}),(0,I.jsx)(s.Z,{sx:{flex:1,cursor:ke?"default":"pointer"},children:(0,I.jsx)(de.Z,{variant:"square",sx:{width:80,height:80},alt:"Blocklet Logo",src:Se,onClick:function(){return!ke&&te.current.open()}})})]}),(0,I.jsxs)(s.Z,{display:"flex",mt:3,children:[(0,I.jsx)(O.Z,{variant:"subtitle1",sx:{mr:2},children:j("common.screenshot")}),(0,I.jsxs)(s.Z,{display:"flex",alignItems:"center",sx:{flex:1,flexWrap:"wrap"},children:[Re.map((function(e,n){return(0,I.jsxs)(s.Z,{className:"screenshot",children:[(0,I.jsx)("img",{alt:"screenshot",src:e}),!ke&&(0,I.jsx)(h.Z,{className:"action",onClick:function(){var e=(0,oe.Z)(R.blockletScreenshots);e.splice(n,1),C({blockletScreenshots:e})},children:(0,I.jsx)(ue.default,{})})]})})),Re.length<5&&(0,I.jsx)(s.Z,{sx:{width:200,height:140,background:"#eee",cursor:ke?"default":"pointer",color:"#999",mb:2},display:"flex",justifyContent:"center",alignItems:"center",fontSize:40,onClick:function(){return!ke&&ie.current.open()},children:"+"})]})]})]}),(0,I.jsx)(qe,{id:"\u200buploader-logo",ref:te,popup:!0,onUploadFinish:function(e){C({blockletLogo:e.data.filename}),te.current.close()},plugins:["ImageEditor"],apiPathProps:{uploader:Ee,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileTypes:Me,maxFileSize:Fe,maxNumberOfFiles:1}}},"uploader-logo"),(0,I.jsx)(qe,{id:"\u200buploader-screenshot",ref:ie,popup:!0,onUploadFinish:function(e){var n,t=R.blockletScreenshots||[];t.push(null===(n=e.data)||void 0===n?void 0:n.filename),C({blockletScreenshots:t}),ie.current.close()},plugins:["ImageEditor"],apiPathProps:{uploader:Pe,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileTypes:Me,maxFileSize:Fe,maxNumberOfFiles:5-Re.length}}},"uploader-screenshot")]}),(0,I.jsxs)(s.Z,{display:"flex",mt:3,className:"section full-width",children:[(0,I.jsx)(s.Z,{className:"left",children:(0,I.jsx)(O.Z,{variant:"h3",children:j("blocklet.publish.resourceTitle")})}),(0,I.jsxs)(s.Z,{sx:{flex:1},children:[(0,I.jsx)(me.Z,{tabs:fe,current:Ze,onChange:function(e){je(e)},sx:{ml:-2,mt:-1.5}}),(0,I.jsx)(s.Z,{children:Ne})]})]})]})]}))}Ke.propTypes={},Ke.defaultProps={};var Ge,Qe=a.Z.div(We||(We=(0,o.Z)(["\n .sticky-header {\n margin-top: -12px;\n padding: 12px 0;\n position: sticky;\n top: 0;\n z-index: 99;\n display: flex;\n align-items: center;\n justify-content: space-between;\n background-color: #fff;\n padding-bottom: 12px;\n border-bottom: ",";\n }\n .screenshot {\n margin-bottom: 16px;\n max-width: 200px;\n max-height: 140px;\n width: 200px;\n height: 140px;\n overflow: hidden;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: #eee;\n margin-right: 16px;\n position: relative;\n .action {\n visibility: hidden;\n position: absolute;\n top: 0px;\n right: 0px;\n background-color: rgba(0, 0, 0, 0.2);\n color: rgba(255, 255, 255, 0.8);\n }\n &:hover .action {\n visibility: visible;\n }\n }\n .screenshot img {\n width: 100%; /* \u56fe\u50cf\u5bbd\u5ea6\u586b\u5145\u5bb9\u5668 */\n height: auto; /* \u56fe\u50cf\u9ad8\u5ea6\u81ea\u9002\u5e94 */\n }\n .section {\n max-width: 800px;\n &.full-width {\n max-width: 100%;\n }\n .MuiTypography-h3 {\n font-size: 1.1rem;\n font-weight: 700;\n }\n .left {\n flex-shrink: 0;\n width: 140px;\n }\n .MuiTabs-indicator {\n display: none;\n }\n .MuiTypography-subtitle1 {\n width: 120px;\n font-weight: 700;\n font-size: 1rem;\n "," {\n width: 80px;\n }\n }\n }\n .MuiButtonBase-root {\n a {\n color: inherit;\n }\n }\n .MuiInputBase-multiline .MuiInputAdornment-positionEnd {\n align-self: flex-end;\n .MuiTypography-root {\n font-size: 0.8rem;\n }\n font-size: 0.8rem;\n }\n"])),(function(e){var n=e.theme;return"1px solid ".concat(n.palette.divider)}),(function(e){return e.theme.breakpoints.down("sm")}));function Ye(e){var n=e.padding,t=(0,d.y0)().blocklet,o=(0,c.useLocation)(),r=(0,c.useParams)().componentDid;if((0,l.useEffect)((function(){if(r&&window.parent){var e="".concat(o.pathname).concat(o.search);window.parent.postMessage({event:"popstate",page:"publish",componentDid:r,path:e},"*")}}),[r,o]),!t)return null;var i={};return n&&(i.padding=n),(0,I.jsx)($e,{style:i,children:(0,I.jsxs)(c.Routes,{children:[(0,I.jsx)(c.Route,{path:"/",element:(0,I.jsx)(w,{})}),(0,I.jsx)(c.Route,{path:"/create",element:(0,I.jsx)(F,{})}),(0,I.jsx)(c.Route,{path:"/:projectId",element:(0,I.jsx)(ee,{})}),(0,I.jsx)(c.Route,{path:"/:projectId/:releaseId",element:(0,I.jsx)(Ke,{})})]})})}Ye.propTypes={padding:i().oneOfType([i().string,i().number])},Ye.defaultProps={padding:""};var $e=(0,a.Z)(s.Z)(Ge||(Ge=(0,o.Z)(["\n a {\n color: ",";\n }\n"])),(function(e){return e.theme.palette.primary.main}))},36558:function(e,n,t){var o=t(33028),l=t(59740),r=t(24974),i=t.n(r),c=t(86822),a=t(19638),s=t(23586),d=t(37574),u=["did","href","external","avatarProps"];function p(e){var n=e.did,t=e.href,r=e.external,i=(e.avatarProps,(0,l.Z)(e,u)),p=(0,d.jsx)(s.Z,(0,o.Z)({did:n},i));return t?r?(0,d.jsx)(a.Z,{target:"_blank",href:t,underline:"hover",children:p}):(0,d.jsx)(c.rU,{to:t,children:p}):p}p.propTypes={did:i().string.isRequired,to:i().string,href:i().string,avatarProps:i().object,external:i().bool},p.defaultProps={to:"",href:"",avatarProps:{},external:!1},n.Z=p}}]);
|
|
2
|
-
//# sourceMappingURL=356.df75c406.chunk.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_abtnode_blocklet_services=self.webpackChunk_abtnode_blocklet_services||[]).push([[5047],{96709:function(n,e,r){r.r(e),r.d(e,{default:function(){return p}});r(30969);var o=r(30734),t=r(26022),a=r(75255),i=r(38361),s=r(50496),c=r(60356),l=r(37574),u=new URL(window.location.href),d="dialog"===u.searchParams.get("mode"),f=d?"":u.searchParams.get("padding")||"";function p(){var n=(0,t.PE)().t,e=(0,o.useParams)().componentDid,r=(0,a.Z)((function(n){return n.breakpoints.down("md")})),u=(0,l.jsx)(c.default,{padding:f});return d?(0,l.jsx)(s.ZP,{className:"resource-dialog",title:n("blocklet.publish.createResource"),maxWidth:!1,fullWidth:!1,PaperProps:{style:r?{width:"100%",height:window.innerHeight}:{maxWidth:1350,minWidth:930,width:"80%"}},onClose:function(){window.parent.postMessage({event:"resourceDialog.close",componentDid:e},"*")},showCloseButton:!0,disableEscapeKeyDown:!0,open:!0,children:(0,l.jsx)(i.Z,{sx:{height:"72vh",overflow:"auto",position:"relative"},children:u})}):u}},8479:function(n,e,r){r.d(e,{Z:function(){return S}});var o=r(71171),t=r(33028),a=r(32723),i=r(34795),s=r(96234),c=r(59740),l=r(30969),u=r(24974),d=r.n(u),f=r(16380),p=r(84636),m=r(94308),v=r(91862),Z=r(87130),h=r(43207),g=r(38357),w=r(18877),b=r(94702),x=r(75255),y=r(26022),C=r(29996),k=r(24891),j=r(45555);var R,M=function(){var n=(0,j.Z)();return{minWidth:(0,x.Z)(n.breakpoints.down("md"))?300:n.breakpoints.values.sm}},P=r(37574),N=["title","description","showCancel","cancel","confirm","color","params","onCancel","onConfirm","loading"];function S(n){var e=n.title,r=n.description,o=n.showCancel,u=n.cancel,d=n.confirm,f=n.color,p=n.params,j=n.onCancel,R=n.onConfirm,S=n.loading,T=(0,c.Z)(n,N),_=(0,l.useState)(p),z=(0,s.Z)(_,2),W=z[0],F=z[1],D=(0,l.useState)(!0),O=(0,s.Z)(D,2),q=O[0],B=O[1],E=(0,l.useState)(!1),H=(0,s.Z)(E,2),L=H[0],V=H[1],I=(0,l.useState)(""),K=(0,s.Z)(I,2),U=K[0],A=K[1],J=(0,y.PE)().t,Q=(0,b.Z)(),X=function(){var n=(0,i.Z)((0,a.Z)().mark((function n(e){return(0,a.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if("function"!==typeof e){n.next=17;break}return V(!0),n.prev=2,n.next=5,e(W);case 5:B(!1),n.next=12;break;case 8:n.prev=8,n.t0=n.catch(2),A((0,k.Z)(n.t0)),console.error(n.t0);case 12:return n.prev=12,V(!1),n.finish(12);case 15:n.next=18;break;case 17:B(!1);case 18:case"end":return n.stop()}}),n,null,[[2,8,12,15]])})));return function(e){return n.apply(this,arguments)}}(),Y="function"===typeof e?e():e,$="function"===typeof r?r(W,F,A):r,nn=(0,x.Z)(Q.breakpoints.down("md")),en=M().minWidth;return(0,P.jsxs)(G,(0,t.Z)((0,t.Z)({onClick:function(n){n.stopPropagation()},fullScreen:nn,open:q,style:{minWidth:en}},T),{},{children:[(0,P.jsx)(g.Z,{children:Y}),(0,P.jsxs)(Z.Z,{style:{minWidth:en},children:[(0,P.jsx)(h.Z,{component:"div",children:$}),!!U&&(0,P.jsx)(w.Z,{severity:"error",style:{width:"100%",marginTop:8},children:U})]}),(0,P.jsxs)(v.Z,{className:"delete-actions",style:{padding:"8px 24px 24px"},children:[o&&(0,P.jsx)(C.Z,{onClick:function(n){n.stopPropagation(),X(j)},color:"inherit","data-cy":"cancel-confirm-dialog",children:u||J("common.cancel")}),(0,P.jsxs)(C.Z,{onClick:function(n){n.stopPropagation(),X(R)},color:f,disabled:W.__disableConfirm||L||S,variant:"contained","data-cy":"submit-confirm-dialog",autoFocus:!0,children:[(L||S)&&(0,P.jsx)(m.Z,{size:16,sx:{mr:1}}),d]})]})]}))}S.propTypes={title:d().any.isRequired,description:d().any.isRequired,showCancel:d().bool,cancel:d().string,color:d().string,confirm:d().string,params:d().object,onCancel:d().func,onConfirm:d().func.isRequired,loading:d().bool},S.defaultProps={onCancel:function(){},showCancel:!0,cancel:"",confirm:"Confirm",color:"error",params:{},loading:!1};var G=(0,f.Z)(p.Z)(R||(R=(0,o.Z)(["\n .delete-actions .Mui-disabled {\n color: rgba(0, 0, 0, 0.26) !important;\n box-shadow: none;\n background-color: rgba(0, 0, 0, 0.12) !important;\n }\n"])))},77370:function(n,e,r){r.d(e,{B:function(){return t.B3},T:function(){return a}});var o=r(30969),t=r(41333);function a(){return(0,o.useContext)(t.B3)}},54559:function(n,e,r){r.d(e,{hi:function(){return a},od:function(){return t.a}});var o=r(95803),t=r.n(o);t().defaults.timeout=1e4;var a=t().create()},9715:function(n,e,r){var o,t=r(71171),a=r(33028),i=r(59740),s=r(30969),c=r(24974),l=r.n(c),u=r(33359),d=r(79216),f=r(6200),p=r(55581),m=r(37574),v=["type","content","children","style","className","forwardedRef"],Z={error:{color:f.Z.common.white,backgroundColor:f.Z.error.main},warning:{color:f.Z.common.white,backgroundColor:f.Z.warning.main},success:{color:f.Z.common.white,backgroundColor:f.Z.success.main},primary:{color:f.Z.common.white,backgroundColor:f.Z.primary.main},reverse:{color:"#fff",backgroundColor:"#222"}};function h(n){var e=(0,d.dG)(n,h,["style"]),r=e.type,o=e.content,t=e.children,s=e.style,c=e.className,l=e.forwardedRef,u=(0,i.Z)(e,v),g=(0,p.Fg)().palette,b=Object.assign({},Z[r]||Z.primary,s);return g[r]&&Object.assign(b,{color:g[r].contrastText||f.Z.common.white,backgroundColor:g[r].main}),(0,m.jsx)(w,(0,a.Z)((0,a.Z)({ref:l,component:"span",className:c,style:b},u),{},{children:o||t}))}h.propTypes={children:l().any.isRequired,type:l().oneOf(Object.keys(Z)),content:l().string,className:l().string,style:l().oneOfType([l().object,l().string])},h.defaultProps={type:"primary",content:"",className:"",style:{}};var g=(0,s.forwardRef)((function(n,e){return(0,m.jsx)(h,(0,a.Z)((0,a.Z)({},n),{},{forwardedRef:e}))}));e.Z=g;var w=(0,p.zo)(u.Z)(o||(o=(0,t.Z)(["\n && {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n padding: 2px 10px;\n height: 20px;\n line-height: 20px;\n font-size: 12px;\n font-weight: 500;\n border-radius: 4px;\n }\n"])))},10814:function(n,e,r){var o=r(71600);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=o(r(48035)),a=r(37574),i=(0,t.default)((0,a.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete");e.default=i},23038:function(n,e,r){var o=r(71600);e.Z=void 0;var t=o(r(48035)),a=r(37574),i=(0,t.default)((0,a.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");e.Z=i},37973:function(n,e,r){var o=r(71600);e.Z=void 0;var t=o(r(48035)),a=r(37574),i=(0,t.default)((0,a.jsx)("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreVert");e.Z=i},21098:function(n,e,r){var o=r(31461),t=r(7896),a=r(30969),i=r(87023),s=r(26540),c=r(45971),l=r(17363),u=r(54126),d=r(86171),f=r(42641),p=r(37574),m=["className","row"],v=(0,c.ZP)("div",{name:"MuiFormGroup",slot:"Root",overridesResolver:function(n,e){var r=n.ownerState;return[e.root,r.row&&e.row]}})((function(n){var e=n.ownerState;return(0,t.Z)({display:"flex",flexDirection:"column",flexWrap:"wrap"},e.row&&{flexDirection:"row"})})),Z=a.forwardRef((function(n,e){var r=(0,l.Z)({props:n,name:"MuiFormGroup"}),a=r.className,c=r.row,Z=void 0!==c&&c,h=(0,o.Z)(r,m),g=(0,d.Z)(),w=(0,f.Z)({props:r,muiFormControl:g,states:["error"]}),b=(0,t.Z)({},r,{row:Z,error:w.error}),x=function(n){var e=n.classes,r={root:["root",n.row&&"row",n.error&&"error"]};return(0,s.Z)(r,u.y,e)}(b);return(0,p.jsx)(v,(0,t.Z)({className:(0,i.Z)(x.root,a),ownerState:b,ref:e},h))}));e.Z=Z},54126:function(n,e,r){r.d(e,{y:function(){return a}});var o=r(62746),t=r(2975);function a(n){return(0,t.Z)("MuiFormGroup",n)}var i=(0,o.Z)("MuiFormGroup",["root","row","error"]);e.Z=i},56277:function(n,e,r){var o=r(56666),t=r(31461),a=r(7896),i=r(30969),s=r(87023),c=r(26540),l=r(17363),u=r(45971),d=r(6856),f=r(37574),p=["className","component","disableGutters","variant"],m=(0,u.ZP)("div",{name:"MuiToolbar",slot:"Root",overridesResolver:function(n,e){var r=n.ownerState;return[e.root,!r.disableGutters&&e.gutters,e[r.variant]]}})((function(n){var e=n.theme,r=n.ownerState;return(0,a.Z)({position:"relative",display:"flex",alignItems:"center"},!r.disableGutters&&(0,o.Z)({paddingLeft:e.spacing(2),paddingRight:e.spacing(2)},e.breakpoints.up("sm"),{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}),"dense"===r.variant&&{minHeight:48})}),(function(n){var e=n.theme;return"regular"===n.ownerState.variant&&e.mixins.toolbar})),v=i.forwardRef((function(n,e){var r=(0,l.Z)({props:n,name:"MuiToolbar"}),o=r.className,i=r.component,u=void 0===i?"div":i,v=r.disableGutters,Z=void 0!==v&&v,h=r.variant,g=void 0===h?"regular":h,w=(0,t.Z)(r,p),b=(0,a.Z)({},r,{component:u,disableGutters:Z,variant:g}),x=function(n){var e=n.classes,r={root:["root",!n.disableGutters&&"gutters",n.variant]};return(0,c.Z)(r,d.N,e)}(b);return(0,f.jsx)(m,(0,a.Z)({as:u,className:(0,s.Z)(x.root,o),ref:e,ownerState:b},w))}));e.Z=v},6856:function(n,e,r){r.d(e,{N:function(){return a}});var o=r(62746),t=r(2975);function a(n){return(0,t.Z)("MuiToolbar",n)}var i=(0,o.Z)("MuiToolbar",["root","gutters","regular","dense"]);e.Z=i},43178:function(n,e,r){var o=r(30969);e.Z=function(n){void 0===n&&(n={});var e=o.useState(n),r=e[0],t=e[1];return[r,o.useCallback((function(n){t((function(e){return Object.assign({},e,n instanceof Function?n(e):n)}))}),[])]}}}]);
|
|
2
|
-
//# sourceMappingURL=5047.2f665ae5.chunk.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_abtnode_blocklet_services=self.webpackChunk_abtnode_blocklet_services||[]).push([[5070],{46513:function(e,n,t){n.Z=void 0;(r=t(30969))&&r.__esModule;var r,i=t(37574);function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function a(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?o(Object(t),!0).forEach((function(n){c(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):o(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function c(e,n,t){return(n=function(e){var n=function(e,n){if("object"!==typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!==typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"===typeof n?n:String(n)}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var u=function(e){return(0,i.jsx)("svg",a(a({},e),{},{children:(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.606 17.32a7.933 7.933 0 0 1-.581-1.18c-.165-.411-.312-.86-.44-1.339a7.639 7.639 0 0 0-1.586 1.054 7.69 7.69 0 0 0 2.607 1.465zm.657-1.675c-.16-.4-.305-.848-.429-1.335A7.643 7.643 0 0 1 10 14h.002c.734 0 1.463.104 2.165.31-.124.487-.268.935-.428 1.335-.283.707-.604 1.235-.925 1.575-.32.339-.595.447-.813.447-.218 0-.493-.108-.813-.447-.322-.34-.642-.867-.925-1.575zM10 12.667a8.976 8.976 0 0 1 2.436.334c.116-.727.193-1.511.22-2.334H7.344c.027.823.103 1.607.22 2.334A8.972 8.972 0 0 1 10 12.667zM7.345 9.333c.027-.823.103-1.607.22-2.334.791.223 1.61.335 2.436.334A8.974 8.974 0 0 0 12.437 7c.116.727.193 1.511.22 2.334H7.344zm6.646 1.334c-.03.982-.127 1.925-.28 2.797.81.367 1.56.852 2.227 1.439a7.666 7.666 0 0 0 1.734-4.236h-3.681zm3.681-1.334H13.99a19.718 19.718 0 0 0-.28-2.798 8.975 8.975 0 0 0 2.228-1.438 7.665 7.665 0 0 1 1.734 4.236zm1.329.669A9 9 0 1 1 1 10a9 9 0 0 1 18 0v.002zM2.329 9.333a7.665 7.665 0 0 1 1.734-4.236A8.974 8.974 0 0 0 6.29 6.535a19.74 19.74 0 0 0-.28 2.798H2.329zm0 1.334h3.682c.03.983.126 1.925.28 2.797a8.974 8.974 0 0 0-2.228 1.439 7.665 7.665 0 0 1-1.734-4.236zm10.648 5.473c.164-.411.312-.86.44-1.34.57.285 1.103.639 1.585 1.055a7.687 7.687 0 0 1-2.606 1.465c.216-.354.41-.751.58-1.18zm-.581-13.46c.967.316 1.85.819 2.606 1.465A7.64 7.64 0 0 1 13.417 5.2c-.128-.48-.276-.928-.44-1.34a7.925 7.925 0 0 0-.581-1.18zm-.657 1.675c.16.4.304.848.428 1.335a7.64 7.64 0 0 1-2.165.31H10a7.64 7.64 0 0 1-2.166-.31c.124-.487.268-.935.429-1.335.283-.708.603-1.235.925-1.575.32-.339.595-.447.813-.447.218 0 .492.108.813.447.321.34.642.867.925 1.575zM7.025 3.86c-.165.411-.312.86-.44 1.34a7.64 7.64 0 0 1-1.586-1.055A7.688 7.688 0 0 1 7.606 2.68c-.216.354-.41.751-.581 1.18z",fill:"currentColor"})}))};u.defaultProps={width:"21",height:"20",viewBox:"0 0 21 20",xmlns:"http://www.w3.org/2000/svg"},u.displayName="globe";var s=u;n.Z=s},26681:function(e,n,t){t.d(n,{Z:function(){return C}});var r,i,o=t(71171),a=t(33028),c=t(96234),u=t(59740),s=t(30969),l=t(24974),f=t.n(l),d=t(72097),h=t(94551),p=t(38361),v=t(33359),g=t(38589),b=t(23484),m=t(2689),y=t(45761),x=t(38996),w=t(46513),k=t(79216),j=t(26022),Z=t(55581),A=t(37574),O=["showText","popperProps","popperType","icon","size"];function C(e){var n,t,r,i=e.showText,o=e.popperProps,l=e.popperType,f=e.icon,y=e.size,k=(0,u.Z)(e,O),C=(0,s.useContext)(j.RD),S=C.locale,T=C.changeLocale,E=C.languages,I=(0,s.useRef)(null),M=(0,s.useState)(!1),z=(0,c.Z)(M,2),L=z[0],R=z[1],N=(0,Z.Fg)(),F="dark"===(null===N||void 0===N||null===(n=N.palette)||void 0===n?void 0:n.mode),D=i?d.Z:h.Z,q="hover"===l?{onMouseEnter:function(){R(!0)},onMouseLeave:function(){R(!1)}}:{onClick:function(){R(!L)}},H=(0,s.useMemo)((function(){return f?(0,A.jsx)(f,{}):(0,A.jsx)(w.Z,{style:{width:"auto",height:y,color:N.palette.text.secondary}})}),[f,null===N||void 0===N||null===(t=N.palette)||void 0===t||null===(r=t.text)||void 0===r?void 0:r.secondary,y]);return(0,A.jsxs)(P,(0,a.Z)((0,a.Z)((0,a.Z)({component:"div",dark:F,theme:N},k),q),{},{children:[(0,A.jsx)(D,{ref:I,className:"trigger",role:"button","aria-label":"Locale selector button",children:(0,A.jsxs)(p.Z,{display:"flex",alignItems:"center",children:[H,i?(0,A.jsx)(v.Z,{component:"strong",className:"trigger-text",children:E.find((function(e){return e.code===S})).name}):""]})}),(0,A.jsx)(_,(0,a.Z)((0,a.Z)({open:L,anchorEl:I.current},o),{},{disablePortal:!0,children:(0,A.jsx)("div",{className:"locales",children:(0,A.jsx)(g.d,{onClickAway:function(e){var n;null!==(n=I.current)&&void 0!==n&&n.contains(e.target)||R(!1)},children:(0,A.jsx)(b.Z,{children:E.map((function(n){var t=n.code,r=n.name;return(0,A.jsxs)(m.Z,{className:"locale-item",onClick:function(){return T(n=t),R(!1),void("function"===typeof e.onChange&&e.onChange(n));var n},children:[(0,A.jsx)(x.default,{className:t===S?"check-icon check-icon-visible":"check-icon",fontSize:"small"}),r]},t)}))})})})}))]}))}C.propTypes={size:f().number,showText:f().bool,popperProps:f().object,onChange:f().func,popperType:f().oneOf(["hover","click"]),icon:f().any},C.defaultProps={showText:!0,size:24,popperProps:{},onChange:function(){},popperType:"click",icon:null};var P=(0,Z.zo)("div",{shouldForwardProp:function(e){return"dark"!==e}})(r||(r=(0,o.Z)(["\n display: inline-block;\n\n .trigger {\n display: flex;\n flex-direction: column;\n justify-content: center;\n font-size: 14px;\n white-space: nowrap;\n\n .trigger-text {\n margin-left: 5px;\n font-size: 14px;\n color: ",";\n }\n }\n\n .locales {\n background: ",";\n box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);\n }\n\n .locale-item {\n font-size: 16px;\n font-style: normal;\n font-stretch: normal;\n line-height: normal;\n letter-spacing: 2px;\n text-align: center;\n color: ",";\n cursor: pointer;\n display: flex;\n padding: 16px;\n align-items: center;\n .check-icon {\n visibility: hidden;\n margin-right: 4px;\n }\n .check-icon-visible {\n visibility: visible;\n }\n }\n"])),(function(e){return(0,k.Lq)(e)}),(function(e){return(0,k.Vu)(e)}),(function(e){return(0,k.Lq)(e)})),_=(0,Z.zo)(y.Z)(i||(i=(0,o.Z)(["\n z-index: ",";\n"])),(function(e){return e.theme.zIndex.tooltip+10}))},56368:function(e,n,t){t.d(n,{KN:function(){return l},Kb:function(){return p},RX:function(){return d},iU:function(){return s}});var r,i,o,a,c=t(33028),u=t(97347),s=(null===(r=window)||void 0===r||null===(i=r.blocklet)||void 0===i?void 0:i.groupPrefix)||(null===(o=window)||void 0===o||null===(a=o.blocklet)||void 0===a?void 0:a.prefix)||"/",l=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en";if(null===e||void 0===e||!e.length)return e;var t=function(e,n){return"string"===typeof e?e:"object"===typeof e?e[n]||(null===e||void 0===e?void 0:e.en)||(null===e||void 0===e?void 0:e.zh):e},r=function(e,n){if("string"===typeof e){if((0,u.CB)(e)){var t=new URL(e);return t.searchParams.set("locale",n),t.href}var r=new URL(e,window.location.origin);return r.searchParams.set("locale",n),r.pathname+r.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,u._J)(e,(function(e){var i;return(0,c.Z)((0,c.Z)({},e),{},{title:t(e.title,n),link:null!==(i=e.items)&&void 0!==i&&i.length?e.link:r(e.link,n)})}),"items")},f=function(e){if(null===e||void 0===e||!e.length)return null;var n=function(e){return(0,u._J)(e,(function(e){return e.role?(0,c.Z)((0,c.Z)({},e),{},{role:Array.isArray(e.role)?e.role:[e.role]}):e}),"items")}(e),t={header:[],footer:[],social:[],bottom:[],dashboard:[],sessionManager:[]};return n.forEach((function(e){if(e.section){if(Array.isArray(e.section))e.section.forEach((function(n){var r;null===(r=t[n])||void 0===r||r.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},d=function(e){if(!e)return null;var n=(0,c.Z)({},e);return n.theme=function(e){var n=(0,c.Z)({},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=f(h(n.navigation)),n},h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return(0,u.fA)(e,(function(e,n){var t;return!!e.link||(null===(t=n.filteredChildren)||void 0===t?void 0:t.length)}),"items")},p=function(e,n){return(0,u.fA)(e,(function(e,t){var r,i=!e.role||n&&e.role.includes(n);return t.isLeaf?i:i&&(null===(r=t.filteredChildren)||void 0===r?void 0:r.length)}),"items")}},11689:function(e,n,t){t.d(n,{Z:function(){return v}});var r=t(68079),i=t(33028),o=(t(86204),t(30969)),a=t(24974),c=t.n(a),u=t(37574),s=t(41333),l=t(33426),f=t(26681),d=t(26022),h=t(26862),p=t(56368);function v(e){var n,t,a,c,h=e.formattedBlocklet,v=e.addons,g=e.sessionManagerProps,b=(0,o.useContext)(s.B3),m=((0,d.PE)()||{}).locale,y=h.enableConnect,x=void 0===y||y,w=h.enableLocale,k=void 0===w||w,j=!(null===b||void 0===b||null===(n=b.session)||void 0===n||!n.user),Z=(0,p.KN)(null===h||void 0===h||null===(t=h.navigation)||void 0===t?void 0:t.sessionManager,m)||[];Z=(0,p.Kb)(Z,null===b||void 0===b||null===(a=b.session)||void 0===a||null===(c=a.user)||void 0===c?void 0:c.role);var A=function(){if(v&&"function"!==typeof v)return Array.isArray(v)?v:[v];var e=[];if(k&&m&&e.push((0,u.jsx)(f.Z,{showText:!1},"locale-selector")),x&&b){var n=[];if(j)(Z?Z.slice(0,5):[]).forEach((function(e){n.push({label:e.title,icon:e.icon?(0,u.jsx)("iconify-icon",{icon:e.icon,height:24,style:{marginRight:8}}):null,component:"a",href:e.link,key:e.link})}));e.push((0,u.jsx)(l.Z,(0,i.Z)({session:b.session,locale:m,menu:n,showRole:!0},g),"session-manager"))}return"function"===typeof v&&(e=v(e)||[]),e}();return o.createElement.apply(void 0,[u.Fragment,null].concat((0,r.Z)(Array.isArray(A)?A:[A])))}v.propTypes={formattedBlocklet:c().object.isRequired,addons:c().oneOfType([c().func,c().node]),sessionManagerProps:h.Z},v.defaultProps={addons:null,sessionManagerProps:{showRole:!0}}},23906:function(e,n,t){t.d(n,{x:function(){return o}});var r=t(30969),i=t(92771),o=function(){var e=(0,i.Z)();(0,r.useEffect)((function(){e.wallet&&t.e(5434).then(t.t.bind(t,45434,23)).then((function(e){e.call("arcHideTopBar","{}")})).catch((function(e){console.error("load dsbridge error",e)}))}),[e])}},26862:function(e,n,t){t.d(n,{I:function(){return o},Z:function(){return a}});var r=t(24974),i=t.n(r),o=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])}))}))}),a=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})},97347:function(e,n,t){t.d(n,{CB:function(){return u},Ik:function(){return a},RX:function(){return l},Xk:function(){return s},_J:function(){return o},fA:function(){return c}});var r=t(56666),i=t(33028),o=function e(n,t){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"children";return n.map((function(n){return Array.isArray(n[o])?t((0,i.Z)((0,i.Z)({},n),{},(0,r.Z)({},o,e(n[o],t,o)))):t(n)}))},a=function(e){var n=[];return o(e,(function(e){return n.push(e)}),arguments.length>1&&void 0!==arguments[1]?arguments[1]:"children"),n},c=function e(n,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"children";return n.map((function(e){return(0,i.Z)({},e)})).filter((function(n){var i=n[r];if(Array.isArray(i)){var o=e(i,t,r);n[r]=null!==o&&void 0!==o&&o.length?o:void 0}var a={filteredChildren:n[r],isLeaf:!(null!==i&&void 0!==i&&i.length)};return t(n,a)}))},u=function(e){return/^https?:\/\//.test(e)},s=function(e){return/^[\w-]+:[\w-]+$/.test(e)},l=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map((function(e,n){return{path:e,index:n}})).filter((function(e){return function(e){if(!e||null===e||void 0===e||!e.startsWith("/"))return!1;var n=function(e){return e.endsWith("/")?e:"".concat(e,"/")},t=n(window.location.pathname),r=n(new URL(e,window.location.origin).pathname);return t.startsWith(r)}(e.path)}));return null!==e&&void 0!==e&&e.length?e.slice(1).reduce((function(e,n){return e.path.length>=n.path.length?e:n}),e[0]).index:-1}},86204:function(e,n,t){var r=t(9249),i=t(87371),o=t(80753),a=t(45754),c=t(86906),u=t(56666),s=t(33028),l=Object.freeze({left:0,top:0,width:16,height:16}),f=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),d=Object.freeze((0,s.Z)((0,s.Z)({},l),f)),h=Object.freeze((0,s.Z)((0,s.Z)({},d),{},{body:"",hidden:!1})),p=Object.freeze({width:null,height:null}),v=Object.freeze((0,s.Z)((0,s.Z)({},p),f));var g=/[\s,]+/;var b=(0,s.Z)((0,s.Z)({},v),{},{preserveAspectRatio:""});function m(e){var n,t=(0,s.Z)({},b),r=function(n,t){return e.getAttribute(n)||t};return t.width=r("width",null),t.height=r("height",null),t.rotate=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=e.replace(/^-?[0-9.]*/,"");function r(e){for(;e<0;)e+=4;return e%4}if(""===t){var i=parseInt(e);return isNaN(i)?0:r(i)}if(t!==e){var o=0;switch(t){case"%":o=25;break;case"deg":o=90}if(o){var a=parseFloat(e.slice(0,e.length-t.length));return isNaN(a)?0:(a/=o)%1===0?r(a):0}}return n}(r("rotate","")),n=t,r("flip","").split(g).forEach((function(e){switch(e.trim()){case"horizontal":n.hFlip=!0;break;case"vertical":n.vFlip=!0}})),t.preserveAspectRatio=r("preserveAspectRatio",r("preserveaspectratio","")),t}var y=/^[a-z0-9]+(-[a-z0-9]+)*$/,x=function(e,n,t){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=e.split(":");if("@"===e.slice(0,1)){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){var o=i.pop(),a=i.pop(),c={provider:i.length>0?i[0]:r,prefix:a,name:o};return n&&!w(c)?null:c}var u=i[0],s=u.split("-");if(s.length>1){var l={provider:r,prefix:s.shift(),name:s.join("-")};return n&&!w(l)?null:l}if(t&&""===r){var f={provider:r,prefix:"",name:u};return n&&!w(f,t)?null:f}return null},w=function(e,n){return!!e&&!(""!==e.provider&&!e.provider.match(y)||!(n&&""===e.prefix||e.prefix.match(y))||!e.name.match(y))};function k(e,n){var t=function(e,n){var t={};!e.hFlip!==!n.hFlip&&(t.hFlip=!0),!e.vFlip!==!n.vFlip&&(t.vFlip=!0);var r=((e.rotate||0)+(n.rotate||0))%4;return r&&(t.rotate=r),t}(e,n);for(var r in h)r in f?r in e&&!(r in t)&&(t[r]=f[r]):r in n?t[r]=n[r]:r in e&&(t[r]=e[r]);return t}function j(e,n,t){var r=e.icons,i=e.aliases||Object.create(null),o={};function a(e){o=k(r[e]||i[e],o)}return a(n),t.forEach(a),k(e,o)}function Z(e,n){var t=[];if("object"!==typeof e||"object"!==typeof e.icons)return t;e.not_found instanceof Array&&e.not_found.forEach((function(e){n(e,null),t.push(e)}));var r=function(e,n){var t=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);return(n||Object.keys(t).concat(Object.keys(r))).forEach((function e(n){if(t[n])return i[n]=[];if(!(n in i)){i[n]=null;var o=r[n]&&r[n].parent,a=o&&e(o);a&&(i[n]=[o].concat(a))}return i[n]})),i}(e);for(var i in r){var o=r[i];o&&(n(i,j(e,i,o)),t.push(i))}return t}var A=(0,s.Z)({provider:"",aliases:{},not_found:{}},l);function O(e,n){for(var t in n)if(t in e&&typeof e[t]!==typeof n[t])return!1;return!0}function C(e){if("object"!==typeof e||null===e)return null;var n=e;if("string"!==typeof n.prefix||!e.icons||"object"!==typeof e.icons)return null;if(!O(e,A))return null;var t=n.icons;for(var r in t){var i=t[r];if(!r.match(y)||"string"!==typeof i.body||!O(i,h))return null}var o=n.aliases||Object.create(null);for(var a in o){var c=o[a],u=c.parent;if(!a.match(y)||"string"!==typeof u||!t[u]&&!o[u]||!O(c,h))return null}return n}var P=Object.create(null);function _(e,n){var t=P[e]||(P[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 S(e,n){return C(n)?Z(n,(function(n,t){t?e.icons[n]=t:e.missing.add(n)})):[]}function T(e,n){var t=[];return("string"===typeof e?[e]:Object.keys(P)).forEach((function(e){("string"===typeof e&&"string"===typeof n?[n]:Object.keys(P[e]||{})).forEach((function(n){var r=_(e,n);t=t.concat(Object.keys(r.icons).map((function(t){return(""!==e?"@"+e+":":"")+n+":"+t})))}))})),t}var E=!1;function I(e){return"boolean"===typeof e&&(E=e),E}function M(e){var n="string"===typeof e?x(e,!0,E):e;if(n){var t=_(n.provider,n.prefix),r=n.name;return t.icons[r]||(t.missing.has(r)?null:void 0)}}function z(e,n){var t=x(e,!0,E);return!!t&&function(e,n,t){try{if("string"===typeof t.body)return e.icons[n]=(0,s.Z)({},t),!0}catch(r){}return!1}(_(t.provider,t.prefix),t.name,n)}function L(e,n){if("object"!==typeof e)return!1;if("string"!==typeof n&&(n=e.provider||""),E&&!n&&!e.prefix){var t=!1;return C(e)&&(e.prefix="",Z(e,(function(e,n){n&&z(e,n)&&(t=!0)}))),t}var r=e.prefix;return!!w({provider:n,prefix:r,name:"a"})&&!!S(_(n,r),e)}function R(e){return!!M(e)}function N(e){var n=M(e);return n?(0,s.Z)((0,s.Z)({},d),n):null}function F(e,n){e.forEach((function(e){var t=e.loaderCallbacks;t&&(e.loaderCallbacks=t.filter((function(e){return e.id!==n})))}))}var D=0;var q=Object.create(null);function H(e,n){q[e]=n}function Q(e){return q[e]||q[""]}var U={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function B(e,n,t,r){var i,o=e.resources.length,a=e.random?Math.floor(Math.random()*o):e.index;if(e.random){var c=e.resources.slice(0);for(i=[];c.length>1;){var u=Math.floor(Math.random()*c.length);i.push(c[u]),c=c.slice(0,u).concat(c.slice(u+1))}i=i.concat(c)}else i=e.resources.slice(a).concat(e.resources.slice(0,a));var s,l=Date.now(),f="pending",d=0,h=null,p=[],v=[];function g(){h&&(clearTimeout(h),h=null)}function b(){"pending"===f&&(f="aborted"),g(),p.forEach((function(e){"pending"===e.status&&(e.status="aborted")})),p=[]}function m(e,n){n&&(v=[]),"function"===typeof e&&v.push(e)}function y(){f="failed",v.forEach((function(e){e(void 0,s)}))}function x(){p.forEach((function(e){"pending"===e.status&&(e.status="aborted")})),p=[]}function w(){if("pending"===f){g();var r=i.shift();if(void 0===r)return p.length?void(h=setTimeout((function(){g(),"pending"===f&&(x(),y())}),e.timeout)):void y();var o={status:"pending",resource:r,callback:function(n,t){!function(n,t,r){var o="success"!==t;switch(p=p.filter((function(e){return e!==n})),f){case"pending":break;case"failed":if(o||!e.dataAfterTimeout)return;break;default:return}if("abort"===t)return s=r,void y();if(o)return s=r,void(p.length||(i.length?w():y()));if(g(),x(),!e.random){var a=e.resources.indexOf(n.resource);-1!==a&&a!==e.index&&(e.index=a)}f="completed",v.forEach((function(e){e(r)}))}(o,n,t)}};p.push(o),d++,h=setTimeout(w,e.rotate),t(r,n,o.callback)}}return"function"===typeof r&&v.push(r),setTimeout(w),function(){return{startTime:l,payload:n,status:f,queriesSent:d,queriesPending:p.length,subscribe:m,abort:b}}}function J(e){var n=(0,s.Z)((0,s.Z)({},U),e),t=[];function r(){t=t.filter((function(e){return"pending"===e().status}))}return{query:function(e,i,o){var a=B(n,e,i,(function(e,n){r(),o&&o(e,n)}));return t.push(a),a},find:function(e){return t.find((function(n){return e(n)}))||null},setIndex:function(e){n.index=e},getIndex:function(){return n.index},cleanup:r}}function K(e){var n;if("string"===typeof e.resources)n=[e.resources];else if(!((n=e.resources)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}}for(var $=Object.create(null),W=["https://api.simplesvg.com","https://api.unisvg.com"],X=[];W.length>0;)1===W.length||Math.random()>.5?X.push(W.shift()):X.push(W.pop());function V(e,n){var t=K(n);return null!==t&&($[e]=t,!0)}function G(e){return $[e]}function Y(){return Object.keys($)}function ee(){}$[""]=K({resources:["https://api.iconify.design"].concat(X)});var ne=Object.create(null);function te(e,n,t){var r,i;if("string"===typeof e){var o=Q(e);if(!o)return t(void 0,424),ee;i=o.send;var a=function(e){if(!ne[e]){var n=G(e);if(!n)return;var t={config:n,redundancy:J(n)};ne[e]=t}return ne[e]}(e);a&&(r=a.redundancy)}else{var c=K(e);if(c){r=J(c);var u=Q(e.resources?e.resources[0]:"");u&&(i=u.send)}}return r&&i?r.query(n,i,t)().abort:(t(void 0,424),ee)}var re="iconify2",ie="iconify",oe=ie+"-count",ae=ie+"-version",ce=36e5,ue=168;function se(e,n){try{return e.getItem(n)}catch(t){}}function le(e,n,t){try{return e.setItem(n,t),!0}catch(r){}}function fe(e,n){try{e.removeItem(n)}catch(t){}}function de(e,n){return le(e,oe,n.toString())}function he(e){return parseInt(se(e,oe))||0}var pe={local:!0,session:!0},ve={local:new Set,session:new Set},ge=!1;var be="undefined"===typeof window?{}:window;function me(e){var n=e+"Storage";try{if(be&&be[n]&&"number"===typeof be[n].length)return be[n]}catch(t){}pe[e]=!1}function ye(e,n){var t=me(e);if(t){var r=se(t,ae);if(r!==re){if(r)for(var i=he(t),o=0;o<i;o++)fe(t,ie+o.toString());return le(t,ae,re),void de(t,0)}for(var a=Math.floor(Date.now()/ce)-ue,c=function(e){var r=ie+e.toString(),i=se(t,r);if("string"===typeof i){try{var o=JSON.parse(i);if("object"===typeof o&&"number"===typeof o.cached&&o.cached>a&&"string"===typeof o.provider&&"object"===typeof o.data&&"string"===typeof o.data.prefix&&n(o,e))return!0}catch(c){}fe(t,r)}},u=he(t),s=u-1;s>=0;s--)c(s)||(s===u-1?(u--,de(t,u)):ve[e].add(s))}}function xe(){if(!ge)for(var e in ge=!0,pe)ye(e,(function(e){var n=e.data,t=_(e.provider,n.prefix);if(!S(t,n).length)return!1;var r=n.lastModified||-1;return t.lastModifiedCached=t.lastModifiedCached?Math.min(t.lastModifiedCached,r):r,!0}))}function we(e,n){function t(t){var r;if(pe[t]&&(r=me(t))){var i,o=ve[t];if(o.size)o.delete(i=Array.from(o).shift());else if(!de(r,(i=he(r))+1))return;var a={cached:Math.floor(Date.now()/ce),provider:e.provider,data:n};return le(r,ie+i.toString(),JSON.stringify(a))}}ge||xe(),n.lastModified&&!function(e,n){var t=e.lastModifiedCached;if(t&&t>=n)return t===n;if(e.lastModifiedCached=n,t)for(var r in pe)ye(r,(function(t){var r=t.data;return t.provider!==e.provider||r.prefix!==e.prefix||r.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 ke(){}function je(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout((function(){e.iconsLoaderFlag=!1,function(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout((function(){e.pendingCallbacksFlag=!1;var n=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(n.length){var t=!1,r=e.provider,i=e.prefix;n.forEach((function(n){var o=n.icons,a=o.pending.length;o.pending=o.pending.filter((function(n){if(n.prefix!==i)return!0;var a=n.name;if(e.icons[a])o.loaded.push({provider:r,prefix:i,name:a});else{if(!e.missing.has(a))return t=!0,!0;o.missing.push({provider:r,prefix:i,name:a})}return!1})),o.pending.length!==a&&(t||F([e],n.id),n.callback(o.loaded.slice(0),o.missing.slice(0),o.pending.slice(0),n.abort))}))}})))}(e)})))}var Ze=function(e,n){var t=function(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],t=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=[];return e.forEach((function(e){var i="string"===typeof e?x(e,n,t):e;i&&r.push(i)})),r}(e,!0,I()),r=function(e){var n={loaded:[],missing:[],pending:[]},t=Object.create(null);e.sort((function(e,n){return e.provider!==n.provider?e.provider.localeCompare(n.provider):e.prefix!==n.prefix?e.prefix.localeCompare(n.prefix):e.name.localeCompare(n.name)}));var r={provider:"",prefix:"",name:""};return e.forEach((function(e){if(r.name!==e.name||r.prefix!==e.prefix||r.provider!==e.provider){r=e;var i=e.provider,o=e.prefix,a=e.name,c=t[i]||(t[i]=Object.create(null)),u=c[o]||(c[o]=_(i,o)),s={provider:i,prefix:o,name:a};(a in u.icons?n.loaded:""===o||u.missing.has(a)?n.missing:n.pending).push(s)}})),n}(t);if(!r.pending.length){var i=!0;return n&&setTimeout((function(){i&&n(r.loaded,r.missing,r.pending,ke)})),function(){i=!1}}var o,a,c=Object.create(null),u=[];return r.pending.forEach((function(e){var n=e.provider,t=e.prefix;if(t!==a||n!==o){o=n,a=t,u.push(_(n,t));var r=c[n]||(c[n]=Object.create(null));r[t]||(r[t]=[])}})),r.pending.forEach((function(e){var n=e.provider,t=e.prefix,r=e.name,i=_(n,t),o=i.pendingIcons||(i.pendingIcons=new Set);o.has(r)||(o.add(r),c[n][t].push(r))})),u.forEach((function(e){var n=e.provider,t=e.prefix;c[n][t].length&&function(e,n){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(n).sort():e.iconsToLoad=n,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout((function(){e.iconsQueueFlag=!1;var n,t=e.provider,r=e.prefix,i=e.iconsToLoad;delete e.iconsToLoad,i&&(n=Q(t))&&n.prepare(t,r,i).forEach((function(n){te(t,n,(function(t){if("object"!==typeof t)n.icons.forEach((function(n){e.missing.add(n)}));else try{var r=S(e,t);if(!r.length)return;var i=e.pendingIcons;i&&r.forEach((function(e){i.delete(e)})),we(e,t)}catch(o){console.error(o)}je(e)}))}))})))}(e,c[n][t])})),n?function(e,n,t){var r=D++,i=F.bind(null,t,r);if(!n.pending.length)return i;var o={id:r,icons:n,callback:e,abort:i};return t.forEach((function(e){(e.loaderCallbacks||(e.loaderCallbacks=[])).push(o)})),i}(n,r,u):ke},Ae=function(e){return new Promise((function(n,t){var r="string"===typeof e?x(e,!0):e;r?Ze([r||e],(function(i){if(i.length&&r){var o=M(r);if(o)return void n((0,s.Z)((0,s.Z)({},d),o))}t(e)})):t(e)}))};function Oe(e,n){var t="string"===typeof e?x(e,!0,!0):null;if(!t){var r=function(e){try{var n="string"===typeof e?JSON.parse(e):e;if("string"===typeof n.body)return(0,s.Z)({},n)}catch(t){}}(e);return{value:e,data:r}}var i=M(t);if(void 0!==i||!t.prefix)return{value:e,name:t,data:i};var o=Ze([t],(function(){return n(e,t,M(t))}));return{value:e,name:t,loading:o}}function Ce(e){return e.hasAttribute("inline")}var Pe=!1;try{Pe=0===navigator.vendor.indexOf("Apple")}catch(on){}var _e=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Se=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Te(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;var r=e.split(_e);if(null===r||!r.length)return e;for(var i=[],o=r.shift(),a=Se.test(o);;){if(a){var c=parseFloat(o);isNaN(c)?i.push(o):i.push(Math.ceil(c*n*t)/t)}else i.push(o);if(void 0===(o=r.shift()))return i.join("");a=!a}}var Ee=function(e){return"unset"===e||"undefined"===e||"none"===e};function Ie(e,n){var t=(0,s.Z)((0,s.Z)({},d),e),r=(0,s.Z)((0,s.Z)({},v),n),i={left:t.left,top:t.top,width:t.width,height:t.height},o=t.body;[t,r].forEach((function(e){var n,t=[],r=e.hFlip,a=e.vFlip,c=e.rotate;switch(r?a?c+=2:(t.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),t.push("scale(-1 1)"),i.top=i.left=0):a&&(t.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),t.push("scale(1 -1)"),i.top=i.left=0),c<0&&(c-=4*Math.floor(c/4)),c%=4){case 1:n=i.height/2+i.top,t.unshift("rotate(90 "+n.toString()+" "+n.toString()+")");break;case 2:t.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:n=i.width/2+i.left,t.unshift("rotate(-90 "+n.toString()+" "+n.toString()+")")}c%2===1&&(i.left!==i.top&&(n=i.left,i.left=i.top,i.top=n),i.width!==i.height&&(n=i.width,i.width=i.height,i.height=n)),t.length&&(o='<g transform="'+t.join(" ")+'">'+o+"</g>")}));var a,c,u=r.width,l=r.height,f=i.width,h=i.height;null===u?a=Te(c=null===l?"1em":"auto"===l?h:l,f/h):(a="auto"===u?f:u,c=null===l?Te(a,h/f):"auto"===l?h:l);var p={},g=function(e,n){Ee(n)||(p[e]=n.toString())};return g("width",a),g("height",c),p.viewBox=i.left.toString()+" "+i.top.toString()+" "+f.toString()+" "+h.toString(),{attributes:p,body:o}}var Me=function(){var e;try{if("function"===typeof(e=fetch))return e}catch(on){}}();function ze(e){Me=e}function Le(){return Me}var Re={prepare:function(e,n,t){var r=[],i=function(e,n){var t,r=G(e);if(!r)return 0;if(r.maxURL){var i=0;r.resources.forEach((function(e){var n=e;i=Math.max(i,n.length)}));var o=n+".json?icons=";t=r.maxURL-i-r.path.length-o.length}else t=0;return t}(e,n),o="icons",a={type:o,provider:e,prefix:n,icons:[]},c=0;return t.forEach((function(t,u){(c+=t.length+1)>=i&&u>0&&(r.push(a),a={type:o,provider:e,prefix:n,icons:[]},c=t.length),a.icons.push(t)})),r.push(a),r},send:function(e,n,t){if(Me){var r=function(e){if("string"===typeof e){var n=G(e);if(n)return n.path}return"/"}(n.provider);switch(n.type){case"icons":var i=n.prefix,o=n.icons.join(",");r+=i+".json?"+new URLSearchParams({icons:o}).toString();break;case"custom":var a=n.uri;r+="/"===a.slice(0,1)?a.slice(1):a;break;default:return void t("abort",400)}var c=503;Me(e+r).then((function(e){var n=e.status;if(200===n)return c=501,e.json();setTimeout((function(){t(function(e){return 404===e}(n)?"abort":"next",n)}))})).then((function(e){"object"===typeof e&&null!==e?setTimeout((function(){t("success",e)})):setTimeout((function(){404===e?t("abort",e):t("next",c)}))})).catch((function(){t("next",c)}))}else t("abort",424)}};function Ne(e,n){switch(e){case"local":case"session":pe[e]=n;break;case"all":for(var t in pe)pe[t]=n}}var Fe="data-style",De="";function qe(e){De=e}function He(e,n){var t=Array.from(e.childNodes).find((function(e){return e.hasAttribute&&e.hasAttribute(Fe)}));t||((t=document.createElement("style")).setAttribute(Fe,Fe),e.appendChild(t)),t.textContent=":host{display:inline-block;vertical-align:"+(n?"-0.125em":"0")+"}span,svg{display:block}"+De}function Qe(){var e;H("",Re),I(!0);try{e=window}catch(t){}if(e){if(xe(),void 0!==e.IconifyPreload){var n=e.IconifyPreload,t="Invalid IconifyPreload syntax.";"object"===typeof n&&null!==n&&(n instanceof Array?n:[n]).forEach((function(e){try{("object"!==typeof e||null===e||e instanceof Array||"object"!==typeof e.icons||"string"!==typeof e.prefix||!L(e))&&console.error(t)}catch(n){console.error(t)}}))}if(void 0!==e.IconifyProviders){var r=e.IconifyProviders;if("object"===typeof r&&null!==r)for(var i in r){var o="IconifyProviders["+i+"] is invalid.";try{var a=r[i];if("object"!==typeof a||!a||void 0===a.resources)continue;V(i,a)||console.error(o)}catch(c){console.error(o)}}}}return{enableCache:function(e){return Ne(e,!0)},disableCache:function(e){return Ne(e,!1)},iconExists:R,getIcon:N,listIcons:T,addIcon:z,addCollection:L,calculateSize:Te,buildIcon:Ie,loadIcons:Ze,loadIcon:Ae,addAPIProvider:V,appendCustomStyle:qe,_api:{getAPIConfig:G,setAPIModule:H,sendAPIQuery:te,setFetch:ze,getFetch:Le,listAPIProviders:Y}}}function Ue(e,n){var t=-1===e.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(var r in n)t+=" "+r+'="'+n[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+t+">"+e+"</svg>"}var Be,Je={"background-color":"currentColor"},Ke={"background-color":"transparent"},$e={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},We={"-webkit-mask":Je,mask:Je,background:Ke};for(var Xe in We){var Ve=We[Xe];for(var Ge in $e)Ve[Xe+"-"+Ge]=$e[Ge]}function Ye(e){return e?e+(e.match(/^[-0-9.]+$/)?"px":""):"inherit"}function en(e){return void 0===Be&&function(){try{Be=window.trustedTypes.createPolicy("iconify",{createHTML:function(e){return e}})}catch(on){Be=null}}(),Be?Be.createHTML(e):e}function nn(e,n){var t=n.icon.data,r=n.customisations,i=Ie(t,r);r.preserveAspectRatio&&(i.attributes.preserveAspectRatio=r.preserveAspectRatio);var o,a=n.renderedMode;if("svg"===a)o=function(e){var n=document.createElement("span"),t=e.attributes,r="";t.width||(r="width: inherit;"),t.height||(r+="height: inherit;"),r&&(t.style=r);var i=Ue(e.body,t);return n.innerHTML=en(i),n.firstChild}(i);else o=function(e,n,t){var r=document.createElement("span"),i=e.body;-1!==i.indexOf("<a")&&(i+="\x3c!-- "+Date.now()+" --\x3e");var o=e.attributes,a='url("'+(l=Ue(i,(0,s.Z)((0,s.Z)({},o),{},{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," ")}(l)+'")'),c=r.style,u=(0,s.Z)({"--svg":a,width:Ye(o.width),height:Ye(o.height)},t?Je:Ke);var l;for(var f in u)c.setProperty(f,u[f]);return r}(i,(0,s.Z)((0,s.Z)({},d),t),"mask"===a);var c=Array.from(e.childNodes).find((function(e){var n=e.tagName&&e.tagName.toUpperCase();return"SPAN"===n||"SVG"===n}));c?"SPAN"===o.tagName&&c.tagName===o.tagName?c.setAttribute("style",o.getAttribute("style")):e.replaceChild(o,c):e.appendChild(o)}function tn(e,n,t){return{rendered:!1,inline:n,icon:e,lastRender:t&&(t.rendered?t:t.lastRender)}}var rn=function(){var e,n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"iconify-icon";try{e=window.customElements,n=window.HTMLElement}catch(on){return}if(e&&n){var s=e.get(t);if(s)return s;var l=["icon","mode","inline","width","height","rotate","flip"],f=function(e){(0,a.Z)(t,e);var n=(0,c.Z)(t);function t(){var e;(0,r.Z)(this,t),e=n.call(this),(0,u.Z)((0,o.Z)(e),"_shadowRoot",void 0),(0,u.Z)((0,o.Z)(e),"_state",void 0),(0,u.Z)((0,o.Z)(e),"_checkQueued",!1);var i=e._shadowRoot=e.attachShadow({mode:"open"}),a=Ce((0,o.Z)(e));return He(i,a),e._state=tn({value:""},a),e._queueCheck(),e}return(0,i.Z)(t,[{key:"attributeChangedCallback",value:function(e){if("inline"===e){var n=Ce(this),t=this._state;n!==t.inline&&(t.inline=n,He(this._shadowRoot,n))}else this._queueCheck()}},{key:"icon",get:function(){var e=this.getAttribute("icon");if(e&&"{"===e.slice(0,1))try{return JSON.parse(e)}catch(on){}return e},set:function(e){"object"===typeof e&&(e=JSON.stringify(e)),this.setAttribute("icon",e)}},{key:"inline",get:function(){return Ce(this)},set:function(e){e?this.setAttribute("inline","true"):this.removeAttribute("inline")}},{key:"restartAnimation",value:function(){var e=this._state;if(e.rendered){var n=this._shadowRoot;if("svg"===e.renderedMode)try{return void n.lastChild.setCurrentTime(0)}catch(on){}nn(n,e)}}},{key:"status",get:function(){var e=this._state;return e.rendered?"rendered":null===e.icon.data?"failed":"loading"}},{key:"_queueCheck",value:function(){var e=this;this._checkQueued||(this._checkQueued=!0,setTimeout((function(){e._check()})))}},{key:"_check",value:function(){if(this._checkQueued){this._checkQueued=!1;var e=this._state,n=this.getAttribute("icon");if(n===e.icon.value){if(e.rendered){var t=this.getAttribute("mode"),r=m(this);(e.attrMode!==t||function(e,n){for(var t in b)if(e[t]!==n[t])return!0;return!1}(e.customisations,r))&&this._renderIcon(e.icon,r,t)}}else this._iconChanged(n)}}},{key:"_iconChanged",value:function(e){var n=this,t=Oe(e,(function(e,t,r){var i=n._state;if(!i.rendered&&n.getAttribute("icon")===e){var o={value:e,name:t,data:r};o.data?n._gotIconData(o):i.icon=o}}));t.data?this._gotIconData(t):this._state=tn(t,this._state.inline,this._state)}},{key:"_gotIconData",value:function(e){this._checkQueued=!1,this._renderIcon(e,m(this),this.getAttribute("mode"))}},{key:"_renderIcon",value:function(e,n,t){var r=function(e,n){switch(n){case"svg":case"bg":case"mask":return n}return"style"===n||!Pe&&-1!==e.indexOf("<a")?-1===e.indexOf("currentColor")?"bg":"mask":"svg"}(e.data.body,t),i=this._state.inline;nn(this._shadowRoot,this._state={rendered:!0,icon:e,inline:i,customisations:n,attrMode:t,renderedMode:r})}}],[{key:"observedAttributes",get:function(){return l.slice(0)}}]),t}(n);l.forEach((function(e){e in f.prototype||Object.defineProperty(f.prototype,e,{get:function(){return this.getAttribute(e)},set:function(n){null!==n?this.setAttribute(e,n):this.removeAttribute(e)}})}));var d=Qe();for(var h in d)f[h]=f.prototype[h]=d[h];return e.define(t,f),f}}()||Qe();rn.enableCache,rn.disableCache,rn.iconExists,rn.getIcon,rn.listIcons,rn.addIcon,rn.addCollection,rn.calculateSize,rn.buildIcon,rn.loadIcons,rn.loadIcon,rn.addAPIProvider,rn._api}}]);
|
|
2
|
-
//# sourceMappingURL=5070.5979037b.chunk.js.map
|